hexagon-editor 0.1.5 → 0.1.7

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 (117) hide show
  1. package/README.md +44 -24
  2. package/dist/MarkdownEditor.vue.d.ts +28 -26
  3. package/dist/MarkdownEditor.vue.d.ts.map +1 -1
  4. package/dist/{MarkdownEditorLinkForm-C7CGgA83.js → MarkdownEditorLinkForm-B9dEX3WT.js} +1 -1
  5. package/dist/{base-Bnv2-Te4.js → base-BPdMUtQo.js} +141 -137
  6. package/dist/components/MarkdownEditorToolbar.vue.d.ts +4 -3
  7. package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -1
  8. package/dist/configure.d.ts +0 -2
  9. package/dist/configure.d.ts.map +1 -1
  10. package/dist/configure.js +11 -12
  11. package/dist/core/basic-editor-markdown.d.ts.map +1 -1
  12. package/dist/core/basic-editor-renderers.d.ts +6 -4
  13. package/dist/core/basic-editor-renderers.d.ts.map +1 -1
  14. package/dist/core/basic-editor-types.d.ts +2 -0
  15. package/dist/core/basic-editor-types.d.ts.map +1 -1
  16. package/dist/core/basic-editor.d.ts +1 -1
  17. package/dist/core/basic-editor.d.ts.map +1 -1
  18. package/dist/core/index.d.ts +0 -2
  19. package/dist/core/index.d.ts.map +1 -1
  20. package/dist/core.js +28 -31
  21. package/dist/extensions.js +1 -1
  22. package/dist/forms/MarkdownEditorImageForm.vue.d.ts +2 -2
  23. package/dist/forms/MarkdownEditorImageForm.vue.d.ts.map +1 -1
  24. package/dist/forms/MarkdownEditorLinkForm.vue.d.ts +2 -2
  25. package/dist/forms/MarkdownEditorTextInput.vue.d.ts +2 -2
  26. package/dist/forms/MarkdownEditorTextInput.vue.d.ts.map +1 -1
  27. package/dist/forms.js +1 -1
  28. package/dist/{full-C-o2lPBX.js → full-Da8esvj2.js} +1 -1
  29. package/dist/{full-specs-Cl-ODShc.js → full-specs-hXKoMF-0.js} +1 -1
  30. package/dist/index-D_CMntQU.js +3173 -0
  31. package/dist/index.css +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +240 -236
  35. package/dist/{markup-commands-B2NMfYHE.js → markup-commands-BYsx8ADT.js} +1989 -1963
  36. package/dist/presets.js +2 -2
  37. package/dist/public-types.d.ts +22 -0
  38. package/dist/public-types.d.ts.map +1 -1
  39. package/dist/renderer/MarkdownRenderer.vue.d.ts +2 -0
  40. package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -1
  41. package/dist/renderer/markdown.d.ts +2 -1
  42. package/dist/renderer/markdown.d.ts.map +1 -1
  43. package/dist/renderer.css +1 -1
  44. package/dist/renderer.js +3590 -200
  45. package/package.json +106 -108
  46. package/dist/MarkdownEditorLinkForm.css +0 -1
  47. package/dist/abnfDiagram-N423BO3Z-DCf6sPky.js +0 -87
  48. package/dist/arc-y6UeoJpJ.js +0 -83
  49. package/dist/architectureDiagram-T3A2C74G-Cc3_3-cI.js +0 -4778
  50. package/dist/base.css +0 -1
  51. package/dist/blockDiagram-VBNYF7ZC-DWVLZwXY.js +0 -2419
  52. package/dist/c4Diagram-5PPSVZJV-CaIN7qay.js +0 -1577
  53. package/dist/channel-BwXGcavV.js +0 -5
  54. package/dist/chunk-2GRJ4B5K-O75udjPr.js +0 -68
  55. package/dist/chunk-2Q5K7J3B-CySL0lOA.js +0 -15
  56. package/dist/chunk-5RXB4S5H-BKPnLCOJ.js +0 -1408
  57. package/dist/chunk-5VM5RSS4--it1VJIv.js +0 -19
  58. package/dist/chunk-6Q2QTUOP-DNiML-50.js +0 -664
  59. package/dist/chunk-GF5L2VYU-z7A-k0-V.js +0 -1533
  60. package/dist/chunk-JWPE2WC7-DAjx3Kjr.js +0 -8
  61. package/dist/chunk-KBJHAD2P-D4R1VW0r.js +0 -19
  62. package/dist/chunk-RYQCIY6F-DmJAYxq8.js +0 -313
  63. package/dist/chunk-XXDRQBXY-CK913N-t.js +0 -8
  64. package/dist/classDiagram-JCYQIIEL-Djipq_HJ.js +0 -16
  65. package/dist/classDiagram-v2-OCEON4UE-Djipq_HJ.js +0 -16
  66. package/dist/core/optional-renderers.d.ts +0 -9
  67. package/dist/core/optional-renderers.d.ts.map +0 -1
  68. package/dist/cose-bilkent-JH36ORCC-CXuKFbXy.js +0 -2608
  69. package/dist/cynefin-VYW2F7L2-Bkk-F_Js.js +0 -23766
  70. package/dist/cynefinDiagram-MW4NZA55-DwOK40hm.js +0 -299
  71. package/dist/cytoscape.esm-3W4EOjxC.js +0 -18756
  72. package/dist/dagre-VZM6K2ZE-0VsGm8Ag.js +0 -340
  73. package/dist/defaultLocale-BgPVtth8.js +0 -171
  74. package/dist/diagram-7IWD3JNH-BrApu1hz.js +0 -350
  75. package/dist/diagram-B4RE2ZJO-CVXoBg2r.js +0 -461
  76. package/dist/diagram-LBJQPF4R-Dp0eSz2L.js +0 -142
  77. package/dist/diagram-Q27KOJAE-DWIltqIH.js +0 -528
  78. package/dist/diagram-UB23O5K3-B7z2Lj3K.js +0 -219
  79. package/dist/ebnfDiagram-BXEA7PRR-CYgE6z_2.js +0 -109
  80. package/dist/erDiagram-JOGREHBK-D3QWrPo-.js +0 -910
  81. package/dist/flowDiagram-UKHOOZJN-CfjPcHNW.js +0 -1638
  82. package/dist/ganttDiagram-PKOTCBZU-ECmaWI-9.js +0 -2711
  83. package/dist/gitGraphDiagram-DS77QQ5N-DgG1RGJ8.js +0 -815
  84. package/dist/graph-DAHC4kPm.js +0 -1545
  85. package/dist/infoDiagram-6WML65LV-B1Yl3nZV.js +0 -24
  86. package/dist/init-DjUOC4st.js +0 -16
  87. package/dist/ishikawaDiagram-WSZJBQD7-4sngaB5o.js +0 -621
  88. package/dist/journeyDiagram-NVQOT4AX-B_6AmR_j.js +0 -834
  89. package/dist/kanban-definition-27J2QSJJ-B8BO9o8J.js +0 -724
  90. package/dist/katex-ByXcxnHy.js +0 -14436
  91. package/dist/katex-DoRnZ_sp.js +0 -11682
  92. package/dist/layout-DBbo_M5I.js +0 -1519
  93. package/dist/linear-BEdRfKba.js +0 -259
  94. package/dist/map-DRdzG8Ho.js +0 -224
  95. package/dist/markup-commands.css +0 -1
  96. package/dist/mermaid.core-CR0bA2Wa.js +0 -16496
  97. package/dist/mindmap-definition-FAOFIHXS-DnPz807N.js +0 -827
  98. package/dist/optional-renderers-BalvqqvY.js +0 -11
  99. package/dist/ordinal-B6-f3MAq.js +0 -61
  100. package/dist/pegDiagram-VL7TDLO6-csGWlzs8.js +0 -95
  101. package/dist/pieDiagram-7S7Q4E2Y-Bqs8j5FX.js +0 -207
  102. package/dist/quadrantDiagram-CIZ2JOQS-jzP4lRrY.js +0 -1023
  103. package/dist/railroadDiagram-AXF67PYL-BSCyR24u.js +0 -77
  104. package/dist/renderer/mermaid-runtime.d.ts +0 -4
  105. package/dist/renderer/mermaid-runtime.d.ts.map +0 -1
  106. package/dist/requirementDiagram-LRYGKXZP-DmEkLYqX.js +0 -882
  107. package/dist/sankeyDiagram-W5VNT64P-CYvRYMTh.js +0 -847
  108. package/dist/sequenceDiagram-SI44F4Z6-CyWbDtPA.js +0 -2888
  109. package/dist/sizeCapture-X5ZJPWSS-xKhYCY84.js +0 -46
  110. package/dist/stateDiagram-OKZ733FA-DP44R2Dd.js +0 -263
  111. package/dist/stateDiagram-v2-UEYNNEHI-BvlOisND.js +0 -16
  112. package/dist/swimlanes-SLNWSIFB-BKFp8twH.js +0 -5332
  113. package/dist/swimlanesDiagram-ULZ7WXOC-CTvIFuHq.js +0 -13
  114. package/dist/timeline-definition-Z64GVDOM-B4137uIl.js +0 -1055
  115. package/dist/vennDiagram-T6HMQDX7-CPs8gXjx.js +0 -1578
  116. package/dist/wardleyDiagram-T6FBY63Y-BYp13hbI.js +0 -675
  117. package/dist/xychartDiagram-ELKLHX3M-DTT37K2u.js +0 -1388
