!(function(){var g8=Object.defineProperty,p8=Object.defineProperties;var m8=Object.getOwnPropertyDescriptors;var x2=Object.getOwnPropertySymbols;var y8=Object.prototype.hasOwnProperty,_8=Object.prototype.propertyIsEnumerable;var jo=Math.pow,xp=(we,Me,X)=>Me in we?g8(we,Me,{enumerable:!0,configurable:!0,writable:!0,value:X}):we[Me]=X,yu=(we,Me)=>{for(var X in Me||(Me={}))y8.call(Me,X)&&xp(we,X,Me[X]);if(x2)for(var X of x2(Me))_8.call(Me,X)&&xp(we,X,Me[X]);return we},bp=(we,Me)=>p8(we,m8(Me));var Qr=(we,Me,X)=>xp(we,typeof Me!="symbol"?Me+"":Me,X);(self.webpackChunk=self.webpackChunk||[]).push([[3385],{50865:function(we,Me,X){"use strict";X.d(Me,{kJ:function(){return jd},RN:function(){return qF}});var K={};X.r(K),X.d(K,{add:function(){return Ma},adjoint:function(){return Tt},clone:function(){return Ke},copy:function(){return He},create:function(){return De},determinant:function(){return It},equals:function(){return Kt},exactEquals:function(){return Ut},frob:function(){return Kr},fromQuat:function(){return Cn},fromQuat2:function(){return Mn},fromRotation:function(){return Zt},fromRotationTranslation:function(){return gn},fromRotationTranslationScale:function(){return Yn},fromRotationTranslationScaleOrigin:function(){return Gn},fromScaling:function(){return ln},fromTranslation:function(){return on},fromValues:function(){return Je},fromXRotation:function(){return Jt},fromYRotation:function(){return Xt},fromZRotation:function(){return dn},frustum:function(){return Mr},getRotation:function(){return Rn},getScaling:function(){return pn},getTranslation:function(){return Hn},identity:function(){return Ze},invert:function(){return mt},lookAt:function(){return ti},mul:function(){return mn},multiply:function(){return vt},multiplyScalar:function(){return Xr},multiplyScalarAndAdd:function(){return zn},ortho:function(){return Fr},orthoNO:function(){return Zn},orthoZO:function(){return ei},perspective:function(){return Rr},perspectiveFromFieldOfView:function(){return rr},perspectiveNO:function(){return kr},perspectiveZO:function(){return xr},rotate:function(){return Qe},rotateX:function(){return gt},rotateY:function(){return Pt},rotateZ:function(){return St},scale:function(){return Bt},set:function(){return ke},str:function(){return ta},sub:function(){return cn},subtract:function(){return ji},targetTo:function(){return Ir},translate:function(){return Rt},transpose:function(){return tt}});var ee={};X.r(ee),X.d(ee,{circle:function(){return dL},diamond:function(){return vL},rect:function(){return pL},simple:function(){return yL},triangle:function(){return I1},triangleRect:function(){return mL},vee:function(){return gL}});var G=X(20439),_=X(99153),F=X(84851),w=X(95190),x=X(59358),y=X(19257),b=X(50298),E=X(37271),g=E,m=1e-6,C=typeof Float32Array!="undefined"?Float32Array:Array,d=Math.random;function v(r){C=r}var A=Math.PI/180;function T(r){return r*A}function O(r,e){return Math.abs(r-e)<=m*Math.max(1,Math.abs(r),Math.abs(e))}Math.hypot||(Math.hypot=function(){for(var r=0,e=arguments.length;e--;)r+=arguments[e]*arguments[e];return Math.sqrt(r)});function P(){var r=new C(3);return C!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function L(r){var e=new C(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function c(r){var e=r[0],t=r[1],n=r[2];return Math.hypot(e,t,n)}function f(r,e,t){var n=new C(3);return n[0]=r,n[1]=e,n[2]=t,n}function D(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function R(r,e,t,n){return r[0]=e,r[1]=t,r[2]=n,r}function k(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r[2]=e[2]+t[2],r}function W(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r[2]=e[2]-t[2],r}function z(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r[2]=e[2]*t[2],r}function Z(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r[2]=e[2]/t[2],r}function Q(r,e){return r[0]=Math.ceil(e[0]),r[1]=Math.ceil(e[1]),r[2]=Math.ceil(e[2]),r}function te(r,e){return r[0]=Math.floor(e[0]),r[1]=Math.floor(e[1]),r[2]=Math.floor(e[2]),r}function $(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.min(e[2],t[2]),r}function ie(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r[2]=Math.max(e[2],t[2]),r}function ae(r,e){return r[0]=Math.round(e[0]),r[1]=Math.round(e[1]),r[2]=Math.round(e[2]),r}function re(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t,r}function ce(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r[2]=e[2]+t[2]*n,r}function oe(r,e){var t=e[0]-r[0],n=e[1]-r[1],i=e[2]-r[2];return Math.hypot(t,n,i)}function he(r,e){var t=e[0]-r[0],n=e[1]-r[1],i=e[2]-r[2];return t*t+n*n+i*i}function se(r){var e=r[0],t=r[1],n=r[2];return e*e+t*t+n*n}function pe(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r}function me(r,e){return r[0]=1/e[0],r[1]=1/e[1],r[2]=1/e[2],r}function ge(r,e){var t=e[0],n=e[1],i=e[2],a=t*t+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r}function Ee(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Ae(r,e,t){var n=e[0],i=e[1],a=e[2],s=t[0],o=t[1],l=t[2];return r[0]=i*l-a*o,r[1]=a*s-n*l,r[2]=n*o-i*s,r}function Fe(r,e,t,n){var i=e[0],a=e[1],s=e[2];return r[0]=i+n*(t[0]-i),r[1]=a+n*(t[1]-a),r[2]=s+n*(t[2]-s),r}function Ue(r,e,t,n,i,a){var s=a*a,o=s*(2*a-3)+1,l=s*(a-2)+a,u=s*(a-1),h=s*(3-2*a);return r[0]=e[0]*o+t[0]*l+n[0]*u+i[0]*h,r[1]=e[1]*o+t[1]*l+n[1]*u+i[1]*h,r[2]=e[2]*o+t[2]*l+n[2]*u+i[2]*h,r}function nt(r,e,t,n,i,a){var s=1-a,o=s*s,l=a*a,u=o*s,h=3*a*o,p=3*l*s,S=l*a;return r[0]=e[0]*u+t[0]*h+n[0]*p+i[0]*S,r[1]=e[1]*u+t[1]*h+n[1]*p+i[1]*S,r[2]=e[2]*u+t[2]*h+n[2]*p+i[2]*S,r}function rt(r,e){e=e||1;var t=glMatrix.RANDOM()*2*Math.PI,n=glMatrix.RANDOM()*2-1,i=Math.sqrt(1-n*n)*e;return r[0]=Math.cos(t)*i,r[1]=Math.sin(t)*i,r[2]=n*e,r}function qe(r,e,t){var n=e[0],i=e[1],a=e[2],s=t[3]*n+t[7]*i+t[11]*a+t[15];return s=s||1,r[0]=(t[0]*n+t[4]*i+t[8]*a+t[12])/s,r[1]=(t[1]*n+t[5]*i+t[9]*a+t[13])/s,r[2]=(t[2]*n+t[6]*i+t[10]*a+t[14])/s,r}function dt(r,e,t){var n=e[0],i=e[1],a=e[2];return r[0]=n*t[0]+i*t[3]+a*t[6],r[1]=n*t[1]+i*t[4]+a*t[7],r[2]=n*t[2]+i*t[5]+a*t[8],r}function yt(r,e,t){var n=t[0],i=t[1],a=t[2],s=t[3],o=e[0],l=e[1],u=e[2],h=i*u-a*l,p=a*o-n*u,S=n*l-i*o,N=i*S-a*p,U=a*h-n*S,H=n*p-i*h,V=s*2;return h*=V,p*=V,S*=V,N*=2,U*=2,H*=2,r[0]=o+h+N,r[1]=l+p+U,r[2]=u+S+H,r}function je(r,e,t,n){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r}function at(r,e,t,n){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r}function it(r,e,t,n){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r}function ht(r,e){var t=r[0],n=r[1],i=r[2],a=e[0],s=e[1],o=e[2],l=Math.sqrt(t*t+n*n+i*i),u=Math.sqrt(a*a+s*s+o*o),h=l*u,p=h&&Ee(r,e)/h;return Math.acos(Math.min(Math.max(p,-1),1))}function ut(r){return r[0]=0,r[1]=0,r[2]=0,r}function Mt(r){return"vec3("+r[0]+", "+r[1]+", "+r[2]+")"}function Ce(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}function ot(r,e){var t=r[0],n=r[1],i=r[2],a=e[0],s=e[1],o=e[2];return Math.abs(t-a)<=m*Math.max(1,Math.abs(t),Math.abs(a))&&Math.abs(n-s)<=m*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-o)<=m*Math.max(1,Math.abs(i),Math.abs(o))}var Pe=W,Ne=null,We=null,Be=oe,Ve=null,$e=c,lt=null,pt=function(){var r=P();return function(e,t,n,i,a,s){var o,l;for(t||(t=3),n||(n=0),i?l=Math.min(i*t+n,e.length):l=e.length,o=n;o0&&(s=1/Math.sqrt(s)),r[0]=t*s,r[1]=n*s,r[2]=i*s,r[3]=a*s,r}function Nt(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]}function zt(r,e,t,n){var i=t[0]*n[1]-t[1]*n[0],a=t[0]*n[2]-t[2]*n[0],s=t[0]*n[3]-t[3]*n[0],o=t[1]*n[2]-t[2]*n[1],l=t[1]*n[3]-t[3]*n[1],u=t[2]*n[3]-t[3]*n[2],h=e[0],p=e[1],S=e[2],N=e[3];return r[0]=p*u-S*l+N*o,r[1]=-(h*u)+S*s-N*a,r[2]=h*l-p*s+N*i,r[3]=-(h*o)+p*a-S*i,r}function Gt(r,e,t,n){var i=e[0],a=e[1],s=e[2],o=e[3];return r[0]=i+n*(t[0]-i),r[1]=a+n*(t[1]-a),r[2]=s+n*(t[2]-s),r[3]=o+n*(t[3]-o),r}function jt(r,e){e=e||1;var t,n,i,a,s,o;do t=glMatrix.RANDOM()*2-1,n=glMatrix.RANDOM()*2-1,s=t*t+n*n;while(s>=1);do i=glMatrix.RANDOM()*2-1,a=glMatrix.RANDOM()*2-1,o=i*i+a*a;while(o>=1);var l=Math.sqrt((1-s)/o);return r[0]=e*t,r[1]=e*n,r[2]=e*i*l,r[3]=e*a*l,r}function En(r,e,t){var n=e[0],i=e[1],a=e[2],s=e[3];return r[0]=t[0]*n+t[4]*i+t[8]*a+t[12]*s,r[1]=t[1]*n+t[5]*i+t[9]*a+t[13]*s,r[2]=t[2]*n+t[6]*i+t[10]*a+t[14]*s,r[3]=t[3]*n+t[7]*i+t[11]*a+t[15]*s,r}function _e(r,e,t){var n=e[0],i=e[1],a=e[2],s=t[0],o=t[1],l=t[2],u=t[3],h=u*n+o*a-l*i,p=u*i+l*n-s*a,S=u*a+s*i-o*n,N=-s*n-o*i-l*a;return r[0]=h*u+N*-s+p*-l-S*-o,r[1]=p*u+N*-o+S*-s-h*-l,r[2]=S*u+N*-l+h*-o-p*-s,r[3]=e[3],r}function M(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}function B(r){return"vec4("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+")"}function I(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]&&r[3]===e[3]}function j(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],s=e[0],o=e[1],l=e[2],u=e[3];return Math.abs(t-s)<=m*Math.max(1,Math.abs(t),Math.abs(s))&&Math.abs(n-o)<=m*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-l)<=m*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(a-u)<=m*Math.max(1,Math.abs(a),Math.abs(u))}var J=null,ye=null,be=null,Le=null,Se=null,Ye=null,Ge=null,Re=function(){var r=xt();return function(e,t,n,i,a,s){var o,l;for(t||(t=4),n||(n=0),i?l=Math.min(i*t+n,e.length):l=e.length,o=n;o0?(t[0]=(o*s+h*n+l*a-u*i)*2/p,t[1]=(l*s+h*i+u*n-o*a)*2/p,t[2]=(u*s+h*a+o*i-l*n)*2/p):(t[0]=(o*s+h*n+l*a-u*i)*2,t[1]=(l*s+h*i+u*n-o*a)*2,t[2]=(u*s+h*a+o*i-l*n)*2),gn(r,e,t),r}function Hn(r,e){return r[0]=e[12],r[1]=e[13],r[2]=e[14],r}function pn(r,e){var t=e[0],n=e[1],i=e[2],a=e[4],s=e[5],o=e[6],l=e[8],u=e[9],h=e[10];return r[0]=Math.hypot(t,n,i),r[1]=Math.hypot(a,s,o),r[2]=Math.hypot(l,u,h),r}function Rn(r,e){var t=new C(3);pn(t,e);var n=1/t[0],i=1/t[1],a=1/t[2],s=e[0]*n,o=e[1]*i,l=e[2]*a,u=e[4]*n,h=e[5]*i,p=e[6]*a,S=e[8]*n,N=e[9]*i,U=e[10]*a,H=s+h+U,V=0;return H>0?(V=Math.sqrt(H+1)*2,r[3]=.25*V,r[0]=(p-N)/V,r[1]=(S-l)/V,r[2]=(o-u)/V):s>h&&s>U?(V=Math.sqrt(1+s-h-U)*2,r[3]=(p-N)/V,r[0]=.25*V,r[1]=(o+u)/V,r[2]=(S+l)/V):h>U?(V=Math.sqrt(1+h-s-U)*2,r[3]=(S-l)/V,r[0]=(o+u)/V,r[1]=.25*V,r[2]=(p+N)/V):(V=Math.sqrt(1+U-s-h)*2,r[3]=(o-u)/V,r[0]=(S+l)/V,r[1]=(p+N)/V,r[2]=.25*V),r}function Yn(r,e,t,n){var i=e[0],a=e[1],s=e[2],o=e[3],l=i+i,u=a+a,h=s+s,p=i*l,S=i*u,N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(a-s);return r[0]=a*2*o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a*2*l,r[6]=0,r[7]=0,r[8]=(t+e)*o,r[9]=(i+n)*l,r[10]=(s+a)*u,r[11]=-1,r[12]=0,r[13]=0,r[14]=s*a*2*u,r[15]=0,r}function kr(r,e,t,n,i){var a=1/Math.tan(e/2),s;return r[0]=a/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=-1,r[12]=0,r[13]=0,r[15]=0,i!=null&&i!==1/0?(s=1/(n-i),r[10]=(i+n)*s,r[14]=2*i*n*s):(r[10]=-1,r[14]=-2*n),r}var Rr=kr;function xr(r,e,t,n,i){var a=1/Math.tan(e/2),s;return r[0]=a/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=-1,r[12]=0,r[13]=0,r[15]=0,i!=null&&i!==1/0?(s=1/(n-i),r[10]=i*s,r[14]=i*n*s):(r[10]=-1,r[14]=-n),r}function rr(r,e,t,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),o=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+o),u=2/(i+a);return r[0]=l,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=u,r[6]=0,r[7]=0,r[8]=-((s-o)*l*.5),r[9]=(i-a)*u*.5,r[10]=n/(t-n),r[11]=-1,r[12]=0,r[13]=0,r[14]=n*t/(t-n),r[15]=0,r}function Zn(r,e,t,n,i,a,s){var o=1/(e-t),l=1/(n-i),u=1/(a-s);return r[0]=-2*o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*l,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*u,r[11]=0,r[12]=(e+t)*o,r[13]=(i+n)*l,r[14]=(s+a)*u,r[15]=1,r}var Fr=Zn;function ei(r,e,t,n,i,a,s){var o=1/(e-t),l=1/(n-i),u=1/(a-s);return r[0]=-2*o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*l,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=u,r[11]=0,r[12]=(e+t)*o,r[13]=(i+n)*l,r[14]=a*u,r[15]=1,r}function ti(r,e,t,n){var i,a,s,o,l,u,h,p,S,N,U=e[0],H=e[1],V=e[2],Y=n[0],q=n[1],ne=n[2],le=t[0],ue=t[1],fe=t[2];return Math.abs(U-le)0&&(N=1/Math.sqrt(N),h*=N,p*=N,S*=N);var U=l*S-u*p,H=u*h-o*S,V=o*p-l*h;return N=U*U+H*H+V*V,N>0&&(N=1/Math.sqrt(N),U*=N,H*=N,V*=N),r[0]=U,r[1]=H,r[2]=V,r[3]=0,r[4]=p*V-S*H,r[5]=S*U-h*V,r[6]=h*H-p*U,r[7]=0,r[8]=h,r[9]=p,r[10]=S,r[11]=0,r[12]=i,r[13]=a,r[14]=s,r[15]=1,r}function ta(r){return"mat4("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+", "+r[6]+", "+r[7]+", "+r[8]+", "+r[9]+", "+r[10]+", "+r[11]+", "+r[12]+", "+r[13]+", "+r[14]+", "+r[15]+")"}function Kr(r){return Math.hypot(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}function Ma(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r[2]=e[2]+t[2],r[3]=e[3]+t[3],r[4]=e[4]+t[4],r[5]=e[5]+t[5],r[6]=e[6]+t[6],r[7]=e[7]+t[7],r[8]=e[8]+t[8],r[9]=e[9]+t[9],r[10]=e[10]+t[10],r[11]=e[11]+t[11],r[12]=e[12]+t[12],r[13]=e[13]+t[13],r[14]=e[14]+t[14],r[15]=e[15]+t[15],r}function ji(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r[2]=e[2]-t[2],r[3]=e[3]-t[3],r[4]=e[4]-t[4],r[5]=e[5]-t[5],r[6]=e[6]-t[6],r[7]=e[7]-t[7],r[8]=e[8]-t[8],r[9]=e[9]-t[9],r[10]=e[10]-t[10],r[11]=e[11]-t[11],r[12]=e[12]-t[12],r[13]=e[13]-t[13],r[14]=e[14]-t[14],r[15]=e[15]-t[15],r}function Xr(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t,r[3]=e[3]*t,r[4]=e[4]*t,r[5]=e[5]*t,r[6]=e[6]*t,r[7]=e[7]*t,r[8]=e[8]*t,r[9]=e[9]*t,r[10]=e[10]*t,r[11]=e[11]*t,r[12]=e[12]*t,r[13]=e[13]*t,r[14]=e[14]*t,r[15]=e[15]*t,r}function zn(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r[2]=e[2]+t[2]*n,r[3]=e[3]+t[3]*n,r[4]=e[4]+t[4]*n,r[5]=e[5]+t[5]*n,r[6]=e[6]+t[6]*n,r[7]=e[7]+t[7]*n,r[8]=e[8]+t[8]*n,r[9]=e[9]+t[9]*n,r[10]=e[10]+t[10]*n,r[11]=e[11]+t[11]*n,r[12]=e[12]+t[12]*n,r[13]=e[13]+t[13]*n,r[14]=e[14]+t[14]*n,r[15]=e[15]+t[15]*n,r}function Ut(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]&&r[3]===e[3]&&r[4]===e[4]&&r[5]===e[5]&&r[6]===e[6]&&r[7]===e[7]&&r[8]===e[8]&&r[9]===e[9]&&r[10]===e[10]&&r[11]===e[11]&&r[12]===e[12]&&r[13]===e[13]&&r[14]===e[14]&&r[15]===e[15]}function Kt(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],s=r[4],o=r[5],l=r[6],u=r[7],h=r[8],p=r[9],S=r[10],N=r[11],U=r[12],H=r[13],V=r[14],Y=r[15],q=e[0],ne=e[1],le=e[2],ue=e[3],fe=e[4],de=e[5],ve=e[6],Te=e[7],Oe=e[8],Ie=e[9],ze=e[10],Xe=e[11],et=e[12],st=e[13],bt=e[14],_t=e[15];return Math.abs(t-q)<=m*Math.max(1,Math.abs(t),Math.abs(q))&&Math.abs(n-ne)<=m*Math.max(1,Math.abs(n),Math.abs(ne))&&Math.abs(i-le)<=m*Math.max(1,Math.abs(i),Math.abs(le))&&Math.abs(a-ue)<=m*Math.max(1,Math.abs(a),Math.abs(ue))&&Math.abs(s-fe)<=m*Math.max(1,Math.abs(s),Math.abs(fe))&&Math.abs(o-de)<=m*Math.max(1,Math.abs(o),Math.abs(de))&&Math.abs(l-ve)<=m*Math.max(1,Math.abs(l),Math.abs(ve))&&Math.abs(u-Te)<=m*Math.max(1,Math.abs(u),Math.abs(Te))&&Math.abs(h-Oe)<=m*Math.max(1,Math.abs(h),Math.abs(Oe))&&Math.abs(p-Ie)<=m*Math.max(1,Math.abs(p),Math.abs(Ie))&&Math.abs(S-ze)<=m*Math.max(1,Math.abs(S),Math.abs(ze))&&Math.abs(N-Xe)<=m*Math.max(1,Math.abs(N),Math.abs(Xe))&&Math.abs(U-et)<=m*Math.max(1,Math.abs(U),Math.abs(et))&&Math.abs(H-st)<=m*Math.max(1,Math.abs(H),Math.abs(st))&&Math.abs(V-bt)<=m*Math.max(1,Math.abs(V),Math.abs(bt))&&Math.abs(Y-_t)<=m*Math.max(1,Math.abs(Y),Math.abs(_t))}var mn=vt,cn=ji;function Tn(){var r=new C(9);return C!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function ar(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[4],r[4]=e[5],r[5]=e[6],r[6]=e[8],r[7]=e[9],r[8]=e[10],r}function gr(r){var e=new glMatrix.ARRAY_TYPE(9);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e}function hr(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r}function gi(r,e,t,n,i,a,s,o,l){var u=new C(9);return u[0]=r,u[1]=e,u[2]=t,u[3]=n,u[4]=i,u[5]=a,u[6]=s,u[7]=o,u[8]=l,u}function Vi(r,e,t,n,i,a,s,o,l,u){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r[4]=a,r[5]=s,r[6]=o,r[7]=l,r[8]=u,r}function na(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function ws(r,e){if(r===e){var t=e[1],n=e[2],i=e[5];r[1]=e[3],r[2]=e[6],r[3]=t,r[5]=e[7],r[6]=n,r[7]=i}else r[0]=e[0],r[1]=e[3],r[2]=e[6],r[3]=e[1],r[4]=e[4],r[5]=e[7],r[6]=e[2],r[7]=e[5],r[8]=e[8];return r}function ni(r,e){var t=e[0],n=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],p=h*s-o*u,S=-h*a+o*l,N=u*a-s*l,U=t*p+n*S+i*N;return U?(U=1/U,r[0]=p*U,r[1]=(-h*n+i*u)*U,r[2]=(o*n-i*s)*U,r[3]=S*U,r[4]=(h*t-i*l)*U,r[5]=(-o*t+i*a)*U,r[6]=N*U,r[7]=(-u*t+n*l)*U,r[8]=(s*t-n*a)*U,r):null}function Vo(r,e){var t=e[0],n=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8];return r[0]=s*h-o*u,r[1]=i*u-n*h,r[2]=n*o-i*s,r[3]=o*l-a*h,r[4]=t*h-i*l,r[5]=i*a-t*o,r[6]=a*u-s*l,r[7]=n*l-t*u,r[8]=t*s-n*a,r}function uo(r){var e=r[0],t=r[1],n=r[2],i=r[3],a=r[4],s=r[5],o=r[6],l=r[7],u=r[8];return e*(u*a-s*l)+t*(-u*i+s*o)+n*(l*i-a*o)}function Ha(r,e,t){var n=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],p=e[8],S=t[0],N=t[1],U=t[2],H=t[3],V=t[4],Y=t[5],q=t[6],ne=t[7],le=t[8];return r[0]=S*n+N*s+U*u,r[1]=S*i+N*o+U*h,r[2]=S*a+N*l+U*p,r[3]=H*n+V*s+Y*u,r[4]=H*i+V*o+Y*h,r[5]=H*a+V*l+Y*p,r[6]=q*n+ne*s+le*u,r[7]=q*i+ne*o+le*h,r[8]=q*a+ne*l+le*p,r}function Zi(r,e,t){var n=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],p=e[8],S=t[0],N=t[1];return r[0]=n,r[1]=i,r[2]=a,r[3]=s,r[4]=o,r[5]=l,r[6]=S*n+N*s+u,r[7]=S*i+N*o+h,r[8]=S*a+N*l+p,r}function ha(r,e,t){var n=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],p=e[8],S=Math.sin(t),N=Math.cos(t);return r[0]=N*n+S*s,r[1]=N*i+S*o,r[2]=N*a+S*l,r[3]=N*s-S*n,r[4]=N*o-S*i,r[5]=N*l-S*a,r[6]=u,r[7]=h,r[8]=p,r}function Mi(r,e,t){var n=t[0],i=t[1];return r[0]=n*e[0],r[1]=n*e[1],r[2]=n*e[2],r[3]=i*e[3],r[4]=i*e[4],r[5]=i*e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r}function Ms(r,e){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=e[0],r[7]=e[1],r[8]=1,r}function co(r,e){var t=Math.sin(e),n=Math.cos(e);return r[0]=n,r[1]=t,r[2]=0,r[3]=-t,r[4]=n,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function Gs(r,e){return r[0]=e[0],r[1]=0,r[2]=0,r[3]=0,r[4]=e[1],r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function Ga(r,e){return r[0]=e[0],r[1]=e[1],r[2]=0,r[3]=e[2],r[4]=e[3],r[5]=0,r[6]=e[4],r[7]=e[5],r[8]=1,r}function Aa(r,e){var t=e[0],n=e[1],i=e[2],a=e[3],s=t+t,o=n+n,l=i+i,u=t*s,h=n*s,p=n*o,S=i*s,N=i*o,U=i*l,H=a*s,V=a*o,Y=a*l;return r[0]=1-p-U,r[3]=h-Y,r[6]=S+V,r[1]=h+Y,r[4]=1-u-U,r[7]=N-H,r[2]=S-V,r[5]=N+H,r[8]=1-u-p,r}function Cl(r,e){var t=e[0],n=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],p=e[9],S=e[10],N=e[11],U=e[12],H=e[13],V=e[14],Y=e[15],q=t*o-n*s,ne=t*l-i*s,le=t*u-a*s,ue=n*l-i*o,fe=n*u-a*o,de=i*u-a*l,ve=h*H-p*U,Te=h*V-S*U,Oe=h*Y-N*U,Ie=p*V-S*H,ze=p*Y-N*H,Xe=S*Y-N*V,et=q*Xe-ne*ze+le*Ie+ue*Oe-fe*Te+de*ve;return et?(et=1/et,r[0]=(o*Xe-l*ze+u*Ie)*et,r[1]=(l*Oe-s*Xe-u*Te)*et,r[2]=(s*ze-o*Oe+u*ve)*et,r[3]=(i*ze-n*Xe-a*Ie)*et,r[4]=(t*Xe-i*Oe+a*Te)*et,r[5]=(n*Oe-t*ze-a*ve)*et,r[6]=(H*de-V*fe+Y*ue)*et,r[7]=(V*le-U*de-Y*ne)*et,r[8]=(U*fe-H*le+Y*q)*et,r):null}function ja(r,e,t){return r[0]=2/e,r[1]=0,r[2]=0,r[3]=0,r[4]=-2/t,r[5]=0,r[6]=-1,r[7]=1,r[8]=1,r}function _u(r){return"mat3("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+", "+r[6]+", "+r[7]+", "+r[8]+")"}function fa(r){return Math.hypot(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])}function Dc(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r[2]=e[2]+t[2],r[3]=e[3]+t[3],r[4]=e[4]+t[4],r[5]=e[5]+t[5],r[6]=e[6]+t[6],r[7]=e[7]+t[7],r[8]=e[8]+t[8],r}function Eu(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r[2]=e[2]-t[2],r[3]=e[3]-t[3],r[4]=e[4]-t[4],r[5]=e[5]-t[5],r[6]=e[6]-t[6],r[7]=e[7]-t[7],r[8]=e[8]-t[8],r}function xu(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t,r[3]=e[3]*t,r[4]=e[4]*t,r[5]=e[5]*t,r[6]=e[6]*t,r[7]=e[7]*t,r[8]=e[8]*t,r}function Cc(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r[2]=e[2]+t[2]*n,r[3]=e[3]+t[3]*n,r[4]=e[4]+t[4]*n,r[5]=e[5]+t[5]*n,r[6]=e[6]+t[6]*n,r[7]=e[7]+t[7]*n,r[8]=e[8]+t[8]*n,r}function bu(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]&&r[3]===e[3]&&r[4]===e[4]&&r[5]===e[5]&&r[6]===e[6]&&r[7]===e[7]&&r[8]===e[8]}function wu(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],s=r[4],o=r[5],l=r[6],u=r[7],h=r[8],p=e[0],S=e[1],N=e[2],U=e[3],H=e[4],V=e[5],Y=e[6],q=e[7],ne=e[8];return Math.abs(t-p)<=glMatrix.EPSILON*Math.max(1,Math.abs(t),Math.abs(p))&&Math.abs(n-S)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(S))&&Math.abs(i-N)<=glMatrix.EPSILON*Math.max(1,Math.abs(i),Math.abs(N))&&Math.abs(a-U)<=glMatrix.EPSILON*Math.max(1,Math.abs(a),Math.abs(U))&&Math.abs(s-H)<=glMatrix.EPSILON*Math.max(1,Math.abs(s),Math.abs(H))&&Math.abs(o-V)<=glMatrix.EPSILON*Math.max(1,Math.abs(o),Math.abs(V))&&Math.abs(l-Y)<=glMatrix.EPSILON*Math.max(1,Math.abs(l),Math.abs(Y))&&Math.abs(u-q)<=glMatrix.EPSILON*Math.max(1,Math.abs(u),Math.abs(q))&&Math.abs(h-ne)<=glMatrix.EPSILON*Math.max(1,Math.abs(h),Math.abs(ne))}var ho=null,Ll=null;function Gr(){var r=new C(4);return C!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function pi(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=1,r}function Ta(r,e,t){t=t*.5;var n=Math.sin(t);return r[0]=n*e[0],r[1]=n*e[1],r[2]=n*e[2],r[3]=Math.cos(t),r}function Zo(r,e){var t=Math.acos(e[3])*2,n=Math.sin(t/2);return n>glMatrix.EPSILON?(r[0]=e[0]/n,r[1]=e[1]/n,r[2]=e[2]/n):(r[0]=1,r[1]=0,r[2]=0),t}function Sn(r,e){var t=qd(r,e);return Math.acos(2*t*t-1)}function On(r,e,t){var n=e[0],i=e[1],a=e[2],s=e[3],o=t[0],l=t[1],u=t[2],h=t[3];return r[0]=n*h+s*o+i*u-a*l,r[1]=i*h+s*l+a*o-n*u,r[2]=a*h+s*u+n*l-i*o,r[3]=s*h-n*o-i*l-a*u,r}function Ln(r,e,t){t*=.5;var n=e[0],i=e[1],a=e[2],s=e[3],o=Math.sin(t),l=Math.cos(t);return r[0]=n*l+s*o,r[1]=i*l+a*o,r[2]=a*l-i*o,r[3]=s*l-n*o,r}function In(r,e,t){t*=.5;var n=e[0],i=e[1],a=e[2],s=e[3],o=Math.sin(t),l=Math.cos(t);return r[0]=n*l-a*o,r[1]=i*l+s*o,r[2]=a*l+n*o,r[3]=s*l-i*o,r}function pr(r,e,t){t*=.5;var n=e[0],i=e[1],a=e[2],s=e[3],o=Math.sin(t),l=Math.cos(t);return r[0]=n*l+i*o,r[1]=i*l-n*o,r[2]=a*l+s*o,r[3]=s*l-a*o,r}function zr(r,e){var t=e[0],n=e[1],i=e[2];return r[0]=t,r[1]=n,r[2]=i,r[3]=Math.sqrt(Math.abs(1-t*t-n*n-i*i)),r}function rs(r,e){var t=e[0],n=e[1],i=e[2],a=e[3],s=Math.sqrt(t*t+n*n+i*i),o=Math.exp(a),l=s>0?o*Math.sin(s)/s:0;return r[0]=t*l,r[1]=n*l,r[2]=i*l,r[3]=o*Math.cos(s),r}function Va(r,e){var t=e[0],n=e[1],i=e[2],a=e[3],s=Math.sqrt(t*t+n*n+i*i),o=s>0?Math.atan2(s,a)/s:0;return r[0]=t*o,r[1]=n*o,r[2]=i*o,r[3]=.5*Math.log(t*t+n*n+i*i+a*a),r}function js(r,e,t){return Va(r,e),Jd(r,r,t),rs(r,r),r}function oi(r,e,t,n){var i=e[0],a=e[1],s=e[2],o=e[3],l=t[0],u=t[1],h=t[2],p=t[3],S,N,U,H,V;return N=i*l+a*u+s*h+o*p,N<0&&(N=-N,l=-l,u=-u,h=-h,p=-p),1-N>m?(S=Math.acos(N),U=Math.sin(S),H=Math.sin((1-n)*S)/U,V=Math.sin(n*S)/U):(H=1-n,V=n),r[0]=H*i+V*l,r[1]=H*a+V*u,r[2]=H*s+V*h,r[3]=H*o+V*p,r}function Vs(r){var e=glMatrix.RANDOM(),t=glMatrix.RANDOM(),n=glMatrix.RANDOM(),i=Math.sqrt(1-e),a=Math.sqrt(e);return r[0]=i*Math.sin(2*Math.PI*t),r[1]=i*Math.cos(2*Math.PI*t),r[2]=a*Math.sin(2*Math.PI*n),r[3]=a*Math.cos(2*Math.PI*n),r}function is(r,e){var t=e[0],n=e[1],i=e[2],a=e[3],s=t*t+n*n+i*i+a*a,o=s?1/s:0;return r[0]=-t*o,r[1]=-n*o,r[2]=-i*o,r[3]=a*o,r}function Lc(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=e[3],r}function Rc(r,e){var t=e[0]+e[4]+e[8],n;if(t>0)n=Math.sqrt(t+1),r[3]=.5*n,n=.5/n,r[0]=(e[5]-e[7])*n,r[1]=(e[6]-e[2])*n,r[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[i*3+i]&&(i=2);var a=(i+1)%3,s=(i+2)%3;n=Math.sqrt(e[i*3+i]-e[a*3+a]-e[s*3+s]+1),r[i]=.5*n,n=.5/n,r[3]=(e[a*3+s]-e[s*3+a])*n,r[a]=(e[a*3+i]+e[i*3+a])*n,r[s]=(e[s*3+i]+e[i*3+s])*n}return r}function As(r,e,t,n){var i=.5*Math.PI/180;e*=i,t*=i,n*=i;var a=Math.sin(e),s=Math.cos(e),o=Math.sin(t),l=Math.cos(t),u=Math.sin(n),h=Math.cos(n);return r[0]=a*l*h-s*o*u,r[1]=s*o*h+a*l*u,r[2]=s*l*u-a*o*h,r[3]=s*l*h+a*o*u,r}function Ts(r){return"quat("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+")"}var Ic=wt,Qd=Dt,Rl=kt,Zs=Yt,Ap=Wt,Nc=On,Jd=tr,qd=Nt,Tp=Gt,$d=tn,Pp=null,ev=An,tv=null,Il=ir,nv=I,Sp=j,Op=function(){var r=P(),e=f(1,0,0),t=f(0,1,0);return function(n,i,a){var s=Ee(i,a);return s<-.999999?(Ae(r,e,i),$e(r)<1e-6&&Ae(r,t,i),ge(r,r),Ta(n,r,Math.PI),n):s>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(Ae(r,i,a),n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=1+s,Il(n,n))}}(),Dp=function(){var r=Gr(),e=Gr();return function(t,n,i,a,s,o){return oi(r,n,s,o),oi(e,i,a,o),oi(t,r,e,2*o*(1-o)),t}}(),Cp=function(){var r=Tn();return function(e,t,n,i){return r[0]=n[0],r[3]=n[1],r[6]=n[2],r[1]=i[0],r[4]=i[1],r[7]=i[2],r[2]=-t[0],r[5]=-t[1],r[8]=-t[2],Il(e,Rc(e,r))}}();function Nl(){var r=new C(2);return C!=Float32Array&&(r[0]=0,r[1]=0),r}function Bc(r){var e=new glMatrix.ARRAY_TYPE(2);return e[0]=r[0],e[1]=r[1],e}function sr(r,e){var t=new glMatrix.ARRAY_TYPE(2);return t[0]=r,t[1]=e,t}function jn(r,e){return r[0]=e[0],r[1]=e[1],r}function Ki(r,e,t){return r[0]=e,r[1]=t,r}function ra(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function mi(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Ni(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r}function Ps(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r}function as(r,e){return r[0]=Math.ceil(e[0]),r[1]=Math.ceil(e[1]),r}function fo(r,e){return r[0]=Math.floor(e[0]),r[1]=Math.floor(e[1]),r}function Ko(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function vo(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}function Mu(r,e){return r[0]=Math.round(e[0]),r[1]=Math.round(e[1]),r}function Au(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function E8(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function x8(r,e){var t=e[0]-r[0],n=e[1]-r[1];return Math.hypot(t,n)}function b8(r,e){var t=e[0]-r[0],n=e[1]-r[1];return t*t+n*n}function w8(r){var e=r[0],t=r[1];return Math.hypot(e,t)}function M8(r){var e=r[0],t=r[1];return e*e+t*t}function A8(r,e){return r[0]=-e[0],r[1]=-e[1],r}function T8(r,e){return r[0]=1/e[0],r[1]=1/e[1],r}function w2(r,e){var t=e[0],n=e[1],i=t*t+n*n;return i>0&&(i=1/Math.sqrt(i)),r[0]=e[0]*i,r[1]=e[1]*i,r}function M2(r,e){return r[0]*e[0]+r[1]*e[1]}function P8(r,e,t){var n=e[0]*t[1]-e[1]*t[0];return r[0]=r[1]=0,r[2]=n,r}function S8(r,e,t,n){var i=e[0],a=e[1];return r[0]=i+n*(t[0]-i),r[1]=a+n*(t[1]-a),r}function O8(r,e){e=e||1;var t=glMatrix.RANDOM()*2*Math.PI;return r[0]=Math.cos(t)*e,r[1]=Math.sin(t)*e,r}function D8(r,e,t){var n=e[0],i=e[1];return r[0]=t[0]*n+t[2]*i,r[1]=t[1]*n+t[3]*i,r}function C8(r,e,t){var n=e[0],i=e[1];return r[0]=t[0]*n+t[2]*i+t[4],r[1]=t[1]*n+t[3]*i+t[5],r}function L8(r,e,t){var n=e[0],i=e[1];return r[0]=t[0]*n+t[3]*i+t[6],r[1]=t[1]*n+t[4]*i+t[7],r}function R8(r,e,t){var n=e[0],i=e[1];return r[0]=t[0]*n+t[4]*i+t[12],r[1]=t[1]*n+t[5]*i+t[13],r}function I8(r,e,t,n){var i=e[0]-t[0],a=e[1]-t[1],s=Math.sin(n),o=Math.cos(n);return r[0]=i*o-a*s+t[0],r[1]=i*s+a*o+t[1],r}function N8(r,e){var t=r[0],n=r[1],i=e[0],a=e[1],s=Math.sqrt(t*t+n*n)*Math.sqrt(i*i+a*a),o=s&&(t*i+n*a)/s;return Math.acos(Math.min(Math.max(o,-1),1))}function B8(r){return r[0]=0,r[1]=0,r}function k8(r){return"vec2("+r[0]+", "+r[1]+")"}function A2(r,e){return r[0]===e[0]&&r[1]===e[1]}function F8(r,e){var t=r[0],n=r[1],i=e[0],a=e[1];return Math.abs(t-i)<=glMatrix.EPSILON*Math.max(1,Math.abs(t),Math.abs(i))&&Math.abs(n-a)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))}var z8=null,U8=null,W8=null,H8=null,G8=null,j8=null,V8=null,Z8=function(){var r=Nl();return function(e,t,n,i,a,s){var o,l;for(t||(t=2),n||(n=0),i?l=Math.min(i*t+n,e.length):l=e.length,o=n;ot?t:r},Jr=T2,xe=X(80813),Tu={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Lp(r){return Array.isArray(r)&&r.every(function(e){var t=e[0].toLowerCase();return Tu[t]===e.length-1&&"achlmqstvz".includes(t)})}function Rp(r){return Lp(r)&&r.every(function(e){var t=e[0];return t===t.toUpperCase()})}function Ip(r){return Rp(r)&&r.every(function(e){var t=e[0];return"ACLMQZ".includes(t)})}var Np={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Bp(r){for(var e=r.pathValue[r.segmentStart],t=e.toLowerCase(),n=r.data;n.length>=Tu[t]&&(t==="m"&&n.length>2?(r.segments.push([e].concat(n.splice(0,2))),t="l",e=e==="m"?"l":"L"):r.segments.push([e].concat(n.splice(0,Tu[t]))),!!Tu[t]););}function P2(r){var e=r.index,t=r.pathValue,n=t.charCodeAt(e);if(n===48){r.param=0,r.index+=1;return}if(n===49){r.param=1,r.index+=1;return}r.err='[path-util]: invalid Arc flag "'.concat(t[e],'", expecting 0 or 1 at index ').concat(e)}function S2(r){return r>=48&&r<=57||r===43||r===45||r===46}function Bl(r){return r>=48&&r<=57}function O2(r){var e=r.max,t=r.pathValue,n=r.index,i=n,a=!1,s=!1,o=!1,l=!1,u;if(i>=e){r.err="[path-util]: Invalid path value at index ".concat(i,', "pathValue" is missing param');return}if(u=t.charCodeAt(i),(u===43||u===45)&&(i+=1,u=t.charCodeAt(i)),!Bl(u)&&u!==46){r.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(t[i],'" is not a number');return}if(u!==46){if(a=u===48,i+=1,u=t.charCodeAt(i),a&&i=5760&&e.includes(r)}function kc(r){for(var e=r.pathValue,t=r.max;r.index0;s-=1){if(L2(i)&&(s===3||s===4)?P2(r):O2(r),r.err.length)return;r.data.push(r.param),kc(r),r.index=r.max||!S2(t.charCodeAt(r.index)))break}Bp(r)}var I2=function(){function r(e){this.pathValue=e,this.segments=[],this.max=e.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return r}();function N2(r){if(Lp(r))return[].concat(r);var e=new I2(r);for(kc(e);e.index=a)s={x:t,y:n};else{var o=go([r,e],[t,n],i/a),l=o[0],u=o[1];s={x:l,y:u}}return{length:a,point:s,min:{x:Math.min(r,t),y:Math.min(e,n)},max:{x:Math.max(r,t),y:Math.max(e,n)}}}function kp(r,e){var t=r.x,n=r.y,i=e.x,a=e.y,s=t*i+n*a,o=Math.sqrt((Math.pow(t,2)+Math.pow(n,2))*(Math.pow(i,2)+Math.pow(a,2))),l=t*a-n*i<0?-1:1,u=l*Math.acos(s/o);return u}function F2(r,e,t,n,i,a,s,o,l,u){var h=Math.abs,p=Math.sin,S=Math.cos,N=Math.sqrt,U=Math.PI,H=h(t),V=h(n),Y=(i%360+360)%360,q=Y*(U/180);if(r===o&&e===l)return{x:r,y:e};if(H===0||V===0)return rv(r,e,o,l,u).point;var ne=(r-o)/2,le=(e-l)/2,ue={x:S(q)*ne+p(q)*le,y:-p(q)*ne+S(q)*le},fe=Math.pow(ue.x,2)/Math.pow(H,2)+Math.pow(ue.y,2)/Math.pow(V,2);fe>1&&(H*=N(fe),V*=N(fe));var de=Math.pow(H,2)*Math.pow(V,2)-Math.pow(H,2)*Math.pow(ue.y,2)-Math.pow(V,2)*Math.pow(ue.x,2),ve=Math.pow(H,2)*Math.pow(ue.y,2)+Math.pow(V,2)*Math.pow(ue.x,2),Te=de/ve;Te=Te<0?0:Te;var Oe=(a!==s?1:-1)*N(Te),Ie={x:Oe*(H*ue.y/V),y:Oe*(-(V*ue.x)/H)},ze={x:S(q)*Ie.x-p(q)*Ie.y+(r+o)/2,y:p(q)*Ie.x+S(q)*Ie.y+(e+l)/2},Xe={x:(ue.x-Ie.x)/H,y:(ue.y-Ie.y)/V},et=kp({x:1,y:0},Xe),st={x:(-ue.x-Ie.x)/H,y:(-ue.y-Ie.y)/V},bt=kp(Xe,st);!s&&bt>0?bt-=2*U:s&&bt<0&&(bt+=2*U),bt%=2*U;var _t=et+bt*u,ct=H*S(_t),ft=V*p(_t),At={x:S(q)*ct-p(q)*ft+ze.x,y:p(q)*ct+S(q)*ft+ze.y};return At}function z2(r,e,t,n,i,a,s,o,l,u,h){var p,S=h.bbox,N=S===void 0?!0:S,U=h.length,H=U===void 0?!0:U,V=h.sampleSize,Y=V===void 0?30:V,q=typeof u=="number",ne=r,le=e,ue=0,fe=[ne,le,ue],de=[ne,le],ve=0,Te={x:0,y:0},Oe=[{x:ne,y:le}];q&&u<=0&&(Te={x:ne,y:le});for(var Ie=0;Ie<=Y;Ie+=1){if(ve=Ie/Y,p=F2(r,e,t,n,i,a,s,o,l,ve),ne=p.x,le=p.y,N&&Oe.push({x:ne,y:le}),H&&(ue+=da(de,[ne,le])),de=[ne,le],q&&ue>=u&&u>fe[2]){var ze=(ue-u)/(ue-fe[2]);Te={x:de[0]*(1-ze)+fe[0]*ze,y:de[1]*(1-ze)+fe[1]*ze}}fe=[ne,le,ue]}return q&&u>=ue&&(Te={x:o,y:l}),{length:ue,point:Te,min:{x:Math.min.apply(null,Oe.map(function(Xe){return Xe.x})),y:Math.min.apply(null,Oe.map(function(Xe){return Xe.y}))},max:{x:Math.max.apply(null,Oe.map(function(Xe){return Xe.x})),y:Math.max.apply(null,Oe.map(function(Xe){return Xe.y}))}}}function U2(r,e,t,n,i,a,s,o,l){var u=1-l;return{x:Math.pow(u,3)*r+3*Math.pow(u,2)*l*t+3*u*Math.pow(l,2)*i+Math.pow(l,3)*s,y:Math.pow(u,3)*e+3*Math.pow(u,2)*l*n+3*u*Math.pow(l,2)*a+Math.pow(l,3)*o}}function Fp(r,e,t,n,i,a,s,o,l,u){var h,p=u.bbox,S=p===void 0?!0:p,N=u.length,U=N===void 0?!0:N,H=u.sampleSize,V=H===void 0?10:H,Y=typeof l=="number",q=r,ne=e,le=0,ue=[q,ne,le],fe=[q,ne],de=0,ve={x:0,y:0},Te=[{x:q,y:ne}];Y&&l<=0&&(ve={x:q,y:ne});for(var Oe=0;Oe<=V;Oe+=1){if(de=Oe/V,h=U2(r,e,t,n,i,a,s,o,de),q=h.x,ne=h.y,S&&Te.push({x:q,y:ne}),U&&(le+=da(fe,[q,ne])),fe=[q,ne],Y&&le>=l&&l>ue[2]){var Ie=(le-l)/(le-ue[2]);ve={x:fe[0]*(1-Ie)+ue[0]*Ie,y:fe[1]*(1-Ie)+ue[1]*Ie}}ue=[q,ne,le]}return Y&&l>=le&&(ve={x:s,y:o}),{length:le,point:ve,min:{x:Math.min.apply(null,Te.map(function(ze){return ze.x})),y:Math.min.apply(null,Te.map(function(ze){return ze.y}))},max:{x:Math.max.apply(null,Te.map(function(ze){return ze.x})),y:Math.max.apply(null,Te.map(function(ze){return ze.y}))}}}function W2(r,e,t,n,i,a,s){var o=1-s;return{x:Math.pow(o,2)*r+2*o*s*t+Math.pow(s,2)*i,y:Math.pow(o,2)*e+2*o*s*n+Math.pow(s,2)*a}}function H2(r,e,t,n,i,a,s,o){var l,u=o.bbox,h=u===void 0?!0:u,p=o.length,S=p===void 0?!0:p,N=o.sampleSize,U=N===void 0?10:N,H=typeof s=="number",V=r,Y=e,q=0,ne=[V,Y,q],le=[V,Y],ue=0,fe={x:0,y:0},de=[{x:V,y:Y}];H&&s<=0&&(fe={x:V,y:Y});for(var ve=0;ve<=U;ve+=1){if(ue=ve/U,l=W2(r,e,t,n,i,a,ue),V=l.x,Y=l.y,h&&de.push({x:V,y:Y}),S&&(q+=da(le,[V,Y])),le=[V,Y],H&&q>=s&&s>ne[2]){var Te=(q-s)/(q-ne[2]);fe={x:le[0]*(1-Te)+ne[0]*Te,y:le[1]*(1-Te)+ne[1]*Te}}ne=[V,Y,q]}return H&&s>=q&&(fe={x:i,y:a}),{length:q,point:fe,min:{x:Math.min.apply(null,de.map(function(Oe){return Oe.x})),y:Math.min.apply(null,de.map(function(Oe){return Oe.y}))},max:{x:Math.max.apply(null,de.map(function(Oe){return Oe.x})),y:Math.max.apply(null,de.map(function(Oe){return Oe.y}))}}}function zp(r,e,t){for(var n,i,a,s,o,l,u=Fc(r),h=typeof e=="number",p,S=[],N,U=0,H=0,V=0,Y=0,q,ne=[],le=[],ue=0,fe={x:0,y:0},de=fe,ve=fe,Te=fe,Oe=0,Ie=0,ze=u.length;Ie=e&&(Te=ve),le.push(de),ne.push(fe),Oe+=ue,l=N!=="Z"?q.slice(-2):[V,Y],U=l[0],H=l[1];return h&&e>=Oe&&(Te={x:U,y:H}),{length:Oe,point:Te,min:{x:Math.min.apply(null,ne.map(function(Xe){return Xe.x})),y:Math.min.apply(null,ne.map(function(Xe){return Xe.y}))},max:{x:Math.max.apply(null,le.map(function(Xe){return Xe.x})),y:Math.max.apply(null,le.map(function(Xe){return Xe.y}))}}}function G2(r,e){return zp(r,void 0,(0,xe.pi)((0,xe.pi)({},e),{bbox:!1,length:!0})).length}function va(r){return Array.isArray(r)}var zc=function(r){if(va(r))return r.reduce(function(e,t){return Math.min(e,t)},r[0])};function Uc(r){if(!Array.isArray(r))return-1/0;var e=r.length;if(!e)return-1/0;for(var t=r[0],n=1;n7){r[t].shift();for(var n=r[t],i=t;n.length;)e[t]="A",r.splice(i+=1,0,["C"].concat(n.splice(0,6)));r.splice(t,1)}}function K2(r){return Ip(r)&&r.every(function(e){var t=e[0];return"MC".includes(t)})}function Wc(r,e,t){var n=r*Math.cos(t)-e*Math.sin(t),i=r*Math.sin(t)+e*Math.cos(t);return{x:n,y:i}}function iv(r,e,t,n,i,a,s,o,l,u){var h=r,p=e,S=t,N=n,U=o,H=l,V=Math.PI*120/180,Y=Math.PI/180*(+i||0),q=[],ne,le,ue,fe,de;if(u)le=u[0],ue=u[1],fe=u[2],de=u[3];else{ne=Wc(h,p,-Y),h=ne.x,p=ne.y,ne=Wc(U,H,-Y),U=ne.x,H=ne.y;var ve=(h-U)/2,Te=(p-H)/2,Oe=ve*ve/(S*S)+Te*Te/(N*N);Oe>1&&(Oe=Math.sqrt(Oe),S*=Oe,N*=Oe);var Ie=S*S,ze=N*N,Xe=(a===s?-1:1)*Math.sqrt(Math.abs((Ie*ze-Ie*Te*Te-ze*ve*ve)/(Ie*Te*Te+ze*ve*ve)));fe=Xe*S*Te/N+(h+U)/2,de=Xe*-N*ve/S+(p+H)/2,le=Math.asin(((p-de)/N*Math.pow(10,9)>>0)/Math.pow(10,9)),ue=Math.asin(((H-de)/N*Math.pow(10,9)>>0)/Math.pow(10,9)),le=hue&&(le-=Math.PI*2),!s&&ue>le&&(ue-=Math.PI*2)}var et=ue-le;if(Math.abs(et)>V){var st=ue,bt=U,_t=H;ue=le+V*(s&&ue>le?1:-1),U=fe+S*Math.cos(ue),H=de+N*Math.sin(ue),q=iv(U,H,S,N,i,0,s,bt,_t,[ue,st,fe,de])}et=ue-le;var ct=Math.cos(le),ft=Math.sin(le),At=Math.cos(ue),Ft=Math.sin(ue),Vt=Math.tan(et/4),nn=4/3*S*Vt,hn=4/3*N*Vt,rn=[h,p],bn=[h+nn*ft,p-hn*ct],Dn=[U+nn*Ft,H-hn*At],kn=[U,H];if(bn[0]=2*rn[0]-bn[0],bn[1]=2*rn[1]-bn[1],u)return bn.concat(Dn,kn,q);q=bn.concat(Dn,kn,q);for(var $n=[],or=0,$i=q.length;or<$i;or+=1)$n[or]=or%2?Wc(q[or-1],q[or],Y).y:Wc(q[or],q[or+1],Y).x;return $n}function X2(r,e,t,n,i,a){var s=.3333333333333333,o=2/3;return[s*r+o*t,s*e+o*n,s*i+o*t,s*a+o*n,i,a]}var Wp=function(r,e,t,n){var i=.5,a=go([r,e],[t,n],i);return(0,xe.ev)((0,xe.ev)([],a,!0),[t,n,t,n],!1)};function Y2(r,e){var t=r[0],n=r.slice(1).map(Number),i=n[0],a=n[1],s,o=e.x1,l=e.y1,u=e.x,h=e.y;switch("TQ".includes(t)||(e.qx=null,e.qy=null),t){case"M":return e.x=i,e.y=a,r;case"A":return s=[o,l].concat(n),["C"].concat(iv(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=i,e.qy=a,s=[o,l].concat(n),["C"].concat(X2(s[0],s[1],s[2],s[3],s[4],s[5]));case"L":return["C"].concat(Wp(o,l,i,a));case"Z":return o===u&&l===h?["C",o,l,u,h,u,h]:["C"].concat(Wp(o,l,u,h));default:}return r}function av(r,e){if(e===void 0&&(e=!1),K2(r)){var t=[].concat(r);return e?[t,[]]:t}for(var n=Fc(r),i=(0,xe.pi)({},Np),a=[],s="",o=n.length,l,u,h=[],p=0;p=S[Y],N[Y]-=U?1:0,U?q.ss:[q.s]}).flat()});return H[0].length===H[1].length?H:Gp(H[0],H[1],p)}function J2(r,e,t,n,i,a,s,o){return 3*((o-e)*(t+i)-(s-r)*(n+a)+n*(r-i)-t*(e-a)+o*(i+r/3)-s*(a+e/3))/20}function q2(r){var e=0,t=0,n=0;return av(r).map(function(i){var a;switch(i[0]){case"M":return e=i[1],t=i[2],0;default:var s=i.slice(1),o=s[0],l=s[1],u=s[2],h=s[3],p=s[4],S=s[5];return n=J2(e,t,o,l,u,h,p,S),a=i.slice(-2),e=a[0],t=a[1],n}}).reduce(function(i,a){return i+a},0)}function jp(r){return q2(r)>=0}function $2(r){var e=r.slice(1).map(function(t,n,i){return n?i[n-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(n,i){return t[t.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))}function ew(r){return r.map(function(e){return Array.isArray(e)?[].concat(e):e})}function tw(r){var e=r.length,t=e-1;return r.map(function(n,i){return r.map(function(a,s){var o=i+s,l;return s===0||r[o]&&r[o][0]==="M"?(l=r[o],["M"].concat(l.slice(-2))):(o>=e&&(o-=t),r[o])})})}function nw(r,e){var t=r.length-1,n=[],i=0,a=0,s=tw(r);return s.forEach(function(o,l){r.slice(1).forEach(function(u,h){a+=da(r[(l+h)%t].slice(-2),e[h%t].slice(-2))}),n[l]=a,a=0}),i=n.indexOf(Math.min.apply(null,n)),s[i]}var rw=function(r){return r===void 0},Bn=rw,iw={}.toString,aw=function(r,e){return iw.call(r)==="[object "+e+"]"},Vp=aw,sw=function(r){return Vp(r,"Boolean")},Su=sw;function yn(r){return typeof r=="function"}var li=function(r){var e=typeof r;return r!==null&&e==="object"||e==="function"};function ow(r,e,t){return zp(r,e,(0,xe.pi)((0,xe.pi)({},t),{bbox:!1,length:!0})).point}var fn=X(4635),Zp=X(92359);function lw(r,e){for(;!{}.hasOwnProperty.call(r,e)&&(r=(0,Zp.Z)(r))!==null;);return r}function sv(){return sv=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,e,t){var n=lw(r,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?r:t):i.value}},sv.apply(null,arguments)}function Kp(r,e,t,n){var i=sv((0,Zp.Z)(1&n?r.prototype:r),e,t);return 2&n&&typeof i=="function"?function(a){return i.apply(t,a)}:i}function Xi(r,e,t,n){var i=r-t,a=e-n;return Math.sqrt(i*i+a*a)}function Hc(r,e){var t=Math.min.apply(Math,(0,w.Z)(r)),n=Math.min.apply(Math,(0,w.Z)(e)),i=Math.max.apply(Math,(0,w.Z)(r)),a=Math.max.apply(Math,(0,w.Z)(e));return{x:t,y:n,width:i-t,height:a-n}}function Xp(r){return(r+Math.PI*2)%(Math.PI*2)}function Yp(r,e){var t=Math.abs(r);return e>0?t:t*-1}function uw(r,e,t,n,i,a){var s=t,o=n;if(s===0||o===0)return{x:r,y:e};for(var l=i-r,u=a-e,h=Math.abs(l),p=Math.abs(u),S=s*s,N=o*o,U=Math.PI/4,H=0,V=0,Y=0;Y<4;Y++){H=s*Math.cos(U),V=o*Math.sin(U);var q=(S-N)*Math.pow(Math.cos(U),3)/s,ne=(N-S)*Math.pow(Math.sin(U),3)/o,le=H-q,ue=V-ne,fe=h-q,de=p-ne,ve=Math.hypot(ue,le),Te=Math.hypot(de,fe),Oe=ve*Math.asin((le*de-ue*fe)/(ve*Te)),Ie=Oe/Math.sqrt(S+N-H*H-V*V);U+=Ie,U=Math.min(Math.PI/2,Math.max(0,U))}return{x:r+Yp(H,l),y:e+Yp(V,u)}}function cw(r,e,t,n,i,a,s,o){return-1*t*Math.cos(i)*Math.sin(o)-n*Math.sin(i)*Math.cos(o)}function hw(r,e,t,n,i,a,s,o){return-1*t*Math.sin(i)*Math.sin(o)+n*Math.cos(i)*Math.cos(o)}function fw(r,e,t){return Math.atan(-e/r*Math.tan(t))}function dw(r,e,t){return Math.atan(e/(r*Math.tan(t)))}function vw(r,e,t,n,i,a){return t*Math.cos(i)*Math.cos(a)-n*Math.sin(i)*Math.sin(a)+r}function gw(r,e,t,n,i,a){return t*Math.sin(i)*Math.cos(a)+n*Math.cos(i)*Math.sin(a)+e}function pw(r,e,t,n){var i=Math.atan2(n*r,t*e);return(i+Math.PI*2)%(Math.PI*2)}function Qp(r,e,t){return{x:r*Math.cos(t),y:e*Math.sin(t)}}function Jp(r,e,t){var n=Math.cos(t),i=Math.sin(t);return[r*n-e*i,r*i+e*n]}function mw(r,e,t,n,i,a,s){for(var o=fw(t,n,i),l=1/0,u=-1/0,h=[a,s],p=-Math.PI*2;p<=Math.PI*2;p+=Math.PI){var S=o+p;au&&(u=U)}for(var H=dw(t,n,i),V=1/0,Y=-1/0,q=[a,s],ne=-Math.PI*2;ne<=Math.PI*2;ne+=Math.PI){var le=H+ne;aY&&(Y=fe)}return{x:l,y:V,width:u-l,height:Y-V}}function K8(r,e,t,n,i,a,s,o,l){var u=Jp(o-r,l-e,-i),h=_slicedToArray(u,2),p=h[0],S=h[1],N=uw(0,0,t,n,p,S),U=pw(t,n,N.x,N.y);Us&&(N=Qp(t,n,s));var H=Jp(N.x,N.y,i);return{x:H[0]+r,y:H[1]+e}}function X8(r,e,t,n,i,a,s,o){var l=(s-a)*o+a,u=cw(r,e,t,n,i,a,s,l),h=hw(r,e,t,n,i,a,s,l);return Xp(Math.atan2(h,u))}var yw=1e-4;function qp(r,e,t,n,i,a){var s=-1,o=1/0,l=[t,n],u=20;a&&a>200&&(u=a/10);for(var h=1/u,p=h/10,S=0;S<=u;S++){var N=S*h,U=[i.apply(void 0,(0,w.Z)(r.concat([N]))),i.apply(void 0,(0,w.Z)(e.concat([N])))],H=Xi(l[0],l[1],U[0],U[1]);H=0&&ueo?Xi(t,n,i,a):em(r,e,t,n,i,a)}function em(r,e,t,n,i,a){var s=[t-r,n-e];if(A2(s,[0,0]))return Math.sqrt((i-r)*(i-r)+(a-e)*(a-e));var o=[-s[1],s[0]];w2(o,o);var l=[i-r,a-e];return Math.abs(M2(l,o))}function Q8(r,e,t,n){return Math.atan2(n-e,t-r)}function Xo(r,e,t,n,i){var a=1-i;return a*a*a*r+3*e*i*a*a+3*t*i*i*a+n*i*i*i}function tm(r,e,t,n,i){var a=1-i;return 3*(a*a*(e-r)+2*a*i*(t-e)+i*i*(n-t))}function nm(r,e,t,n){var i=-3*r+9*e-9*t+3*n,a=6*r-12*e+6*t,s=3*e-3*r,o=[],l,u,h;if(Pu(i,0))Pu(a,0)||(l=-s/a,l>=0&&l<=1&&o.push(l));else{var p=a*a-4*i*s;Pu(p,0)?o.push(-a/(2*i)):p>0&&(h=Math.sqrt(p),l=(-a+h)/(2*i),u=(-a-h)/(2*i),l>=0&&l<=1&&o.push(l),u>=0&&u<=1&&o.push(u))}return o}function xw(r,e,t,n,i,a,s,o,l){var u=Xo(r,t,i,s,l),h=Xo(e,n,a,o,l),p=Ss(r,e,t,n,l),S=Ss(t,n,i,a,l),N=Ss(i,a,s,o,l),U=Ss(p.x,p.y,S.x,S.y,l),H=Ss(S.x,S.y,N.x,N.y,l);return[[r,e,p.x,p.y,U.x,U.y,u,h],[u,h,H.x,H.y,N.x,N.y,s,o]]}function ov(r,e,t,n,i,a,s,o,l){if(l===0)return _w([r,t,i,s],[e,n,a,o]);var u=xw(r,e,t,n,i,a,s,o,.5),h=[].concat(_toConsumableArray(u[0]),[l-1]),p=[].concat(_toConsumableArray(u[1]),[l-1]);return ov.apply(void 0,_toConsumableArray(h))+ov.apply(void 0,_toConsumableArray(p))}function bw(r,e,t,n,i,a,s,o){for(var l=[r,s],u=[e,o],h=nm(r,t,i,s),p=nm(e,n,a,o),S=0;S1||e<0||r.length<2)return null;var t=im(r),n=t.segments,i=t.totalLength;if(i===0)return{x:r[0][0],y:r[0][1]};for(var a=0,s=null,o=0;o=a&&e<=a+p){var S=(e-a)/p;s=Ss(u[0],u[1],h[0],h[1],S);break}a+=p}return s}function om(r,e){if(e>1||e<0||r.length<2)return 0;for(var t=im(r),n=t.segments,i=t.totalLength,a=0,s=0,o=0;o=a&&e<=a+p){s=Math.atan2(h[1]-u[1],h[0]-u[0]);break}a+=p}return s}function lm(r,e,t){for(var n=1/0,i=0;i=0?[i]:[]}function Tw(r,e,t,n,i,a,s){var o=Ou(r,t,i,s),l=Ou(e,n,a,s),u=Ss(r,e,t,n,s),h=Ss(t,n,i,a,s);return[[r,e,u.x,u.y,o,l],[o,l,h.x,h.y,i,a]]}function lv(r,e,t,n,i,a,s){if(s===0)return(Xi(r,e,t,n)+Xi(t,n,i,a)+Xi(r,e,i,a))/2;var o=Tw(r,e,t,n,i,a,.5),l=o[0],u=o[1];return l.push(s-1),u.push(s-1),lv.apply(void 0,_toConsumableArray(l))+lv.apply(void 0,_toConsumableArray(u))}function Pw(r,e,t,n,i,a){var s=um(r,t,i)[0],o=um(e,n,a)[0],l=[r,i],u=[e,a];return s!==void 0&&l.push(Ou(r,t,i,s)),o!==void 0&&u.push(Ou(e,n,a,o)),Hc(l,u)}function l6(r,e,t,n,i,a){return lv(r,e,t,n,i,a,3)}function Sw(r,e,t,n,i,a,s,o){return qp([r,t,i],[e,n,a],s,o,Ou)}function Ow(r,e,t,n,i,a,s,o){var l=Sw(r,e,t,n,i,a,s,o);return Xi(l.x,l.y,s,o)}var Yi=X(70539),po=X(95764),Yo=X(37530),Qo=X(62646);var Dw=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof X.g!="undefined"?X.g:typeof self!="undefined"?self:{},cm={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(Dw,function(){function t(ue,fe,de,ve,Te){n(ue,fe,de||0,ve||ue.length-1,Te||a)}function n(ue,fe,de,ve,Te){for(;ve>de;){if(ve-de>600){var Oe=ve-de+1,Ie=fe-de+1,ze=Math.log(Oe),Xe=.5*Math.exp(2*ze/3),et=.5*Math.sqrt(ze*Xe*(Oe-Xe)/Oe)*(Ie-Oe/2<0?-1:1),st=Math.max(de,Math.floor(fe-Ie*Xe/Oe+et)),bt=Math.min(ve,Math.floor(fe+(Oe-Ie)*Xe/Oe+et));n(ue,fe,st,bt,Te)}var _t=ue[fe],ct=de,ft=ve;for(i(ue,de,fe),Te(ue[ve],_t)>0&&i(ue,de,ve);ct0;)ft--}Te(ue[de],_t)===0?i(ue,de,ft):(ft++,i(ue,ft,ve)),ft<=fe&&(de=ft+1),fe<=ft&&(ve=ft-1)}}function i(ue,fe,de){var ve=ue[fe];ue[fe]=ue[de],ue[de]=ve}function a(ue,fe){return uefe?1:0}var s=function(fe){fe===void 0&&(fe=9),this._maxEntries=Math.max(4,fe),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(fe){var de=this.data,ve=[];if(!q(fe,de))return ve;for(var Te=this.toBBox,Oe=[];de;){for(var Ie=0;Ie=0&&Oe[de].children.length>this._maxEntries;)this._split(Oe,de),de--;this._adjustParentBBoxes(Te,Oe,de)},s.prototype._split=function(fe,de){var ve=fe[de],Te=ve.children.length,Oe=this._minEntries;this._chooseSplitAxis(ve,Oe,Te);var Ie=this._chooseSplitIndex(ve,Oe,Te),ze=ne(ve.children.splice(Ie,ve.children.length-Ie));ze.height=ve.height,ze.leaf=ve.leaf,l(ve,this.toBBox),l(ze,this.toBBox),de?fe[de-1].children.push(ze):this._splitRoot(ve,ze)},s.prototype._splitRoot=function(fe,de){this.data=ne([fe,de]),this.data.height=fe.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(fe,de,ve){for(var Te,Oe=1/0,Ie=1/0,ze=de;ze<=ve-de;ze++){var Xe=u(fe,0,ze,this.toBBox),et=u(fe,ze,ve,this.toBBox),st=V(Xe,et),bt=N(Xe)+N(et);st=de;bt--){var _t=fe.children[bt];h(ze,fe.leaf?Oe(_t):_t),Xe+=U(ze)}return Xe},s.prototype._adjustParentBBoxes=function(fe,de,ve){for(var Te=ve;Te>=0;Te--)h(de[Te],fe)},s.prototype._condense=function(fe){for(var de=fe.length-1,ve=void 0;de>=0;de--)fe[de].children.length===0?de>0?(ve=fe[de-1].children,ve.splice(ve.indexOf(fe[de]),1)):this.clear():l(fe[de],this.toBBox)};function o(ue,fe,de){if(!de)return fe.indexOf(ue);for(var ve=0;ve=ue.minX&&fe.maxY>=ue.minY}function ne(ue){return{children:ue,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function le(ue,fe,de,ve,Te){for(var Oe=[fe,de];Oe.length;)if(de=Oe.pop(),fe=Oe.pop(),!(de-fe<=ve)){var Ie=fe+Math.ceil((de-fe)/ve/2)*ve;t(ue,Ie,fe,de,Te),Oe.push(fe,Ie,Ie,de)}}return s})})(cm);var Cw=cm.exports,Ct=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),jc=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),mo=function(){function r(){(0,_.Z)(this,r),this.plugins=[]}return(0,F.Z)(r,[{key:"addRenderingPlugin",value:function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)}},{key:"removeAllRenderingPlugins",value:function(){var t=this;this.plugins.forEach(function(n){var i=t.context.renderingPlugins.indexOf(n);i>=0&&t.context.renderingPlugins.splice(i,1)})}}])}(),Lw=function(){function r(e){(0,_.Z)(this,r),this.clipSpaceNearZ=jc.NEGATIVE_ONE,this.plugins=[],this.config=(0,G.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},e)}return(0,F.Z)(r,[{key:"registerPlugin",value:function(t){var n=this.plugins.findIndex(function(i){return i===t});n===-1&&this.plugins.push(t)}},{key:"unregisterPlugin",value:function(t){var n=this.plugins.findIndex(function(i){return i===t});n>-1&&this.plugins.splice(n,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(t){return this.plugins.find(function(n){return n.name===t})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(t){Object.assign(this.config,t)}}])}(),uv=k,kl=D,Rw=ie,Iw=$,hm=re,cv=Pe,Nr=function(){function r(){(0,_.Z)(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,F.Z)(r,[{key:"update",value:function(t,n){kl(this.center,t),kl(this.halfExtents,n),cv(this.min,this.center,this.halfExtents),uv(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(t,n){uv(this.center,n,t),hm(this.center,this.center,.5),cv(this.halfExtents,n,t),hm(this.halfExtents,this.halfExtents,.5),kl(this.min,t),kl(this.max,n)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(t){if(!r.isEmpty(t)){if(r.isEmpty(this)){this.setMinMax(t.getMin(),t.getMax());return}var n=this.center,i=n[0],a=n[1],s=n[2],o=this.halfExtents,l=o[0],u=o[1],h=o[2],p=i-l,S=i+l,N=a-u,U=a+u,H=s-h,V=s+h,Y=t.center,q=Y[0],ne=Y[1],le=Y[2],ue=t.halfExtents,fe=ue[0],de=ue[1],ve=ue[2],Te=q-fe,Oe=q+fe,Ie=ne-de,ze=ne+de,Xe=le-ve,et=le+ve;TeS&&(S=Oe),IeU&&(U=ze),XeV&&(V=et),n[0]=(p+S)*.5,n[1]=(N+U)*.5,n[2]=(H+V)*.5,o[0]=(S-p)*.5,o[1]=(U-N)*.5,o[2]=(V-H)*.5,this.min[0]=p,this.min[1]=N,this.min[2]=H,this.max[0]=S,this.max[1]=U,this.max[2]=V}}},{key:"setFromTransformedAABB",value:function(t,n){var i=this.center,a=this.halfExtents,s=t.center,o=t.halfExtents,l=n[0],u=n[4],h=n[8],p=n[1],S=n[5],N=n[9],U=n[2],H=n[6],V=n[10],Y=Math.abs(l),q=Math.abs(u),ne=Math.abs(h),le=Math.abs(p),ue=Math.abs(S),fe=Math.abs(N),de=Math.abs(U),ve=Math.abs(H),Te=Math.abs(V);i[0]=n[12]+l*s[0]+u*s[1]+h*s[2],i[1]=n[13]+p*s[0]+S*s[1]+N*s[2],i[2]=n[14]+U*s[0]+H*s[1]+V*s[2],a[0]=Y*o[0]+q*o[1]+ne*o[2],a[1]=le*o[0]+ue*o[1]+fe*o[2],a[2]=de*o[0]+ve*o[1]+Te*o[2],cv(this.min,i,a),uv(this.max,i,a)}},{key:"intersects",value:function(t){var n=this.getMax(),i=this.getMin(),a=t.getMax(),s=t.getMin();return i[0]<=a[0]&&n[0]>=s[0]&&i[1]<=a[1]&&n[1]>=s[1]&&i[2]<=a[2]&&n[2]>=s[2]}},{key:"intersection",value:function(t){if(!this.intersects(t))return null;var n=new r,i=Rw([0,0,0],this.getMin(),t.getMin()),a=Iw([0,0,0],this.getMax(),t.getMax());return n.setMinMax(i,a),n}},{key:"getNegativeFarPoint",value:function(t){return t.pnVertexFlag===273?kl([0,0,0],this.min):t.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:t.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:t.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:t.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:t.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:t.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(t){return t.pnVertexFlag===273?kl([0,0,0],this.max):t.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:t.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:t.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:t.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:t.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:t.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(t){return!t||t.halfExtents[0]===0&&t.halfExtents[1]===0&&t.halfExtents[2]===0}}])}(),Nw=function(){function r(e,t){(0,_.Z)(this,r),this.distance=e||0,this.normal=t||f(0,1,0),this.updatePNVertexFlag()}return(0,F.Z)(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(t){return Ee(t,this.normal)-this.distance}},{key:"normalize",value:function(){var t=1/$e(this.normal);re(this.normal,this.normal,t),this.distance*=t}},{key:"intersectsLine",value:function(t,n,i){var a=this.distanceToPoint(t),s=this.distanceToPoint(n),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&Fe(i,t,n,o),l}}])}(),Fl=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),Bw=function(){function r(e){if((0,_.Z)(this,r),this.planes=[],e)this.planes=e;else for(var t=0;t<6;t++)this.planes.push(new Nw)}return(0,F.Z)(r,[{key:"extractFromVPMatrix",value:function(t){var n=(0,b.Z)(t,16),i=n[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],h=n[6],p=n[7],S=n[8],N=n[9],U=n[10],H=n[11],V=n[12],Y=n[13],q=n[14],ne=n[15];R(this.planes[0].normal,o-i,p-l,H-S),this.planes[0].distance=ne-V,R(this.planes[1].normal,o+i,p+l,H+S),this.planes[1].distance=ne+V,R(this.planes[2].normal,o+a,p+u,H+N),this.planes[2].distance=ne+Y,R(this.planes[3].normal,o-a,p-u,H-N),this.planes[3].distance=ne-Y,R(this.planes[4].normal,o-s,p-h,H-U),this.planes[4].distance=ne-q,R(this.planes[5].normal,o+s,p+h,H+U),this.planes[5].distance=ne+q,this.planes.forEach(function(le){le.normalize(),le.updatePNVertexFlag()})}}])}(),Bi=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;(0,_.Z)(this,r),this.x=0,this.y=0,this.x=e,this.y=t}return(0,F.Z)(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(t){this.x=t.x,this.y=t.y}}])}(),zl=function(){function r(e,t,n,i){(0,_.Z)(this,r),this.x=e,this.y=t,this.width=n,this.height=i,this.left=e,this.right=e+n,this.top=t,this.bottom=t+i}return(0,F.Z)(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(t){return new r(t.x,t.y,t.width,t.height)}},{key:"applyTransform",value:function(t,n){var i=Dt(t.x,t.y,0,1),a=Dt(t.x+t.width,t.y,0,1),s=Dt(t.x,t.y+t.height,0,1),o=Dt(t.x+t.width,t.y+t.height,0,1),l=xt(),u=xt(),h=xt(),p=xt();En(l,i,n),En(u,a,n),En(h,s,n),En(p,o,n);var S=Math.min(l[0],u[0],h[0],p[0]),N=Math.min(l[1],u[1],h[1],p[1]),U=Math.max(l[0],u[0],h[0],p[0]),H=Math.max(l[1],u[1],h[1],p[1]);return r.fromRect({x:S,y:N,width:U-S,height:H-N})}}])}(),Ar="Method not implemented.",Ul="Use document.documentElement instead.",kw="Cannot append a destroyed element.";function Wl(r){return r===void 0?0:r>360||r<-360?r%360:r}var hv=P();function ia(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?n?L(r):D(hv,r):un(r)?n?f(r,e,t):R(hv,r,e,t):n?f(r[0],r[1]||e,r[2]||t):R(hv,r[0],r[1]||e,r[2]||t)}var Fw=Math.PI/180;function Tr(r){return r*Fw}var zw=180/Math.PI;function ga(r){return r*zw}var Uw=.9;function u6(r){return r%=400,r<0&&(r+=400),r*Uw}function c6(r){return r/360}function Ww(r){return 360*r}var Vc=Math.PI/2;function Hw(r,e){var t=e[0],n=e[1],i=e[2],a=e[3],s=t*t,o=n*n,l=i*i,u=a*a,h=s+o+l+u,p=t*a-n*i;return p>.499995*h?(r[0]=Vc,r[1]=2*Math.atan2(n,t),r[2]=0):p<-.499995*h?(r[0]=-Vc,r[1]=2*Math.atan2(n,t),r[2]=0):(r[0]=Math.asin(2*(t*i-a*n)),r[1]=Math.atan2(2*(t*a+n*i),1-2*(l+u)),r[2]=Math.atan2(2*(t*n+i*a),1-2*(o+l))),r}function Gw(r,e){var t,n,i=pn(P(),e),a=(0,b.Z)(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-e[2]/s);return u-Vc?(t=Math.atan2(e[6]/o,e[10]/l),n=Math.atan2(e[1]/s,e[0]/s)):(n=0,t=-Math.atan2(e[4]/o,e[5]/o)):(n=0,t=Math.atan2(e[4]/o,e[5]/o)),r[0]=t,r[1]=u,r[2]=n,r}function fv(r,e){return e.length===16?Gw(r,e):Hw(r,e)}function jw(r,e,t,n,i){var a=Math.cos(r),s=Math.sin(r);return gi(n*a,i*s,0,-n*s,i*a,0,e,t,1)}function Vw(r,e,t,n,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=t-e,h=n-i,p=l/u,S=l/h,N=(t+e)/u,U=(n+i)/h,H,V,Y=s-a,q=s*a;return o?(H=-s/Y,V=-q/Y):(H=-(s+a)/Y,V=-2*q/Y),r[0]=p,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=S,r[6]=0,r[7]=0,r[8]=N,r[9]=U,r[10]=H,r[11]=-1,r[12]=0,r[13]=0,r[14]=V,r[15]=0,r}function fm(r){var e=r[0],t=r[1],n=r[3],i=r[4],a=Math.sqrt(e*e+t*t),s=Math.sqrt(n*n+i*i),o=e*i-t*n;if(o<0&&(eNn[1][2]&&(a[0]=-a[0]),Nn[0][2]>Nn[2][0]&&(a[1]=-a[1]),Nn[1][0]>Nn[0][1]&&(a[2]=-a[2]),!0}function Kw(r,e){var t=e[15];if(t===0)return!1;for(var n=1/t,i=0;i<16;i++)r[i]=e[i]*n;return!0}function Xw(r,e){r[0][0]=e[0],r[0][1]=e[1],r[0][2]=e[2],r[1][0]=e[4],r[1][1]=e[5],r[1][2]=e[6],r[2][0]=e[8],r[2][1]=e[9],r[2][2]=e[10]}function dv(r,e,t,n,i){r[0]=e[0]*n+t[0]*i,r[1]=e[1]*n+t[1]*i,r[2]=e[2]*n+t[2]*i}var Pr=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),vv=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),Za=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),vm={UPDATED:"updated"},gm=2e-4,pm=function(){function r(){(0,_.Z)(this,r),this.clipSpaceNearZ=jc.NEGATIVE_ONE,this.eventEmitter=new g,this.matrix=De(),this.right=f(1,0,0),this.up=f(0,1,0),this.forward=f(0,0,1),this.position=f(0,0,1),this.focalPoint=f(0,0,0),this.distanceVector=f(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=De(),this.projectionMatrixInverse=De(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Pr.EXPLORING,this.trackingMode=vv.DEFAULT,this.projectionMode=Za.PERSPECTIVE,this.frustum=new Bw,this.orthoMatrix=De()}return(0,F.Z)(r,[{key:"isOrtho",value:function(){return this.projectionMode===Za.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(t){this.enableUpdate=t}},{key:"setType",value:function(t,n){return this.type=t,this.type===Pr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Pr.TRACKING&&n!==void 0&&this.setTrackingMode(n),this}},{key:"setProjectionMode",value:function(t){return this.projectionMode=t,this}},{key:"setTrackingMode",value:function(t){if(this.type!==Pr.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this}},{key:"setWorldRotation",value:function(t){return this.rotateWorld=t,this._getAngles(),this}},{key:"getViewTransform",value:function(){return mt(De(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(t,n){var i=on(De(),[t,n,0]);this.jitteredProjectionMatrix=vt(De(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(t){return this.matrix=t,this._update(),this}},{key:"setProjectionMatrix",value:function(t){this.projectionMatrix=t}},{key:"setFov",value:function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this}},{key:"setAspect",value:function(t){return this.setPerspective(this.near,this.far,this.fov,t),this}},{key:"setNear",value:function(t){return this.projectionMode===Za.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this}},{key:"setFar",value:function(t){return this.projectionMode===Za.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this}},{key:"setViewOffset",value:function(t,n,i,a,s,o){return this.aspect=t/n,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===Za.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===Za.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(t){return this.zoom=t,this.projectionMode===Za.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Za.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(t,n){var i=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(t),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),u=l.x,h=l.y,p=f(u-a,h-s,0),S=Ee(p,this.right)/c(this.right),N=Ee(p,this.up)/c(this.up),U=this.getPosition(),H=(0,b.Z)(U,2),V=H[0],Y=H[1],q=this.getFocalPoint(),ne=(0,b.Z)(q,2),le=ne[0],ue=ne[1];return this.setPosition(V-S,Y-N),this.setFocalPoint(le-S,ue-N),this}},{key:"setPerspective",value:function(t,n,i,a){var s;this.projectionMode=Za.PERSPECTIVE,this.fov=i,this.near=t,this.far=n,this.aspect=a;var o=this.near*Math.tan(Tr(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,h=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var p=this.view.fullWidth,S=this.view.fullHeight;h+=this.view.offsetX*u/p,o-=this.view.offsetY*l/S,u*=this.view.width/p,l*=this.view.height/S}return Vw(this.projectionMatrix,h,h+u,o-l,o,t,this.far,this.clipSpaceNearZ===jc.ZERO),mt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(t,n,i,a,s,o){var l;this.projectionMode=Za.ORTHOGRAPHIC,this.rright=n,this.left=t,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),h=(this.top-this.bottom)/(2*this.zoom),p=(this.rright+this.left)/2,S=(this.top+this.bottom)/2,N=p-u,U=p+u,H=S+h,V=S-h;if((l=this.view)!==null&&l!==void 0&&l.enabled){var Y=(this.rright-this.left)/this.view.fullWidth/this.zoom,q=(this.top-this.bottom)/this.view.fullHeight/this.zoom;N+=Y*this.view.offsetX,U=N+Y*this.view.width,H-=q*this.view.offsetY,V=H-q*this.view.height}return this.clipSpaceNearZ===jc.NEGATIVE_ONE?Fr(this.projectionMatrix,N,U,H,V,s,o):ei(this.projectionMatrix,N,U,H,V,s,o),mt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=ia(t,n,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=f(0,1,0);if(this.focalPoint=ia(t,n,i),this.trackingMode===vv.CINEMATIC){var s=W(P(),this.focalPoint,this.position);t=s[0],n=s[1],i=s[2];var o=c(s),l=ga(Math.asin(n/o)),u=90+ga(Math.atan2(i,t)),h=De();Pt(h,h,Tr(u)),gt(h,h,Tr(l)),a=qe(P(),[0,1,0],h)}return mt(this.matrix,ti(De(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?Yc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?Yc(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Jw.exec(r))?new pa(e[1],e[2],e[3],1):(e=qw.exec(r))?new pa(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=$w.exec(r))?Yc(e[1],e[2],e[3],e[4]):(e=eM.exec(r))?Yc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=tM.exec(r))?Am(e[1],e[2]/100,e[3]/100,1):(e=nM.exec(r))?Am(e[1],e[2]/100,e[3]/100,e[4]):_m.hasOwnProperty(r)?bm(_m[r]):r==="transparent"?new pa(NaN,NaN,NaN,0):null}function bm(r){return new pa(r>>16&255,r>>8&255,r&255,1)}function Yc(r,e,t,n){return n<=0&&(r=e=t=NaN),new pa(r,e,t,n)}function aM(r){return r instanceof Cu||(r=Xc(r)),r?(r=r.rgb(),new pa(r.r,r.g,r.b,r.opacity)):new pa}function sM(r,e,t,n){return arguments.length===1?aM(r):new pa(r,e,t,n==null?1:n)}function pa(r,e,t,n){this.r=+r,this.g=+e,this.b=+t,this.opacity=+n}gv(pa,sM,ym(Cu,{brighter(r){return r=r==null?Kc:Math.pow(Kc,r),new pa(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Lu:Math.pow(Lu,r),new pa(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new pa(Jo(this.r),Jo(this.g),Jo(this.b),Qc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wm,formatHex:wm,formatHex8:oM,formatRgb:Mm,toString:Mm}));function wm(){return`#${qo(this.r)}${qo(this.g)}${qo(this.b)}`}function oM(){return`#${qo(this.r)}${qo(this.g)}${qo(this.b)}${qo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mm(){const r=Qc(this.opacity);return`${r===1?"rgb(":"rgba("}${Jo(this.r)}, ${Jo(this.g)}, ${Jo(this.b)}${r===1?")":`, ${r})`}`}function Qc(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Jo(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function qo(r){return r=Jo(r),(r<16?"0":"")+r.toString(16)}function Am(r,e,t,n){return n<=0?r=e=t=NaN:t<=0||t>=1?r=e=NaN:e<=0&&(r=NaN),new os(r,e,t,n)}function Tm(r){if(r instanceof os)return new os(r.h,r.s,r.l,r.opacity);if(r instanceof Cu||(r=Xc(r)),!r)return new os;if(r instanceof os)return r;r=r.rgb();var e=r.r/255,t=r.g/255,n=r.b/255,i=Math.min(e,t,n),a=Math.max(e,t,n),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(t-n)/o+(t0&&l<1?0:s,new os(s,o,l,r.opacity)}function lM(r,e,t,n){return arguments.length===1?Tm(r):new os(r,e,t,n==null?1:n)}function os(r,e,t,n){this.h=+r,this.s=+e,this.l=+t,this.opacity=+n}gv(os,lM,ym(Cu,{brighter(r){return r=r==null?Kc:Math.pow(Kc,r),new os(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Lu:Math.pow(Lu,r),new os(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*e,i=2*t-n;return new pa(pv(r>=240?r-240:r+120,i,n),pv(r,i,n),pv(r<120?r+240:r-120,i,n),this.opacity)},clamp(){return new os(Pm(this.h),Jc(this.s),Jc(this.l),Qc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=Qc(this.opacity);return`${r===1?"hsl(":"hsla("}${Pm(this.h)}, ${Jc(this.s)*100}%, ${Jc(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Pm(r){return r=(r||0)%360,r<0?r+360:r}function Jc(r){return Math.max(0,Math.min(1,r||0))}function pv(r,e,t){return(r<60?e+(t-e)*r/60:r<180?t:r<240?e+(t-e)*(240-r)/60:e)*255}function yi(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var t=function(){for(var i=arguments.length,a=new Array(i),s=0;s=Gl.kUnitType&&this.getType()<=Gl.kClampType}}],[{key:"isAngle",value:function(t){return t===$t.kDegrees||t===$t.kRadians||t===$t.kGradians||t===$t.kTurns}},{key:"isLength",value:function(t){return t>=$t.kEms&&t<$t.kDegrees}},{key:"isRelativeUnit",value:function(t){return t===$t.kPercentage||t===$t.kEms||t===$t.kRems}},{key:"isTime",value:function(t){return t===$t.kSeconds||t===$t.kMilliseconds}}])}(),pM=function(r){function e(t){var n;return(0,_.Z)(this,e),n=(0,x.Z)(this,e),n.colorSpace=t,n}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"getType",value:function(){return Gl.kColorType}},{key:"to",value:function(n){return this}}])}(qc),yo=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),$c=function(r){function e(t,n){var i;return(0,_.Z)(this,e),i=(0,x.Z)(this,e),i.type=t,i.value=n,i}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"clone",value:function(){return new e(this.type,this.value)}},{key:"buildCSSText",value:function(n,i,a){return a}},{key:"getType",value:function(){return Gl.kColorType}}])}(qc),Ka=function(r){function e(t){var n;return(0,_.Z)(this,e),n=(0,x.Z)(this,e),n.value=t,n}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"clone",value:function(){return new e(this.value)}},{key:"getType",value:function(){return Gl.kKeywordType}},{key:"buildCSSText",value:function(n,i,a){return a+this.value}}])}(qc),mM=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n="";return Number.isFinite(e)?n="NaN":e>0?n="infinity":n="-infinity",n+=t},yv=function(e){return gM(vM(e))},Sr=function(r){function e(t){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$t.kNumber;(0,_.Z)(this,e),n=(0,x.Z)(this,e);var a;return typeof i=="string"?a=dM(i):a=i,n.unit=a,n.value=t,n}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"clone",value:function(){return new e(this.value,this.unit)}},{key:"equals",value:function(n){var i=n;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return Gl.kUnitType}},{key:"convertTo",value:function(n){if(this.unit===n)return new e(this.value,this.unit);var i=yv(this.unit);if(i!==yv(n)||i===$t.kUnknown)return null;var a=Sm(this.unit)/Sm(n);return new e(this.value*a,n)}},{key:"buildCSSText",value:function(n,i,a){var s;switch(this.unit){case $t.kUnknown:break;case $t.kInteger:s=Number(this.value).toFixed(0);break;case $t.kNumber:case $t.kPercentage:case $t.kEms:case $t.kRems:case $t.kPixels:case $t.kDegrees:case $t.kRadians:case $t.kGradians:case $t.kMilliseconds:case $t.kSeconds:case $t.kTurns:{var o=-999999,l=999999,u=this.value,h=mv(this.unit);if(ul){var p=mv(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=mM(u,p):s=u+(p||"")}else s="".concat(u).concat(h)}}return a+=s,a}}])}(qc),us=new Sr(0,"px");new Sr(1,"px");var $o=new Sr(0,"deg"),_v=function(r){function e(t,n,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return(0,_.Z)(this,e),a=(0,x.Z)(this,e,["rgb"]),a.r=t,a.g=n,a.b=i,a.alpha=s,a.isNone=o,a}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"clone",value:function(){return new e(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(n,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(pM),Om=new Ka("unset"),yM=new Ka("initial"),_M=new Ka("inherit"),Ev={"":Om,unset:Om,initial:yM,inherit:_M},EM=function(e){return Ev[e]||(Ev[e]=new Ka(e)),Ev[e]},Dm=new _v(0,0,0,0,!0),Cm=new _v(0,0,0,0),xM=yi(function(r,e,t,n){return new _v(r,e,t,n)},function(r,e,t,n){return"rgba(".concat(r,",").concat(e,",").concat(t,",").concat(n,")")}),jr=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$t.kNumber;return new Sr(e,t)};new Sr(50,"%");function bM(r){var e=r.type,t=r.value;return e==="hex"?"#".concat(t):e==="literal"?t:e==="rgb"?"rgb(".concat(t.join(","),")"):"rgba(".concat(t.join(","),")")}var wM=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function t(_t){throw new Error("".concat(e,": ").concat(_t))}function n(){var _t=i();return e.length>0&&t("Invalid input not EOF"),_t}function i(){return ne(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,p)||s("repeating-radial-gradient",r.repeatingRadialGradient,p)||s("conic-gradient",r.conicGradient,p)}function s(_t,ct,ft){return o(ct,function(At){var Ft=ft();return Ft&&(st(r.comma)||t("Missing comma before color stops")),{type:_t,orientation:Ft,colorStops:ne(le)}})}function o(_t,ct){var ft=st(_t);if(ft){st(r.startCall)||t("Missing (");var At=ct(ft);return st(r.endCall)||t("Missing )"),At}}function l(){return u()||h()}function u(){return et("directional",r.sideOrCorner,1)}function h(){return et("angular",r.angleValue,1)}function p(){var _t,ct=S(),ft;return ct&&(_t=[],_t.push(ct),ft=e,st(r.comma)&&(ct=S(),ct?_t.push(ct):e=ft)),_t}function S(){var _t=N()||U();if(_t)_t.at=V();else{var ct=H();if(ct){_t=ct;var ft=V();ft&&(_t.at=ft)}else{var At=Y();At&&(_t={type:"default-radial",at:At})}}return _t}function N(){var _t=et("shape",/^(circle)/i,0);return _t&&(_t.style=Xe()||H()),_t}function U(){var _t=et("shape",/^(ellipse)/i,0);return _t&&(_t.style=Ie()||H()),_t}function H(){return et("extent-keyword",r.extentKeywords,1)}function V(){if(et("position",/^at/,0)){var _t=Y();return _t||t("Missing positioning value"),_t}}function Y(){var _t=q();if(_t.x||_t.y)return{type:"position",value:_t}}function q(){return{x:Ie(),y:Ie()}}function ne(_t){var ct=_t(),ft=[];if(ct)for(ft.push(ct);st(r.comma);)ct=_t(),ct?ft.push(ct):t("One extra comma");return ft}function le(){var _t=ue();return _t||t("Expected color definition"),_t.length=Ie(),_t}function ue(){return de()||Te()||ve()||fe()}function fe(){return et("literal",r.literalColor,0)}function de(){return et("hex",r.hexColor,1)}function ve(){return o(r.rgbColor,function(){return{type:"rgb",value:ne(Oe)}})}function Te(){return o(r.rgbaColor,function(){return{type:"rgba",value:ne(Oe)}})}function Oe(){return st(r.number)[1]}function Ie(){return et("%",r.percentageValue,1)||ze()||Xe()}function ze(){return et("position-keyword",r.positionKeywords,1)}function Xe(){return et("px",r.pixelValue,1)||et("em",r.emValue,1)}function et(_t,ct,ft){var At=st(ct);if(At)return{type:_t,value:At[ft]}}function st(_t){var ct=/^[\n\r\t\s]+/.exec(e);ct&&bt(ct[0].length);var ft=_t.exec(e);return ft&&bt(ft[0].length),ft}function bt(_t){e=e.substring(_t)}return function(_t){return e=_t,n()}}();function MM(r,e,t,n){var i=Tr(n.value),a=0,s=0,o=a+e/2,l=s+t/2,u=Math.abs(e*Math.cos(i))+Math.abs(t*Math.sin(i)),h=r[0]+o-Math.cos(i)*u/2,p=r[1]+l-Math.sin(i)*u/2,S=r[0]+o+Math.cos(i)*u/2,N=r[1]+l+Math.sin(i)*u/2;return{x1:h,y1:p,x2:S,y2:N}}function AM(r,e,t,n,i,a){var s=n.value,o=i.value;n.unit===$t.kPercentage&&(s=n.value/100*e),i.unit===$t.kPercentage&&(o=i.value/100*t);var l=Math.max(da([0,0],[s,o]),da([0,t],[s,o]),da([e,t],[s,o]),da([e,0],[s,o]));return a&&(a instanceof Sr?l=a.value:a instanceof Ka&&(a.value==="closest-side"?l=Math.min(s,e-s,o,t-o):a.value==="farthest-side"?l=Math.max(s,e-s,o,t-o):a.value==="closest-corner"&&(l=Math.min(da([0,0],[s,o]),da([0,t],[s,o]),da([e,t],[s,o]),da([e,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var TM=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,PM=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,SM=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Lm=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function OM(r){var e,t=r.length;if(r[t-1].length=(e=r[t-1].length)!==null&&e!==void 0?e:{type:"%",value:"100"},t>1){var n;r[0].length=(n=r[0].length)!==null&&n!==void 0?n:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s-1||r.indexOf("radial")>-1){var e=wM(r);return e.map(function(o){var l=o.type,u=o.orientation,h=o.colorStops;OM(h);var p=h.map(function(ne){return{offset:jr(Number(ne.length.value),"%"),color:bM(ne)}});if(l==="linear-gradient")return new $c(yo.LinearGradient,{angle:u?CM(u):$o,steps:p});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var S=LM(u[0].at),N=S.cx,U=S.cy,H;if(u[0].style){var V=u[0].style,Y=V.type,q=V.value;Y==="extent-keyword"?H=EM(q):H=jr(q,Y)}return new $c(yo.RadialGradient,{cx:N,cy:U,size:H,steps:p})}})}var t=r[0];if(r[1]==="("||r[2]==="("){if(t==="l"){var n=TM.exec(r);if(n){var i,a=((i=n[2].match(Lm))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new $c(yo.LinearGradient,{angle:jr(parseFloat(n[1]),"deg"),steps:a.map(function(o){var l=(0,b.Z)(o,2),u=l[0],h=l[1];return{offset:jr(Number(u)*100,"%"),color:h}})})]}}else if(t==="r"){var s=IM(r);if(s)if(ur(s))r=s;else return[new $c(yo.RadialGradient,s)]}else if(t==="p")return NM(r)}});function IM(r){var e=PM.exec(r);if(e){var t,n=((t=e[4].match(Lm))===null||t===void 0?void 0:t.map(function(i){return i.split(":")}))||[];return{cx:jr(50,"%"),cy:jr(50,"%"),steps:n.map(function(i){var a=(0,b.Z)(i,2),s=a[0],o=a[1];return{offset:jr(Number(s)*100,"%"),color:o}})}}return null}function NM(r){var e=SM.exec(r);if(e){var t=e[1],n=e[2];switch(t){case"a":t="repeat";break;case"x":t="repeat-x";break;case"y":t="repeat-y";break;case"n":t="no-repeat";break;default:t="no-repeat"}return{image:n,repetition:t}}return null}function h6(r){return!!r.type&&!!r.value}function el(r){return r&&!!r.image}function eh(r){return r&&!Pn(r.r)&&!Pn(r.g)&&!Pn(r.b)}var Iu=yi(function(r){if(el(r))return(0,G.Z)({repetition:"repeat"},r);if(Pn(r)&&(r=""),r==="transparent")return Cm;if(r==="currentColor")r="black";else if(r==="none")return Dm;var e=RM(r);if(e)return e;var t=Xc(r),n=[0,0,0,0];return t!==null&&(n[0]=t.r||0,n[1]=t.g||0,n[2]=t.b||0,n[3]=t.opacity),xM.apply(void 0,n)});function BM(r,e){if(!(!eh(r)||!eh(e)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var n=t.slice();if(n[3])for(var i=0;i<3;i++)n[i]=Math.round(Jr(n[i],0,255));return n[3]=Jr(n[3],0,1),"rgba(".concat(n.join(","),")")}]}function Nu(r,e){if(Pn(e))return jr(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(r)>=0)return jr(Number(e),"px");if("deg".search(r)>=0)return jr(Number(e),"deg")}var t=[];e=e.replace(r,function(i){return t.push(i),"U".concat(i)});var n="U(".concat(r.source,")");return t.map(function(i){return jr(Number(e.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(n,"g"),"*0")),i)})[0]}var Rm=function(e){return Nu(new RegExp("px","g"),e)},kM=yi(Rm),FM=function(e){return Nu(new RegExp("%","g"),e)};yi(FM);var Im=function(e){return un(e)||isFinite(Number(e))?jr(Number(e)||0,"px"):Nu(new RegExp("px|%|em|rem","g"),e)},xv=yi(Im),Nm=function(e){return Nu(new RegExp("deg|rad|grad|turn","g"),e)},zM=yi(Nm);function UM(r,e,t,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=e.value||0,l=yv(r.unit),u=r.convertTo(l),h=e.convertTo(l);return u&&h?(s=u.value,o=h.value,a=mv(r.unit)):(Sr.isLength(r.unit)||Sr.isLength(e.unit))&&(s=Pa(r,i,t),o=Pa(e,i,t),a="px"),[s,o,function(p){return n&&(p=Math.max(p,0)),p+a}]}function ma(r){var e=0;return r.unit===$t.kDegrees?e=r.value:r.unit===$t.kRadians?e=ga(Number(r.value)):r.unit===$t.kTurns?e=Ww(Number(r.value)):r.value&&(e=r.value),e}function Bm(r,e){var t;return Array.isArray(r)?t=r.map(function(n){return Number(n)}):ur(r)?t=r.split(" ").map(function(n){return Number(n)}):un(r)&&(t=[r]),e===2?t.length===1?[t[0],t[0]]:[t[0],t[1]]:e===4?t.length===1?[t[0],t[0],t[0],t[0]]:t.length===2?[t[0],t[1],t[0],t[1]]:t.length===3?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]]:e==="even"&&t.length%2===1?[].concat((0,w.Z)(t),(0,w.Z)(t)):t}function Pa(r,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===$t.kPixels)return Number(r.value);if(r.unit===$t.kPercentage&&t){var i=t.nodeName===Ct.GROUP?t.getLocalBounds():t.getGeometryBounds();return(n?i.min[e]:0)+r.value/100*i.halfExtents[e]*2}return 0}var WM=function(e){return Nu(/deg|rad|grad|turn|px|%/g,e)},HM=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function GM(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var e=/\s*([\w-]+)\(([^)]*)\)/g,t=[],n,i=0;n=e.exec(r);){if(n.index!==i)return[];if(i=n.index+n[0].length,HM.indexOf(n[1])>-1&&t.push({name:n[1],params:n[2].split(" ").map(function(a){return WM(a)||Iu(a)})}),e.lastIndex===r.length)return t}return[]}function km(r){return r.toString()}var Fm=function(e){return typeof e=="number"?jr(e):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(e)?jr(Number(e)):jr(0)},bv=yi(Fm);yi(function(r){return ur(r)?r.split(" ").map(bv):r.map(bv)});function wv(r,e){return[r,e,km]}function Mv(r,e){return function(t,n){return[t,n,function(i){return km(Jr(i,r,e))}]}}function zm(r,e){if(r.length===e.length)return[r,e,function(t){return t}]}function Av(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=G2(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function jM(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=Aw(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function VM(r){for(var e=0;e0&&t.push(n),{polygons:e,polylines:t}}function th(r,e){return r[0]===e[0]&&r[1]===e[1]}function XM(r,e){for(var t=[],n=[],i=[],a=0;aMath.PI/2?Math.PI-u:u,h=h>Math.PI/2?Math.PI-h:h;var p={xExtra:Math.cos(l/2-u)*(e/2*(1/Math.sin(l/2)))-e/2||0,yExtra:Math.cos(h-l/2)*(e/2*(1/Math.sin(l/2)))-e/2||0};return p}function Um(r,e){return[e[0]+(e[0]-r[0]),e[1]+(e[1]-r[1])]}var Wm=function(e,t){var n=e.x*t.x+e.y*t.y,i=Math.sqrt((Math.pow(e.x,2)+Math.pow(e.y,2))*(Math.pow(t.x,2)+Math.pow(t.y,2))),a=e.x*t.y-e.y*t.x<0?-1:1,s=a*Math.acos(n/i);return s},Hm=function(e,t,n,i,a,s,o,l){t=Math.abs(t),n=Math.abs(n),i=Up(i,360);var u=Tr(i);if(e.x===o.x&&e.y===o.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(t===0||n===0)return{x:0,y:0,ellipticalArcAngle:0};var h=(e.x-o.x)/2,p=(e.y-o.y)/2,S={x:Math.cos(u)*h+Math.sin(u)*p,y:-Math.sin(u)*h+Math.cos(u)*p},N=Math.pow(S.x,2)/Math.pow(t,2)+Math.pow(S.y,2)/Math.pow(n,2);N>1&&(t*=Math.sqrt(N),n*=Math.sqrt(N));var U=Math.pow(t,2)*Math.pow(n,2)-Math.pow(t,2)*Math.pow(S.y,2)-Math.pow(n,2)*Math.pow(S.x,2),H=Math.pow(t,2)*Math.pow(S.y,2)+Math.pow(n,2)*Math.pow(S.x,2),V=U/H;V=V<0?0:V;var Y=(a!==s?1:-1)*Math.sqrt(V),q={x:Y*(t*S.y/n),y:Y*(-(n*S.x)/t)},ne={x:Math.cos(u)*q.x-Math.sin(u)*q.y+(e.x+o.x)/2,y:Math.sin(u)*q.x+Math.cos(u)*q.y+(e.y+o.y)/2},le={x:(S.x-q.x)/t,y:(S.y-q.y)/n},ue=Wm({x:1,y:0},le),fe={x:(-S.x-q.x)/t,y:(-S.y-q.y)/n},de=Wm(le,fe);!s&&de>0?de-=2*Math.PI:s&&de<0&&(de+=2*Math.PI),de%=2*Math.PI;var ve=ue+de*l,Te=t*Math.cos(ve),Oe=n*Math.sin(ve),Ie={x:Math.cos(u)*Te-Math.sin(u)*Oe+ne.x,y:Math.sin(u)*Te+Math.cos(u)*Oe+ne.y,ellipticalArcStartAngle:ue,ellipticalArcEndAngle:ue+de,ellipticalArcAngle:ve,ellipticalArcCenter:ne,resultantRx:t,resultantRy:n};return Ie};function YM(r){for(var e=[],t=null,n=null,i=null,a=0,s=r.length,o=0;o2&&arguments[2]!==void 0?arguments[2]:!0,n=r.arcParams,i=n.rx,a=i===void 0?0:i,s=n.ry,o=s===void 0?0:s,l=n.xRotation,u=n.arcFlag,h=n.sweepFlag,p=Hm({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!h,{x:r.currentPoint[0],y:r.currentPoint[1]},e),S=Hm({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!h,{x:r.currentPoint[0],y:r.currentPoint[1]},t?e+.005:e-.005),N=S.x-p.x,U=S.y-p.y,H=Math.sqrt(N*N+U*U);return{x:-N/H,y:-U/H}}function rh(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Tv(r,e){return rh(r)*rh(e)?(r[0]*e[0]+r[1]*e[1])/(rh(r)*rh(e)):1}function jm(r,e){return(r[0]*e[1]1&&(t*=Math.sqrt(N),n*=Math.sqrt(N));var U=t*t*(S*S)+n*n*(p*p),H=U?Math.sqrt((t*t*(n*n)-U)/U):1;a===s&&(H*=-1),isNaN(H)&&(H=0);var V=n?H*t*S/n:0,Y=t?H*-n*p/t:0,q=(o+u)/2+Math.cos(i)*V-Math.sin(i)*Y,ne=(l+h)/2+Math.sin(i)*V+Math.cos(i)*Y,le=[(p-V)/t,(S-Y)/n],ue=[(-1*p-V)/t,(-1*S-Y)/n],fe=jm([1,0],le),de=jm(le,ue);return Tv(le,ue)<=-1&&(de=Math.PI),Tv(le,ue)>=1&&(de=0),s===0&&de>0&&(de-=2*Math.PI),s===1&&de<0&&(de+=2*Math.PI),{cx:q,cy:ne,rx:th(r,[u,h])?0:t,ry:th(r,[u,h])?0:n,startAngle:fe,endAngle:fe+de,xRotation:i,arcFlag:a,sweepFlag:s}}function JM(r,e,t){return r.reduce(function(n,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);t&&vec3.transformMat4(s,s,t),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);t&&(vec3.transformMat4(o,o,t),vec3.transformMat4(l,l,t),vec3.transformMat4(u,u,t)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var h=vec3.fromValues(i[6],i[7],0);t&&vec3.transformMat4(h,h,t),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(h[0],",").concat(h[1])}else if(i[0]==="Q"){var p=vec3.fromValues(i[1],i[2],0),S=vec3.fromValues(i[3],i[4],0);t&&(vec3.transformMat4(p,p,t),vec3.transformMat4(S,S,t)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return n+=a},"")}function qM(r,e,t,n){return[["M",r,e],["L",t,n]]}function Vm(r,e,t,n){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=e*i,o=t-r,l=t+r,u=n-e,h=n+e;return[["M",o,n],["C",o,n-s,t-a,u,t,u],["C",t+a,u,l,n-s,l,n],["C",l,n+s,t+a,h,t,h],["C",t-a,h,o,n+s,o,n],["Z"]]}function $M(r,e){var t=r.map(function(n,i){return[i===0?"M":"L",n[0],n[1]]});return e&&t.push(["Z"]),t}function eA(r,e,t,n,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],h=r>0?1:-1,p=e>0?1:-1,S=h+p!==0?1:0;return[["M",h*s+t,n],["L",r-h*o+t,n],o?["A",o,o,0,0,S,r+t,p*o+n]:null,["L",r+t,e-p*l+n],l?["A",l,l,0,0,S,r+t-h*l,e+n]:null,["L",t+h*u,e+n],u?["A",u,u,0,0,S,t,e+n-p*u]:null,["L",t,p*s+n],s?["A",s,s,0,0,S,h*s+t,n]:null,["Z"]].filter(function(N){return N})}return[["M",t,n],["L",t+r,n],["L",t+r,n+e],["L",t,n+e],["Z"]]}function f6(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),t=[];switch(r.nodeName){case Ct.LINE:var n=r.parsedStyle,i=n.x1,a=i===void 0?0:i,s=n.y1,o=s===void 0?0:s,l=n.x2,u=l===void 0?0:l,h=n.y2,p=h===void 0?0:h;t=qM(a,o,u,p);break;case Ct.CIRCLE:{var S=r.parsedStyle,N=S.r,U=N===void 0?0:N,H=S.cx,V=H===void 0?0:H,Y=S.cy,q=Y===void 0?0:Y;t=Vm(U,U,V,q);break}case Ct.ELLIPSE:{var ne=r.parsedStyle,le=ne.rx,ue=le===void 0?0:le,fe=ne.ry,de=fe===void 0?0:fe,ve=ne.cx,Te=ve===void 0?0:ve,Oe=ne.cy,Ie=Oe===void 0?0:Oe;t=Vm(ue,de,Te,Ie);break}case Ct.POLYLINE:case Ct.POLYGON:var ze=r.parsedStyle.points;t=$M(ze.points,r.nodeName===Ct.POLYGON);break;case Ct.RECT:var Xe=r.parsedStyle,et=Xe.width,st=et===void 0?0:et,bt=Xe.height,_t=bt===void 0?0:bt,ct=Xe.x,ft=ct===void 0?0:ct,At=Xe.y,Ft=At===void 0?0:At,Vt=Xe.radius,nn=Vt&&Vt.some(function(rn){return rn!==0});t=eA(st,_t,ft,Ft,nn&&Vt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(st)/2,Math.abs(_t)/2))}));break;case Ct.PATH:var hn=r.parsedStyle.d.absolutePath;t=_toConsumableArray(hn);break}if(t.length)return JM(t,r,e)}function d6(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],h=o===0&&(e!==0||t!==0),p=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&n!==0&&i!==0,S=h?[e,t]:[0,0],N=_slicedToArray(S,2),U=N[0],H=N[1],V=p?[n,i]:[0,0],Y=_slicedToArray(V,2),q=Y[0],ne=Y[1];switch(l){case"M":return"M ".concat(s[1]+U,",").concat(s[2]+H);case"L":return"L ".concat(s[1]+q,",").concat(s[2]+ne);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+q," ").concat(s[4]+ne);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+q," ").concat(s[6]+ne);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]," ").concat(s[7]).concat(p?" L ".concat(s[6]+n,",").concat(s[7]+i):"");case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var Zm=function(e){if(e===""||Array.isArray(e)&&e.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var t;try{t=Fc(e)}catch(N){t=Fc(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}VM(t);var n=ZM(t),i=KM(t),a=i.polygons,s=i.polylines,o=YM(t),l=XM(o,0),u=l.x,h=l.y,p=l.width,S=l.height;return{absolutePath:t,hasArc:n,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(h)?h:0,width:Number.isFinite(p)?p:0,height:Number.isFinite(S)?S:0}}},tA=yi(Zm);function Km(r){return ur(r)?tA(r):Zm(r)}function nA(r,e,t){var n=r.curve,i=e.curve;(!n||n.length===0)&&(n=av(r.absolutePath,!1),r.curve=n),(!i||i.length===0)&&(i=av(e.absolutePath,!1),e.curve=i);var a=[n,i];n.length!==i.length&&(a=Gp(n,i));var s=jp(a[0])!==jp(a[1])?$2(a[0]):ew(a[0]);return[s,nw(a[1],s),function(o){return o}]}function rA(r,e){var t;return ur(r)?t=r.split(" ").map(function(n){var i=n.split(","),a=(0,b.Z)(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):t=r,{points:t,totalLength:0,segments:[]}}function iA(r,e){return[r.points,e.points,function(t){return t}]}var qr=null,jl=/\s*(\w+)\(([^)]*)\)/g;function ya(r){return function(e){var t=0;return r.map(function(n){return n===qr?e[t++]:n})}}function tl(r){return r}var Bu={matrix:["NNNNNN",[qr,qr,0,0,qr,qr,0,0,0,0,1,0,qr,qr,0,1],tl],matrix3d:["NNNNNNNNNNNNNNNN",tl],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ya([qr,qr,new Sr(1)]),tl],scaleX:["N",ya([qr,new Sr(1),new Sr(1)]),ya([qr,new Sr(1)])],scaleY:["N",ya([new Sr(1),qr,new Sr(1)]),ya([new Sr(1),qr])],scaleZ:["N",ya([new Sr(1),new Sr(1),qr])],scale3d:["NNN",tl],skew:["Aa",null,tl],skewX:["A",null,ya([qr,$o])],skewY:["A",null,ya([$o,qr])],translate:["Tt",ya([qr,qr,us]),tl],translateX:["T",ya([qr,us,us]),ya([qr,us])],translateY:["T",ya([us,qr,us]),ya([us,qr])],translateZ:["L",ya([us,us,qr])],translate3d:["TTL",tl]};function Xm(r){for(var e=[],t=r.length,n=0;n2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(t.attributes,n);var a=t.parsedStyle.clipPath,s=t.parsedStyle.offsetPath;yA(t,n);var o=!!i.forceUpdateGeometry;if(!o){for(var l in n)if(pA.has(l)){o=!0;break}}var u=$m(t);u.has("fill")&&n.fill&&(t.parsedStyle.fill=Iu(n.fill)),u.has("stroke")&&n.stroke&&(t.parsedStyle.stroke=Iu(n.stroke)),u.has("shadowColor")&&n.shadowColor&&(t.parsedStyle.shadowColor=Iu(n.shadowColor)),u.has("filter")&&n.filter&&(t.parsedStyle.filter=GM(n.filter)),u.has("radius")&&!Pn(n.radius)&&(t.parsedStyle.radius=Bm(n.radius,4)),u.has("lineDash")&&!Pn(n.lineDash)&&(t.parsedStyle.lineDash=Bm(n.lineDash,"even")),u.has("points")&&n.points&&(t.parsedStyle.points=rA(n.points)),u.has("d")&&n.d===""&&(t.parsedStyle.d=(0,G.Z)({},mm)),u.has("d")&&n.d&&(t.parsedStyle.d=Km(n.d)),u.has("textTransform")&&n.textTransform&&this.runtime.CSSPropertySyntaxFactory[qt.TEXT_TRANSFORM].calculator(null,null,{value:n.textTransform},t,null),u.has("clipPath")&&!Bn(n.clipPath)&&this.runtime.CSSPropertySyntaxFactory[qt.DEFINED_PATH].calculator("clipPath",a,n.clipPath,t,this.runtime),u.has("offsetPath")&&n.offsetPath&&this.runtime.CSSPropertySyntaxFactory[qt.DEFINED_PATH].calculator("offsetPath",s,n.offsetPath,t,this.runtime),u.has("transform")&&n.transform&&(t.parsedStyle.transform=Ym(n.transform)),u.has("transformOrigin")&&n.transformOrigin&&(t.parsedStyle.transformOrigin=gA(n.transformOrigin)),u.has("markerStart")&&n.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[qt.MARKER].calculator(null,n.markerStart,n.markerStart,null,null)),u.has("markerEnd")&&n.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[qt.MARKER].calculator(null,n.markerEnd,n.markerEnd,null,null)),u.has("markerMid")&&n.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[qt.MARKER].calculator("",n.markerMid,n.markerMid,null,null)),u.has("zIndex")&&!Pn(n.zIndex)&&this.runtime.CSSPropertySyntaxFactory[qt.Z_INDEX].postProcessor(t),u.has("offsetDistance")&&!Pn(n.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[qt.OFFSET_DISTANCE].postProcessor(t),u.has("transform")&&n.transform&&this.runtime.CSSPropertySyntaxFactory[qt.TRANSFORM].postProcessor(t),u.has("transformOrigin")&&n.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[qt.TRANSFORM_ORIGIN].postProcessor(t),o&&(t.geometry.dirty=!0,t.renderable.boundsDirty=!0,t.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(t))}},{key:"updateGeometry",value:function(t){var n=t.nodeName,i=this.runtime.geometryUpdaterFactory[n];if(i){var a=t.geometry;a.contentBounds||(a.contentBounds=new Nr),a.renderBounds||(a.renderBounds=new Nr);var s=t.parsedStyle,o=i.update(s,t),l=o.cx,u=l===void 0?0:l,h=o.cy,p=h===void 0?0:h,S=o.cz,N=S===void 0?0:S,U=o.hwidth,H=U===void 0?0:U,V=o.hheight,Y=V===void 0?0:V,q=o.hdepth,ne=q===void 0?0:q,le=[Math.abs(H),Math.abs(Y),ne],ue=s.stroke,fe=s.lineWidth,de=fe===void 0?1:fe,ve=s.increasedLineWidthForHitTesting,Te=ve===void 0?0:ve,Oe=s.shadowType,Ie=Oe===void 0?"outer":Oe,ze=s.shadowColor,Xe=s.filter,et=Xe===void 0?[]:Xe,st=s.transformOrigin,bt=[u,p,N];a.contentBounds.update(bt,le);var _t=n===Ct.POLYLINE||n===Ct.POLYGON||n===Ct.PATH?Math.SQRT2:.5,ct=ue&&!ue.isNone;if(ct){var ft=((de||0)+(Te||0))*_t;le[0]+=ft,le[1]+=ft}if(a.renderBounds.update(bt,le),ze&&Ie&&Ie!=="inner"){var At=a.renderBounds,Ft=At.min,Vt=At.max,nn=s.shadowBlur,hn=s.shadowOffsetX,rn=s.shadowOffsetY,bn=nn||0,Dn=hn||0,kn=rn||0,$n=Ft[0]-bn+Dn,or=Vt[0]+bn+Dn,$i=Ft[1]-bn+kn,mr=Vt[1]+bn+kn;Ft[0]=Math.min(Ft[0],$n),Vt[0]=Math.max(Vt[0],or),Ft[1]=Math.min(Ft[1],$i),Vt[1]=Math.max(Vt[1],mr),a.renderBounds.setMinMax(Ft,Vt)}et.forEach(function(Ii){var so=Ii.name,Gi=Ii.params;if(so==="blur"){var wa=Gi[0].value;a.renderBounds.update(a.renderBounds.center,k(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[wa,wa,0]))}else if(so==="drop-shadow"){var Xn=Gi[0].value,yr=Gi[1].value,Qn=Gi[2].value,fr=a.renderBounds,wr=fr.min,xn=fr.max,dr=wr[0]-Qn+Xn,_r=xn[0]+Qn+Xn,wi=wr[1]-Qn+yr,Er=xn[1]+Qn+yr;wr[0]=Math.min(wr[0],dr),xn[0]=Math.max(xn[0],_r),wr[1]=Math.min(wr[1],wi),xn[1]=Math.max(xn[1],Er),a.renderBounds.setMinMax(wr,xn)}}),t.geometry.dirty=!1;var za=H<0,ea=Y<0,Ho=(za?-1:1)*(st?Pa(st[0],0,t,!0):0),Hi=(ea?-1:1)*(st?Pa(st[1],1,t,!0):0);(Ho||Hi)&&t.setOrigin(Ho,Hi)}}},{key:"updateSizeAttenuation",value:function(t,n){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=(t.style.rawLineWidth||1)/n,t.nodeName===Ct.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=(t.style.rawR||1)/n)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===Ct.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))}}])}();function yA(r,e){var t=$m(r);for(var n in e)t.has(n)&&(r.parsedStyle[n]=e[n])}function $m(r){return r.constructor.PARSED_STYLE_LIST}var _A=function(){function r(){(0,_.Z)(this,r),this.mixer=wv}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i,a){return ma(i)}}])}(),EA=function(){function r(){(0,_.Z)(this,r)}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i,a,s){return i instanceof Ka&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(t,n,i,a),t==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),xA=function(){function r(){(0,_.Z)(this,r),this.parser=Iu,this.mixer=BM}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i,a){return i instanceof Ka?i.value==="none"?Dm:Cm:i}}])}(),bA=function(){function r(){(0,_.Z)(this,r)}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i){return i instanceof Ka?[]:i}}])}();function ey(r){var e=r.parsedStyle,t=e.fontSize;return Pn(t)?null:t}var Cv=function(){function r(){(0,_.Z)(this,r),this.mixer=wv}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i,a,s){if(un(i))return i;if(Sr.isRelativeUnit(i.unit)){if(i.unit===$t.kPercentage)return 0;if(i.unit===$t.kEms){if(a.parentNode){var o=ey(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===$t.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=ey(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),wA=function(){function r(){(0,_.Z)(this,r),this.mixer=zm}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i){return i.map(function(a){return a.value})}}])}(),MA=function(){function r(){(0,_.Z)(this,r),this.mixer=zm}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i){return i.map(function(a){return a.value})}}])}(),AA=function(){function r(){(0,_.Z)(this,r)}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i,a){var s;i instanceof Ka&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),TA=function(){function r(){(0,_.Z)(this,r),this.mixer=wv}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i){return i.value}}])}(),PA=function(){function r(){(0,_.Z)(this,r),this.mixer=Mv(0,1)}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i){return i.value}},{key:"postProcessor",value:function(t){var n=t.parsedStyle,i=n.offsetPath,a=n.offsetDistance;if(i){var s=i.nodeName;if(s===Ct.LINE||s===Ct.PATH||s===Ct.POLYLINE){var o=i.getPoint(a);o&&t.setLocalPosition(o.x,o.y)}}}}])}(),SA=function(){function r(){(0,_.Z)(this,r),this.mixer=Mv(0,1)}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i){return i.value}}])}(),OA=function(){function r(){(0,_.Z)(this,r),this.parser=Km,this.mixer=nA}return(0,F.Z)(r,[{key:"calculator",value:function(t,n,i){return i instanceof Ka&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new zl(0,0,0,0)}:i}}])}(),DA=(0,F.Z)(function r(){(0,_.Z)(this,r),this.mixer=iA}),CA=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a>>1;ty(r[i],e)<0?t=i+1:n=i}return t}function ty(r,e){var t=Number(r.parsedStyle.zIndex||0),n=Number(e.parsedStyle.zIndex||0);if(t===n){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(e)}}return t-n}function ny(r){var e=r;do{var t,n=(t=e.parsedStyle)===null||t===void 0?void 0:t.clipPath;if(n)return e;e=e.parentElement}while(e!==null);return null}var ry="px";function kA(r,e,t){Rv&&r.style&&(r.style.width=e+ry,r.style.height=t+ry)}function iy(r,e){if(Rv)return document.defaultView.getComputedStyle(r,null).getPropertyValue(e)}function FA(r){var e=iy(r,"width");return e==="auto"?r.offsetWidth:parseFloat(e)}function zA(r){var e=iy(r,"height");return e==="auto"?r.offsetHeight:parseFloat(e)}var UA=1,WA={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Iv=typeof performance=="object"&&performance.now?performance:Date;function ih(r){return r.nodeName===Ct.FRAGMENT?!0:r.getRootNode().nodeName===Ct.FRAGMENT}function nl(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=!1,i=!1,a=!!e&&!e.isNone,s=!!t&&!t.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(n=a,i=s):r==="visiblefill"||r==="fill"?n=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(n=!0,i=!0),[n,i]}var HA=1,GA=function(){return HA++},Cs=typeof self=="object"&&self.self===self?self:typeof X.g=="object"&&X.g.global===X.g?X.g:{},jA=Date.now(),VA=function(){return Cs.performance&&typeof Cs.performance.now=="function"?Cs.performance.now():Date.now()-jA},ku={},ay=Date.now(),ZA=function(e){if(typeof e!="function")throw new TypeError("".concat(e," is not a function"));var t=Date.now(),n=t-ay,i=n>16?0:16-n,a=GA();return ku[a]=e,Object.keys(ku).length>1||setTimeout(function(){ay=t;var s=ku;ku={},Object.keys(s).forEach(function(o){return s[o](VA())})},i),a},KA=function(e){delete ku[e]},XA=["","webkit","moz","ms","o"],sy=function(e){return typeof e!="string"?ZA:e===""?Cs.requestAnimationFrame:Cs["".concat(e,"RequestAnimationFrame")]},YA=function(e){return typeof e!="string"?KA:e===""?Cs.cancelAnimationFrame:Cs["".concat(e,"CancelAnimationFrame")]||Cs["".concat(e,"CancelRequestAnimationFrame")]},QA=function(e,t){for(var n=0;e[n]!==void 0;){if(t(e[n]))return e[n];n+=1}},oy=QA(XA,function(r){return!!sy(r)}),Nv=sy(oy),ly=YA(oy);Cs.requestAnimationFrame=Nv,Cs.cancelAnimationFrame=ly;var JA=function(){function r(){(0,_.Z)(this,r),this.callbacks=[]}return(0,F.Z)(r,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(t,n){this.callbacks.push(n)}},{key:"promise",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i=0;N--){var U=S[N].trim();!eT.test(U)&&$A.indexOf(U)<0&&(U='"'.concat(U,'"')),S[N]=U}return"".concat(s," ").concat(l," ").concat(h," ").concat(p," ").concat(S.join(","))}function kv(r,e,t){return Ze(r),r[4]=Math.tan(e),r[1]=Math.tan(t),r}var ui=De(),nT=De(),rT={scale:function(e){ln(ui,[e[0].value,e[1].value,1])},scaleX:function(e){ln(ui,[e[0].value,1,1])},scaleY:function(e){ln(ui,[1,e[0].value,1])},scaleZ:function(e){ln(ui,[1,1,e[0].value])},scale3d:function(e){ln(ui,[e[0].value,e[1].value,e[2].value])},translate:function(e){on(ui,[e[0].value,e[1].value,0])},translateX:function(e){on(ui,[e[0].value,0,0])},translateY:function(e){on(ui,[0,e[0].value,0])},translateZ:function(e){on(ui,[0,0,e[0].value])},translate3d:function(e){on(ui,[e[0].value,e[1].value,e[2].value])},rotate:function(e){dn(ui,Tr(ma(e[0])))},rotateX:function(e){Jt(ui,Tr(ma(e[0])))},rotateY:function(e){Xt(ui,Tr(ma(e[0])))},rotateZ:function(e){dn(ui,Tr(ma(e[0])))},rotate3d:function(e){Zt(ui,Tr(ma(e[3])),[e[0].value,e[1].value,e[2].value])},skew:function(e){kv(ui,Tr(e[0].value),Tr(e[1].value))},skewX:function(e){kv(ui,Tr(e[0].value),0)},skewY:function(e){kv(ui,0,Tr(e[0].value))},matrix:function(e){ke(ui,e[0].value,e[1].value,0,0,e[2].value,e[3].value,0,0,0,0,1,0,e[4].value,e[5].value,0,1)},matrix3d:function(e){ke.apply(K,[ui].concat((0,w.Z)(e.map(function(t){return t.value}))))}},iT=f(1,1,1),aT=P(),uy={translate:function(e,t){Ht.sceneGraphService.setLocalScale(e,iT,!1),Ht.sceneGraphService.setLocalEulerAngles(e,aT,void 0,void 0,!1),Ht.sceneGraphService.setLocalPosition(e,[t[0].value,t[1].value,0],!1),Ht.sceneGraphService.dirtifyLocal(e,e.transformable)}};function cy(r,e){if(r.length){if(r.length===1&&uy[r[0].t]){uy[r[0].t](e,r[0].d);return}for(var t=Ze(nT),n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,i=fy.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&fy.set(this,i)}if(i){if(t.manager=i.getEventService(),!t.manager)return!1;t.defaultPrevented=!1,t.path?t.path.length=0:t.page=[],n||(t.target=this),t.manager.dispatchEvent(t,t.type,n)}else this.emitter.emit(t.type,t);return!t.defaultPrevented}}])}(),Yr=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(n):n.composed&&this.host?this.host.getRootNode(n):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(n){throw new Error(Ar)}},{key:"lookupNamespaceURI",value:function(n){throw new Error(Ar)}},{key:"lookupPrefix",value:function(n){throw new Error(Ar)}},{key:"normalize",value:function(){throw new Error(Ar)}},{key:"isEqualNode",value:function(n){return this===n}},{key:"isSameNode",value:function(n){return this.isEqualNode(n)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(n){if(n===this)return 0;for(var i=n,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,h=u===s?o:s;if(u[u.length-h.length]===h[0])return u===s?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var p=u.length-h.length,S=h.length-1;S>=0;S--){var N=h[S],U=u[p+S];if(U!==N){var H=N.parentNode.childNodes;return H.indexOf(N)0&&i;)i=i.parentNode,n--;return i}},{key:"forEach",value:function(n){for(var i=[this];i.length>0;){var a=i.pop(),s=n(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(n){return!!n.childNodes}}])}(dy);Yr.DOCUMENT_POSITION_DISCONNECTED=1,Yr.DOCUMENT_POSITION_PRECEDING=2,Yr.DOCUMENT_POSITION_FOLLOWING=4,Yr.DOCUMENT_POSITION_CONTAINS=8,Yr.DOCUMENT_POSITION_CONTAINED_BY=16,Yr.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var yT=2048,_T=function(){function r(e,t){var n=this;(0,_.Z)(this,r),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=De(),this.tmpVec3=P(),this.onPointerDown=function(i){var a=n.createPointerEvent(i);if(n.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")n.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var s=a.button===2;n.dispatchEvent(a,s?"rightdown":"mousedown")}var o=n.trackingData(i.pointerId);o.pressTargetsByButton[i.button]=a.composedPath(),n.freeEvent(a)},this.onPointerUp=function(i){var a=Iv.now(),s=n.createPointerEvent(i,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(s,"pointerup"),s.pointerType==="touch")n.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var o=s.button===2;n.dispatchEvent(s,o?"rightup":"mouseup")}var l=n.trackingData(i.pointerId),u=n.findMountedTarget(l.pressTargetsByButton[i.button]),h=u;if(u&&!s.composedPath().includes(u)){for(var p=u;p&&!s.composedPath().includes(p);){if(s.currentTarget=p,n.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")n.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var S=s.button===2;n.notifyTarget(s,S?"rightupoutside":"mouseupoutside")}Yr.isNode(p)&&(p=p.parentNode)}delete l.pressTargetsByButton[i.button],h=p}if(h){var N,U=n.clonePointerEvent(s,"click");U.target=h,U.path=[],l.clicksByButton[i.button]||(l.clicksByButton[i.button]={clickCount:0,target:U.target,timeStamp:a});var H=n.context.renderingContext.root.ownerDocument.defaultView,V=l.clicksByButton[i.button];V.target===U.target&&a-V.timeStamp=1;a--)if(t.currentTarget=i[a],this.notifyTarget(t,n),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,n),!(t.propagationStopped||t.propagationImmediatelyStopped)){var s=i.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=s+1;os||i>o?null:!l&&this.pickHandler(t)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(t,n){var i,a=n==null?void 0:n.target;if((i=a)!==null&&i!==void 0&&i.shadowRoot&&(a=n.composedPath()[0]),a){if(a===t)return!0;if(t&&t.contains)return t.contains(a)}return n!=null&&n.composedPath?n.composedPath().indexOf(t)>-1:!1}},{key:"getExistedHTML",value:function(t){if(t.nativeEvent.composedPath)for(var n=0,i=t.nativeEvent.composedPath();n=0;i--){var a=t[i];if(a===this.rootTarget||Yr.isNode(a)&&a.parentNode===n)n=t[i];else break}return n}},{key:"getCursor",value:function(t){for(var n=t;n;){var i=NA(n)&&n.getAttribute("cursor");if(i)return i;n=Yr.isNode(n)&&n.parentNode}}}])}(),zv=function(){function r(){(0,_.Z)(this,r)}return(0,F.Z)(r,[{key:"getOrCreateCanvas",value:function(t,n){if(this.canvas)return this.canvas;if(t||Ht.offscreenCanvas)this.canvas=t||Ht.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,G.Z)({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,G.Z)({willReadFrequently:!0},n)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,G.Z)({willReadFrequently:!0},n))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(t,n){return this.context?this.context:(this.getOrCreateCanvas(t,n),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(t){}try{return document.createElement("canvas")}catch(t){}return null}}])}(),Vl=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),ET=function(){function r(e,t){(0,_.Z)(this,r),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new aa,initAsync:new JA,dirtycheck:new Bv,cull:new Bv,beginFrame:new aa,beforeRender:new aa,render:new aa,afterRender:new aa,endFrame:new aa,destroy:new aa,pick:new qA,pickSync:new Bv,pointerDown:new aa,pointerUp:new aa,pointerMove:new aa,pointerOut:new aa,pointerOver:new aa,pointerWheel:new aa,pointerCancel:new aa,click:new aa},this.globalRuntime=e,this.context=t}return(0,F.Z)(r,[{key:"init",value:function(t){var n=this,i=(0,G.Z)((0,G.Z)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(a){a.apply(i,n.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){n.inited=!0,t()}).catch(function(a){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var t=this.context.config.renderer,n=t.getConfig(),i=n.enableDirtyRectangleRendering;return!i||this.context.renderingContext.renderReasons.has(Vl.CAMERA_CHANGED)}},{key:"render",value:function(t,n,i){var a=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var s=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(s.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),s.renderReasons.size&&this.inited){s.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=s.renderReasons.size===1&&s.renderReasons.has(Vl.CAMERA_CHANGED),l=!t.disableRenderHooks||!(t.disableRenderHooks&&o);l&&this.renderDisplayObject(s.root,t,s),this.hooks.beginFrame.call(n),l&&s.renderListCurrentFrame.forEach(function(u){a.hooks.beforeRender.call(u),a.hooks.render.call(u),a.hooks.afterRender.call(u)}),this.hooks.endFrame.call(n),s.renderListCurrentFrame=[],s.renderReasons.clear(),i()}}},{key:"renderDisplayObject",value:function(t,n,i){var a=this,s=n.renderer.getConfig(),o=s.enableDirtyCheck,l=s.enableCulling;function u(H){var V=H.renderable,Y=H.sortable,q=o?V.dirty||i.dirtyRectangleRenderingDisabled?H:null:H;if(q){var ne=l?a.hooks.cull.call(q,a.context.camera):q;ne&&(a.stats.rendered+=1,i.renderListCurrentFrame.push(ne))}V.dirty=!1,Y.renderOrder=a.zIndexCounter,a.zIndexCounter+=1,a.stats.total+=1,Y.dirty&&(a.sort(H,Y),Y.dirty=!1,Y.dirtyChildren=[],Y.dirtyReason=void 0)}for(var h=[t];h.length>0;){var p,S=h.pop();u(S);for(var N=((p=S.sortable)===null||p===void 0||(p=p.sorted)===null||p===void 0?void 0:p.length)>0?S.sortable.sorted:S.childNodes,U=N.length-1;U>=0;U--)h.push(N[U])}}},{key:"sort",value:function(t,n){var i,a;(n==null||(i=n.sorted)===null||i===void 0?void 0:i.length)>0&&n.dirtyReason!==Zc.Z_INDEX_CHANGED?n.dirtyChildren.forEach(function(s){var o=n.sorted.indexOf(s);o>-1&&n.sorted.splice(o,1);var l=t.childNodes.indexOf(s);if(l>-1)if(n.sorted.length===0)n.sorted.push(s);else{var u=BA(n.sorted,s);n.sorted.splice(u,0,s)}}):n.sorted=t.childNodes.slice().sort(ty),((a=n.sorted)===null||a===void 0?void 0:a.length)>0&&t.childNodes.filter(function(s){return s.parsedStyle.zIndex}).length===0&&(n.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(Vl.DISPLAY_OBJECT_CHANGED)}}])}(),xT=/\[\s*(.*)=(.*)\s*\]/,bT=function(){function r(){(0,_.Z)(this,r)}return(0,F.Z)(r,[{key:"selectOne",value:function(t,n){var i=this;if(t.startsWith("."))return n.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(t))>-1});if(t.startsWith("#"))return n.find(function(l){return l.id===i.getIdOrClassname(t)});if(t.startsWith("[")){var a=this.getAttribute(t),s=a.name,o=a.value;return s?n.find(function(l){return n!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return n.find(function(l){return n!==l&&l.nodeName===t})}},{key:"selectAll",value:function(t,n){var i=this;if(t.startsWith("."))return n.findAll(function(l){return n!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(t))>-1});if(t.startsWith("#"))return n.findAll(function(l){return n!==l&&l.id===i.getIdOrClassname(t)});if(t.startsWith("[")){var a=this.getAttribute(t),s=a.name,o=a.value;return s?n.findAll(function(l){return n!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return n.findAll(function(l){return n!==l&&l.nodeName===t})}},{key:"is",value:function(t,n){if(t.startsWith("."))return n.className===this.getIdOrClassname(t);if(t.startsWith("#"))return n.id===this.getIdOrClassname(t);if(t.startsWith("[")){var i=this.getAttribute(t),a=i.name,s=i.value;return a==="name"?n.name===s:this.attributeToString(n,a)===s}return n.nodeName===t}},{key:"getIdOrClassname",value:function(t){return t.substring(1)}},{key:"getAttribute",value:function(t){var n=t.match(xT),i="",a="";return n&&n.length>2&&(i=n[1].replace(/"/g,""),a=n[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(t,n){if(!t.getAttribute)return"";var i=t.getAttribute(n);return Pn(i)?"":i.toString?i.toString():""}}])}(),Kn=function(r){return r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.MOUNTED="DOMNodeInsertedIntoDocument",r.REMOVED="removed",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.REPARENT="reparent",r.DESTROY="destroy",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),Ls=function(r){function e(t,n,i,a,s,o,l,u){var h;return(0,_.Z)(this,e),h=(0,x.Z)(this,e,[null]),h.relatedNode=n,h.prevValue=i,h.newValue=a,h.attrName=s,h.attrChange=o,h.prevParsedValue=l,h.newParsedValue=u,h.type=t,h}return(0,y.Z)(e,r),(0,F.Z)(e)}(ah);Ls.ADDITION=2,Ls.MODIFICATION=1,Ls.REMOVAL=3;function vy(r){var e=r.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}var wT=new Ls(Kn.REPARENT,null,"","","",0,"",""),MT=Nl(),oh=P(),AT=f(1,1,1),TT=De(),PT=Nl(),_o=P(),Zl=De(),Eo=Gr(),ST=P(),OT=Gr(),DT=P(),Fu=P(),rl=P(),lh=De(),gy=Gr(),py=Gr(),uh=Gr(),Uv={affectChildren:!0},CT=function(){function r(e){(0,_.Z)(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new _i(Kn.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=e}return(0,F.Z)(r,[{key:"matches",value:function(t,n){return this.runtime.sceneGraphSelector.is(t,n)}},{key:"querySelector",value:function(t,n){return this.runtime.sceneGraphSelector.selectOne(t,n)}},{key:"querySelectorAll",value:function(t,n){return this.runtime.sceneGraphSelector.selectAll(t,n)}},{key:"attach",value:function(t,n,i){var a,s=!1;t.parentNode&&(s=t.parentNode!==n,this.detach(t));var o=t.nodeName===Ct.FRAGMENT,l=ih(n);t.parentNode=n;var u=o?t.childNodes:[t];un(i)?u.forEach(function(N){n.childNodes.splice(i,0,N),N.parentNode=n}):u.forEach(function(N){n.childNodes.push(N),N.parentNode=n});var h=n,p=h.sortable;if((p!=null&&(a=p.sorted)!==null&&a!==void 0&&a.length||p.dirty||t.parsedStyle.zIndex)&&(p.dirtyChildren.indexOf(t)===-1&&p.dirtyChildren.push(t),p.dirty=!0,p.dirtyReason=Zc.ADDED),!l){if(o)this.dirtifyFragment(t);else{var S=t.transformable;S&&this.dirtifyWorld(t,S)}s&&t.dispatchEvent(wT)}}},{key:"detach",value:function(t){var n,i;if(t.parentNode){var a=t.transformable,s=t.parentNode,o=s.sortable;(o!=null&&(n=o.sorted)!==null&&n!==void 0&&n.length||(i=t.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(t)===-1&&o.dirtyChildren.push(t),o.dirty=!0,o.dirtyReason=Zc.REMOVED);var l=t.parentNode.childNodes.indexOf(t);l>-1&&t.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(t,a),t.parentNode=null}}},{key:"getOrigin",value:function(t){return t.getGeometryBounds(),t.transformable.origin}},{key:"setOrigin",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=[n,i,a]);var s=t.transformable;if(!(n[0]===s.origin[0]&&n[1]===s.origin[1]&&n[2]===s.origin[2])){var o=s.origin;o[0]=n[0],o[1]=n[1],o[2]=n[2]||0,this.dirtifyLocal(t,s)}}},{key:"rotate",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=f(n,i,a));var s=t.transformable;if(t.parentNode===null||!t.parentNode.transformable)this.rotateLocal(t,n);else{var o=Eo;As(o,n[0],n[1],n[2]);var l=this.getRotation(t),u=this.getRotation(t.parentNode);Rl(uh,u),is(uh,uh),On(o,uh,o),On(s.localRotation,o,l),Il(s.localRotation,s.localRotation),this.dirtifyLocal(t,s)}}},{key:"rotateLocal",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=f(n,i,a));var s=t.transformable;As(py,n[0],n[1],n[2]),Nc(s.localRotation,s.localRotation,py),this.dirtifyLocal(t,s)}},{key:"setEulerAngles",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=f(n,i,a));var s=t.transformable;if(t.parentNode===null||!t.parentNode.transformable)this.setLocalEulerAngles(t,n);else{As(s.localRotation,n[0],n[1],n[2]);var o=this.getRotation(t.parentNode);Rl(gy,is(Eo,o)),Nc(s.localRotation,s.localRotation,gy),this.dirtifyLocal(t,s)}}},{key:"setLocalEulerAngles",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof n=="number"&&(n=f(n,i,a));var o=t.transformable;As(o.localRotation,n[0],n[1],n[2]),s&&this.dirtifyLocal(t,o)}},{key:"translateLocal",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=f(n,i,a));var s=t.transformable;ot(n,oh)||(yt(n,n,s.localRotation),k(s.localPosition,s.localPosition,n),this.dirtifyLocal(t,s))}},{key:"setPosition",value:function(t,n){var i,a=t.transformable;if(rl[0]=n[0],rl[1]=n[1],rl[2]=(i=n[2])!==null&&i!==void 0?i:0,!ot(this.getPosition(t),rl)){if(D(a.position,rl),t.parentNode===null||!t.parentNode.transformable)D(a.localPosition,rl);else{var s=t.parentNode.transformable;He(lh,s.worldTransform),mt(lh,lh),qe(a.localPosition,rl,lh)}this.dirtifyLocal(t,a)}}},{key:"setLocalPosition",value:function(t,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=t.transformable;Fu[0]=n[0],Fu[1]=n[1],Fu[2]=(i=n[2])!==null&&i!==void 0?i:0,!ot(s.localPosition,Fu)&&(D(s.localPosition,Fu),a&&this.dirtifyLocal(t,s))}},{key:"scaleLocal",value:function(t,n){var i,a=t.transformable;z(a.localScale,a.localScale,R(_o,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(t,a)}},{key:"setLocalScale",value:function(t,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=t.transformable;R(_o,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:s.localScale[2]),!ot(_o,s.localScale)&&(D(s.localScale,_o),a&&this.dirtifyLocal(t,s))}},{key:"translate",value:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=R(_o,n,i,a)),!ot(n,oh)&&(k(_o,this.getPosition(t),n),this.setPosition(t,_o))}},{key:"setRotation",value:function(t,n,i,a,s){var o=t.transformable;if(typeof n=="number"&&(n=Qd(n,i,a,s)),t.parentNode===null||!t.parentNode.transformable)this.setLocalRotation(t,n);else{var l=this.getRotation(t.parentNode);Rl(Eo,l),is(Eo,Eo),On(o.localRotation,Eo,n),Il(o.localRotation,o.localRotation),this.dirtifyLocal(t,o)}}},{key:"setLocalRotation",value:function(t,n,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof n=="number"&&(n=Zs(Eo,n,i,a,s));var l=t.transformable;Rl(l.localRotation,n),o&&this.dirtifyLocal(t,l)}},{key:"setLocalSkew",value:function(t,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof n=="number"&&(n=Ki(PT,n,i));var s=t.transformable;jn(s.localSkew,n),a&&this.dirtifyLocal(t,s)}},{key:"dirtifyLocal",value:function(t,n){ih(t)||n.localDirtyFlag||(n.localDirtyFlag=!0,n.dirtyFlag||this.dirtifyWorld(t,n))}},{key:"dirtifyWorld",value:function(t,n){n.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,n),this.dirtifyToRoot(t,!0)}},{key:"dirtifyFragment",value:function(t){var n=t.transformable;n&&(n.frozen=!1,n.dirtyFlag=!0,n.localDirtyFlag=!0);var i=t.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=t.childNodes.length,s=0;s1&&arguments[1]!==void 0?arguments[1]:!1,i=t;for(i.renderable&&(i.renderable.dirty=!0);i;)vy(i),i=i.parentNode;n&&t.forEach(function(a){vy(a)}),this.informDependentDisplayObjects(t),this.pendingEvents.set(t,n)}},{key:"updateDisplayObjectDependency",value:function(t,n,i,a){if(n&&n!==i){var s=this.displayObjectDependencyMap.get(n);if(s&&s[t]){var o=s[t].indexOf(a);s[t].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[t]||(l[t]=[]),l[t].push(a)}}},{key:"informDependentDisplayObjects",value:function(t){var n=this,i=this.displayObjectDependencyMap.get(t);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){n.dirtifyToRoot(s,!0),s.dispatchEvent(new Ls(Kn.ATTR_MODIFIED,s,n,n,a,Ls.MODIFICATION,n,n)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,n,n)})})}},{key:"getPosition",value:function(t){var n=t.transformable;return Hn(n.position,this.getWorldTransform(t,n))}},{key:"getRotation",value:function(t){var n=t.transformable;return Rn(n.rotation,this.getWorldTransform(t,n))}},{key:"getScale",value:function(t){var n=t.transformable;return pn(n.scaling,this.getWorldTransform(t,n))}},{key:"getWorldTransform",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.transformable;return!n.localDirtyFlag&&!n.dirtyFlag||(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,n)),n.worldTransform}},{key:"getLocalPosition",value:function(t){return t.transformable.localPosition}},{key:"getLocalRotation",value:function(t){return t.transformable.localRotation}},{key:"getLocalScale",value:function(t){return t.transformable.localScale}},{key:"getLocalSkew",value:function(t){return t.transformable.localSkew}},{key:"calcLocalTransform",value:function(t){var n=t.localSkew[0]!==0||t.localSkew[1]!==0;if(n){Gn(t.localTransform,t.localRotation,t.localPosition,f(1,1,1),t.origin),(t.localSkew[0]!==0||t.localSkew[1]!==0)&&(Ze(Zl),Zl[4]=Math.tan(t.localSkew[0]),Zl[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,Zl));var i=Gn(Zl,Zs(Eo,0,0,0,1),R(_o,1,1,1),t.localScale,t.origin);vt(t.localTransform,t.localTransform,i)}else{var a=t.localTransform,s=t.localPosition,o=t.localRotation,l=t.localScale,u=t.origin,h=s[0]!==0||s[1]!==0||s[2]!==0,p=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,S=l[0]!==1||l[1]!==1||l[2]!==1,N=u[0]!==0||u[1]!==0||u[2]!==0;!p&&!S&&!N?h?on(a,s):Ze(a):Gn(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(t){var n=t.transformable;return n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.localTransform}},{key:"setLocalTransform",value:function(t,n){var i=Hn(ST,n),a=Rn(OT,n),s=pn(DT,n);this.setLocalScale(t,s,!1),this.setLocalPosition(t,i,!1),this.setLocalRotation(t,a,void 0,void 0,void 0,!1),this.dirtifyLocal(t,t.transformable)}},{key:"resetLocalTransform",value:function(t){this.setLocalScale(t,AT,!1),this.setLocalPosition(t,oh,!1),this.setLocalEulerAngles(t,oh,void 0,void 0,!1),this.setLocalSkew(t,MT,void 0,!1),this.dirtifyLocal(t,t.transformable)}},{key:"getTransformedGeometryBounds",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(t,n);if(!Nr.isEmpty(a)){var s=i||new Nr;return s.setFromTransformedAABB(a,this.getWorldTransform(t)),s}return null}},{key:"getGeometryBounds",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=t,a=i.geometry;a.dirty&&Ht.styleValueRegistry.updateGeometry(t);var s=n?a.renderBounds:a.contentBounds||null;return s||new Nr}},{key:"getBounds",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=t,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(t,i,o),u=t.childNodes;if(u.forEach(function(S){var N=n.getBounds(S,i);N&&(l?l.add(N):(l=o||new Nr,l.update(N.center,N.halfExtents)))}),l||(l=new Nr),i){var h=ny(t);if(h){var p=h.parsedStyle.clipPath.getBounds(i);l?p&&(l=p.intersection(l)):l.update(p.center,p.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(t){if(t.parentNode){var n=TT;t.parentNode.transformable&&(n=mt(Zl,this.getWorldTransform(t.parentNode)));var i=this.getBounds(t);if(!Nr.isEmpty(i)){var a=new Nr;return a.setFromTransformedAABB(i,n),a}}return this.getBounds(t)}},{key:"getBoundingClientRect",value:function(t){var n,i,a=this.getGeometryBounds(t);Nr.isEmpty(a)||(i=new Nr,i.setFromTransformedAABB(a,this.getWorldTransform(t)));var s=(n=t.ownerDocument)===null||n===void 0||(n=n.defaultView)===null||n===void 0?void 0:n.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=(0,b.Z)(o,2),u=l[0],h=l[1],p=i.getMax(),S=(0,b.Z)(p,2),N=S[0],U=S[1];return new zl(u+((s==null?void 0:s.left)||0),h+((s==null?void 0:s.top)||0),N-u,U-h)}return new zl((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(t,n){var i=this;if(!n.dirtyFlag){n.dirtyFlag=!0,n.frozen=!1,t.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=t,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(t){var n=t.transformable;if(!n.frozen){n.frozen=!0,(n.localDirtyFlag||n.dirtyFlag)&&this.sync(t,n);for(var i=t.childNodes,a=0;au;--U){for(var q=0;qAt&&ct>=ft;)ct-=1,_t=_t.slice(0,-1);return{lineTxt:_t,txtLastCharIndex:ct}}function Oe(_t,ct){if(!(ve<=0||ve>H)){if(!q[_t]){q[_t]=V;return}var ft=Te(q[_t],ct,ue+1,H-ve);q[_t]=ft.lineTxt+V}}for(var Ie=0;Ie=S){n.isOverflowing=!0,Ie0&&le+st>H){var bt=Te(q[ne],Ie-1,ue+1,H);if(bt.txtLastCharIndex!==Ie-1){if(q[ne]=bt.lineTxt,bt.txtLastCharIndex===Y.length-1)break;Ie=bt.txtLastCharIndex+1,ze=Y[Ie],Xe=Y[Ie-1],et=Y[Ie+1],st=de(ze)}if(ne+1>=S){n.isOverflowing=!0,Oe(ne,Ie-1);break}if(ue=Ie-1,ne+=1,le=0,q[ne]="",this.isBreakingSpace(ze))continue;this.canBreakInLastChar(ze)||(q=this.trimToBreakable(q),le=this.sumTextWidthByCache(q[ne]||"",de)),this.shouldBreakByKinsokuShorui(ze,et)&&(q=this.trimByKinsokuShorui(q),le+=de(Xe||""))}le+=st,q[ne]=(q[ne]||"")+ze}return q.join(` `)}},{key:"isBreakingSpace",value:function(t){return typeof t!="string"?!1:il.BreakingSpaces.indexOf(t.charCodeAt(0))>=0}},{key:"isNewline",value:function(t){return typeof t!="string"?!1:il.Newlines.indexOf(t.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(t){var n=(0,w.Z)(t),i=n[n.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return n;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return n[n.length-1]+=i.slice(l,i.length),n[n.length-2]=i.slice(0,u),n}},{key:"canBreakInLastChar",value:function(t){return!(t&&my.test(t))}},{key:"sumTextWidthByCache",value:function(t,n){return t.split("").reduce(function(i,a){return i+n(a)},0)}},{key:"findBreakableIndex",value:function(t){for(var n=t.length-1;n>=0;n--)if(!my.test(t[n]))return n;return-1}},{key:"getFromCache",value:function(t,n,i,a){var s=i[t];if(typeof s!="number"){var o=t.length*n,l=a.measureText(t);s=l.width+o,i[t]=s}return s}}])}(),Ht={},GT=function(r){var e=new vT,t=new dT;return r={},(0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)(r,Ct.FRAGMENT,null),Ct.CIRCLE,new uT),Ct.ELLIPSE,new cT),Ct.RECT,e),Ct.IMAGE,e),Ct.GROUP,new pT),Ct.LINE,new hT),Ct.TEXT,new gT(Ht)),Ct.POLYLINE,t),Ct.POLYGON,t),(0,fn.Z)((0,fn.Z)((0,fn.Z)(r,Ct.PATH,new fT),Ct.HTML,new mT),Ct.MESH,null)}(),jT=function(r){var e=new xA,t=new Cv;return r={},(0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)(r,qt.PERCENTAGE,null),qt.NUMBER,new TA),qt.ANGLE,new _A),qt.DEFINED_PATH,new EA),qt.PAINT,e),qt.COLOR,e),qt.FILTER,new bA),qt.LENGTH,t),qt.LENGTH_PERCENTAGE,t),qt.LENGTH_PERCENTAGE_12,new wA),(0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)(r,qt.LENGTH_PERCENTAGE_14,new MA),qt.COORDINATE,new Cv),qt.OFFSET_DISTANCE,new PA),qt.OPACITY_VALUE,new SA),qt.PATH,new OA),qt.LIST_OF_POINTS,new DA),qt.SHADOW_BLUR,new CA),qt.TEXT,new LA),qt.TEXT_TRANSFORM,new RA),qt.TRANSFORM,new sT),(0,fn.Z)((0,fn.Z)((0,fn.Z)(r,qt.TRANSFORM_ORIGIN,new oT),qt.Z_INDEX,new lT),qt.MARKER,new AA)}(),VT=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof X.g!="undefined"?X.g:{}};Ht.CameraContribution=pm,Ht.AnimationTimeline=null,Ht.EasingFunction=null,Ht.offscreenCanvasCreator=new zv,Ht.sceneGraphSelector=new bT,Ht.sceneGraphService=new CT(Ht),Ht.textService=new HT(Ht),Ht.geometryUpdaterFactory=GT,Ht.CSSPropertySyntaxFactory=jT,Ht.styleValueRegistry=new mA(Ht),Ht.layoutRegistry=null,Ht.globalThis=VT(),Ht.enableStyleSyntax=!0,Ht.enableSizeAttenuation=!1;var yy=0;function p6(){yy=0}var Wv=new Ls(Kn.INSERTED,null,"","","",0,"",""),Hv=new Ls(Kn.REMOVED,null,"","","",0,"",""),_y=new _i(Kn.DESTROY),ZT=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a=0;n--){var i=this.childNodes[n];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var n=this.childNodes.length-1;n>=0;n--){var i=this.childNodes[n];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(n){return Ht.sceneGraphService.matches(n,this)}},{key:"getElementById",value:function(n){return Ht.sceneGraphService.querySelector("#".concat(n),this)}},{key:"getElementsByName",value:function(n){return Ht.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)}},{key:"getElementsByClassName",value:function(n){return Ht.sceneGraphService.querySelectorAll(".".concat(n),this)}},{key:"getElementsByTagName",value:function(n){return Ht.sceneGraphService.querySelectorAll(n,this)}},{key:"querySelector",value:function(n){return Ht.sceneGraphService.querySelector(n,this)}},{key:"querySelectorAll",value:function(n){return Ht.sceneGraphService.querySelectorAll(n,this)}},{key:"closest",value:function(n){var i=this;do{if(Ht.sceneGraphService.matches(n,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(n){var i=this,a=null;return this.forEach(function(s){return s!==i&&n(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(n){var i=this,a=[];return this.forEach(function(s){s!==i&&n(s)&&a.push(s)}),a}},{key:"after",value:function(){var n=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};Ht.styleValueRegistry.processProperties(this,n,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;Bn(i)||(a||i!==this.attributes[n])&&(this.internalSetAttribute(n,i,{memoize:s}),Kp(e,"setAttribute",this,3)([n,i]))}},{key:"internalSetAttribute",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[n],l=this.parsedStyle[n];Ht.styleValueRegistry.processProperties(this,(0,fn.Z)({},n,i),a),s.dirty=!0;var u=this.parsedStyle[n];if(this.isConnected&&(Rs.relatedNode=this,Rs.prevValue=o,Rs.newValue=i,Rs.attrName=n,Rs.prevParsedValue=l,Rs.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(Rs):(Rs.target=this,this.ownerDocument.defaultView.dispatchEvent(Rs,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var h,p;(h=(p=this).attributeChangedCallback)===null||h===void 0||h.call(p,n,o,i,l,u)}}},{key:"getBBox",value:function(){var n=this.getBounds(),i=n.getMin(),a=(0,b.Z)(i,2),s=a[0],o=a[1],l=n.getMax(),u=(0,b.Z)(l,2),h=u[0],p=u[1];return new zl(s,o,h-s,p-o)}},{key:"setOrigin",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Ht.sceneGraphService.setOrigin(this,ia(n,i,a,!1)),this}},{key:"getOrigin",value:function(){return Ht.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Ht.sceneGraphService.setPosition(this,ia(n,i,a,!1)),this}},{key:"setLocalPosition",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Ht.sceneGraphService.setLocalPosition(this,ia(n,i,a,!1)),this}},{key:"translate",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Ht.sceneGraphService.translate(this,ia(n,i,a,!1)),this}},{key:"translateLocal",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Ht.sceneGraphService.translateLocal(this,ia(n,i,a,!1)),this}},{key:"getPosition",value:function(){return Ht.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return Ht.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(n,i,a){return this.scaleLocal(n,i,a)}},{key:"scaleLocal",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=ia(n,i,a,!1)),Ht.sceneGraphService.scaleLocal(this,n),this}},{key:"setLocalScale",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=ia(n,i,a,!1)),Ht.sceneGraphService.setLocalScale(this,n),this}},{key:"getLocalScale",value:function(){return Ht.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return Ht.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var n=fv(zu,Ht.sceneGraphService.getWorldTransform(this)),i=(0,b.Z)(n,3),a=i[2];return ga(a)}},{key:"getLocalEulerAngles",value:function(){var n=fv(zu,Ht.sceneGraphService.getLocalRotation(this)),i=(0,b.Z)(n,3),a=i[2];return ga(a)}},{key:"setEulerAngles",value:function(n){return Ht.sceneGraphService.setEulerAngles(this,0,0,n),this}},{key:"setLocalEulerAngles",value:function(n){return Ht.sceneGraphService.setLocalEulerAngles(this,0,0,n),this}},{key:"rotateLocal",value:function(n,i,a){return Pn(i)&&Pn(a)?Ht.sceneGraphService.rotateLocal(this,0,0,n):Ht.sceneGraphService.rotateLocal(this,n,i,a),this}},{key:"rotate",value:function(n,i,a){return Pn(i)&&Pn(a)?Ht.sceneGraphService.rotate(this,0,0,n):Ht.sceneGraphService.rotate(this,n,i,a),this}},{key:"setRotation",value:function(n,i,a,s){return Ht.sceneGraphService.setRotation(this,n,i,a,s),this}},{key:"setLocalRotation",value:function(n,i,a,s){return Ht.sceneGraphService.setLocalRotation(this,n,i,a,s),this}},{key:"setLocalSkew",value:function(n,i){return Ht.sceneGraphService.setLocalSkew(this,n,i),this}},{key:"getRotation",value:function(){return Ht.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return Ht.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return Ht.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return Ht.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return Ht.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(n){return Ht.sceneGraphService.setLocalTransform(this,n),this}},{key:"resetLocalTransform",value:function(){Ht.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(n,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,n,i):null}},{key:"isVisible",value:function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(n){this.style.pointerEvents=n?"auto":"none"}},{key:"isInteractive",value:function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,(0,w.Z)(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,w.Z)(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(n,i,a),this}},{key:"move",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(n,i,a),this}},{key:"setZIndex",value:function(n){return this.style.zIndex=n,this}}])}(ZT);Ur.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var Ks=function(r){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,e),(0,x.Z)(this,e,[(0,G.Z)({type:Ct.CIRCLE},t)])}return(0,y.Z)(e,r),(0,F.Z)(e)}(Ur);Ks.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var YT=["style"],Gv=function(r){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Qo.Z)(n,YT);return(0,_.Z)(this,e),t=(0,x.Z)(this,e,[(0,G.Z)({style:i},a)]),t.isCustomElement=!0,t}return(0,y.Z)(e,r),(0,F.Z)(e)}(Ur);Gv.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Uu=function(r){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,e),(0,x.Z)(this,e,[(0,G.Z)({type:Ct.ELLIPSE},t)])}return(0,y.Z)(e,r),(0,F.Z)(e)}(Ur);Uu.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var QT=function(r){function e(){return(0,_.Z)(this,e),(0,x.Z)(this,e,[{type:Ct.FRAGMENT}])}return(0,y.Z)(e,r),(0,F.Z)(e)}(Ur);QT.PARSED_STYLE_LIST=new Set(["class","className"]);var Ai=function(r){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,e),(0,x.Z)(this,e,[(0,G.Z)({type:Ct.GROUP},t)])}return(0,y.Z)(e,r),(0,F.Z)(e)}(Ur);Ai.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var JT=["style"],Wu=function(r){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Qo.Z)(n,JT);return(0,_.Z)(this,e),t=(0,x.Z)(this,e,[(0,G.Z)({type:Ct.HTML,style:i},a)]),t.cullable.enable=!1,t}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var n=mt(De(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!Nr.isEmpty(i)){var a=new Nr;return a.setFromTransformedAABB(i,n),a}}return this.getBounds()}}])}(Ur);Wu.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var Hu=function(r){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,e),(0,x.Z)(this,e,[(0,G.Z)({type:Ct.IMAGE},t)])}return(0,y.Z)(e,r),(0,F.Z)(e)}(Ur);Hu.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var qT=["style"],al=function(r){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Qo.Z)(n,qT);(0,_.Z)(this,e),t=(0,x.Z)(this,e,[(0,G.Z)({type:Ct.LINE,style:(0,G.Z)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),t.markerStartAngle=0,t.markerEndAngle=0;var s=t.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&cr(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),l&&cr(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="x1"||n==="y1"||n==="x2"||n==="y2"||n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&cr(s)&&(this.markerStartAngle=0,s.remove()),o&&cr(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(s&&cr(s)&&(this.markerEndAngle=0,s.remove()),o&&cr(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,h=i.x2,p=i.y1,S=i.y2,N=n?a:s;if(!(!N||!cr(N))){var U=0,H,V,Y,q,ne,le;n?(Y=u,q=p,H=h-u,V=S-p,ne=o||0,le=this.markerStartAngle):(Y=h,q=S,H=u-h,V=p-S,ne=l||0,le=this.markerEndAngle),U=Math.atan2(V,H),N.setLocalEulerAngles(U*180/Math.PI+le),N.setLocalPosition(Y+Math.cos(U)*ne,q+Math.sin(U)*ne)}}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,h=Ss(s,o,l,u,n),p=h.x,S=h.y,N=qe(P(),f(p,S,0),i?this.getWorldTransform():this.getLocalTransform());return new Bi(N[0],N[1])}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(n/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var n=this.parsedStyle,i=n.x1,a=n.y1,s=n.x2,o=n.y2;return $p(i,a,s,o)}}])}(Ur);al.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var $T=["style"],Sa=function(r){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Qo.Z)(n,$T);(0,_.Z)(this,e),t=(0,x.Z)(this,e,[(0,G.Z)({type:Ct.PATH,style:i,initialParsedStyle:{miterLimit:4,d:(0,G.Z)({},mm)}},a)]),t.markerStartAngle=0,t.markerEndAngle=0,t.markerMidList=[];var s=t.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&cr(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),u&&cr(u)&&t.placeMarkerMid(u),l&&cr(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&cr(s)&&(this.markerStartAngle=0,s.remove()),o&&cr(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&cr(s)&&(this.markerEndAngle=0,s.remove()),o&&cr(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=n?a:s;if(!(!u||!cr(u))){var h=0,p,S,N,U,H,V;if(n){var Y=this.getStartTangent(),q=(0,b.Z)(Y,2),ne=q[0],le=q[1];N=le[0],U=le[1],p=ne[0]-le[0],S=ne[1]-le[1],H=o||0,V=this.markerStartAngle}else{var ue=this.getEndTangent(),fe=(0,b.Z)(ue,2),de=fe[0],ve=fe[1];N=ve[0],U=ve[1],p=de[0]-ve[0],S=de[1]-ve[1],H=l||0,V=this.markerEndAngle}h=Math.atan2(S,p),u.setLocalEulerAngles(h*180/Math.PI+V),u.setLocalPosition(N+Math.cos(h)*H,U+Math.sin(h)*H)}}},{key:"placeMarkerMid",value:function(n){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(h){h.remove()}),n&&cr(n))for(var a=1;a1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=ow(a,n),o=s.x,l=s.y,u=qe(P(),f(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new Bi(u[0],u[1])}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(n*Av(this),i)}},{key:"getStartTangent",value:function(){var n=this.parsedStyle.d.segments,i=[];if(n.length>1){var a=n[0].currentPoint,s=n[1].currentPoint,o=n[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var n=this.parsedStyle.d.segments,i=n.length,a=[];if(i>1){var s=n[i-2].currentPoint,o=n[i-1].currentPoint,l=n[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(Ur);Sa.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var eP=["style"],sl=function(r){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Qo.Z)(n,eP);(0,_.Z)(this,e),t=(0,x.Z)(this,e,[(0,G.Z)({type:Ct.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),t.markerStartAngle=0,t.markerEndAngle=0,t.markerMidList=[];var s=t.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&cr(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),u&&cr(u)&&t.placeMarkerMid(u),l&&cr(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&cr(s)&&(this.markerStartAngle=0,s.remove()),o&&cr(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&cr(s)&&(this.markerEndAngle=0,s.remove()),o&&cr(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,h=u||{},p=h.points,S=n?a:s;if(!(!S||!cr(S)||!p)){var N=0,U,H,V,Y,q,ne;if(V=p[0][0],Y=p[0][1],n)U=p[1][0]-p[0][0],H=p[1][1]-p[0][1],q=o||0,ne=this.markerStartAngle;else{var le=p.length;this.parsedStyle.isClosed?(U=p[le-1][0]-p[0][0],H=p[le-1][1]-p[0][1]):(V=p[le-1][0],Y=p[le-1][1],U=p[le-2][0]-p[le-1][0],H=p[le-2][1]-p[le-1][1]),q=l||0,ne=this.markerEndAngle}N=Math.atan2(H,U),S.setLocalEulerAngles(N*180/Math.PI+ne),S.setLocalPosition(V+Math.cos(N)*q,Y+Math.sin(N)*q)}}},{key:"placeMarkerMid",value:function(n){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(p){p.remove()}),this.markerMidList=[],n&&cr(n)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],h=o===1?n:n.cloneNode(!0);this.markerMidList.push(h),this.appendChild(h),h.setLocalPosition(l,u)}}}])}(Ur);sl.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var tP=["style"],ch=function(r){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.style,i=(0,Qo.Z)(t,tP);return(0,_.Z)(this,e),(0,x.Z)(this,e,[(0,G.Z)({type:Ct.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"getTotalLength",value:function(){return jM(this)}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(n/this.getTotalLength(),i)}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,h=this.getTotalLength();a.forEach(function(Y,q){a[q+1]&&(l=[0,0],l[0]=o/h,u=$p(Y[0],Y[1],a[q+1][0],a[q+1][1]),o+=u,l[1]=o/h,s.push(l))}),this.parsedStyle.points.segments=s}var p=0,S=0;this.parsedStyle.points.segments.forEach(function(Y,q){n>=Y[0]&&n<=Y[1]&&(p=(n-Y[0])/(Y[1]-Y[0]),S=q)});var N=Ss(a[S][0],a[S][1],a[S+1][0],a[S+1][1],p),U=N.x,H=N.y,V=qe(P(),f(U,H,0),i?this.getWorldTransform():this.getLocalTransform());return new Bi(V[0],V[1])}},{key:"getStartTangent",value:function(){var n=this.parsedStyle.points.points,i=[];return i.push([n[1][0],n[1][1]]),i.push([n[0][0],n[0][1]]),i}},{key:"getEndTangent",value:function(){var n=this.parsedStyle.points.points,i=n.length-1,a=[];return a.push([n[i-1][0],n[i-1][1]]),a.push([n[i][0],n[i][1]]),a}}])}(sl);ch.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(sl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var ki=function(r){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,e),(0,x.Z)(this,e,[(0,G.Z)({type:Ct.RECT},t)])}return(0,y.Z)(e,r),(0,F.Z)(e)}(Ur);ki.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var nP=["style"],ol=function(r){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.style,i=(0,Qo.Z)(t,nP);return(0,_.Z)(this,e),(0,x.Z)(this,e,[(0,G.Z)({type:Ct.TEXT,style:(0,G.Z)({fill:"black"},n)},i)])}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"getComputedTextLength",value:function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Ur);ol.PARSED_STYLE_LIST=new Set([].concat((0,w.Z)(Ur.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var rP=function(){function r(){(0,_.Z)(this,r),this.registry={},this.define(Ct.CIRCLE,Ks),this.define(Ct.ELLIPSE,Uu),this.define(Ct.RECT,ki),this.define(Ct.IMAGE,Hu),this.define(Ct.LINE,al),this.define(Ct.GROUP,Ai),this.define(Ct.PATH,Sa),this.define(Ct.POLYGON,sl),this.define(Ct.POLYLINE,ch),this.define(Ct.TEXT,ol),this.define(Ct.HTML,Wu)}return(0,F.Z)(r,[{key:"define",value:function(t,n){this.registry[t]=n}},{key:"get",value:function(t){return this.registry[t]}}])}(),m6={number:function(e){return new Sr(e)},percent:function(e){return new Sr(e,"%")},px:function(e){return new Sr(e,"px")},em:function(e){return new Sr(e,"em")},rem:function(e){return new Sr(e,"rem")},deg:function(e){return new Sr(e,"deg")},grad:function(e){return new Sr(e,"grad")},rad:function(e){return new Sr(e,"rad")},turn:function(e){return new Sr(e,"turn")},s:function(e){return new Sr(e,"s")},ms:function(e){return new Sr(e,"ms")},registerProperty:function(e){var t=e.name,n=e.inherits,i=e.interpolable,a=e.initialValue,s=e.syntax;Ht.styleValueRegistry.registerMetadata({n:t,inh:n,int:i,d:a,syntax:s})},registerLayout:function(e,t){Ht.layoutRegistry.registerLayout(e,t)}},Ey=function(r){function e(){var t;(0,_.Z)(this,e),t=(0,x.Z)(this,e),t.defaultView=null,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new Ht.AnimationTimeline(t)}catch(i){}var n={};return Dv.forEach(function(i){var a=i.n,s=i.inh,o=i.d;s&&o&&(n[a]=yn(o)?o(Ct.GROUP):o)}),t.documentElement=new Ai({id:"g-root",style:n}),t.documentElement.ownerDocument=t,t.documentElement.parentNode=t,t.childNodes=[t.documentElement],t}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(n,i){if(n==="svg")return this.documentElement;var a=this.defaultView.customElements.get(n);a||(console.warn("Unsupported tagName: ",n),a=n==="tspan"?ol:Ai);var s=new a(i);return s.ownerDocument=this,s}},{key:"createElementNS",value:function(n,i,a){return this.createElement(i,a)}},{key:"cloneNode",value:function(n){throw new Error(Ar)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(n){}}},{key:"elementsFromBBox",value:function(n,i,a,s){var o=this.defaultView.context.rBushRoot,l=o.search({minX:n,minY:i,maxX:a,maxY:s}),u=[];return l.forEach(function(h){var p=h.displayObject,S=p.parsedStyle.pointerEvents,N=S===void 0?"auto":S,U=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(N);(!U||U&&p.isVisible())&&!p.isCulled()&&p.isInteractive()&&u.push(p)}),u.sort(function(h,p){return p.sortable.renderOrder-h.sortable.renderOrder}),u}},{key:"elementFromPointSync",value:function(n,i){var a=this.defaultView.canvas2Viewport({x:n,y:i}),s=a.x,o=a.y,l=this.defaultView.getConfig(),u=l.width,h=l.height;if(s<0||o<0||s>u||o>h)return null;var p=this.defaultView.viewport2Client({x:s,y:o}),S=p.x,N=p.y,U=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:n,y:i,viewportX:s,viewportY:o,clientX:S,clientY:N},picked:[]}),H=U.picked;return H&&H[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var t=(0,po.Z)((0,Yi.Z)().mark(function i(a,s){var o,l,u,h,p,S,N,U,H,V,Y;return(0,Yi.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),l=o.x,u=o.y,h=this.defaultView.getConfig(),p=h.width,S=h.height,!(l<0||u<0||l>p||u>S)){ne.next=4;break}return ne.abrupt("return",null);case 4:return N=this.defaultView.viewport2Client({x:l,y:u}),U=N.x,H=N.y,ne.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:a,y:s,viewportX:l,viewportY:u,clientX:U,clientY:H},picked:[]});case 7:return V=ne.sent,Y=V.picked,ne.abrupt("return",Y&&Y[0]||this.documentElement);case 10:case"end":return ne.stop()}},i,this)}));function n(i,a){return t.apply(this,arguments)}return n}()},{key:"elementsFromPointSync",value:function(n,i){var a=this.defaultView.canvas2Viewport({x:n,y:i}),s=a.x,o=a.y,l=this.defaultView.getConfig(),u=l.width,h=l.height;if(s<0||o<0||s>u||o>h)return[];var p=this.defaultView.viewport2Client({x:s,y:o}),S=p.x,N=p.y,U=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:n,y:i,viewportX:s,viewportY:o,clientX:S,clientY:N},picked:[]}),H=U.picked;return H[H.length-1]!==this.documentElement&&H.push(this.documentElement),H}},{key:"elementsFromPoint",value:function(){var t=(0,po.Z)((0,Yi.Z)().mark(function i(a,s){var o,l,u,h,p,S,N,U,H,V,Y;return(0,Yi.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),l=o.x,u=o.y,h=this.defaultView.getConfig(),p=h.width,S=h.height,!(l<0||u<0||l>p||u>S)){ne.next=4;break}return ne.abrupt("return",[]);case 4:return N=this.defaultView.viewport2Client({x:l,y:u}),U=N.x,H=N.y,ne.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:a,y:s,viewportX:l,viewportY:u,clientX:U,clientY:H},picked:[]});case 7:return V=ne.sent,Y=V.picked,Y[Y.length-1]!==this.documentElement&&Y.push(this.documentElement),ne.abrupt("return",Y);case 11:case"end":return ne.stop()}},i,this)}));function n(i,a){return t.apply(this,arguments)}return n}()},{key:"appendChild",value:function(n,i){throw new Error(Ul)}},{key:"insertBefore",value:function(n,i){throw new Error(Ul)}},{key:"removeChild",value:function(n,i){throw new Error(Ul)}},{key:"replaceChild",value:function(n,i,a){throw new Error(Ul)}},{key:"append",value:function(){throw new Error(Ul)}},{key:"prepend",value:function(){throw new Error(Ul)}},{key:"getElementById",value:function(n){return this.documentElement.getElementById(n)}},{key:"getElementsByName",value:function(n){return this.documentElement.getElementsByName(n)}},{key:"getElementsByTagName",value:function(n){return this.documentElement.getElementsByTagName(n)}},{key:"getElementsByClassName",value:function(n){return this.documentElement.getElementsByClassName(n)}},{key:"querySelector",value:function(n){return this.documentElement.querySelector(n)}},{key:"querySelectorAll",value:function(n){return this.documentElement.querySelectorAll(n)}},{key:"find",value:function(n){return this.documentElement.find(n)}},{key:"findAll",value:function(n){return this.documentElement.findAll(n)}}])}(Yr),xy=function(){function r(e){(0,_.Z)(this,r),this.strategies=e}return(0,F.Z)(r,[{key:"apply",value:function(t){var n=t.camera,i=t.renderingService,a=t.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(n,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new _i(Kn.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();xy.tag="Culling";var by=function(){function r(){var e=this;(0,_.Z)(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new sh(null),this.rootWheelEvent=new Fv(null),this.onPointerMove=function(t){var n,i=(n=e.context.renderingContext.root)===null||n===void 0||(n=n.ownerDocument)===null||n===void 0?void 0:n.defaultView;if(!(i.supportsTouchEvents&&t.pointerType==="touch")){var a=e.normalizeToPointerEvent(t,i),s=(0,Yo.Z)(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=e.bootstrapEvent(e.rootPointerEvent,l,i,t);e.context.eventService.mapEvent(u)}}catch(h){s.e(h)}finally{s.f()}e.setCursor(e.context.eventService.cursor)}},this.onClick=function(t){var n,i=(n=e.context.renderingContext.root)===null||n===void 0||(n=n.ownerDocument)===null||n===void 0?void 0:n.defaultView,a=e.normalizeToPointerEvent(t,i),s=(0,Yo.Z)(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=e.bootstrapEvent(e.rootPointerEvent,l,i,t);e.context.eventService.mapEvent(u)}}catch(h){s.e(h)}finally{s.f()}e.setCursor(e.context.eventService.cursor)}}return(0,F.Z)(r,[{key:"apply",value:function(t){var n=this;this.context=t;var i=t.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=n.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=n.normalizeWheelEvent(s);n.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=n.normalizeToPointerEvent(s,a);if(n.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=(0,Yo.Z)(o),h;try{for(u.s();!(h=u.n()).done;){var p=h.value,S=n.bootstrapEvent(n.rootPointerEvent,p,a,s);n.context.eventService.mapEvent(S)}}catch(N){u.e(N)}finally{u.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=n.context.contextService.getDomElement(),l=n.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",h=n.normalizeToPointerEvent(s,a),p=(0,Yo.Z)(h),S;try{for(p.s();!(S=p.n()).done;){var N=S.value,U=n.bootstrapEvent(n.rootPointerEvent,N,a,s);U.type+=u,n.context.eventService.mapEvent(U)}}catch(H){p.e(H)}finally{p.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=n.normalizeToPointerEvent(s,a),l=(0,Yo.Z)(o),u;try{for(l.s();!(u=l.n()).done;){var h=u.value,p=n.bootstrapEvent(n.rootPointerEvent,h,a,s);n.context.eventService.mapEvent(p)}}catch(S){l.e(S)}finally{l.f()}n.setCursor(n.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(t,n,i,a){t.view=i,t.originalEvent=null,t.nativeEvent=a,t.pointerId=n.pointerId,t.width=n.width,t.height=n.height,t.isPrimary=n.isPrimary,t.pointerType=n.pointerType,t.pressure=n.pressure,t.tangentialPressure=n.tangentialPressure,t.tiltX=n.tiltX,t.tiltY=n.tiltY,t.twist=n.twist,this.transferMouseData(t,n);var s=this.context.eventService.client2Viewport({x:n.clientX,y:n.clientY}),o=s.x,l=s.y;t.viewport.x=o,t.viewport.y=l;var u=this.context.eventService.viewport2Canvas(t.viewport),h=u.x,p=u.y;return t.canvas.x=h,t.canvas.y=p,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=a.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=WA[t.type]||t.type),t}},{key:"normalizeWheelEvent",value:function(t){var n=this.rootWheelEvent;this.transferMouseData(n,t),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ;var i=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),a=i.x,s=i.y;n.viewport.x=a,n.viewport.y=s;var o=this.context.eventService.viewport2Canvas(n.viewport),l=o.x,u=o.y;return n.canvas.x=l,n.canvas.y=u,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.nativeEvent=t,n.type=t.type,n}},{key:"transferMouseData",value:function(t,n){t.isTrusted=n.isTrusted,t.srcElement=n.srcElement,t.timeStamp=Iv.now(),t.type=n.type,t.altKey=n.altKey,t.metaKey=n.metaKey,t.shiftKey=n.shiftKey,t.ctrlKey=n.ctrlKey,t.button=n.button,t.buttons=n.buttons,t.client.x=n.clientX,t.client.y=n.clientY,t.movement.x=n.movementX,t.movement.y=n.movementY,t.page.x=n.pageX,t.page.y=n.pageY,t.screen.x=n.screenX,t.screen.y=n.screenY,t.relatedTarget=null}},{key:"setCursor",value:function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(t,n){var i=[];if(n.isTouchEvent(t))for(var a=0;a-1,l=0,u=a.length;l1&&arguments[1]!==void 0?arguments[1]:!1;if(t.isConnected){var i=t.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=t.getRenderBounds();if(a){var s=t.renderable;n&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new Nr),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=(0,b.Z)(o,2),u=l[0],h=l[1],p=a.getMax(),S=(0,b.Z)(p,2),N=S[0],U=S[1];i.aabb||(i.aabb={}),i.aabb.displayObject=t,i.aabb.minX=u,i.aabb.minY=h,i.aabb.maxX=N,i.aabb.maxY=U}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!n&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=t.syncNode(l,n);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();wy.tag="Prepare";function y6(r){return!!r.document}var Oa=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),My=500,sP=.1,oP=1e3,hh=new _i(Kn.MOUNTED),fh=new _i(Kn.UNMOUNTED),jv=new _i(Oa.BEFORE_RENDER),Ay=new _i(Oa.RERENDER),Vv=new _i(Oa.AFTER_RENDER),Zv=function(r){function e(t){var n;(0,_.Z)(this,e),n=(0,x.Z)(this,e),n.Element=Ur,n.inited=!1,n.context={};var i=t.container,a=t.canvas,s=t.renderer,o=t.width,l=t.height,u=t.background,h=t.cursor,p=t.supportsMutipleCanvasesInOneContainer,S=t.cleanUpOnDestroy,N=S===void 0?!0:S,U=t.offscreenCanvas,H=t.devicePixelRatio,V=t.requestAnimationFrame,Y=t.cancelAnimationFrame,q=t.createImage,ne=t.supportsTouchEvents,le=t.supportsPointerEvents,ue=t.isTouchEvent,fe=t.isMouseEvent,de=t.dblClickSpeed,ve=o,Te=l,Oe=H||Rv&&window.devicePixelRatio||1;return Oe=Oe>=1?Math.ceil(Oe):1,a&&(ve=o||FA(a)||a.width/Oe,Te=l||zA(a)||a.height/Oe),n.customElements=new rP,n.devicePixelRatio=Oe,n.requestAnimationFrame=V!=null?V:Nv.bind(Ht.globalThis),n.cancelAnimationFrame=Y!=null?Y:ly.bind(Ht.globalThis),n.supportsTouchEvents=ne!=null?ne:"ontouchstart"in Ht.globalThis,n.supportsPointerEvents=le!=null?le:!!Ht.globalThis.PointerEvent,n.isTouchEvent=ue!=null?ue:function(Ie){return n.supportsTouchEvents&&Ie instanceof Ht.globalThis.TouchEvent},n.isMouseEvent=fe!=null?fe:function(Ie){return!Ht.globalThis.MouseEvent||Ie instanceof Ht.globalThis.MouseEvent&&(!n.supportsPointerEvents||!(Ie instanceof Ht.globalThis.PointerEvent))},U&&(Ht.offscreenCanvas=U),n.document=new Ey,n.document.defaultView=n,p||IA(i,n,N),n.initRenderingContext((0,G.Z)((0,G.Z)({},t),{},{width:ve,height:Te,background:u!=null?u:"transparent",cursor:h!=null?h:"default",cleanUpOnDestroy:N,devicePixelRatio:Oe,requestAnimationFrame:n.requestAnimationFrame,cancelAnimationFrame:n.cancelAnimationFrame,supportsTouchEvents:n.supportsTouchEvents,supportsPointerEvents:n.supportsPointerEvents,isTouchEvent:n.isTouchEvent,isMouseEvent:n.isMouseEvent,dblClickSpeed:de!=null?de:200,createImage:q!=null?q:function(){return new window.Image}})),n.initDefaultCamera(ve,Te,s.clipSpaceNearZ),n.initRenderer(s,!0),n}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"initRenderingContext",value:function(n){this.context.config=n,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(n,i,a){var s=this,o=new Ht.CameraContribution;o.clipSpaceNearZ=a,o.setType(Pr.EXPLORING,vv.DEFAULT).setPosition(n/2,i/2,My).setFocalPoint(n/2,i/2,0).setOrthographic(n/-2,n/2,i/2,i/-2,sP,oP),o.canvas=this,o.eventEmitter.on(vm.UPDATED,function(){s.context.renderingContext.renderReasons.add(Vl.CAMERA_CHANGED),Ht.enableSizeAttenuation&&s.getConfig().renderer.getConfig().enableSizeAttenuation&&s.updateSizeAttenuation()}),this.context.camera=o}},{key:"updateSizeAttenuation",value:function(){var n=this.getCamera().getZoom();this.document.documentElement.forEach(function(i){Ht.styleValueRegistry.updateSizeAttenuation(i,n)})}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var n=this;return this.readyPromise||(this.readyPromise=new Promise(function(i){n.resolveReadyPromise=function(){i(n)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1?arguments[1]:void 0;yi.clearCache(),i||this.dispatchEvent(new _i(Oa.BEFORE_DESTROY)),this.frameId&&this.cancelAnimationFrame(this.frameId);var a=this.getRoot();n&&(this.unmountChildren(a),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),this.context.rBushRoot&&this.context.rBushRoot.clear(),i||this.dispatchEvent(new _i(Oa.AFTER_DESTROY));var s=function(l){l.currentTarget=null,l.manager=null,l.target=null,l.relatedNode=null};s(hh),s(fh),s(jv),s(Ay),s(Vv),s(Rs),s(Wv),s(Hv),s(_y)}},{key:"changeSize",value:function(n,i){this.resize(n,i)}},{key:"resize",value:function(n,i){var a=this.context.config;a.width=n,a.height=i,this.getContextService().resize(n,i);var s=this.context.camera,o=s.getProjectionMode();s.setPosition(n/2,i/2,My).setFocalPoint(n/2,i/2,0),o===Za.ORTHOGRAPHIC?s.setOrthographic(n/-2,n/2,i/2,i/-2,s.getNear(),s.getFar()):s.setAspect(n/i),this.dispatchEvent(new _i(Oa.RESIZE,{width:n,height:i}))}},{key:"appendChild",value:function(n,i){return this.document.documentElement.appendChild(n,i)}},{key:"insertBefore",value:function(n,i){return this.document.documentElement.insertBefore(n,i)}},{key:"removeChild",value:function(n){return this.document.documentElement.removeChild(n)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(n){var i=this;n&&(jv.detail=n,Vv.detail=n),this.dispatchEvent(jv);var a=this.getRenderingService();a.render(this.getConfig(),n,function(){i.dispatchEvent(Ay)}),this.dispatchEvent(Vv)}},{key:"run",value:function(){var n=this,i=function(s,o){n.render(o),n.frameId=n.requestAnimationFrame(i)};i()}},{key:"initRenderer",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!n)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new Cw,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new by,new wy,new xy([new aP])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService((0,G.Z)((0,G.Z)({},Ht),this.context)),this.context.renderingService=new ET(Ht,this.context),this.context.eventService=new _T(Ht,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(n,a,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(n,a)}).catch(function(s){console.error(s)})}},{key:"initRenderingService",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){i.inited=!0,a?s?i.requestAnimationFrame(function(){i.dispatchEvent(new _i(Oa.READY))}):i.dispatchEvent(new _i(Oa.READY)):i.dispatchEvent(new _i(Oa.RENDERER_CHANGED)),i.readyPromise&&i.resolveReadyPromise(),a||i.getRoot().forEach(function(o){var l=o,u=l.renderable;u&&(u.renderBoundsDirty=!0,u.boundsDirty=!0,u.dirty=!0)}),i.mountChildren(i.getRoot()),n.getConfig().enableAutoRendering&&i.run()})}},{key:"loadRendererContainerModule",value:function(n){var i=this,a=n.getPlugins();a.forEach(function(s){s.context=i.context,s.init(Ht)})}},{key:"setRenderer",value:function(n){var i=this.getConfig();if(i.renderer!==n){var a=i.renderer;i.renderer=n,this.destroy(!1,!0),(0,w.Z)((a==null?void 0:a.getPlugins())||[]).reverse().forEach(function(s){s.destroy(Ht)}),this.initRenderer(n)}}},{key:"setCursor",value:function(n){var i=this.getConfig();i.cursor=n,this.getContextService().applyCursorStyle(n)}},{key:"unmountChildren",value:function(n){var i=this;n.childNodes.forEach(function(a){i.unmountChildren(a)}),this.inited&&(n.isMutationObserved?n.dispatchEvent(fh):(fh.target=n,this.dispatchEvent(fh,!0)),n!==this.document.documentElement&&(n.ownerDocument=null),n.isConnected=!1),n.isCustomElement&&n.disconnectedCallback&&n.disconnectedCallback()}},{key:"mountChildren",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ih(n);this.inited?n.isConnected||(n.ownerDocument=this.document,n.isConnected=!0,a||(n.isMutationObserved?n.dispatchEvent(hh):(hh.target=n,this.dispatchEvent(hh,!0)))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",n.nodeName),n.childNodes.forEach(function(s){i.mountChildren(s,a)}),n.isCustomElement&&n.connectedCallback&&n.connectedCallback()}},{key:"mountFragment",value:function(n){this.mountChildren(n,!1)}},{key:"client2Viewport",value:function(n){return this.getEventService().client2Viewport(n)}},{key:"viewport2Client",value:function(n){return this.getEventService().viewport2Client(n)}},{key:"viewport2Canvas",value:function(n){return this.getEventService().viewport2Canvas(n)}},{key:"canvas2Viewport",value:function(n){return this.getEventService().canvas2Viewport(n)}},{key:"getPointByClient",value:function(n,i){return this.client2Viewport({x:n,y:i})}},{key:"getClientByPoint",value:function(n,i){return this.viewport2Client({x:n,y:i})}}])}(dy);var lP=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a90)return this;this.computeMatrix()}return this._getAxes(),this.type===Pr.ORBITING||this.type===Pr.EXPLORING?this._getPosition():this.type===Pr.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(n,i){var a=ia(n,i,0),s=L(this.position);return k(s,s,re(P(),this.right,a[0])),k(s,s,re(P(),this.up,a[1])),this._setPosition(s),this.triggerUpdate(),this}},{key:"dolly",value:function(n){var i=this.forward,a=L(this.position),s=n*this.dollyingStep,o=this.distance+n*this.dollyingStep;return s=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,a[0]+=s*i[0],a[1]+=s*i[1],a[2]+=s*i[2],this._setPosition(a),this.type===Pr.ORBITING||this.type===Pr.EXPLORING?this._getDistance():this.type===Pr.TRACKING&&k(this.focalPoint,a,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(n){var i,a,s,o,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=l.position,h=u===void 0?this.position:u,p=l.focalPoint,S=p===void 0?this.focalPoint:p,N=l.roll,U=l.zoom,H=new Ht.CameraContribution;H.setType(this.type,void 0),H.setPosition(h[0],(i=h[1])!==null&&i!==void 0?i:this.position[1],(a=h[2])!==null&&a!==void 0?a:this.position[2]),H.setFocalPoint(S[0],(s=S[1])!==null&&s!==void 0?s:this.focalPoint[1],(o=S[2])!==null&&o!==void 0?o:this.focalPoint[2]),H.setRoll(N!=null?N:this.roll),H.setZoom(U!=null?U:this.zoom);var V={name:n,matrix:Ke(H.getWorldTransform()),right:L(H.right),up:L(H.up),forward:L(H.forward),position:L(H.getPosition()),focalPoint:L(H.getFocalPoint()),distanceVector:L(H.getDistanceVector()),distance:H.getDistance(),dollyingStep:H.getDollyingStep(),azimuth:H.getAzimuth(),elevation:H.getElevation(),roll:H.getRoll(),relAzimuth:H.relAzimuth,relElevation:H.relElevation,relRoll:H.relRoll,zoom:H.getZoom()};return this.landmarks.push(V),V}},{key:"gotoLandmark",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=ur(n)?this.landmarks.find(function(Ie){return Ie.name===n}):n;if(s){var o=un(a)?{duration:a}:a,l=o.easing,u=l===void 0?"linear":l,h=o.duration,p=h===void 0?100:h,S=o.easingFunction,N=S===void 0?void 0:S,U=o.onfinish,H=U===void 0?void 0:U,V=o.onframe,Y=V===void 0?void 0:V,q=.01;this.cancelLandmarkAnimation();var ne=s.position,le=s.focalPoint,ue=s.zoom,fe=s.roll,de=N||Ht.EasingFunction(u),ve,Te=function(){i.setFocalPoint(le),i.setPosition(ne),i.setRoll(fe),i.setZoom(ue),i.computeMatrix(),i.triggerUpdate(),H==null||H()};if(p===0)return Te();var Oe=function(ze){ve===void 0&&(ve=ze);var Xe=ze-ve;if(Xe>=p){Te();return}var et=de(Xe/p),st=P(),bt=P(),_t=1,ct=0;Fe(st,i.focalPoint,le,et),Fe(bt,i.position,ne,et),ct=i.roll*(1-et)+fe*et,_t=i.zoom*(1-et)+ue*et,i.setFocalPoint(st),i.setPosition(bt),i.setRoll(ct),i.setZoom(_t);var ft=Be(st,le)+Be(bt,ne);if(ft<=q&&ue===void 0&&fe===void 0)return Te();i.computeMatrix(),i.triggerUpdate(),Xe0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var t;if((t=this.effect.target)!==null&&t!==void 0&&t.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var n=this.oldPlayState,i=this.pending?"pending":this.playState;return this.readyPromise&&i!==n&&(i==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):n==="pending"?this.resolveReadyPromise():i==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&i!==n&&(i==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):i==="finished"?this.resolveFinishedPromise():n==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=i,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var t=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var n=new Qv(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(n)})}}},{key:"reverse",value:function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),t!==null&&(this.currentTime=t),this.updatePromises()}},{key:"updatePlaybackRate",value:function(t){this.playbackRate=t}},{key:"targetAnimations",value:function(){var t,n=(t=this.effect)===null||t===void 0?void 0:t.target;return n.getAnimations()}},{key:"markTarget",value:function(){var t=this.targetAnimations();t.indexOf(this)===-1&&t.push(this)}},{key:"unmarkTarget",value:function(){var t=this.targetAnimations(),n=t.indexOf(this);n!==-1&&t.splice(n,1)}},{key:"tick",value:function(t,n){!this._idle&&!this._paused&&(this._startTime===null?n&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),n&&(this.currentTimePending=!1,this.fireEvents(t))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(Ar)}},{key:"addEventListener",value:function(t,n,i){throw new Error(Ar)}},{key:"removeEventListener",value:function(t,n,i){throw new Error(Ar)}},{key:"dispatchEvent",value:function(t){throw new Error(Ar)}},{key:"commitStyles",value:function(){throw new Error(Ar)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var t;this._inEffect=!!((t=this.effect)!==null&&t!==void 0&&t.update(-1))}else{var n;this._inEffect=!!((n=this.effect)!==null&&n!==void 0&&n.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(t,n){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!n&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(t){var n=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new Qv(null,this,this.currentTime,t);setTimeout(function(){n.onfinish&&n.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new Qv(null,this,this.currentTime,t);this.onframe(a)}this._finishedFlag=!1}}}])}(),dP=4,vP=.001,gP=1e-7,pP=10,Gu=11,vh=1/(Gu-1),mP=typeof Float32Array=="function",Sy=function(e,t){return 1-3*t+3*e},Oy=function(e,t){return 3*t-6*e},Dy=function(e){return 3*e},gh=function(e,t,n){return((Sy(t,n)*e+Oy(t,n))*e+Dy(t))*e},Cy=function(e,t,n){return 3*Sy(t,n)*e*e+2*Oy(t,n)*e+Dy(t)},yP=function(e,t,n,i,a){var s,o,l=0;do o=t+(n-t)/2,s=gh(o,i,a)-e,s>0?n=o:t=o;while(Math.abs(s)>gP&&++l=0&&e<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&n===i)return function(l){return l};for(var a=mP?new Float32Array(Gu):new Array(Gu),s=0;s=vP?_P(u,U,e,n):H===0?U:yP(u,h,h+vh,e,n)};return function(l){return l===0||l===1?l:gh(o(l),t,i)}},EP=function(e){return e=e.replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())}),e.charAt(0)==="-"?e.substring(1):e},ph=function(e){return Math.pow(e,2)},mh=function(e){return Math.pow(e,3)},yh=function(e){return Math.pow(e,4)},_h=function(e){return Math.pow(e,5)},Eh=function(e){return Math.pow(e,6)},xh=function(e){return 1-Math.cos(e*Math.PI/2)},bh=function(e){return 1-Math.sqrt(1-e*e)},wh=function(e){return e*e*(3*e-2)},Mh=function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)},Ah=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=(0,b.Z)(t,2),i=n[0],a=i===void 0?1:i,s=n[1],o=s===void 0?.5:s,l=Jr(Number(a),1,10),u=Jr(Number(o),.1,2);return e===0||e===1?e:-l*Math.pow(2,10*(e-1))*Math.sin((e-1-u/(Math.PI*2)*Math.asin(1/l))*(Math.PI*2)/u)},ju=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=(0,b.Z)(t,4),a=i[0],s=a===void 0?1:a,o=i[1],l=o===void 0?100:o,u=i[2],h=u===void 0?10:u,p=i[3],S=p===void 0?0:p;s=Jr(s,.1,1e3),l=Jr(l,.1,1e3),h=Jr(h,.1,1e3),S=Jr(S,.1,1e3);var N=Math.sqrt(l/s),U=h/(2*Math.sqrt(l*s)),H=U<1?N*Math.sqrt(1-U*U):0,V=1,Y=U<1?(U*N+-S)/H:-S+N,q=n?n*e/1e3:e;return U<1?q=Math.exp(-q*U*N)*(V*Math.cos(H*q)+Y*Math.sin(H*q)):q=(V+Y*q)*Math.exp(-q*N),e===0||e===1?e:1-q},qv=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=t,i=(0,b.Z)(n,2),a=i[0],s=a===void 0?10:a,o=i[1],l=o==="start"?Math.ceil:Math.floor;return l(Jr(e,0,1)*s)/s},Ly=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=(0,b.Z)(t,4),i=n[0],a=n[1],s=n[2],o=n[3];return Jv(i,a,s,o)(e)},Th=Jv(.42,0,1,1),Xa=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-e(1-t,n,i)}},Ya=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return t<.5?e(t*2,n,i)/2:1-e(t*-2+2,n,i)/2}},Qa=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return t<.5?(1-e(1-t*2,n,i))/2:(e(t*2-1,n,i)+1)/2}},Ry={steps:qv,"step-start":function(e){return qv(e,[1,"start"])},"step-end":function(e){return qv(e,[1,"end"])},linear:function(e){return e},"cubic-bezier":Ly,ease:function(e){return Ly(e,[.25,.1,.25,1])},in:Th,out:Xa(Th),"in-out":Ya(Th),"out-in":Qa(Th),"in-quad":ph,"out-quad":Xa(ph),"in-out-quad":Ya(ph),"out-in-quad":Qa(ph),"in-cubic":mh,"out-cubic":Xa(mh),"in-out-cubic":Ya(mh),"out-in-cubic":Qa(mh),"in-quart":yh,"out-quart":Xa(yh),"in-out-quart":Ya(yh),"out-in-quart":Qa(yh),"in-quint":_h,"out-quint":Xa(_h),"in-out-quint":Ya(_h),"out-in-quint":Qa(_h),"in-expo":Eh,"out-expo":Xa(Eh),"in-out-expo":Ya(Eh),"out-in-expo":Qa(Eh),"in-sine":xh,"out-sine":Xa(xh),"in-out-sine":Ya(xh),"out-in-sine":Qa(xh),"in-circ":bh,"out-circ":Xa(bh),"in-out-circ":Ya(bh),"out-in-circ":Qa(bh),"in-back":wh,"out-back":Xa(wh),"in-out-back":Ya(wh),"out-in-back":Qa(wh),"in-bounce":Mh,"out-bounce":Xa(Mh),"in-out-bounce":Ya(Mh),"out-in-bounce":Qa(Mh),"in-elastic":Ah,"out-elastic":Xa(Ah),"in-out-elastic":Ya(Ah),"out-in-elastic":Qa(Ah),spring:ju,"spring-in":ju,"spring-out":Xa(ju),"spring-in-out":Ya(ju),"spring-out-in":Qa(ju)},xP=function(e){return EP(e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},bP=function(e){return Ry[xP(e)]||Ry.linear},wP=function(e){return e},MP=1,AP=.5,Iy=0;function Ny(r,e){return function(t){if(t>=1)return 1;var n=1/r;return t+=e*n,t-t%n}}var Ph="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",TP=new RegExp("cubic-bezier\\(".concat(Ph,",").concat(Ph,",").concat(Ph,",").concat(Ph,"\\)")),PP=/steps\(\s*(\d+)\s*\)/,SP=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function $v(r){var e=TP.exec(r);if(e)return Jv.apply(void 0,(0,w.Z)(e.slice(1).map(Number)));var t=PP.exec(r);if(t)return Ny(Number(t[1]),Iy);var n=SP.exec(r);return n?Ny(Number(n[1]),{start:MP,middle:AP,end:Iy}[n[2]]):bP(r)}function OP(r){return Math.abs(DP(r)/(r.playbackRate||1))}function DP(r){var e;return r.duration===0||r.iterations===0?0:(r.duration==="auto"?0:Number(r.duration))*((e=r.iterations)!==null&&e!==void 0?e:1)}var By=0,eg=1,Sh=2,ky=3;function CP(r,e,t){if(e===null)return By;var n=t.endTime;return e=Math.min(t.delay+r+t.endDelay,n)?Sh:ky}function LP(r,e,t,n,i){switch(n){case eg:return e==="backwards"||e==="both"?0:null;case ky:return t-i;case Sh:return e==="forwards"||e==="both"?r:null;case By:return null}}function RP(r,e,t,n,i){var a=i;return r===0?e!==eg&&(a+=t):a+=n/r,a}function IP(r,e,t,n,i,a){var s=r===1/0?e%1:r%1;return s===0&&t===Sh&&n!==0&&(i!==0||a===0)&&(s=1),s}function NP(r,e,t,n){return r===Sh&&e===1/0?1/0:t===1?Math.floor(n)-1:Math.floor(n)}function BP(r,e,t){var n=r;if(r!=="normal"&&r!=="reverse"){var i=e;r==="alternate-reverse"&&(i+=1),n="normal",i!==1/0&&i%2!==0&&(n="reverse")}return n==="normal"?t:1-t}function kP(r,e,t){var n=CP(r,e,t),i=LP(r,t.fill,e,n,t.delay);if(i===null)return null;var a=t.duration==="auto"?0:t.duration,s=RP(a,n,t.iterations,i,t.iterationStart),o=IP(s,t.iterationStart,n,t.iterations,i,a),l=NP(n,t.iterations,o,s),u=BP(t.direction,l,o);return t.currentIteration=l,t.progress=u,t.easingFunction(u)}function FP(r,e,t){var n=zP(r,e),i=UP(n,t);return function(a,s){if(s!==null)i.filter(function(l){return s>=l.applyFrom&&s1)throw new Error("Keyframe offsets must be between 0 and 1.");u.computedOffset=p}}else if(h==="composite"&&["replace","add","accumulate","auto"].indexOf(p)===-1)throw new Error("".concat(p," compositing is not supported"));u[h]=p}return u.offset===void 0&&(u.offset=null),u.easing===void 0&&(u.easing=(e==null?void 0:e.easing)||"linear"),u.composite===void 0&&(u.composite="auto"),u}),n=!0,i=-1/0,a=0;a=0&&Number(l.offset)<=1});function o(){var l,u=t,h=u.length;if(t[h-1].computedOffset=Number((l=t[h-1].offset)!==null&&l!==void 0?l:1),h>1){var p;t[0].computedOffset=Number((p=t[0].offset)!==null&&p!==void 0?p:0)}for(var S=0,N=Number(t[0].computedOffset),U=1;U{!Ea.mute&&console.debug(Js(r))},info:r=>{!Ea.mute&&console.info(Js(r))},warn:r=>{!Ea.mute&&console.warn(Js(r))},error:r=>{!Ea.mute&&console.error(Js(r))}};function jy(r){const{theme:e}=r;if(!e)return{};const t=Qs(Zu.THEME,e);return t||(Ea.warn(`The theme of ${e} is not registered.`),{})}function ig(r,e){if(Array.isArray(r)&&r.length===0)return null;const t=Array.isArray(r)?r[0]:r,n=Array.isArray(r)?r.slice(1):e||[];return new Proxy(t,{get(i,a){return typeof i[a]=="function"&&!["onframe","onfinish"].includes(a)?(...s)=>{i[a](...s),n.forEach(o=>{var l;return(l=o[a])===null||l===void 0?void 0:l.call(o,...s)})}:a==="finished"?Promise.all([t.finished,...n.map(s=>s.finished)]):Reflect.get(i,a)},set(i,a,s){return["onframe","onfinish"].includes(a)||n.forEach(o=>{o[a]=s}),Reflect.set(i,a,s)}})}function ag(r){const e=r.reduce((n,i)=>(Object.entries(i).forEach(([a,s])=>{n[a]===void 0?n[a]=[s]:n[a].push(s)}),n),{});Object.entries(e).forEach(([n,i])=>{(i.length!==r.length||i.some(a=>Pn(a))||i.every(a=>!["sourceNode","targetNode","childrenNode"].includes(n)&&ci(a,i[0])))&&delete e[n]});const t=Object.entries(e).reduce((n,[i,a])=>(a.forEach((s,o)=>{n[o]?n[o][i]=s:n[o]={[i]:s}}),n),[]);return r.length!==0&&t.length===0&&t.push({_:0},{_:0}),t}function Ku(r){switch(r){case"opacity":return 1;case"x":case"y":case"z":case"zIndex":return 0;case"visibility":return"visible";case"collapsed":return!1;case"states":return[];default:return}}function Vy(r,e){const{animation:t}=r;if(t===!1||e===!1)return!1;const n=Object.assign({},eS);return li(t)&&Object.assign(n,t),li(e)&&Object.assign(n,e),n}function iS(r){if(typeof r=="string"){const e=Qs(Zu.ANIMATION,r);return e||(Ea.warn(`The animation of ${r} is not registered.`),[])}return r}function aS(r,e,t,n){var i,a;const{animation:s}=r;if(s===!1||n===!1)return[];const o=(i=r==null?void 0:r[e])===null||i===void 0?void 0:i.animation;if(o===!1)return[];const l=o==null?void 0:o[t];if(l===!1)return[];const u=(a=jy(r)[e])===null||a===void 0?void 0:a.animation,h=(S=[])=>iS(S).map(N=>Object.assign(Object.assign(Object.assign(Object.assign({},tS),li(s)&&s),N),li(n)&&n));if(l)return h(l);if(!u)return[];const p=u[t];return p===!1?[]:h(p)}function Zy(r,e,t,n=[]){if(!n&&r===0&&e===0&&t===0)return null;if(Array.isArray(n)){let a=-1;const s=[];for(let o=0;o{if(!t.length)return null;const[n,i]=e,a=u=>{var h;if(u){const p=r.getShape(u);if(!p)return null;const S=`get${Oh(u)}Style`,N=((h=r==null?void 0:r[S])===null||h===void 0?void 0:h.bind(r))||(V=>V),U=(N==null?void 0:N(n))||{},H=(N==null?void 0:N(i))||{};return{shape:p,fromStyle:U,toStyle:H}}else return{shape:r,fromStyle:n,toStyle:i}};let s;const o=t.map(u=>{var{fields:h,shape:p,states:S}=u,N=sS(u,["fields","shape","states"]);const U=a(p);if(!U)return null;const{shape:H,fromStyle:V,toStyle:Y}=U,q=[{},{}];if(h.forEach(le=>{var ue,fe;Object.assign(q[0],{[le]:(ue=V[le])!==null&&ue!==void 0?ue:Ku(le)}),Object.assign(q[1],{[le]:(fe=Y[le])!==null&&fe!==void 0?fe:Ku(le)})}),q.some(le=>Object.keys(le).some(ue=>["x","y","z"].includes(ue)))){const{x:le=0,y:ue=0,z:fe,transform:de=""}=H.attributes||{};q.forEach(ve=>{var Te,Oe,Ie;ve.transform=Zy((Te=ve.x)!==null&&Te!==void 0?Te:le,(Oe=ve.y)!==null&&Oe!==void 0?Oe:ue,(Ie=ve.z)!==null&&Ie!==void 0?Ie:fe,de)})}const ne=H.animate(ag(q),N);return p===void 0&&(s=ne),ne}).filter(Boolean),l=s||(o==null?void 0:o[0]);return l?ig(l,o.filter(u=>u!==u)):null},lS=[{fields:["opacity"]}],uS=[{fields:["x","y"]}],Ky=[{fields:["x","y"]}],cS=Ky,Xy=[{fields:["sourceNode","targetNode"]}],hS=Xy,Yy=[{fields:["childrenNode","x","y"]}],fS=Yy,D6=[{fields:["childrenNode","x","y"]}];var dS=Object.prototype.hasOwnProperty;function vS(r,e){if(!e||!va(r))return{};for(var t={},n=yn(e)?e:function(o){return o[e]},i,a=0;ae?(n&&(clearTimeout(n),n=null),o=h,s=r.apply(i,a),n||(i=a=null)):!n&&t.trailing!==!1&&(n=setTimeout(l,p)),s};return u.cancel=function(){clearTimeout(n),o=0,n=i=a=null},u},sg=function(r){if(typeof r!="object"||r===null)return r;var e;if(va(r)){e=[];for(var t=0,n=r.length;ttypeof e=="number"):!1}function Is(r,e,t){return r>=e&&r<=t}function cs(r=0){if(Array.isArray(r)){const[e=0,t=e,n=e,i=t]=r;return[e,t,n,i]}return[r,r,r,r]}function mS(r=0){const e=cs(r);return e[0]+e[2]}function L6(r=0){const e=cs(r);return e[1]+e[3]}function Ns(r){return r.max[0]-r.min[0]}function Bs(r){return r.max[1]-r.min[1]}function bo(r){return[Ns(r),Bs(r)]}function wo(r,e){const t=Yl(r)?og(r):r.getShape("key").getBounds();return e?Mo(t,e):t}function og(r){const[e,t,n=0]=r,i=new Nr;return i.setMinMax([e,t,n],[e,t,n]),i}function Mo(r,e){const[t,n,i,a]=cs(e),[s,o,l]=r.min,[u,h,p]=r.max,S=new Nr;return S.setMinMax([s-a,o-t,l],[u+n,h+i,p]),S}function Xu(r){if(r.length===0)return new Nr;if(r.length===1)return r[0];const e=new Nr;e.setMinMax(r[0].min,r[0].max);for(let t=1;t=s&&i<=l&&n>=o&&a<=u}function hs(r,e){return Is(r[0],e.min[0],e.max[0])&&Is(r[1],e.min[1],e.max[1])}function Jy(r,e,t=!1){const{min:[n,i],max:[a,s]}=e,o=(r[1]===i||r[1]===s)&&(t||Is(r[0],n,a)),l=(r[0]===n||r[0]===a)&&(t||Is(r[1],i,s));return o||l}function _S(r,e){return!hs(r,e)}function Lh(r,e){const{center:t}=e;return r[0]===t[0]&&r[1]===t[1]}function Yu(r,e){const[t,n]=r,[i,a]=e.min,[s,o]=e.max,l=t-i,u=s-t,h=n-a,p=o-n,S=Math.min(l,u,h,p);return S===l?"left":S===u?"right":S===h?"top":S===p?"bottom":"left"}function ul(r,e){const t=Xl(r);if(hs(r,e))switch(Yu(r,e)){case"left":t[0]=e.min[0];break;case"right":t[0]=e.max[0];break;case"top":t[1]=e.min[1];break;case"bottom":t[1]=e.max[1];break}else{const[n,i]=r,[a,s]=e.min,[o,l]=e.max;t[0]=Is(n,a,o)?n:n0&&N(ue[0])}},Y=0;Y0;)S.push(l.pop());s.push(S)}}return s},t_=function(e){for(var t=e.nodes,n=t===void 0?[]:t,i=e.edges,a=i===void 0?[]:i,s=[],o={},l={},u={},h=[],p=0,S=function V(Y){l[Y.id]=p,u[Y.id]=p,p+=1,s.push(Y),o[Y.id]=!0;for(var q=qa(Y.id,a,"target").filter(function(de){return n.map(function(ve){return ve.id}).indexOf(de)>-1}),ne=function(ve){var Te=q[ve];if(!l[Te]&&l[Te]!==0){var Oe=n.filter(function(Ie){return Ie.id===Te});Oe.length>0&&V(Oe[0]),u[Y.id]=Math.min(u[Y.id],u[Te])}else o[Te]&&(u[Y.id]=Math.min(u[Y.id],l[Te]))},le=0;le0;){var fe=s.pop();if(o[fe.id]=!1,ue.push(fe),fe===Y)break}ue.length>0&&h.push(ue)}},N=0,U=n;N0;)for(var V=N.pop(),Y=V.id,q=qa(Y,e.edges),ne=function(fe){var de,ve=q[fe],Te=e.nodes.find(function(st){return st.id===ve});if(ve===Y)s.push((de={},de[ve]=V,de));else if(!(ve in H))U[ve]=V,N.push(Te),H[ve]=new Set([V]);else if(!H[Y].has(Te)){for(var Oe=!0,Ie=[Te,V],ze=U[Y];H[ve].size&&!H[ve].has(ze)&&(Ie.push(ze),ze!==U[ze.id]);)ze=U[ze.id];if(Ie.push(ze),t&&n?(Oe=!1,Ie.findIndex(function(st){return t.indexOf(st.id)>-1})>-1&&(Oe=!0)):t&&!n&&Ie.findIndex(function(st){return t.indexOf(st.id)>-1})>-1&&(Oe=!1),Oe){for(var Xe={},et=1;et0;){var et=Xe.pop();a.has(et)&&(a.delete(et),s[et.id].forEach(function(st){Xe.push(st)}),s[et.id].clear())}},p=function Ie(ze,Xe,et){var st=!1;if(t&&n===!1&&t.indexOf(ze.id)>-1)return st;i.push(ze),a.add(ze);for(var bt=et[ze.id],_t=0;_t-1});nn-1)?o.push((Xe={},Xe[Vt.id]=Vt,Xe)):Ft[Vt.id].push(u[rn])}}return{component:At,adjList:Ft,minIdx:st}},ne=0;ne=ne}),ue=t_({nodes:le,edges:e.edges}).filter(function(Ie){return Ie.length>1});if(ue.length===0)break;var fe=q(ue),de=fe.minIdx,ve=fe.adjList,Te=fe.component;if(Te.length>1){Te.forEach(function(Ie){s[Ie.id]=new Set});var Oe=l[de];if(t&&n&&t.indexOf(Oe.id)===-1)return o;p(Oe,Oe,ve),ne=de+1}else break}return o},kS=function(e,t,n,i){return i===void 0&&(i=!0),t?s_(e,n,i):a_(e,n,i)},o_=BS,FS={}.toString,zS=function(r,e){return FS.call(r)==="[object "+e+"]"},Nh=zS,ug=function(r){return Nh(r,"Function")},cg=function(r){return Array.isArray?Array.isArray(r):Nh(r,"Array")},US=function(r){var e=typeof r;return r!==null&&e==="object"||e==="function"};function WS(r,e){if(r){var t;if(cg(r))for(var n=0,i=r.length;n-1;)GS.call(r,a,1);return r},J6=null,VS=Array.prototype.splice,q6=function(e,t){if(!isArrayLike(e))return[];for(var n=e?t.length:0,i=n-1;n--;){var a=void 0,s=t[n];(n===i||s!==a)&&(a=s,VS.call(e,s,1))}return e},$6=null,ez=function(r,e,t){if(!isArray(r)&&!isPlainObject(r))return r;var n=t;return each(r,function(i,a){n=e(n,i,a)}),n},tz=null,nz=function(r,e){var t=[];if(!isArrayLike(r))return t;for(var n=-1,i=[],a=r.length;++na[o])return 1;if(i[o]0},Dz=null,Cz=function(r,e){if(isArray(r)){for(var t,n=-1/0,i=0;in&&(t=a,n=s)}return t}},Lz=function(r,e){if(isArray(r)){for(var t,n=1/0,i=0;io&&h>o);)if(l.push(u),o-=h,s=s.substr(i),!s)return l.join("");for(;u=s.substr(0,1),h=measureTextWidth(u,t),!(h+a>o);)if(l.push(u),o-=h,s=s.substr(1),!s)return l.join("");return""+l.join("")+n},pU=function(){function r(){this.map={}}return r.prototype.has=function(e){return this.map[e]!==void 0},r.prototype.get=function(e,t){var n=this.map[e];return n===void 0?t:n},r.prototype.set=function(e,t){this.map[e]=t},r.prototype.clear=function(){this.map={}},r.prototype.delete=function(e){delete this.map[e]},r.prototype.size=function(){return Object.keys(this.map).length},r}(),mU=null,lO=function(e,t,n){for(var i=1/0,a,s=0;sp[ue.id]+ze?(p[Ie]=p[ue.id]+ze,S[Ie]=[ue.id]):p[Ie]===p[ue.id]+ze&&S[Ie].push(ue.id)})},H=0;H0&&h.length>0;){var N=h[h.length-1];if(N.length){var U=N.shift();U&&(l.push(U),u[U]=!0,S=i?qa(U,o,"target"):qa(U,o),h.push(S.filter(function(Y){return!u[Y]})))}else{var H=l.pop();u[H]=!1,h.pop();continue}if(l[l.length-1]===n){var V=l.map(function(q){return q});p.push(V);var H=l.pop();u[H]=!1,h.pop()}}return p},hO=function(e,t){for(var n=Rh(e,t),i=[],a=n.length,s=0;si[s][l]+i[l][o]&&(i[s][o]=i[s][l]+i[l][o]);return i},pg=hO,fO=function(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n="weight"),i===void 0&&(i=1e3);var a=e.nodes,s=a===void 0?[]:a,o=e.edges,l=o===void 0?[]:o,u={},h={};s.forEach(function(le,ue){var fe=e_();le.clusterId=fe,u[fe]={id:fe,nodes:[le]},h[le.id]={node:le,idx:ue}});var p=Rh(e,t),S=[],N={};p.forEach(function(le,ue){var fe=0,de=s[ue].id;N[de]={},le.forEach(function(ve,Te){if(ve){fe+=ve;var Oe=s[Te].id;N[de][Oe]=ve}}),S.push(fe)});for(var U=0,H=function(){var ue=!1;if(s.forEach(function(fe){var de={};Object.keys(N[fe.id]).forEach(function(st){var bt=N[fe.id][st],_t=h[st].node,ct=_t.clusterId;de[ct]||(de[ct]=0),de[ct]+=bt});var ve=-1/0,Te=[];if(Object.keys(de).forEach(function(st){ve=0&&Te.splice(Oe,1),Te&&Te.length){ue=!0;var Ie=u[fe.clusterId],ze=Ie.nodes.indexOf(fe);Ie.nodes.splice(ze,1);var Xe=Math.floor(Math.random()*Te.length),et=u[Te[Xe]];et.nodes.push(fe),fe.clusterId=et.id}}}),!ue)return"break";U++};U0&&ve>Te&&ve-TeTe&&(Ie=p.map(function(ft){return{node:ft,clusterId:ft.clusterId}}),ze=Ju(q),Te=ve),Xe||Oe>100)break;Oe++,Object.keys(q).forEach(function(ft){var At=0;N.forEach(function(Ft){var Vt=Ft.source,nn=Ft.target,hn=ne[Vt].node.clusterId,rn=ne[nn].node.clusterId;(hn===ft&&rn!==ft||rn===ft&&hn!==ft)&&(At=At+(Ft[n]||1))}),q[ft].sumTot=At}),p.forEach(function(ft,At){var Ft=q[ft.clusterId],Vt=0,nn,hn=ue[At]/(2*de),rn=0,bn=Ft.nodes;bn.forEach(function(Hi){var Ii=ne[Hi.id].idx;rn+=le[At][Ii]||0});var Dn=rn-Ft.sumTot*hn,kn=bn.filter(function(Hi){return Hi.id!==ft.id}),$n=[];kn.forEach(function(Hi,Ii){$n[Ii]=U[Hi.originIndex]});var or=yg(kn,U)*u,$i=fe[ft.id];if(Object.keys($i).forEach(function(Hi){var Ii=ne[Hi].node,so=Ii.clusterId;if(so!==ft.clusterId){var Gi=q[so],wa=Gi.nodes;if(!(!wa||!wa.length)){var Xn=0;wa.forEach(function(dr){var _r=ne[dr.id].idx;Xn+=le[At][_r]||0});var yr=Xn-Gi.sumTot*hn,Qn=wa.concat([ft]),fr=[];Qn.forEach(function(dr,_r){fr[_r]=U[dr.originIndex]});var wr=yg(Qn,U)*u,xn=yr-Dn;a&&(xn=yr+wr-(Dn+or)),xn>Vt&&(Vt=xn,nn=Gi)}}}),Vt>0){nn.nodes.push(ft);var mr=ft.clusterId;ft.clusterId=nn.id;var za=Ft.nodes.indexOf(ft);Ft.nodes.splice(za,1);var ea=0,Ho=0;N.forEach(function(Hi){var Ii=Hi.source,so=Hi.target,Gi=ne[Ii].node.clusterId,wa=ne[so].node.clusterId;(Gi===nn.id&&wa!==nn.id||wa===nn.id&&Gi!==nn.id)&&(ea=ea+(Hi[n]||1)),(Gi===mr&&wa!==mr||wa===mr&&Gi!==mr)&&(Ho=Ho+(Hi[n]||1))}),nn.sumTot=ea,Ft.sumTot=Ho}})}var et={},st=0;Object.keys(ze).forEach(function(ft){var At=ze[ft];if(!At.nodes||!At.nodes.length){delete ze[ft];return}var Ft=String(st+1);Ft!==ft&&(At.id=Ft,At.nodes=At.nodes.map(function(Vt){return{id:Vt.id,clusterId:Ft}}),ze[Ft]=At,et[ft]=Ft,delete ze[ft],st++)}),Ie.forEach(function(ft){var At=ft.node,Ft=ft.clusterId;At&&(At.clusterId=Ft,At.clusterId&&et[At.clusterId]&&(At.clusterId=et[At.clusterId]))});var bt=[],_t={};N.forEach(function(ft){var At=ft.source,Ft=ft.target,Vt=ft[n]||1,nn=ne[At].node.clusterId,hn=ne[Ft].node.clusterId;if(!(!nn||!hn)){var rn="".concat(nn,"---").concat(hn);if(_t[rn])_t[rn].weight+=Vt,_t[rn].count++;else{var bn={source:nn,target:hn,weight:Vt,count:1};_t[rn]=bn,bt.push(bn)}}});var ct=[];return Object.keys(ze).forEach(function(ft){ct.push(ze[ft])}),{clusters:ct,clusterEdges:bt}},y_=_O,EO=function(e,t,n,i,a,s,o,l){return t===void 0&&(t=!1),n===void 0&&(n="weight"),i===void 0&&(i=1e-4),a===void 0&&(a=void 0),s===void 0&&(s=[]),o===void 0&&(o=["id"]),l===void 0&&(l=1),y_(e,t,n,i,!0,a,s,o,l)},xO=EO,bO=function(e,t){var n;t===void 0&&(t=1);for(var i=Ju(e),a=i.nodes,s=a===void 0?[]:a,o=i.edges,l=o===void 0?[]:o,u=function(){var S=lg({nodes:s,edges:l}),N=Object.keys(S);N.sort(function(V,Y){var q,ne;return((q=S[V])===null||q===void 0?void 0:q.degree)-((ne=S[Y])===null||ne===void 0?void 0:ne.degree)});var U=N[0];if(!s.length||((n=S[U])===null||n===void 0?void 0:n.degree)>=t)return"break";var H=s.findIndex(function(V){return V.id===U});s.splice(H,1),l=l.filter(function(V){return!(V.source===U||V.target===U)})};;){var h=u();if(h==="break")break}return{nodes:s,edges:l}},wO=bO,__=function(e,t,n){var i=[];switch(e){case fs.EuclideanDistance:i=t[n];break;default:i=[];break}return i},MO=function(e,t,n,i,a,s){t===void 0&&(t=3),n===void 0&&(n=void 0),i===void 0&&(i=[]),a===void 0&&(a=["id"]),s===void 0&&(s=fs.EuclideanDistance);var o=e.nodes,l=o===void 0?[]:o,u=e.edges,h=u===void 0?[]:u,p={clusters:[{id:"0",nodes:l}],clusterEdges:[]};if(s===fs.EuclideanDistance&&!l.every(function(Ft){return Ft.hasOwnProperty(n)}))return p;var S=[],N=[];if(s===fs.EuclideanDistance&&(S=zh(l,n),N=Uh(S,i,a)),!N.length)return p;for(var U=fg(N.map(function(Ft){return Ft.join("")})),H=Math.min(t,l.length,U.length),V=0;Vue&&!Y.find(function(kn){return sO(kn,__(s,N,l[nn].originIndex))})&&(ue=Dn,fe=nn)}},ve=0;ve=0;et--)ne[Number(l[V].clusterId)][et].id===l[V].id&&ne[Number(l[V].clusterId)].splice(et,1);l[V].clusterId=String(Oe),ne[Oe].push(l[V])}}for(var st=!1,V=0;V=1e3)break}var ft=[],At={};return h.forEach(function(Ft){var Vt,nn,hn=Ft.source,rn=Ft.target,bn=(Vt=l.find(function(or){return or.id===hn}))===null||Vt===void 0?void 0:Vt.clusterId,Dn=(nn=l.find(function(or){return or.id===rn}))===null||nn===void 0?void 0:nn.clusterId,kn="".concat(bn,"---").concat(Dn);if(At[kn])At[kn].count++;else{var $n={source:bn,target:Dn,count:1};At[kn]=$n,ft.push($n)}}),{clusters:ne,clusterEdges:ft}},AO=MO,TO=function(e,t){var n=new $a(t),i=n.norm2(),a=new $a(e),s=a.norm2(),o=n.dot(a),l=i*s,u=l?o/l:0;return u},E_=TO,PO=function(e,t,n,i,a){e===void 0&&(e=[]),n===void 0&&(n=void 0),i===void 0&&(i=[]),a===void 0&&(a=[]);var s=Ju(e.filter(function(S){return S.id!==t.id})),o=e.findIndex(function(S){return S.id===t.id}),l=zh(e,n),u=Uh(l,i,a),h=u[o],p=[];return s.forEach(function(S,N){if(S.id!==t.id){var U=u[N],H=E_(U,h);p.push(H),S.cosineSimilarity=H}}),s.sort(function(S,N){return N.cosineSimilarity-S.cosineSimilarity}),{allCosineSimilarity:p,similarNodes:s}},SO=PO,OO=function(){function r(e){this.count=e.length,this.parent={};for(var t=0,n=e;t0&&(this.list[0]=t,this.moveDown(0)),e},r.prototype.insert=function(e){if(e!==null){this.list.push(e);var t=this.list.length-1;return this.moveUp(t),!0}return!1},r.prototype.moveUp=function(e){for(var t=this.getParent(e);e&&e>0&&this.compareFn(this.list[t],this.list[e])>0;){var n=this.list[t];this.list[t]=this.list[e],this.list[e]=n,e=t,t=this.getParent(e)}},r.prototype.moveDown=function(e){var t,n=e,i=this.getLeft(e),a=this.getRight(e),s=this.list.length;i!==null&&i0?n=i:a!==null&&a0&&(n=a),e!==n&&(t=[this.list[n],this.list[e]],this.list[e]=t[0],this.list[n]=t[1],this.moveDown(n))},r}(),RO=LO,IO=function(e,t){var n=[],i=e.nodes,a=i===void 0?[]:i,s=e.edges,o=s===void 0?[]:s;if(a.length===0)return n;var l=a[0],u=new Set;u.add(l);var h=function(V,Y){return t?V.weight-Y.weight:0},p=new RO(h);for(Ih(l.id,o).forEach(function(H){p.insert(H)});!p.isEmpty();){var S=p.delMin(),N=S.source,U=S.target;u.has(N)&&u.has(U)||(n.push(S),u.has(N)||(u.add(N),Ih(N,o).forEach(function(H){p.insert(H)})),u.has(U)||(u.add(U),Ih(U,o).forEach(function(H){p.insert(H)})))}return n},x_=function(e,t){var n=[],i=e.nodes,a=i===void 0?[]:i,s=e.edges,o=s===void 0?[]:s;if(a.length===0)return n;var l=o.map(function(N){return N});t&&l.sort(function(N,U){return N.weight-U.weight});for(var u=new DO(a.map(function(N){return N.id}));l.length>0;){var h=l.shift(),p=h.source,S=h.target;u.connected(p,S)||(n.push(h),u.union(p,S))}return n},NO=function(e,t,n){var i={prim:IO,kruskal:x_};return n?i[n](e,t):x_(e,t)},BO=NO,kO=function(e,t,n){typeof t!="number"&&(t=1e-6),typeof n!="number"&&(n=.85);for(var i=1,a=0,s=1e3,o=e.nodes,l=o===void 0?[]:o,u=e.edges,h=u===void 0?[]:u,p=l.length,S,N={},U={},H=0;H0&&i>t;){a=0;for(var H=0;H0&&(S+=U[ue]/fe)}N[Y]=n*S,a+=N[Y]}}a=(1-a)/p,i=0;for(var H=0;H=0;n--){var i=this.dfsEdgeList[n],a=i.fromNode,s=i.toNode;aN||i.hasNode(s[S.to])||(t.labelne;ue--){var fe=le(ue);if(fe==="break")break}if(Y){var de=e.findMinLabel(V);s.dfsEdgeList.push(new cl(H,q,ks,de.edgeLabel,ks));var ve=s.dfsEdgeList.length-1;return e.dfsCode.dfsEdgeList[ve]!==s.dfsEdgeList[ve]?!1:p(V[de.edgeLabel].projected)}var Te={};Y=!1;var Oe=0;S.forEach(function(bt){var _t=new Hh(bt),ct=e.findForwardPureEdges(i,_t.edges[N[0]],U,_t);ct.length>0&&(Y=!0,Oe=H,ct.forEach(function(ft){var At="".concat(ft.label,"-").concat(a[ft.to].label);Te[At]||(Te[At]={projected:[],edgeLabel:ft.label,nodeLabel2:a[ft.to].label}),Te[At].projected.push({graphId:i.id,edge:ft,preNode:bt})}))});for(var Ie=N.length,ze=function(_t){if(Y)return"break";var ct=N[_t];S.forEach(function(ft){var At=new Hh(ft),Ft=e.findForwardRmpathEdges(i,At.edges[ct],U,At);Ft.length>0&&(Y=!0,Oe=s.dfsEdgeList[ct].fromNode,Ft.forEach(function(Vt){var nn="".concat(Vt.label,"-").concat(a[Vt.to].label);Te[nn]||(Te[nn]={projected:[],edgeLabel:Vt.label,nodeLabel2:a[Vt.to].label}),Te[nn].projected.push({graphId:i.id,edge:Vt,preNode:ft})}))})},ue=0;ue=0;U--){var H=t.findBackwardEdge(p,N.edges[a[U]],N.edges[a[0]],N);if(H){var V="".concat(t.dfsCode.dfsEdgeList[a[U]].fromNode,"-").concat(H.label);u[V]||(u[V]={projected:[],toNodeId:t.dfsCode.dfsEdgeList[a[U]].fromNode,edgeLabel:H.label}),u[V].projected.push({graphId:h.graphId,edge:H,preNode:h})}}if(!(i>=t.maxNodeNum)){var Y=t.findForwardPureEdges(p,N.edges[a[0]],o,N);Y.forEach(function(ne){var le="".concat(s,"-").concat(ne.label,"-").concat(S[ne.to].label);l[le]||(l[le]={projected:[],fromNodeId:s,edgeLabel:ne.label,nodeLabel2:S[ne.to].label}),l[le].projected.push({graphId:h.graphId,edge:ne,preNode:h})});for(var q=function(le){var ue=t.findForwardRmpathEdges(p,N.edges[a[le]],o,N);ue.forEach(function(fe){var de="".concat(t.dfsCode.dfsEdgeList[a[le]].fromNode,"-").concat(fe.label,"-").concat(S[fe.to].label);l[de]||(l[de]={projected:[],fromNodeId:t.dfsCode.dfsEdgeList[a[le]].fromNode,edgeLabel:fe.label,nodeLabel2:S[fe.to].label}),l[de].projected.push({graphId:h.graphId,edge:fe,preNode:h})})},U=0;Une){var le=ne;ne=q,q=le}var ue=Y.label,fe="".concat(u,"-").concat(q,"-").concat(ue,"-").concat(ne),de="".concat(q,"-").concat(ue,"-").concat(ne);if(!s[de]){var ve=s[de]||0;ve++,s[de]=ve}l[fe]={graphId:u,nodeLabel1:q,edgeLabel:ue,nodeLabel2:ne}})})}),Object.keys(a).forEach(function(u){var h=a[u];if(!(h2*t)););if(V<2*t&&(o["".concat(h,"-").concat(H)]={start:h,end:H,distance:a[h][H]},p++,l++,l>=n))return o;if(S++,S>2*t)break}if(pS&&(l=S);var N=n[p.id].inDegree;u>N&&(u=N);var U=n[p.id].outDegree;h>U&&(h=U)}),e[t]={degree:l,inDegree:u,outDegree:h}),{minPatternNodeLabelDegree:l,minPatternNodeLabelInDegree:u,minPatternNodeLabelOutDegree:h}},XO=function(e,t,n,i,a,s,o){var l;if(n===void 0&&(n=!1),s===void 0&&(s="cluster"),o===void 0&&(o="cluster"),!(!e||!e.nodes)){var u=e.nodes.length;if(u){var h=pg(e,n),p=pg(t,n),S=R_(e.nodes,h,n),N=R_(t.nodes,p,n),U=C_(e.nodes,s),H=U.nodeMap,V=U.nodeLabelMap,Y=C_(t.nodes,s),q=Y.nodeMap,ne=Y.nodeLabelMap;L_(e.edges,o,H);var le=L_(t.edges,o,q).edgeLabelMap,ue=[];p==null||p.forEach(function(Xn){ue=ue.concat(Xn)}),a||(a=Math.max.apply(Math,(0,xe.ev)((0,xe.ev)([],ue,!1),[2],!1))),i||(i=a);var fe=O_(e,h,s,i),de=O_(t,p,s,i),ve=Math.min(100,u*(u-1)/2),Te=VO(i,u,ve,fe,h),Oe=Gh(Te,fe,e),Ie=10,ze=1,Xe=1,et=4,st={graphs:Oe,nodeLabelProp:s,edgeLabelProp:o,minSupport:ze,minNodeNum:Xe,maxNodeNum:et,directed:n},bt=jO(st).slice(0,Ie),_t=bt.length,ct=[];bt.forEach(function(Xn,yr){ct[yr]={},Object.keys(Oe).forEach(function(Qn){var fr=Oe[Qn],wr=jh(fr,Xn,s,o);ct[yr][Qn]=wr})});var ft=ZO(ct,_t,bt),At=ft.structure,Ft=ft.structureCountMap,Vt=t.nodes[0],nn=[],hn=(l=t.nodes[0])===null||l===void 0?void 0:l[s],rn=-1/0;t.nodes.forEach(function(Xn){var yr=Xn[s],Qn=V[yr];(Qn==null?void 0:Qn.length)>rn&&(rn=Qn.length,nn=Qn,hn=yr,Vt=Xn)});var bn={},Dn={},kn={},$n={},or={},$i={};Object.keys(ne).forEach(function(Xn,yr){or[Xn]=[],n&&($i[Xn]=[]);var Qn=-1/0,fr=ne[Xn],wr={};fr.forEach(function(Er){var vr=N["".concat(Vt.id,"-").concat(Er.id)];if(vr&&or[Xn].push(vr),Qnor[Xn][ua]){mu=!0;break}if(mu)return nn.splice(vr,1),"continue";var ns={};Ua.neighbors.forEach(function(ca){var bs=S["".concat(si.id,"-").concat(ca.id)];ns["".concat(si.id,"-").concat(ca.id)]={start:H[si.id].idx,end:H[ca.id].idx,distance:bs}}),Oe=Gh(ns,fe,e,Oe);var Ws=[];Object.keys(ns).forEach(function(ca){if(Ft[ca]){Ws.push(Ft[ca]);return}var bs=Oe[ca];Ft[ca]=jh(bs,At,s,o),Ws.push(Ft[ca])}),Ws=Ws.sort(function(ca,bs){return bs-ca});for(var Go=!1,ua=0;ua=0;wi--)_r(wi)});var mr=[];nn==null||nn.forEach(function(Xn){for(var yr=H[Xn.id].idx,Qn=D_(e.nodes,h[yr],yr,s,a),fr=Qn.neighbors,wr=fr.length,xn=!1,dr=wr-1;dr>=0;dr--){if(fr.length+1Ua){fr.splice(dr,1);continue}if(n){var vi="".concat(_r.id,"-").concat(Xn.id),Ol=S[vi];si=$i[wi].length-1;var mu=$i[wi][si];if(Ol>mu){fr.splice(dr,1);continue}}var ua=Ft[Er]?Ft[Er]:KO(e,Xn,_r,H,vr,fe,At,s,o,Ft,Oe),ns="".concat(Vt.id,"-").concat(wi),Ws=$n[ns][$n[ns].length-1];if(ua=0;vr--){var mu=Ol(vr);if(mu==="break")break}if(vi)return mr.splice(yr,1),"continue";Qn.edges=dr;var ua=Fh(Qn,Qn.nodes[0].id,!1).length;if(Object.keys(ua).reverse().forEach(function(Hr){if(!(Hr===Qn.nodes[0].id||vi)){if(ua[Hr]===1/0){var Wa=xn[Hr].node[s];if(wr[Wa]--,wr[Wa]ea[Hs][ea[Hs].length-1]){var Wa=xn[Hr].node[s];if(wr[Wa]--,wr[Wa]=0;bs--){var oo=Qn.nodes[bs],v2=xn[oo.id].degree,u8=xn[oo.id].inDegree,c8=xn[oo.id].outDegree,h8=oo[s],_p=I_(bn,h8,q,ne),g2=_p.minPatternNodeLabelDegree,f8=_p.minPatternNodeLabelInDegree,d8=_p.minPatternNodeLabelOutDegree,v8=n?v2=0;Xd--){var lo=dr[Xd];if(!xn[lo.source]||!xn[lo.target]){dr.splice(Xd,1);var Yd=lo[o];if(_r[Yd]--,xn[lo.source]&&(xn[lo.source].degree--,xn[lo.source].outDegree--),xn[lo.target]&&(xn[lo.target].degree--,xn[lo.target].inDegree--),le[Yd]&&_r[Yd]=0;Ii--){var so=Hi(Ii);if(so==="break")break}for(var Gi=mr.length,wa=function(yr){var Qn=mr[yr],fr={};Qn.edges.forEach(function(dr){var _r="".concat(dr.source,"-").concat(dr.target,"-").concat(dr.label);fr[_r]?fr[_r]++:fr[_r]=1});for(var wr=function(_r){var wi=mr[_r],Er={};wi.edges.forEach(function(si){var Ua="".concat(si.source,"-").concat(si.target,"-").concat(si.label);Er[Ua]?Er[Ua]++:Er[Ua]=1});var vr=!0;Object.keys(Er).length!==Object.keys(fr).length?vr=!1:Object.keys(fr).forEach(function(si){Er[si]!==fr[si]&&(vr=!1)}),vr&&mr.splice(_r,1)},xn=Gi-1;xn>yr;xn--)wr(xn);Gi=mr.length},Ii=0;Ii<=Gi-1;Ii++)wa(Ii);return mr}}},YO=XO,QO=function(){function r(e){e===void 0&&(e=10),this.linkedList=new $y,this.maxStep=e}return Object.defineProperty(r.prototype,"length",{get:function(){return this.linkedList.toArray().length},enumerable:!1,configurable:!0}),r.prototype.isEmpty=function(){return!this.linkedList.head},r.prototype.isMaxStack=function(){return this.toArray().length>=this.maxStep},r.prototype.peek=function(){return this.isEmpty()?null:this.linkedList.head.value},r.prototype.push=function(e){this.linkedList.prepend(e),this.length>this.maxStep&&this.linkedList.deleteTail()},r.prototype.pop=function(){var e=this.linkedList.deleteHead();return e?e.value:null},r.prototype.toArray=function(){return this.linkedList.toArray().map(function(e){return e.value})},r.prototype.clear=function(){for(;!this.isEmpty();)this.pop()},r}(),JO=QO,qO=o_,xU={getAdjMatrix:Rh,breadthFirstSearch:CS,connectedComponent:n_,getDegree:lg,getInDegree:RS,getOutDegree:IS,detectCycle:o_,detectDirectedCycle:qO,detectAllCycles:kS,detectAllDirectedCycle:s_,detectAllUndirectedCycle:a_,depthFirstSearch:i_,dijkstra:Fh,findAllPath:cO,findShortestPath:gg,floydWarshall:pg,labelPropagation:dO,louvain:y_,iLouvain:xO,kCore:wO,kMeans:AO,cosineSimilarity:E_,nodesCosineSimilarity:SO,minimumSpanningTree:BO,pageRank:b_,getNeighbors:qa,Stack:JO,GADDI:YO};function Et(r){if(r.id!==void 0)return r.id;if(r.source!==void 0&&r.target!==void 0)return`${r.source}-${r.target}`;throw new Error(Js("The datum does not have available id."))}function Vh(r){return r.combo}function N_(r,e){const t={nodes:(r.nodes||[]).map(Et),edges:(r.edges||[]).map(Et),combos:(r.combos||[]).map(Et)};return e?Object.values(t).flat():t}const B_=(r,e,t)=>{var n;switch(t.type){case"degree":{const i=new Map;return(n=r.nodes)===null||n===void 0||n.forEach(a=>{const s=e(Et(a),t.direction).length;i.set(Et(a),s)}),i}case"betweenness":return $O(r,t.directed,t.weightPropertyName);case"closeness":return eD(r,t.directed,t.weightPropertyName);case"eigenvector":return nD(r,t.directed);case"pagerank":return tD(r,t.epsilon,t.linkProb);default:return k_(r)}},k_=r=>{var e;const t=new Map;return(e=r.nodes)===null||e===void 0||e.forEach(n=>{t.set(Et(n),0)}),t},$O=(r,e,t)=>{const n=k_(r),{nodes:i=[]}=r;return i.forEach(a=>{i.forEach(s=>{if(a!==s){const{allPath:o}=gg(r,Et(a),Et(s),e,t),l=o.length;o.flat().forEach(u=>{u!==Et(a)&&u!==Et(s)&&n.set(u,n.get(u)+1/l)})}})}),n},eD=(r,e,t)=>{const n=new Map,{nodes:i=[]}=r;return i.forEach(a=>{const s=i.reduce((o,l)=>{if(a!==l){const{length:u}=gg(r,Et(a),Et(l),e,t);o+=u}return o},0);n.set(Et(a),1/s)}),n},tD=(r,e,t)=>{var n;const i=new Map,a=b_(r,e,t);return(n=r.nodes)===null||n===void 0||n.forEach(s=>{i.set(Et(s),a[Et(s)])}),i},nD=(r,e)=>{const{nodes:t=[]}=r,n=rD(r,e),i=iD(n,t.length),a=new Map;return t.forEach((s,o)=>{a.set(Et(s),i[o])}),a},rD=(r,e)=>{const{nodes:t=[],edges:n=[]}=r,i=Array(t.length).fill(null).map(()=>Array(t.length).fill(0));return n.forEach(({source:a,target:s})=>{const o=t.findIndex(u=>Et(u)===a),l=t.findIndex(u=>Et(u)===s);e?i[o][l]=1:(i[o][l]=1,i[l][o]=1)}),i},iD=(r,e,t=100,n=1e-6)=>{let i=Array(e).fill(1),a=1/0;for(let s=0;sn;s++){const o=Array(e).fill(0);for(let u=0;uu+h*h,0));for(let u=0;uu+(h-i[p])*h,0)),i=o}return i};function Ao(r,e,t,n=ci){const i=new Map(r.map(S=>[t(S),S])),a=new Map(e.map(S=>[t(S),S])),s=new Set(i.keys()),o=new Set(a.keys()),l=[],u=[],h=[],p=[];return o.forEach(S=>{s.has(S)?n(i.get(S),a.get(S))?p.push(a.get(S)):u.push(a.get(S)):l.push(a.get(S))}),s.forEach(S=>{o.has(S)||h.push(i.get(S))}),{enter:l,exit:h,keep:p,update:u}}function hl(r,e,t){const n=i=>{t&&!t(i)||(i.style.visibility=e)};r.forEach(i=>{n(i)})}function aD(r,e,t){const n={},i=a=>(a in n||(n[a]=0),`${e}-${a}-${n[a]++}`);return t.map(a=>typeof a=="string"?{type:a,key:i(a)}:typeof a=="function"?a.call(r):a.key?a:Object.assign(Object.assign({},a),{key:i(a.type)}))}class _g{constructor(e){this.extensions=[],this.extensionMap={},this.context=e}setExtensions(e){const t=aD(this.context.graph,this.category,e),{enter:n,update:i,exit:a,keep:s}=Ao(this.extensions,t,o=>o.key);this.createExtensions(n),this.updateExtensions([...i,...s]),this.destroyExtensions(a),this.extensions=t}createExtension(e){const{category:t}=this,{key:n,type:i}=e,a=Qs(t,i);if(!a)return Ea.warn(`The extension ${i} of ${t} is not registered.`);const s=new a(this.context,e);this.extensionMap[n]=s}createExtensions(e){e.forEach(t=>this.createExtension(t))}updateExtension(e){const{key:t}=e,n=this.extensionMap[t];n&&n.update(e)}updateExtensions(e){e.forEach(t=>this.updateExtension(t))}destroyExtension(e){const t=this.extensionMap[e];t&&(t.destroy(),delete this.extensionMap[e])}destroyExtensions(e){e.forEach(({key:t})=>this.destroyExtension(t))}destroy(){Object.values(this.extensionMap).forEach(e=>e.destroy()),this.context={},this.extensions=[],this.extensionMap={}}}class Eg{constructor(e,t){this.events=[],this.destroyed=!1,this.context=e,this.options=t}update(e){this.options=Object.assign(this.options,e)}destroy(){this.context={},this.options={},this.destroyed=!0}}class Ca extends Eg{}class Zh extends Ca{constructor(e,t){super(e,Object.assign({},Zh.defaultOptions,t)),this.isOverlapping=(n,i)=>i.some(a=>n.intersects(a)),this.occupiedBounds=[],this.detectLabelCollision=n=>{const i=this.context.viewport,a={show:[],hide:[]};return this.occupiedBounds=[],n.forEach(s=>{const o=s.getShape("label").getRenderBounds();i.isInViewport(o,!0)&&!this.isOverlapping(o,this.occupiedBounds)?(a.show.push(s),this.occupiedBounds.push(Mo(o,this.options.padding))):a.hide.push(s)}),a},this.hideLabelIfExceedViewport=(n,i)=>{const{exit:a}=Ao(n,i,s=>s.id);a==null||a.forEach(this.hideLabel)},this.nodeCentralities=new Map,this.sortNodesByCentrality=(n,i)=>{const{model:a}=this.context,s=a.getData(),o=a.getRelatedEdgesData.bind(a);return n.map(u=>(this.nodeCentralities.has(u.id)||(this.nodeCentralities=B_(s,o,i)),{node:u,centrality:this.nodeCentralities.get(u.id)})).sort((u,h)=>h.centrality-u.centrality).map(u=>u.node)},this.sortLabelElementsInView=n=>{const{sort:i,sortNode:a,sortCombo:s,sortEdge:o}=this.options,{model:l}=this.context;if(yn(i))return n.sort((H,V)=>i(l.getElementDataById(H.id),l.getElementDataById(V.id)));const{node:u=[],edge:h=[],combo:p=[]}=Ch(n,H=>H.type),S=yn(s)?p.sort((H,V)=>s(...l.getComboData([H.id,V.id]))):p,N=yn(a)?u.sort((H,V)=>a(...l.getNodeData([H.id,V.id]))):this.sortNodesByCentrality(u,a),U=yn(o)?h.sort((H,V)=>o(...l.getEdgeData([H.id,V.id]))):h;return[...S,...N,...U]},this.labelElementsInView=[],this.isFirstRender=!0,this.onToggleVisibility=n=>{var i;if(((i=n.data)===null||i===void 0?void 0:i.stage)==="zIndex")return;if(!this.validate(n)){this.hiddenElements.size>0&&(this.hiddenElements.forEach(this.showLabel),this.hiddenElements.clear());return}const a=this.isFirstRender?this.getLabelElements():this.getLabelElementsInView();this.hideLabelIfExceedViewport(this.labelElementsInView,a),this.labelElementsInView=a;const s=this.sortLabelElementsInView(this.labelElementsInView),{show:o,hide:l}=this.detectLabelCollision(s);for(let u=o.length-1;u>=0;u--)this.showLabel(o[u]);l.forEach(this.hideLabel)},this.hiddenElements=new Map,this.hideLabel=n=>{const i=n.getShape("label");i&&hl(i,"hidden"),this.hiddenElements.set(n.id,n)},this.showLabel=n=>{const i=n.getShape("label");i&&hl(i,"visible"),n.toFront(),this.hiddenElements.delete(n.id)},this.onTransform=Qy(this.onToggleVisibility,this.options.throttle,{leading:!0}),this.enableToggle=!0,this.toggle=n=>{this.enableToggle&&this.onToggleVisibility(n)},this.onBeforeRender=()=>{this.enableToggle=!1},this.onAfterRender=n=>{this.onToggleVisibility(n),this.enableToggle=!0},this.bindEvents()}update(e){this.unbindEvents(),super.update(e),this.bindEvents(),this.onToggleVisibility({})}getLabelElements(){const{elementMap:e}=this.context.element,t=[];for(const n in e){const i=e[n];i.isVisible()&&i.getShape("label")&&t.push(i)}return t}getLabelElementsInView(){const e=this.context.viewport;return this.getLabelElements().filter(t=>e.isInViewport(t.getShape("key").getRenderBounds()))}bindEvents(){const{graph:e}=this.context;e.on(Qt.BEFORE_RENDER,this.onBeforeRender),e.on(Qt.AFTER_RENDER,this.onAfterRender),e.on(Qt.AFTER_DRAW,this.toggle),e.on(Qt.AFTER_LAYOUT,this.toggle),e.on(Qt.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:e}=this.context;e.off(Qt.BEFORE_RENDER,this.onBeforeRender),e.off(Qt.AFTER_RENDER,this.onAfterRender),e.off(Qt.AFTER_DRAW,this.toggle),e.off(Qt.AFTER_LAYOUT,this.toggle),e.off(Qt.AFTER_TRANSFORM,this.onTransform)}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}destroy(){this.unbindEvents(),super.destroy()}}Zh.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var sD=function(r){if(!tg(r)||!Vp(r,"Object"))return!1;if(Object.getPrototypeOf(r)===null)return!0;for(var e=r;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e},Ql=sD,oD=5;function lD(r,e){if(Object.hasOwn)return Object.hasOwn(r,e);if(r==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(r),e)}function F_(r,e,t,n){t=t||0,n=n||oD;for(var i in e)if(lD(e,i)){var a=e[i];a!==null&&Ql(a)?(Ql(r[i])||(r[i]={}),tt+e[n])}function Or(r,e){return r.map((t,n)=>t-e[n])}function ds(r,e){return typeof e=="number"?r.map(t=>t*e):r.map((t,n)=>t*e[n])}function vs(r,e){return typeof e=="number"?r.map(t=>t/e):r.map((t,n)=>t/e[n])}function cD(r,e){return r.reduce((t,n,i)=>t+n*e[i],0)}function hD(r,e){const t=qu(r),n=qu(e);return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function To(r,e){return r.map(t=>t*e)}function Wr(r,e){return Math.sqrt(r.reduce((t,n,i)=>t+Math.pow(n-e[i]||0,2),0))}function Kh(r,e){return r.reduce((t,n,i)=>t+Math.abs(n-e[i]),0)}function qs(r){const e=r.reduce((t,n)=>t+Math.pow(n,2),0);return r.map(t=>t/Math.sqrt(e))}function xg(r,e,t=!1){const n=r[0]*e[1]-r[1]*e[0];let i=Math.acos(ds(r,e).reduce((a,s)=>a+s,0)/(Wr(r,z_)*Wr(e,z_)));return t&&n<0&&(i=2*Math.PI-i),i}function bU(r,e){return r.every((t,n)=>t===e[n])}function Xh(r,e=!0){return e?[-r[1],r[0]]:[r[1],-r[0]]}function bg(r,e){return r.map(t=>t%e)}function fl(r){return[r[0],r[1]]}function qu(r){return pS(r)?[r[0],r[1],0]:r}function U_(r){const[e,t]=r;return!e&&!t?0:Math.atan2(t,e)}function W_(r,e){const[t,n]=r,[i,a]=e,s=Or(t,n),o=Or(i,a);return hD(s,o).every(l=>l===0)}function wg(r,e,t=!1){if(W_(r,e))return;const[n,i]=r,[a,s]=e,o=((n[0]-a[0])*(a[1]-s[1])-(n[1]-a[1])*(a[0]-s[0]))/((n[0]-i[0])*(a[1]-s[1])-(n[1]-i[1])*(a[0]-s[0])),l=s[0]-a[0]?(n[0]-a[0]+o*(i[0]-n[0]))/(s[0]-a[0]):(n[1]-a[1]+o*(i[1]-n[1]))/(s[1]-a[1]);if(!(!t&&(!Is(o,0,1)||!Is(l,0,1))))return[n[0]+o*(i[0]-n[0]),n[1]+o*(i[1]-n[1])]}function H_(r){if(Array.isArray(r))return Is(r[0],0,1)&&Is(r[1],0,1)?r:[.5,.5];const e=r.split("-"),t=e.includes("left")?0:e.includes("right")?1:.5,n=e.includes("top")?0:e.includes("bottom")?1:.5;return[t,n]}function Ti(r){const{x:e=0,y:t=0,z:n=0}=r.style||{};return[+e,+t,+n]}function fD(r){const{x:e,y:t,z:n}=r.style||{};return e!==void 0||t!==void 0||n!==void 0}function G_(r,e){const[t,n]=e,{min:i,max:a}=r;return[i[0]+t*(a[0]-i[0]),i[1]+n*(a[1]-i[1])]}function $s(r,e="center"){const t=H_(e);return G_(r,t)}function wU(r,e){const t=parseAnchor(e);return G_(r,t)}const MU=r=>{const[e,t]=r;return{left:Math.min(e[0],t[0]),right:Math.max(e[0],t[0]),top:Math.min(e[1],t[1]),bottom:Math.max(e[1],t[1])}};function Fi(r){var e;return[r.x,r.y,(e=r.z)!==null&&e!==void 0?e:0]}function gs(r){var e;return{x:r[0],y:r[1],z:(e=r[2])!==null&&e!==void 0?e:0}}function AU(r){return r.sort((e,t)=>e[0]-t[0]||e[1]-t[1])}function TU(r){const e=new Set;return r.filter(t=>{const n=t.join(",");return e.has(n)?!1:(e.add(n),!0)})}function $u(r,e=0){return r.map(t=>parseFloat(t.toFixed(e)))}function Po(r,e,t,n=!1){if(ci(r,e))return r;const i=n?Or(r,e):Or(e,r),a=qs(i),s=[a[0]*t,a[1]*t];return Un(fl(r),s)}function j_(r,e){return r[1]===e[1]}function dD(r,e){return r[0]===e[0]}function vD(r,e){return j_(r,e)||dD(r,e)}function V_(r,e,t){return W_([r,e],[e,t])}function Z_(r,e){return[2*e[0]-r[0],2*e[1]-r[1]]}function K_(r,e,t,n=!0,i=!1){for(let a=0;aa!=N>a&&i<(S-h)*(a-p)/(N-p)+h&&(s=!s)}return s}function pD(r,e,t=!1){const n=$s(e,"center"),i=[$s(e,"left-top"),$s(e,"right-top"),$s(e,"right-bottom"),$s(e,"left-bottom")];return K_(r,n,i,!1,t).point}function Yh(r,e,t=!1){const n=e.center,i=t?Z_(r,n):r,a=Or(i,e.center),s=Math.atan2(a[1],a[0]);if(isNaN(s))return n;const o=Ns(e)/2,l=Bs(e)/2,u=n[0]+o*Math.cos(s),h=n[1]+l*Math.sin(s);return[u,h]}function mD(r,e){let t=1/0,n=[r[0],e[0]];return r.forEach(i=>{e.forEach(a=>{const s=Wr(i,a);s{const a=_D(r,i);a1?h=1:h<0&&(h=0);const p=t+h*l,S=n+h*u;return[p,S]}function ED(r){const e=r.reduce((t,n)=>Un(t,n),[0,0]);return vs(e,r.length)}function Mg(r,e=!0){const t=ED(r);return r.sort(([n,i],[a,s])=>{const o=Math.atan2(i-t[1],n-t[0]),l=Math.atan2(s-t[1],a-t[0]);return e?l-o:o-l})}function Y_(r,e){return[r,[r[0],e[1]],e,[e[0],r[1]]]}class hi{constructor(e,t,n){if(this.phase=t,this.pointerByTouch=[],this.initialDistance=null,this.emitter=e,hi.instance)return hi.callbacks[this.phase].push(n),hi.instance;this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.bindEvents(),hi.instance=this,hi.callbacks[this.phase].push(n)}bindEvents(){const{emitter:e}=this;e.on(Lt.POINTER_DOWN,this.onPointerDown),e.on(Lt.POINTER_MOVE,this.onPointerMove),e.on(Lt.POINTER_UP,this.onPointerUp)}updatePointerPosition(e,t,n){const i=this.pointerByTouch.findIndex(a=>a.pointerId===e);i>=0&&(this.pointerByTouch[i]={x:t,y:n,pointerId:e})}onPointerDown(e){const{x:t,y:n}=e.client||{};if(!(t===void 0||n===void 0)&&(this.pointerByTouch.push({x:t,y:n,pointerId:e.pointerId}),e.pointerType==="touch"&&this.pointerByTouch.length===2)){hi.isPinching=!0;const i=this.pointerByTouch[0].x-this.pointerByTouch[1].x,a=this.pointerByTouch[0].y-this.pointerByTouch[1].y;this.initialDistance=Math.sqrt(i*i+a*a),hi.callbacks.pinchstart.forEach(s=>s(e,{scale:0}))}}onPointerMove(e){if(this.pointerByTouch.length!==2||this.initialDistance===null)return;const{x:t,y:n}=e.client||{};if(t===void 0||n===void 0)return;this.updatePointerPosition(e.pointerId,t,n);const i=this.pointerByTouch[0].x-this.pointerByTouch[1].x,a=this.pointerByTouch[0].y-this.pointerByTouch[1].y,o=Math.sqrt(i*i+a*a)/this.initialDistance;hi.callbacks.pinchmove.forEach(l=>l(e,{scale:(o-1)*5}))}onPointerUp(e){var t;hi.callbacks.pinchend.forEach(n=>n(e,{scale:0})),hi.isPinching=!1,this.initialDistance=null,this.pointerByTouch=[],(t=hi.instance)===null||t===void 0||t.tryDestroy()}destroy(){this.emitter.off(Lt.POINTER_DOWN,this.onPointerDown),this.emitter.off(Lt.POINTER_MOVE,this.onPointerMove),this.emitter.off(Lt.POINTER_UP,this.onPointerUp),hi.instance=null}off(e,t){const n=hi.callbacks[e].indexOf(t);n>-1&&hi.callbacks[e].splice(n,1),this.tryDestroy()}tryDestroy(){Object.values(hi.callbacks).every(e=>e.length===0)&&this.destroy()}}hi.isPinching=!1,hi.instance=null,hi.callbacks={pinchstart:[],pinchmove:[],pinchend:[]};const Q_=r=>r.map(e=>ur(e)?e.toLocaleLowerCase():e);class Jl{constructor(e){this.map=new Map,this.boundHandlePinch=()=>{},this.recordKey=new Set,this.onKeyDown=t=>{t!=null&&t.key&&(this.recordKey.add(t.key),this.trigger(t))},this.onKeyUp=t=>{t!=null&&t.key&&this.recordKey.delete(t.key)},this.onWheel=t=>{this.triggerExtendKey(Lt.WHEEL,t)},this.onDrag=t=>{this.triggerExtendKey(Lt.DRAG,t)},this.handlePinch=(t,n)=>{this.triggerExtendKey(Lt.PINCH,Object.assign(Object.assign({},t),n))},this.onFocus=()=>{this.recordKey.clear()},this.emitter=e,this.bindEvents()}bind(e,t){e.length!==0&&(e.includes(Lt.PINCH)&&!this.pinchHandler&&(this.boundHandlePinch=this.handlePinch.bind(this),this.pinchHandler=new hi(this.emitter,"pinchmove",this.boundHandlePinch)),this.map.set(e,t))}unbind(e,t){this.map.forEach((n,i)=>{ci(i,e)&&(!t||t===n)&&this.map.delete(i)})}unbindAll(){this.map.clear()}match(e){const t=Q_(Array.from(this.recordKey)).sort(),n=Q_(e).sort();return ci(t,n)}bindEvents(){var e;const{emitter:t}=this;t.on(Lt.KEY_DOWN,this.onKeyDown),t.on(Lt.KEY_UP,this.onKeyUp),t.on(Lt.WHEEL,this.onWheel),t.on(Lt.DRAG,this.onDrag),(e=globalThis.addEventListener)===null||e===void 0||e.call(globalThis,"focus",this.onFocus)}trigger(e){this.map.forEach((t,n)=>{this.match(n)&&t(e)})}triggerExtendKey(e,t){this.map.forEach((n,i)=>{i.includes(e)&&ci(Array.from(this.recordKey),i.filter(a=>a!==e))&&n(t)})}destroy(){var e,t;this.unbindAll(),this.emitter.off(Lt.KEY_DOWN,this.onKeyDown),this.emitter.off(Lt.KEY_UP,this.onKeyUp),this.emitter.off(Lt.WHEEL,this.onWheel),this.emitter.off(Lt.DRAG,this.onDrag),(e=this.pinchHandler)===null||e===void 0||e.off("pinchmove",this.boundHandlePinch),(t=globalThis.removeEventListener)===null||t===void 0||t.call(globalThis,"blur",this.onFocus)}}class ec extends Ca{constructor(e,t){super(e,sa({},ec.defaultOptions,t)),this.shortcut=new Jl(e.graph),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.clearStates=this.clearStates.bind(this),this.bindEvents()}onPointerDown(e){if(!this.validate(e)||!this.isKeydown()||this.startPoint)return;const{canvas:t,graph:n}=this.context,i=Object.assign({},this.options.style);this.options.style.lineWidth&&(i.lineWidth=+this.options.style.lineWidth/n.getZoom()),this.rectShape=new ki({id:"g6-brush-select",style:i}),t.appendChild(this.rectShape),this.startPoint=[e.canvas.x,e.canvas.y]}onPointerMove(e){var t;if(!this.startPoint)return;const{immediately:n,mode:i}=this.options;this.endPoint=Qh(e),(t=this.rectShape)===null||t===void 0||t.attr({x:Math.min(this.endPoint[0],this.startPoint[0]),y:Math.min(this.endPoint[1],this.startPoint[1]),width:Math.abs(this.endPoint[0]-this.startPoint[0]),height:Math.abs(this.endPoint[1]-this.startPoint[1])}),n&&i==="default"&&this.updateElementsStates(Y_(this.startPoint,this.endPoint))}onPointerUp(e){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=Qh(e),this.updateElementsStates(Y_(this.startPoint,this.endPoint)),this.clearBrush()}}clearStates(){this.endPoint||this.clearElementsStates()}clearElementsStates(){const{graph:e}=this.context,t=Object.values(e.getData()).reduce((n,i)=>Object.assign({},n,i.reduce((a,s)=>{var o;const l=(o=s.states||[])===null||o===void 0?void 0:o.filter(u=>u!==this.options.state);return a[Et(s)]=l,a},{})),{});e.setElementState(t,this.options.animation)}updateElementsStates(e){const{graph:t}=this.context,{enableElements:n,state:i,mode:a,onSelect:s}=this.options,o=this.selector(t,e,n);let l={};switch(a){case"union":o.forEach(u=>{l[u]=[...t.getElementState(u),i]});break;case"diff":o.forEach(u=>{const h=t.getElementState(u);l[u]=h.includes(i)?h.filter(p=>p!==i):[...h,i]});break;case"intersect":o.forEach(u=>{const h=t.getElementState(u);l[u]=h.includes(i)?[i]:[]});break;case"default":default:o.forEach(u=>{l[u]=[i]});break}yn(s)&&(l=s(l)),t.setElementState(l,this.options.animation)}selector(e,t,n){if(!n||n.length===0)return[];const i=[],a=e.getData();if(n.forEach(s=>{a[`${s}s`].forEach(o=>{const l=Et(o);e.getElementVisibility(l)!=="hidden"&&gD(e.getElementPosition(l),t)&&i.push(l)})}),n.includes("edge")){const s=a.edges;s==null||s.forEach(o=>{const{source:l,target:u}=o;i.includes(l)&&i.includes(u)&&i.push(Et(o))})}return i}clearBrush(){var e;(e=this.rectShape)===null||e===void 0||e.remove(),this.rectShape=void 0,this.startPoint=void 0,this.endPoint=void 0}isKeydown(){const{trigger:e}=this.options,t=Array.isArray(e)?e:[e];return this.shortcut.match(t.filter(n=>n!=="drag"))}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}bindEvents(){const{graph:e}=this.context;e.on(Lt.POINTER_DOWN,this.onPointerDown),e.on(Lt.POINTER_MOVE,this.onPointerMove),e.on(Lt.POINTER_UP,this.onPointerUp),e.on(Ys.CLICK,this.clearStates)}unbindEvents(){const{graph:e}=this.context;e.off(Lt.POINTER_DOWN,this.onPointerDown),e.off(Lt.POINTER_MOVE,this.onPointerMove),e.off(Lt.POINTER_UP,this.onPointerUp),e.off(Ys.CLICK,this.clearStates)}update(e){this.unbindEvents(),this.options=sa(this.options,e),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}ec.defaultOptions={animation:!1,enable:!0,enableElements:["node","combo","edge"],immediately:!1,mode:"default",state:"selected",trigger:["shift"],style:{width:0,height:0,lineWidth:1,fill:"#1677FF",stroke:"#1677FF",fillOpacity:.1,zIndex:2,pointerEvents:"none"}};const Qh=r=>[r.canvas.x,r.canvas.y],eo=.8,dl=["node","edge","combo"];function vl(r,e,t,n,i=0){n==="TB"&&e(r,i);const a=t(r);if(a)for(const s of a)vl(s,e,t,n,i+1);n==="BT"&&e(r,i)}function xD(r,e,t){const n=[[r,0]];for(;n.length;){const[i,a]=n.shift();e(i,a);const s=t(i);if(s)for(const o of s)n.push([o,a+1])}}function J_(r,e,t,n,i="both"){if(e==="combo"||e==="node")return Ag(r,t,n,i);const a=r.getEdgeData(t);if(!a)return[];const s=Ag(r,a.source,n-1,i),o=Ag(r,a.target,n-1,i);return Array.from(new Set([...s,...o,t]))}function Ag(r,e,t,n="both"){const i=new Set,a=new Set,s=new Set;return xD(e,(o,l)=>{l>t||(s.add(o),r.getRelatedEdgesData(o,n).forEach(u=>{const h=Et(u);!a.has(h)&&lr.getRelatedEdgesData(o,n).map(l=>l.source===o?l.target:l.source).filter(l=>i.has(l)?!1:(i.add(l),!0))),Array.from(s)}function Tg(r){return r.states||[]}var Jh=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class qh extends Ca{constructor(e,t){super(e,Object.assign({},qh.defaultOptions,t)),this.onClickSelect=n=>Jh(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.updateState(n),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.onClickCanvas=n=>Jh(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.clearState(),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.shortcut=new Jl(e.graph),this.bindEvents()}bindEvents(){const{graph:e}=this.context;this.unbindEvents(),dl.forEach(t=>{e.on(`${t}:${Lt.CLICK}`,this.onClickSelect)}),e.on(Ys.CLICK,this.onClickCanvas)}get isMultipleSelect(){const{multiple:e,trigger:t}=this.options;return e&&this.shortcut.match(t)}getNeighborIds(e){const{target:t,targetType:n}=e,{graph:i}=this.context,{degree:a}=this.options;return J_(i,n,t.id,typeof a=="function"?a(e):a).filter(s=>s!==t.id)}updateState(e){return Jh(this,void 0,void 0,function*(){const{state:t,unselectedState:n,neighborState:i,animation:a}=this.options;if(!t&&!i&&!n)return;const{target:s}=e,{graph:o}=this.context,l=o.getElementData(s.id),u=Tg(l).includes(t)?"unselect":"select",h={},p=this.isMultipleSelect,S=[s.id],N=this.getNeighborIds(e);if(p)if(Object.assign(h,this.getDataStates()),u==="select"){const U=(H,V)=>{H.forEach(Y=>{const q=new Set(o.getElementState(Y));q.add(V),q.delete(n),h[Y]=Array.from(q)})};U(S,t),U(N,i),n&&Object.keys(h).forEach(H=>{const V=h[H];!V.includes(t)&&!V.includes(i)&&!V.includes(n)&&h[H].push(n)})}else{const U=h[s.id];h[s.id]=U.filter(H=>H!==t&&H!==i),U.includes(n)||h[s.id].push(n),N.forEach(H=>{h[H]=h[H].filter(V=>V!==i),h[H].includes(t)||h[H].push(n)})}else if(u==="select"){Object.assign(h,this.getClearStates(!!n));const U=(H,V)=>{H.forEach(Y=>{h[Y]||(h[Y]=o.getElementState(Y)),h[Y].push(V)})};U(S,t),U(N,i),n&&Object.keys(h).forEach(H=>{!S.includes(H)&&!N.includes(H)&&h[H].push(n)})}else Object.assign(h,this.getClearStates());yield o.setElementState(h,a)})}getDataStates(){const{graph:e}=this.context,{nodes:t,edges:n,combos:i}=e.getData(),a={};return[...t,...n,...i].forEach(s=>{a[Et(s)]=Tg(s)}),a}getClearStates(e=!1){const{graph:t}=this.context,{state:n,unselectedState:i,neighborState:a}=this.options,s=new Set([n,i,a]),{nodes:o,edges:l,combos:u}=t.getData(),h={};return[...o,...l,...u].forEach(p=>{const S=Tg(p),N=S.filter(U=>!s.has(U));(e||N.length!==S.length)&&(h[Et(p)]=N)}),h}clearState(){return Jh(this,void 0,void 0,function*(){const{graph:e}=this.context;yield e.setElementState(this.getClearStates(),this.options.animation)})}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}unbindEvents(){const{graph:e}=this.context;dl.forEach(t=>{e.off(`${t}:${Lt.CLICK}`,this.onClickSelect)}),e.off(Ys.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}qh.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function xa(r){var e;return!!(!((e=r.style)===null||e===void 0)&&e.collapsed)}var ba=function(r,e,t){for(var n=0,i=ur(e)?e.split("."):e;r&&n="A"&&t<="Z"}function q_(r,e){return`${e}${Oh(r)}`}function $_(r,e,t=!0){if(!e||!nc(r,e))return r;const n=r.slice(e.length);return t?wD(n):n}function Ei(r,e){const t=Object.entries(r).reduce((n,[i,a])=>(i==="className"||i==="class"||nc(i,e)&&Object.assign(n,{[$_(i,e)]:a}),n),{});if("opacity"in r){const n=q_("opacity",e),i=r.opacity;if(n in r){const a=r[n];Object.assign(t,{opacity:i*a})}else Object.assign(t,{opacity:i})}return t}function Pg(r,e){const t=e.length;return Object.keys(r).reduce((n,i)=>{if(i.startsWith(e)){const a=i.slice(t);n[a]=r[i]}return n},{})}function e1(r,e){const t=typeof e=="string"?[e]:e,n={};return Object.keys(r).forEach(i=>{t.find(a=>i.startsWith(a))||(n[i]=r[i])}),n}function PU(r,e,t){return Object.entries(r).reduce((n,[i,a])=>(nc(i,e)?n[q_($_(i,e,!1),t)]=a:n[i]=a,n),{})}function La(r=0){if(typeof r=="number")return[r,r,r];const[e,t=e,n=e]=r;return[e,t,n]}var MD=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);itypeof a=="function"?[i,a.call(n,t)]:[i,a]))}function Di(r,e){const t=(r==null?void 0:r.style)||{},n=(e==null?void 0:e.style)||{};for(const i in t)i in n||(n[i]=t[i]);return Object.assign({},r,e,{style:n})}function AD(r){const{x:e,y:t,z:n,class:i,className:a,transform:s,transformOrigin:o,zIndex:l,visibility:u}=r;return MD(r,["x","y","z","class","className","transform","transformOrigin","zIndex","visibility"])}function TD(r,e){const t=La(r);let n={};return e.text&&!e.fontSize&&(n={fontSize:Math.min(...t)*.5}),e.src&&(!e.width||!e.height)&&(n={width:t[0]*.5,height:t[1]*.5}),n}function n1(r){if(r)return typeof r=="string"||typeof r=="function"||Array.isArray(r)?{type:"group",field:e=>e.id,color:r,invert:!1}:r}function PD(r,e){if(!e)return{};const{type:t,color:n,field:i,invert:a}=e,s=l=>{const u=typeof n=="string"?Qs("palette",n):n;if(typeof u=="function"){const h={};return l.forEach(([p,S])=>{h[p]=u(a?1-S:S)}),h}else if(Array.isArray(u)){const h=a?[...u].reverse():u,p={};return l.forEach(([S,N])=>{p[S]=h[N%u.length]}),p}return{}},o=(l,u)=>{var h;return typeof l=="string"?(h=u.data)===null||h===void 0?void 0:h[l]:l==null?void 0:l(u)};if(t==="group"){const l=Ch(r,S=>{if(!i)return"default";const N=o(i,S);return N?String(N):"default"}),u=Object.keys(l),h=s(u.map((S,N)=>[S,N])),p={};return Object.entries(l).forEach(([S,N])=>{N.forEach(U=>{p[Et(U)]=h[S]})}),p}else if(t==="value"){const[l,u]=r.reduce(([p,S],N)=>{const U=o(i,N);if(typeof U!="number")throw new Error(Js(`Palette field ${i} is not a number`));return[Math.min(p,U),Math.max(S,U)]},[1/0,-1/0]),h=u-l;return s(r.map(p=>[p.id,(o(i,p)-l)/h]))}}function r1(r){const e=typeof r=="string"?Qs("palette",r):r;if(typeof e!="function")return e}function i1(r,e){let t=2*r;return typeof e=="string"?t=r*Number(e.replace("%",""))/100:typeof e=="number"&&(t=e),isNaN(t)&&(t=2*r),t}function a1(r,e,t=1,n=!1){const i=n?t:1,a=(r.max[0]-r.min[0])*i;return i1(a,e)}function SD(r,e,t=1){const n=Wr(r[0],r[1])*t;return i1(n,e)}var OD={}.toString,DD=function(r){return OD.call(r).replace(/^\[object /,"").replace(/]$/,"")},CD=DD,LD=Object.prototype,RD=function(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||LD;return r===t},ID=RD,ND=Object.prototype.hasOwnProperty;function BD(r){if(Pn(r))return!0;if(Vu(r))return!r.length;var e=CD(r);if(e==="Map"||e==="Set")return!r.size;if(ID(r))return!Object.keys(r).length;for(var t in r)if(ND.call(r,t))return!1;return!0}var Fs=BD;class rc extends Gv{constructor(e){s1(e.style),super(e),this.shapeMap={},this.animateMap={},this.render(this.attributes,this),this.setVisibility(),this.bindEvents()}get parsedAttributes(){return this.attributes}upsert(e,t,n,i,a){var s,o,l,u,h,p,S,N;const U=this.shapeMap[e];if(n===!1){U&&((s=a==null?void 0:a.beforeDestroy)===null||s===void 0||s.call(a,U),i.removeChild(U),delete this.shapeMap[e],(o=a==null?void 0:a.afterDestroy)===null||o===void 0||o.call(a,U));return}const H=typeof t=="string"?Qs(Zu.SHAPE,t):t;if(!H)throw new Error(Js(`Shape ${t} not found`));if(!U||U.destroyed||!(U instanceof H)){U&&((l=a==null?void 0:a.beforeDestroy)===null||l===void 0||l.call(a,U),U==null||U.destroy(),(u=a==null?void 0:a.afterDestroy)===null||u===void 0||u.call(a,U)),(h=a==null?void 0:a.beforeCreate)===null||h===void 0||h.call(a);const V=new H({className:e,style:n});return i.appendChild(V),this.shapeMap[e]=V,(p=a==null?void 0:a.afterCreate)===null||p===void 0||p.call(a,V),V}return(S=a==null?void 0:a.beforeUpdate)===null||S===void 0||S.call(a,U),Yg(U,n),(N=a==null?void 0:a.afterUpdate)===null||N===void 0||N.call(a,U),U}update(e={}){const t=Object.assign({},this.attributes,e);s1(t),FL(this,t),this.render(t,this),this.setVisibility()}bindEvents(){}getGraphicStyle(e){return AD(e)}get compositeShapes(){return[["badges","badge-"],["ports","port-"]]}animate(e,t){if(e.length===0)return null;const n=[];if(e[0].x!==void 0||e[0].y!==void 0||e[0].z!==void 0){const{x:a=0,y:s=0,z:o=0}=this.attributes;e.forEach(l=>{const{x:u=a,y:h=s,z:p=o}=l;Object.assign(l,{transform:p?[["translate3d",u,h,p]]:[["translate",u,h]]})})}const i=super.animate(e,t);if(i&&(Sg(this,i),n.push(i)),Array.isArray(e)&&e.length>0){const a=["transform","transformOrigin","x","y","z","zIndex"];if(Object.keys(e[0]).some(s=>!a.includes(s))){Object.entries(this.shapeMap).forEach(([o,l])=>{const u=`get${Oh(o)}Style`,h=this[u];if(yn(h)){const p=e.map(N=>h.call(this,Object.assign(Object.assign({},this.attributes),N))),S=l.animate(ag(p),t);S&&(Sg(l,S),n.push(S))}});const s=(o,l)=>{if(!Fs(o)){const u=`get${Oh(l)}Style`,h=this[u];if(yn(h)){const p=e.map(S=>h.call(this,Object.assign(Object.assign({},this.attributes),S)));Object.entries(p[0]).map(([S])=>{const N=p.map(H=>H[S]),U=o[S];if(U){const H=U.animate(ag(N),t);H&&(Sg(U,H),n.push(H))}})}}};this.compositeShapes.forEach(([o,l])=>{const u=Pg(this.shapeMap,l);s(u,o)})}}return ig(n)}getShape(e){return this.shapeMap[e]}setVisibility(){const{visibility:e}=this.attributes;hl(this,e)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function Sg(r,e){e==null||e.finished.then(()=>{const t=r.activeAnimations.findIndex(n=>n===e);t>-1&&r.activeAnimations.splice(t,1)})}function s1(r){if(!r)return{};if("x"in r||"y"in r||"z"in r){const{x:e=0,y:t=0,z:n,transform:i}=r,a=Zy(e,t,n,i);a&&(r.transform=a)}return r}var kD=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{t.push([i===0?"M":"L",...n])}),e&&t.push(["Z"]),t}const o1={M:["x","y"],m:["dx","dy"],H:["x"],h:["dx"],V:["y"],v:["dy"],L:["x","y"],l:["dx","dy"],Z:[],z:[],C:["x1","y1","x2","y2","x","y"],c:["dx1","dy1","dx2","dy2","dx","dy"],S:["x2","y2","x","y"],s:["dx2","dy2","dx","dy"],Q:["x1","y1","x","y"],q:["dx1","dy1","dx","dy"],T:["x","y"],t:["dx","dy"],A:["rx","ry","rotation","large-arc","sweep","x","y"],a:["rx","ry","rotation","large-arc","sweep","dx","dy"]};function zD(r){const e=r.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").trim().split(/\s*,|\s+/),t=[];let n="",i={};for(;e.length>0;){let a=e.shift();a in o1?n=a:e.unshift(a),i={type:n},o1[n].forEach(l=>{a=e.shift(),i[l]=a}),n==="M"?n="L":n==="m"&&(n="l");const[s,...o]=Object.values(i);t.push([s,...o.map(Number)])}return t}function UD(r){const e=[];return(typeof r=="string"?zD(r):r).forEach(n=>{const i=n[0];if(i==="Z"){e.push(e[0]);return}if(i!=="A")for(let a=1;a{if(r.length<2)return[["M",0,0],["L",0,0]];const e=r[0],t=r[1],n=r[r.length-1],i=r[r.length-2];r.unshift(i,n),r.push(e,t);const a=[["M",n[0],n[1]]];for(let s=1;s{const V=U,Y=h[(H+1)%h.length];return ci(V,Y)?null:[V,Y]}).filter(Boolean),S=yD([o,l],p),N=X_([o,l],S);if(N&&S&&(u.transform=[["translate",N[0]+t,N[1]+n]],s)){const U=Math.atan((S[0][1]-S[1][1])/(S[0][0]-S[1][0]));u.transform.push(["rotate",U/Math.PI*180]),u.textAlign="center",(e==="right"||e==="left")&&(U>0?u.textBaseline=e==="right"?"bottom":"top":u.textBaseline=e==="right"?"top":"bottom")}return u}var HD=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{n!=null&&n.children.length&&n.children.forEach(i=>{e.push(i),t(i)})};return t(r),e}function jD(r){const e=[];let t=r.parentNode;for(;t;)e.push(t),t=t.parentNode;return e}class Og extends Hu{constructor(e){super(e),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},$l=this,this.isMutationObserved=!0,this.addEventListener(Kn.MOUNTED,this.onMounted),this.addEventListener(Kn.ATTR_MODIFIED,this.onAttrModified)}handleRadius(){const{radius:e,clipPath:t,width:n=0,height:i=0}=this.attributes;if(e&&n&&i){const[a,s]=this.getBounds().min,o={x:a,y:s,radius:e,width:n,height:i};if(t)Object.assign(this.parsedStyle.clipPath.style,o);else{const l=new ki({style:o});this.style.clipPath=l}}else t&&(this.style.clipPath=null)}}const Dg=new WeakMap;let $l=null;const Cg=r=>{if($l&&jD($l).includes(r)){const e=Dg.get(r);e?e.includes($l)||e.push($l):Dg.set(r,[$l])}},Lg=r=>{const e=Dg.get(r);e&&e.forEach(t=>t.handleRadius())};class u1 extends rc{constructor(e){super(e)}isImage(){const{src:e}=this.attributes;return!!e}getIconStyle(e=this.attributes){const{width:t=0,height:n=0}=e,i=this.getGraphicStyle(e);return this.isImage()?Object.assign({x:-t/2,y:-n/2},i):Object.assign({textBaseline:"middle",textAlign:"center"},i)}render(e=this.attributes,t=this){this.upsert("icon",this.isImage()?Og:ol,this.getIconStyle(e),t)}}class c1 extends rc{get context(){return this.config.context}get parsedAttributes(){return this.attributes}onframe(){}animate(e,t){const n=super.animate(e,t);return n&&(n.onframe=()=>this.onframe(),n.finished.then(()=>this.onframe())),n}}var $h=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{i[p]=!1}),e.badge===!1||!(!((t=e.badges)===null||t===void 0)&&t.length))return i;const{badges:a=[],badgePalette:s,opacity:o=1}=e,l=$h(e,["badges","badgePalette","opacity"]),u=r1(s),h=Ei(this.getGraphicStyle(l),"badge");return a.forEach((p,S)=>{i[S]=Object.assign(Object.assign({backgroundFill:u?u[S%(u==null?void 0:u.length)]:void 0,opacity:o},h),this.getBadgeStyle(p))}),i}getBadgeStyle(e){const t=this.getShape("key"),{placement:n="top",offsetX:i,offsetY:a}=e,s=$h(e,["placement","offsetX","offsetY"]),o=G1(t.getLocalBounds(),n,i,a,!0);return Object.assign(Object.assign({},o),s)}getPortsStyle(e){var t;const n=this.getPorts(),i={};if(Object.keys(n).forEach(o=>{i[o]=!1}),e.port===!1||!(!((t=e.ports)===null||t===void 0)&&t.length))return i;const a=Ei(this.getGraphicStyle(e),"port"),{ports:s=[]}=e;return s.forEach((o,l)=>{const u=o.key||l,h=Object.assign(Object.assign({},a),o);if(U1(h))i[u]=!1;else{const[p,S]=this.getPortXY(e,o);i[u]=Object.assign({transform:[["translate",p,S]]},h)}}),i}getPortXY(e,t){const{placement:n="left"}=t,i=this.getShape("key");return Zg(VD(this.context,i),n)}getPorts(){return Pg(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(e,t=!1){const n=this.getShape("key").getBounds();return pD(e,n,t)}drawHaloShape(e,t){const n=this.getHaloStyle(e),i=this.getShape("key");this.upsert("halo",i.constructor,n,t)}drawIconShape(e,t){const n=this.getIconStyle(e);this.upsert("icon",u1,n,t),Cg(this)}drawBadgeShapes(e,t){const n=this.getBadgesStyle(e);Object.keys(n).forEach(i=>{const a=n[i];this.upsert(`badge-${i}`,ql,a,t)})}drawPortShapes(e,t){const n=this.getPortsStyle(e);Object.keys(n).forEach(i=>{const a=n[i],s=`port-${i}`;this.upsert(s,Ks,a,t)})}drawLabelShape(e,t){const n=this.getLabelStyle(e);this.upsert("label",So,n,t)}_drawKeyShape(e,t){return this.drawKeyShape(e,t)}render(e=this.parsedAttributes,t=this){this._drawKeyShape(e,t),this.getShape("key")&&(this.drawHaloShape(e,t),this.drawIconShape(e,t),this.drawBadgeShapes(e,t),this.drawLabelShape(e,t),this.drawPortShapes(e,t))}update(e){super.update(e),e&&("x"in e||"y"in e||"z"in e)&&Lg(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}ps.defaultStyleProps={x:0,y:0,size:32,droppable:!0,draggable:!0,port:!0,ports:[],portZIndex:2,portLinkToCenter:!1,badge:!0,badges:[],badgeZIndex:3,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloStrokeOpacity:.25,haloPointerEvents:"none",haloZIndex:-1,icon:!0,iconZIndex:1,label:!0,labelIsBillboard:!0,labelMaxWidth:"200%",labelPlacement:"bottom",labelWordWrap:!1,labelZIndex:0};function VD(r,e){if(!r)return e.getLocalBounds();const t=r.canvas.getLayer(),n=e.cloneNode();hl(n,"hidden"),t.appendChild(n);const i=n.getLocalBounds();return n.destroy(),i}class gl extends ps{constructor(e){super(Di({style:gl.defaultStyleProps},e))}drawKeyShape(e,t){return this.upsert("key",Ks,this.getKeyStyle(e),t)}getKeyStyle(e){const t=super.getKeyStyle(e);return Object.assign(Object.assign({},t),{r:Math.min(...this.getSize(e))/2})}getIconStyle(e){const t=super.getIconStyle(e),{r:n}=this.getShape("key").attributes,i=n*2*eo;return t?Object.assign({width:i,height:i},t):!1}getIntersectPoint(e,t=!1){const n=this.getShape("key").getBounds();return Yh(e,n,t)}}gl.defaultStyleProps={size:32};class ef extends ps{constructor(e){super(e)}get parsedAttributes(){return this.attributes}drawKeyShape(e,t){return this.upsert("key",sl,this.getKeyStyle(e),t)}getKeyStyle(e){const t=super.getKeyStyle(e);return Object.assign(Object.assign({},t),{points:this.getPoints(e)})}getIntersectPoint(e,t=!1){var n,i;const{points:a}=this.getShape("key").attributes,s=[+(((n=this.attributes)===null||n===void 0?void 0:n.x)||0),+(((i=this.attributes)===null||i===void 0?void 0:i.y)||0)];return K_(e,s,a,!0,t).point}}class ZD extends ef{constructor(e){super(e)}getPoints(e){const[t,n]=this.getSize(e);return BL(t,n)}}var KD=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iun(p)?{value:p}:p),a=Ei(this.getGraphicStyle(e),"donut"),s=r1(e.donutPalette);if(!s)return;const o=i.reduce((p,S)=>{var N;return p+((N=S.value)!==null&&N!==void 0?N:0)},0),l=this.parseOuterR(),u=this.parseInnerR();let h=0;i.forEach((p,S)=>{const{value:N=0,color:U=s[S%s.length]}=p,H=KD(p,["value","color"]),V=(o===0?1/i.length:N/o)*360;this.upsert(`round${S}`,Sa,Object.assign(Object.assign(Object.assign({},a),{d:QD(l,u,h,h+V),fill:U}),H),t),h+=V})}render(e,t=this){super.render(e,t),this.drawDonutShape(e,t)}}tf.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const nf=(r,e,t,n)=>[r+Math.sin(n)*t,e-Math.cos(n)*t],XD=(r,e,t,n)=>n<=0||t<=n?[["M",r-t,e],["A",t,t,0,1,1,r+t,e],["A",t,t,0,1,1,r-t,e],["Z"]]:[["M",r-t,e],["A",t,t,0,1,1,r+t,e],["A",t,t,0,1,1,r-t,e],["Z"],["M",r+n,e],["A",n,n,0,1,0,r-n,e],["A",n,n,0,1,0,r+n,e],["Z"]],YD=(r,e,t,n,i,a)=>{const[s,o]=[i/360*2*Math.PI,a/360*2*Math.PI],l=[nf(r,e,n,s),nf(r,e,t,s),nf(r,e,t,o),nf(r,e,n,o)],u=o-s>Math.PI?1:0;return[["M",l[0][0],l[0][1]],["L",l[1][0],l[1][1]],["A",t,t,0,u,1,l[2][0],l[2][1]],["L",l[3][0],l[3][1]],["A",n,n,0,u,0,l[0][0],l[0][1]],["Z"]]},QD=(r=0,e=0,t,n)=>{const[i,a]=[0,0];return Math.abs(t-n)%360<1e-6?XD(i,a,r,e):YD(i,a,r,e,t,n)};class rf extends ps{constructor(e){super(Di({style:rf.defaultStyleProps},e))}drawKeyShape(e,t){return this.upsert("key",Uu,this.getKeyStyle(e),t)}getKeyStyle(e){const t=super.getKeyStyle(e),[n,i]=this.getSize(e);return Object.assign(Object.assign({},t),{rx:n/2,ry:i/2})}getIconStyle(e){const t=super.getIconStyle(e),{rx:n,ry:i}=this.getShape("key").attributes,a=Math.min(+n,+i)*2*eo;return t?Object.assign({width:a,height:a},t):!1}getIntersectPoint(e,t=!1){const n=this.getShape("key").getBounds();return Yh(e,n,t)}}rf.defaultStyleProps={size:[45,35]};class JD extends ef{constructor(e){super(e)}getOuterR(e){return e.outerR||Math.min(...this.getSize(e))/2}getPoints(e){return zL(this.getOuterR(e))}getIconStyle(e){const t=super.getIconStyle(e),n=this.getOuterR(e)*eo;return t?Object.assign({width:n,height:n},t):!1}}function qD(r,e){var t=e.cx,n=t===void 0?0:t,i=e.cy,a=i===void 0?0:i,s=e.r;r.arc(n,a,s,0,Math.PI*2,!1)}function $D(r,e){var t=e.cx,n=t===void 0?0:t,i=e.cy,a=i===void 0?0:i,s=e.rx,o=e.ry;if(r.ellipse)r.ellipse(n,a,s,o,0,0,Math.PI*2,!1);else{var l=s>o?s:o,u=s>o?1:s/o,h=s>o?o/s:1;r.save(),r.scale(u,h),r.arc(n,a,l,0,Math.PI*2)}}function eC(r,e){var t=e.x1,n=e.y1,i=e.x2,a=e.y2,s=e.markerStart,o=e.markerEnd,l=e.markerStartOffset,u=e.markerEndOffset,h=0,p=0,S=0,N=0,U=0,H,V;s&&cr(s)&&l&&(H=i-t,V=a-n,U=Math.atan2(V,H),h=Math.cos(U)*(l||0),p=Math.sin(U)*(l||0)),o&&cr(o)&&u&&(H=t-i,V=n-a,U=Math.atan2(V,H),S=Math.cos(U)*(u||0),N=Math.sin(U)*(u||0)),r.moveTo(t+h,n+p),r.lineTo(i+S,a+N)}function tC(r,e){var t=e.markerStart,n=e.markerEnd,i=e.markerStartOffset,a=e.markerEndOffset,s=e.d,o=s.absolutePath,l=s.segments,u=0,h=0,p=0,S=0,N=0,U,H;if(t&&cr(t)&&i){var V=t.parentNode.getStartTangent(),Y=(0,b.Z)(V,2),q=Y[0],ne=Y[1];U=q[0]-ne[0],H=q[1]-ne[1],N=Math.atan2(H,U),u=Math.cos(N)*(i||0),h=Math.sin(N)*(i||0)}if(n&&cr(n)&&a){var le=n.parentNode.getEndTangent(),ue=(0,b.Z)(le,2),fe=ue[0],de=ue[1];U=fe[0]-de[0],H=fe[1]-de[1],N=Math.atan2(H,U),p=Math.cos(N)*(a||0),S=Math.sin(N)*(a||0)}for(var ve=0;vebn?rn:bn,mr=rn>bn?1:rn/bn,za=rn>bn?bn/rn:1;r.translate(nn,hn),r.rotate($n),r.scale(mr,za),r.arc(0,0,$i,Dn,kn,!!(1-or)),r.scale(1/mr,1/za),r.rotate(-$n),r.translate(-nn,-hn)}Xe&&r.lineTo(Te[6]+p,Te[7]+S);break}case"Z":r.closePath();break}}}function nC(r,e){var t=e.markerStart,n=e.markerEnd,i=e.markerStartOffset,a=e.markerEndOffset,s=e.points.points,o=s.length,l=s[0][0],u=s[0][1],h=s[o-1][0],p=s[o-1][1],S=0,N=0,U=0,H=0,V=0,Y,q;t&&cr(t)&&i&&(Y=s[1][0]-s[0][0],q=s[1][1]-s[0][1],V=Math.atan2(q,Y),S=Math.cos(V)*(i||0),N=Math.sin(V)*(i||0)),n&&cr(n)&&a&&(Y=s[o-1][0]-s[0][0],q=s[o-1][1]-s[0][1],V=Math.atan2(q,Y),U=Math.cos(V)*(a||0),H=Math.sin(V)*(a||0)),r.moveTo(l+(S||U),u+(N||H));for(var ne=1;ne0?1:-1,N=l>0?1:-1,U=S+N===0,H=s.map(function(ue){return Jr(ue,0,Math.min(Math.abs(u)/2,Math.abs(h)/2))}),V=(0,b.Z)(H,4),Y=V[0],q=V[1],ne=V[2],le=V[3];r.moveTo(S*Y+n,a),r.lineTo(u-S*q+n,a),q!==0&&r.arc(u-S*q+n,N*q+a,q,-N*Math.PI/2,S>0?0:Math.PI,U),r.lineTo(u+n,h-N*ne+a),ne!==0&&r.arc(u-S*ne+n,h-N*ne+a,ne,S>0?0:Math.PI,N>0?Math.PI/2:1.5*Math.PI,U),r.lineTo(S*le+n,h+a),le!==0&&r.arc(S*le+n,h-N*le+a,le,N>0?Math.PI/2:-Math.PI/2,S>0?Math.PI:0,U),r.lineTo(n,N*Y+a),Y!==0&&r.arc(S*Y+n,N*Y+a,Y,S>0?Math.PI:0,N>0?Math.PI*1.5:Math.PI/2,U)}}var aC=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a=l-Y&&q<=l+Y:!1}function af(r,e,t,n){return r/(t*t)+e/(n*n)}function hC(r,e,t){var n=r.parsedStyle,i=n.cx,a=i===void 0?0:i,s=n.cy,o=s===void 0?0:s,l=n.rx,u=n.ry,h=n.fill,p=n.stroke,S=n.lineWidth,N=S===void 0?1:S,U=n.increasedLineWidthForHitTesting,H=U===void 0?0:U,V=n.pointerEvents,Y=V===void 0?"auto":V,q=e.x,ne=e.y,le=nl(Y,h,p),ue=(0,b.Z)(le,2),fe=ue[0],de=ue[1],ve=(N+H)/2,Te=(q-a)*(q-a),Oe=(ne-o)*(ne-o);return fe&&de||t?af(Te,Oe,l+ve,u+ve)<=1:fe?af(Te,Oe,l,u)<=1:de?af(Te,Oe,l-ve,u-ve)>=1&&af(Te,Oe,l+ve,u+ve)<=1:!1}function pl(r,e,t,n,i,a){return i>=r&&i<=r+t&&a>=e&&a<=e+n}function fC(r,e,t,n,i,a,s){var o=i/2;return pl(r-o,e-o,t,i,a,s)||pl(r+t-o,e-o,i,n,a,s)||pl(r+o,e+n-o,t,i,a,s)||pl(r-o,e+o,i,n,a,s)}function sf(r,e,t,n,i,a,s,o){var l=(Math.atan2(o-e,s-r)+Math.PI*2)%(Math.PI*2),u={x:r+t*Math.cos(l),y:e+t*Math.sin(l)};return Xi(u.x,u.y,s,o)<=a/2}function Oo(r,e,t,n,i,a,s){var o=Math.min(r,t),l=Math.max(r,t),u=Math.min(e,n),h=Math.max(e,n),p=i/2;return a>=o-p&&a<=l+p&&s>=u-p&&s<=h+p?em(r,e,t,n,a,s)<=i/2:!1}function f1(r,e,t,n,i){var a=r.length;if(a<2)return!1;for(var s=0;s0!=Rg(o[1]-t)>0&&Rg(e-(t-s[1])*(s[0]-o[0])/(s[1]-o[1])-s[0])<0&&(n=!n)}return n}function v1(r,e,t){for(var n=!1,i=0;i=i.min[0]&&e.y>=i.min[1]&&e.x<=i.max[0]&&e.y<=i.max[1]}var MC=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a0&&arguments[0]!==void 0?arguments[0]:r.api;r.rafId&&(t.cancelAnimationFrame(r.rafId),r.rafId=null)}},{key:"executeTask",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.api;Ig.length<=0&&Ng.length<=0||(Ng.forEach(function(n){return n()}),Ng=Ig.splice(0,r.TASK_NUM_PER_FRAME),r.rafId=t.requestAnimationFrame(function(){r.executeTask(t)}))}},{key:"sliceImage",value:function(t,n,i,a){for(var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r.api,l=t.naturalWidth||t.width,u=t.naturalHeight||t.height,h=n-s,p=i-s,S=Math.ceil(l/h),N=Math.ceil(u/p),U={tileSize:[n,i],gridSize:[N,S],tiles:Array(N).fill(null).map(function(){return Array(S).fill(null)})},H=function(q){for(var ne=function(fe){Ig.push(function(){var de=fe*h,ve=q*p,Te=[Math.min(n,l-de),Math.min(i,u-ve)],Oe=Te[0],Ie=Te[1],ze=o.createCanvas();ze.width=n,ze.height=i;var Xe=ze.getContext("2d");Xe.drawImage(t,de,ve,Oe,Ie,0,0,Oe,Ie),U.tiles[q][fe]={x:de,y:ve,tileX:fe,tileY:q,data:ze},a()})},le=0;leve&&Xe>Te,ne&&(typeof ne.resetTransform=="function"?ne.resetTransform():ne.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(ne,0,0,ue*le,fe*le,s.background))});var Y=function(ne,le){for(var ue=[ne];ue.length>0;){var fe,de=ue.pop();de.isVisible()&&!de.isCulled()&&(S?i.renderDisplayObjectOptimized(de,le,i.context,zs(i,fi)[fi],n):i.renderDisplayObject(de,le,i.context,zs(i,fi)[fi],n));for(var ve=((fe=de.sortable)===null||fe===void 0||(fe=fe.sorted)===null||fe===void 0?void 0:fe.length)>0?de.sortable.sorted:de.childNodes,Te=ve.length-1;Te>=0;Te--)ue.push(ve[Te])}};l.hooks.endFrame.tap(r.tag,function(){if(u.root.childNodes.length===0){i.clearFullScreenLastFrame=!0;return}S=s.renderer.getConfig().enableRenderingOptimization,zs(i,fi)[fi]={restoreStack:[],prevObject:null,currentContext:zs(i,fi)[fi].currentContext},zs(i,fi)[fi].currentContext.clear(),i.clearFullScreenLastFrame=!1;var q=N.getContext(),ne=N.getDPR();if(ln(i.dprMatrix,[ne,ne,1]),vt(i.vpMatrix,i.dprMatrix,o.getOrthoMatrix()),i.clearFullScreen)S?(q.save(),Y(u.root,q),q.restore()):Y(u.root,q),i.removedRBushNodeAABBs=[];else{var le=i.safeMergeAABB.apply(i,[i.mergeDirtyAABBs(i.renderQueue)].concat((0,w.Z)(i.removedRBushNodeAABBs.map(function(rn){var bn=rn.minX,Dn=rn.minY,kn=rn.maxX,$n=rn.maxY,or=new Nr;return or.setMinMax([bn,Dn,0],[kn,$n,0]),or}))));if(i.removedRBushNodeAABBs=[],Nr.isEmpty(le)){i.renderQueue=[];return}var ue=i.convertAABB2Rect(le),fe=ue.x,de=ue.y,ve=ue.width,Te=ue.height,Oe=qe(i.vec3a,[fe,de,0],i.vpMatrix),Ie=qe(i.vec3b,[fe+ve,de,0],i.vpMatrix),ze=qe(i.vec3c,[fe,de+Te,0],i.vpMatrix),Xe=qe(i.vec3d,[fe+ve,de+Te,0],i.vpMatrix),et=Math.min(Oe[0],Ie[0],Xe[0],ze[0]),st=Math.min(Oe[1],Ie[1],Xe[1],ze[1]),bt=Math.max(Oe[0],Ie[0],Xe[0],ze[0]),_t=Math.max(Oe[1],Ie[1],Xe[1],ze[1]),ct=Math.floor(et),ft=Math.floor(st),At=Math.ceil(bt-et),Ft=Math.ceil(_t-st);q.save(),i.clearRect(q,ct,ft,At,Ft,s.background),q.beginPath(),q.rect(ct,ft,At,Ft),q.clip(),q.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]);var Vt=s.renderer.getConfig(),nn=Vt.enableDirtyRectangleRenderingDebug;nn&&U.dispatchEvent(new _i(Oa.DIRTY_RECTANGLE,{dirtyRect:{x:ct,y:ft,width:At,height:Ft}}));var hn=i.searchDirtyObjects(le);hn.sort(function(rn,bn){return rn.sortable.renderOrder-bn.sortable.renderOrder}).forEach(function(rn){rn&&rn.isVisible()&&!rn.isCulled()&&i.renderDisplayObject(rn,q,i.context,zs(i,fi)[fi],n)}),q.restore(),i.renderQueue.forEach(function(rn){i.saveDirtyAABB(rn)}),i.renderQueue=[]}zs(i,fi)[fi].restoreStack.forEach(function(){q.restore()}),zs(i,fi)[fi].restoreStack=[]}),l.hooks.render.tap(r.tag,function(q){i.clearFullScreen||i.renderQueue.push(q)})}},{key:"clearRect",value:function(t,n,i,a,s,o){t.clearRect(n,i,a,s),o&&(t.fillStyle=o,t.fillRect(n,i,a,s))}},{key:"renderDisplayObjectOptimized",value:function(t,n,i,a,s){var o=t.nodeName,l=!1,u=!1,h=this.context.styleRendererFactory[o],p=this.pathGeneratorFactory[o],S=t.parsedStyle.clipPath;if(S){l=!a.prevObject||!Ut(S.getWorldTransform(),a.prevObject.getWorldTransform()),l&&(this.applyWorldTransform(n,S),a.prevObject=null);var N=this.pathGeneratorFactory[S.nodeName];N&&(n.save(),u=!0,n.beginPath(),N(n,S.parsedStyle),n.closePath(),n.clip())}if(h){l=!a.prevObject||!Ut(t.getWorldTransform(),a.prevObject.getWorldTransform()),l&&this.applyWorldTransform(n,t);var U=!a.prevObject;if(!U){var H=a.prevObject.nodeName;o===Ct.TEXT?U=H!==Ct.TEXT:o===Ct.IMAGE?U=H!==Ct.IMAGE:U=H===Ct.TEXT||H===Ct.IMAGE}h.applyStyleToContext(n,t,U,a),a.prevObject=t}p&&(n.beginPath(),p(n,t.parsedStyle),o!==Ct.LINE&&o!==Ct.PATH&&o!==Ct.POLYLINE&&n.closePath()),h&&h.drawToContext(n,t,zs(this,fi)[fi],this,s),u&&n.restore(),t.renderable.dirty=!1}},{key:"renderDisplayObject",value:function(t,n,i,a,s){var o=t.nodeName,l=a.restoreStack[a.restoreStack.length-1];l&&!(t.compareDocumentPosition(l)&Yr.DOCUMENT_POSITION_CONTAINS)&&(n.restore(),a.restoreStack.pop());var u=this.context.styleRendererFactory[o],h=this.pathGeneratorFactory[o],p=t.parsedStyle.clipPath;if(p){this.applyWorldTransform(n,p);var S=this.pathGeneratorFactory[p.nodeName];S&&(n.save(),a.restoreStack.push(t),n.beginPath(),S(n,p.parsedStyle),n.closePath(),n.clip())}u&&(this.applyWorldTransform(n,t),n.save(),this.applyAttributesToContext(n,t)),h&&(n.beginPath(),h(n,t.parsedStyle),o!==Ct.LINE&&o!==Ct.PATH&&o!==Ct.POLYLINE&&n.closePath()),u&&(u.render(n,t.parsedStyle,t,i,this,s),n.restore()),t.renderable.dirty=!1}},{key:"applyAttributesToContext",value:function(t,n){var i=n.parsedStyle,a=i.stroke,s=i.fill,o=i.opacity,l=i.lineDash,u=i.lineDashOffset;l&&t.setLineDash(l),Pn(u)||(t.lineDashOffset=u),Pn(o)||(t.globalAlpha*=o),!Pn(a)&&!Array.isArray(a)&&!a.isNone&&(t.strokeStyle=n.attributes.stroke),!Pn(s)&&!Array.isArray(s)&&!s.isNone&&(t.fillStyle=n.attributes.fill)}},{key:"convertAABB2Rect",value:function(t){var n=t.getMin(),i=t.getMax(),a=Math.floor(n[0]),s=Math.floor(n[1]),o=Math.ceil(i[0]),l=Math.ceil(i[1]),u=o-a,h=l-s;return{x:a,y:s,width:u,height:h}}},{key:"mergeDirtyAABBs",value:function(t){var n=new Nr;return t.forEach(function(i){var a=i.getRenderBounds();n.add(a);var s=i.renderable.dirtyRenderBounds;s&&n.add(s)}),n}},{key:"searchDirtyObjects",value:function(t){var n=t.getMin(),i=(0,b.Z)(n,2),a=i[0],s=i[1],o=t.getMax(),l=(0,b.Z)(o,2),u=l[0],h=l[1],p=this.rBush.search({minX:a,minY:s,maxX:u,maxY:h});return p.map(function(S){var N=S.displayObject;return N})}},{key:"saveDirtyAABB",value:function(t){var n=t.renderable;n.dirtyRenderBounds||(n.dirtyRenderBounds=new Nr);var i=t.getRenderBounds();i&&n.dirtyRenderBounds.update(i.center,i.halfExtents)}},{key:"applyWorldTransform",value:function(t,n,i){i?(He(this.tmpMat4,n.getLocalTransform()),vt(this.tmpMat4,i,this.tmpMat4),vt(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(He(this.tmpMat4,n.getWorldTransform()),vt(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var t=new Nr,n=arguments.length,i=new Array(n),a=0;a0;if(p){if(i||n.attributes.stroke!==a.prevObject.attributes.stroke){var S=!Pn(o.stroke)&&!Array.isArray(o.stroke)&&!o.stroke.isNone?n.attributes.stroke:xi.strokeStyle;$r(t,"strokeStyle",S,a.currentContext)}(i||o.lineWidth!==s.lineWidth)&&$r(t,"lineWidth",Pn(o.lineWidth)?xi.lineWidth:o.lineWidth,a.currentContext),(i||o.lineDash!==s.lineDash)&&$r(t,"lineDash",o.lineDash||xi.lineDash,a.currentContext),(i||o.lineDashOffset!==s.lineDashOffset)&&$r(t,"lineDashOffset",Pn(o.lineDashOffset)?xi.lineDashOffset:o.lineDashOffset,a.currentContext);for(var N=0;N4&&arguments[4]!==void 0?arguments[4]:!1;if(n){$r(t,"shadowColor",xi.shadowColor,a.currentContext);for(var o=0;o-1&&$r(t,"filter",u.replace(/drop-shadow\([^)]*\)/,"").trim()||xi.filter,a.currentContext)}else $r(t,"filter",xi.filter,a.currentContext)}},{key:"fillToContext",value:function(t,n,i,a,s){var o=this,l=n.parsedStyle,u=l.fill,h=l.fillRule,p=null;if(Array.isArray(u)&&u.length>0)u.forEach(function(N){var U=$r(t,"fillStyle",uf(N,n,t,o.imagePool),i.currentContext);p=p!=null?p:U,h?t.fill(h):t.fill()});else{if(el(u)){var S=lf(u,n,t,n.ownerDocument.defaultView.context,a,s,this.imagePool);S&&(t.fillStyle=S,p=!0)}h?t.fill(h):t.fill()}p!==null&&$r(t,"fillStyle",p,i.currentContext)}},{key:"strokeToContext",value:function(t,n,i,a,s){var o=this,l=n.parsedStyle.stroke,u=null;if(Array.isArray(l)&&l.length>0)l.forEach(function(S){var N=$r(t,"strokeStyle",uf(S,n,t,o.imagePool),i.currentContext);u=u!=null?u:N,t.stroke()});else{if(el(l)){var h=lf(l,n,t,n.ownerDocument.defaultView.context,a,s,this.imagePool);if(h){var p=$r(t,"strokeStyle",h,i.currentContext);u=u!=null?u:p}}t.stroke()}u!==null&&$r(t,"strokeStyle",u,i.currentContext)}},{key:"drawToContext",value:function(t,n,i,a,s){var o,l=n.nodeName,u=n.parsedStyle,h=u.opacity,p=h===void 0?xi.globalAlpha:h,S=u.fillOpacity,N=S===void 0?xi.fillOpacity:S,U=u.strokeOpacity,H=U===void 0?xi.strokeOpacity:U,V=u.lineWidth,Y=V===void 0?xi.lineWidth:V,q=u.fill&&!u.fill.isNone,ne=u.stroke&&!u.stroke.isNone&&Y>0;if(!(!q&&!ne)){var le=!Pn(u.shadowColor)&&u.shadowBlur>0,ue=u.shadowType==="inner",fe=((o=u.fill)===null||o===void 0?void 0:o.alpha)===0,de=!!(u.filter&&u.filter.length),ve=le&&ne&&(l===Ct.PATH||l===Ct.LINE||l===Ct.POLYLINE||fe||ue),Te=null;if(q){ve||this.applyShadowAndFilterStyleToContext(t,n,le,i);var Oe=p*N;Te=$r(t,"globalAlpha",Oe,i.currentContext),this.fillToContext(t,n,i,a,s),ve||this.clearShadowAndFilterStyleForContext(t,le,de,i)}if(ne){var Ie=!1,ze=p*H,Xe=$r(t,"globalAlpha",ze,i.currentContext);if(Te=q?Te:Xe,ve&&(this.applyShadowAndFilterStyleToContext(t,n,le,i),Ie=!0,ue)){var et=t.globalCompositeOperation;t.globalCompositeOperation="source-atop",this.strokeToContext(t,n,i,a,s),t.globalCompositeOperation=et,this.clearShadowAndFilterStyleForContext(t,le,de,i,!0)}this.strokeToContext(t,n,i,a,s),Ie&&this.clearShadowAndFilterStyleForContext(t,le,de,i)}Te!==null&&$r(t,"globalAlpha",Te,i.currentContext)}}}])}(),Fg=function(r){function e(){return(0,_.Z)(this,e),(0,x.Z)(this,e,arguments)}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"render",value:function(n,i,a,s,o,l){var u=i.fill,h=i.fillRule,p=i.opacity,S=p===void 0?1:p,N=i.fillOpacity,U=N===void 0?1:N,H=i.stroke,V=i.strokeOpacity,Y=V===void 0?1:V,q=i.lineWidth,ne=q===void 0?1:q,le=i.lineCap,ue=i.lineJoin,fe=i.shadowType,de=i.shadowColor,ve=i.shadowBlur,Te=i.filter,Oe=i.miterLimit,Ie=u&&!u.isNone,ze=H&&!H.isNone&&ne>0,Xe=(u==null?void 0:u.alpha)===0,et=!!(Te&&Te.length),st=!Pn(de)&&ve>0,bt=a.nodeName,_t=fe==="inner",ct=ze&&st&&(bt===Ct.PATH||bt===Ct.LINE||bt===Ct.POLYLINE||Xe||_t);Ie&&(n.globalAlpha=S*U,ct||hf(a,n,st),_1(n,a,u,h,s,o,l,this.imagePool),ct||this.clearShadowAndFilter(n,et,st)),ze&&(n.globalAlpha=S*Y,n.lineWidth=ne,Pn(Oe)||(n.miterLimit=Oe),Pn(le)||(n.lineCap=le),Pn(ue)||(n.lineJoin=ue),ct&&(_t&&(n.globalCompositeOperation="source-atop"),hf(a,n,!0),_t&&(zg(n,a,H,s,o,l,this.imagePool),n.globalCompositeOperation=xi.globalCompositeOperation,this.clearShadowAndFilter(n,et,!0))),zg(n,a,H,s,o,l,this.imagePool))}},{key:"clearShadowAndFilter",value:function(n,i,a){if(a&&(n.shadowColor="transparent",n.shadowBlur=0),i){var s=n.filter;!Pn(s)&&s.indexOf("drop-shadow")>-1&&(n.filter=s.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(OC);function hf(r,e,t){var n=r.parsedStyle,i=n.filter,a=n.shadowColor,s=n.shadowBlur,o=n.shadowOffsetX,l=n.shadowOffsetY;i&&i.length&&(e.filter=r.style.filter),t&&(e.shadowColor=a.toString(),e.shadowBlur=s||0,e.shadowOffsetX=o||0,e.shadowOffsetY=l||0)}function _1(r,e,t,n,i,a,s,o){var l=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(t)?t.forEach(function(u){r.fillStyle=uf(u,e,r,o),l||(n?r.fill(n):r.fill())}):(el(t)&&(r.fillStyle=lf(t,e,r,i,a,s,o)),l||(n?r.fill(n):r.fill()))}function zg(r,e,t,n,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(t)?t.forEach(function(l){r.strokeStyle=uf(l,e,r,s),o||r.stroke()}):(el(t)&&(r.strokeStyle=lf(t,e,r,n,i,a,s)),o||r.stroke())}function DC(r,e){var t=(0,b.Z)(r,4),n=t[0],i=t[1],a=t[2],s=t[3],o=(0,b.Z)(e,4),l=o[0],u=o[1],h=o[2],p=o[3],S=Math.max(n,l),N=Math.max(i,u),U=Math.min(n+a,l+h),H=Math.min(i+s,u+p);return U<=S||H<=N?null:[S,N,U-S,H-N]}function CC(r,e){var t=qe(P(),[r[0],r[1],0],e),n=qe(P(),[r[0]+r[2],r[1],0],e),i=qe(P(),[r[0],r[1]+r[3],0],e),a=qe(P(),[r[0]+r[2],r[1]+r[3],0],e);return[Math.min(t[0],n[0],i[0],a[0]),Math.min(t[1],n[1],i[1],a[1]),Math.max(t[0],n[0],i[0],a[0])-Math.min(t[0],n[0],i[0],a[0]),Math.max(t[1],n[1],i[1],a[1])-Math.min(t[1],n[1],i[1],a[1])]}var LC=function(r){function e(){return(0,_.Z)(this,e),(0,x.Z)(this,e,arguments)}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"renderDownSampled",value:function(n,i,a,s){var o=s.src,l=s.imageCache;if(!l.downSampled){this.imagePool.createDownSampledImage(o,a).then(function(){a.ownerDocument&&(a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify())}).catch(function(u){console.error(u)});return}n.drawImage(l.downSampled,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}},{key:"renderTile",value:function(n,i,a,s){var o=s.src,l=s.imageCache,u=s.imageRect,h=s.drawRect,p=l.size,S=n.getTransform(),N=S.a,U=S.b,H=S.c,V=S.d,Y=S.e,q=S.f;if(n.resetTransform(),!(l!=null&&l.gridSize)){this.imagePool.createImageTiles(o,[],function(){a.ownerDocument&&(a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify())},a).catch(function(st){console.error(st)});return}for(var ne=[p[0]/u[2],p[1]/u[3]],le=[l.tileSize[0]/ne[0],l.tileSize[1]/ne[1]],ue=[Math.floor((h[0]-u[0])/le[0]),Math.ceil((h[0]+h[2]-u[0])/le[0])],fe=ue[0],de=ue[1],ve=[Math.floor((h[1]-u[1])/le[1]),Math.ceil((h[1]+h[3]-u[1])/le[1])],Te=ve[0],Oe=ve[1],Ie=Te;Ie<=Oe;Ie++)for(var ze=fe;ze<=de;ze++){var Xe=l.tiles[Ie][ze];if(Xe){var et=[Math.floor(u[0]+Xe.tileX*le[0]),Math.floor(u[1]+Xe.tileY*le[1]),Math.ceil(le[0]),Math.ceil(le[1])];n.drawImage(Xe.data,et[0],et[1],et[2],et[3])}}n.setTransform(N,U,H,V,Y,q)}},{key:"render",value:function(n,i,a){var s=i.x,o=s===void 0?0:s,l=i.y,u=l===void 0?0:l,h=i.width,p=i.height,S=i.src,N=i.shadowColor,U=i.shadowBlur,H=this.imagePool.getImageSync(S,a),V=H==null?void 0:H.img,Y=h,q=p;if(V){Y||(Y=V.width),q||(q=V.height);var ne=!Pn(N)&&U>0;hf(a,n,ne);try{var le=a.ownerDocument.defaultView.getContextService().getDomElement(),ue=le.width,fe=le.height,de=n.getTransform(),ve=de.a,Te=de.b,Oe=de.c,Ie=de.d,ze=de.e,Xe=de.f,et=Je(ve,Oe,0,0,Te,Ie,0,0,0,0,1,0,ze,Xe,0,1),st=CC([o,u,Y,q],et),bt=DC([0,0,ue,fe],st);if(!bt)return;if(!a.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){e.renderFull(n,i,a,{image:V,drawRect:[o,u,Y,q]});return}var _t=st[2]/H.size[0];if(_t<(H.downSamplingRate||.5)){this.renderDownSampled(n,i,a,{src:S,imageCache:H,drawRect:[o,u,Y,q]});return}if(!kg.isSupportTile){e.renderFull(n,i,a,{image:V,drawRect:[o,u,Y,q]});return}this.renderTile(n,i,a,{src:S,imageCache:H,imageRect:st,drawRect:bt})}catch(ct){}}}},{key:"drawToContext",value:function(n,i,a,s,o){this.render(n,i.parsedStyle,i)}}],[{key:"renderFull",value:function(n,i,a,s){n.drawImage(s.image,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}}])}(Fg),RC=function(r){function e(){return(0,_.Z)(this,e),(0,x.Z)(this,e,arguments)}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"render",value:function(n,i,a,s,o,l){a.getBounds();var u=i.lineWidth,h=u===void 0?1:u,p=i.textAlign,S=p===void 0?"start":p,N=i.textBaseline,U=N===void 0?"alphabetic":N,H=i.lineJoin,V=H===void 0?"miter":H,Y=i.miterLimit,q=Y===void 0?10:Y,ne=i.letterSpacing,le=ne===void 0?0:ne,ue=i.stroke,fe=i.fill,de=i.fillRule,ve=i.fillOpacity,Te=ve===void 0?1:ve,Oe=i.strokeOpacity,Ie=Oe===void 0?1:Oe,ze=i.opacity,Xe=ze===void 0?1:ze,et=i.metrics,st=i.x,bt=st===void 0?0:st,_t=i.y,ct=_t===void 0?0:_t,ft=i.dx,At=i.dy,Ft=i.shadowColor,Vt=i.shadowBlur,nn=et.font,hn=et.lines,rn=et.height,bn=et.lineHeight,Dn=et.lineMetrics;n.font=nn,n.lineWidth=h,n.textAlign=S==="middle"?"center":S;var kn=U;kn==="alphabetic"&&(kn="bottom"),n.lineJoin=V,Pn(q)||(n.miterLimit=q);var $n=ct;U==="middle"?$n+=-rn/2-bn/2:U==="bottom"||U==="alphabetic"||U==="ideographic"?$n+=-rn:(U==="top"||U==="hanging")&&($n+=-bn);var or=bt+(ft||0);$n+=At||0,hn.length===1&&(kn==="bottom"?(kn="middle",$n-=.5*rn):kn==="top"&&(kn="middle",$n+=.5*rn)),n.textBaseline=kn;var $i=!Pn(Ft)&&Vt>0;hf(a,n,$i);for(var mr=0;mr0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,e),t=(0,x.Z)(this,e),t.name="canvas-renderer",t.options=n,t}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"init",value:function(){var n,i=(0,G.Z)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),a=this.context.imagePool,s=new Fg(a),o=(n={},(0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)((0,fn.Z)(n,Ct.CIRCLE,s),Ct.ELLIPSE,s),Ct.RECT,s),Ct.IMAGE,new LC(a)),Ct.TEXT,new RC(a)),Ct.LINE,s),Ct.POLYLINE,s),Ct.POLYGON,s),Ct.PATH,s),Ct.GROUP,void 0),(0,fn.Z)((0,fn.Z)((0,fn.Z)(n,Ct.HTML,void 0),Ct.MESH,void 0),Ct.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new p1(i))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(mo);var E1=function(){function r(){(0,_.Z)(this,r)}return(0,F.Z)(r,[{key:"apply",value:function(t,n){var i=this,a=t.renderingService,s=t.renderingContext,o=t.config;this.context=t;var l=s.root.ownerDocument.defaultView,u=function(ve){a.hooks.pointerMove.call(ve)},h=function(ve){a.hooks.pointerUp.call(ve)},p=function(ve){a.hooks.pointerDown.call(ve)},S=function(ve){a.hooks.pointerOver.call(ve)},N=function(ve){a.hooks.pointerOut.call(ve)},U=function(ve){a.hooks.pointerCancel.call(ve)},H=function(ve){a.hooks.pointerWheel.call(ve)},V=function(ve){a.hooks.click.call(ve)},Y=function(ve){n.globalThis.document.addEventListener("pointermove",u,!0),ve.addEventListener("pointerdown",p,!0),ve.addEventListener("pointerleave",N,!0),ve.addEventListener("pointerover",S,!0),n.globalThis.addEventListener("pointerup",h,!0),n.globalThis.addEventListener("pointercancel",U,!0)},q=function(ve){ve.addEventListener("touchstart",p,!0),ve.addEventListener("touchend",h,!0),ve.addEventListener("touchmove",u,!0),ve.addEventListener("touchcancel",U,!0)},ne=function(ve){n.globalThis.document.addEventListener("mousemove",u,!0),ve.addEventListener("mousedown",p,!0),ve.addEventListener("mouseout",N,!0),ve.addEventListener("mouseover",S,!0),n.globalThis.addEventListener("mouseup",h,!0)},le=function(ve){n.globalThis.document.removeEventListener("pointermove",u,!0),ve.removeEventListener("pointerdown",p,!0),ve.removeEventListener("pointerleave",N,!0),ve.removeEventListener("pointerover",S,!0),n.globalThis.removeEventListener("pointerup",h,!0),n.globalThis.removeEventListener("pointercancel",U,!0)},ue=function(ve){ve.removeEventListener("touchstart",p,!0),ve.removeEventListener("touchend",h,!0),ve.removeEventListener("touchmove",u,!0),ve.removeEventListener("touchcancel",U,!0)},fe=function(ve){n.globalThis.document.removeEventListener("mousemove",u,!0),ve.removeEventListener("mousedown",p,!0),ve.removeEventListener("mouseout",N,!0),ve.removeEventListener("mouseover",S,!0),n.globalThis.removeEventListener("mouseup",h,!0)};a.hooks.init.tap(r.tag,function(){var de=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(de.style.msContentZooming="none",de.style.msTouchAction="none"):l.supportsPointerEvents&&(de.style.touchAction="none"),l.supportsPointerEvents?Y(de):ne(de),l.supportsTouchEvents&&q(de),o.useNativeClickEvent&&de.addEventListener("click",V,!0),de.addEventListener("wheel",H,{passive:!0,capture:!0})}),a.hooks.destroy.tap(r.tag,function(){var de=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(de.style.msContentZooming="",de.style.msTouchAction=""):l.supportsPointerEvents&&(de.style.touchAction=""),l.supportsPointerEvents?le(de):fe(de),l.supportsTouchEvents&&ue(de),o.useNativeClickEvent&&de.removeEventListener("click",V,!0),de.removeEventListener("wheel",H,!0)})}}])}();E1.tag="DOMInteraction";var NC=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([t[0],t[1],t[4],t[5],t[12]+n[0],t[13]+n[1]].join(","),")")}},{key:"apply",value:function(t,n){var i=this,a=t.camera,s=t.renderingContext,o=t.renderingService;this.context=t;var l=s.root.ownerDocument.defaultView,u=l.context.eventService.nativeHTMLMap,h=function(Y,q){q.style.transform=i.joinTransformMatrix(Y.getWorldTransform(),Y.getOrigin())},p=function(Y){var q=Y.target;if(q.nodeName===Ct.HTML){i.$camera||(i.$camera=i.createCamera(a));var ne=i.getOrCreateEl(q);i.$camera.appendChild(ne),Object.keys(q.attributes).forEach(function(le){i.updateAttribute(le,q)}),h(q,ne),u.set(ne,q)}},S=function(Y){var q=Y.target;if(q.nodeName===Ct.HTML&&i.$camera){var ne=i.getOrCreateEl(q);ne&&(ne.remove(),u.delete(ne))}},N=function(Y){var q=Y.target;if(q.nodeName===Ct.HTML){var ne=Y.attrName;i.updateAttribute(ne,q)}},U=function(Y){var q=Y.target,ne=q.nodeName===Ct.FRAGMENT?q.childNodes:[q];ne.forEach(function(le){if(le.nodeName===Ct.HTML){var ue=i.getOrCreateEl(le);h(le,ue)}})},H=function(){if(i.$camera){var Y=i.context.config,q=Y.width,ne=Y.height;i.$camera.parentElement.style.width="".concat(q||0,"px"),i.$camera.parentElement.style.height="".concat(ne||0,"px")}};o.hooks.init.tap(r.tag,function(){l.addEventListener(Oa.RESIZE,H),l.addEventListener(Kn.MOUNTED,p),l.addEventListener(Kn.UNMOUNTED,S),l.addEventListener(Kn.ATTR_MODIFIED,N),l.addEventListener(Kn.BOUNDS_CHANGED,U)}),o.hooks.endFrame.tap(r.tag,function(){i.$camera&&s.renderReasons.has(Vl.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(a.getOrthoMatrix()))}),o.hooks.destroy.tap(r.tag,function(){i.$camera&&i.$camera.remove(),l.removeEventListener(Oa.RESIZE,H),l.removeEventListener(Kn.MOUNTED,p),l.removeEventListener(Kn.UNMOUNTED,S),l.removeEventListener(Kn.ATTR_MODIFIED,N),l.removeEventListener(Kn.BOUNDS_CHANGED,U)})}},{key:"createCamera",value:function(t){var n=this.context.config,i=n.document,a=n.width,s=n.height,o=this.context.contextService.getDomElement(),l=o.parentNode;if(l){var u=BC,h=l.querySelector("#".concat(u));if(!h){var p=(i||document).createElement("div");p.style.overflow="hidden",p.style.pointerEvents="none",p.style.position="absolute",p.style.left="0px",p.style.top="0px",p.style.width="".concat(a||0,"px"),p.style.height="".concat(s||0,"px");var S=(i||document).createElement("div");h=S,S.id=u,S.style.position="absolute",S.style.left="".concat(o.offsetLeft||0,"px"),S.style.top="".concat(o.offsetTop||0,"px"),S.style.transformOrigin="left top",S.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),S.style.pointerEvents="none",S.style.width="100%",S.style.height="100%",p.appendChild(S),l.appendChild(p)}return h}return null}},{key:"getOrCreateEl",value:function(t){var n=this.context.config.document,i=this.displayObjectHTMLElementMap.get(t);return i||(i=(n||document).createElement("div"),t.parsedStyle.$el=i,this.displayObjectHTMLElementMap.set(t,i),t.id&&(i.id=t.id),t.name&&i.setAttribute("name",t.name),t.className&&(i.className=t.className),i.style.position="absolute",i.style["will-change"]="transform",i.style.transform=this.joinTransformMatrix(t.getWorldTransform(),t.getOrigin())),i}},{key:"updateAttribute",value:function(t,n){var i=this.getOrCreateEl(n);switch(t){case"innerHTML":var a=n.parsedStyle.innerHTML;ur(a)?i.innerHTML=a:(i.innerHTML="",i.appendChild(a));break;case"x":i.style.left="".concat(n.parsedStyle.x,"px");break;case"y":i.style.top="".concat(n.parsedStyle.y,"px");break;case"transformOrigin":var s=n.parsedStyle.transformOrigin;i.style["transform-origin"]="".concat(s[0].buildCSSText(null,null,"")," ").concat(s[1].buildCSSText(null,null,""));break;case"width":var o=n.parsedStyle.width;i.style.width=un(o)?"".concat(o,"px"):o.toString();break;case"height":var l=n.parsedStyle.height;i.style.height=un(l)?"".concat(l,"px"):l.toString();break;case"zIndex":var u=n.parsedStyle.zIndex;i.style["z-index"]="".concat(u);break;case"visibility":var h=n.parsedStyle.visibility;i.style.visibility=h;break;case"pointerEvents":var p=n.parsedStyle.pointerEvents,S=p===void 0?"auto":p;i.style.pointerEvents=S;break;case"opacity":var N=n.parsedStyle.opacity;i.style.opacity="".concat(N);break;case"fill":var U=n.parsedStyle.fill,H="";eh(U)?U.isNone?H="transparent":H=n.getAttribute("fill"):Array.isArray(U)?H=n.getAttribute("fill"):el(U),i.style.background=H;break;case"stroke":var V=n.parsedStyle.stroke,Y="";eh(V)?V.isNone?Y="transparent":Y=n.getAttribute("stroke"):Array.isArray(V)?Y=n.getAttribute("stroke"):el(V),i.style["border-color"]=Y,i.style["border-style"]="solid";break;case"lineWidth":var q=n.parsedStyle.lineWidth;i.style["border-width"]="".concat(q||0,"px");break;case"lineDash":i.style["border-style"]="dashed";break;case"filter":var ne=n.style.filter;i.style.filter=ne;break;default:!Pn(n.style[t])&&n.style[t]!==""&&(i.style[t]=n.style[t])}}}])}();x1.tag="HTMLRendering";var kC=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a0&&o[0]!==void 0?o[0]:{},a=i.type,s=i.encoderOptions,u.abrupt("return",this.context.canvas.toDataURL(a,s));case 3:case"end":return u.stop()}},n,this)}));function t(){return e.apply(this,arguments)}return t}()}])}(),zC=function(r){function e(){var t;(0,_.Z)(this,e);for(var n=arguments.length,i=new Array(n),a=0;a{const n=this.context.canvas,i=n.context.renderingContext.root.ownerDocument.defaultView;this.normalizeToPointerEvent(t,i).forEach(s=>{const o=this.bootstrapEvent(this.rootPointerEvent,s,i,t);tc(n.context.eventService,"mappingTable.pointerupoutside",[]),n.context.eventService.mapEvent(o)})}}get eventService(){return this.context.canvas.context.eventService}get events(){return[Lt.CLICK,Lt.POINTER_DOWN,Lt.POINTER_MOVE,Lt.POINTER_UP,Lt.POINTER_OVER,Lt.POINTER_LEAVE]}getDomElement(){return this.getShape("key").getDomElement()}render(e=this.parsedAttributes,t=this){this.drawKeyShape(e,t),this.drawPortShapes(e,t)}getKeyStyle(e){const t=ml(e,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:n=0,dy:i=0}=t,a=HC(t,["dx","dy"]),[s,o]=this.getSize(e);return Object.assign(Object.assign({x:n,y:i},a),{width:s,height:o})}drawKeyShape(e,t){const n=this.getKeyStyle(e),{x:i,y:a,width:s=0,height:o=0}=n,l=this.upsert("key-container",ki,{x:i,y:a,width:s,height:o,opacity:0},t);return this.upsert("key",Wu,n,l)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof ac))return;const n=this.getDomElement();this.events.forEach(i=>{n.addEventListener(i,this.forwardEvents)})}attributeChangedCallback(e,t,n){e==="zIndex"&&t!==n&&(this.getDomElement().style.zIndex=n)}destroy(){const e=this.getDomElement();this.events.forEach(t=>{e.removeEventListener(t,this.forwardEvents)}),super.destroy()}normalizeToPointerEvent(e,t){const n=[];if(t.isTouchEvent(e))for(let i=0;ithis.context.element.getElement(s)).filter(Boolean);if(i.length===0){const s=new Nr,{x:o=0,y:l=0,size:u}=e,[h,p]=La(u);return s.setMinMax([o-h/2,l-p/2,0],[o+h/2,l+p/2,0]),s}const a=Xu(i.map(s=>s.getBounds()));return n?Mo(a,n):a}drawCollapsedMarkerShape(e,t){const n=this.getCollapsedMarkerStyle(e);this.upsert("collapsed-marker",u1,n,t),Cg(this)}getCollapsedMarkerStyle(e){if(!e.collapsed||!e.collapsedMarker)return!1;const t=Ei(this.getGraphicStyle(e),"collapsedMarker"),{type:n}=t,i=M1(t,["type"]),a=this.getShape("key"),[s,o]=$s(a.getLocalBounds(),"center"),l=Object.assign(Object.assign({},i),{x:s,y:o});if(n){const u=this.getCollapsedMarkerText(n,e);Object.assign(l,{text:u})}return l}getCollapsedMarkerText(e,t){const{childrenData:n=[]}=t,{model:i}=this.context;return e==="descendant-count"?i.getDescendantsData(this.id).length.toString():e==="child-count"?n.length.toString():e==="node-count"?i.getDescendantsData(this.id).filter(a=>i.getElementType(Et(a))==="node").length.toString():yn(e)?e(n):""}getComboPosition(e){const{x:t=0,y:n=0,collapsed:i,childrenData:a=[]}=e;if(a.length===0)return[+t,+n,0];if(i){const{model:s}=this.context,o=s.getDescendantsData(this.id).filter(l=>!s.isCombo(Et(l)));if(o.length>0&&o.some(fD)){const l=o.reduce((u,h)=>Un(u,Ti(h)),[0,0,0]);return vs(l,o.length)}return[+t,+n,0]}return this.getContentBBox(e).center}getComboStyle(e){const[t,n]=this.getComboPosition(e);return{x:t,y:n,transform:[["translate",t,n]]}}updateComboPosition(e){const t=this.getComboStyle(e);Object.assign(this.style,t);const{x:n,y:i}=t;this.context.model.syncNodeLikeDatum({id:this.id,style:{x:n,y:i}}),Lg(this)}render(e,t=this){super.render(e,t),this.drawCollapsedMarkerShape(e,t)}update(e={}){super.update(e),this.updateComboPosition(this.parsedAttributes)}onframe(){super.onframe(),this.attributes.collapsed||this.updateComboPosition(this.parsedAttributes),this.drawKeyShape(this.parsedAttributes,this)}animate(e,t){const n=super.animate(this.attributes.collapsed?e:e.map(i=>{var{x:a,y:s,z:o,transform:l}=i,u=M1(i,["x","y","z","transform"]);return u}),t);return n&&new Proxy(n,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}eu.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class VC extends eu{constructor(e){super(e)}drawKeyShape(e,t){return this.upsert("key",Ks,this.getKeyStyle(e),t)}getKeyStyle(e){const{collapsed:t}=e,n=super.getKeyStyle(e),[i]=this.getKeySize(e);return Object.assign(Object.assign(Object.assign({},n),t&&Ei(n,"collapsed")),{r:i/2})}getCollapsedKeySize(e){const[t,n]=La(e.collapsedSize),i=Math.max(t,n)/2;return[i*2,i*2,0]}getExpandedKeySize(e){const t=this.getContentBBox(e),[n,i]=bo(t),a=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))/2;return[a*2,a*2,0]}getIntersectPoint(e,t=!1){const n=this.getShape("key").getBounds();return Yh(e,n,t)}}class ZC extends eu{constructor(e){super(e)}drawKeyShape(e,t){return this.upsert("key",ki,this.getKeyStyle(e),t)}getKeyStyle(e){const t=super.getKeyStyle(e),[n,i]=this.getKeySize(e);return Object.assign(Object.assign(Object.assign({},t),e.collapsed&&Ei(t,"collapsed")),{width:n,height:i,x:-n/2,y:-i/2})}}var KC=function(r,e){if(!Vu(r))return r;for(var t=[],n=0;n-1:!1},QC=YC,JC=function(r,e){return e===void 0&&(e=[]),XC(r,function(t){return!QC(e,t)})},qC=JC;const $C={padding:10};function A1(r,e,t,n,i,a){const{padding:s}=Object.assign($C,a),o=wo(t,s),l=wo(n,s),u=[r,...i,e];let h=null;const p=[];for(let S=0,N=u.length;Sa?"N":"S":n===a?t>i?"W":"E":null}function Ug(r,e){return e==="N"||e==="S"?Bs(r):Ns(r)}function P1(r,e,t){const n=[r[0],e[1]],i=[e[0],r[1]],a=oa(r,n),s=oa(r,i),o=t?eL[t]:null,l=a===t||a!==o&&s!==t?n:i;return{points:[l],direction:oa(l,e)}}function gf(r,e,t){if(Lh(r,t)){const n=sc(r,e,t);return{points:[n],direction:oa(n,e)}}else{const n=ul(r,t),a=["left","right"].includes(Yu(r,t))?[e[0],n[1]]:[n[0],e[1]];return{points:[a],direction:oa(a,e)}}}function S1(r,e,t,n){const i=Lh(e,t)?e:ul(e,t),a=[[i[0],r[1]],[r[0],i[1]]],s=a.filter(l=>_S(l,t)&&!Jy(l,t,!0)),o=s.filter(l=>oa(l,r)!==n);if(o.length>0){const l=o.find(u=>oa(r,u)===n)||o[0];return{points:[l],direction:oa(l,e)}}else{const l=qC(a,s)[0],u=Po(e,l,Ug(t,n)/2);return{points:[sc(u,r,t),u],direction:oa(u,e)}}}function tL(r,e,t,n){let i=gf(r,e,t);const a=qu(i.points[0]);if(hs(a,n)){i=gf(e,r,n);const s=qu(i.points[0]);if(hs(s,t)){const o=Po(r,a,Ug(t,oa(r,a))/2),l=Po(e,s,Ug(n,oa(e,s))/2),u=[(o[0]+l[0])/2,(o[1]+l[1])/2],h=gf(r,u,t),p=S1(u,e,n,h.direction);i.points=[h.points[0],p.points[0]],i.direction=p.direction}}return i}function Wg(r,e,t,n,i){const s=Xu([t,n]),o=Wr(e,s.center)>Wr(r,s.center),[l,u]=o?[e,r]:[r,e],h=Bs(s)+Ns(s);let p;if(i){const U=[l[0]+h*Math.cos(T1[i]),l[1]+h*Math.sin(T1[i])];p=Po(ul(U,s),U,.01)}else p=Po(ul(l,s),l,-.01);let S=sc(p,u,s),N=[$u(p,2),$u(S,2)];if(ci($u(p),$u(S))){const U=xg(Or(p,l),[1,0,0])+Math.PI/2;S=[u[0]+h*Math.cos(U),u[1]+h*Math.sin(U),0],S=$u(Po(ul(S,s),u,-.01),2);const H=sc(p,S,s);N=[p,H,S]}return{points:o?N.reverse():N,direction:oa(o?p:S,e)}}function sc(r,e,t){let n=[r[0],e[1]];return hs(n,t)&&(n=[e[0],r[1]]),n}function O1(r,e,t,n,i){let l=typeof e=="number"?e:.5;e==="start"&&(l=0),e==="end"&&(l=.99);const u=Fi(r.getPoint(l)),h=Fi(r.getPoint(l+.01));let p=e==="start"?"left":e==="end"?"right":"center";if(j_(u,h)||!t){const[Y,q]=D1(r,l,n,i);return{transform:[["translate",Y,q]],textAlign:p}}let S=Math.atan2(h[1]-u[1],h[0]-u[0]);h[0]{const h=s[u-1]||i,p=s[u+1]||a;if(!V_(h,l,p)&&e){const[S,N]=sL(h,l,p,e);o.push(["L",S[0],S[1]],["Q",l[0],l[1],N[0],N[1]],["L",N[0],N[1]])}else o.push(["L",l[0],l[1]])}),o.push(["L",a[0],a[1]]),t&&o.push(["Z"]),o}function sL(r,e,t,n){const i=Kh(r,e),a=Kh(t,e),s=Math.min(n,Math.min(i,a)/2),o=[e[0]-s/i*(e[0]-r[0]),e[1]-s/i*(e[1]-r[1])],l=[e[0]-s/a*(e[0]-t[0]),e[1]-s/a*(e[1]-t[1])];return[o,l]}const oL=r=>{const e=Math.PI/2,t=Bs(r)/2,n=Ns(r)/2,i=Math.atan2(t,n)/2,a=Math.atan2(n,t)/2;return{top:[-e-a,-e+a],"top-right":[-e+a,-i],"right-top":[-e+a,-i],right:[-i,i],"bottom-right":[i,e-a],"right-bottom":[i,e-a],bottom:[e-a,e+a],"bottom-left":[e+a,Math.PI-i],"left-bottom":[e+a,Math.PI-i],left:[Math.PI-i,Math.PI+i],"top-left":[Math.PI+i,-e-a],"left-top":[Math.PI+i,-e-a]}};function L1(r,e,t,n,i){const a=wo(r),s=r.getCenter();let o=n&&Co(n),l=i&&Co(i);if(!o||!l){const u=oL(a),h=u[e][0],p=u[e][1],[S,N]=bo(a),U=Math.max(S,N),H=Un(s,[U*Math.cos(h),U*Math.sin(h),0]),V=Un(s,[U*Math.cos(p),U*Math.sin(p),0]);o=Xg(r,H),l=Xg(r,V),t||([o,l]=[l,o])}return[o,l]}function lL(r,e,t,n,i,a){const s=r.getPorts()[i||a],o=r.getPorts()[a||i];let[l,u]=L1(r,e,t,s,o);const h=uL(r,l,u,n);return s&&(l=lc(s,h[0])),o&&(u=lc(o,h.at(-1))),C1(l,u,h)}function uL(r,e,t,n){const i=r.getCenter();if(ci(e,t)){const a=Or(e,i),s=[n*Math.sign(a[0])||n/2,n*Math.sign(a[1])||-n/2,0];return[Un(e,s),Un(t,ds(s,[1,-1,1]))]}return[Po(i,e,Wr(i,e)+n),Po(i,t,Wr(i,t)+n)]}function cL(r,e,t,n,i,a,s){const o=Kg(r),l=o[a||s],u=o[s||a];let[h,p]=L1(r,t,n,l,u);const S=hL(r,h,p,i);return l&&(h=lc(l,S[0])),u&&(p=lc(u,S.at(-1))),Gg([h,...S,p],e)}function hL(r,e,t,n){const i=[],a=wo(r);if(ci(e,t))switch(Yu(e,a)){case"left":i.push([e[0]-n,e[1]]),i.push([e[0]-n,e[1]+n]),i.push([e[0],e[1]+n]);break;case"right":i.push([e[0]+n,e[1]]),i.push([e[0]+n,e[1]+n]),i.push([e[0],e[1]+n]);break;case"top":i.push([e[0],e[1]-n]),i.push([e[0]+n,e[1]-n]),i.push([e[0]+n,e[1]]);break;case"bottom":i.push([e[0],e[1]+n]),i.push([e[0]+n,e[1]+n]),i.push([e[0]+n,e[1]]);break}else{const s=Yu(e,a),o=Yu(t,a);if(s===o){const l=s;let u,h;switch(l){case"left":u=Math.min(e[0],t[0])-n,i.push([u,e[1]]),i.push([u,t[1]]);break;case"right":u=Math.max(e[0],t[0])+n,i.push([u,e[1]]),i.push([u,t[1]]);break;case"top":h=Math.min(e[1],t[1])-n,i.push([e[0],h]),i.push([t[0],h]);break;case"bottom":h=Math.max(e[1],t[1])+n,i.push([e[0],h]),i.push([t[0],h]);break}}else{const l=(S,N)=>({left:[N[0]-n,N[1]],right:[N[0]+n,N[1]],top:[N[0],N[1]-n],bottom:[N[0],N[1]+n]})[S],u=l(s,e),h=l(o,t),p=sc(u,h,a);i.push(u,p,h)}}return i}function jg(r,e){const t=new Set,n=new Set,i=new Set;return r.forEach(a=>{e(a).forEach(o=>{t.add(o),r.includes(o.source)&&r.includes(o.target)?n.add(o):i.add(o)})}),{edges:Array.from(t),internal:Array.from(n),external:Array.from(i)}}function R1(r,e){const t=[];let n=r;for(;n;){t.push(n);const i=e(Et(n));if(i)n=i;else break}if(t.some(i=>{var a;return(a=i.style)===null||a===void 0?void 0:a.collapsed})){const i=t.reverse().findIndex(xa);return t[i]||t.at(-1)}return r}function fL(r,e){return e||(r<4?10:r===4?12:r*2.5)}const dL=(r,e)=>{const t=Math.max(r,e)/2;return[["M",-r/2,0],["A",t,t,0,1,0,2*t-r/2,0],["A",t,t,0,1,0,-r/2,0],["Z"]]},I1=(r,e)=>[["M",-r/2,0],["L",r/2,-e/2],["L",r/2,e/2],["Z"]],vL=(r,e)=>[["M",-r/2,0],["L",0,-e/2],["L",r/2,0],["L",0,e/2],["Z"]],gL=(r,e)=>[["M",-r/2,0],["L",r/2,-e/2],["L",4*r/5-r/2,0],["L",r/2,e/2],["Z"]],pL=(r,e)=>[["M",-r/2,-e/2],["L",r/2,-e/2],["L",r/2,e/2],["L",-r/2,e/2],["Z"]],mL=(r,e)=>{const t=r/2,n=r/7,i=r-n;return[["M",-t,0],["L",0,-e/2],["L",0,e/2],["Z"],["M",i-t,-e/2],["L",i+n-t,-e/2],["L",i+n-t,e/2],["L",i-t,e/2],["Z"]]},yL=(r,e)=>[["M",r/2,-e/2],["L",-r/2,0],["L",r/2,0],["L",-r/2,0],["L",r/2,e/2]];var pf=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{u in i&&(l[u]=i[u])}),l}getLoopPath(e){const{sourcePort:t,targetPort:n}=e,i=this.sourceNode,a=wo(i),s=Math.max(Ns(a),Bs(a)),{placement:o,clockwise:l,dist:u=s}=Ei(this.getGraphicStyle(e),"loop");return lL(i,o,l,u,t,n)}getEndpoints(e,t=!0,n=[]){const{sourcePort:i,targetPort:a}=e,{sourceNode:s,targetNode:o}=this,[l,u]=DL(s,o,i,a);if(!t){const N=l?Co(l):s.getCenter(),U=u?Co(u):o.getCenter();return[N,U]}const h=typeof n=="function"?n():n,p=H1(l||s,h[0]||u||o),S=H1(u||o,h[h.length-1]||l||s);return[p,S]}getHaloStyle(e){if(e.halo===!1)return!1;const t=this.getKeyStyle(e),n=Ei(this.getGraphicStyle(e),"halo");return Object.assign(Object.assign({},t),n)}getLabelStyle(e){if(e.label===!1||!e.labelText)return!1;const t=Ei(this.getGraphicStyle(e),"label"),{placement:n,offsetX:i,offsetY:a,autoRotate:s,maxWidth:o}=t,l=pf(t,["placement","offsetX","offsetY","autoRotate","maxWidth"]),u=O1(this.shapeMap.key,n,s,i,a),h=this.shapeMap.key.getLocalBounds(),p=SD([h.min,h.max],o);return Object.assign({wordWrapWidth:p},u,l)}getBadgeStyle(e){if(e.badge===!1||!e.badgeText)return!1;const t=Ei(e,"badge"),{offsetX:n,offsetY:i,placement:a}=t,s=pf(t,["offsetX","offsetY","placement"]);return Object.assign(s,nL(this.shapeMap,a,e.labelPlacement,n,i))}drawArrow(e,t){var n;const i=t==="start",s=e[t==="start"?"startArrow":"endArrow"],o=this.shapeMap.key;if(s){const l=this.getArrowStyle(e,i),[u,h,p]=i?["markerStart","markerStartOffset","startArrowOffset"]:["markerEnd","markerEndOffset","endArrowOffset"],S=o.parsedStyle[u];if(S)S.attr(l);else{const N=l.src?Hu:Sa,U=new N({style:l});o.style[u]=U}o.style[h]=e[p]||l.width/2+ +l.lineWidth}else{const l=i?"markerStart":"markerEnd";(n=o.style[l])===null||n===void 0||n.destroy(),o.style[l]=null}}getArrowStyle(e,t){const n=this.getShape("key").attributes,i=t?"startArrow":"endArrow",a=Ei(this.getGraphicStyle(e),i),{size:s,type:o}=a,l=pf(a,["size","type"]),[u,h]=La(fL(n.lineWidth,s)),S=(yn(o)?o:ee[o]||I1)(u,h);return Object.assign(ml(n,["stroke","strokeOpacity","fillOpacity"]),{width:u,height:h},Object.assign({},S&&{d:S,fill:o==="simple"?"":n.stroke}),l)}drawLabelShape(e,t){const n=this.getLabelStyle(e);this.upsert("label",So,n,t)}drawHaloShape(e,t){const n=this.getHaloStyle(e);this.upsert("halo",Sa,n,t)}drawBadgeShape(e,t){const n=this.getBadgeStyle(e);this.upsert("badge",ql,n,t)}drawSourceArrow(e){this.drawArrow(e,"start")}drawTargetArrow(e){this.drawArrow(e,"end")}drawKeyShape(e,t){const n=this.getKeyStyle(e);return this.upsert("key",Sa,n,t)}render(e=this.parsedAttributes,t=this){this.drawKeyShape(e,t),this.getShape("key")&&(this.drawSourceArrow(e),this.drawTargetArrow(e),this.drawLabelShape(e,t),this.drawHaloShape(e,t),this.drawBadgeShape(e,t))}onframe(){this.drawKeyShape(this.parsedAttributes,this),this.drawSourceArrow(this.parsedAttributes),this.drawTargetArrow(this.parsedAttributes),this.drawHaloShape(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this),this.drawBadgeShape(this.parsedAttributes,this)}animate(e,t){const n=super.animate(e,t);return n&&new Proxy(n,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}Do.defaultStyleProps={badge:!0,badgeOffsetX:0,badgeOffsetY:0,badgePlacement:"suffix",isBillboard:!0,label:!0,labelAutoRotate:!0,labelIsBillboard:!0,labelMaxWidth:"80%",labelOffsetX:4,labelOffsetY:0,labelPlacement:"center",labelTextBaseline:"middle",labelWordWrap:!1,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloPointerEvents:"none",haloStrokeOpacity:.25,haloZIndex:-1,loop:!0,startArrow:!1,startArrowLineDash:0,startArrowLineJoin:"round",startArrowLineWidth:1,startArrowTransformOrigin:"center",startArrowType:"vee",endArrow:!1,endArrowLineDash:0,endArrowLineJoin:"round",endArrowLineWidth:1,endArrowTransformOrigin:"center",endArrowType:"vee",loopPlacement:"top",loopClockwise:!0};class yl extends Do{constructor(e){super(Di({style:yl.defaultStyleProps},e))}getKeyPath(e){const[t,n]=this.getEndpoints(e),{controlPoints:i,curvePosition:a,curveOffset:s}=e,o=this.getControlPoints(t,n,iL(a),rL(s),i);return C1(t,n,o)}getControlPoints(e,t,n,i,a){return(a==null?void 0:a.length)===2?a:[Hg(e,t,n[0],i[0]),Hg(e,t,n[1],i[1])]}}yl.defaultStyleProps={curvePosition:.5,curveOffset:20};class mf extends yl{constructor(e){super(Di({style:mf.defaultStyleProps},e))}getControlPoints(e,t,n,i){const a=t[0]-e[0];return[[e[0]+a*n[0]+i[0],e[1]],[t[0]-a*n[1]+i[1],t[1]]]}}mf.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class yf extends yl{constructor(e){super(Di({style:yf.defaultStyleProps},e))}get ref(){return this.context.model.getRootsData()[0]}getEndpoints(e){if(this.sourceNode.id===this.ref.id)return super.getEndpoints(e);const t=Ti(this.ref),n=this.sourceNode.getIntersectPoint(t,!0),i=this.targetNode.getIntersectPoint(t);return[n,i]}toRadialCoordinate(e){const t=Ti(this.ref),n=Wr(e,t),i=U_(Or(e,t));return[n,i]}getControlPoints(e,t,n,i){const[a,s]=this.toRadialCoordinate(e),[o]=this.toRadialCoordinate(t),l=o-a;return[[e[0]+(l*n[0]+i[0])*Math.cos(s),e[1]+(l*n[0]+i[0])*Math.sin(s)],[t[0]-(l*n[1]-i[0])*Math.cos(s),t[1]-(l*n[1]-i[0])*Math.sin(s)]]}}yf.defaultStyleProps={curvePosition:.5,curveOffset:20};class _f extends yl{constructor(e){super(Di({style:_f.defaultStyleProps},e))}getControlPoints(e,t,n,i){const a=t[1]-e[1];return[[e[0],e[1]+a*n[0]+i[0]],[t[0],t[1]-a*n[1]+i[1]]]}}_f.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class Ef extends Do{constructor(e){super(Di({style:Ef.defaultStyleProps},e))}getKeyPath(e){const[t,n]=this.getEndpoints(e);return[["M",t[0],t[1]],["L",n[0],n[1]]]}}Ef.defaultStyleProps={};const _L={enableObstacleAvoidance:!1,offset:10,maxAllowedDirectionChange:Math.PI/2,maximumLoops:3e3,gridSize:5,startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{right:{stepX:1,stepY:0},left:{stepX:-1,stepY:0},bottom:{stepX:0,stepY:1},top:{stepX:0,stepY:-1}},penalties:{0:0,90:0},distFunc:Kh},to=r=>`${Math.round(r[0])}|||${Math.round(r[1])}`;function _l(r,e){const t=n=>Math.round(n/e);return un(r)?t(r):r.map(t)}function EL(r,e){const t=Math.abs(r-e);return t>Math.PI?2*Math.PI-t:t}function N1(r,e){const t=e[0]-r[0],n=e[1]-r[1];return!t&&!n?0:Math.atan2(n,t)}function B1(r,e,t,n){const i=N1(r,e),a=t[to(r)],o=N1(a||n,r);return EL(o,i)}const xL=(r,e)=>{const{offset:t,gridSize:n}=e,i={};return r.forEach(a=>{if(!a||a.destroyed||!a.isVisible())return;const s=Mo(a.getRenderBounds(),t);for(let o=_l(s.min[0],n);o<=_l(s.max[0],n);o+=1)for(let l=_l(s.min[1],n);l<=_l(s.max[1],n);l+=1)i[`${o}|||${l}`]=!0}),i};function k1(r,e,t){return Math.min(...e.map(n=>t(r,n)))}function bL(r,e,t){let n=r[0],i=t(r[0],e);for(let a=0;a{if(!e)return[r];const{directionMap:i,offset:a}=n,s=Mo(e.getRenderBounds(),a),o=Object.keys(i).reduce((l,u)=>{if(t.includes(u)){const h=i[u],[p,S]=bo(s),N=[r[0]+h.stepX*p,r[1]+h.stepY*S],U=bS(s);for(let H=0;H_l(l,n.gridSize))},wL=(r,e,t,n,i,a,s)=>{const o=[];let l=[a[0]===n[0]?n[0]:r[0]*s,a[1]===n[1]?n[1]:r[1]*s];o.unshift(l);let u=r,h=e[to(u)];for(;h;){const N=h,U=u;B1(N,U,e,t)&&(l=[N[0]===U[0]?l[0]:N[0]*s,N[1]===U[1]?l[1]:N[1]*s],o.unshift(l)),h=e[to(N)],u=N}const p=i.map(N=>[N[0]*s,N[1]*s]),S=bL(p,l,Kh);return o.unshift(S),o};function ML(r,e,t,n){const i=fl(r.getCenter()),a=fl(e.getCenter()),s=Object.assign(_L,n),{gridSize:o}=s,l=s.enableObstacleAvoidance?t:[r,e],u=xL(l,s),h=_l(i,o),p=_l(a,o),S=F1(i,r,s.startDirections,s),N=F1(a,e,s.endDirections,s);S.forEach(ve=>delete u[to(ve)]),N.forEach(ve=>delete u[to(ve)]);const U={},H={},V={},Y={},q={},ne=new AL;for(let ve=0;veto(ve));let ue=s.maximumLoops,fe,de=1/0;for(const[ve,Te]of Object.entries(U))q[ve]<=de&&(de=q[ve],fe=Te);for(;Object.keys(U).length>0&&ue>0;){const ve=ne.minId(!1);if(ve)fe=U[ve];else break;const Te=to(fe);if(le.includes(Te))return wL(fe,V,h,a,S,p,o);delete U[Te],ne.remove(Te),H[Te]=!0;for(const Oe of Object.values(s.directionMap)){const Ie=Un(fe,[Oe.stepX,Oe.stepY]),ze=to(Ie);if(H[ze])continue;const Xe=B1(fe,Ie,V,h);if(Xe>s.maxAllowedDirectionChange||u[ze])continue;U[ze]||(U[ze]=Ie);const et=s.penalties[Xe],st=s.distFunc(fe,Ie)+(isNaN(et)?o:et),bt=Y[Te]+st,_t=Y[ze];_t&&bt>=_t||(V[ze]=fe,Y[ze]=bt,q[ze]=bt+k1(Ie,N,s.distFunc),ne.add({id:ze,value:q[ze]}))}ue-=1}return[]}class AL{constructor(){this.arr=[],this.map={},this.arr=[],this.map={}}_innerAdd(e,t){let n=0,i=t-1;for(;i-n>1;){const a=Math.floor((n+i)/2);if(this.arr[a].value>e.value)i=a;else if(this.arr[a].value=0;t--)this.map[this.arr[t].id]?e=this.arr[t].id:this.arr.splice(t,1);return e}_findFirstId(){for(;this.arr.length;){const e=this.arr.shift();if(this.map[e.id])return e.id}}minId(e){return e?this._clearAndGetMinId():this._findFirstId()}}class xf extends Do{constructor(e){super(Di({style:xf.defaultStyleProps},e))}getControlPoints(e){const{router:t}=e,{sourceNode:n,targetNode:i}=this,[a,s]=this.getEndpoints(e,!1);let o=[];if(!t)o=e.controlPoints;else if(t.type==="shortest-path"){const l=this.context.element.getNodes();o=ML(n,i,l,t),o.length||(o=A1(a,s,n,i,e.controlPoints,{padding:t.offset}))}else t.type==="orth"&&(o=A1(a,s,n,i,e.controlPoints,t));return o}getPoints(e){const t=this.getControlPoints(e),[n,i]=this.getEndpoints(e,!0,t);return[n,...t,i]}getKeyPath(e){const t=this.getPoints(e);return Gg(t,e.radius)}getLoopPath(e){const{sourcePort:t,targetPort:n,radius:i}=e,a=this.sourceNode,s=wo(a),o=Math.max(Ns(s),Bs(s))/4,{placement:l,clockwise:u,dist:h=o}=Ei(this.getGraphicStyle(e),"loop");return cL(a,i,l,u,h,t,n)}}xf.defaultStyleProps={radius:0,controlPoints:[],router:!1};class bf extends Do{constructor(e){super(Di({style:bf.defaultStyleProps},e))}getKeyPath(e){const{curvePosition:t,curveOffset:n}=e,[i,a]=this.getEndpoints(e),s=e.controlPoint||Hg(i,a,t,n);return aL(i,a,s)}}bf.defaultStyleProps={curvePosition:.5,curveOffset:30};var TL=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var a;const{key:s,placement:o}=n;U1(n)&&(e[a=s||i]||(e[a]=$s(r.getShape("key").getBounds(),o)))}),e}function U1(r){const{r:e}=r;return!e||Number(e)===0}function Co(r){return Yl(r)?r:r.getPosition()}function DL(r,e,t,n){const i=W1(r,e,t,n),a=W1(e,r,n,t);return[i,a]}function W1(r,e,t,n){const i=Kg(r);if(t)return i[t];const a=Object.values(i);if(a.length===0)return;const s=a.map(u=>Co(u)),o=CL(e,n),[l]=mD(s,o);return a.find(u=>Co(u)===l)}function CL(r,e){const t=Kg(r);if(e)return[Co(t[e])];const n=Object.values(t);return n.length>0?n.map(i=>Co(i)):[r.getCenter()]}function H1(r,e){return Vg(r)||oc(r)?Xg(r,e):lc(r,e)}function lc(r,e){if(!r||!e)return[0,0,0];if(Yl(r))return r;if(r.attributes.linkToCenter)return r.getPosition();const t=Yl(e)?e:oc(e)?e.getCenter():e.getPosition();return Yh(t,r.getBounds())}function Xg(r,e){if(!r||!e)return[0,0,0];const t=Yl(e)?e:oc(e)?e.getCenter():e.getPosition();return r.getIntersectPoint(t)||r.getCenter()}function G1(r,e="bottom",t=0,n=0,i=!1){const a=e.split("-"),[s,o]=$s(r,e),[l,u]=i?["bottom","top"]:["top","bottom"],h=a.includes("top")?u:a.includes("bottom")?l:"middle",p=a.includes("left")?"right":a.includes("right")?"left":"center";return{transform:[["translate",s+t,o+n]],textBaseline:h,textAlign:p}}function LL(r,e){return[[0,-r],[e*Math.cos(3*Math.PI/10),-e*Math.sin(3*Math.PI/10)],[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[e*Math.cos(Math.PI/10),e*Math.sin(Math.PI/10)],[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[0,e],[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[-e*Math.cos(Math.PI/10),e*Math.sin(Math.PI/10)],[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[-e*Math.cos(3*Math.PI/10),-e*Math.sin(3*Math.PI/10)]]}function RL(r,e){const t={};return t.top=[0,-r],t.left=[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],t["left-bottom"]=[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],t.bottom=[0,e],t["right-bottom"]=[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],t.right=t.default=[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],t}function IL(r,e,t){const n=e/2,i=r/2,a={up:[[-i,n],[i,n],[0,-n]],left:[[-i,0],[i,n],[i,-n]],right:[[-i,n],[-i,-n],[i,0]],down:[[-i,-n],[i,-n],[0,n]]};return a[t]||a.up}function NL(r,e,t){const n=e/2,i=r/2,a={};return t==="down"?(a.bottom=a.default=[0,n],a.right=[i,-n],a.left=[-i,-n]):t==="left"?(a.top=[i,-n],a.bottom=[i,n],a.left=a.default=[-i,0]):t==="right"?(a.top=[-i,-n],a.bottom=[-i,n],a.right=a.default=[i,0]):(a.left=[-i,n],a.top=a.default=[0,-n],a.right=[i,n]),a}function SU(r,e){return[[r/2,-e/2],[r/2,e/2],[-r/2,e/2],[-r/2,-e/2]]}function BL(r,e){return[[0,-e/2],[r/2,0],[0,e/2],[-r/2,0]]}function kL(r){return ba(r,["style","visibility"])!=="hidden"}function FL(r,e){const{zIndex:t,transform:n,transformOrigin:i,visibility:a,cursor:s,clipPath:o,component:l}=e,u=TL(e,["zIndex","transform","transformOrigin","visibility","cursor","clipPath","component"]);Object.assign(r.attributes,u),n&&r.setAttribute("transform",n),un(t)&&r.setAttribute("zIndex",t),i&&r.setAttribute("transformOrigin",i),a&&r.setAttribute("visibility",a),s&&r.setAttribute("cursor",s),o&&r.setAttribute("clipPath",o),l&&r.setAttribute("component",l)}function Yg(r,e){"update"in r?r.update(e):r.attr(e)}function zL(r){return[[0,r],[r*Math.sqrt(3)/2,r/2],[r*Math.sqrt(3)/2,-r/2],[0,-r],[-r*Math.sqrt(3)/2,-r/2],[-r*Math.sqrt(3)/2,r/2]]}function UL(r){tc(r,"__to_be_destroyed__",!0)}function wf(r){return ba(r,"__to_be_destroyed__",!1)}var WL=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class Mf extends Ca{constructor(e,t){super(e,Object.assign({},Mf.defaultOptions,t)),this.onCollapseExpand=n=>WL(this,void 0,void 0,function*(){if(!this.validate(n))return;const{target:i}=n;if(!PL(i))return;const a=i.id,{model:s,graph:o}=this.context,l=s.getElementDataById(a);if(!l)return!1;const{onCollapse:u,onExpand:h,animation:p,align:S}=this.options;xa(l)?(yield o.expandElement(a,{animation:p,align:S}),h==null||h(a)):(yield o.collapseElement(a,{animation:p,align:S}),u==null||u(a))}),this.bindEvents()}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}bindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;e.on(`node:${t}`,this.onCollapseExpand),e.on(`combo:${t}`,this.onCollapseExpand)}unbindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;e.off(`node:${t}`,this.onCollapseExpand),e.off(`combo:${t}`,this.onCollapseExpand)}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}destroy(){this.unbindEvents(),super.destroy()}}Mf.defaultOptions={enable:!0,animation:!0,trigger:Lt.DBLCLICK,align:!0};var Af={},HL=function(r){return r=r||"g",Af[r]?Af[r]+=1:Af[r]=1,r+Af[r]},Tf=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};const GL="g6-create-edge-assist-edge-id",Pf="g6-create-edge-assist-node-id";class Sf extends Ca{constructor(e,t){super(e,Object.assign({},Sf.defaultOptions,t)),this.drop=n=>Tf(this,void 0,void 0,function*(){const{targetType:i}=n;["combo","node"].includes(i)&&this.source?yield this.handleCreateEdge(n):yield this.cancelEdge()}),this.handleCreateEdge=n=>Tf(this,void 0,void 0,function*(){var i,a,s;if(!this.validate(n))return;const{graph:o,canvas:l,batch:u,element:h}=this.context,{style:p}=this.options;if(this.source){this.createEdge(n),yield this.cancelEdge();return}u.startBatch(),l.setCursor("crosshair"),this.source=this.getSelectedNodeIDs([n.target.id])[0];const S=o.getElementData(this.source);o.addNodeData([{id:Pf,style:{visibility:"hidden",ports:[{key:"port-1",placement:[.5,.5]}],x:(i=S.style)===null||i===void 0?void 0:i.x,y:(a=S.style)===null||a===void 0?void 0:a.y}}]),o.addEdgeData([{id:GL,source:this.source,target:Pf,style:Object.assign({pointerEvents:"none"},p)}]),yield(s=h.draw({animation:!1}))===null||s===void 0?void 0:s.finished}),this.updateAssistEdge=n=>Tf(this,void 0,void 0,function*(){var i;if(!this.source)return;const{model:a,element:s}=this.context;a.translateNodeTo(Pf,[n.canvas.x,n.canvas.y]),yield(i=s.draw({animation:!1,silence:!0}))===null||i===void 0?void 0:i.finished}),this.createEdge=n=>{var i,a;const{graph:s}=this.context,{style:o,onFinish:l,onCreate:u}=this.options;if(((i=n.target)===null||i===void 0?void 0:i.id)===void 0||this.source===void 0)return;const p=(a=this.getSelectedNodeIDs([n.target.id]))===null||a===void 0?void 0:a[0],S=`${this.source}-${p}-${HL()}`,N=u({id:S,source:this.source,target:p,style:o});N&&(s.addEdgeData([N]),l(N))},this.cancelEdge=()=>Tf(this,void 0,void 0,function*(){var n;if(!this.source)return;const{graph:i,element:a,batch:s}=this.context;i.removeNodeData([Pf]),this.source=void 0,yield(n=a.draw({animation:!1}))===null||n===void 0?void 0:n.finished,s.endBatch()}),this.bindEvents()}update(e){super.update(e),this.bindEvents()}bindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;this.unbindEvents(),t==="click"?(e.on(Ja.CLICK,this.handleCreateEdge),e.on(ll.CLICK,this.handleCreateEdge),e.on(Ys.CLICK,this.cancelEdge),e.on(Dh.CLICK,this.cancelEdge)):(e.on(Ja.DRAG_START,this.handleCreateEdge),e.on(ll.DRAG_START,this.handleCreateEdge),e.on(Lt.POINTER_UP,this.drop)),e.on(Lt.POINTER_MOVE,this.updateAssistEdge)}getSelectedNodeIDs(e){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(t=>t.id).concat(e)))}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}unbindEvents(){const{graph:e}=this.context;e.off(Ja.CLICK,this.handleCreateEdge),e.off(ll.CLICK,this.handleCreateEdge),e.off(Ys.CLICK,this.cancelEdge),e.off(Dh.CLICK,this.cancelEdge),e.off(Ja.DRAG_START,this.handleCreateEdge),e.off(ll.DRAG_START,this.handleCreateEdge),e.off(Lt.POINTER_UP,this.drop),e.off(Lt.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}Sf.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:r=>r,onFinish:()=>{}};function jL(r,e,t){var n;return function(){var i=this,a=arguments,s=function(){n=null,t||r.apply(i,a)},o=t&&!n;clearTimeout(n),n=setTimeout(s,e),o&&r.apply(i,a)}}var uc=jL,j1=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class Of extends Ca{constructor(e,t){super(e,Object.assign({},Of.defaultOptions,t)),this.isDragging=!1,this.onDragStart=n=>{this.validate(n)&&(this.isDragging=!0,this.context.canvas.setCursor("grabbing"))},this.onDrag=n=>{var i,a,s,o;if(!this.isDragging||hi.isPinching)return;const l=(a=(i=n.movement)===null||i===void 0?void 0:i.x)!==null&&a!==void 0?a:n.dx,u=(o=(s=n.movement)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:n.dy;l|u&&this.translate([l,u],!1)},this.onDragEnd=()=>{var n,i;this.isDragging=!1,this.context.canvas.setCursor(this.defaultCursor),(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},this.invokeOnFinish=uc(()=>{var n,i;(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},300),this.shortcut=new Jl(e.graph),this.bindEvents(),this.defaultCursor=this.context.canvas.getConfig().cursor||"default"}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}bindEvents(){const{trigger:e}=this.options;if(li(e)){const{up:t=[],down:n=[],left:i=[],right:a=[]}=e;this.shortcut.bind(t,s=>this.onTranslate([0,1],s)),this.shortcut.bind(n,s=>this.onTranslate([0,-1],s)),this.shortcut.bind(i,s=>this.onTranslate([1,0],s)),this.shortcut.bind(a,s=>this.onTranslate([-1,0],s))}else{const{graph:t}=this.context;t.on(Lt.DRAG_START,this.onDragStart),t.on(Lt.DRAG,this.onDrag),t.on(Lt.DRAG_END,this.onDragEnd)}}onTranslate(e,t){return j1(this,void 0,void 0,function*(){if(!this.validate(t))return;const{sensitivity:n}=this.options,i=n*-1;yield this.translate(ds(e,i),this.options.animation),this.invokeOnFinish()})}translate(e,t){return j1(this,void 0,void 0,function*(){e=this.clampByDirection(e),e=this.clampByRange(e),yield this.context.graph.translateBy(e,t)})}clampByDirection([e,t]){const{direction:n}=this.options;return n==="x"?t=0:n==="y"&&(e=0),[e,t]}clampByRange([e,t]){const{viewport:n,canvas:i}=this.context,[a,s]=i.getSize(),[o,l,u,h]=cs(this.options.range),p=[s*o,a*l,s*u,a*h],S=Mo(og(n.getCanvasCenter()),p),N=Or(n.getViewportCenter(),[e,t,0]);if(!hs(N,S)){const{min:[U,H],max:[V,Y]}=S;(N[0]0||N[0]>V&&e<0)&&(e=0),(N[1]0||N[1]>Y&&t<0)&&(t=0)}return[e,t]}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return typeof t=="function"?t(e):!!t}unbindEvents(){this.shortcut.unbindAll();const{graph:e}=this.context;e.off(Lt.DRAG_START,this.onDragStart),e.off(Lt.DRAG,this.onDrag),e.off(Lt.DRAG_END,this.onDragEnd)}destroy(){this.shortcut.destroy(),this.unbindEvents(),this.context.canvas.setCursor(this.defaultCursor),super.destroy()}}Of.defaultOptions={enable:r=>"targetType"in r?r.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var V1=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class cc extends Ca{constructor(e,t){super(e,Object.assign({},cc.defaultOptions,t)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=n=>V1(this,void 0,void 0,function*(){var i;if(this.options.dropEffect!=="link")return;const{model:a,element:s}=this.context,o=n.target.id;this.target.forEach(l=>{const u=a.getParentData(l,Cr);u&&Et(u)===o&&a.refreshComboData(o),a.setParent(l,o,Cr)}),yield(i=s==null?void 0:s.draw({animation:!0}))===null||i===void 0?void 0:i.finished}),this.setCursor=n=>{if(this.isDragging)return;const{type:i}=n,{canvas:a}=this.context,{cursor:s}=this.options;i===Lt.POINTER_ENTER?a.setCursor((s==null?void 0:s.grab)||"grab"):a.setCursor((s==null?void 0:s.default)||"default")},this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onDrop=this.onDrop.bind(this),this.bindEvents()}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}bindEvents(){const{graph:e,canvas:t}=this.context,n=t.getLayer().getContextService().$canvas;n&&(n.addEventListener("blur",this.onDragEnd),n.addEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{e.on(`${i}:${Lt.DRAG_START}`,this.onDragStart),e.on(`${i}:${Lt.DRAG}`,this.onDrag),e.on(`${i}:${Lt.DRAG_END}`,this.onDragEnd),e.on(`${i}:${Lt.POINTER_ENTER}`,this.setCursor),e.on(`${i}:${Lt.POINTER_LEAVE}`,this.setCursor)}),["link"].includes(this.options.dropEffect)&&(e.on(ll.DROP,this.onDrop),e.on(Ys.DROP,this.onDrop))}getSelectedNodeIDs(e){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(t=>t.id).concat(e)))}getDelta(e){const t=this.context.graph.getZoom();return vs([e.dx,e.dy],t)}onDragStart(e){var t;if(this.enable=this.validate(e),!this.enable)return;const{batch:n,canvas:i,graph:a}=this.context;i.setCursor(((t=this.options.cursor)===null||t===void 0?void 0:t.grabbing)||"grabbing"),this.isDragging=!0,n.startBatch();const s=e.target.id;a.getElementState(s).includes(this.options.state)?this.target=this.getSelectedNodeIDs([s]):this.target=[s],this.hideEdge(),this.context.graph.frontElement(this.target),this.options.shadow&&this.createShadow(this.target)}onDrag(e){if(!this.enable)return;const t=this.getDelta(e);this.options.shadow?this.moveShadow(t):this.moveElement(this.target,t)}onDragEnd(){var e,t,n;if(!this.enable)return;if(this.enable=!1,this.options.shadow){if(!this.shadow)return;this.shadow.style.visibility="hidden";const{x:s=0,y:o=0}=this.shadow.attributes,[l,u]=Or([+s,+o],this.shadowOrigin);this.moveElement(this.target,[l,u])}this.showEdges(),(t=(e=this.options).onFinish)===null||t===void 0||t.call(e,this.target);const{batch:i,canvas:a}=this.context;i.endBatch(),a.setCursor(((n=this.options.cursor)===null||n===void 0?void 0:n.grab)||"grab"),this.isDragging=!1,this.target=[]}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}moveElement(e,t){return V1(this,void 0,void 0,function*(){const{graph:n,model:i}=this.context,{dropEffect:a}=this.options;a==="move"&&e.forEach(s=>i.refreshComboData(s)),n.translateElementBy(Object.fromEntries(e.map(s=>[s,t])),!1)})}moveShadow(e){if(!this.shadow)return;const{x:t=0,y:n=0}=this.shadow.attributes,[i,a]=e;this.shadow.attr({x:+t+i,y:+n+a})}createShadow(e){const t=Ei(this.options,"shadow"),n=Xu(e.map(u=>this.context.element.getElement(u).getBounds())),[i,a]=n.min;this.shadowOrigin=[i,a];const[s,o]=bo(n),l={width:s,height:o,x:i,y:a};this.shadow?this.shadow.attr(Object.assign(Object.assign(Object.assign({},t),l),{visibility:"visible"})):(this.shadow=new ki({style:Object.assign(Object.assign(Object.assign({$layer:"transient"},t),l),{pointerEvents:"none"})}),this.context.canvas.appendChild(this.shadow))}showEdges(){this.options.shadow||this.hiddenEdges.length===0||(this.context.graph.showElement(this.hiddenEdges),this.hiddenEdges=[])}hideEdge(){const{hideEdge:e,shadow:t}=this.options;if(e==="none"||t)return;const{graph:n}=this.context;e==="all"?this.hiddenEdges=n.getEdgeData().map(Et):this.hiddenEdges=Array.from(new Set(this.target.map(i=>n.getRelatedEdgesData(i,e).map(Et)).flat())),n.hideElement(this.hiddenEdges)}unbindEvents(){const{graph:e,canvas:t}=this.context,n=t.getLayer().getContextService().$canvas;n&&(n.removeEventListener("blur",this.onDragEnd),n.removeEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{e.off(`${i}:${Lt.DRAG_START}`,this.onDragStart),e.off(`${i}:${Lt.DRAG}`,this.onDrag),e.off(`${i}:${Lt.DRAG_END}`,this.onDragEnd),e.off(`${i}:${Lt.POINTER_ENTER}`,this.setCursor),e.off(`${i}:${Lt.POINTER_LEAVE}`,this.setCursor)}),e.off(`combo:${Lt.DROP}`,this.onDrop),e.off(`canvas:${Lt.DROP}`,this.onDrop)}destroy(){var e;this.unbindEvents(),(e=this.shadow)===null||e===void 0||e.destroy(),super.destroy()}}cc.defaultOptions={animation:!0,enable:r=>["node","combo"].includes(r.targetType),dropEffect:"move",state:"selected",hideEdge:"none",shadow:!1,shadowZIndex:100,shadowFill:"#F3F9FF",shadowFillOpacity:.5,shadowStroke:"#1890FF",shadowStrokeOpacity:.9,shadowLineDash:[5,5],cursor:{default:"default",grab:"grab",grabbing:"grabbing"}};var VL="*",ZL=function(){function r(){this._events={}}return r.prototype.on=function(e,t,n){return this._events[e]||(this._events[e]=[]),this._events[e].push({callback:t,once:!!n}),this},r.prototype.once=function(e,t){return this.on(e,t,!0)},r.prototype.emit=function(e){for(var t=this,n=[],i=1;i{e.has(s.id)||(e.add(s.id),r.push(s))})}return!1}function Cf(r,e,t,n){if(t(r))return!0;e.add(r.id);for(const a of n(r.id))if(!e.has(a.id)&&Cf(a,e,t,n))return!0;return!1}const Z1=()=>!0;class KL{constructor(e){Qr(this,"graph");Qr(this,"nodeFilter");Qr(this,"edgeFilter");Qr(this,"cacheEnabled");Qr(this,"inEdgesMap",new Map);Qr(this,"outEdgesMap",new Map);Qr(this,"bothEdgesMap",new Map);Qr(this,"allNodesMap",new Map);Qr(this,"allEdgesMap",new Map);Qr(this,"clearCache",()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()});Qr(this,"refreshCache",()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(e=>e.id))});Qr(this,"updateCache",e=>{const t=new Set;e.forEach(n=>{const i=this.bothEdgesMap.get(n);if(i&&i.forEach(a=>t.add(a.id)),!this.hasNode(n))this.inEdgesMap.delete(n),this.outEdgesMap.delete(n),this.bothEdgesMap.delete(n),this.allNodesMap.delete(n);else{const a=this.graph.getRelatedEdges(n,"in").filter(this.edgeFilter),s=this.graph.getRelatedEdges(n,"out").filter(this.edgeFilter),o=Array.from(new Set([...a,...s]));o.forEach(l=>t.add(l.id)),this.inEdgesMap.set(n,a),this.outEdgesMap.set(n,s),this.bothEdgesMap.set(n,o),this.allNodesMap.set(n,this.graph.getNode(n))}}),t.forEach(n=>{this.hasEdge(n)?this.allEdgesMap.set(n,this.graph.getEdge(n)):this.allEdgesMap.delete(n)})});Qr(this,"handleGraphChanged",e=>{const t=new Set;e.changes.forEach(n=>{switch(n.type){case"NodeAdded":t.add(n.value.id);break;case"NodeDataUpdated":t.add(n.id);break;case"EdgeAdded":t.add(n.value.source),t.add(n.value.target);break;case"EdgeUpdated":(n.propertyName==="source"||n.propertyName==="target")&&(t.add(n.oldValue),t.add(n.newValue));break;case"EdgeDataUpdated":if(e.graph.hasEdge(n.id)){const i=e.graph.getEdge(n.id);t.add(i.source),t.add(i.target)}break;case"EdgeRemoved":t.add(n.value.source),t.add(n.value.target);break;case"NodeRemoved":t.add(n.value.id);break;default:break}}),this.updateCache(t)});this.graph=e.graph;const t=e.nodeFilter||Z1,n=e.edgeFilter||Z1;this.nodeFilter=t,this.edgeFilter=i=>{const{source:a,target:s}=this.graph.getEdgeDetail(i.id);return!t(a)||!t(s)?!1:n(i,a,s)},e.cache==="auto"?(this.cacheEnabled=!0,this.startAutoCache()):e.cache==="manual"?this.cacheEnabled=!0:this.cacheEnabled=!1}startAutoCache(){this.refreshCache(),this.graph.on("changed",this.handleGraphChanged)}stopAutoCache(){this.graph.off("changed",this.handleGraphChanged)}checkNodeExistence(e){this.getNode(e)}hasNode(e){if(!this.graph.hasNode(e))return!1;const t=this.graph.getNode(e);return this.nodeFilter(t)}areNeighbors(e,t){return this.checkNodeExistence(e),this.getNeighbors(t).some(n=>n.id===e)}getNode(e){const t=this.graph.getNode(e);if(!this.nodeFilter(t))throw new Error("Node not found for id: "+e);return t}getRelatedEdges(e,t){return this.checkNodeExistence(e),this.cacheEnabled?t==="in"?this.inEdgesMap.get(e):t==="out"?this.outEdgesMap.get(e):this.bothEdgesMap.get(e):this.graph.getRelatedEdges(e,t).filter(this.edgeFilter)}getDegree(e,t){return this.getRelatedEdges(e,t).length}getSuccessors(e){const n=this.getRelatedEdges(e,"out").map(i=>this.getNode(i.target));return Array.from(new Set(n))}getPredecessors(e){const n=this.getRelatedEdges(e,"in").map(i=>this.getNode(i.source));return Array.from(new Set(n))}getNeighbors(e){const t=this.getPredecessors(e),n=this.getSuccessors(e);return Array.from(new Set([...t,...n]))}hasEdge(e){if(!this.graph.hasEdge(e))return!1;const t=this.graph.getEdge(e);return this.edgeFilter(t)}getEdge(e){const t=this.graph.getEdge(e);if(!this.edgeFilter(t))throw new Error("Edge not found for id: "+e);return t}getEdgeDetail(e){const t=this.getEdge(e);return{edge:t,source:this.getNode(t.source),target:this.getNode(t.target)}}hasTreeStructure(e){return this.graph.hasTreeStructure(e)}getRoots(e){return this.graph.getRoots(e).filter(this.nodeFilter)}getChildren(e,t){return this.checkNodeExistence(e),this.graph.getChildren(e,t).filter(this.nodeFilter)}getParent(e,t){this.checkNodeExistence(e);const n=this.graph.getParent(e,t);return!n||!this.nodeFilter(n)?null:n}getAllNodes(){return this.cacheEnabled?Array.from(this.allNodesMap.values()):this.graph.getAllNodes().filter(this.nodeFilter)}getAllEdges(){return this.cacheEnabled?Array.from(this.allEdgesMap.values()):this.graph.getAllEdges().filter(this.edgeFilter)}bfs(e,t,n="out"){const i={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[n];Qg([this.getNode(e)],new Set,t,i)}dfs(e,t,n="out"){const i={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[n];Cf(this.getNode(e),new Set,t,i)}}class di extends Df{constructor(t){super();Qr(this,"nodeMap",new Map);Qr(this,"edgeMap",new Map);Qr(this,"inEdgesMap",new Map);Qr(this,"outEdgesMap",new Map);Qr(this,"bothEdgesMap",new Map);Qr(this,"treeIndices",new Map);Qr(this,"changes",[]);Qr(this,"batchCount",0);Qr(this,"onChanged",()=>{});Qr(this,"batch",t=>{this.batchCount+=1,t(),this.batchCount-=1,this.batchCount||this.commit()});t&&(t.nodes&&this.addNodes(t.nodes),t.edges&&this.addEdges(t.edges),t.tree&&this.addTree(t.tree),t.onChanged&&(this.onChanged=t.onChanged))}commit(){const t=this.changes;this.changes=[];const n={graph:this,changes:t};this.emit("changed",n),this.onChanged(n)}reduceChanges(t){let n=[];return t.forEach(i=>{switch(i.type){case"NodeRemoved":{let a=!1;n=n.filter(s=>{if(s.type==="NodeAdded"){const o=s.value.id===i.value.id;return o&&(a=!0),!o}else{if(s.type==="NodeDataUpdated")return s.id!==i.value.id;if(s.type==="TreeStructureChanged")return s.nodeId!==i.value.id}return!0}),a||n.push(i);break}case"EdgeRemoved":{let a=!1;n=n.filter(s=>{if(s.type==="EdgeAdded"){const o=s.value.id===i.value.id;return o&&(a=!0),!o}else if(s.type==="EdgeDataUpdated"||s.type==="EdgeUpdated")return s.id!==i.value.id;return!0}),a||n.push(i);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{const a=n.findIndex(o=>o.type===i.type&&o.id===i.id&&(i.propertyName===void 0||o.propertyName===i.propertyName)),s=n[a];s?i.propertyName!==void 0?s.newValue=i.newValue:(n.splice(a,1),n.push(i)):n.push(i);break}case"TreeStructureDetached":{n=n.filter(a=>a.type==="TreeStructureAttached"||a.type==="TreeStructureChanged"?a.treeKey!==i.treeKey:!0),n.push(i);break}case"TreeStructureChanged":{const a=n.find(s=>s.type==="TreeStructureChanged"&&s.treeKey===i.treeKey&&s.nodeId===i.nodeId);a?a.newParentId=i.newParentId:n.push(i);break}default:n.push(i);break}}),n}checkNodeExistence(t){this.getNode(t)}hasNode(t){return this.nodeMap.has(t)}areNeighbors(t,n){return this.getNeighbors(n).some(i=>i.id===t)}getNode(t){const n=this.nodeMap.get(t);if(!n)throw new Error("Node not found for id: "+t);return n}getRelatedEdges(t,n){if(this.checkNodeExistence(t),n==="in"){const i=this.inEdgesMap.get(t);return Array.from(i)}else if(n==="out"){const i=this.outEdgesMap.get(t);return Array.from(i)}else{const i=this.bothEdgesMap.get(t);return Array.from(i)}}getDegree(t,n){return this.getRelatedEdges(t,n).length}getSuccessors(t){const i=this.getRelatedEdges(t,"out").map(a=>this.getNode(a.target));return Array.from(new Set(i))}getPredecessors(t){const i=this.getRelatedEdges(t,"in").map(a=>this.getNode(a.source));return Array.from(new Set(i))}getNeighbors(t){const n=this.getPredecessors(t),i=this.getSuccessors(t);return Array.from(new Set([...n,...i]))}doAddNode(t){if(this.hasNode(t.id))throw new Error("Node already exists: "+t.id);this.nodeMap.set(t.id,t),this.inEdgesMap.set(t.id,new Set),this.outEdgesMap.set(t.id,new Set),this.bothEdgesMap.set(t.id,new Set),this.treeIndices.forEach(n=>{n.childrenMap.set(t.id,new Set)}),this.changes.push({type:"NodeAdded",value:t})}addNodes(t){this.batch(()=>{for(const n of t)this.doAddNode(n)})}addNode(t){this.addNodes([t])}doRemoveNode(t){const n=this.getNode(t),i=this.bothEdgesMap.get(t);i==null||i.forEach(a=>this.doRemoveEdge(a.id)),this.nodeMap.delete(t),this.treeIndices.forEach(a=>{var o,l;(o=a.childrenMap.get(t))==null||o.forEach(u=>{a.parentMap.delete(u.id)});const s=a.parentMap.get(t);s&&((l=a.childrenMap.get(s.id))==null||l.delete(n)),a.parentMap.delete(t),a.childrenMap.delete(t)}),this.bothEdgesMap.delete(t),this.inEdgesMap.delete(t),this.outEdgesMap.delete(t),this.changes.push({type:"NodeRemoved",value:n})}removeNodes(t){this.batch(()=>{t.forEach(n=>this.doRemoveNode(n))})}removeNode(t){this.removeNodes([t])}updateNodeDataProperty(t,n,i){const a=this.getNode(t);this.batch(()=>{const s=a.data[n],o=i;a.data[n]=o,this.changes.push({type:"NodeDataUpdated",id:t,propertyName:n,oldValue:s,newValue:o})})}mergeNodeData(t,n){this.batch(()=>{Object.entries(n).forEach(([i,a])=>{this.updateNodeDataProperty(t,i,a)})})}updateNodeData(...t){const n=t[0],i=this.getNode(n);if(typeof t[1]=="string"){this.updateNodeDataProperty(n,t[1],t[2]);return}let a;if(typeof t[1]=="function"){const s=t[1];a=s(i.data)}else typeof t[1]=="object"&&(a=t[1]);this.batch(()=>{const s=i.data,o=a;i.data=a,this.changes.push({type:"NodeDataUpdated",id:n,oldValue:s,newValue:o})})}checkEdgeExistence(t){if(!this.hasEdge(t))throw new Error("Edge not found for id: "+t)}hasEdge(t){return this.edgeMap.has(t)}getEdge(t){return this.checkEdgeExistence(t),this.edgeMap.get(t)}getEdgeDetail(t){const n=this.getEdge(t);return{edge:n,source:this.getNode(n.source),target:this.getNode(n.target)}}doAddEdge(t){if(this.hasEdge(t.id))throw new Error("Edge already exists: "+t.id);this.checkNodeExistence(t.source),this.checkNodeExistence(t.target),this.edgeMap.set(t.id,t);const n=this.inEdgesMap.get(t.target),i=this.outEdgesMap.get(t.source),a=this.bothEdgesMap.get(t.source),s=this.bothEdgesMap.get(t.target);n.add(t),i.add(t),a.add(t),s.add(t),this.changes.push({type:"EdgeAdded",value:t})}addEdges(t){this.batch(()=>{for(const n of t)this.doAddEdge(n)})}addEdge(t){this.addEdges([t])}doRemoveEdge(t){const n=this.getEdge(t),i=this.outEdgesMap.get(n.source),a=this.inEdgesMap.get(n.target),s=this.bothEdgesMap.get(n.source),o=this.bothEdgesMap.get(n.target);i.delete(n),a.delete(n),s.delete(n),o.delete(n),this.edgeMap.delete(t),this.changes.push({type:"EdgeRemoved",value:n})}removeEdges(t){this.batch(()=>{t.forEach(n=>this.doRemoveEdge(n))})}removeEdge(t){this.removeEdges([t])}updateEdgeSource(t,n){const i=this.getEdge(t);this.checkNodeExistence(n);const a=i.source,s=n;this.outEdgesMap.get(a).delete(i),this.bothEdgesMap.get(a).delete(i),this.outEdgesMap.get(s).add(i),this.bothEdgesMap.get(s).add(i),i.source=n,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:t,propertyName:"source",oldValue:a,newValue:s})})}updateEdgeTarget(t,n){const i=this.getEdge(t);this.checkNodeExistence(n);const a=i.target,s=n;this.inEdgesMap.get(a).delete(i),this.bothEdgesMap.get(a).delete(i),this.inEdgesMap.get(s).add(i),this.bothEdgesMap.get(s).add(i),i.target=n,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:t,propertyName:"target",oldValue:a,newValue:s})})}updateEdgeDataProperty(t,n,i){const a=this.getEdge(t);this.batch(()=>{const s=a.data[n],o=i;a.data[n]=o,this.changes.push({type:"EdgeDataUpdated",id:t,propertyName:n,oldValue:s,newValue:o})})}updateEdgeData(...t){const n=t[0],i=this.getEdge(n);if(typeof t[1]=="string"){this.updateEdgeDataProperty(n,t[1],t[2]);return}let a;if(typeof t[1]=="function"){const s=t[1];a=s(i.data)}else typeof t[1]=="object"&&(a=t[1]);this.batch(()=>{const s=i.data,o=a;i.data=a,this.changes.push({type:"EdgeDataUpdated",id:n,oldValue:s,newValue:o})})}mergeEdgeData(t,n){this.batch(()=>{Object.entries(n).forEach(([i,a])=>{this.updateEdgeDataProperty(t,i,a)})})}checkTreeExistence(t){if(!this.hasTreeStructure(t))throw new Error("Tree structure not found for treeKey: "+t)}hasTreeStructure(t){return this.treeIndices.has(t)}attachTreeStructure(t){this.treeIndices.has(t)||(this.treeIndices.set(t,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:t})}))}detachTreeStructure(t){this.checkTreeExistence(t),this.treeIndices.delete(t),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:t})})}addTree(t,n){this.batch(()=>{this.attachTreeStructure(n);const i=[],a=Array.isArray(t)?t:[t];for(;a.length;){const s=a.shift();i.push(s),s.children&&a.push(...s.children)}this.addNodes(i),i.forEach(s=>{var o;(o=s.children)==null||o.forEach(l=>{this.setParent(l.id,s.id,n)})})})}getRoots(t){return this.checkTreeExistence(t),this.getAllNodes().filter(n=>!this.getParent(n.id,t))}getChildren(t,n){this.checkNodeExistence(t),this.checkTreeExistence(n);const a=this.treeIndices.get(n).childrenMap.get(t);return Array.from(a||[])}getParent(t,n){return this.checkNodeExistence(t),this.checkTreeExistence(n),this.treeIndices.get(n).parentMap.get(t)||null}getAncestors(t,n){const i=[];let a=this.getNode(t),s;for(;s=this.getParent(a.id,n);)i.push(s),a=s;return i}setParent(t,n,i){var h,p;this.checkTreeExistence(i);const a=this.treeIndices.get(i);if(!a)return;const s=this.getNode(t),o=a.parentMap.get(t);if((o==null?void 0:o.id)===n)return;if(n==null){o&&((h=a.childrenMap.get(o.id))==null||h.delete(s)),a.parentMap.delete(t);return}const l=this.getNode(n);a.parentMap.set(t,l),o&&((p=a.childrenMap.get(o.id))==null||p.delete(s));let u=a.childrenMap.get(l.id);u||(u=new Set,a.childrenMap.set(l.id,u)),u.add(s),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:i,nodeId:t,oldParentId:o==null?void 0:o.id,newParentId:l.id})})}dfsTree(t,n,i){const a=s=>this.getChildren(s,i);return Cf(this.getNode(t),new Set,n,a)}bfsTree(t,n,i){const a=s=>this.getChildren(s,i);return Qg([this.getNode(t)],new Set,n,a)}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(t,n,i="out"){const a={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[i];return Qg([this.getNode(t)],new Set,n,a)}dfs(t,n,i="out"){const a={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[i];return Cf(this.getNode(t),new Set,n,a)}clone(){const t=this.getAllNodes().map(a=>bp(yu({},a),{data:yu({},a.data)})),n=this.getAllEdges().map(a=>bp(yu({},a),{data:yu({},a.data)})),i=new di({nodes:t,edges:n});return this.treeIndices.forEach(({parentMap:a,childrenMap:s},o)=>{const l=new Map;a.forEach((h,p)=>{l.set(p,i.getNode(h.id))});const u=new Map;s.forEach((h,p)=>{u.set(p,new Set(Array.from(h).map(S=>i.getNode(S.id))))}),i.treeIndices.set(o,{parentMap:l,childrenMap:u})}),i}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(t){return new KL(yu({graph:this},t))}}class Lf{constructor(e,t){this.context=e,this.options=t||{}}}var XL=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})},YL=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const a=i.data._isCombo?n.combos:n.nodes,{x:s,y:o,z:l=0}=i.data;a==null||a.push({id:i.id,style:{x:s,y:o,z:l}})}),t.forEach(i=>{const{id:a,source:s,target:o,data:{points:l=[],controlPoints:u=l.slice(1,l.length-1)}}=i;n.edges.push({id:a,source:s,target:o,style:Object.assign({},u!=null&&u.length?{controlPoints:u.map(Fi)}:{})})}),n}function qL(r,e){class t extends Lf{constructor(i,a){if(super(i,a),this.instance=new r({}),this.id=this.instance.id,"stop"in this.instance&&"tick"in this.instance){const s=this.instance;this.stop=s.stop.bind(s),this.tick=o=>{const l=s.tick(o);return Rf(l)}}}execute(i,a){return XL(this,void 0,void 0,function*(){return Rf(yield this.instance.execute(this.graphData2LayoutModel(i),this.transformOptions(sa({},this.options,a))))})}transformOptions(i){const{onTick:a}=i;return a&&(i.onTick=s=>a(Rf(s))),i}graphData2LayoutModel(i){const{nodes:a=[],edges:s=[],combos:o=[]}=i,l=a.map(N=>{const U=Et(N),{data:H,style:V,combo:Y}=N,q=YL(N,["data","style","combo"]),ne={id:U,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},H),{data:H}),Y?{parentId:Y}:{}),{style:V}),q)};return V!=null&&V.x&&Object.assign(ne.data,{x:V.x}),V!=null&&V.y&&Object.assign(ne.data,{y:V.y}),V!=null&&V.z&&Object.assign(ne.data,{z:V.z}),ne}),u=new Map(l.map(N=>[N.id,N])),h=s.filter(N=>{const{source:U,target:H}=N;return u.has(U)&&u.has(H)}).map(N=>{const{source:U,target:H,data:V,style:Y}=N;return{id:Et(N),source:U,target:H,data:Object.assign({},V),style:Object.assign({},Y)}}),p=o.map(N=>({id:Et(N),data:Object.assign({_isCombo:!0},N.data),style:Object.assign({},N.style)})),S=new di({nodes:[...l,...p],edges:h});return e.model.model.hasTreeStructure(Cr)&&(S.attachTreeStructure(Cr),l.forEach(N=>{const U=e.model.model.getParent(N.id,Cr);U&&S.hasNode(U.id)&&S.setParent(N.id,U.id,Cr)})),S}}return t}function Jg(r,e,...t){if(e in r)return r[e](...t);if("instance"in r){const n=r.instance;if(e in n)return n[e](...t)}return null}function K1(r,e){if(e in r)return r[e];if("instance"in r){const t=r.instance;if(e in t)return t[e]}return null}var $L=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class eR extends cc{get forceLayoutInstance(){return this.context.layout.getLayoutInstance().find(e=>["d3-force","d3-force-3d"].includes(e==null?void 0:e.id))}validate(e){return this.context.layout?this.forceLayoutInstance?super.validate(e):(Ea.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(e,t){return $L(this,void 0,void 0,function*(){const n=this.forceLayoutInstance;this.context.graph.getNodeData(e).forEach((i,a)=>{const{x:s=0,y:o=0}=i.style||{};n&&Jg(n,"setFixedPosition",e[a],[...Un([+s,+o],t)])})})}onDragStart(e){if(this.enable=this.validate(e),!this.enable)return;this.target=this.getSelectedNodeIDs([e.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target);const t=this.forceLayoutInstance;t&&K1(t,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(n=>{const{x:i=0,y:a=0}=n.style||{};t&&Jg(t,"setFixedPosition",Et(n),[+i,+a])})}onDrag(e){if(!this.enable)return;const t=this.getDelta(e);this.moveElement(this.target,t)}onDragEnd(){const e=this.forceLayoutInstance;e&&K1(e,"simulation").alphaTarget(0),!this.options.fixed&&this.context.graph.getNodeData(this.target).forEach(t=>{e&&Jg(e,"setFixedPosition",Et(t),[null,null,null])})}}var X1=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class If extends Ca{constructor(e,t){super(e,Object.assign({},If.defaultOptions,t)),this.isZoomEvent=n=>!!(n.data&&"scale"in n.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=n=>X1(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context,{state:a,nodeFilter:s,edgeFilter:o,comboFilter:l}=this.options,u=(a?i.getElementDataByState("node",a):i.getNodeData()).filter(s),h=(a?i.getElementDataByState("edge",a):i.getEdgeData()).filter(o),p=(a?i.getElementDataByState("combo",a):i.getComboData()).filter(l),S=this.isZoomEvent(n)?this.zoom=Math.max(.01,Math.min(n.data.scale,10)):this.zoom,N=[...u,...p];N.length>0&&N.forEach(U=>this.fixNodeLike(U,S)),this.updateRelatedEdges(),h.length>0&&h.forEach(U=>this.fixEdge(U,S))}),this.cachedStyles=new Map,this.getOriginalFieldValue=(n,i,a)=>{var s;const o=this.cachedStyles.get(n)||[],l=((s=o.find(u=>u.shape===i))===null||s===void 0?void 0:s.style)||{};return a in l||(l[a]=i.attributes[a],this.cachedStyles.set(n,[...o.filter(u=>u.shape!==i),{shape:i,style:l}])),l[a]},this.scaleEntireElement=(n,i,a)=>{i.setLocalScale(1/a);const s=this.cachedStyles.get(n)||[];s.push({shape:i}),this.cachedStyles.set(n,s)},this.scaleSpecificShapes=(n,i,a)=>{const s=GD(n);(Array.isArray(a)?a:[a]).forEach(l=>{const{shape:u,fields:h}=l,p=typeof u=="function"?u(s):n.getShape(u);if(p){if(!h){this.scaleEntireElement(n.id,p,i);return}h.forEach(S=>{const N=this.getOriginalFieldValue(n.id,p,S);un(N)&&(p.style[S]=N/i)})}})},this.skipIfExceedViewport=n=>{const{viewport:i}=this.context;return!(i!=null&&i.isInViewport(n.getRenderBounds(),!1,30))},this.fixNodeLike=(n,i)=>{const a=Et(n),{element:s,model:o}=this.context,l=s.getElement(a);if(!l||this.skipIfExceedViewport(l))return;o.getRelatedEdgesData(a).forEach(p=>this.relatedEdgeToUpdate.add(Et(p)));const h=this.options[l.type];if(!h){this.scaleEntireElement(a,l,i);return}this.scaleSpecificShapes(l,i,h)},this.fixEdge=(n,i)=>{const a=Et(n),s=this.context.element.getElement(a);if(!s||this.skipIfExceedViewport(s))return;const o=this.options.edge;if(!o){s.style.transformOrigin="center",this.scaleEntireElement(a,s,i);return}this.scaleSpecificShapes(s,i,o)},this.updateRelatedEdges=()=>{const{element:n}=this.context;this.relatedEdgeToUpdate.size>0&&this.relatedEdgeToUpdate.forEach(i=>{const a=n.getElement(i);a==null||a.update({})}),this.relatedEdgeToUpdate.clear()},this.resetTransform=n=>X1(this,void 0,void 0,function*(){var i;!((i=n.data)===null||i===void 0)&&i.firstRender||(this.options.reset?this.restoreCachedStyles():this.fixElementSize({data:{scale:this.zoom}}))}),this.bindEvents()}restoreCachedStyles(){if(this.cachedStyles.size>0){this.cachedStyles.forEach(i=>{i.forEach(({shape:a,style:s})=>{if(Fs(s))a.setLocalScale(1);else{if(this.options.state)return;Object.entries(s).forEach(([o,l])=>a.style[o]=l)}})});const{graph:e,element:t}=this.context,n=Object.keys(Object.fromEntries(this.cachedStyles)).filter(i=>i&&e.getElementType(i)==="node");if(n.length>0){const i=new Set;n.forEach(a=>{e.getRelatedEdgesData(a).forEach(s=>i.add(Et(s)))}),i.forEach(a=>{const s=t==null?void 0:t.getElement(a);s==null||s.update({})})}}}bindEvents(){const{graph:e}=this.context;e.on(Qt.AFTER_DRAW,this.resetTransform),e.on(Qt.AFTER_TRANSFORM,this.fixElementSize)}unbindEvents(){const{graph:e}=this.context;e.off(Qt.AFTER_DRAW,this.resetTransform),e.off(Qt.AFTER_TRANSFORM,this.fixElementSize)}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}destroy(){this.unbindEvents(),super.destroy()}}If.defaultOptions={enable:r=>r.data.scale<1,nodeFilter:()=>!0,edgeFilter:()=>!0,comboFilter:()=>!0,edge:[{shape:"key",fields:["lineWidth"]},{shape:"halo",fields:["lineWidth"]},{shape:"label"}],reset:!1};var tR=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class Nf extends Ca{constructor(e,t){super(e,Object.assign({},Nf.defaultOptions,t)),this.focus=n=>tR(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context;yield i.focusElement(n.target.id,this.options.animation)}),this.bindEvents()}bindEvents(){const{graph:e}=this.context;this.unbindEvents(),dl.forEach(t=>{e.on(`${t}:${Lt.CLICK}`,this.focus)})}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}unbindEvents(){const{graph:e}=this.context;dl.forEach(t=>{e.off(`${t}:${Lt.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),super.destroy()}}Nf.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0};class Bf extends Ca{constructor(e,t){super(e,Object.assign({},Bf.defaultOptions,t)),this.isFrozen=!1,this.toggleFrozen=n=>{this.isFrozen=n.type==="dragstart"},this.hoverElement=n=>{if(!this.validate(n))return;const i=n.type===Lt.POINTER_ENTER;this.updateElementsState(n,i);const{onHover:a,onHoverEnd:s}=this.options;i?a==null||a(n):s==null||s(n)},this.updateElementsState=(n,i)=>{if(!this.options.state&&!this.options.inactiveState)return;const{graph:a}=this.context,{state:s,animation:o,inactiveState:l}=this.options,u=this.getActiveIds(n),h={};if(s&&Object.assign(h,this.getElementsState(u,s,i)),l){const p=N_(a.getData(),!0).filter(S=>!u.includes(S));Object.assign(h,this.getElementsState(p,l,i))}a.setElementState(h,o)},this.getElementsState=(n,i,a)=>{const{graph:s}=this.context,o={};return n.forEach(l=>{const u=s.getElementState(l);a?o[l]=u.includes(i)?u:[...u,i]:o[l]=u.filter(h=>h!==i)}),o},this.bindEvents()}bindEvents(){const{graph:e}=this.context;this.unbindEvents(),dl.forEach(n=>{e.on(`${n}:${Lt.POINTER_ENTER}`,this.hoverElement),e.on(`${n}:${Lt.POINTER_LEAVE}`,this.hoverElement)});const t=this.context.canvas.document;t.addEventListener(`${Lt.DRAG_START}`,this.toggleFrozen),t.addEventListener(`${Lt.DRAG_END}`,this.toggleFrozen)}getActiveIds(e){const{graph:t}=this.context,{degree:n,direction:i}=this.options,a=e.target.id;return n?J_(t,e.targetType,a,typeof n=="function"?n(e):n,i):[a]}validate(e){if(this.destroyed||this.isFrozen||wf(e.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}unbindEvents(){const{graph:e}=this.context;dl.forEach(n=>{e.off(`${n}:${Lt.POINTER_ENTER}`,this.hoverElement),e.off(`${n}:${Lt.POINTER_LEAVE}`,this.hoverElement)});const t=this.context.canvas.document;t.removeEventListener(`${Lt.DRAG_START}`,this.toggleFrozen),t.removeEventListener(`${Lt.DRAG_END}`,this.toggleFrozen)}destroy(){this.unbindEvents(),super.destroy()}}Bf.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class nR extends ec{onPointerDown(e){if(!super.validate(e)||!super.isKeydown()||this.points)return;const{canvas:t}=this.context;this.pathShape=new Sa({id:"g6-lasso-select",style:this.options.style}),t.appendChild(this.pathShape),this.points=[Qh(e)]}onPointerMove(e){var t;if(!this.points)return;const{immediately:n,mode:i}=this.options;this.points.push(Qh(e)),(t=this.pathShape)===null||t===void 0||t.setAttribute("d",FD(this.points)),n&&i==="default"&&this.points.length>2&&super.updateElementsStates(this.points)}onPointerUp(){if(this.points){if(this.points.length<2){this.clearLasso();return}super.updateElementsStates(this.points),this.clearLasso()}}clearLasso(){var e;(e=this.pathShape)===null||e===void 0||e.remove(),this.pathShape=void 0,this.points=void 0}}class kf extends Ca{constructor(e,t){super(e,Object.assign({},kf.defaultOptions,t)),this.hiddenShapes=[],this.isVisible=!0,this.setElementsVisibility=(n,i,a)=>{n.filter(Boolean).forEach(s=>{i==="hidden"&&!s.isVisible()?this.hiddenShapes.push(s):i==="visible"&&this.hiddenShapes.includes(s)?this.hiddenShapes.splice(this.hiddenShapes.indexOf(s),1):hl(s,i,a)})},this.filterShapes=(n,i)=>{if(yn(i))return s=>!i(n,s);const a=i==null?void 0:i[n];return s=>s.className?!(a!=null&&a.includes(s.className)):!0},this.hideShapes=n=>{if(!this.validate(n)||!this.isVisible)return;const{element:i}=this.context,{shapes:a={}}=this.options;this.setElementsVisibility(i.getNodes(),"hidden",this.filterShapes("node",a)),this.setElementsVisibility(i.getEdges(),"hidden",this.filterShapes("edge",a)),this.setElementsVisibility(i.getCombos(),"hidden",this.filterShapes("combo",a)),this.isVisible=!1},this.showShapes=uc(n=>{if(!this.validate(n)||this.isVisible)return;const{element:i}=this.context;this.setElementsVisibility(i.getNodes(),"visible"),this.setElementsVisibility(i.getEdges(),"visible"),this.setElementsVisibility(i.getCombos(),"visible"),this.isVisible=!0},this.options.debounce),this.bindEvents()}bindEvents(){const{graph:e}=this.context;e.on(Qt.BEFORE_TRANSFORM,this.hideShapes),e.on(Qt.AFTER_TRANSFORM,this.showShapes)}unbindEvents(){const{graph:e}=this.context;e.off(Qt.BEFORE_TRANSFORM,this.hideShapes),e.off(Qt.AFTER_TRANSFORM,this.showShapes)}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}kf.defaultOptions={enable:!0,debounce:200,shapes:r=>r==="node"};var Y1=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class Ff extends Ca{constructor(e,t){super(e,Object.assign({},Ff.defaultOptions,t)),this.onWheel=n=>Y1(this,void 0,void 0,function*(){this.options.preventDefault&&n.preventDefault();const i=n.deltaX,a=n.deltaY;yield this.scroll([-i,-a],n)}),this.shortcut=new Jl(e.graph),this.bindEvents()}update(e){super.update(e),this.bindEvents()}bindEvents(){var e,t;const{trigger:n}=this.options;if(this.shortcut.unbindAll(),li(n)){(e=this.graphDom)===null||e===void 0||e.removeEventListener(Lt.WHEEL,this.onWheel);const{up:i=[],down:a=[],left:s=[],right:o=[]}=n;this.shortcut.bind(i,l=>this.scroll([0,-10],l)),this.shortcut.bind(a,l=>this.scroll([0,10],l)),this.shortcut.bind(s,l=>this.scroll([-10,0],l)),this.shortcut.bind(o,l=>this.scroll([10,0],l))}else(t=this.graphDom)===null||t===void 0||t.addEventListener(Lt.WHEEL,this.onWheel,{passive:!1})}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}formatDisplacement(e){const{sensitivity:t}=this.options;return e=ds(e,t),e=this.clampByDirection(e),e=this.clampByRange(e),e}clampByDirection([e,t]){const{direction:n}=this.options;return n==="x"?t=0:n==="y"&&(e=0),[e,t]}clampByRange([e,t]){const{viewport:n,canvas:i}=this.context,[a,s]=i.getSize(),[o,l,u,h]=cs(this.options.range),p=[s*o,a*l,s*u,a*h],S=Mo(og(n.getCanvasCenter()),p),N=Or(n.getViewportCenter(),[e,t,0]);if(!hs(N,S)){const{min:[U,H],max:[V,Y]}=S;(N[0]0||N[0]>V&&e<0)&&(e=0),(N[1]0||N[1]>Y&&t<0)&&(t=0)}return[e,t]}scroll(e,t){return Y1(this,void 0,void 0,function*(){if(!this.validate(t))return;const{onFinish:n}=this.options,i=this.context.graph,a=this.formatDisplacement(e);yield i.translateBy(a,!1),n==null||n()})}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}destroy(){var e;this.shortcut.destroy(),(e=this.graphDom)===null||e===void 0||e.removeEventListener(Lt.WHEEL,this.onWheel),super.destroy()}}Ff.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var Q1=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class zf extends Ca{constructor(e,t){super(e,Object.assign({},zf.defaultOptions,t)),this.zoom=(n,i,a)=>Q1(this,void 0,void 0,function*(){if(!this.validate(i))return;const{graph:s}=this.context;let o=this.options.origin;!o&&"viewport"in i&&(o=Fi(i.viewport));const{sensitivity:l,onFinish:u}=this.options,h=1+Jr(n,-50,50)*l/100,p=s.getZoom();yield s.zoomTo(p*h,a,o),u==null||u()}),this.onReset=()=>Q1(this,void 0,void 0,function*(){yield this.context.graph.zoomTo(1,this.options.animation)}),this.preventDefault=n=>{this.options.preventDefault&&n.preventDefault()},this.shortcut=new Jl(e.graph),this.bindEvents()}update(e){super.update(e),this.bindEvents()}bindEvents(){const{trigger:e}=this.options;if(this.shortcut.unbindAll(),Array.isArray(e))if(e.includes(Lt.PINCH))this.shortcut.bind([Lt.PINCH],t=>{this.zoom(t.scale,t,!1)});else{const t=this.context.canvas.getContainer();t==null||t.addEventListener(Lt.WHEEL,this.preventDefault),this.shortcut.bind([...e,Lt.WHEEL],n=>{const{deltaX:i,deltaY:a}=n;this.zoom(-(a!=null?a:i),n,!1)})}if(typeof e=="object"){const{zoomIn:t=[],zoomOut:n=[],reset:i=[]}=e;this.shortcut.bind(t,a=>this.zoom(10,a,this.options.animation)),this.shortcut.bind(n,a=>this.zoom(-10,a,this.options.animation)),this.shortcut.bind(i,this.onReset)}}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return yn(t)?t(e):!!t}destroy(){var e;this.shortcut.destroy(),(e=this.context.canvas.getContainer())===null||e===void 0||e.removeEventListener(Lt.WHEEL,this.preventDefault),super.destroy()}}zf.defaultOptions={animation:{duration:200},enable:!0,sensitivity:1,trigger:[],preventDefault:!0};var Uf=X(13722);const rR=(r,e)=>{if(r!=="next"&&r!=="prev")return e},J1=r=>{r.prev.next=r.next,r.next.prev=r.prev,delete r.next,delete r.prev};class iR{constructor(){const e={};e.prev=e,e.next=e.prev,this.shortcut=e}dequeue(){const e=this.shortcut,t=e.prev;if(t&&t!==e)return J1(t),t}enqueue(e){const t=this.shortcut;e.prev&&e.next&&J1(e),e.next=t.next,t.next.prev=e,t.next=e,e.prev=t}toString(){const e=[],t=this.shortcut;let n=t.prev;for(;n!==t;)e.push(JSON.stringify(n,rR)),n=n==null?void 0:n.prev;return`[${e.join(", ")}]`}}class aR extends iR{}const sR=()=>1,oR=(r,e)=>{var t;if(r.getAllNodes().length<=1)return[];const n=uR(r,e||sR);return(t=lR(n.graph,n.buckets,n.zeroIdx).map(a=>r.getRelatedEdges(a.v,"out").filter(({target:s})=>s===a.w)))===null||t===void 0?void 0:t.flat()},lR=(r,e,t)=>{let n=[];const i=e[e.length-1],a=e[0];let s;for(;r.getAllNodes().length;){for(;s=a.dequeue();)qg(r,e,t,s);for(;s=i.dequeue();)qg(r,e,t,s);if(r.getAllNodes().length){for(let o=e.length-2;o>0;--o)if(s=e[o].dequeue(),s){n=n.concat(qg(r,e,t,s,!0));break}}}return n},qg=(r,e,t,n,i)=>{var a,s;const o=[];return r.hasNode(n.v)&&((a=r.getRelatedEdges(n.v,"in"))===null||a===void 0||a.forEach(l=>{const u=l.data.weight,h=r.getNode(l.source);i&&o.push({v:l.source,w:l.target,in:0,out:0}),h.data.out===void 0&&(h.data.out=0),h.data.out-=u,$g(e,t,Object.assign({v:h.id},h.data))}),(s=r.getRelatedEdges(n.v,"out"))===null||s===void 0||s.forEach(l=>{const u=l.data.weight,h=l.target,p=r.getNode(h);p.data.in===void 0&&(p.data.in=0),p.data.in-=u,$g(e,t,Object.assign({v:p.id},p.data))}),r.removeNode(n.v)),i?o:void 0},uR=(r,e)=>{const t=new di;let n=0,i=0;r.getAllNodes().forEach(l=>{t.addNode({id:l.id,data:{v:l.id,in:0,out:0}})}),r.getAllEdges().forEach(l=>{const u=t.getRelatedEdges(l.source,"out").find(p=>p.target===l.target),h=(e==null?void 0:e(l))||1;u?t.updateEdgeData(u==null?void 0:u.id,Object.assign(Object.assign({},u.data),{weight:u.data.weight+h})):t.addEdge({id:l.id,source:l.source,target:l.target,data:{weight:h}}),i=Math.max(i,t.getNode(l.source).data.out+=h),n=Math.max(n,t.getNode(l.target).data.in+=h)});const a=[],s=i+n+3;for(let l=0;l{$g(a,o,Object.assign({v:l.id},t.getNode(l.id).data))}),{buckets:a,zeroIdx:o,graph:t}},$g=(r,e,t)=>{t.out?t.in?r[t.out-t.in+e].enqueue(t):r[r.length-1].enqueue(t):r[0].enqueue(t)},cR=(r,e)=>{const n=e==="greedy"?oR(r,(i=>a=>a.data.weight||1)(r)):hR(r);n==null||n.forEach(i=>{const a=i.data;r.removeEdge(i.id),a.forwardName=i.data.name,a.reversed=!0,r.addEdge({id:i.id,source:i.target,target:i.source,data:Object.assign({},a)})})},hR=r=>{const e=[],t={},n={},i=a=>{n[a]||(n[a]=!0,t[a]=!0,r.getRelatedEdges(a,"out").forEach(s=>{t[s.target]?e.push(s):i(s.target)}),delete t[a])};return r.getAllNodes().forEach(a=>i(a.id)),e},fR=r=>{r.getAllEdges().forEach(e=>{const t=e.data;if(t.reversed){r.removeEdge(e.id);const n=t.forwardName;delete t.reversed,delete t.forwardName,r.addEdge({id:e.id,source:e.target,target:e.source,data:Object.assign(Object.assign({},t),{forwardName:n})})}})},dR=(r,e)=>Number(r)-Number(e),tu=(r,e,t,n)=>{let i;do i=`${n}${Math.random()}`;while(r.hasNode(i));return t.dummy=e,r.addNode({id:i,data:t}),i},vR=r=>{const e=new di;return r.getAllNodes().forEach(t=>{e.addNode(Object.assign({},t))}),r.getAllEdges().forEach(t=>{const n=e.getRelatedEdges(t.source,"out").find(i=>i.target===t.target);n?e.updateEdgeData(n==null?void 0:n.id,Object.assign(Object.assign({},n.data),{weight:n.data.weight+t.data.weight||0,minlen:Math.max(n.data.minlen,t.data.minlen||1)})):e.addEdge({id:t.id,source:t.source,target:t.target,data:{weight:t.data.weight||0,minlen:t.data.minlen||1}})}),e},q1=r=>{const e=new di;return r.getAllNodes().forEach(t=>{r.getChildren(t.id).length||e.addNode(Object.assign({},t))}),r.getAllEdges().forEach(t=>{e.addEdge(t)}),e},$1=(r,e)=>r==null?void 0:r.reduce((t,n,i)=>(t[n]=e[i],t),{}),CU=r=>{const e={};return r.getAllNodes().forEach(t=>{const n={};r.getRelatedEdges(t.id,"out").forEach(i=>{n[i.target]=(n[i.target]||0)+(i.data.weight||0)}),e[t.id]=n}),e},LU=r=>{const e=r.getAllNodes(),t=e.map(n=>{const i={};return r.getRelatedEdges(n.id,"in").forEach(a=>{i[a.source]=(i[a.source]||0)+a.data.weight}),i});return $1(e.map(n=>n.id),t)},eE=(r,e)=>{const t=Number(r.x),n=Number(r.y),i=Number(e.x)-t,a=Number(e.y)-n;let s=Number(r.width)/2,o=Number(r.height)/2;if(!i&&!a)return{x:0,y:0};let l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:t+l,y:n+u}},hc=r=>{const e=[],t=nE(r)+1;for(let n=0;n{const i=n.data.rank;i!==void 0&&e[i]&&e[i].push(n.id)});for(let n=0;ndR(r.getNode(i).data.order,r.getNode(a).data.order));return e},gR=r=>{const e=r.getAllNodes().filter(n=>n.data.rank!==void 0).map(n=>n.data.rank),t=Math.min(...e);r.getAllNodes().forEach(n=>{n.data.hasOwnProperty("rank")&&t!==1/0&&(n.data.rank-=t)})},pR=(r,e=0)=>{const t=r.getAllNodes(),n=t.filter(o=>o.data.rank!==void 0).map(o=>o.data.rank),i=Math.min(...n),a=[];t.forEach(o=>{const l=(o.data.rank||0)-i;a[l]||(a[l]=[]),a[l].push(o.id)});let s=0;for(let o=0;o{const h=r.getNode(u);h&&(h.data.rank=h.data.rank||0,h.data.rank+=s)}))}},tE=(r,e,t,n)=>{const i={width:0,height:0};return un(t)&&un(n)&&(i.rank=t,i.order=n),tu(r,"border",i,e)},nE=r=>{let e;return r.getAllNodes().forEach(t=>{const n=t.data.rank;n!==void 0&&(e===void 0||n>e)&&(e=n)}),e||(e=0),e},mR=(r,e)=>{const t={lhs:[],rhs:[]};return r==null||r.forEach(n=>{e(n)?t.lhs.push(n):t.rhs.push(n)}),t},e0=(r,e)=>r.reduce((t,n)=>{const i=e(t),a=e(n);return i>a?n:t}),rE=(r,e,t,n,i,a)=>{n.includes(e.id)||(n.push(e.id),t||a.push(e.id),i(e.id).forEach(s=>rE(r,s,t,n,i,a)),t&&a.push(e.id))},iE=(r,e,t,n)=>{const i=Array.isArray(e)?e:[e],a=l=>n?r.getSuccessors(l):r.getNeighbors(l),s=[],o=[];return i.forEach(l=>{if(r.hasNode(l.id))rE(r,l,t==="post",o,a,s);else throw new Error(`Graph does not have node: ${l}`)}),s},yR=r=>{const e=t=>{const n=r.getChildren(t),i=r.getNode(t);if(n!=null&&n.length&&n.forEach(a=>e(a.id)),i.data.hasOwnProperty("minRank")){i.data.borderLeft=[],i.data.borderRight=[];for(let a=i.data.minRank,s=i.data.maxRank+1;ae(t.id))},aE=(r,e,t,n,i,a)=>{const s={rank:a,borderType:e,width:0,height:0},o=i.data[e][a-1],l=tu(r,"border",s,t);i.data[e][a]=l,r.setParent(l,n),o&&r.addEdge({id:`e${Math.random()}`,source:o,target:l,data:{weight:1}})},_R=(r,e)=>{const t=e.toLowerCase();(t==="lr"||t==="rl")&&sE(r)},ER=(r,e)=>{const t=e.toLowerCase();(t==="bt"||t==="rl")&&xR(r),(t==="lr"||t==="rl")&&(bR(r),sE(r))},sE=r=>{r.getAllNodes().forEach(e=>{oE(e)}),r.getAllEdges().forEach(e=>{oE(e)})},oE=r=>{const e=r.data.width;r.data.width=r.data.height,r.data.height=e},xR=r=>{r.getAllNodes().forEach(e=>{t0(e.data)}),r.getAllEdges().forEach(e=>{var t;(t=e.data.points)===null||t===void 0||t.forEach(n=>t0(n)),e.data.hasOwnProperty("y")&&t0(e.data)})},t0=r=>{r!=null&&r.y&&(r.y=-r.y)},bR=r=>{r.getAllNodes().forEach(e=>{n0(e.data)}),r.getAllEdges().forEach(e=>{var t;(t=e.data.points)===null||t===void 0||t.forEach(n=>n0(n)),e.data.hasOwnProperty("x")&&n0(e.data)})},n0=r=>{const e=r.x;r.x=r.y,r.y=e},wR=r=>{const e=tu(r,"root",{},"_root"),t=MR(r);let n=Math.max(...Object.values(t));Math.abs(n)===1/0&&(n=1);const i=n-1,a=2*i+1;r.getAllEdges().forEach(o=>{o.data.minlen*=a});const s=AR(r)+1;return r.getRoots().forEach(o=>{lE(r,e,a,s,i,t,o.id)}),{nestingRoot:e,nodeRankFactor:a}},lE=(r,e,t,n,i,a,s)=>{const o=r.getChildren(s);if(!(o!=null&&o.length)){s!==e&&r.addEdge({id:`e${Math.random()}`,source:e,target:s,data:{weight:0,minlen:t}});return}const l=tE(r,"_bt"),u=tE(r,"_bb"),h=r.getNode(s);r.setParent(l,s),h.data.borderTop=l,r.setParent(u,s),h.data.borderBottom=u,o==null||o.forEach(p=>{lE(r,e,t,n,i,a,p.id);const S=p.data.borderTop?p.data.borderTop:p.id,N=p.data.borderBottom?p.data.borderBottom:p.id,U=p.data.borderTop?n:2*n,H=S!==N?1:i-a[s]+1;r.addEdge({id:`e${Math.random()}`,source:l,target:S,data:{minlen:H,weight:U,nestingEdge:!0}}),r.addEdge({id:`e${Math.random()}`,source:N,target:u,data:{minlen:H,weight:U,nestingEdge:!0}})}),r.getParent(s)||r.addEdge({id:`e${Math.random()}`,source:e,target:l,data:{weight:0,minlen:i+a[s]}})},MR=r=>{const e={},t=(n,i)=>{const a=r.getChildren(n);a==null||a.forEach(s=>t(s.id,i+1)),e[n]=i};return r.getRoots().forEach(n=>t(n.id,1)),e},AR=r=>{let e=0;return r.getAllEdges().forEach(t=>{e+=t.data.weight}),e},TR=(r,e)=>{e&&r.removeNode(e),r.getAllEdges().forEach(t=>{t.data.nestingEdge&&r.removeEdge(t.id)})},PR="edge",uE="edge-label",SR=(r,e)=>{r.getAllEdges().forEach(t=>OR(r,t,e))},OR=(r,e,t)=>{let n=e.source,i=r.getNode(n).data.rank;const a=e.target,s=r.getNode(a).data.rank,o=e.data.labelRank;if(s===i+1)return;r.removeEdge(e.id);let l,u,h;for(h=0,++i;i{e.forEach(t=>{let n=r.getNode(t);const{data:i}=n,a=i.originalEdge;let s;a&&r.addEdge(a);let o=t;for(;n.data.dummy;)s=r.getSuccessors(o)[0],r.removeNode(o),a.data.points.push({x:n.data.x,y:n.data.y}),n.data.dummy===uE&&(a.data.x=n.data.x,a.data.y=n.data.y,a.data.width=n.data.width,a.data.height=n.data.height),o=s.id,n=r.getNode(o)})},CR=(r,e,t)=>{const n={};let i;t==null||t.forEach(a=>{let s=r.getParent(a),o,l;for(;s;){if(o=r.getParent(s.id),o?(l=n[o.id],n[o.id]=s.id):(l=i,i=s.id),l&&l!==s.id){e.hasNode(l)||e.addNode({id:l,data:{}}),e.hasNode(s.id)||e.addNode({id:s.id,data:{}}),e.hasEdge(`e${l}-${s.id}`)||e.addEdge({id:`e${l}-${s.id}`,source:l,target:s.id,data:{}});return}s=o}})},LR=(r,e,t)=>{const n=RR(r),i=new di({tree:[{id:n,children:[],data:{}}]});return r.getAllNodes().forEach(a=>{const s=r.getParent(a.id);(a.data.rank===e||a.data.minRank<=e&&e<=a.data.maxRank)&&(i.hasNode(a.id)||i.addNode(Object.assign({},a)),s!=null&&s.id&&!i.hasNode(s==null?void 0:s.id)&&i.addNode(Object.assign({},s)),i.setParent(a.id,(s==null?void 0:s.id)||n),r.getRelatedEdges(a.id,t).forEach(o=>{const l=o.source===a.id?o.target:o.source;i.hasNode(l)||i.addNode(Object.assign({},r.getNode(l)));const u=i.getRelatedEdges(l,"out").find(({target:p})=>p===a.id),h=u!==void 0?u.data.weight:0;u?i.updateEdgeData(u.id,Object.assign(Object.assign({},u.data),{weight:o.data.weight+h})):i.addEdge({id:o.id,source:l,target:a.id,data:{weight:o.data.weight+h}})}),a.data.hasOwnProperty("minRank")&&i.updateNodeData(a.id,Object.assign(Object.assign({},a.data),{borderLeft:a.data.borderLeft[e],borderRight:a.data.borderRight[e]})))}),i},RR=r=>{let e;for(;r.hasNode(e=`_root${Math.random()}`););return e},IR=(r,e,t)=>{const n=$1(t,t.map((h,p)=>p)),a=e.map(h=>{const p=r.getRelatedEdges(h,"out").map(S=>({pos:n[S.target]||0,weight:S.data.weight}));return p==null?void 0:p.sort((S,N)=>S.pos-N.pos)}).flat().filter(h=>h!==void 0);let s=1;for(;s{if(h){let p=h.pos+s;l[p]+=h.weight;let S=0;for(;p>0;)p%2&&(S+=l[p+1]),p=p-1>>1,l[p]+=h.weight;u+=h.weight*S}}),u},cE=(r,e)=>{let t=0;for(let n=1;n<(e==null?void 0:e.length);n+=1)t+=IR(r,e[n-1],e[n]);return t},hE=r=>{const e={},t=r.getAllNodes(),n=t.map(u=>{var h;return(h=u.data.rank)!==null&&h!==void 0?h:-1/0}),i=Math.max(...n),a=[];for(let u=0;ur.getNode(u.id).data.rank-r.getNode(h.id).data.rank),l=s.filter(u=>r.getNode(u.id).data.fixorder!==void 0).sort((u,h)=>r.getNode(u.id).data.fixorder-r.getNode(h.id).data.fixorder);return l==null||l.forEach(u=>{isNaN(r.getNode(u.id).data.rank)||a[r.getNode(u.id).data.rank].push(u.id),e[u.id]=!0}),s==null||s.forEach(u=>r.dfsTree(u.id,h=>{if(e.hasOwnProperty(h.id))return!0;e[h.id]=!0,isNaN(h.data.rank)||a[h.data.rank].push(h.id)})),a},NR=(r,e)=>e.map(t=>{const n=r.getRelatedEdges(t,"in");if(!(n!=null&&n.length))return{v:t};const i={sum:0,weight:0};return n==null||n.forEach(a=>{const s=r.getNode(a.source);i.sum+=a.data.weight*s.data.order,i.weight+=a.data.weight}),{v:t,barycenter:i.sum/i.weight,weight:i.weight}}),BR=(r,e)=>{var t,n,i;const a={};r==null||r.forEach((o,l)=>{a[o.v]={i:l,indegree:0,in:[],out:[],vs:[o.v]};const u=a[o.v];o.barycenter!==void 0&&(u.barycenter=o.barycenter,u.weight=o.weight)}),(t=e.getAllEdges())===null||t===void 0||t.forEach(o=>{const l=a[o.source],u=a[o.target];l!==void 0&&u!==void 0&&(u.indegree++,l.out.push(a[o.target]))});const s=(i=(n=Object.values(a)).filter)===null||i===void 0?void 0:i.call(n,o=>!o.indegree);return kR(s)},kR=r=>{var e,t;const n=[],i=l=>u=>{u.merged||(u.barycenter===void 0||l.barycenter===void 0||u.barycenter>=l.barycenter)&&FR(l,u)},a=l=>u=>{u.in.push(l),--u.indegree===0&&r.push(u)};for(;r!=null&&r.length;){const l=r.pop();n.push(l),(e=l.in.reverse())===null||e===void 0||e.forEach(u=>i(l)(u)),(t=l.out)===null||t===void 0||t.forEach(u=>a(l)(u))}const s=n.filter(l=>!l.merged),o=["vs","i","barycenter","weight"];return s.map(l=>{const u={};return o==null||o.forEach(h=>{l[h]!==void 0&&(u[h]=l[h])}),u})},FR=(r,e)=>{var t;let n=0,i=0;r.weight&&(n+=r.barycenter*r.weight,i+=r.weight),e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),r.vs=(t=e.vs)===null||t===void 0?void 0:t.concat(r.vs),r.barycenter=n/i,r.weight=i,r.i=Math.min(e.i,r.i),e.merged=!0};var zR=BR;const UR=(r,e,t,n)=>{const i=mR(r,S=>{const N=S.hasOwnProperty("fixorder")&&!isNaN(S.fixorder);return n?!N&&S.hasOwnProperty("barycenter"):N||S.hasOwnProperty("barycenter")}),a=i.lhs,s=i.rhs.sort((S,N)=>-S.i- -N.i),o=[];let l=0,u=0,h=0;a==null||a.sort(WR(!!e,!!t)),h=fE(o,s,h),a==null||a.forEach(S=>{var N;h+=(N=S.vs)===null||N===void 0?void 0:N.length,o.push(S.vs),l+=S.barycenter*S.weight,u+=S.weight,h=fE(o,s,h)});const p={vs:o.flat()};return u&&(p.barycenter=l/u,p.weight=u),p},fE=(r,e,t)=>{let n=t,i;for(;e.length&&(i=e[e.length-1]).i<=n;)e.pop(),r==null||r.push(i.vs),n++;return n},WR=(r,e)=>(t,n)=>{if(t.fixorder!==void 0&&n.fixorder!==void 0)return t.fixorder-n.fixorder;if(t.barycentern.barycenter)return 1;if(e&&t.order!==void 0&&n.order!==void 0){if(t.ordern.order)return 1}return r?n.i-t.i:t.i-n.i},dE=(r,e,t,n,i,a)=>{var s,o,l,u;let h=r.getChildren(e).map(q=>q.id);const p=r.getNode(e),S=p?p.data.borderLeft:void 0,N=p?p.data.borderRight:void 0,U={};S&&(h=h==null?void 0:h.filter(q=>q!==S&&q!==N));const H=NR(r,h||[]);H==null||H.forEach(q=>{var ne;if(!((ne=r.getChildren(q.v))===null||ne===void 0)&&ne.length){const le=dE(r,q.v,t,n,a);U[q.v]=le,le.hasOwnProperty("barycenter")&&GR(q,le)}});const V=zR(H,t);HR(V,U),(s=V.filter(q=>q.vs.length>0))===null||s===void 0||s.forEach(q=>{const ne=r.getNode(q.vs[0]);ne&&(q.fixorder=ne.data.fixorder,q.order=ne.data.order)});const Y=UR(V,n,i,a);if(S&&(Y.vs=[S,Y.vs,N].flat(),!((o=r.getPredecessors(S))===null||o===void 0)&&o.length)){const q=r.getNode(((l=r.getPredecessors(S))===null||l===void 0?void 0:l[0].id)||""),ne=r.getNode(((u=r.getPredecessors(N))===null||u===void 0?void 0:u[0].id)||"");Y.hasOwnProperty("barycenter")||(Y.barycenter=0,Y.weight=0),Y.barycenter=(Y.barycenter*Y.weight+q.data.order+ne.data.order)/(Y.weight+2),Y.weight+=2}return Y},HR=(r,e)=>{r==null||r.forEach(t=>{var n;const i=(n=t.vs)===null||n===void 0?void 0:n.map(a=>e[a]?e[a].vs:a);t.vs=i.flat()})},GR=(r,e)=>{r.barycenter!==void 0?(r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight):(r.barycenter=e.barycenter,r.weight=e.weight)},jR=(r,e)=>{const t=nE(r),n=[],i=[];for(let h=1;h-1;h--)i.push(h);const a=vE(r,n,"in"),s=vE(r,i,"out");let o=hE(r);r0(r,o);let l=Number.POSITIVE_INFINITY,u;for(let h=0,p=0;p<4;++h,++p){gE(h%2?a:s,h%4>=2,!1,e),o=hc(r);const S=cE(r,o);S=2,!0,e),o=hc(r);const S=cE(r,o);Se.map(n=>LR(r,n,t)),gE=(r,e,t,n)=>{const i=new di;r==null||r.forEach(a=>{var s;const o=a.getRoots()[0].id,l=dE(a,o,i,e,t,n);for(let u=0;u<((s=l.vs)===null||s===void 0?void 0:s.length);u++){const h=a.getNode(l.vs[u]);h&&(h.data.order=u)}CR(a,i,l.vs)})},r0=(r,e)=>{e==null||e.forEach(t=>{t==null||t.forEach((n,i)=>{r.getNode(n).data.order=i})})},VR=(r,e)=>{const n=r.getAllNodes().filter(s=>{var o;return!(!((o=r.getChildren(s.id))===null||o===void 0)&&o.length)}).map(s=>s.data.rank),i=Math.max(...n),a=[];for(let s=0;s{const o=r.getNode(s);!o||o.data.dummy||isNaN(o.data.rank)||(o.data.fixorder=a[o.data.rank].length,a[o.data.rank].push(s))})},ZR=r=>{const e={};let t=0;const n=i=>{const a=t;r.getChildren(i).forEach(s=>n(s.id)),e[i]={low:a,lim:t++}};return r.getRoots().forEach(i=>n(i.id)),e},KR=(r,e,t,n)=>{var i,a;const s=[],o=[],l=Math.min(e[t].low,e[n].low),u=Math.max(e[t].lim,e[n].lim);let h,p;h=t;do h=(i=r.getParent(h))===null||i===void 0?void 0:i.id,s.push(h);while(h&&(e[h].low>l||u>e[h].lim));for(p=h,h=n;h&&h!==p;)o.push(h),h=(a=r.getParent(h))===null||a===void 0?void 0:a.id;return{lca:p,path:s.concat(o.reverse())}},XR=(r,e)=>{const t=ZR(r);e.forEach(n=>{var i,a;let s=n,o=r.getNode(s);const l=o.data.originalEdge;if(!l)return;const u=KR(r,t,l.source,l.target),h=u.path,p=u.lca;let S=0,N=h[S],U=!0;for(;s!==l.target;){if(o=r.getNode(s),U){for(;N!==p&&((i=r.getNode(N))===null||i===void 0?void 0:i.data.maxRank){const t={},n=(i,a)=>{let s=0,o=0;const l=i.length,u=a==null?void 0:a[(a==null?void 0:a.length)-1];return a==null||a.forEach((h,p)=>{var S;const N=YR(r,h),U=N?r.getNode(N.id).data.order:l;(N||h===u)&&((S=a.slice(o,p+1))===null||S===void 0||S.forEach(H=>{var V;(V=r.getPredecessors(H))===null||V===void 0||V.forEach(Y=>{var q;const ne=r.getNode(Y.id),le=ne.data.order;(le{const t={};function n(o,l,u,h,p){var S,N;let U;for(let H=l;H{const Y=r.getNode(V.id);Y.data.dummy&&(Y.data.orderp)&&yE(t,V.id,U)}))}function i(o){return JSON.stringify(o.slice(1))}function a(o,l){const u=i(o);l.get(u)||(n(...o),l.set(u,!0))}const s=(o,l)=>{let u=-1,h,p=0;const S=new Map;return l==null||l.forEach((N,U)=>{var H;if(((H=r.getNode(N))===null||H===void 0?void 0:H.data.dummy)==="border"){const V=r.getPredecessors(N)||[];V.length&&(h=r.getNode(V[0].id).data.order,a([l,p,U,u,h],S),p=U,u=h)}a([l,p,l.length,h,o.length],S)}),l};return e!=null&&e.length&&e.reduce(s),t},YR=(r,e)=>{var t,n;if(!((t=r.getNode(e))===null||t===void 0)&&t.data.dummy)return(n=r.getPredecessors(e))===null||n===void 0?void 0:n.find(i=>r.getNode(i.id).data.dummy)},yE=(r,e,t)=>{let n=e,i=t;if(n>i){const s=n;n=i,i=s}let a=r[n];a||(r[n]=a={}),a[i]=!0},QR=(r,e,t)=>{let n=e,i=t;if(n>i){const a=e;n=i,i=a}return!!r[n]},_E=(r,e,t,n)=>{const i={},a={},s={};return e==null||e.forEach(o=>{o==null||o.forEach((l,u)=>{i[l]=l,a[l]=l,s[l]=u})}),e==null||e.forEach(o=>{let l=-1;o==null||o.forEach(u=>{let h=n(u).map(p=>p.id);if(h.length){h=h.sort((S,N)=>s[S]-s[N]);const p=(h.length-1)/2;for(let S=Math.floor(p),N=Math.ceil(p);S<=N;++S){const U=h[S];a[u]===u&&l{var o;const l={},u=JR(r,e,t,i,a,s),h=s?"borderLeft":"borderRight",p=(U,H)=>{let V=u.getAllNodes(),Y=V.pop();const q={};for(;Y;)q[Y.id]?U(Y.id):(q[Y.id]=!0,V.push(Y),V=V.concat(H(Y.id))),Y=V.pop()},S=U=>{l[U]=(u.getRelatedEdges(U,"in")||[]).reduce((H,V)=>Math.max(H,(l[V.source]||0)+V.data.weight),0)},N=U=>{const H=(u.getRelatedEdges(U,"out")||[]).reduce((Y,q)=>Math.min(Y,(l[q.target]||0)-q.data.weight),Number.POSITIVE_INFINITY),V=r.getNode(U);H!==Number.POSITIVE_INFINITY&&V.data.borderType!==h&&(l[U]=Math.max(l[U],H))};return p(S,u.getPredecessors.bind(u)),p(N,u.getSuccessors.bind(u)),(o=Object.values(n))===null||o===void 0||o.forEach(U=>{l[U]=l[t[U]]}),l},JR=(r,e,t,n,i,a)=>{const s=new di,o=qR(n,i,a);return e==null||e.forEach(l=>{let u;l==null||l.forEach(h=>{const p=t[h];if(s.hasNode(p)||s.addNode({id:p,data:{}}),u){const S=t[u],N=s.getRelatedEdges(S,"out").find(U=>U.target===p);N?s.updateEdgeData(N.id,Object.assign(Object.assign({},N.data),{weight:Math.max(o(r,h,u),N.data.weight||0)})):s.addEdge({id:`e${Math.random()}`,source:S,target:p,data:{weight:Math.max(o(r,h,u),0)}})}u=h})}),s},xE=(r,e)=>e0(Object.values(e),t=>{var n;let i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return(n=Object.keys(t))===null||n===void 0||n.forEach(s=>{const o=t[s],l=$R(r,s)/2;i=Math.max(o+l,i),a=Math.min(o-l,a)}),i-a});function bE(r,e){const t=Object.values(e),n=Math.min(...t),i=Math.max(...t);["u","d"].forEach(a=>{["l","r"].forEach(s=>{const o=a+s,l=r[o];let u;if(l===e)return;const h=Object.values(l);u=s==="l"?n-Math.min(...h):i-Math.max(...h),u&&(r[o]={},Object.keys(l).forEach(p=>{r[o][p]=l[p]+u}))})})}const wE=(r,e)=>{const t={};return Object.keys(r.ul).forEach(n=>{if(e)t[n]=r[e.toLowerCase()][n];else{const i=Object.values(r).map(a=>a[n]);t[n]=(i[0]+i[1])/2}}),t},RU=(r,e)=>{const{align:t,nodesep:n=0,edgesep:i=0}=e||{},a=buildLayerMatrix(r),s=Object.assign(pE(r,a),mE(r,a)),o={};let l;["u","d"].forEach(h=>{l=h==="u"?a:Object.values(a).reverse(),["l","r"].forEach(p=>{p==="r"&&(l=l.map(H=>Object.values(H).reverse()));const S=(h==="u"?r.getPredecessors:r.getSuccessors).bind(r),N=_E(r,l,s,S),U=EE(r,l,N.root,N.align,n,i,p==="r");p==="r"&&Object.keys(U).forEach(H=>{U[H]=-U[H]}),o[h+p]=U})});const u=xE(r,o);return bE(o,u),wE(o,t)},qR=(r,e,t)=>(n,i,a)=>{const s=n.getNode(i),o=n.getNode(a);let l=0,u=0;if(l+=s.data.width/2,s.data.hasOwnProperty("labelpos"))switch((s.data.labelpos||"").toLowerCase()){case"l":u=-s.data.width/2;break;case"r":u=s.data.width/2;break}if(u&&(l+=t?u:-u),u=0,l+=(s.data.dummy?e:r)/2,l+=(o.data.dummy?e:r)/2,l+=o.data.width/2,o.data.labelpos)switch((o.data.labelpos||"").toLowerCase()){case"l":u=o.data.width/2;break;case"r":u=-o.data.width/2;break}return u&&(l+=t?u:-u),u=0,l},$R=(r,e)=>r.getNode(e).data.width||0,e3=(r,e)=>{const{ranksep:t=0}=e||{},n=hc(r);let i=0;n==null||n.forEach(a=>{const s=a.map(l=>r.getNode(l).data.height),o=Math.max(...s,0);a==null||a.forEach(l=>{r.getNode(l).data.y=i+o/2}),i+=o+t})},t3=(r,e)=>{const{align:t,nodesep:n=0,edgesep:i=0}=e||{},a=hc(r),s=Object.assign(pE(r,a),mE(r,a)),o={};let l=[];["u","d"].forEach(h=>{l=h==="u"?a:Object.values(a).reverse(),["l","r"].forEach(p=>{p==="r"&&(l=l.map(H=>Object.values(H).reverse()));const S=(h==="u"?r.getPredecessors:r.getSuccessors).bind(r),N=_E(r,l,s,S),U=EE(r,l,N.root,N.align,n,i,p==="r");p==="r"&&Object.keys(U).forEach(H=>U[H]=-U[H]),o[h+p]=U})});const u=xE(r,o);return u&&bE(o,u),wE(o,t)},n3=(r,e)=>{var t;const n=q1(r);e3(n,e);const i=t3(n,e);(t=Object.keys(i))===null||t===void 0||t.forEach(a=>{n.getNode(a).data.x=i[a]})},ME=r=>{const e={},t=n=>{var i;const a=r.getNode(n);if(!a)return 0;if(e[n])return a.data.rank;e[n]=!0;let s;return(i=r.getRelatedEdges(n,"out"))===null||i===void 0||i.forEach(o=>{const l=t(o.target),u=o.data.minlen,h=l-u;h&&(s===void 0||hr.getRelatedEdges(n.id,"in").length===0).forEach(n=>t(n.id))},r3=r=>{const e={};let t;const n=s=>{var o;const l=r.getNode(s);if(!l)return 0;if(e[s])return l.data.rank;e[s]=!0;let u;return(o=r.getRelatedEdges(s,"out"))===null||o===void 0||o.forEach(h=>{const p=n(h.target),S=h.data.minlen,N=p-S;N&&(u===void 0||Nr.getRelatedEdges(s.id,"in").length===0).forEach(s=>{s&&n(s.id)}),t===void 0&&(t=0);const i={},a=(s,o)=>{var l;const u=r.getNode(s),h=isNaN(u.data.layer)?o:u.data.layer;(u.data.rank===void 0||u.data.rank{a(p.target,h+p.data.minlen)}))};r.getAllNodes().forEach(s=>{const o=s.data;o&&(isNaN(o.layer)?o.rank-=t:a(s.id,o.layer))})},Lo=(r,e)=>r.getNode(e.target).data.rank-r.getNode(e.source).data.rank-e.data.minlen,i3=r=>{const e=new di({tree:[]}),t=r.getAllNodes()[0],n=r.getAllNodes().length;e.addNode(t);let i,a;for(;a3(e,r){const t=n=>{e.getRelatedEdges(n,"both").forEach(i=>{const a=i.source,s=n===a?i.target:a;!r.hasNode(s)&&!Lo(e,i)&&(r.addNode({id:s,data:{}}),r.addEdge({id:i.id,source:n,target:s,data:{}}),t(s))})};return r.getAllNodes().forEach(n=>t(n.id)),r.getAllNodes().length},s3=r=>{const e=new di({tree:[]}),t=r.getAllNodes()[0],n=r.getAllNodes().length;e.addNode(t);let i,a;for(;o3(e,r){const t=n=>{var i;(i=e.getRelatedEdges(n,"both"))===null||i===void 0||i.forEach(a=>{const s=a.source,o=n===s?a.target:s;!r.hasNode(o)&&(e.getNode(o).data.layer!==void 0||!Lo(e,a))&&(r.addNode({id:o,data:{}}),r.addEdge({id:a.id,source:n,target:o,data:{}}),t(o))})};return r.getAllNodes().forEach(n=>t(n.id)),r.getAllNodes().length},AE=(r,e)=>e0(e.getAllEdges(),t=>r.hasNode(t.source)!==r.hasNode(t.target)?Lo(e,t):1/0),TE=(r,e,t)=>{r.getAllNodes().forEach(n=>{const i=e.getNode(n.id);i.data.rank||(i.data.rank=0),i.data.rank+=t})},l3=r=>{const e=vR(r);ME(e);const t=i3(e);SE(t),PE(t,e);let n,i;for(;n=h3(t);)i=f3(t,e,n),d3(t,e,n,i)},PE=(r,e)=>{let t=iE(r,r.getAllNodes(),"post",!1);t=t.slice(0,(t==null?void 0:t.length)-1),t.forEach(n=>{u3(r,e,n)})},u3=(r,e,t)=>{const i=r.getNode(t).data.parent,a=r.getRelatedEdges(t,"both").find(s=>s.target===i||s.source===i);a.data.cutvalue=c3(r,e,t)},c3=(r,e,t)=>{const i=r.getNode(t).data.parent;let a=!0,s=e.getRelatedEdges(t,"out").find(l=>l.target===i),o=0;return s||(a=!1,s=e.getRelatedEdges(i,"out").find(l=>l.target===t)),o=s.data.weight,e.getRelatedEdges(t,"both").forEach(l=>{const u=l.source===t,h=u?l.target:l.source;if(h!==i){const p=u===a,S=l.data.weight;if(o+=p?S:-S,g3(r,t,h)){const N=r.getRelatedEdges(t,"both").find(U=>U.source===h||U.target===h).data.cutvalue;o+=p?-N:N}}}),o},SE=(r,e=r.getAllNodes()[0].id)=>{OE(r,{},1,e)},OE=(r,e,t,n,i)=>{var a;const s=t;let o=t;const l=r.getNode(n);return e[n]=!0,(a=r.getNeighbors(n))===null||a===void 0||a.forEach(u=>{e[u.id]||(o=OE(r,e,o,u.id,n))}),l.data.low=s,l.data.lim=o++,i?l.data.parent=i:delete l.data.parent,o},h3=r=>r.getAllEdges().find(e=>e.data.cutvalue<0),f3=(r,e,t)=>{let n=t.source,i=t.target;e.getRelatedEdges(n,"out").find(h=>h.target===i)||(n=t.target,i=t.source);const a=r.getNode(n),s=r.getNode(i);let o=a,l=!1;a.data.lim>s.data.lim&&(o=s,l=!0);const u=e.getAllEdges().filter(h=>l===DE(r.getNode(h.source),o)&&l!==DE(r.getNode(h.target),o));return e0(u,h=>Lo(e,h))},d3=(r,e,t,n)=>{const i=r.getRelatedEdges(t.source,"both").find(a=>a.source===t.target||a.target===t.target);i&&r.removeEdge(i.id),r.addEdge({id:`e${Math.random()}`,source:n.source,target:n.target,data:{}}),SE(r),PE(r,e),v3(r,e)},v3=(r,e)=>{const t=r.getAllNodes().find(i=>!i.data.parent);let n=iE(r,t,"pre",!1);n=n.slice(1),n.forEach(i=>{const a=r.getNode(i).data.parent;let s=e.getRelatedEdges(i,"out").find(l=>l.target===a),o=!1;!s&&e.hasNode(a)&&(s=e.getRelatedEdges(a,"out").find(l=>l.target===i),o=!0),e.getNode(i).data.rank=(e.hasNode(a)&&e.getNode(a).data.rank||0)+(o?s==null?void 0:s.data.minlen:-(s==null?void 0:s.data.minlen))})},g3=(r,e,t)=>r.getRelatedEdges(e,"both").find(n=>n.source===t||n.target===t),DE=(r,e)=>e.data.low<=r.data.lim&&r.data.lim<=e.data.lim,p3=(r,e)=>{switch(e){case"network-simplex":y3(r);break;case"tight-tree":CE(r);break;case"longest-path":m3(r);break;default:CE(r)}},m3=ME,CE=r=>{r3(r),s3(r)},y3=r=>{l3(r)},_3=(r,e)=>{const{edgeLabelSpace:t,keepNodeOrder:n,prevGraph:i,rankdir:a,ranksep:s}=e;!n&&i&&x3(r,i);const o=P3(r);t&&(e.ranksep=S3(o,{rankdir:a,ranksep:s}));let l;try{l=E3(o,e)}catch(u){if(u.message==="Not possible to find intersection inside of the rectangle"){console.error(`The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure: `,u);return}throw u}return b3(r,o),l},E3=(r,e)=>{const{acyclicer:t,ranker:n,rankdir:i="tb",nodeOrder:a,keepNodeOrder:s,align:o,nodesep:l=50,edgesep:u=20,ranksep:h=50}=e;k3(r),cR(r,t);const{nestingRoot:p,nodeRankFactor:S}=wR(r);p3(q1(r),n),O3(r),pR(r,S),TR(r,p),gR(r),D3(r),C3(r);const N=[];SR(r,N),XR(r,N),yR(r),s&&VR(r,a),jR(r,s),F3(r),_R(r,i),n3(r,{align:o,nodesep:l,edgesep:u,ranksep:h}),z3(r),B3(r),DR(r,N),I3(r),ER(r,i);const{width:U,height:H}=L3(r);return R3(r),N3(r),fR(r),{width:U,height:H}},x3=(r,e)=>{r.getAllNodes().forEach(t=>{const n=r.getNode(t.id);if(e.hasNode(t.id)){const i=e.getNode(t.id);n.data.fixorder=i.data._order,delete i.data._order}else delete n.data.fixorder})},b3=(r,e)=>{r.getAllNodes().forEach(t=>{var n;const i=r.getNode(t.id);if(i){const a=e.getNode(t.id);i.data.x=a.data.x,i.data.y=a.data.y,i.data._order=a.data.order,i.data._rank=a.data.rank,!((n=e.getChildren(t.id))===null||n===void 0)&&n.length&&(i.data.width=a.data.width,i.data.height=a.data.height)}}),r.getAllEdges().forEach(t=>{const n=r.getEdge(t.id),i=e.getEdge(t.id);n.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(n.data.x=i.data.x,n.data.y=i.data.y)})},w3=["width","height","layer","fixorder"],M3={width:0,height:0},A3=["minlen","weight","width","height","labeloffset"],T3={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},i0=["labelpos"],P3=r=>{const e=new di({tree:[]});return r.getAllNodes().forEach(t=>{const n=RE(r.getNode(t.id).data),i=Object.assign(Object.assign({},M3),n),a=LE(i,w3);e.hasNode(t.id)||e.addNode({id:t.id,data:Object.assign({},a)});const s=r.hasTreeStructure("combo")?r.getParent(t.id,"combo"):r.getParent(t.id);Pn(s)||(e.hasNode(s.id)||e.addNode(Object.assign({},s)),e.setParent(t.id,s.id))}),r.getAllEdges().forEach(t=>{const n=RE(r.getEdge(t.id).data),i={};i0==null||i0.forEach(a=>{n[a]!==void 0&&(i[a]=n[a])}),e.addEdge({id:t.id,source:t.source,target:t.target,data:Object.assign({},T3,LE(n,A3),i)})}),e},S3=(r,e)=>{const{ranksep:t=0,rankdir:n}=e;return r.getAllNodes().forEach(i=>{isNaN(i.data.layer)||i.data.layer||(i.data.layer=0)}),r.getAllEdges().forEach(i=>{var a;i.data.minlen*=2,((a=i.data.labelpos)===null||a===void 0?void 0:a.toLowerCase())!=="c"&&(n==="TB"||n==="BT"?i.data.width+=i.data.labeloffset:i.data.height+=i.data.labeloffset)}),t/2},O3=r=>{r.getAllEdges().forEach(e=>{if(e.data.width&&e.data.height){const t=r.getNode(e.source),n=r.getNode(e.target),i={e,rank:(n.data.rank-t.data.rank)/2+t.data.rank};tu(r,"edge-proxy",i,"_ep")}})},D3=r=>{let e=0;return r.getAllNodes().forEach(t=>{var n,i;t.data.borderTop&&(t.data.minRank=(n=r.getNode(t.data.borderTop))===null||n===void 0?void 0:n.data.rank,t.data.maxRank=(i=r.getNode(t.data.borderBottom))===null||i===void 0?void 0:i.data.rank,e=Math.max(e,t.data.maxRank||-1/0))}),e},C3=r=>{r.getAllNodes().forEach(e=>{e.data.dummy==="edge-proxy"&&(r.getEdge(e.data.e.id).data.labelRank=e.data.rank,r.removeNode(e.id))})},L3=(r,e)=>{let t,n=0,i,a=0;const{marginx:s=0,marginy:o=0}=e||{},l=u=>{if(!u.data)return;const h=u.data.x,p=u.data.y,S=u.data.width,N=u.data.height;!isNaN(h)&&!isNaN(S)&&(t===void 0&&(t=h-S/2),t=Math.min(t,h-S/2),n=Math.max(n,h+S/2)),!isNaN(p)&&!isNaN(N)&&(i===void 0&&(i=p-N/2),i=Math.min(i,p-N/2),a=Math.max(a,p+N/2))};return r.getAllNodes().forEach(u=>{l(u)}),r.getAllEdges().forEach(u=>{u!=null&&u.data.hasOwnProperty("x")&&l(u)}),t-=s,i-=o,r.getAllNodes().forEach(u=>{u.data.x-=t,u.data.y-=i}),r.getAllEdges().forEach(u=>{var h;(h=u.data.points)===null||h===void 0||h.forEach(p=>{p.x-=t,p.y-=i}),u.data.hasOwnProperty("x")&&(u.data.x-=t),u.data.hasOwnProperty("y")&&(u.data.y-=i)}),{width:n-t+s,height:a-i+o}},R3=r=>{r.getAllEdges().forEach(e=>{const t=r.getNode(e.source),n=r.getNode(e.target);let i,a;e.data.points?(i=e.data.points[0],a=e.data.points[e.data.points.length-1]):(e.data.points=[],i={x:n.data.x,y:n.data.y},a={x:t.data.x,y:t.data.y}),e.data.points.unshift(eE(t.data,i)),e.data.points.push(eE(n.data,a))})},I3=r=>{r.getAllEdges().forEach(e=>{if(e.data.hasOwnProperty("x"))switch((e.data.labelpos==="l"||e.data.labelpos==="r")&&(e.data.width-=e.data.labeloffset),e.data.labelpos){case"l":e.data.x-=e.data.width/2+e.data.labeloffset;break;case"r":e.data.x+=e.data.width/2+e.data.labeloffset;break}})},N3=r=>{r.getAllEdges().forEach(e=>{var t;e.data.reversed&&((t=e.data.points)===null||t===void 0||t.reverse())})},B3=r=>{r.getAllNodes().forEach(e=>{var t,n,i;if(!((t=r.getChildren(e.id))===null||t===void 0)&&t.length){const a=r.getNode(e.id),s=r.getNode(a.data.borderTop),o=r.getNode(a.data.borderBottom),l=r.getNode(a.data.borderLeft[((n=a.data.borderLeft)===null||n===void 0?void 0:n.length)-1]),u=r.getNode(a.data.borderRight[((i=a.data.borderRight)===null||i===void 0?void 0:i.length)-1]);a.data.width=Math.abs((u==null?void 0:u.data.x)-(l==null?void 0:l.data.x))||10,a.data.height=Math.abs((o==null?void 0:o.data.y)-(s==null?void 0:s.data.y))||10,a.data.x=((l==null?void 0:l.data.x)||0)+a.data.width/2,a.data.y=((s==null?void 0:s.data.y)||0)+a.data.height/2}}),r.getAllNodes().forEach(e=>{e.data.dummy==="border"&&r.removeNode(e.id)})},k3=r=>{r.getAllEdges().forEach(e=>{if(e.source===e.target){const t=r.getNode(e.source);t.data.selfEdges||(t.data.selfEdges=[]),t.data.selfEdges.push(e),r.removeEdge(e.id)}})},F3=r=>{const e=hc(r);e==null||e.forEach(t=>{let n=0;t==null||t.forEach((i,a)=>{var s;const o=r.getNode(i);o.data.order=a+n,(s=o.data.selfEdges)===null||s===void 0||s.forEach(l=>{tu(r,"selfedge",{width:l.data.width,height:l.data.height,rank:o.data.rank,order:a+ ++n,e:l},"_se")}),delete o.data.selfEdges})})},z3=r=>{r.getAllNodes().forEach(e=>{const t=r.getNode(e.id);if(t.data.dummy==="selfedge"){const n=r.getNode(t.data.e.source),i=n.data.x+n.data.width/2,a=n.data.y,s=t.data.x-i,o=n.data.height/2;r.hasEdge(t.data.e.id)?r.updateEdgeData(t.data.e.id,t.data.e.data):r.addEdge({id:t.data.e.id,source:t.data.e.source,target:t.data.e.target,data:t.data.e.data}),r.removeNode(e.id),t.data.e.data.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{y:a,x:i+s},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],t.data.e.data.x=t.data.x,t.data.e.data.y=t.data.y}})},LE=(r,e)=>{const t={};return e==null||e.forEach(n=>{r[n]!==void 0&&(t[n]=+r[n])}),t},RE=(r={})=>{const e={};return Object.keys(r).forEach(t=>{e[t.toLowerCase()]=r[t]}),e};function fc(r){if(!r)return[0,0,0];if(un(r))return[r,r,r];if(r.length===0)return[0,0,0];const[e,t=e,n=e]=r;return[e,t,n]}function El(r,e){let t;return yn(e)?t=e:un(e)?t=()=>e:t=()=>r,t}function a0(r,e,t=!0){return!e&&e!==0?n=>{const{size:i}=n.data||{};return i?Array.isArray(i)?t?Math.max(...i)||r:i:li(i)&&i.width&&i.height?t?Math.max(i.width,i.height)||r:[i.width,i.height]:i:r}:yn(e)?e:un(e)?()=>e:Array.isArray(e)?()=>t?Math.max(...e)||r:e:li(e)&&e.width&&e.height?()=>t?Math.max(e.width,e.height)||r:[e.width,e.height]:()=>r}const s0=(r,e,t=10)=>{let n;const i=typeof e=="function"?e:()=>e||0;return r?Array.isArray(r)?n=s=>r:yn(r)?n=r:n=s=>r:n=s=>{var o,l,u;if(!((o=s.data)===null||o===void 0)&&o.bboxSize)return(l=s.data)===null||l===void 0?void 0:l.bboxSize;if(!((u=s.data)===null||u===void 0)&&u.size){const h=s.data.size;return Array.isArray(h)?h:li(h)?[h.width,h.height]:h}return t},s=>{const o=n(s),l=i(s);return Math.max(...fc(o))+l}},o0=r=>{if(r===null)return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof Array){const e=[];return r.forEach(t=>{e.push(t)}),e.map(t=>o0(t))}if(typeof r=="object"){const e={};return Object.keys(r).forEach(t=>{e[t]=o0(r[t])}),e}return r},Ia=(r,e)=>{const t=o0(r);return t.data=t.data||{},e&&(un(t.data.x)||(t.data.x=Math.random()*e[0]),un(t.data.y)||(t.data.y=Math.random()*e[1])),t},U3={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class W3{constructor(e={}){this.options=e,this.id="antv-dagre",this.options=Object.assign(Object.assign({},U3),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,e,t)})}genericDagreLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{nodeSize:a,align:s,rankdir:o="TB",ranksep:l,nodesep:u,ranksepFunc:h,nodesepFunc:p,edgeLabelSpace:S,ranker:N,nodeOrder:U,begin:H,controlPoints:V,radial:Y,sortByCombo:q,preset:ne}=i,le=new di({tree:[]}),ue=El(l||50,h),fe=El(u||50,p);let de=fe,ve=ue;(o==="LR"||o==="RL")&&(de=ue,ve=fe);const Te=a0(10,a,!1),Oe=t.getAllNodes(),Ie=t.getAllEdges();Oe.forEach(ct=>{const ft=fc(Te(ct)),At=ve(ct),Ft=de(ct),Vt=ft[0]+2*Ft,nn=ft[1]+2*At,hn=ct.data.layer;un(hn)?le.addNode({id:ct.id,data:{width:Vt,height:nn,layer:hn}}):le.addNode({id:ct.id,data:{width:Vt,height:nn}})}),q&&(le.attachTreeStructure("combo"),Oe.forEach(ct=>{const{parentId:ft}=ct.data;ft!==void 0&&le.hasNode(ft)&&le.setParent(ct.id,ft,"combo")})),Ie.forEach(ct=>{le.addEdge({id:ct.id,source:ct.source,target:ct.target,data:{weight:ct.data.weight||1}})});let ze;ne!=null&&ne.length&&(ze=new di({nodes:ne})),_3(le,{prevGraph:ze,edgeLabelSpace:S,keepNodeOrder:!!U,nodeOrder:U||[],acyclicer:"greedy",ranker:N,rankdir:o,nodesep:u,align:s});const Xe=[0,0];if(H){let ct=1/0,ft=1/0;le.getAllNodes().forEach(At=>{ct>At.data.x&&(ct=At.data.x),ft>At.data.y&&(ft=At.data.y)}),le.getAllEdges().forEach(At=>{var Ft;(Ft=At.data.points)===null||Ft===void 0||Ft.forEach(Vt=>{ct>Vt.x&&(ct=Vt.x),ft>Vt.y&&(ft=Vt.y)})}),Xe[0]=H[0]-ct,Xe[1]=H[1]-ft}const et=o==="LR"||o==="RL";if(!Y){const ct=new Set,At=o==="BT"||o==="RL"?(hn,rn)=>rn-hn:(hn,rn)=>hn-rn;le.getAllNodes().forEach(hn=>{hn.data.x=hn.data.x+Xe[0],hn.data.y=hn.data.y+Xe[1],ct.add(et?hn.data.x:hn.data.y)});const Ft=Array.from(ct).sort(At),Vt=et?(hn,rn)=>hn.x!==rn.x:(hn,rn)=>hn.y!==rn.y,nn=et?(hn,rn,bn)=>{const Dn=Math.max(rn.y,bn.y),kn=Math.min(rn.y,bn.y);return hn.filter($n=>$n.y<=Dn&&$n.y>=kn)}:(hn,rn,bn)=>{const Dn=Math.max(rn.x,bn.x),kn=Math.min(rn.x,bn.x);return hn.filter($n=>$n.x<=Dn&&$n.x>=kn)};le.getAllEdges().forEach((hn,rn)=>{var bn;S&&V&&hn.data.type!=="loop"&&(hn.data.controlPoints=H3((bn=hn.data.points)===null||bn===void 0?void 0:bn.map(({x:Dn,y:kn})=>({x:Dn+Xe[0],y:kn+Xe[1]})),le.getNode(hn.source),le.getNode(hn.target),Ft,et,Vt,nn))})}let st=[];st=le.getAllNodes().map(ct=>Ia(ct));const bt=le.getAllEdges();return e&&(st.forEach(ct=>{t.mergeNodeData(ct.id,{x:ct.data.x,y:ct.data.y})}),bt.forEach(ct=>{t.mergeEdgeData(ct.id,{controlPoints:ct.data.controlPoints})})),{nodes:st,edges:bt}})}}const H3=(r,e,t,n,i,a,s)=>{let o=(r==null?void 0:r.slice(1,r.length-1))||[];if(e&&t){let{x:l,y:u}=e.data,{x:h,y:p}=t.data;if(i&&(l=e.data.y,u=e.data.x,h=t.data.y,p=t.data.x),p!==u&&l!==h){const S=n.indexOf(u),N=n[S+1];if(N){const V=o[0],Y=i?{x:(u+N)/2,y:(V==null?void 0:V.y)||h}:{x:(V==null?void 0:V.x)||h,y:(u+N)/2};(!V||a(V,Y))&&o.unshift(Y)}const U=n.indexOf(p),H=Math.abs(U-S);if(H===1)o=s(o,e.data,t.data),o.length||o.push(i?{x:(u+p)/2,y:l}:{x:l,y:(u+p)/2});else if(H>1){const V=n[U-1];if(V){const Y=o[o.length-1],q=i?{x:(p+V)/2,y:(Y==null?void 0:Y.y)||h}:{x:(Y==null?void 0:Y.x)||l,y:(p+V)/2};(!Y||a(Y,q))&&o.push(q)}}}}return o},xl=(r,e,t)=>{const n=r.getAllNodes(),i=r.getAllEdges();if(!(n!=null&&n.length))return{nodes:[],edges:i};if(n.length===1)return e&&r.mergeNodeData(n[0].id,{x:t[0],y:t[1]}),{nodes:[Object.assign(Object.assign({},n[0]),{data:Object.assign(Object.assign({},n[0].data),{x:t[0],y:t[1]})})],edges:i}},G3={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class j3{constructor(e={}){this.options=e,this.id="circular",this.options=Object.assign(Object.assign({},G3),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,e,t)})}genericCircularLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:s,center:o,divisions:l,startAngle:u=0,endAngle:h=2*Math.PI,angleRatio:p,ordering:S,clockwise:N,nodeSpacing:U,nodeSize:H}=i,V=t.getAllNodes(),Y=t.getAllEdges(),[q,ne,le]=Z3(a,s,o),ue=V==null?void 0:V.length;if(!ue||ue===1)return xl(t,e,le);const fe=(h-u)/ue;let{radius:de,startRadius:ve,endRadius:Te}=i;if(U){const et=El(10,U),st=a0(10,H);let bt=-1/0;V.forEach(ct=>{const ft=st(ct);bt{ft===0?_t+=bt||10:_t+=(et(ct)||0)+(bt||10)}),de=_t/(2*Math.PI)}else!de&&!ve&&!Te?de=Math.min(ne,q)/2:!ve&&Te?ve=Te:ve&&!Te&&(Te=ve);const Oe=fe*p;let Ie=[];S==="topology"?Ie=IE(t,V):S==="topology-directed"?Ie=IE(t,V,!0):S==="degree"?Ie=V3(t,V):Ie=V.map(et=>Ia(et));const ze=Math.ceil(ue/l);for(let et=0;et{t.mergeNodeData(et.id,{x:et.data.x,y:et.data.y})}),{nodes:Ie,edges:Y}})}}const IE=(r,e,t=!1)=>{const n=[Ia(e[0])],i={},a=e.length;i[e[0].id]=!0;let s=0;return e.forEach((o,l)=>{if(l!==0)if((l===a-1||r.getDegree(o.id,"both")!==r.getDegree(e[l+1].id,"both")||r.areNeighbors(n[s].id,o.id))&&!i[o.id])n.push(Ia(o)),i[o.id]=!0,s++;else{const u=t?r.getSuccessors(n[s].id):r.getNeighbors(n[s].id);let h=!1;for(let S=0;S{t.push(Ia(n))}),t.sort((n,i)=>r.getDegree(n.id,"both")-r.getDegree(i.id,"both")),t}const Z3=(r,e,t)=>{let n=r,i=e,a=t;return!n&&typeof window!="undefined"&&(n=window.innerWidth),!i&&typeof window!="undefined"&&(i=window.innerHeight),a||(a=[n/2,i/2]),[n,i,a]},no=Array.isArray,K3={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class l0{constructor(e={}){this.options=e,this.id="concentric",this.options=Object.assign(Object.assign({},K3),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,e,t)})}genericConcentricLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:s,height:o,sortBy:l,maxLevelDiff:u,sweep:h,clockwise:p,equidistant:S,preventOverlap:N,startAngle:U=3/2*Math.PI,nodeSize:H,nodeSpacing:V}=i,Y=t.getAllNodes(),q=t.getAllEdges(),ne=!s&&typeof window!="undefined"?window.innerWidth:s,le=!o&&typeof window!="undefined"?window.innerHeight:o,ue=a||[ne/2,le/2];if(!(Y!=null&&Y.length)||Y.length===1)return xl(t,e,ue);const fe=[];let de,ve=0;no(H)?de=Math.max(H[0],H[1]):yn(H)?(de=-1/0,Y.forEach(ct=>{const ft=Math.max(...fc(H(ct)));ft>de&&(de=ft)})):de=H,no(V)?ve=Math.max(V[0],V[1]):un(V)&&(ve=V),Y.forEach(ct=>{const ft=Ia(ct);fe.push(ft);let At=de;const{data:Ft}=ft;no(Ft.size)?At=Math.max(Ft.size[0],Ft.size[1]):un(Ft.size)?At=Ft.size:li(Ft.size)&&(At=Math.max(Ft.size.width,Ft.size.height)),de=Math.max(de,At),yn(V)&&(ve=Math.max(V(ct),ve))});const Te={};fe.forEach((ct,ft)=>{Te[ct.id]=ft});let Oe=l;(!ur(Oe)||fe[0].data[Oe]===void 0)&&(Oe="degree"),Oe==="degree"?fe.sort((ct,ft)=>t.getDegree(ft.id,"both")-t.getDegree(ct.id,"both")):fe.sort((ct,ft)=>ft.data[Oe]-ct.data[Oe]);const Ie=fe[0],ze=(u||(Oe==="degree"?t.getDegree(Ie.id,"both"):Ie.data[Oe]))/4,Xe=[{nodes:[]}];let et=Xe[0];fe.forEach(ct=>{if(et.nodes.length>0){const ft=Math.abs(Oe==="degree"?t.getDegree(et.nodes[0].id,"both")-t.getDegree(ct.id,"both"):et.nodes[0].data[Oe]-ct.data[Oe]);ze&&ft>=ze&&(et={nodes:[]},Xe.push(et))}et.nodes.push(ct)});let st=de+ve;if(!N){const ct=Xe.length>0&&Xe[0].nodes.length>1,At=(Math.min(ne,le)/2-st)/(Xe.length+(ct?1:0));st=Math.min(st,At)}let bt=0;if(Xe.forEach(ct=>{const ft=h===void 0?2*Math.PI-2*Math.PI/ct.nodes.length:h;if(ct.dTheta=ft/Math.max(1,ct.nodes.length-1),ct.nodes.length>1&&N){const At=Math.cos(ct.dTheta)-Math.cos(0),Ft=Math.sin(ct.dTheta)-Math.sin(0),Vt=Math.sqrt(st*st/(At*At+Ft*Ft));bt=Math.max(Vt,bt)}ct.r=bt,bt+=st}),S){let ct=0,ft=0;for(let At=0;At{Ft===0&&(ft=At.r||0),At.r=ft,ft+=ct})}return Xe.forEach(ct=>{const ft=ct.dTheta||0,At=ct.r||0;ct.nodes.forEach((Ft,Vt)=>{const nn=U+(p?1:-1)*ft*Vt;Ft.data.x=ue[0]+At*Math.cos(nn),Ft.data.y=ue[1]+At*Math.sin(nn)})}),e&&fe.forEach(ct=>t.mergeNodeData(ct.id,{x:ct.data.x,y:ct.data.y})),{nodes:fe,edges:q}})}}var u0=X(14301),X3=X(7695);const Y3=.81,c0=.1;function Q3(r,e,t,n,i=2){const a=e/t,s=r.getAllNodes(),o=s.map((h,p)=>{const{nodeStrength:S,x:N,y:U,z:H,size:V}=h.data;return{x:N,y:U,z:H,size:V,index:p,id:h.id,vx:0,vy:0,vz:0,weight:a*S}}),l=(i===2?(0,u0.Z)(o,h=>h.x,h=>h.y):(0,X3.Z)(o,h=>h.x,h=>h.y,h=>h.z)).visitAfter(J3),u=new Map;return o.forEach(h=>{u.set(h.id,h),$3(h,l,i)}),o.map((h,p)=>{const{id:S,data:N}=s[p],{mass:U=1}=N;n[S]={x:h.vx/U,y:h.vy/U,z:h.vz/U}}),n}function J3(r){let e=0,t=0,n=0,i=0,a=0;const s=r.length;if(s){for(let o=0;o{var o;if(((o=r.data)===null||o===void 0?void 0:o.id)===a.id)return;const l=[t,n,i][s-1],u=a.x-r.x||c0,h=a.y-r.y||c0,p=a.z-r.z||c0,S=[u,h,p],N=l-e;let U=0;for(let Y=0;Yq3(n,i,a,s,o,r,t))}const eI={dimensions:2,maxIteration:500,gravity:10,factor:1,edgeStrength:50,nodeStrength:1e3,coulombDisScale:.005,damping:.9,maxSpeed:200,minMovement:.4,interval:.02,linkDistance:200,clusterNodeStrength:20,preventOverlap:!0,distanceThresholdMode:"mean"};class NE{constructor(e={}){this.options=e,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},eI),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericForceLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericForceLayout(!0,e,t)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(e=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;(this.judgingDistance>this.lastOptions.minMovement||n<1)&&nthis.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),t}genericForceLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),a=t.getAllNodes(),s=t.getAllEdges(),o=this.formatOptions(i,t),{dimensions:l,width:u,height:h,nodeSize:p,getMass:S,nodeStrength:N,edgeStrength:U,linkDistance:H}=o,V=a.map((ve,Te)=>Object.assign(Object.assign({},ve),{data:Object.assign(Object.assign({},ve.data),{x:un(ve.data.x)?ve.data.x:Math.random()*u,y:un(ve.data.y)?ve.data.y:Math.random()*h,z:un(ve.data.z)?ve.data.z:Math.random()*Math.sqrt(u*h),size:p(ve)||30,mass:S(ve),nodeStrength:N(ve)})})),Y=s.map(ve=>Object.assign(Object.assign({},ve),{data:Object.assign(Object.assign({},ve.data),{edgeStrength:U(ve),linkDistance:H(ve,t.getNode(ve.source),t.getNode(ve.target))})}));if(!(a!=null&&a.length))return this.lastResult={nodes:[],edges:s},{nodes:[],edges:s};const q={};a.forEach((ve,Te)=>{q[ve.id]={x:0,y:0,z:0}});const ne=new di({nodes:V,edges:Y});this.formatCentripetal(o,ne);const{maxIteration:le,minMovement:ue,onTick:fe}=o;if(this.lastLayoutNodes=V,this.lastLayoutEdges=Y,this.lastAssign=e,this.lastGraph=t,this.lastCalcGraph=ne,this.lastOptions=o,this.lastVelMap=q,typeof window=="undefined")return;let de=0;return new Promise(ve=>{this.timeInterval=window.setInterval(()=>{(!a||!this.running)&&ve({nodes:h0(t,V),edges:s}),this.runOneStep(ne,t,de,q,o),this.updatePosition(t,ne,q,o),e&&V.forEach(Te=>t.mergeNodeData(Te.id,{x:Te.data.x,y:Te.data.y,z:l===3?Te.data.z:void 0})),fe==null||fe({nodes:h0(t,V),edges:s}),de++,(de>=le||this.judgingDistance{let u=1;un(l==null?void 0:l.data.mass)&&(u=l==null?void 0:l.data.mass);const h=t.getDegree(l.id,"both");return!h||h<5?u:h*5*u}),n.nodeSize=s0(e.nodeSize,e.nodeSpacing);const o=e.linkDistance?El(1,e.linkDistance):l=>1+n.nodeSize(t.getNode(l.source))+n.nodeSize(t.getNode(l.target));return n.linkDistance=o,n.nodeStrength=El(1,e.nodeStrength),n.edgeStrength=El(1,e.edgeStrength),n}formatCentripetal(e,t){const{dimensions:n,centripetalOptions:i,center:a,clusterNodeStrength:s,leafCluster:o,clustering:l,nodeClusterBy:u}=e,h=t.getAllNodes(),p=i||{leaf:2,single:2,others:1,center:Y=>({x:a[0],y:a[1],z:n===3?a[2]:void 0})};typeof s!="function"&&(e.clusterNodeStrength=Y=>s);let S,N;if(o&&u&&(S=BE(t,u),N=Array.from(new Set(h==null?void 0:h.map(Y=>Y.data[u])))||[],e.centripetalOptions=Object.assign(p,{single:100,leaf:Y=>{const{siblingLeaves:q,sameTypeLeaves:ne}=S[Y.id]||{};return(ne==null?void 0:ne.length)===(q==null?void 0:q.length)||(N==null?void 0:N.length)===1?1:e.clusterNodeStrength(Y)},others:1,center:Y=>{const q=t.getDegree(Y.id,"both");if(!q)return{x:100,y:100,z:0};let ne;if(q===1){const{sameTypeLeaves:le=[]}=S[Y.id]||{};le.length===1?ne=void 0:le.length>1&&(ne=kE(le))}else ne=void 0;return{x:ne==null?void 0:ne.x,y:ne==null?void 0:ne.y,z:ne==null?void 0:ne.z}}})),l&&u){S||(S=BE(t,u)),N||(N=Array.from(new Set(h.map(q=>q.data[u])))),N=N.filter(q=>q!==void 0);const Y={};N.forEach(q=>{const ne=h.filter(le=>le.data[u]===q).map(le=>t.getNode(le.id));Y[q]=kE(ne)}),e.centripetalOptions=Object.assign(p,{single:q=>e.clusterNodeStrength(q),leaf:q=>e.clusterNodeStrength(q),others:q=>e.clusterNodeStrength(q),center:q=>{const ne=Y[q.data[u]];return{x:ne==null?void 0:ne.x,y:ne==null?void 0:ne.y,z:ne==null?void 0:ne.z}}})}const{leaf:U,single:H,others:V}=e.centripetalOptions||{};U&&typeof U!="function"&&(e.centripetalOptions.leaf=()=>U),H&&typeof H!="function"&&(e.centripetalOptions.single=()=>H),V&&typeof V!="function"&&(e.centripetalOptions.others=()=>V)}runOneStep(e,t,n,i,a){const s={},o=e.getAllNodes(),l=e.getAllEdges();if(!(o!=null&&o.length))return;const{monitor:u}=a;if(this.calRepulsive(e,s,a),l&&this.calAttractive(e,s,a),this.calGravity(e,t,s,a),this.updateVelocity(e,s,i,a),u){const h=this.calTotalEnergy(s,o);u({energy:h,nodes:t.getAllNodes(),edges:t.getAllEdges(),iterations:n})}}calTotalEnergy(e,t){if(!(t!=null&&t.length))return 0;let n=0;return t.forEach((i,a)=>{const s=e[i.id].x,o=e[i.id].y,l=this.options.dimensions===3?e[i.id].z:0,u=s*s+o*o+l*l,{mass:h=1}=i.data;n+=h*u*.5}),n}calRepulsive(e,t,n){const{dimensions:i,factor:a,coulombDisScale:s}=n;Q3(e,a,s*s,t,i)}calAttractive(e,t,n){const{dimensions:i,nodeSize:a}=n;e.getAllEdges().forEach((s,o)=>{const{source:l,target:u}=s,h=e.getNode(l),p=e.getNode(u);if(!h||!p)return;let S=p.data.x-h.data.x,N=p.data.y-h.data.y,U=i===3?p.data.z-h.data.z:0;!S&&!N&&(S=Math.random()*.01,N=Math.random()*.01,i===3&&!U&&(U=Math.random()*.01));const H=Math.sqrt(S*S+N*N+U*U);if(H{const{id:H,data:V}=U,{mass:Y,x:q,y:ne,z:le}=V,ue=t.getNode(H);let fe=0,de=0,ve=0,Te=S;const Oe=e.getDegree(H,"in"),Ie=e.getDegree(H,"out"),ze=e.getDegree(H,"both"),Xe=a==null?void 0:a(ue,ze);if(Xe){const[et,st,bt]=Xe;fe=q-et,de=ne-st,Te=bt}else fe=q-p[0],de=ne-p[1],ve=le-p[2];if(Te&&(n[H].x-=Te*fe/Y,n[H].y-=Te*de/Y,n[H].z-=Te*ve/Y),N){const{leaf:et,single:st,others:bt,center:_t}=N,{x:ct,y:ft,z:At,centerStrength:Ft}=(_t==null?void 0:_t(ue,o,l,u,h))||{x:0,y:0,z:0,centerStrength:0};if(!un(ct)||!un(ft))return;const Vt=(q-ct)/Y,nn=(ne-ft)/Y,hn=(le-At)/Y;if(Ft&&(n[H].x-=Ft*Vt,n[H].y-=Ft*nn,n[H].z-=Ft*hn),ze===0){const bn=st(ue);if(!bn)return;n[H].x-=bn*Vt,n[H].y-=bn*nn,n[H].z-=bn*hn;return}if(Oe===0||Ie===0){const bn=et(ue,o,l);if(!bn)return;n[H].x-=bn*Vt,n[H].y-=bn*nn,n[H].z-=bn*hn;return}const rn=bt(ue);if(!rn)return;n[H].x-=rn*Vt,n[H].y-=rn*nn,n[H].z-=rn*hn}})}updateVelocity(e,t,n,i){const{damping:a,maxSpeed:s,interval:o,dimensions:l}=i,u=e.getAllNodes();u!=null&&u.length&&u.forEach(h=>{const{id:p}=h;let S=(n[p].x+t[p].x*o)*a||.01,N=(n[p].y+t[p].y*o)*a||.01,U=l===3?(n[p].z+t[p].z*o)*a||.01:0;const H=Math.sqrt(S*S+N*N+U*U);if(H>s){const V=s/H;S=V*S,N=V*N,U=V*U}n[p]={x:S,y:N,z:U}})}updatePosition(e,t,n,i){const{distanceThresholdMode:a,interval:s,dimensions:o}=i,l=t.getAllNodes();if(!(l!=null&&l.length)){this.judgingDistance=0;return}let u=0;a==="max"?this.judgingDistance=-1/0:a==="min"&&(this.judgingDistance=1/0),l.forEach(h=>{const{id:p}=h,S=e.getNode(p);if(un(S.data.fx)&&un(S.data.fy)){t.mergeNodeData(p,{x:S.data.fx,y:S.data.fy,z:o===3?S.data.fz:void 0});return}const N=n[p].x*s,U=n[p].y*s,H=o===3?n[p].z*s:0;t.mergeNodeData(p,{x:h.data.x+N,y:h.data.y+U,z:h.data.z+H});const V=Math.sqrt(N*N+U*U+H*H);switch(a){case"max":this.judgingDistanceV&&(this.judgingDistance=V);break;default:u=u+V;break}}),(!a||a==="mean")&&(this.judgingDistance=u/l.length)}}const BE=(r,e)=>{const t=r.getAllNodes();if(!(t!=null&&t.length))return{};const n={};return t.forEach((i,a)=>{r.getDegree(i.id,"both")===1&&(n[i.id]=tI(r,"leaf",i,e))}),n},tI=(r,e,t,n)=>{const i=r.getDegree(t.id,"in"),a=r.getDegree(t.id,"out");let s=t,o=[];i===0?(s=r.getSuccessors(t.id)[0],o=r.getNeighbors(s.id)):a===0&&(s=r.getPredecessors(t.id)[0],o=r.getNeighbors(s.id)),o=o.filter(u=>r.getDegree(u.id,"in")===0||r.getDegree(u.id,"out")===0);const l=nI(r,e,n,t,o);return{coreNode:s,siblingLeaves:o,sameTypeLeaves:l}},nI=(r,e,t,n,i)=>{const a=n.data[t]||"";let s=(i==null?void 0:i.filter(o=>o.data[t]===a))||[];return e==="leaf"&&(s=s.filter(o=>r.getDegree(o.id,"in")===0||r.getDegree(o.id,"out")===0)),s},kE=r=>{const e={x:0,y:0};r.forEach(n=>{const{x:i,y:a}=n.data;e.x+=i||0,e.y+=a||0});const t=r.length||1;return{x:e.x/t,y:e.y/t}},h0=(r,e)=>e.map(t=>{const{id:n,data:i}=t,a=r.getNode(n);return Object.assign(Object.assign({},a),{data:Object.assign(Object.assign({},a.data),{x:i.x,y:i.y,z:i.z})})});var er=X(81254);const IU=er.XA,NU=er.a_,BU=er.yQ,kU=er.Hs,FU=er.Ec,zU=er.dx,UU=er.LU,WU=er.Rm,Ro=er.y3,HU=er.qK,GU=er.pb,jU=er.j,VU=er.sO,ZU=er.BZ,KU=er.EK,XU=er.Db,YU=er.Fx,QU=er.tU,JU=er.Ym,qU=er.rs,$U=er.QR,e9=er.TB,t9=er.oH,FE=er.Sc,n9=er.BN,r9=er.it,i9=er.$r,a9=er.QM,s9=er.AV;var o9=(er.y3,er.y3);const l9=er.GH,u9=er.SO,c9=er.uZ,h9=er.yU,f9=er.F1,d9=er.re,zE=r=>{const e=[],t=r.length;for(let n=0;ne[i][n]+e[n][a]&&(e[i][a]=e[i][n]+e[n][a]);return e},UE=(r,e)=>{const{nodes:t,edges:n}=r,i=[],a={};if(!t)throw new Error("invalid nodes data!");return t&&t.forEach((s,o)=>{a[s.id]=o;const l=[];i.push(l)}),n==null||n.forEach(s=>{const{source:o,target:l}=s,u=a[o],h=a[l];u===void 0||h===void 0||(i[u][h]=1,e||(i[h][u]=1))}),i},rI=(r,e)=>{const t=[];return r.forEach(n=>{const i=[];n.forEach(a=>{i.push(a*e)}),t.push(i)}),t},iI=r=>{let e=1/0,t=1/0,n=-1/0,i=-1/0;return r.forEach(a=>{let s=a.data.size;no(s)?s.length===1&&(s=[s[0],s[0]]):un(s)?s=[s,s]:(s===void 0||isNaN(s))&&(s=[30,30]);const o=[s[0]/2,s[1]/2],l=a.data.x-o[0],u=a.data.x+o[0],h=a.data.y-o[1],p=a.data.y+o[1];e>l&&(e=l),t>h&&(t=h),nMath.sqrt((r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y)),f0=(r,e,t,n="TB",i,a={})=>{if(!(e!=null&&e.length))return;const{stopBranchFn:s,stopAllFn:o}=a;for(let l=0;l{const Y=Ia(o[V]);Y.data.x=H[0]+a[0],Y.data.y=H[1]+a[1],N.push(Y)}),e&&N.forEach(H=>t.mergeNodeData(H.id,{x:H.data.x,y:H.data.y})),{nodes:N,edges:l}})}}const sI=r=>{let e=-999999;r.forEach(t=>{t.forEach(n=>{n!==1/0&&e{t.forEach((i,a)=>{i===1/0&&(r[n][a]=e)})})},oI=r=>{const t=Ro.mul(Ro.pow(r,2),-.5),n=t.mean("row"),i=t.mean("column"),a=t.mean();t.add(a).subRowVector(n).subColumnVector(i);const s=new FE(t),o=Ro.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(l=>Ro.mul([l],[o]).toJSON()[0].splice(0,2))};function d0(r){return!!r.tick&&!!r.stop}const lI={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},uI={center:[0,0],comboPadding:10,treeKey:"combo"};class cI{constructor(e={}){this.options=e,this.id="comboCombined",this.options=Object.assign(Object.assign({},uI),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,e,t)})}genericComboCombinedLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const i=this.initVals(Object.assign(Object.assign({},this.options),n)),{center:a,treeKey:s,outerLayout:o}=i,l=t.getAllNodes().filter(ve=>!ve.data._isCombo),u=t.getAllNodes().filter(ve=>ve.data._isCombo),h=t.getAllEdges(),p=l==null?void 0:l.length;if(!p||p===1)return xl(t,e,a);const S=[],N=new Map;l.forEach(ve=>{N.set(ve.id,ve)});const U=new Map;u.forEach(ve=>{U.set(ve.id,ve)});const H=new Map,V=this.getInnerGraphs(t,s,N,U,h,i,H);yield Promise.all(V);const Y=new Map,q=[],ne=new Map;let le=!0;t.getRoots(s).forEach(ve=>{const Te=H.get(ve.id),Oe=U.get(ve.id)||N.get(ve.id),Ie={id:ve.id,data:Object.assign(Object.assign({},ve.data),{x:Te.data.x||Oe.data.x,y:Te.data.y||Oe.data.y,fx:Te.data.fx||Oe.data.fx,fy:Te.data.fy||Oe.data.fy,mass:Te.data.mass||Oe.data.mass,size:Te.data.size})};q.push(Ie),Y.set(ve.id,!0),!isNaN(Ie.data.x)&&Ie.data.x!==0&&!isNaN(Ie.data.y)&&Ie.data.y!==0?le=!1:(Ie.data.x=Math.random()*100,Ie.data.y=Math.random()*100),f0(t,[ve],ze=>{ze.id!==ve.id&&ne.set(ze.id,ve.id)},"TB",s)});const ue=[];h.forEach(ve=>{const Te=ne.get(ve.source)||ve.source,Oe=ne.get(ve.target)||ve.target;Te!==Oe&&Y.has(Te)&&Y.has(Oe)&&ue.push({id:ve.id,source:Te,target:Oe,data:{}})});let fe;if(q!=null&&q.length){if(q.length===1)q[0].data.x=a[0],q[0].data.y=a[1];else{const ve=new di({nodes:q,edges:ue}),Te=o||new NE;le&&lI[Te.id]&&(yield(q.length<100?new HE:new l0).assign(ve));const Oe=Object.assign({center:a,kg:5,preventOverlap:!0,animate:!1},Te.id==="force"?{gravity:1,factor:4,linkDistance:(Ie,ze,Xe)=>{const et=Math.max(...ze.data.size)||32,st=Math.max(...Xe.data.size)||32;return et/2+st/2+200}}:{});fe=yield GE(Te,ve,Oe)}H.forEach(ve=>{var Te;const Oe=fe.nodes.find(Xe=>Xe.id===ve.id);if(Oe){const{x:Xe,y:et}=Oe.data;ve.data.visited=!0,ve.data.x=Xe,ve.data.y=et,S.push({id:ve.id,data:{x:Xe,y:et}})}const{x:Ie,y:ze}=ve.data;(Te=ve.data.nodes)===null||Te===void 0||Te.forEach(Xe=>{S.push({id:Xe.id,data:{x:Xe.data.x+Ie,y:Xe.data.y+ze}})})}),H.forEach(({data:ve})=>{const{x:Te,y:Oe,visited:Ie,nodes:ze}=ve;ze==null||ze.forEach(Xe=>{if(!Ie){const et=S.find(st=>st.id===Xe.id);et.data.x+=Te||0,et.data.y+=Oe||0}})})}return e&&S.forEach(ve=>{t.mergeNodeData(ve.id,{x:ve.data.x,y:ve.data.y})}),{nodes:S,edges:h}})}initVals(e){const t=Object.assign({},e),{nodeSize:n,spacing:i,comboPadding:a}=e;let s,o;if(un(i)?o=()=>i:yn(i)?o=i:o=()=>0,t.spacing=o,!n)s=u=>{const h=o(u);return u.size?no(u.size)?((u.size[0]>u.size[1]?u.size[0]:u.size[1])+h)/2:li(u.size)?((u.size.width>u.size.height?u.size.width:u.size.height)+h)/2:(u.size+h)/2:32+h/2};else if(yn(n))s=u=>{const h=n(u),p=o(u);return no(u.size)?((u.size[0]>u.size[1]?u.size[0]:u.size[1])+p)/2:((h||32)+p)/2};else if(no(n)){const h=(n[0]>n[1]?n[0]:n[1])/2;s=p=>h+o(p)/2}else{const u=n/2;s=h=>u+o(h)/2}t.nodeSize=s;let l;return un(a)?l=()=>a:no(a)?l=()=>Math.max.apply(null,a):yn(a)?l=a:l=()=>0,t.comboPadding=l,t}getInnerGraphs(e,t,n,i,a,s,o){const{nodeSize:l,comboPadding:u,spacing:h,innerLayout:p}=s,S=p||new l0({}),N={center:[0,0],preventOverlap:!0,nodeSpacing:h},U=[],H=V=>{let Y=(u==null?void 0:u(V))||10;return no(Y)&&(Y=Math.max(...Y)),{size:Y?[Y*2,Y*2]:[30,30],padding:Y}};return e.getRoots(t).forEach(V=>{o.set(V.id,{id:V.id,data:{nodes:[],size:H(V).size}});let Y=Promise.resolve();f0(e,[V],q=>{var ne;if(!q.data._isCombo)return;const{size:le,padding:ue}=H(q);if(!(!((ne=e.getChildren(q.id,t))===null||ne===void 0)&&ne.length))o.set(q.id,{id:q.id,data:Object.assign(Object.assign({},q.data),{size:le})});else{const fe=o.get(q.id);o.set(q.id,{id:q.id,data:Object.assign({nodes:[]},fe==null?void 0:fe.data)});const de=new Map,ve=e.getChildren(q.id,t).map(Ie=>{if(Ie.data._isCombo)return o.has(Ie.id)||o.set(Ie.id,{id:Ie.id,data:Object.assign({},Ie.data)}),de.set(Ie.id,!0),o.get(Ie.id);const ze=n.get(Ie.id)||i.get(Ie.id);return de.set(Ie.id,!0),{id:Ie.id,data:Object.assign(Object.assign({},ze.data),Ie.data)}}),Te={nodes:ve,edges:a.filter(Ie=>de.has(Ie.source)&&de.has(Ie.target))};let Oe=1/0;ve.forEach(Ie=>{var ze;let{size:Xe}=Ie.data;Xe||(Xe=((ze=o.get(Ie.id))===null||ze===void 0?void 0:ze.data.size)||(l==null?void 0:l(Ie))||[30,30]),un(Xe)&&(Xe=[Xe,Xe]);const[et,st]=Xe;Oe>et&&(Oe=et),Oe>st&&(Oe=st),Ie.data.size=Xe}),Y=Y.then(()=>(0,xe.mG)(this,void 0,void 0,function*(){const Ie=new di(Te);yield GE(S,Ie,N,!0);const{minX:ze,minY:Xe,maxX:et,maxY:st}=iI(ve),bt={x:(et+ze)/2,y:(st+Xe)/2};Te.nodes.forEach(ct=>{ct.data.x-=bt.x,ct.data.y-=bt.y});const _t=[Math.max(et-ze,Oe)+ue*2,Math.max(st-Xe,Oe)+ue*2];o.get(q.id).data.size=_t,o.get(q.id).data.nodes=ve}))}return!0},"BT",t),U.push(Y)}),U}}function GE(r,e,t,n){var i;return(0,xe.mG)(this,void 0,void 0,function*(){return d0(r)?(r.execute(e,t),r.stop(),r.tick((i=t.iterations)!==null&&i!==void 0?i:300)):n?yield r.assign(e,t):yield r.execute(e,t)})}function Pi(r){return function(){return r}}function Io(r){return(r()-.5)*1e-6}function hI(r){return r.index}function jE(r,e){var t=r.get(e);if(!t)throw new Error("node not found: "+e);return t}function fI(r){var e=hI,t=p,n,i=Pi(30),a,s,o,l,u,h=1;r==null&&(r=[]);function p(V){return 1/Math.min(o[V.source.index],o[V.target.index])}function S(V){for(var Y=0,q=r.length;Y[e(ue,fe,s),ue])),le;for(V=0,o=new Array(Y);V(r=(gI*r+pI)%VE)/VE}function yI(r){return r.x}function _I(r){return r.y}var EI=10,xI=Math.PI*(3-Math.sqrt(5));function bI(r){var e,t=1,n=.001,i=1-Math.pow(n,1/300),a=0,s=.6,o=new Map,l=(0,vI.HT)(p),u=(0,dI.Z)("tick","end"),h=mI();r==null&&(r=[]);function p(){S(),u.call("tick",e),t1?(V==null?o.delete(H):o.set(H,U(V)),e):o.get(H)},find:function(H,V,Y){var q=0,ne=r.length,le,ue,fe,de,ve;for(Y==null?Y=1/0:Y*=Y,q=0;q1?(u.on(H,V),e):u.on(H)}}}function wI(){var r,e,t,n,i=Pi(-30),a,s=1,o=1/0,l=.81;function u(N){var U,H=r.length,V=(0,u0.Z)(r,yI,_I).visitAfter(p);for(n=N,U=0;U=o)return;(N.data!==e||N.next)&&(Y===0&&(Y=Io(t),le+=Y*Y),q===0&&(q=Io(t),le+=q*q),leS.index){var Ie=N-ve.x-ve.vx,ze=U-ve.y-ve.vy,Xe=Ie*Ie+ze*ze;XeN+Oe||feU+Oe||deu.r&&(u.r=u[h].r)}function l(){if(e){var u,h=e.length,p;for(t=new Array(h),u=0;ut.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},sa(this.options,e),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericLayout(!0,e,t)})}stop(){this.simulation.stop()}tick(e){return this.simulation.tick(e),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(e,t){const n=this.context.nodes.find(i=>i.id===e);n&&t.forEach((i,a)=>{if(typeof i=="number"||i===null){const s=["fx","fy","fz"][a];n[s]=i}})}getOptions(e){var t,n;const i=sa({},this.options,e);return i.collide&&((t=i.collide)===null||t===void 0?void 0:t.radius)===void 0&&(i.collide=i.collide||{},i.collide.radius=(n=i.nodeSize)!==null&&n!==void 0?n:10),i.iterations===void 0&&(i.link&&i.link.iterations===void 0&&(i.iterations=i.link.iterations),i.collide&&i.collide.iterations===void 0&&(i.iterations=i.collide.iterations)),this.context.options=i,i}genericLayout(e,t,n){var i;return(0,xe.mG)(this,void 0,void 0,function*(){const a=this.getOptions(n),s=t.getAllNodes().map(({id:h,data:p})=>Object.assign(Object.assign({id:h},p),ml(p.data,this.config.inputNodeAttrs))),o=t.getAllEdges().map(h=>Object.assign({},h));Object.assign(this.context,{assign:e,nodes:s,edges:o,graph:t});const l=new Promise(h=>{this.resolver=h}),u=this.setSimulation(a);return u.nodes(s),(i=u.force("link"))===null||i===void 0||i.links(o),l})}getResult(){const{assign:e,nodes:t,edges:n,graph:i}=this.context,a=t.map(o=>({id:o.id,data:Object.assign(Object.assign({},o.data),ml(o,this.config.outputNodeAttrs))})),s=n.map(({id:o,source:l,target:u,data:h})=>({id:o,source:typeof l=="object"?l.id:l,target:typeof u=="object"?u.id:u,data:h}));return e&&a.forEach(o=>i.mergeNodeData(o.id,o.data)),{nodes:a,edges:s}}initSimulation(){return bI()}setSimulation(e){const t=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=t.on("tick",()=>{var n;return(n=e.onTick)===null||n===void 0?void 0:n.call(e,this.getResult())}).on("end",()=>{var n;return(n=this.resolver)===null||n===void 0?void 0:n.call(this,this.getResult())})),ZE(t,this.config.simulationAttrs.map(n=>[n,e[n]])),Object.entries(this.forceMap).forEach(([n,i])=>{const a=n;if(e[n]){let s=t.force(a);s||(s=i(),t.force(a,s)),ZE(s,Object.entries(e[a]))}else t.force(a,null)}),t}}const ZE=(r,e)=>e.reduce((t,[n,i])=>!t[n]||i===void 0?t:t[n].call(r,i),r);var KE=X(92546),LI=X.n(KE);class Wf{constructor(e){this.id="dagre",this.options={},Object.assign(this.options,Wf.defaultOptions,e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,e,Object.assign(Object.assign({},this.options),t))})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,e,Object.assign(Object.assign({},this.options),t))})}genericDagreLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const{nodeSize:i}=n,a=new KE.graphlib.Graph;a.setGraph(n),a.setDefaultEdgeLabel(()=>({}));const s=t.getAllNodes(),o=t.getAllEdges();[...s,...o].some(({id:u})=>un(u))&&console.error("Dagre layout only support string id, it will convert number to string."),t.getAllNodes().forEach(u=>{const{id:h}=u,p=Object.assign({},u.data);if(i!==void 0){const[S,N]=fc(yn(i)?i(u):i);Object.assign(p,{width:S,height:N})}a.setNode(h.toString(),p)}),t.getAllEdges().forEach(({id:u,source:h,target:p})=>{a.setEdge(h.toString(),p.toString(),{id:u})}),LI().layout(a);const l={nodes:[],edges:[]};return a.nodes().forEach(u=>{const h=a.node(u);l.nodes.push({id:u,data:h}),e&&t.mergeNodeData(u,h)}),a.edges().forEach(u=>{const h=a.edge(u),{id:p}=h,S=(0,xe._T)(h,["id"]),{v:N,w:U}=u;l.edges.push({id:p,source:N,target:U,data:S}),e&&t.mergeEdgeData(p,S)}),l})}}Wf.defaultOptions={};class v0{constructor(e){this.id=e.id||0,this.rx=e.rx,this.ry=e.ry,this.fx=0,this.fy=0,this.mass=e.mass,this.degree=e.degree,this.g=e.g||0}distanceTo(e){const t=this.rx-e.rx,n=this.ry-e.ry;return Math.hypot(t,n)}setPos(e,t){this.rx=e,this.ry=t}resetForce(){this.fx=0,this.fy=0}addForce(e){const t=e.rx-this.rx,n=e.ry-this.ry;let i=Math.hypot(t,n);i=i<1e-4?1e-4:i;const a=this.g*(this.degree+1)*(e.degree+1)/i;this.fx+=a*t/i,this.fy+=a*n/i}in(e){return e.contains(this.rx,this.ry)}add(e){const t=this.mass+e.mass,n=(this.rx*this.mass+e.rx*e.mass)/t,i=(this.ry*this.mass+e.ry*e.mass)/t,a=this.degree+e.degree,s={rx:n,ry:i,mass:t,degree:a};return new v0(s)}}class nu{constructor(e){this.xmid=e.xmid,this.ymid=e.ymid,this.length=e.length,this.massCenter=e.massCenter||[0,0],this.mass=e.mass||1}getLength(){return this.length}contains(e,t){const n=this.length/2;return e<=this.xmid+n&&e>=this.xmid-n&&t<=this.ymid+n&&t>=this.ymid-n}NW(){const e=this.xmid-this.length/4,t=this.ymid+this.length/4,n=this.length/2,i={xmid:e,ymid:t,length:n};return new nu(i)}NE(){const e=this.xmid+this.length/4,t=this.ymid+this.length/4,n=this.length/2,i={xmid:e,ymid:t,length:n};return new nu(i)}SW(){const e=this.xmid-this.length/4,t=this.ymid-this.length/4,n=this.length/2,i={xmid:e,ymid:t,length:n};return new nu(i)}SE(){const e=this.xmid+this.length/4,t=this.ymid-this.length/4,n=this.length/2,i={xmid:e,ymid:t,length:n};return new nu(i)}}class ru{constructor(e){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,e!=null&&(this.quad=e)}insert(e){if(this.body==null){this.body=e;return}this._isExternal()?(this.quad&&(this.NW=new ru(this.quad.NW()),this.NE=new ru(this.quad.NE()),this.SW=new ru(this.quad.SW()),this.SE=new ru(this.quad.SE())),this._putBody(this.body),this._putBody(e),this.body=this.body.add(e)):(this.body=this.body.add(e),this._putBody(e))}_putBody(e){this.quad&&(e.in(this.quad.NW())&&this.NW?this.NW.insert(e):e.in(this.quad.NE())&&this.NE?this.NE.insert(e):e.in(this.quad.SW())&&this.SW?this.SW.insert(e):e.in(this.quad.SE())&&this.SE&&this.SE.insert(e))}_isExternal(){return this.NW==null&&this.NE==null&&this.SW==null&&this.SE==null}updateForce(e){if(!(this.body==null||e===this.body))if(this._isExternal())e.addForce(this.body);else{const t=this.quad?this.quad.getLength():0,n=this.body.distanceTo(e);t/nIa(Y,[o,l])),U=i.filter(Y=>{const{source:q,target:ne}=Y;return q!==ne}),H=new di({nodes:N,edges:U}),V=this.getSizes(H,p);if(this.run(H,t,h,V,e,s),u){for(let q=0;q250&&(n.barnesHut=!0),l===void 0&&t>100&&(n.prune=!0),u===0&&!l?(n.maxIteration=250,t<=200&&t>100?n.maxIteration=1e3:t>200&&(n.maxIteration=1200)):u===0&&l&&(n.maxIteration=100,t<=200&&t>100?n.maxIteration=500:t>200&&(n.maxIteration=950)),h||(n.kr=50,t>100&&t<=500?n.kr=20:t>500&&(n.kr=1)),p||(n.kg=20,t>100&&t<=500?n.kg=10:t>500&&(n.kg=1)),n}run(e,t,n,i,a,s){const{kr:o,barnesHut:l,onTick:u}=s,h=e.getAllNodes();let p=0,S=n;const N={},U={},H={};for(let V=0;V0;)p=this.oneStep(e,{iter:S,preventOverlapIters:50,krPrime:100,sg:p,forces:N,preForces:U,bodies:H,sizes:i},s),S--,u==null||u({nodes:h,edges:t.getAllEdges()});return e}oneStep(e,t,n){const{iter:i,preventOverlapIters:a,krPrime:s,sg:o,preForces:l,bodies:u,sizes:h}=t;let{forces:p}=t;const{preventOverlap:S,barnesHut:N}=n,U=e.getAllNodes();for(let H=0;Ha||!S)?p=this.getOptRepGraForces(e,p,u,n):p=this.getRepGraForces(e,i,a,p,s,h,n),this.updatePos(e,p,l,o,n)}getAttrForces(e,t,n,i,a,s){const{preventOverlap:o,dissuadeHubs:l,mode:u,prune:h}=s,p=e.getAllEdges();for(let S=0;S0&&(ue=le,fe=le),a[N][0]+=ue*ne[0],a[U][0]-=fe*ne[0],a[N][1]+=ue*ne[1],a[U][1]-=fe*ne[1]}return a}getOptRepGraForces(e,t,n,i){const{kg:a,center:s,prune:o}=i,l=e.getAllNodes(),u=l.length;let h=9e10,p=-9e10,S=9e10,N=-9e10;for(let q=0;q=p&&(p=le.x),le.x<=h&&(h=le.x),le.y>=N&&(N=le.y),le.y<=S&&(S=le.y))}const U=Math.max(p-h,N-S),H={xmid:(p+h)/2,ymid:(N+S)/2,length:U,massCenter:s,mass:u},V=new nu(H),Y=new ru(V);for(let q=0;q0&&(Oe=u*(Y+1)*(de+1)/Te),i[V.id][0]-=Oe*ve[0],i[fe.id][0]+=Oe*ve[0],i[V.id][1]-=Oe*ve[1],i[fe.id][1]+=Oe*ve[1]}const q=[V.data.x-p[0],V.data.y-p[1]],ne=Math.hypot(q[0],q[1]);q[0]=q[0]/ne,q[1]=q[1]/ne;const le=h*(Y+1);i[V.id][0]-=le*q[0],i[V.id][1]-=le*q[1]}return i}updatePos(e,t,n,i,a){const{ks:s,tao:o,prune:l,ksmax:u}=a,h=e.getAllNodes(),p=h.length,S=[],N=[];let U=0,H=0,V=i;for(let q=0;q1.5*Y?1.5*Y:V);for(let q=0;qve?ve:fe;const Te=fe*t[ne][0],Oe=fe*t[ne][1];e.mergeNodeData(ne,{x:le.x+Te,y:le.y+Oe})}return V}}const NI={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},BI=800;class kI{constructor(e={}){this.options=e,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},NI),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,e,t)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(e=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;nthis.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),t}genericFruchtermanLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){if(this.running)return;const i=this.formatOptions(n),{dimensions:a,width:s,height:o,center:l,clustering:u,nodeClusterBy:h,maxIteration:p,onTick:S}=i,N=t.getAllNodes(),U=t.getAllEdges();if(!(N!=null&&N.length)){const ne={nodes:[],edges:U};return this.lastResult=ne,ne}if(N.length===1){e&&t.mergeNodeData(N[0].id,{x:l[0],y:l[1],z:a===3?l[2]:void 0});const ne={nodes:[Object.assign(Object.assign({},N[0]),{data:Object.assign(Object.assign({},N[0].data),{x:l[0],y:l[1],z:a===3?l[2]:void 0})})],edges:U};return this.lastResult=ne,ne}const H=N.map(ne=>Ia(ne,[s,o])),V=new di({nodes:H,edges:U}),Y={};if(u&&H.forEach(ne=>{const le=ne.data[h];Y[le]||(Y[le]={name:le,cx:0,cy:0,count:0})}),this.lastLayoutNodes=H,this.lastLayoutEdges=U,this.lastAssign=e,this.lastGraph=V,this.lastOptions=i,this.lastClusterMap=Y,typeof window=="undefined")return;let q=0;return new Promise(ne=>{this.timeInterval=window.setInterval(()=>{if(!this.running){ne({nodes:H,edges:U});return}this.runOneStep(V,Y,i),e&&H.forEach(({id:le,data:ue})=>t.mergeNodeData(le,{x:ue.x,y:ue.y,z:a===3?ue.z:void 0})),S==null||S({nodes:H,edges:U}),q++,q>=p&&(window.clearInterval(this.timeInterval),ne({nodes:H,edges:U}))},0),this.running=!0})})}formatOptions(e={}){const t=Object.assign(Object.assign({},this.options),e),{clustering:n,nodeClusterBy:i}=t,{center:a,width:s,height:o}=t;return t.width=!s&&typeof window!="undefined"?window.innerWidth:s,t.height=!o&&typeof window!="undefined"?window.innerHeight:o,t.center=a||[t.width/2,t.height/2],t.clustering=n&&!!i,t}runOneStep(e,t,n){const{dimensions:i,height:a,width:s,gravity:o,center:l,speed:u,clustering:h,nodeClusterBy:p,clusterGravity:S}=n,N=a*s,U=Math.sqrt(N)/10,H=e.getAllNodes(),V=N/(H.length+1),Y=Math.sqrt(V),q={};if(this.applyCalculate(e,q,Y,V),h){for(const le in t)t[le].cx=0,t[le].cy=0,t[le].count=0;H.forEach(le=>{const{data:ue}=le,fe=t[ue[p]];un(ue.x)&&(fe.cx+=ue.x),un(ue.y)&&(fe.cy+=ue.y),fe.count++});for(const le in t)t[le].cx/=t[le].count,t[le].cy/=t[le].count;const ne=S||o;H.forEach((le,ue)=>{const{id:fe,data:de}=le;if(!un(de.x)||!un(de.y))return;const ve=t[de[p]],Te=Math.sqrt((de.x-ve.cx)*(de.x-ve.cx)+(de.y-ve.cy)*(de.y-ve.cy)),Oe=Y*ne;q[fe].x-=Oe*(de.x-ve.cx)/Te,q[fe].y-=Oe*(de.y-ve.cy)/Te})}H.forEach((ne,le)=>{const{id:ue,data:fe}=ne;if(!un(fe.x)||!un(fe.y))return;const de=.01*Y*o;q[ue].x-=de*(fe.x-l[0]),q[ue].y-=de*(fe.y-l[1]),i===3&&(q[ue].z-=de*(fe.z-l[2]))}),H.forEach((ne,le)=>{const{id:ue,data:fe}=ne;if(un(fe.fx)&&un(fe.fy)){fe.x=fe.fx,fe.y=fe.fy,i===3&&(fe.z=fe.fz);return}if(!un(fe.x)||!un(fe.y))return;const de=Math.sqrt(q[ue].x*q[ue].x+q[ue].y*q[ue].y+(i===3?q[ue].z*q[ue].z:0));if(de>0){const ve=Math.min(U*(u/BI),de);e.mergeNodeData(ue,{x:fe.x+q[ue].x/de*ve,y:fe.y+q[ue].y/de*ve,z:i===3?fe.z+q[ue].z/de*ve:void 0})}})}applyCalculate(e,t,n,i){this.calRepulsive(e,t,i),this.calAttractive(e,t,n)}calRepulsive(e,t,n){const i=e.getAllNodes();i.forEach(({data:a,id:s},o)=>{t[s]={x:0,y:0,z:0},i.forEach(({data:l,id:u},h)=>{if(o<=h||!un(a.x)||!un(l.x)||!un(a.y)||!un(l.y))return;let p=a.x-l.x,S=a.y-l.y,N=this.options.dimensions===3?a.z-l.z:0,U=p*p+S*S+N*N;U===0&&(U=1,p=.01,S=.01,N=.01);const H=n/U,V=p*H,Y=S*H,q=N*H;t[s].x+=V,t[s].y+=Y,t[u].x-=V,t[u].y-=Y,this.options.dimensions===3&&(t[s].z+=q,t[u].z-=q)})})}calAttractive(e,t,n){e.getAllEdges().forEach(a=>{const{source:s,target:o}=a;if(!s||!o||s===o)return;const{data:l}=e.getNode(s),{data:u}=e.getNode(o);if(!un(u.x)||!un(l.x)||!un(u.y)||!un(l.y))return;const h=u.x-l.x,p=u.y-l.y,S=this.options.dimensions===3?u.z-l.z:0,N=Math.sqrt(h*h+p*p+S*S)/n,U=h*N,H=p*N,V=S*N;t[s].x+=U,t[s].y+=H,t[o].x-=U,t[o].y-=H,this.options.dimensions===3&&(t[s].z+=V,t[o].z-=V)})}}const FI={begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30,width:300,height:300};class zI{constructor(e={}){this.options=e,this.id="grid",this.options=Object.assign(Object.assign({},FI),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,e,t)})}genericGridLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{begin:a=[0,0],condense:s,preventOverlapPadding:o,preventOverlap:l,rows:u,cols:h,nodeSpacing:p,nodeSize:S,width:N,height:U,position:H}=i;let{sortBy:V}=i;const Y=t.getAllNodes(),q=t.getAllEdges(),ne=Y==null?void 0:Y.length;if(!ne||ne===1)return xl(t,e,a);const le=Y.map(st=>Ia(st));V!=="id"&&(!ur(V)||le[0].data[V]===void 0)&&(V="degree"),V==="degree"?le.sort((st,bt)=>t.getDegree(bt.id,"both")-t.getDegree(st.id,"both")):V==="id"?le.sort((st,bt)=>un(bt.id)&&un(st.id)?bt.id-st.id:`${st.id}`.localeCompare(`${bt.id}`)):le.sort((st,bt)=>bt.data[V]-st.data[V]);const ue=!N&&typeof window!="undefined"?window.innerWidth:N,fe=!U&&typeof window!="undefined"?window.innerHeight:U,de=ne,ve={rows:u,cols:h};if(u!=null&&h!=null)ve.rows=u,ve.cols=h;else if(u!=null&&h==null)ve.rows=u,ve.cols=Math.ceil(de/ve.rows);else if(u==null&&h!=null)ve.cols=h,ve.rows=Math.ceil(de/ve.cols);else{const st=Math.sqrt(de*fe/ue);ve.rows=Math.round(st),ve.cols=Math.round(ue/fe*st)}if(ve.rows=Math.max(ve.rows,1),ve.cols=Math.max(ve.cols,1),ve.cols*ve.rows>de){const st=Hf(ve),bt=Gf(ve);(st-1)*bt>=de?Hf(ve,st-1):(bt-1)*st>=de&&Gf(ve,bt-1)}else for(;ve.cols*ve.rows=de?Gf(ve,bt+1):Hf(ve,st+1)}let Te=s?0:ue/ve.cols,Oe=s?0:fe/ve.rows;if(l||p){const st=El(10,p),bt=a0(30,S,!1);le.forEach(_t=>{(!_t.data.x||!_t.data.y)&&(_t.data.x=0,_t.data.y=0);const ct=t.getNode(_t.id),[ft,At]=fc(bt(ct)||30),Ft=st!==void 0?st(_t):o,Vt=ft+Ft,nn=At+Ft;Te=Math.max(Te,Vt),Oe=Math.max(Oe,nn)})}const Ie={},ze={row:0,col:0},Xe={};for(let st=0;st{t.mergeNodeData(st.id,{x:st.data.x,y:st.data.y})}),et})}}const Hf=(r,e)=>{let t;const n=r.rows||5,i=r.cols||5;return e==null?t=Math.min(n,i):Math.min(n,i)===r.rows?r.rows=e:r.cols=e,t},Gf=(r,e)=>{let t;const n=r.rows||5,i=r.cols||5;return e==null?t=Math.max(n,i):Math.max(n,i)===r.rows?r.rows=e:r.cols=e,t},g0=(r,e)=>r[`c-${e.row}-${e.col}`]||!1,XE=(r,e)=>r[`c-${e.row}-${e.col}`]=!0,YE=(r,e)=>{const t=r.cols||5;e.col++,e.col>=t&&(e.col=0,e.row++)},UI=(r,e,t,n,i,a,s,o)=>{let l,u;const h=i[r.id];if(h)l=h.col*t+t/2+e[0],u=h.row*n+n/2+e[1];else{for(;g0(o,s);)YE(a,s);l=s.col*t+t/2+e[0],u=s.row*n+n/2+e[1],XE(o,s),YE(a,s)}r.data.x=l,r.data.y=u},WI=(r,e,t)=>{try{const n=Ro.mul(Ro.pow(e,2),-.5),i=n.mean("row"),a=n.mean("column"),s=n.mean();n.add(s).subRowVector(i).subColumnVector(a);const o=new FE(n),l=Ro.sqrt(o.diagonalMatrix).diagonal();return o.leftSingularVectors.toJSON().map(u=>Ro.mul([u],[l]).toJSON()[0].splice(0,r))}catch(n){const i=[];for(let a=0;a{const t=Object.assign(Object.assign({},GI),e),{positions:n,iterations:i,width:a,k:s,speed:o=100,strictRadial:l,focusIdx:u,radii:h=[],nodeSizeFunc:p}=t,S=r.getAllNodes(),N=[],U=a/10;for(let H=0;H{N[Y]={x:0,y:0}}),VI(S,n,N,s,h,p),ZI(n,N,o,l,u,U,a,h);return n},VI=(r,e,t,n,i,a)=>{e.forEach((s,o)=>{t[o]={x:0,y:0},e.forEach((l,u)=>{if(o===u||i[o]!==i[u])return;let h=s.x-l.x,p=s.y-l.y,S=Math.sqrt(h*h+p*p);if(S===0){S=1;const N=o>u?1:-1;h=.01*N,p=.01*N}if(S{const l=a||s/10;return n&&e.forEach((u,h)=>{const p=r[h].x-r[i].x,S=r[h].y-r[i].y,N=Math.sqrt(p*p+S*S);let U=S/N,H=-p/N;const V=Math.sqrt(u.x*u.x+u.y*u.y);let Y=Math.acos((U*u.x+H*u.y)/V);Y>Math.PI/2&&(Y-=Math.PI/2,U*=-1,H*=-1);const q=Math.cos(Y)*V;u.x=U*q,u.y=H*q}),r.forEach((u,h)=>{if(h===i)return;const p=Math.sqrt(e[h].x*e[h].x+e[h].y*e[h].y);if(p>0&&h!==i){const S=Math.min(l*(t/HI),p);if(u.x+=e[h].x/p*S,u.y+=e[h].y/p*S,n){let N=u.x-r[i].x,U=u.y-r[i].y;const H=Math.sqrt(N*N+U*U);N=N/H*o[h],U=U/H*o[h],u.x=r[i].x+N,u.y=r[i].y+U}}}),r},KI={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class XI{constructor(e={}){this.options=e,this.id="radial",this.options=Object.assign(Object.assign({},KI),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,e,t)})}genericRadialLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:s,center:o,focusNode:l,unitRadius:u,nodeSize:h,nodeSpacing:p,strictRadial:S,preventOverlap:N,maxPreventOverlapIteration:U,sortBy:H,linkDistance:V=50,sortStrength:Y=10,maxIteration:q=1e3}=i,ne=t.getAllNodes(),le=t.getAllEdges(),ue=!a&&typeof window!="undefined"?window.innerWidth:a,fe=!s&&typeof window!="undefined"?window.innerHeight:s,de=o||[ue/2,fe/2];if(!(ne!=null&&ne.length)||ne.length===1)return xl(t,e,de);let ve=ne[0];if(ur(l)){for(let Dn=0;Dnde[0]?de[0]:ue-de[0],st=fe-de[1]>de[1]?de[1]:fe-de[1];et===0&&(et=ue/2),st===0&&(st=fe/2);const bt=Math.min(et,st),_t=Math.max(...Xe),ct=[],ft=u||bt/_t;Xe.forEach((Dn,kn)=>{ct[kn]=Dn*ft});const At=YI(ne,Ie,V,ct,ft,H,Y),Ft=QI(At),Vt=WI(V,At,V);let nn=Vt.map(([Dn,kn])=>({x:(isNaN(Dn)?Math.random()*V:Dn)-Vt[Te][0],y:(isNaN(kn)?Math.random()*V:kn)-Vt[Te][1]}));this.run(q,nn,Ft,At,ct,Te);let hn;if(N){hn=s0(h,p);const Dn={nodes:ne,nodeSizeFunc:hn,positions:nn,radii:ct,height:fe,width:ue,strictRadial:!!S,focusIdx:Te,iterations:U||200,k:nn.length/4.5};nn=jI(t,Dn)}const rn=[];return nn.forEach((Dn,kn)=>{const $n=Ia(ne[kn]);$n.data.x=Dn.x+de[0],$n.data.y=Dn.y+de[1],rn.push($n)}),e&&rn.forEach(Dn=>t.mergeNodeData(Dn.id,{x:Dn.data.x,y:Dn.data.y})),{nodes:rn,edges:le}})}run(e,t,n,i,a,s){for(let o=0;o<=e;o++){const l=o/e;this.oneIteration(l,t,a,i,n,s)}}oneIteration(e,t,n,i,a,s){const o=1-e;t.forEach((l,u)=>{const h=WE(l,{x:0,y:0}),p=h===0?0:1/h;if(u===s)return;let S=0,N=0,U=0;t.forEach((V,Y)=>{if(u===Y)return;const q=WE(l,V),ne=q===0?0:1/q,le=i[Y][u];U+=a[u][Y],S+=a[u][Y]*(V.x+le*(l.x-V.x)*ne),N+=a[u][Y]*(V.y+le*(l.y-V.y)*ne)});const H=n[u]===0?0:1/n[u];U*=o,U+=e*H*H,S*=o,S+=e*H*l.x*p,l.x=S/U,N*=o,N+=e*H*l.y*p,l.y=N/U})}}const YI=(r,e,t,n,i,a,s)=>{if(!r)return[];const o=[];if(e){const l={};e.forEach((u,h)=>{const p=[];u.forEach((S,N)=>{var U,H;if(h===N)p.push(0);else if(n[h]===n[N])if(a==="data")p.push(S*(Math.abs(h-N)*s)/(n[h]/i));else if(a){let V,Y;if(l[r[h].id])V=l[r[h].id];else{const q=(a==="id"?r[h].id:(U=r[h].data)===null||U===void 0?void 0:U[a])||0;ur(q)?V=q.charCodeAt(0):V=q,l[r[h].id]=V}if(l[r[N].id])Y=l[r[N].id];else{const q=(a==="id"?r[N].id:(H=r[N].data)===null||H===void 0?void 0:H[a])||0;ur(q)?Y=q.charCodeAt(0):Y=q,l[r[N].id]=Y}p.push(S*(Math.abs(V-Y)*s)/(n[h]/i))}else p.push(S*t/(n[h]/i));else{const V=(t+i)/2;p.push(S*V)}}),o.push(p)})}return o},QI=r=>{const e=r.length,t=r[0].length,n=[];for(let i=0;i{let t=-1;return r.forEach((n,i)=>{n.id===e&&(t=i)}),Math.max(t,0)},qI=(r,e,t)=>{const n=r.length;for(let i=0;i{let t=0;for(let n=0;nt?r[e][n]:t);return t},eN={center:[0,0],width:300,height:300};class tN{constructor(e={}){this.options=e,this.id="random",this.options=Object.assign(Object.assign({},eN),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,e,t)})}genericRandomLayout(e,t,n){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:s,height:o}=i,l=t.getAllNodes(),u=.9,h=!s&&typeof window!="undefined"?window.innerWidth:s,p=!o&&typeof window!="undefined"?window.innerHeight:o,S=a||[h/2,p/2],N=[];return l&&l.forEach(H=>{N.push({id:H.id,data:{x:(Math.random()-.5)*u*h+S[0],y:(Math.random()-.5)*u*p+S[1]}})}),e&&N.forEach(H=>t.mergeNodeData(H.id,{x:H.data.x,y:H.data.y})),{nodes:N,edges:t.getAllEdges()}})}}function nN(r){var e,t,n,i=r||1;function a(o,l){++e>i&&(n=t,s(1),++e),t[o]=l}function s(o){e=0,t=Object.create(null),o||(n=Object.create(null))}return s(),{clear:s,has:function(o){return t[o]!==void 0||n[o]!==void 0},get:function(o){var l=t[o];if(l!==void 0)return l;if((l=n[o])!==void 0)return a(o,l),l},set:function(o,l){t[o]!==void 0?t[o]=l:a(o,l)}}}var p0=new Map;function m0(r,e,t){t===void 0&&(t=128);var n=function(){for(var i=[],a=0;a2))return e[0]}formatSize(e){const t=typeof e=="function"?e:()=>e;return n=>La(t(n))}doLayout(e,t){const{hGap:n,getRibSep:i,vGap:a,nodeSize:s,height:o}=t,{model:l}=this.context,u=this.formatSize(s);let h=u(e)[0]+i(e);const p=(ne,le=0)=>{var ue;return le+=n*((ne.children||[]).length+1),(ue=ne.children)===null||ue===void 0||ue.forEach(fe=>{var de;(de=l.getNodeLikeDatum(fe).children)===null||de===void 0||de.forEach(Te=>{const Oe=l.getNodeLikeDatum(Te);le=p(Oe,le)})}),le},S=ne=>{if(ne.depth===1)return h;const le=l.getParentData(ne.id,"tree");if(iu(ne)){const ue=l.getParentData(le.id,"tree"),fe=H(ne)-H(ue);return S(le)+fe*n/a}else{const ue=(le.children||[]).indexOf(ne.id),fe=l.getNodeData((le.children||[]).slice(ue));return N(le)-fe.reduce((de,ve)=>de+p(ve),0)-u(le)[0]/2}},N=m0(ne=>{if(y0(ne))return u(ne)[0]/2;const le=l.getParentData(ne.id,"tree");if(iu(ne))return S(ne)+p(ne)+u(ne)[0]/2;{const ue=H(ne)-H(le),fe=n/a;return S(ne)+ue*fe}},ne=>ne.id),U=ne=>H(l.getParentData(ne,"tree")),H=m0(ne=>{if(y0(ne))return o/2;if(iu(ne)){const le=l.getParentData(ne.id,"tree"),ue=le.children.indexOf(ne.id);if(ue===0)return U(le.id)+a;const fe=l.getNodeLikeDatum(le.children[ue-1]);if(Fs(fe.children))return H(fe)+a;const de=l.getDescendantsData(fe.id);return Math.max(...de.map(ve=>iu(ve)?U(ve.id):H(ve)))+a}else{if(Fs(ne.children))return U(ne.id)+a;const le=l.getNodeLikeDatum(ne.children.slice(-1)[0]);if(Fs(le.children))return H(le)+a;const ue=l.getDescendantsData(ne.id).slice(-1)[0];return(iu(ue)?U(ue.id):H(ue))+a}},ne=>ne.id);let V=0;const Y={nodes:[],edges:[]},q=ne=>{var le;(le=ne.children)===null||le===void 0||le.forEach(Te=>q(l.getNodeLikeDatum(Te)));const ue=H(ne),fe=N(ne);if(Y.nodes.push({id:ne.id,x:fe,y:ue}),y0(ne))return;const de=l.getRelatedEdgesData(ne.id,"in")[0],ve=[S(ne),iu(ne)?ue:U(ne.id)];Y.edges.push({id:Et(de),controlPoints:[ve],relatedNodeId:ne.id}),V=Math.max(V,fe+i(ne)),ne.depth===1&&(h=V)};return q(e),Y}placeAlterative(e,t){const n=(t.children||[]).filter((o,l)=>l%2!==0);if(n.length===0)return e;const{model:i}=this.context,a=e.nodes.find(o=>o.id===t.id).y,s=o=>{const l=i.getAncestorsData(o,"tree");if(Fs(l))return!1;const u=l.length===1?o:l[l.length-2].id;return n.includes(u)};e.nodes.forEach(o=>{s(o.id)&&(o.y=2*a-o.y)}),e.edges.forEach(o=>{s(o.relatedNodeId)&&(o.controlPoints=o.controlPoints.map(l=>[l[0],2*a-l[1]]))})}rightToLeft(e,t){return e.nodes.forEach(n=>n.x=t.width-n.x),e.edges.forEach(n=>{n.controlPoints=n.controlPoints.map(i=>[t.width-i[0],i[1]])}),e}execute(e,t){return rN(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign({},jf.defaultOptions),this.options),t),{direction:i,nodeSize:a}=n,s=this.getRoot();if(!s)return e;const o=this.formatSize(a);n.vGap||(n.vGap=Math.max(...(e.nodes||[]).map(S=>o(S)[1]))),n.hGap||(n.hGap=Math.max(...(e.nodes||[]).map(S=>o(S)[0])));let l=this.doLayout(s,n);this.placeAlterative(l,s),i==="RL"&&(l=this.rightToLeft(l,n));const{model:u}=this.context,h=[],p=[];return l.nodes.forEach(S=>{const{id:N,x:U,y:H}=S,V=u.getNodeLikeDatum(N);h.push(QE(V,{x:U,y:H}))}),l.edges.forEach(S=>{const{id:N,controlPoints:U}=S,H=u.getEdgeDatum(N);p.push(QE(H,{controlPoints:U}))}),{nodes:h,edges:p}})}}jf.defaultOptions={direction:"RL",getRibSep:()=>60};const QE=(r,e)=>Object.assign(Object.assign({},r),{style:Object.assign(Object.assign({},r.style||{}),e)}),y0=r=>r.depth===0,iu=r=>(r.depth||(r.depth=0))%2===0;var iN=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class Vf extends Lf{constructor(){super(...arguments),this.id="snake"}formatSize(e,t){const n=typeof t=="function"?t:()=>t;return e.reduce((i,a)=>{const[s,o]=La(n(a))||[0,0];return[Math.max(i[0],s),Math.max(i[1],o)]},[0,0])}validate(e){const{nodes:t=[],edges:n=[]}=e,i={},a={},s={};t.forEach(S=>{i[S.id]=0,a[S.id]=0,s[S.id]=[]}),n.forEach(S=>{i[S.target]++,a[S.source]++,s[S.source].push(S.target)});const o=new Set,l=S=>{o.has(S)||(o.add(S),s[S].forEach(l))};if(l(t[0].id),o.size!==t.length)return!1;const u=t.filter(S=>i[S.id]===0),h=t.filter(S=>a[S.id]===0);return!(u.length!==1||h.length!==1||t.filter(S=>i[S.id]===1&&a[S.id]===1).length!==t.length-2)}execute(e,t){return iN(this,void 0,void 0,function*(){var n;if(!this.validate(e))return e;const{nodeSize:i,padding:a,sortBy:s,cols:o,colGap:l,rowGap:u,clockwise:h,width:p,height:S}=Object.assign({},Vf.defaultOptions,this.options,t),[N,U,H,V]=cs(a),Y=this.formatSize(e.nodes||[],i),q=Math.ceil((e.nodes||[]).length/o);let ne=l||(p-V-U-o*Y[0])/(o-1),le=u||(S-N-H-q*Y[1])/(q-1);return(le===1/0||le<0)&&(le=0),(ne===1/0||ne<0)&&(ne=0),{nodes:((s?(n=e.nodes)===null||n===void 0?void 0:n.sort(s):aN(e))||[]).map((de,ve)=>{const Te=Math.floor(ve/o),Oe=ve%o,Ie=h?Te%2===0?Oe:o-1-Oe:Te%2===0?o-1-Oe:Oe,ze=V+Ie*(Y[0]+ne)+Y[0]/2,Xe=N+Te*(Y[1]+le)+Y[1]/2;return{id:de.id,style:{x:ze,y:Xe}}})}})}}Vf.defaultOptions={padding:0,cols:5,clockwise:!0};function aN(r){const{nodes:e=[],edges:t=[]}=r,n={},i={};e.forEach(o=>{n[o.id]=0,i[o.id]=[]}),t.forEach(o=>{n[o.target]++,i[o.source].push(o.target)});const a=[],s=[];for(e.forEach(o=>{n[o.id]===0&&a.push(o.id)});a.length>0;){const o=a.shift(),l=e.find(u=>u.id===o);s.push(l),i[o].forEach(u=>{n[u]--,n[u]===0&&a.push(u)})}return s}const sN=["rgb(158, 1, 66)","rgb(213, 62, 79)","rgb(244, 109, 67)","rgb(253, 174, 97)","rgb(254, 224, 139)","rgb(255, 255, 191)","rgb(230, 245, 152)","rgb(171, 221, 164)","rgb(102, 194, 165)","rgb(50, 136, 189)","rgb(94, 79, 162)"],oN=["rgb(78, 121, 167)","rgb(242, 142, 44)","rgb(225, 87, 89)","rgb(118, 183, 178)","rgb(89, 161, 79)","rgb(237, 201, 73)","rgb(175, 122, 161)","rgb(255, 157, 167)","rgb(156, 117, 95)","rgb(186, 176, 171)"],lN=["rgb(255, 245, 235)","rgb(254, 230, 206)","rgb(253, 208, 162)","rgb(253, 174, 107)","rgb(253, 141, 60)","rgb(241, 105, 19)","rgb(217, 72, 1)","rgb(166, 54, 3)","rgb(127, 39, 4)"],uN=["rgb(247, 252, 245)","rgb(229, 245, 224)","rgb(199, 233, 192)","rgb(161, 217, 155)","rgb(116, 196, 118)","rgb(65, 171, 93)","rgb(35, 139, 69)","rgb(0, 109, 44)","rgb(0, 68, 27)"],cN=["rgb(247, 251, 255)","rgb(222, 235, 247)","rgb(198, 219, 239)","rgb(158, 202, 225)","rgb(107, 174, 214)","rgb(66, 146, 198)","rgb(33, 113, 181)","rgb(8, 81, 156)","rgb(8, 48, 107)"];var hN=function(r,e,t){if(!va(r)&&!Ql(r))return r;var n=t;return b1(r,function(i,a){n=e(n,i,a)}),n},fN=hN,_0=function(r,e){return fN(r,function(t,n,i){return e.includes(i)||(t[i]=n),t},{})};class zi extends Eg{}function au(r,e=!0,t){const n=document.createElement("div");return n.setAttribute("class",`g6-${r}`),Object.assign(n.style,{position:"absolute",display:"block"}),e&&Object.assign(n.style,{position:"unset",gridArea:"1 / 1 / 2 / 2",inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),t&&Object.assign(n.style,t),n}function E0(r,e="div",t={},n="",i=document.body){const a=document.getElementById(r);a&&a.remove();const s=document.createElement(e);return s.innerHTML=n,s.id=r,Object.assign(s.style,t),i.appendChild(s),s}var dN=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class Zf extends zi{constructor(e,t){super(e,Object.assign({},Zf.defaultOptions,t)),this.$element=au("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(t)}update(e){const t=Object.create(null,{update:{get:()=>super.update}});return dN(this,void 0,void 0,function*(){t.update.call(this,e),Object.assign(this.$element.style,_0(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}Zf.defaultOptions={transition:"background 0.5s",backgroundSize:"cover",zIndex:"-1"};function x0(r,e,t,n,i,a){const s=r,o=e,l=t-s,u=n-o;let h=i-s,p=a-o,S=h*l+p*u,N=0;S<=0?N=0:(h=l-h,p=u-p,S=h*l+p*u,S<=0?N=0:N=S*S/(l*l+u*u));const U=h*h+p*p-N;return U<0?0:U}function No(r,e,t,n){return(r-t)*(r-t)+(e-n)*(e-n)}function JE(r,e,t,n,i){return No(r,e,t,n)t;if(r===0)return Math.round;const e=Math.pow(10,r);return t=>Math.round(t*e)/e}function qE(r){const e=Math.min(r.x1,r.x2),t=Math.max(r.x1,r.x2),n=Math.min(r.y1,r.y2),i=Math.max(r.y1,r.y2);return{x:e,y:n,x2:t,y2:i,width:t-e,height:i-n}}class Ci{constructor(e,t,n,i){this.x1=e,this.y1=t,this.x2=n,this.y2=i}equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2}draw(e){e.moveTo(this.x1,this.y1),e.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(e){return new Ci(e.x1,e.y1,e.x2,e.y2)}cuts(e,t){if(this.y1===this.y2||tthis.y1&&t>=this.y2||e>this.x1&&e>=this.x2)return!1;if(ethis.x2+n)return!1}else if(ethis.x1+n)return!1;if(this.y1this.y2+n)return!1}else if(tthis.y1+n)return!1;return!0}}var ri;(function(r){r[r.POINT=1]="POINT",r[r.PARALLEL=2]="PARALLEL",r[r.COINCIDENT=3]="COINCIDENT",r[r.NONE=4]="NONE"})(ri||(ri={}));class b0{constructor(e,t=0,n=0){this.state=e,this.x=t,this.y=n}}function Kf(r,e){const t=(e.x2-e.x1)*(r.y1-e.y1)-(e.y2-e.y1)*(r.x1-e.x1),n=(r.x2-r.x1)*(r.y1-e.y1)-(r.y2-r.y1)*(r.x1-e.x1),i=(e.y2-e.y1)*(r.x2-r.x1)-(e.x2-e.x1)*(r.y2-r.y1);if(i){const a=t/i,s=n/i;return 0<=a&&a<=1&&0<=s&&s<=1?new b0(ri.POINT,r.x1+a*(r.x2-r.x1),r.y1+a*(r.y2-r.y1)):new b0(ri.NONE)}return new b0(t===0||n===0?ri.COINCIDENT:ri.PARALLEL)}function $E(r,e){const t=(e.x2-e.x1)*(r.y1-e.y1)-(e.y2-e.y1)*(r.x1-e.x1),n=(r.x2-r.x1)*(r.y1-e.y1)-(r.y2-r.y1)*(r.x1-e.x1),i=(e.y2-e.y1)*(r.x2-r.x1)-(e.x2-e.x1)*(r.y2-r.y1);if(i){const a=t/i,s=n/i;if(0<=a&&a<=1&&0<=s&&s<=1)return a}return Number.POSITIVE_INFINITY}function gN(r,e){function t(i,a,s,o){let l=$E(e,new Ci(i,a,s,o));return l=Math.abs(l-.5),l>=0&&l<=1?1:0}let n=t(r.x,r.y,r.x2,r.y);return n+=t(r.x,r.y,r.x,r.y2),n>1||(n+=t(r.x,r.y2,r.x2,r.y2),n>1)?!0:(n+=t(r.x2,r.y,r.x2,r.y2),n>0)}var ii;(function(r){r[r.LEFT=0]="LEFT",r[r.TOP=1]="TOP",r[r.RIGHT=2]="RIGHT",r[r.BOTTOM=3]="BOTTOM"})(ii||(ii={}));function Xf(r,e,t){const n=new Set;return r.width<=0?(n.add(ii.LEFT),n.add(ii.RIGHT)):er.x+r.width&&n.add(ii.RIGHT),r.height<=0?(n.add(ii.TOP),n.add(ii.BOTTOM)):tr.y+r.height&&n.add(ii.BOTTOM),n}function ex(r,e){let t=e.x1,n=e.y1;const i=e.x2,a=e.y2,s=Array.from(Xf(r,i,a));if(s.length===0)return!0;let o=Xf(r,t,n);for(;o.size!==0;){for(const l of s)if(o.has(l))return!1;if(o.has(ii.RIGHT)||o.has(ii.LEFT)){let l=r.x;o.has(ii.RIGHT)&&(l+=r.width),n=n+(l-t)*(a-n)/(i-t),t=l}else{let l=r.y;o.has(ii.BOTTOM)&&(l+=r.height),t=t+(l-n)*(i-t)/(a-n),n=l}o=Xf(r,t,n)}return!0}function pN(r,e){let t=Number.POSITIVE_INFINITY,n=0;function i(a,s,o,l){let u=$E(e,new Ci(a,s,o,l));u=Math.abs(u-.5),u>=0&&u<=1&&(n++,u1||(i(r.x,r.y2,r.x2,r.y2),n>1)?t:(i(r.x2,r.y,r.x2,r.y2),n===0?-1:t)}function mN(r,e){let t=0;const n=Kf(r,new Ci(e.x,e.y,e.x2,e.y));t+=n.state===ri.POINT?1:0;const i=Kf(r,new Ci(e.x,e.y,e.x,e.y2));t+=i.state===ri.POINT?1:0;const a=Kf(r,new Ci(e.x,e.y2,e.x2,e.y2));t+=a.state===ri.POINT?1:0;const s=Kf(r,new Ci(e.x2,e.y,e.x2,e.y2));return t+=s.state===ri.POINT?1:0,{top:n,left:i,bottom:a,right:s,count:t}}class Qi{constructor(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i}get x2(){return this.x+this.width}get y2(){return this.y+this.height}get cx(){return this.x+this.width/2}get cy(){return this.y+this.height/2}get radius(){return Math.max(this.width,this.height)/2}static from(e){return new Qi(e.x,e.y,e.width,e.height)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}clone(){return new Qi(this.x,this.y,this.width,this.height)}add(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),i=Math.max(this.x2,e.x+e.width),a=Math.max(this.y2,e.y+e.height);this.x=t,this.y=n,this.width=i-t,this.height=a-n}addPoint(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),i=Math.max(this.x2,e.x),a=Math.max(this.y2,e.y);this.x=t,this.y=n,this.width=i-t,this.height=a-n}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(e){e.rect(this.x,this.y,this.width,this.height)}containsPt(e,t){return e>=this.x&&e<=this.x2&&t>=this.y&&t<=this.y2}get area(){return this.width*this.height}intersects(e){return this.area<=0||e.width<=0||e.height<=0?!1:e.x+e.width>this.x&&e.y+e.height>this.y&&e.x=this.width?this.width-1:e}boundY(e){return e=this.height?this.height-1:e}scaleX(e){return this.boundX(Math.floor((e-this.pixelX)/this.pixelGroup))}scaleY(e){return this.boundY(Math.floor((e-this.pixelY)/this.pixelGroup))}scale(e){const t=this.scaleX(e.x),n=this.scaleY(e.y),i=this.boundX(Math.ceil((e.x+e.width-this.pixelX)/this.pixelGroup)),a=this.boundY(Math.ceil((e.y+e.height-this.pixelY)/this.pixelGroup)),s=i-t,o=a-n;return new Qi(t,n,s,o)}invertScaleX(e){return Math.round(e*this.pixelGroup+this.pixelX)}invertScaleY(e){return Math.round(e*this.pixelGroup+this.pixelY)}addPadding(e,t){const n=Math.ceil(t/this.pixelGroup),i=this.boundX(e.x-n),a=this.boundY(e.y-n),s=this.boundX(e.x2+n),o=this.boundY(e.y2+n),l=s-i,u=o-a;return new Qi(i,a,l,u)}get(e,t){return e<0||t<0||e>=this.width||t>=this.height?Number.NaN:this.area[e+t*this.width]}inc(e,t,n){e<0||t<0||e>=this.width||t>=this.height||(this.area[e+t*this.width]+=n)}set(e,t,n){e<0||t<0||e>=this.width||t>=this.height||(this.area[e+t*this.width]=n)}incArea(e,t){if(e.width<=0||e.height<=0||t===0)return;const n=this.width,i=e.width,a=Math.max(0,e.i),s=Math.max(0,e.j),o=Math.min(e.i+e.width,n),l=Math.min(e.j+e.height,this.height);if(!(l<=0||o<=0||a>=n||l>=this.height))for(let u=s;uMath.min(s,o),Number.POSITIVE_INFINITY),i=this.area.reduce((s,o)=>Math.max(s,o),Number.NEGATIVE_INFINITY),a=s=>(s-n)/(i-n);e.scale(this.pixelGroup,this.pixelGroup);for(let s=0;st?"black":"white",e.fillRect(i,a,1,1)}e.restore()}}}function tx(r,e){const t=n=>({x:n.x-e,y:n.y-e,width:n.width+2*e,height:n.height+2*e});return Array.isArray(r)?r.map(t):t(r)}function nx(r,e,t){return rx(Object.assign(qE(r),{distSquare:(n,i)=>x0(r.x1,r.y1,r.x2,r.y2,n,i)}),e,t)}function rx(r,e,t){const n=tx(r,t),i=e.scale(n),a=e.createSub(i,n);return _N(a,e,t,(s,o)=>r.distSquare(s,o)),a}function _N(r,e,t,n){const i=t*t;for(let a=0;a{const o=i.slice(0,s);return bN(e,a,o,t,n)}).flat()}function bN(r,e,t,n,i){const a=Zr(e.cx,e.cy),s=AN(a,t,r);if(s==null)return[];const o=new Ci(a.x,a.y,s.cx,s.cy),l=wN(o,r,n,i);return MN(l,r)}function wN(r,e,t,n){const i=[],a=[];a.push(r);let s=!0;for(let o=0;o0;){const l=a.pop(),u=ix(e,l),h=u?mN(l,u):null;if(!u||!h||h.count!==2){s||i.push(l);continue}let p=n,S=Jf(u,p,h,!0),N=Bo(S,a)||Bo(S,i),U=Qf(S,e);for(;!N&&U&&p>=1;)p/=1.5,S=Jf(u,p,h,!0),N=Bo(S,a)||Bo(S,i),U=Qf(S,e);if(S&&!N&&!U&&(a.push(new Ci(l.x1,l.y1,S.x,S.y)),a.push(new Ci(S.x,S.y,l.x2,l.y2)),s=!0),s)continue;p=n,S=Jf(u,p,h,!1);let H=Bo(S,a)||Bo(S,i);for(U=Qf(S,e);!H&&U&&p>=1;)p/=1.5,S=Jf(u,p,h,!1),H=Bo(S,a)||Bo(S,i),U=Qf(S,e);S&&!H&&(a.push(new Ci(l.x1,l.y1,S.x,S.y)),a.push(new Ci(S.x,S.y,l.x2,l.y2)),s=!0),s||i.push(l)}for(;a.length>0;)i.push(a.pop());return i}function MN(r,e){const t=[];for(;r.length>0;){const n=r.pop();if(r.length===0){t.push(n);break}const i=r.pop(),a=new Ci(n.x1,n.y1,i.x2,i.y2);ix(e,a)?(t.push(n),r.push(i)):r.push(a)}return t}function AN(r,e,t){let n=Number.POSITIVE_INFINITY;return e.reduce((i,a)=>{const s=No(r.x,r.y,a.cx,a.cy);if(s>n)return i;const o=new Ci(r.x,r.y,a.cx,a.cy),l=PN(t,o);return s*(l+1)*(l+1){e+=n.cx,t+=n.cy}),e/=r.length,t/=r.length,r.map(n=>{const i=e-n.cx,a=t-n.cy,s=i*i+a*a;return[n,s]}).sort((n,i)=>n[1]-i[1]).map(n=>n[0])}function Qf(r,e){return e.some(t=>t.containsPt(r.x,r.y))}function Bo(r,e){return e.some(t=>!!(JE(t.x1,t.y1,r.x,r.y,.001)||JE(t.x2,t.y2,r.x,r.y,.001)))}function ix(r,e){let t=Number.POSITIVE_INFINITY,n=null;for(const i of r){if(!ex(i,e))continue;const a=pN(i,e);a>=0&&aex(n,e)&&gN(n,e)?t+1:t,0)}function Jf(r,e,t,n){const i=t.top,a=t.left,s=t.bottom,o=t.right;if(n){if(a.state===ri.POINT){if(i.state===ri.POINT)return Zr(r.x-e,r.y-e);if(s.state===ri.POINT)return Zr(r.x-e,r.y2+e);const S=r.width*r.height;return r.width*((a.y-r.y+(o.y-r.y))*.5)o.y?Zr(r.x-e,r.y-e):Zr(r.x2+e,r.y-e):a.ys.x?Zr(r.x-e,r.y-e):Zr(r.x-e,r.y2+e):i.xo.y?Zr(r.x2+e,r.y2+e):Zr(r.x-e,r.y2+e):a.ys.x?Zr(r.x2+e,r.y2+e):Zr(r.x2+e,r.y-e):i.xn)return!1}return!0}function ON(r=0){return e=>{if(r<0||e.length<3)return e;const t=[];let n=0;const i=r*r;for(;n{if(s.length<3)return s;const o=[],l=s.closed,u=s.length+3-1+(l?0:2);o.push(a(s,2-(l?0:2),0));for(let h=2-(l?0:2);h{let t=r,n=e.length;if(t>1)for(n=Math.floor(e.length/t);n<3&&t>1;)t-=1,n=Math.floor(e.length/t);const i=[];for(let a=0,s=0;s=n?this.closed?this.get(e-n):this.points[n-1]:this.points[t]}get length(){return this.points.length}toString(e=1/0){const t=this.points;if(t.length===0)return"";const n=typeof e=="function"?e:vN(e);let i="M";for(const a of t)i+=`${n(a.x)},${n(a.y)} L`;return i=i.slice(0,-1),this.closed&&(i+=" Z"),i}draw(e){const t=this.points;if(t.length!==0){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(const n of t)e.lineTo(n.x,n.y);this.closed&&e.closePath()}}sample(e){return LN(e)(this)}simplify(e){return ON(e)(this)}bSplines(e){return CN(e)(this)}apply(e){return e(this)}containsElements(e){const t=yN(this.points);return t?e.every(n=>t.containsPt(n.cx,n.cy)&&this.withinArea(n.cx,n.cy)):!1}withinArea(e,t){if(this.length===0)return!1;let n=0;const i=this.points[0],a=new Ci(i.x,i.y,i.x,i.y);for(let s=1;se?h+p:h}function a(l,u){let h=dc;return h=i(l,u,h,1),h=i(l+1,u,h,2),h=i(l,u+1,h,4),h=i(l+1,u+1,h,8),Number.isNaN(h)?-1:h}let s=qf;function o(l,u){let h=l,p=u,S=r.invertScaleX(h),N=r.invertScaleY(p);for(let U=0;Uax(n.raw,e));return t<0?!1:(this.members.splice(t,1),this.dirty.add(ms.MEMBERS),!0)}removeNonMember(e){const t=this.nonMembers.findIndex(n=>ax(n.raw,e));return t<0?!1:(this.nonMembers.splice(t,1),this.dirty.add(ms.NON_MEMBERS),!0)}removeEdge(e){const t=this.edges.findIndex(n=>n.obj.equals(e));return t<0?!1:(this.edges.splice(t,1),this.dirty.add(ms.NON_MEMBERS),!0)}pushNonMember(...e){if(e.length!==0){this.dirty.add(ms.NON_MEMBERS);for(const t of e)this.nonMembers.push({raw:t,obj:vc(t)?Yf.from(t):Qi.from(t),area:null})}}pushEdge(...e){if(e.length!==0){this.dirty.add(ms.EDGES);for(const t of e)this.edges.push({raw:t,obj:Ci.from(t),area:null})}}update(){const e=this.dirty.has(ms.MEMBERS),t=this.dirty.has(ms.NON_MEMBERS);let n=this.dirty.has(ms.EDGES);this.dirty.clear();const i=this.members.map(u=>u.obj);if(this.o.virtualEdges&&(e||t)){const u=this.nonMembers.map(S=>S.obj),h=xN(i,u,this.o.maxRoutingIterations,this.o.morphBuffer),p=new Map(this.virtualEdges.map(S=>[S.obj.toString(),S.area]));this.virtualEdges=h.map(S=>{var N;return{raw:S,obj:S,area:(N=p.get(S.toString()))!==null&&N!==void 0?N:null}}),n=!0}let a=!1;if(e||n){const u=this.virtualEdges.concat(this.edges).map(N=>N.obj),h=BN(i,u),p=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,S=Qi.from(tx(h,p));S.equals(this.activeRegion)||(a=!0,this.activeRegion=S)}if(a){const u=Math.ceil(this.activeRegion.width/this.o.pixelGroup),h=Math.ceil(this.activeRegion.height/this.o.pixelGroup);this.activeRegion.x!==this.potentialArea.pixelX||this.activeRegion.y!==this.potentialArea.pixelY?(this.potentialArea=bl.fromPixelRegion(this.activeRegion,this.o.pixelGroup),this.members.forEach(p=>p.area=null),this.nonMembers.forEach(p=>p.area=null),this.edges.forEach(p=>p.area=null),this.virtualEdges.forEach(p=>p.area=null)):(u!==this.potentialArea.width||h!==this.potentialArea.height)&&(this.potentialArea=bl.fromPixelRegion(this.activeRegion,this.o.pixelGroup))}const s=new Map,o=u=>{if(u.area){const h=`${u.obj.width}x${u.obj.height}x${u.obj instanceof Qi?"R":"C"}`;s.set(h,u.area)}},l=u=>{if(u.area)return;const h=`${u.obj.width}x${u.obj.height}x${u.obj instanceof Qi?"R":"C"}`;if(s.has(h)){const S=s.get(h);u.area=this.potentialArea.copy(S,{x:u.obj.x-this.o.nodeR1,y:u.obj.y-this.o.nodeR1});return}const p=u.obj instanceof Qi?EN(u.obj,this.potentialArea,this.o.nodeR1):rx(u.obj,this.potentialArea,this.o.nodeR1);u.area=p,s.set(h,p)};this.members.forEach(o),this.nonMembers.forEach(o),this.members.forEach(l),this.nonMembers.forEach(u=>{this.activeRegion.intersects(u.obj)?l(u):u.area=null}),this.edges.forEach(u=>{u.area||(u.area=nx(u.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(u=>{u.area||(u.area=nx(u.obj,this.potentialArea,this.o.edgeR1))})}drawMembers(e){for(const t of this.members)t.obj.draw(e)}drawNonMembers(e){for(const t of this.nonMembers)t.obj.draw(e)}drawEdges(e){for(const t of this.edges)t.obj.draw(e)}drawPotentialArea(e,t=!0){this.potentialArea.draw(e,t)}compute(){if(this.members.length===0)return new wl([]);this.dirty.size>0&&this.update();const{o:e,potentialArea:t}=this,n=this.members.map(o=>o.area),i=this.virtualEdges.concat(this.edges).map(o=>o.area),a=this.nonMembers.filter(o=>o.area!=null).map(o=>o.area),s=this.members.map(o=>o.obj);return NN(t,n,i,a,o=>o.containsElements(s),e)}}function NN(r,e,t,n,i,a={}){const s=Object.assign({},ed,a);let o=s.threshold,l=s.memberInfluenceFactor,u=s.edgeInfluenceFactor,h=s.nonMemberInfluenceFactor;const p=(s.nodeR0-s.nodeR1)*(s.nodeR0-s.nodeR1),S=(s.edgeR0-s.edgeR1)*(s.edgeR0-s.edgeR1);for(let N=0;N0)h*=.8;else break}return new wl([])}function BN(r,e){if(r.length===0)return new Qi(0,0,0,0);const t=Qi.from(r[0]);for(const n of r)t.add(n);for(const n of e)t.add(qE(n));return t}function m9(r,e=[],t=[],n={}){if(r.length===0)return new wl([]);const i=new M0(n);return i.pushMember(...r),i.pushNonMember(...e),i.pushEdge(...t),i.compute()}var kN=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const{style:n,bubbleSetOptions:i}=this.parseOptions();ci(this.bubbleSetOptions,i)||this.init(),this.bubbleSetOptions=Object.assign({},i);const a=Object.assign(Object.assign({},n),{d:this.getPath()});this.shape?this.shape.update(a):(this.shape=new ic({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=n=>{if(!this.shape)return;const i=Et(n.data);[...this.options.members,...this.options.avoidMembers].includes(i)&&this.shape.update(Object.assign(Object.assign({},this.parseOptions().style),{d:this.getPath(i)}))},this.getPath=n=>{const{graph:i}=this.context,a=this.options.members,s=[...this.members.keys()],o=this.options.avoidMembers,l=[...this.avoidMembers.keys()];if(!n&&ci(a,s)&&ci(o,l))return this.path;const{enter:u=[],exit:h=[]}=Ao(s,a,V=>V),{enter:p=[],exit:S=[]}=Ao(l,o,V=>V);n&&(h.push(n),u.push(n));const N=(V,Y,q)=>{V.forEach(ne=>{const le=q?this.members:this.avoidMembers,ue=q?"pushMember":"pushNonMember",fe=q?"removeMember":"removeNonMember";if(Y){let de;i.getElementType(ne)==="edge"?([de]=zN(i,ne),this.bubbleSets.pushEdge(de)):([de]=FN(i,ne),this.bubbleSets[ue](de)),le.set(ne,de)}else{const de=le.get(ne);de&&(i.getElementType(ne)==="edge"?this.bubbleSets.removeEdge(de):this.bubbleSets[fe](de),le.delete(ne))}})};N(h,!1,!0),N(u,!0,!0),N(S,!1,!1),N(p,!0,!1);const H=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=l1(H.points.map(Fi)),this.path},this.bindEvents(),this.bubbleSets=new M0(this.options)}bindEvents(){this.context.graph.on(Qt.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(Qt.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new M0(this.options),this.members=new Map,this.avoidMembers=new Map}parseOptions(){const e=this.options,{type:t,key:n,members:i,avoidMembers:a}=e,s=kN(e,["type","key","members","avoidMembers"]),o=Object.keys(s).reduce((l,u)=>(u in ed?l.bubbleSetOptions[u]=s[u]:l.style[u]=s[u],l),{style:{},bubbleSetOptions:{}});return Object.assign({type:t,key:n,members:i,avoidMembers:a},o)}addMember(e){const t=Array.isArray(e)?e:[e];t.some(n=>this.options.avoidMembers.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!t.includes(n))),this.options.members=[...new Set([...this.options.members,...t])],this.drawBubbleSets()}removeMember(e){const t=Array.isArray(e)?e:[e];this.options.members=this.options.members.filter(n=>!t.includes(n)),this.drawBubbleSets()}updateMember(e){this.options.members=yn(e)?e(this.options.members):e,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(e){const t=Array.isArray(e)?e:[e];t.some(n=>this.options.members.includes(n))&&(this.options.members=this.options.members.filter(n=>!t.includes(n))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...t])],this.drawBubbleSets()}removeAvoidMember(e){const t=Array.isArray(e)?e:[e];this.options.avoidMembers.some(n=>t.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!t.includes(n)),this.drawBubbleSets())}updateAvoidMember(e){this.options.avoidMembers=Array.isArray(e)?e:[e],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(Qt.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(Qt.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape.destroy(),super.destroy()}}td.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},ed);const FN=(r,e)=>(Array.isArray(e)?e:[e]).map(n=>{const i=r.getElementRenderBounds(n);return new Qi(i.min[0],i.min[1],Ns(i),Bs(i))}),zN=(r,e)=>(Array.isArray(e)?e:[e]).map(n=>{const i=r.getEdgeData(n),a=r.getElementPosition(i.source),s=r.getElementPosition(i.target);return Ci.from({x1:a[0],y1:a[1],x2:s[0],y2:s[1]})});class y9 extends null{constructor(e,t){super(e,t),this.setOptions=n=>{const i={cameraType:"setType",near:"setNear",far:"setFar",fov:"setFov",aspect:"setAspect",projectionMode:"setProjectionMode",distance:"setDistance",minDistance:"setMinDistance",maxDistance:"setMaxDistance",roll:"setRoll",elevation:"setElevation",azimuth:"setAzimuth"},a=(s,o)=>{switch(s){case"projectionMode":return o==="perspective"?1:0;case"cameraType":return{orbiting:0,exploring:1,tracking:2}[o];case"aspect":return typeof o=="number"?o:this.getCanvasAspect();default:return o}};Object.entries(i).forEach(([s,o])=>{const l=n[s];if(l!==void 0){const u=a(s,l);this.context.canvas.getCamera()[o](u)}})},this.bindEvents()}update(e){this.setOptions(e),super.update(e)}bindEvents(){this.context.graph.once(GraphEvent.BEFORE_DRAW,()=>this.setOptions(this.options))}getCanvasAspect(){const[e,t]=this.context.viewport.getCanvasSize();return e/t}}function UN(r){return`
    ${r.map(e=>`
  • ${e.name}
  • `).join("")}
`}const WN=` .g6-contextmenu { font-size: 12px; background-color: rgba(255, 255, 255, 0.96); border-radius: 4px; overflow: hidden; box-shadow: rgba(0, 0, 0, 0.12) 0px 6px 12px 0px; transition: visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s; } .g6-contextmenu-ul { max-width: 256px; min-width: 96px; list-style: none; padding: 0; margin: 0; } .g6-contextmenu-li { padding: 8px 12px; cursor: pointer; user-select: none; } .g6-contextmenu-li:hover { background-color: #f5f5f5; cursor: pointer; } `;var sx=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class nd extends zi{constructor(e,t){super(e,Object.assign({},nd.defaultOptions,t)),this.targetElement=null,this.onTriggerEvent=n=>{var i;(i=n.preventDefault)===null||i===void 0||i.call(n),this.show(n)},this.onMenuItemClick=n=>{const{onClick:i,trigger:a}=this.options;if(n.target instanceof HTMLElement&&n.target.className.includes("g6-contextmenu-li")){const s=n.target.getAttribute("value");i==null||i(s,n.target,this.targetElement),this.hide()}a!=="click"&&this.hide()},this.initElement(),this.update(t)}initElement(){this.$element=au("contextmenu",!1,{zIndex:"99"});const{className:e}=this.options;e&&this.$element.classList.add(e),this.context.canvas.getContainer().appendChild(this.$element),E0("g6-contextmenu-css","style",{},WN,document.head)}show(e){return sx(this,void 0,void 0,function*(){const{enable:t,offset:n}=this.options;if(typeof t=="function"&&!t(e)||!t){this.hide();return}const i=yield this.getDOMContent(e);i instanceof HTMLElement?(this.$element.innerHTML="",this.$element.appendChild(i)):this.$element.innerHTML=i;const a=this.context.graph.getCanvas().getContainer().getBoundingClientRect();this.$element.style.left=`${e.client.x-a.left+n[0]}px`,this.$element.style.top=`${e.client.y-a.top+n[1]}px`,this.$element.style.display="block",this.targetElement=e.target})}hide(){this.$element.style.display="none",this.targetElement=null}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.$element.remove()}getDOMContent(e){return sx(this,void 0,void 0,function*(){const{getContent:t,getItems:n}=this.options;return n?UN(yield n(e)):yield t(e)})}bindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;e.on(`canvas:${t}`,this.onTriggerEvent),e.on(`node:${t}`,this.onTriggerEvent),e.on(`edge:${t}`,this.onTriggerEvent),e.on(`combo:${t}`,this.onTriggerEvent),document.addEventListener("click",this.onMenuItemClick)}unbindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;e.off(`canvas:${t}`,this.onTriggerEvent),e.off(`node:${t}`,this.onTriggerEvent),e.off(`edge:${t}`,this.onTriggerEvent),e.off(`combo:${t}`,this.onTriggerEvent),document.removeEventListener("click",this.onMenuItemClick)}}nd.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'
Loading...
',getContent:()=>"It is a empty context menu.",enable:()=>!0};class rd extends zi{constructor(e,t){super(e,Object.assign({},rd.defaultOptions,t)),this.edgeBundles={},this.edgePoints={},this.onBundle=()=>{const{model:n,element:i}=this.context,a=n.getEdgeData();this.divideEdges(this.options.divisions);const{cycles:s,iterRate:o,divRate:l}=this.options;let{lambda:u,divisions:h,iterations:p}=this.options;for(let S=0;S{var V;if(H.source===H.target)return;const Y=Et(H);U[Y]=this.getEdgeForces(H,h,u);for(let q=0;q{const N=Et(S),U=i.getElement(N);U==null||U.update({d:Gg(this.edgePoints[N])})})},this.bindEvents()}get nodeMap(){const e=this.context.model.getNodeData();return Object.fromEntries(e.map(t=>[Et(t),fl(Ti(t))]))}divideEdges(e){this.context.model.getEdgeData().forEach(n=>{var i;const a=Et(n);(i=this.edgePoints)[a]||(i[a]=[]);const s=this.nodeMap[n.source],o=this.nodeMap[n.target];if(e===1)this.edgePoints[a].push(s),this.edgePoints[a].push(vs(Un(s,o),2)),this.edgePoints[a].push(o);else{const u=(this.edgePoints[a].length===0?Wr(s,o):ZN(this.edgePoints[a]))/(e+1);let h=u;const p=[s];for(let S=1;Sh;){const V=h/H,Y=Un(N,ds(Or(U,N),V));p.push(Y),H-=h,h=u}h-=H}p.push(o),this.edgePoints[a]=p}})}getVectorPosition(e){const t=this.nodeMap[e.source],n=this.nodeMap[e.target],[i,a]=Or(n,t),s=Wr(t,n);return{source:t,target:n,vx:i,vy:a,length:s}}measureEdgeCompatibility(e,t){const n=this.getVectorPosition(e),i=this.getVectorPosition(t),a=HN(n,i),s=GN(n,i),o=jN(n,i),l=VN(n,i);return a*s*o*l}getEdgeBundles(){const e={},t=this.options.bundleThreshold,n=this.context.model.getEdgeData();return n.forEach((i,a)=>{n.forEach((s,o)=>{var l,u;if(o<=a)return;this.measureEdgeCompatibility(i,s)>=t&&(e[l=Et(i)]||(e[l]=[]),e[Et(i)].push(s),e[u=Et(s)]||(e[u]=[]),e[Et(s)].push(i))})}),e}getSpringForce(e,t){const{pre:n,cur:i,next:a}=e;return ds(Or(Un(n,a),ds(i,2)),t)}getElectrostaticForce(e,t){Fs(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const n=this.edgeBundles[Et(t)];let i=[0,0];return n==null||n.forEach(a=>{const s=this.edgePoints[Et(a)][e],o=this.edgePoints[Et(t)][e],l=Or(s,o),u=Wr(s,o);i=Un(i,ds(l,1/u))}),i}getEdgeForces(e,t,n){const i=this.nodeMap[e.source],a=this.nodeMap[e.target],s=this.options.K/(Wr(i,a)*(t+1)),o=[[0,0]],l=Et(e);for(let u=1;uMath.abs(cD([r.vx,r.vy],[e.vx,e.vy])/(r.length*e.length)),GN=(r,e)=>{const t=(r.length+e.length)/2;return 2/(t/Math.min(r.length,e.length)+Math.max(r.length,e.length)/t)},jN=(r,e)=>{const t=(r.length+e.length)/2,n=vs(Un(r.source,r.target),2),i=vs(Un(e.source,e.target),2);return t/(t+Wr(n,i))},ox=(r,e)=>{if(e.source[0]===e.target[0])return[e.source[0],r[1]];if(e.source[1]===e.target[1])return[r[0],e.source[1]];const t=(e.source[1]-e.target[1])/(e.source[0]-e.target[0]),n=(t*t*e.source[0]+t*(r[1]-e.source[1])+r[0])/(t*t+1),i=t*(n-e.source[0])+e.source[1];return[n,i]},lx=(r,e)=>{const t=ox(e.source,r),n=ox(e.target,r),i=vs(Un(t,n),2),a=vs(Un(r.source,r.target),2);return Wr(t,n)===0?0:Math.max(0,1-2*Wr(a,i)/Wr(t,n))},VN=(r,e)=>Math.min(lx(r,e),lx(e,r)),ZN=r=>{let e=0;for(let t=1;t{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Fi(n.canvas);this.renderLens(i),this.renderFocusElements()},this.renderLens=n=>{const i=Object.assign({},KN,this.options.style);this.isLensOn||(this.lens=new gl({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,gs(n),{size:this.r*2}),this.lens.update(i)},this.getFilterData=()=>{const{filter:n}=this.options,{model:i}=this.context,a=i.getData();if(!n)return a;const{nodes:s,edges:o,combos:l}=a;return{nodes:s.filter(u=>n(Et(u),"node")),edges:o.filter(u=>n(Et(u),"edge")),combos:l.filter(u=>n(Et(u),"combo"))}},this.getFocusElements=n=>{const{nodes:i,edges:a}=this.getFilterData(),s=i.filter(u=>Wr(Ti(u),n)Et(u)),l=a.filter(u=>{const{source:h,target:p}=u,S=o.includes(h),N=o.includes(p);switch(this.options.nodeType){case"both":return S&&N;case"either":return S!==N;case"source":return S&&!N;case"target":return!S&&N;default:return!1}});return{nodes:s,edges:l}},this.renderFocusElements=()=>{const{element:n,graph:i}=this.context;if(!this.isLensOn)return;const a=this.lens.getCenter(),{nodes:s,edges:o}=this.getFocusElements(a),l=new Set,u=h=>{const p=Et(h);l.add(p);const S=n.getElement(p);if(!S)return;const N=this.shapes.get(p)||S.cloneNode();N.setPosition(S.getPosition()),N.id=S.id,this.shapes.has(p)?Object.entries(S.attributes).forEach(([V,Y])=>{N.style[V]!==Y&&(N.style[V]=Y)}):(this.canvas.appendChild(N),this.shapes.set(p,N));const U=i.getElementType(p),H=this.getElementStyle(U,h);N.update(H)};s.forEach(u),o.forEach(u),this.shapes.forEach((h,p)=>{l.has(p)||(h.destroy(),this.shapes.delete(p))})},this.scaleRByWheel=n=>{var i;this.options.preventDefault&&n.preventDefault();const{clientX:a,clientY:s,deltaX:o,deltaY:l}=n,{graph:u,canvas:h}=this.context,p=u.getCanvasByClient([a,s]),S=(i=this.lens)===null||i===void 0?void 0:i.getCenter();if(!this.isLensOn||Wr(p,S)>this.r)return;const{maxR:N,minR:U}=this.options,H=o+l>0?1/(1-ux):1-ux,V=Math.min(...h.getSize())/2;this.r=Math.max(U||0,Math.min(N||V,this.r*H)),this.renderLens(S),this.renderFocusElements()},this.isLensDragging=!1,this.onDragStart=n=>{var i;const a=Fi(n.canvas),s=(i=this.lens)===null||i===void 0?void 0:i.getCenter();!this.isLensOn||Wr(a,s)>this.r||(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Fi(n.canvas);this.renderLens(i),this.renderFocusElements()},this.onDragEnd=()=>{this.isLensDragging=!1},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}getElementStyle(e,t){const n=e==="node"?this.options.nodeStyle:this.options.edgeStyle;return typeof n=="function"?n(t):n}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var e;const{graph:t}=this.context,{trigger:n,scaleRBy:i}=this.options,a=t.getCanvas().getLayer();["click","drag"].includes(n)&&a.addEventListener(Lt.CLICK,this.onEdgeFilter),n==="pointermove"?a.addEventListener(Lt.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.addEventListener(Lt.DRAG_START,this.onDragStart),a.addEventListener(Lt.DRAG,this.onDrag),a.addEventListener(Lt.DRAG_END,this.onDragEnd)),i==="wheel"&&((e=this.graphDom)===null||e===void 0||e.addEventListener(Lt.WHEEL,this.scaleRByWheel,{passive:!1}))}unbindEvents(){var e;const{graph:t}=this.context,{trigger:n,scaleRBy:i}=this.options,a=t.getCanvas().getLayer();["click","drag"].includes(n)&&a.removeEventListener(Lt.CLICK,this.onEdgeFilter),n==="pointermove"?a.removeEventListener(Lt.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.removeEventListener(Lt.DRAG_START,this.onDragStart),a.removeEventListener(Lt.DRAG,this.onDrag),a.removeEventListener(Lt.DRAG_END,this.onDragEnd)),i==="wheel"&&((e=this.graphDom)===null||e===void 0||e.removeEventListener(Lt.WHEEL,this.scaleRByWheel))}update(e){var t;this.unbindEvents(),super.update(e),this.r=(t=e.r)!==null&&t!==void 0?t:this.r,this.bindEvents()}destroy(){this.unbindEvents(),this.isLensOn&&this.lens.destroy(),this.shapes.forEach((e,t)=>{e.destroy(),this.shapes.delete(t)}),super.destroy()}}id.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const XN={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},cx=.05,hx=.1;class ad extends zi{constructor(e,t){super(e,Object.assign({},ad.defaultOptions,t)),this.r=this.options.r,this.d=this.options.d,this.onCreateFisheye=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Fi(n.canvas);this.onMagnify(i)},this.onMagnify=n=>{n.some(isNaN)||(this.renderLens(n),this.renderFocusElements())},this.renderLens=n=>{const i=Object.assign({},XN,this.options.style);this.isLensOn||(this.lens=new gl({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,gs(n),{size:this.r*2,label:this.options.showDPercent,labelText:this.getDPercent()}),this.lens.update(i)},this.getDPercent=()=>{const{minD:n,maxD:i}=this.options;return`${Math.round((this.d-n)/(i-n)*100)}%`},this.prevMagnifiedStyleMap=new Map,this.prevOriginStyleMap=new Map,this.renderFocusElements=()=>{if(!this.isLensOn)return;const{graph:n}=this.context,i=this.lens.getCenter(),a=(this.d+1)*this.r,s=new Map,o=new Map;n.getNodeData().forEach(u=>{const h=Ti(u),p=Wr(h,i);if(p>this.r)return;const S=a*p/(this.d*p+this.r),[N,U]=h,[H,V]=i,Y=(N-H)/p,q=(U-V)/p,ne=[H+S*Y,V+S*q],le=Et(u),ue=this.getNodeStyle(u),fe=ml(n.getElementRenderStyle(le),Object.keys(ue));s.set(le,Object.assign(Object.assign({},gs(ne)),ue)),o.set(le,Object.assign(Object.assign({},gs(h)),fe))}),this.updateStyle(s,o)},this.getNodeStyle=n=>{const{nodeStyle:i}=this.options;return typeof i=="function"?i(n):i},this.updateStyle=(n,i)=>{const{graph:a,element:s}=this.context,{enter:o,exit:l,keep:u}=Ao(Array.from(this.prevMagnifiedStyleMap.keys()),Array.from(n.keys()),S=>S),h=new Set,p=(S,N)=>{const U=s.getElement(S);U==null||U.update(N),a.getRelatedEdgesData(S).forEach(H=>{h.add(Et(H))})};[...o,...u].forEach(S=>{p(S,n.get(S))}),l.forEach(S=>{p(S,this.prevOriginStyleMap.get(S)),this.prevOriginStyleMap.delete(S)}),h.forEach(S=>{const N=s.getElement(S);N==null||N.update({})}),this.prevMagnifiedStyleMap=n,i.forEach((S,N)=>{this.prevOriginStyleMap.has(N)||this.prevOriginStyleMap.set(N,S)})},this.isWheelValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const{clientX:i,clientY:a}=n,s=this.context.graph.getCanvasByClient([i,a]),o=this.lens.getCenter();return!(Wr(s,o)>this.r)},this.scaleR=n=>{const{maxR:i,minR:a}=this.options,s=n?1/(1-cx):1-cx,o=Math.min(...this.context.canvas.getSize())/2;this.r=Math.max(a||0,Math.min(i||o,this.r*s))},this.scaleD=n=>{const{maxD:i,minD:a}=this.options,s=n?this.d+hx:this.d-hx;this.d=Math.max(a,Math.min(i,s))},this.scaleRByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleR(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleD(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.isDragValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const i=Fi(n.canvas),a=this.lens.getCenter();return!(Wr(i,a)>this.r)},this.isLensDragging=!1,this.onDragStart=n=>{this.isDragValid(n)&&(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Fi(n.canvas);this.onMagnify(i)},this.onDragEnd=()=>{this.isLensDragging=!1},this.scaleRByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleR(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleD(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var e;const{graph:t}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,s=t.getCanvas().getLayer();if(["click","drag"].includes(n)&&s.addEventListener(Lt.CLICK,this.onCreateFisheye),n==="pointermove"&&s.addEventListener(Lt.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){s.addEventListener(Lt.DRAG_START,this.onDragStart),s.addEventListener(Lt.DRAG_END,this.onDragEnd);const o=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.addEventListener(Lt.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(e=this.graphDom)===null||e===void 0||e.addEventListener(Lt.WHEEL,o,{passive:!1})}}unbindEvents(){var e;const{graph:t}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,s=t.getCanvas().getLayer();if(["click","drag"].includes(n)&&s.removeEventListener(Lt.CLICK,this.onCreateFisheye),n==="pointermove"&&s.removeEventListener(Lt.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){s.removeEventListener(Lt.DRAG_START,this.onDragStart),s.removeEventListener(Lt.DRAG_END,this.onDragEnd);const o=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.removeEventListener(Lt.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(e=this.graphDom)===null||e===void 0||e.removeEventListener(Lt.WHEEL,o)}}update(e){var t,n;this.unbindEvents(),super.update(e),this.r=(t=e.r)!==null&&t!==void 0?t:this.r,this.d=(n=e.d)!==null&&n!==void 0?n:this.d,this.bindEvents()}destroy(){var e;this.unbindEvents(),this.isLensOn&&((e=this.lens)===null||e===void 0||e.destroy()),this.prevMagnifiedStyleMap.clear(),this.prevOriginStyleMap.clear(),super.destroy()}}ad.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class sd extends zi{constructor(e,t){super(e,Object.assign({},sd.defaultOptions,t)),this.$el=this.context.canvas.getContainer(),this.graphSize=[0,0],this.onFullscreenChange=()=>{var n,i,a,s;const o=!!document.fullscreenElement;this.options.autoFit&&this.setGraphSize(o),o?(i=(n=this.options).onEnter)===null||i===void 0||i.call(n):(s=(a=this.options).onExit)===null||s===void 0||s.call(a)},this.shortcut=new Jl(e.graph),this.bindEvents(),this.style=document.createElement("style"),document.head.appendChild(this.style),this.style.innerHTML=` :not(:root):fullscreen::backdrop { background: transparent; } `}bindEvents(){this.unbindEvents(),this.shortcut.unbindAll();const{request:e=[],exit:t=[]}=this.options.trigger;this.shortcut.bind(e,this.request),this.shortcut.bind(t,this.exit),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(i=>{document.addEventListener(i,this.onFullscreenChange,!1)})}unbindEvents(){this.shortcut.unbindAll(),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(t=>{document.removeEventListener(t,this.onFullscreenChange,!1)})}setGraphSize(e=!0){var t,n;let i,a;e?(i=((t=globalThis.screen)===null||t===void 0?void 0:t.width)||0,a=((n=globalThis.screen)===null||n===void 0?void 0:n.height)||0,this.graphSize=this.context.graph.getSize()):[i,a]=this.graphSize,this.context.graph.setSize(i,a),this.context.graph.render()}request(){document.fullscreenElement||!YN()||this.$el.requestFullscreen().catch(e=>{Ea.warn(`Error attempting to enable full-screen: ${e.message} (${e.name})`)})}exit(){document.fullscreenElement&&document.exitFullscreen()}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}destroy(){this.exit(),this.style.remove(),super.destroy()}}sd.defaultOptions={trigger:{},autoFit:!0};function YN(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}class od extends zi{constructor(e,t){super(e,Object.assign({},od.defaultOptions,t)),this.$element=au("grid-line",!0),this.offset=[0,0],this.currentScale=1,this.followZoom=i=>{const{data:{scale:a,origin:s}}=i;if(!a)return;const o=this.currentScale;this.currentScale=a;const l=a/o,u=ds(s||this.context.graph.getCanvasCenter(),1-l),h=this.baseSize*a,p=ds(this.offset,l),S=bg(p,h),N=Un(S,u);this.$element.style.backgroundSize=`${h}px ${h}px`,this.$element.style.backgroundPosition=`${N[0]}px ${N[1]}px`,this.offset=bg(N,h)},this.followTranslate=i=>{if(!this.options.follow)return;const{data:{translate:a}}=i;a&&this.updateOffset(a)},this.onTransform=i=>{const a=this.parseFollow(this.options.follow);a.zoom&&this.followZoom(i),a.translate&&this.followTranslate(i)},this.context.canvas.getContainer().prepend(this.$element),this.baseSize=this.options.size,this.updateStyle(),this.bindEvents()}update(e){super.update(e),e.size!==void 0&&(this.baseSize=e.size),this.updateStyle()}bindEvents(){const{graph:e}=this.context;e.on(Qt.AFTER_TRANSFORM,this.onTransform)}updateStyle(){const{stroke:e,lineWidth:t,border:n,borderLineWidth:i,borderStroke:a,borderStyle:s}=this.options,o=this.baseSize*this.currentScale;Object.assign(this.$element.style,{border:n?`${i}px ${s} ${a}`:"none",backgroundImage:`linear-gradient(${e} ${t}px, transparent ${t}px), linear-gradient(90deg, ${e} ${t}px, transparent ${t}px)`,backgroundSize:`${o}px ${o}px`,backgroundRepeat:"repeat"})}updateOffset(e){const t=this.baseSize*this.currentScale;this.offset=bg(Un(this.offset,e),t),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}parseFollow(e){var t,n;return Su(e)?{translate:e,zoom:e}:{translate:(t=e==null?void 0:e.translate)!==null&&t!==void 0?t:!1,zoom:(n=e==null?void 0:e.zoom)!==null&&n!==void 0?n:!1}}destroy(){this.context.graph.off(Qt.AFTER_TRANSFORM,this.onTransform),this.$element.remove(),super.destroy()}}od.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};function A0(r){const e={Added:new Map,Updated:new Map,Removed:new Map};return r.forEach(t=>{const{type:n,value:i}=t,a=Et(i);if(n==="NodeAdded"||n==="EdgeAdded"||n==="ComboAdded")e.Added.set(a,t);else if(n==="NodeUpdated"||n==="EdgeUpdated"||n==="ComboUpdated")if(e.Added.has(a))e.Added.set(a,{type:n.replace("Updated","Added"),value:i});else if(e.Updated.has(a)){const{original:s}=e.Updated.get(a);e.Updated.set(a,{type:n,value:i,original:s})}else e.Removed.has(a)||e.Updated.set(a,t);else(n==="NodeRemoved"||n==="EdgeRemoved"||n==="ComboRemoved")&&(e.Added.has(a)?e.Added.delete(a):(e.Updated.has(a)&&e.Updated.delete(a),e.Removed.set(a,t)))}),[...Array.from(e.Added.values()),...Array.from(e.Updated.values()),...Array.from(e.Removed.values())]}function fx(r){const{NodeAdded:e=[],NodeUpdated:t=[],NodeRemoved:n=[],EdgeAdded:i=[],EdgeUpdated:a=[],EdgeRemoved:s=[],ComboAdded:o=[],ComboUpdated:l=[],ComboRemoved:u=[]}=Ch(r,h=>h.type);return{add:{nodes:e,edges:i,combos:o},update:{nodes:t,edges:a,combos:l},remove:{nodes:n,edges:s,combos:u}}}function dx(r,e){for(const t in r)li(r[t])&&!Array.isArray(r[t])&&r[t]!==null?(e[t]||(e[t]={}),dx(r[t],e[t])):e[t]===void 0&&(e[t]=Ku(t))}function QN(r,e=!1,t){const n={animation:e,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:i,update:a,remove:s}=fx(A0(r));return["nodes","edges","combos"].forEach(o=>{a[o]&&a[o].forEach(l=>{var u,h;const p=Object.assign({},l.value);let S=Object.assign({},l.original);if(t){const N=t.graph.getElementType(Et(l.original)),U=N==="edge"?"stroke":"fill",H=t.element.getElementComputedStyle(N,l.original);S=Object.assign(Object.assign({},l.original),{style:Object.assign({[U]:H[U]},l.original.style)})}dx(p,S),(u=n.current.update)[o]||(u[o]=[]),n.current.update[o].push(p),(h=n.original.update)[o]||(h[o]=[]),n.original.update[o].push(S)}),i[o]&&i[o].forEach(l=>{var u,h;const p=Object.assign({},l.value);(u=n.current.add)[o]||(u[o]=[]),n.current.add[o].push(p),(h=n.original.remove)[o]||(h[o]=[]),n.original.remove[o].push(p)}),s[o]&&s[o].forEach(l=>{var u,h;const p=Object.assign({},l.value);(u=n.current.remove)[o]||(u[o]=[]),n.current.remove[o].push(p),(h=n.original.add)[o]||(h[o]=[]),n.original.add[o].push(p)})}),n}class ld extends zi{constructor(e,t){super(e,Object.assign({},ld.defaultOptions,t)),this.batchChanges=null,this.batchAnimation=!1,this.undoStack=[],this.redoStack=[],this.freezed=!1,this.executeCommand=(i,a=!0)=>{var s,o,l;this.freezed=!0,(o=(s=this.options).executeCommand)===null||o===void 0||o.call(s,i);const u=a?i.original:i.current;this.context.graph.addData(u.add),this.context.graph.updateData(u.update),this.context.graph.removeData(N_(u.remove,!1)),(l=this.context.element)===null||l===void 0||l.draw({silence:!0,animation:i.animation}),this.freezed=!1},this.addCommand=i=>{var a;if(!this.freezed){if(i.type===Qt.AFTER_DRAW){const{dataChanges:s=[],animation:o=!0}=i.data;if(!((a=this.context.batch)===null||a===void 0)&&a.isBatching){if(!this.batchChanges)return;this.batchChanges.push(s),this.batchAnimation&&(this.batchAnimation=o);return}this.batchChanges=[s],this.batchAnimation=o}this.undoStackPush(QN(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(xo.ADD,this.undoStack[this.undoStack.length-1])}},this.initBatchCommand=i=>{const{initiate:a}=i.data;this.batchAnimation=!1,a?this.batchChanges=[]:this.undoStack.pop()||(this.batchChanges=null)},this.emitter=new Df;const{graph:n}=this.context;n.on(Qt.AFTER_DRAW,this.addCommand),n.on(Qt.BATCH_START,this.initBatchCommand),n.on(Qt.BATCH_END,this.addCommand)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(){var e,t,n,i;const a=this.undoStack.pop();if(a){if(this.executeCommand(a),((t=(e=this.options).beforeAddCommand)===null||t===void 0?void 0:t.call(e,a,!1))===!1)return;this.redoStack.push(a),(i=(n=this.options).afterAddCommand)===null||i===void 0||i.call(n,a,!1),this.notify(xo.UNDO,a)}return this}redo(){const e=this.redoStack.pop();return e&&(this.executeCommand(e,!1),this.undoStackPush(e),this.notify(xo.REDO,e)),this}undoAndCancel(){const e=this.undoStack.pop();return e&&(this.executeCommand(e,!1),this.redoStack=[],this.notify(xo.CANCEL,e)),this}undoStackPush(e){var t,n,i,a;const{stackSize:s}=this.options;s!==0&&this.undoStack.length>=s&&this.undoStack.shift(),((n=(t=this.options).beforeAddCommand)===null||n===void 0?void 0:n.call(t,e,!0))!==!1&&(this.undoStack.push(e),(a=(i=this.options).afterAddCommand)===null||a===void 0||a.call(i,e,!0))}clear(){this.undoStack=[],this.redoStack=[],this.batchChanges=null,this.batchAnimation=!1,this.notify(xo.CLEAR,null)}notify(e,t){this.emitter.emit(e,{cmd:t}),this.emitter.emit(xo.CHANGE,{cmd:t})}on(e,t){this.emitter.on(e,t)}destroy(){const{graph:e}=this.context;e.off(Qt.AFTER_DRAW,this.addCommand),e.off(Qt.BATCH_START,this.initBatchCommand),e.off(Qt.BATCH_END,this.addCommand),this.emitter.off(),super.destroy(),this.undoStack=[],this.redoStack=[]}}ld.defaultOptions={stackSize:0};const T0={toXy(r,e){if(!e)return[...r];const t=e[0].slice(1),n=e[1].slice(1);return r.map(i=>[i[t],i[n]])},fromXy(r,e){if(!e)return[...r];const t=e[0].slice(1),n=e[1].slice(1);return r.map(([i,a])=>({[t]:i,[n]:a}))}};class JN{constructor(e,t){this._cells=[],this._cellSize=t,this._reverseCellSize=1/t;for(const n of e){const i=this.coordToCellNum(n[0]),a=this.coordToCellNum(n[1]);this._cells[i]||(this._cells[i]=[]),this._cells[i][a]||(this._cells[i][a]=[]),this._cells[i][a].push(n)}}cellPoints(e,t){var n;return((n=this._cells[e])===null||n===void 0?void 0:n[t])||[]}rangePoints(e){const t=this.coordToCellNum(e[0]),n=this.coordToCellNum(e[1]),i=this.coordToCellNum(e[2]),a=this.coordToCellNum(e[3]),s=[];for(let o=t;o<=i;o++)for(let l=n;l<=a;l++){const u=this.cellPoints(o,l);for(const h of u)s.push(h)}return s}removePoint(e){const t=this.coordToCellNum(e[0]),n=this.coordToCellNum(e[1]),i=this._cells[t][n],a=i.findIndex(([s,o])=>s===e[0]&&o===e[1]);return a>-1&&i.splice(a,1),i}trunc(e){return Math.trunc(e)}coordToCellNum(e){return this.trunc(e*this._reverseCellSize)}extendBbox(e,t){return[e[0]-t*this._cellSize,e[1]-t*this._cellSize,e[2]+t*this._cellSize,e[3]+t*this._cellSize]}}function qN(r,e){return new JN(r,e)}const vx=+(Math.pow(2,27)+1);function ud(r,e,t){const n=r*e,i=vx*r,a=i-r,s=i-a,o=r-s,l=vx*e,u=l-e,h=l-u,p=e-h,U=n-s*h-o*h-s*p,H=o*p-U;return t?(t[0]=H,t[1]=n,t):[H,n]}function $N(r,e,t){const n=r+e,i=n-r,a=n-i,s=e-i,o=r-a;return t?(t[0]=o+s,t[1]=n,t):[o+s,n]}function eB(r,e){const t=r.length;if(t===1){const o=ud(r[0],e);return o[0]?o:[o[1]]}const n=new Array(2*t),i=[.1,.1],a=[.1,.1];let s=0;ud(r[0],e,i),i[0]&&(n[s++]=i[0]);for(let o=1;o=n?(U=h,o+=1,o=n?(U=h,o+=1,o0){if(a<=0)return s;o=i+a}else if(i<0){if(a>=0)return s;o=-(i+a)}else return s;const l=aB*o;return s>=l||s<=-l?s:cB(e,t,n)},function(e,t,n,i){const a=e[0]-i[0],s=t[0]-i[0],o=n[0]-i[0],l=e[1]-i[1],u=t[1]-i[1],h=n[1]-i[1],p=e[2]-i[2],S=t[2]-i[2],N=n[2]-i[2],U=s*h,H=o*u,V=o*l,Y=a*h,q=a*u,ne=s*l,le=p*(U-H)+S*(V-Y)+N*(q-ne),ue=(Math.abs(U)+Math.abs(H))*Math.abs(p)+(Math.abs(V)+Math.abs(Y))*Math.abs(S)+(Math.abs(q)+Math.abs(ne))*Math.abs(N),fe=sB*ue;return le>fe||-le>fe?le:hB(e,t,n,i)}];function fB(r){let e=Ml[r.length];return e||(e=Ml[r.length]=hd(r.length)),e.apply(void 0,...r)}function dB(r,e,t,n,i,a,s){return function(...l){switch(l.length){case 0:case 1:return 0;case 2:return n(l[0],l[1]);case 3:return i(l[0],l[1],l[2]);case 4:return a(l[0],l[1],l[2],l[3]);case 5:return s(l[0],l[1],l[2],l[3],l[4])}return r(l)}}function vB(){for(;Ml.length<=gx;)Ml.push(hd(Ml.length));const r=dB(void 0,fB,...Ml);for(let e=0;e<=gx;++e)r[e]=Ml[e];return r}var gc=vB();const px=gc[3];function gB(r){const e=r.length;if(e<3){const o=new Array(e);for(let l=0;l{const u=r[o][0]-r[l][0];return u||r[o][1]-r[l][1]});const n=[t[0],t[1]],i=[t[0],t[1]];for(let o=2;o1&&px(r[n[h-2]],r[n[h-1]],u)<=0;)h-=1,n.pop();for(n.push(l),h=i.length;h>1&&px(r[i[h-2]],r[i[h-1]],u)>=0;)h-=1,i.pop();i.push(l)}const a=new Array(i.length+n.length-2);let s=0;for(let o=0,l=n.length;o0;--o)a[s++]=i[o];return a}function pB(r,e,t,n){for(let i=0;i<2;++i){const a=r[i],s=e[i],[o,l]=[Math.min(a,s),Math.max(a,s)],u=t[i],h=n[i],[p,S]=[Math.min(u,h),Math.max(u,h)];if(S0&&a>0||i<0&&a<0)return!1;const s=gc(t,r,e),o=gc(n,r,e);return s>0&&o>0||s<0&&o<0?!1:i===0&&a===0&&s===0&&o===0?pB(r,e,t,n):!0}function yB(r){const e=[r[0]];let t=r[0];for(let n=1;n=0;a--)r[a][0]n&&(n=r[a][0]),r[a][1]>i&&(i=r[a][1]);return[n-e,i-t]}function xB(r){return[Math.min(r[0][0],r[1][0]),Math.min(r[0][1],r[1][1]),Math.max(r[0][0],r[1][0]),Math.max(r[0][1],r[1][1])]}function bB(r,e,t){let n=null,i=Ex,a=Ex,s,o;for(let l=0;li&&o>a&&!yx([r[0],e[l]],t)&&!yx([r[1],e[l]],t)&&(i=s,a=o,n=e[l]);return n}function _x(r,e,t,n,i){let a=!1;for(let s=0;sp||t[1]>S));p>=t[0]&&S>=t[1]&&i.add(l),N!==null&&(r.splice(s+1,0,N),n.removePoint(N),a=!0)}return a?_x(r,e,t,n,i):r}function wB(r,e,t){const n=e||20,i=yB(_B(T0.toXy(r,t)));if(i.length<4){const p=i.concat([i[0]]);return t?T0.fromXy(p,t):p}const a=EB(i),s=[a[0]*xx,a[1]*xx],o=gB(i).reverse().map(p=>i[p]);o.push(o[0]);const l=i.filter(function(p){return o.indexOf(p)<0}),u=Math.ceil(1/(i.length/(a[0]*a[1]))),h=_x(o,Math.pow(n,2),s,qN(l,u),new Set);return t?T0.fromXy(h,t):h}const Ex=Math.cos(90/(180/Math.PI)),xx=.6;function MB(r,e,t){if(r.length===1)return AB(r[0],e,t);if(r.length===2)return bx(r,e,t);if(r.length===3){const[n,i,a]=Mg(r);if(V_(n,i,a))return bx([n,a],e,t)}switch(t){case"smooth":return PB(r,e);case"sharp":return SB(r,e);case"rounded":default:return TB(r,e)}}const AB=(r,e,t)=>{if(t==="sharp")return[["M",r[0]-e,r[1]-e],["L",r[0]+e,r[1]-e],["L",r[0]+e,r[1]+e],["L",r[0]-e,r[1]+e],["Z"]];const n=[e,e,0,0,0];return[["M",r[0],r[1]-e],["A",...n,r[0],r[1]+e],["A",...n,r[0],r[1]-e]]},bx=(r,e,t)=>{const n=[e,e,0,0,0],i=t==="sharp"?Un(r[0],To(qs(Or(r[0],r[1])),e)):r[0],a=t==="sharp"?Un(r[1],To(qs(Or(r[1],r[0])),e)):r[1],s=To(qs(Xh(Or(i,a),!1)),e),o=To(s,-1),l=Un(i,s),u=Un(a,s),h=Un(a,o),p=Un(i,o);return t==="sharp"?[["M",l[0],l[1]],["L",u[0],u[1]],["L",h[0],h[1]],["L",p[0],p[1]],["Z"]]:[["M",l[0],l[1]],["L",u[0],u[1]],["A",...n,h[0],h[1]],["L",p[0],p[1]],["A",...n,l[0],l[1]]]},TB=(r,e)=>{const t=Mg(r).map((o,l)=>{const u=(l-2+r.length)%r.length,h=(l-1+r.length)%r.length,p=(l+1)%r.length,S=r[u],N=r[h],U=r[p],H=Or(S,N),V=Or(N,o),Y=Or(o,U),q=(de,ve)=>xg(de,ve,!0)To(qs(Xh(de,!1)),e),fe=ue(V);return[{p:fl(ne?Un(N,ue(H)):Un(N,fe)),concave:ne&&N},{p:fl(le?Un(o,ue(Y)):Un(o,fe)),concave:le&&o}]}),n=[e,e,0,0,0],i=t.findIndex((o,l)=>!t[(l-1+t.length)%t.length][0].concave&&!t[(l-1+t.length)%t.length][1].concave&&!o[0].concave&&!o[0].concave&&!o[1].concave),a=t.slice(i).concat(t.slice(0,i));let s=[];return a.flatMap((o,l)=>{const u=[],h=a[t.length-1];return l===0&&u.push(["M",...h[1].p]),o[0].concave?s.push(o[0].p,o[1].p):u.push(["A",...n,...o[0].p]),o[1].concave?s.unshift(o[1].p):u.push(["L",...o[1].p]),s.length===3&&(u.pop(),u.push(["C",...s.flat()]),s=[]),u})},PB=(r,e)=>{const t=Mg(r).map((n,i)=>{const a=r[(i+1)%r.length];return{p:n,v:qs(Or(a,n))}});return t.forEach((n,i)=>{const a=i>0?i-1:r.length-1,s=t[a].v,o=qs(Un(s,To(n.v,xg(s,n.v,!0)n.p))},SB=(r,e)=>{const n=r.map((a,s)=>{const o=r[s===0?r.length-1:s-1],l=qu(To(qs(Xh(Or(o,a),!1)),e));return[Un(o,l),Un(a,l)]}).flat();return n.map((a,s)=>{if(s%2===0)return null;const o=[n[(s-1)%n.length],n[s%n.length]],l=[n[(s+1)%n.length],n[(s+2)%n.length]];return wg(o,l,!0)}).filter(Boolean).map((a,s)=>[s===0?"M":"L",a[0],a[1]]).concat([["Z"]])};var OB=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{if(!this.shape)this.shape=new ic({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const n=!ci(this.optionsCache,this.options);this.shape.update(this.getHullStyle(n))}this.optionsCache=Object.assign({},this.options)},this.updateHullPath=n=>{this.shape&&this.options.members.includes(Et(n.data))&&this.shape.update({d:this.getHullPath(!0)})},this.getHullPath=(n=!1)=>{const{graph:i}=this.context,a=this.getMember();if(a.length===0)return"";const s=a.map(u=>i.getNodeData(u)),o=wB(s.map(Ti),this.options.concavity).slice(1).reverse(),l=o.flatMap(u=>s.filter(h=>ci(Ti(h),u)).map(Et));return ci(l,this.hullMemberIds)&&!n?this.path:(this.hullMemberIds=l,this.path=MB(o,this.getPadding(),this.options.corner),this.path)},this.bindEvents()}bindEvents(){this.context.graph.on(Qt.AFTER_RENDER,this.drawHull),this.context.graph.on(Qt.AFTER_ELEMENT_UPDATE,this.updateHullPath)}getHullStyle(e){const t=this.options,{members:n,padding:i,corner:a}=t,s=OB(t,["members","padding","corner"]);return Object.assign(Object.assign({},s),{d:this.getHullPath(e)})}getPadding(){const{graph:e}=this.context;return this.hullMemberIds.reduce((n,i)=>{const{halfExtents:a}=e.getElementRenderBounds(i),s=Math.max(a[0],a[1]);return Math.max(n,s)},0)+this.options.padding}addMember(e){const t=Array.isArray(e)?e:[e];this.options.members=[...new Set([...this.options.members,...t])],this.shape.update({d:this.getHullPath()})}removeMember(e){const t=Array.isArray(e)?e:[e];this.options.members=this.options.members.filter(n=>!t.includes(n)),t.some(n=>this.hullMemberIds.includes(n))&&this.shape.update({d:this.getHullPath()})}updateMember(e){this.options.members=yn(e)?e(this.options.members):e,this.shape.update(this.getHullStyle(!0))}getMember(){return this.options.members}destroy(){this.context.graph.off(Qt.AFTER_DRAW,this.drawHull),this.shape.destroy(),this.hullMemberIds=[],super.destroy()}}fd.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};function wx(r,e){e(r),r.children&&r.children.forEach(function(t){t&&wx(t,e)})}function pc(r){dd(r,!0)}function ys(r){dd(r,!1)}function dd(r,e){var t=e?"visible":"hidden";wx(r,function(n){n.attr("visibility",t)})}var DB=5,Mx=function(r,e,t,n){t===void 0&&(t=0),n===void 0&&(n=DB),Object.entries(e).forEach(function(i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1],l=r;Object.prototype.hasOwnProperty.call(e,s)&&(o?Ql(o)?(Ql(r[s])||(l[s]={}),t="A"&&t<="Z"};function Wn(r,e,t){t===void 0&&(t=!1);var n={};return Object.entries(r).forEach(function(i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1];if(!(s==="className"||s==="class")){if(vd(s,"show")&&vd(Tx(s,"show"),e)!==t)s===NB(e,"show")?n[s]=o:n[s.replace(new RegExp(S0(e)),"")]=o;else if(!vd(s,"show")&&vd(s,e)!==t){var l=Tx(s,e);l==="filter"&&typeof o=="function"||(n[l]=o)}}}),n}function su(r,e){return Object.entries(r).reduce(function(t,n){var i=(0,xe.CR)(n,2),a=i[0],s=i[1];return a.startsWith("show")?t["show".concat(e).concat(a.slice(4))]=s:t["".concat(e).concat(S0(a))]=s,t},{})}function ro(r,e){e===void 0&&(e=["x","y","class","className"]);var t=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],n={},i={};return Object.entries(r).forEach(function(a){var s=(0,xe.CR)(a,2),o=s[0],l=s[1];e.includes(o)||(t.indexOf(o)!==-1?i[o]=l:n[o]=l)}),[n,i]}var kB=function(r){if(!va(r))return[];for(var e=[],t=0;t=this.left&&e<=this.right&&t>=this.top&&t<=this.bottom},r}();function _9(r){var e=r.getRenderBounds(),t=__read(e.min,2),n=t[0],i=t[1],a=__read(e.max,2),s=a[0],o=a[1],l=s-n,u=o-i;return new Ji(n,i,l,u)}var _s=function(r,e){var t=function(i){return"".concat(e,"-").concat(i)},n=Object.fromEntries(Object.entries(r).map(function(i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1],l=t(o);return[s,{name:l,class:".".concat(l),id:"#".concat(l),toString:function(){return l}}]}));return Object.assign(n,{prefix:t}),n};function Ui(r){if(un(r))return[r,r,r,r];if(va(r)){var e=r.length;if(e===1)return[r[0],r[0],r[0],r[0]];if(e===2)return[r[0],r[1],r[0],r[1]];if(e===3)return[r[0],r[1],r[2],r[1]];if(e===4)return r}return[0,0,0,0]}function Na(r,e,t,n,i){return n===void 0&&(n=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),r?t(e):(n&&i(e),null)}var Px=_s({text:"text"},"title");function gd(r){return/\S+-\S+/g.test(r)?r.split("-").map(function(e){return e[0]}):r.length>2?[r[0]]:r.split("")}function GB(r,e){var t=r.attributes,n=t.position,i=t.spacing,a=t.inset,s=t.text,o=r.getBBox(),l=e.getBBox(),u=gd(n),h=(0,xe.CR)(Ui(s?i:0),4),p=h[0],S=h[1],N=h[2],U=h[3],H=(0,xe.CR)(Ui(a),4),V=H[0],Y=H[1],q=H[2],ne=H[3],le=(0,xe.CR)([U+S,p+N],2),ue=le[0],fe=le[1],de=(0,xe.CR)([ne+Y,V+q],2),ve=de[0],Te=de[1];if(u[0]==="l")return new Ji(o.x,o.y,l.width+o.width+ue+ve,Math.max(l.height+Te,o.height));if(u[0]==="t")return new Ji(o.x,o.y,Math.max(l.width+ve,o.width),l.height+o.height+fe+Te);var Oe=(0,xe.CR)([e.attributes.width||l.width,e.attributes.height||l.height],2),Ie=Oe[0],ze=Oe[1];return new Ji(l.x,l.y,Ie+o.width+ue+ve,ze+o.height+fe+Te)}function jB(r,e){var t=Object.entries(e).reduce(function(n,i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1],l=r.node().attr(s);return l||(n[s]=o),n},{});r.styles(t)}function VB(r){var e,t,n,i,a=r,s=a.width,o=a.height,l=a.position,u=(0,xe.CR)([+s/2,+o/2],2),h=u[0],p=u[1],S=(0,xe.CR)([+h,+p,"center","middle"],4),N=S[0],U=S[1],H=S[2],V=S[3],Y=gd(l);return Y.includes("l")&&(e=(0,xe.CR)([0,"start"],2),N=e[0],H=e[1]),Y.includes("r")&&(t=(0,xe.CR)([+s,"end"],2),N=t[0],H=t[1]),Y.includes("t")&&(n=(0,xe.CR)([0,"top"],2),U=n[0],V=n[1]),Y.includes("b")&&(i=(0,xe.CR)([+o,"bottom"],2),U=i[0],V=i[1]),{x:N,y:U,textAlign:H,textBaseline:V}}var ZB=function(r){(0,xe.ZT)(e,r);function e(t){return r.call(this,t,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return e.prototype.getAvailableSpace=function(){var t=this,n=this.attributes,i=n.width,a=n.height,s=n.position,o=n.spacing,l=n.inset,u=t.querySelector(Px.text.class);if(!u)return new Ji(0,0,+i,+a);var h=u.getBBox(),p=h.width,S=h.height,N=(0,xe.CR)(Ui(o),4),U=N[0],H=N[1],V=N[2],Y=N[3],q=(0,xe.CR)([0,0,+i,+a],4),ne=q[0],le=q[1],ue=q[2],fe=q[3],de=gd(s);if(de.includes("i"))return new Ji(ne,le,ue,fe);de.forEach(function(bt,_t){var ct,ft,At,Ft;bt==="t"&&(ct=(0,xe.CR)(_t===0?[S+V,+a-S-V]:[0,+a],2),le=ct[0],fe=ct[1]),bt==="r"&&(ft=(0,xe.CR)([+i-p-Y],1),ue=ft[0]),bt==="b"&&(At=(0,xe.CR)([+a-S-U],1),fe=At[0]),bt==="l"&&(Ft=(0,xe.CR)(_t===0?[p+H,+i-p-H]:[0,+i],2),ne=Ft[0],ue=Ft[1])});var ve=(0,xe.CR)(Ui(l),4),Te=ve[0],Oe=ve[1],Ie=ve[2],ze=ve[3],Xe=(0,xe.CR)([ze+Oe,Te+Ie],2),et=Xe[0],st=Xe[1];return new Ji(ne+ze,le+Te,ue-et,fe-st)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new Ji(0,0,0,0)},e.prototype.render=function(t,n){var i=this,a=t.width,s=t.height,o=t.position,l=t.spacing,u=(0,xe._T)(t,["width","height","position","spacing"]),h=(0,xe.CR)(ro(u),1),p=h[0],S=VB(t),N=S.x,U=S.y,H=S.textAlign,V=S.textBaseline;Na(!!u.text,_n(n),function(Y){i.title=Y.maybeAppendByClassName(Px.text,"text").styles(p).call(jB,{x:N,y:U,textAlign:H,textBaseline:V}).node()})},e}(ai),D0=function(){};function Ba(r,e){return yn(r)?r.apply(void 0,(0,xe.ev)([],(0,xe.CR)(e),!1)):r}function KB(r,e){return r.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{})}function XB(r){return typeof r=="boolean"?!1:"enter"in r&&"update"in r&&"exit"in r}function Sx(r){if(!r)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],t=Object.fromEntries(Object.entries(r).filter(function(n){var i=(0,xe.CR)(n,1),a=i[0];return!e.includes(a)}));return Object.fromEntries(e.map(function(n){return XB(r)?r[n]===!1?[n,!1]:[n,(0,xe.pi)((0,xe.pi)({},r[n]),t)]:[n,t]}))}function ou(r,e){r?r.finished.then(e):e()}function YB(r,e){r.length===0?e():Promise.all(r.map(function(t){return t==null?void 0:t.finished})).then(e)}function Ox(r,e){"update"in r?r.update(e):r.attr(e)}function Dx(r,e,t){if(e.length===0)return null;if(!t){var n=e.slice(-1)[0];return Ox(r,{style:n}),null}return r.animate(e,t)}function QB(r,e){return!(r.nodeName!=="text"||e.nodeName!=="text"||r.attributes.text!==e.attributes.text)}function JB(r,e,t,n){if(n===void 0&&(n="destroy"),QB(r,e))return r.remove(),[null];var i=function(){n==="destroy"?r.destroy():n==="hide"&&ys(r),e.isVisible()&&pc(e)};if(!t)return i(),[null];var a=t.duration,s=a===void 0?0:a,o=t.delay,l=o===void 0?0:o,u=Math.ceil(+s/2),h=+s/4,p=(0,xe.CR)(r.getGeometryBounds().center,2),S=p[0],N=p[1],U=(0,xe.CR)(e.getGeometryBounds().center,2),H=U[0],V=U[1],Y=(0,xe.CR)([(S+H)/2-S,(N+V)/2-N],2),q=Y[0],ne=Y[1],le=r.style.opacity,ue=le===void 0?1:le,fe=e.style.opacity,de=fe===void 0?1:fe,ve=r.style.transform||"",Te=e.style.transform||"",Oe=r.animate([{opacity:ue,transform:"translate(0, 0) ".concat(ve)},{opacity:0,transform:"translate(".concat(q,", ").concat(ne,") ").concat(ve)}],(0,xe.pi)((0,xe.pi)({fill:"both"},t),{duration:l+u+h})),Ie=e.animate([{opacity:0,transform:"translate(".concat(-q,", ").concat(-ne,") ").concat(Te),offset:.01},{opacity:de,transform:"translate(0, 0) ".concat(Te)}],(0,xe.pi)((0,xe.pi)({fill:"both"},t),{duration:u+h,delay:l+u-h}));return ou(Ie,i),[Oe,Ie]}function Es(r,e,t){var n={},i={};return Object.entries(e).forEach(function(a){var s=(0,xe.CR)(a,2),o=s[0],l=s[1];if(!Pn(l)){var u=r.style[o]||r.parsedStyle[o]||0;u!==l&&(n[o]=u,i[o]=l)}}),t?Dx(r,[n,i],(0,xe.pi)({fill:"both"},t)):(Ox(r,i),null)}function qB(r){var e;return((e=r[0])===null||e===void 0?void 0:e.map(function(t,n){return r.map(function(i){return i[n]})}))||[]}function C0(r,e,t){t===void 0&&(t=!1);var n=r.getBBox(),i=n.width,a=n.height,s=e/Math.max(i,a);return t&&(r.style.transform="scale(".concat(s,")")),s}var Cx=function(r,e,t){return[["M",r-t,e],["A",t,t,0,1,0,r+t,e],["A",t,t,0,1,0,r-t,e],["Z"]]},$B=Cx,e5=function(r,e,t){return[["M",r-t,e-t],["L",r+t,e-t],["L",r+t,e+t],["L",r-t,e+t],["Z"]]},t5=function(r,e,t){return[["M",r-t,e],["L",r,e-t],["L",r+t,e],["L",r,e+t],["Z"]]},n5=function(r,e,t){var n=t*Math.sin(.3333333333333333*Math.PI);return[["M",r-t,e+n],["L",r,e-n],["L",r+t,e+n],["Z"]]},r5=function(r,e,t){var n=t*Math.sin(.3333333333333333*Math.PI);return[["M",r-t,e-n],["L",r+t,e-n],["L",r,e+n],["Z"]]},i5=function(r,e,t){var n=t/2*Math.sqrt(3);return[["M",r,e-t],["L",r+n,e-t/2],["L",r+n,e+t/2],["L",r,e+t],["L",r-n,e+t/2],["L",r-n,e-t/2],["Z"]]},a5=function(r,e,t){var n=t-1.5;return[["M",r-t,e-n],["L",r+t,e+n],["L",r+t,e-n],["L",r-t,e+n],["Z"]]},Lx=function(r,e,t){return[["M",r,e+t],["L",r,e-t]]},s5=function(r,e,t){return[["M",r-t,e-t],["L",r+t,e+t],["M",r+t,e-t],["L",r-t,e+t]]},o5=function(r,e,t){return[["M",r-t/2,e-t],["L",r+t/2,e-t],["M",r,e-t],["L",r,e+t],["M",r-t/2,e+t],["L",r+t/2,e+t]]},l5=function(r,e,t){return[["M",r-t,e],["L",r+t,e],["M",r,e-t],["L",r,e+t]]},u5=function(r,e,t){return[["M",r-t,e],["L",r+t,e]]},Rx=function(r,e,t){return[["M",r-t,e],["L",r+t,e]]},c5=Rx,h5=function(r,e,t){return[["M",r-t,e],["A",t/2,t/2,0,1,1,r,e],["A",t/2,t/2,0,1,0,r+t,e]]},f5=function(r,e,t){return[["M",r-t-1,e-2.5],["L",r,e-2.5],["L",r,e+2.5],["L",r+t+1,e+2.5]]},d5=function(r,e,t){return[["M",r-t-1,e+2.5],["L",r,e+2.5],["L",r,e-2.5],["L",r+t+1,e-2.5]]},v5=function(r,e,t){return[["M",r-(t+1),e+2.5],["L",r-t/2,e+2.5],["L",r-t/2,e-2.5],["L",r+t/2,e-2.5],["L",r+t/2,e+2.5],["L",r+t+1,e+2.5]]};function g5(r,e){return[["M",r-5,e+2.5],["L",r-5,e],["L",r,e],["L",r,e-3],["L",r,e+3],["L",r+6.5,e+3]]}var p5=function(r,e,t){return[["M",r-t,e-t],["L",r+t,e],["L",r-t,e+t],["Z"]]},es=_s({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),m5=function(r){(0,xe.ZT)(e,r);function e(t){var n=r.call(this,t,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:p5(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new Ai({class:es.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new Ai({class:es.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return Object.defineProperty(e.prototype,"defaultPage",{get:function(){var t=this.attributes.defaultPage;return Jr(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t=this.pageViews,n=(0,xe.CR)(qB(t.map(function(p){var S=p.getBBox(),N=S.width,U=S.height;return[N,U]})).map(function(p){return Math.max.apply(Math,(0,xe.ev)([],(0,xe.CR)(p),!1))}),2),i=n[0],a=n[1],s=this.attributes,o=s.pageWidth,l=o===void 0?i:o,u=s.pageHeight,h=u===void 0?a:u;return{pageWidth:l,pageHeight:h}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=r.prototype.getBBox.call(this),n=t.x,i=t.y,a=this.controllerShape,s=this.pageShape,o=s.pageWidth,l=s.pageHeight;return new Ji(n,i,o+a.width,l)},e.prototype.goTo=function(t){var n=this,i=this.attributes.animate,a=this,s=a.currPage,o=a.playState,l=a.playWindow,u=a.pageViews;if(o!=="idle"||t<0||u.length<=0||t>=u.length)return null;u[s].setLocalPosition(0,0),this.prepareFollowingPage(t);var h=(0,xe.CR)(this.getFollowingPageDiff(t),2),p=h[0],S=h[1];this.playState="running";var N=Dx(l,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-p,", ").concat(-S,")")}],i);return ou(N,function(){n.innerCurrPage=t,n.playState="idle",n.setVisiblePages([t]),n.updatePageInfo()}),N},e.prototype.prev=function(){var t=this.attributes.loop,n=this.pageViews.length,i=this.currPage;if(!t&&i<=0)return null;var a=t?(i-1+n)%n:Jr(i-1,0,n);return this.goTo(a)},e.prototype.next=function(){var t=this.attributes.loop,n=this.pageViews.length,i=this.currPage;if(!t&&i>=n-1)return null;var a=t?(i+1)%n:Jr(i+1,0,n);return this.goTo(a)},e.prototype.renderClipPath=function(t){var n=this.pageShape,i=n.pageWidth,a=n.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(es.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(n,i){t.includes(i)?pc(n):ys(n)})},e.prototype.adjustControllerLayout=function(){var t=this,n=t.prevBtnGroup,i=t.nextBtnGroup,a=t.pageInfoGroup,s=this.attributes,o=s.orientation,l=s.controllerPadding,u=a.getBBox(),h=u.width,p=u.height,S=(0,xe.CR)(o==="horizontal"?[-180,0]:[-90,90],2),N=S[0],U=S[1];n.setLocalEulerAngles(N),i.setLocalEulerAngles(U);var H=n.getBBox(),V=H.width,Y=H.height,q=i.getBBox(),ne=q.width,le=q.height,ue=Math.max(V,h,ne),fe=o==="horizontal"?{offset:[[0,0],[V/2+l,0],[V+h+l*2,0]],textAlign:"start"}:{offset:[[ue/2,-Y-l],[ue/2,0],[ue/2,le+l]],textAlign:"center"},de=(0,xe.CR)(fe.offset,3),ve=(0,xe.CR)(de[0],2),Te=ve[0],Oe=ve[1],Ie=(0,xe.CR)(de[1],2),ze=Ie[0],Xe=Ie[1],et=(0,xe.CR)(de[2],2),st=et[0],bt=et[1],_t=fe.textAlign,ct=a.querySelector("text");ct&&(ct.style.textAlign=_t),n.setLocalPosition(Te,Oe),a.setLocalPosition(ze,Xe),i.setLocalPosition(st,bt)},e.prototype.updatePageInfo=function(){var t,n=this,i=n.currPage,a=n.pageViews,s=n.attributes.formatter;a.length<2||((t=this.pageInfoGroup.querySelector(es.pageInfo.class))===null||t===void 0||t.attr("text",s(i+1,a.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var n=this.currPage;if(n===t)return[0,0];var i=this.attributes.orientation,a=this.pageShape,s=a.pageWidth,o=a.pageHeight,l=t=2,u=t.maybeAppendByClassName(es.controller,"g");if(dd(u.node(),l),!!l){var h=Wn(this.attributes,"button"),p=Wn(this.attributes,"pageNum"),S=(0,xe.CR)(ro(h),2),N=S[0],U=S[1],H=N.size,V=(0,xe._T)(N,["size"]),Y=!u.select(es.prevBtnGroup.class).node(),q=u.maybeAppendByClassName(es.prevBtnGroup,"g").styles(U);this.prevBtnGroup=q.node();var ne=q.maybeAppendByClassName(es.prevBtn,"path"),le=u.maybeAppendByClassName(es.nextBtnGroup,"g").styles(U);this.nextBtnGroup=le.node();var ue=le.maybeAppendByClassName(es.nextBtn,"path");[ne,ue].forEach(function(de){de.styles((0,xe.pi)((0,xe.pi)({},V),{transformOrigin:"center"})),C0(de.node(),H,!0)});var fe=u.maybeAppendByClassName(es.pageInfoGroup,"g");this.pageInfoGroup=fe.node(),fe.maybeAppendByClassName(es.pageInfo,"text").styles(p),this.updatePageInfo(),u.node().setLocalPosition(s+i,o/2),Y&&(this.prevBtnGroup.addEventListener("click",function(){n.prev()}),this.nextBtnGroup.addEventListener("click",function(){n.next()}))}},e.prototype.render=function(t,n){var i=t.x,a=i===void 0?0:i,s=t.y,o=s===void 0?0:s;this.attr("transform","translate(".concat(a,", ").concat(o,")"));var l=_n(n);this.renderClipPath(l),this.renderController(l),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,n=uc(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(Kn.INSERTED,n),this.playWindow.addEventListener(Kn.REMOVED,n)},e}(ai);function y5(r){var e="default";if(li(r)&&r instanceof Image)e="image";else if(yn(r))e="symbol";else if(ur(r)){var t=new RegExp("data:(image|text)");r.match(t)?e="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(r)?e="url":e="symbol"}return e}function _5(r){var e=y5(r);return["base64","url","image"].includes(e)?"image":r&&e==="symbol"?"path":null}var Lr=function(r){(0,xe.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n){var i=t.x,a=i===void 0?0:i,s=t.y,o=s===void 0?0:s,l=this.getSubShapeStyle(t),u=l.symbol,h=l.size,p=h===void 0?16:h,S=(0,xe._T)(l,["symbol","size"]),N=_5(u);Na(!!N,_n(n),function(U){U.maybeAppendByClassName("marker",N).attr("className","marker ".concat(N,"-marker")).call(function(H){if(N==="image"){var V=p*2;H.styles({img:u,width:V,height:V,x:a-p,y:o-p})}else{var V=p/2,Y=yn(u)?u:e.getSymbol(u);H.styles((0,xe.pi)({d:Y==null?void 0:Y(a,o,V)},S))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(ai);Lr.registerSymbol("cross",s5),Lr.registerSymbol("hyphen",u5),Lr.registerSymbol("line",Lx),Lr.registerSymbol("plus",l5),Lr.registerSymbol("tick",o5),Lr.registerSymbol("circle",Cx),Lr.registerSymbol("point",$B),Lr.registerSymbol("bowtie",a5),Lr.registerSymbol("hexagon",i5),Lr.registerSymbol("square",e5),Lr.registerSymbol("diamond",t5),Lr.registerSymbol("triangle",n5),Lr.registerSymbol("triangle-down",r5),Lr.registerSymbol("line",Lx),Lr.registerSymbol("dot",Rx),Lr.registerSymbol("dash",c5),Lr.registerSymbol("smooth",h5),Lr.registerSymbol("hv",f5),Lr.registerSymbol("vh",d5),Lr.registerSymbol("hvh",v5),Lr.registerSymbol("vhv",g5);function E9(r,e,t){var n=Math.round((r-t)/e);return t+n*e}function E5(r,e,t){var n=1.4,i=n*t;return[["M",r-t,e-i],["L",r+t,e-i],["L",r+t,e+i],["L",r-t,e+i],["Z"]]}var Ix=1.4,Nx=.4;function x5(r,e,t){var n=t,i=n*Ix,a=n/2,s=n/6,o=r+i*Nx;return[["M",r,e],["L",o,e+a],["L",r+i,e+a],["L",r+i,e-a],["L",o,e-a],["Z"],["M",o,e+s],["L",r+i-2,e+s],["M",o,e-s],["L",r+i-2,e-s]]}function b5(r,e,t){var n=t,i=n*Ix,a=n/2,s=n/6,o=e+i*Nx;return[["M",r,e],["L",r-a,o],["L",r-a,e+i],["L",r+a,e+i],["L",r+a,o],["Z"],["M",r-s,o],["L",r-s,e+i-2],["M",r+s,o],["L",r+s,e+i-2]]}Lr.registerSymbol("hiddenHandle",E5),Lr.registerSymbol("verticalHandle",x5),Lr.registerSymbol("horizontalHandle",b5);var x9=function(r,e,t){return r===void 0&&(r="horizontal"),r==="horizontal"?e:t};function b9(r,e,t,n){var i;n===void 0&&(n=4);var a=__read(r,2),s=a[0],o=a[1],l=__read(e,2),u=l[0],h=l[1],p=__read(t,2),S=p[0],N=p[1],U=__read([u,h],2),H=U[0],V=U[1],Y=V-H;return H>V&&(i=__read([V,H],2),H=i[0],V=i[1]),Y>o-s?[s,o]:Ho?N===o&&S===H?[H,o]:[o-Y,o]:[H,V]}function L0(r,e,t){return r===void 0&&(r="horizontal"),r==="horizontal"?e:t}function w9(r){var e=r&&r.getRenderBounds();if(!e)return{width:0,height:0};var t=e.getMax(),n=e.getMin();return{width:t[0]-n[0],height:t[1]-n[1]}}function Bx(r){var e=r.getLocalBounds(),t=e.min,n=e.max,i=(0,xe.CR)([t,n],2),a=(0,xe.CR)(i[0],2),s=a[0],o=a[1],l=(0,xe.CR)(i[1],2),u=l[0],h=l[1];return{x:s,y:o,width:u-s,height:h-o,left:s,bottom:h,top:o,right:u}}function M9(r,e){var t=select(r).append("text").node();return t.attr(__assign(__assign({},e),{visibility:"hidden"})),t}function w5(r,e){var t=(0,xe.CR)(r,2),n=t[0],i=t[1],a=(0,xe.CR)(e,2),s=a[0],o=a[1];return n!==s&&i===o}function A9(r,e){var t=__read(r,2),n=t[0],i=t[1],a=__read(e,2),s=a[0],o=a[1];return n===s&&i!==o}function M5(r,e){var t,n,i=e.attributes;try{for(var a=(0,xe.XA)(Object.entries(i)),s=a.next();!s.done;s=a.next()){var o=(0,xe.CR)(s.value,2),l=o[0],u=o[1];l!=="id"&&l!=="className"&&r.attr(l,u)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}function io(r){return typeof r=="function"?r():ur(r)||un(r)?new O0({style:{text:String(r)}}):r}var pd,R0;function T9(r){R0=r}var A5=m0(function(r,e){var t=e.fontSize,n=e.fontFamily,i=e.fontWeight,a=e.fontStyle,s=e.fontVariant;return R0?R0(r,t):(pd||(pd=Ht.offscreenCanvasCreator.getOrCreateContext(void 0)),pd.font=[a,s,i,"".concat(t,"px"),n].join(" "),pd.measureText(r).width)},function(r,e){return[r,Object.values(e||kx(r)).join()].join("")},4096),kx=function(r){var e=r.style.fontFamily||"sans-serif",t=r.style.fontWeight||"normal",n=r.style.fontStyle||"normal",i=r.style.fontVariant,a=r.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:e,fontWeight:t,fontStyle:n,fontVariant:i}};function Fx(r){return r.nodeName==="text"?r:r.nodeName==="g"&&r.children.length===1&&r.children[0].nodeName==="text"?r.children[0]:null}function zx(r,e){var t=Fx(r);t&&t.attr(e)}function I0(r,e,t){t===void 0&&(t="..."),zx(r,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:t})}var ka=_s({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");function T5(r){var e=r.querySelector(ka.marker.class);return e?e.style:{}}var P5=function(r){(0,xe.ZT)(e,r);function e(t){return r.call(this,t,{span:[1,1],marker:function(){return new Ks({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return t?typeof t=="string"||typeof t=="number"?t!=="":typeof t=="function"?!0:t.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,n=this.valueGroup,i=this.attributes.markerSize,a=t.node().getBBox(),s=a.width,o=a.height,l=n.node().getBBox(),u=l.width,h=l.height;return{markerWidth:i,labelWidth:s,valueWidth:u,height:Math.max(i,o,h)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var n=(0,xe.CR)(Ui(t),2),i=n[0],a=n[1],s=this.showValue?a:0,o=i+s;return[i/o,s/o]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t,n=this.attributes,i=n.markerSize,a=n.width,s=this.actualSpace,o=s.markerWidth,l=s.height,u=this.actualSpace,h=u.labelWidth,p=u.valueWidth,S=(0,xe.CR)(this.spacing,2),N=S[0],U=S[1];if(a){var H=a-i-N-U,V=(0,xe.CR)(this.span,2),Y=V[0],q=V[1];t=(0,xe.CR)([Y*H,q*H],2),h=t[0],p=t[1]}var ne=o+h+p+N+U;return{width:ne,height:l,markerWidth:o,labelWidth:h,valueWidth:p}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes.spacing;if(!t)return[0,0];var n=(0,xe.CR)(Ui(t),2),i=n[0],a=n[1];return this.showValue?[i,a]:[i,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,n=t.markerWidth,i=t.labelWidth,a=t.valueWidth,s=t.width,o=t.height,l=(0,xe.CR)(this.spacing,2),u=l[0],h=l[1];return{height:o,width:s,markerWidth:n,labelWidth:i,valueWidth:a,position:[n/2,n+u,n+i+u+h]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t=T5(this.markerGroup.node()),n=this.attributes,i=n.markerSize,a=n.markerStrokeWidth,s=a===void 0?t.strokeWidth:a,o=n.markerLineWidth,l=o===void 0?t.lineWidth:o,u=n.markerStroke,h=u===void 0?t.stroke:u,p=+(s||l||(h?1:0))*Math.sqrt(2),S=this.markerGroup.node().getBBox(),N=S.width,U=S.height;return(1-p/Math.max(N,U))*i},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var n=this,i=this.attributes.marker,a=Wn(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(ka.markerGroup,"g").style("zIndex",0),Na(!!i,this.markerGroup,function(){var s,o=n.markerGroup.node(),l=(s=o.childNodes)===null||s===void 0?void 0:s[0],u=typeof i=="string"?new Lr({style:{symbol:i},className:ka.marker.name}):i();l?u.nodeName===l.nodeName?l instanceof Lr?l.update((0,xe.pi)((0,xe.pi)({},a),{symbol:i})):(M5(l,u),_n(l).styles(a)):(l.remove(),_n(u).attr("className",ka.marker.name).styles(a),o.appendChild(u)):(u instanceof Lr||_n(u).attr("className",ka.marker.name).styles(a),o.appendChild(u)),n.markerGroup.node().scale(1/n.markerGroup.node().getScale()[0]);var h=C0(n.markerGroup.node(),n.scaleSize,!0);n.markerGroup.node().style._transform="scale(".concat(h,")")})},e.prototype.renderLabel=function(t){var n=Wn(this.attributes,"label"),i=n.text,a=(0,xe._T)(n,["text"]);this.labelGroup=t.maybeAppendByClassName(ka.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(ka.label,function(){return io(i)}).styles(a)},e.prototype.renderValue=function(t){var n=this,i=Wn(this.attributes,"value"),a=i.text,s=(0,xe._T)(i,["text"]);this.valueGroup=t.maybeAppendByClassName(ka.valueGroup,"g").style("zIndex",0),Na(this.showValue,this.valueGroup,function(){n.valueGroup.maybeAppendByClassName(ka.value,function(){return io(a)}).styles(s)})},e.prototype.renderBackground=function(t){var n=this.shape,i=n.width,a=n.height,s=Wn(this.attributes,"background");this.background=t.maybeAppendByClassName(ka.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(ka.background,"rect").styles((0,xe.pi)({width:i,height:a},s))},e.prototype.adjustLayout=function(){var t=this.layout,n=t.labelWidth,i=t.valueWidth,a=t.height,s=(0,xe.CR)(t.position,3),o=s[0],l=s[1],u=s[2],h=a/2;this.markerGroup.styles({transform:"translate(".concat(o,", ").concat(h,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(l,", ").concat(h,")")}),I0(this.labelGroup.select(ka.label.class).node(),Math.ceil(n)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(u,", ").concat(h,")")}),I0(this.valueGroup.select(ka.value.class).node(),Math.ceil(i)))},e.prototype.render=function(t,n){var i=_n(n),a=t.x,s=a===void 0?0:a,o=t.y,l=o===void 0?0:o;i.styles({transform:"translate(".concat(s,", ").concat(l,")")}),this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},e}(ai),Al=_s({page:"item-page",navigator:"navigator",item:"item"},"items"),Ux=function(r,e,t){return t===void 0&&(t=!0),r?e(r):t},S5=function(r){(0,xe.ZT)(e,r);function e(t){var n=r.call(this,t,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:D0,mouseenter:D0,mouseleave:D0})||this;return n.navigatorShape=[0,0],n}return Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,n=t.gridRow,i=t.gridCol,a=t.data;if(!n&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return n&&i?[n,i]:n?[n,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,n=t.data,i=t.layout,a=Wn(this.attributes,"item"),s=n.map(function(o,l){var u=o.id,h=u===void 0?l:u,p=o.label,S=o.value;return{id:"".concat(h),index:l,style:(0,xe.pi)({layout:i,labelText:p,valueText:S},Object.fromEntries(Object.entries(a).map(function(N){var U=(0,xe.CR)(N,2),H=U[0],V=U[1];return[H,Ba(V,[o,l,n])]})))}});return s},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,n=this.attributes,i=n.orientation,a=n.width,s=n.rowPadding,o=n.colPadding,l=(0,xe.CR)(this.navigatorShape,1),u=l[0],h=(0,xe.CR)(this.grid,2),p=h[0],S=h[1],N=S*p,U=0;return this.pageViews.children.map(function(H,V){var Y,q,ne=Math.floor(V/N),le=V%N,ue=t.ifHorizontal(S,p),fe=[Math.floor(le/ue),le%ue];i==="vertical"&&fe.reverse();var de=(0,xe.CR)(fe,2),ve=de[0],Te=de[1],Oe=(a-u-(S-1)*o)/S,Ie=H.getBBox().height,ze=(0,xe.CR)([0,0],2),Xe=ze[0],et=ze[1];return i==="horizontal"?(Y=(0,xe.CR)([U,ve*(Ie+s)],2),Xe=Y[0],et=Y[1],U=Te===S-1?0:U+Oe+o):(q=(0,xe.CR)([Te*(Oe+o),U],2),Xe=q[0],et=q[1],U=ve===p-1?0:U+Ie+s),{page:ne,index:V,row:ve,col:Te,pageIndex:le,width:Oe,height:Ie,x:Xe,y:et}})},e.prototype.getFlexLayout=function(){var t=this.attributes,n=t.width,i=t.height,a=t.rowPadding,s=t.colPadding,o=(0,xe.CR)(this.navigatorShape,1),l=o[0],u=(0,xe.CR)(this.grid,2),h=u[0],p=u[1],S=(0,xe.CR)([n-l,i],2),N=S[0],U=S[1],H=(0,xe.CR)([0,0,0,0,0,0,0,0],8),V=H[0],Y=H[1],q=H[2],ne=H[3],le=H[4],ue=H[5],fe=H[6],de=H[7];return this.pageViews.children.map(function(ve,Te){var Oe,Ie,ze,Xe,et=ve.getBBox(),st=et.width,bt=et.height,_t=fe===0?0:s,ct=fe+_t+st;if(ct<=N&&Ux(le,function(At){return At0?(this.navigatorShape=[55,0],t.call(this)):n},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,n){var i=this.attributes.orientation;return L0(i,t,n)},e.prototype.flattenPage=function(t){t.querySelectorAll(Al.item.class).forEach(function(n){t.appendChild(n)}),t.querySelectorAll(Al.page.class).forEach(function(n){var i=t.removeChild(n);i.destroy()})},e.prototype.renderItems=function(t){var n=this.attributes,i=n.click,a=n.mouseenter,s=n.mouseleave;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this);_n(t).selectAll(Al.item.class).data(this.renderData,function(l){return l.id}).join(function(l){return l.append(function(u){var h=u.style;return new P5({style:h})}).attr("className",Al.item.name).on("click",function(){i==null||i(this),o("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){s==null||s(this),o("itemMouseleave",{item:this})})},function(l){return l.each(function(u){var h=u.style;this.update(h)})},function(l){return l.remove()})},e.prototype.relayoutNavigator=function(){var t,n=this.attributes,i=n.layout,a=n.width,s=((t=this.pageViews.children[0])===null||t===void 0?void 0:t.getBBox().height)||0,o=(0,xe.CR)(this.navigatorShape,2),l=o[0],u=o[1];this.navigator.update(i==="grid"?{pageWidth:a-l,pageHeight:s-u}:{})},e.prototype.adjustLayout=function(){var t=this,n=Object.entries(KB(this.itemsLayout,"page")).map(function(a){var s=(0,xe.CR)(a,2),o=s[0],l=s[1];return{page:o,layouts:l}}),i=(0,xe.ev)([],(0,xe.CR)(this.navigator.getContainer().children),!1);n.forEach(function(a){var s=a.layouts,o=t.pageViews.appendChild(new Ai({className:Al.page.name}));s.forEach(function(l){var u=l.x,h=l.y,p=l.index,S=l.width,N=l.height,U=i[p];o.appendChild(U),tc(U,"__layout__",l),U.update({x:u,y:h,width:S,height:N})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var n=this.attributes.orientation,i=Wn(this.attributes,"nav"),a=Li({orientation:n},i),s=this;return t.selectAll(Al.navigator.class).data(["nav"]).join(function(o){return o.append(function(){return new m5({style:a})}).attr("className",Al.navigator.name).each(function(){s.navigator=this})},function(o){return o.each(function(){this.update(a)})},function(o){return o.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,n){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(_n(n));this.renderItems(a.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,n){var i=new _i(t,{detail:n});this.dispatchEvent(i)},e}(ai),mc=_s({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Wx={showLabel:!0,formatter:function(r){return r.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},P9=function(r){(0,xe.ZT)(e,r);function e(t){return r.call(this,t,Wx)||this}return e.prototype.render=function(t,n){var i=_n(n).maybeAppendByClassName(mc.markerGroup,"g");this.renderMarker(i);var a=_n(n).maybeAppendByClassName(mc.labelGroup,"g");this.renderLabel(a)},e.prototype.renderMarker=function(t){var n=this,i=this.attributes,a=i.orientation,s=i.markerSymbol,o=s===void 0?L0(a,"horizontalHandle","verticalHandle"):s;Na(!!o,t,function(l){var u=Wn(n.attributes,"marker"),h=(0,xe.pi)({symbol:o},u);n.marker=l.maybeAppendByClassName(mc.marker,function(){return new Lr({style:h})}).update(h)})},e.prototype.renderLabel=function(t){var n=this,i=this.attributes,a=i.showLabel,s=i.orientation,o=i.spacing,l=o===void 0?0:o,u=i.formatter;Na(a,t,function(h){var p,S=Wn(n.attributes,"label"),N=S.text,U=(0,xe._T)(S,["text"]),H=((p=h.select(mc.marker.class))===null||p===void 0?void 0:p.node().getBBox())||{},V=H.width,Y=V===void 0?0:V,q=H.height,ne=q===void 0?0:q,le=(0,xe.CR)(L0(s,[0,ne+l,"center","top"],[Y+l,0,"start","middle"]),4),ue=le[0],fe=le[1],de=le[2],ve=le[3];h.maybeAppendByClassName(mc.label,"text").styles((0,xe.pi)((0,xe.pi)({},U),{x:ue,y:fe,text:u(N).toString(),textAlign:de,textBaseline:ve}))})},e}(ai),Hx={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},O5=Li({},Hx,{}),S9=Li({},Hx,su(Wx,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),O9=.01,D9=.5,yc=_s({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),D5=function(r){(0,xe.ZT)(e,r);function e(t){return r.call(this,t,O5)||this}return e.prototype.renderTitle=function(t,n,i){var a=this.attributes,s=a.showTitle,o=a.titleText,l=Wn(this.attributes,"title"),u=(0,xe.CR)(ro(l),2),h=u[0],p=u[1];this.titleGroup=t.maybeAppendByClassName(yc.titleGroup,"g").styles(p);var S=(0,xe.pi)((0,xe.pi)({width:n,height:i},h),{text:s?o:""});this.title=this.titleGroup.maybeAppendByClassName(yc.title,function(){return new ZB({style:S})}).update(S)},e.prototype.renderItems=function(t,n){var i=n.x,a=n.y,s=n.width,o=n.height,l=Wn(this.attributes,"title",!0),u=(0,xe.CR)(ro(l),2),h=u[0],p=u[1],S=(0,xe.pi)((0,xe.pi)({},h),{width:s,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(yc.itemsGroup,"g").styles((0,xe.pi)((0,xe.pi)({},p),{transform:"translate(".concat(i,", ").concat(a,")")}));var N=this;this.itemsGroup.selectAll(yc.items.class).data(["items"]).join(function(U){return U.append(function(){return new S5({style:S})}).attr("className",yc.items.name).each(function(){N.items=_n(this)})},function(U){return U.update(S)},function(U){return U.remove()})},e.prototype.adjustLayout=function(){var t=this.attributes.showTitle;if(t){var n=this.title.node().getAvailableSpace(),i=n.x,a=n.y;this.itemsGroup.node().style.transform="translate(".concat(i,", ").concat(a,")")}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,n=t.showTitle,i=t.width,a=t.height;return n?this.title.node().getAvailableSpace():new Ji(0,0,i,a)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t,n,i=(t=this.title)===null||t===void 0?void 0:t.node(),a=(n=this.items)===null||n===void 0?void 0:n.node();return!i||!a?r.prototype.getBBox.call(this):GB(i,a)},e.prototype.render=function(t,n){var i=this.attributes,a=i.width,s=i.height,o=i.x,l=o===void 0?0:o,u=i.y,h=u===void 0?0:u,p=_n(n);n.style.transform="translate(".concat(l,", ").concat(h,")"),this.renderTitle(p,a,s),this.renderItems(p,this.availableSpace),this.adjustLayout()},e}(ai);function N0(r){const{width:e,height:t,renderer:n}=r,i=C5(r),a=new Zv({width:e,height:t,container:i,renderer:n||new ac});return[i,a]}function C5(r){var e;const{container:t,className:n,graphCanvas:i}=r;if(t)return typeof t=="string"?document.getElementById(t):t;const a=au(n,!1),{width:s,height:o,containerStyle:l}=r,[u,h]=L5(r);return Object.assign(a.style,Object.assign({position:"absolute",left:u+"px",top:h+"px",width:s+"px",height:o+"px"},l)),(e=i.getContainer())===null||e===void 0||e.appendChild(a),a}function L5(r){const{width:e,height:t,placement:n,graphCanvas:i}=r,[a,s]=i.getSize(),[o,l]=H_(n);return[o*(a-e),l*(s-t)]}var R5=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const{graph:n}=this.context;n.on(Qt.AFTER_DRAW,this.createElement)},this.changeState=(n,i)=>{const{graph:a}=this.context,{typePrefix:s}=this,o=ba(n,[s,"id"]),l=ba(n,[s,"style","labelText"]),[u]=o.split("__"),h=this.fieldMap[u].get(l)||[];a.setElementState(Object.fromEntries(h==null?void 0:h.map(p=>[p,i])))},this.click=n=>{if(this.options.trigger==="hover")return;const i=ba(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?(this.selectedItems=this.selectedItems.filter(a=>a!==i),this.changeState(n,[])):(this.selectedItems.push(i),this.changeState(n,"selected"))},this.mouseleave=n=>{this.options.trigger!=="click"&&(this.selectedItems=[],this.changeState(n,[]))},this.mouseenter=n=>{if(this.options.trigger==="click")return;const i=ba(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?this.selectedItems=this.selectedItems.filter(a=>a!==i):(this.selectedItems.push(i),this.changeState(n,"active"))},this.setFieldMap=(n,i,a)=>{if(!n)return;const s=this.fieldMap[a];if(s)if(!s.has(n))s.set(n,[i]);else{const o=s.get(n);o&&(o.push(i),s.set(n,o))}},this.getEvents=()=>({mouseenter:this.mouseenter,mouseleave:this.mouseleave,click:this.click}),this.getMarkerData=(n,i)=>{if(!n)return[];const{model:a,element:s}=this.context,{nodes:o,edges:l,combos:u}=a.getData(),h={},p=V=>yn(n)?n(V):n,S={node:"circle",edge:"line",combo:"rect"},N={circle:"circle",ellipse:"circle",image:"bowtie",rect:"square",star:"cross",triangle:"triangle",diamond:"diamond",cubic:"dot",line:"hyphen",polyline:"hyphen",quadratic:"hv","cubic-horizontal":"hyphen","cubic-vertical":"line"},U=(V,Y)=>s==null?void 0:s.getElementComputedStyle(V,Y),H=(V,Y)=>{V.forEach(q=>{const{id:ne}=q,le=ba(q,["data",p(q)]),ue=(s==null?void 0:s.getElementType(Y,q))||"circle",fe=U(Y,q),de=(Y==="edge"?fe==null?void 0:fe.stroke:fe==null?void 0:fe.fill)||"#1783ff";ne&&le&&le.replace(/\s+/g,"")&&(this.setFieldMap(le,ne,Y),h[le]||(h[le]={id:`${Y}__${ne}`,label:le,marker:N[ue]||S[Y],elementType:Y,lineWidth:1,stroke:de,fill:de}))})};switch(i){case"node":H(o,"node");break;case"edge":H(l,"edge");break;case"combo":H(u,"combo");break;default:return[]}return Object.values(h)},this.createElement=()=>{if(this.draw){this.updateElement();return}const n=this.options,{width:i,height:a,nodeField:s,edgeField:o,comboField:l,trigger:u,position:h,container:p,containerStyle:S,className:N}=n,U=R5(n,["width","height","nodeField","edgeField","comboField","trigger","position","container","containerStyle","className"]),H=this.getMarkerData(s,"node"),V=this.getMarkerData(o,"edge"),Y=this.getMarkerData(l,"combo"),q=[...H,...Y,...V],ne=Object.assign({width:i,height:a,data:q,itemMarkerLineWidth:({lineWidth:fe})=>fe,itemMarker:({marker:fe})=>fe,itemMarkerStroke:({stroke:fe})=>fe,itemMarkerFill:({fill:fe})=>fe,gridCol:H.length},U,this.getEvents()),le=new D5({className:"legend",style:ne});this.category=le,this.upsertCanvas().appendChild(le),this.draw=!0},this.bindEvents()}update(e){super.update(e),this.clear(),this.createElement()}clear(){var e,t;(e=this.canvas)===null||e===void 0||e.destroy(),(t=this.container)===null||t===void 0||t.remove(),this.canvas=void 0,this.container=void 0,this.draw=!1}updateElement(){this.category&&this.category.update({itemMarkerOpacity:({id:e})=>!this.selectedItems.length||this.selectedItems.includes(e)?1:.5,itemLabelOpacity:({id:e})=>!this.selectedItems.length||this.selectedItems.includes(e)?1:.5})}upsertCanvas(){if(this.canvas)return this.canvas;const e=this.context.canvas,[t,n]=e.getSize(),{width:i=t,height:a=n,position:s,container:o,containerStyle:l,className:u}=this.options,[h,p]=N0({width:i,height:a,graphCanvas:e,container:o,containerStyle:l,placement:s,className:"legend"});return this.container=h,u&&h.classList.add(u),this.canvas=p,this.canvas}destroy(){this.clear(),this.context.graph.off(Qt.AFTER_DRAW,this.createElement),super.destroy()}}md.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16,width:240,height:160};class yd extends zi{constructor(e,t){super(e,Object.assign({},yd.defaultOptions,t)),this.onDraw=n=>{var i;!((i=n==null?void 0:n.data)===null||i===void 0)&&i.render||this.onRender()},this.shapes=new Map,this.landmarkMap=new Map,this.mask=null,this.isMaskDragging=!1,this.onMaskDragStart=n=>{this.mask&&(this.isMaskDragging=!0,this.mask.setPointerCapture(n.pointerId),this.mask.addEventListener("pointermove",this.onMaskDrag),this.mask.addEventListener("pointerup",this.onMaskDragEnd),this.mask.addEventListener("pointercancel",this.onMaskDragEnd))},this.onMaskDrag=n=>{if(!this.mask||!this.isMaskDragging)return;const{size:[i,a]}=this.options,{movementX:s,movementY:o}=n,{left:l,top:u,width:h,height:p}=this.mask.style,[,,S,N]=this.maskBBox;let U=parseInt(l)+s,H=parseInt(u)+o,V=parseInt(h),Y=parseInt(p);U<0&&(U=0),H<0&&(H=0),U+V>i&&(U=Fo(i-V,0)),H+Y>a&&(H=Fo(a-Y,0)),V0?(U=Fo(U-s,0),V=ko(V+s,i)):s<0&&(V=ko(V-s,i))),Y0?(H=Fo(H-o,0),Y=ko(Y+o,a)):o<0&&(Y=ko(Y-o,a))),Object.assign(this.mask.style,{left:U+"px",top:H+"px",width:V+"px",height:Y+"px"});const q=parseInt(l)-U,ne=parseInt(u)-H;if(q===0&&ne===0)return;const le=this.context.canvas.getCamera().getZoom(),ue=this.canvas.getCamera().getZoom(),fe=le/ue;this.context.graph.translateBy([q*fe,ne*fe],!1)},this.onMaskDragEnd=n=>{this.mask&&(this.isMaskDragging=!1,this.mask.releasePointerCapture(n.pointerId),this.mask.removeEventListener("pointermove",this.onMaskDrag),this.mask.removeEventListener("pointerup",this.onMaskDragEnd),this.mask.removeEventListener("pointercancel",this.onMaskDragEnd))},this.onTransform=Qy(()=>{this.isMaskDragging||(this.updateMask(),this.setCamera())},32,{leading:!0}),this.setOnRender(),this.bindEvents()}update(e){this.unbindEvents(),super.update(e),"delay"in e&&this.setOnRender(),this.bindEvents()}setOnRender(){this.onRender=uc(()=>{this.renderMinimap(),this.renderMask()},this.options.delay)}bindEvents(){const{graph:e}=this.context;e.on(Qt.AFTER_DRAW,this.onDraw),e.on(Qt.AFTER_RENDER,this.onRender),e.on(Qt.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:e}=this.context;e.off(Qt.AFTER_DRAW,this.onDraw),e.off(Qt.AFTER_RENDER,this.onRender),e.off(Qt.AFTER_TRANSFORM,this.onTransform)}renderMinimap(){const e=this.getElements(),t=this.initCanvas();this.setShapes(t,e)}getElements(){const{filter:e}=this.options,{model:t}=this.context,n=t.getData();if(!e)return n;const{nodes:i,edges:a,combos:s}=n;return{nodes:i.filter(o=>e(Et(o),"node")),edges:a.filter(o=>e(Et(o),"edge")),combos:s.filter(o=>e(Et(o),"combo"))}}setShapes(e,t){const{nodes:n,edges:i,combos:a}=t,{shape:s}=this.options,{element:o}=this.context;if(s==="key"){const u=new Set,h=p=>{const S=Et(p);u.add(S);const N=o.getElement(S);if(!N)return;const U=N.getShape("key"),H=this.shapes.get(S)||U.cloneNode();H.setPosition(U.getPosition()),N.style.zIndex&&(H.style.zIndex=N.style.zIndex),H.id=N.id,this.shapes.has(S)?Object.entries(U.attributes).forEach(([V,Y])=>{H.style[V]!==Y&&(H.style[V]=Y)}):(e.appendChild(H),this.shapes.set(S,H))};i.forEach(h),a.forEach(h),n.forEach(h),this.shapes.forEach((p,S)=>{u.has(S)||(e.removeChild(p),this.shapes.delete(S))});return}const l=(u,h)=>{const S=o.getElement(u).getPosition();return h.setPosition(S),h};e.removeChildren(),i.forEach(u=>e.appendChild(s(Et(u),"edge"))),a.forEach(u=>{e.appendChild(l(Et(u),s(Et(u),"combo")))}),n.forEach(u=>{e.appendChild(l(Et(u),s(Et(u),"node")))})}initCanvas(){const{renderer:e,size:[t,n]}=this.options;if(this.canvas){const{width:i,height:a}=this.canvas.getConfig();(t!==i||n!==a)&&this.canvas.resize(t,n),e&&this.canvas.setRenderer(e)}else{const{className:i,position:a,container:s,containerStyle:o}=this.options,[l,u]=N0({renderer:e,width:t,height:n,placement:a,className:"minimap",container:s,containerStyle:o,graphCanvas:this.context.canvas});i&&l.classList.add(i),this.container=l,this.canvas=u}return this.setCamera(),this.canvas}createLandmark(e,t,n){const i=`${e.join(",")}-${t.join(",")}-${n}`;if(this.landmarkMap.has(i))return this.landmarkMap.get(i);const s=this.canvas.getCamera().createLandmark(i,{position:e,focalPoint:t,zoom:n});return this.landmarkMap.set(i,s),s}setCamera(){var e;const{canvas:t}=this.context,n=(e=this.canvas)===null||e===void 0?void 0:e.getCamera();if(!n)return;const{size:[i,a],padding:s}=this.options,[o,l,u,h]=cs(s),{min:p,max:S,center:N}=t.getBounds("elements"),U=S[0]-p[0],H=S[1]-p[1],V=i-h-l,Y=a-o-u,q=V/U,ne=Y/H,le=Math.min(q,ne),ue=this.createLandmark(N,N,le);n.gotoLandmark(ue,0)}get maskBBox(){const{canvas:e}=this.context,t=e.getSize(),n=e.getCanvasByViewport([0,0]),i=e.getCanvasByViewport(t),a=this.canvas.canvas2Viewport(gs(n)),s=this.canvas.canvas2Viewport(gs(i)),o=s.x-a.x,l=s.y-a.y;return[a.x,a.y,o,l]}calculateMaskBBox(){const{size:[e,t]}=this.options;let[n,i,a,s]=this.maskBBox;return n<0&&(a=ko(a+n,e),n=0),i<0&&(s=ko(s+i,t),i=0),n+a>e&&(a=Fo(e-n,0)),i+s>t&&(s=Fo(t-i,0)),[ko(n,e),ko(i,t),Fo(a,0),Fo(s,0)]}renderMask(){const{maskStyle:e}=this.options;this.mask||(this.mask=document.createElement("div"),this.mask.addEventListener("pointerdown",this.onMaskDragStart),this.mask.draggable=!0,this.mask.addEventListener("dragstart",t=>t.preventDefault&&t.preventDefault())),this.container.appendChild(this.mask),Object.assign(this.mask.style,Object.assign(Object.assign({},e),{cursor:"move",position:"absolute",pointerEvents:"auto"})),this.updateMask()}updateMask(){if(!this.mask)return;const[e,t,n,i]=this.calculateMaskBBox();Object.assign(this.mask.style,{top:t+"px",left:e+"px",width:n+"px",height:i+"px"})}destroy(){var e;this.unbindEvents(),this.canvas.destroy(),(e=this.mask)===null||e===void 0||e.remove(),super.destroy()}}yd.defaultOptions={size:[240,160],shape:"key",padding:10,position:"right-bottom",maskStyle:{border:"1px solid #ddd",background:"rgba(0, 0, 0, 0.1)"},containerStyle:{border:"1px solid #ddd",background:"#fff"},delay:128};const ko=(r,e)=>Math.min(r,e),Fo=(r,e)=>Math.max(r,e);var B0=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};const k0={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class _d extends zi{constructor(e,t){super(e,Object.assign({},_d.defaultOptions,t)),this.initSnapline=()=>{const n=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=n.appendChild(new al({style:Object.assign(Object.assign({},k0),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=n.appendChild(new al({style:Object.assign(Object.assign({},k0),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(n,i,a)=>B0(this,void 0,void 0,function*(){const{verticalX:s,horizontalY:o}=a,{tolerance:l}=this.options,{min:[u,h],max:[p,S],center:[N,U]}=i;let H=0,V=0;s!==null&&(qi(p,s){const{target:i}=n,a=.5;if(this.isHorizontalSticking||this.isVerticalSticking){const[s,o]=this.getDelta(n);if(this.isHorizontalSticking&&this.isVerticalSticking&&Math.abs(s)<=a&&Math.abs(o)<=a)return this.context.graph.translateElementBy({[i.id]:[-s,-o]},!1),!1;if(this.isHorizontalSticking&&Math.abs(o)<=a)return this.context.graph.translateElementBy({[i.id]:[0,-o]},!1),!1;if(this.isVerticalSticking&&Math.abs(s)<=a)return this.context.graph.translateElementBy({[i.id]:[-s,0]},!1),!1;this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!1,setTimeout(()=>{this.enableStick=!0},200)}return this.enableStick},this.calcSnaplineMetadata=(n,i)=>{const{tolerance:a,shape:s}=this.options,{min:[o,l],max:[u,h],center:[p,S]}=i;let N=null,U=null,H=null,V=null,Y=null,q=null;return this.getNodes().some(ne=>{if(ci(n.id,ne.id))return!1;const le=Gx(ne,s).getRenderBounds(),{min:[ue,fe],max:[de,ve],center:[Te,Oe]}=le;return N===null&&(qi(Te,p){this.initSnapline()},this.onDrag=n=>B0(this,void 0,void 0,function*(){const{target:i}=n;if(this.options.autoSnap&&!this.enableSnap(n))return;const a=Gx(i,this.options.shape).getRenderBounds(),s=this.calcSnaplineMetadata(i,a);this.hideSnapline(),(s.verticalX!==null||s.horizontalY!==null)&&this.updateSnapline(s),this.options.autoSnap&&(yield this.autoSnapToLine(i.id,a,s))}),this.onDragEnd=()=>{this.hideSnapline()},this.bindEvents()}getNodes(){var e;const{filter:t}=this.options,i=(((e=this.context.element)===null||e===void 0?void 0:e.getNodes())||[]).filter(a=>{var s;return kL(a)&&((s=this.context.viewport)===null||s===void 0?void 0:s.isInViewport(a.getRenderBounds()))});return t?i.filter(a=>t(a)):i}hideSnapline(){this.horizontalLine.style.visibility="hidden",this.verticalLine.style.visibility="hidden"}getLineWidth(e){const{lineWidth:t}=this.options[`${e}LineStyle`];return+(t||k0.lineWidth||1)/this.context.graph.getZoom()}updateSnapline(e){const{verticalX:t,verticalMinY:n,verticalMaxY:i,horizontalY:a,horizontalMinX:s,horizontalMaxX:o}=e,[l,u]=this.context.canvas.getSize(),{offset:h}=this.options;a!==null?Object.assign(this.horizontalLine.style,{x1:h===1/0?0:s-h,y1:a,x2:h===1/0?l:o+h,y2:a,visibility:"visible",lineWidth:this.getLineWidth("horizontal")}):this.horizontalLine.style.visibility="hidden",t!==null?Object.assign(this.verticalLine.style,{x1:t,y1:h===1/0?0:n-h,x2:t,y2:h===1/0?u:i+h,visibility:"visible",lineWidth:this.getLineWidth("vertical")}):this.verticalLine.style.visibility="hidden"}getDelta(e){const t=this.context.graph.getZoom();return vs([e.dx,e.dy],t)}bindEvents(){return B0(this,void 0,void 0,function*(){const{graph:e}=this.context;e.on(Ja.DRAG_START,this.onDragStart),e.on(Ja.DRAG,this.onDrag),e.on(Ja.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:e}=this.context;e.off(Ja.DRAG_START,this.onDragStart),e.off(Ja.DRAG,this.onDrag),e.off(Ja.DRAG_END,this.onDragEnd)}destroyElements(){var e,t;(e=this.horizontalLine)===null||e===void 0||e.destroy(),(t=this.verticalLine)===null||t===void 0||t.destroy()}destroy(){this.destroyElements(),this.unbindEvents(),super.destroy()}}_d.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const qi=(r,e)=>Math.abs(r-e),Gx=(r,e)=>typeof e=="function"?e(r):r.getShape(e);var jx=null,I5=null;function Ed(r){return r instanceof Date?r:new Date(r)}function N5(r){for(var e=__read(r,2),t=e[0],n=e[1],i=jx.indexOf(t),a=jx.indexOf(n),s="",o=i;o<=a;o+=1)if(s+=I5[o],o2&&(l=":"),s+=l}return s}function la(r,e){var t={YYYY:r.getFullYear(),MM:r.getMonth()+1,DD:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds()},n=e;return Object.keys(t).forEach(function(i){var a=t[i];n=n.replace(i,i==="YYYY"?"".concat(a):"".concat(a).padStart(2,"0"))}),n}function C9(r,e){return Ed(r).getTime()-Ed(e).getTime()}function L9(r,e){var t=__read([Ed(r),Ed(e)],2),n=t[0],i=t[1];return n.getFullYear()!==i.getFullYear()?"year":n.getMonth()!==i.getMonth()?"month":n.getDay()!==i.getDay()?"day":n.getHours()!==i.getHours()?"hour":n.getMinutes()!==i.getMinutes()?"minute":"second"}function R9(r,e){var t=new Date(r),n={year:function(i){i.setMonth(0),i.setHours(0,0,0,0)},month:function(i){i.setDate(1),i.setHours(0,0,0,0)},day:function(i){return i.setHours(0,0,0,0)},hour:function(i){return i.setMinutes(0,0,0)},minute:function(i){return i.setSeconds(0,0)},second:function(i){return i.setMilliseconds(0)}};return n[e](t),la(t,N5(["year",e]))}function B5(r,e){if(r.length<=e)return r;for(var t=Math.floor(r.length/e),n=[],i=0;i180?1:0,ve=r>e?0:1,Te=!1;return Te?"M".concat(t,",").concat(n,",L").concat(U,",").concat(H,",A").concat(o,",").concat(l,",0,").concat(de,",").concat(ve,",").concat(Y,",").concat(q,",L").concat(t,",").concat(n):"M".concat(U,",").concat(H,",A").concat(o,",").concat(l,",0,").concat(de,",").concat(ve,",").concat(Y,",").concat(q)}function q5(r){var e=r.attributes,t=e.startAngle,n=e.endAngle,i=e.center,a=e.radius;return(0,xe.ev)((0,xe.ev)([t,n],(0,xe.CR)(i),!1),[a],!1)}function $5(r,e,t,n){var i=e.startAngle,a=e.endAngle,s=e.center,o=e.radius;return r.selectAll(Dr.line.class).data([{d:eb.apply(void 0,(0,xe.ev)((0,xe.ev)([i,a],(0,xe.CR)(s),!1),[o],!1))}],function(l,u){return u}).join(function(l){return l.append("path").attr("className",Dr.line.name).styles(e).styles({d:function(u){return u.d}})},function(l){return l.transition(function(){var u=this,h=Y5(this,q5(this),(0,xe.ev)((0,xe.ev)([i,a],(0,xe.CR)(s),!1),[o],!1),n.update);if(h){var p=function(){var S=ba(u.attributes,"__keyframe_data__");u.style.d=eb.apply(void 0,(0,xe.ev)([],(0,xe.CR)(S),!1))};h.onframe=p,h.onfinish=p}return h}).styles(e)},function(l){return l.remove()}).styles(t).transitions()}function e4(r,e){var t=e.truncRange,n=e.truncShape,i=e.lineExtension}function t4(r,e,t){t===void 0&&(t=[0,0]);var n=(0,xe.CR)([r,e,t],3),i=(0,xe.CR)(n[0],2),a=i[0],s=i[1],o=(0,xe.CR)(n[1],2),l=o[0],u=o[1],h=(0,xe.CR)(n[2],2),p=h[0],S=h[1],N=(0,xe.CR)([l-a,u-s],2),U=N[0],H=N[1],V=Math.sqrt(Math.pow(U,2)+Math.pow(H,2)),Y=(0,xe.CR)([-p/V,S/V],2),q=Y[0],ne=Y[1];return[q*U,q*H,ne*U,ne*H]}function tb(r){var e=(0,xe.CR)(r,2),t=(0,xe.CR)(e[0],2),n=t[0],i=t[1],a=(0,xe.CR)(e[1],2),s=a[0],o=a[1];return{x1:n,y1:i,x2:s,y2:o}}function n4(r,e,t,n){var i=e.showTrunc,a=e.startPos,s=e.endPos,o=e.truncRange,l=e.lineExtension,u=(0,xe.CR)([a,s],2),h=(0,xe.CR)(u[0],2),p=h[0],S=h[1],N=(0,xe.CR)(u[1],2),U=N[0],H=N[1],V=(0,xe.CR)(l?t4(a,s,l):new Array(4).fill(0),4),Y=V[0],q=V[1],ne=V[2],le=V[3],ue=function(ct){return r.selectAll(Dr.line.class).data(ct,function(ft,At){return At}).join(function(ft){return ft.append("line").attr("className",function(At){return"".concat(Dr.line.name," ").concat(At.className)}).styles(t).transition(function(At){return Es(this,tb(At.line),!1)})},function(ft){return ft.styles(t).transition(function(At){var Ft=At.line;return Es(this,tb(Ft),n.update)})},function(ft){return ft.remove()}).transitions()};if(!i||!o)return ue([{line:[[p+Y,S+q],[U+ne,H+le]],className:Dr.line.name}]);var fe=(0,xe.CR)(o,2),de=fe[0],ve=fe[1],Te=U-p,Oe=H-S,Ie=(0,xe.CR)([p+Te*de,S+Oe*de],2),ze=Ie[0],Xe=Ie[1],et=(0,xe.CR)([p+Te*ve,S+Oe*ve],2),st=et[0],bt=et[1],_t=ue([{line:[[p+Y,S+q],[ze,Xe]],className:Dr.lineFirst.name},{line:[[st,bt],[U+ne,H+le]],className:Dr.lineSecond.name}]);return e4(r,e),_t}function r4(r,e,t,n){var i=t.showArrow,a=t.showTrunc,s=t.lineArrow,o=t.lineArrowOffset,l=t.lineArrowSize,u;if(e==="arc"?u=r.select(Dr.line.class):a?u=r.select(Dr.lineSecond.class):u=r.select(Dr.line.class),!i||!s||t.type==="arc"&&$x(t.startAngle,t.endAngle)){var h=u.node();h&&(h.style.markerEnd=void 0);return}var p=io(s);p.attr(n),C0(p,l,!0),u.style("markerEnd",p).style("markerEndOffset",-o)}function i4(r,e,t){var n=e.type,i,a=Wn(e,"line");return n==="linear"?i=n4(r,e,Yx(a,"arrow"),t):i=$5(r,e,Yx(a,"arrow"),t),r4(r,n,e,a),i}function a4(r,e){return G0(r,e.gridDirection,e)}function nb(r){var e=r.type,t=r.gridCenter;return e==="linear"?t:t||r.center}function s4(r,e){var t=e.gridLength;return r.map(function(n,i){var a=n.value,s=(0,xe.CR)(wd(a,e),2),o=s[0],l=s[1],u=(0,xe.CR)(ao(a4(a,e),t),2),h=u[0],p=u[1];return{id:i,points:[[o,l],[o+h,l+p]]}})}function o4(r,e){var t=e.gridControlAngles,n=nb(e);if(!n)throw new Error("grid center is not provide");if(r.length<2)throw new Error("Invalid grid data");if(!t||t.length===0)throw new Error("Invalid gridControlAngles");var i=(0,xe.CR)(n,2),a=i[0],s=i[1];return r.map(function(o,l){var u=o.value,h=(0,xe.CR)(wd(u,e),2),p=h[0],S=h[1],N=(0,xe.CR)([p-a,S-s],2),U=N[0],H=N[1],V=[];return t.forEach(function(Y){var q=lu(Y),ne=(0,xe.CR)([Math.cos(q),Math.sin(q)],2),le=ne[0],ue=ne[1],fe=U*le-H*ue+a,de=U*ue+H*le+s;V.push([fe,de])}),{points:V,id:l}})}function l4(r,e,t,n){var i=Wn(t,"grid"),a=i.type,s=i.areaFill,o=nb(t),l=H0(e,t.gridFilter),u=a==="segment"?s4(l,t):o4(l,t),h=(0,xe.pi)((0,xe.pi)({},i),{center:o,areaFill:yn(s)?l.map(function(p,S){return Ba(s,[p,S,l])}):s,animate:n,data:u});return r.selectAll(Dr.grid.class).data([1]).join(function(p){return p.append(function(){return new V5({style:h})}).attr("className",Dr.grid.name)},function(p){return p.transition(function(){return this.update(h)})},function(p){return p.remove()}).transitions()}function Wi(r,e,t,n,i){return n===void 0&&(n=!0),i===void 0&&(i=!1),n&&r===e||i&&r===t?!0:r>e&&r0,q=n-l,ne=i-u,le=S*ne-N*q;if(le<0===Y)return!1;var ue=U*ne-H*q;return!(ue<0===Y||le>V===Y||ue>V===Y)}function ab(r,e){var t=[[r[0],r[1],r[2],r[3]],[r[2],r[3],r[4],r[5]],[r[4],r[5],r[6],r[7]],[r[6],r[7],r[0],r[1]]];return t.some(function(n){return ib(e,n)})}var F9={lineToLine:ib,intersectBoxLine:ab,getBounds:Md};function g4(r,e,t){var n,i,a=Md(r,t).flat(1),s=Md(e,t).flat(1),o=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var l=(0,xe.XA)(o),u=l.next();!u.done;u=l.next()){var h=u.value;if(ab(s,h))return!0}}catch(p){n={error:p}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return!1}function p4(r,e){var t=r.type,n=r.labelDirection,i=r.crossSize;if(!i)return!1;if(t==="arc"){var a=r.center,s=r.radius,o=(0,xe.CR)(a,2),l=o[0],u=o[1],h=n==="negative"?0:i,p=-s-h,S=s+h,N=(0,xe.CR)(Ui(e),4),U=N[0],H=N[1],V=N[2],Y=N[3];return new V0(l+p-Y,u+p-U,l+S+H,u+S+V)}var q=(0,xe.CR)(r.startPos,2),ne=q[0],le=q[1],ue=(0,xe.CR)(r.endPos,2),fe=ue[0],de=ue[1],ve=(0,xe.CR)(qx(r)?[-e,0,e,0]:[0,e,0,-e],4),Te=ve[0],Oe=ve[1],Ie=ve[2],ze=ve[3],Xe=xc(0,r),et=ao(Xe,i),st=new V0(ne,le,fe,de);return st.x1+=ze,st.y1+=Te,st.x2+=Oe+et[0],st.y2+=Ie+et[1],st}function Ad(r,e,t){var n,i,a=e.crossPadding,s=new Set,o=null,l=p4(e,a),u=function(U){return l?v4(l,U):!0},h=function(U,H){return!U||!U.firstChild?!0:!g4(U.firstChild,H.firstChild,Ui(t))};try{for(var p=(0,xe.XA)(r),S=p.next();!S.done;S=p.next()){var N=S.value;u(N)?!o||h(o,N)?o=N:(s.add(o),s.add(N)):s.add(N)}}catch(U){n={error:U}}finally{try{S&&!S.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}return Array.from(s)}function Z0(r,e){return e===void 0&&(e={}),Pn(r)?0:typeof r=="number"?r:Math.floor(A5(r,e))}function m4(r,e,t,n){if(!(r.length<=0)){var i=e.suffix,a=i===void 0?"...":i,s=e.minLength,o=e.maxLength,l=o===void 0?1/0:o,u=e.step,h=u===void 0?" ":u,p=e.margin,S=p===void 0?[0,0,0,0]:p,N=kx(n.getTextShape(r[0])),U=Z0(h,N),H=s?Z0(s,N):U,V=Z0(l,N);(Pn(V)||V===1/0)&&(V=Math.max.apply(null,r.map(function(et){return et.getBBox().width})));for(var Y=r.slice(),q=(0,xe.CR)(S,4),ne=q[0],le=ne===void 0?0:ne,ue=q[1],fe=ue===void 0?0:ue,de=q[2],ve=de===void 0?le:de,Te=q[3],Oe=Te===void 0?fe:Te,Ie=function(et){if(Y.forEach(function(st){n.ellipsis(n.getTextShape(st),et,a)}),Y=Ad(r,t,S),Y.length<1)return{value:void 0}},ze=V;ze>H+U;ze-=U){var Xe=Ie(ze);if(typeof Xe=="object")return Xe.value}}}var y4=function(r){return r!==void 0&&r!=null&&!Number.isNaN(r)},_4={parity:function(r,e){var t=e.seq,n=t===void 0?2:t;return r.filter(function(i,a){return a%n?(ys(i),!1):!0})}},E4=function(r){return r.filter(y4)};function x4(r,e,t,n){var i=r.length,a=e.keepHeader,s=e.keepTail;if(!(i<=1||i===2&&a&&s)){var o=_4.parity,l=function(ne){return ne.forEach(n.show),ne},u=2,h=r.slice(),p=r.slice(),S=Math.min.apply(Math,(0,xe.ev)([1],(0,xe.CR)(r.map(function(ne){return ne.getBBox().width})),!1));if(t.type==="linear"&&(j0(t)||qx(t))){var N=Bx(r[0]).left,U=Bx(r[i-1]).right,H=Math.abs(U-N)||1;u=Math.max(Math.floor(i*S/H),u)}var V,Y;for(a&&(V=h.splice(0,1)[0]),s&&(Y=h.splice(-1,1)[0],h.reverse()),l(h);uo)){if(t.type==="linear"&&j0(t)){if(Y(o),H())return}else for(var q=U;q<=o;q++)if(Y(q),H())return;u&&Y(N)}}var A4=new Map([["hide",x4],["rotate",b4],["ellipsis",m4],["wrap",M4]]);function T4(r,e,t){return e.labelOverlap.length<1?!1:t==="hide"?!LB(r[0]):t==="rotate"?!r.some(function(n){var i;return!!(!((i=n.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):t==="ellipsis"||t==="wrap"?r.filter(function(n){return n.querySelector("text")}).length>=1:!0}function P4(r,e,t,n){var i=e.labelOverlap,a=i===void 0?[]:i;a.length&&a.forEach(function(s){var o=s.type,l=A4.get(o);T4(r,e,o)&&(l==null||l(r,s,e,n,t))})}function S4(){for(var r=[],e=0;eS[0]&&fe0&&Number.isFinite(r)?e:t},j9=function(r,e){return r*e},V9=function(r,e){return r/2+(e||0)/2},Y0=function(r){return r};class pb{constructor(e){this.options=sa({},this.getDefaultOptions()),this.update(e)}getOptions(){return this.options}update(e={}){this.options=sa({},this.options,e),this.rescale(e)}rescale(e){}}function Q0(r,e){return e-r?t=>(t-r)/(e-r):t=>.5}function Td(r,...e){return e.reduce((t,n)=>i=>t(n(i)),r)}function j4(r,e,t,n,i){let a=t||0,s=n||r.length;const o=i||(l=>l);for(;ae?s=l:a=l+1}return a}var V4=X(75196),Z4=X.n(V4);function J0(r,e,t){let n=t;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?r+(e-r)*6*n:n<1/2?e:n<2/3?r+(e-r)*(2/3-n)*6:r}function K4(r){const e=r[0]/360,t=r[1]/100,n=r[2]/100,i=r[3];if(t===0)return[n*255,n*255,n*255,i];const a=n<.5?n*(1+t):n+t-n*t,s=2*n-a,o=J0(s,a,e+1/3),l=J0(s,a,e),u=J0(s,a,e-1/3);return[o*255,l*255,u*255,i]}function mb(r){const e=Z4().get(r);if(!e)return null;const{model:t,value:n}=e;return t==="rgb"?n:t==="hsl"?K4(n):null}const Pd=(r,e)=>t=>r*(1-t)+e*t,X4=(r,e)=>{const t=mb(r),n=mb(e);return t===null||n===null?t?()=>r:()=>e:i=>{const a=new Array(4);for(let h=0;h<4;h+=1){const p=t[h],S=n[h];a[h]=p*(1-i)+S*i}const[s,o,l,u]=a;return`rgba(${Math.round(s)}, ${Math.round(o)}, ${Math.round(l)}, ${u})`}},Y4=(r,e)=>typeof r=="number"&&typeof e=="number"?Pd(r,e):typeof r=="string"&&typeof e=="string"?X4(r,e):()=>r,Q4=(r,e)=>{const t=Pd(r,e);return n=>Math.round(t(n))};function J4(r){return r===null}function yb(r){return!Bn(r)&&!J4(r)&&!Number.isNaN(r)}const q0=Math.sqrt(50),$0=Math.sqrt(10),ep=Math.sqrt(2);function Sd(r,e,t){const n=(e-r)/Math.max(0,t),i=Math.floor(Math.log(n)/Math.LN10),a=n/jo(10,i);return i>=0?(a>=q0?10:a>=$0?5:a>=ep?2:1)*jo(10,i):-jo(10,-i)/(a>=q0?10:a>=$0?5:a>=ep?2:1)}function Z9(r,e,t){const n=Math.abs(e-r)/Math.max(0,t);let i=jo(10,Math.floor(Math.log(n)/Math.LN10));const a=n/i;return a>=q0?i*=10:a>=$0?i*=5:a>=ep&&(i*=2),e{const n=[r,e];let i=0,a=n.length-1,s=n[i],o=n[a],l;return o0?(s=Math.floor(s/l)*l,o=Math.ceil(o/l)*l,l=Sd(s,o,t)):l<0&&(s=Math.ceil(s*l)/l,o=Math.floor(o*l)/l,l=Sd(s,o,t)),l>0?(n[i]=Math.floor(s/l)*l,n[a]=Math.ceil(o/l)*l):l<0&&(n[i]=Math.ceil(s*l)/l,n[a]=Math.floor(o*l)/l),n};function $4(r,e){const t=ee?r:e;return i=>Math.min(Math.max(t,i),n)}const ek=(r,e,t)=>{const[n,i]=r,[a,s]=e;let o,l;return n{const n=Math.min(r.length,e.length)-1,i=new Array(n),a=new Array(n),s=r[0]>r[n],o=s?[...r].reverse():r,l=s?[...e].reverse():e;for(let u=0;u{const h=j4(r,u,1,n)-1,p=i[h],S=a[h];return Td(S,p)(u)}},_b=(r,e,t,n)=>(Math.min(r.length,e.length)>2?tk:ek)(r,e,n?Q4:t);class nk extends pb{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Pd,tickCount:5}}map(e){return yb(e)?this.output(e):this.options.unknown}invert(e){return yb(e)?this.input(e):this.options.unknown}nice(){if(!this.options.nice)return;const[e,t,n,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(e,t,n,...i)}getTicks(){const{tickMethod:e}=this.options,[t,n,i,...a]=this.getTickMethodOptions();return e(t,n,i,...a)}getTickMethodOptions(){const{domain:e,tickCount:t}=this.options,n=e[0],i=e[e.length-1];return[n,i,t]}chooseNice(){return q4}rescale(){this.nice();const[e,t]=this.chooseTransforms();this.composeOutput(e,this.chooseClamp(e)),this.composeInput(e,t,this.chooseClamp(t))}chooseClamp(e){const{clamp:t,range:n}=this.options,i=this.options.domain.map(e),a=Math.min(i.length,n.length);return t?$4(i[0],i[a-1]):Y0}composeOutput(e,t){const{domain:n,range:i,round:a,interpolate:s}=this.options,o=_b(n.map(e),i,s,a);this.output=Td(o,t,e)}composeInput(e,t,n){const{domain:i,range:a}=this.options,s=_b(a,i.map(e),Pd);this.input=Td(t,n,s)}}const rk=(r,e,t)=>{let n,i,a=r,s=e;if(a===s&&t>0)return[a];let o=Sd(a,s,t);if(o===0||!Number.isFinite(o))return[];if(o>0){a=Math.ceil(a/o),s=Math.floor(s/o),i=new Array(n=Math.ceil(s-a+1));for(let l=0;l`${e}`:typeof r=="object"?e=>JSON.stringify(e):e=>e}class np extends pb{getDefaultOptions(){return{domain:[],range:[],unknown:tp}}constructor(e){super(e)}map(e){return this.domainIndexMap.size===0&&bb(this.domainIndexMap,this.getDomain(),this.domainKey),wb({value:this.domainKey(e),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(e){return this.rangeIndexMap.size===0&&bb(this.rangeIndexMap,this.getRange(),this.rangeKey),wb({value:this.rangeKey(e),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(e){const[t]=this.options.domain,[n]=this.options.range;if(this.domainKey=Mb(t),this.rangeKey=Mb(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!e||e.range)&&this.rangeIndexMap.clear(),(!e||e.domain||e.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new np(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:e,compare:t}=this.options;return this.sortedDomain=t?[...e].sort(t):e,this.sortedDomain}}function ok(r){const e=Math.min(...r);return r.map(t=>t/e)}function lk(r,e){const t=r.length,n=e-t;return n>0?[...r,...new Array(n).fill(1)]:n<0?r.slice(0,e):r}function uk(r){return Math.round(r*1e12)/1e12}function ck(r){const{domain:e,range:t,paddingOuter:n,paddingInner:i,flex:a,round:s,align:o}=r,l=e.length,u=lk(a,l),[h,p]=t,S=p-h,N=2/l*n+1-1/l*i,U=S/N,H=U*i/l,V=U-l*H,Y=ok(u),q=Y.reduce((ze,Xe)=>ze+Xe),ne=V/q,le=new xb(e.map((ze,Xe)=>{const et=Y[Xe]*ne;return[ze,s?Math.floor(et):et]})),ue=new xb(e.map((ze,Xe)=>{const st=Y[Xe]*ne+H;return[ze,s?Math.floor(st):st]})),fe=Array.from(ue.values()).reduce((ze,Xe)=>ze+Xe),ve=(S-(fe-fe/l*i))*o,Te=h+ve;let Oe=s?Math.round(Te):Te;const Ie=new Array(l);for(let ze=0;zeS+ne*h);return{valueStep:h,valueBandWidth:p,adjustedRange:Y}}class rp extends np{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:tp,flex:[]}}constructor(e){super(e)}clone(){return new rp(this.options)}getStep(e){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:e===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(e)}getBandWidth(e){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:e===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(e)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:e,paddingInner:t}=this.options;return e>0?e:t}getPaddingOuter(){const{padding:e,paddingOuter:t}=this.options;return e>0?e:t}rescale(){super.rescale();const{align:e,domain:t,range:n,round:i,flex:a}=this.options,{adjustedRange:s,valueBandWidth:o,valueStep:l}=hk({align:e,range:n,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:t});this.valueStep=l,this.valueBandWidth=o,this.adjustedRange=s}}var fk=function(r){(0,xe.ZT)(e,r);function e(t){var n=this,i=t.style,a=(0,xe._T)(t,["style"]);return n=r.call(this,sa({},{type:"column"},(0,xe.pi)({style:i},a)))||this,n.columnsGroup=new Ai({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return e.prototype.render=function(){var t=this.attributes,n=t.columns,i=t.x,a=t.y;this.columnsGroup.style.transform="translate(".concat(i,", ").concat(a,")"),_n(this.columnsGroup).selectAll(".column").data(n.flat()).join(function(s){return s.append("rect").attr("className","column").each(function(o){this.attr(o)})},function(s){return s.each(function(o){this.attr(o)})},function(s){return s.remove()})},e.prototype.update=function(t){this.attr(Li({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(Ur),dk=function(r){(0,xe.ZT)(e,r);function e(t){var n=this,i=t.style,a=(0,xe._T)(t,["style"]);return n=r.call(this,sa({},{type:"lines"},(0,xe.pi)({style:i},a)))||this,n.linesGroup=n.appendChild(new Ai),n.areasGroup=n.appendChild(new Ai),n.render(),n}return e.prototype.render=function(){var t=this.attributes,n=t.lines,i=t.areas,a=t.x,s=t.y;this.style.transform="translate(".concat(a,", ").concat(s,")"),n&&this.renderLines(n),i&&this.renderAreas(i)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(Li({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){_n(this.linesGroup).selectAll(".line").data(t).join(function(n){return n.append("path").attr("className","line").each(function(i){this.attr(i)})},function(n){return n.each(function(i){this.attr(i)})},function(n){return n.remove()})},e.prototype.renderAreas=function(t){_n(this.linesGroup).selectAll(".area").data(t).join(function(n){return n.append("path").attr("className","area").each(function(i){this.attr(i)})},function(n){return n.each(function(i){this.style(i)})},function(n){return n.remove()})},e}(Ur);function vk(r,e,t,n){var i,a=[],s=!!n,o,l,u=[1/0,1/0],h=[-1/0,-1/0],p,S,N;if(s){i=(0,xe.CR)(n,2),u=i[0],h=i[1];for(var U=0,H=r.length;Us&&(t=(0,xe.CR)([s,o],2),o=t[0],s=t[1]),r.map(function(l){var u=l.map(function(h,p){return[n.map(p),Jr(i.map(h),o,s)]});return u})}function Ac(r,e){e===void 0&&(e=!1);var t=e?r.length-1:0,n=r.map(function(i,a){return(0,xe.ev)([a===t?"M":"L"],(0,xe.CR)(i),!1)});return e?n.reverse():n}function Od(r,e){if(e===void 0&&(e=!1),r.length<=2)return Ac(r);for(var t=[],n=r.length,i=0;i=0;i-=1){var a=r[i],s=Ac(a),o=void 0;if(i===0)o=ip(s,e,t);else{var l=r[i-1],u=Ac(l,!0);u[0][0]="L",o=(0,xe.ev)((0,xe.ev)((0,xe.ev)([],(0,xe.CR)(s),!1),(0,xe.CR)(u),!1),[["Z"]],!1)}n.push(o)}return n}function _k(r,e,t){for(var n=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=Od(a),o=void 0;if(i===0)o=ip(s,e,t);else{var l=r[i-1],u=Od(l,!0),h=a[0];u[0][0]="L",o=(0,xe.ev)((0,xe.ev)((0,xe.ev)([],(0,xe.CR)(s),!1),(0,xe.CR)(u),!1),[(0,xe.ev)(["M"],(0,xe.CR)(h),!1),["Z"]],!1)}n.push(o)}return n}var Ek=function(r,e){if(va(r)){for(var t,n=1/0,i=0;in&&(t=a,n=s)}return t}};function Ab(r){return r.length===0?[0,0]:[zc(Ek(r,function(e){return zc(e)||0})),Uc(xk(r,function(e){return Uc(e)||0}))]}function Tb(r){for(var e=Xl(r),t=e[0].length,n=(0,xe.CR)([Array(t).fill(0),Array(t).fill(0)],2),i=n[0],a=n[1],s=0;s=0?(o[l]+=i[l],i[l]=o[l]):(o[l]+=a[l],a[l]=o[l]);return e}var bk=function(r){(0,xe.ZT)(e,r);function e(t){return r.call(this,t,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||(t==null?void 0:t.length)===0)return[[]];var n=Xl(t);return un(n[0])?[n]:n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?Tb(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,n=(0,xe.CR)(t.getOptions().domain||[0,0],2),i=n[0],a=n[1];return a<0?t.map(a):t.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes,n=t.width,i=t.height;return{width:n,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,n=this.attributes,i=n.type,a=n.isStack,s=n.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var o=Wn(this.attributes,"area"),l=Wn(this.attributes,"line"),u=this.containerShape.width,h=this.data;if(h[0].length===0)return{lines:[],areas:[]};var p=this.scales,S=p.x,N=p.y,U=pk(h,{type:"line",x:S,y:N}),H=[];if(o){var V=this.baseline;a?H=s?_k(U,u,V):yk(U,u,V):H=mk(U,s,u,V)}return{lines:U.map(function(Y,q){return(0,xe.pi)({stroke:t.getColor(q),d:s?Od(Y):Ac(Y)},l)}),areas:H.map(function(Y,q){return(0,xe.pi)({d:Y,fill:t.getColor(q)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,n=Wn(this.attributes,"column"),i=this.attributes,a=i.isStack,s=i.type,o=i.scale;if(s!=="column")throw new Error("columnsStyle can only be used in column type");var l=this.containerShape.height,u=this.rawData;if(!u)return{columns:[]};a&&(u=Tb(u));var h=this.createScales(u),p=h.x,S=h.y,N=(0,xe.CR)(Ab(u),2),U=N[0],H=N[1],V=new Mc({domain:[0,H-(U>0?0:U)],range:[0,l*o]}),Y=p.getBandWidth(),q=this.rawData;return{columns:u.map(function(ne,le){return ne.map(function(ue,fe){var de=Y/u.length,ve=function(){return{x:p.map(fe)+de*le,y:ue>=0?S.map(ue):S.map(0),width:de,height:V.map(Math.abs(ue))}},Te=function(){return{x:p.map(fe),y:S.map(ue),width:Y,height:V.map(q[le][fe])}};return(0,xe.pi)((0,xe.pi)({fill:t.getColor(le)},n),a?Te():ve())})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,n){HB(n,".container","rect").attr("className","container").node();var i=t.type,a=t.x,s=t.y,o="spark".concat(i),l=(0,xe.pi)({x:a,y:s},i==="line"?this.linesStyle:this.columnsStyle);_n(n).selectAll(".spark").data([i]).join(function(u){return u.append(function(h){return h==="line"?new dk({className:o,style:l}):new fk({className:o,style:l})}).attr("className","spark ".concat(o))},function(u){return u.update(l)},function(u){return u.remove()})},e.prototype.getColor=function(t){var n=this.attributes.color;return va(n)?n[t%n.length]:yn(n)?n.call(null,t):n},e.prototype.createScales=function(t){var n,i,a=this.attributes,s=a.type,o=a.scale,l=a.range,u=l===void 0?[]:l,h=a.spacing,p=this.containerShape,S=p.width,N=p.height,U=(0,xe.CR)(Ab(t),2),H=U[0],V=U[1],Y=new Mc({domain:[(n=u[0])!==null&&n!==void 0?n:H,(i=u[1])!==null&&i!==void 0?i:V],range:[N,N*(1-o)]});return s==="line"?{type:s,x:new Mc({domain:[0,t[0].length-1],range:[0,S]}),y:Y}:{type:s,x:new rp({domain:t[0].map(function(q,ne){return ne}),range:[0,S],paddingInner:h,paddingOuter:h/2,align:.5}),y:Y}},e.tag="sparkline",e}(ai),Pb={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},Sb={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},Ob={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},Us=_s({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),zo=_s({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),wk=function(r){(0,xe.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n){var i=t.x,a=t.y,s=t.size,o=s===void 0?10:s,l=t.radius,u=l===void 0?o/4:l,h=t.orientation,p=(0,xe._T)(t,["x","y","size","radius","orientation"]),S=o,N=S*2.4,U=_n(n).maybeAppendByClassName(zo.iconRect,"rect").styles((0,xe.pi)((0,xe.pi)({},p),{width:S,height:N,radius:u,x:i-S/2,y:a-N/2,transformOrigin:"center"})),H=i+1/3*S-S/2,V=i+2/3*S-S/2,Y=a+1/4*N-N/2,q=a+3/4*N-N/2;U.maybeAppendByClassName("".concat(zo.iconLine,"-1"),"line").styles((0,xe.pi)({x1:H,x2:H,y1:Y,y2:q},p)),U.maybeAppendByClassName("".concat(zo.iconLine,"-2"),"line").styles((0,xe.pi)({x1:V,x2:V,y1:Y,y2:q},p)),h==="vertical"&&(U.node().style.transform="rotate(90)")},e}(ai),Mk=function(r){(0,xe.ZT)(e,r);function e(t){return r.call(this,t,Ob)||this}return e.prototype.renderLabel=function(t){var n=this,i=this.attributes,a=i.x,s=i.y,o=i.showLabel,l=Wn(this.attributes,"label"),u=l.x,h=u===void 0?0:u,p=l.y,S=p===void 0?0:p,N=l.transform,U=l.transformOrigin,H=(0,xe._T)(l,["x","y","transform","transformOrigin"]),V=(0,xe.CR)(ro(H,[]),2),Y=V[0],q=V[1],ne=_n(t).maybeAppendByClassName(zo.labelGroup,"g").styles(q),le=(0,xe.pi)((0,xe.pi)({},Sb),Y),ue=le.text,fe=(0,xe._T)(le,["text"]);Na(!!o,ne,function(de){n.label=de.maybeAppendByClassName(zo.label,"text").styles((0,xe.pi)((0,xe.pi)({},fe),{x:a+h,y:s+S,transform:N,transformOrigin:U,text:"".concat(ue)})),n.label.on("mousedown",function(ve){ve.stopPropagation()}),n.label.on("touchstart",function(ve){ve.stopPropagation()})})},e.prototype.renderIcon=function(t){var n=this.attributes,i=n.x,a=n.y,s=n.orientation,o=n.type,l=(0,xe.pi)((0,xe.pi)({x:i,y:a,orientation:s},Pb),Wn(this.attributes,"icon")),u=this.attributes.iconShape,h=u===void 0?function(){return new wk({style:l})}:u,p=_n(t).maybeAppendByClassName(zo.iconGroup,"g");p.selectAll(zo.icon.class).data([h]).join(function(S){return S.append(typeof h=="string"?h:function(){return h(o)}).attr("className",zo.icon.name)},function(S){return S.update(l)},function(S){return S.remove()})},e.prototype.render=function(t,n){this.renderIcon(n),this.renderLabel(n)},e}(ai),Ak=function(r){(0,xe.ZT)(e,r);function e(t){var n=r.call(this,t,(0,xe.pi)((0,xe.pi)((0,xe.pi)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},su(Ob,"handle")),su(Pb,"handleIcon")),su(Sb,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(i){return function(a){a.stopPropagation(),n.target=i,n.prevPos=n.getOrientVal(gb(a));var s=n.availableSpace,o=s.x,l=s.y,u=n.getBBox(),h=u.x,p=u.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([o,l])-n.getOrientVal([+h,+p])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(i){var a=n.attributes,s=a.slidable,o=a.brushable,l=a.type;i.stopPropagation();var u=n.getOrientVal(gb(i)),h=u-n.prevPos;if(h){var p=n.getRatio(h);switch(n.target){case"start":s&&n.setValuesOffset(p);break;case"end":s&&n.setValuesOffset(0,p);break;case"selection":s&&n.setValuesOffset(p,p);break;case"track":if(!o)return;n.selectionWidth+=p,l==="range"?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0);break;default:break}n.prevPos=u}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(i){var a=n.attributes,s=a.onChange,o=a.type,l=o==="range"?i:i[1],u=o==="range"?n.getValues():n.getValues()[1],h=new _i("valuechange",{detail:{oldValue:l,value:u}});n.dispatchEvent(h),s==null||s(u)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){var t=this.attributes.orientation;if(t!=="horizontal")return null;var n=Wn(this.attributes,"sparkline");return(0,xe.pi)((0,xe.pi)({zIndex:0},this.availableSpace),n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,n=t.trackLength,i=t.trackSize,a=(0,xe.CR)(this.getOrientVal([[n,i],[i,n]]),2),s=a[0],o=a[1];return{width:s,height:o}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,n=t.x,i=t.y,a=t.padding,s=(0,xe.CR)(Ui(a),4),o=s[0],l=s[1],u=s[2],h=s[3],p=this.shape,S=p.width,N=p.height;return{x:h,y:o,width:S-(h+l),height:N-(o+u)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,n){t===void 0&&(t=[0,0]),n===void 0&&(n=!1),this.attributes.values=t;var i=n===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},e.prototype.updateSelectionArea=function(t){var n=this.calcSelectionArea();this.foregroundGroup.selectAll(Us.selection.class).each(function(i,a){Es(this,n[a],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&Es(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&Es(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,n){t===void 0&&(t=[0,0]),n===void 0&&(n=!1);var i=this.values,a=this.clampValues(t);this.attributes.values=a,this.setValues(a),n&&this.onValueChange(i)},e.prototype.renderTrack=function(t){var n=this.attributes,i=n.x,a=n.y,s=Wn(this.attributes,"track");this.trackShape=_n(t).maybeAppendByClassName(Us.track,"rect").styles((0,xe.pi)((0,xe.pi)({x:i,y:a},this.shape),s))},e.prototype.renderBrushArea=function(t){var n=this.attributes,i=n.x,a=n.y,s=n.brushable;this.brushArea=_n(t).maybeAppendByClassName(Us.brushArea,"rect").styles((0,xe.pi)({x:i,y:a,fill:"transparent",cursor:s?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var n=this,i=this.attributes,a=i.x,s=i.y,o=i.orientation,l=_n(t).maybeAppendByClassName(Us.sparklineGroup,"g");Na(o==="horizontal",l,function(u){var h=(0,xe.pi)((0,xe.pi)({},n.sparklineStyle),{x:a,y:s});u.maybeAppendByClassName(Us.sparkline,function(){return new bk({style:h})}).update(h)})},e.prototype.renderHandles=function(){var t=this,n,i=this.attributes,a=i.showHandle,s=i.type,o=s==="range"?["start","end"]:["end"],l=a?o:[],u=this;(n=this.foregroundGroup)===null||n===void 0||n.selectAll(Us.handle.class).data(l.map(function(h){return{type:h}}),function(h){return h.type}).join(function(h){return h.append(function(p){var S=p.type;return new Mk({style:t.getHandleStyle(S)})}).each(function(p){var S=p.type;this.attr("class","".concat(Us.handle.name," ").concat(S,"-handle"));var N="".concat(S,"Handle");u[N]=this,this.addEventListener("pointerdown",u.onDragStart(S))})},function(h){return h.each(function(p){var S=p.type;this.update(u.getHandleStyle(S))})},function(h){return h.each(function(p){var S=p.type,N="".concat(S,"Handle");u[N]=void 0}).remove()})},e.prototype.renderSelection=function(t){var n=this.attributes,i=n.x,a=n.y,s=n.type,o=n.selectionType;this.foregroundGroup=_n(t).maybeAppendByClassName(Us.foreground,"g");var l=Wn(this.attributes,"selection"),u=function(p){return p.style("visibility",function(S){return S.show?"visible":"hidden"}).style("cursor",function(S){return o==="select"?"grab":o==="invert"?"crosshair":"default"}).styles((0,xe.pi)((0,xe.pi)({},l),{transform:"translate(".concat(i,", ").concat(a,")")}))},h=this;this.foregroundGroup.selectAll(Us.selection.class).data(s==="value"?[]:this.calcSelectionArea().map(function(p,S){return{style:(0,xe.pi)({},p),index:S,show:o==="select"?S===1:S!==1}}),function(p){return p.index}).join(function(p){return p.append("rect").attr("className",Us.selection.name).call(u).each(function(S,N){var U=this;N===1?(h.selectionShape=_n(this),this.on("pointerdown",function(H){U.attr("cursor","grabbing"),h.onDragStart("selection")(H)}),h.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),h.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),h.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){U.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){U.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){U.attr("cursor","pointer")})):this.on("pointerdown",h.onDragStart("track"))})},function(p){return p.call(u)},function(p){return p.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,n){this.renderTrack(n),this.renderSparkline(n),this.renderBrushArea(n),this.renderSelection(n)},e.prototype.clampValues=function(t,n){var i;n===void 0&&(n=4);var a=(0,xe.CR)(this.range,2),s=a[0],o=a[1],l=(0,xe.CR)(this.getValues().map(function(V){return X0(V,n)}),2),u=l[0],h=l[1],p=Array.isArray(t)?t:[u,t!=null?t:h],S=(0,xe.CR)((p||[u,h]).map(function(V){return X0(V,n)}),2),N=S[0],U=S[1];if(this.attributes.type==="value")return[0,Jr(U,s,o)];N>U&&(i=(0,xe.CR)([U,N],2),N=i[0],U=i[1]);var H=U-N;return H>o-s?[s,o]:No?h===o&&u===N?[N,o]:[o-H,o]:[N,U]},e.prototype.calcSelectionArea=function(t){var n=(0,xe.CR)(this.clampValues(t),2),i=n[0],a=n[1],s=this.availableSpace,o=s.x,l=s.y,u=s.width,h=s.height;return this.getOrientVal([[{y:l,height:h,x:o,width:i*u},{y:l,height:h,x:i*u+o,width:(a-i)*u},{y:l,height:h,x:a*u,width:(1-a)*u}],[{x:o,width:u,y:l,height:i*h},{x:o,width:u,y:i*h+l,height:(a-i)*h},{x:o,width:u,y:a*h,height:(1-a)*h}]])},e.prototype.calcHandlePosition=function(t){var n=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,s=i.y,o=i.width,l=i.height,u=(0,xe.CR)(this.clampValues(),2),h=u[0],p=u[1],S=t==="start"?-n:n,N=(t==="start"?h:p)*this.getOrientVal([o,l])+S;return{x:a+this.getOrientVal([N,o/2]),y:s+this.getOrientVal([l/2,N])}},e.prototype.inferTextStyle=function(t){var n=this.attributes.orientation;return n==="horizontal"?{}:t==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:t==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var n,i=this.attributes,a=i.type,s=i.orientation,o=i.formatter,l=i.autoFitLabel,u=Wn(this.attributes,"handle"),h=Wn(u,"label"),p=u.spacing,S=this.getHandleSize(),N=this.clampValues(),U=t==="start"?N[0]:N[1],H=o(U),V=new O0({style:(0,xe.pi)((0,xe.pi)((0,xe.pi)({},h),this.inferTextStyle(t)),{text:H})}),Y=V.getBBox(),q=Y.width,ne=Y.height;if(V.destroy(),!l){if(a==="value")return{text:H,x:0,y:-ne-p};var le=p+S+(s==="horizontal"?q/2:0);return n={text:H},n[s==="horizontal"?"x":"y"]=t==="start"?-le:le,n}var ue=0,fe=0,de=this.availableSpace,ve=de.width,Te=de.height,Oe=this.calcSelectionArea()[1],Ie=Oe.x,ze=Oe.y,Xe=Oe.width,et=Oe.height,st=p+S;if(s==="horizontal"){var bt=st+q/2;if(t==="start"){var _t=Ie-st-q;ue=_t>0?-bt:bt}else{var ct=ve-Ie-Xe-st>q;ue=ct?bt:-bt}}else{var ft=st,At=ne+st;t==="start"?fe=ze-S>ne?-At:ft:fe=Te-(ze+et)-S>ne?At:-ft}return{x:ue,y:fe,text:H}},e.prototype.getHandleLabelStyle=function(t){var n=Wn(this.attributes,"handleLabel");return(0,xe.pi)((0,xe.pi)((0,xe.pi)({},n),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,n=Wn(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return(0,xe.pi)({cursor:i,shape:t,size:a},n)},e.prototype.getHandleStyle=function(t){var n=this.attributes,i=n.x,a=n.y,s=n.showLabel,o=n.showLabelOnInteraction,l=n.orientation,u=this.calcHandlePosition(t),h=u.x,p=u.y,S=this.calcHandleText(t),N=s;return!s&&o&&(this.target?N=!0:N=!1),(0,xe.pi)((0,xe.pi)((0,xe.pi)({},su(this.getHandleIconStyle(),"icon")),su((0,xe.pi)((0,xe.pi)({},this.getHandleLabelStyle(t)),S),"label")),{transform:"translate(".concat(h+i,", ").concat(p+a,")"),orientation:l,showLabel:N,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,n=t.handleIconSize,i=t.width,a=t.height;return n||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},e.prototype.getOrientVal=function(t){var n=(0,xe.CR)(t,2),i=n[0],a=n[1],s=this.attributes.orientation;return s==="horizontal"?i:a},e.prototype.setValuesOffset=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var a=this.attributes.type,s=(0,xe.CR)(this.getValues(),2),o=s[0],l=s[1],u=a==="range"?t:0,h=[o+u,l+n].sort();i?this.setValues(h):this.innerSetValues(h,!0)},e.prototype.getRatio=function(t){var n=this.availableSpace,i=n.width,a=n.height;return t/this.getOrientVal([i,a])},e.prototype.dispatchCustomEvent=function(t,n,i){var a=this;t.on(n,function(s){s.stopPropagation(),a.dispatchEvent(new _i(i,{detail:s}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){var n=this.attributes.scrollable;if(n){var i=t.deltaX,a=t.deltaY,s=a||i,o=this.getRatio(s);this.setValuesOffset(o,o,!0)}},e.tag="slider",e}(ai),Tk={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(r){return r.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},ap=_s({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Pk=function(r){(0,xe.ZT)(e,r);function e(t){var n=r.call(this,t,Tk)||this;return n.point=[0,0],n.group=n.appendChild(new Ai({})),n.isMutationObserved=!0,n}return e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,n=t.position,i=t.padding,a=(0,xe.CR)(Ui(i),4),s=a[0],o=a[1],l=a[2],u=a[3],h=this.label.node().getLocalBounds(),p=h.min,S=h.max,N=new Ji(p[0]-u,p[1]-s,S[0]+o-p[0]+u,S[1]+l-p[1]+s),U=this.getPath(n,N),H=Wn(this.attributes,"background");this.background=_n(this.group).maybeAppendByClassName(ap.background,"path").styles((0,xe.pi)((0,xe.pi)({},H),{d:U})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,n=t.formatter,i=t.labelText,a=Wn(this.attributes,"label"),s=(0,xe.CR)(ro(a),2),o=s[0],l=s[1],u=o.text,h=(0,xe._T)(o,["text"]);if(this.label=_n(this.group).maybeAppendByClassName(ap.labelGroup,"g").styles(l),!!i){var p=this.label.maybeAppendByClassName(ap.label,function(){return io(n(i))}).style("text",n(i).toString());p.selectAll("text").styles(h)}},e.prototype.adjustLayout=function(){var t=(0,xe.CR)(this.point,2),n=t[0],i=t[1],a=this.attributes,s=a.x,o=a.y;this.group.attr("transform","translate(".concat(s-n,", ").concat(o-i,")"))},e.prototype.getPath=function(t,n){var i=this.attributes.radius,a=n.x,s=n.y,o=n.width,l=n.height,u=[["M",a+i,s],["L",a+o-i,s],["A",i,i,0,0,1,a+o,s+i],["L",a+o,s+l-i],["A",i,i,0,0,1,a+o-i,s+l],["L",a+i,s+l],["A",i,i,0,0,1,a,s+l-i],["L",a,s+i],["A",i,i,0,0,1,a+i,s],["Z"]],h={top:4,right:6,bottom:0,left:2},p=h[t],S=this.createCorner([u[p].slice(-2),u[p+1].slice(-2)]);return u.splice.apply(u,(0,xe.ev)([p+1,1],(0,xe.CR)(S),!1)),u[0][0]="M",u},e.prototype.createCorner=function(t,n){n===void 0&&(n=10);var i=.8,a=w5.apply(void 0,(0,xe.ev)([],(0,xe.CR)(t),!1)),s=(0,xe.CR)(t,2),o=(0,xe.CR)(s[0],2),l=o[0],u=o[1],h=(0,xe.CR)(s[1],2),p=h[0],S=h[1],N=(0,xe.CR)(a?[p-l,[l,p]]:[S-u,[u,S]],2),U=N[0],H=(0,xe.CR)(N[1],2),V=H[0],Y=H[1],q=U/2,ne=U/Math.abs(U),le=n*ne,ue=le/2,fe=le*Math.sqrt(3)/2*i,de=(0,xe.CR)([V,V+q-ue,V+q,V+q+ue,Y],5),ve=de[0],Te=de[1],Oe=de[2],Ie=de[3],ze=de[4];return a?(this.point=[Oe,u-fe],[["L",ve,u],["L",Te,u],["L",Oe,u-fe],["L",Ie,u],["L",ze,u]]):(this.point=[l+fe,Oe],[["L",l,ve],["L",l,Te],["L",l+fe,Oe],["L",l,Ie],["L",l,ze]])},e.prototype.applyVisibility=function(){var t=this.attributes.visibility;t==="hidden"?ys(this):pc(this)},e.prototype.bindEvents=function(){this.label.on(Kn.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(ai),Sk=function(r){(0,xe.ZT)(e,r);function e(t){var n=r.call(this,Li({},e.defaultOptions,t))||this;return n.hoverColor="#f5f5f5",n.selectedColor="#e6f7ff",n.background=n.appendChild(new ki({})),n.label=n.background.appendChild(new Ai({})),n}return Object.defineProperty(e.prototype,"padding",{get:function(){return Ui(this.style.padding)},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(){var t=this.style,n=t.label,i=t.value,a=Wn(this.attributes,"label");_n(this.label).maybeAppend(".label",function(){return io(n)}).attr("className","label").styles(a),this.label.attr("__data__",i)},e.prototype.renderBackground=function(){var t=this.label.getBBox(),n=(0,xe.CR)(this.padding,4),i=n[0],a=n[1],s=n[2],o=n[3],l=t.width,u=t.height,h=l+o+a,p=u+i+s,S=Wn(this.attributes,"background"),N=this.style,U=N.width,H=U===void 0?0:U,V=N.height,Y=V===void 0?0:V,q=N.selected;this.background.attr((0,xe.pi)((0,xe.pi)({},S),{width:Math.max(h,H),height:Math.max(p,Y),fill:q?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(o,", ").concat((p-u)/2,")")})},e.prototype.render=function(){this.renderLabel(),this.renderBackground()},e.prototype.bindEvents=function(){var t=this;this.addEventListener("pointerenter",function(){t.style.selected||t.background.attr("fill",t.hoverColor)}),this.addEventListener("pointerleave",function(){t.style.selected||t.background.attr("fill",t.style.backgroundFill)});var n=this;this.addEventListener("click",function(){var i=t.style,a=i.label,s=i.value,o=i.onClick;o==null||o(s,{label:a,value:s},n)})},e.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},e}(ai),Ok=function(r){(0,xe.ZT)(e,r);function e(t){var n,i,a=r.call(this,Li({},e.defaultOptions,t))||this;a.currentValue=(n=e.defaultOptions.style)===null||n===void 0?void 0:n.defaultValue,a.isPointerInSelect=!1,a.select=a.appendChild(new ki({className:"select",style:{cursor:"pointer",width:0,height:0}})),a.dropdown=a.appendChild(new ki({className:"dropdown"}));var s=a.style.defaultValue;return s&&(!((i=a.style.options)===null||i===void 0)&&i.some(function(o){return o.value===s}))&&(a.currentValue=s),a}return e.prototype.setValue=function(t){this.currentValue=t,this.render()},e.prototype.getValue=function(){return this.currentValue},Object.defineProperty(e.prototype,"dropdownPadding",{get:function(){return Ui(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),e.prototype.renderSelect=function(){var t=this,n,i=this.style,a=i.x,s=i.y,o=i.width,l=i.height,u=i.bordered,h=i.showDropdownIcon,p=Wn(this.attributes,"select"),S=Wn(this.attributes,"placeholder");this.select.attr((0,xe.pi)((0,xe.pi)({x:a,y:s,width:o,height:l},p),{fill:"#fff",strokeWidth:u?1:0}));var N=this.dropdownPadding,U=10;h&&_n(this.select).maybeAppend(".dropdown-icon","path").style("d","M-5,-3.5 L0,3.5 L5,-3.5").style("transform","translate(".concat(a+o-U-N[1]-N[3],", ").concat(s+l/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var H=(n=this.style.options)===null||n===void 0?void 0:n.find(function(ne){return ne.value===t.currentValue}),V=(0,xe.pi)({x:a+N[3]},S);_n(this.select).selectAll(".placeholder").data(H?[]:[1]).join(function(ne){return ne.append("text").attr("className","placeholder").styles(V).style("y",function(){var le=this.getBBox();return s+(l-le.height)/2})},function(ne){return ne.styles(V)},function(ne){return ne.remove()});var Y=Wn(this.attributes,"optionLabel"),q=(0,xe.pi)({x:a+N[3]},Y);_n(this.select).selectAll(".value").data(H?[H]:[]).join(function(ne){return ne.append(function(le){return io(le.label)}).attr("className","value").styles(q).style("y",function(){var le=this.getBBox();return s+(l-le.height)/2})},function(ne){return ne.styles(q)},function(ne){return ne.remove()})},e.prototype.renderDropdown=function(){var t=this,n,i,a=this.style,s=a.x,o=a.y,l=a.width,u=a.height,h=a.options,p=a.onSelect,S=a.open,N=Wn(this.attributes,"dropdown"),U=Wn(this.attributes,"option"),H=this.dropdownPadding;_n(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(h,function(q){return q.value}).join(function(q){return q.append(function(ne){return new Sk({className:"dropdown-item",style:(0,xe.pi)((0,xe.pi)((0,xe.pi)({},ne),U),{width:l-H[1]-H[3],selected:ne.value===t.currentValue,onClick:function(le,ue,fe){t.setValue(le),p==null||p(le,ue,fe),t.dispatchEvent(new _i("change",{detail:{value:le,option:ue,item:fe}})),ys(t.dropdown)}})})}).each(function(ne,le){var ue,fe=(ue=this.parentNode)===null||ue===void 0?void 0:ue.children,de=fe.reduce(function(ve,Te,Oe){return Oea.time?1:0};return t.sort(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"space",{get:function(){var t=this.attributes,n=t.x,i=t.y,a=t.width,s=t.height,o=t.type,l=t.controllerHeight,u=Jr(+s-l,0,+s),h=new Ji(n,i+ +s-l,+a,l),p,S=0;o==="chart"?(S=35,p=new Ji(n,i+u-S,+a,S)):p=new Ji;var N=o==="time"?10:u,U=new Ji(n,i+(o==="time"?u:u-N),+a,N-S);return{axisBBox:p,controllerBBox:h,timelineBBox:U}},enumerable:!1,configurable:!0}),e.prototype.setBySliderValues=function(t){var n,i,a=this.data,s=(0,xe.CR)(Array.isArray(t)?t:[0,t],2),o=s[0],l=s[1],u=a.length,h=a[Math.floor(o*u)],p=a[Math.ceil(l*u)-(Array.isArray(t)?0:1)];this.states.values=[(n=h==null?void 0:h.time)!==null&&n!==void 0?n:a[0].time,(i=p==null?void 0:p.time)!==null&&i!==void 0?i:1/0]},e.prototype.setByTimebarValues=function(t){var n,i,a,s=this.data,o=(0,xe.CR)(Array.isArray(t)?t:[void 0,t],2),l=o[0],u=o[1],h=s.find(function(S){var N=S.time;return N===l}),p=s.find(function(S){var N=S.time;return N===u});this.states.values=[(n=h==null?void 0:h.time)!==null&&n!==void 0?n:(i=s[0])===null||i===void 0?void 0:i.time,(a=p==null?void 0:p.time)!==null&&a!==void 0?a:1/0]},e.prototype.setByIndex=function(t){var n,i,a,s,o=this.data,l=(0,xe.CR)(t,2),u=l[0],h=l[1];this.states.values=[(i=(n=o[u])===null||n===void 0?void 0:n.time)!==null&&i!==void 0?i:o[0].time,(s=(a=this.data[h])===null||a===void 0?void 0:a.time)!==null&&s!==void 0?s:1/0]},Object.defineProperty(e.prototype,"sliderValues",{get:function(){var t=this.states,n=t.values,i=t.selectionType,a=(0,xe.CR)(Array.isArray(n)?n:[void 0,n],2),s=a[0],o=a[1],l=this.data,u=l.length,h=i==="value",p=function(){var N=l.findIndex(function(U){var H=U.time;return H===s});return h?0:N>-1?N/u:0},S=function(){if(o===1/0)return 1;var N=l.findIndex(function(U){var H=U.time;return H===o});return N>-1?N/u:h?.5:1};return[p(),S()]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){var t=this.states,n=t.values,i=t.selectionType,a=(0,xe.CR)(Array.isArray(n)?n:[this.data[0].time,n],2),s=a[0],o=a[1];return i==="value"?o:[s,o]},enumerable:!1,configurable:!0}),e.prototype.getDatumByRatio=function(t){var n=this.data,i=n.length,a=Math.floor(t*(i-1));return n[a]},Object.defineProperty(e.prototype,"chartHandleIconShape",{get:function(){var t=this.states.selectionType,n=this.space.timelineBBox.height;return t==="range"?function(i){return new Gk({style:{type:i,height:n,iconSize:n/6}})}:function(){return new al({style:{x1:0,y1:-n/2,x2:0,y2:n/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),e.prototype.getChartStyle=function(t){var n=this,i=t.x,a=t.y,s=t.width,o=t.height,l=this.states,u=l.selectionType,h=l.chartType,p=this.data,S=this.attributes,N=S.type,U=S.labelFormatter,H=Wn(this.attributes,"chart"),V=H.type,Y=(0,xe._T)(H,["type"]),q=u==="range";if(N==="time")return(0,xe.pi)({handleIconShape:function(){return new Hk({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:q?-15:0,autoFitLabel:q,handleSpacing:q?-15:0,trackFill:"#edeeef",trackLength:s,trackOpacity:.5,trackRadius:o/2,trackSize:o/2,type:u,values:this.sliderValues,formatter:function(ue){if(U)return U(ue);var fe=n.getDatumByRatio(ue).time;return typeof fe=="number"?Cb(fe):la(fe,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},Y);var ne=u==="range"?5:0,le=p.map(function(ue){var fe=ue.value;return fe});return(0,xe.pi)({handleIconOffset:ne,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:le,sparklineType:h,sparklineScale:.8,trackLength:s,trackSize:o,type:u,values:this.sliderValues,transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},Y)},e.prototype.renderChart=function(t){t===void 0&&(t=this.space.timelineBBox),this.timeline.update(this.getChartStyle(t))},e.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},e.prototype.getAxisStyle=function(t){var n=this.data,i=this.attributes,a=i.interval,s=i.labelFormatter,o=Wn(this.attributes,"axis"),l=t.x,u=t.y,h=t.width,p=(0,xe.ev)((0,xe.ev)([],(0,xe.CR)(n),!1),[{time:0}],!1).map(function(N,U,H){var V=N.time;return{label:"".concat(V),value:U/(H.length-1),time:V}}),S=(0,xe.pi)({startPos:[l,u],endPos:[l+h,u],data:p,labelFilter:function(N,U){return Ua?l==="value"?[0,0]:u==="acc"?[de(ue),de(ue)]:[0,de(fe-ue)]:ue<0?u==="acc"?[0,de(fe)]:[de(ue+a-fe),a]:[de(ue),de(fe)]},q=Y(V);return this.setByIndex(q),this.updateSelection(),q},e.prototype.internalBackward=function(t){var n,i,a=this.moveSelection("backward",t);return t||((i=(n=this.attributes)===null||n===void 0?void 0:n.onBackward)===null||i===void 0||i.call(n),this.dispatchOnChange()),a},e.prototype.backward=function(){this.internalBackward()},e.prototype.internalPlay=function(t){var n=this,i,a,s=this.data,o=this.attributes.loop,l=this.states.speed,u=l===void 0?1:l;this.playInterval=window.setInterval(function(){var h=n.internalForward();h[1]===s.length&&!o&&(n.internalPause(),n.renderController())},1e3/u),this.states.state="play",!t&&((a=(i=this.attributes)===null||i===void 0?void 0:i.onPlay)===null||a===void 0||a.call(i))},e.prototype.play=function(){this.internalPlay()},e.prototype.internalPause=function(t){var n,i;clearInterval(this.playInterval),this.states.state="pause",!t&&((i=(n=this.attributes)===null||n===void 0?void 0:n.onPause)===null||i===void 0||i.call(n))},e.prototype.pause=function(){this.internalPause()},e.prototype.internalForward=function(t){var n,i,a=this.moveSelection("forward",t);return t||((i=(n=this.attributes)===null||n===void 0?void 0:n.onForward)===null||i===void 0||i.call(n),this.dispatchOnChange()),a},e.prototype.forward=function(){this.internalForward()},e.prototype.handleSpeedChange=function(t){var n,i;this.states.speed=t;var a=this.states.state;a==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(i=(n=this.attributes)===null||n===void 0?void 0:n.onSpeedChange)===null||i===void 0||i.call(n,t)},e.prototype.handleSelectionTypeChange=function(t){var n,i;this.states.selectionType=t,this.renderChart(),(i=(n=this.attributes)===null||n===void 0?void 0:n.onSelectionTypeChange)===null||i===void 0||i.call(n,t)},e.prototype.handleChartTypeChange=function(t){var n,i;this.states.chartType=t,this.renderChart(),(i=(n=this.attributes)===null||n===void 0?void 0:n.onChartTypeChange)===null||i===void 0||i.call(n,t)},e.prototype.render=function(){var t=this.space,n=t.axisBBox,i=t.controllerBBox,a=t.timelineBBox;this.renderController(i),this.renderAxis(n),this.renderChart(a),this.states.state==="play"&&this.internalPlay()},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.internalPause(!0)},e.defaultOptions={style:{x:0,y:0,axisLabelFill:"#6e6e6e",axisLabelTextAlign:"left",axisLabelTextBaseline:"top",axisLabelTransform:"translate(5, -12)",axisLineLineWidth:1,axisLineStroke:"#cacdd1",axisTickLength:15,axisTickLineWidth:1,axisTickStroke:"#cacdd1",chartShowLabel:!1,chartType:"line",controllerAlign:"center",controllerHeight:40,data:[],interval:"day",loop:!1,playMode:"acc",selectionType:"range",type:"time"}},e}(ai);function Kk(r){return r instanceof Date}var Xk=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})},Yk=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var U;const H=Object.assign(Object.assign({x:S[0]/2-l/2,y:N,onChange:V=>{const Y=(va(V)?V:[V,V]).map(q=>Kk(q)?q.getTime():q);this.options.mode==="modify"?this.filterElements(Y):this.hiddenElements(Y),n==null||n(Y)}},p),{data:a.map(V=>un(V)?{time:V,value:0}:V),width:l,height:u,type:i});this.timebar?this.timebar.update(H):(this.timebar=new Zk({style:H}),(U=this.canvas)===null||U===void 0||U.appendChild(this.timebar))})}upsertCanvas(){if(this.canvas)return this.canvas;const{className:e,height:t,position:n}=this.options,i=this.context.canvas,[a]=i.getSize(),[s,,o]=this.padding,[l,u]=N0({width:a,height:t+s+o,graphCanvas:i,className:"timebar",placement:n});return this.container=l,e&&l.classList.add(e),this.canvas=u,this.canvas}filterElements(e){return Xk(this,void 0,void 0,function*(){var t;if(!this.originalData)return;const{elementTypes:n,getTime:i}=this.options,{graph:a,element:s}=this.context,o=Lb(this.originalData);n.forEach(u=>{const h=`${u}s`;o[h]=(this.originalData[h]||[]).filter(p=>{const S=i(p);return!!Rb(S,e)})});const l=[...o.nodes,...o.combos].map(u=>Et(u));o.edges=o.edges.filter(u=>{const h=u.source,p=u.target;return l.includes(h)&&l.includes(p)}),a.setData(o),yield(t=s.draw({animation:!1,silence:!0}))===null||t===void 0?void 0:t.finished})}hiddenElements(e){const{graph:t}=this.context,{elementTypes:n,getTime:i}=this.options,a=[],s=[];n.forEach(o=>{var l;const u=`${o}s`;(((l=this.originalData)===null||l===void 0?void 0:l[u])||[]).forEach(p=>{const S=Et(p),N=i(p);Rb(N,e)?s.push(S):a.push(S)})}),t.hideElement(a,!1),t.showElement(s,!1)}destroy(){var e,t,n;const{graph:i}=this.context;this.originalData&&i.setData(Object.assign({},this.originalData)),(e=this.timebar)===null||e===void 0||e.destroy(),(t=this.canvas)===null||t===void 0||t.destroy(),(n=this.container)===null||n===void 0||n.remove(),this.originalData=void 0,this.container=void 0,this.timebar=void 0,this.canvas=void 0,super.destroy()}}Dd.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:r=>Jk(r,Qk,void 0),loop:!1};const Lb=r=>{const{nodes:e=[],edges:t=[],combos:n=[]}=r;return{nodes:[...e],edges:[...t],combos:[...n]}},Rb=(r,e)=>{if(un(e))return r===e;const[t,n]=e;return r>=t&&r<=n},Jk=(r,e,t)=>{var n;for(let i=0;i{e[n]="8px"}),e.flexDirection=r.startsWith("top")||r.startsWith("bottom")?"row":"column",e}const $k=` .g6-toolbar { position: absolute; z-index: 100; display: flex; flex-direction: row; align-items: center; justify-content: center; border-radius: 4px; box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1); opacity: 0.65; } .g6-toolbar .g6-toolbar-item { display: inline-block; width: 16px; height: 16px; padding: 4px; cursor: pointer; box-sizing: content-box; } .g6-toolbar .g6-toolbar-item:hover { background-color: #f0f0f0; } .g6-toolbar .g6-toolbar-item svg { display: inline-block; width: 100%; height: 100%; pointer-events: none; } `,eF=` `;var Ib=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class Cd extends zi{constructor(e,t){super(e,Object.assign({},Cd.defaultOptions,t)),this.$element=au("toolbar",!1),this.onToolbarItemClick=i=>{const{onClick:a}=this.options;if(i.target instanceof Element&&i.target.className.includes("g6-toolbar-item")){const s=i.target.getAttribute("value");a==null||a(s,i.target)}};const n=this.context.canvas.getContainer();this.$element.style.display="flex",n.appendChild(this.$element),E0("g6-toolbar-css","style",{},$k,document.head),E0("g6-toolbar-svgicon","div",{display:"none"},eF),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(t)}update(e){const t=Object.create(null,{update:{get:()=>super.update}});return Ib(this,void 0,void 0,function*(){t.update.call(this,e);const{className:n,position:i,style:a}=this.options;this.$element.className=`g6-toolbar ${n||""}`,Object.assign(this.$element.style,a,qk(i)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return Ib(this,void 0,void 0,function*(){return(yield this.options.getItems()).map(t=>{var n;return`
`}).join("")})}}Cd.defaultOptions={position:"top-left"};function hp(r){var e=document.createElement("div");e.innerHTML=r;var t=e.childNodes[0];return t&&e.contains(t)&&e.removeChild(t),t}function tF(r,e){return!r||!e?r:r.replace(/\\?\{([^{}]+)\}/g,function(t,n){return t.charAt(0)==="\\"?t.slice(1):e[n]===void 0?"":e[n]})}var nF=tF,Nb=function(r,e){if(e==null){r.innerHTML="";return}r.replaceChildren?Array.isArray(e)?r.replaceChildren.apply(r,(0,xe.ev)([],(0,xe.CR)(e),!1)):r.replaceChildren(e):(r.innerHTML="",Array.isArray(e)?e.forEach(function(t){return r.appendChild(t)}):r.appendChild(e))};function fp(r){return r===void 0&&(r=""),{CONTAINER:"".concat(r,"tooltip"),TITLE:"".concat(r,"tooltip-title"),LIST:"".concat(r,"tooltip-list"),LIST_ITEM:"".concat(r,"tooltip-list-item"),NAME:"".concat(r,"tooltip-list-item-name"),MARKER:"".concat(r,"tooltip-list-item-marker"),NAME_LABEL:"".concat(r,"tooltip-list-item-name-label"),VALUE:"".concat(r,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(r,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(r,"tooltip-crosshair-y")}}var Bb={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function rF(r){var e;r===void 0&&(r="");var t=fp(r);return e={},e[".".concat(t.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},e[".".concat(t.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(t.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(t.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(t.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(t.NAME)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(t.NAME_LABEL)]=(0,xe.pi)({flex:1},Bb),e[".".concat(t.VALUE)]=(0,xe.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Bb),e[".".concat(t.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(t.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e}var iF=function(r){(0,xe.ZT)(e,r);function e(t){var n=this,i,a,s=(a=(i=t.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,o=fp(s);return n=r.call(this,t,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'
'),title:'
'),item:'
  • {name} {value}
  • `)},style:rF(s)})||this,n.timestamp=-1,n.prevCustomContentKey=n.attributes.contentKey,n.initShape(),n.render(n.attributes,n),n}return Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){var t=this.element.offsetWidth,n=this.element.offsetHeight;return{width:t,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,n=t.data,i=t.template;return n.map(function(a,s){var o=a.name,l=o===void 0?"":o,u=a.color,h=u===void 0?"black":u,p=a.index,S=(0,xe._T)(a,["name","color","index"]),N=(0,xe.pi)({name:l,color:h,index:p!=null?p:s},S);return hp(nF(i.item,N))})},enumerable:!1,configurable:!0}),e.prototype.render=function(t,n){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var t;(t=this.element)===null||t===void 0||t.remove(),r.prototype.destroy.call(this)},e.prototype.show=function(t,n){var i=this;if(t!==void 0&&n!==void 0){var a=this.element.style.visibility==="hidden",s=function(){i.attributes.x=t!=null?t:i.attributes.x,i.attributes.y=n!=null?n:i.attributes.y,i.updatePosition()};a?this.closeTransition(s):s()}this.element.style.visibility="visible"},e.prototype.hide=function(t,n){t===void 0&&(t=0),n===void 0&&(n=0);var i=this.attributes.enterable;i&&this.isCursorEntered(t,n)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){var t=this.attributes.template;this.element=hp(t.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var t=this.attributes.content;t&&(typeof t=="string"?this.element.innerHTML=t:Nb(this.element,t))}},e.prototype.renderHTMLTooltipElement=function(){var t,n,i=this.attributes,a=i.template,s=i.title,o=i.enterable,l=i.style,u=i.content,h=fp(a.prefixCls),p=this.element;if(this.element.style.pointerEvents=o?"auto":"none",u)this.renderCustomContent();else{s?(p.innerHTML=a.title,p.getElementsByClassName(h.TITLE)[0].innerHTML=s):(n=(t=p.getElementsByClassName(h.TITLE))===null||t===void 0?void 0:t[0])===null||n===void 0||n.remove();var S=this.HTMLTooltipItemsElements,N=document.createElement("ul");N.className=h.LIST,Nb(N,S);var U=this.element.querySelector(".".concat(h.LIST));U?U.replaceWith(N):p.appendChild(N)}BB(p,l)},e.prototype.getRelativeOffsetFromCursor=function(t){var n=this.attributes,i=n.position,a=n.offset,s=t||i,o=s.split("-"),l={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},u=this.elementSize,h=u.width,p=u.height,S=[-h/2,-p/2];return o.forEach(function(N){var U=(0,xe.CR)(S,2),H=U[0],V=U[1],Y=(0,xe.CR)(l[N],2),q=Y[0],ne=Y[1];S=[H+(h/2+a[0])*q,V+(p/2+a[1])*ne]}),S},e.prototype.setOffsetPosition=function(t){var n=(0,xe.CR)(t,2),i=n[0],a=n[1],s=this.attributes,o=s.x,l=o===void 0?0:o,u=s.y,h=u===void 0?0:u,p=s.container,S=p.x,N=p.y;this.element.style.left="".concat(+l+S+i,"px"),this.element.style.top="".concat(+h+N+a,"px")},e.prototype.updatePosition=function(){var t=this.attributes.showDelay,n=t===void 0?60:t,i=Date.now();this.timestamp>0&&i-this.timestampq+le,top:Vne+ue},de=[];h.split("-").forEach(function(Te){fe[Te]?de.push(Y[Te]):de.push(Te)});var ve=de.join("-");return this.getRelativeOffsetFromCursor(ve)},e.prototype.isCursorEntered=function(t,n){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,s=i.y,o=i.width,l=i.height;return new Ji(a,s,o,l).isPointIn(t,n)}return!1},e.prototype.closeTransition=function(t){var n=this,i=this.element.style.transition;this.element.style.transition="none",t(),setTimeout(function(){n.element.style.transition=i},10)},e.tag="tooltip",e}(ai),kb=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class Ld extends zi{constructor(e,t){super(e,Object.assign({},Ld.defaultOptions,t)),this.currentTarget=null,this.tooltipElement=null,this.container=null,this.isEnable=(n,i)=>{const{enable:a}=this.options;return typeof a=="function"?a(n,i):a},this.onClick=n=>{const{target:{id:i}}=n;this.currentTarget===i?this.hide(n):this.show(n)},this.onPointerMove=n=>{const{target:i}=n;!this.currentTarget||i.id===this.currentTarget||this.show(n)},this.onPointerLeave=n=>{this.hide(n)},this.onCanvasMove=n=>{this.hide(n)},this.onPointerEnter=n=>{this.show(n)},this.showById=n=>kb(this,void 0,void 0,function*(){const i={target:{id:n}};yield this.show(i)}),this.getElementData=(n,i)=>{const{model:a}=this.context;switch(i){case"node":return a.getNodeData([n]);case"edge":return a.getEdgeData([n]);case"combo":return a.getComboData([n]);default:return[]}},this.show=n=>kb(this,void 0,void 0,function*(){var i,a;const{client:s,target:{id:o}}=n;if(wf(n.target))return;const l=this.context.graph.getElementType(o),{getContent:u,title:h}=this.options,p=this.getElementData(o,l);if(!this.tooltipElement||!this.isEnable(n,p))return;let S={};if(u){if(S.content=yield u(n,p),!S.content)return}else{const H=this.context.graph.getElementRenderStyle(o),V=l==="node"?H.fill:H.stroke;S={title:h||l,data:p.map(Y=>({name:"ID",value:Y.id||`${Y.source} -> ${Y.target}`,color:V}))}}this.currentTarget=o;let N,U;if(s)N=s.x,U=s.y;else{const H=ba(p,"0.style",{x:0,y:0});N=H.x,U=H.y}(a=(i=this.options).onOpenChange)===null||a===void 0||a.call(i,!0),this.tooltipElement.update(Object.assign(Object.assign(Object.assign({},this.tooltipStyleProps),{x:N,y:U,style:{".tooltip":{visibility:"visible"}}}),S))}),this.hide=n=>{var i,a,s,o,l;if(!n){(a=(i=this.options).onOpenChange)===null||a===void 0||a.call(i,!1),(s=this.tooltipElement)===null||s===void 0||s.hide(),this.currentTarget=null;return}if(!this.tooltipElement||!this.currentTarget)return;const{client:{x:u,y:h}}=n;(l=(o=this.options).onOpenChange)===null||l===void 0||l.call(o,!1),this.tooltipElement.hide(u,h),this.currentTarget=null},this.initTooltip=()=>{var n;const i=new iF({className:"tooltip",style:this.tooltipStyleProps});return(n=this.container)===null||n===void 0||n.appendChild(i.HTMLTooltipElement),i},this.render(),this.bindEvents()}getEvents(){return this.options.trigger==="click"?{"node:click":this.onClick,"edge:click":this.onClick,"combo:click":this.onClick,"canvas:click":this.onPointerLeave,contextmenu:this.onPointerLeave,drag:this.onPointerLeave}:{"node:pointerenter":this.onPointerEnter,"node:pointermove":this.onPointerMove,"canvas:pointermove":this.onCanvasMove,"edge:pointerenter":this.onPointerEnter,"edge:pointermove":this.onPointerMove,"combo:pointerenter":this.onPointerEnter,"combo:pointermove":this.onPointerMove,contextmenu:this.onPointerLeave,"node:drag":this.onPointerLeave}}update(e){var t;this.unbindEvents(),super.update(e),this.tooltipElement&&((t=this.container)===null||t===void 0||t.removeChild(this.tooltipElement.HTMLTooltipElement)),this.tooltipElement=this.initTooltip(),this.bindEvents()}render(){const{canvas:e}=this.context,t=e.getContainer();t&&(this.container=t,this.tooltipElement=this.initTooltip())}unbindEvents(){const{graph:e}=this.context,t=this.getEvents();Object.keys(t).forEach(n=>{e.off(n,t[n])})}bindEvents(){const{graph:e}=this.context,t=this.getEvents();Object.keys(t).forEach(n=>{e.on(n,t[n])})}get tooltipStyleProps(){const{canvas:e}=this.context,{center:t}=e.getBounds(),n=e.getContainer(),{top:i,left:a}=n.getBoundingClientRect(),{style:s,position:o,enterable:l,container:u={x:-a,y:-i},title:h,offset:p}=this.options,[S,N]=t,[U,H]=e.getSize();return{x:S,y:N,container:u,title:h,bounding:{x:0,y:0,width:U,height:H},position:o,enterable:l,offset:p,style:s}}destroy(){var e;this.unbindEvents(),this.tooltipElement&&((e=this.container)===null||e===void 0||e.removeChild(this.tooltipElement.HTMLTooltipElement)),super.destroy()}}Ld.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var Fb=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};let cu;function zb(r,e){return cu||(cu=document.createElement("canvas")),cu.width=r,cu.height=e,cu.getContext("2d").clearRect(0,0,r,e),cu}function aF(r,e,t,n){return Fb(this,void 0,void 0,function*(){const i=zb(r,e),a=i.getContext("2d"),{rotate:s,opacity:o,textFill:l,textFontSize:u,textFontFamily:h,textFontVariant:p,textFontWeight:S,textAlign:N,textBaseline:U}=n;return a.textAlign=N,a.textBaseline=U,a.translate(r/2,e/2),a.font=`${u}px ${h} ${p} ${S}`,s&&a.rotate(s),o&&(a.globalAlpha=o),l&&(a.fillStyle=l,a.fillText(`${t}`,0,0)),i.toDataURL()})}function sF(r,e,t,n){return Fb(this,void 0,void 0,function*(){const i=zb(r,e),a=i.getContext("2d"),{rotate:s,opacity:o}=n;s&&a.rotate(s),o&&(a.globalAlpha=o);const l=new Image;return l.crossOrigin="anonymous",l.src=t,new Promise(u=>{l.onload=function(){const h=r>l.width?(r-l.width)/2:0,p=e>l.height?(e-l.height)/2:0;a.drawImage(l,0,0,l.width,l.height,h,p,r-h*2,e-p*2),u(i.toDataURL())}})})}var oF=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})},lF=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);isuper.update}});return oF(this,void 0,void 0,function*(){t.update.call(this,e);const n=this.options,{width:i,height:a,text:s,imageURL:o}=n,l=lF(n,["width","height","text","imageURL"]);Object.keys(l).forEach(h=>{h.startsWith("background")&&(this.$element.style[h]=e[h])});const u=o?yield sF(i,a,o,l):yield aF(i,a,s,l);this.$element.style.backgroundImage=`url(${u})`})}destroy(){super.destroy(),this.$element.remove()}}Rd.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};const uF=["#7E92B5","#F4664A","#FFBE3A"],cF={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},hF={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function Ub(r){const{bgColor:e,textColor:t,nodeColor:n,nodeColorDisabled:i,nodeStroke:a,nodeHaloStrokeOpacityActive:s=.15,nodeHaloStrokeOpacitySelected:o=.25,nodeOpacityDisabled:l=.06,nodeIconOpacityInactive:u=.85,nodeOpacityInactive:h=.25,nodeBadgePalette:p=uF,nodePaletteOptions:S=cF,edgeColor:N,edgeColorDisabled:U,edgePaletteOptions:H=hF,comboColor:V,comboColorDisabled:Y,comboStroke:q,comboStrokeDisabled:ne,edgeColorInactive:le}=r;return{background:e,node:{palette:S,style:{donutOpacity:1,badgeBackgroundOpacity:1,badgeFill:"#fff",badgeFontSize:8,badgePadding:[0,4],badgePalette:p,fill:n,fillOpacity:1,halo:!1,iconFill:"#fff",iconOpacity:1,labelBackground:!1,labelBackgroundFill:e,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelFill:t,labelFillOpacity:.85,labelLineHeight:16,labelPadding:[0,2],labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelOffsetY:2,lineWidth:0,portFill:n,portLineWidth:1,portStroke:a,portStrokeOpacity:.65,size:32,stroke:a,strokeOpacity:1,zIndex:2},state:{selected:{halo:!0,haloLineWidth:24,haloStrokeOpacity:o,labelFontSize:12,labelFontWeight:"bold",lineWidth:4,stroke:a},active:{halo:!0,haloLineWidth:12,haloStrokeOpacity:s},highlight:{labelFontWeight:"bold",lineWidth:4,stroke:a,strokeOpacity:.85},inactive:{badgeBackgroundOpacity:h,donutOpacity:h,fillOpacity:h,iconOpacity:u,labelFill:t,labelFillOpacity:h,strokeOpacity:h},disabled:{badgeBackgroundOpacity:.25,donutOpacity:l,fill:i,fillOpacity:l,iconFill:i,iconOpacity:.25,labelFill:t,labelFillOpacity:.25,strokeOpacity:l}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"node-expand",collapse:"node-collapse",update:[{fields:["x","y","fill","stroke"]}],translate:[{fields:["x","y"]}]}},edge:{palette:H,style:{badgeBackgroundFill:N,badgeFill:"#fff",badgeFontSize:8,badgeOffsetX:10,fillOpacity:1,halo:!1,haloLineWidth:12,haloStrokeOpacity:1,increasedLineWidthForHitTesting:2,labelBackground:!1,labelBackgroundFill:e,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[4,4,4,4],labelFill:t,labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelPlacement:"center",labelTextBaseline:"middle",lineWidth:1,stroke:N,strokeOpacity:1,zIndex:1},state:{selected:{halo:!0,haloStrokeOpacity:.25,labelFontSize:14,labelFontWeight:"bold",lineWidth:3},active:{halo:!0,haloStrokeOpacity:.15},highlight:{labelFontWeight:"bold",lineWidth:3},inactive:{stroke:le,fillOpacity:.08,labelOpacity:.25,strokeOpacity:.08,badgeBackgroundOpacity:.25},disabled:{stroke:U,fillOpacity:.45,strokeOpacity:.45,labelOpacity:.25,badgeBackgroundOpacity:.45}},animation:{enter:"fade",exit:"fade",expand:"path-in",collapse:"path-out",show:"fade",hide:"fade",update:[{fields:["sourceNode","targetNode"]},{fields:["stroke"],shape:"key"}],translate:[{fields:["sourceNode","targetNode"]}]}},combo:{style:{collapsedMarkerFill:e,collapsedMarkerFontSize:12,collapsedMarkerFillOpacity:1,collapsedSize:32,collapsedFillOpacity:1,fill:V,halo:!1,haloLineWidth:12,haloStroke:q,haloStrokeOpacity:.25,labelBackground:!1,labelBackgroundFill:e,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[2,4,2,4],labelFill:t,labelFontSize:12,labelFontWeight:400,labelOpacity:1,lineDash:0,lineWidth:1,fillOpacity:.04,strokeOpacity:1,padding:10,stroke:q},state:{selected:{halo:!0,labelFontSize:14,labelFontWeight:700,lineWidth:4},active:{halo:!0},highlight:{labelFontWeight:700,lineWidth:4},inactive:{fillOpacity:.65,labelOpacity:.25,strokeOpacity:.65},disabled:{fill:Y,fillOpacity:.25,labelOpacity:.25,stroke:ne,strokeOpacity:.25}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"combo-expand",collapse:"combo-collapse",update:[{fields:["x","y"]},{fields:["fill","stroke","lineWidth"],shape:"key"}],translate:[{fields:["x","y"]}]}}}}const fF=Ub({bgColor:"#000000",comboColor:"#fdfdfd",comboColorDisabled:"#d0e4ff",comboStroke:"#99add1",comboStrokeDisabled:"#969696",edgeColor:"#637088",edgeColorDisabled:"#637088",edgeColorInactive:"#D0E4FF",edgePaletteOptions:{type:"group",color:["#637088","#0F55A6","#008383","#9C5D38","#8B53A6","#4E40A6","#8F6608","#3E801D","#A65383","#175E75","#0F8248"]},nodeColor:"#1783ff",nodeColorDisabled:"#D0E4FF",nodeHaloStrokeOpacityActive:.25,nodeHaloStrokeOpacitySelected:.45,nodeIconOpacityInactive:.45,nodeOpacityDisabled:.25,nodeOpacityInactive:.45,nodeStroke:"#d0e4ff",textColor:"#ffffff"}),dF=Ub({bgColor:"#ffffff",comboColor:"#99ADD1",comboColorDisabled:"#f0f0f0",comboStroke:"#99add1",comboStrokeDisabled:"#d9d9d9",edgeColor:"#99add1",edgeColorDisabled:"#d9d9d9",edgeColorInactive:"#1B324F",nodeColor:"#1783ff",nodeColorDisabled:"#1B324F",nodeHaloStrokeOpacityActive:.15,nodeHaloStrokeOpacitySelected:.25,nodeIconOpacityInactive:.85,nodeOpacityDisabled:.06,nodeOpacityInactive:.25,nodeStroke:"#000000",textColor:"#000000"});class Uo extends Eg{beforeDraw(e,t){return e}afterLayout(e,t){}}class vF extends Uo{beforeDraw(e){const{model:t}=this.context,n=e.add.combos,i=a=>{const s=[];return a.forEach((o,l)=>{const h=t.getAncestorsData(l,"combo").map(p=>Et(p)).reverse();s.push([l,o,h.length])}),new Map(s.sort(([,,o],[,,l])=>l-o).map(([o,l])=>[o,l]))};return e.add.combos=i(n),e.update.combos=i(e.update.combos),e}}function Fa(r,e,t,n,i){const a=Et(n),s=`${t}s`,o=i?n:r.add[s].get(a)||r.update[s].get(a)||r.remove[s].get(a)||n;Object.entries(r).forEach(([l,u])=>{e===l?u[s].set(a,o):u[s].delete(a)})}function Id(r,e){return Object.keys(r).every(t=>r[t]===e[t])}class gF extends Uo{beforeDraw(e,t){if(t.stage==="visibility"||!this.context.model.model.hasTreeStructure(Cr))return e;const{model:n}=this.context,{add:i,update:a}=e,s=[...e.update.combos.entries(),...e.add.combos.entries()];for(;s.length;){const[o,l]=s.pop();if(xa(l)){const u=n.getDescendantsData(o),h=u.map(Et),{internal:p,external:S}=jg(h,N=>n.getRelatedEdgesData(N));u.forEach(N=>{const U=Et(N),H=s.findIndex(([Y])=>Y===U);H!==-1&&s.splice(H,1);const V=n.getElementType(U);Fa(e,"remove",V,N)}),p.forEach(N=>Fa(e,"remove","edge",N)),S.forEach(N=>{var U;const H=Et(N);((U=this.context.element)===null||U===void 0?void 0:U.getElement(H))?a.edges.set(H,N):i.edges.set(H,N)})}else{const u=n.getChildrenData(o),h=u.map(Et),{edges:p}=jg(h,S=>n.getRelatedEdgesData(S));[...u,...p].forEach(S=>{var N;const U=Et(S),H=n.getElementType(U);((N=this.context.element)===null||N===void 0?void 0:N.getElement(U))?Fa(e,"update",H,S):Fa(e,"add",H,S),H==="combo"&&s.push([U,S])})}}return e}}const Wb=(r,e,t,n)=>{const i=`${t}s`,a=Et(n);!r.add[i].has(a)&&!r.update[i].has(a)&&r[e][i].set(Et(n),n)};class pF extends Uo{getElement(e){return this.context.element.getElement(e)}handleExpand(e,t){if(Wb(t,"add","node",e),xa(e))return;const n=Et(e);Wb(t,"add","node",e),this.context.model.getRelatedEdgesData(n,"out").forEach(s=>{Fa(t,"add","edge",s)}),this.context.model.getChildrenData(n).forEach(s=>{this.handleExpand(s,t)})}beforeDraw(e){const{graph:t,model:n}=this.context;if(!n.model.hasTreeStructure(Da))return e;const{add:{nodes:i,edges:a},update:{nodes:s}}=e,o=new Map,l=new Map;i.forEach((h,p)=>{xa(h)&&o.set(p,h)}),a.forEach(h=>{if(t.getElementType(h.source)!=="node")return;const p=t.getNodeData(h.source);xa(p)&&o.set(h.source,p)}),s.forEach((h,p)=>{const S=this.getElement(p);if(!S)return;const N=S.attributes.collapsed;xa(h)?N||o.set(p,h):N&&l.set(p,h)});const u=new Set;return o.forEach((h,p)=>{n.getDescendantsData(p).forEach(N=>{const U=Et(N);if(u.has(U))return;Fa(e,"remove","node",N),n.getRelatedEdgesData(U).forEach(V=>{Fa(e,"remove","edge",V)}),u.add(U)})}),l.forEach((h,p)=>{if(n.getAncestorsData(p,Da).some(xa)){Fa(e,"remove","node",h);return}this.handleExpand(h,e)}),e}}const dp=new WeakMap;function Q9(r,e,t){dp.has(r)||dp.set(r,{});const n=dp.get(r);if(!n[e])return n[e]=t,!0;const i=n[e];return Hb(i,t)?!1:(n[e]=t,!0)}const Hb=(r,e,t=2)=>{if(typeof r!="object"||typeof e!="object")return r===e;const n=Object.keys(r),i=Object.keys(e);if(n.length!==i.length)return!1;for(const a of n){const s=r[a],o=e[a];if(t>1&&typeof s=="object"&&typeof o=="object"){if(!Hb(s,o,t-1))return!1}else if(s!==o)return!1}return!0};function mF(r,e,t){rg[r][e]&&Ea.warn(`The extension ${e} of ${r} has been registered before, and will be overridden.`),Object.assign(rg[r],{[e]:t})}var Gb=function(){function r(e){(0,_.Z)(this,r),this.dragndropPluginOptions=e}return(0,F.Z)(r,[{key:"apply",value:function(t){var n=this,i=t.renderingService,a=t.renderingContext,s=a.root.ownerDocument,o=s.defaultView,l=function(h){var p=h.target,S=p===s,N=S&&n.dragndropPluginOptions.isDocumentDraggable?s:p.closest&&p.closest("[draggable=true]");if(N){var U=!1,H=h.timeStamp,V=[h.clientX,h.clientY],Y=null,q=[h.clientX,h.clientY],ne=function(){var ue=(0,po.Z)((0,Yi.Z)().mark(function fe(de){var ve,Te,Oe,Ie,ze,Xe;return(0,Yi.Z)().wrap(function(st){for(;;)switch(st.prev=st.next){case 0:if(U){st.next=8;break}if(ve=de.timeStamp-H,Te=da([de.clientX,de.clientY],V),!(ve<=n.dragndropPluginOptions.dragstartTimeThreshold||Te<=n.dragndropPluginOptions.dragstartDistanceThreshold)){st.next=5;break}return st.abrupt("return");case 5:de.type="dragstart",N.dispatchEvent(de),U=!0;case 8:if(de.type="drag",de.dx=de.clientX-q[0],de.dy=de.clientY-q[1],N.dispatchEvent(de),q=[de.clientX,de.clientY],S){st.next=21;break}return Oe=n.dragndropPluginOptions.overlap==="pointer"?[de.canvasX,de.canvasY]:p.getBounds().center,st.next=17,s.elementsFromPoint(Oe[0],Oe[1]);case 17:Ie=st.sent,ze=Ie[Ie.indexOf(p)+1],Xe=(ze==null?void 0:ze.closest("[droppable=true]"))||(n.dragndropPluginOptions.isDocumentDroppable?s:null),Y!==Xe&&(Y&&(de.type="dragleave",de.target=Y,Y.dispatchEvent(de)),Xe&&(de.type="dragenter",de.target=Xe,Xe.dispatchEvent(de)),Y=Xe,Y&&(de.type="dragover",de.target=Y,Y.dispatchEvent(de)));case 21:case"end":return st.stop()}},fe)}));return function(de){return ue.apply(this,arguments)}}();o.addEventListener("pointermove",ne);var le=function(fe){if(U){fe.detail={preventClick:!0};var de=fe.clone();Y&&(de.type="drop",de.target=Y,Y.dispatchEvent(de)),de.type="dragend",N.dispatchEvent(de),U=!1}o.removeEventListener("pointermove",ne)};p.addEventListener("pointerup",le,{once:!0}),p.addEventListener("pointerupoutside",le,{once:!0})}};i.hooks.init.tap(r.tag,function(){o.addEventListener("pointerdown",l)}),i.hooks.destroy.tap(r.tag,function(){o.removeEventListener("pointerdown",l)})}}])}();Gb.tag="Dragndrop";var yF=function(r){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,e),t=(0,x.Z)(this,e),t.name="dragndrop",t.options=n,t}return(0,y.Z)(e,r),(0,F.Z)(e,[{key:"init",value:function(){this.addRenderingPlugin(new Gb((0,G.Z)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(n){Object.assign(this.plugins[0].dragndropPluginOptions,n)}}])}(mo),jb=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})},Vb=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const S=new Zv(Object.assign(Object.assign({},o),{supportsMutipleCanvasesInOneContainer:s,renderer:u[p],background:s?p==="background"?i:void 0:i}));return[p,S]}));Qb(h),this.extends={config:this.config,renderer:n,renderers:u,layers:h}}get ready(){return Promise.all(Object.entries(this.getLayers()).map(([,e])=>e.ready))}resize(e,t){Object.assign(this.extends.config,{width:e,height:t}),Object.values(this.getLayers()).forEach(n=>{const i=n.getCamera(),a=i.getPosition(),s=i.getFocalPoint();n.resize(e,t),i.setPosition(a),i.setFocalPoint(s)})}getBounds(e){return Xu(Object.values(this.getLayers()).map(t=>e?t.getRoot().childNodes.find(i=>i.classList.includes(e)):t.getRoot()).filter(t=>(t==null?void 0:t.childNodes.length)>0).map(t=>t.getBounds()))}getContainer(){const e=this.extends.config.container;return typeof e=="string"?document.getElementById(e):e}getSize(){return[this.extends.config.width||0,this.extends.config.height||0]}appendChild(e,t){var n;const i=((n=e.style)===null||n===void 0?void 0:n.$layer)||"main";return this.getLayer(i).appendChild(e,t)}setRenderer(e){if(e===this.extends.renderer)return;const t=Yb(e,this.config.enableMultiLayer?Kb:Zb);this.extends.renderers=t,Object.entries(t).forEach(([n,i])=>this.getLayer(n).setRenderer(i)),Qb(this.getLayers())}getCanvasByViewport(e){return Fi(this.getLayer().viewport2Canvas(gs(e)))}getViewportByCanvas(e){return Fi(this.getLayer().canvas2Viewport(gs(e)))}getViewportByClient(e){return Fi(this.getLayer().client2Viewport(gs(e)))}getClientByViewport(e){return Fi(this.getLayer().viewport2Client(gs(e)))}getClientByCanvas(e){return this.getClientByViewport(this.getViewportByCanvas(e))}getCanvasByClient(e){const t=this.getLayer(),n=t.client2Viewport(gs(e));return Fi(t.viewport2Canvas(n))}toDataURL(){return jb(this,arguments,void 0,function*(e={}){const t=globalThis.devicePixelRatio||1,{mode:n="viewport"}=e,i=Vb(e,["mode"]);let[a,s,o,l]=[0,0,0,0];if(n==="viewport")[o,l]=this.getSize();else if(n==="overall"){const Y=this.getBounds(),q=bo(Y);[a,s]=Y.min,[o,l]=q}const u=hp('
    '),h=new Zv({width:o,height:l,renderer:new ac,devicePixelRatio:t,container:u,background:this.extends.config.background});yield h.ready,h.appendChild(this.getLayer("background").getRoot().cloneNode(!0)),h.appendChild(this.getRoot().cloneNode(!0));const p=this.getLayer("label").getRoot().cloneNode(!0),S=h.viewport2Canvas({x:0,y:0}),N=this.getCanvasByViewport([0,0]);p.translate([N[0]-S.x,N[1]-S.y]),p.scale(1/this.getCamera().getZoom()),h.appendChild(p),h.appendChild(this.getLayer("transient").getRoot().cloneNode(!0));const U=this.getCamera(),H=h.getCamera();if(n==="viewport")H.setZoom(U.getZoom()),H.setPosition(U.getPosition()),H.setFocalPoint(U.getFocalPoint());else if(n==="overall"){const[Y,q,ne]=H.getPosition(),[le,ue,fe]=H.getFocalPoint();H.setPosition([Y+a,q+s,ne]),H.setFocalPoint([le+a,ue+s,fe])}const V=h.getContextService();return new Promise(Y=>{h.addEventListener(Oa.RERENDER,()=>jb(this,void 0,void 0,function*(){yield new Promise(ne=>setTimeout(ne,300));const q=yield V.toDataURL(i);Y(q)}))})})}destroy(){Object.values(this.getLayers()).forEach(e=>{e.getCamera().cancelLandmarkAnimation(),e.destroy()})}}function Yb(r,e){return Object.fromEntries(e.map(t=>{const n=(r==null?void 0:r(t))||new ac;return n instanceof ac&&n.setConfig({enableDirtyRectangleRendering:!1}),t==="main"?n.registerPlugin(new yF({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):n.unregisterPlugin(n.getPlugin("dom-interaction")),[t,n]}))}function Qb(r){Object.entries(r).forEach(([e,t])=>{const n=t.getContextService().getDomElement();n!=null&&n.style&&(n.style.gridArea="1 / 1 / 2 / 2",n.style.outline="none",n.tabIndex=1,e!=="main"&&(n.style.pointerEvents="none")),n!=null&&n.parentElement&&(n.parentElement.style.display="grid")})}const hu=r=>r?parseInt(r):0;function EF(r){const e=getComputedStyle(r),t=r.clientWidth||hu(e.width),n=r.clientHeight||hu(e.height),i=hu(e.paddingLeft)+hu(e.paddingRight),a=hu(e.paddingTop)+hu(e.paddingBottom);return[t-i,n-a]}function Jb(r){if(!r)return[0,0];let e=640,t=480;const[n,i]=EF(r);e=n||e,t=i||t;const a=1,s=1;return[Math.max(un(e)?e:a,a),Math.max(un(t)?t:s,s)]}class Nd{constructor(e){this.type=e}}class bi extends Nd{constructor(e,t){super(e),this.data=t}}class ts extends Nd{constructor(e,t,n,i){super(e),this.animationType=t,this.animation=n,this.data=i}}class fu extends Nd{constructor(e,t,n){super(e),this.elementType=t,this.data=n}}class Bd extends Nd{constructor(e,t){super(e),this.data=t}}function Si(r,e){r.emit(e.type,e)}function xF(r){if(!r)return null;if(r instanceof Ey)return{type:"canvas",element:r};let e=r;for(;e;){if(oc(e))return{type:"node",element:e};if(z1(e))return{type:"edge",element:e};if(Vg(e))return{type:"combo",element:e};e=e.parentElement}return null}function qb(r){var e;return((e=r==null?void 0:r.style)===null||e===void 0?void 0:e.zIndex)||0}const du="cachedStyle",kd=r=>`__${r}__`;function bF(r,e){const t=Array.isArray(e)?e:[e];ba(r,du)||tc(r,du,{}),t.forEach(n=>{tc(ba(r,du),kd(n),r.attributes[n])})}function $b(r,e){return ba(r,[du,kd(e)])}function wF(r,e){return kd(e)in(ba(r,du)||{})}function J9(r,e,t){set(r,[du,kd(e)],t)}class MF{constructor(e){this.tasks=[],this.animations=new Set,this.context=e}getTasks(){const e=[...this.tasks];return this.tasks=[],e}add(e,t){this.tasks.push([e,t])}animate(e,t,n){var i,a,s;(i=t==null?void 0:t.before)===null||i===void 0||i.call(t);const o=this.getTasks().map(([u,h])=>{var p,S,N;const{element:U,elementType:H,stage:V}=u,Y=aS(this.context.options,H,V,e);(p=h==null?void 0:h.before)===null||p===void 0||p.call(h);const q=Y.length?oS(U,this.inferStyle(u,n),Y):null;return q?((S=h==null?void 0:h.beforeAnimate)===null||S===void 0||S.call(h,q),q.finished.then(()=>{var ne,le;(ne=h==null?void 0:h.afterAnimate)===null||ne===void 0||ne.call(h,q),(le=h==null?void 0:h.after)===null||le===void 0||le.call(h),this.animations.delete(q)})):(N=h==null?void 0:h.after)===null||N===void 0||N.call(h),q}).filter(Boolean);o.forEach(u=>this.animations.add(u));const l=ig(o);return l?((a=t==null?void 0:t.beforeAnimate)===null||a===void 0||a.call(t,l),l.finished.then(()=>{var u,h;(u=t==null?void 0:t.afterAnimate)===null||u===void 0||u.call(t,l),(h=t==null?void 0:t.after)===null||h===void 0||h.call(t),this.release()})):(s=t==null?void 0:t.after)===null||s===void 0||s.call(t),l}inferStyle(e,t){var n,i;const{element:a,elementType:s,stage:o,originalStyle:l,updatedStyle:u={}}=e;e.modifiedStyle||(e.modifiedStyle=Object.assign(Object.assign({},l),u));const{modifiedStyle:h}=e,p={},S={};if(o==="enter")Object.assign(p,{opacity:0});else if(o==="exit")Object.assign(S,{opacity:0});else if(o==="show")Object.assign(p,{opacity:0}),Object.assign(S,{opacity:(n=$b(a,"opacity"))!==null&&n!==void 0?n:Ku("opacity")});else if(o==="hide")Object.assign(p,{opacity:(i=$b(a,"opacity"))!==null&&i!==void 0?i:Ku("opacity")}),Object.assign(S,{opacity:0});else if(o==="collapse"){const{collapse:N}=t||{},{target:U,descendants:H,position:V}=N;if(s==="node"){if(H.includes(a.id)){const[Y,q,ne]=V;Object.assign(S,{x:Y,y:q,z:ne})}}else if(s==="combo"){if(a.id===U||H.includes(a.id)){const[Y,q]=V;Object.assign(S,{x:Y,y:q,childrenNode:l.childrenNode})}}else s==="edge"&&Object.assign(S,{sourceNode:h.sourceNode,targetNode:h.targetNode})}else if(o==="expand"){const{expand:N}=t||{},{target:U,descendants:H,position:V}=N;if(s==="node"){if(a.id===U||H.includes(a.id)){const[Y,q,ne]=V;Object.assign(p,{x:Y,y:q,z:ne})}}else if(s==="combo"){if(a.id===U||H.includes(a.id)){const[Y,q,ne]=V;Object.assign(p,{x:Y,y:q,z:ne,childrenNode:h.childrenNode})}}else s==="edge"&&Object.assign(p,{sourceNode:h.sourceNode,targetNode:h.targetNode})}return[Object.keys(p).length>0?Object.assign({},l,p):l,Object.keys(S).length>0?Object.assign({},h,S):h]}stop(){this.animations.forEach(e=>e.cancel())}clear(){this.tasks=[]}release(){var e,t;const{canvas:n}=this.context,i=(t=(e=n.document)===null||e===void 0?void 0:e.timeline)===null||t===void 0?void 0:t.animationsWithPromises;i&&(n.document.timeline.animationsWithPromises=i.filter(a=>a.playState!=="finished"))}destroy(){this.stop(),this.animations.clear(),this.tasks=[]}}class AF{constructor(e){this.batchCount=0,this.context=e}emit(e){const{graph:t}=this.context;t.emit(e.type,e)}startBatch(e=!0){this.batchCount++,this.batchCount===1&&this.emit(new bi(Qt.BATCH_START,{initiate:e}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new bi(Qt.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class TF extends _g{constructor(e){super(e),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=t=>{const{target:n}=t,i=xF(n);if(!i)return;const{graph:a,canvas:s}=this.context,{type:o,element:l}=i;if("destroyed"in l&&(wf(l)||l.destroyed))return;const{type:u,detail:h,button:p}=t,S=Object.assign(Object.assign({},t),{target:l,targetType:o,originalTarget:n});u===Lt.POINTER_MOVE&&(this.currentTarget!==l&&(this.currentTarget&&a.emit(`${this.currentTargetType}:${Lt.POINTER_LEAVE}`,Object.assign(Object.assign({},S),{type:Lt.POINTER_LEAVE,target:this.currentTarget,targetType:this.currentTargetType})),l&&(Object.assign(S,{type:Lt.POINTER_ENTER}),a.emit(`${o}:${Lt.POINTER_ENTER}`,S))),this.currentTarget=l,this.currentTargetType=o),u===Lt.CLICK&&p===2||(a.emit(`${o}:${u}`,S),a.emit(u,S)),u===Lt.CLICK&&h===2&&(Object.assign(S,{type:Lt.DBLCLICK}),a.emit(`${o}:${Lt.DBLCLICK}`,S),a.emit(Lt.DBLCLICK,S)),u===Lt.POINTER_DOWN&&p===2&&(Object.assign(S,{type:Lt.CONTEXT_MENU,preventDefault:()=>{var N;(N=s.getContainer())===null||N===void 0||N.addEventListener(Lt.CONTEXT_MENU,U=>U.preventDefault(),{once:!0})}}),a.emit(`${o}:${Lt.CONTEXT_MENU}`,S),a.emit(Lt.CONTEXT_MENU,S))},this.forwardContainerEvents=t=>{this.context.graph.emit(t.type,t)},this.forwardEvents(),this.setBehaviors(this.context.options.behaviors||[])}setBehaviors(e){this.setExtensions(e)}forwardEvents(){const e=this.context.canvas.getContainer();e&&[Kl.KEY_DOWN,Kl.KEY_UP].forEach(n=>{e.addEventListener(n,this.forwardContainerEvents)});const t=this.context.canvas.document;t&&[Lt.CLICK,Lt.DBLCLICK,Lt.POINTER_OVER,Lt.POINTER_LEAVE,Lt.POINTER_ENTER,Lt.POINTER_MOVE,Lt.POINTER_OUT,Lt.POINTER_DOWN,Lt.POINTER_UP,Lt.CONTEXT_MENU,Lt.DRAG_START,Lt.DRAG,Lt.DRAG_END,Lt.DRAG_ENTER,Lt.DRAG_OVER,Lt.DRAG_LEAVE,Lt.DROP,Lt.WHEEL].forEach(n=>{t.addEventListener(n,this.forwardCanvasEvents)})}destroy(){const e=this.context.canvas.getContainer();e&&[Kl.KEY_DOWN,Kl.KEY_UP].forEach(t=>{e.removeEventListener(t,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}function PF(r,e){e===void 0&&(e=new Map);var t=[];if(Array.isArray(r))for(var n=0,i=r.length;nU.length!==H.length?!1:U.every((V,Y)=>V===H[Y]),N=(U,H)=>{const V=Object.keys(U),Y=Object.keys(H);return V.length!==Y.length?!1:V.every(q=>U[q]===H[q])};return!(!N(s,p)||!S(a,h)||!S(t,o)||!N(n,l)||!N(i,u))}var SF=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i0}silence(e){this.isTraceless=!0,e(),this.isTraceless=!1}isCombo(e){return this.comboIds.has(e)||this.latestRemovedComboIds.has(e)}getData(){return{nodes:this.getNodeData(),edges:this.getEdgeData(),combos:this.getComboData()}}getNodeData(e){return this.model.getAllNodes().reduce((t,n)=>{const i=Ri(n);return this.isCombo(Et(i))||(e===void 0||e.includes(Et(i)))&&t.push(i),t},[])}getEdgeDatum(e){return Ri(this.model.getEdge(e))}getEdgeData(e){return this.model.getAllEdges().reduce((t,n)=>{const i=Ri(n);return(e===void 0||e.includes(Et(i)))&&t.push(i),t},[])}getComboData(e){return this.model.getAllNodes().reduce((t,n)=>{const i=Ri(n);return this.isCombo(Et(i))&&(e===void 0||e.includes(Et(i)))&&t.push(i),t},[])}getRootsData(e=Da){return this.model.getRoots(e).map(Ri)}getAncestorsData(e,t){const{model:n}=this;return!n.hasNode(e)||!n.hasTreeStructure(t)?[]:n.getAncestors(e,t).map(Ri)}getDescendantsData(e){const t=this.getElementDataById(e),n=[];return vl(t,i=>{i!==t&&n.push(i)},i=>this.getChildrenData(Et(i)),"TB"),n}getParentData(e,t){const{model:n}=this;if(!t){Ea.warn("The hierarchy structure key is not specified");return}if(!n.hasNode(e)||!n.hasTreeStructure(t))return;const i=n.getParent(e,t);return i?Ri(i):void 0}getChildrenData(e){const t=this.getElementType(e)==="node"?Da:Cr,{model:n}=this;return!n.hasNode(e)||!n.hasTreeStructure(t)?[]:n.getChildren(e,t).map(Ri)}getElementsDataByType(e){return e==="node"?this.getNodeData():e==="edge"?this.getEdgeData():e==="combo"?this.getComboData():[]}getElementDataById(e){return this.getElementType(e)==="edge"?this.getEdgeDatum(e):this.getNodeLikeDatum(e)}getNodeLikeDatum(e){const t=this.model.getNode(e);return Ri(t)}getNodeLikeData(e){return this.model.getAllNodes().reduce((t,n)=>{const i=Ri(n);return e?e.includes(Et(i))&&t.push(i):t.push(i),t},[])}getElementDataByState(e,t){return this.getElementsDataByType(e).filter(i=>{var a;return(a=i.states)===null||a===void 0?void 0:a.includes(t)})}getElementState(e){var t;return((t=this.getElementDataById(e))===null||t===void 0?void 0:t.states)||[]}hasNode(e){return this.model.hasNode(e)&&!this.isCombo(e)}hasEdge(e){return this.model.hasEdge(e)}hasCombo(e){return this.model.hasNode(e)&&this.isCombo(e)}getRelatedEdgesData(e,t="both"){return this.model.getRelatedEdges(e,t).map(Ri)}getNeighborNodesData(e){return this.model.getNeighbors(e).map(Ri)}setData(e){const{nodes:t=[],edges:n=[],combos:i=[]}=e,{nodes:a,edges:s,combos:o}=this.getData(),l=Ao(a,t,p=>Et(p),vu),u=Ao(s,n,p=>Et(p),vu),h=Ao(o,i,p=>Et(p),vu);this.batch(()=>{const p={nodes:l.enter,edges:u.enter,combos:h.enter};this.addData(p),this.computeZIndex(p,"add",!0);const S={nodes:l.update,edges:u.update,combos:h.update};this.updateData(S),this.computeZIndex(S,"update",!0);const N={nodes:l.exit.map(Et),edges:u.exit.map(Et),combos:h.exit.map(Et)};this.removeData(N)})}addData(e){const{nodes:t,edges:n,combos:i}=e;this.batch(()=>{this.addComboData(i),this.addNodeData(t),this.addEdgeData(n)}),this.computeZIndex(e,"add")}addNodeData(e=[]){e.length&&(this.model.addNodes(e.map(t=>(this.pushChange({value:t,type:Vr.NodeAdded}),gp(t)))),this.updateNodeLikeHierarchy(e),this.computeZIndex({nodes:e},"add"))}addEdgeData(e=[]){e.length&&(this.model.addEdges(e.map(t=>(this.pushChange({value:t,type:Vr.EdgeAdded}),gp(t)))),this.computeZIndex({edges:e},"add"))}addComboData(e=[]){if(!e.length)return;const{model:t}=this;t.hasTreeStructure(Cr)||t.attachTreeStructure(Cr),t.addNodes(e.map(n=>(this.comboIds.add(Et(n)),this.pushChange({value:n,type:Vr.ComboAdded}),gp(n)))),this.updateNodeLikeHierarchy(e),this.computeZIndex({combos:e},"add")}addChildrenData(e,t){const n=this.getNodeLikeDatum(e),i=t.map(Et);this.addNodeData(t),this.updateNodeData([{id:e,children:[...n.children||[],...i]}]),this.addEdgeData(i.map(a=>({source:e,target:a})))}computeZIndex(e,t,n=!1){!n&&this.isBatching()||this.batch(()=>{const{nodes:i=[],edges:a=[],combos:s=[]}=e;s.forEach(o=>{var l,u,h;const p=Et(o);if(t==="add"&&un((l=o.style)===null||l===void 0?void 0:l.zIndex)||t==="update"&&!("combo"in o))return;const S=this.getParentData(p,Cr),N=S?((h=(u=S.style)===null||u===void 0?void 0:u.zIndex)!==null&&h!==void 0?h:0)+1:0;this.preventUpdateNodeLikeHierarchy(()=>{this.updateComboData([{id:p,style:{zIndex:N}}])})}),i.forEach(o=>{var l,u,h;const p=Et(o);if(t==="add"&&un((l=o.style)===null||l===void 0?void 0:l.zIndex)||t==="update"&&!("combo"in o)&&!("children"in o))return;let S=0;const N=this.getParentData(p,Cr);if(N)S=(((u=N.style)===null||u===void 0?void 0:u.zIndex)||0)+1;else{const U=this.getParentData(p,Da);U&&(S=((h=U==null?void 0:U.style)===null||h===void 0?void 0:h.zIndex)||0)}this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:p,style:{zIndex:S}}])})}),a.forEach(o=>{var l,u,h,p,S;if(un((l=o.style)===null||l===void 0?void 0:l.zIndex))return;let{id:N,source:U,target:H}=o;if(!N)N=Et(o);else{const q=this.getEdgeDatum(N);U=q.source,H=q.target}if(!U||!H)return;const V=((h=(u=this.getNodeLikeDatum(U))===null||u===void 0?void 0:u.style)===null||h===void 0?void 0:h.zIndex)||0,Y=((S=(p=this.getNodeLikeDatum(H))===null||p===void 0?void 0:p.style)===null||S===void 0?void 0:S.zIndex)||0;this.updateEdgeData([{id:Et(o),style:{zIndex:Math.max(V,Y)-1}}])})})}getFrontZIndex(e){var t;const n=this.getElementType(e),i=this.getElementDataById(e),a=this.getData();if(Object.assign(a,{[`${n}s`]:a[`${n}s`].filter(s=>Et(s)!==e)}),n==="combo"&&!xa(i)){const s=new Set(this.getAncestorsData(e,Cr).map(Et));a.nodes=a.nodes.filter(o=>!s.has(Et(o))),a.combos=a.combos.filter(o=>!s.has(Et(o))),a.edges=a.edges.filter(({source:o,target:l})=>!s.has(o)&&!s.has(l))}return Math.max(((t=i.style)===null||t===void 0?void 0:t.zIndex)||0,0,...Object.values(a).flat().map(s=>{var o;return(((o=s==null?void 0:s.style)===null||o===void 0?void 0:o.zIndex)||0)+1}))}updateNodeLikeHierarchy(e){if(!this.enableUpdateNodeLikeHierarchy)return;const{model:t}=this;e.forEach(n=>{const i=Et(n),a=Vh(n);a!==void 0&&(t.hasTreeStructure(Cr)||t.attachTreeStructure(Cr),a===null&&this.refreshComboData(i),this.setParent(i,Vh(n),Cr));const s=n.children||[];if(s.length){t.hasTreeStructure(Da)||t.attachTreeStructure(Da);const o=s.filter(l=>t.hasNode(l));o.forEach(l=>this.setParent(l,i,Da)),o.length!==s.length&&this.updateNodeData([{id:i,children:o}])}})}preventUpdateNodeLikeHierarchy(e){this.enableUpdateNodeLikeHierarchy=!1,e(),this.enableUpdateNodeLikeHierarchy=!0}updateData(e){const{nodes:t,edges:n,combos:i}=e;this.batch(()=>{this.updateNodeData(t),this.updateComboData(i),this.updateEdgeData(n)}),this.computeZIndex(e,"update")}updateNodeData(e=[]){if(!e.length)return;const{model:t}=this;this.batch(()=>{const n=[];e.forEach(i=>{const a=Et(i),s=Ri(t.getNode(a));if(vu(s,i))return;const o=Wo(s,i);this.pushChange({value:o,original:s,type:Vr.NodeUpdated}),t.mergeNodeData(a,o),n.push(o)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({nodes:e},"update")}refreshData(){const{nodes:e,edges:t,combos:n}=this.getData();e.forEach(i=>{this.pushChange({value:i,original:i,type:Vr.NodeUpdated})}),t.forEach(i=>{this.pushChange({value:i,original:i,type:Vr.EdgeUpdated})}),n.forEach(i=>{this.pushChange({value:i,original:i,type:Vr.ComboUpdated})})}syncNodeLikeDatum(e){const{model:t}=this,n=Et(e);if(!t.hasNode(n))return;const i=Ri(t.getNode(n)),a=Wo(i,e);t.mergeNodeData(n,a)}syncEdgeDatum(e){const{model:t}=this,n=Et(e);if(!t.hasEdge(n))return;const i=Ri(t.getEdge(n)),a=Wo(i,e);t.mergeEdgeData(n,a)}updateEdgeData(e=[]){if(!e.length)return;const{model:t}=this;this.batch(()=>{e.forEach(n=>{const i=Et(n),a=Ri(t.getEdge(i));if(vu(a,n))return;n.source&&a.source!==n.source&&t.updateEdgeSource(i,n.source),n.target&&a.target!==n.target&&t.updateEdgeTarget(i,n.target);const s=Wo(a,n);this.pushChange({value:s,original:a,type:Vr.EdgeUpdated}),t.mergeEdgeData(i,s)})}),this.computeZIndex({edges:e},"update")}updateComboData(e=[]){if(!e.length)return;const{model:t}=this;t.batch(()=>{const n=[];e.forEach(i=>{const a=Et(i),s=Ri(t.getNode(a));if(vu(s,i))return;const o=Wo(s,i);this.pushChange({value:o,original:s,type:Vr.ComboUpdated}),t.mergeNodeData(a,o),n.push(o)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({combos:e},"update")}setParent(e,t,n,i=!0){if(e===t)return;const a=this.getNodeLikeDatum(e),s=Vh(a);if(s!==t&&n===Cr){const o={id:e,combo:t};this.isCombo(e)?this.syncNodeLikeDatum(o):this.syncNodeLikeDatum(o)}this.model.setParent(e,t,n),i&&n===Cr&&PF([s,t]).forEach(o=>{o!==void 0&&this.refreshComboData(o)})}refreshComboData(e){const t=this.getComboData([e])[0],n=this.getAncestorsData(e,Cr);t&&this.pushChange({value:t,original:t,type:Vr.ComboUpdated}),n.forEach(i=>{this.pushChange({value:i,original:i,type:Vr.ComboUpdated})})}getElementPosition(e){const t=this.getElementDataById(e);return Ti(t)}translateNodeLikeBy(e,t){this.isCombo(e)?this.translateComboBy(e,t):this.translateNodeBy(e,t)}translateNodeLikeTo(e,t){this.isCombo(e)?this.translateComboTo(e,t):this.translateNodeTo(e,t)}translateNodeBy(e,t){const n=this.getElementPosition(e),i=Un(n,[...t,0].slice(0,3));this.translateNodeTo(e,i)}translateNodeTo(e,t){const[n=0,i=0,a=0]=t;this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:e,style:{x:n,y:i,z:a}}])})}translateComboBy(e,t){const[n=0,i=0,a=0]=t;if([n,i,a].some(isNaN)||[n,i,a].every(l=>l===0))return;const s=this.getComboData([e])[0];if(!s)return;const o=new Set;vl(s,l=>{const u=Et(l);if(o.has(u))return;o.add(u);const[h,p,S]=Ti(l),N=Wo(l,{style:{x:h+n,y:p+i,z:S+a}});this.pushChange({value:N,original:l,type:this.isCombo(u)?Vr.ComboUpdated:Vr.NodeUpdated}),this.model.mergeNodeData(u,N)},l=>this.getChildrenData(Et(l)),"BT")}translateComboTo(e,t){var n;if(t.some(isNaN))return;const[i=0,a=0,s=0]=t,o=(n=this.getComboData([e]))===null||n===void 0?void 0:n[0];if(!o)return;const[l,u,h]=Ti(o),p=i-l,S=a-u,N=s-h;vl(o,U=>{const H=Et(U),[V,Y,q]=Ti(U),ne=Wo(U,{style:{x:V+p,y:Y+S,z:q+N}});this.pushChange({value:ne,original:U,type:this.isCombo(H)?Vr.ComboUpdated:Vr.NodeUpdated}),this.model.mergeNodeData(H,ne)},U=>this.getChildrenData(Et(U)),"BT")}removeData(e){const{nodes:t,edges:n,combos:i}=e;this.batch(()=>{this.removeEdgeData(n),this.removeNodeData(t),this.removeComboData(i),this.latestRemovedComboIds=new Set(i)})}removeNodeData(e=[]){e.length&&this.batch(()=>{e.forEach(t=>{this.removeEdgeData(this.getRelatedEdgesData(t).map(Et)),this.pushChange({value:this.getNodeData([t])[0],type:Vr.NodeRemoved}),this.removeNodeLikeHierarchy(t)}),this.model.removeNodes(e)})}removeEdgeData(e=[]){e.length&&(e.forEach(t=>this.pushChange({value:this.getEdgeData([t])[0],type:Vr.EdgeRemoved})),this.model.removeEdges(e))}removeComboData(e=[]){e.length&&this.batch(()=>{e.forEach(t=>{this.pushChange({value:this.getComboData([t])[0],type:Vr.ComboRemoved}),this.removeNodeLikeHierarchy(t),this.comboIds.delete(t)}),this.model.removeNodes(e)})}removeNodeLikeHierarchy(e){if(this.model.hasTreeStructure(Cr)){const t=Vh(this.getNodeLikeDatum(e));this.setParent(e,void 0,Cr,!1),this.model.getChildren(e,Cr).forEach(n=>{const i=Ri(n),a=Et(i);this.setParent(Et(i),t,Cr,!1);const s=Wo(i,{id:Et(i),combo:t});this.pushChange({value:s,original:i,type:this.isCombo(a)?Vr.ComboUpdated:Vr.NodeUpdated}),this.model.mergeNodeData(Et(i),s)}),Pn(t)||this.refreshComboData(t)}}getElementType(e){if(this.model.hasNode(e))return this.isCombo(e)?"combo":"node";if(this.model.hasEdge(e))return"edge";throw new Error(Js(`Unknown element type of id: ${e}`))}destroy(){const{model:e}=this,t=e.getAllNodes(),n=e.getAllEdges();e.removeEdges(n.map(i=>i.id)),e.removeNodes(t.map(i=>i.id)),this.context={}}}var Sc=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class CF{constructor(e){this.elementMap={},this.shapeTypeMap={},this.paletteStyle={},this.defaultStyle={},this.stateStyle={},this.visibilityCache=new WeakMap,this.context=e}init(){this.initContainer()}initContainer(){if(!this.container||this.container.destroyed){const{canvas:e}=this.context;this.container=e.appendChild(new Ai({className:"elements"}))}}emit(e,t){t.silence||Si(this.context.graph,e)}forEachElementData(e){dl.forEach(t=>{const n=this.context.model.getElementsDataByType(t);e(t,n)})}getElementType(e,t){var n;const{options:i,graph:a}=this.context,s=((n=i[e])===null||n===void 0?void 0:n.type)||t.type;return s?typeof s=="string"?s:s.call(a,t):e==="edge"?"line":"circle"}getTheme(e){return jy(this.context.options)[e]||{}}getThemeStyle(e){return this.getTheme(e).style||{}}getThemeStateStyle(e,t){const{state:n={}}=this.getTheme(e);return Object.assign({},...t.map(i=>n[i]||{}))}computePaletteStyle(){const{options:e}=this.context;this.paletteStyle={},this.forEachElementData((t,n)=>{var i,a;const s=Object.assign({},n1((i=this.getTheme(t))===null||i===void 0?void 0:i.palette),n1((a=e[t])===null||a===void 0?void 0:a.palette));s!=null&&s.field&&Object.assign(this.paletteStyle,PD(n,s))})}getPaletteStyle(e,t){const n=this.paletteStyle[t];return n?e==="edge"?{stroke:n}:{fill:n}:{}}computeElementDefaultStyle(e,t){var n;const{options:i}=this.context,a=((n=i[e])===null||n===void 0?void 0:n.style)||{};"transform"in a&&Array.isArray(a.transform)&&(a.transform=[...a.transform]),this.defaultStyle[Et(t.datum)]=t1(a,t)}computeElementsDefaultStyle(e){const{graph:t}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let s=0;sthis.getElementStateStyle(e,i,n)))}computeElementsStatesStyle(e){const{graph:t}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let s=0;sthis.elementMap[e])}getEdges(){return this.context.model.getEdgeData().map(e=>this.elementMap[Et(e)])}getCombos(){return this.context.model.getComboData().map(({id:e})=>this.elementMap[e])}getElementComputedStyle(e,t){const n=Et(t),i=this.getThemeStyle(e),a=this.getPaletteStyle(e,n),s=t.style||{},o=this.getDefaultStyle(n),l=this.getThemeStateStyle(e,this.getElementState(n)),u=this.getStateStyle(n),h=Object.assign({},i,a,s,o,l,u);if(e==="combo"){const p=this.context.model.getChildrenData(n),N=!!h.collapsed?[]:p.map(Et).filter(U=>this.getElement(U));Object.assign(h,{childrenNode:N,childrenData:p})}return h}getDrawData(e){this.init();const t=this.computeChangesAndDrawData(e);if(!t)return null;const{type:n="draw",stage:i=n}=e;return this.markDestroyElement(t.drawData),this.computeStyle(i),{type:n,stage:i,data:t}}draw(e={animation:!0}){const t=this.getDrawData(e);if(!t)return;const{data:{drawData:{add:n,update:i,remove:a}}}=t;return this.destroyElements(a,e),this.createElements(n,e),this.updateElements(i,e),this.setAnimationTask(e,t)}preLayoutDraw(){return Sc(this,arguments,void 0,function*(e={animation:!0}){var t,n;const i=this.getDrawData(e);if(!i)return;const{data:{drawData:a}}=i;yield(n=(t=this.context.layout)===null||t===void 0?void 0:t.preLayout)===null||n===void 0?void 0:n.call(t,a);const{add:s,update:o,remove:l}=a;return this.destroyElements(l,e),this.createElements(s,e),this.updateElements(o,e),this.setAnimationTask(e,i)})}setAnimationTask(e,t){const{animation:n,silence:i}=e,{data:{dataChanges:a,drawData:s},stage:o,type:l}=t;return this.context.animation.animate(n,i?{}:{before:()=>this.emit(new bi(Qt.BEFORE_DRAW,{dataChanges:a,animation:n,stage:o,render:l==="render"}),e),beforeAnimate:u=>this.emit(new ts(Qt.BEFORE_ANIMATE,_a.DRAW,u,s),e),afterAnimate:u=>this.emit(new ts(Qt.AFTER_ANIMATE,_a.DRAW,u,s),e),after:()=>this.emit(new bi(Qt.AFTER_DRAW,{dataChanges:a,animation:n,stage:o,render:l==="render",firstRender:this.context.graph.rendered===!1}),e)})}computeChangesAndDrawData(e){const{model:t}=this.context,n=t.getChanges(),i=A0(n);if(i.length===0)return null;const{NodeAdded:a=[],NodeUpdated:s=[],NodeRemoved:o=[],EdgeAdded:l=[],EdgeUpdated:u=[],EdgeRemoved:h=[],ComboAdded:p=[],ComboUpdated:S=[],ComboRemoved:N=[]}=Ch(i,Y=>Y.type),U=Y=>new Map(Y.map(q=>{const ne=q.value;return[Et(ne),ne]})),H={add:{nodes:U(a),edges:U(l),combos:U(p)},update:{nodes:U(s),edges:U(u),combos:U(S)},remove:{nodes:U(o),edges:U(h),combos:U(N)}},V=this.transformData(H,e);return t.clearChanges(),{dataChanges:n,drawData:V}}transformData(e,t){const n=this.context.transform.getTransformInstance();return Object.values(n).reduce((i,a)=>a.beforeDraw(i,t),e)}createElement(e,t,n){var i;const a=Et(t);if(this.getElement(a))return;const o=this.getElementType(e,t),l=this.getElementComputedStyle(e,t),u=Qs(e,o);if(!u)return Ea.warn(`The element ${o} of ${e} is not registered.`);this.emit(new fu(Qt.BEFORE_ELEMENT_CREATE,e,t),n);const h=this.container.appendChild(new u({id:a,context:this.context,style:l}));this.shapeTypeMap[a]=o,this.elementMap[a]=h;const{stage:p="enter"}=n;(i=this.context.animation)===null||i===void 0||i.add({element:h,elementType:e,stage:p,originalStyle:Object.assign({},h.attributes),updatedStyle:l},{after:()=>{var S;this.emit(new fu(Qt.AFTER_ELEMENT_CREATE,e,t),n),(S=h.onCreate)===null||S===void 0||S.call(h)}})}createElements(e,t){const{nodes:n,edges:i,combos:a}=e;[["node",n],["combo",a],["edge",i]].forEach(([o,l])=>{l.forEach(u=>this.createElement(o,u,t))})}getUpdateStageStyle(e,t,n){const{stage:i="update"}=n;if(i==="translate")if(e==="node"||e==="combo"){const{style:{x:a=0,y:s=0,z:o=0}={}}=t;return{x:a,y:s,z:o}}else return{};return this.getElementComputedStyle(e,t)}updateElement(e,t,n){var i;const a=Et(t),{stage:s="update"}=n,o=this.getElement(a);if(!o)return()=>null;this.emit(new fu(Qt.BEFORE_ELEMENT_UPDATE,e,t),n);const l=this.getElementType(e,t),u=this.getUpdateStageStyle(e,t,n);this.shapeTypeMap[a]!==l&&(o.destroy(),delete this.shapeTypeMap[a],delete this.elementMap[a],this.createElement(e,t,{animation:!1,silence:!0}));const h=s!=="visibility"?s:u.visibility==="hidden"?"hide":"show";h==="hide"&&delete u.visibility,(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:e,stage:h,originalStyle:Object.assign({},o.attributes),updatedStyle:u},{before:()=>{const p=this.elementMap[a];s!=="collapse"&&Yg(p,u),s==="visibility"&&(wF(p,"opacity")||bF(p,"opacity"),this.visibilityCache.set(p,h==="show"?"visible":"hidden"),h==="show"&&hl(p,"visible"))},after:()=>{var p;const S=this.elementMap[a];s==="collapse"&&Yg(S,u),h==="hide"&&hl(S,this.visibilityCache.get(S)),this.emit(new fu(Qt.AFTER_ELEMENT_UPDATE,e,t),n),(p=S.onUpdate)===null||p===void 0||p.call(S)}})}updateElements(e,t){const{nodes:n,edges:i,combos:a}=e;[["node",n],["combo",a],["edge",i]].forEach(([o,l])=>{l.forEach(u=>this.updateElement(o,u,t))})}markDestroyElement(e){Object.values(e.remove).forEach(t=>{t.forEach(n=>{const i=Et(n),a=this.getElement(i);a&&UL(a)})})}destroyElement(e,t,n){var i;const{stage:a="exit"}=n,s=Et(t),o=this.elementMap[s];if(!o)return()=>null;this.emit(new fu(Qt.BEFORE_ELEMENT_DESTROY,e,t),n),(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:e,stage:a,originalStyle:Object.assign({},o.attributes),updatedStyle:{}},{after:()=>{var l;this.clearElement(s),o.destroy(),(l=o.onDestroy)===null||l===void 0||l.call(o),this.emit(new fu(Qt.AFTER_ELEMENT_DESTROY,e,t),n)}})}destroyElements(e,t){const{nodes:n,edges:i,combos:a}=e;[["combo",a],["edge",i],["node",n]].forEach(([o,l])=>{l.forEach(u=>this.destroyElement(o,u,t))})}clearElement(e){delete this.paletteStyle[e],delete this.defaultStyle[e],delete this.stateStyle[e],delete this.elementMap[e],delete this.shapeTypeMap[e]}alignLayoutResultToElement(e,t){var n,i;const a=(n=e.nodes)===null||n===void 0?void 0:n.find(s=>Et(s)===t);if(a){const s=Ti(this.context.model.getNodeLikeDatum(t)),o=Ti(a),l=Or(s,o);(i=e.nodes)===null||i===void 0||i.forEach(u=>{var h,p,S;!((h=u.style)===null||h===void 0)&&h.x&&(u.style.x+=l[0]),!((p=u.style)===null||p===void 0)&&p.y&&(u.style.y+=l[1]),!((S=u.style)===null||S===void 0)&&S.z&&(u.style.z+=l[2]||0)})}}collapseNode(e,t){return Sc(this,void 0,void 0,function*(){var n;const{animation:i,align:a}=t,{model:s,layout:o}=this.context,l=this.computeChangesAndDrawData({stage:"collapse",animation:i});if(!l)return;this.markDestroyElement(l.drawData);const u=yield o.simulate();a&&this.alignLayoutResultToElement(u,e),s.updateData(u);const h=this.computeChangesAndDrawData({stage:"collapse",animation:i});if(!h)return;const{drawData:p}=h,{add:S,remove:N,update:U}=p;this.markDestroyElement(p);const H={animation:i,stage:"collapse",data:p};this.destroyElements(N,H),this.createElements(S,H),this.updateElements(U,H),yield(n=this.context.animation.animate(i,{beforeAnimate:V=>this.emit(new ts(Qt.BEFORE_ANIMATE,_a.COLLAPSE,V,p),H),afterAnimate:V=>this.emit(new ts(Qt.AFTER_ANIMATE,_a.COLLAPSE,V,p),H)},{collapse:{target:e,descendants:Array.from(N.nodes).map(([,V])=>Et(V)),position:Ti(U.nodes.get(e))}}))===null||n===void 0?void 0:n.finished})}expandNode(e,t){return Sc(this,void 0,void 0,function*(){var n;const{model:i,layout:a}=this.context,{animation:s,align:o}=t,l=Ti(i.getNodeData([e])[0]),u=this.computeChangesAndDrawData({stage:"expand",animation:s});if(!u)return;const{drawData:{add:h}}=u;this.createElements(h,{animation:!1,stage:"expand",target:e}),this.context.animation.clear();const p=yield a.simulate();o&&this.alignLayoutResultToElement(p,e),i.updateData(p),this.computeStyle("expand");const S=this.computeChangesAndDrawData({stage:"collapse",animation:s});if(!S)return;const{drawData:N}=S,{update:U}=N,H={animation:s,stage:"expand",data:N};h.edges.forEach(V=>U.edges.set(Et(V),V)),h.nodes.forEach(V=>U.nodes.set(Et(V),V)),this.updateElements(U,H),yield(n=this.context.animation.animate(s,{beforeAnimate:V=>this.emit(new ts(Qt.BEFORE_ANIMATE,_a.EXPAND,V,N),H),afterAnimate:V=>this.emit(new ts(Qt.AFTER_ANIMATE,_a.EXPAND,V,N),H)},{expand:{target:e,descendants:Array.from(h.nodes).map(([,V])=>Et(V)),position:l}}))===null||n===void 0?void 0:n.finished})}collapseCombo(e,t){return Sc(this,void 0,void 0,function*(){var n;const{model:i,element:a}=this.context;if(i.getAncestorsData(e,Cr).some(H=>xa(H)))return;const s=a.getElement(e),o=s.getComboPosition(Object.assign(Object.assign({},s.attributes),{collapsed:!0})),l=this.computeChangesAndDrawData({stage:"collapse",animation:t});if(!l)return;const{dataChanges:u,drawData:h}=l;this.markDestroyElement(h);const{update:p,remove:S}=h,N={animation:t,stage:"collapse",data:h};this.destroyElements(S,N),this.updateElements(p,N);const U=H=>Array.from(H).map(([,V])=>Et(V));yield(n=this.context.animation.animate(t,{before:()=>this.emit(new bi(Qt.BEFORE_DRAW,{dataChanges:u,animation:t}),N),beforeAnimate:H=>this.emit(new ts(Qt.BEFORE_ANIMATE,_a.COLLAPSE,H,h),N),afterAnimate:H=>this.emit(new ts(Qt.AFTER_ANIMATE,_a.COLLAPSE,H,h),N),after:()=>this.emit(new bi(Qt.AFTER_DRAW,{dataChanges:u,animation:t}),N)},{collapse:{target:e,descendants:[...U(S.nodes),...U(S.combos)],position:o}}))===null||n===void 0?void 0:n.finished})}expandCombo(e,t){return Sc(this,void 0,void 0,function*(){var n;const{model:i}=this.context,a=Ti(i.getComboData([e])[0]);this.computeStyle("expand");const s=this.computeChangesAndDrawData({stage:"expand",animation:t});if(!s)return;const{dataChanges:o,drawData:l}=s,{add:u,update:h}=l,p={animation:t,stage:"expand",data:l,target:e};this.createElements(u,p),this.updateElements(h,p);const S=N=>Array.from(N).map(([,U])=>Et(U));yield(n=this.context.animation.animate(t,{before:()=>this.emit(new bi(Qt.BEFORE_DRAW,{dataChanges:o,animation:t}),p),beforeAnimate:N=>this.emit(new ts(Qt.BEFORE_ANIMATE,_a.EXPAND,N,l),p),afterAnimate:N=>this.emit(new ts(Qt.AFTER_ANIMATE,_a.EXPAND,N,l),p),after:()=>this.emit(new bi(Qt.AFTER_DRAW,{dataChanges:o,animation:t}),p)},{expand:{target:e,descendants:[...S(u.nodes),...S(u.combos)],position:a}}))===null||n===void 0?void 0:n.finished})}clear(){this.container.destroy(),this.initContainer(),this.elementMap={},this.shapeTypeMap={},this.defaultStyle={},this.stateStyle={},this.paletteStyle={}}destroy(){this.clear(),this.container.destroy(),this.context={}}}const e2=Symbol("Comlink.proxy"),LF=Symbol("Comlink.endpoint"),t2=Symbol("Comlink.releaseProxy"),pp=Symbol("Comlink.finalizer"),Fd=Symbol("Comlink.thrown"),n2=r=>typeof r=="object"&&r!==null||typeof r=="function",RF={canHandle:r=>n2(r)&&r[e2],serialize(r){const{port1:e,port2:t}=new MessageChannel;return i2(r,e),[t,[t]]},deserialize(r){return r.start(),s2(r)}},IF={canHandle:r=>n2(r)&&Fd in r,serialize({value:r}){let e;return r instanceof Error?e={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:e={isError:!1,value:r},[e,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},r2=new Map([["proxy",RF],["throw",IF]]);function NF(r,e){for(const t of r)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function i2(r,e=globalThis,t=["*"]){e.addEventListener("message",function n(i){if(!i||!i.data)return;if(!NF(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:s,path:o}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(Sl);let u;try{const h=o.slice(0,-1).reduce((S,N)=>S[N],r),p=o.reduce((S,N)=>S[N],r);switch(s){case"GET":u=p;break;case"SET":h[o.slice(-1)[0]]=Sl(i.data.value),u=!0;break;case"APPLY":u=p.apply(h,l);break;case"CONSTRUCT":{const S=new p(...l);u=WF(S)}break;case"ENDPOINT":{const{port1:S,port2:N}=new MessageChannel;i2(r,N),u=UF(S,[S])}break;case"RELEASE":u=void 0;break;default:return}}catch(h){u={value:h,[Fd]:0}}Promise.resolve(u).catch(h=>({value:h,[Fd]:0})).then(h=>{const[p,S]=Hd(h);e.postMessage(Object.assign(Object.assign({},p),{id:a}),S),s==="RELEASE"&&(e.removeEventListener("message",n),a2(e),pp in r&&typeof r[pp]=="function"&&r[pp]())}).catch(h=>{const[p,S]=Hd({value:new TypeError("Unserializable return value"),[Fd]:0});e.postMessage(Object.assign(Object.assign({},p),{id:a}),S)})}),e.start&&e.start()}function BF(r){return r.constructor.name==="MessagePort"}function a2(r){BF(r)&&r.close()}function s2(r,e){const t=new Map;return r.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const s=t.get(a.id);if(s)try{s(a)}finally{t.delete(a.id)}}),mp(r,t,[],e)}function zd(r){if(r)throw new Error("Proxy has been released and is not useable")}function o2(r){return gu(r,new Map,{type:"RELEASE"}).then(()=>{a2(r)})}const Ud=new WeakMap,Wd="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const e=(Ud.get(r)||0)-1;Ud.set(r,e),e===0&&o2(r)});function kF(r,e){const t=(Ud.get(e)||0)+1;Ud.set(e,t),Wd&&Wd.register(r,e,r)}function FF(r){Wd&&Wd.unregister(r)}function mp(r,e,t=[],n=function(){}){let i=!1;const a=new Proxy(n,{get(s,o){if(zd(i),o===t2)return()=>{FF(a),o2(r),e.clear(),i=!0};if(o==="then"){if(t.length===0)return{then:()=>a};const l=gu(r,e,{type:"GET",path:t.map(u=>u.toString())}).then(Sl);return l.then.bind(l)}return mp(r,e,[...t,o])},set(s,o,l){zd(i);const[u,h]=Hd(l);return gu(r,e,{type:"SET",path:[...t,o].map(p=>p.toString()),value:u},h).then(Sl)},apply(s,o,l){zd(i);const u=t[t.length-1];if(u===LF)return gu(r,e,{type:"ENDPOINT"}).then(Sl);if(u==="bind")return mp(r,e,t.slice(0,-1));const[h,p]=l2(l);return gu(r,e,{type:"APPLY",path:t.map(S=>S.toString()),argumentList:h},p).then(Sl)},construct(s,o){zd(i);const[l,u]=l2(o);return gu(r,e,{type:"CONSTRUCT",path:t.map(h=>h.toString()),argumentList:l},u).then(Sl)}});return kF(a,r),a}function zF(r){return Array.prototype.concat.apply([],r)}function l2(r){const e=r.map(Hd);return[e.map(t=>t[0]),zF(e.map(t=>t[1]))]}const u2=new WeakMap;function UF(r,e){return u2.set(r,e),r}function WF(r){return Object.assign(r,{[e2]:!0})}function $9(r,e=globalThis,t="*"){return{postMessage:(n,i)=>r.postMessage(n,t,i),addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}function Hd(r){for(const[e,t]of r2)if(t.canHandle(r)){const[n,i]=t.serialize(r);return[{type:"HANDLER",name:e,value:n},i]}return[{type:"RAW",value:r},u2.get(r)||[]]}function Sl(r){switch(r.type){case"HANDLER":return r2.get(r.name).deserialize(r.value);case"RAW":return r.value}}function gu(r,e,t,n){return new Promise(i=>{const a=HF();e.set(a,i),r.start&&r.start(),r.postMessage(Object.assign({id:a},t),n)})}function HF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class GF extends Df{constructor(e,t,n){super(),this.graph=e,this.layout=t,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=s2(new Worker(new URL(X.p+X.u(7890),X.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var e;return(0,xe.mG)(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const t=this.layout.options,{onTick:n}=t,i=(0,xe._T)(t,["onTick"]),a={};Object.keys(i).forEach(u=>{yn(i[u])||(a[u]=i[u])});const s={layout:{id:this.layout.id,options:a,iterations:(e=this.options)===null||e===void 0?void 0:e.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},o=new Float32Array([0]),[l]=yield this.proxy.calculateLayout(s,[o]);return l})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[t2]()}isRunning(){return this.running}}var pu=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})},jF=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const p=Et(h),S=l.nodes.get(p);o.syncNodeLikeDatum(h),S&&Object.assign(S.style,h.style)}),(i=u==null?void 0:u.edges)===null||i===void 0||i.forEach(h=>{const p=Et(h),S=l.edges.get(p);o.syncEdgeDatum(h),S&&Object.assign(S.style,h.style)}),(a=u==null?void 0:u.combos)===null||a===void 0||a.forEach(h=>{const p=Et(h),S=l.combos.get(p);o.syncNodeLikeDatum(h),S&&Object.assign(S.style,h.style)}),Si(s,new bi(Qt.AFTER_LAYOUT,{type:"pre"})),this.transformDataAfterLayout("pre",e)})}postLayout(){return pu(this,arguments,void 0,function*(e=this.options){if(!e)return;const t=Array.isArray(e)?e:[e],{graph:n}=this.context;Si(n,new bi(Qt.BEFORE_LAYOUT,{type:"post"}));for(let i=0;ii.afterLayout(e,t))}simulate(){return pu(this,void 0,void 0,function*(){if(!this.options)return{};const e=Array.isArray(this.options)?this.options:[this.options];let t={};for(let n=0;n{this.updateElementPosition(u,!1)}}):(o.execute(e),o.stop(),o.tick(s));const l=yield o.execute(e);if(i){const u=this.updateElementPosition(l,i);yield u==null?void 0:u.finished}return l})}treeLayout(e,t,n){return pu(this,void 0,void 0,function*(){const{type:i,animation:a}=t,s=Qs("layout",i);if(!s)return{};const{nodes:o=[],edges:l=[]}=e,u=new di({nodes:o.map(U=>({id:Et(U),data:U.data||{}})),edges:l.map(U=>({id:Et(U),source:U.source,target:U.target,data:U.data||{}}))});OF(u);const h={nodes:[],edges:[]},p={nodes:[],edges:[]};u.getRoots(Da).forEach(U=>{vl(U,ne=>{ne.children=u.getSuccessors(ne.id)},ne=>u.getSuccessors(ne.id),"TB");const H=s(U,t),{x:V,y:Y,z:q=0}=H;vl(H,ne=>{const{id:le,x:ue,y:fe,z:de=0}=ne;h.nodes.push({id:le,style:{x:V,y:Y,z:q}}),p.nodes.push({id:le,style:{x:ue,y:fe,z:de}})},ne=>ne.children,"TB")});const N=this.inferTreeLayoutOffset(p);if(c2(p,N),a){c2(h,N),this.updateElementPosition(h,!1);const U=this.updateElementPosition(p,a);yield U==null?void 0:U.finished}return p})}inferTreeLayoutOffset(e){var t;let[n,i]=[1/0,-1/0],[a,s]=[1/0,-1/0];(t=e.nodes)===null||t===void 0||t.forEach(H=>{const{x:V=0,y:Y=0}=H.style||{};n=Math.min(n,V),i=Math.max(i,V),a=Math.min(a,Y),s=Math.max(s,Y)});const{canvas:o}=this.context,l=o.getSize(),[u,h]=o.getCanvasByViewport([0,0]),[p,S]=o.getCanvasByViewport(l);if(n>=u&&i<=p&&a>=h&&s<=S)return[0,0];const N=(u+p)/2,U=(h+S)/2;return[N-(n+i)/2,U-(a+s)/2]}stopLayout(){this.instance&&d0(this.instance)&&(this.instance.stop(),this.instance=void 0),this.supervisor&&(this.supervisor.stop(),this.supervisor=void 0),this.animationResult&&(this.animationResult.finish(),this.animationResult=void 0)}getLayoutData(e){const{nodeFilter:t=()=>!0,preLayout:n=!1,isLayoutInvisibleNodes:i=!1}=e,{nodes:a,edges:s,combos:o}=this.context.model.getData(),{element:l,model:u}=this.context,h=H=>l.getElement(H),p=n?H=>{var V;return!i&&(((V=H.style)===null||V===void 0?void 0:V.visibility)==="hidden"||u.getAncestorsData(H.id,Da).some(xa)||u.getAncestorsData(H.id,Cr).some(xa))?!1:t(H)}:H=>{const V=Et(H),Y=h(V);return!Y||wf(Y)?!1:t(H)},S=a.filter(p),N=new Map(S.map(H=>[Et(H),H]));o.forEach(H=>N.set(Et(H),H));const U=s.filter(({source:H,target:V})=>N.has(H)&&N.has(V));return{nodes:S,edges:U,combos:o}}initGraphLayout(e){var t;const{element:n,viewport:i}=this.context,{type:a,enableWorker:s,animation:o,iterations:l}=e,u=jF(e,["type","enableWorker","animation","iterations"]),[h,p]=i.getCanvasSize(),S=[h/2,p/2],N=(t=e==null?void 0:e.nodeSize)!==null&&t!==void 0?t:q=>{const ne=n==null?void 0:n.getElement(q.id);return ne?ne.attributes.size:n==null?void 0:n.getElementComputedStyle("node",q).size},U=Qs("layout",a);if(!U)return Ea.warn(`The layout of ${a} is not registered.`);const H=Object.getPrototypeOf(U.prototype)===Lf.prototype?U:qL(U,this.context),V=new H(this.context),Y={nodeSize:N,width:h,height:p,center:S};switch(V.id){case"d3-force":case"d3-force-3d":Object.assign(Y,{center:{x:h/2,y:p/2,z:0}});break;default:break}return sa(V.options,Y,u),V}updateElementPosition(e,t){const{model:n,element:i}=this.context;return i?(n.updateData(e),i.draw({animation:t,silence:!0})):null}destroy(){var e;this.stopLayout(),this.context={},(e=this.supervisor)===null||e===void 0||e.kill(),this.supervisor=void 0,this.instance=void 0,this.instances=[],this.animationResult=void 0}}const c2=(r,e)=>{var t;const[n,i]=e;(t=r.nodes)===null||t===void 0||t.forEach(a=>{if(a.style){const{x:s=0,y:o=0}=a.style;a.style.x=s+n,a.style.y=o+i}else a.style={x:n,y:i}})};function ZF(r){return[KF].reduce((t,n)=>n(t),r)}function KF(r){return!r.layout||Array.isArray(r.layout)||"preLayout"in r.layout||["antv-dagre","combo-combined","compact-box","circular","concentric","dagre","fishbone","grid","indented","mds","radial","random","snake","dendrogram","mindmap"].includes(r.layout.type)&&(r.layout.preLayout=!0),r}class XF extends _g{constructor(e){super(e),this.category="plugin",this.setPlugins(this.context.options.plugins||[])}setPlugins(e){this.setExtensions(e)}getPluginInstance(e){const t=this.extensionMap[e];if(t)return t;Ea.warn(`Cannot find the plugin ${e}, will try to find it by type.`);const n=this.extensions.find(i=>i.type===e);if(n)return this.extensionMap[n.key]}}const Gd=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class YF extends _g{constructor(e){super(e),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(e){this.setExtensions([...Gd.slice(0,Gd.length-1),...e,Gd[Gd.length-1]])}getTransformInstance(e){return e?this.extensionMap[e]:this.extensionMap}}var Oc=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class QF{get padding(){return cs(this.context.options.padding)}get paddingOffset(){const[e,t,n,i]=this.padding,[a,s,o]=[(i-t)/2,(e-n)/2,0];return[a,s,o]}constructor(e){this.landmarkCounter=0,this.context=e;const[t,n]=this.paddingOffset,{zoom:i,rotation:a,x:s=t,y:o=n}=e.options;this.transform({mode:"absolute",scale:i,translate:[s,o],rotate:a},!1)}get camera(){const{canvas:e}=this.context;return new Proxy(e.getCamera(),{get:(t,n)=>{const a=Object.entries(e.getLayers()).filter(([o])=>!["main"].includes(o)).map(([,o])=>o.getCamera()),s=t[n];if(typeof s=="function")return(...o)=>{const l=s.apply(t,o);return a.forEach(u=>{u[n].apply(u,o)}),l}}})}createLandmark(e){return this.camera.createLandmark(`landmark-${this.landmarkCounter++}`,e)}getAnimation(e){const t=Vy(this.context.options,e);return t?ml(Object.assign({},t),["easing","duration"]):!1}getCanvasSize(){const{canvas:e}=this.context,{width:t=0,height:n=0}=e.getConfig();return[t,n]}getCanvasCenter(){const{canvas:e}=this.context,{width:t=0,height:n=0}=e.getConfig();return[t/2,n/2,0]}getViewportCenter(){const[e,t]=this.camera.getPosition();return[e,t,0]}getGraphCenter(){return this.context.graph.getViewportByCanvas(this.getCanvasCenter())}getZoom(){return this.camera.getZoom()}getRotation(){return this.camera.getRoll()}getTranslateOptions(e){const{camera:t}=this,{mode:n,translate:i=[]}=e,a=this.getZoom(),s=t.getPosition(),o=t.getFocalPoint(),[l,u]=this.getCanvasCenter(),[h=0,p=0,S=0]=i,N=vs([-h,-p,-S],a);return n==="relative"?{position:Un(s,N),focalPoint:Un(o,N)}:{position:Un([l,u,s[2]],N),focalPoint:Un([l,u,o[2]],N)}}getRotateOptions(e){const{mode:t,rotate:n=0}=e;return{roll:t==="relative"?this.camera.getRoll()+n:n}}getZoomOptions(e){const{zoomRange:t}=this.context.options,n=this.camera.getZoom(),{mode:i,scale:a=1}=e;return Jr(i==="relative"?n*a:a,...t)}transform(e,t){return Oc(this,void 0,void 0,function*(){const{graph:n}=this.context,{translate:i,rotate:a,scale:s,origin:o}=e;this.cancelAnimation();const l=this.getAnimation(t);if(Si(n,new Bd(Qt.BEFORE_TRANSFORM,e)),!a&&s&&!i&&o&&!l){this.camera.setZoomByViewportPoint(this.getZoomOptions(e),o),Si(n,new Bd(Qt.AFTER_TRANSFORM,e));return}const u={};if(i&&Object.assign(u,this.getTranslateOptions(e)),un(a)&&Object.assign(u,this.getRotateOptions(e)),un(s)&&Object.assign(u,{zoom:this.getZoomOptions(e)}),l)return Si(n,new ts(Qt.BEFORE_ANIMATE,_a.TRANSFORM,null,e)),new Promise(h=>{this.transformResolver=h,this.camera.gotoLandmark(this.createLandmark(u),Object.assign(Object.assign({},l),{onfinish:()=>{Si(n,new ts(Qt.AFTER_ANIMATE,_a.TRANSFORM,null,e)),Si(n,new Bd(Qt.AFTER_TRANSFORM,e)),this.transformResolver=void 0,h()}}))});this.camera.gotoLandmark(this.createLandmark(u),{duration:0}),Si(n,new Bd(Qt.AFTER_TRANSFORM,e))})}fitView(e,t){return Oc(this,void 0,void 0,function*(){const[n,i,a,s]=this.padding,{when:o="always",direction:l="both"}=e||{},[u,h]=this.context.canvas.getSize(),p=u-s-i,S=h-n-a,N=this.context.canvas.getBounds(),U=this.getBBoxInViewport(N),[H,V]=bo(U),Y=l==="x"&&H>=p||l==="y"&&V>=S||l==="both"&&H>=p&&V>=S;if(o==="overflow"&&!Y)return yield this.fitCenter({animation:t});const q=p/H,ne=S/V,le=l==="x"?q:l==="y"?ne:Math.min(q,ne),ue=this.getAnimation(t);yield this.transform({mode:"relative",scale:le,translate:Un(Or(this.getCanvasCenter(),this.getBBoxInViewport(N).center),vs(this.paddingOffset,le))},ue)})}fitCenter(e){return Oc(this,void 0,void 0,function*(){const t=this.context.canvas.getBounds();yield this.focus(t,e)})}focusElements(e){return Oc(this,arguments,void 0,function*(t,n={}){const{element:i}=this.context;if(!i)return;const a=o=>n.shapes?o.getShape(n.shapes).getRenderBounds():o.getRenderBounds(),s=Xu(t.map(o=>a(i.getElement(o))));yield this.focus(s,n)})}focus(e,t){return Oc(this,void 0,void 0,function*(){const n=this.context.graph.getViewportByCanvas(e.center),i=t.position||this.getCanvasCenter(),a=Or(i,n);yield this.transform({mode:"relative",translate:Un(a,this.paddingOffset)},t.animation)})}getBBoxInViewport(e){const{min:t,max:n}=e,{graph:i}=this.context,[a,s]=i.getViewportByCanvas(t),[o,l]=i.getViewportByCanvas(n),u=new Nr;return u.setMinMax([a,s,0],[o,l,0]),u}isInViewport(e,t=!1,n=0){const{graph:i}=this.context,a=this.getCanvasSize(),[s,o]=i.getCanvasByViewport([0,0]),[l,u]=i.getCanvasByViewport(a);let h=new Nr;return h.setMinMax([s,o,0],[l,u,0]),n&&(h=Mo(h,n)),Yl(e)?hs(e,h):t?yS(e,h):h.intersects(e)}cancelAnimation(){var e,t;!((e=this.camera.landmarks)===null||e===void 0)&&e.length&&this.camera.cancelLandmarkAnimation(),(t=this.transformResolver)===null||t===void 0||t.call(this)}}var Br=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(n.next(h))}catch(p){s(p)}}function l(h){try{u(n.throw(h))}catch(p){s(p)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((n=n.apply(r,e||[])).next())})};class jd extends Df{constructor(e){var t;super(),this.options={},this.rendered=!1,this.destroyed=!1,this.context={model:new DF},this.isCollapsingExpanding=!1,this.onResize=uc(()=>{this.resize()},300),this._setOptions(Object.assign({},jd.defaultOptions,e),!0),this.context.graph=this,this.options.autoResize&&((t=globalThis.addEventListener)===null||t===void 0||t.call(globalThis,"resize",this.onResize))}getOptions(){return this.options}setOptions(e){this._setOptions(e,!1)}_setOptions(e,t){if(this.updateCanvas(e),Object.assign(this.options,ZF(e)),t){const{data:S}=e;S&&this.addData(S);return}const{behaviors:n,combo:i,data:a,edge:s,layout:o,node:l,plugins:u,theme:h,transforms:p}=e;n&&this.setBehaviors(n),a&&this.setData(a),l&&this.setNode(l),s&&this.setEdge(s),i&&this.setCombo(i),o&&this.setLayout(o),h&&this.setTheme(h),u&&this.setPlugins(u),p&&this.setTransforms(p)}getSize(){return this.context.canvas?this.context.canvas.getSize():[this.options.width||0,this.options.height||0]}setSize(e,t){e&&(this.options.width=e),t&&(this.options.height=t),this.resize(e,t)}setZoomRange(e){this.options.zoomRange=e}getZoomRange(){return this.options.zoomRange}setNode(e){this.options.node=e,this.context.model.refreshData()}setEdge(e){this.options.edge=e,this.context.model.refreshData()}setCombo(e){this.options.combo=e,this.context.model.refreshData()}getTheme(){return this.options.theme}setTheme(e){this.options.theme=yn(e)?e(this.getTheme()):e}setLayout(e){this.options.layout=yn(e)?e(this.getLayout()):e}getLayout(){return this.options.layout}setBehaviors(e){var t;this.options.behaviors=yn(e)?e(this.getBehaviors()):e,(t=this.context.behavior)===null||t===void 0||t.setBehaviors(this.options.behaviors)}updateBehavior(e){this.setBehaviors(t=>t.map(n=>typeof n=="object"&&n.key===e.key?Object.assign(Object.assign({},n),e):n))}getBehaviors(){return this.options.behaviors||[]}setPlugins(e){var t;this.options.plugins=yn(e)?e(this.getPlugins()):e,(t=this.context.plugin)===null||t===void 0||t.setPlugins(this.options.plugins)}updatePlugin(e){this.setPlugins(t=>t.map(n=>typeof n=="object"&&n.key===e.key?Object.assign(Object.assign({},n),e):n))}getPlugins(){return this.options.plugins||[]}getPluginInstance(e){return this.context.plugin.getPluginInstance(e)}setTransforms(e){var t;this.options.transforms=yn(e)?e(this.getTransforms()):e,(t=this.context.transform)===null||t===void 0||t.setTransforms(this.options.transforms)}updateTransform(e){this.setTransforms(t=>t.map(n=>typeof n=="object"&&n.key===e.key?Object.assign(Object.assign({},n),e):n)),this.context.model.refreshData()}getTransforms(){return this.options.transforms||[]}getData(){return this.context.model.getData()}getElementData(e){return Array.isArray(e)?e.map(t=>this.context.model.getElementDataById(t)):this.context.model.getElementDataById(e)}getNodeData(e){return e===void 0?this.context.model.getNodeData():Array.isArray(e)?this.context.model.getNodeData(e):this.context.model.getNodeLikeDatum(e)}getEdgeData(e){return e===void 0?this.context.model.getEdgeData():Array.isArray(e)?this.context.model.getEdgeData(e):this.context.model.getEdgeDatum(e)}getComboData(e){return e===void 0?this.context.model.getComboData():Array.isArray(e)?this.context.model.getComboData(e):this.context.model.getNodeLikeDatum(e)}setData(e){this.context.model.setData(yn(e)?e(this.getData()):e)}addData(e){this.context.model.addData(yn(e)?e(this.getData()):e)}addNodeData(e){this.context.model.addNodeData(yn(e)?e(this.getNodeData()):e)}addEdgeData(e){this.context.model.addEdgeData(yn(e)?e(this.getEdgeData()):e)}addComboData(e){this.context.model.addComboData(yn(e)?e(this.getComboData()):e)}addChildrenData(e,t){this.context.model.addChildrenData(e,t)}updateData(e){this.context.model.updateData(yn(e)?e(this.getData()):e)}updateNodeData(e){this.context.model.updateNodeData(yn(e)?e(this.getNodeData()):e)}updateEdgeData(e){this.context.model.updateEdgeData(yn(e)?e(this.getEdgeData()):e)}updateComboData(e){this.context.model.updateComboData(yn(e)?e(this.getComboData()):e)}removeData(e){this.context.model.removeData(yn(e)?e(this.getData()):e)}removeNodeData(e){this.context.model.removeNodeData(yn(e)?e(this.getNodeData()):e)}removeEdgeData(e){this.context.model.removeEdgeData(yn(e)?e(this.getEdgeData()):e)}removeComboData(e){this.context.model.removeComboData(yn(e)?e(this.getComboData()):e)}getElementType(e){return this.context.model.getElementType(e)}getRelatedEdgesData(e,t="both"){return this.context.model.getRelatedEdgesData(e,t)}getNeighborNodesData(e){return this.context.model.getNeighborNodesData(e)}getAncestorsData(e,t){return this.context.model.getAncestorsData(e,t)}getParentData(e,t){return this.context.model.getParentData(e,t)}getChildrenData(e){return this.context.model.getChildrenData(e)}getDescendantsData(e){return this.context.model.getDescendantsData(e)}getElementDataByState(e,t){return this.context.model.getElementDataByState(e,t)}initCanvas(){return Br(this,void 0,void 0,function*(){var e;if(this.context.canvas)return yield this.context.canvas.ready;const{container:t="container",width:n,height:i,renderer:a,cursor:s,background:o,canvas:l,devicePixelRatio:u=(e=globalThis.devicePixelRatio)!==null&&e!==void 0?e:1}=this.options;if(t instanceof Xb)this.context.canvas=t,s&&t.setCursor(s),a&&t.setRenderer(a),yield t.ready;else{const h=ur(t)?document.getElementById(t):t,p=Jb(h);this.emit(Qt.BEFORE_CANVAS_INIT,{container:h,width:n,height:i});const S=Object.assign(Object.assign({},l),{container:h,width:n||p[0],height:i||p[1],background:o,renderer:a,cursor:s,devicePixelRatio:u}),N=new Xb(S);this.context.canvas=N,yield N.ready,this.emit(Qt.AFTER_CANVAS_INIT,{canvas:N})}})}updateCanvas(e){var t,n;const{renderer:i,cursor:a,height:s,width:o}=e,l=this.context.canvas;l&&(i&&(this.emit(Qt.BEFORE_RENDERER_CHANGE,{renderer:this.options.renderer}),l.setRenderer(i),this.emit(Qt.AFTER_RENDERER_CHANGE,{renderer:i})),a&&l.setCursor(a),(un(o)||un(s))&&this.setSize((t=o!=null?o:this.options.width)!==null&&t!==void 0?t:0,(n=s!=null?s:this.options.height)!==null&&n!==void 0?n:0))}initRuntime(){this.context.options=this.options,this.context.batch||(this.context.batch=new AF(this.context)),this.context.plugin||(this.context.plugin=new XF(this.context)),this.context.viewport||(this.context.viewport=new QF(this.context)),this.context.transform||(this.context.transform=new YF(this.context)),this.context.element||(this.context.element=new CF(this.context)),this.context.animation||(this.context.animation=new MF(this.context)),this.context.layout||(this.context.layout=new VF(this.context)),this.context.behavior||(this.context.behavior=new TF(this.context))}prepare(){return Br(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed){console.error(Js("The graph instance has been destroyed"));return}yield this.initCanvas(),this.initRuntime()})}render(){return Br(this,void 0,void 0,function*(){if(yield this.prepare(),Si(this,new bi(Qt.BEFORE_RENDER)),this.options.layout)if(!this.rendered&&JL(this.options.layout)){const e=yield this.context.element.preLayoutDraw({type:"render"});yield Promise.all([e==null?void 0:e.finished,this.autoFit()])}else{const e=this.context.element.draw({type:"render"});yield Promise.all([e==null?void 0:e.finished,this.context.layout.postLayout()]),yield this.autoFit()}else{const e=this.context.element.draw({type:"render"});yield Promise.all([e==null?void 0:e.finished,this.autoFit()])}this.rendered=!0,Si(this,new bi(Qt.AFTER_RENDER))})}draw(){return Br(this,void 0,void 0,function*(){var e;yield this.prepare(),yield(e=this.context.element.draw())===null||e===void 0?void 0:e.finished})}layout(e){return Br(this,void 0,void 0,function*(){yield this.context.layout.postLayout(e)})}stopLayout(){this.context.layout.stopLayout()}clear(){return Br(this,void 0,void 0,function*(){const{model:e,element:t}=this.context;e.setData({}),e.clearChanges(),t==null||t.clear()})}destroy(){var e;Si(this,new bi(Qt.BEFORE_DESTROY));const{layout:t,animation:n,element:i,model:a,canvas:s,behavior:o,plugin:l}=this.context;l==null||l.destroy(),o==null||o.destroy(),t==null||t.destroy(),n==null||n.destroy(),i==null||i.destroy(),a.destroy(),s==null||s.destroy(),this.options={},this.context={},this.off(),(e=globalThis.removeEventListener)===null||e===void 0||e.call(globalThis,"resize",this.onResize),this.destroyed=!0,Si(this,new bi(Qt.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(e,t){var n;const i=Jb((n=this.context.canvas)===null||n===void 0?void 0:n.getContainer()),a=[e||i[0],t||i[1]];if(!this.context.canvas)return;const s=this.context.canvas.getSize();ci(a,s)||(Si(this,new bi(Qt.BEFORE_SIZE_CHANGE,{size:a})),this.context.canvas.resize(...a),Si(this,new bi(Qt.AFTER_SIZE_CHANGE,{size:a})))}fitView(e,t){return Br(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.fitView(e,t)})}fitCenter(e){return Br(this,void 0,void 0,function*(){var t;yield(t=this.context.viewport)===null||t===void 0?void 0:t.fitCenter({animation:e})})}autoFit(){return Br(this,void 0,void 0,function*(){const{autoFit:e}=this.context.options;if(e)if(ur(e))e==="view"?yield this.fitView():e==="center"&&(yield this.fitCenter());else{const{type:t,animation:n}=e;t==="view"?yield this.fitView(e.options,n):t==="center"&&(yield this.fitCenter(n))}})}focusElement(e,t){return Br(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.focusElements(Array.isArray(e)?e:[e],{animation:t})})}zoomBy(e,t,n){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:e,origin:n},t)})}zoomTo(e,t,n){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",scale:e,origin:n},t)})}getZoom(){return this.context.viewport.getZoom()}rotateBy(e,t,n){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:e,origin:n},t)})}rotateTo(e,t,n){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",rotate:e,origin:n},t)})}getRotation(){return this.context.viewport.getRotation()}translateBy(e,t){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:e},t)})}translateTo(e,t){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",translate:e},t)})}getPosition(){return Or([0,0],this.getCanvasByViewport([0,0]))}translateElementBy(e,t){return Br(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[l,u]=li(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a];Object.entries(l).forEach(([h,p])=>this.context.model.translateNodeLikeBy(h,p)),yield(o=this.context.element.draw({animation:u,stage:"translate"}))===null||o===void 0?void 0:o.finished})}translateElementTo(e,t){return Br(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[l,u]=li(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a];Object.entries(l).forEach(([h,p])=>this.context.model.translateNodeLikeTo(h,p)),yield(o=this.context.element.draw({animation:u,stage:"translate"}))===null||o===void 0?void 0:o.finished})}getElementPosition(e){return this.context.model.getElementPosition(e)}getElementRenderStyle(e){return _0(this.context.element.getElement(e).attributes,["context"])}setElementVisibility(e,t){return Br(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[l,u]=li(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a],h={nodes:[],edges:[],combos:[]};Object.entries(l).forEach(([N,U])=>{const H=this.getElementType(N);h[`${H}s`].push({id:N,style:{visibility:U}})});const{model:p,element:S}=this.context;p.preventUpdateNodeLikeHierarchy(()=>{p.updateData(h)}),yield(o=S.draw({animation:u,stage:"visibility"}))===null||o===void 0?void 0:o.finished})}showElement(e,t){return Br(this,void 0,void 0,function*(){const n=Array.isArray(e)?e:[e];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"visible"])),t)})}hideElement(e,t){return Br(this,void 0,void 0,function*(){const n=Array.isArray(e)?e:[e];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"hidden"])),t)})}getElementVisibility(e){var t,n;const i=this.context.element.getElement(e);return(n=(t=i==null?void 0:i.style)===null||t===void 0?void 0:t.visibility)!==null&&n!==void 0?n:"visible"}setElementZIndex(e,t){return Br(this,void 0,void 0,function*(){var n;const i={nodes:[],edges:[],combos:[]},a=li(e)?e:{[e]:t};Object.entries(a).forEach(([l,u])=>{const h=this.getElementType(l);i[`${h}s`].push({id:l,style:{zIndex:u}})});const{model:s,element:o}=this.context;s.preventUpdateNodeLikeHierarchy(()=>s.updateData(i)),yield(n=o.draw({animation:!1,stage:"zIndex"}))===null||n===void 0?void 0:n.finished})}frontElement(e){return Br(this,void 0,void 0,function*(){const t=Array.isArray(e)?e:[e],{model:n}=this.context,i={};t.map(a=>{const s=n.getFrontZIndex(a);if(n.getElementType(a)==="combo"){const l=n.getAncestorsData(a,Cr).at(-1)||this.getComboData(a),u=[l,...n.getDescendantsData(Et(l))],h=s-qb(l);u.forEach(S=>{i[Et(S)]=this.getElementZIndex(Et(S))+h});const{internal:p}=jg(u.map(Et),S=>n.getRelatedEdgesData(S));p.forEach(S=>{const N=Et(S);i[N]=this.getElementZIndex(N)+h})}else i[a]=s}),yield this.setElementZIndex(i)})}getElementZIndex(e){return qb(this.context.model.getElementDataById(e))}setElementState(e,t){return Br(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[l,u]=li(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a],h=S=>S?Array.isArray(S)?S:[S]:[],p={nodes:[],edges:[],combos:[]};Object.entries(l).forEach(([S,N])=>{const U=this.getElementType(S);p[`${U}s`].push({id:S,states:h(N)})}),this.updateData(p),yield(o=this.context.element.draw({animation:u,stage:"state"}))===null||o===void 0?void 0:o.finished})}getElementState(e){return this.context.model.getElementState(e)}getElementRenderBounds(e){return this.context.element.getElement(e).getRenderBounds()}collapseElement(e){return Br(this,arguments,void 0,function*(t,n=!0){const{model:i,element:a}=this.context;if(xa(i.getNodeLikeData([t])[0])||this.isCollapsingExpanding)return;typeof n=="boolean"&&(n={animation:n,align:!0});const s=i.getElementType(t);yield this.frontElement(t),this.isCollapsingExpanding=!0,this.setElementCollapsibility(t,!0),s==="node"?yield a.collapseNode(t,n):s==="combo"&&(yield a.collapseCombo(t,!!n.animation)),this.isCollapsingExpanding=!1})}expandElement(e){return Br(this,arguments,void 0,function*(t,n=!0){const{model:i,element:a}=this.context;if(!xa(i.getNodeLikeData([t])[0])||this.isCollapsingExpanding)return;typeof n=="boolean"&&(n={animation:n,align:!0});const s=i.getElementType(t);this.isCollapsingExpanding=!0,this.setElementCollapsibility(t,!1),s==="node"?yield a.expandNode(t,n):s==="combo"&&(yield a.expandCombo(t,!!n.animation)),this.isCollapsingExpanding=!1})}setElementCollapsibility(e,t){const n=this.getElementType(e);n==="node"?this.updateNodeData([{id:e,style:{collapsed:t}}]):n==="combo"&&this.updateComboData([{id:e,style:{collapsed:t}}])}toDataURL(){return Br(this,arguments,void 0,function*(e={}){return this.context.canvas.toDataURL(e)})}getCanvasByViewport(e){return this.context.canvas.getCanvasByViewport(e)}getViewportByCanvas(e){return this.context.canvas.getViewportByCanvas(e)}getClientByCanvas(e){return this.context.canvas.getClientByCanvas(e)}getCanvasByClient(e){return this.context.canvas.getCanvasByClient(e)}getViewportCenter(){return this.context.viewport.getViewportCenter()}getCanvasCenter(){return this.context.viewport.getCanvasCenter()}on(e,t,n){return super.on(e,t,n)}once(e,t){return super.once(e,t)}off(e,t){return super.off(e,t)}}jd.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};var JF=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{if(o.depth=l,!o.children)return o;const{children:u}=o,h=JF(o,["children"]);return Object.assign(Object.assign({},h),{children:u.map(p=>p.id)})},getEdgeData:n=(o,l)=>({source:o.id,target:l.id}),getChildren:i=o=>o.children||[]}=e||{},a=[],s=[];return vl(r,(o,l)=>{a.push(t(o,l));const u=i(o);for(const h of u)s.push(n(o,h))},o=>i(o),"TB"),{nodes:a,edges:s}}class $F extends Uo{beforeDraw(e){const{add:t,update:n}=e,{model:i}=this.context;return[...t.edges.entries(),...n.edges.entries()].forEach(([,a])=>{h2(i,a)}),e}}const h2=(r,e)=>{const{source:t,target:n}=e,i=r.getElementDataById(t),a=r.getElementDataById(n),s=R1(i,p=>r.getParentData(p,Cr)),o=R1(a,p=>r.getParentData(p,Cr)),l=Et(s),u=Et(o),h={sourceNode:l,targetNode:u};return e.style?Object.assign(e.style,h):e.style=h,e},e8=(r,e,t)=>{const[n,i]=e,[a,s]=t;if(i===n)return a;const o=(r-n)/(i-n);return a+o*(s-a)},t8=(r,e,t)=>{const[n,i]=e,[a,s]=t,o=Math.log(r-n+1)/Math.log(i-n+1);return a+o*(s-a)},n8=(r,e,t,n=2)=>{const[i,a]=e,[s,o]=t,l=Math.pow((r-i)/(a-i),n);return s+l*(o-s)},r8=(r,e,t)=>{const[n,i]=e,[a,s]=t,o=Math.sqrt((r-n)/(i-n));return a+o*(s-a)};class Vd extends Uo{constructor(e,t){super(e,sa({},Vd.defaultOptions,t)),this.assignSizeByCentrality=(n,i,a,s,o,l)=>{const u=[i,a],h=[s[0],o[0]],p=[s[1],o[1]],S=[s[2],o[2]],N=(U,H)=>{if(typeof l=="function")return l(U,u,H);switch(l){case"linear":return e8(U,u,H);case"log":return t8(U,u,H);case"pow":return n8(U,u,H,2);case"sqrt":return r8(U,u,H);default:return H[0]}};return[N(n,h),N(n,p),N(n,S)]}}beforeDraw(e){const{model:t}=this.context,n=t.getNodeData(),i=La(this.options.maxSize),a=La(this.options.minSize),s=this.getCentralities(this.options.centrality),o=s.size>0?Math.max(...s.values()):0,l=s.size>0?Math.min(...s.values()):0;return n.forEach(u=>{var h;const p=this.assignSizeByCentrality(s.get(Et(u))||0,l,o,a,i,this.options.scale),S=(h=this.context.element)===null||h===void 0?void 0:h.getElement(Et(u)),N={size:p};this.assignLabelStyle(N,p,u,S),(!S||!Id(N,S.attributes))&&Fa(e,S?"update":"add","node",sa(u,{style:N}),!0)}),e}assignLabelStyle(e,t,n,i){var a;const s=i?i.config.style:(a=this.context.element)===null||a===void 0?void 0:a.getElementComputedStyle("node",n);if(Object.assign(e,ml(s,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const o=this.getLabelSizeByNodeSize(t,1/0,Number(e.labelFontSize));Object.assign(e,{labelFontSize:o,labelLineHeight:o+mS(e.labelPadding)})}return e}getLabelSizeByNodeSize(e,t,n){const i=Math.min(...e)/2,[a,s]=Array.isArray(this.options.mapLabelSize)?this.options.mapLabelSize:[n,t];return Math.min(s,Math.max(i,a))}getCentralities(e){const{model:t}=this.context,n=t.getData();if(typeof e=="function")return e(n);const i=t.getRelatedEdgesData.bind(t);return B_(n,i,e)}}Vd.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class Zd extends Uo{constructor(e,t){super(e,Object.assign({},Zd.defaultOptions,t))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var e;const t=Ti(this.ref),{graph:n,model:i}=this.context;(e=i.getData().nodes)===null||e===void 0||e.forEach(s=>{var o;if(Et(s)===Et(this.ref))return;const l=U_(Or(Ti(s),t)),u=Math.abs(l)>Math.PI/2,h=!s.children||s.children.length===0,p=Et(s),S=(o=this.context.element)===null||o===void 0?void 0:o.getElement(p);if(!S||!S.isVisible())return;const N=La(n.getElementRenderStyle(p).size)[0]/2,U=(h?1:-1)*(N+this.options.offset),H=[["translate",U*Math.cos(l),U*Math.sin(l)],["rotate",u?ga(l)+180:ga(l)]];i.updateNodeData([{id:Et(s),style:{labelTextAlign:u===h?"right":"left",labelTextBaseline:"middle",labelTransform:H}}])}),n.draw()}}Zd.defaultOptions={offset:5};const i8="quadratic",f2=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class Kd extends Uo{constructor(e,t){super(e,Object.assign({},Kd.defaultOptions,t)),this.cacheMergeStyle=new Map,this.getAffectedParallelEdges=n=>{const{add:{edges:i},update:{nodes:a,edges:s,combos:o},remove:{edges:l}}=n,{model:u}=this.context,h=new Map,p=(U,H)=>{u.getRelatedEdgesData(H).forEach(Y=>!h.has(Et(Y))&&h.set(Et(Y),Y))};a.forEach(p),o.forEach(p);const S=U=>{const H=u.getEdgeData().map(Y=>h2(u,Y));a8(U,H,!0).forEach(Y=>!h.has(Et(Y))&&h.set(Et(Y),Y))};if(l.size&&l.forEach(S),i.size&&i.forEach(S),s.size){const U=fx(A0(u.getChanges())).update.edges;s.forEach(H=>{var V;S(H);const Y=(V=U.find(q=>Et(q.value)===Et(H)))===null||V===void 0?void 0:V.original;Y&&!yp(H,Y)&&S(Y)})}Fs(this.options.edges)||h.forEach((U,H)=>!this.options.edges.includes(H)&&h.delete(H));const N=u.getEdgeData().map(Et);return new Map([...h].sort((U,H)=>N.indexOf(U[0])-N.indexOf(H[0])))},this.applyBundlingStyle=(n,i,a)=>{const{edgeMap:s,reverses:o}=d2(i);s.forEach(l=>{l.forEach((u,h,p)=>{var S;const N=p.length,U=u.style||{};if(u.source===u.target){const Y=f2.length;U.loopPlacement=f2[h%Y],U.loopDist=Math.floor(h/Y)*a+50}else if(N===1)U.curveOffset=0;else{const Y=(h%2===0?1:-1)*(o[`${u.source}|${u.target}|${h}`]?-1:1);U.curveOffset=N%2===1?Y*Math.ceil(h/2)*a*2:Y*(Math.floor(h/2)*a*2+a)}const H=Object.assign(u,{type:i8,style:U}),V=(S=this.context.element)===null||S===void 0?void 0:S.getElement(Et(u));(!V||!Id(H.style,V.attributes))&&Fa(n,V?"update":"add","edge",H,!0)})})},this.resetEdgeStyle=n=>{const i=n.style||{},a=this.cacheMergeStyle.get(Et(n))||{};return Object.keys(a).forEach(s=>{ci(i[s],a[s])&&(n[s]?i[s]=n[s]:delete i[s])}),Object.assign(n,{style:i})},this.applyMergingStyle=(n,i)=>{const{edgeMap:a,reverses:s}=d2(i);a.forEach(o=>{var l;if(o.length===1){const h=o[0],p=(l=this.context.element)===null||l===void 0?void 0:l.getElement(Et(h)),S=this.resetEdgeStyle(h);(!p||!Id(S,p.attributes))&&Fa(n,p?"update":"add","edge",S);return}const u=o.map(({source:h,target:p,style:S={}},N)=>{const{startArrow:U,endArrow:H}=S,V={},[Y,q]=s[`${h}|${p}|${N}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return Su(U)&&(V[Y]=U),Su(H)&&(V[q]=H),V}).reduce((h,p)=>Object.assign(Object.assign({},h),p),{});o.forEach((h,p,S)=>{var N;if(p!==0){Fa(n,"remove","edge",h);return}const U=Object.assign({},yn(this.options.style)?this.options.style(S):this.options.style,{childrenData:S});this.cacheMergeStyle.set(Et(h),U);const H=Object.assign(Object.assign({},h),{type:"line",style:Object.assign(Object.assign(Object.assign({},h.style),u),U)}),V=(N=this.context.element)===null||N===void 0?void 0:N.getElement(Et(h));(!V||!Id(H.style,V.attributes))&&Fa(n,V?"update":"add","edge",H,!0)})})}}beforeDraw(e){const t=this.getAffectedParallelEdges(e);return t.size===0||(this.options.mode==="bundle"?this.applyBundlingStyle(e,t,this.options.distance):this.applyMergingStyle(e,t)),e}}Kd.defaultOptions={mode:"bundle",distance:15};const d2=r=>{const e=new Map,t=new Set,n={},i=new Map;for(const[a,s]of r){if(t.has(a))continue;const{source:o,target:l}=s,u=`${o}-${l}`;e.has(u)||(e.set(u,[]),i.set(u,new Set));const h=e.get(u),p=i.get(u);h&&p&&!p.has(a)&&(h.push(s),p.add(a),t.add(a));for(const[S,N]of r)if(!(t.has(S)||S===a)&&yp(s,N)){const U=e.get(u),H=i.get(u);U&&H&&!H.has(S)&&(U.push(N),H.add(S),o===N.target&&l===N.source&&(n[`${N.source}|${N.target}|${U.length-1}`]=!0),t.add(S))}}return{edgeMap:e,reverses:n}},a8=(r,e,t)=>e.filter(n=>(t||Et(n)!==Et(r))&&yp(n,r)),yp=(r,e)=>{const{sourceNode:t,targetNode:n}=r.style||{},{sourceNode:i,targetNode:a}=e.style||{};return t===i&&n===a||t===a&&n===i};class s8 extends Uo{beforeDraw(e,t){const{stage:n}=t;if(n==="visibility")return e;const{model:i}=this.context,{update:{nodes:a,edges:s,combos:o}}=e,l=(u,h)=>{i.getRelatedEdgesData(h).forEach(S=>!s.has(Et(S))&&s.set(Et(S),S))};return a.forEach(l),o.forEach(l),e}}const o8={animation:{"combo-collapse":Yy,"combo-expand":fS,"node-collapse":Ky,"node-expand":cS,"path-in":Xy,"path-out":hS,fade:lS,translate:uS},behavior:{"brush-select":ec,"click-select":qh,"collapse-expand":Mf,"create-edge":Sf,"drag-canvas":Of,"drag-element-force":eR,"drag-element":cc,"fix-element-size":If,"focus-element":Nf,"hover-activate":Bf,"lasso-select":nR,"auto-adapt-label":Zh,"optimize-viewport-transform":kf,"scroll-canvas":Ff,"zoom-canvas":zf},combo:{circle:VC,rect:ZC},edge:{cubic:yl,line:Ef,polyline:xf,quadratic:bf,"cubic-horizontal":mf,"cubic-radial":yf,"cubic-vertical":_f},layout:{"antv-dagre":W3,"combo-combined":cI,"compact-box":Uf.compactBox,"d3-force":CI,"force-atlas2":II,circular:j3,concentric:l0,dagre:Wf,dendrogram:Uf.dendrogram,fishbone:jf,force:NE,fruchterman:kI,grid:zI,indented:Uf.indented,mds:HE,mindmap:Uf.mindmap,radial:XI,random:tN,snake:Vf},node:{circle:gl,diamond:ZD,ellipse:rf,hexagon:JD,html:ff,image:df,rect:GC,star:jC,donut:tf,triangle:vf},palette:{spectral:sN,tableau:oN,oranges:lN,greens:uN,blues:cN},theme:{dark:fF,light:dF},plugin:{"bubble-sets":td,"edge-bundling":rd,"edge-filter-lens":id,"grid-line":od,background:Zf,contextmenu:nd,fisheye:ad,fullscreen:sd,history:ld,hull:fd,legend:md,minimap:yd,snapline:_d,timebar:Dd,toolbar:Cd,tooltip:Ld,watermark:Rd},transform:{"arrange-draw-order":vF,"collapse-expand-combo":gF,"collapse-expand-node":pF,"get-edge-actual-ends":$F,"map-node-size":Vd,"place-radial-labels":Zd,"process-parallel-edges":Kd,"update-related-edges":s8},shape:{circle:Ks,ellipse:Uu,group:Ai,html:Wu,image:Og,line:al,path:Sa,polygon:sl,polyline:ch,rect:ki,text:ol,label:So,badge:ql}};function l8(){Object.entries(o8).forEach(([r,e])=>{Object.entries(e).forEach(([t,n])=>{mF(r,t,n)})})}l8();const eW={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"}},13722:function(we){(function(X,K){we.exports=K()})(typeof self!="undefined"?self:this,function(){return function(Me){var X={};function K(ee){if(X[ee])return X[ee].exports;var G=X[ee]={i:ee,l:!1,exports:{}};return Me[ee].call(G.exports,G,G.exports,K),G.l=!0,G.exports}return K.m=Me,K.c=X,K.d=function(ee,G,_){K.o(ee,G)||Object.defineProperty(ee,G,{configurable:!1,enumerable:!0,get:_})},K.n=function(ee){var G=ee&&ee.__esModule?function(){return ee.default}:function(){return ee};return K.d(G,"a",G),G},K.o=function(ee,G){return Object.prototype.hasOwnProperty.call(ee,G)},K.p="",K(K.s=5)}([function(Me,X){function K(ee,G,_,F){return F===void 0&&(F="height"),_==="center"?(ee[F]+G[F])/2:ee.height}Me.exports={assign:Object.assign,getHeight:K}},function(Me,X,K){var ee=K(3),G=function(){function _(w,x){x===void 0&&(x={});var y=this;y.options=x,y.rootNode=ee(w,x)}var F=_.prototype;return F.execute=function(){throw new Error("please override this method")},_}();Me.exports=G},function(Me,X,K){var ee=K(4),G=["LR","RL","TB","BT","H","V"],_=["LR","RL","H"],F=function(b){return _.indexOf(b)>-1},w=G[0];Me.exports=function(y,b,E){var g=b.direction||w;if(b.isHorizontal=F(g),g&&G.indexOf(g)===-1)throw new TypeError("Invalid direction: "+g);if(g===G[0])E(y,b);else if(g===G[1])E(y,b),y.right2left();else if(g===G[2])E(y,b);else if(g===G[3])E(y,b),y.bottom2top();else if(g===G[4]||g===G[5]){var m=ee(y,b),C=m.left,d=m.right;E(C,b),E(d,b),b.isHorizontal?C.right2left():C.bottom2top(),d.translate(C.x-d.x,C.y-d.y),y.x=C.x,y.y=d.y;var v=y.getBoundingBox();b.isHorizontal?v.top<0&&y.translate(0,-v.top):v.left<0&&y.translate(-v.left,0)}var A=b.fixedRoot;return A===void 0&&(A=!0),A&&y.translate(-(y.x+y.width/2+y.hgap),-(y.y+y.height/2+y.vgap)),x(y,b),y};function x(y,b){if(b.radial){var E=b.isHorizontal?["x","y"]:["y","x"],g=E[0],m=E[1],C={x:1/0,y:1/0},d={x:-1/0,y:-1/0},v=0;y.DFTraverse(function(O){v++;var P=O.x,L=O.y;C.x=Math.min(C.x,P),C.y=Math.min(C.y,L),d.x=Math.max(d.x,P),d.y=Math.max(d.y,L)});var A=d[m]-C[m];if(A===0)return;var T=Math.PI*2/v;y.DFTraverse(function(O){var P=(O[m]-C[m])/A*(Math.PI*2-T)+T,L=O[g]-y[g];O.x=Math.cos(P)*L,O.y=Math.sin(P)*L})}}},function(Me,X,K){var ee=K(0),G=18,_=G*2,F=G,w={getId:function(E){return E.id||E.name},getPreH:function(E){return E.preH||0},getPreV:function(E){return E.preV||0},getHGap:function(E){return E.hgap||F},getVGap:function(E){return E.vgap||F},getChildren:function(E){return E.children},getHeight:function(E){return E.height||_},getWidth:function(E){var g=E.label||" ";return E.width||g.split("").length*G}};function x(b,E){var g=this;if(g.vgap=g.hgap=0,b instanceof x)return b;g.data=b;var m=E.getHGap(b),C=E.getVGap(b);return g.preH=E.getPreH(b),g.preV=E.getPreV(b),g.width=E.getWidth(b),g.height=E.getHeight(b),g.width+=g.preH,g.height+=g.preV,g.id=E.getId(b),g.x=g.y=0,g.depth=0,g.children||(g.children=[]),g.addGap(m,C),g}ee.assign(x.prototype,{isRoot:function(){return this.depth===0},isLeaf:function(){return this.children.length===0},addGap:function(E,g){var m=this;m.hgap+=E,m.vgap+=g,m.width+=2*E,m.height+=2*g},eachNode:function(E){for(var g=this,m=[g],C;C=m.shift();)E(C),m=C.children.concat(m)},DFTraverse:function(E){this.eachNode(E)},BFTraverse:function(E){for(var g=this,m=[g],C;C=m.shift();)E(C),m=m.concat(C.children)},getBoundingBox:function(){var E={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(function(g){E.left=Math.min(E.left,g.x),E.top=Math.min(E.top,g.y),E.width=Math.max(E.width,g.x+g.width),E.height=Math.max(E.height,g.y+g.height)}),E},translate:function(E,g){E===void 0&&(E=0),g===void 0&&(g=0),this.eachNode(function(m){m.x+=E,m.y+=g,m.x+=m.preH,m.y+=m.preV})},right2left:function(){var E=this,g=E.getBoundingBox();E.eachNode(function(m){m.x=m.x-(m.x-g.left)*2-m.width}),E.translate(g.width,0)},bottom2top:function(){var E=this,g=E.getBoundingBox();E.eachNode(function(m){m.y=m.y-(m.y-g.top)*2-m.height}),E.translate(0,g.height)}});function y(b,E,g){E===void 0&&(E={}),E=ee.assign({},w,E);var m=new x(b,E),C=[m],d;if(!g&&!b.collapsed){for(;d=C.shift();)if(!d.data.collapsed){var v=E.getChildren(d.data),A=v?v.length:0;if(d.children=new Array(A),v&&A)for(var T=0;Tz.low&&(z=z.nxt);var ie=Q+Z.prelim+Z.w-($+te.prelim);ie>0&&($+=ie,C(k,W,z.index,ie));var ae=A(Z),re=A(te);ae<=re&&(Z=v(Z),Z!==null&&(Q+=Z.mod)),ae>=re&&(te=d(te),te!==null&&($+=te.mod))}!Z&&te?T(k,W,te,$):Z&&!te&&O(k,W,Z,Q)}function C(k,W,z,Z){k.c[W].mod+=Z,k.c[W].msel+=Z,k.c[W].mser+=Z,c(k,W,z,Z)}function d(k){return k.cs===0?k.tl:k.c[0]}function v(k){return k.cs===0?k.tr:k.c[k.cs-1]}function A(k){return k.y+k.h}function T(k,W,z,Z){var Q=k.c[0].el;Q.tl=z;var te=Z-z.mod-k.c[0].msel;Q.mod+=te,Q.prelim-=te,k.c[0].el=k.c[W].el,k.c[0].msel=k.c[W].msel}function O(k,W,z,Z){var Q=k.c[W].er;Q.tr=z;var te=Z-z.mod-k.c[W].mser;Q.mod+=te,Q.prelim-=te,k.c[W].er=k.c[W-1].er,k.c[W].mser=k.c[W-1].mser}function P(k){k.prelim=(k.c[0].prelim+k.c[0].mod+k.c[k.cs-1].mod+k.c[k.cs-1].prelim+k.c[k.cs-1].w)/2-k.w/2}function L(k,W){W+=k.mod,k.x=k.prelim+W,f(k);for(var z=0;z=z.low;)z=z.nxt;return{low:k,index:W,nxt:z}}w(x,b);var R=K.fromNode(x,b);return E(R),L(R,0),F(R,x,b),_(x,b),x}},function(Me,X,K){function ee(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,G(g,m)}function G(g,m){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,d){return C.__proto__=d,C},G(g,m)}var _=K(1),F=K(9),w=K(2),x=K(0),y=function(g){function m(){return g.apply(this,arguments)||this}ee(m,g);var C=m.prototype;return C.execute=function(){var v=this;return v.rootNode.width=0,w(v.rootNode,v.options,F)},m}(_),b={};function E(g,m){return m=x.assign({},b,m),new y(g,m).execute()}Me.exports=E},function(Me,X,K){var ee=K(0);function G(w,x){w===void 0&&(w=0),x===void 0&&(x=[]);var y=this;y.x=y.y=0,y.leftChild=y.rightChild=null,y.height=0,y.children=x}var _={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function F(w,x,y){y?(x.x=w.x,x.y=w.y):(x.x=w.y,x.y=w.x),w.children.forEach(function(b,E){F(b,x.children[E],y)})}Me.exports=function(w,x){x===void 0&&(x={}),x=ee.assign({},_,x);var y=0;function b(d){if(!d)return null;d.width=0,d.depth&&d.depth>y&&(y=d.depth);var v=d.children,A=v.length,T=new G(d.height,[]);return v.forEach(function(O,P){var L=b(O);T.children.push(L),P===0&&(T.leftChild=L),P===A-1&&(T.rightChild=L)}),T.originNode=d,T.isLeaf=d.isLeaf(),T}function E(d){if(d.isLeaf||d.children.length===0)d.drawingDepth=y;else{var v=d.children.map(function(T){return E(T)}),A=Math.min.apply(null,v);d.drawingDepth=A-1}return d.drawingDepth}var g;function m(d){d.x=d.drawingDepth*x.rankSep,d.isLeaf?(d.y=0,g&&(d.y=g.y+g.height+x.nodeSep,d.originNode.parent!==g.originNode.parent&&(d.y+=x.subTreeSep)),g=d):(d.children.forEach(function(v){m(v)}),d.y=(d.leftChild.y+d.rightChild.y)/2)}var C=b(w);return E(C),m(C),F(C,w,x.isHorizontal),w}},function(Me,X,K){function ee(C,d){C.prototype=Object.create(d.prototype),C.prototype.constructor=C,G(C,d)}function G(C,d){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,A){return v.__proto__=A,v},G(C,d)}var _=K(1),F=K(11),w=K(4),x=K(0),y=["LR","RL","H"],b=y[0],E=function(C){function d(){return C.apply(this,arguments)||this}ee(d,C);var v=d.prototype;return v.execute=function(){var T=this,O=T.options,P=T.rootNode;O.isHorizontal=!0;var L=O.indent,c=L===void 0?20:L,f=O.dropCap,D=f===void 0?!0:f,R=O.direction,k=R===void 0?b:R,W=O.align;if(k&&y.indexOf(k)===-1)throw new TypeError("Invalid direction: "+k);if(k===y[0])F(P,c,D,W);else if(k===y[1])F(P,c,D,W),P.right2left();else if(k===y[2]){var z=w(P,O),Z=z.left,Q=z.right;F(Z,c,D,W),Z.right2left(),F(Q,c,D,W);var te=Z.getBoundingBox();Q.translate(te.width,0),P.x=Q.x-P.width/2}return P},d}(_),g={};function m(C,d){return d=x.assign({},g,d),new E(C,d).execute()}Me.exports=m},function(Me,X,K){var ee=K(0);function G(_,F,w,x,y){var b=(typeof w=="function"?w(_):w)*_.depth;if(!x)try{if(_.id===_.parent.children[0].id){_.x+=b,_.y=F?F.y:0;return}}catch(m){}if(_.x+=b,F){if(_.y=F.y+ee.getHeight(F,_,y),F.parent&&_.parent.id!==F.parent.id){var E=F.parent,g=E.y+ee.getHeight(E,_,y);_.y=g>_.y?g:_.y}}else _.y=0}Me.exports=function(_,F,w,x){var y=null;_.eachNode(function(b){G(b,y,F,w,x),y=b})}},function(Me,X,K){function ee(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,G(g,m)}function G(g,m){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,d){return C.__proto__=d,C},G(g,m)}var _=K(1),F=K(13),w=K(2),x=K(0),y=function(g){function m(){return g.apply(this,arguments)||this}ee(m,g);var C=m.prototype;return C.execute=function(){var v=this;return w(v.rootNode,v.options,F)},m}(_),b={};function E(g,m){return m=x.assign({},b,m),new y(g,m).execute()}Me.exports=E},function(Me,X,K){var ee=K(0);function G(w,x){var y=0;return w.children.length?w.children.forEach(function(b){y+=G(b,x)}):y=w.height,w._subTreeSep=x.getSubTreeSep(w.data),w.totalHeight=Math.max(w.height,y)+2*w._subTreeSep,w.totalHeight}function _(w){var x=w.children,y=x.length;if(y){x.forEach(function(d){_(d)});var b=x[0],E=x[y-1],g=E.y-b.y+E.height,m=0;if(x.forEach(function(d){m+=d.totalHeight}),g>w.height)w.y=b.y+g/2-w.height/2;else if(x.length!==1||w.height>m){var C=w.y+(w.height-g)/2-b.y;x.forEach(function(d){d.translate(0,C)})}else w.y=(b.y+b.height/2+E.y+E.height/2)/2-w.height/2}}var F={getSubTreeSep:function(){return 0}};Me.exports=function(w,x){x===void 0&&(x={}),x=ee.assign({},F,x),w.parent={x:0,width:0,height:0,y:0},w.BFTraverse(function(y){y.x=y.parent.x+y.parent.width}),w.parent=null,G(w,x),w.startY=0,w.y=w.totalHeight/2-w.height/2,w.eachNode(function(y){var b=y.children,E=b.length;if(E){var g=b[0];if(g.startY=y.startY+y._subTreeSep,E===1)g.y=y.y+y.height/2-g.height/2;else{g.y=g.startY+g.totalHeight/2-g.height/2;for(var m=1;mO in T?F(T,O,{enumerable:!0,configurable:!0,writable:!0,value:P}):T[O]=P,m=(T,O)=>{for(var P in O||(O={}))b.call(O,P)&&g(T,P,O[P]);if(y)for(var P of y(O))E.call(O,P)&&g(T,P,O[P]);return T},C=(T,O)=>w(T,x(O));function d(T,O,P=1/3,L){let c=T*Math.PI*2,f=O*Math.PI*2;return{u:{min:-Math.PI,max:Math.PI*3,step:Math.PI/32},v:{min:0,max:Math.PI*2,step:Math.PI/20},x:function(D,R){return Df?Math.cos(f)*(1+Math.cos(R)*P):Math.cos(D)*(1+Math.cos(R)*P)},y:function(D,R){return Df?Math.sin(f)*(1+Math.cos(R)*P):Math.sin(D)*(1+Math.cos(R)*P)},z:function(D,R){return D<-Math.PI*.5?Math.sin(D):D>Math.PI*2.5?Math.sin(D)*L*.1:Math.sin(R)>0?1*L*.1:-1}}}function v({pieData:T=[],internalDiameterRatio:O=1/3}){var P,L,c,f;const D=[],R=T==null?void 0:T.reduce((Q,te)=>(Q||0)+((te==null?void 0:te.value)||0),0);let k=0,W=0;const z=[];for(let Q=0;Q<(T==null?void 0:T.length);Q++){W=k+(R==0?1:((P=T==null?void 0:T[Q])==null?void 0:P.value)||0);const te={itemStyle:((L=T==null?void 0:T[Q])==null?void 0:L.itemStyle)||{},name:((c=T==null?void 0:T[Q])==null?void 0:c.name)||`name${Q}`,type:"surface",parametric:!0,parametricEquation:d(k/(R||(T==null?void 0:T.length)),W/(R||(T==null?void 0:T.length)),O,((f=T==null?void 0:T[Q])==null?void 0:f.value)||(R==0?25:0)),wireframe:{show:!1},pieData:T==null?void 0:T[Q]};z.push(te.name),D.push(te),k=W}return D.push({name:"pie2d",type:"pie",showEmptyCircle:!0,label:{show:!0,formatter:Q=>`${Q.value} ${Q.name}`},startAngle:-35,radius:["49%","50%"],center:["50%","40%"],data:[...T||[]].reverse(),itemStyle:{opacity:0}}),{legend:{left:"50%",top:"center",textStyle:{fontSize:12},data:z},xAxis3D:{},yAxis3D:{},zAxis3D:{},grid3D:{viewControl:{alpha:45,rotateSensitivity:0,zoomSensitivity:0,panSensitivity:0,autoRotate:!1},left:"center",top:"-10%",show:!1,boxHeight:25},series:D}}const A=({dataSource:T=[{name:"\u638C\u63E1\u738780%~100%",value:0,itemStyle:{color:"rgb(223,209,38)"}},{name:"\u638C\u63D0\u738760%~79%",value:0,itemStyle:{color:"rgb(6,234,230)"}},{name:"\u638C\u63A8\u738759%\u4EE5\u4E0B",value:0,itemStyle:{color:"rgb(6,110,247)"}}],className:O="",style:P={},legend:L={},internalDiameterRatio:c=1/3})=>{const[f,D]=(0,K.useState)([]),R=(0,K.useCallback)(z=>{const Z=z.selected||{},Q=T.map(te=>te.name).filter(te=>Z[te]===!1);D(Q)},[T]),k=(0,K.useMemo)(()=>T.filter(z=>!f.includes(z.name)),[T,f]),W=(0,K.useMemo)(()=>{const z=v({pieData:k,internalDiameterRatio:c}),Z=T.map(te=>te.name),Q=T.reduce((te,$)=>(te[$.name]=!f.includes($.name),te),{});return z.legend=C(m(m({},z.legend),L),{data:Z,selected:Q}),z},[k,L,c,T,f]);return K.createElement(ee.Z,{onEvents:{legendselectchanged:R},className:`w-full h-full ${O}`,option:W,style:m({height:"100%"},P)})};Me.Z=A},28426:function(we,Me,X){"use strict";var K=X(59301),ee=X(93314),G=X(99571),_=Object.defineProperty,F=Object.defineProperties,w=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,E=(d,v,A)=>v in d?_(d,v,{enumerable:!0,configurable:!0,writable:!0,value:A}):d[v]=A,g=(d,v)=>{for(var A in v||(v={}))y.call(v,A)&&E(d,A,v[A]);if(x)for(var A of x(v))b.call(v,A)&&E(d,A,v[A]);return d},m=(d,v)=>F(d,w(v));const C=({img:d,buttonProps:v={},styles:A={},customText:T,ButtonText:O,ButtonClick:P,Buttonclass:L,ButtonTwo:c,imgStyles:f,loading:D=!1,className:R=""})=>K.createElement("section",{className:`tc animated fadeIn ${R}`,style:g({color:"#999",margin:"100px auto",visibility:D?"hidden":"visible"},A)},K.createElement("img",{src:d||ee,style:m(g({},f),{pointerEvents:"none",userSelect:"none"})}),K.createElement("p",{className:"mt20 font14"},T||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),O&&K.createElement(G.ZP,g({className:L,onClick:P},v),O),c&&c);Me.Z=C},45677:function(we,Me,X){"use strict";X.d(Me,{Z:function(){return L}});var K=X(59301),ee={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},G=X(99571),_=X(70557),F=X(75975),w=X(25399),x=X(51257),y=X(81722),b=X(28426),E=X(346),g=X(44203),m=X(59301),C=Object.defineProperty,d=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,T=(c,f,D)=>f in c?C(c,f,{enumerable:!0,configurable:!0,writable:!0,value:D}):c[f]=D,O=(c,f)=>{for(var D in f||(f={}))v.call(f,D)&&T(c,D,f[D]);if(d)for(var D of d(f))A.call(f,D)&&T(c,D,f[D]);return c},P=(c,f,D)=>new Promise((R,k)=>{var W=Q=>{try{Z(D.next(Q))}catch(te){k(te)}},z=Q=>{try{Z(D.throw(Q))}catch(te){k(te)}},Z=Q=>Q.done?R(Q.value):Promise.resolve(Q.value).then(W,z);Z((D=D.apply(c,f)).next())}),L=({editOffice:c="view",data:f,issaver:D,onSaver:R,theme:k,type:W,filename:z,monacoEditor:Z,className:Q,style:te,close:$,onClose:ie,hasMask:ae,disabledDownload:re,onImgDimensions:ce,showNodata:oe,recordInfo:he})=>{const[se,pe]=(0,K.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[me,ge]=(0,K.useState)(""),[Ee,Ae]=(0,K.useState)(),Fe=window.ENV==="build"?"/react/build":"",Ue=location.host.startsWith("localhost")?E.Z.PROXY_SERVER:E.Z.API_SERVER,rt=10*(1024*1024),qe=(0,K.useRef)();f!=null&&f.startsWith("/api")&&W!=="txt"&&(f=E.Z.API_SERVER+f);const dt=ht=>ht.substring(ht.lastIndexOf("/")+1).split(".").pop();z&&Z&&(Z.filename=z),(0,K.useEffect)(()=>{var ht,ut;const Mt=(ut=(ht=document.cookie)==null?void 0:ht.replace(/\s/g,""))==null?void 0:ut.split(";");Mt==null||Mt.map(Ce=>{let ot=Ce.split("=");ot[0]==="_educoder_session"&&ge(ot[1])})},[]),(0,K.useEffect)(()=>{W==="office"&&(f.indexOf("bigfilescdn.")>-1||f.indexOf("bigfiles1")>-1?Ae({url:f,fileType:dt(f),model:f.indexOf("model=edit")?"edit":"view"}):je())},[W,f]);function yt(ht){return P(this,null,function*(){ht.data.type==="pdfdata"&&(R(ht.data.data),window.removeEventListener("message",yt,!1)),console.log("mess---:",ht.data)})}const je=()=>P(void 0,null,function*(){console.log("data:",f);let ht=f;f.startsWith("http")||(ht=location.origin+ht);let ut=new URL(ht).pathname.split("/").pop();const Mt=yield(0,y.gJ)({attachment_id:ut});Mt.url=Ue+Mt.url,Ae(Mt)}),at=()=>{if(f.startsWith("http")||f.startsWith("blob:")){it();return}(0,x.Sv)(z||"educoder",f,z)},it=()=>{he&&(0,g.fc)({id:he==null?void 0:he.id,watch_type:1,course_id:he==null?void 0:he.course_id}),(0,x.Nd)(z||"educoder",decodeURIComponent(f))};return m.createElement("div",{style:O({},te||{}),className:`${ae&&ee.bgBlack} ${W?ee.wrp:"hide"}`},$&&m.createElement("div",{className:ee.close,ref:qe},!!ce&&m.createElement(w.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>qe.current},m.createElement("span",{onClick:()=>{ie(),ce()}},m.createElement("i",{className:"icon-yulanpizhu"}))),!re&&m.createElement(w.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>qe.current},m.createElement("span",{onClick:it},m.createElement("i",{className:"icon-quxiaozhiding"}))),D&&m.createElement(w.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>qe.current},m.createElement("span",{className:"",onClick:()=>{const ht=document.getElementById("pdfiframe");window.addEventListener("message",yt,!1),setTimeout(()=>{ht.contentWindow.postMessage("getData","*")},300)}},m.createElement("i",{className:"icon-baocun"}))),m.createElement(w.Z,{title:"\u5173\u95ED",getPopupContainer:()=>qe.current},m.createElement("span",{className:"",onClick:()=>{ie()}},m.createElement("i",{className:"icon-guanbi1"})))),m.createElement("div",{className:`${ee[Q]} ${Q} ${ee.monaco} ${W==="txt"?"show":"hide"}`},W==="txt"&&m.createElement(m.Fragment,null,m.createElement(F.ZP,O({},Z)))),W==="audio"&&m.createElement("audio",{src:`${(f==null?void 0:f.indexOf("http://"))>-1||(f==null?void 0:f.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${f}`,autoPlay:!0}),W==="video"&&m.createElement(m.Fragment,null,(f==null?void 0:f.indexOf("http"))>-1?m.createElement("video",{controls:!0,src:`${f}`,autoPlay:!0}):m.createElement("video",{controls:!0,src:`data:video/mp4;base64,${f}`,autoPlay:!0})),W==="office"&&Ee&&m.createElement("iframe",{src:`${Fe}/office.html?key=${Ee.key}&url=${btoa(Ee.url)}&callbackUrl=${Ue+(Ee.callbackUrl||"")}&fileType=${Ee.fileType}&title=${Ee.title||""}&model=${c}&officeServer=${E.Z.ONLYOFFICE}&disabledDownload=${!!re}`}),W==="html"&&m.createElement("iframe",{src:f+"&disposition=inline"}),W==="pdf"&&m.createElement("iframe",{id:"pdfiframe",src:`${Fe}/js/pdfview/index.html?filename=${z||"educoder.pdf"}&url=${encodeURIComponent(f)}&disabledDownload=${!!re}&model=${c}`}),W==="image"&&m.createElement("img",{src:`${(f==null?void 0:f.indexOf("http://"))>-1||(f==null?void 0:f.indexOf("https://"))>-1?"":"data:image/png;base64,"}${f}`}),(W==="other"||W==="download")&&m.createElement(m.Fragment,null,oe?m.createElement(b.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:m.createElement(G.ZP,{icon:m.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:at,disabled:re},"\u4E0B\u8F7D")}):m.createElement(G.ZP,{type:"primary",size:"middle",onClick:at,disabled:re},m.createElement(_.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},3736:function(we,Me,X){"use strict";X.d(Me,{Z:function(){return v}});var K=X(59301),ee=X(6767),G=X(75727),_=X(30647),F=X(15360),w=X(48790),x=X(56102),y=X(84989),b={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},E=(A,T,O)=>new Promise((P,L)=>{var c=R=>{try{D(O.next(R))}catch(k){L(k)}},f=R=>{try{D(O.throw(R))}catch(k){L(k)}},D=R=>R.done?P(R.value):Promise.resolve(R.value).then(c,f);D((O=O.apply(A,T)).next())});function g(A){if(isNaN(A))return{minutes:"00",seconds:"00"};const T=new Date(A*1e3).toISOString().substr(11,8);return{hour:T.substr(0,2),minutes:T.substr(3,2),seconds:T.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function m(A,T){return A-T}function C(A){A.sort(m);let T=0;for(let O=0;O{},handlePlay:R=()=>{},handlePlayEnded:k=()=>{},autoPlay:W=!1,onPlayEnded:z=()=>{},isShowWaterMark:Z=!0},Q)=>{var te;T=T==null?void 0:T.replace("http://","https://");const ie=((te=T==null?void 0:T.split("."))==null?void 0:te.pop())==="flv",ae=(0,K.useRef)(),re=(0,K.useRef)(),ce=(0,K.useRef)(),oe=(0,K.useRef)(),he=(0,K.useRef)(),se=(0,K.useRef)(),pe=(0,K.useRef)(),me=(0,K.useRef)(),ge=(0,K.useRef)(),Ee=(0,K.useRef)(),Ae=(0,K.useRef)(),Fe=(0,K.useRef)(),Ue=(0,K.useRef)(),nt=(0,K.useRef)(),rt=navigator.userAgent.toLowerCase().match(d),qe=rt?rt[0]:"pc",dt=(0,K.useRef)(!1),yt=(0,w.eY)();let je=0,at=0,it=0,ht=null,ut=!1,Mt=20,Ce=1,ot=!1,Pe=!1,Ne=[];(0,K.useImperativeHandle)(Q,()=>({getLastUpdatedTime:()=>ae.current.currentTime,getDuration:()=>ae.current.duration})),ee.ZP.config({maxCount:1,getContainer:()=>ce.current});const We=(0,K.useCallback)((wt,Dt=!1)=>{let kt={point:ae.current.currentTime};ht?(kt.log_id=ht,kt.watch_duration=C(Ne),kt.total_duration=at):(c?(kt.video_id=parseInt(P,10),kt.course_id=c):kt.video_id=P,kt.duration=je,kt.device=qe),Dt&&(kt.ed="1");function Yt(){return E(this,null,function*(){ot=!0,ht=yield L==null?void 0:L(kt),ot=!1,wt&&wt()})}Yt()},[P,c]);(0,K.useEffect)(()=>{ae.current&&(oe.current.style.display="none",he.current.style.display="block"),ee.ZP.destroy();let wt=null;return _.Z.isSupported&&ie&&T&&(T==null?void 0:T.indexOf(".m3u8"))<0?(wt=_.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:T,muted:!1}),ae.current&&(wt.attachMediaElement(ae.current),wt.load())):ae.current.setAttribute("src",T),Ve(),()=>{wt&&(wt.unload(),wt.pause(),wt.destroy(),wt=null)}},[ae,ie,T]);function Be(){ae.current.paused?(oe.current.style.display="none",he.current.style.display="block"):(oe.current.style.display="block",he.current.style.display="none")}function Ve(){Ae.current.style.display="none",Ue.current.style.display="none",Fe.current.style.display="none",ae.current.muted||ae.current.volume===0?Ae.current.style.display="block":ae.current.volume>0&&ae.current.volume<=.5?Ue.current.style.display="block":Fe.current.style.display="block"}(0,K.useEffect)(()=>{const wt=document.getElementById("play"),Dt=document.querySelectorAll(".playback-icons use");function kt(){R(),f&&!dt.current&&(ae.current.currentTime=f),dt.current=!0,Ne.push(ae.current.currentTime),ut||(ut=!0,O&&We())}function Yt(){return E(this,null,function*(){Be(),Ne.push(ae.current.currentTime),O&&We(()=>{ht=null,it=0,ut=!1,ot=!1,Pe=!1,Ne=[],at=0,Ce=1},!0),z()})}function Wt(){se.current.value=Math.round(ae.current.currentTime),pe.current.value=Math.round(ae.current.currentTime)}function Ot(){const an=g(Math.round(ae.current.currentTime));ge.current.innerText=`${an.hour>0?an.hour+":":""}${an.minutes}:${an.seconds}`,ge.current.setAttribute("datetime",`${an.hour>0?" "+an.hour+" ":""}${an.minutes}m ${an.seconds}s`)}function en(){var an,tn,An,wn,sn,ir,Nt;const zt=Math.round((an=ae.current)==null?void 0:an.duration);(An=(tn=se.current)==null?void 0:tn.setAttribute)==null||An.call(tn,"max",zt),(sn=(wn=pe.current)==null?void 0:wn.setAttribute)==null||sn.call(wn,"max",zt);const Gt=g(zt);me.current&&(me.current.innerText=`${Gt.hour>0?Gt.hour+":":""}${Gt.minutes}:${Gt.seconds}`,(Nt=(ir=me.current).setAttribute)==null||Nt.call(ir,"datetime",`${Gt.hour>0?" "+Gt.hour+" ":""}${Gt.minutes}m ${Gt.seconds}s`))}function vn(){try{const an=Math.round(ae.current.duration);se.current.setAttribute("max",an),pe.current.setAttribute("max",an);const tn=g(an);me.current.innerText=`${tn.hour>0?tn.hour+":":""}${tn.minutes}:${tn.seconds}`,me.current.setAttribute("datetime",`${tn.hour>0?" "+tn.hour+" ":""}${tn.minutes}m ${tn.seconds}s`),Wt(),Ot();const{width:An,height:wn,x:sn,y:ir}=re.current.getBoundingClientRect();if(sn<0||ir<0,!Pe){let Nt=ae.current.currentTime,zt=Nt-it;Math.abs(zt)<10?(at+=Math.abs(zt),it=Nt,ot||at-Ce*Mt>=0&&(Ce++,Ne.push(it),O&&We())):(it=Nt,O&&We())}}catch(an){console.log("videoplaying:",an)}}function Jn(){Pe=!0}function Fn(){ae.current.playing&&Ne.push(ae.current.currentTime,it),it=ae.current.currentTime,Pe=!1}function qn(){je=ae.current.duration,je<=20&&(Mt=je/3),ae.current.addEventListener("play",kt)}function br(an){an.preventDefault(),(0,y.vp)()?(ae.current.style.width="100%",ae.current.style.height="100%"):ae.current.style.cssText=""}function Vn(){D()}function tr(an){if(!A){ee.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const tn=an.target.dataset.seek?an.target.dataset.seek:an.target.value;ae.current.currentTime=tn,pe.current.value=tn,se.current.value=tn}function lr(an){const tn=Math.round(an.offsetX/an.target.clientWidth*parseInt(an.target.getAttribute("max"),10));se.current.setAttribute("data-seek",tn);const An=g(tn);Ee.current.textContent=`${An.hour>0?An.hour+":":""}${An.minutes}:${An.seconds}`;const wn=ae.current.getBoundingClientRect();Ee.current.style.left=`${an.pageX-wn.left}px`}function nr(an){switch(an.code){case"Space":an.preventDefault(),pt();break;case"ArrowRight":if(an.preventDefault(),!A){ee.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(ae.current.currentTime>=ae.current.duration)break;ae.current.currentTime=parseInt(ae.current.currentTime)+5,Wt();break;case"ArrowLeft":if(an.preventDefault(),!A){ee.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(ae.current.currentTime===0)break;ae.current.currentTime=parseInt(ae.current.currentTime)-5,Wt();break;case"ArrowUp":an.preventDefault(),ae.current.volume<1&&(ae.current.volume=(parseInt(ae.current.volume*10)+1)/10);break;case"ArrowDown":an.preventDefault(),ae.current.volume>0&&(ae.current.volume=(parseInt(ae.current.volume*10)-1)/10);break}}return ce.current.addEventListener((0,y.gH)(),br),ae.current.addEventListener("canplay",qn),ae.current.addEventListener("ended",Yt),ae.current.addEventListener("seeking",Jn),ae.current.addEventListener("seeked",Fn),ae.current.addEventListener("loadedmetadata",en),se.current.addEventListener("mousemove",lr),se.current.addEventListener("input",tr),ae.current.addEventListener("timeupdate",vn),ae.current.addEventListener("pause",Vn),ae.current.addEventListener("volumechange",Ve),document.addEventListener("keydown",nr),()=>{var an,tn,An,wn,sn,ir,Nt,zt,Gt,jt,En,_e;(an=ae.current)==null||an.removeEventListener("canplay",qn),(tn=ae.current)==null||tn.removeEventListener("play",kt),(An=ae.current)==null||An.removeEventListener("ended",Yt),(wn=ae.current)==null||wn.removeEventListener("seeking",Jn),(sn=ae.current)==null||sn.removeEventListener("seeked",Fn),(ir=se.current)==null||ir.removeEventListener("mousemove",lr),(Nt=se.current)==null||Nt.removeEventListener("input",tr),(zt=ae.current)==null||zt.removeEventListener("timeupdate",vn),(Gt=ae.current)==null||Gt.removeEventListener("pause",Vn),(jt=ae.current)==null||jt.removeEventListener("loadedmetadata",en),(En=ae.current)==null||En.removeEventListener("volumechange",Ve),document.removeEventListener("keydown",nr),(_e=ae.current)!=null&&_e.playing&&(Ne.push(it,ae.current.currentTime),O&&We())}},[ae,T]),(0,K.useEffect)(()=>{if(ae.current.onended=()=>{k(ae)},ae.current.oncontextmenu=()=>!1,(T==null?void 0:T.indexOf(".m3u8"))>-1){if(ae.current.canPlayType("application/vnd.apple.mpegurl"))ae.current.src=T;else if(F.ZP.isSupported()){var wt=new F.ZP;wt.loadSource(T),wt.attachMedia(ae.current)}}},[T]);const[$e,lt]=(0,K.useState)(1),pt=()=>{ae.current.paused||ae.current.ended?ae.current.play():ae.current.pause(),Be()};function xt(){ae.current.muted=!ae.current.muted,ae.current.muted?(nt.current.setAttribute("data-volume",volume.value),nt.current.value=0):nt.current.value=nt.current.dataset.volume}return K.createElement("div",{style:{position:"relative"},ref:ce},K.createElement("div",{ref:re,className:`${b.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${b.animate__loop}`},Z&&yt?yt.login:" "),K.createElement("div",{className:b.container},K.createElement("div",{className:b["video-container"],id:"video-container"},K.createElement("div",{className:b["playback-animation"],id:"playback-animation"},K.createElement("svg",{className:b["playback-icons"]},K.createElement("use",{className:"hidden",href:"#play-icon"}),K.createElement("use",{href:"#pause"}))),K.createElement("video",{className:b.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:ae,autoPlay:W}),K.createElement("div",{className:`${b["video-controls"]} `,id:"video-controls"},K.createElement("div",{className:b["bottom-controls"]},K.createElement("div",{className:b["left-controls"]},K.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:pt},K.createElement("svg",{className:b["playback-icons"]},K.createElement("use",{ref:he,href:"#play-icon"}),K.createElement("use",{ref:oe,style:{display:"none"},href:"#pause"}))),K.createElement("div",{className:b.time},K.createElement("time",{id:"time-elapsed",ref:ge},"00:00"),K.createElement("span",null," / "),K.createElement("time",{id:"duration",ref:me},"00:00"))),K.createElement("div",{className:b["right-controls"]},A&&K.createElement(G.Z,{placement:"top",overlayClassName:b.rateOverlay,getPopupContainer:wt=>wt.parentNode,menu:{items:[{key:"1",label:K.createElement("span",{onClick:()=>{lt(1),ae.current.playbackRate=1}},"1.0x")},{key:"2",label:K.createElement("span",{onClick:()=>{lt(1.5),ae.current.playbackRate=1.5}},"1.5x")},{key:"3",label:K.createElement("span",{onClick:()=>{lt(2),ae.current.playbackRate=2}},"2.0x")}]}},K.createElement("div",{className:`${b.controlText} mr5`},"\u500D\u901F")),K.createElement(x.CopyToClipboard,{text:T,onCopy:()=>ee.ZP.success("\u590D\u5236\u6210\u529F")},K.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},K.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),K.createElement("div",{className:b["volume-controls"]},K.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:b["volume-button"],id:"volume-button",onClick:xt},K.createElement("i",{ref:Ae,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),K.createElement("i",{ref:Ue,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),K.createElement("i",{ref:Fe,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),K.createElement("input",{className:b.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:nt,style:{display:"none"},onClick:Ve})),K.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:b["fullscreen-button"],onClick:()=>{(0,y.vp)()?(0,y.BU)():(0,y.Dj)(ce.current)}},K.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),K.createElement("div",{className:b["video-progress"]},K.createElement("progress",{ref:pe,value:"0",min:"0"}),K.createElement("input",{className:b.seek,ref:se,value:"0",min:"0",type:"range",step:"1"}),K.createElement("div",{className:b["seek-tooltip"],ref:Ee,id:"seek-tooltip"},"00:00"))))),K.createElement("svg",{style:{display:"none"}},K.createElement("defs",null,K.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},K.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),K.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},K.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),K.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},K.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),K.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},K.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),K.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},K.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),K.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},K.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),K.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},K.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),K.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},K.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},75975:function(we,Me,X){"use strict";X.d(Me,{SV:function(){return ot},ZP:function(){return Ce}});var K=X(59301),ee=X(76374);const G={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},_={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},F={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},w={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},x={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(` `)}]};var y=X(53184),b=X.n(y),E=Object.defineProperty,g=Object.defineProperties,m=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,A=(Pe,Ne,We)=>Ne in Pe?E(Pe,Ne,{enumerable:!0,configurable:!0,writable:!0,value:We}):Pe[Ne]=We,T=(Pe,Ne)=>{for(var We in Ne||(Ne={}))d.call(Ne,We)&&A(Pe,We,Ne[We]);if(C)for(var We of C(Ne))v.call(Ne,We)&&A(Pe,We,Ne[We]);return Pe},O=(Pe,Ne)=>g(Pe,m(Ne)),P=(Pe,Ne,We)=>new Promise((Be,Ve)=>{var $e=xt=>{try{pt(We.next(xt))}catch(wt){Ve(wt)}},lt=xt=>{try{pt(We.throw(xt))}catch(wt){Ve(wt)}},pt=xt=>xt.done?Be(xt.value):Promise.resolve(xt.value).then($e,lt);pt((We=We.apply(Pe,Ne)).next())});const L={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},c=(Pe,Ne)=>Ne.map(We=>({label:We,kind:Pe.languages.CompletionItemKind.Keyword,insertText:We})),f=Pe=>Object.keys(L.tables).map(Ne=>({label:Ne,kind:Pe.languages.CompletionItemKind.Variable,insertText:Ne})),D=(Pe,Ne)=>{const We=L.tables[Pe];return We?We.map(Be=>({label:Be,kind:Ne.languages.CompletionItemKind.Field,insertText:Be})):[]};function R(Pe,Ne,We,Be,Ve){let $e=Ne.getWordUntilPosition(We),lt={startLineNumber:We.lineNumber,endLineNumber:We.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},pt=Be.map(xt=>({label:xt,kind:Pe.languages.CompletionItemKind.Keyword,insertText:xt,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:lt}));return Ve.map(xt=>{pt.push(O(T({},xt),{range:lt}))}),pt}var k=Pe=>{L.languages.map(Ve=>(Pe.languages.registerDocumentFormattingEditProvider(Ve,{provideDocumentFormattingEdits($e,lt,pt){return P(this,null,function*(){const xt=b()($e.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:$e.getFullModelRange(),text:xt}]})}}),Ve));const Ne=F.quickKey.map(Ve=>({label:Ve.label,kind:Pe.languages.CompletionItemKind.Method,insertText:Ve.content,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),We=w.quickKey.map(Ve=>({label:Ve.label,kind:Pe.languages.CompletionItemKind.Method,insertText:Ve.content,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Be=_.quickKey.map(Ve=>({label:Ve.label,kind:Pe.languages.CompletionItemKind.Method,insertText:Ve.content,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Pe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ve,$e){var lt=Ve.getWordUntilPosition($e),pt={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:lt.startColumn,endColumn:lt.endColumn},xt=Ve.getLineContent($e.lineNumber).substring(lt.startColumn-2,lt.endColumn);return{suggestions:[...F.keywords.map(wt=>({label:wt,kind:Pe.languages.CompletionItemKind.Function,documentation:wt,insertText:wt,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt})),...F.quickKey.map(wt=>({label:wt.label,kind:Pe.languages.CompletionItemKind.Function,documentation:wt.content,insertText:xt.startsWith("#")?wt.content.replace(/#/,""):wt.content,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt}))]}}}),Pe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ve,$e){var lt=Ve.getWordUntilPosition($e),pt={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:lt.startColumn,endColumn:lt.endColumn};return{suggestions:[...G.keywords.map(xt=>({label:xt,kind:Pe.languages.CompletionItemKind.Function,documentation:xt,insertText:xt,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt}))]}}}),Pe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ve,$e){var lt=Ve.getWordUntilPosition($e),pt={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:lt.startColumn,endColumn:lt.endColumn},xt=Ve.getLineContent($e.lineNumber).substring(lt.startColumn-2,lt.endColumn);return{suggestions:[..._.keywords.map(wt=>({label:wt,kind:Pe.languages.CompletionItemKind.Function,documentation:wt,insertText:wt,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt})),..._.quickKey.map(wt=>({label:wt.label,kind:Pe.languages.CompletionItemKind.Function,documentation:wt.content,insertText:xt.startsWith("#")?wt.content.replace(/#/,""):wt.content,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt}))]}}}),Pe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ve,$e){var lt=Ve.getWordUntilPosition($e),pt={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:lt.startColumn,endColumn:lt.endColumn},xt=Ve.getLineContent($e.lineNumber).substring(lt.startColumn-2,lt.endColumn);return{suggestions:[...x.keywords.map(wt=>({label:wt,kind:Pe.languages.CompletionItemKind.Function,documentation:wt,insertText:wt,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt})),...x.quickKey.map(wt=>({label:wt.label,kind:Pe.languages.CompletionItemKind.Function,documentation:wt.content,insertText:xt.startsWith("#")?wt.content.replace(/#/,""):wt.content,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt}))]}}}),Pe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ve,$e){var lt=Ve.getWordUntilPosition($e),pt={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:lt.startColumn,endColumn:lt.endColumn},xt=Ve.getLineContent($e.lineNumber).substring(lt.startColumn-2,lt.endColumn);return{suggestions:[...w.keywords.map(wt=>({label:wt,kind:Pe.languages.CompletionItemKind.Function,documentation:wt,insertText:wt,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt})),...w.quickKey.map(wt=>({label:wt.label,kind:Pe.languages.CompletionItemKind.Function,documentation:wt.content,insertText:xt.startsWith("#")?wt.content.replace(/#/,""):wt.content,insertTextRules:Pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pt}))]}}})};const W="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var z=Object.defineProperty,Z=(Pe,Ne,We)=>Ne in Pe?z(Pe,Ne,{enumerable:!0,configurable:!0,writable:!0,value:We}):Pe[Ne]=We,Q=(Pe,Ne,We)=>Z(Pe,typeof Ne!="symbol"?Ne+"":Ne,We);const te=class b2{constructor(Ne,We,Be){this.placeholder=Ne,this.editor=We,this.monaco=Be,We.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return b2.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};Q(te,"ID","editor.widget.placeholderHint");var ie=te,ae=X(96236),re=X(6767),ce=X(25399),oe=X(89392),he=X(49535),se=X(56102),pe=Object.defineProperty,me=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Ue=(Pe,Ne,We)=>Ne in Pe?pe(Pe,Ne,{enumerable:!0,configurable:!0,writable:!0,value:We}):Pe[Ne]=We,nt=(Pe,Ne)=>{for(var We in Ne||(Ne={}))Ae.call(Ne,We)&&Ue(Pe,We,Ne[We]);if(Ee)for(var We of Ee(Ne))Fe.call(Ne,We)&&Ue(Pe,We,Ne[We]);return Pe},rt=(Pe,Ne)=>me(Pe,ge(Ne)),qe=(Pe,Ne)=>{var We={};for(var Be in Pe)Ae.call(Pe,Be)&&Ne.indexOf(Be)<0&&(We[Be]=Pe[Be]);if(Pe!=null&&Ee)for(var Be of Ee(Pe))Ne.indexOf(Be)<0&&Fe.call(Pe,Be)&&(We[Be]=Pe[Be]);return We},dt=(Pe,Ne,We)=>new Promise((Be,Ve)=>{var $e=xt=>{try{pt(We.next(xt))}catch(wt){Ve(wt)}},lt=xt=>{try{pt(We.throw(xt))}catch(wt){Ve(wt)}},pt=xt=>xt.done?Be(xt.value):Promise.resolve(xt.value).then($e,lt);pt((We=We.apply(Pe,Ne)).next())});function yt(Pe){return/^\d+$/.test(Pe)?`${Pe}px`:Pe}function je(){}let at=!1;const it={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function ht(Pe=[]){let Ne=Pe;if(Array.isArray(Pe)){for(let We=0;Wedt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Pe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Pe)}});var Ce=Pe=>{var Ne=Pe,{width:We="100%",height:Be="100%",value:Ve,language:$e="javascript",style:lt={},options:pt={},overrideServices:xt={},theme:wt="vs-dark",onEditBlur:Dt,isCopy:kt=!1,onSave:Yt,autoHeight:Wt=!1,forbidCopy:Ot=!1,onChange:en=je,editorDidMount:vn=je,onFocus:Jn=je,onBreakPoint:Fn=je,breakPointValue:qn=[],filename:br="educoder.txt",errorLine:Vn,errorContent:tr="",highlightLine:lr,openBreakPoint:nr=!1,placeholder:an="",showMiniMap:tn=!0}=Ne,An=qe(Ne,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const wn=(0,K.useRef)(),sn=(0,K.useRef)({}),ir=(0,K.useRef)(),Nt=(0,K.useRef)(),zt=(0,K.useRef)([]),Gt=(0,K.useRef)(!1),jt=(0,K.useRef)(),En=(0,K.useRef)(),_e=(0,K.useRef)(!1),[M,B]=(0,K.useState)(!1);function I(){let Ze;return wn.current&&(Ze=new ee.Z(tt=>{for(let mt of tt)(mt.target.offsetHeight>0||mt.target.offsetWidth>0)&&sn.current.instance.layout()}),Ze.observe(wn.current)),Ze}function j(){re.ZP.warning({content:decodeURIComponent(W),key:"monaco-editor-tip"})}const J=()=>{let Ze=sn.current.instance;if(Ve!=null&&Ze&&M){const tt=Ze.getModel();tt&&Ve!==tt.getValue()&&(at=!0,tt.setValue(Ve),Ze.layout(),at=!1)}};(0,K.useEffect)(()=>{const Ze=he.Z.subscribe("formatDocument",tt=>{var mt;let Tt=sn.current.instance;(mt=Tt==null?void 0:Tt.getAction)==null||mt.call(Tt,"editor.action.formatDocument").run()});return window.updateMonacoValue=tt=>{en(tt)},Ze},[]),(0,K.useEffect)(()=>{var Ze;let tt=sn.current.instance;Nt.current&&clearTimeout(Nt.current),Nt.current=setTimeout(()=>{J()},500),Ve&&(Ve!=null&&Ve.length)&&((Ze=tt==null?void 0:tt.updateOptions)==null||Ze.call(tt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ve.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ve,M,sn.current]),(0,K.useEffect)(()=>{if(Vn&&sn.current&&sn.current.instance){let tt=sn.current.instance;tt.changeViewZones(function(mt){var Tt=document.createElement("div");Tt.style.padding="10px 20px",Tt.style.width="calc(100% - 20px)",Tt.className="my-error-line-wrp",Tt.innerHTML=tr,mt.addZone({afterLineNumber:Vn||11,heightInLines:3,domNode:Tt})});var Ze={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};tt.addOverlayWidget(Ze),tt.revealPositionInCenter({lineNumber:20,column:1})}},[Vn,sn.current,M]);const ye=(Ze="",tt)=>{if(!Ze||Ze.trim()==="")return!0;const Tt=sn.current.instance.getModel().getLineTokens(tt);let It=!1;for(let vt=0;vt<2;vt++)Tt.getStandardTokenType(vt)===1&&(It=!0);return It};(0,K.useEffect)(()=>{var Ze;const tt=(Ze=sn.current)==null?void 0:Ze.instance;if(tt&&M&&Ot){const mt=tt.onDidBlurEditorWidget(()=>{_e.current=!1}),Tt=tt.onDidFocusEditorText(()=>{_e.current=!0});return()=>{mt.dispose(),Tt.dispose()}}},[sn.current,M,Ot]),(0,K.useEffect)(()=>{var Ze;if((Ze=sn.current)!=null&&Ze.instance&&M&&nr){let tt=sn.current.instance,mt=tt.getModel();if(!mt)return;(()=>{var Zt;let Jt=[],Xt=[];const dn=mt.getAllDecorations();for(let Mn of dn)Mn.options.className==="highlighted-line"&&(Jt.push((Zt=Mn==null?void 0:Mn.range)==null?void 0:Zt.startLineNumber),Xt.push(Mn==null?void 0:Mn.id));if(lr===Jt[0])return;mt.deltaDecorations(Xt,[]);const gn=mt.getLineCount();lr&&lr<=gn&&(tt.deltaDecorations([],[{range:new ut.Range(lr,1,lr,mt.getLineMaxColumn(lr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),tt.revealLineInCenter(lr))})();const It=(Zt=!1)=>{var Jt;let Xt=[],dn=[];const gn=mt.getAllDecorations();for(let Mn of gn)Mn.options.linesDecorationsClassName==="breakpoints-select"&&(Xt.push((Jt=Mn==null?void 0:Mn.range)==null?void 0:Jt.startLineNumber),dn.push(Mn==null?void 0:Mn.id));if(Zt)return{lines:Xt,ids:dn};Fn(Xt)},vt=Zt=>dt(void 0,null,function*(){let Jt={range:new ut.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield mt.deltaDecorations([],[Jt]),It()}),Rt=Zt=>dt(void 0,null,function*(){let Jt=[];const Xt=tt.getLineDecorations(Zt);for(let dn of Xt)dn.options.linesDecorationsClassName==="breakpoints-select"&&Jt.push(dn.id);yield mt.deltaDecorations(Jt,[]),It()}),Bt=Zt=>{let Jt=tt.getLineDecorations(Zt);for(let Xt of Jt)if(Xt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,oe.isEqual)(qn,It(!0).lines)){mt.deltaDecorations(It(!0).ids,[]);const Zt=qn.map(Jt=>({range:new ut.Range(Jt,1,Jt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));mt.deltaDecorations([],Zt)}const Qe=tt.onDidChangeModelContent(Zt=>{let Jt=tt.getPosition();if(Jt){let Xt=Jt.lineNumber;clearTimeout(En.current),En.current=setTimeout(()=>{ye(mt.getLineContent(Xt),Xt)?Rt(Xt):Bt(Xt)?(Rt(Xt),vt(Xt)):It()},100)}}),gt=tt.onMouseDown(Zt=>{var Jt,Xt,dn;if(Zt.target.detail&&((dn=(Xt=(Jt=Zt.target)==null?void 0:Jt.element)==null?void 0:Xt.className)!=null&&dn.includes("line-numbers"))){let gn=Zt.target.position.lineNumber;if(ye(mt.getLineContent(gn),gn))return;Bt(gn)?Rt(gn):vt(gn)}}),Pt=Zt=>{let Jt={range:new ut.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};zt.current=tt.deltaDecorations(zt.current,[Jt])},St=()=>{zt.current=tt.deltaDecorations(zt.current,[])},on=tt.onMouseMove(Zt=>{var Jt,Xt,dn;if(St(),Zt.target.detail&&((dn=(Xt=(Jt=Zt.target)==null?void 0:Jt.element)==null?void 0:Xt.className)!=null&&dn.includes("line-numbers"))){let gn=Zt.target.position.lineNumber;if(ye(mt.getLineContent(gn),gn))return;Pt(gn)}}),ln=tt.onMouseLeave(()=>{St()});return()=>{Qe.dispose(),gt.dispose(),on.dispose(),ln.dispose()}}},[sn.current,M,qn,lr,nr,$e]),(0,K.useEffect)(()=>{var Ze;(Ze=sn.current)!=null&&Ze.instance&&nr&&sn.current.instance.setPosition({lineNumber:0,column:0})},[lr]);function be(){let Ze=sn.current.instance;if(Ze){const tt=Ze.getSelection(),mt=sn.current.pastePos||{},Tt=new ut.Range(mt.startLineNumber||tt.endLineNumber,mt.startColumn||tt.endColumn,mt.endLineNumber||tt.endLineNumber,mt.endColumn||tt.endColumn);setTimeout(()=>{Ze.executeEdits("",[{range:Tt,text:""}])},300)}}function Le(Ze){(window.navigator.platform.match("Mac")?Ze.metaKey:Ze.ctrlKey)&&Ze.keyCode==83&&(Ze.preventDefault(),Yt())}const Se=()=>{if(Wt&&sn.current.instance){const Ze=sn.current.instance.getContentHeight();Je(Ze{if(!_e.current)return;const{keyCode:tt,ctrlKey:mt,metaKey:Tt,target:It,type:vt}=Ze;return(vt==="paste"||(tt===67||tt===86)&&(Tt||mt))&&It.nodeName==="TEXTAREA"&&(j(),Ze.preventDefault()),!1};function Re(Ze,tt){var mt=window.URL||window.webkitURL||window,Tt=new Blob([tt]),It=document.createElementNS("http://www.w3.org/1999/xhtml","a");It.href=mt.createObjectURL(Tt),It.download=Ze,Ye(It)}(0,K.useEffect)(()=>{Se()},[Se]),(0,K.useEffect)(()=>{wn.current&&!M&&Promise.all([X.e(8909),X.e(6656)]).then(X.bind(X,71448)).then(Ze=>{try{ut=Ze,sn.current.instance=ut.editor.create(wn.current,{value:Ve,language:ht($e),theme:wt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:tn||!1}},xt);const tt=sn.current.instance;let It=[...ae.BH._menuItems].find(Qe=>Qe[0]._debugName=="EditorContext")[1],vt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Rt=(Qe,gt)=>{var Pt,St;let on=Qe._first;do gt.includes((St=(Pt=on.element)==null?void 0:Pt.command)==null?void 0:St.id)&&Qe._remove(on);while(on=on.next)};if(vn(tt,ut),setTimeout(()=>{Se(),sn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Re(br||"educoder.txt",tt.getValue())}})},500),sn.current.subscription=tt.onDidChangeModelContent(Qe=>{Gt.current?clearTimeout(jt.current):(Se(),en(tt.getValue(),Qe)),jt.current=setTimeout(()=>{Gt.current=!1},500)}),window.Monaco||k(ut,ht($e)),Ot&&(Rt(It,vt),wn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ge),window.removeEventListener("paste",Ge),window.addEventListener("keydown",Ge),window.addEventListener("paste",Ge)),window.Monaco=ut,Dt&&tt.onDidBlurEditorWidget(()=>{Dt(tt.getValue())}),Jn&&tt.onDidFocusEditorText(()=>{Ot&&Mt(),Jn(tt.getValue())}),Ot){Mt();try{tt.onDidPaste(Qe=>{const gt=tt.getSelection(),Pt=sn.current.pastePos||{},St=new ut.Range(Pt.startLineNumber||gt.endLineNumber,Pt.startColumn||gt.endColumn,Pt.endLineNumber||gt.endLineNumber,Pt.endColumn||gt.endColumn);tt.executeEdits("",[{range:Qe.range,text:""}])})}catch(Qe){}}let Bt=I();return an&&typeof an=="string"&&new ie(an,tt,ut),B(!0),()=>{const Qe=sn.current.instance;Qe.dispose();const gt=Qe.getModel();gt&>.dispose(),sn.current.subscription&&sn.current.subscription.dispose(),Bt.unobserve(wn.current)}}catch(tt){}})},[]),(0,K.useEffect)(()=>{if(sn.current.instance&&M)return document.addEventListener("keydown",Le,!1),()=>{document.removeEventListener("keydown",Le)}},[Yt,M]),(0,K.useEffect)(()=>{let Ze=sn.current.instance;if(Ze&&M){let tt=ht($e);ut.editor.setModelLanguage(Ze.getModel(),tt)}},[$e,M]),(0,K.useEffect)(()=>{sn.current.instance&&M&&ut.editor.setTheme(wt)},[wt,M]),(0,K.useEffect)(()=>{let Ze=sn.current.instance;ir.current=pt,Ze&&M&&(Ze.updateOptions(nt({},pt)),setTimeout(()=>{Ze.getModel().updateOptions(nt({},pt))},200))},[JSON.stringify(pt),M]),(0,K.useEffect)(()=>{let Ze=sn.current.instance;Ze&&M&&Ze.layout()},[We,Be,M]);const[De,Ke]=(0,K.useState)(yt(We)),[He,Je]=(0,K.useState)(yt(Be)),ke=rt(nt({},lt),{width:De,height:He,position:"relative"});return K.createElement("div",{className:"my-monaco-editor",ref:wn,style:ke},kt&&K.createElement(se.CopyToClipboard,{text:Ve,onCopy:()=>re.ZP.success("\u590D\u5236\u6210\u529F")},K.createElement(ce.Z,{title:"\u590D\u5236\u4EE3\u7801"},K.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},K.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ot({width:Pe="100%",height:Ne="100%",original:We,modified:Be,language:Ve,options:$e={}}){const lt=(0,K.useRef)(),[pt,xt]=(0,K.useState)(null);function wt(Wt){let Ot;return lt.current&&(Ot=new ee.Z(en=>{for(let vn of en)(vn.target.offsetHeight>0||vn.target.offsetWidth>0)&&Wt.layout()}),Ot.observe(lt.current)),Ot}(0,K.useEffect)(()=>(lt.current&&Promise.all([X.e(8909),X.e(9404)]).then(X.bind(X,2550)).then(Wt=>{ut=Wt;const Ot=ut.editor.createDiffEditor(lt.current,rt(nt({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},$e),{wordWrap:!0}));xt(Ot);let en=wt(Ot);return()=>{Ot.dispose();const vn=Ot.getModel();vn&&vn.dispose(),en.unobserve(lt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,K.useEffect)(()=>{pt&&pt.setModel({original:ut.editor.createModel(We,Ve),modified:ut.editor.createModel(Be,Ve)})},[We,Be,Ve,pt]);const Dt=yt(Pe),kt=yt(Ne),Yt={width:Dt,height:kt};return K.createElement("div",{className:"my-diff-editor",ref:lt,style:Yt})}},10661:function(we,Me,X){"use strict";X.d(Me,{Z:function(){return g}});var K={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},ee=X(29787),G=X(25399),_=X(92310),F=X.n(_),w=X(51257),x=X(28426),y=X(48790),b=X(59301),g=({className:m,dataSource:C=[],col:d=4,right:v,bottom:A=23,precision:T=0,wrapWidth:O=1200,trackEventItems:P,loading:L,onRemove:c=()=>{},isCurrent:f=!0,showAlias:D=!1})=>{const R=Math.floor((O-(d-1)*v)/d),k=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return b.createElement(ee.Z,{spinning:L},b.createElement("div",{className:F()(K.list,m)},!!(C!=null&&C.length)&&(C==null?void 0:C.map((W,z)=>{var Z;const{name:Q,id:te,identifier:$,featured:ie,school_name:ae,image_url:re,excellent:ce,is_plan:oe}=W;return b.createElement("div",{key:te,className:K.wrap,style:{width:R,marginRight:(1+z)%d===0?0:v+T,marginBottom:A}},b.createElement("a",{className:K.li,onClick:he=>{he.preventDefault(),he.stopPropagation(),P&&(0,w.L9)([P]),(0,w.xg)(`/paths/${$}`)}},b.createElement("div",{className:K.img},b.createElement("img",{className:K.cover,src:`${re}`}),f&&(0,y.bg)()&&(W==null?void 0:W.studying)&&b.createElement("div",{className:`${K.movebq} user-path-items`,onClick:he=>{he.stopPropagation(),c(W)}},b.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),b.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Z=W==null?void 0:W.subject_tags)==null?void 0:Z.map((he,se)=>{var pe,me;if(se===0){const Ee=(pe=k.find(Ae=>Ae.name==he))==null?void 0:pe.swimg;return b.createElement("img",{className:K.sign,src:Ee,style:{left:"-4px"}})}const ge=(me=k.find(Ee=>Ee.name==he))==null?void 0:me.ptimg;return b.createElement("img",{className:K.sign,src:ge,style:{left:`${48+52*(se-1)+2*se}px`}})}),b.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(W==null?void 0:W.excellent)&&b.createElement("div",{className:K.bq},"\u5F00\u653E\u8BFE\u7A0B"))),b.createElement("div",{className:K.name},b.createElement(G.Z,{title:D&&(W!=null&&W.excellent_alias_name)?b.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Q}`,b.createElement("br",null),b.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${W==null?void 0:W.excellent_alias_name}`)):Q},b.createElement("span",{className:K.e},D&&(W==null?void 0:W.excellent_alias_name)||Q))),b.createElement(G.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ae}`},b.createElement("div",{className:K.unit},b.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ae)),b.createElement("div",{className:K.tags},b.createElement("div",null,b.createElement(G.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},b.createElement("span",null,b.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),b.createElement("span",null,W.stages_count))),b.createElement(G.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},b.createElement("span",null,b.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),b.createElement("span",null,W.members_count)))))))})),!C.length&&b.createElement(x.Z,null)))}},9148:function(we,Me,X){"use strict";X.d(Me,{jL:function(){return F},w9:function(){return pe},QD:function(){return Dt},cQ:function(){return re.Z},op:function(){return Ve},O5:function(){return ir},_b:function(){return vn},t7:function(){return O},Gi:function(){return Ue},YG:function(){return Ae},qp:function(){return g},vr:function(){return Wt},qE:function(){return pt},Je:function(){return c},wb:function(){return ae},cq:function(){return je},tp:function(){return d}});var K=X(59301),ee={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},G="data:image/png;base64,iVBORw0KGg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sL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",F=({dataSource:Nt=[],img:zt,imgWidth:Gt=346,title:jt,sunTitle:En,bannerExtraContent:_e})=>K.createElement("div",{className:ee.banner},K.createElement("div",{className:ee.content},K.createElement("aside",null,K.createElement("p",null,K.createElement("b",null,jt),K.createElement("span",null,En)),Nt.length>0&&K.createElement("div",{className:ee.btns},Nt.map((M,B)=>K.createElement("div",{key:B,onClick:M.click},M.name,M.sign?K.createElement("img",{src:G,width:39}):null))),_e),zt&&K.createElement("img",{style:{marginTop:33,marginRight:38},src:zt,width:Gt}))),w={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},x=X(92310),y=X.n(x),b=X(89392),g=({dataSource:Nt=[],value:zt,onChange:Gt,onTitleChange:jt,className:En,title:_e,titleWidth:M=41,style:B={},fontColor:I="#6A7283",showCount:j})=>{const[J,ye]=(0,K.useState)(0),[be,Le]=(0,K.useState)(!1),Se=(0,K.useRef)(null),Ye=(0,K.useRef)(null);return(0,K.useEffect)(()=>{var Ge;Nt.length!==0&&(((Ge=Se==null?void 0:Se.current)==null?void 0:Ge.clientHeight)>97?ye(1):ye(0)),Nt.length===0&&ye(0),Le(!1)},[Nt]),K.createElement("div",{className:y()(w.row,En),style:B},K.createElement("div",{onClick:(0,b.throttle)(()=>jt==null?void 0:jt(),2e3),style:{width:M,marginTop:be?12:4},className:`${w.title} ${jt?"current":""}`},_e),K.createElement("div",{className:be?`${w.tagsWrap} ${w.tagsBorderWrap}`:w.tagsWrap},K.createElement("div",{className:w.bar,ref:Ye,style:J>0?{height:J===1?97:"auto",overflow:J===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},K.createElement("div",{className:w.tag,ref:Se},Nt==null?void 0:Nt.map(Ge=>K.createElement("span",{onClick:()=>Gt(Ge.id),key:Ge.id,style:{color:I},className:zt===Ge.id?w.active:""},K.createElement("span",{title:Ge.name,className:w.name},Ge.name),!!j&&K.createElement("span",{className:w.num},Ge.count))))),!!J&&K.createElement(K.Fragment,null,J===1?K.createElement("div",{onClick:()=>{var Ge;ye(2),((Ge=Se==null?void 0:Se.current)==null?void 0:Ge.clientHeight)>245?Le(!0):Le(!1)},className:w.action},"\u5C55\u5F00",K.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):K.createElement("div",{onClick:()=>{Ye.current.scrollTop=0,ye(1),Le(!1)},className:w.action},"\u6536\u8D77",K.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},m={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},d=({dataSource:Nt=[],value:zt,onChange:Gt,className:jt,style:En={}})=>K.createElement("div",{style:En,className:y()(m.tabs,jt)},Nt.map(_e=>K.createElement("span",{onClick:()=>Gt(_e.id),className:zt===_e.id?m.active:"",key:_e.id},_e.name))),v={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},A=X(37568),O=({dataSource:Nt=[],value:zt="",onChange:Gt,onInputChange:jt=()=>{},className:En,style:_e={},placeholder:M,allowClear:B=!1})=>{var I;const[j,J]=(0,K.useState)(""),[ye,be]=(0,K.useState)("");(0,K.useEffect)(()=>{var Ye;let Ge=zt;(Ye=JSON.stringify(zt))!=null&&Ye.includes("{")&&(J(zt.id),Ge=zt.value||"");try{be(decodeURIComponent(Ge||""))}catch(Re){be(decodeURIComponent(Ge||""))}},[zt]);const Le=()=>{Gt(encodeURIComponent(ye),j||null)},Se=Ye=>{Ye!==j&&(J(Ye),Gt(encodeURIComponent(ye),Ye))};return K.createElement("div",{className:y()(v.input,En),style:_e},!!Nt.length&&K.createElement("div",{className:v.dropdown},K.createElement("div",{className:v.text},(I=Nt.find(Ye=>Ye.id===j))==null?void 0:I.name,K.createElement("i",{className:"iconfont icon-zhankai4"}),K.createElement("b",{className:v.b1}),K.createElement("b",{className:v.b2})),K.createElement("div",{className:v.menu},Nt.map((Ye,Ge)=>K.createElement("div",{key:Ge,onClick:()=>Se(Ye.id)},Ye.name)))),K.createElement(A.default,{onPressEnter:Le,value:ye,onChange:Ye=>{be(Ye.target.value),jt(encodeURIComponent(Ye.target.value),j||null)},bordered:!1,placeholder:M}),K.createElement("i",{onClick:Le,className:"iconfont icon-sousuo9 font14 pl10 current"}))},P={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},c=({value:Nt,onChange:zt,className:Gt,total:jt,pageSize:En,style:_e={}})=>{const M=Nt<2,B=Nt>=Math.ceil(jt/En);return jt<=En?K.createElement(K.Fragment,null):K.createElement("div",{className:y()(P.quickPager,Gt),style:_e},K.createElement("div",{onClick:()=>{M||zt(Nt-1,"prev")},className:M?P.disabled:""},"\u4E0A\u4E00\u9875"),K.createElement("div",{onClick:()=>{B||zt(Nt+1,"next")},className:B?P.disabled:""},"\u4E0B\u4E00\u9875"))},f={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},D=X(29787),R=X(25399),k=X(58018),W=X(346),z=X(51257),Z=X(96908),Q=X(57177),te=X(81378),$=X(28426),ae=({className:Nt,dataSource:zt=[],col:Gt=4,right:jt,bottom:En=23,precision:_e=0,wrapWidth:M=1200,trackEventItems:B,loading:I})=>{const j=Math.floor((M-(Gt-1)*jt)/Gt);return K.createElement(D.Z,{spinning:I},K.createElement("div",{className:y()(f.list,Nt)},!!zt.length&&zt.map((J,ye)=>{const{name:be,id:Le,identifier:Se,power:Ye,cover_image_id:Ge,pic:Re}=J;return K.createElement("div",{className:f.wrap,key:Le,style:{width:j,marginRight:(1+ye)%Gt===0?0:jt+_e,marginBottom:En}},K.createElement("a",{target:"_blank",href:`/shixuns/${Se}/challenges`,className:f.li,onClick:De=>{De.preventDefault(),B&&(0,z.L9)([B]),Ye&&(0,z.xg)(`/shixuns/${Se}/challenges`)}},K.createElement("div",{className:f.img},K.createElement("img",{className:f.cover,src:`${Re}`}),J.is_jupyter&&K.createElement("img",{className:f.sign,src:Z}),J.is_jupyter_lab&&K.createElement("img",{className:f.sign,src:Q}),J.is_unity_3d&&K.createElement("img",{className:f.sign,src:te})),K.createElement("div",{className:f.name},K.createElement(R.Z,{title:be||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},K.createElement("span",{className:f.e},be||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),K.createElement("div",{className:f.tags},K.createElement(R.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},K.createElement("span",null,K.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),K.createElement("span",null,J.challenges_count))),!!J.myshixuns_count&&K.createElement(R.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},K.createElement("span",null,K.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),K.createElement("span",null,J.myshixuns_count))),K.createElement(R.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},K.createElement("span",null,K.createElement("span",null,J.level))),K.createElement("div",{className:f.rate},K.createElement(k.Z,{allowHalf:!0,disabled:!0,defaultValue:J.score_info}),K.createElement("span",null,"\xA0",J.score_info?`${J.score_info}\u5206`:"5\u5206")))),!Ye&&K.createElement("div",{className:f.lockWrap},K.createElement("img",{src:`${W.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),K.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!zt.length&&K.createElement($.Z,null)))},re=X(10661),ce={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsB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udhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",he=X(59301),pe=({className:Nt,dataSource:zt=[],col:Gt=4,right:jt,bottom:En=23,precision:_e=0,wrapWidth:M=1200,trackEventItems:B,loading:I,handleVery:j=()=>!0})=>{const J=Math.floor((M-(Gt-1)*jt)/Gt);return he.createElement(D.Z,{spinning:I},he.createElement("div",{className:y()(ce.list,Nt)},!!zt.length&&zt.map((ye,be)=>{const{subject_identifier:Le,id:Se,identifier:Ye,power:Ge}=ye,Re=ye.is_public!=0&&ye.is_public;return he.createElement("div",{className:ce.wrap,key:Se,style:{width:J,marginRight:(1+be)%Gt===0?0:jt+_e,marginBottom:En}},he.createElement("a",{className:ce.li,onClick:De=>{De.preventDefault(),j(ye==null?void 0:ye.first_category_url)&&(B&&(0,z.L9)([B]),(0,z.xg)(ye.first_category_url))}},he.createElement("div",{className:ce.top},he.createElement(R.Z,{title:ye.name},he.createElement("div",{className:ce.name},ye.name)),he.createElement("img",{className:ce.img,src:W.Z.IMG_SERVER+"/images/"+ye.avatar_url}),he.createElement("div",{className:ce.text,title:ye.creator},ye.creator),Le&&he.createElement("div",{className:ce.btns},he.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),he.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Re&&he.createElement("div",{className:ce.sign},"\u516C\u5F00")),he.createElement("div",{className:ce.bottom},ye.visits>0&&he.createElement(R.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},he.createElement("span",null,he.createElement("i",{className:"iconfont icon-liulanyan"}),he.createElement("span",null,ye.visits))),ye.course_members_count>0&&he.createElement(R.Z,{title:"\u6210\u5458",placement:"bottom"},he.createElement("span",null,he.createElement("i",{className:"iconfont icon-chengyuan"}),ye.course_members_count)),ye.tasks_count>0&&he.createElement(R.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},he.createElement("span",null,he.createElement("i",{className:"iconfont icon-zuoye"}),ye.tasks_count)),ye.is_end?he.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):he.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!ye.is_accessible&&he.createElement("div",{className:ce.lockWrap},he.createElement("img",{src:`${W.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),he.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!zt.length&&he.createElement($.Z,null)))},me={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},ge=X(25690),Ae=({dataSource:Nt=[],value:zt,onChange:Gt,className:jt,style:En={},tabBarExtraContent:_e})=>K.createElement("div",{className:y()(me.tabs,jt),style:En},K.createElement("div",{className:me.tabsWrap},Nt.map((M,B)=>!(M!=null&&M.hide)&&K.createElement("aside",{className:me.tab,onClick:()=>{Gt(M.id),M.link&&ge.history.push(M.link)},key:B},K.createElement("div",{className:zt===M.id?me.active:""},M.name),(M==null?void 0:M.resetCount)==null&&(M==null?void 0:M.total)!==void 0&&K.createElement("span",null,"\uFF08",M==null?void 0:M.total,"\uFF09"),(M==null?void 0:M.resetCount)!==void 0&&(M==null?void 0:M.total)!==void 0&&K.createElement(R.Z,{title:(M==null?void 0:M.tip)!=null?M==null?void 0:M.tip:""},K.createElement("span",{style:{color:"#9096A3"}},"\uFF08",K.createElement("span",{style:{color:"#000"}},M==null?void 0:M.resetCount),"/",K.createElement("span",null,M==null?void 0:M.total),"\uFF09"))))),K.createElement("div",{className:me.tabBar},_e)),Ue=({className:Nt,style:zt={},children:Gt})=>K.createElement("div",{className:y()(Nt),style:zt},Gt),nt={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},rt=X(75727),qe=X(93041);const dt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var je=({sortValue:Nt,dropValue:zt,className:Gt,onSort:jt,onDrop:En,dataSource:_e=dt})=>{var M;return K.createElement("div",{className:y()(nt.orderWrap,Gt)},K.createElement(rt.Z,{dropdownRender:()=>K.createElement(qe.default,null,_e.map((B,I)=>K.createElement(qe.default.Item,{key:I,onClick:()=>En(B.id)},B.name)))},K.createElement("span",{className:nt.orderTextWrap},(M=_e.find(B=>zt===B.id))==null?void 0:M.name)),K.createElement("span",{className:nt.orderIconWrap},K.createElement("span",{className:nt.orderAsc},K.createElement("i",{className:Nt==="asc"?`iconfont icon-sanjiaoxing-up font12 ${nt.cursorPointer} ${nt.active}`:`iconfont icon-sanjiaoxing-up font12 ${nt.cursorPointer}`,onClick:()=>jt(Nt==="asc"?"desc":"asc")})),K.createElement("span",{className:nt.orderDesc},K.createElement("i",{className:Nt==="desc"?`iconfont icon-sanjiaoxing-down font12 ${nt.cursorPointer} ${nt.active}`:`iconfont icon-sanjiaoxing-down font12 ${nt.cursorPointer}`,onClick:()=>jt(Nt==="asc"?"desc":"asc")}))))},at={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},it=X(99571),ht=Object.defineProperty,ut=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,ot=(Nt,zt,Gt)=>zt in Nt?ht(Nt,zt,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Nt[zt]=Gt,Pe=(Nt,zt)=>{for(var Gt in zt||(zt={}))Mt.call(zt,Gt)&&ot(Nt,Gt,zt[Gt]);if(ut)for(var Gt of ut(zt))Ce.call(zt,Gt)&&ot(Nt,Gt,zt[Gt]);return Nt},Ne=(Nt,zt)=>{var Gt={};for(var jt in Nt)Mt.call(Nt,jt)&&zt.indexOf(jt)<0&&(Gt[jt]=Nt[jt]);if(Nt!=null&&ut)for(var jt of ut(Nt))zt.indexOf(jt)<0&&Ce.call(Nt,jt)&&(Gt[jt]=Nt[jt]);return Gt},We=(Nt,zt,Gt)=>new Promise((jt,En)=>{var _e=I=>{try{B(Gt.next(I))}catch(j){En(j)}},M=I=>{try{B(Gt.throw(I))}catch(j){En(j)}},B=I=>I.done?jt(I.value):Promise.resolve(I.value).then(_e,M);B((Gt=Gt.apply(Nt,zt)).next())}),Ve=Nt=>{var zt=Nt,{className:Gt,style:jt,children:En,loading:_e=!1,openLoading:M,onClick:B=()=>{},size:I="middle",shape:j="round"}=zt,J=Ne(zt,["className","style","children","loading","openLoading","onClick","size","shape"]);const[ye,be]=(0,K.useState)(!1);return K.createElement(it.ZP,Pe({onClick:(0,b.throttle)(Le=>We(void 0,null,function*(){M&&be(!0);try{yield B(Le)}catch(Se){console.log("error",Se)}M&&be(!1)}),2e3,{leading:!0,trailing:!1}),className:y()(at.btn,at[`${I}-${j}`],Gt),style:jt,size:I,shape:j,loading:ye||_e},J),En)},$e={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},pt=({className:Nt,style:zt,children:Gt=null,onClick:jt,title:En})=>K.createElement("div",{className:y()($e.head,Nt),style:zt},K.createElement("span",{className:"primary-hover",onClick:jt},K.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),K.createElement("b",{title:En},En),K.createElement("div",{className:$e.node},Gt)),xt={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Dt=({confirmShow:Nt=!0,confirmTitle:zt,confirmClick:Gt,cancelShow:jt=!0,cancelTitle:En,cancelClick:_e,className:M,style:B,confirmLoading:I=!1})=>K.createElement("div",{className:y()(xt.btns,M),style:B},Nt&&K.createElement(it.ZP,{loading:I,onClick:Gt,type:"primary",className:xt.confirm},zt),jt&&K.createElement(it.ZP,{onClick:_e,className:xt.cancel},En)),kt={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},Wt=({className:Nt,style:zt={},LeftContent:Gt,children:jt,RightContent:En})=>K.createElement("div",{className:y()(kt.fixedBottom,Nt),style:zt},K.createElement("div",{className:kt.wrap},K.createElement("div",{className:kt.left},Gt),K.createElement("div",{className:kt.center},jt),K.createElement("div",{className:kt.right},En))),Ot={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},vn=({className:Nt,style:zt={},dataSource:Gt=[]})=>K.createElement("div",{className:y()(Ot.crumbs,Nt),style:zt},Gt.map((jt,En)=>Enge.history.push(jt.path)},jt.name):K.createElement("span",null,jt.name),K.createElement("span",null,"\xA0",">","\xA0")):K.createElement("span",{key:En,style:{color:"#5F6368"}},jt.name))),Jn=X(11938),Fn=Object.defineProperty,qn=Object.defineProperties,br=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,nr=(Nt,zt,Gt)=>zt in Nt?Fn(Nt,zt,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Nt[zt]=Gt,an=(Nt,zt)=>{for(var Gt in zt||(zt={}))tr.call(zt,Gt)&&nr(Nt,Gt,zt[Gt]);if(Vn)for(var Gt of Vn(zt))lr.call(zt,Gt)&&nr(Nt,Gt,zt[Gt]);return Nt},tn=(Nt,zt)=>qn(Nt,br(zt)),An=(Nt,zt)=>{var Gt={};for(var jt in Nt)tr.call(Nt,jt)&&zt.indexOf(jt)<0&&(Gt[jt]=Nt[jt]);if(Nt!=null&&Vn)for(var jt of Vn(Nt))zt.indexOf(jt)<0&&lr.call(Nt,jt)&&(Gt[jt]=Nt[jt]);return Gt};const{Countdown:wn}=Jn.default;var ir=Nt=>{var zt=Nt,{onChange:Gt}=zt,jt=An(zt,["onChange"]);const[En,_e]=(0,K.useState)(null);(0,K.useEffect)(()=>{typeof En=="number"&&En>=0&&Gt(En)},[En]);const M=B=>{const I=Math.floor(B/1e3);_e(I)};return K.createElement(wn,tn(an({},jt),{onChange:M}))}},70453:function(we,Me,X){"use strict";X.d(Me,{Z:function(){return R}});var K=X(25399),ee=X(59301),G=X(25690),_=X(51257),F=X.p+"static/nltpbg.f01aad4b.png",w=X.p+"static/nltpbg2.303fcb0b.png",x={title:"title___m9Fww",bg:"bg___f9tLu"},y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnMAAAJzCAYAAABksJUOAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAACc6ADAAQAAAABAAACcwAAAACCpLptAABAAElEQVR4Aey9abAtR3UumLWnM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xGIX7oEXAIXkwC9eV98Ser9+wB2IrVbv4P0EY4na0qdc/Pib4mBG4cFOaw7lV9Am8qPgGPV+TGHjcdejVs3ZXSANOQ3bn1JRl++LyP3ssVP3dMuAZfARSUwZVAvyuTlXAIuAZfAiyRAr97tZ/DktQD2+lK7eSTJzpYk+yOpbbUlSRAfA/RtYOg19vAR+MmxCAFfDyDvxg2k4QGM6ZpGBYy+bP4uVgwTZBKkYRXx+C7+T84kZfrZbc0bIR67d+1FWuP5LgGXwMtIwMHcy0jNeVwCLoErlQC3VXnrU6n9g/8bHru/L7X9B5LAg1XD4e21MwDAe/g1gsDNbUkPHkvtNs46w+bJXG3LxRdJe1PSDfAc7sJFGLyCG12ARABCgiwBICRA7G5kK09Jw/BlymvlR5rX+EoNt16XcedUks2OpCc7km4FYIbh5fHdNyX94hnKApz9+psy9u09gtA8cgm4BJYmgf8fqOZsRaZ0WgEAAAAASUVORK5CYII=",b=X.p+"static/2.3612d2e5.png",E=X.p+"static/3.0ae7bccf.png",g=X.p+"static/4.d75cb058.png",m=X.p+"static/5.89f1948f.png",C=X.p+"static/6.cc2d55ef.png",d=X.p+"static/7.3afb9435.png",v=X.p+"static/8.5401d4a7.png",A=Object.defineProperty,T=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,L=(k,W,z)=>W in k?A(k,W,{enumerable:!0,configurable:!0,writable:!0,value:z}):k[W]=z,c=(k,W)=>{for(var z in W||(W={}))O.call(W,z)&&L(k,z,W[z]);if(T)for(var z of T(W))P.call(W,z)&&L(k,z,W[z]);return k};const f=({DataProps:k=[],baifenbi:W=1,pathsDetail:z,isShow:Z,item:Q,i:te})=>{const $=(0,G.useParams)(),[ie,ae]=(0,ee.useState)(0),re=33,ce=Math.PI/2+te*(Math.PI*2/(k==null?void 0:k.length)),oe=re*Math.cos(ce)/100,he=re*Math.sin(ce)/100;return ee.createElement(K.Z,{color:"#444FC2",title:Z?null:ee.createElement("div",{style:{fontSize:`${14*W}rem`}},ee.createElement("div",null,"\u8986\u76D6",(Q==null?void 0:Q.children_count)||0,"\u4E2A\u5B50\u80FD\u529B\u3001",(Q==null?void 0:Q.subject_knowledge_graph_count)||0,"\u4E2A\u77E5\u8BC6\u70B9"),ee.createElement("div",{style:{marginTop:"10rem"}},"\u70B9\u51FB\u67E5\u770B\u8BE6\u60C5"))},ee.createElement("div",{className:`flex flex-col item-center justify-center absolute ${Z?"":"current"} ${x.title}`,onClick:()=>{Z||(0,_.xg)(`/knowledgegraph/${$==null?void 0:$.pathId}/abilityMap/detail/${Q==null?void 0:Q.id}${window.location.search}`)},onMouseOver:()=>{Z||ae(2)},onMouseOut:()=>{Z||ae(0)},style:{left:`calc(50% - ${oe*100}%)`,top:`calc(50% - ${he*100}%)`,transform:"translate(-50%,-50%)",width:"20%",fontSize:`${(14+ie)*W}rem`}},ee.createElement("div",{style:{opacity:"0.8"}},"\u4E3B\u80FD\u529B"),ee.createElement("div",{className:"multi_ellipsis1",style:{fontSize:`${18*W}rem`,fontWeight:500}},Q==null?void 0:Q.name),!(z!=null&&z.detail.can_managed)&&ee.createElement("div",null,"\u638C\u63E1\u7387 ",Q==null?void 0:Q.grasp_rate," %")))},D=({DataProps:k=[],className:W="",style:z={},baifenbi:Z=1,pathsDetail:Q,isShow:te})=>{const $=(0,ee.useMemo)(()=>{const ie=["",y,b,E,g,m,C,d,v];return ie==null?void 0:ie[(k==null?void 0:k.length)||0]},[k]);return ee.createElement("div",{className:`w-full h-full flex item-center justify-center relative overflow_hidden ${W} ${x.bg}`,style:c({backgroundImage:`url(${k!=null&&k.length?w:F})`,backgroundSize:"auto 100%",height:"100%"},z)},((k==null?void 0:k.length)||0)>0&&ee.createElement("img",{className:`absolute ${x.bg}`,src:$,style:{width:"95%",height:"95%",left:"50%",top:"50%",transform:`translate(-50%, -50%) ${[2,3,6].includes(k==null?void 0:k.length)?"rotate(90deg)":(k==null?void 0:k.length)==7?"rotate(25deg)":""}`}}),k==null?void 0:k.map((ie,ae)=>ee.createElement(f,{key:ae,i:ae,item:ie,DataProps:k,className:W,style:z,baifenbi:Z,pathsDetail:Q,isShow:te})),ee.createElement("div",{className:"text-center"},ee.createElement("div",{style:{fontSize:`${28*Z}rem`}},"\u80FD\u529B\u76EE\u6807"),ee.createElement("div",{style:{fontSize:`${12*Z}rem`}},"\u70B9\u51FB\u73AF\u56FE\u67E5\u770B\u80FD\u529B\u8BE6\u60C5")))};var R=(0,G.connect)(({pathsDetail:k})=>({pathsDetail:k}))(D)},84989:function(we,Me,X){"use strict";X.d(Me,{BU:function(){return ee},Dj:function(){return K},gH:function(){return G},vp:function(){return _}});function K(F){try{F.mozRequestFullScreen?F.mozRequestFullScreen():F.webkitRequestFullScreen&&F.webkitRequestFullScreen()}catch(w){console.log(w,":e")}}function ee(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const G=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function _(){var F=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,w=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",F),window.isFullScreen?window.isFullScreen:F!=null}},45937:function(we,Me,X){"use strict";X.d(Me,{U:function(){return b}});var K=X(59301),ee=Object.defineProperty,G=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,w=(E,g,m)=>g in E?ee(E,g,{enumerable:!0,configurable:!0,writable:!0,value:m}):E[g]=m,x=(E,g)=>{for(var m in g||(g={}))_.call(g,m)&&w(E,m,g[m]);if(G)for(var m of G(g))F.call(g,m)&&w(E,m,g[m]);return E},y=(E,g,m)=>new Promise((C,d)=>{var v=O=>{try{T(m.next(O))}catch(P){d(P)}},A=O=>{try{T(m.throw(O))}catch(P){d(P)}},T=O=>O.done?C(O.value):Promise.resolve(O.value).then(v,A);T((m=m.apply(E,g)).next())});function b(E,g){const[m,C]=(0,K.useState)(g),[d,v]=(0,K.useState)(!1),[A,T]=(0,K.useState)();return[m,d,(P,L=!1)=>y(this,null,function*(){const c=L?g:x(x({},m),P);v(!0),C(c);const f=yield E(c);return v(!1),T(f),f}),A,T]}},30647:function(we,Me,X){"use strict";X.d(Me,{Z:function(){return En}});class K{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(M,B){return M.__proto__=B,M},Object.assign=Object.assign||function(M){if(M==null)throw new TypeError("Cannot convert undefined or null to object");let B=Object(M);for(let I=1;I ${B}`;F.ENABLE_CALLBACK&&F.emitter.emit("log","error",I),F.ENABLE_ERROR&&(console.error?console.error(I):console.warn?console.warn(I):console.log(I))}static i(M,B){(!M||F.FORCE_GLOBAL_TAG)&&(M=F.GLOBAL_TAG);let I=`[${M}] > ${B}`;F.ENABLE_CALLBACK&&F.emitter.emit("log","info",I),F.ENABLE_INFO&&(console.info?console.info(I):console.log(I))}static w(M,B){(!M||F.FORCE_GLOBAL_TAG)&&(M=F.GLOBAL_TAG);let I=`[${M}] > ${B}`;F.ENABLE_CALLBACK&&F.emitter.emit("log","warn",I),F.ENABLE_WARN&&(console.warn?console.warn(I):console.log(I))}static d(M,B){(!M||F.FORCE_GLOBAL_TAG)&&(M=F.GLOBAL_TAG);let I=`[${M}] > ${B}`;F.ENABLE_CALLBACK&&F.emitter.emit("log","debug",I),F.ENABLE_DEBUG&&(console.debug?console.debug(I):console.log(I))}static v(M,B){(!M||F.FORCE_GLOBAL_TAG)&&(M=F.GLOBAL_TAG);let I=`[${M}] > ${B}`;F.ENABLE_CALLBACK&&F.emitter.emit("log","verbose",I),F.ENABLE_VERBOSE&&console.log(I)}}F.GLOBAL_TAG="flv.js",F.FORCE_GLOBAL_TAG=!1,F.ENABLE_ERROR=!0,F.ENABLE_INFO=!0,F.ENABLE_WARN=!0,F.ENABLE_DEBUG=!0,F.ENABLE_VERBOSE=!0,F.ENABLE_CALLBACK=!1,F.emitter=new(_());var w=F;class x{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(M){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=M,this._totalBytes+=M):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=M,this._totalBytes+=M):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=M,this._totalBytes+=M,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let M=(this._now()-this._lastCheckpoint)/1e3;return M==0&&(M=1),this._intervalBytes/M/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let M=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/M/1024}}var y=x;class b{constructor(M){this._message=M}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class E extends b{constructor(M){super(M)}get name(){return"IllegalStateException"}}class g extends b{constructor(M){super(M)}get name(){return"InvalidArgumentException"}}class m extends b{constructor(M){super(M)}get name(){return"NotImplementedException"}}const C={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},d={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class v{constructor(M){this._type=M||"undefined",this._status=C.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=C.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===C.kConnecting||this._status===C.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(M){this._onContentLengthKnown=M}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(M){this._onURLRedirect=M}get onDataArrival(){return this._onDataArrival}set onDataArrival(M){this._onDataArrival=M}get onError(){return this._onError}set onError(M){this._onError=M}get onComplete(){return this._onComplete}set onComplete(M){this._onComplete=M}open(M,B){throw new m("Unimplemented abstract function!")}abort(){throw new m("Unimplemented abstract function!")}}let A={};function T(){let _e=self.navigator.userAgent.toLowerCase(),M=/(edge)\/([\w.]+)/.exec(_e)||/(opr)[\/]([\w.]+)/.exec(_e)||/(chrome)[ \/]([\w.]+)/.exec(_e)||/(iemobile)[\/]([\w.]+)/.exec(_e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(_e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(_e)||/(webkit)[ \/]([\w.]+)/.exec(_e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(_e)||/(msie) ([\w.]+)/.exec(_e)||_e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(_e)||_e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(_e)||[],B=/(ipad)/.exec(_e)||/(ipod)/.exec(_e)||/(windows phone)/.exec(_e)||/(iphone)/.exec(_e)||/(kindle)/.exec(_e)||/(android)/.exec(_e)||/(windows)/.exec(_e)||/(mac)/.exec(_e)||/(linux)/.exec(_e)||/(cros)/.exec(_e)||[],I={browser:M[5]||M[3]||M[1]||"",version:M[2]||M[4]||"0",majorVersion:M[4]||M[2]||"0",platform:B[0]||""},j={};if(I.browser){j[I.browser]=!0;let J=I.majorVersion.split(".");j.version={major:parseInt(I.majorVersion,10),string:I.version},J.length>1&&(j.version.minor=parseInt(J[1],10)),J.length>2&&(j.version.build=parseInt(J[2],10))}if(I.platform&&(j[I.platform]=!0),(j.chrome||j.opr||j.safari)&&(j.webkit=!0),j.rv||j.iemobile){j.rv&&delete j.rv;let J="msie";I.browser=J,j[J]=!0}if(j.edge){delete j.edge;let J="msedge";I.browser=J,j[J]=!0}if(j.opr){let J="opera";I.browser=J,j[J]=!0}if(j.safari&&j.android){let J="android";I.browser=J,j[J]=!0}j.name=I.browser,j.platform=I.platform;for(let J in A)A.hasOwnProperty(J)&&delete A[J];Object.assign(A,j)}T();var O=A;class P extends v{static isSupported(){try{let M=O.msedge&&O.version.minor>=15048,B=O.msedge?M:!0;return self.fetch&&self.ReadableStream&&B}catch(M){return!1}}constructor(M,B){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=M,this._config=B,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(M,B){this._dataSource=M,this._range=B;let I=M.url;this._config.reuseRedirectedURL&&M.redirectedURL!=null&&(I=M.redirectedURL);let j=this._seekHandler.getConfig(I,B),J=new self.Headers;if(typeof j.headers=="object"){let be=j.headers;for(let Le in be)be.hasOwnProperty(Le)&&J.append(Le,be[Le])}let ye={method:"GET",headers:J,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let be in this._config.headers)J.append(be,this._config.headers[be]);M.cors===!1&&(ye.mode="same-origin"),M.withCredentials&&(ye.credentials="include"),M.referrerPolicy&&(ye.referrerPolicy=M.referrerPolicy),this._status=C.kConnecting,self.fetch(j.url,ye).then(be=>{if(this._requestAbort){this._requestAbort=!1,this._status=C.kIdle;return}if(be.ok&&be.status>=200&&be.status<=299){if(be.url!==j.url&&this._onURLRedirect){let Se=this._seekHandler.removeURLParameters(be.url);this._onURLRedirect(Se)}let Le=be.headers.get("Content-Length");return Le!=null&&(this._contentLength=parseInt(Le),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,be.body.getReader())}else if(this._status=C.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:be.status,msg:be.statusText});else throw new b("FetchStreamLoader: Http code invalid, "+be.status+" "+be.statusText)}).catch(be=>{if(this._status=C.kError,this._onError)this._onError(d.EXCEPTION,{code:-1,msg:be.message});else throw be})}abort(){this._requestAbort=!0}_pump(M){return M.read().then(B=>{if(B.done)if(this._contentLength!==null&&this._receivedLength{if(B.code===11&&O.msedge)return;this._status=C.kError;let I=0,j=null;if((B.code===19||B.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength299))if(this._status=C.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:B.status,msg:B.statusText});else throw new b("MozChunkedLoader: Http code invalid, "+B.status+" "+B.statusText);else this._status=C.kBuffering}}_onProgress(M){if(this._status===C.kError)return;this._contentLength===null&&M.total!==null&&M.total!==0&&(this._contentLength=M.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let B=M.target.response,I=this._range.from+this._receivedLength;this._receivedLength+=B.byteLength,this._onDataArrival&&this._onDataArrival(B,I,this._receivedLength)}_onLoadEnd(M){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===C.kError)return;this._status=C.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(M){this._status=C.kError;let B=0,I=null;if(this._contentLength&&M.loaded=200&&B.status<=299){if(this._status=LoaderStatus.kBuffering,B.responseURL!=null){let j=this._seekHandler.removeURLParameters(B.responseURL);B.responseURL!==this._currentRequestURL&&j!==this._currentRedirectedURL&&(this._currentRedirectedURL=j,this._onURLRedirect&&this._onURLRedirect(j))}let I=B.getResponseHeader("Content-Length");if(I!=null&&this._contentLength==null){let j=parseInt(I);j>0&&(this._contentLength=j,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:B.status,msg:B.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+B.status+" "+B.statusText);else if(B.readyState===3&&B.status>=200&&B.status<=299){this._status=LoaderStatus.kBuffering;let I=B.response;this._reader.readAsArrayBuffer(I)}}_xhrOnError(M){this._status=LoaderStatus.kError;let B=LoaderErrors.EXCEPTION,I={code:-1,msg:M.constructor.name+" "+M.type};if(this._onError)this._onError(B,I);else throw new RuntimeException(I.msg)}_msrOnProgress(M){let I=M.target.result;if(I==null){this._doReconnectIfNeeded();return}let j=I.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=I.byteLength;let J=this._totalRange.from+this._receivedLength;this._receivedLength+=j.byteLength,this._onDataArrival&&this._onDataArrival(j,J,this._receivedLength),I.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${J+j.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength=this._contentLength&&(I=this._range.from+this._contentLength-1),this._currentRequestRange={from:B,to:I},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(M,B){this._lastTimeLoaded=0;let I=M.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?I=this._currentRedirectedURL:M.redirectedURL!=null&&(I=M.redirectedURL));let j=this._seekHandler.getConfig(I,B);this._currentRequestURL=j.url;let J=this._xhr=new XMLHttpRequest;if(J.open("GET",j.url,!0),J.responseType="arraybuffer",J.onreadystatechange=this._onReadyStateChange.bind(this),J.onprogress=this._onProgress.bind(this),J.onload=this._onLoad.bind(this),J.onerror=this._onXhrError.bind(this),M.withCredentials&&(J.withCredentials=!0),typeof j.headers=="object"){let ye=j.headers;for(let be in ye)ye.hasOwnProperty(be)&&J.setRequestHeader(be,ye[be])}if(typeof this._config.headers=="object"){let ye=this._config.headers;for(let be in ye)ye.hasOwnProperty(be)&&J.setRequestHeader(be,ye[be])}J.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=C.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(M){let B=M.target;if(B.readyState===2){if(B.responseURL!=null){let I=this._seekHandler.removeURLParameters(B.responseURL);B.responseURL!==this._currentRequestURL&&I!==this._currentRedirectedURL&&(this._currentRedirectedURL=I,this._onURLRedirect&&this._onURLRedirect(I))}if(B.status>=200&&B.status<=299){if(this._waitForTotalLength)return;this._status=C.kBuffering}else if(this._status=C.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:B.status,msg:B.statusText});else throw new b("RangeLoader: Http code invalid, "+B.status+" "+B.statusText)}}_onProgress(M){if(this._status===C.kError)return;if(this._contentLength===null){let I=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,I=!0;let j=M.total;this._internalAbort(),j!=null&j!==0&&(this._totalLength=j)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,I){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let B=M.loaded-this._lastTimeLoaded;this._lastTimeLoaded=M.loaded,this._speedSampler.addBytes(B)}_normalizeSpeed(M){let B=this._chunkSizeKBList,I=B.length-1,j=0,J=0,ye=I;if(M=B[j]&&M=3&&(B=this._speedSampler.currentKBps)),B!==0){let ye=this._normalizeSpeed(B);this._currentSpeedNormalized!==ye&&(this._currentSpeedNormalized=ye,this._currentChunkSizeKB=ye)}let I=M.target.response,j=this._range.from+this._receivedLength;this._receivedLength+=I.byteLength;let J=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength{this._dispatchArrayBuffer(B.result)},B.readAsArrayBuffer(M.data)}else{this._status=C.kError;let B={code:-1,msg:"Unsupported WebSocket message type: "+M.data.constructor.name};if(this._onError)this._onError(d.EXCEPTION,B);else throw new b(B.msg)}}_dispatchArrayBuffer(M){let B=M,I=this._receivedLength;this._receivedLength+=B.byteLength,this._onDataArrival&&this._onDataArrival(B,I,this._receivedLength)}_onWebSocketError(M){this._status=C.kError;let B={code:M.code,msg:M.message};if(this._onError)this._onError(d.EXCEPTION,B);else throw new b(B.msg)}}var Z=z;class Q{constructor(M){this._zeroStart=M||!1}getConfig(M,B){let I={};if(B.from!==0||B.to!==-1){let j;B.to!==-1?j=`bytes=${B.from.toString()}-${B.to.toString()}`:j=`bytes=${B.from.toString()}-`,I.Range=j}else this._zeroStart&&(I.Range="bytes=0-");return{url:M,headers:I}}removeURLParameters(M){return M}}var te=Q;class ${constructor(M,B){this._startName=M,this._endName=B}getConfig(M,B){let I=M;if(B.from!==0||B.to!==-1){let j=!0;I.indexOf("?")===-1&&(I+="?",j=!1),j&&(I+="&"),I+=`${this._startName}=${B.from.toString()}`,B.to!==-1&&(I+=`&${this._endName}=${B.to.toString()}`)}return{url:I,headers:{}}}removeURLParameters(M){let B=M.split("?")[0],I,j=M.indexOf("?");j!==-1&&(I=M.substring(j+1));let J="";if(I!=null&&I.length>0){let ye=I.split("&");for(let be=0;be0;Le[0]!==this._startName&&Le[0]!==this._endName&&(Se&&(J+="&"),J+=ye[be])}}return J.length===0?B:B+"?"+J}}var ie=$;class ae{constructor(M,B,I){this.TAG="IOController",this._config=B,this._extraData=I,this._stashInitialSize=1024*384,B.stashInitialSize!=null&&B.stashInitialSize>0&&(this._stashInitialSize=B.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,B.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=M,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(M.url),this._refTotalLength=M.filesize?M.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new y,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(M){this._extraData=M}get onDataArrival(){return this._onDataArrival}set onDataArrival(M){this._onDataArrival=M}get onSeeked(){return this._onSeeked}set onSeeked(M){this._onSeeked=M}get onError(){return this._onError}set onError(M){this._onError=M}get onComplete(){return this._onComplete}set onComplete(M){this._onComplete=M}get onRedirect(){return this._onRedirect}set onRedirect(M){this._onRedirect=M}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(M){this._onRecoveredEarlyEof=M}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===W?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let M=this._config;if(M.seekType==="range")this._seekHandler=new te(this._config.rangeLoadZeroStart);else if(M.seekType==="param"){let B=M.seekParamStart||"bstart",I=M.seekParamEnd||"bend";this._seekHandler=new ie(B,I)}else if(M.seekType==="custom"){if(typeof M.customSeekHandler!="function")throw new g("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new M.customSeekHandler}else throw new g(`Invalid seekType in config: ${M.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=Z;else if(L.isSupported())this._loaderClass=L;else if(f.isSupported())this._loaderClass=f;else if(W.isSupported())this._loaderClass=W;else throw new b("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(M){this._currentRange={from:0,to:-1},M&&(this._currentRange.from=M),this._speedSampler.reset(),M||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let M=this._resumeFrom;this._resumeFrom=0,this._internalSeek(M,!0)}}seek(M){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(M,!0)}_internalSeek(M,B){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(B),this._loader.destroy(),this._loader=null;let I={from:M,to:-1};this._currentRange={from:I.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,I),this._onSeeked&&this._onSeeked()}updateUrl(M){if(!M||typeof M!="string"||M.length===0)throw new g("Url must be a non-empty string!");this._dataSource.url=M}_expandBuffer(M){let B=this._stashSize;for(;B+1024*1024*10){let j=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(I,0,B).set(j,0)}this._stashBuffer=I,this._bufferSize=B}_normalizeSpeed(M){let B=this._speedNormalizeList,I=B.length-1,j=0,J=0,ye=I;if(M=B[j]&&M=512&&M<=1024?B=Math.floor(M*1.5):B=M*2,B>8192&&(B=8192);let I=B*1024+1024*1024*1;this._bufferSize0){let ye=this._stashBuffer.slice(0,this._stashUsed),be=this._dispatchChunks(ye,this._stashByteStart);if(be0){let Le=new Uint8Array(ye,be);J.set(Le,0),this._stashUsed=Le.byteLength,this._stashByteStart+=be}}else this._stashUsed=0,this._stashByteStart+=be;this._stashUsed+M.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+M.byteLength),J=new Uint8Array(this._stashBuffer,0,this._bufferSize)),J.set(new Uint8Array(M),this._stashUsed),this._stashUsed+=M.byteLength}else{let ye=this._dispatchChunks(M,B);if(yethis._bufferSize&&(this._expandBuffer(be),J=new Uint8Array(this._stashBuffer,0,this._bufferSize)),J.set(new Uint8Array(M,ye),0),this._stashUsed+=be,this._stashByteStart=B+ye}}}else if(this._stashUsed===0){let J=this._dispatchChunks(M,B);if(Jthis._bufferSize&&this._expandBuffer(ye),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(M,J),0),this._stashUsed+=ye,this._stashByteStart=B+J}}else{this._stashUsed+M.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+M.byteLength);let J=new Uint8Array(this._stashBuffer,0,this._bufferSize);J.set(new Uint8Array(M),this._stashUsed),this._stashUsed+=M.byteLength;let ye=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(ye0){let be=new Uint8Array(this._stashBuffer,ye);J.set(be,0)}this._stashUsed-=ye,this._stashByteStart+=ye}}_flushStashBuffer(M){if(this._stashUsed>0){let B=this._stashBuffer.slice(0,this._stashUsed),I=this._dispatchChunks(B,this._stashByteStart),j=B.byteLength-I;if(I0){let J=new Uint8Array(this._stashBuffer,0,this._bufferSize),ye=new Uint8Array(B,I);J.set(ye,0),this._stashUsed=ye.byteLength,this._stashByteStart+=I}return 0}return this._stashUsed=0,this._stashByteStart=0,j}return 0}_onLoaderComplete(M,B){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(M,B){switch(w.e(this.TAG,`Loader error, code = ${B.code}, msg = ${B.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,M=d.UNRECOVERABLE_EARLY_EOF),M){case d.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let I=this._currentRange.to+1;I0){let B=ge.getConfig();M.emit("change",B)}}static registerListener(M){ge.emitter.addListener("change",M)}static removeListener(M){ge.emitter.removeListener("change",M)}static addLogListener(M){w.emitter.addListener("log",M),w.emitter.listenerCount("log")>0&&(w.ENABLE_CALLBACK=!0,ge._notifyChange())}static removeLogListener(M){w.emitter.removeListener("log",M),w.emitter.listenerCount("log")===0&&(w.ENABLE_CALLBACK=!1,ge._notifyChange())}}ge.emitter=new(_());var Ee=ge;class Ae{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let M=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,B=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&M&&B}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(M){if(this.keyframesIndex==null)return null;let B=this.keyframesIndex,I=this._search(B.times,M);return{index:I,milliseconds:B.times[I],fileposition:B.filepositions[I]}}_search(M,B){let I=0,j=M.length-1,J=0,ye=0,be=j;for(B=M[J]&&B=128){M.push(String.fromCharCode(J&65535)),I+=2;continue}}}else if(B[I]<240){if(Ue(B,I,2)){let J=(B[I]&15)<<12|(B[I+1]&63)<<6|B[I+2]&63;if(J>=2048&&(J&63488)!==55296){M.push(String.fromCharCode(J&65535)),I+=3;continue}}}else if(B[I]<248&&Ue(B,I,3)){let J=(B[I]&7)<<18|(B[I+1]&63)<<12|(B[I+2]&63)<<6|B[I+3]&63;if(J>65536&&J<1114112){J-=65536,M.push(String.fromCharCode(J>>>10|55296)),M.push(String.fromCharCode(J&1023|56320)),I+=4;continue}}}M.push("\uFFFD"),++I}return M.join("")}var rt=nt;let qe=function(){let _e=new ArrayBuffer(2);return new DataView(_e).setInt16(0,256,!0),new Int16Array(_e)[0]===256}();class dt{static parseScriptData(M,B,I){let j={};try{let J=dt.parseValue(M,B,I),ye=dt.parseValue(M,B+J.size,I-J.size);j[J.data]=ye.data}catch(J){w.e("AMF",J.toString())}return j}static parseObject(M,B,I){if(I<3)throw new E("Data not enough when parse ScriptDataObject");let j=dt.parseString(M,B,I),J=dt.parseValue(M,B+j.size,I-j.size),ye=J.objectEnd;return{data:{name:j.data,value:J.data},size:j.size+J.size,objectEnd:ye}}static parseVariable(M,B,I){return dt.parseObject(M,B,I)}static parseString(M,B,I){if(I<2)throw new E("Data not enough when parse String");let J=new DataView(M,B,I).getUint16(0,!qe),ye;return J>0?ye=rt(new Uint8Array(M,B+2,J)):ye="",{data:ye,size:2+J}}static parseLongString(M,B,I){if(I<4)throw new E("Data not enough when parse LongString");let J=new DataView(M,B,I).getUint32(0,!qe),ye;return J>0?ye=rt(new Uint8Array(M,B+4,J)):ye="",{data:ye,size:4+J}}static parseDate(M,B,I){if(I<10)throw new E("Data size invalid when parse Date");let j=new DataView(M,B,I),J=j.getFloat64(0,!qe),ye=j.getInt16(8,!qe);return J+=ye*60*1e3,{data:new Date(J),size:10}}static parseValue(M,B,I){if(I<1)throw new E("Data not enough when parse Value");let j=new DataView(M,B,I),J=1,ye=j.getUint8(0),be,Le=!1;try{switch(ye){case 0:be=j.getFloat64(1,!qe),J+=8;break;case 1:{be=!!j.getUint8(1),J+=1;break}case 2:{let Se=dt.parseString(M,B+1,I-1);be=Se.data,J+=Se.size;break}case 3:{be={};let Se=0;for((j.getUint32(I-4,!qe)&16777215)===9&&(Se=3);J32)throw new g("ExpGolomb: readBits() bits exceeded max 32bits!");if(M<=this._current_word_bits_left){let ye=this._current_word>>>32-M;return this._current_word<<=M,this._current_word_bits_left-=M,ye}let B=this._current_word_bits_left?this._current_word:0;B=B>>>32-this._current_word_bits_left;let I=M-this._current_word_bits_left;this._fillCurrentWord();let j=Math.min(I,this._current_word_bits_left),J=this._current_word>>>32-j;return this._current_word<<=j,this._current_word_bits_left-=j,B=B<>>M)return this._current_word<<=M,this._current_word_bits_left-=M,M;return this._fillCurrentWord(),M+this._skipLeadingZero()}readUEG(){let M=this._skipLeadingZero();return this.readBits(M+1)-1}readSEG(){let M=this.readUEG();return M&1?M+1>>>1:-1*(M>>>1)}}var at=je;class it{static _ebsp2rbsp(M){let B=M,I=B.byteLength,j=new Uint8Array(I),J=0;for(let ye=0;ye=2&&B[ye]===3&&B[ye-1]===0&&B[ye-2]===0||(j[J]=B[ye],J++);return new Uint8Array(j.buffer,0,J)}static parseSPS(M){let B=it._ebsp2rbsp(M),I=new at(B);I.readByte();let j=I.readByte();I.readByte();let J=I.readByte();I.readUEG();let ye=it.getProfileString(j),be=it.getLevelString(J),Le=1,Se=420,Ye=[0,420,422,444],Ge=8;if((j===100||j===110||j===122||j===244||j===44||j===83||j===86||j===118||j===128||j===138||j===144)&&(Le=I.readUEG(),Le===3&&I.readBits(1),Le<=3&&(Se=Ye[Le]),Ge=I.readUEG()+8,I.readUEG(),I.readBits(1),I.readBool())){let dn=Le!==3?8:12;for(let gn=0;gn0&&dn<16?(It=gn[dn-1],vt=Mn[dn-1]):dn===255&&(It=I.readByte()<<8|I.readByte(),vt=I.readByte()<<8|I.readByte())}if(I.readBool()&&I.readBool(),I.readBool()&&(I.readBits(4),I.readBool()&&I.readBits(24)),I.readBool()&&(I.readUEG(),I.readUEG()),I.readBool()){let dn=I.readBits(32),gn=I.readBits(32);Bt=I.readBool(),Qe=gn,gt=dn*2,Rt=Qe/gt}}let St=1;(It!==1||vt!==1)&&(St=It/vt);let on=0,ln=0;if(Le===0)on=1,ln=2-Je;else{let dn=Le===3?1:2,gn=Le===1?2:1;on=dn,ln=gn*(2-Je)}let Zt=(Ke+1)*16,Jt=(2-Je)*((He+1)*16);Zt-=(ke+Ze)*on,Jt-=(tt+mt)*ln;let Xt=Math.ceil(Zt*St);return I.destroy(),I=null,{profile_string:ye,level_string:be,bit_depth:Ge,ref_frames:De,chroma_format:Se,chroma_format_string:it.getChromaFormatString(Se),frame_rate:{fixed:Bt,fps:Rt,fps_den:gt,fps_num:Qe},sar_ratio:{width:It,height:vt},codec_size:{width:Zt,height:Jt},present_size:{width:Xt,height:Jt}}}static _skipScalingList(M,B){let I=8,j=8,J=0;for(let ye=0;ye>>8&255|(_e&255)<<8}function ot(_e){return(_e&4278190080)>>>24|(_e&16711680)>>>8|(_e&65280)<<8|(_e&255)<<24}function Pe(_e,M){return _e[M]<<24|_e[M+1]<<16|_e[M+2]<<8|_e[M+3]}class Ne{constructor(M,B){this.TAG="FLVDemuxer",this._config=B,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=M.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=M.hasAudioTrack,this._hasVideo=M.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Fe,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let I=new ArrayBuffer(2);return new DataView(I).setInt16(0,256,!0),new Int16Array(I)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(M){let B=new Uint8Array(M),I={match:!1};if(B[0]!==70||B[1]!==76||B[2]!==86||B[3]!==1)return I;let j=(B[4]&4)>>>2!==0,J=(B[4]&1)!==0,ye=Pe(B,5);return ye<9?I:{match:!0,consumed:ye,dataOffset:ye,hasAudioTrack:j,hasVideoTrack:J}}bindDataSource(M){return M.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(M){this._onTrackMetadata=M}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(M){this._onMediaInfo=M}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(M){this._onMetaDataArrived=M}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(M){this._onScriptDataArrived=M}get onError(){return this._onError}set onError(M){this._onError=M}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(M){this._onDataAvailable=M}get timestampBase(){return this._timestampBase}set timestampBase(M){this._timestampBase=M}get overridedDuration(){return this._duration}set overridedDuration(M){this._durationOverrided=!0,this._duration=M,this._mediaInfo.duration=M}set overridedHasAudio(M){this._hasAudioFlagOverrided=!0,this._hasAudio=M,this._mediaInfo.hasAudio=M}set overridedHasVideo(M){this._hasVideoFlagOverrided=!0,this._hasVideo=M,this._mediaInfo.hasVideo=M}resetMediaInfo(){this._mediaInfo=new Fe}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(M,B){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new E("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let I=0,j=this._littleEndian;if(B===0)if(M.byteLength>13)I=Ne.probe(M).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,B+I!==this._dataOffset&&w.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(M,I).getUint32(0,!j)!==0&&w.w(this.TAG,"PrevTagSize0 !== 0 !!!"),I+=4);IM.byteLength)break;let ye=J.getUint8(0),be=J.getUint32(0,!j)&16777215;if(I+11+be+4>M.byteLength)break;if(ye!==8&&ye!==9&&ye!==18){w.w(this.TAG,`Unsupported tag type ${ye}, skipped`),I+=11+be+4;continue}let Le=J.getUint8(4),Se=J.getUint8(5),Ye=J.getUint8(6),Ge=J.getUint8(7),Re=Ye|Se<<8|Le<<16|Ge<<24;(J.getUint32(7,!j)&16777215)!==0&&w.w(this.TAG,"Meet tag which has StreamID != 0!");let Ke=I+11;switch(ye){case 8:this._parseAudioData(M,Ke,be,Re);break;case 9:this._parseVideoData(M,Ke,be,Re,B+I);break;case 18:this._parseScriptData(M,Ke,be);break}let He=J.getUint32(11+be,!j);He!==11+be&&w.w(this.TAG,`Invalid PrevTagSize ${He}`),I+=11+be+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),I}_parseScriptData(M,B,I){let j=yt.parseScriptData(M,B,I);if(j.hasOwnProperty("onMetaData")){if(j.onMetaData==null||typeof j.onMetaData!="object"){w.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&w.w(this.TAG,"Found another onMetaData tag!"),this._metadata=j;let J=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},J)),typeof J.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=J.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof J.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=J.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof J.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=J.audiodatarate),typeof J.videodatarate=="number"&&(this._mediaInfo.videoDataRate=J.videodatarate),typeof J.width=="number"&&(this._mediaInfo.width=J.width),typeof J.height=="number"&&(this._mediaInfo.height=J.height),typeof J.duration=="number"){if(!this._durationOverrided){let ye=Math.floor(J.duration*this._timescale);this._duration=ye,this._mediaInfo.duration=ye}}else this._mediaInfo.duration=0;if(typeof J.framerate=="number"){let ye=Math.floor(J.framerate*1e3);if(ye>0){let be=ye/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=be,this._referenceFrameRate.fps_num=ye,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=be}}if(typeof J.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let ye=J.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(ye),J.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=J,w.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(j).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},j))}_parseKeyframesIndex(M){let B=[],I=[];for(let j=1;j>>4;if(Le!==2&&Le!==10){this._onError(Mt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Le);return}let Se=0,Ye=(be&12)>>>2;if(Ye>=0&&Ye<=4)Se=this._flvSoundRateTable[Ye];else{this._onError(Mt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+Ye);return}let Ge=(be&2)>>>1,Re=be&1,De=this._audioMetadata,Ke=this._audioTrack;if(De||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),De=this._audioMetadata={},De.type="audio",De.id=Ke.id,De.timescale=this._timescale,De.duration=this._duration,De.audioSampleRate=Se,De.channelCount=Re===0?1:2),Le===10){let He=this._parseAACAudioData(M,B+1,I-1);if(He==null)return;if(He.packetType===0){De.config&&w.w(this.TAG,"Found another AudioSpecificConfig!");let Je=He.data;De.audioSampleRate=Je.samplingRate,De.channelCount=Je.channelCount,De.codec=Je.codec,De.originalCodec=Je.originalCodec,De.config=Je.config,De.refSampleDuration=1024/De.audioSampleRate*De.timescale,w.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",De);let ke=this._mediaInfo;ke.audioCodec=De.originalCodec,ke.audioSampleRate=De.audioSampleRate,ke.audioChannelCount=De.channelCount,ke.hasVideo?ke.videoCodec!=null&&(ke.mimeType='video/x-flv; codecs="'+ke.videoCodec+","+ke.audioCodec+'"'):ke.mimeType='video/x-flv; codecs="'+ke.audioCodec+'"',ke.isComplete()&&this._onMediaInfo(ke)}else if(He.packetType===1){let Je=this._timestampBase+j,ke={unit:He.data,length:He.data.byteLength,dts:Je,pts:Je};Ke.samples.push(ke),Ke.length+=He.data.length}else w.e(this.TAG,`Flv: Unsupported AAC data type ${He.packetType}`)}else if(Le===2){if(!De.codec){let Ze=this._parseMP3AudioData(M,B+1,I-1,!0);if(Ze==null)return;De.audioSampleRate=Ze.samplingRate,De.channelCount=Ze.channelCount,De.codec=Ze.codec,De.originalCodec=Ze.originalCodec,De.refSampleDuration=1152/De.audioSampleRate*De.timescale,w.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",De);let tt=this._mediaInfo;tt.audioCodec=De.codec,tt.audioSampleRate=De.audioSampleRate,tt.audioChannelCount=De.channelCount,tt.audioDataRate=Ze.bitRate,tt.hasVideo?tt.videoCodec!=null&&(tt.mimeType='video/x-flv; codecs="'+tt.videoCodec+","+tt.audioCodec+'"'):tt.mimeType='video/x-flv; codecs="'+tt.audioCodec+'"',tt.isComplete()&&this._onMediaInfo(tt)}let He=this._parseMP3AudioData(M,B+1,I-1,!1);if(He==null)return;let Je=this._timestampBase+j,ke={unit:He,length:He.byteLength,dts:Je,pts:Je};Ke.samples.push(ke),Ke.length+=He.length}}_parseAACAudioData(M,B,I){if(I<=1){w.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let j={},J=new Uint8Array(M,B,I);return j.packetType=J[0],J[0]===0?j.data=this._parseAACAudioSpecificConfig(M,B+1,I-1):j.data=J.subarray(1),j}_parseAACAudioSpecificConfig(M,B,I){let j=new Uint8Array(M,B,I),J=null,ye=0,be=0,Le=null,Se=0,Ye=null;if(ye=be=j[0]>>>3,Se=(j[0]&7)<<1|j[1]>>>7,Se<0||Se>=this._mpegSamplingRates.length){this._onError(Mt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Ge=this._mpegSamplingRates[Se],Re=(j[1]&120)>>>3;if(Re<0||Re>=8){this._onError(Mt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}ye===5&&(Ye=(j[1]&7)<<1|j[2]>>>7,Le=(j[2]&124)>>>2);let De=self.navigator.userAgent.toLowerCase();return De.indexOf("firefox")!==-1?Se>=6?(ye=5,J=new Array(4),Ye=Se-3):(ye=2,J=new Array(2),Ye=Se):De.indexOf("android")!==-1?(ye=2,J=new Array(2),Ye=Se):(ye=5,Ye=Se,J=new Array(4),Se>=6?Ye=Se-3:Re===1&&(ye=2,J=new Array(2),Ye=Se)),J[0]=ye<<3,J[0]|=(Se&15)>>>1,J[1]=(Se&15)<<7,J[1]|=(Re&15)<<3,ye===5&&(J[1]|=(Ye&15)>>>1,J[2]=(Ye&1)<<7,J[2]|=8,J[3]=0),{config:J,samplingRate:Ge,channelCount:Re,codec:"mp4a.40."+ye,originalCodec:"mp4a.40."+be}}_parseMP3AudioData(M,B,I,j){if(I<4){w.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let J=this._littleEndian,ye=new Uint8Array(M,B,I),be=null;if(j){if(ye[0]!==255)return;let Le=ye[1]>>>3&3,Se=(ye[1]&6)>>1,Ye=(ye[2]&240)>>>4,Ge=(ye[2]&12)>>>2,De=(ye[3]>>>6&3)!==3?2:1,Ke=0,He=0,Je=34,ke="mp3";switch(Le){case 0:Ke=this._mpegAudioV25SampleRateTable[Ge];break;case 2:Ke=this._mpegAudioV20SampleRateTable[Ge];break;case 3:Ke=this._mpegAudioV10SampleRateTable[Ge];break}switch(Se){case 1:Je=34,Ye>>4,Le=ye&15;if(Le!==7){this._onError(Mt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${Le}`);return}this._parseAVCVideoPacket(M,B+1,I-1,j,J,be)}_parseAVCVideoPacket(M,B,I,j,J,ye){if(I<4){w.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let be=this._littleEndian,Le=new DataView(M,B,I),Se=Le.getUint8(0),Ge=(Le.getUint32(0,!be)&16777215)<<8>>8;if(Se===0)this._parseAVCDecoderConfigurationRecord(M,B+4,I-4);else if(Se===1)this._parseAVCVideoData(M,B+4,I-4,j,J,ye,Ge);else if(Se!==2){this._onError(Mt.FORMAT_ERROR,`Flv: Invalid video packet type ${Se}`);return}}_parseAVCDecoderConfigurationRecord(M,B,I){if(I<7){w.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let j=this._videoMetadata,J=this._videoTrack,ye=this._littleEndian,be=new DataView(M,B,I);j?typeof j.avcc!="undefined"&&w.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),j=this._videoMetadata={},j.type="video",j.id=J.id,j.timescale=this._timescale,j.duration=this._duration);let Le=be.getUint8(0),Se=be.getUint8(1),Ye=be.getUint8(2),Ge=be.getUint8(3);if(Le!==1||Se===0){this._onError(Mt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(be.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Mt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let Re=be.getUint8(5)&31;if(Re===0){this._onError(Mt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Re>1&&w.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${Re}`);let De=6;for(let He=0;He1&&w.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${Ke}`);De++;for(let He=0;He=I){w.w(this.TAG,`Malformed Nalu near timestamp ${Ke}, offset = ${Re}, dataSize = ${I}`);break}let Je=Se.getUint32(Re,!Le);if(De===3&&(Je>>>=8),Je>I-De){w.w(this.TAG,`Malformed Nalus near timestamp ${Ke}, NaluSize > DataSize!`);return}let ke=Se.getUint8(Re+De)&31;ke===5&&(He=!0);let Ze=new Uint8Array(M,B+Re,De+Je),tt={type:ke,data:Ze};Ye.push(tt),Ge+=Ze.byteLength,Re+=De+Je}if(Ye.length){let Je=this._videoTrack,ke={units:Ye,length:Ge,isKeyframe:He,dts:Ke,cts:be,pts:Ke+be};He&&(ke.fileposition=J),Je.samples.push(ke),Je.length+=Ge}}}var We=Ne;class Be{static init(){Be.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let B in Be.types)Be.types.hasOwnProperty(B)&&(Be.types[B]=[B.charCodeAt(0),B.charCodeAt(1),B.charCodeAt(2),B.charCodeAt(3)]);let M=Be.constants={};M.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),M.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),M.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),M.STSC=M.STCO=M.STTS,M.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),M.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),M.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),M.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),M.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(M){let B=8,I=null,j=Array.prototype.slice.call(arguments,1),J=j.length;for(let be=0;be>>24&255,I[1]=B>>>16&255,I[2]=B>>>8&255,I[3]=B&255,I.set(M,4);let ye=8;for(let be=0;be>>24&255,M>>>16&255,M>>>8&255,M&255,B>>>24&255,B>>>16&255,B>>>8&255,B&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(M){return Be.box(Be.types.trak,Be.tkhd(M),Be.mdia(M))}static tkhd(M){let B=M.id,I=M.duration,j=M.presentWidth,J=M.presentHeight;return Be.box(Be.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,0,0,0,0,I>>>24&255,I>>>16&255,I>>>8&255,I&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,j>>>8&255,j&255,0,0,J>>>8&255,J&255,0,0]))}static mdia(M){return Be.box(Be.types.mdia,Be.mdhd(M),Be.hdlr(M),Be.minf(M))}static mdhd(M){let B=M.timescale,I=M.duration;return Be.box(Be.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255,85,196,0,0]))}static hdlr(M){let B=null;return M.type==="audio"?B=Be.constants.HDLR_AUDIO:B=Be.constants.HDLR_VIDEO,Be.box(Be.types.hdlr,B)}static minf(M){let B=null;return M.type==="audio"?B=Be.box(Be.types.smhd,Be.constants.SMHD):B=Be.box(Be.types.vmhd,Be.constants.VMHD),Be.box(Be.types.minf,B,Be.dinf(),Be.stbl(M))}static dinf(){return Be.box(Be.types.dinf,Be.box(Be.types.dref,Be.constants.DREF))}static stbl(M){return Be.box(Be.types.stbl,Be.stsd(M),Be.box(Be.types.stts,Be.constants.STTS),Be.box(Be.types.stsc,Be.constants.STSC),Be.box(Be.types.stsz,Be.constants.STSZ),Be.box(Be.types.stco,Be.constants.STCO))}static stsd(M){return M.type==="audio"?M.codec==="mp3"?Be.box(Be.types.stsd,Be.constants.STSD_PREFIX,Be.mp3(M)):Be.box(Be.types.stsd,Be.constants.STSD_PREFIX,Be.mp4a(M)):Be.box(Be.types.stsd,Be.constants.STSD_PREFIX,Be.avc1(M))}static mp3(M){let B=M.channelCount,I=M.audioSampleRate,j=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,B,0,16,0,0,0,0,I>>>8&255,I&255,0,0]);return Be.box(Be.types[".mp3"],j)}static mp4a(M){let B=M.channelCount,I=M.audioSampleRate,j=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,B,0,16,0,0,0,0,I>>>8&255,I&255,0,0]);return Be.box(Be.types.mp4a,j,Be.esds(M))}static esds(M){let B=M.config||[],I=B.length,j=new Uint8Array([0,0,0,0,3,23+I,0,1,0,4,15+I,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([I]).concat(B).concat([6,1,2]));return Be.box(Be.types.esds,j)}static avc1(M){let B=M.avcc,I=M.codecWidth,j=M.codecHeight,J=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,I>>>8&255,I&255,j>>>8&255,j&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Be.box(Be.types.avc1,J,Be.box(Be.types.avcC,B))}static mvex(M){return Be.box(Be.types.mvex,Be.trex(M))}static trex(M){let B=M.id,I=new Uint8Array([0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Be.box(Be.types.trex,I)}static moof(M,B){return Be.box(Be.types.moof,Be.mfhd(M.sequenceNumber),Be.traf(M,B))}static mfhd(M){let B=new Uint8Array([0,0,0,0,M>>>24&255,M>>>16&255,M>>>8&255,M&255]);return Be.box(Be.types.mfhd,B)}static traf(M,B){let I=M.id,j=Be.box(Be.types.tfhd,new Uint8Array([0,0,0,0,I>>>24&255,I>>>16&255,I>>>8&255,I&255])),J=Be.box(Be.types.tfdt,new Uint8Array([0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255])),ye=Be.sdtp(M),be=Be.trun(M,ye.byteLength+16+16+8+16+8+8);return Be.box(Be.types.traf,j,J,be,ye)}static sdtp(M){let B=M.samples||[],I=B.length,j=new Uint8Array(4+I);for(let J=0;J>>24&255,j>>>16&255,j>>>8&255,j&255,B>>>24&255,B>>>16&255,B>>>8&255,B&255],0);for(let be=0;be>>24&255,Le>>>16&255,Le>>>8&255,Le&255,Se>>>24&255,Se>>>16&255,Se>>>8&255,Se&255,Ye.isLeading<<2|Ye.dependsOn,Ye.isDependedOn<<6|Ye.hasRedundancy<<4|Ye.isNonSync,0,0,Ge>>>24&255,Ge>>>16&255,Ge>>>8&255,Ge&255],12+16*be)}return Be.box(Be.types.trun,ye)}static mdat(M){return Be.box(Be.types.mdat,M)}}Be.init();var Ve=Be;class $e{static getSilentFrame(M,B){if(M==="mp4a.40.2"){if(B===1)return new Uint8Array([0,200,0,128,35,128]);if(B===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(B===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(B===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(B===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(B===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(B===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(B===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(B===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var lt=$e;class pt{constructor(M,B,I,j,J){this.dts=M,this.pts=B,this.duration=I,this.originalDts=j,this.isSyncPoint=J,this.fileposition=null}}class xt{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(M){M.isSyncPoint=!0,this.syncPoints.push(M)}}class wt{constructor(){this._list=[]}clear(){this._list=[]}appendArray(M){let B=this._list;M.length!==0&&(B.length>0&&M[0].originalDts=B[J].dts&&MB[j].lastSample.originalDts&&M=B[j].lastSample.originalDts&&(j===B.length-1||j0&&(J=this._searchNearestSegmentBefore(I.originalBeginDts)+1),this._lastAppendLocation=J,this._list.splice(J,0,I)}getLastSegmentBefore(M){let B=this._searchNearestSegmentBefore(M);return B>=0?this._list[B]:null}getLastSampleBefore(M){let B=this.getLastSegmentBefore(M);return B!=null?B.lastSample:null}getLastSyncPointBefore(M){let B=this._searchNearestSegmentBefore(M),I=this._list[B].syncPoints;for(;I.length===0&&B>0;)B--,I=this._list[B].syncPoints;return I.length>0?I[I.length-1]:null}}class kt{constructor(M){this.TAG="MP4Remuxer",this._config=M,this._isLive=M.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Dt("audio"),this._videoSegmentInfoList=new Dt("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(O.chrome&&(O.version.major<50||O.version.major===50&&O.version.build<2661)),this._fillSilentAfterSeek=O.msedge||O.msie,this._mp3UseMpegAudio=!O.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(M){return M.onDataAvailable=this.remux.bind(this),M.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(M){this._onInitSegment=M}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(M){this._onMediaSegment=M}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(M){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(M,B){if(!this._onMediaSegment)throw new E("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(M,B),this._remuxVideo(B),this._remuxAudio(M)}_onTrackMetadataReceived(M,B){let I=null,j="mp4",J=B.codec;if(M==="audio")this._audioMeta=B,B.codec==="mp3"&&this._mp3UseMpegAudio?(j="mpeg",J="",I=new Uint8Array):I=Ve.generateInitSegment(B);else if(M==="video")this._videoMeta=B,I=Ve.generateInitSegment(B);else return;if(!this._onInitSegment)throw new E("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(M,{type:M,data:I.buffer,codec:J,container:`${M}/${j}`,mediaDuration:B.duration})}_calculateDtsBase(M,B){this._dtsBaseInited||(M.samples&&M.samples.length&&(this._audioDtsBase=M.samples[0].dts),B.samples&&B.samples.length&&(this._videoDtsBase=B.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let M=this._videoStashedLastSample,B=this._audioStashedLastSample,I={type:"video",id:1,sequenceNumber:0,samples:[],length:0};M!=null&&(I.samples.push(M),I.length=M.length);let j={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};B!=null&&(j.samples.push(B),j.length=B.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(I,!0),this._remuxAudio(j,!0)}_remuxAudio(M,B){if(this._audioMeta==null)return;let I=M,j=I.samples,J,ye=-1,be=-1,Le=-1,Se=this._audioMeta.refSampleDuration,Ye=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Ge=this._dtsBaseInited&&this._audioNextDts===void 0,Re=!1;if(!j||j.length===0||j.length===1&&!B)return;let De=0,Ke=null,He=0;Ye?(De=0,He=I.length):(De=8,He=8+I.length);let Je=null;if(j.length>1&&(Je=j.pop(),He-=Je.length),this._audioStashedLastSample!=null){let vt=this._audioStashedLastSample;this._audioStashedLastSample=null,j.unshift(vt),He+=vt.length}Je!=null&&(this._audioStashedLastSample=Je);let ke=j[0].dts-this._dtsBase;if(this._audioNextDts)J=ke-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())J=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(Re=!0);else{let vt=this._audioSegmentInfoList.getLastSampleBefore(ke);if(vt!=null){let Rt=ke-(vt.originalDts+vt.duration);Rt<=3&&(Rt=0);let Bt=vt.dts+vt.duration+Rt;J=ke-Bt}else J=0}if(Re){let vt=ke-J,Rt=this._videoSegmentInfoList.getLastSegmentBefore(ke);if(Rt!=null&&Rt.beginDts=1?Pt=Ze[Ze.length-1].duration:Pt=Math.floor(Se);let St=!1,on=null;if(Pt>Se*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!O.safari){St=!0;let ln=Math.abs(Pt-Se),Zt=Math.ceil(ln/Se),Jt=gt+Se;w.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync. dts: ${gt+Pt} ms, expected: ${gt+Math.round(Se)} ms, delta: ${Math.round(ln)} ms, generate: ${Zt} frames`);let Xt=lt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Xt==null&&(w.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),Xt=Bt),on=[];for(let gn=0;gn0){let pn=on[on.length-1];pn.duration=Mn-pn.dts}let Hn={dts:Mn,pts:Mn,cts:0,unit:Xt,size:Xt.byteLength,duration:0,originalDts:Qe,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};on.push(Hn),He+=Hn.size,Jt+=Se}let dn=on[on.length-1];dn.duration=gt+Pt-dn.dts,Pt=Math.round(Se)}Ze.push({dts:gt,pts:gt,cts:0,unit:Rt.unit,size:Rt.unit.byteLength,duration:Pt,originalDts:Qe,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),St&&Ze.push.apply(Ze,on)}Ye?Ke=new Uint8Array(He):(Ke=new Uint8Array(He),Ke[0]=He>>>24&255,Ke[1]=He>>>16&255,Ke[2]=He>>>8&255,Ke[3]=He&255,Ke.set(Ve.types.mdat,4));for(let vt=0;vt1&&(De=j.pop(),Re-=De.length),this._videoStashedLastSample!=null){let tt=this._videoStashedLastSample;this._videoStashedLastSample=null,j.unshift(tt),Re+=tt.length}De!=null&&(this._videoStashedLastSample=De);let Ke=j[0].dts-this._dtsBase;if(this._videoNextDts)J=Ke-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())J=0;else{let tt=this._videoSegmentInfoList.getLastSampleBefore(Ke);if(tt!=null){let mt=Ke-(tt.originalDts+tt.duration);mt<=3&&(mt=0);let Tt=tt.dts+tt.duration+mt;J=Ke-Tt}else J=0}let He=new xt,Je=[];for(let tt=0;tt=1?Qe=Je[Je.length-1].duration:Qe=Math.floor(this._videoMeta.refSampleDuration),It){let gt=new pt(vt,Bt,Qe,mt.dts,!0);gt.fileposition=mt.fileposition,He.appendSyncPoint(gt)}Je.push({dts:vt,pts:Bt,cts:Rt,units:mt.units,size:mt.length,isKeyframe:It,duration:Qe,originalDts:Tt,flags:{isLeading:0,dependsOn:It?2:1,isDependedOn:It?1:0,hasRedundancy:0,isNonSync:It?0:1}})}Ge=new Uint8Array(Re),Ge[0]=Re>>>24&255,Ge[1]=Re>>>16&255,Ge[2]=Re>>>8&255,Ge[3]=Re&255,Ge.set(Ve.types.mdat,4);for(let tt=0;tt{j.timestampBase=I,I+=j.duration,j.cors=M.cors,j.withCredentials=M.withCredentials,B.referrerPolicy&&(j.referrerPolicy=B.referrerPolicy)}),!isNaN(I)&&this._mediaDataSource.duration!==I&&(this._mediaDataSource.duration=I),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(M,B){this._emitter.addListener(M,B)}off(M,B){this._emitter.removeListener(M,B)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(M,B){this._currentSegmentIndex=M;let I=this._mediaDataSource.segments[M],j=this._ioctl=new re(I,this._config,M);j.onError=this._onIOException.bind(this),j.onSeeked=this._onIOSeeked.bind(this),j.onComplete=this._onIOComplete.bind(this),j.onRedirect=this._onIORedirect.bind(this),j.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),B?this._demuxer.bindDataSource(this._ioctl):j.onDataArrival=this._onInitChunkArrival.bind(this),j.open(B)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(M){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let B=this._searchSegmentIndexContains(M);if(B===this._currentSegmentIndex){let I=this._mediaInfo.segments[B];if(I==null)this._pendingSeekTime=M;else{let j=I.getNearestKeyframe(M);this._remuxer.seek(j.milliseconds),this._ioctl.seek(j.fileposition),this._pendingResolveSeekPoint=j.milliseconds}}else{let I=this._mediaInfo.segments[B];if(I==null)this._pendingSeekTime=M,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(B);else{let j=I.getNearestKeyframe(M);this._internalAbort(),this._remuxer.seek(M),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[B].timestampBase,this._loadSegment(B,j.fileposition),this._pendingResolveSeekPoint=j.milliseconds,this._reportSegmentMediaInfo(B)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(M){let B=this._mediaDataSource.segments,I=B.length-1;for(let j=0;j0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,j=this._demuxer.parseChunks(M,B);else if((I=We.probe(M)).match){this._demuxer=new We(I,this._config),this._remuxer||(this._remuxer=new Yt(this._config));let J=this._mediaDataSource;J.duration!=null&&!isNaN(J.duration)&&(this._demuxer.overridedDuration=J.duration),typeof J.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=J.hasAudio),typeof J.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=J.hasVideo),this._demuxer.timestampBase=J.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),j=this._demuxer.parseChunks(M,B)}else I=null,w.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Ot.DEMUX_ERROR,Mt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),j=0;return j}_onMediaInfo(M){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},M),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Fe.prototype));let B=Object.assign({},M);Object.setPrototypeOf(B,Fe.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=B,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let I=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(I)})}_onMetaDataArrived(M){this._emitter.emit(Ot.METADATA_ARRIVED,M)}_onScriptDataArrived(M){this._emitter.emit(Ot.SCRIPTDATA_ARRIVED,M)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(M){let I=M+1;I0&&I[0].originalDts===j&&(j=I[0].pts),this._emitter.emit(Ot.RECOMMEND_SEEKPOINT,j)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(M){let B=this._mediaInfo.segments[M],I=Object.assign({},B);I.duration=this._mediaInfo.duration,I.segmentCount=this._mediaInfo.segmentCount,delete I.segments,delete I.keyframesIndex,this._emitter.emit(Ot.MEDIA_INFO,I)}_reportStatisticsInfo(){let M={};M.url=this._ioctl.currentURL,M.hasRedirect=this._ioctl.hasRedirect,M.hasRedirect&&(M.redirectedURL=this._ioctl.currentRedirectedURL),M.speed=this._ioctl.currentSpeed,M.loaderType=this._ioctl.loaderType,M.currentSegmentIndex=this._currentSegmentIndex,M.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Ot.STATISTICS_INFO,M)}}var vn=en,Fn=function(_e){let M="TransmuxingWorker",B=null,I=He.bind(this);ee.install(),_e.addEventListener("message",function(Je){switch(Je.data.cmd){case"init":B=new vn(Je.data.param[0],Je.data.param[1]),B.on(Ot.IO_ERROR,Re.bind(this)),B.on(Ot.DEMUX_ERROR,De.bind(this)),B.on(Ot.INIT_SEGMENT,j.bind(this)),B.on(Ot.MEDIA_SEGMENT,J.bind(this)),B.on(Ot.LOADING_COMPLETE,ye.bind(this)),B.on(Ot.RECOVERED_EARLY_EOF,be.bind(this)),B.on(Ot.MEDIA_INFO,Le.bind(this)),B.on(Ot.METADATA_ARRIVED,Se.bind(this)),B.on(Ot.SCRIPTDATA_ARRIVED,Ye.bind(this)),B.on(Ot.STATISTICS_INFO,Ge.bind(this)),B.on(Ot.RECOMMEND_SEEKPOINT,Ke.bind(this));break;case"destroy":B&&(B.destroy(),B=null),_e.postMessage({msg:"destroyed"});break;case"start":B.start();break;case"stop":B.stop();break;case"seek":B.seek(Je.data.param);break;case"pause":B.pause();break;case"resume":B.resume();break;case"logging_config":{let ke=Je.data.param;Ee.applyConfig(ke),ke.enableCallback===!0?Ee.addLogListener(I):Ee.removeLogListener(I);break}}});function j(Je,ke){let Ze={msg:Ot.INIT_SEGMENT,data:{type:Je,data:ke}};_e.postMessage(Ze,[ke.data])}function J(Je,ke){let Ze={msg:Ot.MEDIA_SEGMENT,data:{type:Je,data:ke}};_e.postMessage(Ze,[ke.data])}function ye(){let Je={msg:Ot.LOADING_COMPLETE};_e.postMessage(Je)}function be(){let Je={msg:Ot.RECOVERED_EARLY_EOF};_e.postMessage(Je)}function Le(Je){let ke={msg:Ot.MEDIA_INFO,data:Je};_e.postMessage(ke)}function Se(Je){let ke={msg:Ot.METADATA_ARRIVED,data:Je};_e.postMessage(ke)}function Ye(Je){let ke={msg:Ot.SCRIPTDATA_ARRIVED,data:Je};_e.postMessage(ke)}function Ge(Je){let ke={msg:Ot.STATISTICS_INFO,data:Je};_e.postMessage(ke)}function Re(Je,ke){_e.postMessage({msg:Ot.IO_ERROR,data:{type:Je,info:ke}})}function De(Je,ke){_e.postMessage({msg:Ot.DEMUX_ERROR,data:{type:Je,info:ke}})}function Ke(Je){_e.postMessage({msg:Ot.RECOMMEND_SEEKPOINT,data:Je})}function He(Je,ke){_e.postMessage({msg:"logcat_callback",data:{type:Je,logcat:ke}})}};class qn{constructor(M,B){if(this.TAG="Transmuxer",this._emitter=new(_()),B.enableWorker&&typeof Worker!="undefined")try{let I=X(82059);this._worker=I(Fn),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[M,B]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Ee.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Ee.getConfig()})}catch(I){w.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new vn(M,B)}else this._controller=new vn(M,B);if(this._controller){let I=this._controller;I.on(Ot.IO_ERROR,this._onIOError.bind(this)),I.on(Ot.DEMUX_ERROR,this._onDemuxError.bind(this)),I.on(Ot.INIT_SEGMENT,this._onInitSegment.bind(this)),I.on(Ot.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),I.on(Ot.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),I.on(Ot.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),I.on(Ot.MEDIA_INFO,this._onMediaInfo.bind(this)),I.on(Ot.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),I.on(Ot.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),I.on(Ot.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),I.on(Ot.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Ee.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(M,B){this._emitter.addListener(M,B)}off(M,B){this._emitter.removeListener(M,B)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(M){this._worker?this._worker.postMessage({cmd:"seek",param:M}):this._controller.seek(M)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(M,B){Promise.resolve().then(()=>{this._emitter.emit(Ot.INIT_SEGMENT,M,B)})}_onMediaSegment(M,B){Promise.resolve().then(()=>{this._emitter.emit(Ot.MEDIA_SEGMENT,M,B)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Ot.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Ot.RECOVERED_EARLY_EOF)})}_onMediaInfo(M){Promise.resolve().then(()=>{this._emitter.emit(Ot.MEDIA_INFO,M)})}_onMetaDataArrived(M){Promise.resolve().then(()=>{this._emitter.emit(Ot.METADATA_ARRIVED,M)})}_onScriptDataArrived(M){Promise.resolve().then(()=>{this._emitter.emit(Ot.SCRIPTDATA_ARRIVED,M)})}_onStatisticsInfo(M){Promise.resolve().then(()=>{this._emitter.emit(Ot.STATISTICS_INFO,M)})}_onIOError(M,B){Promise.resolve().then(()=>{this._emitter.emit(Ot.IO_ERROR,M,B)})}_onDemuxError(M,B){Promise.resolve().then(()=>{this._emitter.emit(Ot.DEMUX_ERROR,M,B)})}_onRecommendSeekpoint(M){Promise.resolve().then(()=>{this._emitter.emit(Ot.RECOMMEND_SEEKPOINT,M)})}_onLoggingConfigChanged(M){this._worker&&this._worker.postMessage({cmd:"logging_config",param:M})}_onWorkerMessage(M){let B=M.data,I=B.data;if(B.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(B.msg){case Ot.INIT_SEGMENT:case Ot.MEDIA_SEGMENT:this._emitter.emit(B.msg,I.type,I.data);break;case Ot.LOADING_COMPLETE:case Ot.RECOVERED_EARLY_EOF:this._emitter.emit(B.msg);break;case Ot.MEDIA_INFO:Object.setPrototypeOf(I,Fe.prototype),this._emitter.emit(B.msg,I);break;case Ot.METADATA_ARRIVED:case Ot.SCRIPTDATA_ARRIVED:case Ot.STATISTICS_INFO:this._emitter.emit(B.msg,I);break;case Ot.IO_ERROR:case Ot.DEMUX_ERROR:this._emitter.emit(B.msg,I.type,I.info);break;case Ot.RECOMMEND_SEEKPOINT:this._emitter.emit(B.msg,I);break;case"logcat_callback":w.emitter.emit("log",I.type,I.logcat);break;default:break}}}var br=qn,tr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class lr{constructor(M){this.TAG="MSEController",this._config=M,this._emitter=new(_()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new wt}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(M,B){this._emitter.addListener(M,B)}off(M,B){this._emitter.removeListener(M,B)}attachMediaElement(M){if(this._mediaSource)throw new E("MediaSource has been attached to an HTMLMediaElement!");let B=this._mediaSource=new window.MediaSource;B.addEventListener("sourceopen",this.e.onSourceOpen),B.addEventListener("sourceended",this.e.onSourceEnded),B.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=M,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),M.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let M=this._mediaSource;for(let B in this._sourceBuffers){let I=this._pendingSegments[B];I.splice(0,I.length),this._pendingSegments[B]=null,this._pendingRemoveRanges[B]=null,this._lastInitSegments[B]=null;let j=this._sourceBuffers[B];if(j){if(M.readyState!=="closed"){try{M.removeSourceBuffer(j)}catch(J){w.e(this.TAG,J.message)}j.removeEventListener("error",this.e.onSourceBufferError),j.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[B]=null,this._sourceBuffers[B]=null}}if(M.readyState==="open")try{M.endOfStream()}catch(B){w.e(this.TAG,B.message)}M.removeEventListener("sourceopen",this.e.onSourceOpen),M.removeEventListener("sourceended",this.e.onSourceEnded),M.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(M,B){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(M),this._pendingSegments[M.type].push(M);return}let I=M,j=`${I.container}`;I.codec&&I.codec.length>0&&(j+=`;codecs=${I.codec}`);let J=!1;if(w.v(this.TAG,"Received Initialization Segment, mimeType: "+j),this._lastInitSegments[I.type]=I,j!==this._mimeTypes[I.type]){if(this._mimeTypes[I.type])w.v(this.TAG,`Notice: ${I.type} mimeType changed, origin: ${this._mimeTypes[I.type]}, target: ${j}`);else{J=!0;try{let ye=this._sourceBuffers[I.type]=this._mediaSource.addSourceBuffer(j);ye.addEventListener("error",this.e.onSourceBufferError),ye.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(ye){w.e(this.TAG,ye.message),this._emitter.emit(tr.ERROR,{code:ye.code,msg:ye.message});return}}this._mimeTypes[I.type]=j}B||this._pendingSegments[I.type].push(I),J||this._sourceBuffers[I.type]&&!this._sourceBuffers[I.type].updating&&this._doAppendSegments(),O.safari&&I.container==="audio/mpeg"&&I.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=I.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(M){let B=M;this._pendingSegments[B.type].push(B),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let I=this._sourceBuffers[B.type];I&&!I.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(M){for(let B in this._sourceBuffers){if(!this._sourceBuffers[B])continue;let I=this._sourceBuffers[B];if(this._mediaSource.readyState==="open")try{I.abort()}catch(J){w.e(this.TAG,J.message)}this._idrList.clear();let j=this._pendingSegments[B];if(j.splice(0,j.length),this._mediaSource.readyState!=="closed"){for(let J=0;J=1&&M-j.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let M=this._mediaElement.currentTime;for(let B in this._sourceBuffers){let I=this._sourceBuffers[B];if(I){let j=I.buffered,J=!1;for(let ye=0;ye=this._config.autoCleanupMaxBackwardDuration){J=!0;let Se=M-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[B].push({start:be,end:Se})}}else Le0&&(isNaN(B)||I>B)&&(w.v(this.TAG,`Update MediaSource duration from ${B} to ${I}`),this._mediaSource.duration=I),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let M in this._pendingRemoveRanges){if(!this._sourceBuffers[M]||this._sourceBuffers[M].updating)continue;let B=this._sourceBuffers[M],I=this._pendingRemoveRanges[M];for(;I.length&&!B.updating;){let j=I.shift();B.remove(j.start,j.end)}}}_doAppendSegments(){let M=this._pendingSegments;for(let B in M)if(!(!this._sourceBuffers[B]||this._sourceBuffers[B].updating)&&M[B].length>0){let I=M[B].shift();if(I.timestampOffset){let j=this._sourceBuffers[B].timestampOffset,J=I.timestampOffset/1e3;Math.abs(j-J)>.1&&(w.v(this.TAG,`Update MPEG audio timestampOffset from ${j} to ${J}`),this._sourceBuffers[B].timestampOffset=J),delete I.timestampOffset}if(!I.data||I.data.byteLength===0)continue;try{this._sourceBuffers[B].appendBuffer(I.data),this._isBufferFull=!1,B==="video"&&I.hasOwnProperty("info")&&this._idrList.appendArray(I.info.syncPoints)}catch(j){this._pendingSegments[B].unshift(I),j.code===22?(this._isBufferFull||this._emitter.emit(tr.BUFFER_FULL),this._isBufferFull=!0):(w.e(this.TAG,j.message),this._emitter.emit(tr.ERROR,{code:j.code,msg:j.message}))}}}_onSourceOpen(){if(w.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let M=this._pendingSourceBufferInit;for(;M.length;){let B=M.shift();this.appendInitSegment(B,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(tr.SOURCE_OPEN)}_onSourceEnded(){w.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){w.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let M=this._pendingSegments;return M.video.length>0||M.audio.length>0}_hasPendingRemoveRanges(){let M=this._pendingRemoveRanges;return M.video.length>0||M.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(tr.UPDATE_END)}_onSourceBufferError(M){w.e(this.TAG,`SourceBuffer Error: ${M}`)}}var nr=lr;const an={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},tn={NETWORK_EXCEPTION:d.EXCEPTION,NETWORK_STATUS_CODE_INVALID:d.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:d.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:d.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Mt.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Mt.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Mt.CODEC_UNSUPPORTED};class An{constructor(M,B){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(_()),this._config=oe(),typeof B=="object"&&Object.assign(this._config,B),M.type.toLowerCase()!=="flv")throw new g("FlvPlayer requires an flv MediaDataSource input!");M.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=M,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let I=O.chrome&&(O.version.major<50||O.version.major===50&&O.version.build<2661);this._alwaysSeekKeyframe=!!(I||O.msedge||O.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(M,B){M===me.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(me.MEDIA_INFO,this.mediaInfo)}):M===me.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(me.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(M,B)}off(M,B){this._emitter.removeListener(M,B)}attachMediaElement(M){if(this._mediaElement=M,M.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),M.addEventListener("seeking",this.e.onvSeeking),M.addEventListener("canplay",this.e.onvCanPlay),M.addEventListener("stalled",this.e.onvStalled),M.addEventListener("progress",this.e.onvProgress),this._msectl=new nr(this._config),this._msectl.on(tr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(tr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(tr.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(tr.ERROR,B=>{this._emitter.emit(me.ERROR,an.MEDIA_ERROR,tn.MEDIA_MSE_ERROR,B)}),this._msectl.attachMediaElement(M),this._pendingSeekTime!=null)try{M.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(B){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new E("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new E("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new br(this._mediaDataSource,this._config),this._transmuxer.on(Ot.INIT_SEGMENT,(M,B)=>{this._msectl.appendInitSegment(B)}),this._transmuxer.on(Ot.MEDIA_SEGMENT,(M,B)=>{if(this._msectl.appendMediaSegment(B),this._config.lazyLoad&&!this._config.isLive){let I=this._mediaElement.currentTime;B.info.endDts>=(I+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(w.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Ot.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(me.LOADING_COMPLETE)}),this._transmuxer.on(Ot.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(me.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Ot.IO_ERROR,(M,B)=>{this._emitter.emit(me.ERROR,an.NETWORK_ERROR,M,B)}),this._transmuxer.on(Ot.DEMUX_ERROR,(M,B)=>{this._emitter.emit(me.ERROR,an.MEDIA_ERROR,M,{code:-1,msg:B})}),this._transmuxer.on(Ot.MEDIA_INFO,M=>{this._mediaInfo=M,this._emitter.emit(me.MEDIA_INFO,Object.assign({},M))}),this._transmuxer.on(Ot.METADATA_ARRIVED,M=>{this._emitter.emit(me.METADATA_ARRIVED,M)}),this._transmuxer.on(Ot.SCRIPTDATA_ARRIVED,M=>{this._emitter.emit(me.SCRIPTDATA_ARRIVED,M)}),this._transmuxer.on(Ot.STATISTICS_INFO,M=>{this._statisticsInfo=this._fillStatisticsInfo(M),this._emitter.emit(me.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Ot.RECOMMEND_SEEKPOINT,M=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=M/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(M){this._mediaElement.volume=M}get muted(){return this._mediaElement.muted}set muted(M){this._mediaElement.muted=M}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(M){this._mediaElement?this._internalSeek(M):this._pendingSeekTime=M}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(M){if(M.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return M;let B=!0,I=0,j=0;if(this._mediaElement.getVideoPlaybackQuality){let J=this._mediaElement.getVideoPlaybackQuality();I=J.totalVideoFrames,j=J.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(I=this._mediaElement.webkitDecodedFrameCount,j=this._mediaElement.webkitDroppedFrameCount):B=!1;return B&&(M.decodedFrames=I,M.droppedFrames=j),M}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let M=this._mediaElement.buffered,B=this._mediaElement.currentTime,I=0,j=0;for(let J=0;J=B+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(w.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){w.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let M=this._mediaElement.currentTime,B=this._mediaElement.buffered,I=!1;for(let j=0;j=J&&M=ye-this._config.lazyLoadRecoverDuration&&(I=!0);break}}I&&(window.clearInterval(this._progressChecker),this._progressChecker=null,I&&(w.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(M){let B=this._mediaElement.buffered;for(let I=0;I=j&&M0){let J=this._mediaElement.buffered.start(0);(J<1&&M0&&B.currentTime0){let j=I.start(0);if(j<1&&B{this._emitter.emit(me.MEDIA_INFO,this.mediaInfo)}):M===me.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(me.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(M,B)}off(M,B){this._emitter.removeListener(M,B)}attachMediaElement(M){if(this._mediaElement=M,M.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{M.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(B){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new E("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(M){this._mediaElement.volume=M}get muted(){return this._mediaElement.muted}set muted(M){this._mediaElement.muted=M}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(M){this._mediaElement?this._mediaElement.currentTime=M:this._pendingSeekTime=M}get mediaInfo(){let B={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(B.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(B.width=this._mediaElement.videoWidth,B.height=this._mediaElement.videoHeight)),B}get statisticsInfo(){let M={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return M;let B=!0,I=0,j=0;if(this._mediaElement.getVideoPlaybackQuality){let J=this._mediaElement.getVideoPlaybackQuality();I=J.totalVideoFrames,j=J.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(I=this._mediaElement.webkitDecodedFrameCount,j=this._mediaElement.webkitDroppedFrameCount):B=!1;return B&&(M.decodedFrames=I,M.droppedFrames=j),M}_onvLoadedMetadata(M){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(me.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(me.STATISTICS_INFO,this.statisticsInfo)}}var ir=sn;ee.install();function Nt(_e,M){let B=_e;if(B==null||typeof B!="object")throw new g("MediaDataSource must be an javascript object!");if(!B.hasOwnProperty("type"))throw new g("MediaDataSource must has type field to indicate video file type!");switch(B.type){case"flv":return new wn(B,M);default:return new ir(B,M)}}function zt(){return se.supportMSEH264Playback()}function Gt(){return se.getFeatureList()}let jt={};jt.createPlayer=Nt,jt.isSupported=zt,jt.getFeatureList=Gt,jt.BaseLoader=v,jt.LoaderStatus=C,jt.LoaderErrors=d,jt.Events=me,jt.ErrorTypes=an,jt.ErrorDetails=tn,jt.FlvPlayer=wn,jt.NativePlayer=ir,jt.LoggingControl=Ee,Object.defineProperty(jt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var En=jt},81254:function(we,Me,X){"use strict";var K,ee=Object.defineProperty,G=_e=>{throw TypeError(_e)},_=Math.pow,F=(_e,M,B)=>M in _e?ee(_e,M,{enumerable:!0,configurable:!0,writable:!0,value:B}):_e[M]=B,w=(_e,M,B)=>F(_e,typeof M!="symbol"?M+"":M,B),x=(_e,M,B)=>M.has(_e)||G("Cannot "+B),y=(_e,M,B)=>(x(_e,M,"read from private field"),B?B.call(_e):M.get(_e)),b=(_e,M,B)=>M.has(_e)?G("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(_e):M.set(_e,B),E=(_e,M,B,I)=>(x(_e,M,"write to private field"),I?I.call(_e,B):M.set(_e,B),B),g=(_e,M,B)=>(x(_e,M,"access private method"),B),m,C,d;K={value:!0};var v=X(34634),A=X(34402);const T=" ".repeat(2),O=" ".repeat(4);function P(){return L(this)}function L(_e,M={}){const{maxRows:B=15,maxColumns:I=10,maxNumSize:j=8,padMinus:J="auto"}=M;return`${_e.constructor.name} { ${T}[ ${O}${c(_e,B,I,j,J)} ${T}] ${T}rows: ${_e.rows} ${T}columns: ${_e.columns} }`}function c(_e,M,B,I,j){const{rows:J,columns:ye}=_e,be=Math.min(J,M),Le=Math.min(ye,B),Se=[];if(j==="auto"){j=!1;e:for(let Ye=0;Ye=0&&B?` ${D(_e,M-1)}`:D(_e,M)).padEnd(M)}function D(_e,M){let B=_e.toString();if(B.length<=M)return B;let I=_e.toFixed(M);if(I.length>M&&(I=_e.toFixed(Math.max(0,M-(I.length-M)))),I.length<=M&&!I.startsWith("0.000")&&!I.startsWith("-0.000"))return I;let j=_e.toExponential(M);return j.length>M&&(j=_e.toExponential(Math.max(0,M-(j.length-M)))),j.slice(0)}function R(_e,M){_e.prototype.add=function(I){return typeof I=="number"?this.addS(I):this.addM(I)},_e.prototype.addS=function(I){for(let j=0;j>I);return this},_e.prototype.signPropagatingRightShiftM=function(I){if(I=M.checkMatrix(I),this.rows!==I.rows||this.columns!==I.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j>I.get(j,J));return this},_e.signPropagatingRightShift=function(I,j){return new M(I).signPropagatingRightShift(j)},_e.prototype.rightShift=function(I){return typeof I=="number"?this.rightShiftS(I):this.rightShiftM(I)},_e.prototype.rightShiftS=function(I){for(let j=0;j>>I);return this},_e.prototype.rightShiftM=function(I){if(I=M.checkMatrix(I),this.rows!==I.rows||this.columns!==I.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j>>I.get(j,J));return this},_e.rightShift=function(I,j){return new M(I).rightShift(j)},_e.prototype.zeroFillRightShift=_e.prototype.rightShift,_e.prototype.zeroFillRightShiftS=_e.prototype.rightShiftS,_e.prototype.zeroFillRightShiftM=_e.prototype.rightShiftM,_e.zeroFillRightShift=_e.rightShift,_e.prototype.not=function(){for(let I=0;II)throw new RangeError("Row index out of range")}function W(_e,M,B){let I=B?_e.columns:_e.columns-1;if(M<0||M>I)throw new RangeError("Column index out of range")}function z(_e,M){if(M.to1DArray&&(M=M.to1DArray()),M.length!==_e.columns)throw new RangeError("vector size must be the same as the number of columns");return M}function Z(_e,M){if(M.to1DArray&&(M=M.to1DArray()),M.length!==_e.rows)throw new RangeError("vector size must be the same as the number of rows");return M}function Q(_e,M){if(!v.isAnyArray(M))throw new TypeError("row indices must be an array");for(let B=0;B=_e.rows)throw new RangeError("row indices are out of range")}function te(_e,M){if(!v.isAnyArray(M))throw new TypeError("column indices must be an array");for(let B=0;B=_e.columns)throw new RangeError("column indices are out of range")}function $(_e,M,B,I,j){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(ae("startRow",M),ae("endRow",B),ae("startColumn",I),ae("endColumn",j),M>B||I>j||M<0||M>=_e.rows||B<0||B>=_e.rows||I<0||I>=_e.columns||j<0||j>=_e.columns)throw new RangeError("Submatrix indices are out of range")}function ie(_e,M=0){let B=[];for(let I=0;I<_e;I++)B.push(M);return B}function ae(_e,M){if(typeof M!="number")throw new TypeError(`${_e} must be a number`)}function re(_e){if(_e.isEmpty())throw new Error("Empty matrix has no elements to index")}function ce(_e){let M=ie(_e.rows);for(let B=0;B<_e.rows;++B)for(let I=0;I<_e.columns;++I)M[B]+=_e.get(B,I);return M}function oe(_e){let M=ie(_e.columns);for(let B=0;B<_e.rows;++B)for(let I=0;I<_e.columns;++I)M[I]+=_e.get(B,I);return M}function he(_e){let M=0;for(let B=0;B<_e.rows;B++)for(let I=0;I<_e.columns;I++)M+=_e.get(B,I);return M}function se(_e){let M=ie(_e.rows,1);for(let B=0;B<_e.rows;++B)for(let I=0;I<_e.columns;++I)M[B]*=_e.get(B,I);return M}function pe(_e){let M=ie(_e.columns,1);for(let B=0;B<_e.rows;++B)for(let I=0;I<_e.columns;++I)M[I]*=_e.get(B,I);return M}function me(_e){let M=1;for(let B=0;B<_e.rows;B++)for(let I=0;I<_e.columns;I++)M*=_e.get(B,I);return M}function ge(_e,M,B){const I=_e.rows,j=_e.columns,J=[];for(let ye=0;ye=J)throw new RangeError("min must be smaller than max");let be=J-j,Le=new Ce(M,B);for(let Se=0;SeI?(J=!0,I=B):(j=!1,J=!0);M++}return j}isReducedEchelonForm(){let M=0,B=0,I=-1,j=!0,J=!1;for(;MI?(J=!0,I=B):(j=!1,J=!0);for(let ye=B+1;yeM.get(j,I)&&(j=J);if(M.get(j,I)===0)I++;else{M.swapRows(B,j);let J=M.get(B,I);for(let ye=I;ye=0;)if(M.maxRow(j)===0)j--;else{let J=0,ye=!1;for(;JB[I]&&(B[I]=this.get(I,j));return B}case"column":{const B=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let I=0;IB[j]&&(B[j]=this.get(I,j));return B}case void 0:{let B=this.get(0,0);for(let I=0;IB&&(B=this.get(I,j));return B}default:throw new Error(`invalid option: ${M}`)}}maxIndex(){re(this);let M=this.get(0,0),B=[0,0];for(let I=0;IM&&(M=this.get(I,j),B[0]=I,B[1]=j);return B}min(M){if(this.isEmpty())return NaN;switch(M){case"row":{const B=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let I=0;IB&&(B=this.get(M,I));return B}maxRowIndex(M){k(this,M),re(this);let B=this.get(M,0),I=[M,0];for(let j=1;jB&&(B=this.get(M,j),I[1]=j);return I}minRow(M){if(k(this,M),this.isEmpty())return NaN;let B=this.get(M,0);for(let I=1;IB&&(B=this.get(I,M));return B}maxColumnIndex(M){W(this,M),re(this);let B=this.get(0,M),I=[0,M];for(let j=1;jB&&(B=this.get(j,M),I[0]=j);return I}minColumn(M){if(W(this,M),this.isEmpty())return NaN;let B=this.get(0,M);for(let I=1;I=1;j/=2)j&1&&(B=B.mmul(I)),I=I.mmul(I);return B}strassen2x2(M){M=Ce.checkMatrix(M);let B=new Ce(2,2);const I=this.get(0,0),j=M.get(0,0),J=this.get(0,1),ye=M.get(0,1),be=this.get(1,0),Le=M.get(1,0),Se=this.get(1,1),Ye=M.get(1,1),Ge=(I+Se)*(j+Ye),Re=(be+Se)*j,De=I*(ye-Ye),Ke=Se*(Le-j),He=(I+J)*Ye,Je=(be-I)*(j+ye),ke=(J-Se)*(Le+Ye),Ze=Ge+Ke-He+ke,tt=De+He,mt=Re+Ke,Tt=Ge-Re+De+Je;return B.set(0,0,Ze),B.set(0,1,tt),B.set(1,0,mt),B.set(1,1,Tt),B}strassen3x3(M){M=Ce.checkMatrix(M);let B=new Ce(3,3);const I=this.get(0,0),j=this.get(0,1),J=this.get(0,2),ye=this.get(1,0),be=this.get(1,1),Le=this.get(1,2),Se=this.get(2,0),Ye=this.get(2,1),Ge=this.get(2,2),Re=M.get(0,0),De=M.get(0,1),Ke=M.get(0,2),He=M.get(1,0),Je=M.get(1,1),ke=M.get(1,2),Ze=M.get(2,0),tt=M.get(2,1),mt=M.get(2,2),Tt=(I+j+J-ye-be-Ye-Ge)*Je,It=(I-ye)*(-De+Je),vt=be*(-Re+De+He-Je-ke-Ze+mt),Rt=(-I+ye+be)*(Re-De+Je),Bt=(ye+be)*(-Re+De),Qe=I*Re,gt=(-I+Se+Ye)*(Re-Ke+ke),Pt=(-I+Se)*(Ke-ke),St=(Se+Ye)*(-Re+Ke),on=(I+j+J-be-Le-Se-Ye)*ke,ln=Ye*(-Re+Ke+He-Je-ke-Ze+tt),Zt=(-J+Ye+Ge)*(Je+Ze-tt),Jt=(J-Ge)*(Je-tt),Xt=J*Ze,dn=(Ye+Ge)*(-Ze+tt),gn=(-J+be+Le)*(ke+Ze-mt),Mn=(J-Le)*(ke-mt),Hn=(be+Le)*(-Ze+mt),pn=j*He,Rn=Le*tt,Yn=ye*Ke,Gn=Se*De,Cn=Ge*mt,Mr=Qe+Xt+pn,kr=Tt+Rt+Bt+Qe+Zt+Xt+dn,Rr=Qe+gt+St+on+Xt+gn+Hn,xr=It+vt+Rt+Qe+Xt+gn+Mn,rr=It+Rt+Bt+Qe+Rn,Zn=Xt+gn+Mn+Hn+Yn,Fr=Qe+gt+Pt+ln+Zt+Jt+Xt,ei=Zt+Jt+Xt+dn+Gn,ti=Qe+gt+Pt+St+Cn;return B.set(0,0,Mr),B.set(0,1,kr),B.set(0,2,Rr),B.set(1,0,xr),B.set(1,1,rr),B.set(1,2,Zn),B.set(2,0,Fr),B.set(2,1,ei),B.set(2,2,ti),B}mmulStrassen(M){M=Ce.checkMatrix(M);let B=this.clone(),I=B.rows,j=B.columns,J=M.rows,ye=M.columns;j!==J&&console.warn(`Multiplying ${I} x ${j} and ${J} x ${ye} matrix: dimensions do not match.`);function be(Ge,Re,De){let Ke=Ge.rows,He=Ge.columns;if(Ke===Re&&He===De)return Ge;{let Je=it.zeros(Re,De);return Je=Je.setSubMatrix(Ge,0,0),Je}}let Le=Math.max(I,J),Se=Math.max(j,ye);B=be(B,Le,Se),M=be(M,Le,Se);function Ye(Ge,Re,De,Ke){if(De<=512||Ke<=512)return Ge.mmul(Re);De%2===1&&Ke%2===1?(Ge=be(Ge,De+1,Ke+1),Re=be(Re,De+1,Ke+1)):De%2===1?(Ge=be(Ge,De+1,Ke),Re=be(Re,De+1,Ke)):Ke%2===1&&(Ge=be(Ge,De,Ke+1),Re=be(Re,De,Ke+1));let He=parseInt(Ge.rows/2,10),Je=parseInt(Ge.columns/2,10),ke=Ge.subMatrix(0,He-1,0,Je-1),Ze=Re.subMatrix(0,He-1,0,Je-1),tt=Ge.subMatrix(0,He-1,Je,Ge.columns-1),mt=Re.subMatrix(0,He-1,Je,Re.columns-1),Tt=Ge.subMatrix(He,Ge.rows-1,0,Je-1),It=Re.subMatrix(He,Re.rows-1,0,Je-1),vt=Ge.subMatrix(He,Ge.rows-1,Je,Ge.columns-1),Rt=Re.subMatrix(He,Re.rows-1,Je,Re.columns-1),Bt=Ye(it.add(ke,vt),it.add(Ze,Rt),He,Je),Qe=Ye(it.add(Tt,vt),Ze,He,Je),gt=Ye(ke,it.sub(mt,Rt),He,Je),Pt=Ye(vt,it.sub(It,Ze),He,Je),St=Ye(it.add(ke,tt),Rt,He,Je),on=Ye(it.sub(Tt,ke),it.add(Ze,mt),He,Je),ln=Ye(it.sub(tt,vt),it.add(It,Rt),He,Je),Zt=it.add(Bt,Pt);Zt.sub(St),Zt.add(ln);let Jt=it.add(gt,St),Xt=it.add(Qe,Pt),dn=it.sub(Bt,Qe);dn.add(gt),dn.add(on);let gn=it.zeros(2*Zt.rows,2*Zt.columns);return gn=gn.setSubMatrix(Zt,0,0),gn=gn.setSubMatrix(Jt,Zt.rows,0),gn=gn.setSubMatrix(Xt,0,Zt.columns),gn=gn.setSubMatrix(dn,Zt.rows,Zt.columns),gn.subMatrix(0,De-1,0,Ke-1)}return Ye(B,M,Le,Se)}scaleRows(M={}){if(typeof M!="object")throw new TypeError("options must be an object");const{min:B=0,max:I=1}=M;if(!Number.isFinite(B))throw new TypeError("min must be a number");if(!Number.isFinite(I))throw new TypeError("max must be a number");if(B>=I)throw new RangeError("min must be smaller than max");let j=new Ce(this.rows,this.columns);for(let J=0;J0&&A(ye,{min:B,max:I,output:ye}),j.setRow(J,ye)}return j}scaleColumns(M={}){if(typeof M!="object")throw new TypeError("options must be an object");const{min:B=0,max:I=1}=M;if(!Number.isFinite(B))throw new TypeError("min must be a number");if(!Number.isFinite(I))throw new TypeError("max must be a number");if(B>=I)throw new RangeError("min must be smaller than max");let j=new Ce(this.rows,this.columns);for(let J=0;JI||B<0||B>=this.columns||I<0||I>=this.columns)throw new RangeError("Argument out of range");let j=new Ce(M.length,I-B+1);for(let J=0;J=this.rows)throw new RangeError(`Row index out of range: ${M[J]}`);j.set(J,ye-B,this.get(M[J],ye))}return j}subMatrixColumn(M,B,I){if(B===void 0&&(B=0),I===void 0&&(I=this.rows-1),B>I||B<0||B>=this.rows||I<0||I>=this.rows)throw new RangeError("Argument out of range");let j=new Ce(I-B+1,M.length);for(let J=0;J=this.columns)throw new RangeError(`Column index out of range: ${M[J]}`);j.set(ye-B,J,this.get(ye,M[J]))}return j}setSubMatrix(M,B,I){if(M=Ce.checkMatrix(M),M.isEmpty())return this;let j=B+M.rows-1,J=I+M.columns-1;$(this,B,j,I,J);for(let ye=0;yetypeof M=="number")}it.random=it.rand,it.randomInt=it.randInt,it.diagonal=it.diag,it.prototype.diagonal=it.prototype.diag,it.identity=it.eye,it.prototype.negate=it.prototype.neg,it.prototype.tensorProduct=it.prototype.kroneckerProduct;const Mt=class wp extends it{constructor(M,B){if(super(),b(this,m),w(this,"data"),wp.isMatrix(M))g(this,m,C).call(this,M.rows,M.columns),wp.copy(M,this);else if(Number.isInteger(M)&&M>=0)g(this,m,C).call(this,M,B);else if(v.isAnyArray(M)){const I=M;if(M=I.length,B=M?I[0].length:0,typeof B!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let j=0;j=0)for(let B=0;B<_e;B++)this.data.push(new Float64Array(M));else throw new TypeError("nColumns must be a positive integer");this.rows=_e,this.columns=M};let Ce=Mt;R(it,Ce);const ot=class Mp extends it{constructor(M){if(super(),b(this,d),Ce.isMatrix(M)){if(!M.isSymmetric())throw new TypeError("not symmetric data");E(this,d,Ce.copy(M,new Ce(M.rows,M.rows)))}else if(Number.isInteger(M)&&M>=0)E(this,d,new Ce(M,M));else if(E(this,d,new Ce(M)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return y(this,d).size}get rows(){return y(this,d).rows}get columns(){return y(this,d).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(M){return Ce.isMatrix(M)&&M.klassType==="SymmetricMatrix"}static zeros(M){return new this(M)}static ones(M){return new this(M).fill(1)}clone(){const M=new Mp(this.diagonalSize);for(const[B,I,j]of this.upperRightEntries())M.set(B,I,j);return M}toMatrix(){return new Ce(this)}get(M,B){return y(this,d).get(M,B)}set(M,B,I){return y(this,d).set(M,B,I),y(this,d).set(B,M,I),this}removeCross(M){return y(this,d).removeRow(M),y(this,d).removeColumn(M),this}addCross(M,B){B===void 0&&(B=M,M=this.diagonalSize);const I=B.slice();return I.splice(M,1),y(this,d).addRow(M,I),y(this,d).addColumn(M,B),this}applyMask(M){if(M.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const B=[];for(const[I,j]of M.entries())j||B.push(I);B.reverse();for(const I of B)this.removeCross(I);return this}toCompact(){const{diagonalSize:M}=this,B=new Array(M*(M+1)/2);for(let I=0,j=0,J=0;J=M&&(I=++j);return B}static fromCompact(M){const B=M.length,I=(Math.sqrt(8*B+1)-1)/2;if(!Number.isInteger(I))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(M)}`);const j=new Mp(I);for(let J=0,ye=0,be=0;be=I&&(J=++ye);return j}*upperRightEntries(){for(let M=0,B=0;M=this.diagonalSize&&(B=++M)}}*upperRightValues(){for(let M=0,B=0;M=this.diagonalSize&&(B=++M)}};d=new WeakMap;let Pe=ot;Pe.prototype.klassType="SymmetricMatrix";class Ne extends Pe{static isDistanceMatrix(M){return Pe.isSymmetricMatrix(M)&&M.klassSubType==="DistanceMatrix"}constructor(M){if(super(M),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(M,B,I){return M===B&&(I=0),super.set(M,B,I)}addCross(M,B){return B===void 0&&(B=M,M=this.diagonalSize),B=B.slice(),B[M]=0,super.addCross(M,B)}toSymmetricMatrix(){return new Pe(this)}clone(){const M=new Ne(this.diagonalSize);for(const[B,I,j]of this.upperRightEntries())B!==I&&M.set(B,I,j);return M}toCompact(){const{diagonalSize:M}=this,B=(M-1)*M/2,I=new Array(B);for(let j=1,J=0,ye=0;ye=M&&(j=++J+1);return I}static fromCompact(M){const B=M.length;if(B===0)return new this(0);const I=(Math.sqrt(8*B+1)+1)/2;if(!Number.isInteger(I))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(M)}`);const j=new this(I);for(let J=1,ye=0,be=0;be=I&&(J=++ye+1);return j}}Ne.prototype.klassSubType="DistanceMatrix";class We extends it{constructor(M,B,I){super(),this.matrix=M,this.rows=B,this.columns=I}}class Be extends We{constructor(M,B){W(M,B),super(M,M.rows,1),this.column=B}set(M,B,I){return this.matrix.set(M,this.column,I),this}get(M){return this.matrix.get(M,this.column)}}class Ve extends We{constructor(M,B){te(M,B),super(M,M.rows,B.length),this.columnIndices=B}set(M,B,I){return this.matrix.set(M,this.columnIndices[B],I),this}get(M,B){return this.matrix.get(M,this.columnIndices[B])}}class $e extends We{constructor(M){super(M,M.rows,M.columns)}set(M,B,I){return this.matrix.set(M,this.columns-B-1,I),this}get(M,B){return this.matrix.get(M,this.columns-B-1)}}class lt extends We{constructor(M){super(M,M.rows,M.columns)}set(M,B,I){return this.matrix.set(this.rows-M-1,B,I),this}get(M,B){return this.matrix.get(this.rows-M-1,B)}}class pt extends We{constructor(M,B){k(M,B),super(M,1,M.columns),this.row=B}set(M,B,I){return this.matrix.set(this.row,B,I),this}get(M,B){return this.matrix.get(this.row,B)}}class xt extends We{constructor(M,B){Q(M,B),super(M,B.length,M.columns),this.rowIndices=B}set(M,B,I){return this.matrix.set(this.rowIndices[M],B,I),this}get(M,B){return this.matrix.get(this.rowIndices[M],B)}}class wt extends We{constructor(M,B,I){Q(M,B),te(M,I),super(M,B.length,I.length),this.rowIndices=B,this.columnIndices=I}set(M,B,I){return this.matrix.set(this.rowIndices[M],this.columnIndices[B],I),this}get(M,B){return this.matrix.get(this.rowIndices[M],this.columnIndices[B])}}class Dt extends We{constructor(M,B,I,j,J){$(M,B,I,j,J),super(M,I-B+1,J-j+1),this.startRow=B,this.startColumn=j}set(M,B,I){return this.matrix.set(this.startRow+M,this.startColumn+B,I),this}get(M,B){return this.matrix.get(this.startRow+M,this.startColumn+B)}}class kt extends We{constructor(M){super(M,M.columns,M.rows)}set(M,B,I){return this.matrix.set(B,M,I),this}get(M,B){return this.matrix.get(B,M)}}class Yt extends it{constructor(M,B={}){const{rows:I=1}=B;if(M.length%I!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=I,this.columns=M.length/I,this.data=M}set(M,B,I){let j=this._calculateIndex(M,B);return this.data[j]=I,this}get(M,B){let I=this._calculateIndex(M,B);return this.data[I]}_calculateIndex(M,B){return M*this.columns+B}}class Wt extends it{constructor(M){super(),this.data=M,this.rows=M.length,this.columns=M[0].length}set(M,B,I){return this.data[M][B]=I,this}get(M,B){return this.data[M][B]}}function Ot(_e,M){if(v.isAnyArray(_e))return _e[0]&&v.isAnyArray(_e[0])?new Wt(_e):new Yt(_e,M);throw new Error("the argument is not an array")}class en{constructor(M){M=Wt.checkMatrix(M);let B=M.clone(),I=B.rows,j=B.columns,J=new Float64Array(I),ye=1,be,Le,Se,Ye,Ge,Re,De,Ke,He;for(be=0;beMath.abs(Ke[Ye])&&(Ye=be);if(Ye!==Le){for(Se=0;Se=0;Se--){for(Le=0;Leye?j.set(J,ye,M.get(J,ye)):J===ye?j.set(J,ye,1):j.set(J,ye,0);return j}get upperTriangularMatrix(){let M=this.LU,B=M.rows,I=M.columns,j=new Ce(B,I);for(let J=0;JMath.abs(M)?(B=M/_e,Math.abs(_e)*Math.sqrt(1+B*B)):M!==0?(B=_e/M,Math.abs(M)*Math.sqrt(1+B*B)):0}class Jn{constructor(M){M=Wt.checkMatrix(M);let B=M.clone(),I=M.rows,j=M.columns,J=new Float64Array(j),ye,be,Le,Se;for(Le=0;Le=0;Se--){for(Le=0;Le=0;be--){for(J=0;J=0;Qe--)if(Ke[Qe]!==0){for(let gt=Qe+1;gt=0;Qe--){if(Qe0;){let Qe,gt;for(Qe=vt-2;Qe>=-1&&Qe!==-1;Qe--){const Pt=Number.MIN_VALUE+Bt*Math.abs(Ke[Qe]+Math.abs(Ke[Qe+1]));if(Math.abs(ke[Qe])<=Pt||Number.isNaN(ke[Qe])){ke[Qe]=0;break}}if(Qe===vt-2)gt=4;else{let Pt;for(Pt=vt-1;Pt>=Qe&&Pt!==Qe;Pt--){let St=(Pt!==vt?Math.abs(ke[Pt]):0)+(Pt!==Qe+1?Math.abs(ke[Pt-1]):0);if(Math.abs(Ke[Pt])<=Bt*St){Ke[Pt]=0;break}}Pt===Qe?gt=3:Pt===vt-1?gt=1:(gt=2,Qe=Pt)}switch(Qe++,gt){case 1:{let Pt=ke[vt-2];ke[vt-2]=0;for(let St=vt-2;St>=Qe;St--){let on=vn(Ke[St],Pt),ln=Ke[St]/on,Zt=Pt/on;if(Ke[St]=on,St!==Qe&&(Pt=-Zt*ke[St-1],ke[St-1]=ln*ke[St-1]),Se)for(let Jt=0;Jt=Ke[Qe+1]);){let Pt=Ke[Qe];if(Ke[Qe]=Ke[Qe+1],Ke[Qe+1]=Pt,Se&&QeB&&J.set(Ye,Ge,M.get(Ye,Ge)/this.s[Ge]);let ye=this.U,be=ye.rows,Le=ye.columns,Se=new Ce(I,be);for(let Ye=0;YeM&&B++;return B}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return Ce.diag(this.s)}}function qn(_e,M=!1){return _e=Wt.checkMatrix(_e),M?new Fn(_e).inverse():br(_e,Ce.eye(_e.rows))}function br(_e,M,B=!1){return _e=Wt.checkMatrix(_e),M=Wt.checkMatrix(M),B?new Fn(_e).solve(M):_e.isSquare()?new en(_e).solve(M):new Jn(_e).solve(M)}function Vn(_e){if(_e=Ce.checkMatrix(_e),_e.isSquare()){if(_e.columns===0)return 1;let M,B,I,j;if(_e.columns===2)return M=_e.get(0,0),B=_e.get(0,1),I=_e.get(1,0),j=_e.get(1,1),M*j-B*I;if(_e.columns===3){let J,ye,be;return J=new wt(_e,[1,2],[1,2]),ye=new wt(_e,[1,2],[0,2]),be=new wt(_e,[1,2],[0,1]),M=_e.get(0,0),B=_e.get(0,1),I=_e.get(0,2),M*Vn(J)-B*Vn(ye)+I*Vn(be)}else return new en(_e).determinant}else throw Error("determinant can only be calculated for a square matrix")}function tr(_e,M){let B=[];for(let I=0;I<_e;I++)I!==M&&B.push(I);return B}function lr(_e,M,B,I=1e-9,j=1e-9){if(_e>j)return new Array(M.rows+1).fill(0);{let J=M.addRow(B,[0]);for(let ye=0;yeM?J[ye]=1/J[ye]:J[ye]=0;return j.mmul(Ce.diag(J).mmul(I.transpose()))}function tn(_e,M=_e,B={}){_e=new Ce(_e);let I=!1;if(typeof M=="object"&&!Ce.isMatrix(M)&&!v.isAnyArray(M)?(B=M,M=_e,I=!0):M=new Ce(M),_e.rows!==M.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:j=!0}=B;j&&(_e=_e.center("column"),I||(M=M.center("column")));const J=_e.transpose().mmul(M);for(let ye=0;ye0?j.set(J,J+1,B[J]):B[J]<0&&j.set(J,J-1,B[J])}return j}}function sn(_e,M,B,I){let j,J,ye,be,Le,Se,Ye,Ge;for(Le=0;Le<_e;Le++)B[Le]=I.get(_e-1,Le);for(be=_e-1;be>0;be--){for(Ge=0,ye=0,Se=0;Se0&&(J=-J),M[be]=Ge*J,ye=ye-j*J,B[be-1]=j-J,Le=0;LeSe)do{for(j=B[Se],Ge=(B[Se+1]-j)/(2*M[Se]),Re=vn(Ge,1),Ge<0&&(Re=-Re),B[Se]=M[Se]/(Ge+Re),B[Se+1]=M[Se]*(Ge+Re),De=B[Se+1],J=j-B[Se],ye=Se+2;ye<_e;ye++)B[ye]-=J;for(mt=mt+J,Ge=B[Ye],Ke=1,He=Ke,Je=Ke,ke=M[Se+1],Ze=0,tt=0,ye=Ye-1;ye>=Se;ye--)for(Je=He,He=Ke,tt=Ze,j=Ke*M[ye],J=Ke*Ge,Re=vn(Ge,M[ye]),M[ye+1]=Ze*Re,Ze=M[ye]/Re,Ke=Ge/Re,Ge=Ke*B[ye]-Ze*j,B[ye+1]=J+Ze*(Ke*j+Ze*B[ye]),Le=0;Le<_e;Le++)J=I.get(Le,ye+1),I.set(Le,ye+1,Ze*I.get(Le,ye)+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ke++)for((kebe)&&(B[ke]=j.get(ke,ke),M[ke]=0),Ze=Math.max(ke-1,0);Ze<_e;Ze++)Ye=Ye+Math.abs(j.get(ke,Ze));for(;J>=ye;){for(mt=J;mt>ye&&(Ke=Math.abs(j.get(mt-1,mt-1))+Math.abs(j.get(mt,mt)),Ke===0&&(Ke=Ye),!(Math.abs(j.get(mt,mt-1))=0){for(He=Ge>=0?Ge+He:Ge-He,B[J-1]=Rt+He,B[J]=B[J-1],He!==0&&(B[J]=Rt-vt/He),M[J-1]=0,M[J]=0,Rt=j.get(J,J-1),Ke=Math.abs(Rt)+Math.abs(He),Ge=Rt/Ke,Re=He/Ke,De=Math.sqrt(Ge*Ge+Re*Re),Ge=Ge/De,Re=Re/De,Ze=J-1;Ze<_e;Ze++)He=j.get(J-1,Ze),j.set(J-1,Ze,Re*He+Ge*j.get(J,Ze)),j.set(J,Ze,Re*j.get(J,Ze)-Ge*He);for(ke=0;ke<=J;ke++)He=j.get(ke,J-1),j.set(ke,J-1,Re*He+Ge*j.get(ke,J)),j.set(ke,J,Re*j.get(ke,J)-Ge*He);for(ke=ye;ke<=be;ke++)He=I.get(ke,J-1),I.set(ke,J-1,Re*He+Ge*I.get(ke,J)),I.set(ke,J,Re*I.get(ke,J)-Ge*He)}else B[J-1]=Rt+Ge,B[J]=Rt+Ge,M[J-1]=He,M[J]=-He;J=J-2,Je=0}else{if(Rt=j.get(J,J),Bt=0,vt=0,mt0)){for(Ke=Math.sqrt(Ke),Bt=mt&&(He=j.get(Tt,Tt),De=Rt-He,Ke=Bt-He,Ge=(De*Ke-vt)/j.get(Tt+1,Tt)+j.get(Tt,Tt+1),Re=j.get(Tt+1,Tt+1)-He-De-Ke,De=j.get(Tt+2,Tt+1),Ke=Math.abs(Ge)+Math.abs(Re)+Math.abs(De),Ge=Ge/Ke,Re=Re/Ke,De=De/Ke,!(Tt===mt||Math.abs(j.get(Tt,Tt-1))*(Math.abs(Re)+Math.abs(De))Tt+2&&j.set(ke,ke-3,0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ze)*j.get(Ze,J);if(M[ke]<0)He=vt,Ke=De;else if(mt=ke,M[ke]===0?j.set(ke,J,vt!==0?-De/vt:-De/(Le*Ye)):(Rt=j.get(ke,ke+1),Bt=j.get(ke+1,ke),Re=(B[ke]-Ge)*(B[ke]-Ge)+M[ke]*M[ke],It=(Rt*Ke-He*De)/Re,j.set(ke,J,It),j.set(ke+1,J,Math.abs(Rt)>Math.abs(He)?(-De-vt*It)/Rt:(-Ke-Bt*It)/He)),It=Math.abs(j.get(ke,J)),Le*It*It>1)for(Ze=ke;Ze<=J;Ze++)j.set(Ze,J,j.get(Ze,J)/It)}else if(Re<0)for(mt=J-1,Math.abs(j.get(J,J-1))>Math.abs(j.get(J-1,J))?(j.set(J-1,J-1,Re/j.get(J,J-1)),j.set(J-1,J,-(j.get(J,J)-Ge)/j.get(J,J-1))):(ln=Gt(0,-j.get(J-1,J),j.get(J-1,J-1)-Ge,Re),j.set(J-1,J-1,ln[0]),j.set(J-1,J,ln[1])),j.set(J,J-1,0),j.set(J,J,1),ke=J-2;ke>=0;ke--){for(Qe=0,gt=0,Ze=mt;Ze<=J;Ze++)Qe=Qe+j.get(ke,Ze)*j.get(Ze,J-1),gt=gt+j.get(ke,Ze)*j.get(Ze,J);if(vt=j.get(ke,ke)-Ge,M[ke]<0)He=vt,De=Qe,Ke=gt;else if(mt=ke,M[ke]===0?(ln=Gt(-Qe,-gt,vt,Re),j.set(ke,J-1,ln[0]),j.set(ke,J,ln[1])):(Rt=j.get(ke,ke+1),Bt=j.get(ke+1,ke),Pt=(B[ke]-Ge)*(B[ke]-Ge)+M[ke]*M[ke]-Re*Re,St=(B[ke]-Ge)*2*Re,Pt===0&&St===0&&(Pt=Le*Ye*(Math.abs(vt)+Math.abs(Re)+Math.abs(Rt)+Math.abs(Bt)+Math.abs(He))),ln=Gt(Rt*De-He*Qe+Re*gt,Rt*Ke-He*gt-Re*Qe,Pt,St),j.set(ke,J-1,ln[0]),j.set(ke,J,ln[1]),Math.abs(Rt)>Math.abs(He)+Math.abs(Re)?(j.set(ke+1,J-1,(-Qe-vt*j.get(ke,J-1)+Re*j.get(ke,J))/Rt),j.set(ke+1,J,(-gt-vt*j.get(ke,J)-Re*j.get(ke,J-1))/Rt)):(ln=Gt(-De-Bt*j.get(ke,J-1),-Ke-Bt*j.get(ke,J),He,Re),j.set(ke+1,J-1,ln[0]),j.set(ke+1,J,ln[1]))),It=Math.max(Math.abs(j.get(ke,J-1)),Math.abs(j.get(ke,J))),Le*It*It>1)for(Ze=ke;Ze<=J;Ze++)j.set(Ze,J-1,j.get(Ze,J-1)/It),j.set(Ze,J,j.get(Ze,J)/It)}for(ke=0;ke<_e;ke++)if(kebe)for(Ze=ke;Ze<_e;Ze++)I.set(ke,Ze,j.get(ke,Ze));for(Ze=_e-1;Ze>=ye;Ze--)for(ke=ye;ke<=be;ke++){for(He=0,tt=ye;tt<=Math.min(Ze,be);tt++)He=He+I.get(ke,tt)*j.get(tt,Ze);I.set(ke,Ze,He)}}}function Gt(_e,M,B,I){let j,J;return Math.abs(B)>Math.abs(I)?(j=I/B,J=B+j*I,[(_e+j*M)/J,(M-j*_e)/J]):(j=B/I,J=I+j*B,[(j*_e+M)/J,(j*M-_e)/J])}class jt{constructor(M){if(M=Wt.checkMatrix(M),!M.isSymmetric())throw new Error("Matrix is not symmetric");let B=M,I=B.rows,j=new Ce(I,I),J=!0,ye,be,Le;for(be=0;be0),j.set(be,be,Math.sqrt(Math.max(Se,0))),Le=be+1;Le=0;Le--)for(be=0;beye;De++)Ge=M.transpose().mmul(be).div(be.transpose().mmul(be).get(0,0)),Ge=Ge.div(Ge.norm()),Se=M.mmul(Ge).div(Ge.transpose().mmul(Ge).get(0,0)),De>0&&(Le=Se.clone().sub(Re).pow(2).sum()),Re=Se.clone(),I?(Ye=I.transpose().mmul(Se).div(Se.transpose().mmul(Se).get(0,0)),Ye=Ye.div(Ye.norm()),be=I.mmul(Ye).div(Ye.transpose().mmul(Ye).get(0,0))):be=Se;if(I){let De=M.transpose().mmul(Se).div(Se.transpose().mmul(Se).get(0,0));De=De.div(De.norm());let Ke=M.clone().sub(Se.clone().mmul(De.transpose())),He=be.transpose().mmul(Se).div(Se.transpose().mmul(Se).get(0,0)),Je=I.clone().sub(Se.clone().mulS(He.get(0,0)).mmul(Ye.transpose()));this.t=Se,this.p=De.transpose(),this.w=Ge.transpose(),this.q=Ye,this.u=be,this.s=Se.transpose().mmul(Se),this.xResidual=Ke,this.yResidual=Je,this.betas=He}else this.w=Ge.transpose(),this.s=Se.transpose().mmul(Se).sqrt(),j?this.t=Se.clone().div(this.s.get(0,0)):this.t=Se,this.xResidual=M.sub(Se.mmul(Ge.transpose()))}}Me.XA=it,Me.a_=jt,Me.yQ=jt,Me.Hs=Ne,Me.Ec=wn,Me.dx=wn,Me.LU=en,Me.Rm=en,Me.y3=Ce,Me.qK=Ve,Me.pb=Be,Me.j=$e,Me.sO=lt,Me.BZ=xt,Me.EK=pt,Me.Db=wt,Me.Fx=Dt,Me.tU=kt,Me.Ym=En,Me.rs=En,Me.QR=Jn,Me.TB=Jn,Me.oH=Fn,Me.Sc=Fn,Me.BN=Pe,Me.it=Yt,Me.$r=Wt,Me.QM=An,Me.AV=tn,K=Ce,Me.GH=Vn,Me.SO=qn,Me.uZ=nr,Me.yU=an,Me.F1=br,Me.re=Ot},45411:function(we){"use strict";we.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},75196:function(we,Me,X){var K=X(45411),ee=X(75029),G=Object.hasOwnProperty,_=Object.create(null);for(var F in K)G.call(K,F)&&(_[K[F]]=F);var w=we.exports={to:{},get:{}};w.get=function(b){var E=b.substring(0,3).toLowerCase(),g,m;switch(E){case"hsl":g=w.get.hsl(b),m="hsl";break;case"hwb":g=w.get.hwb(b),m="hwb";break;default:g=w.get.rgb(b),m="rgb";break}return g?{model:m,value:g}:null},w.get.rgb=function(b){if(!b)return null;var E=/^#([a-f0-9]{3,4})$/i,g=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,m=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,C=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^(\w+)$/,v=[0,0,0,1],A,T,O;if(A=b.match(g)){for(O=A[2],A=A[1],T=0;T<3;T++){var P=T*2;v[T]=parseInt(A.slice(P,P+2),16)}O&&(v[3]=parseInt(O,16)/255)}else if(A=b.match(E)){for(A=A[1],O=A[3],T=0;T<3;T++)v[T]=parseInt(A[T]+A[T],16);O&&(v[3]=parseInt(O+O,16)/255)}else if(A=b.match(m)){for(T=0;T<3;T++)v[T]=parseInt(A[T+1],0);A[4]&&(A[5]?v[3]=parseFloat(A[4])*.01:v[3]=parseFloat(A[4]))}else if(A=b.match(C)){for(T=0;T<3;T++)v[T]=Math.round(parseFloat(A[T+1])*2.55);A[4]&&(A[5]?v[3]=parseFloat(A[4])*.01:v[3]=parseFloat(A[4]))}else return(A=b.match(d))?A[1]==="transparent"?[0,0,0,0]:G.call(K,A[1])?(v=K[A[1]],v[3]=1,v):null:null;for(T=0;T<3;T++)v[T]=x(v[T],0,255);return v[3]=x(v[3],0,1),v},w.get.hsl=function(b){if(!b)return null;var E=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,g=b.match(E);if(g){var m=parseFloat(g[4]),C=(parseFloat(g[1])%360+360)%360,d=x(parseFloat(g[2]),0,100),v=x(parseFloat(g[3]),0,100),A=x(isNaN(m)?1:m,0,1);return[C,d,v,A]}return null},w.get.hwb=function(b){if(!b)return null;var E=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,g=b.match(E);if(g){var m=parseFloat(g[4]),C=(parseFloat(g[1])%360+360)%360,d=x(parseFloat(g[2]),0,100),v=x(parseFloat(g[3]),0,100),A=x(isNaN(m)?1:m,0,1);return[C,d,v,A]}return null},w.to.hex=function(){var b=ee(arguments);return"#"+y(b[0])+y(b[1])+y(b[2])+(b[3]<1?y(Math.round(b[3]*255)):"")},w.to.rgb=function(){var b=ee(arguments);return b.length<4||b[3]===1?"rgb("+Math.round(b[0])+", "+Math.round(b[1])+", "+Math.round(b[2])+")":"rgba("+Math.round(b[0])+", "+Math.round(b[1])+", "+Math.round(b[2])+", "+b[3]+")"},w.to.rgb.percent=function(){var b=ee(arguments),E=Math.round(b[0]/255*100),g=Math.round(b[1]/255*100),m=Math.round(b[2]/255*100);return b.length<4||b[3]===1?"rgb("+E+"%, "+g+"%, "+m+"%)":"rgba("+E+"%, "+g+"%, "+m+"%, "+b[3]+")"},w.to.hsl=function(){var b=ee(arguments);return b.length<4||b[3]===1?"hsl("+b[0]+", "+b[1]+"%, "+b[2]+"%)":"hsla("+b[0]+", "+b[1]+"%, "+b[2]+"%, "+b[3]+")"},w.to.hwb=function(){var b=ee(arguments),E="";return b.length>=4&&b[3]!==1&&(E=", "+b[3]),"hwb("+b[0]+", "+b[1]+"%, "+b[2]+"%"+E+")"},w.to.keyword=function(b){return _[b.slice(0,3)]};function x(b,E,g){return Math.min(Math.max(E,b),g)}function y(b){var E=Math.round(b).toString(16).toUpperCase();return E.length<2?"0"+E:E}},92546:function(we,Me,X){we.exports={graphlib:X(76626),layout:X(47194),debug:X(11303),util:{time:X(53063).time,notime:X(53063).notime},version:X(11897)}},81255:function(we,Me,X){"use strict";var K=X(72361),ee=X(39240);we.exports={run:G,undo:F};function G(w){var x=w.graph().acyclicer==="greedy"?ee(w,y(w)):_(w);K.forEach(x,function(b){var E=w.edge(b);w.removeEdge(b),E.forwardName=b.name,E.reversed=!0,w.setEdge(b.w,b.v,E,K.uniqueId("rev"))});function y(b){return function(E){return b.edge(E).weight}}}function _(w){var x=[],y={},b={};function E(g){K.has(b,g)||(b[g]=!0,y[g]=!0,K.forEach(w.outEdges(g),function(m){K.has(y,m.w)?x.push(m):E(m.w)}),delete y[g])}return K.forEach(w.nodes(),E),x}function F(w){K.forEach(w.edges(),function(x){var y=w.edge(x);if(y.reversed){w.removeEdge(x);var b=y.forwardName;delete y.reversed,delete y.forwardName,w.setEdge(x.w,x.v,y,b)}})}},60765:function(we,Me,X){var K=X(72361),ee=X(53063);we.exports=G;function G(F){function w(x){var y=F.children(x),b=F.node(x);if(y.length&&K.forEach(y,w),K.has(b,"minRank")){b.borderLeft=[],b.borderRight=[];for(var E=b.minRank,g=b.maxRank+1;E0;--T)if(A=g[T].dequeue(),A){C=C.concat(x(E,g,m,A,!0));break}}}return C}function x(E,g,m,C,d){var v=d?[]:void 0;return K.forEach(E.inEdges(C.v),function(A){var T=E.edge(A),O=E.node(A.v);d&&v.push({v:A.v,w:A.w}),O.out-=T,b(g,m,O)}),K.forEach(E.outEdges(C.v),function(A){var T=E.edge(A),O=A.w,P=E.node(O);P.in-=T,b(g,m,P)}),E.removeNode(C.v),v}function y(E,g){var m=new ee,C=0,d=0;K.forEach(E.nodes(),function(T){m.setNode(T,{v:T,in:0,out:0})}),K.forEach(E.edges(),function(T){var O=m.edge(T.v,T.w)||0,P=g(T),L=O+P;m.setEdge(T.v,T.w,L),d=Math.max(d,m.node(T.v).out+=P),C=Math.max(C,m.node(T.w).in+=P)});var v=K.range(d+C+3).map(function(){return new G}),A=C+1;return K.forEach(m.nodes(),function(T){b(v,A,m.node(T))}),{graph:m,buckets:v,zeroIdx:A}}function b(E,g,m){m.out?m.in?E[m.out-m.in+g].enqueue(m):E[E.length-1].enqueue(m):E[0].enqueue(m)}},47194:function(we,Me,X){"use strict";var K=X(72361),ee=X(81255),G=X(27163),_=X(64505),F=X(53063).normalizeRanks,w=X(71970),x=X(53063).removeEmptyRanks,y=X(31733),b=X(60765),E=X(13257),g=X(62852),m=X(93021),C=X(53063),d=X(76626).Graph;we.exports=v;function v(ge,Ee){var Ae=Ee&&Ee.debugTiming?C.time:C.notime;Ae("layout",function(){var Fe=Ae(" buildLayoutGraph",function(){return W(ge)});Ae(" runLayout",function(){A(Fe,Ae)}),Ae(" updateInputGraph",function(){T(ge,Fe)})})}function A(ge,Ee){Ee(" makeSpaceForEdgeLabels",function(){z(ge)}),Ee(" removeSelfEdges",function(){oe(ge)}),Ee(" acyclic",function(){ee.run(ge)}),Ee(" nestingGraph.run",function(){y.run(ge)}),Ee(" rank",function(){_(C.asNonCompoundGraph(ge))}),Ee(" injectEdgeLabelProxies",function(){Z(ge)}),Ee(" removeEmptyRanks",function(){x(ge)}),Ee(" nestingGraph.cleanup",function(){y.cleanup(ge)}),Ee(" normalizeRanks",function(){F(ge)}),Ee(" assignRankMinMax",function(){Q(ge)}),Ee(" removeEdgeLabelProxies",function(){te(ge)}),Ee(" normalize.run",function(){G.run(ge)}),Ee(" parentDummyChains",function(){w(ge)}),Ee(" addBorderSegments",function(){b(ge)}),Ee(" order",function(){g(ge)}),Ee(" insertSelfEdges",function(){he(ge)}),Ee(" adjustCoordinateSystem",function(){E.adjust(ge)}),Ee(" position",function(){m(ge)}),Ee(" positionSelfEdges",function(){se(ge)}),Ee(" removeBorderNodes",function(){ce(ge)}),Ee(" normalize.undo",function(){G.undo(ge)}),Ee(" fixupEdgeLabelCoords",function(){ae(ge)}),Ee(" undoCoordinateSystem",function(){E.undo(ge)}),Ee(" translateGraph",function(){$(ge)}),Ee(" assignNodeIntersects",function(){ie(ge)}),Ee(" reversePoints",function(){re(ge)}),Ee(" acyclic.undo",function(){ee.undo(ge)})}function T(ge,Ee){K.forEach(ge.nodes(),function(Ae){var Fe=ge.node(Ae),Ue=Ee.node(Ae);Fe&&(Fe.x=Ue.x,Fe.y=Ue.y,Ee.children(Ae).length&&(Fe.width=Ue.width,Fe.height=Ue.height))}),K.forEach(ge.edges(),function(Ae){var Fe=ge.edge(Ae),Ue=Ee.edge(Ae);Fe.points=Ue.points,K.has(Ue,"x")&&(Fe.x=Ue.x,Fe.y=Ue.y)}),ge.graph().width=Ee.graph().width,ge.graph().height=Ee.graph().height}var O=["nodesep","edgesep","ranksep","marginx","marginy"],P={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},L=["acyclicer","ranker","rankdir","align"],c=["width","height"],f={width:0,height:0},D=["minlen","weight","width","height","labeloffset"],R={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function W(ge){var Ee=new d({multigraph:!0,compound:!0}),Ae=me(ge.graph());return Ee.setGraph(K.merge({},P,pe(Ae,O),K.pick(Ae,L))),K.forEach(ge.nodes(),function(Fe){var Ue=me(ge.node(Fe));Ee.setNode(Fe,K.defaults(pe(Ue,c),f)),Ee.setParent(Fe,ge.parent(Fe))}),K.forEach(ge.edges(),function(Fe){var Ue=me(ge.edge(Fe));Ee.setEdge(Fe,K.merge({},R,pe(Ue,D),K.pick(Ue,k)))}),Ee}function z(ge){var Ee=ge.graph();Ee.ranksep/=2,K.forEach(ge.edges(),function(Ae){var Fe=ge.edge(Ae);Fe.minlen*=2,Fe.labelpos.toLowerCase()!=="c"&&(Ee.rankdir==="TB"||Ee.rankdir==="BT"?Fe.width+=Fe.labeloffset:Fe.height+=Fe.labeloffset)})}function Z(ge){K.forEach(ge.edges(),function(Ee){var Ae=ge.edge(Ee);if(Ae.width&&Ae.height){var Fe=ge.node(Ee.v),Ue=ge.node(Ee.w),nt={rank:(Ue.rank-Fe.rank)/2+Fe.rank,e:Ee};C.addDummyNode(ge,"edge-proxy",nt,"_ep")}})}function Q(ge){var Ee=0;K.forEach(ge.nodes(),function(Ae){var Fe=ge.node(Ae);Fe.borderTop&&(Fe.minRank=ge.node(Fe.borderTop).rank,Fe.maxRank=ge.node(Fe.borderBottom).rank,Ee=K.max(Ee,Fe.maxRank))}),ge.graph().maxRank=Ee}function te(ge){K.forEach(ge.nodes(),function(Ee){var Ae=ge.node(Ee);Ae.dummy==="edge-proxy"&&(ge.edge(Ae.e).labelRank=Ae.rank,ge.removeNode(Ee))})}function $(ge){var Ee=Number.POSITIVE_INFINITY,Ae=0,Fe=Number.POSITIVE_INFINITY,Ue=0,nt=ge.graph(),rt=nt.marginx||0,qe=nt.marginy||0;function dt(yt){var je=yt.x,at=yt.y,it=yt.width,ht=yt.height;Ee=Math.min(Ee,je-it/2),Ae=Math.max(Ae,je+it/2),Fe=Math.min(Fe,at-ht/2),Ue=Math.max(Ue,at+ht/2)}K.forEach(ge.nodes(),function(yt){dt(ge.node(yt))}),K.forEach(ge.edges(),function(yt){var je=ge.edge(yt);K.has(je,"x")&&dt(je)}),Ee-=rt,Fe-=qe,K.forEach(ge.nodes(),function(yt){var je=ge.node(yt);je.x-=Ee,je.y-=Fe}),K.forEach(ge.edges(),function(yt){var je=ge.edge(yt);K.forEach(je.points,function(at){at.x-=Ee,at.y-=Fe}),K.has(je,"x")&&(je.x-=Ee),K.has(je,"y")&&(je.y-=Fe)}),nt.width=Ae-Ee+rt,nt.height=Ue-Fe+qe}function ie(ge){K.forEach(ge.edges(),function(Ee){var Ae=ge.edge(Ee),Fe=ge.node(Ee.v),Ue=ge.node(Ee.w),nt,rt;Ae.points?(nt=Ae.points[0],rt=Ae.points[Ae.points.length-1]):(Ae.points=[],nt=Ue,rt=Fe),Ae.points.unshift(C.intersectRect(Fe,nt)),Ae.points.push(C.intersectRect(Ue,rt))})}function ae(ge){K.forEach(ge.edges(),function(Ee){var Ae=ge.edge(Ee);if(K.has(Ae,"x"))switch((Ae.labelpos==="l"||Ae.labelpos==="r")&&(Ae.width-=Ae.labeloffset),Ae.labelpos){case"l":Ae.x-=Ae.width/2+Ae.labeloffset;break;case"r":Ae.x+=Ae.width/2+Ae.labeloffset;break}})}function re(ge){K.forEach(ge.edges(),function(Ee){var Ae=ge.edge(Ee);Ae.reversed&&Ae.points.reverse()})}function ce(ge){K.forEach(ge.nodes(),function(Ee){if(ge.children(Ee).length){var Ae=ge.node(Ee),Fe=ge.node(Ae.borderTop),Ue=ge.node(Ae.borderBottom),nt=ge.node(K.last(Ae.borderLeft)),rt=ge.node(K.last(Ae.borderRight));Ae.width=Math.abs(rt.x-nt.x),Ae.height=Math.abs(Ue.y-Fe.y),Ae.x=nt.x+Ae.width/2,Ae.y=Fe.y+Ae.height/2}}),K.forEach(ge.nodes(),function(Ee){ge.node(Ee).dummy==="border"&&ge.removeNode(Ee)})}function oe(ge){K.forEach(ge.edges(),function(Ee){if(Ee.v===Ee.w){var Ae=ge.node(Ee.v);Ae.selfEdges||(Ae.selfEdges=[]),Ae.selfEdges.push({e:Ee,label:ge.edge(Ee)}),ge.removeEdge(Ee)}})}function he(ge){var Ee=C.buildLayerMatrix(ge);K.forEach(Ee,function(Ae){var Fe=0;K.forEach(Ae,function(Ue,nt){var rt=ge.node(Ue);rt.order=nt+Fe,K.forEach(rt.selfEdges,function(qe){C.addDummyNode(ge,"selfedge",{width:qe.label.width,height:qe.label.height,rank:rt.rank,order:nt+ ++Fe,e:qe.e,label:qe.label},"_se")}),delete rt.selfEdges})})}function se(ge){K.forEach(ge.nodes(),function(Ee){var Ae=ge.node(Ee);if(Ae.dummy==="selfedge"){var Fe=ge.node(Ae.e.v),Ue=Fe.x+Fe.width/2,nt=Fe.y,rt=Ae.x-Ue,qe=Fe.height/2;ge.setEdge(Ae.e,Ae.label),ge.removeNode(Ee),Ae.label.points=[{x:Ue+2*rt/3,y:nt-qe},{x:Ue+5*rt/6,y:nt-qe},{x:Ue+rt,y:nt},{x:Ue+5*rt/6,y:nt+qe},{x:Ue+2*rt/3,y:nt+qe}],Ae.label.x=Ae.x,Ae.label.y=Ae.y}})}function pe(ge,Ee){return K.mapValues(K.pick(ge,Ee),Number)}function me(ge){var Ee={};return K.forEach(ge,function(Ae,Fe){Ee[Fe.toLowerCase()]=Ae}),Ee}},72361:function(we,Me,X){var K;try{K={cloneDeep:X(20250),constant:X(13503),defaults:X(28548),each:X(76934),filter:X(64725),find:X(79785),flatten:X(40151),forEach:X(99204),forIn:X(23190),has:X(99946),isUndefined:X(16513),last:X(10611),map:X(9924),mapValues:X(70642),max:X(95987),merge:X(28440),min:X(73376),minBy:X(83296),now:X(5795),pick:X(89409),range:X(60859),reduce:X(16473),sortBy:X(351),uniqueId:X(95708),values:X(81229),zipObject:X(65441)}}catch(ee){}K||(K=window._),we.exports=K},31733:function(we,Me,X){var K=X(72361),ee=X(53063);we.exports={run:G,cleanup:x};function G(y){var b=ee.addDummyNode(y,"root",{},"_root"),E=F(y),g=K.max(K.values(E))-1,m=2*g+1;y.graph().nestingRoot=b,K.forEach(y.edges(),function(d){y.edge(d).minlen*=m});var C=w(y)+1;K.forEach(y.children(),function(d){_(y,b,m,C,g,E,d)}),y.graph().nodeRankFactor=m}function _(y,b,E,g,m,C,d){var v=y.children(d);if(!v.length){d!==b&&y.setEdge(b,d,{weight:0,minlen:E});return}var A=ee.addBorderNode(y,"_bt"),T=ee.addBorderNode(y,"_bb"),O=y.node(d);y.setParent(A,d),O.borderTop=A,y.setParent(T,d),O.borderBottom=T,K.forEach(v,function(P){_(y,b,E,g,m,C,P);var L=y.node(P),c=L.borderTop?L.borderTop:P,f=L.borderBottom?L.borderBottom:P,D=L.borderTop?g:2*g,R=c!==f?1:m-C[d]+1;y.setEdge(A,c,{weight:D,minlen:R,nestingEdge:!0}),y.setEdge(f,T,{weight:D,minlen:R,nestingEdge:!0})}),y.parent(d)||y.setEdge(b,A,{weight:0,minlen:m+C[d]})}function F(y){var b={};function E(g,m){var C=y.children(g);C&&C.length&&K.forEach(C,function(d){E(d,m+1)}),b[g]=m}return K.forEach(y.children(),function(g){E(g,1)}),b}function w(y){return K.reduce(y.edges(),function(b,E){return b+y.edge(E).weight},0)}function x(y){var b=y.graph();y.removeNode(b.nestingRoot),delete b.nestingRoot,K.forEach(y.edges(),function(E){var g=y.edge(E);g.nestingEdge&&y.removeEdge(E)})}},27163:function(we,Me,X){"use strict";var K=X(72361),ee=X(53063);we.exports={run:G,undo:F};function G(w){w.graph().dummyChains=[],K.forEach(w.edges(),function(x){_(w,x)})}function _(w,x){var y=x.v,b=w.node(y).rank,E=x.w,g=w.node(E).rank,m=x.name,C=w.edge(x),d=C.labelRank;if(g!==b+1){w.removeEdge(x);var v,A,T;for(T=0,++b;b0;)d%2&&(v+=g[d+1]),d=d-1>>1,g[d]+=C.weight;m+=C.weight*v})),m}},62852:function(we,Me,X){"use strict";var K=X(72361),ee=X(18043),G=X(45456),_=X(86490),F=X(59105),w=X(52205),x=X(76626).Graph,y=X(53063);we.exports=b;function b(C){var d=y.maxRank(C),v=E(C,K.range(1,d+1),"inEdges"),A=E(C,K.range(d-1,-1,-1),"outEdges"),T=ee(C);m(C,T);for(var O=Number.POSITIVE_INFINITY,P,L=0,c=0;c<4;++L,++c){g(L%2?v:A,L%4>=2),T=y.buildLayerMatrix(C);var f=G(C,T);f=E.barycenter)&&_(E,g)}}function y(E){return function(g){g.in.push(E),--g.indegree===0&&F.push(g)}}for(;F.length;){var b=F.pop();w.push(b),K.forEach(b.in.reverse(),x(b)),K.forEach(b.out,y(b))}return K.map(K.filter(w,function(E){return!E.merged}),function(E){return K.pick(E,["vs","i","barycenter","weight"])})}function _(F,w){var x=0,y=0;F.weight&&(x+=F.barycenter*F.weight,y+=F.weight),w.weight&&(x+=w.barycenter*w.weight,y+=w.weight),F.vs=w.vs.concat(F.vs),F.barycenter=x/y,F.weight=y,F.i=Math.min(w.i,F.i),w.merged=!0}},86490:function(we,Me,X){var K=X(72361),ee=X(99506),G=X(45926),_=X(1349);we.exports=F;function F(y,b,E,g){var m=y.children(b),C=y.node(b),d=C?C.borderLeft:void 0,v=C?C.borderRight:void 0,A={};d&&(m=K.filter(m,function(f){return f!==d&&f!==v}));var T=ee(y,m);K.forEach(T,function(f){if(y.children(f.v).length){var D=F(y,f.v,E,g);A[f.v]=D,K.has(D,"barycenter")&&x(f,D)}});var O=G(T,E);w(O,A);var P=_(O,g);if(d&&(P.vs=K.flatten([d,P.vs,v],!0),y.predecessors(d).length)){var L=y.node(y.predecessors(d)[0]),c=y.node(y.predecessors(v)[0]);K.has(P,"barycenter")||(P.barycenter=0,P.weight=0),P.barycenter=(P.barycenter*P.weight+L.order+c.order)/(P.weight+2),P.weight+=2}return P}function w(y,b){K.forEach(y,function(E){E.vs=K.flatten(E.vs.map(function(g){return b[g]?b[g].vs:g}),!0)})}function x(y,b){K.isUndefined(y.barycenter)?(y.barycenter=b.barycenter,y.weight=b.weight):(y.barycenter=(y.barycenter*y.weight+b.barycenter*b.weight)/(y.weight+b.weight),y.weight+=b.weight)}},1349:function(we,Me,X){var K=X(72361),ee=X(53063);we.exports=G;function G(w,x){var y=ee.partition(w,function(A){return K.has(A,"barycenter")}),b=y.lhs,E=K.sortBy(y.rhs,function(A){return-A.i}),g=[],m=0,C=0,d=0;b.sort(F(!!x)),d=_(g,E,d),K.forEach(b,function(A){d+=A.vs.length,g.push(A.vs),m+=A.barycenter*A.weight,C+=A.weight,d=_(g,E,d)});var v={vs:K.flatten(g,!0)};return C&&(v.barycenter=m/C,v.weight=C),v}function _(w,x,y){for(var b;x.length&&(b=K.last(x)).i<=y;)x.pop(),w.push(b.vs),y++;return y}function F(w){return function(x,y){return x.barycentery.barycenter?1:w?y.i-x.i:x.i-y.i}}},71970:function(we,Me,X){var K=X(72361);we.exports=ee;function ee(F){var w=_(F);K.forEach(F.graph().dummyChains,function(x){for(var y=F.node(x),b=y.edgeObj,E=G(F,w,b.v,b.w),g=E.path,m=E.lca,C=0,d=g[C],v=!0;x!==b.w;){if(y=F.node(x),v){for(;(d=g[C])!==m&&F.node(d).maxRankg||m>w[C].lim));for(d=C,C=y;(C=F.parent(C))!==d;)E.push(C);return{path:b.concat(E.reverse()),lca:d}}function _(F){var w={},x=0;function y(b){var E=x;K.forEach(F.children(b),y),w[b]={low:E,lim:x++}}return K.forEach(F.children(),y),w}},92080:function(we,Me,X){"use strict";var K=X(72361),ee=X(76626).Graph,G=X(53063);we.exports={positionX:v,findType1Conflicts:_,findType2Conflicts:F,addConflict:x,hasConflict:y,verticalAlignment:b,horizontalCompaction:E,alignCoordinates:C,findSmallestWidthAlignment:m,balance:d};function _(O,P){var L={};function c(f,D){var R=0,k=0,W=f.length,z=K.last(D);return K.forEach(D,function(Z,Q){var te=w(O,Z),$=te?O.node(te).order:W;(te||Z===z)&&(K.forEach(D.slice(k,Q+1),function(ie){K.forEach(O.predecessors(ie),function(ae){var re=O.node(ae),ce=re.order;(cez)&&x(L,te,Z)})})}function f(D,R){var k=-1,W,z=0;return K.forEach(R,function(Z,Q){if(O.node(Z).dummy==="border"){var te=O.predecessors(Z);te.length&&(W=O.node(te[0]).order,c(R,z,Q,k,W),z=Q,k=W)}c(R,z,R.length,W,D.length)}),R}return K.reduce(P,f),L}function w(O,P){if(O.node(P).dummy)return K.find(O.predecessors(P),function(L){return O.node(L).dummy})}function x(O,P,L){if(P>L){var c=P;P=L,L=c}var f=O[P];f||(O[P]=f={}),f[L]=!0}function y(O,P,L){if(P>L){var c=P;P=L,L=c}return K.has(O[P],L)}function b(O,P,L,c){var f={},D={},R={};return K.forEach(P,function(k){K.forEach(k,function(W,z){f[W]=W,D[W]=W,R[W]=z})}),K.forEach(P,function(k){var W=-1;K.forEach(k,function(z){var Z=c(z);if(Z.length){Z=K.sortBy(Z,function(ae){return R[ae]});for(var Q=(Z.length-1)/2,te=Math.floor(Q),$=Math.ceil(Q);te<=$;++te){var ie=Z[te];D[z]===z&&WW.lim&&(z=W,Z=!0);var Q=K.filter(c.edges(),function(te){return Z===P(L,L.node(te.v),z)&&Z!==P(L,L.node(te.w),z)});return K.minBy(Q,function(te){return G(c,te)})}function A(L,c,f,D){var R=f.v,k=f.w;L.removeEdge(R,k),L.setEdge(D.v,D.w,{}),m(L),b(L,c),T(L,c)}function T(L,c){var f=K.find(L.nodes(),function(R){return!c.node(R).parent}),D=F(L,f);D=D.slice(1),K.forEach(D,function(R){var k=L.node(R).parent,W=c.edge(R,k),z=!1;W||(W=c.edge(k,R),z=!0),c.node(R).rank=c.node(k).rank+(z?W.minlen:-W.minlen)})}function O(L,c,f){return L.hasEdge(c,f)}function P(L,c,f){return f.low<=c.lim&&c.lim<=f.lim}},2416:function(we,Me,X){"use strict";var K=X(72361);we.exports={longestPath:ee,slack:G};function ee(_){var F={};function w(x){var y=_.node(x);if(K.has(F,x))return y.rank;F[x]=!0;var b=K.min(K.map(_.outEdges(x),function(E){return w(E.w)-_.edge(E).minlen}));return(b===Number.POSITIVE_INFINITY||b===void 0||b===null)&&(b=0),y.rank=b}K.forEach(_.sources(),w)}function G(_,F){return _.node(F.w).rank-_.node(F.v).rank-_.edge(F).minlen}},53063:function(we,Me,X){"use strict";var K=X(72361),ee=X(76626).Graph;we.exports={addDummyNode:G,simplify:_,asNonCompoundGraph:F,successorWeights:w,predecessorWeights:x,intersectRect:y,buildLayerMatrix:b,normalizeRanks:E,removeEmptyRanks:g,addBorderNode:m,maxRank:C,partition:d,time:v,notime:A};function G(T,O,P,L){var c;do c=K.uniqueId(L);while(T.hasNode(c));return P.dummy=O,T.setNode(c,P),c}function _(T){var O=new ee().setGraph(T.graph());return K.forEach(T.nodes(),function(P){O.setNode(P,T.node(P))}),K.forEach(T.edges(),function(P){var L=O.edge(P.v,P.w)||{weight:0,minlen:1},c=T.edge(P);O.setEdge(P.v,P.w,{weight:L.weight+c.weight,minlen:Math.max(L.minlen,c.minlen)})}),O}function F(T){var O=new ee({multigraph:T.isMultigraph()}).setGraph(T.graph());return K.forEach(T.nodes(),function(P){T.children(P).length||O.setNode(P,T.node(P))}),K.forEach(T.edges(),function(P){O.setEdge(P,T.edge(P))}),O}function w(T){var O=K.map(T.nodes(),function(P){var L={};return K.forEach(T.outEdges(P),function(c){L[c.w]=(L[c.w]||0)+T.edge(c).weight}),L});return K.zipObject(T.nodes(),O)}function x(T){var O=K.map(T.nodes(),function(P){var L={};return K.forEach(T.inEdges(P),function(c){L[c.v]=(L[c.v]||0)+T.edge(c).weight}),L});return K.zipObject(T.nodes(),O)}function y(T,O){var P=T.x,L=T.y,c=O.x-P,f=O.y-L,D=T.width/2,R=T.height/2;if(!c&&!f)throw new Error("Not possible to find intersection inside of the rectangle");var k,W;return Math.abs(f)*D>Math.abs(c)*R?(f<0&&(R=-R),k=R*c/f,W=R):(c<0&&(D=-D),k=D,W=D*f/c),{x:P+k,y:L+W}}function b(T){var O=K.map(K.range(C(T)+1),function(){return[]});return K.forEach(T.nodes(),function(P){var L=T.node(P),c=L.rank;K.isUndefined(c)||(O[c][L.order]=P)}),O}function E(T){var O=K.min(K.map(T.nodes(),function(P){return T.node(P).rank}));K.forEach(T.nodes(),function(P){var L=T.node(P);K.has(L,"rank")&&(L.rank-=O)})}function g(T){var O=K.min(K.map(T.nodes(),function(f){return T.node(f).rank})),P=[];K.forEach(T.nodes(),function(f){var D=T.node(f).rank-O;P[D]||(P[D]=[]),P[D].push(f)});var L=0,c=T.graph().nodeRankFactor;K.forEach(P,function(f,D){K.isUndefined(f)&&D%c!==0?--L:L&&K.forEach(f,function(R){T.node(R).rank+=L})})}function m(T,O,P,L){var c={width:0,height:0};return arguments.length>=4&&(c.rank=P,c.order=L),G(T,"border",c,O)}function C(T){return K.max(K.map(T.nodes(),function(O){var P=T.node(O).rank;if(!K.isUndefined(P))return P}))}function d(T,O){var P={lhs:[],rhs:[]};return K.forEach(T,function(L){O(L)?P.lhs.push(L):P.rhs.push(L)}),P}function v(T,O){var P=K.now();try{return O()}finally{console.log(T+" time: "+(K.now()-P)+"ms")}}function A(T,O){return O()}},11897:function(we){we.exports="0.8.5"},97774:function(we,Me,X){"use strict";Object.defineProperty(Me,"__esModule",{value:!0}),Me.default=void 0;var K=Object.assign||function(A){for(var T=1;T0&&(k=1/Math.sqrt(k),c[0]=f[0]*k,c[1]=f[1]*k),c},C.dot=function(c,f){return c[0]*f[0]+c[1]*f[1]},C.cross=function(c,f,D){var R=f[0]*D[1]-f[1]*D[0];return c[0]=c[1]=0,c[2]=R,c},C.lerp=function(c,f,D,R){var k=f[0],W=f[1];return c[0]=k+R*(D[0]-k),c[1]=W+R*(D[1]-W),c},C.random=function(c,f){f=f||1;var D=E()*2*Math.PI;return c[0]=Math.cos(D)*f,c[1]=Math.sin(D)*f,c},C.transformMat2=function(c,f,D){var R=f[0],k=f[1];return c[0]=D[0]*R+D[2]*k,c[1]=D[1]*R+D[3]*k,c},C.transformMat2d=function(c,f,D){var R=f[0],k=f[1];return c[0]=D[0]*R+D[2]*k+D[4],c[1]=D[1]*R+D[3]*k+D[5],c},C.transformMat3=function(c,f,D){var R=f[0],k=f[1];return c[0]=D[0]*R+D[3]*k+D[6],c[1]=D[1]*R+D[4]*k+D[7],c},C.transformMat4=function(c,f,D){var R=f[0],k=f[1];return c[0]=D[0]*R+D[4]*k+D[12],c[1]=D[1]*R+D[5]*k+D[13],c},C.forEach=function(){var c=C.create();return function(f,D,R,k,W,z){var Z,Q;for(D||(D=2),R||(R=0),k?Q=Math.min(k*D+R,f.length):Q=f.length,Z=R;Z0&&(W=1/Math.sqrt(W),c[0]=f[0]*W,c[1]=f[1]*W,c[2]=f[2]*W),c},d.dot=function(c,f){return c[0]*f[0]+c[1]*f[1]+c[2]*f[2]},d.cross=function(c,f,D){var R=f[0],k=f[1],W=f[2],z=D[0],Z=D[1],Q=D[2];return c[0]=k*Q-W*Z,c[1]=W*z-R*Q,c[2]=R*Z-k*z,c},d.lerp=function(c,f,D,R){var k=f[0],W=f[1],z=f[2];return c[0]=k+R*(D[0]-k),c[1]=W+R*(D[1]-W),c[2]=z+R*(D[2]-z),c},d.random=function(c,f){f=f||1;var D=E()*2*Math.PI,R=E()*2-1,k=Math.sqrt(1-R*R)*f;return c[0]=Math.cos(D)*k,c[1]=Math.sin(D)*k,c[2]=R*f,c},d.transformMat4=function(c,f,D){var R=f[0],k=f[1],W=f[2],z=D[3]*R+D[7]*k+D[11]*W+D[15];return z=z||1,c[0]=(D[0]*R+D[4]*k+D[8]*W+D[12])/z,c[1]=(D[1]*R+D[5]*k+D[9]*W+D[13])/z,c[2]=(D[2]*R+D[6]*k+D[10]*W+D[14])/z,c},d.transformMat3=function(c,f,D){var R=f[0],k=f[1],W=f[2];return c[0]=R*D[0]+k*D[3]+W*D[6],c[1]=R*D[1]+k*D[4]+W*D[7],c[2]=R*D[2]+k*D[5]+W*D[8],c},d.transformQuat=function(c,f,D){var R=f[0],k=f[1],W=f[2],z=D[0],Z=D[1],Q=D[2],te=D[3],$=te*R+Z*W-Q*k,ie=te*k+Q*R-z*W,ae=te*W+z*k-Z*R,re=-z*R-Z*k-Q*W;return c[0]=$*te+re*-z+ie*-Q-ae*-Z,c[1]=ie*te+re*-Z+ae*-z-$*-Q,c[2]=ae*te+re*-Q+$*-Z-ie*-z,c},d.rotateX=function(c,f,D,R){var k=[],W=[];return k[0]=f[0]-D[0],k[1]=f[1]-D[1],k[2]=f[2]-D[2],W[0]=k[0],W[1]=k[1]*Math.cos(R)-k[2]*Math.sin(R),W[2]=k[1]*Math.sin(R)+k[2]*Math.cos(R),c[0]=W[0]+D[0],c[1]=W[1]+D[1],c[2]=W[2]+D[2],c},d.rotateY=function(c,f,D,R){var k=[],W=[];return k[0]=f[0]-D[0],k[1]=f[1]-D[1],k[2]=f[2]-D[2],W[0]=k[2]*Math.sin(R)+k[0]*Math.cos(R),W[1]=k[1],W[2]=k[2]*Math.cos(R)-k[0]*Math.sin(R),c[0]=W[0]+D[0],c[1]=W[1]+D[1],c[2]=W[2]+D[2],c},d.rotateZ=function(c,f,D,R){var k=[],W=[];return k[0]=f[0]-D[0],k[1]=f[1]-D[1],k[2]=f[2]-D[2],W[0]=k[0]*Math.cos(R)-k[1]*Math.sin(R),W[1]=k[0]*Math.sin(R)+k[1]*Math.cos(R),W[2]=k[2],c[0]=W[0]+D[0],c[1]=W[1]+D[1],c[2]=W[2]+D[2],c},d.forEach=function(){var c=d.create();return function(f,D,R,k,W,z){var Z,Q;for(D||(D=3),R||(R=0),k?Q=Math.min(k*D+R,f.length):Q=f.length,Z=R;Z1?0:Math.acos(k)},d.str=function(c){return"vec3("+c[0]+", "+c[1]+", "+c[2]+")"},typeof x!="undefined"&&(x.vec3=d);var v={};v.create=function(){var c=new b(4);return c[0]=0,c[1]=0,c[2]=0,c[3]=0,c},v.clone=function(c){var f=new b(4);return f[0]=c[0],f[1]=c[1],f[2]=c[2],f[3]=c[3],f},v.fromValues=function(c,f,D,R){var k=new b(4);return k[0]=c,k[1]=f,k[2]=D,k[3]=R,k},v.copy=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c},v.set=function(c,f,D,R,k){return c[0]=f,c[1]=D,c[2]=R,c[3]=k,c},v.add=function(c,f,D){return c[0]=f[0]+D[0],c[1]=f[1]+D[1],c[2]=f[2]+D[2],c[3]=f[3]+D[3],c},v.subtract=function(c,f,D){return c[0]=f[0]-D[0],c[1]=f[1]-D[1],c[2]=f[2]-D[2],c[3]=f[3]-D[3],c},v.sub=v.subtract,v.multiply=function(c,f,D){return c[0]=f[0]*D[0],c[1]=f[1]*D[1],c[2]=f[2]*D[2],c[3]=f[3]*D[3],c},v.mul=v.multiply,v.divide=function(c,f,D){return c[0]=f[0]/D[0],c[1]=f[1]/D[1],c[2]=f[2]/D[2],c[3]=f[3]/D[3],c},v.div=v.divide,v.min=function(c,f,D){return c[0]=Math.min(f[0],D[0]),c[1]=Math.min(f[1],D[1]),c[2]=Math.min(f[2],D[2]),c[3]=Math.min(f[3],D[3]),c},v.max=function(c,f,D){return c[0]=Math.max(f[0],D[0]),c[1]=Math.max(f[1],D[1]),c[2]=Math.max(f[2],D[2]),c[3]=Math.max(f[3],D[3]),c},v.scale=function(c,f,D){return c[0]=f[0]*D,c[1]=f[1]*D,c[2]=f[2]*D,c[3]=f[3]*D,c},v.scaleAndAdd=function(c,f,D,R){return c[0]=f[0]+D[0]*R,c[1]=f[1]+D[1]*R,c[2]=f[2]+D[2]*R,c[3]=f[3]+D[3]*R,c},v.distance=function(c,f){var D=f[0]-c[0],R=f[1]-c[1],k=f[2]-c[2],W=f[3]-c[3];return Math.sqrt(D*D+R*R+k*k+W*W)},v.dist=v.distance,v.squaredDistance=function(c,f){var D=f[0]-c[0],R=f[1]-c[1],k=f[2]-c[2],W=f[3]-c[3];return D*D+R*R+k*k+W*W},v.sqrDist=v.squaredDistance,v.length=function(c){var f=c[0],D=c[1],R=c[2],k=c[3];return Math.sqrt(f*f+D*D+R*R+k*k)},v.len=v.length,v.squaredLength=function(c){var f=c[0],D=c[1],R=c[2],k=c[3];return f*f+D*D+R*R+k*k},v.sqrLen=v.squaredLength,v.negate=function(c,f){return c[0]=-f[0],c[1]=-f[1],c[2]=-f[2],c[3]=-f[3],c},v.inverse=function(c,f){return c[0]=1/f[0],c[1]=1/f[1],c[2]=1/f[2],c[3]=1/f[3],c},v.normalize=function(c,f){var D=f[0],R=f[1],k=f[2],W=f[3],z=D*D+R*R+k*k+W*W;return z>0&&(z=1/Math.sqrt(z),c[0]=f[0]*z,c[1]=f[1]*z,c[2]=f[2]*z,c[3]=f[3]*z),c},v.dot=function(c,f){return c[0]*f[0]+c[1]*f[1]+c[2]*f[2]+c[3]*f[3]},v.lerp=function(c,f,D,R){var k=f[0],W=f[1],z=f[2],Z=f[3];return c[0]=k+R*(D[0]-k),c[1]=W+R*(D[1]-W),c[2]=z+R*(D[2]-z),c[3]=Z+R*(D[3]-Z),c},v.random=function(c,f){return f=f||1,c[0]=E(),c[1]=E(),c[2]=E(),c[3]=E(),v.normalize(c,c),v.scale(c,c,f),c},v.transformMat4=function(c,f,D){var R=f[0],k=f[1],W=f[2],z=f[3];return c[0]=D[0]*R+D[4]*k+D[8]*W+D[12]*z,c[1]=D[1]*R+D[5]*k+D[9]*W+D[13]*z,c[2]=D[2]*R+D[6]*k+D[10]*W+D[14]*z,c[3]=D[3]*R+D[7]*k+D[11]*W+D[15]*z,c},v.transformQuat=function(c,f,D){var R=f[0],k=f[1],W=f[2],z=D[0],Z=D[1],Q=D[2],te=D[3],$=te*R+Z*W-Q*k,ie=te*k+Q*R-z*W,ae=te*W+z*k-Z*R,re=-z*R-Z*k-Q*W;return c[0]=$*te+re*-z+ie*-Q-ae*-Z,c[1]=ie*te+re*-Z+ae*-z-$*-Q,c[2]=ae*te+re*-Q+$*-Z-ie*-z,c},v.forEach=function(){var c=v.create();return function(f,D,R,k,W,z){var Z,Q;for(D||(D=4),R||(R=0),k?Q=Math.min(k*D+R,f.length):Q=f.length,Z=R;Z.999999?(R[0]=0,R[1]=0,R[2]=0,R[3]=1,R):(d.cross(c,k,W),R[0]=c[0],R[1]=c[1],R[2]=c[2],R[3]=1+z,L.normalize(R,R))}}(),L.setAxes=function(){var c=O.create();return function(f,D,R,k){return c[0]=R[0],c[3]=R[1],c[6]=R[2],c[1]=k[0],c[4]=k[1],c[7]=k[2],c[2]=-D[0],c[5]=-D[1],c[8]=-D[2],L.normalize(f,L.fromMat3(f,c))}}(),L.clone=v.clone,L.fromValues=v.fromValues,L.copy=v.copy,L.set=v.set,L.identity=function(c){return c[0]=0,c[1]=0,c[2]=0,c[3]=1,c},L.setAxisAngle=function(c,f,D){D=D*.5;var R=Math.sin(D);return c[0]=R*f[0],c[1]=R*f[1],c[2]=R*f[2],c[3]=Math.cos(D),c},L.add=v.add,L.multiply=function(c,f,D){var R=f[0],k=f[1],W=f[2],z=f[3],Z=D[0],Q=D[1],te=D[2],$=D[3];return c[0]=R*$+z*Z+k*te-W*Q,c[1]=k*$+z*Q+W*Z-R*te,c[2]=W*$+z*te+R*Q-k*Z,c[3]=z*$-R*Z-k*Q-W*te,c},L.mul=L.multiply,L.scale=v.scale,L.rotateX=function(c,f,D){D*=.5;var R=f[0],k=f[1],W=f[2],z=f[3],Z=Math.sin(D),Q=Math.cos(D);return c[0]=R*Q+z*Z,c[1]=k*Q+W*Z,c[2]=W*Q-k*Z,c[3]=z*Q-R*Z,c},L.rotateY=function(c,f,D){D*=.5;var R=f[0],k=f[1],W=f[2],z=f[3],Z=Math.sin(D),Q=Math.cos(D);return c[0]=R*Q-W*Z,c[1]=k*Q+z*Z,c[2]=W*Q+R*Z,c[3]=z*Q-k*Z,c},L.rotateZ=function(c,f,D){D*=.5;var R=f[0],k=f[1],W=f[2],z=f[3],Z=Math.sin(D),Q=Math.cos(D);return c[0]=R*Q+k*Z,c[1]=k*Q-R*Z,c[2]=W*Q+z*Z,c[3]=z*Q-W*Z,c},L.calculateW=function(c,f){var D=f[0],R=f[1],k=f[2];return c[0]=D,c[1]=R,c[2]=k,c[3]=Math.sqrt(Math.abs(1-D*D-R*R-k*k)),c},L.dot=v.dot,L.lerp=v.lerp,L.slerp=function(c,f,D,R){var k=f[0],W=f[1],z=f[2],Z=f[3],Q=D[0],te=D[1],$=D[2],ie=D[3],ae,re,ce,oe,he;return re=k*Q+W*te+z*$+Z*ie,re<0&&(re=-re,Q=-Q,te=-te,$=-$,ie=-ie),1-re>1e-6?(ae=Math.acos(re),ce=Math.sin(ae),oe=Math.sin((1-R)*ae)/ce,he=Math.sin(R*ae)/ce):(oe=1-R,he=R),c[0]=oe*k+he*Q,c[1]=oe*W+he*te,c[2]=oe*z+he*$,c[3]=oe*Z+he*ie,c},L.invert=function(c,f){var D=f[0],R=f[1],k=f[2],W=f[3],z=D*D+R*R+k*k+W*W,Z=z?1/z:0;return c[0]=-D*Z,c[1]=-R*Z,c[2]=-k*Z,c[3]=W*Z,c},L.conjugate=function(c,f){return c[0]=-f[0],c[1]=-f[1],c[2]=-f[2],c[3]=f[3],c},L.length=v.length,L.len=L.length,L.squaredLength=v.squaredLength,L.sqrLen=L.squaredLength,L.normalize=v.normalize,L.fromMat3=function(c,f){var D=f[0]+f[4]+f[8],R;if(D>0)R=Math.sqrt(D+1),c[3]=.5*R,R=.5/R,c[0]=(f[5]-f[7])*R,c[1]=(f[6]-f[2])*R,c[2]=(f[1]-f[3])*R;else{var k=0;f[4]>f[0]&&(k=1),f[8]>f[k*3+k]&&(k=2);var W=(k+1)%3,z=(k+2)%3;R=Math.sqrt(f[k*3+k]-f[W*3+W]-f[z*3+z]+1),c[k]=.5*R,R=.5/R,c[3]=(f[W*3+z]-f[z*3+W])*R,c[W]=(f[W*3+k]+f[k*3+W])*R,c[z]=(f[z*3+k]+f[k*3+z])*R}return c},L.str=function(c){return"quat("+c[0]+", "+c[1]+", "+c[2]+", "+c[3]+")"},typeof x!="undefined"&&(x.quat=L)}(w.exports)})(this)},function(ee,G,_){"use strict";var F=_(24),w=_(46),x=_(5),y=_(6),b=_(7),E=_(17),g=_(28),m=_(13),C=_(0),d=_.n(C),v=_(29),A=_(53),T=_.n(A),O=_(54),P=_(106),L=_(107),c=_(113),f=_(114),D=_(3),R=_(68),k=_(37),W=_(69),z=_(116),Z=_(70),Q=_(71),te=_(72),$=_(36),ie=_(30),ae=_(23),re=_(4),ce=_(117),oe=_(50),he=_(118),se=_(119),pe=_(120),me=_(9),ge=_(67),Ee=_(49),Ae=_(15),Fe=_(52),Ue=_(121),nt=_(126),rt=_(63),qe=_(127),dt=_(128),yt=_(129),je=_(130),at=_(131),it=_(132);d.a.util.extend(g.a.prototype,Ue.a),b.a.import(nt.a),b.a.import(rt.a),b.a.import(qe.a),b.a.import(dt.a),b.a.import(yt.a),b.a.import(je.a),b.a.import(at.a),b.a.import(it.a);function ht(Ve){return!Ve||Ve==="none"}function ut(Ve){return Ve instanceof HTMLCanvasElement||Ve instanceof HTMLImageElement||Ve instanceof Image}function Mt(Ve){return Ve.getZr&&Ve.setOption}var Ce=v.a.prototype.addToScene,ot=v.a.prototype.removeFromScene;v.a.prototype.addToScene=function(Ve){if(Ce.call(this,Ve),this.__zr){var $e=this.__zr;Ve.traverse(function(lt){lt.__zr=$e,lt.addAnimatorsToZr&<.addAnimatorsToZr($e)})}},v.a.prototype.removeFromScene=function(Ve){ot.call(this,Ve),Ve.traverse(function($e){var lt=$e.__zr;$e.__zr=null,lt&&$e.removeAnimatorsFromZr&&$e.removeAnimatorsFromZr(lt)})},E.a.prototype.setTextureImage=function(Ve,$e,lt,pt){if(this.shader){var xt=lt.getZr(),wt=this,Dt;return wt.autoUpdateTextureStatus=!1,wt.disableTexture(Ve),ht($e)||(Dt=Pe.loadTexture($e,lt,pt,function(kt){wt.enableTexture(Ve),xt&&xt.refresh()}),wt.set(Ve,Dt)),Dt}};var Pe={};Pe.Renderer=w.a,Pe.Node=g.a,Pe.Mesh=F.a,Pe.Shader=b.a,Pe.Material=E.a,Pe.Texture=y.a,Pe.Texture2D=x.a,Pe.Geometry=m.a,Pe.SphereGeometry=R.a,Pe.PlaneGeometry=k.a,Pe.CubeGeometry=W.a,Pe.AmbientLight=z.a,Pe.DirectionalLight=Z.a,Pe.PointLight=Q.a,Pe.SpotLight=te.a,Pe.PerspectiveCamera=$.a,Pe.OrthographicCamera=ie.a,Pe.Vector2=ae.a,Pe.Vector3=re.a,Pe.Vector4=ce.a,Pe.Quaternion=oe.a,Pe.Matrix2=he.a,Pe.Matrix2d=se.a,Pe.Matrix3=pe.a,Pe.Matrix4=me.a,Pe.Plane=ge.a,Pe.Ray=Ee.a,Pe.BoundingBox=Ae.a,Pe.Frustum=Fe.a;var Ne=O.a.createBlank("rgba(255,255,255,0)").image;function We(Ve){return Math.pow(2,Math.round(Math.log(Ve)/Math.LN2))}function Be(Ve){if((Ve.wrapS===y.a.REPEAT||Ve.wrapT===y.a.REPEAT)&&Ve.image){var $e=We(Ve.width),lt=We(Ve.height);if($e!==Ve.width||lt!==Ve.height){var pt=document.createElement("canvas");pt.width=$e,pt.height=lt;var xt=pt.getContext("2d");xt.drawImage(Ve.image,0,0,$e,lt),Ve.image=pt}}}Pe.loadTexture=function(Ve,$e,lt,pt){typeof lt=="function"&&(pt=lt,lt={}),lt=lt||{};for(var xt=Object.keys(lt).sort(),wt="",Dt=0;Dt3?$e[3]=Ve[3]:$e[3]=1,$e):($e=d.a.color.parse(Ve||"#000",$e)||[0,0,0,0],$e[0]/=255,$e[1]/=255,$e[2]/=255,$e)},Pe.directionFromAlphaBeta=function(Ve,$e){var lt=Ve/180*Math.PI+Math.PI/2,pt=-$e/180*Math.PI+Math.PI/2,xt=[],wt=Math.sin(lt);return xt[0]=wt*Math.cos(pt),xt[1]=-Math.cos(lt),xt[2]=wt*Math.sin(pt),xt},Pe.getShadowResolution=function(Ve){var $e=1024;switch(Ve){case"low":$e=512;break;case"medium":break;case"high":$e=2048;break;case"ultra":$e=4096;break}return $e},Pe.COMMON_SHADERS=["lambert","color","realistic","hatching"],Pe.createShader=function(Ve){var $e=b.a.source(Ve+".vertex"),lt=b.a.source(Ve+".fragment");$e||console.error("Vertex shader of '%s' not exits",Ve),lt||console.error("Fragment shader of '%s' not exits",Ve);var pt=new b.a($e,lt);return pt.name=Ve,pt},Pe.createMaterial=function(Ve,$e){$e instanceof Array||($e=[$e]);var lt=Pe.createShader(Ve),pt=new E.a({shader:lt});return $e.forEach(function(xt){typeof xt=="string"&&pt.define(xt)}),pt},Pe.setMaterialFromModel=function(Ve,$e,lt,pt){$e.autoUpdateTextureStatus=!1;var xt=lt.getModel(Ve+"Material"),wt=xt.get("detailTexture"),Dt=D.a.firstNotNull(xt.get("textureTiling"),1),kt=D.a.firstNotNull(xt.get("textureOffset"),0);typeof Dt=="number"&&(Dt=[Dt,Dt]),typeof kt=="number"&&(kt=[kt,kt]);var Yt=Dt[0]>1||Dt[1]>1?Pe.Texture.REPEAT:Pe.Texture.CLAMP_TO_EDGE,Wt={anisotropic:8,wrapS:Yt,wrapT:Yt};if(Ve==="realistic"){var Ot=xt.get("roughness"),en=xt.get("metalness");en!=null?isNaN(en)&&($e.setTextureImage("metalnessMap",en,pt,Wt),en=D.a.firstNotNull(xt.get("metalnessAdjust"),.5)):en=0,Ot!=null?isNaN(Ot)&&($e.setTextureImage("roughnessMap",Ot,pt,Wt),Ot=D.a.firstNotNull(xt.get("roughnessAdjust"),.5)):Ot=.5;var vn=xt.get("normalTexture");$e.setTextureImage("detailMap",wt,pt,Wt),$e.setTextureImage("normalMap",vn,pt,Wt),$e.set({roughness:Ot,metalness:en,detailUvRepeat:Dt,detailUvOffset:kt})}else if(Ve==="lambert")$e.setTextureImage("detailMap",wt,pt,Wt),$e.set({detailUvRepeat:Dt,detailUvOffset:kt});else if(Ve==="color")$e.setTextureImage("detailMap",wt,pt,Wt),$e.set({detailUvRepeat:Dt,detailUvOffset:kt});else if(Ve==="hatching"){var Jn=xt.get("hatchingTextures")||[];Jn.length<6&&console.error("Invalid hatchingTextures.");for(var Fn=0;Fn<6;Fn++)$e.setTextureImage("hatch"+(Fn+1),Jn[Fn],pt,{anisotropic:8,wrapS:Pe.Texture.REPEAT,wrapT:Pe.Texture.REPEAT});$e.set({detailUvRepeat:Dt,detailUvOffset:kt})}},Pe.updateVertexAnimation=function(Ve,$e,lt,pt){var xt=pt.get("animation"),wt=pt.get("animationDurationUpdate"),Dt=pt.get("animationEasingUpdate"),kt=lt.shadowDepthMaterial;if(xt&&$e&&wt>0&&$e.geometry.vertexCount===lt.geometry.vertexCount){lt.material.define("vertex","VERTEX_ANIMATION"),lt.ignorePreZ=!0,kt&&kt.define("vertex","VERTEX_ANIMATION");for(var Yt=0;YtT?T:v}var m=Math.atan2,C=Math.asin,d=Math.abs;y.eulerFromQuat=function(v,A,z){v._dirty=!0,A=A.array;var O=v.array,P=A[0],L=A[1],c=A[2],f=A[3],D=P*P,R=L*L,k=c*c,W=f*f,z=(z||"XYZ").toUpperCase();switch(z){case"XYZ":O[0]=m(2*(P*f-L*c),W-D-R+k),O[1]=C(g(2*(P*c+L*f),-1,1)),O[2]=m(2*(c*f-P*L),W+D-R-k);break;case"YXZ":O[0]=C(g(2*(P*f-L*c),-1,1)),O[1]=m(2*(P*c+L*f),W-D-R+k),O[2]=m(2*(P*L+c*f),W-D+R-k);break;case"ZXY":O[0]=C(g(2*(P*f+L*c),-1,1)),O[1]=m(2*(L*f-c*P),W-D-R+k),O[2]=m(2*(c*f-P*L),W-D+R-k);break;case"ZYX":O[0]=m(2*(P*f+c*L),W-D-R+k),O[1]=C(g(2*(L*f-P*c),-1,1)),O[2]=m(2*(P*L+c*f),W+D-R-k);break;case"YZX":O[0]=m(2*(P*f-c*L),W-D+R-k),O[1]=m(2*(L*f-P*c),W+D-R-k),O[2]=C(g(2*(P*L+c*f),-1,1));break;case"XZY":O[0]=m(2*(P*f+L*c),W-D+R-k),O[1]=m(2*(P*c+L*f),W+D-R-k),O[2]=C(g(2*(c*f-P*L),-1,1));break;default:console.warn("Unkown order: "+z)}return v},y.eulerFromMat3=function(v,A,Q){var O=A.array,P=O[0],L=O[3],c=O[6],f=O[1],D=O[4],R=O[7],k=O[2],W=O[5],z=O[8],Z=v.array,Q=(Q||"XYZ").toUpperCase();switch(Q){case"XYZ":Z[1]=C(g(c,-1,1)),d(c)<.99999?(Z[0]=m(-R,z),Z[2]=m(-L,P)):(Z[0]=m(W,D),Z[2]=0);break;case"YXZ":Z[0]=C(-g(R,-1,1)),d(R)<.99999?(Z[1]=m(c,z),Z[2]=m(f,D)):(Z[1]=m(-k,P),Z[2]=0);break;case"ZXY":Z[0]=C(g(W,-1,1)),d(W)<.99999?(Z[1]=m(-k,z),Z[2]=m(-L,D)):(Z[1]=0,Z[2]=m(f,P));break;case"ZYX":Z[1]=C(-g(k,-1,1)),d(k)<.99999?(Z[0]=m(W,z),Z[2]=m(f,P)):(Z[0]=0,Z[2]=m(-L,D));break;case"YZX":Z[2]=C(g(f,-1,1)),d(f)<.99999?(Z[0]=m(-R,D),Z[1]=m(-k,P)):(Z[0]=0,Z[1]=m(c,z));break;case"XZY":Z[2]=C(-g(L,-1,1)),d(L)<.99999?(Z[0]=m(W,D),Z[1]=m(c,P)):(Z[0]=m(-R,z),Z[1]=0);break;default:console.warn("Unkown order: "+Q)}return v._dirty=!0,v},y.POSITIVE_X=new y(1,0,0),y.NEGATIVE_X=new y(-1,0,0),y.POSITIVE_Y=new y(0,1,0),y.NEGATIVE_Y=new y(0,-1,0),y.POSITIVE_Z=new y(0,0,1),y.NEGATIVE_Z=new y(0,0,-1),y.UP=new y(0,1,0),y.ZERO=new y(0,0,0),G.a=y},function(ee,G,_){"use strict";var F=_(6),w=_(11),x=_(66),y=x.a.isPowerOfTwo,b=F.a.extend(function(){return{image:null,pixels:null,mipmaps:[]}},{update:function(E){var g=E.gl;g.bindTexture(g.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(E);var m=this.format,C=this.type;g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,this.getAvailableWrapS()),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,this.getAvailableWrapT()),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var d=E.getGLExtension("EXT_texture_filter_anisotropic");if(d&&this.anisotropic>1&&g.texParameterf(g.TEXTURE_2D,d.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),C===36193){var v=E.getGLExtension("OES_texture_half_float");v||(C=w.a.FLOAT)}if(this.mipmaps.length)for(var A=this.width,T=this.height,O=0;O=F.a.COMPRESSED_RGB_S3TC_DXT1_EXT?E.compressedTexImage2D(E.TEXTURE_2D,m,v,C,d,0,g.pixels):E.texImage2D(E.TEXTURE_2D,m,v,C,d,0,v,A,g.pixels)},generateMipmap:function(E){var g=E.gl;this.useMipmap&&!this.NPOT&&(g.bindTexture(g.TEXTURE_2D,this._cache.get("webgl_texture")),g.generateMipmap(g.TEXTURE_2D))},isPowerOfTwo:function(){var E,g;return this.image?(E=this.image.width,g=this.image.height):(E=this.width,g=this.height),y(E)&&y(g)},isRenderable:function(){return this.image?this.image.nodeName==="CANVAS"||this.image.nodeName==="VIDEO"||this.image.complete:!!(this.width&&this.height)},bind:function(E){E.gl.bindTexture(E.gl.TEXTURE_2D,this.getWebGLTexture(E))},unbind:function(E){E.gl.bindTexture(E.gl.TEXTURE_2D,null)},load:function(E,g){var m=new Image;g&&(m.crossOrigin=g);var C=this;return m.onload=function(){C.dirty(),C.trigger("success",C),m.onload=null},m.onerror=function(){C.trigger("error",C),m.onerror=null},m.src=E,this.image=m,this}});Object.defineProperty(b.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(E){this.image?console.warn("Texture from image can't set width"):(this._width!==E&&this.dirty(),this._width=E)}}),Object.defineProperty(b.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(E){this.image?console.warn("Texture from image can't set height"):(this._height!==E&&this.dirty(),this._height=E)}}),G.a=b},function(ee,G,_){"use strict";var F=_(8),w=_(11),x=_(48),y=F.a.extend({width:512,height:512,type:w.a.UNSIGNED_BYTE,format:w.a.RGBA,wrapS:w.a.REPEAT,wrapT:w.a.REPEAT,minFilter:w.a.LINEAR_MIPMAP_LINEAR,magFilter:w.a.LINEAR,useMipmap:!0,anisotropic:1,flipY:!0,sRGB:!0,unpackAlignment:4,premultiplyAlpha:!1,dynamic:!1,NPOT:!1},function(){this._cache=new x.a},{getWebGLTexture:function(b){var E=b.gl,g=this._cache;return g.use(b.__uid__),g.miss("webgl_texture")&&g.put("webgl_texture",E.createTexture()),this.dynamic?this.update(b):g.isDirty()&&(this.update(b),g.fresh()),g.get("webgl_texture")},bind:function(){},unbind:function(){},dirty:function(){this._cache&&this._cache.dirtyAll()},update:function(b){},updateCommon:function(b){var E=b.gl;E.pixelStorei(E.UNPACK_FLIP_Y_WEBGL,this.flipY),E.pixelStorei(E.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),E.pixelStorei(E.UNPACK_ALIGNMENT,this.unpackAlignment),this.format===w.a.DEPTH_COMPONENT&&(this.useMipmap=!1);var g=b.getGLExtension("EXT_sRGB");this.format===y.SRGB&&!g&&(this.format=y.RGB),this.format===y.SRGB_ALPHA&&!g&&(this.format=y.RGBA),this.NPOT=!this.isPowerOfTwo()},getAvailableWrapS:function(){return this.NPOT?w.a.CLAMP_TO_EDGE:this.wrapS},getAvailableWrapT:function(){return this.NPOT?w.a.CLAMP_TO_EDGE:this.wrapT},getAvailableMinFilter:function(){var b=this.minFilter;return this.NPOT||!this.useMipmap?b==w.a.NEAREST_MIPMAP_NEAREST||b==w.a.NEAREST_MIPMAP_LINEAR?w.a.NEAREST:b==w.a.LINEAR_MIPMAP_LINEAR||b==w.a.LINEAR_MIPMAP_NEAREST?w.a.LINEAR:b:b},getAvailableMagFilter:function(){return this.magFilter},nextHighestPowerOfTwo:function(b){--b;for(var E=1;E<32;E<<=1)b=b|b>>E;return b+1},dispose:function(b){var E=this._cache;E.use(b.__uid__);var g=E.get("webgl_texture");g&&b.gl.deleteTexture(g),E.deleteContext(b.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(y.prototype,"width",{get:function(){return this._width},set:function(b){this._width=b}}),Object.defineProperty(y.prototype,"height",{get:function(){return this._height},set:function(b){this._height=b}}),y.BYTE=w.a.BYTE,y.UNSIGNED_BYTE=w.a.UNSIGNED_BYTE,y.SHORT=w.a.SHORT,y.UNSIGNED_SHORT=w.a.UNSIGNED_SHORT,y.INT=w.a.INT,y.UNSIGNED_INT=w.a.UNSIGNED_INT,y.FLOAT=w.a.FLOAT,y.HALF_FLOAT=36193,y.UNSIGNED_INT_24_8_WEBGL=34042,y.DEPTH_COMPONENT=w.a.DEPTH_COMPONENT,y.DEPTH_STENCIL=w.a.DEPTH_STENCIL,y.ALPHA=w.a.ALPHA,y.RGB=w.a.RGB,y.RGBA=w.a.RGBA,y.LUMINANCE=w.a.LUMINANCE,y.LUMINANCE_ALPHA=w.a.LUMINANCE_ALPHA,y.SRGB=35904,y.SRGB_ALPHA=35906,y.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,y.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,y.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,y.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,y.NEAREST=w.a.NEAREST,y.LINEAR=w.a.LINEAR,y.NEAREST_MIPMAP_NEAREST=w.a.NEAREST_MIPMAP_NEAREST,y.LINEAR_MIPMAP_NEAREST=w.a.LINEAR_MIPMAP_NEAREST,y.NEAREST_MIPMAP_LINEAR=w.a.NEAREST_MIPMAP_LINEAR,y.LINEAR_MIPMAP_LINEAR=w.a.LINEAR_MIPMAP_LINEAR,y.REPEAT=w.a.REPEAT,y.CLAMP_TO_EDGE=w.a.CLAMP_TO_EDGE,y.MIRRORED_REPEAT=w.a.MIRRORED_REPEAT,G.a=y},function(ee,G,_){"use strict";var F=_(21),w=_(18),x=_(1),y=_.n(x),b=y.a.mat2,E=y.a.mat3,g=y.a.mat4,m=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\w\,]+)?(\[.*?\])?\s*(:\s*([\S\s]+?))?;/g,C=/attribute\s+(float|int|vec2|vec3|vec4)\s+(\w*)\s*(:\s*(\w+))?;/g,d=/#define\s+(\w+)?(\s+[\w-.]+)?\s*;?\s*\n/g,v={bool:"1i",int:"1i",sampler2D:"t",samplerCube:"t",float:"1f",vec2:"2f",vec3:"3f",vec4:"4f",ivec2:"2i",ivec3:"3i",ivec4:"4i",mat2:"m2",mat3:"m3",mat4:"m4"},A={bool:function(){return!0},int:function(){return 0},float:function(){return 0},sampler2D:function(){return null},samplerCube:function(){return null},vec2:function(){return[0,0]},vec3:function(){return[0,0,0]},vec4:function(){return[0,0,0,0]},ivec2:function(){return[0,0]},ivec3:function(){return[0,0,0]},ivec4:function(){return[0,0,0,0]},mat2:function(){return b.create()},mat3:function(){return E.create()},mat4:function(){return g.create()},array:function(){return[]}},T=["POSITION","NORMAL","BINORMAL","TANGENT","TEXCOORD","TEXCOORD_0","TEXCOORD_1","COLOR","JOINT","WEIGHT"],O=["SKIN_MATRIX","VIEWPORT_SIZE","VIEWPORT","DEVICEPIXELRATIO","WINDOW_SIZE","NEAR","FAR","TIME"],P=["WORLD","VIEW","PROJECTION","WORLDVIEW","VIEWPROJECTION","WORLDVIEWPROJECTION","WORLDINVERSE","VIEWINVERSE","PROJECTIONINVERSE","WORLDVIEWINVERSE","VIEWPROJECTIONINVERSE","WORLDVIEWPROJECTIONINVERSE","WORLDTRANSPOSE","VIEWTRANSPOSE","PROJECTIONTRANSPOSE","WORLDVIEWTRANSPOSE","VIEWPROJECTIONTRANSPOSE","WORLDVIEWPROJECTIONTRANSPOSE","WORLDINVERSETRANSPOSE","VIEWINVERSETRANSPOSE","PROJECTIONINVERSETRANSPOSE","WORLDVIEWINVERSETRANSPOSE","VIEWPROJECTIONINVERSETRANSPOSE","WORLDVIEWPROJECTIONINVERSETRANSPOSE"],L={},c={};function f(W,z){var Z="vertex:"+W+"fragment:"+z;if(L[Z])return L[Z];var Q=F.a.genGUID();return L[Z]=Q,c[Q]={vertex:W,fragment:z},Q}function D(W,z){typeof W=="object"&&(z=W.fragment,W=W.vertex),this._shaderID=f(W,z),this._vertexCode=D.parseImport(W),this._fragmentCode=D.parseImport(z),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}D.prototype={constructor:D,createUniforms:function(){var W={};for(var z in this.uniformTemplates){var Z=this.uniformTemplates[z];W[z]={type:Z.type,value:Z.value()}}return W},_parseImport:function(){this._vertexCode=D.parseImport(this.vertex),this._fragmentCode=D.parseImport(this.fragment)},_parseUniforms:function(){var W={},z=this,Z="vertex";this._uniformList=[],this._vertexCode=this._vertexCode.replace(m,Q),Z="fragment",this._fragmentCode=this._fragmentCode.replace(m,Q),z.matrixSemanticKeys=Object.keys(this.matrixSemantics);function Q(te,$,ie,ae,re,ce){if($&&ie){var oe=v[$],he=!0,se;if(oe){if(z._uniformList.push(ie),($==="sampler2D"||$==="samplerCube")&&(z.textures[ie]={shaderType:Z,type:$}),ae&&(oe+="v"),ce)if(T.indexOf(ce)>=0)z.attributeSemantics[ce]={symbol:ie,type:oe},he=!1;else if(P.indexOf(ce)>=0){var pe=!1,me=ce;ce.match(/TRANSPOSE$/)&&(pe=!0,me=ce.slice(0,-9)),z.matrixSemantics[ce]={symbol:ie,type:oe,isTranspose:pe,semanticNoTranspose:me},he=!1}else if(O.indexOf(ce)>=0)z.uniformSemantics[ce]={symbol:ie,type:oe},he=!1;else if(ce==="unconfigurable")he=!1;else if(se=z._parseDefaultValue($,ce),se)ce="";else throw new Error('Unkown semantic "'+ce+'"');he&&(W[ie]={type:oe,value:ae?A.array:se||A[$],semantic:ce||null})}return["uniform",$,ie,ae].join(" ")+`; `}}this.uniformTemplates=W},_parseDefaultValue:function(W,z){var Z=/\[\s*(.*)\s*\]/;if(W==="vec2"||W==="vec3"||W==="vec4"){var Q=Z.exec(z)[1];if(Q){var te=Q.split(/\s*,\s*/);return function(){return new w.a.Float32Array(te)}}else return}else{if(W==="bool")return function(){return z.toLowerCase()==="true"};if(W==="float")return function(){return parseFloat(z)};if(W==="int")return function(){return parseInt(z)}}},_parseAttributes:function(){var W={},z=this;this._vertexCode=this._vertexCode.replace(C,Z);function Z(Q,te,$,ie,ae){if(te&&$){var re=1;switch(te){case"vec4":re=4;break;case"vec3":re=3;break;case"vec2":re=2;break;case"float":re=1;break}if(W[$]={type:"float",size:re,semantic:ae||null},ae){if(T.indexOf(ae)<0)throw new Error('Unkown semantic "'+ae+'"');z.attributeSemantics[ae]={symbol:$,type:te}}}return["attribute",te,$].join(" ")+`; `}this.attributes=W},_parseDefines:function(){var W=this,z="vertex";this._vertexCode=this._vertexCode.replace(d,Z),z="fragment",this._fragmentCode=this._fragmentCode.replace(d,Z);function Z(Q,te,$){var ie=z==="vertex"?W.vertexDefines:W.fragmentDefines;return ie[te]||($=="false"?ie[te]=!1:$=="true"?ie[te]=!0:ie[te]=$?isNaN(parseFloat($))?$.trim():parseFloat($):null),""}},clone:function(){var W=c[this._shaderID],z=new D(W.vertex,W.fragment);return z}},Object.defineProperty&&(Object.defineProperty(D.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(D.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(D.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(D.prototype,"uniforms",{get:function(){return this._uniformList}}));var R=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;D.parseImport=function(W){return W=W.replace(R,function(te,Z,Q){var te=D.source(Q);return te?D.parseImport(te):(console.error('Shader chunk "'+Q+'" not existed in library'),"")}),W};var k=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;D.import=function(W){W.replace(k,function(z,Z,Q,$){var $=$.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"");if($){for(var ie=Q.split("."),ae=D.codes,re=0,ce;reZ[0]&&(Z[0]=te),$>Z[1]&&(Z[1]=$),ie>Z[2]&&(Z[2]=ie)}k._dirty=!0,W._dirty=!0}},dirty:function(){for(var D=this.getEnabledAttributes(),R=0;R=0){R||(R=d());var k=this.indices;return R[0]=k[D*3],R[1]=k[D*3+1],R[2]=k[D*3+2],R}},setTriangleIndices:function(D,R){var k=this.indices;k[D*3]=R[0],k[D*3+1]=R[1],k[D*3+2]=R[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(D){var R,k=this.vertexCount>65535?y.a.Uint32Array:y.a.Uint16Array;if(D[0]&&D[0].length){var W=0,z=3;R=new k(D.length*z);for(var Z=0;Z=0?(R.splice(k,1),delete this.attributes[D],!0):!1},getAttribute:function(D){return this.attributes[D]},getEnabledAttributes:function(){var D=this._enabledAttributes,R=this._attributeList;if(D)return D;for(var k=[],W=this.vertexCount,z=0;z65535&&(this.indices=new y.a.Uint32Array(this.indices));for(var D=this.attributes,R=this.indices,k=this.getEnabledAttributes(),W={},z=0;z=P.COLOR_ATTACHMENT0&&f<=P.COLOR_ATTACHMENT0+8&&c.push(f);L.drawBuffersEXT(c)}}this.trigger("beforerender",this,T);var D=this.clearDepth?P.DEPTH_BUFFER_BIT:0;if(P.depthMask(!0),this.clearColor){D=D|P.COLOR_BUFFER_BIT,P.colorMask(!0,!0,!0,!0);var R=this.clearColor;Array.isArray(R)&&P.clearColor(R[0],R[1],R[2],R[3])}P.clear(D),this.blendWithPrevious?(P.enable(P.BLEND),this.material.transparent=!0):(P.disable(P.BLEND),this.material.transparent=!1),this.renderQuad(T),this.trigger("afterrender",this,T),O&&this.unbind(T,O)},renderQuad:function(T){d.material=this.material,T.renderPass([d],v)},dispose:function(T){}});G.a=A},function(ee,G,_){"use strict";var F=_(4),w=_(1),x=_.n(w),y=x.a.vec3,b=y.copy,E=y.set,g=function(m,C){this.min=m||new F.a(1/0,1/0,1/0),this.max=C||new F.a(-1/0,-1/0,-1/0)};g.prototype={constructor:g,updateFromVertices:function(m){if(m.length>0){var C=this.min,d=this.max,v=C.array,A=d.array;b(v,m[0]),b(A,m[0]);for(var T=1;TA[0]&&(A[0]=O[0]),O[1]>A[1]&&(A[1]=O[1]),O[2]>A[2]&&(A[2]=O[2])}C._dirty=!0,d._dirty=!0}},union:function(m){var C=this.min,d=this.max;return y.min(C.array,C.array,m.min.array),y.max(d.array,d.array,m.max.array),C._dirty=!0,d._dirty=!0,this},intersection:function(m){var C=this.min,d=this.max;return y.max(C.array,C.array,m.min.array),y.min(d.array,d.array,m.max.array),C._dirty=!0,d._dirty=!0,this},intersectBoundingBox:function(m){var C=this.min.array,d=this.max.array,v=m.min.array,A=m.max.array;return!(C[0]>A[0]||C[1]>A[1]||C[2]>A[2]||d[0]=A[0]&&d[1]>=A[1]&&d[2]>=A[2]},containPoint:function(m){var C=this.min.array,d=this.max.array,v=m.array;return C[0]<=v[0]&&C[1]<=v[1]&&C[2]<=v[2]&&d[0]>=v[0]&&d[1]>=v[1]&&d[2]>=v[2]},isFinite:function(){var m=this.min.array,C=this.max.array;return isFinite(m[0])&&isFinite(m[1])&&isFinite(m[2])&&isFinite(C[0])&&isFinite(C[1])&&isFinite(C[2])},applyTransform:function(){var m=y.create(),C=y.create(),d=y.create(),v=y.create(),A=y.create(),T=y.create();return function(O){var P=this.min.array,L=this.max.array,c=O.array;return m[0]=c[0]*P[0],m[1]=c[1]*P[0],m[2]=c[2]*P[0],C[0]=c[0]*L[0],C[1]=c[1]*L[0],C[2]=c[2]*L[0],d[0]=c[4]*P[1],d[1]=c[5]*P[1],d[2]=c[6]*P[1],v[0]=c[4]*L[1],v[1]=c[5]*L[1],v[2]=c[6]*L[1],A[0]=c[8]*P[2],A[1]=c[9]*P[2],A[2]=c[10]*P[2],T[0]=c[8]*L[2],T[1]=c[9]*L[2],T[2]=c[10]*L[2],P[0]=Math.min(m[0],C[0])+Math.min(d[0],v[0])+Math.min(A[0],T[0])+c[12],P[1]=Math.min(m[1],C[1])+Math.min(d[1],v[1])+Math.min(A[1],T[1])+c[13],P[2]=Math.min(m[2],C[2])+Math.min(d[2],v[2])+Math.min(A[2],T[2])+c[14],L[0]=Math.max(m[0],C[0])+Math.max(d[0],v[0])+Math.max(A[0],T[0])+c[12],L[1]=Math.max(m[1],C[1])+Math.max(d[1],v[1])+Math.max(A[1],T[1])+c[13],L[2]=Math.max(m[2],C[2])+Math.max(d[2],v[2])+Math.max(A[2],T[2])+c[14],this.min._dirty=!0,this.max._dirty=!0,this}}(),applyProjection:function(m){var C=this.min.array,d=this.max.array,v=m.array,A=C[0],T=C[1],O=C[2],P=d[0],L=d[1],c=C[2],f=d[0],D=d[1],R=d[2];if(v[15]===1)C[0]=v[0]*A+v[12],C[1]=v[5]*T+v[13],d[2]=v[10]*O+v[14],d[0]=v[0]*f+v[12],d[1]=v[5]*D+v[13],C[2]=v[10]*R+v[14];else{var k=-1/O;C[0]=v[0]*A*k,C[1]=v[5]*T*k,d[2]=(v[10]*O+v[14])*k,k=-1/c,d[0]=v[0]*P*k,d[1]=v[5]*L*k,k=-1/R,C[2]=(v[10]*R+v[14])*k}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var m=this.vertices;if(!m){for(var m=[],C=0;C<8;C++)m[C]=y.fromValues(0,0,0);this.vertices=m}var d=this.min.array,v=this.max.array;return E(m[0],d[0],d[1],d[2]),E(m[1],d[0],v[1],d[2]),E(m[2],v[0],d[1],d[2]),E(m[3],v[0],v[1],d[2]),E(m[4],d[0],d[1],v[2]),E(m[5],d[0],v[1],v[2]),E(m[6],v[0],d[1],v[2]),E(m[7],v[0],v[1],v[2]),this},copy:function(m){var C=this.min,d=this.max;return b(C.array,m.min.array),b(d.array,m.max.array),C._dirty=!0,d._dirty=!0,this},clone:function(){var m=new g;return m.copy(this),m}},G.a=g},function(ee,G,_){"use strict";G.a=function(F,w,x){return{seriesType:F,reset:function(y,b){var E=y.getData(),g=y.visualColorAccessPath.split(".");g[g.length-1]="opacity";var m=y.get(g);E.setVisual("opacity",m==null?1:m);function C(d){var v=E.getItemModel(d),A=v.get(g);A!=null&&E.setItemVisual(d,"opacity",A)}return{dataEach:E.hasItemOption?C:null}}}}},function(ee,G,_){"use strict";var F=_(8),w=_(6),x=_(21),y=_(93),b=y.a.parseToFloat,E={};function g(d,v,A){var T=Object.keys(d);T.sort();for(var O=[],P=0;P=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(d,v){if(typeof d=="object")for(var A in d){var T=d[A];this.setUniform(A,T)}else this.setUniform(d,v)},get:function(d){var v=this.uniforms[d];if(v)return v.value},attachShader:function(d,v){var A=this.uniforms;this.uniforms=d.createUniforms(),this.shader=d;var T=this.uniforms;this._enabledUniforms=Object.keys(T),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter(function(D){var R=this.uniforms[D].type;return R==="t"||R==="tv"},this);var O=this.vertexDefines,P=this.fragmentDefines;if(this.vertexDefines=x.a.clone(d.vertexDefines),this.fragmentDefines=x.a.clone(d.fragmentDefines),v){for(var L in A)T[L]&&(T[L].value=A[L].value);x.a.defaults(this.vertexDefines,O),x.a.defaults(this.fragmentDefines,P)}var c={};for(var f in d.textures)c[f]={shaderType:d.textures[f].shaderType,type:d.textures[f].type,enabled:v&&this._textureStatus[f]?this._textureStatus[f].enabled:!1};this._textureStatus=c,this._programKey=""},clone:function(){var d=new this.constructor({name:this.name,shader:this.shader});for(var v in this.uniforms)d.uniforms[v].value=this.uniforms[v].value;return d.depthTest=this.depthTest,d.depthMask=this.depthMask,d.transparent=this.transparent,d.blend=this.blend,d.vertexDefines=x.a.clone(this.vertexDefines),d.fragmentDefines=x.a.clone(this.fragmentDefines),d.enableTexture(this.getEnabledTextures()),d.precision=this.precision,d},define:function(d,v,A){var T=this.vertexDefines,O=this.fragmentDefines;d!=="vertex"&&d!=="fragment"&&d!=="both"&&arguments.length<3&&(A=v,v=d,d="both"),A=A!=null?A:null,(d==="vertex"||d==="both")&&T[v]!==A&&(T[v]=A,this._programKey=""),(d==="fragment"||d==="both")&&O[v]!==A&&(O[v]=A,d!=="both"&&(this._programKey=""))},undefine:function(d,v){d!=="vertex"&&d!=="fragment"&&d!=="both"&&arguments.length<2&&(v=d,d="both"),(d==="vertex"||d==="both")&&this.isDefined("vertex",v)&&(delete this.vertexDefines[v],this._programKey=""),(d==="fragment"||d==="both")&&this.isDefined("fragment",v)&&(delete this.fragmentDefines[v],d!=="both"&&(this._programKey=""))},isDefined:function(d,v){switch(d){case"vertex":return this.vertexDefines[v]!==void 0;case"fragment":return this.fragmentDefines[v]!==void 0}},getDefine:function(d,v){switch(d){case"vertex":return this.vertexDefines[v];case"fragment":return this.fragmentDefines[v]}},enableTexture:function(d){if(Array.isArray(d)){for(var v=0;v=f.x&&c>=f.y&&L<=f.x+f.width&&c<=f.y+f.height};var P=new C.a;O.prototype.castRay=function(L,c,f){var D=this.layer.renderer,R=D.viewport;return D.viewport=this.viewport,D.screenToNDC(L,c,P),this.camera.castRay(P,f),D.viewport=R,f},O.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this._needsSortProgressively=!1;for(var L=0;L30},O.prototype._doRender=function(L,c,f){var D=this.scene,R=this.camera;if(f=f||0,this._updateTransparent(L,D,R,f),c||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(L,D,R,!0)),this._updateShadowPCFKernel(f),L.gl.clearColor(0,0,0,0),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(L,R),this._compositor.updateNormal(L,D,R,this._temporalSS.getFrame())),this._updateSSAO(L,D,R,this._temporalSS.getFrame()),this._enablePostEffect){var k=this._compositor.getSourceFrameBuffer();k.bind(L),L.gl.clear(L.gl.DEPTH_BUFFER_BIT|L.gl.COLOR_BUFFER_BIT),L.render(D,R,!0,!0),k.unbind(L),this.needsTemporalSS()&&c?(this._compositor.composite(L,R,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),L.setViewport(this.viewport),this._temporalSS.render(L)):(L.setViewport(this.viewport),this._compositor.composite(L,R,null,0))}else if(this.needsTemporalSS()&&c){var k=this._temporalSS.getSourceFrameBuffer();k.bind(L),L.saveClear(),L.clearBit=L.gl.DEPTH_BUFFER_BIT|L.gl.COLOR_BUFFER_BIT,L.render(D,R,!0,!0),L.restoreClear(),k.unbind(L),L.setViewport(this.viewport),this._temporalSS.render(L)}else L.setViewport(this.viewport),L.render(D,R,!0,!0)},O.prototype._updateTransparent=function(L,c,f,D){for(var R=new m.a,k=new g.a,W=f.getWorldPosition(),z=0;zthis.camera.far||L65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(d){this.triangleCount!==d&&(d===0?this.indices=null:this.indices=this.vertexCount>65535?new Uint32Array(d*3):new Uint16Array(d*3))},_getCubicCurveApproxStep:function(d,v,A,T){var O=g.dist(d,v)+g.dist(A,v)+g.dist(T,A),P=1/(O+1)*this.segmentScale;return P},getCubicCurveVertexCount:function(d,v,A,T){var O=this._getCubicCurveApproxStep(d,v,A,T),P=Math.ceil(1/O);return this.useNativeLine?P*2:P*2+2},getCubicCurveTriangleCount:function(d,v,A,T){var O=this._getCubicCurveApproxStep(d,v,A,T),P=Math.ceil(1/O);return this.useNativeLine?0:P*2},getLineVertexCount:function(){return this.getPolylineVertexCount(m)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(m)},getPolylineVertexCount:function(d){var v;if(typeof d=="number")v=d;else{var A=typeof d[0]!="number";v=A?d.length:d.length/3}return this.useNativeLine?(v-1)*2:(v-1)*2+2},getPolylineTriangleCount:function(d){var v;if(typeof d=="number")v=d;else{var A=typeof d[0]!="number";v=A?d.length:d.length/3}return this.useNativeLine?0:Math.max(v-1,0)*2},addCubicCurve:function(d,v,A,T,O,P){P==null&&(P=1);for(var L=d[0],c=d[1],f=d[2],D=v[0],R=v[1],k=v[2],W=A[0],z=A[1],Z=A[2],Q=T[0],te=T[1],$=T[2],ie=this._getCubicCurveApproxStep(d,v,A,T),ae=ie*ie,re=ae*ie,ce=3*ie,oe=3*ae,he=6*ae,se=6*re,pe=L-D*2+W,me=c-R*2+z,ge=f-k*2+Z,Ee=(D-W)*3-L+Q,Ae=(R-z)*3-c+te,Fe=(k-Z)*3-f+$,Ue=L,nt=c,rt=f,qe=(D-L)*ce+pe*oe+Ee*re,dt=(R-c)*ce+me*oe+Ae*re,yt=(k-f)*ce+ge*oe+Fe*re,je=pe*he+Ee*se,at=me*he+Ae*se,it=ge*he+Fe*se,ht=Ee*se,ut=Ae*se,Mt=Fe*se,Ce=0,ot=0,Pe=Math.ceil(1/ie),Ne=new Float32Array((Pe+1)*3),Ne=[],We=0,ot=0;ot1&&(Ue=qe>0?Math.min(Ue,Q):Math.max(Ue,Q),nt=dt>0?Math.min(nt,te):Math.max(nt,te),rt=yt>0?Math.min(rt,$):Math.max(rt,$));return this.addPolyline(Ne,O,P)},addLine:function(d,v,A,T){return this.addPolyline([d,v],A,T)},addPolyline:function(d,v,A,T,O){if(d.length){var P=typeof d[0]!="number";if(O==null&&(O=P?d.length:d.length/3),!(O<2)){T==null&&(T=0),A==null&&(A=1),this._itemVertexOffsets.push(this._vertexOffset);var P=typeof d[0]!="number",L=P?typeof v[0]!="number":v.length/4===O,c=this.attributes.position,f=this.attributes.positionPrev,D=this.attributes.positionNext,R=this.attributes.color,k=this.attributes.offset,W=this.indices,z=this._vertexOffset,Z,Q;A=Math.max(A,.01);for(var te=T;te1&&(c.copy(z,z-1),R.copy(z,z-1),z++):(te0&&(D.set(z-2,Z),D.set(z-1,Z)),c.set(z,Z),c.set(z+1,Z),R.set(z,Q),R.set(z+1,Q),k.set(z,A/2),k.set(z+1,-A/2),z+=2),this.useNativeLine)R.set(z,Q),c.set(z,Z),z++;else if(te>0){var ae=this._triangleOffset*3,W=this.indices;W[ae]=z-4,W[ae+1]=z-3,W[ae+2]=z-2,W[ae+3]=z-3,W[ae+4]=z-1,W[ae+5]=z-2,this._triangleOffset+=2}}if(!this.useNativeLine){var re=this._vertexOffset,ce=this._vertexOffset+O*2;f.copy(re,re+2),f.copy(re+1,re+3),D.copy(ce-1,ce-3),D.copy(ce-2,ce-4)}return this._vertexOffset=z,this._vertexOffset}}},setItemColor:function(d,v){for(var A=this._itemVertexOffsets[d],T=d0)},render:function(b,E,g){var m=b.gl;if(this.skeleton){this.skeleton.update();var C=this.skeleton.getSubSkinMatrices(this.__uid__,this.joints);g.setUniformOfSemantic(m,"SKIN_MATRIX",C)}return F.a.prototype.render.call(this,b,E,g)},getSkinMatricesTexture:function(){return this._skinMatricesTexture=this._skinMatricesTexture||new x.a({type:w.a.FLOAT,minFilter:w.a.NEAREST,magFilter:w.a.NEAREST,useMipmap:!1,flipY:!1}),this._skinMatricesTexture}});y.POINTS=w.a.POINTS,y.LINES=w.a.LINES,y.LINE_LOOP=w.a.LINE_LOOP,y.LINE_STRIP=w.a.LINE_STRIP,y.TRIANGLES=w.a.TRIANGLES,y.TRIANGLE_STRIP=w.a.TRIANGLE_STRIP,y.TRIANGLE_FAN=w.a.TRIANGLE_FAN,y.BACK=w.a.BACK,y.FRONT=w.a.FRONT,y.FRONT_AND_BACK=w.a.FRONT_AND_BACK,y.CW=w.a.CW,y.CCW=w.a.CCW,G.a=y},function(ee,G,_){"use strict";var F=_(6),w=_(11),x=_(21),y=_(66),b=y.a.isPowerOfTwo,E=["px","nx","py","ny","pz","nz"],g=F.a.extend(function(){return{image:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},pixels:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},mipmaps:[]}},{update:function(C){var d=C.gl;d.bindTexture(d.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),this.updateCommon(C);var v=this.format,A=this.type;d.texParameteri(d.TEXTURE_CUBE_MAP,d.TEXTURE_WRAP_S,this.getAvailableWrapS()),d.texParameteri(d.TEXTURE_CUBE_MAP,d.TEXTURE_WRAP_T,this.getAvailableWrapT()),d.texParameteri(d.TEXTURE_CUBE_MAP,d.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),d.texParameteri(d.TEXTURE_CUBE_MAP,d.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var T=C.getGLExtension("EXT_texture_filter_anisotropic");if(T&&this.anisotropic>1&&d.texParameterf(d.TEXTURE_CUBE_MAP,T.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),A===36193){var O=C.getGLExtension("OES_texture_half_float");O||(A=w.a.FLOAT)}if(this.mipmaps.length)for(var P=this.width,L=this.height,c=0;c0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(d)),d.name&&(this._nodeRepository[d.name]=d)},removeFromScene:function(d){if(d instanceof x.a){var v=this._cameraList.indexOf(d);v>=0&&this._cameraList.splice(v,1)}d.name&&delete this._nodeRepository[d.name]},getNode:function(d){return this._nodeRepository[d]},cloneNode:function(d){var v=d.clone(),A={},T=function(P,L){P.skeleton&&(L.skeleton=P.skeleton.clone(d,v),L.joints=P.joints.slice()),P.material&&(A[P.material.__uid__]={oldMat:P.material});for(var c=0;c0&&this._updateRenderList(T)}},_updateLightUniforms:function(){var d=this.lights;d.sort(C);var v=this._lightUniforms;for(var A in v)for(var T in v[A])v[A][T].value.length=0;for(var O=0;O0?F[w].value=new Float32Array(F[w].value):F[w].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}}},function(ee,G,_){"use strict";var F=_(2),w=_(57),x=_(56),y=_(0),b=_.n(y);function E(){}E.prototype={constructor:E,setScene:function(g){this._scene=g,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(g){this._lightRoot=g,this.mainLight=new F.a.DirectionalLight({shadowBias:.005}),this.ambientLight=new F.a.AmbientLight,g.add(this.mainLight),g.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(g){var m=this.mainLight,C=this.ambientLight,d=g.getModel("light"),v=d.getModel("main"),A=d.getModel("ambient");m.intensity=v.get("intensity"),C.intensity=A.get("intensity"),m.color=F.a.parseColor(v.get("color")).slice(0,3),C.color=F.a.parseColor(A.get("color")).slice(0,3);var T=v.get("alpha")||0,O=v.get("beta")||0;m.position.setArray(F.a.directionFromAlphaBeta(T,O)),m.lookAt(F.a.Vector3.ZERO),m.castShadow=v.get("shadow"),m.shadowResolution=F.a.getShadowResolution(v.get("shadowQuality"))},updateAmbientCubemap:function(g,m,C){var d=m.getModel("light.ambientCubemap"),v=d.get("texture");if(v){this._cubemapLightsCache=this._cubemapLightsCache||{};var A=this._cubemapLightsCache[v];if(!A){var T=this;A=this._cubemapLightsCache[v]=F.a.createAmbientCubemap(d.option,g,C,function(){T._skybox instanceof w.a&&T._skybox.setEnvironmentMap(A.specular.cubemap),C.getZr().refresh()})}this._lightRoot.add(A.diffuse),this._lightRoot.add(A.specular),this._currentCubemapLights=A}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(g,m,C){var d=m.get("environment"),v=this;function A(){return v._skybox instanceof w.a||(v._skybox&&v._skybox.dispose(g),v._skybox=new w.a),v._skybox}function T(){return v._skybox instanceof x.a||(v._skybox&&v._skybox.dispose(g),v._skybox=new x.a),v._skybox}if(d&&d!=="none")if(d==="auto")if(this._currentCubemapLights){var O=A(),P=this._currentCubemapLights.specular.cubemap;O.setEnvironmentMap(P),this._scene&&O.attachScene(this._scene),O.material.set("lod",2)}else this._skybox&&this._skybox.detachScene();else if(typeof d=="object"&&d.colorStops||typeof d=="string"&&b.a.color.parse(d)){var L=T(),c=new F.a.Texture2D({anisotropic:8,flipY:!1});L.setEnvironmentMap(c);var f=c.image=document.createElement("canvas");f.width=f.height=16;var D=f.getContext("2d"),R=new b.a.graphic.Rect({shape:{x:0,y:0,width:16,height:16},style:{fill:d}});R.brush(D),L.attachScene(this._scene)}else{var L=T(),c=F.a.loadTexture(d,C,{anisotropic:8,flipY:!1});L.setEnvironmentMap(c),L.attachScene(this._scene)}else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var k=m.coordinateSystem;if(this._skybox)if(k&&k.viewGL&&d!=="auto"&&!(d.match&&d.match(/.hdr$/))){var W=k.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[W]("fragment","SRGB_DECODE")}else this._skybox.material.undefine("fragment","SRGB_DECODE")}},G.a=E},function(ee,G,_){"use strict";var F=_(0),w=_.n(F);function x(y,b){var E=[];return w.a.util.each(y.dimensions,function(g){var m=y.getDimensionInfo(g),C=m.otherDims,d=C[b];d!=null&&d!==!1&&(E[d]=m.name)}),E}G.a=function(y,b,E){function g(P){var L=!0,c=[],f=x(m,"tooltip");f.length?w.a.util.each(f,function(R){D(m.get(R,b),R)}):w.a.util.each(P,D);function D(R,k){var W=m.getDimensionInfo(k);if(!(!W||W.otherDims.tooltip===!1)){var z=W.type,Z=(L?"- "+(W.tooltipName||W.name)+": ":"")+(z==="ordinal"?R+"":z==="time"?E?"":w.a.format.formatTime("yyyy/MM/dd hh:mm:ss",R):w.a.format.addCommas(R));Z&&c.push(w.a.format.encodeHTML(Z))}}return(L?"
    ":"")+c.join(L?"
    ":", ")}var m=y.getData(),C=y.getRawValue(b),d=w.a.util.isArray(C)?g(C):w.a.format.encodeHTML(w.a.format.addCommas(C)),v=m.getName(b),A=m.getItemVisual(b,"color");w.a.util.isObject(A)&&A.colorStops&&(A=(A.colorStops[0]||{}).color),A=A||"transparent";var T=w.a.format.getTooltipMarker(A),O=y.name;return O==="\0-"&&(O=""),O=O?w.a.format.encodeHTML(O)+(E?": ":"
    "):"",E?T+O+d:O+T+(v?w.a.format.encodeHTML(v)+": "+d:d)}},function(ee,G,_){"use strict";var F=_(51),w=F.a.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var x=this.fov/180*Math.PI;this.projectionMatrix.perspective(x,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var x=this.projectionMatrix.array,y=Math.atan(1/x[5])*2;this.fov=y/Math.PI*180,this.aspect=x[5]/x[0],this.near=x[14]/(x[10]-1),this.far=x[14]/(x[10]+1)},clone:function(){var x=F.a.prototype.clone.call(this);return x.fov=this.fov,x.aspect=this.aspect,x.near=this.near,x.far=this.far,x}});G.a=w},function(ee,G,_){"use strict";var F=_(13),w=_(15),x=F.a.extend({dynamic:!1,widthSegments:1,heightSegments:1},function(){this.build()},{build:function(){for(var y=this.heightSegments,b=this.widthSegments,E=this.attributes,g=[],m=[],C=[],d=[],v=0;v<=y;v++)for(var A=v/y,T=0;T<=b;T++){var O=T/b;if(g.push([2*O-1,2*A-1,0]),m&&m.push([O,A]),C&&C.push([0,0,1]),T0&&this._notFirst?this.animateTo({alpha:D,beta:R,center:k,distance:P,targetOrthographicSize:L,easing:f.animationEasingUpdate,duration:f.animationDurationUpdate}):(this.setDistance(P),this.setAlpha(D),this.setBeta(R),this.setCenter(k),this.setOrthographicSize(L)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){g[this.panMouseButton]==null&&console.error("Unkown panMouseButton %s. It should be left|middle|right",this.panMouseButton),g[this.rotateMouseButton]==null&&console.error("Unkown rotateMouseButton %s. It should be left|middle|right",this.rotateMouseButton),this.autoRotateDirection!=="cw"&&this.autoRotateDirection!=="ccw"&&console.error("Unkown autoRotateDirection %s. It should be cw|ccw",this.autoRotateDirection)},animateTo:function(d){var v=this.zr,A=this,T={},O={};return d.distance!=null&&(T.distance=this.getDistance(),O.distance=d.distance),d.orthographicSize!=null&&(T.orthographicSize=this.getOrthographicSize(),O.orthographicSize=d.orthographicSize),d.alpha!=null&&(T.alpha=this.getAlpha(),O.alpha=d.alpha),d.beta!=null&&(T.beta=this.getBeta(),O.beta=d.beta),d.center!=null&&(T.center=this.getCenter(),O.center=d.center),this._addAnimator(v.animation.animate(T).when(d.duration||1e3,O).during(function(){T.alpha!=null&&A.setAlpha(T.alpha),T.beta!=null&&A.setBeta(T.beta),T.distance!=null&&A.setDistance(T.distance),T.center!=null&&A.setCenter(T.center),T.orthographicSize!=null&&A.setOrthographicSize(T.orthographicSize),A._needsUpdate=!0})).start(d.easing||"linear")},stopAllAnimation:function(){for(var d=0;d0},_update:function(d){if(this._rotating){var v=(this.autoRotateDirection==="cw"?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=v*d/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(d=Math.min(d,50),this._updateDistanceOrSize(d),this._updatePan(d),this._updateRotate(d),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(d){var v=this._rotateVelocity;this._phi=v.y*d/20+this._phi,this._theta=v.x*d/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(v,Math.pow(this.damping,d/16))},_updateDistanceOrSize:function(d){this._projection==="perspective"?this._setDistance(this._distance+this._zoomSpeed*d/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*d/20),this._zoomSpeed*=Math.pow(this.damping,d/16)},_setDistance:function(d){this._distance=Math.max(Math.min(d,this.maxDistance),this.minDistance)},_setOrthoSize:function(d){this._orthoSize=Math.max(Math.min(d,this.maxOrthographicSize),this.minOrthographicSize);var v=this.getCamera(),A=this._orthoSize,T=A/this.viewGL.viewport.height*this.viewGL.viewport.width;v.left=-T/2,v.right=T/2,v.top=A/2,v.bottom=-A/2},_updatePan:function(d){var v=this._panVelocity,A=this._distance,T=this.getCamera(),O=T.worldTransform.y,P=T.worldTransform.x;this._center.scaleAndAdd(P,-v.x*A/200).scaleAndAdd(O,-v.y*A/200),this._vectorDamping(v,0)},_updateTransform:function(){var d=this.getCamera(),v=new x.a,A=this._theta+Math.PI/2,T=this._phi+Math.PI/2,O=Math.sin(A);v.x=O*Math.cos(T),v.y=-Math.cos(A),v.z=O*Math.sin(T),d.position.copy(this._center).scaleAndAdd(v,this._distance),d.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var d=this.autoRotateAfterStill,v=this;!isNaN(d)&&d>0&&(this._stillTimeout=setTimeout(function(){v._rotating=!0},d*1e3))},_vectorDamping:function(d,v){var A=d.len();A=A*v,A<1e-4&&(A=0),d.normalize().scale(A)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var d=this.getCamera().worldTransform.z,v=Math.asin(d.y),A=Math.atan2(d.x,d.z);this._theta=v,this._phi=-A,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(d){if(!d.target&&!this._isAnimating()){var v=d.offsetX,A=d.offsetY;this.viewGL&&!this.viewGL.containPoint(v,A)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),d.event.targetTouches?d.event.targetTouches.length===1&&(this._mode="rotate"):d.event.button===g[this.rotateMouseButton]?this._mode="rotate":d.event.button===g[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=d.offsetX,this._mouseY=d.offsetY)}},_mouseMoveHandler:function(d){if(!(d.target&&d.target.__isGLToZRProxy)&&!this._isAnimating()){var v=m(this.panSensitivity),A=m(this.rotateSensitivity);this._mode==="rotate"?(this._rotateVelocity.y=(d.offsetX-this._mouseX)/this.zr.getHeight()*2*A[0],this._rotateVelocity.x=(d.offsetY-this._mouseY)/this.zr.getWidth()*2*A[1]):this._mode==="pan"&&(this._panVelocity.x=(d.offsetX-this._mouseX)/this.zr.getWidth()*v[0]*400,this._panVelocity.y=(-d.offsetY+this._mouseY)/this.zr.getHeight()*v[1]*400),this._mouseX=d.offsetX,this._mouseY=d.offsetY,d.event.preventDefault()}},_mouseWheelHandler:function(d){if(!this._isAnimating()){var v=d.event.wheelDelta||-d.event.detail;this._zoomHandler(d,v)}},_pinchHandler:function(d){this._isAnimating()||(this._zoomHandler(d,d.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(d,v){if(v!==0){var A=d.offsetX,T=d.offsetY;if(!(this.viewGL&&!this.viewGL.containPoint(A,T))){var O;this._projection==="perspective"?O=Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):O=Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(v>0?-1:1)*O*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&this._mode==="rotate"&&this._startCountingStill(),d.event.preventDefault()}}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return this.rotateMouseButton==="right"||this.panMouseButton==="right"},_contextMenuHandler:function(d){this._isRightMouseButtonUsed()&&d.preventDefault()},_addAnimator:function(d){var v=this._animators;return v.push(d),d.done(function(){var A=v.indexOf(d);A>=0&&v.splice(A,1)}),d}});Object.defineProperty(C.prototype,"autoRotate",{get:function(d){return this._autoRotate},set:function(d){this._autoRotate=d,this._rotating=d}}),G.a=C},function(ee,G,_){"use strict";G.a=`@export ecgl.lines3D.vertex uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; attribute vec3 position: POSITION; attribute vec4 a_Color : COLOR; varying vec4 v_Color; void main() { gl_Position = worldViewProjection * vec4(position, 1.0); v_Color = a_Color; } @end @export ecgl.lines3D.fragment uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; varying vec4 v_Color; @import clay.util.srgb void main() { #ifdef SRGB_DECODE gl_FragColor = sRGBToLinear(color * v_Color); #else gl_FragColor = color * v_Color; #endif } @end @export ecgl.lines3D.clipNear vec4 clipNear(vec4 p1, vec4 p2) { float n = (p1.w - near) / (p1.w - p2.w); return vec4(mix(p1.xy, p2.xy, n), -near, near); } @end @export ecgl.lines3D.expandLine #ifdef VERTEX_ANIMATION vec4 prevProj = worldViewProjection * vec4(mix(prevPositionPrev, positionPrev, percent), 1.0); vec4 currProj = worldViewProjection * vec4(mix(prevPosition, position, percent), 1.0); vec4 nextProj = worldViewProjection * vec4(mix(prevPositionNext, positionNext, percent), 1.0); #else vec4 prevProj = worldViewProjection * vec4(positionPrev, 1.0); vec4 currProj = worldViewProjection * vec4(position, 1.0); vec4 nextProj = worldViewProjection * vec4(positionNext, 1.0); #endif if (currProj.w < 0.0) { if (nextProj.w > 0.0) { currProj = clipNear(currProj, nextProj); } else if (prevProj.w > 0.0) { currProj = clipNear(currProj, prevProj); } } vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw; vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw; vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw; vec2 dir; float len = offset; if (position == positionPrev) { dir = normalize(nextScreen - currScreen); } else if (position == positionNext) { dir = normalize(currScreen - prevScreen); } else { vec2 dirA = normalize(currScreen - prevScreen); vec2 dirB = normalize(nextScreen - currScreen); vec2 tanget = normalize(dirA + dirB); float miter = 1.0 / max(dot(tanget, dirA), 0.5); len *= miter; dir = tanget; } dir = vec2(-dir.y, dir.x) * len; currScreen += dir; currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w); @end @export ecgl.meshLines3D.vertex attribute vec3 position: POSITION; attribute vec3 positionPrev; attribute vec3 positionNext; attribute float offset; attribute vec4 a_Color : COLOR; #ifdef VERTEX_ANIMATION attribute vec3 prevPosition; attribute vec3 prevPositionPrev; attribute vec3 prevPositionNext; uniform float percent : 1.0; #endif uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; uniform vec4 viewport : VIEWPORT; uniform float near : NEAR; varying vec4 v_Color; @import ecgl.common.wireframe.vertexHeader @import ecgl.lines3D.clipNear void main() { @import ecgl.lines3D.expandLine gl_Position = currProj; v_Color = a_Color; @import ecgl.common.wireframe.vertexMain } @end @export ecgl.meshLines3D.fragment uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; varying vec4 v_Color; @import ecgl.common.wireframe.fragmentHeader @import clay.util.srgb void main() { #ifdef SRGB_DECODE gl_FragColor = sRGBToLinear(color * v_Color); #else gl_FragColor = color * v_Color; #endif @import ecgl.common.wireframe.fragmentMain } @end`},function(ee,G,_){var F=_(12),w=_(75),x=_(78),y=x.parsePercent,b=_(149),E=F.each,g=["left","right","top","bottom","width","height"],m=[["width","left","right"],["height","top","bottom"]];function C(R,k,W,z,Z){var Q=0,te=0;z==null&&(z=1/0),Z==null&&(Z=1/0);var $=0;k.eachChild(function(ie,ae){var re=ie.position,ce=ie.getBoundingRect(),oe=k.childAt(ae+1),he=oe&&oe.getBoundingRect(),se,pe;if(R==="horizontal"){var me=ce.width+(he?-he.x+ce.x:0);se=Q+me,se>z||ie.newline?(Q=0,se=me,te+=$+W,$=ce.height):$=Math.max($,ce.height)}else{var ge=ce.height+(he?-he.y+ce.y:0);pe=te+ge,pe>Z||ie.newline?(Q+=$+W,te=0,pe=ge,$=ce.width):$=Math.max($,ce.width)}ie.newline||(re[0]=Q,re[1]=te,R==="horizontal"?Q=se+W:te=pe+W)})}var d=C,v=F.curry(C,"vertical"),A=F.curry(C,"horizontal");function T(R,k,W){var z=k.width,Z=k.height,Q=y(R.x,z),te=y(R.y,Z),$=y(R.x2,z),ie=y(R.y2,Z);return(isNaN(Q)||isNaN(parseFloat(R.x)))&&(Q=0),(isNaN($)||isNaN(parseFloat(R.x2)))&&($=z),(isNaN(te)||isNaN(parseFloat(R.y)))&&(te=0),(isNaN(ie)||isNaN(parseFloat(R.y2)))&&(ie=Z),W=b.normalizeCssArray(W||0),{width:Math.max($-Q-W[1]-W[3],0),height:Math.max(ie-te-W[0]-W[2],0)}}function O(R,k,W){W=b.normalizeCssArray(W||0);var z=k.width,Z=k.height,Q=y(R.left,z),te=y(R.top,Z),$=y(R.right,z),ie=y(R.bottom,Z),ae=y(R.width,z),re=y(R.height,Z),ce=W[2]+W[0],oe=W[1]+W[3],he=R.aspect;switch(isNaN(ae)&&(ae=z-$-oe-Q),isNaN(re)&&(re=Z-ie-ce-te),he!=null&&(isNaN(ae)&&isNaN(re)&&(he>z/Z?ae=z*.8:re=Z*.8),isNaN(ae)&&(ae=he*re),isNaN(re)&&(re=ae/he)),isNaN(Q)&&(Q=z-$-ae-oe),isNaN(te)&&(te=Z-ie-re-ce),R.left||R.right){case"center":Q=z/2-ae/2-W[3];break;case"right":Q=z-ae-oe;break}switch(R.top||R.bottom){case"middle":case"center":te=Z/2-re/2-W[0];break;case"bottom":te=Z-re-ce;break}Q=Q||0,te=te||0,isNaN(ae)&&(ae=z-oe-Q-($||0)),isNaN(re)&&(re=Z-ce-te-(ie||0));var se=new w(Q+W[3],te+W[0],ae,re);return se.margin=W,se}function P(R,k,W,z,Z){var Q=!Z||!Z.hv||Z.hv[0],te=!Z||!Z.hv||Z.hv[1],$=Z&&Z.boundingMode||"all";if(!(!Q&&!te)){var ie;if($==="raw")ie=R.type==="group"?new w(0,0,+k.width||0,+k.height||0):R.getBoundingRect();else if(ie=R.getBoundingRect(),R.needLocalTransform()){var ae=R.getLocalTransform();ie=ie.clone(),ie.applyTransform(ae)}k=O(F.defaults({width:ie.width,height:ie.height},k),W,z);var re=R.position,ce=Q?k.x-ie.x:0,oe=te?k.y-ie.y:0;R.attr("position",$==="raw"?[ce,oe]:[re[0]+ce,re[1]+oe])}}function L(R,k){return R[m[k][0]]!=null||R[m[k][1]]!=null&&R[m[k][2]]!=null}function c(R,k,W){!F.isObject(W)&&(W={});var z=W.ignoreSize;!F.isArray(z)&&(z=[z,z]);var Z=te(m[0],0),Q=te(m[1],1);ae(m[0],R,Z),ae(m[1],R,Q);function te(re,ce){var oe={},he=0,se={},pe=0,me=2;if(E(re,function(Ae){se[Ae]=R[Ae]}),E(re,function(Ae){$(k,Ae)&&(oe[Ae]=se[Ae]=k[Ae]),ie(oe,Ae)&&he++,ie(se,Ae)&&pe++}),z[ce])return ie(k,re[1])?se[re[2]]=null:ie(k,re[2])&&(se[re[1]]=null),se;if(pe===me||!he)return se;if(he>=me)return oe;for(var ge=0;ge0){var y=this.outputs[x];y.keepLastFrame?(this._prevOutputTextures[x]&&this._compositor.releaseTexture(this._prevOutputTextures[x]),this._prevOutputTextures[x]=this._outputTextures[x]):this._compositor.releaseTexture(this._outputTextures[x])}}});G.a=w},function(ee,G,_){"use strict";function F(w,x){for(var y=0,b=1/x,E=w;E>0;)y=y+b*(E%x),E=Math.floor(E/x),b=b/x;return y}G.a=F},function(ee,G,_){"use strict";var F=_(0),w=_.n(F);G.a=function(x,y,b){b=b||x.getSource();var E=y||w.a.getCoordinateSystemDimensions(x.get("coordinateSystem"))||["x","y","z"],g=w.a.helper.createDimensions(b,{dimensionsDefine:b.dimensionsDefine||x.get("dimensions"),encodeDefine:b.encodeDefine||x.get("encode"),coordDimensions:E.map(function(C){var d=x.getReferringComponents(C+"Axis3D")[0];return{type:d&&d.get("type")==="category"?"ordinal":"float",name:C,stackable:C==="z"}})});x.get("coordinateSystem")==="cartesian3D"&&g.forEach(function(C){if(E.indexOf(C.coordDim)>=0){var d=x.getReferringComponents(C.coordDim+"Axis3D")[0];d&&d.get("type")==="category"&&(C.ordinalMeta=d.getOrdinalMeta())}});var m=new w.a.List(g,x);return m.initData(b),m}},function(ee,G){function _(F,w,x){return{seriesType:F,performRawSeries:!0,reset:function(y,b,E){var g=y.getData(),m=y.get("symbol")||w,C=y.get("symbolSize");if(g.setVisual({legendSymbol:x||m,symbol:m,symbolSize:C}),b.isSeriesFiltered(y))return;var d=typeof C=="function";function v(A,T){if(typeof C=="function"){var O=y.getRawValue(T),P=y.getDataParams(T);A.setItemVisual(T,"symbolSize",C(O,P))}if(A.hasItemOption){var L=A.getItemModel(T),c=L.getShallow("symbol",!0),f=L.getShallow("symbolSize",!0);c!=null&&A.setItemVisual(T,"symbol",c),f!=null&&A.setItemVisual(T,"symbolSize",f)}}return{dataEach:g.hasItemOption||d?v:null}}}}ee.exports=_},function(ee,G,_){"use strict";var F=_(8),w=_(92),x=_(11),y=_(18),b=_(15),E=_(9),g=_(17),m=_(23),C=_(96),d=_(7),v=_(98),A=_(63),T=_(1),O=_.n(T);d.a.import(v.a),d.a.import(A.a);var P=O.a.mat4,L=O.a.vec3,c=P.create,f={};function D(z){return z.material}function R(){}var k=F.a.extend(function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}},function(){this.canvas||(this.canvas=document.createElement("canvas"));var z=this.canvas;try{var Z={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=z.getContext("webgl",Z)||z.getContext("experimental-webgl",Z),!this.gl)throw new Error;this._glinfo=new w.a(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(Q){throw"Error creating WebGL Context "+Q}this._programMgr=new C.a(this)},{resize:function(z,Z){var Q=this.canvas,te=this.devicePixelRatio;z!=null?(Q.style.width=z+"px",Q.style.height=Z+"px",Q.width=z*te,Q.height=Z*te,this._width=z,this._height=Z):(this._width=Q.width/te,this._height=Q.height/te),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var z=this.viewport;return z.width/z.height},setDevicePixelRatio:function(z){this.devicePixelRatio=z,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(z){return this._glinfo.getExtension(z)},getGLParameter:function(z){return this._glinfo.getParameter(z)},setViewport:function(z,Z,Q,te,$){if(typeof z=="object"){var ie=z;z=ie.x,Z=ie.y,Q=ie.width,te=ie.height,$=ie.devicePixelRatio}$=$||this.devicePixelRatio,this.gl.viewport(z*$,Z*$,Q*$,te*$),this.viewport={x:z,y:Z,width:Q,height:te,devicePixelRatio:$}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var z=this._clearStack.pop();this.clearColor=z.clearColor,this.clearBit=z.clearBit}},bindSceneRendering:function(z){this._sceneRendering=z},render:function(z,Z,Q,te){var $=this.gl,ie=this.clearColor;if(this.clearBit){$.colorMask(!0,!0,!0,!0),$.depthMask(!0);var ae=this.viewport,re=!1,ce=ae.devicePixelRatio;(ae.width!==this._width||ae.height!==this._height||ce&&ce!==this.devicePixelRatio||ae.x||ae.y)&&(re=!0,$.enable($.SCISSOR_TEST),$.scissor(ae.x*ce,ae.y*ce,ae.width*ce,ae.height*ce)),$.clearColor(ie[0],ie[1],ie[2],ie[3]),$.clear(this.clearBit),re&&$.disable($.SCISSOR_TEST)}if(Q||z.update(!1),Z=Z||z.getMainCamera(),!Z){console.error("Can't find camera in the scene.");return}Z.getScene()||Z.update(!0),this._sceneRendering=z,z.viewBoundingBoxLastFrame.min.set(1/0,1/0,1/0),z.viewBoundingBoxLastFrame.max.set(-1/0,-1/0,-1/0);var oe=this.cullRenderList(z.opaqueList,z,Z),he=this.cullRenderList(z.transparentList,z,Z),se=z.material;z.trigger("beforerender",this,z,Z),te?(this.renderPreZ(oe,z,Z),$.depthFunc($.LEQUAL)):$.depthFunc($.LESS);for(var pe=c(),me=L.create(),ge=0;ge0){var re=z[$-1],ce=re.joints?re.joints.length:0,oe=ie.joints.length?ie.joints.length:0;if(oe===ce&&ie.material===re.material&&ie.lightGroup===re.lightGroup){ie.__program=re.__program;continue}}var he=this._programMgr.getProgram(ie,ae,Z);this.validateProgram(he),ie.__program=he}},cullRenderList:function(z,Z,Q){for(var te=[],$=0;$0&&z.min.array[2]<0&&(z.max.array[2]=-1e-20),z.applyProjection(Z);var ce=z.min.array,oe=z.max.array;if(oe[0]<-1||ce[0]>1||oe[1]<-1||ce[1]>1||oe[2]<-1||ce[2]>1)return!0}return!1}}(),disposeScene:function(z){this.disposeNode(z,!0,!0),z.dispose()},disposeNode:function(z,Z,Q){z.getParent()&&z.getParent().remove(z),z.traverse(function(te){te.geometry&&Z&&te.geometry.dispose(this),te.dispose&&te.dispose(this)},this)},disposeGeometry:function(z){z.dispose(this)},disposeTexture:function(z){z.dispose(this)},disposeFrameBuffer:function(z){z.dispose(this)},dispose:function(){},screenToNDC:function(z,Z,Q){Q||(Q=new m.a),Z=this._height-Z;var te=this.viewport,$=Q.array;return $[0]=(z-te.x)/te.width,$[0]=$[0]*2-1,$[1]=(Z-te.y)/te.height,$[1]=$[1]*2-1,Q}});k.opaqueSortCompare=k.prototype.opaqueSortCompare=function(z,Z){return z.renderOrder===Z.renderOrder?z.__program===Z.__program?z.material===Z.material?z.geometry.__uid__-Z.geometry.__uid__:z.material.__uid__-Z.material.__uid__:z.__program&&Z.__program?z.__program.__uid__-Z.__program.__uid__:0:z.renderOrder-Z.renderOrder},k.transparentSortCompare=k.prototype.transparentSortCompare=function(z,Z){return z.renderOrder===Z.renderOrder?z.__depth===Z.__depth?z.__program===Z.__program?z.material===Z.material?z.geometry.__uid__-Z.geometry.__uid__:z.material.__uid__-Z.material.__uid__:z.__program&&Z.__program?z.__program.__uid__-Z.__program.__uid__:0:z.__depth-Z.__depth:z.renderOrder-Z.renderOrder};var W={IDENTITY:c(),WORLD:c(),VIEW:c(),PROJECTION:c(),WORLDVIEW:c(),VIEWPROJECTION:c(),WORLDVIEWPROJECTION:c(),WORLDINVERSE:c(),VIEWINVERSE:c(),PROJECTIONINVERSE:c(),WORLDVIEWINVERSE:c(),VIEWPROJECTIONINVERSE:c(),WORLDVIEWPROJECTIONINVERSE:c(),WORLDTRANSPOSE:c(),VIEWTRANSPOSE:c(),PROJECTIONTRANSPOSE:c(),WORLDVIEWTRANSPOSE:c(),VIEWPROJECTIONTRANSPOSE:c(),WORLDVIEWPROJECTIONTRANSPOSE:c(),WORLDINVERSETRANSPOSE:c(),VIEWINVERSETRANSPOSE:c(),PROJECTIONINVERSETRANSPOSE:c(),WORLDVIEWINVERSETRANSPOSE:c(),VIEWPROJECTIONINVERSETRANSPOSE:c(),WORLDVIEWPROJECTIONINVERSETRANSPOSE:c()};k.COLOR_BUFFER_BIT=x.a.COLOR_BUFFER_BIT,k.DEPTH_BUFFER_BIT=x.a.DEPTH_BUFFER_BIT,k.STENCIL_BUFFER_BIT=x.a.STENCIL_BUFFER_BIT,G.a=k},function(ee,G,_){"use strict";function F(x,y){this.action=x,this.context=y}var w={trigger:function(x){if(this.hasOwnProperty("__handlers__")&&this.__handlers__.hasOwnProperty(x)){var y=this.__handlers__[x],b=y.length,E=-1,g=arguments;switch(g.length){case 1:for(;++EL)){var c=Math.sqrt(L-P),f=T-c,D=T+c;return d||(d=new F.a),f<0?D<0?null:(y.scaleAndAdd(d.array,v,A,D),d):(y.scaleAndAdd(d.array,v,A,f),d)}}}(),intersectBoundingBox:function(g,m){var C=this.direction.array,d=this.origin.array,v=g.min.array,A=g.max.array,T=1/C[0],O=1/C[1],P=1/C[2],L,c,f,D,R,k;if(T>=0?(L=(v[0]-d[0])*T,c=(A[0]-d[0])*T):(c=(v[0]-d[0])*T,L=(A[0]-d[0])*T),O>=0?(f=(v[1]-d[1])*O,D=(A[1]-d[1])*O):(D=(v[1]-d[1])*O,f=(A[1]-d[1])*O),L>D||f>c||((f>L||L!==L)&&(L=f),(D=0?(R=(v[2]-d[2])*P,k=(A[2]-d[2])*P):(k=(v[2]-d[2])*P,R=(A[2]-d[2])*P),L>k||R>c)||((R>L||L!==L)&&(L=R),(k=0?L:c;return m||(m=new F.a),y.scaleAndAdd(m.array,d,C,W),m},intersectTriangle:function(){var g=y.create(),m=y.create(),C=y.create(),d=y.create();return function(v,A,T,O,P,L){var c=this.direction.array,f=this.origin.array;v=v.array,A=A.array,T=T.array,y.sub(g,A,v),y.sub(m,T,v),y.cross(d,m,c);var D=y.dot(g,d);if(O){if(D>-b)return null}else if(D>-b&&D1)return null;y.cross(d,g,C);var k=y.dot(c,d)/D;if(k<0||k>1||R+k>1)return null;y.cross(d,g,m);var W=-y.dot(C,d)/D;return W<0?null:(P||(P=new F.a),L&&F.a.set(L,1-R-k,R,k),y.scaleAndAdd(P.array,f,c,W),P)}}(),applyTransform:function(g){F.a.add(this.direction,this.direction,this.origin),F.a.transformMat4(this.origin,this.origin,g),F.a.transformMat4(this.direction,this.direction,g),F.a.sub(this.direction,this.direction,this.origin),F.a.normalize(this.direction,this.direction)},copy:function(g){F.a.copy(this.origin,g.origin),F.a.copy(this.direction,g.direction)},clone:function(){var g=new E;return g.copy(this),g}},G.a=E},function(ee,G,_){"use strict";var F=_(1),w=_.n(F),x=w.a.quat,y=function(g,m,C,d){g=g||0,m=m||0,C=C||0,d=d===void 0?1:d,this.array=x.fromValues(g,m,C,d),this._dirty=!0};y.prototype={constructor:y,add:function(g){return x.add(this.array,this.array,g.array),this._dirty=!0,this},calculateW:function(){return x.calculateW(this.array,this.array),this._dirty=!0,this},set:function(g,m,C,d){return this.array[0]=g,this.array[1]=m,this.array[2]=C,this.array[3]=d,this._dirty=!0,this},setArray:function(g){return this.array[0]=g[0],this.array[1]=g[1],this.array[2]=g[2],this.array[3]=g[3],this._dirty=!0,this},clone:function(){return new y(this.x,this.y,this.z,this.w)},conjugate:function(){return x.conjugate(this.array,this.array),this._dirty=!0,this},copy:function(g){return x.copy(this.array,g.array),this._dirty=!0,this},dot:function(g){return x.dot(this.array,g.array)},fromMat3:function(g){return x.fromMat3(this.array,g.array),this._dirty=!0,this},fromMat4:function(){var g=w.a.mat3,m=g.create();return function(C){return g.fromMat4(m,C.array),g.transpose(m,m),x.fromMat3(this.array,m),this._dirty=!0,this}}(),identity:function(){return x.identity(this.array),this._dirty=!0,this},invert:function(){return x.invert(this.array,this.array),this._dirty=!0,this},len:function(){return x.len(this.array)},length:function(){return x.length(this.array)},lerp:function(g,m,C){return x.lerp(this.array,g.array,m.array,C),this._dirty=!0,this},mul:function(g){return x.mul(this.array,this.array,g.array),this._dirty=!0,this},mulLeft:function(g){return x.multiply(this.array,g.array,this.array),this._dirty=!0,this},multiply:function(g){return x.multiply(this.array,this.array,g.array),this._dirty=!0,this},multiplyLeft:function(g){return x.multiply(this.array,g.array,this.array),this._dirty=!0,this},normalize:function(){return x.normalize(this.array,this.array),this._dirty=!0,this},rotateX:function(g){return x.rotateX(this.array,this.array,g),this._dirty=!0,this},rotateY:function(g){return x.rotateY(this.array,this.array,g),this._dirty=!0,this},rotateZ:function(g){return x.rotateZ(this.array,this.array,g),this._dirty=!0,this},rotationTo:function(g,m){return x.rotationTo(this.array,g.array,m.array),this._dirty=!0,this},setAxes:function(g,m,C){return x.setAxes(this.array,g.array,m.array,C.array),this._dirty=!0,this},setAxisAngle:function(g,m){return x.setAxisAngle(this.array,g.array,m),this._dirty=!0,this},slerp:function(g,m,C){return x.slerp(this.array,g.array,m.array,C),this._dirty=!0,this},sqrLen:function(){return x.sqrLen(this.array)},squaredLength:function(){return x.squaredLength(this.array)},fromEuler:function(g,m){return y.fromEuler(this,g,m)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var b=Object.defineProperty;if(b){var E=y.prototype;b(E,"x",{get:function(){return this.array[0]},set:function(g){this.array[0]=g,this._dirty=!0}}),b(E,"y",{get:function(){return this.array[1]},set:function(g){this.array[1]=g,this._dirty=!0}}),b(E,"z",{get:function(){return this.array[2]},set:function(g){this.array[2]=g,this._dirty=!0}}),b(E,"w",{get:function(){return this.array[3]},set:function(g){this.array[3]=g,this._dirty=!0}})}y.add=function(g,m,C){return x.add(g.array,m.array,C.array),g._dirty=!0,g},y.set=function(g,m,C,d,v){x.set(g.array,m,C,d,v),g._dirty=!0},y.copy=function(g,m){return x.copy(g.array,m.array),g._dirty=!0,g},y.calculateW=function(g,m){return x.calculateW(g.array,m.array),g._dirty=!0,g},y.conjugate=function(g,m){return x.conjugate(g.array,m.array),g._dirty=!0,g},y.identity=function(g){return x.identity(g.array),g._dirty=!0,g},y.invert=function(g,m){return x.invert(g.array,m.array),g._dirty=!0,g},y.dot=function(g,m){return x.dot(g.array,m.array)},y.len=function(g){return x.length(g.array)},y.lerp=function(g,m,C,d){return x.lerp(g.array,m.array,C.array,d),g._dirty=!0,g},y.slerp=function(g,m,C,d){return x.slerp(g.array,m.array,C.array,d),g._dirty=!0,g},y.mul=function(g,m,C){return x.multiply(g.array,m.array,C.array),g._dirty=!0,g},y.multiply=y.mul,y.rotateX=function(g,m,C){return x.rotateX(g.array,m.array,C),g._dirty=!0,g},y.rotateY=function(g,m,C){return x.rotateY(g.array,m.array,C),g._dirty=!0,g},y.rotateZ=function(g,m,C){return x.rotateZ(g.array,m.array,C),g._dirty=!0,g},y.setAxisAngle=function(g,m,C){return x.setAxisAngle(g.array,m.array,C),g._dirty=!0,g},y.normalize=function(g,m){return x.normalize(g.array,m.array),g._dirty=!0,g},y.sqrLen=function(g){return x.sqrLen(g.array)},y.squaredLength=y.sqrLen,y.fromMat3=function(g,m){return x.fromMat3(g.array,m.array),g._dirty=!0,g},y.setAxes=function(g,m,C,d){return x.setAxes(g.array,m.array,C.array,d.array),g._dirty=!0,g},y.rotationTo=function(g,m,C){return x.rotationTo(g.array,m.array,C.array),g._dirty=!0,g},y.fromEuler=function(g,m,c){g._dirty=!0,m=m.array;var d=g.array,v=Math.cos(m[0]/2),A=Math.cos(m[1]/2),T=Math.cos(m[2]/2),O=Math.sin(m[0]/2),P=Math.sin(m[1]/2),L=Math.sin(m[2]/2),c=(c||"XYZ").toUpperCase();switch(c){case"XYZ":d[0]=O*A*T+v*P*L,d[1]=v*P*T-O*A*L,d[2]=v*A*L+O*P*T,d[3]=v*A*T-O*P*L;break;case"YXZ":d[0]=O*A*T+v*P*L,d[1]=v*P*T-O*A*L,d[2]=v*A*L-O*P*T,d[3]=v*A*T+O*P*L;break;case"ZXY":d[0]=O*A*T-v*P*L,d[1]=v*P*T+O*A*L,d[2]=v*A*L+O*P*T,d[3]=v*A*T-O*P*L;break;case"ZYX":d[0]=O*A*T-v*P*L,d[1]=v*P*T+O*A*L,d[2]=v*A*L-O*P*T,d[3]=v*A*T+O*P*L;break;case"YZX":d[0]=O*A*T+v*P*L,d[1]=v*P*T+O*A*L,d[2]=v*A*L-O*P*T,d[3]=v*A*T-O*P*L;break;case"XZY":d[0]=O*A*T-v*P*L,d[1]=v*P*T-O*A*L,d[2]=v*A*L+O*P*T,d[3]=v*A*T+O*P*L;break}},G.a=y},function(ee,G,_){"use strict";var F=_(28),w=_(9),x=_(52),y=_(49),b=_(1),E=_.n(b),g=E.a.vec3,m=E.a.vec4,C=F.a.extend(function(){return{projectionMatrix:new w.a,invProjectionMatrix:new w.a,viewMatrix:new w.a,frustum:new x.a}},function(){this.update(!0)},{update:function(d){F.a.prototype.update.call(this,d),w.a.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),w.a.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(d){w.a.copy(this.viewMatrix,d),w.a.invert(this.worldTransform,d),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(d){w.a.copy(this.projectionMatrix,d),w.a.invert(this.invProjectionMatrix,d),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:function(){var d=m.create();return function(v,A){var T=A!==void 0?A:new y.a,O=v.array[0],P=v.array[1];return m.set(d,O,P,-1,1),m.transformMat4(d,d,this.invProjectionMatrix.array),m.transformMat4(d,d,this.worldTransform.array),g.scale(T.origin.array,d,1/d[3]),m.set(d,O,P,1,1),m.transformMat4(d,d,this.invProjectionMatrix.array),m.transformMat4(d,d,this.worldTransform.array),g.scale(d,d,1/d[3]),g.sub(T.direction.array,d,T.origin.array),g.normalize(T.direction.array,T.direction.array),T.direction._dirty=!0,T.origin._dirty=!0,T}}()});G.a=C},function(ee,G,_){"use strict";var F=_(4),w=_(15),x=_(67),y=_(1),b=_.n(y),E=b.a.vec3,g=E.set,m=E.copy,C=E.transformMat4,d=Math.min,v=Math.max,A=function(){this.planes=[];for(var T=0;T<6;T++)this.planes.push(new x.a);this.boundingBox=new w.a,this.vertices=[];for(var T=0;T<8;T++)this.vertices[T]=E.fromValues(0,0,0)};A.prototype={setFromProjection:function(T){var O=this.planes,P=T.array,L=P[0],c=P[1],f=P[2],D=P[3],R=P[4],k=P[5],W=P[6],z=P[7],Z=P[8],Q=P[9],te=P[10],$=P[11],ie=P[12],ae=P[13],re=P[14],ce=P[15];g(O[0].normal.array,D-L,z-R,$-Z),O[0].distance=-(ce-ie),O[0].normalize(),g(O[1].normal.array,D+L,z+R,$+Z),O[1].distance=-(ce+ie),O[1].normalize(),g(O[2].normal.array,D+c,z+k,$+Q),O[2].distance=-(ce+ae),O[2].normalize(),g(O[3].normal.array,D-c,z-k,$-Q),O[3].distance=-(ce-ae),O[3].normalize(),g(O[4].normal.array,D-f,z-W,$-te),O[4].distance=-(ce-re),O[4].normalize(),g(O[5].normal.array,D+f,z+W,$+te),O[5].distance=-(ce+re),O[5].normalize();var oe=this.boundingBox;if(ce===0){var he=k/L,se=-re/(te-1),pe=-re/(te+1),me=-pe/k,ge=-se/k;oe.min.set(-me*he,-me,pe),oe.max.set(me*he,me,se);var Ee=this.vertices;g(Ee[0],-me*he,-me,pe),g(Ee[1],-me*he,me,pe),g(Ee[2],me*he,-me,pe),g(Ee[3],me*he,me,pe),g(Ee[4],-ge*he,-ge,se),g(Ee[5],-ge*he,ge,se),g(Ee[6],ge*he,-ge,se),g(Ee[7],ge*he,ge,se)}else{var Ae=(-1-ie)/L,Fe=(1-ie)/L,Ue=(1-ae)/k,nt=(-1-ae)/k,rt=(-1-re)/te,qe=(1-re)/te;oe.min.set(Math.min(Ae,Fe),Math.min(nt,Ue),Math.min(qe,rt)),oe.max.set(Math.max(Fe,Ae),Math.max(Ue,nt),Math.max(rt,qe));var dt=oe.min.array,yt=oe.max.array,Ee=this.vertices;g(Ee[0],dt[0],dt[1],dt[2]),g(Ee[1],dt[0],yt[1],dt[2]),g(Ee[2],yt[0],dt[1],dt[2]),g(Ee[3],yt[0],yt[1],dt[2]),g(Ee[4],dt[0],dt[1],yt[2]),g(Ee[5],dt[0],yt[1],yt[2]),g(Ee[6],yt[0],dt[1],yt[2]),g(Ee[7],yt[0],yt[1],yt[2])}},getTransformedBoundingBox:function(){var T=E.create();return function(O,P){var L=this.vertices,c=P.array,f=O.min,D=O.max,R=f.array,k=D.array,W=L[0];C(T,W,c),m(R,T),m(k,T);for(var z=1;z<8;z++)W=L[z],C(T,W,c),R[0]=d(T[0],R[0]),R[1]=d(T[1],R[1]),R[2]=d(T[2],R[2]),k[0]=v(T[0],k[0]),k[1]=v(T[1],k[1]),k[2]=v(T[2],k[2]);return f._dirty=!0,D._dirty=!0,O}}()},G.a=A},function(ee,G){var _=function(){this.head=null,this.tail=null,this._len=0},F=_.prototype;F.insert=function(E){var g=new w(E);return this.insertEntry(g),g},F.insertEntry=function(E){this.head?(this.tail.next=E,E.prev=this.tail,E.next=null,this.tail=E):this.head=this.tail=E,this._len++},F.remove=function(E){var g=E.prev,m=E.next;g?g.next=m:this.head=m,m?m.prev=g:this.tail=g,E.next=E.prev=null,this._len--},F.len=function(){return this._len},F.clear=function(){this.head=this.tail=null,this._len=0};var w=function(E){this.value=E,this.next,this.prev},x=function(E){this._list=new _,this._map={},this._maxSize=E||10,this._lastRemovedEntry=null},y=x.prototype;y.put=function(E,g){var m=this._list,C=this._map,d=null;if(C[E]==null){var v=m.len(),A=this._lastRemovedEntry;if(v>=this._maxSize&&v>0){var T=m.head;m.remove(T),delete C[T.key],d=T.value,this._lastRemovedEntry=T}A?A.value=g:A=new w(g),A.key=E,m.insertEntry(A),C[E]=A}return d},y.get=function(E){var g=this._map[E],m=this._list;if(g!=null)return g!==m.tail&&(m.remove(g),m.insertEntry(g)),g.value},y.clear=function(){this._list.clear(),this._map={}};var b=x;ee.exports=b},function(ee,G,_){"use strict";var F=_(5),w=_(25),x=_(102),y=_(55),b=_(56),E=_(29),g=_(104),m=_(105),C={loadTexture:function(d,v,A,T){var O;if(typeof v=="function"?(A=v,T=A,v={}):v=v||{},typeof d=="string"){if(d.match(/.hdr$/)||v.fileType==="hdr")return O=new F.a({width:0,height:0,sRGB:!1}),C._fetchTexture(d,function(P){m.a.parseRGBE(P,O,v.exposure),O.dirty(),A&&A(O)},T),O;d.match(/.dds$/)||v.fileType==="dds"?(O=new F.a({width:0,height:0}),C._fetchTexture(d,function(P){g.a.parse(P,O),O.dirty(),A&&A(O)},T)):(O=new F.a,O.load(d),O.success(A),O.error(T))}else if(typeof d=="object"&&typeof d.px!="undefined"){var O=new w.a;O.load(d),O.success(A),O.error(T)}return O},loadPanorama:function(d,v,A,T,O,P){var L=this;typeof T=="function"?(O=T,P=O,T={}):T=T||{},C.loadTexture(v,T,function(c){c.flipY=T.flipY||!1,L.panoramaToCubeMap(d,c,A,T),c.dispose(d),O&&O(A)},P)},panoramaToCubeMap:function(d,v,A,T){var O=new y.a,P=new b.a({scene:new E.a});return P.material.set("diffuseMap",v),T=T||{},T.encodeRGBM&&P.material.define("fragment","RGBM_ENCODE"),A.sRGB=v.sRGB,O.texture=A,O.render(d,P.scene),O.texture=null,O.dispose(d),A},heightToNormal:function(d,v){var A=document.createElement("canvas"),T=A.width=d.width,O=A.height=d.height,P=A.getContext("2d");P.drawImage(d,0,0,T,O),v=v||!1;for(var L=P.getImageData(0,0,T,O),c=P.createImageData(T,O),f=0;f20)return console.warn("Given image is not a height map"),d}var z,Z,Q,te;f%(T*4)===0?(z=L.data[f],Q=L.data[f+4]):f%(T*4)===(T-1)*4?(z=L.data[f-4],Q=L.data[f]):(z=L.data[f-4],Q=L.data[f+4]),fT*(O-1)*4?(Z=L.data[f-T*4],te=L.data[f]):(Z=L.data[f-T*4],te=L.data[f+T*4]),c.data[f]=z-Q+127,c.data[f+1]=Z-te+127,c.data[f+2]=255,c.data[f+3]=255}return P.putImageData(c,0,0),A},isHeightImage:function(d,v,A){if(!d||!d.width||!d.height)return!1;var T=document.createElement("canvas"),O=T.getContext("2d"),P=v||32;A=A||20,T.width=T.height=P,O.drawImage(d,0,0,P,P);for(var L=O.getImageData(0,0,P,P),c=0;cA)return!1}return!0},_fetchTexture:function(d,v,A){x.a.get({url:d,responseType:"arraybuffer",onload:v,onerror:A})},createChessboard:function(d,v,A,T){d=d||512,v=v||64,A=A||"black",T=T||"white";var O=Math.ceil(d/v),P=document.createElement("canvas");P.width=d,P.height=d;var L=P.getContext("2d");L.fillStyle=T,L.fillRect(0,0,d,d),L.fillStyle=A;for(var c=0;c0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),g.renderPass([this],m)}});G.a=E},function(ee,G,_){"use strict";var F=_(2),w=_(143),x=_(144);F.a.Shader.import(x.a),G.a=F.a.Mesh.extend(function(){var y=new w.a({dynamic:!0}),b=new F.a.Material({shader:F.a.createShader("ecgl.labels"),transparent:!0,depthMask:!1});return{geometry:y,material:b,culling:!1,castShadow:!1,ignorePicking:!0}})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(186),b=_(22),E=_(3),g=_(1),m=_.n(g),C=_(60),d=_(61),v=_(40),A=m.a.vec3;x.a.Shader.import(v.a);function T(O){this.rootNode=new x.a.Node,this._triangulationResults={},this._shadersMap=x.a.COMMON_SHADERS.reduce(function(L,c){return L[c]=x.a.createShader("ecgl."+c),L},{}),this._linesShader=x.a.createShader("ecgl.meshLines3D");var P={};x.a.COMMON_SHADERS.forEach(function(L){P[L]=new x.a.Material({shader:x.a.createShader("ecgl."+L)})}),this._groundMaterials=P,this._groundMesh=new x.a.Mesh({geometry:new x.a.PlaneGeometry({dynamic:!0}),castShadow:!1,renderNormal:!0,$ignorePicking:!0}),this._groundMesh.rotation.rotateX(-Math.PI/2),this._labelsBuilder=new d.a(512,512,O),this._labelsBuilder.getMesh().renderOrder=100,this._labelsBuilder.getMesh().material.depthTest=!1,this.rootNode.add(this._labelsBuilder.getMesh()),this._initMeshes(),this._api=O}T.prototype={constructor:T,extrudeY:!0,update:function(O,P,L,c,f){var D=O.getData();c==null&&(c=0),f==null&&(f=D.count()),this._startIndex=c,this._endIndex=f-1,this._triangulation(O,c,f);var R=this._getShader(O.get("shading"));this._prepareMesh(O,R,L,c,f),this.rootNode.updateWorldTransform(),this._updateRegionMesh(O,L,c,f);var k=O.coordinateSystem;k.type==="geo3D"&&this._updateGroundPlane(O,k,L);var W=this;this._labelsBuilder.updateData(D,c,f),this._labelsBuilder.getLabelPosition=function(z,Z,Q){var te=D.getName(z),$,ie=Q;if(k.type==="geo3D"){var ae=k.getRegion(te);return $=ae.center,k.dataToPoint([$[0],$[1],ie])}else var re=W._triangulationResults[z-W._startIndex],$=W.extrudeY?[(re.max[0]+re.min[0])/2,re.max[1]+ie,(re.max[2]+re.min[2])/2]:[(re.max[0]+re.min[0])/2,(re.max[1]+re.min[1])/2,re.max[2]+ie]},this._data=D,this._labelsBuilder.updateLabels(),this._updateDebugWireframe(O),this._lastHoverDataIndex=0},_initMeshes:function(){this.rootNode.removeAll();var O=this;function P(){var f=new x.a.Mesh({name:"Polygon",material:new x.a.Material({shader:O._shadersMap.lambert}),culling:!1,geometry:new x.a.Geometry({sortTriangles:!0,dynamic:!0}),ignorePicking:!0,renderNormal:!0});return w.a.util.extend(f.geometry,C.a),f}var L=P(),c=new x.a.Mesh({material:new x.a.Material({shader:this._linesShader}),castShadow:!1,ignorePicking:!0,$ignorePicking:!0,geometry:new b.a({useNativeLine:!1})});this.rootNode.add(L),this.rootNode.add(c),L.material.define("both","VERTEX_COLOR"),L.material.define("fragment","DOUBLE_SIDED"),this._polygonMesh=L,this._linesMesh=c,this.rootNode.add(this._groundMesh)},_getShader:function(O){var P=this._shadersMap[O];return P||(console.warn("Unkown shading "+O),P=this._shadersMap.lambert),P.__shading=O,P},_prepareMesh:function(O,P,L,c,f){for(var D=0,R=0,k=0,W=0,z=c;z65535?new Uint32Array(R*3):new Uint16Array(R*3),te.material.shader!==P&&te.material.attachShader(P,!0),x.a.setMaterialFromModel(P.__shading,te.material,O,L),k>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(k),this._linesMesh.geometry.setTriangleCount(W)),this._dataIndexOfVertex=new Uint32Array(D),this._vertexRangeOfDataIndex=new Uint32Array((f-c)*2)},_updateRegionMesh:function(O,P,L,c){for(var f=O.getData(),D=0,R=0,k=!1,me=this._polygonMesh,W=this._linesMesh,z=L;z0;pe&&(se*=P.getDevicePixelRatio(),this._updateLinesGeometry(W.geometry,O,z,ce,se,O.coordinateSystem.transform)),W.invisible=!pe,W.material.set({color:ae})}var me=this._polygonMesh;me.material.transparent=k,me.material.depthMask=!k,me.geometry.updateBoundingBox(),me.material.get("normalMap")&&me.geometry.generateTangents(),me.seriesIndex=O.seriesIndex,me.on("mousemove",this._onmousemove,this),me.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(O){var P=O.getModel("debug.wireframe");if(P.get("show")){var L=x.a.parseColor(P.get("lineStyle.color")||"rgba(0,0,0,0.5)"),c=E.a.firstNotNull(P.get("lineStyle.width"),1),f=this._polygonMesh;f.geometry.generateBarycentric(),f.material.define("both","WIREFRAME_TRIANGLE"),f.material.set("wireframeLineColor",L),f.material.set("wireframeLineWidth",c)}},_onmousemove:function(O){var P=this._dataIndexOfVertex[O.triangle[0]];P==null&&(P=-1),P!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(P)),this._lastHoverDataIndex=P,this._polygonMesh.dataIndex=P},_onmouseover:function(O){if(O.target){var P=O.target.eventData?this._data.indexOfName(O.target.eventData.name):O.target.dataIndex;P!=null&&(this.highlight(P),this._labelsBuilder.updateLabels([P]))}},_onmouseout:function(O){O.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1)},_updateGroundPlane:function(O,P,L){var c=O.getModel("groundPlane",O);if(this._groundMesh.invisible=!c.get("show",!0),!this._groundMesh.invisible){var f=O.get("shading"),D=this._groundMaterials[f];D||(console.warn("Unkown shading "+f),D=this._groundMaterials.lambert),x.a.setMaterialFromModel(f,D,c,L),D.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=D,this._groundMesh.material.set("color",x.a.parseColor(c.get("color"))),this._groundMesh.scale.set(P.size[0],P.size[2],1)}},_triangulation:function(O,P,L){this._triangulationResults=[];for(var c=[1/0,1/0,1/0],f=[-1/0,-1/0,-1/0],D=O.coordinateSystem,R=P;R1?c:0,dt[Pe][re]=Ue.points[We+2],W.set(f+Pe,dt[Pe]),k?(it[0]=(Ue.points[We]*ce[0]-oe[0])/se,it[1]=(Ue.points[We+2]*ce[re]-oe[re])/se):(it[0]=(Ne?ht:ht+ot)/se,it[1]=(dt[Pe][ae]*ce[ae]-oe[ae])/se),Z.set(f+Pe,it)}A.sub(yt,dt[1],dt[0]),A.sub(je,dt[3],dt[0]),A.cross(at,yt,je),A.normalize(at,at);for(var Pe=0;Pe<4;Pe++)z.set(f+Pe,at),$&&Q.set(f+Pe,R);for(var Pe=0;Pe<6;Pe++)ie[D*3+Pe]=qe[Pe]+f;f+=4,D+=2,ht+=ot}}return P.dirty(),{vertexOffset:f,triangleOffset:D}},_getRegionLinesInfo:function(O,P,L){var c=0,f=0,D=P.getRegionModel(O),R=D.getModel("itemStyle"),k=R.get("borderWidth");if(k>0){var W=P.getRegionPolygonCoords(O);W.forEach(function(z){var Z=z.exterior,Q=z.interiors;c+=L.getPolylineVertexCount(Z),f+=L.getPolylineTriangleCount(Z);for(var te=0;tethis._endIndex)){P-=this._startIndex;for(var c=this._vertexRangeOfDataIndex[P*2];c=2e4},doSortTriangles:function(m,C){var d=this.indices;if(C===0){var v=this.attributes.position,m=m.array;(!this._triangleZList||this._triangleZList.length!==this.triangleCount)&&(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new d.constructor(d.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var A=0,T,O=0;O0,v={},A=0;A2?($=this._updateSymbolSprite(T,Q,z,Z),R.enableTexture("sprite")):R.disableTexture("sprite"),W.position.init(c-L);var ie=[];if(te){R.undefine("VERTEX_SIZE"),R.undefine("VERTEX_COLOR");var ae=D.getVisual("color"),re=D.getVisual("opacity");x.a.parseColor(ae,ie),ie[3]*=re,R.set({color:ie,u_Size:z.maxSize*this._sizeScale})}else R.set({color:[1,1,1,1]}),R.define("VERTEX_SIZE"),R.define("VERTEX_COLOR"),W.size.init(c-L),W.color.init(c-L),this._originalOpacity=new Float32Array(c-L);for(var ce=D.getLayout("points"),oe=W.position.value,he=!1,se=0;se1?(c[0]=P.maxSize,c[1]=P.maxSize/P.aspect):(c[1]=P.maxSize,c[0]=P.maxSize*P.aspect),c[0]=c[0]||1,c[1]=c[1]||1,(this._symbolType!==P.type||!v(this._symbolSize,c)||this._lineWidth!==O.lineWidth)&&(y.a.createSymbolSprite(P.type,c,{fill:"#fff",lineWidth:O.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(c[0]/2,10)},this._spriteImageCanvas),y.a.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),C,this._mesh.material.get("sprite").image),this._symbolType=P.type,this._symbolSize=c,this._lineWidth=O.lineWidth),this._spriteImageCanvas.width/P.maxSize*L},_updateMaterial:function(T,O){var P=T.get("blendMode")==="lighter"?x.a.additiveBlend:null,L=this._mesh.material;L.blend=P,L.set("lineWidth",O.lineWidth/C);var c=x.a.parseColor(O.stroke);L.set("strokeColor",c),L.transparent=!0,L.depthMask=!1,L.depthTest=!this.is2D,L.sortVertices=!this.is2D},_updateLabelBuilder:function(T,D,P){var L=T.getData(),c=this._mesh.geometry,f=c.attributes.position.value,D=this._startDataIndex,R=this._mesh.sizeScale;this._labelsBuilder.updateData(L,D,P),this._labelsBuilder.getLabelPosition=function(k,W,z){var Z=(k-D)*3;return[f[Z],f[Z+1],f[Z+2]]},this._labelsBuilder.getLabelDistance=function(k,W,z){var Z=c.attributes.size.get(k-D)/R;return Z/2+z},this._labelsBuilder.updateLabels()},_updateAnimation:function(T){x.a.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,T)},_updateHandler:function(T,O,P){var L=T.getData(),c=this._mesh,f=this,D=-1,R=T.coordinateSystem&&T.coordinateSystem.type==="cartesian3D",k;R&&(k=T.coordinateSystem.model),c.seriesIndex=T.seriesIndex,c.off("mousemove"),c.off("mouseout"),c.on("mousemove",function(W){var z=W.vertexIndex+f._startDataIndex;z!==D&&(this.highlightOnMouseover&&(this.downplay(L,D),this.highlight(L,z),this._labelsBuilder.updateLabels([z])),R&&P.dispatchAction({type:"grid3DShowAxisPointer",value:[L.get(T.coordDimToDataDim("x")[0],z),L.get(T.coordDimToDataDim("y")[0],z),L.get(T.coordDimToDataDim("z")[0],z)],grid3DIndex:k.componentIndex})),c.dataIndex=z,D=z},this),c.on("mouseout",function(W){var z=W.vertexIndex+f._startDataIndex;this.highlightOnMouseover&&(this.downplay(L,z),this._labelsBuilder.updateLabels()),D=-1,c.dataIndex=-1,R&&P.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:k.componentIndex})},this)},updateLayout:function(T,O,P){var L=T.getData();if(this._mesh){var c=this._mesh.geometry.attributes.position.value,f=L.getLayout("points");if(this.is2D)for(var D=0;Dthis._endDataIndex||Othis._endDataIndex||O.05&&(D=!0),Z!==R&&(k=!0),R=Z,f=Q}return D&&console.warn("Different symbol width / height ratio will be ignored."),k&&console.warn("Different symbol type will be ignored."),{maxSize:W,type:R,aspect:f}}},G.a=A},function(ee,G,_){"use strict";G.a=`@export clay.prez.vertex uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; attribute vec3 position : POSITION; @import clay.chunk.skinning_header void main() { vec3 skinnedPosition = position; #ifdef SKINNING @import clay.chunk.skin_matrix skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz; #endif gl_Position = worldViewProjection * vec4(skinnedPosition, 1.0); } @end @export clay.prez.fragment void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); } @end`},function(ee,G,_){"use strict";var F=_(28),w=_(11),x=0,y=null,b=!0,E,g=function(){this.triangleCount=0,this.vertexCount=0,this.drawCallCount=0};function m(d,v,A){this.availableAttributes=d,this.availableAttributeSymbols=v,this.indicesBuffer=A,this.vao=null}var C=F.a.extend({material:null,geometry:null,mode:w.a.TRIANGLES,_drawCache:null,_renderInfo:null},function(){this._drawCache={},this._renderInfo=new g},{__program:null,lightGroup:0,renderOrder:0,lineWidth:1,culling:!0,cullFace:w.a.BACK,frontFace:w.a.CCW,frustumCulling:!0,receiveShadow:!0,castShadow:!0,ignorePicking:!1,ignorePreZ:!1,ignoreGBuffer:!1,isRenderable:function(){return this.geometry&&this.material&&this.material.shader&&!this.invisible&&this.geometry.vertexCount>0},beforeRender:function(d){},afterRender:function(d,v){},getBoundingBox:function(d,v){return v=F.a.prototype.getBoundingBox.call(this,d,v),this.geometry&&this.geometry.boundingBox&&v.union(this.geometry.boundingBox),v},render:function(d,v,A){var T=d.gl;v=v||this.material;var O=v.shader,P=this.geometry,L=this.mode,c=P.vertexCount,f=P.isUseIndices(),D=d.getGLExtension("OES_element_index_uint"),R=D&&c>65535,k=R?T.UNSIGNED_INT:T.UNSIGNED_SHORT,W=d.getGLExtension("OES_vertex_array_object"),z=!P.dynamic,Z=this._renderInfo;Z.vertexCount=c,Z.triangleCount=0,Z.drawCallCount=0;var Q=!1;if(E=d.__uid__+"-"+P.__uid__+"-"+A.__uid__,(E!==x||W&&z||P._cache.isDirty("any"))&&(Q=!0),x=E,!Q)b?(T.drawElements(L,y.count,k,0),Z.triangleCount=y.count/3):T.drawArrays(L,0,c),Z.drawCallCount=1;else{var te=this._drawCache[E];if(!te){var $=P.getBufferChunks(d);if(!$)return;te=[];for(var ie=0;ie<$.length;ie++){for(var ae=$[ie],re=ae.attributeBuffers,ce=ae.indicesBuffer,oe=[],he=[],se=0;se>1,w|=w>>2,w|=w>>4,w|=w>>8,w|=w>>16,w++,w},F.nearestPowerOfTwo=function(w){return Math.pow(2,Math.round(Math.log(w)/Math.LN2))},G.a=F},function(ee,G,_){"use strict";var F=_(4),w=_(1),x=_.n(w),y=x.a.vec3,b=x.a.mat4,E=x.a.vec4,g=function(m,C){this.normal=m||new F.a(0,1,0),this.distance=C||0};g.prototype={constructor:g,distanceToPoint:function(m){return y.dot(m.array,this.normal.array)-this.distance},projectPoint:function(m,C){C||(C=new F.a);var d=this.distanceToPoint(m);return y.scaleAndAdd(C.array,m.array,this.normal.array,-d),C._dirty=!0,C},normalize:function(){var m=1/y.len(this.normal.array);y.scale(this.normal.array,m),this.distance*=m},intersectFrustum:function(m){for(var C=m.vertices,d=this.normal.array,v=y.dot(C[0].array,d)>this.distance,A=1;A<8;A++)if(y.dot(C[A].array,d)>this.distance!=v)return!0},intersectLine:function(){var m=y.create();return function(C,d,v){var A=this.distanceToPoint(C),T=this.distanceToPoint(d);if(A>0&&T>0||A<0&&T<0)return null;var O=this.normal.array,P=this.distance,L=C.array;y.sub(m,d.array,C.array),y.normalize(m,m);var c=y.dot(O,m);if(c===0)return null;v||(v=new F.a);var f=(y.dot(O,L)-P)/c;return y.scaleAndAdd(v.array,L,m,-f),v._dirty=!0,v}}(),applyTransform:function(){var m=b.create(),C=E.create(),d=E.create();return d[3]=1,function(v){v=v.array,y.scale(d,this.normal.array,this.distance),E.transformMat4(d,d,v),this.distance=y.dot(d,this.normal.array),b.invert(m,v),b.transpose(m,m),C[3]=0,y.copy(C,this.normal.array),E.transformMat4(C,C,m),y.copy(this.normal.array,C)}}(),copy:function(m){y.copy(this.normal.array,m.normal.array),this.normal._dirty=!0,this.distance=m.distance},clone:function(){var m=new g;return m.copy(this),m}},G.a=g},function(ee,G,_){"use strict";var F=_(13),w=_(15),x=F.a.extend({dynamic:!1,widthSegments:40,heightSegments:20,phiStart:0,phiLength:Math.PI*2,thetaStart:0,thetaLength:Math.PI,radius:1},function(){this.build()},{build:function(){var y=this.heightSegments,b=this.widthSegments,E=this.attributes.position,g=this.attributes.texcoord0,m=this.attributes.normal,C=(b+1)*(y+1);E.init(C),g.init(C),m.init(C);var d=C>65535?Uint32Array:Uint16Array,v=this.indices=new d(b*y*6),A,T,O,P,L,c,f,z=this.radius,D=this.phiStart,R=this.phiLength,k=this.thetaStart,W=this.thetaLength,z=this.radius,Z=[],Q=[],te=0,$=1/z;for(f=0;f<=y;f++)for(c=0;c<=b;c++)P=c/b,L=f/y,A=-z*Math.cos(D+P*R)*Math.sin(k+L*W),T=z*Math.cos(k+L*W),O=z*Math.sin(D+P*R)*Math.sin(k+L*W),Z[0]=A,Z[1]=T,Z[2]=O,Q[0]=P,Q[1]=L,E.set(te,Z),g.set(te,Q),Z[0]*=$,Z[1]*=$,Z[2]*=$,m.set(te,Z),te++;var ie,ae,re,ce,oe=b+1,he=0;for(f=0;fA&&(d=this._x=0,v+=this._rowHeight+O,this._y=v,this._rowHeight=0),this._x+=g+O,this._rowHeight=Math.max(this._rowHeight,m),v+m+O>T)return null;E.position[0]+=this.offsetX*this.dpr+d,E.position[1]+=this.offsetY*this.dpr+v,this._zr.add(E);var P=[this.offsetX/this.width,this.offsetY/this.height],L=[[d/A+P[0],v/T+P[1]],[(d+g)/A+P[0],(v+m)/T+P[1]]];return L},_fitElement:function(E,g,m){var C=E.getBoundingRect(),d=g/C.width,v=m/C.height;E.position=[-C.x*d,-C.y*v],E.scale=[d,v],E.update()}};function b(E){E=E||{},E.width=E.width||512,E.height=E.height||512,E.devicePixelRatio=E.devicePixelRatio||1,E.gap=E.gap==null?2:E.gap;var g=document.createElement("canvas");g.width=E.width*E.devicePixelRatio,g.height=E.height*E.devicePixelRatio,this._canvas=g,this._texture=new x.a({image:g,flipY:!1});var m=this;this._zr=w.a.zrender.init(g);var C=this._zr.refreshImmediately;this._zr.refreshImmediately=function(){C.call(this),m._texture.dirty(),m.onupdate&&m.onupdate()},this._dpr=E.devicePixelRatio,this._coords={},this.onupdate=E.onupdate,this._gap=E.gap,this._textureAtlasNodes=[new y(this._zr,0,0,E.width,E.height,this._gap,this._dpr)],this._nodeWidth=E.width,this._nodeHeight=E.height,this._currentNodeIdx=0}b.prototype={clear:function(){for(var E=0;E=E){console.error("Too much labels. Some will be ignored.");return}var v=(C+this._nodeWidth)*this._dpr,A=(d+this._nodeHeight)*this._dpr;try{this._zr.resize({width:v,height:A})}catch(O){this._canvas.width=v,this._canvas.height=A}var T=new y(this._zr,C,d,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(T),T},add:function(E,g,m){if(this._coords[E.id])return console.warn("Element already been add"),this._coords[E.id];var C=this._getCurrentNode().add(E,g,m);if(!C){var d=this._expand();if(!d)return;C=d.add(E,g,m)}return this._coords[E.id]=C,C},getCoordsScale:function(){var E=this._dpr;return[this._nodeWidth/this._canvas.width*E,this._nodeHeight/this._canvas.height*E]},getCoords:function(E){return this._coords[E]}},G.a=b},function(ee,G,_){"use strict";G.a=F;function F(w,x,y){var b,E=w.scale;return E.type==="ordinal"&&(typeof y=="function"?(b=E.getTicks()[x],!y(b,E.getLabel(b))):x%(y+1))}},function(ee,G,_){var F=_(76),w=_(77),x=F.applyTransform,y=Math.min,b=Math.max;function E(m,C,d,v){d<0&&(m=m+d,d=-d),v<0&&(C=C+v,v=-v),this.x=m,this.y=C,this.width=d,this.height=v}E.prototype={constructor:E,union:function(m){var C=y(m.x,this.x),d=y(m.y,this.y);this.width=b(m.x+m.width,this.x+this.width)-C,this.height=b(m.y+m.height,this.y+this.height)-d,this.x=C,this.y=d},applyTransform:function(){var m=[],C=[],d=[],v=[];return function(A){if(A){m[0]=d[0]=this.x,m[1]=v[1]=this.y,C[0]=v[0]=this.x+this.width,C[1]=d[1]=this.y+this.height,x(m,m,A),x(C,C,A),x(d,d,A),x(v,v,A),this.x=y(m[0],C[0],d[0],v[0]),this.y=y(m[1],C[1],d[1],v[1]);var T=b(m[0],C[0],d[0],v[0]),O=b(m[1],C[1],d[1],v[1]);this.width=T-this.x,this.height=O-this.y}}}(),calculateTransform:function(m){var C=this,d=m.width/C.width,v=m.height/C.height,A=w.create();return w.translate(A,A,[-C.x,-C.y]),w.scale(A,A,[d,v]),w.translate(A,A,[m.x,m.y]),A},intersect:function(m){if(!m)return!1;m instanceof E||(m=E.create(m));var C=this,d=C.x,v=C.x+C.width,A=C.y,T=C.y+C.height,O=m.x,P=m.x+m.width,L=m.y,c=m.y+m.height;return!(v=d.x&&m<=d.x+d.width&&C>=d.y&&C<=d.y+d.height},clone:function(){return new E(this.x,this.y,this.width,this.height)},copy:function(m){this.x=m.x,this.y=m.y,this.width=m.width,this.height=m.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},E.create=function(m){return new E(m.x,m.y,m.width,m.height)};var g=E;ee.exports=g},function(ee,G){var _=typeof Float32Array=="undefined"?Array:Float32Array;function F(te,$){var ie=new _(2);return te==null&&(te=0),$==null&&($=0),ie[0]=te,ie[1]=$,ie}function w(te,$){return te[0]=$[0],te[1]=$[1],te}function x(te){var $=new _(2);return $[0]=te[0],$[1]=te[1],$}function y(te,$,ie){return te[0]=$,te[1]=ie,te}function b(te,$,ie){return te[0]=$[0]+ie[0],te[1]=$[1]+ie[1],te}function E(te,$,ie,ae){return te[0]=$[0]+ie[0]*ae,te[1]=$[1]+ie[1]*ae,te}function g(te,$,ie){return te[0]=$[0]-ie[0],te[1]=$[1]-ie[1],te}function m(te){return Math.sqrt(d(te))}var C=m;function d(te){return te[0]*te[0]+te[1]*te[1]}var v=d;function A(te,$,ie){return te[0]=$[0]*ie[0],te[1]=$[1]*ie[1],te}function T(te,$,ie){return te[0]=$[0]/ie[0],te[1]=$[1]/ie[1],te}function O(te,$){return te[0]*$[0]+te[1]*$[1]}function P(te,$,ie){return te[0]=$[0]*ie,te[1]=$[1]*ie,te}function L(te,$){var ie=m($);return ie===0?(te[0]=0,te[1]=0):(te[0]=$[0]/ie,te[1]=$[1]/ie),te}function c(te,$){return Math.sqrt((te[0]-$[0])*(te[0]-$[0])+(te[1]-$[1])*(te[1]-$[1]))}var f=c;function D(te,$){return(te[0]-$[0])*(te[0]-$[0])+(te[1]-$[1])*(te[1]-$[1])}var R=D;function k(te,$){return te[0]=-$[0],te[1]=-$[1],te}function W(te,$,ie,ae){return te[0]=$[0]+ae*(ie[0]-$[0]),te[1]=$[1]+ae*(ie[1]-$[1]),te}function z(te,$,ie){var ae=$[0],re=$[1];return te[0]=ie[0]*ae+ie[2]*re+ie[4],te[1]=ie[1]*ae+ie[3]*re+ie[5],te}function Z(te,$,ie){return te[0]=Math.min($[0],ie[0]),te[1]=Math.min($[1],ie[1]),te}function Q(te,$,ie){return te[0]=Math.max($[0],ie[0]),te[1]=Math.max($[1],ie[1]),te}G.create=F,G.copy=w,G.clone=x,G.set=y,G.add=b,G.scaleAndAdd=E,G.sub=g,G.len=m,G.length=C,G.lenSquare=d,G.lengthSquare=v,G.mul=A,G.div=T,G.dot=O,G.scale=P,G.normalize=L,G.distance=c,G.dist=f,G.distanceSquare=D,G.distSquare=R,G.negate=k,G.lerp=W,G.applyTransform=z,G.min=Z,G.max=Q},function(ee,G){var _=typeof Float32Array=="undefined"?Array:Float32Array;function F(){var d=new _(6);return w(d),d}function w(d){return d[0]=1,d[1]=0,d[2]=0,d[3]=1,d[4]=0,d[5]=0,d}function x(d,v){return d[0]=v[0],d[1]=v[1],d[2]=v[2],d[3]=v[3],d[4]=v[4],d[5]=v[5],d}function y(d,v,A){var T=v[0]*A[0]+v[2]*A[1],O=v[1]*A[0]+v[3]*A[1],P=v[0]*A[2]+v[2]*A[3],L=v[1]*A[2]+v[3]*A[3],c=v[0]*A[4]+v[2]*A[5]+v[4],f=v[1]*A[4]+v[3]*A[5]+v[5];return d[0]=T,d[1]=O,d[2]=P,d[3]=L,d[4]=c,d[5]=f,d}function b(d,v,A){return d[0]=v[0],d[1]=v[1],d[2]=v[2],d[3]=v[3],d[4]=v[4]+A[0],d[5]=v[5]+A[1],d}function E(d,v,A){var T=v[0],O=v[2],P=v[4],L=v[1],c=v[3],f=v[5],D=Math.sin(A),R=Math.cos(A);return d[0]=T*R+L*D,d[1]=-T*D+L*R,d[2]=O*R+c*D,d[3]=-O*D+R*c,d[4]=R*P+D*f,d[5]=R*f-D*P,d}function g(d,v,A){var T=A[0],O=A[1];return d[0]=v[0]*T,d[1]=v[1]*O,d[2]=v[2]*T,d[3]=v[3]*O,d[4]=v[4]*T,d[5]=v[5]*O,d}function m(d,v){var A=v[0],T=v[2],O=v[4],P=v[1],L=v[3],c=v[5],f=A*L-P*T;return f?(f=1/f,d[0]=L*f,d[1]=-P*f,d[2]=-T*f,d[3]=A*f,d[4]=(T*c-L*O)*f,d[5]=(P*O-A*c)*f,d):null}function C(d){var v=F();return x(v,d),v}G.create=F,G.identity=w,G.copy=x,G.mul=y,G.translate=b,G.rotate=E,G.scale=g,G.invert=m,G.clone=C},function(ee,G,_){var F=_(12),w=1e-4;function x(W){return W.replace(/^\s+/,"").replace(/\s+$/,"")}function y(W,z,Z,Q){var te=z[1]-z[0],$=Z[1]-Z[0];if(te===0)return $===0?Z[0]:(Z[0]+Z[1])/2;if(Q)if(te>0){if(W<=z[0])return Z[0];if(W>=z[1])return Z[1]}else{if(W>=z[0])return Z[0];if(W<=z[1])return Z[1]}else{if(W===z[0])return Z[0];if(W===z[1])return Z[1]}return(W-z[0])/te*$+Z[0]}function b(W,z){switch(W){case"center":case"middle":W="50%";break;case"left":case"top":W="0%";break;case"right":case"bottom":W="100%";break}return typeof W=="string"?x(W).match(/%$/)?parseFloat(W)/100*z:parseFloat(W):W==null?NaN:+W}function E(W,z,Z){return z==null&&(z=10),z=Math.min(Math.max(0,z),20),W=(+W).toFixed(z),Z?W:+W}function g(W){return W.sort(function(z,Z){return z-Z}),W}function m(W){if(W=+W,isNaN(W))return 0;for(var z=1,Z=0;Math.round(W*z)/z!==W;)z*=10,Z++;return Z}function C(W){var z=W.toString(),Z=z.indexOf("e");if(Z>0){var Q=+z.slice(Z+1);return Q<0?-Q:0}else{var te=z.indexOf(".");return te<0?0:z.length-1-te}}function d(W,z){var Z=Math.log,Q=Math.LN10,te=Math.floor(Z(W[1]-W[0])/Q),$=Math.round(Z(Math.abs(z[1]-z[0]))/Q),ie=Math.min(Math.max(-te+$,0),20);return isFinite(ie)?ie:20}function v(W,z,Z){if(!W[z])return 0;var Q=F.reduce(W,function(me,ge){return me+(isNaN(ge)?0:ge)},0);if(Q===0)return 0;for(var te=Math.pow(10,Z),$=F.map(W,function(me){return(isNaN(me)?0:me)/Q*te*100}),ie=te*100,ae=F.map($,function(me){return Math.floor(me)}),re=F.reduce(ae,function(me,ge){return me+ge},0),ce=F.map($,function(me,ge){return me-ae[ge]});reoe&&(oe=ce[se],he=se);++ae[he],ce[he]=0,++re}return ae[z]/te}var A=9007199254740991;function T(W){var z=Math.PI*2;return(W%z+z)%z}function O(W){return W>-w&&W=-20?+W.toFixed(Z<0?-Z:0):W}function R(W){W.sort(function(re,ce){return ae(re,ce,0)?-1:1});for(var z=-1/0,Z=1,Q=0;Q=0}G.linearMap=y,G.parsePercent=b,G.round=E,G.asc=g,G.getPrecision=m,G.getPrecisionSafe=C,G.getPixelPrecision=d,G.getPercentWithPrecision=v,G.MAX_SAFE_INTEGER=A,G.remRadian=T,G.isRadianAroundZero=O,G.parseDate=L,G.quantity=c,G.nice=D,G.reformIntervals=R,G.isNumeric=k},function(ee,G,_){"use strict";var F=_(5),w=_(11),x=_(21),y=function(){this._pool={},this._allocatedTextures=[]};y.prototype={constructor:y,get:function(d){var v=g(d);this._pool.hasOwnProperty(v)||(this._pool[v]=[]);var A=this._pool[v];if(!A.length){var T=new F.a(d);return this._allocatedTextures.push(T),T}return A.pop()},put:function(d){var v=g(d);this._pool.hasOwnProperty(v)||(this._pool[v]=[]);var A=this._pool[v];A.push(d)},clear:function(d){for(var v=0;vT&&A.push({pivot:Math.floor((O+T)/2),left:T,right:O});var T=d[v].pivot+1,O=d[v].right;O>T&&A.push({pivot:Math.floor((O+T)/2),left:T,right:O})}d=this._parts=A}else for(var v=0;v65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(d){this.triangleCount!==d&&(d===0?this.indices=null:this.indices=this.vertexCount>65535?new Uint32Array(d*3):new Uint16Array(d*3))},_getCubicCurveApproxStep:function(d,v,A,T){var O=g.dist(d,v)+g.dist(A,v)+g.dist(T,A),P=1/(O+1)*this.segmentScale;return P},getCubicCurveVertexCount:function(d,v,A,T){var O=this._getCubicCurveApproxStep(d,v,A,T),P=Math.ceil(1/O);return this.useNativeLine?P*2:P*2+2},getCubicCurveTriangleCount:function(d,v,A,T){var O=this._getCubicCurveApproxStep(d,v,A,T),P=Math.ceil(1/O);return this.useNativeLine?0:P*2},getLineVertexCount:function(){return this.getPolylineVertexCount(m)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(m)},getPolylineVertexCount:function(d){var v;if(typeof d=="number")v=d;else{var A=typeof d[0]!="number";v=A?d.length:d.length/2}return this.useNativeLine?(v-1)*2:(v-1)*2+2},getPolylineTriangleCount:function(d){var v;if(typeof d=="number")v=d;else{var A=typeof d[0]!="number";v=A?d.length:d.length/2}return this.useNativeLine?0:(v-1)*2},addCubicCurve:function(d,v,A,T,O,P){P==null&&(P=1);for(var L=d[0],c=d[1],f=v[0],D=v[1],R=A[0],k=A[1],W=T[0],z=T[1],Z=this._getCubicCurveApproxStep(d,v,A,T),Q=Z*Z,te=Q*Z,$=3*Z,ie=3*Q,ae=6*Q,re=6*te,ce=L-f*2+R,oe=c-D*2+k,he=(f-R)*3-L+W,se=(D-k)*3-c+z,pe=L,me=c,ge=(f-L)*$+ce*ie+he*te,Ee=(D-c)*$+oe*ie+se*te,Ae=ce*ae+he*re,Fe=oe*ae+se*re,Ue=he*re,nt=se*re,rt=0,qe=0,dt=Math.ceil(1/Z),yt=new Float32Array((dt+1)*3),yt=[],je=0,qe=0;qe1&&(pe=ge>0?Math.min(pe,W):Math.max(pe,W),me=Ee>0?Math.min(me,z):Math.max(me,z));this.addPolyline(yt,O,P)},addLine:function(d,v,A,T){this.addPolyline([d,v],A,T)},addPolyline:function(){var d=g.create(),v=g.create(),A=g.create(),T=g.create(),O=[],P=[],L=[];return function(c,f,D,R,k){if(c.length){var W=typeof c[0]!="number";if(k==null&&(k=W?c.length:c.length/2),!(k<2)){R==null&&(R=0),D==null&&(D=1),this._itemVertexOffsets.push(this._vertexOffset);for(var z=W?typeof f[0]!="number":f.length/4===k,Z=this.attributes.position,Q=this.attributes.color,te=this.attributes.offset,$=this.attributes.normal,ie=this.indices,ae=this._vertexOffset,re,ce=0;ce1&&(Z.copy(ae,ae-1),Q.copy(ae,ae-1),ae++);else{var se;if(ce0){g.sub(d,O,L),g.sub(v,P,O),g.normalize(d,d),g.normalize(v,v),g.add(T,d,v),g.normalize(T,T);var pe=D/2*Math.min(1/g.dot(d,T),2);A[0]=-T[1],A[1]=T[0],se=pe}else g.sub(d,P,O),g.normalize(d,d),A[0]=-d[1],A[1]=d[0],se=D/2}else g.sub(d,O,L),g.normalize(d,d),A[0]=-d[1],A[1]=d[0],se=D/2;$.set(ae,A),$.set(ae+1,A),te.set(ae,se),te.set(ae+1,-se),g.copy(L,O),Z.set(ae,O),Z.set(ae+1,O),Q.set(ae,re),Q.set(ae+1,re),ae+=2}if(this.useNativeLine)Q.set(ae,re),Z.set(ae,O),ae++;else if(ce>0){var me=this._faceOffset*3,ie=this.indices;ie[me]=ae-4,ie[me+1]=ae-3,ie[me+2]=ae-2,ie[me+3]=ae-3,ie[me+4]=ae-1,ie[me+5]=ae-2,this._faceOffset+=2}}this._vertexOffset=ae}}}}(),setItemColor:function(d,v){for(var A=this._itemVertexOffsets[d],T=d$&&oe=0&&this._viewsToDispose.splice(c,1),this.views.push(L),L.layer=this;var f=this.zr;L.scene.traverse(function(D){D.__zr=f,D.addAnimatorsToZr&&D.addAnimatorsToZr(f)})}};function d(L){var c=L.__zr;L.__zr=null,c&&L.removeAnimatorsFromZr&&L.removeAnimatorsFromZr(c)}C.prototype.removeView=function(L){if(L.layer===this){var c=this.views.indexOf(L);c>=0&&(this.views.splice(c,1),L.scene.traverse(d,this),L.layer=null,this._viewsToDispose.push(L))}},C.prototype.removeViewsAll=function(){this.views.forEach(function(L){L.scene.traverse(d,this),L.layer=null,this._viewsToDispose.push(L)},this),this.views.length=0},C.prototype.resize=function(L,c){var f=this.renderer;f.resize(L,c)},C.prototype.clear=function(){var L=this.renderer.gl;L.clearColor(0,0,0,0),L.depthMask(!0),L.colorMask(!0,!0,!0,!0),L.clear(L.DEPTH_BUFFER_BIT|L.COLOR_BUFFER_BIT)},C.prototype.clearDepth=function(){var L=this.renderer.gl;L.clear(L.DEPTH_BUFFER_BIT)},C.prototype.clearColor=function(){var L=this.renderer.gl;L.clearColor(0,0,0,0),L.clear(L.COLOR_BUFFER_BIT)},C.prototype.needsRefresh=function(){this.zr.refresh()},C.prototype.refresh=function(){for(var L=0;L20)){L=L.event;var D=this.pickObject(L.offsetX,L.offsetY);D&&(this._dispatchEvent(L.type,L,D),this._dispatchDataEvent(L.type,L,D));var R=this._clickToSetFocusPoint(L);if(R){var k=R.view.setDOFFocusOnPoint(R.distance);k&&this.zr.refresh()}}}},C.prototype._clickToSetFocusPoint=function(L){for(var c=this.renderer,f=c.viewport,D=this.views.length-1;D>=0;D--){var R=this.views[D];if(R.hasDOF()&&R.containPoint(L.offsetX,L.offsetY)){this._picking.scene=R.scene,this._picking.camera=R.camera,c.viewport=R.viewport;var k=this._picking.pick(L.offsetX,L.offsetY,!0);if(k)return k.view=R,k}}c.viewport=f},C.prototype.onglobalout=function(L){var c=this._hovered;c&&this._dispatchEvent("mouseout",L,{target:c.target})},C.prototype.pickObject=function(L,c){for(var f=[],D=this.renderer,R=D.viewport,k=0;k=0&&(Z.dataIndex=this._lastDataIndex,Z.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(Q,"mouseout",c)),z=!0):W!=null&&W!==this._lastEventData&&(this._lastEventData!=null&&(Z.eventData=this._lastEventData,this.zr.handler.dispatchToElement(Q,"mouseout",c)),z=!0),this._lastEventData=W,this._lastDataIndex=R,this._lastSeriesIndex=k),Z.eventData=W,Z.dataIndex=R,Z.seriesIndex=k,(W!=null||parseInt(R,10)>=0)&&(this.zr.handler.dispatchToElement(Q,L,c),z&&this.zr.handler.dispatchToElement(Q,"mouseover",c))},C.prototype._dispatchToView=function(L,c){for(var f=0;f255?255:f}function b(f){return f=Math.round(f),f<0?0:f>360?360:f}function E(f){return f<0?0:f>1?1:f}function g(f){return f.length&&f.charAt(f.length-1)==="%"?y(parseFloat(f)/100*255):y(parseInt(f,10))}function m(f){return f.length&&f.charAt(f.length-1)==="%"?E(parseFloat(f)/100):E(parseFloat(f))}function C(f,D,R){return R<0?R+=1:R>1&&(R-=1),R*6<1?f+(D-f)*R*6:R*2<1?D:R*3<2?f+(D-f)*(2/3-R)*6:f}function d(f,D,R){return f+(D-f)*R}function v(f,D,R,k,W){return f[0]=D,f[1]=R,f[2]=k,f[3]=W,f}function A(f,D){return f[0]=D[0],f[1]=D[1],f[2]=D[2],f[3]=D[3],f}var T=new F.a(20),O=null;function P(f,D){O&&A(O,D),O=T.put(f,O||D.slice())}w.parse=function(f,D){if(f){D=D||[];var R=T.get(f);if(R)return A(D,R);f=f+"";var k=f.replace(/ /g,"").toLowerCase();if(k in x)return A(D,x[k]),P(f,D),D;if(k.charAt(0)==="#"){if(k.length===4){var W=parseInt(k.substr(1),16);if(!(W>=0&&W<=4095)){v(D,0,0,0,1);return}return v(D,(W&3840)>>4|(W&3840)>>8,W&240|(W&240)>>4,W&15|(W&15)<<4,1),P(f,D),D}else if(k.length===7){var W=parseInt(k.substr(1),16);if(!(W>=0&&W<=16777215)){v(D,0,0,0,1);return}return v(D,(W&16711680)>>16,(W&65280)>>8,W&255,1),P(f,D),D}return}var z=k.indexOf("("),Z=k.indexOf(")");if(z!==-1&&Z+1===k.length){var Q=k.substr(0,z),te=k.substr(z+1,Z-(z+1)).split(","),$=1;switch(Q){case"rgba":if(te.length!==4){v(D,0,0,0,1);return}$=m(te.pop());case"rgb":if(te.length!==3){v(D,0,0,0,1);return}return v(D,g(te[0]),g(te[1]),g(te[2]),$),P(f,D),D;case"hsla":if(te.length!==4){v(D,0,0,0,1);return}return te[3]=m(te[3]),L(te,D),P(f,D),D;case"hsl":if(te.length!==3){v(D,0,0,0,1);return}return L(te,D),P(f,D),D;default:return}}v(D,0,0,0,1)}},w.parseToFloat=function(f,D){if(D=w.parse(f,D),!!D)return D[0]/=255,D[1]/=255,D[2]/=255,D};function L(f,D){var R=(parseFloat(f[0])%360+360)%360/360,k=m(f[1]),W=m(f[2]),z=W<=.5?W*(k+1):W+k-W*k,Z=W*2-z;return D=D||[],v(D,y(C(Z,z,R+1/3)*255),y(C(Z,z,R)*255),y(C(Z,z,R-1/3)*255),1),f.length===4&&(D[3]=f[3]),D}function c(f){if(f){var D=f[0]/255,R=f[1]/255,k=f[2]/255,W=Math.min(D,R,k),z=Math.max(D,R,k),Z=z-W,Q=(z+W)/2,te,$;if(Z===0)te=0,$=0;else{Q<.5?$=Z/(z+W):$=Z/(2-z-W);var ie=((z-D)/6+Z/2)/Z,ae=((z-R)/6+Z/2)/Z,re=((z-k)/6+Z/2)/Z;D===z?te=re-ae:R===z?te=1/3+ie-re:k===z&&(te=2/3+ae-ie),te<0&&(te+=1),te>1&&(te-=1)}var ce=[te*360,$,Q];return f[3]!=null&&ce.push(f[3]),ce}}w.lift=function(f,D){var R=w.parse(f);if(R){for(var k=0;k<3;k++)D<0?R[k]=R[k]*(1-D)|0:R[k]=(255-R[k])*D+R[k]|0;return w.stringify(R,R.length===4?"rgba":"rgb")}},w.toHex=function(f){var D=w.parse(f);if(D)return((1<<24)+(D[0]<<16)+(D[1]<<8)+ +D[2]).toString(16).slice(1)},w.fastLerp=function(f,D,R){if(!(!(D&&D.length)||!(f>=0&&f<=1))){R=R||[];var k=f*(D.length-1),W=Math.floor(k),z=Math.ceil(k),Z=D[W],Q=D[z],te=k-W;return R[0]=y(d(Z[0],Q[0],te)),R[1]=y(d(Z[1],Q[1],te)),R[2]=y(d(Z[2],Q[2],te)),R[3]=E(d(Z[3],Q[3],te)),R}},w.fastMapToColor=w.fastLerp,w.lerp=function(f,D,R){if(!(!(D&&D.length)||!(f>=0&&f<=1))){var k=f*(D.length-1),W=Math.floor(k),z=Math.ceil(k),Z=w.parse(D[W]),Q=w.parse(D[z]),te=k-W,$=w.stringify([y(d(Z[0],Q[0],te)),y(d(Z[1],Q[1],te)),y(d(Z[2],Q[2],te)),E(d(Z[3],Q[3],te))],"rgba");return R?{color:$,leftIndex:W,rightIndex:z,value:k}:$}},w.mapToColor=w.lerp,w.modifyHSL=function(f,D,R,k){if(f=w.parse(f),f)return f=c(f),D!=null&&(f[0]=b(D)),R!=null&&(f[1]=m(R)),k!=null&&(f[2]=m(k)),w.stringify(L(f),"rgba")},w.modifyAlpha=function(f,D){if(f=w.parse(f),f&&D!=null)return f[3]=E(D),w.stringify(f,"rgba")},w.stringify=function(f,D){if(!(!f||!f.length)){var R=f[0]+","+f[1]+","+f[2];return(D==="rgba"||D==="hsva"||D==="hsla")&&(R+=","+f[3]),D+"("+R+")"}},G.a=w},function(ee,G,_){"use strict";var F=_(95),w=function(x){this._list=new F.a,this._map={},this._maxSize=x||10};w.prototype.setMaxSize=function(x){this._maxSize=x},w.prototype.put=function(x,y){if(typeof this._map[x]=="undefined"){var b=this._list.length();if(b>=this._maxSize&&b>0){var E=this._list.head;this._list.remove(E),delete this._map[E.key]}var g=this._list.insert(y);g.key=x,this._map[x]=g}},w.prototype.get=function(x){var y=this._map[x];if(typeof y!="undefined")return y!==this._list.tail&&(this._list.remove(y),this._list.insertEntry(y)),y.value},w.prototype.remove=function(x){var y=this._map[x];typeof y!="undefined"&&(delete this._map[x],this._list.remove(y))},w.prototype.clear=function(){this._list.clear(),this._map={}},G.a=w},function(ee,G,_){"use strict";var F=function(){this.head=null,this.tail=null,this._length=0};F.prototype.insert=function(w){var x=new F.Entry(w);return this.insertEntry(x),x},F.prototype.insertAt=function(w,x){if(!(w<0)){for(var y=this.head,b=0;y&&b!=w;)y=y.next,b++;if(y){var E=new F.Entry(x),g=y.prev;g?(g.next=E,E.prev=g):this.head=E,E.next=y,y.prev=E}else this.insert(x)}},F.prototype.insertBeforeEntry=function(w,x){var y=new F.Entry(w),b=x.prev;b?(b.next=y,y.prev=b):this.head=y,y.next=x,x.prev=y,this._length++},F.prototype.insertEntry=function(w){this.head?(this.tail.next=w,w.prev=this.tail,this.tail=w):this.head=this.tail=w,this._length++},F.prototype.remove=function(w){var x=w.prev,y=w.next;x?x.next=y:this.head=y,y?y.prev=x:this.tail=x,w.next=w.prev=null,this._length--},F.prototype.removeAt=function(w){if(!(w<0)){for(var x=this.head,y=0;x&&y!=w;)x=x.next,y++;if(x)return this.remove(x),x.value}},F.prototype.getHead=function(){if(this.head)return this.head.value},F.prototype.getTail=function(){if(this.tail)return this.tail.value},F.prototype.getAt=function(w){if(!(w<0)){for(var x=this.head,y=0;x&&y!=w;)x=x.next,y++;return x.value}},F.prototype.indexOf=function(w){for(var x=this.head,y=0;x;){if(x.value===w)return y;x=x.next,y++}},F.prototype.length=function(){return this._length},F.prototype.isEmpty=function(){return this._length===0},F.prototype.forEach=function(w,x){for(var y=this.head,b=0,E=typeof x!="undefined";y;)E?w.call(x,y.value,b):w(y.value,b),y=y.next,b++},F.prototype.clear=function(){this.tail=this.head=null,this._length=0},F.Entry=function(w){this.value=w,this.next=null,this.prev=null},G.a=F},function(ee,G,_){"use strict";var F=_(97),w=/for\s*?\(int\s*?_idx_\s*\=\s*([\w-]+)\;\s*_idx_\s*<\s*([\w-]+);\s*_idx_\s*\+\+\s*\)\s*\{\{([\s\S]+?)(?=\}\})\}\}/g;function x(m,C,d){function v(O,P,L,c){var f="";isNaN(P)&&(P in C?P=C[P]:P=A[P]),isNaN(L)&&(L in C?L=C[L]:L=A[L]);for(var D=parseInt(P);D0&&v.push("#define "+A.toUpperCase()+"_COUNT "+T)}if(d)for(var O=0;O=0&&oe[re]>1e-4&&(d.transformMat4(pe,ce,ie[he[re]]),d.scaleAndAdd(se,se,pe,oe[re]));me.set(ae,se)}}for(var ae=0;ae=0&&(b(m),m.coordinateSystem==="mapbox"&&(m.coordinateSystem="mapbox3D",g.mapbox3D=g.mapbox))}),E(g.xAxis3D),E(g.yAxis3D),E(g.zAxis3D),E(g.grid3D),y(g.geo3D)}},function(ee,G,_){"use strict";function F(w){var x=new XMLHttpRequest;x.open("get",w.url),x.responseType=w.responseType||"text",w.onprogress&&(x.onprogress=function(y){if(y.lengthComputable){var b=y.loaded/y.total;w.onprogress(b,y.loaded,y.total)}else w.onprogress(null)}),x.onload=function(y){x.status>=400?w.onerror&&w.onerror():w.onload&&w.onload(x.response)},w.onerror&&(x.onerror=w.onerror),x.send(null)}G.a={get:F}},function(ee,G,_){"use strict";G.a=`@export clay.basic.vertex uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; uniform vec2 uvRepeat : [1.0, 1.0]; uniform vec2 uvOffset : [0.0, 0.0]; attribute vec2 texcoord : TEXCOORD_0; attribute vec3 position : POSITION; attribute vec3 barycentric; @import clay.chunk.skinning_header varying vec2 v_Texcoord; varying vec3 v_Barycentric; #ifdef VERTEX_COLOR attribute vec4 a_Color : COLOR; varying vec4 v_Color; #endif void main() { vec3 skinnedPosition = position; #ifdef SKINNING @import clay.chunk.skin_matrix skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz; #endif v_Texcoord = texcoord * uvRepeat + uvOffset; v_Barycentric = barycentric; gl_Position = worldViewProjection * vec4(skinnedPosition, 1.0); #ifdef VERTEX_COLOR v_Color = a_Color; #endif } @end @export clay.basic.fragment varying vec2 v_Texcoord; uniform sampler2D diffuseMap; uniform vec3 color : [1.0, 1.0, 1.0]; uniform vec3 emission : [0.0, 0.0, 0.0]; uniform float alpha : 1.0; #ifdef ALPHA_TEST uniform float alphaCutoff: 0.9; #endif #ifdef VERTEX_COLOR varying vec4 v_Color; #endif uniform float lineWidth : 0.0; uniform vec4 lineColor : [0.0, 0.0, 0.0, 0.6]; varying vec3 v_Barycentric; @import clay.util.edge_factor @import clay.util.rgbm @import clay.util.srgb @import clay.util.ACES void main() { #ifdef RENDER_TEXCOORD gl_FragColor = vec4(v_Texcoord, 1.0, 1.0); return; #endif gl_FragColor = vec4(color, alpha); #ifdef VERTEX_COLOR gl_FragColor *= v_Color; #endif #ifdef DIFFUSEMAP_ENABLED vec4 tex = decodeHDR(texture2D(diffuseMap, v_Texcoord)); #ifdef SRGB_DECODE tex = sRGBToLinear(tex); #endif #if defined(DIFFUSEMAP_ALPHA_ALPHA) gl_FragColor.a = tex.a; #endif gl_FragColor.rgb *= tex.rgb; #endif gl_FragColor.rgb += emission; if( lineWidth > 0.) { gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor(lineWidth)) * lineColor.a); } #ifdef ALPHA_TEST if (gl_FragColor.a < alphaCutoff) { discard; } #endif #ifdef TONEMAPPING gl_FragColor.rgb = ACESToneMapping(gl_FragColor.rgb); #endif #ifdef SRGB_ENCODE gl_FragColor = linearTosRGB(gl_FragColor); #endif gl_FragColor = encodeHDR(gl_FragColor); } @end`},function(ee,G,_){"use strict";var F=_(6),w=_(5),x=_(25),y=542327876,b=1,E=2,g=4,m=8,C=4096,d=131072,v=524288,A=8388608,T=8,O=4194304,P=4096,L=512,c=1024,f=2048,D=4096,R=8192,k=16384,W=32768,z=2097152,Z=1,Q=2,te=4,$=64,ie=512,ae=131072;function re(it){return it.charCodeAt(0)+(it.charCodeAt(1)<<8)+(it.charCodeAt(2)<<16)+(it.charCodeAt(3)<<24)}function ce(it){return String.fromCharCode(it&255,it>>8&255,it>>16&255,it>>24&255)}var oe=31,he=re("DXT1"),se=re("DXT3"),pe=re("DXT5"),me=0,ge=1,Ee=2,Ae=3,Fe=4,Ue=7,nt=20,rt=21,qe=27,dt=28,yt=29,je=30,at={parse:function(it,ht){var ut=new Int32Array(it,0,oe);if(ut[me]!==y||!ut(nt)&te)return null;var Mt=ut(rt),Ce=ut[Fe],ot=ut[Ae],Pe=ut[dt]&L,Ne=ut[Ee]&d,We,Be;switch(Mt){case he:We=8,Be=F.a.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case se:We=16,Be=F.a.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case pe:We=16,Be=F.a.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var Ve=ut[ge]+4,$e=Pe?6:1,lt=1;Ne&&(lt=Math.max(1,ut[Ue]));for(var pt=[],xt=0;xt<$e;xt++){var wt=Ce,Dt=ot;pt[xt]=new w.a({width:wt,height:Dt,format:Be});for(var kt=[],Yt=0;Yt0){var L=Math.pow(2,A[3]-128-8+P);T[O+0]=A[0]*L,T[O+1]=A[1]*L,T[O+2]=A[2]*L}else T[O+0]=0,T[O+1]=0,T[O+2]=0;return T[O+3]=1,T}function g(A,T,O){for(var P="",L=T;L0;)if(A[c][0]=T[O++],A[c][1]=T[O++],A[c][2]=T[O++],A[c][3]=T[O++],A[c][0]===1&&A[c][1]===1&&A[c][2]===1){for(var D=A[c][3]<>>0;D>0;D--)m(A[c-1],A[c]),c++,f--;L+=8}else c++,f--,L=0;return O}function d(A,T,O,P){if(Pb)return C(A,T,O,P);var L=T[O++];if(L!=2)return C(A,T,O-1,P);if(A[0][1]=T[O++],A[0][2]=T[O++],L=T[O++],(A[0][2]<<8>>>0|L)>>>0!==P)return null;for(var L=0;L<4;L++)for(var c=0;c128){f=(f&127)>>>0;for(var D=T[O++];f--;)A[c++][L]=D}else for(;f--;)A[c++][L]=T[O++]}return O}var v={parseRGBE:function(A,T,O){O==null&&(O=0);var P=new Uint8Array(A),L=P.length;if(g(P,0,2)==="#?"){for(var c=2;c=L)){c+=2;for(var f="";c=0||(y.forEach(function(m){g.on(m,this[b(m)],this)},this),this._meshes.push(g))},detachFromMesh:function(g){var m=this._meshes.indexOf(g);m>=0&&this._meshes.splice(m,1),y.forEach(function(C){g.off(C,this[b(C)])},this)},dispose:function(){this._meshes.forEach(function(g){this.detachFromMesh(g)},this)}},G.a=E},function(ee,G,_){"use strict";var F=_(19),w=_(108),x=F.a.extend({cubemap:null,castShadow:!1,_normalDistribution:null,_brdfLookup:null},{type:"AMBIENT_CUBEMAP_LIGHT",prefilter:function(y,b){this._brdfLookup||(this._normalDistribution=w.a.generateNormalDistribution(),this._brdfLookup=w.a.integrateBRDF(y,this._normalDistribution));var E=this.cubemap;if(!E.__prefiltered){var g=w.a.prefilterEnvironmentMap(y,E,{encodeRGBM:!0,width:b,height:b},this._normalDistribution,this._brdfLookup);this.cubemap=g.environmentMap,this.cubemap.__prefiltered=!0,E.dispose(y)}},uniformTemplates:{ambientCubemapLightColor:{type:"3f",value:function(y){var b=y.color,E=y.intensity;return[b[0]*E,b[1]*E,b[2]*E]}},ambientCubemapLightCubemap:{type:"t",value:function(y){return y.cubemap}},ambientCubemapLightBRDFLookup:{type:"t",value:function(y){return y._brdfLookup}}}});G.a=x},function(ee,G,_){"use strict";var F=_(5),w=_(25),x=_(6),y=_(10),b=_(14),E=_(17),g=_(7),m=_(57),C=_(29),d=_(55),v=_(18),A=_(54),T=_(111),O=_(112),P={},L=["px","nx","py","ny","pz","nz"];P.prefilterEnvironmentMap=function(c,f,D,R,k){(!k||!R)&&(R=P.generateNormalDistribution(),k=P.integrateBRDF(c,R)),D=D||{};var W=D.width||64,z=D.height||64,Z=D.type||f.type,Q=new w.a({width:W,height:z,type:Z,flipY:!1,mipmaps:[]});Q.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var te=Math.min(W,z),$=Math.log(te)/Math.log(2)+1,ie=new E.a({shader:new g.a({vertex:g.a.source("clay.skybox.vertex"),fragment:O.a})});ie.set("normalDistribution",R),D.encodeRGBM&&ie.define("fragment","RGBM_ENCODE"),D.decodeRGBM&&ie.define("fragment","RGBM_DECODE");var ae=new C.a,re;if(f instanceof F.a){var ce=new w.a({width:W,height:z,type:Z===x.a.FLOAT?x.a.HALF_FLOAT:Z});A.a.panoramaToCubeMap(c,f,ce,{encodeRGBM:D.decodeRGBM}),f=ce}re=new m.a({scene:ae,material:ie}),re.material.set("environmentMap",f);var oe=new d.a({texture:Q});D.encodeRGBM&&(Z=Q.type=x.a.UNSIGNED_BYTE);for(var he=new F.a({width:W,height:z,type:Z}),se=new y.a({depthBuffer:!1}),pe=v.a[Z===x.a.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],me=0;me<$;me++){Q.mipmaps[me]={pixels:{}},re.material.set("roughness",me/(L.length-1));for(var ge=he.width,Ee=2*Math.atan(ge/(ge-.5))/Math.PI*180,Ae=0;Ae>>16)>>>0;Q=((Q&1431655765)<<1|(Q&2863311530)>>>1)>>>0,Q=((Q&858993459)<<2|(Q&3435973836)>>>2)>>>0,Q=((Q&252645135)<<4|(Q&4042322160)>>>4)>>>0,Q=(((Q&16711935)<<8|(Q&4278255360)>>>8)>>>0)/4294967296;for(var te=0;te 0.0) { float G = G_Smith(roughness, NoV, NoL); float G_Vis = G * VoH / (NoH * NoV); float Fc = pow(1.0 - VoH, 5.0); A += (1.0 - Fc) * G_Vis; B += Fc * G_Vis; } } gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0); } `},function(ee,G,_){"use strict";G.a=`#define SAMPLE_NUMBER 1024 #define PI 3.14159265358979 uniform mat4 viewInverse : VIEWINVERSE; uniform samplerCube environmentMap; uniform sampler2D normalDistribution; uniform float roughness : 0.5; varying vec2 v_Texcoord; varying vec3 v_WorldPosition; const float fSampleNumber = float(SAMPLE_NUMBER); @import clay.util.rgbm vec3 importanceSampleNormal(float i, float roughness, vec3 N) { vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb; vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); vec3 tangentX = normalize(cross(upVector, N)); vec3 tangentY = cross(N, tangentX); return tangentX * H.x + tangentY * H.y + N * H.z; } void main() { vec3 eyePos = viewInverse[3].xyz; vec3 V = normalize(v_WorldPosition - eyePos); vec3 N = V; vec3 R = V; vec3 prefilteredColor = vec3(0.0); float totalWeight = 0.0; for (int i = 0; i < SAMPLE_NUMBER; i++) { vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N); vec3 L = reflect(-V, H); float NoL = clamp(dot(N, L), 0.0, 1.0); if (NoL > 0.0) { prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL; totalWeight += NoL; } } gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0)); } `},function(ee,G,_){"use strict";var F=_(19),w=_(18),x=F.a.extend({castShadow:!1,coefficients:[]},function(){this._coefficientsTmpArr=new w.a.Float32Array(9*3)},{type:"AMBIENT_SH_LIGHT",uniformTemplates:{ambientSHLightColor:{type:"3f",value:function(y){var b=y.color,E=y.intensity;return[b[0]*E,b[1]*E,b[2]*E]}},ambientSHLightCoefficients:{type:"3f",value:function(y){for(var b=y._coefficientsTmpArr,E=0;E=0&&A.splice(P,1)}),A.push(T),this.__zr&&this.__zr.animation.addAnimator(T),T},stopAnimation:function(y){this._animators=this._animators||[];for(var b=this._animators,E=b.length,g=0;g.5?W:k}function d(k,W,z,Z,Q){var te=k.length;if(Q==1)for(var $=0;$Q;if(te)k.length=Q;else for(var $=Z;$=0&&!(ge[Be]<=We);Be--);Be=Math.min(Be,re-2)}else{for(Be=dt;BeWe);Be++);Be=Math.min(Be-1,re-2)}dt=Be,yt=We;var Ve=ge[Be+1]-ge[Be];if(Ve!==0)if(at=(We-ge[Be])/Ve,ae)if(ht=Ee[Be],it=Ee[Be===0?Be:Be-1],ut=Ee[Be>re-2?re-1:Be+1],Mt=Ee[Be>re-3?re-1:Be+2],oe)T(it,ht,ut,Mt,at,at*at,at*at*at,$(Ne,Q),pe);else{var $e;if(he)$e=T(it,ht,ut,Mt,at,at*at,at*at*at,Ce,1),$e=L(Ce);else{if(se)return C(ht,ut,at);$e=O(it,ht,ut,Mt,at,at*at,at*at*at)}ie(Ne,Q,$e)}else if(oe)d(Ee[Be],Ee[Be+1],at,$(Ne,Q),pe);else{var $e;if(he)d(Ee[Be],Ee[Be+1],at,Ce,1),$e=L(Ce);else{if(se)return C(Ee[Be],Ee[Be+1],at);$e=m(Ee[Be],Ee[Be+1],at)}ie(Ne,Q,$e)}},Pe=new F({target:k._target,life:me,loop:k._loop,delay:k._delay,onframe:ot,ondestroy:z});return W&&W!=="spline"&&(Pe.easing=W),Pe}}}var D=function(k,W,z,Z){this._tracks={},this._target=k,this._loop=W||!1,this._getter=z||E,this._setter=Z||g,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};D.prototype={when:function(k,W){var z=this._tracks;for(var Z in W)if(W.hasOwnProperty(Z)){if(!z[Z]){z[Z]=[];var Q=this._getter(this._target,Z);if(Q==null)continue;k!==0&&z[Z].push({time:0,value:P(Q)})}z[Z].push({time:k,value:W[Z]})}return this},during:function(k){return this._onframeList.push(k),this},pause:function(){for(var k=0;k255?255:$}function y($){return $=Math.round($),$<0?0:$>360?360:$}function b($){return $<0?0:$>1?1:$}function E($){return $.length&&$.charAt($.length-1)==="%"?x(parseFloat($)/100*255):x(parseInt($,10))}function g($){return $.length&&$.charAt($.length-1)==="%"?b(parseFloat($)/100):b(parseFloat($))}function m($,ie,ae){return ae<0?ae+=1:ae>1&&(ae-=1),ae*6<1?$+(ie-$)*ae*6:ae*2<1?ie:ae*3<2?$+(ie-$)*(2/3-ae)*6:$}function C($,ie,ae){return $+(ie-$)*ae}function d($,ie,ae,re,ce){return $[0]=ie,$[1]=ae,$[2]=re,$[3]=ce,$}function v($,ie){return $[0]=ie[0],$[1]=ie[1],$[2]=ie[2],$[3]=ie[3],$}var A=new F(20),T=null;function O($,ie){T&&v(T,ie),T=A.put($,T||ie.slice())}function P($,ie){if($){ie=ie||[];var ae=A.get($);if(ae)return v(ie,ae);$=$+"";var re=$.replace(/ /g,"").toLowerCase();if(re in w)return v(ie,w[re]),O($,ie),ie;if(re.charAt(0)==="#"){if(re.length===4){var ce=parseInt(re.substr(1),16);if(!(ce>=0&&ce<=4095)){d(ie,0,0,0,1);return}return d(ie,(ce&3840)>>4|(ce&3840)>>8,ce&240|(ce&240)>>4,ce&15|(ce&15)<<4,1),O($,ie),ie}else if(re.length===7){var ce=parseInt(re.substr(1),16);if(!(ce>=0&&ce<=16777215)){d(ie,0,0,0,1);return}return d(ie,(ce&16711680)>>16,(ce&65280)>>8,ce&255,1),O($,ie),ie}return}var oe=re.indexOf("("),he=re.indexOf(")");if(oe!==-1&&he+1===re.length){var se=re.substr(0,oe),pe=re.substr(oe+1,he-(oe+1)).split(","),me=1;switch(se){case"rgba":if(pe.length!==4){d(ie,0,0,0,1);return}me=g(pe.pop());case"rgb":if(pe.length!==3){d(ie,0,0,0,1);return}return d(ie,E(pe[0]),E(pe[1]),E(pe[2]),me),O($,ie),ie;case"hsla":if(pe.length!==4){d(ie,0,0,0,1);return}return pe[3]=g(pe[3]),L(pe,ie),O($,ie),ie;case"hsl":if(pe.length!==3){d(ie,0,0,0,1);return}return L(pe,ie),O($,ie),ie;default:return}}d(ie,0,0,0,1)}}function L($,ie){var ae=(parseFloat($[0])%360+360)%360/360,re=g($[1]),ce=g($[2]),oe=ce<=.5?ce*(re+1):ce+re-ce*re,he=ce*2-oe;return ie=ie||[],d(ie,x(m(he,oe,ae+1/3)*255),x(m(he,oe,ae)*255),x(m(he,oe,ae-1/3)*255),1),$.length===4&&(ie[3]=$[3]),ie}function c($){if($){var ie=$[0]/255,ae=$[1]/255,re=$[2]/255,ce=Math.min(ie,ae,re),oe=Math.max(ie,ae,re),he=oe-ce,se=(oe+ce)/2,pe,me;if(he===0)pe=0,me=0;else{se<.5?me=he/(oe+ce):me=he/(2-oe-ce);var ge=((oe-ie)/6+he/2)/he,Ee=((oe-ae)/6+he/2)/he,Ae=((oe-re)/6+he/2)/he;ie===oe?pe=Ae-Ee:ae===oe?pe=1/3+ge-Ae:re===oe&&(pe=2/3+Ee-ge),pe<0&&(pe+=1),pe>1&&(pe-=1)}var Fe=[pe*360,me,se];return $[3]!=null&&Fe.push($[3]),Fe}}function f($,ie){var ae=P($);if(ae){for(var re=0;re<3;re++)ie<0?ae[re]=ae[re]*(1-ie)|0:ae[re]=(255-ae[re])*ie+ae[re]|0;return te(ae,ae.length===4?"rgba":"rgb")}}function D($){var ie=P($);if(ie)return((1<<24)+(ie[0]<<16)+(ie[1]<<8)+ +ie[2]).toString(16).slice(1)}function R($,ie,ae){if(!(!(ie&&ie.length)||!($>=0&&$<=1))){ae=ae||[];var re=$*(ie.length-1),ce=Math.floor(re),oe=Math.ceil(re),he=ie[ce],se=ie[oe],pe=re-ce;return ae[0]=x(C(he[0],se[0],pe)),ae[1]=x(C(he[1],se[1],pe)),ae[2]=x(C(he[2],se[2],pe)),ae[3]=b(C(he[3],se[3],pe)),ae}}var k=R;function W($,ie,ae){if(!(!(ie&&ie.length)||!($>=0&&$<=1))){var re=$*(ie.length-1),ce=Math.floor(re),oe=Math.ceil(re),he=P(ie[ce]),se=P(ie[oe]),pe=re-ce,me=te([x(C(he[0],se[0],pe)),x(C(he[1],se[1],pe)),x(C(he[2],se[2],pe)),b(C(he[3],se[3],pe))],"rgba");return ae?{color:me,leftIndex:ce,rightIndex:oe,value:re}:me}}var z=W;function Z($,ie,ae,re){if($=P($),$)return $=c($),ie!=null&&($[0]=y(ie)),ae!=null&&($[1]=g(ae)),re!=null&&($[2]=g(re)),te(L($),"rgba")}function Q($,ie){if($=P($),$&&ie!=null)return $[3]=b(ie),te($,"rgba")}function te($,ie){if(!(!$||!$.length)){var ae=$[0]+","+$[1]+","+$[2];return(ie==="rgba"||ie==="hsva"||ie==="hsla")&&(ae+=","+$[3]),ie+"("+ae+")"}}G.parse=P,G.lift=f,G.toHex=D,G.fastLerp=R,G.fastMapToColor=k,G.lerp=W,G.mapToColor=z,G.modifyHSL=Z,G.modifyAlpha=Q,G.stringify=te},function(ee,G,_){"use strict";G.a=` @export clay.util.rand highp float rand(vec2 uv) { const highp float a = 12.9898, b = 78.233, c = 43758.5453; highp float dt = dot(uv.xy, vec2(a,b)), sn = mod(dt, 3.141592653589793); return fract(sin(sn) * c); } @end @export clay.util.calculate_attenuation uniform float attenuationFactor : 5.0; float lightAttenuation(float dist, float range) { float attenuation = 1.0; attenuation = dist*dist/(range*range+1.0); float att_s = attenuationFactor; attenuation = 1.0/(attenuation*att_s+1.0); att_s = 1.0/(att_s+1.0); attenuation = attenuation - att_s; attenuation /= 1.0 - att_s; return clamp(attenuation, 0.0, 1.0); } @end @export clay.util.edge_factor float edgeFactor(float width) { vec3 d = fwidth(v_Barycentric); vec3 a3 = smoothstep(vec3(0.0), d * width, v_Barycentric); return min(min(a3.x, a3.y), a3.z); } @end @export clay.util.encode_float vec4 encodeFloat(const in float depth) { const vec4 bitShifts = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0); const vec4 bit_mask = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0); vec4 res = fract(depth * bitShifts); res -= res.xxyz * bit_mask; return res; } @end @export clay.util.decode_float float decodeFloat(const in vec4 color) { const vec4 bitShifts = vec4(1.0/(256.0*256.0*256.0), 1.0/(256.0*256.0), 1.0/256.0, 1.0); return dot(color, bitShifts); } @end @export clay.util.float @import clay.util.encode_float @import clay.util.decode_float @end @export clay.util.rgbm_decode vec3 RGBMDecode(vec4 rgbm, float range) { return range * rgbm.rgb * rgbm.a; } @end @export clay.util.rgbm_encode vec4 RGBMEncode(vec3 color, float range) { if (dot(color, color) == 0.0) { return vec4(0.0); } vec4 rgbm; color /= range; rgbm.a = clamp(max(max(color.r, color.g), max(color.b, 1e-6)), 0.0, 1.0); rgbm.a = ceil(rgbm.a * 255.0) / 255.0; rgbm.rgb = color / rgbm.a; return rgbm; } @end @export clay.util.rgbm @import clay.util.rgbm_decode @import clay.util.rgbm_encode vec4 decodeHDR(vec4 color) { #if defined(RGBM_DECODE) || defined(RGBM) return vec4(RGBMDecode(color, 51.5), 1.0); #else return color; #endif } vec4 encodeHDR(vec4 color) { #if defined(RGBM_ENCODE) || defined(RGBM) return RGBMEncode(color.xyz, 51.5); #else return color; #endif } @end @export clay.util.srgb vec4 sRGBToLinear(in vec4 value) { return vec4(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))), value.w); } vec4 linearTosRGB(in vec4 value) { return vec4(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))), value.w); } @end @export clay.chunk.skinning_header #ifdef SKINNING attribute vec3 weight : WEIGHT; attribute vec4 joint : JOINT; uniform mat4 skinMatrix[JOINT_COUNT] : SKIN_MATRIX; mat4 getSkinMatrix(float idx) { return skinMatrix[int(idx)]; } #endif @end @export clay.chunk.skin_matrix mat4 skinMatrixWS = getSkinMatrix(joint.x) * weight.x; if (weight.y > 1e-4) { skinMatrixWS += getSkinMatrix(joint.y) * weight.y; } if (weight.z > 1e-4) { skinMatrixWS += getSkinMatrix(joint.z) * weight.z; } float weightW = 1.0-weight.x-weight.y-weight.z; if (weightW > 1e-4) { skinMatrixWS += getSkinMatrix(joint.w) * weightW; } @end @export clay.util.parallax_correct vec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) { vec3 first = (boxMax - pos) / dir; vec3 second = (boxMin - pos) / dir; vec3 further = max(first, second); float dist = min(further.x, min(further.y, further.z)); vec3 fixedPos = pos + dir * dist; vec3 boxCenter = (boxMax + boxMin) * 0.5; return normalize(fixedPos - boxCenter); } @end @export clay.util.clamp_sample vec4 clampSample(const in sampler2D texture, const in vec2 coord) { #ifdef STEREO float eye = step(0.5, coord.x) * 0.5; vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0)); #else vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0)); #endif return texture2D(texture, coordClamped); } @end @export clay.util.ACES vec3 ACESToneMapping(vec3 color) { const float A = 2.51; const float B = 0.03; const float C = 2.43; const float D = 0.59; const float E = 0.14; return (color * (A * color + B)) / (color * (C * color + D) + E); } @end`},function(ee,G,_){"use strict";G.a=` @export ecgl.common.transformUniforms uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; uniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE; uniform mat4 world : WORLD; @end @export ecgl.common.attributes attribute vec3 position : POSITION; attribute vec2 texcoord : TEXCOORD_0; attribute vec3 normal : NORMAL; @end @export ecgl.common.uv.header uniform vec2 uvRepeat : [1.0, 1.0]; uniform vec2 uvOffset : [0.0, 0.0]; uniform vec2 detailUvRepeat : [1.0, 1.0]; uniform vec2 detailUvOffset : [0.0, 0.0]; varying vec2 v_Texcoord; varying vec2 v_DetailTexcoord; @end @export ecgl.common.uv.main v_Texcoord = texcoord * uvRepeat + uvOffset; v_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset; @end @export ecgl.common.uv.fragmentHeader varying vec2 v_Texcoord; varying vec2 v_DetailTexcoord; @end @export ecgl.common.albedo.main vec4 albedoTexel = vec4(1.0); #ifdef DIFFUSEMAP_ENABLED albedoTexel = texture2D(diffuseMap, v_Texcoord); #ifdef SRGB_DECODE albedoTexel = sRGBToLinear(albedoTexel); #endif #endif #ifdef DETAILMAP_ENABLED vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord); #ifdef SRGB_DECODE detailTexel = sRGBToLinear(detailTexel); #endif albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a); albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a; #endif @end @export ecgl.common.wireframe.vertexHeader #ifdef WIREFRAME_QUAD attribute vec4 barycentric; varying vec4 v_Barycentric; #elif defined(WIREFRAME_TRIANGLE) attribute vec3 barycentric; varying vec3 v_Barycentric; #endif @end @export ecgl.common.wireframe.vertexMain #if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE) v_Barycentric = barycentric; #endif @end @export ecgl.common.wireframe.fragmentHeader uniform float wireframeLineWidth : 1; uniform vec4 wireframeLineColor: [0, 0, 0, 0.5]; #ifdef WIREFRAME_QUAD varying vec4 v_Barycentric; float edgeFactor () { vec4 d = fwidth(v_Barycentric); vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric); return min(min(min(a4.x, a4.y), a4.z), a4.w); } #elif defined(WIREFRAME_TRIANGLE) varying vec3 v_Barycentric; float edgeFactor () { vec3 d = fwidth(v_Barycentric); vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric); return min(min(a3.x, a3.y), a3.z); } #endif @end @export ecgl.common.wireframe.fragmentMain #if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE) if (wireframeLineWidth > 0.) { vec4 lineColor = wireframeLineColor; #ifdef SRGB_DECODE lineColor = sRGBToLinear(lineColor); #endif gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a); } #endif @end @export ecgl.common.bumpMap.header #ifdef BUMPMAP_ENABLED uniform sampler2D bumpMap; uniform float bumpScale : 1.0; vec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal) { vec2 dSTdx = dFdx(v_Texcoord); vec2 dSTdy = dFdy(v_Texcoord); float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x; float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll; float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll; vec3 vSigmaX = dFdx(surfPos); vec3 vSigmaY = dFdy(surfPos); vec3 vN = surfNormal; vec3 R1 = cross(vSigmaY, vN); vec3 R2 = cross(vN, vSigmaX); float fDet = dot(vSigmaX, R1); vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2); return normalize(abs(fDet) * baseNormal - vGrad); } #endif @end @export ecgl.common.normalMap.vertexHeader #ifdef NORMALMAP_ENABLED attribute vec4 tangent : TANGENT; varying vec3 v_Tangent; varying vec3 v_Bitangent; #endif @end @export ecgl.common.normalMap.vertexMain #ifdef NORMALMAP_ENABLED if (dot(tangent, tangent) > 0.0) { v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz); v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w); } #endif @end @export ecgl.common.normalMap.fragmentHeader #ifdef NORMALMAP_ENABLED uniform sampler2D normalMap; varying vec3 v_Tangent; varying vec3 v_Bitangent; #endif @end @export ecgl.common.normalMap.fragmentMain #ifdef NORMALMAP_ENABLED if (dot(v_Tangent, v_Tangent) > 0.0) { vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz; if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0; mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal); N = normalize(tbn * N); } } #endif @end @export ecgl.common.vertexAnimation.header #ifdef VERTEX_ANIMATION attribute vec3 prevPosition; attribute vec3 prevNormal; uniform float percent; #endif @end @export ecgl.common.vertexAnimation.main #ifdef VERTEX_ANIMATION vec3 pos = mix(prevPosition, position, percent); vec3 norm = mix(prevNormal, normal, percent); #else vec3 pos = position; vec3 norm = normal; #endif @end @export ecgl.common.ssaoMap.header #ifdef SSAOMAP_ENABLED uniform sampler2D ssaoMap; uniform vec4 viewport : VIEWPORT; #endif @end @export ecgl.common.ssaoMap.main float ao = 1.0; #ifdef SSAOMAP_ENABLED ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r; #endif @end @export ecgl.common.diffuseLayer.header #if (LAYER_DIFFUSEMAP_COUNT > 0) uniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT]; uniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT]; #endif @end @export ecgl.common.emissiveLayer.header #if (LAYER_EMISSIVEMAP_COUNT > 0) uniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT]; uniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT]; #endif @end @export ecgl.common.layers.header @import ecgl.common.diffuseLayer.header @import ecgl.common.emissiveLayer.header @end @export ecgl.common.diffuseLayer.main #if (LAYER_DIFFUSEMAP_COUNT > 0) for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{ float intensity = layerDiffuseIntensity[_idx_]; vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord); #ifdef SRGB_DECODE texel2 = sRGBToLinear(texel2); #endif albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a); albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a; }} #endif @end @export ecgl.common.emissiveLayer.main #if (LAYER_EMISSIVEMAP_COUNT > 0) for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++) {{ vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_]; #ifdef SRGB_DECODE texel2 = sRGBToLinear(texel2); #endif float intensity = layerEmissionIntensity[_idx_]; gl_FragColor.rgb += texel2.rgb * texel2.a * intensity; }} #endif @end `},function(ee,G,_){"use strict";G.a=`@export ecgl.color.vertex uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; @import ecgl.common.uv.header attribute vec2 texcoord : TEXCOORD_0; attribute vec3 position: POSITION; @import ecgl.common.wireframe.vertexHeader #ifdef VERTEX_COLOR attribute vec4 a_Color : COLOR; varying vec4 v_Color; #endif #ifdef VERTEX_ANIMATION attribute vec3 prevPosition; uniform float percent : 1.0; #endif void main() { #ifdef VERTEX_ANIMATION vec3 pos = mix(prevPosition, position, percent); #else vec3 pos = position; #endif gl_Position = worldViewProjection * vec4(pos, 1.0); @import ecgl.common.uv.main #ifdef VERTEX_COLOR v_Color = a_Color; #endif @import ecgl.common.wireframe.vertexMain } @end @export ecgl.color.fragment #define LAYER_DIFFUSEMAP_COUNT 0 #define LAYER_EMISSIVEMAP_COUNT 0 uniform sampler2D diffuseMap; uniform sampler2D detailMap; uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; #ifdef VERTEX_COLOR varying vec4 v_Color; #endif @import ecgl.common.layers.header @import ecgl.common.uv.fragmentHeader @import ecgl.common.wireframe.fragmentHeader @import clay.util.srgb void main() { #ifdef SRGB_DECODE gl_FragColor = sRGBToLinear(color); #else gl_FragColor = color; #endif #ifdef VERTEX_COLOR gl_FragColor *= v_Color; #endif @import ecgl.common.albedo.main @import ecgl.common.diffuseLayer.main gl_FragColor *= albedoTexel; @import ecgl.common.emissiveLayer.main @import ecgl.common.wireframe.fragmentMain } @end`},function(ee,G,_){"use strict";G.a=`/** * http: */ @export ecgl.lambert.vertex @import ecgl.common.transformUniforms @import ecgl.common.uv.header @import ecgl.common.attributes @import ecgl.common.wireframe.vertexHeader #ifdef VERTEX_COLOR attribute vec4 a_Color : COLOR; varying vec4 v_Color; #endif @import ecgl.common.vertexAnimation.header varying vec3 v_Normal; varying vec3 v_WorldPosition; void main() { @import ecgl.common.uv.main @import ecgl.common.vertexAnimation.main gl_Position = worldViewProjection * vec4(pos, 1.0); v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz); v_WorldPosition = (world * vec4(pos, 1.0)).xyz; #ifdef VERTEX_COLOR v_Color = a_Color; #endif @import ecgl.common.wireframe.vertexMain } @end @export ecgl.lambert.fragment #define LAYER_DIFFUSEMAP_COUNT 0 #define LAYER_EMISSIVEMAP_COUNT 0 #define NORMAL_UP_AXIS 1 #define NORMAL_FRONT_AXIS 2 @import ecgl.common.uv.fragmentHeader varying vec3 v_Normal; varying vec3 v_WorldPosition; uniform sampler2D diffuseMap; uniform sampler2D detailMap; @import ecgl.common.layers.header uniform float emissionIntensity: 1.0; uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; uniform mat4 viewInverse : VIEWINVERSE; #ifdef AMBIENT_LIGHT_COUNT @import clay.header.ambient_light #endif #ifdef AMBIENT_SH_LIGHT_COUNT @import clay.header.ambient_sh_light #endif #ifdef DIRECTIONAL_LIGHT_COUNT @import clay.header.directional_light #endif #ifdef VERTEX_COLOR varying vec4 v_Color; #endif @import ecgl.common.ssaoMap.header @import ecgl.common.bumpMap.header @import clay.util.srgb @import ecgl.common.wireframe.fragmentHeader @import clay.plugin.compute_shadow_map void main() { #ifdef SRGB_DECODE gl_FragColor = sRGBToLinear(color); #else gl_FragColor = color; #endif #ifdef VERTEX_COLOR #ifdef SRGB_DECODE gl_FragColor *= sRGBToLinear(v_Color); #else gl_FragColor *= v_Color; #endif #endif @import ecgl.common.albedo.main @import ecgl.common.diffuseLayer.main gl_FragColor *= albedoTexel; vec3 N = v_Normal; #ifdef DOUBLE_SIDED vec3 eyePos = viewInverse[3].xyz; vec3 V = normalize(eyePos - v_WorldPosition); if (dot(N, V) < 0.0) { N = -N; } #endif float ambientFactor = 1.0; #ifdef BUMPMAP_ENABLED N = bumpNormal(v_WorldPosition, v_Normal, N); ambientFactor = dot(v_Normal, N); #endif vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]); vec3 diffuseColor = vec3(0.0, 0.0, 0.0); @import ecgl.common.ssaoMap.main #ifdef AMBIENT_LIGHT_COUNT for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++) { diffuseColor += ambientLightColor[i] * ambientFactor * ao; } #endif #ifdef AMBIENT_SH_LIGHT_COUNT for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++) {{ diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao; }} #endif #ifdef DIRECTIONAL_LIGHT_COUNT #if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT]; if(shadowEnabled) { computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir); } #endif for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++) { vec3 lightDirection = -directionalLightDirection[i]; vec3 lightColor = directionalLightColor[i]; float shadowContrib = 1.0; #if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) if (shadowEnabled) { shadowContrib = shadowContribsDir[i]; } #endif float ndl = dot(N, normalize(lightDirection)) * shadowContrib; diffuseColor += lightColor * clamp(ndl, 0.0, 1.0); } #endif gl_FragColor.rgb *= diffuseColor; @import ecgl.common.emissiveLayer.main @import ecgl.common.wireframe.fragmentMain } @end`},function(ee,G,_){"use strict";G.a=`@export ecgl.realistic.vertex @import ecgl.common.transformUniforms @import ecgl.common.uv.header @import ecgl.common.attributes @import ecgl.common.wireframe.vertexHeader #ifdef VERTEX_COLOR attribute vec4 a_Color : COLOR; varying vec4 v_Color; #endif #ifdef NORMALMAP_ENABLED attribute vec4 tangent : TANGENT; varying vec3 v_Tangent; varying vec3 v_Bitangent; #endif @import ecgl.common.vertexAnimation.header varying vec3 v_Normal; varying vec3 v_WorldPosition; void main() { @import ecgl.common.uv.main @import ecgl.common.vertexAnimation.main gl_Position = worldViewProjection * vec4(pos, 1.0); v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz); v_WorldPosition = (world * vec4(pos, 1.0)).xyz; #ifdef VERTEX_COLOR v_Color = a_Color; #endif #ifdef NORMALMAP_ENABLED v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz); v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w); #endif @import ecgl.common.wireframe.vertexMain } @end @export ecgl.realistic.fragment #define LAYER_DIFFUSEMAP_COUNT 0 #define LAYER_EMISSIVEMAP_COUNT 0 #define PI 3.14159265358979 #define ROUGHNESS_CHANEL 0 #define METALNESS_CHANEL 1 #define NORMAL_UP_AXIS 1 #define NORMAL_FRONT_AXIS 2 #ifdef VERTEX_COLOR varying vec4 v_Color; #endif @import ecgl.common.uv.fragmentHeader varying vec3 v_Normal; varying vec3 v_WorldPosition; uniform sampler2D diffuseMap; uniform sampler2D detailMap; uniform sampler2D metalnessMap; uniform sampler2D roughnessMap; @import ecgl.common.layers.header uniform float emissionIntensity: 1.0; uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; uniform float metalness : 0.0; uniform float roughness : 0.5; uniform mat4 viewInverse : VIEWINVERSE; #ifdef AMBIENT_LIGHT_COUNT @import clay.header.ambient_light #endif #ifdef AMBIENT_SH_LIGHT_COUNT @import clay.header.ambient_sh_light #endif #ifdef AMBIENT_CUBEMAP_LIGHT_COUNT @import clay.header.ambient_cubemap_light #endif #ifdef DIRECTIONAL_LIGHT_COUNT @import clay.header.directional_light #endif @import ecgl.common.normalMap.fragmentHeader @import ecgl.common.ssaoMap.header @import ecgl.common.bumpMap.header @import clay.util.srgb @import clay.util.rgbm @import ecgl.common.wireframe.fragmentHeader @import clay.plugin.compute_shadow_map vec3 F_Schlick(float ndv, vec3 spec) { return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0); } float D_Phong(float g, float ndh) { float a = pow(8192.0, g); return (a + 2.0) / 8.0 * pow(ndh, a); } void main() { vec4 albedoColor = color; vec3 eyePos = viewInverse[3].xyz; vec3 V = normalize(eyePos - v_WorldPosition); #ifdef VERTEX_COLOR #ifdef SRGB_DECODE albedoColor *= sRGBToLinear(v_Color); #else albedoColor *= v_Color; #endif #endif @import ecgl.common.albedo.main @import ecgl.common.diffuseLayer.main albedoColor *= albedoTexel; float m = metalness; #ifdef METALNESSMAP_ENABLED float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL]; m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0); #endif vec3 baseColor = albedoColor.rgb; albedoColor.rgb = baseColor * (1.0 - m); vec3 specFactor = mix(vec3(0.04), baseColor, m); float g = 1.0 - roughness; #ifdef ROUGHNESSMAP_ENABLED float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL]; g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0); #endif vec3 N = v_Normal; #ifdef DOUBLE_SIDED if (dot(N, V) < 0.0) { N = -N; } #endif float ambientFactor = 1.0; #ifdef BUMPMAP_ENABLED N = bumpNormal(v_WorldPosition, v_Normal, N); ambientFactor = dot(v_Normal, N); #endif @import ecgl.common.normalMap.fragmentMain vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]); vec3 diffuseTerm = vec3(0.0); vec3 specularTerm = vec3(0.0); float ndv = clamp(dot(N, V), 0.0, 1.0); vec3 fresnelTerm = F_Schlick(ndv, specFactor); @import ecgl.common.ssaoMap.main #ifdef AMBIENT_LIGHT_COUNT for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++) {{ diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao; }} #endif #ifdef AMBIENT_SH_LIGHT_COUNT for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++) {{ diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao; }} #endif #ifdef DIRECTIONAL_LIGHT_COUNT #if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT]; if(shadowEnabled) { computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir); } #endif for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{ vec3 L = -directionalLightDirection[_idx_]; vec3 lc = directionalLightColor[_idx_]; vec3 H = normalize(L + V); float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0); float ndh = clamp(dot(N, H), 0.0, 1.0); float shadowContrib = 1.0; #if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) if (shadowEnabled) { shadowContrib = shadowContribsDir[_idx_]; } #endif vec3 li = lc * ndl * shadowContrib; diffuseTerm += li; specularTerm += li * fresnelTerm * D_Phong(g, ndh); }} #endif #ifdef AMBIENT_CUBEMAP_LIGHT_COUNT vec3 L = reflect(-V, N); L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]); float rough2 = clamp(1.0 - g, 0.0, 1.0); float bias2 = rough2 * 5.0; vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy; vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y; vec3 envTexel2; for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++) {{ envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 51.5); specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao; }} #endif gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm; gl_FragColor.a = albedoColor.a; #ifdef SRGB_ENCODE gl_FragColor = linearTosRGB(gl_FragColor); #endif @import ecgl.common.emissiveLayer.main @import ecgl.common.wireframe.fragmentMain } @end`},function(ee,G,_){"use strict";G.a=`@export ecgl.hatching.vertex @import ecgl.realistic.vertex @end @export ecgl.hatching.fragment #define NORMAL_UP_AXIS 1 #define NORMAL_FRONT_AXIS 2 @import ecgl.common.uv.fragmentHeader varying vec3 v_Normal; varying vec3 v_WorldPosition; uniform vec4 color : [0.0, 0.0, 0.0, 1.0]; uniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0]; uniform mat4 viewInverse : VIEWINVERSE; #ifdef AMBIENT_LIGHT_COUNT @import clay.header.ambient_light #endif #ifdef AMBIENT_SH_LIGHT_COUNT @import clay.header.ambient_sh_light #endif #ifdef DIRECTIONAL_LIGHT_COUNT @import clay.header.directional_light #endif #ifdef VERTEX_COLOR varying vec4 v_Color; #endif @import ecgl.common.ssaoMap.header @import ecgl.common.bumpMap.header @import clay.util.srgb @import ecgl.common.wireframe.fragmentHeader @import clay.plugin.compute_shadow_map uniform sampler2D hatch1; uniform sampler2D hatch2; uniform sampler2D hatch3; uniform sampler2D hatch4; uniform sampler2D hatch5; uniform sampler2D hatch6; float shade(in float tone) { vec4 c = vec4(1. ,1., 1., 1.); float step = 1. / 6.; vec2 uv = v_DetailTexcoord; if (tone <= step / 2.0) { c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone); } else if (tone <= step) { c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone); } if(tone > step && tone <= 2. * step){ c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step)); } if(tone > 2. * step && tone <= 3. * step){ c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step)); } if(tone > 3. * step && tone <= 4. * step){ c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step)); } if(tone > 4. * step && tone <= 5. * step){ c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step)); } if(tone > 5. * step){ c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step)); } return c.r; } const vec3 w = vec3(0.2125, 0.7154, 0.0721); void main() { #ifdef SRGB_DECODE vec4 inkColor = sRGBToLinear(color); #else vec4 inkColor = color; #endif #ifdef VERTEX_COLOR #ifdef SRGB_DECODE inkColor *= sRGBToLinear(v_Color); #else inkColor *= v_Color; #endif #endif vec3 N = v_Normal; #ifdef DOUBLE_SIDED vec3 eyePos = viewInverse[3].xyz; vec3 V = normalize(eyePos - v_WorldPosition); if (dot(N, V) < 0.0) { N = -N; } #endif float tone = 0.0; float ambientFactor = 1.0; #ifdef BUMPMAP_ENABLED N = bumpNormal(v_WorldPosition, v_Normal, N); ambientFactor = dot(v_Normal, N); #endif vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]); @import ecgl.common.ssaoMap.main #ifdef AMBIENT_LIGHT_COUNT for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++) { tone += dot(ambientLightColor[i], w) * ambientFactor * ao; } #endif #ifdef AMBIENT_SH_LIGHT_COUNT for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++) {{ tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao; }} #endif #ifdef DIRECTIONAL_LIGHT_COUNT #if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT]; if(shadowEnabled) { computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir); } #endif for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++) { vec3 lightDirection = -directionalLightDirection[i]; float lightTone = dot(directionalLightColor[i], w); float shadowContrib = 1.0; #if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) if (shadowEnabled) { shadowContrib = shadowContribsDir[i]; } #endif float ndl = dot(N, normalize(lightDirection)) * shadowContrib; tone += lightTone * clamp(ndl, 0.0, 1.0); } #endif gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0))); } @end `},function(ee,G,_){"use strict";G.a=`@export ecgl.sm.depth.vertex uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; attribute vec3 position : POSITION; #ifdef VERTEX_ANIMATION attribute vec3 prevPosition; uniform float percent : 1.0; #endif varying vec4 v_ViewPosition; void main(){ #ifdef VERTEX_ANIMATION vec3 pos = mix(prevPosition, position, percent); #else vec3 pos = position; #endif v_ViewPosition = worldViewProjection * vec4(pos, 1.0); gl_Position = v_ViewPosition; } @end @export ecgl.sm.depth.fragment @import clay.sm.depth.fragment @end`},function(ee,G,_){"use strict";var F=_(134),w=_(138),x=_(139),y=_(145),b=_(0),E=_.n(b);E.a.registerAction({type:"grid3DChangeCamera",event:"grid3dcamerachanged",update:"series:updateCamera"},function(g,m){m.eachComponent({mainType:"grid3D",query:g},function(C){C.setView(g)})}),E.a.registerAction({type:"grid3DShowAxisPointer",event:"grid3dshowaxispointer",update:"grid3D:showAxisPointer"},function(g,m){}),E.a.registerAction({type:"grid3DHideAxisPointer",event:"grid3dhideaxispointer",update:"grid3D:hideAxisPointer"},function(g,m){})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(135),y=w.a.extendComponentModel({type:"cartesian3DAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid3D",index:this.option.gridIndex,id:this.option.gridId})[0]}});w.a.helper.mixinAxisModelCommonMethods(y);function b(E,g){return g.type||(g.data?"category":"value")}Object(x.a)("x",y,b,{name:"X"}),Object(x.a)("y",y,b,{name:"Y"}),Object(x.a)("z",y,b,{name:"Z"})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(136),y=_(137),b=_.n(y),E=["value","category","time","log"];G.a=function(g,m,C,d){w.a.util.each(E,function(v){m.extend({type:g+"Axis3D."+v,__ordinalMeta:null,mergeDefaultAndTheme:function(A,T){var O=T.getTheme();w.a.util.merge(A,O.get(v+"Axis3D")),w.a.util.merge(A,this.getDefaultOption()),A.type=C(g,A)},optionUpdated:function(){var A=this.option;A.type==="category"&&(this.__ordinalMeta=b.a.createByAxisModel(this))},getCategories:function(){if(this.option.type==="category")return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:w.a.util.merge(w.a.util.clone(x.a[v+"Axis3D"]),d||{},!0)})}),m.superClass.registerSubTypeDefaulter(g+"Axis3D",w.a.util.curry(C,g))}},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x={show:!0,grid3DIndex:0,inverse:!1,name:"",nameLocation:"middle",nameTextStyle:{fontSize:16},nameGap:20,axisPointer:{},axisLine:{},axisTick:{},axisLabel:{},splitArea:{}},y=w.a.util.merge({boundaryGap:!0,axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"},axisPointer:{label:{show:!1}}},x),b=w.a.util.merge({boundaryGap:[0,0],splitNumber:5,axisPointer:{label:{}}},x),E=w.a.util.defaults({scale:!0,min:"dataMin",max:"dataMax"},b),g=w.a.util.defaults({logBase:10},b);g.scale=!0,G.a={categoryAxis3D:y,valueAxis3D:b,timeAxis3D:E,logAxis3D:g}},function(ee,G,_){var F=_(12),w=F.createHashMap,x=F.isObject,y=F.map;function b(d){this.categories=d.categories||[],this._needCollect=d.needCollect,this._deduplication=d.deduplication,this._map}b.createByAxisModel=function(d){var v=d.option,A=v.data,T=A&&y(A,m);return new b({categories:T,needCollect:!T,deduplication:v.dedplication!==!1})};var E=b.prototype;E.getOrdinal=function(d){return g(this).get(d)},E.parseAndCollect=function(d){var v,A=this._needCollect;if(typeof d!="string"&&!A)return d;if(A&&!this._deduplication)return v=this.categories.length,this.categories[v]=d,v;var T=g(this);return v=T.get(d),v==null&&(A?(v=this.categories.length,this.categories[v]=d,T.set(d,v)):v=NaN),v};function g(d){return d._map||(d._map=w(d.categories))}function m(d){return x(d)&&d.value!=null?d.value:d+""}var C=b;ee.exports=C},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(38),y=_(31),b=_(32),E=w.a.extendComponentModel({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});w.a.util.merge(E.prototype,x.a),w.a.util.merge(E.prototype,y.a),w.a.util.merge(E.prototype,b.a);var g=E},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(39),b=_(22),E=_(3),g=_(73),m=_(34),C=_(140),d=_(142),v=_(58),A=_(40),T=E.a.firstNotNull;x.a.Shader.import(A.a),["x","y","z"].forEach(function(L){w.a.extendComponentView({type:L+"Axis3D"})});var O={x:0,y:2,z:1},P=w.a.extendComponentView({type:"grid3D",__ecgl__:!0,init:function(L,c){var f=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]],D=["x","y","z"],R=new x.a.Material({shader:x.a.createShader("ecgl.color"),depthMask:!1,transparent:!0}),k=new x.a.Material({shader:x.a.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});R.define("fragment","DOUBLE_SIDED"),R.define("both","VERTEX_COLOR"),this.groupGL=new x.a.Node,this._control=new y.a({zr:c.getZr()}),this._control.init(),this._faces=f.map(function(z){var Z=new C.a(z,k,R);return this.groupGL.add(Z.rootNode),Z},this),this._axes=D.map(function(z){var Z=new d.a(z,k);return this.groupGL.add(Z.rootNode),Z},this);var W=c.getDevicePixelRatio();this._axisLabelSurface=new g.a({width:256,height:256,devicePixelRatio:W}),this._axisLabelSurface.onupdate=function(){c.getZr().refresh()},this._axisPointerLineMesh=new x.a.Mesh({geometry:new b.a({useNativeLine:!1}),material:k,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new g.a({width:128,height:128,devicePixelRatio:W}),this._axisPointerLabelsMesh=new v.a({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new x.a.Node,this._sceneHelper=new m.a,this._sceneHelper.initLight(this._lightRoot)},render:function(L,c,f){this._model=L,this._api=f;var D=L.coordinateSystem;D.viewGL.add(this._lightRoot),L.get("show")?D.viewGL.add(this.groupGL):D.viewGL.remove(this.groupGL);var R=this._control;R.setViewGL(D.viewGL);var k=L.getModel("viewControl");R.setFromViewControlModel(k,0),this._axisLabelSurface.clear();var W=["x","y","z"].reduce(function(z,Z){var Q=D.getAxis(Z),te=Q.model;return z[Z]=T(te.get("axisLabel.interval"),L.get("axisLabel.interval")),Q.scale.type==="ordinal"&&(z[Z]==null||z[Z]=="auto")&&(z[Z]=Math.floor(Q.scale.getTicks().length/8)),z},{});R.off("update"),L.get("show")&&(this._faces.forEach(function(z){z.update(W,L,c,f)},this),this._axes.forEach(function(z){z.update(L,W,this._axisLabelSurface,f)},this)),R.on("update",this._onCameraChange.bind(this,L,f),this),this._sceneHelper.setScene(D.viewGL.scene),this._sceneHelper.updateLight(L),D.viewGL.setPostEffect(L.getModel("postEffect"),f),D.viewGL.setTemporalSuperSampling(L.getModel("temporalSuperSampling")),this._initMouseHandler(L)},afterRender:function(L,c,f,D){var R=D.renderer;this._sceneHelper.updateAmbientCubemap(R,L,f),this._sceneHelper.updateSkybox(R,L,f)},showAxisPointer:function(L,c,f,D){this._doShowAxisPointer(),this._updateAxisPointer(D.value)},hideAxisPointer:function(L,c,f,D){this._doHideAxisPointer()},_initMouseHandler:function(L){var c=L.coordinateSystem,f=c.viewGL;L.get("show")&&L.get("axisPointer.show")?f.on("mousemove",this._updateAxisPointerOnMousePosition,this):f.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(L){if(!L.target){for(var c=this._model,f=c.coordinateSystem,D=f.viewGL,R=D.castRay(L.offsetX,L.offsetY,new x.a.Ray),k,W=0;WD[1]?0:1,z=this._faces[f*2+W],Z=this._faces[f*2+1-W];z.rootNode.invisible=!0,Z.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var L=this._model.coordinateSystem,c=L.getAxis("x"),f=L.getAxis("y"),D=L.getAxis("z"),R=D.getExtentMax(),k=D.getExtentMin(),W=c.getExtentMin(),z=c.getExtentMax(),Z=f.getExtentMax(),Q=f.getExtentMin(),te=this._axes[0].rootNode,$=this._axes[1].rootNode,ie=this._axes[2].rootNode,ae=this._faces,re=ae[4].rootNode.invisible?Q:Z,ce=ae[2].rootNode.invisible?R:k,oe=ae[0].rootNode.invisible?W:z,he=ae[2].rootNode.invisible?R:k,se=ae[0].rootNode.invisible?z:W,pe=ae[4].rootNode.invisible?Q:Z;te.rotation.identity(),$.rotation.identity(),ie.rotation.identity(),ae[4].rootNode.invisible&&(this._axes[0].flipped=!0,te.rotation.rotateX(Math.PI)),ae[0].rootNode.invisible&&(this._axes[1].flipped=!0,$.rotation.rotateZ(Math.PI)),ae[4].rootNode.invisible&&(this._axes[2].flipped=!0,ie.rotation.rotateY(Math.PI)),te.position.set(0,ce,re),$.position.set(oe,he,0),ie.position.set(se,0,pe),te.update(),$.update(),ie.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var L=this._control.getCamera(),c=[new x.a.Vector4,new x.a.Vector4],f=new x.a.Vector4;this.groupGL.getWorldPosition(f),f.w=1,f.transformMat4(L.viewMatrix).transformMat4(L.projectionMatrix),f.x/=f.w,f.y/=f.w,this._axes.forEach(function(D){for(var R=D.axisLineCoords,k=D.labelsMesh.geometry,W=0;Wf.y?"bottom":"top"):(ie="middle",$=Q>f.x?"left":"right"),D.setSpriteAlign($,ie,this._api)},this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(L){var c=this._model.coordinateSystem,f=c.dataToPoint(L),D=this._axisPointerLineMesh,R=D.geometry,k=this._model.getModel("axisPointer"),W=this._api.getDevicePixelRatio();R.convertToDynamicArray(!0);function z(Fe){return E.a.firstNotNull(Fe.model.get("axisPointer.show"),k.get("show"))}function Z(Fe){var Ue=Fe.model.getModel("axisPointer",k),nt=Ue.getModel("lineStyle"),rt=x.a.parseColor(nt.get("color")),qe=T(nt.get("width"),1),dt=T(nt.get("opacity"),1);return rt[3]*=dt,{color:rt,lineWidth:qe}}for(var Q=0;Q0&&A.rotation.rotateY(Math.PI),T.normal.z=-P)}function v(A,T,O){this.rootNode=new x.a.Node;var P=new x.a.Mesh({geometry:new b.a({useNativeLine:!1}),material:T,castShadow:!1,ignorePicking:!0,renderOrder:1}),L=new x.a.Mesh({geometry:new E.a,material:O,castShadow:!1,culling:!1,ignorePicking:!0,renderOrder:0});this.rootNode.add(L),this.rootNode.add(P),this.faceInfo=A,this.plane=new x.a.Plane,this.linesMesh=P,this.quadsMesh=L}v.prototype.update=function(A,T,O,P){var L=T.coordinateSystem,c=[L.getAxis(this.faceInfo[0]),L.getAxis(this.faceInfo[1])],f=this.linesMesh.geometry,D=this.quadsMesh.geometry;f.convertToDynamicArray(!0),D.convertToDynamicArray(!0),this._updateSplitLines(f,c,T,A,P),this._udpateSplitAreas(D,c,T,A,P),f.convertToTypedArray(),D.convertToTypedArray();var R=L.getAxis(this.faceInfo[2]);d(this.rootNode,this.plane,R,this.faceInfo[3])},v.prototype._updateSplitLines=function(A,T,O,P,L){var c=L.getDevicePixelRatio();T.forEach(function(f,D){var R=f.model,k=T[1-D].getExtent();if(!f.scale.isBlank()){var W=R.getModel("splitLine",O.getModel("splitLine"));if(W.get("show")){var z=W.getModel("lineStyle"),Z=z.get("color"),Q=m(z.get("opacity"),1),te=m(z.get("width"),1),$=W.get("interval");($==null||$==="auto")&&($=P[f.dim]),Z=w.a.util.isArray(Z)?Z:[Z];for(var ie=f.getTicksCoords(),ae=0,re=0;re65535?new Uint32Array(A*3):new Uint16Array(A*3))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var C=g.create(),d=g.create(),v=g.create(),A=[0,3,1,3,2,1];return function(T,O){var P=this.attributes.position,L=this.attributes.normal,c=this.attributes.color;g.sub(C,T[1],T[0]),g.sub(d,T[2],T[1]),g.cross(v,C,d),g.normalize(v,v);for(var f=0;f<4;f++)P.set(this._vertexOffset+f,T[f]),c.set(this._vertexOffset+f,O),L.set(this._vertexOffset+f,v);for(var D=this._faceOffset*3,f=0;f<6;f++)this.indices[D+f]=A[f]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});x.a.util.defaults(m.prototype,y.a),G.a=m},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(22),b=_(3),E=_(58),g=_(74),m=b.a.firstNotNull,C={x:0,y:2,z:1};function d(A,T){var O=new x.a.Mesh({geometry:new y.a({useNativeLine:!1}),material:T,castShadow:!1,ignorePicking:!0,renderOrder:2}),P=new E.a;P.material.depthMask=!1;var L=new x.a.Node;L.add(O),L.add(P),this.rootNode=L,this.dim=A,this.linesMesh=O,this.labelsMesh=P,this.axisLineCoords=null,this.labelElements=[]}var v={x:"y",y:"x",z:"y"};d.prototype.update=function(A,T,O,P){var L=A.coordinateSystem,c=L.getAxis(this.dim),f=T[this.dim],D=this.linesMesh.geometry,R=this.labelsMesh.geometry;D.convertToDynamicArray(!0),R.convertToDynamicArray(!0);var k=c.model,W=c.getExtent(),nt=P.getDevicePixelRatio(),z=k.getModel("axisLine",A.getModel("axisLine")),Z=k.getModel("axisTick",A.getModel("axisTick")),Q=k.getModel("axisLabel",A.getModel("axisLabel")),te=z.get("lineStyle.color");if(z.get("show")){var $=z.getModel("lineStyle"),ie=[0,0,0],ae=[0,0,0],re=C[c.dim];ie[re]=W[0],ae[re]=W[1],this.axisLineCoords=[ie,ae];var ce=x.a.parseColor(te),oe=m($.get("width"),1),he=m($.get("opacity"),1);ce[3]*=he,D.addLine(ie,ae,ce,oe*nt)}if(Z.get("show")){var se=Z.getModel("lineStyle"),pe=x.a.parseColor(m(se.get("color"),te)),oe=m(se.get("width"),1);pe[3]*=m(se.get("opacity"),1);var me=c.getTicksCoords(),ge=Z.get("interval");(ge==null||ge==="auto")&&(ge=f);for(var Ee=Z.get("length"),Ae=0;Ae65535?new Uint32Array(C*3):new Uint16Array(C*3))},setSpriteAlign:function(g,m,C,d,v){C==null&&(C="left"),d==null&&(d="top");var A,T,O,P;switch(v=v||0,C){case"left":A=v,O=m[0]+v;break;case"center":case"middle":A=-m[0]/2,O=m[0]/2;break;case"right":A=-m[0]-v,O=-v;break}switch(d){case"bottom":T=v,P=m[1]+v;break;case"middle":T=-m[1]/2,P=m[1]/2;break;case"top":T=-m[1]-v,P=-v;break}var L=g*4,c=this.attributes.offset;c.set(L,[A,P]),c.set(L+1,[O,P]),c.set(L+2,[O,T]),c.set(L+3,[A,T])},addSprite:function(g,m,C,d,v,A){var T=this._vertexOffset;this.setSprite(this._vertexOffset/4,g,m,C,d,v,A);for(var O=0;O1?"."+f[1]:""))}function b(f,D){return f=(f||"").toLowerCase().replace(/-(.)/g,function(R,k){return k.toUpperCase()}),D&&f&&(f=f.charAt(0).toUpperCase()+f.slice(1)),f}var E=F.normalizeCssArray;function g(f){return String(f).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}var m=["a","b","c","d","e","f","g"],C=function(f,D){return"{"+f+(D==null?"":D)+"}"};function d(f,D,R){F.isArray(D)||(D=[D]);var k=D.length;if(!k)return"";for(var W=D[0].$vars||[],z=0;z':'':""}var T=function(f){return f<10?"0"+f:f};function O(f,D,R){(f==="week"||f==="month"||f==="quarter"||f==="half-year"||f==="year")&&(f=`MM-dd yyyy`);var k=x.parseDate(D),W=R?"UTC":"",z=k["get"+W+"FullYear"](),Z=k["get"+W+"Month"]()+1,Q=k["get"+W+"Date"](),te=k["get"+W+"Hours"](),$=k["get"+W+"Minutes"](),ie=k["get"+W+"Seconds"]();return f=f.replace("MM",T(Z)).replace("M",Z).replace("yyyy",z).replace("yy",z%100).replace("dd",T(Q)).replace("d",Q).replace("hh",T(te)).replace("h",te).replace("mm",T($)).replace("m",$).replace("ss",T(ie)).replace("s",ie),f}function P(f){return f&&f.charAt(0).toUpperCase()+f.substr(1)}var L=w.truncateText,c=w.getBoundingRect;G.addCommas=y,G.toCamelCase=b,G.normalizeCssArray=E,G.encodeHTML=g,G.formatTpl=d,G.formatTplSimple=v,G.getTooltipMarker=A,G.formatTime=O,G.capitalFirst=P,G.truncateText=L,G.getTextRect=c},function(ee,G,_){var F=_(75),w=_(151),x=_(12),y=x.getContext,b=x.extend,E=x.retrieve2,g=x.retrieve3,m={},C=0,d=5e3,v=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,A="12px sans-serif",T={};function O(oe,he){T[oe]=he}function P(oe,he){he=he||A;var se=oe+":"+he;if(m[se])return m[se];for(var pe=(oe+"").split(` `),me=0,ge=0,Ee=pe.length;ged&&(C=0,m={}),C++,m[se]=me,me}function L(oe,he,se,pe,me,ge,Ee){return ge?f(oe,he,se,pe,me,ge,Ee):c(oe,he,se,pe,me,Ee)}function c(oe,he,se,pe,me,ge){var Ee=ie(oe,he,me,ge),Ae=P(oe,he);me&&(Ae+=me[1]+me[3]);var Fe=Ee.outerHeight,Ue=D(0,Ae,se),nt=R(0,Fe,pe),rt=new F(Ue,nt,Ae,Fe);return rt.lineHeight=Ee.lineHeight,rt}function f(oe,he,se,pe,me,ge,Ee){var Ae=ae(oe,{rich:ge,truncate:Ee,font:he,textAlign:se,textPadding:me}),Fe=Ae.outerWidth,Ue=Ae.outerHeight,nt=D(0,Fe,se),rt=R(0,Ue,pe);return new F(nt,rt,Fe,Ue)}function D(oe,he,se){return se==="right"?oe-=he:se==="center"&&(oe-=he/2),oe}function R(oe,he,se){return se==="middle"?oe-=he/2:se==="bottom"&&(oe-=he),oe}function k(oe,he,se){var pe=he.x,me=he.y,ge=he.height,Ee=he.width,Ae=ge/2,Fe="left",Ue="top";switch(oe){case"left":pe-=se,me+=Ae,Fe="right",Ue="middle";break;case"right":pe+=se+Ee,me+=Ae,Ue="middle";break;case"top":pe+=Ee/2,me-=se,Fe="center",Ue="bottom";break;case"bottom":pe+=Ee/2,me+=ge+se,Fe="center";break;case"inside":pe+=Ee/2,me+=Ae,Fe="center",Ue="middle";break;case"insideLeft":pe+=se,me+=Ae,Ue="middle";break;case"insideRight":pe+=Ee-se,me+=Ae,Fe="right",Ue="middle";break;case"insideTop":pe+=Ee/2,me+=se,Fe="center";break;case"insideBottom":pe+=Ee/2,me+=ge-se,Fe="center",Ue="bottom";break;case"insideTopLeft":pe+=se,me+=se;break;case"insideTopRight":pe+=Ee-se,me+=se,Fe="right";break;case"insideBottomLeft":pe+=se,me+=ge-se,Ue="bottom";break;case"insideBottomRight":pe+=Ee-se,me+=ge-se,Fe="right",Ue="bottom";break}return{x:pe,y:me,textAlign:Fe,textVerticalAlign:Ue}}function W(oe,he,se,pe,me){if(!he)return"";var ge=(oe+"").split(` `);me=z(he,se,pe,me);for(var Ee=0,Ae=ge.length;Ee=Ee;Fe++)Ae-=Ee;var Ue=P(me);return Ue>Ae&&(me="",Ue=0),Ae=oe-Ue,pe.ellipsis=me,pe.ellipsisWidth=Ue,pe.contentWidth=Ae,pe.containerWidth=oe,pe}function Z(oe,he){var se=he.containerWidth,pe=he.font,me=he.contentWidth;if(!se)return"";var ge=P(oe,pe);if(ge<=se)return oe;for(var Ee=0;;Ee++){if(ge<=me||Ee>=he.maxIterations){oe+=he.ellipsis;break}var Ae=Ee===0?Q(oe,me,he.ascCharWidth,he.cnCharWidth):ge>0?Math.floor(oe.length*me/ge):0;oe=oe.substr(0,Ae),ge=P(oe,pe)}return oe===""&&(oe=he.placeholder),oe}function Q(oe,he,se,pe){for(var me=0,ge=0,Ee=oe.length;geFe)oe="",ge=[];else if(Ue!=null)for(var nt=z(Ue-(se?se[1]+se[3]:0),he,pe.ellipsis,{minChar:pe.minChar,placeholder:pe.placeholder}),rt=0,qe=ge.length;rtpe&&re(se,oe.substring(pe,ge)),re(se,me[2],me[1]),pe=v.lastIndex}pedt)return{lines:[],width:0,height:0};ut.textWidth=P(ut.text,ot);var Ne=Mt.textWidth,We=Ne==null||Ne==="auto";if(typeof Ne=="string"&&Ne.charAt(Ne.length-1)==="%")ut.percentWidth=Ne,Ue.push(ut),Ne=0;else{if(We){Ne=ut.textWidth;var Be=Mt.textBackgroundColor,Ve=Be&&Be.image;Ve&&(Ve=w.findExistImage(Ve),w.isImageReady(Ve)&&(Ne=Math.max(Ne,Ve.width*Pe/Ve.height)))}var $e=Ce?Ce[1]+Ce[3]:0;Ne+=$e;var lt=qe!=null?qe-it:null;lt!=null&<4){console.warn("Support at most 4 cascade");continue}dt.shadowCascade>1&&(rt=dt.shadowCascade),this.renderDirectionalLightShadow(ce,oe,he,dt,this._opaqueCasters,Ue,Fe,Ae)}else dt instanceof v.a?this.renderSpotLightShadow(ce,oe,dt,this._opaqueCasters,Ee,ge):dt instanceof T.a&&this.renderPointLightShadow(ce,oe,dt,this._opaqueCasters,nt);this._shadowMapNumber[dt.type]++}for(var yt in this._shadowMapNumber)for(var je=this._shadowMapNumber[yt],at=yt+"_SHADOWMAP_COUNT",qe=0;qe0?ht.define("fragment",at,je):ht.isDefined("fragment",at)&&ht.undefine("fragment",at))}for(var qe=0;qe0){var Ce=Ae.map(Mt);if(ut.directionalLightShadowMaps={value:Ae,type:"tv"},ut.directionalLightMatrices={value:Fe,type:"m4v"},ut.directionalLightShadowMapSizes={value:Ce,type:"1fv"},rt){var ot=Ue.slice(),Pe=Ue.slice();ot.pop(),Pe.shift(),ot.reverse(),Pe.reverse(),Fe.reverse(),ut.shadowCascadeClipsNear={value:ot,type:"1fv"},ut.shadowCascadeClipsFar={value:Pe,type:"1fv"}}}if(ge.length>0){var Ne=ge.map(Mt),ut=oe.shadowUniforms;ut.spotLightShadowMaps={value:ge,type:"tv"},ut.spotLightMatrices={value:Ee,type:"m4v"},ut.spotLightShadowMapSizes={value:Ne,type:"1fv"}}nt.length>0&&(ut.pointLightShadowMaps={value:nt,type:"tv"})},renderDirectionalLightShadow:function(){var ce=new b.a,oe=new E.a,he=new y.a,se=new E.a,pe=new E.a,me=new E.a,ge=new E.a;return function(Ee,Ae,Fe,Ue,nt,rt,qe,dt){var yt=this._getDepthMaterial(Ue),je={getMaterial:function(en){return en.shadowDepthMaterial||yt},sortCompare:g.a.opaqueSortCompare};if(!Ae.viewBoundingBoxLastFrame.isFinite()){var at=Ae.getBoundingBox();Ae.viewBoundingBoxLastFrame.copy(at).applyTransform(Fe.viewMatrix)}var it=Math.min(-Ae.viewBoundingBoxLastFrame.min.z,Fe.far),ht=Math.max(-Ae.viewBoundingBoxLastFrame.max.z,Fe.near),ut=this._getDirectionalLightCamera(Ue,Ae,Fe),Mt=me.array;ge.copy(ut.projectionMatrix),$.invert(pe.array,ut.worldTransform.array),$.multiply(pe.array,pe.array,Fe.worldTransform.array),$.multiply(Mt,ge.array,pe.array);for(var Ce=[],ot=Fe instanceof R.a,Pe=(Fe.near+Fe.far)/(Fe.near-Fe.far),Ne=2*Fe.near*Fe.far/(Fe.near-Fe.far),We=0;We<=Ue.shadowCascade;We++){var Be=ht*Math.pow(it/ht,We/Ue.shadowCascade),Ve=ht+(it-ht)*We/Ue.shadowCascade,$e=Be*Ue.cascadeSplitLogFactor+Ve*(1-Ue.cascadeSplitLogFactor);Ce.push($e),rt.push(-(-$e*Pe+Ne)/-$e)}var lt=this._getTexture(Ue,Ue.shadowCascade);dt.push(lt);var pt=Ee.viewport,xt=Ee.gl;this._frameBuffer.attach(lt),this._frameBuffer.bind(Ee),xt.clear(xt.COLOR_BUFFER_BIT|xt.DEPTH_BUFFER_BIT);for(var We=0;We= shadowCascadeClipsNear[_idx_] && depth <= shadowCascadeClipsFar[_idx_] ) { shadowContrib = computeShadowContrib( directionalLightShadowMaps[0], directionalLightMatrices[_idx_], position, directionalLightShadowMapSizes[0], vec2(1.0 / float(SHADOW_CASCADE), 1.0), vec2(float(_idx_) / float(SHADOW_CASCADE), 0.0) ); shadowContribs[0] = shadowContrib; } }} for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{ shadowContribs[_idx_] = 1.0; }} } #else void computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){ float shadowContrib; for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_++) {{ shadowContrib = computeShadowContrib( directionalLightShadowMaps[_idx_], directionalLightMatrices[_idx_], position, directionalLightShadowMapSizes[_idx_] ); shadowContribs[_idx_] = shadowContrib; }} for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{ shadowContribs[_idx_] = 1.0; }} } #endif #endif #if defined(POINT_LIGHT_SHADOWMAP_COUNT) void computeShadowOfPointLights(vec3 position, inout float shadowContribs[POINT_LIGHT_COUNT] ){ vec3 lightPosition; vec3 direction; for(int _idx_ = 0; _idx_ < POINT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{ lightPosition = pointLightPosition[_idx_]; direction = position - lightPosition; shadowContribs[_idx_] = computeShadowContribOmni(pointLightShadowMaps[_idx_], direction, pointLightRange[_idx_]); }} for(int _idx_ = POINT_LIGHT_SHADOWMAP_COUNT; _idx_ < POINT_LIGHT_COUNT; _idx_++) {{ shadowContribs[_idx_] = 1.0; }} } #endif #endif @end`},function(ee,G,_){"use strict";var F=_(7),w=_(5),x=_(6),y=_(10),b=_(156),E=_(162),g=_(164),m=_(166),C=_(2),d=_(167),v=_(169),A=_(9),T=_(170),O=_(171),P=_(172),L=_(173),c=_(174),f=_(175),D=_(176),R=_(177),k=_(178),W=_(179),z=_(180),Z=_(181);F.a.import(O.a),F.a.import(P.a),F.a.import(L.a),F.a.import(c.a),F.a.import(f.a),F.a.import(D.a),F.a.import(R.a),F.a.import(k.a),F.a.import(W.a),F.a.import(z.a),F.a.import(Z.a);var Q={color:{parameters:{width:function(ie){return ie.getWidth()},height:function(ie){return ie.getHeight()}}}},te=["composite","FXAA"];function $(){this._sourceTexture=new w.a({type:x.a.HALF_FLOAT}),this._depthTexture=new w.a({format:x.a.DEPTH_COMPONENT,type:x.a.UNSIGNED_INT}),this._framebuffer=new y.a,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,y.a.DEPTH_ATTACHMENT),this._normalPass=new d.a,this._compositor=Object(b.a)(T.a);var ie=this._compositor.getNodeByName("source");ie.texture=this._sourceTexture;var ae=this._compositor.getNodeByName("coc");this._sourceNode=ie,this._cocNode=ae,this._compositeNode=this._compositor.getNodeByName("composite"),this._fxaaNode=this._compositor.getNodeByName("FXAA"),this._dofBlurNodes=["dof_far_blur","dof_near_blur","dof_coc_blur"].map(function(ce){return this._compositor.getNodeByName(ce)},this),this._dofBlurKernel=0,this._dofBlurKernelSize=new Float32Array(0),this._finalNodesChain=te.map(function(ce){return this._compositor.getNodeByName(ce)},this);var re={normalTexture:this._normalPass.getNormalTexture(),depthTexture:this._normalPass.getDepthTexture()};this._ssaoPass=new E.a(re),this._ssrPass=new g.a(re),this._edgePass=new v.a(re)}$.prototype.resize=function(ce,oe,re){re=re||1;var ce=ce*re,oe=oe*re,he=this._sourceTexture,se=this._depthTexture;he.width=ce,he.height=oe,se.width=ce,se.height=oe},$.prototype._ifRenderNormalPass=function(){return this._enableSSAO||this._enableEdge||this._enableSSR},$.prototype._getPrevNode=function(ie){for(var ae=te.indexOf(ie.name)-1,re=this._finalNodesChain[ae];re&&!this._compositor.getNodeByName(re.name);)ae-=1,re=this._finalNodesChain[ae];return re},$.prototype._getNextNode=function(ie){for(var ae=te.indexOf(ie.name)+1,re=this._finalNodesChain[ae];re&&!this._compositor.getNodeByName(re.name);)ae+=1,re=this._finalNodesChain[ae];return re},$.prototype._addChainNode=function(ie){var ae=this._getPrevNode(ie),re=this._getNextNode(ie);ae&&(ae.outputs=Q,ie.inputs.texture=ae.name,re?(ie.outputs=Q,re.inputs.texture=ie.name):ie.outputs=null,this._compositor.addNode(ie))},$.prototype._removeChainNode=function(ie){var ae=this._getPrevNode(ie),re=this._getNextNode(ie);ae&&(re?(ae.outputs=Q,re.inputs.texture=ae.name):ae.outputs=null,this._compositor.removeNode(ie))},$.prototype.updateNormal=function(ie,ae,re,ce){this._ifRenderNormalPass()&&this._normalPass.update(ie,ae,re)},$.prototype.updateSSAO=function(ie,ae,re,ce){this._ssaoPass.update(ie,re,ce)},$.prototype.enableSSAO=function(){this._enableSSAO=!0},$.prototype.disableSSAO=function(){this._enableSSAO=!1},$.prototype.enableSSR=function(){this._enableSSR=!0},$.prototype.disableSSR=function(){this._enableSSR=!1},$.prototype.getSSAOTexture=function(ie,ae,re,ce){return this._ssaoPass.getTargetTexture()},$.prototype.getSourceFrameBuffer=function(){return this._framebuffer},$.prototype.getSourceTexture=function(){return this._sourceTexture},$.prototype.disableFXAA=function(){this._removeChainNode(this._fxaaNode)},$.prototype.enableFXAA=function(){this._addChainNode(this._fxaaNode)},$.prototype.enableBloom=function(){this._compositeNode.inputs.bloom="bloom_composite",this._compositor.dirty()},$.prototype.disableBloom=function(){this._compositeNode.inputs.bloom=null,this._compositor.dirty()},$.prototype.enableDOF=function(){this._compositeNode.inputs.texture="dof_composite",this._compositor.dirty()},$.prototype.disableDOF=function(){this._compositeNode.inputs.texture="source",this._compositor.dirty()},$.prototype.enableColorCorrection=function(){this._compositeNode.define("COLOR_CORRECTION"),this._enableColorCorrection=!0},$.prototype.disableColorCorrection=function(){this._compositeNode.undefine("COLOR_CORRECTION"),this._enableColorCorrection=!1},$.prototype.enableEdge=function(){this._enableEdge=!0},$.prototype.disableEdge=function(){this._enableEdge=!1},$.prototype.setBloomIntensity=function(ie){this._compositeNode.setParameter("bloomIntensity",ie)},$.prototype.setSSAOParameter=function(ie,ae){switch(ie){case"quality":var re={low:6,medium:12,high:32,ultra:62}[ae]||12;this._ssaoPass.setParameter("kernelSize",re);break;case"radius":this._ssaoPass.setParameter(ie,ae),this._ssaoPass.setParameter("bias",ae/200);break;case"intensity":this._ssaoPass.setParameter(ie,ae);break;default:console.warn("Unkown SSAO parameter "+ie)}},$.prototype.setDOFParameter=function(ie,ae){switch(ie){case"focalDistance":case"focalRange":case"fstop":this._cocNode.setParameter(ie,ae);break;case"blurRadius":for(var re=0;re=0||(this.nodes.push(y),this._dirty=!0)},removeNode:function(y){typeof y=="string"&&(y=this.getNodeByName(y));var b=this.nodes.indexOf(y);b>=0&&(this.nodes.splice(b,1),this._dirty=!0)},getNodeByName:function(y){for(var b=0;b=E.COLOR_ATTACHMENT0&&T<=E.COLOR_ATTACHMENT0+8&&P.push(T);O.drawBuffersEXT(P)}b.saveClear(),b.clearBit=w.a.DEPTH_BUFFER_BIT|w.a.COLOR_BUFFER_BIT,g=b.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),b.restoreClear(),m.unbind(b)}this.trigger("afterrender",g),this._rendering=!1,this._rendered=!0}});G.a=y},function(ee,G,_){"use strict";var F=_(42),w=F.a.extend(function(){return{texture:null,outputs:{color:{}}}},function(){},{getOutput:function(x,y){return this.texture},beforeFrame:function(){},afterFrame:function(){}});G.a=w},function(ee,G,_){"use strict";var F=_(14),w=_(42),x=w.a.extend(function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}},function(){var y=new F.a({fragment:this.shader});this.pass=y},{render:function(y,b){this.trigger("beforerender",y),this._rendering=!0;var E=y.gl;for(var g in this.inputLinks){var m=this.inputLinks[g],C=m.node.getOutput(y,m.pin);this.pass.setUniform(g,C)}if(!this.outputs)this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(y),this.pass.render(y,b);else{this.pass.outputs={};var d={};for(var v in this.outputs){var A=this.updateParameter(v,y);isNaN(A.width)&&this.updateParameter(v,y);var T=this.outputs[v],O=this._compositor.allocateTexture(A);this._outputTextures[v]=O;var P=T.attachment||E.COLOR_ATTACHMENT0;typeof P=="string"&&(P=E[P]),d[P]=O}this._compositor.getFrameBuffer().bind(y);for(var P in d)this._compositor.getFrameBuffer().attach(d[P],P);this.pass.render(y),this._compositor.getFrameBuffer().updateMipmap(y.gl)}for(var g in this.inputLinks){var m=this.inputLinks[g];m.node.removeReference(m.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",y)},updateParameter:function(y,b){var E=this.outputs[y],g=E.parameters,m=E._parametersCopy;if(m||(m=E._parametersCopy={}),g)for(var C in g)C!=="width"&&C!=="height"&&(m[C]=g[C]);var d,v;return g.width instanceof Function?d=g.width.call(this,b):d=g.width,g.height instanceof Function?v=g.height.call(this,b):v=g.height,(m.width!==d||m.height!==v)&&this._outputTextures[y]&&this._outputTextures[y].dispose(b),m.width=d,m.height=v,m},setParameter:function(y,b){this.pass.setUniform(y,b)},getParameter:function(y){return this.pass.getUniform(y)},setParameters:function(y){for(var b in y)this.setParameter(b,y[b])},define:function(y,b){this.pass.material.define("fragment",y,b)},undefine:function(y){this.pass.material.undefine("fragment",y)},removeReference:function(y){if(this._outputReferences[y]--,this._outputReferences[y]===0){var b=this.outputs[y];b.keepLastFrame?(this._prevOutputTextures[y]&&this._compositor.releaseTexture(this._prevOutputTextures[y]),this._prevOutputTextures[y]=this._outputTextures[y]):this._compositor.releaseTexture(this._outputTextures[y])}},clear:function(){w.a.prototype.clear.call(this),this.pass.material.disableTexturesAll()}});G.a=x},function(ee,G,_){"use strict";var F=_(9),w=_(4),x=_(5),y=_(6),b=_(14),E=_(7),g=_(10),m=_(43),C=_(163);E.a.import(C.a);function d(O){for(var P=new Uint8Array(O*O*4),L=0,c=new w.a,f=0;f 0.99999) { gl_FragColor = vec4(1.0); return; } mat3 kernelBasis; #endif float z = depthTexel.r * 2.0 - 1.0; vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0); vec4 p4 = projectionInv * projectedPos; vec3 position = p4.xyz / p4.w; float ao = ssaoEstimator(position, kernelBasis); ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0); gl_FragColor = vec4(vec3(ao), 1.0); } @end @export ecgl.ssao.blur #define SHADER_NAME SSAO_BLUR uniform sampler2D ssaoTexture; #ifdef NORMALTEX_ENABLED uniform sampler2D normalTex; #endif varying vec2 v_Texcoord; uniform vec2 textureSize; uniform float blurSize : 1.0; uniform int direction: 0.0; #ifdef DEPTHTEX_ENABLED uniform sampler2D depthTex; uniform mat4 projection; uniform float depthRange : 0.5; float getLinearDepth(vec2 coord) { float depth = texture2D(depthTex, coord).r * 2.0 - 1.0; return projection[3][2] / (depth * projection[2][3] - projection[2][2]); } #endif void main() { float kernel[5]; kernel[0] = 0.122581; kernel[1] = 0.233062; kernel[2] = 0.288713; kernel[3] = 0.233062; kernel[4] = 0.122581; vec2 off = vec2(0.0); if (direction == 0) { off[0] = blurSize / textureSize.x; } else { off[1] = blurSize / textureSize.y; } vec2 coord = v_Texcoord; float sum = 0.0; float weightAll = 0.0; #ifdef NORMALTEX_ENABLED vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0; #endif #if defined(DEPTHTEX_ENABLED) float centerDepth = getLinearDepth(v_Texcoord); #endif for (int i = 0; i < 5; i++) { vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0)); float w = kernel[i]; #ifdef NORMALTEX_ENABLED vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0; w *= clamp(dot(normal, centerNormal), 0.0, 1.0); #endif #ifdef DEPTHTEX_ENABLED float d = getLinearDepth(coord); w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0)); #endif weightAll += w; sum += texture2D(ssaoTexture, coord).r * w; } gl_FragColor = vec4(vec3(sum / weightAll), 1.0); } @end `},function(ee,G,_){"use strict";var F=_(9),w=_(4),x=_(5),y=_(6),b=_(14),E=_(7),g=_(10),m=_(43),C=_(165);E.a.import(C.a);function d(v){v=v||{},this._ssrPass=new b.a({fragment:E.a.source("ecgl.ssr.main"),clearColor:[0,0,0,0]}),this._blurPass1=new b.a({fragment:E.a.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blurPass2=new b.a({fragment:E.a.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._ssrPass.setUniform("gBufferTexture1",v.normalTexture),this._ssrPass.setUniform("gBufferTexture2",v.depthTexture),this._blurPass1.setUniform("gBufferTexture1",v.normalTexture),this._blurPass1.setUniform("gBufferTexture2",v.depthTexture),this._blurPass2.setUniform("gBufferTexture1",v.normalTexture),this._blurPass2.setUniform("gBufferTexture2",v.depthTexture),this._blurPass2.material.define("fragment","VERTICAL"),this._blurPass2.material.define("fragment","BLEND"),this._texture1=new x.a({type:y.a.HALF_FLOAT}),this._texture2=new x.a({type:y.a.HALF_FLOAT}),this._texture3=new x.a({type:y.a.HALF_FLOAT}),this._frameBuffer=new g.a({depthBuffer:!1})}d.prototype.update=function(v,A,T,O){var P=v.getWidth(),L=v.getHeight(),c=v.getDevicePixelRatio(),f=this._texture1,D=this._texture2,R=this._texture3;D.width=P/2,D.height=L/2,f.width=P,f.height=L,R.width=P*c,R.height=L*c;var k=this._frameBuffer,W=this._ssrPass,z=this._blurPass1,Z=this._blurPass2,Q=new F.a;F.a.transpose(Q,A.worldTransform),W.setUniform("sourceTexture",T),W.setUniform("projection",A.projectionMatrix.array),W.setUniform("projectionInv",A.invProjectionMatrix.array),W.setUniform("viewInverseTranspose",Q.array),W.setUniform("nearZ",A.near),W.setUniform("jitterOffset",O/30),z.setUniform("textureSize",[P/2,L/2]),Z.setUniform("textureSize",[P,L]),Z.setUniform("sourceTexture",T),z.setUniform("projection",A.projectionMatrix.array),Z.setUniform("projection",A.projectionMatrix.array),k.attach(f),k.bind(v),W.render(v),k.attach(D),z.setUniform("texture",f),z.render(v),k.attach(R),Z.setUniform("texture",D),Z.render(v),k.unbind(v)},d.prototype.getTargetTexture=function(){return this._texture3},d.prototype.setParameter=function(v,A){v==="maxIteration"?this._ssrPass.material.define("fragment","MAX_ITERATION",A):this._ssrPass.setUniform(v,A)},d.prototype.setSSAOTexture=function(v){var A=this._blurPass2;v?(A.material.enableTexture("ssaoTex"),A.material.set("ssaoTex",v)):A.material.disableTexture("ssaoTex")},d.prototype.dispose=function(v){this._texture1.dispose(v),this._texture2.dispose(v),this._texture3.dispose(v),this._frameBuffer.dispose(v)},G.a=d},function(ee,G,_){"use strict";G.a=`@export ecgl.ssr.main #define MAX_ITERATION 20; uniform sampler2D sourceTexture; uniform sampler2D gBufferTexture1; uniform sampler2D gBufferTexture2; uniform mat4 projection; uniform mat4 projectionInv; uniform mat4 viewInverseTranspose; uniform float maxRayDistance: 50; uniform float pixelStride: 16; uniform float pixelStrideZCutoff: 50; uniform float screenEdgeFadeStart: 0.9; uniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; uniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 10; uniform float nearZ; uniform vec2 viewportSize : VIEWPORT_SIZE; uniform float jitterOffset: 0; varying vec2 v_Texcoord; #ifdef DEPTH_DECODE @import clay.util.decode_float #endif float fetchDepth(sampler2D depthTexture, vec2 uv) { vec4 depthTexel = texture2D(depthTexture, uv); return depthTexel.r * 2.0 - 1.0; } float linearDepth(float depth) { if (projection[3][3] == 0.0) { return projection[3][2] / (depth * projection[2][3] - projection[2][2]); } else { return (depth - projection[3][2]) / projection[2][2]; } } bool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel) { if (rayZFar > rayZNear) { float t = rayZFar; rayZFar = rayZNear; rayZNear = t; } float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel)); return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold; } bool traceScreenSpaceRay( vec3 rayOrigin, vec3 rayDir, float jitter, out vec2 hitPixel, out vec3 hitPoint, out float iterationCount ) { float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ) ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance; vec3 rayEnd = rayOrigin + rayDir * rayLength; vec4 H0 = projection * vec4(rayOrigin, 1.0); vec4 H1 = projection * vec4(rayEnd, 1.0); float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w; vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1; vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize; vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize; P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0; vec2 delta = P1 - P0; bool permute = false; if (abs(delta.x) < abs(delta.y)) { permute = true; delta = delta.yx; P0 = P0.yx; P1 = P1.yx; } float stepDir = sign(delta.x); float invdx = stepDir / delta.x; vec3 dQ = (Q1 - Q0) * invdx; float dk = (k1 - k0) * invdx; vec2 dP = vec2(stepDir, delta.y * invdx); float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff); float pixStride = 1.0 + strideScaler * pixelStride; dP *= pixStride; dQ *= pixStride; dk *= pixStride; vec4 pqk = vec4(P0, Q0.z, k0); vec4 dPQK = vec4(dP, dQ.z, dk); pqk += dPQK * jitter; float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w); float rayZNear; bool intersect = false; vec2 texelSize = 1.0 / viewportSize; iterationCount = 0.0; for (int i = 0; i < MAX_ITERATION; i++) { pqk += dPQK; rayZNear = rayZFar; rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w); hitPixel = permute ? pqk.yx : pqk.xy; hitPixel *= texelSize; intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel); iterationCount += 1.0; if (intersect) { break; } } Q0.xy += dQ.xy * iterationCount; Q0.z = pqk.z; hitPoint = Q0 / pqk.w; return intersect; } float calculateAlpha( float iterationCount, float reflectivity, vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir ) { float alpha = clamp(reflectivity, 0.0, 1.0); alpha *= 1.0 - (iterationCount / float(MAX_ITERATION)); vec2 hitPixelNDC = hitPixel * 2.0 - 1.0; float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y))); alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart); float _eyeFadeStart = eyeFadeStart; float _eyeFadeEnd = eyeFadeEnd; if (_eyeFadeStart > _eyeFadeEnd) { float tmp = _eyeFadeEnd; _eyeFadeEnd = _eyeFadeStart; _eyeFadeStart = tmp; } float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd); alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart); alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0); return alpha; } @import clay.util.rand @import clay.util.rgbm void main() { vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord); if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) { discard; } float g = normalAndGloss.a; if (g <= minGlossiness) { discard; } float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness); vec3 N = normalAndGloss.rgb * 2.0 - 1.0; N = normalize((viewInverseTranspose * vec4(N, 0.0)).xyz); vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0); vec4 pos = projectionInv * projectedPos; vec3 rayOrigin = pos.xyz / pos.w; vec3 rayDir = normalize(reflect(normalize(rayOrigin), N)); vec2 hitPixel; vec3 hitPoint; float iterationCount; vec2 uv2 = v_Texcoord * viewportSize; float jitter = rand(fract(v_Texcoord + jitterOffset)); bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount); float dist = distance(rayOrigin, hitPoint); float alpha = calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir) * float(intersect); vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0; hitNormal = normalize((viewInverseTranspose * vec4(hitNormal, 0.0)).xyz); if (dot(hitNormal, rayDir) >= 0.0) { discard; } if (!intersect) { discard; } vec4 color = decodeHDR(texture2D(sourceTexture, hitPixel)); gl_FragColor = encodeHDR(vec4(color.rgb * alpha, color.a)); } @end @export ecgl.ssr.blur uniform sampler2D texture; uniform sampler2D gBufferTexture1; uniform sampler2D gBufferTexture2; uniform mat4 projection; uniform float depthRange : 0.05; varying vec2 v_Texcoord; uniform vec2 textureSize; uniform float blurSize : 4.0; #ifdef BLEND #ifdef SSAOTEX_ENABLED uniform sampler2D ssaoTex; #endif uniform sampler2D sourceTexture; #endif float getLinearDepth(vec2 coord) { float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0; return projection[3][2] / (depth * projection[2][3] - projection[2][2]); } @import clay.util.rgbm void main() { @import clay.compositor.kernel.gaussian_9 vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord); float g = centerNTexel.a; float maxBlurSize = clamp(1.0 - g + 0.1, 0.0, 1.0) * blurSize; #ifdef VERTICAL vec2 off = vec2(0.0, maxBlurSize / textureSize.y); #else vec2 off = vec2(maxBlurSize / textureSize.x, 0.0); #endif vec2 coord = v_Texcoord; vec4 sum = vec4(0.0); float weightAll = 0.0; vec3 cN = centerNTexel.rgb * 2.0 - 1.0; float cD = getLinearDepth(v_Texcoord); for (int i = 0; i < 9; i++) { vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0)); float w = gaussianKernel[i] * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0); float d = getLinearDepth(coord); w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0)); weightAll += w; sum += decodeHDR(texture2D(texture, coord)) * w; } #ifdef BLEND float aoFactor = 1.0; #ifdef SSAOTEX_ENABLED aoFactor = texture2D(ssaoTex, v_Texcoord).r; #endif gl_FragColor = encodeHDR( sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord)) ); #else gl_FragColor = encodeHDR(sum / weightAll); #endif } @end`},function(ee,G,_){"use strict";G.a=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925]},function(ee,G,_){"use strict";var F=_(5),w=_(6),x=_(7),y=_(10),b=_(17),E=_(14),g=_(54),m=_(168);x.a.import(m.a);function C(A,T,O,P,L){var c=A.gl;T.setUniform(c,"1i",O,L),c.activeTexture(c.TEXTURE0+L),P.isRenderable()?P.bind(A):P.unbind(A)}function d(A,T,O,P,L){var c,f,D,R,k=A.gl;return function(W,z,Z){if(!(R&&R.material===W.material)){var Q=W.material,te=W.__program,$=Q.get("roughness");$==null&&($=1);var ie=Q.get("normalMap")||T,ae=Q.get("roughnessMap"),re=Q.get("bumpMap"),ce=Q.get("uvRepeat"),oe=Q.get("uvOffset"),he=Q.get("detailUvRepeat"),se=Q.get("detailUvOffset"),pe=!!re&&Q.isTextureEnabled("bumpMap"),me=!!ae&&Q.isTextureEnabled("roughnessMap"),ge=Q.isDefined("fragment","DOUBLE_SIDED");re=re||O,ae=ae||P,Z!==z?(z.set("normalMap",ie),z.set("bumpMap",re),z.set("roughnessMap",ae),z.set("useBumpMap",pe),z.set("useRoughnessMap",me),z.set("doubleSide",ge),ce!=null&&z.set("uvRepeat",ce),oe!=null&&z.set("uvOffset",oe),he!=null&&z.set("detailUvRepeat",he),se!=null&&z.set("detailUvOffset",se),z.set("roughness",$)):(te.setUniform(k,"1f","roughness",$),c!==ie&&C(A,te,"normalMap",ie,0),f!==re&&re&&C(A,te,"bumpMap",re,1),D!==ae&&ae&&C(A,te,"roughnessMap",ae,2),ce!=null&&te.setUniform(k,"2f","uvRepeat",ce),oe!=null&&te.setUniform(k,"2f","uvOffset",oe),he!=null&&te.setUniform(k,"2f","detailUvRepeat",he),se!=null&&te.setUniform(k,"2f","detailUvOffset",se),te.setUniform(k,"1i","useBumpMap",+pe),te.setUniform(k,"1i","useRoughnessMap",+me),te.setUniform(k,"1i","doubleSide",+ge)),c=ie,f=re,D=ae,R=W}}}function v(A){A=A||{},this._depthTex=new F.a({format:w.a.DEPTH_COMPONENT,type:w.a.UNSIGNED_INT}),this._normalTex=new F.a({type:w.a.HALF_FLOAT}),this._framebuffer=new y.a,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,y.a.DEPTH_ATTACHMENT),this._normalMaterial=new b.a({shader:new x.a(x.a.source("ecgl.normal.vertex"),x.a.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=g.a.createBlank("#000"),this._defaultBumpMap=g.a.createBlank("#000"),this._defaultRoughessMap=g.a.createBlank("#000"),this._debugPass=new E.a({fragment:x.a.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}v.prototype.getDepthTexture=function(){return this._depthTex},v.prototype.getNormalTexture=function(){return this._normalTex},v.prototype.update=function(A,T,O){var P=A.getWidth(),L=A.getHeight(),c=this._depthTex,f=this._normalTex,D=this._normalMaterial;c.width=P,c.height=L,f.width=P,f.height=L;var R=T.opaqueList;this._framebuffer.bind(A),A.gl.clearColor(0,0,0,0),A.gl.clear(A.gl.COLOR_BUFFER_BIT|A.gl.DEPTH_BUFFER_BIT),A.gl.disable(A.gl.BLEND),A.renderPass(R,O,{getMaterial:function(){return D},ifRender:function(k){return k.renderNormal},beforeRender:d(A,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:A.opaqueSortCompare}),this._framebuffer.unbind(A)},v.prototype.renderDebug=function(A){this._debugPass.render(A)},v.prototype.dispose=function(A){this._depthTex.dispose(A),this._normalTex.dispose(A)},G.a=v},function(ee,G,_){"use strict";G.a=`@export ecgl.normal.vertex @import ecgl.common.transformUniforms @import ecgl.common.uv.header @import ecgl.common.attributes varying vec3 v_Normal; varying vec3 v_WorldPosition; @import ecgl.common.normalMap.vertexHeader @import ecgl.common.vertexAnimation.header void main() { @import ecgl.common.vertexAnimation.main @import ecgl.common.uv.main v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz); v_WorldPosition = (world * vec4(pos, 1.0)).xyz; @import ecgl.common.normalMap.vertexMain gl_Position = worldViewProjection * vec4(pos, 1.0); } @end @export ecgl.normal.fragment #define ROUGHNESS_CHANEL 0 uniform bool useBumpMap; uniform bool useRoughnessMap; uniform bool doubleSide; uniform float roughness; @import ecgl.common.uv.fragmentHeader varying vec3 v_Normal; varying vec3 v_WorldPosition; uniform mat4 viewInverse : VIEWINVERSE; @import ecgl.common.normalMap.fragmentHeader @import ecgl.common.bumpMap.header uniform sampler2D roughnessMap; void main() { vec3 N = v_Normal; bool flipNormal = false; if (doubleSide) { vec3 eyePos = viewInverse[3].xyz; vec3 V = normalize(eyePos - v_WorldPosition); if (dot(N, V) < 0.0) { flipNormal = true; } } @import ecgl.common.normalMap.fragmentMain if (useBumpMap) { N = bumpNormal(v_WorldPosition, v_Normal, N); } float g = 1.0 - roughness; if (useRoughnessMap) { float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL]; g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0); } if (flipNormal) { N = -N; } gl_FragColor.rgb = (N.xyz + 1.0) * 0.5; gl_FragColor.a = g; } @end`},function(ee,G,_){"use strict";var F=_(9),w=_(4),x=_(5),y=_(6),b=_(14),E=_(7),g=_(10);function m(C){C=C||{},this._edgePass=new b.a({fragment:E.a.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",C.normalTexture),this._edgePass.setUniform("depthTexture",C.depthTexture),this._targetTexture=new x.a({type:y.a.HALF_FLOAT}),this._frameBuffer=new g.a,this._frameBuffer.attach(this._targetTexture)}m.prototype.update=function(C,d,v,A){var T=C.getWidth(),O=C.getHeight(),P=this._targetTexture;P.width=T,P.height=O;var L=this._frameBuffer;L.bind(C),this._edgePass.setUniform("projectionInv",d.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[T,O]),this._edgePass.setUniform("texture",v),this._edgePass.render(C),L.unbind(C)},m.prototype.getTargetTexture=function(){return this._targetTexture},m.prototype.setParameter=function(C,d){this._edgePass.setUniform(C,d)},m.prototype.dispose=function(C){this._targetTexture.dispose(C),this._frameBuffer.dispose(C)},G.a=m},function(ee,G,_){"use strict";G.a={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]}},function(ee,G,_){"use strict";G.a=`@export clay.compositor.kernel.gaussian_9 float gaussianKernel[9]; gaussianKernel[0] = 0.07; gaussianKernel[1] = 0.09; gaussianKernel[2] = 0.12; gaussianKernel[3] = 0.14; gaussianKernel[4] = 0.16; gaussianKernel[5] = 0.14; gaussianKernel[6] = 0.12; gaussianKernel[7] = 0.09; gaussianKernel[8] = 0.07; @end @export clay.compositor.kernel.gaussian_13 float gaussianKernel[13]; gaussianKernel[0] = 0.02; gaussianKernel[1] = 0.03; gaussianKernel[2] = 0.06; gaussianKernel[3] = 0.08; gaussianKernel[4] = 0.11; gaussianKernel[5] = 0.13; gaussianKernel[6] = 0.14; gaussianKernel[7] = 0.13; gaussianKernel[8] = 0.11; gaussianKernel[9] = 0.08; gaussianKernel[10] = 0.06; gaussianKernel[11] = 0.03; gaussianKernel[12] = 0.02; @end @export clay.compositor.gaussian_blur #define SHADER_NAME gaussian_blur uniform sampler2D texture;varying vec2 v_Texcoord; uniform float blurSize : 2.0; uniform vec2 textureSize : [512.0, 512.0]; uniform float blurDir : 0.0; @import clay.util.rgbm @import clay.util.clamp_sample void main (void) { @import clay.compositor.kernel.gaussian_9 vec2 off = blurSize / textureSize; off *= vec2(1.0 - blurDir, blurDir); vec4 sum = vec4(0.0); float weightAll = 0.0; for (int i = 0; i < 9; i++) { float w = gaussianKernel[i]; vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off)); sum += texel * w; weightAll += w; } gl_FragColor = encodeHDR(sum / max(weightAll, 0.01)); } @end `},function(ee,G,_){"use strict";G.a=` @export clay.compositor.lut varying vec2 v_Texcoord; uniform sampler2D texture; uniform sampler2D lookup; void main() { vec4 tex = texture2D(texture, v_Texcoord); float blueColor = tex.b * 63.0; vec2 quad1; quad1.y = floor(floor(blueColor) / 8.0); quad1.x = floor(blueColor) - (quad1.y * 8.0); vec2 quad2; quad2.y = floor(ceil(blueColor) / 8.0); quad2.x = ceil(blueColor) - (quad2.y * 8.0); vec2 texPos1; texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r); texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g); vec2 texPos2; texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r); texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g); vec4 newColor1 = texture2D(lookup, texPos1); vec4 newColor2 = texture2D(lookup, texPos2); vec4 newColor = mix(newColor1, newColor2, fract(blueColor)); gl_FragColor = vec4(newColor.rgb, tex.w); } @end`},function(ee,G,_){"use strict";G.a=`@export clay.compositor.output #define OUTPUT_ALPHA varying vec2 v_Texcoord; uniform sampler2D texture; @import clay.util.rgbm void main() { vec4 tex = decodeHDR(texture2D(texture, v_Texcoord)); gl_FragColor.rgb = tex.rgb; #ifdef OUTPUT_ALPHA gl_FragColor.a = tex.a; #else gl_FragColor.a = 1.0; #endif gl_FragColor = encodeHDR(gl_FragColor); #ifdef PREMULTIPLY_ALPHA gl_FragColor.rgb *= gl_FragColor.a; #endif } @end`},function(ee,G,_){"use strict";G.a=`@export clay.compositor.bright uniform sampler2D texture; uniform float threshold : 1; uniform float scale : 1.0; uniform vec2 textureSize: [512, 512]; varying vec2 v_Texcoord; const vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721); @import clay.util.rgbm vec4 median(vec4 a, vec4 b, vec4 c) { return a + b + c - min(min(a, b), c) - max(max(a, b), c); } void main() { vec4 texel = decodeHDR(texture2D(texture, v_Texcoord)); #ifdef ANTI_FLICKER vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0); vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz)); vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz)); vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy)); vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy)); texel = median(median(texel, s1, s2), s3, s4); #endif float lum = dot(texel.rgb , lumWeight); vec4 color; if (lum > threshold && texel.a > 0.0) { color = vec4(texel.rgb * scale, texel.a * scale); } else { color = vec4(0.0); } gl_FragColor = encodeHDR(color); } @end `},function(ee,G,_){"use strict";G.a=`@export clay.compositor.downsample uniform sampler2D texture; uniform vec2 textureSize : [512, 512]; varying vec2 v_Texcoord; @import clay.util.rgbm float brightness(vec3 c) { return max(max(c.r, c.g), c.b); } @import clay.util.clamp_sample void main() { vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy; #ifdef ANTI_FLICKER vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb; vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb; vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb; vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb; float s1w = 1.0 / (brightness(s1) + 1.0); float s2w = 1.0 / (brightness(s2) + 1.0); float s3w = 1.0 / (brightness(s3) + 1.0); float s4w = 1.0 / (brightness(s4) + 1.0); float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w); vec4 color = vec4( (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum, 1.0 ); #else vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy)); color += decodeHDR(clampSample(texture, v_Texcoord + d.zy)); color += decodeHDR(clampSample(texture, v_Texcoord + d.xw)); color += decodeHDR(clampSample(texture, v_Texcoord + d.zw)); color *= 0.25; #endif gl_FragColor = encodeHDR(color); } @end`},function(ee,G,_){"use strict";G.a=` @export clay.compositor.upsample #define HIGH_QUALITY uniform sampler2D texture; uniform vec2 textureSize : [512, 512]; uniform float sampleScale: 0.5; varying vec2 v_Texcoord; @import clay.util.rgbm @import clay.util.clamp_sample void main() { #ifdef HIGH_QUALITY vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale; vec4 s; s = decodeHDR(clampSample(texture, v_Texcoord - d.xy)); s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0; s += decodeHDR(clampSample(texture, v_Texcoord - d.zy)); s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0; s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0; s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0; s += decodeHDR(clampSample(texture, v_Texcoord + d.zy)); s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0; s += decodeHDR(clampSample(texture, v_Texcoord + d.xy)); gl_FragColor = encodeHDR(s / 16.0); #else vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy; vec4 s; s = decodeHDR(clampSample(texture, v_Texcoord + d.xy)); s += decodeHDR(clampSample(texture, v_Texcoord + d.zy)); s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)); s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)); gl_FragColor = encodeHDR(s / 4.0); #endif } @end`},function(ee,G,_){"use strict";G.a=`@export clay.compositor.hdr.composite uniform sampler2D texture; #ifdef BLOOM_ENABLED uniform sampler2D bloom; #endif #ifdef LENSFLARE_ENABLED uniform sampler2D lensflare; uniform sampler2D lensdirt; #endif #ifdef LUM_ENABLED uniform sampler2D lum; #endif #ifdef LUT_ENABLED uniform sampler2D lut; #endif #ifdef COLOR_CORRECTION uniform float brightness : 0.0; uniform float contrast : 1.0; uniform float saturation : 1.0; #endif #ifdef VIGNETTE uniform float vignetteDarkness: 1.0; uniform float vignetteOffset: 1.0; #endif uniform float exposure : 1.0; uniform float bloomIntensity : 0.25; uniform float lensflareIntensity : 1; varying vec2 v_Texcoord; @import clay.util.srgb vec3 ACESToneMapping(vec3 color) { const float A = 2.51; const float B = 0.03; const float C = 2.43; const float D = 0.59; const float E = 0.14; return (color * (A * color + B)) / (color * (C * color + D) + E); } float eyeAdaption(float fLum) { return mix(0.2, fLum, 0.5); } #ifdef LUT_ENABLED vec3 lutTransform(vec3 color) { float blueColor = color.b * 63.0; vec2 quad1; quad1.y = floor(floor(blueColor) / 8.0); quad1.x = floor(blueColor) - (quad1.y * 8.0); vec2 quad2; quad2.y = floor(ceil(blueColor) / 8.0); quad2.x = ceil(blueColor) - (quad2.y * 8.0); vec2 texPos1; texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r); texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g); vec2 texPos2; texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r); texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g); vec4 newColor1 = texture2D(lut, texPos1); vec4 newColor2 = texture2D(lut, texPos2); vec4 newColor = mix(newColor1, newColor2, fract(blueColor)); return newColor.rgb; } #endif @import clay.util.rgbm void main() { vec4 texel = vec4(0.0); vec4 originalTexel = vec4(0.0); #ifdef TEXTURE_ENABLED texel = decodeHDR(texture2D(texture, v_Texcoord)); originalTexel = texel; #endif #ifdef BLOOM_ENABLED vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord)); texel.rgb += bloomTexel.rgb * bloomIntensity; texel.a += bloomTexel.a * bloomIntensity; #endif #ifdef LENSFLARE_ENABLED texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity; #endif texel.a = min(texel.a, 1.0); #ifdef LUM_ENABLED float fLum = texture2D(lum, vec2(0.5, 0.5)).r; float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum))); float exposureBias = adaptedLumDest * exposure; #else float exposureBias = exposure; #endif texel.rgb *= exposureBias; texel.rgb = ACESToneMapping(texel.rgb); texel = linearTosRGB(texel); #ifdef LUT_ENABLED texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0))); #endif #ifdef COLOR_CORRECTION texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0); texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0); float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721)); texel.rgb = mix(vec3(lum), texel.rgb, saturation); #endif #ifdef VIGNETTE vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset); texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv)); #endif gl_FragColor = encodeHDR(texel); #ifdef DEBUG #if DEBUG == 1 gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord))); #elif DEBUG == 2 gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity); #elif DEBUG == 3 gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity)); #endif #endif if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) { gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721)); } #ifdef PREMULTIPLY_ALPHA gl_FragColor.rgb *= gl_FragColor.a; #endif } @end`},function(ee,G,_){"use strict";G.a=`@export clay.compositor.blend #define SHADER_NAME blend #ifdef TEXTURE1_ENABLED uniform sampler2D texture1; uniform float weight1 : 1.0; #endif #ifdef TEXTURE2_ENABLED uniform sampler2D texture2; uniform float weight2 : 1.0; #endif #ifdef TEXTURE3_ENABLED uniform sampler2D texture3; uniform float weight3 : 1.0; #endif #ifdef TEXTURE4_ENABLED uniform sampler2D texture4; uniform float weight4 : 1.0; #endif #ifdef TEXTURE5_ENABLED uniform sampler2D texture5; uniform float weight5 : 1.0; #endif #ifdef TEXTURE6_ENABLED uniform sampler2D texture6; uniform float weight6 : 1.0; #endif varying vec2 v_Texcoord; @import clay.util.rgbm void main() { vec4 tex = vec4(0.0); #ifdef TEXTURE1_ENABLED tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1; #endif #ifdef TEXTURE2_ENABLED tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2; #endif #ifdef TEXTURE3_ENABLED tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3; #endif #ifdef TEXTURE4_ENABLED tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4; #endif #ifdef TEXTURE5_ENABLED tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5; #endif #ifdef TEXTURE6_ENABLED tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6; #endif gl_FragColor = encodeHDR(tex); } @end`},function(ee,G,_){"use strict";G.a=`@export clay.compositor.fxaa uniform sampler2D texture; uniform vec4 viewport : VIEWPORT; varying vec2 v_Texcoord; #define FXAA_REDUCE_MIN (1.0/128.0) #define FXAA_REDUCE_MUL (1.0/8.0) #define FXAA_SPAN_MAX 8.0 @import clay.util.rgbm void main() { vec2 resolution = 1.0 / viewport.zw; vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz; vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz; vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz; vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz; vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) ); vec3 rgbM = rgbaM.xyz; float opacity = rgbaM.w; vec3 luma = vec3( 0.299, 0.587, 0.114 ); float lumaNW = dot( rgbNW, luma ); float lumaNE = dot( rgbNE, luma ); float lumaSW = dot( rgbSW, luma ); float lumaSE = dot( rgbSE, luma ); float lumaM = dot( rgbM, luma ); float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) ); float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) ); vec2 dir; dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN ); float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce ); dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX), max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), dir * rcpDirMin)) * resolution; vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz; rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz; rgbA *= 0.5; vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz; rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz; rgbB *= 0.25; rgbB += rgbA * 0.5; float lumaB = dot( rgbB, luma ); if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) ) { gl_FragColor = vec4( rgbA, opacity ); } else { gl_FragColor = vec4( rgbB, opacity ); } } @end`},function(ee,G,_){"use strict";G.a=`@export ecgl.dof.coc uniform sampler2D depth; uniform float zNear: 0.1; uniform float zFar: 2000; uniform float focalDistance: 3; uniform float focalRange: 1; uniform float focalLength: 30; uniform float fstop: 2.8; varying vec2 v_Texcoord; @import clay.util.encode_float void main() { float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0; float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear)); float aperture = focalLength / fstop; float coc; float uppper = focalDistance + focalRange; float lower = focalDistance - focalRange; if (dist <= uppper && dist >= lower) { coc = 0.5; } else { float focalAdjusted = dist > uppper ? uppper : lower; coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength))); coc = clamp(coc, 0.0, 2.0) / 2.00001; if (dist < lower) { coc = -coc; } coc = coc * 0.5 + 0.5; } gl_FragColor = encodeFloat(coc); } @end @export ecgl.dof.composite #define DEBUG 0 uniform sampler2D original; uniform sampler2D blurred; uniform sampler2D nearfield; uniform sampler2D coc; uniform sampler2D nearcoc; varying vec2 v_Texcoord; @import clay.util.rgbm @import clay.util.float void main() { vec4 blurredColor = decodeHDR(texture2D(blurred, v_Texcoord)); vec4 originalColor = decodeHDR(texture2D(original, v_Texcoord)); float fCoc = decodeFloat(texture2D(coc, v_Texcoord)); fCoc = abs(fCoc * 2.0 - 1.0); float weight = smoothstep(0.0, 1.0, fCoc); #ifdef NEARFIELD_ENABLED vec4 nearfieldColor = decodeHDR(texture2D(nearfield, v_Texcoord)); float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord)); fNearCoc = abs(fNearCoc * 2.0 - 1.0); gl_FragColor = encodeHDR( mix( nearfieldColor, mix(originalColor, blurredColor, weight), pow(1.0 - fNearCoc, 4.0) ) ); #else gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight)); #endif } @end @export ecgl.dof.diskBlur #define POISSON_KERNEL_SIZE 16; uniform sampler2D texture; uniform sampler2D coc; varying vec2 v_Texcoord; uniform float blurRadius : 10.0; uniform vec2 textureSize : [512.0, 512.0]; uniform vec2 poissonKernel[POISSON_KERNEL_SIZE]; uniform float percent; float nrand(const in vec2 n) { return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453); } @import clay.util.rgbm @import clay.util.float void main() { vec2 offset = blurRadius / textureSize; float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent ); float cosa = cos(rnd); float sina = sin(rnd); vec4 basis = vec4(cosa, -sina, sina, cosa); #if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC) offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0); #endif #ifdef BLUR_COC float cocSum = 0.0; #else vec4 color = vec4(0.0); #endif float weightSum = 0.0; for (int i = 0; i < POISSON_KERNEL_SIZE; i++) { vec2 ofs = poissonKernel[i]; ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw)); vec2 uv = v_Texcoord + ofs * offset; vec4 texel = texture2D(texture, uv); float w = 1.0; #ifdef BLUR_COC float fCoc = decodeFloat(texel) * 2.0 - 1.0; cocSum += clamp(fCoc, -1.0, 0.0) * w; #else texel = decodeHDR(texel); #if !defined(BLUR_NEARFIELD) float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0; w *= abs(fCoc); #endif color += texel * w; #endif weightSum += w; } #ifdef BLUR_COC gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5); #else color /= weightSum; gl_FragColor = encodeHDR(color); #endif } @end`},function(ee,G,_){"use strict";G.a=`@export ecgl.edge uniform sampler2D texture; uniform sampler2D normalTexture; uniform sampler2D depthTexture; uniform mat4 projectionInv; uniform vec2 textureSize; uniform vec4 edgeColor: [0,0,0,0.8]; varying vec2 v_Texcoord; vec3 packColor(vec2 coord) { float z = texture2D(depthTexture, coord).r * 2.0 - 1.0; vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0); vec4 p4 = projectionInv * p; return vec3( texture2D(normalTexture, coord).rg, -p4.z / p4.w / 5.0 ); } void main() { vec2 cc = v_Texcoord; vec3 center = packColor(cc); float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5; float dx = size / textureSize.x; float dy = size / textureSize.y; vec2 coord; vec3 topLeft = packColor(cc+vec2(-dx, -dy)); vec3 top = packColor(cc+vec2(0.0, -dy)); vec3 topRight = packColor(cc+vec2(dx, -dy)); vec3 left = packColor(cc+vec2(-dx, 0.0)); vec3 right = packColor(cc+vec2(dx, 0.0)); vec3 bottomLeft = packColor(cc+vec2(-dx, dy)); vec3 bottom = packColor(cc+vec2(0.0, dy)); vec3 bottomRight = packColor(cc+vec2(dx, dy)); vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight; vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight; float edge = sqrt(dot(h, h) + dot(v, v)); edge = smoothstep(0.8, 1.0, edge); gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge); } @end`},function(ee,G,_){"use strict";var F=_(43),w=_(14),x=_(10),y=_(5),b=_(7),E=_(9);function g(m){for(var C=[],d=0;d<30;d++)C.push([Object(F.a)(d,2),Object(F.a)(d,3)]);this._haltonSequence=C,this._frame=0,this._sourceTex=new y.a,this._sourceFb=new x.a,this._sourceFb.attach(this._sourceTex),this._prevFrameTex=new y.a,this._outputTex=new y.a;var v=this._blendPass=new w.a({fragment:b.a.source("clay.compositor.blend")});v.material.disableTexturesAll(),v.material.enableTexture(["texture1","texture2"]),this._blendFb=new x.a({depthBuffer:!1}),this._outputPass=new w.a({fragment:b.a.source("clay.compositor.output"),blendWithPrevious:!0}),this._outputPass.material.define("fragment","OUTPUT_ALPHA"),this._outputPass.material.blend=function(A){A.blendEquationSeparate(A.FUNC_ADD,A.FUNC_ADD),A.blendFuncSeparate(A.ONE,A.ONE_MINUS_SRC_ALPHA,A.ONE,A.ONE_MINUS_SRC_ALPHA)}}g.prototype={constructor:g,jitterProjection:function(m,C){var d=m.viewport,v=d.devicePixelRatio||m.getDevicePixelRatio(),A=d.width*v,T=d.height*v,O=this._haltonSequence[this._frame%this._haltonSequence.length],P=new E.a;P.array[12]=(O[0]*2-1)/A,P.array[13]=(O[1]*2-1)/T,E.a.mul(C.projectionMatrix,P,C.projectionMatrix),E.a.invert(C.invProjectionMatrix,C.projectionMatrix)},resetFrame:function(){this._frame=0},getFrame:function(){return this._frame},getSourceFrameBuffer:function(){return this._sourceFb},getOutputTexture:function(){return this._outputTex},resize:function(m,C){this._prevFrameTex.width=m,this._prevFrameTex.height=C,this._outputTex.width=m,this._outputTex.height=C,this._sourceTex.width=m,this._sourceTex.height=C,this._prevFrameTex.dirty(),this._outputTex.dirty(),this._sourceTex.dirty()},isFinished:function(){return this._frame>=this._haltonSequence.length},render:function(m,C,d){var v=this._blendPass;this._frame===0?(v.setUniform("weight1",0),v.setUniform("weight2",1)):(v.setUniform("weight1",.9),v.setUniform("weight2",.1)),v.setUniform("texture1",this._prevFrameTex),v.setUniform("texture2",C||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(m),v.render(m),this._blendFb.unbind(m),d||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(m));var A=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=A,this._frame++},dispose:function(m){this._sourceFb.dispose(m),this._blendFb.dispose(m),this._prevFrameTex.dispose(m),this._outputTex.dispose(m),this._sourceTex.dispose(m),this._outputPass.dispose(m),this._blendPass.dispose(m)}},G.a=g},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(184),y=_(185),b=_(82);w.a.registerAction({type:"geo3DChangeCamera",event:"geo3dcamerachanged",update:"series:updateCamera"},function(E,g){g.eachComponent({mainType:"geo3D",query:E},function(m){m.setView(E)})})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(38),y=_(31),b=_(32),E=_(26),g=_(80),m=w.a.extendComponentModel({type:"geo3D",layoutMode:"box",coordinateSystem:null,optionUpdated:function(){var d=this.option;d.regions=this.getFilledRegions(d.regions,d.map);var v=w.a.helper.completeDimensions(["value"],d.data,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),A=new w.a.List(v,this);A.initData(d.regions);var T={};A.each(function(O){var P=A.getName(O),L=A.getItemModel(O);T[P]=L}),this._regionModelMap=T,this._data=A},getData:function(){return this._data},getRegionModel:function(d){var v=this.getData().getName(d);return this._regionModelMap[v]||new w.a.Model(null,this)},getRegionPolygonCoords:function(d){var v=this.getData().getName(d),A=this.coordinateSystem.getRegion(v);return A?A.geometries:[]},getFormattedLabel:function(d,v){var A=this._data.getName(d),T=this.getRegionModel(A),O=T.get(v==="normal"?["label","formatter"]:["emphasis","label","formatter"]);O==null&&(O=T.get(["label","formatter"]));var P={name:A};if(typeof O=="function")return P.status=v,O(P);if(typeof O=="string"){var L=P.seriesName;return O.replace("{a}",L!=null?L:"")}else return A},defaultOption:{regions:[]}});w.a.util.merge(m.prototype,g.a),w.a.util.merge(m.prototype,x.a),w.a.util.merge(m.prototype,y.a),w.a.util.merge(m.prototype,b.a),w.a.util.merge(m.prototype,E.a);var C=m},function(ee,G,_){"use strict";var F=_(59),w=_(0),x=_.n(w),y=_(2),b=_(39),E=_(34),g=x.a.extendComponentView({type:"geo3D",__ecgl__:!0,init:function(m,C){this._geo3DBuilder=new F.a(C),this.groupGL=new y.a.Node,this._lightRoot=new y.a.Node,this._sceneHelper=new E.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot),this._control=new b.a({zr:C.getZr()}),this._control.init()},render:function(m,C,d){this.groupGL.add(this._geo3DBuilder.rootNode);var v=m.coordinateSystem;if(!(!v||!v.viewGL)){v.viewGL.add(this._lightRoot),m.get("show")?v.viewGL.add(this.groupGL):v.viewGL.remove(this.groupGL);var A=this._control;A.setViewGL(v.viewGL);var T=m.getModel("viewControl");A.setFromViewControlModel(T,0),this._sceneHelper.setScene(v.viewGL.scene),this._sceneHelper.updateLight(m),v.viewGL.setPostEffect(m.getModel("postEffect"),d),v.viewGL.setTemporalSuperSampling(m.getModel("temporalSuperSampling")),this._geo3DBuilder.update(m,C,d,0,m.getData().count());var O=v.viewGL.isLinearSpace()?"define":"undefine";this._geo3DBuilder.rootNode.traverse(function(P){P.material&&P.material[O]("fragment","SRGB_DECODE")}),A.off("update"),A.on("update",function(){d.dispatchAction({type:"geo3DChangeCamera",alpha:A.getAlpha(),beta:A.getBeta(),distance:A.getDistance(),center:A.getCenter(),from:this.uid,geo3DId:m.id})})}},afterRender:function(m,C,d,v){var A=v.renderer;this._sceneHelper.updateAmbientCubemap(A,m,d),this._sceneHelper.updateSkybox(A,m,d)},dispose:function(){this._control.dispose()}})},function(ee,G,_){"use strict";G.a=F;function F(re,ce,oe){oe=oe||2;var he=ce&&ce.length,se=he?ce[0]*oe:re.length,pe=w(re,0,se,oe,!0),me=[];if(!pe)return me;var ge,Ee,Ae,Fe,Ue,nt,rt;if(he&&(pe=C(re,ce,pe,oe)),re.length>80*oe){ge=Ae=re[0],Ee=Fe=re[1];for(var qe=oe;qeAe&&(Ae=Ue),nt>Fe&&(Fe=nt);rt=Math.max(Ae-ge,Fe-Ee)}return y(pe,me,oe,ge,Ee,rt),me}function w(re,ce,oe,he,se){var pe,me;if(se===ae(re,ce,oe,he)>0)for(pe=ce;pe=ce;pe-=he)me=te(pe,re[pe],re[pe+1],me);return me&&R(me,me.next)&&($(me),me=me.next),me}function x(re,ce){if(!re)return re;ce||(ce=re);var oe=re,he;do if(he=!1,!oe.steiner&&(R(oe,oe.next)||D(oe.prev,oe,oe.next)===0)){if($(oe),oe=ce=oe.prev,oe===oe.next)return null;he=!0}else oe=oe.next;while(he||oe!==ce);return ce}function y(re,ce,oe,he,se,pe,me){if(re){!me&&pe&&T(re,he,se,pe);for(var ge=re,Ee,Ae;re.prev!==re.next;){if(Ee=re.prev,Ae=re.next,pe?E(re,he,se,pe):b(re)){ce.push(Ee.i/oe),ce.push(re.i/oe),ce.push(Ae.i/oe),$(re),re=Ae.next,ge=Ae.next;continue}if(re=Ae,re===ge){me?me===1?(re=g(re,ce,oe),y(re,ce,oe,he,se,pe,2)):me===2&&m(re,ce,oe,he,se,pe):y(x(re),ce,oe,he,se,pe,1);break}}}}function b(re){var ce=re.prev,oe=re,he=re.next;if(D(ce,oe,he)>=0)return!1;for(var se=re.next.next;se!==re.prev;){if(c(ce.x,ce.y,oe.x,oe.y,he.x,he.y,se.x,se.y)&&D(se.prev,se,se.next)>=0)return!1;se=se.next}return!0}function E(re,ce,oe,he){var se=re.prev,pe=re,me=re.next;if(D(se,pe,me)>=0)return!1;for(var ge=se.xpe.x?se.x>me.x?se.x:me.x:pe.x>me.x?pe.x:me.x,Fe=se.y>pe.y?se.y>me.y?se.y:me.y:pe.y>me.y?pe.y:me.y,Ue=P(ge,Ee,ce,oe,he),nt=P(Ae,Fe,ce,oe,he),rt=re.nextZ;rt&&rt.z<=nt;){if(rt!==re.prev&&rt!==re.next&&c(se.x,se.y,pe.x,pe.y,me.x,me.y,rt.x,rt.y)&&D(rt.prev,rt,rt.next)>=0)return!1;rt=rt.nextZ}for(rt=re.prevZ;rt&&rt.z>=Ue;){if(rt!==re.prev&&rt!==re.next&&c(se.x,se.y,pe.x,pe.y,me.x,me.y,rt.x,rt.y)&&D(rt.prev,rt,rt.next)>=0)return!1;rt=rt.prevZ}return!0}function g(re,ce,oe){var he=re;do{var se=he.prev,pe=he.next.next;!R(se,pe)&&k(se,he,he.next,pe)&&z(se,pe)&&z(pe,se)&&(ce.push(se.i/oe),ce.push(he.i/oe),ce.push(pe.i/oe),$(he),$(he.next),he=re=pe),he=he.next}while(he!==re);return he}function m(re,ce,oe,he,se,pe){var me=re;do{for(var ge=me.next.next;ge!==me.prev;){if(me.i!==ge.i&&f(me,ge)){var Ee=Q(me,ge);me=x(me,me.next),Ee=x(Ee,Ee.next),y(me,ce,oe,he,se,pe),y(Ee,ce,oe,he,se,pe);return}ge=ge.next}me=me.next}while(me!==re)}function C(re,ce,oe,he){var se=[],pe,me,ge,Ee,Ae;for(pe=0,me=ce.length;pe=oe.next.y&&oe.next.y!==oe.y){var ge=oe.x+(se-oe.y)*(oe.next.x-oe.x)/(oe.next.y-oe.y);if(ge<=he&&ge>pe){if(pe=ge,ge===he){if(se===oe.y)return oe;if(se===oe.next.y)return oe.next}me=oe.x=oe.x&&oe.x>=Ae&&he!==oe.x&&c(seme.x)&&z(oe,re)&&(me=oe,Ue=nt)),oe=oe.next;return me}function T(re,ce,oe,he){var se=re;do se.z===null&&(se.z=P(se.x,se.y,ce,oe,he)),se.prevZ=se.prev,se.nextZ=se.next,se=se.next;while(se!==re);se.prevZ.nextZ=null,se.prevZ=null,O(se)}function O(re){var ce,oe,he,se,pe,me,ge,Ee,Ae=1;do{for(oe=re,re=null,pe=null,me=0;oe;){for(me++,he=oe,ge=0,ce=0;ce0||Ee>0&&he;)ge!==0&&(Ee===0||!he||oe.z<=he.z)?(se=oe,oe=oe.nextZ,ge--):(se=he,he=he.nextZ,Ee--),pe?pe.nextZ=se:re=se,se.prevZ=pe,pe=se;oe=he}pe.nextZ=null,Ae*=2}while(me>1);return re}function P(re,ce,oe,he,se){return re=32767*(re-oe)/se,ce=32767*(ce-he)/se,re=(re|re<<8)&16711935,re=(re|re<<4)&252645135,re=(re|re<<2)&858993459,re=(re|re<<1)&1431655765,ce=(ce|ce<<8)&16711935,ce=(ce|ce<<4)&252645135,ce=(ce|ce<<2)&858993459,ce=(ce|ce<<1)&1431655765,re|ce<<1}function L(re){var ce=re,oe=re;do ce.x=0&&(re-me)*(he-ge)-(oe-me)*(ce-ge)>=0&&(oe-me)*(pe-ge)-(se-me)*(he-ge)>=0}function f(re,ce){return re.next.i!==ce.i&&re.prev.i!==ce.i&&!W(re,ce)&&z(re,ce)&&z(ce,re)&&Z(re,ce)}function D(re,ce,oe){return(ce.y-re.y)*(oe.x-ce.x)-(ce.x-re.x)*(oe.y-ce.y)}function R(re,ce){return re.x===ce.x&&re.y===ce.y}function k(re,ce,oe,he){return R(re,ce)&&R(oe,he)||R(re,he)&&R(oe,ce)?!0:D(re,ce,oe)>0!=D(re,ce,he)>0&&D(oe,he,re)>0!=D(oe,he,ce)>0}function W(re,ce){var oe=re;do{if(oe.i!==re.i&&oe.next.i!==re.i&&oe.i!==ce.i&&oe.next.i!==ce.i&&k(oe,oe.next,re,ce))return!0;oe=oe.next}while(oe!==re);return!1}function z(re,ce){return D(re.prev,re,re.next)<0?D(re,ce,re.next)>=0&&D(re,re.prev,ce)>=0:D(re,ce,re.prev)<0||D(re,re.next,ce)<0}function Z(re,ce){var oe=re,he=!1,se=(re.x+ce.x)/2,pe=(re.y+ce.y)/2;do oe.y>pe!=oe.next.y>pe&&oe.next.y!==oe.y&&se<(oe.next.x-oe.x)*(pe-oe.y)/(oe.next.y-oe.y)+oe.x&&(he=!he),oe=oe.next;while(oe!==re);return he}function Q(re,ce){var oe=new ie(re.i,re.x,re.y),he=new ie(ce.i,ce.x,ce.y),se=re.next,pe=ce.prev;return re.next=ce,ce.prev=re,oe.next=se,se.prev=oe,he.next=oe,oe.prev=he,pe.next=he,he.prev=pe,he}function te(re,ce,oe,he){var se=new ie(re,ce,oe);return he?(se.next=he.next,se.prev=he,he.next.prev=se,he.next=se):(se.prev=se,se.next=se),se}function $(re){re.next.prev=re.prev,re.prev.next=re.next,re.prevZ&&(re.prevZ.nextZ=re.nextZ),re.nextZ&&(re.nextZ.prevZ=re.prevZ)}function ie(re,ce,oe){this.i=re,this.x=ce,this.y=oe,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}F.deviation=function(re,ce,oe,he){var se=ce&&ce.length,pe=se?ce[0]*oe:re.length,me=Math.abs(ae(re,0,pe,oe));if(se)for(var ge=0,Ee=ce.length;ge0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var d=this.getDisplacementTexture(),v=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==d||this._displacementScale!==v,this._displacementTexture=d,this._displacementScale=v},isDisplacementChanged:function(){return this._displacementChanged}});w.a.util.merge(m.prototype,x.a),w.a.util.merge(m.prototype,y.a),w.a.util.merge(m.prototype,b.a),w.a.util.merge(m.prototype,E.a);var C=m},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(39),b=_(34),E=_(192),g=_(3),m=w.a.extendComponentView({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(C,d){this.groupGL=new x.a.Node,this._sphereGeometry=new x.a.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new x.a.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new x.a.PlaneGeometry,this._earthMesh=new x.a.Mesh({renderNormal:!0}),this._lightRoot=new x.a.Node,this._sceneHelper=new b.a,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._earthMesh),this._control=new y.a({zr:d.getZr()}),this._control.init(),this._layerMeshes={}},render:function(C,d,v){var A=C.coordinateSystem,T=C.get("shading");A.viewGL.add(this._lightRoot),C.get("show")?A.viewGL.add(this.groupGL):A.viewGL.remove(this.groupGL),this._sceneHelper.setScene(A.viewGL.scene),A.viewGL.setPostEffect(C.getModel("postEffect"),v),A.viewGL.setTemporalSuperSampling(C.getModel("temporalSuperSampling"));var O=this._earthMesh;O.geometry=this._sphereGeometry;var P="ecgl."+T;(!O.material||O.material.shader.name!==P)&&(O.material=x.a.createMaterial(P)),x.a.setMaterialFromModel(T,O.material,C,v),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach(function(D){var R=O.material.get(D);R&&(R.flipY=!1)}),O.material.set("color",x.a.parseColor(C.get("baseColor")));var L=A.radius*.99;O.scale.set(L,L,L);var c=O.material.setTextureImage("diffuseMap",C.get("baseTexture"),v,{flipY:!1,anisotropic:8});c&&c.surface&&c.surface.attachToMesh(O);var f=O.material.setTextureImage("bumpMap",C.get("heightTexture"),v,{flipY:!1,anisotropic:8});f&&f.surface&&f.surface.attachToMesh(O),O.material[C.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(C,v),this._displaceVertices(C,v),this._updateViewControl(C,v),this._updateLayers(C,v)},afterRender:function(C,d,v,A){var T=A.renderer;this._sceneHelper.updateAmbientCubemap(T,C,v),this._sceneHelper.updateSkybox(T,C,v)},_updateLayers:function(C,d){var v=C.coordinateSystem,A=C.get("layers"),T=v.radius,O=[],P=[],L=[],c=[];w.a.util.each(A,function(W){var z=new w.a.Model(W),Z=z.get("type"),Q=x.a.loadTexture(z.get("texture"),d,{flipY:!1,anisotropic:8});if(Q.surface&&Q.surface.attachToMesh(this._earthMesh),Z==="blend"){var te=z.get("blendTo"),$=g.a.firstNotNull(z.get("intensity"),1);te==="emission"?(L.push(Q),c.push($)):(O.push(Q),P.push($))}else{var ie=z.get("id"),ae=this._layerMeshes[ie];ae||(ae=this._layerMeshes[ie]=new x.a.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0}));var re=z.get("shading");re==="lambert"?(ae.material=ae.__lambertMaterial||new x.a.Material({autoUpdateTextureStatus:!1,shader:x.a.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),ae.__lambertMaterial=ae.material):(ae.material=ae.__colorMaterial||new x.a.Material({autoUpdateTextureStatus:!1,shader:x.a.createShader("ecgl.color"),transparent:!0,depthMask:!1}),ae.__colorMaterial=ae.material),ae.material.enableTexture("diffuseMap");var ce=z.get("distance"),oe=T+(ce==null?v.radius/100:ce);ae.scale.set(oe,oe,oe),T=oe;var he=this._blankTexture||(this._blankTexture=x.a.createBlankTexture("rgba(255, 255, 255, 0)"));ae.material.set("diffuseMap",he),x.a.loadTexture(z.get("texture"),d,{flipY:!1,anisotropic:8},function(se){se.surface&&se.surface.attachToMesh(ae),ae.material.set("diffuseMap",se),d.getZr().refresh()}),z.get("show")?this.groupGL.add(ae):this.groupGL.remove(ae)}},this);var f=this._earthMesh.material;f.define("fragment","LAYER_DIFFUSEMAP_COUNT",O.length),f.define("fragment","LAYER_EMISSIVEMAP_COUNT",L.length),f.set("layerDiffuseMap",O),f.set("layerDiffuseIntensity",P),f.set("layerEmissiveMap",L),f.set("layerEmissionIntensity",c);var D=C.getModel("debug.wireframe");if(D.get("show")){f.define("both","WIREFRAME_TRIANGLE");var R=x.a.parseColor(D.get("lineStyle.color")||"rgba(0,0,0,0.5)"),k=g.a.firstNotNull(D.get("lineStyle.width"),1);f.set("wireframeLineWidth",k),f.set("wireframeLineColor",R)}else f.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(C,d){var v=C.coordinateSystem,A=C.getModel("viewControl"),T=v.viewGL.camera,O=this;function P(){return{type:"globeChangeCamera",alpha:L.getAlpha(),beta:L.getBeta(),distance:L.getDistance()-v.radius,center:L.getCenter(),from:O.uid,globeId:C.id}}var L=this._control;L.setViewGL(v.viewGL);var c=A.get("targetCoord"),f,D;c!=null&&(D=c[0]+90,f=c[1]),L.setFromViewControlModel(A,{baseDistance:v.radius,alpha:f,beta:D}),L.off("update"),L.on("update",function(){d.dispatchAction(P())})},_displaceVertices:function(C,d){var v=C.get("displacementQuality"),A=C.get("debug.wireframe.show"),T=C.coordinateSystem;if(!(!C.isDisplacementChanged()&&v===this._displacementQuality&&A===this._showDebugWireframe)){this._displacementQuality=v,this._showDebugWireframe=A;var O=this._sphereGeometry,P={low:100,medium:200,high:400,ultra:800}[v]||200,L=P/2;(O.widthSegments!==P||A)&&(O.widthSegments=P,O.heightSegments=L,O.build()),this._doDisplaceVertices(O,T),A&&O.generateBarycentric()}},_doDisplaceVertices:function(C,d){var v=C.attributes.position.value,A=C.attributes.texcoord0.value,T=C.__originalPosition;(!T||T.length!==v.length)&&(T=new Float32Array(v.length),T.set(v),C.__originalPosition=T);for(var O=d.displacementWidth,P=d.displacementHeight,L=d.displacementData,c=0;c0&&d>0||C<0&&d<0)}function g(m,C){var d=m.getData(),v=m.get("barSize");if(v==null){var A=C.size,T,O,P=C.getAxis("x"),L=C.getAxis("y");P.type==="category"?T=P.getBandWidth()*.7:T=Math.round(A[0]/Math.sqrt(d.count()))*.6,L.type==="category"?O=L.getBandWidth()*.7:O=Math.round(A[1]/Math.sqrt(d.count()))*.6,v=[T,O]}else w.a.util.isArray(v)||(v=[v,v]);var c=C.getAxis("z").scale.getExtent(),f=E(c),D=["x","y","z"].map(function(R){return m.coordDimToDataDim(R)[0]});d.each(D,function(R,k,W,z){var Z=d.get(D[2],z,!0),Q=d.stackedOn?Z-W:f?0:c[0],te=C.dataToPoint([R,k,Q]),$=C.dataToPoint([R,k,Z]),ie=b.dist(te,$),ae=[0,$[1]0&&(ie++,W[3]<.99&&(Q=!0))}}),f.geometry.setBarCount(ie);var te=O.getLayout("orient"),$=this._barIndexOfData=new Int32Array(O.count()),ie=0;O.each(function(re){if(!O.hasValue(re)){$[re]=-1;return}var ce=O.getItemLayout(re),oe=ce[0],he=ce[1],se=ce[2],pe=re*4;W[0]=z[pe++],W[1]=z[pe++],W[2]=z[pe++],W[3]=z[pe++],W[3]>0&&(c._barMesh.geometry.addBar(oe,he,te,se,W,re),$[re]=ie++)}),f.geometry.dirty(),f.geometry.updateBoundingBox();var ae=f.material;ae.transparent=Q,ae.depthMask=!Q,f.geometry.sortTriangles=Q,this._initHandler(A,T)},_initHandler:function(A,T){var O=A.getData(),P=this._barMesh,L=A.coordinateSystem.type==="cartesian3D";P.seriesIndex=A.seriesIndex;var c=-1;P.off("mousemove"),P.off("mouseout"),P.on("mousemove",function(f){var D=P.geometry.getDataIndexOfVertex(f.triangle[0]);D!==c&&(this._downplay(c),this._highlight(D),this._labelsBuilder.updateLabels([D]),L&&T.dispatchAction({type:"grid3DShowAxisPointer",value:[O.get("x",D),O.get("y",D),O.get("z",D,!0)]})),c=D,P.dataIndex=D},this),P.on("mouseout",function(f){this._downplay(c),this._labelsBuilder.updateLabels(),c=-1,P.dataIndex=-1,L&&T.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_highlight:function(A){var T=this._data;if(T){var O=this._barIndexOfData[A];if(!(O<0)){var P=T.getItemModel(A),L=P.getModel("emphasis.itemStyle"),c=L.get("color"),f=L.get("opacity");if(c==null){var D=T.getItemVisual(A,"color");c=w.a.color.lift(D,-.4)}f==null&&(f=T.getItemVisual(A,"opacity"));var R=x.a.parseColor(c);R[3]*=f,this._barMesh.geometry.setColor(O,R),this._api.getZr().refresh()}}},_downplay:function(A){var T=this._data;if(T){var O=this._barIndexOfData[A];if(!(O<0)){var P=T.getItemVisual(A,"color"),L=T.getItemVisual(A,"opacity"),c=x.a.parseColor(P);c[3]*=L,this._barMesh.geometry.setColor(O,c),this._api.getZr().refresh()}}},highlight:function(A,T,O,P){this._toggleStatus("highlight",A,T,O,P)},downplay:function(A,T,O,P){this._toggleStatus("downplay",A,T,O,P)},_toggleStatus:function(A,T,O,P,L){var c=T.getData(),f=y.a.queryDataIndex(c,L),D=this;f!=null?w.a.util.each(b.a.normalizeToArray(f),function(R){A==="highlight"?this._highlight(R):this._downplay(R)},this):c.each(function(R){A==="highlight"?D._highlight(R):D._downplay(R)})},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(33),y=_(60),b=_(13),E=_(1),g=_.n(E),m=g.a.vec3,C=g.a.mat3,d=b.a.extend(function(){return{attributes:{position:new b.a.Attribute("position","float",3,"POSITION"),normal:new b.a.Attribute("normal","float",3,"NORMAL"),color:new b.a.Attribute("color","float",4,"COLOR"),prevPosition:new b.a.Attribute("prevPosition","float",3),prevNormal:new b.a.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}},{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(v){var A=this.enableNormal,T=this.getBarVertexCount()*v,O=this.getBarTriangleCount()*v;this.vertexCount!==T&&(this.attributes.position.init(T),A?this.attributes.normal.init(T):this.attributes.normal.value=null,this.attributes.color.init(T)),this.triangleCount!==O&&(this.indices=T>65535?new Uint32Array(O*3):new Uint16Array(O*3),this._dataIndices=new Uint32Array(T))},getBarVertexCount:function(){var v=this.bevelSize>0?this.bevelSegments:0;return v>0?this._getBevelBarVertexCount(v):this.enableNormal?24:8},getBarTriangleCount:function(){var v=this.bevelSize>0?this.bevelSegments:0;return v>0?this._getBevelBarTriangleCount(v):12},_getBevelBarVertexCount:function(v){return(v+1)*4*(v+1)*2},_getBevelBarTriangleCount:function(v){var A=v*4+3,T=v*2+1;return(A+1)*T*2+4},setColor:function(v,A){for(var T=this.getBarVertexCount(),O=T*v,P=T*(v+1),L=O;L0&&this.bevelSegments>0)this._addBevelBar(re,ce,oe,he,this.bevelSize,this.bevelSegments,se);else{m.copy(P,ce),m.normalize(P,P),m.cross(L,oe,P),m.normalize(L,L),m.cross(O,P,L),m.normalize(L,L),m.negate(c,O),m.negate(f,P),m.negate(D,L),A(R[0],re,O,he[0]/2),A(R[0],R[0],L,he[2]/2),A(R[1],re,O,he[0]/2),A(R[1],R[1],D,he[2]/2),A(R[2],re,c,he[0]/2),A(R[2],R[2],D,he[2]/2),A(R[3],re,c,he[0]/2),A(R[3],R[3],L,he[2]/2),A(T,re,P,he[1]),A(R[4],T,O,he[0]/2),A(R[4],R[4],L,he[2]/2),A(R[5],T,O,he[0]/2),A(R[5],R[5],D,he[2]/2),A(R[6],T,c,he[0]/2),A(R[6],R[6],D,he[2]/2),A(R[7],T,c,he[0]/2),A(R[7],R[7],L,he[2]/2);var ge=this.attributes;if(this.enableNormal){k[0]=O,k[1]=c,k[2]=P,k[3]=f,k[4]=L,k[5]=D;for(var Ee=this._vertexOffset,Ae=0;Ae=0){var me=Z*3,ge=new g.a(this._points[me],this._points[me+1],this._points[me+2]);R.push({dataIndex:Z,point:ge,pointWorld:ge.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(ge)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(ee,G){function _(F,w,x,y,b,E,g){if(b===0)return!1;var m=b,C=0,d=F;if(g>w+m&&g>y+m||gF+m&&E>x+m||ET?O.position[1]+=(P-T)/2:O.position[0]+=(P-A)/2;var L=O.getBoundingRect();return O.position[0]-=L.x,O.position[1]-=L.y,O.setStyle(C),O.update(),O.__size=P,O}function b(g,m,C){var d=m.width,v=m.height,A=g.canvas.width,T=g.canvas.height,O=d/A,P=v/T;function L(Z){return Z<128?1:-1}function c(Z,Q){var te=1/0;Z=Math.floor(Z*O),Q=Math.floor(Q*P);for(var $=Q*d+Z,ie=m.data[$*4],ae=L(ie),re=Math.max(Q-C,0);re=0;R--){var k;this.geometry.indices?k=this.geometry.indices[R]:k=R;var W=L[k*2],z=L[k*2+1],Z=this.geometry.attributes.size.get(k)/this.sizeScale,Q=Z/2;if(d>W-Q*f&&dz-Q*D&&v=2e4},doSortVertices:function(b,E){var g=this.indices,m=y.create();if(!g){g=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var C=0;C.05);else for(var C=0;C<3;C++)this._progressiveQuickSort(E*3+C);this.dirtyIndices()},_simpleSort:function(b){var E=this._zList,g=this.indices;function m(C,d){return E[d]-E[C]}b?Array.prototype.sort.call(g,m):F.a.sort(g,m,0,g.length-1)},_progressiveQuickSort:function(b){var E=this._zList,g=this.indices;this._quickSort=this._quickSort||new F.a,this._quickSort.step(g,function(m,C){return E[C]-E[m]},b)}}},function(ee,G,_){"use strict";G.a=`@export ecgl.sdfSprite.vertex uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; uniform float elapsedTime : 0; attribute vec3 position : POSITION; #ifdef VERTEX_SIZE attribute float size; #else uniform float u_Size; #endif #ifdef VERTEX_COLOR attribute vec4 a_FillColor: COLOR; varying vec4 v_Color; #endif #ifdef VERTEX_ANIMATION attribute vec3 prevPosition; attribute float prevSize; uniform float percent : 1.0; #endif #ifdef POSITIONTEXTURE_ENABLED uniform sampler2D positionTexture; #endif varying float v_Size; void main() { #ifdef POSITIONTEXTURE_ENABLED gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0); #else #ifdef VERTEX_ANIMATION vec3 pos = mix(prevPosition, position, percent); #else vec3 pos = position; #endif gl_Position = worldViewProjection * vec4(pos, 1.0); #endif #ifdef VERTEX_SIZE #ifdef VERTEX_ANIMATION v_Size = mix(prevSize, size, percent); #else v_Size = size; #endif #else v_Size = u_Size; #endif #ifdef VERTEX_COLOR v_Color = a_FillColor; #endif gl_PointSize = v_Size; } @end @export ecgl.sdfSprite.fragment uniform vec4 color: [1, 1, 1, 1]; uniform vec4 strokeColor: [1, 1, 1, 1]; uniform float smoothing: 0.07; uniform float lineWidth: 0.0; #ifdef VERTEX_COLOR varying vec4 v_Color; #endif varying float v_Size; uniform sampler2D sprite; @import clay.util.srgb void main() { gl_FragColor = color; vec4 _strokeColor = strokeColor; #ifdef VERTEX_COLOR gl_FragColor *= v_Color; #endif #ifdef SPRITE_ENABLED float d = texture2D(sprite, gl_PointCoord).r; gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d); if (lineWidth > 0.0) { float sLineWidth = lineWidth / 2.0; float outlineMaxValue0 = 0.5 + sLineWidth; float outlineMaxValue1 = 0.5 + sLineWidth + smoothing; float outlineMinValue0 = 0.5 - sLineWidth - smoothing; float outlineMinValue1 = 0.5 - sLineWidth; if (d <= outlineMaxValue1 && d >= outlineMinValue0) { float a = _strokeColor.a; if (d <= outlineMinValue1) { a = a * smoothstep(outlineMinValue0, outlineMinValue1, d); } else { a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d); } gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a); gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a; } } #endif #ifdef SRGB_DECODE gl_FragColor = sRGBToLinear(gl_FragColor); #endif } @end`},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(221),y=_(222),b=_(225),E=_(16);w.a.registerVisual(Object(E.a)("lines3D")),w.a.registerAction({type:"lines3DPauseEffect",event:"lines3deffectpaused",update:"series.lines3D:pauseEffect"},function(){}),w.a.registerAction({type:"lines3DResumeEffect",event:"lines3deffectresumed",update:"series.lines3D:resumeEffect"},function(){}),w.a.registerAction({type:"lines3DToggleEffect",event:"lines3deffectchanged",update:"series.lines3D:toggleEffect"},function(){})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(1),y=_.n(x),b=y.a.vec3,E=y.a.vec2,g=b.normalize,m=b.cross,C=b.sub,d=b.add,v=b.create,A=v(),T=v(),O=v(),P=v(),L=[],c=[];function f(Z,Q){E.copy(L,Z[0]),E.copy(c,Z[1]);var te=[],$=te[0]=v(),ie=te[1]=v(),ae=te[2]=v(),re=te[3]=v();Q.dataToPoint(L,$),Q.dataToPoint(c,re),g(A,$),C(T,re,$),g(T,T),m(O,T,A),g(O,O),m(T,A,O),d(ie,A,T),g(ie,ie),g(A,re),C(T,$,re),g(T,T),m(O,T,A),g(O,O),m(T,A,O),d(ae,A,T),g(ae,ae),d(P,$,re),g(P,P);var ce=b.dot($,P),oe=b.dot(P,ie),he=(Math.max(b.len($),b.len(re))-ce)/oe*2;return b.scaleAndAdd(ie,$,ie,he),b.scaleAndAdd(ae,re,ae,he),te}function D(Z,Q,te){var $=[],ie=$[0]=b.create(),ae=$[1]=b.create(),re=$[2]=b.create(),ce=$[3]=b.create();Q.dataToPoint(Z[0],ie),Q.dataToPoint(Z[1],ce);var oe=b.dist(ie,ce);return b.lerp(ae,ie,ce,.3),b.lerp(re,ie,ce,.3),b.scaleAndAdd(ae,ae,te,Math.min(oe*.1,10)),b.scaleAndAdd(re,re,te,Math.min(oe*.1,10)),$}function R(Z,Q){for(var te=new Float32Array(Z.length*3),$=0,ie=[],ae=0;ae0&&ie[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(ie)+". Lines must have 2d coords array in data item.");Q.push(ie)}),{coordsList:Q}}function W(Z,Q){var te=Z.getData(),$=Z.get("polyline");te.setLayout("lineType",$?"polyline":"cubicBezier");var ie=k(te);te.each(function(ae){var re=ie.coordsList[ae],ce=$?R:f;te.setItemLayout(ae,ce(re,Q))})}function z(Z,Q,te){var $=Z.getData(),ie=Z.get("polyline"),ae=k($);$.setLayout("lineType",ie?"polyline":"cubicBezier"),$.each(function(re){var ce=ae.coordsList[re],oe=ie?R(ce,Q):D(ce,Q,te);$.setItemLayout(re,oe)})}w.a.registerLayout(function(Z,Q){Z.eachSeriesByType("lines3D",function(te){var $=te.coordinateSystem;$.type==="globe"?W(te,$):$.type==="geo3D"?z(te,$,[0,1,0]):$.type==="mapbox3D"&&z(te,$,[0,0,1])})})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(22),b=_(223),E=_(40);x.a.Shader.import(E.a);function g(C){return C.radius!=null?C.radius:C.size!=null?Math.max(C.size[0],C.size[1],C.size[2]):100}var m=w.a.extendChartView({type:"lines3D",__ecgl__:!0,init:function(C,d){this.groupGL=new x.a.Node,this._meshLinesMaterial=new x.a.Material({shader:x.a.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new x.a.Mesh({geometry:new y.a,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new b.a},render:function(C,d,v){this.groupGL.add(this._linesMesh);var A=C.coordinateSystem,T=C.getData();if(A&&A.viewGL){var O=A.viewGL;O.add(this.groupGL),this._updateLines(C,d,v);var P=A.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[P]("fragment","SRGB_DECODE"),this._trailMesh.material[P]("fragment","SRGB_DECODE")}var L=this._trailMesh;if(L.stopAnimation(),C.get("effect.show")){this.groupGL.add(L),L.updateData(T,v,this._linesMesh.geometry),L.__time=L.__time||0;var c=3600*1e3;this._curveEffectsAnimator=L.animate("",{loop:!0}).when(c,{__time:c}).during(function(){L.setAnimationTime(L.__time)}).start()}else this.groupGL.remove(L),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend=C.get("blendMode")==="lighter"?x.a.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var C=this._curveEffectsAnimator;C&&(C.isPaused()?C.resume():C.pause())},_updateLines:function(C,d,v){var A=C.getData(),T=C.coordinateSystem,O=this._linesMesh.geometry,P=C.get("polyline");O.expandLine=!0;var L=g(T);O.segmentScale=L/20;var c="lineStyle.width".split("."),f=v.getDevicePixelRatio(),D=0;A.each(function(z){var Z=A.getItemModel(z),Q=Z.get(c);Q==null&&(Q=1),A.setItemVisual(z,"lineWidth",Q),D=Math.max(Q,D)}),O.useNativeLine=!1;var R=0,k=0;A.each(function(z){var Z=A.getItemLayout(z);P?(R+=O.getPolylineVertexCount(Z),k+=O.getPolylineTriangleCount(Z)):(R+=O.getCubicCurveVertexCount(Z[0],Z[1],Z[2],Z[3]),k+=O.getCubicCurveTriangleCount(Z[0],Z[1],Z[2],Z[3]))}),O.setVertexCount(R),O.setTriangleCount(k),O.resetOffset();var W=[];A.each(function(z){var Z=A.getItemLayout(z),Q=A.getItemVisual(z,"color"),te=A.getItemVisual(z,"opacity"),$=A.getItemVisual(z,"lineWidth")*f;te==null&&(te=1),W=x.a.parseColor(Q,W),W[3]*=te,P?O.addPolyline(Z,W,$):O.addCubicCurve(Z[0],Z[1],Z[2],Z[3],W,$)}),O.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(1),b=_.n(y),E=_(22),g=_(224),m=b.a.vec3;function C(d){return d>0?1:-1}x.a.Shader.import(g.a),G.a=x.a.Mesh.extend(function(){var d=new x.a.Material({shader:new x.a.Shader(x.a.Shader.source("ecgl.trail2.vertex"),x.a.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),v=new E.a({dynamic:!0});return v.createAttribute("dist","float",1),v.createAttribute("distAll","float",1),v.createAttribute("start","float",1),{geometry:v,material:d,culling:!1,$ignorePicking:!0}},{updateData:function(d,v,A){var T=d.hostModel,O=this.geometry,P=T.getModel("effect"),L=P.get("trailWidth")*v.getDevicePixelRatio(),c=P.get("trailLength"),f=T.get("effect.constantSpeed"),D=T.get("effect.period")*1e3,R=f!=null;this.getScene()||console.error("TrailMesh must been add to scene before updateData"),R?this.material.set("speed",f/1e3):this.material.set("period",D),this.material[R?"define":"undefine"]("vertex","CONSTANT_SPEED");var k=T.get("polyline");O.trailLength=c,this.material.set("trailLength",c),O.resetOffset(),["position","positionPrev","positionNext"].forEach(function(he){O.attributes[he].value=A.attributes[he].value});var W=["dist","distAll","start","offset","color"];W.forEach(function(he){O.attributes[he].init(O.vertexCount)}),O.indices=A.indices;var z=[],Z=P.get("trailColor"),Q=P.get("trailOpacity"),te=Z!=null,$=Q!=null;this.updateWorldTransform();var ie=this.worldTransform.x.len(),ae=this.worldTransform.y.len(),re=this.worldTransform.z.len(),ce=0,oe=0;d.each(function(he){var se=d.getItemLayout(he),pe=$?Q:d.getItemVisual(he,"opacity"),me=d.getItemVisual(he,"color");pe==null&&(pe=1),z=x.a.parseColor(te?Z:me,z),z[3]*=pe;for(var ge=k?A.getPolylineVertexCount(se):A.getCubicCurveVertexCount(se[0],se[1],se[2],se[3]),Ee=0,Ae=[],Fe=[],Ue=ce;Uece&&(Ee+=m.dist(Ae,Fe)),O.attributes.dist.set(Ue,Ee),m.copy(Fe,Ae);oe=Math.max(oe,Ee);for(var nt=Math.random()*(R?Ee:D),Ue=ce;Ue 1.0 || v_Percent < 0.0) { discard; } float fade = v_Percent; #ifdef SRGB_DECODE gl_FragColor = sRGBToLinear(color * v_Color); #else gl_FragColor = color * v_Color; #endif @import ecgl.common.wireframe.fragmentMain if (v_Percent > (1.0 - v_SpotPercent)) { gl_FragColor.rgb *= spotIntensity; } gl_FragColor.a *= fade; } @end`},function(ee,G,_){"use strict";var F=_(0),w=_.n(F);w.a.extendSeriesModel({type:"series.lines3D",dependencies:["globe"],visualColorAccessPath:"lineStyle.color",getInitialData:function(x,y){var b=new w.a.List(["value"],this);return b.hasItemOption=!1,b.initData(x.data,[],function(E,g,m,C){if(E instanceof Array)return NaN;b.hasItemOption=!0;var d=E.value;if(d!=null)return d instanceof Array?d[C]:d}),b},defaultOption:{coordinateSystem:"globe",globeIndex:0,geo3DIndex:0,zlevel:-10,polyline:!1,effect:{show:!1,period:4,trailWidth:4,trailLength:.2,spotIntensity:6},silent:!0,blendMode:"source-over",lineStyle:{width:1,opacity:.5}}})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(227),y=_(228),b=_(16);w.a.registerVisual(Object(b.a)("polygons3D"))},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(26);function y(g,m){for(var C=[],d=0;d0;this._updateSurfaceMesh(this._surfaceMesh,d,R,z);var Z=this._surfaceMesh.material;z?(Z.define("WIREFRAME_QUAD"),Z.set("wireframeLineWidth",W),Z.set("wireframeLineColor",x.a.parseColor(k.get("lineStyle.color")))):Z.undefine("WIREFRAME_QUAD"),this._initHandler(d,A),this._updateAnimation(d)},_updateAnimation:function(d){x.a.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,d)},_createSurfaceMesh:function(){var d=new x.a.Mesh({geometry:new x.a.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new x.a.Material({shader:new x.a.Shader(x.a.Shader.source("ecgl.sm.depth.vertex"),x.a.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return d.geometry.createAttribute("barycentric","float",4),d.geometry.createAttribute("prevPosition","float",3),d.geometry.createAttribute("prevNormal","float",3),w.a.util.extend(d.geometry,g.a),d},_initHandler:function(d,v){var A=d.getData(),T=this._surfaceMesh,O=d.coordinateSystem;function P(c,f){for(var D=1/0,R=-1,k=[],W=0;W=0){var D=[];T.geometry.attributes.position.get(f,D);for(var R=O.pointToData(D),k=1/0,W=-1,z=[],Z=0;Z65535?Uint32Array:Uint16Array)((Z-1)*(Q-1)*6),oe=function(Ve,$e,lt){lt[1]=Ve*Q+$e,lt[0]=Ve*Q+$e+1,lt[3]=(Ve+1)*Q+$e+1,lt[2]=(Ve+1)*Q+$e},he=!1;if(f){var se=[],pe=[],me=0;$?R.init(O.vertexCount):R.value=null;for(var ge=[[],[],[]],Ee=[],Ae=[],Fe=m.create(),Ue=function(Ve,$e,lt){var pt=$e*3;return lt[0]=Ve[pt],lt[1]=Ve[pt+1],lt[2]=Ve[pt+2],lt},nt=new Float32Array(L.length),rt=new Float32Array(L.length/3*4),qe=0;qe ")),v.value&&(P+=" : "+w.a.format.encodeHTML(v.value)),P}else return b.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var g=(this.option.categories||[]).map(function(C){return C.value!=null?C:w.a.util.extend({value:0},C)}),m=new w.a.List(["value"],this);m.initData(g),this._categoriesData=m,this._categoriesModels=m.mapArray(function(C){return m.getItemModel(C,!0)})},setView:function(g){g.zoom!=null&&(this.option.zoom=g.zoom),g.offset!=null&&(this.option.offset=g.offset)},setNodePosition:function(g){for(var m=0;m "+R)),c++)}var k,W=w.a.helper.completeDimensions(["value"],m);k=new w.a.List(W,d),k.initData(m);var z=new w.a.List(["value"],d);return z.initData(L,P),A&&A(k,z),E()({mainData:k,struct:T,structAttr:"graph",datas:{node:k,edge:z},datasAttr:{node:"data",edge:"edgeData"}}),T.update(),T}},function(ee,G,_){var F=_(85),w=F.__DEV__,x=_(12),y=_(244),b=y.enableClassCheck;function E(T){return"_EC_"+T}var g=function(T){this._directed=T||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},m=g.prototype;m.type="graph",m.isDirected=function(){return this._directed},m.addNode=function(T,O){T=T||""+O;var P=this._nodesMap;if(!P[E(T)]){var L=new C(T,O);return L.hostGraph=this,this.nodes.push(L),P[E(T)]=L,L}},m.getNodeByIndex=function(T){var O=this.data.getRawIndex(T);return this.nodes[O]},m.getNodeById=function(T){return this._nodesMap[E(T)]},m.addEdge=function(T,O,P){var L=this._nodesMap,c=this._edgesMap;if(typeof T=="number"&&(T=this.nodes[T]),typeof O=="number"&&(O=this.nodes[O]),C.isInstance(T)||(T=L[E(T)]),C.isInstance(O)||(O=L[E(O)]),!(!T||!O)){var f=T.id+"-"+O.id;if(!c[f]){var D=new d(T,O,P);return D.hostGraph=this,this._directed&&(T.outEdges.push(D),O.inEdges.push(D)),T.edges.push(D),T!==O&&O.edges.push(D),this.edges.push(D),c[f]=D,D}}},m.getEdgeByIndex=function(T){var O=this.edgeData.getRawIndex(T);return this.edges[O]},m.getEdge=function(T,O){C.isInstance(T)&&(T=T.id),C.isInstance(O)&&(O=O.id);var P=this._edgesMap;return this._directed?P[T+"-"+O]:P[T+"-"+O]||P[O+"-"+T]},m.eachNode=function(T,O){for(var P=this.nodes,L=P.length,c=0;c=0&&T.call(O,P[c],c)},m.eachEdge=function(T,O){for(var P=this.edges,L=P.length,c=0;c=0&&P[c].node1.dataIndex>=0&&P[c].node2.dataIndex>=0&&T.call(O,P[c],c)},m.breadthFirstTraverse=function(T,O,P,L){if(C.isInstance(O)||(O=this._nodesMap[E(O)]),!!O){for(var c=P==="out"?"outEdges":P==="in"?"inEdges":"edges",f=0;f=0&&R.node2.dataIndex>=0});for(var c=0,f=L.length;c=0&&this[T][O].setItemVisual(this.dataIndex,P,L)},getVisual:function(P,L){return this[T][O].getItemVisual(this.dataIndex,P,L)},setLayout:function(P,L){this.dataIndex>=0&&this[T][O].setItemLayout(this.dataIndex,P,L)},getLayout:function(){return this[T][O].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[T][O].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[T][O].getRawIndex(this.dataIndex)}}};x.mixin(C,v("hostGraph","data")),x.mixin(d,v("hostGraph","edgeData")),g.Node=C,g.Edge=d,b(C),b(d);var A=g;ee.exports=A},function(ee,G){var _;_=function(){return this}();try{_=_||Function("return this")()||(0,eval)("this")}catch(F){typeof window=="object"&&(_=window)}ee.exports=_},function(ee,G,_){var F=_(85),w=F.__DEV__,x=_(12),y=".",b="___EC__COMPONENT__CONTAINER___";function E(P){var L={main:"",sub:""};return P&&(P=P.split(y),L.main=P[0]||"",L.sub=P[1]||""),L}function g(P){x.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(P),'componentType "'+P+'" illegal')}function m(P,L){P.$constructor=P,P.extend=function(c){var f=this,D=function(){c.$constructor?c.$constructor.apply(this,arguments):f.apply(this,arguments)};return x.extend(D.prototype,c),D.extend=this.extend,D.superCall=v,D.superApply=A,x.inherits(D,this),D.superClass=f,D}}var C=0;function d(P){var L=["__\0is_clz",C++,Math.random().toFixed(3)].join("_");P.prototype[L]=!0,P.isInstance=function(c){return!!(c&&c[L])}}function v(P,L){var c=x.slice(arguments,2);return this.superClass.prototype[L].apply(P,c)}function A(P,L,c){return this.superClass.prototype[L].apply(P,c)}function T(P,L){L=L||{};var c={};P.registerClass=function(R,k){if(k){if(g(k),k=E(k),!k.sub)c[k.main]=R;else if(k.sub!==b){var W=f(k);W[k.sub]=R}}return R},P.getClass=function(R,k,W){var z=c[R];if(z&&z[b]&&(z=k?z[k]:null),W&&!z)throw new Error(k?"Component "+R+"."+(k||"")+" not exists. Load it first.":R+".type should be specified.");return z},P.getClassesByMainType=function(R){R=E(R);var k=[],W=c[R.main];return W&&W[b]?x.each(W,function(z,Z){Z!==b&&k.push(z)}):k.push(W),k},P.hasClass=function(R){return R=E(R),!!c[R.main]},P.getAllClassMainTypes=function(){var R=[];return x.each(c,function(k,W){R.push(W)}),R},P.hasSubTypes=function(R){R=E(R);var k=c[R.main];return k&&k[b]},P.parseClassType=E;function f(R){var k=c[R.main];return(!k||!k[b])&&(k=c[R.main]={},k[b]=!0),k}if(L.registerWhenExtend){var D=P.extend;D&&(P.extend=function(R){var k=D.call(this,R);return P.registerClass(k,R.type)})}return P}function O(P,L){}G.parseClassType=E,G.enableClassExtend=m,G.enableClassCheck=d,G.enableClassManagement=T,G.setReadOnly=O},function(ee,G,_){var F=_(12),w=F.each,x="\0__link_datas",y="\0__link_mainData";function b(O){var P=O.mainData,L=O.datas;L||(L={main:P},O.datasAttr={main:"data"}),O.datas=O.mainData=null,v(P,L,O),w(L,function(c){w(P.TRANSFERABLE_METHODS,function(f){c.wrapMethod(f,F.curry(E,O))})}),P.wrapMethod("cloneShallow",F.curry(m,O)),w(P.CHANGABLE_METHODS,function(c){P.wrapMethod(c,F.curry(g,O))}),F.assert(L[P.dataType]===P)}function E(O,P){if(d(this)){var L=F.extend({},this[x]);L[this.dataType]=P,v(P,L,O)}else A(P,this.dataType,this[y],O);return P}function g(O,P){return O.struct&&O.struct.update(this),P}function m(O,P){return w(P[x],function(L,c){L!==P&&A(L.cloneShallow(),c,P,O)}),P}function C(O){var P=this[y];return O==null||P==null?P:P[x][O]}function d(O){return O[y]===O}function v(O,P,L){O[x]={},w(P,function(c,f){A(c,f,O,L)})}function A(O,P,L,c){L[x][P]=O,O[y]=L,O.dataType=P,c.struct&&(O[c.structAttr]=c.struct,c.struct[c.datasAttr[P]]=O),O.getLinkedData=C}var T=b;ee.exports=T},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(41),y=_.n(x),b=_(2),E=_(20),g=_(86),m=_(3),C=_(247),d=_(249),v=_(65),A=_.n(v),T=_(1),O=_.n(T),P=_(251),L=_(62),c=_(252),f=O.a.vec2;b.a.Shader.import(c.a);var D=1;w.a.extendChartView({type:"graphGL",__ecgl__:!0,init:function(R,k){this.groupGL=new b.a.Node,this.viewGL=new E.a("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new L.a(!0,k),this._forceEdgesMesh=new b.a.Mesh({material:new b.a.Material({shader:b.a.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new b.a.Geometry({attributes:{node:new b.a.Geometry.Attribute("node","float",2),color:new b.a.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:b.a.Mesh.LINES}),this._edgesMesh=new b.a.Mesh({material:new b.a.Material({shader:b.a.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new g.a({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new P.a({zr:k.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(R,k,W){this.groupGL.add(this._pointsBuilder.rootNode),this._model=R,this._api=W,this._initLayout(R,k,W),this._pointsBuilder.update(R,k,W),this._forceLayoutInstance instanceof C.a||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(R,W),this._control.off("update"),this._control.on("update",function(){W.dispatchAction({type:"graphGLRoam",seriesId:R.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)},this),this._control.setZoom(m.a.firstNotNull(R.get("zoom"),1)),this._control.setOffset(R.get("offset")||[0,0]);var z=this._pointsBuilder.getPointsMesh();if(z.off("mousemove",this._mousemoveHandler),z.off("mouseout",this._mouseOutHandler,this),W.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,R.get("focusNodeAdjacency")){var Z=R.get("focusNodeAdjacencyOn");Z==="click"?W.getZr().on("click",this._clickHandler):Z==="mouseover"?(z.on("mousemove",this._mousemoveHandler,this),z.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1):console.warn("Unkown focusNodeAdjacencyOn value s"+Z)}this._lastMouseOverDataIndex=-1},_clickHandler:function(R){if(!this._layouting){var k=this._pointsBuilder.getPointsMesh().dataIndex;k>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:k}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(R){if(!this._layouting){var k=this._pointsBuilder.getPointsMesh().dataIndex;k>=0?k!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:k}):this._mouseOutHandler(R),this._lastMouseOverDataIndex=k}},_mouseOutHandler:function(R){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(R,k){var W=this._forceEdgesMesh.geometry,z=k.getEdgeData(),Z=0,Q=this._forceLayoutInstance,te=z.count()*2;W.attributes.node.init(te),W.attributes.color.init(te),z.each(function($){var ie=R[$];W.attributes.node.set(Z,Q.getNodeUV(ie.node1)),W.attributes.node.set(Z+1,Q.getNodeUV(ie.node2));var ae=z.getItemVisual(ie.dataIndex,"color"),re=b.a.parseColor(ae);re[3]*=m.a.firstNotNull(z.getItemVisual(ie.dataIndex,"opacity"),1),W.attributes.color.set(Z,re),W.attributes.color.set(Z+1,re),Z+=2}),W.dirty()},_updateMeshLinesGeometry:function(){var k=this._model.getEdgeData(),R=this._edgesMesh.geometry,k=this._model.getEdgeData(),W=this._model.getData().getLayout("points");R.resetOffset(),R.setVertexCount(k.count()*R.getLineVertexCount()),R.setTriangleCount(k.count()*R.getLineTriangleCount());var z=[],Z=[],Q=["lineStyle","width"];this._originalEdgeColors=new Float32Array(k.count()*4),this._edgeIndicesMap=new Float32Array(k.count()),k.each(function(te){var $=k.graph.getEdgeByIndex(te),ie=$.node1.dataIndex*2,ae=$.node2.dataIndex*2;z[0]=W[ie],z[1]=W[ie+1],Z[0]=W[ae],Z[1]=W[ae+1];var re=k.getItemVisual($.dataIndex,"color"),ce=b.a.parseColor(re);ce[3]*=m.a.firstNotNull(k.getItemVisual($.dataIndex,"opacity"),1);var oe=k.getItemModel($.dataIndex),he=m.a.firstNotNull(oe.get(Q),1)*this._api.getDevicePixelRatio();R.addLine(z,Z,ce,he);for(var se=0;se<4;se++)this._originalEdgeColors[$.dataIndex*4+se]=ce[se];this._edgeIndicesMap[$.dataIndex]=te},!1,this),R.dirty()},_updateForceNodesGeometry:function(R){for(var k=this._pointsBuilder.getPointsMesh(),W=[],z=0;z=se&&(ae._syncNodePosition(R),he=0),Q.getZr().refresh(),A()(function(){pe(me)})})}};A()(function(){ae._forceLayoutInstanceToDispose&&(ae._forceLayoutInstanceToDispose.dispose(Z.layer.renderer),ae._forceLayoutInstanceToDispose=null),pe(re)}),this._layouting=!0}}},stopLayout:function(R,k,W,z){z&&z.from!=null&&z.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(z&&z.beforeLayout||(this._syncNodePosition(R),this._updateAfterLayout(R,k,W)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(R){var k=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);R.getData().setLayout("points",k),R.setNodePosition(k)},_updateAfterLayout:function(R,k,W){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(R,k,W),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(R,k,W,z){var Z=this._model.getData();this._downplayAll();var Q=z.dataIndex,te=Z.graph,$=[],ie=te.getNodeByIndex(Q);$.push(ie),ie.edges.forEach(function(re){re.dataIndex<0||(re.node1!==ie&&$.push(re.node1),re.node2!==ie&&$.push(re.node2))},this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),$.forEach(function(re){this._pointsBuilder.highlight(Z,re.dataIndex)},this),this._pointsBuilder.updateLabels($.map(function(re){return re.dataIndex}));var ae=[];ie.edges.forEach(function(re){re.dataIndex>=0&&(this._highlightEdge(re.dataIndex),ae.push(re))},this),this._focusNodes=$,this._focusEdges=ae},unfocusNodeAdjacency:function(R,k,W,z){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(R){var k=this._model.getEdgeData().getItemModel(R),W=b.a.parseColor(k.get("emphasis.lineStyle.color")||k.get("lineStyle.color")),z=m.a.firstNotNull(k.get("emphasis.lineStyle.opacity"),k.get("lineStyle.opacity"),1);W[3]*=z,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[R],W)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach(function(R){this._pointsBuilder.downplay(this._model.getData(),R.dataIndex)},this),this._focusEdges&&this._focusEdges.forEach(function(R){this._downplayEdge(R.dataIndex)},this)},_downplayEdge:function(R){var k=this._getColor(R,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[R],k)},_setEdgeFade:function(){var R=[];return function(k,W){this._getColor(k,R),R[3]*=W,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[k],R)}}(),_getColor:function(R,k){for(var W=0;W<4;W++)k[W]=this._originalEdgeColors[R*4+W];return k},_fadeOutEdgesAll:function(R){var k=this._model.getData().graph;k.eachEdge(function(W){this._setEdgeFade(W.dataIndex,R)},this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(R,k){this.viewGL.setViewport(0,0,k.getWidth(),k.getHeight(),k.getDevicePixelRatio());for(var W=this.viewGL.camera,z=R.getData(),Z=z.getLayout("points"),Q=f.create(1/0,1/0),te=f.create(-1/0,-1/0),$=[],ie=0;ieW.left&&reW.top)){var ce=Math.max(te[0]-Q[0],10),oe=ce/k.getWidth()*k.getHeight();ce*=1.4,oe*=1.4,Q[0]-=ce*.2,W.left=Q[0],W.top=ae-oe/2,W.bottom=ae+oe/2,W.right=ce+Q[0],W.near=0,W.far=100}},dispose:function(){var R=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(R),this.groupGL.removeAll(),this._layoutId=-1},remove:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(14),b=_(10),E=_(248);x.a.Shader.import(E.a);var g={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function m(C){var d={type:x.a.Texture.FLOAT,minFilter:x.a.Texture.NEAREST,magFilter:x.a.Texture.NEAREST};this._positionSourceTex=new x.a.Texture2D(d),this._positionSourceTex.flipY=!1,this._positionTex=new x.a.Texture2D(d),this._positionPrevTex=new x.a.Texture2D(d),this._forceTex=new x.a.Texture2D(d),this._forcePrevTex=new x.a.Texture2D(d),this._weightedSumTex=new x.a.Texture2D(d),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new x.a.Texture2D(d),this._globalSpeedPrevTex=new x.a.Texture2D(d),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new y.a({fragment:x.a.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new y.a({fragment:x.a.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new y.a({fragment:x.a.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new y.a({fragment:x.a.Shader.source("clay.compositor.output")});var v=function(A){A.blendEquation(A.FUNC_ADD),A.blendFunc(A.ONE,A.ONE)};this._edgeForceMesh=new x.a.Mesh({geometry:new x.a.Geometry({attributes:{node1:new x.a.Geometry.Attribute("node1","float",2),node2:new x.a.Geometry.Attribute("node2","float",2),weight:new x.a.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new x.a.Material({transparent:!0,shader:x.a.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:v,depthMask:!1,depthText:!1}),mode:x.a.Mesh.POINTS}),this._weightedSumMesh=new x.a.Mesh({geometry:new x.a.Geometry({attributes:{node:new x.a.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new x.a.Material({transparent:!0,shader:x.a.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:v,depthMask:!1,depthText:!1}),mode:x.a.Mesh.POINTS}),this._framebuffer=new b.a({depthBuffer:!1}),this._dummyCamera=new x.a.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}m.prototype.updateOption=function(C){for(var d in g)this[d]=g[d];var v=this._nodes.length;if(v>5e4?this.jitterTolerence=10:v>5e3?this.jitterTolerence=1:this.jitterTolerence=.1,v>100?this.scaling=2:this.scaling=10,C)for(var d in g)C[d]!=null&&(this[d]=C[d]);if(this.repulsionByDegree)for(var A=this._positionSourceTex.pixels,T=0;TC},m.prototype._swapTexture=function(){var C=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=C;var C=this._forcePrevTex;this._forcePrevTex=this._forceTex,this._forceTex=C;var C=this._globalSpeedPrevTex;this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=C},m.prototype._initFromSource=function(C){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(C),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(C),C.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),C.gl.clear(C.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),C.gl.clear(C.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(C)},m.prototype._resize=function(C,d){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach(function(v){this[v].width=C,this[v].height=d,this[v].dirty()},this)},m.prototype.dispose=function(C){this._framebuffer.dispose(C),this._copyPass.dispose(C),this._nodeRepulsionPass.dispose(C),this._positionPass.dispose(C),this._globalSpeedPass.dispose(C),this._edgeForceMesh.geometry.dispose(C),this._weightedSumMesh.geometry.dispose(C),this._positionSourceTex.dispose(C),this._positionTex.dispose(C),this._positionPrevTex.dispose(C),this._forceTex.dispose(C),this._forcePrevTex.dispose(C),this._weightedSumTex.dispose(C),this._globalSpeedTex.dispose(C),this._globalSpeedPrevTex.dispose(C)},w.a.ForceAtlas2GPU=m,G.a=m},function(ee,G,_){"use strict";G.a=`@export ecgl.forceAtlas2.updateNodeRepulsion #define NODE_COUNT 0 uniform sampler2D positionTex; uniform vec2 textureSize; uniform float gravity; uniform float scaling; uniform vec2 gravityCenter; uniform bool strongGravityMode; uniform bool preventOverlap; varying vec2 v_Texcoord; void main() { vec4 n0 = texture2D(positionTex, v_Texcoord); vec2 force = vec2(0.0); for (int i = 0; i < NODE_COUNT; i++) { vec2 uv = vec2( mod(float(i), textureSize.x) / (textureSize.x - 1.0), floor(float(i) / textureSize.x) / (textureSize.y - 1.0) ); vec4 n1 = texture2D(positionTex, uv); vec2 dir = n0.xy - n1.xy; float d2 = dot(dir, dir); if (d2 > 0.0) { float factor = 0.0; if (preventOverlap) { float d = sqrt(d2); d = d - n0.w - n1.w; if (d > 0.0) { factor = scaling * n0.z * n1.z / (d * d); } else if (d < 0.0) { factor = scaling * 100.0 * n0.z * n1.z; } } else { factor = scaling * n0.z * n1.z / d2; } force += dir * factor; } } vec2 dir = gravityCenter - n0.xy; float d = 1.0; if (!strongGravityMode) { d = length(dir); } force += dir * n0.z * gravity / (d + 1.0); gl_FragColor = vec4(force, 0.0, 1.0); } @end @export ecgl.forceAtlas2.updateEdgeAttraction.vertex attribute vec2 node1; attribute vec2 node2; attribute float weight; uniform sampler2D positionTex; uniform float edgeWeightInfluence; uniform bool preventOverlap; uniform bool linLogMode; uniform vec2 windowSize: WINDOW_SIZE; varying vec2 v_Force; void main() { vec4 n0 = texture2D(positionTex, node1); vec4 n1 = texture2D(positionTex, node2); vec2 dir = n1.xy - n0.xy; float d = length(dir); float w; if (edgeWeightInfluence == 0.0) { w = 1.0; } else if (edgeWeightInfluence == 1.0) { w = weight; } else { w = pow(weight, edgeWeightInfluence); } vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y); vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y); vec2 pos = node1 * scale * 2.0 - 1.0; gl_Position = vec4(pos + offset, 0.0, 1.0); gl_PointSize = 1.0; float factor; if (preventOverlap) { d = d - n1.w - n0.w; } if (d <= 0.0) { v_Force = vec2(0.0); return; } if (linLogMode) { factor = w * log(d) / d; } else { factor = w; } v_Force = dir * factor; } @end @export ecgl.forceAtlas2.updateEdgeAttraction.fragment varying vec2 v_Force; void main() { gl_FragColor = vec4(v_Force, 0.0, 0.0); } @end @export ecgl.forceAtlas2.calcWeightedSum.vertex attribute vec2 node; varying vec2 v_NodeUv; void main() { v_NodeUv = node; gl_Position = vec4(0.0, 0.0, 0.0, 1.0); gl_PointSize = 1.0; } @end @export ecgl.forceAtlas2.calcWeightedSum.fragment varying vec2 v_NodeUv; uniform sampler2D positionTex; uniform sampler2D forceTex; uniform sampler2D forcePrevTex; void main() { vec2 force = texture2D(forceTex, v_NodeUv).rg; vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg; float mass = texture2D(positionTex, v_NodeUv).z; float swing = length(force - forcePrev) * mass; float traction = length(force + forcePrev) * 0.5 * mass; gl_FragColor = vec4(swing, traction, 0.0, 0.0); } @end @export ecgl.forceAtlas2.calcGlobalSpeed uniform sampler2D globalSpeedPrevTex; uniform sampler2D weightedSumTex; uniform float jitterTolerence; void main() { vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy; float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x; float globalSpeed = jitterTolerence * jitterTolerence * weightedSum.y / weightedSum.x; if (prevGlobalSpeed > 0.0) { globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed; } gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0); } @end @export ecgl.forceAtlas2.updatePosition uniform sampler2D forceTex; uniform sampler2D forcePrevTex; uniform sampler2D positionTex; uniform sampler2D globalSpeedTex; varying vec2 v_Texcoord; void main() { vec2 force = texture2D(forceTex, v_Texcoord).xy; vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy; vec4 node = texture2D(positionTex, v_Texcoord); float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r; float swing = length(force - forcePrev); float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing)); float df = length(force); if (df > 0.0) { speed = min(df * speed, 10.0) / df; gl_FragColor = vec4(node.xy + speed * force, node.zw); } else { gl_FragColor = node; } } @end @export ecgl.forceAtlas2.edges.vertex uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; attribute vec2 node; attribute vec4 a_Color : COLOR; varying vec4 v_Color; uniform sampler2D positionTex; void main() { gl_Position = worldViewProjection * vec4( texture2D(positionTex, node).xy, -10.0, 1.0 ); v_Color = a_Color; } @end @export ecgl.forceAtlas2.edges.fragment uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; varying vec4 v_Color; void main() { gl_FragColor = color * v_Color; } @end`},function(ee,G,_){"use strict";var F=_(5),w=_(6),x=_(250),y=x.a.toString();y=y.slice(y.indexOf("{")+1,y.lastIndexOf("}"));var b={barnesHutOptimize:!0,barnesHutTheta:1.5,repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null},E=function(g){for(var m in b)this[m]=b[m];if(g)for(var m in g)this[m]=g[m];this._nodes=[],this._edges=[],this._disposed=!1,this._positionTex=new F.a({type:w.a.FLOAT,flipY:!1,minFilter:w.a.NEAREST,magFilter:w.a.NEAREST})};E.prototype.initData=function(g,m){var C=new Blob([y]),d=window.URL.createObjectURL(C);this._worker=new Worker(d),this._worker.onmessage=this._$onupdate.bind(this),this._nodes=g,this._edges=m,this._frame=0;for(var v=g.length,A=m.length,T=new Float32Array(v*2),O=new Float32Array(v),P=new Float32Array(v),L=new Float32Array(A*2),c=new Float32Array(A),f=0;f5e4?m.jitterTolerence=10:A>5e3?m.jitterTolerence=1:m.jitterTolerence=.1,A>100?m.scaling=2:m.scaling=10,A>1e3?m.barnesHutOptimize=!0:m.barnesHutOptimize=!1,g)for(var C in b)g[C]!=null&&(m[C]=g[C]);if(!m.gravityCenter){for(var T=[1/0,1/0],O=[-1/0,-1/0],P=0;Pg},E.prototype.getNodePosition=function(g,m){if(m||(m=new Float32Array(this._nodes.length*2)),this._positionArr)for(var C=0;C0&&(O=1/Math.sqrt(O),d[0]=v[0]*O,d[1]=v[1]*O),d},negate:function(d,v){return d[0]=-v[0],d[1]=-v[1],d},copy:function(d,v){return d[0]=v[0],d[1]=v[1],d},set:function(d,v,A){return d[0]=v,d[1]=A,d}};function x(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}var y=x.prototype;y.beforeUpdate=function(){for(var d=0;d=d&&this.bbox[1]<=v&&this.bbox[3]>=v},y.setBBox=function(d,v,A,T){this.bbox[0]=d,this.bbox[1]=v,this.bbox[2]=A,this.bbox[3]=T,this.size=(A-d+T-v)/2},y._newSubRegion=function(){var d=this.subRegions[this.nSubRegions];return d||(d=new x,this.subRegions[this.nSubRegions]=d),this.nSubRegions++,d},y._addNodeToSubRegion=function(d){var v=this.findSubRegion(d.position[0],d.position[1]),A=this.bbox;if(!v){var T=(A[0]+A[2])/2,O=(A[1]+A[3])/2,P=(A[2]-A[0])/2,L=(A[3]-A[1])/2,c=d.position[0]>=T?1:0,f=d.position[1]>=O?1:0,v=this._newSubRegion();v.setBBox(c*P+A[0],f*L+A[1],(c+1)*P+A[0],(f+1)*L+A[1])}v.addNode(d)},y._updateCenterOfMass=function(d){this.centerOfMass==null&&(this.centerOfMass=new Float32Array(2));var v=this.centerOfMass[0]*this.mass,A=this.centerOfMass[1]*this.mass;v+=d.position[0]*d.mass,A+=d.position[1]*d.mass,this.mass+=d.mass,this.centerOfMass[0]=v/this.mass,this.centerOfMass[1]=A/this.mass};function b(){this.position=new Float32Array(2),this.force=w.create(),this.forcePrev=w.create(),this.mass=1,this.inDegree=0,this.outDegree=0}function E(d,v){this.source=d,this.target=v,this.weight=1}function g(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new x,this.rootRegion.centerOfMass=w.create(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}var m=g.prototype;m.initNodes=function(d,v,A){var T=v.length;this.nodes.length=0;for(var O=typeof A!="undefined",P=0;P0&&(this.strongGravityMode?this.applyNodeStrongGravity(T):this.applyNodeGravity(T))}for(var v=0;v0&&(k=Math.min(k/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=k;for(var v=0;v0&&(W=Math.min(z*W,10)/z,w.scaleAndAdd(A.position,A.position,A.force,W))}},m.applyRegionToNodeRepulsion=function(){var d=w.create();return function(A,T){if(A.node)this.applyNodeToNodeRepulsion(A.node,T,!0);else{w.sub(d,T.position,A.centerOfMass);var O=d[0]*d[0]+d[1]*d[1];if(O>this.barnesHutTheta*A.size*A.size){var P=this.scaling*T.mass*A.mass/O;w.scaleAndAdd(T.force,T.force,d,P)}else for(var L=0;L0)L=this.scaling*A.mass*T.mass/(c*c);else if(c<0)L=this.scaling*100*A.mass*T.mass;else return}else L=this.scaling*A.mass*T.mass/P;w.scaleAndAdd(A.force,A.force,d,L),w.scaleAndAdd(T.force,T.force,d,-L)}}}}(),m.applyEdgeAttraction=function(){var d=w.create();return function(A){var T=A.source,O=A.target;w.sub(d,T.position,O.position);var P=w.len(d),L;this.edgeWeightInfluence===0?L=1:this.edgeWeightInfluence===1?L=A.weight:L=Math.pow(A.weight,this.edgeWeightInfluence);var c;this.preventOverlap&&(P=P-T.size-O.size,P<=0)||(this.linLogMode?c=-L*Math.log(P+1)/(P+1):c=-L,w.scaleAndAdd(T.force,T.force,d,c),w.scaleAndAdd(O.force,O.force,d,-c))}}(),m.applyNodeGravity=function(){var d=w.create();return function(v){w.sub(d,this.gravityCenter,v.position);var A=w.len(d);w.scaleAndAdd(v.force,v.force,d,this.gravity*v.mass/(A+1))}}(),m.applyNodeStrongGravity=function(){var d=w.create();return function(v){w.sub(d,this.gravityCenter,v.position),w.scaleAndAdd(v.force,v.force,d,this.gravity*v.mass)}}(),m.updateBBox=function(){for(var d=1/0,v=1/0,A=-1/0,T=-1/0,O=0;O0?1.1:.9,C=Math.max(Math.min(this._zoom*m,this.maxZoom),this.minZoom);m=C/this._zoom;var d=this._convertPos(E,g),v=(d.x-this._dx)*(m-1),A=(d.y-this._dy)*(m-1);this._dx-=v,this._dy-=A,this._zoom=C,this._needsUpdate=!0}}},dispose:function(){var y=this.zr;y.off("mousedown",this._mouseDownHandler),y.off("mousemove",this._mouseMoveHandler),y.off("mouseup",this._mouseUpHandler),y.off("mousewheel",this._mouseWheelHandler),y.off("globalout",this._mouseUpHandler),y.animation.off("frame",this._update)}});G.a=x},function(ee,G,_){"use strict";G.a=`@export ecgl.lines2D.vertex uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; attribute vec2 position: POSITION; attribute vec4 a_Color : COLOR; varying vec4 v_Color; #ifdef POSITIONTEXTURE_ENABLED uniform sampler2D positionTexture; #endif void main() { gl_Position = worldViewProjection * vec4(position, -10.0, 1.0); v_Color = a_Color; } @end @export ecgl.lines2D.fragment uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; varying vec4 v_Color; void main() { gl_FragColor = color * v_Color; } @end @export ecgl.meshLines2D.vertex attribute vec2 position: POSITION; attribute vec2 normal; attribute float offset; attribute vec4 a_Color : COLOR; uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; uniform vec4 viewport : VIEWPORT; varying vec4 v_Color; varying float v_Miter; void main() { vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0); gl_Position = worldViewProjection * vec4(position, -10.0, 1.0); p2.xy /= p2.w; gl_Position.xy /= gl_Position.w; vec2 N = normalize(p2.xy - gl_Position.xy); gl_Position.xy += N * offset / viewport.zw * 2.0; gl_Position.xy *= gl_Position.w; v_Color = a_Color; } @end @export ecgl.meshLines2D.fragment uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; varying vec4 v_Color; varying float v_Miter; void main() { gl_FragColor = color * v_Color; } @end`},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(254),y=_(258)},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(3),b=_(20),E=_(255);w.a.extendChartView({type:"flowGL",__ecgl__:!0,init:function(g,m){this.viewGL=new b.a("orthographic"),this.groupGL=new x.a.Node,this.viewGL.add(this.groupGL),this._particleSurface=new E.a;var C=new x.a.Mesh({geometry:new x.a.PlaneGeometry,material:new x.a.Material({shader:new x.a.Shader({vertex:x.a.Shader.source("ecgl.color.vertex"),fragment:x.a.Shader.source("ecgl.color.fragment")}),transparent:!0})});C.material.enableTexture("diffuseMap"),this.groupGL.add(C),this._planeMesh=C},render:function(g,m,C){var d=this._particleSurface;d.setParticleType(g.get("particleType")),d.setSupersampling(g.get("supersampling")),this._updateData(g,C),this._updateCamera(C.getWidth(),C.getHeight(),C.getDevicePixelRatio());var v=y.a.firstNotNull(g.get("particleDensity"),128);d.setParticleDensity(v,v);var A=this._planeMesh,T=+new Date,O=this,P=!0;A.__percent=0,A.stopAnimation(),A.animate("",{loop:!0}).when(1e5,{__percent:1}).during(function(){var f=+new Date,D=Math.min(f-T,20);T=T+D,O._renderer&&(d.update(O._renderer,C,D/1e3,P),A.material.set("diffuseMap",d.getSurfaceTexture())),P=!1}).start();var L=g.getModel("itemStyle"),c=x.a.parseColor(L.get("color"));c[3]*=y.a.firstNotNull(L.get("opacity"),1),A.material.set("color",c),d.setColorTextureImage(g.get("colorTexture"),C),d.setParticleSize(g.get("particleSize")),d.particleSpeedScaling=g.get("particleSpeed"),d.motionBlurFactor=1-Math.pow(.1,g.get("particleTrail"))},updateTransform:function(g,m,C){this._updateData(g,C)},afterRender:function(g,m,C,d){var v=d.renderer;this._renderer=v},_updateData:function(g,m){var C=g.coordinateSystem,d=C.dimensions.map(function(Q){return g.coordDimToDataDim(Q)[0]}),v=g.getData(),A=v.getDataExtent(d[0]),T=v.getDataExtent(d[1]),O=g.get("gridWidth"),P=g.get("gridHeight");if(O==null||O==="auto"){var L=(A[1]-A[0])/(T[1]-T[0]);O=Math.round(Math.sqrt(L*v.count()))}(P==null||P==="auto")&&(P=Math.ceil(v.count()/O));var c=this._particleSurface.vectorFieldTexture,f=c.pixels;if(!f||f.length!==P*O*4)f=c.pixels=new Float32Array(O*P*4);else for(var D=0;D=359;O&&(v[0]>0&&(v[0]=0),A[0]0?P[P.length-1]:this._lastFrameTexture},setRegion:function(P){this._particlePass.setUniform("region",P)},resize:function(P,L){this._lastFrameTexture.width=P*this._supersampling,this._lastFrameTexture.height=L*this._supersampling,this._thisFrameTexture.width=P*this._supersampling,this._thisFrameTexture.height=L*this._supersampling,this._width=P,this._height=L},setParticleSize:function(P){var L=this._getParticleMesh();if(P<=2){L.material.disableTexture("spriteTexture"),L.material.transparent=!1;return}this._spriteTexture||(this._spriteTexture=new E.a),(!this._spriteTexture.image||this._spriteTexture.image.width!==P)&&(this._spriteTexture.image=T(P),this._spriteTexture.dirty()),L.material.transparent=!0,L.material.enableTexture("spriteTexture"),L.material.set("spriteTexture",this._spriteTexture),this._particleSize=P},setGradientTexture:function(P){var L=this._getParticleMesh().material;L[P?"enableTexture":"disableTexture"]("gradientTexture"),L.setUniform("gradientTexture",P)},setColorTextureImage:function(P,L){var c=this._getParticleMesh().material;c.setTextureImage("colorTexture",P,L,{flipY:!0})},setParticleType:function(P){this._particleType=P},clearFrame:function(P){var L=this._frameBuffer;L.attach(this._lastFrameTexture),L.bind(P),P.gl.clear(P.gl.DEPTH_BUFFER_BIT|P.gl.COLOR_BUFFER_BIT),L.unbind(P)},setSupersampling:function(P){this._supersampling=P,this.resize(this._width,this._height)},_updateDownsampleTextures:function(P,L){for(var c=this._downsampleTextures,f=Math.max(Math.floor(Math.log(this._supersampling/L.getDevicePixelRatio())/Math.log(2)),0),D=2,R=this._width*this._supersampling,k=this._height*this._supersampling,W=0;W65535?new Uint32Array(m*3):new Uint16Array(m*3))},addLine:function(b){var E=this._vertexOffset;this.attributes.position.set(E,[b[0],b[1],1]),this.attributes.position.set(E+1,[b[0],b[1],-1]),this.attributes.position.set(E+2,[b[0],b[1],2]),this.attributes.position.set(E+3,[b[0],b[1],-2]),this.setTriangleIndices(this._faceOffset++,[E,E+1,E+2]),this.setTriangleIndices(this._faceOffset++,[E+1,E+2,E+3]),this._vertexOffset+=4}});G.a=y},function(ee,G,_){"use strict";G.a=`@export ecgl.vfParticle.particle.fragment uniform sampler2D particleTexture; uniform sampler2D spawnTexture; uniform sampler2D velocityTexture; uniform float deltaTime; uniform float elapsedTime; uniform float speedScaling : 1.0; uniform vec2 textureSize; uniform vec4 region : [0, 0, 1, 1]; uniform float firstFrameTime; varying vec2 v_Texcoord; void main() { vec4 p = texture2D(particleTexture, v_Texcoord); bool spawn = false; if (p.w <= 0.0) { p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0)); p.w -= firstFrameTime; spawn = true; } vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy; v = (v - 0.5) * 2.0; p.z = length(v); p.xy += v * deltaTime / 10.0 * speedScaling; p.w -= deltaTime; if (spawn || p.xy != fract(p.xy)) { p.z = 0.0; } p.xy = fract(p.xy); gl_FragColor = p; } @end @export ecgl.vfParticle.renderPoints.vertex #define PI 3.1415926 attribute vec2 texcoord : TEXCOORD_0; uniform sampler2D particleTexture; uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; uniform float size : 1.0; varying float v_Mag; varying vec2 v_Uv; void main() { vec4 p = texture2D(particleTexture, texcoord); if (p.w > 0.0 && p.z > 1e-5) { gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0); } else { gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0); } v_Mag = p.z; v_Uv = p.xy; gl_PointSize = size; } @end @export ecgl.vfParticle.renderPoints.fragment uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; uniform sampler2D gradientTexture; uniform sampler2D colorTexture; uniform sampler2D spriteTexture; varying float v_Mag; varying vec2 v_Uv; void main() { gl_FragColor = color; #ifdef SPRITETEXTURE_ENABLED gl_FragColor *= texture2D(spriteTexture, gl_PointCoord); if (color.a == 0.0) { discard; } #endif #ifdef GRADIENTTEXTURE_ENABLED gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5)); #endif #ifdef COLORTEXTURE_ENABLED gl_FragColor *= texture2D(colorTexture, v_Uv); #endif } @end @export ecgl.vfParticle.renderLines.vertex #define PI 3.1415926 attribute vec3 position : POSITION; uniform sampler2D particleTexture; uniform sampler2D prevParticleTexture; uniform float size : 1.0; uniform vec4 vp: VIEWPORT; uniform mat4 worldViewProjection : WORLDVIEWPROJECTION; varying float v_Mag; varying vec2 v_Uv; @import clay.util.rand void main() { vec4 p = texture2D(particleTexture, position.xy); vec4 p2 = texture2D(prevParticleTexture, position.xy); p.xy = p.xy * 2.0 - 1.0; p2.xy = p2.xy * 2.0 - 1.0; if (p.w > 0.0 && p.z > 1e-5) { vec2 dir = normalize(p.xy - p2.xy); vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size; if (abs(position.z) == 2.0) { gl_Position = vec4(p.xy + norm, 0.0, 1.0); v_Uv = p.xy; v_Mag = p.z; } else { gl_Position = vec4(p2.xy + norm, 0.0, 1.0); v_Mag = p2.z; v_Uv = p2.xy; } gl_Position = worldViewProjection * gl_Position; } else { gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0); } } @end @export ecgl.vfParticle.renderLines.fragment uniform vec4 color : [1.0, 1.0, 1.0, 1.0]; uniform sampler2D gradientTexture; uniform sampler2D colorTexture; varying float v_Mag; varying vec2 v_Uv; void main() { gl_FragColor = color; #ifdef GRADIENTTEXTURE_ENABLED gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5)); #endif #ifdef COLORTEXTURE_ENABLED gl_FragColor *= texture2D(colorTexture, v_Uv); #endif } @end `},function(ee,G,_){"use strict";var F=_(0),w=_.n(F);w.a.extendSeriesModel({type:"series.flowGL",dependencies:["geo","grid","bmap"],visualColorAccessPath:"itemStyle.color",getInitialData:function(x,y){var b=w.a.getCoordinateSystemDimensions(this.get("coordinateSystem"))||["x","y"];if(b.length>2)throw new Error("flowGL can only be used on 2d coordinate systems.");b.push("vx","vy");var E=w.a.helper.completeDimensions(b,this.getSource(),{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),g=new w.a.List(E,this);return g.initData(this.getSource()),g},defaultOption:{coordinateSystem:"cartesian2d",zlevel:10,supersampling:1,particleType:"point",particleDensity:128,particleSize:1,particleSpeed:1,particleTrail:2,colorTexture:null,gridWidth:"auto",gridHeight:"auto",itemStyle:{color:"#fff",opacity:.8}}})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(260),y=_(261),b=_(16);w.a.registerVisual(Object(b.a)("linesGL"))},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(12),y=_.n(x),b=w.a.extendSeriesModel({type:"series.linesGL",dependencies:["grid","geo"],visualColorAccessPath:"lineStyle.color",streamEnabled:!0,init:function(E){var g=this._processFlatCoordsArray(E.data);this._flatCoords=g.flatCoords,this._flatCoordsOffset=g.flatCoordsOffset,g.flatCoords&&(E.data=new Float32Array(g.count)),b.superApply(this,"init",arguments)},mergeOption:function(E){var g=this._processFlatCoordsArray(E.data);this._flatCoords=g.flatCoords,this._flatCoordsOffset=g.flatCoordsOffset,g.flatCoords&&(E.data=new Float32Array(g.count)),b.superApply(this,"mergeOption",arguments)},appendData:function(E){var g=this._processFlatCoordsArray(E.data);g.flatCoords&&(this._flatCoords?(this._flatCoords=Object(x.concatArray)(this._flatCoords,g.flatCoords),this._flatCoordsOffset=Object(x.concatArray)(this._flatCoordsOffset,g.flatCoordsOffset)):(this._flatCoords=g.flatCoords,this._flatCoordsOffset=g.flatCoordsOffset),E.data=new Float32Array(g.count)),this.getRawData().appendData(E.data)},_getCoordsFromItemModel:function(E){var g=this.getData().getItemModel(E),m=g.option instanceof Array?g.option:g.getShallow("coords");if(!(m instanceof Array&&m.length>0&&m[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(m)+". Lines must have 2d coords array in data item.");return m},getLineCoordsCount:function(E){return this._flatCoordsOffset?this._flatCoordsOffset[E*2+1]:this._getCoordsFromItemModel(E).length},getLineCoords:function(E,g){if(this._flatCoordsOffset){for(var m=this._flatCoordsOffset[E*2],C=this._flatCoordsOffset[E*2+1],d=0;dm)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(C.buffer,0,A),flatCoords:d,count:T}}return{flatCoordsOffset:null,flatCoords:null,count:E.length}},getInitialData:function(E,g){var m=new w.a.List(["value"],this);return m.hasItemOption=!1,m.initData(E.data,[],function(C,d,v,A){if(C instanceof Array)return NaN;m.hasItemOption=!0;var T=C.value;if(T!=null)return T instanceof Array?T[A]:T}),m},defaultOption:{coordinateSystem:"geo",zlevel:10,progressive:1e4,progressiveThreshold:5e4,blendMode:"source-over",lineStyle:{opacity:.8},postEffect:{enable:!1,colorCorrection:{exposure:0,brightness:0,contrast:1,saturation:1,enable:!0}}}})},function(ee,G,_){"use strict";var F=_(0),w=_.n(F),x=_(2),y=_(20),b=_(86),E=_(84),g=_(3);w.a.extendChartView({type:"linesGL",__ecgl__:!0,init:function(m,C){this.groupGL=new x.a.Node,this.viewGL=new y.a("orthographic"),this.viewGL.add(this.groupGL),this._glViewHelper=new E.a(this.viewGL),this._nativeLinesShader=x.a.createShader("ecgl.lines3D"),this._meshLinesShader=x.a.createShader("ecgl.meshLines3D"),this._linesMeshes=[],this._currentStep=0},render:function(m,C,d){this.groupGL.removeAll(),this._glViewHelper.reset(m,d);var v=this._linesMeshes[0];v||(v=this._linesMeshes[0]=this._createLinesMesh(m)),this._linesMeshes.length=1,this.groupGL.add(v),this._updateLinesMesh(m,v,0,m.getData().count()),this.viewGL.setPostEffect(m.getModel("postEffect"),d)},incrementalPrepareRender:function(m,C,d){this.groupGL.removeAll(),this._glViewHelper.reset(m,d),this._currentStep=0,this.viewGL.setPostEffect(m.getModel("postEffect"),d)},incrementalRender:function(m,C,d,v){var A=this._linesMeshes[this._currentStep];A||(A=this._createLinesMesh(C),this._linesMeshes[this._currentStep]=A),this._updateLinesMesh(C,A,m.start,m.end),this.groupGL.add(A),v.getZr().refresh(),this._currentStep++},updateTransform:function(m,C,d){m.coordinateSystem.getRoamTransform&&this._glViewHelper.updateTransform(m,d)},_createLinesMesh:function(m){var C=new x.a.Mesh({$ignorePicking:!0,material:new x.a.Material({shader:x.a.createShader("ecgl.lines3D"),transparent:!0,depthMask:!1,depthTest:!1}),geometry:new b.a({segmentScale:10,useNativeLine:!0,dynamic:!1}),mode:x.a.Mesh.LINES,culling:!1});return C},_updateLinesMesh:function(m,C,d,v){var A=m.getData();C.material.blend=m.get("blendMode")==="lighter"?x.a.additiveBlend:null;var T=m.get("lineStyle.curveness")||0,O=m.get("polyline"),P=C.geometry,L=m.coordinateSystem,c=g.a.firstNotNull(m.get("lineStyle.width"),1);c>1?(C.material.shader!==this._meshLinesShader&&C.material.attachShader(this._meshLinesShader),C.mode=x.a.Mesh.TRIANGLES):(C.material.shader!==this._nativeLinesShader&&C.material.attachShader(this._nativeLinesShader),C.mode=x.a.Mesh.LINES),d=d||0,v=v||A.count(),P.resetOffset();var f=0,D=0,R=[],k=[],W=[],z=[],Z=[],Q=.3,te=.7;function $(){k[0]=R[0]*te+z[0]*Q-(R[1]-z[1])*T,k[1]=R[1]*te+z[1]*Q-(z[0]-R[0])*T,W[0]=R[0]*Q+z[0]*te-(R[1]-z[1])*T,W[1]=R[1]*Q+z[1]*te-(z[0]-R[0])*T}if(O||T!==0)for(var ie=d;ie0&&(k=c[0]),k instanceof Error)throw k;var W=new Error("Unhandled error."+(k?" ("+k.message+")":""));throw W.context=k,W}var z=R[L];if(z===void 0)return!1;if(typeof z=="function")X(z,this,c);else for(var Z=z.length,Q=C(z,Z),f=0;f0&&k.length>D&&!k.warned){k.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(L)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=P,W.type=L,W.count=k.length,ee(W)}return P}_.prototype.addListener=function(L,c){return y(this,L,c,!1)},_.prototype.on=_.prototype.addListener,_.prototype.prependListener=function(L,c){return y(this,L,c,!0)};function b(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function E(P,L,c){var f={fired:!1,wrapFn:void 0,target:P,type:L,listener:c},D=b.bind(f);return D.listener=c,f.wrapFn=D,D}_.prototype.once=function(L,c){return w(c),this.on(L,E(this,L,c)),this},_.prototype.prependOnceListener=function(L,c){return w(c),this.prependListener(L,E(this,L,c)),this},_.prototype.removeListener=function(L,c){var f,D,R,k,W;if(w(c),D=this._events,D===void 0)return this;if(f=D[L],f===void 0)return this;if(f===c||f.listener===c)--this._eventsCount===0?this._events=Object.create(null):(delete D[L],D.removeListener&&this.emit("removeListener",L,f.listener||c));else if(typeof f!="function"){for(R=-1,k=f.length-1;k>=0;k--)if(f[k]===c||f[k].listener===c){W=f[k].listener,R=k;break}if(R<0)return this;R===0?f.shift():d(f,R),f.length===1&&(D[L]=f[0]),D.removeListener!==void 0&&this.emit("removeListener",L,W||c)}return this},_.prototype.off=_.prototype.removeListener,_.prototype.removeAllListeners=function(L){var c,f,D;if(f=this._events,f===void 0)return this;if(f.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):f[L]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete f[L]),this;if(arguments.length===0){var R=Object.keys(f),k;for(D=0;D=0;D--)this.removeListener(L,c[D]);return this};function g(P,L,c){var f=P._events;if(f===void 0)return[];var D=f[L];return D===void 0?[]:typeof D=="function"?c?[D.listener||D]:[D]:c?v(D):C(D,D.length)}_.prototype.listeners=function(L){return g(this,L,!0)},_.prototype.rawListeners=function(L){return g(this,L,!1)},_.listenerCount=function(P,L){return typeof P.listenerCount=="function"?P.listenerCount(L):m.call(P,L)},_.prototype.listenerCount=m;function m(P){var L=this._events;if(L!==void 0){var c=L[P];if(typeof c=="function")return 1;if(c!==void 0)return c.length}return 0}_.prototype.eventNames=function(){return this._eventsCount>0?K(this._events):[]};function C(P,L){for(var c=new Array(L),f=0;f0&&(m=g.removeMin(),C=E[m],C.distance!==Number.POSITIVE_INFINITY);)b(m).forEach(d);return E}},59324:function(we,Me,X){var K=X(95329),ee=X(94558);we.exports=G;function G(_){return K.filter(ee(_),function(F){return F.length>1||F.length===1&&_.hasEdge(F[0],F[0])})}},22893:function(we,Me,X){var K=X(95329);we.exports=G;var ee=K.constant(1);function G(F,w,x){return _(F,w||ee,x||function(y){return F.outEdges(y)})}function _(F,w,x){var y={},b=F.nodes();return b.forEach(function(E){y[E]={},y[E][E]={distance:0},b.forEach(function(g){E!==g&&(y[E][g]={distance:Number.POSITIVE_INFINITY})}),x(E).forEach(function(g){var m=g.v===E?g.w:g.v,C=w(g);y[E][m]={distance:C,predecessor:E}})}),b.forEach(function(E){var g=y[E];b.forEach(function(m){var C=y[m];b.forEach(function(d){var v=C[E],A=g[d],T=C[d],O=v.distance+A.distance;O0;){if(E=b.removeMin(),K.has(y,E))x.setEdge(E,y[E]);else{if(m)throw new Error("Input graph is not connected: "+F);m=!0}F.nodeEdges(E).forEach(g)}return x}},94558:function(we,Me,X){var K=X(95329);we.exports=ee;function ee(G){var _=0,F=[],w={},x=[];function y(b){var E=w[b]={onStack:!0,lowlink:_,index:_++};if(F.push(b),G.successors(b).forEach(function(C){K.has(w,C)?w[C].onStack&&(E.lowlink=Math.min(E.lowlink,w[C].index)):(y(C),E.lowlink=Math.min(E.lowlink,w[C].lowlink))}),E.lowlink===E.index){var g=[],m;do m=F.pop(),w[m].onStack=!1,g.push(m);while(b!==m);x.push(g)}}return G.nodes().forEach(function(b){K.has(w,b)||y(b)}),x}},7793:function(we,Me,X){var K=X(95329);we.exports=ee,ee.CycleException=G;function ee(_){var F={},w={},x=[];function y(b){if(K.has(w,b))throw new G;K.has(F,b)||(w[b]=!0,F[b]=!0,K.each(_.predecessors(b),y),delete w[b],x.push(b))}if(K.each(_.sinks(),y),K.size(F)!==_.nodeCount())throw new G;return x}function G(){}G.prototype=new Error},36614:function(we,Me,X){var K=X(95329);we.exports=ee;function ee(){this._arr=[],this._keyIndices={}}ee.prototype.size=function(){return this._arr.length},ee.prototype.keys=function(){return this._arr.map(function(G){return G.key})},ee.prototype.has=function(G){return K.has(this._keyIndices,G)},ee.prototype.priority=function(G){var _=this._keyIndices[G];if(_!==void 0)return this._arr[_].priority},ee.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},ee.prototype.add=function(G,_){var F=this._keyIndices;if(G=String(G),!K.has(F,G)){var w=this._arr,x=w.length;return F[G]=x,w.push({key:G,priority:_}),this._decrease(x),!0}return!1},ee.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var G=this._arr.pop();return delete this._keyIndices[G.key],this._heapify(0),G.key},ee.prototype.decrease=function(G,_){var F=this._keyIndices[G];if(_>this._arr[F].priority)throw new Error("New priority is greater than current priority. Key: "+G+" Old: "+this._arr[F].priority+" New: "+_);this._arr[F].priority=_,this._decrease(F)},ee.prototype._heapify=function(G){var _=this._arr,F=2*G,w=F+1,x=G;F<_.length&&(x=_[F].priority<_[x].priority?F:x,w<_.length&&(x=_[w].priority<_[x].priority?w:x),x!==G&&(this._swap(G,x),this._heapify(x)))},ee.prototype._decrease=function(G){for(var _=this._arr,F=_[G].priority,w;G!==0&&(w=G>>1,!(_[w].priority1?d.setNode(v,m):d.setNode(v)}),this},F.prototype.setNode=function(g,m){return K.has(this._nodes,g)?(arguments.length>1&&(this._nodes[g]=m),this):(this._nodes[g]=arguments.length>1?m:this._defaultNodeLabelFn(g),this._isCompound&&(this._parent[g]=G,this._children[g]={},this._children[G][g]=!0),this._in[g]={},this._preds[g]={},this._out[g]={},this._sucs[g]={},++this._nodeCount,this)},F.prototype.node=function(g){return this._nodes[g]},F.prototype.hasNode=function(g){return K.has(this._nodes,g)},F.prototype.removeNode=function(g){var m=this;if(K.has(this._nodes,g)){var C=function(d){m.removeEdge(m._edgeObjs[d])};delete this._nodes[g],this._isCompound&&(this._removeFromParentsChildList(g),delete this._parent[g],K.each(this.children(g),function(d){m.setParent(d)}),delete this._children[g]),K.each(K.keys(this._in[g]),C),delete this._in[g],delete this._preds[g],K.each(K.keys(this._out[g]),C),delete this._out[g],delete this._sucs[g],--this._nodeCount}return this},F.prototype.setParent=function(g,m){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(K.isUndefined(m))m=G;else{m+="";for(var C=m;!K.isUndefined(C);C=this.parent(C))if(C===g)throw new Error("Setting "+m+" as parent of "+g+" would create a cycle");this.setNode(m)}return this.setNode(g),this._removeFromParentsChildList(g),this._parent[g]=m,this._children[m][g]=!0,this},F.prototype._removeFromParentsChildList=function(g){delete this._children[this._parent[g]][g]},F.prototype.parent=function(g){if(this._isCompound){var m=this._parent[g];if(m!==G)return m}},F.prototype.children=function(g){if(K.isUndefined(g)&&(g=G),this._isCompound){var m=this._children[g];if(m)return K.keys(m)}else{if(g===G)return this.nodes();if(this.hasNode(g))return[]}},F.prototype.predecessors=function(g){var m=this._preds[g];if(m)return K.keys(m)},F.prototype.successors=function(g){var m=this._sucs[g];if(m)return K.keys(m)},F.prototype.neighbors=function(g){var m=this.predecessors(g);if(m)return K.union(m,this.successors(g))},F.prototype.isLeaf=function(g){var m;return this.isDirected()?m=this.successors(g):m=this.neighbors(g),m.length===0},F.prototype.filterNodes=function(g){var m=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});m.setGraph(this.graph());var C=this;K.each(this._nodes,function(A,T){g(T)&&m.setNode(T,A)}),K.each(this._edgeObjs,function(A){m.hasNode(A.v)&&m.hasNode(A.w)&&m.setEdge(A,C.edge(A))});var d={};function v(A){var T=C.parent(A);return T===void 0||m.hasNode(T)?(d[A]=T,T):T in d?d[T]:v(T)}return this._isCompound&&K.each(m.nodes(),function(A){m.setParent(A,v(A))}),m},F.prototype.setDefaultEdgeLabel=function(g){return K.isFunction(g)||(g=K.constant(g)),this._defaultEdgeLabelFn=g,this},F.prototype.edgeCount=function(){return this._edgeCount},F.prototype.edges=function(){return K.values(this._edgeObjs)},F.prototype.setPath=function(g,m){var C=this,d=arguments;return K.reduce(g,function(v,A){return d.length>1?C.setEdge(v,A,m):C.setEdge(v,A),A}),this},F.prototype.setEdge=function(){var g,m,C,d,v=!1,A=arguments[0];typeof A=="object"&&A!==null&&"v"in A?(g=A.v,m=A.w,C=A.name,arguments.length===2&&(d=arguments[1],v=!0)):(g=A,m=arguments[1],C=arguments[3],arguments.length>2&&(d=arguments[2],v=!0)),g=""+g,m=""+m,K.isUndefined(C)||(C=""+C);var T=y(this._isDirected,g,m,C);if(K.has(this._edgeLabels,T))return v&&(this._edgeLabels[T]=d),this;if(!K.isUndefined(C)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(g),this.setNode(m),this._edgeLabels[T]=v?d:this._defaultEdgeLabelFn(g,m,C);var O=b(this._isDirected,g,m,C);return g=O.v,m=O.w,Object.freeze(O),this._edgeObjs[T]=O,w(this._preds[m],g),w(this._sucs[g],m),this._in[m][T]=O,this._out[g][T]=O,this._edgeCount++,this},F.prototype.edge=function(g,m,C){var d=arguments.length===1?E(this._isDirected,arguments[0]):y(this._isDirected,g,m,C);return this._edgeLabels[d]},F.prototype.hasEdge=function(g,m,C){var d=arguments.length===1?E(this._isDirected,arguments[0]):y(this._isDirected,g,m,C);return K.has(this._edgeLabels,d)},F.prototype.removeEdge=function(g,m,C){var d=arguments.length===1?E(this._isDirected,arguments[0]):y(this._isDirected,g,m,C),v=this._edgeObjs[d];return v&&(g=v.v,m=v.w,delete this._edgeLabels[d],delete this._edgeObjs[d],x(this._preds[m],g),x(this._sucs[g],m),delete this._in[m][d],delete this._out[g][d],this._edgeCount--),this},F.prototype.inEdges=function(g,m){var C=this._in[g];if(C){var d=K.values(C);return m?K.filter(d,function(v){return v.v===m}):d}},F.prototype.outEdges=function(g,m){var C=this._out[g];if(C){var d=K.values(C);return m?K.filter(d,function(v){return v.w===m}):d}},F.prototype.nodeEdges=function(g,m){var C=this.inEdges(g,m);if(C)return C.concat(this.outEdges(g,m))};function w(g,m){g[m]?g[m]++:g[m]=1}function x(g,m){--g[m]||delete g[m]}function y(g,m,C,d){var v=""+m,A=""+C;if(!g&&v>A){var T=v;v=A,A=T}return v+_+A+_+(K.isUndefined(d)?ee:d)}function b(g,m,C,d){var v=""+m,A=""+C;if(!g&&v>A){var T=v;v=A,A=T}var O={v,w:A};return d&&(O.name=d),O}function E(g,m){return y(g,m.v,m.w,m.name)}},89224:function(we,Me,X){we.exports={Graph:X(6349),version:X(83780)}},17401:function(we,Me,X){var K=X(95329),ee=X(6349);we.exports={write:G,read:w};function G(x){var y={options:{directed:x.isDirected(),multigraph:x.isMultigraph(),compound:x.isCompound()},nodes:_(x),edges:F(x)};return K.isUndefined(x.graph())||(y.value=K.clone(x.graph())),y}function _(x){return K.map(x.nodes(),function(y){var b=x.node(y),E=x.parent(y),g={v:y};return K.isUndefined(b)||(g.value=b),K.isUndefined(E)||(g.parent=E),g})}function F(x){return K.map(x.edges(),function(y){var b=x.edge(y),E={v:y.v,w:y.w};return K.isUndefined(y.name)||(E.name=y.name),K.isUndefined(b)||(E.value=b),E})}function w(x){var y=new ee(x.options).setGraph(x.value);return K.each(x.nodes,function(b){y.setNode(b.v,b.value),b.parent&&y.setParent(b.v,b.parent)}),K.each(x.edges,function(b){y.setEdge({v:b.v,w:b.w,name:b.name},b.value)}),y}},95329:function(we,Me,X){var K;try{K={clone:X(76833),constant:X(13503),each:X(76934),filter:X(64725),has:X(99946),isArray:X(80744),isEmpty:X(61627),isFunction:X(9363),isUndefined:X(16513),keys:X(55451),map:X(9924),reduce:X(16473),size:X(40617),transform:X(91116),union:X(44065),values:X(81229)}}catch(ee){}K||(K=window._),we.exports=K},83780:function(we){we.exports="2.1.8"},34634:function(we,Me,X){"use strict";X.r(Me),X.d(Me,{isAnyArray:function(){return ee}});const K=Object.prototype.toString;function ee(G){const _=K.call(G);return _.endsWith("Array]")&&!_.includes("Big")}},22948:function(we){we.exports=function(X){return!X||typeof X=="string"?!1:X instanceof Array||Array.isArray(X)||X.length>=0&&(X.splice instanceof Function||Object.getOwnPropertyDescriptor(X,X.length-1)&&X.constructor.name!=="String")}},15584:function(we,Me,X){var K=X(73893),ee=X(33152),G=K(ee,"DataView");we.exports=G},97288:function(we,Me,X){var K=X(73893),ee=X(33152),G=K(ee,"Promise");we.exports=G},23599:function(we,Me,X){var K=X(73893),ee=X(33152),G=K(ee,"Set");we.exports=G},98924:function(we,Me,X){var K=X(52166),ee=X(34776),G=X(40393);function _(F){var w=-1,x=F==null?0:F.length;for(this.__data__=new K;++w-1}we.exports=ee},94874:function(we){function Me(X,K,ee){for(var G=-1,_=X==null?0:X.length;++G<_;)if(ee(K,X[G]))return!0;return!1}we.exports=Me},75010:function(we){function Me(X,K){for(var ee=-1,G=X==null?0:X.length,_=Array(G);++ee0&&w(g)?F>1?G(g,F-1,w,x,y):K(y,g):x||(y[y.length]=g)}return y}we.exports=G},1585:function(we,Me,X){var K=X(14018),ee=X(55451);function G(_,F){return _&&K(_,F,ee)}we.exports=G},89147:function(we,Me,X){var K=X(1186),ee=X(9171);function G(_,F){F=K(F,_);for(var w=0,x=F.length;_!=null&&wK}we.exports=Me},3251:function(we){var Me=Object.prototype,X=Me.hasOwnProperty;function K(ee,G){return ee!=null&&X.call(ee,G)}we.exports=K},62348:function(we){function Me(X,K){return X!=null&&K in Object(X)}we.exports=Me},17424:function(we,Me,X){var K=X(51533),ee=X(8373),G=X(49237);function _(F,w,x){return w===w?G(F,w,x):K(F,ee,x)}we.exports=_},77295:function(we,Me,X){var K=X(84412),ee=X(93913);function G(_,F,w,x,y){return _===F?!0:_==null||F==null||!ee(_)&&!ee(F)?_!==_&&F!==F:K(_,F,w,x,G,y)}we.exports=G},84412:function(we,Me,X){var K=X(91866),ee=X(50401),G=X(57710),_=X(4983),F=X(66139),w=X(80744),x=X(57835),y=X(18397),b=1,E="[object Arguments]",g="[object Array]",m="[object Object]",C=Object.prototype,d=C.hasOwnProperty;function v(A,T,O,P,L,c){var f=w(A),D=w(T),R=f?g:F(A),k=D?g:F(T);R=R==E?m:R,k=k==E?m:k;var W=R==m,z=k==m,Z=R==k;if(Z&&x(A)){if(!x(T))return!1;f=!0,W=!1}if(Z&&!W)return c||(c=new K),f||y(A)?ee(A,T,O,P,L,c):G(A,T,R,O,P,L,c);if(!(O&b)){var Q=W&&d.call(A,"__wrapped__"),te=z&&d.call(T,"__wrapped__");if(Q||te){var $=Q?A.value():A,ie=te?T.value():T;return c||(c=new K),L($,ie,O,P,c)}}return Z?(c||(c=new K),_(A,T,O,P,L,c)):!1}we.exports=v},55005:function(we,Me,X){var K=X(66139),ee=X(93913),G="[object Map]";function _(F){return ee(F)&&K(F)==G}we.exports=_},51524:function(we,Me,X){var K=X(91866),ee=X(77295),G=1,_=2;function F(w,x,y,b){var E=y.length,g=E,m=!b;if(w==null)return!g;for(w=Object(w);E--;){var C=y[E];if(m&&C[2]?C[1]!==w[C[0]]:!(C[0]in w))return!1}for(;++E=x){var O=E?null:F(b);if(O)return w(O);v=!1,C=_,T=new K}else T=E?[]:A;e:for(;++m_||y&&b&&g&&!E&&!m||w&&b&&g||!F&&g||!x)return 1;if(!w&&!y&&!m&&G<_||m&&F&&x&&!w&&!y||E&&F&&x||!b&&x||!g)return-1}return 0}we.exports=ee},11249:function(we,Me,X){var K=X(83018);function ee(G,_,F){for(var w=-1,x=G.criteria,y=_.criteria,b=x.length,E=F.length;++w=E)return g;var m=F[w];return g*(m=="desc"?-1:1)}}return G.index-_.index}we.exports=ee},15168:function(we,Me,X){var K=X(95378),ee=X(20530);function G(_,F){return K(_,ee(_),F)}we.exports=G},71678:function(we,Me,X){var K=X(95378),ee=X(66817);function G(_,F){return K(_,ee(_),F)}we.exports=G},49164:function(we,Me,X){var K=X(24665);function ee(G,_){return function(F,w){if(F==null)return F;if(!K(F))return G(F,w);for(var x=F.length,y=_?x:-1,b=Object(F);(_?y--:++y-1?b[E?w[g]:g]:void 0}}we.exports=_},76106:function(we,Me,X){var K=X(36121),ee=X(8138),G=X(97341);function _(F){return function(w,x,y){return y&&typeof y!="number"&&ee(w,x,y)&&(x=y=void 0),w=G(w),x===void 0?(x=w,w=0):x=G(x),y=y===void 0?wd))return!1;var A=m.get(x),T=m.get(y);if(A&&T)return A==y&&T==x;var O=-1,P=!0,L=b&F?new K:void 0;for(m.set(x,y),m.set(y,x);++O2?b[2]:void 0;for(m&&G(b[0],b[1],m)&&(g=1);++E1&&_(w,x[0],x[1])?x=[]:y>2&&_(x[0],x[1],x[2])&&(x=[x[0]]),ee(w,K(x,1),[])});we.exports=F},4134:function(we){function Me(){return[]}we.exports=Me},97341:function(we,Me,X){var K=X(59406),ee=1/0,G=17976931348623157e292;function _(F){if(!F)return F===0?F:0;if(F=K(F),F===ee||F===-ee){var w=F<0?-1:1;return w*G}return F===F?F:0}we.exports=_},12824:function(we,Me,X){var K=X(97341);function ee(G){var _=K(G),F=_%1;return _===_?F?_-F:_:0}we.exports=ee},59406:function(we,Me,X){var K=X(13927),ee=X(20816),G=X(50315),_=NaN,F=/^[-+]0x[0-9a-f]+$/i,w=/^0b[01]+$/i,x=/^0o[0-7]+$/i,y=parseInt;function b(E){if(typeof E=="number")return E;if(G(E))return _;if(ee(E)){var g=typeof E.valueOf=="function"?E.valueOf():E;E=ee(g)?g+"":g}if(typeof E!="string")return E===0?E:+E;E=K(E);var m=w.test(E);return m||x.test(E)?y(E.slice(2),m?2:8):F.test(E)?_:+E}we.exports=b},44140:function(we,Me,X){var K=X(50230);function ee(G){return G==null?"":K(G)}we.exports=ee},91116:function(we,Me,X){var K=X(74809),ee=X(35024),G=X(1585),_=X(95979),F=X(49217),w=X(80744),x=X(57835),y=X(9363),b=X(20816),E=X(18397);function g(m,C,d){var v=w(m),A=v||x(m)||E(m);if(C=_(C,4),d==null){var T=m&&m.constructor;A?d=v?new T:[]:b(m)?d=y(T)?ee(F(m)):{}:d={}}return(A?K:G)(m,function(O,P,L){return C(d,O,P,L)}),d}we.exports=g},44065:function(we,Me,X){var K=X(9256),ee=X(92918),G=X(29098),_=X(41590),F=ee(function(w){return G(K(w,1,_,!0))});we.exports=F},95708:function(we,Me,X){var K=X(44140),ee=0;function G(_){var F=++ee;return K(_)+F}we.exports=G},81229:function(we,Me,X){var K=X(20720),ee=X(55451);function G(_){return _==null?[]:K(_,ee(_))}we.exports=G},65441:function(we,Me,X){var K=X(60348),ee=X(94484);function G(_,F){return ee(_||[],F||[],K)}we.exports=G},34402:function(we,Me,X){"use strict";X.r(Me),X.d(Me,{default:function(){return _}});var K=X(34634);function ee(F){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,K.isAnyArray)(F))throw new TypeError("input must be an array");if(F.length===0)throw new TypeError("input must not be empty");var x=w.fromIndex,y=x===void 0?0:x,b=w.toIndex,E=b===void 0?F.length:b;if(y<0||y>=F.length||!Number.isInteger(y))throw new Error("fromIndex must be a positive integer smaller than length");if(E<=y||E>F.length||!Number.isInteger(E))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var g=F[y],m=y+1;mg&&(g=F[m]);return g}function G(F){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,K.isAnyArray)(F))throw new TypeError("input must be an array");if(F.length===0)throw new TypeError("input must not be empty");var x=w.fromIndex,y=x===void 0?0:x,b=w.toIndex,E=b===void 0?F.length:b;if(y<0||y>=F.length||!Number.isInteger(y))throw new Error("fromIndex must be a positive integer smaller than length");if(E<=y||E>F.length||!Number.isInteger(E))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var g=F[y],m=y+1;m1&&arguments[1]!==void 0?arguments[1]:{};if((0,K.isAnyArray)(F)){if(F.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var x;if(w.output!==void 0){if(!(0,K.isAnyArray)(w.output))throw new TypeError("output option must be an array if specified");x=w.output}else x=new Array(F.length);var y=G(F),b=ee(F);if(y===b)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var E=w.min,g=E===void 0?w.autoMinMax?y:0:E,m=w.max,C=m===void 0?w.autoMinMax?b:1:m;if(g>=C)throw new RangeError("min option must be smaller than max option");for(var d=(C-g)/(b-y),v=0;v10&&arguments[10]!==void 0?arguments[10]:0,Ee=ae/100*360*((360-oe)/360),Ae=oe===0?0:{bottom:0,top:180,left:90,right:-90}[he],Fe=(100-re)/100*ie;pe==="round"&&re!==100&&(Fe+=me/2,Fe>=ie&&(Fe=ie-.01));var Ue=D/2;return{stroke:typeof se=="string"?se:void 0,strokeDasharray:"".concat(ie,"px ").concat($),strokeDashoffset:Fe+ge,transform:"rotate(".concat(ce+Ee+Ae,"deg)"),transformOrigin:"".concat(Ue,"px ").concat(Ue,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},k=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function W(te){var $=te!=null?te:[];return Array.isArray($)?$:[$]}var z=function($){var ie=(0,ee.Z)((0,ee.Z)({},x),$),ae=ie.id,re=ie.prefixCls,ce=ie.steps,oe=ie.strokeWidth,he=ie.trailWidth,se=ie.gapDegree,pe=se===void 0?0:se,me=ie.gapPosition,ge=ie.trailColor,Ee=ie.strokeLinecap,Ae=ie.style,Fe=ie.className,Ue=ie.strokeColor,nt=ie.percent,rt=(0,G.Z)(ie,k),qe=D/2,dt=O(ae),yt="".concat(dt,"-gradient"),je=qe-oe/2,at=Math.PI*2*je,it=pe>0?90+pe/2:-90,ht=at*((360-pe)/360),ut=(0,m.Z)(ce)==="object"?ce:{count:ce,gap:2},Mt=ut.count,Ce=ut.gap,ot=W(nt),Pe=W(Ue),Ne=Pe.find(function(xt){return xt&&(0,m.Z)(xt)==="object"}),We=Ne&&(0,m.Z)(Ne)==="object",Be=We?"butt":Ee,Ve=R(at,ht,0,100,it,pe,me,ge,Be,oe),$e=y(),lt=function(){var wt=0;return ot.map(function(Dt,kt){var Yt=Pe[kt]||Pe[Pe.length-1],Wt=R(at,ht,wt,Dt,it,pe,me,Yt,Be,oe);return wt+=Dt,_.createElement(f,{key:kt,color:Yt,ptg:Dt,radius:je,prefixCls:re,gradientId:yt,style:Wt,strokeLinecap:Be,strokeWidth:oe,gapDegree:pe,ref:function(en){$e[kt]=en},size:D})}).reverse()},pt=function(){var wt=Math.round(Mt*(ot[0]/100)),Dt=100/Mt,kt=0;return new Array(Mt).fill(null).map(function(Yt,Wt){var Ot=Wt<=wt-1?Pe[0]:ge,en=Ot&&(0,m.Z)(Ot)==="object"?"url(#".concat(yt,")"):void 0,vn=R(at,ht,kt,Dt,it,pe,me,Ot,"butt",oe,Ce);return kt+=(ht-vn.strokeDashoffset+Ce)*100/ht,_.createElement("circle",{key:Wt,className:"".concat(re,"-circle-path"),r:je,cx:qe,cy:qe,stroke:en,strokeWidth:oe,opacity:1,style:vn,ref:function(Fn){$e[Wt]=Fn}})})};return _.createElement("svg",(0,K.Z)({className:w()("".concat(re,"-circle"),Fe),viewBox:"0 0 ".concat(D," ").concat(D),style:Ae,id:ae,role:"presentation"},rt),!Mt&&_.createElement("circle",{className:"".concat(re,"-circle-trail"),r:je,cx:qe,cy:qe,stroke:ge,strokeLinecap:Be,strokeWidth:he||oe,style:Ve}),Mt?pt():lt())},Z=z,Q={Line:g,Circle:Z}},738:function(we,Me,X){"use strict";X.d(Me,{Z:function(){return L}});var K=X(14809),ee=X(4635),G=X(50298),_=X(62646),F=X(92310),w=X.n(F),x=X(18929),y=X(10228),b=X(26112),E=X(59301);function g(c,f){var D=c.disabled,R=c.prefixCls,k=c.character,W=c.characterRender,z=c.index,Z=c.count,Q=c.value,te=c.allowHalf,$=c.focused,ie=c.onHover,ae=c.onClick,re=function(Ee){ie(Ee,z)},ce=function(Ee){ae(Ee,z)},oe=function(Ee){Ee.keyCode===y.Z.ENTER&&ae(Ee,z)},he=z+1,se=new Set([R]);Q===0&&z===0&&$?se.add("".concat(R,"-focused")):te&&Q+.5>=he&&Qz?"true":"false","aria-posinset":z+1,"aria-setsize":Z,tabIndex:D?-1:0},E.createElement("div",{className:"".concat(R,"-first")},pe),E.createElement("div",{className:"".concat(R,"-second")},pe)));return W&&(me=W(me,c)),me}var m=E.forwardRef(g);function C(){var c=E.useRef({});function f(R){return c.current[R]}function D(R){return function(k){c.current[R]=k}}return[f,D]}function d(c){var f=c.pageXOffset,D="scrollLeft";if(typeof f!="number"){var R=c.document;f=R.documentElement[D],typeof f!="number"&&(f=R.body[D])}return f}function v(c){var f,D,R=c.ownerDocument,k=R.body,W=R&&R.documentElement,z=c.getBoundingClientRect();return f=z.left,D=z.top,f-=W.clientLeft||k.clientLeft||0,D-=W.clientTop||k.clientTop||0,{left:f,top:D}}function A(c){var f=v(c),D=c.ownerDocument,R=D.defaultView||D.parentWindow;return f.left+=d(R),f.left}var T=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function O(c,f){var D=c.prefixCls,R=D===void 0?"rc-rate":D,k=c.className,W=c.defaultValue,z=c.value,Z=c.count,Q=Z===void 0?5:Z,te=c.allowHalf,$=te===void 0?!1:te,ie=c.allowClear,ae=ie===void 0?!0:ie,re=c.keyboard,ce=re===void 0?!0:re,oe=c.character,he=oe===void 0?"\u2605":oe,se=c.characterRender,pe=c.disabled,me=c.direction,ge=me===void 0?"ltr":me,Ee=c.tabIndex,Ae=Ee===void 0?0:Ee,Fe=c.autoFocus,Ue=c.onHoverChange,nt=c.onChange,rt=c.onFocus,qe=c.onBlur,dt=c.onKeyDown,yt=c.onMouseLeave,je=(0,_.Z)(c,T),at=C(),it=(0,G.Z)(at,2),ht=it[0],ut=it[1],Mt=E.useRef(null),Ce=function(){if(!pe){var tn;(tn=Mt.current)===null||tn===void 0||tn.focus()}};E.useImperativeHandle(f,function(){return{focus:Ce,blur:function(){if(!pe){var tn;(tn=Mt.current)===null||tn===void 0||tn.blur()}}}});var ot=(0,x.Z)(W||0,{value:z}),Pe=(0,G.Z)(ot,2),Ne=Pe[0],We=Pe[1],Be=(0,x.Z)(null),Ve=(0,G.Z)(Be,2),$e=Ve[0],lt=Ve[1],pt=function(tn,An){var wn=ge==="rtl",sn=tn+1;if($){var ir=ht(tn),Nt=A(ir),zt=ir.clientWidth;(wn&&An-Nt>zt/2||!wn&&An-Nt0&&!wn||An===y.Z.RIGHT&&Ne>0&&wn?(xt(Ne-sn),tn.preventDefault()):An===y.Z.LEFT&&Ne5&&arguments[5]!==void 0?arguments[5]:!1,tt=arguments.length>6?arguments[6]:void 0,mt=arguments.length>7?arguments[7]:void 0,Tt=E.useMemo(function(){if((0,x.Z)(Je)==="object")return Je.clearIcon;if(ke)return ke},[Je,ke]),It=E.useMemo(function(){return!!(!Ze&&Je&&(He.length||tt)&&!(mt==="combobox"&&tt===""))},[Je,Ze,He.length,tt,mt]);return{allowClear:It,clearIcon:E.createElement(T,{className:"".concat(De,"-clear"),onMouseDown:Ke,customizeIcon:Tt},"\xD7")}},P=E.createContext(null);function L(){return E.useContext(P)}function c(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,De=E.useState(!1),Ke=(0,F.Z)(De,2),He=Ke[0],Je=Ke[1],ke=E.useRef(null),Ze=function(){window.clearTimeout(ke.current)};E.useEffect(function(){return Ze},[]);var tt=function(Tt,It){Ze(),ke.current=window.setTimeout(function(){Je(Tt),It&&It()},Re)};return[He,tt,Ze]}function f(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,De=E.useRef(null),Ke=E.useRef(null);E.useEffect(function(){return function(){window.clearTimeout(Ke.current)}},[]);function He(Je){(Je||De.current===null)&&(De.current=Je),window.clearTimeout(Ke.current),Ke.current=window.setTimeout(function(){De.current=null},Re)}return[function(){return De.current},He]}function D(Re,De,Ke,He){var Je=E.useRef(null);Je.current={open:De,triggerOpen:Ke,customizedTrigger:He},E.useEffect(function(){function ke(Ze){var tt;if(!((tt=Je.current)!==null&&tt!==void 0&&tt.customizedTrigger)){var mt=Ze.target;mt.shadowRoot&&Ze.composed&&(mt=Ze.composedPath()[0]||mt),Je.current.open&&Re().filter(function(Tt){return Tt}).every(function(Tt){return!Tt.contains(mt)&&Tt!==mt})&&Je.current.triggerOpen(!1)}}return window.addEventListener("mousedown",ke),function(){return window.removeEventListener("mousedown",ke)}},[])}var R=X(10228);function k(Re){return Re&&![R.Z.ESC,R.Z.SHIFT,R.Z.BACKSPACE,R.Z.TAB,R.Z.WIN_KEY,R.Z.ALT,R.Z.META,R.Z.WIN_KEY_RIGHT,R.Z.CTRL,R.Z.SEMICOLON,R.Z.EQUALS,R.Z.CAPS_LOCK,R.Z.CONTEXT_MENU,R.Z.F1,R.Z.F2,R.Z.F3,R.Z.F4,R.Z.F5,R.Z.F6,R.Z.F7,R.Z.F8,R.Z.F9,R.Z.F10,R.Z.F11,R.Z.F12].includes(Re)}var W=X(26112),z=X(11780);function Z(Re,De,Ke){var He=(0,_.Z)((0,_.Z)({},Re),Ke?De:{});return Object.keys(De).forEach(function(Je){var ke=De[Je];typeof ke=="function"&&(He[Je]=function(){for(var Ze,tt=arguments.length,mt=new Array(tt),Tt=0;Ttln&&(gi="".concat(Vi.slice(0,ln),"..."))}var na=function(ni){ni&&ni.stopPropagation(),gn(cn)};return typeof Xt=="function"?ji(gr,gi,Tn,hr,na):Ma(cn,gi,Tn,hr,na)},zn=function(cn){if(!Je.length)return null;var Tn=typeof Jt=="function"?Jt(cn):Jt;return typeof Xt=="function"?ji(void 0,Tn,!1,!1,void 0,!0):Ma({title:Tn},Tn,!1)},Ut=E.createElement("div",{className:"".concat(Ir,"-search"),style:{width:xr},onFocus:function(){ti(!0)},onBlur:function(){ti(!1)}},E.createElement(ae,{ref:mt,open:ke,prefixCls:He,id:Ke,inputElement:null,disabled:It,autoFocus:Bt,autoComplete:Qe,editable:Kr,activeDescendantId:gt,value:ta,onKeyDown:pn,onMouseDown:Rn,onChange:Mn,onPaste:Hn,onCompositionStart:Yn,onCompositionEnd:Gn,onBlur:Cn,tabIndex:Pt,attrs:(0,W.Z)(De,!0)}),E.createElement("span",{ref:Mr,className:"".concat(Ir,"-search-mirror"),"aria-hidden":!0},ta,"\xA0")),Kt=E.createElement(z.Z,{prefixCls:"".concat(Ir,"-overflow"),data:Je,renderItem:Xr,renderRest:zn,suffix:Ut,itemKey:Ee,maxCount:on});return E.createElement("span",{className:"".concat(Ir,"-wrap")},Kt,!Je.length&&!ta&&E.createElement("span",{className:"".concat(Ir,"-placeholder")},Tt))},Ue=Fe,nt=function(De){var Ke=De.inputElement,He=De.prefixCls,Je=De.id,ke=De.inputRef,Ze=De.disabled,tt=De.autoFocus,mt=De.autoComplete,Tt=De.activeDescendantId,It=De.mode,vt=De.open,Rt=De.values,Bt=De.placeholder,Qe=De.tabIndex,gt=De.showSearch,Pt=De.searchValue,St=De.activeValue,on=De.maxLength,ln=De.onInputKeyDown,Zt=De.onInputMouseDown,Jt=De.onInputChange,Xt=De.onInputPaste,dn=De.onInputCompositionStart,gn=De.onInputCompositionEnd,Mn=De.onInputBlur,Hn=De.title,pn=E.useState(!1),Rn=(0,F.Z)(pn,2),Yn=Rn[0],Gn=Rn[1],Cn=It==="combobox",Mr=Cn||gt,kr=Rt[0],Rr=Pt||"";Cn&&St&&!Yn&&(Rr=St),E.useEffect(function(){Cn&&Gn(!1)},[Cn,St]);var xr=It!=="combobox"&&!vt&&!gt?!1:!!Rr,rr=Hn===void 0?me(kr):Hn,Zn=E.useMemo(function(){return kr?null:E.createElement("span",{className:"".concat(He,"-selection-placeholder"),style:xr?{visibility:"hidden"}:void 0},Bt)},[kr,xr,Bt,He]);return E.createElement("span",{className:"".concat(He,"-selection-wrap")},E.createElement("span",{className:"".concat(He,"-selection-search")},E.createElement(ae,{ref:ke,prefixCls:He,id:Je,open:vt,inputElement:Ke,disabled:Ze,autoFocus:tt,autoComplete:mt,editable:Mr,activeDescendantId:Tt,value:Rr,onKeyDown:ln,onMouseDown:Zt,onChange:function(ei){Gn(!0),Jt(ei)},onPaste:Xt,onCompositionStart:dn,onCompositionEnd:gn,onBlur:Mn,tabIndex:Qe,attrs:(0,W.Z)(De,!0),maxLength:Cn?on:void 0})),!Cn&&kr?E.createElement("span",{className:"".concat(He,"-selection-item"),title:rr,style:xr?{visibility:"hidden"}:void 0},kr.label):null,Zn)},rt=nt,qe=function(De,Ke){var He=(0,E.useRef)(null),Je=(0,E.useRef)(!1),ke=De.prefixCls,Ze=De.open,tt=De.mode,mt=De.showSearch,Tt=De.tokenWithEnter,It=De.disabled,vt=De.prefix,Rt=De.autoClearSearchValue,Bt=De.onSearch,Qe=De.onSearchSubmit,gt=De.onToggleOpen,Pt=De.onInputKeyDown,St=De.onInputBlur,on=De.domRef;E.useImperativeHandle(Ke,function(){return{focus:function(rr){He.current.focus(rr)},blur:function(){He.current.blur()}}});var ln=f(0),Zt=(0,F.Z)(ln,2),Jt=Zt[0],Xt=Zt[1],dn=function(rr){var Zn=rr.which,Fr=He.current instanceof HTMLTextAreaElement;!Fr&&Ze&&(Zn===R.Z.UP||Zn===R.Z.DOWN)&&rr.preventDefault(),Pt&&Pt(rr),Zn===R.Z.ENTER&&tt==="tags"&&!Je.current&&!Ze&&(Qe==null||Qe(rr.target.value)),!(Fr&&!Ze&&~[R.Z.UP,R.Z.DOWN,R.Z.LEFT,R.Z.RIGHT].indexOf(Zn))&&k(Zn)&>(!0)},gn=function(){Xt(!0)},Mn=(0,E.useRef)(null),Hn=function(rr){Bt(rr,!0,Je.current)!==!1&>(!0)},pn=function(){Je.current=!0},Rn=function(rr){Je.current=!1,tt!=="combobox"&&Hn(rr.target.value)},Yn=function(rr){var Zn=rr.target.value;if(Tt&&Mn.current&&/[\r\n]/.test(Mn.current)){var Fr=Mn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Zn=Zn.replace(Fr,Mn.current)}Mn.current=null,Hn(Zn)},Gn=function(rr){var Zn=rr.clipboardData,Fr=Zn==null?void 0:Zn.getData("text");Mn.current=Fr||""},Cn=function(rr){var Zn=rr.target;if(Zn!==He.current){var Fr=document.body.style.msTouchAction!==void 0;Fr?setTimeout(function(){He.current.focus()}):He.current.focus()}},Mr=function(rr){var Zn=Jt();rr.target!==He.current&&!Zn&&!(tt==="combobox"&&It)&&rr.preventDefault(),(tt!=="combobox"&&(!mt||!Zn)||!Ze)&&(Ze&&Rt!==!1&&Bt("",!0,!1),gt())},kr={inputRef:He,onInputKeyDown:dn,onInputMouseDown:gn,onInputChange:Yn,onInputPaste:Gn,onInputCompositionStart:pn,onInputCompositionEnd:Rn,onInputBlur:St},Rr=tt==="multiple"||tt==="tags"?E.createElement(Ue,(0,K.Z)({},De,kr)):E.createElement(rt,(0,K.Z)({},De,kr));return E.createElement("div",{ref:on,className:"".concat(ke,"-selector"),onClick:Cn,onMouseDown:Mr},vt&&E.createElement("div",{className:"".concat(ke,"-prefix")},vt),Rr)},dt=E.forwardRef(qe),yt=dt,je=X(65966),at=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],it=function(De){var Ke=De===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ke,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ke,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ke,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ke,adjustY:1},htmlRegion:"scroll"}}},ht=function(De,Ke){var He=De.prefixCls,Je=De.disabled,ke=De.visible,Ze=De.children,tt=De.popupElement,mt=De.animation,Tt=De.transitionName,It=De.dropdownStyle,vt=De.dropdownClassName,Rt=De.direction,Bt=Rt===void 0?"ltr":Rt,Qe=De.placement,gt=De.builtinPlacements,Pt=De.dropdownMatchSelectWidth,St=De.dropdownRender,on=De.dropdownAlign,ln=De.getPopupContainer,Zt=De.empty,Jt=De.getTriggerDOMNode,Xt=De.onPopupVisibleChange,dn=De.onPopupMouseEnter,gn=(0,w.Z)(De,at),Mn="".concat(He,"-dropdown"),Hn=tt;St&&(Hn=St(tt));var pn=E.useMemo(function(){return gt||it(Pt)},[gt,Pt]),Rn=mt?"".concat(Mn,"-").concat(mt):Tt,Yn=typeof Pt=="number",Gn=E.useMemo(function(){return Yn?null:Pt===!1?"minWidth":"width"},[Pt,Yn]),Cn=It;Yn&&(Cn=(0,_.Z)((0,_.Z)({},Cn),{},{width:Pt}));var Mr=E.useRef(null);return E.useImperativeHandle(Ke,function(){return{getPopupElement:function(){var Rr;return(Rr=Mr.current)===null||Rr===void 0?void 0:Rr.popupElement}}}),E.createElement(je.Z,(0,K.Z)({},gn,{showAction:Xt?["click"]:[],hideAction:Xt?["click"]:[],popupPlacement:Qe||(Bt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:pn,prefixCls:Mn,popupTransitionName:Rn,popup:E.createElement("div",{onMouseEnter:dn},Hn),ref:Mr,stretch:Gn,popupAlign:on,popupVisible:ke,getPopupContainer:ln,popupClassName:m()(vt,(0,G.Z)({},"".concat(Mn,"-empty"),Zt)),popupStyle:Cn,getTriggerDOMNode:Jt,onPopupVisibleChange:Xt}),Ze)},ut=E.forwardRef(ht),Mt=ut,Ce=X(21696);function ot(Re,De){var Ke=Re.key,He;return"value"in Re&&(He=Re.value),Ke!=null?Ke:He!==void 0?He:"rc-index-key-".concat(De)}function Pe(Re){return typeof Re!="undefined"&&!Number.isNaN(Re)}function Ne(Re,De){var Ke=Re||{},He=Ke.label,Je=Ke.value,ke=Ke.options,Ze=Ke.groupLabel,tt=He||(De?"children":"label");return{label:tt,value:Je||"value",options:ke||"options",groupLabel:Ze||tt}}function We(Re){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ke=De.fieldNames,He=De.childrenAsData,Je=[],ke=Ne(Ke,!1),Ze=ke.label,tt=ke.value,mt=ke.options,Tt=ke.groupLabel;function It(vt,Rt){Array.isArray(vt)&&vt.forEach(function(Bt){if(Rt||!(mt in Bt)){var Qe=Bt[tt];Je.push({key:ot(Bt,Je.length),groupOption:Rt,data:Bt,label:Bt[Ze],value:Qe})}else{var gt=Bt[Tt];gt===void 0&&He&&(gt=Bt.label),Je.push({key:ot(Bt,Je.length),group:!0,data:Bt,label:gt}),It(Bt[mt],!0)}})}return It(Re,!1),Je}function Be(Re){var De=(0,_.Z)({},Re);return"props"in De||Object.defineProperty(De,"props",{get:function(){return(0,b.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),De}}),De}var Ve=function(De,Ke,He){if(!Ke||!Ke.length)return null;var Je=!1,ke=function tt(mt,Tt){var It=(0,Ce.Z)(Tt),vt=It[0],Rt=It.slice(1);if(!vt)return[mt];var Bt=mt.split(vt);return Je=Je||Bt.length>1,Bt.reduce(function(Qe,gt){return[].concat((0,ee.Z)(Qe),(0,ee.Z)(tt(gt,Rt)))},[]).filter(Boolean)},Ze=ke(De,Ke);return Je?typeof He!="undefined"?Ze.slice(0,He):Ze:null},$e=E.createContext(null),lt=$e;function pt(Re){var De=Re.visible,Ke=Re.values;if(!De)return null;var He=50;return E.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Ke.slice(0,He).map(function(Je){var ke=Je.label,Ze=Je.value;return["number","string"].includes((0,x.Z)(ke))?ke:Ze}).join(", ")),Ke.length>He?", ...":null)}var xt=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],wt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Dt=function(De){return De==="tags"||De==="multiple"},kt=E.forwardRef(function(Re,De){var Ke,He=Re.id,Je=Re.prefixCls,ke=Re.className,Ze=Re.showSearch,tt=Re.tagRender,mt=Re.direction,Tt=Re.omitDomProps,It=Re.displayValues,vt=Re.onDisplayValuesChange,Rt=Re.emptyOptions,Bt=Re.notFoundContent,Qe=Bt===void 0?"Not Found":Bt,gt=Re.onClear,Pt=Re.mode,St=Re.disabled,on=Re.loading,ln=Re.getInputElement,Zt=Re.getRawInputElement,Jt=Re.open,Xt=Re.defaultOpen,dn=Re.onDropdownVisibleChange,gn=Re.activeValue,Mn=Re.onActiveValueChange,Hn=Re.activeDescendantId,pn=Re.searchValue,Rn=Re.autoClearSearchValue,Yn=Re.onSearch,Gn=Re.onSearchSplit,Cn=Re.tokenSeparators,Mr=Re.allowClear,kr=Re.prefix,Rr=Re.suffixIcon,xr=Re.clearIcon,rr=Re.OptionList,Zn=Re.animation,Fr=Re.transitionName,ei=Re.dropdownStyle,ti=Re.dropdownClassName,Ir=Re.dropdownMatchSelectWidth,ta=Re.dropdownRender,Kr=Re.dropdownAlign,Ma=Re.placement,ji=Re.builtinPlacements,Xr=Re.getPopupContainer,zn=Re.showAction,Ut=zn===void 0?[]:zn,Kt=Re.onFocus,mn=Re.onBlur,cn=Re.onKeyUp,Tn=Re.onKeyDown,ar=Re.onMouseDown,gr=(0,w.Z)(Re,xt),hr=Dt(Pt),gi=(Ze!==void 0?Ze:hr)||Pt==="combobox",Vi=(0,_.Z)({},gr);wt.forEach(function(sr){delete Vi[sr]}),Tt==null||Tt.forEach(function(sr){delete Vi[sr]});var na=E.useState(!1),ws=(0,F.Z)(na,2),ni=ws[0],Vo=ws[1];E.useEffect(function(){Vo((0,d.Z)())},[]);var uo=E.useRef(null),Ha=E.useRef(null),Zi=E.useRef(null),ha=E.useRef(null),Mi=E.useRef(null),Ms=E.useRef(!1),co=c(),Gs=(0,F.Z)(co,3),Ga=Gs[0],Aa=Gs[1],Cl=Gs[2];E.useImperativeHandle(De,function(){var sr,jn;return{focus:(sr=ha.current)===null||sr===void 0?void 0:sr.focus,blur:(jn=ha.current)===null||jn===void 0?void 0:jn.blur,scrollTo:function(ra){var mi;return(mi=Mi.current)===null||mi===void 0?void 0:mi.scrollTo(ra)},nativeElement:uo.current||Ha.current}});var ja=E.useMemo(function(){var sr;if(Pt!=="combobox")return pn;var jn=(sr=It[0])===null||sr===void 0?void 0:sr.value;return typeof jn=="string"||typeof jn=="number"?String(jn):""},[pn,Pt,It]),_u=Pt==="combobox"&&typeof ln=="function"&&ln()||null,fa=typeof Zt=="function"&&Zt(),Dc=(0,v.x1)(Ha,fa==null||(Ke=fa.props)===null||Ke===void 0?void 0:Ke.ref),Eu=E.useState(!1),xu=(0,F.Z)(Eu,2),Cc=xu[0],bu=xu[1];(0,C.Z)(function(){bu(!0)},[]);var wu=(0,y.Z)(!1,{defaultValue:Xt,value:Jt}),ho=(0,F.Z)(wu,2),Ll=ho[0],Gr=ho[1],pi=Cc?Ll:!1,Ta=!Qe&&Rt;(St||Ta&&pi&&Pt==="combobox")&&(pi=!1);var Zo=Ta?!1:pi,Sn=E.useCallback(function(sr){var jn=sr!==void 0?sr:!pi;St||(Gr(jn),pi!==jn&&(dn==null||dn(jn)))},[St,pi,Gr,dn]),On=E.useMemo(function(){return(Cn||[]).some(function(sr){return[` `,`\r `].includes(sr)})},[Cn]),Ln=E.useContext(lt)||{},In=Ln.maxCount,pr=Ln.rawValues,zr=function(jn,Ki,ra){if(!(hr&&Pe(In)&&(pr==null?void 0:pr.size)>=In)){var mi=!0,Ni=jn;Mn==null||Mn(null);var Ps=Ve(jn,Cn,Pe(In)?In-pr.size:void 0),as=ra?null:Ps;return Pt!=="combobox"&&as&&(Ni="",Gn==null||Gn(as),Sn(!1),mi=!1),Yn&&ja!==Ni&&Yn(Ni,{source:Ki?"typing":"effect"}),mi}},rs=function(jn){!jn||!jn.trim()||Yn(jn,{source:"submit"})};E.useEffect(function(){!pi&&!hr&&Pt!=="combobox"&&zr("",!1,!1)},[pi]),E.useEffect(function(){Ll&&St&&Gr(!1),St&&!Ms.current&&Aa(!1)},[St]);var Va=f(),js=(0,F.Z)(Va,2),oi=js[0],Vs=js[1],is=E.useRef(!1),Lc=function(jn){var Ki=oi(),ra=jn.key,mi=ra==="Enter";if(mi&&(Pt!=="combobox"&&jn.preventDefault(),pi||Sn(!0)),Vs(!!ja),ra==="Backspace"&&!Ki&&hr&&!ja&&It.length){for(var Ni=(0,ee.Z)(It),Ps=null,as=Ni.length-1;as>=0;as-=1){var fo=Ni[as];if(!fo.disabled){Ni.splice(as,1),Ps=fo;break}}Ps&&vt(Ni,{type:"remove",values:[Ps]})}for(var Ko=arguments.length,vo=new Array(Ko>1?Ko-1:0),Mu=1;Mu1?Ki-1:0),mi=1;mi1?Ps-1:0),fo=1;fo=Qe},[tt,Qe,Zt==null?void 0:Zt.size]),Cn=function(Ut){Ut.preventDefault()},Mr=function(Ut){var Kt;(Kt=Yn.current)===null||Kt===void 0||Kt.scrollTo(typeof Ut=="number"?{index:Ut}:Ut)},kr=E.useCallback(function(zn){return mt==="combobox"?!1:Zt.has(zn)},[mt,(0,ee.Z)(Zt).toString(),Zt.size]),Rr=function(Ut){for(var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,mn=Rn.length,cn=0;cn1&&arguments[1]!==void 0?arguments[1]:!1;Fr(Ut);var mn={source:Kt?"keyboard":"mouse"},cn=Rn[Ut];if(!cn){Pt(null,-1,mn);return}Pt(cn.value,Ut,mn)};(0,E.useEffect)(function(){ei(St!==!1?Rr(0):-1)},[Rn.length,Tt]);var ti=E.useCallback(function(zn){return mt==="combobox"?String(zn).toLowerCase()===Tt.toLowerCase():Zt.has(zn)},[mt,Tt,(0,ee.Z)(Zt).toString(),Zt.size]);(0,E.useEffect)(function(){var zn=setTimeout(function(){if(!tt&&Ze&&Zt.size===1){var Kt=Array.from(Zt)[0],mn=Rn.findIndex(function(cn){var Tn=cn.data;return Tt?String(Tn.value).startsWith(Tt):Tn.value===Kt});mn!==-1&&(ei(mn),Mr(mn))}});if(Ze){var Ut;(Ut=Yn.current)===null||Ut===void 0||Ut.scrollTo(void 0)}return function(){return clearTimeout(zn)}},[Ze,Tt]);var Ir=function(Ut){Ut!==void 0&&on(Ut,{selected:!Zt.has(Ut)}),tt||It(!1)};if(E.useImperativeHandle(Ke,function(){return{onKeyDown:function(Ut){var Kt=Ut.which,mn=Ut.ctrlKey;switch(Kt){case R.Z.N:case R.Z.P:case R.Z.UP:case R.Z.DOWN:{var cn=0;if(Kt===R.Z.UP?cn=-1:Kt===R.Z.DOWN?cn=1:br()&&mn&&(Kt===R.Z.N?cn=1:Kt===R.Z.P&&(cn=-1)),cn!==0){var Tn=Rr(Zn+cn,cn);Mr(Tn),ei(Tn,!0)}break}case R.Z.TAB:case R.Z.ENTER:{var ar,gr=Rn[Zn];gr&&!(gr!=null&&(ar=gr.data)!==null&&ar!==void 0&&ar.disabled)&&!Gn?Ir(gr.value):Ir(void 0),Ze&&Ut.preventDefault();break}case R.Z.ESC:It(!1),Ze&&Ut.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ut){Mr(Ut)}}}),Rn.length===0)return E.createElement("div",{role:"listbox",id:"".concat(ke,"_list"),className:"".concat(pn,"-empty"),onMouseDown:Cn},vt);var ta=Object.keys(Jt).map(function(zn){return Jt[zn]}),Kr=function(Ut){return Ut.label};function Ma(zn,Ut){var Kt=zn.group;return{role:Kt?"presentation":"option",id:"".concat(ke,"_list_").concat(Ut)}}var ji=function(Ut){var Kt=Rn[Ut];if(!Kt)return null;var mn=Kt.data||{},cn=mn.value,Tn=Kt.group,ar=(0,W.Z)(mn,!0),gr=Kr(Kt);return Kt?E.createElement("div",(0,K.Z)({"aria-label":typeof gr=="string"&&!Tn?gr:null},ar,{key:Ut},Ma(Kt,Ut),{"aria-selected":ti(cn)}),cn):null},Xr={role:"listbox",id:"".concat(ke,"_list")};return E.createElement(E.Fragment,null,Xt&&E.createElement("div",(0,K.Z)({},Xr,{style:{height:0,width:0,overflow:"hidden"}}),ji(Zn-1),ji(Zn),ji(Zn+1)),E.createElement(qn.Z,{itemKey:"key",ref:Yn,data:Rn,height:gn,itemHeight:Mn,fullHeight:!1,onMouseDown:Cn,onScroll:Rt,virtual:Xt,direction:dn,innerProps:Xt?null:Xr},function(zn,Ut){var Kt=zn.group,mn=zn.groupOption,cn=zn.data,Tn=zn.label,ar=zn.value,gr=cn.key;if(Kt){var hr,gi=(hr=cn.title)!==null&&hr!==void 0?hr:tr(Tn)?Tn.toString():void 0;return E.createElement("div",{className:m()(pn,"".concat(pn,"-group"),cn.className),title:gi},Tn!==void 0?Tn:gr)}var Vi=cn.disabled,na=cn.title,ws=cn.children,ni=cn.style,Vo=cn.className,uo=(0,w.Z)(cn,Vn),Ha=(0,Fn.Z)(uo,ta),Zi=kr(ar),ha=Vi||!Zi&&Gn,Mi="".concat(pn,"-option"),Ms=m()(pn,Mi,Vo,(0,G.Z)((0,G.Z)((0,G.Z)((0,G.Z)({},"".concat(Mi,"-grouped"),mn),"".concat(Mi,"-active"),Zn===Ut&&!ha),"".concat(Mi,"-disabled"),ha),"".concat(Mi,"-selected"),Zi)),co=Kr(zn),Gs=!ln||typeof ln=="function"||Zi,Ga=typeof co=="number"?co:co||ar,Aa=tr(Ga)?Ga.toString():void 0;return na!==void 0&&(Aa=na),E.createElement("div",(0,K.Z)({},(0,W.Z)(Ha),Xt?{}:Ma(zn,Ut),{"aria-selected":ti(ar),className:Ms,title:Aa,onMouseMove:function(){Zn===Ut||ha||ei(Ut)},onClick:function(){ha||Ir(ar)},style:ni}),E.createElement("div",{className:"".concat(Mi,"-content")},typeof Hn=="function"?Hn(zn,{index:Ut}):Ga),E.isValidElement(ln)||Zi,Gs&&E.createElement(T,{className:"".concat(pn,"-option-state"),customizeIcon:ln,customizeIconProps:{value:ar,disabled:ha,isSelected:Zi}},Zi?"\u2713":null))}))},nr=E.forwardRef(lr),an=nr,tn=function(Re,De){var Ke=E.useRef({values:new Map,options:new Map}),He=E.useMemo(function(){var ke=Ke.current,Ze=ke.values,tt=ke.options,mt=Re.map(function(vt){if(vt.label===void 0){var Rt;return(0,_.Z)((0,_.Z)({},vt),{},{label:(Rt=Ze.get(vt.value))===null||Rt===void 0?void 0:Rt.label})}return vt}),Tt=new Map,It=new Map;return mt.forEach(function(vt){Tt.set(vt.value,vt),It.set(vt.value,De.get(vt.value)||tt.get(vt.value))}),Ke.current.values=Tt,Ke.current.options=It,mt},[Re,De]),Je=E.useCallback(function(ke){return De.get(ke)||Ke.current.options.get(ke)},[De]);return[He,Je]};function An(Re,De){return re(Re).join("").toUpperCase().includes(De)}var wn=function(Re,De,Ke,He,Je){return E.useMemo(function(){if(!Ke||He===!1)return Re;var ke=De.options,Ze=De.label,tt=De.value,mt=[],Tt=typeof He=="function",It=Ke.toUpperCase(),vt=Tt?He:function(Bt,Qe){return Je?An(Qe[Je],It):Qe[ke]?An(Qe[Ze!=="children"?Ze:"label"],It):An(Qe[tt],It)},Rt=Tt?function(Bt){return Be(Bt)}:function(Bt){return Bt};return Re.forEach(function(Bt){if(Bt[ke]){var Qe=vt(Ke,Rt(Bt));if(Qe)mt.push(Bt);else{var gt=Bt[ke].filter(function(Pt){return vt(Ke,Rt(Pt))});gt.length&&mt.push((0,_.Z)((0,_.Z)({},Bt),{},(0,G.Z)({},ke,gt)))}return}vt(Ke,Rt(Bt))&&mt.push(Bt)}),mt},[Re,He,Je,Ke,De])},sn=X(6551),ir=X(11592),Nt=["children","value"],zt=["children"];function Gt(Re){var De=Re,Ke=De.key,He=De.props,Je=He.children,ke=He.value,Ze=(0,w.Z)(He,Nt);return(0,_.Z)({key:Ke,value:ke!==void 0?ke:Ke,children:Je},Ze)}function jt(Re){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ir.Z)(Re).map(function(Ke,He){if(!E.isValidElement(Ke)||!Ke.type)return null;var Je=Ke,ke=Je.type.isSelectOptGroup,Ze=Je.key,tt=Je.props,mt=tt.children,Tt=(0,w.Z)(tt,zt);return De||!ke?Gt(Ke):(0,_.Z)((0,_.Z)({key:"__RC_SELECT_GRP__".concat(Ze===null?He:Ze,"__"),label:Ze},Tt),{},{options:jt(mt)})}).filter(function(Ke){return Ke})}var En=function(De,Ke,He,Je,ke){return E.useMemo(function(){var Ze=De,tt=!De;tt&&(Ze=jt(Ke));var mt=new Map,Tt=new Map,It=function(Bt,Qe,gt){gt&&typeof gt=="string"&&Bt.set(Qe[gt],Qe)},vt=function Rt(Bt){for(var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gt=0;gt1&&arguments[1]!==void 0?arguments[1]:!1,Ze=0;Ze0?Sn(In.options):In.options}):In})},Gs=E.useMemo(function(){return on?co(Ms):Ms},[Ms,on,Xr]),Ga=E.useMemo(function(){return We(Gs,{fieldNames:Kr,childrenAsData:Ir})},[Gs,Kr,Ir]),Aa=function(On){var Ln=Tn(On);if(gi(Ln),rr&&(Ln.length!==ni.length||Ln.some(function(zr,rs){var Va;return((Va=ni[rs])===null||Va===void 0?void 0:Va.value)!==(zr==null?void 0:zr.value)}))){var In=xr?Ln:Ln.map(function(zr){return zr.value}),pr=Ln.map(function(zr){return Be(Vo(zr.value))});rr(ti?In:In[0],ti?pr:pr[0])}},Cl=E.useState(null),ja=(0,F.Z)(Cl,2),_u=ja[0],fa=ja[1],Dc=E.useState(0),Eu=(0,F.Z)(Dc,2),xu=Eu[0],Cc=Eu[1],bu=gn!==void 0?gn:He!=="combobox",wu=E.useCallback(function(Sn,On){var Ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},In=Ln.source,pr=In===void 0?"keyboard":In;Cc(On),Ze&&He==="combobox"&&Sn!==null&&pr==="keyboard"&&fa(String(Sn))},[Ze,He]),ho=function(On,Ln,In){var pr=function(){var As,Ts=Vo(On);return[xr?{label:Ts==null?void 0:Ts[Kr.label],value:On,key:(As=Ts==null?void 0:Ts.key)!==null&&As!==void 0?As:On}:On,Be(Ts)]};if(Ln&&Bt){var zr=pr(),rs=(0,F.Z)(zr,2),Va=rs[0],js=rs[1];Bt(Va,js)}else if(!Ln&&Qe&&In!=="clear"){var oi=pr(),Vs=(0,F.Z)(oi,2),is=Vs[0],Lc=Vs[1];Qe(is,Lc)}},Ll=M(function(Sn,On){var Ln,In=ti?On.selected:!0;In?Ln=ti?[].concat((0,ee.Z)(ni),[Sn]):[Sn]:Ln=ni.filter(function(pr){return pr.value!==Sn}),Aa(Ln),ho(Sn,In),He==="combobox"?fa(""):(!Dt||Rt)&&(zn(""),fa(""))}),Gr=function(On,Ln){Aa(On);var In=Ln.type,pr=Ln.values;(In==="remove"||In==="clear")&&pr.forEach(function(zr){ho(zr.value,!1,In)})},pi=function(On,Ln){if(zn(On),fa(null),Ln.source==="submit"){var In=(On||"").trim();if(In){var pr=Array.from(new Set([].concat((0,ee.Z)(Ha),[In])));Aa(pr),ho(In,!0),zn("")}return}Ln.source!=="blur"&&(He==="combobox"&&Aa(On),It==null||It(On))},Ta=function(On){var Ln=On;He!=="tags"&&(Ln=On.map(function(pr){var zr=mn.get(pr);return zr==null?void 0:zr.value}).filter(function(pr){return pr!==void 0}));var In=Array.from(new Set([].concat((0,ee.Z)(Ha),(0,ee.Z)(Ln))));Aa(In),In.forEach(function(pr){ho(pr,!0)})},Zo=E.useMemo(function(){var Sn=Hn!==!1&&Pt!==!1;return(0,_.Z)((0,_.Z)({},Ut),{},{flattenOptions:Ga,onActiveValue:wu,defaultActiveFirstOption:bu,onSelect:Ll,menuItemSelectedIcon:Mn,rawValues:Ha,fieldNames:Kr,virtual:Sn,direction:pn,listHeight:Yn,listItemHeight:Cn,childrenAsData:Ir,maxCount:Zn,optionRender:Xt})},[Zn,Ut,Ga,wu,bu,Ll,Mn,Ha,Kr,Hn,Pt,pn,Yn,Cn,Ir,Xt]);return E.createElement(lt.Provider,{value:Zo},E.createElement(Yt,(0,K.Z)({},Fr,{id:ei,prefixCls:ke,ref:De,omitDomProps:ye,mode:He,displayValues:uo,onDisplayValuesChange:Gr,direction:pn,searchValue:Xr,onSearch:pi,autoClearSearchValue:Rt,onSearchSplit:Ta,dropdownMatchSelectWidth:Pt,OptionList:an,emptyOptions:!Ga.length,activeValue:_u,activeDescendantId:"".concat(ei,"_list_").concat(xu)})))}),Se=Le;Se.Option=vn,Se.OptGroup=Ot;var Ye=Se,Ge=Ye},22711:function(we,Me,X){"use strict";X.r(Me),X.d(Me,{ResizableTextArea:function(){return Q},default:function(){return ae}});var K=X(14809),ee=X(4635),G=X(20439),_=X(95190),F=X(50298),w=X(62646),x=X(92310),y=X.n(x),b=X(36901),E=X(66003),g=X(30292),m=X(18929),C=X(59301),d=X(93664),v=X(29301),A=X(34280),T=X(16089),O=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; pointer-events: none !important; `,P=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],L={},c;function f(re){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,oe=re.getAttribute("id")||re.getAttribute("data-reactid")||re.getAttribute("name");if(ce&&L[oe])return L[oe];var he=window.getComputedStyle(re),se=he.getPropertyValue("box-sizing")||he.getPropertyValue("-moz-box-sizing")||he.getPropertyValue("-webkit-box-sizing"),pe=parseFloat(he.getPropertyValue("padding-bottom"))+parseFloat(he.getPropertyValue("padding-top")),me=parseFloat(he.getPropertyValue("border-bottom-width"))+parseFloat(he.getPropertyValue("border-top-width")),ge=P.map(function(Ae){return"".concat(Ae,":").concat(he.getPropertyValue(Ae))}).join(";"),Ee={sizingStyle:ge,paddingSize:pe,borderSize:me,boxSizing:se};return ce&&oe&&(L[oe]=Ee),Ee}function D(re){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,he=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;c||(c=document.createElement("textarea"),c.setAttribute("tab-index","-1"),c.setAttribute("aria-hidden","true"),c.setAttribute("name","hiddenTextarea"),document.body.appendChild(c)),re.getAttribute("wrap")?c.setAttribute("wrap",re.getAttribute("wrap")):c.removeAttribute("wrap");var se=f(re,ce),pe=se.paddingSize,me=se.borderSize,ge=se.boxSizing,Ee=se.sizingStyle;c.setAttribute("style","".concat(Ee,";").concat(O)),c.value=re.value||re.placeholder||"";var Ae=void 0,Fe=void 0,Ue,nt=c.scrollHeight;if(ge==="border-box"?nt+=me:ge==="content-box"&&(nt-=pe),oe!==null||he!==null){c.value=" ";var rt=c.scrollHeight-pe;oe!==null&&(Ae=rt*oe,ge==="border-box"&&(Ae=Ae+pe+me),nt=Math.max(Ae,nt)),he!==null&&(Fe=rt*he,ge==="border-box"&&(Fe=Fe+pe+me),Ue=nt>Fe?"":"hidden",nt=Math.min(Fe,nt))}var qe={height:nt,overflowY:Ue,resize:"none"};return Ae&&(qe.minHeight=Ae),Fe&&(qe.maxHeight=Fe),qe}var R=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],k=0,W=1,z=2,Z=C.forwardRef(function(re,ce){var oe=re,he=oe.prefixCls,se=oe.defaultValue,pe=oe.value,me=oe.autoSize,ge=oe.onResize,Ee=oe.className,Ae=oe.style,Fe=oe.disabled,Ue=oe.onChange,nt=oe.onInternalAutoSize,rt=(0,w.Z)(oe,R),qe=(0,m.Z)(se,{value:pe,postState:function(vn){return vn!=null?vn:""}}),dt=(0,F.Z)(qe,2),yt=dt[0],je=dt[1],at=function(vn){je(vn.target.value),Ue==null||Ue(vn)},it=C.useRef();C.useImperativeHandle(ce,function(){return{textArea:it.current}});var ht=C.useMemo(function(){return me&&(0,d.Z)(me)==="object"?[me.minRows,me.maxRows]:[]},[me]),ut=(0,F.Z)(ht,2),Mt=ut[0],Ce=ut[1],ot=!!me,Pe=function(){try{if(document.activeElement===it.current){var vn=it.current,Jn=vn.selectionStart,Fn=vn.selectionEnd,qn=vn.scrollTop;it.current.setSelectionRange(Jn,Fn),it.current.scrollTop=qn}}catch(br){}},Ne=C.useState(z),We=(0,F.Z)(Ne,2),Be=We[0],Ve=We[1],$e=C.useState(),lt=(0,F.Z)($e,2),pt=lt[0],xt=lt[1],wt=function(){Ve(k)};(0,A.Z)(function(){ot&&wt()},[pe,Mt,Ce,ot]),(0,A.Z)(function(){if(Be===k)Ve(W);else if(Be===W){var en=D(it.current,!1,Mt,Ce);Ve(z),xt(en)}else Pe()},[Be]);var Dt=C.useRef(),kt=function(){T.Z.cancel(Dt.current)},Yt=function(vn){Be===z&&(ge==null||ge(vn),me&&(kt(),Dt.current=(0,T.Z)(function(){wt()})))};C.useEffect(function(){return kt},[]);var Wt=ot?pt:null,Ot=(0,G.Z)((0,G.Z)({},Ae),Wt);return(Be===k||Be===W)&&(Ot.overflowY="hidden",Ot.overflowX="hidden"),C.createElement(v.Z,{onResize:Yt,disabled:!(me||ge)},C.createElement("textarea",(0,K.Z)({},rt,{ref:it,style:Ot,className:y()(he,Ee,(0,ee.Z)({},"".concat(he,"-disabled"),Fe)),disabled:Fe,value:yt,onChange:at})))}),Q=Z,te=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],$=C.forwardRef(function(re,ce){var oe,he=re.defaultValue,se=re.value,pe=re.onFocus,me=re.onBlur,ge=re.onChange,Ee=re.allowClear,Ae=re.maxLength,Fe=re.onCompositionStart,Ue=re.onCompositionEnd,nt=re.suffix,rt=re.prefixCls,qe=rt===void 0?"rc-textarea":rt,dt=re.showCount,yt=re.count,je=re.className,at=re.style,it=re.disabled,ht=re.hidden,ut=re.classNames,Mt=re.styles,Ce=re.onResize,ot=re.onClear,Pe=re.onPressEnter,Ne=re.readOnly,We=re.autoSize,Be=re.onKeyDown,Ve=(0,w.Z)(re,te),$e=(0,m.Z)(he,{value:se,defaultValue:he}),lt=(0,F.Z)($e,2),pt=lt[0],xt=lt[1],wt=pt==null?"":String(pt),Dt=C.useState(!1),kt=(0,F.Z)(Dt,2),Yt=kt[0],Wt=kt[1],Ot=C.useRef(!1),en=C.useState(null),vn=(0,F.Z)(en,2),Jn=vn[0],Fn=vn[1],qn=(0,C.useRef)(null),br=(0,C.useRef)(null),Vn=function(){var Se;return(Se=br.current)===null||Se===void 0?void 0:Se.textArea},tr=function(){Vn().focus()};(0,C.useImperativeHandle)(ce,function(){var Le;return{resizableTextArea:br.current,focus:tr,blur:function(){Vn().blur()},nativeElement:((Le=qn.current)===null||Le===void 0?void 0:Le.nativeElement)||Vn()}}),(0,C.useEffect)(function(){Wt(function(Le){return!it&&Le})},[it]);var lr=C.useState(null),nr=(0,F.Z)(lr,2),an=nr[0],tn=nr[1];C.useEffect(function(){if(an){var Le;(Le=Vn()).setSelectionRange.apply(Le,(0,_.Z)(an))}},[an]);var An=(0,E.Z)(yt,dt),wn=(oe=An.max)!==null&&oe!==void 0?oe:Ae,sn=Number(wn)>0,ir=An.strategy(wt),Nt=!!wn&&ir>wn,zt=function(Se,Ye){var Ge=Ye;!Ot.current&&An.exceedFormatter&&An.max&&An.strategy(Ye)>An.max&&(Ge=An.exceedFormatter(Ye,{max:An.max}),Ye!==Ge&&tn([Vn().selectionStart||0,Vn().selectionEnd||0])),xt(Ge),(0,g.rJ)(Se.currentTarget,Se,ge,Ge)},Gt=function(Se){Ot.current=!0,Fe==null||Fe(Se)},jt=function(Se){Ot.current=!1,zt(Se,Se.currentTarget.value),Ue==null||Ue(Se)},En=function(Se){zt(Se,Se.target.value)},_e=function(Se){Se.key==="Enter"&&Pe&&Pe(Se),Be==null||Be(Se)},M=function(Se){Wt(!0),pe==null||pe(Se)},B=function(Se){Wt(!1),me==null||me(Se)},I=function(Se){xt(""),tr(),(0,g.rJ)(Vn(),Se,ge)},j=nt,J;An.show&&(An.showFormatter?J=An.showFormatter({value:wt,count:ir,maxLength:wn}):J="".concat(ir).concat(sn?" / ".concat(wn):""),j=C.createElement(C.Fragment,null,j,C.createElement("span",{className:y()("".concat(qe,"-data-count"),ut==null?void 0:ut.count),style:Mt==null?void 0:Mt.count},J)));var ye=function(Se){var Ye;Ce==null||Ce(Se),(Ye=Vn())!==null&&Ye!==void 0&&Ye.style.height&&Fn(!0)},be=!We&&!dt&&!Ee;return C.createElement(b.BaseInput,{ref:qn,value:wt,allowClear:Ee,handleReset:I,suffix:j,prefixCls:qe,classNames:(0,G.Z)((0,G.Z)({},ut),{},{affixWrapper:y()(ut==null?void 0:ut.affixWrapper,(0,ee.Z)((0,ee.Z)({},"".concat(qe,"-show-count"),dt),"".concat(qe,"-textarea-allow-clear"),Ee))}),disabled:it,focused:Yt,className:y()(je,Nt&&"".concat(qe,"-out-of-range")),style:(0,G.Z)((0,G.Z)({},at),Jn&&!be?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof J=="string"?J:void 0}},hidden:ht,readOnly:Ne,onClear:ot},C.createElement(Q,(0,K.Z)({},Ve,{autoSize:We,maxLength:Ae,onKeyDown:_e,onChange:En,onFocus:M,onBlur:B,onCompositionStart:Gt,onCompositionEnd:jt,className:y()(ut==null?void 0:ut.textarea),style:(0,G.Z)((0,G.Z)({},Mt==null?void 0:Mt.textarea),{},{resize:at==null?void 0:at.resize}),disabled:it,prefixCls:qe,onResize:ye,ref:br,readOnly:Ne})))}),ie=$,ae=ie},65283:function(we,Me,X){"use strict";X.d(Me,{Z:function(){return yt}});var K=X(14809),ee=X(93664),G=X(20439),_=X(4635),F=X(50298),w=X(62646),x=X(92310),y=X.n(x),b=X(29301),E=X(70425),g=X(34280),m=X(59301),C=X(4676),d=m.forwardRef(function(je,at){var it=je.height,ht=je.offsetY,ut=je.offsetX,Mt=je.children,Ce=je.prefixCls,ot=je.onInnerResize,Pe=je.innerProps,Ne=je.rtl,We=je.extra,Be={},Ve={display:"flex",flexDirection:"column"};return ht!==void 0&&(Be={height:it,position:"relative",overflow:"hidden"},Ve=(0,G.Z)((0,G.Z)({},Ve),{},(0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)({transform:"translateY(".concat(ht,"px)")},Ne?"marginRight":"marginLeft",-ut),"position","absolute"),"left",0),"right",0),"top",0))),m.createElement("div",{style:Be},m.createElement(b.Z,{onResize:function(lt){var pt=lt.offsetHeight;pt&&ot&&ot()}},m.createElement("div",(0,K.Z)({style:Ve,className:y()((0,_.Z)({},"".concat(Ce,"-holder-inner"),Ce)),ref:at},Pe),Mt,We)))});d.displayName="Filler";var v=d;function A(je){var at=je.children,it=je.setRef,ht=m.useCallback(function(ut){it(ut)},[]);return m.cloneElement(at,{ref:ht})}function T(je,at,it,ht,ut,Mt,Ce,ot){var Pe=ot.getKey;return je.slice(at,it+1).map(function(Ne,We){var Be=at+We,Ve=Ce(Ne,Be,{style:{width:ht},offsetX:ut}),$e=Pe(Ne);return m.createElement(A,{key:$e,setRef:function(pt){return Mt(Ne,pt)}},Ve)})}function O(je,at,it,ht){var ut=it-je,Mt=at-it,Ce=Math.min(ut,Mt)*2;if(ht<=Ce){var ot=Math.floor(ht/2);return ht%2?it+ot+1:it-ot}return ut>Mt?it-(ht-Mt):it+(ht-ut)}function P(je,at,it){var ht=je.length,ut=at.length,Mt,Ce;if(ht===0&&ut===0)return null;ht2&&arguments[2]!==void 0?arguments[2]:!1,Be=Pe?Ne<0&&ot.current.left||Ne>0&&ot.current.right:Ne<0&&ot.current.top||Ne>0&&ot.current.bottom;return We&&Be?(clearTimeout(Mt.current),ut.current=!1):(!Be||ut.current)&&Ce(),!ut.current&&Be}};function k(je,at,it,ht,ut,Mt,Ce){var ot=(0,m.useRef)(0),Pe=(0,m.useRef)(null),Ne=(0,m.useRef)(null),We=(0,m.useRef)(!1),Be=R(at,it,ht,ut);function Ve(Dt,kt){if(c.Z.cancel(Pe.current),!Be(!1,kt)){var Yt=Dt;if(!Yt._virtualHandled)Yt._virtualHandled=!0;else return;ot.current+=kt,Ne.current=kt,D||Yt.preventDefault(),Pe.current=(0,c.Z)(function(){var Wt=We.current?10:1;Ce(ot.current*Wt,!1),ot.current=0})}}function $e(Dt,kt){Ce(kt,!0),D||Dt.preventDefault()}var lt=(0,m.useRef)(null),pt=(0,m.useRef)(null);function xt(Dt){if(je){c.Z.cancel(pt.current),pt.current=(0,c.Z)(function(){lt.current=null},2);var kt=Dt.deltaX,Yt=Dt.deltaY,Wt=Dt.shiftKey,Ot=kt,en=Yt;(lt.current==="sx"||!lt.current&&Wt&&Yt&&!kt)&&(Ot=Yt,en=0,lt.current="sx");var vn=Math.abs(Ot),Jn=Math.abs(en);lt.current===null&&(lt.current=Mt&&vn>Jn?"x":"y"),lt.current==="y"?Ve(Dt,en):$e(Dt,Ot)}}function wt(Dt){je&&(We.current=Dt.detail===Ne.current)}return[xt,wt]}function W(je,at,it,ht){var ut=m.useMemo(function(){return[new Map,[]]},[je,it.id,ht]),Mt=(0,F.Z)(ut,2),Ce=Mt[0],ot=Mt[1],Pe=function(We){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:We,Ve=Ce.get(We),$e=Ce.get(Be);if(Ve===void 0||$e===void 0)for(var lt=je.length,pt=ot.length;pt0&&arguments[0]!==void 0?arguments[0]:!1;We();var lt=function(){var wt=!1;ot.current.forEach(function(Dt,kt){if(Dt&&Dt.offsetParent){var Yt=Dt.offsetHeight,Wt=getComputedStyle(Dt),Ot=Wt.marginTop,en=Wt.marginBottom,vn=$(Ot),Jn=$(en),Fn=Yt+vn+Jn;Pe.current.get(kt)!==Fn&&(Pe.current.set(kt,Fn),wt=!0)}}),wt&&Ce(function(Dt){return Dt+1})};if($e)lt();else{Ne.current+=1;var pt=Ne.current;Promise.resolve().then(function(){pt===Ne.current&<()})}}function Ve($e,lt){var pt=je($e),xt=ot.current.get(pt);lt?(ot.current.set(pt,lt),Be()):ot.current.delete(pt),!xt!=!lt&&(lt?at==null||at($e):it==null||it($e))}return(0,m.useEffect)(function(){return We},[]),[Ve,Be,Pe.current,Mt]}var ae=14/15;function re(je,at,it){var ht=(0,m.useRef)(!1),ut=(0,m.useRef)(0),Mt=(0,m.useRef)(0),Ce=(0,m.useRef)(null),ot=(0,m.useRef)(null),Pe,Ne=function($e){if(ht.current){var lt=Math.ceil($e.touches[0].pageX),pt=Math.ceil($e.touches[0].pageY),xt=ut.current-lt,wt=Mt.current-pt,Dt=Math.abs(xt)>Math.abs(wt);Dt?ut.current=lt:Mt.current=pt;var kt=it(Dt,Dt?xt:wt,!1,$e);kt&&$e.preventDefault(),clearInterval(ot.current),kt&&(ot.current=setInterval(function(){Dt?xt*=ae:wt*=ae;var Yt=Math.floor(Dt?xt:wt);(!it(Dt,Yt,!0)||Math.abs(Yt)<=.1)&&clearInterval(ot.current)},16))}},We=function(){ht.current=!1,Pe()},Be=function($e){Pe(),$e.touches.length===1&&!ht.current&&(ht.current=!0,ut.current=Math.ceil($e.touches[0].pageX),Mt.current=Math.ceil($e.touches[0].pageY),Ce.current=$e.target,Ce.current.addEventListener("touchmove",Ne,{passive:!1}),Ce.current.addEventListener("touchend",We,{passive:!0}))};Pe=function(){Ce.current&&(Ce.current.removeEventListener("touchmove",Ne),Ce.current.removeEventListener("touchend",We))},(0,g.Z)(function(){return je&&at.current.addEventListener("touchstart",Be,{passive:!0}),function(){var Ve;(Ve=at.current)===null||Ve===void 0||Ve.removeEventListener("touchstart",Be),Pe(),clearInterval(ot.current)}},[je])}function ce(je){return Math.floor(Math.pow(je,.5))}function oe(je,at){var it="touches"in je?je.touches[0]:je;return it[at?"pageX":"pageY"]-window[at?"scrollX":"scrollY"]}function he(je,at,it){m.useEffect(function(){var ht=at.current;if(je&&ht){var ut=!1,Mt,Ce,ot=function(){c.Z.cancel(Mt)},Pe=function Ve(){ot(),Mt=(0,c.Z)(function(){it(Ce),Ve()})},Ne=function($e){if(!($e.target.draggable||$e.button!==0)){var lt=$e;lt._virtualHandled||(lt._virtualHandled=!0,ut=!0)}},We=function(){ut=!1,ot()},Be=function($e){if(ut){var lt=oe($e,!1),pt=ht.getBoundingClientRect(),xt=pt.top,wt=pt.bottom;if(lt<=xt){var Dt=xt-lt;Ce=-ce(Dt),Pe()}else if(lt>=wt){var kt=lt-wt;Ce=ce(kt),Pe()}else ot()}};return ht.addEventListener("mousedown",Ne),ht.ownerDocument.addEventListener("mouseup",We),ht.ownerDocument.addEventListener("mousemove",Be),function(){ht.removeEventListener("mousedown",Ne),ht.ownerDocument.removeEventListener("mouseup",We),ht.ownerDocument.removeEventListener("mousemove",Be),ot()}}},[je])}var se=10;function pe(je,at,it,ht,ut,Mt,Ce,ot){var Pe=m.useRef(),Ne=m.useState(null),We=(0,F.Z)(Ne,2),Be=We[0],Ve=We[1];return(0,g.Z)(function(){if(Be&&Be.times=0;tr-=1){var lr=ut(at[tr]),nr=it.get(lr);if(nr===void 0){Dt=!0;break}if(Vn-=nr,Vn<=0)break}switch(Wt){case"top":Yt=en-xt;break;case"bottom":Yt=vn-wt+xt;break;default:{var an=je.current.scrollTop,tn=an+wt;entn&&(kt="bottom")}}Yt!==null&&Ce(Yt),Yt!==Be.lastTop&&(Dt=!0)}Dt&&Ve((0,G.Z)((0,G.Z)({},Be),{},{times:Be.times+1,targetAlign:kt,lastTop:Yt}))}},[Be,je.current]),function($e){if($e==null){ot();return}if(c.Z.cancel(Pe.current),typeof $e=="number")Ce($e);else if($e&&(0,ee.Z)($e)==="object"){var lt,pt=$e.align;"index"in $e?lt=$e.index:lt=at.findIndex(function(Dt){return ut(Dt)===$e.key});var xt=$e.offset,wt=xt===void 0?0:xt;Ve({times:0,index:lt,offset:wt,originAlign:pt})}}}var me=m.forwardRef(function(je,at){var it=je.prefixCls,ht=je.rtl,ut=je.scrollOffset,Mt=je.scrollRange,Ce=je.onStartMove,ot=je.onStopMove,Pe=je.onScroll,Ne=je.horizontal,We=je.spinSize,Be=je.containerSize,Ve=je.style,$e=je.thumbStyle,lt=je.showScrollBar,pt=m.useState(!1),xt=(0,F.Z)(pt,2),wt=xt[0],Dt=xt[1],kt=m.useState(null),Yt=(0,F.Z)(kt,2),Wt=Yt[0],Ot=Yt[1],en=m.useState(null),vn=(0,F.Z)(en,2),Jn=vn[0],Fn=vn[1],qn=!ht,br=m.useRef(),Vn=m.useRef(),tr=m.useState(lt),lr=(0,F.Z)(tr,2),nr=lr[0],an=lr[1],tn=m.useRef(),An=function(){lt===!0||lt===!1||(clearTimeout(tn.current),an(!0),tn.current=setTimeout(function(){an(!1)},3e3))},wn=Mt-Be||0,sn=Be-We||0,ir=m.useMemo(function(){if(ut===0||wn===0)return 0;var I=ut/wn;return I*sn},[ut,wn,sn]),Nt=function(j){j.stopPropagation(),j.preventDefault()},zt=m.useRef({top:ir,dragging:wt,pageY:Wt,startTop:Jn});zt.current={top:ir,dragging:wt,pageY:Wt,startTop:Jn};var Gt=function(j){Dt(!0),Ot(oe(j,Ne)),Fn(zt.current.top),Ce(),j.stopPropagation(),j.preventDefault()};m.useEffect(function(){var I=function(be){be.preventDefault()},j=br.current,J=Vn.current;return j.addEventListener("touchstart",I,{passive:!1}),J.addEventListener("touchstart",Gt,{passive:!1}),function(){j.removeEventListener("touchstart",I),J.removeEventListener("touchstart",Gt)}},[]);var jt=m.useRef();jt.current=wn;var En=m.useRef();En.current=sn,m.useEffect(function(){if(wt){var I,j=function(be){var Le=zt.current,Se=Le.dragging,Ye=Le.pageY,Ge=Le.startTop;c.Z.cancel(I);var Re=br.current.getBoundingClientRect(),De=Be/(Ne?Re.width:Re.height);if(Se){var Ke=(oe(be,Ne)-Ye)*De,He=Ge;!qn&&Ne?He-=Ke:He+=Ke;var Je=jt.current,ke=En.current,Ze=ke?He/ke:0,tt=Math.ceil(Ze*Je);tt=Math.max(tt,0),tt=Math.min(tt,Je),I=(0,c.Z)(function(){Pe(tt,Ne)})}},J=function(){Dt(!1),ot()};return window.addEventListener("mousemove",j,{passive:!0}),window.addEventListener("touchmove",j,{passive:!0}),window.addEventListener("mouseup",J,{passive:!0}),window.addEventListener("touchend",J,{passive:!0}),function(){window.removeEventListener("mousemove",j),window.removeEventListener("touchmove",j),window.removeEventListener("mouseup",J),window.removeEventListener("touchend",J),c.Z.cancel(I)}}},[wt]),m.useEffect(function(){return An(),function(){clearTimeout(tn.current)}},[ut]),m.useImperativeHandle(at,function(){return{delayHidden:An}});var _e="".concat(it,"-scrollbar"),M={position:"absolute",visibility:nr?null:"hidden"},B={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ne?(M.height=8,M.left=0,M.right=0,M.bottom=0,B.height="100%",B.width=We,qn?B.left=ir:B.right=ir):(M.width=8,M.top=0,M.bottom=0,qn?M.right=0:M.left=0,B.width="100%",B.height=We,B.top=ir),m.createElement("div",{ref:br,className:y()(_e,(0,_.Z)((0,_.Z)((0,_.Z)({},"".concat(_e,"-horizontal"),Ne),"".concat(_e,"-vertical"),!Ne),"".concat(_e,"-visible"),nr)),style:(0,G.Z)((0,G.Z)({},M),Ve),onMouseDown:Nt,onMouseMove:An},m.createElement("div",{ref:Vn,className:y()("".concat(_e,"-thumb"),(0,_.Z)({},"".concat(_e,"-thumb-moving"),wt)),style:(0,G.Z)((0,G.Z)({},B),$e),onMouseDown:Gt}))}),ge=me,Ee=20;function Ae(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,it=je/at*je;return isNaN(it)&&(it=0),it=Math.max(it,Ee),Math.floor(it)}var Fe=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ue=[],nt={overflowY:"auto",overflowAnchor:"none"};function rt(je,at){var it=je.prefixCls,ht=it===void 0?"rc-virtual-list":it,ut=je.className,Mt=je.height,Ce=je.itemHeight,ot=je.fullHeight,Pe=ot===void 0?!0:ot,Ne=je.style,We=je.data,Be=je.children,Ve=je.itemKey,$e=je.virtual,lt=je.direction,pt=je.scrollWidth,xt=je.component,wt=xt===void 0?"div":xt,Dt=je.onScroll,kt=je.onVirtualScroll,Yt=je.onVisibleChange,Wt=je.innerProps,Ot=je.extraRender,en=je.styles,vn=je.showScrollBar,Jn=vn===void 0?"optional":vn,Fn=(0,w.Z)(je,Fe),qn=m.useCallback(function(Ut){return typeof Ve=="function"?Ve(Ut):Ut==null?void 0:Ut[Ve]},[Ve]),br=ie(qn,null,null),Vn=(0,F.Z)(br,4),tr=Vn[0],lr=Vn[1],nr=Vn[2],an=Vn[3],tn=!!($e!==!1&&Mt&&Ce),An=m.useMemo(function(){return Object.values(nr.maps).reduce(function(Ut,Kt){return Ut+Kt},0)},[nr.id,nr.maps]),wn=tn&&We&&(Math.max(Ce*We.length,An)>Mt||!!pt),sn=lt==="rtl",ir=y()(ht,(0,_.Z)({},"".concat(ht,"-rtl"),sn),ut),Nt=We||Ue,zt=(0,m.useRef)(),Gt=(0,m.useRef)(),jt=(0,m.useRef)(),En=(0,m.useState)(0),_e=(0,F.Z)(En,2),M=_e[0],B=_e[1],I=(0,m.useState)(0),j=(0,F.Z)(I,2),J=j[0],ye=j[1],be=(0,m.useState)(!1),Le=(0,F.Z)(be,2),Se=Le[0],Ye=Le[1],Ge=function(){Ye(!0)},Re=function(){Ye(!1)},De={getKey:qn};function Ke(Ut){B(function(Kt){var mn;typeof Ut=="function"?mn=Ut(Kt):mn=Ut;var cn=gn(mn);return zt.current.scrollTop=cn,cn})}var He=(0,m.useRef)({start:0,end:Nt.length}),Je=(0,m.useRef)(),ke=L(Nt,qn),Ze=(0,F.Z)(ke,1),tt=Ze[0];Je.current=tt;var mt=m.useMemo(function(){if(!tn)return{scrollHeight:void 0,start:0,end:Nt.length-1,offset:void 0};if(!wn){var Ut;return{scrollHeight:((Ut=Gt.current)===null||Ut===void 0?void 0:Ut.offsetHeight)||0,start:0,end:Nt.length-1,offset:void 0}}for(var Kt=0,mn,cn,Tn,ar=Nt.length,gr=0;gr=M&&mn===void 0&&(mn=gr,cn=Kt),na>M+Mt&&Tn===void 0&&(Tn=gr),Kt=na}return mn===void 0&&(mn=0,cn=0,Tn=Math.ceil(Mt/Ce)),Tn===void 0&&(Tn=Nt.length-1),Tn=Math.min(Tn+1,Nt.length-1),{scrollHeight:Kt,start:mn,end:Tn,offset:cn}},[wn,tn,M,Nt,an,Mt]),Tt=mt.scrollHeight,It=mt.start,vt=mt.end,Rt=mt.offset;He.current.start=It,He.current.end=vt,m.useLayoutEffect(function(){var Ut=nr.getRecord();if(Ut.size===1){var Kt=Array.from(Ut.keys())[0],mn=Ut.get(Kt),cn=Nt[It];if(cn&&mn===void 0){var Tn=qn(cn);if(Tn===Kt){var ar=nr.get(Kt),gr=ar-Ce;Ke(function(hr){return hr+gr})}}}nr.resetRecord()},[Tt]);var Bt=m.useState({width:0,height:Mt}),Qe=(0,F.Z)(Bt,2),gt=Qe[0],Pt=Qe[1],St=function(Kt){Pt({width:Kt.offsetWidth,height:Kt.offsetHeight})},on=(0,m.useRef)(),ln=(0,m.useRef)(),Zt=m.useMemo(function(){return Ae(gt.width,pt)},[gt.width,pt]),Jt=m.useMemo(function(){return Ae(gt.height,Tt)},[gt.height,Tt]),Xt=Tt-Mt,dn=(0,m.useRef)(Xt);dn.current=Xt;function gn(Ut){var Kt=Ut;return Number.isNaN(dn.current)||(Kt=Math.min(Kt,dn.current)),Kt=Math.max(Kt,0),Kt}var Mn=M<=0,Hn=M>=Xt,pn=J<=0,Rn=J>=pt,Yn=R(Mn,Hn,pn,Rn),Gn=function(){return{x:sn?-J:J,y:M}},Cn=(0,m.useRef)(Gn()),Mr=(0,E.zX)(function(Ut){if(kt){var Kt=(0,G.Z)((0,G.Z)({},Gn()),Ut);(Cn.current.x!==Kt.x||Cn.current.y!==Kt.y)&&(kt(Kt),Cn.current=Kt)}});function kr(Ut,Kt){var mn=Ut;Kt?((0,C.flushSync)(function(){ye(mn)}),Mr()):Ke(mn)}function Rr(Ut){var Kt=Ut.currentTarget.scrollTop;Kt!==M&&Ke(Kt),Dt==null||Dt(Ut),Mr()}var xr=function(Kt){var mn=Kt,cn=pt?pt-gt.width:0;return mn=Math.max(mn,0),mn=Math.min(mn,cn),mn},rr=(0,E.zX)(function(Ut,Kt){Kt?((0,C.flushSync)(function(){ye(function(mn){var cn=mn+(sn?-Ut:Ut);return xr(cn)})}),Mr()):Ke(function(mn){var cn=mn+Ut;return cn})}),Zn=k(tn,Mn,Hn,pn,Rn,!!pt,rr),Fr=(0,F.Z)(Zn,2),ei=Fr[0],ti=Fr[1];re(tn,zt,function(Ut,Kt,mn,cn){var Tn=cn;return Yn(Ut,Kt,mn)?!1:!Tn||!Tn._virtualHandled?(Tn&&(Tn._virtualHandled=!0),ei({preventDefault:function(){},deltaX:Ut?Kt:0,deltaY:Ut?0:Kt}),!0):!1}),he(wn,zt,function(Ut){Ke(function(Kt){return Kt+Ut})}),(0,g.Z)(function(){function Ut(mn){var cn=Mn&&mn.detail<0,Tn=Hn&&mn.detail>0;tn&&!cn&&!Tn&&mn.preventDefault()}var Kt=zt.current;return Kt.addEventListener("wheel",ei,{passive:!1}),Kt.addEventListener("DOMMouseScroll",ti,{passive:!0}),Kt.addEventListener("MozMousePixelScroll",Ut,{passive:!1}),function(){Kt.removeEventListener("wheel",ei),Kt.removeEventListener("DOMMouseScroll",ti),Kt.removeEventListener("MozMousePixelScroll",Ut)}},[tn,Mn,Hn]),(0,g.Z)(function(){if(pt){var Ut=xr(J);ye(Ut),Mr({x:Ut})}},[gt.width,pt]);var Ir=function(){var Kt,mn;(Kt=on.current)===null||Kt===void 0||Kt.delayHidden(),(mn=ln.current)===null||mn===void 0||mn.delayHidden()},ta=pe(zt,Nt,nr,Ce,qn,function(){return lr(!0)},Ke,Ir);m.useImperativeHandle(at,function(){return{nativeElement:jt.current,getScrollInfo:Gn,scrollTo:function(Kt){function mn(cn){return cn&&(0,ee.Z)(cn)==="object"&&("left"in cn||"top"in cn)}mn(Kt)?(Kt.left!==void 0&&ye(xr(Kt.left)),ta(Kt.top)):ta(Kt)}}}),(0,g.Z)(function(){if(Yt){var Ut=Nt.slice(It,vt+1);Yt(Ut,Nt)}},[It,vt,Nt]);var Kr=W(Nt,qn,nr,Ce),Ma=Ot==null?void 0:Ot({start:It,end:vt,virtual:wn,offsetX:J,offsetY:Rt,rtl:sn,getSize:Kr}),ji=T(Nt,It,vt,pt,J,tr,Be,De),Xr=null;Mt&&(Xr=(0,G.Z)((0,_.Z)({},Pe?"height":"maxHeight",Mt),nt),tn&&(Xr.overflowY="hidden",pt&&(Xr.overflowX="hidden"),Se&&(Xr.pointerEvents="none")));var zn={};return sn&&(zn.dir="rtl"),m.createElement("div",(0,K.Z)({ref:jt,style:(0,G.Z)((0,G.Z)({},Ne),{},{position:"relative"}),className:ir},zn,Fn),m.createElement(b.Z,{onResize:St},m.createElement(wt,{className:"".concat(ht,"-holder"),style:Xr,ref:zt,onScroll:Rr,onMouseEnter:Ir},m.createElement(v,{prefixCls:ht,height:Tt,offsetX:J,offsetY:Rt,scrollWidth:pt,onInnerResize:lr,ref:Gt,innerProps:Wt,rtl:sn,extra:Ma},ji))),wn&&Tt>Mt&&m.createElement(ge,{ref:on,prefixCls:ht,scrollOffset:M,scrollRange:Tt,rtl:sn,onScroll:kr,onStartMove:Ge,onStopMove:Re,spinSize:Jt,containerSize:gt.height,style:en==null?void 0:en.verticalScrollBar,thumbStyle:en==null?void 0:en.verticalScrollBarThumb,showScrollBar:Jn}),wn&&pt>gt.width&&m.createElement(ge,{ref:ln,prefixCls:ht,scrollOffset:J,scrollRange:pt,rtl:sn,onScroll:kr,onStartMove:Ge,onStopMove:Re,spinSize:Zt,containerSize:gt.width,horizontal:!0,style:en==null?void 0:en.horizontalScrollBar,thumbStyle:en==null?void 0:en.horizontalScrollBarThumb,showScrollBar:Jn}))}var qe=m.forwardRef(rt);qe.displayName="List";var dt=qe,yt=dt},75029:function(we,Me,X){"use strict";var K=X(22948),ee=Array.prototype.concat,G=Array.prototype.slice,_=we.exports=function(w){for(var x=[],y=0,b=w.length;y1&&arguments[1]!==void 0?arguments[1]:60,_=null;return function(){for(var F=this,w=arguments.length,x=new Array(w),y=0;y=G.length?{done:!0}:{done:!1,value:G[w++]}},e:function(m){throw m},f:x}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y,b=!0,E=!1;return{s:function(){F=F.call(G)},n:function(){var m=F.next();return b=m.done,m},e:function(m){E=!0,y=m},f:function(){try{b||F.return==null||F.return()}finally{if(E)throw y}}}}},18609:function(we,Me){"use strict";var X={value:()=>{}};function K(){for(var w=0,x=arguments.length,y={},b;w=0&&(b=y.slice(E+1),y=y.slice(0,E)),y&&!x.hasOwnProperty(y))throw new Error("unknown type: "+y);return{type:y,name:b}})}ee.prototype=K.prototype={constructor:ee,on:function(w,x){var y=this._,b=G(w+"",y),E,g=-1,m=b.length;if(arguments.length<2){for(;++g0)for(var y=new Array(E),b=0,E,g;b=(O=(m+v)/2))?m=O:v=O,(k=w>=(P=(C+A)/2))?C=P:A=P,(W=x>=(L=(d+T)/2))?d=L:T=L,b=E,!(E=E[z=W<<2|k<<1|R]))return b[z]=g,_;if(c=+_._x.call(null,E.data),f=+_._y.call(null,E.data),D=+_._z.call(null,E.data),F===c&&w===f&&x===D)return g.next=E,b?b[z]=g:_._root=g,_;do b=b?b[z]=new Array(8):_._root=new Array(8),(R=F>=(O=(m+v)/2))?m=O:v=O,(k=w>=(P=(C+A)/2))?C=P:A=P,(W=x>=(L=(d+T)/2))?d=L:T=L;while((z=W<<2|k<<1|R)===(Z=(D>=L)<<2|(f>=P)<<1|c>=O));return b[Z]=E,b[z]=g,_}function G(_){Array.isArray(_)||(_=Array.from(_));const F=_.length,w=new Float64Array(F),x=new Float64Array(F),y=new Float64Array(F);let b=1/0,E=1/0,g=1/0,m=-1/0,C=-1/0,d=-1/0;for(let v=0,A,T,O,P;vm&&(m=T),OC&&(C=O),Pd&&(d=P));if(b>m||E>C||g>d)return this;this.cover(b,E,g).cover(m,C,d);for(let v=0;vee||ee>=y||w>G||G>=b||x>_||_>=E;)switch(d=(_T||(m=f.y0)>O||(C=f.z0)>P||(d=f.x1)=W)<<2|(_>=k)<<1|G>=R)&&(f=L[L.length-1],L[L.length-1]=L[L.length-1-D],L[L.length-1-D]=f)}else{var z=G-+this._x.call(null,c.data),Z=_-+this._y.call(null,c.data),Q=F-+this._z.call(null,c.data),te=z*z+Z*Z+Q*Q;if(teMath.sqrt(jo(G-w,2)+jo(_-x,2)+jo(F-y,2));function ee(G,_,F,w){const x=[],y=G-w,b=_-w,E=F-w,g=G+w,m=_+w,C=F+w;return this.visit((d,v,A,T,O,P,L)=>{if(!d.length)do{const c=d.data;K(G,_,F,this._x(c),this._y(c),this._z(c))<=w&&x.push(c)}while(d=d.next);return v>g||A>m||T>C||O=(O=(b+m)/2))?b=O:m=O,(f=A>=(P=(E+C)/2))?E=P:C=P,(D=T>=(L=(g+d)/2))?g=L:d=L,_=F,!(F=F[R=D<<2|f<<1|c]))return this;if(!F.length)break;(_[R+1&7]||_[R+2&7]||_[R+3&7]||_[R+4&7]||_[R+5&7]||_[R+6&7]||_[R+7&7])&&(w=_,k=R)}for(;F.data!==G;)if(x=F,!(F=F.next))return this;return(y=F.next)&&delete F.next,x?(y?x.next=y:delete x.next,this):_?(y?_[R]=y:delete _[R],(F=_[0]||_[1]||_[2]||_[3]||_[4]||_[5]||_[6]||_[7])&&F===(_[7]||_[6]||_[5]||_[4]||_[3]||_[2]||_[1]||_[0])&&!F.length&&(w?w[k]=F:this._root=F),this):(this._root=y,this)}function ee(G){for(var _=0,F=G.length;_=(v=(g+C)/2))?g=v:C=v,(L=w>=(A=(m+d)/2))?m=A:d=A,y=b,!(b=b[c=L<<1|P]))return y[c]=E,_;if(T=+_._x.call(null,b.data),O=+_._y.call(null,b.data),F===T&&w===O)return E.next=b,y?y[c]=E:_._root=E,_;do y=y?y[c]=new Array(4):_._root=new Array(4),(P=F>=(v=(g+C)/2))?g=v:C=v,(L=w>=(A=(m+d)/2))?m=A:d=A;while((c=L<<1|P)===(f=(O>=A)<<1|T>=v));return y[f]=b,y[c]=E,_}function G(_){var F,w,x=_.length,y,b,E=new Array(x),g=new Array(x),m=1/0,C=1/0,d=-1/0,v=-1/0;for(w=0;wd&&(d=y),bv&&(v=b));if(m>d||C>v)return this;for(this.cover(m,C).cover(d,v),w=0;wee||ee>=w||F>G||G>=x;)switch(g=(GC||(E=T.y0)>d||(g=T.x1)=L)<<1|G>=P)&&(T=v[v.length-1],v[v.length-1]=v[v.length-1-O],v[v.length-1-O]=T)}else{var c=G-+this._x.call(null,A.data),f=_-+this._y.call(null,A.data),D=c*c+f*f;if(D=(v=(b+g)/2))?b=v:g=v,(O=d>=(A=(E+m)/2))?E=A:m=A,_=F,!(F=F[P=O<<1|T]))return this;if(!F.length)break;(_[P+1&3]||_[P+2&3]||_[P+3&3])&&(w=_,L=P)}for(;F.data!==G;)if(x=F,!(F=F.next))return this;return(y=F.next)&&delete F.next,x?(y?x.next=y:delete x.next,this):_?(y?_[P]=y:delete _[P],(F=_[0]||_[1]||_[2]||_[3])&&F===(_[3]||_[2]||_[1]||_[0])&&!F.length&&(w?w[L]=F:this._root=F),this):(this._root=y,this)}function ee(G){for(var _=0,F=G.length;_=0&&c._call.call(void 0,f),c=c._next;--K}function T(){y=(x=E.now())+b,K=ee=0;try{A()}finally{K=0,P(),y=0}}function O(){var c=E.now(),f=c-x;f>_&&(b-=f,x=c)}function P(){for(var c,f=F,D,R=1/0;f;)f._call?(R>f._time&&(R=f._time),c=f,f=f._next):(D=f._next,f._next=null,f=c?c._next=D:F=D);w=c,L(R)}function L(c){if(!K){ee&&(ee=clearTimeout(ee));var f=c-y;f>24?(c<1/0&&(ee=setTimeout(T,c-E.now()-b)),G&&(G=clearInterval(G))):(G||(x=E.now(),G=setInterval(O,_)),K=1,g(T))}}},16722:function(we,Me,X){"use strict";X.d(Me,{Z:function(){return y}});const K=b=>typeof b=="object"&&b!=null&&b.nodeType===1,ee=(b,E)=>(!E||b!=="hidden")&&b!=="visible"&&b!=="clip",G=(b,E)=>{if(b.clientHeight{const C=(d=>{if(!d.ownerDocument||!d.ownerDocument.defaultView)return null;try{return d.ownerDocument.defaultView.frameElement}catch(v){return null}})(m);return!!C&&(C.clientHeightdE||d>b&&v=E&&A>=g?d-b-m:v>E&&Ag?v-E+C:0,F=b=>{const E=b.parentElement;return E==null?b.getRootNode().host||null:E},w=(b,E)=>{var g,m,C,d;if(typeof document=="undefined")return[];const{scrollMode:v,block:A,inline:T,boundary:O,skipOverflowHiddenElements:P}=E,L=typeof O=="function"?O:ge=>ge!==O;if(!K(b))throw new TypeError("Invalid target");const c=document.scrollingElement||document.documentElement,f=[];let D=b;for(;K(D)&&L(D);){if(D=F(D),D===c){f.push(D);break}D!=null&&D===document.body&&G(D)&&!G(document.documentElement)||D!=null&&G(D,P)&&f.push(D)}const R=(m=(g=window.visualViewport)==null?void 0:g.width)!=null?m:innerWidth,k=(d=(C=window.visualViewport)==null?void 0:C.height)!=null?d:innerHeight,{scrollX:W,scrollY:z}=window,{height:Z,width:Q,top:te,right:$,bottom:ie,left:ae}=b.getBoundingClientRect(),{top:re,right:ce,bottom:oe,left:he}=(ge=>{const Ee=window.getComputedStyle(ge);return{top:parseFloat(Ee.scrollMarginTop)||0,right:parseFloat(Ee.scrollMarginRight)||0,bottom:parseFloat(Ee.scrollMarginBottom)||0,left:parseFloat(Ee.scrollMarginLeft)||0}})(b);let se=A==="start"||A==="nearest"?te-re:A==="end"?ie+oe:te+Z/2-re+oe,pe=T==="center"?ae+Q/2-he+ce:T==="end"?$+ce:ae-he;const me=[];for(let ge=0;ge=0&&ae>=0&&ie<=k&&$<=R&&(Ee===c&&!G(Ee)||te>=Ue&&ie<=rt&&ae>=qe&&$<=nt))return me;const dt=getComputedStyle(Ee),yt=parseInt(dt.borderLeftWidth,10),je=parseInt(dt.borderTopWidth,10),at=parseInt(dt.borderRightWidth,10),it=parseInt(dt.borderBottomWidth,10);let ht=0,ut=0;const Mt="offsetWidth"in Ee?Ee.offsetWidth-Ee.clientWidth-yt-at:0,Ce="offsetHeight"in Ee?Ee.offsetHeight-Ee.clientHeight-je-it:0,ot="offsetWidth"in Ee?Ee.offsetWidth===0?0:Fe/Ee.offsetWidth:0,Pe="offsetHeight"in Ee?Ee.offsetHeight===0?0:Ae/Ee.offsetHeight:0;if(c===Ee)ht=A==="start"?se:A==="end"?se-k:A==="nearest"?_(z,z+k,k,je,it,z+se,z+se+Z,Z):se-k/2,ut=T==="start"?pe:T==="center"?pe-R/2:T==="end"?pe-R:_(W,W+R,R,yt,at,W+pe,W+pe+Q,Q),ht=Math.max(0,ht+z),ut=Math.max(0,ut+W);else{ht=A==="start"?se-Ue-je:A==="end"?se-rt+it+Ce:A==="nearest"?_(Ue,rt,Ae,je,it+Ce,se,se+Z,Z):se-(Ue+Ae/2)+Ce/2,ut=T==="start"?pe-qe-yt:T==="center"?pe-(qe+Fe/2)+Mt/2:T==="end"?pe-nt+at+Mt:_(qe,nt,Fe,yt,at+Mt,pe,pe+Q,Q);const{scrollLeft:Ne,scrollTop:We}=Ee;ht=Pe===0?0:Math.max(0,Math.min(We+ht/Pe,Ee.scrollHeight-Ae/Pe+Ce)),ut=ot===0?0:Math.max(0,Math.min(Ne+ut/ot,Ee.scrollWidth-Fe/ot+Mt)),se+=We-ht,pe+=Ne-ut}me.push({el:Ee,top:ht,left:ut})}return me},x=b=>b===!1?{block:"end",inline:"nearest"}:(E=>E===Object(E)&&Object.keys(E).length!==0)(b)?b:{block:"start",inline:"nearest"};function y(b,E){if(!b.isConnected||!(C=>{let d=C;for(;d&&d.parentNode;){if(d.parentNode===document)return!0;d=d.parentNode instanceof ShadowRoot?d.parentNode.host:d.parentNode}return!1})(b))return;const g=(C=>{const d=window.getComputedStyle(C);return{top:parseFloat(d.scrollMarginTop)||0,right:parseFloat(d.scrollMarginRight)||0,bottom:parseFloat(d.scrollMarginBottom)||0,left:parseFloat(d.scrollMarginLeft)||0}})(b);if((C=>typeof C=="object"&&typeof C.behavior=="function")(E))return E.behavior(w(b,E));const m=typeof E=="boolean"||E==null?void 0:E.behavior;for(const{el:C,top:d,left:v}of w(b,x(E))){const A=d-g.top+g.bottom,T=v-g.left+g.right;C.scroll({top:A,left:T,behavior:m})}}},80813:function(we,Me,X){"use strict";X.d(Me,{CR:function(){return T},Jh:function(){return C},Q_:function(){return te},XA:function(){return A},ZT:function(){return ee},_T:function(){return _},ev:function(){return L},mG:function(){return m},pi:function(){return G},pr:function(){return P}});var K=function(se,pe){return K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(me,ge){me.__proto__=ge}||function(me,ge){for(var Ee in ge)Object.prototype.hasOwnProperty.call(ge,Ee)&&(me[Ee]=ge[Ee])},K(se,pe)};function ee(se,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Class extends value "+String(pe)+" is not a constructor or null");K(se,pe);function me(){this.constructor=se}se.prototype=pe===null?Object.create(pe):(me.prototype=pe.prototype,new me)}var G=function(){return G=Object.assign||function(pe){for(var me,ge=1,Ee=arguments.length;ge=0;Ue--)(Fe=se[Ue])&&(Ae=(Ee<3?Fe(Ae):Ee>3?Fe(pe,me,Ae):Fe(pe,me))||Ae);return Ee>3&&Ae&&Object.defineProperty(pe,me,Ae),Ae}function w(se,pe){return function(me,ge){pe(me,ge,se)}}function x(se,pe,me,ge,Ee,Ae){function Fe(ut){if(ut!==void 0&&typeof ut!="function")throw new TypeError("Function expected");return ut}for(var Ue=ge.kind,nt=Ue==="getter"?"get":Ue==="setter"?"set":"value",rt=!pe&&se?ge.static?se:se.prototype:null,qe=pe||(rt?Object.getOwnPropertyDescriptor(rt,ge.name):{}),dt,yt=!1,je=me.length-1;je>=0;je--){var at={};for(var it in ge)at[it]=it==="access"?{}:ge[it];for(var it in ge.access)at.access[it]=ge.access[it];at.addInitializer=function(ut){if(yt)throw new TypeError("Cannot add initializers after decoration has completed");Ae.push(Fe(ut||null))};var ht=(0,me[je])(Ue==="accessor"?{get:qe.get,set:qe.set}:qe[nt],at);if(Ue==="accessor"){if(ht===void 0)continue;if(ht===null||typeof ht!="object")throw new TypeError("Object expected");(dt=Fe(ht.get))&&(qe.get=dt),(dt=Fe(ht.set))&&(qe.set=dt),(dt=Fe(ht.init))&&Ee.unshift(dt)}else(dt=Fe(ht))&&(Ue==="field"?Ee.unshift(dt):qe[nt]=dt)}rt&&Object.defineProperty(rt,ge.name,qe),yt=!0}function y(se,pe,me){for(var ge=arguments.length>2,Ee=0;Ee0&&Ae[Ae.length-1])&&(rt[0]===6||rt[0]===2)){me=0;continue}if(rt[0]===3&&(!Ae||rt[1]>Ae[0]&&rt[1]=se.length&&(se=void 0),{value:se&&se[ge++],done:!se}}};throw new TypeError(pe?"Object is not iterable.":"Symbol.iterator is not defined.")}function T(se,pe){var me=typeof Symbol=="function"&&se[Symbol.iterator];if(!me)return se;var ge=me.call(se),Ee,Ae=[],Fe;try{for(;(pe===void 0||pe-- >0)&&!(Ee=ge.next()).done;)Ae.push(Ee.value)}catch(Ue){Fe={error:Ue}}finally{try{Ee&&!Ee.done&&(me=ge.return)&&me.call(ge)}finally{if(Fe)throw Fe.error}}return Ae}function O(){for(var se=[],pe=0;pe1||nt(je,it)})},at&&(Ee[je]=at(Ee[je])))}function nt(je,at){try{rt(ge[je](at))}catch(it){yt(Ae[0][3],it)}}function rt(je){je.value instanceof c?Promise.resolve(je.value.v).then(qe,dt):yt(Ae[0][2],je)}function qe(je){nt("next",je)}function dt(je){nt("throw",je)}function yt(je,at){je(at),Ae.shift(),Ae.length&&nt(Ae[0][0],Ae[0][1])}}function D(se){var pe,me;return pe={},ge("next"),ge("throw",function(Ee){throw Ee}),ge("return"),pe[Symbol.iterator]=function(){return this},pe;function ge(Ee,Ae){pe[Ee]=se[Ee]?function(Fe){return(me=!me)?{value:c(se[Ee](Fe)),done:!1}:Ae?Ae(Fe):Fe}:Ae}}function R(se){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var pe=se[Symbol.asyncIterator],me;return pe?pe.call(se):(se=typeof A=="function"?A(se):se[Symbol.iterator](),me={},ge("next"),ge("throw"),ge("return"),me[Symbol.asyncIterator]=function(){return this},me);function ge(Ae){me[Ae]=se[Ae]&&function(Fe){return new Promise(function(Ue,nt){Fe=se[Ae](Fe),Ee(Ue,nt,Fe.done,Fe.value)})}}function Ee(Ae,Fe,Ue,nt){Promise.resolve(nt).then(function(rt){Ae({value:rt,done:Ue})},Fe)}}function k(se,pe){return Object.defineProperty?Object.defineProperty(se,"raw",{value:pe}):se.raw=pe,se}var W=Object.create?function(se,pe){Object.defineProperty(se,"default",{enumerable:!0,value:pe})}:function(se,pe){se.default=pe},z=function(se){return z=Object.getOwnPropertyNames||function(pe){var me=[];for(var ge in pe)Object.prototype.hasOwnProperty.call(pe,ge)&&(me[me.length]=ge);return me},z(se)};function Z(se){if(se&&se.__esModule)return se;var pe={};if(se!=null)for(var me=z(se),ge=0;ge