@mediapipe/tasks-vision
Version:
MediaPipe Vision Tasks
1 lines • 137 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof self?self:{};function e(e,n){t:{for(var r=["CLOSURE_FLAGS"],i=t,s=0;s<r.length;s++)if(null==(i=i[r[s]])){r=null;break t}r=i}return null!=(e=r&&r[e])?e:n}function n(){throw Error("Invalid UTF8")}function r(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let i,s;const o="undefined"!=typeof TextDecoder;let a;const c="undefined"!=typeof TextEncoder;function h(t){if(c)t=(a||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)r[n++]=e;else{if(e<2048)r[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){const s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}function u(e){t.setTimeout((()=>{throw e}),0)}var l,f=e(610401301,!1),d=e(748402147,!0);function p(){var e=t.navigator;return e&&(e=e.userAgent)?e:""}const g=t.navigator;function m(t){return m[" "](t),t}l=g&&g.userAgentData||null,m[" "]=function(){};const y={};let _=null;function v(t){const e=t.length;let n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);const r=new Uint8Array(n);let i=0;return function(t,e){function n(e){for(;r<t.length;){const e=t.charAt(r++),n=_[e];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}E();let r=0;for(;;){const t=n(-1),r=n(0),i=n(64),s=n(64);if(64===s&&-1===t)break;e(t<<2|r>>4),64!=i&&(e(r<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}function E(){if(!_){_={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const r=t.concat(e[n].split(""));y[n]=r;for(let t=0;t<r.length;t++){const e=r[t];void 0===_[e]&&(_[e]=t)}}}}var w="undefined"!=typeof Uint8Array,T=!(!(f&&l&&l.brands.length>0)&&(-1!=p().indexOf("Trident")||-1!=p().indexOf("MSIE")))&&"function"==typeof btoa;const A=/[-_.]/g,b={"-":"+",_:"/",".":"="};function k(t){return b[t]||""}function x(t){if(!T)return v(t);t=A.test(t)?t.replace(A,k):t,t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function S(t){return w&&null!=t&&t instanceof Uint8Array}var L={};function R(){return M||=new F(null,L)}function I(t){C(L);var e=t.g;return null==(e=null==e||S(e)?e:"string"==typeof e?x(e):null)?e:t.g=e}var F=class{h(){return new Uint8Array(I(this)||0)}constructor(t,e){if(C(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let M,P;function C(t){if(t!==L)throw Error("illegal external caller")}function O(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function N(t){return O(t=Error(t),"warning"),t}function U(t,e){if(null!=t){var n=P??={},r=n[t]||0;r>=e||(n[t]=r+1,O(t=Error(),"incident"),u(t))}}function D(){return"function"==typeof BigInt}var B="function"==typeof Symbol&&"symbol"==typeof Symbol();function G(t,e,n=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?n&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var j=G("jas",void 0,!0),V=G(void 0,"0di"),X=G(void 0,"1oa"),H=G(void 0,Symbol()),W=G(void 0,"0ub"),z=G(void 0,"0ubs"),K=G(void 0,"0ubsb"),Y=G(void 0,"0actk"),q=G("m_m","Pa",!0),$=G();const J={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},Z=Object.defineProperties,Q=B?j:"Ga";var tt;const et=[];function nt(t,e){B||Q in t||Z(t,J),t[Q]|=e}function rt(t,e){B||Q in t||Z(t,J),t[Q]=e}function it(t){return nt(t,34),t}function st(t){return nt(t,8192),t}rt(et,7),tt=Object.freeze(et);var ot={};function at(t,e){return void 0===e?t.h!==ct&&!!(2&(0|t.v[Q])):!!(2&e)&&t.h!==ct}const ct={};function ht(t,e){if(null!=t)if("string"==typeof t)t=t?new F(t,L):R();else if(t.constructor!==F)if(S(t))t=t.length?new F(new Uint8Array(t),L):R();else{if(!e)throw Error();t=void 0}return t}class ut{constructor(t,e,n){this.g=t,this.h=e,this.l=n}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}var lt=Object.freeze({});function ft(t,e,n){const r=128&e?0:-1,i=t.length;var s;(s=!!i)&&(s=null!=(s=t[i-1])&&"object"==typeof s&&s.constructor===Object);const o=i+(s?-1:0);for(e=128&e?1:0;e<o;e++)n(e-r,t[e]);if(s){t=t[i-1];for(const e in t)!isNaN(e)&&n(+e,t[e])}}var dt={};function pt(t){return 128&t?dt:void 0}function gt(t){return t.Na=!0,t}var mt=gt((t=>"number"==typeof t)),yt=gt((t=>"string"==typeof t)),_t=gt((t=>"boolean"==typeof t)),vt="function"==typeof t.BigInt&&"bigint"==typeof t.BigInt(0);function Et(t){var e=t;if(yt(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(mt(e)&&!Number.isSafeInteger(e))throw Error(String(e));return vt?BigInt(t):t=_t(t)?t?"1":"0":yt(t)?t.trim()||"0":String(t)}var wt=gt((t=>vt?t>=At&&t<=kt:"-"===t[0]?xt(t,Tt):xt(t,bt)));const Tt=Number.MIN_SAFE_INTEGER.toString(),At=vt?BigInt(Number.MIN_SAFE_INTEGER):void 0,bt=Number.MAX_SAFE_INTEGER.toString(),kt=vt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function xt(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let n=0;n<t.length;n++){const r=t[n],i=e[n];if(r>i)return!1;if(r<i)return!0}}const St="function"==typeof Uint8Array.prototype.slice;let Lt,Rt=0,It=0;function Ft(t){const e=t>>>0;Rt=e,It=(t-e)/4294967296>>>0}function Mt(t){if(t<0){Ft(-t);const[e,n]=jt(Rt,It);Rt=e>>>0,It=n>>>0}else Ft(t)}function Pt(t){const e=Lt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),It=0,Rt=e.getUint32(0,!0)}function Ct(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:Ut(t,e)}function Ot(t,e){return Et(D()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):Ut(t,e))}function Nt(t,e){return D()?Et(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):Et(Bt(t,e))}function Ut(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else D()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=t/1e7>>>0,t%=1e7),n>=1e7&&(e+=n/1e7>>>0,n%=1e7),n=e+Dt(n)+Dt(t));return n}function Dt(t){return t=String(t),"0000000".slice(t.length)+t}function Bt(t,e){if(2147483648&e)if(D())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=jt(t,e);t="-"+Ut(n,r)}else t=Ut(t,e);return t}function Gt(t){if(t.length<16)Mt(Number(t));else if(D())t=BigInt(t),Rt=Number(t&BigInt(4294967295))>>>0,It=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);It=Rt=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));It*=1e6,Rt=1e6*Rt+e,Rt>=4294967296&&(It+=Math.trunc(Rt/4294967296),It>>>=0,Rt>>>=0)}if(e){const[t,e]=jt(Rt,It);Rt=t,It=e}}}function jt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Vt(t){return Array.prototype.slice.call(t)}const Xt="function"==typeof BigInt?BigInt.asIntN:void 0,Ht="function"==typeof BigInt?BigInt.asUintN:void 0,Wt=Number.isSafeInteger,zt=Number.isFinite,Kt=Math.trunc,Yt=Et(0);function qt(t){if(null!=t&&"number"!=typeof t)throw Error(`Value of float/double field must be a number, found ${typeof t}: ${t}`);return t}function $t(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Jt(t){if(null!=t&&"boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}function Zt(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}const Qt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function te(t){switch(typeof t){case"bigint":return!0;case"number":return zt(t);case"string":return Qt.test(t);default:return!1}}function ee(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?0|t:void 0}function ne(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?t>>>0:void 0}function re(t){const e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(Gt(t),Bt(Rt,It))}function ie(t){if(t=Kt(t),!Wt(t)){Mt(t);var e=Rt,n=It;(t=2147483648&n)&&(n=~n>>>0,0==(e=1+~e>>>0)&&(n=n+1>>>0)),t="number"==typeof(e=Ct(e,n))?t?-e:e:t?"-"+e:e}return t}function se(t){var e=Kt(Number(t));return Wt(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),re(t))}function oe(t){var e=Kt(Number(t));return Wt(e)?Et(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),D()?Et(Xt(64,BigInt(t))):Et(re(t)))}function ae(t){return Wt(t)?t=Et(ie(t)):(t=Kt(t),Wt(t)?t=String(t):(Mt(t),t=Bt(Rt,It)),t=Et(t)),t}function ce(t){const e=typeof t;return null==t?t:"bigint"===e?Et(Xt(64,t)):te(t)?"string"===e?oe(t):ae(t):void 0}function he(t){if("string"!=typeof t)throw Error();return t}function ue(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function le(t){return null==t||"string"==typeof t?t:void 0}function fe(t,e,n,r){return null!=t&&t[q]===ot?t:Array.isArray(t)?((r=(n=0|t[Q])|32&r|2&r)!==n&&rt(t,r),new e(t)):(n?2&r?((t=e[V])||(it((t=new e).v),t=e[V]=t),e=t):e=new e:e=void 0,e)}function de(t,e,n){if(e)t:{if(!te(e=t))throw N("int64");switch(typeof e){case"string":e=oe(e);break t;case"bigint":e=Et(Xt(64,e));break t;default:e=ae(e)}}else e=ce(t);return null==(t=e)?n?Yt:void 0:t}const pe={};let ge=function(){try{return m(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class me{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}const ye=ge?(Object.setPrototypeOf(me.prototype,Map.prototype),Object.defineProperties(me.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),me):class extends Map{constructor(){super()}};function _e(t){return t}function ve(t){if(2&t.J)throw Error("Cannot mutate an immutable Map")}var Ee=class extends ye{constructor(t,e,n=_e,r=_e){super(),this.J=0|t[Q],this.K=e,this.S=n,this.fa=this.K?we:r;for(let i=0;i<t.length;i++){const s=t[i],o=n(s[0],!1,!0);let a=s[1];e?void 0===a&&(a=null):a=r(s[1],!1,!0,void 0,void 0,this.J),super.set(o,a)}}V(t){return st(Array.from(super.entries(),t))}clear(){ve(this),super.clear()}delete(t){return ve(this),super.delete(this.S(t,!0,!1))}entries(){if(this.K){var t=super.keys();t=new ut(t,Te,this)}else t=super.entries();return t}values(){if(this.K){var t=super.keys();t=new ut(t,Ee.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.K?super.forEach(((n,r,i)=>{t.call(e,i.get(r),r,i)})):super.forEach(t,e)}set(t,e){return ve(this),null==(t=this.S(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.fa(e,!0,!0,this.K,!1,this.J))}Ma(t){const e=this.S(t[0],!1,!0);t=t[1],t=this.K?void 0===t?null:t:this.fa(t,!1,!0,void 0,!1,this.J),super.set(e,t)}has(t){return super.has(this.S(t,!1,!1))}get(t){t=this.S(t,!1,!1);const e=super.get(t);if(void 0!==e){var n=this.K;return n?((n=this.fa(e,!1,!0,n,this.ra,this.J))!==e&&super.set(t,n),n):e}}[Symbol.iterator](){return this.entries()}};function we(t,e,n,r,i,s){return t=fe(t,r,n,s),i&&(t=Xe(t)),t}function Te(t){return[t,this.get(t)]}let Ae;function be(){return Ae||=new Ee(it([]),void 0,void 0,void 0,pe)}function ke(t){return H?t[H]:void 0}function xe(t,e){for(const n in t)!isNaN(n)&&e(t,+n,t[n])}Ee.prototype.toJSON=void 0;var Se=class{};const Le={Ka:!0};function Re(t,e){e<100||U(z,1)}function Ie(t,e,n,r){const i=void 0!==r;r=!!r;var s,o=H;!i&&B&&o&&(s=t[o])&&xe(s,Re),o=[];var a=t.length;let c;s=4294967295;let h=!1;const u=!!(64&e),l=u?128&e?0:-1:void 0;1&e||(c=a&&t[a-1],null!=c&&"object"==typeof c&&c.constructor===Object?s=--a:c=void 0,!u||128&e||i||(h=!0,s=s-l+l)),e=void 0;for(var f=0;f<a;f++){let i=t[f];if(null!=i&&null!=(i=n(i,r)))if(u&&f>=s){const t=f-l;(e??={})[t]=i}else o[f]=i}if(c)for(let t in c){if(null==(a=c[t])||null==(a=n(a,r)))continue;let i;f=+t,u&&!Number.isNaN(f)&&(i=f+l)<s?o[i]=a:(e??={})[t]=a}return e&&(h?o.push(e):o[s]=e),i&&H&&(t=ke(t))&&t instanceof Se&&(o[H]=function(t){const e=new Se;return xe(t,((t,n,r)=>{e[n]=Vt(r)})),e.da=t.da,e}(t)),o}function Fe(t){return t[0]=Me(t[0]),t[1]=Me(t[1]),t}function Me(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return wt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[Q];return 0===t.length&&1&e?void 0:Ie(t,e,Me)}if(null!=t&&t[q]===ot)return Oe(t);if(t instanceof F){if(null==(e=t.g))t="";else if("string"==typeof e)t=e;else{if(T){for(var n="",r=0,i=e.length-10240;r<i;)n+=String.fromCharCode.apply(null,e.subarray(r,r+=10240));n+=String.fromCharCode.apply(null,r?e.subarray(r):e),e=btoa(n)}else{void 0===n&&(n=0),E(),n=y[n],r=Array(Math.floor(e.length/3)),i=n[64]||"";let t=0,h=0;for(;t<e.length-2;t+=3){var s=e[t],o=e[t+1],a=e[t+2],c=n[s>>2];s=n[(3&s)<<4|o>>4],o=n[(15&o)<<2|a>>6],a=n[63&a],r[h++]=c+s+o+a}switch(c=0,a=i,e.length-t){case 2:a=n[(15&(c=e[t+1]))<<2]||i;case 1:e=e[t],r[h]=n[e>>2]+n[(3&e)<<4|c>>4]+a+i}e=r.join("")}t=t.g=e}return t}return t instanceof Ee?t=0!==t.size?t.V(Fe):void 0:void 0}return t}let Pe,Ce;function Oe(t){return Ie(t=t.v,0|t[Q],Me)}function Ne(t,e){return Ue(t,e[0],e[1])}function Ue(t,e,n,r=0){if(null==t){var i=32;n?(t=[n],i|=128):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[Q],d&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(d)throw Error("carr");U(Y,5)}(),256&i)throw Error("farr");if(64&i)return(i|r)!==i&&rt(t,i|r),t;if(n&&(i|=128,n!==t[0]))throw Error("mid");t:{i|=64;var s=(n=t).length;if(s){var o=s-1;const t=n[o];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((o-=e=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var a in t)(s=+a)<o&&(n[s+e]=t[a],delete t[a]);i=-16760833&i|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,s-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&a)<<14}}}return rt(t,64|i|r),t}function De(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var n=0|t[Q];return 0===t.length&&1&n?void 0:Be(t,n,e)}if(null!=t&&t[q]===ot)return je(t);if(t instanceof Ee){if(2&(e=t.J))return t;if(!t.size)return;if(n=it(t.V()),t.K)for(t=0;t<n.length;t++){const r=n[t];let i=r[1];i=null==i||"object"!=typeof i?void 0:null!=i&&i[q]===ot?je(i):Array.isArray(i)?Be(i,0|i[Q],!!(32&e)):void 0,r[1]=i}return n}return t instanceof F?t:void 0}function Be(t,e,n){return 2&e||(!n||4096&e||16&e?t=Ve(t,e,!1,n&&!(16&e)):(nt(t,34),4&e&&Object.freeze(t))),t}function Ge(t,e,n){return t=new t.constructor(e),n&&(t.h=ct),t.m=ct,t}function je(t){const e=t.v,n=0|e[Q];return at(t,n)?t:Ke(t,e,n)?Ge(t,e):Ve(e,n)}function Ve(t,e,n,r){return r??=!!(34&e),t=Ie(t,e,De,r),r=32,n&&(r|=2),rt(t,e=16769217&e|r),t}function Xe(t){const e=t.v,n=0|e[Q];return at(t,n)?Ke(t,e,n)?Ge(t,e,!0):new t.constructor(Ve(e,n,!1)):t}function He(t){if(t.h!==ct)return!1;var e=t.v;return nt(e=Ve(e,0|e[Q]),2048),t.v=e,t.h=void 0,t.m=void 0,!0}function We(t){if(!He(t)&&at(t,0|t.v[Q]))throw Error()}function ze(t,e){void 0===e&&(e=0|t[Q]),32&e&&!(4096&e)&&rt(t,4096|e)}function Ke(t,e,n){return!!(2&n)||!(!(32&n)||4096&n)&&(rt(e,2|n),t.h=ct,!0)}const Ye=Et(0),qe={};function $e(t,e,n,r,i){if(null!==(e=Je(t.v,e,n,i))||r&&t.m!==ct)return e}function Je(t,e,n,r){if(-1===e)return null;const i=e+(n?0:-1),s=t.length-1;let o,a;if(!(s<1+(n?0:-1))){if(i>=s)if(o=t[s],null!=o&&"object"==typeof o&&o.constructor===Object)n=o[e],a=!0;else{if(i!==s)return;n=o}else n=t[i];if(r&&null!=n){if(null==(r=r(n)))return r;if(!Object.is(r,n))return a?o[e]=r:t[i]=r,r}return n}}function Ze(t,e,n,r){We(t),Qe(t=t.v,0|t[Q],e,n,r)}function Qe(t,e,n,r,i){const s=n+(i?0:-1);var o=t.length-1;if(o>=1+(i?0:-1)&&s>=o){const i=t[o];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[n]=r,e}return s<=o?(t[s]=r,e):(void 0!==r&&(n>=(o=(e??=0|t[Q])>>14&1023||536870912)?null!=r&&(t[o+(i?0:-1)]={[n]:r}):t[s]=r),e)}function tn(){return void 0===lt?2:4}function en(t,e,n,r,i){let s=t.v,o=0|s[Q];r=at(t,o)?1:r,i=!!i||3===r,2===r&&He(t)&&(s=t.v,o=0|s[Q]);let a=(t=rn(s,e))===tt?7:0|t[Q],c=sn(a,o);var h=!(4&c);if(h){4&c&&(t=Vt(t),a=0,c=An(c,o),o=Qe(s,o,e,t));let r=0,i=0;for(;r<t.length;r++){const e=n(t[r]);null!=e&&(t[i++]=e)}i<r&&(t.length=i),n=-513&(4|c),c=n&=-1025,c&=-4097}return c!==a&&(rt(t,c),2&c&&Object.freeze(t)),nn(t,c,s,o,e,r,h,i)}function nn(t,e,n,r,i,s,o,a){let c=e;return 1===s||4===s&&(2&e||!(16&e)&&32&r)?on(e)||((e|=!t.length||o&&!(4096&e)||32&r&&!(4096&e||16&e)?2:256)!==c&&rt(t,e),Object.freeze(t)):(2===s&&on(e)&&(t=Vt(t),c=0,e=An(e,r),r=Qe(n,r,i,t)),on(e)||(a||(e|=16),e!==c&&rt(t,e))),2&e||!(4096&e||16&e)||ze(n,r),t}function rn(t,e,n){return t=Je(t,e,n),Array.isArray(t)?t:tt}function sn(t,e){return 2&e&&(t|=2),1|t}function on(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function an(t){return ht(t,!0)}function cn(t){t=Vt(t);for(let e=0;e<t.length;e++){const n=t[e]=Vt(t[e]);Array.isArray(n[1])&&(n[1]=it(n[1]))}return st(t)}function hn(t,e,n,r){We(t),Qe(t=t.v,0|t[Q],e,("0"===r?0===Number(n):n===r)?void 0:n)}function un(t,e,n){if(2&e)throw Error();const r=pt(e);let i=rn(t,n,r),s=i===tt?7:0|i[Q],o=sn(s,e);return(2&o||on(o)||16&o)&&(o===s||on(o)||rt(i,o),i=Vt(i),s=0,o=An(o,e),Qe(t,e,n,i,r)),o&=-13,o!==s&&rt(i,o),i}function ln(t,e){var n=Cs;return pn(fn(t=t.v),t,void 0,n)===e?e:-1}function fn(t){if(B)return t[X]??(t[X]=new Map);if(X in t)return t[X];const e=new Map;return Object.defineProperty(t,X,{value:e}),e}function dn(t,e,n,r,i){const s=fn(t),o=pn(s,t,e,n,i);return o!==r&&(o&&(e=Qe(t,e,o,void 0,i)),s.set(n,r)),e}function pn(t,e,n,r,i){let s=t.get(r);if(null!=s)return s;s=0;for(let t=0;t<r.length;t++){const o=r[t];null!=Je(e,o,i)&&(0!==s&&(n=Qe(e,n,s,void 0,i)),s=o)}return t.set(r,s),s}function gn(t,e,n){let r=0|t[Q];const i=pt(r),s=Je(t,n,i);let o;if(null!=s&&s[q]===ot){if(!at(s))return He(s),s.v;o=s.v}else Array.isArray(s)&&(o=s);if(o){const t=0|o[Q];2&t&&(o=Ve(o,t))}return o=Ne(o,e),o!==s&&Qe(t,r,n,o,i),o}function mn(t,e,n,r,i){let s=!1;if(null!=(r=Je(t,r,i,(t=>{const r=fe(t,n,!1,e);return s=r!==t&&null!=r,r}))))return s&&!at(r)&&ze(t,e),r}function yn(t,e,n,r){let i=t.v,s=0|i[Q];if(null==(e=mn(i,s,e,n,r)))return e;if(s=0|i[Q],!at(t,s)){const o=Xe(e);o!==e&&(He(t)&&(i=t.v,s=0|i[Q]),s=Qe(i,s,n,e=o,r),ze(i,s))}return e}function _n(t,e,n,r,i,s,o,a){var c=at(t,n);s=c?1:s,o=!!o||3===s,c=a&&!c,(2===s||c)&&He(t)&&(n=0|(e=t.v)[Q]);var h=(t=rn(e,i))===tt?7:0|t[Q],u=sn(h,n);if(a=!(4&u)){var l=t,f=n;const e=!!(2&u);e&&(f|=2);let i=!e,s=!0,o=0,a=0;for(;o<l.length;o++){const t=fe(l[o],r,!1,f);if(t instanceof r){if(!e){const e=at(t);i&&=!e,s&&=e}l[a++]=t}}a<o&&(l.length=a),u|=4,u=s?-4097&u:4096|u,u=i?8|u:-9&u}if(u!==h&&(rt(t,u),2&u&&Object.freeze(t)),c&&!(8&u||!t.length&&(1===s||4===s&&(2&u||!(16&u)&&32&n)))){for(on(u)&&(t=Vt(t),u=An(u,n),n=Qe(e,n,i,t)),r=t,c=u,h=0;h<r.length;h++)(l=r[h])!==(u=Xe(l))&&(r[h]=u);c|=8,rt(t,u=c=r.length?4096|c:-4097&c)}return nn(t,u,e,n,i,s,a,o)}function vn(t,e,n){const r=t.v;return _n(t,r,0|r[Q],e,n,tn(),!1,!0)}function En(t){return null==t&&(t=void 0),t}function wn(t,e,n,r,i){return Ze(t,n,r=En(r),i),r&&!at(r)&&ze(t.v),t}function Tn(t,e,n,r){t:{var i=r=En(r);We(t);const s=t.v;let o=0|s[Q];if(null==i){const t=fn(s);if(pn(t,s,o,n)!==e)break t;t.set(n,0)}else o=dn(s,o,n,e);Qe(s,o,e,i)}r&&!at(r)&&ze(t.v)}function An(t,e){return-273&(2&e?2|t:-3&t)}function bn(t,e,n,r){var i=r;We(t),t=_n(t,r=t.v,0|r[Q],n,e,2,!0),i=null!=i?i:new n,t.push(i),e=n=t===tt?7:0|t[Q],(i=at(i))?(n&=-9,1===t.length&&(n&=-4097)):n|=4096,n!==e&&rt(t,n),i||ze(r)}function kn(t,e,n){return ee($e(t,e,void 0,n))}function xn(t,e){return $e(t,e,void 0,void 0,$t)??0}function Sn(t,e,n){if(null!=n){if("number"!=typeof n)throw N("int32");if(!zt(n))throw N("int32");n|=0}Ze(t,e,n)}function Ln(t,e,n){Ze(t,e,qt(n))}function Rn(t,e,n){hn(t,e,ue(n),"")}function In(t,e,n){{We(t);const o=t.v;let a=0|o[Q];if(null==n)Qe(o,a,e);else{var r=t=n===tt?7:0|n[Q],i=on(t),s=i||Object.isFrozen(n);for(i||(t=0),s||(n=Vt(n),r=0,t=An(t,a),s=!1),t|=5,t|=(4&t?512&t?512:1024&t?1024:0:void 0)??1024,i=0;i<n.length;i++){const e=n[i],o=he(e);Object.is(e,o)||(s&&(n=Vt(n),r=0,t=An(t,a),s=!1),n[i]=o)}t!==r&&(s&&(n=Vt(n),t=An(t,a)),rt(n,t)),Qe(o,a,e,n)}}}function Fn(t,e,n){We(t),en(t,e,le,2,!0).push(he(n))}var Mn=class{constructor(t,e,n){if(this.buffer=t,n&&!e)throw Error();this.g=e}};function Pn(t,e){if("string"==typeof t)return new Mn(x(t),e);if(Array.isArray(t))return new Mn(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new Mn(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Mn(t,!1);if(t.constructor===F)return e=I(t)||new Uint8Array(0),new Mn(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Mn(t,!1);throw Error()}function Cn(t,e){let n,r=0,i=0,s=0;const o=t.h;let a=t.g;do{n=o[a++],r|=(127&n)<<s,s+=7}while(s<32&&128&n);if(s>32)for(i|=(127&n)>>4,s=3;s<32&&128&n;s+=7)n=o[a++],i|=(127&n)<<s;if(Gn(t,a),!(128&n))return e(r>>>0,i>>>0);throw Error()}function On(t){let e=0,n=t.g;const r=n+10,i=t.h;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return Gn(t,n),!!(127&e)}throw Error()}function Nn(t){const e=t.h;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw Error();return Gn(t,n),i}function Un(t){return Nn(t)>>>0}function Dn(t){var e=t.h;const n=t.g;var r=e[n],i=e[n+1];const s=e[n+2];return e=e[n+3],Gn(t,t.g+4),t=2*((i=(r<<0|i<<8|s<<16|e<<24)>>>0)>>31)+1,r=i>>>23&255,i&=8388607,255==r?i?NaN:t*(1/0):0==r?1401298464324817e-60*t*i:t*Math.pow(2,r-150)*(i+8388608)}function Bn(t){return Nn(t)}function Gn(t,e){if(t.g=e,e>t.l)throw Error()}function jn(t,e){if(e<0)throw Error();const n=t.g;if((e=n+e)>t.l)throw Error();return t.g=e,n}function Vn(t,e){if(0==e)return R();var n=jn(t,e);return t.Y&&t.j?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?new Uint8Array(0):St?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?R():new F(n,L)}var Xn=[];function Hn(t,e,n,r){if(Qn.length){const i=Qn.pop();return i.o(r),i.g.init(t,e,n,r),i}return new Zn(t,e,n,r)}function Wn(t){t.g.clear(),t.l=-1,t.h=-1,Qn.length<100&&Qn.push(t)}function zn(t){var e=t.g;if(e.g==e.l)return!1;t.m=t.g.g;var n=Un(t.g);if(e=n>>>3,!((n&=7)>=0&&n<=5))throw Error();if(e<1)throw Error();return t.l=e,t.h=n,!0}function Kn(t){switch(t.h){case 0:0!=t.h?Kn(t):On(t.g);break;case 1:Gn(t=t.g,t.g+8);break;case 2:if(2!=t.h)Kn(t);else{var e=Un(t.g);Gn(t=t.g,t.g+e)}break;case 5:Gn(t=t.g,t.g+4);break;case 3:for(e=t.l;;){if(!zn(t))throw Error();if(4==t.h){if(t.l!=e)throw Error();break}Kn(t)}break;default:throw Error()}}function Yn(t,e,n){const r=t.g.l;var i=Un(t.g);let s=(i=t.g.g+i)-r;if(s<=0&&(t.g.l=i,n(e,t,void 0,void 0,void 0),s=i-t.g.g),s)throw Error();return t.g.g=i,t.g.l=r,e}function qn(t){var e=Un(t.g),a=jn(t=t.g,e);if(t=t.h,o){var c,h=t;(c=s)||(c=s=new TextDecoder("utf-8",{fatal:!0})),e=a+e,h=0===a&&e===h.length?h:h.subarray(a,e);try{var u=c.decode(h)}catch(t){if(void 0===i){try{c.decode(new Uint8Array([128]))}catch(t){}try{c.decode(new Uint8Array([97])),i=!0}catch(t){i=!1}}throw!i&&(s=void 0),t}}else{e=(u=a)+e,a=[];let i,s=null;for(;u<e;){var l=t[u++];l<128?a.push(l):l<224?u>=e?n():(i=t[u++],l<194||128!=(192&i)?(u--,n()):a.push((31&l)<<6|63&i)):l<240?u>=e-1?n():(i=t[u++],128!=(192&i)||224===l&&i<160||237===l&&i>=160||128!=(192&(c=t[u++]))?(u--,n()):a.push((15&l)<<12|(63&i)<<6|63&c)):l<=244?u>=e-2?n():(i=t[u++],128!=(192&i)||i-144+(l<<28)>>30!=0||128!=(192&(c=t[u++]))||128!=(192&(h=t[u++]))?(u--,n()):(l=(7&l)<<18|(63&i)<<12|(63&c)<<6|63&h,l-=65536,a.push(55296+(l>>10&1023),56320+(1023&l)))):n(),a.length>=8192&&(s=r(s,a),a.length=0)}u=r(s,a)}return u}function $n(t){const e=Un(t.g);return Vn(t.g,e)}function Jn(t,e,n){var r=Un(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var Zn=class{constructor(t,e,n,r){if(Xn.length){const i=Xn.pop();i.init(t,e,n,r),t=i}else t=new class{constructor(t,e,n,r){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.init(t,e,n,r)}init(t,e,n,{Y:r=!1,ea:i=!1}={}){this.Y=r,this.ea=i,t&&(t=Pn(t,this.ea),this.h=t.buffer,this.j=t.g,this.m=e||0,this.l=void 0!==n?this.m+n:this.h.length,this.g=this.m)}clear(){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.Y=!1}}(t,e,n,r);this.g=t,this.m=this.g.g,this.h=this.l=-1,this.o(r)}o({ha:t=!1}={}){this.ha=t}},Qn=[];function tr(t){return t?/^\d+$/.test(t)?(Gt(t),new er(Rt,It)):null:nr||=new er(0,0)}var er=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let nr;function rr(t){return t?/^-?\d+$/.test(t)?(Gt(t),new ir(Rt,It)):null:sr||=new ir(0,0)}var ir=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let sr;function or(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function ar(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function cr(t,e){if(e>=0)ar(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function hr(t){var e=Rt;t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function ur(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function lr(t,e,n){ar(t.g,8*e+n)}function fr(t,e){return lr(t,e,2),e=t.g.end(),ur(t,e),e.push(t.h),e}function dr(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function pr(t,e,n){lr(t,e,2),ar(t.g,n.length),ur(t,t.g.end()),ur(t,n)}function gr(t,e,n,r){null!=n&&(e=fr(t,e),r(n,t),dr(t,e))}function mr(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var yr=mr(),_r=mr(),vr=mr(),Er=mr(),wr=mr(),Tr=mr(),Ar=mr(),br=mr(),kr=mr(),xr=mr();function Sr(t,e,n){var r=t.v;H&&H in r&&(r=r[H])&&delete r[e.g],e.h?e.j(t,e.h,e.g,n,e.l):e.j(t,e.g,n,e.l)}var Lr=class{constructor(t,e){this.v=Ue(t,e,void 0,2048)}toJSON(){return Oe(this)}j(){var t=So,e=this.v,n=t.g,r=H;if(B&&r&&null!=e[r]?.[n]&&U(W,3),e=t.g,$&&H&&void 0===$&&(r=(n=this.v)[H])&&(r=r.da))try{r(n,e,Le)}catch(t){u(t)}return t.h?t.m(this,t.h,t.g,t.l):t.m(this,t.g,t.defaultValue,t.l)}clone(){const t=this.v,e=0|t[Q];return Ke(this,t,e)?Ge(this,t,!0):new this.constructor(Ve(t,e,!1))}};Lr.prototype[q]=ot,Lr.prototype.toString=function(){return this.v.toString()};var Rr=class{constructor(t,e,n){this.g=t,this.h=e,t=yr,this.l=!!t&&n===t||!1}};function Ir(t,e){return new Rr(t,e,yr)}function Fr(t,e,n,r,i){gr(t,n,Xr(e,r),i)}const Mr=Ir((function(t,e,n,r,i){return 2===t.h&&(Yn(t,gn(e,r,n),i),!0)}),Fr),Pr=Ir((function(t,e,n,r,i){return 2===t.h&&(Yn(t,gn(e,r,n),i),!0)}),Fr);var Cr=Symbol(),Or=Symbol(),Nr=Symbol(),Ur=Symbol(),Dr=Symbol();let Br,Gr;function jr(t,e,n,r){var i=r[t];if(i)return i;(i={}).qa=r,i.T=function(t){switch(typeof t){case"boolean":return Pe||=[0,void 0,!0];case"number":return t>0?void 0:0===t?Ce||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(r[0]);var s=r[1];let o=1;s&&s.constructor===Object&&(i.ba=s,"function"==typeof(s=r[++o])&&(i.ma=!0,Br??=s,Gr??=r[o+1],s=r[o+=2]));const a={};for(;s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var c=0;c<s.length;c++)a[s[c]]=s;s=r[++o]}for(c=1;void 0!==s;){let t;"number"==typeof s&&(c+=s,s=r[++o]);var h=void 0;if(s instanceof Rr?t=s:(t=Mr,o--),t?.l){s=r[++o],h=r;var u=o;"function"==typeof s&&(s=s(),h[u]=s),h=s}for(u=c+1,"number"==typeof(s=r[++o])&&s<0&&(u-=s,s=r[++o]);c<u;c++){const r=a[c];h?n(i,c,t,h,r):e(i,c,t,r)}}return r[t]=i}function Vr(t){return Array.isArray(t)?t[0]instanceof Rr?t:[Pr,t]:[t,void 0]}function Xr(t,e){return t instanceof Lr?t.v:Array.isArray(t)?Ne(t,e):void 0}function Hr(t,e,n,r){const i=n.g;t[e]=r?(t,e,n)=>i(t,e,n,r):i}function Wr(t,e,n,r,i){const s=n.g;let o,a;t[e]=(t,e,n)=>s(t,e,n,a||=jr(Or,Hr,Wr,r).T,o||=zr(r),i)}function zr(t){let e=t[Nr];if(null!=e)return e;const n=jr(Or,Hr,Wr,t);return e=n.ma?(t,e)=>Br(t,e,n):(t,e)=>{for(;zn(e)&&4!=e.h;){var r=e.l,i=n[r];if(null==i){var s=n.ba;s&&(s=s[r])&&(null!=(s=Yr(s))&&(i=n[r]=s))}if(null==i||!i(e,t,r)){if(i=(s=e).m,Kn(s),s.ha)var o=void 0;else o=s.g.g-i,s.g.g=i,o=Vn(s.g,o);i=void 0,s=t,o&&((i=s[H]??(s[H]=new Se))[r]??(i[r]=[])).push(o)}}return(t=ke(t))&&(t.da=n.qa[Dr]),!0},t[Nr]=e,t[Dr]=Kr.bind(t),e}function Kr(t,e,n,r){var i=this[Or];const s=this[Nr],o=Ne(void 0,i.T),a=ke(t);if(a){var c=!1,h=i.ba;if(h){if(i=(e,n,i)=>{if(0!==i.length)if(h[n])for(const t of i){e=Hn(t);try{c=!0,s(o,e)}finally{Wn(e)}}else r?.(t,n,i)},null==e)xe(a,i);else if(null!=a){const t=a[e];t&&i(a,e,t)}if(c){let r=0|t[Q];if(2&r&&2048&r&&!n?.Ka)throw Error();const i=pt(r),s=(e,s)=>{if(null!=Je(t,e,i)){if(1===n?.Qa)return;throw Error()}null!=s&&(r=Qe(t,r,e,s,i)),delete a[e]};null==e?ft(o,0|o[Q],((t,e)=>{s(t,e)})):s(e,Je(o,e,i))}}}}function Yr(t){const e=(t=Vr(t))[0].g;if(t=t[1]){const n=zr(t),r=jr(Or,Hr,Wr,t).T;return(t,i,s)=>e(t,i,s,r,n)}return e}function qr(t,e,n){t[e]=n.h}function $r(t,e,n,r){let i,s;const o=n.h;t[e]=(t,e,n)=>o(t,e,n,s||=jr(Cr,qr,$r,r).T,i||=Jr(r))}function Jr(t){let e=t[Ur];if(!e){const n=jr(Cr,qr,$r,t);e=(t,e)=>Zr(t,e,n),t[Ur]=e}return e}function Zr(t,e,n){ft(t,0|t[Q],((t,r)=>{if(null!=r){var i=function(t,e){var n=t[e];if(n)return n;if((n=t.ba)&&(n=n[e])){var r=(n=Vr(n))[0].h;if(n=n[1]){const e=Jr(n),i=jr(Cr,qr,$r,n).T;n=t.ma?Gr(i,e):(t,n,s)=>r(t,n,s,i,e)}else n=r;return t[e]=n}}(n,t);i?i(e,r,t):t<500||U(K,3)}})),(t=ke(t))&&xe(t,((t,n,r)=>{for(ur(e,e.g.end()),t=0;t<r.length;t++)ur(e,I(r[t])||new Uint8Array(0))}))}const Qr=Et(0);function ti(t,e){if(Array.isArray(e)){var n=0|e[Q];if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),(t=-1537&(5|n))!==n&&rt(e,t),2&t&&Object.freeze(e),e}}function ei(t,e,n){return new Rr(t,e,n)}function ni(t,e,n){return new Rr(t,e,n)}function ri(t,e,n){Qe(t,0|t[Q],e,n,pt(0|t[Q]))}var ii=Ir((function(t,e,n,r,i){if(2!==t.h)return!1;if(t=Vt(t=Yn(t,Ne([void 0,void 0],r),i)),i=pt(r=0|e[Q]),2&r)throw Error();let s=Je(e,n,i);if(s instanceof Ee)0!=(2&s.J)?(s=s.V(),s.push(t),Qe(e,r,n,s,i)):s.Ma(t);else if(Array.isArray(s)){var o=0|s[Q];8192&o||rt(s,o|=8192),2&o&&(s=cn(s),Qe(e,r,n,s,i)),s.push(t)}else Qe(e,r,n,st([t]),i);return!0}),(function(t,e,n,r,i){if(e instanceof Ee)e.forEach(((e,s)=>{gr(t,n,Ne([s,e],r),i)}));else if(Array.isArray(e)){for(let s=0;s<e.length;s++){const o=e[s];Array.isArray(o)&&gr(t,n,Ne(o,r),i)}st(e)}}));function si(t,e,n){null!=(e=$t(e))&&(lr(t,n,5),t=t.g,Pt(e),hr(t))}function oi(t,e,n){if(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(Xt(64,t));if(te(t)){if("string"===e)return se(t);if("number"===e)return ie(t)}}(e),null!=e){if("string"==typeof e)rr(e);if(null!=e)switch(lr(t,n,0),typeof e){case"number":t=t.g,Mt(e),or(t,Rt,It);break;case"bigint":n=BigInt.asUintN(64,e),n=new ir(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),or(t.g,n.h,n.g);break;default:n=rr(e),or(t.g,n.h,n.g)}}}function ai(t,e,n){null!=(e=ee(e))&&null!=e&&(lr(t,n,0),cr(t.g,e))}function ci(t,e,n){null!=(e=Zt(e))&&(lr(t,n,0),t.g.g.push(e?1:0))}function hi(t,e,n){null!=(e=le(e))&&pr(t,n,h(e))}function ui(t,e,n,r,i){gr(t,n,Xr(e,r),i)}function li(t,e,n){null!=(e=null==e||"string"==typeof e||e instanceof F?e:void 0)&&pr(t,n,Pn(e,!0).buffer)}function fi(t,e,n){null!=(e=ne(e))&&null!=e&&(lr(t,n,0),ar(t.g,e))}function di(t,e,n){return(5===t.h||2===t.h)&&(e=un(e,0|e[Q],n),2==t.h?Jn(t,Dn,e):e.push(Dn(t.g)),!0)}var pi=ei((function(t,e,n){return 5===t.h&&(ri(e,n,Dn(t.g)),!0)}),si,br),gi=ni(di,(function(t,e,n){if(null!=(e=ti($t,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(lr(r,i,5),r=r.g,Pt(s),hr(r))}}),br),mi=ni(di,(function(t,e,n){if(null!=(e=ti($t,e))&&e.length){lr(t,n,2),ar(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Pt(e[r]),hr(n)}}),br),yi=ei((function(t,e,n){return 5===t.h&&(ri(e,n,0===(t=Dn(t.g))?void 0:t),!0)}),si,br),_i=ei((function(t,e,n){return 0!==t.h?t=!1:(ri(e,n,Cn(t.g,Nt)),t=!0),t}),oi,Tr),vi=ei((function(t,e,n){return 0!==t.h?e=!1:(ri(e,n,(t=Cn(t.g,Nt))===Qr?void 0:t),e=!0),e}),oi,Tr),Ei=ei((function(t,e,n){return 0!==t.h?t=!1:(ri(e,n,Cn(t.g,Ot)),t=!0),t}),(function(t,e,n){if(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Ht(64,t));if(te(t)){if("string"===e)return e=Kt(Number(t)),Wt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),(e="-"!==t[0]&&((e=t.length)<20||20===e&&t<="18446744073709551615"))||(Gt(t),t=Ut(Rt,It))),t;if("number"===e)return(t=Kt(t))>=0&&Wt(t)||(Mt(t),t=Ct(Rt,It)),t}}(e),null!=e){if("string"==typeof e)tr(e);if(null!=e)switch(lr(t,n,0),typeof e){case"number":t=t.g,Mt(e),or(t,Rt,It);break;case"bigint":n=BigInt.asUintN(64,e),n=new er(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),or(t.g,n.h,n.g);break;default:n=tr(e),or(t.g,n.h,n.g)}}}),Ar),wi=ei((function(t,e,n){return 0===t.h&&(ri(e,n,Nn(t.g)),!0)}),ai,Er),Ti=ni((function(t,e,n){return(0===t.h||2===t.h)&&(e=un(e,0|e[Q],n),2==t.h?Jn(t,Nn,e):e.push(Nn(t.g)),!0)}),(function(t,e,n){if(null!=(e=ti(ee,e))&&e.length){n=fr(t,n);for(let n=0;n<e.length;n++)cr(t.g,e[n]);dr(t,n)}}),Er),Ai=ei((function(t,e,n){return 0===t.h&&(ri(e,n,0===(t=Nn(t.g))?void 0:t),!0)}),ai,Er),bi=ei((function(t,e,n){return 0===t.h&&(ri(e,n,On(t.g)),!0)}),ci,_r),ki=ei((function(t,e,n){return 0===t.h&&(ri(e,n,!1===(t=On(t.g))?void 0:t),!0)}),ci,_r),xi=ni((function(t,e,n){return 2===t.h&&(t=qn(t),un(e,0|e[Q],n).push(t),!0)}),(function(t,e,n){if(null!=(e=ti(le,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&pr(r,i,h(s))}}),vr),Si=ei((function(t,e,n){return 2===t.h&&(ri(e,n,""===(t=qn(t))?void 0:t),!0)}),hi,vr),Li=ei((function(t,e,n){return 2===t.h&&(ri(e,n,qn(t)),!0)}),hi,vr),Ri=function(t,e,n=yr){return new Rr(t,e,n)}((function(t,e,n,r,i){return 2===t.h&&(r=Ne(void 0,r),un(e,0|e[Q],n).push(r),Yn(t,r,i),!0)}),(function(t,e,n,r,i){if(Array.isArray(e)){for(let s=0;s<e.length;s++)ui(t,e[s],n,r,i);1&(t=0|e[Q])||rt(e,1|t)}})),Ii=Ir((function(t,e,n,r,i,s){if(2!==t.h)return!1;let o=0|e[Q];return dn(e,o,s,n,pt(o)),Yn(t,e=gn(e,r,n),i),!0}),ui),Fi=ei((function(t,e,n){return 2===t.h&&(ri(e,n,$n(t)),!0)}),li,kr),Mi=ni((function(t,e,n){return(0===t.h||2===t.h)&&(e=un(e,0|e[Q],n),2==t.h?Jn(t,Un,e):e.push(Un(t.g)),!0)}),(function(t,e,n){if(null!=(e=ti(ne,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(lr(r,i,0),ar(r.g,s))}}),wr),Pi=ei((function(t,e,n){return 0===t.h&&(ri(e,n,0===(t=Un(t.g))?void 0:t),!0)}),fi,wr),Ci=ei((function(t,e,n){return 0===t.h&&(ri(e,n,Nn(t.g)),!0)}),(function(t,e,n){null!=(e=ee(e))&&(e=parseInt(e,10),lr(t,n,0),cr(t.g,e))}),xr);class Oi{constructor(t,e){var n=Qi;this.g=t,this.h=e,this.m=yn,this.j=wn,this.defaultValue=void 0,this.l=null!=n.Oa?dt:void 0}register(){m(this)}}function Ni(t,e){return new Oi(t,e)}function Ui(t,e){return(n,r)=>{{const s={ea:!0};r&&Object.assign(s,r),n=Hn(n,void 0,void 0,s);try{const r=new t,s=r.v;zr(e)(s,n);var i=r}finally{Wn(n)}}return i}}function Di(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};Zr(this.v,e,jr(Cr,qr,$r,t)),ur(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,i=r.length;let s=0;for(let t=0;t<i;t++){const e=r[t];n.set(e,s),s+=e.length}return e.l=[n],n}}var Bi=class extends Lr{constructor(t){super(t)}},Gi=[0,Si,ei((function(t,e,n){return 2===t.h&&(ri(e,n,(t=$n(t))===R()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof Lr){const r=e.Ra;return void(r?(e=r(e),null!=e&&pr(t,n,Pn(e,!0).buffer)):U(K,3))}if(Array.isArray(e))return void U(K,3)}li(t,e,n)}),kr)];let ji,Vi=globalThis.trustedTypes;function Xi(t){var e;return void 0===ji&&(ji=function(){let t=null;if(!Vi)return t;try{const e=t=>t;t=Vi.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}()),t=(e=ji)?e.createScriptURL(t):t,new class{constructor(t){this.g=t}toString(){return this.g+""}}(t)}function Hi(t,...e){if(0===e.length)return Xi(t[0]);let n=t[0];for(let r=0;r<e.length;r++)n+=encodeURIComponent(e[r])+t[r+1];return Xi(n)}var Wi=[0,wi,Ci,bi,-1,Ti,Ci,-1,bi],zi=class extends Lr{constructor(t){super(t)}},Ki=[0,bi,Li,bi,Ci,-1,ni((function(t,e,n){return(0===t.h||2===t.h)&&(e=un(e,0|e[Q],n),2==t.h?Jn(t,Bn,e):e.push(Nn(t.g)),!0)}),(function(t,e,n){if(null!=(e=ti(ee,e))&&e.length){n=fr(t,n);for(let n=0;n<e.length;n++)cr(t.g,e[n]);dr(t,n)}}),xr),Li,-1,[0,bi,-1],Ci,bi,-1],Yi=[0,3,bi,-1,2,[0,[2],wi,Ii,[0,ei((function(t,e,n){return 0===t.h&&(ri(e,n,Un(t.g)),!0)}),fi,wr)]],[0,Ci,bi,Ci,bi,Ci,bi,Li,-1],[0,[3,4],Li,-1,Ii,[0,wi],Ii,[0,Ci]],[0]],qi=[0,Li,-2],$i=class extends Lr{constructor(t){super(t)}},Ji=[0],Zi=[0,wi,bi,1,bi,-4],Qi=class extends Lr{constructor(t){super(t,2)}},ts={};ts[336783863]=[0,Li,bi,-1,wi,[0,[1,2,3,4,5,6,7,8,9],Ii,Ji,Ii,Ki,Ii,qi,Ii,Zi,Ii,Wi,Ii,[0,Li,-2],Ii,[0,Li,Ci],Ii,Yi,Ii,[0,Ci,-1,bi]],[0,Li],bi,[0,[1,3],[2,4],Ii,[0,Ti],-1,Ii,[0,xi],-1,Ri,[0,Li,-1]],Li];var es=[0,vi,-1,ki,-3,vi,Ti,Si,Ai,vi,-1,ki,Ai,ki,-2,Si];function ns(t,e){Fn(t,3,e)}function rs(t,e){Fn(t,4,e)}var is=class extends Lr{constructor(t){super(t,500)}o(t){return wn(this,0,7,t)}},ss=[-1,{}],os=[0,Li,1,ss],as=[0,Li,xi,ss];function cs(t,e){bn(t,1,is,e)}function hs(t,e){Fn(t,10,e)}function us(t,e){Fn(t,15,e)}var ls=class extends Lr{constructor(t){super(t,500)}o(t){return wn(this,0,1001,t)}},fs=[-500,Ri,[-500,Si,-1,xi,-3,[-2,ts,bi],Ri,Gi,Ai,-1,os,as,Ri,[0,Si,ki],Si,es,Ai,xi,987,xi],4,Ri,[-500,Li,-1,[-1,{}],998,Li],Ri,[-500,Li,xi,-1,[-2,{},bi],997,xi,-1],Ai,Ri,[-500,Li,xi,ss,998,xi],xi,Ai,os,as,Ri,[0,Si,-1,ss],xi,-2,es,Si,-1,ki,[0,ki,Pi],978,ss,Ri,Gi];ls.prototype.g=Di(fs);var ds=Ui(ls,fs),ps=class extends Lr{constructor(t){super(t)}},gs=class extends Lr{constructor(t){super(t)}g(){return vn(this,ps,1)}},ms=[0,Ri,[0,wi,pi,Li,-1]],ys=Ui(gs,ms),_s=class extends Lr{constructor(t){super(t)}},vs=class extends Lr{constructor(t){super(t)}},Es=class extends Lr{constructor(t){super(t)}l(){return yn(this,_s,2)}g(){return vn(this,vs,5)}},ws=Ui(class extends Lr{constructor(t){super(t)}},[0,xi,Ti,mi,[0,Ci,[0,wi,-3],[0,pi,-3],[0,wi,-1,[0,Ri,[0,wi,-2]]],Ri,[0,pi,-1,Li,pi]],Li,-1,_i,Ri,[0,wi,pi],xi,_i]),Ts=class extends Lr{constructor(t){super(t)}},As=Ui(class extends Lr{constructor(t){super(t)}},[0,Ri,[0,pi,-4]]),bs=class extends Lr{constructor(t){super(t)}},ks=Ui(class extends Lr{constructor(t){super(t)}},[0,Ri,[0,pi,-4]]),xs=class extends Lr{constructor(t){super(t)}},Ss=[0,wi,-1,mi,Ci],Ls=class extends Lr{constructor(t){super(t)}};Ls.prototype.g=Di([0,pi,-4,_i]);var Rs=class extends Lr{constructor(t){super(t)}},Is=Ui(class extends Lr{constructor(t){super(t)}},[0,Ri,[0,1,wi,Li,ms],_i]),Fs=class extends Lr{constructor(t){super(t)}},Ms=class extends Lr{constructor(t){super(t)}na(){const t=$e(this,1,void 0,void 0,an);return null==t?R():t}},Ps=class extends Lr{constructor(t){super(t)}},Cs=[1,2],Os=Ui(class extends Lr{constructor(t){super(t)}},[0,Ri,[0,Cs,Ii,[0,mi],Ii,[0,Fi],wi,Li],_i]),Ns=class extends Lr{constructor(t){super(t)}},Us=[0,Li,wi,pi,xi,-1],Ds=class extends Lr{constructor(t){super(t)}},Bs=[0,bi,-1],Gs=class extends Lr{constructor(t){super(t)}},js=[1,2,3,4,5,6],Vs=class extends Lr{constructor(t){super(t)}g(){return null!=$e(this,1,void 0,void 0,an)}l(){return null!=le($e(this,2))}},Xs=class extends Lr{constructor(t){super(t)}g(){return Zt($e(this,2))??!1}},Hs=[0,Fi,Li,[0,wi,_i,-1],[0,Ei,_i]],Ws=[0,Hs,bi,[0,js,Ii,Zi,Ii,Ki,Ii,Wi,Ii,Ji,Ii,qi,Ii,Yi],Ci],zs=class extends Lr{constructor(t){super(t)}},Ks=[0,Ws,pi,-1,wi],Ys=Ni(502141897,zs);ts[502141897]=Ks;var qs=Ui(class extends Lr{constructor(t){super(t)}},[0,[0,Ci,-1,gi,Mi],Ss]),$s=class extends Lr{constructor(t){super(t)}},Js=class extends Lr{constructor(t){super(t)}},Zs=[0,Ws,pi,[0,Ws],bi],Qs=Ni(508968150,Js);ts[508968150]=[0,Ws,Ks,Zs,pi,[0,[0,Hs]]],ts[508968149]=Zs;var to=class extends Lr{constructor(t){super(t)}l(){return yn(this,Ns,2)}g(){Ze(this,2)}},eo=[0,Ws,Us];ts[478825465]=eo;var no=class extends Lr{constructor(t){super(t)}},ro=class extends Lr{constructor(t){super(t)}},io=class extends Lr{constructor(t){super(t)}},so=class extends Lr{constructor(t){super(t)}},oo=class extends Lr{constructor(t){super(t)}},ao=[0,Ws,[0,Ws],eo,-1],co=[0,Ws,pi,wi],ho=[0,Ws,pi],uo=[0,Ws,co,ho,pi],lo=Ni(479097054,oo);ts[479097054]=[0,Ws,uo,ao],ts[463370452]=ao,ts[464864288]=co;var fo=Ni(462713202,so);ts[462713202]=uo,ts[474472470]=ho;var po=class extends Lr{constructor(t){super(t)}},go=class extends Lr{constructor(t){super(t)}},mo=class extends Lr{constructor(t){super(t)}},yo=class extends Lr{constructor(t){super(t)}},_o=[0,Ws,pi,-1,wi],vo=[0,Ws,pi,bi];yo.prototype.g=Di([0,Ws,ho,[0,Ws],Ks,Zs,_o,vo]);var Eo=class extends Lr{constructor(t){super(t)}},wo=Ni(456383383,Eo);ts[456383383]=[0,Ws,Us];var To=class extends Lr{constructor(t){super(t)}},Ao=Ni(476348187,To);ts[476348187]=[0,Ws,Bs];var bo=class extends Lr{constructor(t){super(t)}},ko=class extends Lr{constructor(t){super(t)}},xo=[0,Ci,-1],So=Ni(458105876,class extends Lr{constructor(t){super(t)}g(){let t;var e=this.v;const n=0|e[Q];return t=at(this,n),e=function(t,e,n,r){var i=ko;!r&&He(t)&&(n=0|(e=t.v)[Q]);var s=Je(e,2);if(t=!1,null==s){if(r)return be();s=[]}else if(s.constructor===Ee){if(!(2&s.J)||r)return s;s=s.V()}else Array.isArray(s)?t=!!(2&(0|s[Q])):s=[];if(r){if(!s.length)return be();t||(t=!0,it(s))}else t&&(t=!1,st(s),s=cn(s));return!t&&32&n&&nt(s,32),n=Qe(e,n,2,r=new Ee(s,i,de,void 0)),t||ze(e,n),r}(this,e,n,t),!t&&ko&&(e.ra=!0),e}});ts[458105876]=[0,xo,ii,[!0,_i,[0,Li,-1,xi]],[0,Ti,bi,Ci]];var Lo=class extends Lr{constructor(t){super(t)}},Ro=Ni(458105758,Lo);ts[458105758]=[0,Ws,Li,xo];var Io=class extends Lr{constructor(t){super(t)}},Fo=[0,yi,-1,ki],Mo=class extends Lr{constructor(t){super(t)}},Po=class extends Lr{constructor(t){super(t)}},Co=[1,2];Po.prototype.g=Di([0,Co,Ii,Fo,Ii,[0,Ri,Fo]]);var Oo=class extends Lr{constructor(t){super(t)}},No=Ni(443442058,Oo);ts[443442058]=[0,Ws,Li,wi,pi,xi,-1,bi,pi],ts[514774813]=_o;var Uo=class extends Lr{constructor(t){super(t)}},Do=Ni(516587230,Uo);function Bo(t,e){return e=e?e.clone():new Ns,void 0!==t.displayNamesLocale?Ze(e,1,ue(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ze(e,1),void 0!==t.maxResults?Sn(e,2,t.maxResults):"maxResults"in t&&Ze(e,2),void 0!==t.scoreThreshold?Ln(e,3,t.scoreThreshold):"scoreThreshold"in t&&Ze(e,3),void 0!==t.categoryAllowlist?In(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ze(e,4),void 0!==t.categoryDenylist?In(e,5,t.categoryDenylist):"categoryDenylist"in t&&Ze(e,5),e}function Go(t){const e=Number(t);return Number.isSafeInteger(e)?e:String(t)}function jo(t,e=-1,n=""){return{categories:t.map((t=>({index:kn(t,1)??0??-1,score:xn(t,2)??0,categoryName:le($e(t,3))??""??"",displayName:le($e(t,4))??""??""}))),headIndex:e,headName:n}}function Vo(t){const e={classifications:vn(t,Rs,1).map((t=>jo(yn(t,gs,4)?.g()??[],kn(t,2)??0,le($e(t,3))??"")))};return null!=function(t){return null==t?t:"bigint"==typeof t?(wt(t)?t=Number(t):(t=Xt(64,t),t=wt(t)?Number(t):String(t)),t):te(t)?"number"==typeof t?ie(t):se(t):void 0}($e(t,2,void 0,void 0,ce))&&(e.timestampMs=Go($e(t,2,void 0,void 0,ce)??Ye)),e}function Xo(t){var e=en(t,3,$t,tn()),n=en(t,2,ee,tn()),r=en(t,1,le,tn()),i=en(t,9,le,tn());const s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:i[t]??""});if((e=yn(t,Es,4)?.l())&&(s.boundingBox={originX:kn(e,1,qe)??0,originY:kn(e,2,qe)??0,width:kn(e,3,qe)??0,height:kn(e,4,qe)??0,angle:0}),yn(t,Es,4)?.g().length)for(const e of yn(t,Es,4).g())s.keypoints.push({x:$e(e,1,void 0,qe,$t)??0,y:$e(e,2,void 0,qe,$t)??0,score:$e(e,4,void 0,qe,$t)??0,label:le($e(e,3,void 0,qe))??""});return s}function Ho(t){const e=[];for(const n of vn(t,bs,1))e.push({x:xn(n,1)??0,y:xn(n,2)??0,z:xn(n,3)??0,visibility:xn(n,4)??0});return e}function Wo(t){const e=[];for(const n of vn(t,Ts,1))e.push({x:xn(n,1)??0,y:xn(n,2)??0,z:xn(n,3)??0,visibility:xn(n,4)??0});return e}function zo(t){return Array.from(t,(t=>t>127?t-256:t))}function Ko(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s],r+=t[s]*t[s],i+=e[s]*e[s];if(r<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let Yo;ts[516587230]=[0,Ws,_o,vo,pi],ts[518928384]=vo;const qo=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function $o(t){if(t)return!0;if(void 0===Yo)try{await WebAssembly.instantiate(qo),Yo=!0}catch{Yo=!1}return Yo}async function Jo(t,e,n){return{wasmLoaderPath:`${e}/${t}_${n=`wasm${n?"_module":""}${await $o(n)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Zo=class{};function Qo(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function ta(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;await self.import(t.toString())}}function ea(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function na(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function ra(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[r,i]=ea(e);return!t.l||r===t.i.canvas.width&&i===t.i.canvas.height||(t.i.canvas.width=r,t.i.canvas.height=i),[r,i]}function ia(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function sa(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function oa(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}Zo.forVisionTasks=function(t,e=!1){return Jo("vision",t??Hi``,e)},Zo.forTextTasks=function(t,e=!1){return Jo("text",t??Hi``,e)},Zo.forGenAiTasks=function(t,e=!1){return Jo("genai",t??Hi``,e)},Zo.forAudioTasks=function(t,e=!1){return Jo("audio",t??Hi``,e)},Zo.isSimdSupported=function(t=!1){return $o(t)};async function aa(t,e,n,r){return t=await(async(t,e,n,r,i)=>{if(e&&await ta(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await ta(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,r)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&t.endsWith(".data")?n.assetBinaryPath.toString():t}),await t.o(r),t}function ca(t,e){const n=yn(t.baseOptions,Vs,1)||new Vs;"string"==typeof e?(Ze(n,2,ue(e)),Ze(n,1)):e instanceof Uint8Array&&(Ze(n,1,ht(e,!1)),Ze(n,2)),wn(t.baseOptions,0,1,n)}function ha(t){try{const e=t.H.length;if(1===e)throw Error(t.H[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.H.map((t=>t.message)).join(", "))}finally{t.H=[]}}function ua(t,e){t.C=Math.max(t.C,e)}function la(t,e){t.B=new is,Rn(t.B,2,"PassThroughCalculator"),ns(t.B,"free_memory"),rs(t.B,"free_memory_unused_out"),hs(e,"free_memory"),cs(e,t.B)}function fa(t,e){ns(t.B,e),rs(t.B,e+"_unused_out")}function da(t){t.g.addBoolToStream(!0,"free_memory",t.C)}var pa=class{constructor(t){this.g=t,this.H=[],this.C=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(yn(this.baseOptions,Vs,1)?.g()||yn(this.baseOptions,Vs,1)?.l()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=yn(t.baseOptions,Gs,3);if(!n){var r=n=new Gs,i=new $i;Tn(r,4,js,i)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new zi,Tn(e,2,js,r)):(e=n,r=new $i,Tn(e,4,js,r))),wn(t.baseOptions,0,3,n)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)})).then((t=>{try{this.g.i.FS_unlink("/model.dat")}catch{