var ja=function(){var b={n:5,Ha:1,ja:[30,45],k:.7,Dc:200,oc:.05},f,h=0,k=-1,n=-1,m=0,v=-1,l={level:-1,l:function(r){f=Object.assign({},b,r);v=l.level=f.Ha},Ac:function(r){r=r||0;var e=Math.min(Math.max(r-h,2),200);h=r;var y=-1===k?0:f.k;k=Math.min(Math.max(1E3/e,5),120)*(1-y)+k*y;r-n>f.Dc&&5<++m&&(e=f.k,v=v*(1-e)+(k<f.ja[0]?l.level-1:k>f.ja[1]?l.level+1:l.level)*e,Math.abs(v-l.level)>1-f.oc&&(e=Math.min(Math.max(Math.round(v),0),f.n-1),e!==l.level&&(v=l.level=e,k=(f.ja[1]-f.ja[0])/2)),n=r)},reset:function(){n=
k=-1;m=0}};return l}();function Ga(b,f,h){var k=new XMLHttpRequest;k.open("GET",b,!0);k.withCredentials=!1;k.onreadystatechange=function(){4===k.readyState&&(200===k.status||0===k.status?f(k.responseText):"undefined"!==typeof h&&h(k.status))};k.send()}
function Ha(b){switch(b){case "relu":return"gl_FragColor=max(vec4(0.,0.,0.,0.),gl_FragColor);";case "elu":return"gl_FragColor=mix(exp(-abs(gl_FragColor))-vec4(1.,1.,1.,1.),gl_FragColor,step(0.,gl_FragColor));";case "elu01":return"gl_FragColor=mix(0.1*exp(-abs(gl_FragColor))-vec4(0.1,0.1,0.1,0.1),gl_FragColor,step(0.,gl_FragColor));";case "arctan":return"gl_FragColor=atan(3.14159265359*texture2D(u0,vUV))/3.14159265359;";case "copy":return"";default:return!1}}
function Ka(b,f){var h=f%8;return b[(f-h)/8]>>7-h&1}
function La(b){var f=JSON.parse(b);b=f.ne;var h=f.nf,k=f.n,n="undefined"===typeof btoa?Buffer.from(f.data,"base64").toString("latin1"):atob(f.data),m=n.length,v;f=new Uint8Array(m);for(v=0;v<m;++v)f[v]=n.charCodeAt(v);n=new Float32Array(k);m=new Float32Array(h);v=b+h+1;var l,r;for(l=0;l<k;++l){var e=v*l;var y=0===Ka(f,e)?1:-1;var C=e+1;var D=1,J=0;for(r=C+b-1;r>=C;--r)J+=D*Ka(f,r),D*=2;r=J;C=f;D=e+1+b;J=m;var G=0,I=J.length;for(e=D;e<D+I;++e)J[G]=Ka(C,e),++G;for(e=C=0;e<h;++e)C+=m[e]*Math.pow(2,-e-
1);y=0===C&&0===r?0:y*(1+C)*Math.pow(2,1+r-Math.pow(2,b-1));n[l]=y}return n}
var w=function(){function b(d,q){d=a.createShader(d);a.shaderSource(d,q);a.compileShader(d);return a.getShaderParameter(d,a.COMPILE_STATUS)?d:!1}function f(d,q){d=b(a.VERTEX_SHADER,d);q=b(a.FRAGMENT_SHADER,q);var A=a.createProgram();a.attachShader(A,d);a.attachShader(A,q);a.linkProgram(A);return A}function h(d){void 0===d.Z&&(d.Z="precision lowp float;attribute vec2 a0;varying vec2 vv0;void main(){gl_Position=vec4(a0,0.,1.),vv0=a0*.5+vec2(.5,.5);}");void 0===d.Ta&&(d.Ta=["a0"]);void 0===d.wa&&(d.wa=
[2]);if(void 0===d.precision||"highp"===d.precision)d.precision=r;d.id=v++;void 0!==d.rc&&d.rc.forEach(function(A,Z){d.c=d.c.replace(A,d.qa[Z])});d.Pa=0;d.wa.forEach(function(A){d.Pa+=4*A});d.pa=f(d.Z,"precision "+d.precision+" float;\n"+d.c);d.o={};d.f.forEach(function(A){d.o[A]=a.getUniformLocation(d.pa,A)});d.attributes={};d.aa=[];d.Ta.forEach(function(A){var Z=a.getAttribLocation(d.pa,A);d.attributes[A]=Z;d.aa.push(Z)});if(d.g){a.useProgram(d.pa);m=d;n=d.id;for(var q in d.g)a.uniform1i(d.o[q],
d.g[q])}d.jd=!0}function k(d){Ma.wc(O);n!==d.id&&(O.Y(),n=d.id,m=d,a.useProgram(d.pa),d.aa.forEach(function(q){0!==q&&a.enableVertexAttribArray(q)}))}var n=-1,m=!1,v=0,l=!1,r="highp",e=["u1"],y=["u0"],C={u1:0},D={u0:0},J={u1:0,u2:1},G={u3:0},I={s0:{c:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vv0);}",f:e,g:C},s1:{c:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vv0);}",f:e,g:C,precision:"lowp"},s2:{c:"uniform sampler2D u1,u2;varying vec2 vv0;void main(){vec4 a=texture2D(u2,vv0),b=texture2D(u1,vv0);gl_FragColor=a*b;}",
f:["u1","u2"],g:J},s3:{c:"uniform sampler2D u1;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u1,vv0);gl_FragColor=a.r*f;}",f:e,g:C},s4:{c:"uniform sampler2D u1,u2;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u2,vv0),b=texture2D(u1,vv0);gl_FragColor=a.a*b.r*f;}",f:["u1","mask"],g:J},s5:{c:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vec2(1.-vv0.x,vv0.y));}",f:e,g:C},s6:{c:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vec2(vv0.x,1.-vv0.y));}",
f:e,g:C},s7:{c:"uniform sampler2D u0;uniform float u4;varying vec2 vv0;void main(){vec4 a=texture2D(u0,vv0);gl_FragColor=a*u4;}",f:["u0","u4"],g:D},s8:{c:"uniform sampler2D u0;uniform float u4;varying vec2 vv0;const vec4 g=vec4(.25,.25,.25,.25),e=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0);float b=dot(a*u4,g);gl_FragColor=b*e;}",f:["u0","u4"],g:D},s9:{c:"uniform sampler2D u1;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.);void main(){float a=.25*dot(e,texture2D(u1,vv0));gl_FragColor=a*e;}",
f:e,g:C},s10:{c:"uniform sampler2D u1,u5;uniform float u6;const vec4 f=vec4(1.,1.,1.,1.);varying vec2 vv0;void main(){vec4 a=texture2D(u1,vv0),b=texture2D(u5,vv0);gl_FragColor=mix(b,a,u6*f);}",f:["u1","u5","u6"],g:{u1:0,u5:1}},s11:{c:"uniform sampler2D u1;uniform vec2 u7;varying vec2 vv0;void main(){gl_FragColor=.25*(texture2D(u1,vv0+u7)+texture2D(u1,vv0+u7*vec2(1.,-1.))+texture2D(u1,vv0+u7*vec2(-1.,-1.))+texture2D(u1,vv0+u7*vec2(-1.,1.)));}",f:["u1","u7"],g:C},s12:{c:"uniform sampler2D u1;uniform vec4 u8;varying vec2 vv0;float g(float a,float b){a=floor(a)+.5;return floor(a/exp2(b));}float h(float a,float b){return floor(a*exp2(b)+.5);}float i(float a,float b){return mod(a,h(1.,b));}float e(float c,float a,float b){a=floor(a+.5),b=floor(b+.5);return i(g(c,a),b-a);}vec4 k(float a){if(a==0.)return vec4(0.,0.,0.,0.);float l=128.*step(a,0.);a=abs(a);float c=floor(log2(a)),m=c+127.,b=(a/exp2(c)-1.)*8388608.,d=m/2.,n=fract(d)*2.,o=floor(d),p=e(b,0.,8.),q=e(b,8.,16.),r=n*128.+e(b,16.,23.),j=l+o;return vec4(p,q,r,j)/255.;}void main(){float a=dot(texture2D(u1,vv0),u8);gl_FragColor=k(a);}",
f:["u1","u8"],g:C},s13:{c:"uniform sampler2D u0;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0),b=e/(e+exp(-a));gl_FragColor=b;}",f:y,g:D},s14:{c:"uniform sampler2D u0;varying vec2 vv0;const vec4 e=vec4(0.,0.,0.,0.);void main(){vec4 a=texture2D(u0,vv0);gl_FragColor=max(e,a);}",f:y,g:D},s15:{c:"uniform sampler2D u0;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0);gl_FragColor=mix(exp(-abs(a))-e,a,step(0.,a));}",f:y,g:D},s16:{c:"uniform sampler2D u0;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0),b=exp(-abs(a))-e;gl_FragColor=mix(.1*b,a,step(0.,a));}",
f:y,g:D},s17:{c:"uniform sampler2D u0,u6,u9;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0),c=texture2D(u6,vv0),d=texture2D(u9,vv0),b=a/d;gl_FragColor=c*mix(exp(-abs(b))-f,b,step(0.,a));}",f:["u0","u6","u9"],g:{u0:0,u6:1,u9:2}},s18:{c:"uniform sampler2D u0;const float e=3.141593;varying vec2 vv0;void main(){gl_FragColor=atan(e*texture2D(u0,vv0))/e;}",f:y,g:D},s19:{c:"uniform sampler2D u0;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.),g=vec4(.5,.5,.5,.5);void main(){vec4 a=texture2D(u0,vv0),b=log(e+a);gl_FragColor=b;}",
f:y,g:D},s20:{c:"uniform sampler2D u0;uniform float gain;varying vec2 vv0;void main(){vec4 a=texture2D(u0,vv0);gl_FragColor=exp(a);}",f:["u0","u10"],g:D},s21:{c:"uniform sampler2D u0,u11;uniform float u12;const vec2 f=vec2(.5,.5);const float g=1e-5;const vec4 h=vec4(1.,1.,1.,1.),i=vec4(0.,0.,0.,0.);varying vec2 vv0;void main(){vec4 a=texture2D(u11,f);float b=u12*u12;vec4 c=max(b*a,g*h);gl_FragColor=texture2D(u0,vv0)/c;}",f:["u0","u13","u12"],g:{u0:0,u13:1}},s22:{c:"uniform sampler2D u1;uniform vec2 u14;varying vec2 vv0;void main(){float a=u14.x*u14.y;vec2 b=floor(vv0*a)/a,c=fract(vv0*a),d=floor(b*u14.y),g=floor(u14.x*fract(b*u14.y)),f=(g*u14.y+d)/a;gl_FragColor=texture2D(u1,f+c/a);}",
f:["u1","u14"],g:C},s23:{c:"uniform sampler2D u15,u16,u17;varying vec2 vv0;void main(){vec4 a=texture2D(u17,vv0);vec2 b=a.rg,c=a.ba;vec4 d=texture2D(u15,b),e=texture2D(u16,c);gl_FragColor=d*e;}",f:["u15","u16","u17"],g:{u16:0,u15:1,u17:2}},s24:{c:"uniform float u18;uniform sampler2D u15,u16;varying vec2 vv0;void main(){vec2 a=fract(vv0*u18);vec4 b=texture2D(u15,vv0),c=texture2D(u16,a);gl_FragColor=b*c;}",f:["u16","u15","u18"],g:{u16:0,u15:1}},s25:{c:"uniform float u18;uniform sampler2D u15,u16,u19,u20,u21,u22;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.),g=vec4(1e-3,1e-3,1e-3,1e-3);void main(){vec2 i=vv0*u18,m=floor(i),c=i-m;vec4 n=texture2D(u15,vv0),d=texture2D(u16,c),a=texture2D(u22,vv0);a=a*255.;vec4 o=texture2D(u19,c),p=texture2D(u20,c),q=texture2D(u21,c),j=step(-g,-a),b=e-j,k=b*step(-e-g,-a);b*=e-k;vec4 h=b*step(-2.*e-g,-a);b*=e-h;vec4 l=b;d=j*d+k*o+h*p+l*q,gl_FragColor=n*d;}",
f:"u15 u16 u18 u22 u19 u20 u21".split(" "),g:{u16:0,u15:1,u22:3,u19:4,u20:5,u21:6}},s26:{c:"uniform sampler2D u15,u16,u23;uniform float u18,u24,u25,u26;varying vec2 vv0;const vec2 j=vec2(1.,1.);void main(){vec2 a=floor(u24*vv0),g=u24*vv0-a;float b=u18/u24;vec2 c=floor(g*b),d=g*b-c,h=(a+d)/u24;float l=u24*u26/u18;vec2 m=l*c,i=(m+d*u25)/u26,e=step(i,j);vec4 n=texture2D(u15,h),o=texture2D(u16,i),p=n*o*e.x*e.y,k=texture2D(u23,h);gl_FragColor=p*u25*u25+k;}",f:"u15 u16 u18 u24 u25 u26 u23".split(" "),g:{u16:0,
u15:1,u23:2}},s27:{c:"uniform sampler2D u15,u16;varying vec2 vv0;void main(){vec4 a=texture2D(u15,vv0),b=texture2D(u16,vv0);gl_FragColor=a*b;}",f:["u15","u16"],g:{u16:0,u15:1}},s28:{c:"uniform sampler2D u1,u23;uniform float u27;varying vec2 vv0;void main(){gl_FragColor=texture2D(u23,vv0)+u27*texture2D(u1,vv0);}",f:["u1","u23","u27"],g:{u1:0,u23:1}},s29:{c:"varying vec2 vv0;uniform sampler2D u1;const vec4 g=vec4(1.,1.,1.,1.),e=vec4(.299,.587,.114,0.);void main(){vec4 a=texture2D(u1,vv0);gl_FragColor=dot(a,e)*g;}",
f:e,g:C,precision:"lowp"},s30:{c:"varying vec2 vv0;uniform sampler2D u1;uniform float u28;const vec3 e=vec3(.299,.587,.114);void main(){vec3 a=texture2D(u1,vv0).rgb,b=texture2D(u1,vv0+vec2(0.,u28)).rgb,c=texture2D(u1,vv0+vec2(u28,u28)).rgb,d=texture2D(u1,vv0+vec2(u28,0.)).rgb;gl_FragColor=vec4(dot(a,e),dot(b,e),dot(c,e),dot(d,e));}",f:["u1","u28"],g:C,precision:"lowp"},s31:{c:"varying vec2 vv0;uniform sampler2D u1;uniform float u28;const vec3 f=vec3(.299,.587,.114);void main(){vec3 a=texture2D(u1,vv0).rgb,b=texture2D(u1,vv0+vec2(0.,u28)).rgb,c=texture2D(u1,vv0+vec2(u28,u28)).rgb,d=texture2D(u1,vv0+vec2(u28,0.)).rgb;gl_FragColor=vec4(a.r,b.g,c.b,dot(d,f));}",
f:["u1","u28"],g:C,precision:"lowp"},s32:{c:"varying vec2 vv0;uniform sampler2D u1,u2;uniform float u29;const vec4 g=vec4(1.,1.,1.,1.);void main(){vec4 a=vec4(0.);a-=texture2D(u1,vec2(vv0.x-u29,vv0.y-u29))*1.,a-=texture2D(u1,vec2(vv0.x-u29,vv0.y))*2.,a-=texture2D(u1,vec2(vv0.x-u29,vv0.y+u29))*1.,a+=texture2D(u1,vec2(vv0.x+u29,vv0.y-u29))*1.,a+=texture2D(u1,vec2(vv0.x+u29,vv0.y))*2.,a+=texture2D(u1,vec2(vv0.x+u29,vv0.y+u29))*1.;vec4 b=vec4(0.);b-=texture2D(u1,vec2(vv0.x-u29,vv0.y-u29))*1.,b-=texture2D(u1,vec2(vv0.x,vv0.y-u29))*2.,b-=texture2D(u1,vec2(vv0.x+u29,vv0.y-u29))*1.,b+=texture2D(u1,vec2(vv0.x-u29,vv0.y+u29))*1.,b+=texture2D(u1,vec2(vv0.x,vv0.y+u29))*2.,b+=texture2D(u1,vec2(vv0.x+u29,vv0.y+u29))*1.;vec3 c=sqrt(a.rgb*a.rgb+b.rgb*b.rgb);vec4 e=vec4(c,texture2D(u1,vv0).a),f=texture2D(u2,vv0);gl_FragColor=f.a*e.r*g;}",
f:["u1","u2","u29"],g:J},s33:{c:"varying vec2 vv0;uniform sampler2D u1,u2;uniform float u29;const vec4 j=vec4(1.,1.,1.,1.);const vec2 k=vec2(1.,1.);void main(){float i=0.;vec2 l=k*u29,b,c;float d,a,g=0.;for(float f=-4.;f<=4.;f+=1.)for(float e=-4.;e<=4.;e+=1.)b=vec2(f,e),d=length(b)/2.,a=exp(-d*d),c=vv0+l*b,a=1.,i+=a*texture2D(u1,c).r,g+=a;vec4 m=texture2D(u2,vv0);gl_FragColor=m.a*(texture2D(u1,c).r-i/g)*j;}",f:["u1","u2","u29"],g:J},s34:{c:"uniform sampler2D u3;uniform vec2 u7;varying vec2 vv0;vec4 e(vec4 a,vec4 b){vec4 c=step(a,b);return mix(a,b,c);}const vec2 h=vec2(.5,.5),i=vec2(1.,0.),j=vec2(0.,1.);void main(){vec2 a=vv0-u7*h;vec4 b=texture2D(u3,a),c=texture2D(u3,a+u7*i),d=texture2D(u3,a+u7*j),k=texture2D(u3,a+u7),l=e(b,c),g=e(d,k);gl_FragColor=e(l,g);}",
f:["u3","u7"],g:G},s35:{c:"uniform sampler2D u3;uniform vec2 u7;varying vec2 vv0;const vec2 j=vec2(1.,0.),k=vec2(0.,1.),l=vec2(2.,0.),m=vec2(0.,2.);vec4 e(vec4 a,vec4 b){vec4 c=step(a,b);return mix(a,b,c);}vec4 f(vec2 a){vec4 b=texture2D(u3,a),c=texture2D(u3,a+u7*j),d=texture2D(u3,a+u7*k),g=texture2D(u3,a+u7),i=e(b,c),h=e(d,g);return e(i,h);}void main(){vec2 a=vv0+u7*vec2(-.55,-1.05);vec4 b=f(a),c=f(a+u7*l),d=f(a+u7*2.),g=f(a+u7*m),i=e(b,c),h=e(d,g);gl_FragColor=e(i,h);}",f:["u3","u7"],g:G},s36:{c:"uniform sampler2D u1;varying vec2 vv0;void main(){vec4 a=texture2D(u1,vv0);gl_FragColor=a*a;}",
f:["u1"],g:C,precision:"lowp"},s37:{c:"uniform sampler2D u1;uniform vec2 u7;varying vec2 vv0;const vec4 g=vec4(1.,1.,1.,1.);const float d=15444.;void main(){vec4 a=1001./d*texture2D(u1,vv0-3.*u7)+2002./d*texture2D(u1,vv0-2.*u7)+3003./d*texture2D(u1,vv0-u7)+3432./d*texture2D(u1,vv0)+3003./d*texture2D(u1,vv0+u7)+2002./d*texture2D(u1,vv0+2.*u7)+1001./d*texture2D(u1,vv0+3.*u7);gl_FragColor=a;}",f:["u7","u1"],g:C,precision:"lowp"},s38:{c:"uniform sampler2D u1,u30,u31;varying vec2 vv0;const vec4 g=vec4(1.,1.,1.,1.);const float h=.1;void main(){vec4 a=texture2D(u30,vv0),b=texture2D(u31,vv0),c=texture2D(u1,vv0),d=max(g*h,b-a*a),f=sqrt(d);gl_FragColor=(c-a)/f;}",
f:["u1","u30","u31"],g:{u1:0,u30:1,u31:2}}},P={s39:{c:"uniform float u18,u32;uniform sampler2D u15,u16,u23;varying vec2 vv0;const vec2 ZERO2=vec2(0.,0.),ONE2=vec2(1.,1.),HALF2=vec2(.5,.5),EPS2=vec2(1e-4,1e-4);void main(){vec4 sum=texture2D(u23,vv0);float toSparsity=1.1111;vec2 uvFrom,uvWeight,xyPatch=ZERO2,eps2=EPS2/u18,xyTo=floor(vv0*u18+eps2);float weightSize=toSparsity*u18;vec2 halfFromSparsity=ONE2*(toSparsity-1.)/2.;for(float patch_x=0.;patch_x<1.1111;patch_x+=1.){xyPatch.x=patch_x;for(float patch_y=0.;patch_y<1.1111;patch_y+=1.)xyPatch.y=patch_y,uvFrom=(xyTo+HALF2+u32*(xyPatch-halfFromSparsity))/u18,uvFrom+=step(uvFrom,-eps2),uvFrom-=step(ONE2-eps2,uvFrom),uvWeight=(xyTo*toSparsity+xyPatch+HALF2)/weightSize,sum+=texture2D(u15,uvWeight)*texture2D(u16,uvFrom);}gl_FragColor=sum,gl_FragColor*=2.2222;}",
f:["u18","u15","u16","u23","u32"],qa:["1.1111","gl_FragColor\\*=2.2222;"]},s40:{c:"uniform float u18,u32,u26;uniform sampler2D u15,u16,u23;varying vec2 vv0;const vec2 ZERO2=vec2(0.,0.),ONE2=vec2(1.,1.),HALF2=vec2(.5,.5),EPS2=vec2(1e-4,1e-4);void main(){vec4 sum=texture2D(u23,vv0);float fromSparsity=1.1111,shrinkFactor=3.3333;vec2 uvFrom,uvWeight,xyFrom,xyPatchTo,xyPatch=ZERO2,xyShrink=ZERO2,eps2=EPS2/u26,xyTo=floor(vv0*u18+eps2);float weightSize=fromSparsity*u26;vec2 halfFromSparsity=ONE2*(fromSparsity-1.)/2.;float toSparsity=weightSize/u18;vec2 xyFrom0=xyTo*shrinkFactor;for(float patch_x=0.;patch_x<1.1111;patch_x+=1.){xyPatch.x=patch_x;for(float patch_y=0.;patch_y<1.1111;patch_y+=1.){xyPatch.y=patch_y;for(float shrink_x=0.;shrink_x<3.3333;shrink_x+=1.){xyShrink.x=shrink_x;for(float shrink_y=0.;shrink_y<3.3333;shrink_y+=1.)xyShrink.y=shrink_y,xyFrom=xyFrom0+xyShrink+shrinkFactor*u32*(xyPatch-halfFromSparsity),uvFrom=(xyFrom+HALF2)/u26,uvFrom+=step(uvFrom,-eps2),uvFrom-=step(ONE2-eps2,uvFrom),xyPatchTo=xyPatch*shrinkFactor+xyShrink,uvWeight=(xyTo*toSparsity+xyPatchTo+HALF2)/weightSize,sum+=texture2D(u15,uvWeight)*texture2D(u16,uvFrom);}}}gl_FragColor=sum,gl_FragColor*=2.2222;}",
f:"u18 u26 u15 u16 u23 u32".split(" "),qa:["1.1111","gl_FragColor\\*=2.2222;","3.3333"]}},O={Ea:function(){return l},l:function(){if(!l){r="highp";for(var d in I)h(I[d],d);w.set("s0");a.enableVertexAttribArray(0);d=Na.l();l=!0;return d}},xb:function(d){d.forEach(function(q){O.Sa(q)})},Sa:function(d){I[d.id]=d;h(d,d.id)},eb:function(d,q,A){q||(q=d);I[q]=Object.create(P[d]);P[d].qa&&P[d].qa.forEach(function(Z,Aa){I[q].c=I[q].c.replace(new RegExp(Z,"g"),A[Aa])});h(I[q],q)},set:function(d){k(I[d])},Pb:function(d){return"undefined"!==
typeof I[d]},Vc:function(){return m.Sc},Y:function(){-1!==n&&(n=-1,m.aa.forEach(function(d){0!==d&&a.disableVertexAttribArray(d)}))},Ka:function(){var d=0;m.aa.forEach(function(q,A){A=m.wa[A];a.vertexAttribPointer(q,A,a.FLOAT,!1,m.Pa,d);d+=4*A})},Rc:function(){a.enableVertexAttribArray(0)},La:function(){a.vertexAttribPointer(m.aa[0],2,a.FLOAT,!1,8,0)},ud:function(d,q){a.uniform1i(m.o[d],q)},I:function(d,q){a.uniform1f(m.o[d],q)},M:function(d,q,A){a.uniform2f(m.o[d],q,A)},vd:function(d,q){a.uniform2fv(m.o[d],
q)},xd:function(d,q){a.uniform3fv(m.o[d],q)},wd:function(d,q,A,Z){a.uniform3f(m.o[d],q,A,Z)},ra:function(d,q){a.uniform4fv(m.o[d],q)},yd:function(d,q){a.uniformMatrix2fv(m.o[d],!1,q)},zd:function(d,q){a.uniformMatrix3fv(m.o[d],!1,q)},Ad:function(d,q){a.uniformMatrix4fv(m.o[d],!1,q)},v:function(d,q){O.set(d);q.forEach(function(A){switch(A.type){case "4f":a.uniform4fv(m.o[A.name],A.value);break;case "3f":a.uniform3fv(m.o[A.name],A.value);break;case "2f":a.uniform2fv(m.o[A.name],A.value);break;case "1f":a.uniform1f(m.o[A.name],
A.value);break;case "1i":a.uniform1i(m.o[A.name],A.value);break;case "mat2":a.uniformMatrix2fv(m.o[A.name],!1,A.value);break;case "mat3":a.uniformMatrix3fv(m.o[A.name],!1,A.value);break;case "mat4":a.uniformMatrix4fv(m.o[A.name],!1,A.value)}})},cd:function(){return"lowp"}};return O}(),a=!1,Xa=function(){function b(e){console.log("ERROR in ContextFeedForward : ",e);return!1}function f(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream){var e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
e=[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||0,10)];return 12===e[0]||13===e[0]?!0:!1}return/(Mac)/i.test(navigator.platform)&&((e=navigator.userAgent)?(e=e.match(/Mac OS X (\d+)_(\d+)/)||e.match(/Mac OS X (\d+).(\d+)/),e=!e||3>e.length?!1:[parseInt(e[1],10),parseInt(e[2],10)]):e=!1,e&&10===e[0]&&15===e[1])?!0:!1}var h=!1,k=!1,n=!1,m=!1,v=!0,l=!1,r={D:function(){return h.width},L:function(){return h.height},Wc:function(){return h},Uc:function(){return a},s:function(){return v},flush:function(){a.flush()},
Tb:function(){l||(l=new Uint8Array(h.width*h.height*4));a.readPixels(0,0,h.width,h.height,a.RGBA,a.UNSIGNED_BYTE,l);return l},Yc:function(){return h.toDataURL("image/jpeg")},Zc:function(){K.J();k||(k=document.createElement("canvas"),n=k.getContext("2d"));k.width=h.width;k.height=h.height;var e=r.Tb(),y=n.createImageData(k.width,k.height),C,D,J=k.width,G=k.height,I=y.data;for(D=0;D<G;++D){var P=G-D-1;for(C=0;C<J;++C){var O=4*(D*J+C);var d=4*(P*J+C);I[O]=e[d];I[O+1]=e[d+1];I[O+2]=e[d+2];I[O+3]=e[d+
3]}}n.putImageData(y,0,0);return k.toDataURL("image/png")},Xc:function(e){!k&&e&&(k=document.createElement("canvas"),n=k.getContext("2d"));var y=e?k:document.createElement("canvas");y.width=h.width;y.height=h.height;(e?n:y.getContext("2d")).drawImage(h,0,0);return y},l:function(e){e.Hb&&!e.da?h=document.getElementById(e.Hb):e.da&&(h=e.da);h||(h=document.createElement("canvas"));h.width=e&&void 0!==e.width?e.width:512;h.height=e&&void 0!==e.height?e.height:512;"undefined"===typeof e&&(e={});void 0===
e.premultipliedAlpha&&(e.premultipliedAlpha=!1);void 0===e.gb&&(e.gb=!0);void 0===e.antialias&&(e.antialias=!1);var y={antialias:e.antialias,alpha:!0,preserveDrawingBuffer:!0,premultipliedAlpha:e.premultipliedAlpha,stencil:!1,depth:e.gb};f()||(a=h.getContext("webgl2",y));a?v=!0:((a=h.getContext("webgl",y))||(a=h.getContext("experimental-webgl",y)),v=!1);if(!a)return b("WebGL is not enabled");(m=a.getExtension("WEBGL_lose_context"))&&h.addEventListener("webglcontextlost",e.mc,!1);if(!Wa.l())return b("Not enough capabilities");
if(!Wa.Cb()&&v)return b("Your configuration cannot process color buffer float");a.clearColor(0,0,0,0);a.disable(a.DEPTH_TEST);a.disable(a.BLEND);a.disable(a.DITHER);a.disable(a.STENCIL_TEST);a.GENERATE_MIPMAP_HINT&&a.hint(a.GENERATE_MIPMAP_HINT,a.FASTEST);a.disable(a.SAMPLE_ALPHA_TO_COVERAGE);a.disable(a.SAMPLE_COVERAGE);return!0},bc:function(){if(!w.l())return!1;a.depthFunc(a.LEQUAL);a.clearDepth(1);return!0}};return r}(),Ma=function(){var b="undefined"===typeof w?JEShaders:w;return{wc:function(f){b!==
f&&(b.Y(),b=f)},Ea:function(){return b.Ea()},La:function(){b.La()},Ka:function(){b.Ka()},Y:function(){b.Y()},set:function(f){b.set(f)}}}(),N=function(){var b,f,h=0,k=-2,n=-2,m=!1,v={reset:function(){n=k=-2},l:function(){m||(b=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,b),a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),a.STATIC_DRAW),f=a.createBuffer(),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2]),a.STATIC_DRAW),v.xa(),m=!0)},
a:function(l){var r=h++,e=l.O?l.O.length:0,y="undefined"===typeof l.mode?a.STATIC_DRAW:l.mode,C=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,C);a.bufferData(a.ARRAY_BUFFER,l.vb instanceof Float32Array?l.vb:new Float32Array(l.vb),y);k=r;if(l.O){var D=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,D);if(65536>l.O.length){var J=Uint16Array;var G=a.UNSIGNED_SHORT;var I=2}else J=Uint32Array,G=a.UNSIGNED_INT,I=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,l.O instanceof J?l.O:new J(l.O),y);n=r}var P={Bb:function(O){k!==
r&&(a.bindBuffer(a.ARRAY_BUFFER,C),k=r);O&&Ma.Ka()},zb:function(){n!==r&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,D),n=r)},bind:function(O){P.Bb(O);P.zb()},Pc:function(){a.drawElements(a.TRIANGLES,e,G,0)},Qc:function(O,d){a.drawElements(a.TRIANGLES,O,G,d*I)},remove:function(){a.deleteBuffer(C);l.O&&a.deleteBuffer(D);P=null}};return P},xa:function(){-1!==k&&(a.bindBuffer(a.ARRAY_BUFFER,b),k=-1);-1!==n&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f),n=-1)},i:function(l,r){l&&N.xa();r&&Ma.La();a.drawElements(a.TRIANGLES,
3,a.UNSIGNED_SHORT,0)},Sb:function(){a.deleteBuffer(b);a.deleteBuffer(f)}};return v}(),K=function(){var b,f,h,k=!1,n={C:-2,Qb:1};return{l:function(){if(!k){b=a.createFramebuffer();var m=Wa.s();f=m&&a.DRAW_FRAMEBUFFER?a.DRAW_FRAMEBUFFER:a.FRAMEBUFFER;h=m&&a.READ_FRAMEBUFFER?a.READ_FRAMEBUFFER:a.FRAMEBUFFER;k=!0}},ad:function(){return f},Ba:function(){return h},V:function(){return a.FRAMEBUFFER},dd:function(){return n},Tc:function(){return b},a:function(m){void 0===m.fb&&(m.fb=!1);var v=m.X?m.X:!1,
l=m.width,r=void 0!==m.height?m.height:m.width,e=b,y=!1,C=!1,D=0;v&&(l=l?l:v.D(),r=r?r:v.L());var J={sb:function(){C||(e=a.createFramebuffer(),C=!0,D=n.Qb++)},wb:function(){J.sb();J.m();y=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,y);a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_COMPONENT16,l,r);a.framebufferRenderbuffer(f,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,y);a.clearDepth(1)},bind:function(G,I){D!==n.C&&(a.bindFramebuffer(f,e),n.C=D);v&&v.m();I&&a.viewport(0,0,l,r);G&&a.clear(a.COLOR_BUFFER_BIT|
a.DEPTH_BUFFER_BIT)},Ic:function(){D!==n.C&&(a.bindFramebuffer(f,e),n.C=D)},clear:function(){a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT)},Lc:function(){a.clear(a.COLOR_BUFFER_BIT)},Mc:function(){a.clear(a.DEPTH_BUFFER_BIT)},xc:function(){a.viewport(0,0,l,r)},m:function(){D!==n.C&&(a.bindFramebuffer(f,e),n.C=D)},rtt:function(G){v=G;n.C!==D&&(a.bindFramebuffer(a.FRAMEBUFFER,e),n.C=D);G.m()},J:function(){a.bindFramebuffer(f,null);n.C=-1},resize:function(G,I){l=G;r=I;y&&(a.bindRenderbuffer(a.RENDERBUFFER,
y),a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_COMPONENT16,l,r))},remove:function(){a.bindFramebuffer(f,e);a.framebufferTexture2D(f,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0);y&&a.framebufferRenderbuffer(f,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,null);a.bindFramebuffer(f,null);a.deleteFramebuffer(e);y&&a.deleteRenderbuffer(y);J=null}};m.fb&&J.wb();return J},J:function(){a.bindFramebuffer(f,null);n.C=-1},Cc:function(){a.bindFramebuffer(f,null);a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.viewport(0,0,
Wa.D(),Wa.L());n.C=-1},reset:function(){n.C=-2},N:function(){0!==n.C&&(a.bindFramebuffer(f,b),n.C=0)},clear:function(){a.viewport(0,0,Wa.D(),Wa.L());a.clear(a.COLOR_BUFFER_BIT)}}}(),Y=function(){function b(c){a.bindTexture(a.TEXTURE_2D,c)}function f(c){Aa[0]=c;c=Ba[0];var E=c>>16&32768,H=c>>12&2047,M=c>>23&255;return 103>M?E:142<M?E|31744|((255==M?0:1)&&c&8388607):113>M?(H|=2048,E|(H>>114-M)+(H>>113-M&1)):E=(E|M-112<<10|H>>1)+(H&1)}function h(c){var E=new Uint16Array(c.length);c.forEach(function(H,
M){E[M]=f(H)});return E}function k(){if(null!==sa.Ca)return sa.Ca;var c=m(h([1,1,1,1]));return null===c?!0:sa.Ca=c}function n(){if(null!==sa.Da)return sa.Da;var c=m(new Uint8Array([255,255,255,255]));return null===c?!0:sa.Da=c}function m(c){if(!Ma.Ea()||!G)return null;try{var E=a.getError(),H=V.a({isFloat:!1,G:!0,array:c,width:1});E=a.getError();if(E!==a.NO_ERROR)return!1}catch(M){return!1}K.J();a.viewport(0,0,1,1);a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);Ma.set("s0");H.Ua(0);N.i(!1,!0);
c=new Uint8Array(4);a.readPixels(0,0,1,1,a.RGBA,a.UNSIGNED_BYTE,c);c=.9<c[0];H.remove();K.N();return c}var v=0,l,r=0,e,y=!1,C,D,J,G=!1,I=!1,P,O,d,q=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],A=!1,Z=!1,Aa=new Float32Array(1),Ba=new Int32Array(Aa.buffer),sa={Ca:null,Da:null},V={l:function(){if(!G){D=[a.RGB,!1,a.RGB,a.RGBA];J=[a.RGB,!1,a.RGB,a.RGBA];l=[a.TEXTURE0,a.TEXTURE1,a.TEXTURE2,a.TEXTURE3,a.TEXTURE4,a.TEXTURE5,a.TEXTURE6,a.TEXTURE7];A="undefined"!==typeof JEContext;Z="undefined"!==typeof Wa;A&&
JEContext.pd()&&l.push(a.TEXTURE8,a.TEXTURE9);e=[-1,-1,-1,-1,-1,-1,-1,-1];C=[a.UNSIGNED_BYTE,a.FLOAT,a.FLOAT];if(!y){for(var c=new Float32Array(16384),E=0;16384>E;++E)c[E]=2*Math.random()-1;y={random:V.a({isFloat:!0,isPot:!0,array:c,width:64}),ub:V.a({isFloat:!1,isPot:!0,width:1,array:new Uint8Array([0,0,0,0])})}}G=!0}},ac:function(){V.Fc()},gd:function(){return y.ub},Fc:function(){C[1]=Wa.ka()},tc:function(){J=D=[a.RGBA,a.RGBA,a.RGBA,a.RGBA]},rd:function(c,E){w.set("s1");K.J();var H=c.D(),M=c.L();
a.viewport(0,0,H,M);c.b(0);N.i(!1,!1);a.readPixels(0,0,H,M,a.RGBA,a.UNSIGNED_BYTE,E)},Rb:function(c,E,H){a.activeTexture(a.TEXTURE0);v=0;var M=a.createTexture();b(M);var S=Wa.s()&&a.RGBA32F?a.RGBA32F:a.FLOAT;E=E instanceof Float32Array?E:new Float32Array(E);var W=Math.log2(E.length);W!==Math.floor(W)&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE));a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST);a.texParameteri(a.TEXTURE_2D,
a.TEXTURE_MIN_FILTER,a.NEAREST);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,H);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,c.D(),c.L(),0,a.RGBA,S,E);b(null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1);K.N();w.set("s0");c.H();a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);b(M);N.i(!0,!1);a.deleteTexture(M)},a:function(c){function E(){b(aa);va&&a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,va);c.isPot?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,c.ib?a.MIRRORED_REPEAT:a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,
c.P?a.MIRRORED_REPEAT:a.REPEAT)):(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE));c.na&&"undefined"!==typeof JESETTINGS&&a.texParameterf(a.TEXTURE_2D,JEContext.$c().TEXTURE_MAX_ANISOTROPY_EXT,JESETTINGS.Hc);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,c.isLinear?a.LINEAR:a.NEAREST);c.isLinear?a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,c.isMipmap&&!xa?a.NEAREST_MIPMAP_LINEAR:a.LINEAR):a.texParameteri(a.TEXTURE_2D,
a.TEXTURE_MIN_FILTER,c.isMipmap&&!xa?a.NEAREST_MIPMAP_NEAREST:a.NEAREST);ka=D[c.ga_-1];ca=J[c.ga_-1];fa=C[H];if(Wa.s()){var u=a.RGBA32F;ka===a.RGBA&&fa===a.FLOAT&&u&&(ca=u);ka===a.RGB&&fa===a.FLOAT&&u&&(ca=u,ka=a.RGBA)}if(c.G&&!c.isFloat||c.isFloat&&c.isMipmap&&Na.dc())(u=a.RGBA16F)&&(ca=u),fa=Wa.ka();c.lb&&"undefined"!==typeof a.texStorage2D&&(ha=c.lb);c.jb&&4===c.ga_&&(ka=JEContext.ed());if(c.B)a.texImage2D(a.TEXTURE_2D,0,ca,ka,fa,c.B);else if(c.url)a.texImage2D(a.TEXTURE_2D,0,ca,ka,fa,la);else if(X){try{a.getError(),
a.texImage2D(a.TEXTURE_2D,0,ca,x,z,0,ka,fa,X),a.getError()!==a.NO_ERROR&&(a.texImage2D(a.TEXTURE_2D,0,ca,x,z,0,ka,fa,null),a.getError()!==a.NO_ERROR&&a.texImage2D(a.TEXTURE_2D,0,a.RGBA,x,z,0,a.RGBA,a.UNSIGNED_BYTE,null))}catch(oa){a.texImage2D(a.TEXTURE_2D,0,ca,x,z,0,ka,fa,null)}c.isKeepArray||(X=null)}else a.texImage2D(a.TEXTURE_2D,0,ca,x,z,0,ka,fa,null);if(c.isMipmap)if(!xa&&U)U.Aa(),Ca=!0;else if(xa){u=Math.log(Math.min(x,z))/Math.log(2);var R;Da=Array(1+u);Da[0]=aa;for(R=1;R<=u;++R){var ta=Math.pow(2,
R);var ya=x/ta;ta=z/ta;var pa=a.createTexture();b(pa);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST);a.texImage2D(a.TEXTURE_2D,0,ca,ya,ta,0,ka,fa,null);b(null);Da[R]=pa}Ca=!0}b(null);e[v]=-1;va&&a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1);L=!0;p&&U&&(p(U),p=!1)}"undefined"===typeof c.isFloat&&(c.isFloat=!1);"undefined"===typeof c.G&&(c.G=!1);"undefined"===typeof c.isPot&&(c.isPot=!0);"undefined"===typeof c.isLinear&&(c.isLinear=
!1);"undefined"===typeof c.isMipmap&&(c.isMipmap=!1);"undefined"===typeof c.ya&&(c.ya=!1);void 0===c.na&&(c.na=!1);void 0===c.P&&(c.P=!1);void 0===c.ib&&(c.ib=!1);void 0===c.jb&&(c.jb=!1);void 0===c.ga_&&(c.ga_=4);void 0===c.hb&&(c.hb=!1);"undefined"===typeof c.isFlipY&&(c.isFlipY=c.url||c.array?!0:!1);"undefined"===typeof c.isKeepArray&&(c.isKeepArray=!1);c.data&&(c.array="string"===typeof c.data?La(c.data):c.isFloat?new Float32Array(c.data):new Uint8Array(c.data),c.isFlipY=!1);var H=0,M=c.B?!0:!1,
S=null,W=null,da=!1,ma=null;c.isFloat&&(c.G=!0);c.G&&(H=1);c.hb||Wa.s()||!c.isFloat||!Z||Wa.Wa()||(c.isFloat=!1);c.isFloat&&(H=2);c.na&&A&&!JEContext.kd()&&(c.na=!1);var aa=a.createTexture(),p=c.ya,la=null,X=!1,x=0,z=0,L=!1,ea=r++,ia=!1,ba,za,Ea,Q,ca,ka,fa,va=c.isFlipY,xa=c.G&&c.isMipmap&&"undefined"!==typeof Na&&!Na.Eb()?!0:!1,Da,ha=-1,Ca=!1;"undefined"!==typeof c.width&&c.width&&(x=c.width,z="undefined"!==typeof c.height&&c.height?c.height:x);var U={get:function(){return aa},D:function(){return x},
L:function(){return z},hd:function(){return c.url},ld:function(){return c.isFloat},nd:function(){return c.G},od:function(){return c.isLinear},Aa:function(){a.generateMipmap(a.TEXTURE_2D)},Va:function(u,R){xa?(u||(u=U.bb()),U.va(R),b(Da[u]),e[R]=-1):U.b(R)},bb:function(){-1===ha&&(ha=Math.log(x)/Math.log(2));return ha},ab:function(u){if(xa){u||(u=U.bb());w.set("s11");U.va(0);var R,ta=x,ya=z;for(R=1;R<=u;++R)ta/=2,ya/=2,w.M("u7",.25/ta,.25/ya),a.viewport(0,0,ta,ya),b(Da[R-1]),a.framebufferTexture2D(K.V(),
a.COLOR_ATTACHMENT0,a.TEXTURE_2D,Da[R],0),N.i(!1,1===R);e[0]=-1}else U.Aa()},va:function(u){u!==v&&(a.activeTexture(l[u]),v=u)},b:function(u){if(!L)return!1;U.va(u);if(e[u]===ea)return!1;b(aa);e[u]=ea;return!0},Ua:function(u){a.activeTexture(l[u]);v=u;b(aa);e[u]=ea},m:function(){a.framebufferTexture2D(K.V(),a.COLOR_ATTACHMENT0,a.TEXTURE_2D,aa,0)},H:function(){a.viewport(0,0,x,z);a.framebufferTexture2D(K.V(),a.COLOR_ATTACHMENT0,a.TEXTURE_2D,aa,0)},Dd:function(){a.framebufferTexture2D(K.V(),a.COLOR_ATTACHMENT0,
a.TEXTURE_2D,null,0)},resize:function(u,R){x=u;z=R;E()},clone:function(u){u=V.a({width:x,height:z,G:c.G,isFloat:c.isFloat,isLinear:c.isLinear,P:c.P,isFlipY:u?!va:va,isPot:c.isPot});Ma.set("s0");K.N();u.m();a.viewport(0,0,x,z);U.b(0);N.i(!0,!0);return u},xc:function(){a.viewport(0,0,x,z)},remove:function(){a.deleteTexture(aa);U=null},refresh:function(){U.Ua(0);va&&a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!0);M?a.texImage2D(a.TEXTURE_2D,0,ca,ka,a.UNSIGNED_BYTE,c.B):a.texImage2D(a.TEXTURE_2D,0,ca,x,z,0,ka,
fa,X);va&&a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1)},Xa:function(){var u=x*z*4;za=[new Uint8Array(u),new Uint8Array(u),new Uint8Array(u),new Uint8Array(u)];ba=[new Float32Array(za[0].buffer),new Float32Array(za[1].buffer),new Float32Array(za[2].buffer),new Float32Array(za[3].buffer)];Ea=new Uint8Array(4*u);Q=new Float32Array(Ea.buffer);ia=!0},qb:function(){ia||U.Xa();a.readPixels(0,0,x,4*z,a.RGBA,a.UNSIGNED_BYTE,Ea);var u,R=x*z,ta=2*R,ya=3*R;for(u=0;u<R;++u)ba[0][u]=Q[u],ba[1][u]=Q[u+R],ba[2][u]=Q[u+
ta],ba[3][u]=Q[u+ya];return ba},Ya:function(){K.J();w.set("s12");U.b(0);for(var u=0;4>u;++u)a.viewport(0,z*u,x,z),w.ra("u8",q[u]),N.i(!1,0===u)},Ec:function(u){var R=fa===C[0]&&!n();b(aa);va&&a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,va);R?(da||(S=document.createElement("canvas"),S.width=x,S.height=z,W=S.getContext("2d"),ma=W.createImageData(x,z),da=!0),ma.data.set(u),W.putImageData(ma,0,0),a.texImage2D(a.TEXTURE_2D,0,ca,ka,fa,S)):a.texImage2D(a.TEXTURE_2D,0,ca,x,z,0,ka,fa,u);e[v]=ea;va&&a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,
!1)},Ed:function(u,R){b(aa);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,R);a.texImage2D(a.TEXTURE_2D,0,ca,ka,fa,u);e[v]=ea;R&&a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1)},td:function(u,R){var ta=x*z,ya=4*ta;u=c.G?u?"RGBE":"JSON":"RGBA";R&&(u=R);R=Wa.s()&&!1;switch(u){case "RGBE":var pa="s41";break;case "JSON":pa=R?"s0":"s12";break;case "RGBA":case "RGBAARRAY":pa="s6"}ia||("RGBA"===u||"RGBE"===u||"RGBAARRAY"===u?(za=new Uint8Array(ya),ia=!0):"JSON"!==u||R||U.Xa());K.J();w.set(pa);U.b(0);if("RGBA"===u||"RGBE"===
u||"RGBAARRAY"===u){a.viewport(0,0,x,z);N.i(!0,!0);a.readPixels(0,0,x,z,a.RGBA,a.UNSIGNED_BYTE,za);if("RGBAARRAY"===u)return{data:za};I||(P=document.createElement("canvas"),O=P.getContext("2d"),I=!0);P.width=x;P.height=z;d=O.createImageData(x,z);d.data.set(za);O.putImageData(d,0,0);var oa=P.toDataURL("image/png")}else if("JSON"===u)if(R)oa=new Float32Array(ta),a.viewport(0,0,x,z),N.i(!0,!0),a.readPixels(0,0,x,z,a.RGBA,a.FLOAT,oa);else{for(oa=0;4>oa;++oa)a.viewport(0,z*oa,x,z),w.ra("u8",q[oa]),N.i(!oa,
!oa);U.qb();oa=Array(ta);for(pa=0;pa<ta;++pa)oa[4*pa]=ba[0][pa],oa[4*pa+1]=ba[1][pa],oa[4*pa+2]=ba[2][pa],oa[4*pa+3]=ba[3][pa]}return{format:u,data:oa,width:x,height:z,isMirrorY:c.P,isFlipY:"RGBA"===u?c.isFlipY:!c.isFlipY}}};c.isMipmap&&!xa&&L&&!Ca&&(U.Aa(),Ca=!0);if(c.url)b(aa),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,1,1,0,a.RGBA,a.UNSIGNED_BYTE,null),la=new Image,la.Oc="Anonymous",la.crossOrigin="Anonymous",la.src=c.url,la.onload=function(){x=la.width;z=la.height;E()};else if(c.B){var Fa=function(){x=
void 0!==c.B.videoWidth?c.B.videoWidth:c.B.width;z=void 0!==c.B.videoHeight?c.B.videoHeight:c.B.height;x?E():setTimeout(Fa,1)};Fa()}else c.array?(c.G&&!c.isFloat?c.array instanceof Uint16Array?(X=c.array,E()):k()?(X=h(c.array),E()):(E(),V.Rb(U,c.array,va)):(X=c.isFloat?c.array instanceof Float32Array?c.array:new Float32Array(c.array):c.array instanceof Uint8Array?c.array:new Uint8Array(c.array),E()),c.isKeepArray||(X&&X!==c.array&&(X=null),delete c.array)):E();U.Yb=U.D;p&&L&&(p(U),p=!1);return U},
J:function(c){c!==v&&(a.activeTexture(l[c]),v=c);e[c]=-1;b(null)},Jc:function(c){y.random.b(c)},reset:function(){for(var c=0;c<l.length;++c)e[c]=-1;v=-1},sd:function(){v=-1},Bd:function(){for(var c=0;c<l.length;++c)V.J(c)},Sb:function(){y&&(y.random.remove(),y.ub.remove())},Cd:function(c,E){if("RGBA"===c.format||"RGBE"===c.format){var H=new Image;H.src=c.data;H.onload=function(){V.a({P:c.isMirrorY,isFlipY:c.isFlipY,isFloat:!1,B:H,ya:function(M){if("RGBA"===c.format)E(M);else{var S=c.width,W=c.height,
da=V.a({P:c.isMirrorY,isFloat:!0,width:S,height:W,isFlipY:c.isFlipY});K.N();a.viewport(0,0,S,W);w.set("s42");da.m();M.b(0);N.i(!0,!0);V.J(0);E(da);a.flush();setTimeout(M.remove,50)}}})}}else"JSON"===c.format?E(V.a({isFloat:!0,isFlipY:c.isFlipY,width:c.width,height:c.height,array:new Float32Array(c.data)})):E(!1)}};return V}(),Wa=function(){function b(){f="undefined"===typeof Xa?JEContext:Xa;h=!0}var f,h=!1,k=!1,n=!1,m=!1,v=!1,l=!1,r=!1,e=!1,y=!1,C=!1,D=!1,J=!0,G=!0,I=!0,P=!1,O="undefined"===typeof window?
{}:window,d={l:function(){if(h)return!0;b();d.$a();d.za();d.Nb();d.Ob();K.l();Y.l();if(!d.Ib())return!1;N.l();Y.ac();return!0},D:function(){h||b();return f.D()},L:function(){h||b();return f.L()},s:function(){h||b();return f.s()},Nb:function(){D=(C=a.getExtension("EXT_color_buffer_float")||a.getExtension("WEBGL_color_buffer_float")||a.getExtension("OES_color_buffer_float"))?!0:!1;O.GL_EXT_COLORBUFFERFLOAT=C},Ob:function(){a.getExtension("EXT_color_buffer_half_float")||a.getExtension("WEBGL_color_buffer_half_float")||
a.getExtension("OES_color_buffer_half_float")},$a:function(){if(!k){this.s()||(n=a.getExtension("OES_texture_float")||a.getExtension("MOZ_OES_texture_float")||a.getExtension("WEBKIT_OES_texture_float"),v=(O.GL_EXT_FLOAT=n)?!0:!1);if(v||this.s())m=a.getExtension("OES_texture_float_linear")||a.getExtension("MOZ_OES_texture_float_linear")||a.getExtension("WEBKIT_OES_texture_float_linear"),O.GL_EXT_FLOATLINEAR=m;k=!0}},za:function(){if(!y){if(!this.s()){if(l=a.getExtension("OES_texture_half_float")||
a.getExtension("MOZ_OES_texture_half_float")||a.getExtension("WEBKIT_OES_texture_half_float"))P=l.HALF_FLOAT_OES,r=!0;!P&&a.HALF_FLOAT&&(P=a.HALF_FLOAT);!P&&a.FLOAT&&(P=a.FLOAT);O.GL_EXT_HALFFLOAT=l}if(r||this.s())e=a.getExtension("OES_texture_half_float_linear")||a.getExtension("MOZ_OES_texture_half_float_linear")||a.getExtension("WEBKIT_OES_texture_half_float_linear"),O.GL_EXT_HALFFLOATLINEAR=e;y=!0}},ka:function(){if(d.s())return a.HALF_FLOAT;d.za();return r?P:a.FLOAT},Wa:function(){return J},
Db:function(){return G},Kc:function(){return I},Cb:function(){return D},Kb:function(){G=J=!0;var q=a.createFramebuffer();a.bindFramebuffer(a.FRAMEBUFFER,q);var A=a.createTexture();a.bindTexture(a.TEXTURE_2D,A);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texImage2D(a.TEXTURE_2D,0,d.s()&&a.RGBA32F?a.RGBA32F:a.RGBA,1,1,0,a.RGBA,a.FLOAT,null);a.framebufferTexture2D(K.V(),a.COLOR_ATTACHMENT0,a.TEXTURE_2D,A,0);var Z=a.checkFramebufferStatus(K.Ba());
Z!==a.FRAMEBUFFER_COMPLETE&&(J=!1);a.texImage2D(a.TEXTURE_2D,0,d.s()&&a.RGBA16F?a.RGBA16F:a.RGBA,1,1,0,a.RGBA,d.ka(),null);a.framebufferTexture2D(K.V(),a.COLOR_ATTACHMENT0,a.TEXTURE_2D,A,0);Z=a.checkFramebufferStatus(K.Ba());Z!==a.FRAMEBUFFER_COMPLETE&&(G=!1);a.bindTexture(a.TEXTURE_2D,null);a.bindFramebuffer(a.FRAMEBUFFER,null);a.deleteTexture(A);a.deleteFramebuffer(q)},Jb:function(){var q=K.a({width:1});q.sb();var A=Y.a({width:1,isFloat:!0,ga_:3});q.m();A.m();a.flush();a.checkFramebufferStatus(K.Ba())!==
a.FRAMEBUFFER_COMPLETE?(Y.tc(),I=!1):I=!0;q.remove();A.remove()},Ib:function(){d.Kb();if(!J&&!G)return!1;d.Jb();return!0}};return d}(),Na=function(){function b(G,I,P,O){a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,O?a.NEAREST_MIPMAP_NEAREST:a.LINEAR);try{var d=a.getError();d!==a.NO_ERROR&&console.log("GLERR in test_mipmapping() :",d);a.texImage2D(a.TEXTURE_2D,0,G,2,2,0,a.RGBA,I,P);d=a.getError();if(d!==a.NO_ERROR)return!1}catch(q){return!1}O&&a.generateMipmap(a.TEXTURE_2D);N.xa();N.i(!1,!0);
a.readPixels(0,0,1,1,a.RGBA,a.UNSIGNED_BYTE,l);d=a.getError();d===a.INVALID_OPERATION&&"undefined"!==typeof a.PIXEL_PACK_BUFFER&&(a.bindBuffer(a.PIXEL_PACK_BUFFER,null),a.readPixels(0,0,1,1,a.RGBA,a.UNSIGNED_BYTE,l),d=a.getError());return d!==a.NO_ERROR?!1:0!==l[0]}function f(G){return Wa.Wa()&&b(C,a.FLOAT,new Float32Array(e),G)?(m=n.Ra,!0):!1}function h(G){return Wa.Db()?b(D,Wa.ka(),new Uint16Array(e),G)||b(D,a.FLOAT,new Float32Array(e),G)?(m=n.ua,!0):!1:!1}var k=!1,n={Ra:3,ua:2,RGBA8:0},m=n.RGBA8,
v,l=new Uint8Array(4),r=[.8,1,.8,1],e=r.concat(r,r,r),y=!0,C,D,J={l:function(){Wa.$a();Wa.za();D=C=a.RGBA;if(Xa.s()){var G=a.RGBA32F;G&&(C=G);(G=a.RGBA16F)&&(D=G)}N.l();K.reset();K.J();a.viewport(0,0,1,1);w.set("s0");k=!0;v=a.createTexture();a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,v);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.REPEAT);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.REPEAT);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST);if(h(!0)||f(!0))return!0;y=!1;
if(h(!1)||f(!1))return!0;if(Xa.s()){D=C=a.RGBA;if(h(!0)||f(!0))return!0;y=!1;if(h(!1)||f(!1))return!0}return!1},Eb:function(){return y},bd:function(){return m},md:function(){k||J.l();return m===n.Ra},dc:function(){k||J.l();return m===n.ua}};return J}(),Ya={a:function(b){var f=Y.a(b.alpha),h=Y.a(b.beta);return{Mb:function(){f.b(1);h.b(2)}}}},ab={a:function(b){var f=b.yc;f.index=b.index;f.R=b.R;f.parent=b.parent;switch(f.type){case "input":b=Za.a(f);break;default:b=$a.a(f)}return b}},Za={a:function(b){"undefined"===
typeof b.sift&&(b.sift=!1);"undefined"===typeof b.DWT&&(b.DWT=!1);"undefined"===typeof b.blur&&(b.blur=!1);"undefined"===typeof b.siftOutWidth&&(b.siftOutWidth=!1);"undefined"===typeof b.density&&(b.density=1);var f=!1;if(b.mask){f=!0;SETTINGS&&void 0!==SETTINGS.yb&&(b.mask=SETTINGS.yb+b.mask);var h=Y.a({isFloat:!1,url:b.mask})}var k=!1,n="undefined"!==typeof b.preprocessing?b.preprocessing:!1,m=!1,v=!1;b.sift?Sift.l({$b:a,da:!1,width:b.size,qd:b.siftOutWidth}):b.DWT&&DWT.l({$b:a,da:!1,width:b.size});
var l=!1;b.customInputShader&&(l="s43",w.Sa({name:"_",id:l,c:b.customInputShader,f:["uSource"],precision:"lowp"}),w.v(l,[{type:"1i",name:"_",value:0}]));switch(n){case "sobel":var r="s32";m=!0;break;case "meanNormalization":r="s33";m=!0;break;case "grayScale":r="s29";m=!1;break;case "grayScaleTilt":r="s30";v=!0;m=!1;break;case "rgbGrayTilt":r="s31";v=!0;m=!1;break;case "copy":r=l?l:"s0";break;case "inputLightRegulation":r=l?l:"s29";bb.l({width:b.size,mb:b.nBlurPass,cc:!1});k=!0;break;case "direct":case "none":r=
!1;break;default:r="s3"}v&&w.v(r,[{name:"u28",type:"1f",value:b.tilt}]);f&&(r+="Mask");if(b.blur)var e=Y.a({isFloat:!1,isPot:!1,width:b.size});var y=Y.a({isFloat:!1,isPot:!1,width:b.size}),C={D:function(){return b.sift?Sift.fa():b.size},fa:function(){return C.D()},Wb:function(){return b.sift?Sift.la():b.DWT?DWT.la():k?bb.la():y},F:function(){K.N();b.blur&&(e.H(),w.set("s44"),w.M("u7",1/b.size,1/b.size),N.i(!1,!0),e.b(0));r&&(w.set(r),m&&w.I("u29",1/b.size),y.H(),f&&h.b(1),N.i(!1,!1),y.b(0),k?bb.Ja(y):
b.sift?(w.Y(),Sift.Ja()):b.DWT&&(w.Y(),DWT.Ja(4)))}};return C}},$a={a:function(b){"undefined"===typeof b.disableNormalize&&(b.disableNormalize=!1);var f=[],h=[],k,n,m=!1,v,l=!0,r,e,y=b.isReorganize?b.isReorganize:!1,C=b.kernelsNumber?!0:!1,D=b.dynPelu?Ya.a(b.dynPelu):!1,J=D?!0:!1,G={isEnabled:!1},I;if("softmax"===b.type){b.activation="softmax";b.size=Math.pow(2,Math.ceil(Math.log2(Math.sqrt(b.num_classes))));b.sparsity="undefined"!==typeof b.sparsity?b.sparsity:b.R.fa();b.gain="undefined"!==typeof b.gain?
b.gain:1;w.v("s20",[{type:"1f",name:"u10",value:b.gain}]);var P=Y.a({isFloat:!0,isPot:!1,width:b.size}),O=Y.a({isFloat:!0,isPot:!1,width:b.size,isMipmap:!0});l=!1;var d=new Uint8Array(Math.pow(4*b.size,2)),q;for(q=0;q<b.size*b.size;++q){var A=q<b.num_classes?255:0;d[4*q]=A;d[4*q+1]=A;d[4*q+2]=A;d[4*q+3]=A}var Z=Y.a({isFloat:!1,isPot:!1,width:b.size,array:d})}else b.cost?(b.sparsity="undefined"!==typeof b.sparsity?b.sparsity:b.R.fa(),l=!1):"full"===b.connectivityUp&&(b.sparsity=b.R.fa());var Aa={elu:"s15",
elu01:"s16",relu:"s14",arctan:"s18",sigmoid:"s13",copy:"s0",softplus:"s19",softmax:"s20",dynPelu:"s17"}[b.activation],Ba=b.sparsity*b.sparsity,sa=!1,V=b.size;if(b.maxPooling){switch(b.maxPooling.size){case 2:var c="s34";break;case 4:c="s35"}sa=!0;V/=b.maxPooling.size;var E=Y.a({isFloat:!0,isPot:!1,width:V})}var H=void 0!==b.lc&&b.lc?!0:!1,M=null,S=null,W=null;H&&(M="s45"+b.index.toString(),w.eb("s45",M,[((b.normalization.n-1)/2).toFixed(1)]),w.v(M,[{type:"1i",name:"u1",value:0},{type:"2f",name:"u7",
value:[1/b.size,1/b.size]},{type:"1f",name:"u6",value:b.normalization.alpha},{type:"1f",name:"u9",value:b.normalization.beta},{type:"1f",name:"u33",value:b.normalization.k}]),S=Y.a({isFloat:!0,isPot:!0,width:b.size}),W=Y.a({isFloat:!0,isPot:!0,width:b.size}));var da,ma,aa,p;l&&(p=Y.a({isFloat:!0,isPot:!1,width:b.size}));var la=Y.a(b.bias),X,x={D:function(){return b.size},fa:function(){return V},cb:function(){return b.num_classes},Ab:function(z){I.b(z)},pc:function(){b.remap&&b.remap.isEnabled&&(G=
{isEnabled:!0,fc:Y.a({isFloat:!1,isFlipY:!1,array:new Uint8Array(b.remap.maskTexture.data),width:b.remap.maskTexture.width,isPot:!1}),layers:b.remap.layers.map(function(z){return b.parent.Vb(z)}),depth:b.remap.depth})},vc:function(){switch(b.connectivityUp){case "gaussian":X=cb.a(b.connectivity);break;case "direct":X=db.a(b.connectivity);break;case "square":X=eb.a(b.connectivity);break;case "squareFast":X=fb.a(b.connectivity,b.activation);break;case "full":X=gb.a(b.connectivity);break;case "conv":e=
b.kernelsNumber,X=hb.a(b.connectivity),y&&(r=Y.a({width:V,isFloat:!0,isFlipY:!1,isPot:!1}))}if(X.S){var z=b.size*b.sparsity;ma=Math.log(z/b.size)/Math.log(2);da=Y.a({isMipmap:!0,isFloat:!0,isPot:!0,width:z,lb:ma});aa=Y.a({isFloat:!0,isPot:!0,width:b.size})}},F:function(z,L){I=z;X.S?(da.H(),C&&la.b(2),X.F(G),da.b(0),da.ab(ma),aa.H(),C?w.set("s0"):(w.set("s28"),w.I("u27",Ba),la.b(1)),da.Va(ma,0),N.i(!1,!1),w.set(Aa),H?S.m():p.m(),aa.b(0),J&&D.Mb(),N.i(!1,!1)):(p.H(),la.b(1),X.F());H&&(w.set(M),W.m(),
S.b(0),N.i(!1,!1),w.set("s46"),w.I("u6",1),p.m(),W.b(1),N.i(!1,!1));if(l)return sa?(E.H(),p.b(0),w.set(c),w.M("u7",1/b.size,1/b.size),N.i(!1,!1),L=E):L=p,L.b(0),y&&(r.m(),w.set("s22"),w.M("u14",e,V/e),N.i(!1,!1),L=r,r.b(0)),L;if("softmax"===b.type){w.set("s20");p.b(0);P.m();N.i(!1,!1);b.disableNormalize?z=P:(w.set("s2"),P.b(0),Z.b(1),O.m(),N.i(!1,!1),w.set("s0"),n.H(),O.b(0),O.ab(!1),N.i(!1,!1),w.set("s21"),k.H(),O.Va(!1,0),w.I("u12",p.Yb()),n.b(1),N.i(!1,!1),z=k);if(L){switch(m){case "cpuRGBAAvg":break;
default:var ea=x.pb(z)}return ea}return!1}if(b.cost){w.set("gpuRawAvg"===m?"s8":"s7");L=p;b.disableNormalize||(w.I("u4",1/b.size),k.H(),p.b(0),N.i(!1,!1),L=k);switch(m){case "cpuRGBA2Float":L.Ya();ea=x.pb(L);v(ea);break;case "gpuRawAvg":case "gpuRaw":L.b(0),v(L)}return!1}},Gb:function(z){z&&"undefined"!==typeof z.ob&&(m=z.ob,v=z.nc);p=Y.a({isFloat:!0,isPot:!0,isMipmap:"softmax"===b.type,width:b.size});"softmax"===b.type&&(n=Y.a({isFloat:!0,isPot:!0,width:1}));var L=0,ea=0,ia="undefined"!==typeof b.num_classes&&
b.num_classes?b.num_classes:b.size*b.size;for(z=0;z<ia;++z)f.push(L+(b.size-1-ea)*b.size),h.push([-1,-1,-1,-1]),++L,L===b.size&&(L=0,++ea);b.disableNormalize||(k=Y.a({isFloat:!0,isPot:!0,width:b.size}))},pb:function(z){z.Ya();var L=z.qb();f.forEach(function(ea,ia){h[ia][0]=L[0][ea];h[ia][1]=L[1][ea];h[ia][2]=L[2][ea];h[ia][3]=L[3][ea]});return h}};b.R&&x.vc(b.R);return x}};
function ib(){var b,f,h,k;b||(b={});this.Vb=function(n){return f[n]};this.sc=function(n){var m=!1;f=n.map(function(v,l){return m=v=ab.a({index:l,parent:this,yc:v,R:m})});h=f[0];k=f[f.length-1];f.forEach(function(v,l){0!==l&&v.pc()})};this.F=function(n,m){var v=m;f.forEach(function(l){v=l.F(v,n)});return v};this.Ub=function(){return h.D()};this.Xb=function(){return k.D()};this.la=function(){return k.Wb()};this.uc=function(n){k.Gb(n)};this.cb=function(){return k.cb()}}
var db={a:function(b){var f=Y.a(b.weights);delete b.weights.data;return{S:!0,ea:function(){return 1},Zb:function(){return f},F:function(){w.set("s27");f.b(1);N.i(!1,!1)}}}},gb={a:function(b){var f=b.fromLayerSize,h=Y.a(b.weights);return{S:!0,ea:function(){return f},F:function(k){if(k.isEnabled){w.set("s25");k.fc.b(3);var n,m=Math.min(k.layers.length,k.depth);for(n=0;n<m;++n)k.layers[n].Ab(4+n)}else w.set("s24");w.I("u18",b.toLayerSize);h.b(1);N.i(!1,!1)}}}},cb={a:function(b){var f=b.toSparsity*b.toLayerSize,
h=f/b.fromLayerSize,k=Y.a(b.weights);Y.a({width:f,isFloat:!0,array:new Float32Array(b.fromBindings),isPot:!0});var n=Y.a({width:f,isFloat:!0,array:new Float32Array(b.toBindings),isPot:!0});return{S:!0,ea:function(){return h},F:function(){w.set("s23");k.b(1);n.b(2);N.i(!1,!0)}}}},eb={a:function(b){var f=b.fromLayerSize,h=b.toLayerSize,k=b.toSparsity,n=k*h,m=n/f,v=f/h,l,r,e,y,C=0,D=0,J=0,G=Array(k*h*k*h*4),I=Array(k*h*k*h*4),P=Array(f*f);for(l=0;l<P.length;++l)P[l]=0;var O=Math.floor(k/2),d=.5/h,q=
.5/f,A=.5/n;for(l=0;l<h;++l)for(r=0;r<h;++r){var Z=Math.round(l*v);var Aa=Math.round(r*v);var Ba=l/h;var sa=r/h;Ba+=d;sa+=d;for(e=0;e<k;++e)for(y=0;y<k;++y){var V=C/n;var c=D/n;var E=Z+e-O;var H=Aa+y-O;0>E&&(E+=f);0>H&&(H+=f);E>=f&&(E-=f);H>=f&&(H-=f);var M=E/f;var S=H/f;c=1-c-1/n;M+=q;S+=q;V+=A;c+=A;var W=l*k+e,da=r*k+y;da=h*k-da-1;W=da*h*k+W;G[4*W]=V;G[4*W+1]=c;G[4*W+2]=M;G[4*W+3]=S;M=P[H*f+E]++;S=M%m;E=E*m+S;H=H*m+(M-S)/m;H=f*m-1-H;H=H*f*m+E;I[4*H]=V;I[4*H+1]=c;I[4*H+2]=Ba;I[4*H+3]=sa;++C>=n&&
(C=0,++D);++J}}var ma=Y.a(b.weights);Y.a({width:n,isFloat:!0,array:new Float32Array(I),isPot:!0});I=null;var aa=Y.a({width:n,isFloat:!0,array:new Float32Array(G),isPot:!0});G=null;return{S:!0,ea:function(){return m},F:function(){w.set("s23");ma.b(1);aa.b(2);N.i(!1,!1)}}}},hb={a:function(b){var f=b.kernelsNumber,h=b.toSparsity,k=h*b.toLayerSize/b.fromLayerSize,n=Y.a(b.weights);return{S:!0,ea:function(){return k},fd:function(){return h},Zb:function(){return n},F:function(){w.set("s26");w.I("u24",f);
w.I("u25",h);w.I("u18",b.toLayerSize);w.I("u26",b.fromLayerSize);n.b(1);N.i(!1,!1)}}}},fb={a:function(b,f){var h=b.fromLayerSize,k=b.toLayerSize,n=b.toSparsity,m=b.stride?b.stride:1,v=n*k/h,l=k<h,r=h/k,e=Y.a(b.weights),y="s47"+[h.toString(),k.toString(),n.toString(),m.toString(),f].join("_");w.Pb(y)||(b=Ha(f),k=[{type:"1f",name:"u18",value:k},{type:"1f",name:"u32",value:m}],l&&k.push({type:"1f",name:"u26",value:h}),h=[(l?v:n).toFixed(1),b],l&&h.push(r.toFixed(1)),w.eb(l?"s40":"s39",y,h),w.v(y,k.concat([{type:"1i",
name:"u16",value:0},{type:"1i",name:"u23",value:1},{type:"1i",name:"u15",value:3}])));return{S:!1,ea:function(){return v},F:function(){w.set(y);e.b(3);N.i(!1,!1)}}}},bb=function(){var b,f,h,k,n,m,v,l,r;return{l:function(e){b=e.mb?e.mb:3;f=e.width?e.width:64;k=e.cc?!0:!1;e={isFloat:!1,width:f,isPot:!1,isFlipY:!1};n=Y.a(e);m=Y.a(e);v=Y.a(e);l=Y.a(e);r=Y.a({isFloat:!0,width:f,isPot:!1,isFlipY:!1});h=1/f},Ja:function(e){w.set("s37");for(var y=0;y<b;++y)n.m(),w.M("u7",h,0),N.i(k,!1),m.m(),n.b(0),w.M("u7",
0,h),N.i(k,!1),m.b(0);w.set("s36");l.m();e.b(0);N.i(k);w.set("s37");for(y=0;y<b;++y)v.m(),l.b(0),w.M("u7",h,0),N.i(k,!1),l.m(),v.b(0),w.M("u7",0,h),N.i(k,!1);w.set("s38");r.m();e.b(0);m.b(1);l.b(2);N.i(k,!1);r.b(0)},la:function(){return r}}}();
window.JEEARAPI=function(){var b,f,h;function k(g,t){for(var B in g)"undefined"!==typeof t[B]&&(g[B]=t[B])}function n(g){if(g){var t=g.w,B=g.h;p.A.ba[0]=-1+2*(g.x+t/2)/p.U;p.A.ba[1]=-1+2*(g.y+B/2)/p.T;p.A.scale[0]=t/p.U;p.A.scale[1]=B/p.T}else p.A.ba[0]=0,p.A.ba[1]=0,p.A.scale[0]=1,p.A.scale[1]=1;p.width=p.U*p.A.scale[0];p.height=p.T*p.A.scale[1]}function m(){var g=[{type:"2f",name:"u35",value:p.A.ba},{type:"2f",name:"u36",value:p.A.scale}],t=g.concat([{type:"1f",name:"u37",value:p.U/p.T},{name:"u7",
type:"2f",value:[1/p.U,1/p.T]}]);w.v("s49",t);w.v("s50",t);w.v("s51",g)}function v(g,t,B){var F=r(g,t,"dx")*p.W[0],T=r(g,t,"dy")*p.W[1];g=B[2]*r(g,t,"ds");if(da){t=Math.cos(ma);var qa=Math.sin(ma),ua=-qa*F+t*T;F=t*F+qa*T;T=ua}F*=B[0];T*=B[1];B=x.j[2];t=x.j[3];x.j[0]-=F*B*Z[0];x.j[1]-=T*t*Z[1];x.j[2]-=g*B*Z[2];x.j[2]=Math.min(Math.max(x.j[2],q.rb[0]*p.W[0]),q.rb[1]*p.W[0]);x.j[0]=Math.min(Math.max(x.j[0],0),1);x.j[3]=x.j[2]*p.aspectRatio/p.ma;x.j[1]=Math.min(Math.max(x.j[1],0),1)}function l(g){var t=
x.j[2],B=x.j[3],F=(2*Math.random()-1)*g,T=.5*(2*Math.random()-1)*g;x.j[0]+=(2*Math.random()-1)*g*t;x.j[1]+=F*B;x.j[2]+=T*t;x.j[3]=x.j[2]*p.aspectRatio/p.ma}function r(g,t,B){t=ia[t].kb[B];return(g[t][0]+g[t][1]+g[t][2]+g[t][3])/4}function e(g,t,B,F){t=ia[t].kb[B];return(g[t][0]+g[t][1]+g[t][2]+g[t][3])/4*(1-F)+F*Math.min(g[t][0],g[t][1],g[t][2],g[t][3])}function y(g,t,B){var F=e(g,t,"here",B);g=ta*e(g,t,"notHere",B);return(F-g)/ia[t].Oa}function C(){ma=0;da&&null!==aa&&(ma=aa[0]+Math.random()*(aa[1]-
aa[0]));L=z.$;var g=la[X];g&&(x.j[0]=g[0],x.j[1]=g[1],x.j[2]=g[2],x.j[3]=g[3]);X=(X+1)%la.length}function D(g,t){sa&&(ha.roll=da?ma:c);V&&(ha.pitch=E);ha.label=ia[Q.u].label;ha.distance=ia[Q.u].Lb;ha.positionScale[0]=.5+(x.j[0]-.5)/p.A.scale[0];ha.positionScale[1]=.5+(x.j[1]-.5)/p.A.scale[1];ha.positionScale[2]=x.j[2];ha.positionScale[3]=x.j[3];ha.detectScore=t;ha.yaw=g}function J(g){var t=-1,B=-1E12;-1!==[z.$,z.sa].indexOf(L)&&ia.forEach(function(na,ra){na=y(g,ra,0);na>B&&(B=na,t=ra)});switch(L){case z.$:L=
z.sa;v(g,t,[1,1,1]);h=0;break;case z.sa:++h;B>Ca?(Fa?(L=z.ha,Ea=t,Q.u=t,Q.Ia=0):(L=z.Qa,za=0,Ea=t),v(g,Ea,[1,1,1])):h>q.ic?C():v(g,t,[1,1,1]);break;case z.Qa:++za>Qa&&(L=z.ha,Q.n=0,Q.nb=0,Q.u=Ea,Q.K[0]=0,Q.K[1]=0);v(g,Ea,[1,1,1]);l(Ra);break;case z.ha:if(Fa||++Q.n>Ja){var F=y(g,Q.u,1);if(Fa||F>Ca+Sa||u){sa&&(c=Aa*r(g,Q.u,"roll"),da&&(ma+=c));if(H){var T=Fa||u?Math.PI*r(g,Q.u,"yaw"):Math.atan2(Q.K[1],Q.K[0]);if(V){var qa=.5+.5*r(g,Q.u,"pitch");E=Ba[0]+(Ba[1]-Ba[0])*qa}D(T,F)}u?(v(g,Q.u,R),F>U?(Q.Ia=
0,ha.label||(ha.label=ia[Q.u].label)):++Q.Ia>Ta&&C()):H?C():v(g,Q.u,[.5,.5,.5])}else C()}else{var ua=1-(Ja-Q.n)/(Ja-1);F=1.5-1*ua;v(g,Q.u,[F,F,F]);l(Ua*(1-ua));var wa=y(g,Q.u,ua);wa<Ca*ua*Va?C():++Q.nb>10*Ja?C():ia.some(function(na,ra){return Q.u===ra?!1:y(g,ra,ua)>wa*(ya*ua+(1-ua))?!0:!1})?(l(Oa[0]),ma+=(2*Math.random()-1)*Oa[1]*Math.PI/180,Q.n=0,Q.K[0]=0,Q.K[1]=0):(F=Math.PI*r(g,Q.u,"yaw"),Q.K[0]+=Math.cos(F),Q.K[1]+=Math.sin(F))}}}function G(){w.xb([{id:"s50",name:"_",Z:"attribute vec2 a0;uniform vec4 u38;uniform vec2 u35,u36;uniform float u34,u37;varying vec2 vv0;void main(){gl_Position=vec4(a0,0.,1.);float a=u37*(u38.z/u38.w);a*=u36.x/u36.y;float b=cos(u34),c=sin(u34);vec2 d=mat2(b,-c*a,c/a,b)*a0,f=u35+d*u36;vv0=u38.xy+.5*u38.zw*f;}",
c:"uniform sampler2D u1;uniform vec2 u7;varying vec2 vv0;const vec3 g=vec3(1.,1.,1.);vec3 c[9];void main(){vec2 d=vv0+.5*u7;c[0]=texture2D(u1,d-u7*vec2(-1.,-1.)).rgb,c[1]=texture2D(u1,d-u7*vec2(-1.,0.)).rgb,c[2]=texture2D(u1,d-u7*vec2(-1.,1.)).rgb,c[3]=texture2D(u1,d-u7*vec2(0.,-1.)).rgb,c[4]=texture2D(u1,d-u7).rgb,c[5]=texture2D(u1,d-u7*vec2(0.,1.)).rgb,c[6]=texture2D(u1,d-u7*vec2(1.,-1.)).rgb,c[7]=texture2D(u1,d-u7*vec2(1.,0.)).rgb,c[8]=texture2D(u1,d-u7*vec2(1.,1.)).rgb;vec3 a,b;a=min(c[0],c[1]),b=max(c[0],c[1]),c[0]=a,c[1]=b,a=min(c[0],c[2]),b=max(c[0],c[2]),c[0]=a,c[2]=b,a=min(c[0],c[3]),b=max(c[0],c[3]),c[0]=a,c[3]=b,a=min(c[0],c[4]),b=max(c[0],c[4]),c[0]=a,c[4]=b,a=min(c[0],c[5]),b=max(c[0],c[5]),c[0]=a,c[5]=b,a=min(c[0],c[6]),b=max(c[0],c[6]),c[0]=a,c[6]=b,a=min(c[0],c[7]),b=max(c[0],c[7]),c[0]=a,c[7]=b,a=min(c[0],c[8]),b=max(c[0],c[8]),c[0]=a,c[8]=b,a=min(c[1],c[2]),b=max(c[1],c[2]),c[1]=a,c[2]=b,a=min(c[1],c[3]),b=max(c[1],c[3]),c[1]=a,c[3]=b,a=min(c[1],c[4]),b=max(c[1],c[4]),c[1]=a,c[4]=b,a=min(c[1],c[5]),b=max(c[1],c[5]),c[1]=a,c[5]=b,a=min(c[1],c[6]),b=max(c[1],c[6]),c[1]=a,c[6]=b,a=min(c[1],c[7]),b=max(c[1],c[7]),c[1]=a,c[7]=b,a=min(c[1],c[8]),b=max(c[1],c[8]),c[1]=a,c[8]=b,a=min(c[2],c[3]),b=max(c[2],c[3]),c[2]=a,c[3]=b,a=min(c[2],c[4]),b=max(c[2],c[4]),c[2]=a,c[4]=b,a=min(c[2],c[5]),b=max(c[2],c[5]),c[2]=a,c[5]=b,a=min(c[2],c[6]),b=max(c[2],c[6]),c[2]=a,c[6]=b,a=min(c[2],c[7]),b=max(c[2],c[7]),c[2]=a,c[7]=b,a=min(c[2],c[8]),b=max(c[2],c[8]),c[2]=a,c[8]=b,a=min(c[3],c[4]),b=max(c[3],c[4]),c[3]=a,c[4]=b,a=min(c[3],c[5]),b=max(c[3],c[5]),c[3]=a,c[5]=b,a=min(c[3],c[6]),b=max(c[3],c[6]),c[3]=a,c[6]=b,a=min(c[3],c[7]),b=max(c[3],c[7]),c[3]=a,c[7]=b,a=min(c[3],c[8]),b=max(c[3],c[8]),c[3]=a,c[8]=b,a=min(c[4],c[5]),b=max(c[4],c[5]),c[4]=a,c[5]=b,a=min(c[4],c[6]),b=max(c[4],c[6]),c[4]=a,c[6]=b,a=min(c[4],c[7]),b=max(c[4],c[7]),c[4]=a,c[7]=b,a=min(c[4],c[8]),b=max(c[4],c[8]),c[4]=a,c[8]=b,gl_FragColor=vec4(c[4]*g,1.);}",
f:"u1 u38 u36 u35 u34 u37 u7".split(" "),precision:"lowp"},{id:"s49",name:"_",Z:"attribute vec2 a0;uniform vec4 u38;uniform vec2 u35,u36;uniform float u34,u37;varying vec2 vv0;void main(){gl_Position=vec4(a0,0.,1.);float a=u37*(u38.z/u38.w);a*=u36.x/u36.y;float b=cos(u34),c=sin(u34);vec2 d=mat2(b,-c*a,c/a,b)*a0,f=u35+d*u36;vv0=u38.xy+.5*u38.zw*f;}",c:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vv0);}",f:"u1 u38 u36 u35 u34 u37".split(" "),precision:"lowp"},{id:"s52",
name:"_",Z:"attribute vec2 a0;uniform vec4 u38;varying vec2 vv0;void main(){gl_Position=vec4(a0,0.,1.),vv0=u38.xy+.5*u38.zw*a0;}",c:"uniform sampler2D u1;uniform vec2 u7;varying vec2 vv0;const vec3 g=vec3(1.,1.,1.);float c[5];void main(){c[0]=texture2D(u1,vv0-u7*vec2(-1.,0.)).r,c[1]=texture2D(u1,vv0-u7*vec2(0.,-1.)).r,c[2]=texture2D(u1,vv0-u7).r,c[3]=texture2D(u1,vv0-u7*vec2(0.,1.)).r,c[4]=texture2D(u1,vv0-u7*vec2(1.,0.)).r;float a,b;a=min(c[0],c[1]),b=max(c[0],c[1]),c[0]=a,c[1]=b,a=min(c[0],c[2]),b=max(c[0],c[2]),c[0]=a,c[2]=b,a=min(c[0],c[3]),b=max(c[0],c[3]),c[0]=a,c[3]=b,a=min(c[0],c[4]),b=max(c[0],c[4]),c[0]=a,c[4]=b,a=min(c[1],c[2]),b=max(c[1],c[2]),c[1]=a,c[2]=b,a=min(c[1],c[3]),b=max(c[1],c[3]),c[1]=a,c[3]=b,a=min(c[1],c[4]),b=max(c[1],c[4]),c[1]=a,c[4]=b,a=min(c[2],c[3]),b=max(c[2],c[3]),c[2]=a,c[3]=b,a=min(c[2],c[4]),b=max(c[2],c[4]),c[2]=a,c[4]=b,gl_FragColor=vec4(c[2]*g,1.);}",
f:["u1","u38","u7"],precision:"lowp"},{id:"s51",name:"_",Z:"attribute vec2 a0;uniform vec2 u35,u36;varying vec2 vv0;const vec2 f=vec2(1.,1.);void main(){gl_Position=vec4(a0,0.,1.);vec2 a=u35+a0*u36,b=(a+f)/2.;vv0=b;}",c:"uniform sampler2D u1;uniform vec4 u38;varying vec2 vv0;void main(){vec2 b=u38.xy-.5*u38.zw,c=u38.xy+.5*u38.zw,a=step(b,vv0)*step(vv0,c);gl_FragColor=mix(texture2D(u1,vv0),vec4(0.,1.,0.,1.),a.x*a.y*.5);}",f:["u1","u38","u36","u35"],precision:"lowp"}]);var g=[{type:"1i",name:"u1",value:0}];
w.v("s50",g);w.v("s49",g);w.v("s52",g);w.v("s51",g);I()}function I(){ma=0;w.v("s49",oa);w.v("s50",oa);ha.roll=0}function P(){p.aspectRatio=p.width/p.height;la.splice(0,la.length);X=0;p.Fa=Math.round(p.width*A.margins);p.Ga=Math.round(p.height*A.margins);p.Na=p.width-2*p.Fa;p.Ma=p.height-2*p.Ga;var g=Math.min(p.width,p.height),t,B,F;for(t=0;t<A.nSweepSsteps;++t){var T=A.sweepScaleRange[0]+t/(A.nSweepSsteps-1)*(A.sweepScaleRange[1]-A.sweepScaleRange[0]);T*=g;var qa=T/p.width;var ua=qa*p.aspectRatio;
var wa=(p.Na-T)*(p.Ma-T);var na=Math.min(Math.floor(wa/(A.sweepStepMinPx*A.sweepStepMinPx)),A.nSweepXYsteps);na=wa/na;var ra=Math.round(Math.sqrt(na));var Ia=Math.round((p.Na-T)/ra);var jb=Math.round((p.Ma-T)/ra);for(F=0;F<jb;++F)for(wa=p.Ga+Math.round(T/2+ra*F),wa/=p.height,B=0;B<Ia;++B)na=p.Fa+Math.round(T/2+ra*B),na/=p.width,la.push([na,wa,qa,ua])}if(A.sweepShuffle)for(g=la,t=g.length-1;0<t;--t)T=Math.floor(Math.random()*(t+1)),qa=g[t],g[t]=g[T],g[T]=qa;else la.reverse()}function O(g){xa={isLinear:!0,
width:p.width,height:p.height,B:g,isPot:!1,isFlipY:!0,isFloat:!1};b=Y.a(xa);ka=!0}function d(g,t,B){if(!g.exportData||!g.exportData.labels)return t("INVALID_NN");var F=g.exportData;"undefined"===typeof F.paramsPerLabel&&(F.paramsPerLabel={});"undefined"!==typeof B&&B.paramsPerLabel&&(F.paramsPerLabel=Object.assign(F.paramsPerLabel,B.paramsPerLabel));Pa.reset_state();M=new ib;M.sc(g.layers);M.uc({ob:"cpuRGBA2Float",nc:J});x.X=Y.a({isFloat:!1,isPot:!1,width:M.Ub()});Z=F.dxysFactors?F.dxysFactors:q.Za;
F.rollMax?(Aa=F.rollMax,sa=!0):sa=!1;F.pitchRange?(Ba=F.pitchRange,V=!0):V=!1;ba=M.Xb();g="undefined"===typeof B?{}:B;ta="undefined"===typeof g.notHereFactor?1:g.notHereFactor;g=F.labels;B="undefined"===typeof F.paramsPerLabel?!1:F.paramsPerLabel;var T="undefined"===typeof F.inputAspectRatio?1:F.inputAspectRatio,qa=Math.sqrt(T);p.W[0]=qa;p.W[1]=1/qa;T!==p.ma&&(p.ma=T,P());T=Array(g.length);for(qa=0;qa<ba/8;++qa)for(var ua=0;ua<ba;++ua){var wa=ua+qa*ba;if(wa>=g.length)break;var na=ua,ra=8*qa,Ia=g[wa];
T[wa]={Oa:B&&B[Ia]&&B[Ia].thresholdDetect?B[Ia].thresholdDetect:q.Oa,label:Ia,Lb:F.distances&&F.distances[wa]?F.distances[wa]:3,kb:{here:na+ra*ba,notHere:na+(ra+1)*ba,yaw:na+(ra+2)*ba,dx:na+(ra+3)*ba,dy:na+(ra+4)*ba,ds:na+(ra+5)*ba,roll:na+(ra+6)*ba,pitch:na+(ra+7)*ba}}}ia=T;t(!1)}var q={ia:512,Za:[.05,.05,.15],qc:{margins:.1,nSweepXYsteps:36,nSweepSsteps:4,sweepScaleRange:[.3,.7],sweepStepMinPx:16,sweepShuffle:!0},rb:[1/15,.9],ic:3,Oa:.68,kc:10,ec:.03,gc:8,zc:-.02,Fb:.02,tb:.7,hc:20,Nc:.3,Bc:[.02,
10],oa:[1,6],jc:3},A=Object.create(q.qc),Z=q.Za,Aa,Ba,sa=!1,V=!1,c=0,E=0,H=!1,M,S=!1,W=!1,da,ma=0,aa,p={aspectRatio:1,ma:1,W:[1,1],width:0,height:0,U:0,T:0,Fa:0,Ga:0,Na:0,Ma:0,ca:"s49",A:{ba:[0,0],scale:[1,1]}},la=[],X=0,x={X:!1,j:[0,0,0,0]},z={ta:-2,LOADING:-1,$:0,sa:1,Qa:2,ha:3},L=z.ta,ea=-2,ia,ba;var za=h=0;var Ea=-1;var Q={n:0,nb:0,Ia:0,u:-1,K:[0,0]};var ca=0;var ka=b=f=!1;var fa=0;var va=-1;var xa=null;var Da=!1,ha={distance:0,label:!1,positionScale:[0,0,0,0],detectScore:0,yaw:0,pitch:0,roll:0},
Ca=1,U=1,Fa=!1,u=!1,R=null,ta=1,ya=q.tb,pa={cutShader:null,thresholdDetectFactor:1,thresholdDetectFactorUnstitch:1,isSkipConfirmation:!1,isKeepTracking:!1,trackingFactors:[2,2,2],secondNeighborFactor:q.tb,nLocateAutomoves:q.kc,locateMoveNoiseAmplitude:q.ec,nConfirmAutoMoves:q.gc,nConfirmUnstitchMoves:q.hc,confirmMoveNoiseAmplitude:q.Fb,thresholdConfirmOffset:q.zc,tiltPosAngleIfAmbiguousDetection:q.Bc,confirmScoreMinFactorDuringAutoMove:q.Gc},oa=[{type:"1f",name:"u34",value:0}],Qa,Ra,Ja,Ta,Ua,Sa,Oa,
Va,Pa={init:function(g){function t(B){g.callbackReady&&g.callbackReady(B)}if(L!==z.ta)return t("ALREADY_INITIALIZED");L=z.LOADING;if("undefined"!==typeof g.canvas)S=g.canvas,W=!1;else if("undefined"===typeof g.canvasId)S=document.createElement("canvas"),W=!1;else{S=document.getElementById(g.canvasId);if(!S)return t("INVALID_CANVASID"),!1;W=!0}"undefined"!==typeof g.isDebugRender&&(W=g.isDebugRender);W&&(S.style.display="block");g.scanSettings&&k(A,g.scanSettings);g.canvasSize&&(q.ia=g.canvasSize);
ja.l({n:q.oa[1]-q.oa[0]+1,Ha:q.jc-q.oa[0]});da="undefined"===typeof g.followZRot?!1:g.followZRot;aa="undefined"===typeof g.ZRotRange?null:g.ZRotRange;Da="undefined"!==typeof WorkerGlobalScope&&"undefined"!==typeof self&&self instanceof WorkerGlobalScope;-1!==q.ia&&(S.width=q.ia,S.height=q.ia);Pa.set_source(g.video,g.videoCrop);if(!Xa.l({da:S,width:S.width,height:S.height,debug:!1,mc:t.bind(null,"GLCONTEXT_LOST"),premultipliedAlpha:!1})||!Xa.bc())return t("GL_INCOMPATIBLE"),!1;0===ca&&(O(f),P());G();
m();L=z.$;t(!1);return!0},set_source:function(g,t){"undefined"!==typeof g&&g?(f=g,ca=0,"VIDEO"===g.tagName?(p.U=f.videoWidth,p.T=f.videoHeight,fa=1):(p.U=f.width,p.T=f.height,fa=2),n(t)):ca=1;-1===[z.ta,z.LOADING].indexOf(L)&&(xa&&xa.B&&(xa.B=g),P(),m(),2===fa&&b.refresh())},set_NN:function(g,t,B){if(1===ea)t&&t("NN_LOADING");else{var F=function(T){ea=0;t&&t(T)};ea=1;"string"===typeof g?Ga(g,function(T){if(!T)return F("INVALID_NN");try{var qa=JSON.parse(T)}catch(ua){return F("INVALID_NN")}d(qa,F,
B)},function(){F("NOTFOUND_NN")}):d(g,F,B)}},reset_state:function(){I();X=0;L=z.$},detect:function(g,t,B){if(L===z.LOADING||0!==ea)return ha;B=Object.assign({},pa,B?B:{});Ca=B.thresholdDetectFactor;U=B.thresholdDetectFactorUnstitch;Fa=B.isSkipConfirmation;u=B.isKeepTracking;R=B.trackingFactors;ya=B.secondNeighborFactor;Qa=B.nLocateAutomoves;Ra=B.locateMoveNoiseAmplitude;Ja=B.nConfirmAutoMoves;Sa=B.thresholdConfirmOffset;Ua=B.confirmMoveNoiseAmplitude;Ta=B.nConfirmUnstitchMoves;Oa=B.tiltPosAngleIfAmbiguousDetection;
Va=B.confirmScoreMinFactorDuringAutoMove;K.N();ha.label=!1;if(0===ca)switch(1===fa&&va!==f.currentTime&&(b.refresh(),va=f.currentTime),B.cutShader){case "median":p.ca="s50";break;default:p.ca="s49"}else if(1===ca){if(!ka){p.width=t.size.width;p.height=t.size.height;switch(B.cutShader){case "IOS":p.ca="s52";w.v("s52",[{name:"u7",type:"2f",value:[1/p.width,1/p.height]}]);break;default:p.ca="s49"}O(null);P()}b.Ec(t.buffer)}g||(g=ja.level+q.oa[0],ja.Ac(Date.now()));for(t=0;t<g;++t)x.X.H(),w.set(p.ca),
da&&sa&&w.I("u34",L===z.ha?ma:0),b.b(0),w.ra("u38",x.j),N.i(!1,!1),x.X.b(0),H=t===g-1,M.F(!1,x.X),K.N();K.Cc();W&&(a.viewport(0,0,S.width,S.height),w.set("s51"),b.b(0),w.ra("u38",x.j),N.i(!1,!1),Da&&a.commit?a.commit():a.flush());return ha},get_aspectRatio:function(){return p.width/p.height},set_scanSettings:function(g){k(A,g);P()},set_videoCrop:function(g){n(g);m();P()}};return Pa}();
;if(typeof(module)!=='undefined'){module.exports=JEEARAPI;}