@draftably/editor 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +4 -5
  2. package/dist/assets/{engine.worker-DmHew5f6.js → engine.worker-DwN9io_m.js} +2765 -2722
  3. package/dist/element.js +1 -1
  4. package/dist/index.js +19553 -2
  5. package/dist/types/src/components/controls.d.ts +8 -5
  6. package/dist/types/src/state/canvas-commands.d.ts +169 -0
  7. package/dist/types/src/state/canvas-keyboard.d.ts +15 -0
  8. package/dist/types/src/state/links.d.ts +4 -1
  9. package/dist/types/src/state/workspace.d.ts +3 -0
  10. package/package.json +1 -1
  11. package/dist/assets/import-d2.worker-CnXfFXoa.js +0 -5395
  12. package/dist/chunks/abnfDiagram-WEYOIA3C-llcpthp5.js +0 -87
  13. package/dist/chunks/arc-rJj0TtXf.js +0 -83
  14. package/dist/chunks/architectureDiagram-ZHVYKT53-CfiXg0Lk.js +0 -4781
  15. package/dist/chunks/blockDiagram-RJAE7QA3-CO-14jWz.js +0 -1440
  16. package/dist/chunks/browser-iNhbPsGc.js +0 -40
  17. package/dist/chunks/c4Diagram-XDPPPE54-DYKuxA4n.js +0 -1524
  18. package/dist/chunks/channel-qMvPU6eH.js +0 -5
  19. package/dist/chunks/chunk-2E7WHVMD-BEZwsFS3.js +0 -670
  20. package/dist/chunks/chunk-2Q5K7J3B-gqtzQ8ux.js +0 -18
  21. package/dist/chunks/chunk-4EMNKR2T-MC54CXVe.js +0 -262
  22. package/dist/chunks/chunk-55XCU76K-DkZUAaqC.js +0 -68
  23. package/dist/chunks/chunk-5VM5RSS4-CaKe4sjM.js +0 -19
  24. package/dist/chunks/chunk-JWPE2WC7-CnAFS2xF.js +0 -8
  25. package/dist/chunks/chunk-VQ5W62QI-CXRv7FiX.js +0 -19
  26. package/dist/chunks/chunk-XXDRQBXY-B-AMQgD2.js +0 -8
  27. package/dist/chunks/chunk-ZCHMQSOR-BALpdc3g.js +0 -451
  28. package/dist/chunks/classDiagram-v2-4MYWR3UA-wPjgJTg4.js +0 -1570
  29. package/dist/chunks/cose-bilkent-JH36ORCC-Bbh5ggBc.js +0 -2608
  30. package/dist/chunks/cynefin-EF2NZ3EQ-Bt6b88hY.js +0 -22361
  31. package/dist/chunks/cynefinDiagram-WF24UDRP-BHWZvxoF.js +0 -299
  32. package/dist/chunks/cytoscape.esm-CRsF_JA3.js +0 -18791
  33. package/dist/chunks/dagre-NK4GIZVX-Cz37yPrT.js +0 -2157
  34. package/dist/chunks/defaultLocale-BgPVtth8.js +0 -171
  35. package/dist/chunks/diagram-CBK3MWTC-Q2R6FJ0B.js +0 -531
  36. package/dist/chunks/diagram-I5XIIV2D-a2Kdu_wA.js +0 -153
  37. package/dist/chunks/diagram-ODIL2UCW-DTWXxcOn.js +0 -346
  38. package/dist/chunks/diagram-PFBEJUXE-DIAQQ5KX.js +0 -480
  39. package/dist/chunks/diagram-RJA3I4VV-BPD0GghS.js +0 -219
  40. package/dist/chunks/diagram-TYUNFSNR-BmdkONfG.js +0 -2586
  41. package/dist/chunks/dot-importer-B23jwEkx.js +0 -1547
  42. package/dist/chunks/ebnfDiagram-V4P3TTPT-C5IKvYlb.js +0 -109
  43. package/dist/chunks/elk-QONTBCTQ-CtdQFvh2.js +0 -49229
  44. package/dist/chunks/erDiagram-KYQIGQAA-5wguK9Dx.js +0 -1064
  45. package/dist/chunks/flowDiagram-IUGLLWBU-BijvFPku.js +0 -1771
  46. package/dist/chunks/ganttDiagram-R7GPNTJY-BaqGPz-O.js +0 -2729
  47. package/dist/chunks/gitGraphDiagram-PDYL7XHY-DZfMGyHE.js +0 -815
  48. package/dist/chunks/graph-CKJmgLki.js +0 -1541
  49. package/dist/chunks/import-core-C-I1wGfw.js +0 -145
  50. package/dist/chunks/infoDiagram-MVDRKAX5-C2vH_59e.js +0 -24
  51. package/dist/chunks/init-DjUOC4st.js +0 -16
  52. package/dist/chunks/ishikawaDiagram-HPEHV2GE-q149MFlV.js +0 -624
  53. package/dist/chunks/journeyDiagram-BOSHW7O7-D-2Z3VtR.js +0 -834
  54. package/dist/chunks/kanban-definition-FNSA4HC5-wvAjV5ub.js +0 -724
  55. package/dist/chunks/katex-BsrBVQKd.js +0 -11314
  56. package/dist/chunks/linear-4t7D_ros.js +0 -259
  57. package/dist/chunks/mermaid-facade-BoLWBerE.js +0 -289
  58. package/dist/chunks/mermaid-importer-Cgx1IhmR.js +0 -478
  59. package/dist/chunks/mermaid.core-DXv6D2Sm.js +0 -19244
  60. package/dist/chunks/mindmap-definition-6OY57UG3-r9wTKul_.js +0 -837
  61. package/dist/chunks/mount-C1Xk_GQz.js +0 -22131
  62. package/dist/chunks/ordinal-DfAQgscy.js +0 -61
  63. package/dist/chunks/pegDiagram-ECIUJNBX-CmKlFWiP.js +0 -95
  64. package/dist/chunks/pieDiagram-GNMPY74T-DNTw_qan.js +0 -208
  65. package/dist/chunks/quadrantDiagram-D57K4MC3-CT_tvVub.js +0 -1029
  66. package/dist/chunks/railroadDiagram-Y72NRBL7-C5TUvZBe.js +0 -77
  67. package/dist/chunks/requirementDiagram-EQYSW5RA-C_c65aCa.js +0 -889
  68. package/dist/chunks/sankeyDiagram-SY24JHO5-CKcbizM1.js +0 -859
  69. package/dist/chunks/sequenceDiagram-BLEHNHQU-GpVnHOjf.js +0 -2972
  70. package/dist/chunks/sizeCapture-INFHLROL-CToN3JSu.js +0 -46
  71. package/dist/chunks/stateDiagram-v2-A6IESKWZ-rJYd2FfM.js +0 -1520
  72. package/dist/chunks/swimlanes-B3ENRKFQ-C7w5pfxG.js +0 -4991
  73. package/dist/chunks/swimlanesDiagram-AYQRV4AK-BpGY_bvE.js +0 -13
  74. package/dist/chunks/timeline-definition-JXYKGLGB-ChKFPBKc.js +0 -1058
  75. package/dist/chunks/usecaseDiagram-WPOLBNNX-skXH8Dcu.js +0 -7945
  76. package/dist/chunks/vennDiagram-Q3Y3IDCW-C5KknmJf.js +0 -1578
  77. package/dist/chunks/wardleyDiagram-IVAIDKWA-DY4Lkfpu.js +0 -678
  78. package/dist/chunks/xychartDiagram-4URNHDU4-BHScsL7h.js +0 -1536
  79. package/dist/types/src/import/browser.d.ts +0 -3
  80. package/dist/types/src/import/detect.d.ts +0 -31
  81. package/dist/types/src/import/dot-importer.d.ts +0 -3
  82. package/dist/types/src/import/import-core.d.ts +0 -105
  83. package/dist/types/src/import/mermaid-facade.d.ts +0 -120
  84. package/dist/types/src/import/mermaid-importer.d.ts +0 -4
  85. package/dist/types/src/import/mermaid-sequence.d.ts +0 -8
  86. package/dist/types/src/import/scratch.d.ts +0 -3
  87. package/dist/types/src/lib/source-hash.d.ts +0 -7
  88. package/dist/types/src/model/candidates.d.ts +0 -53
  89. package/dist/types/src/model/examples.d.ts +0 -15
  90. package/dist/types/src/model/label-hits.d.ts +0 -27
  91. package/dist/types/src/model/static-scene.d.ts +0 -15
  92. package/dist/types/src/state/commands.d.ts +0 -529
  93. package/dist/types/src/state/comparison.d.ts +0 -151
  94. package/dist/types/src/state/files.d.ts +0 -61
  95. package/dist/types/src/state/keyboard.d.ts +0 -6
  96. package/dist/types/src/state/launch.d.ts +0 -61
  97. package/dist/types/src/state/ui.d.ts +0 -39
