@infinilabs/ai-chat 0.0.0 → 0.0.2

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 (119) hide show
  1. package/README.md +310 -56
  2. package/dist/_baseUniq-BFn6cCm9.js +152 -0
  3. package/dist/_baseUniq-nfJyj2zU.cjs +151 -0
  4. package/dist/arc-BWSMkwk2.cjs +130 -0
  5. package/dist/arc-DODeX7B9.js +131 -0
  6. package/dist/architecture-U656AL7Q-B4C0nw6C.js +5 -0
  7. package/dist/architecture-U656AL7Q-CVURQXwt.cjs +5 -0
  8. package/dist/architectureDiagram-VXUJARFQ-2UbdzpNz.cjs +8681 -0
  9. package/dist/architectureDiagram-VXUJARFQ-NCVmzKuE.js +8681 -0
  10. package/dist/blockDiagram-VD42YOAC-B3yCPK1N.cjs +3606 -0
  11. package/dist/blockDiagram-VD42YOAC-C4FsmQfk.js +3606 -0
  12. package/dist/c4Diagram-YG6GDRKO-ATyoKzFV.js +2481 -0
  13. package/dist/c4Diagram-YG6GDRKO-COwVcHWj.cjs +2481 -0
  14. package/dist/channel-2Y73gsu9.cjs +6 -0
  15. package/dist/channel-oB8MffQV.js +7 -0
  16. package/dist/chunk-4BX2VUAB-C3diNHZw.cjs +15 -0
  17. package/dist/chunk-4BX2VUAB-sd2zFBFz.js +16 -0
  18. package/dist/chunk-55IACEB6-6ohTnYE3.js +13 -0
  19. package/dist/chunk-55IACEB6-T-CzlJke.cjs +12 -0
  20. package/dist/chunk-B4BG7PRW-B1zqG62l.cjs +1825 -0
  21. package/dist/chunk-B4BG7PRW-E1dti26Y.js +1826 -0
  22. package/dist/chunk-DI55MBZ5-Dk0kfYBV.cjs +1914 -0
  23. package/dist/chunk-DI55MBZ5-DpHw-vMw.js +1915 -0
  24. package/dist/chunk-FMBD7UC4-B1vXpasq.js +19 -0
  25. package/dist/chunk-FMBD7UC4-CShN9-qf.cjs +18 -0
  26. package/dist/chunk-QN33PNHL-Cw7FG91D.js +24 -0
  27. package/dist/chunk-QN33PNHL-DJi1fhak.cjs +23 -0
  28. package/dist/chunk-QZHKN3VN-BweiBR9P.js +17 -0
  29. package/dist/chunk-QZHKN3VN-DfUW_gDw.cjs +16 -0
  30. package/dist/chunk-TZMSLE5B-DY2Kbag4.cjs +107 -0
  31. package/dist/chunk-TZMSLE5B-ZQ2Esoix.js +108 -0
  32. package/dist/classDiagram-2ON5EDUG-D2tIbkjc.js +19 -0
  33. package/dist/classDiagram-2ON5EDUG-DRhRmkUb.cjs +19 -0
  34. package/dist/classDiagram-v2-WZHVMYZB-D2tIbkjc.js +19 -0
  35. package/dist/classDiagram-v2-WZHVMYZB-DRhRmkUb.cjs +19 -0
  36. package/dist/clone-BMkj3yun.cjs +7 -0
  37. package/dist/clone-ChHXIoR6.js +8 -0
  38. package/dist/cose-bilkent-S5V4N54A-BXnWH5Od.cjs +4942 -0
  39. package/dist/cose-bilkent-S5V4N54A-D15BmpCb.js +4942 -0
  40. package/dist/cytoscape.esm-BfvZ3QT_.js +30239 -0
  41. package/dist/cytoscape.esm-D8IBYQeQ.cjs +30238 -0
  42. package/dist/dagre-6UL2VRFP-DGQ6TW_g.cjs +693 -0
  43. package/dist/dagre-6UL2VRFP-WmhUYWg8.js +693 -0
  44. package/dist/defaultLocale-DVr69WTU.js +206 -0
  45. package/dist/defaultLocale-DwYGIg9G.cjs +203 -0
  46. package/dist/diagram-PSM6KHXK-DSfHBoUT.js +845 -0
  47. package/dist/diagram-PSM6KHXK-J4qyGeN7.cjs +845 -0
  48. package/dist/diagram-QEK2KX5R-D96wT5cH.cjs +300 -0
  49. package/dist/diagram-QEK2KX5R-I_nyexpY.js +300 -0
  50. package/dist/diagram-S2PKOQOG-BC_WyKEe.cjs +210 -0
  51. package/dist/diagram-S2PKOQOG-aooXSMNo.js +210 -0
  52. package/dist/erDiagram-Q2GNP2WA-DQ8Lquay.cjs +1158 -0
  53. package/dist/erDiagram-Q2GNP2WA-DWF8e6EL.js +1158 -0
  54. package/dist/flowDiagram-NV44I4VS-CM9c4F1o.js +2331 -0
  55. package/dist/flowDiagram-NV44I4VS-DpYNkyM2.cjs +2331 -0
  56. package/dist/ganttDiagram-JELNMOA3-CAsoD6rZ.js +3679 -0
  57. package/dist/ganttDiagram-JELNMOA3-DfKahpj4.cjs +3679 -0
  58. package/dist/gitGraph-F6HP7TQM-BX2fz4_i.js +5 -0
  59. package/dist/gitGraph-F6HP7TQM-DRkGg4T1.cjs +5 -0
  60. package/dist/gitGraphDiagram-NY62KEGX-PXpI94u6.js +1203 -0
  61. package/dist/gitGraphDiagram-NY62KEGX-YhnKpooH.cjs +1203 -0
  62. package/dist/graph-BvxpI7Xc.js +596 -0
  63. package/dist/graph-CI_TWBSn.cjs +595 -0
  64. package/dist/index-BctLGjTK.cjs +120500 -0
  65. package/dist/index-CjSgoo1P.js +120485 -0
  66. package/dist/index.cjs +19 -0
  67. package/dist/index.js +12 -19961
  68. package/dist/info-NVLQJR56-BGbTE7dw.cjs +5 -0
  69. package/dist/info-NVLQJR56-DRxIh-N8.js +5 -0
  70. package/dist/infoDiagram-WHAUD3N6-BB2Bnbnh.cjs +31 -0
  71. package/dist/infoDiagram-WHAUD3N6-D_RrgwxS.js +31 -0
  72. package/dist/init-DevvdK2U.cjs +15 -0
  73. package/dist/init-ZxktEp_H.js +16 -0
  74. package/dist/journeyDiagram-XKPGCS4Q-BJjXlMIj.js +1254 -0
  75. package/dist/journeyDiagram-XKPGCS4Q-BcBLsfI9.cjs +1254 -0
  76. package/dist/kanban-definition-3W4ZIXB7-0wwNBZ93.js +1047 -0
  77. package/dist/kanban-definition-3W4ZIXB7-CaY0q4j9.cjs +1047 -0
  78. package/dist/katex-BhpYeT3b.cjs +14523 -0
  79. package/dist/katex-ei8sH3Uy.js +14524 -0
  80. package/dist/layout-CcghncRv.js +2183 -0
  81. package/dist/layout-CvwzED_C.cjs +2182 -0
  82. package/dist/linear-CYow-mAK.cjs +339 -0
  83. package/dist/linear-D_gKQzVp.js +340 -0
  84. package/dist/mermaid-parser.core-CzmkR-3i.cjs +18703 -0
  85. package/dist/mermaid-parser.core-DCMDT-Cp.js +18704 -0
  86. package/dist/min-BBp7Smma.js +41 -0
  87. package/dist/min-Gu1I_bJ9.cjs +40 -0
  88. package/dist/mindmap-definition-VGOIOE7T-D16Pp1u5.cjs +1126 -0
  89. package/dist/mindmap-definition-VGOIOE7T-PjSLRtz4.js +1126 -0
  90. package/dist/ordinal-CxptdPJm.js +76 -0
  91. package/dist/ordinal-D7sQNqXZ.cjs +75 -0
  92. package/dist/packet-BFZMPI3H-BvdogPiS.js +5 -0
  93. package/dist/packet-BFZMPI3H-C7pOHUWY.cjs +5 -0
  94. package/dist/pie-7BOR55EZ-D-DxSHbP.cjs +5 -0
  95. package/dist/pie-7BOR55EZ-DEWJe4Xn.js +5 -0
  96. package/dist/pieDiagram-ADFJNKIX-CoDddKZl.js +237 -0
  97. package/dist/pieDiagram-ADFJNKIX-DjN4DU9l.cjs +237 -0
  98. package/dist/quadrantDiagram-AYHSOK5B-BZOg0JMm.js +1335 -0
  99. package/dist/quadrantDiagram-AYHSOK5B-DXjTSOL4.cjs +1335 -0
  100. package/dist/radar-NHE76QYJ-BrnDXy9q.cjs +5 -0
  101. package/dist/radar-NHE76QYJ-C2WmPmJ4.js +5 -0
  102. package/dist/requirementDiagram-UZGBJVZJ-CCW1O1xH.js +1161 -0
  103. package/dist/requirementDiagram-UZGBJVZJ-e5F3-dDI.cjs +1161 -0
  104. package/dist/sankeyDiagram-TZEHDZUN-BaGzCxTp.js +1193 -0
  105. package/dist/sankeyDiagram-TZEHDZUN-DtIvOvVI.cjs +1193 -0
  106. package/dist/sequenceDiagram-WL72ISMW-0vFhYnxn.cjs +3874 -0
  107. package/dist/sequenceDiagram-WL72ISMW-DL3B7U56.js +3874 -0
  108. package/dist/stateDiagram-FKZM4ZOC-CXW608BR.cjs +447 -0
  109. package/dist/stateDiagram-FKZM4ZOC-Ddw6HxPD.js +447 -0
  110. package/dist/stateDiagram-v2-4FDKWEC3-DZCkQKmp.js +19 -0
  111. package/dist/stateDiagram-v2-4FDKWEC3-DefWUbvq.cjs +19 -0
  112. package/dist/timeline-definition-IT6M3QCI-C3TfA9lE.cjs +1222 -0
  113. package/dist/timeline-definition-IT6M3QCI-DiS88lUo.js +1222 -0
  114. package/dist/treemap-KMMF4GRG-Bl-H6j2c.cjs +5 -0
  115. package/dist/treemap-KMMF4GRG-DGGr_R9A.js +5 -0
  116. package/dist/xychartDiagram-PRI3JC2R-BrOwRjfF.js +1886 -0
  117. package/dist/xychartDiagram-PRI3JC2R-CM06DttH.cjs +1886 -0
  118. package/package.json +22 -11
  119. package/dist/index.css +0 -1582
