Liferay.Loader.define("portal-workflow-kaleo-designer-web$dagre@0.8.2/lib/order/build-layer-graph",["module","exports","require","../lodash","../graphlib"],(function(e,r,o){window;var a=o("../lodash"),n=o("../graphlib").Graph;e.exports=function buildLayerGraph(e,r,o){var t=function createRootNode(e){for(var r;e.hasNode(r=a.uniqueId("_root")););return r}(e),d=new n({compound:!0}).setGraph({root:t}).setDefaultNodeLabel((function(r){return e.node(r)}));return a.forEach(e.nodes(),(function(n){var i=e.node(n),h=e.parent(n);(i.rank===r||i.minRank<=r&&r<=i.maxRank)&&(d.setNode(n),d.setParent(n,h||t),a.forEach(e[o](n),(function(r){var o=r.v===n?r.w:r.v,t=d.edge(o,n),i=a.isUndefined(t)?0:t.weight;d.setEdge(o,n,{weight:e.edge(r).weight+i})})),a.has(i,"minRank")&&d.setNode(n,{borderLeft:i.borderLeft[r],borderRight:i.borderRight[r]}))})),d}}));
//# sourceMappingURL=build-layer-graph.js.map