@prefecthq/prefab-ui-docs 0.16.3 → 0.18.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 (66) hide show
  1. package/dist/_renderer/_basePickBy-fiErwOTY.mjs +151 -0
  2. package/dist/_renderer/_baseUniq-Iy7gOYgw.mjs +614 -0
  3. package/dist/_renderer/arc-BYm2F1-h.mjs +83 -0
  4. package/dist/_renderer/architectureDiagram-2XIMDMQ5-BKR0-ZSX.mjs +4683 -0
  5. package/dist/_renderer/band-TE_TbDmh.mjs +56 -0
  6. package/dist/_renderer/blockDiagram-WCTKOSBZ-BruGG_9M.mjs +2298 -0
  7. package/dist/_renderer/c4Diagram-IC4MRINW-K4nxeBNU.mjs +1581 -0
  8. package/dist/_renderer/channel-D4_UYSAN.mjs +5 -0
  9. package/dist/_renderer/charts-CPJdqwrq.mjs +19182 -0
  10. package/dist/_renderer/chunk-4BX2VUAB-mqLb5fm9.mjs +9 -0
  11. package/dist/_renderer/chunk-55IACEB6-Bxgi9T70.mjs +8 -0
  12. package/dist/_renderer/chunk-FMBD7UC4-Dsah75wQ.mjs +19 -0
  13. package/dist/_renderer/chunk-JSJVCQXG-Bsg6dsjU.mjs +68 -0
  14. package/dist/_renderer/chunk-KX2RTZJC-DvDXsxvC.mjs +20 -0
  15. package/dist/_renderer/chunk-NQ4KR5QH-CwFlbBfF.mjs +1384 -0
  16. package/dist/_renderer/chunk-QZHKN3VN-CYPyScRI.mjs +15 -0
  17. package/dist/_renderer/chunk-WL4C6EOR-2eYOPJVd.mjs +1430 -0
  18. package/dist/_renderer/classDiagram-VBA2DB6C-Dj8h8-wl.mjs +16 -0
  19. package/dist/_renderer/classDiagram-v2-RAHNMMFH-Dj8h8-wl.mjs +16 -0
  20. package/dist/_renderer/clone-BmajYOc3.mjs +8 -0
  21. package/dist/_renderer/{compound-calendar-Cn18AoRs.mjs → compound-calendar-8CggRUlt.mjs} +3 -3
  22. package/dist/_renderer/{content-e43PvxaF.mjs → content-BPYMcbeG.mjs} +6 -6
  23. package/dist/_renderer/cose-bilkent-S5V4N54A-BLhD0lt7.mjs +2609 -0
  24. package/dist/_renderer/cytoscape.esm-CjI2IsL8.mjs +18735 -0
  25. package/dist/_renderer/dagre-KLK3FWXG-DCIde85z.mjs +447 -0
  26. package/dist/_renderer/defaultLocale-BgPVtth8.mjs +171 -0
  27. package/dist/_renderer/diagram-E7M64L7V-BbWs-jbo.mjs +533 -0
  28. package/dist/_renderer/diagram-IFDJBPK2-Sfx8kanl.mjs +221 -0
  29. package/dist/_renderer/diagram-P4PSJMXO-DCqYaW3Z.mjs +143 -0
  30. package/dist/_renderer/{embed-DRE2wKZJ.mjs → embed-hOWEFnqe.mjs} +4474 -4439
  31. package/dist/_renderer/embed.mjs +1 -1
  32. package/dist/_renderer/erDiagram-INFDFZHY-D8cdLSCi.mjs +863 -0
  33. package/dist/_renderer/flowDiagram-PKNHOUZH-B_rW2Xww.mjs +1647 -0
  34. package/dist/_renderer/ganttDiagram-A5KZAMGK-Be_Svnat.mjs +1964 -0
  35. package/dist/_renderer/gitGraphDiagram-K3NZZRJ6--wMgYsSv.mjs +709 -0
  36. package/dist/_renderer/graph-alLjIojU.mjs +604 -0
  37. package/dist/_renderer/{icons-CImNZgDa.mjs → icons-w8tvN_30.mjs} +155 -135
  38. package/dist/_renderer/infoDiagram-LFFYTUFH-QW1PzgNF.mjs +24 -0
  39. package/dist/_renderer/init-DxzjmxYy.mjs +32 -0
  40. package/dist/_renderer/ishikawaDiagram-PHBUUO56-xY8fsGh3.mjs +621 -0
  41. package/dist/_renderer/journeyDiagram-4ABVD52K-7XeHSH9G.mjs +834 -0
  42. package/dist/_renderer/kanban-definition-K7BYSVSG-Cn7INDI0.mjs +723 -0
  43. package/dist/_renderer/katex-AQJr8RMF.mjs +11623 -0
  44. package/dist/_renderer/layout-Bspk8k85.mjs +1335 -0
  45. package/dist/_renderer/linear-CVnzSbdA.mjs +275 -0
  46. package/dist/_renderer/mermaid-C_GnErbP.mjs +48 -0
  47. package/dist/_renderer/mermaid.core-BzbdT8_O.mjs +13838 -0
  48. package/dist/_renderer/mindmap-definition-YRQLILUH-CVIMKVZI.mjs +788 -0
  49. package/dist/_renderer/ordinal-Bq0KrZxK.mjs +62 -0
  50. package/dist/_renderer/pieDiagram-SKSYHLDU-CL_luPJM.mjs +162 -0
  51. package/dist/_renderer/{svg-BL0kMZ_p.mjs → purify.es-M2Bspgo5.mjs} +222 -240
  52. package/dist/_renderer/quadrantDiagram-337W2JSQ-BQWFWFNU.mjs +1024 -0
  53. package/dist/_renderer/requirementDiagram-Z7DCOOCP-Di29RxJ6.mjs +862 -0
  54. package/dist/_renderer/sankeyDiagram-WA2Y5GQK-DY4kgDbR.mjs +810 -0
  55. package/dist/_renderer/sequenceDiagram-2WXFIKYE-vjbD37pn.mjs +2823 -0
  56. package/dist/_renderer/stateDiagram-RAJIS63D-BQ9BAuO6.mjs +264 -0
  57. package/dist/_renderer/stateDiagram-v2-FVOUBMTO-Bs26kEor.mjs +16 -0
  58. package/dist/_renderer/string-kGvNrjOo.mjs +934 -0
  59. package/dist/_renderer/svg-BTtf8EdH.mjs +22 -0
  60. package/dist/_renderer/time-sQ_UKgU4.mjs +765 -0
  61. package/dist/_renderer/timeline-definition-YZTLITO2-CJfaRgME.mjs +799 -0
  62. package/dist/_renderer/treemap-KZPCXAKY-DQq6TCTm.mjs +17996 -0
  63. package/dist/_renderer/vennDiagram-LZ73GAT5-BkBksHrj.mjs +1564 -0
  64. package/dist/_renderer/xychartDiagram-JWTSCODW-Boo1R-nF.mjs +1299 -0
  65. package/package.json +1 -1
  66. package/dist/_renderer/charts-Dr57vKmb.mjs +0 -21311