@@ -0,0 +1,2331 @@
1
+ var _a;
2
+ import { g as getIconStyles } from "./chunk-FMBD7UC4-B1vXpasq.js";
3
+ import { _ as __name, n as setConfig2, l as log, c as getConfig2, d as select, o as getRegisteredLayoutAlgorithm, r as render, u as utils_default, b as setAccTitle, s as setAccDescription, p as setDiagramTitle, a as getAccTitle, g as getAccDescription, q as getDiagramTitle, k as common_default, t as load, J as JSON_SCHEMA, v as isValidShape, x as getEdgeId, y as clear, z as defaultConfig2, A as rgba } from "./index-CjSgoo1P.js";
4
+ import { g as getDiagramElement } from "./chunk-55IACEB6-6ohTnYE3.js";
5
+ import { s as setupViewPortForSVG } from "./chunk-QN33PNHL-Cw7FG91D.js";
6
+ import { c as channel } from "./channel-oB8MffQV.js";
7
+ var MERMAID_DOM_ID_PREFIX = "flowchart-";
8
+ var FlowDB = (_a = class {
9
+ // cspell:ignore funs
10
+ constructor() {
11
+ this.vertexCounter = 0;
12
+ this.config = getConfig2();
13
+ this.vertices = /* @__PURE__ */ new Map();
14
+ this.edges = [];
15
+ this.classes = /* @__PURE__ */ new Map();
16
+ this.subGraphs = [];
17
+ this.subGraphLookup = /* @__PURE__ */ new Map();
18
+ this.tooltips = /* @__PURE__ */ new Map();
19
+ this.subCount = 0;
20
+ this.firstGraphFlag = true;
21
+ this.secCount = -1;
22
+ this.posCrossRef = [];
23
+ this.funs = [];
24
+ this.setAccTitle = setAccTitle;
25
+ this.setAccDescription = setAccDescription;
26
+ this.setDiagramTitle = setDiagramTitle;
27
+ this.getAccTitle = getAccTitle;
28
+ this.getAccDescription = getAccDescription;
29
+ this.getDiagramTitle = getDiagramTitle;
30
+ this.funs.push(this.setupToolTips.bind(this));
31
+ this.addVertex = this.addVertex.bind(this);
32
+ this.firstGraph = this.firstGraph.bind(this);
33
+ this.setDirection = this.setDirection.bind(this);
34
+ this.addSubGraph = this.addSubGraph.bind(this);
35
+ this.addLink = this.addLink.bind(this);
36
+ this.setLink = this.setLink.bind(this);
37
+ this.updateLink = this.updateLink.bind(this);
38
+ this.addClass = this.addClass.bind(this);
39
+ this.setClass = this.setClass.bind(this);
40
+ this.destructLink = this.destructLink.bind(this);
41
+ this.setClickEvent = this.setClickEvent.bind(this);
42
+ this.setTooltip = this.setTooltip.bind(this);
43
+ this.updateLinkInterpolate = this.updateLinkInterpolate.bind(this);
44
+ this.setClickFun = this.setClickFun.bind(this);
45
+ this.bindFunctions = this.bindFunctions.bind(this);
46
+ this.lex = {
47
+ firstGraph: this.firstGraph.bind(this)
48
+ };
49
+ this.clear();
50
+ this.setGen("gen-2");
51
+ }
52
+ sanitizeText(txt) {
53
+ return common_default.sanitizeText(txt, this.config);
54
+ }
55
+ /**
56
+ * Function to lookup domId from id in the graph definition.
57
+ *
58
+ * @param id - id of the node
59
+ */
60
+ lookUpDomId(id) {
61
+ for (const vertex of this.vertices.values()) {
62
+ if (vertex.id === id) {
63
+ return vertex.domId;
64
+ }
65
+ }
66
+ return id;
67
+ }
68
+ /**
69
+ * Function called by parser when a node definition has been found
70
+ */
71
+ addVertex(id, textObj, type, style, classes, dir, props = {}, metadata) {
72
+ if (!id || id.trim().length === 0) {
73
+ return;
74
+ }
75
+ let doc;
76
+ if (metadata !== void 0) {
77
+ let yamlData;
78
+ if (!metadata.includes("\n")) {
79
+ yamlData = "{\n" + metadata + "\n}";
80
+ } else {
81
+ yamlData = metadata + "\n";
82
+ }
83
+ doc = load(yamlData, { schema: JSON_SCHEMA });
84
+ }
85
+ const edge = this.edges.find((e) => e.id === id);
86
+ if (edge) {
87
+ const edgeDoc = doc;
88
+ if (edgeDoc?.animate !== void 0) {
89
+ edge.animate = edgeDoc.animate;
90
+ }
91
+ if (edgeDoc?.animation !== void 0) {
92
+ edge.animation = edgeDoc.animation;
93
+ }
94
+ if (edgeDoc?.curve !== void 0) {
95
+ edge.interpolate = edgeDoc.curve;
96
+ }
97
+ return;
98
+ }
99
+ let txt;
100
+ let vertex = this.vertices.get(id);
101
+ if (vertex === void 0) {
102
+ vertex = {
103
+ id,
104
+ labelType: "text",
105
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + this.vertexCounter,
106
+ styles: [],
107
+ classes: []
108
+ };
109
+ this.vertices.set(id, vertex);
110
+ }
111
+ this.vertexCounter++;
112
+ if (textObj !== void 0) {
113
+ this.config = getConfig2();
114
+ txt = this.sanitizeText(textObj.text.trim());
115
+ vertex.labelType = textObj.type;
116
+ if (txt.startsWith('"') && txt.endsWith('"')) {
117
+ txt = txt.substring(1, txt.length - 1);
118
+ }
119
+ vertex.text = txt;
120
+ } else {
121
+ if (vertex.text === void 0) {
122
+ vertex.text = id;
123
+ }
124
+ }
125
+ if (type !== void 0) {
126
+ vertex.type = type;
127
+ }
128
+ if (style !== void 0 && style !== null) {
129
+ style.forEach((s) => {
130
+ vertex.styles.push(s);
131
+ });
132
+ }
133
+ if (classes !== void 0 && classes !== null) {
134
+ classes.forEach((s) => {
135
+ vertex.classes.push(s);
136
+ });
137
+ }
138
+ if (dir !== void 0) {
139
+ vertex.dir = dir;
140
+ }
141
+ if (vertex.props === void 0) {
142
+ vertex.props = props;
143
+ } else if (props !== void 0) {
144
+ Object.assign(vertex.props, props);
145
+ }
146
+ if (doc !== void 0) {
147
+ if (doc.shape) {
148
+ if (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes("_")) {
149
+ throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);
150
+ } else if (!isValidShape(doc.shape)) {
151
+ throw new Error(`No such shape: ${doc.shape}.`);
152
+ }
153
+ vertex.type = doc?.shape;
154
+ }
155
+ if (doc?.label) {
156
+ vertex.text = doc?.label;
157
+ }
158
+ if (doc?.icon) {
159
+ vertex.icon = doc?.icon;
160
+ if (!doc.label?.trim() && vertex.text === id) {
161
+ vertex.text = "";
162
+ }
163
+ }
164
+ if (doc?.form) {
165
+ vertex.form = doc?.form;
166
+ }
167
+ if (doc?.pos) {
168
+ vertex.pos = doc?.pos;
169
+ }
170
+ if (doc?.img) {
171
+ vertex.img = doc?.img;
172
+ if (!doc.label?.trim() && vertex.text === id) {
173
+ vertex.text = "";
174
+ }
175
+ }
176
+ if (doc?.constraint) {
177
+ vertex.constraint = doc.constraint;
178
+ }
179
+ if (doc.w) {
180
+ vertex.assetWidth = Number(doc.w);
181
+ }
182
+ if (doc.h) {
183
+ vertex.assetHeight = Number(doc.h);
184
+ }
185
+ }
186
+ }
187
+ /**
188
+ * Function called by parser when a link/edge definition has been found
189
+ *
190
+ */
191
+ addSingleLink(_start, _end, type, id) {
192
+ const start = _start;
193
+ const end = _end;
194
+ const edge = {
195
+ start,
196
+ end,
197
+ type: void 0,
198
+ text: "",
199
+ labelType: "text",
200
+ classes: [],
201
+ isUserDefinedId: false,
202
+ interpolate: this.edges.defaultInterpolate
203
+ };
204
+ log.info("abc78 Got edge...", edge);
205
+ const linkTextObj = type.text;
206
+ if (linkTextObj !== void 0) {
207
+ edge.text = this.sanitizeText(linkTextObj.text.trim());
208
+ if (edge.text.startsWith('"') && edge.text.endsWith('"')) {
209
+ edge.text = edge.text.substring(1, edge.text.length - 1);
210
+ }
211
+ edge.labelType = linkTextObj.type;
212
+ }
213
+ if (type !== void 0) {
214
+ edge.type = type.type;
215
+ edge.stroke = type.stroke;
216
+ edge.length = type.length > 10 ? 10 : type.length;
217
+ }
218
+ if (id && !this.edges.some((e) => e.id === id)) {
219
+ edge.id = id;
220
+ edge.isUserDefinedId = true;
221
+ } else {
222
+ const existingLinks = this.edges.filter((e) => e.start === edge.start && e.end === edge.end);
223
+ if (existingLinks.length === 0) {
224
+ edge.id = getEdgeId(edge.start, edge.end, { counter: 0, prefix: "L" });
225
+ } else {
226
+ edge.id = getEdgeId(edge.start, edge.end, {
227
+ counter: existingLinks.length + 1,
228
+ prefix: "L"
229
+ });
230
+ }
231
+ }
232
+ if (this.edges.length < (this.config.maxEdges ?? 500)) {
233
+ log.info("Pushing edge...");
234
+ this.edges.push(edge);
235
+ } else {
236
+ throw new Error(
237
+ `Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
238
+
239
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
240
+ You cannot set this config via configuration inside the diagram as it is a secure config.
241
+ You have to call mermaid.initialize.`
242
+ );
243
+ }
244
+ }
245
+ isLinkData(value) {
246
+ return value !== null && typeof value === "object" && "id" in value && typeof value.id === "string";
247
+ }
248
+ addLink(_start, _end, linkData) {
249
+ const id = this.isLinkData(linkData) ? linkData.id.replace("@", "") : void 0;
250
+ log.info("addLink", _start, _end, id);
251
+ for (const start of _start) {
252
+ for (const end of _end) {
253
+ const isLastStart = start === _start[_start.length - 1];
254
+ const isFirstEnd = end === _end[0];
255
+ if (isLastStart && isFirstEnd) {
256
+ this.addSingleLink(start, end, linkData, id);
257
+ } else {
258
+ this.addSingleLink(start, end, linkData, void 0);
259
+ }
260
+ }
261
+ }
262
+ }
263
+ /**
264
+ * Updates a link's line interpolation algorithm
265
+ */
266
+ updateLinkInterpolate(positions, interpolate) {
267
+ positions.forEach((pos) => {
268
+ if (pos === "default") {
269
+ this.edges.defaultInterpolate = interpolate;
270
+ } else {
271
+ this.edges[pos].interpolate = interpolate;
272
+ }
273
+ });
274
+ }
275
+ /**
276
+ * Updates a link with a style
277
+ *
278
+ */
279
+ updateLink(positions, style) {
280
+ positions.forEach((pos) => {
281
+ if (typeof pos === "number" && pos >= this.edges.length) {
282
+ throw new Error(
283
+ `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)`
284
+ );
285
+ }
286
+ if (pos === "default") {
287
+ this.edges.defaultStyle = style;
288
+ } else {
289
+ this.edges[pos].style = style;
290
+ if ((this.edges[pos]?.style?.length ?? 0) > 0 && !this.edges[pos]?.style?.some((s) => s?.startsWith("fill"))) {
291
+ this.edges[pos]?.style?.push("fill:none");
292
+ }
293
+ }
294
+ });
295
+ }
296
+ addClass(ids, _style) {
297
+ const style = _style.join().replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
298
+ ids.split(",").forEach((id) => {
299
+ let classNode = this.classes.get(id);
300
+ if (classNode === void 0) {
301
+ classNode = { id, styles: [], textStyles: [] };
302
+ this.classes.set(id, classNode);
303
+ }
304
+ if (style !== void 0 && style !== null) {
305
+ style.forEach((s) => {
306
+ if (/color/.exec(s)) {
307
+ const newStyle = s.replace("fill", "bgFill");
308
+ classNode.textStyles.push(newStyle);
309
+ }
310
+ classNode.styles.push(s);
311
+ });
312
+ }
313
+ });
314
+ }
315
+ /**
316
+ * Called by parser when a graph definition is found, stores the direction of the chart.
317
+ *
318
+ */
319
+ setDirection(dir) {
320
+ this.direction = dir.trim();
321
+ if (/.*</.exec(this.direction)) {
322
+ this.direction = "RL";
323
+ }
324
+ if (/.*\^/.exec(this.direction)) {
325
+ this.direction = "BT";
326
+ }
327
+ if (/.*>/.exec(this.direction)) {
328
+ this.direction = "LR";
329
+ }
330
+ if (/.*v/.exec(this.direction)) {
331
+ this.direction = "TB";
332
+ }
333
+ if (this.direction === "TD") {
334
+ this.direction = "TB";
335
+ }
336
+ }
337
+ /**
338
+ * Called by parser when a special node is found, e.g. a clickable element.
339
+ *
340
+ * @param ids - Comma separated list of ids
341
+ * @param className - Class to add
342
+ */
343
+ setClass(ids, className) {
344
+ for (const id of ids.split(",")) {
345
+ const vertex = this.vertices.get(id);
346
+ if (vertex) {
347
+ vertex.classes.push(className);
348
+ }
349
+ const edge = this.edges.find((e) => e.id === id);
350
+ if (edge) {
351
+ edge.classes.push(className);
352
+ }
353
+ const subGraph = this.subGraphLookup.get(id);
354
+ if (subGraph) {
355
+ subGraph.classes.push(className);
356
+ }
357
+ }
358
+ }
359
+ setTooltip(ids, tooltip) {
360
+ if (tooltip === void 0) {
361
+ return;
362
+ }
363
+ tooltip = this.sanitizeText(tooltip);
364
+ for (const id of ids.split(",")) {
365
+ this.tooltips.set(this.version === "gen-1" ? this.lookUpDomId(id) : id, tooltip);
366
+ }
367
+ }
368
+ setClickFun(id, functionName, functionArgs) {
369
+ const domId = this.lookUpDomId(id);
370
+ if (getConfig2().securityLevel !== "loose") {
371
+ return;
372
+ }
373
+ if (functionName === void 0) {
374
+ return;
375
+ }
376
+ let argList = [];
377
+ if (typeof functionArgs === "string") {
378
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
379
+ for (let i = 0; i < argList.length; i++) {
380
+ let item = argList[i].trim();
381
+ if (item.startsWith('"') && item.endsWith('"')) {
382
+ item = item.substr(1, item.length - 2);
383
+ }
384
+ argList[i] = item;
385
+ }
386
+ }
387
+ if (argList.length === 0) {
388
+ argList.push(id);
389
+ }
390
+ const vertex = this.vertices.get(id);
391
+ if (vertex) {
392
+ vertex.haveCallback = true;
393
+ this.funs.push(() => {
394
+ const elem = document.querySelector(`[id="${domId}"]`);
395
+ if (elem !== null) {
396
+ elem.addEventListener(
397
+ "click",
398
+ () => {
399
+ utils_default.runFunc(functionName, ...argList);
400
+ },
401
+ false
402
+ );
403
+ }
404
+ });
405
+ }
406
+ }
407
+ /**
408
+ * Called by parser when a link is found. Adds the URL to the vertex data.
409
+ *
410
+ * @param ids - Comma separated list of ids
411
+ * @param linkStr - URL to create a link for
412
+ * @param target - Target attribute for the link
413
+ */
414
+ setLink(ids, linkStr, target) {
415
+ ids.split(",").forEach((id) => {
416
+ const vertex = this.vertices.get(id);
417
+ if (vertex !== void 0) {
418
+ vertex.link = utils_default.formatUrl(linkStr, this.config);
419
+ vertex.linkTarget = target;
420
+ }
421
+ });
422
+ this.setClass(ids, "clickable");
423
+ }
424
+ getTooltip(id) {
425
+ return this.tooltips.get(id);
426
+ }
427
+ /**
428
+ * Called by parser when a click definition is found. Registers an event handler.
429
+ *
430
+ * @param ids - Comma separated list of ids
431
+ * @param functionName - Function to be called on click
432
+ * @param functionArgs - Arguments to be passed to the function
433
+ */
434
+ setClickEvent(ids, functionName, functionArgs) {
435
+ ids.split(",").forEach((id) => {
436
+ this.setClickFun(id, functionName, functionArgs);
437
+ });
438
+ this.setClass(ids, "clickable");
439
+ }
440
+ bindFunctions(element) {
441
+ this.funs.forEach((fun) => {
442
+ fun(element);
443
+ });
444
+ }
445
+ getDirection() {
446
+ return this.direction?.trim();
447
+ }
448
+ /**
449
+ * Retrieval function for fetching the found nodes after parsing has completed.
450
+ *
451
+ */
452
+ getVertices() {
453
+ return this.vertices;
454
+ }
455
+ /**
456
+ * Retrieval function for fetching the found links after parsing has completed.
457
+ *
458
+ */
459
+ getEdges() {
460
+ return this.edges;
461
+ }
462
+ /**
463
+ * Retrieval function for fetching the found class definitions after parsing has completed.
464
+ *
465
+ */
466
+ getClasses() {
467
+ return this.classes;
468
+ }
469
+ setupToolTips(element) {
470
+ let tooltipElem = select(".mermaidTooltip");
471
+ if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
472
+ tooltipElem = select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0);
473
+ }
474
+ const svg = select(element).select("svg");
475
+ const nodes = svg.selectAll("g.node");
476
+ nodes.on("mouseover", (e) => {
477
+ const el = select(e.currentTarget);
478
+ const title = el.attr("title");
479
+ if (title === null) {
480
+ return;
481
+ }
482
+ const rect = e.currentTarget?.getBoundingClientRect();
483
+ tooltipElem.transition().duration(200).style("opacity", ".9");
484
+ tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px");
485
+ tooltipElem.html(tooltipElem.html().replace(/&lt;br\/&gt;/g, "<br/>"));
486
+ el.classed("hover", true);
487
+ }).on("mouseout", (e) => {
488
+ tooltipElem.transition().duration(500).style("opacity", 0);
489
+ const el = select(e.currentTarget);
490
+ el.classed("hover", false);
491
+ });
492
+ }
493
+ /**
494
+ * Clears the internal graph db so that a new graph can be parsed.
495
+ *
496
+ */
497
+ clear(ver = "gen-2") {
498
+ this.vertices = /* @__PURE__ */ new Map();
499
+ this.classes = /* @__PURE__ */ new Map();
500
+ this.edges = [];
501
+ this.funs = [this.setupToolTips.bind(this)];
502
+ this.subGraphs = [];
503
+ this.subGraphLookup = /* @__PURE__ */ new Map();
504
+ this.subCount = 0;
505
+ this.tooltips = /* @__PURE__ */ new Map();
506
+ this.firstGraphFlag = true;
507
+ this.version = ver;
508
+ this.config = getConfig2();
509
+ clear();
510
+ }
511
+ setGen(ver) {
512
+ this.version = ver || "gen-2";
513
+ }
514
+ defaultStyle() {
515
+ return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
516
+ }
517
+ addSubGraph(_id, list, _title) {
518
+ let id = _id.text.trim();
519
+ let title = _title.text;
520
+ if (_id === _title && /\s/.exec(_title.text)) {
521
+ id = void 0;
522
+ }
523
+ const uniq = /* @__PURE__ */ __name((a) => {
524
+ const prims = { boolean: {}, number: {}, string: {} };
525
+ const objs = [];
526
+ let dir2;
527
+ const nodeList2 = a.filter(function(item) {
528
+ const type = typeof item;
529
+ if (item.stmt && item.stmt === "dir") {
530
+ dir2 = item.value;
531
+ return false;
532
+ }
533
+ if (item.trim() === "") {
534
+ return false;
535
+ }
536
+ if (type in prims) {
537
+ return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
538
+ } else {
539
+ return objs.includes(item) ? false : objs.push(item);
540
+ }
541
+ });
542
+ return { nodeList: nodeList2, dir: dir2 };
543
+ }, "uniq");
544
+ const result = uniq(list.flat());
545
+ const nodeList = result.nodeList;
546
+ let dir = result.dir;
547
+ const flowchartConfig = getConfig2().flowchart ?? {};
548
+ dir = dir ?? (flowchartConfig.inheritDir ? this.getDirection() ?? getConfig2().direction ?? void 0 : void 0);
549
+ if (this.version === "gen-1") {
550
+ for (let i = 0; i < nodeList.length; i++) {
551
+ nodeList[i] = this.lookUpDomId(nodeList[i]);
552
+ }
553
+ }
554
+ id = id ?? "subGraph" + this.subCount;
555
+ title = title || "";
556
+ title = this.sanitizeText(title);
557
+ this.subCount = this.subCount + 1;
558
+ const subGraph = {
559
+ id,
560
+ nodes: nodeList,
561
+ title: title.trim(),
562
+ classes: [],
563
+ dir,
564
+ labelType: _title.type
565
+ };
566
+ log.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir);
567
+ subGraph.nodes = this.makeUniq(subGraph, this.subGraphs).nodes;
568
+ this.subGraphs.push(subGraph);
569
+ this.subGraphLookup.set(id, subGraph);
570
+ return id;
571
+ }
572
+ getPosForId(id) {
573
+ for (const [i, subGraph] of this.subGraphs.entries()) {
574
+ if (subGraph.id === id) {
575
+ return i;
576
+ }
577
+ }
578
+ return -1;
579
+ }
580
+ indexNodes2(id, pos) {
581
+ const nodes = this.subGraphs[pos].nodes;
582
+ this.secCount = this.secCount + 1;
583
+ if (this.secCount > 2e3) {
584
+ return {
585
+ result: false,
586
+ count: 0
587
+ };
588
+ }
589
+ this.posCrossRef[this.secCount] = pos;
590
+ if (this.subGraphs[pos].id === id) {
591
+ return {
592
+ result: true,
593
+ count: 0
594
+ };
595
+ }
596
+ let count = 0;
597
+ let posCount = 1;
598
+ while (count < nodes.length) {
599
+ const childPos = this.getPosForId(nodes[count]);
600
+ if (childPos >= 0) {
601
+ const res = this.indexNodes2(id, childPos);
602
+ if (res.result) {
603
+ return {
604
+ result: true,
605
+ count: posCount + res.count
606
+ };
607
+ } else {
608
+ posCount = posCount + res.count;
609
+ }
610
+ }
611
+ count = count + 1;
612
+ }
613
+ return {
614
+ result: false,
615
+ count: posCount
616
+ };
617
+ }
618
+ getDepthFirstPos(pos) {
619
+ return this.posCrossRef[pos];
620
+ }
621
+ indexNodes() {
622
+ this.secCount = -1;
623
+ if (this.subGraphs.length > 0) {
624
+ this.indexNodes2("none", this.subGraphs.length - 1);
625
+ }
626
+ }
627
+ getSubGraphs() {
628
+ return this.subGraphs;
629
+ }
630
+ firstGraph() {
631
+ if (this.firstGraphFlag) {
632
+ this.firstGraphFlag = false;
633
+ return true;
634
+ }
635
+ return false;
636
+ }
637
+ destructStartLink(_str) {
638
+ let str = _str.trim();
639
+ let type = "arrow_open";
640
+ switch (str[0]) {
641
+ case "<":
642
+ type = "arrow_point";
643
+ str = str.slice(1);
644
+ break;
645
+ case "x":
646
+ type = "arrow_cross";
647
+ str = str.slice(1);
648
+ break;
649
+ case "o":
650
+ type = "arrow_circle";
651
+ str = str.slice(1);
652
+ break;
653
+ }
654
+ let stroke = "normal";
655
+ if (str.includes("=")) {
656
+ stroke = "thick";
657
+ }
658
+ if (str.includes(".")) {
659
+ stroke = "dotted";
660
+ }
661
+ return { type, stroke };
662
+ }
663
+ countChar(char, str) {
664
+ const length = str.length;
665
+ let count = 0;
666
+ for (let i = 0; i < length; ++i) {
667
+ if (str[i] === char) {
668
+ ++count;
669
+ }
670
+ }
671
+ return count;
672
+ }
673
+ destructEndLink(_str) {
674
+ const str = _str.trim();
675
+ let line = str.slice(0, -1);
676
+ let type = "arrow_open";
677
+ switch (str.slice(-1)) {
678
+ case "x":
679
+ type = "arrow_cross";
680
+ if (str.startsWith("x")) {
681
+ type = "double_" + type;
682
+ line = line.slice(1);
683
+ }
684
+ break;
685
+ case ">":
686
+ type = "arrow_point";
687
+ if (str.startsWith("<")) {
688
+ type = "double_" + type;
689
+ line = line.slice(1);
690
+ }
691
+ break;
692
+ case "o":
693
+ type = "arrow_circle";
694
+ if (str.startsWith("o")) {
695
+ type = "double_" + type;
696
+ line = line.slice(1);
697
+ }
698
+ break;
699
+ }
700
+ let stroke = "normal";
701
+ let length = line.length - 1;
702
+ if (line.startsWith("=")) {
703
+ stroke = "thick";
704
+ }
705
+ if (line.startsWith("~")) {
706
+ stroke = "invisible";
707
+ }
708
+ const dots = this.countChar(".", line);
709
+ if (dots) {
710
+ stroke = "dotted";
711
+ length = dots;
712
+ }
713
+ return { type, stroke, length };
714
+ }
715
+ destructLink(_str, _startStr) {
716
+ const info = this.destructEndLink(_str);
717
+ let startInfo;
718
+ if (_startStr) {
719
+ startInfo = this.destructStartLink(_startStr);
720
+ if (startInfo.stroke !== info.stroke) {
721
+ return { type: "INVALID", stroke: "INVALID" };
722
+ }
723
+ if (startInfo.type === "arrow_open") {
724
+ startInfo.type = info.type;
725
+ } else {
726
+ if (startInfo.type !== info.type) {
727
+ return { type: "INVALID", stroke: "INVALID" };
728
+ }
729
+ startInfo.type = "double_" + startInfo.type;
730
+ }
731
+ if (startInfo.type === "double_arrow") {
732
+ startInfo.type = "double_arrow_point";
733
+ }
734
+ startInfo.length = info.length;
735
+ return startInfo;
736
+ }
737
+ return info;
738
+ }
739
+ // Todo optimizer this by caching existing nodes
740
+ exists(allSgs, _id) {
741
+ for (const sg of allSgs) {
742
+ if (sg.nodes.includes(_id)) {
743
+ return true;
744
+ }
745
+ }
746
+ return false;
747
+ }
748
+ /**
749
+ * Deletes an id from all subgraphs
750
+ *
751
+ */
752
+ makeUniq(sg, allSubgraphs) {
753
+ const res = [];
754
+ sg.nodes.forEach((_id, pos) => {
755
+ if (!this.exists(allSubgraphs, _id)) {
756
+ res.push(sg.nodes[pos]);
757
+ }
758
+ });
759
+ return { nodes: res };
760
+ }
761
+ getTypeFromVertex(vertex) {
762
+ if (vertex.img) {
763
+ return "imageSquare";
764
+ }
765
+ if (vertex.icon) {
766
+ if (vertex.form === "circle") {
767
+ return "iconCircle";
768
+ }
769
+ if (vertex.form === "square") {
770
+ return "iconSquare";
771
+ }
772
+ if (vertex.form === "rounded") {
773
+ return "iconRounded";
774
+ }
775
+ return "icon";
776
+ }
777
+ switch (vertex.type) {
778
+ case "square":
779
+ case void 0:
780
+ return "squareRect";
781
+ case "round":
782
+ return "roundedRect";
783
+ case "ellipse":
784
+ return "ellipse";
785
+ default:
786
+ return vertex.type;
787
+ }
788
+ }
789
+ findNode(nodes, id) {
790
+ return nodes.find((node) => node.id === id);
791
+ }
792
+ destructEdgeType(type) {
793
+ let arrowTypeStart = "none";
794
+ let arrowTypeEnd = "arrow_point";
795
+ switch (type) {
796
+ case "arrow_point":
797
+ case "arrow_circle":
798
+ case "arrow_cross":
799
+ arrowTypeEnd = type;
800
+ break;
801
+ case "double_arrow_point":
802
+ case "double_arrow_circle":
803
+ case "double_arrow_cross":
804
+ arrowTypeStart = type.replace("double_", "");
805
+ arrowTypeEnd = arrowTypeStart;
806
+ break;
807
+ }
808
+ return { arrowTypeStart, arrowTypeEnd };
809
+ }
810
+ addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, look) {
811
+ const parentId = parentDB.get(vertex.id);
812
+ const isGroup = subGraphDB.get(vertex.id) ?? false;
813
+ const node = this.findNode(nodes, vertex.id);
814
+ if (node) {
815
+ node.cssStyles = vertex.styles;
816
+ node.cssCompiledStyles = this.getCompiledStyles(vertex.classes);
817
+ node.cssClasses = vertex.classes.join(" ");
818
+ } else {
819
+ const baseNode = {
820
+ id: vertex.id,
821
+ label: vertex.text,
822
+ labelStyle: "",
823
+ parentId,
824
+ padding: config.flowchart?.padding || 8,
825
+ cssStyles: vertex.styles,
826
+ cssCompiledStyles: this.getCompiledStyles(["default", "node", ...vertex.classes]),
827
+ cssClasses: "default " + vertex.classes.join(" "),
828
+ dir: vertex.dir,
829
+ domId: vertex.domId,
830
+ look,
831
+ link: vertex.link,
832
+ linkTarget: vertex.linkTarget,
833
+ tooltip: this.getTooltip(vertex.id),
834
+ icon: vertex.icon,
835
+ pos: vertex.pos,
836
+ img: vertex.img,
837
+ assetWidth: vertex.assetWidth,
838
+ assetHeight: vertex.assetHeight,
839
+ constraint: vertex.constraint
840
+ };
841
+ if (isGroup) {
842
+ nodes.push({
843
+ ...baseNode,
844
+ isGroup: true,
845
+ shape: "rect"
846
+ });
847
+ } else {
848
+ nodes.push({
849
+ ...baseNode,
850
+ isGroup: false,
851
+ shape: this.getTypeFromVertex(vertex)
852
+ });
853
+ }
854
+ }
855
+ }
856
+ getCompiledStyles(classDefs) {
857
+ let compiledStyles = [];
858
+ for (const customClass of classDefs) {
859
+ const cssClass = this.classes.get(customClass);
860
+ if (cssClass?.styles) {
861
+ compiledStyles = [...compiledStyles, ...cssClass.styles ?? []].map((s) => s.trim());
862
+ }
863
+ if (cssClass?.textStyles) {
864
+ compiledStyles = [...compiledStyles, ...cssClass.textStyles ?? []].map((s) => s.trim());
865
+ }
866
+ }
867
+ return compiledStyles;
868
+ }
869
+ getData() {
870
+ const config = getConfig2();
871
+ const nodes = [];
872
+ const edges = [];
873
+ const subGraphs = this.getSubGraphs();
874
+ const parentDB = /* @__PURE__ */ new Map();
875
+ const subGraphDB = /* @__PURE__ */ new Map();
876
+ for (let i = subGraphs.length - 1; i >= 0; i--) {
877
+ const subGraph = subGraphs[i];
878
+ if (subGraph.nodes.length > 0) {
879
+ subGraphDB.set(subGraph.id, true);
880
+ }
881
+ for (const id of subGraph.nodes) {
882
+ parentDB.set(id, subGraph.id);
883
+ }
884
+ }
885
+ for (let i = subGraphs.length - 1; i >= 0; i--) {
886
+ const subGraph = subGraphs[i];
887
+ nodes.push({
888
+ id: subGraph.id,
889
+ label: subGraph.title,
890
+ labelStyle: "",
891
+ parentId: parentDB.get(subGraph.id),
892
+ padding: 8,
893
+ cssCompiledStyles: this.getCompiledStyles(subGraph.classes),
894
+ cssClasses: subGraph.classes.join(" "),
895
+ shape: "rect",
896
+ dir: subGraph.dir,
897
+ isGroup: true,
898
+ look: config.look
899
+ });
900
+ }
901
+ const n = this.getVertices();
902
+ n.forEach((vertex) => {
903
+ this.addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look || "classic");
904
+ });
905
+ const e = this.getEdges();
906
+ e.forEach((rawEdge, index) => {
907
+ const { arrowTypeStart, arrowTypeEnd } = this.destructEdgeType(rawEdge.type);
908
+ const styles = [...e.defaultStyle ?? []];
909
+ if (rawEdge.style) {
910
+ styles.push(...rawEdge.style);
911
+ }
912
+ const edge = {
913
+ id: getEdgeId(rawEdge.start, rawEdge.end, { counter: index, prefix: "L" }, rawEdge.id),
914
+ isUserDefinedId: rawEdge.isUserDefinedId,
915
+ start: rawEdge.start,
916
+ end: rawEdge.end,
917
+ type: rawEdge.type ?? "normal",
918
+ label: rawEdge.text,
919
+ labelpos: "c",
920
+ thickness: rawEdge.stroke,
921
+ minlen: rawEdge.length,
922
+ classes: rawEdge?.stroke === "invisible" ? "" : "edge-thickness-normal edge-pattern-solid flowchart-link",
923
+ arrowTypeStart: rawEdge?.stroke === "invisible" || rawEdge?.type === "arrow_open" ? "none" : arrowTypeStart,
924
+ arrowTypeEnd: rawEdge?.stroke === "invisible" || rawEdge?.type === "arrow_open" ? "none" : arrowTypeEnd,
925
+ arrowheadStyle: "fill: #333",
926
+ cssCompiledStyles: this.getCompiledStyles(rawEdge.classes),
927
+ labelStyle: styles,
928
+ style: styles,
929
+ pattern: rawEdge.stroke,
930
+ look: config.look,
931
+ animate: rawEdge.animate,
932
+ animation: rawEdge.animation,
933
+ curve: rawEdge.interpolate || this.edges.defaultInterpolate || config.flowchart?.curve
934
+ };
935
+ edges.push(edge);
936
+ });
937
+ return { nodes, edges, other: {}, config };
938
+ }
939
+ defaultConfig() {
940
+ return defaultConfig2.flowchart;
941
+ }
942
+ }, __name(_a, "FlowDB"), _a);
943
+ var getClasses = /* @__PURE__ */ __name(function(text, diagramObj) {
944
+ return diagramObj.db.getClasses();
945
+ }, "getClasses");
946
+ var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {
947
+ log.info("REF0:");
948
+ log.info("Drawing state diagram (v2)", id);
949
+ const { securityLevel, flowchart: conf, layout } = getConfig2();
950
+ let sandboxElement;
951
+ if (securityLevel === "sandbox") {
952
+ sandboxElement = select("#i" + id);
953
+ }
954
+ const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
955
+ log.debug("Before getData: ");
956
+ const data4Layout = diag.db.getData();
957
+ log.debug("Data: ", data4Layout);
958
+ const svg = getDiagramElement(id, securityLevel);
959
+ const direction = diag.db.getDirection();
960
+ data4Layout.type = diag.type;
961
+ data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
962
+ if (data4Layout.layoutAlgorithm === "dagre" && layout === "elk") {
963
+ log.warn(
964
+ "flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."
965
+ );
966
+ }
967
+ data4Layout.direction = direction;
968
+ data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
969
+ data4Layout.rankSpacing = conf?.rankSpacing || 50;
970
+ data4Layout.markers = ["point", "circle", "cross"];
971
+ data4Layout.diagramId = id;
972
+ log.debug("REF1:", data4Layout);
973
+ await render(data4Layout, svg);
974
+ const padding = data4Layout.config.flowchart?.diagramPadding ?? 8;
975
+ utils_default.insertTitle(
976
+ svg,
977
+ "flowchartTitleText",
978
+ conf?.titleTopMargin || 0,
979
+ diag.db.getDiagramTitle()
980
+ );
981
+ setupViewPortForSVG(svg, padding, "flowchart", conf?.useMaxWidth || false);
982
+ for (const vertex of data4Layout.nodes) {
983
+ const node = select(`#${id} [id="${vertex.id}"]`);
984
+ if (!node || !vertex.link) {
985
+ continue;
986
+ }
987
+ const link = doc.createElementNS("http://www.w3.org/2000/svg", "a");
988
+ link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.cssClasses);
989
+ link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener");
990
+ if (securityLevel === "sandbox") {
991
+ link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top");
992
+ } else if (vertex.linkTarget) {
993
+ link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget);
994
+ }
995
+ const linkNode = node.insert(function() {
996
+ return link;
997
+ }, ":first-child");
998
+ const shape = node.select(".label-container");
999
+ if (shape) {
1000
+ linkNode.append(function() {
1001
+ return shape.node();
1002
+ });
1003
+ }
1004
+ const label = node.select(".label");
1005
+ if (label) {
1006
+ linkNode.append(function() {
1007
+ return label.node();
1008
+ });
1009
+ }
1010
+ }
1011
+ }, "draw");
1012
+ var flowRenderer_v3_unified_default = {
1013
+ getClasses,
1014
+ draw
1015
+ };
1016
+ var parser = (function() {
1017
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
1018
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
1019
+ return o2;
1020
+ }, "o"), $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 75, 77, 78], $VD = [1, 78], $VE = [1, 91], $VF = [1, 96], $VG = [1, 95], $VH = [1, 92], $VI = [1, 88], $VJ = [1, 94], $VK = [1, 90], $VL = [1, 97], $VM = [1, 93], $VN = [1, 98], $VO = [1, 89], $VP = [8, 9, 10, 11, 40, 75, 77, 78], $VQ = [8, 9, 10, 11, 40, 46, 75, 77, 78], $VR = [8, 9, 10, 11, 29, 40, 44, 46, 48, 50, 52, 54, 56, 58, 60, 63, 65, 67, 68, 70, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VS = [8, 9, 11, 44, 60, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VT = [44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VU = [1, 121], $VV = [1, 122], $VW = [1, 124], $VX = [1, 123], $VY = [44, 60, 62, 74, 89, 102, 105, 106, 109, 111, 114, 115, 116], $VZ = [1, 133], $V_ = [1, 147], $V$ = [1, 148], $V01 = [1, 149], $V11 = [1, 150], $V21 = [1, 135], $V31 = [1, 137], $V41 = [1, 141], $V51 = [1, 142], $V61 = [1, 143], $V71 = [1, 144], $V81 = [1, 145], $V91 = [1, 146], $Va1 = [1, 151], $Vb1 = [1, 152], $Vc1 = [1, 131], $Vd1 = [1, 132], $Ve1 = [1, 139], $Vf1 = [1, 134], $Vg1 = [1, 138], $Vh1 = [1, 136], $Vi1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], $Vj1 = [1, 154], $Vk1 = [1, 156], $Vl1 = [8, 9, 11], $Vm1 = [8, 9, 10, 11, 14, 44, 60, 89, 105, 106, 109, 111, 114, 115, 116], $Vn1 = [1, 176], $Vo1 = [1, 172], $Vp1 = [1, 173], $Vq1 = [1, 177], $Vr1 = [1, 174], $Vs1 = [1, 175], $Vt1 = [77, 116, 119], $Vu1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 44, 60, 75, 84, 85, 86, 87, 88, 89, 90, 105, 109, 111, 114, 115, 116], $Vv1 = [10, 106], $Vw1 = [31, 49, 51, 53, 55, 57, 62, 64, 66, 67, 69, 71, 116, 117, 118], $Vx1 = [1, 247], $Vy1 = [1, 245], $Vz1 = [1, 249], $VA1 = [1, 243], $VB1 = [1, 244], $VC1 = [1, 246], $VD1 = [1, 248], $VE1 = [1, 250], $VF1 = [1, 268], $VG1 = [8, 9, 11, 106], $VH1 = [8, 9, 10, 11, 60, 84, 105, 106, 109, 110, 111, 112];
1021
+ var parser2 = {
1022
+ trace: /* @__PURE__ */ __name(function trace() {
1023
+ }, "trace"),
1024
+ yy: {},
1025
+ symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeparator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "vertexStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "shapeData": 39, "SHAPE_DATA": 40, "link": 41, "node": 42, "styledVertex": 43, "AMP": 44, "vertex": 45, "STYLE_SEPARATOR": 46, "idString": 47, "DOUBLECIRCLESTART": 48, "DOUBLECIRCLEEND": 49, "PS": 50, "PE": 51, "(-": 52, "-)": 53, "STADIUMSTART": 54, "STADIUMEND": 55, "SUBROUTINESTART": 56, "SUBROUTINEEND": 57, "VERTEX_WITH_PROPS_START": 58, "NODE_STRING[field]": 59, "COLON": 60, "NODE_STRING[value]": 61, "PIPE": 62, "CYLINDERSTART": 63, "CYLINDEREND": 64, "DIAMOND_START": 65, "DIAMOND_STOP": 66, "TAGEND": 67, "TRAPSTART": 68, "TRAPEND": 69, "INVTRAPSTART": 70, "INVTRAPEND": 71, "linkStatement": 72, "arrowText": 73, "TESTSTR": 74, "START_LINK": 75, "edgeText": 76, "LINK": 77, "LINK_ID": 78, "edgeTextToken": 79, "STR": 80, "MD_STR": 81, "textToken": 82, "keywords": 83, "STYLE": 84, "LINKSTYLE": 85, "CLASSDEF": 86, "CLASS": 87, "CLICK": 88, "DOWN": 89, "UP": 90, "textNoTagsToken": 91, "stylesOpt": 92, "idString[vertex]": 93, "idString[class]": 94, "CALLBACKNAME": 95, "CALLBACKARGS": 96, "HREF": 97, "LINK_TARGET": 98, "STR[link]": 99, "STR[tooltip]": 100, "alphaNum": 101, "DEFAULT": 102, "numList": 103, "INTERPOLATE": 104, "NUM": 105, "COMMA": 106, "style": 107, "styleComponent": 108, "NODE_STRING": 109, "UNIT": 110, "BRKT": 111, "PCT": 112, "idStringToken": 113, "MINUS": 114, "MULT": 115, "UNICODE_TEXT": 116, "TEXT": 117, "TAGSTART": 118, "EDGE_TEXT": 119, "alphaNumToken": 120, "direction_tb": 121, "direction_bt": 122, "direction_rl": 123, "direction_lr": 124, "$accept": 0, "$end": 1 },
1026
+ terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 40: "SHAPE_DATA", 44: "AMP", 46: "STYLE_SEPARATOR", 48: "DOUBLECIRCLESTART", 49: "DOUBLECIRCLEEND", 50: "PS", 51: "PE", 52: "(-", 53: "-)", 54: "STADIUMSTART", 55: "STADIUMEND", 56: "SUBROUTINESTART", 57: "SUBROUTINEEND", 58: "VERTEX_WITH_PROPS_START", 59: "NODE_STRING[field]", 60: "COLON", 61: "NODE_STRING[value]", 62: "PIPE", 63: "CYLINDERSTART", 64: "CYLINDEREND", 65: "DIAMOND_START", 66: "DIAMOND_STOP", 67: "TAGEND", 68: "TRAPSTART", 69: "TRAPEND", 70: "INVTRAPSTART", 71: "INVTRAPEND", 74: "TESTSTR", 75: "START_LINK", 77: "LINK", 78: "LINK_ID", 80: "STR", 81: "MD_STR", 84: "STYLE", 85: "LINKSTYLE", 86: "CLASSDEF", 87: "CLASS", 88: "CLICK", 89: "DOWN", 90: "UP", 93: "idString[vertex]", 94: "idString[class]", 95: "CALLBACKNAME", 96: "CALLBACKARGS", 97: "HREF", 98: "LINK_TARGET", 99: "STR[link]", 100: "STR[tooltip]", 102: "DEFAULT", 104: "INTERPOLATE", 105: "NUM", 106: "COMMA", 109: "NODE_STRING", 110: "UNIT", 111: "BRKT", 112: "PCT", 114: "MINUS", 115: "MULT", 116: "UNICODE_TEXT", 117: "TEXT", 118: "TAGSTART", 119: "EDGE_TEXT", 121: "direction_tb", 122: "direction_bt", 123: "direction_rl", 124: "direction_lr" },
1027
+ productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [39, 2], [39, 1], [20, 4], [20, 3], [20, 4], [20, 2], [20, 2], [20, 1], [42, 1], [42, 6], [42, 5], [43, 1], [43, 3], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 8], [45, 4], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 4], [45, 4], [45, 1], [41, 2], [41, 3], [41, 3], [41, 1], [41, 3], [41, 4], [76, 1], [76, 2], [76, 1], [76, 1], [72, 1], [72, 2], [73, 3], [30, 1], [30, 2], [30, 1], [30, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [103, 1], [103, 3], [92, 1], [92, 3], [107, 1], [107, 2], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [82, 1], [82, 1], [82, 1], [82, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [79, 1], [79, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [47, 1], [47, 2], [101, 1], [101, 2], [33, 1], [33, 1], [33, 1], [33, 1]],
1028
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
1029
+ var $0 = $$.length - 1;
1030
+ switch (yystate) {
1031
+ case 2:
1032
+ this.$ = [];
1033
+ break;
1034
+ case 3:
1035
+ if (!Array.isArray($$[$0]) || $$[$0].length > 0) {
1036
+ $$[$0 - 1].push($$[$0]);
1037
+ }
1038
+ this.$ = $$[$0 - 1];
1039
+ break;
1040
+ case 4:
1041
+ case 183:
1042
+ this.$ = $$[$0];
1043
+ break;
1044
+ case 11:
1045
+ yy.setDirection("TB");
1046
+ this.$ = "TB";
1047
+ break;
1048
+ case 12:
1049
+ yy.setDirection($$[$0 - 1]);
1050
+ this.$ = $$[$0 - 1];
1051
+ break;
1052
+ case 27:
1053
+ this.$ = $$[$0 - 1].nodes;
1054
+ break;
1055
+ case 28:
1056
+ case 29:
1057
+ case 30:
1058
+ case 31:
1059
+ case 32:
1060
+ this.$ = [];
1061
+ break;
1062
+ case 33:
1063
+ this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
1064
+ break;
1065
+ case 34:
1066
+ this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
1067
+ break;
1068
+ case 35:
1069
+ this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0);
1070
+ break;
1071
+ case 37:
1072
+ this.$ = $$[$0].trim();
1073
+ yy.setAccTitle(this.$);
1074
+ break;
1075
+ case 38:
1076
+ case 39:
1077
+ this.$ = $$[$0].trim();
1078
+ yy.setAccDescription(this.$);
1079
+ break;
1080
+ case 43:
1081
+ this.$ = $$[$0 - 1] + $$[$0];
1082
+ break;
1083
+ case 44:
1084
+ this.$ = $$[$0];
1085
+ break;
1086
+ case 45:
1087
+ yy.addVertex($$[$0 - 1][$$[$0 - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0]);
1088
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
1089
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
1090
+ break;
1091
+ case 46:
1092
+ yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]);
1093
+ this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) };
1094
+ break;
1095
+ case 47:
1096
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
1097
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
1098
+ break;
1099
+ case 48:
1100
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] };
1101
+ break;
1102
+ case 49:
1103
+ yy.addVertex($$[$0 - 1][$$[$0 - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0]);
1104
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1], shapeData: $$[$0] };
1105
+ break;
1106
+ case 50:
1107
+ this.$ = { stmt: $$[$0], nodes: $$[$0] };
1108
+ break;
1109
+ case 51:
1110
+ this.$ = [$$[$0]];
1111
+ break;
1112
+ case 52:
1113
+ yy.addVertex($$[$0 - 5][$$[$0 - 5].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, $$[$0 - 4]);
1114
+ this.$ = $$[$0 - 5].concat($$[$0]);
1115
+ break;
1116
+ case 53:
1117
+ this.$ = $$[$0 - 4].concat($$[$0]);
1118
+ break;
1119
+ case 54:
1120
+ this.$ = $$[$0];
1121
+ break;
1122
+ case 55:
1123
+ this.$ = $$[$0 - 2];
1124
+ yy.setClass($$[$0 - 2], $$[$0]);
1125
+ break;
1126
+ case 56:
1127
+ this.$ = $$[$0 - 3];
1128
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "square");
1129
+ break;
1130
+ case 57:
1131
+ this.$ = $$[$0 - 3];
1132
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle");
1133
+ break;
1134
+ case 58:
1135
+ this.$ = $$[$0 - 5];
1136
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle");
1137
+ break;
1138
+ case 59:
1139
+ this.$ = $$[$0 - 3];
1140
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse");
1141
+ break;
1142
+ case 60:
1143
+ this.$ = $$[$0 - 3];
1144
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium");
1145
+ break;
1146
+ case 61:
1147
+ this.$ = $$[$0 - 3];
1148
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine");
1149
+ break;
1150
+ case 62:
1151
+ this.$ = $$[$0 - 7];
1152
+ yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]]));
1153
+ break;
1154
+ case 63:
1155
+ this.$ = $$[$0 - 3];
1156
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder");
1157
+ break;
1158
+ case 64:
1159
+ this.$ = $$[$0 - 3];
1160
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "round");
1161
+ break;
1162
+ case 65:
1163
+ this.$ = $$[$0 - 3];
1164
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond");
1165
+ break;
1166
+ case 66:
1167
+ this.$ = $$[$0 - 5];
1168
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon");
1169
+ break;
1170
+ case 67:
1171
+ this.$ = $$[$0 - 3];
1172
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd");
1173
+ break;
1174
+ case 68:
1175
+ this.$ = $$[$0 - 3];
1176
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid");
1177
+ break;
1178
+ case 69:
1179
+ this.$ = $$[$0 - 3];
1180
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid");
1181
+ break;
1182
+ case 70:
1183
+ this.$ = $$[$0 - 3];
1184
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right");
1185
+ break;
1186
+ case 71:
1187
+ this.$ = $$[$0 - 3];
1188
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left");
1189
+ break;
1190
+ case 72:
1191
+ this.$ = $$[$0];
1192
+ yy.addVertex($$[$0]);
1193
+ break;
1194
+ case 73:
1195
+ $$[$0 - 1].text = $$[$0];
1196
+ this.$ = $$[$0 - 1];
1197
+ break;
1198
+ case 74:
1199
+ case 75:
1200
+ $$[$0 - 2].text = $$[$0 - 1];
1201
+ this.$ = $$[$0 - 2];
1202
+ break;
1203
+ case 76:
1204
+ this.$ = $$[$0];
1205
+ break;
1206
+ case 77:
1207
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
1208
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] };
1209
+ break;
1210
+ case 78:
1211
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
1212
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1], "id": $$[$0 - 3] };
1213
+ break;
1214
+ case 79:
1215
+ this.$ = { text: $$[$0], type: "text" };
1216
+ break;
1217
+ case 80:
1218
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1219
+ break;
1220
+ case 81:
1221
+ this.$ = { text: $$[$0], type: "string" };
1222
+ break;
1223
+ case 82:
1224
+ this.$ = { text: $$[$0], type: "markdown" };
1225
+ break;
1226
+ case 83:
1227
+ var inf = yy.destructLink($$[$0]);
1228
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length };
1229
+ break;
1230
+ case 84:
1231
+ var inf = yy.destructLink($$[$0]);
1232
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "id": $$[$0 - 1] };
1233
+ break;
1234
+ case 85:
1235
+ this.$ = $$[$0 - 1];
1236
+ break;
1237
+ case 86:
1238
+ this.$ = { text: $$[$0], type: "text" };
1239
+ break;
1240
+ case 87:
1241
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1242
+ break;
1243
+ case 88:
1244
+ this.$ = { text: $$[$0], type: "string" };
1245
+ break;
1246
+ case 89:
1247
+ case 104:
1248
+ this.$ = { text: $$[$0], type: "markdown" };
1249
+ break;
1250
+ case 101:
1251
+ this.$ = { text: $$[$0], type: "text" };
1252
+ break;
1253
+ case 102:
1254
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
1255
+ break;
1256
+ case 103:
1257
+ this.$ = { text: $$[$0], type: "text" };
1258
+ break;
1259
+ case 105:
1260
+ this.$ = $$[$0 - 4];
1261
+ yy.addClass($$[$0 - 2], $$[$0]);
1262
+ break;
1263
+ case 106:
1264
+ this.$ = $$[$0 - 4];
1265
+ yy.setClass($$[$0 - 2], $$[$0]);
1266
+ break;
1267
+ case 107:
1268
+ case 115:
1269
+ this.$ = $$[$0 - 1];
1270
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
1271
+ break;
1272
+ case 108:
1273
+ case 116:
1274
+ this.$ = $$[$0 - 3];
1275
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2]);
1276
+ yy.setTooltip($$[$0 - 3], $$[$0]);
1277
+ break;
1278
+ case 109:
1279
+ this.$ = $$[$0 - 2];
1280
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
1281
+ break;
1282
+ case 110:
1283
+ this.$ = $$[$0 - 4];
1284
+ yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]);
1285
+ yy.setTooltip($$[$0 - 4], $$[$0]);
1286
+ break;
1287
+ case 111:
1288
+ this.$ = $$[$0 - 2];
1289
+ yy.setLink($$[$0 - 2], $$[$0]);
1290
+ break;
1291
+ case 112:
1292
+ this.$ = $$[$0 - 4];
1293
+ yy.setLink($$[$0 - 4], $$[$0 - 2]);
1294
+ yy.setTooltip($$[$0 - 4], $$[$0]);
1295
+ break;
1296
+ case 113:
1297
+ this.$ = $$[$0 - 4];
1298
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
1299
+ break;
1300
+ case 114:
1301
+ this.$ = $$[$0 - 6];
1302
+ yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]);
1303
+ yy.setTooltip($$[$0 - 6], $$[$0 - 2]);
1304
+ break;
1305
+ case 117:
1306
+ this.$ = $$[$0 - 1];
1307
+ yy.setLink($$[$0 - 1], $$[$0]);
1308
+ break;
1309
+ case 118:
1310
+ this.$ = $$[$0 - 3];
1311
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
1312
+ yy.setTooltip($$[$0 - 3], $$[$0]);
1313
+ break;
1314
+ case 119:
1315
+ this.$ = $$[$0 - 3];
1316
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
1317
+ break;
1318
+ case 120:
1319
+ this.$ = $$[$0 - 5];
1320
+ yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]);
1321
+ yy.setTooltip($$[$0 - 5], $$[$0 - 2]);
1322
+ break;
1323
+ case 121:
1324
+ this.$ = $$[$0 - 4];
1325
+ yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]);
1326
+ break;
1327
+ case 122:
1328
+ this.$ = $$[$0 - 4];
1329
+ yy.updateLink([$$[$0 - 2]], $$[$0]);
1330
+ break;
1331
+ case 123:
1332
+ this.$ = $$[$0 - 4];
1333
+ yy.updateLink($$[$0 - 2], $$[$0]);
1334
+ break;
1335
+ case 124:
1336
+ this.$ = $$[$0 - 8];
1337
+ yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
1338
+ yy.updateLink([$$[$0 - 6]], $$[$0]);
1339
+ break;
1340
+ case 125:
1341
+ this.$ = $$[$0 - 8];
1342
+ yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
1343
+ yy.updateLink($$[$0 - 6], $$[$0]);
1344
+ break;
1345
+ case 126:
1346
+ this.$ = $$[$0 - 6];
1347
+ yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
1348
+ break;
1349
+ case 127:
1350
+ this.$ = $$[$0 - 6];
1351
+ yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
1352
+ break;
1353
+ case 128:
1354
+ case 130:
1355
+ this.$ = [$$[$0]];
1356
+ break;
1357
+ case 129:
1358
+ case 131:
1359
+ $$[$0 - 2].push($$[$0]);
1360
+ this.$ = $$[$0 - 2];
1361
+ break;
1362
+ case 133:
1363
+ this.$ = $$[$0 - 1] + $$[$0];
1364
+ break;
1365
+ case 181:
1366
+ this.$ = $$[$0];
1367
+ break;
1368
+ case 182:
1369
+ this.$ = $$[$0 - 1] + "" + $$[$0];
1370
+ break;
1371
+ case 184:
1372
+ this.$ = $$[$0 - 1] + "" + $$[$0];
1373
+ break;
1374
+ case 185:
1375
+ this.$ = { stmt: "dir", value: "TB" };
1376
+ break;
1377
+ case 186:
1378
+ this.$ = { stmt: "dir", value: "BT" };
1379
+ break;
1380
+ case 187:
1381
+ this.$ = { stmt: "dir", value: "RL" };
1382
+ break;
1383
+ case 188:
1384
+ this.$ = { stmt: "dir", value: "LR" };
1385
+ break;
1386
+ }
1387
+ }, "anonymous"),
1388
+ table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 38, 44: $Vd, 45: 39, 47: 40, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 41: 59, 72: 63, 75: [1, 64], 77: [1, 66], 78: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 71 }, { 8: $Vz, 9: $VA, 10: [1, 72], 11: $VB, 21: 73 }, o($Vy, [2, 36]), { 35: [1, 74] }, { 37: [1, 75] }, o($Vy, [2, 39]), o($VC, [2, 50], { 18: 76, 39: 77, 10: $Vx, 40: $VD }), { 10: [1, 79] }, { 10: [1, 80] }, { 10: [1, 81] }, { 10: [1, 82] }, { 14: $VE, 44: $VF, 60: $VG, 80: [1, 86], 89: $VH, 95: [1, 83], 97: [1, 84], 101: 85, 105: $VI, 106: $VJ, 109: $VK, 111: $VL, 114: $VM, 115: $VN, 116: $VO, 120: 87 }, o($Vy, [2, 185]), o($Vy, [2, 186]), o($Vy, [2, 187]), o($Vy, [2, 188]), o($VP, [2, 51]), o($VP, [2, 54], { 46: [1, 99] }), o($VQ, [2, 72], { 113: 112, 29: [1, 100], 44: $Vd, 48: [1, 101], 50: [1, 102], 52: [1, 103], 54: [1, 104], 56: [1, 105], 58: [1, 106], 60: $Ve, 63: [1, 107], 65: [1, 108], 67: [1, 109], 68: [1, 110], 70: [1, 111], 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), o($VR, [2, 181]), o($VR, [2, 142]), o($VR, [2, 143]), o($VR, [2, 144]), o($VR, [2, 145]), o($VR, [2, 146]), o($VR, [2, 147]), o($VR, [2, 148]), o($VR, [2, 149]), o($VR, [2, 150]), o($VR, [2, 151]), o($VR, [2, 152]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 113] }, o($VS, [2, 26], { 18: 114, 10: $Vx }), o($Vy, [2, 27]), { 42: 115, 43: 38, 44: $Vd, 45: 39, 47: 40, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VT, [2, 76], { 73: 116, 62: [1, 118], 74: [1, 117] }), { 76: 119, 79: 120, 80: $VU, 81: $VV, 116: $VW, 119: $VX }, { 75: [1, 125], 77: [1, 126] }, o($VY, [2, 83]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VZ, 12: $V_, 14: $V$, 27: $V01, 28: 127, 32: $V11, 44: $V21, 60: $V31, 75: $V41, 80: [1, 129], 81: [1, 130], 83: 140, 84: $V51, 85: $V61, 86: $V71, 87: $V81, 88: $V91, 89: $Va1, 90: $Vb1, 91: 128, 105: $Vc1, 109: $Vd1, 111: $Ve1, 114: $Vf1, 115: $Vg1, 116: $Vh1 }, o($Vi1, $V4, { 5: 153 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 48], { 44: $Vj1 }), o($VC, [2, 49], { 18: 155, 10: $Vx, 40: $Vk1 }), o($VP, [2, 44]), { 44: $Vd, 47: 157, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs }, { 102: [1, 158], 103: 159, 105: [1, 160] }, { 44: $Vd, 47: 161, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs }, { 44: $Vd, 47: 162, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vl1, [2, 107], { 10: [1, 163], 96: [1, 164] }), { 80: [1, 165] }, o($Vl1, [2, 115], { 120: 167, 10: [1, 166], 14: $VE, 44: $VF, 60: $VG, 89: $VH, 105: $VI, 106: $VJ, 109: $VK, 111: $VL, 114: $VM, 115: $VN, 116: $VO }), o($Vl1, [2, 117], { 10: [1, 168] }), o($Vm1, [2, 183]), o($Vm1, [2, 170]), o($Vm1, [2, 171]), o($Vm1, [2, 172]), o($Vm1, [2, 173]), o($Vm1, [2, 174]), o($Vm1, [2, 175]), o($Vm1, [2, 176]), o($Vm1, [2, 177]), o($Vm1, [2, 178]), o($Vm1, [2, 179]), o($Vm1, [2, 180]), { 44: $Vd, 47: 169, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs }, { 30: 170, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 178, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 180, 50: [1, 179], 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 181, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 182, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 183, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 109: [1, 184] }, { 30: 185, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 186, 65: [1, 187], 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 188, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 189, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 190, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, o($VR, [2, 182]), o($V3, [2, 20]), o($VS, [2, 25]), o($VC, [2, 46], { 39: 191, 18: 192, 10: $Vx, 40: $VD }), o($VT, [2, 73], { 10: [1, 193] }), { 10: [1, 194] }, { 30: 195, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 77: [1, 196], 79: 197, 116: $VW, 119: $VX }, o($Vt1, [2, 79]), o($Vt1, [2, 81]), o($Vt1, [2, 82]), o($Vt1, [2, 168]), o($Vt1, [2, 169]), { 76: 198, 79: 120, 80: $VU, 81: $VV, 116: $VW, 119: $VX }, o($VY, [2, 84]), { 8: $Vz, 9: $VA, 10: $VZ, 11: $VB, 12: $V_, 14: $V$, 21: 200, 27: $V01, 29: [1, 199], 32: $V11, 44: $V21, 60: $V31, 75: $V41, 83: 140, 84: $V51, 85: $V61, 86: $V71, 87: $V81, 88: $V91, 89: $Va1, 90: $Vb1, 91: 201, 105: $Vc1, 109: $Vd1, 111: $Ve1, 114: $Vf1, 115: $Vg1, 116: $Vh1 }, o($Vu1, [2, 101]), o($Vu1, [2, 103]), o($Vu1, [2, 104]), o($Vu1, [2, 157]), o($Vu1, [2, 158]), o($Vu1, [2, 159]), o($Vu1, [2, 160]), o($Vu1, [2, 161]), o($Vu1, [2, 162]), o($Vu1, [2, 163]), o($Vu1, [2, 164]), o($Vu1, [2, 165]), o($Vu1, [2, 166]), o($Vu1, [2, 167]), o($Vu1, [2, 90]), o($Vu1, [2, 91]), o($Vu1, [2, 92]), o($Vu1, [2, 93]), o($Vu1, [2, 94]), o($Vu1, [2, 95]), o($Vu1, [2, 96]), o($Vu1, [2, 97]), o($Vu1, [2, 98]), o($Vu1, [2, 99]), o($Vu1, [2, 100]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 202], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 38, 44: $Vd, 45: 39, 47: 40, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw }, { 10: $Vx, 18: 203 }, { 44: [1, 204] }, o($VP, [2, 43]), { 10: [1, 205], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 112, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: [1, 206] }, { 10: [1, 207], 106: [1, 208] }, o($Vv1, [2, 128]), { 10: [1, 209], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 112, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: [1, 210], 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 112, 114: $Vq, 115: $Vr, 116: $Vs }, { 80: [1, 211] }, o($Vl1, [2, 109], { 10: [1, 212] }), o($Vl1, [2, 111], { 10: [1, 213] }), { 80: [1, 214] }, o($Vm1, [2, 184]), { 80: [1, 215], 98: [1, 216] }, o($VP, [2, 55], { 113: 112, 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), { 31: [1, 217], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, o($Vw1, [2, 86]), o($Vw1, [2, 88]), o($Vw1, [2, 89]), o($Vw1, [2, 153]), o($Vw1, [2, 154]), o($Vw1, [2, 155]), o($Vw1, [2, 156]), { 49: [1, 219], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 220, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 51: [1, 221], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 53: [1, 222], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 55: [1, 223], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 57: [1, 224], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 60: [1, 225] }, { 64: [1, 226], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 66: [1, 227], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 30: 228, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 31: [1, 229], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 67: $Vn1, 69: [1, 230], 71: [1, 231], 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 67: $Vn1, 69: [1, 233], 71: [1, 232], 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, o($VC, [2, 45], { 18: 155, 10: $Vx, 40: $Vk1 }), o($VC, [2, 47], { 44: $Vj1 }), o($VT, [2, 75]), o($VT, [2, 74]), { 62: [1, 234], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, o($VT, [2, 77]), o($Vt1, [2, 80]), { 77: [1, 235], 79: 197, 116: $VW, 119: $VX }, { 30: 236, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, o($Vi1, $V4, { 5: 237 }), o($Vu1, [2, 102]), o($Vy, [2, 35]), { 43: 238, 44: $Vd, 45: 39, 47: 40, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs }, { 10: $Vx, 18: 239 }, { 10: $Vx1, 60: $Vy1, 84: $Vz1, 92: 240, 105: $VA1, 107: 241, 108: 242, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }, { 10: $Vx1, 60: $Vy1, 84: $Vz1, 92: 251, 104: [1, 252], 105: $VA1, 107: 241, 108: 242, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }, { 10: $Vx1, 60: $Vy1, 84: $Vz1, 92: 253, 104: [1, 254], 105: $VA1, 107: 241, 108: 242, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }, { 105: [1, 255] }, { 10: $Vx1, 60: $Vy1, 84: $Vz1, 92: 256, 105: $VA1, 107: 241, 108: 242, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }, { 44: $Vd, 47: 257, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vl1, [2, 108]), { 80: [1, 258] }, { 80: [1, 259], 98: [1, 260] }, o($Vl1, [2, 116]), o($Vl1, [2, 118], { 10: [1, 261] }), o($Vl1, [2, 119]), o($VQ, [2, 56]), o($Vw1, [2, 87]), o($VQ, [2, 57]), { 51: [1, 262], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, o($VQ, [2, 64]), o($VQ, [2, 59]), o($VQ, [2, 60]), o($VQ, [2, 61]), { 109: [1, 263] }, o($VQ, [2, 63]), o($VQ, [2, 65]), { 66: [1, 264], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, o($VQ, [2, 67]), o($VQ, [2, 68]), o($VQ, [2, 70]), o($VQ, [2, 69]), o($VQ, [2, 71]), o([10, 44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], [2, 85]), o($VT, [2, 78]), { 31: [1, 265], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 266], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 38, 44: $Vd, 45: 39, 47: 40, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw }, o($VP, [2, 53]), { 43: 267, 44: $Vd, 45: 39, 47: 40, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs }, o($Vl1, [2, 121], { 106: $VF1 }), o($VG1, [2, 130], { 108: 269, 10: $Vx1, 60: $Vy1, 84: $Vz1, 105: $VA1, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }), o($VH1, [2, 132]), o($VH1, [2, 134]), o($VH1, [2, 135]), o($VH1, [2, 136]), o($VH1, [2, 137]), o($VH1, [2, 138]), o($VH1, [2, 139]), o($VH1, [2, 140]), o($VH1, [2, 141]), o($Vl1, [2, 122], { 106: $VF1 }), { 10: [1, 270] }, o($Vl1, [2, 123], { 106: $VF1 }), { 10: [1, 271] }, o($Vv1, [2, 129]), o($Vl1, [2, 105], { 106: $VF1 }), o($Vl1, [2, 106], { 113: 112, 44: $Vd, 60: $Ve, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 114: $Vq, 115: $Vr, 116: $Vs }), o($Vl1, [2, 110]), o($Vl1, [2, 112], { 10: [1, 272] }), o($Vl1, [2, 113]), { 98: [1, 273] }, { 51: [1, 274] }, { 62: [1, 275] }, { 66: [1, 276] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 277 }, o($Vy, [2, 34]), o($VP, [2, 52]), { 10: $Vx1, 60: $Vy1, 84: $Vz1, 105: $VA1, 107: 278, 108: 242, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }, o($VH1, [2, 133]), { 14: $VE, 44: $VF, 60: $VG, 89: $VH, 101: 279, 105: $VI, 106: $VJ, 109: $VK, 111: $VL, 114: $VM, 115: $VN, 116: $VO, 120: 87 }, { 14: $VE, 44: $VF, 60: $VG, 89: $VH, 101: 280, 105: $VI, 106: $VJ, 109: $VK, 111: $VL, 114: $VM, 115: $VN, 116: $VO, 120: 87 }, { 98: [1, 281] }, o($Vl1, [2, 120]), o($VQ, [2, 58]), { 30: 282, 67: $Vn1, 80: $Vo1, 81: $Vp1, 82: 171, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, o($VQ, [2, 66]), o($Vi1, $V4, { 5: 283 }), o($VG1, [2, 131], { 108: 269, 10: $Vx1, 60: $Vy1, 84: $Vz1, 105: $VA1, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }), o($Vl1, [2, 126], { 120: 167, 10: [1, 284], 14: $VE, 44: $VF, 60: $VG, 89: $VH, 105: $VI, 106: $VJ, 109: $VK, 111: $VL, 114: $VM, 115: $VN, 116: $VO }), o($Vl1, [2, 127], { 120: 167, 10: [1, 285], 14: $VE, 44: $VF, 60: $VG, 89: $VH, 105: $VI, 106: $VJ, 109: $VK, 111: $VL, 114: $VM, 115: $VN, 116: $VO }), o($Vl1, [2, 114]), { 31: [1, 286], 67: $Vn1, 82: 218, 116: $Vq1, 117: $Vr1, 118: $Vs1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 287], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 42: 28, 43: 38, 44: $Vd, 45: 39, 47: 40, 60: $Ve, 84: $Vf, 85: $Vg, 86: $Vh, 87: $Vi, 88: $Vj, 89: $Vk, 102: $Vl, 105: $Vm, 106: $Vn, 109: $Vo, 111: $Vp, 113: 41, 114: $Vq, 115: $Vr, 116: $Vs, 121: $Vt, 122: $Vu, 123: $Vv, 124: $Vw }, { 10: $Vx1, 60: $Vy1, 84: $Vz1, 92: 288, 105: $VA1, 107: 241, 108: 242, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }, { 10: $Vx1, 60: $Vy1, 84: $Vz1, 92: 289, 105: $VA1, 107: 241, 108: 242, 109: $VB1, 110: $VC1, 111: $VD1, 112: $VE1 }, o($VQ, [2, 62]), o($Vy, [2, 33]), o($Vl1, [2, 124], { 106: $VF1 }), o($Vl1, [2, 125], { 106: $VF1 })],
1389
+ defaultActions: {},
1390
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1391
+ if (hash.recoverable) {
1392
+ this.trace(str);
1393
+ } else {
1394
+ var error = new Error(str);
1395
+ error.hash = hash;
1396
+ throw error;
1397
+ }
1398
+ }, "parseError"),
1399
+ parse: /* @__PURE__ */ __name(function parse(input) {
1400
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
1401
+ var args = lstack.slice.call(arguments, 1);
1402
+ var lexer2 = Object.create(this.lexer);
1403
+ var sharedState = { yy: {} };
1404
+ for (var k in this.yy) {
1405
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
1406
+ sharedState.yy[k] = this.yy[k];
1407
+ }
1408
+ }
1409
+ lexer2.setInput(input, sharedState.yy);
1410
+ sharedState.yy.lexer = lexer2;
1411
+ sharedState.yy.parser = this;
1412
+ if (typeof lexer2.yylloc == "undefined") {
1413
+ lexer2.yylloc = {};
1414
+ }
1415
+ var yyloc = lexer2.yylloc;
1416
+ lstack.push(yyloc);
1417
+ var ranges = lexer2.options && lexer2.options.ranges;
1418
+ if (typeof sharedState.yy.parseError === "function") {
1419
+ this.parseError = sharedState.yy.parseError;
1420
+ } else {
1421
+ this.parseError = Object.getPrototypeOf(this).parseError;
1422
+ }
1423
+ function popStack(n) {
1424
+ stack.length = stack.length - 2 * n;
1425
+ vstack.length = vstack.length - n;
1426
+ lstack.length = lstack.length - n;
1427
+ }
1428
+ __name(popStack, "popStack");
1429
+ function lex() {
1430
+ var token;
1431
+ token = tstack.pop() || lexer2.lex() || EOF;
1432
+ if (typeof token !== "number") {
1433
+ if (token instanceof Array) {
1434
+ tstack = token;
1435
+ token = tstack.pop();
1436
+ }
1437
+ token = self.symbols_[token] || token;
1438
+ }
1439
+ return token;
1440
+ }
1441
+ __name(lex, "lex");
1442
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
1443
+ while (true) {
1444
+ state = stack[stack.length - 1];
1445
+ if (this.defaultActions[state]) {
1446
+ action = this.defaultActions[state];
1447
+ } else {
1448
+ if (symbol === null || typeof symbol == "undefined") {
1449
+ symbol = lex();
1450
+ }
1451
+ action = table[state] && table[state][symbol];
1452
+ }
1453
+ if (typeof action === "undefined" || !action.length || !action[0]) {
1454
+ var errStr = "";
1455
+ expected = [];
1456
+ for (p in table[state]) {
1457
+ if (this.terminals_[p] && p > TERROR) {
1458
+ expected.push("'" + this.terminals_[p] + "'");
1459
+ }
1460
+ }
1461
+ if (lexer2.showPosition) {
1462
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1463
+ } else {
1464
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
1465
+ }
1466
+ this.parseError(errStr, {
1467
+ text: lexer2.match,
1468
+ token: this.terminals_[symbol] || symbol,
1469
+ line: lexer2.yylineno,
1470
+ loc: yyloc,
1471
+ expected
1472
+ });
1473
+ }
1474
+ if (action[0] instanceof Array && action.length > 1) {
1475
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
1476
+ }
1477
+ switch (action[0]) {
1478
+ case 1:
1479
+ stack.push(symbol);
1480
+ vstack.push(lexer2.yytext);
1481
+ lstack.push(lexer2.yylloc);
1482
+ stack.push(action[1]);
1483
+ symbol = null;
1484
+ {
1485
+ yyleng = lexer2.yyleng;
1486
+ yytext = lexer2.yytext;
1487
+ yylineno = lexer2.yylineno;
1488
+ yyloc = lexer2.yylloc;
1489
+ }
1490
+ break;
1491
+ case 2:
1492
+ len = this.productions_[action[1]][1];
1493
+ yyval.$ = vstack[vstack.length - len];
1494
+ yyval._$ = {
1495
+ first_line: lstack[lstack.length - (len || 1)].first_line,
1496
+ last_line: lstack[lstack.length - 1].last_line,
1497
+ first_column: lstack[lstack.length - (len || 1)].first_column,
1498
+ last_column: lstack[lstack.length - 1].last_column
1499
+ };
1500
+ if (ranges) {
1501
+ yyval._$.range = [
1502
+ lstack[lstack.length - (len || 1)].range[0],
1503
+ lstack[lstack.length - 1].range[1]
1504
+ ];
1505
+ }
1506
+ r = this.performAction.apply(yyval, [
1507
+ yytext,
1508
+ yyleng,
1509
+ yylineno,
1510
+ sharedState.yy,
1511
+ action[1],
1512
+ vstack,
1513
+ lstack
1514
+ ].concat(args));
1515
+ if (typeof r !== "undefined") {
1516
+ return r;
1517
+ }
1518
+ if (len) {
1519
+ stack = stack.slice(0, -1 * len * 2);
1520
+ vstack = vstack.slice(0, -1 * len);
1521
+ lstack = lstack.slice(0, -1 * len);
1522
+ }
1523
+ stack.push(this.productions_[action[1]][0]);
1524
+ vstack.push(yyval.$);
1525
+ lstack.push(yyval._$);
1526
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1527
+ stack.push(newState);
1528
+ break;
1529
+ case 3:
1530
+ return true;
1531
+ }
1532
+ }
1533
+ return true;
1534
+ }, "parse")
1535
+ };
1536
+ var lexer = /* @__PURE__ */ (function() {
1537
+ var lexer2 = {
1538
+ EOF: 1,
1539
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1540
+ if (this.yy.parser) {
1541
+ this.yy.parser.parseError(str, hash);
1542
+ } else {
1543
+ throw new Error(str);
1544
+ }
1545
+ }, "parseError"),
1546
+ // resets the lexer, sets new input
1547
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
1548
+ this.yy = yy || this.yy || {};
1549
+ this._input = input;
1550
+ this._more = this._backtrack = this.done = false;
1551
+ this.yylineno = this.yyleng = 0;
1552
+ this.yytext = this.matched = this.match = "";
1553
+ this.conditionStack = ["INITIAL"];
1554
+ this.yylloc = {
1555
+ first_line: 1,
1556
+ first_column: 0,
1557
+ last_line: 1,
1558
+ last_column: 0
1559
+ };
1560
+ if (this.options.ranges) {
1561
+ this.yylloc.range = [0, 0];
1562
+ }
1563
+ this.offset = 0;
1564
+ return this;
1565
+ }, "setInput"),
1566
+ // consumes and returns one char from the input
1567
+ input: /* @__PURE__ */ __name(function() {
1568
+ var ch = this._input[0];
1569
+ this.yytext += ch;
1570
+ this.yyleng++;
1571
+ this.offset++;
1572
+ this.match += ch;
1573
+ this.matched += ch;
1574
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
1575
+ if (lines) {
1576
+ this.yylineno++;
1577
+ this.yylloc.last_line++;
1578
+ } else {
1579
+ this.yylloc.last_column++;
1580
+ }
1581
+ if (this.options.ranges) {
1582
+ this.yylloc.range[1]++;
1583
+ }
1584
+ this._input = this._input.slice(1);
1585
+ return ch;
1586
+ }, "input"),
1587
+ // unshifts one char (or a string) into the input
1588
+ unput: /* @__PURE__ */ __name(function(ch) {
1589
+ var len = ch.length;
1590
+ var lines = ch.split(/(?:\r\n?|\n)/g);
1591
+ this._input = ch + this._input;
1592
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
1593
+ this.offset -= len;
1594
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1595
+ this.match = this.match.substr(0, this.match.length - 1);
1596
+ this.matched = this.matched.substr(0, this.matched.length - 1);
1597
+ if (lines.length - 1) {
1598
+ this.yylineno -= lines.length - 1;
1599
+ }
1600
+ var r = this.yylloc.range;
1601
+ this.yylloc = {
1602
+ first_line: this.yylloc.first_line,
1603
+ last_line: this.yylineno + 1,
1604
+ first_column: this.yylloc.first_column,
1605
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
1606
+ };
1607
+ if (this.options.ranges) {
1608
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1609
+ }
1610
+ this.yyleng = this.yytext.length;
1611
+ return this;
1612
+ }, "unput"),
1613
+ // When called from action, caches matched text and appends it on next action
1614
+ more: /* @__PURE__ */ __name(function() {
1615
+ this._more = true;
1616
+ return this;
1617
+ }, "more"),
1618
+ // 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.
1619
+ reject: /* @__PURE__ */ __name(function() {
1620
+ if (this.options.backtrack_lexer) {
1621
+ this._backtrack = true;
1622
+ } else {
1623
+ 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).\n" + this.showPosition(), {
1624
+ text: "",
1625
+ token: null,
1626
+ line: this.yylineno
1627
+ });
1628
+ }
1629
+ return this;
1630
+ }, "reject"),
1631
+ // retain first n characters of the match
1632
+ less: /* @__PURE__ */ __name(function(n) {
1633
+ this.unput(this.match.slice(n));
1634
+ }, "less"),
1635
+ // displays already matched input, i.e. for error messages
1636
+ pastInput: /* @__PURE__ */ __name(function() {
1637
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
1638
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
1639
+ }, "pastInput"),
1640
+ // displays upcoming input, i.e. for error messages
1641
+ upcomingInput: /* @__PURE__ */ __name(function() {
1642
+ var next = this.match;
1643
+ if (next.length < 20) {
1644
+ next += this._input.substr(0, 20 - next.length);
1645
+ }
1646
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
1647
+ }, "upcomingInput"),
1648
+ // displays the character position where the lexing error occurred, i.e. for error messages
1649
+ showPosition: /* @__PURE__ */ __name(function() {
1650
+ var pre = this.pastInput();
1651
+ var c = new Array(pre.length + 1).join("-");
1652
+ return pre + this.upcomingInput() + "\n" + c + "^";
1653
+ }, "showPosition"),
1654
+ // test the lexed token: return FALSE when not a match, otherwise return token
1655
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
1656
+ var token, lines, backup;
1657
+ if (this.options.backtrack_lexer) {
1658
+ backup = {
1659
+ yylineno: this.yylineno,
1660
+ yylloc: {
1661
+ first_line: this.yylloc.first_line,
1662
+ last_line: this.last_line,
1663
+ first_column: this.yylloc.first_column,
1664
+ last_column: this.yylloc.last_column
1665
+ },
1666
+ yytext: this.yytext,
1667
+ match: this.match,
1668
+ matches: this.matches,
1669
+ matched: this.matched,
1670
+ yyleng: this.yyleng,
1671
+ offset: this.offset,
1672
+ _more: this._more,
1673
+ _input: this._input,
1674
+ yy: this.yy,
1675
+ conditionStack: this.conditionStack.slice(0),
1676
+ done: this.done
1677
+ };
1678
+ if (this.options.ranges) {
1679
+ backup.yylloc.range = this.yylloc.range.slice(0);
1680
+ }
1681
+ }
1682
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
1683
+ if (lines) {
1684
+ this.yylineno += lines.length;
1685
+ }
1686
+ this.yylloc = {
1687
+ first_line: this.yylloc.last_line,
1688
+ last_line: this.yylineno + 1,
1689
+ first_column: this.yylloc.last_column,
1690
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
1691
+ };
1692
+ this.yytext += match[0];
1693
+ this.match += match[0];
1694
+ this.matches = match;
1695
+ this.yyleng = this.yytext.length;
1696
+ if (this.options.ranges) {
1697
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
1698
+ }
1699
+ this._more = false;
1700
+ this._backtrack = false;
1701
+ this._input = this._input.slice(match[0].length);
1702
+ this.matched += match[0];
1703
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
1704
+ if (this.done && this._input) {
1705
+ this.done = false;
1706
+ }
1707
+ if (token) {
1708
+ return token;
1709
+ } else if (this._backtrack) {
1710
+ for (var k in backup) {
1711
+ this[k] = backup[k];
1712
+ }
1713
+ return false;
1714
+ }
1715
+ return false;
1716
+ }, "test_match"),
1717
+ // return next match in input
1718
+ next: /* @__PURE__ */ __name(function() {
1719
+ if (this.done) {
1720
+ return this.EOF;
1721
+ }
1722
+ if (!this._input) {
1723
+ this.done = true;
1724
+ }
1725
+ var token, match, tempMatch, index;
1726
+ if (!this._more) {
1727
+ this.yytext = "";
1728
+ this.match = "";
1729
+ }
1730
+ var rules = this._currentRules();
1731
+ for (var i = 0; i < rules.length; i++) {
1732
+ tempMatch = this._input.match(this.rules[rules[i]]);
1733
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1734
+ match = tempMatch;
1735
+ index = i;
1736
+ if (this.options.backtrack_lexer) {
1737
+ token = this.test_match(tempMatch, rules[i]);
1738
+ if (token !== false) {
1739
+ return token;
1740
+ } else if (this._backtrack) {
1741
+ match = false;
1742
+ continue;
1743
+ } else {
1744
+ return false;
1745
+ }
1746
+ } else if (!this.options.flex) {
1747
+ break;
1748
+ }
1749
+ }
1750
+ }
1751
+ if (match) {
1752
+ token = this.test_match(match, rules[index]);
1753
+ if (token !== false) {
1754
+ return token;
1755
+ }
1756
+ return false;
1757
+ }
1758
+ if (this._input === "") {
1759
+ return this.EOF;
1760
+ } else {
1761
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1762
+ text: "",
1763
+ token: null,
1764
+ line: this.yylineno
1765
+ });
1766
+ }
1767
+ }, "next"),
1768
+ // return next match that has a token
1769
+ lex: /* @__PURE__ */ __name(function lex() {
1770
+ var r = this.next();
1771
+ if (r) {
1772
+ return r;
1773
+ } else {
1774
+ return this.lex();
1775
+ }
1776
+ }, "lex"),
1777
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1778
+ begin: /* @__PURE__ */ __name(function begin(condition) {
1779
+ this.conditionStack.push(condition);
1780
+ }, "begin"),
1781
+ // pop the previously active lexer condition state off the condition stack
1782
+ popState: /* @__PURE__ */ __name(function popState() {
1783
+ var n = this.conditionStack.length - 1;
1784
+ if (n > 0) {
1785
+ return this.conditionStack.pop();
1786
+ } else {
1787
+ return this.conditionStack[0];
1788
+ }
1789
+ }, "popState"),
1790
+ // produce the lexer rule set which is active for the currently active lexer condition state
1791
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
1792
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
1793
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1794
+ } else {
1795
+ return this.conditions["INITIAL"].rules;
1796
+ }
1797
+ }, "_currentRules"),
1798
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1799
+ topState: /* @__PURE__ */ __name(function topState(n) {
1800
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
1801
+ if (n >= 0) {
1802
+ return this.conditionStack[n];
1803
+ } else {
1804
+ return "INITIAL";
1805
+ }
1806
+ }, "topState"),
1807
+ // alias for begin(condition)
1808
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
1809
+ this.begin(condition);
1810
+ }, "pushState"),
1811
+ // return the number of states currently on the stack
1812
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
1813
+ return this.conditionStack.length;
1814
+ }, "stateStackSize"),
1815
+ options: {},
1816
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1817
+ switch ($avoiding_name_collisions) {
1818
+ case 0:
1819
+ this.begin("acc_title");
1820
+ return 34;
1821
+ case 1:
1822
+ this.popState();
1823
+ return "acc_title_value";
1824
+ case 2:
1825
+ this.begin("acc_descr");
1826
+ return 36;
1827
+ case 3:
1828
+ this.popState();
1829
+ return "acc_descr_value";
1830
+ case 4:
1831
+ this.begin("acc_descr_multiline");
1832
+ break;
1833
+ case 5:
1834
+ this.popState();
1835
+ break;
1836
+ case 6:
1837
+ return "acc_descr_multiline_value";
1838
+ case 7:
1839
+ this.pushState("shapeData");
1840
+ yy_.yytext = "";
1841
+ return 40;
1842
+ case 8:
1843
+ this.pushState("shapeDataStr");
1844
+ return 40;
1845
+ case 9:
1846
+ this.popState();
1847
+ return 40;
1848
+ case 10:
1849
+ const re = /\n\s*/g;
1850
+ yy_.yytext = yy_.yytext.replace(re, "<br/>");
1851
+ return 40;
1852
+ case 11:
1853
+ return 40;
1854
+ case 12:
1855
+ this.popState();
1856
+ break;
1857
+ case 13:
1858
+ this.begin("callbackname");
1859
+ break;
1860
+ case 14:
1861
+ this.popState();
1862
+ break;
1863
+ case 15:
1864
+ this.popState();
1865
+ this.begin("callbackargs");
1866
+ break;
1867
+ case 16:
1868
+ return 95;
1869
+ case 17:
1870
+ this.popState();
1871
+ break;
1872
+ case 18:
1873
+ return 96;
1874
+ case 19:
1875
+ return "MD_STR";
1876
+ case 20:
1877
+ this.popState();
1878
+ break;
1879
+ case 21:
1880
+ this.begin("md_string");
1881
+ break;
1882
+ case 22:
1883
+ return "STR";
1884
+ case 23:
1885
+ this.popState();
1886
+ break;
1887
+ case 24:
1888
+ this.pushState("string");
1889
+ break;
1890
+ case 25:
1891
+ return 84;
1892
+ case 26:
1893
+ return 102;
1894
+ case 27:
1895
+ return 85;
1896
+ case 28:
1897
+ return 104;
1898
+ case 29:
1899
+ return 86;
1900
+ case 30:
1901
+ return 87;
1902
+ case 31:
1903
+ return 97;
1904
+ case 32:
1905
+ this.begin("click");
1906
+ break;
1907
+ case 33:
1908
+ this.popState();
1909
+ break;
1910
+ case 34:
1911
+ return 88;
1912
+ case 35:
1913
+ if (yy.lex.firstGraph()) {
1914
+ this.begin("dir");
1915
+ }
1916
+ return 12;
1917
+ case 36:
1918
+ if (yy.lex.firstGraph()) {
1919
+ this.begin("dir");
1920
+ }
1921
+ return 12;
1922
+ case 37:
1923
+ if (yy.lex.firstGraph()) {
1924
+ this.begin("dir");
1925
+ }
1926
+ return 12;
1927
+ case 38:
1928
+ return 27;
1929
+ case 39:
1930
+ return 32;
1931
+ case 40:
1932
+ return 98;
1933
+ case 41:
1934
+ return 98;
1935
+ case 42:
1936
+ return 98;
1937
+ case 43:
1938
+ return 98;
1939
+ case 44:
1940
+ this.popState();
1941
+ return 13;
1942
+ case 45:
1943
+ this.popState();
1944
+ return 14;
1945
+ case 46:
1946
+ this.popState();
1947
+ return 14;
1948
+ case 47:
1949
+ this.popState();
1950
+ return 14;
1951
+ case 48:
1952
+ this.popState();
1953
+ return 14;
1954
+ case 49:
1955
+ this.popState();
1956
+ return 14;
1957
+ case 50:
1958
+ this.popState();
1959
+ return 14;
1960
+ case 51:
1961
+ this.popState();
1962
+ return 14;
1963
+ case 52:
1964
+ this.popState();
1965
+ return 14;
1966
+ case 53:
1967
+ this.popState();
1968
+ return 14;
1969
+ case 54:
1970
+ this.popState();
1971
+ return 14;
1972
+ case 55:
1973
+ return 121;
1974
+ case 56:
1975
+ return 122;
1976
+ case 57:
1977
+ return 123;
1978
+ case 58:
1979
+ return 124;
1980
+ case 59:
1981
+ return 78;
1982
+ case 60:
1983
+ return 105;
1984
+ case 61:
1985
+ return 111;
1986
+ case 62:
1987
+ return 46;
1988
+ case 63:
1989
+ return 60;
1990
+ case 64:
1991
+ return 44;
1992
+ case 65:
1993
+ return 8;
1994
+ case 66:
1995
+ return 106;
1996
+ case 67:
1997
+ return 115;
1998
+ case 68:
1999
+ this.popState();
2000
+ return 77;
2001
+ case 69:
2002
+ this.pushState("edgeText");
2003
+ return 75;
2004
+ case 70:
2005
+ return 119;
2006
+ case 71:
2007
+ this.popState();
2008
+ return 77;
2009
+ case 72:
2010
+ this.pushState("thickEdgeText");
2011
+ return 75;
2012
+ case 73:
2013
+ return 119;
2014
+ case 74:
2015
+ this.popState();
2016
+ return 77;
2017
+ case 75:
2018
+ this.pushState("dottedEdgeText");
2019
+ return 75;
2020
+ case 76:
2021
+ return 119;
2022
+ case 77:
2023
+ return 77;
2024
+ case 78:
2025
+ this.popState();
2026
+ return 53;
2027
+ case 79:
2028
+ return "TEXT";
2029
+ case 80:
2030
+ this.pushState("ellipseText");
2031
+ return 52;
2032
+ case 81:
2033
+ this.popState();
2034
+ return 55;
2035
+ case 82:
2036
+ this.pushState("text");
2037
+ return 54;
2038
+ case 83:
2039
+ this.popState();
2040
+ return 57;
2041
+ case 84:
2042
+ this.pushState("text");
2043
+ return 56;
2044
+ case 85:
2045
+ return 58;
2046
+ case 86:
2047
+ this.pushState("text");
2048
+ return 67;
2049
+ case 87:
2050
+ this.popState();
2051
+ return 64;
2052
+ case 88:
2053
+ this.pushState("text");
2054
+ return 63;
2055
+ case 89:
2056
+ this.popState();
2057
+ return 49;
2058
+ case 90:
2059
+ this.pushState("text");
2060
+ return 48;
2061
+ case 91:
2062
+ this.popState();
2063
+ return 69;
2064
+ case 92:
2065
+ this.popState();
2066
+ return 71;
2067
+ case 93:
2068
+ return 117;
2069
+ case 94:
2070
+ this.pushState("trapText");
2071
+ return 68;
2072
+ case 95:
2073
+ this.pushState("trapText");
2074
+ return 70;
2075
+ case 96:
2076
+ return 118;
2077
+ case 97:
2078
+ return 67;
2079
+ case 98:
2080
+ return 90;
2081
+ case 99:
2082
+ return "SEP";
2083
+ case 100:
2084
+ return 89;
2085
+ case 101:
2086
+ return 115;
2087
+ case 102:
2088
+ return 111;
2089
+ case 103:
2090
+ return 44;
2091
+ case 104:
2092
+ return 109;
2093
+ case 105:
2094
+ return 114;
2095
+ case 106:
2096
+ return 116;
2097
+ case 107:
2098
+ this.popState();
2099
+ return 62;
2100
+ case 108:
2101
+ this.pushState("text");
2102
+ return 62;
2103
+ case 109:
2104
+ this.popState();
2105
+ return 51;
2106
+ case 110:
2107
+ this.pushState("text");
2108
+ return 50;
2109
+ case 111:
2110
+ this.popState();
2111
+ return 31;
2112
+ case 112:
2113
+ this.pushState("text");
2114
+ return 29;
2115
+ case 113:
2116
+ this.popState();
2117
+ return 66;
2118
+ case 114:
2119
+ this.pushState("text");
2120
+ return 65;
2121
+ case 115:
2122
+ return "TEXT";
2123
+ case 116:
2124
+ return "QUOTE";
2125
+ case 117:
2126
+ return 9;
2127
+ case 118:
2128
+ return 10;
2129
+ case 119:
2130
+ return 11;
2131
+ }
2132
+ }, "anonymous"),
2133
+ rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:@\{)/, /^(?:["])/, /^(?:["])/, /^(?:[^\"]+)/, /^(?:[^}^"]+)/, /^(?:\})/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[^\s\"]+@(?=[^\{\"]))/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|!\)+)/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/],
2134
+ conditions: { "shapeDataEndBracket": { "rules": [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "shapeDataStr": { "rules": [9, 10, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "shapeData": { "rules": [8, 11, 12, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "callbackargs": { "rules": [17, 18, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "callbackname": { "rules": [14, 15, 16, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "href": { "rules": [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "click": { "rules": [21, 24, 33, 34, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "dottedEdgeText": { "rules": [21, 24, 74, 76, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "thickEdgeText": { "rules": [21, 24, 71, 73, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "edgeText": { "rules": [21, 24, 68, 70, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "trapText": { "rules": [21, 24, 77, 80, 82, 84, 88, 90, 91, 92, 93, 94, 95, 108, 110, 112, 114], "inclusive": false }, "ellipseText": { "rules": [21, 24, 77, 78, 79, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "text": { "rules": [21, 24, 77, 80, 81, 82, 83, 84, 87, 88, 89, 90, 94, 95, 107, 108, 109, 110, 111, 112, 113, 114, 115], "inclusive": false }, "vertex": { "rules": [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "dir": { "rules": [21, 24, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "acc_descr": { "rules": [3, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "acc_title": { "rules": [1, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "md_string": { "rules": [19, 20, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "string": { "rules": [21, 22, 23, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 13, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 74, 75, 77, 80, 82, 84, 85, 86, 88, 90, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 110, 112, 114, 116, 117, 118, 119], "inclusive": true } }
2135
+ };
2136
+ return lexer2;
2137
+ })();
2138
+ parser2.lexer = lexer;
2139
+ function Parser() {
2140
+ this.yy = {};
2141
+ }
2142
+ __name(Parser, "Parser");
2143
+ Parser.prototype = parser2;
2144
+ parser2.Parser = Parser;
2145
+ return new Parser();
2146
+ })();
2147
+ parser.parser = parser;
2148
+ var flow_default = parser;
2149
+ var newParser = Object.assign({}, flow_default);
2150
+ newParser.parse = (src) => {
2151
+ const newSrc = src.replace(/}\s*\n/g, "}\n");
2152
+ return flow_default.parse(newSrc);
2153
+ };
2154
+ var flowParser_default = newParser;
2155
+ var fade = /* @__PURE__ */ __name((color, opacity) => {
2156
+ const channel2 = channel;
2157
+ const r = channel2(color, "r");
2158
+ const g = channel2(color, "g");
2159
+ const b = channel2(color, "b");
2160
+ return rgba(r, g, b, opacity);
2161
+ }, "fade");
2162
+ var getStyles = /* @__PURE__ */ __name((options) => `.label {
2163
+ font-family: ${options.fontFamily};
2164
+ color: ${options.nodeTextColor || options.textColor};
2165
+ }
2166
+ .cluster-label text {
2167
+ fill: ${options.titleColor};
2168
+ }
2169
+ .cluster-label span {
2170
+ color: ${options.titleColor};
2171
+ }
2172
+ .cluster-label span p {
2173
+ background-color: transparent;
2174
+ }
2175
+
2176
+ .label text,span {
2177
+ fill: ${options.nodeTextColor || options.textColor};
2178
+ color: ${options.nodeTextColor || options.textColor};
2179
+ }
2180
+
2181
+ .node rect,
2182
+ .node circle,
2183
+ .node ellipse,
2184
+ .node polygon,
2185
+ .node path {
2186
+ fill: ${options.mainBkg};
2187
+ stroke: ${options.nodeBorder};
2188
+ stroke-width: 1px;
2189
+ }
2190
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
2191
+ text-anchor: middle;
2192
+ }
2193
+ // .flowchart-label .text-outer-tspan {
2194
+ // text-anchor: middle;
2195
+ // }
2196
+ // .flowchart-label .text-inner-tspan {
2197
+ // text-anchor: start;
2198
+ // }
2199
+
2200
+ .node .katex path {
2201
+ fill: #000;
2202
+ stroke: #000;
2203
+ stroke-width: 1px;
2204
+ }
2205
+
2206
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
2207
+ text-align: center;
2208
+ }
2209
+ .node.clickable {
2210
+ cursor: pointer;
2211
+ }
2212
+
2213
+
2214
+ .root .anchor path {
2215
+ fill: ${options.lineColor} !important;
2216
+ stroke-width: 0;
2217
+ stroke: ${options.lineColor};
2218
+ }
2219
+
2220
+ .arrowheadPath {
2221
+ fill: ${options.arrowheadColor};
2222
+ }
2223
+
2224
+ .edgePath .path {
2225
+ stroke: ${options.lineColor};
2226
+ stroke-width: 2.0px;
2227
+ }
2228
+
2229
+ .flowchart-link {
2230
+ stroke: ${options.lineColor};
2231
+ fill: none;
2232
+ }
2233
+
2234
+ .edgeLabel {
2235
+ background-color: ${options.edgeLabelBackground};
2236
+ p {
2237
+ background-color: ${options.edgeLabelBackground};
2238
+ }
2239
+ rect {
2240
+ opacity: 0.5;
2241
+ background-color: ${options.edgeLabelBackground};
2242
+ fill: ${options.edgeLabelBackground};
2243
+ }
2244
+ text-align: center;
2245
+ }
2246
+
2247
+ /* For html labels only */
2248
+ .labelBkg {
2249
+ background-color: ${fade(options.edgeLabelBackground, 0.5)};
2250
+ // background-color:
2251
+ }
2252
+
2253
+ .cluster rect {
2254
+ fill: ${options.clusterBkg};
2255
+ stroke: ${options.clusterBorder};
2256
+ stroke-width: 1px;
2257
+ }
2258
+
2259
+ .cluster text {
2260
+ fill: ${options.titleColor};
2261
+ }
2262
+
2263
+ .cluster span {
2264
+ color: ${options.titleColor};
2265
+ }
2266
+ /* .cluster div {
2267
+ color: ${options.titleColor};
2268
+ } */
2269
+
2270
+ div.mermaidTooltip {
2271
+ position: absolute;
2272
+ text-align: center;
2273
+ max-width: 200px;
2274
+ padding: 2px;
2275
+ font-family: ${options.fontFamily};
2276
+ font-size: 12px;
2277
+ background: ${options.tertiaryColor};
2278
+ border: 1px solid ${options.border2};
2279
+ border-radius: 2px;
2280
+ pointer-events: none;
2281
+ z-index: 100;
2282
+ }
2283
+
2284
+ .flowchartTitleText {
2285
+ text-anchor: middle;
2286
+ font-size: 18px;
2287
+ fill: ${options.textColor};
2288
+ }
2289
+
2290
+ rect.text {
2291
+ fill: none;
2292
+ stroke-width: 0;
2293
+ }
2294
+
2295
+ .icon-shape, .image-shape {
2296
+ background-color: ${options.edgeLabelBackground};
2297
+ p {
2298
+ background-color: ${options.edgeLabelBackground};
2299
+ padding: 2px;
2300
+ }
2301
+ rect {
2302
+ opacity: 0.5;
2303
+ background-color: ${options.edgeLabelBackground};
2304
+ fill: ${options.edgeLabelBackground};
2305
+ }
2306
+ text-align: center;
2307
+ }
2308
+ ${getIconStyles()}
2309
+ `, "getStyles");
2310
+ var styles_default = getStyles;
2311
+ var diagram = {
2312
+ parser: flowParser_default,
2313
+ get db() {
2314
+ return new FlowDB();
2315
+ },
2316
+ renderer: flowRenderer_v3_unified_default,
2317
+ styles: styles_default,
2318
+ init: /* @__PURE__ */ __name((cnf) => {
2319
+ if (!cnf.flowchart) {
2320
+ cnf.flowchart = {};
2321
+ }
2322
+ if (cnf.layout) {
2323
+ setConfig2({ layout: cnf.layout });
2324
+ }
2325
+ cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
2326
+ setConfig2({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
2327
+ }, "init")
2328
+ };
2329
+ export {
2330
+ diagram
2331
+ };