@vladmandic/face-api
Version:
FaceAPI: AI-powered Face Detection & Rotation Tracking, Face Description & Recognition, Age & Gender & Emotion Prediction for Browser and NodeJS using TensorFlow/JS
9 lines (8 loc) • 1.25 MB
JavaScript
/*
Face-API
homepage: <https://github.com/vladmandic/face-api>
author: <https://github.com/vladmandic>'
*/
var zq=Object.create;var f0=Object.defineProperty;var Bq=Object.getOwnPropertyDescriptor;var Vq=Object.getOwnPropertyNames;var Gq=Object.getPrototypeOf,Wq=Object.prototype.hasOwnProperty;var br=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),Kt=(r,t)=>{for(var e in t)f0(r,e,{get:t[e],enumerable:!0})},Uq=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vq(t))!Wq.call(r,o)&&o!==e&&f0(r,o,{get:()=>t[o],enumerable:!(n=Bq(t,o))||n.enumerable});return r};var Gl=(r,t,e)=>(e=r!=null?zq(Gq(r)):{},Uq(t||!r||!r.__esModule?f0(e,"default",{value:r,enumerable:!0}):e,r));var W_=br((gft,G_)=>{G_.exports=He;var yo=null;try{yo=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(r){}function He(r,t,e){this.low=r|0,this.high=t|0,this.unsigned=!!e}He.prototype.__isLong__;Object.defineProperty(He.prototype,"__isLong__",{value:!0});function zn(r){return(r&&r.__isLong__)===!0}He.isLong=zn;var R_={},F_={};function oc(r,t){var e,n,o;return t?(r>>>=0,(o=0<=r&&r<256)&&(n=F_[r],n)?n:(e=qe(r,(r|0)<0?-1:0,!0),o&&(F_[r]=e),e)):(r|=0,(o=-128<=r&&r<128)&&(n=R_[r],n)?n:(e=qe(r,r<0?-1:0,!1),o&&(R_[r]=e),e))}He.fromInt=oc;function bo(r,t){if(isNaN(r))return t?nc:wo;if(t){if(r<0)return nc;if(r>=L_)return V_}else{if(r<=-M_)return Ln;if(r+1>=M_)return B_}return r<0?bo(-r,t).neg():qe(r%Hp|0,r/Hp|0,t)}He.fromNumber=bo;function qe(r,t,e){return new He(r,t,e)}He.fromBits=qe;var Jg=Math.pow;function k0(r,t,e){if(r.length===0)throw Error("empty string");if(r==="NaN"||r==="Infinity"||r==="+Infinity"||r==="-Infinity")return wo;if(typeof t=="number"?(e=t,t=!1):t=!!t,e=e||10,e<2||36<e)throw RangeError("radix");var n;if((n=r.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return k0(r.substring(1),t,e).neg();for(var o=bo(Jg(e,8)),s=wo,i=0;i<r.length;i+=8){var a=Math.min(8,r.length-i),u=parseInt(r.substring(i,i+a),e);if(a<8){var l=bo(Jg(e,a));s=s.mul(l).add(bo(u))}else s=s.mul(o),s=s.add(bo(u))}return s.unsigned=t,s}He.fromString=k0;function oi(r,t){return typeof r=="number"?bo(r,t):typeof r=="string"?k0(r,t):qe(r.low,r.high,typeof t=="boolean"?t:r.unsigned)}He.fromValue=oi;var O_=65536,fK=1<<24,Hp=O_*O_,L_=Hp*Hp,M_=L_/2,P_=oc(fK),wo=oc(0);He.ZERO=wo;var nc=oc(0,!0);He.UZERO=nc;var Up=oc(1);He.ONE=Up;var z_=oc(1,!0);He.UONE=z_;var N0=oc(-1);He.NEG_ONE=N0;var B_=qe(-1,2147483647,!1);He.MAX_VALUE=B_;var V_=qe(-1,-1,!0);He.MAX_UNSIGNED_VALUE=V_;var Ln=qe(0,-2147483648,!1);He.MIN_VALUE=Ln;var xt=He.prototype;xt.toInt=function(){return this.unsigned?this.low>>>0:this.low};xt.toNumber=function(){return this.unsigned?(this.high>>>0)*Hp+(this.low>>>0):this.high*Hp+(this.low>>>0)};xt.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(Ln)){var e=bo(t),n=this.div(e),o=n.mul(e).sub(this);return n.toString(t)+o.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var s=bo(Jg(t,6),this.unsigned),i=this,a="";;){var u=i.div(s),l=i.sub(u.mul(s)).toInt()>>>0,c=l.toString(t);if(i=u,i.isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}};xt.getHighBits=function(){return this.high};xt.getHighBitsUnsigned=function(){return this.high>>>0};xt.getLowBits=function(){return this.low};xt.getLowBitsUnsigned=function(){return this.low>>>0};xt.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Ln)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return this.high!=0?e+33:e+1};xt.isZero=function(){return this.high===0&&this.low===0};xt.eqz=xt.isZero;xt.isNegative=function(){return!this.unsigned&&this.high<0};xt.isPositive=function(){return this.unsigned||this.high>=0};xt.isOdd=function(){return(this.low&1)===1};xt.isEven=function(){return(this.low&1)===0};xt.equals=function(t){return zn(t)||(t=oi(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};xt.eq=xt.equals;xt.notEquals=function(t){return!this.eq(t)};xt.neq=xt.notEquals;xt.ne=xt.notEquals;xt.lessThan=function(t){return this.comp(t)<0};xt.lt=xt.lessThan;xt.lessThanOrEqual=function(t){return this.comp(t)<=0};xt.lte=xt.lessThanOrEqual;xt.le=xt.lessThanOrEqual;xt.greaterThan=function(t){return this.comp(t)>0};xt.gt=xt.greaterThan;xt.greaterThanOrEqual=function(t){return this.comp(t)>=0};xt.gte=xt.greaterThanOrEqual;xt.ge=xt.greaterThanOrEqual;xt.compare=function(t){if(zn(t)||(t=oi(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?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};xt.comp=xt.compare;xt.negate=function(){return!this.unsigned&&this.eq(Ln)?Ln:this.not().add(Up)};xt.neg=xt.negate;xt.add=function(t){zn(t)||(t=oi(t));var e=this.high>>>16,n=this.high&65535,o=this.low>>>16,s=this.low&65535,i=t.high>>>16,a=t.high&65535,u=t.low>>>16,l=t.low&65535,c=0,p=0,m=0,f=0;return f+=s+l,m+=f>>>16,f&=65535,m+=o+u,p+=m>>>16,m&=65535,p+=n+a,c+=p>>>16,p&=65535,c+=e+i,c&=65535,qe(m<<16|f,c<<16|p,this.unsigned)};xt.subtract=function(t){return zn(t)||(t=oi(t)),this.add(t.neg())};xt.sub=xt.subtract;xt.multiply=function(t){if(this.isZero())return wo;if(zn(t)||(t=oi(t)),yo){var e=yo.mul(this.low,this.high,t.low,t.high);return qe(e,yo.get_high(),this.unsigned)}if(t.isZero())return wo;if(this.eq(Ln))return t.isOdd()?Ln:wo;if(t.eq(Ln))return this.isOdd()?Ln:wo;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(P_)&&t.lt(P_))return bo(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,o=this.high&65535,s=this.low>>>16,i=this.low&65535,a=t.high>>>16,u=t.high&65535,l=t.low>>>16,c=t.low&65535,p=0,m=0,f=0,d=0;return d+=i*c,f+=d>>>16,d&=65535,f+=s*c,m+=f>>>16,f&=65535,f+=i*l,m+=f>>>16,f&=65535,m+=o*c,p+=m>>>16,m&=65535,m+=s*l,p+=m>>>16,m&=65535,m+=i*u,p+=m>>>16,m&=65535,p+=n*c+o*l+s*u+i*a,p&=65535,qe(f<<16|d,p<<16|m,this.unsigned)};xt.mul=xt.multiply;xt.divide=function(t){if(zn(t)||(t=oi(t)),t.isZero())throw Error("division by zero");if(yo){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var e=(this.unsigned?yo.div_u:yo.div_s)(this.low,this.high,t.low,t.high);return qe(e,yo.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?nc:wo;var n,o,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return nc;if(t.gt(this.shru(1)))return z_;s=nc}else{if(this.eq(Ln)){if(t.eq(Up)||t.eq(N0))return Ln;if(t.eq(Ln))return Up;var i=this.shr(1);return n=i.div(t).shl(1),n.eq(wo)?t.isNegative()?Up:N0:(o=this.sub(t.mul(n)),s=n.add(o.div(t)),s)}else if(t.eq(Ln))return this.unsigned?nc:wo;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();s=wo}for(o=this;o.gte(t);){n=Math.max(1,Math.floor(o.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),u=a<=48?1:Jg(2,a-48),l=bo(n),c=l.mul(t);c.isNegative()||c.gt(o);)n-=u,l=bo(n,this.unsigned),c=l.mul(t);l.isZero()&&(l=Up),s=s.add(l),o=o.sub(c)}return s};xt.div=xt.divide;xt.modulo=function(t){if(zn(t)||(t=oi(t)),yo){var e=(this.unsigned?yo.rem_u:yo.rem_s)(this.low,this.high,t.low,t.high);return qe(e,yo.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};xt.mod=xt.modulo;xt.rem=xt.modulo;xt.not=function(){return qe(~this.low,~this.high,this.unsigned)};xt.and=function(t){return zn(t)||(t=oi(t)),qe(this.low&t.low,this.high&t.high,this.unsigned)};xt.or=function(t){return zn(t)||(t=oi(t)),qe(this.low|t.low,this.high|t.high,this.unsigned)};xt.xor=function(t){return zn(t)||(t=oi(t)),qe(this.low^t.low,this.high^t.high,this.unsigned)};xt.shiftLeft=function(t){return zn(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?qe(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):qe(0,this.low<<t-32,this.unsigned)};xt.shl=xt.shiftLeft;xt.shiftRight=function(t){return zn(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?qe(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):qe(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};xt.shr=xt.shiftRight;xt.shiftRightUnsigned=function(t){if(zn(t)&&(t=t.toInt()),t&=63,t===0)return this;var e=this.high;if(t<32){var n=this.low;return qe(n>>>t|e<<32-t,e>>>t,this.unsigned)}else return t===32?qe(e,0,this.unsigned):qe(e>>>t-32,0,this.unsigned)};xt.shru=xt.shiftRightUnsigned;xt.shr_u=xt.shiftRightUnsigned;xt.toSigned=function(){return this.unsigned?qe(this.low,this.high,!1):this};xt.toUnsigned=function(){return this.unsigned?this:qe(this.low,this.high,!0)};xt.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};xt.toBytesLE=function(){var t=this.high,e=this.low;return[e&255,e>>>8&255,e>>>16&255,e>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};xt.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,e>>>24,e>>>16&255,e>>>8&255,e&255]};He.fromBytes=function(t,e,n){return n?He.fromBytesLE(t,e):He.fromBytesBE(t,e)};He.fromBytesLE=function(t,e){return new He(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)};He.fromBytesBE=function(t,e){return new He(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}});var TE=br(()=>{});var _E=br(()=>{});var nA=br((rA,sN)=>{(function(r,t,e){function n(a){var u=this,l=i();u.next=function(){var c=2091639*u.s0+u.c*23283064365386963e-26;return u.s0=u.s1,u.s1=u.s2,u.s2=c-(u.c=c|0)},u.c=1,u.s0=l(" "),u.s1=l(" "),u.s2=l(" "),u.s0-=l(a),u.s0<0&&(u.s0+=1),u.s1-=l(a),u.s1<0&&(u.s1+=1),u.s2-=l(a),u.s2<0&&(u.s2+=1),l=null}function o(a,u){return u.c=a.c,u.s0=a.s0,u.s1=a.s1,u.s2=a.s2,u}function s(a,u){var l=new n(a),c=u&&u.state,p=l.next;return p.int32=function(){return l.next()*4294967296|0},p.double=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.quick=p,c&&(typeof c=="object"&&o(c,l),p.state=function(){return o(l,{})}),p}function i(){var a=4022871197,u=function(l){l=String(l);for(var c=0;c<l.length;c++){a+=l.charCodeAt(c);var p=.02519603282416938*a;a=p>>>0,p-=a,p*=a,a=p>>>0,p-=a,a+=p*4294967296}return(a>>>0)*23283064365386963e-26};return u}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.alea=s})(rA,typeof sN=="object"&&sN,typeof define=="function"&&define)});var sA=br((oA,iN)=>{(function(r,t,e){function n(i){var a=this,u="";a.x=0,a.y=0,a.z=0,a.w=0,a.next=function(){var c=a.x^a.x<<11;return a.x=a.y,a.y=a.z,a.z=a.w,a.w^=a.w>>>19^c^c>>>8},i===(i|0)?a.x=i:u+=i;for(var l=0;l<u.length+64;l++)a.x^=u.charCodeAt(l)|0,a.next()}function o(i,a){return a.x=i.x,a.y=i.y,a.z=i.z,a.w=i.w,a}function s(i,a){var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(typeof l=="object"&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.xor128=s})(oA,typeof iN=="object"&&iN,typeof define=="function"&&define)});var aA=br((iA,aN)=>{(function(r,t,e){function n(i){var a=this,u="";a.next=function(){var c=a.x^a.x>>>2;return a.x=a.y,a.y=a.z,a.z=a.w,a.w=a.v,(a.d=a.d+362437|0)+(a.v=a.v^a.v<<4^(c^c<<1))|0},a.x=0,a.y=0,a.z=0,a.w=0,a.v=0,i===(i|0)?a.x=i:u+=i;for(var l=0;l<u.length+64;l++)a.x^=u.charCodeAt(l)|0,l==u.length&&(a.d=a.x<<10^a.x>>>4),a.next()}function o(i,a){return a.x=i.x,a.y=i.y,a.z=i.z,a.w=i.w,a.v=i.v,a.d=i.d,a}function s(i,a){var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(typeof l=="object"&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.xorwow=s})(iA,typeof aN=="object"&&aN,typeof define=="function"&&define)});var uA=br((lA,lN)=>{(function(r,t,e){function n(i){var a=this;a.next=function(){var l=a.x,c=a.i,p,m,f;return p=l[c],p^=p>>>7,m=p^p<<24,p=l[c+1&7],m^=p^p>>>10,p=l[c+3&7],m^=p^p>>>3,p=l[c+4&7],m^=p^p<<7,p=l[c+7&7],p=p^p<<13,m^=p^p<<9,l[c]=m,a.i=c+1&7,m};function u(l,c){var p,m,f=[];if(c===(c|0))m=f[0]=c;else for(c=""+c,p=0;p<c.length;++p)f[p&7]=f[p&7]<<15^c.charCodeAt(p)+f[p+1&7]<<13;for(;f.length<8;)f.push(0);for(p=0;p<8&&f[p]===0;++p);for(p==8?m=f[7]=-1:m=f[p],l.x=f,l.i=0,p=256;p>0;--p)l.next()}u(a,i)}function o(i,a){return a.x=i.x.slice(),a.i=i.i,a}function s(i,a){i==null&&(i=+new Date);var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(l.x&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.xorshift7=s})(lA,typeof lN=="object"&&lN,typeof define=="function"&&define)});var pA=br((cA,uN)=>{(function(r,t,e){function n(i){var a=this;a.next=function(){var l=a.w,c=a.X,p=a.i,m,f;return a.w=l=l+1640531527|0,f=c[p+34&127],m=c[p=p+1&127],f^=f<<13,m^=m<<17,f^=f>>>15,m^=m>>>12,f=c[p]=f^m,a.i=p,f+(l^l>>>16)|0};function u(l,c){var p,m,f,d,h,g=[],x=128;for(c===(c|0)?(m=c,c=null):(c=c+"\0",m=0,x=Math.max(x,c.length)),f=0,d=-32;d<x;++d)c&&(m^=c.charCodeAt((d+32)%c.length)),d===0&&(h=m),m^=m<<10,m^=m>>>15,m^=m<<4,m^=m>>>13,d>=0&&(h=h+1640531527|0,p=g[d&127]^=m+h,f=p==0?f+1:0);for(f>=128&&(g[(c&&c.length||0)&127]=-1),f=127,d=4*128;d>0;--d)m=g[f+34&127],p=g[f=f+1&127],m^=m<<13,p^=p<<17,m^=m>>>15,p^=p>>>12,g[f]=m^p;l.w=h,l.X=g,l.i=f}u(a,i)}function o(i,a){return a.i=i.i,a.w=i.w,a.X=i.X.slice(),a}function s(i,a){i==null&&(i=+new Date);var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(l.X&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.xor4096=s})(cA,typeof uN=="object"&&uN,typeof define=="function"&&define)});var fA=br((mA,cN)=>{(function(r,t,e){function n(i){var a=this,u="";a.next=function(){var c=a.b,p=a.c,m=a.d,f=a.a;return c=c<<25^c>>>7^p,p=p-m|0,m=m<<24^m>>>8^f,f=f-c|0,a.b=c=c<<20^c>>>12^p,a.c=p=p-m|0,a.d=m<<16^p>>>16^f,a.a=f-c|0},a.a=0,a.b=0,a.c=-1640531527,a.d=1367130551,i===Math.floor(i)?(a.a=i/4294967296|0,a.b=i|0):u+=i;for(var l=0;l<u.length+20;l++)a.b^=u.charCodeAt(l)|0,a.next()}function o(i,a){return a.a=i.a,a.b=i.b,a.c=i.c,a.d=i.d,a}function s(i,a){var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(typeof l=="object"&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.tychei=s})(mA,typeof cN=="object"&&cN,typeof define=="function"&&define)});var dA=br(()=>{});var gA=br((hA,ty)=>{(function(r,t,e){var n=256,o=6,s=52,i="random",a=e.pow(n,o),u=e.pow(2,s),l=u*2,c=n-1,p;function m(w,I,N){var E=[];I=I==!0?{entropy:!0}:I||{};var A=g(h(I.entropy?[w,b(t)]:w==null?x():w,3),E),D=new f(E),F=function(){for(var M=D.g(o),V=a,G=0;M<u;)M=(M+G)*n,V*=n,G=D.g(1);for(;M>=l;)M/=2,V/=2,G>>>=1;return(M+G)/V};return F.int32=function(){return D.g(4)|0},F.quick=function(){return D.g(4)/4294967296},F.double=F,g(b(D.S),t),(I.pass||N||function(M,V,G,W){return W&&(W.S&&d(W,D),M.state=function(){return d(D,{})}),G?(e[i]=M,V):M})(F,A,"global"in I?I.global:this==e,I.state)}function f(w){var I,N=w.length,E=this,A=0,D=E.i=E.j=0,F=E.S=[];for(N||(w=[N++]);A<n;)F[A]=A++;for(A=0;A<n;A++)F[A]=F[D=c&D+w[A%N]+(I=F[A])],F[D]=I;(E.g=function(M){for(var V,G=0,W=E.i,q=E.j,H=E.S;M--;)V=H[W=c&W+1],G=G*n+H[c&(H[W]=H[q=c&q+V])+(H[q]=V)];return E.i=W,E.j=q,G})(n)}function d(w,I){return I.i=w.i,I.j=w.j,I.S=w.S.slice(),I}function h(w,I){var N=[],E=typeof w,A;if(I&&E=="object")for(A in w)try{N.push(h(w[A],I-1))}catch(D){}return N.length?N:E=="string"?w:w+"\0"}function g(w,I){for(var N=w+"",E,A=0;A<N.length;)I[c&A]=c&(E^=I[c&A]*19)+N.charCodeAt(A++);return b(I)}function x(){try{var w;return p&&(w=p.randomBytes)?w=w(n):(w=new Uint8Array(n),(r.crypto||r.msCrypto).getRandomValues(w)),b(w)}catch(E){var I=r.navigator,N=I&&I.plugins;return[+new Date,r,N,r.screen,b(t)]}}function b(w){return String.fromCharCode.apply(0,w)}if(g(e.random(),t),typeof ty=="object"&&ty.exports){ty.exports=m;try{p=dA()}catch(w){}}else typeof define=="function"&&define.amd?define(function(){return m}):e["seed"+i]=m})(typeof self!="undefined"?self:hA,[],Math)});var hh=br((c_t,xA)=>{var BX=nA(),VX=sA(),GX=aA(),WX=uA(),UX=pA(),HX=fA(),hc=gA();hc.alea=BX;hc.xor128=VX;hc.xorwow=GX;hc.xorshift7=WX;hc.xor4096=UX;hc.tychei=HX;xA.exports=hc});var $k=br(()=>{});var hw=br(()=>{});var e_=br(()=>{});var KH=br(()=>{});var jH=br(()=>{});var XH=br(()=>{});var YH=br((RC,n_)=>{var r_=(()=>{var r=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(r=r||__filename),function(t){t=t||{};function e(){return it.buffer!=re&&Xe(it.buffer),be}function n(){return it.buffer!=re&&Xe(it.buffer),de}function o(){return it.buffer!=re&&Xe(it.buffer),Ee}function s(){return it.buffer!=re&&Xe(it.buffer),On}function i(){return it.buffer!=re&&Xe(it.buffer),lr}function a(){return it.buffer!=re&&Xe(it.buffer),Zn}function u(){return it.buffer!=re&&Xe(it.buffer),Br}var l=typeof t!="undefined"?t:{},c,p;l.ready=new Promise(function(P,U){c=P,p=U});var m;typeof process!="undefined"&&process.listeners&&(m={uncaughtException:process.listeners("uncaughtException"),unhandledRejection:process.listeners("unhandledRejection")});var f=Object.assign({},l),d=[],h="./this.program",g=(P,U)=>{throw U},x=typeof window=="object",b=typeof importScripts=="function",w=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",I=l.ENVIRONMENT_IS_PTHREAD||!1,N="";function E(P){return l.locateFile?l.locateFile(P,N):N+P}var A,D,F,M;function V(P){if(P instanceof Yu)return;Y("exiting due to exception: "+P)}if(w){var G=hw(),W=e_();b?N=W.dirname(N)+"/":N=__dirname+"/",A=(U,dt)=>(U=wp(U)?new URL(U):W.normalize(U),G.readFileSync(U,dt?void 0:"utf8")),F=U=>{var dt=A(U,!0);return dt.buffer||(dt=new Uint8Array(dt)),dt},D=(U,dt,Pt)=>{U=wp(U)?new URL(U):W.normalize(U),G.readFile(U,function(Jt,Zt){Jt?Pt(Jt):dt(Zt.buffer)})},process.argv.length>1&&(h=process.argv[1].replace(/\\/g,"/")),d=process.argv.slice(2),process.on("uncaughtException",function(U){if(!(U instanceof Yu))throw U}),process.on("unhandledRejection",function(U){throw U}),g=(U,dt)=>{if(zo())throw process.exitCode=U,dt;V(dt),process.exit(U)},l.inspect=function(){return"[Emscripten Module object]"};let P;try{P=KH()}catch(U){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),U}global.Worker=P.Worker}else(x||b)&&(b?N=self.location.href:typeof document!="undefined"&&document.currentScript&&(N=document.currentScript.src),typeof r!="undefined"&&r&&(N=r),N.indexOf("blob:")!==0?N=N.substr(0,N.replace(/[?#].*/,"").lastIndexOf("/")+1):N="",w||(A=P=>{var U=new XMLHttpRequest;return U.open("GET",P,!1),U.send(null),U.responseText},b&&(F=P=>{var U=new XMLHttpRequest;return U.open("GET",P,!1),U.responseType="arraybuffer",U.send(null),new Uint8Array(U.response)}),D=(P,U,dt)=>{var Pt=new XMLHttpRequest;Pt.open("GET",P,!0),Pt.responseType="arraybuffer",Pt.onload=()=>{if(Pt.status==200||Pt.status==0&&Pt.response){U(Pt.response);return}dt()},Pt.onerror=dt,Pt.send(null)}),M=P=>document.title=P);w&&typeof performance=="undefined"&&(global.performance=jH().performance);var q=console.log.bind(console),H=console.warn.bind(console);w&&(q=P=>G.writeSync(1,P+`
`),H=P=>G.writeSync(2,P+`
`));var j=l.print||q,Y=l.printErr||H;Object.assign(l,f),f=null,l.arguments&&(d=l.arguments),l.thisProgram&&(h=l.thisProgram),l.quit&&(g=l.quit);var Z=4,et=Atomics.load,nt=Atomics.store,st=Atomics.compareExchange,lt;l.wasmBinary&&(lt=l.wasmBinary);var ot=l.noExitRuntime||!0;typeof WebAssembly!="object"&&Xu("no native wasm support detected");var it,ft,gt=!1,Ct;function Rt(P,U){P||Xu(U)}var Dt=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Ht(P,U,dt){U>>>=0;for(var Pt=U+dt,Jt=U;P[Jt]&&!(Jt>=Pt);)++Jt;if(Jt-U>16&&P.buffer&&Dt)return Dt.decode(P.buffer instanceof SharedArrayBuffer?P.slice(U,Jt):P.subarray(U,Jt));for(var Zt="";U<Jt;){var bt=P[U++];if(!(bt&128)){Zt+=String.fromCharCode(bt);continue}var $t=P[U++]&63;if((bt&224)==192){Zt+=String.fromCharCode((bt&31)<<6|$t);continue}var or=P[U++]&63;if((bt&240)==224?bt=(bt&15)<<12|$t<<6|or:bt=(bt&7)<<18|$t<<12|or<<6|P[U++]&63,bt<65536)Zt+=String.fromCharCode(bt);else{var eo=bt-65536;Zt+=String.fromCharCode(55296|eo>>10,56320|eo&1023)}}return Zt}function qt(P,U){return P>>>=0,P?Ht(n(),P,U):""}function pe(P,U,dt,Pt){if(dt>>>=0,!(Pt>0))return 0;for(var Jt=dt,Zt=dt+Pt-1,bt=0;bt<P.length;++bt){var $t=P.charCodeAt(bt);if($t>=55296&&$t<=57343){var or=P.charCodeAt(++bt);$t=65536+(($t&1023)<<10)|or&1023}if($t<=127){if(dt>=Zt)break;U[dt++>>>0]=$t}else if($t<=2047){if(dt+1>=Zt)break;U[dt++>>>0]=192|$t>>6,U[dt++>>>0]=128|$t&63}else if($t<=65535){if(dt+2>=Zt)break;U[dt++>>>0]=224|$t>>12,U[dt++>>>0]=128|$t>>6&63,U[dt++>>>0]=128|$t&63}else{if(dt+3>=Zt)break;U[dt++>>>0]=240|$t>>18,U[dt++>>>0]=128|$t>>12&63,U[dt++>>>0]=128|$t>>6&63,U[dt++>>>0]=128|$t&63}}return U[dt>>>0]=0,dt-Jt}function ye(P,U,dt){return pe(P,n(),U,dt)}var re,be,de,Ee,Ae,On,lr,Zn,Br;I&&(re=l.buffer);function Xe(P){re=P,l.HEAP8=be=new Int8Array(P),l.HEAP16=Ee=new Int16Array(P),l.HEAP32=On=new Int32Array(P),l.HEAPU8=de=new Uint8Array(P),l.HEAPU16=Ae=new Uint16Array(P),l.HEAPU32=lr=new Uint32Array(P),l.HEAPF32=Zn=new Float32Array(P),l.HEAPF64=Br=new Float64Array(P)}var Vr=l.INITIAL_MEMORY||16777216;if(I)it=l.wasmMemory,re=l.buffer;else if(l.wasmMemory)it=l.wasmMemory;else if(it=new WebAssembly.Memory({initial:Vr/65536,maximum:65536,shared:!0}),!(it.buffer instanceof SharedArrayBuffer))throw Y("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"),w&&Y("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");it&&(re=it.buffer),Vr=re.byteLength,Xe(re);var Gr,Jn=[],Qn=[],Qr=[],Ca=!1;function zo(){return ot}function Ti(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vd(l.preRun.shift());Ud(Jn)}function Er(){Ca=!0,!I&&Ud(Qn)}function va(){if(!I){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)c_(l.postRun.shift());Ud(Qr)}}function Vd(P){Jn.unshift(P)}function Gd(P){Qn.unshift(P)}function c_(P){Qr.unshift(P)}var zl=0,bp=null,Sa=null;function MC(P){zl++,l.monitorRunDependencies&&l.monitorRunDependencies(zl)}function Ig(P){if(zl--,l.monitorRunDependencies&&l.monitorRunDependencies(zl),zl==0&&(bp!==null&&(clearInterval(bp),bp=null),Sa)){var U=Sa;Sa=null,U()}}function Xu(P){l.onAbort&&l.onAbort(P),P="Aborted("+P+")",Y(P),gt=!0,Ct=1,P+=". Build with -sASSERTIONS for more info.";var U=new WebAssembly.RuntimeError(P);throw p(U),U}var PC="data:application/octet-stream;base64,";function Cg(P){return P.startsWith(PC)}function wp(P){return P.startsWith("file://")}var tn;tn="tfjs-backend-wasm-threaded-simd.wasm",Cg(tn)||(tn=E(tn));function vg(P){try{if(P==tn&<)return new Uint8Array(lt);if(F)return F(P);throw"both async and sync fetching of the wasm failed"}catch(U){Xu(U)}}function LC(){if(!lt&&(x||b)){if(typeof fetch=="function"&&!wp(tn))return fetch(tn,{credentials:"same-origin"}).then(function(P){if(!P.ok)throw"failed to load wasm binary file at '"+tn+"'";return P.arrayBuffer()}).catch(function(){return vg(tn)});if(D)return new Promise(function(P,U){D(tn,function(dt){P(new Uint8Array(dt))},U)})}return Promise.resolve().then(function(){return vg(tn)})}function zC(){var P={env:Mg,wasi_snapshot_preview1:Mg};function U(bt,$t){var or=bt.exports;if(l.asm=or,jC(l.asm._emscripten_tls_init),Gr=l.asm.__indirect_function_table,Gd(l.asm.__wasm_call_ctors),ft=$t,!I){var eo=Yt.unusedWorkers.length;Yt.unusedWorkers.forEach(function(ka){Yt.loadWasmModuleToWorker(ka,function(){--eo||Ig("wasm-instantiate")})})}}I||MC("wasm-instantiate");function dt(bt){U(bt.instance,bt.module)}function Pt(bt){return LC().then(function($t){return WebAssembly.instantiate($t,P)}).then(function($t){return $t}).then(bt,function($t){Y("failed to asynchronously prepare wasm: "+$t),Xu($t)})}function Jt(){return!lt&&typeof WebAssembly.instantiateStreaming=="function"&&!Cg(tn)&&!wp(tn)&&!w&&typeof fetch=="function"?fetch(tn,{credentials:"same-origin"}).then(function(bt){var $t=WebAssembly.instantiateStreaming(bt,P);return $t.then(dt,function(or){return Y("wasm streaming compile failed: "+or),Y("falling back to ArrayBuffer instantiation"),Pt(dt)})}):Pt(dt)}if(l.instantiateWasm)try{var Zt=l.instantiateWasm(P,U);return Zt}catch(bt){Y("Module.instantiateWasm callback failed with error: "+bt),p(bt)}return Jt().catch(p),{}}var p_,m_,Sg={};function Yu(P){this.name="ExitStatus",this.message="Program terminated with exit("+P+")",this.status=P}function BC(P){var U=Yt.pthreads[P];delete Yt.pthreads[P],U.terminate(),c0(P),Yt.runningWorkers.splice(Yt.runningWorkers.indexOf(U),1),U.pthread_ptr=0}function VC(P){var U=Yt.pthreads[P];U.postMessage({cmd:"cancel"})}function Wd(P){var U=Yt.pthreads[P];Rt(U),Yt.returnWorkerToPool(U)}function GC(P){var U=Yt.getNewWorker();if(!U)return 6;Yt.runningWorkers.push(U),Yt.pthreads[P.pthread_ptr]=U,U.pthread_ptr=P.pthread_ptr;var dt={cmd:"run",start_routine:P.startRoutine,arg:P.arg,pthread_ptr:P.pthread_ptr};return U.runPthread=()=>{w&&U.ref(),U.postMessage(dt,P.transferList),delete U.runPthread},U.loaded&&U.runPthread(),0}var Ng={varargs:void 0,get:function(){Ng.varargs+=4;var P=s()[Ng.varargs-4>>>2];return P},getStr:function(P){var U=qt(P);return U}};function kg(P){if(I)return Bl(1,1,P);Ct=P,zo()||(Yt.terminateAllThreads(),l.onExit&&l.onExit(P),gt=!0),g(P,new Yu(P))}function WC(P,U){if(Ct=P,!U&&I)throw _g(P),"unwind";kg(P)}var Tg=WC;function UC(P){if(P instanceof Yu||P=="unwind")return Ct;g(1,P)}var Yt={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function(){I?Yt.initWorker():Yt.initMainThread()},initMainThread:function(){for(var P=8;P--;)Yt.allocateUnusedWorker()},initWorker:function(){ot=!1},setExitStatus:function(P){Ct=P},terminateAllThreads:function(){for(var P of Object.values(Yt.pthreads))Yt.returnWorkerToPool(P);for(var P of Yt.unusedWorkers)P.terminate();Yt.unusedWorkers=[]},returnWorkerToPool:function(P){var U=P.pthread_ptr;delete Yt.pthreads[U],Yt.unusedWorkers.push(P),Yt.runningWorkers.splice(Yt.runningWorkers.indexOf(P),1),P.pthread_ptr=0,w&&P.unref(),c0(U)},receiveObjectTransfer:function(P){},threadInitTLS:function(){Yt.tlsInitFunctions.forEach(P=>P())},loadWasmModuleToWorker:function(P,U){P.onmessage=Zt=>{var bt=Zt.data,$t=bt.cmd;if(P.pthread_ptr&&(Yt.currentProxiedOperationCallerThread=P.pthread_ptr),bt.targetThread&&bt.targetThread!=Gg()){var or=Yt.pthreads[bt.targetThread];or?or.postMessage(bt,bt.transferList):Y('Internal error! Worker sent a message "'+$t+'" to target pthread '+bt.targetThread+", but that thread no longer exists!"),Yt.currentProxiedOperationCallerThread=void 0;return}$t==="processProxyingQueue"?Hd(bt.queue):$t==="spawnThread"?GC(bt):$t==="cleanupThread"?Wd(bt.thread):$t==="killThread"?BC(bt.thread):$t==="cancelThread"?VC(bt.thread):$t==="loaded"?(P.loaded=!0,w&&P.unref(),U&&U(P),P.runPthread&&P.runPthread()):$t==="print"?j("Thread "+bt.threadId+": "+bt.text):$t==="printErr"?Y("Thread "+bt.threadId+": "+bt.text):$t==="alert"?alert("Thread "+bt.threadId+": "+bt.text):bt.target==="setimmediate"?P.postMessage(bt):$t==="callHandler"?l[bt.handler](...bt.args):$t&&Y("worker sent an unknown command "+$t),Yt.currentProxiedOperationCallerThread=void 0},P.onerror=Zt=>{var bt="worker sent an error!";throw Y(bt+" "+Zt.filename+":"+Zt.lineno+": "+Zt.message),Zt},w&&(P.on("message",function(Zt){P.onmessage({data:Zt})}),P.on("error",function(Zt){P.onerror(Zt)}),P.on("detachedExit",function(){}));var dt=[],Pt=["onExit","onAbort","print","printErr"];for(var Jt of Pt)l.hasOwnProperty(Jt)&&dt.push(Jt);P.postMessage({cmd:"load",handlers:dt,urlOrBlob:l.mainScriptUrlOrBlob||r,wasmMemory:it,wasmModule:ft})},allocateUnusedWorker:function(){var P,U=E("tfjs-backend-wasm-threaded-simd.worker.js");P=new Worker(U),Yt.unusedWorkers.push(P)},getNewWorker:function(){return Yt.unusedWorkers.length==0&&(Yt.allocateUnusedWorker(),Yt.loadWasmModuleToWorker(Yt.unusedWorkers[0])),Yt.unusedWorkers.pop()}};l.PThread=Yt;function Ud(P){for(;P.length>0;)P.shift()(l)}function HC(){var P=Gg(),U=s()[P+52>>>2],dt=s()[P+56>>>2],Pt=U-dt;y_(U,Pt),Wg(U)}l.establishStackSpace=HC;function _g(P){if(I)return Bl(2,0,P);try{Tg(P)}catch(U){UC(U)}}var Ip=[];function qC(P){var U=Ip[P];return U||(P>=Ip.length&&(Ip.length=P+1),Ip[P]=U=Gr.get(P)),U}function KC(P,U){var dt=qC(P)(U);zo()?Yt.setExitStatus(dt):x_(dt)}l.invokeEntryPoint=KC;function jC(P){Yt.tlsInitFunctions.push(P)}function XC(P){d_(P,!b,1,!x),Yt.threadInitTLS()}function YC(P){I?postMessage({cmd:"cleanupThread",thread:P}):Wd(P)}function Eg(P,U,dt,Pt){return I?Bl(3,1,P,U,dt,Pt):Ag(P,U,dt,Pt)}function Ag(P,U,dt,Pt){if(typeof SharedArrayBuffer=="undefined")return Y("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var Jt=[],Zt=0;if(I&&(Jt.length===0||Zt))return Eg(P,U,dt,Pt);if(Zt)return Zt;var bt={startRoutine:dt,pthread_ptr:P,arg:Pt,transferList:Jt};return I?(bt.cmd="spawnThread",postMessage(bt,Jt),0):GC(bt)}function ZC(){return 65536}var JC=!0;function QC(){return JC}function Hd(P){Atomics.store(s(),P>>2,1),Gg()&&g_(P),Atomics.compareExchange(s(),P>>2,1,0)}l.executeNotifiedProxyingQueue=Hd;function tv(P,U,dt,Pt){if(P==U)setTimeout(()=>Hd(Pt));else if(I)postMessage({targetThread:P,cmd:"processProxyingQueue",queue:Pt});else{var Jt=Yt.pthreads[P];if(!Jt)return;Jt.postMessage({cmd:"processProxyingQueue",queue:Pt})}return 1}function ev(P,U,dt){return-1}function rv(){Xu("")}function Zu(P){Zu.shown||(Zu.shown={}),Zu.shown[P]||(Zu.shown[P]=1,w&&(P="warning: "+P),Y(P))}function nv(){w||b||Zu("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}function ov(){return Date.now()}function Dg(){return 4294901760}function sv(){return Dg()}var qd;w?qd=()=>{var P=process.hrtime();return P[0]*1e3+P[1]/1e6}:qd=()=>performance.timeOrigin+performance.now();function iv(P,U,dt){n().copyWithin(P>>>0,U>>>0,U+dt>>>0)}function av(){return w?XH().cpus().length:navigator.hardwareConcurrency}function lv(P){var U=p0(),dt=P();return Wg(U),dt}function Bl(P,U){var dt=arguments.length-2,Pt=arguments;return lv(()=>{for(var Jt=dt,Zt=Ug(Jt*8),bt=Zt>>3,$t=0;$t<dt;$t++){var or=Pt[2+$t];u()[bt+$t>>>0]=or}return h_(P,Jt,Zt,U)})}var Kd=[];function uv(P,U,dt){Kd.length=U;for(var Pt=dt>>3,Jt=0;Jt<U;Jt++)Kd[Jt]=u()[Pt+Jt>>>0];var Zt=P<0,bt=Zt?Sg[-P-1]:yv[P];return bt.apply(null,Kd)}function cv(P){try{return it.grow(P-re.byteLength+65535>>>16),Xe(it.buffer),1}catch(U){}}function pv(P){var U=n().length;if(P=P>>>0,P<=U)return!1;var dt=Dg();if(P>dt)return!1;let Pt=(or,eo)=>or+(eo-or%eo)%eo;for(var Jt=1;Jt<=4;Jt*=2){var Zt=U*(1+.2/Jt);Zt=Math.min(Zt,P+100663296);var bt=Math.min(dt,Pt(Math.max(P,Zt),65536)),$t=cv(bt);if($t)return!0}return!1}function mv(){throw"unwind"}function $g(P){return I?Bl(4,1,P):52}function Rg(P,U,dt,Pt,Jt){return I?Bl(5,1,P,U,dt,Pt,Jt):70}var fv=[null,[],[]];function dv(P,U){var dt=fv[P];U===0||U===10?((P===1?j:Y)(Ht(dt,0)),dt.length=0):dt.push(U)}function Fg(P,U,dt,Pt){if(I)return Bl(6,1,P,U,dt,Pt);for(var Jt=0,Zt=0;Zt<dt;Zt++){var bt=i()[U>>>2],$t=i()[U+4>>>2];U+=8;for(var or=0;or<$t;or++)dv(P,n()[bt+or>>>0]);Jt+=$t}return i()[Pt>>>2]=Jt,0}function Og(P){var U=l["_"+P];return U}function hv(P,U){e().set(P,U>>>0)}function gv(P,U,dt,Pt,Jt){var Zt={string:Mn=>{var Np=0;if(Mn!=null&&Mn!==0){var I_=(Mn.length<<2)+1;Np=Ug(I_),ye(Mn,Np,I_)}return Np},array:Mn=>{var Np=Ug(Mn.length);return hv(Mn,Np),Np}};function bt(Mn){return U==="string"?qt(Mn):U==="boolean"?!!Mn:Mn}var $t=Og(P),or=[],eo=0;if(Pt)for(var ka=0;ka<Pt.length;ka++){var w_=Zt[dt[ka]];w_?(eo===0&&(eo=p0()),or[ka]=w_(Pt[ka])):or[ka]=Pt[ka]}var m0=$t.apply(null,or);function Lq(Mn){return eo!==0&&Wg(eo),bt(Mn)}return m0=Lq(m0),m0}function xv(P,U,dt,Pt){dt=dt||[];var Jt=dt.every(bt=>bt==="number"||bt==="boolean"),Zt=U!=="string";return Zt&&Jt&&!Pt?Og(P):function(){return gv(P,U,dt,arguments,Pt)}}Yt.init();var yv=[null,kg,_g,Eg,$g,Rg,Fg],Mg={__emscripten_init_main_thread_js:XC,__emscripten_thread_cleanup:YC,__pthread_create_js:Ag,_emscripten_default_pthread_stack_size:ZC,_emscripten_get_now_is_monotonic:QC,_emscripten_notify_task_queue:tv,_emscripten_set_offscreencanvas_size:ev,abort:rv,emscripten_check_blocking_allowed:nv,emscripten_date_now:ov,emscripten_get_heap_max:sv,emscripten_get_now:qd,emscripten_memcpy_big:iv,emscripten_num_logical_cores:av,emscripten_receive_on_main_thread_js:uv,emscripten_resize_heap:pv,emscripten_unwind_to_js_event_loop:mv,exit:Tg,fd_close:$g,fd_seek:Rg,fd_write:Fg,memory:it||l.wasmMemory},f_=zC(),bv=l.___wasm_call_ctors=function(){return(bv=l.___wasm_call_ctors=l.asm.__wasm_call_ctors).apply(null,arguments)},wv=l._init=function(){return(wv=l._init=l.asm.init).apply(null,arguments)},Iv=l._init_with_threads_count=function(){return(Iv=l._init_with_threads_count=l.asm.init_with_threads_count).apply(null,arguments)},Cv=l._get_threads_count=function(){return(Cv=l._get_threads_count=l.asm.get_threads_count).apply(null,arguments)},vv=l._register_tensor=function(){return(vv=l._register_tensor=l.asm.register_tensor).apply(null,arguments)},Sv=l._dispose_data=function(){return(Sv=l._dispose_data=l.asm.dispose_data).apply(null,arguments)},Nv=l._dispose=function(){return(Nv=l._dispose=l.asm.dispose).apply(null,arguments)},kv=l._Abs=function(){return(kv=l._Abs=l.asm.Abs).apply(null,arguments)},Tv=l._Acos=function(){return(Tv=l._Acos=l.asm.Acos).apply(null,arguments)},_v=l._Acosh=function(){return(_v=l._Acosh=l.asm.Acosh).apply(null,arguments)},Ev=l._Add=function(){return(Ev=l._Add=l.asm.Add).apply(null,arguments)},Av=l._AddN=function(){return(Av=l._AddN=l.asm.AddN).apply(null,arguments)},Dv=l._All=function(){return(Dv=l._All=l.asm.All).apply(null,arguments)},$v=l._Any=function(){return($v=l._Any=l.asm.Any).apply(null,arguments)},Rv=l._ArgMax=function(){return(Rv=l._ArgMax=l.asm.ArgMax).apply(null,arguments)},Fv=l._ArgMin=function(){return(Fv=l._ArgMin=l.asm.ArgMin).apply(null,arguments)},Ov=l._Asin=function(){return(Ov=l._Asin=l.asm.Asin).apply(null,arguments)},Mv=l._Asinh=function(){return(Mv=l._Asinh=l.asm.Asinh).apply(null,arguments)},Pv=l._Atan=function(){return(Pv=l._Atan=l.asm.Atan).apply(null,arguments)},Lv=l._Atan2=function(){return(Lv=l._Atan2=l.asm.Atan2).apply(null,arguments)},zv=l._Atanh=function(){return(zv=l._Atanh=l.asm.Atanh).apply(null,arguments)},Bv=l._AvgPool=function(){return(Bv=l._AvgPool=l.asm.AvgPool).apply(null,arguments)},Vv=l._AvgPool3D=function(){return(Vv=l._AvgPool3D=l.asm.AvgPool3D).apply(null,arguments)},Gv=l._AvgPool3DGrad=function(){return(Gv=l._AvgPool3DGrad=l.asm.AvgPool3DGrad).apply(null,arguments)},Wv=l._AvgPoolGrad=function(){return(Wv=l._AvgPoolGrad=l.asm.AvgPoolGrad).apply(null,arguments)},Uv=l._BatchMatMul=function(){return(Uv=l._BatchMatMul=l.asm.BatchMatMul).apply(null,arguments)},Hv=l._Bincount=function(){return(Hv=l._Bincount=l.asm.Bincount).apply(null,arguments)},qv=l._BitwiseAnd=function(){return(qv=l._BitwiseAnd=l.asm.BitwiseAnd).apply(null,arguments)},Kv=l._Ceil=function(){return(Kv=l._Ceil=l.asm.Ceil).apply(null,arguments)},jv=l._ClipByValue=function(){return(jv=l._ClipByValue=l.asm.ClipByValue).apply(null,arguments)},Xv=l._Conv2D=function(){return(Xv=l._Conv2D=l.asm.Conv2D).apply(null,arguments)},Yv=l._Conv2DBackpropInput=function(){return(Yv=l._Conv2DBackpropInput=l.asm.Conv2DBackpropInput).apply(null,arguments)},Zv=l._Conv3D=function(){return(Zv=l._Conv3D=l.asm.Conv3D).apply(null,arguments)},Jv=l._Conv3DBackpropFilterV2=function(){return(Jv=l._Conv3DBackpropFilterV2=l.asm.Conv3DBackpropFilterV2).apply(null,arguments)},Qv=l._Conv3DBackpropInputV2=function(){return(Qv=l._Conv3DBackpropInputV2=l.asm.Conv3DBackpropInputV2).apply(null,arguments)},tS=l._Cos=function(){return(tS=l._Cos=l.asm.Cos).apply(null,arguments)},eS=l._Cosh=function(){return(eS=l._Cosh=l.asm.Cosh).apply(null,arguments)},rS=l._CropAndResize=function(){return(rS=l._CropAndResize=l.asm.CropAndResize).apply(null,arguments)},nS=l._Cumprod=function(){return(nS=l._Cumprod=l.asm.Cumprod).apply(null,arguments)},oS=l._Cumsum=function(){return(oS=l._Cumsum=l.asm.Cumsum).apply(null,arguments)},sS=l._DenseBincount=function(){return(sS=l._DenseBincount=l.asm.DenseBincount).apply(null,arguments)},iS=l._DepthToSpace=function(){return(iS=l._DepthToSpace=l.asm.DepthToSpace).apply(null,arguments)},aS=l._DepthwiseConv2dNative=function(){return(aS=l._DepthwiseConv2dNative=l.asm.DepthwiseConv2dNative).apply(null,arguments)},lS=l._Diag=function(){return(lS=l._Diag=l.asm.Diag).apply(null,arguments)},uS=l._Dilation2D=function(){return(uS=l._Dilation2D=l.asm.Dilation2D).apply(null,arguments)},cS=l._Dilation2DBackpropFilter=function(){return(cS=l._Dilation2DBackpropFilter=l.asm.Dilation2DBackpropFilter).apply(null,arguments)},pS=l._Dilation2DBackpropInput=function(){return(pS=l._Dilation2DBackpropInput=l.asm.Dilation2DBackpropInput).apply(null,arguments)},mS=l._Elu=function(){return(mS=l._Elu=l.asm.Elu).apply(null,arguments)},fS=l._EluGrad=function(){return(fS=l._EluGrad=l.asm.EluGrad).apply(null,arguments)},dS=l._Equal=function(){return(dS=l._Equal=l.asm.Equal).apply(null,arguments)},hS=l._Erf=function(){return(hS=l._Erf=l.asm.Erf).apply(null,arguments)},gS=l._Exp=function(){return(gS=l._Exp=l.asm.Exp).apply(null,arguments)},xS=l._Expm1=function(){return(xS=l._Expm1=l.asm.Expm1).apply(null,arguments)},yS=l._FlipLeftRight=function(){return(yS=l._FlipLeftRight=l.asm.FlipLeftRight).apply(null,arguments)},bS=l._Floor=function(){return(bS=l._Floor=l.asm.Floor).apply(null,arguments)},wS=l._FloorDiv=function(){return(wS=l._FloorDiv=l.asm.FloorDiv).apply(null,arguments)},IS=l._FusedBatchNorm=function(){return(IS=l._FusedBatchNorm=l.asm.FusedBatchNorm).apply(null,arguments)},CS=l._FusedConv2D=function(){return(CS=l._FusedConv2D=l.asm.FusedConv2D).apply(null,arguments)},vS=l._FusedDepthwiseConv2D=function(){return(vS=l._FusedDepthwiseConv2D=l.asm.FusedDepthwiseConv2D).apply(null,arguments)},SS=l._Gather=function(){return(SS=l._Gather=l.asm.Gather).apply(null,arguments)},NS=l._GatherNd=function(){return(NS=l._GatherNd=l.asm.GatherNd).apply(null,arguments)},kS=l._Greater=function(){return(kS=l._Greater=l.asm.Greater).apply(null,arguments)},TS=l._GreaterEqual=function(){return(TS=l._GreaterEqual=l.asm.GreaterEqual).apply(null,arguments)},_S=l._IsFinite=function(){return(_S=l._IsFinite=l.asm.IsFinite).apply(null,arguments)},ES=l._IsInf=function(){return(ES=l._IsInf=l.asm.IsInf).apply(null,arguments)},AS=l._IsNan=function(){return(AS=l._IsNan=l.asm.IsNan).apply(null,arguments)},DS=l._LRN=function(){return(DS=l._LRN=l.asm.LRN).apply(null,arguments)},$S=l._LRNGrad=function(){return($S=l._LRNGrad=l.asm.LRNGrad).apply(null,arguments)},RS=l._LeakyRelu=function(){return(RS=l._LeakyRelu=l.asm.LeakyRelu).apply(null,arguments)},FS=l._Less=function(){return(FS=l._Less=l.asm.Less).apply(null,arguments)},OS=l._LessEqual=function(){return(OS=l._LessEqual=l.asm.LessEqual).apply(null,arguments)},MS=l._LinSpace=function(){return(MS=l._LinSpace=l.asm.LinSpace).apply(null,arguments)},PS=l._Log=function(){return(PS=l._Log=l.asm.Log).apply(null,arguments)},LS=l._Log1p=function(){return(LS=l._Log1p=l.asm.Log1p).apply(null,arguments)},zS=l._LogicalAnd=function(){return(zS=l._LogicalAnd=l.asm.LogicalAnd).apply(null,arguments)},BS=l._LogicalNot=function(){return(BS=l._LogicalNot=l.asm.LogicalNot).apply(null,arguments)},VS=l._LogicalOr=function(){return(VS=l._LogicalOr=l.asm.LogicalOr).apply(null,arguments)},GS=l._LogicalXor=function(){return(GS=l._LogicalXor=l.asm.LogicalXor).apply(null,arguments)},WS=l._Max=function(){return(WS=l._Max=l.asm.Max).apply(null,arguments)},US=l._MaxPool=function(){return(US=l._MaxPool=l.asm.MaxPool).apply(null,arguments)},HS=l._MaxPool3D=function(){return(HS=l._MaxPool3D=l.asm.MaxPool3D).apply(null,arguments)},qS=l._MaxPool3DGrad=function(){return(qS=l._MaxPool3DGrad=l.asm.MaxPool3DGrad).apply(null,arguments)},KS=l._MaxPoolGrad=function(){return(KS=l._MaxPoolGrad=l.asm.MaxPoolGrad).apply(null,arguments)},jS=l._MaxPoolWithArgmax=function(){return(jS=l._MaxPoolWithArgmax=l.asm.MaxPoolWithArgmax).apply(null,arguments)},XS=l._Maximum=function(){return(XS=l._Maximum=l.asm.Maximum).apply(null,arguments)},YS=l._Mean=function(){return(YS=l._Mean=l.asm.Mean).apply(null,arguments)},ZS=l._Min=function(){return(ZS=l._Min=l.asm.Min).apply(null,arguments)},JS=l._Minimum=function(){return(JS=l._Minimum=l.asm.Minimum).apply(null,arguments)},QS=l._MirrorPad=function(){return(QS=l._MirrorPad=l.asm.MirrorPad).apply(null,arguments)},t0=l._Mod=function(){return(t0=l._Mod=l.asm.Mod).apply(null,arguments)},e0=l._Multinomial=function(){return(e0=l._Multinomial=l.asm.Multinomial).apply(null,arguments)},r0=l._Multiply=function(){return(r0=l._Multiply=l.asm.Multiply).apply(null,arguments)},n0=l._Neg=function(){return(n0=l._Neg=l.asm.Neg).apply(null,arguments)},o0=l._NonMaxSuppressionV3=function(){return(o0=l._NonMaxSuppressionV3=l.asm.NonMaxSuppressionV3).apply(null,arguments)},s0=l._NonMaxSuppressionV4=function(){return(s0=l._NonMaxSuppressionV4=l.asm.NonMaxSuppressionV4).apply(null,arguments)},Pg=l._NonMaxSuppressionV5=function(){return(Pg=l._NonMaxSuppressionV5=l.asm.NonMaxSuppressionV5).apply(null,arguments)},Lg=l._NotEqual=function(){return(Lg=l._NotEqual=l.asm.NotEqual).apply(null,arguments)},jd=l._OneHot=function(){return(jd=l._OneHot=l.asm.OneHot).apply(null,arguments)},i0=l._PadV2=function(){return(i0=l._PadV2=l.asm.PadV2).apply(null,arguments)},a0=l._Pow=function(){return(a0=l._Pow=l.asm.Pow).apply(null,arguments)},Cp=l._Prelu=function(){return(Cp=l._Prelu=l.asm.Prelu).apply(null,arguments)},zg=l._Prod=function(){return(zg=l._Prod=l.asm.Prod).apply(null,arguments)},vp=l._RealDiv=function(){return(vp=l._RealDiv=l.asm.RealDiv).apply(null,arguments)},Sp=l._Reciprocal=function(){return(Sp=l._Reciprocal=l.asm.Reciprocal).apply(null,arguments)},l0=l._Relu=function(){return(l0=l._Relu=l.asm.Relu).apply(null,arguments)},X=l._Relu6=function(){return(X=l._Relu6=l.asm.Relu6).apply(null,arguments)},ct=l._ResizeBilinear=function(){return(ct=l._ResizeBilinear=l.asm.ResizeBilinear).apply(null,arguments)},Ft=l._ResizeBilinearGrad=function(){return(Ft=l._ResizeBilinearGrad=l.asm.ResizeBilinearGrad).apply(null,arguments)},me=l._ResizeNearestNeighbor=function(){return(me=l._ResizeNearestNeighbor=l.asm.ResizeNearestNeighbor).apply(null,arguments)},Ye=l._ResizeNearestNeighborGrad=function(){return(Ye=l._ResizeNearestNeighborGrad=l.asm.ResizeNearestNeighborGrad).apply(null,arguments)},Ze=l._Reverse=function(){return(Ze=l._Reverse=l.asm.Reverse).apply(null,arguments)},se=l._RotateWithOffset=function(){return(se=l._RotateWithOffset=l.asm.RotateWithOffset).apply(null,arguments)},ne=l._Round=function(){return(ne=l._Round=l.asm.Round).apply(null,arguments)},yr=l._Rsqrt=function(){return(yr=l._Rsqrt=l.asm.Rsqrt).apply(null,arguments)},to=l._ScatterNd=function(){return(to=l._ScatterNd=l.asm.ScatterNd).apply(null,arguments)},Na=l._SearchSorted=function(){return(Na=l._SearchSorted=l.asm.SearchSorted).apply(null,arguments)},Bg=l._SelectV2=function(){return(Bg=l._SelectV2=l.asm.SelectV2).apply(null,arguments)},Xd=l._Selu=function(){return(Xd=l._Selu=l.asm.Selu).apply(null,arguments)},u0=l._Sigmoid=function(){return(u0=l._Sigmoid=l.asm.Sigmoid).apply(null,arguments)},on=l._Sign=function(){return(on=l._Sign=l.asm.Sign).apply(null,arguments)},Vl=l._Sin=function(){return(Vl=l._Sin=l.asm.Sin).apply(null,arguments)},Vg=l._Sinh=function(){return(Vg=l._Sinh=l.asm.Sinh).apply(null,arguments)},iq=l._Softmax=function(){return(iq=l._Softmax=l.asm.Softmax).apply(null,arguments)},aq=l._Softplus=function(){return(aq=l._Softplus=l.asm.Softplus).apply(null,arguments)},lq=l._SparseFillEmptyRows=function(){return(lq=l._SparseFillEmptyRows=l.asm.SparseFillEmptyRows).apply(null,arguments)},uq=l._SparseReshape=function(){return(uq=l._SparseReshape=l.asm.SparseReshape).apply(null,arguments)},cq=l._SparseSegmentReduction=function(){return(cq=l._SparseSegmentReduction=l.asm.SparseSegmentReduction).apply(null,arguments)},pq=l._SparseToDense=function(){return(pq=l._SparseToDense=l.asm.SparseToDense).apply(null,arguments)},mq=l._Sqrt=function(){return(mq=l._Sqrt=l.asm.Sqrt).apply(null,arguments)},fq=l._Square=function(){return(fq=l._Square=l.asm.Square).apply(null,arguments)},dq=l._SquaredDifference=function(){return(dq=l._SquaredDifference=l.asm.SquaredDifference).apply(null,arguments)},hq=l._Step=function(){return(hq=l._Step=l.asm.Step).apply(null,arguments)},gq=l._StridedSlice=function(){return(gq=l._StridedSlice=l.asm.StridedSlice).apply(null,arguments)},xq=l._Sub=function(){return(xq=l._Sub=l.asm.Sub).apply(null,arguments)},yq=l._Sum=function(){return(yq=l._Sum=l.asm.Sum).apply(null,arguments)},bq=l._Tan=function(){return(bq=l._Tan=l.asm.Tan).apply(null,arguments)},wq=l._Tanh=function(){return(wq=l._Tanh=l.asm.Tanh).apply(null,arguments)},Iq=l._TensorScatterUpdate=function(){return(Iq=l._TensorScatterUpdate=l.asm.TensorScatterUpdate).apply(null,arguments)},Cq=l._Tile=function(){return(Cq=l._Tile=l.asm.Tile).apply(null,arguments)},vq=l._TopK=function(){return(vq=l._TopK=l.asm.TopK).apply(null,arguments)},Sq=l._Transform=function(){return(Sq=l._Transform=l.asm.Transform).apply(null,arguments)},Nq=l._Transpose=function(){return(Nq=l._Transpose=l.asm.Transpose).apply(null,arguments)},kq=l.__FusedMatMul=function(){return(kq=l.__FusedMatMul=l.asm._FusedMatMul).apply(null,arguments)},Tq=l._malloc=function(){return(Tq=l._malloc=l.asm.malloc).apply(null,arguments)},_q=l._free=function(){return(_q=l._free=l.asm.free).apply(null,arguments)},Eq=l.__emscripten_tls_init=function(){return(Eq=l.__emscripten_tls_init=l.asm._emscripten_tls_init).apply(null,arguments)},Gg=l._pthread_self=function(){return(Gg=l._pthread_self=l.asm.pthread_self).apply(null,arguments)},Aq=l.___errno_location=function(){return(Aq=l.___errno_location=l.asm.__errno_location).apply(null,arguments)},d_=l.__emscripten_thread_init=function(){return(d_=l.__emscripten_thread_init=l.asm._emscripten_thread_init).apply(null,arguments)},Dq=l.__emscripten_thread_crashed=function(){return(Dq=l.__emscripten_thread_crashed=l.asm._emscripten_thread_crashed).apply(null,arguments)},$q=l._emscripten_main_thread_process_queued_calls=function(){return($q=l._emscripten_main_thread_process_queued_calls=l.asm.emscripten_main_thread_process_queued_calls).apply(null,arguments)},Rq=l._emscripten_main_browser_thread_id=function(){return(Rq=l._emscripten_main_browser_thread_id=l.asm.emscripten_main_browser_thread_id).apply(null,arguments)},h_=l._emscripten_run_in_main_runtime_thread_js=function(){return(h_=l._emscripten_run_in_main_runtime_thread_js=l.asm.emscripten_run_in_main_runtime_thread_js).apply(null,arguments)},Fq=l._emscripten_dispatch_to_thread_=function(){return(Fq=l._emscripten_dispatch_to_thread_=l.asm.emscripten_dispatch_to_thread_).apply(null,arguments)},g_=l.__emscripten_proxy_execute_task_queue=function(){return(g_=l.__emscripten_proxy_execute_task_queue=l.asm._emscripten_proxy_execute_task_queue).apply(null,arguments)},c0=l.__emscripten_thread_free_data=function(){return(c0=l.__emscripten_thread_free_data=l.asm._emscripten_thread_free_data).apply(null,arguments)},x_=l.__emscripten_thread_exit=function(){return(x_=l.__emscripten_thread_exit=l.asm._emscripten_thread_exit).apply(null,arguments)},y_=l._emscripten_stack_set_limits=function(){return(y_=l._emscripten_stack_set_limits=l.asm.emscripten_stack_set_limits).apply(null,arguments)},p0=l.stackSave=function(){return(p0=l.stackSave=l.asm.stackSave).apply(null,arguments)},Wg=l.stackRestore=function(){return(Wg=l.stackRestore=l.asm.stackRestore).apply(null,arguments)},Ug=l.stackAlloc=function(){return(Ug=l.stackAlloc=l.asm.stackAlloc).apply(null,arguments)},Oq=l.dynCall_iijjiiii=function(){return(Oq=l.dynCall_iijjiiii=l.asm.dynCall_iijjiiii).apply(null,arguments)},Mq=l.dynCall_jiji=function(){return(Mq=l.dynCall_jiji=l.asm.dynCall_jiji).apply(null,arguments)};l.keepRuntimeAlive=zo,l.wasmMemory=it,l.cwrap=xv,l.ExitStatus=Yu,l.PThread=Yt;var Hg;Sa=function P(){Hg||b_(),Hg||(Sa=P)};function b_(P){if(P=P||d,zl>0)return;if(I){c(l),Er(),startWorker(l);return}if(Ti(),zl>0)return;function U(){Hg||(Hg=!0,l.calledRun=!0,!gt&&(Er(),c(l),l.onRuntimeInitialized&&l.onRuntimeInitialized(),va()))}l