@wzh-/ai-chat-example 1.0.13 → 1.0.15

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 (49) hide show
  1. package/dist/css/index.css +1 -1
  2. package/dist/js/_baseFor.js +309 -0
  3. package/dist/js/architecture-U656AL7Q.js +3 -4
  4. package/dist/js/architectureDiagram-VXUJARFQ.js +53 -54
  5. package/dist/js/blockDiagram-VD42YOAC.js +449 -449
  6. package/dist/js/c4Diagram-YG6GDRKO.js +87 -87
  7. package/dist/js/chunk-B4BG7PRW.js +160 -160
  8. package/dist/js/chunk-DI55MBZ5.js +98 -98
  9. package/dist/js/chunk-FPAJGGOC.js +1373 -197
  10. package/dist/js/chunk-JA3XYJ7Z.js +36 -36
  11. package/dist/js/chunk-JZLCHNYA.js +1461 -1461
  12. package/dist/js/chunk-N4CR4FBY.js +5 -5
  13. package/dist/js/chunk-QXUST7PY.js +226 -226
  14. package/dist/js/chunk-S3R3BYOJ.js +602 -454
  15. package/dist/js/classDiagram-2ON5EDUG.js +2 -2
  16. package/dist/js/classDiagram-v2-WZHVMYZB.js +2 -2
  17. package/dist/js/clone.js +1 -1
  18. package/dist/js/dagre-6UL2VRFP.js +152 -152
  19. package/dist/js/dagre.js +1034 -933
  20. package/dist/js/diagram-PSM6KHXK.js +58 -59
  21. package/dist/js/diagram-QEK2KX5R.js +53 -54
  22. package/dist/js/diagram-S2PKOQOG.js +24 -25
  23. package/dist/js/erDiagram-Q2GNP2WA.js +96 -96
  24. package/dist/js/flatten.js +34 -0
  25. package/dist/js/flowDiagram-NV44I4VS.js +166 -166
  26. package/dist/js/ganttDiagram-JELNMOA3.js +916 -916
  27. package/dist/js/gitGraph-F6HP7TQM.js +3 -4
  28. package/dist/js/gitGraphDiagram-NY62KEGX.js +373 -374
  29. package/dist/js/graphlib.js +264 -143
  30. package/dist/js/index.js +3280 -3266
  31. package/dist/js/info-NVLQJR56.js +3 -4
  32. package/dist/js/infoDiagram-WHAUD3N6.js +3 -4
  33. package/dist/js/isEmpty.js +18 -18
  34. package/dist/js/kanban-definition-3W4ZIXB7.js +2 -2
  35. package/dist/js/line.js +7 -7
  36. package/dist/js/mermaid.core.js +65 -65
  37. package/dist/js/mindmap-definition-VGOIOE7T.js +2 -2
  38. package/dist/js/packet-BFZMPI3H.js +3 -4
  39. package/dist/js/pie-7BOR55EZ.js +3 -4
  40. package/dist/js/pieDiagram-ADFJNKIX.js +39 -40
  41. package/dist/js/radar-NHE76QYJ.js +3 -4
  42. package/dist/js/reduce.js +451 -0
  43. package/dist/js/requirementDiagram-UZGBJVZJ.js +16 -16
  44. package/dist/js/sequenceDiagram-WL72ISMW.js +731 -731
  45. package/dist/js/stateDiagram-FKZM4ZOC.js +83 -83
  46. package/dist/js/stateDiagram-v2-4FDKWEC3.js +2 -2
  47. package/dist/js/treemap-KMMF4GRG.js +3 -4
  48. package/dist/js/xychartDiagram-PRI3JC2R.js +25 -25
  49. package/package.json +14 -7
@@ -1,17 +1,17 @@
1
- import "./isArrayLikeObject.js";
2
- import { g as utils_default, p as parseFontSize, t as ZERO_WIDTH_SPACE } from "./chunk-S3R3BYOJ.js";
1
+ import "./_baseFor.js";
3
2
  import { g as log, h as __name, p as select_default } from "./src.js";
4
3
  import { B as setAccTitle, C as getDiagramTitle, E as getUrl, H as setConfig2, I as sanitizeText, N as renderKatexSanitized, O as hasKatex, U as setDiagramTitle, _ as getAccDescription, a as clear, b as getConfig2, c as configureSvgSize, i as calculateMathMLDimensions, r as assignWithDepth_default, s as common_default, v as getAccTitle, y as getConfig, z as setAccDescription } from "./chunk-ABZYJK2D.js";
5
4
  import "./math.js";
5
+ import { g as utils_default, p as parseFontSize, t as ZERO_WIDTH_SPACE } from "./chunk-S3R3BYOJ.js";
6
6
  import { t as require_dist } from "./dist.js";
7
7
  import { i as drawRect, n as drawEmbeddedImage, o as getNoteRect, r as drawImage, s as getTextObj, t as drawBackgroundRect } from "./chunk-TZMSLE5B.js";
8
8
  import { n as load, t as JSON_SCHEMA } from "./chunk-MI3HLSF2.js";
9
9
  import { t as ImperativeState } from "./chunk-QZHKN3VN.js";
