@graphty/graph-io 0.3.18 → 0.3.20

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 (235) hide show
  1. package/README.md +80 -2
  2. package/dist/chunks/{escape-D-gZWO26.js → escape-B-tkk_Cl.js} +74 -16
  3. package/dist/chunks/escape-B-tkk_Cl.js.map +1 -0
  4. package/dist/chunks/{writer-GAdltGmC.js → export-Bh60Dv-n.js} +7 -252
  5. package/dist/chunks/export-Bh60Dv-n.js.map +1 -0
  6. package/dist/chunks/exporter-BGrsWamJ.js +736 -0
  7. package/dist/chunks/exporter-BGrsWamJ.js.map +1 -0
  8. package/dist/chunks/exporter-DIeGJXAZ.js +834 -0
  9. package/dist/chunks/exporter-DIeGJXAZ.js.map +1 -0
  10. package/dist/chunks/{importer-Br_QeAeE.js → importer-BWY2FFc5.js} +28 -6
  11. package/dist/chunks/importer-BWY2FFc5.js.map +1 -0
  12. package/dist/chunks/importer-BaQpCEcJ.js +2194 -0
  13. package/dist/chunks/importer-BaQpCEcJ.js.map +1 -0
  14. package/dist/chunks/importer-DD-xv9_Y.js +1471 -0
  15. package/dist/chunks/importer-DD-xv9_Y.js.map +1 -0
  16. package/dist/chunks/{importer-aNJfe0qu.js → importer-DEcKhsmQ.js} +2 -2
  17. package/dist/chunks/{importer-aNJfe0qu.js.map → importer-DEcKhsmQ.js.map} +1 -1
  18. package/dist/chunks/{importer-DHagxvDD.js → importer-DIrbbnAf.js} +6 -4
  19. package/dist/chunks/{importer-DHagxvDD.js.map → importer-DIrbbnAf.js.map} +1 -1
  20. package/dist/chunks/importer-D_e7e7LX.js +3055 -0
  21. package/dist/chunks/importer-D_e7e7LX.js.map +1 -0
  22. package/dist/chunks/{importer-Du5crN9l.js → importer-Wv4C4gaF.js} +278 -82
  23. package/dist/chunks/importer-Wv4C4gaF.js.map +1 -0
  24. package/dist/chunks/importer-vi3bSdtw.js +1713 -0
  25. package/dist/chunks/importer-vi3bSdtw.js.map +1 -0
  26. package/dist/chunks/{importer-d0uQxFp6.js → importer-zGLo8Dg_.js} +6 -4
  27. package/dist/chunks/{importer-d0uQxFp6.js.map → importer-zGLo8Dg_.js.map} +1 -1
  28. package/dist/chunks/json-elements-DDS8N2Dd.js +779 -0
  29. package/dist/chunks/json-elements-DDS8N2Dd.js.map +1 -0
  30. package/dist/chunks/{records-Bk9jgodz.js → records-dbRkxwaq.js} +2 -2
  31. package/dist/chunks/{records-Bk9jgodz.js.map → records-dbRkxwaq.js.map} +1 -1
  32. package/dist/chunks/{report-BOk0p5y8.js → report-B1z4WT9e.js} +143 -111
  33. package/dist/chunks/{report-BOk0p5y8.js.map → report-B1z4WT9e.js.map} +1 -1
  34. package/dist/chunks/weights-Dzba96G3.js +176 -0
  35. package/dist/chunks/weights-Dzba96G3.js.map +1 -0
  36. package/dist/chunks/writer-C7flM-Ih.js +77 -0
  37. package/dist/chunks/writer-C7flM-Ih.js.map +1 -0
  38. package/dist/csv.js +6 -4
  39. package/dist/csv.js.map +1 -1
  40. package/dist/cx.d.ts +1 -0
  41. package/dist/cx.js +6 -0
  42. package/dist/cx.js.map +1 -0
  43. package/dist/cx2.d.ts +1 -0
  44. package/dist/cx2.js +10 -0
  45. package/dist/cx2.js.map +1 -0
  46. package/dist/cys.d.ts +1 -0
  47. package/dist/cys.js +6 -0
  48. package/dist/cys.js.map +1 -0
  49. package/dist/dot.js +1 -1
  50. package/dist/gexf.js +16 -4
  51. package/dist/gexf.js.map +1 -1
  52. package/dist/gml.js +13 -14
  53. package/dist/gml.js.map +1 -1
  54. package/dist/graph-io.js +302 -399
  55. package/dist/graph-io.js.map +1 -1
  56. package/dist/graphml.js +1 -1
  57. package/dist/json.js +1 -1
  58. package/dist/neo4j.js +6 -4
  59. package/dist/neo4j.js.map +1 -1
  60. package/dist/obo.js +1 -1
  61. package/dist/pajek.js +1 -1
  62. package/dist/src/common/cell-budget.d.ts +84 -0
  63. package/dist/src/common/cell-budget.d.ts.map +1 -0
  64. package/dist/src/common/cell-budget.js +138 -0
  65. package/dist/src/common/cell-budget.js.map +1 -0
  66. package/dist/src/common/input.d.ts +10 -0
  67. package/dist/src/common/input.d.ts.map +1 -1
  68. package/dist/src/common/input.js +39 -0
  69. package/dist/src/common/input.js.map +1 -1
  70. package/dist/src/common/json-elements.d.ts +286 -0
  71. package/dist/src/common/json-elements.d.ts.map +1 -0
  72. package/dist/src/common/json-elements.js +926 -0
  73. package/dist/src/common/json-elements.js.map +1 -0
  74. package/dist/src/common/options.d.ts +6 -0
  75. package/dist/src/common/options.d.ts.map +1 -1
  76. package/dist/src/common/options.js +1 -1
  77. package/dist/src/common/options.js.map +1 -1
  78. package/dist/src/common/xml.d.ts +37 -3
  79. package/dist/src/common/xml.d.ts.map +1 -1
  80. package/dist/src/common/xml.js +86 -6
  81. package/dist/src/common/xml.js.map +1 -1
  82. package/dist/src/common/zip.d.ts +92 -0
  83. package/dist/src/common/zip.d.ts.map +1 -0
  84. package/dist/src/common/zip.js +399 -0
  85. package/dist/src/common/zip.js.map +1 -0
  86. package/dist/src/formats/cx/importer.d.ts +133 -0
  87. package/dist/src/formats/cx/importer.d.ts.map +1 -0
  88. package/dist/src/formats/cx/importer.js +2220 -0
  89. package/dist/src/formats/cx/importer.js.map +1 -0
  90. package/dist/src/formats/cx/index.d.ts +7 -0
  91. package/dist/src/formats/cx/index.d.ts.map +1 -0
  92. package/dist/src/formats/cx/index.js +7 -0
  93. package/dist/src/formats/cx/index.js.map +1 -0
  94. package/dist/src/formats/cx2/exporter.d.ts +59 -0
  95. package/dist/src/formats/cx2/exporter.d.ts.map +1 -0
  96. package/dist/src/formats/cx2/exporter.js +864 -0
  97. package/dist/src/formats/cx2/exporter.js.map +1 -0
  98. package/dist/src/formats/cx2/importer.d.ts +169 -0
  99. package/dist/src/formats/cx2/importer.d.ts.map +1 -0
  100. package/dist/src/formats/cx2/importer.js +1652 -0
  101. package/dist/src/formats/cx2/importer.js.map +1 -0
  102. package/dist/src/formats/cx2/index.d.ts +7 -0
  103. package/dist/src/formats/cx2/index.d.ts.map +1 -0
  104. package/dist/src/formats/cx2/index.js +7 -0
  105. package/dist/src/formats/cx2/index.js.map +1 -0
  106. package/dist/src/formats/cys/constants.d.ts +68 -0
  107. package/dist/src/formats/cys/constants.d.ts.map +1 -0
  108. package/dist/src/formats/cys/constants.js +76 -0
  109. package/dist/src/formats/cys/constants.js.map +1 -0
  110. package/dist/src/formats/cys/importer.d.ts +38 -0
  111. package/dist/src/formats/cys/importer.d.ts.map +1 -0
  112. package/dist/src/formats/cys/importer.js +830 -0
  113. package/dist/src/formats/cys/importer.js.map +1 -0
  114. package/dist/src/formats/cys/index.d.ts +7 -0
  115. package/dist/src/formats/cys/index.d.ts.map +1 -0
  116. package/dist/src/formats/cys/index.js +7 -0
  117. package/dist/src/formats/cys/index.js.map +1 -0
  118. package/dist/src/formats/cys/session.d.ts +132 -0
  119. package/dist/src/formats/cys/session.d.ts.map +1 -0
  120. package/dist/src/formats/cys/session.js +315 -0
  121. package/dist/src/formats/cys/session.js.map +1 -0
  122. package/dist/src/formats/cys/tables.d.ts +90 -0
  123. package/dist/src/formats/cys/tables.d.ts.map +1 -0
  124. package/dist/src/formats/cys/tables.js +293 -0
  125. package/dist/src/formats/cys/tables.js.map +1 -0
  126. package/dist/src/formats/dot/exporter.d.ts +2 -0
  127. package/dist/src/formats/dot/exporter.d.ts.map +1 -1
  128. package/dist/src/formats/dot/exporter.js +12 -0
  129. package/dist/src/formats/dot/exporter.js.map +1 -1
  130. package/dist/src/formats/dot/importer.js +6 -2
  131. package/dist/src/formats/dot/importer.js.map +1 -1
  132. package/dist/src/formats/gexf/exporter.d.ts +2 -0
  133. package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
  134. package/dist/src/formats/gexf/exporter.js +6 -0
  135. package/dist/src/formats/gexf/exporter.js.map +1 -1
  136. package/dist/src/formats/gexf/importer.d.ts +0 -2
  137. package/dist/src/formats/gexf/importer.d.ts.map +1 -1
  138. package/dist/src/formats/gexf/importer.js +1 -3
  139. package/dist/src/formats/gexf/importer.js.map +1 -1
  140. package/dist/src/formats/gexf/index.d.ts +1 -1
  141. package/dist/src/formats/gexf/index.js +2 -2
  142. package/dist/src/formats/gexf/index.js.map +1 -1
  143. package/dist/src/formats/gml/exporter.d.ts +0 -8
  144. package/dist/src/formats/gml/exporter.d.ts.map +1 -1
  145. package/dist/src/formats/gml/exporter.js +8 -18
  146. package/dist/src/formats/gml/exporter.js.map +1 -1
  147. package/dist/src/formats/json/importer.d.ts.map +1 -1
  148. package/dist/src/formats/json/importer.js +6 -104
  149. package/dist/src/formats/json/importer.js.map +1 -1
  150. package/dist/src/formats/xgmml/columns.d.ts +152 -0
  151. package/dist/src/formats/xgmml/columns.d.ts.map +1 -0
  152. package/dist/src/formats/xgmml/columns.js +593 -0
  153. package/dist/src/formats/xgmml/columns.js.map +1 -0
  154. package/dist/src/formats/xgmml/constants.d.ts +196 -0
  155. package/dist/src/formats/xgmml/constants.d.ts.map +1 -0
  156. package/dist/src/formats/xgmml/constants.js +197 -0
  157. package/dist/src/formats/xgmml/constants.js.map +1 -0
  158. package/dist/src/formats/xgmml/document.d.ts +361 -0
  159. package/dist/src/formats/xgmml/document.d.ts.map +1 -0
  160. package/dist/src/formats/xgmml/document.js +695 -0
  161. package/dist/src/formats/xgmml/document.js.map +1 -0
  162. package/dist/src/formats/xgmml/emit.d.ts +341 -0
  163. package/dist/src/formats/xgmml/emit.d.ts.map +1 -0
  164. package/dist/src/formats/xgmml/emit.js +1275 -0
  165. package/dist/src/formats/xgmml/emit.js.map +1 -0
  166. package/dist/src/formats/xgmml/exporter.d.ts +24 -0
  167. package/dist/src/formats/xgmml/exporter.d.ts.map +1 -0
  168. package/dist/src/formats/xgmml/exporter.js +999 -0
  169. package/dist/src/formats/xgmml/exporter.js.map +1 -0
  170. package/dist/src/formats/xgmml/importer.d.ts +58 -0
  171. package/dist/src/formats/xgmml/importer.d.ts.map +1 -0
  172. package/dist/src/formats/xgmml/importer.js +360 -0
  173. package/dist/src/formats/xgmml/importer.js.map +1 -0
  174. package/dist/src/formats/xgmml/index.d.ts +8 -0
  175. package/dist/src/formats/xgmml/index.d.ts.map +1 -0
  176. package/dist/src/formats/xgmml/index.js +8 -0
  177. package/dist/src/formats/xgmml/index.js.map +1 -0
  178. package/dist/src/formats/xgmml/values.d.ts +60 -0
  179. package/dist/src/formats/xgmml/values.d.ts.map +1 -0
  180. package/dist/src/formats/xgmml/values.js +148 -0
  181. package/dist/src/formats/xgmml/values.js.map +1 -0
  182. package/dist/src/index.d.ts +4 -0
  183. package/dist/src/index.d.ts.map +1 -1
  184. package/dist/src/index.js +4 -0
  185. package/dist/src/index.js.map +1 -1
  186. package/dist/src/registry.d.ts +7 -0
  187. package/dist/src/registry.d.ts.map +1 -1
  188. package/dist/src/registry.js +30 -10
  189. package/dist/src/registry.js.map +1 -1
  190. package/dist/src/sniff.d.ts +1 -1
  191. package/dist/src/sniff.d.ts.map +1 -1
  192. package/dist/src/sniff.js +4 -0
  193. package/dist/src/sniff.js.map +1 -1
  194. package/dist/xgmml.d.ts +1 -0
  195. package/dist/xgmml.js +9 -0
  196. package/dist/xgmml.js.map +1 -0
  197. package/package.json +25 -2
  198. package/src/common/cell-budget.ts +170 -0
  199. package/src/common/input.ts +40 -0
  200. package/src/common/json-elements.ts +1147 -0
  201. package/src/common/options.ts +1 -1
  202. package/src/common/xml.ts +127 -6
  203. package/src/common/zip.ts +472 -0
  204. package/src/formats/cx/importer.ts +2733 -0
  205. package/src/formats/cx/index.ts +7 -0
  206. package/src/formats/cx2/exporter.ts +1036 -0
  207. package/src/formats/cx2/importer.ts +2187 -0
  208. package/src/formats/cx2/index.ts +7 -0
  209. package/src/formats/cys/constants.ts +99 -0
  210. package/src/formats/cys/importer.ts +1100 -0
  211. package/src/formats/cys/index.ts +7 -0
  212. package/src/formats/cys/session.ts +428 -0
  213. package/src/formats/cys/tables.ts +400 -0
  214. package/src/formats/dot/exporter.ts +17 -0
  215. package/src/formats/dot/importer.ts +6 -2
  216. package/src/formats/gexf/exporter.ts +11 -0
  217. package/src/formats/gexf/importer.ts +1 -2
  218. package/src/formats/gexf/index.ts +1 -1
  219. package/src/formats/gml/exporter.ts +8 -19
  220. package/src/formats/json/importer.ts +6 -105
  221. package/src/formats/xgmml/columns.ts +747 -0
  222. package/src/formats/xgmml/constants.ts +265 -0
  223. package/src/formats/xgmml/document.ts +975 -0
  224. package/src/formats/xgmml/emit.ts +1563 -0
  225. package/src/formats/xgmml/exporter.ts +1215 -0
  226. package/src/formats/xgmml/importer.ts +491 -0
  227. package/src/formats/xgmml/index.ts +8 -0
  228. package/src/formats/xgmml/values.ts +183 -0
  229. package/src/index.ts +19 -0
  230. package/src/registry.ts +46 -15
  231. package/src/sniff.ts +18 -1
  232. package/dist/chunks/escape-D-gZWO26.js.map +0 -1
  233. package/dist/chunks/importer-Br_QeAeE.js.map +0 -1
  234. package/dist/chunks/importer-Du5crN9l.js.map +0 -1
  235. package/dist/chunks/writer-GAdltGmC.js.map +0 -1
