@reltio/remotes 1.4.1021 → 1.4.1022
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1224.js +2 -0
- package/{7110.js.LICENSE.txt → 1224.js.LICENSE.txt} +0 -0
- package/{2405.css → 3500.css} +0 -0
- package/3500.js +1 -0
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/2405.js +0 -1
- package/7110.js +0 -2
package/1224.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 1224.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1224],{82726:(t,e,r)=>{"use strict";var n=r(14859);e.Z=void 0;var i=n(r(24328)),o=(0,n(r(50175)).default)(i.default.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");e.Z=o},8884:t=>{t.exports=function(t,e){var r=e.length;if(0!==r){var n=t.length;t.length+=r;for(var i=0;i<r;i++)t[n+i]=e[i]}}},19869:t=>{t.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}},36061:(t,e)=>{e.assign=function(t){t=t||{};var e,r,n,i=Array.prototype.slice.call(arguments).slice(1);for(e=0,n=i.length;e<n;e++)if(i[e])for(r in i[e])t[r]=i[e][r];return t},e.validateSettings=function(t){return"linLogMode"in t&&"boolean"!=typeof t.linLogMode?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in t&&"boolean"!=typeof t.outboundAttractionDistribution?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in t&&"boolean"!=typeof t.adjustSizes?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in t&&"number"!=typeof t.edgeWeightInfluence?{message:"the `edgeWeightInfluence` setting should be a number."}:!("scalingRatio"in t)||"number"==typeof t.scalingRatio&&t.scalingRatio>=0?"strongGravityMode"in t&&"boolean"!=typeof t.strongGravityMode?{message:"the `strongGravityMode` setting should be a boolean."}:!("gravity"in t)||"number"==typeof t.gravity&&t.gravity>=0?"slowDown"in t&&!("number"==typeof t.slowDown||t.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in t&&"boolean"!=typeof t.barnesHutOptimize?{message:"the `barnesHutOptimize` setting should be a boolean."}:!("barnesHutTheta"in t)||"number"==typeof t.barnesHutTheta&&t.barnesHutTheta>=0?null:{message:"the `barnesHutTheta` setting should be a number >= 0."}:{message:"the `gravity` setting should be a number >= 0."}:{message:"the `scalingRatio` setting should be a number >= 0."}},e.graphToByteArrays=function(t,e){var r,n=t.order,i=t.size,o={},a=new Float32Array(10*n),u=new Float32Array(3*i);return r=0,t.forEachNode((function(e,n){o[e]=r,a[r]=n.x,a[r+1]=n.y,a[r+2]=0,a[r+3]=0,a[r+4]=0,a[r+5]=0,a[r+6]=1+t.degree(e),a[r+7]=1,a[r+8]=n.size||1,a[r+9]=n.fixed?1:0,r+=10})),r=0,t.forEachEdge((function(t,n,i,a){u[r]=o[i],u[r+1]=o[a],u[r+2]=function(t){if(!e)return 1;var r=t[e];return("number"!=typeof r||isNaN(r))&&(r=1),r}(n),r+=3})),{nodes:a,edges:u}},e.assignLayoutChanges=function(t,e,r){var n=0;t.updateEachNodeAttributes((function(t,i){return i.x=e[n],i.y=e[n+1],n+=10,r?r(t,i):i}))},e.readGraphPositions=function(t,e){var r=0;t.forEachNode((function(t,n){e[r]=n.x,e[r+1]=n.y,r+=10}))},e.collectLayoutChanges=function(t,e,r){for(var n=t.nodes(),i={},o=0,a=0,u=e.length;o<u;o+=10){if(r){var s=Object.assign({},t.getNodeAttributes(n[a]));s.x=e[o],s.y=e[o+1],s=r(n[a],s),i[n[a]]={x:s.x,y:s.y}}else i[n[a]]={x:e[o],y:e[o+1]};a++}return i},e.createWorker=function(t){var e=window.URL||window.webkitURL,r=t.toString(),n=e.createObjectURL(new Blob(["("+r+").call(this);"],{type:"text/javascript"})),i=new Worker(n);return e.revokeObjectURL(n),i}},3660:(t,e,r)=>{var n=r(31880),i=r(8725),o=r(36061),a=r(19869);function u(t,e,r){if(!n(e))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");"number"==typeof r&&(r={iterations:r});var u=r.iterations;if("number"!=typeof u)throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(u<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var s=r.attributes||{},c=r.weighted?s.weight||"weight":null,h="function"==typeof r.outputReducer?r.outputReducer:null,l=o.assign({},a,r.settings),d=o.validateSettings(l);if(d)throw new Error("graphology-layout-forceatlas2: "+d.message);var f,p=o.graphToByteArrays(e,c);for(f=0;f<u;f++)i(l,p.nodes,p.edges);if(!t)return o.collectLayoutChanges(e,p.nodes);o.assignLayoutChanges(e,p.nodes,h)}var s=u.bind(null,!1);s.assign=u.bind(null,!0),s.inferSettings=function(t){var e="number"==typeof t?t:t.order;return{barnesHutOptimize:e>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(e)}},t.exports=s},8725:t=>{var e=10;t.exports=function(t,r,n){var i,o,a,u,s,c,h,l,d,f,p,g,y,v,m,b,w,_,x,E,A,S,L,k=r.length,C=n.length,M=t.adjustSizes,O=t.barnesHutTheta*t.barnesHutTheta,D=[];for(a=0;a<k;a+=e)r[a+4]=r[a+2],r[a+5]=r[a+3],r[a+2]=0,r[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<k;a+=e)p+=r[a+6];p/=k/e}if(t.barnesHutOptimize){var F,T,P,G=1/0,R=-1/0,N=1/0,j=-1/0;for(a=0;a<k;a+=e)G=Math.min(G,r[a+0]),R=Math.max(R,r[a+0]),N=Math.min(N,r[a+1]),j=Math.max(j,r[a+1]);var z=R-G,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:R=(G-=(U-z)/2)+U,D[0]=-1,D[1]=(G+R)/2,D[2]=(N+j)/2,D[3]=Math.max(R-G,j-N),D[4]=-1,D[5]=-1,D[6]=0,D[7]=0,D[8]=0,i=1,a=0;a<k;a+=e)for(o=0,P=3;;){if(!(D[o+5]>=0)){if(D[o+0]<0){D[o+0]=a;break}if(D[o+5]=9*i,l=D[o+3]/2,D[(d=D[o+5])+0]=-1,D[d+1]=D[o+1]-l,D[d+2]=D[o+2]-l,D[d+3]=l,D[d+4]=d+9,D[d+5]=-1,D[d+6]=0,D[d+7]=0,D[d+8]=0,D[(d+=9)+0]=-1,D[d+1]=D[o+1]-l,D[d+2]=D[o+2]+l,D[d+3]=l,D[d+4]=d+9,D[d+5]=-1,D[d+6]=0,D[d+7]=0,D[d+8]=0,D[(d+=9)+0]=-1,D[d+1]=D[o+1]+l,D[d+2]=D[o+2]-l,D[d+3]=l,D[d+4]=d+9,D[d+5]=-1,D[d+6]=0,D[d+7]=0,D[d+8]=0,D[(d+=9)+0]=-1,D[d+1]=D[o+1]+l,D[d+2]=D[o+2]+l,D[d+3]=l,D[d+4]=D[o+4],D[d+5]=-1,D[d+6]=0,D[d+7]=0,D[d+8]=0,i+=4,F=r[D[o+0]+0]<D[o+1]?r[D[o+0]+1]<D[o+2]?D[o+5]:D[o+5]+9:r[D[o+0]+1]<D[o+2]?D[o+5]+18:D[o+5]+27,D[o+6]=r[D[o+0]+6],D[o+7]=r[D[o+0]+0],D[o+8]=r[D[o+0]+1],D[F+0]=D[o+0],D[o+0]=-1,F===(T=r[a+0]<D[o+1]?r[a+1]<D[o+2]?D[o+5]:D[o+5]+9:r[a+1]<D[o+2]?D[o+5]+18:D[o+5]+27)){if(P--){o=F;continue}P=3;break}D[T+0]=a;break}F=r[a+0]<D[o+1]?r[a+1]<D[o+2]?D[o+5]:D[o+5]+9:r[a+1]<D[o+2]?D[o+5]+18:D[o+5]+27,D[o+7]=(D[o+7]*D[o+6]+r[a+0]*r[a+6])/(D[o+6]+r[a+6]),D[o+8]=(D[o+8]*D[o+6]+r[a+1]*r[a+6])/(D[o+6]+r[a+6]),D[o+6]+=r[a+6],o=F}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<k;a+=e)for(o=0;;)if(D[o+5]>=0){if(b=Math.pow(r[a+0]-D[o+7],2)+Math.pow(r[a+1]-D[o+8],2),4*(f=D[o+3])*f/b<O){if(y=r[a+0]-D[o+7],v=r[a+1]-D[o+8],!0===M?b>0?(w=g*r[a+6]*D[o+6]/b,r[a+2]+=y*w,r[a+3]+=v*w):b<0&&(w=-g*r[a+6]*D[o+6]/Math.sqrt(b),r[a+2]+=y*w,r[a+3]+=v*w):b>0&&(w=g*r[a+6]*D[o+6]/b,r[a+2]+=y*w,r[a+3]+=v*w),(o=D[o+4])<0)break;continue}o=D[o+5]}else if((c=D[o+0])>=0&&c!==a&&(b=(y=r[a+0]-r[c+0])*y+(v=r[a+1]-r[c+1])*v,!0===M?b>0?(w=g*r[a+6]*r[c+6]/b,r[a+2]+=y*w,r[a+3]+=v*w):b<0&&(w=-g*r[a+6]*r[c+6]/Math.sqrt(b),r[a+2]+=y*w,r[a+3]+=v*w):b>0&&(w=g*r[a+6]*r[c+6]/b,r[a+2]+=y*w,r[a+3]+=v*w)),(o=D[o+4])<0)break}else for(g=t.scalingRatio,u=0;u<k;u+=e)for(s=0;s<u;s+=e)y=r[u+0]-r[s+0],v=r[u+1]-r[s+1],!0===M?(b=Math.sqrt(y*y+v*v)-r[u+8]-r[s+8])>0?(w=g*r[u+6]*r[s+6]/b/b,r[u+2]+=y*w,r[u+3]+=v*w,r[s+2]+=y*w,r[s+3]+=v*w):b<0&&(w=100*g*r[u+6]*r[s+6],r[u+2]+=y*w,r[u+3]+=v*w,r[s+2]-=y*w,r[s+3]-=v*w):(b=Math.sqrt(y*y+v*v))>0&&(w=g*r[u+6]*r[s+6]/b/b,r[u+2]+=y*w,r[u+3]+=v*w,r[s+2]-=y*w,r[s+3]-=v*w);for(d=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<k;a+=e)w=0,y=r[a+0],v=r[a+1],b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)),t.strongGravityMode?b>0&&(w=g*r[a+6]*d):b>0&&(w=g*r[a+6]*d/b),r[a+2]-=y*w,r[a+3]-=v*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<C;h+=3)u=n[h+0],s=n[h+1],l=n[h+2],m=Math.pow(l,t.edgeWeightInfluence),y=r[u+0]-r[s+0],v=r[u+1]-r[s+1],!0===M?(b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)-r[u+8]-r[s+8]),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/r[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*m/r[u+6]):b>0&&(w=-g*m)):(b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/r[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*m/r[u+6]):(b=1,w=-g*m)),b>0&&(r[u+2]+=y*w,r[u+3]+=v*w,r[s+2]-=y*w,r[s+3]-=v*w);if(!0===M)for(a=0;a<k;a+=e)1!==r[a+9]&&((_=Math.sqrt(Math.pow(r[a+2],2)+Math.pow(r[a+3],2)))>10&&(r[a+2]=10*r[a+2]/_,r[a+3]=10*r[a+3]/_),x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,A=.1*Math.log(1+E)/(1+Math.sqrt(x)),S=r[a+0]+r[a+2]*(A/t.slowDown),r[a+0]=S,L=r[a+1]+r[a+3]*(A/t.slowDown),r[a+1]=L);else for(a=0;a<k;a+=e)1!==r[a+9]&&(x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,A=r[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),r[a+7]=Math.min(1,Math.sqrt(A*(Math.pow(r[a+2],2)+Math.pow(r[a+3],2))/(1+Math.sqrt(x)))),S=r[a+0]+r[a+2]*(A/t.slowDown),r[a+0]=S,L=r[a+1]+r[a+3]*(A/t.slowDown),r[a+1]=L);return{}}},61026:t=>{t.exports=function(){var t,e,r,n={};r=10,n.exports=function(t,e,n){var i,o,a,u,s,c,h,l,d,f,p,g,y,v,m,b,w,_,x,E,A,S,L,k=e.length,C=n.length,M=t.adjustSizes,O=t.barnesHutTheta*t.barnesHutTheta,D=[];for(a=0;a<k;a+=r)e[a+4]=e[a+2],e[a+5]=e[a+3],e[a+2]=0,e[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<k;a+=r)p+=e[a+6];p/=k/r}if(t.barnesHutOptimize){var F,T,P,G=1/0,R=-1/0,N=1/0,j=-1/0;for(a=0;a<k;a+=r)G=Math.min(G,e[a+0]),R=Math.max(R,e[a+0]),N=Math.min(N,e[a+1]),j=Math.max(j,e[a+1]);var z=R-G,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:R=(G-=(U-z)/2)+U,D[0]=-1,D[1]=(G+R)/2,D[2]=(N+j)/2,D[3]=Math.max(R-G,j-N),D[4]=-1,D[5]=-1,D[6]=0,D[7]=0,D[8]=0,i=1,a=0;a<k;a+=r)for(o=0,P=3;;){if(!(D[o+5]>=0)){if(D[o+0]<0){D[o+0]=a;break}if(D[o+5]=9*i,l=D[o+3]/2,D[(d=D[o+5])+0]=-1,D[d+1]=D[o+1]-l,D[d+2]=D[o+2]-l,D[d+3]=l,D[d+4]=d+9,D[d+5]=-1,D[d+6]=0,D[d+7]=0,D[d+8]=0,D[(d+=9)+0]=-1,D[d+1]=D[o+1]-l,D[d+2]=D[o+2]+l,D[d+3]=l,D[d+4]=d+9,D[d+5]=-1,D[d+6]=0,D[d+7]=0,D[d+8]=0,D[(d+=9)+0]=-1,D[d+1]=D[o+1]+l,D[d+2]=D[o+2]-l,D[d+3]=l,D[d+4]=d+9,D[d+5]=-1,D[d+6]=0,D[d+7]=0,D[d+8]=0,D[(d+=9)+0]=-1,D[d+1]=D[o+1]+l,D[d+2]=D[o+2]+l,D[d+3]=l,D[d+4]=D[o+4],D[d+5]=-1,D[d+6]=0,D[d+7]=0,D[d+8]=0,i+=4,F=e[D[o+0]+0]<D[o+1]?e[D[o+0]+1]<D[o+2]?D[o+5]:D[o+5]+9:e[D[o+0]+1]<D[o+2]?D[o+5]+18:D[o+5]+27,D[o+6]=e[D[o+0]+6],D[o+7]=e[D[o+0]+0],D[o+8]=e[D[o+0]+1],D[F+0]=D[o+0],D[o+0]=-1,F===(T=e[a+0]<D[o+1]?e[a+1]<D[o+2]?D[o+5]:D[o+5]+9:e[a+1]<D[o+2]?D[o+5]+18:D[o+5]+27)){if(P--){o=F;continue}P=3;break}D[T+0]=a;break}F=e[a+0]<D[o+1]?e[a+1]<D[o+2]?D[o+5]:D[o+5]+9:e[a+1]<D[o+2]?D[o+5]+18:D[o+5]+27,D[o+7]=(D[o+7]*D[o+6]+e[a+0]*e[a+6])/(D[o+6]+e[a+6]),D[o+8]=(D[o+8]*D[o+6]+e[a+1]*e[a+6])/(D[o+6]+e[a+6]),D[o+6]+=e[a+6],o=F}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<k;a+=r)for(o=0;;)if(D[o+5]>=0){if(b=Math.pow(e[a+0]-D[o+7],2)+Math.pow(e[a+1]-D[o+8],2),4*(f=D[o+3])*f/b<O){if(y=e[a+0]-D[o+7],v=e[a+1]-D[o+8],!0===M?b>0?(w=g*e[a+6]*D[o+6]/b,e[a+2]+=y*w,e[a+3]+=v*w):b<0&&(w=-g*e[a+6]*D[o+6]/Math.sqrt(b),e[a+2]+=y*w,e[a+3]+=v*w):b>0&&(w=g*e[a+6]*D[o+6]/b,e[a+2]+=y*w,e[a+3]+=v*w),(o=D[o+4])<0)break;continue}o=D[o+5]}else if((c=D[o+0])>=0&&c!==a&&(b=(y=e[a+0]-e[c+0])*y+(v=e[a+1]-e[c+1])*v,!0===M?b>0?(w=g*e[a+6]*e[c+6]/b,e[a+2]+=y*w,e[a+3]+=v*w):b<0&&(w=-g*e[a+6]*e[c+6]/Math.sqrt(b),e[a+2]+=y*w,e[a+3]+=v*w):b>0&&(w=g*e[a+6]*e[c+6]/b,e[a+2]+=y*w,e[a+3]+=v*w)),(o=D[o+4])<0)break}else for(g=t.scalingRatio,u=0;u<k;u+=r)for(s=0;s<u;s+=r)y=e[u+0]-e[s+0],v=e[u+1]-e[s+1],!0===M?(b=Math.sqrt(y*y+v*v)-e[u+8]-e[s+8])>0?(w=g*e[u+6]*e[s+6]/b/b,e[u+2]+=y*w,e[u+3]+=v*w,e[s+2]+=y*w,e[s+3]+=v*w):b<0&&(w=100*g*e[u+6]*e[s+6],e[u+2]+=y*w,e[u+3]+=v*w,e[s+2]-=y*w,e[s+3]-=v*w):(b=Math.sqrt(y*y+v*v))>0&&(w=g*e[u+6]*e[s+6]/b/b,e[u+2]+=y*w,e[u+3]+=v*w,e[s+2]-=y*w,e[s+3]-=v*w);for(d=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<k;a+=r)w=0,y=e[a+0],v=e[a+1],b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)),t.strongGravityMode?b>0&&(w=g*e[a+6]*d):b>0&&(w=g*e[a+6]*d/b),e[a+2]-=y*w,e[a+3]-=v*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<C;h+=3)u=n[h+0],s=n[h+1],l=n[h+2],m=Math.pow(l,t.edgeWeightInfluence),y=e[u+0]-e[s+0],v=e[u+1]-e[s+1],!0===M?(b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)-e[u+8]-e[s+8]),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/e[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*m/e[u+6]):b>0&&(w=-g*m)):(b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/e[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*m/e[u+6]):(b=1,w=-g*m)),b>0&&(e[u+2]+=y*w,e[u+3]+=v*w,e[s+2]-=y*w,e[s+3]-=v*w);if(!0===M)for(a=0;a<k;a+=r)1!==e[a+9]&&((_=Math.sqrt(Math.pow(e[a+2],2)+Math.pow(e[a+3],2)))>10&&(e[a+2]=10*e[a+2]/_,e[a+3]=10*e[a+3]/_),x=e[a+6]*Math.sqrt((e[a+4]-e[a+2])*(e[a+4]-e[a+2])+(e[a+5]-e[a+3])*(e[a+5]-e[a+3])),E=Math.sqrt((e[a+4]+e[a+2])*(e[a+4]+e[a+2])+(e[a+5]+e[a+3])*(e[a+5]+e[a+3]))/2,A=.1*Math.log(1+E)/(1+Math.sqrt(x)),S=e[a+0]+e[a+2]*(A/t.slowDown),e[a+0]=S,L=e[a+1]+e[a+3]*(A/t.slowDown),e[a+1]=L);else for(a=0;a<k;a+=r)1!==e[a+9]&&(x=e[a+6]*Math.sqrt((e[a+4]-e[a+2])*(e[a+4]-e[a+2])+(e[a+5]-e[a+3])*(e[a+5]-e[a+3])),E=Math.sqrt((e[a+4]+e[a+2])*(e[a+4]+e[a+2])+(e[a+5]+e[a+3])*(e[a+5]+e[a+3]))/2,A=e[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),e[a+7]=Math.min(1,Math.sqrt(A*(Math.pow(e[a+2],2)+Math.pow(e[a+3],2))/(1+Math.sqrt(x)))),S=e[a+0]+e[a+2]*(A/t.slowDown),e[a+0]=S,L=e[a+1]+e[a+3]*(A/t.slowDown),e[a+1]=L);return{}};var i=n.exports;self.addEventListener("message",(function(r){var n=r.data;t=new Float32Array(n.nodes),n.edges&&(e=new Float32Array(n.edges)),i(n.settings,t,e),self.postMessage({nodes:t.buffer},[t.buffer])}))}},28301:(t,e,r)=>{var n=r(61026),i=r(31880),o=r(36061),a=r(19869);function u(t,e){if(e=e||{},!i(t))throw new Error("graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.");var r=e.attributes||{},n=e.weighted?r.weight||"weight":null,u=o.assign({},a,e.settings),s=o.validateSettings(u);if(s)throw new Error("graphology-layout-forceatlas2/worker: "+s.message);this.worker=null,this.graph=t,this.settings=u,this.weightAttribute=n,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer="function"==typeof e.outputReducer?e.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var c=void 0,h=this;this.handleGraphUpdate=function(){h.worker&&h.worker.terminate(),c&&clearTimeout(c),c=setTimeout((function(){c=void 0,h.spawnWorker()}),0)},t.on("nodeAdded",this.handleGraphUpdate),t.on("edgeAdded",this.handleGraphUpdate),t.on("nodeDropped",this.handleGraphUpdate),t.on("edgeDropped",this.handleGraphUpdate),this.spawnWorker()}u.prototype.isRunning=function(){return this.running},u.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=o.createWorker(n),this.worker.addEventListener("message",this.handleMessage),this.running&&(this.running=!1,this.start())},u.prototype.handleMessage=function(t){if(this.running){var e=new Float32Array(t.data.nodes);o.assignLayoutChanges(this.graph,e,this.outputReducer),this.outputReducer&&o.readGraphPositions(this.graph,e),this.matrices.nodes=e,this.askForIterations()}},u.prototype.askForIterations=function(t){var e=this.matrices,r={settings:this.settings,nodes:e.nodes.buffer},n=[e.nodes.buffer];return t&&(r.edges=e.edges.buffer,n.push(e.edges.buffer)),this.worker.postMessage(r,n),this},u.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-forceatlas2/worker.start: layout was killed.");return this.running||(this.matrices=o.graphToByteArrays(this.graph,this.weightAttribute),this.running=!0,this.askForIterations(!0)),this},u.prototype.stop=function(){return this.running=!1,this},u.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener("nodeAdded",this.handleGraphUpdate),this.graph.removeListener("edgeAdded",this.handleGraphUpdate),this.graph.removeListener("nodeDropped",this.handleGraphUpdate),this.graph.removeListener("edgeDropped",this.handleGraphUpdate)},t.exports=u},28833:(t,e,r)=>{var n=r(46586),i=r(31880),o={dimensions:["x","y"],center:.5,scale:1};function a(t,e,r){if(!i(e))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(r=n(r,o)).dimensions;if(!Array.isArray(a)||2!==a.length)throw new Error("graphology-layout/random: given dimensions are invalid.");var u=r.center,s=r.scale,c=2*Math.PI,h=(u-.5)*s,l=e.order,d=a[0],f=a[1];function p(t,e){return e[d]=s*Math.cos(t*c/l)+h,e[f]=s*Math.sin(t*c/l)+h,e}var g=0;if(!t){var y={};return e.forEachNode((function(t){y[t]=p(g++,{})})),y}e.updateEachNodeAttributes((function(t,e){return p(g++,e),e}),{attributes:a})}var u=a.bind(null,!1);u.assign=a.bind(null,!0),t.exports=u},61359:(t,e,r)=>{var n=r(31880),i=r(97052).B,o=r(27155).De;t.exports=function(t,e){if(!n(t)||!n(e))throw new Error("graphology-operators/disjoint-union: invalid graph.");if(t.multi!==e.multi)throw new Error("graphology-operators/disjoint-union: both graph should be simple or multi.");var r=t.nullCopy();r.mergeAttributes(t.getAttributes());var a={},u={},s=0;return t.forEachNode((function(t,e){a[t]=s,i(r,s,e),s++})),e.forEachNode((function(t,e){u[t]=s,i(r,s,e),s++})),s=0,t.forEachEdge((function(t,e,n,i,u,c,h){o(r,h,s++,a[n],a[i],i,e)})),e.forEachEdge((function(t,e,n,i,a,c,h){o(r,h,s++,u[n],u[i],i,e)})),r}},35174:(t,e,r)=>{r(61359),r(9484),r(61499),r(76458),r(88947),r(92971),r(14230),e.toUndirected=r(24452),r(79106)},9484:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t){if(!n(t))throw new Error("graphology-operators/reverse: invalid graph.");var e=t.emptyCopy();return t.forEachUndirectedEdge((function(t,r,n,o){i(e,!0,t,n,o,r)})),t.forEachDirectedEdge((function(t,r,n,o){i(e,!1,t,o,n,r)})),e}},61499:(t,e,r)=>{var n=r(31880),i=r(97052).B,o=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/subgraph: invalid graph instance.");var r=t.nullCopy(),a=e;if(Array.isArray(e)){if(0===e.length)return r;e=new Set(e)}if(e instanceof Set){if(0===e.size)return r;a=function(t){return e.has(t)};var u=e;e=new Set,u.forEach((function(t){e.add(""+t)}))}if("function"!=typeof a)throw new Error("graphology-operators/subgraph: invalid nodes. Expecting an array or a set or a filtering function.");if("function"==typeof e){if(t.forEachNode((function(t,e){a(t,e)&&i(r,t,e)})),0===r.order)return r}else e.forEach((function(e){if(!t.hasNode(e))throw new Error('graphology-operators/subgraph: the "'+e+'" node was not found in the graph.');i(r,e,t.getNodeAttributes(e))}));return t.forEachEdge((function(t,e,n,i,u,s,c){a(n,u)&&(i===n||a(i,s))&&o(r,c,t,n,i,e)})),r}},76458:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-directed: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if("directed"===t.type)return t.copy();var o=t.emptyCopy({type:"directed"});return t.forEachDirectedEdge((function(t,e,r,n){i(o,!1,t,r,n,e)})),t.forEachUndirectedEdge((function(e,n,a,u){var s=!t.multi&&"mixed"===t.type&&o.edge(a,u),c=!t.multi&&"mixed"===t.type&&o.edge(u,a);s?o.replaceEdgeAttributes(s,r(o.getEdgeAttributes(s),n)):i(o,!1,null,a,u,n),a!==u&&(c?o.replaceEdgeAttributes(c,r(o.getEdgeAttributes(c),n)):i(o,!1,null,u,a,n))})),o}},88947:(t,e,r)=>{var n=r(31880);t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-mixed: expecting a valid graphology instance.");return t.copy({type:"mixed"})}},92971:(t,e,r)=>{var n=r(31880);t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-multi: expecting a valid graphology instance.");return t.copy({multi:!0})}},14230:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-simple: expecting a valid graphology instance.");if(!t.multi)return t.copy();var e=t.emptyCopy({multi:!1});return t.forEachDirectedEdge((function(t,r,n,o){e.hasDirectedEdge(n,o)||i(e,!1,t,n,o,r)})),t.forEachUndirectedEdge((function(t,r,n,o){e.hasUndirectedEdge(n,o)||i(e,!0,t,n,o,r)})),e}},24452:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-undirected: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if("undirected"===t.type)return t.copy();var o=t.emptyCopy({type:"undirected"});return t.forEachUndirectedEdge((function(t,e,r,n){i(o,!0,t,r,n,e)})),t.forEachDirectedEdge((function(e,n,a,u){if(!t.multi){var s=o.edge(a,u);if(s)return void(r&&o.replaceEdgeAttributes(s,r(o.getEdgeAttributes(s),n)))}i(o,!0,null,a,u,n)})),o}},79106:(t,e,r)=>{var n=r(31880);t.exports=function(t,e){if(!n(t)||!n(e))throw new Error("graphology-operators/union: invalid graph.");if(t.multi!==e.multi)throw new Error("graphology-operators/union: both graph should be simple or multi.");var r=t.copy();return r.import(e,!0),r}},39260:(t,e,r)=>{r(31880),r(4363).Q6,r(64231)},60715:(t,e,r)=>{var n=r(15129),i=r(77672);r(39260),e.Ar=n.bidirectional,n.singleSource,n.singleSourceLength,n.undirectedSingleSourceLength,n.brandes,i.edgePathFromNodePath},15129:(t,e,r)=>{var n=r(31880),i=r(4034),o=r(8884);function a(t,e,r){if(!n(e))throw new Error("graphology-shortest-path: invalid graphology instance.");if(!e.hasNode(r))throw new Error('graphology-shortest-path: the "'+r+'" source node does not exist in the given graph.');r=""+r;var i=new Set,a={},u=0;a[r]=0;for(var s,c,h,l=[r];0!==l.length;){var d=[];for(s=0,c=l.length;s<c;s++)h=l[s],i.has(h)||(i.add(h),o(d,e[t](h)),a[h]=u);u++,l=d}return a}var u=a.bind(null,"outboundNeighbors"),s=a.bind(null,"neighbors");e.bidirectional=function(t,e,r){if(!n(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<3)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 3.");if(!t.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');if(!t.hasNode(r))throw new Error('graphology-shortest-path: the "'+r+'" target node does not exist in the given graph.');if((e=""+e)==(r=""+r))return[e];var i=t.inboundNeighbors.bind(t),o=t.outboundNeighbors.bind(t),a={},u={};a[e]=null,u[r]=null;var s,c,h,l,d,f,p,g,y=[e],v=[r],m=!1;t:for(;y.length&&v.length;)if(y.length<=v.length){for(s=y,y=[],d=0,p=s.length;d<p;d++)for(f=0,g=(h=o(c=s[d])).length;f<g;f++)if((l=h[f])in a||(y.push(l),a[l]=c),l in u){m=!0;break t}}else for(s=v,v=[],d=0,p=s.length;d<p;d++)for(f=0,g=(h=i(c=s[d])).length;f<g;f++)if((l=h[f])in u||(v.push(l),u[l]=c),l in a){m=!0;break t}if(!m)return null;for(var b=[];l;)b.unshift(l),l=a[l];for(l=u[b[b.length-1]];l;)b.push(l),l=u[l];return b.length?b:null},e.singleSource=function(t,e){if(!n(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<2)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 2.");if(!t.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');var r,i,o,a,u,s,c={},h={};for(c[e=""+e]=!0,h[e]=[e];Object.keys(c).length;)for(o in r=c,c={},r)for(u=0,s=(i=t.outboundNeighbors(o)).length;u<s;u++)h[a=i[u]]||(h[a]=h[o].concat(a),c[a]=!0);return h},e.singleSourceLength=u,e.undirectedSingleSourceLength=s,e.brandes=function(t,e){e=""+e;var r,n,o,a,u,s,c,h,l,d=[],f={},p={},g=t.nodes();for(s=0,h=g.length;s<h;s++)f[a=g[s]]=[],p[a]=0;var y={};p[e]=1,y[e]=0;for(var v=i.of(e);v.size;)for(a=v.dequeue(),d.push(a),r=y[a],n=p[a],c=0,l=(o=t.outboundNeighbors(a)).length;c<l;c++)(u=o[c])in y||(v.enqueue(u),y[u]=r+1),y[u]===r+1&&(p[u]+=n,f[u].push(a));return[d,f,p]}},77672:(t,e)=>{var r=function(){return!0};e.edgePathFromNodePath=function(t,e){var n,i,o,a,u=e.length;if(u<2)return i=e[0],(a=t.multi?t.findEdge(i,i,r):t.edge(i,i))?[a]:[];u--;var s=new Array(u);for(n=0;n<u;n++){if(i=e[n],o=e[n+1],void 0===(a=t.multi?t.findOutboundEdge(i,o,r):t.edge(i,o)))throw new Error("graphology-shortest-path: given path is impossible in given graph.");s[n]=a}return s}},27155:(t,e)=>{e.De=function(t,e,r,n,i,o){return o=Object.assign({},o),e?null==r?t.addUndirectedEdge(n,i,o):t.addUndirectedEdgeWithKey(r,n,i,o):null==r?t.addDirectedEdge(n,i,o):t.addDirectedEdgeWithKey(r,n,i,o)}},97052:(t,e)=>{e.B=function(t,e,r){return r=Object.assign({},r),t.addNode(e,r)}},46586:t=>{t.exports=function t(e,r){e=e||{};var n,i={};for(var o in r){var a=e[o],u=r[o];!(n=u)||"object"!=typeof n||"function"==typeof n||Array.isArray(n)||n instanceof Set||n instanceof Map||n instanceof RegExp||n instanceof Date?i[o]=void 0===a?u:a:i[o]=t(a,u)}return i}},4363:(t,e)=>{function r(t){return"number"!=typeof t||isNaN(t)?1:t}e.Q6=function(t){return function(t,e){var r={},n=function(t){return void 0===t?e:t};"function"==typeof e&&(n=e);var i=function(e){return n(e[t])},o=function(){return n(void 0)};return"string"==typeof t?(r.fromAttributes=i,r.fromGraph=function(t,e){return i(t.getEdgeAttributes(e))},r.fromEntry=function(t,e){return i(e)},r.fromPartialEntry=r.fromEntry,r.fromMinimalEntry=r.fromEntry):"function"==typeof t?(r.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},r.fromGraph=function(e,r){var i=e.extremities(r);return n(t(r,e.getEdgeAttributes(r),i[0],i[1],e.getNodeAttributes(i[0]),e.getNodeAttributes(i[1]),e.isUndirected(r)))},r.fromEntry=function(e,r,i,o,a,u,s){return n(t(e,r,i,o,a,u,s))},r.fromPartialEntry=function(e,r,i,o){return n(t(e,r,i,o))},r.fromMinimalEntry=function(e,r){return n(t(e,r))}):(r.fromAttributes=o,r.fromGraph=o,r.fromEntry=o,r.fromMinimalEntry=o),r}(t,r)}},31880:t=>{t.exports=function(t){return null!==t&&"object"==typeof t&&"function"==typeof t.addUndirectedEdgeWithKey&&"function"==typeof t.dropNode&&"boolean"==typeof t.multi}},98996:function(t){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function o(t,e,r){return o=i()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},o.apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return o(t,arguments,r(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),n(a,t)},a(t)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var s=function(){for(var t=arguments[0],e=1,r=arguments.length;e<r;e++)if(arguments[e])for(var n in arguments[e])t[n]=arguments[e][n];return t};function c(t,e,r,n){var i=t._nodes.get(e),o=null;return i?o="mixed"===n?i.out&&i.out[r]||i.undirected&&i.undirected[r]:"directed"===n?i.out&&i.out[r]:i.undirected&&i.undirected[r]:o}function h(e){return null!==e&&"object"===t(e)&&"function"==typeof e.addUndirectedEdgeWithKey&&"function"==typeof e.dropNode}function l(e){return"object"===t(e)&&null!==e&&e.constructor===Object}function d(t){var e;for(e in t)return!1;return!0}function f(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:r})}function p(t,e,r){var n={enumerable:!0,configurable:!0};"function"==typeof r?n.get=r:(n.value=r,n.writable=!1),Object.defineProperty(t,e,n)}function g(t){return!(!l(t)||t.attributes&&!Array.isArray(t.attributes))}"function"==typeof Object.assign&&(s=Object.assign);var y,v={exports:{}},m="object"==typeof Reflect?Reflect:null,b=m&&"function"==typeof m.apply?m.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};y=m&&"function"==typeof m.ownKeys?m.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var w=Number.isNaN||function(t){return t!=t};function _(){_.init.call(this)}v.exports=_,v.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}D(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&D(t,"error",e,{once:!0})}(t,i)}))},_.EventEmitter=_,_.prototype._events=void 0,_.prototype._eventsCount=0,_.prototype._maxListeners=void 0;var x=10;function E(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function A(t){return void 0===t._maxListeners?_.defaultMaxListeners:t._maxListeners}function S(t,e,r,n){var i,o,a,u;if(E(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=A(t))>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,u=s,console&&console.warn&&console.warn(u)}return t}function L(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function k(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=L.bind(n);return i.listener=r,n.wrapFn=i,i}function C(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):O(i,i.length)}function M(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function O(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function D(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}function F(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}Object.defineProperty(_,"defaultMaxListeners",{enumerable:!0,get:function(){return x},set:function(t){if("number"!=typeof t||t<0||w(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");x=t}}),_.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||w(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},_.prototype.getMaxListeners=function(){return A(this)},_.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)b(u,this,e);else{var s=u.length,c=O(u,s);for(r=0;r<s;++r)b(c[r],this,e)}return!0},_.prototype.addListener=function(t,e){return S(this,t,e,!1)},_.prototype.on=_.prototype.addListener,_.prototype.prependListener=function(t,e){return S(this,t,e,!0)},_.prototype.once=function(t,e){return E(e),this.on(t,k(this,t,e)),this},_.prototype.prependOnceListener=function(t,e){return E(e),this.prependListener(t,k(this,t,e)),this},_.prototype.removeListener=function(t,e){var r,n,i,o,a;if(E(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},_.prototype.off=_.prototype.removeListener,_.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},_.prototype.listeners=function(t){return C(this,t,!0)},_.prototype.rawListeners=function(t){return C(this,t,!1)},_.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):M.call(t,e)},_.prototype.listenerCount=M,_.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]},"undefined"!=typeof Symbol&&(F.prototype[Symbol.iterator]=function(){return this}),F.of=function(){var t=arguments,e=t.length,r=0;return new F((function(){return r>=e?{done:!0}:{done:!1,value:t[r++]}}))},F.empty=function(){return new F((function(){return{done:!0}}))},F.fromSequence=function(t){var e=0,r=t.length;return new F((function(){return e>=r?{done:!0}:{done:!1,value:t[e++]}}))},F.is=function(t){return t instanceof F||"object"==typeof t&&null!==t&&"function"==typeof t.next};var T=F,P={};P.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,P.SYMBOL_SUPPORT="undefined"!=typeof Symbol;var G=T,R=P,N=R.ARRAY_BUFFER_SUPPORT,j=R.SYMBOL_SUPPORT,z=function(t){var e=function(t){return"string"==typeof t||Array.isArray(t)||N&&ArrayBuffer.isView(t)?G.fromSequence(t):"object"!=typeof t||null===t?null:j&&"function"==typeof t[Symbol.iterator]?t[Symbol.iterator]():"function"==typeof t.next?t:null}(t);if(!e)throw new Error("obliterator: target is not iterable nor a valid iterator.");return e},U=z,I=function(t,e){for(var r,n=arguments.length>1?e:1/0,i=n!==1/0?new Array(n):[],o=0,a=U(t);;){if(o===n)return i;if((r=a.next()).done)return o!==e&&(i.length=o),i;i[o++]=r.value}},B=function(t){function r(e){var r;return(r=t.call(this)||this).name="GraphError",r.message=e,r}return e(r,t),r}(a(Error)),W=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(B),q=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(B),H=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(B);function Y(t,e){this.key=t,this.attributes=e,this.clear()}function V(t,e){this.key=t,this.attributes=e,this.clear()}function Z(t,e){this.key=t,this.attributes=e,this.clear()}function $(t,e,r,n,i){this.key=e,this.attributes=i,this.undirected=t,this.source=r,this.target=n}function K(t,e,r,n,i,o,a){var u,s,c,h;if(n=""+n,0===r){if(!(u=t._nodes.get(n)))throw new q("Graph.".concat(e,': could not find the "').concat(n,'" node in the graph.'));c=i,h=o}else if(3===r){if(i=""+i,!(s=t._edges.get(i)))throw new q("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'));var l=s.source.key,d=s.target.key;if(n===l)u=s.target;else{if(n!==d)throw new q("Graph.".concat(e,': the "').concat(n,'" node is not attached to the "').concat(i,'" edge (').concat(l,", ").concat(d,")."));u=s.source}c=o,h=a}else{if(!(s=t._edges.get(n)))throw new q("Graph.".concat(e,': could not find the "').concat(n,'" edge in the graph.'));u=1===r?s.source:s.target,c=i,h=o}return[u,c,h]}Y.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.in={},this.out={},this.undirected={}},V.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.in={},this.out={}},Z.prototype.clear=function(){this.undirectedDegree=0,this.undirected={}},$.prototype.attach=function(){var t="out",e="in";this.undirected&&(t=e="undirected");var r=this.source.key,n=this.target.key;this.source[t][n]=this,this.undirected&&r===n||(this.target[e][r]=this)},$.prototype.attachMulti=function(){var t="out",e="in",r=this.source.key,n=this.target.key;this.undirected&&(t=e="undirected");var i=this.source[t],o=i[n];if(void 0===o)return i[n]=this,void(this.undirected&&r===n||(this.target[e][r]=this));o.previous=this,this.next=o,i[n]=this,this.target[e][r]=this},$.prototype.detach=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),delete this.source[r][e],delete this.target[n][t]},$.prototype.detachMulti=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[r][e],delete this.target[n][t]):(this.next.previous=void 0,this.source[r][e]=this.next,this.target[n][t]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};var X=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return a.attributes[u]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){return K(this,e,r,t,n)[0].attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return a.attributes.hasOwnProperty(u)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=K(this,e,r,t,n,i,o),u=a[0],s=a[1],c=a[2];return u.attributes[s]=c,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:s}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=K(this,e,r,t,n,i,o),u=a[0],s=a[1],c=a[2];if("function"!=typeof c)throw new W("Graph.".concat(e,": updater should be a function."));var h=u.attributes,l=c(h[s]);return h[s]=l,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:s}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];return delete a.attributes[u],this.emit("nodeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:u}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if(!l(u))throw new W("Graph.".concat(e,": provided attributes are not a plain object."));return a.attributes=u,this.emit("nodeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if(!l(u))throw new W("Graph.".concat(e,": provided attributes are not a plain object."));return s(a.attributes,u),this.emit("nodeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:u}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],u=o[1];if("function"!=typeof u)throw new W("Graph.".concat(e,": provided updater is not a function."));return a.attributes=u(a.attributes),this.emit("nodeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}}],Q=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes[n]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t){var n;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+t,o=""+arguments[1];if(!(n=c(this,i,o,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(i,'" - "').concat(o,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(n=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return n.attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes.hasOwnProperty(n)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+t,u=""+n;if(n=arguments[2],i=arguments[3],!(o=c(this,a,u,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(u,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(o=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return o.attributes[n]=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+t,u=""+n;if(n=arguments[2],i=arguments[3],!(o=c(this,a,u,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(u,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(o=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof i)throw new W("Graph.".concat(e,": updater should be a function."));return o.attributes[n]=i(o.attributes[n]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return delete i.attributes[n],this.emit("edgeAttributesUpdated",{key:i.key,type:"remove",attributes:i.attributes,name:n}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!l(n))throw new W("Graph.".concat(e,": provided attributes are not a plain object."));return i.attributes=n,this.emit("edgeAttributesUpdated",{key:i.key,type:"replace",attributes:i.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!l(n))throw new W("Graph.".concat(e,": provided attributes are not a plain object."));return s(i.attributes,n),this.emit("edgeAttributesUpdated",{key:i.key,type:"merge",attributes:i.attributes,data:n}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof n)throw new W("Graph.".concat(e,": provided updater is not a function."));return i.attributes=n(i.attributes),this.emit("edgeAttributesUpdated",{key:i.key,type:"update",attributes:i.attributes}),this}}}],J=T,tt=z,et=function(){var t=arguments,e=null,r=-1;return new J((function(){for(var n=null;;){if(null===e){if(++r>=t.length)return{done:!0};e=tt(t[r])}if(!0!==(n=e.next()).done)break;e=null}return n}))},rt=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function nt(t,e,r,n){var i=!1;for(var o in e)if(o!==n){var a=e[o];if(i=r(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),t&&i)return a.key}}function it(t,e,r,n){var i,o,a,u=!1;for(var s in e)if(s!==n){i=e[s];do{if(o=i.source,a=i.target,u=r(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected),t&&u)return i.key;i=i.next}while(void 0!==i)}}function ot(t,e){var r,n=Object.keys(t),i=n.length,o=0;return new T((function(){do{if(r)r=r.next;else{if(o>=i)return{done:!0};var a=n[o++];if(a===e){r=void 0;continue}r=t[a]}}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}))}function at(t,e,r,n){var i=e[r];if(i){var o=i.source,a=i.target;return n(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected)&&t?i.key:void 0}}function ut(t,e,r,n){var i=e[r];if(i){var o=!1;do{if(o=n(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),t&&o)return i.key;i=i.next}while(void 0!==i)}}function st(t,e){var r=t[e];return void 0!==r.next?new T((function(){if(!r)return{done:!0};var t={edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected};return r=r.next,{done:!1,value:t}})):T.of({edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected})}function ct(t,e){if(0===t.size)return[];if("mixed"===e||e===t.type)return"function"==typeof Array.from?Array.from(t._edges.keys()):I(t._edges.keys(),t._edges.size);for(var r,n,i="undirected"===e?t.undirectedSize:t.directedSize,o=new Array(i),a="undirected"===e,u=t._edges.values(),s=0;!0!==(r=u.next()).done;)(n=r.value).undirected===a&&(o[s++]=n.key);return o}function ht(t,e,r,n){if(0!==e.size)for(var i,o,a="mixed"!==r&&r!==e.type,u="undirected"===r,s=!1,c=e._edges.values();!0!==(i=c.next()).done;)if(o=i.value,!a||o.undirected===u){var h=o,l=h.key,d=h.attributes,f=h.source,p=h.target;if(s=n(l,d,f.key,p.key,f.attributes,p.attributes,o.undirected),t&&s)return l}}function lt(t,e){if(0===t.size)return T.empty();var r="mixed"!==e&&e!==t.type,n="undirected"===e,i=t._edges.values();return new T((function(){for(var t,e;;){if((t=i.next()).done)return t;if(e=t.value,!r||e.undirected===n)break}return{value:{edge:e.key,attributes:e.attributes,source:e.source.key,target:e.target.key,sourceAttributes:e.source.attributes,targetAttributes:e.target.attributes,undirected:e.undirected},done:!1}}))}function dt(t,e,r,n,i,o){var a,u=e?it:nt;if("undirected"!==r){if("out"!==n&&(a=u(t,i.in,o),t&&a))return a;if("in"!==n&&(a=u(t,i.out,o,n?void 0:i.key),t&&a))return a}if("directed"!==r&&(a=u(t,i.undirected,o),t&&a))return a}function ft(t,e,r,n){var i=[];return dt(!1,t,e,r,n,(function(t){i.push(t)})),i}function pt(t,e,r){var n=T.empty();return"undirected"!==t&&("out"!==e&&void 0!==r.in&&(n=et(n,ot(r.in))),"in"!==e&&void 0!==r.out&&(n=et(n,ot(r.out,e?void 0:r.key)))),"directed"!==t&&void 0!==r.undirected&&(n=et(n,ot(r.undirected))),n}function gt(t,e,r,n,i,o,a){var u,s=r?ut:at;if("undirected"!==e){if(void 0!==i.in&&"out"!==n&&(u=s(t,i.in,o,a),t&&u))return u;if(void 0!==i.out&&"in"!==n&&(n||i.key!==o)&&(u=s(t,i.out,o,a),t&&u))return u}if("directed"!==e&&void 0!==i.undirected&&(u=s(t,i.undirected,o,a),t&&u))return u}function yt(t,e,r,n,i){var o=[];return gt(!1,t,e,r,n,i,(function(t){o.push(t)})),o}function vt(t,e,r,n){var i=T.empty();return"undirected"!==t&&(void 0!==r.in&&"out"!==e&&n in r.in&&(i=et(i,st(r.in,n))),void 0!==r.out&&"in"!==e&&n in r.out&&(e||r.key!==n)&&(i=et(i,st(r.out,n)))),"directed"!==t&&void 0!==r.undirected&&n in r.undirected&&(i=et(i,st(r.undirected,n))),i}var mt=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function bt(){this.A=null,this.B=null}function wt(t,e,r,n,i){for(var o in n){var a=n[o],u=a.source,s=a.target,c=u===r?s:u;if(!e||!e.has(c.key)){var h=i(c.key,c.attributes);if(t&&h)return c.key}}}function _t(t,e,r,n,i){if("mixed"!==e){if("undirected"===e)return wt(t,null,n,n.undirected,i);if("string"==typeof r)return wt(t,null,n,n[r],i)}var o,a=new bt;if("undirected"!==e){if("out"!==r){if(o=wt(t,null,n,n.in,i),t&&o)return o;a.wrap(n.in)}if("in"!==r){if(o=wt(t,a,n,n.out,i),t&&o)return o;a.wrap(n.out)}}if("directed"!==e&&(o=wt(t,a,n,n.undirected,i),t&&o))return o}function xt(t,e,r){var n=Object.keys(r),i=n.length,o=0;return new T((function(){var a=null;do{if(o>=i)return t&&t.wrap(r),{done:!0};var u=r[n[o++]],s=u.source,c=u.target;a=s===e?c:s,t&&t.has(a.key)&&(a=null)}while(null===a);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}))}function Et(t,e,r,n,i){for(var o,a,u,s,c,h,l,d=n._nodes.values(),f=n.type;!0!==(o=d.next()).done;){var p=!1;if(a=o.value,"undirected"!==f)for(u in s=a.out){c=s[u];do{if(h=c.target,p=!0,l=i(a.key,h.key,a.attributes,h.attributes,c.key,c.attributes,c.undirected),t&&l)return c;c=c.next}while(c)}if("directed"!==f)for(u in s=a.undirected)if(!(e&&a.key>u)){c=s[u];do{if((h=c.target).key!==u&&(h=c.source),p=!0,l=i(a.key,h.key,a.attributes,h.attributes,c.key,c.attributes,c.undirected),t&&l)return c;c=c.next}while(c)}if(r&&!p&&(l=i(a.key,null,a.attributes,null,null,null,null),t&&l))return null}}function At(t){if(!l(t))throw new W('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in t))throw new W("Graph.import: serialized node is missing its key.");if("attributes"in t&&(!l(t.attributes)||null===t.attributes))throw new W("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function St(t){if(!l(t))throw new W('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in t))throw new W("Graph.import: serialized edge is missing its source.");if(!("target"in t))throw new W("Graph.import: serialized edge is missing its target.");if("attributes"in t&&(!l(t.attributes)||null===t.attributes))throw new W("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in t&&"boolean"!=typeof t.undirected)throw new W("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}bt.prototype.wrap=function(t){null===this.A?this.A=t:null===this.B&&(this.B=t)},bt.prototype.has=function(t){return null!==this.A&&t in this.A||null!==this.B&&t in this.B};var Lt,kt=(Lt=255&Math.floor(256*Math.random()),function(){return Lt++}),Ct=new Set(["directed","undirected","mixed"]),Mt=new Set(["domain","_events","_eventsCount","_maxListeners"]),Ot={allowSelfLoops:!0,multi:!1,type:"mixed"};function Dt(t,e,r){var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}function Ft(t,e,r,n,i,o,a,u){if(!n&&"undirected"===t.type)throw new H("Graph.".concat(e,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new H("Graph.".concat(e,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(u&&!l(u))throw new W("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(u,'"'));if(o=""+o,a=""+a,u=u||{},!t.allowSelfLoops&&o===a)throw new H("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var s=t._nodes.get(o),c=t._nodes.get(a);if(!s)throw new q("Graph.".concat(e,': source node "').concat(o,'" not found.'));if(!c)throw new q("Graph.".concat(e,': target node "').concat(a,'" not found.'));var h={key:null,undirected:n,source:o,target:a,attributes:u};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new H("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));if(!t.multi&&(n?void 0!==s.undirected[a]:void 0!==s.out[a]))throw new H("Graph.".concat(e,': an edge linking "').concat(o,'" to "').concat(a,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));var d=new $(n,i,s,c,u);t._edges.set(i,d);var f=o===a;return n?(s.undirectedDegree++,c.undirectedDegree++,f&&t._undirectedSelfLoopCount++):(s.outDegree++,c.inDegree++,f&&t._directedSelfLoopCount++),t.multi?d.attachMulti():d.attach(),n?t._undirectedSize++:t._directedSize++,h.key=i,t.emit("edgeAdded",h),i}function Tt(t,e,r,n,i,o,a,u,c){if(!n&&"undirected"===t.type)throw new H("Graph.".concat(e,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new H("Graph.".concat(e,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(u)if(c){if("function"!=typeof u)throw new W("Graph.".concat(e,': invalid updater function. Expecting a function but got "').concat(u,'"'))}else if(!l(u))throw new W("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(u,'"'));var h;if(o=""+o,a=""+a,c&&(h=u,u=void 0),!t.allowSelfLoops&&o===a)throw new H("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var d,f,p=t._nodes.get(o),g=t._nodes.get(a);if(!r&&(d=t._edges.get(i))){if(!(d.source.key===o&&d.target.key===a||n&&d.source.key===a&&d.target.key===o))throw new H("Graph.".concat(e,': inconsistency detected when attempting to merge the "').concat(i,'" edge with "').concat(o,'" source & "').concat(a,'" target vs. ("').concat(d.source.key,'", "').concat(d.target.key,'").'));f=d}if(f||t.multi||!p||(f=n?p.undirected[a]:p.out[a]),f){var y=[f.key,!1,!1,!1];if(c?!h:!u)return y;if(c){var v=f.attributes;f.attributes=h(v),t.emit("edgeAttributesUpdated",{type:"replace",key:f.key,attributes:f.attributes})}else s(f.attributes,u),t.emit("edgeAttributesUpdated",{type:"merge",key:f.key,attributes:f.attributes,data:u});return y}u=u||{},c&&h&&(u=h(u));var m={key:null,undirected:n,source:o,target:a,attributes:u};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new H("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));var b=!1,w=!1;p||(p=Dt(t,o,{}),b=!0,o===a&&(g=p,w=!0)),g||(g=Dt(t,a,{}),w=!0),d=new $(n,i,p,g,u),t._edges.set(i,d);var _=o===a;return n?(p.undirectedDegree++,g.undirectedDegree++,_&&t._undirectedSelfLoopCount++):(p.outDegree++,g.inDegree++,_&&t._directedSelfLoopCount++),t.multi?d.attachMulti():d.attach(),n?t._undirectedSize++:t._directedSize++,m.key=i,t.emit("edgeAdded",m),[i,!0,b,w]}function Pt(t,e){t._edges.delete(e.key);var r=e.source,n=e.target,i=e.attributes,o=e.undirected,a=r===n;o?(r.undirectedDegree--,n.undirectedDegree--,a&&t._undirectedSelfLoopCount--):(r.outDegree--,n.inDegree--,a&&t._directedSelfLoopCount--),t.multi?e.detachMulti():e.detach(),o?t._undirectedSize--:t._directedSize--,t.emit("edgeDropped",{key:e.key,attributes:i,source:r.key,target:n.key,undirected:o})}var Gt=function(r){function n(t){var e;if(e=r.call(this)||this,"boolean"!=typeof(t=s({},Ot,t)).multi)throw new W("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(t.multi,'".'));if(!Ct.has(t.type))throw new W('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(t.type,'".'));if("boolean"!=typeof t.allowSelfLoops)throw new W("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(t.allowSelfLoops,'".'));var n="mixed"===t.type?Y:"directed"===t.type?V:Z;f(u(e),"NodeDataClass",n);var i="geid_"+kt()+"_",o=0;return f(u(e),"_attributes",{}),f(u(e),"_nodes",new Map),f(u(e),"_edges",new Map),f(u(e),"_directedSize",0),f(u(e),"_undirectedSize",0),f(u(e),"_directedSelfLoopCount",0),f(u(e),"_undirectedSelfLoopCount",0),f(u(e),"_edgeKeyGenerator",(function(){var t;do{t=i+o++}while(e._edges.has(t));return t})),f(u(e),"_options",t),Mt.forEach((function(t){return f(u(e),t,e[t])})),p(u(e),"order",(function(){return e._nodes.size})),p(u(e),"size",(function(){return e._edges.size})),p(u(e),"directedSize",(function(){return e._directedSize})),p(u(e),"undirectedSize",(function(){return e._undirectedSize})),p(u(e),"selfLoopCount",(function(){return e._directedSelfLoopCount+e._undirectedSelfLoopCount})),p(u(e),"directedSelfLoopCount",(function(){return e._directedSelfLoopCount})),p(u(e),"undirectedSelfLoopCount",(function(){return e._undirectedSelfLoopCount})),p(u(e),"multi",e._options.multi),p(u(e),"type",e._options.type),p(u(e),"allowSelfLoops",e._options.allowSelfLoops),p(u(e),"implementation",(function(){return"graphology"})),e}e(n,r);var i=n.prototype;return i._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},i.hasNode=function(t){return this._nodes.has(""+t)},i.hasDirectedEdge=function(t,e){if("undirected"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&!n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);if(!i)return!1;var o=i.out[e];return!(!o||this.multi&&!o.size)}throw new W("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.hasUndirectedEdge=function(t,e){if("directed"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);if(!i)return!1;var o=i.undirected[e];return!(!o||this.multi&&!o.size)}throw new W("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.hasEdge=function(t,e){if(1===arguments.length){var r=""+t;return this._edges.has(r)}if(2===arguments.length){t=""+t,e=""+e;var n=this._nodes.get(t);if(!n)return!1;var i=void 0!==n.out&&n.out[e];return i||(i=void 0!==n.undirected&&n.undirected[e]),!(!i||this.multi&&!i.size)}throw new W("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.directedEdge=function(t,e){if("undirected"!==this.type){if(t=""+t,e=""+e,this.multi)throw new H("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var r=this._nodes.get(t);if(!r)throw new q('Graph.directedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q('Graph.directedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||void 0;return n?n.key:void 0}},i.undirectedEdge=function(t,e){if("directed"!==this.type){if(t=""+t,e=""+e,this.multi)throw new H("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var r=this._nodes.get(t);if(!r)throw new q('Graph.undirectedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q('Graph.undirectedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.undirected&&r.undirected[e]||void 0;return n?n.key:void 0}},i.edge=function(t,e){if(this.multi)throw new H("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.edge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q('Graph.edge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||r.undirected&&r.undirected[e]||void 0;if(n)return n.key},i.areDirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areDirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)},i.areOutNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areOutNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out},i.areInNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areInNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in},i.areUndirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areUndirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"directed"!==this.type&&e in r.undirected},i.areNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)||"directed"!==this.type&&e in r.undirected},i.areInboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areInboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in||"directed"!==this.type&&e in r.undirected},i.areOutboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areOutboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out||"directed"!==this.type&&e in r.undirected},i.inDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.inDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree},i.outDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.outDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.outDegree},i.directedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.directedDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree+e.outDegree},i.undirectedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.undirectedDegree: could not find the "'.concat(t,'" node in the graph.'));return"directed"===this.type?0:e.undirectedDegree},i.inboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.inboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree),r},i.outboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.outboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.outDegree),r},i.degree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.degree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree+e.outDegree),r},i.inDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));if("undirected"===this.type)return 0;var r=e.in[t],n=r?this.multi?r.size:1:0;return e.inDegree-n},i.outDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));if("undirected"===this.type)return 0;var r=e.out[t],n=r?this.multi?r.size:1:0;return e.outDegree-n},i.directedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));if("undirected"===this.type)return 0;var r=e.out[t],n=r?this.multi?r.size:1:0;return e.inDegree+e.outDegree-2*n},i.undirectedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));if("directed"===this.type)return 0;var r=e.undirected[t],n=r?this.multi?r.size:1:0;return e.undirectedDegree-2*n},i.inboundDegreeWithoutSelfLoops=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new q('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var n=0,i=0;return"directed"!==this.type&&(n+=r.undirectedDegree,i+=2*((e=r.undirected[t])?this.multi?e.size:1:0)),"undirected"!==this.type&&(n+=r.inDegree,i+=(e=r.out[t])?this.multi?e.size:1:0),n-i},i.outboundDegreeWithoutSelfLoops=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new q('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var n=0,i=0;return"directed"!==this.type&&(n+=r.undirectedDegree,i+=2*((e=r.undirected[t])?this.multi?e.size:1:0)),"undirected"!==this.type&&(n+=r.outDegree,i+=(e=r.in[t])?this.multi?e.size:1:0),n-i},i.degreeWithoutSelfLoops=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new q('Graph.degreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var n=0,i=0;return"directed"!==this.type&&(n+=r.undirectedDegree,i+=2*((e=r.undirected[t])?this.multi?e.size:1:0)),"undirected"!==this.type&&(n+=r.inDegree+r.outDegree,i+=2*((e=r.out[t])?this.multi?e.size:1:0)),n-i},i.source=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.source: could not find the "'.concat(t,'" edge in the graph.'));return e.source.key},i.target=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.target: could not find the "'.concat(t,'" edge in the graph.'));return e.target.key},i.extremities=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.extremities: could not find the "'.concat(t,'" edge in the graph.'));return[e.source.key,e.target.key]},i.opposite=function(t,e){t=""+t,e=""+e;var r=this._edges.get(e);if(!r)throw new q('Graph.opposite: could not find the "'.concat(e,'" edge in the graph.'));var n=r.source.key,i=r.target.key;if(t===n)return i;if(t===i)return n;throw new q('Graph.opposite: the "'.concat(t,'" node is not attached to the "').concat(e,'" edge (').concat(n,", ").concat(i,")."))},i.hasExtremity=function(t,e){t=""+t,e=""+e;var r=this._edges.get(t);if(!r)throw new q('Graph.hasExtremity: could not find the "'.concat(t,'" edge in the graph.'));return r.source.key===e||r.target.key===e},i.isUndirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.isUndirected: could not find the "'.concat(t,'" edge in the graph.'));return e.undirected},i.isDirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.isDirected: could not find the "'.concat(t,'" edge in the graph.'));return!e.undirected},i.isSelfLoop=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.isSelfLoop: could not find the "'.concat(t,'" edge in the graph.'));return e.source===e.target},i.addNode=function(t,e){var r=function(t,e,r){if(r&&!l(r))throw new W('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));if(e=""+e,r=r||{},t._nodes.has(e))throw new H('Graph.addNode: the "'.concat(e,'" node already exist in the graph.'));var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}(this,t,e);return r.key},i.mergeNode=function(t,e){if(e&&!l(e))throw new W('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(e,'"'));t=""+t,e=e||{};var r=this._nodes.get(t);return r?(e&&(s(r.attributes,e),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:r.attributes,data:e})),[t,!1]):(r=new this.NodeDataClass(t,e),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:e}),[t,!0])},i.updateNode=function(t,e){if(e&&"function"!=typeof e)throw new W('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(e,'"'));t=""+t;var r=this._nodes.get(t);if(r){if(e){var n=r.attributes;r.attributes=e(n),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:r.attributes})}return[t,!1]}var i=e?e({}):{};return r=new this.NodeDataClass(t,i),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:i}),[t,!0]},i.dropNode=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new q('Graph.dropNode: could not find the "'.concat(t,'" node in the graph.'));if("undirected"!==this.type){for(var n in r.out){e=r.out[n];do{Pt(this,e),e=e.next}while(e)}for(var i in r.in){e=r.in[i];do{Pt(this,e),e=e.next}while(e)}}if("directed"!==this.type)for(var o in r.undirected){e=r.undirected[o];do{Pt(this,e),e=e.next}while(e)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:r.attributes})},i.dropEdge=function(t){var e;if(arguments.length>1){var r=""+arguments[0],n=""+arguments[1];if(!(e=c(this,r,n,this.type)))throw new q('Graph.dropEdge: could not find the "'.concat(r,'" -> "').concat(n,'" edge in the graph.'))}else if(t=""+t,!(e=this._edges.get(t)))throw new q('Graph.dropEdge: could not find the "'.concat(t,'" edge in the graph.'));return Pt(this,e),this},i.dropDirectedEdge=function(t,e){if(arguments.length<2)throw new H("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new H("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var r=c(this,t=""+t,e=""+e,"directed");if(!r)throw new q('Graph.dropDirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Pt(this,r),this},i.dropUndirectedEdge=function(t,e){if(arguments.length<2)throw new H("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new H("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var r=c(this,t,e,"undirected");if(!r)throw new q('Graph.dropUndirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Pt(this,r),this},i.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},i.clearEdges=function(){for(var t,e=this._nodes.values();!0!==(t=e.next()).done;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},i.getAttribute=function(t){return this._attributes[t]},i.getAttributes=function(){return this._attributes},i.hasAttribute=function(t){return this._attributes.hasOwnProperty(t)},i.setAttribute=function(t,e){return this._attributes[t]=e,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.updateAttribute=function(t,e){if("function"!=typeof e)throw new W("Graph.updateAttribute: updater should be a function.");var r=this._attributes[t];return this._attributes[t]=e(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.removeAttribute=function(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this},i.replaceAttributes=function(t){if(!l(t))throw new W("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},i.mergeAttributes=function(t){if(!l(t))throw new W("Graph.mergeAttributes: provided attributes are not a plain object.");return s(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this},i.updateAttributes=function(t){if("function"!=typeof t)throw new W("Graph.updateAttributes: provided updater is not a function.");return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},i.updateEachNodeAttributes=function(t,e){if("function"!=typeof t)throw new W("Graph.updateEachNodeAttributes: expecting an updater function.");if(e&&!g(e))throw new W("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i=this._nodes.values();!0!==(r=i.next()).done;)(n=r.value).attributes=t(n.key,n.attributes);this.emit("eachNodeAttributesUpdated",{hints:e||null})},i.updateEachEdgeAttributes=function(t,e){if("function"!=typeof t)throw new W("Graph.updateEachEdgeAttributes: expecting an updater function.");if(e&&!g(e))throw new W("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i,o,a=this._edges.values();!0!==(r=a.next()).done;)i=(n=r.value).source,o=n.target,n.attributes=t(n.key,n.attributes,i.key,o.key,i.attributes,o.attributes,n.undirected);this.emit("eachEdgeAttributesUpdated",{hints:e||null})},i.forEachAdjacencyEntry=function(t){if("function"!=typeof t)throw new W("Graph.forEachAdjacencyEntry: expecting a callback.");Et(!1,!1,!1,this,t)},i.forEachAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new W("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Et(!1,!1,!0,this,t)},i.forEachAssymetricAdjacencyEntry=function(t){if("function"!=typeof t)throw new W("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Et(!1,!0,!1,this,t)},i.forEachAssymetricAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new W("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Et(!1,!0,!0,this,t)},i.nodes=function(){return"function"==typeof Array.from?Array.from(this._nodes.keys()):I(this._nodes.keys(),this._nodes.size)},i.forEachNode=function(t){if("function"!=typeof t)throw new W("Graph.forEachNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)},i.findNode=function(t){if("function"!=typeof t)throw new W("Graph.findNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return r.key},i.mapNodes=function(t){if("function"!=typeof t)throw new W("Graph.mapNode: expecting a callback.");for(var e,r,n=this._nodes.values(),i=new Array(this.order),o=0;!0!==(e=n.next()).done;)r=e.value,i[o++]=t(r.key,r.attributes);return i},i.someNode=function(t){if("function"!=typeof t)throw new W("Graph.someNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return!0;return!1},i.everyNode=function(t){if("function"!=typeof t)throw new W("Graph.everyNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(!t((r=e.value).key,r.attributes))return!1;return!0},i.filterNodes=function(t){if("function"!=typeof t)throw new W("Graph.filterNodes: expecting a callback.");for(var e,r,n=this._nodes.values(),i=[];!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)&&i.push(r.key);return i},i.reduceNodes=function(t,e){if("function"!=typeof t)throw new W("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new W("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");for(var r,n,i=e,o=this._nodes.values();!0!==(r=o.next()).done;)i=t(i,(n=r.value).key,n.attributes);return i},i.nodeEntries=function(){var t=this._nodes.values();return new T((function(){var e=t.next();if(e.done)return e;var r=e.value;return{value:{node:r.key,attributes:r.attributes},done:!1}}))},i.export=function(){var t=new Array(this._nodes.size),e=0;this._nodes.forEach((function(r,n){t[e++]=function(t,e){var r={key:t};return d(e.attributes)||(r.attributes=s({},e.attributes)),r}(n,r)}));var r=new Array(this._edges.size);return e=0,this._edges.forEach((function(t,n){r[e++]=function(t,e){var r={key:t,source:e.source.key,target:e.target.key};return d(e.attributes)||(r.attributes=s({},e.attributes)),e.undirected&&(r.undirected=!0),r}(n,t)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:t,edges:r}},i.import=function(t){var e,r,n,i,o,a=this,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(h(t))return t.forEachNode((function(t,e){u?a.mergeNode(t,e):a.addNode(t,e)})),t.forEachEdge((function(t,e,r,n,i,o,s){u?s?a.mergeUndirectedEdgeWithKey(t,r,n,e):a.mergeDirectedEdgeWithKey(t,r,n,e):s?a.addUndirectedEdgeWithKey(t,r,n,e):a.addDirectedEdgeWithKey(t,r,n,e)})),this;if(!l(t))throw new W("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!l(t.attributes))throw new W("Graph.import: invalid attributes. Expecting a plain object.");u?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}if(t.nodes){if(n=t.nodes,!Array.isArray(n))throw new W("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=n.length;e<r;e++){At(i=n[e]);var s=i,c=s.key,d=s.attributes;u?this.mergeNode(c,d):this.addNode(c,d)}}if(t.edges){if(n=t.edges,!Array.isArray(n))throw new W("Graph.import: invalid edges. Expecting an array.");for(e=0,r=n.length;e<r;e++){St(o=n[e]);var f=o,p=f.source,g=f.target,y=f.attributes,v=f.undirected,m=void 0!==v&&v;"key"in o?(u?m?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:m?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,o.key,p,g,y):(u?m?this.mergeUndirectedEdge:this.mergeDirectedEdge:m?this.addUndirectedEdge:this.addDirectedEdge).call(this,p,g,y)}}return this},i.nullCopy=function(t){var e=new n(s({},this._options,t));return e.replaceAttributes(s({},this.getAttributes())),e},i.emptyCopy=function(t){var e=this.nullCopy(t);return this._nodes.forEach((function(t,r){var n=s({},t.attributes);t=new e.NodeDataClass(r,n),e._nodes.set(r,t)})),e},i.copy=function(t){if("string"==typeof(t=t||{}).type&&t.type!==this.type&&"mixed"!==t.type)throw new H('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(t.type,'" because this would mean losing information about the current graph.'));if("boolean"==typeof t.multi&&t.multi!==this.multi&&!0!==t.multi)throw new H("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if("boolean"==typeof t.allowSelfLoops&&t.allowSelfLoops!==this.allowSelfLoops&&!0!==t.allowSelfLoops)throw new H("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");for(var e,r,n=this.emptyCopy(t),i=this._edges.values();!0!==(e=i.next()).done;)Ft(n,"copy",!1,(r=e.value).undirected,r.key,r.source.key,r.target.key,s({},r.attributes));return n},i.toJSON=function(){return this.export()},i.toString=function(){return"[object Graph]"},i.inspect=function(){var e=this,r={};this._nodes.forEach((function(t,e){r[e]=t.attributes}));var n={},i={};this._edges.forEach((function(t,r){var o,a=t.undirected?"--":"->",u="",s=t.source.key,c=t.target.key;t.undirected&&s>c&&(o=s,s=c,c=o);var h="(".concat(s,")").concat(a,"(").concat(c,")");r.startsWith("geid_")?e.multi&&(void 0===i[h]?i[h]=0:i[h]++,u+="".concat(i[h],". ")):u+="[".concat(r,"]: "),n[u+=h]=t.attributes}));var o={};for(var a in this)this.hasOwnProperty(a)&&!Mt.has(a)&&"function"!=typeof this[a]&&"symbol"!==t(a)&&(o[a]=this[a]);return o.attributes=this._attributes,o.nodes=r,o.edges=n,f(o,"constructor",this.constructor),o},n}(v.exports.EventEmitter);"undefined"!=typeof Symbol&&(Gt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Gt.prototype.inspect),[{name:function(t){return"".concat(t,"Edge")},generateKey:!0},{name:function(t){return"".concat(t,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(t){return"".concat(t,"EdgeWithKey")}},{name:function(t){return"".concat(t,"DirectedEdgeWithKey")},type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdgeWithKey")},type:"undirected"}].forEach((function(t){["add","merge","update"].forEach((function(e){var r=t.name(e),n="add"===e?Ft:Tt;t.generateKey?Gt.prototype[r]=function(i,o,a){return n(this,r,!0,"undirected"===(t.type||this.type),null,i,o,a,"update"===e)}:Gt.prototype[r]=function(i,o,a,u){return n(this,r,!1,"undirected"===(t.type||this.type),i,o,a,u,"update"===e)}}))})),function(t){X.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Node"),0),n(t,r("Source"),1),n(t,r("Target"),2),n(t,r("Opposite"),3)}))}(Gt),function(t){Q.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Edge"),"mixed"),n(t,r("DirectedEdge"),"directed"),n(t,r("UndirectedEdge"),"undirected")}))}(Gt),function(t){rt.forEach((function(e){!function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];if(!arguments.length)return ct(this,n);if(1===arguments.length){t=""+t;var o=this._nodes.get(t);if(void 0===o)throw new q("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return ft(this.multi,"mixed"===n?this.type:n,i,o)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new q("Graph.".concat(r,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q("Graph.".concat(r,': could not find the "').concat(e,'" target node in the graph.'));return yt(n,this.multi,i,a,e)}throw new W("Graph.".concat(r,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"===n||"mixed"===this.type||n===this.type){if(1===arguments.length)return ht(!1,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return dt(!1,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var u=this._nodes.get(t);if(!u)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return gt(!1,n,this.multi,i,u,e,r)}throw new W("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(){var t,e=Array.prototype.slice.call(arguments),r=e.pop();if(0===e.length){var i=0;"directed"!==n&&(i+=this.undirectedSize),"undirected"!==n&&(i+=this.directedSize),t=new Array(i);var a=0;e.push((function(e,n,i,o,u,s,c){t[a++]=r(e,n,i,o,u,s,c)}))}else t=[],e.push((function(e,n,i,o,a,u,s){t.push(r(e,n,i,o,a,u,s))}));return this[o].apply(this,e),t};var u="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[u]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),r=[];return t.push((function(t,n,i,o,a,u,s){e(t,n,i,o,a,u,s)&&r.push(t)})),this[o].apply(this,t),r};var s="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(){var t,e,r=Array.prototype.slice.call(arguments);if(r.length<2||r.length>4)throw new W("Graph.".concat(s,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(r.length,")."));if("function"==typeof r[r.length-1]&&"function"!=typeof r[r.length-2])throw new W("Graph.".concat(s,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));2===r.length?(t=r[0],e=r[1],r=[]):3===r.length?(t=r[1],e=r[2],r=[r[0]]):4===r.length&&(t=r[2],e=r[3],r=[r[0],r[1]]);var n=e;return r.push((function(e,r,i,o,a,u,s){n=t(n,e,r,i,o,a,u,s)})),this[o].apply(this,r),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="find"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return!1;if(1===arguments.length)return ht(!0,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return dt(!0,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var u=this._nodes.get(t);if(!u)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return gt(!0,n,this.multi,i,u,e,r)}throw new W("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var a="some"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[a]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,u){return e(t,r,n,i,o,a,u)})),!!this[o].apply(this,t)};var u="every"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[u]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,u){return!e(t,r,n,i,o,a,u)})),!this[o].apply(this,t)}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return T.empty();if(!arguments.length)return lt(this,n);if(1===arguments.length){t=""+t;var r=this._nodes.get(t);if(!r)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return pt(n,i,r)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return vt(n,i,a,e)}throw new W("Graph.".concat(o,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e)}))}(Gt),function(t){mt.forEach((function(e){(function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new q("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return Object.keys(r.undirected);if("string"==typeof e)return Object.keys(r[e])}var n=[];return _t(!1,t,e,r,(function(t){n.push(t)})),n}("mixed"===n?this.type:n,i,e)}})(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));_t(!1,"mixed"===n?this.type:n,i,r,e)}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(t,e){var r=[];return this[o](t,(function(t,n){r.push(e(t,n))})),r};var u="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[u]=function(t,e){var r=[];return this[o](t,(function(t,n){e(t,n)&&r.push(t)})),r};var s="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(t,e,r){if(arguments.length<3)throw new W("Graph.".concat(s,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));var n=r;return this[o](t,(function(t,r){n=e(n,t,r)})),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r[0].toUpperCase()+r.slice(1,-1),a="find"+o;t.prototype[a]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new q("Graph.".concat(a,': could not find the "').concat(t,'" node in the graph.'));return _t(!0,"mixed"===n?this.type:n,i,r,e)}};var u="some"+o;t.prototype[u]=function(t,e){return!!this[a](t,e)};var s="every"+o;t.prototype[s]=function(t,e){return!this[a](t,(function(t,r){return!e(t,r)}))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return T.empty();t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return xt(null,r,r.undirected);if("string"==typeof e)return xt(null,r,r[e])}var n=T.empty(),i=new bt;return"undirected"!==t&&("out"!==e&&(n=et(n,xt(i,r,r.in))),"in"!==e&&(n=et(n,xt(i,r,r.out)))),"directed"!==t&&(n=et(n,xt(i,r,r.undirected))),n}("mixed"===n?this.type:n,i,e)}}(t,e)}))}(Gt);var Rt=function(t){function r(e){var r=s({type:"directed"},e);if("multi"in r&&!1!==r.multi)throw new W("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==r.type)throw new W('DirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Gt),Nt=function(t){function r(e){var r=s({type:"undirected"},e);if("multi"in r&&!1!==r.multi)throw new W("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==r.type)throw new W('UndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Gt),jt=function(t){function r(e){var r=s({multi:!0},e);if("multi"in r&&!0!==r.multi)throw new W("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return t.call(this,r)||this}return e(r,t),r}(Gt),zt=function(t){function r(e){var r=s({type:"directed",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new W("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==r.type)throw new W('MultiDirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Gt),Ut=function(t){function r(e){var r=s({type:"undirected",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new W("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==r.type)throw new W('MultiUndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Gt);function It(t){t.from=function(e,r){var n=s({},e.options,r),i=new t(n);return i.import(e),i}}return It(Gt),It(Rt),It(Nt),It(jt),It(zt),It(Ut),Gt.Graph=Gt,Gt.DirectedGraph=Rt,Gt.UndirectedGraph=Nt,Gt.MultiGraph=jt,Gt.MultiDirectedGraph=zt,Gt.MultiUndirectedGraph=Ut,Gt.InvalidArgumentsGraphError=W,Gt.NotFoundGraphError=q,Gt.UsageGraphError=H,Gt}()},64231:(t,e,r)=>{var n=r(32528),i=r(50535),o=r(3535),a=i.DEFAULT_COMPARATOR,u=i.reverseComparator;function s(t,e,r,n){for(var i,o,a=e[n];n>r&&t(a,o=e[i=n-1>>1])<0;)e[n]=o,n=i;e[n]=a}function c(t,e,r){for(var n,i=e.length,o=r,a=e[r],u=2*r+1;u<i;)(n=u+1)<i&&t(e[u],e[n])>=0&&(u=n),e[r]=e[u],u=2*(r=u)+1;e[r]=a,s(t,e,o,r)}function h(t,e,r){e.push(r),s(t,e,0,e.length-1)}function l(t,e){var r=e.pop();if(0!==e.length){var n=e[0];return e[0]=r,c(t,e,0),n}return r}function d(t,e,r){if(0===e.length)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var n=e[0];return e[0]=r,c(t,e,0),n}function f(t,e,r){var n;return 0!==e.length&&t(e[0],r)<0&&(n=e[0],e[0]=r,r=n,c(t,e,0)),r}function p(t,e){for(var r=e.length>>1;--r>=0;)c(t,e,r)}function g(t,e){for(var r=e.length,n=0,i=new Array(r);n<r;)i[n++]=l(t,e);return i}function y(t){if(this.clear(),this.comparator=t||a,"function"!=typeof this.comparator)throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}function v(t){if(this.clear(),this.comparator=t||a,"function"!=typeof this.comparator)throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=u(this.comparator)}y.prototype.clear=function(){this.items=[],this.size=0},y.prototype.push=function(t){return h(this.comparator,this.items,t),++this.size},y.prototype.peek=function(){return this.items[0]},y.prototype.pop=function(){return 0!==this.size&&this.size--,l(this.comparator,this.items)},y.prototype.replace=function(t){return d(this.comparator,this.items,t)},y.prototype.pushpop=function(t){return f(this.comparator,this.items,t)},y.prototype.consume=function(){return this.size=0,g(this.comparator,this.items)},y.prototype.toArray=function(){return g(this.comparator,this.items.slice())},y.prototype.inspect=function(){var t=this.toArray();return Object.defineProperty(t,"constructor",{value:y,enumerable:!1}),t},"undefined"!=typeof Symbol&&(y.prototype[Symbol.for("nodejs.util.inspect.custom")]=y.prototype.inspect),v.prototype=y.prototype,y.from=function(t,e){var r,n=new y(e);return r=o.isArrayLike(t)?t.slice():o.toArray(t),p(n.comparator,r),n.items=r,n.size=r.length,n},v.from=function(t,e){var r,n=new v(e);return r=o.isArrayLike(t)?t.slice():o.toArray(t),p(n.comparator,r),n.items=r,n.size=r.length,n},y.siftUp=c,y.siftDown=s,y.push=h,y.pop=l,y.replace=d,y.pushpop=f,y.heapify=p,y.consume=g,y.nsmallest=function(t,e,r){2===arguments.length&&(r=e,e=t,t=a);var i,s,c,h,l=u(t),f=1/0;if(1===e){if(o.isArrayLike(r)){for(i=0,s=r.length;i<s;i++)c=r[i],(f===1/0||t(c,f)<0)&&(f=c);return(h=new r.constructor(1))[0]=f,h}return n(r,(function(e){(f===1/0||t(e,f)<0)&&(f=e)})),[f]}if(o.isArrayLike(r)){if(e>=r.length)return r.slice().sort(t);for(h=r.slice(0,e),p(l,h),i=e,s=r.length;i<s;i++)l(r[i],h[0])>0&&d(l,h,r[i]);return h.sort(t)}var g=o.guessLength(r);return null!==g&&g<e&&(e=g),h=new Array(e),i=0,n(r,(function(t){i<e?h[i]=t:(i===e&&p(l,h),l(t,h[0])>0&&d(l,h,t)),i++})),h.length>i&&(h.length=i),h.sort(t)},y.nlargest=function(t,e,r){2===arguments.length&&(r=e,e=t,t=a);var i,s,c,h,l=u(t),f=-1/0;if(1===e){if(o.isArrayLike(r)){for(i=0,s=r.length;i<s;i++)c=r[i],(f===-1/0||t(c,f)>0)&&(f=c);return(h=new r.constructor(1))[0]=f,h}return n(r,(function(e){(f===-1/0||t(e,f)>0)&&(f=e)})),[f]}if(o.isArrayLike(r)){if(e>=r.length)return r.slice().sort(l);for(h=r.slice(0,e),p(t,h),i=e,s=r.length;i<s;i++)t(r[i],h[0])>0&&d(t,h,r[i]);return h.sort(l)}var g=o.guessLength(r);return null!==g&&g<e&&(e=g),h=new Array(e),i=0,n(r,(function(r){i<e?h[i]=r:(i===e&&p(t,h),t(r,h[0])>0&&d(t,h,r)),i++})),h.length>i&&(h.length=i),h.sort(l)},y.MinHeap=y,y.MaxHeap=v,t.exports=y},4034:(t,e,r)=>{var n=r(68298),i=r(32528);function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(t){return this.items.push(t),++this.size},o.prototype.dequeue=function(){if(this.size){var t=this.items[this.offset];return 2*++this.offset>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,t}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(t,e){e=arguments.length>1?e:this;for(var r=this.offset,n=0,i=this.items.length;r<i;r++,n++)t.call(e,this.items[r],n,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var t=this.items,e=this.offset;return new n((function(){if(e>=t.length)return{done:!0};var r=t[e];return e++,{value:r,done:!1}}))},o.prototype.entries=function(){var t=this.items,e=this.offset,r=0;return new n((function(){if(e>=t.length)return{done:!0};var n=t[e];return e++,{value:[r++,n],done:!1}}))},"undefined"!=typeof Symbol&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(",")},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var t=this.toArray();return Object.defineProperty(t,"constructor",{value:o,enumerable:!1}),t},"undefined"!=typeof Symbol&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect),o.from=function(t){var e=new o;return i(t,(function(t){e.enqueue(t)})),e},o.of=function(){return o.from(arguments)},t.exports=o},50535:(t,e)=>{e.DEFAULT_COMPARATOR=function(t,e){return t<e?-1:t>e?1:0},e.DEFAULT_REVERSE_COMPARATOR=function(t,e){return t<e?1:t>e?-1:0},e.reverseComparator=function(t){return function(e,r){return t(r,e)}},e.createTupleComparator=function(t){return 2===t?function(t,e){return t[0]<e[0]?-1:t[0]>e[0]?1:t[1]<e[1]?-1:t[1]>e[1]?1:0}:function(e,r){for(var n=0;n<t;){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1;n++}return 0}}},3535:(t,e,r)=>{var n=r(32528),i=r(6023);function o(t){return"number"==typeof t.length?t.length:"number"==typeof t.size?t.size:void 0}e.isArrayLike=function(t){return Array.isArray(t)||i.isTypedArray(t)},e.guessLength=o,e.toArray=function(t){var e=o(t),r="number"==typeof e?new Array(e):[],i=0;return n(t,(function(t){r[i++]=t})),r},e.toArrayWithIndices=function(t){var e=o(t),r="number"==typeof e?i.getPointerArray(e):Array,a="number"==typeof e?new Array(e):[],u="number"==typeof e?new r(e):[],s=0;return n(t,(function(t){a[s]=t,u[s]=s++})),[a,u]}},6023:(t,e)=>{var r=Math.pow(2,8)-1,n=Math.pow(2,16)-1,i=Math.pow(2,32)-1,o=Math.pow(2,7)-1,a=Math.pow(2,15)-1,u=Math.pow(2,31)-1;e.getPointerArray=function(t){var e=t-1;if(e<=r)return Uint8Array;if(e<=n)return Uint16Array;if(e<=i)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},e.getSignedPointerArray=function(t){var e=t-1;return e<=o?Int8Array:e<=a?Int16Array:e<=u?Int32Array:Float64Array},e.getNumberType=function(t){return t===(0|t)?-1===Math.sign(t)?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,r){var n,i,o,a,u,c=null,h=0;for(a=0,u=t.length;a<u;a++)o=r?r(t[a]):t[a],i=e.getNumberType(o),(n=s[i.name])>h&&(h=n,c=i);return c},e.isTypedArray=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(t)},e.concat=function(){var t,e,r,n=0;for(t=0,r=arguments.length;t<r;t++)n+=arguments[t].length;var i=new arguments[0].constructor(n);for(t=0,e=0;t<r;t++)i.set(arguments[t],e),e+=arguments[t].length;return i},e.indices=function(t){for(var r=new(e.getPointerArray(t))(t),n=0;n<t;n++)r[n]=n;return r}},32528:(t,e,r)=>{var n=r(24529),i=n.ARRAY_BUFFER_SUPPORT,o=n.SYMBOL_SUPPORT;t.exports=function(t,e){var r,n,a,u,s;if(!t)throw new Error("obliterator/forEach: invalid iterable.");if("function"!=typeof e)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(t)||i&&ArrayBuffer.isView(t)||"string"==typeof t||"[object Arguments]"===t.toString())for(a=0,u=t.length;a<u;a++)e(t[a],a);else if("function"!=typeof t.forEach)if(o&&Symbol.iterator in t&&"function"!=typeof t.next&&(t=t[Symbol.iterator]()),"function"!=typeof t.next)for(n in t)t.hasOwnProperty(n)&&e(t[n],n);else for(r=t,a=0;!0!==(s=r.next()).done;)e(s.value,a),a++;else t.forEach(e)}},68298:t=>{function e(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var t=arguments,r=t.length,n=0;return new e((function(){return n>=r?{done:!0}:{done:!1,value:t[n++]}}))},e.empty=function(){return new e((function(){return{done:!0}}))},e.fromSequence=function(t){var r=0,n=t.length;return new e((function(){return r>=n?{done:!0}:{done:!1,value:t[r++]}}))},e.is=function(t){return t instanceof e||"object"==typeof t&&null!==t&&"function"==typeof t.next},t.exports=e},24529:(t,e)=>{e.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,e.SYMBOL_SUPPORT="undefined"!=typeof Symbol},58765:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigmaContainer=void 0;const n=r(58303),i=n.__importStar(r(24328)),o=r(49358),a=n.__importDefault(r(98996)),u=r(10222),s=r(64222);e.SigmaContainer=({graphOptions:t,id:e,className:r,style:n,initialSettings:c,children:h})=>{const l=i.useRef(null),d=i.useRef(null),f={className:`react-sigma-v2 ${r||""}`,id:e,style:n},[p,g]=i.useState(null),y=i.useRef();s.isEqual(y.current,c)||(y.current=c);const v=i.useRef();s.isEqual(v.current,t)||(v.current=t),i.useEffect((()=>{let t=null;return null!==d.current&&(t=new o.Sigma(new a.default(v.current),d.current,y.current),g(t)),()=>{g((()=>(t&&t.kill(),null)))}}),[d,v,y]);const m=i.useMemo((()=>p&&l.current?{sigma:p,container:l.current}:null),[p,l.current]),b=null!==m?i.default.createElement(u.SigmaProvider,{value:m},h):null;return i.default.createElement("div",Object.assign({},f,{ref:l}),i.default.createElement("div",{className:"sigma-container",ref:d}),b)}},10222:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useSigmaContext=e.SigmaProvider=e.SigmaContext=void 0;const n=r(24328);e.SigmaContext=n.createContext(null),e.SigmaProvider=e.SigmaContext.Provider,e.useSigmaContext=function(){const t=n.useContext(e.SigmaContext);if(null==t)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of <SigmaContainer>");return t}},50178:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ControlsContainer=void 0;const n=r(58303).__importDefault(r(24328));e.ControlsContainer=({id:t,className:e,style:r,children:i,position:o="bottom-left"})=>{const a={className:`react-sigma-controls ${e||""} ${o}`,id:t,style:r};return n.default.createElement("div",Object.assign({},a),i)}},18460:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ForceAtlasControl=void 0;const n=r(58303),i=n.__importStar(r(24328)),o=n.__importDefault(r(28301)),a=r(64222),u=r(34739);e.ForceAtlasControl=({id:t,className:e,style:r,settings:n,autoRunFor:s=-1,customStopLayout:c,customStartLayout:h})=>{const l=u.useSigma(),d=i.useRef(null);n&&!a.isEqual(d.current,n)&&(d.current=n);const[f,p]=i.useState(null),[g,y]=i.useState(!1);i.useEffect((()=>{if(!l)return;const t=new o.default(l.getGraph(),d.current||{});p(t);let e=null;return s>-1&&l.getGraph().order>0&&(y(!0),e=s>0?window.setTimeout((()=>{y(!1)}),s):null),()=>{t&&t.kill(),e&&clearTimeout(e)}}),[s,d,l]),i.useEffect((()=>{try{f&&(!0===g?f.start():f.stop())}catch(t){}}),[f,g]);const v=!0===g&&!c||!1===g&&!h?"default":"",m={className:`react-sigma-control-forceatlas2 ${g?"running":"stopped"} ${e||""}`,id:t,style:r};return i.default.createElement("div",Object.assign({},m),i.default.createElement("button",{className:v,onClick:()=>y((t=>!t)),title:g?"Stop the layout animation":"Start the layout animation"},!0===g?c:h))}},50484:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FullScreenControl=void 0;const n=r(58303).__importStar(r(24328)),i=r(10222);e.FullScreenControl=({id:t,className:e,style:r,customEnterFullScreen:o,customExitFullScreen:a})=>{const{container:u}=i.useSigmaContext(),[s,c]=n.useState(!1),h=()=>c((t=>!t));n.useEffect((()=>(document.addEventListener("fullscreenchange",h),()=>document.removeEventListener("fullscreenchange",h))),[h]);const l=s&&!a||!s&&!o?"default":"",d={className:`react-sigma-control-${s?"normalscreen":"fullscreen"} ${e||""}`,id:t,style:r};return document.fullscreenEnabled?n.default.createElement("div",Object.assign({},d),n.default.createElement("button",{className:l,onClick:()=>{return t=u,void(document.fullscreenElement!==t?t.requestFullscreen():document.exitFullscreen&&document.exitFullscreen());var t},title:"Toggle Fullscreen"},s?a:o)):null}},80948:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchControl=void 0;const n=r(58303).__importStar(r(24328)),i=r(34739);e.SearchControl=({id:t,className:e,style:r})=>{const o=i.useSigma(),[a,u]=n.useState(""),[s,c]=n.useState([]),[h,l]=n.useState(null);n.useEffect((()=>{const t=[];!h&&a.length>1&&o.getGraph().forEachNode(((e,r)=>{r.label&&r.label.toLowerCase().includes(a.toLowerCase())&&t.push({id:e,label:r.label})})),c(t)}),[a]),n.useEffect((()=>{if(!h)return;o.getGraph().setNodeAttribute(h,"highlighted",!0);const t=o.getNodeDisplayData(h);return t&&o.getCamera().animate(t,{easing:"linear",duration:500}),()=>{o.getGraph().setNodeAttribute(h,"highlighted",!1)}}),[h]);const d={className:`react-sigma-search ${e||""}`,id:t,style:r};return n.default.createElement("div",Object.assign({},d),n.default.createElement("input",{type:"text",placeholder:"Search...",list:"nodes",value:a,onChange:t=>{const e=t.target.value,r=s.find((t=>t.label===e));r?(u(r.label),c([]),l(r.id)):(l(null),u(e))}}),n.default.createElement("datalist",{id:"nodes"},s.map((t=>n.default.createElement("option",{key:t.id,value:t.label},t.label)))))}},53855:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoomControl=void 0;const n=r(58303).__importDefault(r(24328)),i=r(34739);e.ZoomControl=({className:t,style:e,animationDuration:r=200,customZoomIn:o,customZoomOut:a,customZoomCenter:u})=>{const s=i.useSigma();function c(t){s&&(t?t>0?s.getCamera().animatedZoom({duration:r,factor:1.5}):t<0&&s.getCamera().animatedUnzoom({duration:r,factor:1.5}):s.getCamera().animatedReset({duration:r}))}const h={className:t,style:e};return n.default.createElement(n.default.Fragment,null,n.default.createElement("div",Object.assign({},h,{className:`react-sigma-control-zoom-in ${t||""}`}),n.default.createElement("button",{className:o?"":"default",onClick:()=>c(1),title:"Zoom In"},o)),n.default.createElement("div",Object.assign({},h,{className:`react-sigma-control-zoom-out ${t||""}`}),n.default.createElement("button",{className:a?"":"default",onClick:()=>c(-1),title:"Zoom Out"},a)),n.default.createElement("div",Object.assign({},h,{className:`react-sigma-control-zoom-center ${t||""}`}),n.default.createElement("button",{className:u?"":"default",onClick:()=>c(),title:"See whole graph"},u)))}},16370:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useLoadGraph=void 0;const n=r(24328),i=r(34739);e.useLoadGraph=function(){const t=i.useSigma();return n.useCallback(((e,r=!0)=>{t&&e&&(r&&t.getGraph().order>0&&t.getGraph().clear(),t.getGraph().import(e),t.refresh())}),[t])}},34282:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useRegisterEvents=void 0;const n=r(24328),i=r(34739),o=r(75945),a=["clickNode","rightClickNode","downNode","enterNode","leaveNode","doubleClickNode","wheelNode","clickEdge","rightClickEdge","downEdge","enterEdge","leaveEdge","doubleClickEdge","wheelEdge","clickStage","rightClickStage","downStage","doubleClickStage","wheelStage","kill"],u=["click","rightClick","mouseup","mousedown","mousemove","doubleClick","wheel"],s=["mouseup","mousedown","mousemove"],c=["cameraUpdated"];e.useRegisterEvents=function(){const t=i.useSigma(),e=o.useSetSettings(),[r,h]=n.useState({});return n.useEffect((()=>{if(!t||!r)return;const n=Object.keys(r),i={},o={},h=t.getSettings();return n.some((t=>["clickEdge","rightClickEdge","doubleClickEdge","downEdge"].includes(t)))&&!1===h.enableEdgeClickEvents&&(i.enableEdgeClickEvents=!0,o.enableEdgeClickEvents=!1),n.some((t=>["enterEdge","leaveEdge"].includes(t)))&&!1===h.enableEdgeHoverEvents&&(i.enableEdgeHoverEvents=!0,o.enableEdgeHoverEvents=!1),n.some((t=>["wheelEdge"].includes(t)))&&!1===h.enableEdgeWheelEvents&&(i.enableEdgeWheelEvents=!0,o.enableEdgeWheelEvents=!1),Object.keys(i).length>0&&e(i),n.forEach((e=>{const n=r[e];a.includes(e)&&t.on(e,n),u.includes(e)&&t.getMouseCaptor().on(e,n),s.includes(e)&&t.getTouchCaptor().on(e,n),c.includes(e)&&t.getCamera().on("updated",n)})),()=>{let n;for(n in Object.keys(o).length>0&&e(o),r){const e=r[n];a.includes(n)&&t.removeListener(n,e),u.includes(n)&&t.getMouseCaptor().removeListener(n,e),s.includes(n)&&t.getTouchCaptor().removeListener(n,e),c.includes(n)&&t.getCamera().removeListener("updated",e)}}}),[t,r,e]),h}},75945:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useSetSettings=void 0;const n=r(24328),i=r(34739);e.useSetSettings=function(){const t=i.useSigma(),[e,r]=n.useState({});return n.useEffect((()=>{if(!t||!e)return;const r={};return Object.keys(e).forEach((n=>{r[n]=e[n],t.setSetting(n,e[n])})),()=>{Object.keys(r).forEach((e=>{t.setSetting(e,r[e])}))}}),[t,e]),r}},34739:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useSigma=void 0;const n=r(10222);e.useSigma=function(){return n.useSigmaContext().sigma}},4986:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(58303);n.__exportStar(r(58765),e),n.__exportStar(r(34739),e),n.__exportStar(r(34282),e),n.__exportStar(r(16370),e),n.__exportStar(r(75945),e),n.__exportStar(r(50178),e),n.__exportStar(r(18460),e),n.__exportStar(r(53855),e),n.__exportStar(r(50484),e),n.__exportStar(r(80948),e),n.__exportStar(r(46799),e)},46799:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},64222:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,h=1/0,l=9007199254740991,d=NaN,f=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",y="[object Array]",v="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",x="[object Map]",E="[object Number]",A="[object Object]",S="[object Promise]",L="[object RegExp]",k="[object Set]",C="[object String]",M="[object Symbol]",O="[object WeakMap]",D="[object ArrayBuffer]",F="[object DataView]",T="[object Float32Array]",P="[object Float64Array]",G="[object Int8Array]",R="[object Int16Array]",N="[object Int32Array]",j="[object Uint8Array]",z="[object Uint8ClampedArray]",U="[object Uint16Array]",I="[object Uint32Array]",B=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,V=RegExp(H.source),Z=RegExp(Y.source),$=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),nt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ht=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",St="["+At+"]",Lt="["+_t+"]",kt="\\d+",Ct="["+xt+"]",Mt="[^\\ud800-\\udfff"+At+kt+"\\u2700-\\u27bf"+xt+Et+"]",Ot="\\ud83c[\\udffb-\\udfff]",Dt="[^\\ud800-\\udfff]",Ft="(?:\\ud83c[\\udde6-\\uddff]){2}",Tt="[\\ud800-\\udbff][\\udc00-\\udfff]",Pt="["+Et+"]",Gt="(?:"+Ct+"|"+Mt+")",Rt="(?:"+Pt+"|"+Mt+")",Nt="(?:['’](?:d|ll|m|re|s|t|ve))?",jt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Lt+"|"+Ot+")?",Ut="[\\ufe0e\\ufe0f]?",It=Ut+zt+"(?:\\u200d(?:"+[Dt,Ft,Tt].join("|")+")"+Ut+zt+")*",Bt="(?:"+["[\\u2700-\\u27bf]",Ft,Tt].join("|")+")"+It,Wt="(?:"+[Dt+Lt+"?",Lt,Ft,Tt,"[\\ud800-\\udfff]"].join("|")+")",qt=RegExp("['’]","g"),Ht=RegExp(Lt,"g"),Yt=RegExp(Ot+"(?="+Ot+")|"+Wt+It,"g"),Vt=RegExp([Pt+"?"+Ct+"+"+Nt+"(?="+[St,Pt,"$"].join("|")+")",Rt+"+"+jt+"(?="+[St,Pt+Gt,"$"].join("|")+")",Pt+"?"+Gt+"+"+Nt,Pt+"+"+jt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kt,Bt].join("|"),"g"),Zt=RegExp("[\\u200d\\ud800-\\udfff"+_t+"\\ufe0e\\ufe0f]"),$t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Kt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xt=-1,Qt={};Qt[T]=Qt[P]=Qt[G]=Qt[R]=Qt[N]=Qt[j]=Qt[z]=Qt[U]=Qt[I]=!0,Qt[g]=Qt[y]=Qt[D]=Qt[v]=Qt[F]=Qt[m]=Qt[b]=Qt[w]=Qt[x]=Qt[E]=Qt[A]=Qt[L]=Qt[k]=Qt[C]=Qt[O]=!1;var Jt={};Jt[g]=Jt[y]=Jt[D]=Jt[F]=Jt[v]=Jt[m]=Jt[T]=Jt[P]=Jt[G]=Jt[R]=Jt[N]=Jt[x]=Jt[E]=Jt[A]=Jt[L]=Jt[k]=Jt[C]=Jt[M]=Jt[j]=Jt[z]=Jt[U]=Jt[I]=!0,Jt[b]=Jt[w]=Jt[O]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,re=parseInt,ne="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ie="object"==typeof self&&self&&self.Object===Object&&self,oe=ne||ie||Function("return this")(),ae=e&&!e.nodeType&&e,ue=ae&&t&&!t.nodeType&&t,se=ue&&ue.exports===ae,ce=se&&ne.process,he=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),le=he&&he.isArrayBuffer,de=he&&he.isDate,fe=he&&he.isMap,pe=he&&he.isRegExp,ge=he&&he.isSet,ye=he&&he.isTypedArray;function ve(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function me(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}function be(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function we(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function _e(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function xe(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function Ee(t,e){return!(null==t||!t.length)&&Te(t,e,0)>-1}function Ae(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Se(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function Le(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function ke(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Ce(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Me(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Oe=Ne("length");function De(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Fe(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Te(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Fe(t,Ge,r)}function Pe(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Ge(t){return t!=t}function Re(t,e){var r=null==t?0:t.length;return r?Ue(t,e)/r:d}function Ne(t){return function(e){return null==e?i:e[t]}}function je(t){return function(e){return null==t?i:t[e]}}function ze(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ue(t,e){for(var r,n=-1,o=t.length;++n<o;){var a=e(t[n]);a!==i&&(r=r===i?a:r+a)}return r}function Ie(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Be(t){return t?t.slice(0,ar(t)+1).replace(nt,""):t}function We(t){return function(e){return t(e)}}function qe(t,e){return Se(e,(function(e){return t[e]}))}function He(t,e){return t.has(e)}function Ye(t,e){for(var r=-1,n=t.length;++r<n&&Te(e,t[r],0)>-1;);return r}function Ve(t,e){for(var r=t.length;r--&&Te(e,t[r],0)>-1;);return r}function Ze(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var $e=je({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Ke=je({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xe(t){return"\\"+te[t]}function Qe(t){return Zt.test(t)}function Je(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function tr(t,e){return function(r){return t(e(r))}}function er(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r];a!==e&&a!==u||(t[r]=u,o[i++]=r)}return o}function rr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function nr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function ir(t){return Qe(t)?function(t){for(var e=Yt.lastIndex=0;Yt.test(t);)++e;return e}(t):Oe(t)}function or(t){return Qe(t)?function(t){return t.match(Yt)||[]}(t):function(t){return t.split("")}(t)}function ar(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var ur=je({"&":"&","<":"<",">":">",""":'"',"'":"'"}),sr=function t(e){var r,n=(e=null==e?oe:sr.defaults(oe.Object(),e,sr.pick(oe,Kt))).Array,it=e.Date,_t=e.Error,xt=e.Function,Et=e.Math,At=e.Object,St=e.RegExp,Lt=e.String,kt=e.TypeError,Ct=n.prototype,Mt=xt.prototype,Ot=At.prototype,Dt=e["__core-js_shared__"],Ft=Mt.toString,Tt=Ot.hasOwnProperty,Pt=0,Gt=(r=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Rt=Ot.toString,Nt=Ft.call(At),jt=oe._,zt=St("^"+Ft.call(Tt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=se?e.Buffer:i,It=e.Symbol,Bt=e.Uint8Array,Wt=Ut?Ut.allocUnsafe:i,Yt=tr(At.getPrototypeOf,At),Zt=At.create,te=Ot.propertyIsEnumerable,ne=Ct.splice,ie=It?It.isConcatSpreadable:i,ae=It?It.iterator:i,ue=It?It.toStringTag:i,ce=function(){try{var t=co(At,"defineProperty");return t({},"",{}),t}catch(t){}}(),he=e.clearTimeout!==oe.clearTimeout&&e.clearTimeout,Oe=it&&it.now!==oe.Date.now&&it.now,je=e.setTimeout!==oe.setTimeout&&e.setTimeout,cr=Et.ceil,hr=Et.floor,lr=At.getOwnPropertySymbols,dr=Ut?Ut.isBuffer:i,fr=e.isFinite,pr=Ct.join,gr=tr(At.keys,At),yr=Et.max,vr=Et.min,mr=it.now,br=e.parseInt,wr=Et.random,_r=Ct.reverse,xr=co(e,"DataView"),Er=co(e,"Map"),Ar=co(e,"Promise"),Sr=co(e,"Set"),Lr=co(e,"WeakMap"),kr=co(At,"create"),Cr=Lr&&new Lr,Mr={},Or=zo(xr),Dr=zo(Er),Fr=zo(Ar),Tr=zo(Sr),Pr=zo(Lr),Gr=It?It.prototype:i,Rr=Gr?Gr.valueOf:i,Nr=Gr?Gr.toString:i;function jr(t){if(ru(t)&&!Ha(t)&&!(t instanceof Br)){if(t instanceof Ir)return t;if(Tt.call(t,"__wrapped__"))return Uo(t)}return new Ir(t)}var zr=function(){function t(){}return function(e){if(!eu(e))return{};if(Zt)return Zt(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function Ur(){}function Ir(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Br(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function qr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Yr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Hr;++e<r;)this.add(t[e])}function Vr(t){var e=this.__data__=new qr(t);this.size=e.size}function Zr(t,e){var r=Ha(t),n=!r&&qa(t),i=!r&&!n&&$a(t),o=!r&&!n&&!i&&hu(t),a=r||n||i||o,u=a?Ie(t.length,Lt):[],s=u.length;for(var c in t)!e&&!Tt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,s))||u.push(c);return u}function $r(t){var e=t.length;return e?t[Yn(0,e-1)]:i}function Kr(t,e){return Po(ki(t),an(e,0,t.length))}function Xr(t){return Po(ki(t))}function Qr(t,e,r){(r!==i&&!Ia(t[e],r)||r===i&&!(e in t))&&nn(t,e,r)}function Jr(t,e,r){var n=t[e];Tt.call(t,e)&&Ia(n,r)&&(r!==i||e in t)||nn(t,e,r)}function tn(t,e){for(var r=t.length;r--;)if(Ia(t[r][0],e))return r;return-1}function en(t,e,r,n){return ln(t,(function(t,i,o){e(n,t,r(t),o)})),n}function rn(t,e){return t&&Ci(e,Fu(e),t)}function nn(t,e,r){"__proto__"==e&&ce?ce(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function on(t,e){for(var r=-1,o=e.length,a=n(o),u=null==t;++r<o;)a[r]=u?i:ku(t,e[r]);return a}function an(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function un(t,e,r,n,o,a){var u,s=1&e,c=2&e,h=4&e;if(r&&(u=o?r(t,n,o,a):r(t)),u!==i)return u;if(!eu(t))return t;var l=Ha(t);if(l){if(u=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Tt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!s)return ki(t,u)}else{var d=fo(t),f=d==w||d==_;if($a(t))return _i(t,s);if(d==A||d==g||f&&!o){if(u=c||f?{}:go(t),!s)return c?function(t,e){return Ci(t,lo(t),e)}(t,function(t,e){return t&&Ci(e,Tu(e),t)}(u,t)):function(t,e){return Ci(t,ho(t),e)}(t,rn(u,t))}else{if(!Jt[d])return o?t:{};u=function(t,e,r){var n,i=t.constructor;switch(e){case D:return xi(t);case v:case m:return new i(+t);case F:return function(t,e){var r=e?xi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case T:case P:case G:case R:case N:case j:case z:case U:case I:return Ei(t,r);case x:return new i;case E:case C:return new i(t);case L:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case k:return new i;case M:return n=t,Rr?At(Rr.call(n)):{}}}(t,d,s)}}a||(a=new Vr);var p=a.get(t);if(p)return p;a.set(t,u),uu(t)?t.forEach((function(n){u.add(un(n,e,r,n,t,a))})):nu(t)&&t.forEach((function(n,i){u.set(i,un(n,e,r,i,t,a))}));var y=l?i:(h?c?ro:eo:c?Tu:Fu)(t);return be(y||t,(function(n,i){y&&(n=t[i=n]),Jr(u,i,un(n,e,r,i,t,a))})),u}function sn(t,e,r){var n=r.length;if(null==t)return!n;for(t=At(t);n--;){var o=r[n],a=e[o],u=t[o];if(u===i&&!(o in t)||!a(u))return!1}return!0}function cn(t,e,r){if("function"!=typeof t)throw new kt(o);return Oo((function(){t.apply(i,r)}),e)}function hn(t,e,r,n){var i=-1,o=Ee,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;r&&(e=Se(e,We(r))),n?(o=Ae,a=!1):e.length>=200&&(o=He,a=!1,e=new Yr(e));t:for(;++i<u;){var h=t[i],l=null==r?h:r(h);if(h=n||0!==h?h:0,a&&l==l){for(var d=c;d--;)if(e[d]===l)continue t;s.push(h)}else o(e,l,n)||s.push(h)}return s}jr.templateSettings={escape:$,evaluate:K,interpolate:X,variable:"",imports:{_:jr}},jr.prototype=Ur.prototype,jr.prototype.constructor=jr,Ir.prototype=zr(Ur.prototype),Ir.prototype.constructor=Ir,Br.prototype=zr(Ur.prototype),Br.prototype.constructor=Br,Wr.prototype.clear=function(){this.__data__=kr?kr(null):{},this.size=0},Wr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wr.prototype.get=function(t){var e=this.__data__;if(kr){var r=e[t];return r===a?i:r}return Tt.call(e,t)?e[t]:i},Wr.prototype.has=function(t){var e=this.__data__;return kr?e[t]!==i:Tt.call(e,t)},Wr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kr&&e===i?a:e,this},qr.prototype.clear=function(){this.__data__=[],this.size=0},qr.prototype.delete=function(t){var e=this.__data__,r=tn(e,t);return!(r<0||(r==e.length-1?e.pop():ne.call(e,r,1),--this.size,0))},qr.prototype.get=function(t){var e=this.__data__,r=tn(e,t);return r<0?i:e[r][1]},qr.prototype.has=function(t){return tn(this.__data__,t)>-1},qr.prototype.set=function(t,e){var r=this.__data__,n=tn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new Wr,map:new(Er||qr),string:new Wr}},Hr.prototype.delete=function(t){var e=uo(this,t).delete(t);return this.size-=e?1:0,e},Hr.prototype.get=function(t){return uo(this,t).get(t)},Hr.prototype.has=function(t){return uo(this,t).has(t)},Hr.prototype.set=function(t,e){var r=uo(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Yr.prototype.add=Yr.prototype.push=function(t){return this.__data__.set(t,a),this},Yr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.clear=function(){this.__data__=new qr,this.size=0},Vr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Vr.prototype.get=function(t){return this.__data__.get(t)},Vr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof qr){var n=r.__data__;if(!Er||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(t,e),this.size=r.size,this};var ln=Di(bn),dn=Di(wn,!0);function fn(t,e){var r=!0;return ln(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function pn(t,e,r){for(var n=-1,o=t.length;++n<o;){var a=t[n],u=e(a);if(null!=u&&(s===i?u==u&&!cu(u):r(u,s)))var s=u,c=a}return c}function gn(t,e){var r=[];return ln(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function yn(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=yo),i||(i=[]);++o<a;){var u=t[o];e>0&&r(u)?e>1?yn(u,e-1,r,n,i):Le(i,u):n||(i[i.length]=u)}return i}var vn=Fi(),mn=Fi(!0);function bn(t,e){return t&&vn(t,e,Fu)}function wn(t,e){return t&&mn(t,e,Fu)}function _n(t,e){return xe(e,(function(e){return Qa(t[e])}))}function xn(t,e){for(var r=0,n=(e=vi(e,t)).length;null!=t&&r<n;)t=t[jo(e[r++])];return r&&r==n?t:i}function En(t,e,r){var n=e(t);return Ha(t)?n:Le(n,r(t))}function An(t){return null==t?t===i?"[object Undefined]":"[object Null]":ue&&ue in At(t)?function(t){var e=Tt.call(t,ue),r=t[ue];try{t[ue]=i;var n=!0}catch(t){}var o=Rt.call(t);return n&&(e?t[ue]=r:delete t[ue]),o}(t):function(t){return Rt.call(t)}(t)}function Sn(t,e){return t>e}function Ln(t,e){return null!=t&&Tt.call(t,e)}function kn(t,e){return null!=t&&e in At(t)}function Cn(t,e,r){for(var o=r?Ae:Ee,a=t[0].length,u=t.length,s=u,c=n(u),h=1/0,l=[];s--;){var d=t[s];s&&e&&(d=Se(d,We(e))),h=vr(d.length,h),c[s]=!r&&(e||a>=120&&d.length>=120)?new Yr(s&&d):i}d=t[0];var f=-1,p=c[0];t:for(;++f<a&&l.length<h;){var g=d[f],y=e?e(g):g;if(g=r||0!==g?g:0,!(p?He(p,y):o(l,y,r))){for(s=u;--s;){var v=c[s];if(!(v?He(v,y):o(t[s],y,r)))continue t}p&&p.push(y),l.push(g)}}return l}function Mn(t,e,r){var n=null==(t=Lo(t,e=vi(e,t)))?t:t[jo(Xo(e))];return null==n?i:ve(n,t,r)}function On(t){return ru(t)&&An(t)==g}function Dn(t,e,r,n,o){return t===e||(null==t||null==e||!ru(t)&&!ru(e)?t!=t&&e!=e:function(t,e,r,n,o,a){var u=Ha(t),s=Ha(e),c=u?y:fo(t),h=s?y:fo(e),l=(c=c==g?A:c)==A,d=(h=h==g?A:h)==A,f=c==h;if(f&&$a(t)){if(!$a(e))return!1;u=!0,l=!1}if(f&&!l)return a||(a=new Vr),u||hu(t)?Ji(t,e,r,n,o,a):function(t,e,r,n,i,o,a){switch(r){case F:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case D:return!(t.byteLength!=e.byteLength||!o(new Bt(t),new Bt(e)));case v:case m:case E:return Ia(+t,+e);case b:return t.name==e.name&&t.message==e.message;case L:case C:return t==e+"";case x:var u=Je;case k:var s=1&n;if(u||(u=rr),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;n|=2,a.set(t,e);var h=Ji(u(t),u(e),n,i,o,a);return a.delete(t),h;case M:if(Rr)return Rr.call(t)==Rr.call(e)}return!1}(t,e,c,r,n,o,a);if(!(1&r)){var p=l&&Tt.call(t,"__wrapped__"),w=d&&Tt.call(e,"__wrapped__");if(p||w){var _=p?t.value():t,S=w?e.value():e;return a||(a=new Vr),o(_,S,r,n,a)}}return!!f&&(a||(a=new Vr),function(t,e,r,n,o,a){var u=1&r,s=eo(t),c=s.length;if(c!=eo(e).length&&!u)return!1;for(var h=c;h--;){var l=s[h];if(!(u?l in e:Tt.call(e,l)))return!1}var d=a.get(t),f=a.get(e);if(d&&f)return d==e&&f==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=u;++h<c;){var y=t[l=s[h]],v=e[l];if(n)var m=u?n(v,y,l,e,t,a):n(y,v,l,t,e,a);if(!(m===i?y===v||o(y,v,r,n,a):m)){p=!1;break}g||(g="constructor"==l)}if(p&&!g){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return a.delete(t),a.delete(e),p}(t,e,r,n,o,a))}(t,e,r,n,Dn,o))}function Fn(t,e,r,n){var o=r.length,a=o,u=!n;if(null==t)return!a;for(t=At(t);o--;){var s=r[o];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){var c=(s=r[o])[0],h=t[c],l=s[1];if(u&&s[2]){if(h===i&&!(c in t))return!1}else{var d=new Vr;if(n)var f=n(h,l,c,t,e,d);if(!(f===i?Dn(l,h,3,n,d):f))return!1}}return!0}function Tn(t){return!(!eu(t)||(e=t,Gt&&Gt in e))&&(Qa(t)?zt:gt).test(zo(t));var e}function Pn(t){return"function"==typeof t?t:null==t?is:"object"==typeof t?Ha(t)?zn(t[0],t[1]):jn(t):fs(t)}function Gn(t){if(!xo(t))return gr(t);var e=[];for(var r in At(t))Tt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Rn(t,e){return t<e}function Nn(t,e){var r=-1,i=Va(t)?n(t.length):[];return ln(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function jn(t){var e=so(t);return 1==e.length&&e[0][2]?Ao(e[0][0],e[0][1]):function(r){return r===t||Fn(r,t,e)}}function zn(t,e){return bo(t)&&Eo(e)?Ao(jo(t),e):function(r){var n=ku(r,t);return n===i&&n===e?Cu(r,t):Dn(e,n,3)}}function Un(t,e,r,n,o){t!==e&&vn(e,(function(a,u){if(o||(o=new Vr),eu(a))!function(t,e,r,n,o,a,u){var s=Co(t,r),c=Co(e,r),h=u.get(c);if(h)Qr(t,r,h);else{var l=a?a(s,c,r+"",t,e,u):i,d=l===i;if(d){var f=Ha(c),p=!f&&$a(c),g=!f&&!p&&hu(c);l=c,f||p||g?Ha(s)?l=s:Za(s)?l=ki(s):p?(d=!1,l=_i(c,!0)):g?(d=!1,l=Ei(c,!0)):l=[]:ou(c)||qa(c)?(l=s,qa(s)?l=mu(s):eu(s)&&!Qa(s)||(l=go(c))):d=!1}d&&(u.set(c,l),o(l,c,n,a,u),u.delete(c)),Qr(t,r,l)}}(t,e,u,r,Un,n,o);else{var s=n?n(Co(t,u),a,u+"",t,e,o):i;s===i&&(s=a),Qr(t,u,s)}}),Tu)}function In(t,e){var r=t.length;if(r)return vo(e+=e<0?r:0,r)?t[e]:i}function Bn(t,e,r){e=e.length?Se(e,(function(t){return Ha(t)?function(e){return xn(e,1===t.length?t[0]:t)}:t})):[is];var n=-1;e=Se(e,We(ao()));var i=Nn(t,(function(t,r,i){var o=Se(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,a=i.length,u=r.length;++n<a;){var s=Ai(i[n],o[n]);if(s)return n>=u?s:s*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(i)}function Wn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],u=xn(t,a);r(u,a)&&Xn(o,vi(a,t),u)}return o}function qn(t,e,r,n){var i=n?Pe:Te,o=-1,a=e.length,u=t;for(t===e&&(e=ki(e)),r&&(u=Se(t,We(r)));++o<a;)for(var s=0,c=e[o],h=r?r(c):c;(s=i(u,h,s,n))>-1;)u!==t&&ne.call(u,s,1),ne.call(t,s,1);return t}function Hn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;vo(i)?ne.call(t,i,1):ci(t,i)}}return t}function Yn(t,e){return t+hr(wr()*(e-t+1))}function Vn(t,e){var r="";if(!t||e<1||e>l)return r;do{e%2&&(r+=t),(e=hr(e/2))&&(t+=t)}while(e);return r}function Zn(t,e){return Do(So(t,e,is),t+"")}function $n(t){return $r(Iu(t))}function Kn(t,e){var r=Iu(t);return Po(r,an(e,0,r.length))}function Xn(t,e,r,n){if(!eu(t))return t;for(var o=-1,a=(e=vi(e,t)).length,u=a-1,s=t;null!=s&&++o<a;){var c=jo(e[o]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=u){var l=s[c];(h=n?n(l,c,s):i)===i&&(h=eu(l)?l:vo(e[o+1])?[]:{})}Jr(s,c,h),s=s[c]}return t}var Qn=Cr?function(t,e){return Cr.set(t,e),t}:is,Jn=ce?function(t,e){return ce(t,"toString",{configurable:!0,enumerable:!1,value:es(e),writable:!0})}:is;function ti(t){return Po(Iu(t))}function ei(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i<o;)a[i]=t[i+e];return a}function ri(t,e){var r;return ln(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ni(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=t[o];null!==a&&!cu(a)&&(r?a<=e:a<e)?n=o+1:i=o}return i}return ii(t,e,is,r)}function ii(t,e,r,n){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var u=(e=r(e))!=e,s=null===e,c=cu(e),h=e===i;o<a;){var l=hr((o+a)/2),d=r(t[l]),f=d!==i,p=null===d,g=d==d,y=cu(d);if(u)var v=n||g;else v=h?g&&(n||f):s?g&&f&&(n||!p):c?g&&f&&!p&&(n||!y):!p&&!y&&(n?d<=e:d<e);v?o=l+1:a=l}return vr(a,4294967294)}function oi(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r],u=e?e(a):a;if(!r||!Ia(u,s)){var s=u;o[i++]=0===a?0:a}}return o}function ai(t){return"number"==typeof t?t:cu(t)?d:+t}function ui(t){if("string"==typeof t)return t;if(Ha(t))return Se(t,ui)+"";if(cu(t))return Nr?Nr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function si(t,e,r){var n=-1,i=Ee,o=t.length,a=!0,u=[],s=u;if(r)a=!1,i=Ae;else if(o>=200){var c=e?null:Vi(t);if(c)return rr(c);a=!1,i=He,s=new Yr}else s=e?[]:u;t:for(;++n<o;){var h=t[n],l=e?e(h):h;if(h=r||0!==h?h:0,a&&l==l){for(var d=s.length;d--;)if(s[d]===l)continue t;e&&s.push(l),u.push(h)}else i(s,l,r)||(s!==u&&s.push(l),u.push(h))}return u}function ci(t,e){return null==(t=Lo(t,e=vi(e,t)))||delete t[jo(Xo(e))]}function hi(t,e,r,n){return Xn(t,e,r(xn(t,e)),n)}function li(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ei(t,n?0:o,n?o+1:i):ei(t,n?o+1:0,n?i:o)}function di(t,e){var r=t;return r instanceof Br&&(r=r.value()),ke(e,(function(t,e){return e.func.apply(e.thisArg,Le([t],e.args))}),r)}function fi(t,e,r){var i=t.length;if(i<2)return i?si(t[0]):[];for(var o=-1,a=n(i);++o<i;)for(var u=t[o],s=-1;++s<i;)s!=o&&(a[o]=hn(a[o]||u,t[s],e,r));return si(yn(a,1),e,r)}function pi(t,e,r){for(var n=-1,o=t.length,a=e.length,u={};++n<o;){var s=n<a?e[n]:i;r(u,t[n],s)}return u}function gi(t){return Za(t)?t:[]}function yi(t){return"function"==typeof t?t:is}function vi(t,e){return Ha(t)?t:bo(t,e)?[t]:No(bu(t))}var mi=Zn;function bi(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:ei(t,e,r)}var wi=he||function(t){return oe.clearTimeout(t)};function _i(t,e){if(e)return t.slice();var r=t.length,n=Wt?Wt(r):new t.constructor(r);return t.copy(n),n}function xi(t){var e=new t.constructor(t.byteLength);return new Bt(e).set(new Bt(t)),e}function Ei(t,e){var r=e?xi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ai(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,a=cu(t),u=e!==i,s=null===e,c=e==e,h=cu(e);if(!s&&!h&&!a&&t>e||a&&u&&c&&!s&&!h||n&&u&&c||!r&&c||!o)return 1;if(!n&&!a&&!h&&t<e||h&&r&&o&&!n&&!a||s&&r&&o||!u&&o||!c)return-1}return 0}function Si(t,e,r,i){for(var o=-1,a=t.length,u=r.length,s=-1,c=e.length,h=yr(a-u,0),l=n(c+h),d=!i;++s<c;)l[s]=e[s];for(;++o<u;)(d||o<a)&&(l[r[o]]=t[o]);for(;h--;)l[s++]=t[o++];return l}function Li(t,e,r,i){for(var o=-1,a=t.length,u=-1,s=r.length,c=-1,h=e.length,l=yr(a-s,0),d=n(l+h),f=!i;++o<l;)d[o]=t[o];for(var p=o;++c<h;)d[p+c]=e[c];for(;++u<s;)(f||o<a)&&(d[p+r[u]]=t[o++]);return d}function ki(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Ci(t,e,r,n){var o=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var s=e[a],c=n?n(r[s],t[s],s,r,t):i;c===i&&(c=t[s]),o?nn(r,s,c):Jr(r,s,c)}return r}function Mi(t,e){return function(r,n){var i=Ha(r)?me:en,o=e?e():{};return i(r,t,ao(n,2),o)}}function Oi(t){return Zn((function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,u=o>2?r[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,u&&mo(r[0],r[1],u)&&(a=o<3?i:a,o=1),e=At(e);++n<o;){var s=r[n];s&&t(e,s,n,a)}return e}))}function Di(t,e){return function(r,n){if(null==r)return r;if(!Va(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=At(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Fi(t){return function(e,r,n){for(var i=-1,o=At(e),a=n(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===r(o[s],s,o))break}return e}}function Ti(t){return function(e){var r=Qe(e=bu(e))?or(e):i,n=r?r[0]:e.charAt(0),o=r?bi(r,1).join(""):e.slice(1);return n[t]()+o}}function Pi(t){return function(e){return ke(Qu(qu(e).replace(qt,"")),t,"")}}function Gi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=zr(t.prototype),n=t.apply(r,e);return eu(n)?n:r}}function Ri(t){return function(e,r,n){var o=At(e);if(!Va(e)){var a=ao(r,3);e=Fu(e),r=function(t){return a(o[t],t,o)}}var u=t(e,r,n);return u>-1?o[a?e[u]:u]:i}}function Ni(t){return to((function(e){var r=e.length,n=r,a=Ir.prototype.thru;for(t&&e.reverse();n--;){var u=e[n];if("function"!=typeof u)throw new kt(o);if(a&&!s&&"wrapper"==io(u))var s=new Ir([],!0)}for(n=s?n:r;++n<r;){var c=io(u=e[n]),h="wrapper"==c?no(u):i;s=h&&wo(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?s[io(h[0])].apply(s,h[3]):1==u.length&&wo(u)?s[c]():s.thru(u)}return function(){var t=arguments,n=t[0];if(s&&1==t.length&&Ha(n))return s.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function ji(t,e,r,o,a,u,s,h,l,d){var f=e&c,p=1&e,g=2&e,y=24&e,v=512&e,m=g?i:Gi(t);return function i(){for(var c=arguments.length,b=n(c),w=c;w--;)b[w]=arguments[w];if(y)var _=oo(i),x=Ze(b,_);if(o&&(b=Si(b,o,a,y)),u&&(b=Li(b,u,s,y)),c-=x,y&&c<d){var E=er(b,_);return Hi(t,e,ji,i.placeholder,r,b,E,h,l,d-c)}var A=p?r:this,S=g?A[t]:t;return c=b.length,h?b=ko(b,h):v&&c>1&&b.reverse(),f&&l<c&&(b.length=l),this&&this!==oe&&this instanceof i&&(S=m||Gi(S)),S.apply(A,b)}}function zi(t,e){return function(r,n){return function(t,e,r,n){return bn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function Ui(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ui(r),n=ui(n)):(r=ai(r),n=ai(n)),o=t(r,n)}return o}}function Ii(t){return to((function(e){return e=Se(e,We(ao())),Zn((function(r){var n=this;return t(e,(function(t){return ve(t,n,r)}))}))}))}function Bi(t,e){var r=(e=e===i?" ":ui(e)).length;if(r<2)return r?Vn(e,t):e;var n=Vn(e,cr(t/ir(e)));return Qe(e)?bi(or(n),0,t).join(""):n.slice(0,t)}function Wi(t){return function(e,r,o){return o&&"number"!=typeof o&&mo(e,r,o)&&(r=o=i),e=pu(e),r===i?(r=e,e=0):r=pu(r),function(t,e,r,i){for(var o=-1,a=yr(cr((e-t)/(r||1)),0),u=n(a);a--;)u[i?a:++o]=t,t+=r;return u}(e,r,o=o===i?e<r?1:-1:pu(o),t)}}function qi(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=vu(e),r=vu(r)),t(e,r)}}function Hi(t,e,r,n,o,a,u,c,h,l){var d=8&e;e|=d?s:64,4&(e&=~(d?64:s))||(e&=-4);var f=[t,e,o,d?a:i,d?u:i,d?i:a,d?i:u,c,h,l],p=r.apply(i,f);return wo(t)&&Mo(p,f),p.placeholder=n,Fo(p,t,e)}function Yi(t){var e=Et[t];return function(t,r){if(t=vu(t),(r=null==r?0:vr(gu(r),292))&&fr(t)){var n=(bu(t)+"e").split("e");return+((n=(bu(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Vi=Sr&&1/rr(new Sr([,-0]))[1]==h?function(t){return new Sr(t)}:cs;function Zi(t){return function(e){var r=fo(e);return r==x?Je(e):r==k?nr(e):function(t,e){return Se(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function $i(t,e,r,a,h,l,d,f){var p=2&e;if(!p&&"function"!=typeof t)throw new kt(o);var g=a?a.length:0;if(g||(e&=-97,a=h=i),d=d===i?d:yr(gu(d),0),f=f===i?f:gu(f),g-=h?h.length:0,64&e){var y=a,v=h;a=h=i}var m=p?i:no(t),b=[t,e,r,a,h,y,v,l,d,f];if(m&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,a=n==c&&8==r||n==c&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!a)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var s=e[3];if(s){var h=t[3];t[3]=h?Si(h,s,e[4]):s,t[4]=h?er(t[3],u):e[4]}(s=e[5])&&(h=t[5],t[5]=h?Li(h,s,e[6]):s,t[6]=h?er(t[5],u):e[6]),(s=e[7])&&(t[7]=s),n&c&&(t[8]=null==t[8]?e[8]:vr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(b,m),t=b[0],e=b[1],r=b[2],a=b[3],h=b[4],!(f=b[9]=b[9]===i?p?0:t.length:yr(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,r){var o=Gi(t);return function a(){for(var u=arguments.length,s=n(u),c=u,h=oo(a);c--;)s[c]=arguments[c];var l=u<3&&s[0]!==h&&s[u-1]!==h?[]:er(s,h);return(u-=l.length)<r?Hi(t,e,ji,a.placeholder,i,s,l,i,i,r-u):ve(this&&this!==oe&&this instanceof a?o:t,this,s)}}(t,e,f):e!=s&&33!=e||h.length?ji.apply(i,b):function(t,e,r,i){var o=1&e,a=Gi(t);return function e(){for(var u=-1,s=arguments.length,c=-1,h=i.length,l=n(h+s),d=this&&this!==oe&&this instanceof e?a:t;++c<h;)l[c]=i[c];for(;s--;)l[c++]=arguments[++u];return ve(d,o?r:this,l)}}(t,e,r,a);else var w=function(t,e,r){var n=1&e,i=Gi(t);return function e(){return(this&&this!==oe&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return Fo((m?Qn:Mo)(w,b),t,e)}function Ki(t,e,r,n){return t===i||Ia(t,Ot[r])&&!Tt.call(n,r)?e:t}function Xi(t,e,r,n,o,a){return eu(t)&&eu(e)&&(a.set(e,t),Un(t,e,i,Xi,a),a.delete(e)),t}function Qi(t){return ou(t)?i:t}function Ji(t,e,r,n,o,a){var u=1&r,s=t.length,c=e.length;if(s!=c&&!(u&&c>s))return!1;var h=a.get(t),l=a.get(e);if(h&&l)return h==e&&l==t;var d=-1,f=!0,p=2&r?new Yr:i;for(a.set(t,e),a.set(e,t);++d<s;){var g=t[d],y=e[d];if(n)var v=u?n(y,g,d,e,t,a):n(g,y,d,t,e,a);if(v!==i){if(v)continue;f=!1;break}if(p){if(!Me(e,(function(t,e){if(!He(p,e)&&(g===t||o(g,t,r,n,a)))return p.push(e)}))){f=!1;break}}else if(g!==y&&!o(g,y,r,n,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function to(t){return Do(So(t,i,Yo),t+"")}function eo(t){return En(t,Fu,ho)}function ro(t){return En(t,Tu,lo)}var no=Cr?function(t){return Cr.get(t)}:cs;function io(t){for(var e=t.name+"",r=Mr[e],n=Tt.call(Mr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function oo(t){return(Tt.call(jr,"placeholder")?jr:t).placeholder}function ao(){var t=jr.iteratee||os;return t=t===os?Pn:t,arguments.length?t(arguments[0],arguments[1]):t}function uo(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function so(t){for(var e=Fu(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Eo(i)]}return e}function co(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return Tn(r)?r:i}var ho=lr?function(t){return null==t?[]:(t=At(t),xe(lr(t),(function(e){return te.call(t,e)})))}:ys,lo=lr?function(t){for(var e=[];t;)Le(e,ho(t)),t=Yt(t);return e}:ys,fo=An;function po(t,e,r){for(var n=-1,i=(e=vi(e,t)).length,o=!1;++n<i;){var a=jo(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&tu(i)&&vo(a,i)&&(Ha(t)||qa(t))}function go(t){return"function"!=typeof t.constructor||xo(t)?{}:zr(Yt(t))}function yo(t){return Ha(t)||qa(t)||!!(ie&&t&&t[ie])}function vo(t,e){var r=typeof t;return!!(e=null==e?l:e)&&("number"==r||"symbol"!=r&&vt.test(t))&&t>-1&&t%1==0&&t<e}function mo(t,e,r){if(!eu(r))return!1;var n=typeof e;return!!("number"==n?Va(r)&&vo(e,r.length):"string"==n&&e in r)&&Ia(r[e],t)}function bo(t,e){if(Ha(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!cu(t))||J.test(t)||!Q.test(t)||null!=e&&t in At(e)}function wo(t){var e=io(t),r=jr[e];if("function"!=typeof r||!(e in Br.prototype))return!1;if(t===r)return!0;var n=no(r);return!!n&&t===n[0]}(xr&&fo(new xr(new ArrayBuffer(1)))!=F||Er&&fo(new Er)!=x||Ar&&fo(Ar.resolve())!=S||Sr&&fo(new Sr)!=k||Lr&&fo(new Lr)!=O)&&(fo=function(t){var e=An(t),r=e==A?t.constructor:i,n=r?zo(r):"";if(n)switch(n){case Or:return F;case Dr:return x;case Fr:return S;case Tr:return k;case Pr:return O}return e});var _o=Dt?Qa:vs;function xo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function Eo(t){return t==t&&!eu(t)}function Ao(t,e){return function(r){return null!=r&&r[t]===e&&(e!==i||t in At(r))}}function So(t,e,r){return e=yr(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=yr(i.length-e,0),u=n(a);++o<a;)u[o]=i[e+o];o=-1;for(var s=n(e+1);++o<e;)s[o]=i[o];return s[e]=r(u),ve(t,this,s)}}function Lo(t,e){return e.length<2?t:xn(t,ei(e,0,-1))}function ko(t,e){for(var r=t.length,n=vr(e.length,r),o=ki(t);n--;){var a=e[n];t[n]=vo(a,r)?o[a]:i}return t}function Co(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Mo=To(Qn),Oo=je||function(t,e){return oe.setTimeout(t,e)},Do=To(Jn);function Fo(t,e,r){var n=e+"";return Do(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return be(p,(function(r){var n="_."+r[0];e&r[1]&&!Ee(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(ut):[]}(n),r)))}function To(t){var e=0,r=0;return function(){var n=mr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Po(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var a=Yn(r,o),u=t[a];t[a]=t[r],t[r]=u}return t.length=e,t}var Go,Ro,No=(Go=Ga((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,n,i){e.push(n?i.replace(ht,"$1"):r||t)})),e}),(function(t){return 500===Ro.size&&Ro.clear(),t})),Ro=Go.cache,Go);function jo(t){if("string"==typeof t||cu(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zo(t){if(null!=t){try{return Ft.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Uo(t){if(t instanceof Br)return t.clone();var e=new Ir(t.__wrapped__,t.__chain__);return e.__actions__=ki(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Io=Zn((function(t,e){return Za(t)?hn(t,yn(e,1,Za,!0)):[]})),Bo=Zn((function(t,e){var r=Xo(e);return Za(r)&&(r=i),Za(t)?hn(t,yn(e,1,Za,!0),ao(r,2)):[]})),Wo=Zn((function(t,e){var r=Xo(e);return Za(r)&&(r=i),Za(t)?hn(t,yn(e,1,Za,!0),i,r):[]}));function qo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:gu(r);return i<0&&(i=yr(n+i,0)),Fe(t,ao(e,3),i)}function Ho(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=gu(r),o=r<0?yr(n+o,0):vr(o,n-1)),Fe(t,ao(e,3),o,!0)}function Yo(t){return null!=t&&t.length?yn(t,1):[]}function Vo(t){return t&&t.length?t[0]:i}var Zo=Zn((function(t){var e=Se(t,gi);return e.length&&e[0]===t[0]?Cn(e):[]})),$o=Zn((function(t){var e=Xo(t),r=Se(t,gi);return e===Xo(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Cn(r,ao(e,2)):[]})),Ko=Zn((function(t){var e=Xo(t),r=Se(t,gi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Cn(r,i,e):[]}));function Xo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qo=Zn(Jo);function Jo(t,e){return t&&t.length&&e&&e.length?qn(t,e):t}var ta=to((function(t,e){var r=null==t?0:t.length,n=on(t,e);return Hn(t,Se(e,(function(t){return vo(t,r)?+t:t})).sort(Ai)),n}));function ea(t){return null==t?t:_r.call(t)}var ra=Zn((function(t){return si(yn(t,1,Za,!0))})),na=Zn((function(t){var e=Xo(t);return Za(e)&&(e=i),si(yn(t,1,Za,!0),ao(e,2))})),ia=Zn((function(t){var e=Xo(t);return e="function"==typeof e?e:i,si(yn(t,1,Za,!0),i,e)}));function oa(t){if(!t||!t.length)return[];var e=0;return t=xe(t,(function(t){if(Za(t))return e=yr(t.length,e),!0})),Ie(e,(function(e){return Se(t,Ne(e))}))}function aa(t,e){if(!t||!t.length)return[];var r=oa(t);return null==e?r:Se(r,(function(t){return ve(e,i,t)}))}var ua=Zn((function(t,e){return Za(t)?hn(t,e):[]})),sa=Zn((function(t){return fi(xe(t,Za))})),ca=Zn((function(t){var e=Xo(t);return Za(e)&&(e=i),fi(xe(t,Za),ao(e,2))})),ha=Zn((function(t){var e=Xo(t);return e="function"==typeof e?e:i,fi(xe(t,Za),i,e)})),la=Zn(oa),da=Zn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,aa(t,r)}));function fa(t){var e=jr(t);return e.__chain__=!0,e}function pa(t,e){return e(t)}var ga=to((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return on(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Br&&vo(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:pa,args:[o],thisArg:i}),new Ir(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ya=Mi((function(t,e,r){Tt.call(t,r)?++t[r]:nn(t,r,1)})),va=Ri(qo),ma=Ri(Ho);function ba(t,e){return(Ha(t)?be:ln)(t,ao(e,3))}function wa(t,e){return(Ha(t)?we:dn)(t,ao(e,3))}var _a=Mi((function(t,e,r){Tt.call(t,r)?t[r].push(e):nn(t,r,[e])})),xa=Zn((function(t,e,r){var i=-1,o="function"==typeof e,a=Va(t)?n(t.length):[];return ln(t,(function(t){a[++i]=o?ve(e,t,r):Mn(t,e,r)})),a})),Ea=Mi((function(t,e,r){nn(t,r,e)}));function Aa(t,e){return(Ha(t)?Se:Nn)(t,ao(e,3))}var Sa=Mi((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),La=Zn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&mo(t,e[0],e[1])?e=[]:r>2&&mo(e[0],e[1],e[2])&&(e=[e[0]]),Bn(t,yn(e,1),[])})),ka=Oe||function(){return oe.Date.now()};function Ca(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,$i(t,c,i,i,i,i,e)}function Ma(t,e){var r;if("function"!=typeof e)throw new kt(o);return t=gu(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Oa=Zn((function(t,e,r){var n=1;if(r.length){var i=er(r,oo(Oa));n|=s}return $i(t,n,e,r,i)})),Da=Zn((function(t,e,r){var n=3;if(r.length){var i=er(r,oo(Da));n|=s}return $i(e,n,t,r,i)}));function Fa(t,e,r){var n,a,u,s,c,h,l=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new kt(o);function g(e){var r=n,o=a;return n=a=i,l=e,s=t.apply(o,r)}function y(t){return l=t,c=Oo(m,e),d?g(t):s}function v(t){var r=t-h;return h===i||r>=e||r<0||f&&t-l>=u}function m(){var t=ka();if(v(t))return b(t);c=Oo(m,function(t){var r=e-(t-h);return f?vr(r,u-(t-l)):r}(t))}function b(t){return c=i,p&&n?g(t):(n=a=i,s)}function w(){var t=ka(),r=v(t);if(n=arguments,a=this,h=t,r){if(c===i)return y(h);if(f)return wi(c),c=Oo(m,e),g(h)}return c===i&&(c=Oo(m,e)),s}return e=vu(e)||0,eu(r)&&(d=!!r.leading,u=(f="maxWait"in r)?yr(vu(r.maxWait)||0,e):u,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==i&&wi(c),l=0,n=h=a=c=i},w.flush=function(){return c===i?s:b(ka())},w}var Ta=Zn((function(t,e){return cn(t,1,e)})),Pa=Zn((function(t,e,r){return cn(t,vu(e)||0,r)}));function Ga(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new kt(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ga.Cache||Hr),r}function Ra(t){if("function"!=typeof t)throw new kt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ga.Cache=Hr;var Na=mi((function(t,e){var r=(e=1==e.length&&Ha(e[0])?Se(e[0],We(ao())):Se(yn(e,1),We(ao()))).length;return Zn((function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return ve(t,this,n)}))})),ja=Zn((function(t,e){var r=er(e,oo(ja));return $i(t,s,i,e,r)})),za=Zn((function(t,e){var r=er(e,oo(za));return $i(t,64,i,e,r)})),Ua=to((function(t,e){return $i(t,256,i,i,i,e)}));function Ia(t,e){return t===e||t!=t&&e!=e}var Ba=qi(Sn),Wa=qi((function(t,e){return t>=e})),qa=On(function(){return arguments}())?On:function(t){return ru(t)&&Tt.call(t,"callee")&&!te.call(t,"callee")},Ha=n.isArray,Ya=le?We(le):function(t){return ru(t)&&An(t)==D};function Va(t){return null!=t&&tu(t.length)&&!Qa(t)}function Za(t){return ru(t)&&Va(t)}var $a=dr||vs,Ka=de?We(de):function(t){return ru(t)&&An(t)==m};function Xa(t){if(!ru(t))return!1;var e=An(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ou(t)}function Qa(t){if(!eu(t))return!1;var e=An(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ja(t){return"number"==typeof t&&t==gu(t)}function tu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function eu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ru(t){return null!=t&&"object"==typeof t}var nu=fe?We(fe):function(t){return ru(t)&&fo(t)==x};function iu(t){return"number"==typeof t||ru(t)&&An(t)==E}function ou(t){if(!ru(t)||An(t)!=A)return!1;var e=Yt(t);if(null===e)return!0;var r=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ft.call(r)==Nt}var au=pe?We(pe):function(t){return ru(t)&&An(t)==L},uu=ge?We(ge):function(t){return ru(t)&&fo(t)==k};function su(t){return"string"==typeof t||!Ha(t)&&ru(t)&&An(t)==C}function cu(t){return"symbol"==typeof t||ru(t)&&An(t)==M}var hu=ye?We(ye):function(t){return ru(t)&&tu(t.length)&&!!Qt[An(t)]},lu=qi(Rn),du=qi((function(t,e){return t<=e}));function fu(t){if(!t)return[];if(Va(t))return su(t)?or(t):ki(t);if(ae&&t[ae])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[ae]());var e=fo(t);return(e==x?Je:e==k?rr:Iu)(t)}function pu(t){return t?(t=vu(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gu(t){var e=pu(t),r=e%1;return e==e?r?e-r:e:0}function yu(t){return t?an(gu(t),0,f):0}function vu(t){if("number"==typeof t)return t;if(cu(t))return d;if(eu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=eu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Be(t);var r=pt.test(t);return r||yt.test(t)?re(t.slice(2),r?2:8):ft.test(t)?d:+t}function mu(t){return Ci(t,Tu(t))}function bu(t){return null==t?"":ui(t)}var wu=Oi((function(t,e){if(xo(e)||Va(e))Ci(e,Fu(e),t);else for(var r in e)Tt.call(e,r)&&Jr(t,r,e[r])})),_u=Oi((function(t,e){Ci(e,Tu(e),t)})),xu=Oi((function(t,e,r,n){Ci(e,Tu(e),t,n)})),Eu=Oi((function(t,e,r,n){Ci(e,Fu(e),t,n)})),Au=to(on),Su=Zn((function(t,e){t=At(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&mo(e[0],e[1],o)&&(n=1);++r<n;)for(var a=e[r],u=Tu(a),s=-1,c=u.length;++s<c;){var h=u[s],l=t[h];(l===i||Ia(l,Ot[h])&&!Tt.call(t,h))&&(t[h]=a[h])}return t})),Lu=Zn((function(t){return t.push(i,Xi),ve(Gu,i,t)}));function ku(t,e,r){var n=null==t?i:xn(t,e);return n===i?r:n}function Cu(t,e){return null!=t&&po(t,e,kn)}var Mu=zi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),t[e]=r}),es(is)),Ou=zi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),Tt.call(t,e)?t[e].push(r):t[e]=[r]}),ao),Du=Zn(Mn);function Fu(t){return Va(t)?Zr(t):Gn(t)}function Tu(t){return Va(t)?Zr(t,!0):function(t){if(!eu(t))return function(t){var e=[];if(null!=t)for(var r in At(t))e.push(r);return e}(t);var e=xo(t),r=[];for(var n in t)("constructor"!=n||!e&&Tt.call(t,n))&&r.push(n);return r}(t)}var Pu=Oi((function(t,e,r){Un(t,e,r)})),Gu=Oi((function(t,e,r,n){Un(t,e,r,n)})),Ru=to((function(t,e){var r={};if(null==t)return r;var n=!1;e=Se(e,(function(e){return e=vi(e,t),n||(n=e.length>1),e})),Ci(t,ro(t),r),n&&(r=un(r,7,Qi));for(var i=e.length;i--;)ci(r,e[i]);return r})),Nu=to((function(t,e){return null==t?{}:function(t,e){return Wn(t,e,(function(e,r){return Cu(t,r)}))}(t,e)}));function ju(t,e){if(null==t)return{};var r=Se(ro(t),(function(t){return[t]}));return e=ao(e),Wn(t,r,(function(t,r){return e(t,r[0])}))}var zu=Zi(Fu),Uu=Zi(Tu);function Iu(t){return null==t?[]:qe(t,Fu(t))}var Bu=Pi((function(t,e,r){return e=e.toLowerCase(),t+(r?Wu(e):e)}));function Wu(t){return Xu(bu(t).toLowerCase())}function qu(t){return(t=bu(t))&&t.replace(mt,$e).replace(Ht,"")}var Hu=Pi((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Yu=Pi((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Vu=Ti("toLowerCase"),Zu=Pi((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),$u=Pi((function(t,e,r){return t+(r?" ":"")+Xu(e)})),Ku=Pi((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Xu=Ti("toUpperCase");function Qu(t,e,r){return t=bu(t),(e=r?i:e)===i?function(t){return $t.test(t)}(t)?function(t){return t.match(Vt)||[]}(t):function(t){return t.match(st)||[]}(t):t.match(e)||[]}var Ju=Zn((function(t,e){try{return ve(t,i,e)}catch(t){return Xa(t)?t:new _t(t)}})),ts=to((function(t,e){return be(e,(function(e){e=jo(e),nn(t,e,Oa(t[e],t))})),t}));function es(t){return function(){return t}}var rs=Ni(),ns=Ni(!0);function is(t){return t}function os(t){return Pn("function"==typeof t?t:un(t,1))}var as=Zn((function(t,e){return function(r){return Mn(r,t,e)}})),us=Zn((function(t,e){return function(r){return Mn(t,r,e)}}));function ss(t,e,r){var n=Fu(e),i=_n(e,n);null!=r||eu(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=_n(e,Fu(e)));var o=!(eu(r)&&"chain"in r&&!r.chain),a=Qa(t);return be(i,(function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=ki(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Le([this.value()],arguments))})})),t}function cs(){}var hs=Ii(Se),ls=Ii(_e),ds=Ii(Me);function fs(t){return bo(t)?Ne(jo(t)):function(t){return function(e){return xn(e,t)}}(t)}var ps=Wi(),gs=Wi(!0);function ys(){return[]}function vs(){return!1}var ms,bs=Ui((function(t,e){return t+e}),0),ws=Yi("ceil"),_s=Ui((function(t,e){return t/e}),1),xs=Yi("floor"),Es=Ui((function(t,e){return t*e}),1),As=Yi("round"),Ss=Ui((function(t,e){return t-e}),0);return jr.after=function(t,e){if("function"!=typeof e)throw new kt(o);return t=gu(t),function(){if(--t<1)return e.apply(this,arguments)}},jr.ary=Ca,jr.assign=wu,jr.assignIn=_u,jr.assignInWith=xu,jr.assignWith=Eu,jr.at=Au,jr.before=Ma,jr.bind=Oa,jr.bindAll=ts,jr.bindKey=Da,jr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ha(t)?t:[t]},jr.chain=fa,jr.chunk=function(t,e,r){e=(r?mo(t,e,r):e===i)?1:yr(gu(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,u=0,s=n(cr(o/e));a<o;)s[u++]=ei(t,a,a+=e);return s},jr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},jr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Le(Ha(r)?ki(r):[r],yn(e,1))},jr.cond=function(t){var e=null==t?0:t.length,r=ao();return t=e?Se(t,(function(t){if("function"!=typeof t[1])throw new kt(o);return[r(t[0]),t[1]]})):[],Zn((function(r){for(var n=-1;++n<e;){var i=t[n];if(ve(i[0],this,r))return ve(i[1],this,r)}}))},jr.conforms=function(t){return function(t){var e=Fu(t);return function(r){return sn(r,t,e)}}(un(t,1))},jr.constant=es,jr.countBy=ya,jr.create=function(t,e){var r=zr(t);return null==e?r:rn(r,e)},jr.curry=function t(e,r,n){var o=$i(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},jr.curryRight=function t(e,r,n){var o=$i(e,16,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},jr.debounce=Fa,jr.defaults=Su,jr.defaultsDeep=Lu,jr.defer=Ta,jr.delay=Pa,jr.difference=Io,jr.differenceBy=Bo,jr.differenceWith=Wo,jr.drop=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,(e=r||e===i?1:gu(e))<0?0:e,n):[]},jr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,0,(e=n-(e=r||e===i?1:gu(e)))<0?0:e):[]},jr.dropRightWhile=function(t,e){return t&&t.length?li(t,ao(e,3),!0,!0):[]},jr.dropWhile=function(t,e){return t&&t.length?li(t,ao(e,3),!0):[]},jr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&mo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=gu(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:gu(n))<0&&(n+=o),n=r>n?0:yu(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},jr.filter=function(t,e){return(Ha(t)?xe:gn)(t,ao(e,3))},jr.flatMap=function(t,e){return yn(Aa(t,e),1)},jr.flatMapDeep=function(t,e){return yn(Aa(t,e),h)},jr.flatMapDepth=function(t,e,r){return r=r===i?1:gu(r),yn(Aa(t,e),r)},jr.flatten=Yo,jr.flattenDeep=function(t){return null!=t&&t.length?yn(t,h):[]},jr.flattenDepth=function(t,e){return null!=t&&t.length?yn(t,e=e===i?1:gu(e)):[]},jr.flip=function(t){return $i(t,512)},jr.flow=rs,jr.flowRight=ns,jr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},jr.functions=function(t){return null==t?[]:_n(t,Fu(t))},jr.functionsIn=function(t){return null==t?[]:_n(t,Tu(t))},jr.groupBy=_a,jr.initial=function(t){return null!=t&&t.length?ei(t,0,-1):[]},jr.intersection=Zo,jr.intersectionBy=$o,jr.intersectionWith=Ko,jr.invert=Mu,jr.invertBy=Ou,jr.invokeMap=xa,jr.iteratee=os,jr.keyBy=Ea,jr.keys=Fu,jr.keysIn=Tu,jr.map=Aa,jr.mapKeys=function(t,e){var r={};return e=ao(e,3),bn(t,(function(t,n,i){nn(r,e(t,n,i),t)})),r},jr.mapValues=function(t,e){var r={};return e=ao(e,3),bn(t,(function(t,n,i){nn(r,n,e(t,n,i))})),r},jr.matches=function(t){return jn(un(t,1))},jr.matchesProperty=function(t,e){return zn(t,un(e,1))},jr.memoize=Ga,jr.merge=Pu,jr.mergeWith=Gu,jr.method=as,jr.methodOf=us,jr.mixin=ss,jr.negate=Ra,jr.nthArg=function(t){return t=gu(t),Zn((function(e){return In(e,t)}))},jr.omit=Ru,jr.omitBy=function(t,e){return ju(t,Ra(ao(e)))},jr.once=function(t){return Ma(2,t)},jr.orderBy=function(t,e,r,n){return null==t?[]:(Ha(e)||(e=null==e?[]:[e]),Ha(r=n?i:r)||(r=null==r?[]:[r]),Bn(t,e,r))},jr.over=hs,jr.overArgs=Na,jr.overEvery=ls,jr.overSome=ds,jr.partial=ja,jr.partialRight=za,jr.partition=Sa,jr.pick=Nu,jr.pickBy=ju,jr.property=fs,jr.propertyOf=function(t){return function(e){return null==t?i:xn(t,e)}},jr.pull=Qo,jr.pullAll=Jo,jr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?qn(t,e,ao(r,2)):t},jr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?qn(t,e,i,r):t},jr.pullAt=ta,jr.range=ps,jr.rangeRight=gs,jr.rearg=Ua,jr.reject=function(t,e){return(Ha(t)?xe:gn)(t,Ra(ao(e,3)))},jr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=ao(e,3);++n<o;){var a=t[n];e(a,n,t)&&(r.push(a),i.push(n))}return Hn(t,i),r},jr.rest=function(t,e){if("function"!=typeof t)throw new kt(o);return Zn(t,e=e===i?e:gu(e))},jr.reverse=ea,jr.sampleSize=function(t,e,r){return e=(r?mo(t,e,r):e===i)?1:gu(e),(Ha(t)?Kr:Kn)(t,e)},jr.set=function(t,e,r){return null==t?t:Xn(t,e,r)},jr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:Xn(t,e,r,n)},jr.shuffle=function(t){return(Ha(t)?Xr:ti)(t)},jr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&mo(t,e,r)?(e=0,r=n):(e=null==e?0:gu(e),r=r===i?n:gu(r)),ei(t,e,r)):[]},jr.sortBy=La,jr.sortedUniq=function(t){return t&&t.length?oi(t):[]},jr.sortedUniqBy=function(t,e){return t&&t.length?oi(t,ao(e,2)):[]},jr.split=function(t,e,r){return r&&"number"!=typeof r&&mo(t,e,r)&&(e=r=i),(r=r===i?f:r>>>0)?(t=bu(t))&&("string"==typeof e||null!=e&&!au(e))&&!(e=ui(e))&&Qe(t)?bi(or(t),0,r):t.split(e,r):[]},jr.spread=function(t,e){if("function"!=typeof t)throw new kt(o);return e=null==e?0:yr(gu(e),0),Zn((function(r){var n=r[e],i=bi(r,0,e);return n&&Le(i,n),ve(t,this,i)}))},jr.tail=function(t){var e=null==t?0:t.length;return e?ei(t,1,e):[]},jr.take=function(t,e,r){return t&&t.length?ei(t,0,(e=r||e===i?1:gu(e))<0?0:e):[]},jr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,(e=n-(e=r||e===i?1:gu(e)))<0?0:e,n):[]},jr.takeRightWhile=function(t,e){return t&&t.length?li(t,ao(e,3),!1,!0):[]},jr.takeWhile=function(t,e){return t&&t.length?li(t,ao(e,3)):[]},jr.tap=function(t,e){return e(t),t},jr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new kt(o);return eu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Fa(t,e,{leading:n,maxWait:e,trailing:i})},jr.thru=pa,jr.toArray=fu,jr.toPairs=zu,jr.toPairsIn=Uu,jr.toPath=function(t){return Ha(t)?Se(t,jo):cu(t)?[t]:ki(No(bu(t)))},jr.toPlainObject=mu,jr.transform=function(t,e,r){var n=Ha(t),i=n||$a(t)||hu(t);if(e=ao(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:eu(t)&&Qa(o)?zr(Yt(t)):{}}return(i?be:bn)(t,(function(t,n,i){return e(r,t,n,i)})),r},jr.unary=function(t){return Ca(t,1)},jr.union=ra,jr.unionBy=na,jr.unionWith=ia,jr.uniq=function(t){return t&&t.length?si(t):[]},jr.uniqBy=function(t,e){return t&&t.length?si(t,ao(e,2)):[]},jr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?si(t,i,e):[]},jr.unset=function(t,e){return null==t||ci(t,e)},jr.unzip=oa,jr.unzipWith=aa,jr.update=function(t,e,r){return null==t?t:hi(t,e,yi(r))},jr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:hi(t,e,yi(r),n)},jr.values=Iu,jr.valuesIn=function(t){return null==t?[]:qe(t,Tu(t))},jr.without=ua,jr.words=Qu,jr.wrap=function(t,e){return ja(yi(e),t)},jr.xor=sa,jr.xorBy=ca,jr.xorWith=ha,jr.zip=la,jr.zipObject=function(t,e){return pi(t||[],e||[],Jr)},jr.zipObjectDeep=function(t,e){return pi(t||[],e||[],Xn)},jr.zipWith=da,jr.entries=zu,jr.entriesIn=Uu,jr.extend=_u,jr.extendWith=xu,ss(jr,jr),jr.add=bs,jr.attempt=Ju,jr.camelCase=Bu,jr.capitalize=Wu,jr.ceil=ws,jr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=vu(r))==r?r:0),e!==i&&(e=(e=vu(e))==e?e:0),an(vu(t),e,r)},jr.clone=function(t){return un(t,4)},jr.cloneDeep=function(t){return un(t,5)},jr.cloneDeepWith=function(t,e){return un(t,5,e="function"==typeof e?e:i)},jr.cloneWith=function(t,e){return un(t,4,e="function"==typeof e?e:i)},jr.conformsTo=function(t,e){return null==e||sn(t,e,Fu(e))},jr.deburr=qu,jr.defaultTo=function(t,e){return null==t||t!=t?e:t},jr.divide=_s,jr.endsWith=function(t,e,r){t=bu(t),e=ui(e);var n=t.length,o=r=r===i?n:an(gu(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},jr.eq=Ia,jr.escape=function(t){return(t=bu(t))&&Z.test(t)?t.replace(Y,Ke):t},jr.escapeRegExp=function(t){return(t=bu(t))&&rt.test(t)?t.replace(et,"\\$&"):t},jr.every=function(t,e,r){var n=Ha(t)?_e:fn;return r&&mo(t,e,r)&&(e=i),n(t,ao(e,3))},jr.find=va,jr.findIndex=qo,jr.findKey=function(t,e){return De(t,ao(e,3),bn)},jr.findLast=ma,jr.findLastIndex=Ho,jr.findLastKey=function(t,e){return De(t,ao(e,3),wn)},jr.floor=xs,jr.forEach=ba,jr.forEachRight=wa,jr.forIn=function(t,e){return null==t?t:vn(t,ao(e,3),Tu)},jr.forInRight=function(t,e){return null==t?t:mn(t,ao(e,3),Tu)},jr.forOwn=function(t,e){return t&&bn(t,ao(e,3))},jr.forOwnRight=function(t,e){return t&&wn(t,ao(e,3))},jr.get=ku,jr.gt=Ba,jr.gte=Wa,jr.has=function(t,e){return null!=t&&po(t,e,Ln)},jr.hasIn=Cu,jr.head=Vo,jr.identity=is,jr.includes=function(t,e,r,n){t=Va(t)?t:Iu(t),r=r&&!n?gu(r):0;var i=t.length;return r<0&&(r=yr(i+r,0)),su(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Te(t,e,r)>-1},jr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:gu(r);return i<0&&(i=yr(n+i,0)),Te(t,e,i)},jr.inRange=function(t,e,r){return e=pu(e),r===i?(r=e,e=0):r=pu(r),function(t,e,r){return t>=vr(e,r)&&t<yr(e,r)}(t=vu(t),e,r)},jr.invoke=Du,jr.isArguments=qa,jr.isArray=Ha,jr.isArrayBuffer=Ya,jr.isArrayLike=Va,jr.isArrayLikeObject=Za,jr.isBoolean=function(t){return!0===t||!1===t||ru(t)&&An(t)==v},jr.isBuffer=$a,jr.isDate=Ka,jr.isElement=function(t){return ru(t)&&1===t.nodeType&&!ou(t)},jr.isEmpty=function(t){if(null==t)return!0;if(Va(t)&&(Ha(t)||"string"==typeof t||"function"==typeof t.splice||$a(t)||hu(t)||qa(t)))return!t.length;var e=fo(t);if(e==x||e==k)return!t.size;if(xo(t))return!Gn(t).length;for(var r in t)if(Tt.call(t,r))return!1;return!0},jr.isEqual=function(t,e){return Dn(t,e)},jr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Dn(t,e,i,r):!!n},jr.isError=Xa,jr.isFinite=function(t){return"number"==typeof t&&fr(t)},jr.isFunction=Qa,jr.isInteger=Ja,jr.isLength=tu,jr.isMap=nu,jr.isMatch=function(t,e){return t===e||Fn(t,e,so(e))},jr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Fn(t,e,so(e),r)},jr.isNaN=function(t){return iu(t)&&t!=+t},jr.isNative=function(t){if(_o(t))throw new _t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Tn(t)},jr.isNil=function(t){return null==t},jr.isNull=function(t){return null===t},jr.isNumber=iu,jr.isObject=eu,jr.isObjectLike=ru,jr.isPlainObject=ou,jr.isRegExp=au,jr.isSafeInteger=function(t){return Ja(t)&&t>=-9007199254740991&&t<=l},jr.isSet=uu,jr.isString=su,jr.isSymbol=cu,jr.isTypedArray=hu,jr.isUndefined=function(t){return t===i},jr.isWeakMap=function(t){return ru(t)&&fo(t)==O},jr.isWeakSet=function(t){return ru(t)&&"[object WeakSet]"==An(t)},jr.join=function(t,e){return null==t?"":pr.call(t,e)},jr.kebabCase=Hu,jr.last=Xo,jr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=gu(r))<0?yr(n+o,0):vr(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Fe(t,Ge,o,!0)},jr.lowerCase=Yu,jr.lowerFirst=Vu,jr.lt=lu,jr.lte=du,jr.max=function(t){return t&&t.length?pn(t,is,Sn):i},jr.maxBy=function(t,e){return t&&t.length?pn(t,ao(e,2),Sn):i},jr.mean=function(t){return Re(t,is)},jr.meanBy=function(t,e){return Re(t,ao(e,2))},jr.min=function(t){return t&&t.length?pn(t,is,Rn):i},jr.minBy=function(t,e){return t&&t.length?pn(t,ao(e,2),Rn):i},jr.stubArray=ys,jr.stubFalse=vs,jr.stubObject=function(){return{}},jr.stubString=function(){return""},jr.stubTrue=function(){return!0},jr.multiply=Es,jr.nth=function(t,e){return t&&t.length?In(t,gu(e)):i},jr.noConflict=function(){return oe._===this&&(oe._=jt),this},jr.noop=cs,jr.now=ka,jr.pad=function(t,e,r){t=bu(t);var n=(e=gu(e))?ir(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Bi(hr(i),r)+t+Bi(cr(i),r)},jr.padEnd=function(t,e,r){t=bu(t);var n=(e=gu(e))?ir(t):0;return e&&n<e?t+Bi(e-n,r):t},jr.padStart=function(t,e,r){t=bu(t);var n=(e=gu(e))?ir(t):0;return e&&n<e?Bi(e-n,r)+t:t},jr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),br(bu(t).replace(nt,""),e||0)},jr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&mo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=pu(t),e===i?(e=t,t=0):e=pu(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=wr();return vr(t+o*(e-t+ee("1e-"+((o+"").length-1))),e)}return Yn(t,e)},jr.reduce=function(t,e,r){var n=Ha(t)?ke:ze,i=arguments.length<3;return n(t,ao(e,4),r,i,ln)},jr.reduceRight=function(t,e,r){var n=Ha(t)?Ce:ze,i=arguments.length<3;return n(t,ao(e,4),r,i,dn)},jr.repeat=function(t,e,r){return e=(r?mo(t,e,r):e===i)?1:gu(e),Vn(bu(t),e)},jr.replace=function(){var t=arguments,e=bu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},jr.result=function(t,e,r){var n=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=i);++n<o;){var a=null==t?i:t[jo(e[n])];a===i&&(n=o,a=r),t=Qa(a)?a.call(t):a}return t},jr.round=As,jr.runInContext=t,jr.sample=function(t){return(Ha(t)?$r:$n)(t)},jr.size=function(t){if(null==t)return 0;if(Va(t))return su(t)?ir(t):t.length;var e=fo(t);return e==x||e==k?t.size:Gn(t).length},jr.snakeCase=Zu,jr.some=function(t,e,r){var n=Ha(t)?Me:ri;return r&&mo(t,e,r)&&(e=i),n(t,ao(e,3))},jr.sortedIndex=function(t,e){return ni(t,e)},jr.sortedIndexBy=function(t,e,r){return ii(t,e,ao(r,2))},jr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ni(t,e);if(n<r&&Ia(t[n],e))return n}return-1},jr.sortedLastIndex=function(t,e){return ni(t,e,!0)},jr.sortedLastIndexBy=function(t,e,r){return ii(t,e,ao(r,2),!0)},jr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ni(t,e,!0)-1;if(Ia(t[r],e))return r}return-1},jr.startCase=$u,jr.startsWith=function(t,e,r){return t=bu(t),r=null==r?0:an(gu(r),0,t.length),e=ui(e),t.slice(r,r+e.length)==e},jr.subtract=Ss,jr.sum=function(t){return t&&t.length?Ue(t,is):0},jr.sumBy=function(t,e){return t&&t.length?Ue(t,ao(e,2)):0},jr.template=function(t,e,r){var n=jr.templateSettings;r&&mo(t,e,r)&&(e=i),t=bu(t),e=xu({},e,n,Ki);var o,a,u=xu({},e.imports,n.imports,Ki),s=Fu(u),c=qe(u,s),h=0,l=e.interpolate||bt,d="__p += '",f=St((e.escape||bt).source+"|"+l.source+"|"+(l===X?lt:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(Tt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xt+"]")+"\n";t.replace(f,(function(e,r,n,i,u,s){return n||(n=i),d+=t.slice(h,s).replace(wt,Xe),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=s+e.length,e})),d+="';\n";var g=Tt.call(e,"variable")&&e.variable;if(g){if(ct.test(g))throw new _t("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(B,""):d).replace(W,"$1").replace(q,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=Ju((function(){return xt(s,p+"return "+d).apply(i,c)}));if(y.source=d,Xa(y))throw y;return y},jr.times=function(t,e){if((t=gu(t))<1||t>l)return[];var r=f,n=vr(t,f);e=ao(e),t-=f;for(var i=Ie(n,e);++r<t;)e(r);return i},jr.toFinite=pu,jr.toInteger=gu,jr.toLength=yu,jr.toLower=function(t){return bu(t).toLowerCase()},jr.toNumber=vu,jr.toSafeInteger=function(t){return t?an(gu(t),-9007199254740991,l):0===t?t:0},jr.toString=bu,jr.toUpper=function(t){return bu(t).toUpperCase()},jr.trim=function(t,e,r){if((t=bu(t))&&(r||e===i))return Be(t);if(!t||!(e=ui(e)))return t;var n=or(t),o=or(e);return bi(n,Ye(n,o),Ve(n,o)+1).join("")},jr.trimEnd=function(t,e,r){if((t=bu(t))&&(r||e===i))return t.slice(0,ar(t)+1);if(!t||!(e=ui(e)))return t;var n=or(t);return bi(n,0,Ve(n,or(e))+1).join("")},jr.trimStart=function(t,e,r){if((t=bu(t))&&(r||e===i))return t.replace(nt,"");if(!t||!(e=ui(e)))return t;var n=or(t);return bi(n,Ye(n,or(e))).join("")},jr.truncate=function(t,e){var r=30,n="...";if(eu(e)){var o="separator"in e?e.separator:o;r="length"in e?gu(e.length):r,n="omission"in e?ui(e.omission):n}var a=(t=bu(t)).length;if(Qe(t)){var u=or(t);a=u.length}if(r>=a)return t;var s=r-ir(n);if(s<1)return n;var c=u?bi(u,0,s).join(""):t.slice(0,s);if(o===i)return c+n;if(u&&(s+=c.length-s),au(o)){if(t.slice(s).search(o)){var h,l=c;for(o.global||(o=St(o.source,bu(dt.exec(o))+"g")),o.lastIndex=0;h=o.exec(l);)var d=h.index;c=c.slice(0,d===i?s:d)}}else if(t.indexOf(ui(o),s)!=s){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+n},jr.unescape=function(t){return(t=bu(t))&&V.test(t)?t.replace(H,ur):t},jr.uniqueId=function(t){var e=++Pt;return bu(t)+e},jr.upperCase=Ku,jr.upperFirst=Xu,jr.each=ba,jr.eachRight=wa,jr.first=Vo,ss(jr,(ms={},bn(jr,(function(t,e){Tt.call(jr.prototype,e)||(ms[e]=t)})),ms),{chain:!1}),jr.VERSION="4.17.21",be(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){jr[t].placeholder=jr})),be(["drop","take"],(function(t,e){Br.prototype[t]=function(r){r=r===i?1:yr(gu(r),0);var n=this.__filtered__&&!e?new Br(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,f),type:t+(n.__dir__<0?"Right":"")}),n},Br.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),be(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Br.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ao(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),be(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Br.prototype[t]=function(){return this[r](1).value()[0]}})),be(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Br.prototype[t]=function(){return this.__filtered__?new Br(this):this[r](1)}})),Br.prototype.compact=function(){return this.filter(is)},Br.prototype.find=function(t){return this.filter(t).head()},Br.prototype.findLast=function(t){return this.reverse().find(t)},Br.prototype.invokeMap=Zn((function(t,e){return"function"==typeof t?new Br(this):this.map((function(r){return Mn(r,t,e)}))})),Br.prototype.reject=function(t){return this.filter(Ra(ao(t)))},Br.prototype.slice=function(t,e){t=gu(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Br(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=gu(e))<0?r.dropRight(-e):r.take(e-t)),r)},Br.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Br.prototype.toArray=function(){return this.take(f)},bn(Br.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=jr[n?"take"+("last"==e?"Right":""):e],a=n||/^find/.test(e);o&&(jr.prototype[e]=function(){var e=this.__wrapped__,u=n?[1]:arguments,s=e instanceof Br,c=u[0],h=s||Ha(e),l=function(t){var e=o.apply(jr,Le([t],u));return n&&d?e[0]:e};h&&r&&"function"==typeof c&&1!=c.length&&(s=h=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=s&&!f;if(!a&&h){e=g?e:new Br(this);var y=t.apply(e,u);return y.__actions__.push({func:pa,args:[l],thisArg:i}),new Ir(y,d)}return p&&g?t.apply(this,u):(y=this.thru(l),p?n?y.value()[0]:y.value():y)})})),be(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ct[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);jr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(Ha(i)?i:[],t)}return this[r]((function(r){return e.apply(Ha(r)?r:[],t)}))}})),bn(Br.prototype,(function(t,e){var r=jr[e];if(r){var n=r.name+"";Tt.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:e,func:r})}})),Mr[ji(i,2).name]=[{name:"wrapper",func:i}],Br.prototype.clone=function(){var t=new Br(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Br.prototype.reverse=function(){if(this.__filtered__){var t=new Br(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Br.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Ha(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=vr(e,t+a);break;case"takeRight":t=yr(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,s=u-a,c=n?u:a-1,h=this.__iteratees__,l=h.length,d=0,f=vr(s,this.__takeCount__);if(!r||!n&&i==s&&f==s)return di(t,this.__actions__);var p=[];t:for(;s--&&d<f;){for(var g=-1,y=t[c+=e];++g<l;){var v=h[g],m=v.iteratee,b=v.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}p[d++]=y}return p},jr.prototype.at=ga,jr.prototype.chain=function(){return fa(this)},jr.prototype.commit=function(){return new Ir(this.value(),this.__chain__)},jr.prototype.next=function(){this.__values__===i&&(this.__values__=fu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},jr.prototype.plant=function(t){for(var e,r=this;r instanceof Ur;){var n=Uo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},jr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Br){var e=t;return this.__actions__.length&&(e=new Br(this)),(e=e.reverse()).__actions__.push({func:pa,args:[ea],thisArg:i}),new Ir(e,this.__chain__)}return this.thru(ea)},jr.prototype.toJSON=jr.prototype.valueOf=jr.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},jr.prototype.first=jr.prototype.head,ae&&(jr.prototype[ae]=function(){return this}),jr}();oe._=sr,(n=function(){return sr}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},58303:(t,e,r)=>{"use strict";r.r(e),r.d(e,{__extends:()=>i,__assign:()=>o,__rest:()=>a,__decorate:()=>u,__param:()=>s,__metadata:()=>c,__awaiter:()=>h,__generator:()=>l,__createBinding:()=>d,__exportStar:()=>f,__values:()=>p,__read:()=>g,__spread:()=>y,__spreadArrays:()=>v,__spreadArray:()=>m,__await:()=>b,__asyncGenerator:()=>w,__asyncDelegator:()=>_,__asyncValues:()=>x,__makeTemplateObject:()=>E,__importStar:()=>S,__importDefault:()=>L,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>C});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function u(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function s(t,e){return function(r,n){e(r,n,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{s(n.next(t))}catch(t){o(t)}}function u(t){try{s(n.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}var d=Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};function f(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||d(e,t,r)}function p(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function v(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,u=o.length;a<u;a++,i++)n[i]=o[a];return n}function m(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function b(t){return this instanceof b?(this.v=t,this):new b(t)}function w(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){o.push([t,e,r,n])>1||u(t,e)}))})}function u(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(s,c):h(o[0][2],r)}catch(t){h(o[0][3],t)}var r}function s(t){u("next",t)}function c(t){u("throw",t)}function h(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function _(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function x(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){!function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)}(n,i,(e=t[r](e)).done,e.value)}))}}}function E(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var A=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function S(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&d(e,t,r);return A(e,t),e}function L(t){return t&&t.__esModule?t:{default:t}}function k(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function C(t,e,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r}},31250:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(31181),u=o(r(2383)),s=r(88586),c=r(30432),h=1.5,l=function(t){function e(){var e=t.call(this)||this;return e.x=.5,e.y=.5,e.angle=0,e.ratio=1,e.minRatio=null,e.maxRatio=null,e.nextFrame=null,e.previousState=null,e.enabled=!0,e.previousState=e.getState(),e}return i(e,t),e.from=function(t){return(new e).setState(t)},e.prototype.enable=function(){return this.enabled=!0,this},e.prototype.disable=function(){return this.enabled=!1,this},e.prototype.getState=function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}},e.prototype.hasState=function(t){return this.x===t.x&&this.y===t.y&&this.ratio===t.ratio&&this.angle===t.angle},e.prototype.getPreviousState=function(){var t=this.previousState;return t?{x:t.x,y:t.y,angle:t.angle,ratio:t.ratio}:null},e.prototype.getBoundedRatio=function(t){var e=t;return"number"==typeof this.minRatio&&(e=Math.max(e,this.minRatio)),"number"==typeof this.maxRatio&&(e=Math.min(e,this.maxRatio)),e},e.prototype.validateState=function(t){var e={};return"number"==typeof t.x&&(e.x=t.x),"number"==typeof t.y&&(e.y=t.y),"number"==typeof t.angle&&(e.angle=t.angle),"number"==typeof t.ratio&&(e.ratio=this.getBoundedRatio(t.ratio)),e},e.prototype.isAnimated=function(){return!!this.nextFrame},e.prototype.setState=function(t){if(!this.enabled)return this;this.previousState=this.getState();var e=this.validateState(t);return"number"==typeof e.x&&(this.x=e.x),"number"==typeof e.y&&(this.y=e.y),"number"==typeof e.angle&&(this.angle=e.angle),"number"==typeof e.ratio&&(this.ratio=e.ratio),this.hasState(this.previousState)||this.emit("updated",this.getState()),this},e.prototype.animate=function(t,e,r){var n=this;if(this.enabled){var i=Object.assign({},a.ANIMATE_DEFAULTS,e),o=this.validateState(t),c="function"==typeof i.easing?i.easing:u.default[i.easing],h=Date.now(),l=this.getState(),d=function(){var t=(Date.now()-h)/i.duration;if(t>=1)return n.nextFrame=null,n.setState(o),void(n.animationCallback&&(n.animationCallback.call(null),n.animationCallback=void 0));var e=c(t),r={};"number"==typeof o.x&&(r.x=l.x+(o.x-l.x)*e),"number"==typeof o.y&&(r.y=l.y+(o.y-l.y)*e),"number"==typeof o.angle&&(r.angle=l.angle+(o.angle-l.angle)*e),"number"==typeof o.ratio&&(r.ratio=l.ratio+(o.ratio-l.ratio)*e),n.setState(r),n.nextFrame=(0,s.requestFrame)(d)};this.nextFrame?((0,s.cancelFrame)(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=(0,s.requestFrame)(d)):d(),this.animationCallback=r}},e.prototype.animatedZoom=function(t){if(t){if("number"==typeof t)return this.animate({ratio:this.ratio/t});this.animate({ratio:this.ratio/(t.factor||h)},t)}else this.animate({ratio:this.ratio/h})},e.prototype.animatedUnzoom=function(t){if(t){if("number"==typeof t)return this.animate({ratio:this.ratio*t});this.animate({ratio:this.ratio*(t.factor||h)},t)}else this.animate({ratio:this.ratio*h})},e.prototype.animatedReset=function(t){this.animate({x:.5,y:.5,ratio:1,angle:0},t)},e.prototype.copy=function(){return e.from(this.getState())},e}(c.TypedEventEmitter);e.default=l},48231:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getWheelDelta=e.getTouchCoords=e.getTouchesArray=e.getWheelCoords=e.getMouseCoords=e.getPosition=void 0;var a=r(30432);function u(t,e){var r=e.getBoundingClientRect();return{x:t.clientX-r.left,y:t.clientY-r.top}}function s(t,e){return o(o({},u(t,e)),{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){this.sigmaDefaultPrevented=!0},original:t})}function c(t){for(var e=[],r=0,n=Math.min(t.length,2);r<n;r++)e.push(t[r]);return e}function h(t){if(void 0!==t.deltaY)return-3*t.deltaY/360;if(void 0!==t.detail)return t.detail/-9;throw new Error("Captor: could not extract delta from event.")}e.getPosition=u,e.getMouseCoords=s,e.getWheelCoords=function(t,e){return o(o({},s(t,e)),{delta:h(t)})},e.getTouchesArray=c,e.getTouchCoords=function(t,e){return{touches:c(t.touches).map((function(t){return u(t,e)})),original:t}},e.getWheelDelta=h;var l=function(t){function e(e,r){var n=t.call(this)||this;return n.container=e,n.renderer=r,n}return i(e,t),e}(a.TypedEventEmitter);e.default=l},73834:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var s=u(r(48231)),c=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.draggedEvents=0,n.downStartTime=null,n.lastMouseX=null,n.lastMouseY=null,n.isMouseDown=!1,n.isMoving=!1,n.movingTimeout=null,n.startCameraState=null,n.clicks=0,n.doubleClickTimeout=null,n.currentWheelDirection=0,n.handleClick=n.handleClick.bind(n),n.handleRightClick=n.handleRightClick.bind(n),n.handleDown=n.handleDown.bind(n),n.handleUp=n.handleUp.bind(n),n.handleMove=n.handleMove.bind(n),n.handleWheel=n.handleWheel.bind(n),n.handleOut=n.handleOut.bind(n),e.addEventListener("click",n.handleClick,!1),e.addEventListener("contextmenu",n.handleRightClick,!1),e.addEventListener("mousedown",n.handleDown,!1),e.addEventListener("wheel",n.handleWheel,!1),e.addEventListener("mouseout",n.handleOut,!1),document.addEventListener("mousemove",n.handleMove,!1),document.addEventListener("mouseup",n.handleUp,!1),n}return i(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("click",this.handleClick),t.removeEventListener("contextmenu",this.handleRightClick),t.removeEventListener("mousedown",this.handleDown),t.removeEventListener("wheel",this.handleWheel),t.removeEventListener("mouseout",this.handleOut),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)},e.prototype.handleClick=function(t){var e=this;if(this.enabled){if(this.clicks++,2===this.clicks)return this.clicks=0,"number"==typeof this.doubleClickTimeout&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(t);setTimeout((function(){e.clicks=0,e.doubleClickTimeout=null}),300),this.draggedEvents<3&&this.emit("click",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleRightClick=function(t){this.enabled&&this.emit("rightClick",(0,s.getMouseCoords)(t,this.container))},e.prototype.handleDoubleClick=function(t){if(this.enabled){t.preventDefault(),t.stopPropagation();var e=(0,s.getMouseCoords)(t,this.container);if(this.emit("doubleClick",e),!e.sigmaDefaultPrevented){var r=this.renderer.getCamera(),n=r.getBoundedRatio(r.getState().ratio/2.2);r.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),n),{easing:"quadraticInOut",duration:200})}}},e.prototype.handleDown=function(t){if(this.enabled){this.startCameraState=this.renderer.getCamera().getState();var e=(0,s.getPosition)(t,this.container),r=e.x,n=e.y;this.lastMouseX=r,this.lastMouseY=n,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0,this.emit("mousedown",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleUp=function(t){var e=this;if(this.enabled&&this.isMouseDown){var r=this.renderer.getCamera();this.isMouseDown=!1,"number"==typeof this.movingTimeout&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var n=(0,s.getPosition)(t,this.container),i=n.x,o=n.y,a=r.getState(),u=r.getPreviousState()||{x:0,y:0};this.isMoving?r.animate({x:a.x+3*(a.x-u.x),y:a.y+3*(a.y-u.y)},{duration:200,easing:"quadraticOut"}):this.lastMouseX===i&&this.lastMouseY===o||r.setState({x:a.x,y:a.y}),this.isMoving=!1,setTimeout((function(){e.draggedEvents=0,e.renderer.refresh()}),0),this.emit("mouseup",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e=this;if(this.enabled){var r=(0,s.getMouseCoords)(t,this.container);if(this.emit("mousemovebody",r),t.target===this.container&&this.emit("mousemove",r),!r.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,"number"==typeof this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){e.movingTimeout=null,e.isMoving=!1}),100);var n=this.renderer.getCamera(),i=(0,s.getPosition)(t,this.container),o=i.x,a=i.y,u=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),c=this.renderer.viewportToFramedGraph({x:o,y:a}),h=u.x-c.x,l=u.y-c.y,d=n.getState(),f=d.x+h,p=d.y+l;n.setState({x:f,y:p}),this.lastMouseX=o,this.lastMouseY=a,t.preventDefault(),t.stopPropagation()}}},e.prototype.handleWheel=function(t){var e=this;if(this.enabled){t.preventDefault(),t.stopPropagation();var r=(0,s.getWheelDelta)(t);if(r){var n=(0,s.getWheelCoords)(t,this.container);if(this.emit("wheel",n),!n.sigmaDefaultPrevented){var i=r>0?1/1.7:1.7,o=this.renderer.getCamera(),a=o.getBoundedRatio(o.getState().ratio*i),u=r>0?1:-1,c=Date.now();this.currentWheelDirection===u&&this.lastWheelTriggerTime&&c-this.lastWheelTriggerTime<50||(o.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),a),{easing:"quadraticOut",duration:250},(function(){e.currentWheelDirection=0})),this.currentWheelDirection=u,this.lastWheelTriggerTime=c)}}}},e.prototype.handleOut=function(){},e}(s.default);e.default=c},40916:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e},s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var c=u(r(48231)),h=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.isMoving=!1,n.touchMode=0,n.handleStart=n.handleStart.bind(n),n.handleLeave=n.handleLeave.bind(n),n.handleMove=n.handleMove.bind(n),e.addEventListener("touchstart",n.handleStart,!1),e.addEventListener("touchend",n.handleLeave,!1),e.addEventListener("touchcancel",n.handleLeave,!1),e.addEventListener("touchmove",n.handleMove,!1),n}return i(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("touchstart",this.handleStart),t.removeEventListener("touchend",this.handleLeave),t.removeEventListener("touchcancel",this.handleLeave),t.removeEventListener("touchmove",this.handleMove)},e.prototype.getDimensions=function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}},e.prototype.dispatchRelatedMouseEvent=function(t,e,r,n){var i=r||(0,c.getPosition)(e.touches[0],this.container),o=new MouseEvent(t,{clientX:i.x,clientY:i.y,altKey:e.altKey,ctrlKey:e.ctrlKey});(n||this.container).dispatchEvent(o)},e.prototype.handleStart=function(t){var e=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousedown",t);var r=(0,c.getTouchesArray)(t.touches);if(this.isMoving=!0,this.touchMode=r.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=r.map((function(t){return(0,c.getPosition)(t,e.container)})),this.lastTouchesPositions=this.startTouchesPositions,2===this.touchMode){var n=s(this.startTouchesPositions,2),i=n[0],o=i.x,a=i.y,u=n[1],h=u.x,l=u.y;this.startTouchesAngle=Math.atan2(l-a,h-o),this.startTouchesDistance=Math.sqrt(Math.pow(h-o,2)+Math.pow(l-a,2))}this.emit("touchdown",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleLeave=function(t){if(this.enabled){switch(t.preventDefault(),0===t.touches.length&&this.lastTouchesPositions&&this.lastTouchesPositions.length&&(this.dispatchRelatedMouseEvent("mouseup",t,this.lastTouchesPositions[0],document),this.dispatchRelatedMouseEvent("click",t,this.lastTouchesPositions[0])),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(1===t.touches.length){this.handleStart(t),t.preventDefault();break}case 1:if(this.isMoving){var e=this.renderer.getCamera(),r=e.getState(),n=e.getPreviousState()||{x:0,y:0};e.animate({x:r.x+3*(r.x-n.x),y:r.y+3*(r.y-n.y)},{duration:200,easing:"quadraticOut"})}this.isMoving=!1,this.touchMode=0}this.emit("touchup",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e,r=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousemove",t);var n=this.renderer.getCamera(),i=this.startCameraState,o=(0,c.getTouchesArray)(t.touches).map((function(t){return(0,c.getPosition)(t,r.container)}));switch(this.lastTouchesPositions=o,this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){r.isMoving=!1}),200),this.touchMode){case 1:var a=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),u=a.x,h=a.y,l=this.renderer.viewportToFramedGraph(o[0]),d=l.x,f=l.y;n.setState({x:i.x+u-d,y:i.y+h-f});break;case 2:var p={},g=o[0],y=g.x,v=g.y,m=o[1],b=m.x,w=m.y,_=Math.atan2(w-v,b-y)-this.startTouchesAngle,x=Math.hypot(w-v,b-y)/this.startTouchesDistance,E=n.getBoundedRatio(i.ratio/x);p.ratio=E,p.angle=i.angle+_;var A=this.getDimensions(),S=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:i}),L=Math.min(A.width,A.height),k=L/A.width,C=E/L;f=v-L/2/(L/A.height),d=(e=s([(d=y-L/2/k)*Math.cos(-p.angle)-f*Math.sin(-p.angle),f*Math.cos(-p.angle)+d*Math.sin(-p.angle)],2))[0],f=e[1],p.x=S.x-d*C,p.y=S.y+f*C,n.setState(p)}this.emit("touchmove",(0,c.getTouchCoords)(t,this.container))}},e}(c.default);e.default=h},2306:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.edgeLabelsToDisplayFromNodes=e.LabelGrid=void 0;var r=function(){function t(t,e){this.key=t,this.size=e}return t.compare=function(t,e){return t.size>e.size?-1:t.size<e.size||t.key>e.key?1:-1},t}(),n=function(){function t(){this.width=0,this.height=0,this.cellSize=0,this.columns=0,this.rows=0,this.cells={}}return t.prototype.resizeAndClear=function(t,e){this.width=t.width,this.height=t.height,this.cellSize=e,this.columns=Math.ceil(t.width/e),this.rows=Math.ceil(t.height/e),this.cells={}},t.prototype.getIndex=function(t){var e=Math.floor(t.x/this.cellSize);return Math.floor(t.y/this.cellSize)*this.columns+e},t.prototype.add=function(t,e,n){var i=new r(t,e),o=this.getIndex(n),a=this.cells[o];a||(a=[],this.cells[o]=a),a.push(i)},t.prototype.organize=function(){for(var t in this.cells)this.cells[t].sort(r.compare)},t.prototype.getLabelsToDisplay=function(t,e){var r=this.cellSize*this.cellSize,n=r/t/t*e/r,i=Math.ceil(n),o=[];for(var a in this.cells)for(var u=this.cells[a],s=0;s<Math.min(i,u.length);s++)o.push(u[s].key);return o},t}();e.LabelGrid=n,e.edgeLabelsToDisplayFromNodes=function(t){var e=t.graph,r=t.hoveredNode,n=t.highlightedNodes,i=t.displayedNodeLabels,o=[];return e.forEachEdge((function(t,e,a,u){(a===r||u===r||n.has(a)||n.has(u)||i.has(a)&&i.has(u))&&o.push(t)})),o}},39316:function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.rectangleCollidesWithQuad=e.squareCollidesWithQuad=e.getCircumscribedAlignedRectangle=e.isRectangleAligned=void 0;var a=o(r(8884)),u=!1;function s(t){return t.x1===t.x2||t.y1===t.y2}function c(t){var e=Math.sqrt(Math.pow(t.x2-t.x1,2)+Math.pow(t.y2-t.y1,2)),r=(t.y1-t.y2)*t.height/e,n=(t.x2-t.x1)*t.height/e,i={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},a={x:t.x1+r,y:t.y1+n},u={x:t.x2+r,y:t.y2+n},s=Math.min(i.x,o.x,a.x,u.x),c=Math.max(i.x,o.x,a.x,u.x),h=Math.min(i.y,o.y,a.y,u.y);return{x1:s,y1:h,x2:c,y2:h,height:Math.max(i.y,o.y,a.y,u.y)-h}}function h(t,e,r,n,i,o,a){return t<n+o&&t+r>n&&e<i+a&&e+r>i}function l(t,e,r,n,i,o,a,u){return t<i+a&&t+r>i&&e<o+u&&e+n>o}function d(t,e,r,n,i,o){var a=t<r+i/2;return e<n+o/2?a?1:2:a?3:4}e.isRectangleAligned=s,e.getCircumscribedAlignedRectangle=c,e.squareCollidesWithQuad=h,e.rectangleCollidesWithQuad=l;var f=function(){function t(t){var e;void 0===t&&(t={}),this.containers=((e={}).outside=[],e),this.cache=null,this.lastRectangle=null;var r=Math.pow(4,5);this.data=new Float32Array((4*r-1)/3*4),t.boundaries?this.resize(t.boundaries):this.resize({x:0,y:0,width:1,height:1})}return t.prototype.add=function(t,e,r,n){return function(t,e,r,n,i,o,a){for(var s=i-a,c=o-a,l=2*a,d=0,f=0;;){if(d>=5)return r[f]=r[f]||[],void r[f].push(n);var p=4*f+4,g=4*f+8,y=4*f+12,v=4*f+16,m=h(s,c,l,e[p+0],e[p+1],e[p+2],e[p+3]),b=h(s,c,l,e[g+0],e[g+1],e[g+2],e[g+3]),w=h(s,c,l,e[y+0],e[y+1],e[y+2],e[y+3]),_=h(s,c,l,e[v+0],e[v+1],e[v+2],e[v+3]),x=[m,b,w,_].reduce((function(t,e){return e?t+1:t}),0);if(0===x&&0===d)return r.outside.push(n),void(!u&&r.outside.length>=5&&(u=!0,console.warn("sigma/quadtree.insertNode: At least 5 nodes are outside the global quadtree zone. You might have a problem with the normalization function or the custom bounding box.")));if(0===x)throw new Error("sigma/quadtree.insertNode: no collision (level: ".concat(d,", key: ").concat(n,", x: ").concat(i,", y: ").concat(o,", size: ").concat(a,")."));if(3===x)throw new Error("sigma/quadtree.insertNode: 3 impossible collisions (level: ".concat(d,", key: ").concat(n,", x: ").concat(i,", y: ").concat(o,", size: ").concat(a,")."));if(x>1)return r[f]=r[f]||[],void r[f].push(n);d++,m&&(f=p),b&&(f=g),w&&(f=y),_&&(f=v)}}(0,this.data,this.containers,t,e,r,n),this},t.prototype.resize=function(t){this.clear(),this.data[0]=t.x,this.data[1]=t.y,this.data[2]=t.width,this.data[3]=t.height,function(t,e){for(var r=[0,0];r.length;){var n=r.pop(),i=r.pop(),o=4*i+4,a=4*i+8,u=4*i+12,s=4*i+16,c=e[i+0],h=e[i+1],l=e[i+2]/2,d=e[i+3]/2;e[o+0]=c,e[o+1]=h,e[o+2]=l,e[o+3]=d,e[a+0]=c+l,e[a+1]=h,e[a+2]=l,e[a+3]=d,e[u+0]=c,e[u+1]=h+d,e[u+2]=l,e[u+3]=d,e[s+0]=c+l,e[s+1]=h+d,e[s+2]=l,e[s+3]=d,n<4&&(r.push(s,n+1),r.push(u,n+1),r.push(a,n+1),r.push(o,n+1))}}(0,this.data)},t.prototype.clear=function(){var t;return this.containers=((t={}).outside=[],t),this},t.prototype.point=function(t,e){var r=this.containers.outside,o=0,a=0;do{this.containers[o]&&r.push.apply(r,i([],n(this.containers[o]),!1)),o=4*o+4*d(t,e,this.data[o+0],this.data[o+1],this.data[o+2],this.data[o+3]),a++}while(a<=5);return r},t.prototype.rectangle=function(t,e,r,o,u){var h,d=this.lastRectangle;return d&&t===d.x1&&r===d.x2&&e===d.y1&&o===d.y2&&u===d.height||(this.lastRectangle={x1:t,y1:e,x2:r,y2:o,height:u},s(this.lastRectangle)||(this.lastRectangle=c(this.lastRectangle)),this.cache=function(t,e,r,n,i,o,u){for(var s,c=[0,0],h=[];c.length;){var d=c.pop(),f=c.pop();if((s=r[f])&&(0,a.default)(h,s),!(d>=5)){var p=4*f+4,g=4*f+8,y=4*f+12,v=4*f+16,m=l(n,i,o,u,e[p+0],e[p+1],e[p+2],e[p+3]),b=l(n,i,o,u,e[g+0],e[g+1],e[g+2],e[g+3]),w=l(n,i,o,u,e[y+0],e[y+1],e[y+2],e[y+3]),_=l(n,i,o,u,e[v+0],e[v+1],e[v+2],e[v+3]);m&&c.push(p,d+1),b&&c.push(g,d+1),w&&c.push(y,d+1),_&&c.push(v,d+1)}}return h}(0,this.data,this.containers,t,e,Math.abs(t-r)||Math.abs(e-o),u),(h=this.cache).push.apply(h,i([],n(this.containers.outside),!1))),this.cache},t}();e.default=f},49358:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Sigma=e.MouseCaptor=e.QuadTree=e.Camera=void 0;var i=n(r(38953));e.Sigma=i.default;var o=n(r(31250));e.Camera=o.default;var a=n(r(39316));e.QuadTree=a.default;var u=n(r(73834));e.MouseCaptor=u.default,e.default=i.default},30284:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,n,i){var o=i.edgeLabelSize,a=i.edgeLabelFont,u=i.edgeLabelWeight,s=i.edgeLabelColor.attribute?e[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||"#000":i.edgeLabelColor.color,c=e.label;if(c){t.fillStyle=s,t.font="".concat(u," ").concat(o,"px ").concat(a);var h,l,d=r.size,f=n.size,p=r.x,g=r.y,y=n.x,v=n.y,m=y-p,b=v-g,w=Math.sqrt(m*m+b*b);if(!(w<d+f)){h=((p+=m*d/w)+(y-=m*f/w))/2,l=((g+=b*d/w)+(v-=b*f/w))/2,m=y-p,b=v-g,w=Math.sqrt(m*m+b*b);var _,x=t.measureText(c).width;if(x>w){for(c+="…",x=t.measureText(c).width;x>w&&c.length>1;)c=c.slice(0,-2)+"…",x=t.measureText(c).width;if(c.length<4)return}_=m>0?b>0?Math.acos(m/w):Math.asin(b/w):b>0?Math.acos(m/w)+Math.PI:Math.asin(m/w)+Math.PI/2,t.save(),t.translate(h,l),t.rotate(_),t.fillText(c,-x/2,e.size/2+o),t.restore()}}}},64362:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(12193));e.default=function(t,e,r){var n=r.labelSize,o=r.labelFont,a=r.labelWeight;if(t.font="".concat(a," ").concat(n,"px ").concat(o),t.fillStyle="#FFF",t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=8,t.shadowColor="#000","string"==typeof e.label){var u=t.measureText(e.label).width,s=Math.round(u+5),c=Math.round(n+4),h=Math.max(e.size,n/2)+2,l=Math.asin(c/2/h),d=Math.sqrt(Math.abs(Math.pow(h,2)-Math.pow(c/2,2)));t.beginPath(),t.moveTo(e.x+d,e.y+c/2),t.lineTo(e.x+h+s,e.y+c/2),t.lineTo(e.x+h+s,e.y-c/2),t.lineTo(e.x+d,e.y-c/2),t.arc(e.x,e.y,h,l,-l),t.closePath(),t.fill()}else t.beginPath(),t.arc(e.x,e.y,e.size+2,0,2*Math.PI),t.closePath(),t.fill();t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0,(0,i.default)(t,e,r)}},12193:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){if(e.label){var n=r.labelSize,i=r.labelFont,o=r.labelWeight,a=r.labelColor.attribute?e[r.labelColor.attribute]||r.labelColor.color||"#000":r.labelColor.color;t.fillStyle=a,t.font="".concat(o," ").concat(n,"px ").concat(i),t.fillText(e.label,e.x+e.size+3,e.y+n/3)}}},64488:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.createEdgeCompoundProgram=e.AbstractEdgeProgram=void 0;var o=function(t){function e(e,r,n,i,o){return t.call(this,e,r,n,i,o)||this}return i(e,t),e}(r(71549).AbstractProgram);e.AbstractEdgeProgram=o,e.createEdgeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.computeIndices=function(){this.programs.forEach((function(t){return t.computeIndices()}))},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r,n,i){this.programs.forEach((function(o){return o.process(t,e,r,n,i)}))},e}()}},51624:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.createNodeCompoundProgram=e.AbstractNodeProgram=void 0;var o=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i,o)||this;a.positionLocation=e.getAttribLocation(a.program,"a_position"),a.sizeLocation=e.getAttribLocation(a.program,"a_size"),a.colorLocation=e.getAttribLocation(a.program,"a_color");var u=e.getUniformLocation(a.program,"u_matrix");if(null===u)throw new Error("AbstractNodeProgram: error while getting matrixLocation");a.matrixLocation=u;var s=e.getUniformLocation(a.program,"u_ratio");if(null===s)throw new Error("AbstractNodeProgram: error while getting ratioLocation");a.ratioLocation=s;var c=e.getUniformLocation(a.program,"u_scale");if(null===c)throw new Error("AbstractNodeProgram: error while getting scaleLocation");return a.scaleLocation=c,a}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.sizeLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.sizeLocation,1,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,this.attributes*Float32Array.BYTES_PER_ELEMENT,12)},e}(r(71549).AbstractProgram);e.AbstractNodeProgram=o,e.createNodeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r){this.programs.forEach((function(n){return n.process(t,e,r)}))},e}()}},71549:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractProgram=void 0;var n=r(83451),i=function(){function t(t,e,r,i,o){this.array=new Float32Array,this.points=i,this.attributes=o,this.gl=t,this.vertexShaderSource=e,this.fragmentShaderSource=r;var a=t.createBuffer();if(null===a)throw new Error("AbstractProgram: error while creating the buffer");this.buffer=a,t.bindBuffer(t.ARRAY_BUFFER,this.buffer),this.vertexShader=(0,n.loadVertexShader)(t,this.vertexShaderSource),this.fragmentShader=(0,n.loadFragmentShader)(t,this.fragmentShaderSource),this.program=(0,n.loadProgram)(t,[this.vertexShader,this.fragmentShader])}return t.prototype.bufferData=function(){var t=this.gl;t.bufferData(t.ARRAY_BUFFER,this.array,t.DYNAMIC_DRAW)},t.prototype.allocate=function(t){this.array=new Float32Array(this.points*this.attributes*t)},t.prototype.hasNothingToRender=function(){return 0===this.array.length},t}();e.AbstractProgram=i},65696:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(64488),o=n(r(23193)),a=n(r(83653)),u=(0,i.createEdgeCompoundProgram)([a.default,o.default]);e.default=u},23193:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(50577)),s=o(r(91604)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,3,9)||this;r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius"),r.barycentricLocation=e.getAttribLocation(r.program,"a_barycentric");var n=e.getUniformLocation(r.program,"u_matrix");if(null===n)throw new Error("EdgeArrowHeadProgram: error while getting matrixLocation");r.matrixLocation=n;var i=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===i)throw new Error("EdgeArrowHeadProgram: error while getting sqrtZoomRatioLocation");r.sqrtZoomRatioLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeArrowHeadProgram: error while getting correctionRatioLocation");return r.correctionRatioLocation=o,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.radiusLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.barycentricLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,9*Float32Array.BYTES_PER_ELEMENT,20),t.vertexAttribPointer(this.barycentricLocation,3,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,24)},e.prototype.computeIndices=function(){},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=27*i,u=o+27;o<u;o++)this.array[o]=0;else{var s=r.size||1,c=e.size||1,h=t.x,l=t.y,d=e.x,f=e.y,p=(0,a.floatColor)(r.color),g=d-h,y=f-l,v=g*g+y*y,m=0,b=0;v&&(m=-y*(v=1/Math.sqrt(v))*s,b=g*v*s);var w=27*i,_=this.array;_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=1,_[w++]=0,_[w++]=0,_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=0,_[w++]=1,_[w++]=0,_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=0,_[w++]=0,_[w]=1}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawArrays(e.TRIANGLES,0,this.array.length/9)}},e}(r(64488).AbstractEdgeProgram);e.default=c},83653:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(64488),u=r(88586),s=o(r(83574)),c=o(r(73343)),h=function(t){function e(e){var r=t.call(this,e,s.default,c.default,4,6)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeClampedProgram: error while getting resolutionLocation");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeClampedProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===o)throw new Error("EdgeClampedProgram: error while getting cameraRatioLocation");r.sqrtZoomRatioLocation=o;var a=e.getUniformLocation(r.program,"u_correctionRatio");if(null===a)throw new Error("EdgeClampedProgram: error while getting viewportRatioLocation");return r.correctionRatioLocation=a,r.canUse32BitsIndices=(0,u.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.radiusLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,6*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,20)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=24*i,a=o+24;o<a;o++)this.array[o]=0;else{var s=r.size||1,c=t.x,h=t.y,l=e.x,d=e.y,f=e.size||1,p=(0,u.floatColor)(r.color),g=l-c,y=d-h,v=g*g+y*y,m=0,b=0;v&&(m=-y*(v=1/Math.sqrt(v))*s,b=g*v*s);var w=24*i,_=this.array;_[w++]=c,_[w++]=h,_[w++]=m,_[w++]=b,_[w++]=p,_[w++]=0,_[w++]=c,_[w++]=h,_[w++]=-m,_[w++]=-b,_[w++]=p,_[w++]=0,_[w++]=l,_[w++]=d,_[w++]=m,_[w++]=b,_[w++]=p,_[w++]=f,_[w++]=l,_[w++]=d,_[w++]=-m,_[w++]=-b,_[w++]=p,_[w]=-f}},e.prototype.computeIndices=function(){for(var t=this.array.length/6,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(a.AbstractEdgeProgram);e.default=h},46680:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(59843)),s=o(r(73343)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,4,5)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeProgram: error while creating indicesBuffer");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeProgram: error while getting correctionRatioLocation");r.correctionRatioLocation=o;var c=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===c)throw new Error("EdgeProgram: error while getting sqrtZoomRatioLocation");return r.sqrtZoomRatioLocation=c,r.canUse32BitsIndices=(0,a.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,5*Float32Array.BYTES_PER_ELEMENT,16)},e.prototype.computeIndices=function(){for(var t=this.array.length/5,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=20*i,u=o+20;o<u;o++)this.array[o]=0;else{var s=r.size||1,c=t.x,h=t.y,l=e.x,d=e.y,f=(0,a.floatColor)(r.color),p=l-c,g=d-h,y=p*p+g*g,v=0,m=0;y&&(v=-g*(y=1/Math.sqrt(y))*s,m=p*y*s);var b=20*i,w=this.array;w[b++]=c,w[b++]=h,w[b++]=v,w[b++]=m,w[b++]=f,w[b++]=c,w[b++]=h,w[b++]=-v,w[b++]=-m,w[b++]=f,w[b++]=l,w[b++]=d,w[b++]=v,w[b++]=m,w[b++]=f,w[b++]=l,w[b++]=d,w[b++]=-v,w[b++]=-m,w[b]=f}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(r(64488).AbstractEdgeProgram);e.default=c},90732:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(21432)),s=o(r(36846)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,1,4)||this;return r.bind(),r}return i(e,t),e.prototype.process=function(t,e,r){var n=this.array,i=1*r*4;if(e)return n[i++]=0,n[i++]=0,n[i++]=0,void(n[i++]=0);var o=(0,a.floatColor)(t.color);n[i++]=t.x,n[i++]=t.y,n[i++]=t.size,n[i]=o},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniform1f(this.ratioLocation,1/Math.sqrt(t.ratio)),e.uniform1f(this.scaleLocation,t.scalingRatio),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.drawArrays(e.POINTS,0,this.array.length/4)}},e}(r(51624).AbstractNodeProgram);e.default=c},91604:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\n\nvoid main(void) {\n gl_FragColor = v_color;\n}\n";t.exports=r})()},50577:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute vec2 a_normal;\nattribute float a_radius;\nattribute vec4 a_color;\nattribute vec3 a_barycentric;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadWidthLengthRatio = 0.66;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl and\n // edge.clamped.vert.glsl. Please read it to get better comments on what's\n // happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n float adaptedWebGLNodeRadius = a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n float adaptedWebGLArrowHeadHalfWidth = adaptedWebGLArrowHeadLength * arrowHeadWidthLengthRatio / 2.0;\n\n float da = a_barycentric.x;\n float db = a_barycentric.y;\n float dc = a_barycentric.z;\n\n vec2 delta = vec2(\n da * (adaptedWebGLNodeRadius * unitNormal.y)\n + db * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y + adaptedWebGLArrowHeadHalfWidth * unitNormal.x)\n + dc * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y - adaptedWebGLArrowHeadHalfWidth * unitNormal.x),\n\n da * (-adaptedWebGLNodeRadius * unitNormal.x)\n + db * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x + adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n + dc * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x - adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n );\n\n vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;\n\n gl_Position = vec4(position, 0, 1);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},83574:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\nattribute float a_radius;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl. Please read it to\n // get better comments on what's happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here, we move the point to leave space for the arrow head:\n float direction = sign(a_radius);\n float adaptedWebGLNodeRadius = direction * a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n\n vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength);\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness + compensationVector, 1)).xy, 0, 1);\n\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},73343:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float feather = 0.001;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n float dist = length(v_normal) * v_thickness;\n\n float t = smoothstep(\n v_thickness - feather,\n v_thickness,\n dist\n );\n\n gl_FragColor = mix(v_color, transparent, t);\n}\n";t.exports=r})()},59843:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n='attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // We require edges to be at least `minThickness` pixels thick *on screen*\n // (so we need to compensate the SQRT zoom ratio):\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n\n // Then, we need to retrieve the normalized thickness of the edge in the WebGL\n // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction\n // ratio:\n float webGLThickness = pixelsThickness * u_correctionRatio;\n\n // Finally, we adapt the edge thickness to the "SQRT rule" in sigma (so that\n // items are not too big when zoomed in, and not too small when zoomed out).\n // The exact computation should be `adapted = value * zoom / sqrt(zoom)`, but\n // it\'s simpler like this:\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness, 1)).xy, 0, 1);\n\n // For the fragment shader though, we need a thickness that takes the "magic"\n // correction ratio into account (as in webGLThickness), but so that the\n // antialiasint effect does not depend on the zoom level. So here\'s yet\n // another thickness version:\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n';t.exports=r})()},36846:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float radius = 0.5;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n vec2 m = gl_PointCoord - vec2(0.5, 0.5);\n float dist = radius - length(m);\n\n float t = 0.0;\n if (dist > v_border)\n t = 1.0;\n else if (dist > 0.0)\n t = dist / v_border;\n\n gl_FragColor = mix(transparent, v_color, t);\n}\n";t.exports=r})()},21432:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4(\n (u_matrix * vec3(a_position, 1)).xy,\n 0,\n 1\n );\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},83451:(t,e)=>{"use strict";function r(t,e,r){var n="VERTEX"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=e.createShader(n);if(null===i)throw new Error("loadShader: error while creating the shader");if(e.shaderSource(i,r),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){var o=e.getShaderInfoLog(i);throw e.deleteShader(i),new Error("loadShader: error while compiling the shader:\n".concat(o,"\n").concat(r))}return i}Object.defineProperty(e,"__esModule",{value:!0}),e.loadProgram=e.loadFragmentShader=e.loadVertexShader=void 0,e.loadVertexShader=function(t,e){return r("VERTEX",t,e)},e.loadFragmentShader=function(t,e){return r("FRAGMENT",t,e)},e.loadProgram=function(t,e){var r,n,i=t.createProgram();if(null===i)throw new Error("loadProgram: error while creating the program.");for(r=0,n=e.length;r<n;r++)t.attachShader(i,e[r]);if(t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw t.deleteProgram(i),new Error("loadProgram: error while linking the program.");return i}},49061:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_SETTINGS=e.validateSettings=void 0;var i=n(r(12193)),o=n(r(64362)),a=n(r(30284)),u=n(r(90732)),s=n(r(46680)),c=n(r(65696));e.validateSettings=function(t){if("number"!=typeof t.labelDensity||t.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var e=t.minCameraRatio,r=t.maxCameraRatio;if("number"==typeof e&&"number"==typeof r&&r<e)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")},e.DEFAULT_SETTINGS={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeClickEvents:!1,enableEdgeWheelEvents:!1,enableEdgeHoverEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,labelRenderer:i.default,hoverRenderer:o.default,edgeLabelRenderer:a.default,allowInvalidContainer:!1,nodeProgramClasses:{circle:u.default},edgeProgramClasses:{arrow:c.default,line:s.default}}},38953:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=u(r(31250)),c=u(r(73834)),h=u(r(39316)),l=r(30432),d=r(88586),f=r(2306),p=r(49061),g=u(r(40916)),y=r(42237),v=r(38073),m=(0,d.getPixelRatio)();function b(t,e,r){if(!r.hasOwnProperty("x")||!r.hasOwnProperty("y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(e,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return r.color||(r.color=t.defaultNodeColor),r.label||""===r.label||(r.label=null),void 0!==r.label&&null!==r.label?r.label=""+r.label:r.label=null,r.size||(r.size=2),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("highlighted")||(r.highlighted=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultNodeType),r.zIndex||(r.zIndex=0),r}function w(t,e,r){return r.color||(r.color=t.defaultEdgeColor),r.label||(r.label=""),r.size||(r.size=.5),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultEdgeType),r.zIndex||(r.zIndex=0),r}var _=function(t){function e(e,r,n){void 0===n&&(n={});var i=t.call(this)||this;if(i.elements={},i.canvasContexts={},i.webGLContexts={},i.activeListeners={},i.quadtree=new h.default,i.labelGrid=new f.LabelGrid,i.nodeDataCache={},i.edgeDataCache={},i.nodesWithForcedLabels=[],i.edgesWithForcedLabels=[],i.nodeExtent={x:[0,1],y:[0,1]},i.matrix=(0,y.identity)(),i.invMatrix=(0,y.identity)(),i.correctionRatio=1,i.customBBox=null,i.normalizationFunction=(0,d.createNormalizationFunction)({x:[-1/0,1/0],y:[-1/0,1/0]}),i.cameraSizeRatio=1,i.width=0,i.height=0,i.displayedLabels=new Set,i.highlightedNodes=new Set,i.hoveredNode=null,i.hoveredEdge=null,i.renderFrame=null,i.renderHighlightedNodesFrame=null,i.needToProcess=!1,i.needToSoftProcess=!1,i.checkEdgesEventsFrame=null,i.nodePrograms={},i.hoverNodePrograms={},i.edgePrograms={},i.settings=(0,d.assign)({},p.DEFAULT_SETTINGS,n),(0,p.validateSettings)(i.settings),(0,d.validateGraph)(e),!(r instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");for(var o in i.graph=e,i.container=r,i.createWebGLContext("edges",{preserveDrawingBuffer:!0}),i.createCanvasContext("edgeLabels"),i.createWebGLContext("nodes"),i.createCanvasContext("labels"),i.createCanvasContext("hovers"),i.createWebGLContext("hoverNodes"),i.createCanvasContext("mouse"),i.webGLContexts){var a=i.webGLContexts[o];a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.enable(a.BLEND)}for(var u in i.settings.nodeProgramClasses){var l=i.settings.nodeProgramClasses[u];i.nodePrograms[u]=new l(i.webGLContexts.nodes,i),i.hoverNodePrograms[u]=new l(i.webGLContexts.hoverNodes,i)}for(var u in i.settings.edgeProgramClasses){var v=i.settings.edgeProgramClasses[u];i.edgePrograms[u]=new v(i.webGLContexts.edges,i)}return i.resize(),i.camera=new s.default,i.bindCameraHandlers(),i.mouseCaptor=new c.default(i.elements.mouse,i),i.touchCaptor=new g.default(i.elements.mouse,i),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.process(),i.render(),i}return i(e,t),e.prototype.createCanvas=function(t){var e=(0,d.createElement)("canvas",{position:"absolute"},{class:"sigma-".concat(t)});return this.elements[t]=e,this.container.appendChild(e),e},e.prototype.createCanvasContext=function(t){var e=this.createCanvas(t);return this.canvasContexts[t]=e.getContext("2d",{preserveDrawingBuffer:!1,antialias:!1}),this},e.prototype.createWebGLContext=function(t,e){var r,n=this.createCanvas(t),i=o({preserveDrawingBuffer:!1,antialias:!1},e||{});return(r=n.getContext("webgl2",i))||(r=n.getContext("webgl",i)),r||(r=n.getContext("experimental-webgl",i)),this.webGLContexts[t]=r,this},e.prototype.bindCameraHandlers=function(){var t=this;return this.activeListeners.camera=function(){t._scheduleRefresh()},this.camera.on("updated",this.activeListeners.camera),this},e.prototype.bindEventHandlers=function(){var t=this;this.activeListeners.handleResize=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize);var e=function(t,e,r,n,i){return t>r-i&&t<r+i&&e>n-i&&e<n+i&&Math.sqrt(Math.pow(t-r,2)+Math.pow(e-n,2))<i};this.activeListeners.handleMove=function(r){for(var n,i,a,u=(n=r.x,i=r.y,a=t.viewportToFramedGraph({x:n,y:i}),t.quadtree.point(a.x,1-a.y)),s={event:r,preventSigmaDefault:function(){this.event.preventSigmaDefault()}},c=1/0,h=null,l=0,f=u.length;l<f;l++){var p=u[l],g=t.nodeDataCache[p],y=t.framedGraphToViewport(g),v=t.scaleSize(g.size);if(!g.hidden&&e(r.x,r.y,y.x,y.y,v)){var m=Math.sqrt(Math.pow(r.x-y.x,2)+Math.pow(r.y-y.y,2));m<c&&(c=m,h=p)}}return h&&t.hoveredNode!==h&&!t.nodeDataCache[h].hidden?(t.hoveredNode&&t.emit("leaveNode",o(o({},s),{node:t.hoveredNode})),t.hoveredNode=h,t.emit("enterNode",o(o({},s),{node:h})),void t.scheduleHighlightedNodesRender()):t.hoveredNode&&(g=t.nodeDataCache[t.hoveredNode],y=t.framedGraphToViewport(g),v=t.scaleSize(g.size),!e(r.x,r.y,y.x,y.y,v))?(p=t.hoveredNode,t.hoveredNode=null,t.emit("leaveNode",o(o({},s),{node:p})),t.scheduleHighlightedNodesRender()):void(!0===t.settings.enableEdgeHoverEvents?t.checkEdgeHoverEvents(s):"debounce"===t.settings.enableEdgeHoverEvents&&(t.checkEdgesEventsFrame||(t.checkEdgesEventsFrame=(0,d.requestFrame)((function(){t.checkEdgeHoverEvents(s),t.checkEdgesEventsFrame=null})))))};var r=function(e){return function(r){var n={event:r,preventSigmaDefault:function(){this.event.preventSigmaDefault()}};if(t.hoveredNode)return t.emit("".concat(e,"Node"),o(o({},n),{node:t.hoveredNode}));if("wheel"===e?t.settings.enableEdgeWheelEvents:t.settings.enableEdgeClickEvents){var i=t.getEdgeAtPoint(r.x,r.y);if(i)return t.emit("".concat(e,"Edge"),o(o({},n),{edge:i}))}return t.emit("".concat(e,"Stage"),n)}};return this.activeListeners.handleClick=r("click"),this.activeListeners.handleRightClick=r("rightClick"),this.activeListeners.handleDoubleClick=r("doubleClick"),this.activeListeners.handleWheel=r("wheel"),this.activeListeners.handleDown=r("down"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this},e.prototype.bindGraphHandlers=function(){var t=this,e=this.graph;return this.activeListeners.graphUpdate=function(){t.needToProcess=!0,t._scheduleRefresh()},this.activeListeners.softGraphUpdate=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},this.activeListeners.dropNodeGraphUpdate=function(e){delete t.nodeDataCache[e.key],t.hoveredNode===e.key&&(t.hoveredNode=null),t.activeListeners.graphUpdate()},this.activeListeners.dropEdgeGraphUpdate=function(e){delete t.edgeDataCache[e.key],t.hoveredEdge===e.key&&(t.hoveredEdge=null),t.activeListeners.graphUpdate()},this.activeListeners.clearEdgesGraphUpdate=function(){t.edgeDataCache={},t.hoveredEdge=null,t.activeListeners.graphUpdate()},this.activeListeners.clearGraphUpdate=function(){t.nodeDataCache={},t.hoveredNode=null,t.activeListeners.clearEdgesGraphUpdate()},e.on("nodeAdded",this.activeListeners.graphUpdate),e.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.on("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgeAdded",this.activeListeners.graphUpdate),e.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.on("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.on("cleared",this.activeListeners.clearGraphUpdate),this},e.prototype.checkEdgeHoverEvents=function(t){var e=this.hoveredNode?null:this.getEdgeAtPoint(t.event.x,t.event.y);return e!==this.hoveredEdge&&(this.hoveredEdge&&this.emit("leaveEdge",o(o({},t),{edge:this.hoveredEdge})),e&&this.emit("enterEdge",o(o({},t),{edge:e})),this.hoveredEdge=e),this},e.prototype.getEdgeAtPoint=function(t,e){var r,n,i=this,o=this.edgeDataCache,u=this.nodeDataCache;if(!(0,v.isPixelColored)(this.webGLContexts.edges,t*m,e*m))return null;var s=this.viewportToGraph({x:t,y:e}),c=s.x,h=s.y,l=0;if(this.graph.someEdge((function(t,e,r,n,a,s){var c=a.x,h=a.y,d=s.x,f=s.y;if(o[t].hidden||u[r].hidden||u[n].hidden)return!1;if(c!==d||h!==f){var p=Math.sqrt(Math.pow(d-c,2)+Math.pow(f-h,2)),g=i.graphToViewport({x:c,y:h}),y=g.x,v=g.y,m=i.graphToViewport({x:d,y:f}),b=m.x,w=m.y,_=Math.sqrt(Math.pow(b-y,2)+Math.pow(w-v,2));return l=p/_,!0}})),!l)return null;var d=this.graph.filterEdges((function(t,e,r,n,a,s){return!(o[t].hidden||u[r].hidden||u[n].hidden)&&(!!(0,v.doEdgeCollideWithPoint)(c,h,a.x,a.y,s.x,s.y,o[t].size*l/i.cameraSizeRatio)||void 0)}));if(0===d.length)return null;var f=d[d.length-1],p=-1/0;try{for(var g=a(d),y=g.next();!y.done;y=g.next()){var b=y.value,w=this.graph.getEdgeAttribute(b,"zIndex");w>=p&&(f=b,p=w)}}catch(t){r={error:t}}finally{try{y&&!y.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}return f},e.prototype.process=function(t){var e=this;void 0===t&&(t=!1);var r=this.graph,n=this.settings,i=this.getDimensions(),o=[1/0,-1/0],a=[1/0,-1/0];this.quadtree.clear(),this.labelGrid.resizeAndClear(i,n.labelGridCellSize),this.highlightedNodes=new Set,this.nodeExtent=(0,d.graphExtent)(r),this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[];var u=new s.default,c=(0,d.matrixFromCamera)(u.getState(),this.getDimensions(),this.getGraphDimensions(),this.getSetting("stagePadding")||0);this.normalizationFunction=(0,d.createNormalizationFunction)(this.customBBox||this.nodeExtent);for(var h={},l=r.nodes(),f=0,p=l.length;f<p;f++){var g=l[f],y=Object.assign({},r.getNodeAttributes(g));n.nodeReducer&&(y=n.nodeReducer(g,y)),h[(m=b(this.settings,g,y)).type]=(h[m.type]||0)+1,this.nodeDataCache[g]=m,this.normalizationFunction.applyTo(m),m.forceLabel&&this.nodesWithForcedLabels.push(g),this.settings.zIndex&&(m.zIndex<o[0]&&(o[0]=m.zIndex),m.zIndex>o[1]&&(o[1]=m.zIndex))}for(var v in this.nodePrograms){if(!this.nodePrograms.hasOwnProperty(v))throw new Error('Sigma: could not find a suitable program for node type "'.concat(v,'"!'));t||this.nodePrograms[v].allocate(h[v]||0),h[v]=0}for(this.settings.zIndex&&o[0]!==o[1]&&(l=(0,d.zIndexOrdering)(o,(function(t){return e.nodeDataCache[t].zIndex}),l)),f=0,p=l.length;f<p;f++){g=l[f];var m=this.nodeDataCache[g];this.quadtree.add(g,m.x,1-m.y,m.size/this.width),"string"!=typeof m.label||m.hidden||this.labelGrid.add(g,m.size,this.framedGraphToViewport(m,{matrix:c})),this.nodePrograms[m.type].process(m,m.hidden,h[m.type]++),m.highlighted&&!m.hidden&&this.highlightedNodes.add(g)}this.labelGrid.organize();var _={},x=r.edges();for(f=0,p=x.length;f<p;f++){var E=x[f];y=Object.assign({},r.getEdgeAttributes(E)),n.edgeReducer&&(y=n.edgeReducer(E,y)),_[(m=w(this.settings,0,y)).type]=(_[m.type]||0)+1,this.edgeDataCache[E]=m,m.forceLabel&&!m.hidden&&this.edgesWithForcedLabels.push(E),this.settings.zIndex&&(m.zIndex<a[0]&&(a[0]=m.zIndex),m.zIndex>a[1]&&(a[1]=m.zIndex))}for(var v in this.edgePrograms){if(!this.edgePrograms.hasOwnProperty(v))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(v,'"!'));t||this.edgePrograms[v].allocate(_[v]||0),_[v]=0}for(this.settings.zIndex&&a[0]!==a[1]&&(x=(0,d.zIndexOrdering)(a,(function(t){return e.edgeDataCache[t].zIndex}),x)),f=0,p=x.length;f<p;f++){E=x[f],m=this.edgeDataCache[E];var A=r.extremities(E),S=this.nodeDataCache[A[0]],L=this.nodeDataCache[A[1]],k=m.hidden||S.hidden||L.hidden;this.edgePrograms[m.type].process(S,L,m,k,_[m.type]++)}for(var v in this.edgePrograms){var C=this.edgePrograms[v];t||"function"!=typeof C.computeIndices||C.computeIndices()}return this},e.prototype.handleSettingsUpdate=function(){return this.camera.minRatio=this.settings.minCameraRatio,this.camera.maxRatio=this.settings.maxCameraRatio,this.camera.setState(this.camera.validateState(this.camera.getState())),this},e.prototype._refresh=function(){return this.needToProcess?this.process():this.needToSoftProcess&&this.process(!0),this.needToProcess=!1,this.needToSoftProcess=!1,this.render(),this},e.prototype._scheduleRefresh=function(){var t=this;return this.renderFrame||(this.renderFrame=(0,d.requestFrame)((function(){t._refresh(),t.renderFrame=null}))),this},e.prototype.renderLabels=function(){if(!this.settings.renderLabels)return this;var t,e=this.camera.getState();if(e.ratio>=1)t=new Set(this.graph.nodes());else{var r=this.viewRectangle();t=new Set(this.quadtree.rectangle(r.x1,1-r.y1,r.x2,1-r.y2,r.height))}var n=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity).concat(this.nodesWithForcedLabels);this.displayedLabels=new Set;for(var i=this.canvasContexts.labels,a=0,u=n.length;a<u;a++){var s=n[a],c=this.nodeDataCache[s];if(!this.displayedLabels.has(s)&&!c.hidden){var h=this.framedGraphToViewport(c),l=h.x,d=h.y,f=this.scaleSize(c.size);!c.forceLabel&&f<this.settings.labelRenderedSizeThreshold||t.has(s)&&(this.displayedLabels.add(s),this.settings.labelRenderer(i,o(o({key:s},c),{size:f,x:l,y:d}),this.settings))}}return this},e.prototype.renderEdgeLabels=function(){if(!this.settings.renderEdgeLabels)return this;var t=this.canvasContexts.edgeLabels;t.clearRect(0,0,this.width,this.height);for(var e=(0,f.edgeLabelsToDisplayFromNodes)({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedLabels,highlightedNodes:this.highlightedNodes}).concat(this.edgesWithForcedLabels),r=new Set,n=0,i=e.length;n<i;n++){var a=e[n],u=this.graph.extremities(a),s=this.nodeDataCache[u[0]],c=this.nodeDataCache[u[1]],h=this.edgeDataCache[a];r.has(a)||h.hidden||s.hidden||c.hidden||(this.settings.edgeLabelRenderer(t,o(o({key:a},h),{size:this.scaleSize(h.size)}),o(o(o({key:u[0]},s),this.framedGraphToViewport(s)),{size:this.scaleSize(s.size)}),o(o(o({key:u[1]},c),this.framedGraphToViewport(c)),{size:this.scaleSize(c.size)}),this.settings),r.add(a))}return this},e.prototype.renderHighlightedNodes=function(){var t=this,e=this.canvasContexts.hovers;e.clearRect(0,0,this.width,this.height);var r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach((function(e){e!==t.hoveredNode&&r.push(e)})),r.forEach((function(r){return function(r){var n=t.nodeDataCache[r],i=t.framedGraphToViewport(n),a=i.x,u=i.y,s=t.scaleSize(n.size);t.settings.hoverRenderer(e,o(o({key:r},n),{size:s,x:a,y:u}),t.settings)}(r)}));var n={};for(var i in r.forEach((function(e){var r=t.nodeDataCache[e].type;n[r]=(n[r]||0)+1})),this.hoverNodePrograms)this.hoverNodePrograms[i].allocate(n[i]||0),n[i]=0;for(var i in r.forEach((function(e){var r=t.nodeDataCache[e];t.hoverNodePrograms[r.type].process(r,r.hidden,n[r.type]++)})),this.hoverNodePrograms){var a=this.hoverNodePrograms[i];a.bind(),a.bufferData(),a.render({matrix:this.matrix,width:this.width,height:this.height,ratio:this.camera.ratio,correctionRatio:this.correctionRatio/this.camera.ratio,scalingRatio:m})}},e.prototype.scheduleHighlightedNodesRender=function(){var t=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=(0,d.requestFrame)((function(){t.renderHighlightedNodesFrame=null,t.renderHighlightedNodes(),t.renderEdgeLabels()})))},e.prototype.render=function(){var t=this;this.emit("beforeRender");var e=function(){return t.emit("afterRender"),t};if(this.renderFrame&&((0,d.cancelFrame)(this.renderFrame),this.renderFrame=null,this.needToProcess=!1,this.needToSoftProcess=!1),this.resize(),this.clear(),this.updateCachedValues(),!this.graph.order)return e();var r=this.mouseCaptor,n=this.camera.isAnimated()||r.isMoving||r.draggedEvents||r.currentWheelDirection,i=this.camera.getState(),o=this.getDimensions(),a=this.getGraphDimensions(),u=this.getSetting("stagePadding")||0;for(var s in this.matrix=(0,d.matrixFromCamera)(i,o,a,u),this.invMatrix=(0,d.matrixFromCamera)(i,o,a,u,!0),this.correctionRatio=(0,d.getMatrixImpact)(this.matrix,i,o),this.nodePrograms)(c=this.nodePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:m});if(!this.settings.hideEdgesOnMove||!n)for(var s in this.edgePrograms){var c;(c=this.edgePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:m})}return this.settings.hideLabelsOnMove&&n||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),e()},e.prototype.updateCachedValues=function(){var t=this.camera.getState().ratio;this.cameraSizeRatio=Math.sqrt(t)},e.prototype.getCamera=function(){return this.camera},e.prototype.getGraph=function(){return this.graph},e.prototype.getMouseCaptor=function(){return this.mouseCaptor},e.prototype.getTouchCaptor=function(){return this.touchCaptor},e.prototype.getDimensions=function(){return{width:this.width,height:this.height}},e.prototype.getGraphDimensions=function(){var t=this.customBBox||this.nodeExtent;return{width:t.x[1]-t.x[0]||1,height:t.y[1]-t.y[0]||1}},e.prototype.getNodeDisplayData=function(t){var e=this.nodeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getEdgeDisplayData=function(t){var e=this.edgeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getSettings=function(){return o({},this.settings)},e.prototype.getSetting=function(t){return this.settings[t]},e.prototype.setSetting=function(t,e){return this.settings[t]=e,(0,p.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.updateSetting=function(t,e){return this.settings[t]=e(this.settings[t]),(0,p.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.resize=function(){var t=this.width,e=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,0===this.width){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seing this error.");this.width=1}if(0===this.height){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seing this error.");this.height=1}if(t===this.width&&e===this.height)return this;for(var r in this.emit("resize"),this.elements){var n=this.elements[r];n.style.width=this.width+"px",n.style.height=this.height+"px"}for(var r in this.canvasContexts)this.elements[r].setAttribute("width",this.width*m+"px"),this.elements[r].setAttribute("height",this.height*m+"px"),1!==m&&this.canvasContexts[r].scale(m,m);for(var r in this.webGLContexts)this.elements[r].setAttribute("width",this.width*m+"px"),this.elements[r].setAttribute("height",this.height*m+"px"),this.webGLContexts[r].viewport(0,0,this.width*m,this.height*m);return this},e.prototype.clear=function(){return this.webGLContexts.nodes.clear(this.webGLContexts.nodes.COLOR_BUFFER_BIT),this.webGLContexts.edges.clear(this.webGLContexts.edges.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(this.webGLContexts.nodes.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this},e.prototype.refresh=function(){return this.needToProcess=!0,this._refresh(),this},e.prototype.scheduleRefresh=function(){return this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.getViewportZoomedState=function(t,e){var r=this.camera.getState(),n=r.ratio,i=r.angle,o=r.x,a=r.y,u=e/n,s={x:this.width/2,y:this.height/2},c=this.viewportToFramedGraph(t),h=this.viewportToFramedGraph(s);return{angle:i,x:(c.x-h.x)*(1-u)+o,y:(c.y-h.y)*(1-u)+a,ratio:e}},e.prototype.viewRectangle=function(){var t=0*this.width/8,e=0*this.height/8,r=this.viewportToFramedGraph({x:0-t,y:0-e}),n=this.viewportToFramedGraph({x:this.width+t,y:0-e}),i=this.viewportToFramedGraph({x:0,y:this.height+e});return{x1:r.x,y1:r.y,x2:n.x,y2:n.y,height:n.y-i.y}},e.prototype.framedGraphToViewport=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!!e.graphDimensions,n=e.matrix?e.matrix:r?(0,d.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0):this.matrix,i=(0,y.multiplyVec2)(n,t);return{x:(1+i.x)*this.width/2,y:(1-i.y)*this.height/2}},e.prototype.viewportToFramedGraph=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!e.graphDimensions,n=e.matrix?e.matrix:r?(0,d.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0,!0):this.invMatrix;return(0,y.multiplyVec2)(n,{x:t.x/this.width*2-1,y:1-t.y/this.height*2})},e.prototype.viewportToGraph=function(t,e){return void 0===e&&(e={}),this.normalizationFunction.inverse(this.viewportToFramedGraph(t,e))},e.prototype.graphToViewport=function(t,e){return void 0===e&&(e={}),this.framedGraphToViewport(this.normalizationFunction(t),e)},e.prototype.getBBox=function(){return(0,d.graphExtent)(this.graph)},e.prototype.getCustomBBox=function(){return this.customBBox},e.prototype.setCustomBBox=function(t){return this.customBBox=t,this._scheduleRefresh(),this},e.prototype.kill=function(){var t=this.graph;this.emit("kill"),this.removeAllListeners(),this.camera.removeListener("updated",this.activeListeners.camera),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),t.removeListener("nodeAdded",this.activeListeners.dropNodeGraphUpdate),t.removeListener("nodeDropped",this.activeListeners.graphUpdate),t.removeListener("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgeAdded",this.activeListeners.graphUpdate),t.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),t.removeListener("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),t.removeListener("cleared",this.activeListeners.clearGraphUpdate),this.quadtree=new h.default,this.nodeDataCache={},this.edgeDataCache={},this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[],this.highlightedNodes.clear(),this.renderFrame&&((0,d.cancelFrame)(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&((0,d.cancelFrame)(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild)},e.prototype.scaleSize=function(t){return t/this.cameraSizeRatio},e.prototype.getCanvases=function(){return o({},this.elements)},e}(l.TypedEventEmitter);e.default=_},30432:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.rawEmitter=e,e}return i(e,t),e}(r(22699).EventEmitter);e.TypedEventEmitter=o},31181:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.animateNodes=e.ANIMATE_DEFAULTS=void 0;var i=r(88586),o=n(r(2383));e.ANIMATE_DEFAULTS={easing:"quadraticInOut",duration:150},e.animateNodes=function(t,r,n,a){var u=Object.assign({},e.ANIMATE_DEFAULTS,n),s="function"==typeof u.easing?u.easing:o.default[u.easing],c=Date.now(),h={};for(var l in r){var d=r[l];for(var f in h[l]={},d)h[l][f]=t.getNodeAttribute(l,f)}var p=null,g=function(){p=null;var e=(Date.now()-c)/u.duration;if(e>=1){for(var n in r){var o=r[n];for(var l in o)t.setNodeAttribute(n,l,o[l])}"function"==typeof a&&a()}else{for(var n in e=s(e),r){o=r[n];var d=h[n];for(var l in o)t.setNodeAttribute(n,l,o[l]*e+d[l]*(1-e))}p=(0,i.requestFrame)(g)}};return g(),function(){p&&(0,i.cancelFrame)(p)}}},71078:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTML_COLORS=void 0,e.HTML_COLORS={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"}},2383:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cubicInOut=e.cubicOut=e.cubicIn=e.quadraticInOut=e.quadraticOut=e.quadraticIn=e.linear=void 0,e.linear=function(t){return t},e.quadraticIn=function(t){return t*t},e.quadraticOut=function(t){return t*(2-t)},e.quadraticInOut=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},e.cubicIn=function(t){return t*t*t},e.cubicOut=function(t){return--t*t*t+1},e.cubicInOut=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};var r={linear:e.linear,quadraticIn:e.quadraticIn,quadraticOut:e.quadraticOut,quadraticInOut:e.quadraticInOut,cubicIn:e.cubicIn,cubicOut:e.cubicOut,cubicInOut:e.cubicInOut};e.default=r},38073:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.doEdgeCollideWithPoint=e.isPixelColored=void 0,e.isPixelColored=function(t,e,r){var n=new Uint8Array(4);return t.readPixels(e,t.drawingBufferHeight-r,1,1,t.RGBA,t.UNSIGNED_BYTE,n),n[3]>0},e.doEdgeCollideWithPoint=function(t,e,r,n,i,o,a){return!(t<r-a&&t<i-a||e<n-a&&e<o-a||t>r+a&&t>i+a||e>n+a&&e>o+a||!(Math.abs((i-r)*(n-e)-(r-t)*(o-n))/Math.sqrt(Math.pow(i-r,2)+Math.pow(o-n,2))<a/2))}},88586:function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.validateGraph=e.canUse32BitsIndices=e.extractPixel=e.getMatrixImpact=e.matrixFromCamera=e.getCorrectionRatio=e.floatColor=e.floatArrayColor=e.parseColor=e.zIndexOrdering=e.createNormalizationFunction=e.graphExtent=e.getPixelRatio=e.createElement=e.cancelFrame=e.requestFrame=e.assignDeep=e.assign=e.isPlainObject=void 0;var o=i(r(31880)),a=r(42237),u=r(71078);function s(t){return"object"==typeof t&&null!==t&&t.constructor===Object}e.isPlainObject=s,e.assign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];t=t||{};for(var n=0,i=e.length;n<i;n++){var o=e[n];o&&Object.assign(t,o)}return t},e.assignDeep=function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e=e||{};for(var i=0,o=r.length;i<o;i++){var a=r[i];if(a)for(var u in a)s(a[u])?e[u]=t(e[u],a[u]):e[u]=a[u]}return e},e.requestFrame="undefined"!=typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,0)},e.cancelFrame="undefined"!=typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:function(t){return clearTimeout(t)},e.createElement=function(t,e,r){var n=document.createElement(t);if(e)for(var i in e)n.style[i]=e[i];if(r)for(var i in r)n.setAttribute(i,r[i]);return n},e.getPixelRatio=function(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:1},e.graphExtent=function(t){var e=1/0,r=-1/0,n=1/0,i=-1/0;return t.forEachNode((function(t,o){var a=o.x,u=o.y;a<e&&(e=a),a>r&&(r=a),u<n&&(n=u),u>i&&(i=u)})),{x:[e,r],y:[n,i]}},e.createNormalizationFunction=function(t){var e=n(t.x,2),r=e[0],i=e[1],o=n(t.y,2),a=o[0],u=o[1],s=Math.max(i-r,u-a);0===s&&(s=1);var c=(i+r)/2,h=(u+a)/2,l=function(t){return{x:.5+(t.x-c)/s,y:.5+(t.y-h)/s}};return l.applyTo=function(t){t.x=.5+(t.x-c)/s,t.y=.5+(t.y-h)/s},l.inverse=function(t){return{x:c+s*(t.x-.5),y:h+s*(t.y-.5)}},l.ratio=s,l},e.zIndexOrdering=function(t,e,r){return r.sort((function(t,r){var n=e(t)||0,i=e(r)||0;return n<i?-1:n>i?1:0}))};var c=new Int8Array(4),h=new Int32Array(c.buffer,0,1),l=new Float32Array(c.buffer,0,1),d=/^\s*rgba?\s*\(/,f=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function p(t){var e=0,r=0,n=0,i=1;if("#"===t[0])4===t.length?(e=parseInt(t.charAt(1)+t.charAt(1),16),r=parseInt(t.charAt(2)+t.charAt(2),16),n=parseInt(t.charAt(3)+t.charAt(3),16)):(e=parseInt(t.charAt(1)+t.charAt(2),16),r=parseInt(t.charAt(3)+t.charAt(4),16),n=parseInt(t.charAt(5)+t.charAt(6),16));else if(d.test(t)){var o=t.match(f);o&&(e=+o[1],r=+o[2],n=+o[3],o[4]&&(i=+o[4]))}return{r:e,g:r,b:n,a:i}}e.parseColor=p;var g={};for(var y in u.HTML_COLORS)g[y]=v(u.HTML_COLORS[y]),g[u.HTML_COLORS[y]]=g[y];function v(t){if(void 0!==g[t])return g[t];var e=p(t),r=e.r,n=e.g,i=e.b,o=e.a;o=255*o|0,h[0]=4278190079&(o<<24|i<<16|n<<8|r);var a=l[0];return g[t]=a,a}function m(t,e){var r=t.height/t.width,n=e.height/e.width;return r<1&&n>1||r>1&&n<1?1:Math.min(Math.max(n,1/n),Math.max(1/r,r))}e.floatArrayColor=function(t){var e=p(t=u.HTML_COLORS[t]||t),r=e.r,n=e.g,i=e.b,o=e.a;return new Float32Array([r/255,n/255,i/255,o])},e.floatColor=v,e.getCorrectionRatio=m,e.matrixFromCamera=function(t,e,r,n,i){var o=t.angle,u=t.ratio,s=t.x,c=t.y,h=e.width,l=e.height,d=(0,a.identity)(),f=Math.min(h,l)-2*n,p=m(e,r);return i?((0,a.multiply)(d,(0,a.translate)((0,a.identity)(),s,c)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),u)),(0,a.multiply)(d,(0,a.rotate)((0,a.identity)(),o)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),h/f/2/p,l/f/2/p))):((0,a.multiply)(d,(0,a.scale)((0,a.identity)(),f/h*2*p,f/l*2*p)),(0,a.multiply)(d,(0,a.rotate)((0,a.identity)(),-o)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),1/u)),(0,a.multiply)(d,(0,a.translate)((0,a.identity)(),-s,-c))),d},e.getMatrixImpact=function(t,e,r){var n=(0,a.multiplyVec2)(t,{x:Math.cos(e.angle),y:Math.sin(e.angle)},0),i=n.x,o=n.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(o,2))/r.width},e.extractPixel=function(t,e,r,n){var i=n||new Uint8Array(4);return t.readPixels(e,r,1,1,t.RGBA,t.UNSIGNED_BYTE,i),i},e.canUse32BitsIndices=function(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||!!t.getExtension("OES_element_index_uint")},e.validateGraph=function(t){if(!(0,o.default)(t))throw new Error("Sigma: invalid graph instance.");t.forEachNode((function(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y))throw new Error("Sigma: Coordinates of node ".concat(t," are invalid. A node must have a numeric 'x' and 'y' attribute."))}))}},42237:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiplyVec2=e.multiply=e.translate=e.rotate=e.scale=e.identity=void 0,e.identity=function(){return Float32Array.of(1,0,0,0,1,0,0,0,1)},e.scale=function(t,e,r){return t[0]=e,t[4]="number"==typeof r?r:e,t},e.rotate=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[3]=-r,t[4]=n,t},e.translate=function(t,e,r){return t[6]=e,t[7]=r,t},e.multiply=function(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],c=t[7],h=t[8],l=e[0],d=e[1],f=e[2],p=e[3],g=e[4],y=e[5],v=e[6],m=e[7],b=e[8];return t[0]=l*r+d*o+f*s,t[1]=l*n+d*a+f*c,t[2]=l*i+d*u+f*h,t[3]=p*r+g*o+y*s,t[4]=p*n+g*a+y*c,t[5]=p*i+g*u+y*h,t[6]=v*r+m*o+b*s,t[7]=v*n+m*a+b*c,t[8]=v*i+m*u+b*h,t},e.multiplyVec2=function(t,e,r){void 0===r&&(r=1);var n=t[0],i=t[1],o=t[3],a=t[4],u=t[6],s=t[7],c=e.x,h=e.y;return{x:c*n+h*o+u*r,y:c*i+h*a+s*r}}},52844:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(95038),i=r.n(n);const o=function(){function t(t){var e=void 0===t?{}:t,r=e.locale,n=e.instance,o=e.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=n||o||i(),this.locale=r}return t.prototype.parse=function(t,e){return""===t?null:this.moment(t,e,!0)},t.prototype.date=function(t){if(null===t)return null;var e=this.moment(t);return e.locale(this.locale),e},t.prototype.isValid=function(t){return this.moment(t).isValid()},t.prototype.isNull=function(t){return null===t},t.prototype.getDiff=function(t,e){return t.diff(e)},t.prototype.isAfter=function(t,e){return t.isAfter(e)},t.prototype.isBefore=function(t,e){return t.isBefore(e)},t.prototype.isAfterDay=function(t,e){return t.isAfter(e,"day")},t.prototype.isBeforeDay=function(t,e){return t.isBefore(e,"day")},t.prototype.isBeforeYear=function(t,e){return t.isBefore(e,"year")},t.prototype.isAfterYear=function(t,e){return t.isAfter(e,"year")},t.prototype.startOfDay=function(t){return t.clone().startOf("day")},t.prototype.endOfDay=function(t){return t.clone().endOf("day")},t.prototype.format=function(t,e){return t.locale(this.locale),t.format(e)},t.prototype.formatNumber=function(t){return t},t.prototype.getHours=function(t){return t.get("hours")},t.prototype.addDays=function(t,e){return e<0?t.clone().subtract(Math.abs(e),"days"):t.clone().add(e,"days")},t.prototype.setHours=function(t,e){return t.clone().hours(e)},t.prototype.getMinutes=function(t){return t.get("minutes")},t.prototype.setMinutes=function(t,e){return t.clone().minutes(e)},t.prototype.getSeconds=function(t){return t.get("seconds")},t.prototype.setSeconds=function(t,e){return t.clone().seconds(e)},t.prototype.getMonth=function(t){return t.get("month")},t.prototype.isSameDay=function(t,e){return t.isSame(e,"day")},t.prototype.isSameMonth=function(t,e){return t.isSame(e,"month")},t.prototype.isSameYear=function(t,e){return t.isSame(e,"year")},t.prototype.isSameHour=function(t,e){return t.isSame(e,"hour")},t.prototype.setMonth=function(t,e){return t.clone().month(e)},t.prototype.getMeridiemText=function(t){return"am"===t?"AM":"PM"},t.prototype.startOfMonth=function(t){return t.clone().startOf("month")},t.prototype.endOfMonth=function(t){return t.clone().endOf("month")},t.prototype.getNextMonth=function(t){return t.clone().add(1,"month")},t.prototype.getPreviousMonth=function(t){return t.clone().subtract(1,"month")},t.prototype.getMonthArray=function(t){for(var e=[t.clone().startOf("year")];e.length<12;){var r=e[e.length-1];e.push(this.getNextMonth(r))}return e},t.prototype.getYear=function(t){return t.get("year")},t.prototype.setYear=function(t,e){return t.clone().set("year",e)},t.prototype.mergeDateAndTime=function(t,e){return this.setMinutes(this.setHours(t,this.getHours(e)),this.getMinutes(e))},t.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},t.prototype.isEqual=function(t,e){return null===t&&null===e||this.moment(t).isSame(e)},t.prototype.getWeekArray=function(t){for(var e=t.clone().startOf("month").startOf("week"),r=t.clone().endOf("month").endOf("week"),n=0,i=e,o=[];i.isBefore(r);){var a=Math.floor(n/7);o[a]=o[a]||[],o[a].push(i),i=i.clone().add(1,"day"),n+=1}return o},t.prototype.getYearRange=function(t,e){for(var r=this.moment(t).startOf("year"),n=this.moment(e).endOf("year"),i=[],o=r;o.isBefore(n);)i.push(o),o=o.clone().add(1,"year");return i},t.prototype.getCalendarHeaderText=function(t){return this.format(t,this.yearMonthFormat)},t.prototype.getYearText=function(t){return this.format(t,"YYYY")},t.prototype.getDatePickerHeaderText=function(t){return this.format(t,"ddd, MMM D")},t.prototype.getDateTimePickerHeaderText=function(t){return this.format(t,"MMM D")},t.prototype.getMonthText=function(t){return this.format(t,"MMMM")},t.prototype.getDayText=function(t){return this.format(t,"D")},t.prototype.getHourText=function(t,e){return this.format(t,e?"hh":"HH")},t.prototype.getMinuteText=function(t){return this.format(t,"mm")},t.prototype.getSecondText=function(t){return this.format(t,"ss")},t}()}}]);
|