@omg-dev/app 0.5.0 → 0.6.1

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 (113) hide show
  1. package/dist-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
  2. package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
  3. package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
  4. package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
  5. package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
  6. package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
  7. package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
  8. package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
  9. package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
  10. package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
  11. package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
  12. package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
  13. package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
  14. package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
  15. package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
  16. package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
  17. package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
  18. package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
  19. package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
  20. package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
  21. package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
  22. package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
  23. package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
  24. package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
  25. package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
  26. package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
  27. package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
  28. package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
  29. package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
  30. package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
  31. package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
  32. package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
  33. package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
  34. package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
  35. package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
  36. package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
  37. package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
  38. package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
  39. package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
  40. package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
  41. package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
  42. package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
  43. package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
  44. package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
  45. package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
  46. package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
  47. package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
  48. package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
  49. package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
  50. package/dist-lib/index-B0neMIbR.js +16520 -0
  51. package/dist-lib/index-BBC0E3Qg.js +4994 -0
  52. package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
  53. package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
  54. package/dist-lib/index.js +1 -1
  55. package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
  56. package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
  57. package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
  58. package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
  59. package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
  60. package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
  61. package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
  62. package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
  63. package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
  64. package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
  65. package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
  66. package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
  67. package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
  68. package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
  69. package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
  70. package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
  71. package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
  72. package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
  73. package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
  74. package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
  75. package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
  76. package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
  77. package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
  78. package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
  79. package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
  80. package/dist-lib/styles.css +1 -1
  81. package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
  82. package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
  83. package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
  84. package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
  85. package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
  86. package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
  87. package/package.json +4 -3
  88. package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
  89. package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
  90. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
  91. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
  92. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
  93. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
  94. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
  95. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
  96. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
  97. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
  98. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
  99. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
  100. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
  101. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
  102. package/dist-lib/index-DcwavxA1.js +0 -5062
  103. package/dist-lib/index-JkCQXUYs.js +0 -16566
  104. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
  105. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
  106. package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
  107. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
  108. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
  109. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
  110. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
  111. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
  112. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
  113. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
@@ -1,111 +1,111 @@
1
- import { g as ee } from "./chunk-XXDRQBXY-Ccv4aRcn.js";
2
- import { s as se } from "./chunk-VR4S4FIN-hOZG7eF3.js";
3
- import { _ as S, l as b, c as F, x as ie, y as re, a as ae, b as ne, g as oe, s as le, o as ce, p as he, a9 as ue, k as K, q as de, d as Dt, a5 as fe } from "./index-JkCQXUYs.js";
4
- import { f as pe } from "./chunk-32BRIVSS-IYmNSvH8.js";
5
- var Ct = (function() {
6
- var t = /* @__PURE__ */ S(function(U, l, d, n) {
7
- for (d = d || {}, n = U.length; n--; d[U[n]] = l) ;
1
+ import { g as te } from "./chunk-XXDRQBXY-DRKeYnrF.js";
2
+ import { s as ee } from "./chunk-VR4S4FIN-BDq3jZ0m.js";
3
+ import { _ as f, l as _, c as $, x as se, y as ie, a as re, b as ae, g as ne, s as oe, o as le, p as ce, a9 as he, k as j, q as ue, d as bt, a5 as de } from "./index-B0neMIbR.js";
4
+ import { f as fe } from "./chunk-32BRIVSS-DvywQiCk.js";
5
+ var vt = (function() {
6
+ var t = /* @__PURE__ */ f(function(V, a, d, r) {
7
+ for (d = d || {}, r = V.length; r--; d[V[r]] = a) ;
8
8
  return d;
9
- }, "o"), e = [1, 2], s = [1, 3], a = [1, 4], i = [2, 4], o = [1, 9], h = [1, 11], p = [1, 16], f = [1, 17], T = [1, 18], E = [1, 19], m = [1, 33], O = [1, 20], C = [1, 21], x = [1, 22], $ = [1, 23], R = [1, 24], u = [1, 26], L = [1, 27], k = [1, 28], V = [1, 29], P = [1, 30], v = [1, 31], B = [1, 32], j = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38], J = [1, 34], y = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], ct = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], Lt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], gt = {
10
- trace: /* @__PURE__ */ S(function() {
9
+ }, "o"), e = [1, 2], o = [1, 3], s = [1, 4], c = [2, 4], h = [1, 9], p = [1, 11], y = [1, 16], n = [1, 17], T = [1, 18], m = [1, 19], O = [1, 33], x = [1, 20], k = [1, 21], u = [1, 22], L = [1, 23], I = [1, 24], v = [1, 26], F = [1, 27], C = [1, 28], P = [1, 29], w = [1, 30], H = [1, 31], it = [1, 32], rt = [1, 35], at = [1, 36], nt = [1, 37], ot = [1, 38], z = [1, 34], S = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], lt = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], yt = {
10
+ trace: /* @__PURE__ */ f(function() {
11
11
  }, "trace"),
12
12
  yy: {},
13
13
  symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, SD: 6, document: 7, line: 8, statement: 9, classDefStatement: 10, styleStatement: 11, cssClassStatement: 12, idStatement: 13, DESCR: 14, "-->": 15, HIDE_EMPTY: 16, scale: 17, WIDTH: 18, COMPOSIT_STATE: 19, STRUCT_START: 20, STRUCT_STOP: 21, STATE_DESCR: 22, AS: 23, ID: 24, FORK: 25, JOIN: 26, CHOICE: 27, CONCURRENT: 28, note: 29, notePosition: 30, NOTE_TEXT: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, CLICK: 38, STRING: 39, HREF: 40, classDef: 41, CLASSDEF_ID: 42, CLASSDEF_STYLEOPTS: 43, DEFAULT: 44, style: 45, STYLE_IDS: 46, STYLEDEF_STYLEOPTS: 47, class: 48, CLASSENTITY_IDS: 49, STYLECLASS: 50, direction_tb: 51, direction_bt: 52, direction_rl: 53, direction_lr: 54, eol: 55, ";": 56, EDGE_STATE: 57, STYLE_SEPARATOR: 58, left_of: 59, right_of: 60, $accept: 0, $end: 1 },
14
14
  terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "CLICK", 39: "STRING", 40: "HREF", 41: "classDef", 42: "CLASSDEF_ID", 43: "CLASSDEF_STYLEOPTS", 44: "DEFAULT", 45: "style", 46: "STYLE_IDS", 47: "STYLEDEF_STYLEOPTS", 48: "class", 49: "CLASSENTITY_IDS", 50: "STYLECLASS", 51: "direction_tb", 52: "direction_bt", 53: "direction_rl", 54: "direction_lr", 56: ";", 57: "EDGE_STATE", 58: "STYLE_SEPARATOR", 59: "left_of", 60: "right_of" },
