import{D as i,e as u,s as o}from"./chunk-BKDDFIKN.mjs";import{a as d}from"./chunk-GTKDMUJJ.mjs";function l(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:f(e),edges:s(e)};return i(e.graph())||(n.value=u(e.graph())),n}d(l,"write");function f(e){return o(e.nodes(),function(n){var r=e.node(n),a=e.parent(n),t={v:n};return i(r)||(t.value=r),i(a)||(t.parent=a),t})}d(f,"writeNodes");function s(e){return o(e.edges(),function(n){var r=e.edge(n),a={v:n.v,w:n.w};return i(n.name)||(a.name=n.name),i(r)||(a.value=r),a})}d(s,"writeEdges");export{l as a};
