lowcoder-comps 0.0.7 → 0.0.8

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.
Files changed (79) hide show
  1. package/icons/icon-chart.svg +15 -0
  2. package/icons/icon-comp-calendar.svg +22 -0
  3. package/index.html +26 -0
  4. package/index.tsx +19 -0
  5. package/jest.config.js +5 -0
  6. package/package/012a06bb.js +34 -0
  7. package/package/06481cb7.js +1060 -0
  8. package/package/0c8b29d5.js +6 -0
  9. package/package/114884df.js +805 -0
  10. package/package/1264ddb2.js +194 -0
  11. package/package/1cee31ec.js +1095 -0
  12. package/package/269c3ba3.js +46662 -0
  13. package/package/2a2c2e55.js +799 -0
  14. package/package/2b3ab1e4.js +98763 -0
  15. package/package/37590a81.js +967 -0
  16. package/package/3cd7980e.js +184 -0
  17. package/package/40112498.js +424 -0
  18. package/package/4b6e1d6f.js +24 -0
  19. package/package/4bc1082b.js +86 -0
  20. package/package/53e49f9b.js +1600 -0
  21. package/package/55bd5c26.js +266 -0
  22. package/package/591684c8.js +2071 -0
  23. package/package/6c000872.js +16 -0
  24. package/package/756addec.js +775 -0
  25. package/package/7668124e.js +8 -0
  26. package/package/79e8eeeb.js +949 -0
  27. package/package/926fbfec.js +91 -0
  28. package/package/945eefb3.js +2665 -0
  29. package/package/a35f148e.js +1228 -0
  30. package/package/a4d12a43.js +175 -0
  31. package/package/a60de5d1.js +804 -0
  32. package/package/a8dde1ea.js +589 -0
  33. package/package/b4148642.js +7 -0
  34. package/package/b7dd22a2.js +847 -0
  35. package/package/d4f3a2c4.js +18046 -0
  36. package/package/e0f479f3.js +91 -0
  37. package/package/eaa160c9.js +341 -0
  38. package/package/f1bfd8b5.js +311 -0
  39. package/package/f1f9ba79.js +900 -0
  40. package/package/fba61f63.js +2868 -0
  41. package/package/icons/icon-chart.svg +15 -0
  42. package/package/icons/icon-comp-calendar.svg +22 -0
  43. package/package/index.js +5 -0
  44. package/package/package.json +73 -0
  45. package/package.json +1 -4
  46. package/src/__test__/allComp.test.tsx +61 -0
  47. package/src/app-env.d.ts +3 -0
  48. package/src/comps/calendarComp/calendarComp.tsx +442 -0
  49. package/src/comps/calendarComp/calendarConstants.tsx +897 -0
  50. package/src/comps/chartComp/chartComp.tsx +249 -0
  51. package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +51 -0
  52. package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +307 -0
  53. package/src/comps/chartComp/chartConfigs/chartUrls.tsx +6 -0
  54. package/src/comps/chartComp/chartConfigs/legendConfig.tsx +55 -0
  55. package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +96 -0
  56. package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +83 -0
  57. package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +62 -0
  58. package/src/comps/chartComp/chartConstants.tsx +243 -0
  59. package/src/comps/chartComp/chartPropertyView.tsx +161 -0
  60. package/src/comps/chartComp/chartUtils.ts +240 -0
  61. package/src/comps/chartComp/reactEcharts/core.tsx +187 -0
  62. package/src/comps/chartComp/reactEcharts/index.ts +20 -0
  63. package/src/comps/chartComp/reactEcharts/types.ts +70 -0
  64. package/src/comps/chartComp/seriesComp.tsx +119 -0
  65. package/src/comps/imageEditorComp/imageEditorClass.tsx +52 -0
  66. package/src/comps/imageEditorComp/imageEditorConstants.tsx +109 -0
  67. package/src/comps/imageEditorComp/index.tsx +184 -0
  68. package/src/comps/mermaidComp/index.tsx +44 -0
  69. package/src/comps/mermaidComp/mermaid.tsx +29 -0
  70. package/src/global.ts +1 -0
  71. package/src/i18n/comps/index.tsx +29 -0
  72. package/src/i18n/comps/locales/en.ts +142 -0
  73. package/src/i18n/comps/locales/enObj.tsx +120 -0
  74. package/src/i18n/comps/locales/index.ts +7 -0
  75. package/src/i18n/comps/locales/types.tsx +9 -0
  76. package/src/i18n/comps/locales/zh.ts +4 -0
  77. package/src/i18n/comps/locales/zhObj.tsx +4 -0
  78. package/src/index.ts +11 -0
  79. package/vite.config.js +10 -0