10
10
  var import_dist = require_dist(), parser = (function() {
11
- var t = /* @__PURE__ */ __name(function(t, l, u, d) {
12
- for (u ||= {}, d = t.length; d--; u[t[d]] = l);
11
+ var n = /* @__PURE__ */ __name(function(n, l, u, d) {
12
+ for (u ||= {}, d = n.length; d--; u[n[d]] = l);
13
13
  return u;
14
- }, "o"), l = [1, 2], u = [1, 3], d = [1, 4], p = [2, 4], m = [1, 9], h = [1, 11], g = [1, 13], _ = [1, 14], v = [1, 16], y = [1, 17], b = [1, 18], x = [1, 24], S = [1, 25], C = [1, 26], w = [1, 27], T = [1, 28], E = [1, 29], D = [1, 30], O = [1, 31], k = [1, 32], A = [1, 33], j = [1, 34], M = [1, 35], N = [1, 36], P = [1, 37], F = [1, 38], I = [1, 39], L = [1, 41], R = [1, 42], z = [1, 43], B = [1, 44], V = [1, 45], H = [1, 46], U = [
14
+ }, "o"), u = [1, 2], d = [1, 3], f = [1, 4], p = [2, 4], m = [1, 9], h = [1, 11], g = [1, 13], _ = [1, 14], v = [1, 16], y = [1, 17], b = [1, 18], x = [1, 24], S = [1, 25], C = [1, 26], w = [1, 27], T = [1, 28], E = [1, 29], D = [1, 30], O = [1, 31], k = [1, 32], A = [1, 33], j = [1, 34], M = [1, 35], N = [1, 36], P = [1, 37], F = [1, 38], I = [1, 39], L = [1, 41], R = [1, 42], z = [1, 43], B = [1, 44], V = [1, 45], H = [1, 46], U = [
15
15
  1,
16
16
  4,
17
17
  5,
@@ -424,7 +424,7 @@ var import_dist = require_dist(), parser = (function() {
424
424
  [68, 1],
425
425
  [57, 1]
426
426
  ],
427
- performAction: /* @__PURE__ */ __name(function(t, l, u, d, f, p, m) {
427
+ performAction: /* @__PURE__ */ __name(function(n, l, u, d, f, p, m) {
428
428
  var h = p.length - 1;
429
429
  switch (f) {
430
430
  case 3: return d.apply(p[h]), p[h];
@@ -800,24 +800,24 @@ var import_dist = require_dist(), parser = (function() {
800
800
  table: [
801
801
  {
802
802
  3: 1,
803
- 4: l,
804
- 5: u,
805
- 6: d
803
+ 4: u,
804
+ 5: d,
805
+ 6: f
806
806
  },
807
807
  { 1: [3] },
808
808
  {
809
809
  3: 5,
810
- 4: l,
811
- 5: u,
812
- 6: d
810
+ 4: u,
811
+ 5: d,
812
+ 6: f
813
813
  },
814
814
  {
815
815
  3: 6,
816
- 4: l,
817
- 5: u,
818
- 6: d
816
+ 4: u,
817
+ 5: d,
818
+ 6: f
819
819
  },
820
- t([
820
+ n([
821
821
  1,
822
822
  4,
823
823
  5,
@@ -893,7 +893,7 @@ var import_dist = require_dist(), parser = (function() {
893
893
  63: V,
894
894
  71: H
895
895
  },
896
- t(U, [2, 5]),
896
+ n(U, [2, 5]),
897
897
  {
898
898
  9: 47,
899
899
  12: 12,
@@ -932,9 +932,9 @@ var import_dist = require_dist(), parser = (function() {
932
932
  63: V,
933
933
  71: H
934
934
  },
935
- t(U, [2, 7]),
936
- t(U, [2, 8]),
937
- t(U, [2, 14]),
935
+ n(U, [2, 7]),
936
+ n(U, [2, 8]),
937
+ n(U, [2, 14]),
938
938
  {
939
939
  12: 48,
940
940
  50: P,
@@ -961,11 +961,11 @@ var import_dist = require_dist(), parser = (function() {
961
961
  { 5: [1, 58] },
962
962
  { 5: [1, 59] },
963
963
  { 5: [1, 60] },
964
- t(U, [2, 29]),
965
- t(U, [2, 30]),
964
+ n(U, [2, 29]),
965
+ n(U, [2, 30]),
966
966
  { 32: [1, 61] },
967
967
  { 34: [1, 62] },
968
- t(U, [2, 33]),
968
+ n(U, [2, 33]),
969
969
  { 15: [1, 63] },
970
970
  { 15: [1, 64] },
971
971
  { 15: [1, 65] },
@@ -1022,7 +1022,7 @@ var import_dist = require_dist(), parser = (function() {
1022
1022
  22: 94,
1023
1023
  71: H
1024
1024
  },
1025
- t([
1025
+ n([
1026
1026
  5,
1027
1027
  51,
1028
1028
  65,
@@ -1038,51 +1038,51 @@ var import_dist = require_dist(), parser = (function() {
1038
1038
  85,
1039
1039
  86
1040
1040
  ], W),
1041
- t(U, [2, 6]),
1042
- t(U, [2, 15]),
1043
- t(G, [2, 9], { 10: 95 }),
1044
- t(U, [2, 17]),
1041
+ n(U, [2, 6]),
1042
+ n(U, [2, 15]),
1043
+ n(G, [2, 9], { 10: 95 }),
1044
+ n(U, [2, 17]),
1045
1045
  {
1046
1046
  5: [1, 97],
1047
1047
  19: [1, 96]
1048
1048
  },
1049
1049
  { 5: [1, 98] },
1050
- t(U, [2, 21]),
1050
+ n(U, [2, 21]),
1051
1051
  { 5: [1, 99] },
1052
1052
  { 5: [1, 100] },
1053
- t(U, [2, 24]),
1054
- t(U, [2, 25]),
1055
- t(U, [2, 26]),
1056
- t(U, [2, 27]),
1057
- t(U, [2, 28]),
1058
- t(U, [2, 31]),
1059
- t(U, [2, 32]),
1060
- t(K, p, { 7: 101 }),
1061
- t(K, p, { 7: 102 }),
1062
- t(K, p, { 7: 103 }),
1063
- t(q, p, {
1053
+ n(U, [2, 24]),
1054
+ n(U, [2, 25]),
1055
+ n(U, [2, 26]),
1056
+ n(U, [2, 27]),
1057
+ n(U, [2, 28]),
1058
+ n(U, [2, 31]),
1059
+ n(U, [2, 32]),
1060
+ n(K, p, { 7: 101 }),
1061
+ n(K, p, { 7: 102 }),
1062
+ n(K, p, { 7: 103 }),
1063
+ n(q, p, {
1064
1064
  40: 104,
1065
1065
  7: 105
1066
1066
  }),
1067
- t(J, p, {
1067
+ n(J, p, {
1068
1068
  42: 106,
1069
1069
  7: 107
1070
1070
  }),
1071
- t(J, p, {
1071
+ n(J, p, {
1072
1072
  7: 107,
1073
1073
  42: 108
1074
1074
  }),
1075
- t(Y, p, {
1075
+ n(Y, p, {
1076
1076
  45: 109,
1077
1077
  7: 110
1078
1078
  }),
1079
- t(K, p, { 7: 111 }),
1079
+ n(K, p, { 7: 111 }),
1080
1080
  {
1081
1081
  5: [1, 113],
1082
1082
  51: [1, 112]
1083
1083
  },
1084
1084
  { 5: [1, 114] },
1085
- t([5, 51], W, {
1085
+ n([5, 51], W, {
1086
1086
  72: 115,
1087
1087
  73: [1, 116]
1088
1088
  }),
@@ -1097,16 +1097,16 @@ var import_dist = require_dist(), parser = (function() {
1097
1097
  70: [1, 121],
1098
1098
  71: H
1099
1099
  },
1100
- t(X, [2, 72]),
1101
- t(X, [2, 73]),
1102
- t(X, [2, 74]),
1103
- t(X, [2, 75]),
1104
- t(X, [2, 76]),
1105
- t(X, [2, 77]),
1106
- t(X, [2, 78]),
1107
- t(X, [2, 79]),
1108
- t(X, [2, 80]),
1109
- t(X, [2, 81]),
1100
+ n(X, [2, 72]),
1101
+ n(X, [2, 73]),
1102
+ n(X, [2, 74]),
1103
+ n(X, [2, 75]),
1104
+ n(X, [2, 76]),
1105
+ n(X, [2, 77]),
1106
+ n(X, [2, 78]),
1107
+ n(X, [2, 79]),
1108
+ n(X, [2, 80]),
1109
+ n(X, [2, 81]),
1110
1110
  {
1111
1111
  22: 123,
1112
1112
  71: H
@@ -1145,10 +1145,10 @@ var import_dist = require_dist(), parser = (function() {
1145
1145
  53: I
1146
1146
  },
1147
1147
  { 5: [1, 136] },
1148
- t(U, [2, 19]),
1149
- t(U, [2, 20]),
1150
- t(U, [2, 22]),
1151
- t(U, [2, 23]),
1148
+ n(U, [2, 19]),
1149
+ n(U, [2, 20]),
1150
+ n(U, [2, 22]),
1151
+ n(U, [2, 23]),
1152
1152
  {
1153
1153
  4: m,
1154
1154
  5: h,
@@ -1451,13 +1451,13 @@ var import_dist = require_dist(), parser = (function() {
1451
1451
  71: H
1452
1452
  },
1453
1453
  { 15: [1, 148] },
1454
- t(U, [2, 49]),
1455
- t(U, [2, 53]),
1454
+ n(U, [2, 49]),
1455
+ n(U, [2, 53]),
1456
1456
  { 5: [2, 69] },
1457
1457
  { 74: [1, 149] },
1458
1458
  { 15: [1, 150] },
1459
- t(U, [2, 51]),
1460
- t(U, [2, 52]),
1459
+ n(U, [2, 51]),
1460
+ n(U, [2, 52]),
1461
1461
  {
1462
1462
  22: 151,
1463
1463
  71: H
@@ -1487,28 +1487,28 @@ var import_dist = require_dist(), parser = (function() {
1487
1487
  { 5: [2, 57] },
1488
1488
  { 5: [2, 58] },
1489
1489
  { 5: [2, 59] },
1490
- t(U, [2, 16]),
1491
- t(G, [2, 10]),
1490
+ n(U, [2, 16]),
1491
+ n(G, [2, 10]),
1492
1492
  {
1493
1493
  12: 157,
1494
1494
  50: P,
1495
1495
  52: F,
1496
1496
  53: I
1497
1497
  },
1498
- t(G, [2, 12]),
1499
- t(G, [2, 13]),
1500
- t(U, [2, 18]),
1501
- t(U, [2, 34]),
1502
- t(U, [2, 35]),
1503
- t(U, [2, 36]),
1504
- t(U, [2, 37]),
1498
+ n(G, [2, 12]),
1499
+ n(G, [2, 13]),
1500
+ n(U, [2, 18]),
1501
+ n(U, [2, 34]),
1502
+ n(U, [2, 35]),
1503
+ n(U, [2, 36]),
1504
+ n(U, [2, 37]),
1505
1505
  { 15: [1, 158] },
1506
- t(U, [2, 38]),
1506
+ n(U, [2, 38]),
1507
1507
  { 15: [1, 159] },
1508
- t(U, [2, 39]),
1509
- t(U, [2, 40]),
1508
+ n(U, [2, 39]),
1509
+ n(U, [2, 40]),
1510
1510
  { 15: [1, 160] },
1511
- t(U, [2, 41]),
1511
+ n(U, [2, 41]),
1512
1512
  { 5: [1, 161] },
1513
1513
  { 75: [1, 162] },
1514
1514
  { 5: [1, 163] },
@@ -1527,22 +1527,22 @@ var import_dist = require_dist(), parser = (function() {
1527
1527
  22: 166,
1528
1528
  71: H
1529
1529
  },
1530
- t(G, [2, 11]),
1531
- t(q, p, {
1530
+ n(G, [2, 11]),
1531
+ n(q, p, {
1532
1532
  7: 105,
1533
1533
  40: 167
1534
1534
  }),
1535
- t(J, p, {
1535
+ n(J, p, {
1536
1536
  7: 107,
1537
1537
  42: 168
1538
1538
  }),
1539
- t(Y, p, {
1539
+ n(Y, p, {
1540
1540
  7: 110,
1541
1541
  45: 169
1542
1542
  }),
1543
- t(U, [2, 48]),
1543
+ n(U, [2, 48]),
1544
1544
  { 5: [2, 70] },
1545
- t(U, [2, 50]),
1545
+ n(U, [2, 50]),
1546
1546
  { 5: [2, 66] },
1547
1547
  { 5: [2, 67] },
1548
1548
  { 86: [2, 62] },
@@ -1572,32 +1572,32 @@ var import_dist = require_dist(), parser = (function() {
1572
1572
  168: [2, 45],
1573
1573
  169: [2, 43]
1574
1574
  },
1575
- parseError: /* @__PURE__ */ __name(function(t, l) {
1576
- if (l.recoverable) this.trace(t);
1575
+ parseError: /* @__PURE__ */ __name(function(n, l) {
1576
+ if (l.recoverable) this.trace(n);
1577
1577
  else {
1578
- var u = Error(t);
1578
+ var u = Error(n);
1579
1579
  throw u.hash = l, u;
1580
1580
  }
1581
1581
  }, "parseError"),
1582
- parse: /* @__PURE__ */ __name(function(t) {
1583
- var l = this, u = [0], d = [], p = [null], m = [], h = this.table, g = "", _ = 0, v = 0, y = 0, b = 2, x = 1, S = m.slice.call(arguments, 1), C = Object.create(this.lexer), w = { yy: {} };
1582
+ parse: /* @__PURE__ */ __name(function(n) {
1583
+ var u = this, d = [0], f = [], p = [null], m = [], h = this.table, g = "", _ = 0, v = 0, y = 0, b = 2, x = 1, S = m.slice.call(arguments, 1), C = Object.create(this.lexer), w = { yy: {} };
1584
1584
  for (var T in this.yy) Object.prototype.hasOwnProperty.call(this.yy, T) && (w.yy[T] = this.yy[T]);
1585
- C.setInput(t, w.yy), w.yy.lexer = C, w.yy.parser = this, C.yylloc === void 0 && (C.yylloc = {});
1585
+ C.setInput(n, w.yy), w.yy.lexer = C, w.yy.parser = this, C.yylloc === void 0 && (C.yylloc = {});
1586
1586
  var E = C.yylloc;
1587
1587
  m.push(E);
1588
1588
  var D = C.options && C.options.ranges;
1589
1589
  typeof w.yy.parseError == "function" ? this.parseError = w.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1590
- function O(t) {
1591
- u.length -= 2 * t, p.length -= t, m.length -= t;
1590
+ function O(n) {
1591
+ d.length -= 2 * n, p.length -= n, m.length -= n;
1592
1592
  }
1593
1593
  __name(O, "popStack");
1594
1594
  function k() {
1595
- var t = d.pop() || C.lex() || x;
1596
- return typeof t != "number" && (t instanceof Array && (d = t, t = d.pop()), t = l.symbols_[t] || t), t;
1595
+ var n = f.pop() || C.lex() || x;
1596
+ return typeof n != "number" && (n instanceof Array && (f = n, n = f.pop()), n = u.symbols_[n] || n), n;
1597
1597
  }
1598
1598
  __name(k, "lex");
1599
1599
  for (var A, j, M, N, P, F = {}, I, L, R, z;;) {
1600
- if (M = u[u.length - 1], this.defaultActions[M] ? N = this.defaultActions[M] : (A ??= k(), N = h[M] && h[M][A]), N === void 0 || !N.length || !N[0]) {
1600
+ if (M = d[d.length - 1], this.defaultActions[M] ? N = this.defaultActions[M] : (A ??= k(), N = h[M] && h[M][A]), N === void 0 || !N.length || !N[0]) {
1601
1601
  var B = "";
1602
1602
  for (I in z = [], h[M]) this.terminals_[I] && I > b && z.push("'" + this.terminals_[I] + "'");
1603
1603
  B = C.showPosition ? "Parse error on line " + (_ + 1) + ":\n" + C.showPosition() + "\nExpecting " + z.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : "Parse error on line " + (_ + 1) + ": Unexpected " + (A == x ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(B, {
@@ -1611,7 +1611,7 @@ var import_dist = require_dist(), parser = (function() {
1611
1611
  if (N[0] instanceof Array && N.length > 1) throw Error("Parse Error: multiple actions possible at state: " + M + ", token: " + A);
1612
1612
  switch (N[0]) {
1613
1613
  case 1:
1614
- u.push(A), p.push(C.yytext), m.push(C.yylloc), u.push(N[1]), A = null, j ? (A = j, j = null) : (v = C.yyleng, g = C.yytext, _ = C.yylineno, E = C.yylloc, y > 0 && y--);
1614
+ d.push(A), p.push(C.yytext), m.push(C.yylloc), d.push(N[1]), A = null, j ? (A = j, j = null) : (v = C.yyleng, g = C.yytext, _ = C.yylineno, E = C.yylloc, y > 0 && y--);
1615
1615
  break;
1616
1616
  case 2:
1617
1617
  if (L = this.productions_[N[1]][1], F.$ = p[p.length - L], F._$ = {
@@ -1628,7 +1628,7 @@ var import_dist = require_dist(), parser = (function() {
1628
1628
  p,
1629
1629
  m
1630
1630
  ].concat(S)), P !== void 0) return P;
1631
- L && (u = u.slice(0, -1 * L * 2), p = p.slice(0, -1 * L), m = m.slice(0, -1 * L)), u.push(this.productions_[N[1]][0]), p.push(F.$), m.push(F._$), R = h[u[u.length - 2]][u[u.length - 1]], u.push(R);
1631
+ L && (d = d.slice(0, -1 * L * 2), p = p.slice(0, -1 * L), m = m.slice(0, -1 * L)), d.push(this.productions_[N[1]][0]), p.push(F.$), m.push(F._$), R = h[d[d.length - 2]][d[d.length - 1]], d.push(R);
1632
1632
  break;
1633
1633
  case 3: return !0;
1634
1634
  }
@@ -1639,12 +1639,12 @@ var import_dist = require_dist(), parser = (function() {
1639
1639
  Q.lexer = /* @__PURE__ */ (function() {
1640
1640
  return {
1641
1641
  EOF: 1,
1642
- parseError: /* @__PURE__ */ __name(function(t, l) {
1643
- if (this.yy.parser) this.yy.parser.parseError(t, l);
1644
- else throw Error(t);
1642
+ parseError: /* @__PURE__ */ __name(function(n, l) {
1643
+ if (this.yy.parser) this.yy.parser.parseError(n, l);
1644
+ else throw Error(n);
1645
1645
  }, "parseError"),
1646
- setInput: /* @__PURE__ */ __name(function(t, l) {
1647
- return this.yy = l || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1646
+ setInput: /* @__PURE__ */ __name(function(n, l) {
1647
+ return this.yy = l || this.yy || {}, this._input = n, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1648
1648
  first_line: 1,
1649
1649
  first_column: 0,
1650
1650
  last_line: 1,
@@ -1652,12 +1652,12 @@ var import_dist = require_dist(), parser = (function() {
1652
1652
  }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1653
1653
  }, "setInput"),
1654
1654
  input: /* @__PURE__ */ __name(function() {
1655
- var t = this._input[0];
1656
- return this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t, t.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
1655
+ var n = this._input[0];
1656
+ return this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n, n.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), n;
1657
1657
  }, "input"),
1658
- unput: /* @__PURE__ */ __name(function(t) {
1659
- var l = t.length, u = t.split(/(?:\r\n?|\n)/g);
1660
- this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
1658
+ unput: /* @__PURE__ */ __name(function(n) {
1659
+ var l = n.length, u = n.split(/(?:\r\n?|\n)/g);
1660
+ this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
1661
1661
  var d = this.match.split(/(?:\r\n?|\n)/g);
1662
1662
  this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), u.length - 1 && (this.yylineno -= u.length - 1);
1663
1663
  var f = this.yylloc.range;
@@ -1680,22 +1680,22 @@ var import_dist = require_dist(), parser = (function() {
1680
1680
  });
1681
1681
  return this;
1682
1682
  }, "reject"),
1683
- less: /* @__PURE__ */ __name(function(t) {
1684
- this.unput(this.match.slice(t));
1683
+ less: /* @__PURE__ */ __name(function(n) {
1684
+ this.unput(this.match.slice(n));
1685
1685
  }, "less"),
1686
1686
  pastInput: /* @__PURE__ */ __name(function() {
1687
- var t = this.matched.substr(0, this.matched.length - this.match.length);
1688
- return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
1687
+ var n = this.matched.substr(0, this.matched.length - this.match.length);
1688
+ return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "");
1689
1689
  }, "pastInput"),
1690
1690
  upcomingInput: /* @__PURE__ */ __name(function() {
1691
- var t = this.match;
1692
- return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
1691
+ var n = this.match;
1692
+ return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "");
1693
1693
  }, "upcomingInput"),
1694
1694
  showPosition: /* @__PURE__ */ __name(function() {
1695
- var t = this.pastInput(), l = Array(t.length + 1).join("-");
1696
- return t + this.upcomingInput() + "\n" + l + "^";
1695
+ var n = this.pastInput(), l = Array(n.length + 1).join("-");
1696
+ return n + this.upcomingInput() + "\n" + l + "^";
1697
1697
  }, "showPosition"),
1698
- test_match: /* @__PURE__ */ __name(function(t, l) {
1698
+ test_match: /* @__PURE__ */ __name(function(n, l) {
1699
1699
  var u, d, f;
1700
1700
  if (this.options.backtrack_lexer && (f = {
1701
1701
  yylineno: this.yylineno,
@@ -1716,12 +1716,12 @@ var import_dist = require_dist(), parser = (function() {
1716
1716
  yy: this.yy,
1717
1717
  conditionStack: this.conditionStack.slice(0),
1718
1718
  done: this.done
1719
- }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), d = t[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
1719
+ }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), d = n[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
1720
1720
  first_line: this.yylloc.last_line,
1721
1721
  last_line: this.yylineno + 1,
1722
1722
  first_column: this.yylloc.last_column,
1723
- last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
1724
- }, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(t[0].length), this.matched += t[0], u = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u) return u;
1723
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length
1724
+ }, this.yytext += n[0], this.match += n[0], this.matches = n, 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(n[0].length), this.matched += n[0], u = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u) return u;
1725
1725
  if (this._backtrack) {
1726
1726
  for (var p in f) this[p] = f[p];
1727
1727
  return !1;
@@ -1731,18 +1731,18 @@ var import_dist = require_dist(), parser = (function() {
1731
1731
  next: /* @__PURE__ */ __name(function() {
1732
1732
  if (this.done) return this.EOF;
1733
1733
  this._input || (this.done = !0);
1734
- var t, l, u, d;
1734
+ var n, l, u, d;
1735
1735
  this._more || (this.yytext = "", this.match = "");
1736
1736
  for (var f = this._currentRules(), p = 0; p < f.length; p++) if (u = this._input.match(this.rules[f[p]]), u && (!l || u[0].length > l[0].length)) {
1737
1737
  if (l = u, d = p, this.options.backtrack_lexer) {
1738
- if (t = this.test_match(u, f[p]), t !== !1) return t;
1738
+ if (n = this.test_match(u, f[p]), n !== !1) return n;
1739
1739
  if (this._backtrack) {
1740
1740
  l = !1;
1741
1741
  continue;
1742
1742
  } else return !1;
1743
1743
  } else if (!this.options.flex) break;
1744
1744
  }
1745
- return l ? (t = this.test_match(l, f[d]), t === !1 ? !1 : t) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1745
+ return l ? (n = this.test_match(l, f[d]), n === !1 ? !1 : n) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1746
1746
  text: "",
1747
1747
  token: null,
1748
1748
  line: this.yylineno
@@ -1751,8 +1751,8 @@ var import_dist = require_dist(), parser = (function() {
1751
1751
  lex: /* @__PURE__ */ __name(function() {
1752
1752
  return this.next() || this.lex();
1753
1753
  }, "lex"),
1754
- begin: /* @__PURE__ */ __name(function(t) {
1755
- this.conditionStack.push(t);
1754
+ begin: /* @__PURE__ */ __name(function(n) {
1755
+ this.conditionStack.push(n);
1756
1756
  }, "begin"),
1757
1757
  popState: /* @__PURE__ */ __name(function() {
1758
1758
  return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
@@ -1760,17 +1760,17 @@ var import_dist = require_dist(), parser = (function() {
1760
1760
  _currentRules: /* @__PURE__ */ __name(function() {
1761
1761
  return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1762
1762
  }, "_currentRules"),
1763
- topState: /* @__PURE__ */ __name(function(t) {
1764
- return t = this.conditionStack.length - 1 - Math.abs(t || 0), t >= 0 ? this.conditionStack[t] : "INITIAL";
1763
+ topState: /* @__PURE__ */ __name(function(n) {
1764
+ return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
1765
1765
  }, "topState"),
1766
- pushState: /* @__PURE__ */ __name(function(t) {
1767
- this.begin(t);
1766
+ pushState: /* @__PURE__ */ __name(function(n) {
1767
+ this.begin(n);
1768
1768
  }, "pushState"),
1769
1769
  stateStackSize: /* @__PURE__ */ __name(function() {
1770
1770
  return this.conditionStack.length;
1771
1771
  }, "stateStackSize"),
1772
1772
  options: { "case-insensitive": !0 },
1773
- performAction: /* @__PURE__ */ __name(function(t, l, u, d) {
1773
+ performAction: /* @__PURE__ */ __name(function(n, l, u, d) {
1774
1774
  switch (u) {
1775
1775
  case 0: return 5;
1776
1776
  case 1: break;
@@ -2118,22 +2118,22 @@ var sequenceDiagram_default = parser, LINETYPE = {
2118
2118
  })), this.setAccTitle = setAccTitle, this.setAccDescription = setAccDescription, this.setDiagramTitle = setDiagramTitle, this.getAccTitle = getAccTitle, this.getAccDescription = getAccDescription, this.getDiagramTitle = getDiagramTitle, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap(getConfig2().wrap), this.LINETYPE = LINETYPE, this.ARROWTYPE = ARROWTYPE, this.PLACEMENT = PLACEMENT;
2119
2119
  }
2120
2120
  static #e = __name(this, "SequenceDB");
2121
- addBox(t) {
2121
+ addBox(n) {
2122
2122
  this.state.records.boxes.push({
2123
- name: t.text,
2124
- wrap: t.wrap ?? this.autoWrap(),
2125
- fill: t.color,
2123
+ name: n.text,
2124
+ wrap: n.wrap ?? this.autoWrap(),
2125
+ fill: n.color,
2126
2126
  actorKeys: []
2127
2127
  }), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
2128
2128
  }
2129
- addActor(t, l, u, d, f) {
2129
+ addActor(n, l, u, d, f) {
2130
2130
  let p = this.state.records.currentBox, m;
2131
2131
  if (f !== void 0) {
2132
- let t;
2133
- t = f.includes("\n") ? f + "\n" : "{\n" + f + "\n}", m = load(t, { schema: JSON_SCHEMA });
2132
+ let n;
2133
+ n = f.includes("\n") ? f + "\n" : "{\n" + f + "\n}", m = load(n, { schema: JSON_SCHEMA });
2134
2134
  }
2135
2135
  d = m?.type ?? d;
2136
- let h = this.state.records.actors.get(t);
2136
+ let h = this.state.records.actors.get(n);
2137
2137
  if (h) {
2138
2138
  if (this.state.records.currentBox && h.box && this.state.records.currentBox !== h.box) throw Error(`A same participant should only be defined in one Box: ${h.name} can't be in '${h.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);
2139
2139
  if (p = h.box ? h.box : this.state.records.currentBox, h.box = p, h && l === h.name && u == null) return;
@@ -2144,7 +2144,7 @@ var sequenceDiagram_default = parser, LINETYPE = {
2144
2144
  }), (d == null || u.text == null) && (u = {
2145
2145
  text: l,
2146
2146
  type: d
2147
- }), this.state.records.actors.set(t, {
2147
+ }), this.state.records.actors.set(n, {
2148
2148
  box: p,
2149
2149
  name: l,
2150
2150
  description: u.text,
@@ -2157,29 +2157,29 @@ var sequenceDiagram_default = parser, LINETYPE = {
2157
2157
  type: d ?? "participant"
2158
2158
  }), this.state.records.prevActor) {
2159
2159
  let l = this.state.records.actors.get(this.state.records.prevActor);
2160
- l && (l.nextActor = t);
2160
+ l && (l.nextActor = n);
2161
2161
  }
2162
- this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(t), this.state.records.prevActor = t;
2162
+ this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(n), this.state.records.prevActor = n;
2163
2163
  }
2164
- activationCount(t) {
2164
+ activationCount(n) {
2165
2165
  let l, u = 0;
2166
- if (!t) return 0;
2167
- for (l = 0; l < this.state.records.messages.length; l++) this.state.records.messages[l].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[l].from === t && u++, this.state.records.messages[l].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[l].from === t && u--;
2166
+ if (!n) return 0;
2167
+ for (l = 0; l < this.state.records.messages.length; l++) this.state.records.messages[l].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[l].from === n && u++, this.state.records.messages[l].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[l].from === n && u--;
2168
2168
  return u;
2169
2169
  }
2170
- addMessage(t, l, u, d) {
2170
+ addMessage(n, l, u, d) {
2171
2171
  this.state.records.messages.push({
2172
2172
  id: this.state.records.messages.length.toString(),
2173
- from: t,
2173
+ from: n,
2174
2174
  to: l,
2175
2175
  message: u.text,
2176
2176
  wrap: u.wrap ?? this.autoWrap(),
2177
2177
  answer: d
2178
2178
  });
2179
2179
  }
2180
- addSignal(t, l, u, d, f = !1) {
2181
- if (d === this.LINETYPE.ACTIVE_END && this.activationCount(t ?? "") < 1) {
2182
- let l = /* @__PURE__ */ Error("Trying to inactivate an inactive participant (" + t + ")");
2180
+ addSignal(n, l, u, d, f = !1) {
2181
+ if (d === this.LINETYPE.ACTIVE_END && this.activationCount(n ?? "") < 1) {
2182
+ let l = /* @__PURE__ */ Error("Trying to inactivate an inactive participant (" + n + ")");
2183
2183
  throw l.hash = {
2184
2184
  text: "->>-",
2185
2185
  token: "->>-",
@@ -2195,7 +2195,7 @@ var sequenceDiagram_default = parser, LINETYPE = {
2195
2195
  }
2196
2196
  return this.state.records.messages.push({
2197
2197
  id: this.state.records.messages.length.toString(),
2198
- from: t,
2198
+ from: n,
2199
2199
  to: l,
2200
2200
  message: u?.text ?? "",
2201
2201
  wrap: u?.wrap ?? this.autoWrap(),
@@ -2207,7 +2207,7 @@ var sequenceDiagram_default = parser, LINETYPE = {
2207
2207
  return this.state.records.boxes.length > 0;
2208
2208
  }
2209
2209
  hasAtLeastOneBoxWithTitle() {
2210
- return this.state.records.boxes.some((t) => t.name);
2210
+ return this.state.records.boxes.some((n) => n.name);
2211
2211
  }
2212
2212
  getMessages() {
2213
2213
  return this.state.records.messages;
@@ -2224,8 +2224,8 @@ var sequenceDiagram_default = parser, LINETYPE = {
2224
2224
  getDestroyedActors() {
2225
2225
  return this.state.records.destroyedActors;
2226
2226
  }
2227
- getActor(t) {
2228
- return this.state.records.actors.get(t);
2227
+ getActor(n) {
2228
+ return this.state.records.actors.get(n);
2229
2229
  }
2230
2230
  getActorKeys() {
2231
2231
  return [...this.state.records.actors.keys()];
@@ -2239,15 +2239,15 @@ var sequenceDiagram_default = parser, LINETYPE = {
2239
2239
  showSequenceNumbers() {
2240
2240
  return this.state.records.sequenceNumbersEnabled;
2241
2241
  }
2242
- setWrap(t) {
2243
- this.state.records.wrapEnabled = t;
2242
+ setWrap(n) {
2243
+ this.state.records.wrapEnabled = n;
2244
2244
  }
2245
- extractWrap(t) {
2246
- if (t === void 0) return {};
2247
- t = t.trim();
2248
- let l = /^:?wrap:/.exec(t) === null ? /^:?nowrap:/.exec(t) === null ? void 0 : !1 : !0;
2245
+ extractWrap(n) {
2246
+ if (n === void 0) return {};
2247
+ n = n.trim();
2248
+ let l = /^:?wrap:/.exec(n) === null ? /^:?nowrap:/.exec(n) === null ? void 0 : !1 : !0;
2249
2249
  return {
2250
- cleanedText: (l === void 0 ? t : t.replace(/^:?(?:no)?wrap:/, "")).trim(),
2250
+ cleanedText: (l === void 0 ? n : n.replace(/^:?(?:no)?wrap:/, "")).trim(),
2251
2251
  wrap: l
2252
2252
  };
2253
2253
  }
@@ -2257,19 +2257,19 @@ var sequenceDiagram_default = parser, LINETYPE = {
2257
2257
  clear() {
2258
2258
  this.state.reset(), clear();
2259
2259
  }
2260
- parseMessage(t) {
2261
- let l = t.trim(), { wrap: u, cleanedText: f } = this.extractWrap(l), p = {
2260
+ parseMessage(l) {
2261
+ let u = l.trim(), { wrap: d, cleanedText: f } = this.extractWrap(u), p = {
2262
2262
  text: f,
2263
- wrap: u
2263
+ wrap: d
2264
2264
  };
2265
2265
  return log.debug(`parseMessage: ${JSON.stringify(p)}`), p;
2266
2266
  }
2267
- parseBoxData(t) {
2268
- let l = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t), u = l?.[1] ? l[1].trim() : "transparent", d = l?.[2] ? l[2].trim() : void 0;
2269
- if (window?.CSS) window.CSS.supports("color", u) || (u = "transparent", d = t.trim());
2267
+ parseBoxData(n) {
2268
+ let l = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(n), u = l?.[1] ? l[1].trim() : "transparent", d = l?.[2] ? l[2].trim() : void 0;
2269
+ if (window?.CSS) window.CSS.supports("color", u) || (u = "transparent", d = n.trim());
2270
2270
  else {
2271
2271
  let l = new Option().style;
2272
- l.color = u, l.color !== u && (u = "transparent", d = t.trim());
2272
+ l.color = u, l.color !== u && (u = "transparent", d = n.trim());
2273
2273
  }
2274
2274
  let { wrap: f, cleanedText: p } = this.extractWrap(d);
2275
2275
  return {
@@ -2278,13 +2278,13 @@ var sequenceDiagram_default = parser, LINETYPE = {
2278
2278
  wrap: f
2279
2279
  };
2280
2280
  }
2281
- addNote(t, l, u) {
2281
+ addNote(n, l, u) {
2282
2282
  let d = {
2283
- actor: t,
2283
+ actor: n,
2284
2284
  placement: l,
2285
2285
  message: u.text,
2286
2286
  wrap: u.wrap ?? this.autoWrap()
2287
- }, f = [].concat(t, t);
2287
+ }, f = [].concat(n, n);
2288
2288
  this.state.records.notes.push(d), this.state.records.messages.push({
2289
2289
  id: this.state.records.messages.length.toString(),
2290
2290
  from: f[0],
@@ -2295,197 +2295,197 @@ var sequenceDiagram_default = parser, LINETYPE = {
2295
2295
  placement: l
2296
2296
  });
2297
2297
  }
2298
- addLinks(t, l) {
2299
- let u = this.getActor(t);
2298
+ addLinks(l, u) {
2299
+ let d = this.getActor(l);
2300
2300
  try {
2301
- let t = sanitizeText(l.text, getConfig2());
2302
- t = t.replace(/&equals;/g, "="), t = t.replace(/&amp;/g, "&");
2303
- let d = JSON.parse(t);
2304
- this.insertLinks(u, d);
2305
- } catch (t) {
2306
- log.error("error while parsing actor link text", t);
2301
+ let n = sanitizeText(u.text, getConfig2());
2302
+ n = n.replace(/&equals;/g, "="), n = n.replace(/&amp;/g, "&");
2303
+ let l = JSON.parse(n);
2304
+ this.insertLinks(d, l);
2305
+ } catch (l) {
2306
+ log.error("error while parsing actor link text", l);
2307
2307
  }
2308
2308
  }
2309
- addALink(t, l) {
2310
- let u = this.getActor(t);
2309
+ addALink(l, u) {
2310
+ let d = this.getActor(l);
2311
2311
  try {
2312
- let t = {}, d = sanitizeText(l.text, getConfig2()), f = d.indexOf("@");
2313
- d = d.replace(/&equals;/g, "="), d = d.replace(/&amp;/g, "&");
2314
- let p = d.slice(0, f - 1).trim();
2315
- t[p] = d.slice(f + 1).trim(), this.insertLinks(u, t);
2316
- } catch (t) {
2317
- log.error("error while parsing actor link text", t);
2312
+ let n = {}, l = sanitizeText(u.text, getConfig2()), f = l.indexOf("@");
2313
+ l = l.replace(/&equals;/g, "="), l = l.replace(/&amp;/g, "&");
2314
+ let p = l.slice(0, f - 1).trim();
2315
+ n[p] = l.slice(f + 1).trim(), this.insertLinks(d, n);
2316
+ } catch (l) {
2317
+ log.error("error while parsing actor link text", l);
2318
2318
  }
2319
2319
  }
2320
- insertLinks(t, l) {
2321
- if (t.links == null) t.links = l;
2322
- else for (let u in l) t.links[u] = l[u];
2320
+ insertLinks(n, l) {
2321
+ if (n.links == null) n.links = l;
2322
+ else for (let u in l) n.links[u] = l[u];
2323
2323
  }
2324
- addProperties(t, l) {
2325
- let u = this.getActor(t);
2324
+ addProperties(l, u) {
2325
+ let d = this.getActor(l);
2326
2326
  try {
2327
- let t = sanitizeText(l.text, getConfig2()), d = JSON.parse(t);
2328
- this.insertProperties(u, d);
2329
- } catch (t) {
2330
- log.error("error while parsing actor properties text", t);
2327
+ let n = sanitizeText(u.text, getConfig2()), l = JSON.parse(n);
2328
+ this.insertProperties(d, l);
2329
+ } catch (l) {
2330
+ log.error("error while parsing actor properties text", l);
2331
2331
  }
2332
2332
  }
2333
- insertProperties(t, l) {
2334
- if (t.properties == null) t.properties = l;
2335
- else for (let u in l) t.properties[u] = l[u];
2333
+ insertProperties(n, l) {
2334
+ if (n.properties == null) n.properties = l;
2335
+ else for (let u in l) n.properties[u] = l[u];
2336
2336
  }
2337
2337
  boxEnd() {
2338
2338
  this.state.records.currentBox = void 0;
2339
2339
  }
2340
- addDetails(t, l) {
2341
- let u = this.getActor(t), f = document.getElementById(l.text);
2340
+ addDetails(l, u) {
2341
+ let d = this.getActor(l), f = document.getElementById(u.text);
2342
2342
  try {
2343
- let t = f.innerHTML, l = JSON.parse(t);
2344
- l.properties && this.insertProperties(u, l.properties), l.links && this.insertLinks(u, l.links);
2345
- } catch (t) {
2346
- log.error("error while parsing actor details text", t);
2343
+ let n = f.innerHTML, l = JSON.parse(n);
2344
+ l.properties && this.insertProperties(d, l.properties), l.links && this.insertLinks(d, l.links);
2345
+ } catch (l) {
2346
+ log.error("error while parsing actor details text", l);
2347
2347
  }
2348
2348
  }
2349
- getActorProperty(t, l) {
2350
- if (t?.properties !== void 0) return t.properties[l];
2349
+ getActorProperty(n, l) {
2350
+ if (n?.properties !== void 0) return n.properties[l];
2351
2351
  }
2352
- apply(t) {
2353
- if (Array.isArray(t)) t.forEach((t) => {
2354
- this.apply(t);
2352
+ apply(n) {
2353
+ if (Array.isArray(n)) n.forEach((n) => {
2354
+ this.apply(n);
2355
2355
  });
2356
- else switch (t.type) {
2356
+ else switch (n.type) {
2357
2357
  case "sequenceIndex":
2358
2358
  this.state.records.messages.push({
2359
2359
  id: this.state.records.messages.length.toString(),
2360
2360
  from: void 0,
2361
2361
  to: void 0,
2362
2362
  message: {
2363
- start: t.sequenceIndex,
2364
- step: t.sequenceIndexStep,
2365
- visible: t.sequenceVisible
2363
+ start: n.sequenceIndex,
2364
+ step: n.sequenceIndexStep,
2365
+ visible: n.sequenceVisible
2366
2366
  },
2367
2367
  wrap: !1,
2368
- type: t.signalType
2368
+ type: n.signalType
2369
2369
  });
2370
2370
  break;
2371
2371
  case "addParticipant":
2372
- this.addActor(t.actor, t.actor, t.description, t.draw, t.config);
2372
+ this.addActor(n.actor, n.actor, n.description, n.draw, n.config);
2373
2373
  break;
2374
2374
  case "createParticipant":
2375
- if (this.state.records.actors.has(t.actor)) throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");
2376
- this.state.records.lastCreated = t.actor, this.addActor(t.actor, t.actor, t.description, t.draw, t.config), this.state.records.createdActors.set(t.actor, this.state.records.messages.length);
2375
+ if (this.state.records.actors.has(n.actor)) throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");
2376
+ this.state.records.lastCreated = n.actor, this.addActor(n.actor, n.actor, n.description, n.draw, n.config), this.state.records.createdActors.set(n.actor, this.state.records.messages.length);
2377
2377
  break;
2378
2378
  case "destroyParticipant":
2379
- this.state.records.lastDestroyed = t.actor, this.state.records.destroyedActors.set(t.actor, this.state.records.messages.length);
2379
+ this.state.records.lastDestroyed = n.actor, this.state.records.destroyedActors.set(n.actor, this.state.records.messages.length);
2380
2380
  break;
2381
2381
  case "activeStart":
2382
- this.addSignal(t.actor, void 0, void 0, t.signalType);
2382
+ this.addSignal(n.actor, void 0, void 0, n.signalType);
2383
2383
  break;
2384
2384
  case "activeEnd":
2385
- this.addSignal(t.actor, void 0, void 0, t.signalType);
2385
+ this.addSignal(n.actor, void 0, void 0, n.signalType);
2386
2386
  break;
2387
2387
  case "addNote":
2388
- this.addNote(t.actor, t.placement, t.text);
2388
+ this.addNote(n.actor, n.placement, n.text);
2389
2389
  break;
2390
2390
  case "addLinks":
2391
- this.addLinks(t.actor, t.text);
2391
+ this.addLinks(n.actor, n.text);
2392
2392
  break;
2393
2393
  case "addALink":
2394
- this.addALink(t.actor, t.text);
2394
+ this.addALink(n.actor, n.text);
2395
2395
  break;
2396
2396
  case "addProperties":
2397
- this.addProperties(t.actor, t.text);
2397
+ this.addProperties(n.actor, n.text);
2398
2398
  break;
2399
2399
  case "addDetails":
2400
- this.addDetails(t.actor, t.text);
2400
+ this.addDetails(n.actor, n.text);
2401
2401
  break;
2402
2402
  case "addMessage":
2403
2403
  if (this.state.records.lastCreated) {
2404
- if (t.to !== this.state.records.lastCreated) throw Error("The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram.");
2404
+ if (n.to !== this.state.records.lastCreated) throw Error("The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram.");
2405
2405
  this.state.records.lastCreated = void 0;
2406
2406
  } else if (this.state.records.lastDestroyed) {
2407
- if (t.to !== this.state.records.lastDestroyed && t.from !== this.state.records.lastDestroyed) throw Error("The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram.");
2407
+ if (n.to !== this.state.records.lastDestroyed && n.from !== this.state.records.lastDestroyed) throw Error("The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram.");
2408
2408
  this.state.records.lastDestroyed = void 0;
2409
2409
  }
2410
- this.addSignal(t.from, t.to, t.msg, t.signalType, t.activate);
2410
+ this.addSignal(n.from, n.to, n.msg, n.signalType, n.activate);
2411
2411
  break;
2412
2412
  case "boxStart":
2413
- this.addBox(t.boxData);
2413
+ this.addBox(n.boxData);
2414
2414
  break;
2415
2415
  case "boxEnd":
2416
2416
  this.boxEnd();
2417
2417
  break;
2418
2418
  case "loopStart":
2419
- this.addSignal(void 0, void 0, t.loopText, t.signalType);
2419
+ this.addSignal(void 0, void 0, n.loopText, n.signalType);
2420
2420
  break;
2421
2421
  case "loopEnd":
2422
- this.addSignal(void 0, void 0, void 0, t.signalType);
2422
+ this.addSignal(void 0, void 0, void 0, n.signalType);
2423
2423
  break;
2424
2424
  case "rectStart":
2425
- this.addSignal(void 0, void 0, t.color, t.signalType);
2425
+ this.addSignal(void 0, void 0, n.color, n.signalType);
2426
2426
  break;
2427
2427
  case "rectEnd":
2428
- this.addSignal(void 0, void 0, void 0, t.signalType);
2428
+ this.addSignal(void 0, void 0, void 0, n.signalType);
2429
2429
  break;
2430
2430
  case "optStart":
2431
- this.addSignal(void 0, void 0, t.optText, t.signalType);
2431
+ this.addSignal(void 0, void 0, n.optText, n.signalType);
2432
2432
  break;
2433
2433
  case "optEnd":
2434
- this.addSignal(void 0, void 0, void 0, t.signalType);
2434
+ this.addSignal(void 0, void 0, void 0, n.signalType);
2435
2435
  break;
2436
2436
  case "altStart":
2437
- this.addSignal(void 0, void 0, t.altText, t.signalType);
2437
+ this.addSignal(void 0, void 0, n.altText, n.signalType);
2438
2438
  break;
2439
2439
  case "else":
2440
- this.addSignal(void 0, void 0, t.altText, t.signalType);
2440
+ this.addSignal(void 0, void 0, n.altText, n.signalType);
2441
2441
  break;
2442
2442
  case "altEnd":
2443
- this.addSignal(void 0, void 0, void 0, t.signalType);
2443
+ this.addSignal(void 0, void 0, void 0, n.signalType);
2444
2444
  break;
2445
2445
  case "setAccTitle":
2446
- setAccTitle(t.text);
2446
+ setAccTitle(n.text);
2447
2447
  break;
2448
2448
  case "parStart":
2449
- this.addSignal(void 0, void 0, t.parText, t.signalType);
2449
+ this.addSignal(void 0, void 0, n.parText, n.signalType);
2450
2450
  break;
2451
2451
  case "and":
2452
- this.addSignal(void 0, void 0, t.parText, t.signalType);
2452
+ this.addSignal(void 0, void 0, n.parText, n.signalType);
2453
2453
  break;
2454
2454
  case "parEnd":
2455
- this.addSignal(void 0, void 0, void 0, t.signalType);
2455
+ this.addSignal(void 0, void 0, void 0, n.signalType);
2456
2456
  break;
2457
2457
  case "criticalStart":
2458
- this.addSignal(void 0, void 0, t.criticalText, t.signalType);
2458
+ this.addSignal(void 0, void 0, n.criticalText, n.signalType);
2459
2459
  break;
2460
2460
  case "option":
2461
- this.addSignal(void 0, void 0, t.optionText, t.signalType);
2461
+ this.addSignal(void 0, void 0, n.optionText, n.signalType);
2462
2462
  break;
2463
2463
  case "criticalEnd":
2464
- this.addSignal(void 0, void 0, void 0, t.signalType);
2464
+ this.addSignal(void 0, void 0, void 0, n.signalType);
2465
2465
  break;
2466
2466
  case "breakStart":
2467
- this.addSignal(void 0, void 0, t.breakText, t.signalType);
2467
+ this.addSignal(void 0, void 0, n.breakText, n.signalType);
2468
2468
  break;
2469
2469
  case "breakEnd":
2470
- this.addSignal(void 0, void 0, void 0, t.signalType);
2470
+ this.addSignal(void 0, void 0, void 0, n.signalType);
2471
2471
  break;
2472
2472
  }
2473
2473
  }
2474
2474
  getConfig() {
2475
2475
  return getConfig2().sequence;
2476
2476
  }
2477
- }, styles_default = /* @__PURE__ */ __name((t) => `.actor {
2478
- stroke: ${t.actorBorder};
2479
- fill: ${t.actorBkg};
2477
+ }, styles_default = /* @__PURE__ */ __name((n) => `.actor {
2478
+ stroke: ${n.actorBorder};
2479
+ fill: ${n.actorBkg};
2480
2480
  }
2481
2481
 
2482
2482
  text.actor > tspan {
2483
- fill: ${t.actorTextColor};
2483
+ fill: ${n.actorTextColor};
2484
2484
  stroke: none;
2485
2485
  }
2486
2486
 
2487
2487
  .actor-line {
2488
- stroke: ${t.actorLineColor};
2488
+ stroke: ${n.actorLineColor};
2489
2489
  }
2490
2490
 
2491
2491
  .innerArc {
@@ -2496,84 +2496,84 @@ var sequenceDiagram_default = parser, LINETYPE = {
2496
2496
  .messageLine0 {
2497
2497
  stroke-width: 1.5;
2498
2498
  stroke-dasharray: none;
2499
- stroke: ${t.signalColor};
2499
+ stroke: ${n.signalColor};
2500
2500
  }
2501
2501
 
2502
2502
  .messageLine1 {
2503
2503
  stroke-width: 1.5;
2504
2504
  stroke-dasharray: 2, 2;
2505
- stroke: ${t.signalColor};
2505
+ stroke: ${n.signalColor};
2506
2506
  }
2507
2507
 
2508
2508
  #arrowhead path {
2509
- fill: ${t.signalColor};
2510
- stroke: ${t.signalColor};
2509
+ fill: ${n.signalColor};
2510
+ stroke: ${n.signalColor};
2511
2511
  }
2512
2512
 
2513
2513
  .sequenceNumber {
2514
- fill: ${t.sequenceNumberColor};
2514
+ fill: ${n.sequenceNumberColor};
2515
2515
  }
2516
2516
 
2517
2517
  #sequencenumber {
2518
- fill: ${t.signalColor};
2518
+ fill: ${n.signalColor};
2519
2519
  }
2520
2520
 
2521
2521
  #crosshead path {
2522
- fill: ${t.signalColor};
2523
- stroke: ${t.signalColor};
2522
+ fill: ${n.signalColor};
2523
+ stroke: ${n.signalColor};
2524
2524
  }
2525
2525
 
2526
2526
  .messageText {
2527
- fill: ${t.signalTextColor};
2527
+ fill: ${n.signalTextColor};
2528
2528
  stroke: none;
2529
2529
  }
2530
2530
 
2531
2531
  .labelBox {
2532
- stroke: ${t.labelBoxBorderColor};
2533
- fill: ${t.labelBoxBkgColor};
2532
+ stroke: ${n.labelBoxBorderColor};
2533
+ fill: ${n.labelBoxBkgColor};
2534
2534
  }
2535
2535
 
2536
2536
  .labelText, .labelText > tspan {
2537
- fill: ${t.labelTextColor};
2537
+ fill: ${n.labelTextColor};
2538
2538
  stroke: none;
2539
2539
  }
2540
2540
 
2541
2541
  .loopText, .loopText > tspan {
2542
- fill: ${t.loopTextColor};
2542
+ fill: ${n.loopTextColor};
2543
2543
  stroke: none;
2544
2544
  }
2545
2545
 
2546
2546
  .loopLine {
2547
2547
  stroke-width: 2px;
2548
2548
  stroke-dasharray: 2, 2;
2549
- stroke: ${t.labelBoxBorderColor};
2550
- fill: ${t.labelBoxBorderColor};
2549
+ stroke: ${n.labelBoxBorderColor};
2550
+ fill: ${n.labelBoxBorderColor};
2551
2551
  }
2552
2552
 
2553
2553
  .note {
2554
2554
  //stroke: #decc93;
2555
- stroke: ${t.noteBorderColor};
2556
- fill: ${t.noteBkgColor};
2555
+ stroke: ${n.noteBorderColor};
2556
+ fill: ${n.noteBkgColor};
2557
2557
  }
2558
2558
 
2559
2559
  .noteText, .noteText > tspan {
2560
- fill: ${t.noteTextColor};
2560
+ fill: ${n.noteTextColor};
2561
2561
  stroke: none;
2562
2562
  }
2563
2563
 
2564
2564
  .activation0 {
2565
- fill: ${t.activationBkgColor};
2566
- stroke: ${t.activationBorderColor};
2565
+ fill: ${n.activationBkgColor};
2566
+ stroke: ${n.activationBorderColor};
2567
2567
  }
2568
2568
 
2569
2569
  .activation1 {
2570
- fill: ${t.activationBkgColor};
2571
- stroke: ${t.activationBorderColor};
2570
+ fill: ${n.activationBkgColor};
2571
+ stroke: ${n.activationBorderColor};
2572
2572
  }
2573
2573
 
2574
2574
  .activation2 {
2575
- fill: ${t.activationBkgColor};
2576
- stroke: ${t.activationBorderColor};
2575
+ fill: ${n.activationBkgColor};
2576
+ stroke: ${n.activationBorderColor};
2577
2577
  }
2578
2578
 
2579
2579
  .actorPopupMenu {
@@ -2582,23 +2582,23 @@ var sequenceDiagram_default = parser, LINETYPE = {
2582
2582
 
2583
2583
  .actorPopupMenuPanel {
2584
2584
  position: absolute;
2585
- fill: ${t.actorBkg};
2585
+ fill: ${n.actorBkg};
2586
2586
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
2587
2587
  filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
2588
2588
  }
2589
2589
  .actor-man line {
2590
- stroke: ${t.actorBorder};
2591
- fill: ${t.actorBkg};
2590
+ stroke: ${n.actorBorder};
2591
+ fill: ${n.actorBkg};
2592
2592
  }
2593
2593
  .actor-man circle, line {
2594
- stroke: ${t.actorBorder};
2595
- fill: ${t.actorBkg};
2594
+ stroke: ${n.actorBorder};
2595
+ fill: ${n.actorBkg};
2596
2596
  stroke-width: 2px;
2597
2597
  }
2598
2598
 
2599
- `, "getStyles"), ACTOR_TYPE_WIDTH = 36, TOP_ACTOR_CLASS = "actor-top", BOTTOM_ACTOR_CLASS = "actor-bottom", ACTOR_BOX_CLASS = "actor-box", ACTOR_MAN_FIGURE_CLASS = "actor-man", drawRect2 = /* @__PURE__ */ __name(function(t, l) {
2600
- return drawRect(t, l);
2601
- }, "drawRect"), drawPopup = /* @__PURE__ */ __name(function(t, l, u, d, f) {
2599
+ `, "getStyles"), ACTOR_TYPE_WIDTH = 36, TOP_ACTOR_CLASS = "actor-top", BOTTOM_ACTOR_CLASS = "actor-bottom", ACTOR_BOX_CLASS = "actor-box", ACTOR_MAN_FIGURE_CLASS = "actor-man", drawRect2 = /* @__PURE__ */ __name(function(n, l) {
2600
+ return drawRect(n, l);
2601
+ }, "drawRect"), drawPopup = /* @__PURE__ */ __name(function(n, l, u, d, f) {
2602
2602
  if (l.links === void 0 || l.links === null || Object.keys(l.links).length === 0) return {
2603
2603
  height: 0,
2604
2604
  width: 0
@@ -2606,54 +2606,54 @@ var sequenceDiagram_default = parser, LINETYPE = {
2606
2606
  let p = l.links, m = l.actorCnt, h = l.rectData;
2607
2607
  var g = "none";
2608
2608
  f && (g = "block !important");
2609
- let _ = t.append("g");
2609
+ let _ = n.append("g");
2610
2610
  _.attr("id", "actor" + m + "_popup"), _.attr("class", "actorPopupMenu"), _.attr("display", g);
2611
2611
  var v = "";
2612
2612
  h.class !== void 0 && (v = " " + h.class);
2613
2613
  let y = h.width > u ? h.width : u, b = _.append("rect");
2614
2614
  if (b.attr("class", "actorPopupMenuPanel" + v), b.attr("x", h.x), b.attr("y", h.height), b.attr("fill", h.fill), b.attr("stroke", h.stroke), b.attr("width", y), b.attr("height", h.height), b.attr("rx", h.rx), b.attr("ry", h.ry), p != null) {
2615
2615
  var x = 20;
2616
- for (let t in p) {
2617
- var S = _.append("a"), C = (0, import_dist.sanitizeUrl)(p[t]);
2618
- S.attr("xlink:href", C), S.attr("target", "_blank"), _drawMenuItemTextCandidateFunc(d)(t, S, h.x + 10, h.height + x, y, 20, { class: "actor" }, d), x += 30;
2616
+ for (let n in p) {
2617
+ var S = _.append("a"), C = (0, import_dist.sanitizeUrl)(p[n]);
2618
+ S.attr("xlink:href", C), S.attr("target", "_blank"), _drawMenuItemTextCandidateFunc(d)(n, S, h.x + 10, h.height + x, y, 20, { class: "actor" }, d), x += 30;
2619
2619
  }
2620
2620
  }
2621
2621
  return b.attr("height", x), {
2622
2622
  height: h.height + x,
2623
2623
  width: y
2624
2624
  };
2625
- }, "drawPopup"), popupMenuToggle = /* @__PURE__ */ __name(function(t) {
2626
- return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
2627
- }, "popupMenuToggle"), drawKatex = /* @__PURE__ */ __name(async function(t, l, u = null) {
2628
- let d = t.append("foreignObject"), f = await renderKatexSanitized(l.text, getConfig()), p = d.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(f).node().getBoundingClientRect();
2625
+ }, "drawPopup"), popupMenuToggle = /* @__PURE__ */ __name(function(n) {
2626
+ return "var pu = document.getElementById('" + n + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
2627
+ }, "popupMenuToggle"), drawKatex = /* @__PURE__ */ __name(async function(n, l, u = null) {
2628
+ let d = n.append("foreignObject"), f = await renderKatexSanitized(l.text, getConfig()), p = d.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(f).node().getBoundingClientRect();
2629
2629
  if (d.attr("height", Math.round(p.height)).attr("width", Math.round(p.width)), l.class === "noteText") {
2630
- let u = t.node().firstChild;
2630
+ let u = n.node().firstChild;
2631
2631
  u.setAttribute("height", p.height + 2 * l.textMargin);
2632
2632
  let f = u.getBBox();
2633
2633
  d.attr("x", Math.round(f.x + f.width / 2 - p.width / 2)).attr("y", Math.round(f.y + f.height / 2 - p.height / 2));
2634
2634
  } else if (u) {
2635
- let { startx: t, stopx: f, starty: m } = u;
2636
- if (t > f) {
2637
- let l = t;
2638
- t = f, f = l;
2635
+ let { startx: n, stopx: f, starty: m } = u;
2636
+ if (n > f) {
2637
+ let l = n;
2638
+ n = f, f = l;
2639
2639
  }
2640
- d.attr("x", Math.round(t + Math.abs(t - f) / 2 - p.width / 2)), l.class === "loopText" ? d.attr("y", Math.round(m)) : d.attr("y", Math.round(m - p.height));
2640
+ d.attr("x", Math.round(n + Math.abs(n - f) / 2 - p.width / 2)), l.class === "loopText" ? d.attr("y", Math.round(m)) : d.attr("y", Math.round(m - p.height));
2641
2641
  }
2642
2642
  return [d];
2643
- }, "drawKatex"), drawText = /* @__PURE__ */ __name(function(t, u) {
2644
- let d = 0, p = 0, m = u.text.split(common_default.lineBreakRegex), [h, g] = parseFontSize(u.fontSize), _ = [], v = 0, y = /* @__PURE__ */ __name(() => u.y, "yfunc");
2643
+ }, "drawKatex"), drawText = /* @__PURE__ */ __name(function(n, u) {
2644
+ let d = 0, f = 0, p = u.text.split(common_default.lineBreakRegex), [m, h] = parseFontSize(u.fontSize), g = [], _ = 0, v = /* @__PURE__ */ __name(() => u.y, "yfunc");
2645
2645
  if (u.valign !== void 0 && u.textMargin !== void 0 && u.textMargin > 0) switch (u.valign) {
2646
2646
  case "top":
2647
2647
  case "start":
2648
- y = /* @__PURE__ */ __name(() => Math.round(u.y + u.textMargin), "yfunc");
2648
+ v = /* @__PURE__ */ __name(() => Math.round(u.y + u.textMargin), "yfunc");
2649
2649
  break;
2650
2650
  case "middle":
2651
2651
  case "center":
2652
- y = /* @__PURE__ */ __name(() => Math.round(u.y + (d + p + u.textMargin) / 2), "yfunc");
2652
+ v = /* @__PURE__ */ __name(() => Math.round(u.y + (d + f + u.textMargin) / 2), "yfunc");
2653
2653
  break;
2654
2654
  case "bottom":
2655
2655
  case "end":
2656
- y = /* @__PURE__ */ __name(() => Math.round(u.y + (d + p + 2 * u.textMargin) - u.textMargin), "yfunc");
2656
+ v = /* @__PURE__ */ __name(() => Math.round(u.y + (d + f + 2 * u.textMargin) - u.textMargin), "yfunc");
2657
2657
  break;
2658
2658
  }
2659
2659
  if (u.anchor !== void 0 && u.textMargin !== void 0 && u.width !== void 0) switch (u.anchor) {
@@ -2670,197 +2670,197 @@ var sequenceDiagram_default = parser, LINETYPE = {
2670
2670
  u.x = Math.round(u.x + u.width - u.textMargin), u.anchor = "end", u.dominantBaseline = "middle", u.alignmentBaseline = "middle";
2671
2671
  break;
2672
2672
  }
2673
- for (let [l, f] of m.entries()) {
2674
- u.textMargin !== void 0 && u.textMargin === 0 && h !== void 0 && (v = l * h);
2675
- let m = t.append("text");
2676
- m.attr("x", u.x), m.attr("y", y()), u.anchor !== void 0 && m.attr("text-anchor", u.anchor).attr("dominant-baseline", u.dominantBaseline).attr("alignment-baseline", u.alignmentBaseline), u.fontFamily !== void 0 && m.style("font-family", u.fontFamily), g !== void 0 && m.style("font-size", g), u.fontWeight !== void 0 && m.style("font-weight", u.fontWeight), u.fill !== void 0 && m.attr("fill", u.fill), u.class !== void 0 && m.attr("class", u.class), u.dy === void 0 ? v !== 0 && m.attr("dy", v) : m.attr("dy", u.dy);
2677
- let b = f || "​";
2673
+ for (let [l, y] of p.entries()) {
2674
+ u.textMargin !== void 0 && u.textMargin === 0 && m !== void 0 && (_ = l * m);
2675
+ let p = n.append("text");
2676
+ p.attr("x", u.x), p.attr("y", v()), u.anchor !== void 0 && p.attr("text-anchor", u.anchor).attr("dominant-baseline", u.dominantBaseline).attr("alignment-baseline", u.alignmentBaseline), u.fontFamily !== void 0 && p.style("font-family", u.fontFamily), h !== void 0 && p.style("font-size", h), u.fontWeight !== void 0 && p.style("font-weight", u.fontWeight), u.fill !== void 0 && p.attr("fill", u.fill), u.class !== void 0 && p.attr("class", u.class), u.dy === void 0 ? _ !== 0 && p.attr("dy", _) : p.attr("dy", u.dy);
2677
+ let b = y || "​";
2678
2678
  if (u.tspan) {
2679
- let t = m.append("tspan");
2680
- t.attr("x", u.x), u.fill !== void 0 && t.attr("fill", u.fill), t.text(b);
2681
- } else m.text(b);
2682
- u.valign !== void 0 && u.textMargin !== void 0 && u.textMargin > 0 && (p += (m._groups || m)[0][0].getBBox().height, d = p), _.push(m);
2683
- }
2684
- return _;
2685
- }, "drawText"), drawLabel = /* @__PURE__ */ __name(function(t, l) {
2686
- function u(t, l, u, d, f) {
2687
- return t + "," + l + " " + (t + u) + "," + l + " " + (t + u) + "," + (l + d - f) + " " + (t + u - f * 1.2) + "," + (l + d) + " " + t + "," + (l + d);
2688
- }
2689
- __name(u, "genPoints");
2690
- let d = t.append("polygon");
2691
- return d.attr("points", u(l.x, l.y, l.width, l.height, 7)), d.attr("class", "labelBox"), l.y += l.height / 2, drawText(t, l), d;
2692
- }, "drawLabel"), actorCnt = -1, fixLifeLineHeights = /* @__PURE__ */ __name((t, l, u, d) => {
2693
- t.select && u.forEach((u) => {
2694
- let f = l.get(u), p = t.select("#actor" + f.actorCnt);
2679
+ let n = p.append("tspan");
2680
+ n.attr("x", u.x), u.fill !== void 0 && n.attr("fill", u.fill), n.text(b);
2681
+ } else p.text(b);
2682
+ u.valign !== void 0 && u.textMargin !== void 0 && u.textMargin > 0 && (f += (p._groups || p)[0][0].getBBox().height, d = f), g.push(p);
2683
+ }
2684
+ return g;
2685
+ }, "drawText"), drawLabel = /* @__PURE__ */ __name(function(n, u) {
2686
+ function d(n, l, u, d, f) {
2687
+ return n + "," + l + " " + (n + u) + "," + l + " " + (n + u) + "," + (l + d - f) + " " + (n + u - f * 1.2) + "," + (l + d) + " " + n + "," + (l + d);
2688
+ }
2689
+ __name(d, "genPoints");
2690
+ let f = n.append("polygon");
2691
+ return f.attr("points", d(u.x, u.y, u.width, u.height, 7)), f.attr("class", "labelBox"), u.y += u.height / 2, drawText(n, u), f;
2692
+ }, "drawLabel"), actorCnt = -1, fixLifeLineHeights = /* @__PURE__ */ __name((n, l, u, d) => {
2693
+ n.select && u.forEach((u) => {
2694
+ let f = l.get(u), p = n.select("#actor" + f.actorCnt);
2695
2695
  !d.mirrorActors && f.stopy ? p.attr("y2", f.stopy + f.height / 2) : d.mirrorActors && p.attr("y2", f.stopy);
2696
2696
  });
2697
- }, "fixLifeLineHeights"), drawActorTypeParticipant = /* @__PURE__ */ __name(function(t, l, u, d) {
2698
- let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + l.height, h = t.append("g").lower();
2697
+ }, "fixLifeLineHeights"), drawActorTypeParticipant = /* @__PURE__ */ __name(function(n, l, u, d) {
2698
+ let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + l.height, h = n.append("g").lower();
2699
2699
  var g = h;
2700
2700
  d || (actorCnt++, Object.keys(l.links || {}).length && !u.forceMenus && g.attr("onclick", popupMenuToggle(`actor${actorCnt}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), g = h.append("g"), l.actorCnt = actorCnt, l.links != null && g.attr("id", "root-" + actorCnt));
2701
- let _ = getNoteRect();
2702
- var v = "actor";
2703
- l.properties?.class ? v = l.properties.class : _.fill = "#eaeaea", d ? v += ` ${BOTTOM_ACTOR_CLASS}` : v += ` ${TOP_ACTOR_CLASS}`, _.x = l.x, _.y = f, _.width = l.width, _.height = l.height, _.class = v, _.rx = 3, _.ry = 3, _.name = l.name;
2704
- let y = drawRect2(g, _);
2705
- if (l.rectData = _, l.properties?.icon) {
2706
- let t = l.properties.icon.trim();
2707
- t.charAt(0) === "@" ? drawEmbeddedImage(g, _.x + _.width - 20, _.y + 10, t.substr(1)) : drawImage(g, _.x + _.width - 20, _.y + 10, t);
2708
- }
2709
- _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, _.x, _.y, _.width, _.height, { class: `actor ${ACTOR_BOX_CLASS}` }, u);
2701
+ let v = getNoteRect();
2702
+ var y = "actor";
2703
+ l.properties?.class ? y = l.properties.class : v.fill = "#eaeaea", d ? y += ` ${BOTTOM_ACTOR_CLASS}` : y += ` ${TOP_ACTOR_CLASS}`, v.x = l.x, v.y = f, v.width = l.width, v.height = l.height, v.class = y, v.rx = 3, v.ry = 3, v.name = l.name;
2704
+ let b = drawRect2(g, v);
2705
+ if (l.rectData = v, l.properties?.icon) {
2706
+ let n = l.properties.icon.trim();
2707
+ n.charAt(0) === "@" ? drawEmbeddedImage(g, v.x + v.width - 20, v.y + 10, n.substr(1)) : drawImage(g, v.x + v.width - 20, v.y + 10, n);
2708
+ }
2709
+ _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, v.x, v.y, v.width, v.height, { class: `actor ${ACTOR_BOX_CLASS}` }, u);
2710
2710
  let x = l.height;
2711
- if (y.node) {
2712
- let t = y.node().getBBox();
2713
- l.height = t.height, x = t.height;
2711
+ if (b.node) {
2712
+ let n = b.node().getBBox();
2713
+ l.height = n.height, x = n.height;
2714
2714
  }
2715
2715
  return x;
2716
- }, "drawActorTypeParticipant"), drawActorTypeCollections = /* @__PURE__ */ __name(function(t, l, u, d) {
2717
- let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + l.height, h = t.append("g").lower();
2716
+ }, "drawActorTypeParticipant"), drawActorTypeCollections = /* @__PURE__ */ __name(function(n, l, u, d) {
2717
+ let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + l.height, h = n.append("g").lower();
2718
2718
  var g = h;
2719
2719
  d || (actorCnt++, Object.keys(l.links || {}).length && !u.forceMenus && g.attr("onclick", popupMenuToggle(`actor${actorCnt}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), g = h.append("g"), l.actorCnt = actorCnt, l.links != null && g.attr("id", "root-" + actorCnt));
2720
- let _ = getNoteRect();
2721
- var v = "actor";
2722
- l.properties?.class ? v = l.properties.class : _.fill = "#eaeaea", d ? v += ` ${BOTTOM_ACTOR_CLASS}` : v += ` ${TOP_ACTOR_CLASS}`, _.x = l.x, _.y = f, _.width = l.width, _.height = l.height, _.class = v, _.name = l.name;
2723
- let y = {
2724
- ..._,
2725
- x: _.x + -6,
2726
- y: _.y + 6,
2720
+ let v = getNoteRect();
2721
+ var y = "actor";
2722
+ l.properties?.class ? y = l.properties.class : v.fill = "#eaeaea", d ? y += ` ${BOTTOM_ACTOR_CLASS}` : y += ` ${TOP_ACTOR_CLASS}`, v.x = l.x, v.y = f, v.width = l.width, v.height = l.height, v.class = y, v.name = l.name;
2723
+ let b = {
2724
+ ...v,
2725
+ x: v.x + -6,
2726
+ y: v.y + 6,
2727
2727
  class: "actor"
2728
- }, x = drawRect2(g, _);
2729
- if (drawRect2(g, y), l.rectData = _, l.properties?.icon) {
2730
- let t = l.properties.icon.trim();
2731
- t.charAt(0) === "@" ? drawEmbeddedImage(g, _.x + _.width - 20, _.y + 10, t.substr(1)) : drawImage(g, _.x + _.width - 20, _.y + 10, t);
2728
+ }, x = drawRect2(g, v);
2729
+ if (drawRect2(g, b), l.rectData = v, l.properties?.icon) {
2730
+ let n = l.properties.icon.trim();
2731
+ n.charAt(0) === "@" ? drawEmbeddedImage(g, v.x + v.width - 20, v.y + 10, n.substr(1)) : drawImage(g, v.x + v.width - 20, v.y + 10, n);
2732
2732
  }
2733
- _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, _.x - 6, _.y + 6, _.width, _.height, { class: `actor ${ACTOR_BOX_CLASS}` }, u);
2733
+ _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, v.x - 6, v.y + 6, v.width, v.height, { class: `actor ${ACTOR_BOX_CLASS}` }, u);
2734
2734
  let S = l.height;
2735
2735
  if (x.node) {
2736
- let t = x.node().getBBox();
2737
- l.height = t.height, S = t.height;
2736
+ let n = x.node().getBBox();
2737
+ l.height = n.height, S = n.height;
2738
2738
  }
2739
2739
  return S;
2740
- }, "drawActorTypeCollections"), drawActorTypeQueue = /* @__PURE__ */ __name(function(t, l, u, d) {
2741
- let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + l.height, h = t.append("g").lower(), g = h;
2740
+ }, "drawActorTypeCollections"), drawActorTypeQueue = /* @__PURE__ */ __name(function(n, l, u, d) {
2741
+ let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + l.height, h = n.append("g").lower(), g = h;
2742
2742
  d || (actorCnt++, Object.keys(l.links || {}).length && !u.forceMenus && g.attr("onclick", popupMenuToggle(`actor${actorCnt}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), g = h.append("g"), l.actorCnt = actorCnt, l.links != null && g.attr("id", "root-" + actorCnt));
2743
- let _ = getNoteRect(), v = "actor";
2744
- l.properties?.class ? v = l.properties.class : _.fill = "#eaeaea", d ? v += ` ${BOTTOM_ACTOR_CLASS}` : v += ` ${TOP_ACTOR_CLASS}`, _.x = l.x, _.y = f, _.width = l.width, _.height = l.height, _.class = v, _.name = l.name;
2745
- let y = _.height / 2, x = y / (2.5 + _.height / 50), S = g.append("g"), C = g.append("g");
2746
- if (S.append("path").attr("d", `M ${_.x},${_.y + y}
2747
- a ${x},${y} 0 0 0 0,${_.height}
2748
- h ${_.width - 2 * x}
2749
- a ${x},${y} 0 0 0 0,-${_.height}
2743
+ let v = getNoteRect(), y = "actor";
2744
+ l.properties?.class ? y = l.properties.class : v.fill = "#eaeaea", d ? y += ` ${BOTTOM_ACTOR_CLASS}` : y += ` ${TOP_ACTOR_CLASS}`, v.x = l.x, v.y = f, v.width = l.width, v.height = l.height, v.class = y, v.name = l.name;
2745
+ let b = v.height / 2, x = b / (2.5 + v.height / 50), S = g.append("g"), C = g.append("g");
2746
+ if (S.append("path").attr("d", `M ${v.x},${v.y + b}
2747
+ a ${x},${b} 0 0 0 0,${v.height}
2748
+ h ${v.width - 2 * x}
2749
+ a ${x},${b} 0 0 0 0,-${v.height}
2750
2750
  Z
2751
- `).attr("class", v), C.append("path").attr("d", `M ${_.x},${_.y + y}
2752
- a ${x},${y} 0 0 0 0,${_.height}`).attr("stroke", "#666").attr("stroke-width", "1px").attr("class", v), S.attr("transform", `translate(${x}, ${-(_.height / 2)})`), C.attr("transform", `translate(${_.width - x}, ${-_.height / 2})`), l.rectData = _, l.properties?.icon) {
2753
- let t = l.properties.icon.trim(), u = _.x + _.width - 20, d = _.y + 10;
2754
- t.charAt(0) === "@" ? drawEmbeddedImage(g, u, d, t.substr(1)) : drawImage(g, u, d, t);
2751
+ `).attr("class", y), C.append("path").attr("d", `M ${v.x},${v.y + b}
2752
+ a ${x},${b} 0 0 0 0,${v.height}`).attr("stroke", "#666").attr("stroke-width", "1px").attr("class", y), S.attr("transform", `translate(${x}, ${-(v.height / 2)})`), C.attr("transform", `translate(${v.width - x}, ${-v.height / 2})`), l.rectData = v, l.properties?.icon) {
2753
+ let n = l.properties.icon.trim(), u = v.x + v.width - 20, d = v.y + 10;
2754
+ n.charAt(0) === "@" ? drawEmbeddedImage(g, u, d, n.substr(1)) : drawImage(g, u, d, n);
2755
2755
  }
2756
- _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, _.x, _.y, _.width, _.height, { class: `actor ${ACTOR_BOX_CLASS}` }, u);
2756
+ _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, v.x, v.y, v.width, v.height, { class: `actor ${ACTOR_BOX_CLASS}` }, u);
2757
2757
  let w = l.height, T = S.select("path:last-child");
2758
2758
  if (T.node()) {
2759
- let t = T.node().getBBox();
2760
- l.height = t.height, w = t.height;
2759
+ let n = T.node().getBBox();
2760
+ l.height = n.height, w = n.height;
2761
2761
  }
2762
2762
  return w;
2763
- }, "drawActorTypeQueue"), drawActorTypeControl = /* @__PURE__ */ __name(function(t, l, u, d) {
2764
- let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + 75, h = t.append("g").lower();
2763
+ }, "drawActorTypeQueue"), drawActorTypeControl = /* @__PURE__ */ __name(function(n, l, u, d) {
2764
+ let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + 75, h = n.append("g").lower();
2765
2765
  d || (actorCnt++, h.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), l.actorCnt = actorCnt);
2766
- let g = t.append("g"), _ = ACTOR_MAN_FIGURE_CLASS;
2767
- d ? _ += ` ${BOTTOM_ACTOR_CLASS}` : _ += ` ${TOP_ACTOR_CLASS}`, g.attr("class", _), g.attr("name", l.name);
2768
- let v = getNoteRect();
2769
- v.x = l.x, v.y = f, v.fill = "#eaeaea", v.width = l.width, v.height = l.height, v.class = "actor";
2770
- let y = l.x + l.width / 2, x = f + 30;
2771
- return g.append("defs").append("marker").attr("id", "filled-head-control").attr("refX", 11).attr("refY", 5.8).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "172.5").append("path").attr("d", "M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"), g.append("circle").attr("cx", y).attr("cy", x).attr("r", 18).attr("fill", "#eaeaf7").attr("stroke", "#666").attr("stroke-width", 1.2), g.append("line").attr("marker-end", "url(#filled-head-control)").attr("transform", `translate(${y}, ${x - 18})`), l.height = g.node().getBBox().height + 2 * (u?.sequence?.labelBoxHeight ?? 0), _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, v.x, v.y + 18 + (d ? 5 : 10), v.width, v.height, { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` }, u), l.height;
2772
- }, "drawActorTypeControl"), drawActorTypeEntity = /* @__PURE__ */ __name(function(t, l, u, d) {
2773
- let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + 75, h = t.append("g").lower(), g = t.append("g"), _ = ACTOR_MAN_FIGURE_CLASS;
2774
- d ? _ += ` ${BOTTOM_ACTOR_CLASS}` : _ += ` ${TOP_ACTOR_CLASS}`, g.attr("class", _), g.attr("name", l.name);
2775
- let v = getNoteRect();
2776
- v.x = l.x, v.y = f, v.fill = "#eaeaea", v.width = l.width, v.height = l.height, v.class = "actor";
2777
- let y = l.x + l.width / 2, x = f + (d ? 10 : 25);
2778
- return g.append("circle").attr("cx", y).attr("cy", x).attr("r", 18).attr("width", l.width).attr("height", l.height), g.append("line").attr("x1", y - 18).attr("x2", y + 18).attr("y1", x + 18).attr("y2", x + 18).attr("stroke", "#333").attr("stroke-width", 2), l.height = g.node().getBBox().height + (u?.sequence?.labelBoxHeight ?? 0), d || (actorCnt++, h.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), l.actorCnt = actorCnt), _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, v.x, v.y + (d ? (x - f + 18 - 5) / 2 : (x + 18 - f) / 2), v.width, v.height, { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` }, u), g.attr("transform", `translate(0, ${18 / 2})`), l.height;
2779
- }, "drawActorTypeEntity"), drawActorTypeDatabase = /* @__PURE__ */ __name(function(t, l, u, d) {
2780
- let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + l.height + 2 * u.boxTextMargin, h = t.append("g").lower(), g = h;
2766
+ let g = n.append("g"), v = ACTOR_MAN_FIGURE_CLASS;
2767
+ d ? v += ` ${BOTTOM_ACTOR_CLASS}` : v += ` ${TOP_ACTOR_CLASS}`, g.attr("class", v), g.attr("name", l.name);
2768
+ let y = getNoteRect();
2769
+ y.x = l.x, y.y = f, y.fill = "#eaeaea", y.width = l.width, y.height = l.height, y.class = "actor";
2770
+ let b = l.x + l.width / 2, x = f + 30;
2771
+ return g.append("defs").append("marker").attr("id", "filled-head-control").attr("refX", 11).attr("refY", 5.8).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "172.5").append("path").attr("d", "M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"), g.append("circle").attr("cx", b).attr("cy", x).attr("r", 18).attr("fill", "#eaeaf7").attr("stroke", "#666").attr("stroke-width", 1.2), g.append("line").attr("marker-end", "url(#filled-head-control)").attr("transform", `translate(${b}, ${x - 18})`), l.height = g.node().getBBox().height + 2 * (u?.sequence?.labelBoxHeight ?? 0), _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, y.x, y.y + 18 + (d ? 5 : 10), y.width, y.height, { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` }, u), l.height;
2772
+ }, "drawActorTypeControl"), drawActorTypeEntity = /* @__PURE__ */ __name(function(n, l, u, d) {
2773
+ let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + 75, h = n.append("g").lower(), g = n.append("g"), v = ACTOR_MAN_FIGURE_CLASS;
2774
+ d ? v += ` ${BOTTOM_ACTOR_CLASS}` : v += ` ${TOP_ACTOR_CLASS}`, g.attr("class", v), g.attr("name", l.name);
2775
+ let y = getNoteRect();
2776
+ y.x = l.x, y.y = f, y.fill = "#eaeaea", y.width = l.width, y.height = l.height, y.class = "actor";
2777
+ let b = l.x + l.width / 2, x = f + (d ? 10 : 25);
2778
+ return g.append("circle").attr("cx", b).attr("cy", x).attr("r", 18).attr("width", l.width).attr("height", l.height), g.append("line").attr("x1", b - 18).attr("x2", b + 18).attr("y1", x + 18).attr("y2", x + 18).attr("stroke", "#333").attr("stroke-width", 2), l.height = g.node().getBBox().height + (u?.sequence?.labelBoxHeight ?? 0), d || (actorCnt++, h.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), l.actorCnt = actorCnt), _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, y.x, y.y + (d ? (x - f + 18 - 5) / 2 : (x + 18 - f) / 2), y.width, y.height, { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` }, u), g.attr("transform", `translate(0, ${18 / 2})`), l.height;
2779
+ }, "drawActorTypeEntity"), drawActorTypeDatabase = /* @__PURE__ */ __name(function(n, l, u, d) {
2780
+ let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + l.height + 2 * u.boxTextMargin, h = n.append("g").lower(), g = h;
2781
2781
  d || (actorCnt++, Object.keys(l.links || {}).length && !u.forceMenus && g.attr("onclick", popupMenuToggle(`actor${actorCnt}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), g = h.append("g"), l.actorCnt = actorCnt, l.links != null && g.attr("id", "root-" + actorCnt));
2782
- let _ = getNoteRect(), v = "actor";
2783
- l.properties?.class ? v = l.properties.class : _.fill = "#eaeaea", d ? v += ` ${BOTTOM_ACTOR_CLASS}` : v += ` ${TOP_ACTOR_CLASS}`, _.x = l.x, _.y = f, _.width = l.width, _.height = l.height, _.class = v, _.name = l.name, _.x = l.x, _.y = f;
2784
- let y = _.width / 4, x = _.width / 4, S = y / 2, C = S / (2.5 + y / 50), w = g.append("g"), T = `
2785
- M ${_.x},${_.y + C}
2786
- a ${S},${C} 0 0 0 ${y},0
2787
- a ${S},${C} 0 0 0 -${y},0
2782
+ let v = getNoteRect(), y = "actor";
2783
+ l.properties?.class ? y = l.properties.class : v.fill = "#eaeaea", d ? y += ` ${BOTTOM_ACTOR_CLASS}` : y += ` ${TOP_ACTOR_CLASS}`, v.x = l.x, v.y = f, v.width = l.width, v.height = l.height, v.class = y, v.name = l.name, v.x = l.x, v.y = f;
2784
+ let b = v.width / 4, x = v.width / 4, S = b / 2, C = S / (2.5 + b / 50), w = g.append("g"), T = `
2785
+ M ${v.x},${v.y + C}
2786
+ a ${S},${C} 0 0 0 ${b},0
2787
+ a ${S},${C} 0 0 0 -${b},0
2788
2788
  l 0,${x - 2 * C}
2789
- a ${S},${C} 0 0 0 ${y},0
2789
+ a ${S},${C} 0 0 0 ${b},0
2790
2790
  l 0,-${x - 2 * C}
2791
2791
  `;
2792
- w.append("path").attr("d", T).attr("fill", "#eaeaea").attr("stroke", "#000").attr("stroke-width", 1).attr("class", v), d ? w.attr("transform", `translate(${y * 1.5}, ${_.height / 4 - 2 * C})`) : w.attr("transform", `translate(${y * 1.5}, ${(_.height + C) / 4})`), l.rectData = _, _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, _.x, _.y + (d ? (_.height + x) / 4 : (_.height + C) / 2), _.width, _.height, { class: `actor ${ACTOR_BOX_CLASS}` }, u);
2792
+ w.append("path").attr("d", T).attr("fill", "#eaeaea").attr("stroke", "#000").attr("stroke-width", 1).attr("class", y), d ? w.attr("transform", `translate(${b * 1.5}, ${v.height / 4 - 2 * C})`) : w.attr("transform", `translate(${b * 1.5}, ${(v.height + C) / 4})`), l.rectData = v, _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, v.x, v.y + (d ? (v.height + x) / 4 : (v.height + C) / 2), v.width, v.height, { class: `actor ${ACTOR_BOX_CLASS}` }, u);
2793
2793
  let E = w.select("path:last-child");
2794
2794
  return E.node() && (l.height = E.node().getBBox().height + (u.sequence.labelBoxHeight ?? 0)), l.height;
2795
- }, "drawActorTypeDatabase"), drawActorTypeBoundary = /* @__PURE__ */ __name(function(t, l, u, d) {
2796
- let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + 80, h = t.append("g").lower();
2795
+ }, "drawActorTypeDatabase"), drawActorTypeBoundary = /* @__PURE__ */ __name(function(n, l, u, d) {
2796
+ let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + 80, h = n.append("g").lower();
2797
2797
  d || (actorCnt++, h.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), l.actorCnt = actorCnt);
2798
- let g = t.append("g"), _ = ACTOR_MAN_FIGURE_CLASS;
2799
- d ? _ += ` ${BOTTOM_ACTOR_CLASS}` : _ += ` ${TOP_ACTOR_CLASS}`, g.attr("class", _), g.attr("name", l.name);
2800
- let v = getNoteRect();
2801
- return v.x = l.x, v.y = f, v.fill = "#eaeaea", v.width = l.width, v.height = l.height, v.class = "actor", g.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", l.x + l.width / 2 - 30 * 2.5).attr("y1", f + 10).attr("x2", l.x + l.width / 2 - 15).attr("y2", f + 10), g.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", l.x + l.width / 2 - 30 * 2.5).attr("y1", f + 0).attr("x2", l.x + l.width / 2 - 30 * 2.5).attr("y2", f + 20), g.append("circle").attr("cx", l.x + l.width / 2).attr("cy", f + 10).attr("r", 30), l.height = g.node().getBBox().height + (u.sequence.labelBoxHeight ?? 0), _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, v.x, v.y + (d ? 30 / 2 - 4 : 18), v.width, v.height, { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` }, u), g.attr("transform", "translate(0,22)"), l.height;
2802
- }, "drawActorTypeBoundary"), drawActorTypeActor = /* @__PURE__ */ __name(function(t, l, u, d) {
2803
- let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + 80, h = t.append("g").lower();
2798
+ let g = n.append("g"), v = ACTOR_MAN_FIGURE_CLASS;
2799
+ d ? v += ` ${BOTTOM_ACTOR_CLASS}` : v += ` ${TOP_ACTOR_CLASS}`, g.attr("class", v), g.attr("name", l.name);
2800
+ let y = getNoteRect();
2801
+ return y.x = l.x, y.y = f, y.fill = "#eaeaea", y.width = l.width, y.height = l.height, y.class = "actor", g.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", l.x + l.width / 2 - 30 * 2.5).attr("y1", f + 10).attr("x2", l.x + l.width / 2 - 15).attr("y2", f + 10), g.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", l.x + l.width / 2 - 30 * 2.5).attr("y1", f + 0).attr("x2", l.x + l.width / 2 - 30 * 2.5).attr("y2", f + 20), g.append("circle").attr("cx", l.x + l.width / 2).attr("cy", f + 10).attr("r", 30), l.height = g.node().getBBox().height + (u.sequence.labelBoxHeight ?? 0), _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, y.x, y.y + (d ? 30 / 2 - 4 : 18), y.width, y.height, { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` }, u), g.attr("transform", "translate(0,22)"), l.height;
2802
+ }, "drawActorTypeBoundary"), drawActorTypeActor = /* @__PURE__ */ __name(function(n, l, u, d) {
2803
+ let f = d ? l.stopy : l.starty, p = l.x + l.width / 2, m = f + 80, h = n.append("g").lower();
2804
2804
  d || (actorCnt++, h.append("line").attr("id", "actor" + actorCnt).attr("x1", p).attr("y1", m).attr("x2", p).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", l.name), l.actorCnt = actorCnt);
2805
- let g = t.append("g"), _ = ACTOR_MAN_FIGURE_CLASS;
2806
- d ? _ += ` ${BOTTOM_ACTOR_CLASS}` : _ += ` ${TOP_ACTOR_CLASS}`, g.attr("class", _), g.attr("name", l.name);
2807
- let v = getNoteRect();
2808
- v.x = l.x, v.y = f, v.fill = "#eaeaea", v.width = l.width, v.height = l.height, v.class = "actor", v.rx = 3, v.ry = 3, g.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", p).attr("y1", f + 25).attr("x2", p).attr("y2", f + 45), g.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", p - ACTOR_TYPE_WIDTH / 2).attr("y1", f + 33).attr("x2", p + ACTOR_TYPE_WIDTH / 2).attr("y2", f + 33), g.append("line").attr("x1", p - ACTOR_TYPE_WIDTH / 2).attr("y1", f + 60).attr("x2", p).attr("y2", f + 45), g.append("line").attr("x1", p).attr("y1", f + 45).attr("x2", p + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", f + 60);
2809
- let y = g.append("circle");
2810
- return y.attr("cx", l.x + l.width / 2), y.attr("cy", f + 10), y.attr("r", 15), y.attr("width", l.width), y.attr("height", l.height), l.height = g.node().getBBox().height, _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, v.x, v.y + 35, v.width, v.height, { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` }, u), l.height;
2811
- }, "drawActorTypeActor"), drawActor = /* @__PURE__ */ __name(async function(t, l, u, d) {
2805
+ let g = n.append("g"), v = ACTOR_MAN_FIGURE_CLASS;
2806
+ d ? v += ` ${BOTTOM_ACTOR_CLASS}` : v += ` ${TOP_ACTOR_CLASS}`, g.attr("class", v), g.attr("name", l.name);
2807
+ let y = getNoteRect();
2808
+ y.x = l.x, y.y = f, y.fill = "#eaeaea", y.width = l.width, y.height = l.height, y.class = "actor", y.rx = 3, y.ry = 3, g.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", p).attr("y1", f + 25).attr("x2", p).attr("y2", f + 45), g.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", p - ACTOR_TYPE_WIDTH / 2).attr("y1", f + 33).attr("x2", p + ACTOR_TYPE_WIDTH / 2).attr("y2", f + 33), g.append("line").attr("x1", p - ACTOR_TYPE_WIDTH / 2).attr("y1", f + 60).attr("x2", p).attr("y2", f + 45), g.append("line").attr("x1", p).attr("y1", f + 45).attr("x2", p + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", f + 60);
2809
+ let b = g.append("circle");
2810
+ return b.attr("cx", l.x + l.width / 2), b.attr("cy", f + 10), b.attr("r", 15), b.attr("width", l.width), b.attr("height", l.height), l.height = g.node().getBBox().height, _drawTextCandidateFunc(u, hasKatex(l.description))(l.description, g, y.x, y.y + 35, y.width, y.height, { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` }, u), l.height;
2811
+ }, "drawActorTypeActor"), drawActor = /* @__PURE__ */ __name(async function(n, l, u, d) {
2812
2812
  switch (l.type) {
2813
- case "actor": return await drawActorTypeActor(t, l, u, d);
2814
- case "participant": return await drawActorTypeParticipant(t, l, u, d);
2815
- case "boundary": return await drawActorTypeBoundary(t, l, u, d);
2816
- case "control": return await drawActorTypeControl(t, l, u, d);
2817
- case "entity": return await drawActorTypeEntity(t, l, u, d);
2818
- case "database": return await drawActorTypeDatabase(t, l, u, d);
2819
- case "collections": return await drawActorTypeCollections(t, l, u, d);
2820
- case "queue": return await drawActorTypeQueue(t, l, u, d);
2821
- }
2822
- }, "drawActor"), drawBox = /* @__PURE__ */ __name(function(t, l, u) {
2823
- let d = t.append("g");
2813
+ case "actor": return await drawActorTypeActor(n, l, u, d);
2814
+ case "participant": return await drawActorTypeParticipant(n, l, u, d);
2815
+ case "boundary": return await drawActorTypeBoundary(n, l, u, d);
2816
+ case "control": return await drawActorTypeControl(n, l, u, d);
2817
+ case "entity": return await drawActorTypeEntity(n, l, u, d);
2818
+ case "database": return await drawActorTypeDatabase(n, l, u, d);
2819
+ case "collections": return await drawActorTypeCollections(n, l, u, d);
2820
+ case "queue": return await drawActorTypeQueue(n, l, u, d);
2821
+ }
2822
+ }, "drawActor"), drawBox = /* @__PURE__ */ __name(function(n, l, u) {
2823
+ let d = n.append("g");
2824
2824
  drawBackgroundRect2(d, l), l.name && _drawTextCandidateFunc(u)(l.name, d, l.x, l.y + u.boxTextMargin + (l.textMaxHeight || 0) / 2, l.width, 0, { class: "text" }, u), d.lower();
2825
- }, "drawBox"), anchorElement = /* @__PURE__ */ __name(function(t) {
2826
- return t.append("g");
2827
- }, "anchorElement"), drawActivation = /* @__PURE__ */ __name(function(t, l, u, d, f) {
2825
+ }, "drawBox"), anchorElement = /* @__PURE__ */ __name(function(n) {
2826
+ return n.append("g");
2827
+ }, "anchorElement"), drawActivation = /* @__PURE__ */ __name(function(n, l, u, d, f) {
2828
2828
  let p = getNoteRect(), m = l.anchored;
2829
2829
  p.x = l.startx, p.y = l.starty, p.class = "activation" + f % 3, p.width = l.stopx - l.startx, p.height = u - l.starty, drawRect2(m, p);
2830
- }, "drawActivation"), drawLoop = /* @__PURE__ */ __name(async function(t, l, u, d) {
2831
- let { boxMargin: p, boxTextMargin: m, labelBoxHeight: h, labelBoxWidth: g, messageFontFamily: _, messageFontSize: v, messageFontWeight: y } = d, x = t.append("g"), S = /* @__PURE__ */ __name(function(t, l, u, d) {
2832
- return x.append("line").attr("x1", t).attr("y1", l).attr("x2", u).attr("y2", d).attr("class", "loopLine");
2830
+ }, "drawActivation"), drawLoop = /* @__PURE__ */ __name(async function(n, u, d, f) {
2831
+ let { boxMargin: p, boxTextMargin: m, labelBoxHeight: h, labelBoxWidth: g, messageFontFamily: v, messageFontSize: y, messageFontWeight: b } = f, x = n.append("g"), S = /* @__PURE__ */ __name(function(n, l, u, d) {
2832
+ return x.append("line").attr("x1", n).attr("y1", l).attr("x2", u).attr("y2", d).attr("class", "loopLine");
2833
2833
  }, "drawLoopLine");
2834
- S(l.startx, l.starty, l.stopx, l.starty), S(l.stopx, l.starty, l.stopx, l.stopy), S(l.startx, l.stopy, l.stopx, l.stopy), S(l.startx, l.starty, l.startx, l.stopy), l.sections !== void 0 && l.sections.forEach(function(t) {
2835
- S(l.startx, t.y, l.stopx, t.y).style("stroke-dasharray", "3, 3");
2834
+ S(u.startx, u.starty, u.stopx, u.starty), S(u.stopx, u.starty, u.stopx, u.stopy), S(u.startx, u.stopy, u.stopx, u.stopy), S(u.startx, u.starty, u.startx, u.stopy), u.sections !== void 0 && u.sections.forEach(function(n) {
2835
+ S(u.startx, n.y, u.stopx, n.y).style("stroke-dasharray", "3, 3");
2836
2836
  });
2837
2837
  let C = getTextObj();
2838
- C.text = u, C.x = l.startx, C.y = l.starty, C.fontFamily = _, C.fontSize = v, C.fontWeight = y, C.anchor = "middle", C.valign = "middle", C.tspan = !1, C.width = g || 50, C.height = h || 20, C.textMargin = m, C.class = "labelText", drawLabel(x, C), C = getTextObj2(), C.text = l.title, C.x = l.startx + g / 2 + (l.stopx - l.startx) / 2, C.y = l.starty + p + m, C.anchor = "middle", C.valign = "middle", C.textMargin = m, C.class = "loopText", C.fontFamily = _, C.fontSize = v, C.fontWeight = y, C.wrap = !0;
2839
- let w = hasKatex(C.text) ? await drawKatex(x, C, l) : drawText(x, C);
2840
- if (l.sectionTitles !== void 0) {
2841
- for (let [t, u] of Object.entries(l.sectionTitles)) if (u.message) {
2842
- C.text = u.message, C.x = l.startx + (l.stopx - l.startx) / 2, C.y = l.sections[t].y + p + m, C.class = "loopText", C.anchor = "middle", C.valign = "middle", C.tspan = !1, C.fontFamily = _, C.fontSize = v, C.fontWeight = y, C.wrap = l.wrap, hasKatex(C.text) ? (l.starty = l.sections[t].y, await drawKatex(x, C, l)) : drawText(x, C);
2843
- let d = Math.round(w.map((t) => (t._groups || t)[0][0].getBBox().height).reduce((t, l) => t + l));
2844
- l.sections[t].height += d - (p + m);
2838
+ C.text = d, C.x = u.startx, C.y = u.starty, C.fontFamily = v, C.fontSize = y, C.fontWeight = b, C.anchor = "middle", C.valign = "middle", C.tspan = !1, C.width = g || 50, C.height = h || 20, C.textMargin = m, C.class = "labelText", drawLabel(x, C), C = getTextObj2(), C.text = u.title, C.x = u.startx + g / 2 + (u.stopx - u.startx) / 2, C.y = u.starty + p + m, C.anchor = "middle", C.valign = "middle", C.textMargin = m, C.class = "loopText", C.fontFamily = v, C.fontSize = y, C.fontWeight = b, C.wrap = !0;
2839
+ let w = hasKatex(C.text) ? await drawKatex(x, C, u) : drawText(x, C);
2840
+ if (u.sectionTitles !== void 0) {
2841
+ for (let [n, l] of Object.entries(u.sectionTitles)) if (l.message) {
2842
+ C.text = l.message, C.x = u.startx + (u.stopx - u.startx) / 2, C.y = u.sections[n].y + p + m, C.class = "loopText", C.anchor = "middle", C.valign = "middle", C.tspan = !1, C.fontFamily = v, C.fontSize = y, C.fontWeight = b, C.wrap = u.wrap, hasKatex(C.text) ? (u.starty = u.sections[n].y, await drawKatex(x, C, u)) : drawText(x, C);
2843
+ let d = Math.round(w.map((n) => (n._groups || n)[0][0].getBBox().height).reduce((n, l) => n + l));
2844
+ u.sections[n].height += d - (p + m);
2845
2845
  }
2846
2846
  }
2847
- return l.height = Math.round(l.stopy - l.starty), x;
2848
- }, "drawLoop"), drawBackgroundRect2 = /* @__PURE__ */ __name(function(t, l) {
2849
- drawBackgroundRect(t, l);
2850
- }, "drawBackgroundRect"), insertDatabaseIcon = /* @__PURE__ */ __name(function(t) {
2851
- t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr("d", "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");
2852
- }, "insertDatabaseIcon"), insertComputerIcon = /* @__PURE__ */ __name(function(t) {
2853
- t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
2854
- }, "insertComputerIcon"), insertClockIcon = /* @__PURE__ */ __name(function(t) {
2855
- t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
2856
- }, "insertClockIcon"), insertArrowHead = /* @__PURE__ */ __name(function(t) {
2857
- t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M -1 0 L 10 5 L 0 10 z");
2858
- }, "insertArrowHead"), insertArrowFilledHead = /* @__PURE__ */ __name(function(t) {
2859
- t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
2860
- }, "insertArrowFilledHead"), insertSequenceNumber = /* @__PURE__ */ __name(function(t) {
2861
- 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);
2862
- }, "insertSequenceNumber"), insertArrowCrossHead = /* @__PURE__ */ __name(function(t) {
2863
- t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5).append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
2847
+ return u.height = Math.round(u.stopy - u.starty), x;
2848
+ }, "drawLoop"), drawBackgroundRect2 = /* @__PURE__ */ __name(function(n, l) {
2849
+ drawBackgroundRect(n, l);
2850
+ }, "drawBackgroundRect"), insertDatabaseIcon = /* @__PURE__ */ __name(function(n) {
2851
+ n.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr("d", "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");
2852
+ }, "insertDatabaseIcon"), insertComputerIcon = /* @__PURE__ */ __name(function(n) {
2853
+ n.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
2854
+ }, "insertComputerIcon"), insertClockIcon = /* @__PURE__ */ __name(function(n) {
2855
+ n.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
2856
+ }, "insertClockIcon"), insertArrowHead = /* @__PURE__ */ __name(function(n) {
2857
+ n.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M -1 0 L 10 5 L 0 10 z");
2858
+ }, "insertArrowHead"), insertArrowFilledHead = /* @__PURE__ */ __name(function(n) {
2859
+ n.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
2860
+ }, "insertArrowFilledHead"), insertSequenceNumber = /* @__PURE__ */ __name(function(n) {
2861
+ n.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);
2862
+ }, "insertSequenceNumber"), insertArrowCrossHead = /* @__PURE__ */ __name(function(n) {
2863
+ n.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5).append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
2864
2864
  }, "insertArrowCrossHead"), getTextObj2 = /* @__PURE__ */ __name(function() {
2865
2865
  return {
2866
2866
  x: 0,
@@ -2889,57 +2889,57 @@ var sequenceDiagram_default = parser, LINETYPE = {
2889
2889
  ry: 0
2890
2890
  };
2891
2891
  }, "getNoteRect"), _drawTextCandidateFunc = /* @__PURE__ */ (function() {
2892
- function t(t, l, u, d, f, p, h) {
2893
- m(l.append("text").attr("x", u + f / 2).attr("y", d + p / 2 + 5).style("text-anchor", "middle").text(t), h);
2894
- }
2895
- __name(t, "byText");
2896
- function u(t, u, d, f, p, h, g, _) {
2897
- let { actorFontSize: v, actorFontFamily: y, actorFontWeight: b } = _, [x, S] = parseFontSize(v), C = t.split(common_default.lineBreakRegex);
2898
- for (let t = 0; t < C.length; t++) {
2899
- let l = t * x - x * (C.length - 1) / 2, _ = u.append("text").attr("x", d + p / 2).attr("y", f).style("text-anchor", "middle").style("font-size", S).style("font-weight", b).style("font-family", y);
2900
- _.append("tspan").attr("x", d + p / 2).attr("dy", l).text(C[t]), _.attr("y", f + h / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), m(_, g);
2892
+ function n(n, l, u, d, f, m, h) {
2893
+ p(l.append("text").attr("x", u + f / 2).attr("y", d + m / 2 + 5).style("text-anchor", "middle").text(n), h);
2894
+ }
2895
+ __name(n, "byText");
2896
+ function u(n, l, u, d, f, m, h, g) {
2897
+ let { actorFontSize: _, actorFontFamily: v, actorFontWeight: y } = g, [b, x] = parseFontSize(_), S = n.split(common_default.lineBreakRegex);
2898
+ for (let n = 0; n < S.length; n++) {
2899
+ let g = n * b - b * (S.length - 1) / 2, _ = l.append("text").attr("x", u + f / 2).attr("y", d).style("text-anchor", "middle").style("font-size", x).style("font-weight", y).style("font-family", v);
2900
+ _.append("tspan").attr("x", u + f / 2).attr("dy", g).text(S[n]), _.attr("y", d + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), p(_, h);
2901
2901
  }
2902
2902
  }
2903
2903
  __name(u, "byTspan");
2904
- function d(t, l, d, f, p, h, g, _) {
2905
- let v = l.append("switch"), y = v.append("foreignObject").attr("x", d).attr("y", f).attr("width", p).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
2906
- y.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(t), u(t, v, d, f, p, h, g, _), m(y, g);
2904
+ function d(n, l, d, f, m, h, g, _) {
2905
+ let v = l.append("switch"), y = v.append("foreignObject").attr("x", d).attr("y", f).attr("width", m).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
2906
+ y.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), u(n, v, d, f, m, h, g, _), p(y, g);
2907
2907
  }
2908
2908
  __name(d, "byFo");
2909
- async function p(t, l, d, f, p, h, g, _) {
2910
- let v = await calculateMathMLDimensions(t, getConfig()), b = l.append("switch"), x = b.append("foreignObject").attr("x", d + p / 2 - v.width / 2).attr("y", f + h / 2 - v.height / 2).attr("width", v.width).attr("height", v.height).append("xhtml:div").style("height", "100%").style("width", "100%");
2911
- x.append("div").style("text-align", "center").style("vertical-align", "middle").html(await renderKatexSanitized(t, getConfig())), u(t, b, d, f, p, h, g, _), m(x, g);
2909
+ async function f(n, l, d, f, m, h, _, v) {
2910
+ let y = await calculateMathMLDimensions(n, getConfig()), b = l.append("switch"), x = b.append("foreignObject").attr("x", d + m / 2 - y.width / 2).attr("y", f + h / 2 - y.height / 2).attr("width", y.width).attr("height", y.height).append("xhtml:div").style("height", "100%").style("width", "100%");
2911
+ x.append("div").style("text-align", "center").style("vertical-align", "middle").html(await renderKatexSanitized(n, getConfig())), u(n, b, d, f, m, h, _, v), p(x, _);
2912
2912
  }
2913
- __name(p, "byKatex");
2914
- function m(t, l) {
2915
- for (let u in l) l.hasOwnProperty(u) && t.attr(u, l[u]);
2913
+ __name(f, "byKatex");
2914
+ function p(n, l) {
2915
+ for (let u in l) l.hasOwnProperty(u) && n.attr(u, l[u]);
2916
2916
  }
2917
- return __name(m, "_setTextAttrs"), function(l, f = !1) {
2918
- return f ? p : l.textPlacement === "fo" ? d : l.textPlacement === "old" ? t : u;
2917
+ return __name(p, "_setTextAttrs"), function(l, p = !1) {
2918
+ return p ? f : l.textPlacement === "fo" ? d : l.textPlacement === "old" ? n : u;
2919
2919
  };
2920
2920
  })(), _drawMenuItemTextCandidateFunc = /* @__PURE__ */ (function() {
2921
- function t(t, l, u, f, p, m, h) {
2922
- d(l.append("text").attr("x", u).attr("y", f).style("text-anchor", "start").text(t), h);
2923
- }
2924
- __name(t, "byText");
2925
- function l(t, l, u, f, p, m, h, g) {
2926
- let { actorFontSize: _, actorFontFamily: v, actorFontWeight: y } = g, b = t.split(common_default.lineBreakRegex);
2927
- for (let t = 0; t < b.length; t++) {
2928
- let p = t * _ - _ * (b.length - 1) / 2, g = l.append("text").attr("x", u).attr("y", f).style("text-anchor", "start").style("font-size", _).style("font-weight", y).style("font-family", v);
2929
- g.append("tspan").attr("x", u).attr("dy", p).text(b[t]), g.attr("y", f + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), d(g, h);
2921
+ function n(n, l, u, d, p, m, h) {
2922
+ f(l.append("text").attr("x", u).attr("y", d).style("text-anchor", "start").text(n), h);
2923
+ }
2924
+ __name(n, "byText");
2925
+ function u(n, l, u, d, p, m, h, g) {
2926
+ let { actorFontSize: _, actorFontFamily: v, actorFontWeight: y } = g, b = n.split(common_default.lineBreakRegex);
2927
+ for (let n = 0; n < b.length; n++) {
2928
+ let p = n * _ - _ * (b.length - 1) / 2, g = l.append("text").attr("x", u).attr("y", d).style("text-anchor", "start").style("font-size", _).style("font-weight", y).style("font-family", v);
2929
+ g.append("tspan").attr("x", u).attr("dy", p).text(b[n]), g.attr("y", d + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), f(g, h);
2930
2930
  }
2931
2931
  }
2932
- __name(l, "byTspan");
2933
- function u(t, u, f, p, m, h, g, _) {
2934
- let v = u.append("switch"), y = v.append("foreignObject").attr("x", f).attr("y", p).attr("width", m).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
2935
- y.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(t), l(t, v, f, p, m, h, g, _), d(y, g);
2932
+ __name(u, "byTspan");
2933
+ function d(n, l, d, p, m, h, g, _) {
2934
+ let v = l.append("switch"), y = v.append("foreignObject").attr("x", d).attr("y", p).attr("width", m).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
2935
+ y.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), u(n, v, d, p, m, h, g, _), f(y, g);
2936
2936
  }
2937
- __name(u, "byFo");
2938
- function d(t, l) {
2939
- for (let u in l) l.hasOwnProperty(u) && t.attr(u, l[u]);
2937
+ __name(d, "byFo");
2938
+ function f(n, l) {
2939
+ for (let u in l) l.hasOwnProperty(u) && n.attr(u, l[u]);
2940
2940
  }
2941
- return __name(d, "_setTextAttrs"), function(d) {
2942
- return d.textPlacement === "fo" ? u : d.textPlacement === "old" ? t : l;
2941
+ return __name(f, "_setTextAttrs"), function(l) {
2942
+ return l.textPlacement === "fo" ? d : l.textPlacement === "old" ? n : u;
2943
2943
  };
2944
2944
  })(), svgDraw_default = {
2945
2945
  drawRect: drawRect2,
@@ -2975,25 +2975,25 @@ var sequenceDiagram_default = parser, LINETYPE = {
2975
2975
  activations: [],
2976
2976
  models: {
2977
2977
  getHeight: /* @__PURE__ */ __name(function() {
2978
- return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)) + (this.loops.length === 0 ? 0 : this.loops.map((t) => t.height || 0).reduce((t, l) => t + l)) + (this.messages.length === 0 ? 0 : this.messages.map((t) => t.height || 0).reduce((t, l) => t + l)) + (this.notes.length === 0 ? 0 : this.notes.map((t) => t.height || 0).reduce((t, l) => t + l));
2978
+ return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map((n) => n.height || 0)) + (this.loops.length === 0 ? 0 : this.loops.map((n) => n.height || 0).reduce((n, l) => n + l)) + (this.messages.length === 0 ? 0 : this.messages.map((n) => n.height || 0).reduce((n, l) => n + l)) + (this.notes.length === 0 ? 0 : this.notes.map((n) => n.height || 0).reduce((n, l) => n + l));
2979
2979
  }, "getHeight"),
2980
2980
  clear: /* @__PURE__ */ __name(function() {
2981
2981
  this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
2982
2982
  }, "clear"),
2983
- addBox: /* @__PURE__ */ __name(function(t) {
2984
- this.boxes.push(t);
2983
+ addBox: /* @__PURE__ */ __name(function(n) {
2984
+ this.boxes.push(n);
2985
2985
  }, "addBox"),
2986
- addActor: /* @__PURE__ */ __name(function(t) {
2987
- this.actors.push(t);
2986
+ addActor: /* @__PURE__ */ __name(function(n) {
2987
+ this.actors.push(n);
2988
2988
  }, "addActor"),
2989
- addLoop: /* @__PURE__ */ __name(function(t) {
2990
- this.loops.push(t);
2989
+ addLoop: /* @__PURE__ */ __name(function(n) {
2990
+ this.loops.push(n);
2991
2991
  }, "addLoop"),
2992
- addMessage: /* @__PURE__ */ __name(function(t) {
2993
- this.messages.push(t);
2992
+ addMessage: /* @__PURE__ */ __name(function(n) {
2993
+ this.messages.push(n);
2994
2994
  }, "addMessage"),
2995
- addNote: /* @__PURE__ */ __name(function(t) {
2996
- this.notes.push(t);
2995
+ addNote: /* @__PURE__ */ __name(function(n) {
2996
+ this.notes.push(n);
2997
2997
  }, "addNote"),
2998
2998
  lastActor: /* @__PURE__ */ __name(function() {
2999
2999
  return this.actors[this.actors.length - 1];
@@ -3021,42 +3021,42 @@ var sequenceDiagram_default = parser, LINETYPE = {
3021
3021
  stopy: void 0
3022
3022
  }, this.verticalPos = 0, setConf(getConfig2());
3023
3023
  }, "init"),
3024
- updateVal: /* @__PURE__ */ __name(function(t, l, u, d) {
3025
- t[l] === void 0 ? t[l] = u : t[l] = d(u, t[l]);
3024
+ updateVal: /* @__PURE__ */ __name(function(n, l, u, d) {
3025
+ n[l] === void 0 ? n[l] = u : n[l] = d(u, n[l]);
3026
3026
  }, "updateVal"),
3027
- updateBounds: /* @__PURE__ */ __name(function(t, l, u, d) {
3027
+ updateBounds: /* @__PURE__ */ __name(function(n, u, d, f) {
3028
3028
  let p = this, m = 0;
3029
3029
  function h(h) {
3030
- return /* @__PURE__ */ __name(function(f) {
3030
+ return /* @__PURE__ */ __name(function(l) {
3031
3031
  m++;
3032
3032
  let g = p.sequenceItems.length - m + 1;
3033
- p.updateVal(f, "starty", l - g * conf.boxMargin, Math.min), p.updateVal(f, "stopy", d + g * conf.boxMargin, Math.max), p.updateVal(bounds.data, "startx", t - g * conf.boxMargin, Math.min), p.updateVal(bounds.data, "stopx", u + g * conf.boxMargin, Math.max), h !== "activation" && (p.updateVal(f, "startx", t - g * conf.boxMargin, Math.min), p.updateVal(f, "stopx", u + g * conf.boxMargin, Math.max), p.updateVal(bounds.data, "starty", l - g * conf.boxMargin, Math.min), p.updateVal(bounds.data, "stopy", d + g * conf.boxMargin, Math.max));
3033
+ p.updateVal(l, "starty", u - g * conf.boxMargin, Math.min), p.updateVal(l, "stopy", f + g * conf.boxMargin, Math.max), p.updateVal(bounds.data, "startx", n - g * conf.boxMargin, Math.min), p.updateVal(bounds.data, "stopx", d + g * conf.boxMargin, Math.max), h !== "activation" && (p.updateVal(l, "startx", n - g * conf.boxMargin, Math.min), p.updateVal(l, "stopx", d + g * conf.boxMargin, Math.max), p.updateVal(bounds.data, "starty", u - g * conf.boxMargin, Math.min), p.updateVal(bounds.data, "stopy", f + g * conf.boxMargin, Math.max));
3034
3034
  }, "updateItemBounds");
3035
3035
  }
3036
3036
  __name(h, "updateFn"), this.sequenceItems.forEach(h()), this.activations.forEach(h("activation"));
3037
3037
  }, "updateBounds"),
3038
- insert: /* @__PURE__ */ __name(function(t, l, u, d) {
3039
- let f = common_default.getMin(t, u), p = common_default.getMax(t, u), m = common_default.getMin(l, d), h = common_default.getMax(l, d);
3038
+ insert: /* @__PURE__ */ __name(function(n, l, u, d) {
3039
+ let f = common_default.getMin(n, u), p = common_default.getMax(n, u), m = common_default.getMin(l, d), h = common_default.getMax(l, d);
3040
3040
  this.updateVal(bounds.data, "startx", f, Math.min), this.updateVal(bounds.data, "starty", m, Math.min), this.updateVal(bounds.data, "stopx", p, Math.max), this.updateVal(bounds.data, "stopy", h, Math.max), this.updateBounds(f, m, p, h);
3041
3041
  }, "insert"),
3042
- newActivation: /* @__PURE__ */ __name(function(t, l, u) {
3043
- let d = u.get(t.from), f = actorActivations(t.from).length || 0, p = d.x + d.width / 2 + (f - 1) * conf.activationWidth / 2;
3042
+ newActivation: /* @__PURE__ */ __name(function(n, l, u) {
3043
+ let d = u.get(n.from), f = actorActivations(n.from).length || 0, p = d.x + d.width / 2 + (f - 1) * conf.activationWidth / 2;
3044
3044
  this.activations.push({
3045
3045
  startx: p,
3046
3046
  starty: this.verticalPos + 2,
3047
3047
  stopx: p + conf.activationWidth,
3048
3048
  stopy: void 0,
3049
- actor: t.from,
3049
+ actor: n.from,
3050
3050
  anchored: svgDraw_default.anchorElement(l)
3051
3051
  });
3052
3052
  }, "newActivation"),
3053
- endActivation: /* @__PURE__ */ __name(function(t) {
3054
- let l = this.activations.map(function(t) {
3055
- return t.actor;
3056
- }).lastIndexOf(t.from);
3053
+ endActivation: /* @__PURE__ */ __name(function(n) {
3054
+ let l = this.activations.map(function(n) {
3055
+ return n.actor;
3056
+ }).lastIndexOf(n.from);
3057
3057
  return this.activations.splice(l, 1)[0];
3058
3058
  }, "endActivation"),
3059
- createLoop: /* @__PURE__ */ __name(function(t = {
3059
+ createLoop: /* @__PURE__ */ __name(function(n = {
3060
3060
  message: void 0,
3061
3061
  wrap: !1,
3062
3062
  width: void 0
@@ -3066,19 +3066,19 @@ var sequenceDiagram_default = parser, LINETYPE = {
3066
3066
  starty: this.verticalPos,
3067
3067
  stopx: void 0,
3068
3068
  stopy: void 0,
3069
- title: t.message,
3070
- wrap: t.wrap,
3071
- width: t.width,
3069
+ title: n.message,
3070
+ wrap: n.wrap,
3071
+ width: n.width,
3072
3072
  height: 0,
3073
3073
  fill: l
3074
3074
  };
3075
3075
  }, "createLoop"),
3076
- newLoop: /* @__PURE__ */ __name(function(t = {
3076
+ newLoop: /* @__PURE__ */ __name(function(n = {
3077
3077
  message: void 0,
3078
3078
  wrap: !1,
3079
3079
  width: void 0
3080
3080
  }, l) {
3081
- this.sequenceItems.push(this.createLoop(t, l));
3081
+ this.sequenceItems.push(this.createLoop(n, l));
3082
3082
  }, "newLoop"),
3083
3083
  endLoop: /* @__PURE__ */ __name(function() {
3084
3084
  return this.sequenceItems.pop();
@@ -3086,12 +3086,12 @@ var sequenceDiagram_default = parser, LINETYPE = {
3086
3086
  isLoopOverlap: /* @__PURE__ */ __name(function() {
3087
3087
  return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
3088
3088
  }, "isLoopOverlap"),
3089
- addSectionToLoop: /* @__PURE__ */ __name(function(t) {
3089
+ addSectionToLoop: /* @__PURE__ */ __name(function(n) {
3090
3090
  let l = this.sequenceItems.pop();
3091
3091
  l.sections = l.sections || [], l.sectionTitles = l.sectionTitles || [], l.sections.push({
3092
3092
  y: bounds.getVerticalPos(),
3093
3093
  height: 0
3094
- }), l.sectionTitles.push(t), this.sequenceItems.push(l);
3094
+ }), l.sectionTitles.push(n), this.sequenceItems.push(l);
3095
3095
  }, "addSectionToLoop"),
3096
3096
  saveVerticalPos: /* @__PURE__ */ __name(function() {
3097
3097
  this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
@@ -3099,8 +3099,8 @@ var sequenceDiagram_default = parser, LINETYPE = {
3099
3099
  resetVerticalPos: /* @__PURE__ */ __name(function() {
3100
3100
  this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
3101
3101
  }, "resetVerticalPos"),
3102
- bumpVerticalPos: /* @__PURE__ */ __name(function(t) {
3103
- this.verticalPos += t, this.data.stopy = common_default.getMax(this.data.stopy, this.verticalPos);
3102
+ bumpVerticalPos: /* @__PURE__ */ __name(function(n) {
3103
+ this.verticalPos += n, this.data.stopy = common_default.getMax(this.data.stopy, this.verticalPos);
3104
3104
  }, "bumpVerticalPos"),
3105
3105
  getVerticalPos: /* @__PURE__ */ __name(function() {
3106
3106
  return this.verticalPos;
@@ -3111,119 +3111,119 @@ var sequenceDiagram_default = parser, LINETYPE = {
3111
3111
  models: this.models
3112
3112
  };
3113
3113
  }, "getBounds")
3114
- }, drawNote = /* @__PURE__ */ __name(async function(t, l) {
3114
+ }, drawNote = /* @__PURE__ */ __name(async function(n, l) {
3115
3115
  bounds.bumpVerticalPos(conf.boxMargin), l.height = conf.boxMargin, l.starty = bounds.getVerticalPos();
3116
3116
  let u = getNoteRect();
3117
3117
  u.x = l.startx, u.y = l.starty, u.width = l.width || conf.width, u.class = "note";
3118
- let d = t.append("g"), f = svgDraw_default.drawRect(d, u), p = getTextObj();
3118
+ let d = n.append("g"), f = svgDraw_default.drawRect(d, u), p = getTextObj();
3119
3119
  p.x = l.startx, p.y = l.starty, p.width = u.width, p.dy = "1em", p.text = l.message, p.class = "noteText", p.fontFamily = conf.noteFontFamily, p.fontSize = conf.noteFontSize, p.fontWeight = conf.noteFontWeight, p.anchor = conf.noteAlign, p.textMargin = conf.noteMargin, p.valign = "center";
3120
- let m = hasKatex(p.text) ? await drawKatex(d, p) : drawText(d, p), h = Math.round(m.map((t) => (t._groups || t)[0][0].getBBox().height).reduce((t, l) => t + l));
3120
+ let m = hasKatex(p.text) ? await drawKatex(d, p) : drawText(d, p), h = Math.round(m.map((n) => (n._groups || n)[0][0].getBBox().height).reduce((n, l) => n + l));
3121
3121
  f.attr("height", h + 2 * conf.noteMargin), l.height += h + 2 * conf.noteMargin, bounds.bumpVerticalPos(h + 2 * conf.noteMargin), l.stopy = l.starty + h + 2 * conf.noteMargin, l.stopx = l.startx + u.width, bounds.insert(l.startx, l.starty, l.stopx, l.stopy), bounds.models.addNote(l);
3122
- }, "drawNote"), messageFont = /* @__PURE__ */ __name((t) => ({
3123
- fontFamily: t.messageFontFamily,
3124
- fontSize: t.messageFontSize,
3125
- fontWeight: t.messageFontWeight
3126
- }), "messageFont"), noteFont = /* @__PURE__ */ __name((t) => ({
3127
- fontFamily: t.noteFontFamily,
3128
- fontSize: t.noteFontSize,
3129
- fontWeight: t.noteFontWeight
3130
- }), "noteFont"), actorFont = /* @__PURE__ */ __name((t) => ({
3131
- fontFamily: t.actorFontFamily,
3132
- fontSize: t.actorFontSize,
3133
- fontWeight: t.actorFontWeight
3122
+ }, "drawNote"), messageFont = /* @__PURE__ */ __name((n) => ({
3123
+ fontFamily: n.messageFontFamily,
3124
+ fontSize: n.messageFontSize,
3125
+ fontWeight: n.messageFontWeight
3126
+ }), "messageFont"), noteFont = /* @__PURE__ */ __name((n) => ({
3127
+ fontFamily: n.noteFontFamily,
3128
+ fontSize: n.noteFontSize,
3129
+ fontWeight: n.noteFontWeight
3130
+ }), "noteFont"), actorFont = /* @__PURE__ */ __name((n) => ({
3131
+ fontFamily: n.actorFontFamily,
3132
+ fontSize: n.actorFontSize,
3133
+ fontWeight: n.actorFontWeight
3134
3134
  }), "actorFont");
3135
- async function boundMessage(l, u) {
3135
+ async function boundMessage(n, l) {
3136
3136
  bounds.bumpVerticalPos(10);
3137
- let { startx: d, stopx: f, message: p } = u, m = common_default.splitBreaks(p).length, h = hasKatex(p), g = h ? await calculateMathMLDimensions(p, getConfig2()) : utils_default.calculateTextDimensions(p, messageFont(conf));
3138
- if (!h) {
3139
- let t = g.height / m;
3140
- u.height += t, bounds.bumpVerticalPos(t);
3141
- }
3142
- let _, v = g.height - 10, y = g.width;
3143
- if (d === f) {
3144
- _ = bounds.getVerticalPos() + v, conf.rightAngles || (v += conf.boxMargin, _ = bounds.getVerticalPos() + v), v += 30;
3145
- let t = common_default.getMax(y / 2, conf.width / 2);
3146
- bounds.insert(d - t, bounds.getVerticalPos() - 10 + v, f + t, bounds.getVerticalPos() + 30 + v);
3147
- } else v += conf.boxMargin, _ = bounds.getVerticalPos() + v, bounds.insert(d, _ - 10, f, _);
3148
- return bounds.bumpVerticalPos(v), u.height += v, u.stopy = u.starty + u.height, bounds.insert(u.fromBounds, u.starty, u.toBounds, u.stopy), _;
3137
+ let { startx: u, stopx: d, message: f } = l, p = common_default.splitBreaks(f).length, m = hasKatex(f), h = m ? await calculateMathMLDimensions(f, getConfig2()) : utils_default.calculateTextDimensions(f, messageFont(conf));
3138
+ if (!m) {
3139
+ let n = h.height / p;
3140
+ l.height += n, bounds.bumpVerticalPos(n);
3141
+ }
3142
+ let g, v = h.height - 10, y = h.width;
3143
+ if (u === d) {
3144
+ g = bounds.getVerticalPos() + v, conf.rightAngles || (v += conf.boxMargin, g = bounds.getVerticalPos() + v), v += 30;
3145
+ let n = common_default.getMax(y / 2, conf.width / 2);
3146
+ bounds.insert(u - n, bounds.getVerticalPos() - 10 + v, d + n, bounds.getVerticalPos() + 30 + v);
3147
+ } else v += conf.boxMargin, g = bounds.getVerticalPos() + v, bounds.insert(u, g - 10, d, g);
3148
+ return bounds.bumpVerticalPos(v), l.height += v, l.stopy = l.starty + l.height, bounds.insert(l.fromBounds, l.starty, l.toBounds, l.stopy), g;
3149
3149
  }
3150
3150
  __name(boundMessage, "boundMessage");
3151
- var drawMessage = /* @__PURE__ */ __name(async function(l, u, d, f) {
3152
- let { startx: p, stopx: m, starty: h, message: _, type: v, sequenceIndex: y, sequenceVisible: x } = u, S = utils_default.calculateTextDimensions(_, messageFont(conf)), C = getTextObj();
3153
- C.x = p, C.y = h + 10, C.width = m - p, C.class = "messageText", C.dy = "1em", C.text = _, C.fontFamily = conf.messageFontFamily, C.fontSize = conf.messageFontSize, C.fontWeight = conf.messageFontWeight, C.anchor = conf.messageAlign, C.valign = "center", C.textMargin = conf.wrapPadding, C.tspan = !1, hasKatex(C.text) ? await drawKatex(l, C, {
3154
- startx: p,
3151
+ var drawMessage = /* @__PURE__ */ __name(async function(n, l, u, d) {
3152
+ let { startx: f, stopx: m, starty: h, message: g, type: v, sequenceIndex: y, sequenceVisible: b } = l, x = utils_default.calculateTextDimensions(g, messageFont(conf)), S = getTextObj();
3153
+ S.x = f, S.y = h + 10, S.width = m - f, S.class = "messageText", S.dy = "1em", S.text = g, S.fontFamily = conf.messageFontFamily, S.fontSize = conf.messageFontSize, S.fontWeight = conf.messageFontWeight, S.anchor = conf.messageAlign, S.valign = "center", S.textMargin = conf.wrapPadding, S.tspan = !1, hasKatex(S.text) ? await drawKatex(n, S, {
3154
+ startx: f,
3155
3155
  stopx: m,
3156
- starty: d
3157
- }) : drawText(l, C);
3158
- let w = S.width, T;
3159
- p === m ? T = conf.rightAngles ? l.append("path").attr("d", `M ${p},${d} H ${p + common_default.getMax(conf.width / 2, w / 2)} V ${d + 25} H ${p}`) : l.append("path").attr("d", "M " + p + "," + d + " C " + (p + 60) + "," + (d - 10) + " " + (p + 60) + "," + (d + 30) + " " + p + "," + (d + 20)) : (T = l.append("line"), T.attr("x1", p), T.attr("y1", d), T.attr("x2", m), T.attr("y2", d)), v === f.db.LINETYPE.DOTTED || v === f.db.LINETYPE.DOTTED_CROSS || v === f.db.LINETYPE.DOTTED_POINT || v === f.db.LINETYPE.DOTTED_OPEN || v === f.db.LINETYPE.BIDIRECTIONAL_DOTTED ? (T.style("stroke-dasharray", "3, 3"), T.attr("class", "messageLine1")) : T.attr("class", "messageLine0");
3156
+ starty: u
3157
+ }) : drawText(n, S);
3158
+ let C = x.width, w;
3159
+ f === m ? w = conf.rightAngles ? n.append("path").attr("d", `M ${f},${u} H ${f + common_default.getMax(conf.width / 2, C / 2)} V ${u + 25} H ${f}`) : n.append("path").attr("d", "M " + f + "," + u + " C " + (f + 60) + "," + (u - 10) + " " + (f + 60) + "," + (u + 30) + " " + f + "," + (u + 20)) : (w = n.append("line"), w.attr("x1", f), w.attr("y1", u), w.attr("x2", m), w.attr("y2", u)), v === d.db.LINETYPE.DOTTED || v === d.db.LINETYPE.DOTTED_CROSS || v === d.db.LINETYPE.DOTTED_POINT || v === d.db.LINETYPE.DOTTED_OPEN || v === d.db.LINETYPE.BIDIRECTIONAL_DOTTED ? (w.style("stroke-dasharray", "3, 3"), w.attr("class", "messageLine1")) : w.attr("class", "messageLine0");
3160
3160
  let E = "";
3161
- conf.arrowMarkerAbsolute && (E = getUrl(!0)), T.attr("stroke-width", 2), T.attr("stroke", "none"), T.style("fill", "none"), (v === f.db.LINETYPE.SOLID || v === f.db.LINETYPE.DOTTED) && T.attr("marker-end", "url(" + E + "#arrowhead)"), (v === f.db.LINETYPE.BIDIRECTIONAL_SOLID || v === f.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (T.attr("marker-start", "url(" + E + "#arrowhead)"), T.attr("marker-end", "url(" + E + "#arrowhead)")), (v === f.db.LINETYPE.SOLID_POINT || v === f.db.LINETYPE.DOTTED_POINT) && T.attr("marker-end", "url(" + E + "#filled-head)"), (v === f.db.LINETYPE.SOLID_CROSS || v === f.db.LINETYPE.DOTTED_CROSS) && T.attr("marker-end", "url(" + E + "#crosshead)"), (x || conf.showSequenceNumbers) && ((v === f.db.LINETYPE.BIDIRECTIONAL_SOLID || v === f.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (p < m ? T.attr("x1", p + 12) : T.attr("x1", p + 6)), l.append("line").attr("x1", p).attr("y1", d).attr("x2", p).attr("y2", d).attr("stroke-width", 0).attr("marker-start", "url(" + E + "#sequencenumber)"), l.append("text").attr("x", p).attr("y", d + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(y));
3162
- }, "drawMessage"), addActorRenderingData = /* @__PURE__ */ __name(function(t, l, u, d, f, p, m) {
3161
+ conf.arrowMarkerAbsolute && (E = getUrl(!0)), w.attr("stroke-width", 2), w.attr("stroke", "none"), w.style("fill", "none"), (v === d.db.LINETYPE.SOLID || v === d.db.LINETYPE.DOTTED) && w.attr("marker-end", "url(" + E + "#arrowhead)"), (v === d.db.LINETYPE.BIDIRECTIONAL_SOLID || v === d.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (w.attr("marker-start", "url(" + E + "#arrowhead)"), w.attr("marker-end", "url(" + E + "#arrowhead)")), (v === d.db.LINETYPE.SOLID_POINT || v === d.db.LINETYPE.DOTTED_POINT) && w.attr("marker-end", "url(" + E + "#filled-head)"), (v === d.db.LINETYPE.SOLID_CROSS || v === d.db.LINETYPE.DOTTED_CROSS) && w.attr("marker-end", "url(" + E + "#crosshead)"), (b || conf.showSequenceNumbers) && ((v === d.db.LINETYPE.BIDIRECTIONAL_SOLID || v === d.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (f < m ? w.attr("x1", f + 12) : w.attr("x1", f + 6)), n.append("line").attr("x1", f).attr("y1", u).attr("x2", f).attr("y2", u).attr("stroke-width", 0).attr("marker-start", "url(" + E + "#sequencenumber)"), n.append("text").attr("x", f).attr("y", u + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(y));
3162
+ }, "drawMessage"), addActorRenderingData = /* @__PURE__ */ __name(function(n, l, u, d, f, p, m) {
3163
3163
  let h = 0, g = 0, _, v = 0;
3164
- for (let t of d) {
3165
- let d = l.get(t), p = d.box;
3164
+ for (let n of d) {
3165
+ let d = l.get(n), p = d.box;
3166
3166
  _ && _ != p && (m || bounds.models.addBox(_), g += conf.boxMargin + _.margin), p && p != _ && (m || (p.x = h + g, p.y = f), g += p.margin), d.width = d.width || conf.width, d.height = common_default.getMax(d.height || conf.height, conf.height), d.margin = d.margin || conf.actorMargin, v = common_default.getMax(v, d.height), u.get(d.name) && (g += d.width / 2), d.x = h + g, d.starty = bounds.getVerticalPos(), bounds.insert(d.x, f, d.x + d.width, d.height), h += d.width + g, d.box && (d.box.width = h + p.margin - d.box.x), g = d.margin, _ = d.box, bounds.models.addActor(d);
3167
3167
  }
3168
3168
  _ && !m && bounds.models.addBox(_), bounds.bumpVerticalPos(v);
3169
- }, "addActorRenderingData"), drawActors = /* @__PURE__ */ __name(async function(t, l, u, d) {
3169
+ }, "addActorRenderingData"), drawActors = /* @__PURE__ */ __name(async function(n, l, u, d) {
3170
3170
  if (d) {
3171
3171
  let d = 0;
3172
3172
  bounds.bumpVerticalPos(conf.boxMargin * 2);
3173
3173
  for (let f of u) {
3174
3174
  let u = l.get(f);
3175
3175
  u.stopy ||= bounds.getVerticalPos();
3176
- let p = await svgDraw_default.drawActor(t, u, conf, !0);
3176
+ let p = await svgDraw_default.drawActor(n, u, conf, !0);
3177
3177
  d = common_default.getMax(d, p);
3178
3178
  }
3179
3179
  bounds.bumpVerticalPos(d + conf.boxMargin);
3180
3180
  } else for (let d of u) {
3181
3181
  let u = l.get(d);
3182
- await svgDraw_default.drawActor(t, u, conf, !1);
3182
+ await svgDraw_default.drawActor(n, u, conf, !1);
3183
3183
  }
3184
- }, "drawActors"), drawActorsPopup = /* @__PURE__ */ __name(function(t, l, u, d) {
3184
+ }, "drawActors"), drawActorsPopup = /* @__PURE__ */ __name(function(n, l, u, d) {
3185
3185
  let f = 0, p = 0;
3186
3186
  for (let m of u) {
3187
- let u = l.get(m), h = getRequiredPopupWidth(u), g = svgDraw_default.drawPopup(t, u, h, conf, conf.forceMenus, d);
3187
+ let u = l.get(m), h = getRequiredPopupWidth(u), g = svgDraw_default.drawPopup(n, u, h, conf, conf.forceMenus, d);
3188
3188
  g.height > f && (f = g.height), g.width + u.x > p && (p = g.width + u.x);
3189
3189
  }
3190
3190
  return {
3191
3191
  maxHeight: f,
3192
3192
  maxWidth: p
3193
3193
  };
3194
- }, "drawActorsPopup"), setConf = /* @__PURE__ */ __name(function(t) {
3195
- assignWithDepth_default(conf, t), t.fontFamily && (conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = t.fontFamily), t.fontSize && (conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = t.fontSize), t.fontWeight && (conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = t.fontWeight);
3196
- }, "setConf"), actorActivations = /* @__PURE__ */ __name(function(t) {
3194
+ }, "drawActorsPopup"), setConf = /* @__PURE__ */ __name(function(n) {
3195
+ assignWithDepth_default(conf, n), n.fontFamily && (conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = n.fontFamily), n.fontSize && (conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = n.fontSize), n.fontWeight && (conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = n.fontWeight);
3196
+ }, "setConf"), actorActivations = /* @__PURE__ */ __name(function(n) {
3197
3197
  return bounds.activations.filter(function(l) {
3198
- return l.actor === t;
3198
+ return l.actor === n;
3199
3199
  });
3200
- }, "actorActivations"), activationBounds = /* @__PURE__ */ __name(function(t, l) {
3201
- let u = l.get(t), d = actorActivations(t);
3202
- return [d.reduce(function(t, l) {
3203
- return common_default.getMin(t, l.startx);
3204
- }, u.x + u.width / 2 - 1), d.reduce(function(t, l) {
3205
- return common_default.getMax(t, l.stopx);
3200
+ }, "actorActivations"), activationBounds = /* @__PURE__ */ __name(function(n, l) {
3201
+ let u = l.get(n), d = actorActivations(n);
3202
+ return [d.reduce(function(n, l) {
3203
+ return common_default.getMin(n, l.startx);
3204
+ }, u.x + u.width / 2 - 1), d.reduce(function(n, l) {
3205
+ return common_default.getMax(n, l.stopx);
3206
3206
  }, u.x + u.width / 2 + 1)];
3207
3207
  }, "activationBounds");
3208
- function adjustLoopHeightForWrap(l, u, f, p, m) {
3209
- bounds.bumpVerticalPos(f);
3210
- let h = p;
3208
+ function adjustLoopHeightForWrap(l, u, d, f, p) {
3209
+ bounds.bumpVerticalPos(d);
3210
+ let m = f;
3211
3211
  if (u.id && u.message && l[u.id]) {
3212
- let f = l[u.id].width, m = messageFont(conf);
3213
- u.message = utils_default.wrapLabel(`[${u.message}]`, f - 2 * conf.wrapPadding, m), u.width = f, u.wrap = !0;
3214
- let g = utils_default.calculateTextDimensions(u.message, m), _ = common_default.getMax(g.height, conf.labelBoxHeight);
3215
- h = p + _, log.debug(`${_} - ${u.message}`);
3212
+ let d = l[u.id].width, p = messageFont(conf);
3213
+ u.message = utils_default.wrapLabel(`[${u.message}]`, d - 2 * conf.wrapPadding, p), u.width = d, u.wrap = !0;
3214
+ let h = utils_default.calculateTextDimensions(u.message, p), g = common_default.getMax(h.height, conf.labelBoxHeight);
3215
+ m = f + g, log.debug(`${g} - ${u.message}`);
3216
3216
  }
3217
- m(u), bounds.bumpVerticalPos(h);
3217
+ p(u), bounds.bumpVerticalPos(m);
3218
3218
  }
3219
3219
  __name(adjustLoopHeightForWrap, "adjustLoopHeightForWrap");
3220
- function adjustCreatedDestroyedData(t, l, u, d, p, m, h) {
3221
- function g(u, d) {
3222
- u.x < p.get(t.from).x ? (bounds.insert(l.stopx - d, l.starty, l.startx, l.stopy + u.height / 2 + conf.noteMargin), l.stopx += d) : (bounds.insert(l.startx, l.starty, l.stopx + d, l.stopy + u.height / 2 + conf.noteMargin), l.stopx -= d);
3220
+ function adjustCreatedDestroyedData(n, u, d, f, p, m, h) {
3221
+ function g(l, d) {
3222
+ l.x < p.get(n.from).x ? (bounds.insert(u.stopx - d, u.starty, u.startx, u.stopy + l.height / 2 + conf.noteMargin), u.stopx += d) : (bounds.insert(u.startx, u.starty, u.stopx + d, u.stopy + l.height / 2 + conf.noteMargin), u.stopx -= d);
3223
3223
  }
3224
3224
  __name(g, "receiverAdjustment");
3225
- function _(u, d) {
3226
- u.x < p.get(t.to).x ? (bounds.insert(l.startx - d, l.starty, l.stopx, l.stopy + u.height / 2 + conf.noteMargin), l.startx += d) : (bounds.insert(l.stopx, l.starty, l.startx + d, l.stopy + u.height / 2 + conf.noteMargin), l.startx -= d);
3225
+ function _(l, d) {
3226
+ l.x < p.get(n.to).x ? (bounds.insert(u.startx - d, u.starty, u.stopx, u.stopy + l.height / 2 + conf.noteMargin), u.startx += d) : (bounds.insert(u.stopx, u.starty, u.startx + d, u.stopy + l.height / 2 + conf.noteMargin), u.startx -= d);
3227
3227
  }
3228
3228
  __name(_, "senderAdjustment");
3229
3229
  let v = [
@@ -3232,117 +3232,117 @@ function adjustCreatedDestroyedData(t, l, u, d, p, m, h) {
3232
3232
  PARTICIPANT_TYPE.ENTITY,
3233
3233
  PARTICIPANT_TYPE.DATABASE
3234
3234
  ];
3235
- if (m.get(t.to) == d) {
3236
- let l = p.get(t.to);
3237
- g(l, v.includes(l.type) ? ACTOR_TYPE_WIDTH / 2 + 3 : l.width / 2 + 3), l.starty = u - l.height / 2, bounds.bumpVerticalPos(l.height / 2);
3238
- } else if (h.get(t.from) == d) {
3239
- let l = p.get(t.from);
3240
- conf.mirrorActors && _(l, v.includes(l.type) ? ACTOR_TYPE_WIDTH / 2 : l.width / 2), l.stopy = u - l.height / 2, bounds.bumpVerticalPos(l.height / 2);
3241
- } else if (h.get(t.to) == d) {
3242
- let l = p.get(t.to);
3243
- conf.mirrorActors && g(l, v.includes(l.type) ? ACTOR_TYPE_WIDTH / 2 + 3 : l.width / 2 + 3), l.stopy = u - l.height / 2, bounds.bumpVerticalPos(l.height / 2);
3235
+ if (m.get(n.to) == f) {
3236
+ let l = p.get(n.to);
3237
+ g(l, v.includes(l.type) ? ACTOR_TYPE_WIDTH / 2 + 3 : l.width / 2 + 3), l.starty = d - l.height / 2, bounds.bumpVerticalPos(l.height / 2);
3238
+ } else if (h.get(n.from) == f) {
3239
+ let l = p.get(n.from);
3240
+ conf.mirrorActors && _(l, v.includes(l.type) ? ACTOR_TYPE_WIDTH / 2 : l.width / 2), l.stopy = d - l.height / 2, bounds.bumpVerticalPos(l.height / 2);
3241
+ } else if (h.get(n.to) == f) {
3242
+ let l = p.get(n.to);
3243
+ conf.mirrorActors && g(l, v.includes(l.type) ? ACTOR_TYPE_WIDTH / 2 + 3 : l.width / 2 + 3), l.stopy = d - l.height / 2, bounds.bumpVerticalPos(l.height / 2);
3244
3244
  }
3245
3245
  }
3246
3246
  __name(adjustCreatedDestroyedData, "adjustCreatedDestroyedData");
3247
- var draw = /* @__PURE__ */ __name(async function(t, l, u, m) {
3247
+ var draw = /* @__PURE__ */ __name(async function(d, f, p, m) {
3248
3248
  let { securityLevel: h, sequence: g } = getConfig2();
3249
3249
  conf = g;
3250
3250
  let _;
3251
- h === "sandbox" && (_ = select_default("#i" + l));
3251
+ h === "sandbox" && (_ = select_default("#i" + f));
3252
3252
  let v = select_default(h === "sandbox" ? _.nodes()[0].contentDocument.body : "body"), y = h === "sandbox" ? _.nodes()[0].contentDocument : document;
3253
3253
  bounds.init(), log.debug(m.db);
3254
- let b = h === "sandbox" ? v.select(`[id="${l}"]`) : select_default(`[id="${l}"]`), x = m.db.getActors(), S = m.db.getCreatedActors(), C = m.db.getDestroyedActors(), E = m.db.getBoxes(), D = m.db.getActorKeys(), O = m.db.getMessages(), k = m.db.getDiagramTitle(), A = m.db.hasAtLeastOneBox(), j = m.db.hasAtLeastOneBoxWithTitle(), M = await getMaxMessageWidthPerActor(x, O, m);
3255
- if (conf.height = await calculateActorMargins(x, M, E), svgDraw_default.insertComputerIcon(b), svgDraw_default.insertDatabaseIcon(b), svgDraw_default.insertClockIcon(b), A && (bounds.bumpVerticalPos(conf.boxMargin), j && bounds.bumpVerticalPos(E[0].textMaxHeight)), conf.hideUnusedParticipants === !0) {
3256
- let t = /* @__PURE__ */ new Set();
3254
+ let b = h === "sandbox" ? v.select(`[id="${f}"]`) : select_default(`[id="${f}"]`), C = m.db.getActors(), w = m.db.getCreatedActors(), T = m.db.getDestroyedActors(), E = m.db.getBoxes(), D = m.db.getActorKeys(), O = m.db.getMessages(), k = m.db.getDiagramTitle(), A = m.db.hasAtLeastOneBox(), j = m.db.hasAtLeastOneBoxWithTitle(), M = await getMaxMessageWidthPerActor(C, O, m);
3255
+ if (conf.height = await calculateActorMargins(C, M, E), svgDraw_default.insertComputerIcon(b), svgDraw_default.insertDatabaseIcon(b), svgDraw_default.insertClockIcon(b), A && (bounds.bumpVerticalPos(conf.boxMargin), j && bounds.bumpVerticalPos(E[0].textMaxHeight)), conf.hideUnusedParticipants === !0) {
3256
+ let n = /* @__PURE__ */ new Set();
3257
3257
  O.forEach((l) => {
3258
- t.add(l.from), t.add(l.to);
3259
- }), D = D.filter((l) => t.has(l));
3258
+ n.add(l.from), n.add(l.to);
3259
+ }), D = D.filter((l) => n.has(l));
3260
3260
  }
3261
- addActorRenderingData(b, x, S, D, 0, O, !1);
3262
- let N = await calculateLoopBounds(O, x, M, m);
3261
+ addActorRenderingData(b, C, w, D, 0, O, !1);
3262
+ let N = await calculateLoopBounds(O, C, M, m);
3263
3263
  svgDraw_default.insertArrowHead(b), svgDraw_default.insertArrowCrossHead(b), svgDraw_default.insertArrowFilledHead(b), svgDraw_default.insertSequenceNumber(b);
3264
- function P(t, l) {
3265
- let u = bounds.endActivation(t);
3266
- u.starty + 18 > l && (u.starty = l - 6, l += 12), svgDraw_default.drawActivation(b, u, l, conf, actorActivations(t.from).length), bounds.insert(u.startx, l - 10, u.stopx, l);
3264
+ function P(n, l) {
3265
+ let u = bounds.endActivation(n);
3266
+ u.starty + 18 > l && (u.starty = l - 6, l += 12), svgDraw_default.drawActivation(b, u, l, conf, actorActivations(n.from).length), bounds.insert(u.startx, l - 10, u.stopx, l);
3267
3267
  }
3268
3268
  __name(P, "activeEnd");
3269
3269
  let F = 1, I = 1, L = [], R = [], z = 0;
3270
- for (let t of O) {
3271
- let l, u, f;
3272
- switch (t.type) {
3270
+ for (let l of O) {
3271
+ let u, d, f;
3272
+ switch (l.type) {
3273
3273
  case m.db.LINETYPE.NOTE:
3274
- bounds.resetVerticalPos(), u = t.noteModel, await drawNote(b, u);
3274
+ bounds.resetVerticalPos(), d = l.noteModel, await drawNote(b, d);
3275
3275
  break;
3276
3276
  case m.db.LINETYPE.ACTIVE_START:
3277
- bounds.newActivation(t, b, x);
3277
+ bounds.newActivation(l, b, C);
3278
3278
  break;
3279
3279
  case m.db.LINETYPE.ACTIVE_END:
3280
- P(t, bounds.getVerticalPos());
3280
+ P(l, bounds.getVerticalPos());
3281
3281
  break;
3282
3282
  case m.db.LINETYPE.LOOP_START:
3283
- adjustLoopHeightForWrap(N, t, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (t) => bounds.newLoop(t));
3283
+ adjustLoopHeightForWrap(N, l, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (n) => bounds.newLoop(n));
3284
3284
  break;
3285
3285
  case m.db.LINETYPE.LOOP_END:
3286
- l = bounds.endLoop(), await svgDraw_default.drawLoop(b, l, "loop", conf), bounds.bumpVerticalPos(l.stopy - bounds.getVerticalPos()), bounds.models.addLoop(l);
3286
+ u = bounds.endLoop(), await svgDraw_default.drawLoop(b, u, "loop", conf), bounds.bumpVerticalPos(u.stopy - bounds.getVerticalPos()), bounds.models.addLoop(u);
3287
3287
  break;
3288
3288
  case m.db.LINETYPE.RECT_START:
3289
- adjustLoopHeightForWrap(N, t, conf.boxMargin, conf.boxMargin, (t) => bounds.newLoop(void 0, t.message));
3289
+ adjustLoopHeightForWrap(N, l, conf.boxMargin, conf.boxMargin, (n) => bounds.newLoop(void 0, n.message));
3290
3290
  break;
3291
3291
  case m.db.LINETYPE.RECT_END:
3292
- l = bounds.endLoop(), R.push(l), bounds.models.addLoop(l), bounds.bumpVerticalPos(l.stopy - bounds.getVerticalPos());
3292
+ u = bounds.endLoop(), R.push(u), bounds.models.addLoop(u), bounds.bumpVerticalPos(u.stopy - bounds.getVerticalPos());
3293
3293
  break;
3294
3294
  case m.db.LINETYPE.OPT_START:
3295
- adjustLoopHeightForWrap(N, t, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (t) => bounds.newLoop(t));
3295
+ adjustLoopHeightForWrap(N, l, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (n) => bounds.newLoop(n));
3296
3296
  break;
3297
3297
  case m.db.LINETYPE.OPT_END:
3298
- l = bounds.endLoop(), await svgDraw_default.drawLoop(b, l, "opt", conf), bounds.bumpVerticalPos(l.stopy - bounds.getVerticalPos()), bounds.models.addLoop(l);
3298
+ u = bounds.endLoop(), await svgDraw_default.drawLoop(b, u, "opt", conf), bounds.bumpVerticalPos(u.stopy - bounds.getVerticalPos()), bounds.models.addLoop(u);
3299
3299
  break;
3300
3300
  case m.db.LINETYPE.ALT_START:
3301
- adjustLoopHeightForWrap(N, t, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (t) => bounds.newLoop(t));
3301
+ adjustLoopHeightForWrap(N, l, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (n) => bounds.newLoop(n));
3302
3302
  break;
3303
3303
  case m.db.LINETYPE.ALT_ELSE:
3304
- adjustLoopHeightForWrap(N, t, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, (t) => bounds.addSectionToLoop(t));
3304
+ adjustLoopHeightForWrap(N, l, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, (n) => bounds.addSectionToLoop(n));
3305
3305
  break;
3306
3306
  case m.db.LINETYPE.ALT_END:
3307
- l = bounds.endLoop(), await svgDraw_default.drawLoop(b, l, "alt", conf), bounds.bumpVerticalPos(l.stopy - bounds.getVerticalPos()), bounds.models.addLoop(l);
3307
+ u = bounds.endLoop(), await svgDraw_default.drawLoop(b, u, "alt", conf), bounds.bumpVerticalPos(u.stopy - bounds.getVerticalPos()), bounds.models.addLoop(u);
3308
3308
  break;
3309
3309
  case m.db.LINETYPE.PAR_START:
3310
3310
  case m.db.LINETYPE.PAR_OVER_START:
3311
- adjustLoopHeightForWrap(N, t, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (t) => bounds.newLoop(t)), bounds.saveVerticalPos();
3311
+ adjustLoopHeightForWrap(N, l, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (n) => bounds.newLoop(n)), bounds.saveVerticalPos();
3312
3312
  break;
3313
3313
  case m.db.LINETYPE.PAR_AND:
3314
- adjustLoopHeightForWrap(N, t, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, (t) => bounds.addSectionToLoop(t));
3314
+ adjustLoopHeightForWrap(N, l, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, (n) => bounds.addSectionToLoop(n));
3315
3315
  break;
3316
3316
  case m.db.LINETYPE.PAR_END:
3317
- l = bounds.endLoop(), await svgDraw_default.drawLoop(b, l, "par", conf), bounds.bumpVerticalPos(l.stopy - bounds.getVerticalPos()), bounds.models.addLoop(l);
3317
+ u = bounds.endLoop(), await svgDraw_default.drawLoop(b, u, "par", conf), bounds.bumpVerticalPos(u.stopy - bounds.getVerticalPos()), bounds.models.addLoop(u);
3318
3318
  break;
3319
3319
  case m.db.LINETYPE.AUTONUMBER:
3320
- F = t.message.start || F, I = t.message.step || I, t.message.visible ? m.db.enableSequenceNumbers() : m.db.disableSequenceNumbers();
3320
+ F = l.message.start || F, I = l.message.step || I, l.message.visible ? m.db.enableSequenceNumbers() : m.db.disableSequenceNumbers();
3321
3321
  break;
3322
3322
  case m.db.LINETYPE.CRITICAL_START:
3323
- adjustLoopHeightForWrap(N, t, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (t) => bounds.newLoop(t));
3323
+ adjustLoopHeightForWrap(N, l, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (n) => bounds.newLoop(n));
3324
3324
  break;
3325
3325
  case m.db.LINETYPE.CRITICAL_OPTION:
3326
- adjustLoopHeightForWrap(N, t, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, (t) => bounds.addSectionToLoop(t));
3326
+ adjustLoopHeightForWrap(N, l, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, (n) => bounds.addSectionToLoop(n));
3327
3327
  break;
3328
3328
  case m.db.LINETYPE.CRITICAL_END:
3329
- l = bounds.endLoop(), await svgDraw_default.drawLoop(b, l, "critical", conf), bounds.bumpVerticalPos(l.stopy - bounds.getVerticalPos()), bounds.models.addLoop(l);
3329
+ u = bounds.endLoop(), await svgDraw_default.drawLoop(b, u, "critical", conf), bounds.bumpVerticalPos(u.stopy - bounds.getVerticalPos()), bounds.models.addLoop(u);
3330
3330
  break;
3331
3331
  case m.db.LINETYPE.BREAK_START:
3332
- adjustLoopHeightForWrap(N, t, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (t) => bounds.newLoop(t));
3332
+ adjustLoopHeightForWrap(N, l, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, (n) => bounds.newLoop(n));
3333
3333
  break;
3334
3334
  case m.db.LINETYPE.BREAK_END:
3335
- l = bounds.endLoop(), await svgDraw_default.drawLoop(b, l, "break", conf), bounds.bumpVerticalPos(l.stopy - bounds.getVerticalPos()), bounds.models.addLoop(l);
3335
+ u = bounds.endLoop(), await svgDraw_default.drawLoop(b, u, "break", conf), bounds.bumpVerticalPos(u.stopy - bounds.getVerticalPos()), bounds.models.addLoop(u);
3336
3336
  break;
3337
3337
  default: try {
3338
- f = t.msgModel, f.starty = bounds.getVerticalPos(), f.sequenceIndex = F, f.sequenceVisible = m.db.showSequenceNumbers();
3339
- let l = await boundMessage(b, f);
3340
- adjustCreatedDestroyedData(t, f, l, z, x, S, C), L.push({
3338
+ f = l.msgModel, f.starty = bounds.getVerticalPos(), f.sequenceIndex = F, f.sequenceVisible = m.db.showSequenceNumbers();
3339
+ let n = await boundMessage(b, f);
3340
+ adjustCreatedDestroyedData(l, f, n, z, C, w, T), L.push({
3341
3341
  messageModel: f,
3342
- lineStartY: l
3342
+ lineStartY: n
3343
3343
  }), bounds.models.addMessage(f);
3344
- } catch (t) {
3345
- log.error("error while drawing message", t);
3344
+ } catch (l) {
3345
+ log.error("error while drawing message", l);
3346
3346
  }
3347
3347
  }
3348
3348
  [
@@ -3356,18 +3356,18 @@ var draw = /* @__PURE__ */ __name(async function(t, l, u, m) {
3356
3356
  m.db.LINETYPE.DOTTED_POINT,
3357
3357
  m.db.LINETYPE.BIDIRECTIONAL_SOLID,
3358
3358
  m.db.LINETYPE.BIDIRECTIONAL_DOTTED
3359
- ].includes(t.type) && (F += I), z++;
3359
+ ].includes(l.type) && (F += I), z++;
3360
3360
  }
3361
- log.debug("createdActors", S), log.debug("destroyedActors", C), await drawActors(b, x, D, !1);
3362
- for (let t of L) await drawMessage(b, t.messageModel, t.lineStartY, m);
3363
- conf.mirrorActors && await drawActors(b, x, D, !0), R.forEach((t) => svgDraw_default.drawBackgroundRect(b, t)), fixLifeLineHeights(b, x, D, conf);
3364
- for (let t of bounds.models.boxes) {
3365
- t.height = bounds.getVerticalPos() - t.y, bounds.insert(t.x, t.y, t.x + t.width, t.height);
3361
+ log.debug("createdActors", w), log.debug("destroyedActors", T), await drawActors(b, C, D, !1);
3362
+ for (let n of L) await drawMessage(b, n.messageModel, n.lineStartY, m);
3363
+ conf.mirrorActors && await drawActors(b, C, D, !0), R.forEach((n) => svgDraw_default.drawBackgroundRect(b, n)), fixLifeLineHeights(b, C, D, conf);
3364
+ for (let n of bounds.models.boxes) {
3365
+ n.height = bounds.getVerticalPos() - n.y, bounds.insert(n.x, n.y, n.x + n.width, n.height);
3366
3366
  let l = conf.boxMargin * 2;
3367
- t.startx = t.x - l, t.starty = t.y - l * .25, t.stopx = t.startx + t.width + 2 * l, t.stopy = t.starty + t.height + l * .75, t.stroke = "rgb(0,0,0, 0.5)", svgDraw_default.drawBox(b, t, conf);
3367
+ n.startx = n.x - l, n.starty = n.y - l * .25, n.stopx = n.startx + n.width + 2 * l, n.stopy = n.starty + n.height + l * .75, n.stroke = "rgb(0,0,0, 0.5)", svgDraw_default.drawBox(b, n, conf);
3368
3368
  }
3369
3369
  A && bounds.bumpVerticalPos(conf.boxMargin);
3370
- let B = drawActorsPopup(b, x, D, y), { bounds: V } = bounds.getBounds();
3370
+ let B = drawActorsPopup(b, C, D, y), { bounds: V } = bounds.getBounds();
3371
3371
  V.startx === void 0 && (V.startx = 0), V.starty === void 0 && (V.starty = 0), V.stopx === void 0 && (V.stopx = 0), V.stopy === void 0 && (V.stopy = 0);
3372
3372
  let H = V.stopy - V.starty;
3373
3373
  H < B.maxHeight && (H = B.maxHeight);
@@ -3380,71 +3380,71 @@ var draw = /* @__PURE__ */ __name(async function(t, l, u, m) {
3380
3380
  let K = k ? 40 : 0;
3381
3381
  b.attr("viewBox", V.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + K) + " " + G + " " + (U + K)), log.debug("models:", bounds.models);
3382
3382
  }, "draw");
3383
- async function getMaxMessageWidthPerActor(l, u, f) {
3384
- let p = {};
3385
- for (let d of u) if (l.get(d.to) && l.get(d.from)) {
3386
- let u = l.get(d.to);
3387
- if (d.placement === f.db.PLACEMENT.LEFTOF && !u.prevActor || d.placement === f.db.PLACEMENT.RIGHTOF && !u.nextActor) continue;
3388
- let m = d.placement !== void 0, h = !m, g = m ? noteFont(conf) : messageFont(conf), _ = d.wrap ? utils_default.wrapLabel(d.message, conf.width - 2 * conf.wrapPadding, g) : d.message, v = (hasKatex(_) ? await calculateMathMLDimensions(d.message, getConfig2()) : utils_default.calculateTextDimensions(_, g)).width + 2 * conf.wrapPadding;
3389
- h && d.from === u.nextActor ? p[d.to] = common_default.getMax(p[d.to] || 0, v) : h && d.from === u.prevActor ? p[d.from] = common_default.getMax(p[d.from] || 0, v) : h && d.from === d.to ? (p[d.from] = common_default.getMax(p[d.from] || 0, v / 2), p[d.to] = common_default.getMax(p[d.to] || 0, v / 2)) : d.placement === f.db.PLACEMENT.RIGHTOF ? p[d.from] = common_default.getMax(p[d.from] || 0, v) : d.placement === f.db.PLACEMENT.LEFTOF ? p[u.prevActor] = common_default.getMax(p[u.prevActor] || 0, v) : d.placement === f.db.PLACEMENT.OVER && (u.prevActor && (p[u.prevActor] = common_default.getMax(p[u.prevActor] || 0, v / 2)), u.nextActor && (p[d.from] = common_default.getMax(p[d.from] || 0, v / 2)));
3390
- }
3391
- return log.debug("maxMessageWidthPerActor:", p), p;
3383
+ async function getMaxMessageWidthPerActor(l, u, d) {
3384
+ let f = {};
3385
+ for (let n of u) if (l.get(n.to) && l.get(n.from)) {
3386
+ let u = l.get(n.to);
3387
+ if (n.placement === d.db.PLACEMENT.LEFTOF && !u.prevActor || n.placement === d.db.PLACEMENT.RIGHTOF && !u.nextActor) continue;
3388
+ let p = n.placement !== void 0, m = !p, h = p ? noteFont(conf) : messageFont(conf), g = n.wrap ? utils_default.wrapLabel(n.message, conf.width - 2 * conf.wrapPadding, h) : n.message, v = (hasKatex(g) ? await calculateMathMLDimensions(n.message, getConfig2()) : utils_default.calculateTextDimensions(g, h)).width + 2 * conf.wrapPadding;
3389
+ m && n.from === u.nextActor ? f[n.to] = common_default.getMax(f[n.to] || 0, v) : m && n.from === u.prevActor ? f[n.from] = common_default.getMax(f[n.from] || 0, v) : m && n.from === n.to ? (f[n.from] = common_default.getMax(f[n.from] || 0, v / 2), f[n.to] = common_default.getMax(f[n.to] || 0, v / 2)) : n.placement === d.db.PLACEMENT.RIGHTOF ? f[n.from] = common_default.getMax(f[n.from] || 0, v) : n.placement === d.db.PLACEMENT.LEFTOF ? f[u.prevActor] = common_default.getMax(f[u.prevActor] || 0, v) : n.placement === d.db.PLACEMENT.OVER && (u.prevActor && (f[u.prevActor] = common_default.getMax(f[u.prevActor] || 0, v / 2)), u.nextActor && (f[n.from] = common_default.getMax(f[n.from] || 0, v / 2)));
3390
+ }
3391
+ return log.debug("maxMessageWidthPerActor:", f), f;
3392
3392
  }
3393
3393
  __name(getMaxMessageWidthPerActor, "getMaxMessageWidthPerActor");
3394
- var getRequiredPopupWidth = /* @__PURE__ */ __name(function(l) {
3395
- let u = 0, d = actorFont(conf);
3396
- for (let f in l.links) {
3397
- let l = utils_default.calculateTextDimensions(f, d).width + 2 * conf.wrapPadding + 2 * conf.boxMargin;
3398
- u < l && (u = l);
3394
+ var getRequiredPopupWidth = /* @__PURE__ */ __name(function(n) {
3395
+ let l = 0, u = actorFont(conf);
3396
+ for (let d in n.links) {
3397
+ let n = utils_default.calculateTextDimensions(d, u).width + 2 * conf.wrapPadding + 2 * conf.boxMargin;
3398
+ l < n && (l = n);
3399
3399
  }
3400
- return u;
3400
+ return l;
3401
3401
  }, "getRequiredPopupWidth");
3402
- async function calculateActorMargins(l, u, d) {
3403
- let f = 0;
3404
- for (let u of l.keys()) {
3405
- let d = l.get(u);
3406
- d.wrap && (d.description = utils_default.wrapLabel(d.description, conf.width - 2 * conf.wrapPadding, actorFont(conf)));
3407
- let p = hasKatex(d.description) ? await calculateMathMLDimensions(d.description, getConfig2()) : utils_default.calculateTextDimensions(d.description, actorFont(conf));
3408
- d.width = d.wrap ? conf.width : common_default.getMax(conf.width, p.width + 2 * conf.wrapPadding), d.height = d.wrap ? common_default.getMax(p.height, conf.height) : conf.height, f = common_default.getMax(f, d.height);
3409
- }
3410
- for (let t in u) {
3411
- let d = l.get(t);
3402
+ async function calculateActorMargins(n, l, u) {
3403
+ let d = 0;
3404
+ for (let l of n.keys()) {
3405
+ let u = n.get(l);
3406
+ u.wrap && (u.description = utils_default.wrapLabel(u.description, conf.width - 2 * conf.wrapPadding, actorFont(conf)));
3407
+ let f = hasKatex(u.description) ? await calculateMathMLDimensions(u.description, getConfig2()) : utils_default.calculateTextDimensions(u.description, actorFont(conf));
3408
+ u.width = u.wrap ? conf.width : common_default.getMax(conf.width, f.width + 2 * conf.wrapPadding), u.height = u.wrap ? common_default.getMax(f.height, conf.height) : conf.height, d = common_default.getMax(d, u.height);
3409
+ }
3410
+ for (let u in l) {
3411
+ let d = n.get(u);
3412
3412
  if (!d) continue;
3413
- let f = l.get(d.nextActor);
3413
+ let f = n.get(d.nextActor);
3414
3414
  if (!f) {
3415
- let l = u[t] + conf.actorMargin - d.width / 2;
3416
- d.margin = common_default.getMax(l, conf.actorMargin);
3415
+ let n = l[u] + conf.actorMargin - d.width / 2;
3416
+ d.margin = common_default.getMax(n, conf.actorMargin);
3417
3417
  continue;
3418
3418
  }
3419
- let p = u[t] + conf.actorMargin - d.width / 2 - f.width / 2;
3419
+ let p = l[u] + conf.actorMargin - d.width / 2 - f.width / 2;
3420
3420
  d.margin = common_default.getMax(p, conf.actorMargin);
3421
3421
  }
3422
- let p = 0;
3423
- return d.forEach((u) => {
3424
- let d = messageFont(conf), f = u.actorKeys.reduce((t, u) => t += l.get(u).width + (l.get(u).margin || 0), 0), m = conf.boxMargin * 8;
3425
- f += m, f -= 2 * conf.boxTextMargin, u.wrap && (u.name = utils_default.wrapLabel(u.name, f - 2 * conf.wrapPadding, d));
3426
- let h = utils_default.calculateTextDimensions(u.name, d);
3427
- p = common_default.getMax(h.height, p);
3428
- let g = common_default.getMax(f, h.width + 2 * conf.wrapPadding);
3429
- if (u.margin = conf.boxTextMargin, f < g) {
3430
- let t = (g - f) / 2;
3431
- u.margin += t;
3422
+ let f = 0;
3423
+ return u.forEach((l) => {
3424
+ let u = messageFont(conf), d = l.actorKeys.reduce((l, u) => l += n.get(u).width + (n.get(u).margin || 0), 0), p = conf.boxMargin * 8;
3425
+ d += p, d -= 2 * conf.boxTextMargin, l.wrap && (l.name = utils_default.wrapLabel(l.name, d - 2 * conf.wrapPadding, u));
3426
+ let m = utils_default.calculateTextDimensions(l.name, u);
3427
+ f = common_default.getMax(m.height, f);
3428
+ let h = common_default.getMax(d, m.width + 2 * conf.wrapPadding);
3429
+ if (l.margin = conf.boxTextMargin, d < h) {
3430
+ let n = (h - d) / 2;
3431
+ l.margin += n;
3432
3432
  }
3433
- }), d.forEach((t) => t.textMaxHeight = p), common_default.getMax(f, conf.height);
3433
+ }), u.forEach((n) => n.textMaxHeight = f), common_default.getMax(d, conf.height);
3434
3434
  }
3435
3435
  __name(calculateActorMargins, "calculateActorMargins");
3436
- var buildNoteModel = /* @__PURE__ */ __name(async function(l, u, f) {
3437
- let p = u.get(l.from), m = u.get(l.to), h = p.x, g = m.x, _ = l.wrap && l.message, v = hasKatex(l.message) ? await calculateMathMLDimensions(l.message, getConfig2()) : utils_default.calculateTextDimensions(_ ? utils_default.wrapLabel(l.message, conf.width, noteFont(conf)) : l.message, noteFont(conf)), y = {
3438
- width: _ ? conf.width : common_default.getMax(conf.width, v.width + 2 * conf.noteMargin),
3436
+ var buildNoteModel = /* @__PURE__ */ __name(async function(l, u, d) {
3437
+ let f = u.get(l.from), p = u.get(l.to), m = f.x, h = p.x, g = l.wrap && l.message, v = hasKatex(l.message) ? await calculateMathMLDimensions(l.message, getConfig2()) : utils_default.calculateTextDimensions(g ? utils_default.wrapLabel(l.message, conf.width, noteFont(conf)) : l.message, noteFont(conf)), y = {
3438
+ width: g ? conf.width : common_default.getMax(conf.width, v.width + 2 * conf.noteMargin),
3439
3439
  height: 0,
3440
- startx: p.x,
3440
+ startx: f.x,
3441
3441
  stopx: 0,
3442
3442
  starty: 0,
3443
3443
  stopy: 0,
3444
3444
  message: l.message
3445
3445
  };
3446
- return l.placement === f.db.PLACEMENT.RIGHTOF ? (y.width = _ ? common_default.getMax(conf.width, v.width) : common_default.getMax(p.width / 2 + m.width / 2, v.width + 2 * conf.noteMargin), y.startx = h + (p.width + conf.actorMargin) / 2) : l.placement === f.db.PLACEMENT.LEFTOF ? (y.width = _ ? common_default.getMax(conf.width, v.width + 2 * conf.noteMargin) : common_default.getMax(p.width / 2 + m.width / 2, v.width + 2 * conf.noteMargin), y.startx = h - y.width + (p.width - conf.actorMargin) / 2) : l.to === l.from ? (v = utils_default.calculateTextDimensions(_ ? utils_default.wrapLabel(l.message, common_default.getMax(conf.width, p.width), noteFont(conf)) : l.message, noteFont(conf)), y.width = _ ? common_default.getMax(conf.width, p.width) : common_default.getMax(p.width, conf.width, v.width + 2 * conf.noteMargin), y.startx = h + (p.width - y.width) / 2) : (y.width = Math.abs(h + p.width / 2 - (g + m.width / 2)) + conf.actorMargin, y.startx = h < g ? h + p.width / 2 - conf.actorMargin / 2 : g + m.width / 2 - conf.actorMargin / 2), _ && (y.message = utils_default.wrapLabel(l.message, y.width - 2 * conf.wrapPadding, noteFont(conf))), log.debug(`NM:[${y.startx},${y.stopx},${y.starty},${y.stopy}:${y.width},${y.height}=${l.message}]`), y;
3447
- }, "buildNoteModel"), buildMessageModel = /* @__PURE__ */ __name(function(l, u, d) {
3446
+ return l.placement === d.db.PLACEMENT.RIGHTOF ? (y.width = g ? common_default.getMax(conf.width, v.width) : common_default.getMax(f.width / 2 + p.width / 2, v.width + 2 * conf.noteMargin), y.startx = m + (f.width + conf.actorMargin) / 2) : l.placement === d.db.PLACEMENT.LEFTOF ? (y.width = g ? common_default.getMax(conf.width, v.width + 2 * conf.noteMargin) : common_default.getMax(f.width / 2 + p.width / 2, v.width + 2 * conf.noteMargin), y.startx = m - y.width + (f.width - conf.actorMargin) / 2) : l.to === l.from ? (v = utils_default.calculateTextDimensions(g ? utils_default.wrapLabel(l.message, common_default.getMax(conf.width, f.width), noteFont(conf)) : l.message, noteFont(conf)), y.width = g ? common_default.getMax(conf.width, f.width) : common_default.getMax(f.width, conf.width, v.width + 2 * conf.noteMargin), y.startx = m + (f.width - y.width) / 2) : (y.width = Math.abs(m + f.width / 2 - (h + p.width / 2)) + conf.actorMargin, y.startx = m < h ? m + f.width / 2 - conf.actorMargin / 2 : h + p.width / 2 - conf.actorMargin / 2), g && (y.message = utils_default.wrapLabel(l.message, y.width - 2 * conf.wrapPadding, noteFont(conf))), log.debug(`NM:[${y.startx},${y.stopx},${y.starty},${y.stopy}:${y.width},${y.height}=${l.message}]`), y;
3447
+ }, "buildNoteModel"), buildMessageModel = /* @__PURE__ */ __name(function(n, u, d) {
3448
3448
  if (![
3449
3449
  d.db.LINETYPE.SOLID_OPEN,
3450
3450
  d.db.LINETYPE.DOTTED_OPEN,
@@ -3456,34 +3456,34 @@ var buildNoteModel = /* @__PURE__ */ __name(async function(l, u, f) {
3456
3456
  d.db.LINETYPE.DOTTED_POINT,
3457
3457
  d.db.LINETYPE.BIDIRECTIONAL_SOLID,
3458
3458
  d.db.LINETYPE.BIDIRECTIONAL_DOTTED
3459
- ].includes(l.type)) return {};
3460
- let [p, m] = activationBounds(l.from, u), [h, g] = activationBounds(l.to, u), _ = p <= h, v = _ ? m : p, y = _ ? h : g, b = Math.abs(h - g) > 2, x = /* @__PURE__ */ __name((t) => _ ? -t : t, "adjustValue");
3461
- l.from === l.to ? y = v : (l.activate && !b && (y += x(conf.activationWidth / 2 - 1)), [d.db.LINETYPE.SOLID_OPEN, d.db.LINETYPE.DOTTED_OPEN].includes(l.type) || (y += x(3)), [d.db.LINETYPE.BIDIRECTIONAL_SOLID, d.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(l.type) && (v -= x(3)));
3462
- let S = [
3459
+ ].includes(n.type)) return {};
3460
+ let [f, p] = activationBounds(n.from, u), [m, h] = activationBounds(n.to, u), g = f <= m, _ = g ? p : f, v = g ? m : h, y = Math.abs(m - h) > 2, b = /* @__PURE__ */ __name((n) => g ? -n : n, "adjustValue");
3461
+ n.from === n.to ? v = _ : (n.activate && !y && (v += b(conf.activationWidth / 2 - 1)), [d.db.LINETYPE.SOLID_OPEN, d.db.LINETYPE.DOTTED_OPEN].includes(n.type) || (v += b(3)), [d.db.LINETYPE.BIDIRECTIONAL_SOLID, d.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(n.type) && (_ -= b(3)));
3462
+ let x = [
3463
+ f,
3463
3464
  p,
3464
3465
  m,
3465
- h,
3466
- g
3467
- ], C = Math.abs(v - y);
3468
- l.wrap && l.message && (l.message = utils_default.wrapLabel(l.message, common_default.getMax(C + 2 * conf.wrapPadding, conf.width), messageFont(conf)));
3469
- let w = utils_default.calculateTextDimensions(l.message, messageFont(conf));
3466
+ h
3467
+ ], S = Math.abs(_ - v);
3468
+ n.wrap && n.message && (n.message = utils_default.wrapLabel(n.message, common_default.getMax(S + 2 * conf.wrapPadding, conf.width), messageFont(conf)));
3469
+ let C = utils_default.calculateTextDimensions(n.message, messageFont(conf));
3470
3470
  return {
3471
- width: common_default.getMax(l.wrap ? 0 : w.width + 2 * conf.wrapPadding, C + 2 * conf.wrapPadding, conf.width),
3471
+ width: common_default.getMax(n.wrap ? 0 : C.width + 2 * conf.wrapPadding, S + 2 * conf.wrapPadding, conf.width),
3472
3472
  height: 0,
3473
- startx: v,
3474
- stopx: y,
3473
+ startx: _,
3474
+ stopx: v,
3475
3475
  starty: 0,
3476
3476
  stopy: 0,
3477
- message: l.message,
3478
- type: l.type,
3479
- wrap: l.wrap,
3480
- fromBounds: Math.min.apply(null, S),
3481
- toBounds: Math.max.apply(null, S)
3477
+ message: n.message,
3478
+ type: n.type,
3479
+ wrap: n.wrap,
3480
+ fromBounds: Math.min.apply(null, x),
3481
+ toBounds: Math.max.apply(null, x)
3482
3482
  };
3483
- }, "buildMessageModel"), calculateLoopBounds = /* @__PURE__ */ __name(async function(t, l, u, f) {
3483
+ }, "buildMessageModel"), calculateLoopBounds = /* @__PURE__ */ __name(async function(l, u, d, f) {
3484
3484
  let p = {}, m = [], h, g, _;
3485
- for (let u of t) {
3486
- switch (u.type) {
3485
+ for (let n of l) {
3486
+ switch (n.type) {
3487
3487
  case f.db.LINETYPE.LOOP_START:
3488
3488
  case f.db.LINETYPE.ALT_START:
3489
3489
  case f.db.LINETYPE.OPT_START:
@@ -3492,8 +3492,8 @@ var buildNoteModel = /* @__PURE__ */ __name(async function(l, u, f) {
3492
3492
  case f.db.LINETYPE.CRITICAL_START:
3493
3493
  case f.db.LINETYPE.BREAK_START:
3494
3494
  m.push({
3495
- id: u.id,
3496
- msg: u.message,
3495
+ id: n.id,
3496
+ msg: n.message,
3497
3497
  from: 2 ** 53 - 1,
3498
3498
  to: -(2 ** 53 - 1),
3499
3499
  width: 0
@@ -3502,7 +3502,7 @@ var buildNoteModel = /* @__PURE__ */ __name(async function(l, u, f) {
3502
3502
  case f.db.LINETYPE.ALT_ELSE:
3503
3503
  case f.db.LINETYPE.PAR_AND:
3504
3504
  case f.db.LINETYPE.CRITICAL_OPTION:
3505
- u.message && (h = m.pop(), p[h.id] = h, p[u.id] = h, m.push(h));
3505
+ n.message && (h = m.pop(), p[h.id] = h, p[n.id] = h, m.push(h));
3506
3506
  break;
3507
3507
  case f.db.LINETYPE.LOOP_END:
3508
3508
  case f.db.LINETYPE.ALT_END:
@@ -3514,10 +3514,10 @@ var buildNoteModel = /* @__PURE__ */ __name(async function(l, u, f) {
3514
3514
  break;
3515
3515
  case f.db.LINETYPE.ACTIVE_START:
3516
3516
  {
3517
- let t = l.get(u.from ? u.from : u.to.actor), d = actorActivations(u.from ? u.from : u.to.actor).length, f = t.x + t.width / 2 + (d - 1) * conf.activationWidth / 2, p = {
3517
+ let l = u.get(n.from ? n.from : n.to.actor), d = actorActivations(n.from ? n.from : n.to.actor).length, f = l.x + l.width / 2 + (d - 1) * conf.activationWidth / 2, p = {
3518
3518
  startx: f,
3519
3519
  stopx: f + conf.activationWidth,
3520
- actor: u.from,
3520
+ actor: n.from,
3521
3521
  enabled: !0
3522
3522
  };
3523
3523
  bounds.activations.push(p);
@@ -3525,18 +3525,18 @@ var buildNoteModel = /* @__PURE__ */ __name(async function(l, u, f) {
3525
3525
  break;
3526
3526
  case f.db.LINETYPE.ACTIVE_END:
3527
3527
  {
3528
- let t = bounds.activations.map((t) => t.actor).lastIndexOf(u.from);
3529
- bounds.activations.splice(t, 1).splice(0, 1);
3528
+ let l = bounds.activations.map((n) => n.actor).lastIndexOf(n.from);
3529
+ bounds.activations.splice(l, 1).splice(0, 1);
3530
3530
  }
3531
3531
  break;
3532
3532
  }
3533
- u.placement === void 0 ? (_ = buildMessageModel(u, l, f), u.msgModel = _, _.startx && _.stopx && m.length > 0 && m.forEach((t) => {
3534
- if (h = t, _.startx === _.stopx) {
3535
- let t = l.get(u.from), d = l.get(u.to);
3536
- h.from = common_default.getMin(t.x - _.width / 2, t.x - t.width / 2, h.from), h.to = common_default.getMax(d.x + _.width / 2, d.x + t.width / 2, h.to), h.width = common_default.getMax(h.width, Math.abs(h.to - h.from)) - conf.labelBoxWidth;
3533
+ n.placement === void 0 ? (_ = buildMessageModel(n, u, f), n.msgModel = _, _.startx && _.stopx && m.length > 0 && m.forEach((l) => {
3534
+ if (h = l, _.startx === _.stopx) {
3535
+ let l = u.get(n.from), d = u.get(n.to);
3536
+ h.from = common_default.getMin(l.x - _.width / 2, l.x - l.width / 2, h.from), h.to = common_default.getMax(d.x + _.width / 2, d.x + l.width / 2, h.to), h.width = common_default.getMax(h.width, Math.abs(h.to - h.from)) - conf.labelBoxWidth;
3537
3537
  } else h.from = common_default.getMin(_.startx, h.from), h.to = common_default.getMax(_.stopx, h.to), h.width = common_default.getMax(h.width, _.width) - conf.labelBoxWidth;
3538
- })) : (g = await buildNoteModel(u, l, f), u.noteModel = g, m.forEach((t) => {
3539
- h = t, h.from = common_default.getMin(h.from, g.startx), h.to = common_default.getMax(h.to, g.startx + g.width), h.width = common_default.getMax(h.width, Math.abs(h.from - h.to)) - conf.labelBoxWidth;
3538
+ })) : (g = await buildNoteModel(n, u, f), n.noteModel = g, m.forEach((n) => {
3539
+ h = n, h.from = common_default.getMin(h.from, g.startx), h.to = common_default.getMax(h.to, g.startx + g.width), h.width = common_default.getMax(h.width, Math.abs(h.from - h.to)) - conf.labelBoxWidth;
3540
3540
  }));
3541
3541
  }
3542
3542
  return bounds.activations = [], log.debug("Loop type widths:", p), p;
@@ -3553,8 +3553,8 @@ var buildNoteModel = /* @__PURE__ */ __name(async function(l, u, f) {
3553
3553
  draw
3554
3554
  },
3555
3555
  styles: styles_default,
3556
- init: /* @__PURE__ */ __name((t) => {
3557
- t.sequence ||= {}, t.wrap && (t.sequence.wrap = t.wrap, setConfig2({ sequence: { wrap: t.wrap } }));
3556
+ init: /* @__PURE__ */ __name((n) => {
3557
+ n.sequence ||= {}, n.wrap && (n.sequence.wrap = n.wrap, setConfig2({ sequence: { wrap: n.wrap } }));
3558
3558
  }, "init")
3559
3559
  };
3560
3560
  export { diagram };