@graphty/graph-io 0.3.17 → 0.3.19

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 (154) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +64 -3
  3. package/dist/chunks/{escape-scjHxjpr.js → escape-CWExcecC.js} +3 -2
  4. package/dist/chunks/{escape-scjHxjpr.js.map → escape-CWExcecC.js.map} +1 -1
  5. package/dist/chunks/exporter-CbMZyVt-.js +735 -0
  6. package/dist/chunks/exporter-CbMZyVt-.js.map +1 -0
  7. package/dist/chunks/importer-BAP4PrxR.js +2194 -0
  8. package/dist/chunks/importer-BAP4PrxR.js.map +1 -0
  9. package/dist/chunks/{importer-Xg07gk7p.js → importer-BNFuV1-K.js} +5 -3
  10. package/dist/chunks/{importer-Xg07gk7p.js.map → importer-BNFuV1-K.js.map} +1 -1
  11. package/dist/chunks/{importer-BmOl9gLW.js → importer-BVGtU1NA.js} +5 -3
  12. package/dist/chunks/{importer-BmOl9gLW.js.map → importer-BVGtU1NA.js.map} +1 -1
  13. package/dist/chunks/{importer-ruMWWvVs.js → importer-BW-Ft2ps.js} +5 -3
  14. package/dist/chunks/{importer-ruMWWvVs.js.map → importer-BW-Ft2ps.js.map} +1 -1
  15. package/dist/chunks/{importer-B6rKRxzv.js → importer-Bm1_5vPS.js} +781 -104
  16. package/dist/chunks/importer-Bm1_5vPS.js.map +1 -0
  17. package/dist/chunks/importer-ByPGO-09.js +1614 -0
  18. package/dist/chunks/importer-ByPGO-09.js.map +1 -0
  19. package/dist/chunks/importer-DOepkgnG.js +1713 -0
  20. package/dist/chunks/importer-DOepkgnG.js.map +1 -0
  21. package/dist/chunks/json-elements-CZY1wiZh.js +779 -0
  22. package/dist/chunks/json-elements-CZY1wiZh.js.map +1 -0
  23. package/dist/chunks/ontology-BnrJ4I98.js +113 -0
  24. package/dist/chunks/ontology-BnrJ4I98.js.map +1 -0
  25. package/dist/chunks/{records-DSpbTE5s.js → records-BzNicMsf.js} +2 -2
  26. package/dist/chunks/{records-DSpbTE5s.js.map → records-BzNicMsf.js.map} +1 -1
  27. package/dist/chunks/{writer-DHHfHn11.js → report-BcWboivV.js} +106 -928
  28. package/dist/chunks/report-BcWboivV.js.map +1 -0
  29. package/dist/chunks/weights-CwISIpCP.js +176 -0
  30. package/dist/chunks/weights-CwISIpCP.js.map +1 -0
  31. package/dist/chunks/writer-DQiKgQJc.js +656 -0
  32. package/dist/chunks/writer-DQiKgQJc.js.map +1 -0
  33. package/dist/csv.js +5 -3
  34. package/dist/csv.js.map +1 -1
  35. package/dist/cx.d.ts +1 -0
  36. package/dist/cx.js +6 -0
  37. package/dist/cx.js.map +1 -0
  38. package/dist/cx2.d.ts +1 -0
  39. package/dist/cx2.js +10 -0
  40. package/dist/cx2.js.map +1 -0
  41. package/dist/dot.js +1 -1
  42. package/dist/gexf.js +15 -3
  43. package/dist/gexf.js.map +1 -1
  44. package/dist/gml.js +5 -3
  45. package/dist/gml.js.map +1 -1
  46. package/dist/graph-io.js +158 -383
  47. package/dist/graph-io.js.map +1 -1
  48. package/dist/graphml.js +1 -1
  49. package/dist/json.js +1 -1
  50. package/dist/neo4j.js +5 -3
  51. package/dist/neo4j.js.map +1 -1
  52. package/dist/obo.d.ts +1 -0
  53. package/dist/obo.js +6 -0
  54. package/dist/obo.js.map +1 -0
  55. package/dist/pajek.js +1 -1
  56. package/dist/src/common/json-elements.d.ts +286 -0
  57. package/dist/src/common/json-elements.d.ts.map +1 -0
  58. package/dist/src/common/json-elements.js +926 -0
  59. package/dist/src/common/json-elements.js.map +1 -0
  60. package/dist/src/common/ontology.d.ts +59 -0
  61. package/dist/src/common/ontology.d.ts.map +1 -0
  62. package/dist/src/common/ontology.js +147 -0
  63. package/dist/src/common/ontology.js.map +1 -0
  64. package/dist/src/formats/cx/importer.d.ts +133 -0
  65. package/dist/src/formats/cx/importer.d.ts.map +1 -0
  66. package/dist/src/formats/cx/importer.js +2220 -0
  67. package/dist/src/formats/cx/importer.js.map +1 -0
  68. package/dist/src/formats/cx/index.d.ts +7 -0
  69. package/dist/src/formats/cx/index.d.ts.map +1 -0
  70. package/dist/src/formats/cx/index.js +7 -0
  71. package/dist/src/formats/cx/index.js.map +1 -0
  72. package/dist/src/formats/cx2/exporter.d.ts +59 -0
  73. package/dist/src/formats/cx2/exporter.d.ts.map +1 -0
  74. package/dist/src/formats/cx2/exporter.js +864 -0
  75. package/dist/src/formats/cx2/exporter.js.map +1 -0
  76. package/dist/src/formats/cx2/importer.d.ts +169 -0
  77. package/dist/src/formats/cx2/importer.d.ts.map +1 -0
  78. package/dist/src/formats/cx2/importer.js +1652 -0
  79. package/dist/src/formats/cx2/importer.js.map +1 -0
  80. package/dist/src/formats/cx2/index.d.ts +7 -0
  81. package/dist/src/formats/cx2/index.d.ts.map +1 -0
  82. package/dist/src/formats/cx2/index.js +7 -0
  83. package/dist/src/formats/cx2/index.js.map +1 -0
  84. package/dist/src/formats/gexf/exporter.d.ts +2 -0
  85. package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
  86. package/dist/src/formats/gexf/exporter.js +6 -0
  87. package/dist/src/formats/gexf/exporter.js.map +1 -1
  88. package/dist/src/formats/gexf/importer.d.ts +2 -4
  89. package/dist/src/formats/gexf/importer.d.ts.map +1 -1
  90. package/dist/src/formats/gexf/importer.js +2 -4
  91. package/dist/src/formats/gexf/importer.js.map +1 -1
  92. package/dist/src/formats/gexf/index.d.ts +1 -1
  93. package/dist/src/formats/gexf/index.js +2 -2
  94. package/dist/src/formats/gexf/index.js.map +1 -1
  95. package/dist/src/formats/gml/exporter.js +1 -1
  96. package/dist/src/formats/gml/exporter.js.map +1 -1
  97. package/dist/src/formats/json/dialect.d.ts +8 -6
  98. package/dist/src/formats/json/dialect.d.ts.map +1 -1
  99. package/dist/src/formats/json/dialect.js +26 -3
  100. package/dist/src/formats/json/dialect.js.map +1 -1
  101. package/dist/src/formats/json/importer.d.ts +324 -7
  102. package/dist/src/formats/json/importer.d.ts.map +1 -1
  103. package/dist/src/formats/json/importer.js +159 -126
  104. package/dist/src/formats/json/importer.js.map +1 -1
  105. package/dist/src/formats/json/obographs.d.ts +21 -0
  106. package/dist/src/formats/json/obographs.d.ts.map +1 -0
  107. package/dist/src/formats/json/obographs.js +476 -0
  108. package/dist/src/formats/json/obographs.js.map +1 -0
  109. package/dist/src/formats/obo/importer.d.ts +90 -0
  110. package/dist/src/formats/obo/importer.d.ts.map +1 -0
  111. package/dist/src/formats/obo/importer.js +1248 -0
  112. package/dist/src/formats/obo/importer.js.map +1 -0
  113. package/dist/src/formats/obo/index.d.ts +7 -0
  114. package/dist/src/formats/obo/index.d.ts.map +1 -0
  115. package/dist/src/formats/obo/index.js +7 -0
  116. package/dist/src/formats/obo/index.js.map +1 -0
  117. package/dist/src/formats/obo/syntax.d.ts +121 -0
  118. package/dist/src/formats/obo/syntax.d.ts.map +1 -0
  119. package/dist/src/formats/obo/syntax.js +424 -0
  120. package/dist/src/formats/obo/syntax.js.map +1 -0
  121. package/dist/src/index.d.ts +3 -0
  122. package/dist/src/index.d.ts.map +1 -1
  123. package/dist/src/index.js +3 -0
  124. package/dist/src/index.js.map +1 -1
  125. package/dist/src/registry.d.ts.map +1 -1
  126. package/dist/src/registry.js +8 -1
  127. package/dist/src/registry.js.map +1 -1
  128. package/dist/src/sniff.d.ts +1 -1
  129. package/dist/src/sniff.d.ts.map +1 -1
  130. package/dist/src/sniff.js +25 -3
  131. package/dist/src/sniff.js.map +1 -1
  132. package/package.json +16 -1
  133. package/src/common/json-elements.ts +1147 -0
  134. package/src/common/ontology.ts +169 -0
  135. package/src/formats/cx/importer.ts +2733 -0
  136. package/src/formats/cx/index.ts +7 -0
  137. package/src/formats/cx2/exporter.ts +1036 -0
  138. package/src/formats/cx2/importer.ts +2187 -0
  139. package/src/formats/cx2/index.ts +7 -0
  140. package/src/formats/gexf/exporter.ts +11 -0
  141. package/src/formats/gexf/importer.ts +2 -2
  142. package/src/formats/gexf/index.ts +1 -1
  143. package/src/formats/gml/exporter.ts +1 -1
  144. package/src/formats/json/dialect.ts +37 -7
  145. package/src/formats/json/importer.ts +210 -132
  146. package/src/formats/json/obographs.ts +563 -0
  147. package/src/formats/obo/importer.ts +1695 -0
  148. package/src/formats/obo/index.ts +7 -0
  149. package/src/formats/obo/syntax.ts +466 -0
  150. package/src/index.ts +11 -0
  151. package/src/registry.ts +8 -1
  152. package/src/sniff.ts +48 -5
  153. package/dist/chunks/importer-B6rKRxzv.js.map +0 -1
  154. package/dist/chunks/writer-DHHfHn11.js.map +0 -1