@@ -0,0 +1,863 @@
1
+ import { g as Vt } from "./chunk-55IACEB6-Bxgi9T70.mjs";
2
+ import { s as Mt } from "./chunk-KX2RTZJC-DvDXsxvC.mjs";
3
+ import { _ as u, b as Bt, a as Ft, s as Yt, g as Pt, p as zt, q as Gt, c as it, l as L, y as Kt, x as Ut, A as Zt, B as jt, o as Wt, r as Qt, d as Xt, u as qt } from "./mermaid.core-BzbdT8_O.mjs";
4
+ import { c as Ht } from "./channel-D4_UYSAN.mjs";
5
+ var _t = (function() {
6
+ var s = /* @__PURE__ */ u(function(R, n, a, c) {
7
+ for (a = a || {}, c = R.length; c--; a[R[c]] = n) ;
8
+ return a;
9
+ }, "o"), i = [6, 8, 10, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 48, 50, 51, 52], h = [1, 10], d = [1, 11], o = [1, 12], l = [1, 13], f = [1, 23], _ = [1, 24], E = [1, 25], V = [1, 26], W = [1, 27], S = [1, 19], rt = [1, 28], Q = [1, 29], T = [1, 20], I = [1, 18], M = [1, 21], B = [1, 22], nt = [1, 36], at = [1, 37], ct = [1, 38], lt = [1, 39], ot = [1, 40], F = [6, 8, 10, 13, 15, 17, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 48, 50, 51, 52, 65, 66, 67, 68, 69], O = [1, 45], N = [1, 46], Y = [1, 55], P = [40, 48, 50, 51, 52, 70, 71], z = [1, 66], G = [1, 64], A = [1, 61], K = [1, 65], U = [1, 67], X = [6, 8, 10, 13, 17, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 48, 49, 50, 51, 52, 65, 66, 67, 68, 69], gt = [65, 66, 67, 68, 69], bt = [1, 84], mt = [1, 83], Et = [1, 81], kt = [1, 82], St = [6, 10, 42, 47], v = [6, 10, 13, 41, 42, 47, 48, 49], q = [1, 92], H = [1, 91], J = [1, 90], Z = [19, 58], Tt = [1, 101], Ot = [1, 100], ht = [19, 58, 60, 62], ut = {
10
+ trace: /* @__PURE__ */ u(function() {
11
+ }, "trace"),
12
+ yy: {},
13
+ 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, DECIMAL_NUM: 51, ENTITY_ONE: 52, attribute: 53, attributeType: 54, attributeName: 55, attributeKeyTypeList: 56, attributeComment: 57, ATTRIBUTE_WORD: 58, attributeKeyType: 59, ",": 60, ATTRIBUTE_KEY: 61, COMMENT: 62, cardinality: 63, relType: 64, ZERO_OR_ONE: 65, ZERO_OR_MORE: 66, ONE_OR_MORE: 67, ONLY_ONE: 68, MD_PARENT: 69, NON_IDENTIFYING: 70, IDENTIFYING: 71, WORD: 72, $accept: 0, $end: 1 },
14
+ 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", 51: "DECIMAL_NUM", 52: "ENTITY_ONE", 58: "ATTRIBUTE_WORD", 60: ",", 61: "ATTRIBUTE_KEY", 62: "COMMENT", 65: "ZERO_OR_ONE", 66: "ZERO_OR_MORE", 67: "ONE_OR_MORE", 68: "ONLY_ONE", 69: "MD_PARENT", 70: "NON_IDENTIFYING", 71: "IDENTIFYING", 72: "WORD" },
15
+ 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], [11, 1], [11, 1], [11, 1], [18, 1], [18, 2], [53, 2], [53, 3], [53, 3], [53, 4], [54, 1], [55, 1], [56, 1], [56, 3], [59, 1], [57, 1], [12, 3], [63, 1], [63, 1], [63, 1], [63, 1], [63, 1], [64, 1], [64, 1], [14, 1], [14, 1], [14, 1]],
16
+ performAction: /* @__PURE__ */ u(function(n, a, c, r, p, t, j) {
17
+ var e = t.length - 1;
18
+ switch (p) {
19
+ case 1:
20
+ break;
21
+ case 2:
22
+ this.$ = [];
23
+ break;
24
+ case 3:
25
+ t[e - 1].push(t[e]), this.$ = t[e - 1];
26
+ break;
27
+ case 4:
28
+ case 5:
29
+ this.$ = t[e];
30
+ break;
31
+ case 6:
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 8:
36
+ r.addEntity(t[e - 4]), r.addEntity(t[e - 2]), r.addRelationship(t[e - 4], t[e], t[e - 2], t[e - 3]);
37
+ break;
38
+ case 9:
39
+ r.addEntity(t[e - 8]), r.addEntity(t[e - 4]), r.addRelationship(t[e - 8], t[e], t[e - 4], t[e - 5]), r.setClass([t[e - 8]], t[e - 6]), r.setClass([t[e - 4]], t[e - 2]);
40
+ break;
41
+ case 10:
42
+ r.addEntity(t[e - 6]), r.addEntity(t[e - 2]), r.addRelationship(t[e - 6], t[e], t[e - 2], t[e - 3]), r.setClass([t[e - 6]], t[e - 4]);
43
+ break;
44
+ case 11:
45
+ r.addEntity(t[e - 6]), r.addEntity(t[e - 4]), r.addRelationship(t[e - 6], t[e], t[e - 4], t[e - 5]), r.setClass([t[e - 4]], t[e - 2]);
46
+ break;
47
+ case 12:
48
+ r.addEntity(t[e - 3]), r.addAttributes(t[e - 3], t[e - 1]);
49
+ break;
50
+ case 13:
51
+ r.addEntity(t[e - 5]), r.addAttributes(t[e - 5], t[e - 1]), r.setClass([t[e - 5]], t[e - 3]);
52
+ break;
53
+ case 14:
54
+ r.addEntity(t[e - 2]);
55
+ break;
56
+ case 15:
57
+ r.addEntity(t[e - 4]), r.setClass([t[e - 4]], t[e - 2]);
58
+ break;
59
+ case 16:
60
+ r.addEntity(t[e]);
61
+ break;
62
+ case 17:
63
+ r.addEntity(t[e - 2]), r.setClass([t[e - 2]], t[e]);
64
+ break;
65
+ case 18:
66
+ r.addEntity(t[e - 6], t[e - 4]), r.addAttributes(t[e - 6], t[e - 1]);
67
+ break;
68
+ case 19:
69
+ r.addEntity(t[e - 8], t[e - 6]), r.addAttributes(t[e - 8], t[e - 1]), r.setClass([t[e - 8]], t[e - 3]);
70
+ break;
71
+ case 20:
72
+ r.addEntity(t[e - 5], t[e - 3]);
73
+ break;
74
+ case 21:
75
+ r.addEntity(t[e - 7], t[e - 5]), r.setClass([t[e - 7]], t[e - 2]);
76
+ break;
77
+ case 22:
78
+ r.addEntity(t[e - 3], t[e - 1]);
79
+ break;
80
+ case 23:
81
+ r.addEntity(t[e - 5], t[e - 3]), r.setClass([t[e - 5]], t[e]);
82
+ break;
83
+ case 24:
84
+ case 25:
85
+ this.$ = t[e].trim(), r.setAccTitle(this.$);
86
+ break;
87
+ case 26:
88
+ case 27:
89
+ this.$ = t[e].trim(), r.setAccDescription(this.$);
90
+ break;
91
+ case 32:
92
+ r.setDirection("TB");
93
+ break;
94
+ case 33:
95
+ r.setDirection("BT");
96
+ break;
97
+ case 34:
98
+ r.setDirection("RL");
99
+ break;
100
+ case 35:
101
+ r.setDirection("LR");
102
+ break;
103
+ case 36:
104
+ this.$ = t[e - 3], r.addClass(t[e - 2], t[e - 1]);
105
+ break;
106
+ case 37:
107
+ case 38:
108
+ case 59:
109
+ case 67:
110
+ this.$ = [t[e]];
111
+ break;
112
+ case 39:
113
+ case 40:
114
+ this.$ = t[e - 2].concat([t[e]]);
115
+ break;
116
+ case 41:
117
+ this.$ = t[e - 2], r.setClass(t[e - 1], t[e]);
118
+ break;
119
+ case 42:
120
+ this.$ = t[e - 3], r.addCssStyles(t[e - 2], t[e - 1]);
121
+ break;
122
+ case 43:
123
+ this.$ = [t[e]];
124
+ break;
125
+ case 44:
126
+ t[e - 2].push(t[e]), this.$ = t[e - 2];
127
+ break;
128
+ case 46:
129
+ this.$ = t[e - 1] + t[e];
130
+ break;
131
+ case 54:
132
+ case 79:
133
+ case 80:
134
+ this.$ = t[e].replace(/"/g, "");
135
+ break;
136
+ case 55:
137
+ case 56:
138
+ case 57:
139
+ case 58:
140
+ case 81:
141
+ this.$ = t[e];
142
+ break;
143
+ case 60:
144
+ t[e].push(t[e - 1]), this.$ = t[e];
145
+ break;
146
+ case 61:
147
+ this.$ = { type: t[e - 1], name: t[e] };
148
+ break;
149
+ case 62:
150
+ this.$ = { type: t[e - 2], name: t[e - 1], keys: t[e] };
151
+ break;
152
+ case 63:
153
+ this.$ = { type: t[e - 2], name: t[e - 1], comment: t[e] };
154
+ break;
155
+ case 64:
156
+ this.$ = { type: t[e - 3], name: t[e - 2], keys: t[e - 1], comment: t[e] };
157
+ break;
158
+ case 65:
159
+ case 66:
160
+ case 69:
161
+ this.$ = t[e];
162
+ break;
163
+ case 68:
164
+ t[e - 2].push(t[e]), this.$ = t[e - 2];
165
+ break;
166
+ case 70:
167
+ this.$ = t[e].replace(/"/g, "");
168
+ break;
169
+ case 71:
170
+ this.$ = { cardA: t[e], relType: t[e - 1], cardB: t[e - 2] };
171
+ break;
172
+ case 72:
173
+ this.$ = r.Cardinality.ZERO_OR_ONE;
174
+ break;
175
+ case 73:
176
+ this.$ = r.Cardinality.ZERO_OR_MORE;
177
+ break;
178
+ case 74:
179
+ this.$ = r.Cardinality.ONE_OR_MORE;
180
+ break;
181
+ case 75:
182
+ this.$ = r.Cardinality.ONLY_ONE;
183
+ break;
184
+ case 76:
185
+ this.$ = r.Cardinality.MD_PARENT;
186
+ break;
187
+ case 77:
188
+ this.$ = r.Identification.NON_IDENTIFYING;
189
+ break;
190
+ case 78:
191
+ this.$ = r.Identification.IDENTIFYING;
192
+ break;
193
+ }
194
+ }, "anonymous"),
195
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, s(i, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 22: h, 24: d, 26: o, 28: l, 29: 14, 30: 15, 31: 16, 32: 17, 33: f, 34: _, 35: E, 36: V, 37: W, 40: S, 43: rt, 44: Q, 48: T, 50: I, 51: M, 52: B }, s(i, [2, 7], { 1: [2, 1] }), s(i, [2, 3]), { 9: 30, 11: 9, 22: h, 24: d, 26: o, 28: l, 29: 14, 30: 15, 31: 16, 32: 17, 33: f, 34: _, 35: E, 36: V, 37: W, 40: S, 43: rt, 44: Q, 48: T, 50: I, 51: M, 52: B }, s(i, [2, 5]), s(i, [2, 6]), s(i, [2, 16], { 12: 31, 63: 35, 15: [1, 32], 17: [1, 33], 20: [1, 34], 65: nt, 66: at, 67: ct, 68: lt, 69: ot }), { 23: [1, 41] }, { 25: [1, 42] }, { 27: [1, 43] }, s(i, [2, 27]), s(i, [2, 28]), s(i, [2, 29]), s(i, [2, 30]), s(i, [2, 31]), s(F, [2, 54]), s(F, [2, 55]), s(F, [2, 56]), s(F, [2, 57]), s(F, [2, 58]), s(i, [2, 32]), s(i, [2, 33]), s(i, [2, 34]), s(i, [2, 35]), { 16: 44, 40: O, 41: N }, { 16: 47, 40: O, 41: N }, { 16: 48, 40: O, 41: N }, s(i, [2, 4]), { 11: 49, 40: S, 48: T, 50: I, 51: M, 52: B }, { 16: 50, 40: O, 41: N }, { 18: 51, 19: [1, 52], 53: 53, 54: 54, 58: Y }, { 11: 56, 40: S, 48: T, 50: I, 51: M, 52: B }, { 64: 57, 70: [1, 58], 71: [1, 59] }, s(P, [2, 72]), s(P, [2, 73]), s(P, [2, 74]), s(P, [2, 75]), s(P, [2, 76]), s(i, [2, 24]), s(i, [2, 25]), s(i, [2, 26]), { 13: z, 38: 60, 41: G, 42: A, 45: 62, 46: 63, 48: K, 49: U }, s(X, [2, 37]), s(X, [2, 38]), { 16: 68, 40: O, 41: N, 42: A }, { 13: z, 38: 69, 41: G, 42: A, 45: 62, 46: 63, 48: K, 49: U }, { 13: [1, 70], 15: [1, 71] }, s(i, [2, 17], { 63: 35, 12: 72, 17: [1, 73], 42: A, 65: nt, 66: at, 67: ct, 68: lt, 69: ot }), { 19: [1, 74] }, s(i, [2, 14]), { 18: 75, 19: [2, 59], 53: 53, 54: 54, 58: Y }, { 55: 76, 58: [1, 77] }, { 58: [2, 65] }, { 21: [1, 78] }, { 63: 79, 65: nt, 66: at, 67: ct, 68: lt, 69: ot }, s(gt, [2, 77]), s(gt, [2, 78]), { 6: bt, 10: mt, 39: 80, 42: Et, 47: kt }, { 40: [1, 85], 41: [1, 86] }, s(St, [2, 43], { 46: 87, 13: z, 41: G, 48: K, 49: U }), s(v, [2, 45]), s(v, [2, 50]), s(v, [2, 51]), s(v, [2, 52]), s(v, [2, 53]), s(i, [2, 41], { 42: A }), { 6: bt, 10: mt, 39: 88, 42: Et, 47: kt }, { 14: 89, 40: q, 50: H, 72: J }, { 16: 93, 40: O, 41: N }, { 11: 94, 40: S, 48: T, 50: I, 51: M, 52: B }, { 18: 95, 19: [1, 96], 53: 53, 54: 54, 58: Y }, s(i, [2, 12]), { 19: [2, 60] }, s(Z, [2, 61], { 56: 97, 57: 98, 59: 99, 61: Tt, 62: Ot }), s([19, 58, 61, 62], [2, 66]), s(i, [2, 22], { 15: [1, 103], 17: [1, 102] }), s([40, 48, 50, 51, 52], [2, 71]), s(i, [2, 36]), { 13: z, 41: G, 45: 104, 46: 63, 48: K, 49: U }, s(i, [2, 47]), s(i, [2, 48]), s(i, [2, 49]), s(X, [2, 39]), s(X, [2, 40]), s(v, [2, 46]), s(i, [2, 42]), s(i, [2, 8]), s(i, [2, 79]), s(i, [2, 80]), s(i, [2, 81]), { 13: [1, 105], 42: A }, { 13: [1, 107], 15: [1, 106] }, { 19: [1, 108] }, s(i, [2, 15]), s(Z, [2, 62], { 57: 109, 60: [1, 110], 62: Ot }), s(Z, [2, 63]), s(ht, [2, 67]), s(Z, [2, 70]), s(ht, [2, 69]), { 18: 111, 19: [1, 112], 53: 53, 54: 54, 58: Y }, { 16: 113, 40: O, 41: N }, s(St, [2, 44], { 46: 87, 13: z, 41: G, 48: K, 49: U }), { 14: 114, 40: q, 50: H, 72: J }, { 16: 115, 40: O, 41: N }, { 14: 116, 40: q, 50: H, 72: J }, s(i, [2, 13]), s(Z, [2, 64]), { 59: 117, 61: Tt }, { 19: [1, 118] }, s(i, [2, 20]), s(i, [2, 23], { 17: [1, 119], 42: A }), s(i, [2, 11]), { 13: [1, 120], 42: A }, s(i, [2, 10]), s(ht, [2, 68]), s(i, [2, 18]), { 18: 121, 19: [1, 122], 53: 53, 54: 54, 58: Y }, { 14: 123, 40: q, 50: H, 72: J }, { 19: [1, 124] }, s(i, [2, 21]), s(i, [2, 9]), s(i, [2, 19])],
196
+ defaultActions: { 55: [2, 65], 75: [2, 60] },
197
+ parseError: /* @__PURE__ */ u(function(n, a) {
198
+ if (a.recoverable)
199
+ this.trace(n);
200
+ else {
201
+ var c = new Error(n);
202
+ throw c.hash = a, c;
203
+ }
204
+ }, "parseError"),
205
+ parse: /* @__PURE__ */ u(function(n) {
206
+ var a = this, c = [0], r = [], p = [null], t = [], j = this.table, e = "", tt = 0, Nt = 0, vt = 2, At = 1, Dt = t.slice.call(arguments, 1), y = Object.create(this.lexer), x = { yy: {} };
207
+ for (var dt in this.yy)
208
+ Object.prototype.hasOwnProperty.call(this.yy, dt) && (x.yy[dt] = this.yy[dt]);
209
+ y.setInput(n, x.yy), x.yy.lexer = y, x.yy.parser = this, typeof y.yylloc > "u" && (y.yylloc = {});
210
+ var pt = y.yylloc;
211
+ t.push(pt);
212
+ var Lt = y.options && y.options.ranges;
213
+ typeof x.yy.parseError == "function" ? this.parseError = x.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
214
+ function wt(b) {
215
+ c.length = c.length - 2 * b, p.length = p.length - b, t.length = t.length - b;
216
+ }
217
+ u(wt, "popStack");
218
+ function Rt() {
219
+ var b;
220
+ return b = r.pop() || y.lex() || At, typeof b != "number" && (b instanceof Array && (r = b, b = r.pop()), b = a.symbols_[b] || b), b;
221
+ }
222
+ u(Rt, "lex");
223
+ for (var g, C, m, yt, D = {}, et, k, It, st; ; ) {
224
+ if (C = c[c.length - 1], this.defaultActions[C] ? m = this.defaultActions[C] : ((g === null || typeof g > "u") && (g = Rt()), m = j[C] && j[C][g]), typeof m > "u" || !m.length || !m[0]) {
225
+ var ft = "";
226
+ st = [];
227
+ for (et in j[C])
228
+ this.terminals_[et] && et > vt && st.push("'" + this.terminals_[et] + "'");
229
+ y.showPosition ? ft = "Parse error on line " + (tt + 1) + `:
230
+ ` + y.showPosition() + `
231
+ Expecting ` + st.join(", ") + ", got '" + (this.terminals_[g] || g) + "'" : ft = "Parse error on line " + (tt + 1) + ": Unexpected " + (g == At ? "end of input" : "'" + (this.terminals_[g] || g) + "'"), this.parseError(ft, {
232
+ text: y.match,
233
+ token: this.terminals_[g] || g,
234
+ line: y.yylineno,
235
+ loc: pt,
236
+ expected: st
237
+ });
238
+ }
239
+ if (m[0] instanceof Array && m.length > 1)
240
+ throw new Error("Parse Error: multiple actions possible at state: " + C + ", token: " + g);
241
+ switch (m[0]) {
242
+ case 1:
243
+ c.push(g), p.push(y.yytext), t.push(y.yylloc), c.push(m[1]), g = null, Nt = y.yyleng, e = y.yytext, tt = y.yylineno, pt = y.yylloc;
244
+ break;
245
+ case 2:
246
+ if (k = this.productions_[m[1]][1], D.$ = p[p.length - k], D._$ = {
247
+ first_line: t[t.length - (k || 1)].first_line,
248
+ last_line: t[t.length - 1].last_line,
249
+ first_column: t[t.length - (k || 1)].first_column,
250
+ last_column: t[t.length - 1].last_column
251
+ }, Lt && (D._$.range = [
252
+ t[t.length - (k || 1)].range[0],
253
+ t[t.length - 1].range[1]
254
+ ]), yt = this.performAction.apply(D, [
255
+ e,
256
+ Nt,
257
+ tt,
258
+ x.yy,
259
+ m[1],
260
+ p,
261
+ t
262
+ ].concat(Dt)), typeof yt < "u")
263
+ return yt;
264
+ k && (c = c.slice(0, -1 * k * 2), p = p.slice(0, -1 * k), t = t.slice(0, -1 * k)), c.push(this.productions_[m[1]][0]), p.push(D.$), t.push(D._$), It = j[c[c.length - 2]][c[c.length - 1]], c.push(It);
265
+ break;
266
+ case 3:
267
+ return !0;
268
+ }
269
+ }
270
+ return !0;
271
+ }, "parse")
272
+ }, Ct = /* @__PURE__ */ (function() {
273
+ var R = {
274
+ EOF: 1,
275
+ parseError: /* @__PURE__ */ u(function(a, c) {
276
+ if (this.yy.parser)
277
+ this.yy.parser.parseError(a, c);
278
+ else
279
+ throw new Error(a);
280
+ }, "parseError"),
281
+ // resets the lexer, sets new input
282
+ setInput: /* @__PURE__ */ u(function(n, a) {
283
+ return this.yy = a || this.yy || {}, this._input = n, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
284
+ first_line: 1,
285
+ first_column: 0,
286
+ last_line: 1,
287
+ last_column: 0
288
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
289
+ }, "setInput"),
290
+ // consumes and returns one char from the input
291
+ input: /* @__PURE__ */ u(function() {
292
+ var n = this._input[0];
293
+ this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n;
294
+ var a = n.match(/(?:\r\n?|\n).*/g);
295
+ 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), n;
296
+ }, "input"),
297
+ // unshifts one char (or a string) into the input
298
+ unput: /* @__PURE__ */ u(function(n) {
299
+ var a = n.length, c = n.split(/(?:\r\n?|\n)/g);
300
+ this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
301
+ var r = this.match.split(/(?:\r\n?|\n)/g);
302
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
303
+ var p = this.yylloc.range;
304
+ return this.yylloc = {
305
+ first_line: this.yylloc.first_line,
306
+ last_line: this.yylineno + 1,
307
+ first_column: this.yylloc.first_column,
308
+ last_column: c ? (c.length === r.length ? this.yylloc.first_column : 0) + r[r.length - c.length].length - c[0].length : this.yylloc.first_column - a
309
+ }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
310
+ }, "unput"),
311
+ // When called from action, caches matched text and appends it on next action
312
+ more: /* @__PURE__ */ u(function() {
313
+ return this._more = !0, this;
314
+ }, "more"),
315
+ // 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.
316
+ reject: /* @__PURE__ */ u(function() {
317
+ if (this.options.backtrack_lexer)
318
+ this._backtrack = !0;
319
+ else
320
+ 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).
321
+ ` + this.showPosition(), {
322
+ text: "",
323
+ token: null,
324
+ line: this.yylineno
325
+ });
326
+ return this;
327
+ }, "reject"),
328
+ // retain first n characters of the match
329
+ less: /* @__PURE__ */ u(function(n) {
330
+ this.unput(this.match.slice(n));
331
+ }, "less"),
332
+ // displays already matched input, i.e. for error messages
333
+ pastInput: /* @__PURE__ */ u(function() {
334
+ var n = this.matched.substr(0, this.matched.length - this.match.length);
335
+ return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "");
336
+ }, "pastInput"),
337
+ // displays upcoming input, i.e. for error messages
338
+ upcomingInput: /* @__PURE__ */ u(function() {
339
+ var n = this.match;
340
+ return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "");
341
+ }, "upcomingInput"),
342
+ // displays the character position where the lexing error occurred, i.e. for error messages
343
+ showPosition: /* @__PURE__ */ u(function() {
344
+ var n = this.pastInput(), a = new Array(n.length + 1).join("-");
345
+ return n + this.upcomingInput() + `
346
+ ` + a + "^";
347
+ }, "showPosition"),
348
+ // test the lexed token: return FALSE when not a match, otherwise return token
349
+ test_match: /* @__PURE__ */ u(function(n, a) {
350
+ var c, r, p;
351
+ if (this.options.backtrack_lexer && (p = {
352
+ yylineno: this.yylineno,
353
+ yylloc: {
354
+ first_line: this.yylloc.first_line,
355
+ last_line: this.last_line,
356
+ first_column: this.yylloc.first_column,
357
+ last_column: this.yylloc.last_column
358
+ },
359
+ yytext: this.yytext,
360
+ match: this.match,
361
+ matches: this.matches,
362
+ matched: this.matched,
363
+ yyleng: this.yyleng,
364
+ offset: this.offset,
365
+ _more: this._more,
366
+ _input: this._input,
367
+ yy: this.yy,
368
+ conditionStack: this.conditionStack.slice(0),
369
+ done: this.done
370
+ }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), r = n[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
371
+ first_line: this.yylloc.last_line,
372
+ last_line: this.yylineno + 1,
373
+ first_column: this.yylloc.last_column,
374
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length
375
+ }, this.yytext += n[0], this.match += n[0], this.matches = n, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(n[0].length), this.matched += n[0], c = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
376
+ return c;
377
+ if (this._backtrack) {
378
+ for (var t in p)
379
+ this[t] = p[t];
380
+ return !1;
381
+ }
382
+ return !1;
383
+ }, "test_match"),
384
+ // return next match in input
385
+ next: /* @__PURE__ */ u(function() {
386
+ if (this.done)
387
+ return this.EOF;
388
+ this._input || (this.done = !0);
389
+ var n, a, c, r;
390
+ this._more || (this.yytext = "", this.match = "");
391
+ for (var p = this._currentRules(), t = 0; t < p.length; t++)
392
+ if (c = this._input.match(this.rules[p[t]]), c && (!a || c[0].length > a[0].length)) {
393
+ if (a = c, r = t, this.options.backtrack_lexer) {
394
+ if (n = this.test_match(c, p[t]), n !== !1)
395
+ return n;
396
+ if (this._backtrack) {
397
+ a = !1;
398
+ continue;
399
+ } else
400
+ return !1;
401
+ } else if (!this.options.flex)
402
+ break;
403
+ }
404
+ return a ? (n = this.test_match(a, p[r]), n !== !1 ? n : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
405
+ ` + this.showPosition(), {
406
+ text: "",
407
+ token: null,
408
+ line: this.yylineno
409
+ });
410
+ }, "next"),
411
+ // return next match that has a token
412
+ lex: /* @__PURE__ */ u(function() {
413
+ var a = this.next();
414
+ return a || this.lex();
415
+ }, "lex"),
416
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
417
+ begin: /* @__PURE__ */ u(function(a) {
418
+ this.conditionStack.push(a);
419
+ }, "begin"),
420
+ // pop the previously active lexer condition state off the condition stack
421
+ popState: /* @__PURE__ */ u(function() {
422
+ var a = this.conditionStack.length - 1;
423
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
424
+ }, "popState"),
425
+ // produce the lexer rule set which is active for the currently active lexer condition state
426
+ _currentRules: /* @__PURE__ */ u(function() {
427
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
428
+ }, "_currentRules"),
429
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
430
+ topState: /* @__PURE__ */ u(function(a) {
431
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
432
+ }, "topState"),
433
+ // alias for begin(condition)
434
+ pushState: /* @__PURE__ */ u(function(a) {
435
+ this.begin(a);
436
+ }, "pushState"),
437
+ // return the number of states currently on the stack
438
+ stateStackSize: /* @__PURE__ */ u(function() {
439
+ return this.conditionStack.length;
440
+ }, "stateStackSize"),
441
+ options: { "case-insensitive": !0 },
442
+ performAction: /* @__PURE__ */ u(function(a, c, r, p) {
443
+ switch (r) {
444
+ case 0:
445
+ return this.begin("acc_title"), 24;
446
+ case 1:
447
+ return this.popState(), "acc_title_value";
448
+ case 2:
449
+ return this.begin("acc_descr"), 26;
450
+ case 3:
451
+ return this.popState(), "acc_descr_value";
452
+ case 4:
453
+ this.begin("acc_descr_multiline");
454
+ break;
455
+ case 5:
456
+ this.popState();
457
+ break;
458
+ case 6:
459
+ return "acc_descr_multiline_value";
460
+ case 7:
461
+ return 33;
462
+ case 8:
463
+ return 34;
464
+ case 9:
465
+ return 35;
466
+ case 10:
467
+ return 36;
468
+ case 11:
469
+ return 10;
470
+ case 12:
471
+ break;
472
+ case 13:
473
+ return 8;
474
+ case 14:
475
+ return 50;
476
+ case 15:
477
+ return 72;
478
+ case 16:
479
+ return 4;
480
+ case 17:
481
+ return this.begin("block"), 17;
482
+ case 18:
483
+ return 49;
484
+ case 19:
485
+ return 49;
486
+ case 20:
487
+ return 42;
488
+ case 21:
489
+ return 15;
490
+ case 22:
491
+ return 13;
492
+ case 23:
493
+ break;
494
+ case 24:
495
+ return 61;
496
+ case 25:
497
+ return 58;
498
+ case 26:
499
+ return 58;
500
+ case 27:
501
+ return 62;
502
+ case 28:
503
+ break;
504
+ case 29:
505
+ return this.popState(), 19;
506
+ case 30:
507
+ return c.yytext[0];
508
+ case 31:
509
+ return 20;
510
+ case 32:
511
+ return 21;
512
+ case 33:
513
+ return this.begin("style"), 44;
514
+ case 34:
515
+ return this.popState(), 10;
516
+ case 35:
517
+ break;
518
+ case 36:
519
+ return 13;
520
+ case 37:
521
+ return 42;
522
+ case 38:
523
+ return 49;
524
+ case 39:
525
+ return this.begin("style"), 37;
526
+ case 40:
527
+ return 43;
528
+ case 41:
529
+ return 65;
530
+ case 42:
531
+ return 67;
532
+ case 43:
533
+ return 67;
534
+ case 44:
535
+ return 67;
536
+ case 45:
537
+ return 65;
538
+ case 46:
539
+ return 65;
540
+ case 47:
541
+ return 66;
542
+ case 48:
543
+ return 66;
544
+ case 49:
545
+ return 66;
546
+ case 50:
547
+ return 66;
548
+ case 51:
549
+ return 66;
550
+ case 52:
551
+ return 67;
552
+ case 53:
553
+ return 66;
554
+ case 54:
555
+ return 67;
556
+ case 55:
557
+ return 68;
558
+ case 56:
559
+ return 68;
560
+ case 57:
561
+ return 51;
562
+ case 58:
563
+ return 68;
564
+ case 59:
565
+ return 68;
566
+ case 60:
567
+ return 52;
568
+ case 61:
569
+ return 48;
570
+ case 62:
571
+ return 68;
572
+ case 63:
573
+ return 65;
574
+ case 64:
575
+ return 66;
576
+ case 65:
577
+ return 67;
578
+ case 66:
579
+ return 69;
580
+ case 67:
581
+ return 70;
582
+ case 68:
583
+ return 71;
584
+ case 69:
585
+ return 71;
586
+ case 70:
587
+ return 70;
588
+ case 71:
589
+ return 70;
590
+ case 72:
591
+ return 70;
592
+ case 73:
593
+ return 41;
594
+ case 74:
595
+ return 47;
596
+ case 75:
597
+ return 40;
598
+ case 76:
599
+ return c.yytext[0];
600
+ case 77:
601
+ return 6;
602
+ }
603
+ }, "anonymous"),
604
+ 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, /^(?:[0-9]+\.[0-9]+)/i, /^(?:1(?=\s+[A-Za-z_"']))/i, /^(?:1(?=(--|\.\.|\.-|-\.)))/i, /^(?:1\b)/i, /^(?:[0-9]+)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:u(?=[\.\-\|]))/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:;)/i, /^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i, /^(?:.)/i, /^(?:$)/i],
605
+ conditions: { style: { rules: [34, 35, 36, 37, 38, 73, 74], 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, 69, 70, 71, 72, 75, 76, 77], inclusive: !0 } }
606
+ };
607
+ return R;
608
+ })();
609
+ ut.lexer = Ct;
610
+ function $() {
611
+ this.yy = {};
612
+ }
613
+ return u($, "Parser"), $.prototype = ut, ut.Parser = $, new $();
614
+ })();
615
+ _t.parser = _t;
616
+ var Jt = _t, w, $t = (w = class {
617
+ constructor() {
618
+ this.entities = /* @__PURE__ */ new Map(), this.relationships = [], this.classes = /* @__PURE__ */ new Map(), this.direction = "TB", this.Cardinality = {
619
+ ZERO_OR_ONE: "ZERO_OR_ONE",
620
+ ZERO_OR_MORE: "ZERO_OR_MORE",
621
+ ONE_OR_MORE: "ONE_OR_MORE",
622
+ ONLY_ONE: "ONLY_ONE",
623
+ MD_PARENT: "MD_PARENT"
624
+ }, this.Identification = {
625
+ NON_IDENTIFYING: "NON_IDENTIFYING",
626
+ IDENTIFYING: "IDENTIFYING"
627
+ }, this.setAccTitle = Bt, this.getAccTitle = Ft, this.setAccDescription = Yt, this.getAccDescription = Pt, this.setDiagramTitle = zt, this.getDiagramTitle = Gt, this.getConfig = /* @__PURE__ */ u(() => it().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);
628
+ }
629
+ /**
630
+ * Add entity
631
+ * @param name - The name of the entity
632
+ * @param alias - The alias of the entity
633
+ */
634
+ addEntity(i, h = "") {
635
+ var d;
636
+ return this.entities.has(i) ? !((d = this.entities.get(i)) != null && d.alias) && h && (this.entities.get(i).alias = h, L.info(`Add alias '${h}' to entity '${i}'`)) : (this.entities.set(i, {
637
+ id: `entity-${i}-${this.entities.size}`,
638
+ label: i,
639
+ attributes: [],
640
+ alias: h,
641
+ shape: "erBox",
642
+ look: it().look ?? "default",
643
+ cssClasses: "default",
644
+ cssStyles: [],
645
+ labelType: "markdown"
646
+ }), L.info("Added new entity :", i)), this.entities.get(i);
647
+ }
648
+ getEntity(i) {
649
+ return this.entities.get(i);
650
+ }
651
+ getEntities() {
652
+ return this.entities;
653
+ }
654
+ getClasses() {
655
+ return this.classes;
656
+ }
657
+ addAttributes(i, h) {
658
+ const d = this.addEntity(i);
659
+ let o;
660
+ for (o = h.length - 1; o >= 0; o--)
661
+ h[o].keys || (h[o].keys = []), h[o].comment || (h[o].comment = ""), d.attributes.push(h[o]), L.debug("Added attribute ", h[o].name);
662
+ }
663
+ /**
664
+ * Add a relationship
665
+ *
666
+ * @param entA - The first entity in the relationship
667
+ * @param rolA - The role played by the first entity in relation to the second
668
+ * @param entB - The second entity in the relationship
669
+ * @param rSpec - The details of the relationship between the two entities
670
+ */
671
+ addRelationship(i, h, d, o) {
672
+ const l = this.entities.get(i), f = this.entities.get(d);
673
+ if (!l || !f)
674
+ return;
675
+ const _ = {
676
+ entityA: l.id,
677
+ roleA: h,
678
+ entityB: f.id,
679
+ relSpec: o
680
+ };
681
+ this.relationships.push(_), L.debug("Added new relationship :", _);
682
+ }
683
+ getRelationships() {
684
+ return this.relationships;
685
+ }
686
+ getDirection() {
687
+ return this.direction;
688
+ }
689
+ setDirection(i) {
690
+ this.direction = i;
691
+ }
692
+ getCompiledStyles(i) {
693
+ let h = [];
694
+ for (const d of i) {
695
+ const o = this.classes.get(d);
696
+ o != null && o.styles && (h = [...h, ...o.styles ?? []].map((l) => l.trim())), o != null && o.textStyles && (h = [...h, ...o.textStyles ?? []].map((l) => l.trim()));
697
+ }
698
+ return h;
699
+ }
700
+ addCssStyles(i, h) {
701
+ for (const d of i) {
702
+ const o = this.entities.get(d);
703
+ if (!h || !o)
704
+ return;
705
+ for (const l of h)
706
+ o.cssStyles.push(l);
707
+ }
708
+ }
709
+ addClass(i, h) {
710
+ i.forEach((d) => {
711
+ let o = this.classes.get(d);
712
+ o === void 0 && (o = { id: d, styles: [], textStyles: [] }, this.classes.set(d, o)), h && h.forEach(function(l) {
713
+ if (/color/.exec(l)) {
714
+ const f = l.replace("fill", "bgFill");
715
+ o.textStyles.push(f);
716
+ }
717
+ o.styles.push(l);
718
+ });
719
+ });
720
+ }
721
+ setClass(i, h) {
722
+ for (const d of i) {
723
+ const o = this.entities.get(d);
724
+ if (o)
725
+ for (const l of h)
726
+ o.cssClasses += " " + l;
727
+ }
728
+ }
729
+ clear() {
730
+ this.entities = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.relationships = [], Kt();
731
+ }
732
+ getData() {
733
+ const i = [], h = [], d = it();
734
+ for (const l of this.entities.keys()) {
735
+ const f = this.entities.get(l);
736
+ f && (f.cssCompiledStyles = this.getCompiledStyles(f.cssClasses.split(" ")), i.push(f));
737
+ }
738
+ let o = 0;
739
+ for (const l of this.relationships) {
740
+ const f = {
741
+ id: Ut(l.entityA, l.entityB, {
742
+ prefix: "id",
743
+ counter: o++
744
+ }),
745
+ type: "normal",
746
+ curve: "basis",
747
+ start: l.entityA,
748
+ end: l.entityB,
749
+ label: l.roleA,
750
+ labelpos: "c",
751
+ thickness: "normal",
752
+ classes: "relationshipLine",
753
+ arrowTypeStart: l.relSpec.cardB.toLowerCase(),
754
+ arrowTypeEnd: l.relSpec.cardA.toLowerCase(),
755
+ pattern: l.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
756
+ look: d.look,
757
+ labelType: "markdown"
758
+ };
759
+ h.push(f);
760
+ }
761
+ return { nodes: i, edges: h, other: {}, config: d, direction: "TB" };
762
+ }
763
+ }, u(w, "ErDB"), w), xt = {};
764
+ jt(xt, {
765
+ draw: () => te
766
+ });
767
+ var te = /* @__PURE__ */ u(async function(s, i, h, d) {
768
+ L.info("REF0:"), L.info("Drawing er diagram (unified)", i);
769
+ const { securityLevel: o, er: l, layout: f } = it(), _ = d.db.getData(), E = Vt(i, o);
770
+ _.type = d.type, _.layoutAlgorithm = Wt(f), _.config.flowchart.nodeSpacing = (l == null ? void 0 : l.nodeSpacing) || 140, _.config.flowchart.rankSpacing = (l == null ? void 0 : l.rankSpacing) || 80, _.direction = d.db.getDirection(), _.markers = ["only_one", "zero_or_one", "one_or_more", "zero_or_more"], _.diagramId = i, await Qt(_, E), _.layoutAlgorithm === "elk" && E.select(".edges").lower();
771
+ const V = E.selectAll('[id*="-background"]');
772
+ Array.from(V).length > 0 && V.each(function() {
773
+ const S = Xt(this), Q = S.attr("id").replace("-background", ""), T = E.select(`#${CSS.escape(Q)}`);
774
+ if (!T.empty()) {
775
+ const I = T.attr("transform");
776
+ S.attr("transform", I);
777
+ }
778
+ });
779
+ const W = 8;
780
+ qt.insertTitle(
781
+ E,
782
+ "erDiagramTitleText",
783
+ (l == null ? void 0 : l.titleTopMargin) ?? 25,
784
+ d.db.getDiagramTitle()
785
+ ), Mt(E, W, "erDiagram", (l == null ? void 0 : l.useMaxWidth) ?? !0);
786
+ }, "draw"), ee = /* @__PURE__ */ u((s, i) => {
787
+ const h = Ht, d = h(s, "r"), o = h(s, "g"), l = h(s, "b");
788
+ return Zt(d, o, l, i);
789
+ }, "fade"), se = /* @__PURE__ */ u((s) => `
790
+ .entityBox {
791
+ fill: ${s.mainBkg};
792
+ stroke: ${s.nodeBorder};
793
+ }
794
+
795
+ .relationshipLabelBox {
796
+ fill: ${s.tertiaryColor};
797
+ opacity: 0.7;
798
+ background-color: ${s.tertiaryColor};
799
+ rect {
800
+ opacity: 0.5;
801
+ }
802
+ }
803
+
804
+ .labelBkg {
805
+ background-color: ${ee(s.tertiaryColor, 0.5)};
806
+ }
807
+
808
+ .edgeLabel .label {
809
+ fill: ${s.nodeBorder};
810
+ font-size: 14px;
811
+ }
812
+
813
+ .label {
814
+ font-family: ${s.fontFamily};
815
+ color: ${s.nodeTextColor || s.textColor};
816
+ }
817
+
818
+ .edge-pattern-dashed {
819
+ stroke-dasharray: 8,8;
820
+ }
821
+
822
+ .node rect,
823
+ .node circle,
824
+ .node ellipse,
825
+ .node polygon
826
+ {
827
+ fill: ${s.mainBkg};
828
+ stroke: ${s.nodeBorder};
829
+ stroke-width: 1px;
830
+ }
831
+
832
+ .relationshipLine {
833
+ stroke: ${s.lineColor};
834
+ stroke-width: 1;
835
+ fill: none;
836
+ }
837
+
838
+ .marker {
839
+ fill: none !important;
840
+ stroke: ${s.lineColor} !important;
841
+ stroke-width: 1;
842
+ }
843
+
844
+ .edgeLabel {
845
+ background-color: ${s.edgeLabelBackground};
846
+ }
847
+ .edgeLabel .label rect {
848
+ fill: ${s.edgeLabelBackground};
849
+ }
850
+ .edgeLabel .label text {
851
+ fill: ${s.textColor};
852
+ }
853
+ `, "getStyles"), ie = se, le = {
854
+ parser: Jt,
855
+ get db() {
856
+ return new $t();
857
+ },
858
+ renderer: xt,
859
+ styles: ie
860
+ };
861
+ export {
862
+ le as diagram
863
+ };