forked from TrueCloudLab/distribution
1 line
49 KiB
JavaScript
1 line
49 KiB
JavaScript
|
"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[771],{3771:function(n,e,t){t.d(e,{bK:function(){return ge}});var r=t(870),o=t(6749),i=t(3402),u=t(2002),a=t(7961),c=t(3836),f=t(6446),s=t(5625);class d{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,e=n._prev;if(e!==n)return h(e),e}enqueue(n){var e=this._sentinel;n._prev&&n._next&&h(n),n._next=e._next,e._next._prev=n,e._next=n,n._prev=e}toString(){for(var n=[],e=this._sentinel,t=e._prev;t!==e;)n.push(JSON.stringify(t,v)),t=t._prev;return"["+n.join(", ")+"]"}}function h(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function v(n,e){if("_next"!==n&&"_prev"!==n)return e}var l=u.Z(1);function Z(n,e,t,o,i){var u=i?[]:void 0;return r.Z(n.inEdges(o.v),(function(r){var o=n.edge(r),a=n.node(r.v);i&&u.push({v:r.v,w:r.w}),a.out-=o,g(e,t,a)})),r.Z(n.outEdges(o.v),(function(r){var o=n.edge(r),i=r.w,u=n.node(i);u.in-=o,g(e,t,u)})),n.removeNode(o.v),u}function g(n,e,t){t.out?t.in?n[t.out-t.in+e].enqueue(t):n[n.length-1].enqueue(t):n[0].enqueue(t)}function p(n){var e="greedy"===n.graph().acyclicer?function(n,e){if(n.nodeCount()<=1)return[];var t=function(n,e){var t=new s.k,o=0,i=0;r.Z(n.nodes(),(function(n){t.setNode(n,{v:n,in:0,out:0})})),r.Z(n.edges(),(function(n){var r=t.edge(n.v,n.w)||0,u=e(n),a=r+u;t.setEdge(n.v,n.w,a),i=Math.max(i,t.node(n.v).out+=u),o=Math.max(o,t.node(n.w).in+=u)}));var u=f.Z(i+o+3).map((function(){return new d})),a=o+1;return r.Z(t.nodes(),(function(n){g(u,a,t.node(n))})),{graph:t,buckets:u,zeroIdx:a}}(n,e||l),o=function(n,e,t){for(var r,o=[],i=e[e.length-1],u=e[0];n.nodeCount();){for(;r=u.dequeue();)Z(n,e,t,r);for(;r=i.dequeue();)Z(n,e,t,r);if(n.nodeCount())for(var a=e.length-2;a>0;--a)if(r=e[a].dequeue()){o=o.concat(Z(n,e,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return a.Z(c.Z(o,(function(e){return n.outEdges(e.v,e.w)})))}(n,function(n){return function(e){return n.edge(e).weight}}(n)):function(n){var e=[],t={},o={};return r.Z(n.nodes(),(function u(a){i.Z(o,a)||(o[a]=!0,t[a]=!0,r.Z(n.outEdges(a),(function(n){i.Z(t,n.w)?e.push(n):u(n.w)})),delete t[a])})),e}(n);r.Z(e,(function(e){var t=n.edge(e);n.removeEdge(e),t.forwardName=e.name,t.reversed=!0,n.setEdge(e.w,e.v,t,o.Z("rev"))}))}var b=t(6841),w=t(3032),m=t(3688),y=t(2714),_=function(n,e,t){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=e(i);if(null!=u&&(void 0===a?u==u&&!(0,y.Z)(u):t(u,a)))var a=u,c=i}return c},E=function(n,e){return n>e},k=t(9203),j=function(n){return n&&n.length?_(n,k.Z,E):void 0},x=function(n){var e=null==n?0:n.length;return e?n[e-1]:void 0},N=t(4752),C=t(2693),I=t(7058),O=function(n,e){var t={};return e=(0,I.Z)(e,3),(0,C.Z)(n,(function(n,r,o){(0,N.Z)(t,r,e(n,r,o))})),t},L=t(9360),M=function(n,e){return n<e},A=function(n){return n&&n.length?_(n,k.Z,M):void 0},R=t(6092),S=function(){return R.Z.Date.now()};function P(n,e,t,r){var i;do{i=o.Z(r)}while(n.hasNode(i));return t.dummy=e,n.setNode(i,t),i}function T(n){var e=new s.k({multigraph:n.isMultigraph()}).setGraph(n.graph());return r.Z(n.nodes(),(function(t){n.children(t).length||e.setNode(t,n.node(t))})),r.Z(n.edges(),(function(t){e.setEdge(t,n.edge(t))})),e}function F(n,e){var t,r,o=n.x,i=n.y,u=e.x-o,a=e.y-i,c=n.width/2,f=n.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*c>Math.abs(u)*f?(a<0&&(f=-f),t=f*u/a,r=f):(u<0&&(c=-c),t=c,r=c*a/u),{x:o+t,y:i+r}}function D(n){var e=c.Z(f.Z(G(n)+1),(function(){return[]}));return r.Z(n.nodes(),(function(t){var r=n.node(t),o=r.rank;L.Z(o)||(e[o][r.order]=t)})),e}function B(n,e,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),P(n,"border",o,e)}function G(n){return j(c.Z(n.nodes(),(function(e){var t=n.node(e).rank;if(!L.Z(t))return t})))}function V(n,e){var t=S();try{return e()}finally{console.log(n+" time: "+(S()-t)+"ms")}}function z(n,e){return e()}function q(n,e,t,r,o,i){var u={width:0,height:0,rank:i,borderType:e},a=o[e][i-1],c=P(n,"border",u,t);o[e][i]=c,n.setParent(c,r),a&&n.setEdge(a,c,{weight:1})
|