PageSourceSearch

https://www.manuscriptorium.com/hub/chunk-RW6DGLSO.js

js manuscriptorium.com collected 2026-09-24 09:43:20 UTC 319,228 bytes, 18 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="632396b9-27cd-56e3-b9bd-376da9f50ee4")}catch(e){}}();
3import{a as Ri,b as $i}from"./chunk-HF4PBFWC.js";import{a as ot}from"./chunk-JOKVDKE2.js";import"./chunk-KFGNW4S6.js";import{a as Lc}from"./chunk-XT33IANC.js";import{c as Re}from"./chunk-RHFH6PQY.js";import{a as Gi,b as Fc,c as Nr}from"./chunk-VR3UBP5M.js";import{a as xE,c as Pc}from"./chunk-N6PFLIJC.js";import{a as $l}from"./chunk-WCKIHH4E.js";import{d as Ac}from"./chunk-BLQTSNE2.js";import{a as Ic,b as Dc}from"./chunk-7UB3EGHD.js";import"./chunk-EWMUHHXC.js";import{a as mc}from"./chunk-FOEBA2UI.js";import{a as Ai,b as Pi}from"./chunk-Q7HO4EIY.js";import"./chunk-BSWOONOW.js";import{a as _c,b as yc,c as xc,g as Ii}from"./chunk-GF47EVLL.js";import"./chunk-XV5QIMWT.js";import"./chunk-XIV6ZMJH.js";import{a as Sc,b as Mc,c as Di,d as As,e as Tc,g as hn,h as kc,i as qc,m as Li,p as Fi}from"./chunk-T3F4JFPM.js";import{$b as Ec,Bb as bc,Fb as wc,Vc as Oc,Wc as Nc,uc as Cc}from"./chunk-JF3NO7BU.js";import"./chunk-ONBY7VLJ.js";import"./chunk-N7MRL3DG.js";import"./chunk-NEXQTY2J.js";import{a as Ni}from"./chunk-IJF47LEK.js";import{a as fc,c as hc,d as pc,h as dc}from"./chunk-NDD7CGWO.js";import"./chunk-M7WNTR54.js";import{a as gc,b as vc}from"./chunk-4EMHEHJ6.js";import{a as cc}from"./chunk-WX2GXT6E.js";import{b as Ti}from"./chunk-UYBUVLZO.js";import"./chunk-OJGT5CO7.js";import"./chunk-3HJQ4TOJ.js";import{a as Oi,b as lc,c as It,d as it,e as Dt}from"./chunk-SKTI4NAC.js";import"./chunk-GOKWZW6W.js";import"./chunk-WUY2JFPV.js";import"./chunk-Y3UE7WYA.js";import{a as sc,c as ac,d as uc}from"./chunk-3VAMX662.js";import"./chunk-PVZKWQQE.js";import{e as oc}from"./chunk-RS4OAOOQ.js";import{c as Jl,d as ec,g as Ns,i as tc}from"./chunk-KJDRDLDU.js";import"./chunk-CAZIV44N.js";import"./chunk-XIEPXTT7.js";import{a as Zl,b as Ql}from"./chunk-Z5SC3XPW.js";import"./chunk-C7TPGH4O.js";import"./chunk-QCZFMUQ2.js";import"./chunk-FYEFAVDI.js";import"./chunk-V32LTTP3.js";import"./chunk-75MSKHQ5.js";import"./chunk-DBAVNV7D.js";import"./chunk-LZANT4A3.js";import{b as Kl}from"./chunk-2IL73E45.js";import{a as zl,b as ki}from"./chunk-VQTNL4J6.js";import{c as Rl}from"./chunk-NXGCLNSX.js";import{i as rc,l as nc,m as ic}from"./chunk-N37DZZN7.js";import{a as qi,b as Pt}from"./chunk-OD6I7YAT.js";import"./chunk-6GTHYMO6.js";import"./chunk-LQWW6DAP.js";import{c as Or}from"./chunk-QVMKUOA2.js";import{E as Xl,F as Wl,c as jl,h as Hl,m as Ul,r as Yl}from"./chunk-DUEKGWVE.js";import{b as qt,c as Ot}from"./chunk-SV4QHZ6R.js";import"./chunk-J7WPYGOY.js";import{a as Mi,b as Os,j as Bl,k as rt,l as nt}from"./chunk-WZYMWVAN.js";import"./chunk-WO2N3BGC.js";import"./chunk-WHTYCSAG.js";import"./chunk-MIRAE4HP.js";import{a as Nt,b as Vl,f as At}from"./chunk-LKCBMZWZ.js";import"./chunk-VMBK3ESP.js";import"./chunk-VQM3N5YY.js";import"./chunk-U2S4Q5VS.js";import"./chunk-7B3DFEIE.js";import"./chunk-QFRXUKCK.js";import{$ as ln,$b as Se,$c as Dl,Ac as qr,Bb as ue,Bc as Le,Ca as cn,Cb as ks,Db as qs,Eb as Nl,Ec as I,Fc as pe,Gc as Fe,Hb as re,Ia as Mr,J as xi,Ja as Ol,La as Ts,Ld as Si,Nd as Ll,O as Ml,Od as Fl,P as un,Qd as Gl,Rd as Ge,Sc as wi,Tc as Il,Ub as te,Uc as qe,Wb as ie,Yb as oe,Z as Tl,Zc as F,_b as Xe,_c as G,_d as le,a as Cs,ac as Me,ba as Mt,bc as T,c as Ss,cc as y,db as bi,dc as E,dd as Ei,ec as V,f as _i,g as bl,ha as Ye,ia as Ms,ib as Tr,jb as w,kc as Tt,l as wl,lc as U,ma as R,md as ir,nc as N,nd as ft,o as rr,ob as tt,pb as fn,pc as S,qc as Al,rc as Pl,s as yi,sa as A,sc as kr,sd as Ci,ta as P,tc as kt,u as El,ua as Z,uc as Te,va as kl,vb as nr,vc as ke,y as Cl,ya as ql,z as Sl,zc as we}from"./chunk-MPV5Q6GW.js";import{a as ve,b as et,c as Sr,g as h,h as ws,i as Es}from"./chunk-THKSGHO2.js";var Vh=h((BU,Bh)=>{"use strict";function RS(){this.__data__=[],this.size=0}Bh.exports=RS});var dr=h((VU,zh)=>{"use strict";function $S(e,t){return e===t||e!==e&&t!==t}zh.exports=$S});var On=h((zU,jh)=>{"use strict";var BS=dr();function VS(e,t){for(var r=e.length;r--;)if(BS(e[r][0],t))return r;return-1}jh.exports=VS});var Uh=h((jU,Hh)=>{"use strict";var zS=On(),jS=Array.prototype,HS=jS.splice;function US(e){var t=this.__data__,r=zS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():HS.call(t,r,1),--this.size,!0}Hh.exports=US});var Xh=h((HU,Yh)=>{"use strict";var YS=On();function XS(e){var t=this.__data__,r=YS(t,e);return r<0?void 0:t[r][1]}Yh.exports=XS});var Zh=h((UU,Wh)=>{"use strict";var WS=On();function ZS(e){return WS(this.__data__,e)>-1}Wh.exports=ZS});var Kh=h((YU,Qh)=>{"use strict";var QS=On();function KS(e,t){var r=this.__data__,n=QS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Qh.exports=KS});var Nn=h((XU,Jh)=>{"use strict";var JS=Vh(),eM=Uh(),tM=Xh(),rM=Zh(),nM=Kh();function Gr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Gr.prototype.clear=JS;Gr.prototype.delete=eM;Gr.prototype.get=tM;Gr.prototype.has=rM;Gr.prototype.set=nM;Jh.exports=Gr});var tp=h((WU,ep)=>{"use strict";var iM=Nn();function oM(){this.__data__=new iM,this.size=0}ep.exports=oM});var np=h((ZU,rp)=>{"use strict";function sM(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}rp.exports=sM});var op=h((QU,ip)=>{"use strict";function aM(e){return this.__data__.get(e)}ip.exports=aM});var ap=h((KU,sp)=>{"use strict";function uM(e){return this.__data__.has(e)}sp.exports=uM});var sa=h((JU,up)=>{"use strict";var lM=typeof global=="object"&&global&&global.Object===Object&&global;up.exports=lM});var Be=h((eY,lp)=>{"use strict";var cM=sa(),fM=typeof self=="object"&&self&&self.Object===Object&&self,hM=cM||fM||Function("return this")();lp.exports=hM});var mr=h((tY,cp)=>{"use strict";var pM=Be(),dM=pM.Symbol;cp.exports=dM});var dp=h((rY,pp)=>{"use strict";var fp=mr(),hp=Object.prototype,mM=hp.hasOwnProperty,gM=hp.toString,An=fp?fp.toStringTag:void 0;function vM(e){var t=mM.call(e,An),r=e[An];try{e[An]=void 0;var n=!0}catch{}var i=gM.call(e);return n&&(t?e[An]=r:delete e[An]),i}pp.exports=vM});var gp=h((nY,mp)=>{"use strict";var _M=Object.prototype,yM=_M.toString;function xM(e){return yM.call(e)}mp.exports=xM});var Vt=h((iY,yp)=>{"use strict";var vp=mr(),bM=dp(),wM=gp(),EM="[object Null]",CM="[object Undef
3ined]",_p=vp?vp.toStringTag:void 0;function SM(e){return e==null?e===void 0?CM:EM:_p&&_p in Object(e)?bM(e):wM(e)}yp.exports=SM});var Oe=h((oY,xp)=>{"use strict";function MM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}xp.exports=MM});var Rr=h((sY,bp)=>{"use strict";var TM=Vt(),kM=Oe(),qM="[object AsyncFunction]",OM="[object Function]",NM="[object GeneratorFunction]",AM="[object Proxy]";function PM(e){if(!kM(e))return!1;var t=TM(e);return t==OM||t==NM||t==qM||t==AM}bp.exports=PM});var Ep=h((aY,wp)=>{"use strict";var IM=Be(),DM=IM["__core-js_shared__"];wp.exports=DM});var Mp=h((uY,Sp)=>{"use strict";var aa=Ep(),Cp=(function(){var e=/[^.]+$/.exec(aa&&aa.keys&&aa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function LM(e){return!!Cp&&Cp in e}Sp.exports=LM});var ua=h((lY,Tp)=>{"use strict";var FM=Function.prototype,GM=FM.toString;function RM(e){if(e!=null){try{return GM.call(e)}catch{}try{return e+""}catch{}}return""}Tp.exports=RM});var qp=h((cY,kp)=>{"use strict";var $M=Rr(),BM=Mp(),VM=Oe(),zM=ua(),jM=/[\\^$.*+?()[\]{}|]/g,HM=/^\[object .+?Constructor\]$/,UM=Function.prototype,YM=Object.prototype,XM=UM.toString,WM=YM.hasOwnProperty,ZM=RegExp("^"+XM.call(WM).replace(jM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QM(e){if(!VM(e)||BM(e))return!1;var t=$M(e)?ZM:HM;return t.test(zM(e))}kp.exports=QM});var Np=h((fY,Op)=>{"use strict";function KM(e,t){return e?.[t]}Op.exports=KM});var zt=h((hY,Ap)=>{"use strict";var JM=qp(),eT=Np();function tT(e,t){var r=eT(e,t);return JM(r)?r:void 0}Ap.exports=tT});var go=h((pY,Pp)=>{"use strict";var rT=zt(),nT=Be(),iT=rT(nT,"Map");Pp.exports=iT});var Pn=h((dY,Ip)=>{"use strict";var oT=zt(),sT=oT(Object,"create");Ip.exports=sT});var Fp=h((mY,Lp)=>{"use strict";var Dp=Pn();function aT(){this.__data__=Dp?Dp(null):{},this.size=0}Lp.exports=aT});var Rp=h((gY,Gp)=>{"use strict";function uT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Gp.exports=uT});var Bp=h((vY,$p)=>{"use strict";var lT=Pn(),cT="__lodash_hash_undefined__",fT=Object.prototype,hT=fT.hasOwnProperty;function pT(e){var t=this.__data__;if(lT){var r=t[e];return r===cT?void 0:r}return hT.call(t,e)?t[e]:void 0}$p.exports=pT});var zp=h((_Y,Vp)=>{"use strict";var dT=Pn(),mT=Object.prototype,gT=mT.hasOwnProperty;function vT(e){var t=this.__data__;return dT?t[e]!==void 0:gT.call(t,e)}Vp.exports=vT});var Hp=h((yY,jp)=>{"use strict";var _T=Pn(),yT="__lodash_hash_undefined__";function xT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_T&&t===void 0?yT:t,this}jp.exports=xT});var Yp=h((xY,Up)=>{"use strict";var bT=Fp(),wT=Rp(),ET=Bp(),CT=zp(),ST=Hp();function $r(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}$r.prototype.clear=bT;$r.prototype.delete=wT;$r.prototype.get=ET;$r.prototype.has=CT;$r.prototype.set=ST;Up.exports=$r});var Zp=h((bY,Wp)=>{"use strict";var Xp=Yp(),MT=Nn(),TT=go();function kT(){this.size=0,this.__data__={hash:new Xp,map:new(TT||MT),string:new Xp}}Wp.exports=kT});var Kp=h((wY,Qp)=>{"use strict";function qT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}Qp.exports=qT});var In=h((EY,Jp)=>{"use strict";var OT=Kp();function NT(e,t){var r=e.__data__;return OT(t)?r[typeof t=="string"?"string":"hash"]:r.map}Jp.exports=NT});var td=h((CY,ed)=>{"use strict";var AT=In();function PT(e){var t=AT(this,e).delete(e);return this.size-=t?1:0,t}ed.exports=PT});var nd=h((SY,rd)=>{"use strict";var IT=In();function DT(e){return IT(this,e).get(e)}rd.exports=DT});var od=h((MY,id)=>{"use strict";var LT=In();function FT(e){return LT(this,e).has(e)}id.exports=FT});var ad=h((TY,sd)=>{"use strict";var GT=In();function RT(e,t){var r=GT(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}sd.exports=RT});var vo=h((kY,ud)=>{"use strict";var $T=Zp(),BT=td(),VT=nd(),zT=od(),jT=ad();function Br(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Br.prototype.clear=$T;Br.prototype.delete=BT;Br.prototype.get=VT;Br.prototype.has=zT;Br.prototype.set=jT;ud.exports=Br});var cd=h((qY,ld)=>{"use strict";var HT=Nn(),UT=go(),YT=vo(),XT=200;function WT(e,t){var r=this.__data__;if(r instanceof HT){var n=r.__data__;if(!UT||n.length<XT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new YT(n)}return r.set(e,t),this.size=r.size,this}ld.exports=WT});var Dn=h((OY,fd)=>{"use strict";var ZT=Nn(),QT=tp(),KT=np(),JT=op(),e2=ap(),t2=cd();function Vr(e){var t=this.__data__=new ZT(e);this.size=t.size}Vr.prototype.clear=QT;Vr.prototype.delete=KT;Vr.prototype.get=JT;Vr.prototype.has=e2;Vr.prototype.set=t2;fd.exports=Vr});var _o=h((NY,hd)=>{"use strict";function r2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}hd.exports=r2});var la=h((AY,pd)=>{"use strict";var n2=zt(),i2=(function(){try{var e=n2(Object,"defineProperty");return e({},"",{}),e}catch{}})();pd.exports=i2});var Ln=h((PY,md)=>{"use strict";var dd=la();function o2(e,t,r){t=="__proto__"&&dd?dd(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}md.exports=o2});var Fn=h((IY,gd)=>{"use strict";var s2=Ln(),a2=dr(),u2=Object.prototype,l2=u2.hasOwnProperty;function c2(e,t,r){var n=e[t];(!(l2.call(e,t)&&a2(n,r))||r===void 0&&!(t in e))&&s2(e,t,r)}gd.exports=c2});var zr=h((DY,vd)=>{"use strict";var f2=Fn(),h2=Ln();function p2(e,t,r,n){var i=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var a=t[o],u=n?n(r[a],e[a],a,r,e):void 0;u===void 0&&(u=e[a]),i?h2(r,a,u):f2(r,a,u)}return r}vd.exports=p2});var yd=h((LY,_d)=>{"use strict";function d2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}_d.exports=d2});var Ze=h((FY,xd)=>{"use strict";function m2(e){return e!=null&&typeof e=="object"}xd.exports=m2});var wd=h((GY,bd)=>{"use strict";var g2=Vt(),v2=Ze(),_2="[object Arguments]";function y2(e){return v2(e)&&g2(e)==_2}bd.exports=y2});var jr=h((RY,Sd)=>{"use strict";var Ed=wd(),x2=Ze(),Cd=Object.prototype,b2=Cd.hasOwnProperty,w2=Cd.propertyIsEnumerable,E2=Ed((function(){return arguments})())?Ed:function(e){return x2(e)&&b2.call(e,"callee")&&!w2.call(e,"callee")};Sd.exports=E2});var ae=h(($Y,Md)=>{"use strict";var C2=Array.isArray;Md.exports=C2});var kd=h((BY,Td)=>{"use strict";function S2(){return!1}Td.exports=S2});var gr=h((Gn,Hr)=>{"use strict";var M2=Be(),T2=kd(),Nd=typeof Gn=="object"&&Gn&&!Gn.nodeType&&Gn,qd=Nd&&typeof Hr=="object"&&Hr&&!Hr.nodeType&&Hr,k2=qd&&qd.exports===Nd,Od=k2?M2.Buffer:void 0,q2=Od?Od.isBuffer:void 0,O2=q2||T2;Hr.exports=O2});var Rn=h((VY,Ad)=>{"use strict";var N2=9007199254740991,A2=/^(?:0|[1-9]\d*)$/;function P2(e,t){var r=typeof e;return t=t??N2,!!t&&(r=="number"||r!="symbol"&&A2.test(e))&&e>-1&&e%1==0&&e<t}Ad.exports=P2});var yo=h((zY,Pd)=>{"use strict";var I2=9007199254740991;function D2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=I2}Pd.exports=D2});var Dd=h((jY,Id)=>{"use strict";var L2=Vt(),F2=yo(),G2=Ze(),R2="[object Arguments]",$2="[object Array]",B2="[object Boolean]",V2="[object Date]",z2="[object Error]",j2="[object Function]",H2="[object Map]",U2="[object Number]",Y2="[object Object]",X2="[object RegExp]",W2="[object Set]",Z2="[object String]",Q2="[object WeakMap]",K2="[object ArrayBuffer]",J2="[object DataView]",ek="[object Float32Array]",tk="[object Float64Array
3]",rk="[object Int8Array]",nk="[object Int16Array]",ik="[object Int32Array]",ok="[object Uint8Array]",sk="[object Uint8ClampedArray]",ak="[object Uint16Array]",uk="[object Uint32Array]",K={};K[ek]=K[tk]=K[rk]=K[nk]=K[ik]=K[ok]=K[sk]=K[ak]=K[uk]=!0;K[R2]=K[$2]=K[K2]=K[B2]=K[J2]=K[V2]=K[z2]=K[j2]=K[H2]=K[U2]=K[Y2]=K[X2]=K[W2]=K[Z2]=K[Q2]=!1;function lk(e){return G2(e)&&F2(e.length)&&!!K[L2(e)]}Id.exports=lk});var $n=h((HY,Ld)=>{"use strict";function ck(e){return function(t){return e(t)}}Ld.exports=ck});var xo=h((Bn,Ur)=>{"use strict";var fk=sa(),Fd=typeof Bn=="object"&&Bn&&!Bn.nodeType&&Bn,Vn=Fd&&typeof Ur=="object"&&Ur&&!Ur.nodeType&&Ur,hk=Vn&&Vn.exports===Fd,ca=hk&&fk.process,pk=(function(){try{var e=Vn&&Vn.require&&Vn.require("util").types;return e||ca&&ca.binding&&ca.binding("util")}catch{}})();Ur.exports=pk});var Yr=h((UY,$d)=>{"use strict";var dk=Dd(),mk=$n(),Gd=xo(),Rd=Gd&&Gd.isTypedArray,gk=Rd?mk(Rd):dk;$d.exports=gk});var fa=h((YY,Bd)=>{"use strict";var vk=yd(),_k=jr(),yk=ae(),xk=gr(),bk=Rn(),wk=Yr(),Ek=Object.prototype,Ck=Ek.hasOwnProperty;function Sk(e,t){var r=yk(e),n=!r&&_k(e),i=!r&&!n&&xk(e),o=!r&&!n&&!i&&wk(e),s=r||n||i||o,a=s?vk(e.length,String):[],u=a.length;for(var l in e)(t||Ck.call(e,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||bk(l,u)))&&a.push(l);return a}Bd.exports=Sk});var zn=h((XY,Vd)=>{"use strict";var Mk=Object.prototype;function Tk(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Mk;return e===r}Vd.exports=Tk});var ha=h((WY,zd)=>{"use strict";function kk(e,t){return function(r){return e(t(r))}}zd.exports=kk});var Hd=h((ZY,jd)=>{"use strict";var qk=ha(),Ok=qk(Object.keys,Object);jd.exports=Ok});var bo=h((QY,Ud)=>{"use strict";var Nk=zn(),Ak=Hd(),Pk=Object.prototype,Ik=Pk.hasOwnProperty;function Dk(e){if(!Nk(e))return Ak(e);var t=[];for(var r in Object(e))Ik.call(e,r)&&r!="constructor"&&t.push(r);return t}Ud.exports=Dk});var at=h((KY,Yd)=>{"use strict";var Lk=Rr(),Fk=yo();function Gk(e){return e!=null&&Fk(e.length)&&!Lk(e)}Yd.exports=Gk});var _t=h((JY,Xd)=>{"use strict";var Rk=fa(),$k=bo(),Bk=at();function Vk(e){return Bk(e)?Rk(e):$k(e)}Xd.exports=Vk});var Zd=h((eX,Wd)=>{"use strict";var zk=zr(),jk=_t();function Hk(e,t){return e&&zk(t,jk(t),e)}Wd.exports=Hk});var Kd=h((tX,Qd)=>{"use strict";function Uk(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}Qd.exports=Uk});var em=h((rX,Jd)=>{"use strict";var Yk=Oe(),Xk=zn(),Wk=Kd(),Zk=Object.prototype,Qk=Zk.hasOwnProperty;function Kk(e){if(!Yk(e))return Wk(e);var t=Xk(e),r=[];for(var n in e)n=="constructor"&&(t||!Qk.call(e,n))||r.push(n);return r}Jd.exports=Kk});var jt=h((nX,tm)=>{"use strict";var Jk=fa(),eq=em(),tq=at();function rq(e){return tq(e)?Jk(e,!0):eq(e)}tm.exports=rq});var nm=h((iX,rm)=>{"use strict";var nq=zr(),iq=jt();function oq(e,t){return e&&nq(t,iq(t),e)}rm.exports=oq});var pa=h((jn,Xr)=>{"use strict";var sq=Be(),am=typeof jn=="object"&&jn&&!jn.nodeType&&jn,im=am&&typeof Xr=="object"&&Xr&&!Xr.nodeType&&Xr,aq=im&&im.exports===am,om=aq?sq.Buffer:void 0,sm=om?om.allocUnsafe:void 0;function uq(e,t){if(t)return e.slice();var r=e.length,n=sm?sm(r):new e.constructor(r);return e.copy(n),n}Xr.exports=uq});var da=h((oX,um)=>{"use strict";function lq(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}um.exports=lq});var ma=h((sX,lm)=>{"use strict";function cq(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}lm.exports=cq});var ga=h((aX,cm)=>{"use strict";function fq(){return[]}cm.exports=fq});var wo=h((uX,hm)=>{"use strict";var hq=ma(),pq=ga(),dq=Object.prototype,mq=dq.propertyIsEnumerable,fm=Object.getOwnPropertySymbols,gq=fm?function(e){return e==null?[]:(e=Object(e),hq(fm(e),function(t){return mq.call(e,t)}))}:pq;hm.exports=gq});var dm=h((lX,pm)=>{"use strict";var vq=zr(),_q=wo();function yq(e,t){return vq(e,_q(e),t)}pm.exports=yq});var Eo=h((cX,mm)=>{"use strict";function xq(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}mm.exports=xq});var Hn=h((fX,gm)=>{"use strict";var bq=ha(),wq=bq(Object.getPrototypeOf,Object);gm.exports=wq});var va=h((hX,vm)=>{"use strict";var Eq=Eo(),Cq=Hn(),Sq=wo(),Mq=ga(),Tq=Object.getOwnPropertySymbols,kq=Tq?function(e){for(var t=[];e;)Eq(t,Sq(e)),e=Cq(e);return t}:Mq;vm.exports=kq});var ym=h((pX,_m)=>{"use strict";var qq=zr(),Oq=va();function Nq(e,t){return qq(e,Oq(e),t)}_m.exports=Nq});var _a=h((dX,xm)=>
vendor: 4,725 bytes, line 3
3{"use strict";var Aq=Eo(),Pq=ae();function Iq(e,t,r){var n=t(e);return Pq(e)?n:Aq(n,r(e))}xm.exports=Iq});var ya=h((mX,bm)=>{"use strict";var Dq=_a(),Lq=wo(),Fq=_t();function Gq(e){return Dq(e,Fq,Lq)}bm.exports=Gq});var Em=h((gX,wm)=>{"use strict";var Rq=_a(),$q=va(),Bq=jt();function Vq(e){return Rq(e,Bq,$q)}wm.exports=Vq});var Sm=h((vX,Cm)=>{"use strict";var zq=zt(),jq=Be(),Hq=zq(jq,"DataView");Cm.exports=Hq});var Tm=h((_X,Mm)=>{"use strict";var Uq=zt(),Yq=Be(),Xq=Uq(Yq,"Promise");Mm.exports=Xq});var xa=h((yX,km)=>{"use strict";var Wq=zt(),Zq=Be(),Qq=Wq(Zq,"Set");km.exports=Qq});var Om=h((xX,qm)=>{"use strict";var Kq=zt(),Jq=Be(),eO=Kq(Jq,"WeakMap");qm.exports=eO});var _r=h((bX,Fm)=>{"use strict";var ba=Sm(),wa=go(),Ea=Tm(),Ca=xa(),Sa=Om(),Lm=Vt(),Wr=ua(),Nm="[object Map]",tO="[object Object]",Am="[object Promise]",Pm="[object Set]",Im="[object WeakMap]",Dm="[object DataView]",rO=Wr(ba),nO=Wr(wa),iO=Wr(Ea),oO=Wr(Ca),sO=Wr(Sa),vr=Lm;(ba&&vr(new ba(new ArrayBuffer(1)))!=Dm||wa&&vr(new wa)!=Nm||Ea&&vr(Ea.resolve())!=Am||Ca&&vr(new Ca)!=Pm||Sa&&vr(new Sa)!=Im)&&(vr=function(e){var t=Lm(e),r=t==tO?e.constructor:void 0,n=r?Wr(r):"";if(n)switch(n){case rO:return Dm;case nO:return Nm;case iO:return Am;case oO:return Pm;case sO:return Im}return t});Fm.exports=vr});var Rm=h((wX,Gm)=>{"use strict";var aO=Object.prototype,uO=aO.hasOwnProperty;function lO(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&uO.call(e,"index")&&(r.index=e.index,r.input=e.input),r}Gm.exports=lO});var Ma=h((EX,$m)=>{"use strict";var cO=Be(),fO=cO.Uint8Array;$m.exports=fO});var Co=h((CX,Vm)=>{"use strict";var Bm=Ma();function hO(e){var t=new e.constructor(e.byteLength);return new Bm(t).set(new Bm(e)),t}Vm.exports=hO});var jm=h((SX,zm)=>{"use strict";var pO=Co();function dO(e,t){var r=t?pO(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}zm.exports=dO});var Um=h((MX,Hm)=>{"use strict";var mO=/\w*$/;function gO(e){var t=new e.constructor(e.source,mO.exec(e));return t.lastIndex=e.lastIndex,t}Hm.exports=gO});var Qm=h((TX,Zm)=>{"use strict";var Ym=mr(),Xm=Ym?Ym.prototype:void 0,Wm=Xm?Xm.valueOf:void 0;function vO(e){return Wm?Object(Wm.call(e)):{}}Zm.exports=vO});var Ta=h((kX,Km)=>{"use strict";var _O=Co();function yO(e,t){var r=t?_O(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}Km.exports=yO});var eg=h((qX,Jm)=>{"use strict";var xO=Co(),bO=jm(),wO=Um(),EO=Qm(),CO=Ta(),SO="[object Boolean]",MO="[object Date]",TO="[object Map]",kO="[object Number]",qO="[object RegExp]",OO="[object Set]",NO="[object String]",AO="[object Symbol]",PO="[object ArrayBuffer]",IO="[object DataView]",DO="[object Float32Array]",LO="[object Float64Array]",FO="[object Int8Array]",GO="[object Int16Array]",RO="[object Int32Array]",$O="[object Uint8Array]",BO="[object Uint8ClampedArray]",VO="[object Uint16Array]",zO="[object Uint32Array]";function jO(e,t,r){var n=e.constructor;switch(t){case PO:return xO(e);case SO:case MO:return new n(+e);case IO:return bO(e,r);case DO:case LO:case FO:case GO:case RO:case $O:case BO:case VO:case zO:return CO(e,r);case TO:return new n;case kO:case NO:return new n(e);case qO:return wO(e);case OO:return new n;case AO:return EO(e)}}Jm.exports=jO});var ka=h((OX,rg)=>{"use strict";var HO=Oe(),tg=Object.create,UO=(function(){function e(){}return function(t){if(!HO(t))return{};if(tg)return tg(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();rg.exports=UO});var qa=h((NX,ng)=>{"use strict";var YO=ka(),XO=Hn(),WO=zn();function ZO(e){return typeof e.constructor=="function"&&!WO(e)?YO(XO(e)):{}}ng.exports=ZO});var og=h((AX,ig)=>{"use strict";var QO=_r(),KO=Ze(),JO="[object Map]";function eN(e){return KO(e)&&QO(e)==JO}ig.exports=eN});var lg=h((PX,ug)=>{"use strict";var tN=og(),rN=$n(),sg=xo(),ag=sg&&sg.isMap,nN=ag?rN(ag):tN;ug.exports=nN});var fg=h((IX,cg)=>{"use strict";var iN=_r(),oN=Ze(),sN="[object Set]";function aN(e){return oN(e)&&iN(e)==sN}cg.exports=aN});var mg=h((DX,dg)=>{"use strict";var uN=fg(),lN=$n(),hg=xo(),pg=hg&&hg.isSet,cN=pg?lN(pg):uN;dg.exports=cN});var Oa=h((LX,yg)=>{"use strict";var fN=Dn(),hN=_o(),pN=Fn(),dN=Zd(),mN=nm(),gN=pa(),vN=da(),_N=dm(),yN=ym(),xN=ya(),bN=Em(),wN=_r(),EN=Rm(),CN=eg(),SN=qa(),MN=ae(),TN=gr(),kN=lg(),qN=Oe(),ON=mg(),NN=_t(),AN=jt(),PN=1,IN=2,DN=4,gg="[object Arguments]",LN="[object Array]",FN="[object Boolean]",GN="[object Date]",RN="[object Error]",vg="[object Function]",$N="[object GeneratorFunction]",BN="[object Map]",VN="[object Number]",_g="[object Object]",zN="[object RegExp]",jN="[object Set]",HN="[object String]",UN="[object Symbol]",YN="[object WeakMap]",XN="[object ArrayBuffer]",WN="[object DataView]",ZN="[object Float32Array]",QN="[object Float64Array
3]",KN="[object Int8Array]",JN="[object Int16Array]",eA="[object Int32Array]",tA="[object Uint8Array]",rA="[object Uint8ClampedArray]",nA="[object Uint16Array]",iA="[object Uint32Array]",Q={};Q[gg]=Q[LN]=Q[XN]=Q[WN]=Q[FN]=Q[GN]=Q[ZN]=Q[QN]=Q[KN]=Q[JN]=Q[eA]=Q[BN]=Q[VN]=Q[_g]=Q[zN]=Q[jN]=Q[HN]=Q[UN]=Q[tA]=Q[rA]=Q[nA]=Q[iA]=!0;Q[RN]=Q[vg]=Q[YN]=!1;function So(e,t,r,n,i,o){var s,a=t&PN,u=t&IN,l=t&DN;if(r&&(s=i?r(e,n,i,o):r(e)),s!==void 0)return s;if(!qN(e))return e;var c=MN(e);if(c){if(s=EN(e),!a)return vN(e,s)}else{var f=wN(e),p=f==vg||f==$N;if(TN(e))return gN(e,a);if(f==_g||f==gg||p&&!i){if(s=u||p?{}:SN(e),!a)return u?yN(e,mN(s,e)):_N(e,dN(s,e))}else{if(!Q[f])return i?e:{};s=CN(e,f,a)}}o||(o=new fN);var d=o.get(e);if(d)return d;o.set(e,s),ON(e)?e.forEach(function(g){s.add(So(g,t,r,g,e,o))}):kN(e)&&e.forEach(function(g,_){s.set(_,So(g,t,r,_,e,o))});var v=l?u?bN:xN:u?AN:NN,m=c?void 0:v(e);return hN(m||e,function(g,_){m&&(_=g,g=e[_]),pN(s,_,So(g,t,r,_,e,o))}),s}yg.exports=So});var bg=h((FX,xg)=>{"use strict";var oA=Oa(),sA=4;function aA(e){return oA(e,sA)}xg.exports=aA});var Mo=h((GX,wg)=>{"use strict";function uA(e){return function(){return e}}wg.exports=uA});var Cg=h((RX,Eg)=>{"use strict";function lA(e){return function(t,r,n){for(var i=-1,o=Object(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(r(o[u],u,o)===!1)break}return t}}Eg.exports=lA});var To=h(($X,Sg)=>{"use strict";var cA=Cg(),fA=cA();Sg.exports=fA});var ko=h((BX,Mg)=>{"use strict";var hA=To(),pA=_t();function dA(e,t){return e&&hA(e,t,pA)}Mg.exports=dA});var kg=h((VX,Tg)=>{"use strict";var mA=at();function gA(e,t){return function(r,n){if(r==null)return r;if(!mA(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Object(r);(t?o--:++o<i)&&n(s[o],o,s)!==!1;);return r}}Tg.exports=gA});var Un=h((zX,qg)=>{"use strict";var vA=ko(),_A=kg(),yA=_A(vA);qg.exports=yA});var Ht=h((jX,Og)=>{"use strict";function xA(e){return e}Og.exports=xA});var Na=h((HX,Ng)=>{"use strict";var bA=Ht();function wA(e){return typeof e=="function"?e:bA}Ng.exports=wA});var Aa=h((UX,Ag)=>{"use strict";var EA=_o(),CA=Un(),SA=Na(),MA=ae();function TA(e,t){var r=MA(e)?EA:CA;return r(e,SA(t))}Ag.exports=TA});var Pa=h((YX,Pg)=>{"use strict";Pg.exports=Aa()});var Dg=h((XX,Ig)=>{"use strict";var kA=Un();function qA(e,t){var r=[];return kA(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}Ig.exports=qA});var Fg=h((WX,Lg)=>{"use strict";var OA="__lodash_hash_undefined__";function NA(e){return this.__data__.set(e,OA),this}Lg.exports=NA});var Rg=h((ZX,Gg)=>{"use strict";function AA(e){return this.__data__.has(e)}Gg.exports=AA});var Ia=h((QX,$g)=>{"use strict";var PA=vo(),IA=Fg(),DA=Rg();function qo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new PA;++t<r;)this.add(e[t])}qo.prototype.add=qo.prototype.push=IA;qo.prototype.has=DA;$g.exports=qo});var Vg=h((KX,Bg)=>{"use strict";function LA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}Bg.exports=LA});var Da=h((JX,zg)=>{"use strict";function FA(e,t){return e.has(t)}zg.exports=FA});var La=h((eW,jg)=>{"use strict";var GA=Ia(),RA=Vg(),$A=Da(),BA=1,VA=2;function zA(e,t,r,n,i,o){var s=r&BA,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,p=!0,d=r&VA?new GA:void 0;for(o.set(e,t),o.set(t,e);++f<a;){var v=e[f],m=t[f];if(n)var g=s?n(m,v,f,t,e,o):n(v,m,f,e,t,o);if(g!==void 0){if(g)continue;p=!1;break}if(d){if(!RA(t,function(_,x){if(!$A(d,x)&&(v===_||i(v,_,r,n,o)))return d.push(x)})){p=!1;break}}else if(!(v===m||i(v,m,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}jg.exports=zA});var Ug=h((tW,Hg)=>{"use strict";function jA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}Hg.exports=jA});var Oo=h((rW,Yg)=>{"use strict";function HA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}Yg.exports=HA});var Kg=h((nW,Qg)=>{"use strict";var Xg=mr(),Wg=Ma(),UA=dr(),YA=La(),XA=Ug(),WA=Oo(),ZA=1,QA=2,KA="[object Boolean]",JA="[object Date]",eP="[object Error]",tP="[object Map]",rP="[object Number]",nP="[object RegExp]",iP="[object Set]",oP="[object String]",sP="[object Symbol]",aP="[object ArrayBuffer]",uP="[object DataView]",Zg=Xg?Xg.prototype:void 0,Fa=Zg?Zg.valueOf:void 0;function lP(e,t,r,n,i,o,s){switch(r){case uP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case aP:return!(e.byteLength!=t.byteLength||!o(new Wg(e),new Wg(t)));case KA:case JA:case rP:return UA(+e,+t);case eP:return e.name==t.name&&e.message==t.message;case nP:case oP:return e==t+"";case tP:var a=XA;case iP:var u=n&ZA;if(a||(a=WA),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;n|=QA,s.set(e,t);var c=YA(a(e),a(t),n,i,o,s);return s.delete(e),c;case sP:if(Fa)return Fa.call(e)==Fa.call(t)}return!1}Qg.exports=lP});var t0=h((iW,e0)=>{"use strict";var Jg=ya(),cP=1,fP=Object.prototype,hP=fP.hasOwnProperty;function pP(e,t,r,n,i,o){var s=r&cP,a=Jg(e),u=a.length,l=Jg(t),c=l.length;if(u!=c&&!s)return!1;for(var f=u;f--;){var p=a[f];if(!(s?p in t:hP.call(t,p)))return!1}var d=o.get(e),v=o.get(t);if(d&&v)return d==t&&v==e;var m=!0;o.set(e,t),o.set(t,e);for(var g=s;++f<u;){p=a[f];var _=e[p],x=t[p];if(n)var C=s?n(x,_,p,t,e,o):n(_,x,p,e,t,o);if(!(C===void 0?_===x||i(_,x,r,n,o):C)){m=!1;break}g||(g=p=="constructor")}if(m&&!g){var b=e.constructor,k=t.constructor;b!=k&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof k=="function"&&k instanceof k)&&(m=!1)}return o.delete(e),o.delete(t),m}e0.exports=pP});var l0=h((oW,u0)=>{"use strict";var Ga=Dn(),dP=La(),mP=Kg(),gP=t0(),r0=_r(),n0=ae(),i0=gr(),vP=Yr(),_P=1,o0="[object Arguments]",s0="[object Array]",No="[object Object]",yP=Object.prototype,a0=yP.hasOwnProperty;function xP(e,t,r,n,i,o){var s=n0(e),a=n0(t),u=s?s0:r0(e),l=a?s0:r0(t);
vendor: 2,498 bytes, line 3
3u=u==o0?No:u,l=l==o0?No:l;var c=u==No,f=l==No,p=u==l;if(p&&i0(e)){if(!i0(t))return!1;s=!0,c=!1}if(p&&!c)return o||(o=new Ga),s||vP(e)?dP(e,t,r,n,i,o):mP(e,t,u,r,n,i,o);if(!(r&_P)){var d=c&&a0.call(e,"__wrapped__"),v=f&&a0.call(t,"__wrapped__");if(d||v){var m=d?e.value():e,g=v?t.value():t;return o||(o=new Ga),i(m,g,r,n,o)}}return p?(o||(o=new Ga),gP(e,t,r,n,i,o)):!1}u0.exports=xP});var Ra=h((sW,h0)=>{"use strict";var bP=l0(),c0=Ze();function f0(e,t,r,n,i){return e===t?!0:e==null||t==null||!c0(e)&&!c0(t)?e!==e&&t!==t:bP(e,t,r,n,f0,i)}h0.exports=f0});var d0=h((aW,p0)=>{"use strict";var wP=Dn(),EP=Ra(),CP=1,SP=2;function MP(e,t,r,n){var i=r.length,o=i,s=!n;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var u=a[0],l=e[u],c=a[1];if(s&&a[2]){if(l===void 0&&!(u in e))return!1}else{var f=new wP;if(n)var p=n(l,c,u,e,t,f);if(!(p===void 0?EP(c,l,CP|SP,n,f):p))return!1}}return!0}p0.exports=MP});var $a=h((uW,m0)=>{"use strict";var TP=Oe();function kP(e){return e===e&&!TP(e)}m0.exports=kP});var v0=h((lW,g0)=>{"use strict";var qP=$a(),OP=_t();function NP(e){for(var t=OP(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,qP(i)]}return t}g0.exports=NP});var Ba=h((cW,_0)=>{"use strict";function AP(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}_0.exports=AP});var x0=h((fW,y0)=>{"use strict";var PP=d0(),IP=v0(),DP=Ba();function LP(e){var t=IP(e);return t.length==1&&t[0][2]?DP(t[0][0],t[0][1]):function(r){return r===e||PP(r,e,t)}}y0.exports=LP});var yr=h((hW,b0)=>{"use strict";var FP=Vt(),GP=Ze(),RP="[object Symbol]";function $P(e){return typeof e=="symbol"||GP(e)&&FP(e)==RP}b0.exports=$P});var Ao=h((pW,w0)=>{"use strict";var BP=ae(),VP=yr(),zP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jP=/^\w*$/;function HP(e,t){if(BP(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||VP(e)?!0:jP.test(e)||!zP.test(e)||t!=null&&e in Object(t)}w0.exports=HP});var S0=h((dW,C0)=>{"use strict";var E0=vo(),UP="Expected a function";function Va(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(UP);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Va.Cache||E0),r}Va.Cache=E0;C0.exports=Va});var T0=h((mW,M0)=>{"use strict";var YP=S0(),XP=500;function WP(e){var t=YP(e,function(n){return r.size===XP&&r.clear(),n}
vendor: 5,391 bytes, line 3
3),r=t.cache;return t}M0.exports=WP});var q0=h((gW,k0)=>{"use strict";var ZP=T0(),QP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,KP=/\\(\\)?/g,JP=ZP(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(QP,function(r,n,i,o){t.push(i?o.replace(KP,"$1"):n||r)}),t});k0.exports=JP});var Yn=h((vW,O0)=>{"use strict";function eI(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}O0.exports=eI});var L0=h((_W,D0)=>{"use strict";var N0=mr(),tI=Yn(),rI=ae(),nI=yr(),iI=1/0,A0=N0?N0.prototype:void 0,P0=A0?A0.toString:void 0;function I0(e){if(typeof e=="string")return e;if(rI(e))return tI(e,I0)+"";if(nI(e))return P0?P0.call(e):"";var t=e+"";return t=="0"&&1/e==-iI?"-0":t}D0.exports=I0});var za=h((yW,F0)=>{"use strict";var oI=L0();function sI(e){return e==null?"":oI(e)}F0.exports=sI});var Xn=h((xW,G0)=>{"use strict";var aI=ae(),uI=Ao(),lI=q0(),cI=za();function fI(e,t){return aI(e)?e:uI(e,t)?[e]:lI(cI(e))}G0.exports=fI});var Zr=h((bW,R0)=>{"use strict";var hI=yr(),pI=1/0;function dI(e){if(typeof e=="string"||hI(e))return e;var t=e+"";return t=="0"&&1/e==-pI?"-0":t}R0.exports=dI});var Wn=h((wW,$0)=>{"use strict";var mI=Xn(),gI=Zr();function vI(e,t){t=mI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[gI(t[r++])];return r&&r==n?e:void 0}$0.exports=vI});var V0=h((EW,B0)=>{"use strict";var _I=Wn();function yI(e,t,r){var n=e==null?void 0:_I(e,t);return n===void 0?r:n}B0.exports=yI});var j0=h((CW,z0)=>{"use strict";function xI(e,t){return e!=null&&t in Object(e)}z0.exports=xI});var ja=h((SW,H0)=>{"use strict";var bI=Xn(),wI=jr(),EI=ae(),CI=Rn(),SI=yo(),MI=Zr();function TI(e,t,r){t=bI(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=MI(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&SI(i)&&CI(s,i)&&(EI(e)||wI(e)))}H0.exports=TI});var Ha=h((MW,U0)=>{"use strict";var kI=j0(),qI=ja();function OI(e,t){return e!=null&&qI(e,t,kI)}U0.exports=OI});var X0=h((TW,Y0)=>{"use strict";var NI=Ra(),AI=V0(),PI=Ha(),II=Ao(),DI=$a(),LI=Ba(),FI=Zr(),GI=1,RI=2;function $I(e,t){return II(e)&&DI(t)?LI(FI(e),t):function(r){var n=AI(r,e);return n===void 0&&n===t?PI(r,e):NI(t,n,GI|RI)}}Y0.exports=$I});var Ua=h((kW,W0)=>{"use strict";function BI(e){return function(t){return t?.[e]}}W0.exports=BI});var Q0=h((qW,Z0)=>{"use strict";var VI=Wn();function zI(e){return function(t){return VI(t,e)}}Z0.exports=zI});var J0=h((OW,K0)=>{"use strict";var jI=Ua(),HI=Q0(),UI=Ao(),YI=Zr();function XI(e){return UI(e)?jI(YI(e)):HI(e)}K0.exports=XI});var ut=h((NW,ev)=>{"use strict";var WI=x0(),ZI=X0(),QI=Ht(),KI=ae(),JI=J0();function eD(e){return typeof e=="function"?e:e==null?QI:typeof e=="object"?KI(e)?ZI(e[0],e[1]):WI(e):JI(e)}ev.exports=eD});var Ya=h((AW,tv)=>{"use strict";var tD=ma(),rD=Dg(),nD=ut(),iD=ae();function oD(e,t){var r=iD(e)?tD:rD;return r(e,nD(t,3))}tv.exports=oD});var nv=h((PW,rv)=>{"use strict";var sD=Object.prototype,aD=sD.hasOwnProperty;function uD(e,t){return e!=null&&aD.call(e,t)}rv.exports=uD});var Xa=h((IW,iv)=>{"use strict";var lD=nv(),cD=ja();function fD(e,t){return e!=null&&cD(e,t,lD)}iv.exports=fD});var sv=h((DW,ov)=>{"use strict";var hD=bo(),pD=_r(),dD=jr(),mD=ae(),gD=at(),vD=gr(),_D=zn(),yD=Yr(),xD="[object Map]",bD="[object Set]",wD=Object.prototype,ED=wD.hasOwnProperty;function CD(e){if(e==null)return!0;if(gD(e)&&(mD(e)||typeof e=="string"||typeof e.splice=="function"||vD(e)||yD(e)||dD(e)))return!e.length;var t=pD(e);if(t==xD||t==bD)return!e.size;if(_D(e))return!hD(e).length;for(var r in e)if(ED.call(e,r))return!1;return!0}ov.exports=CD});var Wa=h((LW,av)=>{"use strict";function SD(e){return e===void 0}av.exports=SD});var Za=h((FW,uv)=>{"use strict";var MD=Un(),TD=at();function kD(e,t){var r=-1,n=TD(e)?Array(e.length):[];return MD(e,function(i,o,s){n[++r]=t(i,o,s)}),n}uv.exports=kD});var Qa=h((GW,lv)=>{"use strict";var qD=Yn(),OD=ut(),ND=Za(),AD=ae();function PD(e,t){var r=AD(e)?qD:ND;return r(e,OD(t,3))}lv.exports=PD});var fv=h((RW,cv)=>{"use strict";function ID(e,t,r,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}cv.exports=ID});var pv=h(($W,hv)=>{"use strict";function DD(e,t,r,n,i){return i(e,function(o,s,a){r=n?(n=!1,o):t(r,o,s,a)}),r}hv.exports=DD});var Ka=h((BW,dv)=>{"use strict";var LD=fv(),FD=Un(),GD=ut(),RD=pv(),$D=ae();function BD(e,t,r){var n=$D(e)?LD:RD,i=arguments.length<3;return n(e,GD(t,4),r,i,FD)}dv.exports=BD});var gv=h((VW,mv)=>{"use strict";var VD=Vt(),zD=ae(),jD=Ze(),HD="[object String]";function UD(e){return typeof e=="string"||!zD(e)&&jD(e)&&VD(e)==HD}mv.exports=UD});var _v=h((zW,vv)=>{"use strict";var YD=Ua(),XD=YD("length");vv.exports=XD});var xv=h((jW,yv)=>{"use strict";var WD="\\ud800-\\udfff",ZD="\\u0300-\\u036f",QD="\\ufe20-\\ufe2f",KD="\\u20d0-\\u20ff",JD=ZD+QD+KD,eL="\\ufe0e\\ufe0f",tL="\\u200d",rL=RegExp("["+tL+WD+JD+eL+"]");function nL(e){return rL.test(e)}yv.exports=nL});var qv=h((HW,kv)=>{"use strict";var wv="\\ud800-\\udfff",iL="\\u0300-\\u036f",oL="\\ufe20-\\ufe2f",sL="\\u20d0-\\u20ff",aL=iL+oL+sL,uL="\\ufe0e\\ufe0f",lL="["+wv+"]",Ja="["+aL+"]",eu="\\ud83c[\\udffb-\\udfff]",cL="(?:"+Ja+"|"+eu+")",Ev="[^"+wv+"]",Cv="(?:\\ud83c[\\udde6-\\uddff]){2}",Sv="[\\ud800-\\udbff][\\udc00-\\udfff]",fL="\\u200d",Mv=cL+"?",Tv="["+uL+"]?",hL="(?:"+fL+"(?:"+[Ev,Cv,Sv].join("|")+")"+Tv+Mv+")*",pL=Tv+Mv+hL,dL="(?:"+[Ev+Ja+"?",Ja,Cv,
3Sv,lL].join("|")+")",bv=RegExp(eu+"(?="+eu+")|"+dL+pL,"g");function mL(e){for(var t=bv.lastIndex=0;bv.test(e);)++t;return t}kv.exports=mL});var Nv=h((UW,Ov)=>{"use strict";var gL=_v(),vL=xv(),_L=qv();function yL(e){return vL(e)?_L(e):gL(e)}Ov.exports=yL});var Pv=h((YW,Av)=>{"use strict";var xL=bo(),bL=_r(),wL=at(),EL=gv(),CL=Nv(),SL="[object Map]",ML="[object Set]";function TL(e){if(e==null)return 0;if(wL(e))return EL(e)?CL(e):e.length;var t=bL(e);return t==SL||t==ML?e.size:xL(e).length}Av.exports=TL});var Dv=h((XW,Iv)=>{"use strict";var kL=_o(),qL=ka(),OL=ko(),NL=ut(),AL=Hn(),PL=ae(),IL=gr(),DL=Rr(),LL=Oe(),FL=Yr();function GL(e,t,r){var n=PL(e),i=n||IL(e)||FL(e);if(t=NL(t,4),r==null){var o=e&&e.constructor;i?r=n?new o:[]:LL(e)?r=DL(o)?qL(AL(e)):{}:r={}}return(i?kL:OL)(e,function(s,a,u){return t(r,s,a,u)}),r}Iv.exports=GL});var Rv=h((WW,Gv)=>{"use strict";var Lv=mr(),RL=jr(),$L=ae(),Fv=Lv?Lv.isConcatSpreadable:void 0;function BL(e){return $L(e)||RL(e)||!!(Fv&&e&&e[Fv])}Gv.exports=BL});var Po=h((ZW,Bv)=>{"use strict";var VL=Eo(),zL=Rv();function $v(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=zL),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?$v(a,t-1,r,n,i):VL(i,a):n||(i[i.length]=a)}return i}Bv.exports=$v});var zv=h((QW,Vv)=>{"use strict";function jL(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}Vv.exports=jL});var tu=h((KW,Hv)=>{"use strict";var HL=zv(),jv=Math.max;function UL(e,t,r){return t=jv(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=jv(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(s),HL(e,this,a)}}Hv.exports=UL});var Xv=h((JW,Yv)=>{"use strict";var YL=Mo(),Uv=la(),XL=Ht(),WL=Uv?function(e,t){return Uv(e,"toString",{configurable:!0,enumerable:!1,value:YL(t),writable:!0})}:XL;Yv.exports=WL});var Zv=h((eZ,Wv)=>{"use strict";var ZL=800,QL=16,KL=Date.now;function JL(e){var t=0,r=0;return function(){var n=KL(),i=QL-(n-r);if(r=n,i>0){if(++t>=ZL)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}Wv.exports=JL});var ru=h((tZ,Qv)=>{"use strict";var e3=Xv(),t3=Zv(),r3=t3(e3);Qv.exports=r3});var Zn=h((rZ,Kv)=>{"use strict";var n3=Ht(),i3=tu(),o3=ru();function s3(e,t){return o3(i3(e,t,n3),e+"")}Kv.exports=s3});var nu=h((nZ,Jv)=>{"use strict";function a3(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}Jv.exports=a3});var t_=h((iZ,e_)=>{"use strict";function u3(e){return e!==e}e_.exports=u3});var n_=h((oZ,r_)=>{"use strict";function l3(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}r_.exports=l3});var o_=h((sZ,i_)=>{"use strict";var c3=nu(),f3=t_(),h3=n_();function p3(e,t,r){return t===t?h3(e,t,r):c3(e,f3,r)}i_.exports=p3});var a_=h((aZ,s_)=>{"use strict";var m3=o_();function g3(e,t){var r=e==null?0:e.length;return!!r&&m3(e,t,0)>-1}s_.exports=g3});var l_=h((uZ,u_)=>{"use strict";function v3(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}u_.exports=v3});var f_=h((lZ,c_)=>{"use strict";function _3(){}c_.exports=_3});var p_=h((cZ,h_)=>{"use strict";var iu=xa(),y3=f_(),x3=Oo(),b3=1/0,w3=iu&&1/x3(new iu([,-0]))[1]==b3?function(e){return new iu(e)}:y3;h_.exports=w3});var m_=h((fZ,d_)=>{"use strict";var E3=Ia(),C3=a_(),S3=l_(),M3=Da(),T3=p_(),k3=Oo(),q3=200;function O3(e,t,r){var n=-1,i=C3,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=S3;else if(o>=q3){var l=t?null:T3(e);if(l)return k3(l);s=!1,i=M3,u=new E3}else u=t?[]:a;e:for(;++n<o;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,s&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),a.push(c)}else i(u,f,r)||(u!==a&&u.push(f),a.push(c))}return a}d_.exports=O3});var ou=h((hZ,g_)=>{"use strict";var N3=at(),A3=Ze();function P3(e){return A3(e)&&N3(e)}g_.exports=P3});var __=h((pZ,v_)=>{"use strict";var I3=Po(),D3=Zn(),L3=m_(),F3=ou(),G3=D3(function(e){return L3(I3(e,1,F3,!0))});v_.exports=G3});var x_=h((dZ,y_)=>{"use strict";var R3=Yn();function $3(e,t){return R3(t,function(r){return e[r]})}y_.exports=$3});var su=h((mZ,b_)=>{"use strict";var B3=x_(),V3=_t();function z3(e){return e==null?[]:B3(e,V3(e))}b_.exports=z3});var Ne=h((gZ,w_)=>{"use strict";var Io;if(typeof Sr=="function")try{Io={clone:bg(),constant:Mo(),each:Pa(),filter:Ya(),has:Xa(),isArray:ae(),isEmpty:sv(),isFunction:Rr(),isUndefined:Wa(),keys:_t(),map:Qa(),reduce:Ka(),size:Pv(),transform:Dv(),union:__(),values:su()}}catch{}Io||(Io=window._);w_.exports=Io});var Do=h((_Z,M_)=>{"use strict";var $=Ne();M_.exports=H;var j3="\0",xr="\0",E_="�";function H(e){this._isDirected=$.has(e,"directed")?e.directed:!0,this._isMultigraph=$.has(e,"multigraph")?e.multigraph:!1,this._isCompound=$.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=$.constant(void 0),this._defaultEdgeLabelFn=$.constant(void 0),this._nodes={}
3,this._isCompound&&(this._parent={},this._children={},this._children[xr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}H.prototype._nodeCount=0;H.prototype._edgeCount=0;H.prototype.isDirected=function(){return this._isDirected};H.prototype.isMultigraph=function(){return this._isMultigraph};H.prototype.isCompound=function(){return this._isCompound};H.prototype.setGraph=function(e){return this._label=e,this};H.prototype.graph=function(){return this._label};H.prototype.setDefaultNodeLabel=function(e){return $.isFunction(e)||(e=$.constant(e)),this._defaultNodeLabelFn=e,this};H.prototype.nodeCount=function(){return this._nodeCount};H.prototype.nodes=function(){return $.keys(this._nodes)};H.prototype.sources=function(){var e=this;return $.filter(this.nodes(),function(t){return $.isEmpty(e._in[t])})};H.prototype.sinks=function(){var e=this;return $.filter(this.nodes(),function(t){return $.isEmpty(e._out[t])})};H.prototype.setNodes=function(e,t){var r=arguments,n=this;return $.each(e,function(i){r.length>1?n.setNode(i,t):n.setNode(i)}),this};H.prototype.setNode=function(e,t){return $.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>
31?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=xr,this._children[e]={},this._children[xr][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};H.prototype.node=function(e){return this._nodes[e]};H.prototype.hasNode=function(e){return $.has(this._nodes,e)};H.prototype.removeNode=function(e){var t=this;if($.has(this._nodes,e)){var r=function(n){t.removeEdge(t._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],$.each(this.children(e),function(n){t.setParent(n)}),delete this._children[e]),$.each($.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],$.each($.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};H.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if($.isUndefined(t))t=xr;else{t+="";for(var r=t;!$.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this};H.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};H.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==xr)return t}};H.prototype.children=function(e){if($.isUndefined(e)&&(e=xr),this._isCompound){var t=this._children[e];if(t)return $.keys(t)}else{if(e===xr)return this.nodes();if(this.hasNode(e))return[]}};H.prototype.predecessors=function(e){var t=this._preds[e];if(t)return $.keys(t)};H.prototype.successors=function(e){var t=this._sucs[e];if(t)return $.keys(t)};H.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return $.union(t,this.successors(e))};H.prototype.isLeaf=function(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0};H.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;$.each(this._nodes,function(o,s){e(s)&&t.setNode(s,o)}),$.each(this._edgeObjs,function(o){t.hasNode(o.v)&&t.hasNode(o.w)&&t.setEdge(o,r.edge(o))});var n={};function i(o){var s=r.parent(o);return s===void 0||t.hasNode(s)?(n[o]=s,s):s in n?n[s]:i(s)}return this._isCompound&&$.each(t.nodes(),function(o){t.setParent(o,i(o))}),t};H.prototype.setDefaultEdgeLabel=function(e){return $.isFunction(e)||(e=$.constant(e)),this._defaultEdgeLabelFn=e,this};H.prototype.edgeCount=function(){return this._edgeCount};H.prototype.edges=function(){return $.values(this._edgeObjs)};H.prototype.setPath=function(e,t){var r=this,n=arguments;return $.reduce(e,function(i,o){return n.length>1?r.setEdge(i,o,t):r.setEdge(i,o),o}),this};H.prototype.setEdge=function(){var e,t,r,n,i=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,t=o.w,r=o.name,arguments.length===2&&(n=arguments[1],i=!0)):(e=o,t=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),e=""+e,t=""+t,$.isUndefined(r)||(r=""+r);var s=Qn(this._isDirected,e,t,r);if($.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=n),this;if(!$.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?n:this._defaultEdgeLabelFn(e,t,r);var a=H3(this._isDirected,e,t,r);return e=a.v,t=a.w,Object.freeze(a),this._edgeObjs[s]=a,C_(this._preds[t],e),C_(this._sucs[e],t),this._in[t][s]=a,this._out[e][s]=a,this._edgeCount++,this};H.prototype.edge=function(e,t,r){var n=arguments.length===1?au(this._isDirected,arguments[0]):Qn(this._isDirected,e,t,r);return this._edgeLabels[n]};H.prototype.hasEdge=function(e,t,r){var n=arguments.length===1?au(this._isDirected,arguments[0]):Qn(this._isDirected,e,t,r);return $.has(this._edgeLabels,n)};H.prototype.removeEdge=function(e,t,r){var n=arguments.length===1?au(this._isDirected,arguments[0]):Qn(this._isDirected,e,t,r),i=this._edgeObjs[n];return i&&(e=i.v,t=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],S_(this._preds[t],e),S_(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this};H.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=$.values(r);return t?$.filter(n,function(i){return i.v===t}):n}};H.prototype.outEdges=function(e,t){var r=this._out[e];
3if(r){var n=$.values(r);return t?$.filter(n,function(i){return i.w===t}):n}};H.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))};function C_(e,t){e[t]?e[t]++:e[t]=1}function S_(e,t){--e[t]||delete e[t]}function Qn(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var s=i;i=o,o=s}return i+E_+o+E_+($.isUndefined(n)?j3:n)}function H3(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var s=i;i=o,o=s}var a={v:i,w:o};return n&&(a.name=n),a}function au(e,t){return Qn(e,t.v,t.w,t.name)}});var k_=h((yZ,T_)=>{"use strict";T_.exports="2.1.8"});var O_=h((xZ,q_)=>{"use strict";q_.exports={Graph:Do(),version:k_()}});var A_=h((bZ,N_)=>{"use strict";var lt=Ne(),U3=Do();N_.exports={write:Y3,read:Z3};function Y3(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:X3(e),edges:W3(e)};return lt.isUndefined(e.graph())||(t.value=lt.clone(e.graph())),t}function X3(e){return lt.map(e.nodes(),function(t){var r=e.node(t),n=e.parent(t),i={v:t};return lt.isUndefined(r)||(i.value=r),lt.isUndefined(n)||(i.parent=n),i})}function W3(e){return lt.map(e.edges(),function(t){var r=e.edge(t),n={v:t.v,w:t.w};return lt.isUndefined(t.name)||(n.name=t.name),lt.isUndefined(r)||(n.value=r),n})}function Z3(e){var t=new U3(e.options).setGraph(e.value);return lt.each(e.nodes,function(r){t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),lt.each(e.edges,function(r){t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}});var I_=h((wZ,P_)=>{"use strict";var Lo=Ne();P_.exports=Q3;function Q3(e){var t={},r=[],n;function i(o){Lo.has(t,o)||(t[o]=!0,n.push(o),Lo.each(e.successors(o),i),Lo.each(e.predecessors(o),i))}return Lo.each(e.nodes(),function(o){n=[],i(o),n.length&&r.push(n)}),r}});var uu=h((EZ,L_)=>{"use strict";var D_=Ne();L_.exports=Ve;function Ve(){this._arr=[],this._keyIndices={}}Ve.prototype.size=function(){return this._arr.length};Ve.prototype.keys=function(){return this._arr.map(function(e){return e.key})};Ve.prototype.has=function(e){return D_.has(this._keyIndices,e)};Ve.prototype.priority=function(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority};Ve.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};Ve.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!D_.has(r,e)){var n=this._arr,i=n.length;return r[e]=i,n.push({key:e,priority:t}),this._decrease(i),!0}return!1};Ve.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};Ve.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)};Ve.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))};Ve.prototype._decrease=function(e){for(var t=this._arr,r=t[e].priority,n;e!==0&&(n=e>>1,!(t[n].priority<r));)this._swap(e,n),e=n};Ve.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t}});var lu=h((CZ,F_)=>{"use strict";var K3=Ne(),J3=uu();F_.exports=tF;var eF=K3.constant(1);function tF(e,t,r,n){return rF(e,String(t),r||eF,n||function(i){return e.outEdges(i)})}function rF(e,t,r,n){var i={},o=new J3,s,a,u=function(l){var c=l.v!==s?l.v:l.w,f=i[c],p=r(l),d=a.distance+p;if(p<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+l+" Weight: "+p);d<f.distance&&(f.distance=d,f.predecessor=s,o.decrease(c,d))};for(e.nodes().forEach(function(l){var c=l===t?0:Number.POSITIVE_INFINITY;i[l]={distance:c},o.add(l,c)});o.size()>0&&(s=o.removeMin(),a=i[s],a.distance!==Number.POSITIVE_INFINITY);
3)n(s).forEach(u);return i}});var R_=h((SZ,G_)=>{"use strict";var nF=lu(),iF=Ne();G_.exports=oF;function oF(e,t,r){return iF.transform(e.nodes(),function(n,i){n[i]=nF(e,i,t,r)},{})}});var cu=h((MZ,B_)=>{"use strict";var $_=Ne();B_.exports=sF;function sF(e){var t=0,r=[],n={},i=[];function o(s){var a=n[s]={onStack:!0,lowlink:t,index:t++};if(r.push(s),e.successors(s).forEach(function(c){$_.has(n,c)?n[c].onStack&&(a.lowlink=Math.min(a.lowlink,n[c].index)):(o(c),a.lowlink=Math.min(a.lowlink,n[c].lowlink))}),a.lowlink===a.index){var u=[],l;do l=r.pop(),n[l].onStack=!1,u.push(l);while(s!==l);i.push(u)}}return e.nodes().forEach(function(s){$_.has(n,s)||o(s)}),i}});var z_=h((TZ,V_)=>{"use strict";var aF=Ne(),uF=cu();V_.exports=lF;function lF(e){return aF.filter(uF(e),function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}});var H_=h((kZ,j_)=>{"use strict";var cF=Ne();j_.exports=hF;var fF=cF.constant(1);function hF(e,t,r){return pF(e,t||fF,r||function(n){return e.outEdges(n)})}function pF(e,t,r){var n={},i=e.nodes();return i.forEach(function(o){n[o]={},n[o][o]={distance:0}
3,i.forEach(function(s){o!==s&&(n[o][s]={distance:Number.POSITIVE_INFINITY})}),r(o).forEach(function(s){var a=s.v===o?s.w:s.v,u=t(s);n[o][a]={distance:u,predecessor:o}})}),i.forEach(function(o){var s=n[o];i.forEach(function(a){var u=n[a];i.forEach(function(l){var c=u[o],f=s[l],p=u[l],d=c.distance+f.distance;d<p.distance&&(p.distance=d,p.predecessor=f.predecessor)})})}),n}});var fu=h((qZ,Y_)=>{"use strict";var Kn=Ne();Y_.exports=U_;U_.CycleException=Fo;function U_(e){var t={},r={},n=[];function i(o){if(Kn.has(r,o))throw new Fo;Kn.has(t,o)||(r[o]=!0,t[o]=!0,Kn.each(e.predecessors(o),i),delete r[o],n.push(o))}if(Kn.each(e.sinks(),i),Kn.size(t)!==e.nodeCount())throw new Fo;return n}function Fo(){}Fo.prototype=new Error});var Z_=h((OZ,W_)=>{"use strict";var X_=fu();W_.exports=dF;function dF(e){try{X_(e)}catch(t){if(t instanceof X_.CycleException)return!1;throw t}return!0}});var hu=h((NZ,K_)=>{"use strict";var Go=Ne();K_.exports=mF;function mF(e,t,r){Go.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return Go.each(t,function(s){if(!e.hasNode(s))throw new Error("Graph does not have node: "+s);Q_(e,s,r==="post",o,n,i)}),i}function Q_(e,t,r,n,i,o){Go.has(n,t)||(n[t]=!0,r||o.push(t),Go.each(i(t),function(s){Q_(e,s,r,n,i,o)}),r&&o.push(t))}});var ey=h((AZ,J_)=>{"use strict";var gF=hu();J_.exports=vF;function vF(e,t){return gF(e,t,"post")}});var ry=h((PZ,ty)=>{"use strict";var _F=hu();ty.exports=yF;function yF(e,t){return _F(e,t,"pre")}});var oy=h((IZ,iy)=>{"use strict";var ny=Ne(),xF=Do(),bF=uu();iy.exports=wF;function wF(e,t){var r=new xF,n={},i=new bF,o;function s(u){var l=u.v===o?u.w:u.v,c=i.priority(l);if(c!==void 0){var f=t(u);f<c&&(n[l]=o,i.decrease(l,f))}}if(e.nodeCount()===0)return r;ny.each(e.nodes(),function(u){i.add(u,Number.POSITIVE_INFINITY),r.setNode(u)}),i.decrease(e.nodes()[0],0);for(var a=!1;i.size()>0;){if(o=i.removeMin(),ny.has(n,o))r.setEdge(o,n[o]);else{if(a)throw new Error("Input graph is not connected: "+e);a=!0}e.nodeEdges(o).forEach(s)}return r}});var ay=h((DZ,sy)=>{"use strict";sy.exports={components:I_(),dijkstra:lu(),dijkstraAll:R_(),findCycles:z_(),floydWarshall:H_(),isAcyclic:Z_(),postorder:ey(),preorder:ry(),prim:oy(),tarjan:cu(),topsort:fu()}});var cy=h((LZ,ly)=>{"use strict";var uy=O_();ly.exports={Graph:uy.Graph,json:A_(),alg:ay(),version:uy.version}});var ze=h((FZ,fy)=>{"use strict";var Ro;if(typeof Sr=="function")try{Ro=cy()}catch{}Ro||(Ro=window.graphlib);fy.exports=Ro});var py=h((RZ,hy)=>{"use strict";var EF=Oa(),CF=1,SF=4;function MF(e){return EF(e,CF|SF)}hy.exports=MF});var Jn=h(($Z,dy)=>{"use strict";var TF=dr(),kF=at(),qF=Rn(),OF=Oe();function NF(e,t,r){if(!OF(r))return!1;var n=typeof t;return(n=="number"?kF(r)&&qF(t,r.length):n=="string"&&t in r)?TF(r[t],e):!1}dy.exports=NF});var vy=h((BZ,gy)=>{"use strict";var AF=Zn(),PF=dr(),IF=Jn(),DF=jt(),my=Object.prototype,LF=my.hasOwnProperty,FF=AF(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&IF(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],s=DF(o),a=-1,u=s.length;++a<u;){var l=s[a],c=e[l];(c===void 0||PF(c,my[l])&&!LF.call(e,l))&&(e[l]=o[l])}return e});gy.exports=FF});var yy=h((VZ,_y)=>{"use strict";var GF=ut(),RF=at(),$F=_t();function BF(e){return function(t,r,n){var i=Object(t);if(!RF(t)){var o=GF(r,3);t=$F(t),r=function(a){return o(i[a],a,i)}}var s=e(t,r,n);return s>-1?i[o?t[s]:s]:void 0}}_y.exports=BF});var by=h((zZ,xy)=>{"use strict";var VF=/\s/;function zF(e){for(var t=e.length;t--&&VF.test(e.charAt(t)););return t}xy.exports=zF});var Ey=h((jZ,wy)=>{"use strict";var jF=by(),HF=/^\s+/;function UF(e){return e&&e.slice(0,jF(e)+1).replace(HF,"")}wy.exports=UF});var Ty=h((HZ,My)=>{"use strict";var YF=Ey(),Cy=Oe(),XF=yr(),Sy=NaN,WF=/^[-+]0x[0-9a-f]+$/i,ZF=/^0b[01]+$/i,QF=/^0o[0-7]+$/i,KF=parseInt;function JF(e){if(typeof e=="number")return e;if(XF(e))return Sy;if(Cy(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cy(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=YF(e);var r=ZF.test(e);return r||QF.test(e)?KF(e.slice(2),r?2:8):WF.test(e)?Sy:+e}My.exports=JF});var pu=h((UZ,qy)=>{"use strict";
3var eG=Ty(),ky=1/0,tG=17976931348623157e292;function rG(e){if(!e)return e===0?e:0;if(e=eG(e),e===ky||e===-ky){var t=e<0?-1:1;return t*tG}return e===e?e:0}qy.exports=rG});var Ny=h((YZ,Oy)=>{"use strict";var nG=pu();function iG(e){var t=nG(e),r=t%1;return t===t?r?t-r:t:0}Oy.exports=iG});var Py=h((XZ,Ay)=>{"use strict";var oG=nu(),sG=ut(),aG=Ny(),uG=Math.max;function lG(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:aG(r);return i<0&&(i=uG(n+i,0)),oG(e,sG(t,3),i)}Ay.exports=lG});var Dy=h((WZ,Iy)=>{"use strict";var cG=yy(),fG=Py(),hG=cG(fG);Iy.exports=hG});var du=h((ZZ,Ly)=>{"use strict";var pG=Po();function dG(e){var t=e==null?0:e.length;return t?pG(e,1):[]}Ly.exports=dG});var Gy=h((QZ,Fy)=>{"use strict";var mG=To(),gG=Na(),vG=jt();function _G(e,t){return e==null?e:mG(e,gG(t),vG)}Fy.exports=_G});var $y=h((KZ,Ry)=>{"use strict";function yG(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}Ry.exports=yG});var Vy=h((JZ,By)=>{"use strict";var xG=Ln(),bG=ko(),wG=ut();function EG(e,t){var r={};return t=wG(t,3),bG(e,function(n,i,o){xG(r,i,t(n,i,o))}),r}By.exports=EG});var $o=h((eQ,zy)=>{"use strict";var CG=yr();function SG(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],s=t(o);if(s!=null&&(a===void 0?s===s&&!CG(s):r(s,a)))var a=s,u=o}return u}zy.exports=SG});var Hy=h((tQ,jy)=>{"use strict";function MG(e,t){return e>t}jy.exports=MG});var Yy=h((rQ,Uy)=>{"use strict";var TG=$o(),kG=Hy(),qG=Ht();function OG(e){return e&&e.length?TG(e,qG,kG):void 0}Uy.exports=OG});var mu=h((nQ,Xy)=>{"use strict";var NG=Ln(),AG=dr();function PG(e,t,r){(r!==void 0&&!AG(e[t],r)||r===void 0&&!(t in e))&&NG(e,t,r)}Xy.exports=PG});var Qy=h((iQ,Zy)=>{"use strict";var IG=Vt(),DG=Hn(),LG=Ze(),FG="[object Object]",GG=Function.prototype,RG=Object.prototype,Wy=GG.toString,$G=RG.hasOwnProperty,BG=Wy.call(Object);function VG(e){if(!LG(e)||IG(e)!=FG)return!1;var t=DG(e);if(t===null)return!0;var r=$G.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Wy.call(r)==BG}Zy.exports=VG});var gu=h((oQ,Ky)=>{"use strict";function zG(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}Ky.exports=zG});var ex=h((sQ,Jy)=>{"use strict";var jG=zr(),HG=jt();function UG(e){return jG(e,HG(e))}Jy.exports=UG});var sx=h((aQ,ox)=>{"use strict";var tx=mu(),YG=pa(),XG=Ta(),WG=da(),ZG=qa(),rx=jr(),nx=ae(),QG=ou(),KG=gr(),JG=Rr(),eR=Oe(),tR=Qy(),rR=Yr(),ix=gu(),nR=ex();function iR(e,t,r,n,i,o,s){var a=ix(e,r),u=ix(t,r),l=s.get(u);if(l){tx(e,r,l);return}var c=o?o(a,u,r+"",e,t,s):void 0,f=c===void 0;if(f){var p=nx(u),d=!p&&KG(u),v=!p&&!d&&rR(u);c=u,p||d||v?nx(a)?c=a:QG(a)?c=WG(a):d?(f=!1,c=YG(u,!0)):v?(f=!1,c=XG(u,!0)):c=[]:tR(u)||rx(u)?(c=a,rx(a)?c=nR(a):(!eR(a)||JG(a))&&(c=ZG(u))):f=!1}f&&(s.set(u,c),i(c,u,n,o,s),s.delete(u)),tx(e,r,c)}ox.exports=iR});var lx=h((uQ,ux)=>{"use strict";var oR=Dn(),sR=mu(),aR=To(),uR=sx(),lR=Oe(),cR=jt(),fR=gu();function ax(e,t,r,n,i){e!==t&&aR(t,function(o,s){if(i||(i=new oR),lR(o))uR(e,t,s,r,ax,n,i);else{var a=n?n(fR(e,s),o,s+"",e,t,i):void 0;a===void 0&&(a=o),sR(e,s,a)}},cR)}ux.exports=ax});var fx=h((lQ,cx)=>{"use strict";var hR=Zn(),pR=Jn();function dR(e){return hR(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,s&&pR(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,o)}return t})}cx.exports=dR});var px=h((cQ,hx)=>{"use strict";var mR=lx(),gR=fx(),vR=gR(function(e,t,r){mR(e,t,r)});hx.exports=vR});var vu=h((fQ,dx)=>{"use strict";function _R(e,t){return e<t}dx.exports=_R});var gx=h((hQ,mx)=>{"use strict";var yR=$o(),xR=vu(),bR=Ht();function wR(e){return e&&e.length?yR(e,bR,xR):void 0}mx.exports=wR});var _x=h((pQ,vx)=>{"use strict";var ER=$o(),CR=ut(),SR=vu();function MR(e,t){return e&&e.length?ER(e,CR(t,2),SR):void 0}vx.exports=MR});var xx=h((dQ,yx)=>{"use strict";var TR=Be(),kR=function(){return TR.Date.now()};yx.exports=kR});var Ex=h((mQ,wx)=>{"use strict";var qR=Fn(),OR=Xn(),NR=Rn(),bx=Oe(),AR=Zr();function PR(e,t,r,n){if(!bx(e))return e;t=OR(t,e);for(var i=-1,o=t.length,s=o-1,a=e;a!=null&&++i<o;){var u=AR(t[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=s){var c=a[u];l=n?n(c,u,a):void 0,l===void 0&&(l=bx(c)?c:NR(t[i+1])?[]:{})}qR(a,u,l),a=a[u]}return e}wx.exports=PR});var Sx=h((gQ,Cx)=>{"use strict";var IR=Wn(),DR=Ex(),LR=Xn();function FR(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=IR(e,s);r(a,s)&&DR(o,LR(s,e),a)}return o}Cx.exports=FR});var Tx=h((vQ,Mx)=>{"use strict";var GR=Sx(),RR=Ha();
3function $R(e,t){return GR(e,t,function(r,n){return RR(e,n)})}Mx.exports=$R});var qx=h((_Q,kx)=>{"use strict";var BR=du(),VR=tu(),zR=ru();function jR(e){return zR(VR(e,void 0,BR),e+"")}kx.exports=jR});var Nx=h((yQ,Ox)=>{"use strict";var HR=Tx(),UR=qx(),YR=UR(function(e,t){return e==null?{}:HR(e,t)});Ox.exports=YR});var Px=h((xQ,Ax)=>{"use strict";var XR=Math.ceil,WR=Math.max;function ZR(e,t,r,n){for(var i=-1,o=WR(XR((t-e)/(r||1)),0),s=Array(o);o--;)s[n?o:++i]=e,e+=r;return s}Ax.exports=ZR});var Dx=h((bQ,Ix)=>{"use strict";var QR=Px(),KR=Jn(),_u=pu();function JR(e){return function(t,r,n){return n&&typeof n!="number"&&KR(t,r,n)&&(r=n=void 0),t=_u(t),r===void 0?(r=t,t=0):r=_u(r),n=n===void 0?t<r?1:-1:_u(n),QR(t,r,n,e)}}Ix.exports=JR});var Fx=h((wQ,Lx)=>{"use strict";var e$=Dx(),t$=e$();Lx.exports=t$});var Rx=h((EQ,Gx)=>{"use strict";function r$(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}Gx.exports=r$});var Vx=h((CQ,Bx)=>{"use strict";var $x=yr();function n$(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,o=$x(e),s=t!==void 0,a=t===null,u=t===t,l=$x(t);if(!a&&!l&&!o&&e>t||o&&s&&u&&!a&&!l||n&&s&&u||!r&&u||!i)return 1;if(!n&&!o&&!l&&e<t||l&&r&&i&&!n&&!o||a&&r&&i||!s&&i||!u)return-1}return 0}Bx.exports=n$});var jx=h((SQ,zx)=>{"use strict";var i$=Vx();function o$(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=i$(i[n],o[n]);if(u){if(n>=a)return u;var l=r[n];return u*(l=="desc"?-1:1)}}return e.index-t.index}zx.exports=o$});var Ux=h((MQ,Hx)=>{"use strict";var yu=Yn(),s$=Wn(),a$=ut(),u$=Za(),l$=Rx(),c$=$n(),f$=jx(),h$=Ht(),p$=ae();function d$(e,t,r){t.length?t=yu(t,function(o){return p$(o)?function(s){return s$(s,o.length===1?o[0]:o)}:o}):t=[h$];var n=-1;t=yu(t,c$(a$));var i=u$(e,function(o,s,a){var u=yu(t,function(l){return l(o)});return{criteria:u,index:++n,value:o}});return l$(i,function(o,s){return f$(o,s,r)})}Hx.exports=d$});var Wx=h((TQ,Xx)=>{"use strict";var m$=Po(),g$=Ux(),v$=Zn(),Yx=Jn(),_$=v$(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Yx(e,t[0],t[1])?t=[]:r>2&&Yx(t[0],t[1],t[2])&&(t=[t[0]]),g$(e,m$(t,1),[])});Xx.exports=_$});var Qx=h((kQ,Zx)=>{"use strict";var y$=za(),x$=0;function b$(e){var t=++x$;return y$(e)+t}Zx.exports=b$});var Jx=h((qQ,Kx)=>{"use strict";function w$(e,t,r){for(var n=-1,i=e.length,o=t.length,s={};++n<i;){var a=n<o?t[n]:void 0;r(s,e[n],a)}return s}Kx.exports=w$});var tb=h((OQ,eb)=>{"use strict";var E$=Fn(),C$=Jx();function S$(e,t){return C$(e||[],t||[],E$)}eb.exports=S$});var J=h((NQ,rb)=>{"use strict";var Bo;if(typeof Sr=="function")try{Bo={cloneDeep:py(),constant:Mo(),defaults:vy(),each:Pa(),filter:Ya(),find:Dy(),flatten:du(),forEach:Aa(),forIn:Gy(),has:Xa(),isUndefined:Wa(),last:$y(),map:Qa(),mapValues:Vy(),max:Yy(),merge:px(),min:gx(),minBy:_x(),now:xx(),pick:Nx(),range:Fx(),reduce:Ka(),sortBy:Wx(),uniqueId:Qx(),values:su(),zipObject:tb()}}catch{}Bo||(Bo=window._);rb.exports=Bo});var ob=h((PQ,ib)=>{"use strict";ib.exports=Vo;function Vo(){var e={};e._next=e._prev=e,this._sentinel=e}Vo.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return nb(t),t};Vo.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&nb(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};Vo.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,M$)),r=r._prev;return"["+e.join(", ")+"]"};function nb(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function M$(e,t){if(e!=="_next"&&e!=="_prev")return t}});var ab=h((IQ,sb)=>{"use strict";var yt=J(),T$=ze().Graph,k$=ob();sb.exports=O$;var q$=yt.constant(1);function O$(e,t){if(e.nodeCount()<=1)return[];var r=A$(e,t||q$),n=N$(r.graph,r.buckets,r.zeroIdx);return yt.flatten(yt.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function N$(e,t,r){for(var n=[],i=t[t.length-1],o=t[0],s;e.nodeCount();){for(;s=o.dequeue();)xu(e,t,r,s);for(;s=i.dequeue();)xu(e,t,r,s);if(e.nodeCount()){for(var a=t.length-2;a>0;--a)if(s=t[a].dequeue(),s){n=n.concat(xu(e,t,r,s,!0));break}}}return n}function xu(e,t,r,n,i){var o=i?[]:void 0;return yt.forEach(e.inEdges(n.v),function(s){var a=e.edge(s),u=e.node(s.v);i&&o.push({v:s.v,w:s.w}),u.out-=a,bu(t,r,u)}),yt.forEach(e.outEdges(n.v),function(s){var a=e.edge(s),u=s.w,l=e.node(u);l.in-=a,bu(t,r,l)}),e.removeNode(n.v),o}function A$(e,t){var r=new T$,n=0,i=0;yt.forEach(e.nodes(),function(a){r.setNode(a,{v:a,in:0,out:0})}
3),yt.forEach(e.edges(),function(a){var u=r.edge(a.v,a.w)||0,l=t(a),c=u+l;r.setEdge(a.v,a.w,c),i=Math.max(i,r.node(a.v).out+=l),n=Math.max(n,r.node(a.w).in+=l)});var o=yt.range(i+n+3).map(function(){return new k$}),s=n+1;return yt.forEach(r.nodes(),function(a){bu(o,s,r.node(a))}),{graph:r,buckets:o,zeroIdx:s}}function bu(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}});var lb=h((DQ,ub)=>{"use strict";var br=J(),P$=ab();ub.exports={run:I$,undo:L$};function I$(e){var t=e.graph().acyclicer==="greedy"?P$(e,r(e)):D$(e);br.forEach(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,br.uniqueId("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function D$(e){var t=[],r={},n={};function i(o){br.has(n,o)||(n[o]=!0,r[o]=!0,br.forEach(e.outEdges(o),function(s){br.has(r,s.w)?t.push(s):i(s.w)}),delete r[o])}return br.forEach(e.nodes(),i),t}function L$(e){br.forEach(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}});var ye=h((LQ,pb)=>{"use strict";var X=J(),cb=ze().Graph;pb.exports={addDummyNode:fb,simplify:F$,asNonCompoundGraph:G$,successorWeights:R$,predecessorWeights:$$,intersectRect:B$,buildLayerMatrix:V$,normalizeRanks:z$,removeEmptyRanks:j$,addBorderNode:H$,maxRank:hb,partition:U$,time:Y$,notime:X$};function fb(e,t,r,n){var i;do i=X.uniqueId(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function F$(e){var t=new cb().setGraph(e.graph());return X.forEach(e.nodes(),function(r){t.setNode(r,e.node(r))}),X.forEach(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function G$(e){var t=new cb({multigraph:e.isMultigraph()}).setGraph(e.graph());return X.forEach(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),X.forEach(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function R$(e){var t=X.map(e.nodes(),function(r){var n={};return X.forEach(e.outEdges(r),function(i){n[i.w]=(n[i.w]||0)+e.edge(i).weight}),n});return X.zipObject(e.nodes(),t)}function $$(e){var t=X.map(e.nodes(),function(r){var n={};return X.forEach(e.inEdges(r),function(i){n[i.v]=(n[i.v]||0)+e.edge(i).weight}),n});return X.zipObject(e.nodes(),t)}function B$(e,t){var r=e.x,n=e.y,i=t.x-r,o=t.y-n,s=e.width/2,a=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var u,l;return Math.abs(o)*s>Math.abs(i)*a?(o<0&&(a=-a),u=a*i/o,l=a):(i<0&&(s=-s),u=s,l=s*o/i),{x:r+u,y:n+l}}function V$(e){var t=X.map(X.range(hb(e)+1),function(){return[]});return X.forEach(e.nodes(),function(r){var n=e.node(r),i=n.rank;X.isUndefined(i)||(t[i][n.order]=r)}),t}function z$(e){var t=X.min(X.map(e.nodes(),function(r){return e.node(r).rank}));X.forEach(e.nodes(),function(r){var n=e.node(r);X.has(n,"rank")&&(n.rank-=t)})}function j$(e){var t=X.min(X.map(e.nodes(),function(o){return e.node(o).rank})),r=[];X.forEach(e.nodes(),function(o){var s=e.node(o).rank-t;r[s]||(r[s]=[]),r[s].push(o)});var n=0,i=e.graph().nodeRankFactor;X.forEach(r,function(o,s){X.isUndefined(o)&&s%i!==0?--n:n&&X.forEach(o,function(a){e.node(a).rank+=n})})}function H$(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),fb(e,"border",i,t)}function hb(e){return X.max(X.map(e.nodes(),function(t){var r=e.node(t).rank;if(!X.isUndefined(r))return r}))}function U$(e,t){var r={lhs:[],rhs:[]};return X.forEach(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function Y$(e,t){var r=X.now();try{return t()}finally{console.log(e+" time: "+(X.now()-r)+"ms")}}function X$(e,t){return t()}});var gb=h((FQ,mb)=>{"use strict";var db=J(),W$=ye();mb.exports={run:Z$,undo:K$};function Z$(e){e.graph().dummyChains=[],db.forEach(e.edges(),function(t){Q$(e,t)})}function Q$(e,t){var r=t.v,n=e.node(r).rank,i=t.w,o=e.node(i).rank,s=t.name,a=e.edge(t),u=a.labelRank;if(o!==n+1){e.removeEdge(t);var l,c,f;for(f=0,++n;n<o;++f,++n)a.points=[],c={width:0,height:0,edgeLabel:a,edgeObj:t,rank:n},l=W$.addDummyNode(e,"edge",c,"_d"),n===u&&(c.width=a.width,c.height=a.height,c.dummy="edge-label",c.labelpos=a.labelpos),e.setEdge(r,l,{weight:a.weight},s),f===0&&e.graph().dummyChains.push(l),r=l;e.setEdge(r,i,{weight:a.weight},s)}}function K$(e){db.forEach(e.graph().dummyChains,function(t){var r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t)})}});var ei=h((GQ,vb)=>{"use strict";var zo=J();vb.exports={longestPath:J$,slack:eB};function J$(e){var t={};function r(n){var i=e.node(n);if(zo.has(t,n))return i.rank;t[n]=!0;var o=zo.min(zo.map(e.outEdges(n),function(s){return r(s.w)-e.edge(s).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}
3zo.forEach(e.sources(),r)}function eB(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}});var wu=h((RQ,_b)=>{"use strict";var jo=J(),tB=ze().Graph,Ho=ei().slack;_b.exports=rB;function rB(e){var t=new tB({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,o;nB(t,e)<n;)i=iB(t,e),o=t.hasNode(i.v)?Ho(e,i):-Ho(e,i),oB(t,e,o);return t}function nB(e,t){function r(n){jo.forEach(t.nodeEdges(n),function(i){var o=i.v,s=n===o?i.w:o;!e.hasNode(s)&&!Ho(t,i)&&(e.setNode(s,{}),e.setEdge(n,s,{}),r(s))})}return jo.forEach(e.nodes(),r),e.nodeCount()}function iB(e,t){return jo.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return Ho(t,r)})}function oB(e,t,r){jo.forEach(e.nodes(),function(n){t.node(n).rank+=r})}});var Mb=h(($Q,Sb)=>{"use strict";var xt=J(),sB=wu(),aB=ei().slack,uB=ei().longestPath,lB=ze().alg.preorder,cB=ze().alg.postorder,fB=ye().simplify;Sb.exports=wr;wr.initLowLimValues=Cu;wr.initCutValues=Eu;wr.calcCutValue=xb;wr.leaveEdge=wb;wr.enterEdge=Eb;wr.exchangeEdges=Cb;function wr(e){e=fB(e),uB(e);var t=sB(e);Cu(t),Eu(t,e);for(var r,n;r=wb(t);)n=Eb(t,e,r),Cb(t,e,r,n)}function Eu(e,t){var r=cB(e,e.nodes());r=r.slice(0,r.length-1),xt.forEach(r,function(n){hB(e,t,n)})}function hB(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=xb(e,t,r)}function xb(e,t,r){var n=e.node(r),i=n.parent,o=!0,s=t.edge(r,i),a=0;return s||(o=!1,s=t.edge(i,r)),a=s.weight,xt.forEach(t.nodeEdges(r),function(u){var l=u.v===r,c=l?u.w:u.v;if(c!==i){var f=l===o,p=t.edge(u).weight;if(a+=f?p:-p,dB(e,r,c)){var d=e.edge(r,c).cutvalue;a+=f?-d:d}}}),a}function Cu(e,t){arguments.length<2&&(t=e.nodes()[0]),bb(e,{},1,t)}function bb(e,t,r,n,i){var o=r,s=e.node(n);return t[n]=!0,xt.forEach(e.neighbors(n),function(a){xt.has(t,a)||(r=bb(e,t,r,a,n))}),s.low=o,s.lim=r++,i?s.parent=i:delete s.parent,r}function wb(e){return xt.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Eb(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var o=e.node(n),s=e.node(i),a=o,u=!1;o.lim>s.lim&&(a=s,u=!0);var l=xt.filter(t.edges(),function(c){return u===yb(e,e.node(c.v),a)&&u!==yb(e,e.node(c.w),a)});return xt.minBy(l,function(c){return aB(t,c)})}function Cb(e,t,r,n){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),Cu(e),Eu(e,t),pB(e,t)}function pB(e,t){var r=xt.find(e.nodes(),function(i){return!t.node(i).parent}),n=lB(e,r);n=n.slice(1),xt.forEach(n,function(i){var o=e.node(i).parent,s=t.edge(i,o),a=!1;s||(s=t.edge(o,i),a=!0),t.node(i).rank=t.node(o).rank+(a?s.minlen:-s.minlen)})}function dB(e,t,r){return e.hasEdge(t,r)}function yb(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}});var Ob=h((BQ,qb)=>{"use strict";var mB=ei(),kb=mB.longestPath,gB=wu(),vB=Mb();qb.exports=_B;function _B(e){switch(e.graph().ranker){case"network-simplex":Tb(e);break;case"tight-tree":xB(e);break;case"longest-path":yB(e);break;default:Tb(e)}}var yB=kb;function xB(e){kb(e),gB(e)}function Tb(e){vB(e)}});var Ab=h((VQ,Nb)=>{"use strict";var Su=J();Nb.exports=bB;function bB(e){var t=EB(e);Su.forEach(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,o=wB(e,t,i.v,i.w),s=o.path,a=o.lca,u=0,l=s[u],c=!0;r!==i.w;){if(n=e.node(r),c){for(;(l=s[u])!==a&&e.node(l).maxRank<n.rank;)u++;l===a&&(c=!1)}if(!c){for(;u<s.length-1&&e.node(l=s[u+1]).minRank<=n.rank;)u++;l=s[u]}e.setParent(r,l),r=e.successors(r)[0]}})}function wB(e,t,r,n){var i=[],o=[],s=Math.min(t[r].low,t[n].low),a=Math.max(t[r].lim,t[n].lim),u,l;u=r;do u=e.parent(u),i.push(u);while(u&&(t[u].low>s||a>t[u].lim));for(l=u,u=n;(u=e.parent(u))!==l;)o.push(u);return{path:i.concat(o.reverse()),lca:l}}function EB(e){var t={},r=0;function n(i){var o=r;Su.forEach(e.children(i),n),t[i]={low:o,lim:r++}}return Su.forEach(e.children(),n),t}});var Db=h((zQ,Ib)=>{"use strict";var bt=J(),Mu=ye();Ib.exports={run:CB,cleanup:TB};function CB(e){var t=Mu.addDummyNode(e,"root",{},"_root"),r=SB(e),n=bt.max(bt.values(r))-1,i=2*n+1;e.graph().nestingRoot=t,bt.forEach(e.edges(),function(s){e.edge(s).minlen*=i});var o=MB(e)+1;bt.forEach(e.children(),function(s){Pb(e,t,i,o,n,r,s)}),e.graph().nodeRankFactor=i}function Pb(e,t,r,n,i,o,s){var a=e.children(s);if(!a.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:r});return}
3var u=Mu.addBorderNode(e,"_bt"),l=Mu.addBorderNode(e,"_bb"),c=e.node(s);e.setParent(u,s),c.borderTop=u,e.setParent(l,s),c.borderBottom=l,bt.forEach(a,function(f){Pb(e,t,r,n,i,o,f);var p=e.node(f),d=p.borderTop?p.borderTop:f,v=p.borderBottom?p.borderBottom:f,m=p.borderTop?n:2*n,g=d!==v?1:i-o[s]+1;e.setEdge(u,d,{weight:m,minlen:g,nestingEdge:!0}),e.setEdge(v,l,{weight:m,minlen:g,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,u,{weight:0,minlen:i+o[s]})}function SB(e){var t={};function r(n,i){var o=e.children(n);o&&o.length&&bt.forEach(o,function(s){r(s,i+1)}),t[n]=i}return bt.forEach(e.children(),function(n){r(n,1)}),t}function MB(e){return bt.reduce(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function TB(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,bt.forEach(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}});var Gb=h((jQ,Fb)=>{"use strict";var Tu=J(),kB=ye();Fb.exports=qB;function qB(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&Tu.forEach(n,t),Tu.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,s=i.maxRank+1;o<s;++o)Lb(e,"borderLeft","_bl",r,i,o),Lb(e,"borderRight","_br",r,i,o)}}Tu.forEach(e.children(),t)}function Lb(e,t,r,n,i,o){var s={width:0,height:0,rank:o,borderType:t},a=i[t][o-1],u=kB.addDummyNode(e,"border",s,r);i[t][o]=u,e.setParent(u,n),a&&e.setEdge(a,u,{weight:1})}});var Vb=h((HQ,Bb)=>{"use strict";var ct=J();Bb.exports={adjust:OB,undo:NB};function OB(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&$b(e)}function NB(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&AB(e),(t==="lr"||t==="rl")&&(PB(e),$b(e))}function $b(e){ct.forEach(e.nodes(),function(t){Rb(e.node(t))}),ct.forEach(e.edges(),function(t){Rb(e.edge(t))})}function Rb(e){var t=e.width;e.width=e.height,e.height=t}function AB(e){ct.forEach(e.nodes(),function(t){ku(e.node(t))}),ct.forEach(e.edges(),function(t){var r=e.edge(t);ct.forEach(r.points,ku),ct.has(r,"y")&&ku(r)})}function ku(e){e.y=-e.y}function PB(e){ct.forEach(e.nodes(),function(t){qu(e.node(t))}),ct.forEach(e.edges(),function(t){var r=e.edge(t);ct.forEach(r.points,qu),ct.has(r,"x")&&qu(r)})}function qu(e){var t=e.x;e.x=e.y,e.y=t}});var jb=h((UQ,zb)=>{"use strict";var wt=J();zb.exports=IB;function IB(e){var t={},r=wt.filter(e.nodes(),function(a){return!e.children(a).length}),n=wt.max(wt.map(r,function(a){return e.node(a).rank})),i=wt.map(wt.range(n+1),function(){return[]});function o(a){if(!wt.has(t,a)){t[a]=!0;var u=e.node(a);i[u.rank].push(a),wt.forEach(e.successors(a),o)}}var s=wt.sortBy(r,function(a){return e.node(a).rank});return wt.forEach(s,o),i}});var Ub=h((YQ,Hb)=>{"use strict";var Ut=J();Hb.exports=DB;function DB(e,t){for(var r=0,n=1;n<t.length;++n)r+=LB(e,t[n-1],t[n]);return r}function LB(e,t,r){for(var n=Ut.zipObject(r,Ut.map(r,function(l,c){return c})),i=Ut.flatten(Ut.map(t,function(l){return Ut.sortBy(Ut.map(e.outEdges(l),function(c){return{pos:n[c.w],weight:e.edge(c).weight}}),"pos")}),!0),o=1;o<r.length;)o<<=1;var s=2*o-1;o-=1;var a=Ut.map(new Array(s),function(){return 0}),u=0;return Ut.forEach(i.forEach(function(l){var c=l.pos+o;a[c]+=l.weight;for(var f=0;c>0;)c%2&&(f+=a[c+1]),c=c-1>>1,a[c]+=l.weight;u+=l.weight*f})),u}});var Wb=h((XQ,Xb)=>{"use strict";var Yb=J();Xb.exports=FB;function FB(e,t){return Yb.map(t,function(r){var n=e.inEdges(r);if(n.length){var i=Yb.reduce(n,function(o,s){var a=e.edge(s),u=e.node(s.v);return{sum:o.sum+a.weight*u.order,weight:o.weight+a.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}});var Qb=h((WQ,Zb)=>{"use strict";var Ae=J();Zb.exports=GB;function GB(e,t){var r={};Ae.forEach(e,function(i,o){var s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};Ae.isUndefined(i.barycenter)||(s.barycenter=i.barycenter,s.weight=i.weight)}),Ae.forEach(t.edges(),function(i){var o=r[i.v],s=r[i.w];!Ae.isUndefined(o)&&!Ae.isUndefined(s)&&(s.indegree++,o.out.push(r[i.w]))});var n=Ae.filter(r,function(i){return!i.indegree});return RB(n)}function RB(e){var t=[];function r(o){return function(s){s.merged||(Ae.isUndefined(s.barycenter)||Ae.isUndefined(o.barycenter)||s.barycenter>=o.barycenter)&&$B(o,s)}}function n(o){return function(s){s.in.push(o),--s.indegree===0&&e.push(s)}}for(;e.length;){var i=e.pop();t.push(i),Ae.forEach(i.in.reverse(),r(i)),Ae.forEach(i.out,n(i))}return Ae.map(Ae.filter(t,function(o){return!o.merged}),function(o){return Ae.pick(o,["vs","i","barycenter","weight"])})}function $B(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}});var e1=h((ZQ,Jb)=>{"use strict";var ti=J(),BB=ye();Jb.exports=VB;function VB(e,t){var r=BB.partition(e,function(c){return ti.has(c,"barycenter")}),n=r.lhs,i=ti.sortBy(r.rhs,function(c){return-c.i}),o=[],s=0,a=0,u=0;
3n.sort(zB(!!t)),u=Kb(o,i,u),ti.forEach(n,function(c){u+=c.vs.length,o.push(c.vs),s+=c.barycenter*c.weight,a+=c.weight,u=Kb(o,i,u)});var l={vs:ti.flatten(o,!0)};return a&&(l.barycenter=s/a,l.weight=a),l}function Kb(e,t,r){for(var n;t.length&&(n=ti.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function zB(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}});var n1=h((QQ,r1)=>{"use strict";var Yt=J(),jB=Wb(),HB=Qb(),UB=e1();r1.exports=t1;function t1(e,t,r,n){var i=e.children(t),o=e.node(t),s=o?o.borderLeft:void 0,a=o?o.borderRight:void 0,u={};s&&(i=Yt.filter(i,function(v){return v!==s&&v!==a}));var l=jB(e,i);Yt.forEach(l,function(v){if(e.children(v.v).length){var m=t1(e,v.v,r,n);u[v.v]=m,Yt.has(m,"barycenter")&&XB(v,m)}});var c=HB(l,r);YB(c,u);var f=UB(c,n);if(s&&(f.vs=Yt.flatten([s,f.vs,a],!0),e.predecessors(s).length)){var p=e.node(e.predecessors(s)[0]),d=e.node(e.predecessors(a)[0]);Yt.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+d.order)/(f.weight+2),f.weight+=2}return f}function YB(e,t){Yt.forEach(e,function(r){r.vs=Yt.flatten(r.vs.map(function(n){return t[n]?t[n].vs:n}),!0)})}function XB(e,t){Yt.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}});var o1=h((KQ,i1)=>{"use strict";var ri=J(),WB=ze().Graph;i1.exports=ZB;function ZB(e,t,r){var n=QB(e),i=new WB({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(o){return e.node(o)});return ri.forEach(e.nodes(),function(o){var s=e.node(o),a=e.parent(o);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(i.setNode(o),i.setParent(o,a||n),ri.forEach(e[r](o),function(u){var l=u.v===o?u.w:u.v,c=i.edge(l,o),f=ri.isUndefined(c)?0:c.weight;i.setEdge(l,o,{weight:e.edge(u).weight+f})}),ri.has(s,"minRank")&&i.setNode(o,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),i}function QB(e){for(var t;e.hasNode(t=ri.uniqueId("_root")););return t}});var a1=h((JQ,s1)=>{"use strict";var KB=J();s1.exports=JB;function JB(e,t,r){var n={},i;KB.forEach(r,function(o){for(var s=e.parent(o),a,u;s;){if(a=e.parent(s),a?(u=n[a],n[a]=s):(u=i,i=s),u&&u!==s){t.setEdge(u,s);return}s=a}})}});var h1=h((eK,f1)=>{"use strict";var Xt=J(),e5=jb(),t5=Ub(),r5=n1(),n5=o1(),i5=a1(),o5=ze().Graph,u1=ye();f1.exports=s5;function s5(e){var t=u1.maxRank(e),r=l1(e,Xt.range(1,t+1),"inEdges"),n=l1(e,Xt.range(t-1,-1,-1),"outEdges"),i=e5(e);c1(e,i);for(var o=Number.POSITIVE_INFINITY,s,a=0,u=0;u<4;++a,++u){a5(a%2?r:n,a%4>=2),i=u1.buildLayerMatrix(e);var l=t5(e,i);l<o&&(u=0,s=Xt.cloneDeep(i),o=l)}c1(e,s)}function l1(e,t,r){return Xt.map(t,function(n){return n5(e,n,r)})}function a5(e,t){var r=new o5;Xt.forEach(e,function(n){var i=n.graph().root,o=r5(n,i,r,t);Xt.forEach(o.vs,function(s,a){n.node(s).order=a}),i5(n,r,o.vs)})}function c1(e,t){Xt.forEach(t,function(r){Xt.forEach(r,function(n,i){e.node(n).order=i})})}});var w1=h((tK,b1)=>{"use strict";var B=J(),u5=ze().Graph,l5=ye();b1.exports={positionX:h5,findType1Conflicts:p1,findType2Conflicts:d1,addConflict:Ou,hasConflict:m1,verticalAlignment:g1,horizontalCompaction:v1,alignCoordinates:y1,findSmallestWidthAlignment:_1,balance:x1};function p1(e,t){var r={};function n(i,o){var s=0,a=0,u=i.length,l=B.last(o);return B.forEach(o,function(c,f){var p=c5(e,c),d=p?e.node(p).order:u;(p||c===l)&&(B.forEach(o.slice(a,f+1),function(v){B.forEach(e.predecessors(v),function(m){var g=e.node(m),_=g.order;(_<s||d<_)&&!(g.dummy&&e.node(v).dummy)&&Ou(r,m,v)})}),a=f+1,s=d)}),o}return B.reduce(t,n),r}function d1(e,t){var r={};function n(o,s,a,u,l){var c;B.forEach(B.range(s,a),function(f){c=o[f],e.node(c).dummy&&B.forEach(e.predecessors(c),function(p){var d=e.node(p);d.dummy&&(d.order<u||d.order>l)&&Ou(r,p,c)})})}function i(o,s){var a=-1,u,l=0;return B.forEach(s,function(c,f){if(e.node(c).dummy==="border"){var p=e.predecessors(c);p.length&&(u=e.node(p[0]).order,n(s,l,f,a,u),l=f,a=u)}n(s,l,s.length,u,o.length)}),s}return B.reduce(t,i),r}function c5(e,t){if(e.node(t).dummy)return B.find(e.predecessors(t),function(r){return e.no
3de(r).dummy})}function Ou(e,t,r){if(t>r){var n=t;t=r,r=n}var i=e[t];i||(e[t]=i={}),i[r]=!0}function m1(e,t,r){if(t>r){var n=t;t=r,r=n}return B.has(e[t],r)}function g1(e,t,r,n){var i={},o={},s={};return B.forEach(t,function(a){B.forEach(a,function(u,l){i[u]=u,o[u]=u,s[u]=l})}),B.forEach(t,function(a){var u=-1;B.forEach(a,function(l){var c=n(l);if(c.length){c=B.sortBy(c,function(m){return s[m]});for(var f=(c.length-1)/2,p=Math.floor(f),d=Math.ceil(f);p<=d;++p){var v=c[p];o[l]===l&&u<s[v]&&!m1(r,l,v)&&(o[v]=l,o[l]=i[l]=i[v],u=s[v])}}})}),{root:i,align:o}}function v1(e,t,r,n,i){var o={},s=f5(e,t,r,i),a=i?"borderLeft":"borderRight";function u(f,p){for(var d=s.nodes(),v=d.pop(),m={};v;)m[v]?f(v):(m[v]=!0,d.push(v),d=d.concat(p(v))),v=d.pop()}function l(f){o[f]=s.inEdges(f).reduce(function(p,d){return Math.max(p,o[d.v]+s.edge(d))},0)}function c(f){var p=s.outEdges(f).reduce(function(v,m){return Math.min(v,o[m.w]-s.edge(m))},Number.POSITIVE_INFINITY),d=e.node(f);p!==Number.POSITIVE_INFINITY&&d.borderType!==a&&(o[f]=Math.max(o[f],p))}return u(l,s.predecessors.bind(s)),u(c,s.successors.bind(s)),B.forEach(n,function(f){o[f]=o[r[f]]}),o}function f5(e,t,r,n){var i=new u5,o=e.graph(),s=p5(o.nodesep,o.edgesep,n);return B.forEach(t,function(a){var u;B.forEach(a,function(l){var c=r[l];if(i.setNode(c),u){var f=r[u],p=i.edge(f,c);i.setEdge(f,c,Math.max(s(e,l,u),p||0))}u=l})}),i}function _1(e,t){return B.minBy(B.values(t),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return B.forIn(r,function(o,s){var a=d5(e,s)/2;n=Math.max(o+a,n),i=Math.min(o-a,i)}),n-i})}function y1(e,t){var r=B.values(t),n=B.min(r),i=B.max(r);B.forEach(["u","d"],function(o){B.forEach(["l","r"],function(s){var a=o+s,u=e[a],l;if(u!==t){var c=B.values(u);l=s==="l"?n-B.min(c):i-B.max(c),l&&(e[a]=B.mapValues(u,function(f){return f+l}))}})})}function x1(e,t){return B.mapValues(e.ul,function(r,n){if(t)return e[t.toLowerCase()][n];var i=B.sortBy(B.map(e,n));return(i[1]+i[2])/2})}function h5(e){var t=l5.buildLayerMatrix(e),r=B.merge(p1(e,t),d1(e,t)),n={},i;B.forEach(["u","d"],function(s){i=s==="u"?t:B.values(t).reverse(),B.forEach(["l","r"],function(a){a==="r"&&(i=B.map(i,function(f){return B.values(f).reverse()}));var u=(s==="u"?e.predecessors:e.successors).bind(e),l=g1(e,i,r,u),c=v1(e,i,l.root,l.align,a==="r");a==="r"&&(c=B.mapValues(c,function(f){return-f})),n[s+a]=c})});var o=_1(e,n);return y1(n,o),x1(n,e.graph().align)}function p5(e,t,r){return function(n,i,o){var s=n.node(i),a=n.node(o),u=0,l;if(u+=s.width/2,B.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":l=-s.width/2;break;case"r":l=s.width/2;break}if(l&&(u+=r?l:-l),l=0,u+=(s.dummy?t:e)/2,u+=(a.dummy?t:e)/2,u+=a.width/2,B.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":l=a.width/2;break;case"r":l=-a.width/2;break}return l&&(u+=r?l:-l),l=0,u}}function d5(e,t){return e.node(t).width}});var S1=h((rK,C1)=>{"use strict";var ni=J(),E1=ye(),m5=w1().positionX;C1.exports=g5;function g5(e){e=E1.asNonCompoundGraph(e),v5(e),ni.forEach(m5(e),function(t,r){e.node(r).x=t})}function v5(e){var t=E1.buildLayerMatrix(e),r=e.graph().ranksep,n=0;ni.forEach(t,function(i){var o=ni.max(ni.map(i,function(s){return e.node(s).height}));ni.forEach(i,function(s){e.node(s).y=n+o/2}),n+=o+r})}});var N1=h((nK,O1)=>{"use strict";var z=J(),M1=lb(),T1=gb(),_5=Ob(),y5=ye().normalizeRanks,x5=Ab(),b5=ye().removeEmptyRanks,k1=Db(),w5=Gb(),q1=Vb(),E5=h1(),C5=S1(),Wt=ye(),S5=ze().Graph;O1.exports=M5;function M5(e,t){var r=t&&t.debugTiming?Wt.time:Wt.notime;r("layout",function(){var n=r("  buildLayoutGraph",function(){return F5(e)});r("  runLayout",function(){T5(n,r)}),r("  updateInputGraph",function(){k5(e,n)})})}function T5(e,t){t("    makeSpaceForEdgeLabels",function(){G5(e)}),t("    removeSelfEdges",function(){Y5(e)}),t("    acyclic",function(){M1.run(e)}),t("    nestingGraph.run",function(){k1.run(e)}),t("    rank",function(){_5(Wt.asNonCompoundGraph(e))}),t("    injectEdgeLabelProxies",function(){R5(e)}),t("    removeEmptyRanks",function(){b5(e)}),t("    nestingGraph.cleanup",function(){k1.cleanup(e)}),t("    normalizeRanks",function(){y5(e)}),t("    assignRankMinMax",function(){$5(e)}),t("    removeEdgeLabelProxies",function(){B5(e)}),t("    normalize.run",function(){T1.run(e)}),t("    parentDummyChains",function(){x5(e)}),t("    addBorderSegments",function(){w5(e)}),t("    order",function(){E5(e)}),t("    insertSelfEdges",function(){X5(e)}),t("    adjustCoordinateSystem",function(){q1.adjust(e)}),t("    position",function(){C5(e)}),t("    positionSelfEdges",function(){W5(e)}),t("    removeBorderNodes",function(){U5(e)}),t("    normalize.undo",function(){T1.undo(e)}),t("    fixupEdgeLabelCoords",function(){j5(e)}),t("    undoCoordinateSystem",function(){q1.undo(e)}),t("    translateGraph",function(){V5(e)}),t("    assignNodeIntersects",function(){z5(e)}),t("    reversePoints",function(){H5(e)}
3),t("    acyclic.undo",function(){M1.undo(e)})}function k5(e,t){z.forEach(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),z.forEach(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,z.has(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var q5=["nodesep","edgesep","ranksep","marginx","marginy"],O5={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},N5=["acyclicer","ranker","rankdir","align"],A5=["width","height"],P5={width:0,height:0},I5=["minlen","weight","width","height","labeloffset"],D5={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L5=["labelpos"];function F5(e){var t=new S5({multigraph:!0,compound:!0}),r=Au(e.graph());return t.setGraph(z.merge({},O5,Nu(r,q5),z.pick(r,N5))),z.forEach(e.nodes(),function(n){var i=Au(e.node(n));t.setNode(n,z.defaults(Nu(i,A5),P5)),t.setParent(n,e.parent(n))}),z.forEach(e.edges(),function(n){var i=Au(e.edge(n));t.setEdge(n,z.merge({},D5,Nu(i,I5),z.pick(i,L5)))}),t}function G5(e){var t=e.graph();t.ranksep/=2,z.forEach(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function R5(e){z.forEach(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),o={rank:(i.rank-n.rank)/2+n.rank,e:t};Wt.addDummyNode(e,"edge-proxy",o,"_ep")}})}function $5(e){var t=0;z.forEach(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=z.max(t,n.maxRank))}),e.graph().maxRank=t}function B5(e){z.forEach(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function V5(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,o=e.graph(),s=o.marginx||0,a=o.marginy||0;function u(l){var c=l.x,f=l.y,p=l.width,d=l.height;t=Math.min(t,c-p/2),r=Math.max(r,c+p/2),n=Math.min(n,f-d/2),i=Math.max(i,f+d/2)}z.forEach(e.nodes(),function(l){u(e.node(l))}),z.forEach(e.edges(),function(l){var c=e.edge(l);z.has(c,"x")&&u(c)}),t-=s,n-=a,z.forEach(e.nodes(),function(l){var c=e.node(l);c.x-=t,c.y-=n}),z.forEach(e.edges(),function(l){var c=e.edge(l);z.forEach(c.points,function(f){f.x-=t,f.y-=n}),z.has(c,"x")&&(c.x-=t),z.has(c,"y")&&(c.y-=n)}),o.width=r-t+s,o.height=i-n+a}function z5(e){z.forEach(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),o,s;r.points?(o=r.points[0],s=r.points[r.points.length-1]):(r.points=[],o=i,s=n),r.points.unshift(Wt.intersectRect(n,o)),r.points.push(Wt.intersectRect(i,s))})}function j5(e){z.forEach(e.edges(),function(t){var r=e.edge(t);if(z.has(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function H5(e){z.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function U5(e){z.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(z.last(r.borderLeft)),s=e.node(z.last(r.borderRight));r.width=Math.abs(s.x-o.x),r.height=Math.abs(i.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2}}),z.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function Y5(e){z.forEach(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function X5(e){var t=Wt.buildLayerMatrix(e);z.forEach(t,function(r){var n=0;z.forEach(r,function(i,o){var s=e.node(i);s.order=o+n,z.forEach(s.selfEdges,function(a){Wt.addDummyNode(e,"selfedge",{width:a.label.width,height:a.label.height,rank:s.rank,order:o+ ++n,e:a.e,label:a.label},"_se")}),delete s.selfEdges})})}function W5(e){z.forEach(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,o=n.y,s=r.x-i,a=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{x:i+s,y:o},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],r.label.x=r.x,r.label.y=r.y}})}function Nu(e,t){return z.mapValues(z.pick(e,t),Number)}function Au(e){var t={};return z.forEach(e,function(r,n){t[n.toLowerCase()]=r}),t}});var P1=h((iK,A1)=>{"use strict";var Uo=J(),Z5=ye(),Q5=ze().Graph;A1.exports={debugOrdering:K5};function K5(e){var t=Z5.buildLayerMatrix(e),r=new Q5({compound:!0,multigraph:!0}).setGraph({});
3return Uo.forEach(e.nodes(),function(n){r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),Uo.forEach(e.edges(),function(n){r.setEdge(n.v,n.w,{},n.name)}),Uo.forEach(t,function(n,i){var o="layer"+i;r.setNode(o,{rank:"same"}),Uo.reduce(n,function(s,a){return r.setEdge(s,a,{style:"invis"}),a})}),r}});var D1=h((oK,I1)=>{"use strict";I1.exports="0.8.5"});var F1=h((sK,L1)=>{"use strict";L1.exports={graphlib:ze(),layout:N1(),debug:P1(),util:{time:ye().time,notime:ye().notime},version:D1()}});var Lu=h(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});var Du=(function(){function e(t,r,n){this.source=t,this.target=r,this.type=n}return e})();Zt.PowerEdge=Du;var cw=(function(){function e(t,r,n,i){var o=this;if(this.linkAccessor=n,this.modules=new Array(t),this.roots=[],i)this.initModulesFromGroup(i);else{this.roots.push(new Qr);for(var s=0;s<t;++s)this.roots[0].add(this.modules[s]=new ii(s))}this.R=r.length,r.forEach(function(a){var u=o.modules[n.getSourceIndex(a)],l=o.modules[n.getTargetIndex(a)],c=n.getType(a);u.outgoing.add(c,l),l.incoming.add(c,u)})}return e.prototype.initModulesFromGroup=function(t){var r=new Qr;this.roots.push(r);for(var n=0;n<t.leaves.length;++n){var i=t.leaves[n],o=new ii(i.id);this.modules[i.id]=o,r.add(o)}if(t.groups)for(var s=0;s<t.groups.length;++s){var a=t.groups[s],u={};for(var l in a)l!=="leaves"&&l!=="groups"&&a.hasOwnProperty(l)&&(u[l]=a[l]);r.add(new ii(-1-s,new oi,new oi,this.initModulesFromGroup(a),u))}return r},e.prototype.merge=function(t,r,n){n===void 0&&(n=0);var i=t.incoming.intersection(r.incoming),o=t.outgoing.intersection(r.outgoing),s=new Qr;s.add(t),s.add(r);var a=new ii(this.modules.length,o,i,s);this.modules.push(a);var u=function(l,c,f){l.forAll(function(p,d){p.forAll(function(v){var m=v[c];m.add(d,a),m.remove(d,t),m.remove(d,r),t[f].remove(d,v),r[f].remove(d,v)})})};return u(o,"incoming","outgoing"),u(i,"outgoing","incoming"),this.R-=i.count()+o.count(),this.roots[n].remove(t),this.roots[n].remove(r),this.roots[n].add(a),a},e.prototype.rootMerges=function(t){t===void 0&&(t=0);for(var r=this.roots[t].modules(),n=r.length,i=new Array(n*(n-1)),o=0,s=0,a=n-1;s<a;++s)for(var u=s+1;u<n;++u){var l=r[s],c=r[u];i[o]={id:o,nEdges:this.nEdges(l,c),a:l,b:c},o++}return i},e.prototype.greedyMerge=function(){for(var t=0;t<this.roots.length;++t)if(!(this.roots[t].modules().length<2)){var r=this.rootMerges(t).sort(function(i,o){return i.nEdges==o.nEdges?i.id-o.id:i.nEdges-o.nEdges}),n=r[0];if(!(n.nEdges>=this.R))return this.merge(n.a,n.b,t),!0}},e.prototype.nEdges=function(t,r){var n=t.incoming.intersection(r.incoming),i=t.outgoing.intersection(r.outgoing);return this.R-n.count()-i.count()},e.prototype.getGroupHierarchy=function(t){var r=this,n=[],i={};fw(this.roots[0],i,n);var o=this.allEdges();return o.forEach(function(s){var a=r.modules[s.source],u=r.modules[s.target];t.push(new Du(typeof a.gid>"u"?s.source:n[a.gid],typeof u.gid>"u"?s.target:n[u.gid],s.type))}),n},e.prototype.allEdges=function(){var t=[];return e.getEdges(this.roots[0],t),t},e.getEdges=function(t,r){t.forAll(function(n){n.getEdges(r),e.getEdges(n.children,r)})},e})();Zt.Configuration=cw;function fw(e,t,r){e.forAll(function(n){if(n.isLeaf())t.leaves||(t.leaves=[]),t.leaves.push(n.id);else{var i=t;if(n.gid=r.length,!n.isIsland()||n.isPredefined()){if(i={id:n.gid},n.isPredefined())for(var o in n.definition)i[o]=n.definition[o];t.groups||(t.groups=[]),t.groups.push(n.gid),r.push(i)}fw(n.children,i,r)}})}var ii=(function(){function e(t,r,n,i,o){r===void 0&&(r=new oi),n===void 0&&(n=new oi),i===void 0&&(i=new Qr),this.id=t,this.outgoing=r,this.incoming=n,this.children=i,this.definition=o}return e.prototype.getEdges=function(t){var r=this;this.outgoing.forAll(function(n,i){n.forAll(function(o){t.push(new Du(r.id,o.id,i))})})},e.prototype.isLeaf=function(){return this.children.count()===0},e.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},e.prototype.isPredefined=function(){return typeof this.definition<"u"},e})();Zt.Module=ii;function i4(e,t){var r={};for(var n in e)n in t&&(r[n]=e[n]);return r}var Qr=(function(){function e(){this.table={}}return e.prototype.count=function(){return Object.keys(this.table).length},e.prototype.intersection=function(t){var r=new e;return r.table=i4(this.table,t.table),r},e.prototype.intersectionCount=function(t){return this.intersection(t).count()},e.prototype.contains=function(t){return t in this.table},e.prototype.add=function(t){this.table[t.id]=t},e.prototype.remove=function(t){delete this.table[t.id]},e.prototype.forAll=function(t){for(var r in this.table)t(this.table[r])},e.prototype.modules=function(){var t=[];return this.forAll(function(r){r.isPredefined()||t.push(r)}),t},e})();Zt.ModuleSet=Qr;var oi=(function(){function e(){this.sets={},this.n=0}return e.prototype.count=function(){return this.n},e.prototype.contains=function(t){var r=!1;return this.forAllModules(function(n){!r&&n.id==t&&(r=!0)}),r},e.prototype.add=function(t,r){var n=t in this.sets?this.sets[t]:this.sets[t]=new Qr;n.add(r),++this.n},e.prototype.remove=function(t,r){var n=this.sets[t];n.remove(r),n.count()===0&&delete this.sets[t],--this.n},e.prototype.forAll=function(t){for(var r in this.sets)t(this.sets[r],Number(r))},e.prototype.forAllModules=function(t){this.forAll(function(r,n){return r.forAll(t)})},e.prototype.intersection=function(t){var r=new e;
3return this.forAll(function(n,i){if(i in t.sets){var o=n.intersection(t.sets[i]),s=o.count();s>0&&(r.sets[i]=o,r.n+=s)}}),r},e})();Zt.LinkSets=oi;function o4(e,t,r,n){for(var i=e.length,o=new cw(i,t,r,n);o.greedyMerge(););var s=[],a=o.getGroupHierarchy(s);return s.forEach(function(u){var l=function(c){var f=u[c];typeof f=="number"&&(u[c]=e[f])};l("source"),l("target")}),{groups:a,powerEdges:s}}Zt.getGroups=o4});var Qo=h(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});function hw(e,t){var r={};for(var n in e)r[n]={};for(var n in t)r[n]={};return Object.keys(r).length}function pw(e,t){var r=0;for(var n in e)typeof t[n]<"u"&&++r;return r}function s4(e,t){var r={},n=function(i,o){typeof r[i]>"u"&&(r[i]={}),r[i][o]={}};return e.forEach(function(i){var o=t.getSourceIndex(i),s=t.getTargetIndex(i);n(o,s),n(s,o)}),r}function dw(e,t,r,n){var i=s4(e,n);e.forEach(function(o){var s=i[n.getSourceIndex(o)],a=i[n.getTargetIndex(o)];n.setLength(o,1+t*r(s,a))})}function a4(e,t,r){r===void 0&&(r=1),dw(e,r,function(n,i){return Math.sqrt(hw(n,i)-pw(n,i))},t)}Kr.symmetricDiffLinkLengths=a4;function u4(e,t,r){r===void 0&&(r=1),dw(e,r,function(n,i){return Math.min(Object.keys(n).length,Object.keys(i).length)<1.1?0:pw(n,i)/hw(n,i)},t)}Kr.jaccardLinkLengths=u4;function l4(e,t,r,n){var i=mw(e,t,n),o={};i.forEach(function(a,u){return a.forEach(function(l){return o[l]=u})});var s=[];return t.forEach(function(a){var u=n.getSourceIndex(a),l=n.getTargetIndex(a),c=o[u],f=o[l];c!==f&&s.push({axis:r,left:u,right:l,gap:n.getMinSeparation(a)})}),s}Kr.generateDirectedEdgeConstraints=l4;function mw(e,t,r){var n=[],i=0,o=[],s=[];function a(_){_.index=_.lowlink=i++,o.push(_),_.onStack=!0;for(var x=0,C=_.out;x<C.length;x++){var b=C[x];typeof b.index>"u"?(a(b),_.lowlink=Math.min(_.lowlink,b.lowlink)):b.onStack&&(_.lowlink=Math.min(_.lowlink,b.index))}if(_.lowlink===_.index){for(var k=[];o.length&&(b=o.pop(),b.onStack=!1,k.push(b),b!==_););s.push(k.map(function(O){return O.id}))}}for(var u=0;u<e;u++)n.push({id:u,out:[]});for(var l=0,c=t;l<c.length;l++){var f=c[l],p=n[r.getSourceIndex(f)],d=n[r.getTargetIndex(f)];p.out.push(d)}for(var v=0,m=n;v<m.length;v++){var g=m[v];typeof g.index>"u"&&a(g)}return s}Kr.stronglyConnectedComponents=mw});var Ko=h(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});var gw=(function(){function e(){this.locks={}}return e.prototype.add=function(t,r){this.locks[t]=r},e.prototype.clear=function(){this.locks={}},e.prototype.isEmpty=function(){for(var t in this.locks)return!1;return!0},e.prototype.apply=function(t){for(var r in this.locks)t(Number(r),this.locks[r])},e})();si.Locks=gw;var c4=(function(){function e(t,r,n){n===void 0&&(n=null),this.D=r,this.G=n,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new vw,this.project=null,this.x=t,this.k=t.length;var i=this.n=t[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new gw,this.minD=Number.MAX_VALUE;for(var o=i,s;o--;)for(s=i;--s>o;){var a=r[o][s];a>0&&a<this.minD&&(this.minD=a)}for(this.minD===Number.MAX_VALUE&&(this.minD=1),o=this.k;o--;){for(this.g[o]=new Array(i),this.H[o]=new Array(i),s=i;s--;)this.H[o][s]=new Array(i);this.Hd[o]=new Array(i),this.a[o]=new Array(i),this.b[o]=new Array(i),this.c[o]=new Array(i),this.d[o]=new Array(i),this.e[o]=new Array(i),this.ia[o]=new Array(i),this.ib[o]=new Array(i),this.xtmp[o]=new Array(i)}}return e.createSquareMatrix=function(t,r){for(var n=new Array(t),i=0;i<t;++i){n[i]=new Array(t);for(var o=0;o<t;++o)n[i][o]=r(i,o)}return n},e.prototype.offsetDir=function(){for(var t=this,r=new Array(this.k),n=0,i=0;i<this.k;++i){var o=r[i]=this.random.getNextBetween(.01,1)-.5;n+=o*o}return n=Math.sqrt(n),r.map(function(s){return s*=t.minD/n})},e.prototype.computeDerivatives=function(t){var r=this,n=this.n;if(!(n<1)){for(var i,o=new Array(this.k),s=new Array(this.k),a=new Array(this.k),u=0,l=0;l<n;++l){for(i=0;i<this.k;++i)a[i]=this.g[i][l]=0;for(var c=0;c<n;++c)if(l!==c){for(var f=n;f--;){var p=0;for(i=0;i<this.k;++i){var d=o[i]=t[i][l]-t[i][c];p+=s[i]=d*d}if(p>1e-9)break;var v=this.offsetDir();for(i=0;i<this.k;++i)t[i][c]+=v[i]}var m=Math.sqrt(p),g=this.D[l][c],_=this.G!=null?this.G[l][c]:1;if(_>1&&m>g||!isFinite(g)){for(i=0;i<this.k;++i)this.H[i][l][c]=0;continue}_>1&&(_=1);var x=g*g,C=2*_*(m-g)/(x*m),b=m*m*m,k=2*-_/(x*b);for(isFinite(C)||console.log(C),i=0;i<this.k;++i)this.g[i][l]+=o[i]*C,a[i]-=this.H[i][l][c]=k*(b+g*(s[i]-p)+m*p)}for(i=0;i<this.k;++i)u=Math.max(u,this.H[i][l][l]=a[i])}for(var O=this.snapGridSize/2,L=this.snapGridSize,q=this.snapStrength,j=q/(O*O),M=this.numGridSnapNodes,l=0;l<M;++l)for(i=0;i<this.k;
3++i){var D=this.x[i][l],Y=D/L,W=Y%1,Ue=Y-W,fe=Math.abs(W),d=fe<=.5?D-Ue*L:D>0?D-(Ue+1)*L:D-(Ue-1)*L;-O<d&&d<=O&&(this.scaleSnapByMaxH?(this.g[i][l]+=u*j*d,this.H[i][l][l]+=u*j):(this.g[i][l]+=j*d,this.H[i][l][l]+=j))}this.locks.isEmpty()||this.locks.apply(function(me,Je){for(i=0;i<r.k;++i)r.H[i][me][me]+=u,r.g[i][me]-=u*(Je[i]-t[i][me])})}},e.dotProd=function(t,r){for(var n=0,i=t.length;i--;)n+=t[i]*r[i];return n},e.rightMultiply=function(t,r,n){for(var i=t.length;i--;)n[i]=e.dotProd(t[i],r)},e.prototype.computeStepSize=function(t){for(var r=0,n=0,i=0;i<this.k;++i)r+=e.dotProd(this.g[i],t[i]),e.rightMultiply(this.H[i],t[i],this.Hd[i]),n+=e.dotProd(t[i],this.Hd[i]);return n===0||!isFinite(n)?0:1*r/n},e.prototype.reduceStress=function(){this.computeDerivatives(this.x);for(var t=this.computeStepSize(this.g),r=0;r<this.k;++r)this.takeDescentStep(this.x[r],this.g[r],t);return this.computeStress()},e.copy=function(t,r){for(var n=t.length,i=r[0].length,o=0;o<n;++o)for(var s=0;s<i;++s)r[o][s]=t[o][s]},e.prototype.stepAndProject=function(t,r,n,i){e.copy(t,r),this.takeDescentStep(r[0],n[0],i),this.project&&this.project[0](t[0],t[1],r[0]),this.takeDescentStep(r[1],n[1],i),this.project&&this.project[1](r[0],t[1],r[1]);for(var o=2;o<this.k;o++)this.takeDescentStep(r[o],n[o],i)},e.mApply=function(t,r,n){for(var i=t;i-- >0;)for(var o=r;o-- >0;)n(i,o)},e.prototype.matrixApply=function(t){e.mApply(this.k,this.n,t)},e.prototype.computeNextPosition=function(t,r){var n=this;this.computeDerivatives(t);var i=this.computeStepSize(this.g);if(this.stepAndProject(t,r,this.g,i),this.project){this.matrixApply(function(s,a){return n.e[s][a]=t[s][a]-r[s][a]});var o=this.computeStepSize(this.e);o=Math.max(.2,Math.min(o,1)),this.stepAndProject(t,r,this.e,o)}},e.prototype.run=function(t){for(var r=Number.MAX_VALUE,n=!1;!n&&t-- >0;){var i=this.rungeKutta();n=Math.abs(r/i-1)<this.threshold,r=i}return r},e.prototype.rungeKutta=function(){var t=this;this.computeNextPosition(this.x,this.a),e.mid(this.x,this.a,this.ia),this.computeNextPosition(this.ia,this.b),e.mid(this.x,this.b,this.ib),this.computeNextPosition(this.ib,this.c),this.computeNextPosition(this.c,this.d);var r=0;return this.matrixApply(function(n,i){var o=(t.a[n][i]+2*t.b[n][i]+2*t.c[n][i]+t.d[n][i])/6,s=t.x[n][i]-o;r+=s*s,t.x[n][i]=o}),r},e.mid=function(t,r,n){e.mApply(t.length,t[0].length,function(i,o){return n[i][o]=t[i][o]+(r[i][o]-t[i][o])/2})},e.prototype.takeDescentStep=function(t,r,n){for(var i=0;i<this.n;++i)t[i]=t[i]-n*r[i]},e.prototype.computeStress=function(){for(var t=0,r=0,n=this.n-1;r<n;++r)for(var i=r+1,o=this.n;i<o;++i){for(var s=0,a=0;a<this.k;++a){var u=this.x[a][r]-this.x[a][i];s+=u*u}s=Math.sqrt(s);var l=this.D[r][i];if(isFinite(l)){var c=l-s,f=l*l;t+=c*c/f}}return t},e.zeroDistance=1e-10,e})();si.Descent=c4;var vw=(function(){function e(t){t===void 0&&(t=1),this.seed=t,this.a=214013,this.c=2531011,this.m=2147483648,this.range=32767}return e.prototype.getNext=function(){return this.seed=(this.seed*this.a+this.c)%this.m,(this.seed>>16)/this.range},e.prototype.getNextBetween=function(t,r){return t+this.getNext()*(r-t)},e})();si.PseudoRandom=vw});var ts=h(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});var _w=(function(){function e(t){this.scale=t,this.AB=0,this.AD=0,this.A2=0}return e.prototype.addVariable=function(t){var r=this.scale/t.scale,n=t.offset/t.scale,i=t.weight;this.AB+=i*r*n,this.AD+=i*r*t.desiredPosition,this.A2+=i*r*r},e.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},e})();Et.PositionStats=_w;var Jo=(function(){function e(t,r,n,i){i===void 0&&(i=!1),this.left=t,this.right=r,this.gap=n,this.equality=i,this.active=!1,this.unsatisfiable=!1,this.left=t,this.right=r,this.gap=n,this.equality=i}return e.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},e})();Et.Constraint=Jo;var es=(function(){function e(t,r,n){r===void 0&&(r=1),n===void 0&&(n=1),this.desiredPosition=t,this.weight=r,this.scale=n,this.offset=0}return e.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},e.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},e.prototype.visitNeighbours=function(t,r){var n=function(i,o){return i.active&&t!==o&&r(i,o)};this.cOut.forEach(function(i){return n(i,i.right)}),this.cIn.forEach(function(i){return n(i,i.left)})},e})();Et.Variable=es;var Fu=(function(){function e(t){this.vars=[],t.offset=0,this.ps=new _w(t.scale),this.addVariable(t)}
3return e.prototype.addVariable=function(t){t.block=this,this.vars.push(t),this.ps.addVariable(t),this.posn=this.ps.getPosn()},e.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var t=0,r=this.vars.length;t<r;++t)this.ps.addVariable(this.vars[t]);this.posn=this.ps.getPosn()},e.prototype.compute_lm=function(t,r,n){var i=this,o=t.dfdv();return t.visitNeighbours(r,function(s,a){var u=i.compute_lm(a,t,n);a===s.right?(o+=u*s.left.scale,s.lm=u):(o+=u*s.right.scale,s.lm=-u),n(s)}),o/t.scale},e.prototype.populateSplitBlock=function(t,r){var n=this;t.visitNeighbours(r,function(i,o){o.offset=t.offset+(o===i.right?i.gap:-i.gap),n.addVariable(o),n.populateSplitBlock(o,t)})},e.prototype.traverse=function(t,r,n,i){var o=this;n===void 0&&(n=this.vars[0]),i===void 0&&(i=null),n.visitNeighbours(i,function(s,a){r.push(t(s)),o.traverse(t,r,a,n)})},e.prototype.findMinLM=function(){var t=null;return this.compute_lm(this.vars[0],null,function(r){!r.equality&&(t===null||r.lm<t.lm)&&(t=r)}),t},e.prototype.findMinLMBetween=function(t,r){this.compute_lm(t,null,function(){});var n=null;return this.findPath(t,null,r,function(i,o){!i.equality&&i.right===o&&(n===null||i.lm<n.lm)&&(n=i)}),n},e.prototype.findPath=function(t,r,n,i){var o=this,s=!1;return t.visitNeighbours(r,function(a,u){!s&&(u===n||o.findPath(u,t,n,i))&&(s=!0,i(a,u))}),s},e.prototype.isActiveDirectedPathBetween=function(t,r){if(t===r)return!0;for(var n=t.cOut.length;n--;){var i=t.cOut[n];if(i.active&&this.isActiveDirectedPathBetween(i.right,r))return!0}return!1},e.split=function(t){return t.active=!1,[e.createSplitBlock(t.left),e.createSplitBlock(t.right)]},e.createSplitBlock=function(t){var r=new e(t);return r.populateSplitBlock(t,null),r},e.prototype.splitBetween=function(t,r){var n=this.findMinLMBetween(t,r);if(n!==null){var i=e.split(n);return{constraint:n,lb:i[0],rb:i[1]}}return null},e.prototype.mergeAcross=function(t,r,n){r.active=!0;for(var i=0,o=t.vars.length;i<o;++i){var s=t.vars[i];s.offset+=n,this.addVariable(s)}this.posn=this.ps.getPosn()},e.prototype.cost=function(){for(var t=0,r=this.vars.length;r--;){var n=this.vars[r],i=n.position()-n.desiredPosition;t+=i*i*n.weight}return t},e})();Et.Block=Fu;var Gu=(function(){function e(t){this.vs=t;var r=t.length;for(this.list=new Array(r);r--;){var n=new Fu(t[r]);this.list[r]=n,n.blockInd=r}}return e.prototype.cost=function(){for(var t=0,r=this.list.length;r--;)t+=this.list[r].cost();return t},e.prototype.insert=function(t){t.blockInd=this.list.length,this.list.push(t)},e.prototype.remove=function(t){var r=this.list.length-1,n=this.list[r];this.list.length=r,t!==n&&(this.list[t.blockInd]=n,n.blockInd=t.blockInd)},e.prototype.merge=function(t){var r=t.left.block,n=t.right.block,i=t.right.offset-t.left.offset-t.gap;r.vars.length<n.vars.length?(n.mergeAcross(r,t,i),this.remove(r)):(r.mergeAcross(n,t,-i),this.remove(n))},e.prototype.forEach=function(t){this.list.forEach(t)},e.prototype.updateBlockPositions=function(){this.list.forEach(function(t){return t.updateWeightedPosition()})},e.prototype.split=function(t){var r=this;this.updateBlockPositions(),this.list.forEach(function(n){var i=n.findMinLM();i!==null&&i.lm<Ru.LAGRANGIAN_TOLERANCE&&(n=i.left.block,Fu.split(i).forEach(function(o){return r.insert(o)}),r.remove(n),t.push(i))})},e})();Et.Blocks=Gu;var Ru=(function(){function e(t,r){this.vs=t,this.cs=r,this.vs=t,t.forEach(function(n){n.cIn=[],n.cOut=[]}),this.cs=r,r.forEach(function(n){n.left.cOut.push(n),n.right.cIn.push(n)}),this.inactive=r.map(function(n){return n.active=!1,n}),this.bs=null}return e.prototype.cost=function(){return this.bs.cost()},e.prototype.setStartingPositions=function(t){this.inactive=this.cs.map(function(r){return r.active=!1,r}),this.bs=new Gu(this.vs),this.bs.forEach(function(r,n){return r.posn=t[n]})},e.prototype.setDesiredPositions=function(t){this.vs.forEach(function(r,n){return r.desiredPosition=t[n]})},e.prototype.mostViolated=function(){for(var t=Number.MAX_VALUE,r=null,n=this.inactive,i=n.length,o=i,s=0;s<i;++s){var a=n[s];if(!a.unsatisfiable){var u=a.slack();if((a.equality||u<t)&&(t=u,r=a,o=s,a.equality))break}}
3return o!==i&&(t<e.ZERO_UPPERBOUND&&!r.active||r.equality)&&(n[o]=n[i-1],n.length=i-1),r},e.prototype.satisfy=function(){this.bs==null&&(this.bs=new Gu(this.vs)),this.bs.split(this.inactive);for(var t=null;(t=this.mostViolated())&&(t.equality||t.slack()<e.ZERO_UPPERBOUND&&!t.active);){var r=t.left.block,n=t.right.block;if(r!==n)this.bs.merge(t);else{if(r.isActiveDirectedPathBetween(t.right,t.left)){t.unsatisfiable=!0;continue}var i=r.splitBetween(t.left,t.right);if(i!==null)this.bs.insert(i.lb),this.bs.insert(i.rb),this.bs.remove(r),this.inactive.push(i.constraint);else{t.unsatisfiable=!0;continue}t.slack()>=0?this.inactive.push(t):this.bs.merge(t)}}},e.prototype.solve=function(){this.satisfy();for(var t=Number.MAX_VALUE,r=this.bs.cost();Math.abs(t-r)>1e-4;)this.satisfy(),t=r,r=this.bs.cost();return r},e.LAGRANGIAN_TOLERANCE=-1e-4,e.ZERO_UPPERBOUND=-1e-10,e})();Et.Solver=Ru;function f4(e,t,r){for(var n=e.map(function(g){return new es(g.desiredCenter)}),i=[],o=e.length,s=0;s<o-1;s++){var a=e[s],u=e[s+1];i.push(new Jo(n[s],n[s+1],(a.size+u.size)/2))}var l=n[0],c=n[o-1],f=e[0].size/2,p=e[o-1].size/2,d=null,v=null;t&&(d=new es(t,l.weight*1e3),n.push(d),i.push(new Jo(d,l,f))),r&&(v=new es(r,c.weight*1e3),n.push(v),i.push(new Jo(c,v,p)));var m=new Ru(n,i);return m.solve(),{newCenters:n.slice(0,e.length).map(function(g){return g.position()}),lowerBound:d?d.position():l.position()-f,upperBound:v?v.position():c.position()+p}}Et.removeOverlapInOneDimension=f4});var $u=h(Cr=>{"use strict";var h4=Cr&&Cr.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(Cr,"__esModule",{value:!0});var yw=(function(){function e(){this.findIter=function(t){for(var r=this._root,n=this.iterator();r!==null;){var i=this._comparator(t,r.data);if(i===0)return n._cursor=r,n;n._ancestors.push(r),r=r.get_child(i>0)}return null}}return e.prototype.clear=function(){this._root=null,this.size=0},e.prototype.find=function(t){for(var r=this._root;r!==null;){var n=this._comparator(t,r.data);if(n===0)return r.data;r=r.get_child(n>0)}return null},e.prototype.lowerBound=function(t){return this._bound(t,this._comparator)},e.prototype.upperBound=function(t){var r=this._comparator;function n(i,o){return r(o,i)}return this._bound(t,n)},e.prototype.min=function(){var t=this._root;if(t===null)return null;for(;t.left!==null;)t=t.left;return t.data},e.prototype.max=function(){var t=this._root;if(t===null)return null;for(;t.right!==null;)t=t.right;return t.data},e.prototype.iterator=function(){return new xw(this)},e.prototype.each=function(t){for(var r=this.iterator(),n;(n=r.next())!==null;)t(n)},e.prototype.reach=function(t){for(var r=this.iterator(),n;(n=r.prev())!==null;)t(n)},e.prototype._bound=function(t,r){for(var n=this._root,i=this.iterator();n!==null;){var o=this._comparator(t,n.data);if(o===0)return i._cursor=n,i;i._ancestors.push(n),n=n.get_child(o>0)}for(var s=i._ancestors.length-1;s>=0;--s)if(n=i._ancestors[s],r(t,n.data)>0)return i._cursor=n,i._ancestors.length=s,i;return i._ancestors.length=0,i},e})();Cr.TreeBase=yw;var xw=(function(){function e(t){this._tree=t,this._ancestors=[],this._cursor=null}return e.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},e.prototype.next=function(){if(this._cursor===null){var t=this._tree._root;t!==null&&this._minNode(t)}else if(this._cursor.right===null){var r;do if(r=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===r)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},e.prototype.prev=function(){if(this._cursor===null){var t=this._tree._root;t!==null&&this._maxNode(t)}else if(this._cursor.left===null){var r;do if(r=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===r)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},e.prototype._minNode=function(t){for(;t.left!==null;)this._ancestors.push(t),t=t.left;this._cursor=t},e.prototype._maxNode=function(t){for(;t.right!==null;)this._ancestors.push(t),t=t.right;this._cursor=t},e})();Cr.Iterator=xw;var rs=(function(){function e(t){this.data=t,this.left=null,this.right=null,this.red=!0}return e.prototype.get_child=function(t){return t?this.right:this.left},e.prototype.set_child=function(t,r){t?this.right=r:this.left=r},e})(),p4=(function(e){h4(t,e);function t(r){var n=e.call(this)||this;return n._root=null,n._comparator=r,n.size=0,n}return t.prototype.insert=function(r){var n=!1;if(this._root===null)this._root=new rs(r),n=!0,this.size++;else{var i=new rs(void 0),o=!1,s=!1,a=null,u=i,l=null,c=this._root;for(u.right=this._root;;){if(c===null?(c=new rs(r),l.set_child(o,c),n=!0,this.size++):t.is_red(c.left)&&t.is_red(c.r
3ight)&&(c.red=!0,c.left.red=!1,c.right.red=!1),t.is_red(c)&&t.is_red(l)){var f=u.right===a;c===l.get_child(s)?u.set_child(f,t.single_rotate(a,!s)):u.set_child(f,t.double_rotate(a,!s))}var p=this._comparator(c.data,r);if(p===0)break;s=o,o=p<0,a!==null&&(u=a),a=l,l=c,c=c.get_child(o)}this._root=i.right}return this._root.red=!1,n},t.prototype.remove=function(r){if(this._root===null)return!1;var n=new rs(void 0),i=n;i.right=this._root;for(var o=null,s=null,a=null,u=!0;i.get_child(u)!==null;){var l=u;s=o,o=i,i=i.get_child(u);var c=this._comparator(r,i.data);if(u=c>0,c===0&&(a=i),!t.is_red(i)&&!t.is_red(i.get_child(u))){if(t.is_red(i.get_child(!u))){var f=t.single_rotate(i,u);o.set_child(l,f),o=f}else if(!t.is_red(i.get_child(!u))){var p=o.get_child(!l);if(p!==null)if(!t.is_red(p.get_child(!l))&&!t.is_red(p.get_child(l)))o.red=!1,p.red=!0,i.red=!0;else{var d=s.right===o;t.is_red(p.get_child(l))?s.set_child(d,t.double_rotate(o,l)):t.is_red(p.get_child(!l))&&s.set_child(d,t.single_rotate(o,l));var v=s.get_child(d);v.red=!0,i.red=!0,v.left.red=!1,v.right.red=!1}}}}return a!==null&&(a.data=i.data,o.set_child(o.right===i,i.get_child(i.left===null)),this.size--),this._root=n.right,this._root!==null&&(this._root.red=!1),a!==null},t.is_red=function(r){return r!==null&&r.red},t.single_rotate=function(r,n){var i=r.get_child(!n);return r.set_child(!n,i.get_child(n)),i.set_child(n,r),r.red=!0,i.red=!1,i},t.double_rotate=function(r,n){return r.set_child(!n,t.single_rotate(r.get_child(!n),!n)),t.single_rotate(r,n)},t})(yw);Cr.RBTree=p4});var Jr=h(be=>{"use strict";var d4=be&&be.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(be,"__esModule",{value:!0});var Ct=ts(),m4=$u();function ai(e){return e.bounds=typeof e.leaves<"u"?e.leaves.reduce(function(t,r){return r.bounds.union(t)},Qt.empty()):Qt.empty(),typeof e.groups<"u"&&(e.bounds=e.groups.reduce(function(t,r){return ai(r).union(t)},e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}be.computeGroupBounds=ai;var Qt=(function(){function e(t,r,n,i){this.x=t,this.X=r,this.y=n,this.Y=i}return e.empty=function(){return new e(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},e.prototype.cx=function(){return(this.x+this.X)/2},e.prototype.cy=function(){return(this.y+this.Y)/2},e.prototype.overlapX=function(t){var r=this.cx(),n=t.cx();return r<=n&&t.x<this.X?this.X-t.x:n<=r&&this.x<t.X?t.X-this.x:0},e.prototype.overlapY=function(t){var r=this.cy(),n=t.cy();return r<=n&&t.y<this.Y?this.Y-t.y:n<=r&&this.y<t.Y?t.Y-this.y:0},e.prototype.setXCentre=function(t){var r=t-this.cx();this.x+=r,this.X+=r},e.prototype.setYCentre=function(t){var r=t-this.cy();this.y+=r,this.Y+=r},e.prototype.width=function(){return this.X-this.x},e.prototype.height=function(){return this.Y-this.y},e.prototype.union=function(t){return new e(Math.min(this.x,t.x),Math.max(this.X,t.X),Math.min(this.y,t.y),Math.max(this.Y,t.Y))},e.prototype.lineIntersections=function(t,r,n,i){for(var o=[[this.x,this.y,this.X,this.y],[this.X,this.y,this.X,this.Y],[this.X,this.Y,this.x,this.Y],[this.x,this.Y,this.x,this.y]],s=[],a=0;a<4;++a){var u=e.lineIntersection(t,r,n,i,o[a][0],o[a][1],o[a][2],o[a][3]);u!==null&&s.push({x:u.x,y:u.y})}return s},e.prototype.rayIntersection=function(t,r){var n=this.lineIntersections(this.cx(),this.cy(),t,r);return n.length>0?n[0]:null},e.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},e.lineIntersection=function(t,r,n,i,o,s,a,u){var l=n-t,c=a-o,f=i-r,p=u-s,d=p*l-c*f;if(d==0)return null;var v=t-o,m=r-s,g=c*m-p*v,_=g/d,x=l*m-f*v,C=x/d;return _>=0&&_<=1&&C>=0&&C<=1?{x:t+_*l,y:r+_*f}:null},e.prototype.inflate=function(t){return new e(this.x-t,this.X+t,this.y-t,this.Y+t)},e})();be.Rectangle=Qt;function g4(e,t,r){var n=e.rayIntersection(t.cx(),t.cy())||{x:e.cx(),y:e.cy()},i=t.rayIntersection(e.cx(),e.cy())||{x:t.cx(),y:t.cy()},o=i.x-n.x,s=i.y-n.y,a=Math.sqrt(o*o+s*s),u=a-r;return{sourceIntersection:n,targetIntersection:i,arrowStart:{x:n.x+u*o/a,y:n.y+u*s/a}}}be.makeEdgeBetween=g4;function v4(e,t,r){var n=t.rayIntersection(e.x,e.y);n||(n={x:t.cx(),y:t.cy()});var i=n.x-e.x,o=n.y-e.y,s=Math.sqrt(i*i+o*o);return{x:n.x-r*i/s,y:n.y-r*o/s}}be.makeEdgeTo=v4;var _4=(function(){function e(t,r,n){this.v=t,this.r=r,this.pos=n,this.prev=Bu(),this.next=Bu()}return e})(),bw=(function(){function e(t,r,n){this.isOpen=t,this.v=r,this.pos=n}return e})();function y4(e,t){return e.pos>t.pos?1:e.pos<t.pos||e.isOpen?-1:t.isOpen?1:0}function Bu(){return new m4.RBTree(function(e,t){return e.pos-t.pos})}var ww={getCentre:function(e){return e.cx()},getOpen:function(e){return e.y},getClose:function(e){return e.Y},getSize:function(e){return e.width()},makeRect:function(e,t,r,n){return new Qt(r-n/2,r+n/2,e,t)},findNeighbours:x4},Ew={getCentre:function(e){return e.cy()},getOpen:function(e){return e.x},getClose:function(e){return e.X},getSize:function(e){return e.height()},makeRect:function(e,t,r,n){return new Qt(e,t,r-n/2,r+n/2)},findNeighbours:b4};function Vu(e,t,r,n){n===void 0&&(n=!1);var i=e.padding,o=typeof e.groups<"u"?e.groups.length:0,s=typeof e.leaves<"u"?e.leaves.length:0,a=o?e.groups.reduce(function(k,O){return k.concat(Vu(O,t,r,!0))},[]):[],u=(n?2:0)+s+o,l=new Array(u),c=new Array(u),f=0,p=function(k,O){c[f]=k,l[f++]=O};if(n){var d=e.bounds,v=t.getCentre(d),m=t.getSize(d)/2,g=t.getOpen(d),_=t.getClose(d),x=v-m+i/2,C=v+m-i/2;e.minVar.desiredPosition=x,p(t.makeRect(g,_,x,i),e.minVar),e.maxVar.desiredPosition=C,p(t.makeRect(g,_,C,i),e.maxVar)}
3s&&e.leaves.forEach(function(k){return p(k.bounds,k.variable)}),o&&e.groups.forEach(function(k){var O=k.bounds;p(t.makeRect(t.getOpen(O),t.getClose(O),t.getCentre(O),t.getSize(O)),k.minVar)});var b=zu(c,l,t,r);return o&&(l.forEach(function(k){k.cOut=[],k.cIn=[]}),b.forEach(function(k){k.left.cOut.push(k),k.right.cIn.push(k)}),e.groups.forEach(function(k){var O=(k.padding-t.getSize(k.bounds))/2;k.minVar.cIn.forEach(function(L){return L.gap+=O}),k.minVar.cOut.forEach(function(L){L.left=k.maxVar,L.gap+=O})})),a.concat(b)}function zu(e,t,r,n){var i,o=e.length,s=2*o;console.assert(t.length>=o);var a=new Array(s);for(i=0;i<o;++i){var u=e[i],l=new _4(t[i],u,r.getCentre(u));a[i]=new bw(!0,l,r.getOpen(u)),a[i+o]=new bw(!1,l,r.getClose(u))}a.sort(y4);var c=new Array,f=Bu();for(i=0;i<s;++i){var p=a[i],l=p.v;if(p.isOpen)f.insert(l),r.findNeighbours(l,f);else{f.remove(l);var d=function(g,_){var x=(r.getSize(g.r)+r.getSize(_.r))/2+n;c.push(new Ct.Constraint(g.v,_.v,x))},v=function(g,_,x){for(var C,b=l[g].iterator();(C=b[g]())!==null;)x(C,l),C[_].remove(l)};v("prev","next",function(g,_){return d(g,_)}),v("next","prev",function(g,_){return d(_,g)})}}return console.assert(f.size===0),c}function x4(e,t){var r=function(n,i){for(var o=t.findIter(e),s;(s=o[n]())!==null;){var a=s.r.overlapX(e.r);if((a<=0||a<=s.r.overlapY(e.r))&&(e[n].insert(s),s[i].insert(e)),a<=0)break}};r("next","prev"),r("prev","next")}function b4(e,t){var r=function(n,i){var o=t.findIter(e)[n]();o!==null&&o.r.overlapX(e.r)>0&&(e[n].insert(o),o[i].insert(e))};r("next","prev"),r("prev","next")}function Cw(e,t){return zu(e,t,ww,1e-6)}be.generateXConstraints=Cw;function Sw(e,t){return zu(e,t,Ew,1e-6)}be.generateYConstraints=Sw;function Mw(e){return Vu(e,ww,1e-6)}be.generateXGroupConstraints=Mw;function Tw(e){return Vu(e,Ew,1e-6)}be.generateYGroupConstraints=Tw;function w4(e){var t=e.map(function(i){return new Ct.Variable(i.cx())}),r=Cw(e,t),n=new Ct.Solver(t,r);
3n.solve(),t.forEach(function(i,o){return e[o].setXCentre(i.position())}),t=e.map(function(i){return new Ct.Variable(i.cy())}),r=Sw(e,t),n=new Ct.Solver(t,r),n.solve(),t.forEach(function(i,o){return e[o].setYCentre(i.position())})}be.removeOverlaps=w4;var ns=(function(e){d4(t,e);function t(r,n){var i=e.call(this,0,n)||this;return i.index=r,i}return t})(Ct.Variable);be.IndexedVariable=ns;var E4=(function(){function e(t,r,n,i,o){var s=this;if(n===void 0&&(n=null),i===void 0&&(i=null),o===void 0&&(o=!1),this.nodes=t,this.groups=r,this.rootGroup=n,this.avoidOverlaps=o,this.variables=t.map(function(u,l){return u.variable=new ns(l,1)}),i&&this.createConstraints(i),o&&n&&typeof n.groups<"u"){t.forEach(function(u){if(!u.width||!u.height){u.bounds=new Qt(u.x,u.x,u.y,u.y);return}var l=u.width/2,c=u.height/2;u.bounds=new Qt(u.x-l,u.x+l,u.y-c,u.y+c)}),ai(n);var a=t.length;r.forEach(function(u){s.variables[a]=u.minVar=new ns(a++,typeof u.stiffness<"u"?u.stiffness:.01),s.variables[a]=u.maxVar=new ns(a++,typeof u.stiffness<"u"?u.stiffness:.01)})}}return e.prototype.createSeparation=function(t){return new Ct.Constraint(this.nodes[t.left].variable,this.nodes[t.right].variable,t.gap,typeof t.equality<"u"?t.equality:!1)},e.prototype.makeFeasible=function(t){var r=this;if(this.avoidOverlaps){var n="x",i="width";t.axis==="x"&&(n="y",i="height");var o=t.offsets.map(function(a){return r.nodes[a.node]}).sort(function(a,u){return a[n]-u[n]}),s=null;o.forEach(function(a){if(s){var u=s[n]+s[i];u>a[n]&&(a[n]=u)}s=a})}},e.prototype.createAlignment=function(t){var r=this,n=this.nodes[t.offsets[0].node].variable;this.makeFeasible(t);var i=t.axis==="x"?this.xConstraints:this.yConstraints;t.offsets.slice(1).forEach(function(o){var s=r.nodes[o.node].variable;i.push(new Ct.Constraint(n,s,o.offset,!0))})},e.prototype.createConstraints=function(t){var r=this,n=function(i){return typeof i.type>"u"||i.type==="separation"};this.xConstraints=t.filter(function(i){return i.axis==="x"&&n(i)}).map(function(i){return r.createSeparation(i)}),this.yConstraints=t.filter(function(i){return i.axis==="y"&&n(i)}).map(function(i){return r.createSeparation(i)}),t.filter(function(i){return i.type==="alignment"}).forEach(function(i){return r.createAlignment(i)})},e.prototype.setupVariablesAndBounds=function(t,r,n,i){this.nodes.forEach(function(o,s){o.fixed?(o.variable.weight=o.fixedWeight?o.fixedWeight:1e3,n[s]=i(o)):o.variable.weight=1;var a=(o.width||0)/2,u=(o.height||0)/2,l=t[s],c=r[s];o.bounds=new Qt(l-a,l+a,c-u,c+u)})},e.prototype.xProject=function(t,r,n){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(t,r,t,n,function(i){return i.px},this.xConstraints,Mw,function(i){return i.bounds.setXCentre(n[i.variable.index]=i.variable.position())},function(i){var o=n[i.minVar.index]=i.minVar.position(),s=n[i.maxVar.index]=i.maxVar.position(),a=i.padding/2;i.bounds.x=o-a,i.bounds.X=s+a})},e.prototype.yProject=function(t,r,n){!this.rootGroup&&!this.yConstraints||this.project(t,r,r,n,function(i){return i.py},this.yConstraints,Tw,function(i){return i.bounds.setYCentre(n[i.variable.index]=i.variable.position())},function(i){var o=n[i.minVar.index]=i.minVar.position(),s=n[i.maxVar.index]=i.maxVar.position(),a=i.padding/2;i.bounds.y=o-a,i.bounds.Y=s+a})},e.prototype.projectFunctions=function(){var t=this;return[function(r,n,i){return t.xProject(r,n,i)},function(r,n,i){return t.yProject(r,n,i)}]},e.prototype.project=function(t,r,n,i,o,s,a,u,l){this.setupVariablesAndBounds(t,r,i,o),this.rootGroup&&this.avoidOverlaps&&(ai(this.rootGroup),s=s.concat(a(this.rootGroup))),this.solve(this.variables,s,n,i),this.nodes.forEach(u),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(l),ai(this.rootGroup))},e.prototype.solve=function(t,r,n,i){var o=new Ct.Solver(t,r);o.setStartingPositions(n),o.setDesiredPositions(i),o.solve()},e})();be.Projection=E4});var ju=h(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var kw=(function(){function e(t){this.elem=t,this.subheaps=[]}return e.prototype.toString=function(t){for(var r="",n=!1,i=0;i<this.subheaps.length;++i){var o=this.subheaps[i];if(!o.elem){n=!1;continue}n&&(r=r+","),r=r+o.toString(t),n=!0}return r!==""&&(r="("+r+")"),(this.elem?t(this.elem):"")+r},e.prototype.forEach=function(t){this.empty()||(t(this.elem,this),this.subheaps.forEach(function(r){return r.forEach(t)}))},e.prototype.count=function(){return this.empty()?0:1+this.subheaps.reduce(function(t,r){return t+r.count()},0)},e.prototype.min=function(){return this.elem},e.prototype.empty=function(){return this.elem==null},e.prototype.contains=function(t){if(this===t)return!0;for(var r=0;r<this.subheaps.length;r++)if(this.subheaps[r].contains(t))return!0;return!1},e.prototype.isHeap=function(t){var r=this;
3return this.subheaps.every(function(n){return t(r.elem,n.elem)&&n.isHeap(t)})},e.prototype.insert=function(t,r){return this.merge(new e(t),r)},e.prototype.merge=function(t,r){return this.empty()?t:t.empty()?this:r(this.elem,t.elem)?(this.subheaps.push(t),this):(t.subheaps.push(this),t)},e.prototype.removeMin=function(t){return this.empty()?null:this.mergePairs(t)},e.prototype.mergePairs=function(t){if(this.subheaps.length==0)return new e(null);if(this.subheaps.length==1)return this.subheaps[0];var r=this.subheaps.pop().merge(this.subheaps.pop(),t),n=this.mergePairs(t);return r.merge(n,t)},e.prototype.decreaseKey=function(t,r,n,i){var o=t.removeMin(i);t.elem=o.elem,t.subheaps=o.subheaps,n!==null&&o.elem!==null&&n(t.elem,t);var s=new e(r);return n!==null&&n(r,s),this.merge(s,i)},e})();is.PairingHeap=kw;var C4=(function(){function e(t){this.lessThan=t}return e.prototype.top=function(){return this.empty()?null:this.root.elem},e.prototype.push=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n,i=0,o;o=t[i];++i)n=new kw(o),this.root=this.empty()?n:this.root.merge(n,this.lessThan);return n},e.prototype.empty=function(){return!this.root||!this.root.elem},e.prototype.isHeap=function(){return this.root.isHeap(this.lessThan)},e.prototype.forEach=function(t){this.root.forEach(t)},e.prototype.pop=function(){if(this.empty())return null;var t=this.root.min();return this.root=this.root.removeMin(this.lessThan),t},e.prototype.reduceKey=function(t,r,n){n===void 0&&(n=null),this.root=this.root.decreaseKey(t,r,n,this.lessThan)},e.prototype.toString=function(t){return this.root.toString(t)},e.prototype.count=function(){return this.root.count()},e})();is.PriorityQueue=C4});var ui=h(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var qw=ju(),Ow=(function(){function e(t,r){this.id=t,this.distance=r}return e})(),S4=(function(){function e(t){this.id=t,this.neighbours=[]}return e})(),Nw=(function(){function e(t,r,n){this.node=t,this.prev=r,this.d=n}return e})(),M4=(function(){function e(t,r,n,i,o){this.n=t,this.es=r,this.neighbours=new Array(this.n);for(var s=this.n;s--;)this.neighbours[s]=new S4(s);for(s=this.es.length;s--;){var a=this.es[s],u=n(a),l=i(a),c=o(a);this.neighbours[u].neighbours.push(new Ow(l,c)),this.neighbours[l].neighbours.push(new Ow(u,c))}}return e.prototype.DistanceMatrix=function(){for(var t=new Array(this.n),r=0;r<this.n;++r)t[r]=this.dijkstraNeighbours(r);return t},e.prototype.DistancesFromNode=function(t){return this.dijkstraNeighbours(t)},e.prototype.PathFromNodeToNode=function(t,r){return this.dijkstraNeighbours(t,r)},e.prototype.PathFromNodeToNodeWithPrevCost=function(t,r,n){var i=new qw.PriorityQueue(function(m,g){return m.d<=g.d}),o=this.neighbours[t],s=new Nw(o,null,0),a={};for(i.push(s);!i.empty()&&(s=i.pop(),o=s.node,o.id!==r);)for(var u=o.neighbours.length;u--;){var l=o.neighbours[u],c=this.neighbours[l.id];if(!(s.prev&&c.id===s.prev.node.id)){var f=c.id+","+o.id;if(!(f in a&&a[f]<=s.d)){var p=s.prev?n(s.prev.node.id,o.id,c.id):0,d=s.d+l.distance+p;a[f]=d,i.push(new Nw(c,s,d))}}}for(var v=[];s.prev;)s=s.prev,v.push(s.node.id);return v},e.prototype.dijkstraNeighbours=function(t,r){r===void 0&&(r=-1);for(var n=new qw.PriorityQueue(function(p,d){return p.d<=d.d}),i=this.neighbours.length,o=new Array(i);i--;){var s=this.neighbours[i];s.d=i===t?0:Number.POSITIVE_INFINITY,s.q=n.push(s)}for(;!n.empty();){var a=n.pop();if(o[a.id]=a.d,a.id===r){for(var u=[],l=a;typeof l.prev<"u";)u.push(l.prev.id),l=l.prev;return u}for(i=a.neighbours.length;i--;){var c=a.neighbours[i],l=this.neighbours[c.id],f=a.d+c.distance;a.d!==Number.MAX_VALUE&&l.d>f&&(l.d=f,l.prev=a,n.reduceKey(l.q,l,function(d,v){return d.q=v}))}}return o},e})();Hu.Calculator=M4});var Wu=h(ne=>{"use strict";var Pw=ne&&ne.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();
3Object.defineProperty(ne,"__esModule",{value:!0});var T4=Jr(),Yu=(function(){function e(){}return e})();ne.Point=Yu;var Xu=(function(){function e(t,r,n,i){this.x1=t,this.y1=r,this.x2=n,this.y2=i}return e})();ne.LineSegment=Xu;var k4=(function(e){Pw(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Yu);ne.PolyPoint=k4;function Pe(e,t,r){return(t.x-e.x)*(r.y-e.y)-(r.x-e.x)*(t.y-e.y)}ne.isLeft=Pe;function Ke(e,t,r){return Pe(e,t,r)>0}function je(e,t,r){return Pe(e,t,r)<0}function q4(e){var t=e.slice(0).sort(function(p,d){return p.x!==d.x?d.x-p.x:d.y-p.y}),r=e.length,n,i=0,o=t[0].x;for(n=1;n<r&&t[n].x===o;++n);var s=n-1,a=[];if(a.push(t[i]),s===r-1)t[s].y!==t[i].y&&a.push(t[s]);else{var u,l=r-1,c=t[r-1].x;for(n=r-2;n>=0&&t[n].x===c;n--);for(u=n+1,n=s;++n<=u;)if(!(Pe(t[i],t[u],t[n])>=0&&n<u)){for(;a.length>1&&!(Pe(a[a.length-2],a[a.length-1],t[n])>0);)a.length-=1;n!=i&&a.push(t[n])}l!=u&&a.push(t[l]);var f=a.length;for(n=u;--n>=s;)if(!(Pe(t[l],t[s],t[n])>=0&&n>s)){for(;a.length>f&&!(Pe(a[a.length-2],a[a.length-1],t[n])>0);)a.length-=1;n!=i&&a.push(t[n])}}return a}ne.ConvexHull=q4;function O4(e,t,r){t.slice(0).sort(function(n,i){return Math.atan2(n.y-e.y,n.x-e.x)-Math.atan2(i.y-e.y,i.x-e.x)}).forEach(r)}ne.clockwiseRadialSweep=O4;function N4(e,t){var r=t.slice(0);return r.push(t[0]),{rtan:ss(e,r),ltan:as(e,r)}}function ss(e,t){var r=t.length-1,n,i,o,s,a;if(je(e,t[1],t[0])&&!Ke(e,t[r-1],t[0]))return 0;for(n=0,i=r;;){if(i-n===1)return Ke(e,t[n],t[i])?n:i;if(o=Math.floor((n+i)/2),a=je(e,t[o+1],t[o]),a&&!Ke(e,t[o-1],t[o]))return o;s=Ke(e,t[n+1],t[n]),s?a||Ke(e,t[n],t[o])?i=o:n=o:a&&je(e,t[n],t[o])?i=o:n=o}}function as(e,t){var r=t.length-1,n,i,o,s,a;if(Ke(e,t[r-1],t[0])&&!je(e,t[1],t[0]))return 0;for(n=0,i=r;;){if(i-n===1)return je(e,t[n],t[i])?n:i;if(o=Math.floor((n+i)/2),a=je(e,t[o+1],t[o]),Ke(e,t[o-1],t[o])&&!a)return o;s=je(e,t[n+1],t[n]),s?a?je(e,t[n],t[o])?i=o:n=o:i=o:a?n=o:Ke(e,t[n],t[o])?i=o:n=o}}function us(e,t,r,n,i,o){var s,a;s=r(t[0],e),a=n(e[s],t);for(var u=!1;!u;){for(u=!0;s===e.length-1&&(s=0),!i(t[a],e[s],e[s+1]);)++s;for(;a===0&&(a=t.length-1),!o(e[s],t[a],t[a-1]);)--a,u=!1}return{t1:s,t2:a}}ne.tangent_PolyPolyC=us;function A4(e,t){var r=Iw(t,e);return{t1:r.t2,t2:r.t1}}ne.LRtangent_PolyPolyC=A4;function Iw(e,t){return us(e,t,ss,as,Ke,je)}ne.RLtangent_PolyPolyC=Iw;function P4(e,t){return us(e,t,as,as,je,je)}ne.LLtangent_PolyPolyC=P4;function I4(e,t){return us(e,t,ss,ss,Ke,Ke)}ne.RRtangent_PolyPolyC=I4;var li=(function(){function e(t,r){this.t1=t,this.t2=r}return e})();ne.BiTangent=li;var Dw=(function(){function e(){}return e})();ne.BiTangents=Dw;var D4=(function(e){Pw(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Yu);ne.TVGPoint=D4;var Uu=(function(){function e(t,r,n,i){this.id=t,this.polyid=r,this.polyvertid=n,this.p=i,i.vv=this}return e})();ne.VisibilityVertex=Uu;var os=(function(){function e(t,r){this.source=t,this.target=r}return e.prototype.length=function(){var t=this.source.p.x-this.target.p.x,r=this.source.p.y-this.target.p.y;return Math.sqrt(t*t+r*r)},e})();ne.VisibilityEdge=os;var L4=(function(){function e(t,r){if(this.P=t,this.V=[],this.E=[],r)this.V=r.V.slice(0),this.E=r.E.slice(0);else{for(var n=t.length,i=0;i<n;i++){for(var o=t[i],s=0;s<o.length;++s){var a=o[s],u=new Uu(this.V.length,i,s,a);this.V.push(u),s>0&&this.E.push(new os(o[s-1].vv,u))}o.length>1&&this.E.push(new os(o[0].vv,o[o.length-1].vv))}for(var i=0;i<n-1;i++)for(var l=t[i],s=i+1;s<n;s++){var c=t[s],f=Fw(l,c);for(var p in f){var d=f[p],v=l[d.t1],m=c[d.t2];this.addEdgeIfVisible(v,m,i,s)}}}}return e.prototype.addEdgeIfVisible=function(t,r,n,i){this.intersectsPolys(new Xu(t.x,t.y,r.x,r.y),n,i)||this.E.push(new os(t.vv,r.vv))},e.prototype.addPoint=function(t,r){var n=this.P.length;this.V.push(new Uu(this.V.length,n,0,t));for(var i=0;i<n;++i)if(i!==r){var o=this.P[i],s=N4(t,o);this.addEdgeIfVisible(t,o[s.ltan],r,i),this.addEdgeIfVisible(t,o[s.rtan],r,i)}return t.vv},e.prototype.intersectsPolys=function(t,r,n){for(var i=0,o=this.P.length;i<o;++i)if(i!=r&&i!=n&&Lw(t,this.P[i]).length>0)return!0;return!1},e})();ne.TangentVisibilityGraph=L4;function Lw(e,t){for(var r=[],n=1,i=t.length;n<i;++n){var o=T4.Rectangle.lineIntersection(e.x1,e.y1,e.x2,e.y2,t[n-1].x,t[n-1].y,t[n].x,t[n].y);o&&r.push(o)}return r}function Fw(e,t){for(var r=e.length-1,n=t.length-1,i=new Dw,o=0;o<r;++o)for(var s=0;s<n;++s){var a=e[o==0?r-1:o-1],u=e[o],l=e[o+1],c=t[s==0?n-1:s-1],f=t[s],p=t[s+1],d=Pe(a,u,f),v=Pe(u,c,f),m=Pe(u,f,p),g=Pe(c,f,u),_=Pe(f,a,u),x=Pe(f,u,l);d>=0&&v>=0&&m<0&&g>=0&&_>=0&&x<0?i.ll=new li(o,s):d<=0&&v<=0&&m>0&&g<=0&&_<=0&&x>0?i.rr=new li(o,s):d<=0&&v>0&&m<=0&&g>=0&&_<0&&x>=0?i.rl=new li(o,s):d>=0&&v<0&&m>=0&&g<=0&&_>
30&&x<=0&&(i.lr=new li(o,s))}return i}ne.tangents=Fw;function F4(e,t){for(var r=1,n=t.length;r<n;++r)if(je(t[r-1],t[r],e))return!1;return!0}function Aw(e,t){return!e.every(function(r){return!F4(r,t)})}function G4(e,t){if(Aw(e,t)||Aw(t,e))return!0;for(var r=1,n=e.length;r<n;++r){var i=e[r],o=e[r-1];if(Lw(new Xu(o.x,o.y,i.x,i.y),t).length>0)return!0}return!1}ne.polysOverlap=G4});var Zu=h(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var He={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4,MAX_INERATIONS:100};function R4(e,t,r,f,c,o){c===void 0&&(c=1),o===void 0&&(o=!0);var s=0,a=0,u=t,l=r,c=typeof c<"u"?c:1,f=typeof f<"u"?f:0,p=0,d=0,v=0,m=0,g=[];if(e.length==0)return;_(e),C(e,c),o&&x(e);function _(q){q.forEach(function(M){j(M)});function j(M){var D=Number.MAX_VALUE,Y=Number.MAX_VALUE,W=0,Ue=0;M.array.forEach(function(fe){var me=typeof fe.width<"u"?fe.width:f,Je=typeof fe.height<"u"?fe.height:f;me/=2,Je/=2,W=Math.max(fe.x+me,W),D=Math.min(fe.x-me,D),Ue=Math.max(fe.y+Je,Ue),Y=Math.min(fe.y-Je,Y)}),M.width=W-D,M.height=Ue-Y}}function x(q){q.forEach(function(j){var M={x:0,y:0};j.array.forEach(function(W){M.x+=W.x,M.y+=W.y}),M.x/=j.array.length,M.y/=j.array.length;var D={x:M.x-j.width/2,y:M.y-j.height/2},Y={x:j.x-D.x+u/2-p/2,y:j.y-D.y+l/2-d/2};j.array.forEach(function(W){W.x+=Y.x,W.y+=Y.y})})}function C(q,j){var M=Number.POSITIVE_INFINITY,D=0;q.sort(function(gi,vi){return vi.height-gi.height}),v=q.reduce(function(gi,vi){return gi.width<vi.width?gi.width:vi.width});for(var Y=er=v,W=tr=O(q),Ue=0,fe=Number.MAX_VALUE,me=Number.MAX_VALUE,Je=-1,yl=Number.MAX_VALUE,xl=Number.MAX_VALUE;yl>v||xl>He.FLOAT_EPSILON;){if(Je!=1)var er=W-(W-Y)/He.GOLDEN_SECTION,fe=b(q,er);if(Je!=0)var tr=Y+(W-Y)/He.GOLDEN_SECTION,me=b(q,tr);if(yl=Math.abs(er-tr),xl=Math.abs(fe-me),fe<M&&(M=fe,D=er),me<M&&(M=me,D=tr),fe>me?(Y=er,er=tr,fe=me,Je=1):(W=tr,tr=er,me=fe,Je=0),Ue++>100)break}b(q,D)}function b(q,j){g=[],p=0,d=0,m=a;for(var M=0;M<q.length;M++){var D=q[M];k(D,j)}return Math.abs(L()-c)}function k(q,j){for(var M=void 0,D=0;D<g.length;D++)if(g[D].space_left>=q.height&&g[D].x+g[D].width+q.width+He.PADDING-j<=He.FLOAT_EPSILON){M=g[D];break}g.push(q),M!==void 0?(q.x=M.x+M.width+He.PADDING,q.y=M.bottom,q.space_left=q.height,q.bottom=q.y,M.space_left-=q.height+He.PADDING,M.bottom+=q.height+He.PADDING):(q.y=m,m+=q.height+He.PADDING,q.x=s,q.bottom=q.y,q.space_left=q.height),q.y+q.height-d>-He.FLOAT_EPSILON&&(d=q.y+q.height-a),q.x+q.width-p>-He.FLOAT_EPSILON&&(p=q.x+q.width-s)}function O(q){var j=0;return q.forEach(function(M){return j+=M.width+He.PADDING}),j}function L(){return p/d}}ls.applyPacking=R4;function $4(e,t){for(var r={},n={},i=[],o=0,s=0;s<t.length;s++){var a=t[s],u=a.source,l=a.target;n[u.index]?n[u.index].push(l):n[u.index]=[l],n[l.index]?n[l.index].push(u):n[l.index]=[u]}for(var s=0;s<e.length;s++){var c=e[s];r[c.index]||f(c,!0)}function f(p,d){if(r[p.index]===void 0){d&&(o++,i.push({array:[]})),r[p.index]=o,i[o-1].array.push(p);var v=n[p.index];if(v)for(var m=0;m<v.length;m++)f(v[m],!1)}}return i}ls.separateGraphs=$4});var en=h(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});var B4=Lu(),Qu=Qo(),cs=Ko(),fs=Jr(),Gw=ui(),Rw=Wu(),$w=Zu(),ci;(function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"})(ci=fi.EventType||(fi.EventType={}));function hs(e){return typeof e.leaves<"u"||typeof e.groups<"u"}var V4=(function(){function e(){var t=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:e.getSourceIndex,getTargetIndex:e.getTargetIndex,setLength:e.setLinkLength,getType:function(r){return typeof t._linkType=="function"?t._linkType(r):0}}}return e.prototype.on=function(t,r){return this.event||(this.event={}),typeof t=="string"?this.event[ci[t]]=r:this.event[t]=r,this},e.prototype.trigger=function(t){this.event&&typeof this.event[t.type]<"u"&&this.event[t.type](t)},e.prototype.kick=function(){for(;!this.tick(););},e.prototype.tick=function(){if(this._alpha<this._threshold)return this._running=!1,this.trigger({type:ci.end,alpha:this._alpha=0,stress:this._lastStress}),!0;var t=this._nodes.length,r=this._links.length,n,i;for(this._descent.locks.clear(),i=0;i<t;++i)if(n=this._nodes[i],n.fixed){(typeof n.px>"u"||typeof n.py>"u")&&(n.px=n.x,n.py=n.y);var o=[n.px,n.py];this._descent.locks.add(i,o)}var s=this._descent.rungeKutta();return s===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=s),this._lastStress=s,this.updateNodePositions(),this.trigger({type:ci.tick,alpha:this._alpha,stress:this._lastStress}),!1},e.prototype.updateNodePositions=function(){for(var t=this._descent.x[0],r=this._descent.x[1],n,i=this._nodes.length;i--;)n=this._nodes[i],n.x=t[i],n.y=r[i]},e.prototype.nodes=function(t){if(!t){if(this._nodes.length===0&&this._links.length>0){var r=0;
3this._links.forEach(function(i){r=Math.max(r,i.source,i.target)}),this._nodes=new Array(++r);for(var n=0;n<r;++n)this._nodes[n]={}}return this._nodes}return this._nodes=t,this},e.prototype.groups=function(t){var r=this;return t?(this._groups=t,this._rootGroup={},this._groups.forEach(function(n){typeof n.padding>"u"&&(n.padding=1),typeof n.leaves<"u"&&n.leaves.forEach(function(i,o){typeof i=="number"&&((n.leaves[o]=r._nodes[i]).parent=n)}),typeof n.groups<"u"&&n.groups.forEach(function(i,o){typeof i=="number"&&((n.groups[o]=r._groups[i]).parent=n)})}),this._rootGroup.leaves=this._nodes.filter(function(n){return typeof n.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(n){return typeof n.parent>"u"}),this):this._groups},e.prototype.powerGraphGroups=function(t){var r=B4.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(r.groups),t(r),this},e.prototype.avoidOverlaps=function(t){return arguments.length?(this._avoidOverlaps=t,this):this._avoidOverlaps},e.prototype.handleDisconnected=function(t){return arguments.length?(this._handleDisconnected=t,this):this._handleDisconnected},e.prototype.flowLayout=function(t,r){return arguments.length||(t="y"),this._directedLinkConstraints={axis:t,getMinSeparation:typeof r=="number"?function(){return r}:r},this},e.prototype.links=function(t){return arguments.length?(this._links=t,this):this._links},e.prototype.constraints=function(t){return arguments.length?(this._constraints=t,this):this._constraints},e.prototype.distanceMatrix=function(t){return arguments.length?(this._distanceMatrix=t,this):this._distanceMatrix},e.prototype.size=function(t){return t?(this._canvasSize=t,this):this._canvasSize},e.prototype.defaultNodeSize=function(t){return t?(this._defaultNodeSize=t,this):this._defaultNodeSize},e.prototype.groupCompactness=function(t){return t?(this._groupCompactness=t,this):this._groupCompactness},e.prototype.linkDistance=function(t){return t?(this._linkDistance=typeof t=="function"?t:+t,this._linkLengthCalculator=null,this):this._linkDistance},e.prototype.linkType=function(t){return this._linkType=t,this},e.prototype.convergenceThreshold=function(t){return t?(this._threshold=typeof t=="function"?t:+t,this):this._threshold},e.prototype.alpha=function(t){return arguments.length?(t=+t,this._alpha?t>0?this._alpha=t:this._alpha=0:t>0&&(this._running||(this._running=!0,this.trigger({type:ci.start,alpha:this._alpha=t}),this.kick())),this):this._alpha},e.prototype.getLinkLength=function(t){return typeof this._linkDistance=="function"?+this._linkDistance(t):this._linkDistance},e.setLinkLength=function(t,r){t.length=r},e.prototype.getLinkType=function(t){return typeof this._linkType=="function"?this._linkType(t):0},e.prototype.symmetricDiffLinkLengths=function(t,r){var n=this;return r===void 0&&(r=1),this.linkDistance(function(i){return t*i.length}),this._linkLengthCalculator=function(){return Qu.symmetricDiffLinkLengths(n._links,n.linkAccessor,r)},this},e.prototype.jaccardLinkLengths=function(t,r){var n=this;return r===void 0&&(r=1),this.linkDistance(function(i){return t*i.length}),this._linkLengthCalculator=function(){return Qu.jaccardLinkLengths(n._links,n.linkAccessor,r)},this},e.prototype.start=function(t,r,n,i,o,s){var a=this;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),o===void 0&&(o=!0),s===void 0&&(s=!0);var u,l,c=this.nodes().length,f=c+2*this._groups.length,p=this._links.length,d=this._canvasSize[0],v=this._canvasSize[1],m=new Array(f),g=new Array(f),_=null,x=this._avoidOverlaps;this._nodes.forEach(function(M,D){M.index=D,typeof M.x>"u"&&(M.x=d/2,M.y=v/2),m[D]=M.x,g[D]=M.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var C;this._distanceMatrix?C=this._distanceMatrix:(C=new Gw.Calculator(f,this._links,e.getSourceIndex,e.getTargetIndex,function(M){return a.getLinkLength(M)}).DistanceMatrix(),_=cs.Descent.createSquareMatrix(f,function(){return 2}),this._links.forEach(function(M){typeof M.source=="number"&&(M.source=a._nodes[M.source]),typeof M.target=="number"&&(M.target=a._nodes[M.target])}),this._links.forEach(function(M){var D=e.getSourceIndex(M),Y=e.getTargetIndex(M);_[D][Y]=_[Y][D]=M.weight||1}));var b=cs.Descent.createSquareMatrix(f,function(M,D){return C[M][D]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var u=c,k=function(D,Y,W,Ue){_[D][Y]=_[Y][D]=W,b[D][Y]=b[Y][D]=Ue};this._groups.forEach(function(D){k(u,u+1,a._groupCompactness,.1),m[u]=0,g[u++]=0,m[u]=0,g[u++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var O=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,O=O.concat(Qu.generateDirectedEdgeConstraints(c,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new cs.Descent([m,g],b),this._descent.locks.clear();for(var u=0;u<c;++u){var L=this._nodes[u];if(L.fixed){L.px=L.x,L.py=L.y;var q=[L.x,L.y];this._descent.locks.add(u,q)}}if(this._descent.threshold=this._threshold,this.initialLayout(t,m,g),O.length>0&&(this._descent.project=new fs.Projection(this._nodes,this._groups,this._rootGroup,O).projectFunctions()),this._descent.run(r),this.separateOverlappingComponents(d,v,s),this.avoidOverlaps(x),x&&(this._nodes.forEac
3h(function(M,D){M.x=m[D],M.y=g[D]}),this._descent.project=new fs.Projection(this._nodes,this._groups,this._rootGroup,O,!0).projectFunctions(),this._nodes.forEach(function(M,D){m[D]=M.x,g[D]=M.y})),this._descent.G=_,this._descent.run(n),i){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=c,this._descent.scaleSnapByMaxH=c!=f;var j=cs.Descent.createSquareMatrix(f,function(M,D){return M>=c||D>=c?_[M][D]:0});this._descent.G=j,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(d,v,s),o?this.resume():this},e.prototype.initialLayout=function(t,r,n){if(this._groups.length>0&&t>0){var i=this._nodes.length,o=this._links.map(function(a){return{source:a.source.index,target:a.target.index}}),s=this._nodes.map(function(a){return{index:a.index}});this._groups.forEach(function(a,u){s.push({index:a.index=i+u})}),this._groups.forEach(function(a,u){typeof a.leaves<"u"&&a.leaves.forEach(function(l){return o.push({source:a.index,target:l.index})}),typeof a.groups<"u"&&a.groups.forEach(function(l){return o.push({source:a.index,target:l.index})})}),new e().size(this.size()).nodes(s).links(o).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(t,0,0,0,!1),this._nodes.forEach(function(a){r[a.index]=s[a.index].x,n[a.index]=s[a.index].y})}else this._descent.run(t)},e.prototype.separateOverlappingComponents=function(t,r,n){var i=this;if(n===void 0&&(n=!0),!this._distanceMatrix&&this._handleDisconnected){var o=this._descent.x[0],s=this._descent.x[1];this._nodes.forEach(function(u,l){u.x=o[l],u.y=s[l]});var a=$w.separateGraphs(this._nodes,this._links);$w.applyPacking(a,t,r,this._defaultNodeSize,1,n),this._nodes.forEach(function(u,l){i._descent.x[0][l]=u.x,i._descent.x[1][l]=u.y,u.bounds&&(u.bounds.setXCentre(u.x),u.bounds.setYCentre(u.y))})}},e.prototype.resume=function(){return this.alpha(.1)},e.prototype.stop=function(){return this.alpha(0)},e.prototype.prepareEdgeRouting=function(t){t===void 0&&(t=0),this._visibilityGraph=new Rw.TangentVisibilityGraph(this._nodes.map(function(r){return r.bounds.inflate(-t).vertices()}))},e.prototype.routeEdge=function(t,r,n){r===void 0&&(r=5);var i=[],o=new Rw.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),s={x:t.source.x,y:t.source.y},a={x:t.target.x,y:t.target.y},u=o.addPoint(s,t.source.index),l=o.addPoint(a,t.target.index);o.addEdgeIfVisible(s,a,t.source.index,t.target.index),typeof n<"u"&&n(o);var c=function(b){return b.source.id},f=function(b){return b.target.id},p=function(b){return b.length()},d=new Gw.Calculator(o.V.length,o.E,c,f,p),v=d.PathFromNodeToNode(u.id,l.id);if(v.length===1||v.length===o.V.length){var m=fs.makeEdgeBetween(t.source.innerBounds,t.target.innerBounds,r);i=[m.sourceIntersection,m.arrowStart]}else{for(var g=v.length-2,_=o.V[v[g]].p,x=o.V[v[0]].p,i=[t.source.innerBounds.rayIntersection(_.x,_.y)],C=g;C>=0;--C)i.push(o.V[v[C]].p);i.push(fs.makeEdgeTo(x,t.target.innerBounds,r))}return i},e.getSourceIndex=function(t){return typeof t.source=="number"?t.source:t.source.index},e.getTargetIndex=function(t){return typeof t.target=="number"?t.target:t.target.index},e.linkId=function(t){return e.getSourceIndex(t)+"-"+e.getTargetIndex(t)},e.dragStart=function(t){hs(t)?e.storeOffset(t,e.dragOrigin(t)):(e.stopNode(t),t.fixed|=2)},e.stopNode=function(t){t.px=t.x,t.py=t.y},e.storeOffset=function(t,r){typeof t.leaves<"u"&&t.leaves.forEach(function(n){n.fixed|=2,e.stopNode(n),n._dragGroupOffsetX=n.x-r.x,n._dragGroupOffsetY=n.y-r.y}),typeof t.groups<"u"&&t.groups.forEach(function(n){return e.storeOffset(n,r)})},e.dragOrigin=function(t){return hs(t)?{x:t.bounds.cx(),y:t.bounds.cy()}:t},e.drag=function(t,r){hs(t)?(typeof t.leaves<"u"&&t.leaves.forEach(function(n){t.bounds.setXCentre(r.x),t.bounds.setYCentre(r.y),n.px=n._dragGroupOffsetX+r.x,n.py=n._dragGroupOffsetY+r.y}),typeof t.groups<"u"&&t.groups.forEach(function(n){return e.drag(n,r)})):(t.px=r.x,t.py=r.y)},e.dragEnd=function(t){hs(t)?(typeof t.leaves<"u"&&t.leaves.forEac
3h(function(r){e.dragEnd(r),delete r._dragGroupOffsetX,delete r._dragGroupOffsetY}),typeof t.groups<"u"&&t.groups.forEach(e.dragEnd)):t.fixed&=-7},e.mouseOver=function(t){t.fixed|=4,t.px=t.x,t.py=t.y},e.mouseOut=function(t){t.fixed&=-5},e})();fi.Layout=V4});var Vw=h(tn=>{"use strict";var z4=tn&&tn.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(tn,"__esModule",{value:!0});var Ku=en(),Bw=(function(e){z4(t,e);function t(r){var n=e.call(this)||this,i=n,o=r;return o.trigger&&(n.trigger=o.trigger),o.kick&&(n.kick=o.kick),o.drag&&(n.drag=o.drag),o.on&&(n.on=o.on),n.dragstart=n.dragStart=Ku.Layout.dragStart,n.dragend=n.dragEnd=Ku.Layout.dragEnd,n}return t.prototype.trigger=function(r){},t.prototype.kick=function(){},t.prototype.drag=function(){},t.prototype.on=function(r,n){return this},t})(Ku.Layout);tn.LayoutAdaptor=Bw;function j4(e){return new Bw(e)}tn.adaptor=j4});var jw=h(rn=>{"use strict";var H4=rn&&rn.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(rn,"__esModule",{value:!0});var Ie=en(),zw=(function(e){H4(t,e);function t(){var r=e.call(this)||this;r.event=d3.dispatch(Ie.EventType[Ie.EventType.start],Ie.EventType[Ie.EventType.tick],Ie.EventType[Ie.EventType.end]);var n=r,i;return r.drag=function(){if(!o)var o=d3.behavior.drag().origin(Ie.Layout.dragOrigin).on("dragstart.d3adaptor",Ie.Layout.dragStart).on("drag.d3adaptor",function(s){Ie.Layout.drag(s,d3.event),n.resume()}).on("dragend.d3adaptor",Ie.Layout.dragEnd);if(!arguments.length)return o;this.call(o)},r}return t.prototype.trigger=function(r){var n={type:Ie.EventType[r.type],alpha:r.alpha,stress:r.stress};this.event[n.type](n)},t.prototype.kick=function(){var r=this;d3.timer(function(){return e.prototype.tick.call(r)})},t.prototype.on=function(r,n){return typeof r=="string"?this.event.on(r,n):this.event.on(Ie.EventType[r],n),this},t})(Ie.Layout);rn.D3StyleLayoutAdaptor=zw;function U4(){return new zw}rn.d3adaptor=U4});var Hw=h(hi=>{"use strict";var Y4=hi&&hi.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(hi,"__esModule",{value:!0});var De=en(),X4=(function(e){Y4(t,e);function t(r){var n=e.call(this)||this;n.d3Context=r,n.event=r.dispatch(De.EventType[De.EventType.start],De.EventType[De.EventType.tick],De.EventType[De.EventType.end]);var i=n,o;return n.drag=function(){if(!s)var s=r.drag().subject(De.Layout.dragOrigin).on("start.d3adaptor",De.Layout.dragStart).on("drag.d3adaptor",function(a){De.Layout.drag(a,r.event),i.resume()}).on("end.d3adaptor",De.Layout.dragEnd);if(!arguments.length)return s;arguments[0].call(s)},n}return t.prototype.trigger=function(r){var n={type:De.EventType[r.type],alpha:r.alpha,stress:r.stress};this.event.call(n.type,n)},t.prototype.kick=function(){var r=this,n=this.d3Context.timer(function(){return e.prototype.tick.call(r)&&n.stop()})},t.prototype.on=function(r,n){return typeof r=="string"?this.event.on(r,n):this.event.on(De.EventType[r],n),this},t})(De.Layout);hi.D3StyleLayoutAdaptor=X4});var Uw=h(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var W4=jw(),Z4=Hw();function Q4(e){return!e||K4(e)?new W4.D3StyleLayoutAdaptor:new Z4.D3StyleLayoutAdaptor(e)}Ju.d3adaptor=Q4;function K4(e){var t=/^3\./;return e.version&&e.version.match(t)!==null}});var nl=h(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});var J4=Jr(),el=ts(),eV=ui(),Yw=(function(){function e(t,r,n){this.id=t,this.rect=r,this.children=n,this.leaf=typeof n>"u"||n.length===0}return e})();nn.NodeWrapper=Yw;var tl=(function(){function e(t,r,n,i,o){i===void 0&&(i=null),o===void 0&&(o=null),this.id=t,this.x=r,this.y=n,this.node=i,this.line=o}return e})();nn.Vert=tl;var rl=(function(){function e(t,r){this.s=t,this.t=r;var n=e.findMatch(t,r),i=r.slice(0).reverse(),o=e.findMatch(t,i);n.length>=o.length?(this.length=n.length,this.si=n.si,this.ti=n.ti,this.reversed=!1):(this.length=o.length,this.si=o.si,this.ti=r.length-o.ti-o.length,this.reversed=!0)}return e.findMatch=function(t,r){for(var n=t.length,i=r.length,o={length:0,si:-1,ti:-1},s=new Array(n),a=0;a<n;a++){s[a]=new Array(i);for(var u=0;u<i;u++)if(t[a]===r[u]){var l=s[a][u]=a===0||u===0?1:s[a-1][u-1]+1;l>o.length&&(o.length=l,o.si=a-l+1,o.ti=u-l+1)}else s[a][u]=0}return o},e.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},e})();nn.LongestCommonSubsequence=rl;var tV=(function(){function e(t,r,n){var i=this;n===void 0&&(n=12),this.originalnodes=t,this.groupPadding=n,this.leaves=null,this.nodes=t.map(function(m,g){return new Yw(g,r.getBounds(m),r.getChildren(m))}),this.leaves=this.nodes.filter(function(m){return m.leaf}),this.groups=this.nodes.filter(function(m){return!m.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(m){return m.children.forEac
3h(function(g){return i.nodes[g].parent=m})}),this.root={children:[]},this.nodes.forEach(function(m){typeof m.parent>"u"&&(m.parent=i.root,i.root.children.push(m.id)),m.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(m,g){return i.getDepth(m)-i.getDepth(g)});var o=this.backToFront.slice(0).reverse().filter(function(m){return!m.leaf});o.forEach(function(m){var g=J4.Rectangle.empty();m.children.forEach(function(_){return g=g.union(i.nodes[_].rect)}),m.rect=g.inflate(i.groupPadding)});var s=this.midPoints(this.cols.map(function(m){return m.pos})),a=this.midPoints(this.rows.map(function(m){return m.pos})),u=s[0],l=s[s.length-1],c=a[0],f=a[a.length-1],p=this.rows.map(function(m){return{x1:u,x2:l,y1:m.pos,y2:m.pos}}).concat(a.map(function(m){return{x1:u,x2:l,y1:m,y2:m}})),d=this.cols.map(function(m){return{x1:m.pos,x2:m.pos,y1:c,y2:f}}).concat(s.map(function(m){return{x1:m,x2:m,y1:c,y2:f}})),v=p.concat(d);v.forEach(function(m){return m.verts=[]}),this.verts=[],this.edges=[],p.forEach(function(m){return d.forEach(function(g){var _=new tl(i.verts.length,g.x1,m.y1);m.verts.push(_),g.verts.push(_),i.verts.push(_);for(var x=i.backToFront.length;x-- >0;){var C=i.backToFront[x],b=C.rect,k=Math.abs(_.x-b.cx()),O=Math.abs(_.y-b.cy());if(k<b.width()/2&&O<b.height()/2){_.node=C;break}}})}),v.forEach(function(m,g){i.nodes.forEach(function(O,L){O.rect.lineIntersections(m.x1,m.y1,m.x2,m.y2).forEach(function(q,j){var M=new tl(i.verts.length,q.x,q.y,O,m);i.verts.push(M),m.verts.push(M),O.ports.push(M)})});var _=Math.abs(m.y1-m.y2)<.1,x=function(O,L){return _?L.x-O.x:L.y-O.y};m.verts.sort(x);for(var C=1;C<m.verts.length;C++){var b=m.verts[C-1],k=m.verts[C];b.node&&b.node===k.node&&b.node.leaf||i.edges.push({source:b.id,target:k.id,length:Math.abs(x(b,k))})}})}return e.prototype.avg=function(t){return t.reduce(function(r,n){return r+n})/t.length},e.prototype.getGridLines=function(t){for(var r=[],n=this.leaves.slice(0,this.leaves.length);n.length>0;){var i=n.filter(function(s){return s.rect["overlap"+t.toUpperCase()](n[0].rect)}),o={nodes:i,pos:this.avg(i.map(function(s){return s.rect["c"+t]()}))};r.push(o),o.nodes.forEach(function(s){return n.splice(n.indexOf(s),1)})}return r.sort(function(s,a){return s.pos-a.pos}),r},e.prototype.getDepth=function(t){for(var r=0;t.parent!==this.root;)r++,t=t.parent;return r},e.prototype.midPoints=function(t){for(var r=t[1]-t[0],n=[t[0]-r/2],i=1;i<t.length;i++)n.push((t[i]+t[i-1])/2);return n.push(t[t.length-1]+r/2),n},e.prototype.findLineage=function(t){var r=[t];do t=t.parent,r.push(t);while(t!==this.root);return r.reverse()},e.prototype.findAncestorPathBetween=function(t,r){for(var n=this.findLineage(t),i=this.findLineage(r),o=0;n[o]===i[o];)o++;return{commonAncestor:n[o-1],lineages:n.slice(o).concat(i.slice(o))}},e.prototype.siblingObstacles=function(t,r){var n=this,i=this.findAncestorPathBetween(t,r),o={};i.lineages.forEach(function(a){return o[a.id]={}}
3);var s=i.commonAncestor.children.filter(function(a){return!(a in o)});return i.lineages.filter(function(a){return a.parent!==i.commonAncestor}).forEach(function(a){return s=s.concat(a.parent.children.filter(function(u){return u!==a.id}))}),s.map(function(a){return n.nodes[a]})},e.getSegmentSets=function(t,r,n){for(var i=[],o=0;o<t.length;o++)for(var s=t[o],a=0;a<s.length;a++){var u=s[a];u.edgeid=o,u.i=a;var l=u[1][r]-u[0][r];Math.abs(l)<.1&&i.push(u)}i.sort(function(d,v){return d[0][r]-v[0][r]});for(var c=[],f=null,p=0;p<i.length;p++){var u=i[p];(!f||Math.abs(u[0][r]-f.pos)>.1)&&(f={pos:u[0][r],segments:[]},c.push(f)),f.segments.push(u)}return c},e.nudgeSegs=function(t,r,n,i,o,s){var a=i.length;if(!(a<=1)){for(var u=i.map(function(C){return new el.Variable(C[0][t])}),l=[],c=0;c<a;c++)for(var f=0;f<a;f++)if(c!==f){var p=i[c],d=i[f],v=p.edgeid,m=d.edgeid,g=-1,_=-1;t=="x"?o(v,m)&&(p[0][r]<p[1][r]?(g=f,_=c):(g=c,_=f)):o(v,m)&&(p[0][r]<p[1][r]?(g=c,_=f):(g=f,_=c)),g>=0&&l.push(new el.Constraint(u[g],u[_],s))}var x=new el.Solver(u,l);x.solve(),u.forEach(function(C,b){var k=i[b],O=C.position();k[0][t]=k[1][t]=O;var L=n[k.edgeid];k.i>0&&(L[k.i-1][1][t]=O),k.i<L.length-1&&(L[k.i+1][0][t]=O)})}},e.nudgeSegments=function(t,r,n,i,o){for(var s=e.getSegmentSets(t,r,n),a=0;a<s.length;a++){for(var u=s[a],l=[],c=0;c<u.segments.length;c++){var f=u.segments[c];l.push({type:0,s:f,pos:Math.min(f[0][n],f[1][n])}),l.push({type:1,s:f,pos:Math.max(f[0][n],f[1][n])})}l.sort(function(v,m){return v.pos-m.pos+v.type-m.type});var p=[],d=0;l.forEach(function(v){v.type===0?(p.push(v.s),d++):d--,d==0&&(e.nudgeSegs(r,n,t,p,i,o),p=[])})}},e.prototype.routeEdges=function(t,r,n,i){var o=this,s=t.map(function(l){return o.route(n(l),i(l))}),a=e.orderEdges(s),u=s.map(function(l){return e.makeSegments(l)});return e.nudgeSegments(u,"x","y",a,r),e.nudgeSegments(u,"y","x",a,r),e.unreverseEdges(u,s),u},e.unreverseEdges=function(t,r){t.forEach(function(n,i){var o=r[i];o.reversed&&(n.reverse(),n.forEach(function(s){s.reverse()}))})},e.angleBetween2Lines=function(t,r){var n=Math.atan2(t[0].y-t[1].y,t[0].x-t[1].x),i=Math.atan2(r[0].y-r[1].y,r[0].x-r[1].x),o=n-i;return(o>Math.PI||o<-Math.PI)&&(o=i-n),o},e.isLeft=function(t,r,n){return(r.x-t.x)*(n.y-t.y)-(r.y-t.y)*(n.x-t.x)<=0},e.getOrder=function(t){for(var r={},n=0;n<t.length;n++){var i=t[n];typeof r[i.l]>"u"&&(r[i.l]={}),r[i.l][i.r]=!0}return function(o,s){return typeof r[o]<"u"&&r[o][s]}},e.orderEdges=function(t){for(var r=[],n=0;n<t.length-1;n++)for(var i=n+1;i<t.length;i++){var o=t[n],s=t[i],a=new rl(o,s),u,l,c;if(a.length!==0){if(a.reversed&&(s.reverse(),s.reversed=!0,a=new rl(o,s)),(a.si<=0||a.ti<=0)&&(a.si+a.length>=o.length||a.ti+a.length>=s.length)){r.push({l:n,r:i});continue}a.si+a.length>=o.length||a.ti+a.length>=s.length?(u=o[a.si+1],c=o[a.si-1],l=s[a.ti-1]):(u=o[a.si+a.length-2],l=o[a.si+a.length],c=s[a.ti+a.length]),e.isLeft(u,l,c)?r.push({l:i,r:n}):r.push({l:n,r:i})}}return e.getOrder(r)},e.makeSegments=function(t){function r(l){return{x:l.x,y:l.y}}for(var n=function(l,c,f){return Math.abs((c.x-l.x)*(f.y-l.y)-(c.y-l.y)*(f.x-l.x))<.001},i=[],o=r(t[0]),s=1;s<t.length;s++){var a=r(t[s]),u=s<t.length-1?t[s+1]:null;(!u||!n(o,a,u))&&(i.push([o,a]),o=a)}return i},e.prototype.route=function(t,r){var n=this,i=this.nodes[t],o=this.nodes[r];this.obstacles=this.siblingObstacles(i,o);var s={};this.obstacles.forEach(function(_){return s[_.id]=_}),this.passableEdges=this.edges.filter(function(_){var x=n.verts[_.source],C=n.verts[_.target];return!(x.node&&x.node.id in s||C.node&&C.node.id in s)});for(var a=1;a<i.ports.length;a++){var u=i.ports[0].id,l=i.ports[a].id;this.passableEdges.push({source:u,target:l,length:0})}for(var a=1;a<o.ports.length;a++){var u=o.ports[0].id,l=o.ports[a].id;this.passableEdges.push({source:u,target:l,length:0})}var c=function(_){return _.source},f=function(_){return _.target},p=function(_){return _.length},d=new eV.Calculator(this.verts.length,this.passableEdges,c,f,p),v=function(_,x,C){var b=n.verts[_],k=n.verts[x],O=n.verts[C],L=Math.abs(O.x-b.x),q=Math.abs(O.y-b.y);return b.node===i&&b.node===k.node||k.node===o&&k.node===O.node?0:L>1&&q>1?1e3:0},m=d.PathFromNodeToNodeWithPrevCost(i.ports[0].id,o.ports[0].id,v),g=m.reverse().map(function(_){return n.verts[_]});return g.push(this.nodes[o.id].ports[0]),g.filter(function(_,x){return!(x<g.length-1&&g[x+1].node===i&&_.node===i||x>0&&_.node===o&&g[x-1].node===o)})},e.getRoutePath=function(t,r,n,i){var o={routepath:"M "+t[0][0].x+" "+t[0][0].y+" ",arrowpath:""};if(t.length>1)for(var s=0;s<t.length;s++){var a=t[s],u=a[1].x,l=a[1].y,c=u-a[0].x,f=l-a[0].y;if(s<t.length-1){Math.abs(c)>0?u-=c/Math.abs(c)*r:l-=f/Math.abs(f)*r,o.routepath+="L "+u+" "+l+" ";var p=t[s+1],d=p[0].x,v=p[0].y,m=p[1].x,g=p[1].y;c=m-d,f=g-v;var _=e.angleBetween2Lines(a,p)<0?1:0,x,C;Math.abs(c)>0?(x=d+c/Math.abs(c)*r,C=v):(x=d,C=v+f/Math.abs(f)*r);var b=Math.abs(x-u),k=Math.abs(C-l);o.routepath+="A "+b+" "+k+" 0 0 "+_+" "+x+" "+C+" "}else{var O=[u,l],L,q;Math.abs(c)>0?(u-=c/Math.abs(c)*i,L=[u,l+n],q=[u,l-n]):(l-=f/Math.abs(f)*i,L=[u+n,l],q=[u-n,l]),o.routepath+="L "+u+" "+l+" ",i>0&&(o.arrowpath="M "+O[0]+" "+O[1]+" L "+L[0]+" "+L[1]+" L "+q[0]+" "+q[1])}}
3else{var a=t[0],u=a[1].x,l=a[1].y,c=u-a[0].x,f=l-a[0].y,O=[u,l],L,q;Math.abs(c)>0?(u-=c/Math.abs(c)*i,L=[u,l+n],q=[u,l-n]):(l-=f/Math.abs(f)*i,L=[u+n,l],q=[u-n,l]),o.routepath+="L "+u+" "+l+" ",i>0&&(o.arrowpath="M "+O[0]+" "+O[1]+" L "+L[0]+" "+L[1]+" L "+q[0]+" "+q[1])}return o},e})();nn.GridRouter=tV});var Xw=h(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});var rV=ui(),il=Ko(),nV=Jr(),iV=Qo(),oV=(function(){function e(t,r){this.source=t,this.target=r}return e.prototype.actualLength=function(t){var r=this;return Math.sqrt(t.reduce(function(n,i){var o=i[r.target]-i[r.source];return n+o*o},0))},e})();pi.Link3D=oV;var sV=(function(){function e(t,r,n){t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0),this.x=t,this.y=r,this.z=n}return e})();pi.Node3D=sV;var aV=(function(){function e(t,r,n){var i=this;n===void 0&&(n=1),this.nodes=t,this.links=r,this.idealLinkLength=n,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(e.k);for(var o=0;o<e.k;++o)this.result[o]=new Array(t.length);t.forEach(function(s,a){for(var u=0,l=e.dims;u<l.length;u++){var c=l[u];typeof s[c]>"u"&&(s[c]=Math.random())}i.result[0][a]=s.x,i.result[1][a]=s.y,i.result[2][a]=s.z})}return e.prototype.linkLength=function(t){return t.actualLength(this.result)},e.prototype.start=function(t){var r=this;t===void 0&&(t=100);var n=this.nodes.length,i=new uV;this.useJaccardLinkLengths&&iV.jaccardLinkLengths(this.links,i,1.5),this.links.forEach(function(c){return c.length*=r.idealLinkLength});var o=new rV.Calculator(n,this.links,function(c){return c.source},function(c){return c.target},function(c){return c.length}).DistanceMatrix(),s=il.Descent.createSquareMatrix(n,function(c,f){return o[c][f]}),a=il.Descent.createSquareMatrix(n,function(){return 2});this.links.forEach(function(c){var f=c.source,p=c.target;return a[f][p]=a[p][f]=1}),this.descent=new il.Descent(this.result,s),this.descent.threshold=.001,this.descent.G=a,this.constraints&&(this.descent.project=new nV.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var u=0;u<this.nodes.length;u++){var l=this.nodes[u];l.fixed&&this.descent.locks.add(u,[l.x,l.y,l.z])}return this.descent.run(t),this},e.prototype.tick=function(){this.descent.locks.clear();for(var t=0;t<this.nodes.length;t++){var r=this.nodes[t];r.fixed&&this.descent.locks.add(t,[r.x,r.y,r.z])}return this.descent.rungeKutta()},e.dims=["x","y","z"],e.k=e.dims.length,e})();pi.Layout3D=aV;var uV=(function(){function e(){}return e.prototype.getSourceIndex=function(t){return t.source},e.prototype.getTargetIndex=function(t){return t.target},e.prototype.getLength=function(t){return t.length},e.prototype.setLength=function(t,r){t.length=r},e})()});var Ww=h(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var ol=en(),lV=nl();function cV(e,t,r,n){e.cola.start(0,0,0,10,!1);var i=fV(e.cola.nodes(),e.cola.groups(),r,n);return i.routeEdges(e.powerGraph.powerEdges,t,function(o){return o.source.routerNode.id},function(o){return o.target.routerNode.id})}ps.gridify=cV;function fV(e,t,r,n){e.forEach(function(o){o.routerNode={name:o.name,bounds:o.bounds.inflate(-r)}}),t.forEach(function(o){o.routerNode={bounds:o.bounds.inflate(-n),children:(typeof o.groups<"u"?o.groups.map(function(s){return e.length+s.id}):[]).concat(typeof o.leaves<"u"?o.leaves.map(function(s){return s.index}):[])}});var i=e.concat(t).map(function(o,s){return o.routerNode.id=s,o.routerNode});return new lV.GridRouter(i,{getChildren:function(o){return o.children},getBounds:function(o){return o.bounds}},r-n)}function hV(e,t,r){var n;e.nodes.forEach(function(a,u){return a.index=u}),new ol.Layout().avoidOverlaps(!1).nodes(e.nodes).links(e.links).powerGraphGroups(function(a){n=a,n.groups.forEach(function(u){return u.padding=r})});var i=e.nodes.length,o=[],s=e.nodes.slice(0);return s.forEach(function(a,u){return a.index=u}),n.groups.forEach(function(a){var u=a.index=a.id+i;s.push(a),typeof a.leaves<"u"&&a.leaves.forEach(function(l){return o.push({source:u,target:l.index})}),typeof a.groups<"u"&&a.groups.forEach(function(l){return o.push({source:u,target:l.id+i})})}
3),n.powerEdges.forEach(function(a){o.push({source:a.source.index,target:a.target.index})}),new ol.Layout().size(t).nodes(s).links(o).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new ol.Layout().convergenceThreshold(.001).size(t).avoidOverlaps(!0).nodes(e.nodes).links(e.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(a){n=a,n.groups.forEach(function(u){u.padding=r})}).start(50,0,100,0,!1),powerGraph:n}}ps.powerGraphGridLayout=hV});var Zw=h(ds=>{"use strict";function ge(e){for(var t in e)ds.hasOwnProperty(t)||(ds[t]=e[t])}Object.defineProperty(ds,"__esModule",{value:!0});ge(Vw());ge(Uw());ge(Ko());ge(Wu());ge(nl());ge(Zu());ge(en());ge(Xw());ge(Qo());ge(Lu());ge(ju());ge($u());ge(Jr());ge(ui());ge(ts());ge(Ww())});function ht(e,t){return t?e.superHighlight?t[e.data.type]?.superHl:e.isPinned?t[e.data.type]?.userSelect:e.primaryHighlight?t[e.data.type]?.primaryHl:e.secondaryHighlight?t[e.data.type]?.secondaryHl:t[e.data.type]?.default:""}var Gc=(()=>{class e{transform(r,n=3){let i=Math.pow(10,n);return r<i?`${r}`:`${i-1}+`}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275pipe=Nl({name:"numberTruncate",type:e,pure:!0})}}return e})();var bE=e=>[e];function wE(e,t){if(e&1&&(V(0,"div",0),F(1,"safehtml")),e&2){let r=S();T("innerHTML",G(1,2,t),bi)("ngClass",qe(4,bE,"size-"+r.size()))}}var Ft=(()=>{class e{constructor(){this.svg=ft(void 0),this.size=ft("normal")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-svg-icon"]],inputs:{svg:[1,"svg"],size:[1,"size"]},decls:1,vars:1,consts:[[3,"innerHTML","ngClass"]],template:function(n,i){if(n&1&&ie(0,wE,2,6,"div",0),n&2){let o;oe((o=i.svg())?0:-1,o)}},dependencies:[le,Si,Ni],styles:[`[_nghost-%COMP%]   div.size-normal[_ngcontent-%COMP%]     svg{width:16px;height:16px}[_nghost-%COMP%]   div.size-large[_ngcontent-%COMP%]     svg{width:24px;height:24px}
4/*# sourceMappingURL=svg-icon.component-QH5TO7EP.css.map */`],changeDetection:0})}}return e})();function EE(e,t){if(e&1&&(y(0,"li",7)(1,"div",8)(2,"mat-icon"),I(3,"arrow_right_alt"),E(),I(4),F(5,"transloco"),E(),y(6,"span",9),I(7),E()()),e&2){let r=t.$implicit,n=S(3);w(4),Fe(" ",G(5,2,"explorer.relations."+r.label)," "),w(3),Fe(" ",n.getNodeById(r.target).label," ")}}function CE(e,t){if(e&1&&(y(0,"ul",6),Se(1,EE,8,4,"li",7,Xe),E()),e&2){let r=S().$implicit,n=S();w(),Me(n.getEdgesForNode(r))}}function SE(e,t){if(e&1){let r=U();y(0,"div",0)(1,"div",1)(2,"div",2),N("click",function(){let i=A(r).$implicit,o=S();return P(o.detail.emit(i))}),V(3,"ex-svg-icon",3),y(4,"span",4),I(5),E()(),y(6,"button",5),N("click",function(){let i=A(r).$implicit,o=S();return P(o.removeNode.emit(i))}),y(7,"mat-icon"),I(8,"delete"),E()()(),ie(9,CE,3,0,"ul",6),E()}if(e&2){let r=t.$implicit,n=S();w(3),T("svg",n.getSvgIcon(r)),w(2),pe(r.label),w(4),oe(n.getEdgesForNode(r).length>0?9:-1)}}var Rc=(()=>{class e{constructor(){this.svg=R(ot),this.nodes=[],this.edges=[],this.removeNode=ir(),this.detail=ir()}getEdgesForNode(r){return this.edges.filter(n=>n.source===r.id)}getNodeById(r){return this.nodes.find(n=>n.id===r)}getSvgIcon(r){return ht(r,this.svg.data)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-adjacency-list"]],inputs:{nodes:"nodes",edges:"edges"},outputs:{removeNode:"removeNode",detail:"detail"},decls:3,vars:0,consts:[[1,"border-bottom"],[1,"p-2","flex","justify-between","items-center"],[1,"flex","items-center","gap-2","cursor-pointer",3,"click"],[3,"svg"],[1,"font-bold"],["mat-icon-button","","title","Smazat",3,"click"],[1,"p-3"],[1,"flex","items-center","gap-1"],[1,"flex","gap-1","items-center"],[1,"relation-destination-title","ml-1"]],template:function(n,i){n&1&&(y(0,"div"),Se(1,SE,10,3,"div",0,Xe),E()),n&2&&(w(),Me(i.nodes))},dependencies:[At,Nt,Ft,nt,Ot,qt,rt],styles:[`.adjacency-list-container[_ngcontent-%COMP%]{padding:16px}.adjacency-list[_ngcontent-%COMP%]{margin-bottom:16px}.adjacency-list[_ngcontent-%COMP%]:last-child{margin-bottom:0}.adjacency-list[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding:0;list-style-type:none}.adjacency-list[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;align-items:center;padding:8px;border-top:1px solid rgba(0,0,0,.06)}.adjacency-list[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   span.relation-destination-title[_ngcontent-%COMP%]{cursor:pointer;font-weight:700}
5/*# sourceMappingURL=adjacency-list.component-KXEUXFAG.css.map */`],changeDetection:0})}}return e})();var Vi="http://www.w3.org/1999/xhtml",Ds={svg:"http://www.w3.org/2000/svg",xhtml:Vi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pt(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Ds.hasOwnProperty(t)?{space:Ds[t],local:e}:e}function ME(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Vi&&t.documentElement.namespaceURI===Vi?t.createElement(e):t.createElementNS(r,e)}}function TE(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zi(e){var t=pt(e);return(t.local?TE:ME)(t)}function kE(){}function or(e){return e==null?kE:function(){return this.querySelector(e)}}function $c(e){typeof e!="function"&&(e=or(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],s=o.length,a=n[i]=new Array(s),u,l,c=0;c<s;++c)(u=o[c])&&(l=e.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),a[c]=l);return new se(n,this._parents)}function Ls(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function qE(){return[]}function pn(e){return e==null?qE:function(){return this.querySelectorAll(e)}}function OE(e){return function(){return Ls(e.apply(this,arguments))}}function Bc(e){typeof e=="function"?e=OE(e):e=pn(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var s=t[o],a=s.length,u,l=0;l<a;++l)(u=s[l])&&(n.push(e.call(u,u.__data__,l,s)),i.push(u));return new se(n,i)}function dn(e){return function(){return this.matches(e)}}function ji(e){return function(t){return t.matches(e)}}var NE=Array.prototype.find;function AE(e){return function(){return NE.call(this.children,e)}}function PE(){return this.firstElementChild}function Vc(e){return this.select(e==null?PE:AE(typeof e=="function"?e:ji(e)))}var IE=Array.prototype.filter;function DE(){return Array.from(this.children)}function LE(e){return function(){return IE.call(this.children,e)}}function zc(e){return this.selectAll(e==null?DE:LE(typeof e=="function"?e:ji(e)))}function jc(e){typeof e!="function"&&(e=dn(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],s=o.length,a=n[i]=[],u,l=0;l<s;++l)(u=o[l])&&e.call(u,u.__data__,l,o)&&a.push(u);return new se(n,this._parents)}function Hi(e){return new Array(e.length)}function Hc(){return new se(this._enter||this._groups.map(Hi),this._parents)}function mn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}mn.prototype={constructor:mn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Uc(e){return function(){return e}}function FE(e,t,r,n,i,o){for(var s=0,a,u=t.length,l=o.length;s<l;++s)(a=t[s])?(a.__data__=o[s],n[s]=a):r[s]=new mn(e,o[s]);for(;s<u;++s)(a=t[s])&&(i[s]=a)}function GE(e,t,r,n,i,o,s){var a,u,l=new Map,c=t.length,f=o.length,p=new Array(c),d;for(a=0;a<c;++a)(u=t[a])&&(p[a]=d=s.call(u,u.__data__,a,t)+"",l.has(d)?i[a]=u:l.set(d,u));for(a=0;a<f;++a)d=s.call(e,o[a],a,o)+"",(u=l.get(d))?(n[a]=u,u.__data__=o[a],l.delete(d)):r[a]=new mn(e,o[a]);for(a=0;a<c;++a)(u=t[a])&&l.get(p[a])===u&&(i[a]=u)}function RE(e){return e.__data__}function Yc(e,t){if(!arguments.length)return Array.from(this,RE);var r=t?GE:FE,n=this._parents,i=this._groups;typeof e!="function"&&(e=Uc(e));for(var o=i.length,s=new Array(o),a=new Array(o),u=new Array(o),l=0;l<o;++l){var c=n[l],f=i[l],p=f.length,d=$E(e.call(c,c&&c.__data__,l,n)),v=d.length,m=a[l]=new Array(v),g=s[l]=new Array(v),_=u[l]=new Array(p);r(c,f,m,g,_,d,t);for(var x=0,C=0,b,k;x<v;++x)if(b=m[x]){for(x>=C&&(C=x+1);!(k=g[C])&&++C<v;);b._next=k||null}}return s=new se(s,n),s._enter=a,s._exit=u,s}function $E(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Xc(){return new se(this._exit||this._groups.map(Hi),this._parents)}function Wc(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function Zc(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,s=Math.min(i,o),a=new Array(i),u=0;u<s;++u)for(var l=r[u],c=n[u],f=l.length,p=a[u]=new Array(f),d,v=0;v<f;++v)(d=l[v]||c[v])&&(p[v]=d);for(;u<i;++u)a[u]=r[u];return new se(a,this._parents)}function Qc(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],s;--i>=0;)(s=n[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function Kc(e){e||(e=BE);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var s=r[o],a=s.length,u=i[o]=new Array(a),l,c=0;c<a;++c)(l=s[c])&&(u[c]=l);u.sort(t)}return new se(i,this._parents).order()}function BE(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}
vendor: 7,112 bytes, line 5
5function Jc(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ef(){return Array.from(this)}function tf(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var s=n[i];if(s)return s}return null}function rf(){let e=0;for(let t of this)++e;return e}function nf(){return!this.node()}function of(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,s=i.length,a;o<s;++o)(a=i[o])&&e.call(a,a.__data__,o,i);return this}function VE(e){return function(){this.removeAttribute(e)}}function zE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function jE(e,t){return function(){this.setAttribute(e,t)}}function HE(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function UE(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function YE(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function sf(e,t){var r=pt(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?zE:VE:typeof t=="function"?r.local?YE:UE:r.local?HE:jE)(r,t))}function Ui(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function XE(e){return function(){this.style.removeProperty(e)}}function WE(e,t,r){return function(){this.style.setProperty(e,t,r)}}function ZE(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function af(e,t,r){return arguments.length>1?this.each((t==null?XE:typeof t=="function"?ZE:WE)(e,t,r??"")):Gt(this.node(),e)}function Gt(e,t){return e.style.getPropertyValue(t)||Ui(e).getComputedStyle(e,null).getPropertyValue(t)}function QE(e){return function(){delete this[e]}}function KE(e,t){return function(){this[e]=t}}function JE(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function uf(e,t){return arguments.length>1?this.each((t==null?QE:typeof t=="function"?JE:KE)(e,t)):this.node()[e]}function lf(e){return e.trim().split(/^|\s+/)}function Fs(e){return e.classList||new cf(e)}function cf(e){this._node=e,this._names=lf(e.getAttribute("class")||"")}cf.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ff(e,t){for(var r=Fs(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function hf(e,t){for(var r=Fs(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function eC(e){return function(){ff(this,e)}}function tC(e){return function(){hf(this,e)}}function rC(e,t){return function(){(t.apply(this,arguments)?ff:hf)(this,e)}}function pf(e,t){var r=lf(e+"");if(arguments.length<2){for(var n=Fs(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?rC:t?eC:tC)(r,t))}function nC(){this.textContent=""}function iC(e){return function(){this.textContent=e}}function oC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function df(e){return arguments.length?this.each(e==null?nC:(typeof e=="function"?oC:iC)(e)):this.node().textContent}function sC(){this.innerHTML=""}function aC(e){return function(){this.innerHTML=e}}function uC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function mf(e){return arguments.length?this.each(e==null?sC:(typeof e=="function"?uC:aC)(e)):this.node().innerHTML}function lC(){this.nextSibling&&this.parentNode.appendChild(this)}function gf(){return this.each(lC)}function cC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vf(){return this.each(cC)}function _f(e){var t=typeof e=="function"?e:zi(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fC(){return null}function yf(e,t){var r=typeof e=="function"?e:zi(e),n=t==null?fC:typeof t=="function"?t:or(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function hC(){var e=this.parentNode;e&&e.removeChild(this)}function xf(){return this.each(hC)}function pC(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function dC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function bf(e){return this.select(e?dC:pC)}function wf(e){return arguments.length?this.property("__data__",e):this.node().__data__}function mC(e){return function(t){e.call(this,t,this.__data__)}}function gC(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function vC(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function _C(e,t,r){return function(){var n=this.__on,i,o=mC(t);if(n){for(var s=0,a=n.length;s<a;++s)if((i=n[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function Ef(e,t,r){var n=gC(e+""),i,o=n.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,l=a.length,c;u<l;++u)for(i=0,c=a[u];i<o;++i)if((s=n[i]).type===c.type&&s.name===c.name)return c.value}return}for(a=t?_C:vC,i=0;i<o;++i)this.each(a(n[i],t,r));return this}function Cf(e,t,r){var n=Ui(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function yC(e,t){return function(){return Cf(this,e,t)}}function xC(e,t){return function(){return Cf(this,e,t.apply(this,arguments))}}function Sf(e,t){return this.each((typeof t=="function"?xC:yC)(e,t))}function*Mf(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,s;i<o;++i)(s=n[i])&&(yield s)}var Gs=[null];function se(e,t){this._groups=e,this._parents=t}function Tf(){return new se([[document.documentElement]],Gs)}function bC(){return this}se.prototype=Tf.prototype={constructor:se,select:$c,selectAll:Bc,selectChild:Vc,selectChildren:zc,filter:jc,data:Yc,enter:Hc,exit:Xc,join:Wc,merge:Zc,selection:bC,order:Qc,sort:Kc,call:Jc,nodes:ef,node:tf,size:rf,empty:nf,each:of,attr:sf,style:af,property:uf,classed:pf,text:df,html:mf,raise:gf,lower:vf,append:_f,insert:yf,remove:xf,clone:bf,datum:wf,on:Ef,dispatch:Sf,[Symbol.iterator]:Mf};var dt=Tf;function Yi(e){return typeof e=="string"?new se([[document.querySelector(e)]],[document.documentElement]):new se([[e]],Gs
5)}function sr(e){return function(){return e}}var Rs=Math.PI,$s=2*Rs,ar=1e-6,wC=$s-ar;function kf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function EC(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return kf;let r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}var ur=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?kf:EC(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,o,s){this._append`C${+t},${+r},${+n},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,u=n-t,l=i-r,c=s-t,f=a-r,p=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>ar)if(!(Math.abs(f*u-l*c)>ar)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let d=n-s,v=i-a,m=u*u+l*l,g=d*d+v*v,_=Math.sqrt(m),x=Math.sqrt(p),C=o*Math.tan((Rs-Math.acos((m+p-g)/(2*_*x)))/2),b=C/x,k=C/_;Math.abs(b-1)>ar&&this._append`L${t+b*c},${r+b*f}`,this._append`A${o},${o},0,0,${+(f*d>c*v)},${this._x1=t+k*u},${this._y1=r+k*l}`}}arc(t,r,n,i,o,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(i),u=n*Math.sin(i),l=t+a,c=r+u,f=1^s,p=s?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>ar||Math.abs(this._y1-c)>ar)&&this._append`L${l},${c}`,n&&(p<0&&(p=p%$s+$s),p>wC?this._append`A${n},${n},0,1,${f},${t-a},${r-u}A${n},${n},0,1,${f},${this._x1=l},${this._y1=c}`:p>ar&&this._append`A${n},${n},0,${+(p>=Rs)},${f},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function qf(){return new ur}qf.prototype=ur.prototype;function Of(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new ur(t)}var c9=Array.prototype.slice;function Nf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Af(e){this._context=e}Af.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Pf(e){return new Af(e)}function If(e){return e[0]}function Df(e){return e[1]}function Bs(e,t){var r=sr(!0),n=null,i=Pf,o=null,s=Of(a);e=typeof e=="function"?e:e===void 0?If:sr(e),t=typeof t=="function"?t:t===void 0?Df:sr(t);function a(u){var l,c=(u=Nf(u)).length,f,p=!1,d;for(n==null&&(o=i(d=s())),l=0;l<=c;++l)!(l<c&&r(f=u[l],l,u))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+e(f,l,u),+t(f,l,u));if(d)return o=null,d+""||null}return a.x=function(u){return arguments.length?(e=typeof u=="function"?u:sr(+u),a):e},a.y=function(u){return arguments.length?(t=typeof u=="function"?u:sr(+u),a):t},a.defined=function(u){return arguments.length?(r=typeof u=="function"?u:sr(!!u),a):r},a.curve=function(u){return arguments.length?(i=u,n!=null&&(o=i(n)),a):i},a.context=function(u){return arguments.length?(u==null?n=o=null:o=i(n=u),a):n},a}function Lf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Xi(e){this._context=e}Xi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Lf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Lf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ff(e,t){this._basis=new Xi(e),this._beta=t}Ff.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],o=e[r]-n,s=t[r]-i,a=-1,u;++a<=r;)u=a/r,this._basis.point(this._beta*e[a]+(1-this._beta)*(n+u*o),this._beta*t[a]+(1-this._beta)*(i+u*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Vs=(function e(t){function r(n){return t===1?new Xi(n):new Ff(n,t)}return r.beta=function(n){return e(+n)},r})(.85);function Wi(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Gf=Math.PI,M9=Gf/2;function gn(e){return(1-Math.cos(Gf*e))/2}var zs={};ws(zs,{dispatch:()=>Ar});var MC={value:()=>{}};function $f(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Zi(r)}function Zi(e){this._=e}function TC(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Zi.prototype=$f.prototype={constructor:Zi,on:function(e,t){var r=this._,n=TC(e+"",r),i,o=-1,s=n.length;if(arguments.length<2){for(;++o<s;)if((i=(e=n[o]).type)&&(i=kC(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=n[o]).type)r[i]=Rf(r[i],e.name,t);else if(t==null)for(i in r)r[i]=Rf(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Zi(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function kC(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function Rf(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=MC,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ar=$f;var Us={};ws(Us,{interval:()=>jf,now:()=>Rt,timeout:()=>bn,timer:()=>fr,timerFlush:()=>Hs});var Pr=0,_n=0,vn=0,Vf=1e3,Qi,yn,Ki=0,lr=0,Ji=0,xn=typeof performance=="object"&&performance.now?performance:Date,zf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Rt(){return lr||(zf(qC),lr=xn.now()+Ji)}function qC(){lr=0}function cr(){this._call=this._time=this._next=null}cr.prototype=fr.prototype={constructor:cr,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Rt():+r)+(t==null?0:+t),!this._next&&yn!==this&&(yn?yn._next=this:Qi=this,yn=this),this._call=e,this._time=r,js()},stop:function(){this._call&&(this._call=null,this._time=1/0,js())}};function fr(e,t,r){var n=new cr;return n.restart(e,t,r),n}function Hs(){Rt(),++Pr;for(var e=Qi,t;e;)(t=lr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pr}function Bf(){lr=(Ki=xn.now())+Ji,Pr=_n=0;try{Hs()}finally{Pr=0,NC(),lr=0}}function OC(){var e=xn.now(),t=e-Ki;t>Vf&&(Ji-=t,Ki=e)}function NC(){for(var e,t=Qi,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Qi=r);yn=e,js(n)}function js(e){if(!Pr){_n&&(_n=clearTimeout(_n));var t=e-lr;t>24?(e<1/0&&(_n=setTimeout(Bf,e-xn.now()-Ji)),vn&&(vn=clearInterval(vn))):(vn||(Ki=xn.now(),vn=setInterval(OC,Vf)),Pr=1,zf(Bf))}}function bn(e,t,r){var n=new cr;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}function jf(e,t,r){var n=new cr,i=t;return t==null?(n.restart(e,t,r),n):(n._restart=n.restart,n.restart=function(o,s,a){s=+s,a=a==null?Rt():+a,n._restart(function u(l){l+=i,n._restart(u,i+=s,a),o(l)},s,a)},n.restart(e,t,r),n)}var AC=Ar("start","end","cancel","interrupt"),PC=[],Yf=0,Hf=1,to=2,eo=3,Uf=4,ro=5,wn=6;function $t(e,t,r,n,i,o){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;IC(e,r,{name:t,index:n,group:i,on:AC,tween:PC,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Yf})}function En(e,t){var r=ce(e,t);if(r.state>Yf)throw new Error("too late; already scheduled");return r}function de(e,t){var r=ce(e,t);if(r.state>eo)throw new Error("too late; already running");return r}function ce(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function IC(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=fr(o,0,r.time);function o(l){r.state=Hf,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var c,f,p,d;if(r.state!==Hf)return u();for(c in n)if(d=n[c],d.name===r.name){if(d.state===eo)return bn(s);d.state===Uf?(d.state=wn,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete n[c]):+c<t&&(d.state=wn,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete n[c])}if(bn(function(){r.state===eo&&(r.state=Uf,r.timer.restart(a,r.delay,r.time),a(l))}),r.state=to,r.on.call("start",e,e.__data__,r.index,r.group),r.state===to){for(r.state=eo,i=new Array(p=r.tween.length),c=0,f=-1;c<p;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(i[
5++f]=d);i.length=f+1}}function a(l){for(var c=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(u),r.state=ro,1),f=-1,p=i.length;++f<p;)i[f].call(e,c);r.state===ro&&(r.on.call("end",e,e.__data__,r.index,r.group),u())}function u(){r.state=wn,r.timer.stop(),delete n[t];for(var l in n)return;delete e.__transition}}function Xf(e,t){var r=e.__transition,n,i,o=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((n=r[s]).name!==t){o=!1;continue}i=n.state>to&&n.state<ro,n.state=wn,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[s]}o&&delete e.__transition}}function Wf(e){return this.each(function(){Xf(this,e)})}function no(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ys(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Mn(){}var Cn=.7,so=1/Cn,Ir="\\s*([+-]?\\d+)\\s*",Sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",st="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",DC=/^#([0-9a-f]{3,8})$/,LC=new RegExp(`^rgb\\(${Ir},${Ir},${Ir}\\)$`),FC=new RegExp(`^rgb\\(${st},${st},${st}\\)$`),GC=new RegExp(`^rgba\\(${Ir},${Ir},${Ir},${Sn}\\)$`),RC=new RegExp(`^rgba\\(${st},${st},${st},${Sn}\\)$`),$C=new RegExp(`^hsl\\(${Sn},${st},${st}\\)$`),BC=new RegExp(`^hsla\\(${Sn},${st},${st},${Sn}\\)$`),Zf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};no(Mn,Bt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Qf,formatHex:Qf,formatHex8:VC,formatHsl:zC,formatRgb:Kf,toString:Kf});function Qf(){return this.rgb().formatHex()}function VC(){return this.rgb().formatHex8()}function zC(){return ih(this).formatHsl()}function Kf(){return this.rgb().formatRgb()}function Bt(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=DC.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Jf(t):r===3?new Ce(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?io(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?io(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=LC.exec(e))?new Ce(t[1],t[2],t[3],1):(t=FC.exec(e))?new Ce(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=GC.exec(e))?io(t[1],t[2],t[3],t[4]):(t=RC.exec(e))?io(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$C.exec(e))?rh(t[1],t[2]/100,t[3]/100,1):(t=BC.exec(e))?rh(t[1],t[2]/100,t[3]/100,t[4]):Zf.hasOwnProperty(e)?Jf(Zf[e]):e==="transparent"?new Ce(NaN,NaN,NaN,0):null}function Jf(e){return new Ce(e>>16&255,e>>8&255,e&255,1)}function io(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ce(e,t,r,n)}function jC(e){return e instanceof Mn||(e=Bt(e)),e?(e=e.rgb(),new Ce(e.r,e.g,e.b,e.opacity)):new Ce}function Dr(e,t,r,n){return arguments.length===1?jC(e):new Ce(e,t,r,n??1)}function Ce(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}no(Ce,Dr,Ys(Mn,{brighter(e){return e=e==null?so:Math.pow(so,e),new Ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Cn:Math.pow(Cn,e),new Ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ce(pr(this.r),pr(this.g),pr(this.b),ao(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:eh,formatHex:eh,formatHex8:HC,formatRgb:th,toString:th}));function eh(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}`}function HC(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}${hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function th(){let e=ao(this.opacity);return`${e===1?"rgb(":"rgba("}${pr(this.r)}, ${pr(this.g)}, ${pr(this.b)}${e===1?")":`, ${e})`}`}function ao(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hr(e){return e=pr(e),(e<16?"0":"")+e.toString(16)}function rh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new We(e,t,r,n)}function ih(e){if(e instanceof We)return new We(e.h,e.s,e.l,e.opacity);if(e instanceof Mn||(e=Bt(e)),!e)return new We;if(e instanceof We)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,a=o-i,u=(o+i)/2;return a?(t===o?s=(r-n)/a+(r<n)*6:r===o?s=(n-t)/a+2:s=(t-r)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new We(s,a,u,e.opacity)}function oh(e,t,r,n){return arguments.length===1?ih(e):new We(e,t,r,n??1)}function We(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}no(We,oh,Ys(Mn,{brighter(e){return e=e==null?so:Math.pow(so,e),new We(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Cn:Math.pow(Cn,e),new We(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ce(Xs(e>=240?e-240:e+120,i,n),Xs(e,i,n),Xs(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new We(nh(this.h),oo(this.s),oo(this.l),ao(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ao(this.opacity);return`${e===1?"hsl(":"hsla("}${nh(this.h)}, ${oo(this.s)*100}%, ${oo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function nh(e){return e=(e||0)%360,e<0?e+360:e}function oo(e){return Math.max(0,Math.min(1,e||0))}function Xs(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function Ws(e,t,r,n,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*r+(1+3*e+3*o-3*s)*n+s*i)/6}function sh(e){var t=e.length-1;
vendor: 10,874 bytes, line 5
5return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],s=n>0?e[n-1]:2*i-o,a=n<t-1?e[n+2]:2*o-i;return Ws((r-n/t)*t,s,i,o,a)}}function ah(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],s=e[(n+1)%t],a=e[(n+2)%t];return Ws((r-n/t)*t,i,o,s,a)}}var Zs=e=>()=>e;function UC(e,t){return function(r){return e+r*t}}function YC(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function uh(e){return(e=+e)==1?uo:function(t,r){return r-t?YC(t,r,e):Zs(isNaN(t)?r:t)}}function uo(e,t){var r=t-e;return r?UC(e,r):Zs(isNaN(e)?t:e)}var lo=(function e(t){var r=uh(t);function n(i,o){var s=r((i=Dr(i)).r,(o=Dr(o)).r),a=r(i.g,o.g),u=r(i.b,o.b),l=uo(i.opacity,o.opacity);return function(c){return i.r=s(c),i.g=a(c),i.b=u(c),i.opacity=l(c),i+""}}return n.gamma=e,n})(1);function lh(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),s,a;for(s=0;s<r;++s)a=Dr(t[s]),n[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return n=e(n),i=e(i),o=e(o),a.opacity=1,function(u){return a.r=n(u),a.g=i(u),a.b=o(u),a+""}}}var XC=lh(sh),WC=lh(ah);function $e(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ks=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qs=new RegExp(Ks.source,"g");function ZC(e){return function(){return e}}function QC(e){return function(t){return e(t)+""}}function Js(e,t){var r=Ks.lastIndex=Qs.lastIndex=0,n,i,o,s=-1,a=[],u=[];for(e=e+"",t=t+"";(n=Ks.exec(e))&&(i=Qs.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:$e(n,i)})),r=Qs.lastIndex;return r<t.length&&(o=t.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?u[0]?QC(u[0].x):ZC(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)a[(f=u[c]).i]=f.x(l);return a.join("")})}var ch=180/Math.PI,co={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ea(e,t,r,n,i,o){var s,a,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*r+t*n)&&(r-=e*u,n-=t*u),(a=Math.sqrt(r*r+n*n))&&(r/=a,n/=a,u/=a),e*n<t*r&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*ch,skewX:Math.atan(u)*ch,scaleX:s,scaleY:a}}var fo;function fh(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?co:ea(t.a,t.b,t.c,t.d,t.e,t.f)}function hh(e){return e==null?co:(fo||(fo=document.createElementNS("http://www.w3.org/2000/svg","g")),fo.setAttribute("transform",e),(e=fo.transform.baseVal.consolidate())?(e=e.matrix,ea(e.a,e.b,e.c,e.d,e.e,e.f)):co)}function ph(e,t,r,n){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,p,d,v){if(l!==f||c!==p){var m=d.push("translate(",null,t,null,r);v.push({i:m-4,x:$e(l,f)},{i:m-2,x:$e(c,p)})}else(f||p)&&d.push("translate("+f+t+p+r)}function s(l,c,f,p){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),p.push({i:f.push(i(f)+"rotate(",null,n)-2,x:$e(l,c)})):c&&f.push(i(f)+"rotate("+c+n)}function a(l,c,f,p){l!==c?p.push({i:f.push(i(f)+"skewX(",null,n)-2,x:$e(l,c)}):c&&f.push(i(f)+"skewX("+c+n)}function u(l,c,f,p,d,v){if(l!==f||c!==p){var m=d.push(i(d)+"scale(",null,",",null,")");v.push({i:m-4,x:$e(l,f)},{i:m-2,x:$e(c,p)})}else(f!==1||p!==1)&&d.push(i(d)+"scale("+f+","+p+")")}return function(l,c){var f=[],p=[];return l=e(l),c=e(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,p),s(l.rotate,c.rotate,f,p),a(l.skewX,c.skewX,f,p),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,p),l=c=null,function(d){for(var v=-1,m=p.length,g;++v<m;)f[(g=p[v]).i]=g.x(d);return f.join("")}}}var ta=ph(fh,"px, ","px)","deg)"),ra=ph(hh,", ",")",")");function KC(e,t){var r,n;return function(){var i=de(this,e),o=i.tween;if(o!==r){n=r=o;for(var s=0,a=n.length;s<a;++s)if(n[s].name===t){n=n.slice(),n.splice(s,1);break}}i.tween=n}}function JC(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=de(this,e),s=o.tween;if(s!==n){i=(n=s).slice();for(var a={name:t,value:r},u=0,l=i.length;u<l;++u)if(i[u].name===t){i[u]=a;break}u===l&&i.push(a)}o.tween=i}}function dh(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=ce(this.node(),r).tween,i=0,o=n.length,s;i<o;++i)if((s=n[i]).name===e)return s.value;return null}return this.each((t==null?KC:JC)(r,e,t))}function Lr(e,t,r){var n=e._id;return e.each(function(){var i=de(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return ce(i,n).value[t]}}function ho(e,t){var r;return(typeof t=="number"?$e:t instanceof Bt?lo:(r=Bt(t))?(t=r,lo):Js)(e,t)}function eS(e){return function(){this.removeAttribute(e)}}function tS(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rS(e,t,r){var n,i=r+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===n?o:o=t(n=s,r)}}function nS(e,t,r){var n,i=r+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===n?o:o=t(n=s,r)}}function iS(e,t,r){var n,i,o;return function(){var s,a=r(this),u;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=a+"",s===u?null:s===n&&u===i?o:(i=u,o=t(n=s,a)))}}function oS(e,t,r){var n,i,o;return function(){var s,a=r(this),u;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=a+"",s===u?null:s===n&&u===i?o:(i=u,o=t(n=s,a)))}}function mh(e,t){var r=pt(e),n=r==="transform"?ra:ho;return this.attrTween(e,typeof t=="function"?(r.local?oS:iS)(r,n,Lr(this,"attr."+e,t)):t==null?(r.local?tS:eS)(r):(r.local?nS:rS)(r,n,t))}function sS(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function aS(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function uS(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&aS(e,o)),r}return i._value=t,i}function lS(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&sS(e,o)),r}return i._value=t,i}function gh(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=pt(e);return this.tween(r,(n.local?uS:lS)(n,t))}function cS(e,t){return function(){En(this,e).delay=+t.apply(this,arguments)}}function fS(e,t){return t=+t,function(){En(this,e).delay=t}}function vh(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?cS:fS)(t,e)):ce(this.node(),t).delay}function hS(e,t){return function(){de(this,e).duration=+t.apply(this,arguments)}}function pS(e,t){return t=+t,function(){de(this,e).duration=t}}function _h(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?hS:pS)(t,e)):ce(this.node(),t).duration}function dS(e,t){if(typeof t!="function")throw new Error;return function(){de(this,e).ease=t}}function yh(e){var t=this._id;return arguments.length?this.each(dS(t,e)):ce(this.node(),t).ease}function mS(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;de(this,e).ease=r}}function xh(e){if(typeof e!="function")throw new Error;return this.each(mS(this._id,e))}function bh(e){typeof e!="function"&&(e=dn(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],s=o.length,a=n[i]=[],u,l=0;l<s;++l)(u=o[l])&&e.call(u,u.__data__,l,o)&&a.push(u);return new _e(n,this._parents,this._name,this._id)}function wh(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),s=new Array(n),a=0;a<o;++a)for(var u=t[a],l=r[a],c=u.length,f=s[a]=new Array(c),p,d=0;d<c;++d)(p=u[d]||l[d])&&(f[d]=p);for(;a<n;++a)s[a]=t[a];return new _e(s,this._parents,this._name,this._id)}function gS(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function vS(e,t,r){var n,i,o=gS(t)?En:de;return function(){var s=o(this,e),a=s.on;a!==n&&(i=(n=a).copy()).on(t,r),s.on=i}}function Eh(e,t){var r=this._id;return arguments.length<2?ce(this.node(),r).on.on(e):this.each(vS(r,e,t))}function _S(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Ch(){return this.on("end.remove",_S(this._id))}function Sh(e){var t=this._name,r=this._id;typeof e!="function"&&(e=or(e));for(var n=this._groups,i=n.length,o=new Array(i),s=0;s<i;++s)for(var a=n[s],u=a.length,l=o[s]=new Array(u),c,f,p=0;p<u;++p)(c=a[p])&&(f=e.call(c,c.__data__,p,a))&&("__data__"in c&&(f.__data__=c.__data__),l[p]=f,$t(l[p],t,r,p,l,ce(c,r)));return new _e(o,this._parents,t,r)}function Mh(e){var t=this._name,r=this._id;typeof e!="function"&&(e=pn(e));for(var n=this._groups,i=n.length,o=[],s=[],a=0;a<i;++a)for(var u=n[a],l=u.length,c,f=0;f<l;++f)if(c=u[f]){for(var p=e.call(c,c.__data__,f,u),d,v=ce(c,r),m=0,g=p.length;m<g;++m)(d=p[m])&&$t(d,t,r,m,p,v);o.push(p),s.push(c)}return new _e(o,s,t,r)}var yS=dt.prototype.constructor;function Th(){return new yS(this._groups,this._parents)}function xS(e,t){var r,n,i;return function(){var o=Gt(this,e),s=(this.style.removeProperty(e),Gt(this,e));return o===s?null:o===r&&s===n?i:i=t(r=o,n=s)}}function kh(e){return function(){this.style.removeProperty(e)}}function bS(e,t,r){var n,i=r+"",o;return function(){var s=Gt(this,e);return s===i?null:s===n?o:o=t(n=s,r)}}function wS(e,t,r){var n,i,o;return function(){var s=Gt(this,e),a=r(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(e),Gt(this,e))),s===u?null:s===n&&u===i?o:(i=u,o=t(n=s,a))}}function ES(e,t){var r,n,i,o="style."+t,s="end."+o,a;return function(){var u=de(this,e),l=u.on,c=u.value[o]==null?a||(a=kh(t)):void 0;(l!==r||i!==c)&&(n=(r=l).copy()).on(s,i=c),u.on=n}}function qh(e,t,r){var n=(e+="")=="transform"?ta:ho;return t==null?this.styleTween(e,xS(e,n)).on("end.style."+e,kh(e)):typeof t=="function"?this.styleTween(e,wS(e,n,Lr(this,"style."+e,t))).each(ES(this._id,e)):this.styleTween(e,bS(e,n,t),r).on("end.style."+e,null)}function CS(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function SS(e,t,r){var n,i;function o(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&CS(e,s,r)),n}return o._value=t,o}function Oh(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,SS(e,t,r??""))}function MS(e){return function(){this.textContent=e}}function TS(e){return function(){var t=e(this);this.textContent=t??""}}function Nh(e){return this.tween("text",typeof e=="function"?TS(Lr(this,"text",e)):MS(e==null?"":e+""))}function kS(e){return function(t){this.textContent=e.call(this,t)}}function qS(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&kS(i)),t}return n._value=e,n}function Ah(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,qS(e))}
5function Ph(){for(var e=this._name,t=this._id,r=po(),n=this._groups,i=n.length,o=0;o<i;++o)for(var s=n[o],a=s.length,u,l=0;l<a;++l)if(u=s[l]){var c=ce(u,t);$t(u,e,r,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new _e(n,this._parents,e,r)}function Ih(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,s){var a={value:s},u={value:function(){--i===0&&o()}};r.each(function(){var l=de(this,n),c=l.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),l.on=t}),i===0&&o()})}var OS=0;function _e(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Dh(e){return dt().transition(e)}function po(){return++OS}var mt=dt.prototype;_e.prototype=Dh.prototype={constructor:_e,select:Sh,selectAll:Mh,selectChild:mt.selectChild,selectChildren:mt.selectChildren,filter:bh,merge:wh,selection:Th,transition:Ph,call:mt.call,nodes:mt.nodes,node:mt.node,size:mt.size,empty:mt.empty,each:mt.each,on:Eh,attr:mh,attrTween:gh,style:qh,styleTween:Oh,text:Nh,textTween:Ah,remove:Ch,tween:dh,delay:vh,duration:_h,ease:yh,easeVarying:xh,end:Ih,[Symbol.iterator]:mt[Symbol.iterator]};var NS={time:null,delay:0,duration:250,ease:Wi};function AS(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Lh(e){var t,r;e instanceof _e?(t=e._id,e=e._name):(t=po(),(r=NS).time=Rt(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var s=n[o],a=s.length,u,l=0;l<a;++l)(u=s[l])&&$t(u,e,t,l,s,r||AS(u,t));return new _e(n,this._parents,e,t)}dt.prototype.interrupt=Wf;dt.prototype.transition=Lh;function Fh(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function Tn(e){return typeof e>"u"}function gt(e,t=0){return{a:1,c:0,e,b:0,d:1,f:t}}function vt(...e){e=Array.isArray(e[0])?e[0]:e;let t=(r,n)=>({a:r.a*n.a+r.c*n.b,c:r.a*n.c+r.c*n.d,e:r.a*n.e+r.c*n.f+r.e,b:r.b*n.a+r.d*n.b,d:r.b*n.c+r.d*n.d,f:r.b*n.e+r.d*n.f+r.f});switch(e.length){case 0:throw new Error("no matrices provided");case 1:return e[0];case 2:return t(e[0],e[1]);default:{let[r,n,...i]=e,o=t(r,n);return vt(o,...i)}}}var{cos:y7,sin:x7,PI:b7}=Math;function kn(e,t=void 0,r=void 0,n=void 0){Tn(t)&&(t=e);let i={a:e,c:0,e:0,b:0,d:t,f:0};return Tn(r)||Tn(n)?i:vt([gt(r,n),i,gt(-r,-n)])}var{tan:k7}=Math;function Gh(e){return PS(e)}function PS(e){return`matrix(${e.a},${e.b},${e.c},${e.d},${e.e},${e.f})`}function na(e,t=1e10){return{a:Math.round(e.a*t)/t,b:Math.round(e.b*t)/t,c:Math.round(e.c*t)/t,d:Math.round(e.d*t)/t,e:Math.round(e.e*t)/t,f:Math.round(e.f*t)/t}}function IS(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function mo(e,t,r,n){var i=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(i,mo.prototype),i.expected=t,i.found=r,i.location=n,i.name="SyntaxError",i}IS(mo,Error);function ia(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}mo.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r=null,n;for(n=0;n<e.length;n++)if(e[n].source===this.location.source){r=e[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,o=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+o.line+":"+o.column;if(r){var a=this.location.end,u=ia("",o.line.toString().length," "),l=r[i.line-1],c=i.line===a.line?a.column:l.length+1,f=c-i.column||1;t+=`
6 --> `+s+`
7`+u+` |
8`+o.line+" | "+l+`
9`+u+" | "+ia("",i.column-1," ")+ia("",f,"^")}else t+=`
10 at `+s}return t};mo.buildMessage=function(e,t){var r={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var c=l.parts.map(function(f){return Array.isArray(f)?o(f[0])+"-"+o(f[1]):o(f)});return"["+(l.inverted?"^":"")+c.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(l){return l.description}};function n(l){return l.charCodeAt(0).toString(16).toUpperCase()}function i(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+n(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+n(c)})}function o(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+n(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+n(c)})}function s(l){return r[l.type](l)}function a(l){var c=l.map(s),f,p;if(c.sort(),c.length>0){for(f=1,p=1;f<c.length;f++)c[f-1]!==c[f]&&(c[p]=c[f],p++);c.length=p}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function u(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+a(e)+" but "+u(t)+" found."};var Fr=class extends Map{constructor(t,r=GS){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(Rh(this,t))}has(t){return super.has(Rh(this,t))}set(t,r){return super.set(LS(this,t),r)}delete(t){return super.delete(FS(this,t))}};function Rh({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function LS({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function FS({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function GS(e){return e!==null&&typeof e=="object"?e.valueOf():e}function $h(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}
10var oa=Symbol("implicit");function qn(){var e=new Fr,t=[],r=[],n=oa;function i(o){let s=e.get(o);if(s===void 0){if(n!==oa)return n;e.set(o,s=t.push(o)-1)}return r[s%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Fr;for(let s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return qn(t,r).unknown(n)},$h.apply(i,arguments),i}var Kt=Es(F1(),1);var Iu={};ws(Iu,{forceCenter:()=>G1,forceCollide:()=>Yo,forceLink:()=>Xo,forceManyBody:()=>Zo,forceRadial:()=>aw,forceSimulation:()=>Wo,forceX:()=>uw,forceY:()=>lw});function G1(e,t){var r,n=1;e==null&&(e=0),t==null&&(t=0);function i(){var o,s=r.length,a,u=0,l=0;for(o=0;o<s;++o)a=r[o],u+=a.x,l+=a.y;for(u=(u/s-e)*n,l=(l/s-t)*n,o=0;o<s;++o)a=r[o],a.x-=u,a.y-=l}return i.initialize=function(o){r=o},i.x=function(o){return arguments.length?(e=+o,i):e},i.y=function(o){return arguments.length?(t=+o,i):t},i.strength=function(o){return arguments.length?(n=+o,i):n},i}function R1(e){let t=+this._x.call(null,e),r=+this._y.call(null,e);return $1(this.cover(t,r),t,r,e)}function $1(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o=e._root,s={data:n},a=e._x0,u=e._y0,l=e._x1,c=e._y1,f,p,d,v,m,g,_,x;if(!o)return e._root=s,e;for(;o.length;)if((m=t>=(f=(a+l)/2))?a=f:l=f,(g=r>=(p=(u+c)/2))?u=p:c=p,i=o,!(o=o[_=g<<1|m]))return i[_]=s,e;if(d=+e._x.call(null,o.data),v=+e._y.call(null,o.data),t===d&&r===v)return s.next=o,i?i[_]=s:e._root=s,e;do i=i?i[_]=new Array(4):e._root=new Array(4),(m=t>=(f=(a+l)/2))?a=f:l=f,(g=r>=(p=(u+c)/2))?u=p:c=p;while((_=g<<1|m)===(x=(v>=p)<<1|d>=f));return i[x]=o,i[_]=s,e}function B1(e){var t,r,n=e.length,i,o,s=new Array(n),a=new Array(n),u=1/0,l=1/0,c=-1/0,f=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(s[r]=i,a[r]=o,i<u&&(u=i),i>c&&(c=i),o<l&&(l=o),o>f&&(f=o));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),r=0;r<n;++r)$1(this,s[r],a[r],e[r]);return this}function V1(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var s=i-r||1,a=this._root,u,l;r>e||e>=i||n>t||t>=o;)switch(l=(t<n)<<1|e<r,u=new Array(4),u[l]=a,a=u,s*=2,l){case 0:i=r+s,o=n+s;break;case 1:r=i-s,o=n+s;break;case 2:i=r+s,n=o-s;break;case 3:r=i-s,n=o-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function z1(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function j1(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function he(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function H1(e,t,r){var n,i=this._x0,o=this._y0,s,a,u,l,c=this._x1,f=this._y1,p=[],d=this._root,v,m;for(d&&p.push(new he(d,i,o,c,f)),r==null?r=1/0:(i=e-r,o=t-r,c=e+r,f=t+r,r*=r);v=p.pop();)if(!(!(d=v.node)||(s=v.x0)>c||(a=v.y0)>f||(u=v.x1)<i||(l=v.y1)<o))if(d.length){var g=(s+u)/2,_=(a+l)/2;p.push(new he(d[3],g,_,u,l),new he(d[2],s,_,g,l),new he(d[1],g,a,u,_),new he(d[0],s,a,g,_)),(m=(t>=_)<<1|e>=g)&&(v=p[p.length-1],p[p.length-1]=p[p.length-1-m],p[p.length-1-m]=v)}else{var x=e-+this._x.call(null,d.data),C=t-+this._y.call(null,d.data),b=x*x+C*C;if(b<r){var k=Math.sqrt(r=b);i=e-k,o=t-k,c=e+k,f=t+k,n=d.data}}return n}function U1(e){if(isNaN(c=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,r=this._root,n,i,o,s=this._x0,a=this._y0,u=this._x1,l=this._y1,c,f,p,d,v,m,g,_;if(!r)return this;if(r.length)for(;;){if((v=c>=(p=(s+u)/2))?s=p:u=p,(m=f>=(d=(a+l)/2))?a=d:l=d,t=r,!(r=r[g=m<<1|v]))return this;if(!r.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(n=t,_=g)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,i?(o?i.next=o:delete i.next,this):t?(o?t[g]=o:delete t[g],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[_]=r:this._root=r),this):(this._root=o,this)}function Y1(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function X1(){return this._root}function W1(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Z1(e){var t=[],r,n=this._root,i,o,s,a,u;for(n&&t.push(new he(n,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(n=r.node,o=r.x0,s=r.y0,a=r.x1,u=r.y1)&&n.length){var l=(o+a)/2,c=(s+u)/2;(i=n[3])&&t.push(new he(i,l,c,a,u)),(i=n[2])&&t.push(new he(i,o,c,l,u)),(i=n[1])&&t.pu
vendor: 5,754 bytes, line 10
10sh(new he(i,l,s,a,c)),(i=n[0])&&t.push(new he(i,o,s,l,c))}return this}function Q1(e){var t=[],r=[],n;for(this._root&&t.push(new he(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var o,s=n.x0,a=n.y0,u=n.x1,l=n.y1,c=(s+u)/2,f=(a+l)/2;(o=i[0])&&t.push(new he(o,s,a,c,f)),(o=i[1])&&t.push(new he(o,c,a,u,f)),(o=i[2])&&t.push(new he(o,s,f,c,l)),(o=i[3])&&t.push(new he(o,c,f,u,l))}r.push(n)}for(;n=r.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}function K1(e){return e[0]}function J1(e){return arguments.length?(this._x=e,this):this._x}function ew(e){return e[1]}function tw(e){return arguments.length?(this._y=e,this):this._y}function Er(e,t,r){var n=new Pu(t??K1,r??ew,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function Pu(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function rw(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var xe=Er.prototype=Pu.prototype;xe.copy=function(){var e=new Pu(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,n;if(!t)return e;if(!t.length)return e._root=rw(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?r.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=rw(n));return e};xe.add=R1;xe.addAll=B1;xe.cover=V1;xe.data=z1;xe.extent=j1;xe.find=H1;xe.remove=U1;xe.removeAll=Y1;xe.root=X1;xe.size=W1;xe.visit=Z1;xe.visitAfter=Q1;xe.x=J1;xe.y=tw;function ee(e){return function(){return e}}function Qe(e){return(e()-.5)*1e-6}function J5(e){return e.x+e.vx}function e4(e){return e.y+e.vy}function Yo(e){var t,r,n,i=1,o=1;typeof e!="function"&&(e=ee(e==null?1:+e));function s(){for(var l,c=t.length,f,p,d,v,m,g,_=0;_<o;++_)for(f=Er(t,J5,e4).visitAfter(a),l=0;l<c;++l)p=t[l],m=r[p.index],g=m*m,d=p.x+p.vx,v=p.y+p.vy,f.visit(x);function x(C,b,k,O,L){var q=C.data,j=C.r,M=m+j;if(q){if(q.index>p.index){var D=d-q.x-q.vx,Y=v-q.y-q.vy,W=D*D+Y*Y;W<M*M&&(D===0&&(D=Qe(n),W+=D*D),Y===0&&(Y=Qe(n),W+=Y*Y),W=(M-(W=Math.sqrt(W)))/W*i,p.vx+=(D*=W)*(M=(j*=j)/(g+j)),p.vy+=(Y*=W)*M,q.vx-=D*(M=1-M),q.vy-=Y*M)}return}return b>d+M||O<d-M||k>v+M||L<v-M}}function a(l){if(l.data)return l.r=r[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(t){var l,c=t.length,f;for(r=new Array(c),l=0;l<c;++l)f=t[l],r[f.index]=+e(f,l,t)}}return s.initialize=function(l,c){t=l,n=c,u()},s.iterations=function(l){return arguments.length?(o=+l,s):o},s.strength=function(l){return arguments.length?(i=+l,s):i},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:ee(+l),u(),s):e},s}function t4(e){return e.index}function nw(e,t){var r=e.get(t);if(!r)throw new Error("node not found: "+t);return r}function Xo(e){var t=t4,r=f,n,i=ee(30),o,s,a,u,l,c=1;e==null&&(e=[]);function f(g){return 1/Math.min(a[g.source.index],a[g.target.index])}function p(g){for(var _=0,x=e.length;_<c;++_)for(var C=0,b,k,O,L,q,j,M;C<x;++C)b=e[C],k=b.source,O=b.target,L=O.x+O.vx-k.x-k.vx||Qe(l),q=O.y+O.vy-k.y-k.vy||Qe(l),j=Math.sqrt(L*L+q*q),j=(j-o[C])/j*g*n[C],L*=j,q*=j,O.vx-=L*(M=u[C]),O.vy-=q*M,k.vx+=L*(M=1-M),k.vy+=q*M}function d(){if(s){var g,_=s.length,x=e.length,C=new Map(s.map((k,O)=>[t(k,O,s),k])),b;for(g=0,a=new Array(_);g<x;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=nw(C,b.source)),typeof b.target!="object"&&(b.target=nw(C,b.target)),a[b.source.index]=(a[b.source.index]||0)+1,a[b.target.index]=(a[b.target.index]||0)+1;for(g=0,u=new Array(x);g<x;++g)b=e[g],u[g]=a[b.source.index]/(a[b.source.index]+a[b.target.index]);n=new Array(x),v(),o=new Array(x),m()}}function v(){if(s)for(var g=0,_=e.length;g<_;++g)n[g]=+r(e[g],g,e)}function m(){if(s)for(var g=0,_=e.length;g<_;++g)o[g]=+i(e[g],g,e)}return p.initialize=function(g,_){s=g,l=_,d()},p.links=function(g){return arguments.length?(e=g,d(),p):e},p.id=function(g){return arguments.length?(t=g,p):t},p.iterations=function(g){return arguments.length?(c=+g,p):c},p.strength=function(g){return arguments.length?(r=typeof g=="function"?g:ee(+g),v(),p):r},p.distance=function(g){return arguments.length?(i=typeof g=="function"?g:ee(+g),m(),p):i},p}function iw(){let e=1;return()=>(e=(1664525*e+1013904223)%4294967296)/4294967296}function ow(e){return e.x}function sw(e){return e.y}var r4=10,n4=Math.PI*(3-Math.sqrt(5));function Wo(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,s=.6,a=new Map,u=fr(f),l=Ar("tick","end"),c=iw();e==null&&(e=[]);function f(){p(),l.call("tick",t),r<n&&(u.stop(),l.call("end",t))}function p(m){var g,_=e.length,x;m===void 0&&(m=1);for(var C=0;C<m;++C)for(r+=(o-r)*i,a.forEach(function(b){b(r)}),g=0;g<_;++g)x=e[g],x.fx==null?x.x+=x.vx*=s:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=s:(x.y=x.fy,x.vy=0);return t}function d(){for(var m=0,g=e.length,_;m<g;++m){if(_=e[m],_.index=m,_.fx!=null&&(_.x=_.fx),_.fy!=null&&(_.y=_.fy),isNaN(_.x)||isNaN(_.y)){var x=r4*Math.sqrt(.5+m),C=m*n4;_.x=x*Math.cos(C),_.y=x*Math.sin(C)}(isNaN(_.vx)||isNaN(_.vy))&&(_.vx=_.vy=0)}}function v(m){return m.initialize&&m.initialize(e,c),m}return d(),t={tick:p,restart:function(){return u.restart(f),t},stop:function(){return u.stop(),t},nodes:function(m){return arguments.length?(e=m,d(),a.forEach(v),t):e},alpha:function(m){return arguments.length?(r=+m,t):r},alphaMin:function(m){return arguments.length?(n=+m,t):n},alphaDecay:function(m){return arguments.length?(i=+m,t):+i},alphaTarget:function(m){return arguments.length?(o=+m,t):o},velocityDecay:function(m){return arguments.length?(s=1-m,t):1-s},randomSource:function(m){return arguments.length?(c=m,a.forEach(v),t):c},force:function(m,g){return arguments.length>1?(g==null?a.delete(m):a.set(m,v(g)),t):a.get(m)},find:function(m,g,_){var x=0,C=e.length,b,k,O,L,q;for(_==null?_=1/0:_*=_,x=0;x<C;
10++x)L=e[x],b=m-L.x,k=g-L.y,O=b*b+k*k,O<_&&(q=L,_=O);return q},on:function(m,g){return arguments.length>1?(l.on(m,g),t):l.on(m)}}}function Zo(){var e,t,r,n,i=ee(-30),o,s=1,a=1/0,u=.81;function l(d){var v,m=e.length,g=Er(e,ow,sw).visitAfter(f);for(n=d,v=0;v<m;++v)t=e[v],g.visit(p)}function c(){if(e){var d,v=e.length,m;for(o=new Array(v),d=0;d<v;++d)m=e[d],o[m.index]=+i(m,d,e)}}function f(d){var v=0,m,g,_=0,x,C,b;if(d.length){for(x=C=b=0;b<4;++b)(m=d[b])&&(g=Math.abs(m.value))&&(v+=m.value,_+=g,x+=g*m.x,C+=g*m.y);d.x=x/_,d.y=C/_}else{m=d,m.x=m.data.x,m.y=m.data.y;do v+=o[m.data.index];while(m=m.next)}d.value=v}function p(d,v,m,g){if(!d.value)return!0;var _=d.x-t.x,x=d.y-t.y,C=g-v,b=_*_+x*x;if(C*C/u<b)return b<a&&(_===0&&(_=Qe(r),b+=_*_),x===0&&(x=Qe(r),b+=x*x),b<s&&(b=Math.sqrt(s*b)),t.vx+=_*d.value*n/b,t.vy+=x*d.value*n/b),!0;if(d.length||b>=a)return;(d.data!==t||d.next)&&(_===0&&(_=Qe(r),b+=_*_),x===0&&(x=Qe(r),b+=x*x),b<s&&(b=Math.sqrt(s*b)));do d.data!==t&&(C=o[d.data.index]*n/b,t.vx+=_*C,t.vy+=x*C);while(d=d.next)}return l.initialize=function(d,v){e=d,r=v,c()},l.strength=function(d){return arguments.length?(i=typeof d=="function"?d:ee(+d),c(),l):i},l.distanceMin=function(d){return arguments.length?(s=d*d,l):Math.sqrt(s)},l.distanceMax=function(d){return arguments.length?(a=d*d,l):Math.sqrt(a)},l.theta=function(d){return arguments.length?(u=d*d,l):Math.sqrt(u)},l}function aw(e,t,r){var n,i=ee(.1),o,s;typeof e!="function"&&(e=ee(+e)),t==null&&(t=0),r==null&&(r=0);function a(l){for(var c=0,f=n.length;c<f;++c){var p=n[c],d=p.x-t||1e-6,v=p.y-r||1e-6,m=Math.sqrt(d*d+v*v),g=(s[c]-m)*o[c]*l/m;p.vx+=d*g,p.vy+=v*g}}function u(){if(n){var l,c=n.length;for(o=new Array(c),s=new Array(c),l=0;l<c;++l)s[l]=+e(n[l],l,n),o[l]=isNaN(s[l])?0:+i(n[l],l,n)}}return a.initialize=function(l){n=l,u()},a.strength=function(l){return arguments.length?(i=typeof l=="function"?l:ee(+l),u(),a):i},a.radius=function(l){return arguments.length?(e=typeof l=="function"?l:ee(+l),u(),a):e},a.x=function(l){return arguments.length?(t=+l,a):t},a.y=function(l){return arguments.length?(r=+l,a):r},a}function uw(e){var t=ee(.1),r,n,i;typeof e!="function"&&(e=ee(e==null?0:+e));function o(a){for(var u=0,l=r.length,c;u<l;++u)c=r[u],c.vx+=(i[u]-c.x)*n[u]*a}function s(){if(r){var a,u=r.length;for(n=new Array(u),i=new Array(u),a=0;a<u;++a)n[a]=isNaN(i[a]=+e(r[a],a,r))?0:+t(r[a],a,r)}}return o.initialize=function(a){r=a,s()},o.strength=function(a){return arguments.length?(t=typeof a=="function"?a:ee(+a),s(),o):t},o.x=function(a){return arguments.length?(e=typeof a=="function"?a:ee(+a),s(),o):e},o}function lw(e){var t=ee(.1),r,n,i;typeof e!="function"&&(e=ee(e==null?0:+e));function o(a){for(var u=0,l=r.length,c;u<l;++u)c=r[u],c.vy+=(i[u]-c.y)*n[u]*a}function s(){if(r){var a,u=r.length;for(n=new Array(u),i=new Array(u),a=0;a<u;++a)n[a]=isNaN(i[a]=+e(r[a],a,r))?0:+t(r[a],a,r)}}return o.initialize=function(a){r=a,s()},o.strength=function(a){return arguments.length?(t=typeof a=="function"?a:ee(+a),s(),o):t},o.y=function(a){return arguments.length?(e=typeof a=="function"?a:ee(+a),s(),o):e},o}var nE=Es(Zw(),1);var pV=["linkTemplate"],dV=["nodeTemplate"],mV=["clusterTemplate"],gV=["defsTemplate"],vV=["miniMapNodeTemplate"],_V=["nodeElement"],yV=["linkElement"],xV=["*"],sn=e=>({$implicit:e});function bV(e,t){if(e&1&&(Z(),Tt(0,19)),e&2){let r=S(2);T("ngTemplateOutlet",r.defsTemplate)}}function wV(e,t){if(e&1&&(Z(),V(0,"path",20)),e&2){let r=t.$implicit;te("d",r.textPath)("id",r.id)}}function EV(e,t){if(e&1&&(Z(),Tt(0,24)),e&2){let r=S().$implicit,n=S(2);T("ngTemplateOutlet",n.clusterTemplate)("ngTemplateOutletContext",qe(2,sn,r))}}function CV(e,t){if(e&1&&(Z(),y(0,"g",25),V(1,"rect"),y(2,"text",26),I(3),E()()),e&2){let r=S().$implicit;w(),te("width",r.dimension.width)("height",r.dimension.height)("fill",r.data==null?null:r.data.color),w(),te("x",10)("y",r.dimension.height/2),w(),Fe(" ",r.label," ")}}function SV(e,t){if(e&1){let r=U();Z(),y(0,"g",21,1),N("click",function(){let i=A(r).$implicit,o=S(2);return P(o.onClick(i))}),re(2,EV,1,4,"ng-container",22)(3,CV,4,6,"g",23),E()}if(e&2){let r=t.$implicit,n=S(2);Le("old-node",n.animate&&n.oldClusters.has(r.id)),T("id",r.id),te("transform",r.transform),w(2),T("ngIf",n.clusterTemplate&&!r.hidden),w(),T("ngIf",!n.clusterTemplate)}}function MV(e,t){if(e&1&&(Z(),Tt(0,24)),e&2){let r=S().$implicit,n=S(2);T("ngTemplateOutlet",n.nodeTemplate)("ngTemplateOutletContext",qe(2,sn,r))}}function TV(e,t){if(e&1&&(Z(),y(0,"g",29),V(1,"rect"),y(2,"text",26),I(3),E()()),e&2){let r=S().$implicit;w(),te("width",r.dimension.width)("height",r.dimension.height)("fill",r.data==null?null:r.data.color),w(),te("x",10)("y",r.dimension.height/2),w(),Fe(" ",r.label," ")}}function kV(e,t){if(e&1){let r=U();Z(),y(0,"g",27,2),N("click",function(){let i=A(r).$implicit,o=S(2);return P(o.onClick(i))})("mousedown",function(i){let o=A(r).$implicit,s=S(2);return P(s.onNodeMouseDown(i,o))}),re(2,MV,1,4,"ng-container",22)(3,TV,4,6,"g",28),E()}if(e&2){let r=t.$implicit,n=S(2);Le("old-node",n.animate&&n.oldCompoundNodes.has(r.id)),T("id",r.id),te("transform",r.transform),w(2),T("ngIf",n.nodeTemplate&&!r.hidden),w(),T("ngIf",!n.nodeTemplate)}}function qV(e,t){if(e&1&&(Z(),Tt(0,24)),e&2){let r=S().$implicit,n=S(2);T("ngTemplateOutlet",n.linkTemplate)("ngTemplateOutletContext",qe(2,sn,r))}}function OV(e,t){if(e&1&&(Z(),V(0,"path",32)),e&2){let r=S().$implicit;te("d",r.line)}}function NV(e,t){if(e&1&&(Z(),y(0,"g",30,3),re(2,qV,1,4,"ng-container",22)(3,OV,1,1,"path",31),E()),e&2){let r=t.$implicit,n=S(2);T("id",r.id),w(2),T("ngIf",n.linkTemplate),w(),T("ngIf",!n.linkTemplate)}}function AV(e,t){if(e&1&&(Z(),Tt(0,24)),e&2){let r=S().$implicit,n=S(2);T("ngTemplateOutlet",n.nodeTemplate)("ngTemplateOutletContext",qe(2,sn,r))}}function PV(e,t){if(e&1&&(Z(),V(0,"circle",34)),e&2){let r=S().$implicit;te("cx",r.dimension.width/2)("cy",r.dimension.height/2)("fill",r.data==null?null:r.data.color)}}function IV(e,t){if(e&1){let r=U();Z(),y(0,"g",27,2),N("click",function(){let i=A(r).$implicit,o=S(2);return P(o.onClick(i))})("mousedown",function(i){let o=A(r).$implicit,s=S(2);return P(s.onNodeMouseDown(i,o))}),re(2,AV,1,4,"ng-container",22)(3,PV,1,3,"circle",33),E()}if(e&2){let r=t.$implicit,n=S(2);Le("old-node",n.animate&&n.oldNodes.has(r.id)),T("id",r.id),te("transform",r.transform),w(2),T("ngIf",n.nodeTemplate&&!r.hidden),w(),T("ngIf",!n.nodeTemplate)}}function DV(e,t){if(e&1){let r=U();Z(),y(0,"g",8),N("touchstart",function(i){A(r);let o=S();return P(o.onTouchStart(i))})("touchend",function(){A(r);let i=S();return P(i.onTouchEnd())}
10),y(1,"defs"),re(2,bV,1,1,"ng-container",9)(3,wV,1,2,"path",10),E(),y(4,"rect",11),N("mousedown",function(){A(r);let i=S();return P(i.isPanning=!0)}),E(),Pl(5),y(6,"g",12),re(7,SV,4,6,"g",13),E(),y(8,"g",14),re(9,kV,4,6,"g",15),E(),y(10,"g",16),re(11,NV,4,3,"g",17),E(),y(12,"g",18,0),re(14,IV,4,6,"g",15),E()()}if(e&2){let r=S();te("transform",r.transform),w(2),T("ngIf",r.defsTemplate),w(),T("ngForOf",r.graph.edges),w(),te("width",r.dims.width*100)("height",r.dims.height*100)("transform","translate("+(-r.dims.width||0)*50+","+(-r.dims.height||0)*50+")"),w(3),T("ngForOf",r.graph.clusters)("ngForTrackBy",r.trackNodeBy),w(2),T("ngForOf",r.graph.compoundNodes)("ngForTrackBy",r.trackNodeBy),w(2),T("ngForOf",r.graph.edges)("ngForTrackBy",r.trackLinkBy),w(3),T("ngForOf",r.graph.nodes)("ngForTrackBy",r.trackNodeBy)}}function LV(e,t){if(e&1&&(Z(),Tt(0,24)),e&2){let r=S().$implicit,n=S(2);T("ngTemplateOutlet",n.miniMapNodeTemplate)("ngTemplateOutletContext",qe(2,sn,r))}}function FV(e,t){if(e&1&&(Z(),Tt(0,24)),e&2){let r=S().$implicit,n=S(2);T("ngTemplateOutlet",n.nodeTemplate)("ngTemplateOutletContext",qe(2,sn,r))}}function GV(e,t){if(e&1&&(Z(),V(0,"circle",34)),e&2){let r=S().$implicit,n=S(2);te("cx",r.dimension.width/2/n.minimapScaleCoefficient)("cy",r.dimension.height/2/n.minimapScaleCoefficient)("fill",r.data==null?null:r.data.color)}}function RV(e,t){if(e&1&&(Z(),y(0,"g",40,2),re(2,LV,1,4,"ng-container",22)(3,FV,1,4,"ng-container",22)(4,GV,1,3,"circle",33),E()),e&2){let r=t.$implicit,n=S(2);Le("old-node",n.animate&&n.oldNodes.has(r.id)),T("id",r.id),te("transform",r.transform),w(2),T("ngIf",n.miniMapNodeTemplate),w(),T("ngIf",!n.miniMapNodeTemplate&&n.nodeTemplate),w(),T("ngIf",!n.nodeTemplate&&!n.miniMapNodeTemplate)}}function $V(e,t){if(e&1){let r=U();Z(),y(0,"g",35)(1,"rect",36),N("mousedown",function(i){A(r);let o=S();return P(o.onMinimapPanTo(i))}),E(),y(2,"g")(3,"g",37),re(4,RV,5,7,"g",38),E(),y(5,"rect",39),N("mousedown",function(){A(r);let i=S();return P(i.onMinimapDragMouseDown())}),E()()()}if(e&2){let r=S();te("transform",r.minimapTransform)("clip-path","url(#"+r.minimapClipPathId+")"),w(),te("width",r.graphDims.width/r.minimapScaleCoefficient)("height",r.graphDims.height/r.minimapScaleCoefficient),w(),qr("transform","translate("+-r.minimapOffsetX/r.minimapScaleCoefficient+"px,"+-r.minimapOffsetY/r.minimapScaleCoefficient+"px)"),w(),qr("transform","scale("+1/r.minimapScaleCoefficient+")"),w(),T("ngForOf",r.graph.nodes)("ngForTrackBy",r.trackNodeBy),w(),Le("panning",r.isMinimapPanning),te("transform","translate("+r.panOffsetX/r.zoomLevel/-r.minimapScaleCoefficient+","+r.panOffsetY/r.zoomLevel/-r.minimapScaleCoefficient+")")("width",r.width/r.minimapScaleCoefficient/r.zoomLevel)("height",r.height/r.minimapScaleCoefficient/r.zoomLevel)}}var Qw={};function St(){let e=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return e=`a${e}`,Qw[e]?St():(Qw[e]=!0,e)}var ms=(function(e){return e.Both="both",e.Horizontal="horizontal",e.Vertical="vertical",e})(ms||{}),gs=(function(e){return e.UpperLeft="UpperLeft",e.UpperRight="UpperRight",e})(gs||{});function BV(e,t,r,n){n=n||{};let i,o,s=null,a=0;function u(){a=n.leading===!1?0:+new Date,s=null,o=t.apply(e,i)}return function(...l){let c=+new Date;!a&&n.leading===!1&&(a=c);let f=r-(c-a);return i=l,f<=0?(clearTimeout(s),s=null,a=c,o=t.apply(e,i)):!s&&n.trailing!==!1&&(s=setTimeout(u,f)),o}}function VV(e,t){return function(n,i,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,i,{configurable:!0,enumerable:o.enumerable,value:BV(this,o.value,e,t)}),this[i]}}}}var Kw=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}],sl=class{scale;colorDomain;domain;customColors;constructor(t,r,n){typeof t=="string"&&(t=Kw.find(i=>i.name===t)),this.colorDomain=t.domain,this.domain=r,this.customColors=n,this.scale=this.generateColorScheme(t,this.domain)}generateColorScheme(t,r){return typeof t=="string"&&(t=Kw.find(n=>n.name===t)),qn().range(t.domain).domain(r)}getColor(t){if(t==null)throw new Error("Value can not be null");if(typeof this.customColors=="function")return this.customColors(t);let r=t.toString(),n;return this.customColors&&this.customColors.length>0&&(n=this.customColors.find(i=>i.name.toLowerCase()===r.toLowerCase())),n?n.value:this.scale(t)}};function Jw({width:e,height:t}){let r=e,n=t;return r=Math.max(0,r),n=Math.max(0,n),{width:Math.floor(r),height:Math.floor(n)}}var zV=(()=>{class e{element;zone;visible=new tt;timeout;isVisible=!1;constructor(r,n){this.element=r,this.zone=n,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){let r=()=>{if(!this.element)return;let{offsetHeight:n,offsetWidth:i}=this.element.nativeElement;n&&i?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>r(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>r())})}static \u0275fac=function(n){return new(n||e)(nr(Ts),nr(fn))};static \u0275dir=qs({type:e,selectors:[["visibility-observer"]],outputs:{visible:"visible"},standalone:!1})}return e})(),vs=(function(e){return e.LEFT_TO_RIGHT="LR",e.RIGHT_TO_LEFT="RL",e.TOP_TO_BOTTOM="TB",e.BOTTOM_TO_TOM="BT",e})(vs||{});var al=class{defaultSettings={orientation:vs.LEFT_TO_RIGHT,marginX:20,marginY:20,edgePadding:100,rankPadding:100,nodePadding:50,multigraph:!0,compound:!0};settings={};dagreGraph;dagreNodes;dagreEdges;run(t){this.createDagreGraph(t),Kt.layout(this.dagreGraph),t.edgeLabels=this.dagreGraph._edgeLabels;for(let r in this.dagreGraph._nodes){let n=this.dagreGraph._nodes[r],i=t.nodes.find(o=>o.id===n.id);i.position={x:n.x,y:n.y},i.dimension={width:n.width,height:n.height}}return t}updateEdge(t,r){let n=t.nodes.find(u=>u.id===r.source),i=t.nodes.find(u=>u.id===r.target),o=n.position.y<=i.position.y?-1:1,s={x:n.position.x,y:n.position.y-o*(n.dimension.height/2)},a={x:i.position.x,y:i.position.y+o*(i.dimension.height/2)};return r.points=[s,a],t}createDagreGraph(t){let r=Object.assign({},this.defaultSettings,this.settings);this.dagreGraph=new Kt.graphlib.Graph({compound:r.compound,multigraph:r.multigraph}),this.dagreGraph.setGraph({rankdir:r.orientation,marginx:r.marginX,marginy:r.marginY,edgesep:r.edgePadding,ranksep:r.rankPadding,nodesep:r.nodePadding,align:r.align,acycl
10icer:r.acyclicer,ranker:r.ranker,multigraph:r.multigraph,compound:r.compound}),this.dagreGraph.setDefaultEdgeLabel(()=>({})),this.dagreNodes=t.nodes.map(n=>{let i=Object.assign({},n);return i.width=n.dimension.width,i.height=n.dimension.height,i.x=n.position.x,i.y=n.position.y,i}),this.dagreEdges=t.edges.map(n=>{let i=Object.assign({},n);return i.id||(i.id=St()),i});for(let n of this.dagreNodes)n.width||(n.width=20),n.height||(n.height=30),this.dagreGraph.setNode(n.id,n);for(let n of this.dagreEdges)r.multigraph?this.dagreGraph.setEdge(n.source,n.target,n,n.id):this.dagreGraph.setEdge(n.source,n.target);return this.dagreGraph}},ul=class{defaultSettings={orientation:vs.LEFT_TO_RIGHT,marginX:20,marginY:20,edgePadding:100,rankPadding:100,nodePadding:50,multigraph:!0,compound:!0};settings={};dagreGraph;dagreNodes;dagreClusters;dagreEdges;run(t){this.createDagreGraph(t),Kt.layout(this.dagreGraph),t.edgeLabels=this.dagreGraph._edgeLabels;let r=n=>{let i=this.dagreGraph._nodes[n.id];return et(ve({},n),{position:{x:i.x,y:i.y},dimension:{width:i.width,height:i.height}})};return t.clusters=(t.clusters||[]).map(r),t.nodes=t.nodes.map(r),t}updateEdge(t,r){let n=t.nodes.find(u=>u.id===r.source),i=t.nodes.find(u=>u.id===r.target),o=n.position.y<=i.position.y?-1:1,s={x:n.position.x,y:n.position.y-o*(n.dimension.height/2)},a={x:i.position.x,y:i.position.y+o*(i.dimension.height/2)};return r.points=[s,a],t}createDagreGraph(t){let r=Object.assign({},this.defaultSettings,this.settings);this.dagreGraph=new Kt.graphlib.Graph({compound:r.compound,multigraph:r.multigraph}),this.dagreGraph.setGraph({rankdir:r.orientation,marginx:r.marginX,marginy:r.marginY,edgesep:r.edgePadding,ranksep:r.rankPadding,nodesep:r.nodePadding,align:r.align,acyclicer:r.acyclicer,ranker:r.ranker,multigraph:r.multigraph,compound:r.compound}),this.dagreGraph.setDefaultEdgeLabel(()=>({})),this.dagreNodes=t.nodes.map(n=>{let i=Object.assign({},n);return i.width=n.dimension.width,i.height=n.dimension.height,i.x=n.position.x,i.y=n.position.y,i}),this.dagreClusters=t.clusters||[],this.dagreEdges=t.edges.map(n=>{let i=Object.assign({},n);return i.id||(i.id=St()),i});for(let n of this.dagreNodes)this.dagreGraph.setNode(n.id,n);for(let n of this.dagreClusters)this.dagreGraph.setNode(n.id,n),n.childNodeIds.forEach(i=>{this.dagreGraph.setParent(i,n.id)});for(let n of this.dagreEdges)r.multigraph?this.dagreGraph.setEdge(n.source,n.target,n,n.id):this.dagreGraph.setEdge(n.source,n.target);return this.dagreGraph}},jV="\0";var eE="�",mi=class{defaultSettings={orientation:vs.LEFT_TO_RIGHT,marginX:20,marginY:20,edgePadding:100,rankPadding:100,nodePadding:50,curveDistance:20,multigraph:!0,compound:!0};settings={};dagreGraph;dagreNodes;dagreEdges;run(t){this.createDagreGraph(t),Kt.layout(this.dagreGraph),t.edgeLabels=this.dagreGraph._edgeLabels;for(let r in this.dagreGraph._nodes){let n=this.dagreGraph._nodes[r],i=t.nodes.find(o=>o.id===n.id);i.position={x:n.x,y:n.y},i.dimension={width:n.width,height:n.height}}for(let r of t.edges)this.updateEdge(t,r);return t}updateEdge(t,r){let n=t.nodes.find(v=>v.id===r.source),i=t.nodes.find(v=>v.id===r.target),o=this.settings.orientation==="BT"||this.settings.orientation==="TB"?"y":"x",s=o==="y"?"x":"y",a=o==="y"?"height":"width",u=n.position[o]<=i.position[o]?-1:1,l={[s]:n.position[s],[o]:n.position[o]-u*(n.dimension[a]/2)},c={[s]:i.position[s],[o]:i.position[o]+u*(i.dimension[a]/2)},f=this.settings.curveDistance||this.defaultSettings.curveDistance;r.points=[l,{[s]:l[s],[o]:l[o]-u*f},{[s]:c[s],[o]:c[o]+u*f},c];let p=`${r.source}${eE}${r.target}${eE}${jV}`,d=t.edgeLabels[p];return d&&(d.points=r.points),t}createDagreGraph(t){let r=Object.assign({},this.defaultSettings,this.settings);this.dagreGraph=new Kt.graphlib.Graph({compound:r.compound,multigraph:r.multigraph}),this.dagreGraph.setGraph({rankdir:r.orientation,marginx:r.marginX,marginy:r.marginY,edgesep:r.edgePadding,ranksep:r.rankPadding,nodesep:r.nodePadding,align:r.align,acyclicer:r.acyclicer,ranker:r.ranker,multigraph:r.multigraph,compound:r.compound}),this.dagreGraph.setDefaultEdgeLabel(()=>({})),this.dagreNodes=t.nodes.map(n=>{let i=Object.assign({},n);return i.width=n.dimension.width,i.height=n.dimension.height,i.x=n.position.x,i.y=n.position.y,i}),this.dagreEdges=t.edges.map(n=>{let i=Object.assign({},n);return i.id||(i.id=St()),i});for(let n of this.dagreNodes)n.width||(n.width=20),n.height||(n.height=30),this.dagreGraph.setNode(n.id,n);for(let n of this.dagreEdges)r.multigraph?this.dagreGraph.setEdge(n.source,n.target,n,n.id):this.dagreGraph.setEdge(n.source,n.target);return this.dagreGraph}};function on(e){return typeof e=="string"?{id:e,x:0,y:0}:e}var ll=class{defaultSettings={force:Wo().force("charge",Zo().strength(-150)).force("collide",Yo(5)),forceLink:Xo().id(t=>
10t.id).distance(()=>100)};settings={};inputGraph;outputGraph;d3Graph;outputGraph$=new _i;draggingStart;run(t){return this.inputGraph=t,this.d3Graph={nodes:[...this.inputGraph.nodes.map(r=>ve({},r))],edges:[...this.inputGraph.edges.map(r=>ve({},r))]},this.outputGraph={nodes:[],edges:[],edgeLabels:[]},this.outputGraph$.next(this.outputGraph),this.settings=Object.assign({},this.defaultSettings,this.settings),this.settings.force&&this.settings.force.nodes(this.d3Graph.nodes).force("link",this.settings.forceLink.links(this.d3Graph.edges)).alpha(.5).restart().on("tick",()=>{this.outputGraph$.next(this.d3GraphToOutputGraph(this.d3Graph))}),this.outputGraph$.asObservable()}updateEdge(t,r){let n=Object.assign({},this.defaultSettings,this.settings);return n.force&&n.force.nodes(this.d3Graph.nodes).force("link",n.forceLink.links(this.d3Graph.edges)).alpha(.5).restart().on("tick",()=>{this.outputGraph$.next(this.d3GraphToOutputGraph(this.d3Graph))}),this.outputGraph$.asObservable()}d3GraphToOutputGraph(t){return this.outputGraph.nodes=this.d3Graph.nodes.map(r=>et(ve({},r),{id:r.id||St(),position:{x:r.x,y:r.y},dimension:{width:r.dimension&&r.dimension.width||20,height:r.dimension&&r.dimension.height||20},transform:`translate(${r.x-(r.dimension&&r.dimension.width||20)/2||0}, ${r.y-(r.dimension&&r.dimension.height||20)/2||0})`})),this.outputGraph.edges=this.d3Graph.edges.map(r=>et(ve({},r),{source:on(r.source).id,target:on(r.target).id,points:[{x:on(r.source).x,y:on(r.source).y},{x:on(r.target).x,y:on(r.target).y}]})),this.outputGraph.edgeLabels=this.outputGraph.edges,this.outputGraph}onDragStart(t,r){this.settings.force.alphaTarget(.3).restart();let n=this.d3Graph.nodes.find(i=>i.id===t.id);n&&(this.draggingStart={x:r.x-n.x,y:r.y-n.y},n.fx=r.x-this.draggingStart.x,n.fy=r.y-this.draggingStart.y)}onDrag(t,r){if(!t)return;let n=this.d3Graph.nodes.find(i=>i.id===t.id);n&&(n.fx=r.x-this.draggingStart.x,n.fy=r.y-this.draggingStart.y)}onDragEnd(t,r){if(!t)return;let n=this.d3Graph.nodes.find(i=>i.id===t.id);n&&(this.settings.force.alphaTarget(0),n.fx=void 0,n.fy=void 0)}};function tE(e,t){return typeof t=="number"?e[t]:t}var cl=class{defaultSettings={force:(0,nE.d3adaptor)(ve(ve(ve({},zs),Iu),Us)).linkDistance(150).avoidOverlaps(!0),viewDimensions:{width:600,height:600}};settings={};inputGraph;outputGraph;internalGraph;outputGraph$=new _i;draggingStart;run(t){return this.inputGraph=t,this.inputGraph.clusters||(this.inputGraph.clusters=[]),this.internalGraph={nodes:[...this.inputGraph.nodes.map(r=>et(ve({},r),{width:r.dimension?r.dimension.width:20,height:r.dimension?r.dimension.height:20}))],groups:[...this.inputGraph.clusters.map(r=>({padding:5,groups:r.childNodeIds.map(n=>this.inputGraph.clusters.findIndex(i=>i.id===n)).filter(n=>n>=0),leaves:r.childNodeIds.map(n=>this.inputGraph.nodes.findIndex(i=>i.id===n)).filter(n=>n>=0)}))],links:[...this.inputGraph.edges.map(r=>{let n=this.inputGraph.nodes.findIndex(o=>r.source===o.id),i=this.inputGraph.nodes.findIndex(o=>r.target===o.id);if(!(n===-1||i===-1))return et(ve({},r),{source:n,target:i})}).filter(r=>!!r)],groupLinks:[...this.inputGraph.edges.map(r=>{let n=this.inputGraph.nodes.findIndex(o=>r.source===o.id),i=this.inputGraph.nodes.findIndex(o=>r.target===o.id);if(!(n>=0&&i>=0))return r}).filter(r=>!!r)]},this.outputGraph={nodes:[],clusters:[],edges:[],edgeLabels:[]},this.outputGraph$.next(this.outputGraph),this.settings=Object.assign({},this.defaultSettings,this.settings),this.settings.force&&(this.settings.force=this.settings.force.nodes(this.internalGraph.nodes).groups(this.internalGraph.groups).links(this.internalGraph.links).alpha(.5).on("tick",()=>{this.settings.onTickListener&&this.settings.onTickListener(this.internalGraph),this.outputGraph$.next(this.internalGraphToOutputGraph(this.internalGraph))}),this.settings.viewDimensions&&(this.settings.force=this.settings.force.size([this.settings.viewDimensions.width,this.settings.viewDimensions.height])),this.settings.forceModifierFn&&(this.settings.force=this.settings.forceModifierFn(this.settings.force)),this.settings.force.start()),this.outputGraph$.asObservable()}updateEdge(t,r){let n=Object.assign({},this.defaultSettings,this.settings);return n.force&&n.force.start(),this.outputGraph$.asObservable()}internalGraphToOutputGraph(t){return this.outputGraph.nodes=t.nodes.map(r=>et(ve({},r),{id:r.id||St(),position:{x:r.x,y:r.y},dimension:{width:r.dimension&&r.dimension.width||20,height:r.dimension&&r.dimension.height||20},transform:`translate(${r.x-(r.dimension&&r.dimension.width||20)/2||0}, ${r.y-(r.dimension&&r.dimension.height||20)/2||0})`})),this.outputGraph.edges=t.links.map(r=>{let n=tE(t.nodes,r.source),i=tE(t.nodes,r.target);return et(ve({},r),{source:n.id,target:i.id,points:[n.bounds.rayIntersection(i.bounds.cx(),i.bounds.cy()),i.bounds.rayIntersection(n.bounds.cx(),n.bounds.cy())]})}).concat(t.groupLinks.map(r=>{let n=t.nodes.find(a=>a.id===r.source),i=t.nodes.find(a=>a.id===r.target),o=n||t.groups.find(a=>a.id===r.source),s=i||t.groups.find(a=>a.id===r.target);return et(ve({},r),{source:o.id,target:s.id,points:[o.bounds.rayIntersection(s.bounds.cx(),s.bounds.cy()),s.bounds.rayIntersection(o.bounds.cx(),o.bounds.cy())]})}
10)),this.outputGraph.clusters=t.groups.map((r,n)=>{let i=this.inputGraph.clusters[n];return et(ve({},i),{dimension:{width:r.bounds?r.bounds.width():20,height:r.bounds?r.bounds.height():20},position:{x:r.bounds?r.bounds.x+r.bounds.width()/2:0,y:r.bounds?r.bounds.y+r.bounds.height()/2:0}})}),this.outputGraph.edgeLabels=this.outputGraph.edges,this.outputGraph}onDragStart(t,r){let n=this.outputGraph.nodes.findIndex(o=>o.id===t.id),i=this.internalGraph.nodes[n];i&&(this.draggingStart={x:i.x-r.x,y:i.y-r.y},i.fixed=1,this.settings.force.start())}onDrag(t,r){if(!t)return;let n=this.outputGraph.nodes.findIndex(o=>o.id===t.id),i=this.internalGraph.nodes[n];i&&(i.x=this.draggingStart.x+r.x,i.y=this.draggingStart.y+r.y)}onDragEnd(t,r){if(!t)return;let n=this.outputGraph.nodes.findIndex(o=>o.id===t.id),i=this.internalGraph.nodes[n];i&&(i.fixed=0)}},rE={dagre:al,dagreCluster:ul,dagreNodesOnly:mi,d3ForceDirected:ll,colaForceDirected:cl},iE=(()=>{class e{getLayout(r){if(rE[r])return new rE[r];throw new Error(`Unknown layout type '${r}'`)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=Ye({token:e,factory:e.\u0275fac})}return e})(),HV=(()=>{class e{mouseWheelUp=new tt;mouseWheelDown=new tt;onMouseWheelChrome(r){this.mouseWheelFunc(r)}onMouseWheelFirefox(r){this.mouseWheelFunc(r)}onWheel(r){this.mouseWheelFunc(r)}onMouseWheelIE(r){this.mouseWheelFunc(r)}mouseWheelFunc(r){window.event&&(r=window.event);let n=Math.max(-1,Math.min(1,r.wheelDelta||-r.detail||r.deltaY||r.deltaX)),i=r.wheelDelta?n>0:n<0,o=r.wheelDelta?n<0:n>0;i?this.mouseWheelUp.emit(r):o&&this.mouseWheelDown.emit(r),r.returnValue=!1,r.preventDefault&&r.preventDefault()}static \u0275fac=function(n){return new(n||e)};static \u0275dir=qs({type:e,selectors:[["","mouseWheel",""]],hostBindings:function(n,i){n&1&&N("mousewheel",function(s){return i.onMouseWheelChrome(s)})("DOMMouseScroll",function(s){return i.onMouseWheelFirefox(s)})("wheel",function(s){return i.onWheel(s)})("onmousewheel",function(s){return i.onMouseWheelIE(s)})},outputs:{mouseWheelUp:"mouseWheelUp",mouseWheelDown:"mouseWheelDown"},standalone:!1})}return e})(),di=(function(e){return e.Init="init",e.Subscribe="subscribe",e.Transform="transform",e.Output="output",e})(di||{}),oE=(()=>{class e{el;zone;cd;layoutService;nodes=[];clusters=[];compoundNodes=[];links=[];activeEntries=[];curve;draggingEnabled=!0;nodeHeight;nodeMaxHeight;nodeMinHeight;nodeWidth;nodeMinWidth;nodeMaxWidth;panningEnabled=!0;panningAxis=ms.Both;enableZoom=!0;zoomSpeed=.1;minZoomLevel=.1;maxZoomLevel=4;autoZoom=!1;panOnZoom=!0;animate=!1;autoCenter=!1;update$;center$;zoomToFit$;panToNode$;layout;layoutSettings;enableTrackpadSupport=!1;showMiniMap=!1;miniMapMaxWidth=100;miniMapMaxHeight;miniMapPosition=gs.UpperRight;view;scheme="cool";customColors;deferDisplayUntilPosition=!1;centerNodesOnPositionChange=!0;enablePreUpdateTransform=!0;select=new tt;activate=new tt;deactivate=new tt;zoomChange=new tt;clickHandler=new tt;stateChange=new tt;linkTemplate;nodeTemplate;clusterTemplate;defsTemplate;miniMapNodeTemplate;nodeElements;linkElements;chartWidth;isMouseMoveCalled=!1;graphSubscription=new Cs;colors;dims;seriesDomain;transform;isPanning=!1;isDragging=!1;draggingNode;initialized=!1;graph;graphDims={width:0,height:0};_oldLinks=[];oldNodes=new Set;oldClusters=new Set;oldCompoundNodes=new Set;transformationMatrix=Fh();_touchLastX=null;_touchLastY=null;minimapScaleCoefficient=3;minimapTransform;minimapOffsetX=0;minimapOffsetY=0;isMinimapPanning=!1;minimapClipPathId;width;height;resizeSubscription;visibilityObserver;destroy$=new _i;constructor(r,n,i,o){this.el=r,this.zone=n,this.cd=i,this.layoutService=o}groupResultsBy=r=>r.label;get zoomLevel(){return this.transformationMatrix.a}set zoomLevel(r){this.zoomTo(Number(r))}get panOffsetX(){return this.transformationMatrix.e}set panOffsetX(r){this.panTo(Number(r),null)}get panOffsetY(){return this.transformationMatrix.f}set panOffsetY(r){this.panTo(null,Number(r))}ngOnInit(){this.update$&&this.update$.pipe(ln(this.destroy$)).subscribe(()=>{this.update()}),this.center$&&this.center$.pipe(ln(this.destroy$)).subscribe(()=>{this.center()}),this.zoomToFit$&&this.zoomToFit$.pipe(ln(this.destroy$)).subscribe(r=>{this.zoomToFit(r||{})}),this.panToNode$&&this.panToNode$.pipe(ln(this.destroy$)).subscribe(r=>{this.panToNodeId(r)}),this.minimapClipPathId=`minimapClip${St()}`,this.stateChange.emit({state:di.Subscribe})}ngOnChanges(r){this.basicUpdate();let{layoutSettings:n}=r;this.setLayout(this.layout),n&&this.setLayoutSettings(this.layoutSettings),this.layout&&this.nodes.length&&this.links.length&&this.update()}setLayout(r){this.initialized=!1,r||(r="dagre"),typeof r=="string"&&(this.layout=this.layoutService.getLayout(r),this.setLayoutSettings(this.layoutSettings))}setLayoutSettings(r){this.layout&&typeof this.layout!="string"&&(this.layout.settings=r)}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy()),this.destroy$.next(),this.destroy$.complete()}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new zV(this.el,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this)),setTimeout(()=>this.update())}update(){this.basicUpdate(),this.curve||(this.curve=Vs.beta(1)),this.zone.run(()=>{this.dims=Jw({width:this.width,height:this.height}),this.seriesDomain=this.getSeriesDomain(),this.setColors(),this.createGraph(),this.updateTransform(),this.initialized||this.stateChange.emit({state:di.Init}),this.initialized=!0})}createGraph(){this.graphSubscription.unsubscribe(),this.graphSubscription=new Cs;let r=i=>(i.meta||(i.meta={}),i.id||(i.id=St()),i.dimension?i.meta.forceDimensions=i.meta.forceDimensions===void 0?!0:i.meta.forceDimensions:(i.dimension={width:this.nodeWidth?this.nodeWidth:30,height:this.nodeHeight?this.nodeHeight:30},i.meta.forceDimensions=!1),i.position||(i.position={x:0,y:0},this.deferDisplayUntilPosition&&(i.hidden=!0)),i.data=i.data?i.data:{},i),n=i=>(i.id||(i.id=St()),i);this.graph={nodes:this.nodes.map(i=>
10r(i)),clusters:this.clusters.map(i=>r(i)),compoundNodes:this.compoundNodes.map(i=>r(i)),edges:this.links.map(i=>n(i))},requestAnimationFrame(()=>this.draw())}draw(){let r=this.layout.run(this.graph),n=r instanceof Ss?r:rr(r);this.graphSubscription.add(n.subscribe(i=>{this.graph=i,this.tick()}))}tick(){let r=new Set,n=new Set,i=new Set;this.graph.nodes.forEach(s=>{s.transform=`translate(${s.position.x-(this.centerNodesOnPositionChange?s.dimension.width/2:0)||0}, ${s.position.y-(this.centerNodesOnPositionChange?s.dimension.height/2:0)||0})`,s.data||(s.data={}),s.data.color=this.colors.getColor(this.groupResultsBy(s)),this.deferDisplayUntilPosition&&(s.hidden=!1),r.add(s.id)}),(this.graph.clusters||[]).forEach(s=>{s.transform=`translate(${s.position.x-(this.centerNodesOnPositionChange?s.dimension.width/2:0)||0}, ${s.position.y-(this.centerNodesOnPositionChange?s.dimension.height/2:0)||0})`,s.data||(s.data={}),s.data.color=this.colors.getColor(this.groupResultsBy(s)),this.deferDisplayUntilPosition&&(s.hidden=!1),n.add(s.id)}),(this.graph.compoundNodes||[]).forEach(s=>{s.transform=`translate(${s.position.x-(this.centerNodesOnPositionChange?s.dimension.width/2:0)||0}, ${s.position.y-(this.centerNodesOnPositionChange?s.dimension.height/2:0)||0})`,s.data||(s.data={}),s.data.color=this.colors.getColor(this.groupResultsBy(s)),this.deferDisplayUntilPosition&&(s.hidden=!1),i.add(s.id)}),setTimeout(()=>{this.oldNodes=r,this.oldClusters=n,this.oldCompoundNodes=i},500);let o=[];for(let s in this.graph.edgeLabels){let a=this.graph.edgeLabels[s],u=s.replace(/[^\w-]*/g,""),l=this.layout&&typeof this.layout!="string"&&this.layout.settings&&this.layout.settings.multigraph,c=l?this._oldLinks.find(g=>`${g.source}${g.target}${g.id}`===u):this._oldLinks.find(g=>`${g.source}${g.target}`===u),f=l?this.graph.edges.find(g=>`${g.source}${g.target}${g.id}`===u):this.graph.edges.find(g=>`${g.source}${g.target}`===u);c?c.data&&f&&f.data&&JSON.stringify(c.data)!==JSON.stringify(f.data)&&(c.data=f.data):c=f||a,c.oldLine=c.line;let p=a.points,d=this.generateLine(p),v=Object.assign({},c);v.line=d,v.points=p,this.updateMidpointOnEdge(v,p);let m=p[Math.floor(p.length/2)];m&&(v.textTransform=`translate(${m.x||0},${m.y||0})`),v.textAngle=0,v.oldLine||(v.oldLine=v.line),this.calcDominantBaseline(v),o.push(v)}this.graph.edges=o,this.graph.edges&&(this._oldLinks=this.graph.edges.map(s=>{let a=Object.assign({},s);return a.oldLine=s.line,a})),this.applyNodeDimensions(),this.redrawLines(),this.updateMinimap(),requestAnimationFrame(()=>{this.applyNodeDimensions(),this.redrawLines(),this.updateMinimap(),this.autoZoom?this.zoomToFit({autoCenter:this.autoCenter?this.autoCenter:!1}):this.autoCenter&&this.center(),this.stateChange.emit({state:di.Output})}),this.cd.markForCheck()}getMinimapTransform(){switch(this.miniMapPosition){case gs.UpperLeft:return"";case gs.UpperRight:return"translate("+(this.dims.width-this.graphDims.width/this.minimapScaleCoefficient)+",0)";default:return""}}updateGraphDims(){let r=1/0,n=-1/0,i=1/0,o=-1/0;for(let s=0;s<this.graph.nodes.length;s++){let a=this.graph.nodes[s];r=a.position.x<r?a.position.x:r,i=a.position.y<i?a.position.y:i,n=a.position.x+a.dimension.width>n?a.position.x+a.dimension.width:n,o=a.position.y+a.dimension.height>o?a.position.y+a.dimension.height:o}r-=100,i-=100,n+=100,o+=100,this.graphDims.width=n-r,this.graphDims.height=o-i,this.minimapOffsetX=r,this.minimapOffsetY=i}updateMinimap(){this.graph.nodes&&this.graph.nodes.length&&(this.updateGraphDims(),this.miniMapMaxWidth&&(this.minimapScaleCoefficient=this.graphDims.width/this.miniMapMaxWidth),this.miniMapMaxHeight&&(this.minimapScaleCoefficient=Math.max(this.minimapScaleCoefficient,this.graphDims.height/this.miniMapMaxHeight)),this.minimapTransform=this.getMinimapTransform())}applyNodeDimensions(){this.nodeElements&&this.nodeElements.length&&this.nodeElements.forEach(r=>{let n=r.nativeElement,i=this.graph.nodes.find(s=>s.id===n.id);if(!i)return;let o;try{if(o=n.getBBox(),!o.width||!o.height)return}catch{return}if(this.nodeHeight?i.dimension.height=i.dimension.height&&i.meta.forceDimensions?i.dimension.height:this.nodeHeight:i.dimension.height=i.dimension.height&&i.meta.forceDimensions?i.dimension.height:o.height,this.nodeMaxHeight&&(i.dimension.height=Math.max(i.dimension.height,this.nodeMaxHeight)),this.nodeMinHeight&&(i.dimension.height=Math.min(i.dimension.height,this.nodeMinHeight)),this.nodeWidth)i.dimension.width=i.dimension.width&&i.meta.forceDimensions?i.dimension.width:this.nodeWidth;else if(n.getElementsByTagName("text").length){let s;try{for(let a of n.getElementsByTagName("text")){let u=a.getBBox();s?(u.width>s.width&&(s.width=u.width),u.height>s.height&&(s.height=u.height)):s=u}}catch{return}i.dimension.width=i.dimension.width&&i.meta.forceDimensions?i.dimension.width:s.width+20}else i.dimension.width=i.dimension.width&&i.meta.forceDimensions?i.dimension.width:o.width;this.nodeMaxWidth&&(i.dimension.width=Math.max(i.dimension.width,this.nodeMaxWidth)),this.nodeMinWidth&&(i.dimension.width=Math.min(i.dimension.width,this.nodeMinWidth))})}
10redrawLines(r=this.animate){this.linkElements.forEach(n=>{let i=this.graph.edges.find(o=>o.id===n.nativeElement.id);i&&(Yi(n.nativeElement).select(".line").attr("d",i.oldLine).transition().ease(gn).duration(r?500:0).attr("d",i.line),Yi(this.el.nativeElement).select(`#${i.id}`).attr("d",i.oldTextPath).transition().ease(gn).duration(r?500:0).attr("d",i.textPath),this.updateMidpointOnEdge(i,i.points))})}calcDominantBaseline(r){let n=r.points[0],i=r.points[r.points.length-1];r.oldTextPath=r.textPath,i.x<n.x?(r.dominantBaseline="text-before-edge",r.textPath=this.generateLine([...r.points].reverse())):(r.dominantBaseline="text-after-edge",r.textPath=r.line)}generateLine(r){return Bs().x(i=>i.x).y(i=>i.y).curve(this.curve)(r)}onZoom(r,n){if(this.enableTrackpadSupport&&!r.ctrlKey){this.pan(r.deltaX*-1,r.deltaY*-1);return}let i=1+(n==="in"?this.zoomSpeed:-this.zoomSpeed),o=this.zoomLevel*i;if(!(o<=this.minZoomLevel||o>=this.maxZoomLevel)&&this.enableZoom)if(this.panOnZoom===!0&&r){let s=r.clientX,a=r.clientY,u=this.el.nativeElement.querySelector("svg"),l=u.querySelector("g.chart"),c=u.createSVGPoint();c.x=s,c.y=a;let f=c.matrixTransform(l.getScreenCTM().inverse());this.pan(f.x,f.y,!0),this.zoom(i),this.pan(-f.x,-f.y,!0)}else this.zoom(i)}pan(r,n,i=!1){let o=i?1:this.zoomLevel;this.transformationMatrix=vt(this.transformationMatrix,gt(r/o,n/o)),this.updateTransform()}panTo(r,n){if(r==null||isNaN(r)||n===null||n===void 0||isNaN(n))return;let i=-this.panOffsetX-r*this.zoomLevel+this.dims.width/2,o=-this.panOffsetY-n*this.zoomLevel+this.dims.height/2;this.transformationMatrix=vt(this.transformationMatrix,gt(i/this.zoomLevel,o/this.zoomLevel)),this.updateTransform()}zoom(r){this.transformationMatrix=vt(this.transformationMatrix,kn(r,r)),this.zoomChange.emit(this.zoomLevel),this.updateTransform()}zoomTo(r){this.transformationMatrix.a=isNaN(r)?this.transformationMatrix.a:Number(r),this.transformationMatrix.d=isNaN(r)?this.transformationMatrix.d:Number(r),this.zoomChange.emit(this.zoomLevel),this.enablePreUpdateTransform&&this.updateTransform(),this.update()}onDrag(r){if(!this.draggingEnabled)return;let n=this.draggingNode;this.layout&&typeof this.layout!="string"&&this.layout.onDrag&&this.layout.onDrag(n,r),n.position.x+=r.movementX/this.zoomLevel,n.position.y+=r.movementY/this.zoomLevel;let i=n.position.x-(this.centerNodesOnPositionChange?n.dimension.width/2:0),o=n.position.y-(this.centerNodesOnPositionChange?n.dimension.height/2:0);n.transform=`translate(${i}, ${o})`;for(let s of this.graph.edges)if((s.target===n.id||s.source===n.id||s.target.id===n.id||s.source.id===n.id)&&this.layout&&typeof this.layout!="string"){let a=this.layout.updateEdge(this.graph,s),u=a instanceof Ss?a:rr(a);this.graphSubscription.add(u.subscribe(l=>{this.graph=l,this.redrawEdge(s)}))}this.redrawLines(!1),this.updateMinimap()}redrawEdge(r){let n=this.generateLine(r.points);this.calcDominantBaseline(r),r.oldLine=r.line,r.line=n}updateTransform(){this.transform=Gh(na(this.transformationMatrix,100)),this.stateChange.emit({state:di.Transform})}onClick(r){this.select.emit(r)}onActivate(r){this.activeEntries.indexOf(r)>-1||(this.activeEntries=[r,...this.activeEntries],this.activate.emit({value:r,entries:this.activeEntries}))}onDeactivate(r){let n=this.activeEntries.indexOf(r);this.activeEntries.splice(n,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:r,entries:this.activeEntries})}getSeriesDomain(){return this.nodes.map(r=>this.groupResultsBy(r)).reduce((r,n)=>r.indexOf(n)!==-1?r:r.concat([n]),[]).sort()}trackLinkBy(r,n){return n.id}trackNodeBy(r,n){return n.id}setColors(){this.colors=new sl(this.scheme,this.seriesDomain,this.customColors)}onMouseMove(r){this.isMouseMoveCalled=!0,(this.isPanning||this.isMinimapPanning)&&this.panningEnabled?this.panWithConstraints(this.panningAxis,r):this.isDragging&&this.draggingEnabled&&this.onDrag(r)}onMouseDown(r){this.isMouseMoveCalled=!1}graphClick(r){this.isMouseMoveCalled||this.clickHandler.emit(r)}onTouchStart(r){this._touchLastX=r.changedTouches[0].clientX,this._touchLastY=r.changedTouches[0].clientY,this.isPanning=!0}onTouchMove(r){if(this.isPanning&&this.panningEnabled){let n=r.changedTouches[0].clientX,i=r.changedTouches[0].clientY,o=n-this._touchLastX,s=i-this._touchLastY;this._touchLastX=n,this._touchLastY=i,this.pan(o,s)}}onTouchEnd(){this.isPanning=!1}onMouseUp(r){this.isDragging=!1,this.isPanning=!1,this.isMinimapPanning=!1,this.layout&&typeof this.layout!="string"&&this.layout.onDragEnd&&this.layout.onDragEnd(this.draggingNode,r)}onNodeMouseDown(r,n){this.draggingEnabled&&(this.isDragging=!0,this.draggingNode=n,this.layout&&typeof this.layout!="string"&&this.layout.onDragStart&&this.layout.onDragStart(n,r))}onMinimapDragMouseDown(){this.isMinimapPanning=!0}onMinimapPanTo(r){let n=r.offsetX-(this.dims.width-(this.graphDims.width+this.minimapOffsetX)/this.minimapScaleCoefficient),i=r.offsetY+this.minimapOffsetY/this.minimapScaleCoefficient;this.panTo(n*this.minimapScaleCoefficient,i*this.minimapScaleCoefficient),this.isMinimapPanning=!0}center(){this.panTo(this.graphDims.width/2,this.graphDims.height/2)}zoomToFit(r){this.dims=Jw({width:this.width,height:this.height}),this.updateGraphDims();let n=this.dims.height/this.graphDims.height,i=this.dims.width/this.graphDims.width,o=Math.min(n,i,1);o<this.minZoomLevel&&(o=this.minZoomLevel),o>this.maxZoomLevel&&(o=this.maxZoomLevel),(r?.force===!0||o!==this.zoomLevel)&&(this.zoomLevel=o,r?.autoCenter!==!0&&this.updateTransform(),r?.autoCenter===!0&&this.center(),this.zoomChange.emit(this.zoomLevel))}panToNodeId(r){let n=this.graph.nodes.find(i=>i.id===r);n&&this.panTo(n.position.x,n.position.y)}getCompoundNodeChildren(r){return this.nodes.filter(n=>
10r.includes(n.id))}panWithConstraints(r,n){let i=n.movementX,o=n.movementY;switch(this.isMinimapPanning&&(i=-this.minimapScaleCoefficient*i*this.zoomLevel,o=-this.minimapScaleCoefficient*o*this.zoomLevel),r){case ms.Horizontal:this.pan(i,0);break;case ms.Vertical:this.pan(0,o);break;default:this.pan(i,o);break}}updateMidpointOnEdge(r,n){if(!(!r||!n))if(n.length%2===1)r.midPoint=n[Math.floor(n.length/2)];else if(this.layout?.settings?.properties?.["elk.direction"])this._calcMidPointElk(r,n);else{let i=n[n.length/2],o=n[n.length/2-1];r.midPoint={x:(i.x+o.x)/2,y:(i.y+o.y)/2}}}_calcMidPointElk(r,n){let i=null,o=null,s=null,a=null,u=this.layout.settings?.properties["elk.direction"];(u==="RIGHT"?n.some(c=>c.y!==n[0].y):n.some(c=>c.x!==n[0].x))?(i=n[n.length-1],o=n[n.length-2],s=n[n.length-1],a=n[n.length-2]):u==="RIGHT"?(i=n[0],o=n[n.length-1],s=n[n.length/2],a=n[n.length/2-1]):(i=n[n.length/2],o=n[n.length/2-1],s=n[0],a=n[n.length-1]),r.midPoint={x:(i.x+o.x)/2,y:(s.y+a.y)/2}}basicUpdate(){if(this.view)this.width=this.view[0],this.height=this.view[1];else{let r=this.getContainerDims();r&&(this.width=r.width,this.height=r.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let r,n,i=this.el.nativeElement;if(i.parentNode!==null){let o=i.parentNode.getBoundingClientRect();r=o.width,n=o.height}return r&&n?{width:r,height:n}:null}hasGraphDims(){return this.graphDims.width>0&&this.graphDims.height>0}hasNodeDims(){return this.graph.nodes?.every(r=>r.dimension.width>0&&r.dimension.height>0)}hasCompoundNodeDims(){return this.graph.compoundNodes?.every(r=>r.dimension.width>0&&r.dimension.height>0)}hasClusterDims(){return this.graph.clusters?.every(r=>r.dimension.width>0&&r.dimension.height>0)}hasDims(){return this.hasGraphDims()&&this.hasNodeDims()&&((this.compoundNodes?.length?this.hasCompoundNodeDims():!0)||(this.cluster
10s?.length?this.hasClusterDims():!0))}unbindEvents(){this.resizeSubscription&&this.resizeSubscription.unsubscribe()}bindWindowResizeEvent(){let n=Sl(window,"resize").pipe(xi(200)).subscribe(i=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=n}static \u0275fac=function(n){return new(n||e)(nr(Ts),nr(fn),nr(Ci),nr(iE))};static \u0275cmp=ue({type:e,selectors:[["ngx-graph"]],contentQueries:function(n,i,o){if(n&1&&(kr(o,pV,5),kr(o,dV,5),kr(o,mV,5),kr(o,gV,5),kr(o,vV,5)),n&2){let s;Te(s=ke())&&(i.linkTemplate=s.first),Te(s=ke())&&(i.nodeTemplate=s.first),Te(s=ke())&&(i.clusterTemplate=s.first),Te(s=ke())&&(i.defsTemplate=s.first),Te(s=ke())&&(i.miniMapNodeTemplate=s.first)}},viewQuery:function(n,i){if(n&1&&(kt(_V,5),kt(yV,5)),n&2){let o;Te(o=ke())&&(i.nodeElements=o),Te(o=ke())&&(i.linkElements=o)}},hostBindings:function(n,i){n&1&&N("mousemove",function(s){return i.onMouseMove(s)},Tr)("mousedown",function(s){return i.onMouseDown(s)},Tr)("click",function(s){return i.graphClick(s)},Tr)("touchmove",function(s){return i.onTouchMove(s)},Tr)("mouseup",function(s){return i.onMouseUp(s)},Tr)},inputs:{nodes:"nodes",clusters:"clusters",compoundNodes:"compoundNodes",links:"links",activeEntries:"activeEntries",curve:"curve",draggingEnabled:"draggingEnabled",nodeHeight:"nodeHeight",nodeMaxHeight:"nodeMaxHeight",nodeMinHeight:"nodeMinHeight",nodeWidth:"nodeWidth",nodeMinWidth:"nodeMinWidth",nodeMaxWidth:"nodeMaxWidth",panningEnabled:"panningEnabled",panningAxis:"panningAxis",enableZoom:"enableZoom",zoomSpeed:"zoomSpeed",minZoomLevel:"minZoomLevel",maxZoomLevel:"maxZoomLevel",autoZoom:"autoZoom",panOnZoom:"panOnZoom",animate:"animate",autoCenter:"autoCenter",update$:"update$",center$:"center$",zoomToFit$:"zoomToFit$",panToNode$:"panToNode$",layout:"layout",layoutSettings:"layoutSettings",enableTrackpadSupport:"enableTrackpadSupport",showMiniMap:"showMiniMap",miniMapMaxWidth:"miniMapMaxWidth",miniMapMaxHeight:"miniMapMaxHeight",miniMapPosition:"miniMapPosition",view:"view",scheme:"scheme",customColors:"customColors",deferDisplayUntilPosition:"deferDisplayUntilPosition",centerNodesOnPositionChange:"centerNodesOnPositionChange",enablePreUpdateTransform:"enablePreUpdateTransform",groupResultsBy:"groupResultsBy",zoomLevel:"zoomLevel",panOffsetX:"panOffsetX",panOffsetY:"panOffsetY"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",zoomChange:"zoomChange",clickHandler:"clickHandler",stateChange:"stateChange"},standalone:!1,features:[Mr],ngContentSelectors:xV,decls:6,vars:11,consts:[["nodeGroup",""],["clusterElement",""],["nodeElement",""],["linkElement",""],["mouseWheel","",1,"ngx-graph-outer",3,"mouseWheelUp","mouseWheelDown"],[1,"ngx-graph"],["class","graph chart",3,"touchstart","touchend",4,"ngIf"],["class","minimap",4,"ngIf"],[1,"graph","chart",3,"touchstart","touchend"],[3,"ngTemplateOutlet",4,"ngIf"],["class","text-path",4,"ngFor","ngForOf"],[1,"panning-rect",3,"mousedown"],[1,"clusters"],["class","node-group",3,"old-node","id","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"compound-nodes"],["class","node-group",3,"old-node","id","click","mousedown",4,"ngFor","ngForOf","ngForTrackBy"],[1,"links"],["class","link-group",3,"id",4,"ngFor","ngForOf","ngForTrackBy"],[1,"nodes"],[3,"ngTemplateOutlet"],[1,"text-path"],[1,"node-group",3,"click","id"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],["class","node cluster",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"node","cluster"],["alignment-baseline","central"],[1,"node-group",3,"click","mousedown","id"],["class","node compound-node",4,"ngIf"],[1,"node","compound-node"],[1,"link-group",3,"id"],["class","edge",4,"ngIf"],[1,"edge"],["r","10",4,"ngIf"],["r","10"],[1,"minimap"],[1,"minimap-background",3,"mousedown"],[1,"minimap-nodes"],["class","node-group",3,"old-node","id",4,"ngFor","ngForOf","ngForTrackBy"],[1,"minimap-drag",3,"mousedown"],[1,"node-group",3,"id"]],template:function(n,i){n&1&&(Al(),y(0,"div",4),N("mouseWheelUp",function(s){return i.onZoom(s,"in")})("mouseWheelDown",function(s){return i.onZoom(s,"out")}
10),Z(),y(1,"svg",5),re(2,DV,15,14,"g",6),y(3,"clipPath"),V(4,"rect"),E(),re(5,$V,6,15,"g",7),E()()),n&2&&(qr("width",i.width,"px"),T("@animationState","active")("@.disabled",!i.animate),w(),te("width",i.width)("height",i.height),w(),T("ngIf",i.initialized&&i.graph),w(),te("id",i.minimapClipPathId),w(),te("width",i.graphDims.width/i.minimapScaleCoefficient)("height",i.graphDims.height/i.minimapScaleCoefficient),w(),T("ngIf",i.showMiniMap))},dependencies:[Ll,Fl,Gl,HV],styles:[`.minimap .minimap-background{fill:#0000001a}.minimap .minimap-drag{fill:#0003;stroke:#fff;stroke-width:1px;stroke-dasharray:2px;stroke-dashoffset:2px;cursor:pointer}.minimap .minimap-drag.panning{fill:#0000004d}.minimap .minimap-nodes{opacity:.5;pointer-events:none}.graph{-webkit-user-select:none;user-select:none}.graph .edge{stroke:#666;fill:none}.graph .edge .edge-label{stroke:none;font-size:12px;fill:#251e1e}.graph .panning-rect{fill:#0000;cursor:move}.graph .node-group.old-node{transition:transform .5s ease-in-out}.graph .node-group .node:focus{outline:none}.graph .compound-node rect{opacity:.5}.graph .cluster rect{opacity:.2}
11`],encapsulation:2,data:{animation:[Jl("animationState",[tc(":enter",[Ns({opacity:0}),ec("500ms 100ms",Ns({opacity:1}))])])]},changeDetection:0})}return wl([VV(500)],e.prototype,"updateMinimap",null),e})(),UV=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=ks({type:e});static \u0275inj=Ms({providers:[iE],imports:[le]})}return e})(),sE=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=ks({type:e});static \u0275inj=Ms({imports:[le,UV]})}return e})();var _s=(()=>{class e{constructor(){this.#e=cn(!1),this.loading$=Os(this.#e),this.#t=cn([]),this.relations$=Os(this.#t)}#e;#t;setRelations(r){this.#t.set(r)}setLoading(r){this.#e.set(r)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ye({token:e,factory:e.\u0275fac})}}return e})(),fl=(()=>{class e{constructor(){this.repository=R(_s),this.api=R(Gi)}fetchRelations(r){this.repository.setLoading(!0),this.api.getEntityRelations([r]).pipe(yi(n=>Object.keys(n.result[0].relations.items).map(i=>({id:i,label:i,count:n.result[0].relations.items[i].counter}))),Mt(n=>this.repository.setRelations(n)),un(()=>{this.repository.setLoading(!1)})).subscribe()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ye({token:e,factory:e.\u0275fac})}}return e})();var Jt=(()=>{class e extends Kl{async loadComponent(){return import("./chunk-ZEQZNBZS.js").then(r=>r.EntityDetailDialogComponent)}dialogConfig(){return{minWidth:"80vw",minHeight:"80vh"}}static{this.\u0275fac=(()=>{let r;return function(i){return(r||(r=Ol(e)))(i||e)}})()}static{this.\u0275prov=Ye({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var WV=e=>({relation:e});function ZV(e,t){e&1&&(y(0,"div",3),V(1,"mat-spinner",7),E())}function QV(e,t){if(e&1){let r=U();y(0,"button",4),N("click",function(){A(r);let i=S(),o=S(2);return P(o.shortestPathOption.emit(i))}),I(1,"Na\u010D\xEDst nejkrat\u0161\xED vazbu s ..."),E()}}function KV(e,t){if(e&1&&(y(0,"button",6),I(1),F(2,"transloco"),E()),e&2){let r=t.$implicit;S(3);let n=we(3);T("matMenuTriggerData",qe(5,WV,r))("matMenuTriggerFor",n),w(),Fe(" ",G(2,3,"explorer.relations."+r.label)," ")}}function JV(e,t){if(e&1){let r=U();ie(0,ZV,2,0,"div",3),F(1,"async"),y(2,"button",4),N("click",function(){A(r);let i=S(2);return P(i.onDetail())}),I(3,"Detail"),E(),V(4,"mat-divider"),y(5,"button",4),N("click",function(){A(r);let i=S(2);return P(i.onCenter())}),I(6,"Centrovat"),E(),y(7,"button",4),N("click",function(){A(r);let i=S(2);return P(i.onTogglePin())}),I(8),E(),V(9,"mat-divider"),y(10,"button",4),N("click",function(){A(r);let i=S(2);return P(i.onFetchAllRelations())}),I(11,"Na\u010D\xEDst v\u0161echny vazby"),E(),ie(12,QV,2,0,"button",5),y(13,"button",4),N("click",function(){let i=A(r),o=S(2);return P(o.onRemoveNode(i))}),I(14,"Odstranit"),E(),V(15,"mat-divider"),Se(16,KV,3,7,"button",6,Xe),F(18,"async")}if(e&2){let r=S(2);oe(G(1,3,r.loading$)?0:-1),w(8),pe(t.isPinned?"Odepnout":"P\u0159ipnout"),w(4),oe(r.hasShortestPathOption()?12:-1),w(4),Me(G(18,5,r.relations$))}}function e6(e,t){if(e&1&&ie(0,JV,19,7),e&2){let r,n=S();oe((r=n.item())?0:-1,r)}}function t6(e,t){if(e&1){let r=U();y(0,"button",4),N("click",function(){let i=A(r).relation,o=S();return P(o.onFetchRelation(i.label))}),I(1," Pro tuto entitu "),y(2,"span",8),I(3),E()(),y(4,"button",4),N("click",function(){let i=A(r).relation,o=S();return P(o.onFetchRelationForEntity(i.label))}),I(5,"Pro v\u0161echny entity tohoto typu"),E()}if(e&2){let r=t.relation;w(3),Fe("(",r.count,")")}}var an=(()=>{class e{constructor(){this.service=R(fl),this.repository=R(_s),this.graphService=R(Re),this.entityDetailDialog=R(Jt),this.item=ft(),this.hasShortestPathOption=ft(!1),this.shortestPathOption=ir(),this.relations$=this.repository.relations$,this.loading$=this.repository.loading$}onFetchAllRelations(){let r=this.item();r&&this.graphService.fetchAllRelations(r.data.genID).subscribe()}onFetchRelations(){let r=this.item();r&&this.service.fetchRelations(r.data.genID)}onFetchRelation(r){let n=this.item();n&&this.graphService.fetchRelation(n.data.genID,r)}onFetchRelationForEntity(r){let n=this.item();n&&this.graphService.fetchRelationForEntityType(n.data.genID,r,n.data.type)}onRemoveNode(r){this.graphService.removeNode(r.id)}onDetail(){let r=this.item();r&&this.entityDetailDialog.open({entity:r.data})}onCenter(){let r=this.item();r&&this.graphService.panToNode(r.id)}onTogglePin(){let r=this.item();r&&this.graphService.togglePin(r)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-relation-menu"]],viewQuery:function(n,i){if
11(n&1&&kt(It,7),n&2){let o;Te(o=ke())&&(i.menu=o.first)}},inputs:{item:[1,"item"],hasShortestPathOption:[1,"hasShortestPathOption"]},outputs:{shortestPathOption:"shortestPathOption"},exportAs:["menuRelation"],features:[wi([fl,_s])],decls:5,vars:0,consts:[["nested","matMenu"],[1,"relation-menu-panel"],["matMenuContent",""],[1,"p-1","flex","justify-center","items-center"],["mat-menu-item","",3,"click"],["mat-menu-item",""],["mat-menu-item","",3,"matMenuTriggerData","matMenuTriggerFor"],["diameter","20",1,"primary-progress-spinner"],[1,"text-gray"]],template:function(n,i){n&1&&(y(0,"mat-menu",1),re(1,e6,1,1,"ng-template",2),E(),y(2,"mat-menu",null,0),re(4,t6,6,1,"ng-template",2),E())},dependencies:[le,Dt,It,Oi,lc,it,Pt,qi,ki,zl,nt,Ge,rt],encapsulation:2})}}return e})();function r6(e,t){if(e&1){let r=U();y(0,"button",13),N("click",function(){let i=A(r).$implicit,o=S();return P(o.activeLayout=i)}),I(1),E()}if(e&2){let r=t.$implicit;w(),pe(r)}}function n6(e,t){if(e&1){let r=U();Z(),y(0,"g",14),N("click",function(){let i=A(r).$implicit,o=we(11),s=we(13),a=S();return P(a.onNodeAction(i,s,o))})("mousedown",function(i){A(r);let o=S();return P(o.onDragStart(i))})("mouseup",function(i){A(r);let o=S();return P(o.onDragEnd(i))}),y(1,"svg",15),V(2,"rect",16),y(3,"text",17),I(4),F(5,"shorten"),E()(),y(6,"title"),I(7),E(),V(8,"foreignObject",18),F(9,"safehtml"),V(10,"rect",19,4),E(),kl(),y(12,"ex-relation-menu",20,5),N("shortestPathOption",function(i){A(r);let o=S();return P(o.onStartShortestPath(i))}),E()}if(e&2){let r=t.$implicit,n=we(13),i=S();w(4),Fe(" ",Dl(5,6,r.label,20)," "),w(3),pe(r.label),w(),T("innerHTML",G(9,9,i.getSvg(r)),bi),w(2),T("matMenuTriggerFor",n.menu),w(2),T("hasShortestPathOption",!0)("item",r)}}function i6(e,t){e&1&&(Z(),y(0,"marker",21),V(1,"path",22),E())}function o6(e,t){if(e&1&&(Z(),y(0,"g",23),V(1,"path",24),y(2,"text",25)(3,"textPath",26),I(4),F(5,"transloco"),E()()()),e&2){let r=t.$implicit;w(),te("stroke-width",r.active?2:1),w(2),qr("dominant-baseline",r.dominantBaseline),te("href","#"+r.id),w(),Fe(" ",G(5,5,"explorer.relations."+r.label)," ")}}var aE=(()=>{class e{constructor(){this.graphService=R(Re),this.graphRepository=R(Nr),this.svg=R(ot),this.nodes$=this.graphRepository.filteredNodes$,this.edges$=this.graphRepository.filteredEdges$,this.panToNode$=this.graphRepository.panToNode$,this.dagreLayout=new mi,this.layouts=["dagre","d3ForceDirected","colaForceDirected"],this.activeLayout="dagre",this.shortestPathMode=!1,this.showMinimap=!0,this.autoZoom=!1,this.autoCenter=!1,this.selectionModel=new Or(!0),this.isDragging=!1,this.dragStart=0}getSvg(r){return ht(r,this.svg.data)}onStartShortestPath(r){this.selectionModel.clear(),this.shortestPathMode=!0,this.selectionModel.select(r)}onEndShortestPath(r){if(this.shortestPathMode=!1,this.selectionModel.select(r),this.selectionModel.selected.length!==2)return;let n=this.selectionModel.selected[0],i=this.selectionModel.selected[1];this.graphService.findShortestPath(n.data.id,i.data.id),this.selectionModel.clear()}onNodeAction(r,n,i){if(!this.isDragging){if(this.shortestPathMode){this.onEndShortestPath(r);return}n.onFetchRelations(),i.openMenu()}}onDragStart(){this.isDragging=!0,this.dragStart=Date.now()}onDragEnd(){Date.now()-this.dragStart<300&&(this.isDragging=!1)}onCancelPanToNode(){this.graphService.panToNode(null)}onDeleteOrphans(){this.graphService.removeOrphanNodes()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-graph"]],decls:39,vars:36,consts:[["menu","matMenu"],["nodeTemplate",""],["defsTemplate",""],["linkTemplate",""],["menuTrigger","matMenuTrigger"],["m","menuRelation"],[1,"h-full","flex","flex-col"],[1,"flex","justify-between","border-bottom"],["mat-icon-button","",3,"click","disabled","title"],["mat-icon-button","",3,"click","title"],["mat-menu-item",""],[1,"flex-auto"],[3,"draggingEnabled","layout","links","nodes","panToNode$","showMiniMap","autoCenter","autoZoom"],["mat-menu-item","",3,"click"],[1,"node",3,"click","mousedown","mouseup"],["height","30","width","190","x","35","y","12.5"],["fill","white","height","25","rx","10px","ry","10px","stroke","#eee","stroke-linejoin","round","stroke-width","2.5px","width","185","x","2.5","y","2.5"],["dominant-baseline","middle","text-anchor","middle","x","52%","y","50%",2,"font-family","monospace"],["height","50","width","50",3,"innerHTML"],[3,"matMenuTriggerFor"],[3,"shortestPathOption","hasShortestPathOption","item"],["id","arrow","markerHeight","4","markerWidth","4","orient","auto","refX","8","refY","0","viewBox","0 -5 10 10"],["d","M0,-5L10,0L0,5",1,"arrow-head"],[1,"edge"],["marker-end","url(#arrow)",1,"line"],["text-anchor","middle",1,"edge-label"],["startOffset","50%",1,"text-path"]],template:function(n,i){if
11(n&1){let o=U();y(0,"div",6)(1,"div",7)(2,"div")(3,"button",8),F(4,"async"),F(5,"transloco"),N("click",function(){return A(o),P(i.onCancelPanToNode())}),y(6,"mat-icon"),I(7,"close_fullscreen"),E()(),y(8,"button",9),F(9,"transloco"),N("click",function(){return A(o),P(i.onDeleteOrphans())}),y(10,"mat-icon"),I(11,"adjust"),E()()(),y(12,"div")(13,"button",9),F(14,"transloco"),N("click",function(){return A(o),P(i.autoCenter=!i.autoCenter)}),y(15,"mat-icon"),I(16,"center_focus_weak"),E()(),y(17,"button",9),F(18,"transloco"),N("click",function(){return A(o),P(i.autoZoom=!i.autoZoom)}),y(19,"mat-icon"),I(20,"search"),E()(),y(21,"button",9),F(22,"transloco"),N("click",function(){return A(o),P(i.showMinimap=!i.showMinimap)}),y(23,"mat-icon"),I(24,"map"),E()()(),y(25,"mat-menu",null,0),Se(27,r6,2,1,"button",10,Xe),E()(),y(29,"div",11)(30,"ngx-graph",12),F(31,"async"),F(32,"async"),re(33,n6,14,11,"ng-template",null,1,Ei)(35,i6,2,0,"ng-template",null,2,Ei)(37,o6,6,7,"ng-template",null,3,Ei),E()()()}n&2&&(w(3),T("disabled",G(4,20,i.panToNode$)===null)("title",G(5,22,"explorer.graph.cancel_centering")),w(5),T("title",G(9,24,"explorer.graph.delete_orphans")),w(5),Le("secondary-icon-button",i.autoCenter),T("title",G(14,26,"explorer.graph.automatic_centering")),w(4),Le("secondary-icon-button",i.autoZoom),T("title",G(18,28,"explorer.graph.automatic_zoom")),w(4),Le("secondary-icon-button",i.showMinimap),T("title",G(22,30,"explorer.graph.show_minimap")),w(6),Me(i.layouts),w(3),T("draggingEnabled",!i.shortestPathMode)("layout",i.dagreLayout)("links",G(31,32,i.edges$))("nodes",G(32,34,i.nodes$))("panToNode$",i.panToNode$)("showMiniMap",i.showMinimap)("autoCenter",i.autoCenter)("autoZoom",i.autoZoom))},dependencies:[le,sE,oE,Dt,It,Oi,it,At,Nt,an,nt,Ot,qt,Ge,mc,Ni,rt],styles:[`.line[_ngcontent-%COMP%]{stroke:#000!important}
12/*# sourceMappingURL=graph.component-QYHEE7M4.css.map */`]})}}return e})();var hE=Es(xE());var ys="layer_name",pl="style_node",dl="style_edge",ml="layer_node",s6="layer_edge",uE="EPSG:4326",lE="EPSG:3857",xs="type",a6="node",u6="edge",cE="id",gl="svg",vl="data",bs="edge_label",fE="edge_source_type",l6="edge_target_type",pE=(()=>{class e extends Mc{constructor(){super(),this.graphRepository=R(Nr),this.svg=R(ot),this.explorerEnv=R(Ti),this.transloco=R(Bl),this._nodeSource=null,this._edgeSource=null,this._zoom=2,this._center=[0,0],this.lastNodeIds=[],this.customSources={},this.graphRepository.panToNode$.pipe(Mi()).subscribe(r=>{if(!this._nodeSource)return;let i=this._nodeSource.getFeatures().find(s=>s.get(cE)===r);if(!i)return;let o=i.getGeometry()?.getExtent();!this.view||!o||this.view.fit(o,{maxZoom:8})})}get mapLayers(){return this.explorerEnv.env.mapLayers}get hasMapLayers(){return Object.keys(this.mapLayers).length>0}initNodes(r){let n=r.map(i=>i.id);if($l(n,this.lastNodeIds)){(this._nodeSource?this._nodeSource.getFeatures():[]).forEach(o=>{let s=r.find(a=>a.id===o.get("id"));s&&o.set(gl,ht(s,this.svg.data))});return}this.clearNodes();for(let i of r){let o=[i.data.lon||0,i.data.lat||0],s=Oc(o);s.set(xs,a6),s.set(cE,i.id),s.set(vl,i),s.set(gl,ht(i,this.svg.data)),s.getGeometry()?.transform(uE,lE),this.addNode(s)}this._nodeSource&&this._nodeSource.getFeatures().length>0&&this.view&&this.view.fit(this._nodeSource.getExtent(),{maxZoom:8}),this.lastNodeIds=n}updateMap(r){this.setMap(r)}init(r,n=[0,0]){this.lastNodeIds=[],this._zoom=r,this._center=n,this.initialize()}initEdges(r){this.clearEdges();for(let n of r){let i=Nc([n.start,n.end]);i.set(xs,u6),i.set(bs,n.label),i.set(fE,n.sourceEntityType),i.set(l6,n.targetEntityType),i.getGeometry()?.transform(uE,lE),this.addEdge(i)}}clearEdges(){if(this.hasMapLayers)Object.keys(this.customSources).forEach(r=>{let n=this.customSources[r];n.forEachFeature(i=>{i.get(xs)=="edge"&&n.removeFeature(i)})});else{if(!this._edgeSource)return;this._edgeSource.clear()}}mapClick(r){if(!this.map)return null;let n=this.map.forEachFeatureAtPixel(r.pixel,function(i){return i},{layerFilter:i=>i.get(ys)===ml});return n?n.get(vl):null}initControls(){let r=[];if(this.hasMapLayers){let n=new hE.default({reverse:!0,groupSelectStyle:"children"});r.push(n)}return r}initDynamicStyles(){return{[pl]:r=>[new hn({image:new qc({opacity:1,src:"data:image/svg+xml;base64,"+btoa('<?xml version="1.0"?>'+r.get(gl)),scale:.5})})],[dl]:r=>{let n=r.get(bs),i=[new hn({geometry:r.getGeometry(),stroke:new As({color:"#000",width:3})}),new hn({fill:new Di({color:"black"}),stroke:new As({color:"black",width:2}),text:new kc({text:this.transloco.translate("explorer.relations."+n),font:'14px "Roboto", Helvetica Neue, Helvetica, Arial, sans-serif',fill:new Di({color:"#0d0d0d"}),placement:"line",offsetY:15})})],o=r.getGeometry().getCoordinates(),s=o[0],a=o[1],u=[(o[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2],l=a[0]-s[0],c=a[1]-s[1],f=Math.atan2(c,l);return i.push(new hn({geometry:new bc(u),image:new Tc({fill:new Di({color:"#000"}
12),points:3,radius:8,rotation:-f,angle:Math.PI/2})})),i}}}initLayers(){this._nodeSource=new Fi;let r=new Li({source:this._nodeSource,style:s=>this.getDynamicStyle(pl,s)});r.set(ys,ml),this._edgeSource=new Fi;let n=new Li({source:this._edgeSource,style:s=>this.getDynamicStyle(dl,s)});n.set(ys,s6);let i=[];for(let s of Object.keys(this.mapLayers)){let a=new Fi;this.customSources[s]=a;let u=new Li({source:a,properties:{title:this.mapLayers[s].title},style:l=>l.get(bs)?this.getDynamicStyle(dl,l):this.getDynamicStyle(pl,l)});u.set(ys,ml),i.push(u)}let o=[new Ac({source:new Pc({wrapX:!0})})];return this.hasMapLayers?o.push(new Ec({properties:{title:"V\u0161e"},layers:i})):o.push(n,r),o}initStyles(){return{}}initInteractions(){return Cc().getArray()}initView(){return new wc({center:this._center,zoom:this._zoom})}clearNodes(){if(this.hasMapLayers)Object.keys(this.customSources).forEach(r=>{let n=this.customSources[r];n.forEachFeature(i=>{i.get(xs)=="node"&&n.removeFeature(i)})});else{if(!this._nodeSource)return;this._nodeSource.clear()}}addNode(r){if(!this.hasMapLayers&&this._nodeSource){this._nodeSource.addFeature(r);return}for(let n of Object.keys(this.mapLayers)){let i=this.customSources[n],o=this.mapLayers[n],s=r.get(vl),a=s.data.id,u=s.data.type,l=s.data.relations;o.rules.some(c=>!c.relationTypes||c.relationTypes.length===0?c.entityTypes.includes(u):c.entityTypes.includes(u)&&c.relationTypes.some(f=>l.includes(f)))&&i.addFeature(r)}}addEdge(r){if(!this.hasMapLayers&&this._edgeSource){this._edgeSource.addFeature(r);return}for(let n of Object.keys(this.mapLayers)){let i=this.customSources[n],o=this.mapLayers[n],s=r.get(fE),a=r.get(bs);o.rules.some(u=>!u.relationTypes||u.relationTypes.length===0?u.entityTypes.includes(s):u.entityTypes.includes(s)&&u.relationTypes.includes(a))&&i.addFeature(r)}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ye({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function dE(e,t){return t.flatMap(r=>{let n=e.find(o=>o.id===r.source),i=e.find(o=>o.id===r.target);return!n?.data.lon||!n?.data.lat||!i?.data.lon||!i?.data.lat?[]:[{start:[n.data.lon,n.data.lat],end:[i.data.lon,i.data.lat],label:r.label,sourceEntityType:n.data.type,targetEntityType:i.data.type,sourceEntityId:n.data.id,targetEntityId:i.data.id}]})}var mE=(()=>{class e{constructor(){this.mapService=R(pE),this.cdr=R(Ci),this.zone=R(fn),this.nodes=[],this.edges=[],this.entityDetailDialog=R(Jt)}ngOnInit(){this.initialize(),this.initEntities()}ngOnChanges(r){r.nodes.isFirstChange()||this.initEntities()}updateMap(){this.mapService.map&&this.mapService.map.updateSize()}onMapReady(r){this.mapService.updateMap(r)}onMapClick(r,n){this.zone.run(()=>{let i=this.mapService.mapClick(r);i&&this.entityDetailDialog.open({entity:i.data})})}initialize(){this.mapService.init(2)}initEntities(){let r=this.nodes.filter(i=>i.data.lat&&i.data.lon),n=dE(this.nodes,this.edges);this.mapService.initNodes(r),this.mapService.initEdges(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-map"]],viewQuery:function(n,i){if(n&1&&(kt(it,5),kt(It,5)),n&2){let o;Te(o=ke())&&(i.menuTrigger=o.first),Te(o=ke())&&(i.m=o.first)}},inputs:{nodes:"nodes",edges:"edges"},features:[Mr],decls:10,vars:18,consts:[["menuTrigger",""],["m","menuRelation"],["id","explorer-map",3,"mapClick","mapReady","controls","interactions","layers","overlays","view"],[1,"hidden",3,"matMenuTriggerFor"],[3,"hasShortestPathOption","item"]],template:function(n,i){if(n&1){let o=U();y(0,"aipb-ol-map",2),F(1,"async"),F(2,"async"),F(3,"async"),F(4,"async"),F(5,"async"),N("mapClick",function(a){A(o);let u=we(9);return P(i.onMapClick(a,u))})("mapReady",function(a){return A(o),P(i.onMapReady(a))}),E(),V(6,"div",3,0)(8,"ex-relation-menu",4,1)}if(n&2){let o=we(9);T("controls",G(1,8,i.mapService.controls$))("interactions",G(2,10,i.mapService.interactions$))("layers",G(3,12,i.mapService.layers$))("overlays",G(4,14,i.mapService.overlays))("view",G(5,16,i.mapService.view$)),w(6),T("matMenuTriggerFor",o.menu),w(2),T("hasShortestPathOption",!0)("item",i.currentNode)}},dependencies:[le,Sc,an,Dt,it,Ge],styles:[`aol-map{background-color:#fff;position:absolute;inset:0}
13/*# sourceMappingURL=map.component-TDTSIJNO.css.map */`]})}}return e})();function c6(e,t){if(e&1){let r=U();y(0,"mat-list-option",4),N("selectedChange",function(i){let o=A(r).$implicit,s=S(3);return P(s.onChange(o,i))}),y(1,"div",5),V(2,"ex-svg-icon",6),y(3,"span"),I(4),F(5,"transloco"),E(),y(6,"span",7),I(7),F(8,"numberTruncate"),E()()()}if(e&2){let r=t.$implicit;T("selected",r.checked),w(2),T("svg",r.icon),w(2),pe(G(5,4,"explorer.entityTypes."+r.id)),w(3),pe(G(8,6,r.count))}}function f6(e,t){if(e&1&&(y(0,"mat-selection-list",2),Se(1,c6,9,8,"mat-list-option",3,Xe),F(3,"async"),E()),e&2){let r=S(2);T("compareWith",r.compareFunction),w(),Me(G(3,1,r.items$))}}function h6(e,t){e&1&&V(0,"mat-divider")}function p6(e,t){if(e&1&&(ie(0,f6,4,3,"mat-selection-list",2),ie(1,h6,1,0,"mat-divider")),e&2){let r=t;oe(r.length>0?0:-1),w(),oe(r.length>0?1:-1)}}var gE=(()=>{class e{constructor(){this.filterRepository=R(Fc),this.items$=this.filterRepository.filters$,this.showHighlighted$=this.filterRepository.showHighlighted$,this.showPinned$=this.filterRepository.showPinned$,this.compareFunction=(r,n)=>r&&n&&r.id===n.id}onChange(r,n){r.checked!==n&&this.filterRepository.setFilterChecked(r,n)}onShowHighlightedChange(r){this.filterRepository.setShowHighlighted(r)}onShowPinnedChange(r){this.filterRepository.setShowPinned(r)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-filter"]],decls:11,vars:15,consts:[[1,"p-3","flex","flex-col","gap-3"],[3,"change","checked"],[3,"compareWith"],[3,"selected"],[3,"selectedChange","selected"],["mat-line","",1,"flex","items-center","gap-1"],[3,"svg"],[1,"text-sm","leading-none","rounded-lg","self-start","bg-gray-300","text-gray-700","p-1"]],template:function(n,i){if
13(n&1&&(ie(0,p6,2,2),F(1,"async"),y(2,"div",0)(3,"mat-slide-toggle",1),F(4,"async"),N("change",function(s){return i.onShowHighlightedChange(s.checked)}),I(5),F(6,"transloco"),E(),y(7,"mat-slide-toggle",1),F(8,"async"),N("change",function(s){return i.onShowPinnedChange(s.checked)}),I(9),F(10,"transloco"),E()()),n&2){let o;oe((o=G(1,5,i.items$))?0:-1,o),w(3),T("checked",G(4,7,i.showHighlighted$)),w(2),pe(G(6,9,"explorer.filter.only_highlighted")),w(2),T("checked",G(8,11,i.showPinned$)),w(2),pe(G(10,13,"explorer.filter.only_pinned"))}},dependencies:[le,ic,nc,rc,qi,Ft,Pt,Dc,Ic,nt,Ge,Gc,rt],encapsulation:2})}}return e})();var m6=e=>["border-bottom",e],g6=()=>["p-2 flex justify-between items-center"];function v6(e,t){if(e&1&&(y(0,"span",6),I(1),E()),e&2){let r=S();w(),pe(r.selection.selected.length)}}function _6(e,t){if(e&1){let r=U();y(0,"button",16),N("click",function(){A(r);let i=S();return P(i.onDeleteSelectedNodes())}),y(1,"mat-icon"),I(2,"delete_forever"),E()()}}function y6(e,t){if(e&1){let r=U();y(0,"button",17),N("click",function(){A(r);let i=S();return P(i.onDeleteUnselectedNodes())}),y(1,"mat-icon"),I(2,"delete"),E()()}}function x6(e,t){if(e&1){let r=U();y(0,"button",18),N("click",function(){A(r);let i=S();return P(i.onFetchRelationsOfSelectedNodes())}),y(1,"mat-icon"),I(2,"hub"),E()()}}function b6(e,t){if(e&1){let r=U();y(0,"button",19),N("click",function(){A(r);let i=S();return P(i.onUndo())}),y(1,"mat-icon"),I(2,"undo"),E()()}}function w6(e,t){e&1&&(y(0,"mat-icon",6),I(1,"map"),E())}function E6(e,t){if(e&1){let r=U();y(0,"div",14)(1,"div",14)(2,"div",20)(3,"div",21)(4,"mat-checkbox",22),N("change",function(){let i=A(r).$implicit,o=S();return P(o.selection.toggle(i.id))}),E(),y(5,"div",23),N("click",function(){let i=A(r).$implicit,o=S();return P(o.detail.emit(i))})("mouseenter",function(){let i=A(r).$implicit,o=S();return P(o.onHighlightNode(i))})("mouseleave",function(){let i=A(r).$implicit,o=S();return P(o.onUnhighlightNode(i))}),V(6,"ex-svg-icon",24),y(7,"span"),I(8),E(),ie(9,w6,2,0,"mat-icon",6),E()()(),y(10,"div",25)(11,"button",26),N("click",function(){let i=A(r).$implicit,o=S();return P(o.onPin(i))}),y(12,"mat-icon"),I(13,"keep"),E()(),y(14,"button",27),N("click",function(){A(r);let i=we(21);return P(i.onFetchRelations())}),y(15,"mat-icon"),I(16,"more_vert"),E()(),y(17,"button",28),N("click",function(){let i=A(r).$implicit,o=S();return P(o.onDelete(i))}),y(18,"mat-icon"),I(19,"delete"),E()(),V(20,"ex-relation-menu",29,0),E()()()}if(e&2){let r=t.$implicit,n=we(21),i=S();T("ngClass",qe(10,m6,r.isPinned?"bg-red-50":"bg-white")),w(),T("ngClass",Il(12,g6)),w(3),T("checked",i.selection.isSelected(r.id)),w(2),T("svg",i.getSvgIcon(r)),w(2),pe(r.data.label),w(),oe(i.hasCoordinates(r)?9:-1),w(2),Le("secondary-icon-button",r.isPinned),w(3),T("matMenuTriggerFor",n.menu),w(6),T("item",r)}}function C6(e,t){e&1&&(y(0,"div",15),I(1,"Nejsou dostupn\xE9 \u017E\xE1dn\xE9 v\xFDsledky"),E())}var vE=(()=>{class e{constructor(){this.graphService=R(Re),this.entityDetailDialog=R(Jt),this.svg=R(ot),this.nodes=ft([]),this.hasHistory=ft(!1),this.detail=ir(),this.selection=new Or(!0)}get allSelected(){return this.selection.selected.length===this.nodes().length}ngOnChanges(r){let i=this.selection.selected.filter(o=>!this.nodes().some(s=>s.id===o));this.selection.deselect(...i)}onHighlightNode(r){this.graphService.superHighlightNode(r)}onUnhighlightNode(r){this.graphService.unhighlightNode(r)}hasCoordinates(r){return r.data.lat&&r.data.lon}trackByFn(r,n){return n.id}onBatchSelection(){this.allSelected?this.selection.clear():this.selection.select(...this.nodes().map(r=>r.id))}onDeleteSelectedNodes(){this.graphService.removeNodes(this.selection.selected),this.selection.clear()}onSave(){this.graphService.save()}onDelete(r){this.graphService.removeNode(r.id)}getSvgIcon(r){return ht(r,this.svg.data)}onClearHighlight(){this.graphService.unhighlightAll()}onDetail(r){this.entityDetailDialog.open({entity:r.data})}onPin(r){this.graphService.togglePin(r)}onClearPins(){this.graphService.unpinAll()}onDeleteUnselectedNodes(){let r=this.nodes().filter(n=>!this.selection.isSelected(n.id));this.graphService.removeNodes(r.map(n=>n.id)),this.selection.clear()}onFetchRelationsOfSelectedNodes(){Cl(this.selection.selected.map(r=>{let n=this.nodes().find(i=>i.id===r);return n?this.graphService.fetchAllRelations(n.data.genID):rr(null)})).subscribe()}onUndo(){this.graphService.restoreHistory()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-result-list"]],inputs:{nodes:[1,"nodes"],hasHistory:[1,"hasHistory"]},outputs:{detail:"detail"},features:[Mr],decls:25,vars:9,consts:[["m","menuRelation"],["autosize","",1,"flex-auto","overflow-auto"],["mode","side",3,"opened"],[1,"border-bottom","flex","items-center","justify-between"],[1,"pl-2","flex","items-center"],[1,"ml-2",3,"change","checked","indeterminate"],[1,"text-gray"],["mat-icon-button","","title","Odstranit ozna\u010Den\xE9"],["mat-icon-button","","title","Odstranit neozna\u010Den\xE9"],["mat-icon-button","","title","Na\u010D\xEDst vazby ozna\u010Den\xFDch"],["mat-icon-button","","title","Vr\xE1tit zp\u011Bt"],["mat-icon-button","","title","Ulo\u017Eit pr\u016Fzkum",3,"click"],["mat-icon-button","","title","Zru\u0161it p\u0159ipnut\xE9",1,"error-icon-button",3,"click"],["mat-icon-button","","title","Zru\u0161it ozna\u010Den\xED",3,"click"],[3,"ngClass"],[1,"text-error","p-2"],["mat-icon-button","","title","Odstranit ozna\u010Den\xE9",3,"click"],["mat-icon-button","","title","Odstranit neozna\u010Den\xE9",3,"click"],["mat-icon-button","","title","Na\u010D\xEDst vazby ozna\u010Den\xFDch",3,"click"],["mat-icon-button","","title","Vr\xE1tit zp\u011Bt",3,"click"],[1,"flex-auto"],[1,"flex","gap-2","items-center"],[1,"mx-2",3,"change","checked"],[1,"flex","items-center","gap-2","cursor-pointer",3,"click","mouseenter","mouseleave"],["size","large",3,"svg"],[1,"flex"],["mat-icon-button","","title","P\u0159ipnout",3,"click"],["mat-icon-button","",3,"click","matMenuTriggerFor"],["mat-icon-button","","title","Odstranit",3,"click"],[3,"item"]],template:function(n,i){n&1&&(y(0,"mat-drawer-container",1)(1,"mat-drawer",2),V(2,"ex-filter"),E(),y(3,"mat-drawer-content")(4,"div",3)(5,"div",4)(6,"mat-checkbox",5),N("change",function(){return i.onBatchSelection()}),ie(7,v6,2,1,"span",6),E(),ie(8,_6,3,0,"button",7),ie(9,y6,3,0,"button",8),ie(10,x6,3,0,"button",9),E(),y(11,"div"),ie(12,b6,3,0,"button",10),y(13,"button",11),N("click",function(){return i.onSave()}),y(14,"mat-icon"),I(15,"save"),E()(),y(16,"button",12),N("click",function(){return i.onClearPins()}),y(17,"mat-icon"),I(18,"keep"),E()(),y(19,"button",13),N("click",function(){return i.onClearHighlight()}),y(20,"mat-icon"),I(21,"ink_highlighter"),E()()()(),Se(22,E6,22,13,"div",14,i.trackByFn,!0),ie(24,C6,2,0,"div",15),E()()),n&2&&(w(),T("opened",!0),w(5),T("checked",i.allSelected)("indeterminate",!!i.selection.selected.length&&!i.allSelected),w(),oe(i.selection.isEmpty()?-1:7),w(),oe(i.selection.isEmpty()?-1:8),w(),oe(i.selection.selected.length>0&&i.selection.selected.length!==i.nodes().length?9:-1),w(),oe(i.selection.isEmpty()?-1:10),w(2),oe(i.hasHistory()?12:-1),w(10),Me(i.nodes()),w(2),oe(i.nodes().length===0?24:-1))},dependencies:[le,Si,At,Nt,Dt,it,Pi,Ai,ki,Pt,Ii,yc,xc,_c,an,Ft,gE,Ot,qt],styles:[`[_nghost-%COMP%]{display:flex;flex-direction:column}.svg-icon[_ngcontent-%COMP%]     svg{width:16px;height:16px}
14/*# sourceMappingURL=result-list.component-LHFBG5BQ.css.map */`]})}}return e})();var _l=(()=>{class e{constructor(){this.searchService=R($i),this.api=R(Gi),this.graph=R(Re),this._loading=new bl({search:!1,addToSearch:!1,removeFromSearch:!1}),this.loading$=this._loading.asObservable()}autocomplete(r){return this.api.autocomplete(r)}onSearch(r){this.search(null,r,!0)}onAddToSearch(r){this.search(null,r,!1)}onRemoveFromSearch(r){this._loading.next({search:!1,addToSearch:!1,removeFromSearch:!0}),this.api.autocomplete(r||"",null).pipe(Mt(n=>{this.graph.removeNodes(n.result.map(i=>"_"+i.id))}),un(()=>{this._loading.next({search:!1,addToSearch:!1,removeFromSearch:!1})})).subscribe()}search(r,n,i){this._loading.next({search:i,addToSearch:!i,removeFromSearch:!1}),this.searchService.search(r||"",n||"",i).pipe(un(()=>{this._loading.next({search:!1,addToSearch:!1,removeFromSearch:!1})})).subscribe()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Ye({token:e,factory:e.\u0275fac})}}return e})();function S6(e,t){if(e&1){let r=U();y(0,"mat-option")(1,"mat-checkbox",11),N("change",function(){let i=A(r).$implicit,o=S();return P(o.selectionModel.toggle(i))})("click",function(i){return A(r),P(i.stopPropagation())}),y(2,"div",12),V(3,"ex-svg-icon",13),y(4,"span"),I(5),E()()()()}if(e&2){let r=t.$implicit,n=S();w(),T("checked",n.selectionModel.isSelected(r)),w(2),T("svg",n.getSvg(r)),w(2),pe(r.label)}}function M6(e,t){if(e&1){let r=U();y(0,"button",14),N("click",function(){A(r);let i=S();return P(i.clear())}),y(1,"mat-icon"),I(2,"clear"),E()()}}var _E=(()=>{class e{constructor(){this.searchFormService=R(_l),this.graphService=R(Re),this.svg=R(ot),this.explorerEnv=R(Ti),this.autocompleteFormControl=new 
14Ul(this.explorerEnv.env.initialSearchQuery),this.loading$=this.searchFormService.loading$,this.autocompleteItems=rr([]),this.selectionModel=new Or(!0,[]),this.fetchEntities=R(Ri)}ngOnInit(){this.autocompleteItems=this.autocompleteFormControl.valueChanges.pipe(Tl("syn"),Ml(),xi(300),El(r=>this.searchFormService.autocomplete(r).pipe(Mt(()=>this.selectionModel.clear()))),yi(r=>r.result))}onSearch(){this.selectionModel.isEmpty()?this.searchFormService.onSearch(this.autocompleteFormControl.value):this.fetchEntities.execute({ids:this.selectionModel.selected.map(r=>r.id),clear:!0}).subscribe(),this.clear()}onAddToSearch(){this.selectionModel.isEmpty()?this.searchFormService.onAddToSearch(this.autocompleteFormControl.value):this.fetchEntities.execute({ids:this.selectionModel.selected.map(r=>r.id),clear:!1}).subscribe(),this.clear()}clear(){this.autocompleteFormControl.setValue(""),this.selectionModel.clear()}getSvg(r){return this.svg.data?.[r.type]?.default}onRemoveFromSearch(){this.selectionModel.isEmpty()?this.searchFormService.onRemoveFromSearch(this.autocompleteFormControl.value):this.graphService.removeNodes(this.selectionModel.selected.map(r=>"_"+r.id))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-search-form"]],features:[wi([_l])],decls:36,vars:23,consts:[["auto","matAutocomplete"],[1,"p-2","flex","items-center","gap-2"],["aria-label","Number","matInput","","placeholder","Vyhledat entitu","type","text",1,"flex-auto","border","rounded","border-gray",3,"formControl","matAutocomplete"],[1,"flex","items-center"],["mat-icon-button","","title","Smazat"],["mat-flat-button","","title","Nov\xE9 hled\xE1n\xED",1,"hidden","xl:inline-flex",3,"click","loading"],["mat-icon-button","","title","Nov\xE9 hled\xE1n\xED",1,"inline-flex","xl:hidden",3,"click","loading"],["mat-flat-button","","title","P\u0159idat",1,"hidden","xl:inline-flex",3,"click","loading"],["mat-icon-button","","title","P\u0159idat",1,"inline-flex","xl:hidden",3,"click","loading"],["mat-flat-button","","title","Odebrat",1,"hidden","xl:inline-flex",3,"click","loading"],["mat-icon-button","","title","Odebrat",1,"inline-flex","xl:hidden",3,"click","loading"],[3,"change","click","checked"],[1,"flex","gap-1","items-center"],[3,"svg"],["mat-icon-button","","title","Smazat",3,"click"]],template:function(n,i){if(n&1){let o=U();y(0,"div",1),V(1,"input",2),y(2,"mat-autocomplete",null,0),Se(4,S6,6,3,"mat-option",null,Xe),F(6,"async"),E(),y(7,"div",3),ie(8,M6,3,0,"button",4),y(9,"button",5),F(10,"async"),N("click",function(){return A(o),P(i.onSearch())}),y(11,"mat-icon"),I(12,"search"),E(),I(13," Nov\xE9 hled\xE1n\xED "),E(),y(14,"button",6),F(15,"async"),N("click",function(){return A(o),P(i.onSearch())}),y(16,"mat-icon"),I(17,"search"),E()(),y(18,"button",7),F(19,"async"),N("click",function(){return A(o),P(i.onAddToSearch())}),y(20,"mat-icon"),I(21,"zoom_in"),E(),I(22," P\u0159idat "),E(),y(23,"button",8),F(24,"async"),N("click",function(){return A(o),P(i.onAddToSearch())}),y(25,"mat-icon"),I(26,"zoom_in"),E()(),y(27,"button",9),F(28,"async"),N("click",function(){return A(o),P(i.onRemoveFromSearch())}),y(29,"mat-icon"),I(30,"zoom_out"),E(),I(31," Odebrat "),E(),y(32,"button",10),F(33,"async"),N("click",function(){return A(o),P(i.onRemoveFromSearch())}),y(34,"mat-icon"),I(35,"zoom_out"),E()()()()}if(n&2){let o=we(3);w(),T("formControl",i.autocompleteFormControl)("matAutocomplete",o),w(3),Me(G(6,9,i.autocompleteItems)),w(4),oe(i.autocompleteFormControl.value?8:-1),w(),T("loading",G(10,11,i.loading$).search),w(5),T("loading",G(15,13,i.loading$).search),w(4),T("loading",G(19,15,i.loading$).addToSearch),w(5),T("loading",G(24,17,i.loading$).addToSearch),w(4),T("loading",G(28,19,i.loading$).removeFromSearch),w(5),T("loading",G(33,21,i.loading$).removeFromSearch)}},dependencies:[le,Xl,jl,Hl,Wl,Yl,Ql,Zl,At,Vl,Nt,uc,sc,oc,ac,Pi,Ai,Ft,vc,gc,Ot,qt,Ge],styles:[`input[_ngcontent-%COMP%]{padding:.5rem}.svg-icon[_ngcontent-%COMP%]     svg{width:16px;height:16px}
15/*# sourceMappingURL=search-form.component-PJ5XRL5O.css.map */`]})}}return e})();function T6(e,t){e&1&&V(0,"ex-graph",10)}function k6(e,t){if(e&1&&(V(0,"ex-map",11),F(1,"async"),F(2,"async")),e&2){let r=S();
15T("edges",G(1,2,r.edges$))("nodes",G(2,4,r.nodes$))}}function q6(e,t){if(e&1){let r=U();y(0,"ex-adjacency-list",12),F(1,"async"),F(2,"async"),N("detail",function(i){A(r);let o=S();return P(o.onDetail(i))})("removeNode",function(i){A(r);let o=S();return P(o.onRemoveNode(i))}),E()}if(e&2){let r=S();T("edges",G(1,2,r.edges$))("nodes",G(2,4,r.nodes$))}}var yE=(()=>{class e{constructor(){this.graphRepository=R(Nr),this.graphService=R(Re),this.route=R(Rl),this.searchService=R($i),this.entityDetailDialog=R(Jt),this.edges$=this.graphRepository.filteredEdges$,this.nodes$=this.graphRepository.filteredNodes$,this.hasHistory$=this.graphRepository.hasHistory$,this.tabIndex=cn(0),this.destroyRef=R(ql),this.fetchEntities=R(Ri)}ngOnInit(){this.route.queryParams.pipe(Mt(r=>{let{ids:n,entityType:i,q:o,tabIndex:s}=r;if(s&&this.tabIndex.set(+s),n){this.fetchEntities.execute({ids:n.split(",").map(a=>+a),clear:!0});return}if(i||o){this.searchService.search(i,o,!0).subscribe();return}}),Mi(this.destroyRef)).subscribe()}onTabChange(r){this.tabIndex.set(r)}onRemoveNode(r){this.graphService.removeNode(r.id)}onDetail(r){this.entityDetailDialog.open({entity:r.data})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=ue({type:e,selectors:[["ex-research-page"]],decls:22,vars:17,consts:[[1,"container-fluid","py-3","h-full"],[1,"row","h-full"],[1,"md:col-6","h-full"],[1,"h-full","flex","flex-col","gap-2"],[1,"flex-auto","overflow-auto"],[1,"h-full",3,"detail","hasHistory","nodes"],[1,"h-full"],[1,"h-full",3,"selectedIndexChange","mat-stretch-tabs","selectedIndex"],[3,"label"],["matTabContent",""],[1,"block","h-full"],[1,"h-full",3,"edges","nodes"],[3,"detail","removeNode","edges","nodes"]],template:function(n,i){n&1&&(y(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"aipb-simple-card"),V(5,"ex-search-form"),E(),y(6,"aipb-simple-card",4)(7,"ex-result-list",5),F(8,"async"),F(9,"async"),N("detail",function(s){return i.onDetail(s)}
15),E()()()(),y(10,"div",2)(11,"aipb-simple-card",6)(12,"mat-tab-group",7),N("selectedIndexChange",function(s){return i.onTabChange(s)}),y(13,"mat-tab",8),F(14,"transloco"),re(15,T6,1,0,"ng-template",9),E(),y(16,"mat-tab",8),F(17,"transloco"),re(18,k6,3,6,"ng-template",9),E(),y(19,"mat-tab",8),F(20,"transloco"),re(21,q6,3,6,"ng-template",9),E()()()()()()),n&2&&(w(7),T("hasHistory",G(8,7,i.hasHistory$))("nodes",G(9,9,i.nodes$)),w(5),T("mat-stretch-tabs",!1)("selectedIndex",i.tabIndex()),w(),T("label",G(14,11,"explorer.exploration_page.graph")),w(3),T("label",G(17,13,"explorer.exploration_page.map")),w(3),T("label",G(20,15,"explorer.exploration_page.context")))},dependencies:[le,Lc,vE,mE,_E,aE,Rc,Pt,dc,fc,hc,pc,Ii,nt,Ge,rt],encapsulation:2})}}return e})();var Yre=[{path:cc.explorationDefaultPath,component:yE}];export{Yre as ExplorationRoutes};
16//# sourceMappingURL=chunk-RW6DGLSO.js.map
17
18//# debugId=632396b9-27cd-56e3-b9bd-376da9f50ee4

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.