@@ -1,910 +0,0 @@
1
- import { g as Bt } from "./chunk-XXDRQBXY-CK913N-t.js";
2
- import { s as Ft } from "./chunk-KBJHAD2P-D4R1VW0r.js";
3
- import { _ as d, b as Yt, a as Pt, s as zt, g as Gt, n as Kt, o as Ut, c as rt, l as V, p as Zt, q as jt, r as Wt, t as qt, u as Qt, v as Xt, d as Ht, x as Jt } from "./mermaid.core-CR0bA2Wa.js";
4
- import { c as $t } from "./channel-BwXGcavV.js";
5
- var gt = (function() {
6
- var s = /* @__PURE__ */ d(function(I, n, a, o) {
7
- for (a = a || {}, o = I.length; o--; a[I[o]] = 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], c = [1, 10], h = [1, 11], l = [1, 12], p = [1, 13], y = [1, 23], u = [1, 24], m = [1, 25], W = [1, 26], q = [1, 27], S = [1, 19], Q = [1, 28], B = [1, 29], D = [1, 20], R = [1, 18], T = [1, 21], C = [1, 22], at = [1, 36], ct = [1, 37], ot = [1, 38], lt = [1, 39], ht = [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, 66, 67, 68, 69, 70], O = [1, 45], N = [1, 46], Y = [1, 55], P = [40, 48, 50, 51, 52, 71, 72], 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, 66, 67, 68, 69, 70], bt = [66, 67, 68, 69, 70], kt = [1, 85], mt = [1, 84], Et = [1, 82], St = [1, 83], Tt = [6, 10, 42, 47], L = [6, 10, 13, 41, 42, 47, 48, 49], H = [1, 93], J = [1, 92], $ = [1, 91], Z = [19, 58], Ot = [1, 102], Nt = [1, 101], ut = [19, 58, 61, 63], dt = {
10
- trace: /* @__PURE__ */ d(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, "?": 59, attributeKeyType: 60, ",": 61, ATTRIBUTE_KEY: 62, COMMENT: 63, cardinality: 64, relType: 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: 73, $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", 59: "?", 61: ",", 62: "ATTRIBUTE_KEY", 63: "COMMENT", 66: "ZERO_OR_ONE", 67: "ZERO_OR_MORE", 68: "ONE_OR_MORE", 69: "ONLY_ONE", 70: "MD_PARENT", 71: "NON_IDENTIFYING", 72: "IDENTIFYING", 73: "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], [54, 2], [55, 1], [56, 1], [56, 3], [60, 1], [57, 1], [12, 3], [64, 1], [64, 1], [64, 1], [64, 1], [64, 1], [65, 1], [65, 1], [14, 1], [14, 1], [14, 1]],
16
- performAction: /* @__PURE__ */ d(function(n, a, o, r, f, t, j) {
17
- var e = t.length - 1;
18
- switch (f) {
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 68:
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 80:
133
- case 81:
134
- this.$ = t[e].replace(/"/g, "");
135
- break;
136
- case 55:
137
- case 56:
138
- case 57:
139
- case 58:
140
- case 82:
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 67:
160
- case 70:
161
- this.$ = t[e];
162
- break;
163
- case 66:
164
- this.$ = t[e - 1] + t[e];
165
- break;
166
- case 69:
167
- t[e - 2].push(t[e]), this.$ = t[e - 2];
168
- break;
169
- case 71:
170
- this.$ = t[e].replace(/"/g, "");
171
- break;
172
- case 72:
173
- this.$ = { cardA: t[e], relType: t[e - 1], cardB: t[e - 2] };
174
- break;
175
- case 73:
176
- this.$ = r.Cardinality.ZERO_OR_ONE;
177
- break;
178
- case 74:
179
- this.$ = r.Cardinality.ZERO_OR_MORE;
180
- break;
181
- case 75:
182
- this.$ = r.Cardinality.ONE_OR_MORE;
183
- break;
184
- case 76:
185
- this.$ = r.Cardinality.ONLY_ONE;
186
- break;
187
- case 77:
188
- this.$ = r.Cardinality.MD_PARENT;
189
- break;
190
- case 78:
191
- this.$ = r.Identification.NON_IDENTIFYING;
192
- break;
193
- case 79:
194
- this.$ = r.Identification.IDENTIFYING;
195
- break;
196
- }
197
- }, "anonymous"),
198
- 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: c, 24: h, 26: l, 28: p, 29: 14, 30: 15, 31: 16, 32: 17, 33: y, 34: u, 35: m, 36: W, 37: q, 40: S, 43: Q, 44: B, 48: D, 50: R, 51: T, 52: C }, s(i, [2, 7], { 1: [2, 1] }), s(i, [2, 3]), { 9: 30, 11: 9, 22: c, 24: h, 26: l, 28: p, 29: 14, 30: 15, 31: 16, 32: 17, 33: y, 34: u, 35: m, 36: W, 37: q, 40: S, 43: Q, 44: B, 48: D, 50: R, 51: T, 52: C }, s(i, [2, 5]), s(i, [2, 6]), s(i, [2, 16], { 12: 31, 64: 35, 15: [1, 32], 17: [1, 33], 20: [1, 34], 66: at, 67: ct, 68: ot, 69: lt, 70: ht }), { 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: D, 50: R, 51: T, 52: C }, { 16: 50, 40: O, 41: N }, { 18: 51, 19: [1, 52], 53: 53, 54: 54, 58: Y }, { 11: 56, 40: S, 48: D, 50: R, 51: T, 52: C }, { 65: 57, 71: [1, 58], 72: [1, 59] }, s(P, [2, 73]), s(P, [2, 74]), s(P, [2, 75]), s(P, [2, 76]), s(P, [2, 77]), 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], { 64: 35, 12: 72, 17: [1, 73], 42: A, 66: at, 67: ct, 68: ot, 69: lt, 70: ht }), { 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], 59: [1, 78] }, { 21: [1, 79] }, { 64: 80, 66: at, 67: ct, 68: ot, 69: lt, 70: ht }, s(bt, [2, 78]), s(bt, [2, 79]), { 6: kt, 10: mt, 39: 81, 42: Et, 47: St }, { 40: [1, 86], 41: [1, 87] }, s(Tt, [2, 43], { 46: 88, 13: z, 41: G, 48: K, 49: U }), s(L, [2, 45]), s(L, [2, 50]), s(L, [2, 51]), s(L, [2, 52]), s(L, [2, 53]), s(i, [2, 41], { 42: A }), { 6: kt, 10: mt, 39: 89, 42: Et, 47: St }, { 14: 90, 40: H, 50: J, 73: $ }, { 16: 94, 40: O, 41: N }, { 11: 95, 40: S, 48: D, 50: R, 51: T, 52: C }, { 18: 96, 19: [1, 97], 53: 53, 54: 54, 58: Y }, s(i, [2, 12]), { 19: [2, 60] }, s(Z, [2, 61], { 56: 98, 57: 99, 60: 100, 62: Ot, 63: Nt }), s([19, 58, 62, 63], [2, 67]), { 58: [2, 66] }, s(i, [2, 22], { 15: [1, 104], 17: [1, 103] }), s([40, 48, 50, 51, 52], [2, 72]), s(i, [2, 36]), { 13: z, 41: G, 45: 105, 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(L, [2, 46]), s(i, [2, 42]), s(i, [2, 8]), s(i, [2, 80]), s(i, [2, 81]), s(i, [2, 82]), { 13: [1, 106], 42: A }, { 13: [1, 108], 15: [1, 107] }, { 19: [1, 109] }, s(i, [2, 15]), s(Z, [2, 62], { 57: 110, 61: [1, 111], 63: Nt }), s(Z, [2, 63]), s(ut, [2, 68]), s(Z, [2, 71]), s(ut, [2, 70]), { 18: 112, 19: [1, 113], 53: 53, 54: 54, 58: Y }, { 16: 114, 40: O, 41: N }, s(Tt, [2, 44], { 46: 88, 13: z, 41: G, 48: K, 49: U }), { 14: 115, 40: H, 50: J, 73: $ }, { 16: 116, 40: O, 41: N }, { 14: 117, 40: H, 50: J, 73: $ }, s(i, [2, 13]), s(Z, [2, 64]), { 60: 118, 62: Ot }, { 19: [1, 119] }, s(i, [2, 20]), s(i, [2, 23], { 17: [1, 120], 42: A }), s(i, [2, 11]), { 13: [1, 121], 42: A }, s(i, [2, 10]), s(ut, [2, 69]), s(i, [2, 18]), { 18: 122, 19: [1, 123], 53: 53, 54: 54, 58: Y }, { 14: 124, 40: H, 50: J, 73: $ }, { 19: [1, 125] }, s(i, [2, 21]), s(i, [2, 9]), s(i, [2, 19])],
199
- defaultActions: { 75: [2, 60], 78: [2, 66] },
200
- parseError: /* @__PURE__ */ d(function(n, a) {
201
- if (a.recoverable)
202
- this.trace(n);
203
- else {
204
- var o = new Error(n);
205
- throw o.hash = a, o;
206
- }
207
- }, "parseError"),
208
- parse: /* @__PURE__ */ d(function(n) {
209
- var a = this, o = [0], r = [], f = [null], t = [], j = this.table, e = "", et = 0, At = 0, Lt = 2, It = 1, wt = t.slice.call(arguments, 1), _ = Object.create(this.lexer), x = { yy: {} };
210
- for (var pt in this.yy)
211
- Object.prototype.hasOwnProperty.call(this.yy, pt) && (x.yy[pt] = this.yy[pt]);
212
- _.setInput(n, x.yy), x.yy.lexer = _, x.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
213
- var ft = _.yylloc;
214
- t.push(ft);
215
- var Vt = _.options && _.options.ranges;
216
- typeof x.yy.parseError == "function" ? this.parseError = x.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
217
- function Mt(b) {
218
- o.length = o.length - 2 * b, f.length = f.length - b, t.length = t.length - b;
219
- }
220
- d(Mt, "popStack");
221
- function Rt() {
222
- var b;
223
- return b = r.pop() || _.lex() || It, typeof b != "number" && (b instanceof Array && (r = b, b = r.pop()), b = a.symbols_[b] || b), b;
224
- }
225
- d(Rt, "lex");
226
- for (var g, v, k, yt, w = {}, st, E, Ct, it; ; ) {
227
- if (v = o[o.length - 1], this.defaultActions[v] ? k = this.defaultActions[v] : ((g === null || typeof g > "u") && (g = Rt()), k = j[v] && j[v][g]), typeof k > "u" || !k.length || !k[0]) {
228
- var _t = "";
229
- it = [];
230
- for (st in j[v])
231
- this.terminals_[st] && st > Lt && it.push("'" + this.terminals_[st] + "'");
232
- _.showPosition ? _t = "Parse error on line " + (et + 1) + `:
233
- ` + _.showPosition() + `
234
- Expecting ` + it.join(", ") + ", got '" + (this.terminals_[g] || g) + "'" : _t = "Parse error on line " + (et + 1) + ": Unexpected " + (g == It ? "end of input" : "'" + (this.terminals_[g] || g) + "'"), this.parseError(_t, {
235
- text: _.match,
236
- token: this.terminals_[g] || g,
237
- line: _.yylineno,
238
- loc: ft,
239
- expected: it
240
- });
241
- }
242
- if (k[0] instanceof Array && k.length > 1)
243
- throw new Error("Parse Error: multiple actions possible at state: " + v + ", token: " + g);
244
- switch (k[0]) {
245
- case 1:
246
- o.push(g), f.push(_.yytext), t.push(_.yylloc), o.push(k[1]), g = null, At = _.yyleng, e = _.yytext, et = _.yylineno, ft = _.yylloc;
247
- break;
248
- case 2:
249
- if (E = this.productions_[k[1]][1], w.$ = f[f.length - E], w._$ = {
250
- first_line: t[t.length - (E || 1)].first_line,
251
- last_line: t[t.length - 1].last_line,
252
- first_column: t[t.length - (E || 1)].first_column,
253
- last_column: t[t.length - 1].last_column
254
- }, Vt && (w._$.range = [
255
- t[t.length - (E || 1)].range[0],
256
- t[t.length - 1].range[1]
257
- ]), yt = this.performAction.apply(w, [
258
- e,
259
- At,
260
- et,
261
- x.yy,
262
- k[1],
263
- f,
264
- t
265
- ].concat(wt)), typeof yt < "u")
266
- return yt;
267
- E && (o = o.slice(0, -1 * E * 2), f = f.slice(0, -1 * E), t = t.slice(0, -1 * E)), o.push(this.productions_[k[1]][0]), f.push(w.$), t.push(w._$), Ct = j[o[o.length - 2]][o[o.length - 1]], o.push(Ct);
268
- break;
269
- case 3:
270
- return !0;
271
- }
272
- }
273
- return !0;
274
- }, "parse")
275
- }, Dt = /* @__PURE__ */ (function() {
276
- var I = {
277
- EOF: 1,
278
- parseError: /* @__PURE__ */ d(function(a, o) {
279
- if (this.yy.parser)
280
- this.yy.parser.parseError(a, o);
281
- else
282
- throw new Error(a);
283
- }, "parseError"),
284
- // resets the lexer, sets new input
285
- setInput: /* @__PURE__ */ d(function(n, a) {
286
- 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 = {
287
- first_line: 1,
288
- first_column: 0,
289
- last_line: 1,
290
- last_column: 0
291
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
292
- }, "setInput"),
293
- // consumes and returns one char from the input
294
- input: /* @__PURE__ */ d(function() {
295
- var n = this._input[0];
296
- this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n;
297
- var a = n.match(/(?:\r\n?|\n).*/g);
298
- 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;
299
- }, "input"),
300
- // unshifts one char (or a string) into the input
301
- unput: /* @__PURE__ */ d(function(n) {
302
- var a = n.length, o = n.split(/(?:\r\n?|\n)/g);
303
- this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
304
- var r = this.match.split(/(?:\r\n?|\n)/g);
305
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
306
- var f = this.yylloc.range;
307
- return this.yylloc = {
308
- first_line: this.yylloc.first_line,
309
- last_line: this.yylineno + 1,
310
- first_column: this.yylloc.first_column,
311
- last_column: o ? (o.length === r.length ? this.yylloc.first_column : 0) + r[r.length - o.length].length - o[0].length : this.yylloc.first_column - a
312
- }, this.options.ranges && (this.yylloc.range = [f[0], f[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
313
- }, "unput"),
314
- // When called from action, caches matched text and appends it on next action
315
- more: /* @__PURE__ */ d(function() {
316
- return this._more = !0, this;
317
- }, "more"),
318
- // 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.
319
- reject: /* @__PURE__ */ d(function() {
320
- if (this.options.backtrack_lexer)
321
- this._backtrack = !0;
322
- else
323
- 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).
324
- ` + this.showPosition(), {
325
- text: "",
326
- token: null,
327
- line: this.yylineno
328
- });
329
- return this;
330
- }, "reject"),
331
- // retain first n characters of the match
332
- less: /* @__PURE__ */ d(function(n) {
333
- this.unput(this.match.slice(n));
334
- }, "less"),
335
- // displays already matched input, i.e. for error messages
336
- pastInput: /* @__PURE__ */ d(function() {
337
- var n = this.matched.substr(0, this.matched.length - this.match.length);
338
- return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "");
339
- }, "pastInput"),
340
- // displays upcoming input, i.e. for error messages
341
- upcomingInput: /* @__PURE__ */ d(function() {
342
- var n = this.match;
343
- return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "");
344
- }, "upcomingInput"),
345
- // displays the character position where the lexing error occurred, i.e. for error messages
346
- showPosition: /* @__PURE__ */ d(function() {
347
- var n = this.pastInput(), a = new Array(n.length + 1).join("-");
348
- return n + this.upcomingInput() + `
349
- ` + a + "^";
350
- }, "showPosition"),
351
- // test the lexed token: return FALSE when not a match, otherwise return token
352
- test_match: /* @__PURE__ */ d(function(n, a) {
353
- var o, r, f;
354
- if (this.options.backtrack_lexer && (f = {
355
- yylineno: this.yylineno,
356
- yylloc: {
357
- first_line: this.yylloc.first_line,
358
- last_line: this.last_line,
359
- first_column: this.yylloc.first_column,
360
- last_column: this.yylloc.last_column
361
- },
362
- yytext: this.yytext,
363
- match: this.match,
364
- matches: this.matches,
365
- matched: this.matched,
366
- yyleng: this.yyleng,
367
- offset: this.offset,
368
- _more: this._more,
369
- _input: this._input,
370
- yy: this.yy,
371
- conditionStack: this.conditionStack.slice(0),
372
- done: this.done
373
- }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), r = n[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
374
- first_line: this.yylloc.last_line,
375
- last_line: this.yylineno + 1,
376
- first_column: this.yylloc.last_column,
377
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length
378
- }, 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], o = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
379
- return o;
380
- if (this._backtrack) {
381
- for (var t in f)
382
- this[t] = f[t];
383
- return !1;
384
- }
385
- return !1;
386
- }, "test_match"),
387
- // return next match in input
388
- next: /* @__PURE__ */ d(function() {
389
- if (this.done)
390
- return this.EOF;
391
- this._input || (this.done = !0);
392
- var n, a, o, r;
393
- this._more || (this.yytext = "", this.match = "");
394
- for (var f = this._currentRules(), t = 0; t < f.length; t++)
395
- if (o = this._input.match(this.rules[f[t]]), o && (!a || o[0].length > a[0].length)) {
396
- if (a = o, r = t, this.options.backtrack_lexer) {
397
- if (n = this.test_match(o, f[t]), n !== !1)
398
- return n;
399
- if (this._backtrack) {
400
- a = !1;
401
- continue;
402
- } else
403
- return !1;
404
- } else if (!this.options.flex)
405
- break;
406
- }
407
- return a ? (n = this.test_match(a, f[r]), n !== !1 ? n : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
408
- ` + this.showPosition(), {
409
- text: "",
410
- token: null,
411
- line: this.yylineno
412
- });
413
- }, "next"),
414
- // return next match that has a token
415
- lex: /* @__PURE__ */ d(function() {
416
- var a = this.next();
417
- return a || this.lex();
418
- }, "lex"),
419
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
420
- begin: /* @__PURE__ */ d(function(a) {
421
- this.conditionStack.push(a);
422
- }, "begin"),
423
- // pop the previously active lexer condition state off the condition stack
424
- popState: /* @__PURE__ */ d(function() {
425
- var a = this.conditionStack.length - 1;
426
- return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
427
- }, "popState"),
428
- // produce the lexer rule set which is active for the currently active lexer condition state
429
- _currentRules: /* @__PURE__ */ d(function() {
430
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
431
- }, "_currentRules"),
432
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
433
- topState: /* @__PURE__ */ d(function(a) {
434
- return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
435
- }, "topState"),
436
- // alias for begin(condition)
437
- pushState: /* @__PURE__ */ d(function(a) {
438
- this.begin(a);
439
- }, "pushState"),
440
- // return the number of states currently on the stack
441
- stateStackSize: /* @__PURE__ */ d(function() {
442
- return this.conditionStack.length;
443
- }, "stateStackSize"),
444
- options: { "case-insensitive": !0 },
445
- performAction: /* @__PURE__ */ d(function(a, o, r, f) {
446
- switch (r) {
447
- case 0:
448
- return this.begin("acc_title"), 24;
449
- case 1:
450
- return this.popState(), "acc_title_value";
451
- case 2:
452
- return this.begin("acc_descr"), 26;
453
- case 3:
454
- return this.popState(), "acc_descr_value";
455
- case 4:
456
- this.begin("acc_descr_multiline");
457
- break;
458
- case 5:
459
- this.popState();
460
- break;
461
- case 6:
462
- return "acc_descr_multiline_value";
463
- case 7:
464
- return 33;
465
- case 8:
466
- return 34;
467
- case 9:
468
- return 35;
469
- case 10:
470
- return 36;
471
- case 11:
472
- return 10;
473
- case 12:
474
- break;
475
- case 13:
476
- return 8;
477
- case 14:
478
- return 50;
479
- case 15:
480
- return 73;
481
- case 16:
482
- return 4;
483
- case 17:
484
- return this.begin("block"), 17;
485
- case 18:
486
- return 49;
487
- case 19:
488
- return 49;
489
- case 20:
490
- return 42;
491
- case 21:
492
- return 15;
493
- case 22:
494
- return 13;
495
- case 23:
496
- break;
497
- case 24:
498
- return 62;
499
- case 25:
500
- return 58;
501
- case 26:
502
- return 58;
503
- case 27:
504
- this.begin("block_bq");
505
- break;
506
- case 28:
507
- return 58;
508
- case 29:
509
- this.popState();
510
- break;
511
- case 30:
512
- return 63;
513
- case 31:
514
- break;
515
- case 32:
516
- return this.popState(), 19;
517
- case 33:
518
- return o.yytext[0];
519
- case 34:
520
- return 20;
521
- case 35:
522
- return 21;
523
- case 36:
524
- return this.begin("style"), 44;
525
- case 37:
526
- return this.popState(), 10;
527
- case 38:
528
- break;
529
- case 39:
530
- return 13;
531
- case 40:
532
- return 42;
533
- case 41:
534
- return 49;
535
- case 42:
536
- return this.begin("style"), 37;
537
- case 43:
538
- return 43;
539
- case 44:
540
- return 66;
541
- case 45:
542
- return 68;
543
- case 46:
544
- return 68;
545
- case 47:
546
- return 68;
547
- case 48:
548
- return 66;
549
- case 49:
550
- return 66;
551
- case 50:
552
- return 67;
553
- case 51:
554
- return 67;
555
- case 52:
556
- return 67;
557
- case 53:
558
- return 67;
559
- case 54:
560
- return 67;
561
- case 55:
562
- return 68;
563
- case 56:
564
- return 67;
565
- case 57:
566
- return 68;
567
- case 58:
568
- return 69;
569
- case 59:
570
- return 69;
571
- case 60:
572
- return 51;
573
- case 61:
574
- return 69;
575
- case 62:
576
- return 69;
577
- case 63:
578
- return 69;
579
- case 64:
580
- return 52;
581
- case 65:
582
- return 48;
583
- case 66:
584
- return 69;
585
- case 67:
586
- return 66;
587
- case 68:
588
- return 67;
589
- case 69:
590
- return 68;
591
- case 70:
592
- return 70;
593
- case 71:
594
- return 71;
595
- case 72:
596
- return 72;
597
- case 73:
598
- return 72;
599
- case 74:
600
- return 71;
601
- case 75:
602
- return 71;
603
- case 76:
604
- return 71;
605
- case 77:
606
- return 41;
607
- case 78:
608
- return 47;
609
- case 79:
610
- return 40;
611
- case 80:
612
- return o.yytext[0];
613
- case 81:
614
- return 6;
615
- }
616
- }, "anonymous"),
617
- 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, /^(?:[^`]+)/i, /^(?:[`])/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(?=\s+[0-9]))/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],
618
- conditions: { style: { rules: [37, 38, 39, 40, 41, 77, 78], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, block_bq: { rules: [28, 29], inclusive: !1 }, block: { rules: [23, 24, 25, 26, 27, 30, 31, 32, 33], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 34, 35, 36, 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, 73, 74, 75, 76, 79, 80, 81], inclusive: !0 } }
619
- };
620
- return I;
621
- })();
622
- dt.lexer = Dt;
623
- function tt() {
624
- this.yy = {};
625
- }
626
- return d(tt, "Parser"), tt.prototype = dt, dt.Parser = tt, new tt();
627
- })();
628
- gt.parser = gt;
629
- var te = gt, M, ee = (M = class {
630
- constructor() {
631
- this.entities = /* @__PURE__ */ new Map(), this.relationships = [], this.classes = /* @__PURE__ */ new Map(), this.direction = "TB", this.Cardinality = {
632
- ZERO_OR_ONE: "ZERO_OR_ONE",
633
- ZERO_OR_MORE: "ZERO_OR_MORE",
634
- ONE_OR_MORE: "ONE_OR_MORE",
635
- ONLY_ONE: "ONLY_ONE",
636
- MD_PARENT: "MD_PARENT"
637
- }, this.Identification = {
638
- NON_IDENTIFYING: "NON_IDENTIFYING",
639
- IDENTIFYING: "IDENTIFYING"
640
- }, this.setAccTitle = Yt, this.getAccTitle = Pt, this.setAccDescription = zt, this.getAccDescription = Gt, this.setDiagramTitle = Kt, this.getDiagramTitle = Ut, this.getConfig = /* @__PURE__ */ d(() => rt().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);
641
- }
642
- /**
643
- * Add entity
644
- * @param name - The name of the entity
645
- * @param alias - The alias of the entity
646
- */
647
- addEntity(i, c = "") {
648
- return this.entities.has(i) ? !this.entities.get(i)?.alias && c && (this.entities.get(i).alias = c, V.info(`Add alias '${c}' to entity '${i}'`)) : (this.entities.set(i, {
649
- id: `entity-${i}-${this.entities.size}`,
650
- label: i,
651
- attributes: [],
652
- alias: c,
653
- shape: "erBox",
654
- look: rt().look ?? "default",
655
- cssClasses: "default",
656
- cssStyles: [],
657
- labelType: "markdown"
658
- }), V.info("Added new entity :", i)), this.entities.get(i);
659
- }
660
- getEntity(i) {
661
- return this.entities.get(i);
662
- }
663
- getEntities() {
664
- return this.entities;
665
- }
666
- getClasses() {
667
- return this.classes;
668
- }
669
- addAttributes(i, c) {
670
- const h = this.addEntity(i);
671
- let l;
672
- for (l = c.length - 1; l >= 0; l--)
673
- c[l].keys || (c[l].keys = []), c[l].comment || (c[l].comment = ""), h.attributes.push(c[l]), V.debug("Added attribute ", c[l].name);
674
- }
675
- /**
676
- * Add a relationship
677
- *
678
- * @param entA - The first entity in the relationship
679
- * @param rolA - The role played by the first entity in relation to the second
680
- * @param entB - The second entity in the relationship
681
- * @param rSpec - The details of the relationship between the two entities
682
- */
683
- addRelationship(i, c, h, l) {
684
- const p = this.entities.get(i), y = this.entities.get(h);
685
- if (!p || !y)
686
- return;
687
- const u = {
688
- entityA: p.id,
689
- roleA: c,
690
- entityB: y.id,
691
- relSpec: l
692
- };
693
- this.relationships.push(u), V.debug("Added new relationship :", u);
694
- }
695
- getRelationships() {
696
- return this.relationships;
697
- }
698
- getDirection() {
699
- return this.direction;
700
- }
701
- setDirection(i) {
702
- this.direction = i;
703
- }
704
- getCompiledStyles(i) {
705
- let c = [];
706
- for (const h of i) {
707
- const l = this.classes.get(h);
708
- l?.styles && (c = [...c, ...l.styles ?? []].map((p) => p.trim())), l?.textStyles && (c = [...c, ...l.textStyles ?? []].map((p) => p.trim()));
709
- }
710
- return c;
711
- }
712
- addCssStyles(i, c) {
713
- for (const h of i) {
714
- const l = this.entities.get(h);
715
- if (!c || !l)
716
- return;
717
- for (const p of c)
718
- l.cssStyles.push(p);
719
- }
720
- }
721
- addClass(i, c) {
722
- i.forEach((h) => {
723
- let l = this.classes.get(h);
724
- l === void 0 && (l = { id: h, styles: [], textStyles: [] }, this.classes.set(h, l)), c && c.forEach(function(p) {
725
- if (/color/.exec(p)) {
726
- const y = p.replace("fill", "bgFill");
727
- l.textStyles.push(y);
728
- }
729
- l.styles.push(p);
730
- });
731
- });
732
- }
733
- setClass(i, c) {
734
- for (const h of i) {
735
- const l = this.entities.get(h);
736
- if (l)
737
- for (const p of c)
738
- l.cssClasses += " " + p;
739
- }
740
- }
741
- clear() {
742
- this.entities = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.relationships = [], Zt();
743
- }
744
- getData() {
745
- const i = [], c = [], h = rt();
746
- let l = 0;
747
- for (const y of this.entities.keys()) {
748
- const u = this.entities.get(y);
749
- u && (u.cssCompiledStyles = this.getCompiledStyles(u.cssClasses.split(" ")), u.colorIndex = l++, i.push(u));
750
- }
751
- let p = 0;
752
- for (const y of this.relationships) {
753
- const u = {
754
- id: jt(y.entityA, y.entityB, {
755
- prefix: "id",
756
- counter: p++
757
- }),
758
- type: "normal",
759
- curve: "basis",
760
- start: y.entityA,
761
- end: y.entityB,
762
- label: y.roleA,
763
- labelpos: "c",
764
- thickness: "normal",
765
- classes: "relationshipLine",
766
- arrowTypeStart: y.relSpec.cardB.toLowerCase(),
767
- arrowTypeEnd: y.relSpec.cardA.toLowerCase(),
768
- pattern: y.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
769
- look: h.look,
770
- labelType: "markdown"
771
- };
772
- c.push(u);
773
- }
774
- return { nodes: i, edges: c, other: {}, config: h, direction: "TB" };
775
- }
776
- }, d(M, "ErDB"), M), vt = {};
777
- qt(vt, {
778
- draw: () => se
779
- });
780
- var se = /* @__PURE__ */ d(async function(s, i, c, h) {
781
- V.info("REF0:"), V.info("Drawing er diagram (unified)", i);
782
- const { securityLevel: l, er: p, layout: y } = rt(), u = h.db.getData(), m = Bt(i, l);
783
- u.type = h.type, u.layoutAlgorithm = Qt(y), u.config.flowchart.nodeSpacing = p?.nodeSpacing || 140, u.config.flowchart.rankSpacing = p?.rankSpacing || 80, u.direction = h.db.getDirection();
784
- const { config: W } = u, { look: q } = W;
785
- q === "neo" ? u.markers = [
786
- "only_one_neo",
787
- "zero_or_one_neo",
788
- "one_or_more_neo",
789
- "zero_or_more_neo"
790
- ] : u.markers = ["only_one", "zero_or_one", "one_or_more", "zero_or_more"], u.diagramId = i, await Xt(u, m), u.layoutAlgorithm === "elk" && m.select(".edges").lower();
791
- const S = m.selectAll('[id*="-background"]');
792
- Array.from(S).length > 0 && S.each(function() {
793
- const B = Ht(this), R = B.attr("id").replace("-background", ""), T = m.select(`#${CSS.escape(R)}`);
794
- if (!T.empty()) {
795
- const C = T.attr("transform");
796
- B.attr("transform", C);
797
- }
798
- });
799
- const Q = 8;
800
- Jt.insertTitle(
801
- m,
802
- "erDiagramTitleText",
803
- p?.titleTopMargin ?? 25,
804
- h.db.getDiagramTitle()
805
- ), Ft(m, Q, "erDiagram", p?.useMaxWidth ?? !0);
806
- }, "draw"), xt = /* @__PURE__ */ d((s, i) => {
807
- const c = $t, h = c(s, "r"), l = c(s, "g"), p = c(s, "b");
808
- return Wt(h, l, p, i);
809
- }, "fade"), nt = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), ie = /* @__PURE__ */ d((s) => {
810
- const { theme: i, look: c, bkgColorArray: h, borderColorArray: l } = s;
811
- if (!nt.has(i))
812
- return "";
813
- const p = h?.length > 0;
814
- let y = "";
815
- for (let u = 0; u < s.THEME_COLOR_LIMIT; u++)
816
- y += `
817
-
818
- [data-look="${c}"][data-color-id="color-${u}"].node path {
819
- stroke: ${l[u]};
820
- ${p ? `fill: ${h[u]};` : ""}
821
- }
822
-
823
- [data-look="${c}"][data-color-id="color-${u}"].node rect {
824
- stroke: ${l[u]};
825
- ${p ? `fill: ${h[u]};` : ""}
826
- }
827
- `;
828
- return y;
829
- }, "genColor"), re = /* @__PURE__ */ d((s) => {
830
- const { look: i, theme: c, erEdgeLabelBackground: h, strokeWidth: l } = s;
831
- return `
832
- ${ie(s)}
833
- .entityBox {
834
- fill: ${s.mainBkg};
835
- stroke: ${s.nodeBorder};
836
- }
837
-
838
- .relationshipLabelBox {
839
- fill: ${s.tertiaryColor};
840
- opacity: 0.7;
841
- background-color: ${s.tertiaryColor};
842
- rect {
843
- opacity: 0.5;
844
- }
845
- }
846
-
847
- .labelBkg {
848
- background-color: ${nt.has(c) && h ? h : xt(s.tertiaryColor, 0.5)};
849
- }
850
-
851
- .edgeLabel {
852
- background-color: ${nt.has(c) && h ? h : s.edgeLabelBackground};
853
- }
854
- .edgeLabel .label rect {
855
- fill: ${nt.has(c) && h ? h : s.edgeLabelBackground};
856
- }
857
- .edgeLabel .label text {
858
- fill: ${s.textColor};
859
- }
860
-
861
- .edgeLabel .label {
862
- fill: ${s.nodeBorder};
863
- font-size: 14px;
864
- }
865
-
866
- .label {
867
- font-family: ${s.fontFamily};
868
- color: ${s.nodeTextColor || s.textColor};
869
- }
870
-
871
- .edge-pattern-dashed {
872
- stroke-dasharray: 8,8;
873
- }
874
-
875
- .node rect,
876
- .node circle,
877
- .node ellipse,
878
- .node polygon
879
- {
880
- fill: ${s.mainBkg};
881
- stroke: ${s.nodeBorder};
882
- stroke-width: ${i === "neo" ? l : "1px"};
883
- }
884
-
885
- .relationshipLine {
886
- stroke: ${s.lineColor};
887
- stroke-width: ${i === "neo" ? l : "1px"};
888
- fill: none;
889
- }
890
-
891
- .marker {
892
- fill: none !important;
893
- stroke: ${s.lineColor} !important;
894
- stroke-width: 1;
895
- }
896
- [data-look=neo].labelBkg {
897
- background-color: ${xt(s.tertiaryColor, 0.5)};
898
- }
899
- `;
900
- }, "getStyles"), ne = re, he = {
901
- parser: te,
902
- get db() {
903
- return new ee();
904
- },
905
- renderer: vt,
906
- styles: ne
907
- };
908
- export {
909
- he as diagram
910
- };