package/dist/graph-io.js CHANGED
@@ -1,288 +1,173 @@
1
- import { I as ImportReportBuilder, a as throwIfAborted } from "./chunks/report-BOk0p5y8.js";
2
- import { A, b, B, c, d, e, C, f, g, h, D, i, j, k, l, m, n, o, p, q, E, r, s, u, G, H, v, w, x, y, z, F, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, t } from "./chunks/report-BOk0p5y8.js";
3
- import { C as C2, c as c2, a } from "./chunks/children-CL3Cy0ez.js";
1
+ import { ag as describe, w as ImportReportBuilder, y as throwIfAborted } from "./chunks/report-B1z4WT9e.js";
2
+ import { A, m, n, Z, ah, B, C, a5, ai, l, j, aj, ak, D, a, i, c, al, d, J, a4, u, E, am, G, an, I, a8, b, a2, r, s, K, ao, ap, e, f, af, M, a9, aq, aa, N, $, O, ar, ab, h, as, P, at, a6, ac, R, S, p, o, a3, au, g, t, ae, ad, a1, T, k, Y, q, U, av, a7, W, a0, aw, ax, H, ay, az, aA, L, aB, aC, aD, aE, aF, X, aG, F, z, V, v, x } from "./chunks/report-B1z4WT9e.js";
3
+ import { C as C2, c as c2, a as a10 } from "./chunks/children-CL3Cy0ez.js";
4
4
  import { GraphFormatError, GraphBuilder } from "@graphty/graph-format";
