PageSourceSearch

https://ds.zopi.io/assets/js/module-Dz8i_Leu.js

js zopi.io collected 2026-09-24 09:52:40 UTC 128,824 bytes, 15 lines download raw bytes

1var de=typeof self<"u"?self:{};function $t(){throw Error("Invalid UTF8")}function ks(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}let $e,jn;const Ma=typeof TextDecoder<"u";let Pa;const xa=typeof TextEncoder<"u";function Ii(t){if(xa)t=(Pa||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let s=0;s<t.length;s++){var e=t.charCodeAt(s);if(e<128)r[n++]=e;else{if(e<2048)r[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&s<t.length){const i=t.charCodeAt(++s);if(i>=56320&&i<=57343){e=1024*(e-55296)+i-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}s--}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}var Ar,on;t:{for(var Ts=["CLOSURE_FLAGS"],Hn=de,Wn=0;Wn<Ts.length;Wn++)if((Hn=Hn[Ts[Wn]])==null){on=null;break t}on=Hn}var Ge,Ss=on&&on[610401301];Ar=Ss!=null&&Ss;const Ls=de.navigator;function er(t){return!!Ar&&!!Ge&&Ge.brands.some(({brand:e})=>e&&e.indexOf(t)!=-1)}function lt(t){var e;return(e=de.navigator)&&(e=e.userAgent)||(e=""),e.indexOf(t)!=-1}function Bt(){return!!Ar&&!!Ge&&Ge.brands.length>0}function zn(){return Bt()?er("Chromium"):(lt("Chrome")||lt("CriOS"))&&!(!Bt()&&lt("Edge"))||lt("Silk")}function fn(t){return fn[" "](t),t}Ge=Ls&&Ls.userAgentData||null,fn[" "]=function(){};var Oa=!Bt()&&(lt("Trident")||lt("MSIE"));!lt("Android")||zn(),zn(),lt("Safari")&&(zn()||!Bt()&&lt("Coast")||!Bt()&&lt("Opera")||!Bt()&&lt("Edge")||(Bt()?er("Microsoft Edge"):lt("Edg/"))||Bt()&&er("Opera"));var Ri={},Ce=null;function Ia(t){const e=t.length;let n=3*e/4;n%3?n=Math.floor(n):"=.".indexOf(t[e-1])!=-1&&(n="=.".indexOf(t[e-2])!=-1?n-2:n-1);const r=new Uint8Array(n);let s=0;return function(i,o){function a(h){for(;c<i.length;){const m=i.charAt(c++),w=Ce[m];if(w!=null)return w;if(!/^[\s\xa0]*$/.test(m))throw Error("Unknown base64 encoding at char: "+m)}return h}Ci();let c=0;for(;;){const h=a(-1),m=a(0),w=a(64),W=a(64);if(W===64&&h===-1)break;o(h<<2|m>>4),w!=64&&(o(m<<4&240|w>>2),W!=64&&o(w<<6&192|W))}}(t,function(i){r[s++]=i}),s!==n?r.subarray(0,s):r}function Ci(){if(!Ce){Ce={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const r=t.concat(e[n].split(""));Ri[n]=r;for(let s=0;s<r.length;s++){const i=r[s];Ce[i]===void 0&&(Ce[i]=s)}}}}var Ni=typeof Uint8Array<"u",Bi=!Oa&&typeof btoa=="function";function Fs(t){if(!Bi){var e;e===void 0&&(e=0),Ci(),e=Ri[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let c=0,h=0;for(;c<t.length-2;c+=3){var s=t[c],i=t[c+1],o=t[c+2],a=e[s>>2];s=e[(3&s)<<4|i>>4],i=e[(15&i)<<2|o>>6],o=e[63&o],n[h++]=a+s+i+o}switch(a=0,o=r,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||r;case 1:t=t[c],n[h]=e[t>>2]+e[(3&t)<<4|a>>4]+o+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const Ms=/[-_.]/g,Ra={"-":"+",_:"/",".":"="};function Ca(t){return Ra[t]||""}function Di(t){if(!Bi)return Ia(t);Ms.test(t)&&(t=t.replace(Ms,Ca)),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 Qt(t){return Ni&&t!=null&&t instanceof Uint8Array}var pe={};function te(){return Na||=new Pt(null,pe)}function Er(t){Ui(pe);var e=t.g;return(e=e==null||Qt(e)?e:typeof e=="string"?Di(e):null)==null?e:t.g=e}var Pt=class{h(){return new Uint8Array(Er(this)||0)}constructor(t,e){if(Ui(e),this.g=t,t!=null&&t.length===0)throw Error("ByteString should be constructed with non-empty values")}};let Na,Ba;function Ui(t){if(t!==pe)throw Error("illegal external caller")}function Gi(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function nr(t){return Gi(t=Error(t),"warning"),t}function kr(t){if(t!=null){var e=Ba??={},n=e[t]||0;n>=5||(e[t]=n+1,Gi(t=Error(),"incident"),function(r){de.setTimeout(()=>{throw r},0)}(t))}}var dn=typeof Symbol=="function"&&typeof Symbol()=="symbol";function ke(t,e,n=!1){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?n&&Symbol.for&&t?Symbol.for(t):t!=null?Symbol(t):Symbol():e}var Da=ke("jas",void 0,!0),Ps=ke(void 0,"0di"),Ie=ke(void 0,"1oa"),ge=ke(void 0,Symbol()),Ua=ke(void 0,"0actk"),Vi=ke(void 0,"8utk");const p=dn?Da:"Ea",ji={Ea:{value:0,configurable:!0,writable:!0,enumerable:!1}},Hi=Object.defineProperties;function pn(t,e){dn||p in t||Hi(t,ji),t[p]|=e}function B(t,e){dn||p in t||Hi(t,ji),t[p]=e}function Te(t){return pn(t,34),t}function Ga(t,e){B(e,-15615&(0|t))}function rr(t,e){B(e,-15581&(34|t))}function gn(){return typeof BigInt=="function"}function $(t){return Array.prototype.slice.call(t)}var Tr,Ke={};function mn(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&t.constructor===Object}function Sr(t,e){if(t!=null){if(typeof t=="string")t=t?new Pt(t,pe):te();else if(t.constructor!==Pt)if(Qt(t))t=t.length?new Pt(new Uint8Array(t),pe):te();else{if(!e)throw Error();t=void 0}}return t}const xs=[];function zt(t){if(2&t)throw Error()}B(xs,55),Tr=Object.freeze(xs);class Os{constructor(e,n,r){this.g=e,this.h=n,this.l=r}next(){const e=this.g.next();return e.done||(e.value=this.h.call(this.l,e.value)),e}[Symbol.iterator](){return this}}function Lr(t){return ge?t[ge]:void 0}var Va=Object.freeze({});function yn(t){return t.Na=!0,t}var ja=yn(t=>typeof t=="number"),Is=yn(t=>typeof t=="string"),Ha=yn(t=>typeof t=="boolean"),_n=typeof de.BigInt=="function"&&typeof de.BigInt(0)=="bigint";function Ut(t){var e=t;if(Is(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(ja(e)&&!Number.isSafeInteger(e))throw Error(String(e));return _n?BigInt(t):t=Ha(t)?t?"1":"0":Is(t)?t.trim()||"0":String(t)}var sr=yn(t=>_n?t>=za&&t<=Xa:t[0]==="-"?Rs(t,Wa):Rs(t,Ka));const Wa=Number.MIN_SAFE_INTEGER.toString(),za=_n?BigInt(Number.MIN_SAFE_INTEGER):void 0,Ka=Number.MAX_SAFE_INTEGER.toString(),Xa=_n?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Rs(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],s=e[n];if(r>s)return!1;if(r<s)return!0}}const Ya=typeof Uint8Array.prototype.slice=="function";let Wi,k=0,I=0;function Cs(t){const e=t>>>0;k=e,I=(t-e)/4294967296>>>0}function ee(t){if(t<0){Cs(-t);const[e,n]=xr(k,I);k=e>>>0,I=n>>>0}else Cs(t)}
1function Fr(t){const e=Wi||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),I=0,k=e.getUint32(0,!0)}function Mr(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:Ve(t,e)}function Pr(t,e){const n=2147483648&e;return n&&(e=~e>>>0,(t=1+~t>>>0)==0&&(e=e+1>>>0)),typeof(t=Mr(t,e))=="number"?n?-t:t:n?"-"+t:t}function Ve(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else gn()?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+Ns(n)+Ns(t));return n}function Ns(t){return t=String(t),"0000000".slice(t.length)+t}function zi(){var t=k,e=I;if(2147483648&e)if(gn())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=xr(t,e);t="-"+Ve(n,r)}else t=Ve(t,e);return t}function vn(t){if(t.length<16)ee(Number(t));else if(gn())t=BigInt(t),k=Number(t&BigInt(4294967295))>>>0,I=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+(t[0]==="-");I=k=0;const n=t.length;for(let r=e,s=(n-e)%6+e;s<=n;r=s,s+=6){const i=Number(t.slice(r,s));I*=1e6,k=1e6*k+i,k>=4294967296&&(I+=Math.trunc(k/4294967296),I>>>=0,k>>>=0)}if(e){const[r,s]=xr(k,I);k=r,I=s}}}function xr(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}const je=typeof BigInt=="function"?BigInt.asIntN:void 0,$a=typeof BigInt=="function"?BigInt.asUintN:void 0,Gt=Number.isSafeInteger,wn=Number.isFinite,me=Math.trunc,qa=Ut(0);function Kt(t){return t==null||typeof t=="number"?t:t==="NaN"||t==="Infinity"||t==="-Infinity"?Number(t):void 0}function Ki(t){return t==null||typeof t=="boolean"?t:typeof t=="number"?!!t:void 0}const Ja=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function He(t){switch(typeof t){case"bigint":return!0;case"number":return wn(t);case"string":return Ja.test(t);default:return!1}}function Se(t){if(t==null)return t;if(typeof t=="string"&&t)t=+t;else if(typeof t!="number")return;return wn(t)?0|t:void 0}function Xi(t){if(t==null)return t;if(typeof t=="string"&&t)t=+t;else if(typeof t!="number")return;return wn(t)?t>>>0:void 0}function Bs(t){if(t[0]==="-")return!1;const e=t.length;return e<20||e===20&&Number(t.substring(0,6))<184467}function Yi(t){const e=t.length;return t[0]==="-"?e<20||e===20&&Number(t.substring(0,7))>-922337:e<19||e===19&&Number(t.substring(0,6))<922337}function $i(t){return Yi(t)?t:(vn(t),zi())}function Or(t){return t=me(t),Gt(t)||(ee(t),t=Pr(k,I)),t}function qi(t){var e=me(Number(t));return Gt(e)?String(e):((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),$i(t))}function Ds(t){var e=me(Number(t));return Gt(e)?Ut(e):((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),gn()?Ut(je(64,BigInt(t))):Ut($i(t)))}function Us(t){if(Gt(t))t=Ut(Or(t));else{if(t=me(t),Gt(t))t=String(t);else{const e=String(t);Yi(e)?t=e:(ee(t),t=zi())}t=Ut(t)}return t}function ir(t){return t==null?t:typeof t=="bigint"?(sr(t)?t=Number(t):(t=je(64,t),t=sr(t)?Number(t):String(t)),t):He(t)?typeof t=="number"?Or(t):qi(t):void 0}function Za(t){if(t==null)return t;var e=typeof t;if(e==="bigint")return String($a(64,t));if(He(t)){if(e==="string")return e=me(Number(t)),Gt(e)&&e>=0?t=String(e):((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),Bs(t)||(vn(t),t=Ve(k,I))),t;if(e==="number")return(t=me(t))>=0&&Gt(t)?t:function(n){if(n<0){ee(n);var r=Ve(k,I);return n=Number(r),Gt(n)?n:r}return Bs(r=String(n))?r:(ee(n),Mr(k,I))}(t)}}function Ji(t){if(typeof t!="string")throw Error();return t}function Le(t){if(t!=null&&typeof t!="string")throw Error();return t}function ye(t){return t==null||typeof t=="string"?t:void 0}function Ir(t,e,n,r){if(t!=null&&typeof t=="object"&&t.W===Ke)return t;if(!Array.isArray(t))return n?2&r?((t=e[Ps])||(Te((t=new e).u),t=e[Ps]=t),e=t):e=new e:e=void 0,e;let s=n=0|t[p];return s===0&&(s|=32&r),s|=2&r,s!==n&&B(t,s),new e(t)}function Qa(t,e,n){if(e)t:{if(!He(e=t))throw nr("int64");switch(typeof e){case"string":e=Ds(e);break t;case"bigint":e=Ut(je(64,e));break t;default:e=Us(e)}}else t=typeof(e=t),e=e==null?e:t==="bigint"?Ut(je(64,e)):He(e)?t==="string"?Ds(e):Us(e):void 0;return(t=e)==null?n?qa:void 0:t}function t2(t){return t}const e2={};let n2=function(){try{return fn(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class Kn{constructor(){this.g=new Map}get(e){return this.g.get(e)}set(e,n){return this.g.set(e,n),this.size=this.g.size,this}delete(e){return e=this.g.delete(e),this.size=this.g.size,e}clear(){this.g.clear(),this.size=this.g.size}has(e){return this.g.has(e)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(e,n){return this.g.forEach(e,n)}[Symbol.iterator](){return this.entries()}}const r2=n2?(Object.setPrototypeOf(Kn.prototype,Map.prototype),Object.defineProperties(Kn.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),Kn):class extends Map{constructor(){super()}};function Gs(t){return t}function Xn(t){if(2&t.M)throw Error("Cannot mutate an immutable Map")}var kt=class extends r2{constructor(t,e,n=Gs,r=Gs){super();let s=0|t[p];s|=64,B(t,s),this.M=s,this.I=e,this.S=n,this.X=this.I?s2:r;for(let i=0;i<t.length;i++){const o=t[i],a=n(o[0],!1,!0);let c=o[1];e?c===void 0&&(c=null):c=r(o[1],!1,!0,void 0,void 0,s),super.set(a,c)}}La(){var t=h2;if(this.size!==0)return Array.from(super.entries(),e=>(e[0]=t(e[0]),e[1]=t(e[1]),e))}da(t=i2){const e=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=t(r[0]),r[1]=t(r[1]),e.push(r);return e}clear(){Xn(this),super.clear()}delete(t){return Xn(this),super.delete(this.S(t,!0,!1))}entries(){if(this.I){var t=super.keys();t=new Os(t,o2,this)}else t=super.entries();return t}values(){if(this.I){var t=super.keys();t=new Os(t,kt.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.I?super.forEach((n,r,s)=>{t.call(e,s.get(r),r,s)}):super.forEach(t,e)}set(t,e){return Xn(this),(t=this.S(t,!0,!1))==null?this:e==null?(super.delete(t),this):super.set(t,this.X(e,!0,!0,this.I,!1,this.M))}Ja(t){const e=this.S(t[0],!1,!0);
1t=t[1],t=this.I?t===void 0?null:t:this.X(t,!1,!0,void 0,!1,this.M),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(e!==void 0){var n=this.I;return n?((n=this.X(e,!1,!0,n,this.pa,this.M))!==e&&super.set(t,n),n):e}}[Symbol.iterator](){return this.entries()}};function s2(t,e,n,r,s,i){return t=Ir(t,r,n,i),s&&(t=En(t)),t}function i2(t){return t}function o2(t){return[t,this.get(t)]}let a2,Zi,Qi,c2;function Vs(){return a2||=new kt(Te([]),void 0,void 0,void 0,e2)}function or(t,e,n,r,s){if(t!=null){if(Array.isArray(t)){const i=0|t[p];return t.length===0&&1&i?void 0:s&&2&i?t:bn(t,e,n,r!==void 0,s)}return e(t,r)}}function bn(t,e,n,r,s){const i=r||n?0|t[p]:0,o=r?!!(32&i):void 0;let a=0;const c=(r=$(t)).length;for(let at=0;at<c;at++){var h=r[at];if(at===c-1&&mn(h)){var m=e,w=n,W=o,re=s;let Yt;for(let se in h){const ie=or(h[se],m,w,W,re);ie!=null&&((Yt??={})[se]=ie)}h=Yt}else h=or(r[at],e,n,o,s);r[at]=h,h!=null&&(a=at+1)}return a<c&&(r.length=a),n&&((t=Lr(t))&&(r[ge]=$(t)),n(i,r)),r}function h2(t){return or(t,Rr,void 0,void 0,!1)}function Rr(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return sr(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Qt(t))return Qt(t)&&kr(Vi),Fs(t);if(t.W===Ke)return to(t);if(t instanceof Pt){const e=t.g;return e==null?"":typeof e=="string"?e:t.g=Fs(e)}return t instanceof kt?t.La():void 0}return t}function to(t){var e=t.u;t=bn(e,Rr,void 0,void 0,!1);var n=0|e[p];if((e=t.length)&&!(512&n)){var r=t[e-1],s=!1;mn(r)?(e--,s=!0):r=void 0;var i=e-(n=512&n?0:-1),o=(Zi??t2)(i,n,t,r);if(r&&(t[e]=void 0),i<o&&r){for(var a in i=!0,r){const c=+a;c<=o?(t[s=c+n]=r[a],e=Math.max(s+1,e),s=!1,delete r[a]):i=!1}i&&(r=void 0)}for(i=e-1;e>0;i=e-1)if((a=t[i])==null)e--,s=!0;else{if(!((i-=n)>=o))break;(r??={})[i]=a,e--,s=!0}s&&(t.length=e),r&&t.push(r)}return t}function Vt(t,e,n){return t=eo(t,e[0],e[1],n?1:2),e!==Qi&&n&&pn(t,8192),t}function eo(t,e,n,r){if(t==null){var s=96;n?(t=[n],s|=512):t=[],e&&(s=-16760833&s|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(8192&(s=0|t[p])||!(64&s)||2&s||kr(Ua),1024&s)throw Error("farr");if(64&s)return t;if(r===1||r===2||(s|=64),n&&(s|=512,n!==t[0]))throw Error("mid");t:{var i=(n=t).length;if(i){var o=i-1;if(mn(r=n[o])){if((o-=e=512&(s|=256)?0:-1)>=1024)throw Error("pvtlmt");for(var a in r)(i=+a)<o&&(n[i+e]=r[a],delete r[a]);s=-16760833&s|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,i-(512&s?0:-1)))>1024)throw Error("spvt");s=-16760833&s|(1023&a)<<14}}}return B(t,s),t}function ar(t,e,n=rr){if(t!=null){if(Ni&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=0|t[p];return 2&r?t:(e&&=r===0||!!(32&r)&&!(64&r||!(16&r)),e?(B(t,34|r),4&r&&Object.freeze(t),t):bn(t,ar,4&r?rr:n,!0,!0))}return t.W===Ke?t=2&(r=0|(n=t.u)[p])?t:new t.constructor(An(n,r,!0)):t instanceof kt&&!(2&t.M)&&(n=Te(t.da(ar)),t=new kt(n,t.I,t.S,t.X)),t}}function An(t,e,n){const r=n||2&e?rr:Ga,s=!!(32&e);return t=function(i,o,a){const c=$(i);var h=c.length;const m=256&o?c[h-1]:void 0;for(h+=m?-1:0,o=512&o?1:0;o<h;o++)c[o]=a(c[o]);if(m){o=c[o]={};for(const w in m)o[w]=a(m[w])}return(i=Lr(i))&&(c[ge]=$(i)),c}(t,e,i=>ar(i,s,r)),pn(t,32|(n?2:0)),t}function En(t){const e=t.u,n=0|e[p];return 2&n?new t.constructor(An(e,n,!1)):t}function _e(t,e){return Ct(t=t.u,0|t[p],e)}function Ct(t,e,n){if(n===-1)return null;const r=n+(512&e?0:-1),s=t.length-1;return r>=s&&256&e?t[s][n]:r<=s?t[r]:void 0}function T(t,e,n){const r=t.u;let s=0|r[p];return zt(s),x(r,s,e,n),t}function x(t,e,n,r){const s=512&e?0:-1,i=n+s;var o=t.length-1;return i>=o&&256&e?(t[o][n]=r,e):i<=o?(t[i]=r,e):(r!==void 0&&(n>=(o=e>>14&1023||536870912)?r!=null&&(t[o+s]={[n]:r},B(t,e|=256)):t[i]=r),e)}function tn(t,e){let n=0|(t=t.u)[p];const r=Ct(t,n,e),s=Kt(r);return s!=null&&s!==r&&x(t,n,e,s),s}function no(t){let e=0|(t=t.u)[p];const n=Ct(t,e,1),r=Sr(n,!0);return r!=null&&r!==n&&x(t,e,1,r),r}function qt(){return Va===void 0?2:4}function Jt(t,e,n,r,s){const i=t.u,o=2&(t=0|i[p])?1:r;s=!!s;let a=0|(r=Cr(i,t,e))[p];if(!(4&a)){4&a&&(r=$(r),a=xt(a,t),t=x(i,t,e,r));let c=0,h=0;for(;c<r.length;c++){const m=n(r[c]);m!=null&&(r[h++]=m)}
1h<c&&(r.length=h),a=Nr(a,t),n=-2049&(20|a),a=n&=-4097,B(r,a),2&a&&Object.freeze(r)}return o===1||o===4&&32&a?Mt(a)||(s=a,a|=2,a!==s&&B(r,a),Object.freeze(r)):(o===2&&Mt(a)&&(r=$(r),a=xt(a,t),a=jt(a,t,s),B(r,a),t=x(i,t,e,r)),Mt(a)||(e=a,a=jt(a,t,s),a!==e&&B(r,a))),r}function Cr(t,e,n){return t=Ct(t,e,n),Array.isArray(t)?t:Tr}function Nr(t,e){return t===0&&(t=xt(t,e)),1|t}function Mt(t){return!!(2&t)&&!!(4&t)||!!(1024&t)}function ro(t){t=$(t);for(let e=0;e<t.length;e++){const n=t[e]=$(t[e]);Array.isArray(n[1])&&(n[1]=Te(n[1]))}return t}function cr(t,e,n,r){let s=0|(t=t.u)[p];zt(s),x(t,s,e,(r==="0"?Number(n)===0:n===r)?void 0:n)}function Fe(t,e,n,r){zt(e);let s=Cr(t,e,n);const i=s!==Tr;if(64&e||!(8192&e)||!i){const o=i?0|s[p]:0;let a=o;(!i||2&a||Mt(a)||4&a&&!(32&a))&&(s=$(s),a=xt(a,e),e=x(t,e,n,s)),a=-13&Nr(a,e),a=jt(r?-17&a:16|a,e,!0),a!==o&&B(s,a)}return s}function Yn(t,e){var n=Ko;return Dr(Br(t=t.u),t,0|t[p],n)===e?e:-1}function Br(t){if(dn)return t[Ie]??(t[Ie]=new Map);if(Ie in t)return t[Ie];const e=new Map;return Object.defineProperty(t,Ie,{value:e}),e}function so(t,e,n,r){const s=Br(t),i=Dr(s,t,e,n);return i!==r&&(i&&(e=x(t,e,i)),s.set(n,r)),e}function Dr(t,e,n,r){let s=t.get(r);if(s!=null)return s;s=0;for(let i=0;i<r.length;i++){const o=r[i];Ct(e,n,o)!=null&&(s!==0&&(n=x(e,n,s)),s=o)}return t.set(r,s),s}function Ur(t,e,n){let r=0|t[p];const s=Ct(t,r,n);let i;if(s!=null&&s.W===Ke)return(e=En(s))!==s&&x(t,r,n,e),e.u;if(Array.isArray(s)){const o=0|s[p];i=2&o?Vt(An(s,o,!1),e,!0):64&o?s:Vt(i,e,!0)}else i=Vt(void 0,e,!0);return i!==s&&x(t,r,n,i),i}function io(t,e,n){let r=0|(t=t.u)[p];const s=Ct(t,r,n);return(e=Ir(s,e,!1,r))!==s&&e!=null&&x(t,r,n,e),e}function v(t,e,n){if((e=io(t,e,n))==null)return e;let r=0|(t=t.u)[p];if(!(2&r)){const s=En(e);s!==e&&x(t,r,n,e=s)}return e}function oo(t,e,n,r,s,i,o){t=t.u;var a=!!(2&e);const c=a?1:s;i=!!i,o&&=!a;var h=0|(s=Cr(t,e,r))[p];if(!(a=!!(4&h))){var m=s,w=e;const W=!!(2&(h=Nr(h,e)));W&&(w|=2);let re=!W,at=!0,Yt=0,se=0;for(;Yt<m.length;Yt++){const ie=Ir(m[Yt],n,!1,w);if(ie instanceof n){if(!W){const Es=!!(2&(0|ie.u[p]));re&&=!Es,at&&=Es}m[se++]=ie}}se<Yt&&(m.length=se),h|=4,h=at?16|h:-17&h,B(m,h=re?8|h:-9&h),W&&Object.freeze(m)}if(o&&!(8&h||!s.length&&(c===1||c===4&&32&h))){for(Mt(h)&&(s=$(s),h=xt(h,e),e=x(t,e,r,s)),n=s,o=h,m=0;m<n.length;m++)(h=n[m])!==(w=En(h))&&(n[m]=w);o|=8,B(n,o=n.length?-17&o:16|o),h=o}return c===1||c===4&&32&h?Mt(h)||(e=h,(h|=!s.length||16&h&&(!a||32&h)?2:1024)!==e&&B(s,h),Object.freeze(s)):(c===2&&Mt(h)&&(B(s=$(s),h=jt(h=xt(h,e),e,i)),e=x(t,e,r,s)),Mt(h)||(r=h,(h=jt(h,e,i))!==r&&B(s,h))),s}function It(t,e,n){const r=0|t.u[p];return oo(t,r,e,n,qt(),!1,!(2&r))}function g(t,e,n,r){return r==null&&(r=void 0),T(t,n,r)}function Be(t,e,n,r){r==null&&(r=void 0);t:{let s=0|(t=t.u)[p];if(zt(s),r==null){const i=Br(t);if(Dr(i,t,s,n)!==e)break t;i.set(n,0)}else s=so(t,s,n,e);x(t,s,e,r)}}function xt(t,e){return-1025&(t=32|(2&e?2|t:-3&t))}function jt(t,e,n){return 32&e&&n||(t&=-33),t}function kn(t,e,n){zt(0|t.u[p]),Jt(t,e,ye,2,!0).push(Ji(n))}function an(t,e,n,r){const s=0|t.u[p];zt(s),t=oo(t,s,n,e,2,!0),r=r??new n,t.push(r),t[p]=2&(0|r.u[p])?-9&t[p]:-17&t[p]}function ft(t,e){return Se(_e(t,e))}function dt(t,e){return ye(_e(t,e))}function C(t,e){return tn(t,e)??0}function We(t,e,n){if(n!=null&&typeof n!="boolean")throw t=typeof n,Error(`Expected boolean but got ${t!="object"?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);T(t,e,n)}function Tt(t,e,n){if(n!=null){if(typeof n!="number"||!wn(n))throw nr("int32");n|=0}T(t,e,n)}function f(t,e,n){if(n!=null&&typeof n!="number")throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);T(t,e,n)}function cn(t,e,n){{const o=t.u;let a=0|o[p];if(zt(a),n==null)x(o,a,e);else{var r=t=0|n[p],s=Mt(t),i=s||Object.isFrozen(n);for(s||(t=0),i||(n=$(n),r=0,t=jt(t=xt(t,a),a,!0),i=!1),t|=21,s=0;s<n.length;s++){const c=n[s],h=Ji(c);Object.is(c,h)||(i&&(n=$(n),r=0,t=jt(t=xt(t,a),a,!0),i=!1),n[s]=h)}t!==r&&(i&&(n=$(n),t=jt(t=xt(t,a),a,!0)),B(n,t)),x(o,a,e,n)}}}function ao(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function Gr(){return Error("Failed to read varint, encoding is invali
1d.")}function co(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function Vr(t){if(typeof t=="string")return{buffer:Di(t),O:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),O:!1};if(t.constructor===Uint8Array)return{buffer:t,O:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),O:!1};if(t.constructor===Pt)return{buffer:Er(t)||new Uint8Array(0),O:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),O:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function jr(t,e){let n,r=0,s=0,i=0;const o=t.h;let a=t.g;do n=o[a++],r|=(127&n)<<i,i+=7;while(i<32&&128&n);for(i>32&&(s|=(127&n)>>4),i=3;i<32&&128&n;i+=7)n=o[a++],s|=(127&n)<<i;if(Zt(t,a),n<128)return e(r>>>0,s>>>0);throw Gr()}function Hr(t){let e=0,n=t.g;const r=n+10,s=t.h;for(;n<r;){const i=s[n++];if(e|=i,(128&i)==0)return Zt(t,n),!!(127&e)}throw Gr()}function Ht(t){const e=t.h;let n=t.g,r=e[n++],s=127&r;if(128&r&&(r=e[n++],s|=(127&r)<<7,128&r&&(r=e[n++],s|=(127&r)<<14,128&r&&(r=e[n++],s|=(127&r)<<21,128&r&&(r=e[n++],s|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw Gr();return Zt(t,n),s}function Rt(t){return Ht(t)>>>0}function hr(t){var e=t.h;const n=t.g,r=e[n],s=e[n+1],i=e[n+2];return e=e[n+3],Zt(t,t.g+4),(r<<0|s<<8|i<<16|e<<24)>>>0}function ur(t){var e=hr(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,n==255?e?NaN:t*(1/0):n==0?1401298464324817e-60*t*e:t*Math.pow(2,n-150)*(e+8388608)}function u2(t){return Ht(t)}function $n(t,e,{aa:n=!1}={}){t.aa=n,e&&(e=Vr(e),t.h=e.buffer,t.m=e.O,t.j=0,t.l=t.h.length,t.g=t.j)}function Zt(t,e){if(t.g=e,e>t.l)throw co(t.l,e)}function ho(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw co(e,t.l-n);return t.g=r,n}function uo(t,e){if(e==0)return te();var n=ho(t,e);return t.aa&&t.m?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?new Uint8Array(0):Ya?t.slice(n,e):new Uint8Array(t.subarray(n,e))),n.length==0?te():new Pt(n,pe)}kt.prototype.toJSON=void 0;var js=[];function lo(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=Rt(t.g);if(e=n>>>3,!((n&=7)>=0&&n<=5))throw ao(n,t.l);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function en(t){switch(t.h){case 0:t.h!=0?en(t):Hr(t.g);break;case 1:Zt(t=t.g,t.g+8);break;case 2:if(t.h!=2)en(t);else{var e=Rt(t.g);Zt(t=t.g,t.g+e)}break;case 5:Zt(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!lo(t))throw Error("Unmatched start-group tag: stream EOF");if(t.h==4){if(t.m!=e)throw Error("Unmatched end-group tag");break}en(t)}break;default:throw ao(t.h,t.l)}}function Xe(t,e,n){const r=t.g.l,s=Rt(t.g),i=t.g.g+s;let o=i-r;if(o<=0&&(t.g.l=i,n(e,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${s} bytes, instead read ${s-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=i,t.g.l=r,e}function Wr(t){var e=Rt(t.g),n=ho(t=t.g,e);if(t=t.h,Ma){var r,s=t;(r=jn)||(r=jn=new TextDecoder("utf-8",{fatal:!0})),e=n+e,s=n===0&&e===s.length?s:s.subarray(n,e);try{var i=r.decode(s)}catch(a){if($e===void 0){try{r.decode(new Uint8Array([128]))}catch{}try{r.decode(new Uint8Array([97])),$e=!0}catch{$e=!1}}throw!$e&&(jn=void 0),a}}else{e=(i=n)+e,n=[];let a,c=null;for(;i<e;){var o=t[i++];o<128?n.push(o):o<224?i>=e?$t():(a=t[i++],o<194||(192&a)!=128?(i--,$t()):n.push((31&o)<<6|63&a)):o<240?i>=e-1?$t():(a=t[i++],(192&a)!=128||o===224&&a<160||o===237&&a>=160||(192&(r=t[i++]))!=128?(i--,$t()):n.push((15&o)<<12|(63&a)<<6|63&r)):o<=244?i>=e-2?$t():(a=t[i++],(192&a)!=128||a-144+(o<<28)>>30||(192&(r=t[i++]))!=128||(192&(s=t[i++]))!=128?(i--,$t()):(o=(7&o)<<18|(63&a)<<12|(63&r)<<6|63&s,o-=65536,n.push(55296+(o>>10&1023),56320+(1023&o)))):$t(),n.length>=8192&&(c=ks(c,n),n.length=0)}i=ks(c,n)}return i}function fo(t){const e=Rt(t.g);return uo(t.g,e)}function Tn(t,e,n){var r=Rt(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var qe=[];function mt(t,e,n){e.g?e.m(t,e.g,e.h,n):e.m(t,e.h,n)}var l=class{constructor(t,e){this.u=eo(t,e)}toJSON(){try{var t=to(this)}finally{Zi=void 0}return t}l(){var t=K2;return t.g?t.l(this,t.g,t.h):t.l(this,t.h,t.defaultValue)}clone(){const t=this.u;return new this.constructor(An(t,0|t[p],!1))}O(){return!!(2&(0|this.u[p]))}};function Hs(t){return t?/^\d+$/.test(t)?(vn(t),new lr(k,I)):null:l2||=new lr(0,0)}l.prototype.W=Ke,l.prototype.toString=function(){return this.u.toString()};var lr=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let l2;function Ws(t){return t?/^-?\d+$/.test(t)?(vn(t),new fr(k,I)):null:f2||=new fr(0,0)}var fr=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let f2;function ue(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 Me(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Sn(t,e){if(e>=0)Me(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function ze(t,e){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 ve(t,e){e.length!==0&&(t.l.push(e),t.h+=e.length)}function st(t,e,n){Me(t.g,8*e+n)}function zr(t,e){return st(t,e,2),e=t.g.end(),ve(t,e),e.push(t.h),e}function Kr(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 Ln(t,e,n){st(t,e,2),Me(t.g,n.length),ve(t,t.g.end()),ve(t,n)}function hn(t,e,n,r){n!=null&&(e=zr(t,e),r(n,t),Kr(t,e))}function yt(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var Xr=yt(),po=yt(),Yr=yt(),$r=yt(),go=yt(),mo=yt(),qr=yt(),yo=yt(),_o=yt(),Pe=class{constructor(t,e,n){this.g=t,this.h=e,t=Xr,this.l=!!t&&n===t||!1}};function Fn(t,e){return new Pe(t,e,Xr)}function vo(t,e,n,r,s){hn(t,n,Eo(e,r),s)}const d2=Fn(function(t,e,n,r,s){return t.h===2&&(Xe(t,Ur(e,r,n),s),!0)},vo),p2=Fn(function(t,e,n,r,s){return t.h===2&&(Xe(t,Ur(e,r,n),s),!0)},vo);var Mn=Symbol(),Jr=Symbol(),zs=Symbol(),Ks=Symbol();let wo,bo;function ne(t,e,n,r){var s=r[t];if(s)return s;(s={}).Ma=r,s.T=function(w){switch(typeof w){case"boolean":return Qi||=[0,void 0,!0];case"number":return w>0?void 0:w===0?c2||=[0,void 0]:[-w,void 0];case"string":return[0,w];case"object":return w}}(r[0]);var i=r[1];let o=1;i&&i.constructor===Object&&(s.ga=i,typeof(i=r[++o])=="function"&&(s.la=!0,wo??=i,bo??=r[o+1],i=r[o+=2]));const a={};for(;i&&Array.isArray(i)&&i.length&&typeof i[0]=="number"&&i[0]>0;){for(var c=0;c<i.length;c++)a[i[c]]=i;i=r[++o]}for(c=1;i!==void 0;){let w;typeof i=="number"&&(c+=i,i=r[++o]);var h=void 0;if(i instanceof Pe?w=i:(w=d2,o--),w?.l){i=r[++o],h=r;var m=o;typeof i=="function"&&(i=i(),h[m]=i),h=i}for(m=c+1,typeof(i=r[++o])=="number"&&i<0&&(m-=i,i=r[++o]);c<m;c++){const W=a[c];h?n(s,c,w,h,W):e(s,c,w,W)}}return r[t]=s}function Ao(t){return Array.isArray(t)?t[0]instanceof Pe?t:[p2,t]:[t,void 0]}function Eo(t,e){return t instanceof l?t.u:Array.isArray(t)?Vt(t,e,!1):void 0}function Zr(t,e,n,r){const s=n.g;t[e]=r?(i,o,a)=>s(i,o,a,r):s}function Qr(t,e,n,r,s){const i=n.g;let o,a;t[e]=(c,h,m)=>i(c,h,m,a||=ne(Jr,Zr,Qr,r).T,o||=ts(r),s)}function ts(t){let e=t[zs];if(e!=null)return e;const n=ne(Jr,Zr,Qr,t);return e=n.la?(r,s)=>wo(r,s,n):(r,s)=>{const i=0|r[p];for(;lo(s)&&s.h!=4;){var o=s.m,a=n[o];if(a==null){var c=n.ga;
1c&&(c=c[o])&&(c=g2(c))!=null&&(a=n[o]=c)}a!=null&&a(s,r,o)||(o=(a=s).l,en(a),a.fa?a=void 0:(c=a.g.g-o,a.g.g=o,a=uo(a.g,c)),o=r,a&&((c=o[ge])?c.push(a):o[ge]=[a]))}return 8192&i&&Te(r),!0},t[zs]=e}function g2(t){const e=(t=Ao(t))[0].g;if(t=t[1]){const n=ts(t),r=ne(Jr,Zr,Qr,t).T;return(s,i,o)=>e(s,i,o,r,n)}return e}function Pn(t,e,n){t[e]=n.h}function xn(t,e,n,r){let s,i;const o=n.h;t[e]=(a,c,h)=>o(a,c,h,i||=ne(Mn,Pn,xn,r).T,s||=ko(r))}function ko(t){let e=t[Ks];if(!e){const n=ne(Mn,Pn,xn,t);e=(r,s)=>To(r,s,n),t[Ks]=e}return e}function To(t,e,n){(function(r,s,i){const o=512&s?0:-1,a=r.length,c=a+((s=64&s?256&s:!!a&&mn(r[a-1]))?-1:0);for(let h=0;h<c;h++)i(h-o,r[h]);if(s){r=r[a-1];for(const h in r)!isNaN(h)&&i(+h,r[h])}})(t,0|t[p]|(n.T[1]?512:0),(r,s)=>{if(s!=null){var i=function(o,a){var c=o[a];if(c)return c;if((c=o.ga)&&(c=c[a])){var h=(c=Ao(c))[0].h;if(c=c[1]){const m=ko(c),w=ne(Mn,Pn,xn,c).T;c=o.la?bo(w,m):(W,re,at)=>h(W,re,at,w,m)}else c=h;return o[a]=c}}(n,r);i&&i(e,s,r)}}),(t=Lr(t))&&function(r,s){ve(r,r.g.end());for(let i=0;i<s.length;i++)ve(r,Er(s[i])||new Uint8Array(0))}(e,t)}function xe(t,e){if(Array.isArray(e)){var n=0|e[p];if(4&n)return e;for(var r=0,s=0;r<e.length;r++){const i=t(e[r]);i!=null&&(e[s++]=i)}return s<r&&(e.length=s),B(e,-6145&(5|n)),2&n&&Object.freeze(e),e}}function K(t,e,n){return new Pe(t,e,n)}function Oe(t,e,n){return new Pe(t,e,n)}function X(t,e,n){x(t,0|t[p],e,n)}var m2=Fn(function(t,e,n,r,s){return t.h===2&&(t=Xe(t,Vt([void 0,void 0],r,!0),s),zt(r=0|e[p]),(s=Ct(e,r,n))instanceof kt?2&s.M?((s=s.da()).push(t),x(e,r,n,s)):s.Ja(t):Array.isArray(s)?(2&(0|s[p])&&x(e,r,n,s=ro(s)),s.push(t)):x(e,r,n,[t]),!0)},function(t,e,n,r,s){if(e instanceof kt)e.forEach((i,o)=>{hn(t,n,Vt([o,i],r,!1),s)});else if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];Array.isArray(o)&&hn(t,n,Vt(o,r,!1),s)}});function So(t,e,n){if(e=function(r){if(r==null)return r;const s=typeof r;if(s==="bigint")return String(je(64,r));if(He(r)){if(s==="string")return qi(r);if(s==="number")return Or(r)}}(e),e!=null&&(typeof e=="string"&&Ws(e),e!=null))switch(st(t,n,0),typeof e){case"number":t=t.g,ee(e),ue(t,k,I);break;case"bigint":n=BigInt.asUintN(64,e),n=new fr(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),ue(t.g,n.h,n.g);break;default:n=Ws(e),ue(t.g,n.h,n.g)}}function Lo(t,e,n){(e=Se(e))!=null&&e!=null&&(st(t,n,0),Sn(t.g,e))}function Fo(t,e,n){(e=Ki(e))!=null&&(st(t,n,0),t.g.g.push(e?1:0))}function Mo(t,e,n){(e=ye(e))!=null&&Ln(t,n,Ii(e))}function Po(t,e,n,r,s){hn(t,n,Eo(e,r),s)}function xo(t,e,n){e==null||typeof e=="string"||e instanceof Pt||(Qt(e)?Qt(e)&&kr(Vi):e=void 0),e!=null&&Ln(t,n,Vr(e).buffer)}function Oo(t,e,n){return(t.h===5||t.h===2)&&(e=Fe(e,0|e[p],n,!1),t.h==2?Tn(t,ur,e):e.push(ur(t.g)),!0)}var Lt=K(function(t,e,n){if(t.h!==1)return!1;var r=t.g;t=hr(r);const s=hr(r);r=2*(s>>31)+1;const i=s>>>20&2047;return t=4294967296*(1048575&s)+t,X(e,n,i==2047?t?NaN:r*(1/0):i==0?5e-324*r*t:r*Math.pow(2,i-1075)*(t+4503599627370496)),!0},function(t,e,n){(e=Kt(e))!=null&&(st(t,n,1),t=t.g,(n=Wi||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),k=n.getUint32(0,!0),I=n.getUint32(4,!0),ze(t,k),ze(t,I))},yt()),D=K(function(t,e,n){return t.h===5&&(X(e,n,ur(t.g)),!0)},function(t,e,n){(e=Kt(e))!=null&&(st(t,n,5),t=t.g,Fr(e),ze(t,k))},qr),y2=Oe(Oo,function(t,e,n){if((e=xe(Kt,e))!=null)for(let o=0;o<e.length;o++){var r=t,s=n,i=e[o];i!=null&&(st(r,s,5),r=r.g,Fr(i),ze(r,k))}},qr),es=Oe(Oo,function(t,e,n){if((e=xe(Kt,e))!=null&&e.length){st(t,n,2),Me(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Fr(e[r]),ze(n,k)}},qr),Wt=K(function(t,e,n){return t.h===0&&(X(e,n,jr(t.g,Pr)),!0)},So,mo),qn=K(function(t,e,n){return t.h===0&&(X(e,n,(t=jr(t.g,Pr))===0?void 0:t),!0)},So,mo),_2=K(function(t,e,n){return t.h===0&&(X(e,n,jr(t.g,Mr)),!0)},function(t,e,n){if((e=Za(e))!=null&&(typeof e=="string"&&Hs(e),e!=null))switch(st(t,n,0),typeof e){case"number":t=t.g,ee(e),ue(t,k,I);break;case"bigint":n=BigInt.asUintN(64,e),n=new lr(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),ue(t.g,n.h,n.g);break;default:n=Hs(e),ue(t.g,n.h,n.g)}},yt()),R=K(function(t,e,n){return t.h===0&&(X(e,n,Ht(t.g)),!0)},Lo,$r),On=Oe(function(t,e,n){return(t.h===0||t.h===2)&&(e=Fe(e,0|e[p],n,!1),t.h==2?Tn(t,Ht,e):e.push(Ht(t.g)),!0)}
1,function(t,e,n){if((e=xe(Se,e))!=null&&e.length){n=zr(t,n);for(let r=0;r<e.length;r++)Sn(t.g,e[r]);Kr(t,n)}},$r),he=K(function(t,e,n){return t.h===0&&(X(e,n,(t=Ht(t.g))===0?void 0:t),!0)},Lo,$r),M=K(function(t,e,n){return t.h===0&&(X(e,n,Hr(t.g)),!0)},Fo,po),le=K(function(t,e,n){return t.h===0&&(X(e,n,(t=Hr(t.g))===!1?void 0:t),!0)},Fo,po),H=Oe(function(t,e,n){return t.h===2&&(t=Wr(t),Fe(e,0|e[p],n,!1).push(t),!0)},function(t,e,n){if((e=xe(ye,e))!=null)for(let o=0;o<e.length;o++){var r=t,s=n,i=e[o];i!=null&&Ln(r,s,Ii(i))}},Yr),Dt=K(function(t,e,n){return t.h===2&&(X(e,n,(t=Wr(t))===""?void 0:t),!0)},Mo,Yr),E=K(function(t,e,n){return t.h===2&&(X(e,n,Wr(t)),!0)},Mo,Yr),G=function(t,e,n=Xr){return new Pe(t,e,n)}(function(t,e,n,r,s){return t.h===2&&(r=Vt(void 0,r,!0),Fe(e,0|e[p],n,!0).push(r),Xe(t,r,s),!0)},function(t,e,n,r,s){if(Array.isArray(e))for(let i=0;i<e.length;i++)Po(t,e[i],n,r,s)}),A=Fn(function(t,e,n,r,s,i){return t.h===2&&(so(e,0|e[p],i,n),Xe(t,e=Ur(e,r,n),s),!0)},Po),Io=K(function(t,e,n){return t.h===2&&(X(e,n,fo(t)),!0)},xo,yo),v2=Oe(function(t,e,n){return(t.h===0||t.h===2)&&(e=Fe(e,0|e[p],n,!1),t.h==2?Tn(t,Rt,e):e.push(Rt(t.g)),!0)},function(t,e,n){if((e=xe(Xi,e))!=null)for(let o=0;o<e.length;o++){var r=t,s=n,i=e[o];i!=null&&(st(r,s,0),Me(r.g,i))}},go),w2=K(function(t,e,n){return t.h===0&&(X(e,n,(t=Rt(t.g))===0?void 0:t),!0)},function(t,e,n){(e=Xi(e))!=null&&e!=null&&(st(t,n,0),Me(t.g,e))},go),nt=K(function(t,e,n){return t.h===0&&(X(e,n,Ht(t.g)),!0)},function(t,e,n){(e=Se(e))!=null&&(e=parseInt(e,10),st(t,n,0),Sn(t.g,e))},_o);class b2{constructor(e,n){this.h=e,this.g=n,this.l=v,this.m=g,this.defaultValue=void 0}register(){fn(this)}}function _t(t,e){return new b2(t,e)}function Xt(t,e){return(n,r)=>{if(qe.length){const i=qe.pop();i.o(r),$n(i.g,n,r),n=i}else n=new class{constructor(i,o){if(js.length){const a=js.pop();$n(a,i,o),i=a}else i=new class{constructor(a,c){this.h=null,this.m=!1,this.g=this.l=this.j=0,$n(this,a,c)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.aa=!1}}(i,o);this.g=i,this.l=this.g.g,this.h=this.m=-1,this.o(o)}o({fa:i=!1}={}){this.fa=i}}(n,r);try{const i=new t,o=i.u;ts(e)(o,n);var s=i}finally{n.g.clear(),n.m=-1,n.h=-1,qe.length<100&&qe.push(n)}return s}}function In(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 o=this.g;return this.g=[],o}}}};To(this.u,e,ne(Mn,Pn,xn,t)),ve(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,s=r.length;let i=0;for(let o=0;o<s;o++){const a=r[o];n.set(a,i),i+=a.length}return e.l=[n],n}}var Xs=class extends l{constructor(t){super(t)}},Ys=[0,Dt,K(function(t,e,n){return t.h===2&&(X(e,n,(t=fo(t))===te()?void 0:t),!0)},function(t,e,n){if(e!=null){if(e instanceof l){const r=e.Oa;return void(r&&(e=r(e),e!=null&&Ln(t,n,Vr(e).buffer)))}if(Array.isArray(e))return}xo(t,e,n)},yo)];let Jn,$s=globalThis.trustedTypes;function qs(t){Jn===void 0&&(Jn=function(){let n=null;if(!$s)return n;try{const r=s=>s;n=$s.createPolicy("goog#html",{createHTML:r,createScript:r,createScriptURL:r})}catch{}return n}());var e=Jn;return new class{constructor(n){this.g=n}toString(){return this.g+""}}(e?e.createScriptURL(t):t)}function A2(t,...e){if(e.length===0)return qs(t[0]);let n=t[0];for(let r=0;r<e.length;r++)n+=encodeURIComponent(e[r])+t[r+1];return qs(n)}var Ro=[0,R,nt,M,-1,On,nt,-1],E2=class extends l{constructor(t){super(t)}},Co=[0,M,E,M,nt,-1,Oe(function(t,e,n){return(t.h===0||t.h===2)&&(e=Fe(e,0|e[p],n,!1),t.h==2?Tn(t,u2,e):e.push(Ht(t.g)),!0)},function(t,e,n){if((e=xe(Se,e))!=null&&e.length){n=zr(t,n);for(let r=0;r<e.length;r++)Sn(t.g,e[r]);Kr(t,n)}},_o),E,-1,[0,M,-1],nt,M,-1],No=[0,E,-2],Js=class extends l{constructor(t){super(t)}},Bo=[0],Do=[0,R,M,1,M,-3],rt=class extends l{constructor(t){super(t,2)}},U={};U[336783863]=[0,E,M,-1,R,[0,[1,2,3,4,5,6,7,8,9],A,Bo,A,Co,A,No,A,Do,A,Ro,A,[0,E,-2],A,[0,E,nt],A,[0,nt,E,-1],A,[0,nt,-1]],[0,E],M,[0,[1,3],[2,4],A,[0,On],-1,A,[0,H],-1,G,[0,E,-1]],E];var Zs=[0,qn,-1,le,-3,qn,On,Dt,he,qn,-1,le,he,le,-2,Dt];function it(t,e){cr(t,2,Le(e),"")}function S(t,e){kn(t,3,e)}function _(t,e){kn(t,4,e)}var z=class extends l{constructor(t){super(t,500)}o(t){return g(this,0,7,t)}},De=[-1,{}],Qs=[0,E,1,De],ti=[0,E,H,De];function ot(t,e){an(t,1,z,e)}function L(t,e){kn(t,10,e)}function b(t,e){kn(t,15,e)}var J=class extends l{constructor(t){super(t,500)}o(t){return g(this,0,1001,t)}},Uo=[-500,G,[-500,Dt,-1,H,-3,[-2,U,M],G,Ys,he,-1,Qs,ti,G,[0,Dt,le],Dt,Zs,he,H,987,H],4,G,[-500,E,-1,[-1,{}],998,E],G,[-500,E,H,-1,[-2,{},M],997,H,-1],he,G,[-500,E,H,De,998,H],H,he,Qs,ti,G,[0,Dt,-1,De],H,-2,Zs,Dt,-1,le,[0,le,w2],978,De,G,Ys];J.prototype.g=In(Uo);var k2=Xt(J,Uo),T2=class extends l{constructor(t){super(t)}},Go=class extends l{constructor(t){super(t)}g(){return It(this,T2,1)}},Vo=[0,G,[0,R,D,E,-1]],Rn=Xt(Go,Vo),S2=class extends l{constructor(t){super(t)}},L2=class extends l{constructor(t){super(t)}},Zn=class extends l{constructor(t){super(t)}h(){return v(this,S2,2)}g(){return It(this,L2,5)}},jo=Xt(class extends l{constructor(t){super(t)}},[0,H,On,es,[0,nt,[0,R,-3],[0,D,-3],[0,R,-1,[0,G,[0,R,-2]]],G,[0,D,-1,E,D]],E,-1,Wt,G,[0,R,D],H,Wt]),Ho=class extends l{constructor(t){super(t)}},fe=Xt(class extends l{constructor(t){super(t)}},[0,G,[0,D,-4]]),Wo=class extends l{constructor(t){super(t)}},Ye=Xt(class extends l{constructor(t){super(t)}},[0,G,[0,D,-4]]),F2=class extends l{constructor(t){super(t)}},M2=[0,R,-1,es,nt],zo=class extends l{constructor(t){super(t)}};zo.prototype.g=In([0,D,-4,Wt]);var P2=class extends l{constructor(t){super(t)}},x2=Xt(class extends l{constructor(t){super(t)}},[0,G,[0,1,R,E,Vo],Wt]),ei=class extends l{constructor(t){super(t)}},O2=class extends l{constructor(t){super(t)}ma(){const t=no(this);return t??te()}},I2=class extends l{constructor(t){super(t)}},Ko=[1,2],R2=Xt(class extends l{constructor(t){super(t)}},[0,G,[0,Ko,A,[0,es],A,[0,Io],R,E],Wt]),ns=class extends l{constructor(t){super(t)}},Xo=[0,E,R,D,H,-1],ni=class extends l{constructor(t){super(t)}},C2=[0,M,-1],ri=class extends l{constructor(t){super(t)}},nn=[1,2,3,4,5],un=class extends l{constructor(t){super(t)}g(){return no(this)!=null}h(){return dt(this,2)!=null}},P=class extends l{constructor(t){super(t)}g(){return Ki(_e(this,2))??!1}},Yo=[0,Io,E,[0,R,Wt,-1],[0,_2,Wt]],N=[0,Yo,M,[0,nn,A,Do,A,Co,A,Ro,A,Bo,A,No],nt],Cn=class extends l{constructor(t){super(t)}},rs=[0,N,D,-1,R],N2=_t(502141897,Cn);U[502141897]=rs;var B2=Xt(class extends l{constructor(t){super(t)}},[0,[0,nt,-1,y2,v2],M2]),$o=class extends l{constructor(t){super(t)}},qo=class extends l{constructor(t){super(t)}},ss=[0,N,D,[0,N],M],Jo=[0,N,rs,ss,D,[0,[0,Yo]]],D2=_t(508968150,qo);U[508968150]=Jo,U[508968149]=ss;var Zo=class extends l{constructor(t){super(t)}},U2=_t(513916220,Zo);U[513916220]=[0,N,Jo,R];var oe=class extends l{constructor(t){super(t)}h(){return v(this,ns,2)}g(){T(this,2)}},Qo=[0,N,Xo];U[478825465]=Qo;var G2=class extends l{constructor(t){super(t)}},ta=class extends l{constructor(t){super(t)}},is=class extends l{constructor(t){super(t)}},os=class extends l{constructor(t){super(t)}},ea=class extends l{constructor(t){super(t)}},si=[0,N,[0,N],Qo,-1],na=[0,N,D,R],as=[0,N,D],ra=[0,N,na,as,D],V2=_t(479097054,ea);U[479097054]=[0,N,ra,si],U[463370452]=si,U[464864288]=na;var j2=_t(462713202,os);U[462713202]=ra,U[474472470]=as;var H2=class extends l{constructor(t){super(t)}},sa=class extends l{constructor(t){super(t)}},ia=class extends l{constructor(t){super(t)}},oa=class extends l{constructor(t){super(t)}},cs=[0,N,D,-1,R],dr=[0,N,D,M];oa.prototype.g=In([0,N,as,[0,N],rs,ss,cs,dr]);var aa=class extends l{constructor(t){super(t)}},W2=_t(456383383,aa);U[456383383]=[0,N,Xo];var ca=class extends l{constructor(t){super(t)}},z2=_t(476348187,ca);U[476348187]=[0,N,C2];var ha=class extends l{constructor(t){super(t)}},ii=class extends l{constructor(t){super(t)}},ua=[0,nt,-1],K2=_t(458105876,class extends l{constructor(t){super(t)}g(){var t=this.u;const e=0|t[p],n=2&e;return t=function(r,s,i){var o=ii;const a=2&s;let c=!1;if(i==null){if(a)return Vs();i=[]}else if(i.constructor===kt){if(!(2&i.M)||a)return i;i=i.da()}else Array.isArray(i)?c=!!(2&(0|i[p])):i=[];if(a){if(!i.length)return Vs();c||(c=!0,Te(i))}else c&&(c=!1,i=ro(i));return c||(64&(0|i[p])?i[p]&=-33:32&s&&pn(i,32)),x(r,s,2,o=new kt(i,o,Qa,void 0)),o}(t,e,Ct(t,e,2)),!n&&ii&&(t.pa=!0),t}});U[458105876]=[0,ua,m2,[!0,Wt,[0,E,-1,H]]];var hs=class extends l{constructor(t){super(t)}},la=_t(458105758,hs);U[458105758]=[0,N,E,ua];var fa=class extends l{constructor(t){super(t)}},X2=_t(443442058,fa);U[443442058]=[0,N,E,R,D,H,-1,M,D],U[514774813]=cs;var da=class extends l{constructor(t){super(t)}},Y2=_t(516587230,da);function pr(t,e){return e=e?e.clone():new ns,t.displayNamesLocale!==void 0?T(e,1,Le(t.displayNamesLocale)):t.displayNamesLocale===void 0&&T(e,1),t.maxResults!==void 0?Tt(e,2,t.maxResults):"maxResults"in t&&T(e,2),t.scoreThreshold!==void 0?f(e,3,t.scoreThreshold):"scoreThreshold"in t&&T(e,3),t.categoryAllowlist!==void 0?cn(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&T(e,4),t.categoryDenylist!==void 0?cn(e,5,t.categoryDenylist):"categoryDenylist"in t&&T(e,5),e}function us(t,e=-1,n=""){return{categories:t.map(r=>({index:ft(r,1)??0??-1,score:C(r,2)??0,categoryName:dt(r,3)??""??"",displayName:dt(r,4)??""??""})),headIndex:e,headName:n}}function pa(t){var e=Jt(t,3,Kt,qt()),n=Jt(t,2,Se,qt()),r=Jt(t,1,ye,qt()),s=Jt(t,9,ye,qt());const i={categories:[],keypoints:[]};for(let o=0;o<e.length;o++)i.categories.push({score:e[o],index:n[o]??-1,categoryName:r[o]??"",dis
1playName:s[o]??""});if((e=v(t,Zn,4)?.h())&&(i.boundingBox={originX:ft(e,1)??0,originY:ft(e,2)??0,width:ft(e,3)??0,height:ft(e,4)??0,angle:0}),v(t,Zn,4)?.g().length)for(const o of v(t,Zn,4).g())i.keypoints.push({x:tn(o,1)??0,y:tn(o,2)??0,score:tn(o,4)??0,label:dt(o,3)??""});return i}function Nn(t){const e=[];for(const n of It(t,Wo,1))e.push({x:C(n,1)??0,y:C(n,2)??0,z:C(n,3)??0,visibility:C(n,4)??0});return e}function Ue(t){const e=[];for(const n of It(t,Ho,1))e.push({x:C(n,1)??0,y:C(n,2)??0,z:C(n,3)??0,visibility:C(n,4)??0});return e}function oi(t){return Array.from(t,e=>e>127?e-256:e)}function ai(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,s=0;for(let i=0;i<t.length;i++)n+=t[i]*e[i],r+=t[i]*t[i],s+=e[i]*e[i];if(r<=0||s<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*s)}let Je;U[516587230]=[0,N,cs,dr,D],U[518928384]=dr;const $2=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 ga(){if(Je===void 0)try{await WebAssembly.instantiate($2),Je=!0}catch{Je=!1}return Je}async function Re(t,e=A2``){const n=await ga()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var ae=class{};function ma(){var t=navigator;return typeof OffscreenCanvas<"u"&&(!function(e=navigator){return(e=e.userAgent).includes("Safari")&&!e.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function ci(t){if(typeof importScripts!="function"){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((n,r)=>{e.addEventListener("load",()=>{n()},!1),e.addEventListener("error",s=>{r(s)},!1),document.body.appendChild(e)})}importScripts(t.toString())}function ya(t){return t.videoWidth!==void 0?[t.videoWidth,t.videoHeight]:t.naturalWidth!==void 0?[t.naturalWidth,t.naturalHeight]:t.displayWidth!==void 0?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function d(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 hi(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,s]=ya(e);return!t.l||r===t.i.canvas.width&&s===t.i.canvas.height||(t.i.canvas.width=r,t.i.canvas.height=s),[r,s]}function ui(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 s=0;s<e.length;s++)r[s]=t.i.stringToNewUTF8(e[s]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const s of r)t.i._free(s);t.i._free(e)}function wt(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function Nt(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(s,i,o)=>{i?(n(r,o),r=[]):r.push(s)}}ae.forVisionTasks=function(t){return Re("vision",t)},ae.forTextTasks=function(t){return Re("text",t)},ae.forGenAiExperimentalTasks=function(t){return Re("genai_experimental",t)},ae.forGenAiTasks=function(t){return Re("genai",t)},ae.forAudioTasks=function(t){return Re("audio",t)},ae.isSimdSupported=function(){return ga()};async function q2(t,e,n,r){return t=await(async(s,i,o,a,c)=>{if(i&&await ci(i),!self.ModuleFactory||o&&(await ci(o),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&c&&((i=self.Module).locateFile=c.locateFile,c.mainScriptUrlOrBlob&&(i.mainScriptUrlOrBlob=c.mainScriptUrlOrBlob)),c=await self.ModuleFactory(self.Module||c),self.ModuleFactory=self.Module=void 0,new s(c,a)}
1)(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:s=>s.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&s.endsWith(".data")?n.assetBinaryPath.toString():s}),await t.o(r),t}function Qn(t,e){const n=v(t.baseOptions,un,1)||new un;typeof e=="string"?(T(n,2,Le(e)),T(n,1)):e instanceof Uint8Array&&(T(n,1,Sr(e,!1)),T(n,2)),g(t.baseOptions,0,1,n)}function li(t){try{const e=t.G.length;if(e===1)throw Error(t.G[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.G.map(n=>n.message).join(", "))}finally{t.G=[]}}function u(t,e){t.B=Math.max(t.B,e)}function Bn(t,e){t.A=new z,it(t.A,"PassThroughCalculator"),S(t.A,"free_memory"),_(t.A,"free_memory_unused_out"),L(e,"free_memory"),ot(e,t.A)}function we(t,e){S(t.A,e),_(t.A,e+"_unused_out")}function Dn(t){t.g.addBoolToStream(!0,"free_memory",t.B)}var gr=class{constructor(t){this.g=t,this.G=[],this.B=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const n=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(v(this.baseOptions,un,1)?.g()||v(this.baseOptions,un,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(r,s){let i=v(r.baseOptions,ri,3);if(!i){var o=i=new ri,a=new Js;Be(o,4,nn,a)}"delegate"in s&&(s.delegate==="GPU"?(s=i,o=new E2,Be(s,2,nn,o)):(s=i,o=new Js,Be(s,4,nn,o))),g(r.baseOptions,0,3,i)}(this,n),n.modelAssetPath)return fetch(n.modelAssetPath.toString()).then(r=>{if(r.ok)return r.arrayBuffer();throw Error(`Failed to fetch model: ${n.modelAssetPath} (${r.status})`)}).then(r=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(r),!0,!1,!1),Qn(this,"/model.dat"),this.m(),this.J()});if(n.modelAssetBuffer instanceof Uint8Array)Qn(this,n.modelAssetBuffer);else if(n.modelAssetBuffer)return async function(r){const s=[];for(var i=0;;){const{done:o,value:a}=await r.read();if(o)break;s.push(a),i+=a.length}if(s.length===0)return new Uint8Array(0);if(s.length===1)return s[0];r=new Uint8Array(i),i=0;for(const o of s)r.set(o,i),i+=o.length;return r}(n.modelAssetBuffer).then(r=>{Qn(this,r),this.m(),this.J()})}return this.m(),this.J(),Promise.resolve()}J(){}ca(){let t;if(this.g.ca(e=>{t=k2(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener((n,r)=>{this.G.push(Error(r))}),this.g.Ha(),this.g.setGraph(t,e),this.A=void 0,li(this)}finishProcessing(){this.g.finishProcessing(),li(this)}close(){this.A=void 0,this.g.closeGraph()}};function Ot(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}gr.prototype.close=gr.prototype.close;class J2{constructor(e,n,r,s){this.g=e,this.h=n,this.m=r,this.l=s}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function fi(t,e,n){const r=t.g;if(n=Ot(r.createShader(n),"Failed to create WebGL shader"),r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(t.h,n),n}function di(t,e){const n=t.g,r=Ot(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const s=Ot(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.P),n.vertexAttribPointer(t.P,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const i=Ot(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.J),n.vertexAttribPointer(t.J,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new J2(n,r,s,i)}function ls(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function fs(t,e,n,r){return ls(t,e),t.h||(t.m(),t.C()),n?(t.s||(t.s=di(t,!0)),n=t.s):(t.v||(t.v=di(t,!1)),n=t.v),e.useProgram(t.h),n.bind(),t.l(),t=r(),n.g.bindVertexArray(null),t}function Un(t,e,n){return ls(t,e),t=Ot(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function Gn(t,e,n){ls(t,e),t.A||(t.A=Ot(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.A),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function ds(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var ps=class{G(){return`
2  precision mediump float;
3  varying vec2 vTex;
4  uniform sampler2D inputTexture;
5  void main() {
6    gl_FragColor = texture2D(inputTexture, vTex);
7  }
8 `}m(){const t=this.g;if(this.h=Ot(t.createProgram(),"Failed to create WebGL program"),this.Z=fi(this,`
9  attribute vec2 aVertex;
10  attribute vec2 aTex;
11  varying vec2 vTex;
12  void main(void) {
13    gl_Position = vec4(aVertex, 0.0, 1.0);
14    vTex = aTex;
15  }`,t.VERTEX_SHADER),this.Y=fi(this,this.G(),t.FRAGMENT_SHADER),t.linkProgram(this.h),!t.getProgramParameter(this.h,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.h)}`);this.P=t.getAttribLocation(this.h,"aVertex"),this.J=t.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.Z),t.deleteShader(this.Y)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}};function Ft(t,e){switch(e){case 0:return t.g.find(n=>n instanceof Uint8Array);case 1:return t.g.find(n=>n instanceof Float32Array);case 2:return t.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function mr(t){var e=Ft(t,1);if(!e){if(e=Ft(t,0))e=new Float32Array(e).map(r=>r/255);else{e=new Float32Array(t.width*t.height);const r=be(t);var n=gs(t);if(Gn(n,r,_a(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(t.width*t.height*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.FLOAT,n);for(let s=0,i=0;s<e.length;++s,i+=4)e[s]=n[i]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function _a(t){let e=Ft(t,2);if(!e){const n=be(t);e=wa(t);const r=mr(t),s=va(t);n.texImage2D(n.TEXTURE_2D,0,s,t.width,t.height,0,n.RED,n.FLOAT,r),yr(t)}
15return e}function be(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ot(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function va(t){if(t=be(t),!Ze)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))Ze=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Ze=t.R16F}return Ze}function gs(t){return t.l||(t.l=new ps),t.l}function wa(t){const e=be(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Ft(t,2);return n||(n=Un(gs(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(n),t.j=!0),e.bindTexture(e.TEXTURE_2D,n),n}function yr(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var Ze,V=class{constructor(t,e,n,r,s,i,o){this.g=t,this.m=e,this.j=n,this.canvas=r,this.l=s,this.width=i,this.height=o,this.j&&--pi===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Da(){return!!Ft(this,0)}ja(){return!!Ft(this,1)}R(){return!!Ft(this,2)}ia(){return(e=Ft(t=this,0))||(e=mr(t),e=new Uint8Array(e.map(n=>255*n)),t.g.push(e)),e;var t,e}ha(){return mr(this)}N(){return _a(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const r=be(this),s=gs(this);r.activeTexture(r.TEXTURE1),n=Un(s,r,this.m?r.LINEAR:r.NEAREST),r.bindTexture(r.TEXTURE_2D,n);const i=va(this);r.texImage2D(r.TEXTURE_2D,0,i,this.width,this.height,0,r.RED,r.FLOAT,null),r.bindTexture(r.TEXTURE_2D,null),Gn(s,r,n),fs(s,r,!1,()=>{wa(this),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.drawArrays(r.TRIANGLE_FAN,0,4),yr(this)}),ds(s),yr(this)}}t.push(n)}return new V(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&be(this).deleteTexture(Ft(this,2)),pi=-1}};V.prototype.close=V.prototype.close,V.prototype.clone=V.prototype.clone,V.prototype.getAsWebGLTexture=V.prototype.N,V.prototype.getAsFloat32Array=V.prototype.ha,V.prototype.getAsUint8Array=V.prototype.ia,V.prototype.hasWebGLTexture=V.prototype.R,V.prototype.hasFloat32Array=V.prototype.ja,V.prototype.hasUint8Array=V.prototype.Da;var pi=250;function Et(t,e){switch(e){case 0:return t.g.find(n=>n instanceof ImageData);case 1:return t.g.find(n=>typeof ImageBitmap<"u"&&n instanceof ImageBitmap);case 2:return t.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function ba(t){var e=Et(t,0);if(!e){e=Ae(t);const n=Vn(t),r=new Uint8Array(t.width*t.height*4);Gn(n,e,rn(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),ds(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function rn(t){let e=Et(t,2);if(!e){const n=Ae(t);e=sn(t);const r=Et(t,1)||ba(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Ne(t)}return e}function Ae(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ot(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Vn(t){return t.l||(t.l=new ps),t.l}function sn(t){const e=Ae(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Et(t,2);return n||(n=Un(Vn(t),e),t.g.push(n),t.m=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Ne(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function gi(t){const e=Ae(t);return fs(Vn(t),e,!0,()=>function(n,r){const s=n.canvas;if(s.width===n.width&&s.height===n.height)return r();const i=s.width,o=s.height;return s.width=n.width,s.height=n.height,n=r(),s.width=i,s.height=o,n}(t,()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))}var j=class{constructor(t,e,n,r,s,i,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=s,this.width=i,this.height=o,(this.j||this.m)&&--mi===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ca(){return!!Et(this,0)}ka(){return!!Et(this,1)}R(){return!!Et(this,2)}Aa(){return ba(this)}za(){var t=Et(this,1);return t||(rn(this),sn(this),t=gi(this),Ne(this),this.g.push(t),this.j=!0),t}N(){return rn(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const r=Ae(this),s=Vn(this);
vendor: 9,543 bytes, line 15
15r.activeTexture(r.TEXTURE1),n=Un(s,r),r.bindTexture(r.TEXTURE_2D,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,this.width,this.height,0,r.RGBA,r.UNSIGNED_BYTE,null),r.bindTexture(r.TEXTURE_2D,null),Gn(s,r,n),fs(s,r,!1,()=>{sn(this),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.drawArrays(r.TRIANGLE_FAN,0,4),Ne(this)}),ds(s),Ne(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);rn(this),sn(this),n=gi(this),Ne(this)}t.push(n)}return new j(t,this.ka(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Et(this,1).close(),this.m&&Ae(this).deleteTexture(Et(this,2)),mi=-1}};j.prototype.close=j.prototype.close,j.prototype.clone=j.prototype.clone,j.prototype.getAsWebGLTexture=j.prototype.N,j.prototype.getAsImageBitmap=j.prototype.za,j.prototype.getAsImageData=j.prototype.Aa,j.prototype.hasWebGLTexture=j.prototype.R,j.prototype.hasImageBitmap=j.prototype.ka,j.prototype.hasImageData=j.prototype.Ca;var mi=250;function vt(...t){return t.map(([e,n])=>({start:e,end:n}))}const Z2=function(t){return class extends t{Ha(){this.i._registerModelResourcesGraphService()}}}((yi=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",e!==void 0?this.i.canvas=e:ma()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph(new TextEncoder().encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,s){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),d(this,r||"input_audio",i=>{d(this,s=s||"audio_header",o=>{this.i._configureAudio(i,o,t,e??0,n)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){wt(this,"__graph_config__",e=>{t(e)}),d(this,"__graph_config__",e=>{this.i._getGraphConfig(e,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,s){const i=4*t.length;this.h!==i&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(i),this.h=i),this.i.HEAPF32.set(t,this.g/4),d(this,r,o=>{this.i._addAudioToInputStream(this.g,e,n,o,s)})}addGpuBufferToStream(t,e,n){d(this,e,r=>{const[s,i]=hi(this,t,r);this.i._addBoundTextureToStream(r,s,i,n)})}addBoolToStream(t,e,n){d(this,e,r=>{this.i._addBoolToInputStream(t,r,n)})}addDoubleToStream(t,e,n){d(this,e,r=>{this.i._addDoubleToInputStream(t,r,n)})}addFloatToStream(t,e,n){d(this,e,r=>{this.i._addFloatToInputStream(t,r,n)})}addIntToStream(t,e,n){d(this,e,r=>{this.i._addIntToInputStream(t,r,n)})}addUintToStream(t,e,n){d(this,e,r=>{this.i._addUintToInputStream(t,r,n)})}addStringToStream(t,e,n){d(this,e,r=>{d(this,t,s=>{this.i._addStringToInputStream(s,r,n)})})}addStringRecordToStream(t,e,n){d(this,e,r=>{ui(this,Object.keys(t),s=>{ui(this,Object.values(t),i=>{this.i._addFlatHashMapToInputStream(s,i,Object.keys(t).length,r,n)})})})}addProtoToStream(t,e,n,r){d(this,n,s=>{d(this,e,i=>{const o=this.i._malloc(t.length);this.i.HEAPU8.set(t,o),this.i._addProtoToInputStream(o,t.length,i,s,r),this.i._free(o)})})}addEmptyPacketToStream(t,e){d(this,t,n=>{this.i._addEmptyPacketToInputStream(n,e)})}addBoolVectorToStream(t,e,n){d(this,e,r=>{const s=this.i._allocateBoolVector(t.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(const i of t)this.i._addBoolVectorEntry(s,i);this.i._addBoolVectorToInputStream(s,r,n)})}addDoubleVectorToStream(t,e,n){d(this,e,r=>{const s=this.i._allocateDoubleVector(t.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(const i of t)this.i._addDoubleVectorEntry(s,i);this.i._addDoubleVectorToInputStream(s,r,n)})}addFloatVectorToStream(t,e,n){d(this,e,r=>{const s=this.i._allocateFloatVector(t.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(const i of t)this.i._addFloatVectorEntry(s,i);this.i._addFloatVectorToInputStream(s,r,n)})}addIntVectorToStream(t,e,n){d(this,e,r=>{const s=this.i._allocateIntVector(t.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(const i of t)this.i._addIntVectorEntry(s,i);this.i._addIntVectorToInputStream(s,r,n)})}addUintVectorToStream(t,e,n){d(this,e,r=>{const s=this.i._allocateUintVector(t.length);if(!s)throw Error("Unable to allocate new unsigned int vector on heap.");for(const i of t)this.i._addUintVectorEntry(s,i);this.i._addUintVectorToInputStream(s,r,n)})}addStringVectorToStream(t,e,n){d(this,e,r=>{const s=this.i._allocateStringVector(t.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(const i of t)d(this,i,o=>{this.i._addStringVectorEntry(s,o)});this.i._addStringVectorToInputStream(s,r,n)})}addBoolToInputSidePacket(t,e){d(this,e,n=>{this.i._addBoolToInputSidePacket(t,n)})}addDoubleToInputSidePacket(t,e){d(this,e,n=>{this.i._addDoubleToInputSidePacket(t,n)})}addFloatToInputSidePacket(t,e){d(this,e,n=>{this.i._addFloatToInputSidePacket(t,n)})}addIntToInputSidePacket(t,e){d(this,e,n=>{this.i._addIntToInputSidePacket(t,n)})}addUintToInputSidePacket(t,e){d(this,e,n=>{this.i._addUintToInputSidePacket(t,n)})}addStringToInputSidePacket(t,e){d(this,e,n=>{d(this,t,r=>{this.i._addStringToInputSidePacket(r,n)})})}addProtoToInputSidePacket(t,e,n){d(this,n,r=>{d(this,e,s=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputSidePacket(i,t.length,s,r),this.i._free(i)})})}addBoolVectorToInputSidePacket(t,e){d(this,e,n=>{const r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const s of t)this.i._addBoolVectorEntry(r,s);this.i._addBoolVectorToInputSidePacket(r,n)})}addDoubleVectorToInputSidePacket(t,e){d(this,e,n=>{const r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const s of t)this.i._addDoubleVectorEntry(r,s);this.i._addDoubleVectorToInputSidePacket(r,n)})}addFloatVectorToInputSidePacket(t,e){d(this,e,n=>{const r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const s of t)this.i._addFloatVectorEntry(r,s);this.i._addFloatVectorToInputSidePacket(r,n)})}addIntVectorToInputSidePacket(t,e){d(this,e,n=>{const r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const s of t)this.i._addIntVectorEntry(r,s);this.i._addIntVectorToInputSidePacket(r,n)})}addUintVectorToInputSidePacket(t,e){d(this,e,n=>{const r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const s of t)this.i._addUintVectorEntry(r,s);this.i._addUintVectorToInputSidePacket(r,n)})}addStringVectorToInputSidePacket(t,e){d(this,e,n=>{const r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const s of t)d(this,s,i=>{this.i._addStringVectorEntry(r,i)});this.i._addStringVectorToInputSidePacket(r,n)})}attachBoolListener(t,e){wt(this,t,e),d(this,t,n=>{this.i._attachBoolListener(n)})}attachBoolVectorListener(t,e){Nt(this,t,e),d(this,t,n=>{this.i._attachBoolVectorListener(n)})}attachIntListener(t,e){wt(this,t,e),d(this,t,n=>{this.i._attachIntListener(n)})}attachIntVectorListener(t,e){Nt(this,t,e),d(this,t,n=>{this.i._attachIntVectorListener(n)})}attachUintListener(t,e){wt(this,t,e),d(this,t,n=>{this.i._attachUintListener(n)})}attachUintVectorListener(t,e){Nt(this,t,e),d(this,t,n=>{this.i._attachUintVectorListener(n)})}attachDoubleListener(t,e){wt(this,t,e),d(this,t,n=>{this.i._attachDoubleListener(n)})}attachDoubleVectorListener(t,e){Nt(this,t,e),d(this,t,n=>{this.i._attachDoubleVectorListener(n)})}attachFloatListener(t,e){wt(this,t,e),d(this,t,n=>{this.i._attachFloatListener(n)})}attachFloatVectorListener(t,e){Nt(this,t,e),d(this,t,n=>{this.i._attachFloatVectorListener(n)})}attachStringListener(t,e){wt(this,t,e),d(this,t,n=>{this.i._attachStringListener(n)})}attachStringVectorListener(t,e){Nt(this,t,e),d(this,t,n=>{this.i._attachStringVectorListener(n)})}attachProtoListener(t,e,n){wt(this,t,e),d(this,t,r=>{this.i._attachProtoListener(r,n||!1)})}attachProtoVectorListener(t,e,n){Nt(this,t,e),d(this,t,r=>{this.i._attachProtoVectorListener(r,n||!1)})}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),wt(this,t,(r,s)=>{r=new Float32Array(r.buffer,r.byteOffset,r.length/4),e(r,s)}),d(this,t,r=>{this.i._attachAudioListener(r,n||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends yi{get ea(){return this.i}oa(t,e,n){d(this,e,r=>{const[s,i]=hi(this,t,r);
15this.ea._addBoundTextureAsImageToStream(r,s,i,n)})}V(t,e){wt(this,t,e),d(this,t,n=>{this.ea._attachImageListener(n)})}ba(t,e){Nt(this,t,e),d(this,t,n=>{this.ea._attachImageVectorListener(n)})}}));var yi,pt=class extends Z2{};async function y(t,e,n){return async function(r,s,i,o){return q2(r,s,i,o)}(t,n.canvas??(ma()?void 0:document.createElement("canvas")),e,n)}function Aa(t,e,n,r){if(t.U){const i=new zo;if(n?.regionOfInterest){if(!t.na)throw Error("This task doesn't support region-of-interest.");var s=n.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(s.left<0||s.top<0||s.right>1||s.bottom>1)throw Error("Expected RectF values to be in [0,1].");f(i,1,(s.left+s.right)/2),f(i,2,(s.top+s.bottom)/2),f(i,4,s.right-s.left),f(i,3,s.bottom-s.top)}else f(i,1,.5),f(i,2,.5),f(i,4,1),f(i,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(f(i,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){const[o,a]=ya(e);n=C(i,3)*a/o,s=C(i,4)*o/a,f(i,4,n),f(i,3,s)}}t.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",t.U,r)}t.g.oa(e,t.Z,r??performance.now()),t.finishProcessing()}function gt(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Aa(t,e,n,t.B+1)}function St(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Aa(t,e,n,r)}function Ee(t,e,n,r){var s=e.data;const i=e.width,o=i*(e=e.height);if((s instanceof Uint8Array||s instanceof Float32Array)&&s.length!==o)throw Error("Unsupported channel count: "+s.length/o);return t=new V([s],n,!1,t.g.i.canvas,t.P,i,e),r?t.clone():t}var q=class extends gr{constructor(t,e,n,r){super(t),this.g=t,this.Z=e,this.U=n,this.na=r,this.P=new ps}l(t,e=!0){if("runningMode"in t&&We(this.baseOptions,2,!!t.runningMode&&t.runningMode!=="IMAGE"),t.canvas!==void 0&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.P.close(),super.close()}};q.prototype.close=q.prototype.close;var ct=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},g(t=this.h=new Cn,0,1,e=new P),f(this.h,2,.5),f(this.h,3,.3)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&f(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&f(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}D(t,e){return this.j={detections:[]},gt(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},St(this,t,n,e),this.j}m(){var t=new J;L(t,"image_in"),L(t,"norm_rect_in"),b(t,"detections");const e=new rt;mt(e,N2,this.h);const n=new z;it(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),S(n,"IMAGE:image_in"),S(n,"NORM_RECT:norm_rect_in"),_(n,"DETECTIONS:detections"),n.o(e),ot(t,n),this.g.attachProtoVectorListener("detections",(r,s)=>{for(const i of r)r=jo(i),this.j.detections.push(pa(r));u(this,s)}),this.g.attachEmptyPacketListener("detections",r=>{u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ct.prototype.detectForVideo=ct.prototype.F,ct.prototype.detect=ct.prototype.D,ct.prototype.setOptions=ct.prototype.o,ct.createFromModelPath=async function(t,e){return y(ct,t,{baseOptions:{modelAssetPath:e}})},ct.createFromModelBuffer=function(t,e){return y(ct,t,{baseOptions:{modelAssetBuffer:e}})},ct.createFromOptions=function(t,e){return y(ct,t,e)};var ms=vt([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),ys=vt([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),_s=vt([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Ea=vt([474,475],[475,476],[476,477],[477,474]),vs=vt([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),ws=vt([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),ka=vt([469,470],[470,471],[471,472],[472,469]),bs=vt([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,3
1561],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),Ta=[...ms,...ys,..._s,...vs,...ws,...bs],Sa=vt(
vendor: 24,341 bytes, line 15
15[127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]
vendor: 3,004 bytes, line 15
15);function _i(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var O=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,g(t=this.h=new qo,0,1,e=new P),this.v=new $o,g(this.h,0,3,this.v),this.s=new Cn,g(this.h,0,2,this.s),Tt(this.s,4,1),f(this.s,2,.5),f(this.v,2,.5),f(this.h,4,.5)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){return"numFaces"in t&&Tt(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&f(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&f(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&f(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return _i(this),gt(this,t,e),this.j}F(t,e,n){return _i(this),St(this,t,n,e),this.j}m(){var t=new J;L(t,"image_in"),L(t,"norm_rect"),b(t,"face_landmarks");const e=new rt;mt(e,D2,this.h);const n=new z;it(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),S(n,"IMAGE:image_in"),S(n,"NORM_RECT:norm_rect"),_(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),ot(t,n),this.g.attachProtoVectorListener("face_landmarks",(r,s)=>{for(const i of r)r=Ye(i),this.j.faceLandmarks.push(Nn(r));u(this,s)}),this.g.attachEmptyPacketListener("face_landmarks",r=>{u(this,r)}),this.outputFaceBlendshapes&&(b(t,"blendshapes"),_(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(r,s)=>{if(this.outputFaceBlendshapes)for(const i of r)r=Rn(i),this.j.faceBlendshapes.push(us(r.g()??[]));u(this,s)}),this.g.attachEmptyPacketListener("blendshapes",r=>{u(this,r)})),this.outputFacialTransformationMatrixes&&(b(t,"face_geometry"),_(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(r,s)=>{if(this.outputFacialTransformationMatrixes)for(const i of r)(r=v(B2(i),F2,2))&&this.j.facialTransformationMatrixes.push({rows:ft(r,1)??0??0,columns:ft(r,2)??0??0,data:Jt(r,3,Kt,qt()).slice()??[]});u(this,s)}),this.g.attachEmptyPacketListener("face_geometry",r=>{u(this,r)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};O.prototype.detectForVideo=O.prototype.F,O.prototype.detect=O.prototype.D,O.prototype.setOptions=O.prototype.o,O.createFromModelPath=function(t,e){return y(O,t,{baseOptions:{modelAssetPath:e}})},O.createFromModelBuffer=function(t,e){return y(O,t,{baseOptions:{modelAssetBuffer:e}})},O.createFromOptions=function(t,e){return y(O,t,e)},O.FACE_LANDMARKS_LIPS=ms,O.FACE_LANDMARKS_LEFT_EYE=ys,O.FACE_LANDMARKS_LEFT_EYEBROW=_s,O.FACE_LANDMARKS_LEFT_IRIS=Ea,O.FACE_LANDMARKS_RIGHT_EYE=vs,O.FACE_LANDMARKS_RIGHT_EYEBROW=ws,O.FACE_LANDMARKS_RIGHT_IRIS=ka,O.FACE_LANDMARKS_FACE_OVAL=bs,O.FACE_LANDMARKS_CONTOU
15RS=Ta,O.FACE_LANDMARKS_TESSELATION=Sa;var bt=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect",!0),g(t=this.j=new Zo,0,1,e=new P)}get baseOptions(){return v(this.j,P,1)}set baseOptions(t){g(this.j,0,1,t)}o(t){return super.l(t)}Ka(t,e,n){const r=typeof e!="function"?e:{};if(this.h=typeof e=="function"?e:n,gt(this,t,r??{}),!this.h)return this.s}m(){var t=new J;L(t,"image_in"),L(t,"norm_rect"),b(t,"stylized_image");const e=new rt;mt(e,U2,this.j);const n=new z;it(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),S(n,"IMAGE:image_in"),S(n,"NORM_RECT:norm_rect"),_(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),ot(t,n),this.g.V("stylized_image",(r,s)=>{var i=!this.h,o=r.data,a=r.width;const c=a*(r=r.height);if(o instanceof Uint8Array)if(o.length===3*c){const h=new Uint8ClampedArray(4*c);for(let m=0;m<c;++m)h[4*m]=o[3*m],h[4*m+1]=o[3*m+1],h[4*m+2]=o[3*m+2],h[4*m+3]=255;o=new ImageData(h,a,r)}else{if(o.length!==4*c)throw Error("Unsupported channel count: "+o.length/c);o=new ImageData(new Uint8ClampedArray(o.buffer,o.byteOffset,o.length),a,r)}else if(!(o instanceof WebGLTexture))throw Error(`Unsupported format: ${o.constructor.name}`);a=new j([o],!1,!1,this.g.i.canvas,this.P,a,r),this.s=i=i?a.clone():a,this.h&&this.h(i),u(this,s)}),this.g.attachEmptyPacketListener("stylized_image",r=>{this.s=null,this.h&&this.h(null),u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};bt.prototype.stylize=bt.prototype.Ka,bt.prototype.setOptions=bt.prototype.o,bt.createFromModelPath=function(t,e){return y(bt,t,{baseOptions:{modelAssetPath:e}})},bt.createFromModelBuffer=function(t,e){return y(bt,t,{baseOptions:{modelAssetBuffer:e}})},bt.createFromOptions=function(t,e){return y(bt,t,e)};var As=vt([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function vi(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function wi(t){return t.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function bi(t,e=!0){const n=[];for(const s of t){var r=Rn(s);t=[];for(const i of r.g())r=e&&ft(i,1)!=null?ft(i,1)??0:-1,t.push({score:C(i,2)??0,index:r,categoryName:dt(i,3)??""??"",displayName:dt(i,4)??""??""});n.push(t)}return n}var Z=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],g(t=this.j=new ea,0,1,e=new P),this.s=new os,g(this.j,0,2,this.s),this.C=new is,g(this.s,0,3,this.C),this.v=new ta,g(this.s,0,2,this.v),this.h=new G2,g(this.j,0,3,this.h),f(this.v,2,.5),f(this.s,4,.5),f(this.C,2,.5)}get baseOptions(){return v(this.j,P,1)}set baseOptions(t){g(this.j,0,1,t)}o(t){if(Tt(this.v,3,t.numHands??1),"minHandDetectionConfidence"in t&&f(this.v,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&f(this.s,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&f(this.C,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new oe,n=e,r=pr(t.cannedGesturesClassifierOptions,v(this.h,oe,3)?.h());g(n,0,2,r),g(this.h,0,3,e)}else t.cannedGesturesClassifierOptions===void 0&&v(this.h,oe,3)?.g();return t.customGesturesClassifierOptions?(g(n=e=new oe,0,2,r=pr(t.customGesturesClassifierOptions,v(this.h,oe,4)?.h())),g(this.h,0,4,e)):t.customGesturesClassifierOptions===void 0&&v(this.h,oe,4)?.g(),this.l(t)}Fa(t,e){return vi(this),gt(this,t,e),wi(this)}Ga(t,e,n){return vi(this),St(this,t,n,e),wi(this)}m(){var t=new J;L(t,"image_in"),L(t,"norm_rect"),b(t,"hand_gestures"),b(t,"hand_landmarks"),b(t,"world_hand_landmarks"),b(t,"handedness");const e=new rt;mt(e,V2,this.j);const n=new z;it(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),S(n,"IMAGE:image_in"),S(n,"NORM_RECT:norm_rect"),_(n,"HAND_GESTURES:hand_gestures"),_(n,"LANDMARKS:hand_landmarks"),_(n,"WORLD_LANDMARKS:world_hand_landmarks"),_(n,"HANDEDNESS:handedness"),n.o(e),ot(t,n),this.g.attachProtoVectorListener("hand_landmarks",(r,s)=>{for(const i of r){r=Ye(i);const o=[];for(const a of It(r,Wo,1))o.push({x:C(a,1)??0,y:C(a,2)??0,z:C(a,3)??0,visibility:C(a,4)??0});this.landmarks.push(o)}u(this,s)}),this.g.attachEmptyPacketListener("hand_landmarks",r=>{u(this,r)}),this.g.attachProtoVectorListener("world_hand_landmarks",(r,s)=>{for(const i of r){r=fe(i);const o=[];for(const a of It(r,Ho,1))o.push({x:C(a,1)??0,y:C(a,2)??0,z:C(a,3)??0,visibility:C(a,4)??0});this.worldLandmarks.push(o)}u(this,s)}),this.g.attachEmptyPacketListener("world_hand_landmarks",r=>{u(this,r)}),this.g.attachProtoVectorListener("hand_gestures",(r,s)=>{this.gestures.push(...bi(r,!1)),u(this,s)}),this.g.attachEmptyPacketListener("hand_gestures",r=>{u(this,r)}),this.g.attachProtoVectorListener("handedness",(r,s)=>{this.handedness.push(...bi(r)),u(this,s)}),this.g.attachEmptyPacketListener("handedness",r=>{u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Ai(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Z.prototype.recognizeForVideo=Z.prototype.Ga,Z.prototype.recognize=Z.prototype.Fa,Z.prototype.setOptions=Z.prototype.o,Z.
15createFromModelPath=function(t,e){return y(Z,t,{baseOptions:{modelAssetPath:e}})},Z.createFromModelBuffer=function(t,e){return y(Z,t,{baseOptions:{modelAssetBuffer:e}})},Z.createFromOptions=function(t,e){return y(Z,t,e)},Z.HAND_CONNECTIONS=As;var Q=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],g(t=this.h=new os,0,1,e=new P),this.s=new is,g(this.h,0,3,this.s),this.j=new ta,g(this.h,0,2,this.j),Tt(this.j,3,1),f(this.j,2,.5),f(this.s,2,.5),f(this.h,4,.5)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){return"numHands"in t&&Tt(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&f(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&f(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&f(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],gt(this,t,e),Ai(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],St(this,t,n,e),Ai(this)}m(){var t=new J;L(t,"image_in"),L(t,"norm_rect"),b(t,"hand_landmarks"),b(t,"world_hand_landmarks"),b(t,"handedness");const e=new rt;mt(e,j2,this.h);const n=new z;it(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),S(n,"IMAGE:image_in"),S(n,"NORM_RECT:norm_rect"),_(n,"LANDMARKS:hand_landmarks"),_(n,"WORLD_LANDMARKS:world_hand_landmarks"),_(n,"HANDEDNESS:handedness"),n.o(e),ot(t,n),this.g.attachProtoVectorListener("hand_landmarks",(r,s)=>{for(const i of r)r=Ye(i),this.landmarks.push(Nn(r));u(this,s)}),this.g.attachEmptyPacketListener("hand_landmarks",r=>{u(this,r)}),this.g.attachProtoVectorListener("world_hand_landmarks",(r,s)=>{for(const i of r)r=fe(i),this.worldLandmarks.push(Ue(r));u(this,s)}),this.g.attachEmptyPacketListener("world_hand_landmarks",r=>{u(this,r)}),this.g.attachProtoVectorListener("handedness",(r,s)=>{var i=this.handedness,o=i.push;const a=[];for(const c of r){r=Rn(c);const h=[];for(const m of r.g())h.push({score:C(m,2)??0,index:ft(m,1)??0??-1,categoryName:dt(m,3)??""??"",displayName:dt(m,4)??""??""});a.push(h)}o.call(i,...a),u(this,s)}),this.g.attachEmptyPacketListener("handedness",r=>{u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Q.prototype.detectForVideo=Q.prototype.F,Q.prototype.detect=Q.prototype.D,Q.prototype.setOptions=Q.prototype.o,Q.createFromModelPath=function(t,e){return y(Q,t,{baseOptions:{modelAssetPath:e}})},Q.createFromModelBuffer=function(t,e){return y(Q,t,{baseOptions:{modelAssetBuffer:e}})},Q.createFromOptions=function(t,e){return y(Q,t,e)},Q.HAND_CONNECTIONS=As;var La=vt([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function Ei(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function ki(t){try{if(!t.C)return t.h;t.C(t.h)}finally{Dn(t)}}function Qe(t,e){t=Ye(t),e.push(Nn(t))}var F=class extends q{constructor(t,e){super(new pt(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,g(t=this.j=new oa,0,1,e=new P),this.K=new is,g(this.j,0,2,this.K),this.Y=new H2,g(this.j,0,3,this.Y),this.s=new Cn,g(this.j,0,4,this.s),this.H=new $o,g(this.j,0,5,this.H),this.v=new sa,g(this.j,0,6,this.v),this.L=new ia,g(this.j,0,7,this.L),f(this.s,2,.5),f(this.s,3,.3),f(this.H,2,.5),f(this.v,2,.5),f(this.v,3,.3),f(this.L,2,.5),f(this.K,2,.5)}get baseOptions(){return v(this.j,P,1)}set baseOptions(t){g(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&f(this.s,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&f(this.s,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&f(this.H,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&f(this.v,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&f(this.v,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&f(this.L,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&f(this.K,2,t.minHandLandmarksConfidence??.5),this.l(t)}D(t,e,n){const r=typeof e!="function"?e:{};return this.C=typeof e=="function"?e:n,Ei(this),gt(this,t,r),ki(this)}F(t,e,n,r){const s=typeof n!="function"?n:{};return this.C=typeof n=="function"?n:r,Ei(this),St(this,t,s,e),ki(this)}m(){var t=new J;L(t,"input_frames_image"),b(t,"pose_landmarks"),b(t,"pose_world_landmarks"),b(t,"face_landmarks"),b(t,"left_hand_landmarks"),b(t,"left_hand_world_landmarks"),b(t,"right_hand_landmarks"),b(t,"right_hand_world_landmarks");const e=new rt,n=new Xs;cr(n,1,Le("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(s,i){if
15(i!=null)if(Array.isArray(i))T(s,2,bn(i,Rr,void 0,void 0,!1));else{if(!(typeof i=="string"||i instanceof Pt||Qt(i)))throw Error("invalid value in Any.value field: "+i+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");cr(s,2,Sr(i,!1),te())}}(n,this.j.g());const r=new z;it(r,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),an(r,8,Xs,n),S(r,"IMAGE:input_frames_image"),_(r,"POSE_LANDMARKS:pose_landmarks"),_(r,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),_(r,"FACE_LANDMARKS:face_landmarks"),_(r,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),_(r,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),_(r,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),_(r,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),r.o(e),ot(t,r),Bn(this,t),this.g.attachProtoListener("pose_landmarks",(s,i)=>{Qe(s,this.h.poseLandmarks),u(this,i)}),this.g.attachEmptyPacketListener("pose_landmarks",s=>{u(this,s)}),this.g.attachProtoListener("pose_world_landmarks",(s,i)=>{var o=this.h.poseWorldLandmarks;s=fe(s),o.push(Ue(s)),u(this,i)}),this.g.attachEmptyPacketListener("pose_world_landmarks",s=>{u(this,s)}),this.outputPoseSegmentationMasks&&(_(r,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),we(this,"pose_segmentation_mask"),this.g.V("pose_segmentation_mask",(s,i)=>{this.h.poseSegmentationMasks=[Ee(this,s,!0,!this.C)],u(this,i)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",s=>{this.h.poseSegmentationMasks=[],u(this,s)})),this.g.attachProtoListener("face_landmarks",(s,i)=>{Qe(s,this.h.faceLandmarks),u(this,i)}),this.g.attachEmptyPacketListener("face_landmarks",s=>{u(this,s)}),this.outputFaceBlendshapes&&(b(t,"extra_blendshapes"),_(r,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(s,i)=>{var o=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(s=Rn(s),o.push(us(s.g()??[]))),u(this,i)}),this.g.attachEmptyPacketListener("extra_blendshapes",s=>{u(this,s)})),this.g.attachProtoListener("left_hand_landmarks",(s,i)=>{Qe(s,this.h.leftHandLandmarks),u(this,i)}),this.g.attachEmptyPacketListener("left_hand_landmarks",s=>{u(this,s)}),this.g.attachProtoListener("left_hand_world_landmarks",(s,i)=>{var o=this.h.leftHandWorldLandmarks;s=fe(s),o.push(Ue(s)),u(this,i)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",s=>{u(this,s)}),this.g.attachProtoListener("right_hand_landmarks",(s,i)=>{Qe(s,this.h.rightHandLandmarks),u(this,i)}),this.g.attachEmptyPacketListener("right_hand_landmarks",s=>{u(this,s)}),this.g.attachProtoListener("right_hand_world_landmarks",(s,i)=>{var o=this.h.rightHandWorldLandmarks;s=fe(s),o.push(Ue(s)),u(this,i)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",s=>{u(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};F.prototype.detectForVideo=F.prototype.F,F.prototype.detect=F.prototype.D,F.prototype.setOptions=F.prototype.o,F.createFromModelPath=function(t,e){return y(F,t,{baseOptions:{modelAssetPath:e}})},F.createFromModelBuffer=function(t,e){return y(F,t,{baseOptions:{modelAssetBuffer:e}})},F.createFromOptions=function(t,e){return y(F,t,e)},F.HAND_CONNECTIONS=As,F.POSE_CONNECTIONS=La,F.FACE_LANDMARKS_LIPS=ms,F.FACE_LANDMARKS_LEFT_EYE=ys,F.FACE_LANDMARKS_LEFT_EYEBROW=_s,F.FACE_LANDMARKS_LEFT_IRIS=Ea,F.FACE_LANDMARKS_RIGHT_EYE=vs,F.FACE_LANDMARKS_RIGHT_EYEBROW=ws,F.FACE_LANDMARKS_RIGHT_IRIS=ka,F.FACE_LANDMARKS_FACE_OVAL=bs,F.FACE_LANDMARKS_CONTOURS=Ta,F.FACE_LANDMARKS_TESSELATION=Sa;var ht=class extends q{constructor(t,e){super(new pt(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},g(t=this.h=new aa,0,1,e=new P)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){return g(this.h,0,2,pr(t,v(this.h,ns,2))),this.l(t)}qa(t,e){return this.j={classifications:[]},gt(this,t,e),this.j}ra(t,e,n){return this.j={classifications:[]},St(this,t,n,e),this.j}m(){var t=new J;L(t,"input_image"),L(t,"norm_rect"),b(t,"classifications");const e=new rt;mt(e,W2,this.h);const n=new z;it(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),S(n,"IMAGE:input_image"),S(n,"NORM_RECT:norm_rect"),_(n,"CLASSIFICATIONS:classifications"),n.o(e),ot(t,n),this.g.attachProtoListener("classifications",(r,s)=>{this.j=function(i){const o={classifications:It(i,P2,1).map(a=>us(v(a,Go,4)?.g()??[],ft(a,2)??0,dt(a,3)??""))};return ir(_e(i,2))!=null&&(o.timestampMs=ir(_e(i,2))??0),o}(x2(r)),u(this,s)}),this.g.attachEmptyPacketListener("classifications",r=>{u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ht.prototype.classifyForVideo=ht.prototype.ra,ht.prototype.classify=ht.prototype.qa,ht.prototype.setOptions=ht.prototype.o,ht.createFromModelPath=function(t,e){return y(ht,t,{baseOptions:{modelAssetPath:e}})},ht.createFromModelBuffer=function(t,e){return y(ht,t,{baseOptions:{modelAssetBuffer:e}})},ht.createFromOptions=function(t,e){return y(ht,t,e)};var tt=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect",!0),this.h=new ca,this.embeddings={embeddings:[]},g(t=this.h,0,1,e=new P)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){var e=this.h,n=v(this.h,ni,2);return n=n?n.clone():new ni,t.l2Normalize!==void 0?We(n,1,t.l2Normalize):"l2Normalize"in t&&T(n,1),t.quantize!==void 0?We(n,2,t.quantize):"quantize"in t&&T(n,2),g(e,0,2,n),this.l(t)}xa(t,e){return gt(this,t,e),this.embeddings}ya(t,e,n){return St(this,t,n,e),this.embeddings}m(){var t=new J;L(t,"image_in"),L(t,"norm_rect"),b(t,"embeddings_out");const e=new rt;mt(e,z2,this.h);const n=new z;it(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),S(n,"IMAGE:image_in"),S(n,"NORM_RECT:norm_rect"),_(n,"EMBEDDINGS:embeddings_out"),n.o(e),ot(t,n),this.g.attachProtoListener("embeddings_out",(r,s)=>
15{r=R2(r),this.embeddings=function(i){return{embeddings:It(i,I2,1).map(o=>{const a={headIndex:ft(o,3)??0??-1,headName:dt(o,4)??""??""};if(io(o,ei,Yn(o,1))!==void 0)o=Jt(o=v(o,ei,Yn(o,1)),1,Kt,qt()),a.floatEmbedding=o.slice();else{const c=new Uint8Array(0);a.quantizedEmbedding=v(o,O2,Yn(o,2))?.ma()?.h()??c}return a}),timestampMs:ir(_e(i,2))??0}}(r),u(this,s)}),this.g.attachEmptyPacketListener("embeddings_out",r=>{u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};tt.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=ai(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=ai(oi(t.quantizedEmbedding),oi(e.quantizedEmbedding))}return t},tt.prototype.embedForVideo=tt.prototype.ya,tt.prototype.embed=tt.prototype.xa,tt.prototype.setOptions=tt.prototype.o,tt.createFromModelPath=function(t,e){return y(tt,t,{baseOptions:{modelAssetPath:e}})},tt.createFromModelBuffer=function(t,e){return y(tt,t,{baseOptions:{modelAssetBuffer:e}})},tt.createFromOptions=function(t,e){return y(tt,t,e)};var _r=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};function Ti(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Si(t){try{const e=new _r(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{Dn(t)}}_r.prototype.close=_r.prototype.close;var Y=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new hs,this.v=new ha,g(this.h,0,3,this.v),g(t=this.h,0,1,e=new P)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){return t.displayNamesLocale!==void 0?T(this.h,2,Le(t.displayNamesLocale)):"displayNamesLocale"in t&&T(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}J(){(function(t){const e=It(t.ca(),z,1).filter(n=>(dt(n,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");e.length===1&&(v(e[0],rt,7)?.l()?.g()??new Map).forEach((n,r)=>{t.s[Number(r)]=dt(n,1)??""})})(this)}segment(t,e,n){const r=typeof e!="function"?e:{};return this.j=typeof e=="function"?e:n,Ti(this),gt(this,t,r),Si(this)}Ia(t,e,n,r){const s=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:r,Ti(this),St(this,t,s,e),Si(this)}Ba(){return this.s}m(){var t=new J;L(t,"image_in"),L(t,"norm_rect");const e=new rt;mt(e,la,this.h);const n=new z;it(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),S(n,"IMAGE:image_in"),S(n,"NORM_RECT:norm_rect"),n.o(e),ot(t,n),Bn(this,t),this.outputConfidenceMasks&&(b(t,"confidence_masks"),_(n,"CONFIDENCE_MASKS:confidence_masks"),we(this,"confidence_masks"),this.g.ba("confidence_masks",(r,s)=>{this.confidenceMasks=r.map(i=>Ee(this,i,!0,!this.j)),u(this,s)}),this.g.attachEmptyPacketListener("confidence_masks",r=>{this.confidenceMasks=[],u(this,r)})),this.outputCategoryMask&&(b(t,"category_mask"),_(n,"CATEGORY_MASK:category_mask"),we(this,"category_mask"),this.g.V("category_mask",(r,s)=>{this.categoryMask=Ee(this,r,!1,!this.j),u(this,s)}),this.g.attachEmptyPacketListener("category_mask",r=>{this.categoryMask=void 0,u(this,r)})),b(t,"quality_scores"),_(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(r,s)=>{this.qualityScores=r,u(this,s)}),this.g.attachEmptyPacketListener("quality_scores",r=>{this.categoryMask=void 0,u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Y.prototype.getLabels=Y.prototype.Ba,Y.prototype.segmentForVideo=Y.prototype.Ia,Y.prototype.segment=Y.prototype.segment,Y.prototype.setOptions=Y.prototype.o,Y.createFromModelPath=function(t,e){return y(Y,t,{baseOptions:{modelAssetPath:e}})},Y.createFromModelBuffer=function(t,e){return y(Y,t,{baseOptions:{modelAssetBuffer:e}})},Y.createFromOptions=function(t,e){return y(Y,t,e)};var vr=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qual
15ityScores=n}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};vr.prototype.close=vr.prototype.close;var Q2=class extends l{constructor(t){super(t)}},ce=[0,R,-2],ln=[0,Lt,-3,M,Lt,-1],Li=[0,ln],Fi=[0,ln,R,-1],tr=class extends l{constructor(t){super(t)}},Mi=[0,Lt,-1,M],t1=class extends l{constructor(t){super(t)}},Pi=class extends l{constructor(t){super(t)}},wr=[1,2,3,4,5,6,7,8,9,10,14,15],Fa=class extends l{constructor(t){super(t)}};Fa.prototype.g=In([0,G,[0,wr,A,ln,A,[0,ln,ce],A,Li,A,[0,Li,ce],A,Mi,A,[0,Lt,-3,M,nt],A,[0,Lt,-3,M],A,[0,E,Lt,-2,M,R,M,-1,2,Lt,ce],A,Fi,A,[0,Fi,ce],Lt,ce,E,A,[0,Lt,-3,M,ce,-1],A,[0,G,Mi]],E,[0,E,R,-1,M]]);var At=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new hs,this.s=new ha,g(this.h,0,3,this.s),g(t=this.h,0,1,e=new P)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}segment(t,e,n,r){const s=typeof n!="function"?n:{};this.j=typeof n=="function"?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,r=new Fa;const i=new Pi;var o=new Q2;if(Tt(o,1,255),g(i,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new tr;We(a,3,!0),f(a,1,e.keypoint.x),f(a,2,e.keypoint.y),Be(i,5,wr,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new t1,e.scribble))We(e=new tr,3,!0),f(e,1,a.x),f(e,2,a.y),an(o,1,tr,e);Be(i,15,wr,o)}an(r,1,Pi,i),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),gt(this,t,s);t:{try{const h=new vr(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=h;break t}this.j(h)}finally{Dn(this)}c=void 0}return c}m(){var t=new J;L(t,"image_in"),L(t,"roi_in"),L(t,"norm_rect_in");const e=new rt;mt(e,la,this.h);const n=new z;it(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),S(n,"IMAGE:image_in"),S(n,"ROI:roi_in"),S(n,"NORM_RECT:norm_rect_in"),n.o(e),ot(t,n),Bn(this,t),this.outputConfidenceMasks&&(b(t,"confidence_masks"),_(n,"CONFIDENCE_MASKS:confidence_masks"),we(this,"confidence_masks"),this.g.ba("confidence_masks",(r,s)=>{this.confidenceMasks=r.map(i=>Ee(this,i,!0,!this.j)),u(this,s)}),this.g.attachEmptyPacketListener("confidence_masks",r=>{this.confidenceMasks=[],u(this,r)})),this.outputCategoryMask&&(b(t,"category_mask"),_(n,"CATEGORY_MASK:category_mask"),we(this,"category_mask"),this.g.V("category_mask",(r,s)=>{this.categoryMask=Ee(this,r,!1,!this.j),u(this,s)}),this.g.attachEmptyPacketListener("category_mask",r=>{this.categoryMask=void 0,u(this,r)})),b(t,"quality_scores"),_(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(r,s)=>{this.qualityScores=r,u(this,s)}),this.g.attachEmptyPacketListener("quality_scores",r=>{this.categoryMask=void 0,u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};At.prototype.segment=At.prototype.segment,At.prototype.setOptions=At.prototype.o,At.createFromModelPath=function(t,e){return y(At,t,{baseOptions:{modelAssetPath:e}})},At.createFromModelBuffer=function(t,e){return y(At,t,{baseOptions:{modelAssetBuffer:e}})},At.createFromOptions=function(t,e){return y(At,t,e)};var ut=class extends q{constructor(t,e){super(new pt(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},g(t=this.h=new fa,0,1,e=new P)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){return t.displayNamesLocale!==void 0?T(this.h,2,Le(t.displayNamesLocale)):"displayNamesLocale"in t&&T(this.h,2),t.maxResults!==void 0?Tt(this.h,3,t.maxResults):"maxResults"in t&&T(this.h,3),t.scoreThreshold!==void 0?f(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&T(this.h,4),t.categoryAllowlist!==void 0?cn(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&T(this.h,5),t.categoryDenylist!==void 0?cn(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&T(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},gt(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},St(this,t,n,e),this.j}m(){var t=new J;L(t,"input_frame_gpu"),L(t,"norm_rect"),b(t,"detections");const e=new rt;mt(e,X2,this.h);const n=new z;it(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),S(n,"IMAGE:input_frame_gpu"),S(n,"NORM_RECT:norm_rect"),_(n,"DETECTIONS:detections"),n.o(e),ot(t,n),this.g.attachProtoVectorListener("detections",(r,s)=>{for(const i of r)r=jo(i),this.j.detections.push(pa(r));u(this,s)}),this.g.attachEmptyPacketListener("detections",r=>{u(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ut.prototype.detectForVideo=ut.prototype.F,ut.prototype.detect=ut.prototype.D,ut.prototype.setOptions=ut.prototype.o,ut.createFromModelPath=async function(t,e){return y(ut,t,{baseOptions:{modelAssetPath:e}})},ut.createFromModelBuffer=function(t,e){return y(ut,t,{baseOptions:{modelAssetBuffer:e}})},ut.createFromOptions=function(t,e){return y(ut,t,e)};var br=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach(t=>{t.close()})}};function xi(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Oi(t){try{const e=new br(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{Dn(t)}}br.prototype.close=br.prototype.close;var et=class extends q{constructor(t,e){super(new pt(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,g(t=this.h=new da,0,1,e=new P),this.v=new ia,g(this.h,0,3,this.v),this.j=new sa,g(this.h,0,2,this.j),Tt(this.j,4,1),f(this.j,2,.5),f(this.v,2,.5),f(this.h,4,.5)}get baseOptions(){return v(this.h,P,1)}set baseOptions(t){g(this.h,0,1,t)}o(t){return"numPoses"in t&&Tt(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&f(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&f(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&f(this.v,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}D(t,e,n){const r=typeof e!="function"?e:{};return this.s=typeof e=="function"?e:n,xi(this),gt(this,t,r),Oi(this)}F(t,e,n,r){const s=typeof n!="function"?n:{};return this.s=typeof n=="function"?n:r,xi(this),St(this,t,s,e),Oi(this)}m(){var t=new J;L(t,"image_in"),L(t,"norm_rect"),b(t,"normalized_landmarks"),b(t,"world_landmarks"),b(t,"segmentation_masks");const e=new rt;mt(e,Y2,this.h);const n=new z;it(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),S(n,"IMAGE:image_in"),S(n,"NORM_RECT:norm_rect"),_(n,"NORM_LANDMARKS:normalized_landmarks"),_(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),ot(t,n),Bn(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(r,s)=>{this.landmarks=[];for(const i of r)r=Ye(i),this.landmarks.push(Nn(r));
15u(this,s)}),this.g.attachEmptyPacketListener("normalized_landmarks",r=>{this.landmarks=[],u(this,r)}),this.g.attachProtoVectorListener("world_landmarks",(r,s)=>{this.worldLandmarks=[];for(const i of r)r=fe(i),this.worldLandmarks.push(Ue(r));u(this,s)}),this.g.attachEmptyPacketListener("world_landmarks",r=>{this.worldLandmarks=[],u(this,r)}),this.outputSegmentationMasks&&(_(n,"SEGMENTATION_MASK:segmentation_masks"),we(this,"segmentation_masks"),this.g.ba("segmentation_masks",(r,s)=>{this.segmentationMasks=r.map(i=>Ee(this,i,!0,!this.s)),u(this,s)}),this.g.attachEmptyPacketListener("segmentation_masks",r=>{this.segmentationMasks=[],u(this,r)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};et.prototype.detectForVideo=et.prototype.F,et.prototype.detect=et.prototype.D,et.prototype.setOptions=et.prototype.o,et.createFromModelPath=function(t,e){return y(et,t,{baseOptions:{modelAssetPath:e}})},et.createFromModelBuffer=function(t,e){return y(et,t,{baseOptions:{modelAssetBuffer:e}})},et.createFromOptions=function(t,e){return y(et,t,e)},et.POSE_CONNECTIONS=La;export{ae as U,tt as k};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.