{"version":3,"sources":["jsdelivr-header.js","/npm/@thi.ng/dgraph-dot@2.1.193/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,+DCHK,MAAC,EAAQ,CAAC,EAAK,KAClB,MAAM,EAAQ,GACR,EAAQ,GACR,EAAQ,EAAK,OAAS,EAAK,GAC3B,EAAO,EAAK,KAClB,IAAK,MAAM,KAAK,EAAI,QAAS,CAC3B,MAAM,EAAK,EAAK,GAAG,GACnB,EAAM,GAAM,EAAO,EAAK,GAAK,CAAE,MAAO,EAAM,IAC5C,IAAK,MAAM,KAAK,EAAI,sBAAsB,GACxC,EAAM,KAAK,CAAE,IAAK,EAAI,KAAM,EAAK,GAAG,IAE1C,CACE,MAAM,EAAQ,CACZ,QAAS,EAAK,QACd,UAAU,EACV,QACA,SAEF,OAAO,EAAe,EAAM,S","file":"/npm/@thi.ng/dgraph-dot@2.1.193/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/@thi.ng/dgraph-dot@2.1.193/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import {\n  serializeGraph\n} from \"@thi.ng/dot\";\nconst toDot = (src, opts) => {\n  const nodes = {};\n  const edges = [];\n  const label = opts.label || opts.id;\n  const spec = opts.spec;\n  for (const n of src.nodes()) {\n    const id = opts.id(n);\n    nodes[id] = spec ? spec(n) : { label: label(n) };\n    for (const d of src.immediateDependencies(n)) {\n      edges.push({ src: id, dest: opts.id(d) });\n    }\n  }\n  const graph = {\n    attribs: opts.attribs,\n    directed: true,\n    edges,\n    nodes\n  };\n  return serializeGraph(graph);\n};\nexport {\n  toDot\n};\n"]}