5
5
  import { csvImporter, csvExporter } from "./csv.js";
6
6
  import { CSV_CAPABILITIES, CSV_ISSUE, CSV_LOSS } from "./csv.js";
7
- import { b as dotImporter, d as dotExporter } from "./chunks/importer-Br_QeAeE.js";
8
- import { D as D2, a as a10 } from "./chunks/importer-Br_QeAeE.js";
7
+ import { c as cxImporter } from "./chunks/importer-BaQpCEcJ.js";
8
+ import { C as C3 } from "./chunks/importer-BaQpCEcJ.js";
9
+ import { c as cx2Exporter } from "./chunks/exporter-BGrsWamJ.js";
10
+ import { C as C4, a as a11 } from "./chunks/exporter-BGrsWamJ.js";
11
+ import { c as cx2Importer } from "./chunks/importer-vi3bSdtw.js";
12
+ import { C as C5 } from "./chunks/importer-vi3bSdtw.js";
13
+ import { c as cysImporter } from "./chunks/importer-DD-xv9_Y.js";
14
+ import { C as C6 } from "./chunks/importer-DD-xv9_Y.js";
15
+ import { b as dotImporter, d as dotExporter } from "./chunks/importer-BWY2FFc5.js";
16
+ import { D as D2, a as a12 } from "./chunks/importer-BWY2FFc5.js";
9
17
  import { gexfImporter, gexfExporter } from "./gexf.js";
10
18
  import { GEXF_1_2_CAPABILITIES, GEXF_ISSUE, GEXF_LOSS } from "./gexf.js";
11
19
  import { gmlImporter, gmlExporter } from "./gml.js";
12
20
  import { GML_ISSUE, GML_LOSS } from "./gml.js";
13
- import { b as graphmlImporter, g as graphmlExporter } from "./chunks/importer-DHagxvDD.js";
14
- import { G as G2, a as a11 } from "./chunks/importer-DHagxvDD.js";
15
- import { s as sniffJsonDialect, e as jsonImporter, c as jsonExporter } from "./chunks/importer-Du5crN9l.js";
16
- import { J as J2, a as a12, b as b2, d as d2, j as j2 } from "./chunks/importer-Du5crN9l.js";
21
+ import { b as graphmlImporter, g as graphmlExporter } from "./chunks/importer-DIrbbnAf.js";
22
+ import { G as G2, a as a13 } from "./chunks/importer-DIrbbnAf.js";
23
+ import { r as rankFormats, S as SNIFF_HEAD_BYTES, e as jsonImporter, c as jsonExporter } from "./chunks/importer-Wv4C4gaF.js";
24
+ import { G as G3, J as J2, a as a14, b as b2, d as d2, f as f2, h as h2, j as j2, n as n2, s as s2, g as g2 } from "./chunks/importer-Wv4C4gaF.js";
17
25
  import { neo4jImporter, neo4jExporter } from "./neo4j.js";
18
26
  import { ID_SPACE_COLUMN, LABELS_COLUMN, NEO4J_CAPABILITIES, NEO4J_ISSUE, NEO4J_LOSS, ORIGINAL_ID_COLUMN, TYPE_COLUMN } from "./neo4j.js";
