@dagrejs/dagre 3.1.0 → 3.1.1
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.
- package/dist/dagre.cjs +3 -0
- package/dist/dagre.cjs.map +7 -0
- package/dist/dagre.esm.js +1 -1
- package/dist/dagre.esm.js.map +4 -4
- package/dist/dagre.js +287 -245
- package/dist/dagre.js.map +4 -4
- package/dist/dagre.min.js +1 -1
- package/dist/dagre.min.js.map +4 -4
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/acyclic.d.ts +1 -1
- package/dist/types/lib/acyclic.d.ts.map +1 -1
- package/dist/types/lib/graph-lib.d.ts +5 -2
- package/dist/types/lib/graph-lib.d.ts.map +1 -1
- package/dist/types/lib/layout.d.ts +2 -2
- package/dist/types/lib/layout.d.ts.map +1 -1
- package/dist/types/lib/types.d.ts +3 -2
- package/dist/types/lib/types.d.ts.map +1 -1
- package/dist/types/lib/version.d.ts +1 -1
- package/package.json +5 -4
- package/dist/dagre.cjs.js +0 -3
- package/dist/dagre.cjs.js.map +0 -7
- /package/dist/{dagre.cjs.js.LEGAL.txt → dagre.cjs.LEGAL.txt} +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as graphlib from '
|
|
1
|
+
import * as graphlib from './lib/graph-lib';
|
|
2
2
|
import { notime, time } from './lib/util';
|
|
3
3
|
import { layout } from './lib/layout';
|
|
4
4
|
import { debugOrdering as debug } from './lib/debug';
|
|
5
5
|
export { graphlib };
|
|
6
|
-
export { Graph } from '
|
|
6
|
+
export { Graph } from './lib/graph-lib';
|
|
7
7
|
export { version } from './lib/version';
|
|
8
8
|
export { layout } from './lib/layout';
|
|
9
9
|
export { debugOrdering as debug } from './lib/debug';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,YAAY,CAAC;AAExC,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,aAAa,IAAI,KAAK,EAAC,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAC,QAAQ,EAAC,CAAC;AAElB,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,aAAa,IAAI,KAAK,EAAC,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,IAAI;;;CAAiB,CAAC;AAGnC,YAAY,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACT,SAAS,EACT,KAAK,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,IAAI,EACP,MAAM,aAAa,CAAC;AAErB,QAAA,MAAM,KAAK;;;;;;;;;CAMV,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Graph } from "
|
|
1
|
+
import { Graph } from "./graph-lib";
|
|
2
2
|
import type { EdgeLabel, GraphLabel, NodeLabel } from "./types";
|
|
3
3
|
export { run, undo };
|
|
4
4
|
declare function run(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, oldGraph?: Graph | null): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acyclic.d.ts","sourceRoot":"","sources":["../../../lib/acyclic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"acyclic.d.ts","sourceRoot":"","sources":["../../../lib/acyclic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAGlC,OAAO,KAAK,EAAO,SAAS,EAAE,UAAU,EAAE,SAAS,EAAiB,MAAM,SAAS,CAAC;AAEpF,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,CAAC;AAEnB,iBAAS,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAiB1F;AAmDD,iBAAS,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAYlE"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { alg, Graph } from "@dagrejs/graphlib";
|
|
2
|
-
export
|
|
1
|
+
import { alg, Graph as GraphLibGraph } from "@dagrejs/graphlib";
|
|
2
|
+
export type Graph<G = any, N = any, E = any> = GraphLibGraph<G, N, E>;
|
|
3
|
+
export declare const Graph: new <G = any, N = any, E = any>(opts?: any) => GraphLibGraph<G, N, E>;
|
|
4
|
+
export type { Edge } from "@dagrejs/graphlib";
|
|
5
|
+
export { alg };
|
|
3
6
|
//# sourceMappingURL=graph-lib.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-lib.d.ts","sourceRoot":"","sources":["../../../lib/graph-lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"graph-lib.d.ts","sourceRoot":"","sources":["../../../lib/graph-lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,KAAK,IAAI,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAI9D,MAAM,MAAM,KAAK,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAEtE,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAwB,CAAC;AACjH,YAAY,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,GAAG,EAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Graph } from "./graph-lib";
|
|
2
|
-
import type {
|
|
3
|
-
export declare function layout(g: Graph<
|
|
2
|
+
import type { LayoutOptions } from "./types";
|
|
3
|
+
export declare function layout<G = any, N = any, E = any>(g: Graph<G, N, E>, opts?: LayoutOptions): Graph<G, N, E>;
|
|
4
4
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../lib/layout.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../lib/layout.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,EAA8B,aAAa,EAAmC,MAAM,SAAS,CAAC;AAiC1G,wBAAgB,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,GAAE,aAAkB,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAI7G"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Graph } from '@dagrejs/graphlib';
|
|
2
|
-
export type
|
|
1
|
+
import { Graph as GraphLibGraph } from '@dagrejs/graphlib';
|
|
2
|
+
export type Graph<G = any, N = any, E = any> = GraphLibGraph<G, N, E>;
|
|
3
|
+
export type { Edge as GraphEdge } from '@dagrejs/graphlib';
|
|
3
4
|
export interface Point {
|
|
4
5
|
x: number;
|
|
5
6
|
y: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "3.1.
|
|
1
|
+
export declare const version = "3.1.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dagrejs/dagre",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Graph layout for JavaScript",
|
|
5
5
|
"author": "Chris Pettitt <cpettitt@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"Matthew Dahl (https://github.com/sandersky)"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "dist/dagre.cjs",
|
|
12
13
|
"module": "dist/dagre.esm.js",
|
|
13
14
|
"scripts": {
|
|
14
15
|
"build": "npm run version:make && npm run build:types && tsx build.ts",
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
".": {
|
|
30
31
|
"types": "./dist/types/index.d.ts",
|
|
31
32
|
"import": "./dist/dagre.esm.js",
|
|
32
|
-
"require": "./dist/dagre.cjs
|
|
33
|
+
"require": "./dist/dagre.cjs"
|
|
33
34
|
},
|
|
34
35
|
"./package.json": "./package.json"
|
|
35
36
|
},
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"layout"
|
|
40
41
|
],
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"@dagrejs/graphlib": "4.0.
|
|
43
|
+
"@dagrejs/graphlib": "4.0.5"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@eslint/js": "^10.0.1",
|
package/dist/dagre.cjs.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";var Nn=Object.create;var D=Object.defineProperty;var wn=Object.getOwnPropertyDescriptor;var Gn=Object.getOwnPropertyNames;var xn=Object.getPrototypeOf,kn=Object.prototype.hasOwnProperty;var vn=(e,n,t)=>n in e?D(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var On=(e,n)=>{for(var t in n)D(e,t,{get:n[t],enumerable:!0})},ve=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of Gn(n))!kn.call(e,o)&&o!==t&&D(e,o,{get:()=>n[o],enumerable:!(r=wn(n,o))||r.enumerable});return e};var Tn=(e,n,t)=>(t=e!=null?Nn(xn(e)):{},ve(n||!e||!e.__esModule?D(t,"default",{value:e,enumerable:!0}):t,e)),Rn=e=>ve(D({},"__esModule",{value:!0}),e);var Oe=(e,n,t)=>vn(e,typeof n!="symbol"?n+"":n,t);var Zt={};On(Zt,{Graph:()=>yn.Graph,debug:()=>ne,default:()=>Qt,graphlib:()=>En,layout:()=>ee,util:()=>$t,version:()=>$});module.exports=Rn(Zt);var En=Tn(require("@dagrejs/graphlib"));var v=require("@dagrejs/graphlib");function j(e,n,t,r){let o=r;for(;e.hasNode(o);)o=H(r);return t.dummy=n,e.setNode(o,t),o}function Te(e){let n=new v.Graph().setGraph(e.graph());return e.nodes().forEach(t=>n.setNode(t,e.node(t))),e.edges().forEach(t=>{let r=n.edge(t.v,t.w)||{weight:0,minlen:1},o=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),n}function U(e){let n=new v.Graph({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(t=>{e.children(t).length||n.setNode(t,e.node(t))}),e.edges().forEach(t=>{n.setEdge(t,e.edge(t))}),n}function re(e,n){let t=e.x,r=e.y,o=n.x-t,i=n.y-r,s=e.width/2,a=e.height/2;if(!o&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let d,u;return Math.abs(i)*s>Math.abs(o)*a?(i<0&&(a=-a),d=a*o/i,u=a):(o<0&&(s=-s),d=s,u=s*i/o),{x:t+d,y:r+u}}function I(e){let n=_(ie(e)+1).map(()=>[]);return e.nodes().forEach(t=>{let r=e.node(t),o=r.rank;o!==void 0&&(n[o]||(n[o]=[]),n[o][r.order]=t)}),n}function Re(e){let n=e.nodes().map(r=>{let o=e.node(r).rank;return o===void 0?Number.MAX_VALUE:o}),t=T(Math.min,n);e.nodes().forEach(r=>{let o=e.node(r);Object.hasOwn(o,"rank")&&(o.rank-=t)})}function Ce(e){let n=e.nodes().map(s=>e.node(s).rank).filter(s=>s!==void 0),t=T(Math.min,n),r=[];e.nodes().forEach(s=>{let a=e.node(s).rank-t;r[a]||(r[a]=[]),r[a].push(s)});let o=0,i=e.graph().nodeRankFactor;Array.from(r).forEach((s,a)=>{s===void 0&&a%i!==0?--o:s!==void 0&&o&&s.forEach(d=>e.node(d).rank+=o)})}function oe(e,n,t,r){let o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),j(e,"border",o,n)}function Cn(e,n=Se){let t=[];for(let r=0;r<e.length;r+=n){let o=e.slice(r,r+n);t.push(o)}return t}var Se=65535;function T(e,n){if(n.length>Se){let t=Cn(n);return e(...t.map(r=>e(...r)))}else return e(...n)}function ie(e){let t=e.nodes().map(r=>{let o=e.node(r).rank;return o===void 0?Number.MIN_VALUE:o});return T(Math.max,t)}function Me(e,n){let t={lhs:[],rhs:[]};return e.forEach(r=>{n(r)?t.lhs.push(r):t.rhs.push(r)}),t}function se(e,n){let t=Date.now();try{return n()}finally{console.log(e+" time: "+(Date.now()-t)+"ms")}}function X(e,n){return n()}var Sn=0;function H(e){let n=++Sn;return e+(""+n)}function _(e,n,t=1){n==null&&(n=e,e=0);let r=i=>i<n;t<0&&(r=i=>n<i);let o=[];for(let i=e;r(i);i+=t)o.push(i);return o}function B(e,n){let t={};for(let r of n)e[r]!==void 0&&(t[r]=e[r]);return t}function W(e,n){let t;return typeof n=="string"?t=r=>r[n]:t=n,Object.entries(e).reduce((r,[o,i])=>(r[o]=t(i,o),r),{})}function je(e,n){return e.reduce((t,r,o)=>(t[r]=n[o],t),{})}var V="\0";function J(e,n,t){var u,l,c,g,f,p;if(!(e&&n&&t&&n.dummy==="edge"&&t.dummy==="edge"&&n.edgeObj&&t.edgeObj&&e[n.edgeObj.v]&&e[t.edgeObj.v]&&e[n.edgeObj.w]&&e[t.edgeObj.w]))return 0;let r=!0;n.edgeObj.w===t.edgeObj.w&&(r=!1);let o=r?(l=(u=e[n.edgeObj.v])==null?void 0:u.rank)!=null?l:NaN+1:(g=(c=e[n.edgeObj.w])==null?void 0:c.rank)!=null?g:NaN-1,i=Object.entries(e).find(L=>{var b,h;return((b=L[1].edgeObj)==null?void 0:b.v)===n.edgeObj.v&&((h=L[1].edgeObj)==null?void 0:h.w)===n.edgeObj.w&&L[1].rank===o}),s=Object.entries(e).find(L=>{var b,h;return((b=L[1].edgeObj)==null?void 0:b.v)===t.edgeObj.v&&((h=L[1].edgeObj)==null?void 0:h.w)===t.edgeObj.w&&L[1].rank===o});if(!i||!s)return 0;let a=(f=i[1].order)!=null?f:NaN,d=(p=s[1].order)!=null?p:NaN;return isNaN(a-d)?0:a-d}var $="3.1.0";var ae=class{constructor(){Oe(this,"_sentinel");let n={};n._next=n._prev=n,this._sentinel=n}dequeue(){let n=this._sentinel,t=n._prev;if(t!==n)return Ie(t),t}enqueue(n){let t=this._sentinel;n._prev&&n._next&&Ie(n),n._next=t._next,t._next._prev=n,t._next=n,n._prev=t}toString(){let n=[],t=this._sentinel,r=t._prev;for(;r!==t;)n.push(JSON.stringify(r,Mn)),r=r._prev;return"["+n.join(", ")+"]"}};function Ie(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Mn(e,n){if(e!=="_next"&&e!=="_prev")return n}var Pe=ae;var jn=()=>1;function ue(e,n){if(e.nodeCount()<=1)return[];let t=Pn(e,n||jn);return In(t.graph,t.buckets,t.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w)||[])}function In(e,n,t){var a;let r=[],o=n[n.length-1],i=n[0],s;for(;e.nodeCount();){for(;s=i.dequeue();)de(e,n,t,s);for(;s=o.dequeue();)de(e,n,t,s);if(e.nodeCount()){for(let d=n.length-2;d>0;--d)if(s=(a=n[d])==null?void 0:a.dequeue(),s){r=r.concat(de(e,n,t,s,!0)||[]);break}}}return r}function de(e,n,t,r,o){let i=[],s=o?i:void 0;return(e.inEdges(r.v)||[]).forEach(a=>{let d=e.edge(a),u=e.node(a.v);o&&i.push({v:a.v,w:a.w}),u.out-=d,le(n,t,u)}),(e.outEdges(r.v)||[]).forEach(a=>{let d=e.edge(a),u=a.w,l=e.node(u);l.in-=d,le(n,t,l)}),e.removeNode(r.v),s}function Pn(e,n){let t=new v.Graph,r=0,o=0;e.nodes().forEach(a=>{t.setNode(a,{v:a,in:0,out:0})}),e.edges().forEach(a=>{let d=t.edge(a.v,a.w)||0,u=n(a),l=d+u;t.setEdge(a.v,a.w,l);let c=t.node(a.v),g=t.node(a.w);o=Math.max(o,c.out+=u),r=Math.max(r,g.in+=u)});let i=_n(o+r+3).map(()=>new Pe),s=r+1;return t.nodes().forEach(a=>{le(i,s,t.node(a))}),{graph:t,buckets:i,zeroIdx:s}}function le(e,n,t){var r,o,i;t.out?t.in?(i=e[t.out-t.in+n])==null||i.enqueue(t):(o=e[e.length-1])==null||o.enqueue(t):(r=e[0])==null||r.enqueue(t)}function _n(e){let n=[];for(let t=0;t<e;t++)n.push(t);return n}function _e(e,n){(e.graph().acyclicer==="greedy"?ue(e,r(e)):Fn(e,n!=null?n:null)).forEach(o=>{let i=e.edge(o);e.removeEdge(o),i.forwardName=o.name,i.reversed=!0,e.setEdge(o.w,o.v,i,H("rev"))});function r(o){return i=>o.edge(i).weight}}function Fn(e,n){let t=[],r={},o={};function i(d){Object.hasOwn(o,d)||(o[d]=!0,r[d]=!0,e.outEdges(d).forEach(u=>{Object.hasOwn(r,u.w)?t.push(u):i(u.w)}),delete r[d])}function s(d){var u;Object.hasOwn(o,d)||(o[d]=!0,r[d]=!0,(u=e.outEdges(d))==null||u.forEach(l=>{var c,g;Object.hasOwn(r,l.w)||((c=n.node(d))==null?void 0:c.rank)>((g=n.node(l.w))==null?void 0:g.rank)&&An(e,l.w,l)?t.push(l):s(l.w)}),delete r[d])}let a=i;return n&&typeof n.node=="function"&&(a=s),e.sources().forEach(a),e.nodes().forEach(a),t}function Fe(e){e.edges().forEach(n=>{let t=e.edge(n);if(t.reversed){e.removeEdge(n);let r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}})}function An(e,n,t){let r=new Set;function o(i){var s;if(e.sources().includes(i))return!0;r.add(i);for(let a of(s=e.inEdges(i))!=null?s:[])if(!(a.v===t.v&&a.w===t.w)&&!r.has(a.v)&&o(a.v))return!0;return!1}return o(n)}function Ae(e){e.graph().dummyChains=[],e.edges().forEach(n=>Yn(e,n))}function Yn(e,n){let t=n.v,r=e.node(t).rank,o=n.w,i=e.node(o).rank,s=n.name,a=e.edge(n),d=a.labelRank;if(i===r+1)return;e.removeEdge(n);let u,l,c;for(c=0,++r;r<i;++c,++r)a.points=[],l={width:0,height:0,edgeLabel:a,edgeObj:n,rank:r},u=j(e,"edge",l,"_d"),r===d&&(l.width=a.width,l.height=a.height,l.dummy="edge-label",l.labelpos=a.labelpos),e.setEdge(t,u,{weight:a.weight},s),c===0&&e.graph().dummyChains.push(u),t=u;e.setEdge(t,o,{weight:a.weight},s)}function Ve(e){e.graph().dummyChains.forEach(n=>{let t=e.node(n),r=t.edgeLabel,o;for(e.setEdge(t.edgeObj,r);t.dummy;)o=e.successors(n)[0],e.removeNode(n),r.points.push({x:t.x,y:t.y}),t.dummy==="edge-label"&&(r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height),n=o,t=e.node(n)})}function q(e){let n={};function t(r){let o=e.node(r);if(Object.hasOwn(n,r))return o.rank;n[r]=!0;let i=e.outEdges(r),s=i?i.map(d=>d==null?Number.POSITIVE_INFINITY:t(d.w)-e.edge(d).minlen):[],a=T(Math.min,s);return a===Number.POSITIVE_INFINITY&&(a=0),o.rank=a}e.sources().forEach(t)}function F(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}var K=Wn;function Wn(e){let n=new v.Graph({directed:!1}),t=e.nodes();if(t.length===0)throw new Error("Graph must have at least one node");let r=t[0],o=e.nodeCount();n.setNode(r,{});let i,s;for(;Dn(n,e)<o&&(i=Xn(n,e),!!i);)s=n.hasNode(i.v)?F(e,i):-F(e,i),Hn(n,e,s);return n}function Dn(e,n){function t(r){let o=n.nodeEdges(r);o&&o.forEach(i=>{let s=i.v,a=r===s?i.w:s;!e.hasNode(a)&&!F(n,i)&&(e.setNode(a,{}),e.setEdge(r,a,{}),t(a))})}return e.nodes().forEach(t),e.nodeCount()}function Xn(e,n){return n.edges().reduce((r,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=F(n,o)),i<r[0]?[i,o]:r},[Number.POSITIVE_INFINITY,null])[1]}function Hn(e,n,t){e.nodes().forEach(r=>n.node(r).rank+=t)}var{preorder:qn,postorder:zn}=v.alg,Be=Y;Y.initLowLimValues=be;Y.initCutValues=ce;Y.calcCutValue=We;Y.leaveEdge=Xe;Y.enterEdge=He;Y.exchangeEdges=qe;function Y(e){e=Te(e),q(e);let n=K(e);be(n),ce(n,e);let t,r;for(;t=Xe(n);)r=He(n,e,t),qe(n,e,t,r)}function ce(e,n){let t=zn(e,e.nodes());t=t.slice(0,t.length-1),t.forEach(r=>Un(e,n,r))}function Un(e,n,t){let o=e.node(t).parent,i=e.edge(t,o);i.cutvalue=We(e,n,t)}function We(e,n,t){let o=e.node(t).parent,i=!0,s=n.edge(t,o),a=0;s||(i=!1,s=n.edge(o,t)),a=s.weight;let d=n.nodeEdges(t);return d&&d.forEach(u=>{let l=u.v===t,c=l?u.w:u.v;if(c!==o){let g=l===i,f=n.edge(u).weight;if(a+=g?f:-f,$n(e,t,c)){let L=e.edge(t,c).cutvalue;a+=g?-L:L}}}),a}function be(e,n){arguments.length<2&&(n=e.nodes()[0]),De(e,{},1,n)}function De(e,n,t,r,o){let i=t,s=e.node(r);n[r]=!0;let a=e.neighbors(r);return a&&a.forEach(d=>{Object.hasOwn(n,d)||(t=De(e,n,t,d,r))}),s.low=i,s.lim=t++,o?s.parent=o:delete s.parent,t}function Xe(e){return e.edges().find(n=>e.edge(n).cutvalue<0)}function He(e,n,t){let r=t.v,o=t.w;n.hasEdge(r,o)||(r=t.w,o=t.v);let i=e.node(r),s=e.node(o),a=i,d=!1;return i.lim>s.lim&&(a=s,d=!0),n.edges().filter(l=>d===Ye(e,e.node(l.v),a)&&d!==Ye(e,e.node(l.w),a)).reduce((l,c)=>F(n,c)<F(n,l)?c:l)}function qe(e,n,t,r){let o=t.v,i=t.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),be(e),ce(e,n),Jn(e,n)}function Jn(e,n){let t=e.nodes().find(o=>!e.node(o).parent);if(!t)return;let r=qn(e,[t]);r=r.slice(1),r.forEach(o=>{let s=e.node(o).parent,a=n.edge(o,s),d=!1;a||(a=n.edge(s,o),d=!0),n.node(o).rank=n.node(s).rank+(d?a.minlen:-a.minlen)})}function $n(e,n,t){return e.hasEdge(n,t)}function Ye(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}var Ue=Kn;function Kn(e){let n=e.graph().ranker;if(typeof n=="function")return n(e);switch(n){case"network-simplex":ze(e);break;case"tight-tree":Zn(e);break;case"longest-path":Qn(e);break;case"none":break;default:ze(e)}}var Qn=q;function Zn(e){q(e),K(e)}function ze(e){Be(e)}var Je=et;function et(e){let n=tt(e),t=e.graph();if(!Array.isArray(t.dummyChains))return;t.dummyChains.forEach(o=>{let i=e.node(o),s=i.edgeObj,a=nt(e,n,s.v,s.w),d=a.path,u=a.lca,l=0,c=d[l],g=!0;for(;o!==s.w;){if(i=e.node(o),g){for(;(c=d[l])!==u&&e.node(c).maxRank<i.rank;)l++;c===u&&(g=!1)}if(!g){for(;l<d.length-1&&e.node(d[l+1]).minRank<=i.rank;)l++;c=d[l]}c!==void 0&&e.setParent(o,c),o=e.successors(o)[0]}})}function nt(e,n,t,r){let o=[],i=[],s=Math.min(n[t].low,n[r].low),a=Math.max(n[t].lim,n[r].lim),d;d=t;do d=e.parent(d),o.push(d);while(d&&(n[d].low>s||a>n[d].lim));let u=d,l=r;for(;(l=e.parent(l))!==u;)i.push(l);return{path:o.concat(i.reverse()),lca:u}}function tt(e){let n={},t=0;function r(o){let i=t;e.children(o).forEach(r),n[o]={low:i,lim:t++}}return e.children(V).forEach(r),n}function $e(e){let n=j(e,"root",{},"_root"),t=rt(e),r=Object.values(t),o=T(Math.max,r)-1,i=2*o+1;e.graph().nestingRoot=n,e.edges().forEach(a=>e.edge(a).minlen*=i);let s=ot(e)+1;e.children(V).forEach(a=>{Ke(e,n,i,s,o,t,a)}),e.graph().nodeRankFactor=i}function Ke(e,n,t,r,o,i,s){var c;let a=e.children(s);if(!a.length){s!==n&&e.setEdge(n,s,{weight:0,minlen:t});return}let d=oe(e,"_bt"),u=oe(e,"_bb"),l=e.node(s);e.setParent(d,s),l.borderTop=d,e.setParent(u,s),l.borderBottom=u,a.forEach(g=>{var m;Ke(e,n,t,r,o,i,g);let f=e.node(g),p=f.borderTop?f.borderTop:g,L=f.borderBottom?f.borderBottom:g,b=f.borderTop?r:2*r,h=p!==L?1:o-((m=i[s])!=null?m:0)+1;e.setEdge(d,p,{weight:b,minlen:h,nestingEdge:!0}),e.setEdge(L,u,{weight:b,minlen:h,nestingEdge:!0})}),e.parent(s)||e.setEdge(n,d,{weight:0,minlen:o+((c=i[s])!=null?c:0)})}function rt(e){let n={};function t(r,o){let i=e.children(r);i&&i.length&&i.forEach(s=>t(s,o+1)),n[r]=o}return e.children(V).forEach(r=>t(r,1)),n}function ot(e){return e.edges().reduce((n,t)=>n+e.edge(t).weight,0)}function Qe(e){let n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}var en=st;function st(e){function n(t){let r=e.children(t),o=e.node(t);if(r.length&&r.forEach(n),o&&Object.hasOwn(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(let i=o.minRank,s=o.maxRank+1;i<s;++i)Ze(e,"borderLeft","_bl",t,o,i),Ze(e,"borderRight","_br",t,o,i)}}e.children(V).forEach(n)}function Ze(e,n,t,r,o,i){let s={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],d=j(e,"border",s,t);o[n][i]=d,e.setParent(d,r),a&&e.setEdge(a,d,{weight:1})}function tn(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="lr"||n==="rl")&&on(e)}function rn(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="bt"||n==="rl")&&at(e),(n==="lr"||n==="rl")&&(dt(e),on(e))}function on(e){e.nodes().forEach(n=>nn(e.node(n))),e.edges().forEach(n=>nn(e.edge(n)))}function nn(e){let n=e.width;e.width=e.height,e.height=n}function at(e){e.nodes().forEach(n=>fe(e.node(n))),e.edges().forEach(n=>{var r;let t=e.edge(n);(r=t.points)==null||r.forEach(fe),Object.hasOwn(t,"y")&&fe(t)})}function fe(e){e.y=-e.y}function dt(e){e.nodes().forEach(n=>he(e.node(n))),e.edges().forEach(n=>{var r;let t=e.edge(n);(r=t.points)==null||r.forEach(he),Object.hasOwn(t,"x")&&he(t)})}function he(e){let n=e.x;e.x=e.y,e.y=n}function ge(e,n=null){let t={},r=e.nodes().filter(l=>!e.children(l).length),o=r.map(l=>e.node(l).rank),i=T(Math.max,o),s=_(i+1).map(()=>[]);function a(l){if(t[l])return;t[l]=!0;let c=e.node(l);s[c.rank].push(l);let g=e.successors(l);g&&[...g].sort((p,L)=>u(p,L)).forEach(a)}r.sort((l,c)=>e.node(l).rank-e.node(c).rank).forEach(a);function u(l,c){let g=e.node(l),f=e.node(c);return J(n,g,f)}return s}function me(e,n){let t=0;for(let r=1;r<n.length;++r)t+=ut(e,n[r-1],n[r]);return t}function ut(e,n,t){let r=je(t,t.map((u,l)=>l)),o=n.flatMap(u=>{let l=e.outEdges(u);return l?l.map(c=>({pos:r[c.w],weight:e.edge(c).weight})).sort((c,g)=>c.pos-g.pos):[]}),i=1;for(;i<t.length;)i<<=1;let s=2*i-1;i-=1;let a=new Array(s).fill(0),d=0;return o.forEach(u=>{let l=u.pos+i;a[l]+=u.weight;let c=0;for(;l>0;)l%2&&(c+=a[l+1]),l=l-1>>1,a[l]+=u.weight;d+=u.weight*c}),d}function pe(e,n=[]){return n.map(t=>{let r=e.inEdges(t);if(!r||!r.length)return{v:t};{let o=r.reduce((i,s)=>{let a=e.edge(s),d=e.node(s.v);return{sum:i.sum+a.weight*d.order,weight:i.weight+a.weight}},{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}})}function Le(e,n){let t={};e.forEach((o,i)=>{let s={indegree:0,in:[],out:[],vs:[o.v],i};o.barycenter!==void 0&&(s.barycenter=o.barycenter,s.weight=o.weight),t[o.v]=s}),n.edges().forEach(o=>{let i=t[o.v],s=t[o.w];i!==void 0&&s!==void 0&&(s.indegree++,i.out.push(s))});let r=Object.values(t).filter(o=>!o.indegree);return ct(r)}function ct(e){let n=[];function t(o){return i=>{i.merged||(i.barycenter===void 0||o.barycenter===void 0||i.barycenter>=o.barycenter)&&bt(o,i)}}function r(o){return i=>{i.in.push(o),--i.indegree===0&&e.push(i)}}for(;e.length;){let o=e.pop();n.push(o),o.in.reverse().forEach(t(o)),o.out.forEach(r(o))}return n.filter(o=>!o.merged).map(o=>B(o,["vs","i","barycenter","weight"]))}function bt(e,n){let t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight),n.weight&&(t+=n.barycenter*n.weight,r+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}function Ee(e,n,t,r,o){let i={},s=null,a=null,d=o;typeof n=="boolean"?(d=n,i={}):n&&(i=n,s=t!=null?t:null,a=r!=null?r:null);let u=Me(e,h=>Object.hasOwn(h,"barycenter")),l=u.lhs,c=u.rhs.sort((h,m)=>m.i-h.i),g=[],f=0,p=0,L=0;l.sort(ft(a,s,!!d));for(let[h,m]of Object.entries(i)){let N=l.findIndex(x=>x.vs[0]===h);l.splice(N+1,0,m)}L=sn(g,c,L),l.forEach(h=>{L+=h.vs.length,g.push(h.vs),f+=h.barycenter*h.weight,p+=h.weight,L=sn(g,c,L)});let b={vs:g.flat(1)};return p&&(b.barycenter=f/p,b.weight=p),b}function sn(e,n,t){let r;for(;n.length&&(r=n[n.length-1]).i<=t;)n.pop(),e.push(r.vs),t++;return t}function ft(e,n,t){return(r,o)=>{if(r.barycenter<o.barycenter)return-1;if(r.barycenter>o.barycenter)return 1;if(e&&(typeof r.vs[0]=="string"||typeof o.vs[0]=="string")){let i=e.node(r.vs[0]),s=e.node(o.vs[0]),a=J(n,i,s);if(a!==0)return a}return t?o.i-r.i:r.i-o.i}}function Q(e,n,t,r,o){var h,m,N,x,w,G,O,R,C,M,S;let i=null,s=o;typeof r=="boolean"?(s=r,i=null):r!==void 0&&(i=r);let a=e.children(n),d=e.node(n),u=d?d.borderLeft:void 0,l=d?d.borderRight:void 0,c={};u&&(a=a.filter(y=>y!==u&&y!==l));let g=pe(e,a);g.forEach(y=>{if(e.children(y.v).length){let{result:E}=Q(e,y.v,t,i,s);c[y.v]=E,Object.hasOwn(E,"barycenter")&>(y,E)}});let f=Le(g,t);ht(f,c);let p={},L=!1;for(let y=0;y<f.length;y++)for(let E=y+1;E<f.length;E++)if(!(!f[y]||!f[E]||!((h=f[y])!=null&&h.barycenter)||!((m=f[E])!=null&&m.barycenter))&&((N=f[y])==null?void 0:N.barycenter)===f[E].barycenter){let k=(w=(x=f[y])==null?void 0:x.vs[0])!=null?w:"",A=(O=(G=f[E])==null?void 0:G.vs[0])!=null?O:"",z=e.node(k),te=e.node(A);if(z.dummy==="edge"&&te.dummy==="edge"&&((R=z.edgeObj)==null?void 0:R.v)===((C=te.edgeObj)==null?void 0:C.v)&&((M=z.edgeObj)==null?void 0:M.w)===((S=te.edgeObj)==null?void 0:S.w))if(z.edgeLabel.reversed){p[A]=f[y],f.splice(y,1),y--;break}else p[k]=f[E],f.splice(E,1),E--;else L=!0}let b=Ee(f,p,i,e,s);if(u&&l){b.vs=[u,b.vs,l].flat(1);let y=e.predecessors(u);if(y&&y.length){let E=e.node(y[0]),k=e.predecessors(l),A=e.node(k[0]);Object.hasOwn(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+E.order+A.order)/(b.weight+2),b.weight+=2}}return Object.defineProperty(b,"result",{value:b,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(b,"usedBias",{value:L,enumerable:!1,configurable:!0,writable:!0}),b}function ht(e,n){e.forEach(t=>{t.vs=t.vs.flatMap(r=>n[r]?n[r].vs:r)})}function gt(e,n){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight):(e.barycenter=n.barycenter,e.weight=n.weight)}function ye(e,n,t,r){r||(r=e.nodes());let o=mt(e),i=new v.Graph({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(s=>e.node(s));return r.forEach(s=>{let a=e.node(s),d=e.parent(s);if(a.rank===n||a.minRank<=n&&n<=a.maxRank){i.setNode(s),i.setParent(s,d||o);let u=e[t](s);u&&u.forEach(l=>{let c=l.v===s?l.w:l.v,g=i.edge(c,s),f=g!==void 0?g.weight:0;i.setEdge(c,s,{weight:e.edge(l).weight+f})}),Object.hasOwn(a,"minRank")&&i.setNode(s,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]})}}),i}function mt(e){let n;for(;e.hasNode(n=H("_root")););return n}function Ne(e,n,t){let r={},o;t.forEach(i=>{let s=e.parent(i),a,d;for(;s;){if(a=e.parent(s),a?(d=r[a],r[a]=s):(d=o,o=s),d&&d!==s){n.setEdge(d,s);return}s=a}})}function Z(e,n={},t=null){if(typeof n.customOrder=="function"){n.customOrder(e,Z);return}let r=ie(e),o=an(e,_(1,r+1),"inEdges"),i=an(e,_(r-1,-1,-1),"outEdges"),s=ge(e,t);if(dn(e,s),n.disableOptimalOrderHeuristic)return;let a=Number.POSITIVE_INFINITY,d,u=n.constraints||[];for(let l=0,c=0;c<4;++l,++c){pt(l%2?o:i,l%4>=2,u,t),s=I(e);let g=me(e,s);g<a?(c=0,d=Object.assign({},s),a=g):g===a&&(d=structuredClone(s))}dn(e,d)}function an(e,n,t){let r=new Map,o=(i,s)=>{r.has(i)||r.set(i,[]),r.get(i).push(s)};for(let i of e.nodes()){let s=e.node(i);if(typeof s.rank=="number"&&o(s.rank,i),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let a=s.minRank;a<=s.maxRank;a++)a!==s.rank&&o(a,i)}return n.map(function(i){return ye(e,i,t,r.get(i)||[])})}function pt(e,n,t,r){let o=!0,i=new v.Graph;e.forEach(function(s){t.forEach(l=>i.setEdge(l.left,l.right));let a=s.graph().root,{result:d,usedBias:u}=Q(s,a,i,r,o);n&&u&&(o=!o),d.vs.forEach((l,c)=>s.node(l).order=c),Ne(s,i,d.vs)})}function dn(e,n){Object.values(n).forEach(t=>t.forEach((r,o)=>e.node(r).order=o))}function Lt(e,n){let t={};function r(o,i){let s=0,a=0,d=o.length,u=i[i.length-1];return i.forEach((l,c)=>{let g=yt(e,l),f=g?e.node(g).order:d;(g||l===u)&&(i.slice(a,c+1).forEach(p=>{let L=e.predecessors(p);L&&L.forEach(b=>{let h=e.node(b),m=h.order;(m<s||f<m)&&!(h.dummy&&e.node(p).dummy)&&un(t,b,p)})}),a=c+1,s=f)}),i}return n.length&&n.reduce(r),t}function Et(e,n){let t={};function r(i,s,a,d,u){_(s,a).forEach(l=>{let c=i[l];if(c!==void 0&&e.node(c).dummy){let g=e.predecessors(c);g&&g.forEach(f=>{if(f===void 0)return;let p=e.node(f);p.dummy&&(p.order<d||p.order>u)&&un(t,f,c)})}})}function o(i,s){let a=-1,d=-1,u=0;return s.forEach((l,c)=>{if(e.node(l).dummy==="border"){let g=e.predecessors(l);if(g&&g.length){let f=g[0];if(f===void 0)return;d=e.node(f).order,r(s,u,c,a,d),u=c,a=d}}r(s,u,s.length,d,i.length)}),s}return n.length&&n.reduce(o),t}function yt(e,n){if(e.node(n).dummy){let t=e.predecessors(n);if(t)return t.find(r=>e.node(r).dummy)}}function un(e,n,t){if(n>t){let o=n;n=t,t=o}let r=e[n];r||(e[n]=r={}),r[t]=!0}function Nt(e,n,t){if(n>t){let o=n;n=t,t=o}let r=e[n];return r!==void 0&&Object.hasOwn(r,t)}function wt(e,n,t,r,o){let i={},s={},a={};return n.forEach(d=>{d.forEach((u,l)=>{i[u]=u,s[u]=u,a[u]=l})}),n.forEach(d=>{let u=-1,l=-1,c=!1,g=d,f=d.findIndex(p=>(o==null?void 0:o.includes(p))||ln(p,e,o));f>0&&(g=[d[f],...d.slice(0,f),...d.slice(f+1)],c=!0),g.forEach(p=>{var b;let L=r(p);if(L&&L.length){o!=null&&o.includes(p)&&(L=L.filter(N=>ln(N,e,o)));let h=L.sort((N,x)=>{let w=a[N],G=a[x];return(w!==void 0?w:0)-(G!==void 0?G:0)}),m=(h.length-1)/2;for(let N=Math.floor(m),x=Math.ceil(m);N<=x;++N){let w=h[N];if(w===void 0)continue;let G=a[w];if(G!==void 0&&s[p]===p&&u<G&&a[w]!==l&&!Nt(t,p,w)){let O=i[w];O!==void 0&&(s[w]=p,s[p]=i[p]=O,u=G,c&&(u=-1,l=(b=a[w])!=null?b:-1,c=!1))}}}})}),{root:i,align:s}}function Gt(e,n,t,r,o=!1){let i={},s=xt(e,n,t,o),a=o?"borderLeft":"borderRight";function d(f,p){let L=s.nodes().slice(),b={},h=L.pop();for(;h;){if(b[h])f(h);else{b[h]=!0,L.push(h);for(let m of p(h))L.push(m)}h=L.pop()}}function u(f){let p=s.inEdges(f);p?i[f]=p.reduce((L,b)=>{var N;let h=(N=i[b.v])!=null?N:0,m=s.edge(b);return Math.max(L,h+(m!==void 0?m:0))},0):i[f]=0}function l(f){let p=s.outEdges(f),L=Number.POSITIVE_INFINITY;p&&(L=p.reduce((h,m)=>{let N=i[m.w],x=s.edge(m);return Math.min(h,(N!==void 0?N:0)-(x!==void 0?x:0))},Number.POSITIVE_INFINITY));let b=e.node(f);L!==Number.POSITIVE_INFINITY&&b.borderType!==a&&(i[f]=Math.max(i[f]!==void 0?i[f]:0,L))}function c(f){return s.predecessors(f)||[]}function g(f){return s.successors(f)||[]}return d(u,c),d(l,g),Object.keys(r).forEach(f=>{var L;let p=t[f];p!==void 0&&(i[f]=(L=i[p])!=null?L:0)}),i}function xt(e,n,t,r){let o=new v.Graph,i=e.graph(),s=Tt(i.nodesep,i.edgesep,r);return n.forEach(a=>{let d;a.forEach(u=>{let l=t[u];if(l!==void 0){if(o.setNode(l),d!==void 0){let c=t[d];if(c!==void 0){let g=o.edge(c,l);o.setEdge(c,l,Math.max(s(e,u,d),g||0))}}d=u}})}),o}function kt(e,n){return Object.values(n).reduce((t,r)=>{let o=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(r).forEach(([a,d])=>{let u=Rt(e,a)/2;o=Math.max(d+u,o),i=Math.min(d-u,i)});let s=o-i;return s<t[0]&&(t=[s,r]),t},[Number.POSITIVE_INFINITY,null])[1]}function vt(e,n){let t=Object.values(n),r=T(Math.min,t),o=T(Math.max,t);["u","d"].forEach(i=>{["l","r"].forEach(s=>{let a=i+s,d=e[a];if(!d||d===n)return;let u=Object.values(d),l=r-T(Math.min,u);s!=="l"&&(l=o-T(Math.max,u)),l&&(e[a]=W(d,c=>c+l))})})}function Ot(e,n=void 0){let t=e.ul;return t?W(t,(r,o)=>{var s,a;if(n){let d=n.toLowerCase(),u=e[d];if(u&&u[o]!==void 0)return u[o]}let i=Object.values(e).map(d=>{let u=d[o];return u!==void 0?u:0}).sort((d,u)=>d-u);return(((s=i[1])!=null?s:0)+((a=i[2])!=null?a:0))/2}):{}}function cn(e,n){let t=I(e),r=Object.assign(Lt(e,t),Et(e,t)),o={},i;["u","d"].forEach(a=>{i=a==="u"?t:Object.values(t).reverse(),["l","r"].forEach(d=>{d==="r"&&(i=i.map(g=>Object.values(g).reverse()));let l=wt(e,i,r,g=>(a==="u"?e.predecessors(g):e.successors(g))||[],n),c=Gt(e,i,l.root,l.align,d==="r");d==="r"&&(c=W(c,g=>-g)),o[a+d]=c})});let s=kt(e,o);return vt(o,s),Ot(o,e.graph().align)}function Tt(e,n,t){return(r,o,i)=>{let s=r.node(o),a=r.node(i),d=0,u;if(d+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2;break}if(u&&(d+=t?u:-u),u=void 0,d+=(s.dummy?n:e)/2,d+=(a.dummy?n:e)/2,d+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=a.width/2;break;case"r":u=-a.width/2;break}return u&&(d+=t?u:-u),d}}function Rt(e,n){return e.node(n).width}function ln(e,n,t){var s;if(!t)return!1;let r=(s=n.node(e))==null?void 0:s.edgeObj;if(!r||n.node(e).edgeLabel.reversed)return!1;let o=t.indexOf(r==null?void 0:r.v),i=t.indexOf(r==null?void 0:r.w);return o!==-1&&i!==-1&&o===(i+1)%t.length||o===(i-1)%t.length}function bn(e,n){e=U(e),Ct(e),Object.entries(cn(e,n)).forEach(([t,r])=>e.node(t).x=r)}function Ct(e){let n=I(e),t=e.graph(),r=t.ranksep,o=t.rankalign,i=0;n.forEach(s=>{let a=s.reduce((d,u)=>{var c;let l=(c=e.node(u).height)!=null?c:0;return d>l?d:l},0);s.forEach(d=>{let u=e.node(d);o==="top"?u.y=i+u.height/2:o==="bottom"?u.y=i+a-u.height/2:u.y=i+a/2}),i+=a+r})}var we=null,Ge=null;function ee(e,n={}){return Ln(e,X,n),e}function fn(e,n,t){let r=n;for(;r!==void 0;){let o=e.parent(r);if(o===t)return r;r=o}}function Ln(e,n,t){let r=e.nodes().filter(b=>e.children(b).length),o={};r.forEach(b=>{let h=e.node(b);if(h&&h.rankdir){let m=new v.Graph({multigraph:!0,compound:!0});m.setGraph({rankdir:h.rankdir});let N=e.children(b);N.forEach(y=>{let E={...e.node(y)};m.setNode(y,E);let k=e.parent(y);k&&k!==b&&N.includes(k)&&m.setParent(y,k)});let x=new Set;e.edges().forEach(y=>{let E=fn(e,y.v,b),k=fn(e,y.w,b);if(E&&k&&E!==k){let A=`${E}\0${k}`;x.has(A)||(x.add(A),m.setEdge(E,k,{...e.edge(y)}))}}),Ln(m,n,t);let w=pn(m);hn(w,n,t),gn(m,w);let G=1/0,O=1/0,R=-1/0,C=-1/0;m.nodes().forEach(y=>{if(y===b)return;let E=m.node(y);E&&typeof E.x=="number"&&typeof E.y=="number"&&typeof E.width=="number"&&typeof E.height=="number"&&(G=Math.min(G,E.x-E.width/2),R=Math.max(R,E.x+E.width/2),O=Math.min(O,E.y-E.height/2),C=Math.max(C,E.y+E.height/2))}),(!isFinite(G)||!isFinite(O)||!isFinite(R)||!isFinite(C))&&(G=O=0,R=C=0);let M=R-G,S=C-O;o[b]={minX:G,minY:O,maxX:R,maxY:C,width:M,height:S,offsetX:G,offsetY:O},h._dagreClusterSubgraph=m}});let i=[],s=b=>{let h=[],m=(e.children(b)||[]).filter(N=>N!==b);for(;m.length>0;){let N=m.shift();h.push(N),(e.children(N)||[]).filter(x=>x!==N).forEach(x=>m.push(x))}return h},a=new Map;r.forEach(b=>{let h=e.node(b);h&&h.rankdir&&o[b]&&a.set(b,(e.children(b)||[]).filter(m=>m!==b))});let d=new Set([...a.values()].flat()),u=new Map;a.forEach((b,h)=>{d.has(h)||u.set(h,s(h))});let l=new Set([...u.values()].flat()),c=b=>{for(let[h,m]of u)if(m.includes(b))return h;return b},g=[];e.edges().forEach(b=>{(l.has(b.v)||l.has(b.w))&&g.push({edge:b,label:e.edge(b)})});let f=new Map;l.forEach(b=>{let h=e.parent(b);f.set(b,typeof h=="string"?h:void 0)}),u.forEach((b,h)=>{let m=e.node(h),N=[];b.forEach(G=>{let O=e.node(G);O&&(N.push({id:G,node:O,parent:f.get(G)}),e.removeNode(G))});let x=g.filter(({edge:G})=>b.includes(G.v)||b.includes(G.w)),w=o[h];m&&(i.push({clusterId:h,subgraph:m._dagreClusterSubgraph,bounds:w,children:b,removedNodes:N,removedEdges:x}),m.width=w.width,m.height=w.height)});let p=new Set;g.forEach(({edge:b,label:h})=>{let m=c(b.v),N=c(b.w);if(m!==N&&e.hasNode(m)&&e.hasNode(N)){let x=`${m}\0${N}`;p.has(x)||(p.add(x),e.setEdge(m,N,{...h,width:0,height:0}))}});let L=pn(e);hn(L,n,t),gn(e,L),p.forEach(b=>{let h=b.indexOf("\0"),m=b.slice(0,h),N=b.slice(h+1);e.hasEdge(m,N)&&e.removeEdge(m,N)}),i.forEach(({clusterId:b,subgraph:h,bounds:m,removedNodes:N,removedEdges:x})=>{var M,S;let w=e.node(b),G=(M=w==null?void 0:w.x)!=null?M:0,O=(S=w==null?void 0:w.y)!=null?S:0,R=(m.minX+m.maxX)/2,C=(m.minY+m.maxY)/2;N.forEach(({id:y,node:E,parent:k})=>{e.setNode(y,E),k!==void 0&&e.setParent(y,k)}),x.forEach(({edge:y,label:E})=>{e.setEdge(y,E)}),h.nodes().forEach(y=>{if(y===b)return;let E=h.node(y),k=e.node(y);k&&E&&typeof E.x=="number"&&typeof E.y=="number"&&(k.x=G+(E.x-R),k.y=O+(E.y-C))}),delete w._dagreClusterSubgraph}),r.forEach(b=>{var N,x;let h=e.node(b),m=o[b];if(h&&h.rankdir&&h._dagreClusterSubgraph&&m){let w=h._dagreClusterSubgraph,G=(N=h.x)!=null?N:0,O=(x=h.y)!=null?x:0,R=(m.minX+m.maxX)/2,C=(m.minY+m.maxY)/2;w.nodes().forEach(M=>{if(M===b)return;let S=w.node(M),y=e.node(M);if(y&&S&&typeof S.x=="number"&&typeof S.y=="number"){let E=S.x-R,k=S.y-C;y.x=G+E,y.y=O+k}}),delete h._dagreClusterSubgraph}})}function hn(e,n,t){(t==null?void 0:t.useDynamic)===!1&&(we=null,Ge=null),n(" makeSpaceForEdgeLabels",()=>At(e)),n(" removeSelfEdges",()=>zt(e)),n(" acyclic",()=>_e(e,we)),n(" nestingGraph.run",()=>$e(e)),n(" rank",()=>Ue(U(e))),n(" injectEdgeLabelProxies",()=>Vt(e)),n(" removeEmptyRanks",()=>Ce(e)),n(" nestingGraph.cleanup",()=>Qe(e)),n(" normalizeRanks",()=>Re(e)),n(" assignRankMinMax",()=>Yt(e)),n(" removeEdgeLabelProxies",()=>Bt(e)),n(" normalize.run",()=>Ae(e)),n(" parentDummyChains",()=>Je(e)),n(" addBorderSegments",()=>en(e)),n(" order",()=>Z(e,t,Ge)),n(" insertSelfEdges",()=>Ut(e)),n(" adjustCoordinateSystem",()=>tn(e)),n(" position",()=>bn(e,t.corePath)),n(" positionSelfEdges",()=>Jt(e)),Ge=JSON.parse(JSON.stringify(e._nodes)),n(" removeBorderNodes",()=>qt(e)),n(" normalize.undo",()=>Ve(e)),n(" fixupEdgeLabelCoords",()=>Xt(e)),n(" undoCoordinateSystem",()=>rn(e)),n(" translateGraph",()=>Wt(e)),n(" assignNodeIntersects",()=>Dt(e)),n(" reversePoints",()=>Ht(e)),n(" acyclic.undo",()=>Fe(e)),we=e}function gn(e,n){e.nodes().forEach(t=>{let r=e.node(t),o=n.node(t);r&&(r.x=o.x,r.y=o.y,r.order=o.order,r.rank=o.rank,n.children(t).length&&(r.width=o.width,r.height=o.height))}),e.edges().forEach(t=>{let r=e.edge(t),o=n.edge(t);r.points=o.points,Object.hasOwn(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var St=["nodesep","edgesep","ranksep","marginx","marginy"],Mt={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},jt=["acyclicer","ranker","rankdir","align","rankalign"],It=["width","height","rank"],mn={width:0,height:0},Pt=["minlen","weight","width","height","labeloffset"],_t={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ft=["labelpos"];function pn(e){let n=new v.Graph({multigraph:!0,compound:!0}),t=ke(e.graph());return n.setGraph(Object.assign({},Mt,xe(t,St),B(t,jt))),e.nodes().forEach(r=>{let o=ke(e.node(r)),i=xe(o,It);Object.keys(mn).forEach(a=>{i[a]===void 0&&(i[a]=mn[a])}),n.setNode(r,i);let s=e.parent(r);s!==void 0&&n.setParent(r,s)}),e.edges().forEach(r=>{let o=ke(e.edge(r));n.setEdge(r,Object.assign({},_t,xe(o,Pt),B(o,Ft)))}),n}function At(e){let n=e.graph();n.ranksep/=2,e.edges().forEach(t=>{var o;let r=e.edge(t);r.minlen*=2,((o=r.labelpos)!=null?o:"r").toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Vt(e){e.edges().forEach(n=>{let t=e.edge(n);if(t.width&&t.height){let r=e.node(n.v),i={rank:(e.node(n.w).rank-r.rank)/2+r.rank,e:n};j(e,"edge-proxy",i,"_ep")}})}function Yt(e){let n=0;e.nodes().forEach(t=>{let r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=Math.max(n,r.maxRank))}),e.graph().maxRank=n}function Bt(e){e.nodes().forEach(n=>{let t=e.node(n);if(t.dummy==="edge-proxy"){let r=t;e.edge(r.e).labelRank=t.rank,e.removeNode(n)}})}function Wt(e){let n=Number.POSITIVE_INFINITY,t=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),s=i.marginx||0,a=i.marginy||0;function d(u){let l=u.x,c=u.y,g=u.width,f=u.height;n=Math.min(n,l-g/2),t=Math.max(t,l+g/2),r=Math.min(r,c-f/2),o=Math.max(o,c+f/2)}e.nodes().forEach(u=>d(e.node(u))),e.edges().forEach(u=>{let l=e.edge(u);Object.hasOwn(l,"x")&&d(l)}),n-=s,r-=a,e.nodes().forEach(u=>{let l=e.node(u);l.x-=n,l.y-=r}),e.edges().forEach(u=>{let l=e.edge(u);l.points.forEach(c=>{c.x-=n,c.y-=r}),Object.hasOwn(l,"x")&&(l.x-=n),Object.hasOwn(l,"y")&&(l.y-=r)}),i.width=t-n+s,i.height=o-r+a}function Dt(e){e.edges().forEach(n=>{if(n.v===n.w)return;let t=e.edge(n),r=e.node(n.v),o=e.node(n.w),i,s;t.points?(i=t.points[0],s=t.points[t.points.length-1]):(t.points=[],i=o,s=r),t.points.unshift(re(r,i)),t.points.push(re(o,s))})}function Xt(e){e.edges().forEach(n=>{let t=e.edge(n);if(Object.hasOwn(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}function Ht(e){e.edges().forEach(n=>{let t=e.edge(n);t.reversed&&t.points.reverse()})}function qt(e){e.nodes().forEach(n=>{if(e.children(n).length){let t=e.node(n),r=e.node(t.borderTop),o=e.node(t.borderBottom),i=e.node(t.borderLeft[t.borderLeft.length-1]),s=e.node(t.borderRight[t.borderRight.length-1]);t.width=Math.abs(s.x-i.x),t.height=Math.abs(o.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}}),e.nodes().forEach(n=>{e.node(n).dummy==="border"&&e.removeNode(n)})}function zt(e){e.edges().forEach(n=>{if(n.v===n.w){let t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Ut(e){I(e).forEach(t=>{let r=0;t.forEach((o,i)=>{let s=e.node(o);typeof s.rank!="number"&&(s.rank=0),s.order=i+r,(s.selfEdges||[]).forEach(a=>{j(e,"selfedge",{width:a.label.width,height:a.label.height,rank:s.rank,order:i+ ++r,e:a.e,edgeLabel:a.label},"_se"),(!Array.isArray(a.label.points)||a.label.points.length!==7)&&(a.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete s.selfEdges})})}function Jt(e){e.nodes().forEach(n=>{let t=e.node(n),r=o=>typeof o=="number"&&isFinite(o);if(t.dummy==="selfedge"){let o=t,i=e.node(o.e.v),s=r(i==null?void 0:i.x)?i.x:0,a=r(i==null?void 0:i.y)?i.y:0,d=r(i==null?void 0:i.width)?i.width:0,u=r(i==null?void 0:i.height)?i.height:0,l=r(t.x)?t.x:s,c=r(t.y)?t.y:a,g=d/2,f=u/2;o.edgeLabel.points=[{x:l+g,y:c-f},{x:l+g,y:c-f},{x:l,y:c},{x:l-g,y:c+f},{x:l-g,y:c+f},{x:l,y:c},{x:l,y:c}],o.edgeLabel.x=l,o.edgeLabel.y=c,e.setEdge(o.e,o.edgeLabel),e.removeNode(n)}else t&&Array.isArray(t.selfEdges)&&t.selfEdges.forEach(o=>{if(!Array.isArray(o.label.points)||o.label.points.length!==7){let i=r(t.x)?t.x:0,s=r(t.y)?t.y:0,a=r(t.width)?t.width:0,d=r(t.height)?t.height:0,u=a/2,l=d/2;o.label.points=[{x:i+u,y:s-l},{x:i+u,y:s-l},{x:i,y:s},{x:i-u,y:s+l},{x:i-u,y:s+l},{x:i,y:s},{x:i,y:s}]}})})}function xe(e,n){return W(B(e,n),Number)}function ke(e){let n={};return e&&Object.entries(e).forEach(([t,r])=>{typeof t=="string"&&(t=t.toLowerCase()),n[t]=r}),n}function ne(e){let n=I(e),t=new v.Graph({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(r=>{t.setNode(r,{label:r}),t.setParent(r,"layer"+e.node(r).rank)}),e.edges().forEach(r=>t.setEdge(r.v,r.w,{},r.name)),n.forEach((r,o)=>{let i="layer"+o;t.setNode(i,{rank:"same"}),r.reduce((s,a)=>(t.setEdge(s,a,{style:"invis"}),a))}),t}var yn=require("@dagrejs/graphlib");var $t={time:se,notime:X},Kt={graphlib:En,version:$,layout:ee,debug:ne,util:{time:se,notime:X}},Qt=Kt;0&&(module.exports={Graph,debug,graphlib,layout,util,version});
|
|
2
|
-
/*! For license information please see dagre.cjs.js.LEGAL.txt */
|
|
3
|
-
//# sourceMappingURL=dagre.cjs.js.map
|