@marimo-team/islands 0.13.16-dev2 → 0.13.16-dev21
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/{ConnectedDataExplorerComponent-BizAnuDQ.js → ConnectedDataExplorerComponent-CbgMGTNw.js} +1495 -1496
- package/dist/ImageComparisonComponent-BEvxQRYY.js +248 -0
- package/dist/{VegaLite-BvtjUHLS.js → VegaLite-CtlLD_UH.js} +12483 -12485
- package/dist/{_baseUniq-C1K8a5jF.js → _baseUniq-BPYian-Y.js} +13 -13
- package/dist/{any-language-editor-D3C2KiQW.js → any-language-editor-B9yuOY2a.js} +2 -2
- package/dist/{architectureDiagram-IEHRJDOE-DhrFWr1a.js → architectureDiagram-IEHRJDOE-yPyQlJjy.js} +1800 -1800
- package/dist/asn1-jKiBa2Ya.js +10 -10
- package/dist/assets/{save-worker-9HEtFDM0.js → save-worker-DwN_qfSx.js} +695 -702
- package/dist/assets/{worker-BGGm0KYZ.js → worker-BzMPE1Lq.js} +732 -739
- package/dist/assets/{worker-BNsqBj5w.js → worker-ISYYr8IB.js} +726 -732
- package/dist/blockDiagram-JOT3LUYC-548hLzGM.js +2249 -0
- package/dist/{c4Diagram-VJAJSXHY-DKSU0_Zg.js → c4Diagram-VJAJSXHY-CkEjf0GP.js} +401 -400
- package/dist/{channel-DMiLp-mI.js → channel-B4Bg4vOE.js} +1 -1
- package/dist/chunk-4BMEZGHF-De9P61oF.js +9 -0
- package/dist/chunk-A2AXSNBT-geH9ZZvt.js +1373 -0
- package/dist/chunk-AEK57VVT-B2sQ0hQa.js +1416 -0
- package/dist/{chunk-D6G4REZN-BZV3ukOi.js → chunk-D6G4REZN-C2nlv3Zm.js} +2 -2
- package/dist/{chunk-RZ5BOZE2-B4rOVQD8.js → chunk-RZ5BOZE2-CmOabQbu.js} +8 -8
- package/dist/chunk-XZIHB7SX-C-O1Dk7e.js +16 -0
- package/dist/{classDiagram-GIVACNV2-DLRT4_A4.js → classDiagram-GIVACNV2-Du2vgWFA.js} +2 -2
- package/dist/{classDiagram-v2-COTLJTTW-DLRT4_A4.js → classDiagram-v2-COTLJTTW-Du2vgWFA.js} +2 -2
- package/dist/clojure-CCKyeQKf.js +2 -2
- package/dist/{clone-CPwu6xRn.js → clone-DnSM2M6p.js} +1 -1
- package/dist/css-bIlmDBTK.js +19 -19
- package/dist/{cytoscape.esm-DAyNQ0qu.js → cytoscape.esm-CCQ3SVU1.js} +2301 -2301
- package/dist/dagre-OKDRZEBW-CnGJy_Hk.js +447 -0
- package/dist/{data-editor-CYvUeKhw.js → data-editor--qYs3N6K.js} +5785 -5795
- package/dist/{diagram-SSKATNLV-D8WhiY2q.js → diagram-SSKATNLV-Ba25ch_t.js} +13 -13
- package/dist/{diagram-VNBRO52H-Bil9sOsr.js → diagram-VNBRO52H-ky1Bklgc.js} +3 -3
- package/dist/{erDiagram-Q7BY3M3F-J-Jm-DD7.js → erDiagram-Q7BY3M3F-DKx4pdnF.js} +263 -262
- package/dist/flowDiagram-4HSFHLVR-D2g6V5ro.js +1623 -0
- package/dist/{ganttDiagram-APWFNJXF-C2G0-fOq.js → ganttDiagram-APWFNJXF-CM2375VL.js} +45 -45
- package/dist/gitGraphDiagram-7IBYFJ6S-CYBXIIJu.js +712 -0
- package/dist/{graph-BFerxzEi.js → graph-BXO6Y4fK.js} +9 -9
- package/dist/{index-DfpR00QG.js → index-BXQhgr_p.js} +99 -98
- package/dist/{index-BhtvwOag.js → index-CLVuMf-N.js} +28 -28
- package/dist/{index-j8M50mVa.js → index-DsjbPR0S.js} +4 -4
- package/dist/{index-DkuVwdVm.js → index-kCGDeFbz.js} +9 -9
- package/dist/{infoDiagram-PH2N3AL5-AYtb1_Lz.js → infoDiagram-PH2N3AL5-Bysuy2jX.js} +3 -3
- package/dist/javascript-WMWNx-Vj.js +47 -47
- package/dist/{journeyDiagram-U35MCT3I-Bdz9gIBI.js → journeyDiagram-U35MCT3I-TBaQruI8.js} +18 -18
- package/dist/kanban-definition-NDS4AKOZ-D4jw_Hry.js +719 -0
- package/dist/{katex-9tX9hjoM.js → katex-CUSbq6rG.js} +2180 -2180
- package/dist/{layout-Qs-BVu8V.js → layout-BUA-DPJm.js} +27 -27
- package/dist/{linear-SIbCb7yI.js → linear-BnTRnU3J.js} +2 -2
- package/dist/main-D-37AaR4.js +169855 -0
- package/dist/main.js +1 -1
- package/dist/mermaid-BzFQ2d9i.js +14517 -0
- package/dist/{mhchem-L5-rce7L.js → mhchem-Db_f2n8C.js} +30 -30
- package/dist/{min-BTA1UVkn.js → min-D_xIH6wU.js} +2 -2
- package/dist/{mindmap-definition-ALO5MXBD-CdrD5BzZ.js → mindmap-definition-ALO5MXBD-J6RsqNRW.js} +359 -359
- package/dist/mllike-BSnXJBGA.js +7 -7
- package/dist/{pieDiagram-IB7DONF6-BbbxWeqU.js → pieDiagram-IB7DONF6-CyMim2nt.js} +34 -34
- package/dist/pug-BqUR2bBq.js +35 -35
- package/dist/python-B5QdSKoL.js +18 -18
- package/dist/quadrantDiagram-7GDLP6J5-wbyf83kA.js +1025 -0
- package/dist/{radar-MK3ICKWK-Z5R0bt0z.js → radar-MK3ICKWK-BDGRcSnx.js} +2555 -2554
- package/dist/{react-plotly-DqDxe4Uh.js → react-plotly-DrgClWur.js} +6595 -6597
- package/dist/{requirementDiagram-KVF5MWMF-DMnvzAxX.js → requirementDiagram-KVF5MWMF-Cm8xuD8x.js} +251 -250
- package/dist/rpm-IznJm2Xc.js +9 -9
- package/dist/{sankeyDiagram-QLVOVGJD-DbUWg3a4.js → sankeyDiagram-QLVOVGJD-iRFZmvn2.js} +339 -338
- package/dist/{sequenceDiagram-X6HHIX6F-JltcBwLF.js → sequenceDiagram-X6HHIX6F-Dr8oo1TZ.js} +822 -821
- package/dist/{slides-component-DVr5mf9p.js → slides-component-D8N71t3Y.js} +280 -280
- package/dist/sql-mMre1Bo3.js +9 -9
- package/dist/{stateDiagram-DGXRK772-qbXtyoS6.js → stateDiagram-DGXRK772-BNQYJSkB.js} +17 -17
- package/dist/{stateDiagram-v2-YXO3MK2T-Ba7q5pMK.js → stateDiagram-v2-YXO3MK2T-Dl249u1C.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{time-DHD8Fix8.js → time-hpTGXdsY.js} +2 -2
- package/dist/{timeline-definition-BDJGKUSR-q4gOCBRq.js → timeline-definition-BDJGKUSR-kYwIJd20.js} +261 -261
- package/dist/timer-BYwnU4DF.js +378 -378
- package/dist/ttcn-cfg-Bac_acMi.js +9 -9
- package/dist/{vega-component-D2NZFVvw.js → vega-component-CIAcZw-F.js} +82 -82
- package/dist/{xychartDiagram-VJFVF3MP-BZs9xPvU.js → xychartDiagram-VJFVF3MP-Cj3j6vWQ.js} +472 -471
- package/package.json +7 -6
- package/dist/blockDiagram-JOT3LUYC-COVagShg.js +0 -2248
- package/dist/chunk-4BMEZGHF-CeMSohVe.js +0 -9
- package/dist/chunk-A2AXSNBT-mQ3fXQfx.js +0 -1372
- package/dist/chunk-AEK57VVT-B7kw2yt6.js +0 -1415
- package/dist/chunk-XZIHB7SX-C3-5SkZh.js +0 -15
- package/dist/dagre-OKDRZEBW-yEQf6TwX.js +0 -447
- package/dist/flowDiagram-4HSFHLVR-Dhymtq1g.js +0 -1622
- package/dist/gitGraphDiagram-7IBYFJ6S-DCZAwPro.js +0 -712
- package/dist/kanban-definition-NDS4AKOZ-ByLpDX9Y.js +0 -719
- package/dist/main-Cx3zrED9.js +0 -156521
- package/dist/mermaid-DAi_EtLa.js +0 -11991
- package/dist/quadrantDiagram-7GDLP6J5-1UQgbW9Z.js +0 -1024
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var _a;
|
|
2
|
+
import { a as fe, b as Vt, g as Pt, d as xe, c as Te, e as ye } from "./chunk-D6G4REZN-C2nlv3Zm.js";
|
|
3
|
+
import { I as Ee } from "./chunk-XZIHB7SX-C-O1Dk7e.js";
|
|
4
|
+
import { _ as u, o as be, c as $, d as It, l as G, j as Jt, e as me, f as we, k as v, b as Ut, s as ve, q as Ie, a as Le, g as _e, t as Pe, z as Ae, i as Lt, u as Y, N as ot, O as Et, P as Zt, Z as ke, Q as Qt, G as Dt } from "./mermaid-BzFQ2d9i.js";
|
|
5
|
+
var Ct = function() {
|
|
6
|
+
var t = /* @__PURE__ */ u(function(ht, w, L, P) {
|
|
7
|
+
for (L = L || {}, P = ht.length; P--; L[ht[P]] = w) ;
|
|
7
8
|
return L;
|
|
8
|
-
}, "o"),
|
|
9
|
+
}, "o"), e = [1, 2], c = [1, 3], s = [1, 4], r = [2, 4], i = [1, 9], o = [1, 11], h = [1, 13], d = [1, 14], a = [1, 16], f = [1, 17], E = [1, 18], g = [1, 24], T = [1, 25], m = [1, 26], I = [1, 27], A = [1, 28], O = [1, 29], S = [1, 30], B = [1, 31], D = [1, 32], F = [1, 33], q = [1, 34], X = [1, 35], tt = [1, 36], z = [1, 37], H = [1, 38], W = [1, 39], M = [1, 41], J = [1, 42], K = [1, 43], Z = [1, 44], et = [1, 45], N = [1, 46], y = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], _ = [4, 5, 16, 50, 52, 53], Q = [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], at = [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], ct = [1, 122], kt = {
|
|
9
10
|
trace: /* @__PURE__ */ u(function() {
|
|
10
11
|
}, "trace"),
|
|
11
12
|
yy: {},
|
|
12
13
|
symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, SD: 6, document: 7, line: 8, statement: 9, box_section: 10, box_line: 11, participant_statement: 12, create: 13, box: 14, restOfLine: 15, end: 16, signal: 17, autonumber: 18, NUM: 19, off: 20, activate: 21, actor: 22, deactivate: 23, note_statement: 24, links_statement: 25, link_statement: 26, properties_statement: 27, details_statement: 28, title: 29, legacy_title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, loop: 36, rect: 37, opt: 38, alt: 39, else_sections: 40, par: 41, par_sections: 42, par_over: 43, critical: 44, option_sections: 45, break: 46, option: 47, and: 48, else: 49, participant: 50, AS: 51, participant_actor: 52, destroy: 53, note: 54, placement: 55, text2: 56, over: 57, actor_pair: 58, links: 59, link: 60, properties: 61, details: 62, spaceList: 63, ",": 64, left_of: 65, right_of: 66, signaltype: 67, "+": 68, "-": 69, ACTOR: 70, SOLID_OPEN_ARROW: 71, DOTTED_OPEN_ARROW: 72, SOLID_ARROW: 73, 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
14
|
terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "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
15
|
productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]],
|
|
15
|
-
performAction: /* @__PURE__ */ u(function(
|
|
16
|
+
performAction: /* @__PURE__ */ u(function(w, L, P, b, R, l, yt) {
|
|
16
17
|
var p = l.length - 1;
|
|
17
18
|
switch (R) {
|
|
18
19
|
case 3:
|
|
@@ -42,16 +43,16 @@ var Ot = function() {
|
|
|
42
43
|
l[p - 1].unshift({ type: "boxStart", boxData: b.parseBoxData(l[p - 2]) }), l[p - 1].push({ type: "boxEnd", boxText: l[p - 2] }), this.$ = l[p - 1];
|
|
43
44
|
break;
|
|
44
45
|
case 18:
|
|
45
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(l[p - 2]), sequenceIndexStep: Number(l[p - 1]), sequenceVisible:
|
|
46
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(l[p - 2]), sequenceIndexStep: Number(l[p - 1]), sequenceVisible: true, signalType: b.LINETYPE.AUTONUMBER };
|
|
46
47
|
break;
|
|
47
48
|
case 19:
|
|
48
|
-
this.$ = { type: "sequenceIndex", sequenceIndex: Number(l[p - 1]), sequenceIndexStep: 1, sequenceVisible:
|
|
49
|
+
this.$ = { type: "sequenceIndex", sequenceIndex: Number(l[p - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: b.LINETYPE.AUTONUMBER };
|
|
49
50
|
break;
|
|
50
51
|
case 20:
|
|
51
|
-
this.$ = { type: "sequenceIndex", sequenceVisible:
|
|
52
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: b.LINETYPE.AUTONUMBER };
|
|
52
53
|
break;
|
|
53
54
|
case 21:
|
|
54
|
-
this.$ = { type: "sequenceIndex", sequenceVisible:
|
|
55
|
+
this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: b.LINETYPE.AUTONUMBER };
|
|
55
56
|
break;
|
|
56
57
|
case 22:
|
|
57
58
|
this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: l[p - 1].actor };
|
|
@@ -154,7 +155,7 @@ var Ot = function() {
|
|
|
154
155
|
this.$ = [
|
|
155
156
|
l[p - 4],
|
|
156
157
|
l[p - 1],
|
|
157
|
-
{ type: "addMessage", from: l[p - 4].actor, to: l[p - 1].actor, signalType: l[p - 3], msg: l[p], activate:
|
|
158
|
+
{ type: "addMessage", from: l[p - 4].actor, to: l[p - 1].actor, signalType: l[p - 3], msg: l[p], activate: true },
|
|
158
159
|
{ type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: l[p - 1].actor }
|
|
159
160
|
];
|
|
160
161
|
break;
|
|
@@ -207,55 +208,55 @@ var Ot = function() {
|
|
|
207
208
|
break;
|
|
208
209
|
}
|
|
209
210
|
}, "anonymous"),
|
|
210
|
-
table: [{ 3: 1, 4:
|
|
211
|
+
table: [{ 3: 1, 4: e, 5: c, 6: s }, { 1: [3] }, { 3: 5, 4: e, 5: c, 6: s }, { 3: 6, 4: e, 5: c, 6: s }, t([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], r, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: i, 5: o, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, t(y, [2, 5]), { 9: 47, 12: 12, 13: h, 14: d, 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 14]), { 12: 48, 50: z, 52: H, 53: W }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: N }, { 22: 55, 70: N }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, t(y, [2, 29]), t(y, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, t(y, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: N }, { 22: 72, 70: N }, { 22: 73, 70: N }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82], 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(y, [2, 6]), t(y, [2, 15]), t(_, [2, 9], { 10: 93 }), t(y, [2, 17]), { 5: [1, 95], 19: [1, 94] }, { 5: [1, 96] }, t(y, [2, 21]), { 5: [1, 97] }, { 5: [1, 98] }, t(y, [2, 24]), t(y, [2, 25]), t(y, [2, 26]), t(y, [2, 27]), t(y, [2, 28]), t(y, [2, 31]), t(y, [2, 32]), t(Q, r, { 7: 99 }), t(Q, r, { 7: 100 }), t(Q, r, { 7: 101 }), t(at, r, { 40: 102, 7: 103 }), t(k, r, { 42: 104, 7: 105 }), t(k, r, { 7: 105, 42: 106 }), t(Ft, r, { 45: 107, 7: 108 }), t(Q, r, { 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: ct }, { 56: 123, 81: ct }, { 56: 124, 81: ct }, { 56: 125, 81: ct }, { 4: [1, 128], 5: [1, 130], 11: 127, 12: 129, 16: [1, 126], 50: z, 52: H, 53: W }, { 5: [1, 131] }, t(y, [2, 19]), t(y, [2, 20]), t(y, [2, 22]), t(y, [2, 23]), { 4: i, 5: o, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [1, 132], 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, { 4: i, 5: o, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [1, 133], 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, { 4: i, 5: o, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [1, 134], 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, { 16: [1, 135] }, { 4: i, 5: o, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [2, 46], 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 49: [1, 136], 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, { 16: [1, 137] }, { 4: i, 5: o, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [2, 44], 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 48: [1, 138], 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, { 16: [1, 139] }, { 16: [1, 140] }, { 4: i, 5: o, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [2, 42], 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 47: [1, 141], 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, { 4: i, 5: o, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [1, 142], 17: 15, 18: a, 21: f, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: I, 35: A, 36: O, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: K, 61: Z, 62: et, 70: N }, { 15: [1, 143] }, t(y, [2, 49]), { 15: [1, 144] }, t(y, [2, 51]), t(y, [2, 52]), { 22: 145, 70: N }, { 22: 146, 70: N }, { 56: 147, 81: ct }, { 56: 148, 81: ct }, { 56: 149, 81: ct }, { 64: [1, 150], 81: [2, 62] }, { 5: [2, 55] }, { 5: [2, 79] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, t(y, [2, 16]), t(_, [2, 10]), { 12: 151, 50: z, 52: H, 53: W }, t(_, [2, 12]), t(_, [2, 13]), t(y, [2, 18]), t(y, [2, 34]), t(y, [2, 35]), t(y, [2, 36]), t(y, [2, 37]), { 15: [1, 152] }, t(y, [2, 38]), { 15: [1, 153] }, t(y, [2, 39]), t(y, [2, 40]), { 15: [1, 154] }, t(y, [2, 41]), { 5: [1, 155] }, { 5: [1, 156] }, { 56: 157, 81: ct }, { 56: 158, 81: ct }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 159, 70: N }, t(_, [2, 11]), t(at, r, { 7: 103, 40: 160 }), t(k, r, { 7: 105, 42: 161 }), t(Ft, r, { 7: 108, 45: 162 }), t(y, [2, 48]), t(y, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 81: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
|
|
211
212
|
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__ */ u(function(
|
|
213
|
+
parseError: /* @__PURE__ */ u(function(w, L) {
|
|
213
214
|
if (L.recoverable)
|
|
214
|
-
this.trace(
|
|
215
|
+
this.trace(w);
|
|
215
216
|
else {
|
|
216
|
-
var P = new Error(
|
|
217
|
+
var P = new Error(w);
|
|
217
218
|
throw P.hash = L, P;
|
|
218
219
|
}
|
|
219
220
|
}, "parseError"),
|
|
220
|
-
parse: /* @__PURE__ */ u(function(
|
|
221
|
-
var L = this, P = [0], b = [], R = [null], l = [],
|
|
222
|
-
for (var
|
|
223
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
224
|
-
V.setInput(
|
|
225
|
-
var
|
|
226
|
-
l.push(
|
|
227
|
-
var
|
|
221
|
+
parse: /* @__PURE__ */ u(function(w) {
|
|
222
|
+
var L = this, P = [0], b = [], R = [null], l = [], yt = this.table, p = "", mt = 0, qt = 0, de = 2, zt = 1, pe = l.slice.call(arguments, 1), V = Object.create(this.lexer), dt = { yy: {} };
|
|
223
|
+
for (var Nt in this.yy)
|
|
224
|
+
Object.prototype.hasOwnProperty.call(this.yy, Nt) && (dt.yy[Nt] = this.yy[Nt]);
|
|
225
|
+
V.setInput(w, dt.yy), dt.yy.lexer = V, dt.yy.parser = this, typeof V.yylloc > "u" && (V.yylloc = {});
|
|
226
|
+
var St = V.yylloc;
|
|
227
|
+
l.push(St);
|
|
228
|
+
var ue = V.options && V.options.ranges;
|
|
228
229
|
typeof dt.yy.parseError == "function" ? this.parseError = dt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
229
|
-
function
|
|
230
|
+
function ge(j) {
|
|
230
231
|
P.length = P.length - 2 * j, R.length = R.length - j, l.length = l.length - j;
|
|
231
232
|
}
|
|
232
|
-
u(
|
|
233
|
-
function
|
|
233
|
+
u(ge, "popStack");
|
|
234
|
+
function Ht() {
|
|
234
235
|
var j;
|
|
235
|
-
return j = b.pop() || V.lex() ||
|
|
236
|
+
return j = b.pop() || V.lex() || zt, typeof j != "number" && (j instanceof Array && (b = j, j = b.pop()), j = L.symbols_[j] || j), j;
|
|
236
237
|
}
|
|
237
|
-
u(
|
|
238
|
-
for (var U, pt, st,
|
|
239
|
-
if (pt = P[P.length - 1], this.defaultActions[pt] ? st = this.defaultActions[pt] : ((U === null || typeof U > "u") && (U =
|
|
240
|
-
var
|
|
241
|
-
|
|
242
|
-
for (
|
|
243
|
-
this.terminals_[
|
|
244
|
-
V.showPosition ?
|
|
238
|
+
u(Ht, "lex");
|
|
239
|
+
for (var U, pt, st, Mt, ft = {}, wt, lt, Kt, vt; ; ) {
|
|
240
|
+
if (pt = P[P.length - 1], this.defaultActions[pt] ? st = this.defaultActions[pt] : ((U === null || typeof U > "u") && (U = Ht()), st = yt[pt] && yt[pt][U]), typeof st > "u" || !st.length || !st[0]) {
|
|
241
|
+
var Rt = "";
|
|
242
|
+
vt = [];
|
|
243
|
+
for (wt in yt[pt])
|
|
244
|
+
this.terminals_[wt] && wt > de && vt.push("'" + this.terminals_[wt] + "'");
|
|
245
|
+
V.showPosition ? Rt = "Parse error on line " + (mt + 1) + `:
|
|
245
246
|
` + V.showPosition() + `
|
|
246
|
-
Expecting ` +
|
|
247
|
+
Expecting ` + vt.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Rt = "Parse error on line " + (mt + 1) + ": Unexpected " + (U == zt ? "end of input" : "'" + (this.terminals_[U] || U) + "'"), this.parseError(Rt, {
|
|
247
248
|
text: V.match,
|
|
248
249
|
token: this.terminals_[U] || U,
|
|
249
250
|
line: V.yylineno,
|
|
250
|
-
loc:
|
|
251
|
-
expected:
|
|
251
|
+
loc: St,
|
|
252
|
+
expected: vt
|
|
252
253
|
});
|
|
253
254
|
}
|
|
254
255
|
if (st[0] instanceof Array && st.length > 1)
|
|
255
256
|
throw new Error("Parse Error: multiple actions possible at state: " + pt + ", token: " + U);
|
|
256
257
|
switch (st[0]) {
|
|
257
258
|
case 1:
|
|
258
|
-
P.push(U), R.push(V.yytext), l.push(V.yylloc), P.push(st[1]), U = null,
|
|
259
|
+
P.push(U), R.push(V.yytext), l.push(V.yylloc), P.push(st[1]), U = null, qt = V.yyleng, p = V.yytext, mt = V.yylineno, St = V.yylloc;
|
|
259
260
|
break;
|
|
260
261
|
case 2:
|
|
261
262
|
if (lt = this.productions_[st[1]][1], ft.$ = R[R.length - lt], ft._$ = {
|
|
@@ -263,28 +264,28 @@ Expecting ` + It.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Dt =
|
|
|
263
264
|
last_line: l[l.length - 1].last_line,
|
|
264
265
|
first_column: l[l.length - (lt || 1)].first_column,
|
|
265
266
|
last_column: l[l.length - 1].last_column
|
|
266
|
-
},
|
|
267
|
+
}, ue && (ft._$.range = [
|
|
267
268
|
l[l.length - (lt || 1)].range[0],
|
|
268
269
|
l[l.length - 1].range[1]
|
|
269
|
-
]),
|
|
270
|
+
]), Mt = this.performAction.apply(ft, [
|
|
270
271
|
p,
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
qt,
|
|
273
|
+
mt,
|
|
273
274
|
dt.yy,
|
|
274
275
|
st[1],
|
|
275
276
|
R,
|
|
276
277
|
l
|
|
277
|
-
].concat(
|
|
278
|
-
return
|
|
279
|
-
lt && (P = P.slice(0, -1 * lt * 2), R = R.slice(0, -1 * lt), l = l.slice(0, -1 * lt)), P.push(this.productions_[st[1]][0]), R.push(ft.$), l.push(ft._$),
|
|
278
|
+
].concat(pe)), typeof Mt < "u")
|
|
279
|
+
return Mt;
|
|
280
|
+
lt && (P = P.slice(0, -1 * lt * 2), R = R.slice(0, -1 * lt), l = l.slice(0, -1 * lt)), P.push(this.productions_[st[1]][0]), R.push(ft.$), l.push(ft._$), Kt = yt[P[P.length - 2]][P[P.length - 1]], P.push(Kt);
|
|
280
281
|
break;
|
|
281
282
|
case 3:
|
|
282
|
-
return
|
|
283
|
+
return true;
|
|
283
284
|
}
|
|
284
285
|
}
|
|
285
|
-
return
|
|
286
|
+
return true;
|
|
286
287
|
}, "parse")
|
|
287
|
-
},
|
|
288
|
+
}, he = /* @__PURE__ */ function() {
|
|
288
289
|
var ht = {
|
|
289
290
|
EOF: 1,
|
|
290
291
|
parseError: /* @__PURE__ */ u(function(L, P) {
|
|
@@ -294,8 +295,8 @@ Expecting ` + It.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Dt =
|
|
|
294
295
|
throw new Error(L);
|
|
295
296
|
}, "parseError"),
|
|
296
297
|
// resets the lexer, sets new input
|
|
297
|
-
setInput: /* @__PURE__ */ u(function(
|
|
298
|
-
return this.yy = L || this.yy || {}, this._input =
|
|
298
|
+
setInput: /* @__PURE__ */ u(function(w, L) {
|
|
299
|
+
return this.yy = L || this.yy || {}, this._input = w, this._more = this._backtrack = this.done = false, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
299
300
|
first_line: 1,
|
|
300
301
|
first_column: 0,
|
|
301
302
|
last_line: 1,
|
|
@@ -304,15 +305,15 @@ Expecting ` + It.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Dt =
|
|
|
304
305
|
}, "setInput"),
|
|
305
306
|
// consumes and returns one char from the input
|
|
306
307
|
input: /* @__PURE__ */ u(function() {
|
|
307
|
-
var
|
|
308
|
-
this.yytext +=
|
|
309
|
-
var L =
|
|
310
|
-
return L ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1),
|
|
308
|
+
var w = this._input[0];
|
|
309
|
+
this.yytext += w, this.yyleng++, this.offset++, this.match += w, this.matched += w;
|
|
310
|
+
var L = w.match(/(?:\r\n?|\n).*/g);
|
|
311
|
+
return L ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), w;
|
|
311
312
|
}, "input"),
|
|
312
313
|
// unshifts one char (or a string) into the input
|
|
313
|
-
unput: /* @__PURE__ */ u(function(
|
|
314
|
-
var L =
|
|
315
|
-
this._input =
|
|
314
|
+
unput: /* @__PURE__ */ u(function(w) {
|
|
315
|
+
var L = w.length, P = w.split(/(?:\r\n?|\n)/g);
|
|
316
|
+
this._input = w + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - L), this.offset -= L;
|
|
316
317
|
var b = this.match.split(/(?:\r\n?|\n)/g);
|
|
317
318
|
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), P.length - 1 && (this.yylineno -= P.length - 1);
|
|
318
319
|
var R = this.yylloc.range;
|
|
@@ -325,12 +326,12 @@ Expecting ` + It.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Dt =
|
|
|
325
326
|
}, "unput"),
|
|
326
327
|
// When called from action, caches matched text and appends it on next action
|
|
327
328
|
more: /* @__PURE__ */ u(function() {
|
|
328
|
-
return this._more =
|
|
329
|
+
return this._more = true, this;
|
|
329
330
|
}, "more"),
|
|
330
331
|
// 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
332
|
reject: /* @__PURE__ */ u(function() {
|
|
332
333
|
if (this.options.backtrack_lexer)
|
|
333
|
-
this._backtrack =
|
|
334
|
+
this._backtrack = true;
|
|
334
335
|
else
|
|
335
336
|
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
336
337
|
` + this.showPosition(), {
|
|
@@ -341,27 +342,27 @@ Expecting ` + It.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Dt =
|
|
|
341
342
|
return this;
|
|
342
343
|
}, "reject"),
|
|
343
344
|
// retain first n characters of the match
|
|
344
|
-
less: /* @__PURE__ */ u(function(
|
|
345
|
-
this.unput(this.match.slice(
|
|
345
|
+
less: /* @__PURE__ */ u(function(w) {
|
|
346
|
+
this.unput(this.match.slice(w));
|
|
346
347
|
}, "less"),
|
|
347
348
|
// displays already matched input, i.e. for error messages
|
|
348
349
|
pastInput: /* @__PURE__ */ u(function() {
|
|
349
|
-
var
|
|
350
|
-
return (
|
|
350
|
+
var w = this.matched.substr(0, this.matched.length - this.match.length);
|
|
351
|
+
return (w.length > 20 ? "..." : "") + w.substr(-20).replace(/\n/g, "");
|
|
351
352
|
}, "pastInput"),
|
|
352
353
|
// displays upcoming input, i.e. for error messages
|
|
353
354
|
upcomingInput: /* @__PURE__ */ u(function() {
|
|
354
|
-
var
|
|
355
|
-
return
|
|
355
|
+
var w = this.match;
|
|
356
|
+
return w.length < 20 && (w += this._input.substr(0, 20 - w.length)), (w.substr(0, 20) + (w.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
356
357
|
}, "upcomingInput"),
|
|
357
358
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
358
359
|
showPosition: /* @__PURE__ */ u(function() {
|
|
359
|
-
var
|
|
360
|
-
return
|
|
360
|
+
var w = this.pastInput(), L = new Array(w.length + 1).join("-");
|
|
361
|
+
return w + this.upcomingInput() + `
|
|
361
362
|
` + L + "^";
|
|
362
363
|
}, "showPosition"),
|
|
363
364
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
364
|
-
test_match: /* @__PURE__ */ u(function(
|
|
365
|
+
test_match: /* @__PURE__ */ u(function(w, L) {
|
|
365
366
|
var P, b, R;
|
|
366
367
|
if (this.options.backtrack_lexer && (R = {
|
|
367
368
|
yylineno: this.yylineno,
|
|
@@ -382,41 +383,41 @@ Expecting ` + It.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Dt =
|
|
|
382
383
|
yy: this.yy,
|
|
383
384
|
conditionStack: this.conditionStack.slice(0),
|
|
384
385
|
done: this.done
|
|
385
|
-
}, this.options.ranges && (R.yylloc.range = this.yylloc.range.slice(0))), b =
|
|
386
|
+
}, this.options.ranges && (R.yylloc.range = this.yylloc.range.slice(0))), b = w[0].match(/(?:\r\n?|\n).*/g), b && (this.yylineno += b.length), this.yylloc = {
|
|
386
387
|
first_line: this.yylloc.last_line,
|
|
387
388
|
last_line: this.yylineno + 1,
|
|
388
389
|
first_column: this.yylloc.last_column,
|
|
389
|
-
last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column +
|
|
390
|
-
}, this.yytext +=
|
|
390
|
+
last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + w[0].length
|
|
391
|
+
}, this.yytext += w[0], this.match += w[0], this.matches = w, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = false, this._backtrack = false, this._input = this._input.slice(w[0].length), this.matched += w[0], P = this.performAction.call(this, this.yy, this, L, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = false), P)
|
|
391
392
|
return P;
|
|
392
393
|
if (this._backtrack) {
|
|
393
394
|
for (var l in R)
|
|
394
395
|
this[l] = R[l];
|
|
395
|
-
return
|
|
396
|
+
return false;
|
|
396
397
|
}
|
|
397
|
-
return
|
|
398
|
+
return false;
|
|
398
399
|
}, "test_match"),
|
|
399
400
|
// return next match in input
|
|
400
401
|
next: /* @__PURE__ */ u(function() {
|
|
401
402
|
if (this.done)
|
|
402
403
|
return this.EOF;
|
|
403
|
-
this._input || (this.done =
|
|
404
|
-
var
|
|
404
|
+
this._input || (this.done = true);
|
|
405
|
+
var w, L, P, b;
|
|
405
406
|
this._more || (this.yytext = "", this.match = "");
|
|
406
407
|
for (var R = this._currentRules(), l = 0; l < R.length; l++)
|
|
407
408
|
if (P = this._input.match(this.rules[R[l]]), P && (!L || P[0].length > L[0].length)) {
|
|
408
409
|
if (L = P, b = l, this.options.backtrack_lexer) {
|
|
409
|
-
if (
|
|
410
|
-
return
|
|
410
|
+
if (w = this.test_match(P, R[l]), w !== false)
|
|
411
|
+
return w;
|
|
411
412
|
if (this._backtrack) {
|
|
412
|
-
L =
|
|
413
|
+
L = false;
|
|
413
414
|
continue;
|
|
414
415
|
} else
|
|
415
|
-
return
|
|
416
|
+
return false;
|
|
416
417
|
} else if (!this.options.flex)
|
|
417
418
|
break;
|
|
418
419
|
}
|
|
419
|
-
return L ? (
|
|
420
|
+
return L ? (w = this.test_match(L, R[b]), w !== false ? w : false) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
420
421
|
` + this.showPosition(), {
|
|
421
422
|
text: "",
|
|
422
423
|
token: null,
|
|
@@ -453,7 +454,7 @@ Expecting ` + It.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Dt =
|
|
|
453
454
|
stateStackSize: /* @__PURE__ */ u(function() {
|
|
454
455
|
return this.conditionStack.length;
|
|
455
456
|
}, "stateStackSize"),
|
|
456
|
-
options: { "case-insensitive":
|
|
457
|
+
options: { "case-insensitive": true },
|
|
457
458
|
performAction: /* @__PURE__ */ u(function(L, P, b, R) {
|
|
458
459
|
switch (b) {
|
|
459
460
|
case 0:
|
|
@@ -597,18 +598,18 @@ Expecting ` + It.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : Dt =
|
|
|
597
598
|
}
|
|
598
599
|
}, "anonymous"),
|
|
599
600
|
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],
|
|
600
|
-
conditions: { acc_descr_multiline: { rules: [45, 46], inclusive:
|
|
601
|
+
conditions: { acc_descr_multiline: { rules: [45, 46], inclusive: false }, acc_descr: { rules: [43], inclusive: false }, acc_title: { rules: [41], inclusive: false }, ID: { rules: [2, 3, 12], inclusive: false }, ALIAS: { rules: [2, 3, 13, 14], inclusive: false }, LINE: { rules: [2, 3, 26], inclusive: false }, 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: true } }
|
|
601
602
|
};
|
|
602
603
|
return ht;
|
|
603
604
|
}();
|
|
604
|
-
|
|
605
|
-
function
|
|
605
|
+
kt.lexer = he;
|
|
606
|
+
function bt() {
|
|
606
607
|
this.yy = {};
|
|
607
608
|
}
|
|
608
|
-
return u(
|
|
609
|
+
return u(bt, "Parser"), bt.prototype = kt, kt.Parser = bt, new bt();
|
|
609
610
|
}();
|
|
610
|
-
|
|
611
|
-
var
|
|
611
|
+
Ct.parser = Ct;
|
|
612
|
+
var Ne = Ct, Se = {
|
|
612
613
|
SOLID: 0,
|
|
613
614
|
DOTTED: 1,
|
|
614
615
|
NOTE: 2,
|
|
@@ -641,16 +642,16 @@ var Se = Ot, Me = {
|
|
|
641
642
|
PAR_OVER_START: 32,
|
|
642
643
|
BIDIRECTIONAL_SOLID: 33,
|
|
643
644
|
BIDIRECTIONAL_DOTTED: 34
|
|
644
|
-
},
|
|
645
|
+
}, Me = {
|
|
645
646
|
FILLED: 0,
|
|
646
647
|
OPEN: 1
|
|
647
|
-
},
|
|
648
|
+
}, Re = {
|
|
648
649
|
LEFTOF: 0,
|
|
649
650
|
RIGHTOF: 1,
|
|
650
651
|
OVER: 2
|
|
651
|
-
},
|
|
652
|
+
}, De = (_a = class {
|
|
652
653
|
constructor() {
|
|
653
|
-
this.state = new
|
|
654
|
+
this.state = new Ee(() => ({
|
|
654
655
|
prevActor: void 0,
|
|
655
656
|
actors: /* @__PURE__ */ new Map(),
|
|
656
657
|
createdActors: /* @__PURE__ */ new Map(),
|
|
@@ -658,12 +659,12 @@ var Se = Ot, Me = {
|
|
|
658
659
|
boxes: [],
|
|
659
660
|
messages: [],
|
|
660
661
|
notes: [],
|
|
661
|
-
sequenceNumbersEnabled:
|
|
662
|
+
sequenceNumbersEnabled: false,
|
|
662
663
|
wrapEnabled: void 0,
|
|
663
664
|
currentBox: void 0,
|
|
664
665
|
lastCreated: void 0,
|
|
665
666
|
lastDestroyed: void 0
|
|
666
|
-
})), this.setAccTitle =
|
|
667
|
+
})), this.setAccTitle = Ut, this.setAccDescription = ve, this.setDiagramTitle = Ie, this.getAccTitle = Le, this.getAccDescription = _e, this.getDiagramTitle = Pe, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap($().wrap), this.LINETYPE = Se, this.ARROWTYPE = Me, this.PLACEMENT = Re;
|
|
667
668
|
}
|
|
668
669
|
addBox(t) {
|
|
669
670
|
this.state.records.boxes.push({
|
|
@@ -673,72 +674,72 @@ var Se = Ot, Me = {
|
|
|
673
674
|
actorKeys: []
|
|
674
675
|
}), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
|
|
675
676
|
}
|
|
676
|
-
addActor(t, c, s
|
|
677
|
-
let
|
|
678
|
-
const
|
|
679
|
-
if (
|
|
680
|
-
if (this.state.records.currentBox &&
|
|
677
|
+
addActor(t, e, c, s) {
|
|
678
|
+
let r = this.state.records.currentBox;
|
|
679
|
+
const i = this.state.records.actors.get(t);
|
|
680
|
+
if (i) {
|
|
681
|
+
if (this.state.records.currentBox && i.box && this.state.records.currentBox !== i.box)
|
|
681
682
|
throw new Error(
|
|
682
|
-
`A same participant should only be defined in one Box: ${
|
|
683
|
+
`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`
|
|
683
684
|
);
|
|
684
|
-
if (
|
|
685
|
+
if (r = i.box ? i.box : this.state.records.currentBox, i.box = r, i && e === i.name && c == null)
|
|
685
686
|
return;
|
|
686
687
|
}
|
|
687
|
-
if ((
|
|
688
|
-
box:
|
|
689
|
-
name:
|
|
690
|
-
description:
|
|
691
|
-
wrap:
|
|
688
|
+
if ((c == null ? void 0 : c.text) == null && (c = { text: e, type: s }), (s == null || c.text == null) && (c = { text: e, type: s }), this.state.records.actors.set(t, {
|
|
689
|
+
box: r,
|
|
690
|
+
name: e,
|
|
691
|
+
description: c.text,
|
|
692
|
+
wrap: c.wrap ?? this.autoWrap(),
|
|
692
693
|
prevActor: this.state.records.prevActor,
|
|
693
694
|
links: {},
|
|
694
695
|
properties: {},
|
|
695
696
|
actorCnt: null,
|
|
696
697
|
rectData: null,
|
|
697
|
-
type:
|
|
698
|
+
type: s ?? "participant"
|
|
698
699
|
}), this.state.records.prevActor) {
|
|
699
|
-
const
|
|
700
|
-
|
|
700
|
+
const o = this.state.records.actors.get(this.state.records.prevActor);
|
|
701
|
+
o && (o.nextActor = t);
|
|
701
702
|
}
|
|
702
703
|
this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(t), this.state.records.prevActor = t;
|
|
703
704
|
}
|
|
704
705
|
activationCount(t) {
|
|
705
|
-
let
|
|
706
|
+
let e, c = 0;
|
|
706
707
|
if (!t)
|
|
707
708
|
return 0;
|
|
708
|
-
for (
|
|
709
|
-
this.state.records.messages[
|
|
710
|
-
return
|
|
709
|
+
for (e = 0; e < this.state.records.messages.length; e++)
|
|
710
|
+
this.state.records.messages[e].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[e].from === t && c++, this.state.records.messages[e].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[e].from === t && c--;
|
|
711
|
+
return c;
|
|
711
712
|
}
|
|
712
|
-
addMessage(t, c, s
|
|
713
|
+
addMessage(t, e, c, s) {
|
|
713
714
|
this.state.records.messages.push({
|
|
714
715
|
id: this.state.records.messages.length.toString(),
|
|
715
716
|
from: t,
|
|
716
|
-
to:
|
|
717
|
-
message:
|
|
718
|
-
wrap:
|
|
719
|
-
answer:
|
|
717
|
+
to: e,
|
|
718
|
+
message: c.text,
|
|
719
|
+
wrap: c.wrap ?? this.autoWrap(),
|
|
720
|
+
answer: s
|
|
720
721
|
});
|
|
721
722
|
}
|
|
722
|
-
addSignal(t, c, s,
|
|
723
|
-
if (
|
|
724
|
-
const
|
|
725
|
-
throw
|
|
723
|
+
addSignal(t, e, c, s, r = false) {
|
|
724
|
+
if (s === this.LINETYPE.ACTIVE_END && this.activationCount(t ?? "") < 1) {
|
|
725
|
+
const o = new Error("Trying to inactivate an inactive participant (" + t + ")");
|
|
726
|
+
throw o.hash = {
|
|
726
727
|
text: "->>-",
|
|
727
728
|
token: "->>-",
|
|
728
729
|
line: "1",
|
|
729
730
|
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
|
730
731
|
expected: ["'ACTIVE_PARTICIPANT'"]
|
|
731
|
-
},
|
|
732
|
+
}, o;
|
|
732
733
|
}
|
|
733
734
|
return this.state.records.messages.push({
|
|
734
735
|
id: this.state.records.messages.length.toString(),
|
|
735
736
|
from: t,
|
|
736
|
-
to:
|
|
737
|
-
message: (
|
|
738
|
-
wrap: (
|
|
739
|
-
type:
|
|
740
|
-
activate:
|
|
741
|
-
}),
|
|
737
|
+
to: e,
|
|
738
|
+
message: (c == null ? void 0 : c.text) ?? "",
|
|
739
|
+
wrap: (c == null ? void 0 : c.wrap) ?? this.autoWrap(),
|
|
740
|
+
type: s,
|
|
741
|
+
activate: r
|
|
742
|
+
}), true;
|
|
742
743
|
}
|
|
743
744
|
hasAtLeastOneBox() {
|
|
744
745
|
return this.state.records.boxes.length > 0;
|
|
@@ -768,10 +769,10 @@ var Se = Ot, Me = {
|
|
|
768
769
|
return [...this.state.records.actors.keys()];
|
|
769
770
|
}
|
|
770
771
|
enableSequenceNumbers() {
|
|
771
|
-
this.state.records.sequenceNumbersEnabled =
|
|
772
|
+
this.state.records.sequenceNumbersEnabled = true;
|
|
772
773
|
}
|
|
773
774
|
disableSequenceNumbers() {
|
|
774
|
-
this.state.records.sequenceNumbersEnabled =
|
|
775
|
+
this.state.records.sequenceNumbersEnabled = false;
|
|
775
776
|
}
|
|
776
777
|
showSequenceNumbers() {
|
|
777
778
|
return this.state.records.sequenceNumbersEnabled;
|
|
@@ -783,127 +784,127 @@ var Se = Ot, Me = {
|
|
|
783
784
|
if (t === void 0)
|
|
784
785
|
return {};
|
|
785
786
|
t = t.trim();
|
|
786
|
-
const
|
|
787
|
-
return { cleanedText: (
|
|
787
|
+
const e = /^:?wrap:/.exec(t) !== null ? true : /^:?nowrap:/.exec(t) !== null ? false : void 0;
|
|
788
|
+
return { cleanedText: (e === void 0 ? t : t.replace(/^:?(?:no)?wrap:/, "")).trim(), wrap: e };
|
|
788
789
|
}
|
|
789
790
|
autoWrap() {
|
|
790
|
-
var
|
|
791
|
-
return this.state.records.wrapEnabled !== void 0 ? this.state.records.wrapEnabled : ((
|
|
791
|
+
var _a2;
|
|
792
|
+
return this.state.records.wrapEnabled !== void 0 ? this.state.records.wrapEnabled : ((_a2 = $().sequence) == null ? void 0 : _a2.wrap) ?? false;
|
|
792
793
|
}
|
|
793
794
|
clear() {
|
|
794
|
-
this.state.reset(),
|
|
795
|
+
this.state.reset(), Ae();
|
|
795
796
|
}
|
|
796
797
|
parseMessage(t) {
|
|
797
|
-
const
|
|
798
|
-
text:
|
|
799
|
-
wrap:
|
|
798
|
+
const e = t.trim(), { wrap: c, cleanedText: s } = this.extractWrap(e), r = {
|
|
799
|
+
text: s,
|
|
800
|
+
wrap: c
|
|
800
801
|
};
|
|
801
|
-
return G.debug(`parseMessage: ${JSON.stringify(
|
|
802
|
+
return G.debug(`parseMessage: ${JSON.stringify(r)}`), r;
|
|
802
803
|
}
|
|
803
804
|
// We expect the box statement to be color first then description
|
|
804
805
|
// 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
|
|
805
806
|
// We extract first segment as color, the rest of the line is considered as text
|
|
806
807
|
parseBoxData(t) {
|
|
807
|
-
const
|
|
808
|
-
let
|
|
809
|
-
if (window
|
|
810
|
-
window.CSS.supports("color",
|
|
808
|
+
const e = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);
|
|
809
|
+
let c = (e == null ? void 0 : e[1]) ? e[1].trim() : "transparent", s = (e == null ? void 0 : e[2]) ? e[2].trim() : void 0;
|
|
810
|
+
if (window == null ? void 0 : window.CSS)
|
|
811
|
+
window.CSS.supports("color", c) || (c = "transparent", s = t.trim());
|
|
811
812
|
else {
|
|
812
|
-
const
|
|
813
|
-
|
|
813
|
+
const o = new Option().style;
|
|
814
|
+
o.color = c, o.color !== c && (c = "transparent", s = t.trim());
|
|
814
815
|
}
|
|
815
|
-
const { wrap:
|
|
816
|
+
const { wrap: r, cleanedText: i } = this.extractWrap(s);
|
|
816
817
|
return {
|
|
817
|
-
text:
|
|
818
|
-
color:
|
|
819
|
-
wrap:
|
|
818
|
+
text: i ? Lt(i, $()) : void 0,
|
|
819
|
+
color: c,
|
|
820
|
+
wrap: r
|
|
820
821
|
};
|
|
821
822
|
}
|
|
822
|
-
addNote(t,
|
|
823
|
-
const
|
|
823
|
+
addNote(t, e, c) {
|
|
824
|
+
const s = {
|
|
824
825
|
actor: t,
|
|
825
|
-
placement:
|
|
826
|
-
message:
|
|
827
|
-
wrap:
|
|
828
|
-
},
|
|
829
|
-
this.state.records.notes.push(
|
|
826
|
+
placement: e,
|
|
827
|
+
message: c.text,
|
|
828
|
+
wrap: c.wrap ?? this.autoWrap()
|
|
829
|
+
}, r = [].concat(t, t);
|
|
830
|
+
this.state.records.notes.push(s), this.state.records.messages.push({
|
|
830
831
|
id: this.state.records.messages.length.toString(),
|
|
831
|
-
from:
|
|
832
|
-
to:
|
|
833
|
-
message:
|
|
834
|
-
wrap:
|
|
832
|
+
from: r[0],
|
|
833
|
+
to: r[1],
|
|
834
|
+
message: c.text,
|
|
835
|
+
wrap: c.wrap ?? this.autoWrap(),
|
|
835
836
|
type: this.LINETYPE.NOTE,
|
|
836
|
-
placement:
|
|
837
|
+
placement: e
|
|
837
838
|
});
|
|
838
839
|
}
|
|
839
|
-
addLinks(t,
|
|
840
|
-
const
|
|
840
|
+
addLinks(t, e) {
|
|
841
|
+
const c = this.getActor(t);
|
|
841
842
|
try {
|
|
842
|
-
let
|
|
843
|
-
|
|
844
|
-
const
|
|
845
|
-
this.insertLinks(
|
|
846
|
-
} catch (
|
|
847
|
-
G.error("error while parsing actor link text",
|
|
843
|
+
let s = Lt(e.text, $());
|
|
844
|
+
s = s.replace(/=/g, "="), s = s.replace(/&/g, "&");
|
|
845
|
+
const r = JSON.parse(s);
|
|
846
|
+
this.insertLinks(c, r);
|
|
847
|
+
} catch (s) {
|
|
848
|
+
G.error("error while parsing actor link text", s);
|
|
848
849
|
}
|
|
849
850
|
}
|
|
850
|
-
addALink(t,
|
|
851
|
-
const
|
|
851
|
+
addALink(t, e) {
|
|
852
|
+
const c = this.getActor(t);
|
|
852
853
|
try {
|
|
853
|
-
const
|
|
854
|
-
let
|
|
855
|
-
const
|
|
856
|
-
|
|
857
|
-
const
|
|
858
|
-
|
|
859
|
-
} catch (
|
|
860
|
-
G.error("error while parsing actor link text",
|
|
854
|
+
const s = {};
|
|
855
|
+
let r = Lt(e.text, $());
|
|
856
|
+
const i = r.indexOf("@");
|
|
857
|
+
r = r.replace(/=/g, "="), r = r.replace(/&/g, "&");
|
|
858
|
+
const o = r.slice(0, i - 1).trim(), h = r.slice(i + 1).trim();
|
|
859
|
+
s[o] = h, this.insertLinks(c, s);
|
|
860
|
+
} catch (s) {
|
|
861
|
+
G.error("error while parsing actor link text", s);
|
|
861
862
|
}
|
|
862
863
|
}
|
|
863
|
-
insertLinks(t,
|
|
864
|
+
insertLinks(t, e) {
|
|
864
865
|
if (t.links == null)
|
|
865
|
-
t.links =
|
|
866
|
+
t.links = e;
|
|
866
867
|
else
|
|
867
|
-
for (const
|
|
868
|
-
t.links[
|
|
868
|
+
for (const c in e)
|
|
869
|
+
t.links[c] = e[c];
|
|
869
870
|
}
|
|
870
|
-
addProperties(t,
|
|
871
|
-
const
|
|
871
|
+
addProperties(t, e) {
|
|
872
|
+
const c = this.getActor(t);
|
|
872
873
|
try {
|
|
873
|
-
const
|
|
874
|
-
this.insertProperties(
|
|
875
|
-
} catch (
|
|
876
|
-
G.error("error while parsing actor properties text",
|
|
874
|
+
const s = Lt(e.text, $()), r = JSON.parse(s);
|
|
875
|
+
this.insertProperties(c, r);
|
|
876
|
+
} catch (s) {
|
|
877
|
+
G.error("error while parsing actor properties text", s);
|
|
877
878
|
}
|
|
878
879
|
}
|
|
879
|
-
insertProperties(t,
|
|
880
|
+
insertProperties(t, e) {
|
|
880
881
|
if (t.properties == null)
|
|
881
|
-
t.properties =
|
|
882
|
+
t.properties = e;
|
|
882
883
|
else
|
|
883
|
-
for (const
|
|
884
|
-
t.properties[
|
|
884
|
+
for (const c in e)
|
|
885
|
+
t.properties[c] = e[c];
|
|
885
886
|
}
|
|
886
887
|
boxEnd() {
|
|
887
888
|
this.state.records.currentBox = void 0;
|
|
888
889
|
}
|
|
889
|
-
addDetails(t,
|
|
890
|
-
const
|
|
890
|
+
addDetails(t, e) {
|
|
891
|
+
const c = this.getActor(t), s = document.getElementById(e.text);
|
|
891
892
|
try {
|
|
892
|
-
const
|
|
893
|
-
|
|
894
|
-
} catch (
|
|
895
|
-
G.error("error while parsing actor details text",
|
|
893
|
+
const r = s.innerHTML, i = JSON.parse(r);
|
|
894
|
+
i.properties && this.insertProperties(c, i.properties), i.links && this.insertLinks(c, i.links);
|
|
895
|
+
} catch (r) {
|
|
896
|
+
G.error("error while parsing actor details text", r);
|
|
896
897
|
}
|
|
897
898
|
}
|
|
898
|
-
getActorProperty(t,
|
|
899
|
+
getActorProperty(t, e) {
|
|
899
900
|
if ((t == null ? void 0 : t.properties) !== void 0)
|
|
900
|
-
return t.properties[
|
|
901
|
+
return t.properties[e];
|
|
901
902
|
}
|
|
902
903
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents
|
|
903
904
|
apply(t) {
|
|
904
905
|
if (Array.isArray(t))
|
|
905
|
-
t.forEach((
|
|
906
|
-
this.apply(
|
|
906
|
+
t.forEach((e) => {
|
|
907
|
+
this.apply(e);
|
|
907
908
|
});
|
|
908
909
|
else
|
|
909
910
|
switch (t.type) {
|
|
@@ -917,7 +918,7 @@ var Se = Ot, Me = {
|
|
|
917
918
|
step: t.sequenceIndexStep,
|
|
918
919
|
visible: t.sequenceVisible
|
|
919
920
|
},
|
|
920
|
-
wrap:
|
|
921
|
+
wrap: false,
|
|
921
922
|
type: t.signalType
|
|
922
923
|
});
|
|
923
924
|
break;
|
|
@@ -1005,7 +1006,7 @@ var Se = Ot, Me = {
|
|
|
1005
1006
|
this.addSignal(void 0, void 0, void 0, t.signalType);
|
|
1006
1007
|
break;
|
|
1007
1008
|
case "setAccTitle":
|
|
1008
|
-
|
|
1009
|
+
Ut(t.text);
|
|
1009
1010
|
break;
|
|
1010
1011
|
case "parStart":
|
|
1011
1012
|
this.addSignal(void 0, void 0, t.parText, t.signalType);
|
|
@@ -1036,101 +1037,101 @@ var Se = Ot, Me = {
|
|
|
1036
1037
|
getConfig() {
|
|
1037
1038
|
return $().sequence;
|
|
1038
1039
|
}
|
|
1039
|
-
}, u(
|
|
1040
|
-
stroke: ${
|
|
1041
|
-
fill: ${
|
|
1040
|
+
}, u(_a, "SequenceDB"), _a), Ce = /* @__PURE__ */ u((t) => `.actor {
|
|
1041
|
+
stroke: ${t.actorBorder};
|
|
1042
|
+
fill: ${t.actorBkg};
|
|
1042
1043
|
}
|
|
1043
1044
|
|
|
1044
1045
|
text.actor > tspan {
|
|
1045
|
-
fill: ${
|
|
1046
|
+
fill: ${t.actorTextColor};
|
|
1046
1047
|
stroke: none;
|
|
1047
1048
|
}
|
|
1048
1049
|
|
|
1049
1050
|
.actor-line {
|
|
1050
|
-
stroke: ${
|
|
1051
|
+
stroke: ${t.actorLineColor};
|
|
1051
1052
|
}
|
|
1052
1053
|
|
|
1053
1054
|
.messageLine0 {
|
|
1054
1055
|
stroke-width: 1.5;
|
|
1055
1056
|
stroke-dasharray: none;
|
|
1056
|
-
stroke: ${
|
|
1057
|
+
stroke: ${t.signalColor};
|
|
1057
1058
|
}
|
|
1058
1059
|
|
|
1059
1060
|
.messageLine1 {
|
|
1060
1061
|
stroke-width: 1.5;
|
|
1061
1062
|
stroke-dasharray: 2, 2;
|
|
1062
|
-
stroke: ${
|
|
1063
|
+
stroke: ${t.signalColor};
|
|
1063
1064
|
}
|
|
1064
1065
|
|
|
1065
1066
|
#arrowhead path {
|
|
1066
|
-
fill: ${
|
|
1067
|
-
stroke: ${
|
|
1067
|
+
fill: ${t.signalColor};
|
|
1068
|
+
stroke: ${t.signalColor};
|
|
1068
1069
|
}
|
|
1069
1070
|
|
|
1070
1071
|
.sequenceNumber {
|
|
1071
|
-
fill: ${
|
|
1072
|
+
fill: ${t.sequenceNumberColor};
|
|
1072
1073
|
}
|
|
1073
1074
|
|
|
1074
1075
|
#sequencenumber {
|
|
1075
|
-
fill: ${
|
|
1076
|
+
fill: ${t.signalColor};
|
|
1076
1077
|
}
|
|
1077
1078
|
|
|
1078
1079
|
#crosshead path {
|
|
1079
|
-
fill: ${
|
|
1080
|
-
stroke: ${
|
|
1080
|
+
fill: ${t.signalColor};
|
|
1081
|
+
stroke: ${t.signalColor};
|
|
1081
1082
|
}
|
|
1082
1083
|
|
|
1083
1084
|
.messageText {
|
|
1084
|
-
fill: ${
|
|
1085
|
+
fill: ${t.signalTextColor};
|
|
1085
1086
|
stroke: none;
|
|
1086
1087
|
}
|
|
1087
1088
|
|
|
1088
1089
|
.labelBox {
|
|
1089
|
-
stroke: ${
|
|
1090
|
-
fill: ${
|
|
1090
|
+
stroke: ${t.labelBoxBorderColor};
|
|
1091
|
+
fill: ${t.labelBoxBkgColor};
|
|
1091
1092
|
}
|
|
1092
1093
|
|
|
1093
1094
|
.labelText, .labelText > tspan {
|
|
1094
|
-
fill: ${
|
|
1095
|
+
fill: ${t.labelTextColor};
|
|
1095
1096
|
stroke: none;
|
|
1096
1097
|
}
|
|
1097
1098
|
|
|
1098
1099
|
.loopText, .loopText > tspan {
|
|
1099
|
-
fill: ${
|
|
1100
|
+
fill: ${t.loopTextColor};
|
|
1100
1101
|
stroke: none;
|
|
1101
1102
|
}
|
|
1102
1103
|
|
|
1103
1104
|
.loopLine {
|
|
1104
1105
|
stroke-width: 2px;
|
|
1105
1106
|
stroke-dasharray: 2, 2;
|
|
1106
|
-
stroke: ${
|
|
1107
|
-
fill: ${
|
|
1107
|
+
stroke: ${t.labelBoxBorderColor};
|
|
1108
|
+
fill: ${t.labelBoxBorderColor};
|
|
1108
1109
|
}
|
|
1109
1110
|
|
|
1110
1111
|
.note {
|
|
1111
1112
|
//stroke: #decc93;
|
|
1112
|
-
stroke: ${
|
|
1113
|
-
fill: ${
|
|
1113
|
+
stroke: ${t.noteBorderColor};
|
|
1114
|
+
fill: ${t.noteBkgColor};
|
|
1114
1115
|
}
|
|
1115
1116
|
|
|
1116
1117
|
.noteText, .noteText > tspan {
|
|
1117
|
-
fill: ${
|
|
1118
|
+
fill: ${t.noteTextColor};
|
|
1118
1119
|
stroke: none;
|
|
1119
1120
|
}
|
|
1120
1121
|
|
|
1121
1122
|
.activation0 {
|
|
1122
|
-
fill: ${
|
|
1123
|
-
stroke: ${
|
|
1123
|
+
fill: ${t.activationBkgColor};
|
|
1124
|
+
stroke: ${t.activationBorderColor};
|
|
1124
1125
|
}
|
|
1125
1126
|
|
|
1126
1127
|
.activation1 {
|
|
1127
|
-
fill: ${
|
|
1128
|
-
stroke: ${
|
|
1128
|
+
fill: ${t.activationBkgColor};
|
|
1129
|
+
stroke: ${t.activationBorderColor};
|
|
1129
1130
|
}
|
|
1130
1131
|
|
|
1131
1132
|
.activation2 {
|
|
1132
|
-
fill: ${
|
|
1133
|
-
stroke: ${
|
|
1133
|
+
fill: ${t.activationBkgColor};
|
|
1134
|
+
stroke: ${t.activationBorderColor};
|
|
1134
1135
|
}
|
|
1135
1136
|
|
|
1136
1137
|
.actorPopupMenu {
|
|
@@ -1139,38 +1140,38 @@ var Se = Ot, Me = {
|
|
|
1139
1140
|
|
|
1140
1141
|
.actorPopupMenuPanel {
|
|
1141
1142
|
position: absolute;
|
|
1142
|
-
fill: ${
|
|
1143
|
+
fill: ${t.actorBkg};
|
|
1143
1144
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
1144
1145
|
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
1145
1146
|
}
|
|
1146
1147
|
.actor-man line {
|
|
1147
|
-
stroke: ${
|
|
1148
|
-
fill: ${
|
|
1148
|
+
stroke: ${t.actorBorder};
|
|
1149
|
+
fill: ${t.actorBkg};
|
|
1149
1150
|
}
|
|
1150
1151
|
.actor-man circle, line {
|
|
1151
|
-
stroke: ${
|
|
1152
|
-
fill: ${
|
|
1152
|
+
stroke: ${t.actorBorder};
|
|
1153
|
+
fill: ${t.actorBkg};
|
|
1153
1154
|
stroke-width: 2px;
|
|
1154
1155
|
}
|
|
1155
|
-
`, "getStyles"),
|
|
1156
|
-
return
|
|
1157
|
-
}, "drawRect"),
|
|
1158
|
-
if (
|
|
1156
|
+
`, "getStyles"), Oe = Ce, ut = 18 * 2, jt = "actor-top", $t = "actor-bottom", Be = "actor-box", Gt = "actor-man", Yt = /* @__PURE__ */ u(function(t, e) {
|
|
1157
|
+
return xe(t, e);
|
|
1158
|
+
}, "drawRect"), Ve = /* @__PURE__ */ u(function(t, e, c, s, r) {
|
|
1159
|
+
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
|
|
1159
1160
|
return { height: 0, width: 0 };
|
|
1160
|
-
const i =
|
|
1161
|
+
const i = e.links, o = e.actorCnt, h = e.rectData;
|
|
1161
1162
|
var d = "none";
|
|
1162
|
-
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1163
|
+
r && (d = "block !important");
|
|
1164
|
+
const a = t.append("g");
|
|
1165
|
+
a.attr("id", "actor" + o + "_popup"), a.attr("class", "actorPopupMenu"), a.attr("display", d);
|
|
1165
1166
|
var f = "";
|
|
1166
1167
|
h.class !== void 0 && (f = " " + h.class);
|
|
1167
1168
|
let E = h.width > c ? h.width : c;
|
|
1168
|
-
const g =
|
|
1169
|
+
const g = a.append("rect");
|
|
1169
1170
|
if (g.attr("class", "actorPopupMenuPanel" + f), g.attr("x", h.x), g.attr("y", h.height), g.attr("fill", h.fill), g.attr("stroke", h.stroke), g.attr("width", E), g.attr("height", h.height), g.attr("rx", h.rx), g.attr("ry", h.ry), i != null) {
|
|
1170
1171
|
var T = 20;
|
|
1171
1172
|
for (let A in i) {
|
|
1172
|
-
var m =
|
|
1173
|
-
m.attr("xlink:href",
|
|
1173
|
+
var m = a.append("a"), I = Jt.sanitizeUrl(i[A]);
|
|
1174
|
+
m.attr("xlink:href", I), m.attr("target", "_blank"), es(s)(
|
|
1174
1175
|
A,
|
|
1175
1176
|
m,
|
|
1176
1177
|
h.x + 10,
|
|
@@ -1183,218 +1184,218 @@ var Se = Ot, Me = {
|
|
|
1183
1184
|
}
|
|
1184
1185
|
}
|
|
1185
1186
|
return g.attr("height", T), { height: h.height + T, width: E };
|
|
1186
|
-
}, "drawPopup"),
|
|
1187
|
-
return "var pu = document.getElementById('" +
|
|
1188
|
-
}, "popupMenuToggle"),
|
|
1189
|
-
let s =
|
|
1190
|
-
const
|
|
1191
|
-
if (s.attr("height", Math.round(
|
|
1192
|
-
const h =
|
|
1193
|
-
h.setAttribute("height",
|
|
1187
|
+
}, "drawPopup"), Ye = /* @__PURE__ */ u(function(t) {
|
|
1188
|
+
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
|
|
1189
|
+
}, "popupMenuToggle"), _t = /* @__PURE__ */ u(async function(t, e, c = null) {
|
|
1190
|
+
let s = t.append("foreignObject");
|
|
1191
|
+
const r = await Qt(e.text, Dt()), o = s.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();
|
|
1192
|
+
if (s.attr("height", Math.round(o.height)).attr("width", Math.round(o.width)), e.class === "noteText") {
|
|
1193
|
+
const h = t.node().firstChild;
|
|
1194
|
+
h.setAttribute("height", o.height + 2 * e.textMargin);
|
|
1194
1195
|
const d = h.getBBox();
|
|
1195
|
-
s.attr("x", Math.round(d.x + d.width / 2 -
|
|
1196
|
+
s.attr("x", Math.round(d.x + d.width / 2 - o.width / 2)).attr("y", Math.round(d.y + d.height / 2 - o.height / 2));
|
|
1196
1197
|
} else if (c) {
|
|
1197
|
-
let { startx: h, stopx: d, starty:
|
|
1198
|
+
let { startx: h, stopx: d, starty: a } = c;
|
|
1198
1199
|
if (h > d) {
|
|
1199
1200
|
const f = h;
|
|
1200
1201
|
h = d, d = f;
|
|
1201
1202
|
}
|
|
1202
|
-
s.attr("x", Math.round(h + Math.abs(h - d) / 2 -
|
|
1203
|
+
s.attr("x", Math.round(h + Math.abs(h - d) / 2 - o.width / 2)), e.class === "loopText" ? s.attr("y", Math.round(a)) : s.attr("y", Math.round(a - o.height));
|
|
1203
1204
|
}
|
|
1204
1205
|
return [s];
|
|
1205
|
-
}, "drawKatex"),
|
|
1206
|
+
}, "drawKatex"), Tt = /* @__PURE__ */ u(function(t, e) {
|
|
1206
1207
|
let c = 0, s = 0;
|
|
1207
|
-
const
|
|
1208
|
-
let h = [], d = 0,
|
|
1209
|
-
if (
|
|
1210
|
-
switch (
|
|
1208
|
+
const r = e.text.split(v.lineBreakRegex), [i, o] = Zt(e.fontSize);
|
|
1209
|
+
let h = [], d = 0, a = /* @__PURE__ */ u(() => e.y, "yfunc");
|
|
1210
|
+
if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
|
|
1211
|
+
switch (e.valign) {
|
|
1211
1212
|
case "top":
|
|
1212
1213
|
case "start":
|
|
1213
|
-
|
|
1214
|
+
a = /* @__PURE__ */ u(() => Math.round(e.y + e.textMargin), "yfunc");
|
|
1214
1215
|
break;
|
|
1215
1216
|
case "middle":
|
|
1216
1217
|
case "center":
|
|
1217
|
-
|
|
1218
|
+
a = /* @__PURE__ */ u(() => Math.round(e.y + (c + s + e.textMargin) / 2), "yfunc");
|
|
1218
1219
|
break;
|
|
1219
1220
|
case "bottom":
|
|
1220
1221
|
case "end":
|
|
1221
|
-
|
|
1222
|
-
|
|
1222
|
+
a = /* @__PURE__ */ u(() => Math.round(
|
|
1223
|
+
e.y + (c + s + 2 * e.textMargin) - e.textMargin
|
|
1223
1224
|
), "yfunc");
|
|
1224
1225
|
break;
|
|
1225
1226
|
}
|
|
1226
|
-
if (
|
|
1227
|
-
switch (
|
|
1227
|
+
if (e.anchor !== void 0 && e.textMargin !== void 0 && e.width !== void 0)
|
|
1228
|
+
switch (e.anchor) {
|
|
1228
1229
|
case "left":
|
|
1229
1230
|
case "start":
|
|
1230
|
-
|
|
1231
|
+
e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1231
1232
|
break;
|
|
1232
1233
|
case "middle":
|
|
1233
1234
|
case "center":
|
|
1234
|
-
|
|
1235
|
+
e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1235
1236
|
break;
|
|
1236
1237
|
case "right":
|
|
1237
1238
|
case "end":
|
|
1238
|
-
|
|
1239
|
+
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
|
|
1239
1240
|
break;
|
|
1240
1241
|
}
|
|
1241
|
-
for (let [f, E] of
|
|
1242
|
-
|
|
1243
|
-
const g =
|
|
1244
|
-
g.attr("x",
|
|
1245
|
-
const T = E ||
|
|
1246
|
-
if (
|
|
1242
|
+
for (let [f, E] of r.entries()) {
|
|
1243
|
+
e.textMargin !== void 0 && e.textMargin === 0 && i !== void 0 && (d = f * i);
|
|
1244
|
+
const g = t.append("text");
|
|
1245
|
+
g.attr("x", e.x), g.attr("y", a()), e.anchor !== void 0 && g.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && g.style("font-family", e.fontFamily), o !== void 0 && g.style("font-size", o), e.fontWeight !== void 0 && g.style("font-weight", e.fontWeight), e.fill !== void 0 && g.attr("fill", e.fill), e.class !== void 0 && g.attr("class", e.class), e.dy !== void 0 ? g.attr("dy", e.dy) : d !== 0 && g.attr("dy", d);
|
|
1246
|
+
const T = E || ke;
|
|
1247
|
+
if (e.tspan) {
|
|
1247
1248
|
const m = g.append("tspan");
|
|
1248
|
-
m.attr("x",
|
|
1249
|
+
m.attr("x", e.x), e.fill !== void 0 && m.attr("fill", e.fill), m.text(T);
|
|
1249
1250
|
} else
|
|
1250
1251
|
g.text(T);
|
|
1251
|
-
|
|
1252
|
+
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (s += (g._groups || g)[0][0].getBBox().height, c = s), h.push(g);
|
|
1252
1253
|
}
|
|
1253
1254
|
return h;
|
|
1254
|
-
}, "drawText"),
|
|
1255
|
-
function c(
|
|
1256
|
-
return
|
|
1255
|
+
}, "drawText"), te = /* @__PURE__ */ u(function(t, e) {
|
|
1256
|
+
function c(r, i, o, h, d) {
|
|
1257
|
+
return r + "," + i + " " + (r + o) + "," + i + " " + (r + o) + "," + (i + h - d) + " " + (r + o - d * 1.2) + "," + (i + h) + " " + r + "," + (i + h);
|
|
1257
1258
|
}
|
|
1258
1259
|
u(c, "genPoints");
|
|
1259
|
-
const s =
|
|
1260
|
-
return s.attr("points", c(
|
|
1261
|
-
}, "drawLabel"), nt = -1,
|
|
1262
|
-
|
|
1263
|
-
const i =
|
|
1264
|
-
!s.mirrorActors && i.stopy ?
|
|
1260
|
+
const s = t.append("polygon");
|
|
1261
|
+
return s.attr("points", c(e.x, e.y, e.width, e.height, 7)), s.attr("class", "labelBox"), e.y = e.y + e.height / 2, Tt(t, e), s;
|
|
1262
|
+
}, "drawLabel"), nt = -1, ee = /* @__PURE__ */ u((t, e, c, s) => {
|
|
1263
|
+
t.select && c.forEach((r) => {
|
|
1264
|
+
const i = e.get(r), o = t.select("#actor" + i.actorCnt);
|
|
1265
|
+
!s.mirrorActors && i.stopy ? o.attr("y2", i.stopy + i.height / 2) : s.mirrorActors && o.attr("y2", i.stopy);
|
|
1265
1266
|
});
|
|
1266
|
-
}, "fixLifeLineHeights"),
|
|
1267
|
-
var
|
|
1268
|
-
const
|
|
1267
|
+
}, "fixLifeLineHeights"), We = /* @__PURE__ */ u(function(t, e, c, s) {
|
|
1268
|
+
var _a2, _b;
|
|
1269
|
+
const r = s ? e.stopy : e.starty, i = e.x + e.width / 2, o = r + e.height, h = t.append("g").lower();
|
|
1269
1270
|
var d = h;
|
|
1270
|
-
s || (nt++, Object.keys(
|
|
1271
|
-
const
|
|
1271
|
+
s || (nt++, Object.keys(e.links || {}).length && !c.forceMenus && d.attr("onclick", Ye(`actor${nt}_popup`)).attr("cursor", "pointer"), d.append("line").attr("id", "actor" + nt).attr("x1", i).attr("y1", o).attr("x2", i).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", e.name), d = h.append("g"), e.actorCnt = nt, e.links != null && d.attr("id", "root-" + nt));
|
|
1272
|
+
const a = Pt();
|
|
1272
1273
|
var f = "actor";
|
|
1273
|
-
(
|
|
1274
|
-
const E =
|
|
1275
|
-
if (
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1274
|
+
((_a2 = e.properties) == null ? void 0 : _a2.class) ? f = e.properties.class : a.fill = "#eaeaea", s ? f += ` ${$t}` : f += ` ${jt}`, a.x = e.x, a.y = r, a.width = e.width, a.height = e.height, a.class = f, a.rx = 3, a.ry = 3, a.name = e.name;
|
|
1275
|
+
const E = Yt(d, a);
|
|
1276
|
+
if (e.rectData = a, (_b = e.properties) == null ? void 0 : _b.icon) {
|
|
1277
|
+
const T = e.properties.icon.trim();
|
|
1278
|
+
T.charAt(0) === "@" ? Te(d, a.x + a.width - 20, a.y + 10, T.substr(1)) : ye(d, a.x + a.width - 20, a.y + 10, T);
|
|
1279
|
+
}
|
|
1280
|
+
Wt(c, ot(e.description))(
|
|
1281
|
+
e.description,
|
|
1281
1282
|
d,
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
{ class: `actor ${
|
|
1283
|
+
a.x,
|
|
1284
|
+
a.y,
|
|
1285
|
+
a.width,
|
|
1286
|
+
a.height,
|
|
1287
|
+
{ class: `actor ${Be}` },
|
|
1287
1288
|
c
|
|
1288
1289
|
);
|
|
1289
|
-
let g =
|
|
1290
|
+
let g = e.height;
|
|
1290
1291
|
if (E.node) {
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1292
|
+
const T = E.node().getBBox();
|
|
1293
|
+
e.height = T.height, g = T.height;
|
|
1293
1294
|
}
|
|
1294
1295
|
return g;
|
|
1295
|
-
}, "drawActorTypeParticipant"),
|
|
1296
|
-
const
|
|
1297
|
-
s || (nt++, h.append("line").attr("id", "actor" + nt).attr("x1", i).attr("y1",
|
|
1298
|
-
const d =
|
|
1299
|
-
let
|
|
1300
|
-
s ?
|
|
1301
|
-
const f =
|
|
1302
|
-
f.x =
|
|
1296
|
+
}, "drawActorTypeParticipant"), Fe = /* @__PURE__ */ u(function(t, e, c, s) {
|
|
1297
|
+
const r = s ? e.stopy : e.starty, i = e.x + e.width / 2, o = r + 80, h = t.append("g").lower();
|
|
1298
|
+
s || (nt++, h.append("line").attr("id", "actor" + nt).attr("x1", i).attr("y1", o).attr("x2", i).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", e.name), e.actorCnt = nt);
|
|
1299
|
+
const d = t.append("g");
|
|
1300
|
+
let a = Gt;
|
|
1301
|
+
s ? a += ` ${$t}` : a += ` ${jt}`, d.attr("class", a), d.attr("name", e.name);
|
|
1302
|
+
const f = Pt();
|
|
1303
|
+
f.x = e.x, f.y = r, f.fill = "#eaeaea", f.width = e.width, f.height = e.height, f.class = "actor", f.rx = 3, f.ry = 3, d.append("line").attr("id", "actor-man-torso" + nt).attr("x1", i).attr("y1", r + 25).attr("x2", i).attr("y2", r + 45), d.append("line").attr("id", "actor-man-arms" + nt).attr("x1", i - ut / 2).attr("y1", r + 33).attr("x2", i + ut / 2).attr("y2", r + 33), d.append("line").attr("x1", i - ut / 2).attr("y1", r + 60).attr("x2", i).attr("y2", r + 45), d.append("line").attr("x1", i).attr("y1", r + 45).attr("x2", i + ut / 2 - 2).attr("y2", r + 60);
|
|
1303
1304
|
const E = d.append("circle");
|
|
1304
|
-
E.attr("cx",
|
|
1305
|
+
E.attr("cx", e.x + e.width / 2), E.attr("cy", r + 10), E.attr("r", 15), E.attr("width", e.width), E.attr("height", e.height);
|
|
1305
1306
|
const g = d.node().getBBox();
|
|
1306
|
-
return
|
|
1307
|
-
|
|
1307
|
+
return e.height = g.height, Wt(c, ot(e.description))(
|
|
1308
|
+
e.description,
|
|
1308
1309
|
d,
|
|
1309
1310
|
f.x,
|
|
1310
1311
|
f.y + 35,
|
|
1311
1312
|
f.width,
|
|
1312
1313
|
f.height,
|
|
1313
|
-
{ class: `actor ${
|
|
1314
|
+
{ class: `actor ${Gt}` },
|
|
1314
1315
|
c
|
|
1315
|
-
),
|
|
1316
|
-
}, "drawActorTypeActor"),
|
|
1317
|
-
switch (
|
|
1316
|
+
), e.height;
|
|
1317
|
+
}, "drawActorTypeActor"), qe = /* @__PURE__ */ u(async function(t, e, c, s) {
|
|
1318
|
+
switch (e.type) {
|
|
1318
1319
|
case "actor":
|
|
1319
|
-
return await
|
|
1320
|
+
return await Fe(t, e, c, s);
|
|
1320
1321
|
case "participant":
|
|
1321
|
-
return await
|
|
1322
|
-
}
|
|
1323
|
-
}, "drawActor"),
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1322
|
+
return await We(t, e, c, s);
|
|
1323
|
+
}
|
|
1324
|
+
}, "drawActor"), ze = /* @__PURE__ */ u(function(t, e, c) {
|
|
1325
|
+
const r = t.append("g");
|
|
1326
|
+
se(r, e), e.name && Wt(c)(
|
|
1327
|
+
e.name,
|
|
1328
|
+
r,
|
|
1329
|
+
e.x,
|
|
1330
|
+
e.y + (e.textMaxHeight || 0) / 2,
|
|
1331
|
+
e.width,
|
|
1331
1332
|
0,
|
|
1332
1333
|
{ class: "text" },
|
|
1333
1334
|
c
|
|
1334
|
-
),
|
|
1335
|
-
}, "drawBox"),
|
|
1336
|
-
return
|
|
1337
|
-
}, "anchorElement"),
|
|
1338
|
-
const i =
|
|
1339
|
-
i.x =
|
|
1340
|
-
}, "drawActivation"),
|
|
1335
|
+
), r.lower();
|
|
1336
|
+
}, "drawBox"), He = /* @__PURE__ */ u(function(t) {
|
|
1337
|
+
return t.append("g");
|
|
1338
|
+
}, "anchorElement"), Ke = /* @__PURE__ */ u(function(t, e, c, s, r) {
|
|
1339
|
+
const i = Pt(), o = e.anchored;
|
|
1340
|
+
i.x = e.startx, i.y = e.starty, i.class = "activation" + r % 3, i.width = e.stopx - e.startx, i.height = c - e.starty, Yt(o, i);
|
|
1341
|
+
}, "drawActivation"), Ue = /* @__PURE__ */ u(async function(t, e, c, s) {
|
|
1341
1342
|
const {
|
|
1342
|
-
boxMargin:
|
|
1343
|
+
boxMargin: r,
|
|
1343
1344
|
boxTextMargin: i,
|
|
1344
|
-
labelBoxHeight:
|
|
1345
|
+
labelBoxHeight: o,
|
|
1345
1346
|
labelBoxWidth: h,
|
|
1346
1347
|
messageFontFamily: d,
|
|
1347
|
-
messageFontSize:
|
|
1348
|
+
messageFontSize: a,
|
|
1348
1349
|
messageFontWeight: f
|
|
1349
|
-
} = s, E =
|
|
1350
|
-
return E.append("line").attr("x1",
|
|
1350
|
+
} = s, E = t.append("g"), g = /* @__PURE__ */ u(function(I, A, O, S) {
|
|
1351
|
+
return E.append("line").attr("x1", I).attr("y1", A).attr("x2", O).attr("y2", S).attr("class", "loopLine");
|
|
1351
1352
|
}, "drawLoopLine");
|
|
1352
|
-
g(
|
|
1353
|
-
g(
|
|
1353
|
+
g(e.startx, e.starty, e.stopx, e.starty), g(e.stopx, e.starty, e.stopx, e.stopy), g(e.startx, e.stopy, e.stopx, e.stopy), g(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(I) {
|
|
1354
|
+
g(e.startx, I.y, e.stopx, I.y).style(
|
|
1354
1355
|
"stroke-dasharray",
|
|
1355
1356
|
"3, 3"
|
|
1356
1357
|
);
|
|
1357
1358
|
});
|
|
1358
|
-
let T =
|
|
1359
|
-
T.text = c, T.x =
|
|
1360
|
-
let m = ot(T.text) ? await
|
|
1361
|
-
if (
|
|
1362
|
-
for (const [
|
|
1359
|
+
let T = Vt();
|
|
1360
|
+
T.text = c, T.x = e.startx, T.y = e.starty, T.fontFamily = d, T.fontSize = a, T.fontWeight = f, T.anchor = "middle", T.valign = "middle", T.tspan = false, T.width = h || 50, T.height = o || 20, T.textMargin = i, T.class = "labelText", te(E, T), T = ae(), T.text = e.title, T.x = e.startx + h / 2 + (e.stopx - e.startx) / 2, T.y = e.starty + r + i, T.anchor = "middle", T.valign = "middle", T.textMargin = i, T.class = "loopText", T.fontFamily = d, T.fontSize = a, T.fontWeight = f, T.wrap = true;
|
|
1361
|
+
let m = ot(T.text) ? await _t(E, T, e) : Tt(E, T);
|
|
1362
|
+
if (e.sectionTitles !== void 0) {
|
|
1363
|
+
for (const [I, A] of Object.entries(e.sectionTitles))
|
|
1363
1364
|
if (A.message) {
|
|
1364
|
-
T.text = A.message, T.x =
|
|
1365
|
+
T.text = A.message, T.x = e.startx + (e.stopx - e.startx) / 2, T.y = e.sections[I].y + r + i, T.class = "loopText", T.anchor = "middle", T.valign = "middle", T.tspan = false, T.fontFamily = d, T.fontSize = a, T.fontWeight = f, T.wrap = e.wrap, ot(T.text) ? (e.starty = e.sections[I].y, await _t(E, T, e)) : Tt(E, T);
|
|
1365
1366
|
let O = Math.round(
|
|
1366
1367
|
m.map((S) => (S._groups || S)[0][0].getBBox().height).reduce((S, B) => S + B)
|
|
1367
1368
|
);
|
|
1368
|
-
|
|
1369
|
+
e.sections[I].height += O - (r + i);
|
|
1369
1370
|
}
|
|
1370
1371
|
}
|
|
1371
|
-
return
|
|
1372
|
-
}, "drawLoop"),
|
|
1373
|
-
|
|
1374
|
-
}, "drawBackgroundRect"),
|
|
1375
|
-
|
|
1372
|
+
return e.height = Math.round(e.stopy - e.starty), E;
|
|
1373
|
+
}, "drawLoop"), se = /* @__PURE__ */ u(function(t, e) {
|
|
1374
|
+
fe(t, e);
|
|
1375
|
+
}, "drawBackgroundRect"), Ge = /* @__PURE__ */ u(function(t) {
|
|
1376
|
+
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1376
1377
|
"d",
|
|
1377
1378
|
"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
|
|
1378
1379
|
);
|
|
1379
|
-
}, "insertDatabaseIcon"),
|
|
1380
|
-
|
|
1380
|
+
}, "insertDatabaseIcon"), Xe = /* @__PURE__ */ u(function(t) {
|
|
1381
|
+
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1381
1382
|
"d",
|
|
1382
1383
|
"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
|
|
1383
1384
|
);
|
|
1384
|
-
}, "insertComputerIcon"),
|
|
1385
|
-
|
|
1385
|
+
}, "insertComputerIcon"), Je = /* @__PURE__ */ u(function(t) {
|
|
1386
|
+
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1386
1387
|
"d",
|
|
1387
1388
|
"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
|
|
1388
1389
|
);
|
|
1389
|
-
}, "insertClockIcon"),
|
|
1390
|
-
|
|
1391
|
-
}, "insertArrowHead"),
|
|
1392
|
-
|
|
1393
|
-
}, "insertArrowFilledHead"),
|
|
1394
|
-
|
|
1395
|
-
}, "insertSequenceNumber"),
|
|
1396
|
-
|
|
1397
|
-
}, "insertArrowCrossHead"),
|
|
1390
|
+
}, "insertClockIcon"), Ze = /* @__PURE__ */ u(function(t) {
|
|
1391
|
+
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");
|
|
1392
|
+
}, "insertArrowHead"), Qe = /* @__PURE__ */ u(function(t) {
|
|
1393
|
+
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");
|
|
1394
|
+
}, "insertArrowFilledHead"), je = /* @__PURE__ */ u(function(t) {
|
|
1395
|
+
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);
|
|
1396
|
+
}, "insertSequenceNumber"), $e = /* @__PURE__ */ u(function(t) {
|
|
1397
|
+
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");
|
|
1398
|
+
}, "insertArrowCrossHead"), ae = /* @__PURE__ */ u(function() {
|
|
1398
1399
|
return {
|
|
1399
1400
|
x: 0,
|
|
1400
1401
|
y: 0,
|
|
@@ -1406,10 +1407,10 @@ var Se = Ot, Me = {
|
|
|
1406
1407
|
textMargin: 0,
|
|
1407
1408
|
rx: 0,
|
|
1408
1409
|
ry: 0,
|
|
1409
|
-
tspan:
|
|
1410
|
+
tspan: true,
|
|
1410
1411
|
valign: void 0
|
|
1411
1412
|
};
|
|
1412
|
-
}, "getTextObj"),
|
|
1413
|
+
}, "getTextObj"), ts = /* @__PURE__ */ u(function() {
|
|
1413
1414
|
return {
|
|
1414
1415
|
x: 0,
|
|
1415
1416
|
y: 0,
|
|
@@ -1421,86 +1422,86 @@ var Se = Ot, Me = {
|
|
|
1421
1422
|
rx: 0,
|
|
1422
1423
|
ry: 0
|
|
1423
1424
|
};
|
|
1424
|
-
}, "getNoteRect"),
|
|
1425
|
-
function
|
|
1426
|
-
const g =
|
|
1427
|
-
|
|
1428
|
-
}
|
|
1429
|
-
u(
|
|
1430
|
-
function
|
|
1431
|
-
const { actorFontSize: T, actorFontFamily: m, actorFontWeight:
|
|
1425
|
+
}, "getNoteRect"), Wt = /* @__PURE__ */ function() {
|
|
1426
|
+
function t(i, o, h, d, a, f, E) {
|
|
1427
|
+
const g = o.append("text").attr("x", h + a / 2).attr("y", d + f / 2 + 5).style("text-anchor", "middle").text(i);
|
|
1428
|
+
r(g, E);
|
|
1429
|
+
}
|
|
1430
|
+
u(t, "byText");
|
|
1431
|
+
function e(i, o, h, d, a, f, E, g) {
|
|
1432
|
+
const { actorFontSize: T, actorFontFamily: m, actorFontWeight: I } = g, [A, O] = Zt(T), S = i.split(v.lineBreakRegex);
|
|
1432
1433
|
for (let B = 0; B < S.length; B++) {
|
|
1433
|
-
const D = B * A - A * (S.length - 1) / 2, F =
|
|
1434
|
-
F.append("tspan").attr("x", h +
|
|
1434
|
+
const D = B * A - A * (S.length - 1) / 2, F = o.append("text").attr("x", h + a / 2).attr("y", d).style("text-anchor", "middle").style("font-size", O).style("font-weight", I).style("font-family", m);
|
|
1435
|
+
F.append("tspan").attr("x", h + a / 2).attr("dy", D).text(S[B]), F.attr("y", d + f / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), r(F, E);
|
|
1435
1436
|
}
|
|
1436
1437
|
}
|
|
1437
|
-
u(
|
|
1438
|
-
function c(i,
|
|
1439
|
-
const T =
|
|
1440
|
-
|
|
1438
|
+
u(e, "byTspan");
|
|
1439
|
+
function c(i, o, h, d, a, f, E, g) {
|
|
1440
|
+
const T = o.append("switch"), I = T.append("foreignObject").attr("x", h).attr("y", d).attr("width", a).attr("height", f).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1441
|
+
I.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, T, h, d, a, f, E, g), r(I, E);
|
|
1441
1442
|
}
|
|
1442
1443
|
u(c, "byFo");
|
|
1443
|
-
async function s(i,
|
|
1444
|
-
const T = await
|
|
1445
|
-
A.append("div").style("text-align", "center").style("vertical-align", "middle").html(await
|
|
1444
|
+
async function s(i, o, h, d, a, f, E, g) {
|
|
1445
|
+
const T = await Et(i, Dt()), m = o.append("switch"), A = m.append("foreignObject").attr("x", h + a / 2 - T.width / 2).attr("y", d + f / 2 - T.height / 2).attr("width", T.width).attr("height", T.height).append("xhtml:div").style("height", "100%").style("width", "100%");
|
|
1446
|
+
A.append("div").style("text-align", "center").style("vertical-align", "middle").html(await Qt(i, Dt())), e(i, m, h, d, a, f, E, g), r(A, E);
|
|
1446
1447
|
}
|
|
1447
1448
|
u(s, "byKatex");
|
|
1448
|
-
function
|
|
1449
|
-
for (const h in
|
|
1450
|
-
|
|
1449
|
+
function r(i, o) {
|
|
1450
|
+
for (const h in o)
|
|
1451
|
+
o.hasOwnProperty(h) && i.attr(h, o[h]);
|
|
1451
1452
|
}
|
|
1452
|
-
return u(
|
|
1453
|
-
return
|
|
1453
|
+
return u(r, "_setTextAttrs"), function(i, o = false) {
|
|
1454
|
+
return o ? s : i.textPlacement === "fo" ? c : i.textPlacement === "old" ? t : e;
|
|
1454
1455
|
};
|
|
1455
|
-
}(),
|
|
1456
|
-
function
|
|
1457
|
-
const E = i.append("text").attr("x",
|
|
1456
|
+
}(), es = /* @__PURE__ */ function() {
|
|
1457
|
+
function t(r, i, o, h, d, a, f) {
|
|
1458
|
+
const E = i.append("text").attr("x", o).attr("y", h).style("text-anchor", "start").text(r);
|
|
1458
1459
|
s(E, f);
|
|
1459
1460
|
}
|
|
1460
|
-
u(
|
|
1461
|
-
function
|
|
1462
|
-
const { actorFontSize: g, actorFontFamily: T, actorFontWeight: m } = E,
|
|
1463
|
-
for (let A = 0; A <
|
|
1464
|
-
const O = A * g - g * (
|
|
1465
|
-
S.append("tspan").attr("x",
|
|
1461
|
+
u(t, "byText");
|
|
1462
|
+
function e(r, i, o, h, d, a, f, E) {
|
|
1463
|
+
const { actorFontSize: g, actorFontFamily: T, actorFontWeight: m } = E, I = r.split(v.lineBreakRegex);
|
|
1464
|
+
for (let A = 0; A < I.length; A++) {
|
|
1465
|
+
const O = A * g - g * (I.length - 1) / 2, S = i.append("text").attr("x", o).attr("y", h).style("text-anchor", "start").style("font-size", g).style("font-weight", m).style("font-family", T);
|
|
1466
|
+
S.append("tspan").attr("x", o).attr("dy", O).text(I[A]), S.attr("y", h + a / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(S, f);
|
|
1466
1467
|
}
|
|
1467
1468
|
}
|
|
1468
|
-
u(
|
|
1469
|
-
function c(
|
|
1470
|
-
const g = i.append("switch"), m = g.append("foreignObject").attr("x",
|
|
1471
|
-
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(
|
|
1469
|
+
u(e, "byTspan");
|
|
1470
|
+
function c(r, i, o, h, d, a, f, E) {
|
|
1471
|
+
const g = i.append("switch"), m = g.append("foreignObject").attr("x", o).attr("y", h).attr("width", d).attr("height", a).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1472
|
+
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r, g, o, h, d, a, f, E), s(m, f);
|
|
1472
1473
|
}
|
|
1473
1474
|
u(c, "byFo");
|
|
1474
|
-
function s(
|
|
1475
|
-
for (const
|
|
1476
|
-
i.hasOwnProperty(
|
|
1475
|
+
function s(r, i) {
|
|
1476
|
+
for (const o in i)
|
|
1477
|
+
i.hasOwnProperty(o) && r.attr(o, i[o]);
|
|
1477
1478
|
}
|
|
1478
|
-
return u(s, "_setTextAttrs"), function(
|
|
1479
|
-
return
|
|
1479
|
+
return u(s, "_setTextAttrs"), function(r) {
|
|
1480
|
+
return r.textPlacement === "fo" ? c : r.textPlacement === "old" ? t : e;
|
|
1480
1481
|
};
|
|
1481
1482
|
}(), C = {
|
|
1482
|
-
drawRect:
|
|
1483
|
-
drawText:
|
|
1484
|
-
drawLabel:
|
|
1485
|
-
drawActor:
|
|
1486
|
-
drawBox:
|
|
1487
|
-
drawPopup:
|
|
1488
|
-
anchorElement:
|
|
1489
|
-
drawActivation:
|
|
1490
|
-
drawLoop:
|
|
1491
|
-
drawBackgroundRect:
|
|
1492
|
-
insertArrowHead:
|
|
1493
|
-
insertArrowFilledHead:
|
|
1494
|
-
insertSequenceNumber:
|
|
1495
|
-
insertArrowCrossHead:
|
|
1496
|
-
insertDatabaseIcon:
|
|
1497
|
-
insertComputerIcon:
|
|
1498
|
-
insertClockIcon:
|
|
1499
|
-
getTextObj:
|
|
1500
|
-
getNoteRect:
|
|
1501
|
-
fixLifeLineHeights:
|
|
1502
|
-
sanitizeUrl:
|
|
1503
|
-
},
|
|
1483
|
+
drawRect: Yt,
|
|
1484
|
+
drawText: Tt,
|
|
1485
|
+
drawLabel: te,
|
|
1486
|
+
drawActor: qe,
|
|
1487
|
+
drawBox: ze,
|
|
1488
|
+
drawPopup: Ve,
|
|
1489
|
+
anchorElement: He,
|
|
1490
|
+
drawActivation: Ke,
|
|
1491
|
+
drawLoop: Ue,
|
|
1492
|
+
drawBackgroundRect: se,
|
|
1493
|
+
insertArrowHead: Ze,
|
|
1494
|
+
insertArrowFilledHead: Qe,
|
|
1495
|
+
insertSequenceNumber: je,
|
|
1496
|
+
insertArrowCrossHead: $e,
|
|
1497
|
+
insertDatabaseIcon: Ge,
|
|
1498
|
+
insertComputerIcon: Xe,
|
|
1499
|
+
insertClockIcon: Je,
|
|
1500
|
+
getTextObj: ae,
|
|
1501
|
+
getNoteRect: ts,
|
|
1502
|
+
fixLifeLineHeights: ee,
|
|
1503
|
+
sanitizeUrl: Jt.sanitizeUrl
|
|
1504
|
+
}, n = {}, x = {
|
|
1504
1505
|
data: {
|
|
1505
1506
|
startx: void 0,
|
|
1506
1507
|
stopx: void 0,
|
|
@@ -1514,26 +1515,26 @@ var Se = Ot, Me = {
|
|
|
1514
1515
|
getHeight: /* @__PURE__ */ u(function() {
|
|
1515
1516
|
return Math.max.apply(
|
|
1516
1517
|
null,
|
|
1517
|
-
this.actors.length === 0 ? [0] : this.actors.map((
|
|
1518
|
-
) + (this.loops.length === 0 ? 0 : this.loops.map((
|
|
1518
|
+
this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)
|
|
1519
|
+
) + (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));
|
|
1519
1520
|
}, "getHeight"),
|
|
1520
1521
|
clear: /* @__PURE__ */ u(function() {
|
|
1521
1522
|
this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
|
|
1522
1523
|
}, "clear"),
|
|
1523
|
-
addBox: /* @__PURE__ */ u(function(
|
|
1524
|
-
this.boxes.push(
|
|
1524
|
+
addBox: /* @__PURE__ */ u(function(t) {
|
|
1525
|
+
this.boxes.push(t);
|
|
1525
1526
|
}, "addBox"),
|
|
1526
|
-
addActor: /* @__PURE__ */ u(function(
|
|
1527
|
-
this.actors.push(
|
|
1527
|
+
addActor: /* @__PURE__ */ u(function(t) {
|
|
1528
|
+
this.actors.push(t);
|
|
1528
1529
|
}, "addActor"),
|
|
1529
|
-
addLoop: /* @__PURE__ */ u(function(
|
|
1530
|
-
this.loops.push(
|
|
1530
|
+
addLoop: /* @__PURE__ */ u(function(t) {
|
|
1531
|
+
this.loops.push(t);
|
|
1531
1532
|
}, "addLoop"),
|
|
1532
|
-
addMessage: /* @__PURE__ */ u(function(
|
|
1533
|
-
this.messages.push(
|
|
1533
|
+
addMessage: /* @__PURE__ */ u(function(t) {
|
|
1534
|
+
this.messages.push(t);
|
|
1534
1535
|
}, "addMessage"),
|
|
1535
|
-
addNote: /* @__PURE__ */ u(function(
|
|
1536
|
-
this.notes.push(
|
|
1536
|
+
addNote: /* @__PURE__ */ u(function(t) {
|
|
1537
|
+
this.notes.push(t);
|
|
1537
1538
|
}, "addNote"),
|
|
1538
1539
|
lastActor: /* @__PURE__ */ u(function() {
|
|
1539
1540
|
return this.actors[this.actors.length - 1];
|
|
@@ -1559,69 +1560,69 @@ var Se = Ot, Me = {
|
|
|
1559
1560
|
stopx: void 0,
|
|
1560
1561
|
starty: void 0,
|
|
1561
1562
|
stopy: void 0
|
|
1562
|
-
}, this.verticalPos = 0,
|
|
1563
|
+
}, this.verticalPos = 0, ne($());
|
|
1563
1564
|
}, "init"),
|
|
1564
|
-
updateVal: /* @__PURE__ */ u(function(
|
|
1565
|
-
e
|
|
1565
|
+
updateVal: /* @__PURE__ */ u(function(t, e, c, s) {
|
|
1566
|
+
t[e] === void 0 ? t[e] = c : t[e] = s(c, t[e]);
|
|
1566
1567
|
}, "updateVal"),
|
|
1567
|
-
updateBounds: /* @__PURE__ */ u(function(
|
|
1568
|
-
const
|
|
1568
|
+
updateBounds: /* @__PURE__ */ u(function(t, e, c, s) {
|
|
1569
|
+
const r = this;
|
|
1569
1570
|
let i = 0;
|
|
1570
|
-
function
|
|
1571
|
-
return /* @__PURE__ */ u(function(
|
|
1571
|
+
function o(h) {
|
|
1572
|
+
return /* @__PURE__ */ u(function(a) {
|
|
1572
1573
|
i++;
|
|
1573
|
-
const f =
|
|
1574
|
-
|
|
1574
|
+
const f = r.sequenceItems.length - i + 1;
|
|
1575
|
+
r.updateVal(a, "starty", e - f * n.boxMargin, Math.min), r.updateVal(a, "stopy", s + f * n.boxMargin, Math.max), r.updateVal(x.data, "startx", t - f * n.boxMargin, Math.min), r.updateVal(x.data, "stopx", c + f * n.boxMargin, Math.max), h !== "activation" && (r.updateVal(a, "startx", t - f * n.boxMargin, Math.min), r.updateVal(a, "stopx", c + f * n.boxMargin, Math.max), r.updateVal(x.data, "starty", e - f * n.boxMargin, Math.min), r.updateVal(x.data, "stopy", s + f * n.boxMargin, Math.max));
|
|
1575
1576
|
}, "updateItemBounds");
|
|
1576
1577
|
}
|
|
1577
|
-
u(
|
|
1578
|
+
u(o, "updateFn"), this.sequenceItems.forEach(o()), this.activations.forEach(o("activation"));
|
|
1578
1579
|
}, "updateBounds"),
|
|
1579
|
-
insert: /* @__PURE__ */ u(function(
|
|
1580
|
-
const
|
|
1581
|
-
this.updateVal(x.data, "startx",
|
|
1580
|
+
insert: /* @__PURE__ */ u(function(t, e, c, s) {
|
|
1581
|
+
const r = v.getMin(t, c), i = v.getMax(t, c), o = v.getMin(e, s), h = v.getMax(e, s);
|
|
1582
|
+
this.updateVal(x.data, "startx", r, Math.min), this.updateVal(x.data, "starty", o, Math.min), this.updateVal(x.data, "stopx", i, Math.max), this.updateVal(x.data, "stopy", h, Math.max), this.updateBounds(r, o, i, h);
|
|
1582
1583
|
}, "insert"),
|
|
1583
|
-
newActivation: /* @__PURE__ */ u(function(
|
|
1584
|
-
const s = c.get(
|
|
1584
|
+
newActivation: /* @__PURE__ */ u(function(t, e, c) {
|
|
1585
|
+
const s = c.get(t.from), r = At(t.from).length || 0, i = s.x + s.width / 2 + (r - 1) * n.activationWidth / 2;
|
|
1585
1586
|
this.activations.push({
|
|
1586
1587
|
startx: i,
|
|
1587
1588
|
starty: this.verticalPos + 2,
|
|
1588
|
-
stopx: i +
|
|
1589
|
+
stopx: i + n.activationWidth,
|
|
1589
1590
|
stopy: void 0,
|
|
1590
|
-
actor:
|
|
1591
|
-
anchored: C.anchorElement(
|
|
1591
|
+
actor: t.from,
|
|
1592
|
+
anchored: C.anchorElement(e)
|
|
1592
1593
|
});
|
|
1593
1594
|
}, "newActivation"),
|
|
1594
|
-
endActivation: /* @__PURE__ */ u(function(
|
|
1595
|
-
const
|
|
1595
|
+
endActivation: /* @__PURE__ */ u(function(t) {
|
|
1596
|
+
const e = this.activations.map(function(c) {
|
|
1596
1597
|
return c.actor;
|
|
1597
|
-
}).lastIndexOf(
|
|
1598
|
-
return this.activations.splice(
|
|
1598
|
+
}).lastIndexOf(t.from);
|
|
1599
|
+
return this.activations.splice(e, 1)[0];
|
|
1599
1600
|
}, "endActivation"),
|
|
1600
|
-
createLoop: /* @__PURE__ */ u(function(
|
|
1601
|
+
createLoop: /* @__PURE__ */ u(function(t = { message: void 0, wrap: false, width: void 0 }, e) {
|
|
1601
1602
|
return {
|
|
1602
1603
|
startx: void 0,
|
|
1603
1604
|
starty: this.verticalPos,
|
|
1604
1605
|
stopx: void 0,
|
|
1605
1606
|
stopy: void 0,
|
|
1606
|
-
title:
|
|
1607
|
-
wrap:
|
|
1608
|
-
width:
|
|
1607
|
+
title: t.message,
|
|
1608
|
+
wrap: t.wrap,
|
|
1609
|
+
width: t.width,
|
|
1609
1610
|
height: 0,
|
|
1610
|
-
fill:
|
|
1611
|
+
fill: e
|
|
1611
1612
|
};
|
|
1612
1613
|
}, "createLoop"),
|
|
1613
|
-
newLoop: /* @__PURE__ */ u(function(
|
|
1614
|
-
this.sequenceItems.push(this.createLoop(
|
|
1614
|
+
newLoop: /* @__PURE__ */ u(function(t = { message: void 0, wrap: false, width: void 0 }, e) {
|
|
1615
|
+
this.sequenceItems.push(this.createLoop(t, e));
|
|
1615
1616
|
}, "newLoop"),
|
|
1616
1617
|
endLoop: /* @__PURE__ */ u(function() {
|
|
1617
1618
|
return this.sequenceItems.pop();
|
|
1618
1619
|
}, "endLoop"),
|
|
1619
1620
|
isLoopOverlap: /* @__PURE__ */ u(function() {
|
|
1620
|
-
return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap :
|
|
1621
|
+
return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false;
|
|
1621
1622
|
}, "isLoopOverlap"),
|
|
1622
|
-
addSectionToLoop: /* @__PURE__ */ u(function(
|
|
1623
|
-
const
|
|
1624
|
-
|
|
1623
|
+
addSectionToLoop: /* @__PURE__ */ u(function(t) {
|
|
1624
|
+
const e = this.sequenceItems.pop();
|
|
1625
|
+
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: x.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
|
|
1625
1626
|
}, "addSectionToLoop"),
|
|
1626
1627
|
saveVerticalPos: /* @__PURE__ */ u(function() {
|
|
1627
1628
|
this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
|
|
@@ -1629,8 +1630,8 @@ var Se = Ot, Me = {
|
|
|
1629
1630
|
resetVerticalPos: /* @__PURE__ */ u(function() {
|
|
1630
1631
|
this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
|
|
1631
1632
|
}, "resetVerticalPos"),
|
|
1632
|
-
bumpVerticalPos: /* @__PURE__ */ u(function(
|
|
1633
|
-
this.verticalPos = this.verticalPos +
|
|
1633
|
+
bumpVerticalPos: /* @__PURE__ */ u(function(t) {
|
|
1634
|
+
this.verticalPos = this.verticalPos + t, this.data.stopy = v.getMax(this.data.stopy, this.verticalPos);
|
|
1634
1635
|
}, "bumpVerticalPos"),
|
|
1635
1636
|
getVerticalPos: /* @__PURE__ */ u(function() {
|
|
1636
1637
|
return this.verticalPos;
|
|
@@ -1638,224 +1639,224 @@ var Se = Ot, Me = {
|
|
|
1638
1639
|
getBounds: /* @__PURE__ */ u(function() {
|
|
1639
1640
|
return { bounds: this.data, models: this.models };
|
|
1640
1641
|
}, "getBounds")
|
|
1641
|
-
},
|
|
1642
|
-
x.bumpVerticalPos(
|
|
1643
|
-
const c =
|
|
1644
|
-
c.x =
|
|
1645
|
-
const s =
|
|
1646
|
-
i.x =
|
|
1647
|
-
const
|
|
1648
|
-
|
|
1642
|
+
}, ss = /* @__PURE__ */ u(async function(t, e) {
|
|
1643
|
+
x.bumpVerticalPos(n.boxMargin), e.height = n.boxMargin, e.starty = x.getVerticalPos();
|
|
1644
|
+
const c = Pt();
|
|
1645
|
+
c.x = e.startx, c.y = e.starty, c.width = e.width || n.width, c.class = "note";
|
|
1646
|
+
const s = t.append("g"), r = C.drawRect(s, c), i = Vt();
|
|
1647
|
+
i.x = e.startx, i.y = e.starty, i.width = c.width, i.dy = "1em", i.text = e.message, i.class = "noteText", i.fontFamily = n.noteFontFamily, i.fontSize = n.noteFontSize, i.fontWeight = n.noteFontWeight, i.anchor = n.noteAlign, i.textMargin = n.noteMargin, i.valign = "center";
|
|
1648
|
+
const o = ot(i.text) ? await _t(s, i) : Tt(s, i), h = Math.round(
|
|
1649
|
+
o.map((d) => (d._groups || d)[0][0].getBBox().height).reduce((d, a) => d + a)
|
|
1649
1650
|
);
|
|
1650
|
-
|
|
1651
|
-
}, "drawNote"), gt = /* @__PURE__ */ u((
|
|
1652
|
-
fontFamily:
|
|
1653
|
-
fontSize:
|
|
1654
|
-
fontWeight:
|
|
1655
|
-
}), "messageFont"), xt = /* @__PURE__ */ u((
|
|
1656
|
-
fontFamily:
|
|
1657
|
-
fontSize:
|
|
1658
|
-
fontWeight:
|
|
1659
|
-
}), "noteFont"),
|
|
1660
|
-
fontFamily:
|
|
1661
|
-
fontSize:
|
|
1662
|
-
fontWeight:
|
|
1651
|
+
r.attr("height", h + 2 * n.noteMargin), e.height += h + 2 * n.noteMargin, x.bumpVerticalPos(h + 2 * n.noteMargin), e.stopy = e.starty + h + 2 * n.noteMargin, e.stopx = e.startx + c.width, x.insert(e.startx, e.starty, e.stopx, e.stopy), x.models.addNote(e);
|
|
1652
|
+
}, "drawNote"), gt = /* @__PURE__ */ u((t) => ({
|
|
1653
|
+
fontFamily: t.messageFontFamily,
|
|
1654
|
+
fontSize: t.messageFontSize,
|
|
1655
|
+
fontWeight: t.messageFontWeight
|
|
1656
|
+
}), "messageFont"), xt = /* @__PURE__ */ u((t) => ({
|
|
1657
|
+
fontFamily: t.noteFontFamily,
|
|
1658
|
+
fontSize: t.noteFontSize,
|
|
1659
|
+
fontWeight: t.noteFontWeight
|
|
1660
|
+
}), "noteFont"), Ot = /* @__PURE__ */ u((t) => ({
|
|
1661
|
+
fontFamily: t.actorFontFamily,
|
|
1662
|
+
fontSize: t.actorFontSize,
|
|
1663
|
+
fontWeight: t.actorFontWeight
|
|
1663
1664
|
}), "actorFont");
|
|
1664
|
-
async function
|
|
1665
|
+
async function re(t, e) {
|
|
1665
1666
|
x.bumpVerticalPos(10);
|
|
1666
|
-
const { startx: c, stopx: s, message:
|
|
1667
|
-
if (!
|
|
1667
|
+
const { startx: c, stopx: s, message: r } = e, i = v.splitBreaks(r).length, o = ot(r), h = o ? await Et(r, $()) : Y.calculateTextDimensions(r, gt(n));
|
|
1668
|
+
if (!o) {
|
|
1668
1669
|
const E = h.height / i;
|
|
1669
|
-
|
|
1670
|
+
e.height += E, x.bumpVerticalPos(E);
|
|
1670
1671
|
}
|
|
1671
|
-
let d,
|
|
1672
|
+
let d, a = h.height - 10;
|
|
1672
1673
|
const f = h.width;
|
|
1673
1674
|
if (c === s) {
|
|
1674
|
-
d = x.getVerticalPos() +
|
|
1675
|
-
const E =
|
|
1675
|
+
d = x.getVerticalPos() + a, n.rightAngles || (a += n.boxMargin, d = x.getVerticalPos() + a), a += 30;
|
|
1676
|
+
const E = v.getMax(f / 2, n.width / 2);
|
|
1676
1677
|
x.insert(
|
|
1677
1678
|
c - E,
|
|
1678
|
-
x.getVerticalPos() - 10 +
|
|
1679
|
+
x.getVerticalPos() - 10 + a,
|
|
1679
1680
|
s + E,
|
|
1680
|
-
x.getVerticalPos() + 30 +
|
|
1681
|
+
x.getVerticalPos() + 30 + a
|
|
1681
1682
|
);
|
|
1682
1683
|
} else
|
|
1683
|
-
|
|
1684
|
-
return x.bumpVerticalPos(
|
|
1684
|
+
a += n.boxMargin, d = x.getVerticalPos() + a, x.insert(c, d - 10, s, d);
|
|
1685
|
+
return x.bumpVerticalPos(a), e.height += a, e.stopy = e.starty + e.height, x.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), d;
|
|
1685
1686
|
}
|
|
1686
|
-
u(
|
|
1687
|
-
var
|
|
1688
|
-
const { startx:
|
|
1689
|
-
g.x =
|
|
1687
|
+
u(re, "boundMessage");
|
|
1688
|
+
var as = /* @__PURE__ */ u(async function(t, e, c, s) {
|
|
1689
|
+
const { startx: r, stopx: i, starty: o, message: h, type: d, sequenceIndex: a, sequenceVisible: f } = e, E = Y.calculateTextDimensions(h, gt(n)), g = Vt();
|
|
1690
|
+
g.x = r, g.y = o + 10, g.width = i - r, g.class = "messageText", g.dy = "1em", g.text = h, g.fontFamily = n.messageFontFamily, g.fontSize = n.messageFontSize, g.fontWeight = n.messageFontWeight, g.anchor = n.messageAlign, g.valign = "center", g.textMargin = n.wrapPadding, g.tspan = false, ot(g.text) ? await _t(t, g, { startx: r, stopx: i, starty: c }) : Tt(t, g);
|
|
1690
1691
|
const T = E.width;
|
|
1691
1692
|
let m;
|
|
1692
|
-
|
|
1693
|
+
r === i ? n.rightAngles ? m = t.append("path").attr(
|
|
1693
1694
|
"d",
|
|
1694
|
-
`M ${
|
|
1695
|
-
) : m =
|
|
1695
|
+
`M ${r},${c} H ${r + v.getMax(n.width / 2, T / 2)} V ${c + 25} H ${r}`
|
|
1696
|
+
) : m = t.append("path").attr(
|
|
1696
1697
|
"d",
|
|
1697
|
-
"M " +
|
|
1698
|
-
) : (m =
|
|
1699
|
-
let
|
|
1700
|
-
|
|
1701
|
-
}, "drawMessage"),
|
|
1702
|
-
let h = 0, d = 0,
|
|
1698
|
+
"M " + r + "," + c + " C " + (r + 60) + "," + (c - 10) + " " + (r + 60) + "," + (c + 30) + " " + r + "," + (c + 20)
|
|
1699
|
+
) : (m = t.append("line"), m.attr("x1", r), m.attr("y1", c), m.attr("x2", i), m.attr("y2", c)), d === s.db.LINETYPE.DOTTED || d === s.db.LINETYPE.DOTTED_CROSS || d === s.db.LINETYPE.DOTTED_POINT || d === s.db.LINETYPE.DOTTED_OPEN || d === s.db.LINETYPE.BIDIRECTIONAL_DOTTED ? (m.style("stroke-dasharray", "3, 3"), m.attr("class", "messageLine1")) : m.attr("class", "messageLine0");
|
|
1700
|
+
let I = "";
|
|
1701
|
+
n.arrowMarkerAbsolute && (I = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, I = I.replace(/\(/g, "\\("), I = I.replace(/\)/g, "\\)")), m.attr("stroke-width", 2), m.attr("stroke", "none"), m.style("fill", "none"), (d === s.db.LINETYPE.SOLID || d === s.db.LINETYPE.DOTTED) && m.attr("marker-end", "url(" + I + "#arrowhead)"), (d === s.db.LINETYPE.BIDIRECTIONAL_SOLID || d === s.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (m.attr("marker-start", "url(" + I + "#arrowhead)"), m.attr("marker-end", "url(" + I + "#arrowhead)")), (d === s.db.LINETYPE.SOLID_POINT || d === s.db.LINETYPE.DOTTED_POINT) && m.attr("marker-end", "url(" + I + "#filled-head)"), (d === s.db.LINETYPE.SOLID_CROSS || d === s.db.LINETYPE.DOTTED_CROSS) && m.attr("marker-end", "url(" + I + "#crosshead)"), (f || n.showSequenceNumbers) && (m.attr("marker-start", "url(" + I + "#sequencenumber)"), t.append("text").attr("x", r).attr("y", c + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(a));
|
|
1702
|
+
}, "drawMessage"), rs = /* @__PURE__ */ u(function(t, e, c, s, r, i, o) {
|
|
1703
|
+
let h = 0, d = 0, a, f = 0;
|
|
1703
1704
|
for (const E of s) {
|
|
1704
|
-
const g =
|
|
1705
|
-
|
|
1705
|
+
const g = e.get(E), T = g.box;
|
|
1706
|
+
a && a != T && (o || x.models.addBox(a), d += n.boxMargin + a.margin), T && T != a && (o || (T.x = h + d, T.y = r), d += T.margin), g.width = g.width || n.width, g.height = v.getMax(g.height || n.height, n.height), g.margin = g.margin || n.actorMargin, f = v.getMax(f, g.height), c.get(g.name) && (d += g.width / 2), g.x = h + d, g.starty = x.getVerticalPos(), x.insert(g.x, r, g.x + g.width, g.height), h += g.width + d, g.box && (g.box.width = h + T.margin - g.box.x), d = g.margin, a = g.box, x.models.addActor(g);
|
|
1706
1707
|
}
|
|
1707
|
-
|
|
1708
|
-
}, "addActorRenderingData"),
|
|
1708
|
+
a && !o && x.models.addBox(a), x.bumpVerticalPos(f);
|
|
1709
|
+
}, "addActorRenderingData"), Bt = /* @__PURE__ */ u(async function(t, e, c, s) {
|
|
1709
1710
|
if (s) {
|
|
1710
|
-
let
|
|
1711
|
-
x.bumpVerticalPos(
|
|
1711
|
+
let r = 0;
|
|
1712
|
+
x.bumpVerticalPos(n.boxMargin * 2);
|
|
1712
1713
|
for (const i of c) {
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1715
|
-
const h = await C.drawActor(
|
|
1716
|
-
|
|
1714
|
+
const o = e.get(i);
|
|
1715
|
+
o.stopy || (o.stopy = x.getVerticalPos());
|
|
1716
|
+
const h = await C.drawActor(t, o, n, true);
|
|
1717
|
+
r = v.getMax(r, h);
|
|
1717
1718
|
}
|
|
1718
|
-
x.bumpVerticalPos(
|
|
1719
|
+
x.bumpVerticalPos(r + n.boxMargin);
|
|
1719
1720
|
} else
|
|
1720
|
-
for (const
|
|
1721
|
-
const i =
|
|
1722
|
-
await C.drawActor(
|
|
1721
|
+
for (const r of c) {
|
|
1722
|
+
const i = e.get(r);
|
|
1723
|
+
await C.drawActor(t, i, n, false);
|
|
1723
1724
|
}
|
|
1724
|
-
}, "drawActors"),
|
|
1725
|
-
let
|
|
1726
|
-
for (const
|
|
1727
|
-
const h =
|
|
1728
|
-
|
|
1725
|
+
}, "drawActors"), ie = /* @__PURE__ */ u(function(t, e, c, s) {
|
|
1726
|
+
let r = 0, i = 0;
|
|
1727
|
+
for (const o of c) {
|
|
1728
|
+
const h = e.get(o), d = ns(h), a = C.drawPopup(
|
|
1729
|
+
t,
|
|
1729
1730
|
h,
|
|
1730
1731
|
d,
|
|
1731
|
-
|
|
1732
|
-
|
|
1732
|
+
n,
|
|
1733
|
+
n.forceMenus,
|
|
1733
1734
|
s
|
|
1734
1735
|
);
|
|
1735
|
-
|
|
1736
|
-
}
|
|
1737
|
-
return { maxHeight:
|
|
1738
|
-
}, "drawActorsPopup"),
|
|
1739
|
-
|
|
1740
|
-
}, "setConf"),
|
|
1741
|
-
return x.activations.filter(function(
|
|
1742
|
-
return
|
|
1736
|
+
a.height > r && (r = a.height), a.width + h.x > i && (i = a.width + h.x);
|
|
1737
|
+
}
|
|
1738
|
+
return { maxHeight: r, maxWidth: i };
|
|
1739
|
+
}, "drawActorsPopup"), ne = /* @__PURE__ */ u(function(t) {
|
|
1740
|
+
we(n, t), t.fontFamily && (n.actorFontFamily = n.noteFontFamily = n.messageFontFamily = t.fontFamily), t.fontSize && (n.actorFontSize = n.noteFontSize = n.messageFontSize = t.fontSize), t.fontWeight && (n.actorFontWeight = n.noteFontWeight = n.messageFontWeight = t.fontWeight);
|
|
1741
|
+
}, "setConf"), At = /* @__PURE__ */ u(function(t) {
|
|
1742
|
+
return x.activations.filter(function(e) {
|
|
1743
|
+
return e.actor === t;
|
|
1743
1744
|
});
|
|
1744
|
-
}, "actorActivations"),
|
|
1745
|
-
const c =
|
|
1746
|
-
function(
|
|
1747
|
-
return
|
|
1745
|
+
}, "actorActivations"), Xt = /* @__PURE__ */ u(function(t, e) {
|
|
1746
|
+
const c = e.get(t), s = At(t), r = s.reduce(
|
|
1747
|
+
function(o, h) {
|
|
1748
|
+
return v.getMin(o, h.startx);
|
|
1748
1749
|
},
|
|
1749
1750
|
c.x + c.width / 2 - 1
|
|
1750
1751
|
), i = s.reduce(
|
|
1751
|
-
function(
|
|
1752
|
-
return
|
|
1752
|
+
function(o, h) {
|
|
1753
|
+
return v.getMax(o, h.stopx);
|
|
1753
1754
|
},
|
|
1754
1755
|
c.x + c.width / 2 + 1
|
|
1755
1756
|
);
|
|
1756
|
-
return [
|
|
1757
|
+
return [r, i];
|
|
1757
1758
|
}, "activationBounds");
|
|
1758
|
-
function rt(
|
|
1759
|
+
function rt(t, e, c, s, r) {
|
|
1759
1760
|
x.bumpVerticalPos(c);
|
|
1760
1761
|
let i = s;
|
|
1761
|
-
if (
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1764
|
-
const d = Y.calculateTextDimensions(
|
|
1765
|
-
i = s +
|
|
1762
|
+
if (e.id && e.message && t[e.id]) {
|
|
1763
|
+
const o = t[e.id].width, h = gt(n);
|
|
1764
|
+
e.message = Y.wrapLabel(`[${e.message}]`, o - 2 * n.wrapPadding, h), e.width = o, e.wrap = true;
|
|
1765
|
+
const d = Y.calculateTextDimensions(e.message, h), a = v.getMax(d.height, n.labelBoxHeight);
|
|
1766
|
+
i = s + a, G.debug(`${a} - ${e.message}`);
|
|
1766
1767
|
}
|
|
1767
|
-
|
|
1768
|
+
r(e), x.bumpVerticalPos(i);
|
|
1768
1769
|
}
|
|
1769
1770
|
u(rt, "adjustLoopHeightForWrap");
|
|
1770
|
-
function
|
|
1771
|
-
function h(
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
),
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
),
|
|
1771
|
+
function oe(t, e, c, s, r, i, o) {
|
|
1772
|
+
function h(a, f) {
|
|
1773
|
+
a.x < r.get(t.from).x ? (x.insert(
|
|
1774
|
+
e.stopx - f,
|
|
1775
|
+
e.starty,
|
|
1776
|
+
e.startx,
|
|
1777
|
+
e.stopy + a.height / 2 + n.noteMargin
|
|
1778
|
+
), e.stopx = e.stopx + f) : (x.insert(
|
|
1779
|
+
e.startx,
|
|
1780
|
+
e.starty,
|
|
1781
|
+
e.stopx + f,
|
|
1782
|
+
e.stopy + a.height / 2 + n.noteMargin
|
|
1783
|
+
), e.stopx = e.stopx - f);
|
|
1783
1784
|
}
|
|
1784
1785
|
u(h, "receiverAdjustment");
|
|
1785
|
-
function d(
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
),
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
),
|
|
1797
|
-
}
|
|
1798
|
-
if (u(d, "senderAdjustment"), i.get(
|
|
1799
|
-
const
|
|
1800
|
-
h(
|
|
1801
|
-
} else if (
|
|
1802
|
-
const
|
|
1803
|
-
if (
|
|
1804
|
-
const f =
|
|
1805
|
-
d(
|
|
1786
|
+
function d(a, f) {
|
|
1787
|
+
a.x < r.get(t.to).x ? (x.insert(
|
|
1788
|
+
e.startx - f,
|
|
1789
|
+
e.starty,
|
|
1790
|
+
e.stopx,
|
|
1791
|
+
e.stopy + a.height / 2 + n.noteMargin
|
|
1792
|
+
), e.startx = e.startx + f) : (x.insert(
|
|
1793
|
+
e.stopx,
|
|
1794
|
+
e.starty,
|
|
1795
|
+
e.startx + f,
|
|
1796
|
+
e.stopy + a.height / 2 + n.noteMargin
|
|
1797
|
+
), e.startx = e.startx - f);
|
|
1798
|
+
}
|
|
1799
|
+
if (u(d, "senderAdjustment"), i.get(t.to) == s) {
|
|
1800
|
+
const a = r.get(t.to), f = a.type == "actor" ? ut / 2 + 3 : a.width / 2 + 3;
|
|
1801
|
+
h(a, f), a.starty = c - a.height / 2, x.bumpVerticalPos(a.height / 2);
|
|
1802
|
+
} else if (o.get(t.from) == s) {
|
|
1803
|
+
const a = r.get(t.from);
|
|
1804
|
+
if (n.mirrorActors) {
|
|
1805
|
+
const f = a.type == "actor" ? ut / 2 : a.width / 2;
|
|
1806
|
+
d(a, f);
|
|
1806
1807
|
}
|
|
1807
|
-
|
|
1808
|
-
} else if (
|
|
1809
|
-
const
|
|
1810
|
-
if (
|
|
1811
|
-
const f =
|
|
1812
|
-
h(
|
|
1808
|
+
a.stopy = c - a.height / 2, x.bumpVerticalPos(a.height / 2);
|
|
1809
|
+
} else if (o.get(t.to) == s) {
|
|
1810
|
+
const a = r.get(t.to);
|
|
1811
|
+
if (n.mirrorActors) {
|
|
1812
|
+
const f = a.type == "actor" ? ut / 2 + 3 : a.width / 2 + 3;
|
|
1813
|
+
h(a, f);
|
|
1813
1814
|
}
|
|
1814
|
-
|
|
1815
|
+
a.stopy = c - a.height / 2, x.bumpVerticalPos(a.height / 2);
|
|
1815
1816
|
}
|
|
1816
1817
|
}
|
|
1817
|
-
u(
|
|
1818
|
-
var
|
|
1819
|
-
const { securityLevel:
|
|
1820
|
-
|
|
1821
|
-
let
|
|
1822
|
-
|
|
1823
|
-
const h =
|
|
1818
|
+
u(oe, "adjustCreatedDestroyedData");
|
|
1819
|
+
var is = /* @__PURE__ */ u(async function(t, e, c, s) {
|
|
1820
|
+
const { securityLevel: r, sequence: i } = $();
|
|
1821
|
+
n = i;
|
|
1822
|
+
let o;
|
|
1823
|
+
r === "sandbox" && (o = It("#i" + e));
|
|
1824
|
+
const h = r === "sandbox" ? It(o.nodes()[0].contentDocument.body) : It("body"), d = r === "sandbox" ? o.nodes()[0].contentDocument : document;
|
|
1824
1825
|
x.init(), G.debug(s.db);
|
|
1825
|
-
const
|
|
1826
|
+
const a = r === "sandbox" ? h.select(`[id="${e}"]`) : It(`[id="${e}"]`), f = s.db.getActors(), E = s.db.getCreatedActors(), g = s.db.getDestroyedActors(), T = s.db.getBoxes();
|
|
1826
1827
|
let m = s.db.getActorKeys();
|
|
1827
|
-
const
|
|
1828
|
-
if (
|
|
1828
|
+
const I = s.db.getMessages(), A = s.db.getDiagramTitle(), O = s.db.hasAtLeastOneBox(), S = s.db.hasAtLeastOneBoxWithTitle(), B = await ce(f, I, s);
|
|
1829
|
+
if (n.height = await le(f, B, T), C.insertComputerIcon(a), C.insertDatabaseIcon(a), C.insertClockIcon(a), O && (x.bumpVerticalPos(n.boxMargin), S && x.bumpVerticalPos(T[0].textMaxHeight)), n.hideUnusedParticipants === true) {
|
|
1829
1830
|
const y = /* @__PURE__ */ new Set();
|
|
1830
|
-
|
|
1831
|
+
I.forEach((_) => {
|
|
1831
1832
|
y.add(_.from), y.add(_.to);
|
|
1832
1833
|
}), m = m.filter((_) => y.has(_));
|
|
1833
1834
|
}
|
|
1834
|
-
|
|
1835
|
-
const D = await
|
|
1836
|
-
C.insertArrowHead(
|
|
1835
|
+
rs(a, f, E, m, 0, I, false);
|
|
1836
|
+
const D = await ls(I, f, B, s);
|
|
1837
|
+
C.insertArrowHead(a), C.insertArrowCrossHead(a), C.insertArrowFilledHead(a), C.insertSequenceNumber(a);
|
|
1837
1838
|
function F(y, _) {
|
|
1838
1839
|
const Q = x.endActivation(y);
|
|
1839
1840
|
Q.starty + 18 > _ && (Q.starty = _ - 6, _ += 12), C.drawActivation(
|
|
1840
|
-
|
|
1841
|
+
a,
|
|
1841
1842
|
Q,
|
|
1842
1843
|
_,
|
|
1843
|
-
|
|
1844
|
-
|
|
1844
|
+
n,
|
|
1845
|
+
At(y.from).length
|
|
1845
1846
|
), x.insert(Q.startx, _ - 10, Q.stopx, _);
|
|
1846
1847
|
}
|
|
1847
1848
|
u(F, "activeEnd");
|
|
1848
1849
|
let q = 1, X = 1;
|
|
1849
1850
|
const tt = [], z = [];
|
|
1850
1851
|
let H = 0;
|
|
1851
|
-
for (const y of
|
|
1852
|
+
for (const y of I) {
|
|
1852
1853
|
let _, Q, at;
|
|
1853
1854
|
switch (y.type) {
|
|
1854
1855
|
case s.db.LINETYPE.NOTE:
|
|
1855
|
-
x.resetVerticalPos(), Q = y.noteModel, await
|
|
1856
|
+
x.resetVerticalPos(), Q = y.noteModel, await ss(a, Q);
|
|
1856
1857
|
break;
|
|
1857
1858
|
case s.db.LINETYPE.ACTIVE_START:
|
|
1858
|
-
x.newActivation(y,
|
|
1859
|
+
x.newActivation(y, a, f);
|
|
1859
1860
|
break;
|
|
1860
1861
|
case s.db.LINETYPE.ACTIVE_END:
|
|
1861
1862
|
F(y, x.getVerticalPos());
|
|
@@ -1864,20 +1865,20 @@ var ns = /* @__PURE__ */ u(async function(e, t, c, s) {
|
|
|
1864
1865
|
rt(
|
|
1865
1866
|
D,
|
|
1866
1867
|
y,
|
|
1867
|
-
|
|
1868
|
-
|
|
1868
|
+
n.boxMargin,
|
|
1869
|
+
n.boxMargin + n.boxTextMargin,
|
|
1869
1870
|
(k) => x.newLoop(k)
|
|
1870
1871
|
);
|
|
1871
1872
|
break;
|
|
1872
1873
|
case s.db.LINETYPE.LOOP_END:
|
|
1873
|
-
_ = x.endLoop(), await C.drawLoop(
|
|
1874
|
+
_ = x.endLoop(), await C.drawLoop(a, _, "loop", n), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
|
|
1874
1875
|
break;
|
|
1875
1876
|
case s.db.LINETYPE.RECT_START:
|
|
1876
1877
|
rt(
|
|
1877
1878
|
D,
|
|
1878
1879
|
y,
|
|
1879
|
-
|
|
1880
|
-
|
|
1880
|
+
n.boxMargin,
|
|
1881
|
+
n.boxMargin,
|
|
1881
1882
|
(k) => x.newLoop(void 0, k.message)
|
|
1882
1883
|
);
|
|
1883
1884
|
break;
|
|
@@ -1888,20 +1889,20 @@ var ns = /* @__PURE__ */ u(async function(e, t, c, s) {
|
|
|
1888
1889
|
rt(
|
|
1889
1890
|
D,
|
|
1890
1891
|
y,
|
|
1891
|
-
|
|
1892
|
-
|
|
1892
|
+
n.boxMargin,
|
|
1893
|
+
n.boxMargin + n.boxTextMargin,
|
|
1893
1894
|
(k) => x.newLoop(k)
|
|
1894
1895
|
);
|
|
1895
1896
|
break;
|
|
1896
1897
|
case s.db.LINETYPE.OPT_END:
|
|
1897
|
-
_ = x.endLoop(), await C.drawLoop(
|
|
1898
|
+
_ = x.endLoop(), await C.drawLoop(a, _, "opt", n), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
|
|
1898
1899
|
break;
|
|
1899
1900
|
case s.db.LINETYPE.ALT_START:
|
|
1900
1901
|
rt(
|
|
1901
1902
|
D,
|
|
1902
1903
|
y,
|
|
1903
|
-
|
|
1904
|
-
|
|
1904
|
+
n.boxMargin,
|
|
1905
|
+
n.boxMargin + n.boxTextMargin,
|
|
1905
1906
|
(k) => x.newLoop(k)
|
|
1906
1907
|
);
|
|
1907
1908
|
break;
|
|
@@ -1909,21 +1910,21 @@ var ns = /* @__PURE__ */ u(async function(e, t, c, s) {
|
|
|
1909
1910
|
rt(
|
|
1910
1911
|
D,
|
|
1911
1912
|
y,
|
|
1912
|
-
|
|
1913
|
-
|
|
1913
|
+
n.boxMargin + n.boxTextMargin,
|
|
1914
|
+
n.boxMargin,
|
|
1914
1915
|
(k) => x.addSectionToLoop(k)
|
|
1915
1916
|
);
|
|
1916
1917
|
break;
|
|
1917
1918
|
case s.db.LINETYPE.ALT_END:
|
|
1918
|
-
_ = x.endLoop(), await C.drawLoop(
|
|
1919
|
+
_ = x.endLoop(), await C.drawLoop(a, _, "alt", n), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
|
|
1919
1920
|
break;
|
|
1920
1921
|
case s.db.LINETYPE.PAR_START:
|
|
1921
1922
|
case s.db.LINETYPE.PAR_OVER_START:
|
|
1922
1923
|
rt(
|
|
1923
1924
|
D,
|
|
1924
1925
|
y,
|
|
1925
|
-
|
|
1926
|
-
|
|
1926
|
+
n.boxMargin,
|
|
1927
|
+
n.boxMargin + n.boxTextMargin,
|
|
1927
1928
|
(k) => x.newLoop(k)
|
|
1928
1929
|
), x.saveVerticalPos();
|
|
1929
1930
|
break;
|
|
@@ -1931,13 +1932,13 @@ var ns = /* @__PURE__ */ u(async function(e, t, c, s) {
|
|
|
1931
1932
|
rt(
|
|
1932
1933
|
D,
|
|
1933
1934
|
y,
|
|
1934
|
-
|
|
1935
|
-
|
|
1935
|
+
n.boxMargin + n.boxTextMargin,
|
|
1936
|
+
n.boxMargin,
|
|
1936
1937
|
(k) => x.addSectionToLoop(k)
|
|
1937
1938
|
);
|
|
1938
1939
|
break;
|
|
1939
1940
|
case s.db.LINETYPE.PAR_END:
|
|
1940
|
-
_ = x.endLoop(), await C.drawLoop(
|
|
1941
|
+
_ = x.endLoop(), await C.drawLoop(a, _, "par", n), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
|
|
1941
1942
|
break;
|
|
1942
1943
|
case s.db.LINETYPE.AUTONUMBER:
|
|
1943
1944
|
q = y.message.start || q, X = y.message.step || X, y.message.visible ? s.db.enableSequenceNumbers() : s.db.disableSequenceNumbers();
|
|
@@ -1946,8 +1947,8 @@ var ns = /* @__PURE__ */ u(async function(e, t, c, s) {
|
|
|
1946
1947
|
rt(
|
|
1947
1948
|
D,
|
|
1948
1949
|
y,
|
|
1949
|
-
|
|
1950
|
-
|
|
1950
|
+
n.boxMargin,
|
|
1951
|
+
n.boxMargin + n.boxTextMargin,
|
|
1951
1952
|
(k) => x.newLoop(k)
|
|
1952
1953
|
);
|
|
1953
1954
|
break;
|
|
@@ -1955,31 +1956,31 @@ var ns = /* @__PURE__ */ u(async function(e, t, c, s) {
|
|
|
1955
1956
|
rt(
|
|
1956
1957
|
D,
|
|
1957
1958
|
y,
|
|
1958
|
-
|
|
1959
|
-
|
|
1959
|
+
n.boxMargin + n.boxTextMargin,
|
|
1960
|
+
n.boxMargin,
|
|
1960
1961
|
(k) => x.addSectionToLoop(k)
|
|
1961
1962
|
);
|
|
1962
1963
|
break;
|
|
1963
1964
|
case s.db.LINETYPE.CRITICAL_END:
|
|
1964
|
-
_ = x.endLoop(), await C.drawLoop(
|
|
1965
|
+
_ = x.endLoop(), await C.drawLoop(a, _, "critical", n), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
|
|
1965
1966
|
break;
|
|
1966
1967
|
case s.db.LINETYPE.BREAK_START:
|
|
1967
1968
|
rt(
|
|
1968
1969
|
D,
|
|
1969
1970
|
y,
|
|
1970
|
-
|
|
1971
|
-
|
|
1971
|
+
n.boxMargin,
|
|
1972
|
+
n.boxMargin + n.boxTextMargin,
|
|
1972
1973
|
(k) => x.newLoop(k)
|
|
1973
1974
|
);
|
|
1974
1975
|
break;
|
|
1975
1976
|
case s.db.LINETYPE.BREAK_END:
|
|
1976
|
-
_ = x.endLoop(), await C.drawLoop(
|
|
1977
|
+
_ = x.endLoop(), await C.drawLoop(a, _, "break", n), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
|
|
1977
1978
|
break;
|
|
1978
1979
|
default:
|
|
1979
1980
|
try {
|
|
1980
1981
|
at = y.msgModel, at.starty = x.getVerticalPos(), at.sequenceIndex = q, at.sequenceVisible = s.db.showSequenceNumbers();
|
|
1981
|
-
const k = await
|
|
1982
|
-
|
|
1982
|
+
const k = await re(a, at);
|
|
1983
|
+
oe(
|
|
1983
1984
|
y,
|
|
1984
1985
|
at,
|
|
1985
1986
|
k,
|
|
@@ -2005,147 +2006,147 @@ var ns = /* @__PURE__ */ u(async function(e, t, c, s) {
|
|
|
2005
2006
|
s.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
2006
2007
|
].includes(y.type) && (q = q + X), H++;
|
|
2007
2008
|
}
|
|
2008
|
-
G.debug("createdActors", E), G.debug("destroyedActors", g), await
|
|
2009
|
+
G.debug("createdActors", E), G.debug("destroyedActors", g), await Bt(a, f, m, false);
|
|
2009
2010
|
for (const y of tt)
|
|
2010
|
-
await
|
|
2011
|
-
|
|
2011
|
+
await as(a, y.messageModel, y.lineStartY, s);
|
|
2012
|
+
n.mirrorActors && await Bt(a, f, m, true), z.forEach((y) => C.drawBackgroundRect(a, y)), ee(a, f, m, n);
|
|
2012
2013
|
for (const y of x.models.boxes)
|
|
2013
|
-
y.height = x.getVerticalPos() - y.y, x.insert(y.x, y.y, y.x + y.width, y.height), y.startx = y.x, y.starty = y.y, y.stopx = y.startx + y.width, y.stopy = y.starty + y.height, y.stroke = "rgb(0,0,0, 0.5)", C.drawBox(
|
|
2014
|
-
O && x.bumpVerticalPos(
|
|
2015
|
-
const W =
|
|
2014
|
+
y.height = x.getVerticalPos() - y.y, x.insert(y.x, y.y, y.x + y.width, y.height), y.startx = y.x, y.starty = y.y, y.stopx = y.startx + y.width, y.stopy = y.starty + y.height, y.stroke = "rgb(0,0,0, 0.5)", C.drawBox(a, y, n);
|
|
2015
|
+
O && x.bumpVerticalPos(n.boxMargin);
|
|
2016
|
+
const W = ie(a, f, m, d), { bounds: M } = x.getBounds();
|
|
2016
2017
|
M.startx === void 0 && (M.startx = 0), M.starty === void 0 && (M.starty = 0), M.stopx === void 0 && (M.stopx = 0), M.stopy === void 0 && (M.stopy = 0);
|
|
2017
2018
|
let J = M.stopy - M.starty;
|
|
2018
2019
|
J < W.maxHeight && (J = W.maxHeight);
|
|
2019
|
-
let K = J + 2 *
|
|
2020
|
-
|
|
2020
|
+
let K = J + 2 * n.diagramMarginY;
|
|
2021
|
+
n.mirrorActors && (K = K - n.boxMargin + n.bottomMarginAdj);
|
|
2021
2022
|
let Z = M.stopx - M.startx;
|
|
2022
2023
|
Z < W.maxWidth && (Z = W.maxWidth);
|
|
2023
|
-
const et = Z + 2 *
|
|
2024
|
-
A &&
|
|
2024
|
+
const et = Z + 2 * n.diagramMarginX;
|
|
2025
|
+
A && a.append("text").text(A).attr("x", (M.stopx - M.startx) / 2 - 2 * n.diagramMarginX).attr("y", -25), me(a, K, et, n.useMaxWidth);
|
|
2025
2026
|
const N = A ? 40 : 0;
|
|
2026
|
-
|
|
2027
|
+
a.attr(
|
|
2027
2028
|
"viewBox",
|
|
2028
|
-
M.startx -
|
|
2029
|
+
M.startx - n.diagramMarginX + " -" + (n.diagramMarginY + N) + " " + et + " " + (K + N)
|
|
2029
2030
|
), G.debug("models:", x.models);
|
|
2030
2031
|
}, "draw");
|
|
2031
|
-
async function
|
|
2032
|
+
async function ce(t, e, c) {
|
|
2032
2033
|
const s = {};
|
|
2033
|
-
for (const
|
|
2034
|
-
if (
|
|
2035
|
-
const i =
|
|
2036
|
-
if (
|
|
2034
|
+
for (const r of e)
|
|
2035
|
+
if (t.get(r.to) && t.get(r.from)) {
|
|
2036
|
+
const i = t.get(r.to);
|
|
2037
|
+
if (r.placement === c.db.PLACEMENT.LEFTOF && !i.prevActor || r.placement === c.db.PLACEMENT.RIGHTOF && !i.nextActor)
|
|
2037
2038
|
continue;
|
|
2038
|
-
const
|
|
2039
|
-
h &&
|
|
2040
|
-
s[
|
|
2039
|
+
const o = r.placement !== void 0, h = !o, d = o ? xt(n) : gt(n), a = r.wrap ? Y.wrapLabel(r.message, n.width - 2 * n.wrapPadding, d) : r.message, E = (ot(a) ? await Et(r.message, $()) : Y.calculateTextDimensions(a, d)).width + 2 * n.wrapPadding;
|
|
2040
|
+
h && r.from === i.nextActor ? s[r.to] = v.getMax(
|
|
2041
|
+
s[r.to] || 0,
|
|
2041
2042
|
E
|
|
2042
|
-
) : h &&
|
|
2043
|
-
s[
|
|
2043
|
+
) : h && r.from === i.prevActor ? s[r.from] = v.getMax(
|
|
2044
|
+
s[r.from] || 0,
|
|
2044
2045
|
E
|
|
2045
|
-
) : h &&
|
|
2046
|
-
s[
|
|
2046
|
+
) : h && r.from === r.to ? (s[r.from] = v.getMax(
|
|
2047
|
+
s[r.from] || 0,
|
|
2047
2048
|
E / 2
|
|
2048
|
-
), s[
|
|
2049
|
-
s[
|
|
2049
|
+
), s[r.to] = v.getMax(
|
|
2050
|
+
s[r.to] || 0,
|
|
2050
2051
|
E / 2
|
|
2051
|
-
)) :
|
|
2052
|
-
s[
|
|
2052
|
+
)) : r.placement === c.db.PLACEMENT.RIGHTOF ? s[r.from] = v.getMax(
|
|
2053
|
+
s[r.from] || 0,
|
|
2053
2054
|
E
|
|
2054
|
-
) :
|
|
2055
|
+
) : r.placement === c.db.PLACEMENT.LEFTOF ? s[i.prevActor] = v.getMax(
|
|
2055
2056
|
s[i.prevActor] || 0,
|
|
2056
2057
|
E
|
|
2057
|
-
) :
|
|
2058
|
+
) : r.placement === c.db.PLACEMENT.OVER && (i.prevActor && (s[i.prevActor] = v.getMax(
|
|
2058
2059
|
s[i.prevActor] || 0,
|
|
2059
2060
|
E / 2
|
|
2060
|
-
)), i.nextActor && (s[
|
|
2061
|
-
s[
|
|
2061
|
+
)), i.nextActor && (s[r.from] = v.getMax(
|
|
2062
|
+
s[r.from] || 0,
|
|
2062
2063
|
E / 2
|
|
2063
2064
|
)));
|
|
2064
2065
|
}
|
|
2065
2066
|
return G.debug("maxMessageWidthPerActor:", s), s;
|
|
2066
2067
|
}
|
|
2067
|
-
u(
|
|
2068
|
-
var
|
|
2069
|
-
let
|
|
2070
|
-
const c =
|
|
2071
|
-
for (const s in
|
|
2072
|
-
const i = Y.calculateTextDimensions(s, c).width + 2 *
|
|
2073
|
-
|
|
2074
|
-
}
|
|
2075
|
-
return
|
|
2068
|
+
u(ce, "getMaxMessageWidthPerActor");
|
|
2069
|
+
var ns = /* @__PURE__ */ u(function(t) {
|
|
2070
|
+
let e = 0;
|
|
2071
|
+
const c = Ot(n);
|
|
2072
|
+
for (const s in t.links) {
|
|
2073
|
+
const i = Y.calculateTextDimensions(s, c).width + 2 * n.wrapPadding + 2 * n.boxMargin;
|
|
2074
|
+
e < i && (e = i);
|
|
2075
|
+
}
|
|
2076
|
+
return e;
|
|
2076
2077
|
}, "getRequiredPopupWidth");
|
|
2077
|
-
async function
|
|
2078
|
+
async function le(t, e, c) {
|
|
2078
2079
|
let s = 0;
|
|
2079
|
-
for (const i of
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2080
|
+
for (const i of t.keys()) {
|
|
2081
|
+
const o = t.get(i);
|
|
2082
|
+
o.wrap && (o.description = Y.wrapLabel(
|
|
2083
|
+
o.description,
|
|
2084
|
+
n.width - 2 * n.wrapPadding,
|
|
2085
|
+
Ot(n)
|
|
2085
2086
|
));
|
|
2086
|
-
const h = ot(
|
|
2087
|
-
|
|
2087
|
+
const h = ot(o.description) ? await Et(o.description, $()) : Y.calculateTextDimensions(o.description, Ot(n));
|
|
2088
|
+
o.width = o.wrap ? n.width : v.getMax(n.width, h.width + 2 * n.wrapPadding), o.height = o.wrap ? v.getMax(h.height, n.height) : n.height, s = v.getMax(s, o.height);
|
|
2088
2089
|
}
|
|
2089
|
-
for (const i in
|
|
2090
|
-
const
|
|
2091
|
-
if (!
|
|
2090
|
+
for (const i in e) {
|
|
2091
|
+
const o = t.get(i);
|
|
2092
|
+
if (!o)
|
|
2092
2093
|
continue;
|
|
2093
|
-
const h =
|
|
2094
|
+
const h = t.get(o.nextActor);
|
|
2094
2095
|
if (!h) {
|
|
2095
|
-
const E =
|
|
2096
|
-
|
|
2096
|
+
const E = e[i] + n.actorMargin - o.width / 2;
|
|
2097
|
+
o.margin = v.getMax(E, n.actorMargin);
|
|
2097
2098
|
continue;
|
|
2098
2099
|
}
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2100
|
+
const a = e[i] + n.actorMargin - o.width / 2 - h.width / 2;
|
|
2101
|
+
o.margin = v.getMax(a, n.actorMargin);
|
|
2101
2102
|
}
|
|
2102
|
-
let
|
|
2103
|
+
let r = 0;
|
|
2103
2104
|
return c.forEach((i) => {
|
|
2104
|
-
const
|
|
2105
|
-
let h = i.actorKeys.reduce((f, E) => f +=
|
|
2106
|
-
h -= 2 *
|
|
2107
|
-
const d = Y.calculateTextDimensions(i.name,
|
|
2108
|
-
|
|
2109
|
-
const
|
|
2110
|
-
if (i.margin =
|
|
2111
|
-
const f = (
|
|
2105
|
+
const o = gt(n);
|
|
2106
|
+
let h = i.actorKeys.reduce((f, E) => f += t.get(E).width + (t.get(E).margin || 0), 0);
|
|
2107
|
+
h -= 2 * n.boxTextMargin, i.wrap && (i.name = Y.wrapLabel(i.name, h - 2 * n.wrapPadding, o));
|
|
2108
|
+
const d = Y.calculateTextDimensions(i.name, o);
|
|
2109
|
+
r = v.getMax(d.height, r);
|
|
2110
|
+
const a = v.getMax(h, d.width + 2 * n.wrapPadding);
|
|
2111
|
+
if (i.margin = n.boxTextMargin, h < a) {
|
|
2112
|
+
const f = (a - h) / 2;
|
|
2112
2113
|
i.margin += f;
|
|
2113
2114
|
}
|
|
2114
|
-
}), c.forEach((i) => i.textMaxHeight =
|
|
2115
|
+
}), c.forEach((i) => i.textMaxHeight = r), v.getMax(s, n.height);
|
|
2115
2116
|
}
|
|
2116
|
-
u(
|
|
2117
|
-
var
|
|
2118
|
-
const s =
|
|
2119
|
-
let d = ot(
|
|
2120
|
-
h ? Y.wrapLabel(
|
|
2121
|
-
xt(
|
|
2117
|
+
u(le, "calculateActorMargins");
|
|
2118
|
+
var os = /* @__PURE__ */ u(async function(t, e, c) {
|
|
2119
|
+
const s = e.get(t.from), r = e.get(t.to), i = s.x, o = r.x, h = t.wrap && t.message;
|
|
2120
|
+
let d = ot(t.message) ? await Et(t.message, $()) : Y.calculateTextDimensions(
|
|
2121
|
+
h ? Y.wrapLabel(t.message, n.width, xt(n)) : t.message,
|
|
2122
|
+
xt(n)
|
|
2122
2123
|
);
|
|
2123
|
-
const
|
|
2124
|
-
width: h ?
|
|
2124
|
+
const a = {
|
|
2125
|
+
width: h ? n.width : v.getMax(n.width, d.width + 2 * n.noteMargin),
|
|
2125
2126
|
height: 0,
|
|
2126
2127
|
startx: s.x,
|
|
2127
2128
|
stopx: 0,
|
|
2128
2129
|
starty: 0,
|
|
2129
2130
|
stopy: 0,
|
|
2130
|
-
message:
|
|
2131
|
+
message: t.message
|
|
2131
2132
|
};
|
|
2132
|
-
return
|
|
2133
|
-
s.width / 2 +
|
|
2134
|
-
d.width + 2 *
|
|
2135
|
-
),
|
|
2136
|
-
s.width / 2 +
|
|
2137
|
-
d.width + 2 *
|
|
2138
|
-
),
|
|
2139
|
-
h ? Y.wrapLabel(
|
|
2140
|
-
xt(
|
|
2141
|
-
),
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
xt(
|
|
2133
|
+
return t.placement === c.db.PLACEMENT.RIGHTOF ? (a.width = h ? v.getMax(n.width, d.width) : v.getMax(
|
|
2134
|
+
s.width / 2 + r.width / 2,
|
|
2135
|
+
d.width + 2 * n.noteMargin
|
|
2136
|
+
), a.startx = i + (s.width + n.actorMargin) / 2) : t.placement === c.db.PLACEMENT.LEFTOF ? (a.width = h ? v.getMax(n.width, d.width + 2 * n.noteMargin) : v.getMax(
|
|
2137
|
+
s.width / 2 + r.width / 2,
|
|
2138
|
+
d.width + 2 * n.noteMargin
|
|
2139
|
+
), a.startx = i - a.width + (s.width - n.actorMargin) / 2) : t.to === t.from ? (d = Y.calculateTextDimensions(
|
|
2140
|
+
h ? Y.wrapLabel(t.message, v.getMax(n.width, s.width), xt(n)) : t.message,
|
|
2141
|
+
xt(n)
|
|
2142
|
+
), a.width = h ? v.getMax(n.width, s.width) : v.getMax(s.width, n.width, d.width + 2 * n.noteMargin), a.startx = i + (s.width - a.width) / 2) : (a.width = Math.abs(i + s.width / 2 - (o + r.width / 2)) + n.actorMargin, a.startx = i < o ? i + s.width / 2 - n.actorMargin / 2 : o + r.width / 2 - n.actorMargin / 2), h && (a.message = Y.wrapLabel(
|
|
2143
|
+
t.message,
|
|
2144
|
+
a.width - 2 * n.wrapPadding,
|
|
2145
|
+
xt(n)
|
|
2145
2146
|
)), G.debug(
|
|
2146
|
-
`NM:[${
|
|
2147
|
-
),
|
|
2148
|
-
}, "buildNoteModel"),
|
|
2147
|
+
`NM:[${a.startx},${a.stopx},${a.starty},${a.stopy}:${a.width},${a.height}=${t.message}]`
|
|
2148
|
+
), a;
|
|
2149
|
+
}, "buildNoteModel"), cs = /* @__PURE__ */ u(function(t, e, c) {
|
|
2149
2150
|
if (![
|
|
2150
2151
|
c.db.LINETYPE.SOLID_OPEN,
|
|
2151
2152
|
c.db.LINETYPE.DOTTED_OPEN,
|
|
@@ -2157,43 +2158,43 @@ var cs = /* @__PURE__ */ u(async function(e, t, c) {
|
|
|
2157
2158
|
c.db.LINETYPE.DOTTED_POINT,
|
|
2158
2159
|
c.db.LINETYPE.BIDIRECTIONAL_SOLID,
|
|
2159
2160
|
c.db.LINETYPE.BIDIRECTIONAL_DOTTED
|
|
2160
|
-
].includes(
|
|
2161
|
+
].includes(t.type))
|
|
2161
2162
|
return {};
|
|
2162
|
-
const [s,
|
|
2163
|
-
let d = h ?
|
|
2164
|
-
const f = Math.abs(i -
|
|
2165
|
-
|
|
2166
|
-
|
|
2163
|
+
const [s, r] = Xt(t.from, e), [i, o] = Xt(t.to, e), h = s <= i;
|
|
2164
|
+
let d = h ? r : s, a = h ? i : o;
|
|
2165
|
+
const f = Math.abs(i - o) > 2, E = /* @__PURE__ */ u((I) => h ? -I : I, "adjustValue");
|
|
2166
|
+
t.from === t.to ? a = d : (t.activate && !f && (a += E(n.activationWidth / 2 - 1)), [c.db.LINETYPE.SOLID_OPEN, c.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (a += E(3)), [c.db.LINETYPE.BIDIRECTIONAL_SOLID, c.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(
|
|
2167
|
+
t.type
|
|
2167
2168
|
) && (d -= E(3)));
|
|
2168
|
-
const g = [s,
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
gt(
|
|
2169
|
+
const g = [s, r, i, o], T = Math.abs(d - a);
|
|
2170
|
+
t.wrap && t.message && (t.message = Y.wrapLabel(
|
|
2171
|
+
t.message,
|
|
2172
|
+
v.getMax(T + 2 * n.wrapPadding, n.width),
|
|
2173
|
+
gt(n)
|
|
2173
2174
|
));
|
|
2174
|
-
const m = Y.calculateTextDimensions(
|
|
2175
|
+
const m = Y.calculateTextDimensions(t.message, gt(n));
|
|
2175
2176
|
return {
|
|
2176
|
-
width:
|
|
2177
|
-
|
|
2178
|
-
T + 2 *
|
|
2179
|
-
|
|
2177
|
+
width: v.getMax(
|
|
2178
|
+
t.wrap ? 0 : m.width + 2 * n.wrapPadding,
|
|
2179
|
+
T + 2 * n.wrapPadding,
|
|
2180
|
+
n.width
|
|
2180
2181
|
),
|
|
2181
2182
|
height: 0,
|
|
2182
2183
|
startx: d,
|
|
2183
|
-
stopx:
|
|
2184
|
+
stopx: a,
|
|
2184
2185
|
starty: 0,
|
|
2185
2186
|
stopy: 0,
|
|
2186
|
-
message:
|
|
2187
|
-
type:
|
|
2188
|
-
wrap:
|
|
2187
|
+
message: t.message,
|
|
2188
|
+
type: t.type,
|
|
2189
|
+
wrap: t.wrap,
|
|
2189
2190
|
fromBounds: Math.min.apply(null, g),
|
|
2190
2191
|
toBounds: Math.max.apply(null, g)
|
|
2191
2192
|
};
|
|
2192
|
-
}, "buildMessageModel"),
|
|
2193
|
-
const
|
|
2194
|
-
let
|
|
2195
|
-
for (const
|
|
2196
|
-
switch (
|
|
2193
|
+
}, "buildMessageModel"), ls = /* @__PURE__ */ u(async function(t, e, c, s) {
|
|
2194
|
+
const r = {}, i = [];
|
|
2195
|
+
let o, h, d;
|
|
2196
|
+
for (const a of t) {
|
|
2197
|
+
switch (a.type) {
|
|
2197
2198
|
case s.db.LINETYPE.LOOP_START:
|
|
2198
2199
|
case s.db.LINETYPE.ALT_START:
|
|
2199
2200
|
case s.db.LINETYPE.OPT_START:
|
|
@@ -2202,8 +2203,8 @@ var cs = /* @__PURE__ */ u(async function(e, t, c) {
|
|
|
2202
2203
|
case s.db.LINETYPE.CRITICAL_START:
|
|
2203
2204
|
case s.db.LINETYPE.BREAK_START:
|
|
2204
2205
|
i.push({
|
|
2205
|
-
id:
|
|
2206
|
-
msg:
|
|
2206
|
+
id: a.id,
|
|
2207
|
+
msg: a.message,
|
|
2207
2208
|
from: Number.MAX_SAFE_INTEGER,
|
|
2208
2209
|
to: Number.MIN_SAFE_INTEGER,
|
|
2209
2210
|
width: 0
|
|
@@ -2212,7 +2213,7 @@ var cs = /* @__PURE__ */ u(async function(e, t, c) {
|
|
|
2212
2213
|
case s.db.LINETYPE.ALT_ELSE:
|
|
2213
2214
|
case s.db.LINETYPE.PAR_AND:
|
|
2214
2215
|
case s.db.LINETYPE.CRITICAL_OPTION:
|
|
2215
|
-
|
|
2216
|
+
a.message && (o = i.pop(), r[o.id] = o, r[a.id] = o, i.push(o));
|
|
2216
2217
|
break;
|
|
2217
2218
|
case s.db.LINETYPE.LOOP_END:
|
|
2218
2219
|
case s.db.LINETYPE.ALT_END:
|
|
@@ -2220,62 +2221,62 @@ var cs = /* @__PURE__ */ u(async function(e, t, c) {
|
|
|
2220
2221
|
case s.db.LINETYPE.PAR_END:
|
|
2221
2222
|
case s.db.LINETYPE.CRITICAL_END:
|
|
2222
2223
|
case s.db.LINETYPE.BREAK_END:
|
|
2223
|
-
|
|
2224
|
+
o = i.pop(), r[o.id] = o;
|
|
2224
2225
|
break;
|
|
2225
2226
|
case s.db.LINETYPE.ACTIVE_START:
|
|
2226
2227
|
{
|
|
2227
|
-
const E =
|
|
2228
|
+
const E = e.get(a.from ? a.from : a.to.actor), g = At(a.from ? a.from : a.to.actor).length, T = E.x + E.width / 2 + (g - 1) * n.activationWidth / 2, m = {
|
|
2228
2229
|
startx: T,
|
|
2229
|
-
stopx: T +
|
|
2230
|
-
actor:
|
|
2231
|
-
enabled:
|
|
2230
|
+
stopx: T + n.activationWidth,
|
|
2231
|
+
actor: a.from,
|
|
2232
|
+
enabled: true
|
|
2232
2233
|
};
|
|
2233
2234
|
x.activations.push(m);
|
|
2234
2235
|
}
|
|
2235
2236
|
break;
|
|
2236
2237
|
case s.db.LINETYPE.ACTIVE_END:
|
|
2237
2238
|
{
|
|
2238
|
-
const E = x.activations.map((g) => g.actor).lastIndexOf(
|
|
2239
|
+
const E = x.activations.map((g) => g.actor).lastIndexOf(a.from);
|
|
2239
2240
|
x.activations.splice(E, 1).splice(0, 1);
|
|
2240
2241
|
}
|
|
2241
2242
|
break;
|
|
2242
2243
|
}
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
})) : (d =
|
|
2246
|
-
if (
|
|
2247
|
-
const g =
|
|
2248
|
-
|
|
2244
|
+
a.placement !== void 0 ? (h = await os(a, e, s), a.noteModel = h, i.forEach((E) => {
|
|
2245
|
+
o = E, o.from = v.getMin(o.from, h.startx), o.to = v.getMax(o.to, h.startx + h.width), o.width = v.getMax(o.width, Math.abs(o.from - o.to)) - n.labelBoxWidth;
|
|
2246
|
+
})) : (d = cs(a, e, s), a.msgModel = d, d.startx && d.stopx && i.length > 0 && i.forEach((E) => {
|
|
2247
|
+
if (o = E, d.startx === d.stopx) {
|
|
2248
|
+
const g = e.get(a.from), T = e.get(a.to);
|
|
2249
|
+
o.from = v.getMin(
|
|
2249
2250
|
g.x - d.width / 2,
|
|
2250
2251
|
g.x - g.width / 2,
|
|
2251
|
-
|
|
2252
|
-
),
|
|
2252
|
+
o.from
|
|
2253
|
+
), o.to = v.getMax(
|
|
2253
2254
|
T.x + d.width / 2,
|
|
2254
2255
|
T.x + g.width / 2,
|
|
2255
|
-
|
|
2256
|
-
),
|
|
2256
|
+
o.to
|
|
2257
|
+
), o.width = v.getMax(o.width, Math.abs(o.to - o.from)) - n.labelBoxWidth;
|
|
2257
2258
|
} else
|
|
2258
|
-
|
|
2259
|
+
o.from = v.getMin(d.startx, o.from), o.to = v.getMax(d.stopx, o.to), o.width = v.getMax(o.width, d.width) - n.labelBoxWidth;
|
|
2259
2260
|
}));
|
|
2260
2261
|
}
|
|
2261
|
-
return x.activations = [], G.debug("Loop type widths:",
|
|
2262
|
-
}, "calculateLoopBounds"),
|
|
2262
|
+
return x.activations = [], G.debug("Loop type widths:", r), r;
|
|
2263
|
+
}, "calculateLoopBounds"), hs = {
|
|
2263
2264
|
bounds: x,
|
|
2264
|
-
drawActors:
|
|
2265
|
-
drawActorsPopup:
|
|
2266
|
-
setConf:
|
|
2267
|
-
draw:
|
|
2268
|
-
},
|
|
2269
|
-
parser:
|
|
2265
|
+
drawActors: Bt,
|
|
2266
|
+
drawActorsPopup: ie,
|
|
2267
|
+
setConf: ne,
|
|
2268
|
+
draw: is
|
|
2269
|
+
}, gs = {
|
|
2270
|
+
parser: Ne,
|
|
2270
2271
|
get db() {
|
|
2271
|
-
return new
|
|
2272
|
+
return new De();
|
|
2272
2273
|
},
|
|
2273
|
-
renderer:
|
|
2274
|
-
styles:
|
|
2275
|
-
init: /* @__PURE__ */ u((
|
|
2276
|
-
|
|
2274
|
+
renderer: hs,
|
|
2275
|
+
styles: Oe,
|
|
2276
|
+
init: /* @__PURE__ */ u((t) => {
|
|
2277
|
+
t.sequence || (t.sequence = {}), t.wrap && (t.sequence.wrap = t.wrap, be({ sequence: { wrap: t.wrap } }));
|
|
2277
2278
|
}, "init")
|
|
2278
2279
|
};
|
|
2279
2280
|
export {
|
|
2280
|
-
|
|
2281
|
+
gs as diagram
|
|
2281
2282
|
};
|