@@ -0,0 +1,2071 @@
1
+ import { g as be, x as we, v as ve, c as ct, s as te, b as _e, a as ke, m as Le, z as Pe, l as K, d as kt, e as Ie, h as _t, i as Ne, y as C, j as Lt, k as Pt, an as ee, aA as Ae } from "./2b3ab1e4.js";
2
+ import { s as Se } from "./b4148642.js";
3
+ var Bt = function() {
4
+ var t = function(rt, m, w, _) {
5
+ for (w = w || {}, _ = rt.length; _--; w[rt[_]] = m)
6
+ ;
7
+ return w;
8
+ }, e = [1, 2], s = [1, 3], i = [1, 5], n = [1, 7], a = [2, 5], o = [1, 15], l = [1, 17], p = [1, 19], h = [1, 21], T = [1, 22], y = [1, 23], u = [1, 29], x = [1, 30], b = [1, 31], k = [1, 32], N = [1, 33], M = [1, 34], P = [1, 35], B = [1, 36], V = [1, 37], z = [1, 38], G = [1, 39], Y = [1, 40], D = [1, 42], X = [1, 43], q = [1, 45], F = [1, 46], H = [1, 47], J = [1, 48], Q = [1, 49], E = [1, 50], L = [1, 53], v = [1, 4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 52, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], U = [4, 5, 21, 54, 56], I = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 54, 56, 57, 62, 63, 64, 65, 73, 83], Kt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], Gt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 52, 54, 56, 57, 62, 63, 64, 65, 73, 83], Xt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 54, 56, 57, 62, 63, 64, 65, 73, 83], at = [71, 72, 73], et = [1, 125], Jt = [1, 4, 5, 7, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 52, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], Mt = {
9
+ trace: function() {
10
+ },
11
+ yy: {},
12
+ symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, box_section: 11, box_line: 12, participant_statement: 13, openDirective: 14, typeDirective: 15, closeDirective: 16, ":": 17, argDirective: 18, box: 19, restOfLine: 20, end: 21, signal: 22, autonumber: 23, NUM: 24, off: 25, activate: 26, actor: 27, deactivate: 28, note_statement: 29, links_statement: 30, link_statement: 31, properties_statement: 32, details_statement: 33, title: 34, legacy_title: 35, acc_title: 36, acc_title_value: 37, acc_descr: 38, acc_descr_value: 39, acc_descr_multiline_value: 40, loop: 41, rect: 42, opt: 43, alt: 44, else_sections: 45, par: 46, par_sections: 47, critical: 48, option_sections: 49, break: 50, option: 51, and: 52, else: 53, participant: 54, AS: 55, participant_actor: 56, note: 57, placement: 58, text2: 59, over: 60, actor_pair: 61, links: 62, link: 63, properties: 64, details: 65, spaceList: 66, ",": 67, left_of: 68, right_of: 69, signaltype: 70, "+": 71, "-": 72, ACTOR: 73, SOLID_OPEN_ARROW: 74, DOTTED_OPEN_ARROW: 75, SOLID_ARROW: 76, DOTTED_ARROW: 77, SOLID_CROSS: 78, DOTTED_CROSS: 79, SOLID_POINT: 80, DOTTED_POINT: 81, TXT: 82, open_directive: 83, type_directive: 84, arg_directive: 85, close_directive: 86, $accept: 0, $end: 1 },
13
+ terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 7: "SD", 17: ":", 19: "box", 20: "restOfLine", 21: "end", 23: "autonumber", 24: "NUM", 25: "off", 26: "activate", 28: "deactivate", 34: "title", 35: "legacy_title", 36: "acc_title", 37: "acc_title_value", 38: "acc_descr", 39: "acc_descr_value", 40: "acc_descr_multiline_value", 41: "loop", 42: "rect", 43: "opt", 44: "alt", 46: "par", 48: "critical", 50: "break", 51: "option", 52: "and", 53: "else", 54: "participant", 55: "AS", 56: "participant_actor", 57: "note", 60: "over", 62: "links", 63: "link", 64: "properties", 65: "details", 67: ",", 68: "left_of", 69: "right_of", 71: "+", 72: "-", 73: "ACTOR", 74: "SOLID_OPEN_ARROW", 75: "DOTTED_OPEN_ARROW", 76: "SOLID_ARROW", 77: "DOTTED_ARROW", 78: "SOLID_CROSS", 79: "DOTTED_CROSS", 80: "SOLID_POINT", 81: "DOTTED_POINT", 82: "TXT", 83: "open_directive", 84: "type_directive", 85: "arg_directive", 86: "close_directive" },
14
+ productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [11, 0], [11, 2], [12, 2], [12, 1], [12, 1], [6, 4], [6, 6], [10, 1], [10, 4], [10, 2], [10, 4], [10, 3], [10, 3], [10, 2], [10, 3], [10, 3], [10, 2], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 1], [49, 1], [49, 4], [47, 1], [47, 4], [45, 1], [45, 4], [13, 5], [13, 3], [13, 5], [13, 3], [29, 4], [29, 4], [30, 3], [31, 3], [32, 3], [33, 3], [66, 2], [66, 1], [61, 3], [61, 1], [58, 1], [58, 1], [22, 5], [22, 5], [22, 4], [27, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [59, 1], [14, 1], [15, 1], [18, 1], [16, 1]],
15
+ performAction: function(m, w, _, g, A, c, Tt) {
16
+ var d = c.length - 1;
17
+ switch (A) {
18
+ case 4:
19
+ return g.apply(c[d]), c[d];
20
+ case 5:
21
+ case 10:
22
+ this.$ = [];
23
+ break;
24
+ case 6:
25
+ case 11:
26
+ c[d - 1].push(c[d]), this.$ = c[d - 1];
27
+ break;
28
+ case 7:
29
+ case 8:
30
+ case 12:
31
+ case 13:
32
+ this.$ = c[d];
33
+ break;
34
+ case 9:
35
+ case 14:
36
+ this.$ = [];
37
+ break;
38
+ case 18:
39
+ c[d - 1].unshift({ type: "boxStart", boxData: g.parseBoxData(c[d - 2]) }), c[d - 1].push({ type: "boxEnd", boxText: c[d - 2] }), this.$ = c[d - 1];
40
+ break;
41
+ case 20:
42
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number(c[d - 2]), sequenceIndexStep: Number(c[d - 1]), sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
43
+ break;
44
+ case 21:
45
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number(c[d - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
46
+ break;
47
+ case 22:
48
+ this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: g.LINETYPE.AUTONUMBER };
49
+ break;
50
+ case 23:
51
+ this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
52
+ break;
53
+ case 24:
54
+ this.$ = { type: "activeStart", signalType: g.LINETYPE.ACTIVE_START, actor: c[d - 1] };
55
+ break;
56
+ case 25:
57
+ this.$ = { type: "activeEnd", signalType: g.LINETYPE.ACTIVE_END, actor: c[d - 1] };
58
+ break;
59
+ case 31:
60
+ g.setDiagramTitle(c[d].substring(6)), this.$ = c[d].substring(6);
61
+ break;
62
+ case 32:
63
+ g.setDiagramTitle(c[d].substring(7)), this.$ = c[d].substring(7);
64
+ break;
65
+ case 33:
66
+ this.$ = c[d].trim(), g.setAccTitle(this.$);
67
+ break;
68
+ case 34:
69
+ case 35:
70
+ this.$ = c[d].trim(), g.setAccDescription(this.$);
71
+ break;
72
+ case 36:
73
+ c[d - 1].unshift({ type: "loopStart", loopText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.LOOP_START }), c[d - 1].push({ type: "loopEnd", loopText: c[d - 2], signalType: g.LINETYPE.LOOP_END }), this.$ = c[d - 1];
74
+ break;
75
+ case 37:
76
+ c[d - 1].unshift({ type: "rectStart", color: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.RECT_START }), c[d - 1].push({ type: "rectEnd", color: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.RECT_END }), this.$ = c[d - 1];
77
+ break;
78
+ case 38:
79
+ c[d - 1].unshift({ type: "optStart", optText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.OPT_START }), c[d - 1].push({ type: "optEnd", optText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.OPT_END }), this.$ = c[d - 1];
80
+ break;
81
+ case 39:
82
+ c[d - 1].unshift({ type: "altStart", altText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.ALT_START }), c[d - 1].push({ type: "altEnd", signalType: g.LINETYPE.ALT_END }), this.$ = c[d - 1];
83
+ break;
84
+ case 40:
85
+ c[d - 1].unshift({ type: "parStart", parText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.PAR_START }), c[d - 1].push({ type: "parEnd", signalType: g.LINETYPE.PAR_END }), this.$ = c[d - 1];
86
+ break;
87
+ case 41:
88
+ c[d - 1].unshift({ type: "criticalStart", criticalText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.CRITICAL_START }), c[d - 1].push({ type: "criticalEnd", signalType: g.LINETYPE.CRITICAL_END }), this.$ = c[d - 1];
89
+ break;
90
+ case 42:
91
+ c[d - 1].unshift({ type: "breakStart", breakText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.BREAK_START }), c[d - 1].push({ type: "breakEnd", optText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.BREAK_END }), this.$ = c[d - 1];
92
+ break;
93
+ case 45:
94
+ this.$ = c[d - 3].concat([{ type: "option", optionText: g.parseMessage(c[d - 1]), signalType: g.LINETYPE.CRITICAL_OPTION }, c[d]]);
95
+ break;
96
+ case 47:
97
+ this.$ = c[d - 3].concat([{ type: "and", parText: g.parseMessage(c[d - 1]), signalType: g.LINETYPE.PAR_AND }, c[d]]);
98
+ break;
99
+ case 49:
100
+ this.$ = c[d - 3].concat([{ type: "else", altText: g.parseMessage(c[d - 1]), signalType: g.LINETYPE.ALT_ELSE }, c[d]]);
101
+ break;
102
+ case 50:
103
+ c[d - 3].type = "addParticipant", c[d - 3].description = g.parseMessage(c[d - 1]), this.$ = c[d - 3];
104
+ break;
105
+ case 51:
106
+ c[d - 1].type = "addParticipant", this.$ = c[d - 1];
107
+ break;
108
+ case 52:
109
+ c[d - 3].type = "addActor", c[d - 3].description = g.parseMessage(c[d - 1]), this.$ = c[d - 3];
110
+ break;
111
+ case 53:
112
+ c[d - 1].type = "addActor", this.$ = c[d - 1];
113
+ break;
114
+ case 54:
115
+ this.$ = [c[d - 1], { type: "addNote", placement: c[d - 2], actor: c[d - 1].actor, text: c[d] }];
116
+ break;
117
+ case 55:
118
+ c[d - 2] = [].concat(c[d - 1], c[d - 1]).slice(0, 2), c[d - 2][0] = c[d - 2][0].actor, c[d - 2][1] = c[d - 2][1].actor, this.$ = [c[d - 1], { type: "addNote", placement: g.PLACEMENT.OVER, actor: c[d - 2].slice(0, 2), text: c[d] }];
119
+ break;
120
+ case 56:
121
+ this.$ = [c[d - 1], { type: "addLinks", actor: c[d - 1].actor, text: c[d] }];
122
+ break;
123
+ case 57:
124
+ this.$ = [c[d - 1], { type: "addALink", actor: c[d - 1].actor, text: c[d] }];
125
+ break;
126
+ case 58:
127
+ this.$ = [c[d - 1], { type: "addProperties", actor: c[d - 1].actor, text: c[d] }];
128
+ break;
129
+ case 59:
130
+ this.$ = [c[d - 1], { type: "addDetails", actor: c[d - 1].actor, text: c[d] }];
131
+ break;
132
+ case 62:
133
+ this.$ = [c[d - 2], c[d]];
134
+ break;
135
+ case 63:
136
+ this.$ = c[d];
137
+ break;
138
+ case 64:
139
+ this.$ = g.PLACEMENT.LEFTOF;
140
+ break;
141
+ case 65:
142
+ this.$ = g.PLACEMENT.RIGHTOF;
143
+ break;
144
+ case 66:
145
+ this.$ = [
146
+ c[d - 4],
147
+ c[d - 1],
148
+ { type: "addMessage", from: c[d - 4].actor, to: c[d - 1].actor, signalType: c[d - 3], msg: c[d] },
149
+ { type: "activeStart", signalType: g.LINETYPE.ACTIVE_START, actor: c[d - 1] }
150
+ ];
151
+ break;
152
+ case 67:
153
+ this.$ = [
154
+ c[d - 4],
155
+ c[d - 1],
156
+ { type: "addMessage", from: c[d - 4].actor, to: c[d - 1].actor, signalType: c[d - 3], msg: c[d] },
157
+ { type: "activeEnd", signalType: g.LINETYPE.ACTIVE_END, actor: c[d - 4] }
158
+ ];
159
+ break;
160
+ case 68:
161
+ this.$ = [c[d - 3], c[d - 1], { type: "addMessage", from: c[d - 3].actor, to: c[d - 1].actor, signalType: c[d - 2], msg: c[d] }];
162
+ break;
163
+ case 69:
164
+ this.$ = { type: "addParticipant", actor: c[d] };
165
+ break;
166
+ case 70:
167
+ this.$ = g.LINETYPE.SOLID_OPEN;
168
+ break;
169
+ case 71:
170
+ this.$ = g.LINETYPE.DOTTED_OPEN;
171
+ break;
172
+ case 72:
173
+ this.$ = g.LINETYPE.SOLID;
174
+ break;
175
+ case 73:
176
+ this.$ = g.LINETYPE.DOTTED;
177
+ break;
178
+ case 74:
179
+ this.$ = g.LINETYPE.SOLID_CROSS;
180
+ break;
181
+ case 75:
182
+ this.$ = g.LINETYPE.DOTTED_CROSS;
183
+ break;
184
+ case 76:
185
+ this.$ = g.LINETYPE.SOLID_POINT;
186
+ break;
187
+ case 77:
188
+ this.$ = g.LINETYPE.DOTTED_POINT;
189
+ break;
190
+ case 78:
191
+ this.$ = g.parseMessage(c[d].trim().substring(1));
192
+ break;
193
+ case 79:
194
+ g.parseDirective("%%{", "open_directive");
195
+ break;
196
+ case 80:
197
+ g.parseDirective(c[d], "type_directive");
198
+ break;
199
+ case 81:
200
+ c[d] = c[d].trim().replace(/'/g, '"'), g.parseDirective(c[d], "arg_directive");
201
+ break;
202
+ case 82:
203
+ g.parseDirective("}%%", "close_directive", "sequence");
204
+ break;
205
+ }
206
+ },
207
+ table: [{ 3: 1, 4: e, 5: s, 6: 4, 7: i, 14: 6, 83: n }, { 1: [3] }, { 3: 8, 4: e, 5: s, 6: 4, 7: i, 14: 6, 83: n }, { 3: 9, 4: e, 5: s, 6: 4, 7: i, 14: 6, 83: n }, { 3: 10, 4: e, 5: s, 6: 4, 7: i, 14: 6, 83: n }, t([1, 4, 5, 19, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 54, 56, 57, 62, 63, 64, 65, 73, 83], a, { 8: 11 }), { 15: 12, 84: [1, 13] }, { 84: [2, 79] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, { 16: 51, 17: [1, 52], 86: L }, t([17, 86], [2, 80]), t(v, [2, 6]), { 6: 41, 10: 54, 13: 18, 14: 6, 19: p, 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, t(v, [2, 8]), t(v, [2, 9]), t(v, [2, 17]), { 20: [1, 55] }, { 5: [1, 56] }, { 5: [1, 59], 24: [1, 57], 25: [1, 58] }, { 27: 60, 73: E }, { 27: 61, 73: E }, { 5: [1, 62] }, { 5: [1, 63] }, { 5: [1, 64] }, { 5: [1, 65] }, { 5: [1, 66] }, t(v, [2, 31]), t(v, [2, 32]), { 37: [1, 67] }, { 39: [1, 68] }, t(v, [2, 35]), { 20: [1, 69] }, { 20: [1, 70] }, { 20: [1, 71] }, { 20: [1, 72] }, { 20: [1, 73] }, { 20: [1, 74] }, { 20: [1, 75] }, t(v, [2, 43]), { 27: 76, 73: E }, { 27: 77, 73: E }, { 70: 78, 74: [1, 79], 75: [1, 80], 76: [1, 81], 77: [1, 82], 78: [1, 83], 79: [1, 84], 80: [1, 85], 81: [1, 86] }, { 58: 87, 60: [1, 88], 68: [1, 89], 69: [1, 90] }, { 27: 91, 73: E }, { 27: 92, 73: E }, { 27: 93, 73: E }, { 27: 94, 73: E }, t([5, 55, 67, 74, 75, 76, 77, 78, 79, 80, 81, 82], [2, 69]), { 5: [1, 95] }, { 18: 96, 85: [1, 97] }, { 5: [2, 82] }, t(v, [2, 7]), t(U, [2, 10], { 11: 98 }), t(v, [2, 19]), { 5: [1, 100], 24: [1, 99] }, { 5: [1, 101] }, t(v, [2, 23]), { 5: [1, 102] }, { 5: [1, 103] }, t(v, [2, 26]), t(v, [2, 27]), t(v, [2, 28]), t(v, [2, 29]), t(v, [2, 30]), t(v, [2, 33]), t(v, [2, 34]), t(I, a, { 8: 104 }), t(I, a, { 8: 105 }), t(I, a, { 8: 106 }), t(Kt, a, { 45: 107, 8: 108 }), t(Gt, a, { 47: 109, 8: 110 }), t(Xt, a, { 49: 111, 8: 112 }), t(I, a, { 8: 113 }), { 5: [1, 115], 55: [1, 114] }, { 5: [1, 117], 55: [1, 116] }, { 27: 120, 71: [1, 118], 72: [1, 119], 73: E }, t(at, [2, 70]), t(at, [2, 71]), t(at, [2, 72]), t(at, [2, 73]), t(at, [2, 74]), t(at, [2, 75]), t(at, [2, 76]), t(at, [2, 77]), { 27: 121, 73: E }, { 27: 123, 61: 122, 73: E }, { 73: [2, 64] }, { 73: [2, 65] }, { 59: 124, 82: et }, { 59: 126, 82: et }, { 59: 127, 82: et }, { 59: 128, 82: et }, t(Jt, [2, 15]), { 16: 129, 86: L }, { 86: [2, 81] }, { 4: [1, 132], 5: [1, 134], 12: 131, 13: 133, 21: [1, 130], 54: D, 56: X }, { 5: [1, 135] }, t(v, [2, 21]), t(v, [2, 22]), t(v, [2, 24]), t(v, [2, 25]), { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [1, 136], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [1, 137], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [1, 138], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, { 21: [1, 139] }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [2, 48], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 53: [1, 140], 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, { 21: [1, 141] }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [2, 46], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 52: [1, 142], 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, { 21: [1, 143] }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [2, 44], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 51: [1, 144], 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: p, 21: [1, 145], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: u, 35: x, 36: b, 38: k, 40: N, 41: M, 42: P, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Q, 73: E, 83: n }, { 20: [1, 146] }, t(v, [2, 51]), { 20: [1, 147] }, t(v, [2, 53]), { 27: 148, 73: E }, { 27: 149, 73: E }, { 59: 150, 82: et }, { 59: 151, 82: et }, { 59: 152, 82: et }, { 67: [1, 153], 82: [2, 63] }, { 5: [2, 56] }, { 5: [2, 78] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: [2, 59] }, { 5: [1, 154] }, t(v, [2, 18]), t(U, [2, 11]), { 13: 155, 54: D, 56: X }, t(U, [2, 13]), t(U, [2, 14]), t(v, [2, 20]), t(v, [2, 36]), t(v, [2, 37]), t(v, [2, 38]), t(v, [2, 39]), { 20: [1, 156] }, t(v, [2, 40]), { 20: [1, 157] }, t(v, [2, 41]), { 20: [1, 158] }, t(v, [2, 42]), { 5: [1, 159] }, { 5: [1, 160] }, { 59: 161, 82: et }, { 59: 162, 82: et }, { 5: [2, 68] }, { 5: [2, 54] }, { 5: [2, 55] }, { 27: 163, 73: E }, t(Jt, [2, 16]), t(U, [2, 12]), t(Kt, a, { 8: 108, 45: 164 }), t(Gt, a, { 8: 110, 47: 165 }), t(Xt, a, { 8: 112, 49: 166 }), t(v, [2, 50]), t(v, [2, 52]), { 5: [2, 66] }, { 5: [2, 67] }, { 82: [2, 62] }, { 21: [2, 49] }, { 21: [2, 47] }, { 21: [2, 45] }],
208
+ defaultActions: { 7: [2, 79], 8: [2, 1], 9: [2, 2], 10: [2, 3], 53: [2, 82], 89: [2, 64], 90: [2, 65], 97: [2, 81], 124: [2, 56], 125: [2, 78], 126: [2, 57], 127: [2, 58], 128: [2, 59], 150: [2, 68], 151: [2, 54], 152: [2, 55], 161: [2, 66], 162: [2, 67], 163: [2, 62], 164: [2, 49], 165: [2, 47], 166: [2, 45] },
209
+ parseError: function(m, w) {
210
+ if (w.recoverable)
211
+ this.trace(m);
212
+ else {
213
+ var _ = new Error(m);
214
+ throw _.hash = w, _;
215
+ }
216
+ },
217
+ parse: function(m) {
218
+ var w = this, _ = [0], g = [], A = [null], c = [], Tt = this.table, d = "", bt = 0, Qt = 0, Te = 2, Zt = 1, ye = c.slice.call(arguments, 1), O = Object.create(this.lexer), lt = { yy: {} };
219
+ for (var Dt in this.yy)
220
+ Object.prototype.hasOwnProperty.call(this.yy, Dt) && (lt.yy[Dt] = this.yy[Dt]);
221
+ O.setInput(m, lt.yy), lt.yy.lexer = O, lt.yy.parser = this, typeof O.yylloc == "undefined" && (O.yylloc = {});
222
+ var Vt = O.yylloc;
223
+ c.push(Vt);
224
+ var Ee = O.options && O.options.ranges;
225
+ typeof lt.yy.parseError == "function" ? this.parseError = lt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
226
+ function me() {
227
+ var nt;
228
+ return nt = g.pop() || O.lex() || Zt, typeof nt != "number" && (nt instanceof Array && (g = nt, nt = g.pop()), nt = w.symbols_[nt] || nt), nt;
229
+ }
230
+ for (var W, ht, Z, Ct, ut = {}, wt, it, jt, vt; ; ) {
231
+ if (ht = _[_.length - 1], this.defaultActions[ht] ? Z = this.defaultActions[ht] : ((W === null || typeof W == "undefined") && (W = me()), Z = Tt[ht] && Tt[ht][W]), typeof Z == "undefined" || !Z.length || !Z[0]) {
232
+ var Ot = "";
233
+ vt = [];
234
+ for (wt in Tt[ht])
235
+ this.terminals_[wt] && wt > Te && vt.push("'" + this.terminals_[wt] + "'");
236
+ O.showPosition ? Ot = "Parse error on line " + (bt + 1) + `:
237
+ ` + O.showPosition() + `
238
+ Expecting ` + vt.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : Ot = "Parse error on line " + (bt + 1) + ": Unexpected " + (W == Zt ? "end of input" : "'" + (this.terminals_[W] || W) + "'"), this.parseError(Ot, {
239
+ text: O.match,
240
+ token: this.terminals_[W] || W,
241
+ line: O.yylineno,
242
+ loc: Vt,
243
+ expected: vt
244
+ });
245
+ }
246
+ if (Z[0] instanceof Array && Z.length > 1)
247
+ throw new Error("Parse Error: multiple actions possible at state: " + ht + ", token: " + W);
248
+ switch (Z[0]) {
249
+ case 1:
250
+ _.push(W), A.push(O.yytext), c.push(O.yylloc), _.push(Z[1]), W = null, Qt = O.yyleng, d = O.yytext, bt = O.yylineno, Vt = O.yylloc;
251
+ break;
252
+ case 2:
253
+ if (it = this.productions_[Z[1]][1], ut.$ = A[A.length - it], ut._$ = {
254
+ first_line: c[c.length - (it || 1)].first_line,
255
+ last_line: c[c.length - 1].last_line,
256
+ first_column: c[c.length - (it || 1)].first_column,
257
+ last_column: c[c.length - 1].last_column
258
+ }, Ee && (ut._$.range = [
259
+ c[c.length - (it || 1)].range[0],
260
+ c[c.length - 1].range[1]
261
+ ]), Ct = this.performAction.apply(ut, [
262
+ d,
263
+ Qt,
264
+ bt,
265
+ lt.yy,
266
+ Z[1],
267
+ A,
268
+ c
269
+ ].concat(ye)), typeof Ct != "undefined")
270
+ return Ct;
271
+ it && (_ = _.slice(0, -1 * it * 2), A = A.slice(0, -1 * it), c = c.slice(0, -1 * it)), _.push(this.productions_[Z[1]][0]), A.push(ut.$), c.push(ut._$), jt = Tt[_[_.length - 2]][_[_.length - 1]], _.push(jt);
272
+ break;
273
+ case 3:
274
+ return !0;
275
+ }
276
+ }
277
+ return !0;
278
+ }
279
+ }, ge = function() {
280
+ var rt = {
281
+ EOF: 1,
282
+ parseError: function(w, _) {
283
+ if (this.yy.parser)
284
+ this.yy.parser.parseError(w, _);
285
+ else
286
+ throw new Error(w);
287
+ },
288
+ setInput: function(m, w) {
289
+ return this.yy = w || this.yy || {}, this._input = m, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
290
+ first_line: 1,
291
+ first_column: 0,
292
+ last_line: 1,
293
+ last_column: 0
294
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
295
+ },
296
+ input: function() {
297
+ var m = this._input[0];
298
+ this.yytext += m, this.yyleng++, this.offset++, this.match += m, this.matched += m;
299
+ var w = m.match(/(?:\r\n?|\n).*/g);
300
+ return w ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), m;
301
+ },
302
+ unput: function(m) {
303
+ var w = m.length, _ = m.split(/(?:\r\n?|\n)/g);
304
+ this._input = m + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - w), this.offset -= w;
305
+ var g = this.match.split(/(?:\r\n?|\n)/g);
306
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), _.length - 1 && (this.yylineno -= _.length - 1);
307
+ var A = this.yylloc.range;
308
+ return this.yylloc = {
309
+ first_line: this.yylloc.first_line,
310
+ last_line: this.yylineno + 1,
311
+ first_column: this.yylloc.first_column,
312
+ last_column: _ ? (_.length === g.length ? this.yylloc.first_column : 0) + g[g.length - _.length].length - _[0].length : this.yylloc.first_column - w
313
+ }, this.options.ranges && (this.yylloc.range = [A[0], A[0] + this.yyleng - w]), this.yyleng = this.yytext.length, this;
314
+ },
315
+ more: function() {
316
+ return this._more = !0, this;
317
+ },
318
+ reject: function() {
319
+ if (this.options.backtrack_lexer)
320
+ this._backtrack = !0;
321
+ else
322
+ 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).
323
+ ` + this.showPosition(), {
324
+ text: "",
325
+ token: null,
326
+ line: this.yylineno
327
+ });
328
+ return this;
329
+ },
330
+ less: function(m) {
331
+ this.unput(this.match.slice(m));
332
+ },
333
+ pastInput: function() {
334
+ var m = this.matched.substr(0, this.matched.length - this.match.length);
335
+ return (m.length > 20 ? "..." : "") + m.substr(-20).replace(/\n/g, "");
336
+ },
337
+ upcomingInput: function() {
338
+ var m = this.match;
339
+ return m.length < 20 && (m += this._input.substr(0, 20 - m.length)), (m.substr(0, 20) + (m.length > 20 ? "..." : "")).replace(/\n/g, "");
340
+ },
341
+ showPosition: function() {
342
+ var m = this.pastInput(), w = new Array(m.length + 1).join("-");
343
+ return m + this.upcomingInput() + `
344
+ ` + w + "^";
345
+ },
346
+ test_match: function(m, w) {
347
+ var _, g, A;
348
+ if (this.options.backtrack_lexer && (A = {
349
+ yylineno: this.yylineno,
350
+ yylloc: {
351
+ first_line: this.yylloc.first_line,
352
+ last_line: this.last_line,
353
+ first_column: this.yylloc.first_column,
354
+ last_column: this.yylloc.last_column
355
+ },
356
+ yytext: this.yytext,
357
+ match: this.match,
358
+ matches: this.matches,
359
+ matched: this.matched,
360
+ yyleng: this.yyleng,
361
+ offset: this.offset,
362
+ _more: this._more,
363
+ _input: this._input,
364
+ yy: this.yy,
365
+ conditionStack: this.conditionStack.slice(0),
366
+ done: this.done
367
+ }, this.options.ranges && (A.yylloc.range = this.yylloc.range.slice(0))), g = m[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
368
+ first_line: this.yylloc.last_line,
369
+ last_line: this.yylineno + 1,
370
+ first_column: this.yylloc.last_column,
371
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + m[0].length
372
+ }, this.yytext += m[0], this.match += m[0], this.matches = m, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(m[0].length), this.matched += m[0], _ = this.performAction.call(this, this.yy, this, w, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), _)
373
+ return _;
374
+ if (this._backtrack) {
375
+ for (var c in A)
376
+ this[c] = A[c];
377
+ return !1;
378
+ }
379
+ return !1;
380
+ },
381
+ next: function() {
382
+ if (this.done)
383
+ return this.EOF;
384
+ this._input || (this.done = !0);
385
+ var m, w, _, g;
386
+ this._more || (this.yytext = "", this.match = "");
387
+ for (var A = this._currentRules(), c = 0; c < A.length; c++)
388
+ if (_ = this._input.match(this.rules[A[c]]), _ && (!w || _[0].length > w[0].length)) {
389
+ if (w = _, g = c, this.options.backtrack_lexer) {
390
+ if (m = this.test_match(_, A[c]), m !== !1)
391
+ return m;
392
+ if (this._backtrack) {
393
+ w = !1;
394
+ continue;
395
+ } else
396
+ return !1;
397
+ } else if (!this.options.flex)
398
+ break;
399
+ }
400
+ return w ? (m = this.test_match(w, A[g]), m !== !1 ? m : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
401
+ ` + this.showPosition(), {
402
+ text: "",
403
+ token: null,
404
+ line: this.yylineno
405
+ });
406
+ },
407
+ lex: function() {
408
+ var w = this.next();
409
+ return w || this.lex();
410
+ },
411
+ begin: function(w) {
412
+ this.conditionStack.push(w);
413
+ },
414
+ popState: function() {
415
+ var w = this.conditionStack.length - 1;
416
+ return w > 0 ? this.conditionStack.pop() : this.conditionStack[0];
417
+ },
418
+ _currentRules: function() {
419
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
420
+ },
421
+ topState: function(w) {
422
+ return w = this.conditionStack.length - 1 - Math.abs(w || 0), w >= 0 ? this.conditionStack[w] : "INITIAL";
423
+ },
424
+ pushState: function(w) {
425
+ this.begin(w);
426
+ },
427
+ stateStackSize: function() {
428
+ return this.conditionStack.length;
429
+ },
430
+ options: { "case-insensitive": !0 },
431
+ performAction: function(w, _, g, A) {
432
+ switch (g) {
433
+ case 0:
434
+ return this.begin("open_directive"), 83;
435
+ case 1:
436
+ return this.begin("type_directive"), 84;
437
+ case 2:
438
+ return this.popState(), this.begin("arg_directive"), 17;
439
+ case 3:
440
+ return this.popState(), this.popState(), 86;
441
+ case 4:
442
+ return 85;
443
+ case 5:
444
+ return 5;
445
+ case 6:
446
+ break;
447
+ case 7:
448
+ break;
449
+ case 8:
450
+ break;
451
+ case 9:
452
+ break;
453
+ case 10:
454
+ break;
455
+ case 11:
456
+ return 24;
457
+ case 12:
458
+ return this.begin("LINE"), 19;
459
+ case 13:
460
+ return this.begin("ID"), 54;
461
+ case 14:
462
+ return this.begin("ID"), 56;
463
+ case 15:
464
+ return _.yytext = _.yytext.trim(), this.begin("ALIAS"), 73;
465
+ case 16:
466
+ return this.popState(), this.popState(), this.begin("LINE"), 55;
467
+ case 17:
468
+ return this.popState(), this.popState(), 5;
469
+ case 18:
470
+ return this.begin("LINE"), 41;
471
+ case 19:
472
+ return this.begin("LINE"), 42;
473
+ case 20:
474
+ return this.begin("LINE"), 43;
475
+ case 21:
476
+ return this.begin("LINE"), 44;
477
+ case 22:
478
+ return this.begin("LINE"), 53;
479
+ case 23:
480
+ return this.begin("LINE"), 46;
481
+ case 24:
482
+ return this.begin("LINE"), 52;
483
+ case 25:
484
+ return this.begin("LINE"), 48;
485
+ case 26:
486
+ return this.begin("LINE"), 51;
487
+ case 27:
488
+ return this.begin("LINE"), 50;
489
+ case 28:
490
+ return this.popState(), 20;
491
+ case 29:
492
+ return 21;
493
+ case 30:
494
+ return 68;
495
+ case 31:
496
+ return 69;
497
+ case 32:
498
+ return 62;
499
+ case 33:
500
+ return 63;
501
+ case 34:
502
+ return 64;
503
+ case 35:
504
+ return 65;
505
+ case 36:
506
+ return 60;
507
+ case 37:
508
+ return 57;
509
+ case 38:
510
+ return this.begin("ID"), 26;
511
+ case 39:
512
+ return this.begin("ID"), 28;
513
+ case 40:
514
+ return 34;
515
+ case 41:
516
+ return 35;
517
+ case 42:
518
+ return this.begin("acc_title"), 36;
519
+ case 43:
520
+ return this.popState(), "acc_title_value";
521
+ case 44:
522
+ return this.begin("acc_descr"), 38;
523
+ case 45:
524
+ return this.popState(), "acc_descr_value";
525
+ case 46:
526
+ this.begin("acc_descr_multiline");
527
+ break;
528
+ case 47:
529
+ this.popState();
530
+ break;
531
+ case 48:
532
+ return "acc_descr_multiline_value";
533
+ case 49:
534
+ return 7;
535
+ case 50:
536
+ return 23;
537
+ case 51:
538
+ return 25;
539
+ case 52:
540
+ return 67;
541
+ case 53:
542
+ return 5;
543
+ case 54:
544
+ return _.yytext = _.yytext.trim(), 73;
545
+ case 55:
546
+ return 76;
547
+ case 56:
548
+ return 77;
549
+ case 57:
550
+ return 74;
551
+ case 58:
552
+ return 75;
553
+ case 59:
554
+ return 78;
555
+ case 60:
556
+ return 79;
557
+ case 61:
558
+ return 80;
559
+ case 62:
560
+ return 81;
561
+ case 63:
562
+ return 82;
563
+ case 64:
564
+ return 71;
565
+ case 65:
566
+ return 72;
567
+ case 66:
568
+ return 5;
569
+ case 67:
570
+ return "INVALID";
571
+ }
572
+ },
573
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:[\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, /^(?:[^\->:\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, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
574
+ conditions: { acc_descr_multiline: { rules: [47, 48], inclusive: !1 }, acc_descr: { rules: [45], inclusive: !1 }, acc_title: { rules: [43], inclusive: !1 }, open_directive: { rules: [1, 8], inclusive: !1 }, type_directive: { rules: [2, 3, 8], inclusive: !1 }, arg_directive: { rules: [3, 4, 8], inclusive: !1 }, ID: { rules: [7, 8, 15], inclusive: !1 }, ALIAS: { rules: [7, 8, 16, 17], inclusive: !1 }, LINE: { rules: [7, 8, 28], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 8, 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67], inclusive: !0 } }
575
+ };
576
+ return rt;
577
+ }();
578
+ Mt.lexer = ge;
579
+ function Rt() {
580
+ this.yy = {};
581
+ }
582
+ return Rt.prototype = Mt, Mt.Parser = Rt, new Rt();
583
+ }();
584
+ Bt.parser = Bt;
585
+ const Me = Bt;
586
+ let yt, ot = {}, xt = [], j = [], It = !1, Yt, st;
587
+ const Re = function(t, e, s) {
588
+ Le.parseDirective(this, t, e, s);
589
+ }, De = function(t) {
590
+ xt.push({
591
+ name: t.text,
592
+ wrap: t.wrap === void 0 && dt() || !!t.wrap,
593
+ fill: t.color,
594
+ actorKeys: []
595
+ }), st = xt.slice(-1)[0];
596
+ }, Ft = function(t, e, s, i) {
597
+ let n = st;
598
+ const a = ot[t];
599
+ if (a) {
600
+ if (st && a.box && st !== a.box)
601
+ throw new Error(
602
+ "A same participant should only be defined in one Box: " + a.name + " can't be in '" + a.box.name + "' and in '" + st.name + "' at the same time."
603
+ );
604
+ if (n = a.box ? a.box : st, a.box = n, a && e === a.name && s == null)
605
+ return;
606
+ }
607
+ (s == null || s.text == null) && (s = { text: e, wrap: null, type: i }), (i == null || s.text == null) && (s = { text: e, wrap: null, type: i }), ot[t] = {
608
+ box: n,
609
+ name: e,
610
+ description: s.text,
611
+ wrap: s.wrap === void 0 && dt() || !!s.wrap,
612
+ prevActor: yt,
613
+ links: {},
614
+ properties: {},
615
+ actorCnt: null,
616
+ rectData: null,
617
+ type: i || "participant"
618
+ }, yt && ot[yt] && (ot[yt].nextActor = t), st && st.actorKeys.push(t), yt = t;
619
+ }, Ve = (t) => {
620
+ let e, s = 0;
621
+ for (e = 0; e < j.length; e++)
622
+ j[e].type === Et.ACTIVE_START && j[e].from.actor === t && s++, j[e].type === Et.ACTIVE_END && j[e].from.actor === t && s--;
623
+ return s;
624
+ }, Ce = function(t, e, s, i) {
625
+ j.push({
626
+ from: t,
627
+ to: e,
628
+ message: s.text,
629
+ wrap: s.wrap === void 0 && dt() || !!s.wrap,
630
+ answer: i
631
+ });
632
+ }, R = function(t, e, s = { text: void 0, wrap: void 0 }, i) {
633
+ if (i === Et.ACTIVE_END && Ve(t.actor) < 1) {
634
+ let a = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
635
+ throw a.hash = {
636
+ text: "->>-",
637
+ token: "->>-",
638
+ line: "1",
639
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
640
+ expected: ["'ACTIVE_PARTICIPANT'"]
641
+ }, a;
642
+ }
643
+ return j.push({
644
+ from: t,
645
+ to: e,
646
+ message: s.text,
647
+ wrap: s.wrap === void 0 && dt() || !!s.wrap,
648
+ type: i
649
+ }), !0;
650
+ }, Oe = function() {
651
+ return xt.length > 0;
652
+ }, Be = function() {
653
+ return xt.some((t) => t.name);
654
+ }, Ye = function() {
655
+ return j;
656
+ }, Fe = function() {
657
+ return xt;
658
+ }, We = function() {
659
+ return ot;
660
+ }, mt = function(t) {
661
+ return ot[t];
662
+ }, ze = function() {
663
+ return Object.keys(ot);
664
+ }, qe = function() {
665
+ It = !0;
666
+ }, He = function() {
667
+ It = !1;
668
+ }, Ue = () => It, Ke = function(t) {
669
+ Yt = t;
670
+ }, dt = () => Yt !== void 0 ? Yt : ct().sequence.wrap, Ge = function() {
671
+ ot = {}, xt = [], j = [], It = !1, Pe();
672
+ }, Xe = function(t) {
673
+ const e = t.trim(), s = {
674
+ text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
675
+ wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0
676
+ };
677
+ return K.debug("parseMessage:", s), s;
678
+ }, Je = function(t) {
679
+ const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
680
+ let s = e != null && e[1] ? e[1].trim() : "transparent", i = e != null && e[2] ? e[2].trim() : void 0;
681
+ if (window && window.CSS)
682
+ window.CSS.supports("color", s) || (s = "transparent", i = t.trim());
683
+ else {
684
+ const a = new Option().style;
685
+ a.color = s, a.color !== s && (s = "transparent", i = t.trim());
686
+ }
687
+ return {
688
+ color: s,
689
+ text: i !== void 0 ? kt(i.replace(/^:?(?:no)?wrap:/, ""), ct()) : void 0,
690
+ wrap: i !== void 0 ? i.match(/^:?wrap:/) !== null ? !0 : i.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
691
+ };
692
+ }, Et = {
693
+ SOLID: 0,
694
+ DOTTED: 1,
695
+ NOTE: 2,
696
+ SOLID_CROSS: 3,
697
+ DOTTED_CROSS: 4,
698
+ SOLID_OPEN: 5,
699
+ DOTTED_OPEN: 6,
700
+ LOOP_START: 10,
701
+ LOOP_END: 11,
702
+ ALT_START: 12,
703
+ ALT_ELSE: 13,
704
+ ALT_END: 14,
705
+ OPT_START: 15,
706
+ OPT_END: 16,
707
+ ACTIVE_START: 17,
708
+ ACTIVE_END: 18,
709
+ PAR_START: 19,
710
+ PAR_AND: 20,
711
+ PAR_END: 21,
712
+ RECT_START: 22,
713
+ RECT_END: 23,
714
+ SOLID_POINT: 24,
715
+ DOTTED_POINT: 25,
716
+ AUTONUMBER: 26,
717
+ CRITICAL_START: 27,
718
+ CRITICAL_OPTION: 28,
719
+ CRITICAL_END: 29,
720
+ BREAK_START: 30,
721
+ BREAK_END: 31
722
+ }, Qe = {
723
+ FILLED: 0,
724
+ OPEN: 1
725
+ }, Ze = {
726
+ LEFTOF: 0,
727
+ RIGHTOF: 1,
728
+ OVER: 2
729
+ }, ie = function(t, e, s) {
730
+ s.text, s.wrap === void 0 && dt() || s.wrap;
731
+ const i = [].concat(t, t);
732
+ j.push({
733
+ from: i[0],
734
+ to: i[1],
735
+ message: s.text,
736
+ wrap: s.wrap === void 0 && dt() || !!s.wrap,
737
+ type: Et.NOTE,
738
+ placement: e
739
+ });
740
+ }, ne = function(t, e) {
741
+ const s = mt(t);
742
+ try {
743
+ let i = kt(e.text, ct());
744
+ i = i.replace(/&amp;/g, "&"), i = i.replace(/&equals;/g, "=");
745
+ const n = JSON.parse(i);
746
+ Ht(s, n);
747
+ } catch (i) {
748
+ K.error("error while parsing actor link text", i);
749
+ }
750
+ }, je = function(t, e) {
751
+ const s = mt(t);
752
+ try {
753
+ const o = {};
754
+ let l = kt(e.text, ct());
755
+ var i = l.indexOf("@");
756
+ l = l.replace(/&amp;/g, "&"), l = l.replace(/&equals;/g, "=");
757
+ var n = l.slice(0, i - 1).trim(), a = l.slice(i + 1).trim();
758
+ o[n] = a, Ht(s, o);
759
+ } catch (o) {
760
+ K.error("error while parsing actor link text", o);
761
+ }
762
+ };
763
+ function Ht(t, e) {
764
+ if (t.links == null)
765
+ t.links = e;
766
+ else
767
+ for (let s in e)
768
+ t.links[s] = e[s];
769
+ }
770
+ const se = function(t, e) {
771
+ const s = mt(t);
772
+ try {
773
+ let i = kt(e.text, ct());
774
+ const n = JSON.parse(i);
775
+ ae(s, n);
776
+ } catch (i) {
777
+ K.error("error while parsing actor properties text", i);
778
+ }
779
+ };
780
+ function ae(t, e) {
781
+ if (t.properties == null)
782
+ t.properties = e;
783
+ else
784
+ for (let s in e)
785
+ t.properties[s] = e[s];
786
+ }
787
+ function $e() {
788
+ st = void 0;
789
+ }
790
+ const re = function(t, e) {
791
+ const s = mt(t), i = document.getElementById(e.text);
792
+ try {
793
+ const n = i.innerHTML, a = JSON.parse(n);
794
+ a.properties && ae(s, a.properties), a.links && Ht(s, a.links);
795
+ } catch (n) {
796
+ K.error("error while parsing actor details text", n);
797
+ }
798
+ }, t0 = function(t, e) {
799
+ if (t !== void 0 && t.properties !== void 0)
800
+ return t.properties[e];
801
+ }, oe = function(t) {
802
+ if (Array.isArray(t))
803
+ t.forEach(function(e) {
804
+ oe(e);
805
+ });
806
+ else
807
+ switch (t.type) {
808
+ case "sequenceIndex":
809
+ j.push({
810
+ from: void 0,
811
+ to: void 0,
812
+ message: {
813
+ start: t.sequenceIndex,
814
+ step: t.sequenceIndexStep,
815
+ visible: t.sequenceVisible
816
+ },
817
+ wrap: !1,
818
+ type: t.signalType
819
+ });
820
+ break;
821
+ case "addParticipant":
822
+ Ft(t.actor, t.actor, t.description, "participant");
823
+ break;
824
+ case "addActor":
825
+ Ft(t.actor, t.actor, t.description, "actor");
826
+ break;
827
+ case "activeStart":
828
+ R(t.actor, void 0, void 0, t.signalType);
829
+ break;
830
+ case "activeEnd":
831
+ R(t.actor, void 0, void 0, t.signalType);
832
+ break;
833
+ case "addNote":
834
+ ie(t.actor, t.placement, t.text);
835
+ break;
836
+ case "addLinks":
837
+ ne(t.actor, t.text);
838
+ break;
839
+ case "addALink":
840
+ je(t.actor, t.text);
841
+ break;
842
+ case "addProperties":
843
+ se(t.actor, t.text);
844
+ break;
845
+ case "addDetails":
846
+ re(t.actor, t.text);
847
+ break;
848
+ case "addMessage":
849
+ R(t.from, t.to, t.msg, t.signalType);
850
+ break;
851
+ case "boxStart":
852
+ De(t.boxData);
853
+ break;
854
+ case "boxEnd":
855
+ $e();
856
+ break;
857
+ case "loopStart":
858
+ R(void 0, void 0, t.loopText, t.signalType);
859
+ break;
860
+ case "loopEnd":
861
+ R(void 0, void 0, void 0, t.signalType);
862
+ break;
863
+ case "rectStart":
864
+ R(void 0, void 0, t.color, t.signalType);
865
+ break;
866
+ case "rectEnd":
867
+ R(void 0, void 0, void 0, t.signalType);
868
+ break;
869
+ case "optStart":
870
+ R(void 0, void 0, t.optText, t.signalType);
871
+ break;
872
+ case "optEnd":
873
+ R(void 0, void 0, void 0, t.signalType);
874
+ break;
875
+ case "altStart":
876
+ R(void 0, void 0, t.altText, t.signalType);
877
+ break;
878
+ case "else":
879
+ R(void 0, void 0, t.altText, t.signalType);
880
+ break;
881
+ case "altEnd":
882
+ R(void 0, void 0, void 0, t.signalType);
883
+ break;
884
+ case "setAccTitle":
885
+ te(t.text);
886
+ break;
887
+ case "parStart":
888
+ R(void 0, void 0, t.parText, t.signalType);
889
+ break;
890
+ case "and":
891
+ R(void 0, void 0, t.parText, t.signalType);
892
+ break;
893
+ case "parEnd":
894
+ R(void 0, void 0, void 0, t.signalType);
895
+ break;
896
+ case "criticalStart":
897
+ R(void 0, void 0, t.criticalText, t.signalType);
898
+ break;
899
+ case "option":
900
+ R(void 0, void 0, t.optionText, t.signalType);
901
+ break;
902
+ case "criticalEnd":
903
+ R(void 0, void 0, void 0, t.signalType);
904
+ break;
905
+ case "breakStart":
906
+ R(void 0, void 0, t.breakText, t.signalType);
907
+ break;
908
+ case "breakEnd":
909
+ R(void 0, void 0, void 0, t.signalType);
910
+ break;
911
+ }
912
+ }, e0 = {
913
+ addActor: Ft,
914
+ addMessage: Ce,
915
+ addSignal: R,
916
+ addLinks: ne,
917
+ addDetails: re,
918
+ addProperties: se,
919
+ autoWrap: dt,
920
+ setWrap: Ke,
921
+ enableSequenceNumbers: qe,
922
+ disableSequenceNumbers: He,
923
+ showSequenceNumbers: Ue,
924
+ getMessages: Ye,
925
+ getActors: We,
926
+ getActor: mt,
927
+ getActorKeys: ze,
928
+ getActorProperty: t0,
929
+ getAccTitle: be,
930
+ getBoxes: Fe,
931
+ getDiagramTitle: we,
932
+ setDiagramTitle: ve,
933
+ parseDirective: Re,
934
+ getConfig: () => ct().sequence,
935
+ clear: Ge,
936
+ parseMessage: Xe,
937
+ parseBoxData: Je,
938
+ LINETYPE: Et,
939
+ ARROWTYPE: Qe,
940
+ PLACEMENT: Ze,
941
+ addNote: ie,
942
+ setAccTitle: te,
943
+ apply: oe,
944
+ setAccDescription: _e,
945
+ getAccDescription: ke,
946
+ hasAtLeastOneBox: Oe,
947
+ hasAtLeastOneBoxWithTitle: Be
948
+ }, i0 = (t) => `.actor {
949
+ stroke: ${t.actorBorder};
950
+ fill: ${t.actorBkg};
951
+ }
952
+
953
+ text.actor > tspan {
954
+ fill: ${t.actorTextColor};
955
+ stroke: none;
956
+ }
957
+
958
+ .actor-line {
959
+ stroke: ${t.actorLineColor};
960
+ }
961
+
962
+ .messageLine0 {
963
+ stroke-width: 1.5;
964
+ stroke-dasharray: none;
965
+ stroke: ${t.signalColor};
966
+ }
967
+
968
+ .messageLine1 {
969
+ stroke-width: 1.5;
970
+ stroke-dasharray: 2, 2;
971
+ stroke: ${t.signalColor};
972
+ }
973
+
974
+ #arrowhead path {
975
+ fill: ${t.signalColor};
976
+ stroke: ${t.signalColor};
977
+ }
978
+
979
+ .sequenceNumber {
980
+ fill: ${t.sequenceNumberColor};
981
+ }
982
+
983
+ #sequencenumber {
984
+ fill: ${t.signalColor};
985
+ }
986
+
987
+ #crosshead path {
988
+ fill: ${t.signalColor};
989
+ stroke: ${t.signalColor};
990
+ }
991
+
992
+ .messageText {
993
+ fill: ${t.signalTextColor};
994
+ stroke: none;
995
+ }
996
+
997
+ .labelBox {
998
+ stroke: ${t.labelBoxBorderColor};
999
+ fill: ${t.labelBoxBkgColor};
1000
+ }
1001
+
1002
+ .labelText, .labelText > tspan {
1003
+ fill: ${t.labelTextColor};
1004
+ stroke: none;
1005
+ }
1006
+
1007
+ .loopText, .loopText > tspan {
1008
+ fill: ${t.loopTextColor};
1009
+ stroke: none;
1010
+ }
1011
+
1012
+ .loopLine {
1013
+ stroke-width: 2px;
1014
+ stroke-dasharray: 2, 2;
1015
+ stroke: ${t.labelBoxBorderColor};
1016
+ fill: ${t.labelBoxBorderColor};
1017
+ }
1018
+
1019
+ .note {
1020
+ //stroke: #decc93;
1021
+ stroke: ${t.noteBorderColor};
1022
+ fill: ${t.noteBkgColor};
1023
+ }
1024
+
1025
+ .noteText, .noteText > tspan {
1026
+ fill: ${t.noteTextColor};
1027
+ stroke: none;
1028
+ }
1029
+
1030
+ .activation0 {
1031
+ fill: ${t.activationBkgColor};
1032
+ stroke: ${t.activationBorderColor};
1033
+ }
1034
+
1035
+ .activation1 {
1036
+ fill: ${t.activationBkgColor};
1037
+ stroke: ${t.activationBorderColor};
1038
+ }
1039
+
1040
+ .activation2 {
1041
+ fill: ${t.activationBkgColor};
1042
+ stroke: ${t.activationBorderColor};
1043
+ }
1044
+
1045
+ .actorPopupMenu {
1046
+ position: absolute;
1047
+ }
1048
+
1049
+ .actorPopupMenuPanel {
1050
+ position: absolute;
1051
+ fill: ${t.actorBkg};
1052
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
1053
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
1054
+ }
1055
+ .actor-man line {
1056
+ stroke: ${t.actorBorder};
1057
+ fill: ${t.actorBkg};
1058
+ }
1059
+ .actor-man circle, line {
1060
+ stroke: ${t.actorBorder};
1061
+ fill: ${t.actorBkg};
1062
+ stroke-width: 2px;
1063
+ }
1064
+ `, n0 = i0, Nt = function(t, e) {
1065
+ const s = t.append("rect");
1066
+ return s.attr("x", e.x), s.attr("y", e.y), s.attr("fill", e.fill), s.attr("stroke", e.stroke), s.attr("width", e.width), s.attr("height", e.height), s.attr("rx", e.rx), s.attr("ry", e.ry), e.class !== void 0 && s.attr("class", e.class), s;
1067
+ }, ce = (t, e) => {
1068
+ Ae(() => {
1069
+ const s = document.querySelectorAll(t);
1070
+ s.length !== 0 && (s[0].addEventListener("mouseover", function() {
1071
+ o0("actor" + e + "_popup");
1072
+ }), s[0].addEventListener("mouseout", function() {
1073
+ c0("actor" + e + "_popup");
1074
+ }));
1075
+ });
1076
+ }, s0 = function(t, e, s, i, n) {
1077
+ if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
1078
+ return { height: 0, width: 0 };
1079
+ const a = e.links, o = e.actorCnt, l = e.rectData;
1080
+ var p = "none";
1081
+ n && (p = "block !important");
1082
+ const h = t.append("g");
1083
+ h.attr("id", "actor" + o + "_popup"), h.attr("class", "actorPopupMenu"), h.attr("display", p), ce("#actor" + o + "_popup", o);
1084
+ var T = "";
1085
+ l.class !== void 0 && (T = " " + l.class);
1086
+ let y = l.width > s ? l.width : s;
1087
+ const u = h.append("rect");
1088
+ if (u.attr("class", "actorPopupMenuPanel" + T), u.attr("x", l.x), u.attr("y", l.height), u.attr("fill", l.fill), u.attr("stroke", l.stroke), u.attr("width", y), u.attr("height", l.height), u.attr("rx", l.rx), u.attr("ry", l.ry), a != null) {
1089
+ var x = 20;
1090
+ for (let N in a) {
1091
+ var b = h.append("a"), k = Lt(a[N]);
1092
+ b.attr("xlink:href", k), b.attr("target", "_blank"), v0(i)(
1093
+ N,
1094
+ b,
1095
+ l.x + 10,
1096
+ l.height + x,
1097
+ y,
1098
+ 20,
1099
+ { class: "actor" },
1100
+ i
1101
+ ), x += 30;
1102
+ }
1103
+ }
1104
+ return u.attr("height", x), { height: l.height + x, width: y };
1105
+ }, le = function(t, e, s, i) {
1106
+ const n = t.append("image");
1107
+ n.attr("x", e), n.attr("y", s);
1108
+ var a = Lt(i);
1109
+ n.attr("xlink:href", a);
1110
+ }, he = function(t, e, s, i) {
1111
+ const n = t.append("use");
1112
+ n.attr("x", e), n.attr("y", s);
1113
+ var a = Lt(i);
1114
+ n.attr("xlink:href", "#" + a);
1115
+ }, a0 = function(t) {
1116
+ return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'block'; }";
1117
+ }, r0 = function(t) {
1118
+ return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'none'; }";
1119
+ }, o0 = function(t) {
1120
+ var e = document.getElementById(t);
1121
+ e != null && (e.style.display = "block");
1122
+ }, c0 = function(t) {
1123
+ var e = document.getElementById(t);
1124
+ e != null && (e.style.display = "none");
1125
+ }, gt = function(t, e) {
1126
+ let s = 0, i = 0;
1127
+ const n = e.text.split(Pt.lineBreakRegex), [a, o] = ee(e.fontSize);
1128
+ let l = [], p = 0, h = () => e.y;
1129
+ if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0)
1130
+ switch (e.valign) {
1131
+ case "top":
1132
+ case "start":
1133
+ h = () => Math.round(e.y + e.textMargin);
1134
+ break;
1135
+ case "middle":
1136
+ case "center":
1137
+ h = () => Math.round(e.y + (s + i + e.textMargin) / 2);
1138
+ break;
1139
+ case "bottom":
1140
+ case "end":
1141
+ h = () => Math.round(
1142
+ e.y + (s + i + 2 * e.textMargin) - e.textMargin
1143
+ );
1144
+ break;
1145
+ }
1146
+ if (e.anchor !== void 0 && e.textMargin !== void 0 && e.width !== void 0)
1147
+ switch (e.anchor) {
1148
+ case "left":
1149
+ case "start":
1150
+ e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
1151
+ break;
1152
+ case "middle":
1153
+ case "center":
1154
+ e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
1155
+ break;
1156
+ case "right":
1157
+ case "end":
1158
+ e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
1159
+ break;
1160
+ }
1161
+ for (let [T, y] of n.entries()) {
1162
+ e.textMargin !== void 0 && e.textMargin === 0 && a !== void 0 && (p = T * a);
1163
+ const u = t.append("text");
1164
+ if (u.attr("x", e.x), u.attr("y", h()), e.anchor !== void 0 && u.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && u.style("font-family", e.fontFamily), o !== void 0 && u.style("font-size", o), e.fontWeight !== void 0 && u.style("font-weight", e.fontWeight), e.fill !== void 0 && u.attr("fill", e.fill), e.class !== void 0 && u.attr("class", e.class), e.dy !== void 0 ? u.attr("dy", e.dy) : p !== 0 && u.attr("dy", p), e.tspan) {
1165
+ const x = u.append("tspan");
1166
+ x.attr("x", e.x), e.fill !== void 0 && x.attr("fill", e.fill), x.text(y);
1167
+ } else
1168
+ u.text(y);
1169
+ e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (i += (u._groups || u)[0][0].getBBox().height, s = i), l.push(u);
1170
+ }
1171
+ return l;
1172
+ }, de = function(t, e) {
1173
+ function s(n, a, o, l, p) {
1174
+ return n + "," + a + " " + (n + o) + "," + a + " " + (n + o) + "," + (a + l - p) + " " + (n + o - p * 1.2) + "," + (a + l) + " " + n + "," + (a + l);
1175
+ }
1176
+ const i = t.append("polygon");
1177
+ return i.attr("points", s(e.x, e.y, e.width, e.height, 7)), i.attr("class", "labelBox"), e.y = e.y + e.height / 2, gt(t, e), i;
1178
+ };
1179
+ let tt = -1;
1180
+ const pe = (t, e) => {
1181
+ !t.selectAll || t.selectAll(".actor-line").attr("class", "200").attr("y2", e - 55);
1182
+ }, l0 = function(t, e, s, i) {
1183
+ const n = e.x + e.width / 2, a = e.y + 5, o = t.append("g");
1184
+ var l = o;
1185
+ i || (tt++, l.append("line").attr("id", "actor" + tt).attr("x1", n).attr("y1", a).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"), l = o.append("g"), e.actorCnt = tt, e.links != null && (l.attr("id", "root-" + tt), ce("#root-" + tt, tt)));
1186
+ const p = At();
1187
+ var h = "actor";
1188
+ e.properties != null && e.properties.class ? h = e.properties.class : p.fill = "#eaeaea", p.x = e.x, p.y = e.y, p.width = e.width, p.height = e.height, p.class = h, p.rx = 3, p.ry = 3;
1189
+ const T = Nt(l, p);
1190
+ if (e.rectData = p, e.properties != null && e.properties.icon) {
1191
+ const u = e.properties.icon.trim();
1192
+ u.charAt(0) === "@" ? he(l, p.x + p.width - 20, p.y + 10, u.substr(1)) : le(l, p.x + p.width - 20, p.y + 10, u);
1193
+ }
1194
+ Ut(s)(
1195
+ e.description,
1196
+ l,
1197
+ p.x,
1198
+ p.y,
1199
+ p.width,
1200
+ p.height,
1201
+ { class: "actor" },
1202
+ s
1203
+ );
1204
+ let y = e.height;
1205
+ if (T.node) {
1206
+ const u = T.node().getBBox();
1207
+ e.height = u.height, y = u.height;
1208
+ }
1209
+ return y;
1210
+ }, h0 = function(t, e, s, i) {
1211
+ const n = e.x + e.width / 2, a = e.y + 80;
1212
+ i || (tt++, t.append("line").attr("id", "actor" + tt).attr("x1", n).attr("y1", a).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"));
1213
+ const o = t.append("g");
1214
+ o.attr("class", "actor-man");
1215
+ const l = At();
1216
+ l.x = e.x, l.y = e.y, l.fill = "#eaeaea", l.width = e.width, l.height = e.height, l.class = "actor", l.rx = 3, l.ry = 3, o.append("line").attr("id", "actor-man-torso" + tt).attr("x1", n).attr("y1", e.y + 25).attr("x2", n).attr("y2", e.y + 45), o.append("line").attr("id", "actor-man-arms" + tt).attr("x1", n - 18).attr("y1", e.y + 33).attr("x2", n + 18).attr("y2", e.y + 33), o.append("line").attr("x1", n - 18).attr("y1", e.y + 60).attr("x2", n).attr("y2", e.y + 45), o.append("line").attr("x1", n).attr("y1", e.y + 45).attr("x2", n + 16).attr("y2", e.y + 60);
1217
+ const p = o.append("circle");
1218
+ p.attr("cx", e.x + e.width / 2), p.attr("cy", e.y + 10), p.attr("r", 15), p.attr("width", e.width), p.attr("height", e.height);
1219
+ const h = o.node().getBBox();
1220
+ return e.height = h.height, Ut(s)(
1221
+ e.description,
1222
+ o,
1223
+ l.x,
1224
+ l.y + 35,
1225
+ l.width,
1226
+ l.height,
1227
+ { class: "actor" },
1228
+ s
1229
+ ), e.height;
1230
+ }, d0 = function(t, e, s, i) {
1231
+ switch (e.type) {
1232
+ case "actor":
1233
+ return h0(t, e, s, i);
1234
+ case "participant":
1235
+ return l0(t, e, s, i);
1236
+ }
1237
+ }, p0 = function(t, e, s) {
1238
+ const n = t.append("g");
1239
+ ue(n, e), e.name && Ut(s)(
1240
+ e.name,
1241
+ n,
1242
+ e.x,
1243
+ e.y + (e.textMaxHeight || 0) / 2,
1244
+ e.width,
1245
+ 0,
1246
+ { class: "text" },
1247
+ s
1248
+ ), n.lower();
1249
+ }, u0 = function(t) {
1250
+ return t.append("g");
1251
+ }, f0 = function(t, e, s, i, n) {
1252
+ const a = At(), o = e.anchored;
1253
+ a.x = e.startx, a.y = e.starty, a.class = "activation" + n % 3, a.width = e.stopx - e.startx, a.height = s - e.starty, Nt(o, a);
1254
+ }, x0 = function(t, e, s, i) {
1255
+ const {
1256
+ boxMargin: n,
1257
+ boxTextMargin: a,
1258
+ labelBoxHeight: o,
1259
+ labelBoxWidth: l,
1260
+ messageFontFamily: p,
1261
+ messageFontSize: h,
1262
+ messageFontWeight: T
1263
+ } = i, y = t.append("g"), u = function(k, N, M, P) {
1264
+ return y.append("line").attr("x1", k).attr("y1", N).attr("x2", M).attr("y2", P).attr("class", "loopLine");
1265
+ };
1266
+ u(e.startx, e.starty, e.stopx, e.starty), u(e.stopx, e.starty, e.stopx, e.stopy), u(e.startx, e.stopy, e.stopx, e.stopy), u(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(k) {
1267
+ u(e.startx, k.y, e.stopx, k.y).style(
1268
+ "stroke-dasharray",
1269
+ "3, 3"
1270
+ );
1271
+ });
1272
+ let x = Wt();
1273
+ x.text = s, x.x = e.startx, x.y = e.starty, x.fontFamily = p, x.fontSize = h, x.fontWeight = T, x.anchor = "middle", x.valign = "middle", x.tspan = !1, x.width = l || 50, x.height = o || 20, x.textMargin = a, x.class = "labelText", de(y, x), x = Wt(), x.text = e.title, x.x = e.startx + l / 2 + (e.stopx - e.startx) / 2, x.y = e.starty + n + a, x.anchor = "middle", x.valign = "middle", x.textMargin = a, x.class = "loopText", x.fontFamily = p, x.fontSize = h, x.fontWeight = T, x.wrap = !0;
1274
+ let b = gt(y, x);
1275
+ return e.sectionTitles !== void 0 && e.sectionTitles.forEach(function(k, N) {
1276
+ if (k.message) {
1277
+ x.text = k.message, x.x = e.startx + (e.stopx - e.startx) / 2, x.y = e.sections[N].y + n + a, x.class = "loopText", x.anchor = "middle", x.valign = "middle", x.tspan = !1, x.fontFamily = p, x.fontSize = h, x.fontWeight = T, x.wrap = e.wrap, b = gt(y, x);
1278
+ let M = Math.round(
1279
+ b.map((P) => (P._groups || P)[0][0].getBBox().height).reduce((P, B) => P + B)
1280
+ );
1281
+ e.sections[N].height += M - (n + a);
1282
+ }
1283
+ }), e.height = Math.round(e.stopy - e.starty), y;
1284
+ }, ue = function(t, e) {
1285
+ Nt(t, {
1286
+ x: e.startx,
1287
+ y: e.starty,
1288
+ width: e.stopx - e.startx,
1289
+ height: e.stopy - e.starty,
1290
+ fill: e.fill,
1291
+ stroke: e.stroke,
1292
+ class: "rect"
1293
+ }).lower();
1294
+ }, g0 = function(t) {
1295
+ t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1296
+ "d",
1297
+ "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"
1298
+ );
1299
+ }, T0 = function(t) {
1300
+ t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1301
+ "d",
1302
+ "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"
1303
+ );
1304
+ }, y0 = function(t) {
1305
+ t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1306
+ "d",
1307
+ "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"
1308
+ );
1309
+ }, E0 = function(t) {
1310
+ t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
1311
+ }, m0 = function(t) {
1312
+ t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).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");
1313
+ }, b0 = function(t) {
1314
+ 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);
1315
+ }, w0 = function(t) {
1316
+ t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 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");
1317
+ }, Wt = function() {
1318
+ return {
1319
+ x: 0,
1320
+ y: 0,
1321
+ fill: void 0,
1322
+ anchor: void 0,
1323
+ style: "#666",
1324
+ width: void 0,
1325
+ height: void 0,
1326
+ textMargin: 0,
1327
+ rx: 0,
1328
+ ry: 0,
1329
+ tspan: !0,
1330
+ valign: void 0
1331
+ };
1332
+ }, At = function() {
1333
+ return {
1334
+ x: 0,
1335
+ y: 0,
1336
+ fill: "#EDF2AE",
1337
+ stroke: "#666",
1338
+ width: 100,
1339
+ anchor: "start",
1340
+ height: 100,
1341
+ rx: 0,
1342
+ ry: 0
1343
+ };
1344
+ }, Ut = function() {
1345
+ function t(n, a, o, l, p, h, T) {
1346
+ const y = a.append("text").attr("x", o + p / 2).attr("y", l + h / 2 + 5).style("text-anchor", "middle").text(n);
1347
+ i(y, T);
1348
+ }
1349
+ function e(n, a, o, l, p, h, T, y) {
1350
+ const { actorFontSize: u, actorFontFamily: x, actorFontWeight: b } = y, [k, N] = ee(u), M = n.split(Pt.lineBreakRegex);
1351
+ for (let P = 0; P < M.length; P++) {
1352
+ const B = P * k - k * (M.length - 1) / 2, V = a.append("text").attr("x", o + p / 2).attr("y", l).style("text-anchor", "middle").style("font-size", N).style("font-weight", b).style("font-family", x);
1353
+ V.append("tspan").attr("x", o + p / 2).attr("dy", B).text(M[P]), V.attr("y", l + h / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(V, T);
1354
+ }
1355
+ }
1356
+ function s(n, a, o, l, p, h, T, y) {
1357
+ const u = a.append("switch"), b = u.append("foreignObject").attr("x", o).attr("y", l).attr("width", p).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1358
+ b.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), e(n, u, o, l, p, h, T, y), i(b, T);
1359
+ }
1360
+ function i(n, a) {
1361
+ for (const o in a)
1362
+ a.hasOwnProperty(o) && n.attr(o, a[o]);
1363
+ }
1364
+ return function(n) {
1365
+ return n.textPlacement === "fo" ? s : n.textPlacement === "old" ? t : e;
1366
+ };
1367
+ }(), v0 = function() {
1368
+ function t(n, a, o, l, p, h, T) {
1369
+ const y = a.append("text").attr("x", o).attr("y", l).style("text-anchor", "start").text(n);
1370
+ i(y, T);
1371
+ }
1372
+ function e(n, a, o, l, p, h, T, y) {
1373
+ const { actorFontSize: u, actorFontFamily: x, actorFontWeight: b } = y, k = n.split(Pt.lineBreakRegex);
1374
+ for (let N = 0; N < k.length; N++) {
1375
+ const M = N * u - u * (k.length - 1) / 2, P = a.append("text").attr("x", o).attr("y", l).style("text-anchor", "start").style("font-size", u).style("font-weight", b).style("font-family", x);
1376
+ P.append("tspan").attr("x", o).attr("dy", M).text(k[N]), P.attr("y", l + h / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(P, T);
1377
+ }
1378
+ }
1379
+ function s(n, a, o, l, p, h, T, y) {
1380
+ const u = a.append("switch"), b = u.append("foreignObject").attr("x", o).attr("y", l).attr("width", p).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1381
+ b.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), e(n, u, o, l, p, h, T, y), i(b, T);
1382
+ }
1383
+ function i(n, a) {
1384
+ for (const o in a)
1385
+ a.hasOwnProperty(o) && n.attr(o, a[o]);
1386
+ }
1387
+ return function(n) {
1388
+ return n.textPlacement === "fo" ? s : n.textPlacement === "old" ? t : e;
1389
+ };
1390
+ }(), S = {
1391
+ drawRect: Nt,
1392
+ drawText: gt,
1393
+ drawLabel: de,
1394
+ drawActor: d0,
1395
+ drawBox: p0,
1396
+ drawPopup: s0,
1397
+ drawImage: le,
1398
+ drawEmbeddedImage: he,
1399
+ anchorElement: u0,
1400
+ drawActivation: f0,
1401
+ drawLoop: x0,
1402
+ drawBackgroundRect: ue,
1403
+ insertArrowHead: E0,
1404
+ insertArrowFilledHead: m0,
1405
+ insertSequenceNumber: b0,
1406
+ insertArrowCrossHead: w0,
1407
+ insertDatabaseIcon: g0,
1408
+ insertComputerIcon: T0,
1409
+ insertClockIcon: y0,
1410
+ getTextObj: Wt,
1411
+ getNoteRect: At,
1412
+ popupMenu: a0,
1413
+ popdownMenu: r0,
1414
+ fixLifeLineHeights: pe,
1415
+ sanitizeUrl: Lt
1416
+ };
1417
+ let r = {};
1418
+ const f = {
1419
+ data: {
1420
+ startx: void 0,
1421
+ stopx: void 0,
1422
+ starty: void 0,
1423
+ stopy: void 0
1424
+ },
1425
+ verticalPos: 0,
1426
+ sequenceItems: [],
1427
+ activations: [],
1428
+ models: {
1429
+ getHeight: function() {
1430
+ return Math.max.apply(
1431
+ null,
1432
+ this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)
1433
+ ) + (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));
1434
+ },
1435
+ clear: function() {
1436
+ this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
1437
+ },
1438
+ addBox: function(t) {
1439
+ this.boxes.push(t);
1440
+ },
1441
+ addActor: function(t) {
1442
+ this.actors.push(t);
1443
+ },
1444
+ addLoop: function(t) {
1445
+ this.loops.push(t);
1446
+ },
1447
+ addMessage: function(t) {
1448
+ this.messages.push(t);
1449
+ },
1450
+ addNote: function(t) {
1451
+ this.notes.push(t);
1452
+ },
1453
+ lastActor: function() {
1454
+ return this.actors[this.actors.length - 1];
1455
+ },
1456
+ lastLoop: function() {
1457
+ return this.loops[this.loops.length - 1];
1458
+ },
1459
+ lastMessage: function() {
1460
+ return this.messages[this.messages.length - 1];
1461
+ },
1462
+ lastNote: function() {
1463
+ return this.notes[this.notes.length - 1];
1464
+ },
1465
+ actors: [],
1466
+ boxes: [],
1467
+ loops: [],
1468
+ messages: [],
1469
+ notes: []
1470
+ },
1471
+ init: function() {
1472
+ this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
1473
+ startx: void 0,
1474
+ stopx: void 0,
1475
+ starty: void 0,
1476
+ stopy: void 0
1477
+ }, this.verticalPos = 0, xe(ct());
1478
+ },
1479
+ updateVal: function(t, e, s, i) {
1480
+ t[e] === void 0 ? t[e] = s : t[e] = i(s, t[e]);
1481
+ },
1482
+ updateBounds: function(t, e, s, i) {
1483
+ const n = this;
1484
+ let a = 0;
1485
+ function o(l) {
1486
+ return function(h) {
1487
+ a++;
1488
+ const T = n.sequenceItems.length - a + 1;
1489
+ n.updateVal(h, "starty", e - T * r.boxMargin, Math.min), n.updateVal(h, "stopy", i + T * r.boxMargin, Math.max), n.updateVal(f.data, "startx", t - T * r.boxMargin, Math.min), n.updateVal(f.data, "stopx", s + T * r.boxMargin, Math.max), l !== "activation" && (n.updateVal(h, "startx", t - T * r.boxMargin, Math.min), n.updateVal(h, "stopx", s + T * r.boxMargin, Math.max), n.updateVal(f.data, "starty", e - T * r.boxMargin, Math.min), n.updateVal(f.data, "stopy", i + T * r.boxMargin, Math.max));
1490
+ };
1491
+ }
1492
+ this.sequenceItems.forEach(o()), this.activations.forEach(o("activation"));
1493
+ },
1494
+ insert: function(t, e, s, i) {
1495
+ const n = Math.min(t, s), a = Math.max(t, s), o = Math.min(e, i), l = Math.max(e, i);
1496
+ this.updateVal(f.data, "startx", n, Math.min), this.updateVal(f.data, "starty", o, Math.min), this.updateVal(f.data, "stopx", a, Math.max), this.updateVal(f.data, "stopy", l, Math.max), this.updateBounds(n, o, a, l);
1497
+ },
1498
+ newActivation: function(t, e, s) {
1499
+ const i = s[t.from.actor], n = St(t.from.actor).length || 0, a = i.x + i.width / 2 + (n - 1) * r.activationWidth / 2;
1500
+ this.activations.push({
1501
+ startx: a,
1502
+ starty: this.verticalPos + 2,
1503
+ stopx: a + r.activationWidth,
1504
+ stopy: void 0,
1505
+ actor: t.from.actor,
1506
+ anchored: S.anchorElement(e)
1507
+ });
1508
+ },
1509
+ endActivation: function(t) {
1510
+ const e = this.activations.map(function(s) {
1511
+ return s.actor;
1512
+ }).lastIndexOf(t.from.actor);
1513
+ return this.activations.splice(e, 1)[0];
1514
+ },
1515
+ createLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
1516
+ return {
1517
+ startx: void 0,
1518
+ starty: this.verticalPos,
1519
+ stopx: void 0,
1520
+ stopy: void 0,
1521
+ title: t.message,
1522
+ wrap: t.wrap,
1523
+ width: t.width,
1524
+ height: 0,
1525
+ fill: e
1526
+ };
1527
+ },
1528
+ newLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
1529
+ this.sequenceItems.push(this.createLoop(t, e));
1530
+ },
1531
+ endLoop: function() {
1532
+ return this.sequenceItems.pop();
1533
+ },
1534
+ addSectionToLoop: function(t) {
1535
+ const e = this.sequenceItems.pop();
1536
+ e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: f.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
1537
+ },
1538
+ bumpVerticalPos: function(t) {
1539
+ this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
1540
+ },
1541
+ getVerticalPos: function() {
1542
+ return this.verticalPos;
1543
+ },
1544
+ getBounds: function() {
1545
+ return { bounds: this.data, models: this.models };
1546
+ }
1547
+ }, _0 = function(t, e) {
1548
+ f.bumpVerticalPos(r.boxMargin), e.height = r.boxMargin, e.starty = f.getVerticalPos();
1549
+ const s = S.getNoteRect();
1550
+ s.x = e.startx, s.y = e.starty, s.width = e.width || r.width, s.class = "note";
1551
+ const i = t.append("g"), n = S.drawRect(i, s), a = S.getTextObj();
1552
+ a.x = e.startx, a.y = e.starty, a.width = s.width, a.dy = "1em", a.text = e.message, a.class = "noteText", a.fontFamily = r.noteFontFamily, a.fontSize = r.noteFontSize, a.fontWeight = r.noteFontWeight, a.anchor = r.noteAlign, a.textMargin = r.noteMargin, a.valign = "center";
1553
+ const o = gt(i, a), l = Math.round(
1554
+ o.map((p) => (p._groups || p)[0][0].getBBox().height).reduce((p, h) => p + h)
1555
+ );
1556
+ n.attr("height", l + 2 * r.noteMargin), e.height += l + 2 * r.noteMargin, f.bumpVerticalPos(l + 2 * r.noteMargin), e.stopy = e.starty + l + 2 * r.noteMargin, e.stopx = e.startx + s.width, f.insert(e.startx, e.starty, e.stopx, e.stopy), f.models.addNote(e);
1557
+ }, pt = (t) => ({
1558
+ fontFamily: t.messageFontFamily,
1559
+ fontSize: t.messageFontSize,
1560
+ fontWeight: t.messageFontWeight
1561
+ }), ft = (t) => ({
1562
+ fontFamily: t.noteFontFamily,
1563
+ fontSize: t.noteFontSize,
1564
+ fontWeight: t.noteFontWeight
1565
+ }), zt = (t) => ({
1566
+ fontFamily: t.actorFontFamily,
1567
+ fontSize: t.actorFontSize,
1568
+ fontWeight: t.actorFontWeight
1569
+ });
1570
+ function k0(t, e) {
1571
+ f.bumpVerticalPos(10);
1572
+ const { startx: s, stopx: i, message: n } = e, a = Pt.splitBreaks(n).length, o = C.calculateTextDimensions(n, pt(r)), l = o.height / a;
1573
+ e.height += l, f.bumpVerticalPos(l);
1574
+ let p, h = o.height - 10;
1575
+ const T = o.width;
1576
+ if (s === i) {
1577
+ p = f.getVerticalPos() + h, r.rightAngles || (h += r.boxMargin, p = f.getVerticalPos() + h), h += 30;
1578
+ const y = Math.max(T / 2, r.width / 2);
1579
+ f.insert(
1580
+ s - y,
1581
+ f.getVerticalPos() - 10 + h,
1582
+ i + y,
1583
+ f.getVerticalPos() + 30 + h
1584
+ );
1585
+ } else
1586
+ h += r.boxMargin, p = f.getVerticalPos() + h, f.insert(s, p - 10, i, p);
1587
+ return f.bumpVerticalPos(h), e.height += h, e.stopy = e.starty + e.height, f.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), p;
1588
+ }
1589
+ const L0 = function(t, e, s, i) {
1590
+ const { startx: n, stopx: a, starty: o, message: l, type: p, sequenceIndex: h, sequenceVisible: T } = e, y = C.calculateTextDimensions(l, pt(r)), u = S.getTextObj();
1591
+ u.x = n, u.y = o + 10, u.width = a - n, u.class = "messageText", u.dy = "1em", u.text = l, u.fontFamily = r.messageFontFamily, u.fontSize = r.messageFontSize, u.fontWeight = r.messageFontWeight, u.anchor = r.messageAlign, u.valign = "center", u.textMargin = r.wrapPadding, u.tspan = !1, gt(t, u);
1592
+ const x = y.width;
1593
+ let b;
1594
+ n === a ? r.rightAngles ? b = t.append("path").attr(
1595
+ "d",
1596
+ `M ${n},${s} H ${n + Math.max(r.width / 2, x / 2)} V ${s + 25} H ${n}`
1597
+ ) : b = t.append("path").attr(
1598
+ "d",
1599
+ "M " + n + "," + s + " C " + (n + 60) + "," + (s - 10) + " " + (n + 60) + "," + (s + 30) + " " + n + "," + (s + 20)
1600
+ ) : (b = t.append("line"), b.attr("x1", n), b.attr("y1", s), b.attr("x2", a), b.attr("y2", s)), p === i.db.LINETYPE.DOTTED || p === i.db.LINETYPE.DOTTED_CROSS || p === i.db.LINETYPE.DOTTED_POINT || p === i.db.LINETYPE.DOTTED_OPEN ? (b.style("stroke-dasharray", "3, 3"), b.attr("class", "messageLine1")) : b.attr("class", "messageLine0");
1601
+ let k = "";
1602
+ r.arrowMarkerAbsolute && (k = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, k = k.replace(/\(/g, "\\("), k = k.replace(/\)/g, "\\)")), b.attr("stroke-width", 2), b.attr("stroke", "none"), b.style("fill", "none"), (p === i.db.LINETYPE.SOLID || p === i.db.LINETYPE.DOTTED) && b.attr("marker-end", "url(" + k + "#arrowhead)"), (p === i.db.LINETYPE.SOLID_POINT || p === i.db.LINETYPE.DOTTED_POINT) && b.attr("marker-end", "url(" + k + "#filled-head)"), (p === i.db.LINETYPE.SOLID_CROSS || p === i.db.LINETYPE.DOTTED_CROSS) && b.attr("marker-end", "url(" + k + "#crosshead)"), (T || r.showSequenceNumbers) && (b.attr("marker-start", "url(" + k + "#sequencenumber)"), t.append("text").attr("x", n).attr("y", s + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(h));
1603
+ }, qt = function(t, e, s, i, n, a, o) {
1604
+ if (n.hideUnusedParticipants === !0) {
1605
+ const y = /* @__PURE__ */ new Set();
1606
+ a.forEach((u) => {
1607
+ y.add(u.from), y.add(u.to);
1608
+ }), s = s.filter((u) => y.has(u));
1609
+ }
1610
+ let l = 0, p = 0, h = 0, T;
1611
+ for (const y of s) {
1612
+ const u = e[y], x = u.box;
1613
+ T && T != x && (o || f.models.addBox(T), p += r.boxMargin + T.margin), x && x != T && (o || (x.x = l + p, x.y = i), p += x.margin), u.width = u.width || r.width, u.height = Math.max(u.height || r.height, r.height), u.margin = u.margin || r.actorMargin, u.x = l + p, u.y = f.getVerticalPos();
1614
+ const b = S.drawActor(t, u, r, o);
1615
+ h = Math.max(h, b), f.insert(u.x, i, u.x + u.width, u.height), l += u.width + p, u.box && (u.box.width = l + x.margin - u.box.x), p = u.margin, T = u.box, f.models.addActor(u);
1616
+ }
1617
+ T && !o && f.models.addBox(T), f.bumpVerticalPos(h);
1618
+ }, fe = function(t, e, s, i) {
1619
+ let n = 0, a = 0;
1620
+ for (const o of s) {
1621
+ const l = e[o], p = N0(l), h = S.drawPopup(
1622
+ t,
1623
+ l,
1624
+ p,
1625
+ r,
1626
+ r.forceMenus,
1627
+ i
1628
+ );
1629
+ h.height > n && (n = h.height), h.width + l.x > a && (a = h.width + l.x);
1630
+ }
1631
+ return { maxHeight: n, maxWidth: a };
1632
+ }, xe = function(t) {
1633
+ Ie(r, t), t.fontFamily && (r.actorFontFamily = r.noteFontFamily = r.messageFontFamily = t.fontFamily), t.fontSize && (r.actorFontSize = r.noteFontSize = r.messageFontSize = t.fontSize), t.fontWeight && (r.actorFontWeight = r.noteFontWeight = r.messageFontWeight = t.fontWeight);
1634
+ }, St = function(t) {
1635
+ return f.activations.filter(function(e) {
1636
+ return e.actor === t;
1637
+ });
1638
+ }, $t = function(t, e) {
1639
+ const s = e[t], i = St(t), n = i.reduce(function(o, l) {
1640
+ return Math.min(o, l.startx);
1641
+ }, s.x + s.width / 2), a = i.reduce(function(o, l) {
1642
+ return Math.max(o, l.stopx);
1643
+ }, s.x + s.width / 2);
1644
+ return [n, a];
1645
+ };
1646
+ function $(t, e, s, i, n) {
1647
+ f.bumpVerticalPos(s);
1648
+ let a = i;
1649
+ if (e.id && e.message && t[e.id]) {
1650
+ const o = t[e.id].width, l = pt(r);
1651
+ e.message = C.wrapLabel(`[${e.message}]`, o - 2 * r.wrapPadding, l), e.width = o, e.wrap = !0;
1652
+ const p = C.calculateTextDimensions(e.message, l), h = Math.max(p.height, r.labelBoxHeight);
1653
+ a = i + h, K.debug(`${h} - ${e.message}`);
1654
+ }
1655
+ n(e), f.bumpVerticalPos(a);
1656
+ }
1657
+ const P0 = function(t, e, s, i) {
1658
+ const { securityLevel: n, sequence: a } = ct();
1659
+ r = a, i.db.clear(), i.parser.parse(t);
1660
+ let o;
1661
+ n === "sandbox" && (o = _t("#i" + e));
1662
+ const l = n === "sandbox" ? _t(o.nodes()[0].contentDocument.body) : _t("body"), p = n === "sandbox" ? o.nodes()[0].contentDocument : document;
1663
+ f.init(), K.debug(i.db);
1664
+ const h = n === "sandbox" ? l.select(`[id="${e}"]`) : _t(`[id="${e}"]`), T = i.db.getActors(), y = i.db.getBoxes(), u = i.db.getActorKeys(), x = i.db.getMessages(), b = i.db.getDiagramTitle(), k = i.db.hasAtLeastOneBox(), N = i.db.hasAtLeastOneBoxWithTitle(), M = I0(T, x, i);
1665
+ r.height = A0(T, M, y), S.insertComputerIcon(h), S.insertDatabaseIcon(h), S.insertClockIcon(h), k && (f.bumpVerticalPos(r.boxMargin), N && f.bumpVerticalPos(y[0].textMaxHeight)), qt(h, T, u, 0, r, x, !1);
1666
+ const P = R0(x, T, M, i);
1667
+ S.insertArrowHead(h), S.insertArrowCrossHead(h), S.insertArrowFilledHead(h), S.insertSequenceNumber(h);
1668
+ function B(E, L) {
1669
+ const v = f.endActivation(E);
1670
+ v.starty + 18 > L && (v.starty = L - 6, L += 12), S.drawActivation(
1671
+ h,
1672
+ v,
1673
+ L,
1674
+ r,
1675
+ St(E.from.actor).length
1676
+ ), f.insert(v.startx, L - 10, v.stopx, L);
1677
+ }
1678
+ let V = 1, z = 1;
1679
+ const G = [];
1680
+ x.forEach(function(E) {
1681
+ let L, v, U;
1682
+ switch (E.type) {
1683
+ case i.db.LINETYPE.NOTE:
1684
+ v = E.noteModel, _0(h, v);
1685
+ break;
1686
+ case i.db.LINETYPE.ACTIVE_START:
1687
+ f.newActivation(E, h, T);
1688
+ break;
1689
+ case i.db.LINETYPE.ACTIVE_END:
1690
+ B(E, f.getVerticalPos());
1691
+ break;
1692
+ case i.db.LINETYPE.LOOP_START:
1693
+ $(
1694
+ P,
1695
+ E,
1696
+ r.boxMargin,
1697
+ r.boxMargin + r.boxTextMargin,
1698
+ (I) => f.newLoop(I)
1699
+ );
1700
+ break;
1701
+ case i.db.LINETYPE.LOOP_END:
1702
+ L = f.endLoop(), S.drawLoop(h, L, "loop", r), f.bumpVerticalPos(L.stopy - f.getVerticalPos()), f.models.addLoop(L);
1703
+ break;
1704
+ case i.db.LINETYPE.RECT_START:
1705
+ $(
1706
+ P,
1707
+ E,
1708
+ r.boxMargin,
1709
+ r.boxMargin,
1710
+ (I) => f.newLoop(void 0, I.message)
1711
+ );
1712
+ break;
1713
+ case i.db.LINETYPE.RECT_END:
1714
+ L = f.endLoop(), S.drawBackgroundRect(h, L), f.models.addLoop(L), f.bumpVerticalPos(L.stopy - f.getVerticalPos());
1715
+ break;
1716
+ case i.db.LINETYPE.OPT_START:
1717
+ $(
1718
+ P,
1719
+ E,
1720
+ r.boxMargin,
1721
+ r.boxMargin + r.boxTextMargin,
1722
+ (I) => f.newLoop(I)
1723
+ );
1724
+ break;
1725
+ case i.db.LINETYPE.OPT_END:
1726
+ L = f.endLoop(), S.drawLoop(h, L, "opt", r), f.bumpVerticalPos(L.stopy - f.getVerticalPos()), f.models.addLoop(L);
1727
+ break;
1728
+ case i.db.LINETYPE.ALT_START:
1729
+ $(
1730
+ P,
1731
+ E,
1732
+ r.boxMargin,
1733
+ r.boxMargin + r.boxTextMargin,
1734
+ (I) => f.newLoop(I)
1735
+ );
1736
+ break;
1737
+ case i.db.LINETYPE.ALT_ELSE:
1738
+ $(
1739
+ P,
1740
+ E,
1741
+ r.boxMargin + r.boxTextMargin,
1742
+ r.boxMargin,
1743
+ (I) => f.addSectionToLoop(I)
1744
+ );
1745
+ break;
1746
+ case i.db.LINETYPE.ALT_END:
1747
+ L = f.endLoop(), S.drawLoop(h, L, "alt", r), f.bumpVerticalPos(L.stopy - f.getVerticalPos()), f.models.addLoop(L);
1748
+ break;
1749
+ case i.db.LINETYPE.PAR_START:
1750
+ $(
1751
+ P,
1752
+ E,
1753
+ r.boxMargin,
1754
+ r.boxMargin + r.boxTextMargin,
1755
+ (I) => f.newLoop(I)
1756
+ );
1757
+ break;
1758
+ case i.db.LINETYPE.PAR_AND:
1759
+ $(
1760
+ P,
1761
+ E,
1762
+ r.boxMargin + r.boxTextMargin,
1763
+ r.boxMargin,
1764
+ (I) => f.addSectionToLoop(I)
1765
+ );
1766
+ break;
1767
+ case i.db.LINETYPE.PAR_END:
1768
+ L = f.endLoop(), S.drawLoop(h, L, "par", r), f.bumpVerticalPos(L.stopy - f.getVerticalPos()), f.models.addLoop(L);
1769
+ break;
1770
+ case i.db.LINETYPE.AUTONUMBER:
1771
+ V = E.message.start || V, z = E.message.step || z, E.message.visible ? i.db.enableSequenceNumbers() : i.db.disableSequenceNumbers();
1772
+ break;
1773
+ case i.db.LINETYPE.CRITICAL_START:
1774
+ $(
1775
+ P,
1776
+ E,
1777
+ r.boxMargin,
1778
+ r.boxMargin + r.boxTextMargin,
1779
+ (I) => f.newLoop(I)
1780
+ );
1781
+ break;
1782
+ case i.db.LINETYPE.CRITICAL_OPTION:
1783
+ $(
1784
+ P,
1785
+ E,
1786
+ r.boxMargin + r.boxTextMargin,
1787
+ r.boxMargin,
1788
+ (I) => f.addSectionToLoop(I)
1789
+ );
1790
+ break;
1791
+ case i.db.LINETYPE.CRITICAL_END:
1792
+ L = f.endLoop(), S.drawLoop(h, L, "critical", r), f.bumpVerticalPos(L.stopy - f.getVerticalPos()), f.models.addLoop(L);
1793
+ break;
1794
+ case i.db.LINETYPE.BREAK_START:
1795
+ $(
1796
+ P,
1797
+ E,
1798
+ r.boxMargin,
1799
+ r.boxMargin + r.boxTextMargin,
1800
+ (I) => f.newLoop(I)
1801
+ );
1802
+ break;
1803
+ case i.db.LINETYPE.BREAK_END:
1804
+ L = f.endLoop(), S.drawLoop(h, L, "break", r), f.bumpVerticalPos(L.stopy - f.getVerticalPos()), f.models.addLoop(L);
1805
+ break;
1806
+ default:
1807
+ try {
1808
+ U = E.msgModel, U.starty = f.getVerticalPos(), U.sequenceIndex = V, U.sequenceVisible = i.db.showSequenceNumbers();
1809
+ const I = k0(h, U);
1810
+ G.push({ messageModel: U, lineStartY: I }), f.models.addMessage(U);
1811
+ } catch (I) {
1812
+ K.error("error while drawing message", I);
1813
+ }
1814
+ }
1815
+ [
1816
+ i.db.LINETYPE.SOLID_OPEN,
1817
+ i.db.LINETYPE.DOTTED_OPEN,
1818
+ i.db.LINETYPE.SOLID,
1819
+ i.db.LINETYPE.DOTTED,
1820
+ i.db.LINETYPE.SOLID_CROSS,
1821
+ i.db.LINETYPE.DOTTED_CROSS,
1822
+ i.db.LINETYPE.SOLID_POINT,
1823
+ i.db.LINETYPE.DOTTED_POINT
1824
+ ].includes(E.type) && (V = V + z);
1825
+ }), G.forEach((E) => L0(h, E.messageModel, E.lineStartY, i)), r.mirrorActors && (f.bumpVerticalPos(r.boxMargin * 2), qt(h, T, u, f.getVerticalPos(), r, x, !0), f.bumpVerticalPos(r.boxMargin), pe(h, f.getVerticalPos())), f.models.boxes.forEach(function(E) {
1826
+ E.height = f.getVerticalPos() - E.y, f.insert(E.x, E.y, E.x + E.width, E.height), E.startx = E.x, E.starty = E.y, E.stopx = E.startx + E.width, E.stopy = E.starty + E.height, E.stroke = "rgb(0,0,0, 0.5)", S.drawBox(h, E, r);
1827
+ }), k && f.bumpVerticalPos(r.boxMargin);
1828
+ const Y = fe(h, T, u, p), { bounds: D } = f.getBounds();
1829
+ K.debug("For line height fix Querying: #" + e + " .actor-line"), Se("#" + e + " .actor-line").attr("y2", D.stopy);
1830
+ let q = D.stopy - D.starty;
1831
+ q < Y.maxHeight && (q = Y.maxHeight);
1832
+ let F = q + 2 * r.diagramMarginY;
1833
+ r.mirrorActors && (F = F - r.boxMargin + r.bottomMarginAdj);
1834
+ let H = D.stopx - D.startx;
1835
+ H < Y.maxWidth && (H = Y.maxWidth);
1836
+ const J = H + 2 * r.diagramMarginX;
1837
+ b && h.append("text").text(b).attr("x", (D.stopx - D.startx) / 2 - 2 * r.diagramMarginX).attr("y", -25), Ne(h, F, J, r.useMaxWidth);
1838
+ const Q = b ? 40 : 0;
1839
+ h.attr(
1840
+ "viewBox",
1841
+ D.startx - r.diagramMarginX + " -" + (r.diagramMarginY + Q) + " " + J + " " + (F + Q)
1842
+ ), K.debug("models:", f.models);
1843
+ };
1844
+ function I0(t, e, s) {
1845
+ const i = {};
1846
+ return e.forEach(function(n) {
1847
+ if (t[n.to] && t[n.from]) {
1848
+ const a = t[n.to];
1849
+ if (n.placement === s.db.PLACEMENT.LEFTOF && !a.prevActor || n.placement === s.db.PLACEMENT.RIGHTOF && !a.nextActor)
1850
+ return;
1851
+ const o = n.placement !== void 0, l = !o, p = o ? ft(r) : pt(r), h = n.wrap ? C.wrapLabel(n.message, r.width - 2 * r.wrapPadding, p) : n.message, y = C.calculateTextDimensions(h, p).width + 2 * r.wrapPadding;
1852
+ l && n.from === a.nextActor ? i[n.to] = Math.max(
1853
+ i[n.to] || 0,
1854
+ y
1855
+ ) : l && n.from === a.prevActor ? i[n.from] = Math.max(
1856
+ i[n.from] || 0,
1857
+ y
1858
+ ) : l && n.from === n.to ? (i[n.from] = Math.max(
1859
+ i[n.from] || 0,
1860
+ y / 2
1861
+ ), i[n.to] = Math.max(
1862
+ i[n.to] || 0,
1863
+ y / 2
1864
+ )) : n.placement === s.db.PLACEMENT.RIGHTOF ? i[n.from] = Math.max(
1865
+ i[n.from] || 0,
1866
+ y
1867
+ ) : n.placement === s.db.PLACEMENT.LEFTOF ? i[a.prevActor] = Math.max(
1868
+ i[a.prevActor] || 0,
1869
+ y
1870
+ ) : n.placement === s.db.PLACEMENT.OVER && (a.prevActor && (i[a.prevActor] = Math.max(
1871
+ i[a.prevActor] || 0,
1872
+ y / 2
1873
+ )), a.nextActor && (i[n.from] = Math.max(
1874
+ i[n.from] || 0,
1875
+ y / 2
1876
+ )));
1877
+ }
1878
+ }), K.debug("maxMessageWidthPerActor:", i), i;
1879
+ }
1880
+ const N0 = function(t) {
1881
+ let e = 0;
1882
+ const s = zt(r);
1883
+ for (const i in t.links) {
1884
+ const a = C.calculateTextDimensions(i, s).width + 2 * r.wrapPadding + 2 * r.boxMargin;
1885
+ e < a && (e = a);
1886
+ }
1887
+ return e;
1888
+ };
1889
+ function A0(t, e, s) {
1890
+ let i = 0;
1891
+ Object.keys(t).forEach((a) => {
1892
+ const o = t[a];
1893
+ o.wrap && (o.description = C.wrapLabel(
1894
+ o.description,
1895
+ r.width - 2 * r.wrapPadding,
1896
+ zt(r)
1897
+ ));
1898
+ const l = C.calculateTextDimensions(o.description, zt(r));
1899
+ o.width = o.wrap ? r.width : Math.max(r.width, l.width + 2 * r.wrapPadding), o.height = o.wrap ? Math.max(l.height, r.height) : r.height, i = Math.max(i, o.height);
1900
+ });
1901
+ for (const a in e) {
1902
+ const o = t[a];
1903
+ if (!o)
1904
+ continue;
1905
+ const l = t[o.nextActor];
1906
+ if (!l) {
1907
+ const y = e[a] + r.actorMargin - o.width / 2;
1908
+ o.margin = Math.max(y, r.actorMargin);
1909
+ continue;
1910
+ }
1911
+ const h = e[a] + r.actorMargin - o.width / 2 - l.width / 2;
1912
+ o.margin = Math.max(h, r.actorMargin);
1913
+ }
1914
+ let n = 0;
1915
+ return s.forEach((a) => {
1916
+ const o = pt(r);
1917
+ let l = a.actorKeys.reduce((T, y) => T += t[y].width + (t[y].margin || 0), 0);
1918
+ l -= 2 * r.boxTextMargin, a.wrap && (a.name = C.wrapLabel(a.name, l - 2 * r.wrapPadding, o));
1919
+ const p = C.calculateTextDimensions(a.name, o);
1920
+ n = Math.max(p.height, n);
1921
+ const h = Math.max(l, p.width + 2 * r.wrapPadding);
1922
+ if (a.margin = r.boxTextMargin, l < h) {
1923
+ const T = (h - l) / 2;
1924
+ a.margin += T;
1925
+ }
1926
+ }), s.forEach((a) => a.textMaxHeight = n), Math.max(i, r.height);
1927
+ }
1928
+ const S0 = function(t, e, s) {
1929
+ const i = e[t.from].x, n = e[t.to].x, a = t.wrap && t.message;
1930
+ let o = C.calculateTextDimensions(
1931
+ a ? C.wrapLabel(t.message, r.width, ft(r)) : t.message,
1932
+ ft(r)
1933
+ );
1934
+ const l = {
1935
+ width: a ? r.width : Math.max(r.width, o.width + 2 * r.noteMargin),
1936
+ height: 0,
1937
+ startx: e[t.from].x,
1938
+ stopx: 0,
1939
+ starty: 0,
1940
+ stopy: 0,
1941
+ message: t.message
1942
+ };
1943
+ return t.placement === s.db.PLACEMENT.RIGHTOF ? (l.width = a ? Math.max(r.width, o.width) : Math.max(
1944
+ e[t.from].width / 2 + e[t.to].width / 2,
1945
+ o.width + 2 * r.noteMargin
1946
+ ), l.startx = i + (e[t.from].width + r.actorMargin) / 2) : t.placement === s.db.PLACEMENT.LEFTOF ? (l.width = Math.max(a ? r.width : e[t.from].width / 2 + e[t.to].width / 2, o.width + 2 * r.noteMargin), l.startx = i - l.width + (e[t.from].width - r.actorMargin) / 2) : t.to === t.from ? (o = C.calculateTextDimensions(
1947
+ a ? C.wrapLabel(t.message, Math.max(r.width, e[t.from].width), ft(r)) : t.message,
1948
+ ft(r)
1949
+ ), l.width = a ? Math.max(r.width, e[t.from].width) : Math.max(e[t.from].width, r.width, o.width + 2 * r.noteMargin), l.startx = i + (e[t.from].width - l.width) / 2) : (l.width = Math.abs(i + e[t.from].width / 2 - (n + e[t.to].width / 2)) + r.actorMargin, l.startx = i < n ? i + e[t.from].width / 2 - r.actorMargin / 2 : n + e[t.to].width / 2 - r.actorMargin / 2), a && (l.message = C.wrapLabel(
1950
+ t.message,
1951
+ l.width - 2 * r.wrapPadding,
1952
+ ft(r)
1953
+ )), K.debug(
1954
+ `NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`
1955
+ ), l;
1956
+ }, M0 = function(t, e, s) {
1957
+ let i = !1;
1958
+ if ([
1959
+ s.db.LINETYPE.SOLID_OPEN,
1960
+ s.db.LINETYPE.DOTTED_OPEN,
1961
+ s.db.LINETYPE.SOLID,
1962
+ s.db.LINETYPE.DOTTED,
1963
+ s.db.LINETYPE.SOLID_CROSS,
1964
+ s.db.LINETYPE.DOTTED_CROSS,
1965
+ s.db.LINETYPE.SOLID_POINT,
1966
+ s.db.LINETYPE.DOTTED_POINT
1967
+ ].includes(t.type) && (i = !0), !i)
1968
+ return {};
1969
+ const n = $t(t.from, e), a = $t(t.to, e), o = n[0] <= a[0] ? 1 : 0, l = n[0] < a[0] ? 0 : 1, p = [...n, ...a], h = Math.abs(a[l] - n[o]);
1970
+ t.wrap && t.message && (t.message = C.wrapLabel(
1971
+ t.message,
1972
+ Math.max(h + 2 * r.wrapPadding, r.width),
1973
+ pt(r)
1974
+ ));
1975
+ const T = C.calculateTextDimensions(t.message, pt(r));
1976
+ return {
1977
+ width: Math.max(
1978
+ t.wrap ? 0 : T.width + 2 * r.wrapPadding,
1979
+ h + 2 * r.wrapPadding,
1980
+ r.width
1981
+ ),
1982
+ height: 0,
1983
+ startx: n[o],
1984
+ stopx: a[l],
1985
+ starty: 0,
1986
+ stopy: 0,
1987
+ message: t.message,
1988
+ type: t.type,
1989
+ wrap: t.wrap,
1990
+ fromBounds: Math.min.apply(null, p),
1991
+ toBounds: Math.max.apply(null, p)
1992
+ };
1993
+ }, R0 = function(t, e, s, i) {
1994
+ const n = {}, a = [];
1995
+ let o, l, p;
1996
+ return t.forEach(function(h) {
1997
+ switch (h.id = C.random({ length: 10 }), h.type) {
1998
+ case i.db.LINETYPE.LOOP_START:
1999
+ case i.db.LINETYPE.ALT_START:
2000
+ case i.db.LINETYPE.OPT_START:
2001
+ case i.db.LINETYPE.PAR_START:
2002
+ case i.db.LINETYPE.CRITICAL_START:
2003
+ case i.db.LINETYPE.BREAK_START:
2004
+ a.push({
2005
+ id: h.id,
2006
+ msg: h.message,
2007
+ from: Number.MAX_SAFE_INTEGER,
2008
+ to: Number.MIN_SAFE_INTEGER,
2009
+ width: 0
2010
+ });
2011
+ break;
2012
+ case i.db.LINETYPE.ALT_ELSE:
2013
+ case i.db.LINETYPE.PAR_AND:
2014
+ case i.db.LINETYPE.CRITICAL_OPTION:
2015
+ h.message && (o = a.pop(), n[o.id] = o, n[h.id] = o, a.push(o));
2016
+ break;
2017
+ case i.db.LINETYPE.LOOP_END:
2018
+ case i.db.LINETYPE.ALT_END:
2019
+ case i.db.LINETYPE.OPT_END:
2020
+ case i.db.LINETYPE.PAR_END:
2021
+ case i.db.LINETYPE.CRITICAL_END:
2022
+ case i.db.LINETYPE.BREAK_END:
2023
+ o = a.pop(), n[o.id] = o;
2024
+ break;
2025
+ case i.db.LINETYPE.ACTIVE_START:
2026
+ {
2027
+ const y = e[h.from ? h.from.actor : h.to.actor], u = St(h.from ? h.from.actor : h.to.actor).length, x = y.x + y.width / 2 + (u - 1) * r.activationWidth / 2, b = {
2028
+ startx: x,
2029
+ stopx: x + r.activationWidth,
2030
+ actor: h.from.actor,
2031
+ enabled: !0
2032
+ };
2033
+ f.activations.push(b);
2034
+ }
2035
+ break;
2036
+ case i.db.LINETYPE.ACTIVE_END:
2037
+ {
2038
+ const y = f.activations.map((u) => u.actor).lastIndexOf(h.from.actor);
2039
+ delete f.activations.splice(y, 1)[0];
2040
+ }
2041
+ break;
2042
+ }
2043
+ h.placement !== void 0 ? (l = S0(h, e, i), h.noteModel = l, a.forEach((y) => {
2044
+ o = y, o.from = Math.min(o.from, l.startx), o.to = Math.max(o.to, l.startx + l.width), o.width = Math.max(o.width, Math.abs(o.from - o.to)) - r.labelBoxWidth;
2045
+ })) : (p = M0(h, e, i), h.msgModel = p, p.startx && p.stopx && a.length > 0 && a.forEach((y) => {
2046
+ if (o = y, p.startx === p.stopx) {
2047
+ const u = e[h.from], x = e[h.to];
2048
+ o.from = Math.min(
2049
+ u.x - p.width / 2,
2050
+ u.x - u.width / 2,
2051
+ o.from
2052
+ ), o.to = Math.max(x.x + p.width / 2, x.x + u.width / 2, o.to), o.width = Math.max(o.width, Math.abs(o.to - o.from)) - r.labelBoxWidth;
2053
+ } else
2054
+ o.from = Math.min(p.startx, o.from), o.to = Math.max(p.stopx, o.to), o.width = Math.max(o.width, p.width) - r.labelBoxWidth;
2055
+ }));
2056
+ }), f.activations = [], K.debug("Loop type widths:", n), n;
2057
+ }, D0 = {
2058
+ bounds: f,
2059
+ drawActors: qt,
2060
+ drawActorsPopup: fe,
2061
+ setConf: xe,
2062
+ draw: P0
2063
+ }, O0 = {
2064
+ parser: Me,
2065
+ db: e0,
2066
+ renderer: D0,
2067
+ styles: n0
2068
+ };
2069
+ export {
2070
+ O0 as diagram
2071
+ };