@@ -1,1547 +0,0 @@
1
- import { c as Fs } from "./mount-C1Xk_GQz.js";
2
- import { i as Es, L as Xe, I as Ds, f as Cs, b as Bs, h as Te, a as ms } from "./import-core-C-I1wGfw.js";
3
- Object.seal({
4
- // NOTE: RootModelsContext is also initialized after the model class is declared in the '@ts-graphviz/core/register-default' module.
5
- Graph: null,
6
- Digraph: null,
7
- Subgraph: null,
8
- Node: null,
9
- Edge: null
10
- });
11
- function mu(o) {
12
- const h = /* @__PURE__ */ Object.create(null);
13
- if (o != null) {
14
- const u = Object.getOwnPropertyDescriptors(o);
15
- for (const $ of Object.getOwnPropertyNames(u)) {
16
- const F = u[$];
17
- h[$] = Object.hasOwn(F, "value") ? F.value : F.get?.call(o);
18
- }
19
- }
20
- return h;
21
- }
22
- class $u extends Error {
23
- /**
24
- * Constructor
25
- * @param nodeCount - The current node count when the limit was exceeded
26
- * @param maxNodes - The maximum allowed node count
27
- */
28
- constructor(h, u) {
29
- super(
30
- `AST node count (${h}) exceeds maximum allowed (${u}). Consider increasing 'maxASTNodes' option or simplifying the input.`
31
- ), this.nodeCount = h, this.maxNodes = u, this.name = "ASTNodeCountExceededError";
32
- }
33
- }
34
- const $s = 1e5;
35
- class bu {
36
- /**
37
- * Constructor of Builder
38
- * @param options - Options to initialize Builder
39
- */
40
- constructor(h) {
41
- this.options = h, this.options = mu(h), this.maxNodes = this.options.maxASTNodes ?? $s;
42
- }
43
- nodeCount = 0;
44
- maxNodes;
45
- /**
46
- * Get the current file range or null
47
- * @internal
48
- */
49
- getLocation() {
50
- return this.options?.locationFunction?.() ?? null;
51
- }
52
- /**
53
- * Create an {@link ASTNode} of the specified type
54
- *
55
- * @param type - Type of the {@link ASTNode}
56
- * @param props - Properties of the {@link ASTNode}
57
- * @param children - Children of the {@link ASTNode}
58
- * @returns An {@link ASTNode}
59
- * @throws {ASTNodeCountExceededError} if the maximum number of AST nodes is exceeded
60
- */
61
- createElement(h, u, $ = []) {
62
- if (this.nodeCount++, this.maxNodes > 0 && this.nodeCount > this.maxNodes)
63
- throw new $u(this.nodeCount, this.maxNodes);
64
- return {
65
- location: this.getLocation(),
66
- ...u,
67
- type: h,
68
- children: $
69
- };
70
- }
71
- /**
72
- * Reset the node count. Used internally by the parser between parse invocations.
73
- * @internal
74
- */
75
- resetNodeCount() {
76
- this.nodeCount = 0;
77
- }
78
- }
79
- function bs(o) {
80
- const h = new bu(o);
81
- return h.createElement.bind(h);
82
- }
83
- bs({
84
- maxASTNodes: 0
85
- });
86
- class xe extends SyntaxError {
87
- constructor(h, u, $, F) {
88
- super(h), this.expected = u, this.found = $, this.location = F, this.name = "SyntaxError";
89
- }
90
- format(h) {
91
- let u = "Error: " + this.message;
92
- if (this.location) {
93
- let $ = null;
94
- const F = h.find((j) => j.source === this.location.source);
95
- F && ($ = F.text.split(/\r\n|\n|\r/g));
96
- const d = this.location.start, y = this.location.source && typeof this.location.source.offset == "function" ? this.location.source.offset(d) : d, v = this.location.source + ":" + y.line + ":" + y.column;
97
- if ($) {
98
- const j = this.location.end, M = "".padEnd(y.line.toString().length, " "), k = $[d.line - 1], C = (d.line === j.line ? j.column : k.length + 1) - d.column || 1;
99
- u += `
100
- --> ` + v + `
101
- ` + M + ` |
102
- ` + y.line + " | " + k + `
103
- ` + M + " | " + "".padEnd(d.column - 1, " ") + "".padEnd(C, "^");
104
- } else
105
- u += `
106
- at ` + v;
107
- }
108
- return u;
109
- }
110
- static buildMessage(h, u) {
111
- function $(C) {
112
- return C.codePointAt(0).toString(16).toUpperCase();
113
- }
114
- const F = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode") ? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu") : null;
115
- function d(C) {
116
- return F ? C.replace(F, (w) => "\\u{" + $(w) + "}") : C;
117
- }
118
- function y(C) {
119
- return d(C.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (w) => "\\x0" + $(w)).replace(/[\x10-\x1F\x7F-\x9F]/g, (w) => "\\x" + $(w)));
120
- }
121
- function v(C) {
122
- return d(C.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (w) => "\\x0" + $(w)).replace(/[\x10-\x1F\x7F-\x9F]/g, (w) => "\\x" + $(w)));
123
- }
124
- const j = {
125
- literal(C) {
126
- return '"' + y(C.text) + '"';
127
- },
128
- class(C) {
129
- const w = C.parts.map(
130
- (N) => Array.isArray(N) ? v(N[0]) + "-" + v(N[1]) : v(N)
131
- );
132
- return "[" + (C.inverted ? "^" : "") + w.join("") + "]" + (C.unicode ? "u" : "");
133
- },
134
- any() {
135
- return "any character";
136
- },
137
- end() {
138
- return "end of input";
139
- },
140
- other(C) {
141
- return C.description;
142
- }
143
- };
144
- function M(C) {
145
- return j[C.type](C);
146
- }
147
- function k(C) {
148
- const w = C.map(M);
149
- if (w.sort(), w.length > 0) {
150
- let N = 1;
151
- for (let P = 1; P < w.length; P++)
152
- w[P - 1] !== w[P] && (w[N] = w[P], N++);
153
- w.length = N;
154
- }
155
- switch (w.length) {
156
- case 1:
157
- return w[0];
158
- case 2:
159
- return w[0] + " or " + w[1];
160
- default:
161
- return w.slice(0, -1).join(", ") + ", or " + w[w.length - 1];
162
- }
163
- }
164
- function U(C) {
165
- return C ? '"' + y(C) + '"' : "end of input";
166
- }
167
- return "Expected " + k(h) + " but " + U(u) + " found.";
168
- }
169
- }
170
- function _s(o, h) {
171
- h = h !== void 0 ? h : {};
172
- const u = {}, $ = h.grammarSource, F = {
173
- Dot: iu,
174
- Graph: ou,
175
- Subgraph: ke,
176
- Node: Ne,
177
- Edge: Ie,
178
- AttributeList: Le,
179
- Attribute: Re,
180
- ClusterStatements: Me
181
- };
182
- let d = iu;
183
- const y = "strict", v = "graph", j = "digraph", M = "{", k = "}", U = "node", C = "edge", w = "=", N = "[", P = "]", Q = "->", oe = "--", ge = ":", de = "subgraph", he = "n", Fe = "ne", ee = "e", J = "se", Ee = "s", ae = "sw", ue = "w", le = "nw", f = '"', l = "/*", c = "*/", D = "//", E = "#", T = "-", B = ".", _ = "<", b = ">", L = "\\", X = `
184
- `, I = /^[,;]/, H = /^[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\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\u16EE-\u16F0\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\u2160-\u2188\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-\u3007\u3021-\u3029\u3031-\u3035\u3038-\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-\uA6EF\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]/, te = /^[$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\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\u0660-\u0669\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4-\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09E6-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AE6-\u0AEF\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BEF\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58-\u0C59\u0C60-\u0C61\u0C66-\u0C6F\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60-\u0D61\u0D66-\u0D6F\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E50-\u0E59\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\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F29\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\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\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u19D0-\u19D9\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\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\u2160-\u2188\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-\u3007\u3021-\u3029\u3031-\u3035\u3038-\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-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\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\uABF0-\uABF9\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\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, se = /^[0-9]/, Ye = /^[<>]/, Ze = /^[\t-\n\r ]/, _u = /^[\n\r]/, wu = /^[ \t]/, Tu = x("strict", !0), We = x("graph", !0), xu = x("digraph", !0), ve = x("{", !1), ye = x("}", !1), De = x(";", !1), vu = x("node", !0), yu = x("edge", !0), Ou = x("=", !1), Ce = V([",", ";"], !1, !1, !1), Su = x("[", !1), Nu = x("]", !1), Lu = x("->", !1), Ru = x("--", !1), Iu = Se("port"), Je = x(":", !1), ku = x("subgraph", !0), Mu = x("n", !1), Pu = x("ne", !1), ju = x("e", !1), Gu = x("se", !1), Uu = x("s", !1), zu = x("sw", !1), Hu = x("w", !1), qu = x("nw", !1), ce = x('"', !1), Xu = x("/*", !1), Oe = x("*/", !1), q = Gt(), Vu = x("//", !1), Yu = x("#", !1), Zu = Se("UNICODE_STRING"), Wu = V(["$", ["A", "Z"], "_", ["a", "z"], "ª", "µ", "º", ["À", "Ö"], ["Ø", "ö"], ["ø", "ˁ"], ["ˆ", "ˑ"], ["ˠ", "ˤ"], "ˬ", "ˮ", ["Ͱ", "ʹ"], ["Ͷ", "ͷ"], ["ͺ", "ͽ"], "Ά", ["Έ", "Ί"], "Ό", ["Ύ", "Ρ"], ["Σ", "ϵ"], ["Ϸ", "ҁ"], ["Ҋ", "ԧ"], ["Ա", "Ֆ"], "ՙ", ["ա", "և"], ["א", "ת"], ["װ", "ײ"], ["ؠ", "ي"], ["ٮ", "ٯ"], ["ٱ", "ۓ"], "ە", ["ۥ", "ۦ"], ["ۮ", "ۯ"], ["ۺ", "ۼ"], "ۿ", "ܐ", ["ܒ", "ܯ"], ["ݍ", "ޥ"], "ޱ", ["ߊ", "ߪ"], ["ߴ", "ߵ"], "ߺ", ["ࠀ", "ࠕ"], "ࠚ", "ࠤ", "ࠨ", ["ࡀ", "ࡘ"], "ࢠ", ["ࢢ", "ࢬ"], ["ऄ", "ह"], "ऽ", "ॐ", ["क़", "ॡ"], ["ॱ", "ॷ"], ["ॹ", "ॿ"], ["অ", "ঌ"], ["এ", "ঐ"], ["ও", "ন"], ["প", "র"], "ল", ["শ", "হ"], "ঽ", "ৎ", ["ড়", "ঢ়"], ["য়", "ৡ"], ["ৰ", "ৱ"], ["ਅ", "ਊ"], ["ਏ", "ਐ"], ["ਓ", "ਨ"], ["ਪ", "ਰ"], ["ਲ", "ਲ਼"], ["ਵ", "ਸ਼"], ["ਸ", "ਹ"], ["ਖ਼", "ੜ"], "ਫ਼", ["ੲ", "ੴ"], ["અ", "ઍ"], ["એ", "ઑ"], ["ઓ", "ન"], ["પ", "ર"], ["લ", "ળ"], ["વ", "હ"], "ઽ", "ૐ", ["ૠ", "ૡ"], ["ଅ", "ଌ"], ["ଏ", "ଐ"], ["ଓ", "ନ"], ["ପ", "ର"], ["ଲ", "ଳ"], ["ଵ", "ହ"], "ଽ", ["ଡ଼", "ଢ଼"], ["ୟ", "ୡ"], "ୱ", "ஃ", ["அ", "ஊ"], ["எ", "ஐ"], ["ஒ", "க"], ["ங", "ச"], "ஜ", ["ஞ", "ட"], ["ண", "த"], ["ந", "ப"], ["ம", "ஹ"], "ௐ", ["అ", "ఌ"], ["ఎ", "ఐ"], ["ఒ", "న"], ["ప", "ళ"], ["వ", "హ"], "ఽ", ["ౘ", "ౙ"], ["ౠ", "ౡ"], ["ಅ", "ಌ"], ["ಎ", "ಐ"], ["ಒ", "ನ"], ["ಪ", "ಳ"], ["ವ", "ಹ"], "ಽ", "ೞ", ["ೠ", "ೡ"], ["ೱ", "ೲ"], ["അ", "ഌ"], ["എ", "ഐ"], ["ഒ", "ഺ"], "ഽ", "ൎ", ["ൠ", "ൡ"], ["ൺ", "ൿ"], ["අ", "ඖ"], ["ක", "න"], ["ඳ", "ර"], "ල", ["ව", "ෆ"], ["ก", "ะ"], ["า", "ำ"], ["เ", "ๆ"], ["ກ", "ຂ"], "ຄ", ["ງ", "ຈ"], "ຊ", "ຍ", ["ດ", "ທ"], ["ນ", "ຟ"], ["ມ", "ຣ"], "ລ", "ວ", ["ສ", "ຫ"], ["ອ", "ະ"], ["າ", "ຳ"], "ຽ", ["ເ", "ໄ"], "ໆ", ["ໜ", "ໟ"], "ༀ", ["ཀ", "ཇ"], ["ཉ", "ཬ"], ["ྈ", "ྌ"], ["က", "ဪ"], "ဿ", ["ၐ", "ၕ"], ["ၚ", "ၝ"], "ၡ", ["ၥ", "ၦ"], ["ၮ", "ၰ"], ["ၵ", "ႁ"], "ႎ", ["Ⴀ", "Ⴥ"], "Ⴧ", "Ⴭ", ["ა", "ჺ"], ["ჼ", "ቈ"], ["ቊ", "ቍ"], ["ቐ", "ቖ"], "ቘ", ["ቚ", "ቝ"], ["በ", "ኈ"], ["ኊ", "ኍ"], ["ነ", "ኰ"], ["ኲ", "ኵ"], ["ኸ", "ኾ"], "ዀ", ["ዂ", "ዅ"], ["ወ", "ዖ"], ["ዘ", "ጐ"], ["ጒ", "ጕ"], ["ጘ", "ፚ"], ["ᎀ", "ᎏ"], ["Ꭰ", "Ᏼ"], ["ᐁ", "ᙬ"], ["ᙯ", "ᙿ"], ["ᚁ", "ᚚ"], ["ᚠ", "ᛪ"], ["ᛮ", "ᛰ"], ["ᜀ", "ᜌ"], ["ᜎ", "ᜑ"], ["ᜠ", "ᜱ"], ["ᝀ", "ᝑ"], ["ᝠ", "ᝬ"], ["ᝮ", "ᝰ"], ["ក", "ឳ"], "ៗ", "ៜ", ["ᠠ", "ᡷ"], ["ᢀ", "ᢨ"], "ᢪ", ["ᢰ", "ᣵ"], ["ᤀ", "ᤜ"], ["ᥐ", "ᥭ"], ["ᥰ", "ᥴ"], ["ᦀ", "ᦫ"], ["ᧁ", "ᧇ"], ["ᨀ", "ᨖ"], ["ᨠ", "ᩔ"], "ᪧ", ["ᬅ", "ᬳ"], ["ᭅ", "ᭋ"], ["ᮃ", "ᮠ"], ["ᮮ", "ᮯ"], ["ᮺ", "ᯥ"], ["ᰀ", "ᰣ"], ["ᱍ", "ᱏ"], ["ᱚ", "ᱽ"], ["ᳩ", "ᳬ"], ["ᳮ", "ᳱ"], ["ᳵ", "ᳶ"], ["ᴀ", "ᶿ"], ["Ḁ", "ἕ"], ["Ἐ", "Ἕ"], ["ἠ", "ὅ"], ["Ὀ", "Ὅ"], ["ὐ", "ὗ"], "Ὑ", "Ὓ", "Ὕ", ["Ὗ", "ώ"], ["ᾀ", "ᾴ"], ["ᾶ", "ᾼ"], "ι", ["ῂ", "ῄ"], ["ῆ", "ῌ"], ["ῐ", "ΐ"], ["ῖ", "Ί"], ["ῠ", "Ῥ"], ["ῲ", "ῴ"], ["ῶ", "ῼ"], "ⁱ", "ⁿ", ["ₐ", "ₜ"], "ℂ", "ℇ", ["ℊ", "ℓ"], "ℕ", ["ℙ", "ℝ"], "ℤ", "Ω", "ℨ", ["K", "ℭ"], ["ℯ", "ℹ"], ["ℼ", "ℿ"], ["ⅅ", "ⅉ"], "ⅎ", ["Ⅰ", "ↈ"], ["Ⰰ", "Ⱞ"], ["ⰰ", "ⱞ"], ["Ⱡ", "ⳤ"], ["Ⳬ", "ⳮ"], ["Ⳳ", "ⳳ"], ["ⴀ", "ⴥ"], "ⴧ", "ⴭ", ["ⴰ", "ⵧ"], "ⵯ", ["ⶀ", "ⶖ"], ["ⶠ", "ⶦ"], ["ⶨ", "ⶮ"], ["ⶰ", "ⶶ"], ["ⶸ", "ⶾ"], ["ⷀ", "ⷆ"], ["ⷈ", "ⷎ"], ["ⷐ", "ⷖ"], ["ⷘ", "ⷞ"], "ⸯ", ["々", "〇"], ["〡", "〩"], ["〱", "〵"], ["〸", "〼"], ["ぁ", "ゖ"], ["ゝ", "ゟ"], ["ァ", "ヺ"], ["ー", "ヿ"], ["ㄅ", "ㄭ"], ["ㄱ", "ㆎ"], ["ㆠ", "ㆺ"], ["ㇰ", "ㇿ"], ["㐀", "䶵"], ["一", "鿌"], ["ꀀ", "ꒌ"], ["ꓐ", "ꓽ"], ["ꔀ", "ꘌ"], ["ꘐ", "ꘟ"], ["ꘪ", "ꘫ"], ["Ꙁ", "ꙮ"], ["ꙿ", "ꚗ"], ["ꚠ", "ꛯ"], ["ꜗ", "ꜟ"], ["Ꜣ", "ꞈ"], ["Ꞌ", "ꞎ"], ["Ꞑ", "ꞓ"], ["Ꞡ", "Ɦ"], ["ꟸ", "ꠁ"], ["ꠃ", "ꠅ"], ["ꠇ", "ꠊ"], ["ꠌ", "ꠢ"], ["ꡀ", "ꡳ"], ["ꢂ", "ꢳ"], ["ꣲ", "ꣷ"], "ꣻ", ["ꤊ", "ꤥ"], ["ꤰ", "ꥆ"], ["ꥠ", "ꥼ"], ["ꦄ", "ꦲ"], "ꧏ", ["ꨀ", "ꨨ"], ["ꩀ", "ꩂ"], ["ꩄ", "ꩋ"], ["ꩠ", "ꩶ"], "ꩺ", ["ꪀ", "ꪯ"], "ꪱ", ["ꪵ", "ꪶ"], ["ꪹ", "ꪽ"], "ꫀ", "ꫂ", ["ꫛ", "ꫝ"], ["ꫠ", "ꫪ"], ["ꫲ", "ꫴ"], ["ꬁ", "ꬆ"], ["ꬉ", "ꬎ"], ["ꬑ", "ꬖ"], ["ꬠ", "ꬦ"], ["ꬨ", "ꬮ"], ["ꯀ", "ꯢ"], ["가", "힣"], ["ힰ", "ퟆ"], ["ퟋ", "ퟻ"], ["豈", "舘"], ["並", "龎"], ["ff", "st"], ["ﬓ", "ﬗ"], "יִ", ["ײַ", "ﬨ"], ["שׁ", "זּ"], ["טּ", "לּ"], "מּ", ["נּ", "סּ"], ["ףּ", "פּ"], ["צּ", "ﮱ"], ["ﯓ", "ﴽ"], ["ﵐ", "ﶏ"], ["ﶒ", "ﷇ"], ["ﷰ", "ﷻ"], ["ﹰ", "ﹴ"], ["ﹶ", "ﻼ"], ["A", "Z"], ["a", "z"], ["ヲ", "ᄒ"], ["ᅡ", "ᅦ"], ["ᅧ", "ᅬ"], ["ᅭ", "ᅲ"], ["ᅳ", "ᅵ"]], !1, !1, !1), Ju = V(["$", ["0", "9"], ["A", "Z"], "_", ["a", "z"], "ª", "µ", "º", ["À", "Ö"], ["Ø", "ö"], ["ø", "ˁ"], ["ˆ", "ˑ"], ["ˠ", "ˤ"], "ˬ", "ˮ", ["Ͱ", "ʹ"], ["Ͷ", "ͷ"], ["ͺ", "ͽ"], "Ά", ["Έ", "Ί"], "Ό", ["Ύ", "Ρ"], ["Σ", "ϵ"], ["Ϸ", "ҁ"], ["Ҋ", "ԧ"], ["Ա", "Ֆ"], "ՙ", ["ա", "և"], ["א", "ת"], ["װ", "ײ"], ["ؠ", "ي"], ["٠", "٩"], ["ٮ", "ٯ"], ["ٱ", "ۓ"], "ە", ["ۥ", "ۦ"], ["ۮ", "ۼ"], "ۿ", "ܐ", ["ܒ", "ܯ"], ["ݍ", "ޥ"], "ޱ", ["߀", "ߪ"], ["ߴ", "ߵ"], "ߺ", ["ࠀ", "ࠕ"], "ࠚ", "ࠤ", "ࠨ", ["ࡀ", "ࡘ"], "ࢠ", ["ࢢ", "ࢬ"], ["ऄ", "ह"], "ऽ", "ॐ", ["क़", "ॡ"], ["०", "९"], ["ॱ", "ॷ"], ["ॹ", "ॿ"], ["অ", "ঌ"], ["এ", "ঐ"], ["ও", "ন"], ["প", "র"], "ল", ["শ", "হ"], "ঽ", "ৎ", ["ড়", "ঢ়"], ["য়", "ৡ"], ["০", "ৱ"], ["ਅ", "ਊ"], ["ਏ", "ਐ"], ["ਓ", "ਨ"], ["ਪ", "ਰ"], ["ਲ", "ਲ਼"], ["ਵ", "ਸ਼"], ["ਸ", "ਹ"], ["ਖ਼", "ੜ"], "ਫ਼", ["੦", "੯"], ["ੲ", "ੴ"], ["અ", "ઍ"], ["એ", "ઑ"], ["ઓ", "ન"], ["પ", "ર"], ["લ", "ળ"], ["વ", "હ"], "ઽ", "ૐ", ["ૠ", "ૡ"], ["૦", "૯"], ["ଅ", "ଌ"], ["ଏ", "ଐ"], ["ଓ", "ନ"], ["ପ", "ର"], ["ଲ", "ଳ"], ["ଵ", "ହ"], "ଽ", ["ଡ଼", "ଢ଼"], ["ୟ", "ୡ"], ["୦", "୯"], "ୱ", "ஃ", ["அ", "ஊ"], ["எ", "ஐ"], ["ஒ", "க"], ["ங", "ச"], "ஜ", ["ஞ", "ட"], ["ண", "த"], ["ந", "ப"], ["ம", "ஹ"], "ௐ", ["௦", "௯"], ["అ", "ఌ"], ["ఎ", "ఐ"], ["ఒ", "న"], ["ప", "ళ"], ["వ", "హ"], "ఽ", ["ౘ", "ౙ"], ["ౠ", "ౡ"], ["౦", "౯"], ["ಅ", "ಌ"], ["ಎ", "ಐ"], ["ಒ", "ನ"], ["ಪ", "ಳ"], ["ವ", "ಹ"], "ಽ", "ೞ", ["ೠ", "ೡ"], ["೦", "೯"], ["ೱ", "ೲ"], ["അ", "ഌ"], ["എ", "ഐ"], ["ഒ", "ഺ"], "ഽ", "ൎ", ["ൠ", "ൡ"], ["൦", "൯"], ["ൺ", "ൿ"], ["අ", "ඖ"], ["ක", "න"], ["ඳ", "ර"], "ල", ["ව", "ෆ"], ["ก", "ะ"], ["า", "ำ"], ["เ", "ๆ"], ["๐", "๙"], ["ກ", "ຂ"], "ຄ", ["ງ", "ຈ"], "ຊ", "ຍ", ["ດ", "ທ"], ["ນ", "ຟ"], ["ມ", "ຣ"], "ລ", "ວ", ["ສ", "ຫ"], ["ອ", "ະ"], ["າ", "ຳ"], "ຽ", ["ເ", "ໄ"], "ໆ", ["໐", "໙"], ["ໜ", "ໟ"], "ༀ", ["༠", "༩"], ["ཀ", "ཇ"], ["ཉ", "ཬ"], ["ྈ", "ྌ"], ["က", "ဪ"], ["ဿ", "၉"], ["ၐ", "ၕ"], ["ၚ", "ၝ"], "ၡ", ["ၥ", "ၦ"], ["ၮ", "ၰ"], ["ၵ", "ႁ"], "ႎ", ["႐", "႙"], ["Ⴀ", "Ⴥ"], "Ⴧ", "Ⴭ", ["ა", "ჺ"], ["ჼ", "ቈ"], ["ቊ", "ቍ"], ["ቐ", "ቖ"], "ቘ", ["ቚ", "ቝ"], ["በ", "ኈ"], ["ኊ", "ኍ"], ["ነ", "ኰ"], ["ኲ", "ኵ"], ["ኸ", "ኾ"], "ዀ", ["ዂ", "ዅ"], ["ወ", "ዖ"], ["ዘ", "ጐ"], ["ጒ", "ጕ"], ["ጘ", "ፚ"], ["ᎀ", "ᎏ"], ["Ꭰ", "Ᏼ"], ["ᐁ", "ᙬ"], ["ᙯ", "ᙿ"], ["ᚁ", "ᚚ"], ["ᚠ", "ᛪ"], ["ᛮ", "ᛰ"], ["ᜀ", "ᜌ"], ["ᜎ", "ᜑ"], ["ᜠ", "ᜱ"], ["ᝀ", "ᝑ"], ["ᝠ", "ᝬ"], ["ᝮ", "ᝰ"], ["ក", "ឳ"], "ៗ", "ៜ", ["០", "៩"], ["᠐", "᠙"], ["ᠠ", "ᡷ"], ["ᢀ", "ᢨ"], "ᢪ", ["ᢰ", "ᣵ"], ["ᤀ", "ᤜ"], ["᥆", "ᥭ"], ["ᥰ", "ᥴ"], ["ᦀ", "ᦫ"], ["ᧁ", "ᧇ"], ["᧐", "᧙"], ["ᨀ", "ᨖ"], ["ᨠ", "ᩔ"], ["᪀", "᪉"], ["᪐", "᪙"], "ᪧ", ["ᬅ", "ᬳ"], ["ᭅ", "ᭋ"], ["᭐", "᭙"], ["ᮃ", "ᮠ"], ["ᮮ", "ᯥ"], ["ᰀ", "ᰣ"], ["᱀", "᱉"], ["ᱍ", "ᱽ"], ["ᳩ", "ᳬ"], ["ᳮ", "ᳱ"], ["ᳵ", "ᳶ"], ["ᴀ", "ᶿ"], ["Ḁ", "ἕ"], ["Ἐ", "Ἕ"], ["ἠ", "ὅ"], ["Ὀ", "Ὅ"], ["ὐ", "ὗ"], "Ὑ", "Ὓ", "Ὕ", ["Ὗ", "ώ"], ["ᾀ", "ᾴ"], ["ᾶ", "ᾼ"], "ι", ["ῂ", "ῄ"], ["ῆ", "ῌ"], ["ῐ", "ΐ"], ["ῖ", "Ί"], ["ῠ", "Ῥ"], ["ῲ", "ῴ"], ["ῶ", "ῼ"], "ⁱ", "ⁿ", ["ₐ", "ₜ"], "ℂ", "ℇ", ["ℊ", "ℓ"], "ℕ", ["ℙ", "ℝ"], "ℤ", "Ω", "ℨ", ["K", "ℭ"], ["ℯ", "ℹ"], ["ℼ", "ℿ"], ["ⅅ", "ⅉ"], "ⅎ", ["Ⅰ", "ↈ"], ["Ⰰ", "Ⱞ"], ["ⰰ", "ⱞ"], ["Ⱡ", "ⳤ"], ["Ⳬ", "ⳮ"], ["Ⳳ", "ⳳ"], ["ⴀ", "ⴥ"], "ⴧ", "ⴭ", ["ⴰ", "ⵧ"], "ⵯ", ["ⶀ", "ⶖ"], ["ⶠ", "ⶦ"], ["ⶨ", "ⶮ"], ["ⶰ", "ⶶ"], ["ⶸ", "ⶾ"], ["ⷀ", "ⷆ"], ["ⷈ", "ⷎ"], ["ⷐ", "ⷖ"], ["ⷘ", "ⷞ"], "ⸯ", ["々", "〇"], ["〡", "〩"], ["〱", "〵"], ["〸", "〼"], ["ぁ", "ゖ"], ["ゝ", "ゟ"], ["ァ", "ヺ"], ["ー", "ヿ"], ["ㄅ", "ㄭ"], ["ㄱ", "ㆎ"], ["ㆠ", "ㆺ"], ["ㇰ", "ㇿ"], ["㐀", "䶵"], ["一", "鿌"], ["ꀀ", "ꒌ"], ["ꓐ", "ꓽ"], ["ꔀ", "ꘌ"], ["ꘐ", "ꘫ"], ["Ꙁ", "ꙮ"], ["ꙿ", "ꚗ"], ["ꚠ", "ꛯ"], ["ꜗ", "ꜟ"], ["Ꜣ", "ꞈ"], ["Ꞌ", "ꞎ"], ["Ꞑ", "ꞓ"], ["Ꞡ", "Ɦ"], ["ꟸ", "ꠁ"], ["ꠃ", "ꠅ"], ["ꠇ", "ꠊ"], ["ꠌ", "ꠢ"], ["ꡀ", "ꡳ"], ["ꢂ", "ꢳ"], ["꣐", "꣙"], ["ꣲ", "ꣷ"], "ꣻ", ["꤀", "ꤥ"], ["ꤰ", "ꥆ"], ["ꥠ", "ꥼ"], ["ꦄ", "ꦲ"], ["ꧏ", "꧙"], ["ꨀ", "ꨨ"], ["ꩀ", "ꩂ"], ["ꩄ", "ꩋ"], ["꩐", "꩙"], ["ꩠ", "ꩶ"], "ꩺ", ["ꪀ", "ꪯ"], "ꪱ", ["ꪵ", "ꪶ"], ["ꪹ", "ꪽ"], "ꫀ", "ꫂ", ["ꫛ", "ꫝ"], ["ꫠ", "ꫪ"], ["ꫲ", "ꫴ"], ["ꬁ", "ꬆ"], ["ꬉ", "ꬎ"], ["ꬑ", "ꬖ"], ["ꬠ", "ꬦ"], ["ꬨ", "ꬮ"], ["ꯀ", "ꯢ"], ["꯰", "꯹"], ["가", "힣"], ["ힰ", "ퟆ"], ["ퟋ", "ퟻ"], ["豈", "舘"], ["並", "龎"], ["ff", "st"], ["ﬓ", "ﬗ"], "יִ", ["ײַ", "ﬨ"], ["שׁ", "זּ"], ["טּ", "לּ"], "מּ", ["נּ", "סּ"], ["ףּ", "פּ"], ["צּ", "ﮱ"], ["ﯓ", "ﴽ"], ["ﵐ", "ﶏ"], ["ﶒ", "ﷇ"], ["ﷰ", "ﷻ"], ["ﹰ", "ﹴ"], ["ﹶ", "ﻼ"], ["0", "9"], ["A", "Z"], ["a", "z"], ["ヲ", "ᄒ"], ["ᅡ", "ᅦ"], ["ᅧ", "ᅬ"], ["ᅭ", "ᅲ"], ["ᅳ", "ᅵ"]], !1, !1, !1), Ku = Se("NUMBER"), Qu = x("-", !1), Ke = x(".", !1), ne = V([["0", "9"]], !1, !1, !1), et = x("<", !1), ut = x(">", !1), Qe = V(["<", ">"], !1, !1, !1), eu = x("\\", !1), tt = x(`
185
- `, !1), uu = V([[" ", `
186
- `], "\r", " "], !1, !1, !1), st = V([`
187
- `, "\r"], !1, !1, !1), nt = V([" ", " "], !1, !1, !1);
188
- function Ns(e) {
189
- return e;
190
- }
191
- function Ls(e) {
192
- return e;
193
- }
194
- function Rs(e) {
195
- return e;
196
- }
197
- function Is(e) {
198
- return e;
199
- }
200
- function ks(e) {
201
- return e;
202
- }
203
- function Ms(e) {
204
- return e;
205
- }
206
- function Ps(e) {
207
- return e;
208
- }
209
- function js(e) {
210
- return e;
211
- }
212
- function Gs(e) {
213
- return e;
214
- }
215
- function Us(e) {
216
- return e;
217
- }
218
- function rt(e, t, n) {
219
- return R.createElement("Dot", {}, [...e, t, ...n]);
220
- }
221
- function it(e, t, n, r) {
222
- const i = !!e, m = t.toLowerCase() === "digraph";
223
- for (const Z of ze)
224
- m ? Z.operator !== "->" && $e(`In digraph, it's necessary to describe with "->" operator to create edge.`, Z.location) : Z.operator !== "--" && $e(`In graph, it's necessary to describe with "--" operator to create edge.`, Z.location);
225
- return R.createElement(
226
- "Graph",
227
- n !== null ? {
228
- id: n,
229
- directed: m,
230
- strict: i
231
- } : {
232
- directed: m,
233
- strict: i
234
- },
235
- r
236
- );
237
- }
238
- function ot(e) {
239
- return R.createElement(
240
- "Attribute",
241
- {
242
- ...e
243
- },
244
- []
245
- );
246
- }
247
- function at(e, t) {
248
- return R.createElement(
249
- "AttributeList",
250
- {
251
- kind: `${e.slice(0, 1).toUpperCase()}${e.slice(1).toLowerCase()}`
252
- },
253
- t
254
- );
255
- }
256
- function lt(e, t, n) {
257
- return R.createElement(
258
- // @ts-ignore
259
- "Edge",
260
- {
261
- targets: [e, ...t]
262
- },
263
- n ?? []
264
- );
265
- }
266
- function ct(e, t) {
267
- return R.createElement(
268
- "Node",
269
- {
270
- id: e
271
- },
272
- t ?? []
273
- );
274
- }
275
- function ft(e, t) {
276
- return { key: e, value: t };
277
- }
278
- function At(e) {
279
- return R.createElement(
280
- "Attribute",
281
- {
282
- ...e,
283
- location: me()
284
- },
285
- []
286
- );
287
- }
288
- function zs(e) {
289
- return e;
290
- }
291
- function tu(e, t) {
292
- return t;
293
- }
294
- function pt(e, t) {
295
- return R.createElement("NodeRefGroup", {}, [e, ...t]);
296
- }
297
- function gt(e) {
298
- return { operator: e, location: me() };
299
- }
300
- function su(e, t) {
301
- return { edgeop: e, id: t, loc: me() };
302
- }
303
- function dt(e) {
304
- if (e.length > He) {
305
- const t = e[e.length - He - 1].loc;
306
- $e(
307
- `Edge chain depth exceeds maximum allowed depth of ${He} at line ${t.start.line}, column ${t.start.column}. Consider breaking up long edge chains or increasing the 'maxEdgeChainDepth' option.`,
308
- {
309
- source: t.source,
310
- start: t.start,
311
- end: e[e.length - 1].loc.end
312
- }
313
- );
314
- }
315
- for (let t = e.length - 1; t >= 0; t--)
316
- ze.push(e[t].edgeop);
317
- return e.map((t) => t.id);
318
- }
319
- function ht(e, t) {
320
- return R.createElement(
321
- "NodeRef",
322
- {
323
- id: e,
324
- ...t
325
- },
326
- []
327
- );
328
- }
329
- function Ft(e, t) {
330
- return t;
331
- }
332
- function Et(e, t) {
333
- return ["n", "ne", "e", "se", "s", "sw", "w", "nw"].includes(e) ? { compass: e } : t ? { port: e, compass: t } : { port: e };
334
- }
335
- function Hs(e) {
336
- return e;
337
- }
338
- function Dt(e, t) {
339
- const n = t ?? [];
340
- return R.createElement("Subgraph", e ? { id: e } : {}, n);
341
- }
342
- function Ct(e) {
343
- return { value: e, quoted: !1 };
344
- }
345
- function Bt(e) {
346
- return { value: e, quoted: !0 };
347
- }
348
- function mt(e) {
349
- return R.createElement(
350
- "Literal",
351
- {
352
- ...e
353
- },
354
- []
355
- );
356
- }
357
- function $t(e) {
358
- return R.createElement(
359
- "Literal",
360
- {
361
- value: e,
362
- quoted: !1
363
- },
364
- []
365
- );
366
- }
367
- function qs(e) {
368
- return e;
369
- }
370
- function bt(e) {
371
- return R.createElement(
372
- "Comment",
373
- {
374
- kind: "Block",
375
- value: Ue(e.join("").replace(/^[ \t]*\*/gm, ""))
376
- },
377
- []
378
- );
379
- }
380
- function _t(e) {
381
- return R.createElement(
382
- "Comment",
383
- {
384
- kind: "Slash",
385
- value: Ue(e.join(`
386
- `))
387
- },
388
- []
389
- );
390
- }
391
- function Xs(e) {
392
- return e;
393
- }
394
- function wt(e) {
395
- return e.join("");
396
- }
397
- function Tt(e) {
398
- return R.createElement(
399
- "Comment",
400
- {
401
- kind: "Macro",
402
- value: Ue(e.join(`
403
- `))
404
- },
405
- []
406
- );
407
- }
408
- function Vs(e) {
409
- return e;
410
- }
411
- function xt(e) {
412
- return e.join("");
413
- }
414
- function vt(e, t) {
415
- return e + t.join("");
416
- }
417
- function yt(e, t) {
418
- return e + t;
419
- }
420
- function Ot(e) {
421
- return nu();
422
- }
423
- function St(e) {
424
- return R.createElement(
425
- "Literal",
426
- {
427
- value: e.slice(1, e.length - 1),
428
- quoted: "html"
429
- },
430
- []
431
- );
432
- }
433
- function Nt() {
434
- return we >= Cu && $e(`HTML nesting depth exceeds maximum allowed depth of ${Cu}`), we++, !0;
435
- }
436
- function Lt(e) {
437
- return we--, "<" + e.join("") + ">";
438
- }
439
- function Ys(e) {
440
- return e;
441
- }
442
- function Rt(e) {
443
- return e.join("");
444
- }
445
- function It(e) {
446
- return R.createElement(
447
- "Literal",
448
- {
449
- value: e.join(""),
450
- quoted: !0
451
- },
452
- []
453
- );
454
- }
455
- function kt() {
456
- return nu();
457
- }
458
- function Mt(e) {
459
- return e[1] === '"' ? '"' : e[0] + e[1];
460
- }
461
- function Pt() {
462
- return "";
463
- }
464
- let s = h.peg$currPos | 0, g = s;
465
- const re = [{ line: 1, column: 1 }];
466
- let z = s, Be = h.peg$maxFailExpected || [], a = h.peg$silentFails | 0, fe;
467
- if (h.startRule) {
468
- if (!(h.startRule in F))
469
- throw new Error(`Can't start parsing from rule "` + h.startRule + '".');
470
- d = F[h.startRule];
471
- }
472
- function nu() {
473
- return o.substring(g, s);
474
- }
475
- function me() {
476
- return be(g, s);
477
- }
478
- function $e(e, t) {
479
- throw t = t !== void 0 ? t : be(g, s), zt(e, t);
480
- }
481
- function jt(e = s) {
482
- const t = o.codePointAt(e);
483
- return t === void 0 ? "" : String.fromCodePoint(t);
484
- }
485
- function x(e, t) {
486
- return { type: "literal", text: e, ignoreCase: t };
487
- }
488
- function V(e, t, n, r) {
489
- return { type: "class", parts: e, inverted: t, ignoreCase: n, unicode: r };
490
- }
491
- function Gt() {
492
- return { type: "any" };
493
- }
494
- function Ut() {
495
- return { type: "end" };
496
- }
497
- function Se(e) {
498
- return { type: "other", description: e };
499
- }
500
- function ru(e) {
501
- let t = re[e], n;
502
- if (t)
503
- return t;
504
- if (e >= re.length)
505
- n = re.length - 1;
506
- else
507
- for (n = e; !re[--n]; )
508
- ;
509
- for (t = re[n], t = {
510
- line: t.line,
511
- column: t.column
512
- }; n < e; )
513
- o.charCodeAt(n) === 10 ? (t.line++, t.column = 1) : t.column++, n++;
514
- return re[e] = t, t;
515
- }
516
- function be(e, t, n) {
517
- const r = ru(e), i = ru(t);
518
- return {
519
- source: $,
520
- start: {
521
- offset: e,
522
- line: r.line,
523
- column: r.column
524
- },
525
- end: {
526
- offset: t,
527
- line: i.line,
528
- column: i.column
529
- }
530
- };
531
- }
532
- function p(e) {
533
- s < z || (s > z && (z = s, Be = []), Be.push(e));
534
- }
535
- function zt(e, t) {
536
- return new xe(e, null, null, t);
537
- }
538
- function Ht(e, t, n) {
539
- return new xe(
540
- xe.buildMessage(e, t),
541
- e,
542
- t,
543
- n
544
- );
545
- }
546
- function iu() {
547
- let e, t;
548
- return e = s, O(), t = qt(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
549
- }
550
- function ou() {
551
- let e, t;
552
- return e = s, O(), t = Xt(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
553
- }
554
- function Ne() {
555
- let e, t;
556
- return e = s, O(), t = Wt(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
557
- }
558
- function Le() {
559
- let e, t;
560
- return e = s, O(), t = Yt(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
561
- }
562
- function Re() {
563
- let e, t;
564
- return e = s, O(), t = Vt(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
565
- }
566
- function Ie() {
567
- let e, t;
568
- return e = s, O(), t = Zt(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
569
- }
570
- function ke() {
571
- let e, t;
572
- return e = s, O(), t = ss(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
573
- }
574
- function _e() {
575
- let e, t;
576
- return e = s, O(), t = es(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
577
- }
578
- function au() {
579
- let e, t;
580
- return e = s, O(), t = Jt(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
581
- }
582
- function Y() {
583
- let e, t;
584
- return e = s, O(), t = rs(), t !== u ? (O(), g = e, e = t) : (s = e, e = u), e;
585
- }
586
- function Me() {
587
- let e, t;
588
- for (e = [], t = Re(), t === u && (t = Le(), t === u && (t = Ie(), t === u && (t = ke(), t === u && (t = Ne(), t === u && (t = Y()))))); t !== u; )
589
- e.push(t), t = Re(), t === u && (t = Le(), t === u && (t = Ie(), t === u && (t = ke(), t === u && (t = Ne(), t === u && (t = Y())))));
590
- return e;
591
- }
592
- function qt() {
593
- let e, t, n, r, i;
594
- for (e = s, t = [], n = Y(); n !== u; )
595
- t.push(n), n = Y();
596
- if (n = ou(), n !== u) {
597
- for (r = [], i = Y(); i !== u; )
598
- r.push(i), i = Y();
599
- g = e, e = rt(t, n, r);
600
- } else
601
- s = e, e = u;
602
- return e;
603
- }
604
- function Xt() {
605
- let e, t, n, r, i, A, m;
606
- return e = s, t = o.substr(s, 6), t.toLowerCase() === y ? s += 6 : (t = u, a === 0 && p(Tu)), t === u && (t = null), S(), n = o.substr(s, 5), n.toLowerCase() === v ? s += 5 : (n = u, a === 0 && p(We)), n === u && (n = o.substr(s, 7), n.toLowerCase() === j ? s += 7 : (n = u, a === 0 && p(xu))), n !== u ? (S(), r = K(), r === u && (r = null), O(), o.charCodeAt(s) === 123 ? (i = M, s++) : (i = u, a === 0 && p(ve)), i !== u ? (A = Me(), O(), o.charCodeAt(s) === 125 ? (m = k, s++) : (m = u, a === 0 && p(ye)), m !== u ? (g = e, e = it(t, n, r, A)) : (s = e, e = u)) : (s = e, e = u)) : (s = e, e = u), e;
607
- }
608
- function Vt() {
609
- let e, t;
610
- return e = s, t = lu(), t !== u ? (S(), o.charCodeAt(s) === 59 ? s++ : a === 0 && p(De), g = e, e = ot(t)) : (s = e, e = u), e;
611
- }
612
- function Yt() {
613
- let e, t, n;
614
- return e = s, t = o.substr(s, 5), t.toLowerCase() === v ? s += 5 : (t = u, a === 0 && p(We)), t === u && (t = o.substr(s, 4), t.toLowerCase() === U ? s += 4 : (t = u, a === 0 && p(vu)), t === u && (t = o.substr(s, 4), t.toLowerCase() === C ? s += 4 : (t = u, a === 0 && p(yu)))), t !== u ? (n = Pe(), n !== u ? (S(), o.charCodeAt(s) === 59 ? s++ : a === 0 && p(De), g = e, e = at(t, n)) : (s = e, e = u)) : (s = e, e = u), e;
615
- }
616
- function Zt() {
617
- let e, t, n, r;
618
- return e = s, t = je(), t !== u ? (n = Qt(), n !== u ? (r = Pe(), r === u && (r = null), S(), o.charCodeAt(s) === 59 ? s++ : a === 0 && p(De), g = e, e = lt(t, n, r)) : (s = e, e = u)) : (s = e, e = u), e;
619
- }
620
- function Wt() {
621
- let e, t, n;
622
- return e = s, t = K(), t !== u ? (S(), n = Pe(), n === u && (n = null), S(), o.charCodeAt(s) === 59 ? s++ : a === 0 && p(De), g = e, e = ct(t, n)) : (s = e, e = u), e;
623
- }
624
- function lu() {
625
- let e, t, n, r;
626
- return e = s, t = K(), t !== u ? (S(), o.charCodeAt(s) === 61 ? (n = w, s++) : (n = u, a === 0 && p(Ou)), n !== u ? (S(), r = K(), r !== u ? (g = e, e = ft(t, r)) : (s = e, e = u)) : (s = e, e = u)) : (s = e, e = u), e;
627
- }
628
- function Jt() {
629
- let e, t, n;
630
- return e = s, t = lu(), t !== u ? (S(), n = o.charAt(s), I.test(n) ? s++ : (n = u, a === 0 && p(Ce)), n === u && (n = null), g = e, e = At(t)) : (s = e, e = u), e;
631
- }
632
- function Pe() {
633
- let e, t, n, r, i;
634
- if (e = s, S(), o.charCodeAt(s) === 91 ? (t = N, s++) : (t = u, a === 0 && p(Su)), t !== u) {
635
- for (n = [], r = au(), r === u && (r = Y()); r !== u; )
636
- n.push(r), r = au(), r === u && (r = Y());
637
- r = O(), o.charCodeAt(s) === 93 ? (i = P, s++) : (i = u, a === 0 && p(Nu)), i !== u ? (g = e, e = n) : (s = e, e = u);
638
- } else
639
- s = e, e = u;
640
- return e;
641
- }
642
- function Kt() {
643
- let e, t, n, r, i, A, m;
644
- if (e = s, o.charCodeAt(s) === 123 ? (t = M, s++) : (t = u, a === 0 && p(ve)), t !== u)
645
- if (n = _e(), n !== u) {
646
- for (r = [], i = s, A = o.charAt(s), I.test(A) ? s++ : (A = u, a === 0 && p(Ce)), A === u && (A = null), m = _e(), m !== u ? (g = i, i = tu(n, m)) : (s = i, i = u); i !== u; )
647
- r.push(i), i = s, A = o.charAt(s), I.test(A) ? s++ : (A = u, a === 0 && p(Ce)), A === u && (A = null), m = _e(), m !== u ? (g = i, i = tu(n, m)) : (s = i, i = u);
648
- i = o.charAt(s), I.test(i) ? s++ : (i = u, a === 0 && p(Ce)), i === u && (i = null), A = O(), o.charCodeAt(s) === 125 ? (m = k, s++) : (m = u, a === 0 && p(ye)), m !== u ? (g = e, e = pt(n, r)) : (s = e, e = u);
649
- } else
650
- s = e, e = u;
651
- else
652
- s = e, e = u;
653
- return e;
654
- }
655
- function je() {
656
- let e;
657
- return e = Kt(), e === u && (e = _e()), e;
658
- }
659
- function cu() {
660
- let e, t;
661
- return e = s, o.substr(s, 2) === Q ? (t = Q, s += 2) : (t = u, a === 0 && p(Lu)), t === u && (o.substr(s, 2) === oe ? (t = oe, s += 2) : (t = u, a === 0 && p(Ru))), t !== u && (g = e, t = gt(t)), e = t, e;
662
- }
663
- function Qt() {
664
- let e, t, n, r, i;
665
- if (e = s, t = [], n = s, S(), r = cu(), r !== u ? (S(), i = je(), i !== u ? (S(), g = n, n = su(r, i)) : (s = n, n = u)) : (s = n, n = u), n !== u)
666
- for (; n !== u; )
667
- t.push(n), n = s, S(), r = cu(), r !== u ? (S(), i = je(), i !== u ? (S(), g = n, n = su(r, i)) : (s = n, n = u)) : (s = n, n = u);
668
- else
669
- t = u;
670
- return t !== u && (g = e, t = dt(t)), e = t, e;
671
- }
672
- function es() {
673
- let e, t, n;
674
- return e = s, t = K(), t !== u ? (n = us(), n === u && (n = null), g = e, e = ht(t, n)) : (s = e, e = u), e;
675
- }
676
- function us() {
677
- let e, t, n, r, i, A;
678
- return a++, e = s, o.charCodeAt(s) === 58 ? (t = ge, s++) : (t = u, a === 0 && p(Je)), t !== u ? (n = K(), n !== u ? (r = s, o.charCodeAt(s) === 58 ? (i = ge, s++) : (i = u, a === 0 && p(Je)), i !== u ? (A = ns(), A !== u ? (g = r, r = Ft(n, A)) : (s = r, r = u)) : (s = r, r = u), r === u && (r = null), g = e, e = Et(n, r)) : (s = e, e = u)) : (s = e, e = u), a--, e === u && (t = u, a === 0 && p(Iu)), e;
679
- }
680
- function ts() {
681
- let e, t, n;
682
- return e = s, t = o.substr(s, 8), t.toLowerCase() === de ? s += 8 : (t = u, a === 0 && p(ku)), t !== u ? (S(), n = K(), n === u && (n = null), S(), g = e, e = n) : (s = e, e = u), e;
683
- }
684
- function ss() {
685
- let e, t, n, r, i;
686
- return e = s, t = ts(), t === u && (t = null), o.charCodeAt(s) === 123 ? (n = M, s++) : (n = u, a === 0 && p(ve)), n !== u ? (r = Me(), r === u && (r = null), O(), o.charCodeAt(s) === 125 ? (i = k, s++) : (i = u, a === 0 && p(ye)), i !== u ? (g = e, e = Dt(t, r)) : (s = e, e = u)) : (s = e, e = u), e;
687
- }
688
- function fu() {
689
- let e;
690
- return o.charCodeAt(s) === 110 ? (e = he, s++) : (e = u, a === 0 && p(Mu)), e === u && (o.substr(s, 2) === Fe ? (e = Fe, s += 2) : (e = u, a === 0 && p(Pu)), e === u && (o.charCodeAt(s) === 101 ? (e = ee, s++) : (e = u, a === 0 && p(ju)), e === u && (o.substr(s, 2) === J ? (e = J, s += 2) : (e = u, a === 0 && p(Gu)), e === u && (o.charCodeAt(s) === 115 ? (e = Ee, s++) : (e = u, a === 0 && p(Uu)), e === u && (o.substr(s, 2) === ae ? (e = ae, s += 2) : (e = u, a === 0 && p(zu)), e === u && (o.charCodeAt(s) === 119 ? (e = ue, s++) : (e = u, a === 0 && p(Hu)), e === u && (o.substr(s, 2) === le ? (e = le, s += 2) : (e = u, a === 0 && p(qu))))))))), e;
691
- }
692
- function ns() {
693
- let e, t, n, r, i;
694
- return e = s, t = s, n = fu(), n !== u && (g = t, n = Ct(n)), t = n, t === u && (t = s, o.charCodeAt(s) === 34 ? (n = f, s++) : (n = u, a === 0 && p(ce)), n !== u ? (r = fu(), r !== u ? (o.charCodeAt(s) === 34 ? (i = f, s++) : (i = u, a === 0 && p(ce)), i !== u ? (g = t, t = Bt(r)) : (s = t, t = u)) : (s = t, t = u)) : (s = t, t = u)), t !== u && (g = e, t = mt(t)), e = t, e;
695
- }
696
- function K() {
697
- let e, t;
698
- return e = As(), e === u && (e = fs(), e === u && (e = s, t = gu(), t === u && (t = ls(), t === u && (t = hu())), t !== u && (g = e, t = $t(t)), e = t)), e;
699
- }
700
- function rs() {
701
- let e;
702
- return e = is(), e === u && (e = os(), e === u && (e = as())), e;
703
- }
704
- function is() {
705
- let e, t, n, r, i, A;
706
- if (e = s, o.substr(s, 2) === l ? (t = l, s += 2) : (t = u, a === 0 && p(Xu)), t !== u) {
707
- for (n = [], r = s, i = s, a++, o.substr(s, 2) === c ? (A = c, s += 2) : (A = u, a === 0 && p(Oe)), a--, A === u ? i = void 0 : (s = i, i = u), i !== u ? (o.length > s ? (A = o.charAt(s), s++) : (A = u, a === 0 && p(q)), A !== u ? (g = r, r = A) : (s = r, r = u)) : (s = r, r = u); r !== u; )
708
- n.push(r), r = s, i = s, a++, o.substr(s, 2) === c ? (A = c, s += 2) : (A = u, a === 0 && p(Oe)), a--, A === u ? i = void 0 : (s = i, i = u), i !== u ? (o.length > s ? (A = o.charAt(s), s++) : (A = u, a === 0 && p(q)), A !== u ? (g = r, r = A) : (s = r, r = u)) : (s = r, r = u);
709
- o.substr(s, 2) === c ? (r = c, s += 2) : (r = u, a === 0 && p(Oe)), r !== u ? (g = e, e = bt(n)) : (s = e, e = u);
710
- } else
711
- s = e, e = u;
712
- return e;
713
- }
714
- function os() {
715
- let e, t, n;
716
- if (e = s, t = [], n = Au(), n !== u)
717
- for (; n !== u; )
718
- t.push(n), n = Au();
719
- else
720
- t = u;
721
- return t !== u && (g = e, t = _t(t)), e = t, e;
722
- }
723
- function Au() {
724
- let e, t, n, r, i, A;
725
- if (e = s, S(), o.substr(s, 2) === D ? (t = D, s += 2) : (t = u, a === 0 && p(Vu)), t !== u) {
726
- for (n = [], r = s, i = s, a++, A = ie(), a--, A === u ? i = void 0 : (s = i, i = u), i !== u ? (o.length > s ? (A = o.charAt(s), s++) : (A = u, a === 0 && p(q)), A !== u ? (g = r, r = A) : (s = r, r = u)) : (s = r, r = u); r !== u; )
727
- n.push(r), r = s, i = s, a++, A = ie(), a--, A === u ? i = void 0 : (s = i, i = u), i !== u ? (o.length > s ? (A = o.charAt(s), s++) : (A = u, a === 0 && p(q)), A !== u ? (g = r, r = A) : (s = r, r = u)) : (s = r, r = u);
728
- r = ie(), r === u && (r = null), g = e, e = wt(n);
729
- } else
730
- s = e, e = u;
731
- return e;
732
- }
733
- function as() {
734
- let e, t, n;
735
- if (e = s, t = [], n = pu(), n !== u)
736
- for (; n !== u; )
737
- t.push(n), n = pu();
738
- else
739
- t = u;
740
- return t !== u && (g = e, t = Tt(t)), e = t, e;
741
- }
742
- function pu() {
743
- let e, t, n, r, i, A;
744
- if (e = s, S(), o.charCodeAt(s) === 35 ? (t = E, s++) : (t = u, a === 0 && p(Yu)), t !== u) {
745
- for (n = [], r = s, i = s, a++, A = ie(), a--, A === u ? i = void 0 : (s = i, i = u), i !== u ? (o.length > s ? (A = o.charAt(s), s++) : (A = u, a === 0 && p(q)), A !== u ? (g = r, r = A) : (s = r, r = u)) : (s = r, r = u); r !== u; )
746
- n.push(r), r = s, i = s, a++, A = ie(), a--, A === u ? i = void 0 : (s = i, i = u), i !== u ? (o.length > s ? (A = o.charAt(s), s++) : (A = u, a === 0 && p(q)), A !== u ? (g = r, r = A) : (s = r, r = u)) : (s = r, r = u);
747
- r = ie(), r === u && (r = null), g = e, e = xt(n);
748
- } else
749
- s = e, e = u;
750
- return e;
751
- }
752
- function gu() {
753
- let e, t, n, r;
754
- if (a++, e = s, t = cs(), t !== u) {
755
- for (n = [], r = du(); r !== u; )
756
- n.push(r), r = du();
757
- g = e, e = vt(t, n);
758
- } else
759
- s = e, e = u;
760
- return a--, e === u && (t = u, a === 0 && p(Zu)), e;
761
- }
762
- function ls() {
763
- let e, t, n;
764
- return e = s, t = hu(), t !== u ? (n = gu(), n !== u ? (g = e, e = yt(t, n)) : (s = e, e = u)) : (s = e, e = u), e;
765
- }
766
- function cs() {
767
- let e;
768
- return e = o.charAt(s), H.test(e) ? s++ : (e = u, a === 0 && p(Wu)), e;
769
- }
770
- function du() {
771
- let e;
772
- return e = o.charAt(s), te.test(e) ? s++ : (e = u, a === 0 && p(Ju)), e;
773
- }
774
- function hu() {
775
- let e, t, n, r, i, A, m, Z, W;
776
- if (a++, e = s, t = s, o.charCodeAt(s) === 45 ? (n = T, s++) : (n = u, a === 0 && p(Qu)), n === u && (n = null), r = s, o.charCodeAt(s) === 46 ? (i = B, s++) : (i = u, a === 0 && p(Ke)), i !== u) {
777
- if (A = [], m = o.charAt(s), se.test(m) ? s++ : (m = u, a === 0 && p(ne)), m !== u)
778
- for (; m !== u; )
779
- A.push(m), m = o.charAt(s), se.test(m) ? s++ : (m = u, a === 0 && p(ne));
780
- else
781
- A = u;
782
- A !== u ? (i = [i, A], r = i) : (s = r, r = u);
783
- } else
784
- s = r, r = u;
785
- if (r === u) {
786
- if (r = s, i = [], A = o.charAt(s), se.test(A) ? s++ : (A = u, a === 0 && p(ne)), A !== u)
787
- for (; A !== u; )
788
- i.push(A), A = o.charAt(s), se.test(A) ? s++ : (A = u, a === 0 && p(ne));
789
- else
790
- i = u;
791
- if (i !== u) {
792
- if (A = s, o.charCodeAt(s) === 46 ? (m = B, s++) : (m = u, a === 0 && p(Ke)), m !== u) {
793
- for (Z = [], W = o.charAt(s), se.test(W) ? s++ : (W = u, a === 0 && p(ne)); W !== u; )
794
- Z.push(W), W = o.charAt(s), se.test(W) ? s++ : (W = u, a === 0 && p(ne));
795
- m = [m, Z], A = m;
796
- } else
797
- s = A, A = u;
798
- A === u && (A = null), i = [i, A], r = i;
799
- } else
800
- s = r, r = u;
801
- }
802
- return r !== u ? (n = [n, r], t = n) : (s = t, t = u), t !== u && (g = e, t = Ot()), e = t, a--, e === u && (t = u, a === 0 && p(Ku)), e;
803
- }
804
- function fs() {
805
- let e, t;
806
- return e = s, t = Ge(), t !== u && (g = e, t = St(t)), e = t, e;
807
- }
808
- function Ge() {
809
- let e, t, n, r, i;
810
- if (e = s, o.charCodeAt(s) === 60 ? (t = _, s++) : (t = u, a === 0 && p(et)), t !== u)
811
- if (g = s, n = Nt(), n ? n = void 0 : n = u, n !== u) {
812
- for (r = [], i = Fu(), i === u && (i = Ge()); i !== u; )
813
- r.push(i), i = Fu(), i === u && (i = Ge());
814
- o.charCodeAt(s) === 62 ? (i = b, s++) : (i = u, a === 0 && p(ut)), i !== u ? (g = e, e = Lt(r)) : (s = e, e = u);
815
- } else
816
- s = e, e = u;
817
- else
818
- s = e, e = u;
819
- return e;
820
- }
821
- function Fu() {
822
- let e, t, n, r, i;
823
- if (e = s, t = [], n = s, r = s, a++, i = o.charAt(s), Ye.test(i) ? s++ : (i = u, a === 0 && p(Qe)), a--, i === u ? r = void 0 : (s = r, r = u), r !== u ? (o.length > s ? (i = o.charAt(s), s++) : (i = u, a === 0 && p(q)), i !== u ? (g = n, n = i) : (s = n, n = u)) : (s = n, n = u), n !== u)
824
- for (; n !== u; )
825
- t.push(n), n = s, r = s, a++, i = o.charAt(s), Ye.test(i) ? s++ : (i = u, a === 0 && p(Qe)), a--, i === u ? r = void 0 : (s = r, r = u), r !== u ? (o.length > s ? (i = o.charAt(s), s++) : (i = u, a === 0 && p(q)), i !== u ? (g = n, n = i) : (s = n, n = u)) : (s = n, n = u);
826
- else
827
- t = u;
828
- return t !== u && (g = e, t = Rt(t)), e = t, e;
829
- }
830
- function As() {
831
- let e, t, n, r;
832
- if (e = s, o.charCodeAt(s) === 34 ? (t = f, s++) : (t = u, a === 0 && p(ce)), t !== u) {
833
- for (n = [], r = Eu(); r !== u; )
834
- n.push(r), r = Eu();
835
- o.charCodeAt(s) === 34 ? (r = f, s++) : (r = u, a === 0 && p(ce)), r !== u ? (g = e, e = It(n)) : (s = e, e = u);
836
- } else
837
- s = e, e = u;
838
- return e;
839
- }
840
- function Eu() {
841
- let e, t, n;
842
- return e = gs(), e === u && (e = ps(), e === u && (e = s, t = s, a++, o.charCodeAt(s) === 34 ? (n = f, s++) : (n = u, a === 0 && p(ce)), a--, n === u ? t = void 0 : (s = t, t = u), t !== u ? (n = ds(), n !== u ? (g = e, e = kt()) : (s = e, e = u)) : (s = e, e = u))), e;
843
- }
844
- function ps() {
845
- let e, t, n, r;
846
- return e = s, t = s, o.charCodeAt(s) === 92 ? (n = L, s++) : (n = u, a === 0 && p(eu)), n !== u ? (o.length > s ? (r = o.charAt(s), s++) : (r = u, a === 0 && p(q)), r !== u ? (n = [n, r], t = n) : (s = t, t = u)) : (s = t, t = u), t !== u && (g = e, t = Mt(t)), e = t, e;
847
- }
848
- function gs() {
849
- let e, t, n;
850
- return e = s, o.charCodeAt(s) === 92 ? (t = L, s++) : (t = u, a === 0 && p(eu)), t !== u ? (o.charCodeAt(s) === 10 ? (n = X, s++) : (n = u, a === 0 && p(tt)), n !== u ? (g = e, e = Pt()) : (s = e, e = u)) : (s = e, e = u), e;
851
- }
852
- function ds() {
853
- let e;
854
- return o.length > s ? (e = o.charAt(s), s++) : (e = u, a === 0 && p(q)), e;
855
- }
856
- function S() {
857
- let e, t;
858
- for (a++, e = [], t = Du(); t !== u; )
859
- e.push(t), t = Du();
860
- return a--, e;
861
- }
862
- function O() {
863
- let e, t;
864
- for (a++, e = [], t = o.charAt(s), Ze.test(t) ? s++ : (t = u, a === 0 && p(uu)); t !== u; )
865
- e.push(t), t = o.charAt(s), Ze.test(t) ? s++ : (t = u, a === 0 && p(uu));
866
- return a--, e;
867
- }
868
- function ie() {
869
- let e;
870
- return e = o.charAt(s), _u.test(e) ? s++ : (e = u, a === 0 && p(st)), e;
871
- }
872
- function Du() {
873
- let e;
874
- return e = o.charAt(s), wu.test(e) ? s++ : (e = u, a === 0 && p(nt)), e;
875
- }
876
- function Ue(e) {
877
- const t = e.trim(), n = t.match(/\n([\t ]+|(?!\s).)/g);
878
- if (n) {
879
- const r = n.map((m) => m.match(/[\t ]/g)?.length ?? 0);
880
- let i = 1 / 0;
881
- for (const m of r) m < i && (i = m);
882
- const A = new RegExp(`
883
- [ ]{${i}}`, "g");
884
- return t.replace(A, `
885
- `);
886
- }
887
- return t;
888
- }
889
- const ze = [], Cu = h.maxHtmlNestingDepth ?? 100, He = h.maxEdgeChainDepth ?? 1e3;
890
- let we = 0;
891
- const R = new bu({
892
- locationFunction: me,
893
- maxASTNodes: h.maxASTNodes
894
- });
895
- function hs() {
896
- R.resetNodeCount(), we = 0, ze.length = 0;
897
- }
898
- hs(), fe = d();
899
- const qe = fe !== u && s === o.length;
900
- function Bu() {
901
- throw fe !== u && s < o.length && p(Ut()), Ht(
902
- Be,
903
- z < o.length ? jt(z) : null,
904
- z < o.length ? be(z, z + 1) : be(z, z)
905
- );
906
- }
907
- if (h.peg$library)
908
- return (
909
- /** @type {any} */
910
- {
911
- peg$result: fe,
912
- peg$currPos: s,
913
- peg$FAILED: u,
914
- peg$maxFailExpected: Be,
915
- peg$maxFailPos: z,
916
- peg$success: qe,
917
- peg$throw: qe ? void 0 : Bu
918
- }
919
- );
920
- if (qe)
921
- return fe;
922
- Bu();
923
- }
924
- function ws(o, h) {
925
- const u = o.length;
926
- let $ = 0, F = 0;
927
- for (; F < u; ) {
928
- const d = o[F];
929
- if (d === '"') {
930
- for (F++; F < u && o[F] !== '"'; ) F += o[F] === "\\" ? 2 : 1;
931
- F++;
932
- } else if (d === "<") {
933
- let y = 1;
934
- for (F++; F < u && y > 0; )
935
- o[F] === "<" ? y++ : o[F] === ">" && y--, F++;
936
- } else if (d === "/" && o[F + 1] === "*") {
937
- const y = o.indexOf("*/", F + 2);
938
- F = y === -1 ? u : y + 2;
939
- } else if (d === "#" || d === "/" && o[F + 1] === "/")
940
- for (F++; F < u && o[F] !== `
941
- ` && o[F] !== "\r"; ) F++;
942
- else {
943
- if (d === "{") {
944
- if ($++, $ > h) return F;
945
- } else d === "}" && $--;
946
- F++;
947
- }
948
- }
949
- return -1;
950
- }
951
- const Ts = 10 * 1024 * 1024, xs = 100;
952
- function vs(o, h) {
953
- const {
954
- startRule: u,
955
- filename: $,
956
- maxHtmlNestingDepth: F,
957
- maxEdgeChainDepth: d,
958
- maxInputSize: y,
959
- maxASTNodes: v,
960
- maxNestingDepth: j
961
- } = mu(h), M = y ?? Ts;
962
- if (M > 0) {
963
- const C = new TextEncoder().encode(o).length;
964
- if (C > M)
965
- throw new Ae(
966
- `Input size (${C} bytes) exceeds maximum allowed size (${M} bytes). Consider increasing 'maxInputSize' option or reducing the input size.`
967
- );
968
- }
969
- const k = j ?? xs, U = ws(o, k);
970
- if (U !== -1) {
971
- const C = o.slice(0, U), w = C.split(`
972
- `).length, N = U - C.lastIndexOf(`
973
- `);
974
- throw new Ae(
975
- `Nesting depth exceeds maximum allowed depth of ${k} (line ${w}, column ${N}). Consider increasing the 'maxNestingDepth' option.`
976
- );
977
- }
978
- try {
979
- return _s(o, {
980
- __proto__: null,
981
- startRule: u,
982
- filename: $,
983
- maxHtmlNestingDepth: F,
984
- maxEdgeChainDepth: d,
985
- maxASTNodes: v
986
- });
987
- } catch (C) {
988
- throw C instanceof xe ? new Ae(C.message, {
989
- cause: C
990
- }) : C instanceof $u ? new Ae(C.message, {
991
- cause: C
992
- }) : C instanceof RangeError ? new Ae(
993
- "The input is nested too deeply to parse. Consider lowering the depth of the input.",
994
- { cause: C }
995
- ) : new Error("Unexpected parse error", {
996
- cause: C
997
- });
998
- }
999
- }
1000
- class Ae extends SyntaxError {
1001
- constructor(...h) {
1002
- super(...h), this.name = "DotSyntaxError";
1003
- }
1004
- }
1005
- const ys = {
1006
- none: "none",
1007
- normal: "arrow",
1008
- vee: "arrow",
1009
- open: "arrow",
1010
- onormal: "open-triangle",
1011
- empty: "open-triangle",
1012
- diamond: "diamond",
1013
- odiamond: "open-diamond",
1014
- dot: "circle"
1015
- }, Ve = (o) => new Map(
1016
- o.filter((h) => h.type === "Attribute").map((h) => [h.key.value, h.value])
1017
- ), pe = (o, h) => new Map([...o, ...h]), G = (o, h) => o.get(h)?.value, Os = /* @__PURE__ */ new Set(["strict", "graph", "digraph", "subgraph", "node", "edge"]);
1018
- function Js(o, h = "Imported DOT") {
1019
- const u = Ss(o, h);
1020
- if (!u.nativeSource) return u;
1021
- try {
1022
- return Fs(u.nativeSource), u;
1023
- } catch ($) {
1024
- return {
1025
- ...u,
1026
- status: "failed",
1027
- nativeSource: void 0,
1028
- facts: void 0,
1029
- diagnostics: [
1030
- ...u.diagnostics,
1031
- {
1032
- code: "IMPORT_NATIVE_INVALID",
1033
- severity: "error",
1034
- impact: "semantics",
1035
- message: "The converted diagram cannot be represented in native source: " + ($ instanceof Error ? $.message : String($))
1036
- }
1037
- ]
1038
- };
1039
- }
1040
- }
1041
- function Ss(o, h) {
1042
- const u = Bs(h), $ = new Ds(), F = Es(o), d = (f, l, c = "warning", D = "semantics", E, T) => F.push({
1043
- code: f,
1044
- message: l,
1045
- severity: c,
1046
- impact: D,
1047
- ...E ? { line: E } : {},
1048
- ...T ? { foreignIds: T } : {}
1049
- }), y = () => Cs("dot", "graph", u, F, $);
1050
- if (F.length) return y();
1051
- let v;
1052
- try {
1053
- const f = vs(o, {
1054
- maxInputSize: Xe.sourceBytes,
1055
- maxASTNodes: 2e4,
1056
- maxNestingDepth: 24,
1057
- maxEdgeChainDepth: 1200,
1058
- maxHtmlNestingDepth: 32
1059
- }), l = f.children.filter((c) => c.type === "Graph");
1060
- if (l.length !== 1 || f.children.some((c) => c.type !== "Graph" && c.type !== "Comment"))
1061
- return d("DOT_ONE_GRAPH", "Select exactly one graph; no statements may be outside it.", "error"), y();
1062
- v = l[0];
1063
- } catch (f) {
1064
- const l = f, c = l.cause?.location?.start;
1065
- return F.push({
1066
- code: "DOT_PARSE_REJECTED",
1067
- severity: "error",
1068
- impact: "syntax",
1069
- message: "The supported DOT grammar rejected this input: " + (l.message ?? String(f)) + " Some valid DOT forms (string concatenation, repeated attribute lists, full subgraph endpoints) are outside this parser profile.",
1070
- ...c?.line ? { line: c.line } : {},
1071
- ...c?.column ? { column: c.column } : {}
1072
- }), y();
1073
- }
1074
- const j = (f) => {
1075
- if (!f || typeof f != "object") return;
1076
- if (Array.isArray(f)) {
1077
- f.forEach(j);
1078
- return;
1079
- }
1080
- const l = f;
1081
- if (l.type === "Literal" && l.quoted === !1 && typeof l.value == "string" && Os.has(l.value.toLowerCase())) {
1082
- const c = f;
1083
- d(
1084
- c.value.toLowerCase() === "subgraph" ? "DOT_PARSER_DIALECT" : "DOT_RESERVED_ID",
1085
- "An unquoted DOT keyword was parsed as an identifier: " + c.value + ". Quote actual identifiers; full subgraph edge operands are outside this parser profile.",
1086
- "error",
1087
- "syntax",
1088
- c.location?.start.line
1089
- );
1090
- }
1091
- for (const c of Object.values(l)) j(c);
1092
- };
1093
- if (j(v), F.some((f) => f.severity === "error")) return y();
1094
- const M = (f, l) => {
1095
- if (!f) return l;
1096
- const c = f.value.toLowerCase();
1097
- return c === "false" || c === "0" ? !1 : c === "true" || c === "1" ? !0 : (d(
1098
- "DOT_BOOLEAN",
1099
- "Unsupported boolean spelling in this profile: " + f.value + ". Use true, false, 1 or 0.",
1100
- "error",
1101
- "semantics",
1102
- f.location?.start.line
1103
- ), l);
1104
- }, k = /* @__PURE__ */ new Map(), U = [], C = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), P = { graph: /* @__PURE__ */ new Map(), node: /* @__PURE__ */ new Map(), edge: /* @__PURE__ */ new Map() }, Q = [P], oe = v.id?.value ?? "G";
1105
- let ge = 0;
1106
- const de = (f, l) => {
1107
- const c = f.id.value;
1108
- let D = k.get(c);
1109
- return D || (D = { name: c, attrs: new Map(l.node), clusters: /* @__PURE__ */ new Set() }, k.set(c, D)), l.cluster && D.clusters.add(l.cluster), D;
1110
- }, he = (f, l, c = 1) => {
1111
- if (c > 24) {
1112
- d("DOT_DEPTH", "DOT scope nesting exceeds this profile.", "error", "limit");
1113
- return;
1114
- }
1115
- for (const D of f) {
1116
- if (F.some((E) => E.severity === "error")) return;
1117
- switch (D.type) {
1118
- case "Comment":
1119
- break;
1120
- case "Attribute":
1121
- l.graph.set(D.key.value, D.value);
1122
- break;
1123
- case "AttributeList": {
1124
- const E = D.kind === "Node" ? l.node : D.kind === "Edge" ? l.edge : l.graph;
1125
- for (const [T, B] of Ve(D.children)) E.set(T, B);
1126
- break;
1127
- }
1128
- case "Node": {
1129
- const E = de(D, l);
1130
- E.attrs = pe(E.attrs, Ve(D.children));
1131
- break;
1132
- }
1133
- case "Subgraph": {
1134
- const E = D.id?.value;
1135
- let T = E ? w.get(E) : void 0;
1136
- if (!T)
1137
- T = {
1138
- name: E,
1139
- cluster: E?.startsWith("cluster") ? E : l.cluster,
1140
- parentCluster: l.cluster,
1141
- graph: new Map(l.graph),
1142
- node: new Map(l.node),
1143
- edge: new Map(l.edge)
1144
- }, Q.push(T), E && w.set(E, T), E?.startsWith("cluster") && N.set(E, T);
1145
- else if (T.parentCluster !== l.cluster) {
1146
- d(
1147
- "DOT_SUBGRAPH_REPARENT",
1148
- "A reopened subgraph has incompatible containing clusters.",
1149
- "error",
1150
- "semantics",
1151
- D.location?.start.line
1152
- );
1153
- break;
1154
- }
1155
- he(D.children, T, c + 1);
1156
- break;
1157
- }
1158
- case "Edge": {
1159
- const E = D.targets.map(
1160
- (_) => _.type === "NodeRef" ? [_] : [
1161
- ...new Map(
1162
- _.children.map((b) => [
1163
- b.id.value,
1164
- { ...b, port: void 0, compass: void 0 }
1165
- ])
1166
- ).values()
1167
- ]
1168
- ), T = Ve(D.children), B = (_, b) => {
1169
- const L = /* @__PURE__ */ new Map();
1170
- for (const [X, I] of [
1171
- ["tailport", _],
1172
- ["headport", b]
1173
- ]) {
1174
- const H = I.port ?? I.compass;
1175
- H && L.set(X, {
1176
- ...H,
1177
- value: I.port && I.compass ? I.port.value + ":" + I.compass.value : H.value
1178
- });
1179
- }
1180
- return L;
1181
- };
1182
- for (const _ of E) for (const b of _) de(b, l);
1183
- for (let _ = 0; _ < E.length - 1; _++)
1184
- for (const b of E[_])
1185
- for (const L of E[_ + 1]) {
1186
- if (++ge > Xe.edges) {
1187
- d(
1188
- "DOT_EXPANSION_LIMIT",
1189
- "Edge-chain/set expansion exceeds 1,200 candidate edges.",
1190
- "error",
1191
- "limit",
1192
- D.location?.start.line
1193
- );
1194
- return;
1195
- }
1196
- const X = v.directed ? [b.id.value, L.id.value] : [b.id.value, L.id.value].sort(), I = JSON.stringify(X), H = v.strict ? C.get(I) : void 0;
1197
- if (H) {
1198
- const te = H.a.id.value === b.id.value ? B(b, L) : B(L, b);
1199
- H.attrs = pe(H.attrs, pe(te, T));
1200
- } else {
1201
- const te = {
1202
- a: b,
1203
- b: L,
1204
- attrs: pe(l.edge, pe(B(b, L), T)),
1205
- line: D.location?.start.line
1206
- };
1207
- U.push(te), v.strict && C.set(I, te);
1208
- }
1209
- }
1210
- break;
1211
- }
1212
- }
1213
- if (k.size + N.size > Xe.objects) {
1214
- d(
1215
- "DOT_OBJECT_LIMIT",
1216
- "Expanded graph exceeds 500 native nodes plus groups.",
1217
- "error",
1218
- "limit"
1219
- );
1220
- return;
1221
- }
1222
- }
1223
- };
1224
- he(v.children, P);
1225
- for (const f of Q)
1226
- f === P || f.name?.startsWith("cluster") || M(f.graph.get("cluster"), !1) && d(
1227
- "DOT_CLUSTER_ATTRIBUTE",
1228
- "cluster=true on a non-prefix or anonymous subgraph requires a separate cluster mapper; it is not flattened.",
1229
- "error",
1230
- "semantics",
1231
- f.graph.get("cluster")?.location?.start.line
1232
- );
1233
- if (F.some((f) => f.severity === "error")) return y();
1234
- const Fe = (f) => {
1235
- const l = /* @__PURE__ */ new Set();
1236
- let c = N.get(f)?.parentCluster;
1237
- for (; c; ) {
1238
- if (l.has(c)) {
1239
- d("DOT_CLUSTER_CYCLE", "Cluster membership is cyclic.", "error");
1240
- break;
1241
- }
1242
- l.add(c), c = N.get(c)?.parentCluster;
1243
- }
1244
- return l;
1245
- }, ee = (f, l, c = {}) => {
1246
- const D = (_) => {
1247
- /&(?:#[xX][0-9a-fA-F]+|#[0-9]+|[A-Za-z][A-Za-z0-9]*);/.test(_) && d(
1248
- "DOT_LABEL_ENTITY",
1249
- "Graphviz character entities need a verified text decoder; entity text is not imported literally.",
1250
- "error",
1251
- "semantics",
1252
- f?.location?.start.line
1253
- );
1254
- }, E = (_) => (_.includes("\\") && d(
1255
- "DOT_ESCAPED_ID_LABEL",
1256
- "An escaped identifier used as label text needs Graphviz label expansion; it is not imported as a literal default label.",
1257
- "error",
1258
- "semantics",
1259
- f?.location?.start.line
1260
- ), _);
1261
- if (!f)
1262
- return c.node !== void 0 && E(l), D(l), l;
1263
- if (f.quoted === "html")
1264
- return d(
1265
- "DOT_HTML_LABEL",
1266
- "HTML-like labels need a compartment/text mapper; they are not silently stripped.",
1267
- "error",
1268
- "semantics",
1269
- f.location?.start.line
1270
- ), l;
1271
- const T = f.value;
1272
- let B = "";
1273
- for (let _ = 0; _ < T.length; _++) {
1274
- if (T[_] !== "\\" || _ === T.length - 1) {
1275
- B += T[_];
1276
- continue;
1277
- }
1278
- const b = T[++_];
1279
- b === "\\" ? B += "\\" : b === "n" || b === "l" || b === "r" ? (B += `
1280
- `, b !== "n" && d(
1281
- "DOT_TEXT_ALIGNMENT",
1282
- "Left/right line alignment becomes a centered native line break.",
1283
- "warning",
1284
- "appearance",
1285
- f.location?.start.line
1286
- )) : b === "N" && c.node !== void 0 ? B += E(c.node) : b === "G" ? (!c.graph && !v.id && d(
1287
- "DOT_ANONYMOUS_GRAPH_NAME",
1288
- "The graph-name escape in an anonymous graph depends on Graphviz-generated naming; name the graph explicitly.",
1289
- "error",
1290
- "semantics",
1291
- f.location?.start.line
1292
- ), B += E(c.graph ?? oe)) : b === "T" && c.a !== void 0 ? B += E(c.a) : b === "H" && c.b !== void 0 ? B += E(c.b) : b === "E" && c.a !== void 0 ? B += E(c.a) + (v.directed ? "->" : "--") + E(c.b) : b === `
1293
- ` || (B += b, d(
1294
- "DOT_ESCAPE",
1295
- "A nonportable DOT escape was simplified: \\" + b,
1296
- "warning",
1297
- "appearance",
1298
- f.location?.start.line
1299
- ));
1300
- }
1301
- return D(B), B;
1302
- }, J = (f, l, c) => {
1303
- for (const [D, E] of f) {
1304
- if (l.includes(D)) continue;
1305
- const T = [
1306
- "image",
1307
- "shapefile",
1308
- "imagepath",
1309
- "fontpath",
1310
- "stylesheet",
1311
- "href",
1312
- "URL",
1313
- "target"
1314
- ].includes(D);
1315
- d(
1316
- T ? "DOT_RESOURCE_OMITTED" : "DOT_ATTRIBUTE_OMITTED",
1317
- c + ": " + D + " is not mapped" + (T ? "; no resource was loaded or link activated." : "."),
1318
- "warning",
1319
- T ? "security" : "appearance",
1320
- E.location?.start.line,
1321
- [c]
1322
- );
1323
- }
1324
- }, Ee = (f, l) => {
1325
- const c = G(l, "shape") ?? "ellipse", D = (G(l, "style") ?? "").split(",").map((B) => B.trim());
1326
- if (f.kind === "node") {
1327
- const B = {
1328
- box: "box",
1329
- rect: "box",
1330
- rectangle: "box",
1331
- circle: "circle",
1332
- diamond: "diamond",
1333
- plaintext: "text",
1334
- plain: "text",
1335
- none: "text"
1336
- };
1337
- c === "record" || c === "Mrecord" ? d("DOT_RECORD", "Record fields/ports need a cells mapper.", "error", "semantics") : B[c] ? f.shape = B[c] : (f.shape = ["ellipse", "oval"].includes(c) ? "pill" : "box", d(
1338
- "DOT_SHAPE",
1339
- "Shape " + c + " becomes " + f.shape + ".",
1340
- "warning",
1341
- "appearance",
1342
- l.get("shape")?.location?.start.line,
1343
- [f.id]
1344
- )), D.includes("rounded") && f.shape === "box" && (f.shape = "pill", d("DOT_ROUNDED", "Rounded rectangle becomes the native pill.", "warning", "appearance"));
1345
- }
1346
- D.includes("invis") && d(
1347
- "DOT_INVISIBLE",
1348
- "Invisible objects need an explicit visibility policy; refusing a visible substitute.",
1349
- "error"
1350
- );
1351
- for (const B of D.filter((_) => _ && _ !== "filled" && _ !== "rounded" && _ !== "invis"))
1352
- d("DOT_OBJECT_STYLE", "Object style " + B + " is omitted.", "warning", "appearance");
1353
- const E = ["fillcolor", "color", "fontcolor"].map((B) => G(l, B));
1354
- for (let B = 0; B < E.length; B++)
1355
- E[B] && !Te(E[B]) && d(
1356
- "DOT_COLOR",
1357
- "Only explicit hex colors are mapped in this profile: " + E[B],
1358
- "warning",
1359
- "appearance"
1360
- );
1361
- const T = D.includes("filled") ? Te(E[0]) : void 0;
1362
- E[0] && !D.includes("filled") && d(
1363
- "DOT_INACTIVE_FILL",
1364
- "fillcolor without filled style is not applied.",
1365
- "info",
1366
- "appearance"
1367
- ), ms(u, f, T, Te(E[1]), Te(E[2]));
1368
- };
1369
- u.title = ee(P.graph.get("label"), v.id?.value ?? h);
1370
- for (const [f, l] of N) {
1371
- const c = {
1372
- kind: "group",
1373
- id: $.get("group", f),
1374
- label: ee(l.graph.get("label"), "", { graph: f })
1375
- };
1376
- l.parentCluster && (c.parent = $.get("group", l.parentCluster)), Ee(c, l.graph), J(
1377
- l.graph,
1378
- [
1379
- "label",
1380
- "color",
1381
- "fillcolor",
1382
- "fontcolor",
1383
- "style",
1384
- "rankdir",
1385
- "compound",
1386
- "shape",
1387
- "cluster"
1388
- ],
1389
- f
1390
- ), u.objects.push(c);
1391
- }
1392
- for (const f of k.values()) {
1393
- const l = [...f.clusters], c = l.filter(
1394
- (E) => !l.some((T) => T !== E && Fe(T).has(E))
1395
- );
1396
- c.length > 1 && d(
1397
- "DOT_OVERLAPPING_CLUSTERS",
1398
- f.name + " belongs to incompatible clusters; native objects have one parent.",
1399
- "error",
1400
- "semantics",
1401
- void 0,
1402
- [f.name]
1403
- );
1404
- const D = {
1405
- kind: "node",
1406
- id: $.get("node", f.name),
1407
- label: ee(f.attrs.get("label"), f.name, { node: f.name })
1408
- };
1409
- c.length === 1 && (D.parent = $.get("group", c[0])), Ee(D, f.attrs), J(f.attrs, ["label", "shape", "style", "fillcolor", "color", "fontcolor"], f.name), u.objects.push(D);
1410
- }
1411
- const ae = (f, l) => {
1412
- const c = G(f, l);
1413
- if (!c) return;
1414
- const D = {
1415
- n: "top",
1416
- s: "bottom",
1417
- e: "right",
1418
- w: "left"
1419
- };
1420
- if (!["n", "ne", "e", "se", "s", "sw", "w", "nw", "c", "_"].includes(c)) {
1421
- d("DOT_NAMED_PORT", "Named port " + c + " has no native field target.", "error");
1422
- return;
1423
- }
1424
- return !D[c] && c !== "_" && d(
1425
- "DOT_COMPASS",
1426
- "Compass port " + c + " becomes a native automatic boundary attachment.",
1427
- "warning",
1428
- "layout"
1429
- ), D[c];
1430
- };
1431
- for (const [f, l] of U.entries()) {
1432
- const c = G(l.attrs, "dir") ?? (v.directed ? "forward" : "none");
1433
- ["forward", "back", "both", "none"].includes(c) || d(
1434
- "DOT_ARROW_ENDS",
1435
- "dir=" + c + " is not a Graphviz direction.",
1436
- "error",
1437
- "semantics",
1438
- l.line
1439
- );
1440
- const D = (b, L) => {
1441
- if (!L) return "none";
1442
- const X = G(l.attrs, b) ?? "normal", I = ys[X];
1443
- return I || d(
1444
- "DOT_ARROW_SHAPE",
1445
- b + " " + X + " carries notation with no native marker.",
1446
- "error",
1447
- "semantics",
1448
- l.line
1449
- ), I ?? "none";
1450
- }, E = D("arrowhead", c === "forward" || c === "both"), T = D("arrowtail", c === "back" || c === "both"), B = (G(l.attrs, "style") ?? "").split(",").map((b) => b.trim());
1451
- B.includes("invis") && d(
1452
- "DOT_INVISIBLE",
1453
- "Invisible edges cannot become visible semantic edges.",
1454
- "error",
1455
- "semantics",
1456
- l.line
1457
- );
1458
- for (const b of B.filter((L) => L && L !== "dashed" && L !== "invis"))
1459
- d(
1460
- "DOT_EDGE_STYLE",
1461
- "Edge style " + b + " becomes a regular native stroke.",
1462
- "warning",
1463
- "appearance",
1464
- l.line
1465
- );
1466
- const _ = {
1467
- id: $.get("edge", String(f + 1), "edge_" + (f + 1)),
1468
- from: $.get("node", l.a.id.value),
1469
- to: $.get("node", l.b.id.value),
1470
- label: ee(l.attrs.get("label"), "", { a: l.a.id.value, b: l.b.id.value }),
1471
- directed: v.directed,
1472
- ...v.directed ? { head: E, tail: T } : {},
1473
- ...B.includes("dashed") ? { dashed: !0 } : {},
1474
- ...M(l.attrs.get("constraint"), !0) ? {} : { constraint: !1 }
1475
- };
1476
- !v.directed && c !== "none" && d(
1477
- "DOT_GRAPH_ARROWS",
1478
- "Arrows on an undirected DOT graph conflate decoration and direction in the native model.",
1479
- "error",
1480
- "semantics",
1481
- l.line
1482
- ), (G(l.attrs, "lhead") || G(l.attrs, "ltail")) && d(
1483
- "DOT_CLUSTER_ENDPOINT",
1484
- "lhead/ltail clipping is not a semantic group edge; this profile refuses to replace its actual endpoints.",
1485
- "error",
1486
- "semantics",
1487
- l.line
1488
- ), (G(l.attrs, "headlabel") || G(l.attrs, "taillabel")) && d(
1489
- "DOT_ENDPOINT_LABEL",
1490
- "Endpoint labels or cardinality require a native endpoint-label mapping.",
1491
- "error",
1492
- "semantics",
1493
- l.line
1494
- ), _.fromSide = ae(l.attrs, "tailport"), _.toSide = ae(l.attrs, "headport"), J(
1495
- l.attrs,
1496
- [
1497
- "label",
1498
- "style",
1499
- "dir",
1500
- "arrowhead",
1501
- "arrowtail",
1502
- "constraint",
1503
- "tailport",
1504
- "headport",
1505
- "lhead",
1506
- "ltail",
1507
- "headlabel",
1508
- "taillabel"
1509
- ],
1510
- "edge_" + (f + 1)
1511
- ), u.edges.push(_);
1512
- }
1513
- const ue = G(P.graph, "rankdir") ?? "TB";
1514
- ["LR", "TB"].includes(ue) || d(
1515
- "DOT_LAYOUT_DIRECTION",
1516
- "Native layout supports right/down; " + ue + " becomes " + (ue === "RL" ? "right" : "down") + " without reversing edge meaning.",
1517
- "warning",
1518
- "layout"
1519
- );
1520
- const le = ["LR", "RL"].includes(ue) ? "right" : "down";
1521
- u.layouts.push({ scope: "root", kind: "flow", direction: le });
1522
- for (const f of u.objects.filter((l) => l.kind === "group"))
1523
- u.layouts.push({ scope: f.id, kind: "flow", direction: le });
1524
- N.size && d(
1525
- "DOT_CLUSTER_LAYOUT",
1526
- "Each cluster uses native flow with the global rankdir intent; Graphviz ranking and cluster packing are recomputed.",
1527
- "info",
1528
- "layout"
1529
- ), J(P.graph, ["label", "rankdir", "compound"], oe);
1530
- for (const f of Q)
1531
- f !== P && G(f.graph, "rank") && d(
1532
- "DOT_RANK_CONSTRAINT",
1533
- "A subgraph rank constraint is not reproduced by native layout.",
1534
- "warning",
1535
- "layout",
1536
- f.graph.get("rank")?.location?.start.line
1537
- );
1538
- return F.push({
1539
- code: "IMPORT_NATIVE_LAYOUT",
1540
- severity: "info",
1541
- impact: "layout",
1542
- message: "Native layout will compute all geometry; Graphviz positions and routing are not imported."
1543
- }), y();
1544
- }
1545
- export {
1546
- Js as importDot
1547
- };