@schmitech/chatbot-widget 0.5.3 → 0.6.0

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 (64) hide show
  1. package/dist/_basePickBy-C3-QE0dl-5eQ6L29l.js +152 -0
  2. package/dist/_baseUniq-CstiM9Lp-AFR_Ns0a.js +615 -0
  3. package/dist/arc-W3NKKXLI-DHbDwLx0.js +84 -0
  4. package/dist/architecture-U656AL7Q-fn9wJZsH-BLoGjtkP.js +6 -0
  5. package/dist/architectureDiagram-VXUJARFQ-zzJsgPC6-C4OfUE0m.js +4667 -0
  6. package/dist/blockDiagram-VD42YOAC-D-In4h7h-BYXdRmeG.js +2266 -0
  7. package/dist/c4Diagram-YG6GDRKO-DBs8r9gh-BdLuHgPT.js +1582 -0
  8. package/dist/channel-RBWQyMSg-Cx0HUumY.js +6 -0
  9. package/dist/chatbot-widget.bundle.js +4473 -1556
  10. package/dist/chatbot-widget.css +1 -1
  11. package/dist/chatbot-widget.es.js +12 -63659
  12. package/dist/chatbot-widget.umd.js +4472 -1555
  13. package/dist/chunk-4BX2VUAB-BqD7w0AR-CbA2613c.js +10 -0
  14. package/dist/chunk-55IACEB6-D8pvDVEJ-DrL4SJSR.js +9 -0
  15. package/dist/chunk-B4BG7PRW-Dwma1pSy-BWjG5dc6.js +1375 -0
  16. package/dist/chunk-DI55MBZ5-BY2XXvZz-DbAvz3Pq.js +1383 -0
  17. package/dist/chunk-FMBD7UC4-BeiLbQ8U-BNaZTCv4.js +20 -0
  18. package/dist/chunk-QN33PNHL-BkO3hOeq-DkU1EzGA.js +21 -0
  19. package/dist/chunk-QZHKN3VN-Cwlo2qTG-DMmeZmp5.js +16 -0
  20. package/dist/chunk-TZMSLE5B-BnXK-OiF-RfzVsOBe.js +65 -0
  21. package/dist/classDiagram-2ON5EDUG-Crd6O69V-kCZrFOLN.js +17 -0
  22. package/dist/classDiagram-v2-WZHVMYZB-Crd6O69V-kCZrFOLN.js +17 -0
  23. package/dist/clone-CfLgyC8S-DsDOh4B4.js +9 -0
  24. package/dist/config/index.d.ts +4 -2
  25. package/dist/cose-bilkent-S5V4N54A-DKeVcPDK-de_7nZTY.js +2609 -0
  26. package/dist/cytoscape.esm-CjI2IsL8-Be2K4mI6.js +18723 -0
  27. package/dist/dagre-6UL2VRFP-BPf604Df-BhZs6zCq.js +448 -0
  28. package/dist/diagram-PSM6KHXK-DeLcpEV3-qb4rujeN.js +532 -0
  29. package/dist/diagram-QEK2KX5R-C_5RR1NJ-C5kZWmRl.js +222 -0
  30. package/dist/diagram-S2PKOQOG-DVx43aon-4nlw6iDz.js +144 -0
  31. package/dist/erDiagram-Q2GNP2WA-DgUeO5_h-DHc9Yphl.js +841 -0
  32. package/dist/flowDiagram-NV44I4VS-C5HQUzU9-DHjbmAtJ.js +1628 -0
  33. package/dist/ganttDiagram-JELNMOA3-DgSZ1ixF-C3hJs_k9.js +1936 -0
  34. package/dist/gitGraph-F6HP7TQM-UL7-Bx1s-Cog5rj3j.js +6 -0
  35. package/dist/gitGraphDiagram-NY62KEGX-DY5loT9K-CEcKQNrM.js +713 -0
  36. package/dist/graph-BfwqPHx6-DErF9dBN.js +248 -0
  37. package/dist/index-B5s_uaP2.js +124168 -0
  38. package/dist/index-BAOVR-xx-thst7Pu6.js +13251 -0
  39. package/dist/info-NVLQJR56-BsqQ0RXQ-BcYgZCCY.js +6 -0
  40. package/dist/infoDiagram-WHAUD3N6-DIqQ6vCk-BuiAAMSH.js +25 -0
  41. package/dist/journeyDiagram-XKPGCS4Q-DXjg3S3r-Byi_TGXs.js +835 -0
  42. package/dist/kanban-definition-3W4ZIXB7-Uxt7Am6n-jy96nA-g.js +721 -0
  43. package/dist/layout-CSfkE668-BjigbqJL.js +1333 -0
  44. package/dist/mermaid-parser.core-LjuO4CL3-BLqmPe8-.js +12891 -0
  45. package/dist/mindmap-definition-VGOIOE7T-DXwVuAPE-SK4e1Sse.js +787 -0
  46. package/dist/packet-BFZMPI3H-DJWkrKrV-BamBev9S.js +6 -0
  47. package/dist/pie-7BOR55EZ-DC8hTFwn-D1bcIQbR.js +6 -0
  48. package/dist/pieDiagram-ADFJNKIX-Cj0EHHtj-Dbr09c-S.js +161 -0
  49. package/dist/quadrantDiagram-AYHSOK5B-CnLDz007-Ci0DQl2T.js +1024 -0
  50. package/dist/radar-NHE76QYJ-Bijk-Fk9-9nAmDCMr.js +6 -0
  51. package/dist/requirementDiagram-UZGBJVZJ-rDaI-8Be-CSEc4S33.js +851 -0
  52. package/dist/sankeyDiagram-TZEHDZUN-A0YO8ixs-Zj8Z0j0n.js +810 -0
  53. package/dist/sequenceDiagram-WL72ISMW-BFF7TtP7-Dcofckjv.js +2519 -0
  54. package/dist/shared/styles.d.ts +1 -1
  55. package/dist/stateDiagram-FKZM4ZOC-ofFsB7HJ-BJBX12rE.js +264 -0
  56. package/dist/stateDiagram-v2-4FDKWEC3-CEZFbksU-BywmU88h.js +17 -0
  57. package/dist/timeline-definition-IT6M3QCI-5W361ZNm-MP_ufVe7.js +800 -0
  58. package/dist/treemap-KMMF4GRG-pGRoYcSn-BeZ7sXgP.js +6 -0
  59. package/dist/ui/Message.d.ts +1 -5
  60. package/dist/ui/MessagesList.d.ts +1 -5
  61. package/dist/utils/contentFiltering.d.ts +12 -0
  62. package/dist/xychartDiagram-PRI3JC2R-CSr0GxaP-DBgCtplP.js +1297 -0
  63. package/package.json +3 -3
  64. package/dist/ui/TypingEffect.d.ts +0 -18
