You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
40 KiB
JavaScript

9 months ago
"use strict";exports.id=348,exports.ids=[348],exports.modules={348:(e,n,t)=>{t.d(n,{bK:()=>e3});var r,o=t(41115),i=t(31631),u=t(54030),a=t(61648),s=t(94496),d=t(32302),c=t(77879),f=t(38601);class h{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return l(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&l(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,t=n._prev;t!==n;)e.push(JSON.stringify(t,v)),t=t._prev;return"["+e.join(", ")+"]"}}function l(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function v(e,n){if("_next"!==e&&"_prev"!==e)return n}var g=a.Z(1);function Z(e,n,t,r,i){var u=i?[]:void 0;return o.Z(e.inEdges(r.v),function(r){var o=e.edge(r),a=e.node(r.v);i&&u.push({v:r.v,w:r.w}),a.out-=o,p(n,t,a)}),o.Z(e.outEdges(r.v),function(r){var o=e.edge(r),i=r.w,u=e.node(i);u.in-=o,p(n,t,u)}),e.removeNode(r.v),u}function p(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}var b=t(699),m=t(40721),w=t(46260),_=t(23786);let y=function(e,n,t){for(var r=-1,o=e.length;++r<o;){var i=e[r],u=n(i);if(null!=u&&(void 0===a?u==u&&!(0,_.Z)(u):t(u,a)))var a=u,s=i}return s},x=function(e,n){return e>n};var E=t(7659);let k=function(e){return e&&e.length?y(e,E.Z,x):void 0},N=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0};var j=t(23446),I=t(38906);let C=function(e,n){return e<n},L=function(e){return e&&e.length?y(e,E.Z,C):void 0};var M=t(17919);let O=function(){return M.Z.Date.now()};function R(e,n,t,r){var o;do o=i.Z(r);while(e.hasNode(o));return t.dummy=n,e.setNode(o,t),o}function T(e){var n=new f.k({multigraph:e.isMultigraph()}).setGraph(e.graph());return o.Z(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),o.Z(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}function A(e,n){var t,r,o=e.x,i=e.y,u=n.x-o,a=n.y-i,s=e.width/2,d=e.height/2;if(!u&&!a)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*s>Math.abs(u)*d?(a<0&&(d=-d),t=d*u/a,r=d):(u<0&&(s=-s),t=s,r=s*a/u),{x:o+t,y:i+r}}function P(e){var n=d.Z(c.Z(F(e)+1),function(){return[]});return o.Z(e.nodes(),function(t){var r=e.node(t),o=r.rank;I.Z(o)||(n[o][r.order]=t)}),n}function S(e,n,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),R(e,"border",o,n)}function F(e){return k(d.Z(e.nodes(),function(n){var t=e.node(n).rank;if(!I.Z(t))return t}))}function D(e,n){var t=O();try{return n()}finally{console.log(e+" time: "+(O()-t)+"ms")}}function G(e,n){return n()}function B(e,n,t,r,o,i){var u=o[n][i-1],a=R(e,"border",{width:0,height:0,rank:i,borderType:n},t);o[n][i]=a,e.setParent(a,r),u&&e.setEdge(u,a,{weight:1})}function V(e){o.Z(e.nodes(),function(n){q(e.node(n))}),o.Z(e.edges(),function(n){q(e.edge(n))})}function q(e){var n=e.width;e.width=e.height,e.height=n}function U(e){e.y=-e.y}function Y(e){var n=e.x;e.x=e.y,e.y=n}var z=t(64251);let $=function(e,n){return e&&e.length?y(e,(0,z.Z)(n,2),C):void 0};function J(e){var n={};o.Z(e.sources(),function t(r){var o=e.node(r);if(u.Z(n,r))return o.rank;n[r]=!0;var i=L(d.Z(e.outEdges(r),function(n){return t(n.w)-e.edge(n).minlen}));return(i===Number.POSITIVE_INFINITY||null==i)&&(i=0),o.rank=i})}function K(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function W(e){var n,t,r=new f.k({directed:!1}),i=e.nodes()[0],u=e.nodeCount();for(r.setNode(i,{});o.Z(r.nodes(),function n(t){o.Z(e.nodeEdges(t),function(o){var i=o.v,u=t===i?o.w:i;r.hasNode(u)||K(e,o)||(r.setNode(u,{}),r.setEdge(t,u,{}),n(u))})}),r.nodeCount()<u;)n=function(e,n){return $(n.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return K(n,t)})}(r,e),t=r.hasNode(n.v)?K(e,n):-K(e,n),function(e,n,t){o.Z(e.nodes(),function(e){n.node(e).rank+=t})}(r,e,t);return r}var H=t(81074),Q=t(88153),X=t(81904),ee=t(46527);let en=function(e){var n=(0,ee.Z)(e),t=n%1;return n==n?t?n-t:n:0};var et=Math.max,er=(r=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var o=null==t?0:en(t);return o<0&&(o=et(r+o,0)),(0,X.