UNPKG

@vladmandic/human

Version:

Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gesture Recognition

7 lines (6 loc) 1.63 MB
/* Human homepage: <https://github.com/vladmandic/human> author: <https://github.com/vladmandic>' */ var Human=(()=>{var Eh=Object.defineProperty;var rR=Object.getOwnPropertyDescriptor;var sR=Object.getOwnPropertyNames;var aR=Object.prototype.hasOwnProperty;var oR=(e,t,n)=>t in e?Eh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var iR=e=>Eh(e,"__esModule",{value:!0});var od=(e,t)=>{for(var n in t)Eh(e,n,{get:t[n],enumerable:!0})},lR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of sR(t))!aR.call(e,s)&&(n||s!=="default")&&Eh(e,s,{get:()=>t[s],enumerable:!(r=rR(t,s))||r.enumerable});return e};var uR=(e=>(t,n)=>e&&e.get(t)||(n=lR(iR({}),t,1),e&&e.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var me=(e,t,n)=>(oR(e,typeof t!="symbol"?t+"":t,n),n),X5=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var id=(e,t,n)=>(X5(e,t,"read from private field"),n?n.call(e):t.get(e)),ld=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ud=(e,t,n,r)=>(X5(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var nAe={};od(nAe,{Human:()=>iE,default:()=>iE,defaults:()=>Ta,env:()=>he});function oe(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function K5(e,t){let n=e.endsWith("/")?"":"/",s=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!s.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${s}`);return s}var ie=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function k2(e,t,n="config",r=[]){for(let s of Object.keys(t))if(typeof t[s]=="object")k2(e[s],t[s],s,r);else{let a=e&&typeof e[s]!="undefined";a||r.push({reason:"unknown property",where:`${n}.${s} = ${t[s]}`});let o=e&&typeof e[s]==typeof t[s];a&&!o&&r.push({reason:"property type mismatch",where:`${n}.${s} = ${t[s]}`,expected:typeof e[s]})}return t.debug&&n==="config"&&r.length>0&&oe("invalid configuration",r),r}function In(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,r)=>(Object.keys(r||{}).forEach(s=>{let a=n[s],o=r[s];Array.isArray(a)&&Array.isArray(o)?n[s]=a.concat(...o):t(a)&&t(o)?n[s]=In(a,o):n[s]=o}),n),{})}var Ta={backend:"",modelBasePath:"",cacheModels:!0,wasmPath:"",debug:!0,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-full.json"}},object:{enabled:!1,modelPath:"mb3-centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"selfie.json",blur:8}};var We={};od(We,{Abs:()=>hi,Acos:()=>au,Acosh:()=>ou,AdadeltaOptimizer:()=>Gf,AdagradOptimizer:()=>Hf,AdamOptimizer:()=>jf,AdamaxOptimizer:()=>qf,Add:()=>js,AddN:()=>_a,All:()=>iu,Any:()=>lu,ArgMax:()=>Da,ArgMin:()=>uu,Asin:()=>cu,Asinh:()=>du,Atan:()=>pu,Atan2:()=>fu,Atanh:()=>hu,AvgPool:()=>$a,AvgPool3D:()=>fd,AvgPool3DGrad:()=>zh,AvgPoolGrad:()=>Mh,BackendWasm:()=>hT,BatchMatMul:()=>Pa,BatchToSpaceND:()=>fi,Bincount:()=>Lh,BroadcastArgs:()=>Bh,BroadcastTo:()=>d3,Callback:()=>SS,CallbackList:()=>pk,Cast:()=>Fa,Ceil:()=>Oa,ClipByValue:()=>qs,Complex:()=>md,ComplexAbs:()=>gd,Concat:()=>mi,Conv2D:()=>Ma,Conv2DBackpropFilter:()=>Wh,Conv2DBackpropInput:()=>za,Conv3D:()=>yd,Conv3DBackpropFilterV2:()=>Vh,Conv3DBackpropInputV2:()=>Uh,Cos:()=>La,Cosh:()=>Ba,CropAndResize:()=>yi,Cumsum:()=>gi,CustomCallback:()=>fk,DataStorage:()=>dd,DenseBincount:()=>Gh,DepthToSpace:()=>Ai,DepthwiseConv2dNative:()=>Wa,DepthwiseConv2dNativeBackpropFilter:()=>Hh,DepthwiseConv2dNativeBackpropInput:()=>jh,Diag:()=>qh,Dilation2D:()=>Ad,Dilation2DBackpropFilter:()=>Kh,Dilation2DBackpropInput:()=>Xh,ENV:()=>as,EarlyStopping:()=>CS,Einsum:()=>xd,Elu:()=>Ua,EluGrad:()=>Zh,Environment:()=>u3,Equal:()=>xi,Erf:()=>mu,Exp:()=>Ga,ExpandDims:()=>bi,Expm1:()=>vi,FFT:()=>Yh,Fill:()=>gu,FlipLeftRight:()=>wi,Floor:()=>Ha,FloorDiv:()=>ja,FromPixels:()=>_d,FusedBatchNorm:()=>qa,FusedConv2D:()=>Io,FusedDepthwiseConv2D:()=>Co,GPGPUContext:()=>fc,GatherNd:()=>Si,GatherV2:()=>ki,GraphModel:()=>Dm,Greater:()=>Ii,GreaterEqual:()=>Xa,History:()=>hk,IFFT:()=>Jh,Identity:()=>Ka,Imag:()=>bd,InputSpec:()=>Yt,IsFinite:()=>yu,IsInf:()=>Au,IsNan:()=>xu,KernelBackend:()=>tu,LRN:()=>wd,LRNGrad:()=>ef,LayerVariable:()=>lk,LayersModel:()=>ta,LeakyRelu:()=>Za,Less:()=>Ci,LessEqual:()=>Ti,LinSpace:()=>Qh,Log:()=>Ya,Log1p:()=>bu,LogSoftmax:()=>p3,LogicalAnd:()=>Ni,LogicalNot:()=>vu,LogicalOr:()=>vd,MathBackendCPU:()=>sx,MathBackendWebGL:()=>Rp,Max:()=>Ja,MaxPool:()=>eo,MaxPool3D:()=>kd,MaxPool3DGrad:()=>nf,MaxPoolGrad:()=>tf,MaxPoolWithArgmax:()=>rf,Maximum:()=>Qa,Mean:()=>to,Min:()=>no,Minimum:()=>ro,MirrorPad:()=>so,Mod:()=>wu,MomentumOptimizer:()=>Xf,Multinomial:()=>sf,Multiply:()=>ao,Neg:()=>Ei,NonMaxSuppressionV3:()=>_i,NonMaxSuppressionV4:()=>ku,NonMaxSuppressionV5:()=>Di,NotEqual:()=>Ri,OP_SCOPE_SUFFIX:()=>D3,OneHot:()=>Pi,OnesLike:()=>$i,Optimizer:()=>Js,OptimizerConstructors:()=>zo,Pack:()=>Fi,PadV2:()=>oo,Pool:()=>e9,Pow:()=>io,Prelu:()=>lo,Prod:()=>Oi,RMSPropOptimizer:()=>Kf,RNN:()=>na,Range:()=>Su,Rank:()=>b3,Real:()=>Sd,RealDiv:()=>Va,Reciprocal:()=>Iu,Reduction:()=>rr,Relu:()=>uo,Relu6:()=>po,Reshape:()=>Mi,ResizeBilinear:()=>co,ResizeBilinearGrad:()=>of,ResizeNearestNeighbor:()=>Cu,ResizeNearestNeighborGrad:()=>af,Reverse:()=>zi,RotateWithOffset:()=>Ji,Round:()=>Li,Rsqrt:()=>ho,SGDOptimizer:()=>tp,ScatterNd:()=>Bi,Select:()=>Wi,Selu:()=>Tu,Sequential:()=>bm,Sigmoid:()=>mo,Sign:()=>Nu,Sin:()=>fo,Sinh:()=>Ui,Slice:()=>Vi,Softmax:()=>Ao,Softplus:()=>Eu,SpaceToBatchND:()=>Gi,SparseFillEmptyRows:()=>Id,SparseReshape:()=>Ru,SparseSegmentMean:()=>Cd,SparseSegmentSum:()=>Td,SparseToDense:()=>Nd,SplitV:()=>Hi,Sqrt:()=>go,Square:()=>_u,SquaredDifference:()=>xo,Step:()=>ko,StridedSlice:()=>ji,StringNGrams:()=>Ed,StringSplit:()=>lf,StringToHashBucketFast:()=>uf,Sub:()=>bo,Sum:()=>yo,SymbolicTensor:()=>gs,Tan:()=>qi,Tanh:()=>vo,Tensor:()=>tt,TensorBuffer:()=>nn,Tile:()=>Xs,TopK:()=>Xi,Transform:()=>Ki,Transpose:()=>wo,Unique:()=>cf,Unpack:()=>Zi,UnsortedSegmentSum:()=>Rd,Variable:()=>Ld,ZerosLike:()=>Yi,_FusedMatMul:()=>So,abs:()=>rn,acos:()=>gv,acosh:()=>yv,add:()=>ue,addN:()=>bf,all:()=>dy,any:()=>vf,argMax:()=>Dr,argMin:()=>Av,asin:()=>xv,asinh:()=>bv,atan:()=>vv,atan2:()=>wv,atanh:()=>kv,avgPool:()=>kf,avgPool3d:()=>fy,backend:()=>us,backend_util:()=>N,basicLSTMCell:()=>WD,batchNorm:()=>Bu,batchNorm2d:()=>Tv,batchNorm3d:()=>Nv,batchNorm4d:()=>Ev,batchToSpaceND:()=>Sf,bincount:()=>my,booleanMaskAsync:()=>QF,broadcastArgs:()=>Rv,broadcastTo:()=>jd,broadcast_util:()=>sl,browser:()=>_r,buffer:()=>Le,callbacks:()=>CG,cast:()=>ge,ceil:()=>_v,clipByValue:()=>hr,clone:()=>Ln,complex:()=>Eo,concat:()=>St,concat1d:()=>Dv,concat2d:()=>Wu,concat3d:()=>$v,concat4d:()=>Pv,constraints:()=>Ww,conv1d:()=>gy,conv2d:()=>Po,conv2dTranspose:()=>Ay,conv3d:()=>xy,conv3dTranspose:()=>Ov,copyRegisteredKernels:()=>s9,cos:()=>If,cosh:()=>by,cosineWindow:()=>Hy,cumsum:()=>vy,customGrad:()=>Es,data:()=>sI,denseBincount:()=>Mv,deprecationWarn:()=>ly,depthToSpace:()=>zv,depthwiseConv2d:()=>qd,deregisterOp:()=>EG,device_util:()=>Pu,diag:()=>y$,dilation2d:()=>Lv,disableDeprecationWarnings:()=>rD,dispose:()=>ee,disposeVariables:()=>sD,div:()=>de,divNoNan:()=>Bv,dot:()=>S$,dropout:()=>mw,einsum:()=>Wv,elu:()=>Xd,enableDebugMode:()=>nD,enableProdMode:()=>iy,enclosingPowerOfTwo:()=>gw,engine:()=>Nn,env:()=>Y,equal:()=>$r,erf:()=>Vv,exp:()=>Pr,expandDims:()=>Kt,expm1:()=>Uv,eye:()=>wy,fft:()=>Of,fill:()=>Vu,findBackend:()=>cy,findBackendFactory:()=>lD,floor:()=>Kd,floorDiv:()=>Gd,forceHalfFloat:()=>PC,fused:()=>Mo,gather:()=>Uu,gatherND:()=>fw,gather_util:()=>J2,getBackend:()=>pr,getGradient:()=>R2,getKernel:()=>df,getKernelsForBackend:()=>Cs,getThreadsCount:()=>wye,gpgpu_util:()=>iC,grad:()=>K$,grads:()=>Z$,greater:()=>fr,greaterEqual:()=>ul,ifft:()=>Jd,imag:()=>Cf,image:()=>Se,inTopKAsync:()=>cO,initializers:()=>Xw,input:()=>Mk,io:()=>Tn,irfft:()=>Ly,isFinite:()=>L$,isInf:()=>W$,isNaN:()=>Gv,keep:()=>hn,kernel_impls:()=>Kr,layers:()=>ak,leakyRelu:()=>Tf,less:()=>ky,lessEqual:()=>cl,linalg:()=>Cw,linspace:()=>Hv,loadGraphModel:()=>DH,loadLayersModel:()=>MV,localResponseNormalization:()=>jv,log:()=>Fr,log1p:()=>Nf,logSigmoid:()=>nP,logSoftmax:()=>Sy,logSumExp:()=>Yv,logicalAnd:()=>cs,logicalNot:()=>Rf,logicalOr:()=>Ty,logicalXor:()=>fP,losses:()=>XM,matMul:()=>qe,math:()=>Z3,max:()=>fn,maxPool:()=>_f,maxPool3d:()=>Ny,maxPoolWithArgmax:()=>Jv,maximum:()=>Zs,mean:()=>Vt,memory:()=>xf,meshgrid:()=>bP,metrics:()=>vS,min:()=>Fo,minimum:()=>Zd,mirrorPad:()=>Qv,mod:()=>Hu,model:()=>FV,models:()=>wS,moments:()=>Df,movingAverage:()=>nO,mul:()=>L,multiRNNCell:()=>NP,multinomial:()=>ew,neg:()=>Mt,nextFrame:()=>Tw,norm:()=>Uy,notEqual:()=>ju,oneHot:()=>Ud,ones:()=>mr,onesLike:()=>Or,op:()=>U,outerProduct:()=>$P,pad:()=>Xr,pad1d:()=>OP,pad2d:()=>zP,pad3d:()=>BP,pad4d:()=>VP,pool:()=>qP,pow:()=>Oo,prelu:()=>Pf,print:()=>G3,prod:()=>Ey,profile:()=>aD,rand:()=>JP,randomGamma:()=>nF,randomNormal:()=>tw,randomUniform:()=>qu,range:()=>Xu,ready:()=>Mu,real:()=>Yd,reciprocal:()=>nw,registerBackend:()=>il,registerCallbackConstructor:()=>zV,registerGradient:()=>h3,registerKernel:()=>jr,registerOp:()=>NG,regularizers:()=>kS,relu:()=>Rs,relu6:()=>Dy,removeBackend:()=>iD,reshape:()=>H,reverse:()=>Mr,reverse1d:()=>dF,reverse2d:()=>hF,reverse3d:()=>mF,reverse4d:()=>yF,rfft:()=>Mf,round:()=>$y,rsqrt:()=>Py,scalar:()=>Te,scatterND:()=>hw,scatter_util:()=>Q2,selu:()=>Fy,separableConv2d:()=>rw,sequential:()=>OV,serialization:()=>ce,setBackend:()=>uy,setPlatform:()=>uD,setThreadsCount:()=>vye,setWasmPath:()=>bye,setWasmPaths:()=>rb,setWebGLContext:()=>Vm,setdiff1dAsync:()=>sw,shared:()=>Om,sigmoid:()=>En,sign:()=>aw,signal:()=>qM,sin:()=>Oy,sinh:()=>My,slice:()=>Fe,slice1d:()=>Ff,slice2d:()=>zy,slice3d:()=>pl,slice4d:()=>hl,slice_util:()=>Ot,softmax:()=>Ku,softplus:()=>Gu,spaceToBatchND:()=>$f,sparse:()=>ep,sparseToDense:()=>Gy,spectral:()=>jM,split:()=>Zt,sqrt:()=>Rn,square:()=>xt,squaredDifference:()=>By,squeeze:()=>Ze,stack:()=>sn,step:()=>Qd,stridedSlice:()=>ow,string:()=>Uf,sub:()=>pe,sum:()=>we,sumOutType:()=>Bd,tan:()=>iw,tanh:()=>Lu,tensor:()=>pt,tensor1d:()=>Ct,tensor2d:()=>ds,tensor3d:()=>J3,tensor4d:()=>UF,tensor5d:()=>GF,tensor6d:()=>HF,tensor_util:()=>is,test_util:()=>hv,tidy:()=>X,tile:()=>qr,time:()=>oD,topk:()=>lw,train:()=>fl,transpose:()=>rt,truncatedNormal:()=>zf,unique:()=>Wy,unregisterGradient:()=>r9,unregisterKernel:()=>n9,unsortedSegmentSum:()=>uw,unstack:()=>nr,upcastType:()=>zn,util:()=>w,valueAndGrad:()=>Y$,valueAndGrads:()=>J$,variable:()=>cw,variableGrads:()=>qv,version:()=>Up,version_converter:()=>$H,version_core:()=>oy,version_cpu:()=>xq,version_layers:()=>T1,version_wasm:()=>kye,version_webgl:()=>Vee,webgl:()=>Uee,webgl_util:()=>_7,webgpu:()=>l6,where:()=>Wn,whereAsync:()=>Vy,zeros:()=>Ut,zerosLike:()=>st});var cR=Object.create,Rh=Object.defineProperty,dR=Object.getOwnPropertyDescriptor,pR=Object.getOwnPropertyNames,hR=Object.getPrototypeOf,fR=Object.prototype.hasOwnProperty,Z5=e=>Rh(e,"__esModule",{value:!0}),tn=(e,t)=>function(){return t||(0,e[Object.keys(e)[0]])((t={exports:{}}).exports,t),t.exports},Me=(e,t)=>{Z5(e);for(var n in t)Rh(e,n,{get:t[n],enumerable:!0})},mR=(e,t,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of pR(t))!fR.call(e,r)&&r!=="default"&&Rh(e,r,{get:()=>t[r],enumerable:!(n=dR(t,r))||n.enumerable});return e},ci=e=>mR(Z5(Rh(e!=null?cR(hR(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),gR=tn({"src/node_modules/long/src/long.js"(e,t){t.exports=r;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch($){}function r($,T,O){this.low=$|0,this.high=T|0,this.unsigned=!!O}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0});function s($){return($&&$.__isLong__)===!0}r.isLong=s;var a={},o={};function i($,T){var O,G,K;return T?($>>>=0,(K=0<=$&&$<256)&&(G=o[$],G)?G:(O=c($,($|0)<0?-1:0,!0),K&&(o[$]=O),O)):($|=0,(K=-128<=$&&$<128)&&(G=a[$],G)?G:(O=c($,$<0?-1:0,!1),K&&(a[$]=O),O))}r.fromInt=i;function l($,T){if(isNaN($))return T?b:A;if(T){if($<0)return b;if($>=g)return R}else{if($<=-y)return F;if($+1>=y)return E}return $<0?l(-$,T).neg():c($%m|0,$/m|0,T)}r.fromNumber=l;function c($,T,O){return new r($,T,O)}r.fromBits=c;var u=Math.pow;function d($,T,O){if($.length===0)throw Error("empty string");if($==="NaN"||$==="Infinity"||$==="+Infinity"||$==="-Infinity")return A;if(typeof T=="number"?(O=T,T=!1):T=!!T,O=O||10,O<2||36<O)throw RangeError("radix");var G;if((G=$.indexOf("-"))>0)throw Error("interior hyphen");if(G===0)return d($.substring(1),T,O).neg();for(var K=l(u(O,8)),z=A,j=0;j<$.length;j+=8){var W=Math.min(8,$.length-j),J=parseInt($.substring(j,j+W),O);if(W<8){var te=l(u(O,W));z=z.mul(te).add(l(J))}else z=z.mul(K),z=z.add(l(J))}return z.unsigned=T,z}r.fromString=d;function p($,T){return typeof $=="number"?l($,T):typeof $=="string"?d($,T):c($.low,$.high,typeof T=="boolean"?T:$.unsigned)}r.fromValue=p;var h=1<<16,f=1<<24,m=h*h,g=m*m,y=g/2,x=i(f),A=i(0);r.ZERO=A;var b=i(0,!0);r.UZERO=b;var v=i(1);r.ONE=v;var C=i(1,!0);r.UONE=C;var S=i(-1);r.NEG_ONE=S;var E=c(4294967295|0,2147483647|0,!1);r.MAX_VALUE=E;var R=c(4294967295|0,4294967295|0,!0);r.MAX_UNSIGNED_VALUE=R;var F=c(0,2147483648|0,!1);r.MIN_VALUE=F;var _=r.prototype;_.toInt=function(){return this.unsigned?this.low>>>0:this.low},_.toNumber=function(){return this.unsigned?(this.high>>>0)*m+(this.low>>>0):this.high*m+(this.low>>>0)},_.toString=function(T){if(T=T||10,T<2||36<T)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(F)){var O=l(T),G=this.div(O),K=G.mul(O).sub(this);return G.toString(T)+K.toInt().toString(T)}else return"-"+this.neg().toString(T);for(var z=l(u(T,6),this.unsigned),j=this,W="";;){var J=j.div(z),te=j.sub(J.mul(z)).toInt()>>>0,ae=te.toString(T);if(j=J,j.isZero())return ae+W;for(;ae.length<6;)ae="0"+ae;W=""+ae+W}},_.getHighBits=function(){return this.high},_.getHighBitsUnsigned=function(){return this.high>>>0},_.getLowBits=function(){return this.low},_.getLowBitsUnsigned=function(){return this.low>>>0},_.getNumBitsAbs=function(){if(this.isNegative())return this.eq(F)?64:this.neg().getNumBitsAbs();for(var T=this.high!=0?this.high:this.low,O=31;O>0&&(T&1<<O)==0;O--);return this.high!=0?O+33:O+1},_.isZero=function(){return this.high===0&&this.low===0},_.eqz=_.isZero,_.isNegative=function(){return!this.unsigned&&this.high<0},_.isPositive=function(){return this.unsigned||this.high>=0},_.isOdd=function(){return(this.low&1)===1},_.isEven=function(){return(this.low&1)===0},_.equals=function(T){return s(T)||(T=p(T)),this.unsigned!==T.unsigned&&this.high>>>31===1&&T.high>>>31===1?!1:this.high===T.high&&this.low===T.low},_.eq=_.equals,_.notEquals=function(T){return!this.eq(T)},_.neq=_.notEquals,_.ne=_.notEquals,_.lessThan=function(T){return this.comp(T)<0},_.lt=_.lessThan,_.lessThanOrEqual=function(T){return this.comp(T)<=0},_.lte=_.lessThanOrEqual,_.le=_.lessThanOrEqual,_.greaterThan=function(T){return this.comp(T)>0},_.gt=_.greaterThan,_.greaterThanOrEqual=function(T){return this.comp(T)>=0},_.gte=_.greaterThanOrEqual,_.ge=_.greaterThanOrEqual,_.compare=function(T){if(s(T)||(T=p(T)),this.eq(T))return 0;var O=this.isNegative(),G=T.isNegative();return O&&!G?-1:!O&&G?1:this.unsigned?T.high>>>0>this.high>>>0||T.high===this.high&&T.low>>>0>this.low>>>0?-1:1:this.sub(T).isNegative()?-1:1},_.comp=_.compare,_.negate=function(){return!this.unsigned&&this.eq(F)?F:this.not().add(v)},_.neg=_.negate,_.add=function(T){s(T)||(T=p(T));var O=this.high>>>16,G=this.high&65535,K=this.low>>>16,z=this.low&65535,j=T.high>>>16,W=T.high&65535,J=T.low>>>16,te=T.low&65535,ae=0,Z=0,se=0,re=0;return re+=z+te,se+=re>>>16,re&=65535,se+=K+J,Z+=se>>>16,se&=65535,Z+=G+W,ae+=Z>>>16,Z&=65535,ae+=O+j,ae&=65535,c(se<<16|re,ae<<16|Z,this.unsigned)},_.subtract=function(T){return s(T)||(T=p(T)),this.add(T.neg())},_.sub=_.subtract,_.multiply=function(T){if(this.isZero())return A;if(s(T)||(T=p(T)),n){var O=n.mul(this.low,this.high,T.low,T.high);return c(O,n.get_high(),this.unsigned)}if(T.isZero())return A;if(this.eq(F))return T.isOdd()?F:A;if(T.eq(F))return this.isOdd()?F:A;if(this.isNegative())return T.isNegative()?this.neg().mul(T.neg()):this.neg().mul(T).neg();if(T.isNegative())return this.mul(T.neg()).neg();if(this.lt(x)&&T.lt(x))return l(this.toNumber()*T.toNumber(),this.unsigned);var G=this.high>>>16,K=this.high&65535,z=this.low>>>16,j=this.low&65535,W=T.high>>>16,J=T.high&65535,te=T.low>>>16,ae=T.low&65535,Z=0,se=0,re=0,fe=0;return fe+=j*ae,re+=fe>>>16,fe&=65535,re+=z*ae,se+=re>>>16,re&=65535,re+=j*te,se+=re>>>16,re&=65535,se+=K*ae,Z+=se>>>16,se&=65535,se+=z*te,Z+=se>>>16,se&=65535,se+=j*J,Z+=se>>>16,se&=65535,Z+=G*ae+K*te+z*J+j*W,Z&=65535,c(re<<16|fe,Z<<16|se,this.unsigned)},_.mul=_.multiply,_.divide=function(T){if(s(T)||(T=p(T)),T.isZero())throw Error("division by zero");if(n){if(!this.unsigned&&this.high===-2147483648&&T.low===-1&&T.high===-1)return this;var O=(this.unsigned?n.div_u:n.div_s)(this.low,this.high,T.low,T.high);return c(O,n.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?b:A;var G,K,z;if(this.unsigned){if(T.unsigned||(T=T.toUnsigned()),T.gt(this))return b;if(T.gt(this.shru(1)))return C;z=b}else{if(this.eq(F)){if(T.eq(v)||T.eq(S))return F;if(T.eq(F))return v;var j=this.shr(1);return G=j.div(T).shl(1),G.eq(A)?T.isNegative()?v:S:(K=this.sub(T.mul(G)),z=G.add(K.div(T)),z)}else if(T.eq(F))return this.unsigned?b:A;if(this.isNegative())return T.isNegative()?this.neg().div(T.neg()):this.neg().div(T).neg();if(T.isNegative())return this.div(T.neg()).neg();z=A}for(K=this;K.gte(T);){G=Math.max(1,Math.floor(K.toNumber()/T.toNumber()));for(var W=Math.ceil(Math.log(G)/Math.LN2),J=W<=48?1:u(2,W-48),te=l(G),ae=te.mul(T);ae.isNegative()||ae.gt(K);)G-=J,te=l(G,this.unsigned),ae=te.mul(T);te.isZero()&&(te=v),z=z.add(te),K=K.sub(ae)}return z},_.div=_.divide,_.modulo=function(T){if(s(T)||(T=p(T)),n){var O=(this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,T.low,T.high);return c(O,n.get_high(),this.unsigned)}return this.sub(this.div(T).mul(T))},_.mod=_.modulo,_.rem=_.modulo,_.not=function(){return c(~this.low,~this.high,this.unsigned)},_.and=function(T){return s(T)||(T=p(T)),c(this.low&T.low,this.high&T.high,this.unsigned)},_.or=function(T){return s(T)||(T=p(T)),c(this.low|T.low,this.high|T.high,this.unsigned)},_.xor=function(T){return s(T)||(T=p(T)),c(this.low^T.low,this.high^T.high,this.unsigned)},_.shiftLeft=function(T){return s(T)&&(T=T.toInt()),(T&=63)===0?this:T<32?c(this.low<<T,this.high<<T|this.low>>>32-T,this.unsigned):c(0,this.low<<T-32,this.unsigned)},_.shl=_.shiftLeft,_.shiftRight=function(T){return s(T)&&(T=T.toInt()),(T&=63)===0?this:T<32?c(this.low>>>T|this.high<<32-T,this.high>>T,this.unsigned):c(this.high>>T-32,this.high>=0?0:-1,this.unsigned)},_.shr=_.shiftRight,_.shiftRightUnsigned=function(T){if(s(T)&&(T=T.toInt()),T&=63,T===0)return this;var O=this.high;if(T<32){var G=this.low;return c(G>>>T|O<<32-T,O>>>T,this.unsigned)}else return T===32?c(O,0,this.unsigned):c(O>>>T-32,0,this.unsigned)},_.shru=_.shiftRightUnsigned,_.shr_u=_.shiftRightUnsigned,_.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},_.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},_.toBytes=function(T){return T?this.toBytesLE():this.toBytesBE()},_.toBytesLE=function(){var T=this.high,O=this.low;return[O&255,O>>>8&255,O>>>16&255,O>>>24,T&255,T>>>8&255,T>>>16&255,T>>>24]},_.toBytesBE=function(){var T=this.high,O=this.low;return[T>>>24,T>>>16&255,T>>>8&255,T&255,O>>>24,O>>>16&255,O>>>8&255,O&255]},r.fromBytes=function(T,O,G){return G?r.fromBytesLE(T,O):r.fromBytesBE(T,O)},r.fromBytesLE=function(T,O){return new r(T[0]|T[1]<<8|T[2]<<16|T[3]<<24,T[4]|T[5]<<8|T[6]<<16|T[7]<<24,O)},r.fromBytesBE=function(T,O){return new r(T[4]<<24|T[5]<<16|T[6]<<8|T[7],T[0]<<24|T[1]<<16|T[2]<<8|T[3],O)}}}),yR=tn({"(disabled):src/node_modules/node-fetch/browser.js"(){}}),AR=tn({"(disabled):util"(){}}),xR=tn({"src/node_modules/seedrandom/lib/alea.js"(e,t){(function(n,r,s){function a(c){var u=this,d=l();u.next=function(){var p=2091639*u.s0+u.c*23283064365386963e-26;return u.s0=u.s1,u.s1=u.s2,u.s2=p-(u.c=p|0)},u.c=1,u.s0=d(" "),u.s1=d(" "),u.s2=d(" "),u.s0-=d(c),u.s0<0&&(u.s0+=1),u.s1-=d(c),u.s1<0&&(u.s1+=1),u.s2-=d(c),u.s2<0&&(u.s2+=1),d=null}function o(c,u){return u.c=c.c,u.s0=c.s0,u.s1=c.s1,u.s2=c.s2,u}function i(c,u){var d=new a(c),p=u&&u.state,h=d.next;return h.int32=function(){return d.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,p&&(typeof p=="object"&&o(p,d),h.state=function(){return o(d,{})}),h}function l(){var c=4022871197,u=function(d){d=String(d);for(var p=0;p<d.length;p++){c+=d.charCodeAt(p);var h=.02519603282416938*c;c=h>>>0,h-=c,h*=c,c=h>>>0,h-=c,c+=h*4294967296}return(c>>>0)*23283064365386963e-26};return u}r&&r.exports?r.exports=i:s&&s.amd?s(function(){return i}):this.alea=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),bR=tn({"src/node_modules/seedrandom/lib/xor128.js"(e,t){(function(n,r,s){function a(l){var c=this,u="";c.x=0,c.y=0,c.z=0,c.w=0,c.next=function(){var p=c.x^c.x<<11;return c.x=c.y,c.y=c.z,c.z=c.w,c.w^=c.w>>>19^p^p>>>8},l===(l|0)?c.x=l:u+=l;for(var d=0;d<u.length+64;d++)c.x^=u.charCodeAt(d)|0,c.next()}function o(l,c){return c.x=l.x,c.y=l.y,c.z=l.z,c.w=l.w,c}function i(l,c){var u=new a(l),d=c&&c.state,p=function(){return(u.next()>>>0)/4294967296};return p.double=function(){do var h=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},p.int32=u.next,p.quick=p,d&&(typeof d=="object"&&o(d,u),p.state=function(){return o(u,{})}),p}r&&r.exports?r.exports=i:s&&s.amd?s(function(){return i}):this.xor128=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),vR=tn({"src/node_modules/seedrandom/lib/xorwow.js"(e,t){(function(n,r,s){function a(l){var c=this,u="";c.next=function(){var p=c.x^c.x>>>2;return c.x=c.y,c.y=c.z,c.z=c.w,c.w=c.v,(c.d=c.d+362437|0)+(c.v=c.v^c.v<<4^(p^p<<1))|0},c.x=0,c.y=0,c.z=0,c.w=0,c.v=0,l===(l|0)?c.x=l:u+=l;for(var d=0;d<u.length+64;d++)c.x^=u.charCodeAt(d)|0,d==u.length&&(c.d=c.x<<10^c.x>>>4),c.next()}function o(l,c){return c.x=l.x,c.y=l.y,c.z=l.z,c.w=l.w,c.v=l.v,c.d=l.d,c}function i(l,c){var u=new a(l),d=c&&c.state,p=function(){return(u.next()>>>0)/4294967296};return p.double=function(){do var h=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},p.int32=u.next,p.quick=p,d&&(typeof d=="object"&&o(d,u),p.state=function(){return o(u,{})}),p}r&&r.exports?r.exports=i:s&&s.amd?s(function(){return i}):this.xorwow=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),wR=tn({"src/node_modules/seedrandom/lib/xorshift7.js"(e,t){(function(n,r,s){function a(l){var c=this;c.next=function(){var d=c.x,p=c.i,h,f,m;return h=d[p],h^=h>>>7,f=h^h<<24,h=d[p+1&7],f^=h^h>>>10,h=d[p+3&7],f^=h^h>>>3,h=d[p+4&7],f^=h^h<<7,h=d[p+7&7],h=h^h<<13,f^=h^h<<9,d[p]=f,c.i=p+1&7,f};function u(d,p){var h,f,m=[];if(p===(p|0))f=m[0]=p;else for(p=""+p,h=0;h<p.length;++h)m[h&7]=m[h&7]<<15^p.charCodeAt(h)+m[h+1&7]<<13;for(;m.length<8;)m.push(0);for(h=0;h<8&&m[h]===0;++h);for(h==8?f=m[7]=-1:f=m[h],d.x=m,d.i=0,h=256;h>0;--h)d.next()}u(c,l)}function o(l,c){return c.x=l.x.slice(),c.i=l.i,c}function i(l,c){l==null&&(l=+new Date);var u=new a(l),d=c&&c.state,p=function(){return(u.next()>>>0)/4294967296};return p.double=function(){do var h=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},p.int32=u.next,p.quick=p,d&&(d.x&&o(d,u),p.state=function(){return o(u,{})}),p}r&&r.exports?r.exports=i:s&&s.amd?s(function(){return i}):this.xorshift7=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),kR=tn({"src/node_modules/seedrandom/lib/xor4096.js"(e,t){(function(n,r,s){function a(l){var c=this;c.next=function(){var d=c.w,p=c.X,h=c.i,f,m;return c.w=d=d+1640531527|0,m=p[h+34&127],f=p[h=h+1&127],m^=m<<13,f^=f<<17,m^=m>>>15,f^=f>>>12,m=p[h]=m^f,c.i=h,m+(d^d>>>16)|0};function u(d,p){var h,f,m,g,y,x=[],A=128;for(p===(p|0)?(f=p,p=null):(p=p+"\0",f=0,A=Math.max(A,p.length)),m=0,g=-32;g<A;++g)p&&(f^=p.charCodeAt((g+32)%p.length)),g===0&&(y=f),f^=f<<10,f^=f>>>15,f^=f<<4,f^=f>>>13,g>=0&&(y=y+1640531527|0,h=x[g&127]^=f+y,m=h==0?m+1:0);for(m>=128&&(x[(p&&p.length||0)&127]=-1),m=127,g=4*128;g>0;--g)f=x[m+34&127],h=x[m=m+1&127],f^=f<<13,h^=h<<17,f^=f>>>15,h^=h>>>12,x[m]=f^h;d.w=y,d.X=x,d.i=m}u(c,l)}function o(l,c){return c.i=l.i,c.w=l.w,c.X=l.X.slice(),c}function i(l,c){l==null&&(l=+new Date);var u=new a(l),d=c&&c.state,p=function(){return(u.next()>>>0)/4294967296};return p.double=function(){do var h=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},p.int32=u.next,p.quick=p,d&&(d.X&&o(d,u),p.state=function(){return o(u,{})}),p}r&&r.exports?r.exports=i:s&&s.amd?s(function(){return i}):this.xor4096=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),SR=tn({"src/node_modules/seedrandom/lib/tychei.js"(e,t){(function(n,r,s){function a(l){var c=this,u="";c.next=function(){var p=c.b,h=c.c,f=c.d,m=c.a;return p=p<<25^p>>>7^h,h=h-f|0,f=f<<24^f>>>8^m,m=m-p|0,c.b=p=p<<20^p>>>12^h,c.c=h=h-f|0,c.d=f<<16^h>>>16^m,c.a=m-p|0},c.a=0,c.b=0,c.c=2654435769|0,c.d=1367130551,l===Math.floor(l)?(c.a=l/4294967296|0,c.b=l|0):u+=l;for(var d=0;d<u.length+20;d++)c.b^=u.charCodeAt(d)|0,c.next()}function o(l,c){return c.a=l.a,c.b=l.b,c.c=l.c,c.d=l.d,c}function i(l,c){var u=new a(l),d=c&&c.state,p=function(){return(u.next()>>>0)/4294967296};return p.double=function(){do var h=u.next()>>>11,f=(u.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},p.int32=u.next,p.quick=p,d&&(typeof d=="object"&&o(d,u),p.state=function(){return o(u,{})}),p}r&&r.exports?r.exports=i:s&&s.amd?s(function(){return i}):this.tychei=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),IR=tn({"(disabled):crypto"(){}}),CR=tn({"src/node_modules/seedrandom/seedrandom.js"(e,t){(function(n,r,s){var a=256,o=6,i=52,l="random",c=s.pow(a,o),u=s.pow(2,i),d=u*2,p=a-1,h;function f(v,C,S){var E=[];C=C==!0?{entropy:!0}:C||{};var R=x(y(C.entropy?[v,b(r)]:v==null?A():v,3),E),F=new m(E),_=function(){for(var $=F.g(o),T=c,O=0;$<u;)$=($+O)*a,T*=a,O=F.g(1);for(;$>=d;)$/=2,T/=2,O>>>=1;return($+O)/T};return _.int32=function(){return F.g(4)|0},_.quick=function(){return F.g(4)/4294967296},_.double=_,x(b(F.S),r),(C.pass||S||function($,T,O,G){return G&&(G.S&&g(G,F),$.state=function(){return g(F,{})}),O?(s[l]=$,T):$})(_,R,"global"in C?C.global:this==s,C.state)}function m(v){var C,S=v.length,E=this,R=0,F=E.i=E.j=0,_=E.S=[];for(S||(v=[S++]);R<a;)_[R]=R++;for(R=0;R<a;R++)_[R]=_[F=p&F+v[R%S]+(C=_[R])],_[F]=C;(E.g=function($){for(var T,O=0,G=E.i,K=E.j,z=E.S;$--;)T=z[G=p&G+1],O=O*a+z[p&(z[G]=z[K=p&K+T])+(z[K]=T)];return E.i=G,E.j=K,O})(a)}function g(v,C){return C.i=v.i,C.j=v.j,C.S=v.S.slice(),C}function y(v,C){var S=[],E=typeof v,R;if(C&&E=="object")for(R in v)try{S.push(y(v[R],C-1))}catch(F){}return S.length?S:E=="string"?v:v+"\0"}function x(v,C){for(var S=v+"",E,R=0;R<S.length;)C[p&R]=p&(E^=C[p&R]*19)+S.charCodeAt(R++);return b(C)}function A(){try{var v;return h&&(v=h.randomBytes)?v=v(a):(v=new Uint8Array(a),(n.crypto||n.msCrypto).getRandomValues(v)),b(v)}catch(E){var C=n.navigator,S=C&&C.plugins;return[+new Date,n,S,n.screen,b(r)]}}function b(v){return String.fromCharCode.apply(0,v)}if(x(s.random(),r),typeof t=="object"&&t.exports){t.exports=f;try{h=IR()}catch(v){}}else typeof define=="function"&&define.amd?define(function(){return f}):s["seed"+l]=f})(typeof self!="undefined"?self:e,[],Math)}}),_h=tn({"src/node_modules/seedrandom/index.js"(e,t){var n=xR(),r=bR(),s=vR(),a=wR(),o=kR(),i=SR(),l=CR();l.alea=n,l.xor128=r,l.xorwow=s,l.xorshift7=a,l.xor4096=o,l.tychei=i,t.exports=l}}),Y5=tn({"(disabled):src/node_modules/string_decoder/index.js"(){}}),Dh=tn({"(disabled):fs"(){}}),cd=tn({"(disabled):path"(){}}),TR=tn({"(disabled):worker_threads"(){}}),NR=tn({"(disabled):perf_hooks"(){}}),ER=tn({"(disabled):os"(){}}),RR=tn({"src/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js"(e,t){var n=function(){var r=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(r=r||__filename),function(s){s=s||{};function a(){return re.buffer!=lt&&Qn(re.buffer),ur}function o(){return re.buffer!=lt&&Qn(re.buffer),xn}function i(){return re.buffer!=lt&&Qn(re.buffer),cr}function l(){return re.buffer!=lt&&Qn(re.buffer),Cr}function c(){return re.buffer!=lt&&Qn(re.buffer),Tr}var u=typeof s!="undefined"?s:{},d,p;u.ready=new Promise(function(I,D){d=I,p=D});var h;typeof process!="undefined"&&process.listeners&&(h={uncaughtException:process.listeners("uncaughtException"),unhandledRejection:process.listeners("unhandledRejection")});var f={},m;for(m in u)u.hasOwnProperty(m)&&(f[m]=u[m]);var g=[],y="./this.program",x=function(I,D){throw D},A=!1,b=!1,v=!1,C=!1;A=typeof window=="object",b=typeof importScripts=="function",v=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",C=!A&&!v&&!b;var S=u.ENVIRONMENT_IS_PTHREAD||!1;S&&(lt=u.buffer);var E="";function R(I){return u.locateFile?u.locateFile(I,E):E+I}var F,_,$,T,O,G;if(v){b?E=cd().dirname(E)+"/":E=__dirname+"/",F=function(D,B){return O||(O=Dh()),G||(G=cd()),D=G.normalize(D),O.readFileSync(D,B?null:"utf8")},$=function(D){var B=F(D,!0);return B.buffer||(B=new Uint8Array(B)),Ie(B.buffer),B},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),g=process.argv.slice(2),process.on("uncaughtException",function(I){if(!(I instanceof ad))throw I}),process.on("unhandledRejection",Us),x=function(I){process.exit(I)},u.inspect=function(){return"[Emscripten Module object]"};var K;try{K=TR()}catch(I){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),I}global.Worker=K.Worker}else C?(typeof read!="undefined"&&(F=function(D){return read(D)}),$=function(D){var B;return typeof readbuffer=="function"?new Uint8Array(readbuffer(D)):(B=read(D,"binary"),Ie(typeof B=="object"),B)},typeof scriptArgs!="undefined"?g=scriptArgs:typeof arguments!="undefined"&&(g=arguments),typeof quit=="function"&&(x=function(I){quit(I)}),typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||b)&&(b?E=self.location.href:typeof document!="undefined"&&document.currentScript&&(E=document.currentScript.src),typeof r!="undefined"&&r&&(E=r),E.indexOf("blob:")!==0?E=E.substr(0,E.lastIndexOf("/")+1):E="",v?(F=function(D,B){return O||(O=Dh()),G||(G=cd()),D=G.normalize(D),O.readFileSync(D,B?null:"utf8")},$=function(D){var B=F(D,!0);return B.buffer||(B=new Uint8Array(B)),Ie(B.buffer),B}):(F=function(I){var D=new XMLHttpRequest;return D.open("GET",I,!1),D.send(null),D.responseText},b&&($=function(I){var D=new XMLHttpRequest;return D.open("GET",I,!1),D.responseType="arraybuffer",D.send(null),new Uint8Array(D.response)}),_=function(I,D,B){var Q=new XMLHttpRequest;Q.open("GET",I,!0),Q.responseType="arraybuffer",Q.onload=function(){if(Q.status==200||Q.status==0&&Q.response){D(Q.response);return}B()},Q.onerror=B,Q.send(null)}),T=function(I){document.title=I});v&&typeof performance=="undefined"&&(global.performance=NR().performance);var z=u.print||console.log.bind(console),j=u.printErr||console.warn.bind(console);for(m in f)f.hasOwnProperty(m)&&(u[m]=f[m]);f=null,u.arguments&&(g=u.arguments),u.thisProgram&&(y=u.thisProgram),u.quit&&(x=u.quit);function W(I){W.shown||(W.shown={}),W.shown[I]||(W.shown[I]=1,j(I))}var J=Atomics.load,te=Atomics.store,ae=Atomics.compareExchange,Z;u.wasmBinary&&(Z=u.wasmBinary);var se=u.noExitRuntime||!0;typeof WebAssembly!="object"&&Us("no native wasm support detected");var re,fe,be=!1,Ne;function Ie(I,D){I||Us("Assertion failed: "+D)}function $e(I){var D=u["_"+I];return Ie(D,"Cannot call unknown function "+I+", make sure it is exported"),D}function ze(I,D,B,Q,xe){var ye={string:function(Fn){var eu=0;if(Fn!=null&&Fn!==0){var q5=(Fn.length<<2)+1;eu=Yl(q5),it(Fn,eu,q5)}return eu},array:function(Fn){var eu=Yl(Fn.length);return Rt(Fn,eu),eu}};function Ae(Fn){return D==="string"?Qe(Fn):D==="boolean"?Boolean(Fn):Fn}var Ee=$e(I),ht=[],dn=0;if(Q)for(var en=0;en<Q.length;en++){var Ca=ye[B[en]];Ca?(dn===0&&(dn=sd()),ht[en]=Ca(Q[en])):ht[en]=Q[en]}var Ql=Ee.apply(null,ht);return Ql=Ae(Ql),dn!==0&&Zl(dn),Ql}function Je(I,D,B,Q){B=B||[];var xe=B.every(function(Ae){return Ae==="number"}),ye=D!=="string";return ye&&xe&&!Q?$e(I):function(){return ze(I,D,B,arguments,Q)}}function Ke(I,D,B){for(var Q=D+B,xe="";!(D>=Q);){var ye=I[D++];if(!ye)return xe;if(!(ye&128)){xe+=String.fromCharCode(ye);continue}var Ae=I[D++]&63;if((ye&224)==192){xe+=String.fromCharCode((ye&31)<<6|Ae);continue}var Ee=I[D++]&63;if((ye&240)==224?ye=(ye&15)<<12|Ae<<6|Ee:ye=(ye&7)<<18|Ae<<12|Ee<<6|I[D++]&63,ye<65536)xe+=String.fromCharCode(ye);else{var ht=ye-65536;xe+=String.fromCharCode(55296|ht>>10,56320|ht&1023)}}return xe}function Qe(I,D){return I?Ke(o(),I,D):""}function gt(I,D,B,Q){if(!(Q>0))return 0;for(var xe=B,ye=B+Q-1,Ae=0;Ae<I.length;++Ae){var Ee=I.charCodeAt(Ae);if(Ee>=55296&&Ee<=57343){var ht=I.charCodeAt(++Ae);Ee=65536+((Ee&1023)<<10)|ht&1023}if(Ee<=127){if(B>=ye)break;D[B++]=Ee}else if(Ee<=2047){if(B+1>=ye)break;D[B++]=192|Ee>>6,D[B++]=128|Ee&63}else if(Ee<=65535){if(B+2>=ye)break;D[B++]=224|Ee>>12,D[B++]=128|Ee>>6&63,D[B++]=128|Ee&63}else{if(B+3>=ye)break;D[B++]=240|Ee>>18,D[B++]=128|Ee>>12&63,D[B++]=128|Ee>>6&63,D[B++]=128|Ee&63}}return D[B]=0,B-xe}function it(I,D,B){return gt(I,o(),D,B)}function yt(I){for(var D=0,B=0;B<I.length;++B){var Q=I.charCodeAt(B);Q>=55296&&Q<=57343&&(Q=65536+((Q&1023)<<10)|I.charCodeAt(++B)&1023),Q<=127?++D:Q<=2047?D+=2:Q<=65535?D+=3:D+=4}return D}function Rt(I,D){a().set(I,D)}function Yn(I,D){return I%D>0&&(I+=D-I%D),I}var lt,ur,xn,Vr,Jn,cr,Cr,Ur,Tr;function Qn(I){lt=I,u.HEAP8=ur=new Int8Array(I),u.HEAP16=Vr=new Int16Array(I),u.HEAP32=cr=new Int32Array(I),u.HEAPU8=xn=new Uint8Array(I),u.HEAPU16=Jn=new Uint16Array(I),u.HEAPU32=Cr=new Uint32Array(I),u.HEAPF32=Ur=new Float32Array(I),u.HEAPF64=Tr=new Float64Array(I)}var xa=u.INITIAL_MEMORY||16777216;if(S)re=u.wasmMemory,lt=u.buffer;else if(u.wasmMemory)re=u.wasmMemory;else if(re=new WebAssembly.Memory({initial:xa/65536,maximum:2147483648/65536,shared:!0}),!(re.buffer instanceof SharedArrayBuffer))throw j("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),v&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"),Error("bad memory");re&&(lt=re.buffer),xa=lt.byteLength,Qn(lt);var Sn,ba=[],Nr=[],qc=[],Xc=[],Vs=[],nh=!1,Y0=!1;S||Nr.push({func:function(){bh()}});function rh(){if(!S){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)J0(u.preRun.shift());Hl(ba)}}function sh(){nh=!0,!S&&Hl(Nr)}function ah(){S||Hl(qc)}function er(){S||(Y0=!0)}function oh(){if(!S){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Q0(u.postRun.shift());Hl(Vs)}}function J0(I){ba.unshift(I)}function Q0(I){Vs.unshift(I)}var Gr=0,Kc=null,oi=null;function eg(I){Ie(!S,"addRunDependency cannot be used in a pthread worker"),Gr++,u.monitorRunDependencies&&u.monitorRunDependencies(Gr)}function tg(I){if(Gr--,u.monitorRunDependencies&&u.monitorRunDependencies(Gr),Gr==0&&(Kc!==null&&(clearInterval(Kc),Kc=null),oi)){var D=oi;oi=null,D()}}u.preloadedImages={},u.preloadedAudios={};function Us(I){u.onAbort&&u.onAbort(I),S&&console.error("Pthread aborting at "+new Error().stack),I+="",j(I),be=!0,Ne=1,I="abort("+I+"). Build with -s ASSERTIONS=1 for more info.";var D=new WebAssembly.RuntimeError(I);throw p(D),D}function ii(I,D){return String.prototype.startsWith?I.startsWith(D):I.indexOf(D)===0}var ng="data:application/octet-stream;base64,";function ih(I){return ii(I,ng)}var rg="file://";function lh(I){return ii(I,rg)}var tr="tfjs-backend-wasm-threaded-simd.wasm";ih(tr)||(tr=R(tr));function sg(I){try{if(I==tr&&Z)return new Uint8Array(Z);if($)return $(I);throw"both async and sync fetching of the wasm failed"}catch(D){Us(D)}}function uh(){if(!Z&&(A||b)){if(typeof fetch=="function"&&!lh(tr))return fetch(tr,{credentials:"same-origin"}).then(function(I){if(!I.ok)throw"failed to load wasm binary file at '"+tr+"'";return I.arrayBuffer()}).catch(function(){return sg(tr)});if(_)return new Promise(function(I,D){_(tr,function(B){I(new Uint8Array(B))},D)})}return Promise.resolve().then(function(){return sg(tr)})}function ag(){var I={a:Yg};function D(Ae,Ee){var ht=Ae.exports;if(u.asm=ht,Sn=u.asm.nb,fe=Ee,!S){var dn=De.unusedWorkers.length;De.unusedWorkers.forEach(function(en){De.loadWasmModuleToWorker(en,function(){--dn||tg("wasm-instantiate")})})}}S||eg("wasm-instantiate");function B(Ae){D(Ae.instance,Ae.module)}function Q(Ae){return uh().then(function(Ee){return WebAssembly.instantiate(Ee,I)}).then(Ae,function(Ee){j("failed to asynchronously prepare wasm: "+Ee),Us(Ee)})}function xe(){return!Z&&typeof WebAssembly.instantiateStreaming=="function"&&!ih(tr)&&!lh(tr)&&typeof fetch=="function"?fetch(tr,{credentials:"same-origin"}).then(function(Ae){var Ee=WebAssembly.instantiateStreaming(Ae,I);return Ee.then(B,function(ht){return j("wasm streaming compile failed: "+ht),j("falling back to ArrayBuffer instantiation"),Q(B)})}):Q(B)}if(u.instantiateWasm)try{var ye=u.instantiateWasm(I,D);return ye}catch(Ae){return j("Module.instantiateWasm callback failed with error: "+Ae),!1}return xe().catch(p),{}}var ch={10216:function(){throw"Canceled!"},10234:function(I,D){setTimeout(function(){W5(I,D)},0)}};function og(){De.initRuntime()}function Hl(I){for(;I.length>0;){var D=I.shift();if(typeof D=="function"){D(u);continue}var B=D.func;typeof B=="number"?D.arg===void 0?Sn.get(B)():Sn.get(B)(D.arg):B(D.arg===void 0?null:D.arg)}}var va={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};function Zc(I,D){if(I<=0||I>a().length||I&!0||D<0)return-28;if(D==0)return 0;D>=2147483647&&(D=1/0);var B=Atomics.load(i(),Jl>>2),Q=0;if(B==I){var xe=Atomics.compareExchange(i(),Jl>>2,B,0);if(xe==B&&(--D,Q=1,D<=0))return 1}var ye=Atomics.notify(i(),I>>2,D);if(ye>=0)return ye+Q;throw"Atomics.notify returned an unexpected value "+ye}u._emscripten_futex_wake=Zc;function ig(I){if(S)throw"Internal Error! killThread() can only ever be called from main application thread!";if(!I)throw"Internal Error! Null pthread_ptr in killThread!";i()[I+12>>2]=0;var D=De.pthreads[I];D.worker.terminate(),De.freeThreadData(D),De.runningWorkers.splice(De.runningWorkers.indexOf(D.worker),1),D.worker.pthread=void 0}function lg(I){if(S)throw"Internal Error! cancelThread() can only ever be called from main application thread!";if(!I)throw"Internal Error! Null pthread_ptr in cancelThread!";var D=De.pthreads[I];D.worker.postMessage({cmd:"cancel"})}function dh(I){if(S)throw"Internal Error! cleanupThread() can only ever be called from main application thread!";if(!I)throw"Internal Error! Null pthread_ptr in cleanupThread!";var D=De.pthreads[I];if(D){i()[I+12>>2]=0;var B=D.worker;De.returnWorkerToPool(B)}}var De={unusedWorkers:[],runningWorkers:[],initMainThreadBlock:function(){for(var I=8,D=0;D<I;++D)De.allocateUnusedWorker()},initRuntime:function(){for(var I=ui(228),D=0;D<228/4;++D)l()[I/4+D]=0;i()[I+12>>2]=I;var B=I+152;i()[B>>2]=B;for(var Q=ui(512),D=0;D<128;++D)l()[Q/4+D]=0;Atomics.store(l(),I+100>>2,Q),Atomics.store(l(),I+40>>2,I),v2(I,!b,1),L5(I)},initWorker:function(){},pthreads:{},threadExitHandlers:[],setThreadStatus:function(){},runExitHandlers:function(){for(;De.threadExitHandlers.length>0;)De.threadExitHandlers.pop()();S&&Ia()&&z5()},runExitHandlersAndDeinitThread:function(I,D){Atomics.store(l(),I+56>>2,1),Atomics.store(l(),I+60>>2,0),De.runExitHandlers(),Atomics.store(l(),I+4>>2,D),Atomics.store(l(),I+0>>2,1),Zc(I+0,2147483647),v2(0,0,0)},threadExit:function(I){var D=Ia();D&&(De.runExitHandlersAndDeinitThread(D,I),S&&postMessage({cmd:"exit"}))},threadCancel:function(){De.runExitHandlersAndDeinitThread(Ia(),-1),postMessage({cmd:"cancelDone"})},terminateAllThreads:function(){for(var I in De.pthreads){var D=De.pthreads[I];D&&D.worker&&De.returnWorkerToPool(D.worker)}De.pthreads={};for(var B=0;B<De.unusedWorkers.length;++B){var Q=De.unusedWorkers[B];Q.terminate()}De.unusedWorkers=[];for(var B=0;B<De.runningWorkers.length;++B){var Q=De.runningWorkers[B],D=Q.pthread;De.freeThreadData(D),Q.terminate()}De.runningWorkers=[]},freeThreadData:function(I){if(!!I){if(I.threadInfoStruct){var D=i()[I.threadInfoStruct+100>>2];i()[I.threadInfoStruct+100>>2]=0,rd(D),rd(I.threadInfoStruct)}I.threadInfoStruct=0,I.allocatedOwnStack&&I.stackBase&&rd(I.stackBase),I.stackBase=0,I.worker&&(I.worker.pthread=null)}},returnWorkerToPool:function(I){De.runWithoutMainThreadQueuedCalls(function(){delete De.pthreads[I.pthread.threadInfoStruct],De.unusedWorkers.push(I),De.runningWorkers.splice(De.runningWorkers.indexOf(I),1),De.freeThreadData(I.pthread),I.pthread=void 0})},runWithoutMainThreadQueuedCalls:function(I){i()[j5>>2]=0;try{I()}finally{i()[j5>>2]=1}},receiveObjectTransfer:function(I){},loadWasmModuleToWorker:function(I,D){I.onmessage=function(B){var Q=B.data,xe=Q.cmd;if(I.pthread&&(De.currentProxiedOperationCallerThread=I.pthread.threadInfoStruct),Q.targetThread&&Q.targetThread!=Ia()){var ye=De.pthreads[Q.targetThread];ye?ye.worker.postMessage(B.data,Q.transferList):console.error('Internal error! Worker sent a message "'+xe+'" to target pthread '+Q.targetThread+", but that thread no longer exists!"),De.currentProxiedOperationCallerThread=void 0;return}if(xe==="processQueuedMainThreadWork")Ih();else if(xe==="spawnThread")Ah(B.data);else if(xe==="cleanupThread")dh(Q.thread);else if(xe==="killThread")ig(Q.thread);else if(xe==="cancelThread")lg(Q.thread);else if(xe==="loaded")I.loaded=!0,D&&D(I),I.runPthread&&(I.runPthread(),delete I.runPthread);else if(xe==="print")z("Thread "+Q.threadId+": "+Q.text);else if(xe==="printErr")j("Thread "+Q.threadId+": "+Q.text);else if(xe==="alert")alert("Thread "+Q.threadId+": "+Q.text);else if(xe==="exit"){var Ae=I.pthread&&Atomics.load(l(),I.pthread.threadInfoStruct+64>>2);Ae&&De.returnWorkerToPool(I)}else if(xe==="exitProcess")try{tR(Q.returnCode)}catch(Ee){if(Ee instanceof ad)return;throw Ee}else xe==="cancelDone"?De.returnWorkerToPool(I):xe==="objectTransfer"?De.receiveObjectTransfer(B.data):B.data.target==="setimmediate"?I.postMessage(B.data):j("worker sent an unknown command "+xe);De.currentProxiedOperationCallerThread=void 0},I.onerror=function(B){j("pthread sent an error! "+B.filename+":"+B.lineno+": "+B.message)},v&&(I.on("message",function(B){I.onmessage({data:B})}),I.on("error",function(B){I.onerror(B)}),I.on("exit",function(B){})),I.postMessage({cmd:"load",urlOrBlob:u.mainScriptUrlOrBlob||r,wasmMemory:re,wasmModule:fe})},allocateUnusedWorker:function(){var I=R("tfjs-backend-wasm-threaded-simd.worker.js");De.unusedWorkers.push(new Worker(I))},getNewWorker:function(){return De.unusedWorkers.length==0&&(De.allocateUnusedWorker(),De.loadWasmModuleToWorker(De.unusedWorkers[0])),De.unusedWorkers.length>0?De.unusedWorkers.pop():null},busySpinWait:function(I){for(var D=performance.now()+I;performance.now()<D;);}};function ug(I,D){G5(I,D),Zl(I)}u.establishStackSpace=ug;function cg(){return se}u.getNoExitRuntime=cg;function dg(I,D){return Sn.get(I)(D)}u.invokeEntryPoint=dg;function pg(I,D,B,Q){Us("Assertion failed: "+Qe(I)+", at: "+[D?Qe(D):"unknown filename",B,Q?Qe(Q):"unknown function"])}function hg(I,D){var B=_main(I,D)}var li;v?li=function(){var I=process.hrtime();return I[0]*1e3+I[1]/1e6}:S?li=function(){return performance.now()-u.__performance_now_clock_drift}:typeof dateNow!="undefined"?li=dateNow:li=function(){return performance.now()};function fg(I){return i()[O5()>>2]=I,I}function mg(I,D){if(S)return wa(1,1,I,D)}function gg(I,D){if(I==D)postMessage({cmd:"processQueuedMainThreadWork"});else if(S)postMessage({targetThread:I,cmd:"processThreadQueue"});else{var B=De.pthreads[I],Q=B&&B.worker;if(!Q)return;Q.postMessage({cmd:"processThreadQueue"})}return 1}function yg(){Us()}function Ag(I,D,B){var Q=wg(D,B);return ch[I].apply(null,Q)}function xg(I,D){}function ph(I,D,B){if(I<=0||I>a().length||I&!0)return-28;if(A){if(Atomics.load(i(),I>>2)!=D)return-6;for(var xe=performance.now(),ye=xe+B,Ae=Atomics.exchange(i(),Jl>>2,I);;){if(xe=performance.now(),xe>ye)return Ae=Atomics.exchange(i(),Jl>>2,0),-73;if(Ae=Atomics.exchange(i(),Jl>>2,0),Ae==0)break;if(Ih(),Atomics.load(i(),I>>2)!=D)return-6;Ae=Atomics.exchange(i(),Jl>>2,I)}return 0}else{var Q=Atomics.wait(i(),I>>2,D,B);if(Q==="timed-out")return-73;if(Q==="not-equal")return-6;if(Q==="ok")return 0;throw"Atomics.wait returned an unexpected value "+Q}}function bg(I,D,B){o().copyWithin(I,D,D+B)}function vg(){return v?ER().cpus().length:navigator.hardwareConcurrency}function wa(I,D){for(var B=arguments.length-2,Q=sd(),xe=B,ye=Yl(xe*8),Ae=ye>>3,Ee=0;Ee<B;Ee++){var ht=arguments[2+Ee];c()[Ae+Ee]=ht}var dn=U5(I,xe,ye,D);return Zl(Q),dn}var Yc=[],Jc=[];function wg(I,D){Jc.length=0;var B;for(D>>=2;B=o()[I++];){var Q=B<105;Q&&D&1&&D++,Jc.push(Q?c()[D++>>1]:i()[D]),++D}return Jc}function kg(I,D,B){Yc.length=D;for(var Q=B>>3,xe=0;xe<D;xe++)Yc[xe]=c()[Q+xe];var ye=I<0,Ae=ye?ch[-I-1]:Zg[I];return Ae.apply(null,Yc)}function Sg(){return o().length}function Ig(I){try{return re.grow(I-lt.byteLength+65535>>>16),Qn(re.buffer),1}catch(D){}}function Cg(I){var D=Sg();if(I<=D)return!1;var B=2147483648;if(I>B)return!1;for(var Q=1;Q<=4;Q*=2){var xe=D*(1+.2/Q);xe=Math.min(xe,I+100663296);var ye=Math.min(B,Yn(Math.max(I,xe),65536)),Ae=Ig(ye);if(Ae)return!0}return!1}var He={inEventHandler:0,removeAllEventListeners:function(){for(var I=He.eventHandlers.length-1;I>=0;--I)He._removeHandler(I);He.eventHandlers=[],He.deferredCalls=[]},registerRemoveEventListeners:function(){He.removeEventListenersRegistered||(Xc.push(He.removeAllEventListeners),He.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(I,D,B){function Q(Ae,Ee){if(Ae.length!=Ee.length)return!1;for(var ht in Ae)if(Ae[ht]!=Ee[ht])return!1;return!0