15
15
  productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [9, 5], [9, 5], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [55, 1], [55, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
16
- performAction: /* @__PURE__ */ S(function(l, d, n, g, _, r, Y) {
17
- var c = r.length - 1;
18
- switch (_) {
16
+ performAction: /* @__PURE__ */ f(function(a, d, r, g, E, i, B) {
17
+ var l = i.length - 1;
18
+ switch (E) {
19
19
  case 3:
20
- return g.setRootDoc(r[c]), r[c];
20
+ return g.setRootDoc(i[l]), i[l];
21
21
  case 4:
22
22
  this.$ = [];
23
23
  break;
24
24
  case 5:
25
- r[c] != "nl" && (r[c - 1].push(r[c]), this.$ = r[c - 1]);
25
+ i[l] != "nl" && (i[l - 1].push(i[l]), this.$ = i[l - 1]);
26
26
  break;
27
27
  case 6:
28
28
  case 7:
29
- this.$ = r[c];
29
+ this.$ = i[l];
30
30
  break;
31
31
  case 8:
32
32
  this.$ = "nl";
33
33
  break;
34
34
  case 12:
35
- this.$ = r[c];
35
+ this.$ = i[l];
36
36
  break;
37
37
  case 13:
38
- const et = r[c - 1];
39
- et.description = g.trimColon(r[c]), this.$ = et;
38
+ const Q = i[l - 1];
39
+ Q.description = g.trimColon(i[l]), this.$ = Q;
40
40
  break;
41
41
  case 14:
42
- this.$ = { stmt: "relation", state1: r[c - 2], state2: r[c] };
42
+ this.$ = { stmt: "relation", state1: i[l - 2], state2: i[l] };
43
43
  break;
44
44
  case 15:
45
- const Tt = g.trimColon(r[c]);
46
- this.$ = { stmt: "relation", state1: r[c - 3], state2: r[c - 1], description: Tt };
45
+ const gt = g.trimColon(i[l]);
46
+ this.$ = { stmt: "relation", state1: i[l - 3], state2: i[l - 1], description: gt };
47
47
  break;
48
48
  case 19:
49
- this.$ = { stmt: "state", id: r[c - 3], type: "default", description: "", doc: r[c - 1] };
49
+ this.$ = { stmt: "state", id: i[l - 3], type: "default", description: "", doc: i[l - 1] };
50
50
  break;
51
51
  case 20:
52
- var G = r[c], q = r[c - 2].trim();
53
- if (r[c].match(":")) {
54
- var ut = r[c].split(":");
55
- G = ut[0], q = [q, ut[1]];
52
+ var Y = i[l], K = i[l - 2].trim();
53
+ if (i[l].match(":")) {
54
+ var ht = i[l].split(":");
55
+ Y = ht[0], K = [K, ht[1]];
56
56
  }
57
- this.$ = { stmt: "state", id: G, type: "default", description: q };
57
+ this.$ = { stmt: "state", id: Y, type: "default", description: K };
58
58
  break;
59
59
  case 21:
60
- this.$ = { stmt: "state", id: r[c - 3], type: "default", description: r[c - 5], doc: r[c - 1] };
60
+ this.$ = { stmt: "state", id: i[l - 3], type: "default", description: i[l - 5], doc: i[l - 1] };
61
61
  break;
62
62
  case 22:
63
- this.$ = { stmt: "state", id: r[c], type: "fork" };
63
+ this.$ = { stmt: "state", id: i[l], type: "fork" };
64
64
  break;
65
65
  case 23:
66
- this.$ = { stmt: "state", id: r[c], type: "join" };
66
+ this.$ = { stmt: "state", id: i[l], type: "join" };
67
67
  break;
68
68
  case 24:
69
- this.$ = { stmt: "state", id: r[c], type: "choice" };
69
+ this.$ = { stmt: "state", id: i[l], type: "choice" };
70
70
  break;
71
71
  case 25:
72
72
  this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
73
73
  break;
74
74
  case 26:
75
- this.$ = { stmt: "state", id: r[c - 1].trim(), note: { position: r[c - 2].trim(), text: r[c].trim() } };
75
+ this.$ = { stmt: "state", id: i[l - 1].trim(), note: { position: i[l - 2].trim(), text: i[l].trim() } };
76
76
  break;
77
77
  case 29:
78
- this.$ = r[c].trim(), g.setAccTitle(this.$);
78
+ this.$ = i[l].trim(), g.setAccTitle(this.$);
79
79
  break;
80
80
  case 30:
81
81
  case 31:
82
- this.$ = r[c].trim(), g.setAccDescription(this.$);
82
+ this.$ = i[l].trim(), g.setAccDescription(this.$);
83
83
  break;
84
84
  case 32:
85
85
  this.$ = {
86
86
  stmt: "click",
87
- id: r[c - 3],
88
- url: r[c - 2],
89
- tooltip: r[c - 1]
87
+ id: i[l - 3],
88
+ url: i[l - 2],
89
+ tooltip: i[l - 1]
90
90
  };
91
91
  break;
92
92
  case 33:
93
93
  this.$ = {
94
94
  stmt: "click",
95
- id: r[c - 3],
96
- url: r[c - 1],
95
+ id: i[l - 3],
96
+ url: i[l - 1],
97
97
  tooltip: ""
98
98
  };
99
99
  break;
100
100
  case 34:
101
101
  case 35:
102
- this.$ = { stmt: "classDef", id: r[c - 1].trim(), classes: r[c].trim() };
102
+ this.$ = { stmt: "classDef", id: i[l - 1].trim(), classes: i[l].trim() };
103
103
  break;
104
104
  case 36:
105
- this.$ = { stmt: "style", id: r[c - 1].trim(), styleClass: r[c].trim() };
105
+ this.$ = { stmt: "style", id: i[l - 1].trim(), styleClass: i[l].trim() };
106
106
  break;
107
107
  case 37:
108
- this.$ = { stmt: "applyClass", id: r[c - 1].trim(), styleClass: r[c].trim() };
108
+ this.$ = { stmt: "applyClass", id: i[l - 1].trim(), styleClass: i[l].trim() };
109
109
  break;
110
110
  case 38:
111
111
  g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
@@ -121,86 +121,86 @@ var Ct = (function() {
121
121
  break;
122
122
  case 44:
123
123
  case 45:
124
- this.$ = { stmt: "state", id: r[c].trim(), type: "default", description: "" };
124
+ this.$ = { stmt: "state", id: i[l].trim(), type: "default", description: "" };
125
125
  break;
126
126
  case 46:
127
- this.$ = { stmt: "state", id: r[c - 2].trim(), classes: [r[c].trim()], type: "default", description: "" };
127
+ this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
128
128
  break;
129
129
  case 47:
130
- this.$ = { stmt: "state", id: r[c - 2].trim(), classes: [r[c].trim()], type: "default", description: "" };
130
+ this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
131
131
  break;
132
132
  }
133
133
  }, "anonymous"),
134
- table: [{ 3: 1, 4: e, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: s, 6: a }, { 3: 6, 4: e, 5: s, 6: a }, t([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], i, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: o, 5: h, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: p, 17: f, 19: T, 22: E, 24: m, 25: O, 26: C, 27: x, 28: $, 29: R, 32: 25, 33: u, 35: L, 37: k, 38: V, 41: P, 45: v, 48: B, 51: j, 52: nt, 53: ot, 54: lt, 57: J }, t(y, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: p, 17: f, 19: T, 22: E, 24: m, 25: O, 26: C, 27: x, 28: $, 29: R, 32: 25, 33: u, 35: L, 37: k, 38: V, 41: P, 45: v, 48: B, 51: j, 52: nt, 53: ot, 54: lt, 57: J }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 9]), t(y, [2, 10]), t(y, [2, 11]), t(y, [2, 12], { 14: [1, 40], 15: [1, 41] }), t(y, [2, 16]), { 18: [1, 42] }, t(y, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, t(y, [2, 22]), t(y, [2, 23]), t(y, [2, 24]), t(y, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, t(y, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, t(y, [2, 31]), { 13: 51, 24: m, 57: J }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, t(ct, [2, 44], { 58: [1, 56] }), t(ct, [2, 45], { 58: [1, 57] }), t(y, [2, 38]), t(y, [2, 39]), t(y, [2, 40]), t(y, [2, 41]), t(y, [2, 6]), t(y, [2, 13]), { 13: 58, 24: m, 57: J }, t(y, [2, 17]), t(Lt, i, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, t(y, [2, 29]), t(y, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, t(y, [2, 14], { 14: [1, 71] }), { 4: o, 5: h, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: p, 17: f, 19: T, 21: [1, 72], 22: E, 24: m, 25: O, 26: C, 27: x, 28: $, 29: R, 32: 25, 33: u, 35: L, 37: k, 38: V, 41: P, 45: v, 48: B, 51: j, 52: nt, 53: ot, 54: lt, 57: J }, t(y, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, t(y, [2, 34]), t(y, [2, 35]), t(y, [2, 36]), t(y, [2, 37]), t(ct, [2, 46]), t(ct, [2, 47]), t(y, [2, 15]), t(y, [2, 19]), t(Lt, i, { 7: 78 }), t(y, [2, 26]), t(y, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: o, 5: h, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: p, 17: f, 19: T, 21: [1, 81], 22: E, 24: m, 25: O, 26: C, 27: x, 28: $, 29: R, 32: 25, 33: u, 35: L, 37: k, 38: V, 41: P, 45: v, 48: B, 51: j, 52: nt, 53: ot, 54: lt, 57: J }, t(y, [2, 32]), t(y, [2, 33]), t(y, [2, 21])],
134
+ table: [{ 3: 1, 4: e, 5: o, 6: s }, { 1: [3] }, { 3: 5, 4: e, 5: o, 6: s }, { 3: 6, 4: e, 5: o, 6: s }, t([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], c, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 7]), t(S, [2, 8]), t(S, [2, 9]), t(S, [2, 10]), t(S, [2, 11]), t(S, [2, 12], { 14: [1, 40], 15: [1, 41] }), t(S, [2, 16]), { 18: [1, 42] }, t(S, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, t(S, [2, 22]), t(S, [2, 23]), t(S, [2, 24]), t(S, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, t(S, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, t(S, [2, 31]), { 13: 51, 24: O, 57: z }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, t(lt, [2, 44], { 58: [1, 56] }), t(lt, [2, 45], { 58: [1, 57] }), t(S, [2, 38]), t(S, [2, 39]), t(S, [2, 40]), t(S, [2, 41]), t(S, [2, 6]), t(S, [2, 13]), { 13: 58, 24: O, 57: z }, t(S, [2, 17]), t(xt, c, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, t(S, [2, 29]), t(S, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, t(S, [2, 14], { 14: [1, 71] }), { 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 21: [1, 72], 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, t(S, [2, 34]), t(S, [2, 35]), t(S, [2, 36]), t(S, [2, 37]), t(lt, [2, 46]), t(lt, [2, 47]), t(S, [2, 15]), t(S, [2, 19]), t(xt, c, { 7: 78 }), t(S, [2, 26]), t(S, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 21: [1, 81], 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 32]), t(S, [2, 33]), t(S, [2, 21])],
135
135
  defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
136
- parseError: /* @__PURE__ */ S(function(l, d) {
136
+ parseError: /* @__PURE__ */ f(function(a, d) {
137
137
  if (d.recoverable)
138
- this.trace(l);
138
+ this.trace(a);
139
139
  else {
140
- var n = new Error(l);
141
- throw n.hash = d, n;
140
+ var r = new Error(a);
141
+ throw r.hash = d, r;
142
142
  }
143
143
  }, "parseError"),
144
- parse: /* @__PURE__ */ S(function(l) {
145
- var d = this, n = [0], g = [], _ = [null], r = [], Y = this.table, c = "", G = 0, q = 0, ut = 2, et = 1, Tt = r.slice.call(arguments, 1), D = Object.create(this.lexer), H = { yy: {} };
146
- for (var Et in this.yy)
147
- Object.prototype.hasOwnProperty.call(this.yy, Et) && (H.yy[Et] = this.yy[Et]);
148
- D.setInput(l, H.yy), H.yy.lexer = D, H.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
149
- var _t = D.yylloc;
150
- r.push(_t);
151
- var Zt = D.options && D.options.ranges;
152
- typeof H.yy.parseError == "function" ? this.parseError = H.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
153
- function te(I) {
154
- n.length = n.length - 2 * I, _.length = _.length - I, r.length = r.length - I;
144
+ parse: /* @__PURE__ */ f(function(a) {
145
+ var d = this, r = [0], g = [], E = [null], i = [], B = this.table, l = "", Y = 0, K = 0, ht = 2, Q = 1, gt = i.slice.call(arguments, 1), b = Object.create(this.lexer), U = { yy: {} };
146
+ for (var Tt in this.yy)
147
+ Object.prototype.hasOwnProperty.call(this.yy, Tt) && (U.yy[Tt] = this.yy[Tt]);
148
+ b.setInput(a, U.yy), U.yy.lexer = b, U.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
149
+ var Et = b.yylloc;
150
+ i.push(Et);
151
+ var Qt = b.options && b.options.ranges;
152
+ typeof U.yy.parseError == "function" ? this.parseError = U.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
153
+ function Zt(N) {
154
+ r.length = r.length - 2 * N, E.length = E.length - N, i.length = i.length - N;
155
155
  }
156
- S(te, "popStack");
157
- function wt() {
158
- var I;
159
- return I = g.pop() || D.lex() || et, typeof I != "number" && (I instanceof Array && (g = I, I = g.pop()), I = d.symbols_[I] || I), I;
156
+ f(Zt, "popStack");
157
+ function Lt() {
158
+ var N;
159
+ return N = g.pop() || b.lex() || Q, typeof N != "number" && (N instanceof Array && (g = N, N = g.pop()), N = d.symbols_[N] || N), N;
160
160
  }
161
- S(wt, "lex");
162
- for (var w, z, N, mt, Q = {}, dt, M, Ot, ft; ; ) {
163
- if (z = n[n.length - 1], this.defaultActions[z] ? N = this.defaultActions[z] : ((w === null || typeof w > "u") && (w = wt()), N = Y[z] && Y[z][w]), typeof N > "u" || !N.length || !N[0]) {
164
- var bt = "";
165
- ft = [];
166
- for (dt in Y[z])
167
- this.terminals_[dt] && dt > ut && ft.push("'" + this.terminals_[dt] + "'");
168
- D.showPosition ? bt = "Parse error on line " + (G + 1) + `:
169
- ` + D.showPosition() + `
170
- Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt = "Parse error on line " + (G + 1) + ": Unexpected " + (w == et ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(bt, {
171
- text: D.match,
172
- token: this.terminals_[w] || w,
173
- line: D.yylineno,
174
- loc: _t,
175
- expected: ft
161
+ f(Lt, "lex");
162
+ for (var A, W, R, _t, X = {}, ut, G, It, dt; ; ) {
163
+ if (W = r[r.length - 1], this.defaultActions[W] ? R = this.defaultActions[W] : ((A === null || typeof A > "u") && (A = Lt()), R = B[W] && B[W][A]), typeof R > "u" || !R.length || !R[0]) {
164
+ var mt = "";
165
+ dt = [];
166
+ for (ut in B[W])
167
+ this.terminals_[ut] && ut > ht && dt.push("'" + this.terminals_[ut] + "'");
168
+ b.showPosition ? mt = "Parse error on line " + (Y + 1) + `:
169
+ ` + b.showPosition() + `
170
+ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : mt = "Parse error on line " + (Y + 1) + ": Unexpected " + (A == Q ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(mt, {
171
+ text: b.match,
172
+ token: this.terminals_[A] || A,
173
+ line: b.yylineno,
174
+ loc: Et,
175
+ expected: dt
176
176
  });
177
177
  }
178
- if (N[0] instanceof Array && N.length > 1)
179
- throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + w);
180
- switch (N[0]) {
178
+ if (R[0] instanceof Array && R.length > 1)
179
+ throw new Error("Parse Error: multiple actions possible at state: " + W + ", token: " + A);
180
+ switch (R[0]) {
181
181
  case 1:
182
- n.push(w), _.push(D.yytext), r.push(D.yylloc), n.push(N[1]), w = null, q = D.yyleng, c = D.yytext, G = D.yylineno, _t = D.yylloc;
182
+ r.push(A), E.push(b.yytext), i.push(b.yylloc), r.push(R[1]), A = null, K = b.yyleng, l = b.yytext, Y = b.yylineno, Et = b.yylloc;
183
183
  break;
184
184
  case 2:
185
- if (M = this.productions_[N[1]][1], Q.$ = _[_.length - M], Q._$ = {
186
- first_line: r[r.length - (M || 1)].first_line,
187
- last_line: r[r.length - 1].last_line,
188
- first_column: r[r.length - (M || 1)].first_column,
189
- last_column: r[r.length - 1].last_column
190
- }, Zt && (Q._$.range = [
191
- r[r.length - (M || 1)].range[0],
192
- r[r.length - 1].range[1]
193
- ]), mt = this.performAction.apply(Q, [
194
- c,
195
- q,
196
- G,
197
- H.yy,
198
- N[1],
199
- _,
200
- r
201
- ].concat(Tt)), typeof mt < "u")
202
- return mt;
203
- M && (n = n.slice(0, -1 * M * 2), _ = _.slice(0, -1 * M), r = r.slice(0, -1 * M)), n.push(this.productions_[N[1]][0]), _.push(Q.$), r.push(Q._$), Ot = Y[n[n.length - 2]][n[n.length - 1]], n.push(Ot);
185
+ if (G = this.productions_[R[1]][1], X.$ = E[E.length - G], X._$ = {
186
+ first_line: i[i.length - (G || 1)].first_line,
187
+ last_line: i[i.length - 1].last_line,
188
+ first_column: i[i.length - (G || 1)].first_column,
189
+ last_column: i[i.length - 1].last_column
190
+ }, Qt && (X._$.range = [
191
+ i[i.length - (G || 1)].range[0],
192
+ i[i.length - 1].range[1]
193
+ ]), _t = this.performAction.apply(X, [
194
+ l,
195
+ K,
196
+ Y,
197
+ U.yy,
198
+ R[1],
199
+ E,
200
+ i
201
+ ].concat(gt)), typeof _t < "u")
202
+ return _t;
203
+ G && (r = r.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), i = i.slice(0, -1 * G)), r.push(this.productions_[R[1]][0]), E.push(X.$), i.push(X._$), It = B[r[r.length - 2]][r[r.length - 1]], r.push(It);
204
204
  break;
205
205
  case 3:
206
206
  return !0;
@@ -208,18 +208,18 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
208
208
  }
209
209
  return !0;
210
210
  }, "parse")
211
- }, Qt = /* @__PURE__ */ (function() {
212
- var U = {
211
+ }, qt = /* @__PURE__ */ (function() {
212
+ var V = {
213
213
  EOF: 1,
214
- parseError: /* @__PURE__ */ S(function(d, n) {
214
+ parseError: /* @__PURE__ */ f(function(d, r) {
215
215
  if (this.yy.parser)
216
- this.yy.parser.parseError(d, n);
216
+ this.yy.parser.parseError(d, r);
217
217
  else
218
218
  throw new Error(d);
219
219
  }, "parseError"),
220
220
  // resets the lexer, sets new input
221
- setInput: /* @__PURE__ */ S(function(l, d) {
222
- return this.yy = d || this.yy || {}, this._input = l, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
221
+ setInput: /* @__PURE__ */ f(function(a, d) {
222
+ return this.yy = d || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
223
223
  first_line: 1,
224
224
  first_column: 0,
225
225
  last_line: 1,
@@ -227,32 +227,32 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
227
227
  }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
228
228
  }, "setInput"),
229
229
  // consumes and returns one char from the input
230
- input: /* @__PURE__ */ S(function() {
231
- var l = this._input[0];
232
- this.yytext += l, this.yyleng++, this.offset++, this.match += l, this.matched += l;
233
- var d = l.match(/(?:\r\n?|\n).*/g);
234
- return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), l;
230
+ input: /* @__PURE__ */ f(function() {
231
+ var a = this._input[0];
232
+ this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
233
+ var d = a.match(/(?:\r\n?|\n).*/g);
234
+ return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), a;
235
235
  }, "input"),
236
236
  // unshifts one char (or a string) into the input
237
- unput: /* @__PURE__ */ S(function(l) {
238
- var d = l.length, n = l.split(/(?:\r\n?|\n)/g);
239
- this._input = l + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
237
+ unput: /* @__PURE__ */ f(function(a) {
238
+ var d = a.length, r = a.split(/(?:\r\n?|\n)/g);
239
+ this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
240
240
  var g = this.match.split(/(?:\r\n?|\n)/g);
241
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
242
- var _ = this.yylloc.range;
241
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), r.length - 1 && (this.yylineno -= r.length - 1);
242
+ var E = this.yylloc.range;
243
243
  return this.yylloc = {
244
244
  first_line: this.yylloc.first_line,
245
245
  last_line: this.yylineno + 1,
246
246
  first_column: this.yylloc.first_column,
247
- last_column: n ? (n.length === g.length ? this.yylloc.first_column : 0) + g[g.length - n.length].length - n[0].length : this.yylloc.first_column - d
248
- }, this.options.ranges && (this.yylloc.range = [_[0], _[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
247
+ last_column: r ? (r.length === g.length ? this.yylloc.first_column : 0) + g[g.length - r.length].length - r[0].length : this.yylloc.first_column - d
248
+ }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
249
249
  }, "unput"),
250
250
  // When called from action, caches matched text and appends it on next action
251
- more: /* @__PURE__ */ S(function() {
251
+ more: /* @__PURE__ */ f(function() {
252
252
  return this._more = !0, this;
253
253
  }, "more"),
254
254
  // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
255
- reject: /* @__PURE__ */ S(function() {
255
+ reject: /* @__PURE__ */ f(function() {
256
256
  if (this.options.backtrack_lexer)
257
257
  this._backtrack = !0;
258
258
  else
@@ -265,29 +265,29 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
265
265
  return this;
266
266
  }, "reject"),
267
267
  // retain first n characters of the match
268
- less: /* @__PURE__ */ S(function(l) {
269
- this.unput(this.match.slice(l));
268
+ less: /* @__PURE__ */ f(function(a) {
269
+ this.unput(this.match.slice(a));
270
270
  }, "less"),
271
271
  // displays already matched input, i.e. for error messages
272
- pastInput: /* @__PURE__ */ S(function() {
273
- var l = this.matched.substr(0, this.matched.length - this.match.length);
274
- return (l.length > 20 ? "..." : "") + l.substr(-20).replace(/\n/g, "");
272
+ pastInput: /* @__PURE__ */ f(function() {
273
+ var a = this.matched.substr(0, this.matched.length - this.match.length);
274
+ return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "");
275
275
  }, "pastInput"),
276
276
  // displays upcoming input, i.e. for error messages
277
- upcomingInput: /* @__PURE__ */ S(function() {
278
- var l = this.match;
279
- return l.length < 20 && (l += this._input.substr(0, 20 - l.length)), (l.substr(0, 20) + (l.length > 20 ? "..." : "")).replace(/\n/g, "");
277
+ upcomingInput: /* @__PURE__ */ f(function() {
278
+ var a = this.match;
279
+ return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "");
280
280
  }, "upcomingInput"),
281
281
  // displays the character position where the lexing error occurred, i.e. for error messages
282
- showPosition: /* @__PURE__ */ S(function() {
283
- var l = this.pastInput(), d = new Array(l.length + 1).join("-");
284
- return l + this.upcomingInput() + `
282
+ showPosition: /* @__PURE__ */ f(function() {
283
+ var a = this.pastInput(), d = new Array(a.length + 1).join("-");
284
+ return a + this.upcomingInput() + `
285
285
  ` + d + "^";
286
286
  }, "showPosition"),
287
287
  // test the lexed token: return FALSE when not a match, otherwise return token
288
- test_match: /* @__PURE__ */ S(function(l, d) {
289
- var n, g, _;
290
- if (this.options.backtrack_lexer && (_ = {
288
+ test_match: /* @__PURE__ */ f(function(a, d) {
289
+ var r, g, E;
290
+ if (this.options.backtrack_lexer && (E = {
291
291
  yylineno: this.yylineno,
292
292
  yylloc: {
293
293
  first_line: this.yylloc.first_line,
@@ -306,32 +306,32 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
306
306
  yy: this.yy,
307
307
  conditionStack: this.conditionStack.slice(0),
308
308
  done: this.done
309
- }, this.options.ranges && (_.yylloc.range = this.yylloc.range.slice(0))), g = l[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
309
+ }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), g = a[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
310
310
  first_line: this.yylloc.last_line,
311
311
  last_line: this.yylineno + 1,
312
312
  first_column: this.yylloc.last_column,
313
- last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + l[0].length
314
- }, this.yytext += l[0], this.match += l[0], this.matches = l, 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(l[0].length), this.matched += l[0], n = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
315
- return n;
313
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length
314
+ }, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[0], r = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), r)
315
+ return r;
316
316
  if (this._backtrack) {
317
- for (var r in _)
318
- this[r] = _[r];
317
+ for (var i in E)
318
+ this[i] = E[i];
319
319
  return !1;
320
320
  }
321
321
  return !1;
322
322
  }, "test_match"),
323
323
  // return next match in input
324
- next: /* @__PURE__ */ S(function() {
324
+ next: /* @__PURE__ */ f(function() {
325
325
  if (this.done)
326
326
  return this.EOF;
327
327
  this._input || (this.done = !0);
328
- var l, d, n, g;
328
+ var a, d, r, g;
329
329
  this._more || (this.yytext = "", this.match = "");
330
- for (var _ = this._currentRules(), r = 0; r < _.length; r++)
331
- if (n = this._input.match(this.rules[_[r]]), n && (!d || n[0].length > d[0].length)) {
332
- if (d = n, g = r, this.options.backtrack_lexer) {
333
- if (l = this.test_match(n, _[r]), l !== !1)
334
- return l;
330
+ for (var E = this._currentRules(), i = 0; i < E.length; i++)
331
+ if (r = this._input.match(this.rules[E[i]]), r && (!d || r[0].length > d[0].length)) {
332
+ if (d = r, g = i, this.options.backtrack_lexer) {
333
+ if (a = this.test_match(r, E[i]), a !== !1)
334
+ return a;
335
335
  if (this._backtrack) {
336
336
  d = !1;
337
337
  continue;
@@ -340,7 +340,7 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
340
340
  } else if (!this.options.flex)
341
341
  break;
342
342
  }
343
- return d ? (l = this.test_match(d, _[g]), l !== !1 ? l : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
343
+ return d ? (a = this.test_match(d, E[g]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
344
344
  ` + this.showPosition(), {
345
345
  text: "",
346
346
  token: null,
@@ -348,48 +348,48 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
348
348
  });
349
349
  }, "next"),
350
350
  // return next match that has a token
351
- lex: /* @__PURE__ */ S(function() {
351
+ lex: /* @__PURE__ */ f(function() {
352
352
  var d = this.next();
353
353
  return d || this.lex();
354
354
  }, "lex"),
355
355
  // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
356
- begin: /* @__PURE__ */ S(function(d) {
356
+ begin: /* @__PURE__ */ f(function(d) {
357
357
  this.conditionStack.push(d);
358
358
  }, "begin"),
359
359
  // pop the previously active lexer condition state off the condition stack
360
- popState: /* @__PURE__ */ S(function() {
360
+ popState: /* @__PURE__ */ f(function() {
361
361
  var d = this.conditionStack.length - 1;
362
362
  return d > 0 ? this.conditionStack.pop() : this.conditionStack[0];
363
363
  }, "popState"),
364
364
  // produce the lexer rule set which is active for the currently active lexer condition state
365
- _currentRules: /* @__PURE__ */ S(function() {
365
+ _currentRules: /* @__PURE__ */ f(function() {
366
366
  return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
367
367
  }, "_currentRules"),
368
368
  // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
369
- topState: /* @__PURE__ */ S(function(d) {
369
+ topState: /* @__PURE__ */ f(function(d) {
370
370
  return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
371
371
  }, "topState"),
372
372
  // alias for begin(condition)
373
- pushState: /* @__PURE__ */ S(function(d) {
373
+ pushState: /* @__PURE__ */ f(function(d) {
374
374
  this.begin(d);
375
375
  }, "pushState"),
376
376
  // return the number of states currently on the stack
377
- stateStackSize: /* @__PURE__ */ S(function() {
377
+ stateStackSize: /* @__PURE__ */ f(function() {
378
378
  return this.conditionStack.length;
379
379
  }, "stateStackSize"),
380
380
  options: { "case-insensitive": !0 },
381
- performAction: /* @__PURE__ */ S(function(d, n, g, _) {
382
- function r() {
383
- const Y = n.yytext.indexOf("%%");
384
- if (Y === 0)
381
+ performAction: /* @__PURE__ */ f(function(d, r, g, E) {
382
+ function i() {
383
+ const B = r.yytext.indexOf("%%");
384
+ if (B === 0)
385
385
  return !1;
386
- if (Y > 0) {
387
- const c = n.yytext.slice(0, Y), G = n.yytext.slice(Y);
388
- G && d.lexer.unput(G), n.yytext = c;
386
+ if (B > 0) {
387
+ const l = r.yytext.slice(0, B), Y = r.yytext.slice(B);
388
+ Y && d.lexer.unput(Y), r.yytext = l;
389
389
  }
390
390
  return !0;
391
391
  }
392
- switch (S(r, "processId"), g) {
392
+ switch (f(i, "processId"), g) {
393
393
  case 0:
394
394
  return 38;
395
395
  case 1:
@@ -470,17 +470,17 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
470
470
  this.pushState("STATE");
471
471
  break;
472
472
  case 37:
473
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
473
+ return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 25;
474
474
  case 38:
475
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
475
+ return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 26;
476
476
  case 39:
477
- return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
477
+ return this.popState(), r.yytext = r.yytext.slice(0, -10).trim(), 27;
478
478
  case 40:
479
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
479
+ return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 25;
480
480
  case 41:
481
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
481
+ return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 26;
482
482
  case 42:
483
- return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
483
+ return this.popState(), r.yytext = r.yytext.slice(0, -10).trim(), 27;
484
484
  case 43:
485
485
  return 51;
486
486
  case 44:
@@ -495,14 +495,14 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
495
495
  case 48:
496
496
  return this.pushState("STATE_ID"), "AS";
497
497
  case 49:
498
- return r() ? (this.popState(), "ID") : void 0;
498
+ return i() ? (this.popState(), "ID") : void 0;
499
499
  case 50:
500
500
  this.popState();
501
501
  break;
502
502
  case 51:
503
503
  return "STATE_DESCR";
504
504
  case 52:
505
- throw new Error('Error: State name must be a single word. Found: "' + n.yytext.trim() + '"');
505
+ throw new Error('Error: State name must be a single word. Found: "' + r.yytext.trim() + '"');
506
506
  case 53:
507
507
  return 19;
508
508
  case 54:
@@ -530,13 +530,13 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
530
530
  case 64:
531
531
  return "NOTE_TEXT";
532
532
  case 65:
533
- return r() ? (this.popState(), "ID") : void 0;
533
+ return i() ? (this.popState(), "ID") : void 0;
534
534
  case 66:
535
- return r() ? (this.popState(), this.pushState("NOTE_TEXT"), 24) : void 0;
535
+ return i() ? (this.popState(), this.pushState("NOTE_TEXT"), 24) : void 0;
536
536
  case 67:
537
- return this.popState(), n.yytext = n.yytext.substr(2).trim(), 31;
537
+ return this.popState(), r.yytext = r.yytext.substr(2).trim(), 31;
538
538
  case 68:
539
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 31;
539
+ return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 31;
540
540
  case 69:
541
541
  return 6;
542
542
  case 70:
@@ -546,9 +546,9 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
546
546
  case 72:
547
547
  return 57;
548
548
  case 73:
549
- return r() ? 24 : void 0;
549
+ return i() ? 24 : void 0;
550
550
  case 74:
551
- return n.yytext = n.yytext.trim(), 14;
551
+ return r.yytext = r.yytext.trim(), 14;
552
552
  case 75:
553
553
  return 15;
554
554
  case 76:
@@ -564,172 +564,168 @@ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : bt =
564
564
  rules: [/^(?:click\b)/i, /^(?:href\b)/i, /^(?:"[^"]*")/i, /^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:style\s+)/i, /^(?:[\w,]+\s+)/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\w+\s+\w+.*?\{)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?\n\s*end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
565
565
  conditions: { LINE: { rules: [10, 11, 12], inclusive: !1 }, struct: { rules: [10, 11, 12, 23, 27, 30, 36, 43, 44, 45, 46, 56, 57, 58, 72, 73, 74, 75, 76, 77], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [65], inclusive: !1 }, FLOATING_NOTE: { rules: [62, 63, 64], inclusive: !1 }, NOTE_TEXT: { rules: [67, 68], inclusive: !1 }, NOTE_ID: { rules: [66], inclusive: !1 }, NOTE: { rules: [59, 60, 61], inclusive: !1 }, STYLEDEF_STYLEOPTS: { rules: [], inclusive: !1 }, STYLEDEF_STYLES: { rules: [32], inclusive: !1 }, STYLE_IDS: { rules: [], inclusive: !1 }, STYLE: { rules: [31], inclusive: !1 }, CLASS_STYLE: { rules: [29], inclusive: !1 }, CLASS: { rules: [28], inclusive: !1 }, CLASSDEFID: { rules: [26], inclusive: !1 }, CLASSDEF: { rules: [24, 25], inclusive: !1 }, acc_descr_multiline: { rules: [21, 22], inclusive: !1 }, acc_descr: { rules: [19], inclusive: !1 }, acc_title: { rules: [17], inclusive: !1 }, SCALE: { rules: [14, 15, 34, 35], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [49], inclusive: !1 }, STATE_STRING: { rules: [50, 51], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [10, 11, 12, 37, 38, 39, 40, 41, 42, 47, 48, 52, 53, 54, 55], inclusive: !1 }, ID: { rules: [10, 11, 12], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 16, 18, 20, 23, 27, 30, 33, 36, 55, 58, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79], inclusive: !0 } }
566
566
  };
567
- return U;
567
+ return V;
568
568
  })();
569
- gt.lexer = Qt;
570
- function ht() {
569
+ yt.lexer = qt;
570
+ function ct() {
571
571
  this.yy = {};
572
572
  }
573
- return S(ht, "Parser"), ht.prototype = gt, gt.Parser = ht, new ht();
573
+ return f(ct, "Parser"), ct.prototype = yt, yt.Parser = ct, new ct();
574
574
  })();
575
- Ct.parser = Ct;
576
- var We = Ct, Se = "TB", Yt = "TB", Rt = "dir", tt = "state", Z = "root", At = "relation", ye = "classDef", ge = "style", Te = "applyClass", rt = "default", Gt = "divider", Vt = "fill:none", Mt = "fill: #333", Ut = "c", Wt = "markdown", jt = "normal", kt = "rect", vt = "rectWithTitle", Ee = "stateStart", _e = "stateEnd", It = "divider", Nt = "roundedWithTitle", me = "note", be = "noteGroup", at = "statediagram", De = "state", ke = `${at}-${De}`, Ht = "transition", ve = "note", Ce = "note-edge", Ae = `${Ht} ${Ce}`, xe = `${at}-${ve}`, Le = "cluster", we = `${at}-${Le}`, Oe = "cluster-alt", Re = `${at}-${Oe}`, zt = "parent", Kt = "note", Ie = "state", xt = "----", Ne = `${xt}${Kt}`, $t = `${xt}${zt}`, Xt = /* @__PURE__ */ S((t, e = Yt) => {
575
+ vt.parser = vt;
576
+ var Ue = vt, pe = "TB", Bt = "TB", wt = "dir", q = "state", J = "root", Ct = "relation", Se = "classDef", ye = "style", ge = "applyClass", et = "default", Yt = "divider", Gt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "markdown", Wt = "normal", kt = "rect", Dt = "rectWithTitle", Te = "stateStart", Ee = "stateEnd", Nt = "divider", Ot = "roundedWithTitle", _e = "note", me = "noteGroup", st = "statediagram", be = "state", ke = `${st}-${be}`, jt = "transition", De = "note", ve = "note-edge", Ce = `${jt} ${ve}`, Ae = `${st}-${De}`, xe = "cluster", Le = `${st}-${xe}`, Ie = "cluster-alt", we = `${st}-${Ie}`, Ht = "parent", zt = "note", Ne = "state", At = "----", Oe = `${At}${zt}`, Rt = `${At}${Ht}`, Kt = /* @__PURE__ */ f((t, e = Bt) => {
577
577
  if (!t.doc)
578
578
  return e;
579
- let s = e;
580
- for (const a of t.doc)
581
- a.stmt === "dir" && (s = a.value);
582
- return s;
583
- }, "getDir"), $e = /* @__PURE__ */ S(function(t, e) {
579
+ let o = e;
580
+ for (const s of t.doc)
581
+ s.stmt === "dir" && (o = s.value);
582
+ return o;
583
+ }, "getDir"), Re = /* @__PURE__ */ f(function(t, e) {
584
584
  return e.db.getClasses();
585
- }, "getClasses"), Fe = /* @__PURE__ */ S(async function(t, e, s, a) {
586
- b.info("REF0:"), b.info("Drawing state diagram (v2)", e);
587
- const { securityLevel: i, state: o, layout: h } = F();
588
- a.db.extract(a.db.getRootDocV2());
589
- const p = a.db.getData(), f = ee(e, i);
590
- p.type = a.type, p.layoutAlgorithm = h, p.nodeSpacing = (o == null ? void 0 : o.nodeSpacing) || 50, p.rankSpacing = (o == null ? void 0 : o.rankSpacing) || 50, F().look === "neo" ? p.markers = ["barbNeo"] : p.markers = ["barb"], p.diagramId = e, await ie(p, f);
591
- const E = 8;
585
+ }, "getClasses"), $e = /* @__PURE__ */ f(async function(t, e, o, s) {
586
+ _.info("REF0:"), _.info("Drawing state diagram (v2)", e);
587
+ const { securityLevel: c, state: h, layout: p } = $();
588
+ s.db.extract(s.db.getRootDocV2());
589
+ const y = s.db.getData(), n = te(e, c);
590
+ y.type = s.type, y.layoutAlgorithm = p, y.nodeSpacing = h?.nodeSpacing || 50, y.rankSpacing = h?.rankSpacing || 50, $().look === "neo" ? y.markers = ["barbNeo"] : y.markers = ["barb"], y.diagramId = e, await se(y, n);
591
+ const m = 8;
592
592
  try {
593
- (typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((O, C) => {
594
- var P;
595
- const x = typeof C == "string" ? C : typeof (C == null ? void 0 : C.id) == "string" ? C.id : "", $ = p.nodes.find((v) => v.id === x);
596
- if (!x) {
597
- b.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(C));
593
+ (typeof s.db.getLinks == "function" ? s.db.getLinks() : /* @__PURE__ */ new Map()).forEach((x, k) => {
594
+ const u = typeof k == "string" ? k : typeof k?.id == "string" ? k.id : "", L = y.nodes.find((w) => w.id === u);
595
+ if (!u) {
596
+ _.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(k));
598
597
  return;
599
598
  }
600
- const R = (P = f.node()) == null ? void 0 : P.querySelectorAll("g.node, g.rough-node");
601
- let u;
602
- if (R == null || R.forEach((v) => {
603
- var j;
604
- const B = (j = v.textContent) == null ? void 0 : j.trim();
605
- (v.id === ($ == null ? void 0 : $.domId) || B === x) && (u = v);
606
- }), !u) {
607
- b.warn("⚠️ Could not find node matching text:", x);
599
+ const I = n.node()?.querySelectorAll("g.node, g.rough-node");
600
+ let v;
601
+ if (I?.forEach((w) => {
602
+ const H = w.textContent?.trim();
603
+ (w.id === L?.domId || H === u) && (v = w);
604
+ }), !v) {
605
+ _.warn("⚠️ Could not find node matching text:", u);
608
606
  return;
609
607
  }
610
- const L = u.parentNode;
611
- if (!L) {
612
- b.warn("⚠️ Node has no parent, cannot wrap:", x);
608
+ const F = v.parentNode;
609
+ if (!F) {
610
+ _.warn("⚠️ Node has no parent, cannot wrap:", u);
613
611
  return;
614
612
  }
615
- const k = document.createElementNS("http://www.w3.org/2000/svg", "a"), V = O.url.replace(/^"+|"+$/g, "");
616
- if (k.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", V), k.setAttribute("target", "_blank"), O.tooltip) {
617
- const v = O.tooltip.replace(/^"+|"+$/g, "");
618
- k.setAttribute("title", v), u.setAttribute("title", v);
613
+ const C = document.createElementNS("http://www.w3.org/2000/svg", "a"), P = x.url.replace(/^"+|"+$/g, "");
614
+ if (C.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", P), C.setAttribute("target", "_blank"), x.tooltip) {
615
+ const w = x.tooltip.replace(/^"+|"+$/g, "");
616
+ C.setAttribute("title", w), v.setAttribute("title", w);
619
617
  }
620
- L.replaceChild(k, u), k.appendChild(u), b.info("🔗 Wrapped node in <a> tag for:", x, O.url);
618
+ F.replaceChild(C, v), C.appendChild(v), _.info("🔗 Wrapped node in <a> tag for:", u, x.url);
621
619
  });
622
- } catch (m) {
623
- b.error("❌ Error injecting clickable links:", m);
620
+ } catch (O) {
621
+ _.error("❌ Error injecting clickable links:", O);
624
622
  }
625
- re.insertTitle(
626
- f,
623
+ ie.insertTitle(
624
+ n,
627
625
  "statediagramTitleText",
628
- (o == null ? void 0 : o.titleTopMargin) ?? 25,
629
- a.db.getDiagramTitle()
630
- ), se(f, E, at, (o == null ? void 0 : o.useMaxWidth) ?? !0);
631
- }, "draw"), je = {
632
- getClasses: $e,
633
- draw: Fe,
634
- getDir: Xt
635
- }, St = /* @__PURE__ */ new Map(), W = 0;
636
- function yt(t = "", e = 0, s = "", a = xt) {
637
- const i = s !== null && s.length > 0 ? `${a}${s}` : "";
638
- return `${Ie}-${t}${i}-${e}`;
626
+ h?.titleTopMargin ?? 25,
627
+ s.db.getDiagramTitle()
628
+ ), ee(n, m, st, h?.useMaxWidth ?? !0);
629
+ }, "draw"), We = {
630
+ getClasses: Re,
631
+ draw: $e,
632
+ getDir: Kt
633
+ }, pt = /* @__PURE__ */ new Map(), M = 0;
634
+ function St(t = "", e = 0, o = "", s = At) {
635
+ const c = o !== null && o.length > 0 ? `${s}${o}` : "";
636
+ return `${Ne}-${t}${c}-${e}`;
639
637
  }
640
- S(yt, "stateDomId");
641
- var Pe = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
642
- b.trace("items", e), e.forEach((f) => {
643
- switch (f.stmt) {
644
- case tt:
645
- it(t, f, s, a, i, o, h, p);
638
+ f(St, "stateDomId");
639
+ var Fe = /* @__PURE__ */ f((t, e, o, s, c, h, p, y) => {
640
+ _.trace("items", e), e.forEach((n) => {
641
+ switch (n.stmt) {
642
+ case q:
643
+ tt(t, n, o, s, c, h, p, y);
646
644
  break;
647
- case rt:
648
- it(t, f, s, a, i, o, h, p);
645
+ case et:
646
+ tt(t, n, o, s, c, h, p, y);
649
647
  break;
650
- case At:
648
+ case Ct:
651
649
  {
652
- it(
650
+ tt(
653
651
  t,
654
- f.state1,
655
- s,
656
- a,
657
- i,
652
+ n.state1,
658
653
  o,
654
+ s,
655
+ c,
659
656
  h,
660
- p
661
- ), it(
657
+ p,
658
+ y
659
+ ), tt(
662
660
  t,
663
- f.state2,
664
- s,
665
- a,
666
- i,
661
+ n.state2,
667
662
  o,
663
+ s,
664
+ c,
668
665
  h,
669
- p
666
+ p,
667
+ y
670
668
  );
671
- const T = h === "neo", E = {
672
- id: "edge" + W,
673
- start: f.state1.id,
674
- end: f.state2.id,
669
+ const T = p === "neo", m = {
670
+ id: "edge" + M,
671
+ start: n.state1.id,
672
+ end: n.state2.id,
675
673
  arrowhead: "normal",
676
674
  arrowTypeEnd: T ? "arrow_barb_neo" : "arrow_barb",
677
- style: Vt,
675
+ style: Gt,
678
676
  labelStyle: "",
679
- label: K.sanitizeText(f.description ?? "", F()),
680
- arrowheadStyle: Mt,
681
- labelpos: Ut,
682
- labelType: Wt,
683
- thickness: jt,
684
- classes: Ht,
685
- look: h
677
+ label: j.sanitizeText(n.description ?? "", $()),
678
+ arrowheadStyle: Vt,
679
+ labelpos: Mt,
680
+ labelType: Ut,
681
+ thickness: Wt,
682
+ classes: jt,
683
+ look: p
686
684
  };
687
- i.push(E), W++;
685
+ c.push(m), M++;
688
686
  }
689
687
  break;
690
688
  }
691
689
  });
692
- }, "setupDoc"), Ft = /* @__PURE__ */ S((t, e = Yt) => {
693
- let s = e;
690
+ }, "setupDoc"), $t = /* @__PURE__ */ f((t, e = Bt) => {
691
+ let o = e;
694
692
  if (t.doc)
695
- for (const a of t.doc)
696
- a.stmt === "dir" && (s = a.value);
697
- return s;
693
+ for (const s of t.doc)
694
+ s.stmt === "dir" && (o = s.value);
695
+ return o;
698
696
  }, "getDir");
699
- function st(t, e, s) {
697
+ function Z(t, e, o) {
700
698
  if (!e.id || e.id === "</join></fork>" || e.id === "</choice>")
701
699
  return;
702
- e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((i) => {
703
- const o = s.get(i);
704
- o && (e.cssCompiledStyles = [...e.cssCompiledStyles ?? [], ...o.styles]);
700
+ e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((c) => {
701
+ const h = o.get(c);
702
+ h && (e.cssCompiledStyles = [...e.cssCompiledStyles ?? [], ...h.styles]);
705
703
  }));
706
- const a = t.find((i) => i.id === e.id);
707
- a ? Object.assign(a, e) : t.push(e);
704
+ const s = t.find((c) => c.id === e.id);
705
+ s ? Object.assign(s, e) : t.push(e);
708
706
  }
709
- S(st, "insertOrUpdateNode");
710
- function Jt(t) {
711
- var e;
712
- return ((e = t == null ? void 0 : t.classes) == null ? void 0 : e.join(" ")) ?? "";
707
+ f(Z, "insertOrUpdateNode");
708
+ function Xt(t) {
709
+ return t?.classes?.join(" ") ?? "";
713
710
  }
714
- S(Jt, "getClassesFromDbInfo");
715
- function qt(t) {
716
- return (t == null ? void 0 : t.styles) ?? [];
711
+ f(Xt, "getClassesFromDbInfo");
712
+ function Jt(t) {
713
+ return t?.styles ?? [];
717
714
  }
718
- S(qt, "getStylesFromDbInfo");
719
- var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
720
- var C, x, $;
721
- const f = e.id, T = s.get(f), E = Jt(T), m = qt(T), O = F();
722
- if (b.info("dataFetcher parsedItem", e, T, m), f !== "root") {
723
- let R = kt;
724
- e.start === !0 ? R = Ee : e.start === !1 && (R = _e), e.type !== rt && (R = e.type), St.get(f) || St.set(f, {
725
- id: f,
726
- shape: R,
727
- description: K.sanitizeText(f, O),
728
- cssClasses: `${E} ${ke}`,
729
- cssStyles: m
715
+ f(Jt, "getStylesFromDbInfo");
716
+ var tt = /* @__PURE__ */ f((t, e, o, s, c, h, p, y) => {
717
+ const n = e.id, T = o.get(n), m = Xt(T), O = Jt(T), x = $();
718
+ if (_.info("dataFetcher parsedItem", e, T, O), n !== "root") {
719
+ let k = kt;
720
+ e.start === !0 ? k = Te : e.start === !1 && (k = Ee), e.type !== et && (k = e.type), pt.get(n) || pt.set(n, {
721
+ id: n,
722
+ shape: k,
723
+ description: j.sanitizeText(n, x),
724
+ cssClasses: `${m} ${ke}`,
725
+ cssStyles: O
730
726
  });
731
- const u = St.get(f);
732
- e.description && (Array.isArray(u.description) ? (u.shape = vt, u.description.push(e.description)) : (C = u.description) != null && C.length && u.description.length > 0 ? (u.shape = vt, u.description === f ? u.description = [e.description] : u.description = [u.description, e.description]) : (u.shape = kt, u.description = e.description), u.description = K.sanitizeTextOrArray(u.description, O)), ((x = u.description) == null ? void 0 : x.length) === 1 && u.shape === vt && (u.type === "group" ? u.shape = Nt : u.shape = kt), !u.type && e.doc && (b.info("Setting cluster for XCX", f, Ft(e)), u.type = "group", u.isGroup = !0, u.dir = Ft(e), u.explicitDir = e.doc.some((k) => k.stmt === "dir"), u.shape = e.type === Gt ? It : Nt, u.cssClasses = `${u.cssClasses} ${we} ${o ? Re : ""}`);
727
+ const u = pt.get(n);
728
+ e.description && (Array.isArray(u.description) ? (u.shape = Dt, u.description.push(e.description)) : u.description?.length && u.description.length > 0 ? (u.shape = Dt, u.description === n ? u.description = [e.description] : u.description = [u.description, e.description]) : (u.shape = kt, u.description = e.description), u.description = j.sanitizeTextOrArray(u.description, x)), u.description?.length === 1 && u.shape === Dt && (u.type === "group" ? u.shape = Ot : u.shape = kt), !u.type && e.doc && (_.info("Setting cluster for XCX", n, $t(e)), u.type = "group", u.isGroup = !0, u.dir = $t(e), u.explicitDir = e.doc.some((I) => I.stmt === "dir"), u.shape = e.type === Yt ? Nt : Ot, u.cssClasses = `${u.cssClasses} ${Le} ${h ? we : ""}`);
733
729
  const L = {
734
730
  labelStyle: "",
735
731
  shape: u.shape,
@@ -737,73 +733,73 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
737
733
  cssClasses: u.cssClasses,
738
734
  cssCompiledStyles: [],
739
735
  cssStyles: u.cssStyles,
740
- id: f,
736
+ id: n,
741
737
  dir: u.dir,
742
- domId: yt(f, W),
738
+ domId: St(n, M),
743
739
  type: u.type,
744
740
  isGroup: u.type === "group",
745
741
  padding: 8,
746
742
  rx: 10,
747
743
  ry: 10,
748
- look: h,
744
+ look: p,
749
745
  labelType: "markdown"
750
746
  };
751
- if (L.shape === It && (L.label = ""), t && t.id !== "root" && (b.trace("Setting node ", f, " to be child of its parent ", t.id), L.parentId = t.id), L.centerLabel = !0, e.note) {
752
- const k = {
747
+ if (L.shape === Nt && (L.label = ""), t && t.id !== "root" && (_.trace("Setting node ", n, " to be child of its parent ", t.id), L.parentId = t.id), L.centerLabel = !0, e.note) {
748
+ const I = {
753
749
  labelStyle: "",
754
- shape: me,
750
+ shape: _e,
755
751
  label: e.note.text,
756
752
  labelType: "markdown",
757
- cssClasses: xe,
753
+ cssClasses: Ae,
758
754
  // useHtmlLabels: false,
759
755
  cssStyles: [],
760
756
  cssCompiledStyles: [],
761
- id: f + Ne + "-" + W,
762
- domId: yt(f, W, Kt),
757
+ id: n + Oe + "-" + M,
758
+ domId: St(n, M, zt),
763
759
  type: u.type,
764
760
  isGroup: u.type === "group",
765
- padding: ($ = O.flowchart) == null ? void 0 : $.padding,
766
- look: h,
761
+ padding: x.flowchart?.padding,
762
+ look: p,
767
763
  position: e.note.position
768
- }, V = f + $t, P = {
764
+ }, v = n + Rt, F = {
769
765
  labelStyle: "",
770
- shape: be,
766
+ shape: me,
771
767
  label: e.note.text,
772
768
  cssClasses: u.cssClasses,
773
769
  cssStyles: [],
774
- id: f + $t,
775
- domId: yt(f, W, zt),
770
+ id: n + Rt,
771
+ domId: St(n, M, Ht),
776
772
  type: "group",
777
773
  isGroup: !0,
778
774
  padding: 16,
779
775
  //getConfig().flowchart.padding
780
- look: h,
776
+ look: p,
781
777
  position: e.note.position
782
778
  };
783
- W++, P.id = V, k.parentId = V, st(a, P, p), st(a, k, p), st(a, L, p);
784
- let v = f, B = k.id;
785
- e.note.position === "left of" && (v = k.id, B = f), i.push({
786
- id: v + "-" + B,
787
- start: v,
788
- end: B,
779
+ M++, F.id = v, I.parentId = v, Z(s, F, y), Z(s, I, y), Z(s, L, y);
780
+ let C = n, P = I.id;
781
+ e.note.position === "left of" && (C = I.id, P = n), c.push({
782
+ id: C + "-" + P,
783
+ start: C,
784
+ end: P,
789
785
  arrowhead: "none",
790
786
  arrowTypeEnd: "",
791
- style: Vt,
787
+ style: Gt,
792
788
  labelStyle: "",
793
- classes: Ae,
794
- arrowheadStyle: Mt,
795
- labelpos: Ut,
796
- labelType: Wt,
797
- thickness: jt,
798
- look: h
789
+ classes: Ce,
790
+ arrowheadStyle: Vt,
791
+ labelpos: Mt,
792
+ labelType: Ut,
793
+ thickness: Wt,
794
+ look: p
799
795
  });
800
796
  } else
801
- st(a, L, p);
797
+ Z(s, L, y);
802
798
  }
803
- e.doc && (b.trace("Adding nodes children "), Pe(e, e.doc, s, a, i, !o, h, p));
804
- }, "dataFetcher"), Be = /* @__PURE__ */ S(() => {
805
- St.clear(), W = 0;
806
- }, "reset"), A = {
799
+ e.doc && (_.trace("Adding nodes children "), Fe(e, e.doc, o, s, c, !h, p, y));
800
+ }, "dataFetcher"), Pe = /* @__PURE__ */ f(() => {
801
+ pt.clear(), M = 0;
802
+ }, "reset"), D = {
807
803
  START_NODE: "[*]",
808
804
  START_TYPE: "start",
809
805
  END_NODE: "[*]",
@@ -812,13 +808,24 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
812
808
  FILL_KEYWORD: "fill",
813
809
  BG_FILL: "bgFill",
814
810
  STYLECLASS_SEP: ","
815
- }, Pt = /* @__PURE__ */ S(() => /* @__PURE__ */ new Map(), "newClassesList"), Bt = /* @__PURE__ */ S(() => ({
811
+ }, Ft = /* @__PURE__ */ f(() => /* @__PURE__ */ new Map(), "newClassesList"), Pt = /* @__PURE__ */ f(() => ({
816
812
  relations: [],
817
813
  states: /* @__PURE__ */ new Map(),
818
814
  documents: {}
819
- }), "newDoc"), pt = /* @__PURE__ */ S((t) => JSON.parse(JSON.stringify(t)), "clone"), X, He = (X = class {
820
- constructor(e) {
821
- this.version = e, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Pt(), this.documents = { root: Bt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.funs = [], this.getAccTitle = ae, this.setAccTitle = ne, this.getAccDescription = oe, this.setAccDescription = le, this.setDiagramTitle = ce, this.getDiagramTitle = he, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this), this.bindFunctions = this.bindFunctions.bind(this);
815
+ }), "newDoc"), ft = /* @__PURE__ */ f((t) => JSON.parse(JSON.stringify(t)), "clone"), je = class {
816
+ constructor(t) {
817
+ this.version = t, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Ft(), this.documents = { root: Pt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.funs = [], this.getAccTitle = re, this.setAccTitle = ae, this.getAccDescription = ne, this.setAccDescription = oe, this.setDiagramTitle = le, this.getDiagramTitle = ce, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this), this.bindFunctions = this.bindFunctions.bind(this);
818
+ }
819
+ static {
820
+ f(this, "StateDB");
821
+ }
822
+ static {
823
+ this.relationType = {
824
+ AGGREGATION: 0,
825
+ EXTENSION: 1,
826
+ COMPOSITION: 2,
827
+ DEPENDENCY: 3
828
+ };
822
829
  }
823
830
  /**
824
831
  * Convert all of the statements (stmts) that were parsed into states and relationships.
@@ -829,98 +836,95 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
829
836
  * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
830
837
  * This will push the statement into the list of statements for the current document.
831
838
  */
832
- extract(e) {
839
+ extract(t) {
833
840
  this.clear(!0);
834
- for (const i of Array.isArray(e) ? e : e.doc)
835
- switch (i.stmt) {
836
- case tt:
837
- this.addState(i.id.trim(), i.type, i.doc, i.description, i.note);
841
+ for (const s of Array.isArray(t) ? t : t.doc)
842
+ switch (s.stmt) {
843
+ case q:
844
+ this.addState(s.id.trim(), s.type, s.doc, s.description, s.note);
838
845
  break;
839
- case At:
840
- this.addRelation(i.state1, i.state2, i.description);
846
+ case Ct:
847
+ this.addRelation(s.state1, s.state2, s.description);
848
+ break;
849
+ case Se:
850
+ this.addStyleClass(s.id.trim(), s.classes);
841
851
  break;
842
852
  case ye:
843
- this.addStyleClass(i.id.trim(), i.classes);
853
+ this.handleStyleDef(s);
844
854
  break;
845
855
  case ge:
846
- this.handleStyleDef(i);
847
- break;
848
- case Te:
849
- this.setCssClass(i.id.trim(), i.styleClass);
856
+ this.setCssClass(s.id.trim(), s.styleClass);
850
857
  break;
851
858
  case "click":
852
- this.addLink(i.id, i.url, i.tooltip);
859
+ this.addLink(s.id, s.url, s.tooltip);
853
860
  break;
854
861
  }
855
- const s = this.getStates(), a = F();
856
- Be(), it(
862
+ const e = this.getStates(), o = $();
863
+ Pe(), tt(
857
864
  void 0,
858
865
  this.getRootDocV2(),
859
- s,
866
+ e,
860
867
  this.nodes,
861
868
  this.edges,
862
869
  !0,
863
- a.look,
870
+ o.look,
864
871
  this.classes
865
872
  );
866
- for (const i of this.nodes)
867
- if (Array.isArray(i.label)) {
868
- if (i.description = i.label.slice(1), i.isGroup && i.description.length > 0)
873
+ for (const s of this.nodes)
874
+ if (Array.isArray(s.label)) {
875
+ if (s.description = s.label.slice(1), s.isGroup && s.description.length > 0)
869
876
  throw new Error(
870
- `Group nodes can only have label. Remove the additional description for node [${i.id}]`
877
+ `Group nodes can only have label. Remove the additional description for node [${s.id}]`
871
878
  );
872
- i.label = i.label[0];
879
+ s.label = s.label[0];
873
880
  }
874
881
  }
875
- handleStyleDef(e) {
876
- const s = e.id.trim().split(","), a = e.styleClass.split(",");
877
- for (const i of s) {
878
- let o = this.getState(i);
879
- if (!o) {
880
- const h = i.trim();
881
- this.addState(h), o = this.getState(h);
882
+ handleStyleDef(t) {
883
+ const e = t.id.trim().split(","), o = t.styleClass.split(",");
884
+ for (const s of e) {
885
+ let c = this.getState(s);
886
+ if (!c) {
887
+ const h = s.trim();
888
+ this.addState(h), c = this.getState(h);
882
889
  }
883
- o && (o.styles = a.map((h) => {
884
- var p;
885
- return (p = h.replace(/;/g, "")) == null ? void 0 : p.trim();
886
- }));
890
+ c && (c.styles = o.map((h) => h.replace(/;/g, "")?.trim()));
887
891
  }
888
892
  }
889
- setRootDoc(e) {
890
- b.info("Setting root doc", e), this.rootDoc = e, this.version === 1 ? this.extract(e) : this.extract(this.getRootDocV2());
893
+ setRootDoc(t) {
894
+ _.info("Setting root doc", t), this.rootDoc = t, this.version === 1 ? this.extract(t) : this.extract(this.getRootDocV2());
891
895
  }
892
- docTranslator(e, s, a) {
893
- if (s.stmt === At) {
894
- this.docTranslator(e, s.state1, !0), this.docTranslator(e, s.state2, !1);
896
+ docTranslator(t, e, o) {
897
+ if (e.stmt === Ct) {
898
+ this.docTranslator(t, e.state1, !0), this.docTranslator(t, e.state2, !1);
895
899
  return;
896
900
  }
897
- if (s.stmt === tt && (s.id === A.START_NODE ? (s.id = e.id + (a ? "_start" : "_end"), s.start = a) : s.id = s.id.trim()), s.stmt !== Z && s.stmt !== tt || !s.doc)
901
+ if (e.stmt === q && (e.id === D.START_NODE ? (e.id = t.id + (o ? "_start" : "_end"), e.start = o) : e.id = e.id.trim()), e.stmt !== J && e.stmt !== q || !e.doc)
898
902
  return;
899
- const i = [];
900
- let o = [];
901
- for (const h of s.doc)
902
- if (h.type === Gt) {
903
- const p = pt(h);
904
- p.doc = pt(o), i.push(p), o = [];
903
+ const s = [];
904
+ let c = [];
905
+ for (const h of e.doc)
906
+ if (h.type === Yt) {
907
+ const p = ft(h);
908
+ p.doc = ft(c), s.push(p), c = [];
905
909
  } else
906
- o.push(h);
907
- if (i.length > 0 && o.length > 0) {
910
+ c.push(h);
911
+ if (s.length > 0 && c.length > 0) {
908
912
  const h = {
909
- stmt: tt,
910
- id: ue(),
913
+ stmt: q,
914
+ id: he(),
911
915
  type: "divider",
912
- doc: pt(o)
916
+ doc: ft(c)
913
917
  };
914
- i.push(pt(h)), s.doc = i;
918
+ s.push(ft(h)), e.doc = s;
915
919
  }
916
- s.doc.forEach((h) => this.docTranslator(s, h, !0));
920
+ e.doc.forEach((h) => this.docTranslator(e, h, !0));
917
921
  }
918
922
  getRootDocV2() {
919
923
  return this.docTranslator(
920
- { id: Z, stmt: Z },
921
- { id: Z, stmt: Z, doc: this.rootDoc },
924
+ { id: J, stmt: J },
925
+ { id: J, stmt: J, doc: this.rootDoc },
922
926
  !0
923
- ), { id: Z, doc: this.rootDoc };
927
+ ), { id: J, doc: this.rootDoc };
924
928
  }
925
929
  /**
926
930
  * Function called by parser when a node definition has been found.
@@ -930,45 +934,45 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
930
934
  * @param styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.
931
935
  * @param textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.
932
936
  */
933
- addState(e, s = rt, a = void 0, i = void 0, o = void 0, h = void 0, p = void 0, f = void 0) {
934
- const T = e == null ? void 0 : e.trim();
935
- if (!this.currentDocument.states.has(T))
936
- b.info("Adding state ", T, i), this.currentDocument.states.set(T, {
937
- stmt: tt,
938
- id: T,
937
+ addState(t, e = et, o = void 0, s = void 0, c = void 0, h = void 0, p = void 0, y = void 0) {
938
+ const n = t?.trim();
939
+ if (!this.currentDocument.states.has(n))
940
+ _.info("Adding state ", n, s), this.currentDocument.states.set(n, {
941
+ stmt: q,
942
+ id: n,
939
943
  descriptions: [],
940
- type: s,
941
- doc: a,
942
- note: o,
944
+ type: e,
945
+ doc: o,
946
+ note: c,
943
947
  classes: [],
944
948
  styles: [],
945
949
  textStyles: []
946
950
  });
947
951
  else {
948
- const E = this.currentDocument.states.get(T);
949
- if (!E)
950
- throw new Error(`State not found: ${T}`);
951
- E.doc || (E.doc = a), E.type || (E.type = s);
952
+ const T = this.currentDocument.states.get(n);
953
+ if (!T)
954
+ throw new Error(`State not found: ${n}`);
955
+ T.doc || (T.doc = o), T.type || (T.type = e);
952
956
  }
953
- if (i && (b.info("Setting state description", T, i), (Array.isArray(i) ? i : [i]).forEach((m) => this.addDescription(T, m.trim()))), o) {
954
- const E = this.currentDocument.states.get(T);
955
- if (!E)
956
- throw new Error(`State not found: ${T}`);
957
- E.note = o, E.note.text = K.sanitizeText(E.note.text, F());
957
+ if (s && (_.info("Setting state description", n, s), (Array.isArray(s) ? s : [s]).forEach((m) => this.addDescription(n, m.trim()))), c) {
958
+ const T = this.currentDocument.states.get(n);
959
+ if (!T)
960
+ throw new Error(`State not found: ${n}`);
961
+ T.note = c, T.note.text = j.sanitizeText(T.note.text, $());
958
962
  }
959
- h && (b.info("Setting state classes", T, h), (Array.isArray(h) ? h : [h]).forEach((m) => this.setCssClass(T, m.trim()))), p && (b.info("Setting state styles", T, p), (Array.isArray(p) ? p : [p]).forEach((m) => this.setStyle(T, m.trim()))), f && (b.info("Setting state styles", T, p), (Array.isArray(f) ? f : [f]).forEach((m) => this.setTextStyle(T, m.trim())));
963
+ h && (_.info("Setting state classes", n, h), (Array.isArray(h) ? h : [h]).forEach((m) => this.setCssClass(n, m.trim()))), p && (_.info("Setting state styles", n, p), (Array.isArray(p) ? p : [p]).forEach((m) => this.setStyle(n, m.trim()))), y && (_.info("Setting state styles", n, p), (Array.isArray(y) ? y : [y]).forEach((m) => this.setTextStyle(n, m.trim())));
960
964
  }
961
- clear(e) {
962
- this.nodes = [], this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.documents = { root: Bt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(), e || (this.links = /* @__PURE__ */ new Map(), de());
965
+ clear(t) {
966
+ this.nodes = [], this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.documents = { root: Pt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Ft(), t || (this.links = /* @__PURE__ */ new Map(), ue());
963
967
  }
964
- getState(e) {
965
- return this.currentDocument.states.get(e);
968
+ getState(t) {
969
+ return this.currentDocument.states.get(t);
966
970
  }
967
971
  getStates() {
968
972
  return this.currentDocument.states;
969
973
  }
970
974
  logDocuments() {
971
- b.info("Documents = ", this.documents);
975
+ _.info("Documents = ", this.documents);
972
976
  }
973
977
  getRelations() {
974
978
  return this.currentDocument.relations;
@@ -976,8 +980,8 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
976
980
  /**
977
981
  * Adds a clickable link to a state.
978
982
  */
979
- addLink(e, s, a) {
980
- this.links.set(e, { url: s, tooltip: a }), b.warn("Adding link", e, s, a);
983
+ addLink(t, e, o) {
984
+ this.links.set(t, { url: e, tooltip: o }), _.warn("Adding link", t, e, o);
981
985
  }
982
986
  /**
983
987
  * Get all registered links.
@@ -990,80 +994,79 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
990
994
  * the start node name and the current start node count.
991
995
  * else return the given id
992
996
  */
993
- startIdIfNeeded(e = "") {
994
- return e === A.START_NODE ? (this.startEndCount++, `${A.START_TYPE}${this.startEndCount}`) : e;
997
+ startIdIfNeeded(t = "") {
998
+ return t === D.START_NODE ? (this.startEndCount++, `${D.START_TYPE}${this.startEndCount}`) : t;
995
999
  }
996
1000
  /**
997
1001
  * If the id is a start node ( [*] ), then return the start type ('start')
998
1002
  * else return the given type
999
1003
  */
1000
- startTypeIfNeeded(e = "", s = rt) {
1001
- return e === A.START_NODE ? A.START_TYPE : s;
1004
+ startTypeIfNeeded(t = "", e = et) {
1005
+ return t === D.START_NODE ? D.START_TYPE : e;
1002
1006
  }
1003
1007
  /**
1004
1008
  * If the id is an end node ( [*] ), then return a new id constructed from
1005
1009
  * the end node name and the current start_end node count.
1006
1010
  * else return the given id
1007
1011
  */
1008
- endIdIfNeeded(e = "") {
1009
- return e === A.END_NODE ? (this.startEndCount++, `${A.END_TYPE}${this.startEndCount}`) : e;
1012
+ endIdIfNeeded(t = "") {
1013
+ return t === D.END_NODE ? (this.startEndCount++, `${D.END_TYPE}${this.startEndCount}`) : t;
1010
1014
  }
1011
1015
  /**
1012
1016
  * If the id is an end node ( [*] ), then return the end type
1013
1017
  * else return the given type
1014
1018
  *
1015
1019
  */
1016
- endTypeIfNeeded(e = "", s = rt) {
1017
- return e === A.END_NODE ? A.END_TYPE : s;
1020
+ endTypeIfNeeded(t = "", e = et) {
1021
+ return t === D.END_NODE ? D.END_TYPE : e;
1018
1022
  }
1019
- addRelationObjs(e, s, a = "") {
1020
- const i = this.startIdIfNeeded(e.id.trim()), o = this.startTypeIfNeeded(e.id.trim(), e.type), h = this.startIdIfNeeded(s.id.trim()), p = this.startTypeIfNeeded(s.id.trim(), s.type);
1023
+ addRelationObjs(t, e, o = "") {
1024
+ const s = this.startIdIfNeeded(t.id.trim()), c = this.startTypeIfNeeded(t.id.trim(), t.type), h = this.startIdIfNeeded(e.id.trim()), p = this.startTypeIfNeeded(e.id.trim(), e.type);
1021
1025
  this.addState(
1022
- i,
1023
- o,
1026
+ s,
1027
+ c,
1028
+ t.doc,
1029
+ t.description,
1030
+ t.note,
1031
+ t.classes,
1032
+ t.styles,
1033
+ t.textStyles
1034
+ ), this.addState(
1035
+ h,
1036
+ p,
1024
1037
  e.doc,
1025
1038
  e.description,
1026
1039
  e.note,
1027
1040
  e.classes,
1028
1041
  e.styles,
1029
1042
  e.textStyles
1030
- ), this.addState(
1031
- h,
1032
- p,
1033
- s.doc,
1034
- s.description,
1035
- s.note,
1036
- s.classes,
1037
- s.styles,
1038
- s.textStyles
1039
1043
  ), this.currentDocument.relations.push({
1040
- id1: i,
1044
+ id1: s,
1041
1045
  id2: h,
1042
- relationTitle: K.sanitizeText(a, F())
1046
+ relationTitle: j.sanitizeText(o, $())
1043
1047
  });
1044
1048
  }
1045
1049
  /**
1046
1050
  * Add a relation between two items. The items may be full objects or just the string id of a state.
1047
1051
  */
1048
- addRelation(e, s, a) {
1049
- if (typeof e == "object" && typeof s == "object")
1050
- this.addRelationObjs(e, s, a);
1051
- else if (typeof e == "string" && typeof s == "string") {
1052
- const i = this.startIdIfNeeded(e.trim()), o = this.startTypeIfNeeded(e), h = this.endIdIfNeeded(s.trim()), p = this.endTypeIfNeeded(s);
1053
- this.addState(i, o), this.addState(h, p), this.currentDocument.relations.push({
1054
- id1: i,
1052
+ addRelation(t, e, o) {
1053
+ if (typeof t == "object" && typeof e == "object")
1054
+ this.addRelationObjs(t, e, o);
1055
+ else if (typeof t == "string" && typeof e == "string") {
1056
+ const s = this.startIdIfNeeded(t.trim()), c = this.startTypeIfNeeded(t), h = this.endIdIfNeeded(e.trim()), p = this.endTypeIfNeeded(e);
1057
+ this.addState(s, c), this.addState(h, p), this.currentDocument.relations.push({
1058
+ id1: s,
1055
1059
  id2: h,
1056
- relationTitle: a ? K.sanitizeText(a, F()) : void 0
1060
+ relationTitle: o ? j.sanitizeText(o, $()) : void 0
1057
1061
  });
1058
1062
  }
1059
1063
  }
1060
- addDescription(e, s) {
1061
- var o;
1062
- const a = this.currentDocument.states.get(e), i = s.startsWith(":") ? s.replace(":", "").trim() : s;
1063
- (o = a == null ? void 0 : a.descriptions) == null || o.push(K.sanitizeText(i, F()));
1064
+ addDescription(t, e) {
1065
+ const o = this.currentDocument.states.get(t), s = e.startsWith(":") ? e.replace(":", "").trim() : e;
1066
+ o?.descriptions?.push(j.sanitizeText(s, $()));
1064
1067
  }
1065
- cleanupLabel(e) {
1066
- return e.startsWith(":") ? e.slice(2).trim() : e.trim();
1068
+ cleanupLabel(t) {
1069
+ return t.startsWith(":") ? t.slice(2).trim() : t.trim();
1067
1070
  }
1068
1071
  getDividerId() {
1069
1072
  return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
@@ -1075,32 +1078,31 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
1075
1078
  * @param id - the id of this (style) class
1076
1079
  * @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
1077
1080
  */
1078
- addStyleClass(e, s = "") {
1079
- this.classes.has(e) || this.classes.set(e, { id: e, styles: [], textStyles: [] });
1080
- const a = this.classes.get(e);
1081
- s && a && s.split(A.STYLECLASS_SEP).forEach((i) => {
1082
- const o = i.replace(/([^;]*);/, "$1").trim();
1083
- if (RegExp(A.COLOR_KEYWORD).exec(i)) {
1084
- const p = o.replace(A.FILL_KEYWORD, A.BG_FILL).replace(A.COLOR_KEYWORD, A.FILL_KEYWORD);
1085
- a.textStyles.push(p);
1081
+ addStyleClass(t, e = "") {
1082
+ this.classes.has(t) || this.classes.set(t, { id: t, styles: [], textStyles: [] });
1083
+ const o = this.classes.get(t);
1084
+ e && o && e.split(D.STYLECLASS_SEP).forEach((s) => {
1085
+ const c = s.replace(/([^;]*);/, "$1").trim();
1086
+ if (RegExp(D.COLOR_KEYWORD).exec(s)) {
1087
+ const p = c.replace(D.FILL_KEYWORD, D.BG_FILL).replace(D.COLOR_KEYWORD, D.FILL_KEYWORD);
1088
+ o.textStyles.push(p);
1086
1089
  }
1087
- a.styles.push(o);
1090
+ o.styles.push(c);
1088
1091
  });
1089
1092
  }
1090
1093
  getClasses() {
1091
1094
  return this.classes;
1092
1095
  }
1093
- setupToolTips(e) {
1094
- const s = pe();
1095
- Dt(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover", (o) => {
1096
- var T;
1097
- const h = Dt(o.currentTarget), p = h.attr("title");
1096
+ setupToolTips(t) {
1097
+ const e = fe();
1098
+ bt(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover", (c) => {
1099
+ const h = bt(c.currentTarget), p = h.attr("title");
1098
1100
  if (p === null)
1099
1101
  return;
1100
- const f = (T = o.currentTarget) == null ? void 0 : T.getBoundingClientRect();
1101
- s.transition().duration(200).style("opacity", ".9"), s.style("left", window.scrollX + f.left + (f.right - f.left) / 2 + "px").style("top", window.scrollY + f.bottom + "px"), s.html(fe.sanitize(p)), h.classed("hover", !0);
1102
- }).on("mouseout", (o) => {
1103
- s.transition().duration(500).style("opacity", 0), Dt(o.currentTarget).classed("hover", !1);
1102
+ const y = c.currentTarget?.getBoundingClientRect();
1103
+ e.transition().duration(200).style("opacity", ".9"), e.style("left", window.scrollX + y.left + (y.right - y.left) / 2 + "px").style("top", window.scrollY + y.bottom + "px"), e.html(de.sanitize(p)), h.classed("hover", !0);
1104
+ }).on("mouseout", (c) => {
1105
+ e.transition().duration(500).style("opacity", 0), bt(c.currentTarget).classed("hover", !1);
1104
1106
  });
1105
1107
  }
1106
1108
  /**
@@ -1111,15 +1113,14 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
1111
1113
  * @param itemIds - The id or a list of ids of the item(s) to apply the css class to
1112
1114
  * @param cssClassName - CSS class name
1113
1115
  */
1114
- setCssClass(e, s) {
1115
- e.split(",").forEach((a) => {
1116
- var o;
1117
- let i = this.getState(a);
1118
- if (!i) {
1119
- const h = a.trim();
1120
- this.addState(h), i = this.getState(h);
1116
+ setCssClass(t, e) {
1117
+ t.split(",").forEach((o) => {
1118
+ let s = this.getState(o);
1119
+ if (!s) {
1120
+ const c = o.trim();
1121
+ this.addState(c), s = this.getState(c);
1121
1122
  }
1122
- (o = i == null ? void 0 : i.classes) == null || o.push(s);
1123
+ s?.classes?.push(e);
1123
1124
  });
1124
1125
  }
1125
1126
  /**
@@ -1132,9 +1133,8 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
1132
1133
  * @param itemId - The id of item to apply the style to
1133
1134
  * @param styleText - the text of the attributes for the style
1134
1135
  */
1135
- setStyle(e, s) {
1136
- var a, i;
1137
- (i = (a = this.getState(e)) == null ? void 0 : a.styles) == null || i.push(s);
1136
+ setStyle(t, e) {
1137
+ this.getState(t)?.styles?.push(e);
1138
1138
  }
1139
1139
  /**
1140
1140
  * Add a text style to a state with the given id
@@ -1142,13 +1142,12 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
1142
1142
  * @param itemId - The id of item to apply the css class to
1143
1143
  * @param cssClassName - CSS class name
1144
1144
  */
1145
- setTextStyle(e, s) {
1146
- var a, i;
1147
- (i = (a = this.getState(e)) == null ? void 0 : a.textStyles) == null || i.push(s);
1145
+ setTextStyle(t, e) {
1146
+ this.getState(t)?.textStyles?.push(e);
1148
1147
  }
1149
- bindFunctions(e) {
1150
- this.funs.forEach((s) => {
1151
- s(e);
1148
+ bindFunctions(t) {
1149
+ this.funs.forEach((e) => {
1150
+ e(t);
1152
1151
  });
1153
1152
  }
1154
1153
  /**
@@ -1156,38 +1155,32 @@ var it = /* @__PURE__ */ S((t, e, s, a, i, o, h, p) => {
1156
1155
  * @returns the direction statement if present
1157
1156
  */
1158
1157
  getDirectionStatement() {
1159
- return this.rootDoc.find((e) => e.stmt === Rt);
1158
+ return this.rootDoc.find((t) => t.stmt === wt);
1160
1159
  }
1161
1160
  getDirection() {
1162
- var e;
1163
- return ((e = this.getDirectionStatement()) == null ? void 0 : e.value) ?? Se;
1161
+ return this.getDirectionStatement()?.value ?? pe;
1164
1162
  }
1165
- setDirection(e) {
1166
- const s = this.getDirectionStatement();
1167
- s ? s.value = e : this.rootDoc.unshift({ stmt: Rt, value: e });
1163
+ setDirection(t) {
1164
+ const e = this.getDirectionStatement();
1165
+ e ? e.value = t : this.rootDoc.unshift({ stmt: wt, value: t });
1168
1166
  }
1169
- trimColon(e) {
1170
- return e.startsWith(":") ? e.slice(1).trim() : e.trim();
1167
+ trimColon(t) {
1168
+ return t.startsWith(":") ? t.slice(1).trim() : t.trim();
1171
1169
  }
1172
1170
  getData() {
1173
- const e = F();
1171
+ const t = $();
1174
1172
  return {
1175
1173
  nodes: this.nodes,
1176
1174
  edges: this.edges,
1177
1175
  other: {},
1178
- config: e,
1179
- direction: Xt(this.getRootDocV2())
1176
+ config: t,
1177
+ direction: Kt(this.getRootDocV2())
1180
1178
  };
1181
1179
  }
1182
1180
  getConfig() {
1183
- return F().state;
1181
+ return $().state;
1184
1182
  }
1185
- }, S(X, "StateDB"), X.relationType = {
1186
- AGGREGATION: 0,
1187
- EXTENSION: 1,
1188
- COMPOSITION: 2,
1189
- DEPENDENCY: 3
1190
- }, X), Ye = /* @__PURE__ */ S((t) => `
1183
+ }, Be = /* @__PURE__ */ f((t) => `
1191
1184
  defs [id$="-barbEnd"] {
1192
1185
  fill: ${t.transitionColor};
1193
1186
  stroke: ${t.transitionColor};
@@ -1412,10 +1405,10 @@ g.stateGroup line {
1412
1405
  ry: ${t.radius}px;
1413
1406
  filter: ${t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${t.svgId}-drop-shadow)`) : "none"}
1414
1407
  }
1415
- `, "getStyles"), ze = Ye;
1408
+ `, "getStyles"), He = Be;
1416
1409
  export {
1417
- He as S,
1418
- We as a,
1419
- je as b,
1420
- ze as s
1410
+ je as S,
1411
+ Ue as a,
1412
+ We as b,
1413
+ He as s
1421
1414
  };