@@ -0,0 +1,841 @@
1
+ import { d as vt } from "./chunk-55IACEB6-D8pvDVEJ-DrL4SJSR.js";
2
+ import { d as $t } from "./chunk-QN33PNHL-BkO3hOeq-DkU1EzGA.js";
3
+ import { x as o, u as Dt, g as wt, h as Lt, B as Mt, w as Bt, z as Ft, p as H, a as $, L as Yt, _ as Pt, R as zt, N as Kt, r as Zt, t as Gt, f as Ut, v as jt } from "./index-B5s_uaP2.js";
4
+ import { t as Wt } from "./channel-RBWQyMSg-Cx0HUumY.js";
5
+ typeof window < "u" && (window.global = window);
6
+ var ut = function() {
7
+ var e = /* @__PURE__ */ o(function(m, r, a, n) {
8
+ for (a = a || {}, n = m.length; n--; a[m[n]] = r) ;
9
+ return a;
10
+ }, "o"), i = [6, 8, 10, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50], u = [1, 10], c = [1, 11], l = [1, 12], y = [1, 13], R = [1, 20], b = [1, 21], E = [1, 22], D = [1, 23], V = [1, 24], O = [1, 19], K = [1, 25], w = [1, 26], A = [1, 18], J = [1, 33], tt = [1, 34], et = [1, 35], st = [1, 36], it = [1, 37], yt = [6, 8, 10, 13, 15, 17, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50, 63, 64, 65, 66, 67], S = [1, 42], T = [1, 43], L = [1, 52], M = [40, 50, 68, 69], B = [1, 63], F = [1, 61], N = [1, 58], Y = [1, 62], P = [1, 64], Z = [6, 8, 10, 13, 17, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 48, 49, 50, 63, 64, 65, 66, 67], dt = [63, 64, 65, 66, 67], pt = [1, 81], _t = [1, 80], ft = [1, 78], bt = [1, 79], gt = [6, 10, 42, 47], C = [6, 10, 13, 41, 42, 47, 48, 49], G = [1, 89], U = [1, 88], j = [1, 87], z = [19, 56], mt = [1, 98], Et = [1, 97], nt = [19, 56, 58, 60], rt = {
11
+ trace: /* @__PURE__ */ o(function() {
12
+ }, "trace"),
13
+ yy: {},
14
+ symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, entityName: 11, relSpec: 12, COLON: 13, role: 14, STYLE_SEPARATOR: 15, idList: 16, BLOCK_START: 17, attributes: 18, BLOCK_STOP: 19, SQS: 20, SQE: 21, title: 22, title_value: 23, acc_title: 24, acc_title_value: 25, acc_descr: 26, acc_descr_value: 27, acc_descr_multiline_value: 28, direction: 29, classDefStatement: 30, classStatement: 31, styleStatement: 32, direction_tb: 33, direction_bt: 34, direction_rl: 35, direction_lr: 36, CLASSDEF: 37, stylesOpt: 38, separator: 39, UNICODE_TEXT: 40, STYLE_TEXT: 41, COMMA: 42, CLASS: 43, STYLE: 44, style: 45, styleComponent: 46, SEMI: 47, NUM: 48, BRKT: 49, ENTITY_NAME: 50, attribute: 51, attributeType: 52, attributeName: 53, attributeKeyTypeList: 54, attributeComment: 55, ATTRIBUTE_WORD: 56, attributeKeyType: 57, ",": 58, ATTRIBUTE_KEY: 59, COMMENT: 60, cardinality: 61, relType: 62, ZERO_OR_ONE: 63, ZERO_OR_MORE: 64, ONE_OR_MORE: 65, ONLY_ONE: 66, MD_PARENT: 67, NON_IDENTIFYING: 68, IDENTIFYING: 69, WORD: 70, $accept: 0, $end: 1 },
15
+ terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: "COLON", 15: "STYLE_SEPARATOR", 17: "BLOCK_START", 19: "BLOCK_STOP", 20: "SQS", 21: "SQE", 22: "title", 23: "title_value", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "direction_tb", 34: "direction_bt", 35: "direction_rl", 36: "direction_lr", 37: "CLASSDEF", 40: "UNICODE_TEXT", 41: "STYLE_TEXT", 42: "COMMA", 43: "CLASS", 44: "STYLE", 47: "SEMI", 48: "NUM", 49: "BRKT", 50: "ENTITY_NAME", 56: "ATTRIBUTE_WORD", 58: ",", 59: "ATTRIBUTE_KEY", 60: "COMMENT", 63: "ZERO_OR_ONE", 64: "ZERO_OR_MORE", 65: "ONE_OR_MORE", 66: "ONLY_ONE", 67: "MD_PARENT", 68: "NON_IDENTIFYING", 69: "IDENTIFYING", 70: "WORD" },
16
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 9], [9, 7], [9, 7], [9, 4], [9, 6], [9, 3], [9, 5], [9, 1], [9, 3], [9, 7], [9, 9], [9, 6], [9, 8], [9, 4], [9, 6], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [29, 1], [29, 1], [29, 1], [29, 1], [30, 4], [16, 1], [16, 1], [16, 3], [16, 3], [31, 3], [32, 4], [38, 1], [38, 3], [45, 1], [45, 2], [39, 1], [39, 1], [39, 1], [46, 1], [46, 1], [46, 1], [46, 1], [11, 1], [11, 1], [18, 1], [18, 2], [51, 2], [51, 3], [51, 3], [51, 4], [52, 1], [53, 1], [54, 1], [54, 3], [57, 1], [55, 1], [12, 3], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [62, 1], [62, 1], [14, 1], [14, 1], [14, 1]],
17
+ performAction: /* @__PURE__ */ o(function(m, r, a, n, h, t, p) {
18
+ var s = t.length - 1;
19
+ switch (h) {
20
+ case 1:
21
+ break;
22
+ case 2:
23
+ this.$ = [];
24
+ break;
25
+ case 3:
26
+ t[s - 1].push(t[s]), this.$ = t[s - 1];
27
+ break;
28
+ case 4:
29
+ case 5:
30
+ this.$ = t[s];
31
+ break;
32
+ case 6:
33
+ case 7:
34
+ this.$ = [];
35
+ break;
36
+ case 8:
37
+ n.addEntity(t[s - 4]), n.addEntity(t[s - 2]), n.addRelationship(t[s - 4], t[s], t[s - 2], t[s - 3]);
38
+ break;
39
+ case 9:
40
+ n.addEntity(t[s - 8]), n.addEntity(t[s - 4]), n.addRelationship(t[s - 8], t[s], t[s - 4], t[s - 5]), n.setClass([t[s - 8]], t[s - 6]), n.setClass([t[s - 4]], t[s - 2]);
41
+ break;
42
+ case 10:
43
+ n.addEntity(t[s - 6]), n.addEntity(t[s - 2]), n.addRelationship(t[s - 6], t[s], t[s - 2], t[s - 3]), n.setClass([t[s - 6]], t[s - 4]);
44
+ break;
45
+ case 11:
46
+ n.addEntity(t[s - 6]), n.addEntity(t[s - 4]), n.addRelationship(t[s - 6], t[s], t[s - 4], t[s - 5]), n.setClass([t[s - 4]], t[s - 2]);
47
+ break;
48
+ case 12:
49
+ n.addEntity(t[s - 3]), n.addAttributes(t[s - 3], t[s - 1]);
50
+ break;
51
+ case 13:
52
+ n.addEntity(t[s - 5]), n.addAttributes(t[s - 5], t[s - 1]), n.setClass([t[s - 5]], t[s - 3]);
53
+ break;
54
+ case 14:
55
+ n.addEntity(t[s - 2]);
56
+ break;
57
+ case 15:
58
+ n.addEntity(t[s - 4]), n.setClass([t[s - 4]], t[s - 2]);
59
+ break;
60
+ case 16:
61
+ n.addEntity(t[s]);
62
+ break;
63
+ case 17:
64
+ n.addEntity(t[s - 2]), n.setClass([t[s - 2]], t[s]);
65
+ break;
66
+ case 18:
67
+ n.addEntity(t[s - 6], t[s - 4]), n.addAttributes(t[s - 6], t[s - 1]);
68
+ break;
69
+ case 19:
70
+ n.addEntity(t[s - 8], t[s - 6]), n.addAttributes(t[s - 8], t[s - 1]), n.setClass([t[s - 8]], t[s - 3]);
71
+ break;
72
+ case 20:
73
+ n.addEntity(t[s - 5], t[s - 3]);
74
+ break;
75
+ case 21:
76
+ n.addEntity(t[s - 7], t[s - 5]), n.setClass([t[s - 7]], t[s - 2]);
77
+ break;
78
+ case 22:
79
+ n.addEntity(t[s - 3], t[s - 1]);
80
+ break;
81
+ case 23:
82
+ n.addEntity(t[s - 5], t[s - 3]), n.setClass([t[s - 5]], t[s]);
83
+ break;
84
+ case 24:
85
+ case 25:
86
+ this.$ = t[s].trim(), n.setAccTitle(this.$);
87
+ break;
88
+ case 26:
89
+ case 27:
90
+ this.$ = t[s].trim(), n.setAccDescription(this.$);
91
+ break;
92
+ case 32:
93
+ n.setDirection("TB");
94
+ break;
95
+ case 33:
96
+ n.setDirection("BT");
97
+ break;
98
+ case 34:
99
+ n.setDirection("RL");
100
+ break;
101
+ case 35:
102
+ n.setDirection("LR");
103
+ break;
104
+ case 36:
105
+ this.$ = t[s - 3], n.addClass(t[s - 2], t[s - 1]);
106
+ break;
107
+ case 37:
108
+ case 38:
109
+ case 56:
110
+ case 64:
111
+ this.$ = [t[s]];
112
+ break;
113
+ case 39:
114
+ case 40:
115
+ this.$ = t[s - 2].concat([t[s]]);
116
+ break;
117
+ case 41:
118
+ this.$ = t[s - 2], n.setClass(t[s - 1], t[s]);
119
+ break;
120
+ case 42:
121
+ this.$ = t[s - 3], n.addCssStyles(t[s - 2], t[s - 1]);
122
+ break;
123
+ case 43:
124
+ this.$ = [t[s]];
125
+ break;
126
+ case 44:
127
+ t[s - 2].push(t[s]), this.$ = t[s - 2];
128
+ break;
129
+ case 46:
130
+ this.$ = t[s - 1] + t[s];
131
+ break;
132
+ case 54:
133
+ case 76:
134
+ case 77:
135
+ this.$ = t[s].replace(/"/g, "");
136
+ break;
137
+ case 55:
138
+ case 78:
139
+ this.$ = t[s];
140
+ break;
141
+ case 57:
142
+ t[s].push(t[s - 1]), this.$ = t[s];
143
+ break;
144
+ case 58:
145
+ this.$ = { type: t[s - 1], name: t[s] };
146
+ break;
147
+ case 59:
148
+ this.$ = { type: t[s - 2], name: t[s - 1], keys: t[s] };
149
+ break;
150
+ case 60:
151
+ this.$ = { type: t[s - 2], name: t[s - 1], comment: t[s] };
152
+ break;
153
+ case 61:
154
+ this.$ = { type: t[s - 3], name: t[s - 2], keys: t[s - 1], comment: t[s] };
155
+ break;
156
+ case 62:
157
+ case 63:
158
+ case 66:
159
+ this.$ = t[s];
160
+ break;
161
+ case 65:
162
+ t[s - 2].push(t[s]), this.$ = t[s - 2];
163
+ break;
164
+ case 67:
165
+ this.$ = t[s].replace(/"/g, "");
166
+ break;
167
+ case 68:
168
+ this.$ = { cardA: t[s], relType: t[s - 1], cardB: t[s - 2] };
169
+ break;
170
+ case 69:
171
+ this.$ = n.Cardinality.ZERO_OR_ONE;
172
+ break;
173
+ case 70:
174
+ this.$ = n.Cardinality.ZERO_OR_MORE;
175
+ break;
176
+ case 71:
177
+ this.$ = n.Cardinality.ONE_OR_MORE;
178
+ break;
179
+ case 72:
180
+ this.$ = n.Cardinality.ONLY_ONE;
181
+ break;
182
+ case 73:
183
+ this.$ = n.Cardinality.MD_PARENT;
184
+ break;
185
+ case 74:
186
+ this.$ = n.Identification.NON_IDENTIFYING;
187
+ break;
188
+ case 75:
189
+ this.$ = n.Identification.IDENTIFYING;
190
+ break;
191
+ }
192
+ }, "anonymous"),
193
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, e(i, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 22: u, 24: c, 26: l, 28: y, 29: 14, 30: 15, 31: 16, 32: 17, 33: R, 34: b, 35: E, 36: D, 37: V, 40: O, 43: K, 44: w, 50: A }, e(i, [2, 7], { 1: [2, 1] }), e(i, [2, 3]), { 9: 27, 11: 9, 22: u, 24: c, 26: l, 28: y, 29: 14, 30: 15, 31: 16, 32: 17, 33: R, 34: b, 35: E, 36: D, 37: V, 40: O, 43: K, 44: w, 50: A }, e(i, [2, 5]), e(i, [2, 6]), e(i, [2, 16], { 12: 28, 61: 32, 15: [1, 29], 17: [1, 30], 20: [1, 31], 63: J, 64: tt, 65: et, 66: st, 67: it }), { 23: [1, 38] }, { 25: [1, 39] }, { 27: [1, 40] }, e(i, [2, 27]), e(i, [2, 28]), e(i, [2, 29]), e(i, [2, 30]), e(i, [2, 31]), e(yt, [2, 54]), e(yt, [2, 55]), e(i, [2, 32]), e(i, [2, 33]), e(i, [2, 34]), e(i, [2, 35]), { 16: 41, 40: S, 41: T }, { 16: 44, 40: S, 41: T }, { 16: 45, 40: S, 41: T }, e(i, [2, 4]), { 11: 46, 40: O, 50: A }, { 16: 47, 40: S, 41: T }, { 18: 48, 19: [1, 49], 51: 50, 52: 51, 56: L }, { 11: 53, 40: O, 50: A }, { 62: 54, 68: [1, 55], 69: [1, 56] }, e(M, [2, 69]), e(M, [2, 70]), e(M, [2, 71]), e(M, [2, 72]), e(M, [2, 73]), e(i, [2, 24]), e(i, [2, 25]), e(i, [2, 26]), { 13: B, 38: 57, 41: F, 42: N, 45: 59, 46: 60, 48: Y, 49: P }, e(Z, [2, 37]), e(Z, [2, 38]), { 16: 65, 40: S, 41: T, 42: N }, { 13: B, 38: 66, 41: F, 42: N, 45: 59, 46: 60, 48: Y, 49: P }, { 13: [1, 67], 15: [1, 68] }, e(i, [2, 17], { 61: 32, 12: 69, 17: [1, 70], 42: N, 63: J, 64: tt, 65: et, 66: st, 67: it }), { 19: [1, 71] }, e(i, [2, 14]), { 18: 72, 19: [2, 56], 51: 50, 52: 51, 56: L }, { 53: 73, 56: [1, 74] }, { 56: [2, 62] }, { 21: [1, 75] }, { 61: 76, 63: J, 64: tt, 65: et, 66: st, 67: it }, e(dt, [2, 74]), e(dt, [2, 75]), { 6: pt, 10: _t, 39: 77, 42: ft, 47: bt }, { 40: [1, 82], 41: [1, 83] }, e(gt, [2, 43], { 46: 84, 13: B, 41: F, 48: Y, 49: P }), e(C, [2, 45]), e(C, [2, 50]), e(C, [2, 51]), e(C, [2, 52]), e(C, [2, 53]), e(i, [2, 41], { 42: N }), { 6: pt, 10: _t, 39: 85, 42: ft, 47: bt }, { 14: 86, 40: G, 50: U, 70: j }, { 16: 90, 40: S, 41: T }, { 11: 91, 40: O, 50: A }, { 18: 92, 19: [1, 93], 51: 50, 52: 51, 56: L }, e(i, [2, 12]), { 19: [2, 57] }, e(z, [2, 58], { 54: 94, 55: 95, 57: 96, 59: mt, 60: Et }), e([19, 56, 59, 60], [2, 63]), e(i, [2, 22], { 15: [1, 100], 17: [1, 99] }), e([40, 50], [2, 68]), e(i, [2, 36]), { 13: B, 41: F, 45: 101, 46: 60, 48: Y, 49: P }, e(i, [2, 47]), e(i, [2, 48]), e(i, [2, 49]), e(Z, [2, 39]), e(Z, [2, 40]), e(C, [2, 46]), e(i, [2, 42]), e(i, [2, 8]), e(i, [2, 76]), e(i, [2, 77]), e(i, [2, 78]), { 13: [1, 102], 42: N }, { 13: [1, 104], 15: [1, 103] }, { 19: [1, 105] }, e(i, [2, 15]), e(z, [2, 59], { 55: 106, 58: [1, 107], 60: Et }), e(z, [2, 60]), e(nt, [2, 64]), e(z, [2, 67]), e(nt, [2, 66]), { 18: 108, 19: [1, 109], 51: 50, 52: 51, 56: L }, { 16: 110, 40: S, 41: T }, e(gt, [2, 44], { 46: 84, 13: B, 41: F, 48: Y, 49: P }), { 14: 111, 40: G, 50: U, 70: j }, { 16: 112, 40: S, 41: T }, { 14: 113, 40: G, 50: U, 70: j }, e(i, [2, 13]), e(z, [2, 61]), { 57: 114, 59: mt }, { 19: [1, 115] }, e(i, [2, 20]), e(i, [2, 23], { 17: [1, 116], 42: N }), e(i, [2, 11]), { 13: [1, 117], 42: N }, e(i, [2, 10]), e(nt, [2, 65]), e(i, [2, 18]), { 18: 118, 19: [1, 119], 51: 50, 52: 51, 56: L }, { 14: 120, 40: G, 50: U, 70: j }, { 19: [1, 121] }, e(i, [2, 21]), e(i, [2, 9]), e(i, [2, 19])],
194
+ defaultActions: { 52: [2, 62], 72: [2, 57] },
195
+ parseError: /* @__PURE__ */ o(function(m, r) {
196
+ if (r.recoverable)
197
+ this.trace(m);
198
+ else {
199
+ var a = new Error(m);
200
+ throw a.hash = r, a;
201
+ }
202
+ }, "parseError"),
203
+ parse: /* @__PURE__ */ o(function(m) {
204
+ var r = this, a = [0], n = [], h = [null], t = [], p = this.table, s = "", X = 0, kt = 0, At = 2, Ot = 1, It = t.slice.call(arguments, 1), d = Object.create(this.lexer), I = { yy: {} };
205
+ for (var at in this.yy)
206
+ Object.prototype.hasOwnProperty.call(this.yy, at) && (I.yy[at] = this.yy[at]);
207
+ d.setInput(m, I.yy), I.yy.lexer = d, I.yy.parser = this, typeof d.yylloc > "u" && (d.yylloc = {});
208
+ var ct = d.yylloc;
209
+ t.push(ct);
210
+ var xt = d.options && d.options.ranges;
211
+ typeof I.yy.parseError == "function" ? this.parseError = I.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
212
+ function Ct(f) {
213
+ a.length = a.length - 2 * f, h.length = h.length - f, t.length = t.length - f;
214
+ }
215
+ o(Ct, "popStack");
216
+ function St() {
217
+ var f;
218
+ return f = n.pop() || d.lex() || Ot, typeof f != "number" && (f instanceof Array && (n = f, f = n.pop()), f = r.symbols_[f] || f), f;
219
+ }
220
+ o(St, "lex");
221
+ for (var _, x, g, ot, v = {}, Q, k, Tt, q; ; ) {
222
+ if (x = a[a.length - 1], this.defaultActions[x] ? g = this.defaultActions[x] : ((_ === null || typeof _ > "u") && (_ = St()), g = p[x] && p[x][_]), typeof g > "u" || !g.length || !g[0]) {
223
+ var lt = "";
224
+ q = [];
225
+ for (Q in p[x])
226
+ this.terminals_[Q] && Q > At && q.push("'" + this.terminals_[Q] + "'");
227
+ d.showPosition ? lt = "Parse error on line " + (X + 1) + `:
228
+ ` + d.showPosition() + `
229
+ Expecting ` + q.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : lt = "Parse error on line " + (X + 1) + ": Unexpected " + (_ == Ot ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(lt, {
230
+ text: d.match,
231
+ token: this.terminals_[_] || _,
232
+ line: d.yylineno,
233
+ loc: ct,
234
+ expected: q
235
+ });
236
+ }
237
+ if (g[0] instanceof Array && g.length > 1)
238
+ throw new Error("Parse Error: multiple actions possible at state: " + x + ", token: " + _);
239
+ switch (g[0]) {
240
+ case 1:
241
+ a.push(_), h.push(d.yytext), t.push(d.yylloc), a.push(g[1]), _ = null, kt = d.yyleng, s = d.yytext, X = d.yylineno, ct = d.yylloc;
242
+ break;
243
+ case 2:
244
+ if (k = this.productions_[g[1]][1], v.$ = h[h.length - k], v._$ = {
245
+ first_line: t[t.length - (k || 1)].first_line,
246
+ last_line: t[t.length - 1].last_line,
247
+ first_column: t[t.length - (k || 1)].first_column,
248
+ last_column: t[t.length - 1].last_column
249
+ }, xt && (v._$.range = [
250
+ t[t.length - (k || 1)].range[0],
251
+ t[t.length - 1].range[1]
252
+ ]), ot = this.performAction.apply(v, [
253
+ s,
254
+ kt,
255
+ X,
256
+ I.yy,
257
+ g[1],
258
+ h,
259
+ t
260
+ ].concat(It)), typeof ot < "u")
261
+ return ot;
262
+ k && (a = a.slice(0, -1 * k * 2), h = h.slice(0, -1 * k), t = t.slice(0, -1 * k)), a.push(this.productions_[g[1]][0]), h.push(v.$), t.push(v._$), Tt = p[a[a.length - 2]][a[a.length - 1]], a.push(Tt);
263
+ break;
264
+ case 3:
265
+ return !0;
266
+ }
267
+ }
268
+ return !0;
269
+ }, "parse")
270
+ }, Rt = /* @__PURE__ */ function() {
271
+ var m = {
272
+ EOF: 1,
273
+ parseError: /* @__PURE__ */ o(function(r, a) {
274
+ if (this.yy.parser)
275
+ this.yy.parser.parseError(r, a);
276
+ else
277
+ throw new Error(r);
278
+ }, "parseError"),
279
+ // resets the lexer, sets new input
280
+ setInput: /* @__PURE__ */ o(function(r, a) {
281
+ return this.yy = a || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
282
+ first_line: 1,
283
+ first_column: 0,
284
+ last_line: 1,
285
+ last_column: 0
286
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
287
+ }, "setInput"),
288
+ // consumes and returns one char from the input
289
+ input: /* @__PURE__ */ o(function() {
290
+ var r = this._input[0];
291
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
292
+ var a = r.match(/(?:\r\n?|\n).*/g);
293
+ return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
294
+ }, "input"),
295
+ // unshifts one char (or a string) into the input
296
+ unput: /* @__PURE__ */ o(function(r) {
297
+ var a = r.length, n = r.split(/(?:\r\n?|\n)/g);
298
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
299
+ var h = this.match.split(/(?:\r\n?|\n)/g);
300
+ 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);
301
+ var t = this.yylloc.range;
302
+ return this.yylloc = {
303
+ first_line: this.yylloc.first_line,
304
+ last_line: this.yylineno + 1,
305
+ first_column: this.yylloc.first_column,
306
+ last_column: n ? (n.length === h.length ? this.yylloc.first_column : 0) + h[h.length - n.length].length - n[0].length : this.yylloc.first_column - a
307
+ }, this.options.ranges && (this.yylloc.range = [t[0], t[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
308
+ }, "unput"),
309
+ // When called from action, caches matched text and appends it on next action
310
+ more: /* @__PURE__ */ o(function() {
311
+ return this._more = !0, this;
312
+ }, "more"),
313
+ // 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.
314
+ reject: /* @__PURE__ */ o(function() {
315
+ if (this.options.backtrack_lexer)
316
+ this._backtrack = !0;
317
+ else
318
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
319
+ ` + this.showPosition(), {
320
+ text: "",
321
+ token: null,
322
+ line: this.yylineno
323
+ });
324
+ return this;
325
+ }, "reject"),
326
+ // retain first n characters of the match
327
+ less: /* @__PURE__ */ o(function(r) {
328
+ this.unput(this.match.slice(r));
329
+ }, "less"),
330
+ // displays already matched input, i.e. for error messages
331
+ pastInput: /* @__PURE__ */ o(function() {
332
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
333
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
334
+ }, "pastInput"),
335
+ // displays upcoming input, i.e. for error messages
336
+ upcomingInput: /* @__PURE__ */ o(function() {
337
+ var r = this.match;
338
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
339
+ }, "upcomingInput"),
340
+ // displays the character position where the lexing error occurred, i.e. for error messages
341
+ showPosition: /* @__PURE__ */ o(function() {
342
+ var r = this.pastInput(), a = new Array(r.length + 1).join("-");
343
+ return r + this.upcomingInput() + `
344
+ ` + a + "^";
345
+ }, "showPosition"),
346
+ // test the lexed token: return FALSE when not a match, otherwise return token
347
+ test_match: /* @__PURE__ */ o(function(r, a) {
348
+ var n, h, t;
349
+ if (this.options.backtrack_lexer && (t = {
350
+ yylineno: this.yylineno,
351
+ yylloc: {
352
+ first_line: this.yylloc.first_line,
353
+ last_line: this.last_line,
354
+ first_column: this.yylloc.first_column,
355
+ last_column: this.yylloc.last_column
356
+ },
357
+ yytext: this.yytext,
358
+ match: this.match,
359
+ matches: this.matches,
360
+ matched: this.matched,
361
+ yyleng: this.yyleng,
362
+ offset: this.offset,
363
+ _more: this._more,
364
+ _input: this._input,
365
+ yy: this.yy,
366
+ conditionStack: this.conditionStack.slice(0),
367
+ done: this.done
368
+ }, this.options.ranges && (t.yylloc.range = this.yylloc.range.slice(0))), h = r[0].match(/(?:\r\n?|\n).*/g), h && (this.yylineno += h.length), this.yylloc = {
369
+ first_line: this.yylloc.last_line,
370
+ last_line: this.yylineno + 1,
371
+ first_column: this.yylloc.last_column,
372
+ last_column: h ? h[h.length - 1].length - h[h.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
373
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, 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(r[0].length), this.matched += r[0], n = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
374
+ return n;
375
+ if (this._backtrack) {
376
+ for (var p in t)
377
+ this[p] = t[p];
378
+ return !1;
379
+ }
380
+ return !1;
381
+ }, "test_match"),
382
+ // return next match in input
383
+ next: /* @__PURE__ */ o(function() {
384
+ if (this.done)
385
+ return this.EOF;
386
+ this._input || (this.done = !0);
387
+ var r, a, n, h;
388
+ this._more || (this.yytext = "", this.match = "");
389
+ for (var t = this._currentRules(), p = 0; p < t.length; p++)
390
+ if (n = this._input.match(this.rules[t[p]]), n && (!a || n[0].length > a[0].length)) {
391
+ if (a = n, h = p, this.options.backtrack_lexer) {
392
+ if (r = this.test_match(n, t[p]), r !== !1)
393
+ return r;
394
+ if (this._backtrack) {
395
+ a = !1;
396
+ continue;
397
+ } else
398
+ return !1;
399
+ } else if (!this.options.flex)
400
+ break;
401
+ }
402
+ return a ? (r = this.test_match(a, t[h]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
403
+ ` + this.showPosition(), {
404
+ text: "",
405
+ token: null,
406
+ line: this.yylineno
407
+ });
408
+ }, "next"),
409
+ // return next match that has a token
410
+ lex: /* @__PURE__ */ o(function() {
411
+ var r = this.next();
412
+ return r || this.lex();
413
+ }, "lex"),
414
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
415
+ begin: /* @__PURE__ */ o(function(r) {
416
+ this.conditionStack.push(r);
417
+ }, "begin"),
418
+ // pop the previously active lexer condition state off the condition stack
419
+ popState: /* @__PURE__ */ o(function() {
420
+ var r = this.conditionStack.length - 1;
421
+ return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
422
+ }, "popState"),
423
+ // produce the lexer rule set which is active for the currently active lexer condition state
424
+ _currentRules: /* @__PURE__ */ o(function() {
425
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
426
+ }, "_currentRules"),
427
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
428
+ topState: /* @__PURE__ */ o(function(r) {
429
+ return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
430
+ }, "topState"),
431
+ // alias for begin(condition)
432
+ pushState: /* @__PURE__ */ o(function(r) {
433
+ this.begin(r);
434
+ }, "pushState"),
435
+ // return the number of states currently on the stack
436
+ stateStackSize: /* @__PURE__ */ o(function() {
437
+ return this.conditionStack.length;
438
+ }, "stateStackSize"),
439
+ options: { "case-insensitive": !0 },
440
+ performAction: /* @__PURE__ */ o(function(r, a, n, h) {
441
+ switch (n) {
442
+ case 0:
443
+ return this.begin("acc_title"), 24;
444
+ case 1:
445
+ return this.popState(), "acc_title_value";
446
+ case 2:
447
+ return this.begin("acc_descr"), 26;
448
+ case 3:
449
+ return this.popState(), "acc_descr_value";
450
+ case 4:
451
+ this.begin("acc_descr_multiline");
452
+ break;
453
+ case 5:
454
+ this.popState();
455
+ break;
456
+ case 6:
457
+ return "acc_descr_multiline_value";
458
+ case 7:
459
+ return 33;
460
+ case 8:
461
+ return 34;
462
+ case 9:
463
+ return 35;
464
+ case 10:
465
+ return 36;
466
+ case 11:
467
+ return 10;
468
+ case 12:
469
+ break;
470
+ case 13:
471
+ return 8;
472
+ case 14:
473
+ return 50;
474
+ case 15:
475
+ return 70;
476
+ case 16:
477
+ return 4;
478
+ case 17:
479
+ return this.begin("block"), 17;
480
+ case 18:
481
+ return 49;
482
+ case 19:
483
+ return 49;
484
+ case 20:
485
+ return 42;
486
+ case 21:
487
+ return 15;
488
+ case 22:
489
+ return 13;
490
+ case 23:
491
+ break;
492
+ case 24:
493
+ return 59;
494
+ case 25:
495
+ return 56;
496
+ case 26:
497
+ return 56;
498
+ case 27:
499
+ return 60;
500
+ case 28:
501
+ break;
502
+ case 29:
503
+ return this.popState(), 19;
504
+ case 30:
505
+ return a.yytext[0];
506
+ case 31:
507
+ return 20;
508
+ case 32:
509
+ return 21;
510
+ case 33:
511
+ return this.begin("style"), 44;
512
+ case 34:
513
+ return this.popState(), 10;
514
+ case 35:
515
+ break;
516
+ case 36:
517
+ return 13;
518
+ case 37:
519
+ return 42;
520
+ case 38:
521
+ return 49;
522
+ case 39:
523
+ return this.begin("style"), 37;
524
+ case 40:
525
+ return 43;
526
+ case 41:
527
+ return 63;
528
+ case 42:
529
+ return 65;
530
+ case 43:
531
+ return 65;
532
+ case 44:
533
+ return 65;
534
+ case 45:
535
+ return 63;
536
+ case 46:
537
+ return 63;
538
+ case 47:
539
+ return 64;
540
+ case 48:
541
+ return 64;
542
+ case 49:
543
+ return 64;
544
+ case 50:
545
+ return 64;
546
+ case 51:
547
+ return 64;
548
+ case 52:
549
+ return 65;
550
+ case 53:
551
+ return 64;
552
+ case 54:
553
+ return 65;
554
+ case 55:
555
+ return 66;
556
+ case 56:
557
+ return 66;
558
+ case 57:
559
+ return 66;
560
+ case 58:
561
+ return 66;
562
+ case 59:
563
+ return 63;
564
+ case 60:
565
+ return 64;
566
+ case 61:
567
+ return 65;
568
+ case 62:
569
+ return 67;
570
+ case 63:
571
+ return 68;
572
+ case 64:
573
+ return 69;
574
+ case 65:
575
+ return 69;
576
+ case 66:
577
+ return 68;
578
+ case 67:
579
+ return 68;
580
+ case 68:
581
+ return 68;
582
+ case 69:
583
+ return 41;
584
+ case 70:
585
+ return 47;
586
+ case 71:
587
+ return 40;
588
+ case 72:
589
+ return 48;
590
+ case 73:
591
+ return a.yytext[0];
592
+ case 74:
593
+ return 6;
594
+ }
595
+ }, "anonymous"),
596
+ rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/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, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:#)/i, /^(?:#)/i, /^(?:,)/i, /^(?::::)/i, /^(?::)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:([^\s]*)[~].*[~]([^\s]*))/i, /^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:style\b)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?::)/i, /^(?:,)/i, /^(?:#)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:;)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:[0-9])/i, /^(?:.)/i, /^(?:$)/i],
597
+ conditions: { style: { rules: [34, 35, 36, 37, 38, 69, 70], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, block: { rules: [23, 24, 25, 26, 27, 28, 29, 30], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 31, 32, 33, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74], inclusive: !0 } }
598
+ };
599
+ return m;
600
+ }();
601
+ rt.lexer = Rt;
602
+ function W() {
603
+ this.yy = {};
604
+ }
605
+ return o(W, "Parser"), W.prototype = rt, rt.Parser = W, new W();
606
+ }();
607
+ ut.parser = ut;
608
+ var Xt = ut, ht, Qt = (ht = class {
609
+ constructor() {
610
+ this.entities = /* @__PURE__ */ new Map(), this.relationships = [], this.classes = /* @__PURE__ */ new Map(), this.direction = "TB", this.Cardinality = {
611
+ ZERO_OR_ONE: "ZERO_OR_ONE",
612
+ ZERO_OR_MORE: "ZERO_OR_MORE",
613
+ ONE_OR_MORE: "ONE_OR_MORE",
614
+ ONLY_ONE: "ONLY_ONE",
615
+ MD_PARENT: "MD_PARENT"
616
+ }, this.Identification = {
617
+ NON_IDENTIFYING: "NON_IDENTIFYING",
618
+ IDENTIFYING: "IDENTIFYING"
619
+ }, this.setAccTitle = Dt, this.getAccTitle = wt, this.setAccDescription = Lt, this.getAccDescription = Mt, this.setDiagramTitle = Bt, this.getDiagramTitle = Ft, this.getConfig = /* @__PURE__ */ o(() => H().er, "getConfig"), this.clear(), this.addEntity = this.addEntity.bind(this), this.addAttributes = this.addAttributes.bind(this), this.addRelationship = this.addRelationship.bind(this), this.setDirection = this.setDirection.bind(this), this.addCssStyles = this.addCssStyles.bind(this), this.addClass = this.addClass.bind(this), this.setClass = this.setClass.bind(this), this.setAccTitle = this.setAccTitle.bind(this), this.setAccDescription = this.setAccDescription.bind(this);
620
+ }
621
+ /**
622
+ * Add entity
623
+ * @param name - The name of the entity
624
+ * @param alias - The alias of the entity
625
+ */
626
+ addEntity(e, i = "") {
627
+ var u;
628
+ return this.entities.has(e) ? !((u = this.entities.get(e)) != null && u.alias) && i && (this.entities.get(e).alias = i, $.info(`Add alias '${i}' to entity '${e}'`)) : (this.entities.set(e, {
629
+ id: `entity-${e}-${this.entities.size}`,
630
+ label: e,
631
+ attributes: [],
632
+ alias: i,
633
+ shape: "erBox",
634
+ look: H().look ?? "default",
635
+ cssClasses: "default",
636
+ cssStyles: []
637
+ }), $.info("Added new entity :", e)), this.entities.get(e);
638
+ }
639
+ getEntity(e) {
640
+ return this.entities.get(e);
641
+ }
642
+ getEntities() {
643
+ return this.entities;
644
+ }
645
+ getClasses() {
646
+ return this.classes;
647
+ }
648
+ addAttributes(e, i) {
649
+ const u = this.addEntity(e);
650
+ let c;
651
+ for (c = i.length - 1; c >= 0; c--)
652
+ i[c].keys || (i[c].keys = []), i[c].comment || (i[c].comment = ""), u.attributes.push(i[c]), $.debug("Added attribute ", i[c].name);
653
+ }
654
+ /**
655
+ * Add a relationship
656
+ *
657
+ * @param entA - The first entity in the relationship
658
+ * @param rolA - The role played by the first entity in relation to the second
659
+ * @param entB - The second entity in the relationship
660
+ * @param rSpec - The details of the relationship between the two entities
661
+ */
662
+ addRelationship(e, i, u, c) {
663
+ const l = this.entities.get(e), y = this.entities.get(u);
664
+ if (!l || !y)
665
+ return;
666
+ const R = {
667
+ entityA: l.id,
668
+ roleA: i,
669
+ entityB: y.id,
670
+ relSpec: c
671
+ };
672
+ this.relationships.push(R), $.debug("Added new relationship :", R);
673
+ }
674
+ getRelationships() {
675
+ return this.relationships;
676
+ }
677
+ getDirection() {
678
+ return this.direction;
679
+ }
680
+ setDirection(e) {
681
+ this.direction = e;
682
+ }
683
+ getCompiledStyles(e) {
684
+ let i = [];
685
+ for (const u of e) {
686
+ const c = this.classes.get(u);
687
+ c != null && c.styles && (i = [...i, ...c.styles ?? []].map((l) => l.trim())), c != null && c.textStyles && (i = [...i, ...c.textStyles ?? []].map((l) => l.trim()));
688
+ }
689
+ return i;
690
+ }
691
+ addCssStyles(e, i) {
692
+ for (const u of e) {
693
+ const c = this.entities.get(u);
694
+ if (!i || !c)
695
+ return;
696
+ for (const l of i)
697
+ c.cssStyles.push(l);
698
+ }
699
+ }
700
+ addClass(e, i) {
701
+ e.forEach((u) => {
702
+ let c = this.classes.get(u);
703
+ c === void 0 && (c = { id: u, styles: [], textStyles: [] }, this.classes.set(u, c)), i && i.forEach(function(l) {
704
+ if (/color/.exec(l)) {
705
+ const y = l.replace("fill", "bgFill");
706
+ c.textStyles.push(y);
707
+ }
708
+ c.styles.push(l);
709
+ });
710
+ });
711
+ }
712
+ setClass(e, i) {
713
+ for (const u of e) {
714
+ const c = this.entities.get(u);
715
+ if (c)
716
+ for (const l of i)
717
+ c.cssClasses += " " + l;
718
+ }
719
+ }
720
+ clear() {
721
+ this.entities = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.relationships = [], Yt();
722
+ }
723
+ getData() {
724
+ const e = [], i = [], u = H();
725
+ for (const l of this.entities.keys()) {
726
+ const y = this.entities.get(l);
727
+ y && (y.cssCompiledStyles = this.getCompiledStyles(y.cssClasses.split(" ")), e.push(y));
728
+ }
729
+ let c = 0;
730
+ for (const l of this.relationships) {
731
+ const y = {
732
+ id: Pt(l.entityA, l.entityB, {
733
+ prefix: "id",
734
+ counter: c++
735
+ }),
736
+ type: "normal",
737
+ curve: "basis",
738
+ start: l.entityA,
739
+ end: l.entityB,
740
+ label: l.roleA,
741
+ labelpos: "c",
742
+ thickness: "normal",
743
+ classes: "relationshipLine",
744
+ arrowTypeStart: l.relSpec.cardB.toLowerCase(),
745
+ arrowTypeEnd: l.relSpec.cardA.toLowerCase(),
746
+ pattern: l.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
747
+ look: u.look
748
+ };
749
+ i.push(y);
750
+ }
751
+ return { nodes: e, edges: i, other: {}, config: u, direction: "TB" };
752
+ }
753
+ }, o(ht, "ErDB"), ht), Nt = {};
754
+ Kt(Nt, {
755
+ draw: () => qt
756
+ });
757
+ var qt = /* @__PURE__ */ o(async function(e, i, u, c) {
758
+ $.info("REF0:"), $.info("Drawing er diagram (unified)", i);
759
+ const { securityLevel: l, er: y, layout: R } = H(), b = c.db.getData(), E = vt(i, l);
760
+ b.type = c.type, b.layoutAlgorithm = Zt(R), b.config.flowchart.nodeSpacing = (y == null ? void 0 : y.nodeSpacing) || 140, b.config.flowchart.rankSpacing = (y == null ? void 0 : y.rankSpacing) || 80, b.direction = c.db.getDirection(), b.markers = ["only_one", "zero_or_one", "one_or_more", "zero_or_more"], b.diagramId = i, await Gt(b, E), b.layoutAlgorithm === "elk" && E.select(".edges").lower();
761
+ const D = E.selectAll('[id*="-background"]');
762
+ Array.from(D).length > 0 && D.each(function() {
763
+ const O = Ut(this), K = O.attr("id").replace("-background", ""), w = E.select(`#${CSS.escape(K)}`);
764
+ if (!w.empty()) {
765
+ const A = w.attr("transform");
766
+ O.attr("transform", A);
767
+ }
768
+ }), jt.insertTitle(
769
+ E,
770
+ "erDiagramTitleText",
771
+ (y == null ? void 0 : y.titleTopMargin) ?? 25,
772
+ c.db.getDiagramTitle()
773
+ ), $t(E, 8, "erDiagram", (y == null ? void 0 : y.useMaxWidth) ?? !0);
774
+ }, "draw"), Ht = /* @__PURE__ */ o((e, i) => {
775
+ const u = Wt, c = u(e, "r"), l = u(e, "g"), y = u(e, "b");
776
+ return zt(c, l, y, i);
777
+ }, "fade"), Vt = /* @__PURE__ */ o((e) => `
778
+ .entityBox {
779
+ fill: ${e.mainBkg};
780
+ stroke: ${e.nodeBorder};
781
+ }
782
+
783
+ .relationshipLabelBox {
784
+ fill: ${e.tertiaryColor};
785
+ opacity: 0.7;
786
+ background-color: ${e.tertiaryColor};
787
+ rect {
788
+ opacity: 0.5;
789
+ }
790
+ }
791
+
792
+ .labelBkg {
793
+ background-color: ${Ht(e.tertiaryColor, 0.5)};
794
+ }
795
+
796
+ .edgeLabel .label {
797
+ fill: ${e.nodeBorder};
798
+ font-size: 14px;
799
+ }
800
+
801
+ .label {
802
+ font-family: ${e.fontFamily};
803
+ color: ${e.nodeTextColor || e.textColor};
804
+ }
805
+
806
+ .edge-pattern-dashed {
807
+ stroke-dasharray: 8,8;
808
+ }
809
+
810
+ .node rect,
811
+ .node circle,
812
+ .node ellipse,
813
+ .node polygon
814
+ {
815
+ fill: ${e.mainBkg};
816
+ stroke: ${e.nodeBorder};
817
+ stroke-width: 1px;
818
+ }
819
+
820
+ .relationshipLine {
821
+ stroke: ${e.lineColor};
822
+ stroke-width: 1;
823
+ fill: none;
824
+ }
825
+
826
+ .marker {
827
+ fill: none !important;
828
+ stroke: ${e.lineColor} !important;
829
+ stroke-width: 1;
830
+ }
831
+ `, "getStyles"), Jt = Vt, ne = {
832
+ parser: Xt,
833
+ get db() {
834
+ return new Qt();
835
+ },
836
+ renderer: Nt,
837
+ styles: Jt
838
+ };
839
+ export {
840
+ ne as diagram
841
+ };