@@ -2222,941 +2222,119 @@ function isAbortError(err) {
2222
2222
  function now() {
2223
2223
  return typeof performance === "object" ? performance.now() : Date.now();
2224
2224
  }
2225
- function formatF32(value) {
2226
- if (!Number.isFinite(value)) {
2227
- return String(value);
2228
- }
2229
- if (value === 0) {
2230
- return Object.is(value, -0) ? "-0" : "0";
2231
- }
2232
- for (let digits = 1; digits <= 9; digits++) {
2233
- const text = value.toPrecision(digits);
2234
- if (Math.fround(Number(text)) === value) {
2235
- return String(Number(text));
2236
- }
2237
- }
2238
- return String(value);
2239
- }
2240
- function formatF64(value) {
2241
- return Object.is(value, -0) ? "-0" : String(value);
2242
- }
2243
- function formatDecimal(value, dtype = "f64") {
2244
- if (!Number.isFinite(value)) {
2245
- return String(value);
2246
- }
2247
- if (Object.is(value, -0)) {
2248
- return "-0.0";
2249
- }
2250
- const text = formatNumber(value, dtype);
2251
- return text.includes(".") || text.includes("e") ? text : `${text}.0`;
2252
- }
2253
- function formatGmlReal(value, dtype = "f64") {
2254
- if (Number.isNaN(value)) {
2255
- return "NAN";
2256
- }
2257
- if (!Number.isFinite(value)) {
2258
- return value > 0 ? "+INF" : "-INF";
2259
- }
2260
- const text = formatDecimal(value, dtype);
2261
- if (text.includes(".")) {
2262
- return text;
2263
- }
2264
- const e = text.indexOf("e");
2265
- return `${text.slice(0, e)}.0${text.slice(e)}`;
2266
- }
2267
- function formatInteger(value) {
2268
- if (Number.isSafeInteger(value) || !Number.isFinite(value)) {
2269
- return String(value);
2270
- }
2271
- return BigInt(value).toString();
2272
- }
2273
- function formatNumber(value, dtype) {
2274
- return dtype === "f32" ? formatF32(value) : formatF64(value);
2275
- }
2276
- const DEFAULT_WEIGHT = 1;
2277
- function isWeightField(name, weightFrom) {
2278
- return weightFrom !== null && name === weightFrom;
2279
- }
2280
- function parseWeightText(text) {
2281
- const trimmed = text.trim();
2282
- if (trimmed.length === 0) {
2283
- return void 0;
2284
- }
2285
- let value;
2286
- try {
2287
- value = parseDecimalText(trimmed);
2288
- } catch (err) {
2289
- throw invalidWeight(text, err);
2290
- }
2291
- if (Number.isNaN(value)) {
2292
- throw invalidWeight(text, null);
2293
- }
2294
- return value;
2295
- }
2296
- function weightFromValue(value) {
2297
- if (value === void 0 || value === null) {
2298
- return void 0;
2299
- }
2300
- if (typeof value === "number") {
2301
- if (Number.isNaN(value)) {
2302
- throw invalidWeight(value, null);
2303
- }
2304
- return value;
2305
- }
2306
- if (typeof value === "string") {
2307
- return parseWeightText(value);
2308
- }
2309
- throw invalidWeight(value, null);
2310
- }
2311
- function invalidWeight(value, cause) {
2312
- let shown;
2313
- switch (typeof value) {
2314
- case "string":
2315
- shown = JSON.stringify(value);
2316
- break;
2317
- case "number":
2318
- shown = String(value);
2319
- break;
2320
- default:
2321
- shown = typeof value;
2322
- }
2323
- return new GraphFormatError("E_INVALID_WEIGHT", `invalid edge weight ${shown}`, {
2324
- value: typeof value === "object" ? typeof value : value,
2325
- cause: cause instanceof Error ? cause.message : null
2326
- });
2327
- }
2328
- const NEGATIVE_ZERO_TEXT = "-0";
2329
- const NUMERIC_DTYPES = /* @__PURE__ */ new Set(["f32", "f64", "i32", "u32", "u8"]);
2330
- function weightFormatter(dtype) {
2331
- switch (dtype) {
2332
- case "f32":
2333
- return formatF32;
2334
- case "f64":
2335
- return formatF64;
2336
- default:
2337
- return formatInteger;
2338
- }
2339
- }
2340
- function explicitWeights(snapshot) {
2341
- const shadowColumn = snapshot.edges.byRole("weight");
2342
- const shadow = shadowColumn !== null && NUMERIC_DTYPES.has(shadowColumn.dtype) ? shadowColumn : null;
2343
- if (shadow !== null) {
2344
- const dtype = shadow.dtype === "f32" ? "f32" : "f64";
2345
- const format = weightFormatter(shadow.dtype);
2346
- return {
2347
- weighted: true,
2348
- dtype,
2349
- isExplicit: (e) => shadow.isSet(e),
2350
- value: (e) => shadow.value(e),
2351
- text: (e, integral = false) => {
2352
- if (!shadow.isSet(e)) {
2353
- return null;
2354
- }
2355
- const value = shadow.value(e);
2356
- if (Object.is(value, -0)) {
2357
- return NEGATIVE_ZERO_TEXT;
2358
- }
2359
- return integral && Number.isInteger(value) ? formatInteger(value) : format(value);
2360
- }
2361
- };
2362
- }
2363
- const { weights } = snapshot.edgeList();
2364
- if (weights === null || !snapshot.flags.weighted) {
2365
- return {
2366
- weighted: false,
2367
- dtype: "f32",
2368
- isExplicit: () => false,
2369
- value: () => DEFAULT_WEIGHT,
2370
- text: () => null
2371
- };
2372
- }
2373
- return {
2374
- weighted: true,
2375
- dtype: "f32",
2376
- isExplicit: () => true,
2377
- value: (e) => weights[e],
2378
- text: (e, integral = false) => {
2379
- const value = weights[e];
2380
- if (Object.is(value, -0)) {
2381
- return NEGATIVE_ZERO_TEXT;
2382
- }
2383
- return integral && Number.isInteger(value) ? formatInteger(value) : formatF32(value);
2384
- }
2385
- };
2386
- }
2387
- const LOSS = Object.freeze({
2388
- /** The format has no mixed direction; expanded pairs are written per onMixedDirection. */
2389
- MIXED_DIRECTION: "W_MIXED_DIRECTION",
2390
- /** The format has no mixed direction and onMixedDirection is "error": export() will throw E_DIRECTED. */
2391
- MIXED_DIRECTION_ERROR: MIXED_DIRECTION_CODE,
2392
- /** Parallel edges in a format without them. */
2393
- MULTI_EDGES: "W_MULTI_EDGES",
2394
- /** Self-loops in a format without them. */
2395
- SELF_LOOPS: "W_SELF_LOOPS",
2396
- /** The format requires edge ids and the snapshot has none; canonical e0..e{E-1} are generated. */
2397
- EDGE_IDS_GENERATED: "W_EDGE_IDS_GENERATED",
2398
- /** The snapshot has an edge id column and the format cannot write one. */
2399
- EDGE_IDS_DROPPED: "W_EDGE_IDS_DROPPED",
2400
- /** Ids outside the format's charset are rewritten (sanitizeIds "mangle"). */
2401
- ID_MANGLED: "W_ID_MANGLED",
2402
- /** Ids outside the format's charset and sanitizeIds "error": export() will throw E_INVALID_ID. */
2403
- ID_CHARSET: "E_ID_CHARSET",
2404
- /** The format numbers nodes 1..N; ids that are not their 1-based index are kept as labels only. */
2405
- ID_RENUMBERED: "W_ID_RENUMBERED",
2406
- /** A column dtype the format does not keep as declared. */
2407
- DTYPE: "W_DTYPE_UNSUPPORTED",
2408
- /** A multi-component column in a format without strides. */
2409
- COMPONENTS: "W_COMPONENTS_FLATTENED",
2410
- /** A list column in a format without lists. */
2411
- LIST: "W_LIST_UNSUPPORTED",
2412
- /** A json column in a format without nested values. */
2413
- JSON: "W_JSON_UNSUPPORTED",
2414
- /** A declared default in a format without defaults. */
2415
- DEFAULT: "W_DEFAULT_DROPPED",
2416
- /** Declared options in a format without enumerations. */
2417
- OPTIONS: "W_OPTIONS_DROPPED",
2418
- /** A parent / parents column in a format without containment. */
2419
- HIERARCHY: "W_HIERARCHY_DROPPED",
2420
- /** A start / end / timestamp column in a format without temporal support. */
2421
- TEMPORAL: TEMPORAL_DROPPED_CODE,
2422
- /** A `<column>.text` companion (design section 5.1) the format cannot carry. */
2423
- TEMPORAL_TEXT: TEMPORAL_TEXT_DROPPED_CODE,
2424
- /** A role column the format has no slot for; written as a plain attribute, the role lost. */
2425
- ROLE: ROLE_DROPPED_CODE,
2426
- /** A parents (multi-parent) column in a format with single containment only. */
2427
- PARENTS: PARENTS_DROPPED_CODE,
2428
- /** A mutual pair written as two directed edges without the mutual mark. */
2429
- MUTUAL_EXPANDED: MUTUAL_EXPANDED_CODE,
2430
- /** A mutual pair written as one undirected edge; the mark is lost and the pair reads back undirected. */
2431
- MUTUAL_AS_UNDIRECTED: MUTUAL_AS_UNDIRECTED_CODE,
2432
- /** Node ids whose written text reads back as the other type under the importer's id rule. */
2433
- ID_TEXT_TYPE: ID_TEXT_TYPE_CODE,
2434
- /** Two node ids share one written text; export() throws E_INVALID_ID. */
2435
- ID_TEXT_COLLISION: ID_TEXT_COLLISION_CODE,
2436
- /** A plain column named like the importer's weight key reads back as THE weight. */
2437
- WEIGHT_KEY_CLASH: WEIGHT_KEY_CLASH_CODE,
2438
- /** A role-less column whose written name the importer maps to a role. */
2439
- ROLE_ASSUMED: ROLE_ASSUMED_CODE,
2440
- /** A role column written into the format's slot reads back under the importer's fixed name. */
2441
- COLUMN_NAME_CHANGED: COLUMN_RENAMED_LOSS_CODE,
2442
- /** A declared column whose every row is unset vanishes through a format without declarations. */
2443
- EMPTY_COLUMN: EMPTY_COLUMN_DROPPED_CODE,
2444
- /** A string / dict column that reads back as the other storage class (the dictionary heuristic). */
2445
- STORAGE_CLASS: STORAGE_CLASS_CODE,
2446
- /** An f64 column whose set values are all integral reads back as i32 through an untyped format. */
2447
- INTEGRAL_F64: INTEGRAL_F64_CODE,
2448
- /** Text cells that read back as numbers or booleans under the 5.1 grammar. */
2449
- TEXT_INFERRED: TEXT_INFERRED_CODE,
2450
- /** A string cell holding a character XML 1.0 forbids; export() throws E_COLUMN_TYPE. */
2451
- XML_ILLEGAL_CHAR: XML_ILLEGAL_CHAR_CODE,
2452
- /** A dict column without declared options gains one on re-import. */
2453
- OPTIONS_GAINED: OPTIONS_GAINED_CODE,
2454
- /** A spells column in a format without spells. */
2455
- SPELLS: "W_SPELLS_DROPPED",
2456
- /** Dynamic attribute values (extension tables) in a format without them. */
2457
- DYNAMIC_VALUES: "W_DYNAMIC_VALUES_DROPPED",
2458
- /** An open-interval column in a format without open intervals (design section 5.1). */
2459
- OPEN_INTERVAL: "W_OPEN_INTERVAL",
2460
- /** Graph-level attributes in a format without them. */
2461
- GRAPH_ATTRIBUTES: "W_GRAPH_ATTRIBUTES_DROPPED",
2462
- /** A position column in a format without positions. */
2463
- POSITIONS: "W_POSITIONS_DROPPED",
2464
- /** Visual columns in a format without them. */
2465
- VIZ: "W_VIZ_DROPPED",
2466
- /** An extension table the format cannot carry. */
2467
- EXTENSION_TABLE: "W_EXTENSION_TABLE_DROPPED"
2468
- });
2469
- const NO_CAPABILITIES = Object.freeze({
2470
- mixedDirection: false,
2471
- multiEdges: false,
2472
- selfLoops: false,
2473
- edgeIds: "none",
2474
- idCharset: "any",
2475
- dtypes: Object.freeze([]),
2476
- components: false,
2477
- lists: false,
2478
- json: false,
2479
- defaults: false,
2480
- options: false,
2481
- hierarchy: false,
2482
- temporal: "none",
2483
- graphAttributes: false,
2484
- positions: false,
2485
- viz: false
2486
- });
2487
- function capabilities(supported) {
2488
- return Object.freeze({ ...NO_CAPABILITIES, ...supported, dtypes: Object.freeze([...supported.dtypes ?? []]) });
2489
- }
2490
- const STRUCTURAL_ROLES = /* @__PURE__ */ new Set(["directed", "pair", "mutual", "weight", "originalId"]);
2491
- const VIZ_ROLES = /* @__PURE__ */ new Set(["color", "size", "shape", "thickness"]);
2492
- const TEMPORAL_ROLES = /* @__PURE__ */ new Set(["start", "end", "timestamp", "timestamps"]);
2493
- const HIERARCHY_ROLES = /* @__PURE__ */ new Set(["parent", "parents"]);
2494
- function checkCapabilities(snapshot, caps, options, extras = {}) {
2495
- const notes = [];
2496
- const note = (code, message, column = null, count = null) => {
2497
- notes.push(Object.freeze({ code, message, column, count }));
2498
- };
2499
- const mixed = countMixedEdges(snapshot);
2500
- if (mixed > 0 && !caps.mixedDirection) {
2501
- if (options.onMixedDirection === "error") {
2502
- note(
2503
- LOSS.MIXED_DIRECTION_ERROR,
2504
- `${mixed} undirected edge(s) in a directed graph; the format has no mixed direction and onMixedDirection is "error"`,
2505
- null,
2506
- mixed
2507
- );
2508
- } else {
2509
- note(
2510
- LOSS.MIXED_DIRECTION,
2511
- `${mixed} undirected edge(s) in a directed graph written as ${options.onMixedDirection}`,
2512
- null,
2513
- mixed
2514
- );
2515
- }
2516
- }
2517
- if (snapshot.flags.multigraph && !caps.multiEdges) {
2518
- const parallel = countParallelArcs(snapshot);
2519
- note(LOSS.MULTI_EDGES, `${parallel} parallel edge(s); the format has no parallel edges`, null, parallel);
2520
- }
2521
- if (snapshot.selfLoopCount > 0 && !caps.selfLoops) {
2522
- note(
2523
- LOSS.SELF_LOOPS,
2524
- `${snapshot.selfLoopCount} self-loop(s); the format has no self-loops`,
2525
- null,
2526
- snapshot.selfLoopCount
2527
- );
2528
- }
2529
- const edgeIds = snapshot.edges.byRole("id");
2530
- if (caps.edgeIds === "required" && edgeIds === null && snapshot.edgeCount > 0) {
2531
- note(
2532
- LOSS.EDGE_IDS_GENERATED,
2533
- "the format requires edge ids; canonical e0..e{E-1} are generated and not written back",
2534
- null,
2535
- snapshot.edgeCount
2536
- );
2537
- } else if (caps.edgeIds === "none" && edgeIds !== null) {
2538
- note(
2539
- LOSS.EDGE_IDS_DROPPED,
2540
- `edge id column "${edgeIds.meta.name}" cannot be written`,
2541
- edgeIds.meta.name,
2542
- snapshot.edgeCount
2543
- );
2544
- }
2545
- const unrepresentable = countUnrepresentableIds(snapshot, caps.idCharset);
2546
- if (unrepresentable > 0) {
2547
- if (caps.idCharset === "dense-1-based") {
2548
- note(
2549
- LOSS.ID_RENUMBERED,
2550
- options.sanitizeIds === "mangle" ? `${unrepresentable} node id(s) are not their 1-based index; nodes are numbered 1..N, the originals kept in the exporter's originalId attribute (restored by restoreMangledIds) and as labels of the nodes without a label value` : `${unrepresentable} node id(s) are not their 1-based index; nodes are numbered 1..N and ids kept as labels of the nodes without a label value (a node with one loses its id)`,
2551
- null,
2552
- unrepresentable
2553
- );
2554
- } else if (options.sanitizeIds === "mangle") {
2555
- note(
2556
- LOSS.ID_MANGLED,
2557
- `${unrepresentable} node id(s) outside the ${caps.idCharset} charset are rewritten; originals kept in the originalId attribute`,
2558
- null,
2559
- unrepresentable
2560
- );
2561
- } else {
2562
- note(
2563
- LOSS.ID_CHARSET,
2564
- `${unrepresentable} node id(s) outside the ${caps.idCharset} charset; export() will throw unless sanitizeIds is "mangle"`,
2565
- null,
2566
- unrepresentable
2567
- );
2568
- }
2569
- }
2570
- checkColumns(snapshot.nodes, "node", caps, extras, note);
2571
- checkColumns(snapshot.edges, "edge", caps, extras, note);
2572
- const graphColumns = snapshot.graph.names();
2573
- if (graphColumns.length > 0) {
2574
- if (caps.graphAttributes) {
2575
- checkColumns(snapshot.graph, "graph", caps, extras, note);
2576
- } else {
2577
- note(
2578
- LOSS.GRAPH_ATTRIBUTES,
2579
- `${graphColumns.length} graph attribute(s) cannot be written`,
2580
- null,
2581
- graphColumns.length
2582
- );
2583
- }
2584
- }
2585
- for (const [name, table] of snapshot.extensions) {
2586
- if (name.startsWith("temporal:")) {
2587
- if (caps.temporal !== "dynamic-values") {
2588
- note(
2589
- LOSS.DYNAMIC_VALUES,
2590
- `dynamic values of "${name}" (${table.rowCount} row(s)) cannot be written`,
2591
- name,
2592
- table.rowCount
2593
- );
2594
- }
2595
- } else {
2596
- note(
2597
- LOSS.EXTENSION_TABLE,
2598
- `extension table "${name}" (${table.rowCount} row(s)) cannot be written`,
2599
- name,
2600
- table.rowCount
2601
- );
2602
- }
2603
- }
2604
- return notes;
2605
- }
2606
- function checkColumns(table, domain, caps, extras, note) {
2607
- for (const column of table) {
2608
- const { meta } = column;
2609
- const { name, role } = meta;
2610
- if (role !== null && STRUCTURAL_ROLES.has(role)) {
2611
- continue;
2612
- }
2613
- const label = `${domain} column "${name}"`;
2614
- if (role !== null && extras.roleNames !== void 0) {
2615
- const fixed = extras.roleNames[role];
2616
- if (fixed !== void 0 && fixed !== name) {
2617
- note(
2618
- LOSS.COLUMN_NAME_CHANGED,
2619
- `${label} (${role}) is written into the format's ${role} slot and reads back as "${fixed}"`,
2620
- name,
2621
- column.length - column.nullCount
2622
- );
2623
- }
2624
- }
2625
- if (domain === "edge" && role === "id") {
2626
- continue;
2627
- }
2628
- if (role === "timeText") {
2629
- if (extras.temporalText !== true) {
2630
- note(
2631
- LOSS.TEMPORAL_TEXT,
2632
- `${label} (the lexical form of a temporal column, design section 5.1) cannot be written`,
2633
- name,
2634
- column.length - column.nullCount
2635
- );
2636
- }
2637
- continue;
2638
- }
2639
- if (role === "position") {
2640
- if (!caps.positions) {
2641
- note(LOSS.POSITIONS, `${label} (positions) cannot be written`, name, column.length - column.nullCount);
2642
- } else if (extras.positionDtype !== void 0 && meta.dtype !== extras.positionDtype) {
2643
- note(
2644
- LOSS.DTYPE,
2645
- `${label} (positions) is ${meta.dtype}; the format reads positions back as ${extras.positionDtype}`,
2646
- name,
2647
- column.length - column.nullCount
2648
- );
2649
- }
2650
- continue;
2651
- }
2652
- if (role !== null && VIZ_ROLES.has(role)) {
2653
- if (!caps.viz) {
2654
- note(LOSS.VIZ, `${label} (${role}) cannot be written`, name, column.length - column.nullCount);
2655
- }
2656
- continue;
2657
- }
2658
- if (role !== null && HIERARCHY_ROLES.has(role)) {
2659
- if (!caps.hierarchy) {
2660
- note(LOSS.HIERARCHY, `${label} (${role}) cannot be written`, name, column.length - column.nullCount);
2661
- }
2662
- continue;
2663
- }
2664
- if (role !== null && TEMPORAL_ROLES.has(role)) {
2665
- if (caps.temporal === "none") {
2666
- note(LOSS.TEMPORAL, `${label} (${role}) cannot be written`, name, column.length - column.nullCount);
2667
- }
2668
- continue;
2669
- }
2670
- if (role === "spells") {
2671
- if (caps.temporal !== "spells" && caps.temporal !== "dynamic-values") {
2672
- note(LOSS.SPELLS, `${label} (spells) cannot be written`, name, column.length - column.nullCount);
2673
- }
2674
- continue;
2675
- }
2676
- if (role === "open" || role === "spellsOpen") {
2677
- if (extras.openIntervals !== true) {
2678
- note(
2679
- LOSS.OPEN_INTERVAL,
2680
- `${label} (open intervals) cannot be written`,
2681
- name,
2682
- column.length - column.nullCount
2683
- );
2684
- }
2685
- continue;
2686
- }
2687
- if (role !== null && !(extras.roles?.has(role) ?? false)) {
2688
- note(
2689
- LOSS.ROLE,
2690
- `${label} (${role}) is written as a plain attribute; the format has no ${role} slot and the role is lost`,
2691
- name,
2692
- column.length - column.nullCount
2693
- );
2694
- }
2695
- if (meta.dynamic && caps.temporal !== "dynamic-values") {
2696
- note(LOSS.DYNAMIC_VALUES, `${label} is dynamic; only its static value can be written`, name, null);
2697
- }
2698
- checkDtype(column, label, caps, note);
2699
- if (meta.default !== void 0 && !caps.defaults) {
2700
- note(LOSS.DEFAULT, `${label} declares a default; the format has no defaults`, name, null);
2701
- }
2702
- if (meta.options !== null && !caps.options) {
2703
- note(LOSS.OPTIONS, `${label} declares options; the format has no enumerations`, name, null);
2704
- }
2705
- }
2706
- }
2707
- function checkDtype(column, label, caps, note) {
2708
- const { meta } = column;
2709
- const { name } = meta;
2710
- const set = column.length - column.nullCount;
2711
- switch (meta.dtype) {
2712
- case "list":
2713
- if (!caps.lists) {
2714
- note(LOSS.LIST, `${label} is a list; the format has no lists`, name, set);
2715
- } else if (meta.itemDtype !== null && !caps.dtypes.includes(meta.itemDtype)) {
2716
- note(
2717
- LOSS.DTYPE,
2718
- `${label} holds ${meta.itemDtype} items; the format cannot keep that dtype`,
2719
- name,
2720
- set
2721
- );
2722
- } else if (meta.itemDtype === "dict") {
2723
- note(LOSS.DTYPE, `${label} holds dict items; list items read back as string`, name, set);
2724
- }
2725
- break;
2726
- case "json":
2727
- if (!caps.json) {
2728
- note(LOSS.JSON, `${label} holds nested values; the format has no nested values`, name, set);
2729
- }
2730
- break;
2731
- default:
2732
- if (!caps.dtypes.includes(meta.dtype)) {
2733
- note(LOSS.DTYPE, `${label} is ${meta.dtype}; the format cannot keep that dtype`, name, set);
2734
- }
2735
- if (meta.components > 1 && !caps.components) {
2736
- note(
2737
- LOSS.COMPONENTS,
2738
- `${label} has ${meta.components} components; the format has no strides`,
2739
- name,
2740
- set
2741
- );
2742
- }
2743
- break;
2744
- }
2745
- }
2746
- function countMixedEdges(snapshot) {
2747
- if (!snapshot.directed) {
2748
- return 0;
2749
- }
2750
- const directed = snapshot.edges.byRole("directed");
2751
- if (directed === null || directed.dtype !== "bool") {
2752
- return 0;
2753
- }
2754
- const pair = snapshot.edges.byRole("pair");
2755
- let undirectedRows = 0;
2756
- let paired = 0;
2757
- for (let e = 0; e < snapshot.edgeCount; e++) {
2758
- if (directed.isSet(e) && directed.value(e) === false) {
2759
- undirectedRows++;
2760
- if (pair !== null && pair.dtype === "u32" && pair.isSet(e) && pair.data[e] !== INVALID_INDEX) {
2761
- paired++;
2762
- }
2763
- }
2764
- }
2765
- return paired / 2 + (undirectedRows - paired);
2766
- }
2767
- function countParallelArcs(snapshot) {
2768
- const { rowPtr, colIdx, nodeCount } = snapshot;
2769
- let count = 0;
2770
- for (let u = 0; u < nodeCount; u++) {
2771
- for (let a = rowPtr[u] + 1; a < rowPtr[u + 1]; a++) {
2772
- if (colIdx[a] === colIdx[a - 1]) {
2773
- count++;
2774
- }
2775
- }
2776
- }
2777
- return snapshot.directed ? count : Math.ceil(count / 2);
2778
- }
2779
- const NAME_CHAR_RANGES = [
2780
- [45, 46],
2781
- [48, 58],
2782
- [65, 90],
2783
- [95, 95],
2784
- [97, 122],
2785
- [183, 183],
2786
- [192, 214],
2787
- [216, 246],
2788
- [248, 893],
2789
- [895, 8191],
2790
- [8204, 8205],
2791
- [8255, 8256],
2792
- [8304, 8591],
2793
- [11264, 12271],
2794
- [12289, 55295],
2795
- [63744, 64975],
2796
- [65008, 65533],
2797
- [65536, 983039]
2798
- ];
2799
- function isNameChar(cp) {
2800
- for (const [lo, hi] of NAME_CHAR_RANGES) {
2801
- if (cp < lo) {
2802
- return false;
2803
- }
2804
- if (cp <= hi) {
2805
- return true;
2806
- }
2807
- }
2808
- return false;
2809
- }
2810
- function isNmtoken(text) {
2811
- if (text.length === 0) {
2812
- return false;
2813
- }
2814
- for (const ch of text) {
2815
- const cp = ch.codePointAt(0);
2816
- if (cp === void 0 || !isNameChar(cp)) {
2817
- return false;
2818
- }
2819
- }
2820
- return true;
2821
- }
2822
- function isRepresentableId(id, charset) {
2823
- switch (charset) {
2824
- case "any":
2825
- return true;
2826
- case "nmtoken":
2827
- return isNmtoken(String(id));
2828
- case "integer":
2829
- return typeof id === "number" && Number.isSafeInteger(id);
2830
- case "dense-1-based":
2831
- return false;
2832
- default: {
2833
- const name = charset;
2834
- throw new GraphFormatError("E_UNSUPPORTED", `unknown id charset ${name}`, { charset: name });
2835
- }
2836
- }
2837
- }
2838
- function countUnrepresentableIds(snapshot, charset) {
2839
- const { ids } = snapshot;
2840
- if (charset === "any") {
2841
- return 0;
2842
- }
2843
- if (charset === "dense-1-based") {
2844
- if (ids.kind === "identity" && ids.offset === 1) {
2845
- return 0;
2846
- }
2847
- let changed = 0;
2848
- for (let i = 0; i < ids.size; i++) {
2849
- if (ids.idOf(i) !== i + 1) {
2850
- changed++;
2851
- }
2852
- }
2853
- return changed;
2854
- }
2855
- let count = 0;
2856
- for (let i = 0; i < ids.size; i++) {
2857
- if (!isRepresentableId(ids.idOf(i), charset)) {
2858
- count++;
2859
- }
2860
- }
2861
- return count;
2862
- }
2863
- function sanitizeIds(snapshot, charset, mode) {
2864
- const { ids } = snapshot;
2865
- const n = ids.size;
2866
- if (charset === "dense-1-based") {
2867
- const changed = countUnrepresentableIds(snapshot, charset);
2868
- return {
2869
- charset,
2870
- changed,
2871
- idAt: (i) => i + 1,
2872
- isChanged: (i) => ids.idOf(i) !== i + 1,
2873
- originalAt: (i) => ids.idOf(i)
2874
- };
2875
- }
2876
- const unchanged = {
2877
- charset,
2878
- changed: 0,
2879
- idAt: (i) => ids.idOf(i),
2880
- isChanged: () => false,
2881
- originalAt: (i) => ids.idOf(i)
2882
- };
2883
- if (charset === "any") {
2884
- return unchanged;
2885
- }
2886
- const bad = [];
2887
- for (let i = 0; i < n; i++) {
2888
- if (!isRepresentableId(ids.idOf(i), charset)) {
2889
- bad.push(i);
2890
- }
2891
- }
2892
- if (bad.length === 0) {
2893
- return unchanged;
2894
- }
2895
- if (mode === "error") {
2896
- const first = ids.idOf(bad[0]);
2897
- throw new GraphFormatError(
2898
- "E_INVALID_ID",
2899
- `${bad.length} node id(s) cannot be written as ${charset} (first: ${JSON.stringify(first)} at index ${bad[0]}); pass sanitizeIds: "mangle" to rewrite them`,
2900
- { reason: "charset", charset, count: bad.length, id: first, index: bad[0] }
2901
- );
2902
- }
2903
- const written = /* @__PURE__ */ new Map();
2904
- if (charset === "nmtoken") {
2905
- const used = /* @__PURE__ */ new Set();
2906
- for (let i = 0; i < n; i++) {
2907
- const id = ids.idOf(i);
2908
- if (isRepresentableId(id, charset)) {
2909
- used.add(String(id));
2910
- }
2911
- }
2912
- for (const i of bad) {
2913
- const base = mangleNmtoken(String(ids.idOf(i)));
2914
- let candidate = base;
2915
- for (let k = 2; used.has(candidate); k++) {
2916
- candidate = `${base}_${k}`;
2917
- }
2918
- used.add(candidate);
2919
- written.set(i, candidate);
2920
- }
2921
- } else {
2922
- const used = /* @__PURE__ */ new Set();
2923
- for (let i = 0; i < n; i++) {
2924
- const id = ids.idOf(i);
2925
- if (typeof id === "number" && Number.isSafeInteger(id)) {
2926
- used.add(id);
2927
- }
2928
- }
2929
- let next = 0;
2930
- for (const i of bad) {
2931
- while (used.has(next)) {
2932
- next++;
2933
- }
2934
- used.add(next);
2935
- written.set(i, next);
2936
- next++;
2937
- }
2938
- }
2939
- return {
2940
- charset,
2941
- changed: bad.length,
2942
- idAt: (i) => written.get(i) ?? ids.idOf(i),
2943
- isChanged: (i) => written.has(i),
2944
- originalAt: (i) => ids.idOf(i)
2945
- };
2946
- }
2947
- function mangleNmtoken(text) {
2948
- let out = "";
2949
- for (const ch of text) {
2950
- const cp = ch.codePointAt(0);
2951
- out += cp !== void 0 && isNameChar(cp) ? ch : "_";
2952
- }
2953
- return out.length === 0 ? "_" : out;
2954
- }
2955
- const DEFAULT_CHUNK_BYTES = 64 * 1024;
2956
- async function* encodeChunks(parts, chunkBytes = DEFAULT_CHUNK_BYTES) {
2957
- const encoder = new TextEncoder();
2958
- let pending = [];
2959
- let pendingUnits = 0;
2960
- for await (const part of parts) {
2961
- if (part.length === 0) {
2962
- continue;
2963
- }
2964
- pending.push(part);
2965
- pendingUnits += part.length;
2966
- if (pendingUnits >= chunkBytes) {
2967
- yield encoder.encode(pending.length === 1 ? pending[0] : pending.join(""));
2968
- pending = [];
2969
- pendingUnits = 0;
2970
- }
2971
- }
2972
- if (pending.length > 0) {
2973
- yield encoder.encode(pending.length === 1 ? pending[0] : pending.join(""));
2974
- }
2975
- }
2976
- async function joinText(parts) {
2977
- const collected = [];
2978
- for await (const part of parts) {
2979
- collected.push(part);
2980
- }
2981
- return collected.join("");
2982
- }
2983
- async function decodeChunks(chunks) {
2984
- const decoder = new TextDecoder("utf-8", { fatal: true });
2985
- const parts = [];
2986
- for await (const chunk of chunks) {
2987
- parts.push(decoder.decode(chunk, { stream: true }));
2988
- }
2989
- parts.push(decoder.decode());
2990
- return parts.join("");
2991
- }
2992
- async function collectBytes(chunks) {
2993
- const parts = [];
2994
- let total = 0;
2995
- for await (const chunk of chunks) {
2996
- parts.push(chunk);
2997
- total += chunk.byteLength;
2998
- }
2999
- const out = new Uint8Array(total);
3000
- let offset = 0;
3001
- for (const part of parts) {
3002
- out.set(part, offset);
3003
- offset += part.byteLength;
3004
- }
3005
- return out;
3006
- }
3007
- function toReadableStream(chunks) {
3008
- const iterator = chunks[Symbol.asyncIterator]();
3009
- return new ReadableStream({
3010
- async pull(controller) {
3011
- const { done, value } = await iterator.next();
3012
- if (done) {
3013
- controller.close();
3014
- return;
3015
- }
3016
- controller.enqueue(value);
3017
- },
3018
- async cancel() {
3019
- await iterator.return?.(void 0);
3020
- }
3021
- });
3022
- }
3023
2225
  export {
3024
- PARENT_CYCLE_CODE as $,
2226
+ ROLE_ASSUMED_CODE as $,
3025
2227
  AMBIGUOUS_GRAPH_NAME_CODE as A,
3026
2228
  BAD_ASPECT_BLOCK_CODE as B,
3027
2229
  COLUMN_RENAMED_CODE as C,
3028
2230
  DANGLING_REFERENCE_CODE as D,
3029
2231
  EMPTY_COLUMN_DROPPED_CODE as E,
3030
- INVALID_ENCODING_CODE as F,
2232
+ IdCoercer as F,
3031
2233
  GRAPH_NOT_FOUND_CODE as G,
3032
2234
  HYPEREDGE_CODE as H,
3033
2235
  ImportReportBuilder as I,
3034
- INVALID_UTF8_CODE as J,
3035
- IdCoercer as K,
3036
- ImportError as L,
3037
- LOSS as M,
3038
- LineReader as N,
3039
- MISSING_ENDPOINT_CODE as O,
3040
- MISSING_ID_CODE as P,
3041
- MIXED_DIRECTION_CODE as Q,
3042
- MULTIPLE_GRAPHS_CODE as R,
3043
- MUTUAL_AS_UNDIRECTED_CODE as S,
3044
- MUTUAL_COLUMN as T,
3045
- MUTUAL_EXPANDED_CODE as U,
3046
- NO_CAPABILITIES as V,
3047
- NO_GRAPH_CODE as W,
3048
- OPTIONS_GAINED_CODE as X,
3049
- OPTION_IGNORED_CODE as Y,
3050
- PAIR_COLUMN as Z,
3051
- PARENTS_DROPPED_CODE as _,
3052
- throwIfAborted as a,
3053
- weightFromValue as a$,
3054
- PARSE_ERROR_CODE as a0,
3055
- PRECISION_CODE as a1,
3056
- RENAMED_CODE as a2,
3057
- ROLE_ASSUMED_CODE as a3,
3058
- ROLE_DROPPED_CODE as a4,
3059
- ROLE_TAKEN_CODE as a5,
3060
- SINK_OPTION_CODE as a6,
3061
- STATUS_FAILED_CODE as a7,
3062
- STATUS_WARNING_CODE as a8,
3063
- STORAGE_CLASS_CODE as a9,
3064
- decodeEntryName as aA,
3065
- encodeChunks as aB,
3066
- explicitWeights as aC,
3067
- formatDecimal as aD,
3068
- formatF32 as aE,
3069
- formatF64 as aF,
3070
- formatGmlReal as aG,
3071
- formatInteger as aH,
3072
- inputLength as aI,
3073
- isAbortError as aJ,
3074
- isCanonicalIntegerText as aK,
3075
- isImportInput as aL,
3076
- isNmtoken as aM,
3077
- isWeightField as aN,
3078
- joinText as aO,
3079
- mangleNmtoken as aP,
3080
- pairFolding as aQ,
3081
- parseWeightText as aR,
3082
- readText as aS,
3083
- reportSinkOptions as aT,
3084
- reportUnusedOptions as aU,
3085
- resolveExportOptions as aV,
3086
- resolveImportOptions as aW,
3087
- sanitizeIds as aX,
3088
- toReadableStream as aY,
3089
- isNameChar as aZ,
3090
- countMixedEdges as a_,
3091
- STRAY_TEXT_CODE as aa,
3092
- STYLES_NOT_IMPORTED_CODE as ab,
3093
- SYNTAX_CODE as ac,
3094
- TEMPORAL_DROPPED_CODE as ad,
3095
- TEMPORAL_TEXT_DROPPED_CODE as ae,
3096
- TEXT_INFERRED_CODE as af,
3097
- TOO_LARGE_CODE as ag,
3098
- UNKNOWN_ATTR_TYPE_CODE as ah,
3099
- UNKNOWN_ELEMENT_CODE as ai,
3100
- UNKNOWN_ENCODING_CODE as aj,
3101
- UNKNOWN_PARENT_CODE as ak,
3102
- UNKNOWN_TYPE_CODE as al,
3103
- WEIGHT_KEY_CLASH_CODE as am,
3104
- WIDENED_CODE as an,
3105
- XML_ILLEGAL_CHAR_CODE as ao,
3106
- XML_SYNTAX_CODE as ap,
3107
- canonicalId as aq,
3108
- capabilities as ar,
3109
- checkCapabilities as as,
3110
- chooseGraph as at,
3111
- coerceId as au,
3112
- coerceIdText as av,
3113
- collectBytes as aw,
3114
- declareCompanion as ax,
3115
- declareResolved as ay,
3116
- decodeChunks as az,
3117
- ASPECT_ORDER_CODE as b,
3118
- uniqueColumnName as b0,
3119
- TIME_TEXT_ROLE as b1,
3120
- TIME_TEXT_SUFFIX as b2,
3121
- declareAttribute as b3,
3122
- parseDeclaredTemporal as b4,
3123
- parseDeclaredValue as b5,
3124
- losesPrecision as b6,
3125
- parseTimeText as b7,
3126
- splitListText as b8,
3127
- timeTextCompanion as b9,
3128
- parseDecimalText as ba,
3129
- formatTimeValue as bb,
3130
- mapDeclaredType as bc,
3131
- joinListText as bd,
3132
- formatTemporal as be,
3133
- DictHeuristic as bf,
3134
- DICT_SAMPLE_ROWS as bg,
3135
- declareOn as bh,
3136
- takenIn as bi,
3137
- BAD_DEFAULT_CODE as c,
3138
- BAD_OPTIONS_CODE as d,
3139
- BAD_VALUE_CODE as e,
3140
- COLUMN_RENAMED_LOSS_CODE as f,
3141
- COUNT_HINT_CODE as g,
3142
- COUNT_MISMATCH_CODE as h,
3143
- DEFAULT_CHUNK_BYTES as i,
3144
- DEFAULT_ERROR_LIMIT as j,
3145
- DIRECTED_COLUMN as k,
3146
- DIRECTION_FORCED_CODE as l,
3147
- DIRECTION_REFUSED_CODE as m,
3148
- DUPLICATE_ATTRIBUTE_CODE as n,
3149
- DUPLICATE_EDGE_ID_CODE as o,
3150
- DUPLICATE_KEY_CODE as p,
3151
- DUPLICATE_NODE_CODE as q,
3152
- DirectionResolver as r,
3153
- EMPTY_INPUT_CODE as s,
3154
- textChunks as t,
3155
- ENCODING_FALLBACK_CODE as u,
3156
- EQUATION_AS_TEXT_CODE as v,
3157
- ID_MERGED_CODE as w,
3158
- ID_TEXT_COLLISION_CODE as x,
3159
- ID_TEXT_TYPE_CODE as y,
3160
- INTEGRAL_F64_CODE as z
2236
+ ImportError as J,
2237
+ MISSING_ID_CODE as K,
2238
+ LineReader as L,
2239
+ MISSING_ENDPOINT_CODE as M,
2240
+ MIXED_DIRECTION_CODE as N,
2241
+ MULTIPLE_GRAPHS_CODE as O,
2242
+ MUTUAL_AS_UNDIRECTED_CODE as P,
2243
+ MUTUAL_COLUMN as Q,
2244
+ MUTUAL_EXPANDED_CODE as R,
2245
+ NO_GRAPH_CODE as S,
2246
+ OPTIONS_GAINED_CODE as T,
2247
+ OPTION_IGNORED_CODE as U,
2248
+ PAIR_COLUMN as V,
2249
+ PARENTS_DROPPED_CODE as W,
2250
+ PARENT_CYCLE_CODE as X,
2251
+ PARSE_ERROR_CODE as Y,
2252
+ PRECISION_CODE as Z,
2253
+ RENAMED_CODE as _,
2254
+ ASPECT_ORDER_CODE as a,
2255
+ ROLE_DROPPED_CODE as a0,
2256
+ ROLE_TAKEN_CODE as a1,
2257
+ SINK_OPTION_CODE as a2,
2258
+ STATUS_FAILED_CODE as a3,
2259
+ STATUS_WARNING_CODE as a4,
2260
+ STORAGE_CLASS_CODE as a5,
2261
+ STRAY_TEXT_CODE as a6,
2262
+ STYLES_NOT_IMPORTED_CODE as a7,
2263
+ SYNTAX_CODE as a8,
2264
+ TEMPORAL_DROPPED_CODE as a9,
2265
+ reportUnusedOptions as aA,
2266
+ resolveExportOptions as aB,
2267
+ resolveImportOptions as aC,
2268
+ textChunks as aD,
2269
+ uniqueColumnName as aE,
2270
+ parseDecimalText as aF,
2271
+ TIME_TEXT_ROLE as aG,
2272
+ TIME_TEXT_SUFFIX as aH,
2273
+ declareAttribute as aI,
2274
+ parseDeclaredTemporal as aJ,
2275
+ parseDeclaredValue as aK,
2276
+ losesPrecision as aL,
2277
+ parseTimeText as aM,
2278
+ splitListText as aN,
2279
+ timeTextCompanion as aO,
2280
+ formatTimeValue as aP,
2281
+ mapDeclaredType as aQ,
2282
+ joinListText as aR,
2283
+ formatTemporal as aS,
2284
+ DictHeuristic as aT,
2285
+ DICT_SAMPLE_ROWS as aU,
2286
+ declareOn as aV,
2287
+ takenIn as aW,
2288
+ TEMPORAL_TEXT_DROPPED_CODE as aa,
2289
+ TEXT_INFERRED_CODE as ab,
2290
+ TOO_LARGE_CODE as ac,
2291
+ UNKNOWN_ATTR_TYPE_CODE as ad,
2292
+ UNKNOWN_ELEMENT_CODE as ae,
2293
+ UNKNOWN_ENCODING_CODE as af,
2294
+ UNKNOWN_PARENT_CODE as ag,
2295
+ UNKNOWN_TYPE_CODE as ah,
2296
+ WEIGHT_KEY_CLASH_CODE as ai,
2297
+ WIDENED_CODE as aj,
2298
+ XML_ILLEGAL_CHAR_CODE as ak,
2299
+ XML_SYNTAX_CODE as al,
2300
+ canonicalId as am,
2301
+ chooseGraph as an,
2302
+ coerceId as ao,
2303
+ coerceIdText as ap,
2304
+ declareCompanion as aq,
2305
+ declareResolved as ar,
2306
+ decodeEntryName as as,
2307
+ inputLength as at,
2308
+ isAbortError as au,
2309
+ isCanonicalIntegerText as av,
2310
+ isImportInput as aw,
2311
+ pairFolding as ax,
2312
+ readText as ay,
2313
+ reportSinkOptions as az,
2314
+ BAD_DEFAULT_CODE as b,
2315
+ BAD_OPTIONS_CODE as c,
2316
+ BAD_VALUE_CODE as d,
2317
+ COLUMN_RENAMED_LOSS_CODE as e,
2318
+ COUNT_HINT_CODE as f,
2319
+ COUNT_MISMATCH_CODE as g,
2320
+ DEFAULT_ERROR_LIMIT as h,
2321
+ DIRECTED_COLUMN as i,
2322
+ DIRECTION_FORCED_CODE as j,
2323
+ DIRECTION_REFUSED_CODE as k,
2324
+ DUPLICATE_ATTRIBUTE_CODE as l,
2325
+ DUPLICATE_EDGE_ID_CODE as m,
2326
+ DUPLICATE_KEY_CODE as n,
2327
+ DUPLICATE_NODE_CODE as o,
2328
+ DirectionResolver as p,
2329
+ EMPTY_INPUT_CODE as q,
2330
+ ENCODING_FALLBACK_CODE as r,
2331
+ EQUATION_AS_TEXT_CODE as s,
2332
+ throwIfAborted as t,
2333
+ ID_MERGED_CODE as u,
2334
+ ID_TEXT_COLLISION_CODE as v,
2335
+ ID_TEXT_TYPE_CODE as w,
2336
+ INTEGRAL_F64_CODE as x,
2337
+ INVALID_ENCODING_CODE as y,
2338
+ INVALID_UTF8_CODE as z
3161
2339
  };
3162
- //# sourceMappingURL=writer-DHHfHn11.js.map
2340
+ //# sourceMappingURL=report-BcWboivV.js.map