import forEach_default from "../../../../lodash-es/forEach.js";
function addSubgraphConstraints(t, n, r) {
	var i = {}, a;
	forEach_default(r, function(e) {
		for (var r = t.parent(e), o, s; r;) {
			if (o = t.parent(r), o ? (s = i[o], i[o] = r) : (s = a, a = r), s && s !== r) {
				n.setEdge(s, r);
				return;
			}
			r = o;
		}
	});
}
export { addSubgraphConstraints };