19
- import { o as oboImporter } from "./chunks/importer-aNJfe0qu.js";
20
- import { O as O2 } from "./chunks/importer-aNJfe0qu.js";
21
- import { b as pajekImporter, p as pajekExporter } from "./chunks/importer-d0uQxFp6.js";
22
- import { P as P2, a as a13 } from "./chunks/importer-d0uQxFp6.js";
23
- import { D as D3, L as L2, N as N2, c as c3, a as a14, b as b3, d as d3, e as e2, f as f2, g as g2, h as h2, i as i2, j as j3, k as k2, l as l2, m as m2, n as n2, o as o2, p as p2, s as s2, t as t2 } from "./chunks/writer-GAdltGmC.js";
24
- import { T as T2, W as W2, i as i3, a as a15, p as p3 } from "./chunks/text-Dr0Ifpag.js";
25
- import { X as X2, a as a16, h as h3, t as t3, x as x2 } from "./chunks/escape-D-gZWO26.js";
26
- const GRAPH_FORMATS = Object.freeze([
27
- "json",
28
- "graphml",
29
- "gexf",
30
- "csv",
31
- "gml",
32
- "dot",
33
- "pajek",
34
- "neo4j",
35
- "obo"
36
- ]);
37
- const SNIFF_HEAD_BYTES = 8192;
38
- function extensionOf(filename) {
39
- const base = filename.slice(Math.max(filename.lastIndexOf("/"), filename.lastIndexOf("\\")) + 1);
40
- const dot = base.lastIndexOf(".");
41
- if (dot <= 0 || dot === base.length - 1) {
42
- return null;
43
- }
44
- return base.slice(dot).toLowerCase();
45
- }
46
- function normalizeMimeType(mimeType) {
47
- const semicolon = mimeType.indexOf(";");
48
- return (semicolon < 0 ? mimeType : mimeType.slice(0, semicolon)).trim().toLowerCase();
27
+ import { o as oboImporter } from "./chunks/importer-DEcKhsmQ.js";
28
+ import { O as O2 } from "./chunks/importer-DEcKhsmQ.js";
29
+ import { b as pajekImporter, p as pajekExporter } from "./chunks/importer-zGLo8Dg_.js";
30
+ import { P as P2, a as a15 } from "./chunks/importer-zGLo8Dg_.js";
31
+ import { x as xgmmlExporter } from "./chunks/exporter-DIeGJXAZ.js";
32
+ import { x as xgmmlImporter } from "./chunks/importer-D_e7e7LX.js";
33
+ import { X as X2, a as a16 } from "./chunks/importer-D_e7e7LX.js";
34
+ import { L as L2, N as N2, c as c3, a as a17, i as i2, m as m2, s as s3 } from "./chunks/export-Bh60Dv-n.js";
35
+ import { e as e2, b as b3, f as f3, a as a18, c as c4, d as d3, i as i3, p as p2 } from "./chunks/weights-Dzba96G3.js";
36
+ import { T as T2, W as W2, i as i4, a as a19, p as p3 } from "./chunks/text-Dr0Ifpag.js";
37
+ import { D as D3, c as c5, d as d4, e as e3, j as j3, t as t2 } from "./chunks/writer-C7flM-Ih.js";
38
+ import { X as X3, b as b4, h as h3, t as t3, x as x2 } from "./chunks/escape-B-tkk_Cl.js";
39
+ const TOO_MANY_EMPTY_CELLS_CODE = "E_TOO_MANY_EMPTY_CELLS";
40
+ const DEFAULT_MAX_EMPTY_CELLS = 2 ** 24;
41
+ function maxEmptyCellsOption(value) {
42
+ if (value === void 0) {
43
+ return DEFAULT_MAX_EMPTY_CELLS;
44
+ }
45
+ if (typeof value === "number" && value >= 0 && (Number.isInteger(value) || value === Infinity)) {
46
+ return value;
47
+ }
48
+ throw new GraphFormatError(
49
+ "E_UNSUPPORTED",
50
+ `option maxEmptyCells: ${describe(value)} is not a non-negative integer or Infinity`,
51
+ { option: "maxEmptyCells", found: value }
52
+ );
49
53
  }
50
- function headBytes(head) {
51
- if (typeof head === "string") {
52
- return new TextEncoder().encode(head.slice(0, SNIFF_HEAD_BYTES)).subarray(0, SNIFF_HEAD_BYTES);
54
+ class CellBudgetBuilder extends GraphBuilder {
55
+ /**
56
+ * Create a builder with a limit.
57
+ * @param options - the builder options
58
+ * @param format - the format being read, for the error's report
59
+ * @param maxEmptyCells - the most empty slots allowed
60
+ */
61
+ constructor(options, format, maxEmptyCells) {
62
+ super(options);
63
+ this.format = format;
64
+ this.maxEmptyCells = maxEmptyCells;
65
+ this.nodeColumns = /* @__PURE__ */ new Set();
66
+ this.edgeColumns = /* @__PURE__ */ new Set();
67
+ this.values = 0;
53
68
  }
54
- if (head.byteLength >= 2 && (head[0] === 255 && head[1] === 254 || head[0] === 254 && head[1] === 255)) {
55
- const encoding = head[0] === 255 ? "utf-16le" : "utf-16be";
56
- return headBytes(new TextDecoder(encoding).decode(head.subarray(0, SNIFF_HEAD_BYTES)));
69
+ /**
70
+ * Add a node, then check the limit (its row adds a slot to every node column).
71
+ * @param id - the node id
72
+ * @returns the node index
73
+ */
74
+ addNode(id) {
75
+ const index = super.addNode(id);
76
+ this.checkBudget();
77
+ return index;
57
78
  }
58
- return head.byteLength > SNIFF_HEAD_BYTES ? head.subarray(0, SNIFF_HEAD_BYTES) : head;
59
- }
60
- function rankFormats(hints, importers) {
61
- const extension = typeof hints.filename === "string" ? extensionOf(hints.filename) : null;
62
- const mime = typeof hints.mimeType === "string" ? normalizeMimeType(hints.mimeType) : null;
63
- const head = hints.head === void 0 || hints.head === null ? null : headBytes(hints.head);
64
- const candidates = [];
65
- let rank = 0;
66
- for (const importer of importers) {
67
- const extensionMatch = extension !== null && importer.extensions.some((e3) => e3.toLowerCase() === extension);
68
- const mimeMatch = mime !== null && importer.mimeTypes.some((m3) => m3.toLowerCase() === mime);
69
- let content = 0;
70
- if (head !== null && head.byteLength > 0 && typeof importer.sniff === "function") {
71
- content = clamp(importer.sniff(head));
72
- }
73
- let confidence;
74
- if (content > 0) {
75
- confidence = 0.5 + 0.35 * content + (extensionMatch ? 0.1 : 0) + (mimeMatch ? 0.05 : 0);
76
- } else if (extensionMatch || mimeMatch) {
77
- confidence = (extensionMatch ? 0.3 : 0) + (mimeMatch ? 0.1 : 0);
78
- } else {
79
- continue;
80
- }
81
- const dialect = importer.format === "json" && head !== null ? sniffJsonDialectHead(head) : null;
82
- const result2 = Object.freeze({
83
- format: importer.format,
84
- confidence: Math.min(1, confidence),
85
- content,
86
- extension: extensionMatch,
87
- mimeType: mimeMatch,
88
- dialect
89
- });
90
- candidates.push({ result: result2, rank: rank++ });
91
- }
92
- candidates.sort((a17, b4) => b4.result.confidence - a17.result.confidence || a17.rank - b4.rank);
93
- return candidates.map((c4) => c4.result);
94
- }
95
- function sniffFormat(hints, importers) {
96
- const ranked = rankFormats(hints, importers);
97
- return ranked.length > 0 ? ranked[0] : null;
98
- }
99
- function sniffJsonDialectHead(head) {
100
- const text = typeof head === "string" ? head : new TextDecoder("utf-8", { fatal: false }).decode(head);
101
- const body = text.charCodeAt(0) === 65279 ? text.slice(1) : text;
102
- const trimmed = body.trimStart();
103
- if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) {
104
- return null;
105
- }
106
- let root;
107
- try {
108
- root = JSON.parse(trimmed);
109
- } catch {
110
- root = skeletonOf(trimmed);
111
- }
112
- return sniffJsonDialect(root);
113
- }
114
- function skeletonOf(text) {
115
- const keys = scanKeys(text);
116
- if (text.startsWith("[")) {
117
- const first = keys.get("nodes[0]");
118
- return first === void 0 ? null : [objectOf(first)];
119
- }
120
- const rootKeys = keys.get("");
121
- if (rootKeys === void 0) {
122
- return null;
123
- }
124
- const root = {};
125
- for (const key of rootKeys) {
126
- switch (key) {
127
- case "graph":
128
- case "options":
129
- root[key] = objectOf(keys.get(key));
130
- break;
131
- case "graphs": {
132
- const nodes = keys.get("graphs[0].nodes[]");
133
- const edges = keys.get("graphs[0].edges[]");
134
- const graph = {};
135
- if (nodes !== void 0) {
136
- graph.nodes = [objectOf(nodes)];
137
- }
138
- if (edges !== void 0) {
139
- graph.edges = [objectOf(edges)];
140
- }
141
- root[key] = nodes === void 0 && edges === void 0 ? [] : [graph];
142
- break;
143
- }
144
- case "nodes":
145
- case "edges":
146
- case "links": {
147
- const first = keys.get(`${key}[0]`);
148
- root[key] = first === void 0 ? [] : [objectOf(first)];
149
- break;
150
- }
151
- default:
152
- root[key] = true;
153
- break;
154
- }
79
+ /**
80
+ * Add an edge, then check the limit (its row adds a slot to every edge column).
81
+ * @param source - source id
82
+ * @param target - target id
83
+ * @param weight - the weight
84
+ * @returns the edge index
85
+ */
86
+ addEdge(source, target, weight) {
87
+ const edge = super.addEdge(source, target, weight);
88
+ this.checkBudget();
89
+ return edge;
155
90
  }
156
- return root;
157
- }
158
- function objectOf(names) {
159
- const out = {};
160
- if (names !== void 0) {
161
- for (const name of names) {
162
- out[name] = name === "attributes" || name === "data" ? {} : true;
163
- }
91
+ /**
92
+ * Declare a node column, then check the limit.
93
+ * @param decl - the declaration
94
+ * @returns the column handle
95
+ */
96
+ declareNodeColumn(decl) {
97
+ const handle = super.declareNodeColumn(decl);
98
+ this.nodeColumns.add(handle);
99
+ this.checkBudget();
100
+ return handle;
164
101
  }
165
- return out;
166
- }
167
- function scanKeys(text) {
168
- const found = /* @__PURE__ */ new Map();
169
- const kinds = [];
170
- const labels = [];
171
- const counts = [];
172
- let pendingKey = null;
173
- let expectingKey = false;
174
- const pathOf = () => {
175
- const depth = kinds.length;
176
- if (depth === 1) {
177
- return kinds[0] === "object" ? "" : null;
178
- }
179
- if (depth === 2 && kinds[0] === "array" && kinds[1] === "object" && labels[1] === "0") {
180
- return "nodes[0]";
181
- }
182
- if (depth === 2 && kinds[0] === "object" && kinds[1] === "object") {
183
- return labels[1] === "graph" || labels[1] === "options" ? labels[1] : null;
184
- }
185
- if (depth === 5 && kinds.join() === "object,array,object,array,object" && labels[1] === "graphs" && labels[2] === "0" && (labels[3] === "nodes" || labels[3] === "edges")) {
186
- return labels[3] === "nodes" ? "graphs[0].nodes[]" : "graphs[0].edges[]";
187
- }
188
- if (depth === 3 && kinds[0] === "object" && kinds[1] === "array" && kinds[2] === "object") {
189
- const section = labels[1];
190
- if ((section === "nodes" || section === "edges" || section === "links") && labels[2] === "0") {
191
- return `${section}[0]`;
192
- }
193
- }
194
- return null;
195
- };
196
- let i4 = 0;
197
- const n3 = text.length;
198
- while (i4 < n3) {
199
- const ch = text[i4];
200
- if (ch === '"') {
201
- const end = scanString(text, i4 + 1);
202
- if (end < 0) {
203
- break;
204
- }
205
- const literal = text.slice(i4 + 1, end);
206
- i4 = end + 1;
207
- if (expectingKey) {
208
- pendingKey = decodeKey(literal);
209
- expectingKey = false;
210
- }
211
- continue;
212
- }
213
- if (ch === "{" || ch === "[") {
214
- let label = "";
215
- if (kinds.length > 0) {
216
- label = kinds[kinds.length - 1] === "object" ? pendingKey ?? "" : String(counts[counts.length - 1]);
217
- }
218
- kinds.push(ch === "{" ? "object" : "array");
219
- labels.push(label);
220
- counts.push(0);
221
- expectingKey = ch === "{";
222
- pendingKey = null;
223
- } else if (ch === "}" || ch === "]") {
224
- kinds.pop();
225
- labels.pop();
226
- counts.pop();
227
- expectingKey = false;
228
- pendingKey = null;
229
- } else if (ch === ":") {
230
- if (pendingKey !== null) {
231
- const path = pathOf();
232
- if (path !== null) {
233
- let set = found.get(path);
234
- if (set === void 0) {
235
- set = /* @__PURE__ */ new Set();
236
- found.set(path, set);
237
- }
238
- set.add(pendingKey);
239
- }
240
- }
241
- } else if (ch === ",") {
242
- const top = kinds.length - 1;
243
- if (top >= 0) {
244
- counts[top]++;
245
- expectingKey = kinds[top] === "object";
246
- }
247
- pendingKey = null;
248
- }
249
- i4++;
102
+ /**
103
+ * Declare an edge column, then check the limit.
104
+ * @param decl - the declaration
105
+ * @returns the column handle
106
+ */
107
+ declareEdgeColumn(decl) {
108
+ const handle = super.declareEdgeColumn(decl);
109
+ this.edgeColumns.add(handle);
110
+ this.checkBudget();
111
+ return handle;
250
112
  }
251
- return found;
252
- }
253
- function scanString(text, from) {
254
- let i4 = from;
255
- while (i4 < text.length) {
256
- const ch = text[i4];
257
- if (ch === "\\") {
258
- i4 += 2;
259
- continue;
260
- }
261
- if (ch === '"') {
262
- return i4;
263
- }
264
- i4++;
113
+ /**
114
+ * Set a node cell (a new name declares a column), then check the limit.
115
+ * @param column - the handle or name
116
+ * @param index - the node index
117
+ * @param value - the value
118
+ */
119
+ setNodeValue(column, index, value) {
120
+ super.setNodeValue(column, index, value);
121
+ this.nodeColumns.add(typeof column === "string" ? this.nodeColumn(column) : column);
122
+ this.count(value);
265
123
  }
266
- return -1;
267
- }
268
- function decodeKey(literal) {
269
- if (!literal.includes("\\")) {
270
- return literal;
124
+ /**
125
+ * Set an edge cell (a new name declares a column), then check the limit.
126
+ * @param column - the handle or name
127
+ * @param edge - the edge index
128
+ * @param value - the value
129
+ */
130
+ setEdgeValue(column, edge, value) {
131
+ super.setEdgeValue(column, edge, value);
132
+ this.edgeColumns.add(typeof column === "string" ? this.edgeColumn(column) : column);
133
+ this.count(value);
271
134
  }
272
- try {
273
- return JSON.parse(`"${literal}"`);
274
- } catch {
275
- return literal;
135
+ /**
136
+ * Count a written value and check the budget.
137
+ * @param value - the value; null and undefined unset a slot and do not count
138
+ */
139
+ count(value) {
140
+ if (value !== null && value !== void 0) {
141
+ this.values++;
142
+ }
143
+ this.checkBudget();
276
144
  }
277
- }
278
- function clamp(value) {
279
- if (!(value > 0)) {
280
- return 0;
145
+ /**
146
+ * Throw when the columns' slots minus the values written pass the limit.
147
+ * @throws ImportError E_TOO_MANY_EMPTY_CELLS
148
+ */
149
+ checkBudget() {
150
+ const slots = this.nodeColumns.size * this.nodeBound + this.edgeColumns.size * this.edgeBound;
151
+ const empty = slots - this.values;
152
+ if (empty > this.maxEmptyCells) {
153
+ new ImportReportBuilder(this.format, Infinity).fail(
154
+ TOO_MANY_EMPTY_CELLS_CODE,
155
+ `the attributes are too sparse: ${this.nodeColumns.size} node and ${this.edgeColumns.size} edge attribute column(s) over ${this.nodeBound} node(s) and ${this.edgeBound} edge(s) would allocate more than ${this.maxEmptyCells} slots that hold no value; pass a larger maxEmptyCells (or Infinity) to read the file anyway`,
156
+ void 0,
157
+ { emptyCells: empty, maxEmptyCells: this.maxEmptyCells }
158
+ );
159
+ }
281
160
  }
282
- return value > 1 ? 1 : value;
283
161
  }
284
162
  const UNKNOWN_FORMAT_CODE = "E_UNKNOWN_FORMAT";
285
- const REGISTRY_KEYS = /* @__PURE__ */ new Set(["format", "filename", "mimeType", "builder", "freeze"]);
163
+ const REGISTRY_KEYS = /* @__PURE__ */ new Set([
164
+ "format",
165
+ "filename",
166
+ "mimeType",
167
+ "builder",
168
+ "freeze",
169
+ "maxEmptyCells"
170
+ ]);
286
171
  class FormatRegistry {
287
172
  constructor() {
288
173
  this.importerMap = /* @__PURE__ */ new Map();
@@ -399,7 +284,7 @@ class FormatRegistry {
399
284
  */
400
285
  async importGraph(input, options = {}) {
401
286
  const chosen = await this.choose(input, options);
402
- const builder = seededBuilder(options);
287
+ const builder = seededBuilder(options, chosen.importer.format);
403
288
  let report;
404
289
  try {
405
290
  report = await chosen.importer.import(chosen.source, builder, importerOptions(options));
@@ -425,13 +310,13 @@ class FormatRegistry {
425
310
  let reports;
426
311
  try {
427
312
  if (importer.importAll === void 0) {
428
- builders.push(seededBuilder(options));
313
+ builders.push(seededBuilder(options, importer.format));
429
314
  reports = [await importer.import(chosen.source, builders[0], importerOptions(options))];
430
315
  } else {
431
316
  reports = await importer.importAll(
432
317
  chosen.source,
433
318
  () => {
434
- const builder = seededBuilder(options);
319
+ const builder = seededBuilder(options, importer.format);
435
320
  builders.push(builder);
436
321
  return builder;
437
322
  },
@@ -442,7 +327,7 @@ class FormatRegistry {
442
327
  await chosen.peeked?.close();
443
328
  throw err;
444
329
  }
445
- return reports.map((report, i4) => result(chosen, builders[i4], report, options));
330
+ return reports.map((report, i5) => result(chosen, builders[i5], report, options));
446
331
  }
447
332
  /**
448
333
  * The graphs of an input that can hold several, without importing them (a Cytoscape session's
@@ -517,7 +402,7 @@ class FormatRegistry {
517
402
  }
518
403
  }
519
404
  function createRegistry() {
520
- return new FormatRegistry().registerImporter(jsonImporter).registerExporter(jsonExporter).registerImporter(graphmlImporter).registerExporter(graphmlExporter).registerImporter(gexfImporter).registerExporter(gexfExporter).registerImporter(csvImporter).registerExporter(csvExporter).registerImporter(gmlImporter).registerExporter(gmlExporter).registerImporter(dotImporter).registerExporter(dotExporter).registerImporter(pajekImporter).registerExporter(pajekExporter).registerImporter(neo4jImporter).registerExporter(neo4jExporter).registerImporter(oboImporter);
405
+ return new FormatRegistry().registerImporter(jsonImporter).registerExporter(jsonExporter).registerImporter(graphmlImporter).registerExporter(graphmlExporter).registerImporter(gexfImporter).registerExporter(gexfExporter).registerImporter(csvImporter).registerExporter(csvExporter).registerImporter(gmlImporter).registerExporter(gmlExporter).registerImporter(dotImporter).registerExporter(dotExporter).registerImporter(pajekImporter).registerExporter(pajekExporter).registerImporter(neo4jImporter).registerExporter(neo4jExporter).registerImporter(xgmmlImporter).registerExporter(xgmmlExporter).registerImporter(cx2Importer).registerExporter(cx2Exporter).registerImporter(cxImporter).registerImporter(oboImporter).registerImporter(cysImporter);
521
406
  }
522
407
  const registry = createRegistry();
523
408
  function importGraph(input, options) {
@@ -550,15 +435,20 @@ function importerOptions(options) {
550
435
  }
551
436
  return out;
552
437
  }
553
- function seededBuilder(options) {
554
- return new GraphBuilder({
555
- weightDtype: options.weightDtype ?? "f64",
556
- ...options.builder,
557
- directed: true,
558
- addMissingNodes: options.addMissingNodes ?? true,
559
- duplicateEdges: options.duplicateEdges ?? "keep",
560
- selfLoops: options.selfLoops ?? "keep"
561
- });
438
+ function seededBuilder(options, format) {
439
+ const maxEmptyCells = maxEmptyCellsOption(options.maxEmptyCells);
440
+ return new CellBudgetBuilder(
441
+ {
442
+ weightDtype: options.weightDtype ?? "f64",
443
+ ...options.builder,
444
+ directed: true,
445
+ addMissingNodes: options.addMissingNodes ?? true,
446
+ duplicateEdges: options.duplicateEdges ?? "keep",
447
+ selfLoops: options.selfLoops ?? "keep"
448
+ },
449
+ format,
450
+ maxEmptyCells
451
+ );
562
452
  }
563
453
  function result(chosen, builder, report, options) {
564
454
  const frozen = builder.freezeWithReport(options.freeze);
@@ -621,10 +511,10 @@ async function peekHead(input, bytes, signal) {
621
511
  return { head: joinHead(buffered, bytes), input: replayed, close: () => replayed.close() };
622
512
  }
623
513
  function joinHead(chunks, bytes) {
624
- if (chunks.every((c4) => c4 instanceof Uint8Array)) {
514
+ if (chunks.every((c6) => c6 instanceof Uint8Array)) {
625
515
  const total = Math.min(
626
516
  bytes,
627
- chunks.reduce((sum, c4) => sum + c4.byteLength, 0)
517
+ chunks.reduce((sum, c6) => sum + c6.byteLength, 0)
628
518
  );
629
519
  const head = new Uint8Array(total);
630
520
  let offset = 0;
@@ -711,36 +601,41 @@ function readerIterator(stream) {
711
601
  }
712
602
  export {
713
603
  A as AMBIGUOUS_GRAPH_NAME_CODE,
714
- b as ASPECT_ORDER_CODE,
715
- B as BAD_ASPECT_BLOCK_CODE,
716
- c as BAD_DEFAULT_CODE,
717
- d as BAD_OPTIONS_CODE,
718
- e as BAD_VALUE_CODE,
604
+ m as ASPECT_ORDER_CODE,
605
+ n as BAD_ASPECT_BLOCK_CODE,
606
+ Z as BAD_DEFAULT_CODE,
607
+ ah as BAD_OPTIONS_CODE,
608
+ B as BAD_VALUE_CODE,
719
609
  C as COLUMN_RENAMED_CODE,
720
- f as COLUMN_RENAMED_LOSS_CODE,
721
- g as COUNT_HINT_CODE,
722
- h as COUNT_MISMATCH_CODE,
610
+ a5 as COLUMN_RENAMED_LOSS_CODE,
611
+ ai as COUNT_HINT_CODE,
612
+ l as COUNT_MISMATCH_CODE,
723
613
  CSV_CAPABILITIES,
724
614
  CSV_ISSUE,
725
615
  CSV_LOSS,
616
+ C4 as CX2_CAPABILITIES,
617
+ C5 as CX2_ISSUE,
618
+ a11 as CX2_LOSS,
619
+ C3 as CX_ISSUE,
620
+ C6 as CYS_ISSUE,
726
621
  C2 as ChildrenCsr,
727
- D as DANGLING_REFERENCE_CODE,
622
+ j as DANGLING_REFERENCE_CODE,
728
623
  D3 as DEFAULT_CHUNK_BYTES,
729
- i as DEFAULT_ERROR_LIMIT,
730
- j as DIRECTED_COLUMN,
731
- k as DIRECTION_FORCED_CODE,
732
- l as DIRECTION_REFUSED_CODE,
624
+ aj as DEFAULT_ERROR_LIMIT,
625
+ ak as DIRECTED_COLUMN,
626
+ D as DIRECTION_FORCED_CODE,
627
+ a as DIRECTION_REFUSED_CODE,
733
628
  D2 as DOT_ISSUE,
734
- a10 as DOT_LOSS,
735
- m as DUPLICATE_ATTRIBUTE_CODE,
736
- n as DUPLICATE_EDGE_ID_CODE,
737
- o as DUPLICATE_KEY_CODE,
738
- p as DUPLICATE_NODE_CODE,
739
- q as DirectionResolver,
740
- E as EMPTY_COLUMN_DROPPED_CODE,
741
- r as EMPTY_INPUT_CODE,
742
- s as ENCODING_FALLBACK_CODE,
743
- u as EQUATION_AS_TEXT_CODE,
629
+ a12 as DOT_LOSS,
630
+ i as DUPLICATE_ATTRIBUTE_CODE,
631
+ c as DUPLICATE_EDGE_ID_CODE,
632
+ al as DUPLICATE_KEY_CODE,
633
+ d as DUPLICATE_NODE_CODE,
634
+ J as DirectionResolver,
635
+ a4 as EMPTY_COLUMN_DROPPED_CODE,
636
+ u as EMPTY_INPUT_CODE,
637
+ E as ENCODING_FALLBACK_CODE,
638
+ am as EQUATION_AS_TEXT_CODE,
744
639
  FormatRegistry,
745
640
  GEXF_1_2_CAPABILITIES,
746
641
  GEXF_ISSUE,
@@ -748,110 +643,116 @@ export {
748
643
  GML_ISSUE,
749
644
  GML_LOSS,
750
645
  G2 as GRAPHML_ISSUE,
751
- a11 as GRAPHML_LOSS,
752
- GRAPH_FORMATS,
646
+ a13 as GRAPHML_LOSS,
647
+ G3 as GRAPH_FORMATS,
753
648
  G as GRAPH_NOT_FOUND_CODE,
754
- H as HYPEREDGE_CODE,
755
- v as ID_MERGED_CODE,
649
+ an as HYPEREDGE_CODE,
650
+ I as ID_MERGED_CODE,
756
651
  ID_SPACE_COLUMN,
757
- w as ID_TEXT_COLLISION_CODE,
758
- x as ID_TEXT_TYPE_CODE,
759
- y as INTEGRAL_F64_CODE,
760
- z as INVALID_ENCODING_CODE,
761
- F as INVALID_UTF8_CODE,
762
- J as IdCoercer,
763
- K as ImportError,
652
+ a8 as ID_TEXT_COLLISION_CODE,
653
+ b as ID_TEXT_TYPE_CODE,
654
+ a2 as INTEGRAL_F64_CODE,
655
+ r as INVALID_ENCODING_CODE,
656
+ s as INVALID_UTF8_CODE,
657
+ K as IdCoercer,
658
+ ao as ImportError,
764
659
  ImportReportBuilder,
765
660
  J2 as JSON_DIALECTS,
766
- a12 as JSON_ISSUE,
661
+ a14 as JSON_ISSUE,
767
662
  b2 as JSON_LOSS,
768
663
  LABELS_COLUMN,
769
664
  L2 as LOSS,
770
- L as LineReader,
771
- M as MISSING_ENDPOINT_CODE,
772
- N as MISSING_ID_CODE,
773
- O as MIXED_DIRECTION_CODE,
774
- P as MULTIPLE_GRAPHS_CODE,
775
- Q as MUTUAL_AS_UNDIRECTED_CODE,
776
- R as MUTUAL_COLUMN,
777
- S as MUTUAL_EXPANDED_CODE,
665
+ ap as LineReader,
666
+ e as MISSING_ENDPOINT_CODE,
667
+ f as MISSING_ID_CODE,
668
+ af as MIXED_DIRECTION_CODE,
669
+ M as MULTIPLE_GRAPHS_CODE,
670
+ a9 as MUTUAL_AS_UNDIRECTED_CODE,
671
+ aq as MUTUAL_COLUMN,
672
+ aa as MUTUAL_EXPANDED_CODE,
778
673
  NEO4J_CAPABILITIES,
779
674
  NEO4J_ISSUE,
780
675
  NEO4J_LOSS,
781
676
  N2 as NO_CAPABILITIES,
782
- T as NO_GRAPH_CODE,
677
+ N as NO_GRAPH_CODE,
783
678
  O2 as OBO_ISSUE,
784
- U as OPTIONS_GAINED_CODE,
785
- V as OPTION_IGNORED_CODE,
679
+ $ as OPTIONS_GAINED_CODE,
680
+ O as OPTION_IGNORED_CODE,
786
681
  ORIGINAL_ID_COLUMN,
787
- W as PAIR_COLUMN,
682
+ ar as PAIR_COLUMN,
788
683
  P2 as PAJEK_ISSUE,
789
- a13 as PAJEK_LOSS,
790
- X as PARENTS_DROPPED_CODE,
791
- Y as PARENT_CYCLE_CODE,
792
- Z as PARSE_ERROR_CODE,
793
- _ as PRECISION_CODE,
794
- $ as RENAMED_CODE,
795
- a0 as ROLE_ASSUMED_CODE,
796
- a1 as ROLE_DROPPED_CODE,
797
- a2 as ROLE_TAKEN_CODE,
798
- a3 as SINK_OPTION_CODE,
684
+ a15 as PAJEK_LOSS,
685
+ ab as PARENTS_DROPPED_CODE,
686
+ h as PARENT_CYCLE_CODE,
687
+ as as PARSE_ERROR_CODE,
688
+ P as PRECISION_CODE,
689
+ at as RENAMED_CODE,
690
+ a6 as ROLE_ASSUMED_CODE,
691
+ ac as ROLE_DROPPED_CODE,
692
+ R as ROLE_TAKEN_CODE,
693
+ S as SINK_OPTION_CODE,
799
694
  SNIFF_HEAD_BYTES,
800
- a4 as STATUS_FAILED_CODE,
801
- a5 as STATUS_WARNING_CODE,
802
- a6 as STORAGE_CLASS_CODE,
803
- a7 as STRAY_TEXT_CODE,
804
- a8 as STYLES_NOT_IMPORTED_CODE,
805
- a9 as SYNTAX_CODE,
806
- aa as TEMPORAL_DROPPED_CODE,
807
- ab as TEMPORAL_TEXT_DROPPED_CODE,
808
- ac as TEXT_INFERRED_CODE,
809
- ad as TOO_LARGE_CODE,
695
+ p as STATUS_FAILED_CODE,
696
+ o as STATUS_WARNING_CODE,
697
+ a3 as STORAGE_CLASS_CODE,
698
+ au as STRAY_TEXT_CODE,
699
+ g as STYLES_NOT_IMPORTED_CODE,
700
+ t as SYNTAX_CODE,
701
+ ae as TEMPORAL_DROPPED_CODE,
702
+ ad as TEMPORAL_TEXT_DROPPED_CODE,
703
+ a1 as TEXT_INFERRED_CODE,
704
+ T as TOO_LARGE_CODE,
810
705
  TYPE_COLUMN,
811
706
  T2 as TextCellWriter,
812
- ae as UNKNOWN_ATTR_TYPE_CODE,
813
- af as UNKNOWN_ELEMENT_CODE,
814
- ag as UNKNOWN_ENCODING_CODE,
707
+ k as UNKNOWN_ATTR_TYPE_CODE,
708
+ Y as UNKNOWN_ELEMENT_CODE,
709
+ q as UNKNOWN_ENCODING_CODE,
815
710
  UNKNOWN_FORMAT_CODE,
816
- ah as UNKNOWN_PARENT_CODE,
817
- ai as UNKNOWN_TYPE_CODE,
818
- aj as WEIGHT_KEY_CLASH_CODE,
819
- ak as WIDENED_CODE,
711
+ U as UNKNOWN_PARENT_CODE,
712
+ av as UNKNOWN_TYPE_CODE,
713
+ a7 as WEIGHT_KEY_CLASH_CODE,
714
+ W as WIDENED_CODE,
820
715
  W2 as WIDENING_UNSUPPORTED_CODE,
821
- al as XML_ILLEGAL_CHAR_CODE,
822
- am as XML_SYNTAX_CODE,
823
- X2 as XmlSyntaxError,
824
- a16 as XmlTokenizer,
825
- an as canonicalId,
716
+ X2 as XGMML_ISSUE,
717
+ a16 as XGMML_LOSS,
718
+ a0 as XML_ILLEGAL_CHAR_CODE,
719
+ aw as XML_SYNTAX_CODE,
720
+ X3 as XmlSyntaxError,
721
+ b4 as XmlTokenizer,
722
+ ax as canonicalId,
826
723
  c3 as capabilities,
827
- a14 as checkCapabilities,
724
+ a17 as checkCapabilities,
828
725
  checkExport,
829
726
  c2 as childrenCsr,
830
- a as childrenFromColumn,
831
- ao as chooseGraph,
832
- ap as coerceId,
833
- aq as coerceIdText,
834
- b3 as collectBytes,
727
+ a10 as childrenFromColumn,
728
+ H as chooseGraph,
729
+ ay as coerceId,
730
+ az as coerceIdText,
731
+ c5 as collectBytes,
835
732
  createRegistry,
836
733
  csvExporter,
837
734
  csvImporter,
838
- ar as declareCompanion,
839
- as as declareResolved,
840
- d3 as decodeChunks,
841
- at as decodeEntryName,
735
+ cx2Exporter,
736
+ cx2Importer,
737
+ cxImporter,
738
+ cysImporter,
739
+ aA as declareCompanion,
740
+ L as declareResolved,
741
+ d4 as decodeChunks,
742
+ aB as decodeEntryName,
842
743
  d2 as dialectCapabilities,
843
744
  dotExporter,
844
745
  dotImporter,
845
- e2 as encodeChunks,
846
- f2 as explicitWeights,
746
+ e3 as encodeChunks,
747
+ e2 as explicitWeights,
847
748
  exportGraph,
848
749
  exportGraphToString,
849
- extensionOf,
850
- g2 as formatDecimal,
851
- h2 as formatF32,
852
- i2 as formatF64,
853
- j3 as formatGmlReal,
854
- k2 as formatInteger,
750
+ f2 as extensionOf,
751
+ b3 as formatDecimal,
752
+ f3 as formatF32,
753
+ a18 as formatF64,
754
+ c4 as formatGmlReal,
755
+ d3 as formatInteger,
855
756
  gexfExporter,
856
757
  gexfImporter,
857
758
  gmlExporter,
@@ -859,47 +760,49 @@ export {
859
760
  graphmlExporter,
860
761
  graphmlImporter,
861
762
  h3 as hasIllegalXmlChar,
862
- headBytes,
763
+ h2 as headBytes,
863
764
  importAllGraphs,
864
765
  importGraph,
865
- i3 as inferTextDtype,
866
- au as inputLength,
867
- av as isAbortError,
868
- aw as isCanonicalIntegerText,
869
- ax as isImportInput,
870
- l2 as isNmtoken,
871
- a15 as isNumericText,
872
- m2 as isWeightField,
873
- n2 as joinText,
766
+ i4 as inferTextDtype,
767
+ aC as inputLength,
768
+ aD as isAbortError,
769
+ aE as isCanonicalIntegerText,
770
+ aF as isImportInput,
771
+ i2 as isNmtoken,
772
+ a19 as isNumericText,
773
+ i3 as isWeightField,
774
+ j3 as joinText,
874
775
  j2 as jsonCapabilities,
875
776
  jsonExporter,
876
777
  jsonImporter,
877
778
  listGraphs,
878
- o2 as mangleNmtoken,
779
+ m2 as mangleNmtoken,
879
780
  neo4jExporter,
880
781
  neo4jImporter,
881
- normalizeMimeType,
782
+ n2 as normalizeMimeType,
882
783
  oboImporter,
883
- ay as pairFolding,
784
+ X as pairFolding,
884
785
  pajekExporter,
885
786
  pajekImporter,
886
787
  p3 as parseTextCell,
887
788
  p2 as parseWeightText,
888
789
  rankFormats,
889
- az as readText,
790
+ aG as readText,
890
791
  registry,
891
- aA as reportSinkOptions,
892
- aB as reportUnusedOptions,
893
- aC as resolveExportOptions,
894
- aD as resolveImportOptions,
895
- s2 as sanitizeIds,
792
+ F as reportSinkOptions,
793
+ z as reportUnusedOptions,
794
+ V as resolveExportOptions,
795
+ v as resolveImportOptions,
796
+ s3 as sanitizeIds,
896
797
  sniff,
897
- sniffFormat,
898
- sniffJsonDialectHead,
899
- t as textChunks,
798
+ s2 as sniffFormat,
799
+ g2 as sniffJsonDialectHead,
800
+ x as textChunks,
900
801
  throwIfAborted,
901
802
  t2 as toReadableStream,
902
803
  t3 as tokenizeXml,
804
+ xgmmlExporter,
805
+ xgmmlImporter,
903
806
  x2 as xmlIllegalTextNotes
904
807
  };
905
808
  //# sourceMappingURL=graph-io.js.map