@mediapipe/tasks-vision 0.10.34 → 0.10.36-rc.20260507

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/vision_bundle.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof self?self:{};function e(e,n){t:{for(var r=["CLOSURE_FLAGS"],i=t,s=0;s<r.length;s++)if(null==(i=i[r[s]])){r=null;break t}r=i}return null!=(e=r&&r[e])?e:n}function n(){throw Error("Invalid UTF8")}function r(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let i,s;const o="undefined"!=typeof TextDecoder;let a;const c="undefined"!=typeof TextEncoder;function h(t){if(c)t=(a||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)r[n++]=e;else{if(e<2048)r[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){const s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}function u(e){t.setTimeout((()=>{throw e}),0)}var l,f=e(610401301,!1),d=e(748402147,!0);function p(){var e=t.navigator;return e&&(e=e.userAgent)?e:""}const g=t.navigator;function m(t){return m[" "](t),t}l=g&&g.userAgentData||null,m[" "]=function(){};const y={};let _=null;function v(t){const e=t.length;let n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);const r=new Uint8Array(n);let i=0;return function(t,e){function n(e){for(;r<t.length;){const e=t.charAt(r++),n=_[e];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}E();let r=0;for(;;){const t=n(-1),r=n(0),i=n(64),s=n(64);if(64===s&&-1===t)break;e(t<<2|r>>4),64!=i&&(e(r<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}function E(){if(!_){_={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const r=t.concat(e[n].split(""));y[n]=r;for(let t=0;t<r.length;t++){const e=r[t];void 0===_[e]&&(_[e]=t)}}}}var w="undefined"!=typeof Uint8Array,T=!(!(f&&l&&l.brands.length>0)&&(-1!=p().indexOf("Trident")||-1!=p().indexOf("MSIE")))&&"function"==typeof btoa;const A=/[-_.]/g,b={"-":"+",_:"/",".":"="};function k(t){return b[t]||""}function x(t){if(!T)return v(t);t=A.test(t)?t.replace(A,k):t,t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function S(t){return w&&null!=t&&t instanceof Uint8Array}var L={};function R(){return M||=new F(null,L)}function I(t){C(L);var e=t.g;return null==(e=null==e||S(e)?e:"string"==typeof e?x(e):null)?e:t.g=e}var F=class{h(){return new Uint8Array(I(this)||0)}constructor(t,e){if(C(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let M,P;function C(t){if(t!==L)throw Error("illegal external caller")}function O(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function N(t){return O(t=Error(t),"warning"),t}function U(t,e){if(null!=t){var n=P??={},r=n[t]||0;r>=e||(n[t]=r+1,O(t=Error(),"incident"),u(t))}}function D(){return"function"==typeof BigInt}var B="function"==typeof Symbol&&"symbol"==typeof Symbol();function G(t,e,n=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?n&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var j=G("jas",void 0,!0),V=G(void 0,"0di"),X=G(void 0,"1oa"),H=G(void 0,Symbol()),W=G(void 0,"0ub"),z=G(void 0,"0ubs"),K=G(void 0,"0ubsb"),Y=G(void 0,"0actk"),q=G("m_m","Pa",!0),$=G();const J={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},Z=Object.defineProperties,Q=B?j:"Ga";var tt;const et=[];function nt(t,e){B||Q in t||Z(t,J),t[Q]|=e}function rt(t,e){B||Q in t||Z(t,J),t[Q]=e}function it(t){return nt(t,34),t}function st(t){return nt(t,8192),t}rt(et,7),tt=Object.freeze(et);var ot={};function at(t,e){return void 0===e?t.h!==ct&&!!(2&(0|t.v[Q])):!!(2&e)&&t.h!==ct}const ct={};function ht(t,e){if(null!=t)if("string"==typeof t)t=t?new F(t,L):R();else if(t.constructor!==F)if(S(t))t=t.length?new F(new Uint8Array(t),L):R();else{if(!e)throw Error();t=void 0}return t}class ut{constructor(t,e,n){this.g=t,this.h=e,this.l=n}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}var lt=Object.freeze({});function ft(t,e,n){const r=128&e?0:-1,i=t.length;var s;(s=!!i)&&(s=null!=(s=t[i-1])&&"object"==typeof s&&s.constructor===Object);const o=i+(s?-1:0);for(e=128&e?1:0;e<o;e++)n(e-r,t[e]);if(s){t=t[i-1];for(const e in t)!isNaN(e)&&n(+e,t[e])}}var dt={};function pt(t){return 128&t?dt:void 0}function gt(t){return t.Na=!0,t}var mt=gt((t=>"number"==typeof t)),yt=gt((t=>"string"==typeof t)),_t=gt((t=>"boolean"==typeof t)),vt="function"==typeof t.BigInt&&"bigint"==typeof t.BigInt(0);function Et(t){var e=t;if(yt(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(mt(e)&&!Number.isSafeInteger(e))throw Error(String(e));return vt?BigInt(t):t=_t(t)?t?"1":"0":yt(t)?t.trim()||"0":String(t)}var wt=gt((t=>vt?t>=At&&t<=kt:"-"===t[0]?xt(t,Tt):xt(t,bt)));const Tt=Number.MIN_SAFE_INTEGER.toString(),At=vt?BigInt(Number.MIN_SAFE_INTEGER):void 0,bt=Number.MAX_SAFE_INTEGER.toString(),kt=vt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function xt(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let n=0;n<t.length;n++){const r=t[n],i=e[n];if(r>i)return!1;if(r<i)return!0}}const St="function"==typeof Uint8Array.prototype.slice;let Lt,Rt=0,It=0;function Ft(t){const e=t>>>0;Rt=e,It=(t-e)/4294967296>>>0}function Mt(t){if(t<0){Ft(-t);const[e,n]=jt(Rt,It);Rt=e>>>0,It=n>>>0}else Ft(t)}function Pt(t){const e=Lt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),It=0,Rt=e.getUint32(0,!0)}function Ct(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:Ut(t,e)}function Ot(t,e){return Et(D()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):Ut(t,e))}function Nt(t,e){return D()?Et(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):Et(Bt(t,e))}function Ut(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else D()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=t/1e7>>>0,t%=1e7),n>=1e7&&(e+=n/1e7>>>0,n%=1e7),n=e+Dt(n)+Dt(t));return n}function Dt(t){return t=String(t),"0000000".slice(t.length)+t}function Bt(t,e){if(2147483648&e)if(D())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=jt(t,e);t="-"+Ut(n,r)}else t=Ut(t,e);return t}function Gt(t){if(t.length<16)Mt(Number(t));else if(D())t=BigInt(t),Rt=Number(t&BigInt(4294967295))>>>0,It=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);It=Rt=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));It*=1e6,Rt=1e6*Rt+e,Rt>=4294967296&&(It+=Math.trunc(Rt/4294967296),It>>>=0,Rt>>>=0)}if(e){const[t,e]=jt(Rt,It);Rt=t,It=e}}}function jt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Vt(t){return Array.prototype.slice.call(t)}const Xt="function"==typeof BigInt?BigInt.asIntN:void 0,Ht="function"==typeof BigInt?BigInt.asUintN:void 0,Wt=Number.isSafeInteger,zt=Number.isFinite,Kt=Math.trunc,Yt=Et(0);function qt(t){if(null!=t&&"number"!=typeof t)throw Error(`Value of float/double field must be a number, found ${typeof t}: ${t}`);return t}function $t(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Jt(t){if(null!=t&&"boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}function Zt(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}const Qt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function te(t){switch(typeof t){case"bigint":return!0;case"number":return zt(t);case"string":return Qt.test(t);default:return!1}}function ee(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?0|t:void 0}function ne(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?t>>>0:void 0}function re(t){const e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(Gt(t),Bt(Rt,It))}function ie(t){if(t=Kt(t),!Wt(t)){Mt(t);var e=Rt,n=It;(t=2147483648&n)&&(n=~n>>>0,0==(e=1+~e>>>0)&&(n=n+1>>>0)),t="number"==typeof(e=Ct(e,n))?t?-e:e:t?"-"+e:e}return t}function se(t){var e=Kt(Number(t));return Wt(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),re(t))}function oe(t){var e=Kt(Number(t));return Wt(e)?Et(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),D()?Et(Xt(64,BigInt(t))):Et(re(t)))}function ae(t){return Wt(t)?t=Et(ie(t)):(t=Kt(t),Wt(t)?t=String(t):(Mt(t),t=Bt(Rt,It)),t=Et(t)),t}function ce(t){const e=typeof t;return null==t?t:"bigint"===e?Et(Xt(64,t)):te(t)?"string"===e?oe(t):ae(t):void 0}function he(t){if("string"!=typeof t)throw Error();return t}function ue(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function le(t){return null==t||"string"==typeof t?t:void 0}function fe(t,e,n,r){return null!=t&&t[q]===ot?t:Array.isArray(t)?((r=(n=0|t[Q])|32&r|2&r)!==n&&rt(t,r),new e(t)):(n?2&r?((t=e[V])||(it((t=new e).v),t=e[V]=t),e=t):e=new e:e=void 0,e)}function de(t,e,n){if(e)t:{if(!te(e=t))throw N("int64");switch(typeof e){case"string":e=oe(e);break t;case"bigint":e=Et(Xt(64,e));break t;default:e=ae(e)}}else e=ce(t);return null==(t=e)?n?Yt:void 0:t}const pe={};let ge=function(){try{return m(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class me{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}const ye=ge?(Object.setPrototypeOf(me.prototype,Map.prototype),Object.defineProperties(me.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),me):class extends Map{constructor(){super()}};function _e(t){return t}function ve(t){if(2&t.J)throw Error("Cannot mutate an immutable Map")}var Ee=class extends ye{constructor(t,e,n=_e,r=_e){super(),this.J=0|t[Q],this.K=e,this.S=n,this.fa=this.K?we:r;for(let i=0;i<t.length;i++){const s=t[i],o=n(s[0],!1,!0);let a=s[1];e?void 0===a&&(a=null):a=r(s[1],!1,!0,void 0,void 0,this.J),super.set(o,a)}}V(t){return st(Array.from(super.entries(),t))}clear(){ve(this),super.clear()}delete(t){return ve(this),super.delete(this.S(t,!0,!1))}entries(){if(this.K){var t=super.keys();t=new ut(t,Te,this)}else t=super.entries();return t}values(){if(this.K){var t=super.keys();t=new ut(t,Ee.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.K?super.forEach(((n,r,i)=>{t.call(e,i.get(r),r,i)})):super.forEach(t,e)}set(t,e){return ve(this),null==(t=this.S(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.fa(e,!0,!0,this.K,!1,this.J))}Ma(t){const e=this.S(t[0],!1,!0);t=t[1],t=this.K?void 0===t?null:t:this.fa(t,!1,!0,void 0,!1,this.J),super.set(e,t)}has(t){return super.has(this.S(t,!1,!1))}get(t){t=this.S(t,!1,!1);const e=super.get(t);if(void 0!==e){var n=this.K;return n?((n=this.fa(e,!1,!0,n,this.ra,this.J))!==e&&super.set(t,n),n):e}}[Symbol.iterator](){return this.entries()}};function we(t,e,n,r,i,s){return t=fe(t,r,n,s),i&&(t=Xe(t)),t}function Te(t){return[t,this.get(t)]}let Ae;function be(){return Ae||=new Ee(it([]),void 0,void 0,void 0,pe)}function ke(t){return H?t[H]:void 0}function xe(t,e){for(const n in t)!isNaN(n)&&e(t,+n,t[n])}Ee.prototype.toJSON=void 0;var Se=class{};const Le={Ka:!0};function Re(t,e){e<100||U(z,1)}function Ie(t,e,n,r){const i=void 0!==r;r=!!r;var s,o=H;!i&&B&&o&&(s=t[o])&&xe(s,Re),o=[];var a=t.length;let c;s=4294967295;let h=!1;const u=!!(64&e),l=u?128&e?0:-1:void 0;1&e||(c=a&&t[a-1],null!=c&&"object"==typeof c&&c.constructor===Object?s=--a:c=void 0,!u||128&e||i||(h=!0,s=s-l+l)),e=void 0;for(var f=0;f<a;f++){let i=t[f];if(null!=i&&null!=(i=n(i,r)))if(u&&f>=s){const t=f-l;(e??={})[t]=i}else o[f]=i}if(c)for(let t in c){if(null==(a=c[t])||null==(a=n(a,r)))continue;let i;f=+t,u&&!Number.isNaN(f)&&(i=f+l)<s?o[i]=a:(e??={})[t]=a}return e&&(h?o.push(e):o[s]=e),i&&H&&(t=ke(t))&&t instanceof Se&&(o[H]=function(t){const e=new Se;return xe(t,((t,n,r)=>{e[n]=Vt(r)})),e.da=t.da,e}(t)),o}function Fe(t){return t[0]=Me(t[0]),t[1]=Me(t[1]),t}function Me(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return wt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[Q];return 0===t.length&&1&e?void 0:Ie(t,e,Me)}if(null!=t&&t[q]===ot)return Oe(t);if(t instanceof F){if(null==(e=t.g))t="";else if("string"==typeof e)t=e;else{if(T){for(var n="",r=0,i=e.length-10240;r<i;)n+=String.fromCharCode.apply(null,e.subarray(r,r+=10240));n+=String.fromCharCode.apply(null,r?e.subarray(r):e),e=btoa(n)}else{void 0===n&&(n=0),E(),n=y[n],r=Array(Math.floor(e.length/3)),i=n[64]||"";let t=0,h=0;for(;t<e.length-2;t+=3){var s=e[t],o=e[t+1],a=e[t+2],c=n[s>>2];s=n[(3&s)<<4|o>>4],o=n[(15&o)<<2|a>>6],a=n[63&a],r[h++]=c+s+o+a}switch(c=0,a=i,e.length-t){case 2:a=n[(15&(c=e[t+1]))<<2]||i;case 1:e=e[t],r[h]=n[e>>2]+n[(3&e)<<4|c>>4]+a+i}e=r.join("")}t=t.g=e}return t}return t instanceof Ee?t=0!==t.size?t.V(Fe):void 0:void 0}return t}let Pe,Ce;function Oe(t){return Ie(t=t.v,0|t[Q],Me)}function Ne(t,e){return Ue(t,e[0],e[1])}function Ue(t,e,n,r=0){if(null==t){var i=32;n?(t=[n],i|=128):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[Q],d&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(d)throw Error("carr");U(Y,5)}(),256&i)throw Error("farr");if(64&i)return(i|r)!==i&&rt(t,i|r),t;if(n&&(i|=128,n!==t[0]))throw Error("mid");t:{i|=64;var s=(n=t).length;if(s){var o=s-1;const t=n[o];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((o-=e=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var a in t)(s=+a)<o&&(n[s+e]=t[a],delete t[a]);i=-16760833&i|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,s-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&a)<<14}}}return rt(t,64|i|r),t}function De(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var n=0|t[Q];return 0===t.length&&1&n?void 0:Be(t,n,e)}if(null!=t&&t[q]===ot)return je(t);if(t instanceof Ee){if(2&(e=t.J))return t;if(!t.size)return;if(n=it(t.V()),t.K)for(t=0;t<n.length;t++){const r=n[t];let i=r[1];i=null==i||"object"!=typeof i?void 0:null!=i&&i[q]===ot?je(i):Array.isArray(i)?Be(i,0|i[Q],!!(32&e)):void 0,r[1]=i}return n}return t instanceof F?t:void 0}function Be(t,e,n){return 2&e||(!n||4096&e||16&e?t=Ve(t,e,!1,n&&!(16&e)):(nt(t,34),4&e&&Object.freeze(t))),t}function Ge(t,e,n){return t=new t.constructor(e),n&&(t.h=ct),t.m=ct,t}function je(t){const e=t.v,n=0|e[Q];return at(t,n)?t:Ke(t,e,n)?Ge(t,e):Ve(e,n)}function Ve(t,e,n,r){return r??=!!(34&e),t=Ie(t,e,De,r),r=32,n&&(r|=2),rt(t,e=16769217&e|r),t}function Xe(t){const e=t.v,n=0|e[Q];return at(t,n)?Ke(t,e,n)?Ge(t,e,!0):new t.constructor(Ve(e,n,!1)):t}function He(t){if(t.h!==ct)return!1;var e=t.v;return nt(e=Ve(e,0|e[Q]),2048),t.v=e,t.h=void 0,t.m=void 0,!0}function We(t){if(!He(t)&&at(t,0|t.v[Q]))throw Error()}function ze(t,e){void 0===e&&(e=0|t[Q]),32&e&&!(4096&e)&&rt(t,4096|e)}function Ke(t,e,n){return!!(2&n)||!(!(32&n)||4096&n)&&(rt(e,2|n),t.h=ct,!0)}const Ye=Et(0),qe={};function $e(t,e,n,r,i){if(null!==(e=Je(t.v,e,n,i))||r&&t.m!==ct)return e}function Je(t,e,n,r){if(-1===e)return null;const i=e+(n?0:-1),s=t.length-1;let o,a;if(!(s<1+(n?0:-1))){if(i>=s)if(o=t[s],null!=o&&"object"==typeof o&&o.constructor===Object)n=o[e],a=!0;else{if(i!==s)return;n=o}else n=t[i];if(r&&null!=n){if(null==(r=r(n)))return r;if(!Object.is(r,n))return a?o[e]=r:t[i]=r,r}return n}}function Ze(t,e,n,r){We(t),Qe(t=t.v,0|t[Q],e,n,r)}function Qe(t,e,n,r,i){const s=n+(i?0:-1);var o=t.length-1;if(o>=1+(i?0:-1)&&s>=o){const i=t[o];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[n]=r,e}return s<=o?(t[s]=r,e):(void 0!==r&&(n>=(o=(e??=0|t[Q])>>14&1023||536870912)?null!=r&&(t[o+(i?0:-1)]={[n]:r}):t[s]=r),e)}function tn(){return void 0===lt?2:4}function en(t,e,n,r,i){let s=t.v,o=0|s[Q];r=at(t,o)?1:r,i=!!i||3===r,2===r&&He(t)&&(s=t.v,o=0|s[Q]);let a=(t=rn(s,e))===tt?7:0|t[Q],c=sn(a,o);var h=!(4&c);if(h){4&c&&(t=Vt(t),a=0,c=An(c,o),o=Qe(s,o,e,t));let r=0,i=0;for(;r<t.length;r++){const e=n(t[r]);null!=e&&(t[i++]=e)}i<r&&(t.length=i),n=-513&(4|c),c=n&=-1025,c&=-4097}return c!==a&&(rt(t,c),2&c&&Object.freeze(t)),nn(t,c,s,o,e,r,h,i)}function nn(t,e,n,r,i,s,o,a){let c=e;return 1===s||4===s&&(2&e||!(16&e)&&32&r)?on(e)||((e|=!t.length||o&&!(4096&e)||32&r&&!(4096&e||16&e)?2:256)!==c&&rt(t,e),Object.freeze(t)):(2===s&&on(e)&&(t=Vt(t),c=0,e=An(e,r),r=Qe(n,r,i,t)),on(e)||(a||(e|=16),e!==c&&rt(t,e))),2&e||!(4096&e||16&e)||ze(n,r),t}function rn(t,e,n){return t=Je(t,e,n),Array.isArray(t)?t:tt}function sn(t,e){return 2&e&&(t|=2),1|t}function on(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function an(t){return ht(t,!0)}function cn(t){t=Vt(t);for(let e=0;e<t.length;e++){const n=t[e]=Vt(t[e]);Array.isArray(n[1])&&(n[1]=it(n[1]))}return st(t)}function hn(t,e,n,r){We(t),Qe(t=t.v,0|t[Q],e,("0"===r?0===Number(n):n===r)?void 0:n)}function un(t,e,n){if(2&e)throw Error();const r=pt(e);let i=rn(t,n,r),s=i===tt?7:0|i[Q],o=sn(s,e);return(2&o||on(o)||16&o)&&(o===s||on(o)||rt(i,o),i=Vt(i),s=0,o=An(o,e),Qe(t,e,n,i,r)),o&=-13,o!==s&&rt(i,o),i}function ln(t,e){var n=Cs;return pn(fn(t=t.v),t,void 0,n)===e?e:-1}function fn(t){if(B)return t[X]??(t[X]=new Map);if(X in t)return t[X];const e=new Map;return Object.defineProperty(t,X,{value:e}),e}function dn(t,e,n,r,i){const s=fn(t),o=pn(s,t,e,n,i);return o!==r&&(o&&(e=Qe(t,e,o,void 0,i)),s.set(n,r)),e}function pn(t,e,n,r,i){let s=t.get(r);if(null!=s)return s;s=0;for(let t=0;t<r.length;t++){const o=r[t];null!=Je(e,o,i)&&(0!==s&&(n=Qe(e,n,s,void 0,i)),s=o)}return t.set(r,s),s}function gn(t,e,n){let r=0|t[Q];const i=pt(r),s=Je(t,n,i);let o;if(null!=s&&s[q]===ot){if(!at(s))return He(s),s.v;o=s.v}else Array.isArray(s)&&(o=s);if(o){const t=0|o[Q];2&t&&(o=Ve(o,t))}return o=Ne(o,e),o!==s&&Qe(t,r,n,o,i),o}function mn(t,e,n,r,i){let s=!1;if(null!=(r=Je(t,r,i,(t=>{const r=fe(t,n,!1,e);return s=r!==t&&null!=r,r}))))return s&&!at(r)&&ze(t,e),r}function yn(t,e,n,r){let i=t.v,s=0|i[Q];if(null==(e=mn(i,s,e,n,r)))return e;if(s=0|i[Q],!at(t,s)){const o=Xe(e);o!==e&&(He(t)&&(i=t.v,s=0|i[Q]),s=Qe(i,s,n,e=o,r),ze(i,s))}return e}function _n(t,e,n,r,i,s,o,a){var c=at(t,n);s=c?1:s,o=!!o||3===s,c=a&&!c,(2===s||c)&&He(t)&&(n=0|(e=t.v)[Q]);var h=(t=rn(e,i))===tt?7:0|t[Q],u=sn(h,n);if(a=!(4&u)){var l=t,f=n;const e=!!(2&u);e&&(f|=2);let i=!e,s=!0,o=0,a=0;for(;o<l.length;o++){const t=fe(l[o],r,!1,f);if(t instanceof r){if(!e){const e=at(t);i&&=!e,s&&=e}l[a++]=t}}a<o&&(l.length=a),u|=4,u=s?-4097&u:4096|u,u=i?8|u:-9&u}if(u!==h&&(rt(t,u),2&u&&Object.freeze(t)),c&&!(8&u||!t.length&&(1===s||4===s&&(2&u||!(16&u)&&32&n)))){for(on(u)&&(t=Vt(t),u=An(u,n),n=Qe(e,n,i,t)),r=t,c=u,h=0;h<r.length;h++)(l=r[h])!==(u=Xe(l))&&(r[h]=u);c|=8,rt(t,u=c=r.length?4096|c:-4097&c)}return nn(t,u,e,n,i,s,a,o)}function vn(t,e,n){const r=t.v;return _n(t,r,0|r[Q],e,n,tn(),!1,!0)}function En(t){return null==t&&(t=void 0),t}function wn(t,e,n,r,i){return Ze(t,n,r=En(r),i),r&&!at(r)&&ze(t.v),t}function Tn(t,e,n,r){t:{var i=r=En(r);We(t);const s=t.v;let o=0|s[Q];if(null==i){const t=fn(s);if(pn(t,s,o,n)!==e)break t;t.set(n,0)}else o=dn(s,o,n,e);Qe(s,o,e,i)}r&&!at(r)&&ze(t.v)}function An(t,e){return-273&(2&e?2|t:-3&t)}function bn(t,e,n,r){var i=r;We(t),t=_n(t,r=t.v,0|r[Q],n,e,2,!0),i=null!=i?i:new n,t.push(i),e=n=t===tt?7:0|t[Q],(i=at(i))?(n&=-9,1===t.length&&(n&=-4097)):n|=4096,n!==e&&rt(t,n),i||ze(r)}function kn(t,e,n){return ee($e(t,e,void 0,n))}function xn(t,e){return $e(t,e,void 0,void 0,$t)??0}function Sn(t,e,n){if(null!=n){if("number"!=typeof n)throw N("int32");if(!zt(n))throw N("int32");n|=0}Ze(t,e,n)}function Ln(t,e,n){Ze(t,e,qt(n))}function Rn(t,e,n){hn(t,e,ue(n),"")}function In(t,e,n){{We(t);const o=t.v;let a=0|o[Q];if(null==n)Qe(o,a,e);else{var r=t=n===tt?7:0|n[Q],i=on(t),s=i||Object.isFrozen(n);for(i||(t=0),s||(n=Vt(n),r=0,t=An(t,a),s=!1),t|=5,t|=(4&t?512&t?512:1024&t?1024:0:void 0)??1024,i=0;i<n.length;i++){const e=n[i],o=he(e);Object.is(e,o)||(s&&(n=Vt(n),r=0,t=An(t,a),s=!1),n[i]=o)}t!==r&&(s&&(n=Vt(n),t=An(t,a)),rt(n,t)),Qe(o,a,e,n)}}}function Fn(t,e,n){We(t),en(t,e,le,2,!0).push(he(n))}var Mn=class{constructor(t,e,n){if(this.buffer=t,n&&!e)throw Error();this.g=e}};function Pn(t,e){if("string"==typeof t)return new Mn(x(t),e);if(Array.isArray(t))return new Mn(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new Mn(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Mn(t,!1);if(t.constructor===F)return e=I(t)||new Uint8Array(0),new Mn(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Mn(t,!1);throw Error()}function Cn(t,e){let n,r=0,i=0,s=0;const o=t.h;let a=t.g;do{n=o[a++],r|=(127&n)<<s,s+=7}while(s<32&&128&n);if(s>32)for(i|=(127&n)>>4,s=3;s<32&&128&n;s+=7)n=o[a++],i|=(127&n)<<s;if(Gn(t,a),!(128&n))return e(r>>>0,i>>>0);throw Error()}function On(t){let e=0,n=t.g;const r=n+10,i=t.h;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return Gn(t,n),!!(127&e)}throw Error()}function Nn(t){const e=t.h;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw Error();return Gn(t,n),i}function Un(t){return Nn(t)>>>0}function Dn(t){var e=t.h;const n=t.g;var r=e[n],i=e[n+1];const s=e[n+2];return e=e[n+3],Gn(t,t.g+4),t=2*((i=(r<<0|i<<8|s<<16|e<<24)>>>0)>>31)+1,r=i>>>23&255,i&=8388607,255==r?i?NaN:t*(1/0):0==r?1401298464324817e-60*t*i:t*Math.pow(2,r-150)*(i+8388608)}function Bn(t){return Nn(t)}function Gn(t,e){if(t.g=e,e>t.l)throw Error()}function jn(t,e){if(e<0)throw Error();const n=t.g;if((e=n+e)>t.l)throw Error();return t.g=e,n}function Vn(t,e){if(0==e)return R();var n=jn(t,e);return t.Y&&t.j?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?new Uint8Array(0):St?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?R():new F(n,L)}var Xn=[];function Hn(t,e,n,r){if(Qn.length){const i=Qn.pop();return i.o(r),i.g.init(t,e,n,r),i}return new Zn(t,e,n,r)}function Wn(t){t.g.clear(),t.l=-1,t.h=-1,Qn.length<100&&Qn.push(t)}function zn(t){var e=t.g;if(e.g==e.l)return!1;t.m=t.g.g;var n=Un(t.g);if(e=n>>>3,!((n&=7)>=0&&n<=5))throw Error();if(e<1)throw Error();return t.l=e,t.h=n,!0}function Kn(t){switch(t.h){case 0:0!=t.h?Kn(t):On(t.g);break;case 1:Gn(t=t.g,t.g+8);break;case 2:if(2!=t.h)Kn(t);else{var e=Un(t.g);Gn(t=t.g,t.g+e)}break;case 5:Gn(t=t.g,t.g+4);break;case 3:for(e=t.l;;){if(!zn(t))throw Error();if(4==t.h){if(t.l!=e)throw Error();break}Kn(t)}break;default:throw Error()}}function Yn(t,e,n){const r=t.g.l;var i=Un(t.g);let s=(i=t.g.g+i)-r;if(s<=0&&(t.g.l=i,n(e,t,void 0,void 0,void 0),s=i-t.g.g),s)throw Error();return t.g.g=i,t.g.l=r,e}function qn(t){var e=Un(t.g),a=jn(t=t.g,e);if(t=t.h,o){var c,h=t;(c=s)||(c=s=new TextDecoder("utf-8",{fatal:!0})),e=a+e,h=0===a&&e===h.length?h:h.subarray(a,e);try{var u=c.decode(h)}catch(t){if(void 0===i){try{c.decode(new Uint8Array([128]))}catch(t){}try{c.decode(new Uint8Array([97])),i=!0}catch(t){i=!1}}throw!i&&(s=void 0),t}}else{e=(u=a)+e,a=[];let i,s=null;for(;u<e;){var l=t[u++];l<128?a.push(l):l<224?u>=e?n():(i=t[u++],l<194||128!=(192&i)?(u--,n()):a.push((31&l)<<6|63&i)):l<240?u>=e-1?n():(i=t[u++],128!=(192&i)||224===l&&i<160||237===l&&i>=160||128!=(192&(c=t[u++]))?(u--,n()):a.push((15&l)<<12|(63&i)<<6|63&c)):l<=244?u>=e-2?n():(i=t[u++],128!=(192&i)||i-144+(l<<28)>>30!=0||128!=(192&(c=t[u++]))||128!=(192&(h=t[u++]))?(u--,n()):(l=(7&l)<<18|(63&i)<<12|(63&c)<<6|63&h,l-=65536,a.push(55296+(l>>10&1023),56320+(1023&l)))):n(),a.length>=8192&&(s=r(s,a),a.length=0)}u=r(s,a)}return u}function $n(t){const e=Un(t.g);return Vn(t.g,e)}function Jn(t,e,n){var r=Un(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var Zn=class{constructor(t,e,n,r){if(Xn.length){const i=Xn.pop();i.init(t,e,n,r),t=i}else t=new class{constructor(t,e,n,r){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.init(t,e,n,r)}init(t,e,n,{Y:r=!1,ea:i=!1}={}){this.Y=r,this.ea=i,t&&(t=Pn(t,this.ea),this.h=t.buffer,this.j=t.g,this.m=e||0,this.l=void 0!==n?this.m+n:this.h.length,this.g=this.m)}clear(){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.Y=!1}}(t,e,n,r);this.g=t,this.m=this.g.g,this.h=this.l=-1,this.o(r)}o({ha:t=!1}={}){this.ha=t}},Qn=[];function tr(t){return t?/^\d+$/.test(t)?(Gt(t),new er(Rt,It)):null:nr||=new er(0,0)}var er=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let nr;function rr(t){return t?/^-?\d+$/.test(t)?(Gt(t),new ir(Rt,It)):null:sr||=new ir(0,0)}var ir=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let sr;function or(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function ar(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function cr(t,e){if(e>=0)ar(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function hr(t){var e=Rt;t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function ur(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function lr(t,e,n){ar(t.g,8*e+n)}function fr(t,e){return lr(t,e,2),e=t.g.end(),ur(t,e),e.push(t.h),e}function dr(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function pr(t,e,n){lr(t,e,2),ar(t.g,n.length),ur(t,t.g.end()),ur(t,n)}function gr(t,e,n,r){null!=n&&(e=fr(t,e),r(n,t),dr(t,e))}function mr(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var yr=mr(),_r=mr(),vr=mr(),Er=mr(),wr=mr(),Tr=mr(),Ar=mr(),br=mr(),kr=mr(),xr=mr();function Sr(t,e,n){var r=t.v;H&&H in r&&(r=r[H])&&delete r[e.g],e.h?e.j(t,e.h,e.g,n,e.l):e.j(t,e.g,n,e.l)}var Lr=class{constructor(t,e){this.v=Ue(t,e,void 0,2048)}toJSON(){return Oe(this)}j(){var t=So,e=this.v,n=t.g,r=H;if(B&&r&&null!=e[r]?.[n]&&U(W,3),e=t.g,$&&H&&void 0===$&&(r=(n=this.v)[H])&&(r=r.da))try{r(n,e,Le)}catch(t){u(t)}return t.h?t.m(this,t.h,t.g,t.l):t.m(this,t.g,t.defaultValue,t.l)}clone(){const t=this.v,e=0|t[Q];return Ke(this,t,e)?Ge(this,t,!0):new this.constructor(Ve(t,e,!1))}};Lr.prototype[q]=ot,Lr.prototype.toString=function(){return this.v.toString()};var Rr=class{constructor(t,e,n){this.g=t,this.h=e,t=yr,this.l=!!t&&n===t||!1}};function Ir(t,e){return new Rr(t,e,yr)}function Fr(t,e,n,r,i){gr(t,n,Xr(e,r),i)}const Mr=Ir((function(t,e,n,r,i){return 2===t.h&&(Yn(t,gn(e,r,n),i),!0)}),Fr),Pr=Ir((function(t,e,n,r,i){return 2===t.h&&(Yn(t,gn(e,r,n),i),!0)}),Fr);var Cr=Symbol(),Or=Symbol(),Nr=Symbol(),Ur=Symbol(),Dr=Symbol();let Br,Gr;function jr(t,e,n,r){var i=r[t];if(i)return i;(i={}).qa=r,i.T=function(t){switch(typeof t){case"boolean":return Pe||=[0,void 0,!0];case"number":return t>0?void 0:0===t?Ce||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(r[0]);var s=r[1];let o=1;s&&s.constructor===Object&&(i.ba=s,"function"==typeof(s=r[++o])&&(i.ma=!0,Br??=s,Gr??=r[o+1],s=r[o+=2]));const a={};for(;s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var c=0;c<s.length;c++)a[s[c]]=s;s=r[++o]}for(c=1;void 0!==s;){let t;"number"==typeof s&&(c+=s,s=r[++o]);var h=void 0;if(s instanceof Rr?t=s:(t=Mr,o--),t?.l){s=r[++o],h=r;var u=o;"function"==typeof s&&(s=s(),h[u]=s),h=s}for(u=c+1,"number"==typeof(s=r[++o])&&s<0&&(u-=s,s=r[++o]);c<u;c++){const r=a[c];h?n(i,c,t,h,r):e(i,c,t,r)}}return r[t]=i}function Vr(t){return Array.isArray(t)?t[0]instanceof Rr?t:[Pr,t]:[t,void 0]}function Xr(t,e){return t instanceof Lr?t.v:Array.isArray(t)?Ne(t,e):void 0}function Hr(t,e,n,r){const i=n.g;t[e]=r?(t,e,n)=>i(t,e,n,r):i}function Wr(t,e,n,r,i){const s=n.g;let o,a;t[e]=(t,e,n)=>s(t,e,n,a||=jr(Or,Hr,Wr,r).T,o||=zr(r),i)}function zr(t){let e=t[Nr];if(null!=e)return e;const n=jr(Or,Hr,Wr,t);return e=n.ma?(t,e)=>Br(t,e,n):(t,e)=>{for(;zn(e)&&4!=e.h;){var r=e.l,i=n[r];if(null==i){var s=n.ba;s&&(s=s[r])&&(null!=(s=Yr(s))&&(i=n[r]=s))}if(null==i||!i(e,t,r)){if(i=(s=e).m,Kn(s),s.ha)var o=void 0;else o=s.g.g-i,s.g.g=i,o=Vn(s.g,o);i=void 0,s=t,o&&((i=s[H]??(s[H]=new Se))[r]??(i[r]=[])).push(o)}}return(t=ke(t))&&(t.da=n.qa[Dr]),!0},t[Nr]=e,t[Dr]=Kr.bind(t),e}function Kr(t,e,n,r){var i=this[Or];const s=this[Nr],o=Ne(void 0,i.T),a=ke(t);if(a){var c=!1,h=i.ba;if(h){if(i=(e,n,i)=>{if(0!==i.length)if(h[n])for(const t of i){e=Hn(t);try{c=!0,s(o,e)}finally{Wn(e)}}else r?.(t,n,i)},null==e)xe(a,i);else if(null!=a){const t=a[e];t&&i(a,e,t)}if(c){let r=0|t[Q];if(2&r&&2048&r&&!n?.Ka)throw Error();const i=pt(r),s=(e,s)=>{if(null!=Je(t,e,i)){if(1===n?.Qa)return;throw Error()}null!=s&&(r=Qe(t,r,e,s,i)),delete a[e]};null==e?ft(o,0|o[Q],((t,e)=>{s(t,e)})):s(e,Je(o,e,i))}}}}function Yr(t){const e=(t=Vr(t))[0].g;if(t=t[1]){const n=zr(t),r=jr(Or,Hr,Wr,t).T;return(t,i,s)=>e(t,i,s,r,n)}return e}function qr(t,e,n){t[e]=n.h}function $r(t,e,n,r){let i,s;const o=n.h;t[e]=(t,e,n)=>o(t,e,n,s||=jr(Cr,qr,$r,r).T,i||=Jr(r))}function Jr(t){let e=t[Ur];if(!e){const n=jr(Cr,qr,$r,t);e=(t,e)=>Zr(t,e,n),t[Ur]=e}return e}function Zr(t,e,n){ft(t,0|t[Q],((t,r)=>{if(null!=r){var i=function(t,e){var n=t[e];if(n)return n;if((n=t.ba)&&(n=n[e])){var r=(n=Vr(n))[0].h;if(n=n[1]){const e=Jr(n),i=jr(Cr,qr,$r,n).T;n=t.ma?Gr(i,e):(t,n,s)=>r(t,n,s,i,e)}else n=r;return t[e]=n}}(n,t);i?i(e,r,t):t<500||U(K,3)}})),(t=ke(t))&&xe(t,((t,n,r)=>{for(ur(e,e.g.end()),t=0;t<r.length;t++)ur(e,I(r[t])||new Uint8Array(0))}))}const Qr=Et(0);function ti(t,e){if(Array.isArray(e)){var n=0|e[Q];if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),(t=-1537&(5|n))!==n&&rt(e,t),2&t&&Object.freeze(e),e}}function ei(t,e,n){return new Rr(t,e,n)}function ni(t,e,n){return new Rr(t,e,n)}function ri(t,e,n){Qe(t,0|t[Q],e,n,pt(0|t[Q]))}var ii=Ir((function(t,e,n,r,i){if(2!==t.h)return!1;if(t=Vt(t=Yn(t,Ne([void 0,void 0],r),i)),i=pt(r=0|e[Q]),2&r)throw Error();let s=Je(e,n,i);if(s instanceof Ee)0!=(2&s.J)?(s=s.V(),s.push(t),Qe(e,r,n,s,i)):s.Ma(t);else if(Array.isArray(s)){var o=0|s[Q];8192&o||rt(s,o|=8192),2&o&&(s=cn(s),Qe(e,r,n,s,i)),s.push(t)}else Qe(e,r,n,st([t]),i);return!0}),(function(t,e,n,r,i){if(e instanceof Ee)e.forEach(((e,s)=>{gr(t,n,Ne([s,e],r),i)}));else if(Array.isArray(e)){for(let s=0;s<e.length;s++){const o=e[s];Array.isArray(o)&&gr(t,n,Ne(o,r),i)}st(e)}}));function si(t,e,n){null!=(e=$t(e))&&(lr(t,n,5),t=t.g,Pt(e),hr(t))}function oi(t,e,n){if(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(Xt(64,t));if(te(t)){if("string"===e)return se(t);if("number"===e)return ie(t)}}(e),null!=e){if("string"==typeof e)rr(e);if(null!=e)switch(lr(t,n,0),typeof e){case"number":t=t.g,Mt(e),or(t,Rt,It);break;case"bigint":n=BigInt.asUintN(64,e),n=new ir(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),or(t.g,n.h,n.g);break;default:n=rr(e),or(t.g,n.h,n.g)}}}function ai(t,e,n){null!=(e=ee(e))&&null!=e&&(lr(t,n,0),cr(t.g,e))}function ci(t,e,n){null!=(e=Zt(e))&&(lr(t,n,0),t.g.g.push(e?1:0))}function hi(t,e,n){null!=(e=le(e))&&pr(t,n,h(e))}function ui(t,e,n,r,i){gr(t,n,Xr(e,r),i)}function li(t,e,n){null!=(e=null==e||"string"==typeof e||e instanceof F?e:void 0)&&pr(t,n,Pn(e,!0).buffer)}function fi(t,e,n){null!=(e=ne(e))&&null!=e&&(lr(t,n,0),ar(t.g,e))}function di(t,e,n){return(5===t.h||2===t.h)&&(e=un(e,0|e[Q],n),2==t.h?Jn(t,Dn,e):e.push(Dn(t.g)),!0)}var pi=ei((function(t,e,n){return 5===t.h&&(ri(e,n,Dn(t.g)),!0)}),si,br),gi=ni(di,(function(t,e,n){if(null!=(e=ti($t,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(lr(r,i,5),r=r.g,Pt(s),hr(r))}}),br),mi=ni(di,(function(t,e,n){if(null!=(e=ti($t,e))&&e.length){lr(t,n,2),ar(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Pt(e[r]),hr(n)}}),br),yi=ei((function(t,e,n){return 5===t.h&&(ri(e,n,0===(t=Dn(t.g))?void 0:t),!0)}),si,br),_i=ei((function(t,e,n){return 0!==t.h?t=!1:(ri(e,n,Cn(t.g,Nt)),t=!0),t}),oi,Tr),vi=ei((function(t,e,n){return 0!==t.h?e=!1:(ri(e,n,(t=Cn(t.g,Nt))===Qr?void 0:t),e=!0),e}),oi,Tr),Ei=ei((function(t,e,n){return 0!==t.h?t=!1:(ri(e,n,Cn(t.g,Ot)),t=!0),t}),(function(t,e,n){if(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Ht(64,t));if(te(t)){if("string"===e)return e=Kt(Number(t)),Wt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),(e="-"!==t[0]&&((e=t.length)<20||20===e&&t<="18446744073709551615"))||(Gt(t),t=Ut(Rt,It))),t;if("number"===e)return(t=Kt(t))>=0&&Wt(t)||(Mt(t),t=Ct(Rt,It)),t}}(e),null!=e){if("string"==typeof e)tr(e);if(null!=e)switch(lr(t,n,0),typeof e){case"number":t=t.g,Mt(e),or(t,Rt,It);break;case"bigint":n=BigInt.asUintN(64,e),n=new er(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),or(t.g,n.h,n.g);break;default:n=tr(e),or(t.g,n.h,n.g)}}}),Ar),wi=ei((function(t,e,n){return 0===t.h&&(ri(e,n,Nn(t.g)),!0)}),ai,Er),Ti=ni((function(t,e,n){return(0===t.h||2===t.h)&&(e=un(e,0|e[Q],n),2==t.h?Jn(t,Nn,e):e.push(Nn(t.g)),!0)}),(function(t,e,n){if(null!=(e=ti(ee,e))&&e.length){n=fr(t,n);for(let n=0;n<e.length;n++)cr(t.g,e[n]);dr(t,n)}}),Er),Ai=ei((function(t,e,n){return 0===t.h&&(ri(e,n,0===(t=Nn(t.g))?void 0:t),!0)}),ai,Er),bi=ei((function(t,e,n){return 0===t.h&&(ri(e,n,On(t.g)),!0)}),ci,_r),ki=ei((function(t,e,n){return 0===t.h&&(ri(e,n,!1===(t=On(t.g))?void 0:t),!0)}),ci,_r),xi=ni((function(t,e,n){return 2===t.h&&(t=qn(t),un(e,0|e[Q],n).push(t),!0)}),(function(t,e,n){if(null!=(e=ti(le,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&pr(r,i,h(s))}}),vr),Si=ei((function(t,e,n){return 2===t.h&&(ri(e,n,""===(t=qn(t))?void 0:t),!0)}),hi,vr),Li=ei((function(t,e,n){return 2===t.h&&(ri(e,n,qn(t)),!0)}),hi,vr),Ri=function(t,e,n=yr){return new Rr(t,e,n)}((function(t,e,n,r,i){return 2===t.h&&(r=Ne(void 0,r),un(e,0|e[Q],n).push(r),Yn(t,r,i),!0)}),(function(t,e,n,r,i){if(Array.isArray(e)){for(let s=0;s<e.length;s++)ui(t,e[s],n,r,i);1&(t=0|e[Q])||rt(e,1|t)}})),Ii=Ir((function(t,e,n,r,i,s){if(2!==t.h)return!1;let o=0|e[Q];return dn(e,o,s,n,pt(o)),Yn(t,e=gn(e,r,n),i),!0}),ui),Fi=ei((function(t,e,n){return 2===t.h&&(ri(e,n,$n(t)),!0)}),li,kr),Mi=ni((function(t,e,n){return(0===t.h||2===t.h)&&(e=un(e,0|e[Q],n),2==t.h?Jn(t,Un,e):e.push(Un(t.g)),!0)}),(function(t,e,n){if(null!=(e=ti(ne,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(lr(r,i,0),ar(r.g,s))}}),wr),Pi=ei((function(t,e,n){return 0===t.h&&(ri(e,n,0===(t=Un(t.g))?void 0:t),!0)}),fi,wr),Ci=ei((function(t,e,n){return 0===t.h&&(ri(e,n,Nn(t.g)),!0)}),(function(t,e,n){null!=(e=ee(e))&&(e=parseInt(e,10),lr(t,n,0),cr(t.g,e))}),xr);class Oi{constructor(t,e){var n=Qi;this.g=t,this.h=e,this.m=yn,this.j=wn,this.defaultValue=void 0,this.l=null!=n.Oa?dt:void 0}register(){m(this)}}function Ni(t,e){return new Oi(t,e)}function Ui(t,e){return(n,r)=>{{const s={ea:!0};r&&Object.assign(s,r),n=Hn(n,void 0,void 0,s);try{const r=new t,s=r.v;zr(e)(s,n);var i=r}finally{Wn(n)}}return i}}function Di(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};Zr(this.v,e,jr(Cr,qr,$r,t)),ur(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,i=r.length;let s=0;for(let t=0;t<i;t++){const e=r[t];n.set(e,s),s+=e.length}return e.l=[n],n}}var Bi=class extends Lr{constructor(t){super(t)}},Gi=[0,Si,ei((function(t,e,n){return 2===t.h&&(ri(e,n,(t=$n(t))===R()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof Lr){const r=e.Ra;return void(r?(e=r(e),null!=e&&pr(t,n,Pn(e,!0).buffer)):U(K,3))}if(Array.isArray(e))return void U(K,3)}li(t,e,n)}),kr)];let ji,Vi=globalThis.trustedTypes;function Xi(t){var e;return void 0===ji&&(ji=function(){let t=null;if(!Vi)return t;try{const e=t=>t;t=Vi.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}()),t=(e=ji)?e.createScriptURL(t):t,new class{constructor(t){this.g=t}toString(){return this.g+""}}(t)}function Hi(t,...e){if(0===e.length)return Xi(t[0]);let n=t[0];for(let r=0;r<e.length;r++)n+=encodeURIComponent(e[r])+t[r+1];return Xi(n)}var Wi=[0,wi,Ci,bi,-1,Ti,Ci,-1,bi],zi=class extends Lr{constructor(t){super(t)}},Ki=[0,bi,Li,bi,Ci,-1,ni((function(t,e,n){return(0===t.h||2===t.h)&&(e=un(e,0|e[Q],n),2==t.h?Jn(t,Bn,e):e.push(Nn(t.g)),!0)}),(function(t,e,n){if(null!=(e=ti(ee,e))&&e.length){n=fr(t,n);for(let n=0;n<e.length;n++)cr(t.g,e[n]);dr(t,n)}}),xr),Li,-1,[0,bi,-1],Ci,bi,-1],Yi=[0,3,bi,-1,2,[0,[2],wi,Ii,[0,ei((function(t,e,n){return 0===t.h&&(ri(e,n,Un(t.g)),!0)}),fi,wr)]],[0,Ci,bi,Ci,bi,Ci,bi,Li,-1],[0,[3,4],Li,-1,Ii,[0,wi],Ii,[0,Ci]],[0]],qi=[0,Li,-2],$i=class extends Lr{constructor(t){super(t)}},Ji=[0],Zi=[0,wi,bi,1,bi,-4],Qi=class extends Lr{constructor(t){super(t,2)}},ts={};ts[336783863]=[0,Li,bi,-1,wi,[0,[1,2,3,4,5,6,7,8,9],Ii,Ji,Ii,Ki,Ii,qi,Ii,Zi,Ii,Wi,Ii,[0,Li,-2],Ii,[0,Li,Ci],Ii,Yi,Ii,[0,Ci,-1,bi]],[0,Li],bi,[0,[1,3],[2,4],Ii,[0,Ti],-1,Ii,[0,xi],-1,Ri,[0,Li,-1]],Li];var es=[0,vi,-1,ki,-3,vi,Ti,Si,Ai,vi,-1,ki,Ai,ki,-2,Si];function ns(t,e){Fn(t,3,e)}function rs(t,e){Fn(t,4,e)}var is=class extends Lr{constructor(t){super(t,500)}o(t){return wn(this,0,7,t)}},ss=[-1,{}],os=[0,Li,1,ss],as=[0,Li,xi,ss];function cs(t,e){bn(t,1,is,e)}function hs(t,e){Fn(t,10,e)}function us(t,e){Fn(t,15,e)}var ls=class extends Lr{constructor(t){super(t,500)}o(t){return wn(this,0,1001,t)}},fs=[-500,Ri,[-500,Si,-1,xi,-3,[-2,ts,bi],Ri,Gi,Ai,-1,os,as,Ri,[0,Si,ki],Si,es,Ai,xi,987,xi],4,Ri,[-500,Li,-1,[-1,{}],998,Li],Ri,[-500,Li,xi,-1,[-2,{},bi],997,xi,-1],Ai,Ri,[-500,Li,xi,ss,998,xi],xi,Ai,os,as,Ri,[0,Si,-1,ss],xi,-2,es,Si,-1,ki,[0,ki,Pi],978,ss,Ri,Gi];ls.prototype.g=Di(fs);var ds=Ui(ls,fs),ps=class extends Lr{constructor(t){super(t)}},gs=class extends Lr{constructor(t){super(t)}g(){return vn(this,ps,1)}},ms=[0,Ri,[0,wi,pi,Li,-1]],ys=Ui(gs,ms),_s=class extends Lr{constructor(t){super(t)}},vs=class extends Lr{constructor(t){super(t)}},Es=class extends Lr{constructor(t){super(t)}l(){return yn(this,_s,2)}g(){return vn(this,vs,5)}},ws=Ui(class extends Lr{constructor(t){super(t)}},[0,xi,Ti,mi,[0,Ci,[0,wi,-3],[0,pi,-3],[0,wi,-1,[0,Ri,[0,wi,-2]]],Ri,[0,pi,-1,Li,pi]],Li,-1,_i,Ri,[0,wi,pi],xi,_i]),Ts=class extends Lr{constructor(t){super(t)}},As=Ui(class extends Lr{constructor(t){super(t)}},[0,Ri,[0,pi,-4]]),bs=class extends Lr{constructor(t){super(t)}},ks=Ui(class extends Lr{constructor(t){super(t)}},[0,Ri,[0,pi,-4]]),xs=class extends Lr{constructor(t){super(t)}},Ss=[0,wi,-1,mi,Ci],Ls=class extends Lr{constructor(t){super(t)}};Ls.prototype.g=Di([0,pi,-4,_i]);var Rs=class extends Lr{constructor(t){super(t)}},Is=Ui(class extends Lr{constructor(t){super(t)}},[0,Ri,[0,1,wi,Li,ms],_i]),Fs=class extends Lr{constructor(t){super(t)}},Ms=class extends Lr{constructor(t){super(t)}na(){const t=$e(this,1,void 0,void 0,an);return null==t?R():t}},Ps=class extends Lr{constructor(t){super(t)}},Cs=[1,2],Os=Ui(class extends Lr{constructor(t){super(t)}},[0,Ri,[0,Cs,Ii,[0,mi],Ii,[0,Fi],wi,Li],_i]),Ns=class extends Lr{constructor(t){super(t)}},Us=[0,Li,wi,pi,xi,-1],Ds=class extends Lr{constructor(t){super(t)}},Bs=[0,bi,-1],Gs=class extends Lr{constructor(t){super(t)}},js=[1,2,3,4,5,6],Vs=class extends Lr{constructor(t){super(t)}g(){return null!=$e(this,1,void 0,void 0,an)}l(){return null!=le($e(this,2))}},Xs=class extends Lr{constructor(t){super(t)}g(){return Zt($e(this,2))??!1}},Hs=[0,Fi,Li,[0,wi,_i,-1],[0,Ei,_i]],Ws=[0,Hs,bi,[0,js,Ii,Zi,Ii,Ki,Ii,Wi,Ii,Ji,Ii,qi,Ii,Yi],Ci],zs=class extends Lr{constructor(t){super(t)}},Ks=[0,Ws,pi,-1,wi],Ys=Ni(502141897,zs);ts[502141897]=Ks;var qs=Ui(class extends Lr{constructor(t){super(t)}},[0,[0,Ci,-1,gi,Mi],Ss]),$s=class extends Lr{constructor(t){super(t)}},Js=class extends Lr{constructor(t){super(t)}},Zs=[0,Ws,pi,[0,Ws],bi],Qs=Ni(508968150,Js);ts[508968150]=[0,Ws,Ks,Zs,pi,[0,[0,Hs]]],ts[508968149]=Zs;var to=class extends Lr{constructor(t){super(t)}l(){return yn(this,Ns,2)}g(){Ze(this,2)}},eo=[0,Ws,Us];ts[478825465]=eo;var no=class extends Lr{constructor(t){super(t)}},ro=class extends Lr{constructor(t){super(t)}},io=class extends Lr{constructor(t){super(t)}},so=class extends Lr{constructor(t){super(t)}},oo=class extends Lr{constructor(t){super(t)}},ao=[0,Ws,[0,Ws],eo,-1],co=[0,Ws,pi,wi],ho=[0,Ws,pi],uo=[0,Ws,co,ho,pi],lo=Ni(479097054,oo);ts[479097054]=[0,Ws,uo,ao],ts[463370452]=ao,ts[464864288]=co;var fo=Ni(462713202,so);ts[462713202]=uo,ts[474472470]=ho;var po=class extends Lr{constructor(t){super(t)}},go=class extends Lr{constructor(t){super(t)}},mo=class extends Lr{constructor(t){super(t)}},yo=class extends Lr{constructor(t){super(t)}},_o=[0,Ws,pi,-1,wi],vo=[0,Ws,pi,bi];yo.prototype.g=Di([0,Ws,ho,[0,Ws],Ks,Zs,_o,vo]);var Eo=class extends Lr{constructor(t){super(t)}},wo=Ni(456383383,Eo);ts[456383383]=[0,Ws,Us];var To=class extends Lr{constructor(t){super(t)}},Ao=Ni(476348187,To);ts[476348187]=[0,Ws,Bs];var bo=class extends Lr{constructor(t){super(t)}},ko=class extends Lr{constructor(t){super(t)}},xo=[0,Ci,-1],So=Ni(458105876,class extends Lr{constructor(t){super(t)}g(){let t;var e=this.v;const n=0|e[Q];return t=at(this,n),e=function(t,e,n,r){var i=ko;!r&&He(t)&&(n=0|(e=t.v)[Q]);var s=Je(e,2);if(t=!1,null==s){if(r)return be();s=[]}else if(s.constructor===Ee){if(!(2&s.J)||r)return s;s=s.V()}else Array.isArray(s)?t=!!(2&(0|s[Q])):s=[];if(r){if(!s.length)return be();t||(t=!0,it(s))}else t&&(t=!1,st(s),s=cn(s));return!t&&32&n&&nt(s,32),n=Qe(e,n,2,r=new Ee(s,i,de,void 0)),t||ze(e,n),r}(this,e,n,t),!t&&ko&&(e.ra=!0),e}});ts[458105876]=[0,xo,ii,[!0,_i,[0,Li,-1,xi]],[0,Ti,bi,Ci]];var Lo=class extends Lr{constructor(t){super(t)}},Ro=Ni(458105758,Lo);ts[458105758]=[0,Ws,Li,xo];var Io=class extends Lr{constructor(t){super(t)}},Fo=[0,yi,-1,ki],Mo=class extends Lr{constructor(t){super(t)}},Po=class extends Lr{constructor(t){super(t)}},Co=[1,2];Po.prototype.g=Di([0,Co,Ii,Fo,Ii,[0,Ri,Fo]]);var Oo=class extends Lr{constructor(t){super(t)}},No=Ni(443442058,Oo);ts[443442058]=[0,Ws,Li,wi,pi,xi,-1,bi,pi],ts[514774813]=_o;var Uo=class extends Lr{constructor(t){super(t)}},Do=Ni(516587230,Uo);function Bo(t,e){return e=e?e.clone():new Ns,void 0!==t.displayNamesLocale?Ze(e,1,ue(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ze(e,1),void 0!==t.maxResults?Sn(e,2,t.maxResults):"maxResults"in t&&Ze(e,2),void 0!==t.scoreThreshold?Ln(e,3,t.scoreThreshold):"scoreThreshold"in t&&Ze(e,3),void 0!==t.categoryAllowlist?In(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ze(e,4),void 0!==t.categoryDenylist?In(e,5,t.categoryDenylist):"categoryDenylist"in t&&Ze(e,5),e}function Go(t){const e=Number(t);return Number.isSafeInteger(e)?e:String(t)}function jo(t,e=-1,n=""){return{categories:t.map((t=>({index:kn(t,1)??0??-1,score:xn(t,2)??0,categoryName:le($e(t,3))??""??"",displayName:le($e(t,4))??""??""}))),headIndex:e,headName:n}}function Vo(t){const e={classifications:vn(t,Rs,1).map((t=>jo(yn(t,gs,4)?.g()??[],kn(t,2)??0,le($e(t,3))??"")))};return null!=function(t){return null==t?t:"bigint"==typeof t?(wt(t)?t=Number(t):(t=Xt(64,t),t=wt(t)?Number(t):String(t)),t):te(t)?"number"==typeof t?ie(t):se(t):void 0}($e(t,2,void 0,void 0,ce))&&(e.timestampMs=Go($e(t,2,void 0,void 0,ce)??Ye)),e}function Xo(t){var e=en(t,3,$t,tn()),n=en(t,2,ee,tn()),r=en(t,1,le,tn()),i=en(t,9,le,tn());const s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:i[t]??""});if((e=yn(t,Es,4)?.l())&&(s.boundingBox={originX:kn(e,1,qe)??0,originY:kn(e,2,qe)??0,width:kn(e,3,qe)??0,height:kn(e,4,qe)??0,angle:0}),yn(t,Es,4)?.g().length)for(const e of yn(t,Es,4).g())s.keypoints.push({x:$e(e,1,void 0,qe,$t)??0,y:$e(e,2,void 0,qe,$t)??0,score:$e(e,4,void 0,qe,$t)??0,label:le($e(e,3,void 0,qe))??""});return s}function Ho(t){const e=[];for(const n of vn(t,bs,1))e.push({x:xn(n,1)??0,y:xn(n,2)??0,z:xn(n,3)??0,visibility:xn(n,4)??0});return e}function Wo(t){const e=[];for(const n of vn(t,Ts,1))e.push({x:xn(n,1)??0,y:xn(n,2)??0,z:xn(n,3)??0,visibility:xn(n,4)??0});return e}function zo(t){return Array.from(t,(t=>t>127?t-256:t))}function Ko(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s],r+=t[s]*t[s],i+=e[s]*e[s];if(r<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let Yo;ts[516587230]=[0,Ws,_o,vo,pi],ts[518928384]=vo;const qo=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function $o(t){if(t)return!0;if(void 0===Yo)try{await WebAssembly.instantiate(qo),Yo=!0}catch{Yo=!1}return Yo}async function Jo(t,e,n){return{wasmLoaderPath:`${e}/${t}_${n=`wasm${n?"_module":""}${await $o(n)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Zo=class{};function Qo(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function ta(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;await self.import(t.toString())}}function ea(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function na(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function ra(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[r,i]=ea(e);return!t.l||r===t.i.canvas.width&&i===t.i.canvas.height||(t.i.canvas.width=r,t.i.canvas.height=i),[r,i]}function ia(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function sa(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function oa(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}Zo.forVisionTasks=function(t,e=!1){return Jo("vision",t??Hi``,e)},Zo.forTextTasks=function(t,e=!1){return Jo("text",t??Hi``,e)},Zo.forGenAiTasks=function(t,e=!1){return Jo("genai",t??Hi``,e)},Zo.forAudioTasks=function(t,e=!1){return Jo("audio",t??Hi``,e)},Zo.isSimdSupported=function(t=!1){return $o(t)};async function aa(t,e,n,r){return t=await(async(t,e,n,r,i)=>{if(e&&await ta(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await ta(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,r)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&t.endsWith(".data")?n.assetBinaryPath.toString():t}),await t.o(r),t}function ca(t,e){const n=yn(t.baseOptions,Vs,1)||new Vs;"string"==typeof e?(Ze(n,2,ue(e)),Ze(n,1)):e instanceof Uint8Array&&(Ze(n,1,ht(e,!1)),Ze(n,2)),wn(t.baseOptions,0,1,n)}function ha(t){try{const e=t.H.length;if(1===e)throw Error(t.H[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.H.map((t=>t.message)).join(", "))}finally{t.H=[]}}function ua(t,e){t.C=Math.max(t.C,e)}function la(t,e){t.B=new is,Rn(t.B,2,"PassThroughCalculator"),ns(t.B,"free_memory"),rs(t.B,"free_memory_unused_out"),hs(e,"free_memory"),cs(e,t.B)}function fa(t,e){ns(t.B,e),rs(t.B,e+"_unused_out")}function da(t){t.g.addBoolToStream(!0,"free_memory",t.C)}var pa=class{constructor(t){this.g=t,this.H=[],this.C=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(yn(this.baseOptions,Vs,1)?.g()||yn(this.baseOptions,Vs,1)?.l()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=yn(t.baseOptions,Gs,3);if(!n){var r=n=new Gs,i=new $i;Tn(r,4,js,i)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new zi,Tn(e,2,js,r)):(e=n,r=new $i,Tn(e,4,js,r))),wn(t.baseOptions,0,3,n)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)})).then((t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),ca(this,"/model.dat"),this.m(),this.L()}));if(e.modelAssetBuffer instanceof Uint8Array)ca(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){const e=[];for(var n=0;;){const{done:r,value:i}=await t.read();if(r)break;e.push(i),n+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(n),n=0;for(const r of e)t.set(r,n),n+=r.length;return t}(e.modelAssetBuffer).then((t=>{ca(this,t),this.m(),this.L()}))}return this.m(),this.L(),Promise.resolve()}L(){}ca(){let t;if(this.g.ca((e=>{t=ds(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.H.push(Error(e))})),this.g.Ja(),this.g.setGraph(t,e),this.B=void 0,ha(this)}finishProcessing(){this.g.finishProcessing(),ha(this)}close(){this.B=void 0,this.g.closeGraph()}};function ga(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}pa.prototype.close=pa.prototype.close;class ma{constructor(t,e,n,r){this.g=t,this.h=e,this.m=n,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function ya(t,e,n){const r=t.g;if(n=ga(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 _a(t,e){const n=t.g,r=ga(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const i=ga(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.O),n.vertexAttribPointer(t.O,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 s=ga(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.L),n.vertexAttribPointer(t.L,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 ma(n,r,i,s)}function va(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function Ea(t,e,n,r){return va(t,e),t.h||(t.m(),t.D()),n?(t.u||(t.u=_a(t,!0)),n=t.u):(t.A||(t.A=_a(t,!1)),n=t.A),e.useProgram(t.h),n.bind(),t.l(),t=r(),n.g.bindVertexArray(null),t}function wa(t,e,n){return va(t,e),t=ga(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 Ta(t,e,n){va(t,e),t.B||(t.B=ga(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.B),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function Aa(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var ba=class{H(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}m(){const t=this.g;if(this.h=ga(t.createProgram(),"Failed to create WebGL program"),this.X=ya(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.W=ya(this,this.H(),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.O=t.getAttribLocation(this.h,"aVertex"),this.L=t.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.X),t.deleteShader(this.W)}this.B&&this.g.deleteFramebuffer(this.B),this.A&&this.A.close(),this.u&&this.u.close()}};var ka=class extends ba{H(){return"\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n "}D(){const t=this.g;t.activeTexture(t.TEXTURE1),this.C=wa(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.j=wa(this,t,t.NEAREST)}m(){super.m();const t=this.g;this.P=ga(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.U=ga(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.M=ga(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.M,0),t.uniform1i(this.P,1),t.uniform1i(this.U,2)}close(){this.C&&this.g.deleteTexture(this.C),this.j&&this.g.deleteTexture(this.j),super.close()}},xa=class extends ba{H(){return"\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n "}D(){const t=this.g;t.activeTexture(t.TEXTURE1),this.j=wa(this,t),t.activeTexture(t.TEXTURE2),this.C=wa(this,t)}m(){super.m();const t=this.g;this.M=ga(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.P=ga(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.I=ga(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.I,0),t.uniform1i(this.M,1),t.uniform1i(this.P,2)}close(){this.j&&this.g.deleteTexture(this.j),this.C&&this.g.deleteTexture(this.C),super.close()}};function Sa(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function La(t){var e=Sa(t,1);if(!e){if(e=Sa(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const r=Ia(t);var n=Ma(t);if(Ta(n,r,Ra(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 t=0,r=0;t<e.length;++t,r+=4)e[t]=n[r]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function Ra(t){let e=Sa(t,2);if(!e){const n=Ia(t);e=Pa(t);const r=La(t),i=Fa(t);n.texImage2D(n.TEXTURE_2D,0,i,t.width,t.height,0,n.RED,n.FLOAT,r),Ca(t)}return e}function Ia(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=ga(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Fa(t){if(t=Ia(t),!Oa)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))Oa=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Oa=t.R16F}return Oa}function Ma(t){return t.l||(t.l=new ba),t.l}function Pa(t){const e=Ia(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Sa(t,2);return n||(n=wa(Ma(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(n),t.j=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Ca(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var Oa,Na=class{constructor(t,e,n,r,i,s,o){this.g=t,this.m=e,this.j=n,this.canvas=r,this.l=i,this.width=s,this.height=o,this.j&&(0===--Ua&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}Fa(){return!!Sa(this,0)}ka(){return!!Sa(this,1)}R(){return!!Sa(this,2)}ja(){return(e=Sa(t=this,0))||(e=La(t),e=new Uint8Array(e.map((t=>Math.round(255*t)))),t.g.push(e)),e;var t,e}ia(){return La(this)}N(){return Ra(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 t=Ia(this),e=Ma(this);t.activeTexture(t.TEXTURE1),n=wa(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,n);const r=Fa(this);t.texImage2D(t.TEXTURE_2D,0,r,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),Ta(e,t,n),Ea(e,t,!1,(()=>{Pa(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Ca(this)})),Aa(e),Ca(this)}}t.push(n)}return new Na(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ia(this).deleteTexture(Sa(this,2)),Ua=-1}};Na.prototype.close=Na.prototype.close,Na.prototype.clone=Na.prototype.clone,Na.prototype.getAsWebGLTexture=Na.prototype.N,Na.prototype.getAsFloat32Array=Na.prototype.ia,Na.prototype.getAsUint8Array=Na.prototype.ja,Na.prototype.hasWebGLTexture=Na.prototype.R,Na.prototype.hasFloat32Array=Na.prototype.ka,Na.prototype.hasUint8Array=Na.prototype.Fa;var Ua=250;const Da={color:"white",lineWidth:4,radius:6};function Ba(t){return{...Da,fillColor:(t=t||{}).color,...t}}function Ga(t,e){return t instanceof Function?t(e):t}function ja(t,e,n){return Math.max(Math.min(e,n),Math.min(Math.max(e,n),t))}function Va(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Xa(t){if(!t.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.j}function Ha(t,e,n){if(e.R())n(e.N());else{const r=e.ka()?e.ia():e.ja();t.m=t.m??new ba;const i=Xa(t);n((t=new Na([r],e.m,!1,i.canvas,t.m,e.width,e.height)).N()),t.close()}}function Wa(t,e,n,r){const i=function(t){return t.g||(t.g=new ka),t.g}(t),s=Xa(t),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;Ea(i,s,!0,(()=>{!function(t,e,n,r){const i=t.g;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.C),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),t.I&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(const[r,i]of t){t=r;const s=i;var n=e.next();if(n.done)return!1;const[o,a]=n.value;if(n=a,t!==o||s[0]!==n[0]||s[1]!==n[1]||s[2]!==n[2]||s[3]!==n[3])return!1}return!!e.next().done}(t.I,r))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j);else{t.I=r;const e=Array(1024).fill(0);r.forEach(((t,n)=>{if(4!==t.length)throw Error(`Color at index ${n} is not a four-channel value.`);e[4*n]=t[0],e[4*n+1]=t[1],e[4*n+2]=t[2],e[4*n+3]=t[3]})),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,r),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);const t=i.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)}))}function za(t,e,n,r){const i=Xa(t),s=function(t){return t.h||(t.h=new xa),t.h}(t),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n,a=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;Ea(s,i,!0,(()=>{var t=s.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s.j),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s.C),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),i.bindTexture(i.TEXTURE_2D,null),(t=s.g).activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)}))}var Ka=class{constructor(t,e){"undefined"!=typeof CanvasRenderingContext2D&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.j=e):this.j=t}ya(t,e){if(t){var n=Va(this);e=Ba(e),n.save();var r=n.canvas,i=0;for(const s of t)n.fillStyle=Ga(e.fillColor,{index:i,from:s}),n.strokeStyle=Ga(e.color,{index:i,from:s}),n.lineWidth=Ga(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*r.width,s.y*r.height,Ga(e.radius,{index:i,from:s}),0,2*Math.PI),n.fill(t),n.stroke(t),++i;n.restore()}}xa(t,e,n){if(t&&e){var r=Va(this);n=Ba(n),r.save();var i=r.canvas,s=0;for(const o of e){r.beginPath(),e=t[o.start];const a=t[o.end];e&&a&&(r.strokeStyle=Ga(n.color,{index:s,from:e,to:a}),r.lineWidth=Ga(n.lineWidth,{index:s,from:e,to:a}),r.moveTo(e.x*i.width,e.y*i.height),r.lineTo(a.x*i.width,a.y*i.height)),++s,r.stroke()}r.restore()}}ua(t,e){const n=Va(this);e=Ba(e),n.save(),n.beginPath(),n.lineWidth=Ga(e.lineWidth,{}),n.strokeStyle=Ga(e.color,{}),n.fillStyle=Ga(e.fillColor,{}),n.moveTo(t.originX,t.originY),n.lineTo(t.originX+t.width,t.originY),n.lineTo(t.originX+t.width,t.originY+t.height),n.lineTo(t.originX,t.originY+t.height),n.lineTo(t.originX,t.originY),n.stroke(),n.fill(),n.restore()}va(t,e,n=[0,0,0,255]){this.l?function(t,e,n,r){const i=Xa(t);Ha(t,e,(e=>{Wa(t,e,n,r),(e=Va(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,n,e):Wa(this,t.N(),n,e)}wa(t,e,n){this.l?function(t,e,n,r){const i=Xa(t);Ha(t,e,(e=>{za(t,e,n,r),(e=Va(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,e,n):za(this,t.N(),e,n)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function Ya(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function qa(t){var e=Ya(t,0);if(!e){e=Ja(t);const n=Za(t),r=new Uint8Array(t.width*t.height*4);Ta(n,e,$a(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),Aa(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function $a(t){let e=Ya(t,2);if(!e){const n=Ja(t);e=Qa(t);const r=Ya(t,1)||qa(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),tc(t)}return e}function Ja(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=ga(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Za(t){return t.l||(t.l=new ba),t.l}function Qa(t){const e=Ja(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Ya(t,2);return n||(n=wa(Za(t),e),t.g.push(n),t.m=!0),e.bindTexture(e.TEXTURE_2D,n),n}function tc(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function ec(t){const e=Ja(t);return Ea(Za(t),e,!0,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const r=n.width,i=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=r,n.height=i,t}(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()}))))}Ka.prototype.close=Ka.prototype.close,Ka.prototype.drawConfidenceMask=Ka.prototype.wa,Ka.prototype.drawCategoryMask=Ka.prototype.va,Ka.prototype.drawBoundingBox=Ka.prototype.ua,Ka.prototype.drawConnectors=Ka.prototype.xa,Ka.prototype.drawLandmarks=Ka.prototype.ya,Ka.lerp=function(t,e,n,r,i){return ja(r*(1-(t-e)/(n-e))+i*(1-(n-t)/(n-e)),r,i)},Ka.clamp=ja;var nc=class{constructor(t,e,n,r,i,s,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=i,this.width=s,this.height=o,(this.j||this.m)&&(0===--rc&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}Ea(){return!!Ya(this,0)}la(){return!!Ya(this,1)}R(){return!!Ya(this,2)}Ca(){return qa(this)}Ba(){var t=Ya(this,1);return t||($a(this),Qa(this),t=ec(this),tc(this),this.g.push(t),this.j=!0),t}N(){return $a(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 t=Ja(this),e=Za(this);t.activeTexture(t.TEXTURE1),n=wa(e,t),t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),Ta(e,t,n),Ea(e,t,!1,(()=>{Qa(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),tc(this)})),Aa(e),tc(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);$a(this),Qa(this),n=ec(this),tc(this)}t.push(n)}return new nc(t,this.la(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ya(this,1).close(),this.m&&Ja(this).deleteTexture(Ya(this,2)),rc=-1}};nc.prototype.close=nc.prototype.close,nc.prototype.clone=nc.prototype.clone,nc.prototype.getAsWebGLTexture=nc.prototype.N,nc.prototype.getAsImageBitmap=nc.prototype.Ba,nc.prototype.getAsImageData=nc.prototype.Ca,nc.prototype.hasWebGLTexture=nc.prototype.R,nc.prototype.hasImageBitmap=nc.prototype.la,nc.prototype.hasImageData=nc.prototype.Ea;var rc=250;function ic(...t){return t.map((([t,e])=>({start:t,end:e})))}const sc=function(t){return class extends t{Ja(){this.i._registerModelResourcesGraphService()}}}((oc=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:Qo()?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,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),na(this,r||"input_audio",(r=>{na(this,i=i||"audio_header",(i=>{this.i._configureAudio(r,i,t,e??0,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){sa(this,"__graph_config__",(e=>{t(e)})),na(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,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,i){const s=4*t.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(t,this.g/4),na(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){na(this,e,(e=>{const[r,i]=ra(this,t,e);this.i._addBoundTextureToStream(e,r,i,n)}))}addBoolToStream(t,e,n){na(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){na(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){na(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){na(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){na(this,e,(e=>{this.i._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){na(this,e,(e=>{na(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){na(this,e,(e=>{ia(this,Object.keys(t),(r=>{ia(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){na(this,n,(n=>{na(this,e,(e=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,n,r),this.i._free(i)}))}))}addEmptyPacketToStream(t,e){na(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){na(this,e,(e=>{const r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(r,e);this.i._addBoolVectorToInputStream(r,e,n)}))}addDoubleVectorToStream(t,e,n){na(this,e,(e=>{const r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(r,e);this.i._addDoubleVectorToInputStream(r,e,n)}))}addFloatVectorToStream(t,e,n){na(this,e,(e=>{const r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(r,e);this.i._addFloatVectorToInputStream(r,e,n)}))}addIntVectorToStream(t,e,n){na(this,e,(e=>{const r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(r,e);this.i._addIntVectorToInputStream(r,e,n)}))}addUintVectorToStream(t,e,n){na(this,e,(e=>{const r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(r,e);this.i._addUintVectorToInputStream(r,e,n)}))}addStringVectorToStream(t,e,n){na(this,e,(e=>{const r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const e of t)na(this,e,(t=>{this.i._addStringVectorEntry(r,t)}));this.i._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){na(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){na(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){na(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){na(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){na(this,e,(e=>{this.i._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){na(this,e,(e=>{na(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){na(this,n,(n=>{na(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}addBoolVectorToInputSidePacket(t,e){na(this,e,(e=>{const n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){na(this,e,(e=>{const n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){na(this,e,(e=>{const n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){na(this,e,(e=>{const n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputSidePacket(n,e)}))}addUintVectorToInputSidePacket(t,e){na(this,e,(e=>{const n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(n,e);this.i._addUintVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){na(this,e,(e=>{const n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)na(this,e,(t=>{this.i._addStringVectorEntry(n,t)}));this.i._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){sa(this,t,e),na(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){oa(this,t,e),na(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){sa(this,t,e),na(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){oa(this,t,e),na(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachUintListener(t,e){sa(this,t,e),na(this,t,(t=>{this.i._attachUintListener(t)}))}attachUintVectorListener(t,e){oa(this,t,e),na(this,t,(t=>{this.i._attachUintVectorListener(t)}))}attachDoubleListener(t,e){sa(this,t,e),na(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){oa(this,t,e),na(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){sa(this,t,e),na(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){oa(this,t,e),na(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){sa(this,t,e),na(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){oa(this,t,e),na(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){sa(this,t,e),na(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){oa(this,t,e),na(this,t,(t=>{this.i._attachProtoVectorListener(t,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?'),sa(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),na(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends oc{get ga(){return this.i}pa(t,e,n){na(this,e,(e=>{const[r,i]=ra(this,t,e);this.ga._addBoundTextureAsImageToStream(e,r,i,n)}))}Z(t,e){sa(this,t,e),na(this,t,(t=>{this.ga._attachImageListener(t)}))}aa(t,e){oa(this,t,e),na(this,t,(t=>{this.ga._attachImageVectorListener(t)}))}}));var oc,ac=class extends sc{};async function cc(t,e,n){return async function(t,e,n,r){return aa(t,e,n,r)}(t,n.canvas??(Qo()?void 0:document.createElement("canvas")),e,n)}function hc(t,e,n,r){if(t.U){const s=new Ls;if(n?.regionOfInterest){if(!t.oa)throw Error("This task doesn't support region-of-interest.");var i=n.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(i.left<0||i.top<0||i.right>1||i.bottom>1)throw Error("Expected RectF values to be in [0,1].");Ln(s,1,(i.left+i.right)/2),Ln(s,2,(i.top+i.bottom)/2),Ln(s,4,i.right-i.left),Ln(s,3,i.bottom-i.top)}else Ln(s,1,.5),Ln(s,2,.5),Ln(s,4,1),Ln(s,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(Ln(s,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){const[t,r]=ea(e);n=xn(s,3)*r/t,i=xn(s,4)*t/r,Ln(s,4,n),Ln(s,3,i)}}t.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",t.U,r)}t.g.pa(e,t.X,r??performance.now()),t.finishProcessing()}function uc(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");hc(t,e,n,t.C+1)}function lc(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");hc(t,e,n,r)}function fc(t,e,n,r){var i=e.data;const s=e.width,o=s*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error("Unsupported channel count: "+i.length/o);return t=new Na([i],n,!1,t.g.i.canvas,t.P,s,e),r?t.clone():t}var dc=class extends pa{constructor(t,e,n,r){super(t),this.g=t,this.X=e,this.U=n,this.oa=r,this.P=new ba}l(t,e=!0){if("runningMode"in t&&Ze(this.baseOptions,2,Jt(!!t.runningMode&&"IMAGE"!==t.runningMode)),void 0!==t.canvas&&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()}};dc.prototype.close=dc.prototype.close;var pc=class extends dc{constructor(t,e){super(new ac(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},wn(t=this.h=new zs,0,1,e=new Xs),Ln(this.h,2,.5),Ln(this.h,3,.3)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&Ln(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&Ln(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}F(t,e){return this.j={detections:[]},uc(this,t,e),this.j}G(t,e,n){return this.j={detections:[]},lc(this,t,n,e),this.j}m(){var t=new ls;hs(t,"image_in"),hs(t,"norm_rect_in"),us(t,"detections");const e=new Qi;Sr(e,Ys,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),ns(n,"IMAGE:image_in"),ns(n,"NORM_RECT:norm_rect_in"),rs(n,"DETECTIONS:detections"),n.o(e),cs(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=ws(e),this.j.detections.push(Xo(t));ua(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pc.prototype.detectForVideo=pc.prototype.G,pc.prototype.detect=pc.prototype.F,pc.prototype.setOptions=pc.prototype.o,pc.createFromModelPath=async function(t,e){return cc(pc,t,{baseOptions:{modelAssetPath:e}})},pc.createFromModelBuffer=function(t,e){return cc(pc,t,{baseOptions:{modelAssetBuffer:e}})},pc.createFromOptions=function(t,e){return cc(pc,t,e)};var gc=ic([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]),mc=ic([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]),yc=ic([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),_c=ic([474,475],[475,476],[476,477],[477,474]),vc=ic([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]),Ec=ic([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),wc=ic([469,470],[470,471],[471,472],[472,469]),Tc=ic([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[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]),Ac=[...gc,...mc,...yc,...vc,...Ec,...Tc],bc=ic([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]);function kc(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var xc=class extends dc{constructor(t,e){super(new ac(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,wn(t=this.h=new Js,0,1,e=new Xs),this.A=new $s,wn(this.h,0,3,this.A),this.u=new zs,wn(this.h,0,2,this.u),Sn(this.u,4,1),Ln(this.u,2,.5),Ln(this.A,2,.5),Ln(this.h,4,.5)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(this.h,0,1,t)}o(t){return"numFaces"in t&&Sn(this.u,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&Ln(this.u,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&Ln(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&Ln(this.A,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}F(t,e){return kc(this),uc(this,t,e),this.j}G(t,e,n){return kc(this),lc(this,t,n,e),this.j}m(){var t=new ls;hs(t,"image_in"),hs(t,"norm_rect"),us(t,"face_landmarks");const e=new Qi;Sr(e,Qs,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),ns(n,"IMAGE:image_in"),ns(n,"NORM_RECT:norm_rect"),rs(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),cs(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=ks(e),this.j.faceLandmarks.push(Ho(t));ua(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{ua(this,t)})),this.outputFaceBlendshapes&&(us(t,"blendshapes"),rs(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=ys(e),this.j.faceBlendshapes.push(jo(t.g()??[]));ua(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{ua(this,t)}))),this.outputFacialTransformationMatrixes&&(us(t,"face_geometry"),rs(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=yn(t=qs(e),xs,2))&&this.j.facialTransformationMatrixes.push({rows:kn(t,1)??0??0,columns:kn(t,2)??0??0,data:en(t,3,$t,tn()).slice()??[]});ua(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{ua(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};xc.prototype.detectForVideo=xc.prototype.G,xc.prototype.detect=xc.prototype.F,xc.prototype.setOptions=xc.prototype.o,xc.createFromModelPath=function(t,e){return cc(xc,t,{baseOptions:{modelAssetPath:e}})},xc.createFromModelBuffer=function(t,e){return cc(xc,t,{baseOptions:{modelAssetBuffer:e}})},xc.createFromOptions=function(t,e){return cc(xc,t,e)},xc.FACE_LANDMARKS_LIPS=gc,xc.FACE_LANDMARKS_LEFT_EYE=mc,xc.FACE_LANDMARKS_LEFT_EYEBROW=yc,xc.FACE_LANDMARKS_LEFT_IRIS=_c,xc.FACE_LANDMARKS_RIGHT_EYE=vc,xc.FACE_LANDMARKS_RIGHT_EYEBROW=Ec,xc.FACE_LANDMARKS_RIGHT_IRIS=wc,xc.FACE_LANDMARKS_FACE_OVAL=Tc,xc.FACE_LANDMARKS_CONTOURS=Ac,xc.FACE_LANDMARKS_TESSELATION=bc;var Sc=ic([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 Lc(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Rc(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function Ic(t,e=!0){const n=[];for(const i of t){var r=ys(i);t=[];for(const n of r.g())r=e&&null!=kn(n,1)?kn(n,1)??0:-1,t.push({score:xn(n,2)??0,index:r,categoryName:le($e(n,3))??""??"",displayName:le($e(n,4))??""??""});n.push(t)}return n}var Fc=class extends dc{constructor(t,e){super(new ac(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],wn(t=this.j=new oo,0,1,e=new Xs),this.u=new so,wn(this.j,0,2,this.u),this.D=new io,wn(this.u,0,3,this.D),this.A=new ro,wn(this.u,0,2,this.A),this.h=new no,wn(this.j,0,3,this.h),Ln(this.A,2,.5),Ln(this.u,4,.5),Ln(this.D,2,.5)}get baseOptions(){return yn(this.j,Xs,1)}set baseOptions(t){wn(this.j,0,1,t)}o(t){if(Sn(this.A,3,t.numHands??1),"minHandDetectionConfidence"in t&&Ln(this.A,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Ln(this.u,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Ln(this.D,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new to,n=e,r=Bo(t.cannedGesturesClassifierOptions,yn(this.h,to,3)?.l());wn(n,0,2,r),wn(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&yn(this.h,to,3)?.g();return t.customGesturesClassifierOptions?(wn(n=e=new to,0,2,r=Bo(t.customGesturesClassifierOptions,yn(this.h,to,4)?.l())),wn(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&yn(this.h,to,4)?.g(),this.l(t)}Ha(t,e){return Lc(this),uc(this,t,e),Rc(this)}Ia(t,e,n){return Lc(this),lc(this,t,n,e),Rc(this)}m(){var t=new ls;hs(t,"image_in"),hs(t,"norm_rect"),us(t,"hand_gestures"),us(t,"hand_landmarks"),us(t,"world_hand_landmarks"),us(t,"handedness");const e=new Qi;Sr(e,lo,this.j);const n=new is;Rn(n,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),ns(n,"IMAGE:image_in"),ns(n,"NORM_RECT:norm_rect"),rs(n,"HAND_GESTURES:hand_gestures"),rs(n,"LANDMARKS:hand_landmarks"),rs(n,"WORLD_LANDMARKS:world_hand_landmarks"),rs(n,"HANDEDNESS:handedness"),n.o(e),cs(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=ks(e);const n=[];for(const e of vn(t,bs,1))n.push({x:xn(e,1)??0,y:xn(e,2)??0,z:xn(e,3)??0,visibility:xn(e,4)??0});this.landmarks.push(n)}ua(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{ua(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=As(e);const n=[];for(const e of vn(t,Ts,1))n.push({x:xn(e,1)??0,y:xn(e,2)??0,z:xn(e,3)??0,visibility:xn(e,4)??0});this.worldLandmarks.push(n)}ua(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{ua(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...Ic(t,!1)),ua(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{ua(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...Ic(t)),ua(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Mc(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Fc.prototype.recognizeForVideo=Fc.prototype.Ia,Fc.prototype.recognize=Fc.prototype.Ha,Fc.prototype.setOptions=Fc.prototype.o,Fc.createFromModelPath=function(t,e){return cc(Fc,t,{baseOptions:{modelAssetPath:e}})},Fc.createFromModelBuffer=function(t,e){return cc(Fc,t,{baseOptions:{modelAssetBuffer:e}})},Fc.createFromOptions=function(t,e){return cc(Fc,t,e)},Fc.HAND_CONNECTIONS=Sc;var Pc=class extends dc{constructor(t,e){super(new ac(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],wn(t=this.h=new so,0,1,e=new Xs),this.u=new io,wn(this.h,0,3,this.u),this.j=new ro,wn(this.h,0,2,this.j),Sn(this.j,3,1),Ln(this.j,2,.5),Ln(this.u,2,.5),Ln(this.h,4,.5)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(this.h,0,1,t)}o(t){return"numHands"in t&&Sn(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&Ln(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Ln(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Ln(this.u,2,t.minHandPresenceConfidence??.5),this.l(t)}F(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],uc(this,t,e),Mc(this)}G(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],lc(this,t,n,e),Mc(this)}m(){var t=new ls;hs(t,"image_in"),hs(t,"norm_rect"),us(t,"hand_landmarks"),us(t,"world_hand_landmarks"),us(t,"handedness");const e=new Qi;Sr(e,fo,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),ns(n,"IMAGE:image_in"),ns(n,"NORM_RECT:norm_rect"),rs(n,"LANDMARKS:hand_landmarks"),rs(n,"WORLD_LANDMARKS:world_hand_landmarks"),rs(n,"HANDEDNESS:handedness"),n.o(e),cs(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=ks(e),this.landmarks.push(Ho(t));ua(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{ua(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=As(e),this.worldLandmarks.push(Wo(t));ua(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{ua(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const i=[];for(const e of t){t=ys(e);const n=[];for(const e of t.g())n.push({score:xn(e,2)??0,index:kn(e,1)??0??-1,categoryName:le($e(e,3))??""??"",displayName:le($e(e,4))??""??""});i.push(n)}r.call(n,...i),ua(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Pc.prototype.detectForVideo=Pc.prototype.G,Pc.prototype.detect=Pc.prototype.F,Pc.prototype.setOptions=Pc.prototype.o,Pc.createFromModelPath=function(t,e){return cc(Pc,t,{baseOptions:{modelAssetPath:e}})},Pc.createFromModelBuffer=function(t,e){return cc(Pc,t,{baseOptions:{modelAssetBuffer:e}})},Pc.createFromOptions=function(t,e){return cc(Pc,t,e)},Pc.HAND_CONNECTIONS=Sc;var Cc=ic([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 Oc(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Nc(t){try{if(!t.D)return t.h;t.D(t.h)}finally{da(t)}}function Uc(t,e){t=ks(t),e.push(Ho(t))}var Dc=class extends dc{constructor(t,e){super(new ac(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,wn(t=this.j=new yo,0,1,e=new Xs),this.I=new io,wn(this.j,0,2,this.I),this.W=new po,wn(this.j,0,3,this.W),this.u=new zs,wn(this.j,0,4,this.u),this.O=new $s,wn(this.j,0,5,this.O),this.A=new go,wn(this.j,0,6,this.A),this.M=new mo,wn(this.j,0,7,this.M),Ln(this.u,2,.5),Ln(this.u,3,.3),Ln(this.O,2,.5),Ln(this.A,2,.5),Ln(this.A,3,.3),Ln(this.M,2,.5),Ln(this.I,2,.5)}get baseOptions(){return yn(this.j,Xs,1)}set baseOptions(t){wn(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&Ln(this.u,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&Ln(this.u,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&Ln(this.O,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&Ln(this.A,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&Ln(this.A,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&Ln(this.M,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&Ln(this.I,2,t.minHandLandmarksConfidence??.5),this.l(t)}F(t,e,n){const r="function"!=typeof e?e:{};return this.D="function"==typeof e?e:n,Oc(this),uc(this,t,r),Nc(this)}G(t,e,n,r){const i="function"!=typeof n?n:{};return this.D="function"==typeof n?n:r,Oc(this),lc(this,t,i,e),Nc(this)}m(){var t=new ls;hs(t,"input_frames_image"),us(t,"pose_landmarks"),us(t,"pose_world_landmarks"),us(t,"face_landmarks"),us(t,"left_hand_landmarks"),us(t,"left_hand_world_landmarks"),us(t,"right_hand_landmarks"),us(t,"right_hand_world_landmarks");const e=new Qi,n=new Bi;Rn(n,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(t,e){if(null!=e)if(Array.isArray(e))Ze(t,2,Ie(e,0,Me));else{if(!("string"==typeof e||e instanceof F||S(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");hn(t,2,ht(e,!1),R())}}(n,this.j.g());const r=new is;Rn(r,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),bn(r,8,Bi,n),ns(r,"IMAGE:input_frames_image"),rs(r,"POSE_LANDMARKS:pose_landmarks"),rs(r,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),rs(r,"FACE_LANDMARKS:face_landmarks"),rs(r,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),rs(r,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),rs(r,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),rs(r,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),r.o(e),cs(t,r),la(this,t),this.g.attachProtoListener("pose_landmarks",((t,e)=>{Uc(t,this.h.poseLandmarks),ua(this,e)})),this.g.attachEmptyPacketListener("pose_landmarks",(t=>{ua(this,t)})),this.g.attachProtoListener("pose_world_landmarks",((t,e)=>{var n=this.h.poseWorldLandmarks;t=As(t),n.push(Wo(t)),ua(this,e)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(t=>{ua(this,t)})),this.outputPoseSegmentationMasks&&(rs(r,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),fa(this,"pose_segmentation_mask"),this.g.Z("pose_segmentation_mask",((t,e)=>{this.h.poseSegmentationMasks=[fc(this,t,!0,!this.D)],ua(this,e)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(t=>{this.h.poseSegmentationMasks=[],ua(this,t)}))),this.g.attachProtoListener("face_landmarks",((t,e)=>{Uc(t,this.h.faceLandmarks),ua(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{ua(this,t)})),this.outputFaceBlendshapes&&(us(t,"extra_blendshapes"),rs(r,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((t,e)=>{var n=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=ys(t),n.push(jo(t.g()??[]))),ua(this,e)})),this.g.attachEmptyPacketListener("extra_blendshapes",(t=>{ua(this,t)}))),this.g.attachProtoListener("left_hand_landmarks",((t,e)=>{Uc(t,this.h.leftHandLandmarks),ua(this,e)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(t=>{ua(this,t)})),this.g.attachProtoListener("left_hand_world_landmarks",((t,e)=>{var n=this.h.leftHandWorldLandmarks;t=As(t),n.push(Wo(t)),ua(this,e)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(t=>{ua(this,t)})),this.g.attachProtoListener("right_hand_landmarks",((t,e)=>{Uc(t,this.h.rightHandLandmarks),ua(this,e)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(t=>{ua(this,t)})),this.g.attachProtoListener("right_hand_world_landmarks",((t,e)=>{var n=this.h.rightHandWorldLandmarks;t=As(t),n.push(Wo(t)),ua(this,e)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(t=>{ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Dc.prototype.detectForVideo=Dc.prototype.G,Dc.prototype.detect=Dc.prototype.F,Dc.prototype.setOptions=Dc.prototype.o,Dc.createFromModelPath=function(t,e){return cc(Dc,t,{baseOptions:{modelAssetPath:e}})},Dc.createFromModelBuffer=function(t,e){return cc(Dc,t,{baseOptions:{modelAssetBuffer:e}})},Dc.createFromOptions=function(t,e){return cc(Dc,t,e)},Dc.HAND_CONNECTIONS=Sc,Dc.POSE_CONNECTIONS=Cc,Dc.FACE_LANDMARKS_LIPS=gc,Dc.FACE_LANDMARKS_LEFT_EYE=mc,Dc.FACE_LANDMARKS_LEFT_EYEBROW=yc,Dc.FACE_LANDMARKS_LEFT_IRIS=_c,Dc.FACE_LANDMARKS_RIGHT_EYE=vc,Dc.FACE_LANDMARKS_RIGHT_EYEBROW=Ec,Dc.FACE_LANDMARKS_RIGHT_IRIS=wc,Dc.FACE_LANDMARKS_FACE_OVAL=Tc,Dc.FACE_LANDMARKS_CONTOURS=Ac,Dc.FACE_LANDMARKS_TESSELATION=bc;var Bc=class extends dc{constructor(t,e){super(new ac(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},wn(t=this.h=new Eo,0,1,e=new Xs)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(this.h,0,1,t)}o(t){return wn(this.h,0,2,Bo(t,yn(this.h,Ns,2))),this.l(t)}sa(t,e){return this.j={classifications:[]},uc(this,t,e),this.j}ta(t,e,n){return this.j={classifications:[]},lc(this,t,n,e),this.j}m(){var t=new ls;hs(t,"input_image"),hs(t,"norm_rect"),us(t,"classifications");const e=new Qi;Sr(e,wo,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),ns(n,"IMAGE:input_image"),ns(n,"NORM_RECT:norm_rect"),rs(n,"CLASSIFICATIONS:classifications"),n.o(e),cs(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=Vo(Is(t)),ua(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Bc.prototype.classifyForVideo=Bc.prototype.ta,Bc.prototype.classify=Bc.prototype.sa,Bc.prototype.setOptions=Bc.prototype.o,Bc.createFromModelPath=function(t,e){return cc(Bc,t,{baseOptions:{modelAssetPath:e}})},Bc.createFromModelBuffer=function(t,e){return cc(Bc,t,{baseOptions:{modelAssetBuffer:e}})},Bc.createFromOptions=function(t,e){return cc(Bc,t,e)};var Gc=class extends dc{constructor(t,e){super(new ac(t,e),"image_in","norm_rect",!0),this.h=new To,this.embeddings={embeddings:[]},wn(t=this.h,0,1,e=new Xs)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(this.h,0,1,t)}o(t){var e=this.h,n=yn(this.h,Ds,2);return n=n?n.clone():new Ds,void 0!==t.l2Normalize?Ze(n,1,Jt(t.l2Normalize)):"l2Normalize"in t&&Ze(n,1),void 0!==t.quantize?Ze(n,2,Jt(t.quantize)):"quantize"in t&&Ze(n,2),wn(e,0,2,n),this.l(t)}za(t,e){return uc(this,t,e),this.embeddings}Aa(t,e,n){return lc(this,t,n,e),this.embeddings}m(){var t=new ls;hs(t,"image_in"),hs(t,"norm_rect"),us(t,"embeddings_out");const e=new Qi;Sr(e,Ao,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),ns(n,"IMAGE:image_in"),ns(n,"NORM_RECT:norm_rect"),rs(n,"EMBEDDINGS:embeddings_out"),n.o(e),cs(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Os(t),this.embeddings=function(t){return{embeddings:vn(t,Ps,1).map((t=>{const e={headIndex:kn(t,3)??0??-1,headName:le($e(t,4))??""??""};var n=t.v;return void 0!==mn(n,0|n[Q],Fs,ln(t,1))?(t=en(t=yn(t,Fs,ln(t,1),void 0),1,$t,tn()),e.floatEmbedding=t.slice()):(n=new Uint8Array(0),e.quantizedEmbedding=yn(t,Ms,ln(t,2),void 0)?.na()?.h()??n),e})),timestampMs:Go($e(t,2,void 0,void 0,ce)??Ye)}}(t),ua(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Gc.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=Ko(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=Ko(zo(t.quantizedEmbedding),zo(e.quantizedEmbedding))}return t},Gc.prototype.embedForVideo=Gc.prototype.Aa,Gc.prototype.embed=Gc.prototype.za,Gc.prototype.setOptions=Gc.prototype.o,Gc.createFromModelPath=function(t,e){return cc(Gc,t,{baseOptions:{modelAssetPath:e}})},Gc.createFromModelBuffer=function(t,e){return cc(Gc,t,{baseOptions:{modelAssetBuffer:e}})},Gc.createFromOptions=function(t,e){return cc(Gc,t,e)};var jc=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 Vc(t){const e=function(t){return vn(t,is,1)}(t.ca()).filter((t=>(le($e(t,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.u=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(yn(e[0],Qi,7)?.j()?.g()??new Map).forEach(((e,n)=>{t.u[Number(n)]=le($e(e,1))??""}))}function Xc(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Hc(t){try{const e=new jc(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{da(t)}}jc.prototype.close=jc.prototype.close;var Wc=class extends dc{constructor(t,e){super(new ac(t,e),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Lo,this.A=new bo,wn(this.h,0,3,this.A),wn(t=this.h,0,1,e=new Xs)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ze(this.h,2,ue(t.displayNamesLocale)):"displayNamesLocale"in t&&Ze(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}L(){Vc(this)}segment(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Xc(this),uc(this,t,r),Hc(this)}La(t,e,n,r){const i="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,Xc(this),lc(this,t,i,e),Hc(this)}Da(){return this.u}m(){var t=new ls;hs(t,"image_in"),hs(t,"norm_rect");const e=new Qi;Sr(e,Ro,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),ns(n,"IMAGE:image_in"),ns(n,"NORM_RECT:norm_rect"),n.o(e),cs(t,n),la(this,t),this.outputConfidenceMasks&&(us(t,"confidence_masks"),rs(n,"CONFIDENCE_MASKS:confidence_masks"),fa(this,"confidence_masks"),this.g.aa("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>fc(this,t,!0,!this.j))),ua(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],ua(this,t)}))),this.outputCategoryMask&&(us(t,"category_mask"),rs(n,"CATEGORY_MASK:category_mask"),fa(this,"category_mask"),this.g.Z("category_mask",((t,e)=>{this.categoryMask=fc(this,t,!1,!this.j),ua(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,ua(this,t)}))),us(t,"quality_scores"),rs(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,ua(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Wc.prototype.getLabels=Wc.prototype.Da,Wc.prototype.segmentForVideo=Wc.prototype.La,Wc.prototype.segment=Wc.prototype.segment,Wc.prototype.setOptions=Wc.prototype.o,Wc.createFromModelPath=function(t,e){return cc(Wc,t,{baseOptions:{modelAssetPath:e}})},Wc.createFromModelBuffer=function(t,e){return cc(Wc,t,{baseOptions:{modelAssetBuffer:e}})},Wc.createFromOptions=function(t,e){return cc(Wc,t,e)};var zc=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};zc.prototype.close=zc.prototype.close;var Kc=class extends dc{constructor(t,e){super(new ac(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Lo,this.u=new bo,wn(this.h,0,3,this.u),wn(t=this.h,0,1,e=new Xs)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(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 i="function"!=typeof n?n:{};if(this.j="function"==typeof n?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.C+1,r=new Po,e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var s=new Io;hn(s,3,Jt(!0),!1),hn(s,1,qt(e.keypoint.x),0),hn(s,2,qt(e.keypoint.y),0),Tn(r,1,Co,s)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");{const t=new Mo;for(s of e.scribble)hn(e=new Io,3,Jt(!0),!1),hn(e,1,qt(s.x),0),hn(e,2,qt(s.y),0),bn(t,1,Io,e);Tn(r,2,Co,t)}}this.g.addProtoToStream(r.g(),"mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest","roi_in",n),uc(this,t,i);t:{try{const t=new zc(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var o=t;break t}this.j(t)}finally{da(this)}o=void 0}return o}m(){var t=new ls;hs(t,"image_in"),hs(t,"roi_in"),hs(t,"norm_rect_in");const e=new Qi;Sr(e,Ro,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"),ns(n,"IMAGE:image_in"),ns(n,"ROI:roi_in"),ns(n,"NORM_RECT:norm_rect_in"),n.o(e),cs(t,n),la(this,t),this.outputConfidenceMasks&&(us(t,"confidence_masks"),rs(n,"CONFIDENCE_MASKS:confidence_masks"),fa(this,"confidence_masks"),this.g.aa("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>fc(this,t,!0,!this.j))),ua(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],ua(this,t)}))),this.outputCategoryMask&&(us(t,"category_mask"),rs(n,"CATEGORY_MASK:category_mask"),fa(this,"category_mask"),this.g.Z("category_mask",((t,e)=>{this.categoryMask=fc(this,t,!1,!this.j),ua(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,ua(this,t)}))),us(t,"quality_scores"),rs(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,ua(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Kc.prototype.segment=Kc.prototype.segment,Kc.prototype.setOptions=Kc.prototype.o,Kc.createFromModelPath=function(t,e){return cc(Kc,t,{baseOptions:{modelAssetPath:e}})},Kc.createFromModelBuffer=function(t,e){return cc(Kc,t,{baseOptions:{modelAssetBuffer:e}})},Kc.createFromOptions=function(t,e){return cc(Kc,t,e)};var Yc=class extends dc{constructor(t,e){super(new ac(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},wn(t=this.h=new Oo,0,1,e=new Xs)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ze(this.h,2,ue(t.displayNamesLocale)):"displayNamesLocale"in t&&Ze(this.h,2),void 0!==t.maxResults?Sn(this.h,3,t.maxResults):"maxResults"in t&&Ze(this.h,3),void 0!==t.scoreThreshold?Ln(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&Ze(this.h,4),void 0!==t.categoryAllowlist?In(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&Ze(this.h,5),void 0!==t.categoryDenylist?In(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&Ze(this.h,6),this.l(t)}F(t,e){return this.j={detections:[]},uc(this,t,e),this.j}G(t,e,n){return this.j={detections:[]},lc(this,t,n,e),this.j}m(){var t=new ls;hs(t,"input_frame_gpu"),hs(t,"norm_rect"),us(t,"detections");const e=new Qi;Sr(e,No,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),ns(n,"IMAGE:input_frame_gpu"),ns(n,"NORM_RECT:norm_rect"),rs(n,"DETECTIONS:detections"),n.o(e),cs(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=ws(e),this.j.detections.push(Xo(t));ua(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{ua(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Yc.prototype.detectForVideo=Yc.prototype.G,Yc.prototype.detect=Yc.prototype.F,Yc.prototype.setOptions=Yc.prototype.o,Yc.createFromModelPath=async function(t,e){return cc(Yc,t,{baseOptions:{modelAssetPath:e}})},Yc.createFromModelBuffer=function(t,e){return cc(Yc,t,{baseOptions:{modelAssetBuffer:e}})},Yc.createFromOptions=function(t,e){return cc(Yc,t,e)};var qc=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach((t=>{t.close()}))}};function $c(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Jc(t){try{const e=new qc(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.u)return e;t.u(e)}finally{da(t)}}qc.prototype.close=qc.prototype.close;var Zc=class extends dc{constructor(t,e){super(new ac(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,wn(t=this.h=new Uo,0,1,e=new Xs),this.A=new mo,wn(this.h,0,3,this.A),this.j=new go,wn(this.h,0,2,this.j),Sn(this.j,4,1),Ln(this.j,2,.5),Ln(this.A,2,.5),Ln(this.h,4,.5)}get baseOptions(){return yn(this.h,Xs,1)}set baseOptions(t){wn(this.h,0,1,t)}o(t){return"numPoses"in t&&Sn(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&Ln(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&Ln(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&Ln(this.A,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}F(t,e,n){const r="function"!=typeof e?e:{};return this.u="function"==typeof e?e:n,$c(this),uc(this,t,r),Jc(this)}G(t,e,n,r){const i="function"!=typeof n?n:{};return this.u="function"==typeof n?n:r,$c(this),lc(this,t,i,e),Jc(this)}m(){var t=new ls;hs(t,"image_in"),hs(t,"norm_rect"),us(t,"normalized_landmarks"),us(t,"world_landmarks"),us(t,"segmentation_masks");const e=new Qi;Sr(e,Do,this.h);const n=new is;Rn(n,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),ns(n,"IMAGE:image_in"),ns(n,"NORM_RECT:norm_rect"),rs(n,"NORM_LANDMARKS:normalized_landmarks"),rs(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),cs(t,n),la(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=ks(e),this.landmarks.push(Ho(t));ua(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],ua(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=As(e),this.worldLandmarks.push(Wo(t));ua(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],ua(this,t)})),this.outputSegmentationMasks&&(rs(n,"SEGMENTATION_MASK:segmentation_masks"),fa(this,"segmentation_masks"),this.g.aa("segmentation_masks",((t,e)=>{this.segmentationMasks=t.map((t=>fc(this,t,!0,!this.u))),ua(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.segmentationMasks=[],ua(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Zc.prototype.detectForVideo=Zc.prototype.G,Zc.prototype.detect=Zc.prototype.F,Zc.prototype.setOptions=Zc.prototype.o,Zc.createFromModelPath=function(t,e){return cc(Zc,t,{baseOptions:{modelAssetPath:e}})},Zc.createFromModelBuffer=function(t,e){return cc(Zc,t,{baseOptions:{modelAssetBuffer:e}})},Zc.createFromOptions=function(t,e){return cc(Zc,t,e)},Zc.POSE_CONNECTIONS=Cc,exports.DrawingUtils=Ka,exports.FaceDetector=pc,exports.FaceLandmarker=xc,exports.FilesetResolver=Zo,exports.GestureRecognizer=Fc,exports.HandLandmarker=Pc,exports.HolisticLandmarker=Dc,exports.ImageClassifier=Bc,exports.ImageEmbedder=Gc,exports.ImageSegmenter=Wc,exports.ImageSegmenterResult=jc,exports.InteractiveSegmenter=Kc,exports.InteractiveSegmenterResult=zc,exports.MPImage=nc,exports.MPMask=Na,exports.ObjectDetector=Yc,exports.PoseLandmarker=Zc,exports.TaskRunner=pa,exports.VisionTaskRunner=dc;
1
+ "use strict";var t="undefined"!=typeof self?self:{};function e(e,r){t:{for(var n=["CLOSURE_FLAGS"],i=t,s=0;s<n.length;s++)if(null==(i=i[n[s]])){n=null;break t}n=i}return null!=(e=n&&n[e])?e:r}function r(){throw Error("Invalid UTF8")}function n(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}var i,s,o=void 0,a="undefined"!=typeof TextDecoder,h="undefined"!=typeof TextEncoder;function u(t){if(h)t=(s||=new TextEncoder).encode(t);else{let r=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)n[r++]=e;else{if(e<2048)n[r++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){let s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,n[r++]=e>>18|240,n[r++]=e>>12&63|128,n[r++]=e>>6&63|128,n[r++]=63&e|128;continue}i--}e=65533}n[r++]=e>>12|224,n[r++]=e>>6&63|128}n[r++]=63&e|128}}t=r===n.length?n:n.subarray(0,r)}return t}function c(e){t.setTimeout(()=>{throw e},0)}var l=e(610401301,!1),f=e(748402147,!0);function d(){var e=t.navigator;return e&&(e=e.userAgent)?e:""}var p,g=t.navigator;function m(t){return m[" "](t),t}p=g&&g.userAgentData||null,m[" "]=function(){};var v={},y=null;function _(t){var e=t.length,r=3*e/4;r%3?r=Math.floor(r):-1!="=.".indexOf(t[e-1])&&(r=-1!="=.".indexOf(t[e-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function(t,e){function r(e){for(;n<t.length;){let e=t.charAt(n++),r=y[e];if(null!=r)return r;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}E();for(var n=0;;){let t=r(-1),n=r(0),i=r(64),s=r(64);if(64===s&&-1===t)break;e(t<<2|n>>4),64!=i&&(e(n<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,function(t){n[i++]=t}),i!==r?n.subarray(0,i):n}function E(){if(!y){y={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let r=0;r<5;r++){let n=t.concat(e[r].split(""));v[r]=n;for(let t=0;t<n.length;t++){let e=n[t];void 0===y[e]&&(y[e]=t)}}}}var w="undefined"!=typeof Uint8Array,T=!(!(l&&p&&p.brands.length>0)&&(-1!=d().indexOf("Trident")||-1!=d().indexOf("MSIE")))&&"function"==typeof btoa,A=/[-_.]/g,b={"-":"+",_:"/",".":"="};function k(t){return b[t]||""}function x(t){if(!T)return _(t);t=A.test(t)?t.replace(A,k):t,t=atob(t);var e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function S(t){return w&&null!=t&&t instanceof Uint8Array}var L={};function R(){return F||=new M(null,L)}function I(t){P(L);var e=t.g;return null==(e=null==e||S(e)?e:"string"==typeof e?x(e):null)?e:t.g=e}var F,M=class{h(){return new Uint8Array(I(this)||0)}constructor(t,e){if(P(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function P(t){if(t!==L)throw Error("illegal external caller")}function C(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}var O=void 0;function N(t){return C(t=Error(t),"warning"),t}function U(t,e){if(null!=t){var r=O??={},n=r[t]||0;n>=e||(r[t]=n+1,C(t=Error(),"incident"),c(t))}}function D(){return"function"==typeof BigInt}var B="function"==typeof Symbol&&"symbol"==typeof Symbol();function G(t,e,r=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var j,V=G("jas",void 0,!0),X=G(void 0,"0di"),H=G(void 0,"1oa"),W=G(void 0,Symbol()),z=G(void 0,"0ub"),K=G(void 0,"0ubs"),Y=G(void 0,"0ubsb"),q=G(void 0,"0actk"),$=G("m_m","Pa",!0),J=G(),Z={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},Q=Object.defineProperties,tt=B?V:"Ga",et=[];function rt(t,e){B||tt in t||Q(t,Z),t[tt]|=e}function nt(t,e){B||tt in t||Q(t,Z),t[tt]=e}function it(t){return rt(t,34),t}function st(t){return rt(t,8192),t}nt(et,7),j=Object.freeze(et);var ot={};function at(t,e){return void 0===e?t.h!==ht&&!!(2&t.v[tt]):!!(2&e)&&t.h!==ht}var ht={};function ut(t,e){if(null!=t)if("string"==typeof t)t=t?new M(t,L):R();else if(t.constructor!==M)if(S(t))t=t.length?new M(new Uint8Array(t),L):R();else{if(!e)throw Error();t=void 0}return t}class ct{constructor(t,e,r){this.g=t,this.h=e,this.l=r}next(){var t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}var lt=Object.freeze({});function ft(t,e,r){var n,i=128&e?0:-1,s=t.length;(n=!!s)&&(n=null!=(n=t[s-1])&&"object"==typeof n&&n.constructor===Object);var o=s+(n?-1:0);for(e=128&e?1:0;e<o;e++)r(e-i,t[e]);if(n){t=t[s-1];for(let e in t)!isNaN(e)&&r(+e,t[e])}}var dt={};function pt(t){return 128&t?dt:void 0}function gt(t){return t.Na=!0,t}var mt=gt(t=>"number"==typeof t),vt=gt(t=>"string"==typeof t),yt=gt(t=>"boolean"==typeof t),_t="function"==typeof t.BigInt&&"bigint"==typeof t.BigInt(0);function Et(t){var e=t;if(vt(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(mt(e)&&!Number.isSafeInteger(e))throw Error(String(e));return _t?BigInt(t):t=yt(t)?t?"1":"0":vt(t)?t.trim()||"0":String(t)}var wt=gt(t=>_t?t>=At&&t<=kt:"-"===t[0]?xt(t,Tt):xt(t,bt)),Tt=Number.MIN_SAFE_INTEGER.toString(),At=_t?BigInt(Number.MIN_SAFE_INTEGER):void 0,bt=Number.MAX_SAFE_INTEGER.toString(),kt=_t?BigInt(Number.MAX_SAFE_INTEGER):void 0;function xt(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=e[r];if(n>i)return!1;if(n<i)return!0}}var St,Lt="function"==typeof Uint8Array.prototype.slice,Rt=0,It=0;function Ft(t){var e=t>>>0;Rt=e,It=(t-e)/4294967296>>>0}function Mt(t){if(t<0){Ft(-t);let[e,r]=jt(Rt,It);Rt=e>>>0,It=r>>>0}else Ft(t)}function Pt(t){var e=St||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),It=0,Rt=e.getUint32(0,!0)}function Ct(t,e){var r=4294967296*e+(t>>>0);return Number.isSafeInteger(r)?r:Ut(t,e)}function Ot(t,e){return Et(D()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):Ut(t,e))}function Nt(t,e){return D()?Et(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):Et(Bt(t,e))}function Ut(t,e){if(t>>>=0,(e>>>=0)<=2097151)var r=""+(4294967296*e+t);else D()?r=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(r=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),r+=8147497*e,e*=2,t>=1e7&&(r+=t/1e7>>>0,t%=1e7),r>=1e7&&(e+=r/1e7>>>0,r%=1e7),r=e+Dt(r)+Dt(t));return r}function Dt(t){return t=String(t),"0000000".slice(t.length)+t}function Bt(t,e){if(2147483648&e)if(D())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{let[r,n]=jt(t,e);t="-"+Ut(r,n)}else t=Ut(t,e);return t}function Gt(t){if(t.length<16)Mt(Number(t));else if(D())t=BigInt(t),Rt=Number(t&BigInt(4294967295))>>>0,It=Number(t>>BigInt(32)&BigInt(4294967295));else{let e=+("-"===t[0]);It=Rt=0;let r=t.length;for(let n=e,i=(r-e)%6+e;i<=r;n=i,i+=6){let e=Number(t.slice(n,i));It*=1e6,(Rt=1e6*Rt+e)>=4294967296&&(It+=Math.trunc(Rt/4294967296),It>>>=0,Rt>>>=0)}if(e){let[t,e]=jt(Rt,It);Rt=t,It=e}}}function jt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Vt(t){return Array.prototype.slice.call(t)}var Xt="function"==typeof BigInt?BigInt.asIntN:void 0,Ht="function"==typeof BigInt?BigInt.asUintN:void 0,Wt=Number.isSafeInteger,zt=Number.isFinite,Kt=Math.trunc,Yt=Et(0);function qt(t){if(null!=t&&"number"!=typeof t)throw Error(`Value of float/double field must be a number, found ${typeof t}: ${t}`);return t}function $t(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Jt(t){if(null!=t&&"boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}function Zt(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}var Qt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function te(t){switch(typeof t){case"bigint":return!0;case"number":return zt(t);case"string":return Qt.test(t);default:return!1}}function ee(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?0|t:void 0}function re(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?t>>>0:void 0}function ne(t){var e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(Gt(t),Bt(Rt,It))}function ie(t){if(t=Kt(t),!Wt(t)){Mt(t);var e=Rt,r=It;(t=2147483648&r)&&(r=~r>>>0,0==(e=1+~e>>>0)&&(r=r+1>>>0)),t="number"==typeof(e=Ct(e,r))?t?-e:e:t?"-"+e:e}return t}function se(t){var e=Kt(Number(t));return Wt(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),ne(t))}function oe(t){var e=Kt(Number(t));return Wt(e)?Et(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),D()?Et(Xt(64,BigInt(t))):Et(ne(t)))}function ae(t){return Wt(t)?t=Et(ie(t)):(t=Kt(t),Wt(t)?t=String(t):(Mt(t),t=Bt(Rt,It)),t=Et(t)),t}function he(t){var e=typeof t;return null==t?t:"bigint"===e?Et(Xt(64,t)):te(t)?"string"===e?oe(t):ae(t):void 0}function ue(t){if("string"!=typeof t)throw Error();return t}function ce(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function le(t){return null==t||"string"==typeof t?t:void 0}function fe(t,e,r,n){return null!=t&&t[$]===ot?t:Array.isArray(t)?((n=(r=0|t[tt])|32&n|2&n)!==r&&nt(t,n),new e(t)):(r?2&n?((t=e[X])||(it((t=new e).v),t=e[X]=t),e=t):e=new e:e=void 0,e)}function de(t,e,r){if(e)t:{if(!te(e=t))throw N("int64");switch(typeof e){case"string":e=oe(e);break t;case"bigint":e=Et(Xt(64,e));break t;default:e=ae(e)}}else e=he(t);return null==(t=e)?r?Yt:void 0:t}function pe(t){return t}var ge={},me=function(){try{return m(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class ve{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}var ye=me?(Object.setPrototypeOf(ve.prototype,Map.prototype),Object.defineProperties(ve.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),ve):class extends Map{constructor(){super()}};function _e(t){return t}function Ee(t){if(2&t.J)throw Error("Cannot mutate an immutable Map")}var we,Te=class extends ye{constructor(t,e,r=_e,n=_e){super(),this.J=0|t[tt],this.K=e,this.S=r,this.fa=this.K?Ae:n;for(let i=0;i<t.length;i++){let s=t[i],o=r(s[0],!1,!0),a=s[1];e?void 0===a&&(a=null):a=n(s[1],!1,!0,void 0,void 0,this.J),super.set(o,a)}}V(t){return st(Array.from(super.entries(),t))}clear(){Ee(this),super.clear()}delete(t){return Ee(this),super.delete(this.S(t,!0,!1))}entries(){if(this.K){var t=super.keys();t=new ct(t,be,this)}else t=super.entries();return t}values(){if(this.K){var t=super.keys();t=new ct(t,Te.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.K?super.forEach((r,n,i)=>{t.call(e,i.get(n),n,i)}):super.forEach(t,e)}set(t,e){return Ee(this),null==(t=this.S(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.fa(e,!0,!0,this.K,!1,this.J))}Ma(t){var e=this.S(t[0],!1,!0);t=t[1],t=this.K?void 0===t?null:t:this.fa(t,!1,!0,void 0,!1,this.J),super.set(e,t)}has(t){return super.has(this.S(t,!1,!1))}get(t){t=this.S(t,!1,!1);var e=super.get(t);if(void 0!==e){var r=this.K;return r?((r=this.fa(e,!1,!0,r,this.ra,this.J))!==e&&super.set(t,r),r):e}}[Symbol.iterator](){return this.entries()}};function Ae(t,e,r,n,i,s){return t=fe(t,n,r,s),i&&(t=We(t)),t}function be(t){return[t,this.get(t)]}function ke(){return we||=new Te(it([]),void 0,void 0,void 0,ge)}function xe(t){return W?t[W]:void 0}function Se(t,e){for(let r in t)!isNaN(r)&&e(t,+r,t[r])}Te.prototype.toJSON=void 0;var Le,Re,Ie,Fe=class{},Me={Ka:!0};function Pe(t,e){e<100||U(K,1)}function Ce(t,e,r,n){var i=void 0!==n;n=!!n;var s,o=W;!i&&B&&o&&(s=t[o])&&Se(s,Pe),o=[];var a=t.length;s=4294967295;var h=!1,u=!!(64&e),c=u?128&e?0:-1:void 0;if(!(1&e)){var l=a&&t[a-1];null!=l&&"object"==typeof l&&l.constructor===Object?s=--a:l=void 0,!u||128&e||i||(h=!0,s=(Le??pe)(s-c,c,t,l,void 0)+c)}e=void 0;for(var f=0;f<a;f++){let i=t[f];if(null!=i&&null!=(i=r(i,n)))if(u&&f>=s){let t=f-c;(e??={})[t]=i}else o[f]=i}if(l)for(let t in l){if(null==(a=l[t])||null==(a=r(a,n)))continue;let i;f=+t,u&&!Number.isNaN(f)&&(i=f+c)<s?o[i]=a:(e??={})[t]=a}return e&&(h?o.push(e):o[s]=e),i&&W&&(t=xe(t))&&t instanceof Fe&&(o[W]=function(t){var e=new Fe;return Se(t,(t,r,n)=>{e[r]=Vt(n)}),e.da=t.da,e}(t)),o}function Oe(t){return t[0]=Ne(t[0]),t[1]=Ne(t[1]),t}function Ne(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return wt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[tt];return 0===t.length&&1&e?void 0:Ce(t,e,Ne)}if(null!=t&&t[$]===ot)return Ue(t);if(t instanceof M){if(null==(e=t.g))t="";else if("string"==typeof e)t=e;else{if(T){for(var r="",n=0,i=e.length-10240;n<i;)r+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));r+=String.fromCharCode.apply(null,n?e.subarray(n):e),e=btoa(r)}else{void 0===r&&(r=0),E(),r=v[r],n=Array(Math.floor(e.length/3)),i=r[64]||"";let t=0,u=0;for(;t<e.length-2;t+=3){var s=e[t],o=e[t+1],a=e[t+2],h=r[s>>2];s=r[(3&s)<<4|o>>4],o=r[(15&o)<<2|a>>6],a=r[63&a],n[u++]=h+s+o+a}switch(h=0,a=i,e.length-t){case 2:a=r[(15&(h=e[t+1]))<<2]||i;case 1:e=e[t],n[u]=r[e>>2]+r[(3&e)<<4|h>>4]+a+i}e=n.join("")}t=t.g=e}return t}return t instanceof Te?t=0!==t.size?t.V(Oe):void 0:void 0}return t}function Ue(t){return Ce(t=t.v,0|t[tt],Ne)}function De(t,e){return Be(t,e[0],e[1])}function Be(t,e,r,n=0){if(null==t){var i=32;r?(t=[r],i|=128):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[tt],f&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(f)throw Error("carr");U(q,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&nt(t,i|n),t;if(r&&(i|=128,r!==t[0]))throw Error("mid");t:{i|=64;var s=(r=t).length;if(s){var o=s-1;let t=r[o];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((o-=e=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var a in t)(s=+a)<o&&(r[s+e]=t[a],delete t[a]);i=-16760833&i|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,s-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&a)<<14}}}return nt(t,64|i|n),t}function Ge(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var r=0|t[tt];return 0===t.length&&1&r?void 0:je(t,r,e)}if(null!=t&&t[$]===ot)return Xe(t);if(t instanceof Te){if(2&(e=t.J))return t;if(!t.size)return;if(r=it(t.V()),t.K)for(t=0;t<r.length;t++){let n=r[t],i=n[1];i=null==i||"object"!=typeof i?void 0:null!=i&&i[$]===ot?Xe(i):Array.isArray(i)?je(i,0|i[tt],!!(32&e)):void 0,n[1]=i}return r}return t instanceof M?t:void 0}function je(t,e,r){return 2&e||(!r||4096&e||16&e?t=He(t,e,!1,r&&!(16&e)):(rt(t,34),4&e&&Object.freeze(t))),t}function Ve(t,e,r){return t=new t.constructor(e),r&&(t.h=ht),t.m=ht,t}function Xe(t){var e=t.v,r=0|e[tt];return at(t,r)?t:qe(t,e,r)?Ve(t,e):He(e,r)}function He(t,e,r,n){return n??=!!(34&e),t=Ce(t,e,Ge,n),n=32,r&&(n|=2),nt(t,e=16769217&e|n),t}function We(t){var e=t.v,r=0|e[tt];return at(t,r)?qe(t,e,r)?Ve(t,e,!0):new t.constructor(He(e,r,!1)):t}function ze(t){if(t.h!==ht)return!1;var e=t.v;return rt(e=He(e,0|e[tt]),2048),t.v=e,t.h=void 0,t.m=void 0,!0}function Ke(t){if(!ze(t)&&at(t,0|t.v[tt]))throw Error()}function Ye(t,e){void 0===e&&(e=0|t[tt]),32&e&&!(4096&e)&&nt(t,4096|e)}function qe(t,e,r){return!!(2&r)||!(!(32&r)||4096&r)&&(nt(e,2|r),t.h=ht,!0)}var $e=Et(0),Je={};function Ze(t,e,r,n,i){if(null!==(e=Qe(t.v,e,r,i))||n&&t.m!==ht)return e}function Qe(t,e,r,n){if(-1===e)return null;var i=e+(r?0:-1),s=t.length-1;if(!(s<1+(r?0:-1))){if(i>=s){var o=t[s];if(null!=o&&"object"==typeof o&&o.constructor===Object){r=o[e];var a=!0}else{if(i!==s)return;r=o}}else r=t[i];if(n&&null!=r){if(null==(n=n(r)))return n;if(!Object.is(n,r))return a?o[e]=n:t[i]=n,n}return r}}function tr(t,e,r,n){Ke(t),er(t=t.v,0|t[tt],e,r,n)}function er(t,e,r,n,i){var s=r+(i?0:-1),o=t.length-1;if(o>=1+(i?0:-1)&&s>=o){let i=t[o];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[r]=n,e}return s<=o?(t[s]=n,e):(void 0!==n&&(r>=(o=(e??=0|t[tt])>>14&1023||536870912)?null!=n&&(t[o+(i?0:-1)]={[r]:n}):t[s]=n),e)}function rr(){return void 0===lt?2:4}function nr(t,e,r,n,i){var s=t.v,o=0|s[tt];n=at(t,o)?1:n,i=!!i||3===n,2===n&&ze(t)&&(o=0|(s=t.v)[tt]);var a=(t=sr(s,e))===j?7:0|t[tt],h=or(a,o),u=!(4&h);if(u){4&h&&(t=Vt(t),a=0,h=br(h,o),o=er(s,o,e,t));let n=0,i=0;for(;n<t.length;n++){let e=r(t[n]);null!=e&&(t[i++]=e)}i<n&&(t.length=i),r=-513&h|4,h=r&=-1025,h&=-4097}return h!==a&&(nt(t,h),2&h&&Object.freeze(t)),ir(t,h,s,o,e,n,u,i)}function ir(t,e,r,n,i,s,o,a){var h=e;return 1===s||4===s&&(2&e||!(16&e)&&32&n)?ar(e)||((e|=!t.length||o&&!(4096&e)||32&n&&!(4096&e||16&e)?2:256)!==h&&nt(t,e),Object.freeze(t)):(2===s&&ar(e)&&(t=Vt(t),h=0,e=br(e,n),n=er(r,n,i,t)),ar(e)||(a||(e|=16),e!==h&&nt(t,e))),2&e||!(4096&e||16&e)||Ye(r,n),t}function sr(t,e,r){return t=Qe(t,e,r),Array.isArray(t)?t:j}function or(t,e){return 2&e&&(t|=2),1|t}function ar(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function hr(t){return ut(t,!0)}function ur(t){t=Vt(t);for(let e=0;e<t.length;e++){let r=t[e]=Vt(t[e]);Array.isArray(r[1])&&(r[1]=it(r[1]))}return st(t)}function cr(t,e,r,n){Ke(t),er(t=t.v,0|t[tt],e,("0"===n?0===Number(r):r===n)?void 0:r)}function lr(t,e,r){if(2&e)throw Error();var n=pt(e),i=sr(t,r,n),s=i===j?7:0|i[tt],o=or(s,e);return(2&o||ar(o)||16&o)&&(o===s||ar(o)||nt(i,o),i=Vt(i),s=0,o=br(o,e),er(t,e,r,i,n)),(o&=-13)!==s&&nt(i,o),i}function fr(t,e){var r=Gs;return gr(dr(t=t.v),t,void 0,r)===e?e:-1}function dr(t){if(B)return t[H]??(t[H]=new Map);if(H in t)return t[H];var e=new Map;return Object.defineProperty(t,H,{value:e}),e}function pr(t,e,r,n,i){var s=dr(t),o=gr(s,t,e,r,i);return o!==n&&(o&&(e=er(t,e,o,void 0,i)),s.set(r,n)),e}function gr(t,e,r,n,i){var s=t.get(n);if(null!=s)return s;s=0;for(let t=0;t<n.length;t++){let o=n[t];null!=Qe(e,o,i)&&(0!==s&&(r=er(e,r,s,void 0,i)),s=o)}return t.set(n,s),s}function mr(t,e,r){var n=0|t[tt],i=pt(n),s=Qe(t,r,i);if(null!=s&&s[$]===ot){if(!at(s))return ze(s),s.v;var o=s.v}else Array.isArray(s)&&(o=s);if(o){let t=0|o[tt];2&t&&(o=He(o,t))}return(o=De(o,e))!==s&&er(t,n,r,o,i),o}function vr(t,e,r,n,i){var s=!1;if(null!=(n=Qe(t,n,i,t=>{var n=fe(t,r,!1,e);return s=n!==t&&null!=n,n})))return s&&!at(n)&&Ye(t,e),n}function yr(t,e,r,n){var i=t.v,s=0|i[tt];if(null==(e=vr(i,s,e,r,n)))return e;if(!at(t,s=0|i[tt])){let o=We(e);o!==e&&(ze(t)&&(s=0|(i=t.v)[tt]),Ye(i,s=er(i,s,r,e=o,n)))}return e}function _r(t,e,r,n,i,s,o,a){var h=at(t,r);s=h?1:s,o=!!o||3===s,h=a&&!h,(2===s||h)&&ze(t)&&(r=0|(e=t.v)[tt]);var u=(t=sr(e,i))===j?7:0|t[tt],c=or(u,r);if(a=!(4&c)){var l=t,f=r;let e=!!(2&c);e&&(f|=2);let i=!e,s=!0,o=0,a=0;for(;o<l.length;o++){let t=fe(l[o],n,!1,f);if(t instanceof n){if(!e){let e=at(t);i&&=!e,s&&=e}l[a++]=t}}a<o&&(l.length=a),c|=4,c=s?-4097&c:4096|c,c=i?8|c:-9&c}if(c!==u&&(nt(t,c),2&c&&Object.freeze(t)),h&&!(8&c||!t.length&&(1===s||4===s&&(2&c||!(16&c)&&32&r)))){for(ar(c)&&(t=Vt(t),c=br(c,r),r=er(e,r,i,t)),n=t,h=c,u=0;u<n.length;u++)(l=n[u])!==(c=We(l))&&(n[u]=c);h|=8,nt(t,c=h=n.length?4096|h:-4097&h)}return ir(t,c,e,r,i,s,a,o)}function Er(t,e,r){var n=t.v;return _r(t,n,0|n[tt],e,r,rr(),!1,!0)}function wr(t){return null==t&&(t=void 0),t}function Tr(t,e,r,n,i){return tr(t,r,n=wr(n),i),n&&!at(n)&&Ye(t.v),t}function Ar(t,e,r,n){t:{var i=n=wr(n);Ke(t);let s=t.v,o=0|s[tt];if(null==i){let t=dr(s);if(gr(t,s,o,r)!==e)break t;t.set(r,0)}else o=pr(s,o,r,e);er(s,o,e,i)}n&&!at(n)&&Ye(t.v)}function br(t,e){return-273&(2&e?2|t:-3&t)}function kr(t,e,r,n){var i=n;Ke(t),t=_r(t,n=t.v,0|n[tt],r,e,2,!0),i=null!=i?i:new r,t.push(i),e=r=t===j?7:0|t[tt],(i=at(i))?(r&=-9,1===t.length&&(r&=-4097)):r|=4096,r!==e&&nt(t,r),i||Ye(n)}function xr(t,e,r){return ee(Ze(t,e,void 0,r))}function Sr(t,e){return Ze(t,e,void 0,void 0,$t)??0}function Lr(t,e,r){if(null!=r){if("number"!=typeof r)throw N("int32");if(!zt(r))throw N("int32");r|=0}tr(t,e,r)}function Rr(t,e,r){tr(t,e,qt(r))}function Ir(t,e,r){cr(t,e,ce(r),"")}function Fr(t,e,r){{Ke(t);let o=t.v,a=0|o[tt];if(null==r)er(o,a,e);else{var n=t=r===j?7:0|r[tt],i=ar(t),s=i||Object.isFrozen(r);for(i||(t=0),s||(r=Vt(r),n=0,t=br(t,a),s=!1),t|=5,t|=(4&t?512&t?512:1024&t?1024:0:void 0)??1024,i=0;i<r.length;i++){let e=r[i],o=ue(e);Object.is(e,o)||(s&&(r=Vt(r),n=0,t=br(t,a),s=!1),r[i]=o)}t!==n&&(s&&(r=Vt(r),t=br(t,a)),nt(r,t)),er(o,a,e,r)}}}function Mr(t,e,r){Ke(t),nr(t,e,le,2,!0).push(ue(r))}var Pr=class{constructor(t,e,r){if(this.buffer=t,r&&!e)throw Error();this.g=e}};function Cr(t,e){if("string"==typeof t)return new Pr(x(t),e);if(Array.isArray(t))return new Pr(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new Pr(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Pr(t,!1);if(t.constructor===M)return e=I(t)||new Uint8Array(0),new Pr(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Pr(t,!1);throw Error()}function Or(t,e){var r=0,n=0,i=0,s=t.h,o=t.g;do{var a=s[o++];r|=(127&a)<<i,i+=7}while(i<32&&128&a);if(i>32)for(n|=(127&a)>>4,i=3;i<32&&128&a;i+=7)n|=(127&(a=s[o++]))<<i;if(jr(t,o),!(128&a))return e(r>>>0,n>>>0);throw Error()}function Nr(t){for(var e=0,r=t.g,n=r+10,i=t.h;r<n;){let n=i[r++];if(e|=n,!(128&n))return jr(t,r),!!(127&e)}throw Error()}function Ur(t){var e=t.h,r=t.g,n=e[r++],i=127&n;if(128&n&&(i|=(127&(n=e[r++]))<<7,128&n&&(i|=(127&(n=e[r++]))<<14,128&n&&(i|=(127&(n=e[r++]))<<21,128&n&&(i|=(n=e[r++])<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw Error();return jr(t,r),i}function Dr(t){return Ur(t)>>>0}function Br(t){var e=t.h,r=t.g,n=e[r],i=e[r+1],s=e[r+2];return e=e[r+3],jr(t,t.g+4),t=2*((i=(n|i<<8|s<<16|e<<24)>>>0)>>31)+1,n=i>>>23&255,i&=8388607,255==n?i?NaN:t*(1/0):0==n?1401298464324817e-60*t*i:t*Math.pow(2,n-150)*(i+8388608)}function Gr(t){return Ur(t)}function jr(t,e){if(t.g=e,e>t.l)throw Error()}function Vr(t,e){if(e<0)throw Error();var r=t.g;if((e=r+e)>t.l)throw Error();return t.g=e,r}function Xr(t,e){if(0==e)return R();var r=Vr(t,e);return t.Y&&t.j?r=t.h.subarray(r,r+e):(t=t.h,r=r===(e=r+e)?new Uint8Array(0):Lt?t.slice(r,e):new Uint8Array(t.subarray(r,e))),0==r.length?R():new M(r,L)}var Hr=class{constructor(t,e,r,n){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.init(t,e,r,n)}init(t,e,r,{Y:n=!1,ea:i=!1}={}){this.Y=n,this.ea=i,t&&(t=Cr(t,this.ea),this.h=t.buffer,this.j=t.g,this.m=e||0,this.l=void 0!==r?this.m+r:this.h.length,this.g=this.m)}clear(){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.Y=!1}},Wr=[];function zr(t,e,r,n){if(en.length){let i=en.pop();return i.o(n),i.g.init(t,e,r,n),i}return new tn(t,e,r,n)}function Kr(t){t.g.clear(),t.l=-1,t.h=-1,en.length<100&&en.push(t)}function Yr(t){var e=t.g;if(e.g==e.l)return!1;t.m=t.g.g;var r=Dr(t.g);if(e=r>>>3,!((r&=7)>=0&&r<=5))throw Error();if(e<1)throw Error();return t.l=e,t.h=r,!0}function qr(t){switch(t.h){case 0:0!=t.h?qr(t):Nr(t.g);break;case 1:jr(t=t.g,t.g+8);break;case 2:if(2!=t.h)qr(t);else{var e=Dr(t.g);jr(t=t.g,t.g+e)}break;case 5:jr(t=t.g,t.g+4);break;case 3:for(e=t.l;;){if(!Yr(t))throw Error();if(4==t.h){if(t.l!=e)throw Error();break}qr(t)}break;default:throw Error()}}function $r(t,e,r){var n=t.g.l,i=Dr(t.g),s=(i=t.g.g+i)-n;if(s<=0&&(t.g.l=i,r(e,t,void 0,void 0,void 0),s=i-t.g.g),s)throw Error();return t.g.g=i,t.g.l=n,e}function Jr(t){var e=Dr(t.g),s=Vr(t=t.g,e);if(t=t.h,a){var h,u=t;(h=i)||(h=i=new TextDecoder("utf-8",{fatal:!0})),e=s+e,u=0===s&&e===u.length?u:u.subarray(s,e);try{var c=h.decode(u)}catch(t){if(void 0===o){try{h.decode(new Uint8Array([128]))}catch(t){}try{h.decode(new Uint8Array([97])),o=!0}catch(t){o=!1}}throw!o&&(i=void 0),t}}else{e=(c=s)+e,s=[];let i,o=null;for(;c<e;){var l=t[c++];l<128?s.push(l):l<224?c>=e?r():(i=t[c++],l<194||128!=(192&i)?(c--,r()):s.push((31&l)<<6|63&i)):l<240?c>=e-1?r():(i=t[c++],128!=(192&i)||224===l&&i<160||237===l&&i>=160||128!=(192&(h=t[c++]))?(c--,r()):s.push((15&l)<<12|(63&i)<<6|63&h)):l<=244?c>=e-2?r():(i=t[c++],128!=(192&i)||i-144+(l<<28)>>30||128!=(192&(h=t[c++]))||128!=(192&(u=t[c++]))?(c--,r()):(l=(7&l)<<18|(63&i)<<12|(63&h)<<6|63&u,l-=65536,s.push(55296+(l>>10&1023),56320+(1023&l)))):r(),s.length>=8192&&(o=n(o,s),s.length=0)}c=n(o,s)}return c}function Zr(t){var e=Dr(t.g);return Xr(t.g,e)}function Qr(t,e,r){var n=Dr(t.g);for(n=t.g.g+n;t.g.g<n;)r.push(e(t.g))}var tn=class{constructor(t,e,r,n){if(Wr.length){let i=Wr.pop();i.init(t,e,r,n),t=i}else t=new Hr(t,e,r,n);this.g=t,this.m=this.g.g,this.h=this.l=-1,this.o(n)}o({ha:t=!1}={}){this.ha=t}},en=[];function rn(t){return t?/^\d+$/.test(t)?(Gt(t),new sn(Rt,It)):null:nn||=new sn(0,0)}var nn,sn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};function on(t){return t?/^-?\d+$/.test(t)?(Gt(t),new hn(Rt,It)):null:an||=new hn(0,0)}var an,hn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};function un(t,e,r){for(;r>0||e>127;)t.g.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.g.push(e)}function cn(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function ln(t,e){if(e>=0)cn(t,e);else{for(let r=0;r<9;r++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function fn(t){var e=Rt;t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}var dn=class{constructor(){this.g=[]}length(){return this.g.length}end(){var t=this.g;return this.g=[],t}};function pn(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function gn(t,e,r){cn(t.g,8*e+r)}function mn(t,e){return gn(t,e,2),e=t.g.end(),pn(t,e),e.push(t.h),e}function vn(t,e){var r=e.pop();for(r=t.h+t.g.length()-r;r>127;)e.push(127&r|128),r>>>=7,t.h++;e.push(r),t.h++}function yn(t,e,r){gn(t,e,2),cn(t.g,r.length),pn(t,t.g.end()),pn(t,r)}function _n(t,e,r,n){null!=r&&(e=mn(t,e),n(r,t),vn(t,e))}var En=class{constructor(){this.l=[],this.h=0,this.g=new dn}};function wn(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var Tn=wn(),An=wn(),bn=wn(),kn=wn(),xn=wn(),Sn=wn(),Ln=wn(),Rn=wn(),In=wn(),Fn=wn();function Mn(t,e,r){var n=t.v;W&&W in n&&(n=n[W])&&delete n[e.g],e.h?e.j(t,e.h,e.g,r,e.l):e.j(t,e.g,r,e.l)}var Pn=class{constructor(t,e){this.v=Be(t,e,void 0,2048)}toJSON(){return Ue(this)}j(){var t=Po,e=this.v,r=t.g,n=W;if(B&&n&&null!=e[n]?.[r]&&U(z,3),e=t.g,J&&W&&void 0===J&&(n=(r=this.v)[W])&&(n=n.da))try{n(r,e,Me)}catch(t){c(t)}return t.h?t.m(this,t.h,t.g,t.l):t.m(this,t.g,t.defaultValue,t.l)}clone(){var t=this.v,e=0|t[tt];return qe(this,t,e)?Ve(this,t,!0):new this.constructor(He(t,e,!1))}};Pn.prototype[$]=ot,Pn.prototype.toString=function(){return this.v.toString()};var Cn=class{constructor(t,e,r){this.g=t,this.h=e,t=Tn,this.l=!!t&&r===t||!1}};function On(t,e){return new Cn(t,e,Tn)}function Nn(t,e,r,n,i){_n(t,r,Yn(e,n),i)}var Un,Dn,Bn=On(function(t,e,r,n,i){return 2===t.h&&($r(t,mr(e,n,r),i),!0)},Nn),Gn=On(function(t,e,r,n,i){return 2===t.h&&($r(t,mr(e,n,r),i),!0)},Nn),jn=Symbol(),Vn=Symbol(),Xn=Symbol(),Hn=Symbol(),Wn=Symbol();function zn(t,e,r,n){var i=n[t];if(i)return i;(i={}).qa=n,i.T=function(t){switch(typeof t){case"boolean":return Re||=[0,void 0,!0];case"number":return t>0?void 0:0===t?Ie||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var s=n[1],o=1;s&&s.constructor===Object&&(i.ba=s,"function"==typeof(s=n[++o])&&(i.ma=!0,Un??=s,Dn??=n[o+1],s=n[o+=2]));for(var a={};s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var h=0;h<s.length;h++)a[s[h]]=s;s=n[++o]}for(h=1;void 0!==s;){let t;"number"==typeof s&&(h+=s,s=n[++o]);var u=void 0;if(s instanceof Cn?t=s:(t=Bn,o--),t?.l){s=n[++o],u=n;var c=o;"function"==typeof s&&(s=s(),u[c]=s),u=s}for(c=h+1,"number"==typeof(s=n[++o])&&s<0&&(c-=s,s=n[++o]);h<c;h++){let n=a[h];u?r(i,h,t,u,n):e(i,h,t,n)}}return n[t]=i}function Kn(t){return Array.isArray(t)?t[0]instanceof Cn?t:[Gn,t]:[t,void 0]}function Yn(t,e){return t instanceof Pn?t.v:Array.isArray(t)?De(t,e):void 0}function qn(t,e,r,n){var i=r.g;t[e]=n?(t,e,r)=>i(t,e,r,n):i}function $n(t,e,r,n,i){var s,o,a=r.g;t[e]=(t,e,r)=>a(t,e,r,o||=zn(Vn,qn,$n,n).T,s||=Jn(n),i)}function Jn(t){var e=t[Xn];if(null!=e)return e;var r=zn(Vn,qn,$n,t);return e=r.ma?(t,e)=>Un(t,e,r):(t,e)=>{for(;Yr(e)&&4!=e.h;){var n=e.l,i=r[n];if(null==i){var s=r.ba;s&&(s=s[n])&&(null!=(s=Qn(s))&&(i=r[n]=s))}if(null==i||!i(e,t,n)){if(i=(s=e).m,qr(s),s.ha)var o=void 0;else o=s.g.g-i,s.g.g=i,o=Xr(s.g,o);i=void 0,s=t,o&&((i=s[W]??(s[W]=new Fe))[n]??(i[n]=[])).push(o)}}return(t=xe(t))&&(t.da=r.qa[Wn]),!0},t[Xn]=e,t[Wn]=Zn.bind(t),e}function Zn(t,e,r,n){var i=this[Vn],s=this[Xn],o=De(void 0,i.T),a=xe(t);if(a){var h=!1,u=i.ba;if(u){if(i=(e,r,i)=>{if(0!==i.length)if(u[r])for(let t of i){e=zr(t);try{h=!0,s(o,e)}finally{Kr(e)}}else n?.(t,r,i)},null==e)Se(a,i);else if(null!=a){let t=a[e];t&&i(a,e,t)}if(h){let n=0|t[tt];if(2&n&&2048&n&&!r?.Ka)throw Error();let i=pt(n),s=(e,s)=>{if(null!=Qe(t,e,i)){if(1===r?.Qa)return;throw Error()}null!=s&&(n=er(t,n,e,s,i)),delete a[e]};null==e?ft(o,0|o[tt],(t,e)=>{s(t,e)}):s(e,Qe(o,e,i))}}}}function Qn(t){var e=(t=Kn(t))[0].g;if(t=t[1]){let r=Jn(t),n=zn(Vn,qn,$n,t).T;return(t,i,s)=>e(t,i,s,n,r)}return e}function ti(t,e,r){t[e]=r.h}function ei(t,e,r,n){var i,s,o=r.h;t[e]=(t,e,r)=>o(t,e,r,s||=zn(jn,ti,ei,n).T,i||=ri(n))}function ri(t){var e=t[Hn];if(!e){let r=zn(jn,ti,ei,t);e=(t,e)=>ni(t,e,r),t[Hn]=e}return e}function ni(t,e,r){ft(t,0|t[tt],(t,n)=>{if(null!=n){var i=function(t,e){var r=t[e];if(r)return r;if((r=t.ba)&&(r=r[e])){var n=(r=Kn(r))[0].h;if(r=r[1]){let e=ri(r),i=zn(jn,ti,ei,r).T;r=t.ma?Dn(i,e):(t,r,s)=>n(t,r,s,i,e)}else r=n;return t[e]=r}}(r,t);i?i(e,n,t):t<500||U(Y,3)}}),(t=xe(t))&&Se(t,(t,r,n)=>{for(pn(e,e.g.end()),t=0;t<n.length;t++)pn(e,I(n[t])||new Uint8Array(0))})}var ii=Et(0);function si(t,e){if(Array.isArray(e)){var r=0|e[tt];if(4&r)return e;for(var n=0,i=0;n<e.length;n++){let r=t(e[n]);null!=r&&(e[i++]=r)}return i<n&&(e.length=i),(t=-1537&r|5)!==r&&nt(e,t),2&t&&Object.freeze(e),e}}function oi(t,e,r){return new Cn(t,e,r)}function ai(t,e,r){return new Cn(t,e,r)}function hi(t,e,r){er(t,0|t[tt],e,r,pt(0|t[tt]))}var ui=On(function(t,e,r,n,i){if(2!==t.h)return!1;if(t=Vt(t=$r(t,De([void 0,void 0],n),i)),i=pt(n=0|e[tt]),2&n)throw Error();var s=Qe(e,r,i);if(s instanceof Te)2&s.J?((s=s.V()).push(t),er(e,n,r,s,i)):s.Ma(t);else if(Array.isArray(s)){var o=0|s[tt];8192&o||nt(s,o|=8192),2&o&&er(e,n,r,s=ur(s),i),s.push(t)}else er(e,n,r,st([t]),i);return!0},function(t,e,r,n,i){if(e instanceof Te)e.forEach((e,s)=>{_n(t,r,De([s,e],n),i)});else if(Array.isArray(e)){for(let s=0;s<e.length;s++){let o=e[s];Array.isArray(o)&&_n(t,r,De(o,n),i)}st(e)}});function ci(t,e,r){null!=(e=$t(e))&&(gn(t,r,5),t=t.g,Pt(e),fn(t))}function li(t,e,r){if(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Xt(64,t));if(te(t)){if("string"===e)return se(t);if("number"===e)return ie(t)}}(e),null!=e){if("string"==typeof e)on(e);if(null!=e)switch(gn(t,r,0),typeof e){case"number":t=t.g,Mt(e),un(t,Rt,It);break;case"bigint":r=BigInt.asUintN(64,e),r=new hn(Number(r&BigInt(4294967295)),Number(r>>BigInt(32))),un(t.g,r.h,r.g);break;default:r=on(e),un(t.g,r.h,r.g)}}}function fi(t,e,r){null!=(e=ee(e))&&null!=e&&(gn(t,r,0),ln(t.g,e))}function di(t,e,r){null!=(e=Zt(e))&&(gn(t,r,0),t.g.g.push(e?1:0))}function pi(t,e,r){null!=(e=le(e))&&yn(t,r,u(e))}function gi(t,e,r,n,i){_n(t,r,Yn(e,n),i)}function mi(t,e,r){null!=(e=null==e||"string"==typeof e||e instanceof M?e:void 0)&&yn(t,r,Cr(e,!0).buffer)}function vi(t,e,r){null!=(e=re(e))&&null!=e&&(gn(t,r,0),cn(t.g,e))}function yi(t,e,r){return(5===t.h||2===t.h)&&(e=lr(e,0|e[tt],r),2==t.h?Qr(t,Br,e):e.push(Br(t.g)),!0)}var _i=oi(function(t,e,r){return 5===t.h&&(hi(e,r,Br(t.g)),!0)},ci,Rn),Ei=ai(yi,function(t,e,r){if(null!=(e=si($t,e)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(gn(n,i,5),n=n.g,Pt(s),fn(n))}},Rn),wi=ai(yi,function(t,e,r){if(null!=(e=si($t,e))&&e.length){gn(t,r,2),cn(t.g,4*e.length);for(let n=0;n<e.length;n++)r=t.g,Pt(e[n]),fn(r)}},Rn),Ti=oi(function(t,e,r){return 5===t.h&&(hi(e,r,0===(t=Br(t.g))?void 0:t),!0)},ci,Rn),Ai=oi(function(t,e,r){return 0!==t.h?t=!1:(hi(e,r,Or(t.g,Nt)),t=!0),t},li,Sn),bi=oi(function(t,e,r){return 0!==t.h?e=!1:(hi(e,r,(t=Or(t.g,Nt))===ii?void 0:t),e=!0),e},li,Sn),ki=oi(function(t,e,r){return 0!==t.h?t=!1:(hi(e,r,Or(t.g,Ot)),t=!0),t},function(t,e,r){if(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Ht(64,t));if(te(t)){if("string"===e)return e=Kt(Number(t)),Wt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),(e="-"!==t[0]&&((e=t.length)<20||20===e&&t<="18446744073709551615"))||(Gt(t),t=Ut(Rt,It))),t;if("number"===e)return(t=Kt(t))>=0&&Wt(t)||(Mt(t),t=Ct(Rt,It)),t}}(e),null!=e){if("string"==typeof e)rn(e);if(null!=e)switch(gn(t,r,0),typeof e){case"number":t=t.g,Mt(e),un(t,Rt,It);break;case"bigint":r=BigInt.asUintN(64,e),r=new sn(Number(r&BigInt(4294967295)),Number(r>>BigInt(32))),un(t.g,r.h,r.g);break;default:r=rn(e),un(t.g,r.h,r.g)}}},Ln),xi=oi(function(t,e,r){return 0===t.h&&(hi(e,r,Ur(t.g)),!0)},fi,kn),Si=ai(function(t,e,r){return(0===t.h||2===t.h)&&(e=lr(e,0|e[tt],r),2==t.h?Qr(t,Ur,e):e.push(Ur(t.g)),!0)},function(t,e,r){if(null!=(e=si(ee,e))&&e.length){r=mn(t,r);for(let r=0;r<e.length;r++)ln(t.g,e[r]);vn(t,r)}},kn),Li=oi(function(t,e,r){return 0===t.h&&(hi(e,r,0===(t=Ur(t.g))?void 0:t),!0)},fi,kn),Ri=oi(function(t,e,r){return 0===t.h&&(hi(e,r,Nr(t.g)),!0)},di,An),Ii=oi(function(t,e,r){return 0===t.h&&(hi(e,r,!1===(t=Nr(t.g))?void 0:t),!0)},di,An),Fi=ai(function(t,e,r){return 2===t.h&&(t=Jr(t),lr(e,0|e[tt],r).push(t),!0)},function(t,e,r){if(null!=(e=si(le,e)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&yn(n,i,u(s))}},bn),Mi=oi(function(t,e,r){return 2===t.h&&(hi(e,r,""===(t=Jr(t))?void 0:t),!0)},pi,bn),Pi=oi(function(t,e,r){return 2===t.h&&(hi(e,r,Jr(t)),!0)},pi,bn),Ci=function(t,e,r=Tn){return new Cn(t,e,r)}(function(t,e,r,n,i){return 2===t.h&&(n=De(void 0,n),lr(e,0|e[tt],r).push(n),$r(t,n,i),!0)},function(t,e,r,n,i){if(Array.isArray(e)){for(let s=0;s<e.length;s++)gi(t,e[s],r,n,i);1&(t=0|e[tt])||nt(e,1|t)}}),Oi=On(function(t,e,r,n,i,s){if(2!==t.h)return!1;var o=0|e[tt];return pr(e,o,s,r,pt(o)),$r(t,e=mr(e,n,r),i),!0},gi),Ni=oi(function(t,e,r){return 2===t.h&&(hi(e,r,Zr(t)),!0)},mi,In),Ui=ai(function(t,e,r){return(0===t.h||2===t.h)&&(e=lr(e,0|e[tt],r),2==t.h?Qr(t,Dr,e):e.push(Dr(t.g)),!0)},function(t,e,r){if(null!=(e=si(re,e)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(gn(n,i,0),cn(n.g,s))}},xn),Di=oi(function(t,e,r){return 0===t.h&&(hi(e,r,0===(t=Dr(t.g))?void 0:t),!0)},vi,xn),Bi=oi(function(t,e,r){return 0===t.h&&(hi(e,r,Ur(t.g)),!0)},function(t,e,r){null!=(e=ee(e))&&(e=parseInt(e,10),gn(t,r,0),ln(t.g,e))},Fn);class Gi{constructor(t,e){var r=ss;this.g=t,this.h=e,this.m=yr,this.j=Tr,this.defaultValue=void 0,this.l=null!=r.Oa?dt:void 0}register(){m(this)}}function ji(t,e){return new Gi(t,e)}function Vi(t,e){return(r,n)=>{{let s={ea:!0};n&&Object.assign(s,n),r=zr(r,void 0,void 0,s);try{let n=new t,s=n.v;Jn(e)(s,r);var i=n}finally{Kr(r)}}return i}}function Xi(t){return function(){var e=new En;ni(this.v,e,zn(jn,ti,ei,t)),pn(e,e.g.end());var r=new Uint8Array(e.h),n=e.l,i=n.length,s=0;for(let t=0;t<i;t++){let e=n[t];r.set(e,s),s+=e.length}return e.l=[r],r}}var Hi,Wi=class extends Pn{constructor(t){super(t)}},zi=[0,Mi,oi(function(t,e,r){return 2===t.h&&(hi(e,r,(t=Zr(t))===R()?void 0:t),!0)},function(t,e,r){if(null!=e){if(e instanceof Pn){let n=e.Ra;return void(n?(e=n(e),null!=e&&yn(t,r,Cr(e,!0).buffer)):U(Y,3))}if(Array.isArray(e))return void U(Y,3)}mi(t,e,r)},In)],Ki=globalThis.trustedTypes;var Yi=class{constructor(t){this.g=t}toString(){return this.g+""}};function qi(t){var e;return void 0===Hi&&(Hi=function(){var t=null;if(!Ki)return t;try{let e=t=>t;t=Ki.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}()),t=(e=Hi)?e.createScriptURL(t):t,new Yi(t)}function $i(t,...e){if(0===e.length)return qi(t[0]);var r=t[0];for(let n=0;n<e.length;n++)r+=encodeURIComponent(e[n])+t[n+1];return qi(r)}var Ji=[0,xi,Bi,Ri,-1,Si,Bi,-1,Ri],Zi=class extends Pn{constructor(t){super(t)}},Qi=[0,Ri,Pi,Ri,Bi,-1,ai(function(t,e,r){return(0===t.h||2===t.h)&&(e=lr(e,0|e[tt],r),2==t.h?Qr(t,Gr,e):e.push(Ur(t.g)),!0)},function(t,e,r){if(null!=(e=si(ee,e))&&e.length){r=mn(t,r);for(let r=0;r<e.length;r++)ln(t.g,e[r]);vn(t,r)}},Fn),Pi,-1,[0,Ri,-1],Bi,Ri,-1],ts=[0,3,Ri,-1,2,[0,[2],xi,Oi,[0,oi(function(t,e,r){return 0===t.h&&(hi(e,r,Dr(t.g)),!0)},vi,xn)]],[0,Bi,Ri,Bi,Ri,Bi,Ri,Pi,-1],[0,[3,4],Pi,-1,Oi,[0,xi],Oi,[0,Bi]],[0]],es=[0,Pi,-2],rs=class extends Pn{constructor(t){super(t)}},ns=[0],is=[0,xi,Ri,1,Ri,-4],ss=class extends Pn{constructor(t){super(t,2)}},os={};os[336783863]=[0,Pi,Ri,-1,xi,[0,[1,2,3,4,5,6,7,8,9],Oi,ns,Oi,Qi,Oi,es,Oi,is,Oi,Ji,Oi,[0,Pi,-2],Oi,[0,Pi,Bi],Oi,ts,Oi,[0,Bi,-1,Ri]],[0,Pi],Ri,[0,[1,3],[2,4],Oi,[0,Si],-1,Oi,[0,Fi],-1,Ci,[0,Pi,-1]],Pi];var as=[0,bi,-1,Ii,-3,bi,Si,Mi,Li,bi,-1,Ii,Li,Ii,-2,Mi];function hs(t,e){Mr(t,3,e)}function us(t,e){Mr(t,4,e)}var cs=class extends Pn{constructor(t){super(t,500)}o(t){return Tr(this,0,7,t)}},ls=[-1,{}],fs=[0,Pi,1,ls],ds=[0,Pi,Fi,ls];function ps(t,e){kr(t,1,cs,e)}function gs(t,e){Mr(t,10,e)}function ms(t,e){Mr(t,15,e)}var vs=class extends Pn{constructor(t){super(t,500)}o(t){return Tr(this,0,1001,t)}},ys=[-500,Ci,[-500,Mi,-1,Fi,-3,[-2,os,Ri],Ci,zi,Li,-1,fs,ds,Ci,[0,Mi,Ii],Mi,as,Li,Fi,987,Fi],4,Ci,[-500,Pi,-1,[-1,{}],998,Pi],Ci,[-500,Pi,Fi,-1,[-2,{},Ri],997,Fi,-1],Li,Ci,[-500,Pi,Fi,ls,998,Fi],Fi,Li,fs,ds,Ci,[0,Mi,-1,ls],Fi,-2,as,Mi,-1,Ii,[0,Ii,Di],978,ls,Ci,zi];vs.prototype.g=Xi(ys);var _s=Vi(vs,ys),Es=class extends Pn{constructor(t){super(t)}},ws=class extends Pn{constructor(t){super(t)}g(){return Er(this,Es,1)}},Ts=[0,Ci,[0,xi,_i,Pi,-1]],As=Vi(ws,Ts),bs=class extends Pn{constructor(t){super(t)}},ks=class extends Pn{constructor(t){super(t)}},xs=class extends Pn{constructor(t){super(t)}l(){return yr(this,bs,2)}g(){return Er(this,ks,5)}},Ss=Vi(class extends Pn{constructor(t){super(t)}},[0,Fi,Si,wi,[0,Bi,[0,xi,-3],[0,_i,-3],[0,xi,-1,[0,Ci,[0,xi,-2]]],Ci,[0,_i,-1,Pi,_i]],Pi,-1,Ai,Ci,[0,xi,_i],Fi,Ai]),Ls=class extends Pn{constructor(t){super(t)}},Rs=Vi(class extends Pn{constructor(t){super(t)}},[0,Ci,[0,_i,-4]]),Is=class extends Pn{constructor(t){super(t)}},Fs=Vi(class extends Pn{constructor(t){super(t)}},[0,Ci,[0,_i,-4]]),Ms=class extends Pn{constructor(t){super(t)}},Ps=[0,xi,-1,wi,Bi],Cs=class extends Pn{constructor(t){super(t)}};Cs.prototype.g=Xi([0,_i,-4,Ai]);var Os=class extends Pn{constructor(t){super(t)}},Ns=Vi(class extends Pn{constructor(t){super(t)}},[0,Ci,[0,1,xi,Pi,Ts],Ai]),Us=class extends Pn{constructor(t){super(t)}},Ds=class extends Pn{constructor(t){super(t)}na(){var t=Ze(this,1,void 0,void 0,hr);return null==t?R():t}},Bs=class extends Pn{constructor(t){super(t)}},Gs=[1,2],js=Vi(class extends Pn{constructor(t){super(t)}},[0,Ci,[0,Gs,Oi,[0,wi],Oi,[0,Ni],xi,Pi],Ai]),Vs=class extends Pn{constructor(t){super(t)}},Xs=[0,Pi,xi,_i,Fi,-1],Hs=class extends Pn{constructor(t){super(t)}},Ws=[0,Ri,-1],zs=class extends Pn{constructor(t){super(t)}},Ks=[1,2,3,4,5,6],Ys=class extends Pn{constructor(t){super(t)}g(){return null!=Ze(this,1,void 0,void 0,hr)}l(){return null!=le(Ze(this,2))}},qs=class extends Pn{constructor(t){super(t)}g(){return Zt(Ze(this,2))??!1}},$s=[0,Ni,Pi,[0,xi,Ai,-1],[0,ki,Ai]],Js=[0,$s,Ri,[0,Ks,Oi,is,Oi,Qi,Oi,Ji,Oi,ns,Oi,es,Oi,ts],Bi],Zs=class extends Pn{constructor(t){super(t)}},Qs=[0,Js,_i,-1,xi],to=ji(502141897,Zs);os[502141897]=Qs;var eo=Vi(class extends Pn{constructor(t){super(t)}},[0,[0,Bi,-1,Ei,Ui],Ps]),ro=class extends Pn{constructor(t){super(t)}},no=class extends Pn{constructor(t){super(t)}},io=[0,Js,_i,[0,Js],Ri],so=ji(508968150,no);os[508968150]=[0,Js,Qs,io,_i,[0,[0,$s]]],os[508968149]=io;var oo=class extends Pn{constructor(t){super(t)}l(){return yr(this,Vs,2)}g(){tr(this,2)}},ao=[0,Js,Xs];os[478825465]=ao;var ho=class extends Pn{constructor(t){super(t)}},uo=class extends Pn{constructor(t){super(t)}},co=class extends Pn{constructor(t){super(t)}},lo=class extends Pn{constructor(t){super(t)}},fo=class extends Pn{constructor(t){super(t)}},po=[0,Js,[0,Js],ao,-1],go=[0,Js,_i,xi],mo=[0,Js,_i],vo=[0,Js,go,mo,_i],yo=ji(479097054,fo);os[479097054]=[0,Js,vo,po],os[463370452]=po,os[464864288]=go;var _o=ji(462713202,lo);os[462713202]=vo,os[474472470]=mo;var Eo=class extends Pn{constructor(t){super(t)}},wo=class extends Pn{constructor(t){super(t)}},To=class extends Pn{constructor(t){super(t)}},Ao=class extends Pn{constructor(t){super(t)}},bo=[0,Js,_i,-1,xi],ko=[0,Js,_i,Ri];Ao.prototype.g=Xi([0,Js,mo,[0,Js],Qs,io,bo,ko]);var xo=class extends Pn{constructor(t){super(t)}},So=ji(456383383,xo);os[456383383]=[0,Js,Xs];var Lo=class extends Pn{constructor(t){super(t)}},Ro=ji(476348187,Lo);os[476348187]=[0,Js,Ws];var Io=class extends Pn{constructor(t){super(t)}},Fo=class extends Pn{constructor(t){super(t)}},Mo=[0,Bi,-1],Po=ji(458105876,class extends Pn{constructor(t){super(t)}g(){var t=this.v,e=0|t[tt],r=at(this,e);return t=function(t,e,r,n){var i=Fo;!n&&ze(t)&&(r=0|(e=t.v)[tt]);var s=Qe(e,2);if(t=!1,null==s){if(n)return ke();s=[]}else if(s.constructor===Te){if(!(2&s.J)||n)return s;s=s.V()}else Array.isArray(s)?t=!!(2&s[tt]):s=[];if(n){if(!s.length)return ke();t||(t=!0,it(s))}else t&&(t=!1,st(s),s=ur(s));return!t&&32&r&&rt(s,32),r=er(e,r,2,n=new Te(s,i,de,void 0)),t||Ye(e,r),n}(this,t,e,r),!r&&Fo&&(t.ra=!0),t}});os[458105876]=[0,Mo,ui,[!0,Ai,[0,Pi,-1,Fi]],[0,Si,Ri,Bi]];var Co=class extends Pn{constructor(t){super(t)}},Oo=ji(458105758,Co);os[458105758]=[0,Js,Pi,Mo];var No=class extends Pn{constructor(t){super(t)}},Uo=[0,Ti,-1,Ii],Do=class extends Pn{constructor(t){super(t)}},Bo=class extends Pn{constructor(t){super(t)}},Go=[1,2];Bo.prototype.g=Xi([0,Go,Oi,Uo,Oi,[0,Ci,Uo]]);var jo=class extends Pn{constructor(t){super(t)}},Vo=ji(443442058,jo);os[443442058]=[0,Js,Pi,xi,_i,Fi,-1,Ri,_i],os[514774813]=bo;var Xo=class extends Pn{constructor(t){super(t)}},Ho=ji(516587230,Xo);function Wo(t,e){return e=e?e.clone():new Vs,void 0!==t.displayNamesLocale?tr(e,1,ce(t.displayNamesLocale)):void 0===t.displayNamesLocale&&tr(e,1),void 0!==t.maxResults?Lr(e,2,t.maxResults):"maxResults"in t&&tr(e,2),void 0!==t.scoreThreshold?Rr(e,3,t.scoreThreshold):"scoreThreshold"in t&&tr(e,3),void 0!==t.categoryAllowlist?Fr(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&tr(e,4),void 0!==t.categoryDenylist?Fr(e,5,t.categoryDenylist):"categoryDenylist"in t&&tr(e,5),e}function zo(t){var e=Number(t);return Number.isSafeInteger(e)?e:String(t)}function Ko(t,e=-1,r=""){return{categories:t.map(t=>({index:xr(t,1)??0??-1,score:Sr(t,2)??0,categoryName:le(Ze(t,3))??""??"",displayName:le(Ze(t,4))??""??""})),headIndex:e,headName:r}}function Yo(t){var e={classifications:Er(t,Os,1).map(t=>Ko(yr(t,ws,4)?.g()??[],xr(t,2)??0,le(Ze(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(wt(t)?t=Number(t):(t=Xt(64,t),t=wt(t)?Number(t):String(t)),t):te(t)?"number"==typeof t?ie(t):se(t):void 0}(Ze(t,2,void 0,void 0,he))&&(e.timestampMs=zo(Ze(t,2,void 0,void 0,he)??$e)),e}function qo(t){var e=nr(t,3,$t,rr()),r=nr(t,2,ee,rr()),n=nr(t,1,le,rr()),i=nr(t,9,le,rr()),s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:r[t]??-1,categoryName:n[t]??"",displayName:i[t]??""});if((e=yr(t,xs,4)?.l())&&(s.boundingBox={originX:xr(e,1,Je)??0,originY:xr(e,2,Je)??0,width:xr(e,3,Je)??0,height:xr(e,4,Je)??0,angle:0}),yr(t,xs,4)?.g().length)for(let e of yr(t,xs,4).g())s.keypoints.push({x:Ze(e,1,void 0,Je,$t)??0,y:Ze(e,2,void 0,Je,$t)??0,score:Ze(e,4,void 0,Je,$t)??0,label:le(Ze(e,3,void 0,Je))??""});return s}function $o(t){var e=[];for(let r of Er(t,Is,1))e.push({x:Sr(r,1)??0,y:Sr(r,2)??0,z:Sr(r,3)??0,visibility:Sr(r,4)??0});return e}function Jo(t){var e=[];for(let r of Er(t,Ls,1))e.push({x:Sr(r,1)??0,y:Sr(r,2)??0,z:Sr(r,3)??0,visibility:Sr(r,4)??0});return e}function Zo(t){return Array.from(t,t=>t>127?t-256:t)}function Qo(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);var r=0,n=0,i=0;for(let s=0;s<t.length;s++)r+=t[s]*e[s],n+=t[s]*t[s],i+=e[s]*e[s];if(n<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*i)}os[516587230]=[0,Js,bo,ko,_i],os[518928384]=ko;var ta,ea=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 ra(t){if(t)return!0;if(void 0===ta)try{await WebAssembly.instantiate(ea),ta=!0}catch{ta=!1}return ta}async function na(t,e,r){return{wasmLoaderPath:`${e}/${t}_${r=`wasm${r?"_module":""}${await ra(r)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${e}/${t}_${r}.wasm`}}var ia=class{};function sa(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function oa(t){if("function"!=typeof importScripts){let e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((t,r)=>{e.addEventListener("load",()=>{t()},!1),e.addEventListener("error",t=>{r(t)},!1),document.body.appendChild(e)})}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;{let e=self.import;e?await e(t.toString()):await import(t.toString())}}}function aa(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function ha(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function ua(t,e,r){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(r?t.i._bindTextureToStream(r):t.i._bindTextureToCanvas(),!(r=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&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);var[n,i]=aa(e);return!t.l||n===t.i.canvas.width&&i===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=i),[n,i]}function ca(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(e.length);for(let r=0;r<e.length;r++)n[r]=t.i.stringToNewUTF8(e[r]);e=t.i._malloc(4*n.length),t.i.HEAPU32.set(n,e>>2),r(e);for(let e of n)t.i._free(e);t.i._free(e)}function la(t,e,r){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=r}function fa(t,e,r){var n=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(r(n,i),n=[]):n.push(t)}}ia.forVisionTasks=function(t,e=!1){return na("vision",t??$i``,e)},ia.forTextTasks=function(t,e=!1){return na("text",t??$i``,e)},ia.forGenAiTasks=function(t,e=!1){return na("genai",t??$i``,e)},ia.forAudioTasks=function(t,e=!1){return na("audio",t??$i``,e)},ia.isSimdSupported=function(t=!1){return ra(t)};async function da(t,e,r,n){return t=await(async(t,e,r,n,i)=>{if(e&&await oa(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await oa(r),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,n)})(t,r.wasmLoaderPath,r.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&t.endsWith(".data")?r.assetBinaryPath.toString():t}),await t.o(n),t}function pa(t,e){var r=yr(t.baseOptions,Ys,1)||new Ys;"string"==typeof e?(tr(r,2,ce(e)),tr(r,1)):e instanceof Uint8Array&&(tr(r,1,ut(e,!1)),tr(r,2)),Tr(t.baseOptions,0,1,r)}function ga(t){try{let e=t.H.length;if(1===e)throw Error(t.H[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.H.map(t=>t.message).join(", "))}finally{t.H=[]}}function ma(t,e){t.C=Math.max(t.C,e)}function va(t,e){t.B=new cs,Ir(t.B,2,"PassThroughCalculator"),hs(t.B,"free_memory"),us(t.B,"free_memory_unused_out"),gs(e,"free_memory"),ps(e,t.B)}function ya(t,e){hs(t.B,e),us(t.B,e+"_unused_out")}function _a(t){t.g.addBoolToStream(!0,"free_memory",t.C)}var Ea=class{constructor(t){this.g=t,this.H=[],this.C=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){let e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(yr(this.baseOptions,Ys,1)?.g()||yr(this.baseOptions,Ys,1)?.l()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){var r=yr(t.baseOptions,zs,3);if(!r){var n=r=new zs,i=new rs;Ar(n,4,Ks,i)}"delegate"in e&&("GPU"===e.delegate?(e=r,n=new Zi,Ar(e,2,Ks,n)):(e=r,n=new rs,Ar(e,4,Ks,n))),Tr(t.baseOptions,0,3,r)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then(t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)}).then(t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),pa(this,"/model.dat"),this.m(),this.L()});if(e.modelAssetBuffer instanceof Uint8Array)pa(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){for(var e=[],r=0;;){let{done:n,value:i}=await t.read();if(n)break;e.push(i),r+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(r),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(e.modelAssetBuffer).then(t=>{pa(this,t),this.m(),this.L()})}return this.m(),this.L(),Promise.resolve()}L(){}ca(){var t;if(this.g.ca(e=>{t=_s(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener((t,e)=>{this.H.push(Error(e))}),this.g.Ja(),this.g.setGraph(t,e),this.B=void 0,ga(this)}finishProcessing(){this.g.finishProcessing(),ga(this)}close(){this.B=void 0,this.g.closeGraph()}};function wa(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}Ea.prototype.close=Ea.prototype.close;class Ta{constructor(t,e,r,n){this.g=t,this.h=e,this.m=r,this.l=n}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Aa(t,e,r){var n=t.g;if(r=wa(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,e),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(t.h,r),r}function ba(t,e){var r=t.g,n=wa(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);var i=wa(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,i),r.enableVertexAttribArray(t.O),r.vertexAttribPointer(t.O,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);var s=wa(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(t.L),r.vertexAttribPointer(t.L,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindVertexArray(null),new Ta(r,n,i,s)}function ka(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function xa(t,e,r,n){return ka(t,e),t.h||(t.m(),t.D()),r?(t.u||(t.u=ba(t,!0)),r=t.u):(t.A||(t.A=ba(t,!1)),r=t.A),e.useProgram(t.h),r.bind(),t.l(),t=n(),r.g.bindVertexArray(null),t}function Sa(t,e,r){return ka(t,e),t=wa(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,r??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function La(t,e,r){ka(t,e),t.B||(t.B=wa(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.B),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}function Ra(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var Ia=class{H(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}m(){var t=this.g;if(this.h=wa(t.createProgram(),"Failed to create WebGL program"),this.X=Aa(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.W=Aa(this,this.H(),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.O=t.getAttribLocation(this.h,"aVertex"),this.L=t.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){let t=this.g;t.deleteProgram(this.h),t.deleteShader(this.X),t.deleteShader(this.W)}this.B&&this.g.deleteFramebuffer(this.B),this.A&&this.A.close(),this.u&&this.u.close()}};var Fa=class extends Ia{H(){return"\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n "}D(){var t=this.g;t.activeTexture(t.TEXTURE1),this.C=Sa(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.j=Sa(this,t,t.NEAREST)}m(){super.m();var t=this.g;this.P=wa(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.U=wa(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.M=wa(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();var t=this.g;t.uniform1i(this.M,0),t.uniform1i(this.P,1),t.uniform1i(this.U,2)}close(){this.C&&this.g.deleteTexture(this.C),this.j&&this.g.deleteTexture(this.j),super.close()}},Ma=class extends Ia{H(){return"\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n "}D(){var t=this.g;t.activeTexture(t.TEXTURE1),this.j=Sa(this,t),t.activeTexture(t.TEXTURE2),this.C=Sa(this,t)}m(){super.m();var t=this.g;this.M=wa(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.P=wa(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.I=wa(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();var t=this.g;t.uniform1i(this.I,0),t.uniform1i(this.M,1),t.uniform1i(this.P,2)}close(){this.j&&this.g.deleteTexture(this.j),this.C&&this.g.deleteTexture(this.C),super.close()}};function Pa(t,e){switch(e){case 0:return t.g.find(t=>t instanceof Uint8Array);case 1:return t.g.find(t=>t instanceof Float32Array);case 2:return t.g.find(t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function Ca(t){var e=Pa(t,1);if(!e){if(e=Pa(t,0))e=new Float32Array(e).map(t=>t/255);else{e=new Float32Array(t.width*t.height);let n=Na(t);var r=Da(t);if(La(r,n,Oa(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){r=new Float32Array(t.width*t.height*4),n.readPixels(0,0,t.width,t.height,n.RGBA,n.FLOAT,r);for(let t=0,n=0;t<e.length;++t,n+=4)e[t]=r[n]}else n.readPixels(0,0,t.width,t.height,n.RED,n.FLOAT,e)}t.g.push(e)}return e}function Oa(t){var e=Pa(t,2);if(!e){let r=Na(t);e=Ba(t);let n=Ca(t),i=Ua(t);r.texImage2D(r.TEXTURE_2D,0,i,t.width,t.height,0,r.RED,r.FLOAT,n),Ga(t)}return e}function Na(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=wa(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Ua(t){if(t=Na(t),!ja)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))ja=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");ja=t.R16F}return ja}function Da(t){return t.l||(t.l=new Ia),t.l}function Ba(t){var e=Na(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=Pa(t,2);return r||(r=Sa(Da(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(r),t.j=!0),e.bindTexture(e.TEXTURE_2D,r),r}function Ga(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var ja,Va=class{constructor(t,e,r,n,i,s,o){this.g=t,this.m=e,this.j=r,this.canvas=n,this.l=i,this.width=s,this.height=o,this.j&&(0===--Xa&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}Fa(){return!!Pa(this,0)}ka(){return!!Pa(this,1)}R(){return!!Pa(this,2)}ja(){return(e=Pa(t=this,0))||(e=Ca(t),e=new Uint8Array(e.map(t=>Math.round(255*t))),t.g.push(e)),e;var t,e}ia(){return Ca(this)}N(){return Oa(this)}clone(){var t=[];for(let e of this.g){let r;if(e instanceof Uint8Array)r=new Uint8Array(e);else if(e instanceof Float32Array)r=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{let t=Na(this),e=Da(this);t.activeTexture(t.TEXTURE1),r=Sa(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,r);let n=Ua(this);t.texImage2D(t.TEXTURE_2D,0,n,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),La(e,t,r),xa(e,t,!1,()=>{Ba(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Ga(this)}),Ra(e),Ga(this)}}t.push(r)}return new Va(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Na(this).deleteTexture(Pa(this,2)),Xa=-1}};Va.prototype.close=Va.prototype.close,Va.prototype.clone=Va.prototype.clone,Va.prototype.getAsWebGLTexture=Va.prototype.N,Va.prototype.getAsFloat32Array=Va.prototype.ia,Va.prototype.getAsUint8Array=Va.prototype.ja,Va.prototype.hasWebGLTexture=Va.prototype.R,Va.prototype.hasFloat32Array=Va.prototype.ka,Va.prototype.hasUint8Array=Va.prototype.Fa;var Xa=250,Ha={color:"white",lineWidth:4,radius:6};function Wa(t){return{...Ha,fillColor:(t=t||{}).color,...t}}function za(t,e){return t instanceof Function?t(e):t}function Ka(t,e,r){return Math.max(Math.min(e,r),Math.min(Math.max(e,r),t))}function Ya(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function qa(t){if(!t.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.j}function $a(t,e,r){if(e.R())r(e.N());else{let n=e.ka()?e.ia():e.ja();t.m=t.m??new Ia;let i=qa(t);r((t=new Va([n],e.m,!1,i.canvas,t.m,e.width,e.height)).N()),t.close()}}function Ja(t,e,r,n){var i=function(t){return t.g||(t.g=new Fa),t.g}(t),s=qa(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;xa(i,s,!0,()=>{!function(t,e,r,n){var i=t.g;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.C),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,r),t.I&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(let[r,n]of t){t=r;let i=n,s=e.next();if(s.done)return!1;let[o,a]=s.value;if(t!==o||i[0]!==a[0]||i[1]!==a[1]||i[2]!==a[2]||i[3]!==a[3])return!1}return!!e.next().done}(t.I,n))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j);else{t.I=n;let e=Array(1024).fill(0);n.forEach((t,r)=>{if(4!==t.length)throw Error(`Color at index ${r} is not a four-channel value.`);e[4*r]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]}),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,n),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);var t=i.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)})}function Za(t,e,r,n){var i=qa(t),s=function(t){return t.h||(t.h=new Ma),t.h}(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r,a=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;xa(s,i,!0,()=>{var t=s.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s.j),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s.C),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),i.bindTexture(i.TEXTURE_2D,null),(t=s.g).activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)})}var Qa=class{constructor(t,e){"undefined"!=typeof CanvasRenderingContext2D&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.j=e):this.j=t}ya(t,e){if(t){var r=Ya(this);e=Wa(e),r.save();var n=r.canvas,i=0;for(let s of t)r.fillStyle=za(e.fillColor,{index:i,from:s}),r.strokeStyle=za(e.color,{index:i,from:s}),r.lineWidth=za(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*n.width,s.y*n.height,za(e.radius,{index:i,from:s}),0,2*Math.PI),r.fill(t),r.stroke(t),++i;r.restore()}}xa(t,e,r){if(t&&e){var n=Ya(this);r=Wa(r),n.save();var i=n.canvas,s=0;for(let o of e){n.beginPath(),e=t[o.start];let a=t[o.end];e&&a&&(n.strokeStyle=za(r.color,{index:s,from:e,to:a}),n.lineWidth=za(r.lineWidth,{index:s,from:e,to:a}),n.moveTo(e.x*i.width,e.y*i.height),n.lineTo(a.x*i.width,a.y*i.height)),++s,n.stroke()}n.restore()}}ua(t,e){var r=Ya(this);e=Wa(e),r.save(),r.beginPath(),r.lineWidth=za(e.lineWidth,{}),r.strokeStyle=za(e.color,{}),r.fillStyle=za(e.fillColor,{}),r.moveTo(t.originX,t.originY),r.lineTo(t.originX+t.width,t.originY),r.lineTo(t.originX+t.width,t.originY+t.height),r.lineTo(t.originX,t.originY+t.height),r.lineTo(t.originX,t.originY),r.stroke(),r.fill(),r.restore()}va(t,e,r=[0,0,0,255]){this.l?function(t,e,r,n){var i=qa(t);$a(t,e,e=>{Ja(t,e,r,n),(e=Ya(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,r,e):Ja(this,t.N(),r,e)}wa(t,e,r){this.l?function(t,e,r,n){var i=qa(t);$a(t,e,e=>{Za(t,e,r,n),(e=Ya(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,e,r):Za(this,t.N(),e,r)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function th(t,e){switch(e){case 0:return t.g.find(t=>t instanceof ImageData);case 1:return t.g.find(t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap);case 2:return t.g.find(t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function eh(t){var e=th(t,0);if(!e){e=nh(t);let r=ih(t),n=new Uint8Array(t.width*t.height*4);La(r,e,rh(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,n),Ra(r),e=new ImageData(new Uint8ClampedArray(n.buffer),t.width,t.height),t.g.push(e)}return e}function rh(t){var e=th(t,2);if(!e){let r=nh(t);e=sh(t);let n=th(t,1)||eh(t);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),oh(t)}return e}function nh(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=wa(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function ih(t){return t.l||(t.l=new Ia),t.l}function sh(t){var e=nh(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=th(t,2);return r||(r=Sa(ih(t),e),t.g.push(r),t.m=!0),e.bindTexture(e.TEXTURE_2D,r),r}function oh(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function ah(t){var e=nh(t);return xa(ih(t),e,!0,()=>function(t,e){var r=t.canvas;if(r.width===t.width&&r.height===t.height)return e();var n=r.width,i=r.height;return r.width=t.width,r.height=t.height,t=e(),r.width=n,r.height=i,t}(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()}))}Qa.prototype.close=Qa.prototype.close,Qa.prototype.drawConfidenceMask=Qa.prototype.wa,Qa.prototype.drawCategoryMask=Qa.prototype.va,Qa.prototype.drawBoundingBox=Qa.prototype.ua,Qa.prototype.drawConnectors=Qa.prototype.xa,Qa.prototype.drawLandmarks=Qa.prototype.ya,Qa.lerp=function(t,e,r,n,i){return Ka(n*(1-(t-e)/(r-e))+i*(1-(r-t)/(r-e)),n,i)},Qa.clamp=Ka;var hh=class{constructor(t,e,r,n,i,s,o){this.g=t,this.j=e,this.m=r,this.canvas=n,this.l=i,this.width=s,this.height=o,(this.j||this.m)&&(0===--uh&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}Ea(){return!!th(this,0)}la(){return!!th(this,1)}R(){return!!th(this,2)}Ca(){return eh(this)}Ba(){var t=th(this,1);return t||(rh(this),sh(this),t=ah(this),oh(this),this.g.push(t),this.j=!0),t}N(){return rh(this)}clone(){var t=[];for(let e of this.g){let r;if(e instanceof ImageData)r=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){let t=nh(this),e=ih(this);t.activeTexture(t.TEXTURE1),r=Sa(e,t),t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),La(e,t,r),xa(e,t,!1,()=>{sh(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),oh(this)}),Ra(e),oh(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);rh(this),sh(this),r=ah(this),oh(this)}t.push(r)}return new hh(t,this.la(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&th(this,1).close(),this.m&&nh(this).deleteTexture(th(this,2)),uh=-1}};hh.prototype.close=hh.prototype.close,hh.prototype.clone=hh.prototype.clone,hh.prototype.getAsWebGLTexture=hh.prototype.N,hh.prototype.getAsImageBitmap=hh.prototype.Ba,hh.prototype.getAsImageData=hh.prototype.Ca,hh.prototype.hasWebGLTexture=hh.prototype.R,hh.prototype.hasImageBitmap=hh.prototype.la,hh.prototype.hasImageData=hh.prototype.Ea;var uh=250;function ch(...t){return t.map(([t,e])=>({start:t,end:e}))}var lh,fh=function(t){return class extends t{Ja(){this.i._registerModelResourcesGraphService()}}}((lh=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:sa()?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){var 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){var r=t.length,n=this.i._malloc(r);this.i.HEAPU8.set(t,n),e?this.i._changeBinaryGraph(r,n):this.i._changeTextGraph(r,n),this.i._free(n)}configureAudio(t,e,r,n,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),ha(this,n||"input_audio",n=>{ha(this,i=i||"audio_header",i=>{this.i._configureAudio(n,i,t,e??0,r)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){la(this,"__graph_config__",e=>{t(e)}),ha(this,"__graph_config__",t=>{this.i._getGraphConfig(t,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,r){this.addAudioToStreamWithShape(t,0,0,e,r)}addAudioToStreamWithShape(t,e,r,n,i){var s=4*t.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(t,this.g/4),ha(this,n,t=>{this.i._addAudioToInputStream(this.g,e,r,t,i)})}addGpuBufferToStream(t,e,r){ha(this,e,e=>{var[n,i]=ua(this,t,e);this.i._addBoundTextureToStream(e,n,i,r)})}addBoolToStream(t,e,r){ha(this,e,e=>{this.i._addBoolToInputStream(t,e,r)})}addDoubleToStream(t,e,r){ha(this,e,e=>{this.i._addDoubleToInputStream(t,e,r)})}addFloatToStream(t,e,r){ha(this,e,e=>{this.i._addFloatToInputStream(t,e,r)})}addIntToStream(t,e,r){ha(this,e,e=>{this.i._addIntToInputStream(t,e,r)})}addUintToStream(t,e,r){ha(this,e,e=>{this.i._addUintToInputStream(t,e,r)})}addStringToStream(t,e,r){ha(this,e,e=>{ha(this,t,t=>{this.i._addStringToInputStream(t,e,r)})})}addStringRecordToStream(t,e,r){ha(this,e,e=>{ca(this,Object.keys(t),n=>{ca(this,Object.values(t),i=>{this.i._addFlatHashMapToInputStream(n,i,Object.keys(t).length,e,r)})})})}addProtoToStream(t,e,r,n){ha(this,r,r=>{ha(this,e,e=>{var i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,r,n),this.i._free(i)})})}addEmptyPacketToStream(t,e){ha(this,t,t=>{this.i._addEmptyPacketToInputStream(t,e)})}addBoolVectorToStream(t,e,r){ha(this,e,e=>{var n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputStream(n,e,r)})}addDoubleVectorToStream(t,e,r){ha(this,e,e=>{var n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputStream(n,e,r)})}addFloatVectorToStream(t,e,r){ha(this,e,e=>{var n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputStream(n,e,r)})}addIntVectorToStream(t,e,r){ha(this,e,e=>{var n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputStream(n,e,r)})}addUintVectorToStream(t,e,r){ha(this,e,e=>{var n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.i._addUintVectorEntry(n,e);this.i._addUintVectorToInputStream(n,e,r)})}addStringVectorToStream(t,e,r){ha(this,e,e=>{var n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let e of t)ha(this,e,t=>{this.i._addStringVectorEntry(n,t)});this.i._addStringVectorToInputStream(n,e,r)})}addBoolToInputSidePacket(t,e){ha(this,e,e=>{this.i._addBoolToInputSidePacket(t,e)})}addDoubleToInputSidePacket(t,e){ha(this,e,e=>{this.i._addDoubleToInputSidePacket(t,e)})}addFloatToInputSidePacket(t,e){ha(this,e,e=>{this.i._addFloatToInputSidePacket(t,e)})}addIntToInputSidePacket(t,e){ha(this,e,e=>{this.i._addIntToInputSidePacket(t,e)})}addUintToInputSidePacket(t,e){ha(this,e,e=>{this.i._addUintToInputSidePacket(t,e)})}addStringToInputSidePacket(t,e){ha(this,e,e=>{ha(this,t,t=>{this.i._addStringToInputSidePacket(t,e)})})}addProtoToInputSidePacket(t,e,r){ha(this,r,r=>{ha(this,e,e=>{var n=this.i._malloc(t.length);this.i.HEAPU8.set(t,n),this.i._addProtoToInputSidePacket(n,t.length,e,r),this.i._free(n)})})}addBoolVectorToInputSidePacket(t,e){ha(this,e,e=>{var r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.i._addBoolVectorEntry(r,e);this.i._addBoolVectorToInputSidePacket(r,e)})}addDoubleVectorToInputSidePacket(t,e){ha(this,e,e=>{var r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.i._addDoubleVectorEntry(r,e);this.i._addDoubleVectorToInputSidePacket(r,e)})}addFloatVectorToInputSidePacket(t,e){ha(this,e,e=>{var r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.i._addFloatVectorEntry(r,e);this.i._addFloatVectorToInputSidePacket(r,e)})}addIntVectorToInputSidePacket(t,e){ha(this,e,e=>{var r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.i._addIntVectorEntry(r,e);this.i._addIntVectorToInputSidePacket(r,e)})}addUintVectorToInputSidePacket(t,e){ha(this,e,e=>{var r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.i._addUintVectorEntry(r,e);this.i._addUintVectorToInputSidePacket(r,e)})}addStringVectorToInputSidePacket(t,e){ha(this,e,e=>{var r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(let e of t)ha(this,e,t=>{this.i._addStringVectorEntry(r,t)});this.i._addStringVectorToInputSidePacket(r,e)})}attachBoolListener(t,e){la(this,t,e),ha(this,t,t=>{this.i._attachBoolListener(t)})}attachBoolVectorListener(t,e){fa(this,t,e),ha(this,t,t=>{this.i._attachBoolVectorListener(t)})}attachIntListener(t,e){la(this,t,e),ha(this,t,t=>{this.i._attachIntListener(t)})}attachIntVectorListener(t,e){fa(this,t,e),ha(this,t,t=>{this.i._attachIntVectorListener(t)})}attachUintListener(t,e){la(this,t,e),ha(this,t,t=>{this.i._attachUintListener(t)})}attachUintVectorListener(t,e){fa(this,t,e),ha(this,t,t=>{this.i._attachUintVectorListener(t)})}attachDoubleListener(t,e){la(this,t,e),ha(this,t,t=>{this.i._attachDoubleListener(t)})}attachDoubleVectorListener(t,e){fa(this,t,e),ha(this,t,t=>{this.i._attachDoubleVectorListener(t)})}attachFloatListener(t,e){la(this,t,e),ha(this,t,t=>{this.i._attachFloatListener(t)})}attachFloatVectorListener(t,e){fa(this,t,e),ha(this,t,t=>{this.i._attachFloatVectorListener(t)})}attachStringListener(t,e){la(this,t,e),ha(this,t,t=>{this.i._attachStringListener(t)})}attachStringVectorListener(t,e){fa(this,t,e),ha(this,t,t=>{this.i._attachStringVectorListener(t)})}attachProtoListener(t,e,r){la(this,t,e),ha(this,t,t=>{this.i._attachProtoListener(t,r||!1)})}attachProtoVectorListener(t,e,r){fa(this,t,e),ha(this,t,t=>{this.i._attachProtoVectorListener(t,r||!1)})}attachAudioListener(t,e,r){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),la(this,t,(t,r)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,r)}),ha(this,t,t=>{this.i._attachAudioListener(t,r||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends lh{get ga(){return this.i}pa(t,e,r){ha(this,e,e=>{var[n,i]=ua(this,t,e);this.ga._addBoundTextureAsImageToStream(e,n,i,r)})}Z(t,e){la(this,t,e),ha(this,t,t=>{this.ga._attachImageListener(t)})}aa(t,e){fa(this,t,e),ha(this,t,t=>{this.ga._attachImageVectorListener(t)})}})),dh=class extends fh{};async function ph(t,e,r){return async function(t,e,r,n){return da(t,e,r,n)}(t,r.canvas??(sa()?void 0:document.createElement("canvas")),e,r)}function gh(t,e,r,n){if(t.U){let s=new Cs;if(r?.regionOfInterest){if(!t.oa)throw Error("This task doesn't support region-of-interest.");var i=r.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(i.left<0||i.top<0||i.right>1||i.bottom>1)throw Error("Expected RectF values to be in [0,1].");Rr(s,1,(i.left+i.right)/2),Rr(s,2,(i.top+i.bottom)/2),Rr(s,4,i.right-i.left),Rr(s,3,i.bottom-i.top)}else Rr(s,1,.5),Rr(s,2,.5),Rr(s,4,1),Rr(s,3,1);if(r?.rotationDegrees){if(r?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(Rr(s,5,-Math.PI*r.rotationDegrees/180),r?.rotationDegrees%180!=0){let[t,n]=aa(e);r=Sr(s,3)*n/t,i=Sr(s,4)*t/n,Rr(s,4,r),Rr(s,3,i)}}t.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",t.U,n)}t.g.pa(e,t.X,n??performance.now()),t.finishProcessing()}function mh(t,e,r){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");gh(t,e,r,t.C+1)}function vh(t,e,r,n){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");gh(t,e,r,n)}function yh(t,e,r,n){var i=e.data,s=e.width,o=s*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error("Unsupported channel count: "+i.length/o);return t=new Va([i],r,!1,t.g.i.canvas,t.P,s,e),n?t.clone():t}var _h=class extends Ea{constructor(t,e,r,n){super(t),this.g=t,this.X=e,this.U=r,this.oa=n,this.P=new Ia}l(t,e=!0){if("runningMode"in t&&tr(this.baseOptions,2,Jt(!!t.runningMode&&"IMAGE"!==t.runningMode)),void 0!==t.canvas&&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()}};_h.prototype.close=_h.prototype.close;var Eh=class extends _h{constructor(t,e){super(new dh(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},Tr(t=this.h=new Zs,0,1,e=new qs),Rr(this.h,2,.5),Rr(this.h,3,.3)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&Rr(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&Rr(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}F(t,e){return this.j={detections:[]},mh(this,t,e),this.j}G(t,e,r){return this.j={detections:[]},vh(this,t,r,e),this.j}m(){var t=new vs;gs(t,"image_in"),gs(t,"norm_rect_in"),ms(t,"detections");var e=new ss;Mn(e,to,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),hs(r,"IMAGE:image_in"),hs(r,"NORM_RECT:norm_rect_in"),us(r,"DETECTIONS:detections"),r.o(e),ps(t,r),this.g.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=Ss(e),this.j.detections.push(qo(t));ma(this,e)}),this.g.attachEmptyPacketListener("detections",t=>{ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Eh.prototype.detectForVideo=Eh.prototype.G,Eh.prototype.detect=Eh.prototype.F,Eh.prototype.setOptions=Eh.prototype.o,Eh.createFromModelPath=async function(t,e){return ph(Eh,t,{baseOptions:{modelAssetPath:e}})},Eh.createFromModelBuffer=function(t,e){return ph(Eh,t,{baseOptions:{modelAssetBuffer:e}})},Eh.createFromOptions=function(t,e){return ph(Eh,t,e)};var wh=ch([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]),Th=ch([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]),Ah=ch([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),bh=ch([474,475],[475,476],[476,477],[477,474]),kh=ch([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]),xh=ch([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Sh=ch([469,470],[470,471],[471,472],[472,469]),Lh=ch([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[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]),Rh=[...wh,...Th,...Ah,...kh,...xh,...Lh],Ih=ch([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]);function Fh(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Mh=class extends _h{constructor(t,e){super(new dh(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,Tr(t=this.h=new no,0,1,e=new qs),this.A=new ro,Tr(this.h,0,3,this.A),this.u=new Zs,Tr(this.h,0,2,this.u),Lr(this.u,4,1),Rr(this.u,2,.5),Rr(this.A,2,.5),Rr(this.h,4,.5)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(this.h,0,1,t)}o(t){return"numFaces"in t&&Lr(this.u,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&Rr(this.u,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&Rr(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&Rr(this.A,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}F(t,e){return Fh(this),mh(this,t,e),this.j}G(t,e,r){return Fh(this),vh(this,t,r,e),this.j}m(){var t=new vs;gs(t,"image_in"),gs(t,"norm_rect"),ms(t,"face_landmarks");var e=new ss;Mn(e,so,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),hs(r,"IMAGE:image_in"),hs(r,"NORM_RECT:norm_rect"),us(r,"NORM_LANDMARKS:face_landmarks"),r.o(e),ps(t,r),this.g.attachProtoVectorListener("face_landmarks",(t,e)=>{for(let e of t)t=Fs(e),this.j.faceLandmarks.push($o(t));ma(this,e)}),this.g.attachEmptyPacketListener("face_landmarks",t=>{ma(this,t)}),this.outputFaceBlendshapes&&(ms(t,"blendshapes"),us(r,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(t,e)=>{if(this.outputFaceBlendshapes)for(let e of t)t=As(e),this.j.faceBlendshapes.push(Ko(t.g()??[]));ma(this,e)}),this.g.attachEmptyPacketListener("blendshapes",t=>{ma(this,t)})),this.outputFacialTransformationMatrixes&&(ms(t,"face_geometry"),us(r,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(t,e)=>{if(this.outputFacialTransformationMatrixes)for(let e of t)(t=yr(t=eo(e),Ms,2))&&this.j.facialTransformationMatrixes.push({rows:xr(t,1)??0??0,columns:xr(t,2)??0??0,data:nr(t,3,$t,rr()).slice()??[]});ma(this,e)}),this.g.attachEmptyPacketListener("face_geometry",t=>{ma(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Mh.prototype.detectForVideo=Mh.prototype.G,Mh.prototype.detect=Mh.prototype.F,Mh.prototype.setOptions=Mh.prototype.o,Mh.createFromModelPath=function(t,e){return ph(Mh,t,{baseOptions:{modelAssetPath:e}})},Mh.createFromModelBuffer=function(t,e){return ph(Mh,t,{baseOptions:{modelAssetBuffer:e}})},Mh.createFromOptions=function(t,e){return ph(Mh,t,e)},Mh.FACE_LANDMARKS_LIPS=wh,Mh.FACE_LANDMARKS_LEFT_EYE=Th,Mh.FACE_LANDMARKS_LEFT_EYEBROW=Ah,Mh.FACE_LANDMARKS_LEFT_IRIS=bh,Mh.FACE_LANDMARKS_RIGHT_EYE=kh,Mh.FACE_LANDMARKS_RIGHT_EYEBROW=xh,Mh.FACE_LANDMARKS_RIGHT_IRIS=Sh,Mh.FACE_LANDMARKS_FACE_OVAL=Lh,Mh.FACE_LANDMARKS_CONTOURS=Rh,Mh.FACE_LANDMARKS_TESSELATION=Ih;var Ph=ch([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 Ch(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Oh(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function Nh(t,e=!0){var r=[];for(let i of t){var n=As(i);t=[];for(let r of n.g())n=e&&null!=xr(r,1)?xr(r,1)??0:-1,t.push({score:Sr(r,2)??0,index:n,categoryName:le(Ze(r,3))??""??"",displayName:le(Ze(r,4))??""??""});r.push(t)}return r}var Uh=class extends _h{constructor(t,e){super(new dh(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Tr(t=this.j=new fo,0,1,e=new qs),this.u=new lo,Tr(this.j,0,2,this.u),this.D=new co,Tr(this.u,0,3,this.D),this.A=new uo,Tr(this.u,0,2,this.A),this.h=new ho,Tr(this.j,0,3,this.h),Rr(this.A,2,.5),Rr(this.u,4,.5),Rr(this.D,2,.5)}get baseOptions(){return yr(this.j,qs,1)}set baseOptions(t){Tr(this.j,0,1,t)}o(t){if(Lr(this.A,3,t.numHands??1),"minHandDetectionConfidence"in t&&Rr(this.A,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Rr(this.u,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Rr(this.D,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new oo,r=e,n=Wo(t.cannedGesturesClassifierOptions,yr(this.h,oo,3)?.l());Tr(r,0,2,n),Tr(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&yr(this.h,oo,3)?.g();return t.customGesturesClassifierOptions?(Tr(r=e=new oo,0,2,n=Wo(t.customGesturesClassifierOptions,yr(this.h,oo,4)?.l())),Tr(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&yr(this.h,oo,4)?.g(),this.l(t)}Ha(t,e){return Ch(this),mh(this,t,e),Oh(this)}Ia(t,e,r){return Ch(this),vh(this,t,r,e),Oh(this)}m(){var t=new vs;gs(t,"image_in"),gs(t,"norm_rect"),ms(t,"hand_gestures"),ms(t,"hand_landmarks"),ms(t,"world_hand_landmarks"),ms(t,"handedness");var e=new ss;Mn(e,yo,this.j);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),hs(r,"IMAGE:image_in"),hs(r,"NORM_RECT:norm_rect"),us(r,"HAND_GESTURES:hand_gestures"),us(r,"LANDMARKS:hand_landmarks"),us(r,"WORLD_LANDMARKS:world_hand_landmarks"),us(r,"HANDEDNESS:handedness"),r.o(e),ps(t,r),this.g.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t){t=Fs(e);let r=[];for(let e of Er(t,Is,1))r.push({x:Sr(e,1)??0,y:Sr(e,2)??0,z:Sr(e,3)??0,visibility:Sr(e,4)??0});this.landmarks.push(r)}ma(this,e)}),this.g.attachEmptyPacketListener("hand_landmarks",t=>{ma(this,t)}),this.g.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t){t=Rs(e);let r=[];for(let e of Er(t,Ls,1))r.push({x:Sr(e,1)??0,y:Sr(e,2)??0,z:Sr(e,3)??0,visibility:Sr(e,4)??0});this.worldLandmarks.push(r)}ma(this,e)}),this.g.attachEmptyPacketListener("world_hand_landmarks",t=>{ma(this,t)}),this.g.attachProtoVectorListener("hand_gestures",(t,e)=>{this.gestures.push(...Nh(t,!1)),ma(this,e)}),this.g.attachEmptyPacketListener("hand_gestures",t=>{ma(this,t)}),this.g.attachProtoVectorListener("handedness",(t,e)=>{this.handedness.push(...Nh(t)),ma(this,e)}),this.g.attachEmptyPacketListener("handedness",t=>{ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Dh(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Uh.prototype.recognizeForVideo=Uh.prototype.Ia,Uh.prototype.recognize=Uh.prototype.Ha,Uh.prototype.setOptions=Uh.prototype.o,Uh.createFromModelPath=function(t,e){return ph(Uh,t,{baseOptions:{modelAssetPath:e}})},Uh.createFromModelBuffer=function(t,e){return ph(Uh,t,{baseOptions:{modelAssetBuffer:e}})},Uh.createFromOptions=function(t,e){return ph(Uh,t,e)},Uh.HAND_CONNECTIONS=Ph;var Bh=class extends _h{constructor(t,e){super(new dh(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Tr(t=this.h=new lo,0,1,e=new qs),this.u=new co,Tr(this.h,0,3,this.u),this.j=new uo,Tr(this.h,0,2,this.j),Lr(this.j,3,1),Rr(this.j,2,.5),Rr(this.u,2,.5),Rr(this.h,4,.5)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(this.h,0,1,t)}o(t){return"numHands"in t&&Lr(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&Rr(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Rr(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Rr(this.u,2,t.minHandPresenceConfidence??.5),this.l(t)}F(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],mh(this,t,e),Dh(this)}G(t,e,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],vh(this,t,r,e),Dh(this)}m(){var t=new vs;gs(t,"image_in"),gs(t,"norm_rect"),ms(t,"hand_landmarks"),ms(t,"world_hand_landmarks"),ms(t,"handedness");var e=new ss;Mn(e,_o,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),hs(r,"IMAGE:image_in"),hs(r,"NORM_RECT:norm_rect"),us(r,"LANDMARKS:hand_landmarks"),us(r,"WORLD_LANDMARKS:world_hand_landmarks"),us(r,"HANDEDNESS:handedness"),r.o(e),ps(t,r),this.g.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t)t=Fs(e),this.landmarks.push($o(t));ma(this,e)}),this.g.attachEmptyPacketListener("hand_landmarks",t=>{ma(this,t)}),this.g.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t)t=Rs(e),this.worldLandmarks.push(Jo(t));ma(this,e)}),this.g.attachEmptyPacketListener("world_hand_landmarks",t=>{ma(this,t)}),this.g.attachProtoVectorListener("handedness",(t,e)=>{var r=this.handedness,n=r.push,i=[];for(let e of t){t=As(e);let r=[];for(let e of t.g())r.push({score:Sr(e,2)??0,index:xr(e,1)??0??-1,categoryName:le(Ze(e,3))??""??"",displayName:le(Ze(e,4))??""??""});i.push(r)}n.call(r,...i),ma(this,e)}),this.g.attachEmptyPacketListener("handedness",t=>{ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Bh.prototype.detectForVideo=Bh.prototype.G,Bh.prototype.detect=Bh.prototype.F,Bh.prototype.setOptions=Bh.prototype.o,Bh.createFromModelPath=function(t,e){return ph(Bh,t,{baseOptions:{modelAssetPath:e}})},Bh.createFromModelBuffer=function(t,e){return ph(Bh,t,{baseOptions:{modelAssetBuffer:e}})},Bh.createFromOptions=function(t,e){return ph(Bh,t,e)},Bh.HAND_CONNECTIONS=Ph;var Gh=ch([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 jh(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Vh(t){try{if(!t.D)return t.h;t.D(t.h)}finally{_a(t)}}function Xh(t,e){t=Fs(t),e.push($o(t))}var Hh=class extends _h{constructor(t,e){super(new dh(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,Tr(t=this.j=new Ao,0,1,e=new qs),this.I=new co,Tr(this.j,0,2,this.I),this.W=new Eo,Tr(this.j,0,3,this.W),this.u=new Zs,Tr(this.j,0,4,this.u),this.O=new ro,Tr(this.j,0,5,this.O),this.A=new wo,Tr(this.j,0,6,this.A),this.M=new To,Tr(this.j,0,7,this.M),Rr(this.u,2,.5),Rr(this.u,3,.3),Rr(this.O,2,.5),Rr(this.A,2,.5),Rr(this.A,3,.3),Rr(this.M,2,.5),Rr(this.I,2,.5)}get baseOptions(){return yr(this.j,qs,1)}set baseOptions(t){Tr(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&Rr(this.u,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&Rr(this.u,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&Rr(this.O,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&Rr(this.A,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&Rr(this.A,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&Rr(this.M,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&Rr(this.I,2,t.minHandLandmarksConfidence??.5),this.l(t)}F(t,e,r){var n="function"!=typeof e?e:{};return this.D="function"==typeof e?e:r,jh(this),mh(this,t,n),Vh(this)}G(t,e,r,n){var i="function"!=typeof r?r:{};return this.D="function"==typeof r?r:n,jh(this),vh(this,t,i,e),Vh(this)}m(){var t=new vs;gs(t,"input_frames_image"),ms(t,"pose_landmarks"),ms(t,"pose_world_landmarks"),ms(t,"face_landmarks"),ms(t,"left_hand_landmarks"),ms(t,"left_hand_world_landmarks"),ms(t,"right_hand_landmarks"),ms(t,"right_hand_world_landmarks");var e=new ss,r=new Wi;Ir(r,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(t,e){if(null!=e)if(Array.isArray(e))tr(t,2,Ce(e,0,Ne));else{if(!("string"==typeof e||e instanceof M||S(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");cr(t,2,ut(e,!1),R())}}(r,this.j.g());var n=new cs;Ir(n,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),kr(n,8,Wi,r),hs(n,"IMAGE:input_frames_image"),us(n,"POSE_LANDMARKS:pose_landmarks"),us(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),us(n,"FACE_LANDMARKS:face_landmarks"),us(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),us(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),us(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),us(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.o(e),ps(t,n),va(this,t),this.g.attachProtoListener("pose_landmarks",(t,e)=>{Xh(t,this.h.poseLandmarks),ma(this,e)}),this.g.attachEmptyPacketListener("pose_landmarks",t=>{ma(this,t)}),this.g.attachProtoListener("pose_world_landmarks",(t,e)=>{var r=this.h.poseWorldLandmarks;t=Rs(t),r.push(Jo(t)),ma(this,e)}),this.g.attachEmptyPacketListener("pose_world_landmarks",t=>{ma(this,t)}),this.outputPoseSegmentationMasks&&(us(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),ya(this,"pose_segmentation_mask"),this.g.Z("pose_segmentation_mask",(t,e)=>{this.h.poseSegmentationMasks=[yh(this,t,!0,!this.D)],ma(this,e)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",t=>{this.h.poseSegmentationMasks=[],ma(this,t)})),this.g.attachProtoListener("face_landmarks",(t,e)=>{Xh(t,this.h.faceLandmarks),ma(this,e)}),this.g.attachEmptyPacketListener("face_landmarks",t=>{ma(this,t)}),this.outputFaceBlendshapes&&(ms(t,"extra_blendshapes"),us(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(t,e)=>{var r=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=As(t),r.push(Ko(t.g()??[]))),ma(this,e)}),this.g.attachEmptyPacketListener("extra_blendshapes",t=>{ma(this,t)})),this.g.attachProtoListener("left_hand_landmarks",(t,e)=>{Xh(t,this.h.leftHandLandmarks),ma(this,e)}),this.g.attachEmptyPacketListener("left_hand_landmarks",t=>{ma(this,t)}),this.g.attachProtoListener("left_hand_world_landmarks",(t,e)=>{var r=this.h.leftHandWorldLandmarks;t=Rs(t),r.push(Jo(t)),ma(this,e)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",t=>{ma(this,t)}),this.g.attachProtoListener("right_hand_landmarks",(t,e)=>{Xh(t,this.h.rightHandLandmarks),ma(this,e)}),this.g.attachEmptyPacketListener("right_hand_landmarks",t=>{ma(this,t)}),this.g.attachProtoListener("right_hand_world_landmarks",(t,e)=>{var r=this.h.rightHandWorldLandmarks;t=Rs(t),r.push(Jo(t)),ma(this,e)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",t=>{ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Hh.prototype.detectForVideo=Hh.prototype.G,Hh.prototype.detect=Hh.prototype.F,Hh.prototype.setOptions=Hh.prototype.o,Hh.createFromModelPath=function(t,e){return ph(Hh,t,{baseOptions:{modelAssetPath:e}})},Hh.createFromModelBuffer=function(t,e){return ph(Hh,t,{baseOptions:{modelAssetBuffer:e}})},Hh.createFromOptions=function(t,e){return ph(Hh,t,e)},Hh.HAND_CONNECTIONS=Ph,Hh.POSE_CONNECTIONS=Gh,Hh.FACE_LANDMARKS_LIPS=wh,Hh.FACE_LANDMARKS_LEFT_EYE=Th,Hh.FACE_LANDMARKS_LEFT_EYEBROW=Ah,Hh.FACE_LANDMARKS_LEFT_IRIS=bh,Hh.FACE_LANDMARKS_RIGHT_EYE=kh,Hh.FACE_LANDMARKS_RIGHT_EYEBROW=xh,Hh.FACE_LANDMARKS_RIGHT_IRIS=Sh,Hh.FACE_LANDMARKS_FACE_OVAL=Lh,Hh.FACE_LANDMARKS_CONTOURS=Rh,Hh.FACE_LANDMARKS_TESSELATION=Ih;var Wh=class extends _h{constructor(t,e){super(new dh(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},Tr(t=this.h=new xo,0,1,e=new qs)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(this.h,0,1,t)}o(t){return Tr(this.h,0,2,Wo(t,yr(this.h,Vs,2))),this.l(t)}sa(t,e){return this.j={classifications:[]},mh(this,t,e),this.j}ta(t,e,r){return this.j={classifications:[]},vh(this,t,r,e),this.j}m(){var t=new vs;gs(t,"input_image"),gs(t,"norm_rect"),ms(t,"classifications");var e=new ss;Mn(e,So,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),hs(r,"IMAGE:input_image"),hs(r,"NORM_RECT:norm_rect"),us(r,"CLASSIFICATIONS:classifications"),r.o(e),ps(t,r),this.g.attachProtoListener("classifications",(t,e)=>{this.j=Yo(Ns(t)),ma(this,e)}),this.g.attachEmptyPacketListener("classifications",t=>{ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Wh.prototype.classifyForVideo=Wh.prototype.ta,Wh.prototype.classify=Wh.prototype.sa,Wh.prototype.setOptions=Wh.prototype.o,Wh.createFromModelPath=function(t,e){return ph(Wh,t,{baseOptions:{modelAssetPath:e}})},Wh.createFromModelBuffer=function(t,e){return ph(Wh,t,{baseOptions:{modelAssetBuffer:e}})},Wh.createFromOptions=function(t,e){return ph(Wh,t,e)};var zh=class extends _h{constructor(t,e){super(new dh(t,e),"image_in","norm_rect",!0),this.h=new Lo,this.embeddings={embeddings:[]},Tr(t=this.h,0,1,e=new qs)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(this.h,0,1,t)}o(t){var e=this.h,r=yr(this.h,Hs,2);return r=r?r.clone():new Hs,void 0!==t.l2Normalize?tr(r,1,Jt(t.l2Normalize)):"l2Normalize"in t&&tr(r,1),void 0!==t.quantize?tr(r,2,Jt(t.quantize)):"quantize"in t&&tr(r,2),Tr(e,0,2,r),this.l(t)}za(t,e){return mh(this,t,e),this.embeddings}Aa(t,e,r){return vh(this,t,r,e),this.embeddings}m(){var t=new vs;gs(t,"image_in"),gs(t,"norm_rect"),ms(t,"embeddings_out");var e=new ss;Mn(e,Ro,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),hs(r,"IMAGE:image_in"),hs(r,"NORM_RECT:norm_rect"),us(r,"EMBEDDINGS:embeddings_out"),r.o(e),ps(t,r),this.g.attachProtoListener("embeddings_out",(t,e)=>{t=js(t),this.embeddings=function(t){return{embeddings:Er(t,Bs,1).map(t=>{var e={headIndex:xr(t,3)??0??-1,headName:le(Ze(t,4))??""??""},r=t.v;return void 0!==vr(r,0|r[tt],Us,fr(t,1))?(t=nr(t=yr(t,Us,fr(t,1),void 0),1,$t,rr()),e.floatEmbedding=t.slice()):(r=new Uint8Array(0),e.quantizedEmbedding=yr(t,Ds,fr(t,2),void 0)?.na()?.h()??r),e}),timestampMs:zo(Ze(t,2,void 0,void 0,he)??$e)}}(t),ma(this,e)}),this.g.attachEmptyPacketListener("embeddings_out",t=>{ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};zh.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=Qo(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=Qo(Zo(t.quantizedEmbedding),Zo(e.quantizedEmbedding))}return t},zh.prototype.embedForVideo=zh.prototype.Aa,zh.prototype.embed=zh.prototype.za,zh.prototype.setOptions=zh.prototype.o,zh.createFromModelPath=function(t,e){return ph(zh,t,{baseOptions:{modelAssetPath:e}})},zh.createFromModelBuffer=function(t,e){return ph(zh,t,{baseOptions:{modelAssetBuffer:e}})},zh.createFromOptions=function(t,e){return ph(zh,t,e)};var Kh=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};function Yh(t){var e=function(t){return Er(t,cs,1)}(t.ca()).filter(t=>(le(Ze(t,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(t.u=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(yr(e[0],ss,7)?.j()?.g()??new Map).forEach((e,r)=>{t.u[Number(r)]=le(Ze(e,1))??""})}function qh(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function $h(t){try{let e=new Kh(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{_a(t)}}Kh.prototype.close=Kh.prototype.close;var Jh=class extends _h{constructor(t,e){super(new dh(t,e),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Co,this.A=new Io,Tr(this.h,0,3,this.A),Tr(t=this.h,0,1,e=new qs)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?tr(this.h,2,ce(t.displayNamesLocale)):"displayNamesLocale"in t&&tr(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}L(){Yh(this)}segment(t,e,r){var n="function"!=typeof e?e:{};return this.j="function"==typeof e?e:r,qh(this),mh(this,t,n),$h(this)}La(t,e,r,n){var i="function"!=typeof r?r:{};return this.j="function"==typeof r?r:n,qh(this),vh(this,t,i,e),$h(this)}Da(){return this.u}m(){var t=new vs;gs(t,"image_in"),gs(t,"norm_rect");var e=new ss;Mn(e,Oo,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),hs(r,"IMAGE:image_in"),hs(r,"NORM_RECT:norm_rect"),r.o(e),ps(t,r),va(this,t),this.outputConfidenceMasks&&(ms(t,"confidence_masks"),us(r,"CONFIDENCE_MASKS:confidence_masks"),ya(this,"confidence_masks"),this.g.aa("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>yh(this,t,!0,!this.j)),ma(this,e)}),this.g.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],ma(this,t)})),this.outputCategoryMask&&(ms(t,"category_mask"),us(r,"CATEGORY_MASK:category_mask"),ya(this,"category_mask"),this.g.Z("category_mask",(t,e)=>{this.categoryMask=yh(this,t,!1,!this.j),ma(this,e)}),this.g.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,ma(this,t)})),ms(t,"quality_scores"),us(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,ma(this,e)}),this.g.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Jh.prototype.getLabels=Jh.prototype.Da,Jh.prototype.segmentForVideo=Jh.prototype.La,Jh.prototype.segment=Jh.prototype.segment,Jh.prototype.setOptions=Jh.prototype.o,Jh.createFromModelPath=function(t,e){return ph(Jh,t,{baseOptions:{modelAssetPath:e}})},Jh.createFromModelBuffer=function(t,e){return ph(Jh,t,{baseOptions:{modelAssetBuffer:e}})},Jh.createFromOptions=function(t,e){return ph(Jh,t,e)};var Zh=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};Zh.prototype.close=Zh.prototype.close;var Qh=class extends _h{constructor(t,e){super(new dh(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Co,this.u=new Io,Tr(this.h,0,3,this.u),Tr(t=this.h,0,1,e=new qs)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(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,r,n){var i="function"!=typeof r?r:{};if(this.j="function"==typeof r?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.C+1,n=new Bo,e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var s=new No;cr(s,3,Jt(!0),!1),cr(s,1,qt(e.keypoint.x),0),cr(s,2,qt(e.keypoint.y),0),Ar(n,1,Go,s)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");{let t=new Do;for(s of e.scribble)cr(e=new No,3,Jt(!0),!1),cr(e,1,qt(s.x),0),cr(e,2,qt(s.y),0),kr(t,1,No,e);Ar(n,2,Go,t)}}this.g.addProtoToStream(n.g(),"mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest","roi_in",r),mh(this,t,i);t:{try{let t=new Zh(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var o=t;break t}this.j(t)}finally{_a(this)}o=void 0}return o}m(){var t=new vs;gs(t,"image_in"),gs(t,"roi_in"),gs(t,"norm_rect_in");var e=new ss;Mn(e,Oo,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"),hs(r,"IMAGE:image_in"),hs(r,"ROI:roi_in"),hs(r,"NORM_RECT:norm_rect_in"),r.o(e),ps(t,r),va(this,t),this.outputConfidenceMasks&&(ms(t,"confidence_masks"),us(r,"CONFIDENCE_MASKS:confidence_masks"),ya(this,"confidence_masks"),this.g.aa("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>yh(this,t,!0,!this.j)),ma(this,e)}),this.g.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],ma(this,t)})),this.outputCategoryMask&&(ms(t,"category_mask"),us(r,"CATEGORY_MASK:category_mask"),ya(this,"category_mask"),this.g.Z("category_mask",(t,e)=>{this.categoryMask=yh(this,t,!1,!this.j),ma(this,e)}),this.g.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,ma(this,t)})),ms(t,"quality_scores"),us(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,ma(this,e)}),this.g.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Qh.prototype.segment=Qh.prototype.segment,Qh.prototype.setOptions=Qh.prototype.o,Qh.createFromModelPath=function(t,e){return ph(Qh,t,{baseOptions:{modelAssetPath:e}})},Qh.createFromModelBuffer=function(t,e){return ph(Qh,t,{baseOptions:{modelAssetBuffer:e}})},Qh.createFromOptions=function(t,e){return ph(Qh,t,e)};var tu=class extends _h{constructor(t,e){super(new dh(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},Tr(t=this.h=new jo,0,1,e=new qs)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?tr(this.h,2,ce(t.displayNamesLocale)):"displayNamesLocale"in t&&tr(this.h,2),void 0!==t.maxResults?Lr(this.h,3,t.maxResults):"maxResults"in t&&tr(this.h,3),void 0!==t.scoreThreshold?Rr(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&tr(this.h,4),void 0!==t.categoryAllowlist?Fr(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&tr(this.h,5),void 0!==t.categoryDenylist?Fr(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&tr(this.h,6),this.l(t)}F(t,e){return this.j={detections:[]},mh(this,t,e),this.j}G(t,e,r){return this.j={detections:[]},vh(this,t,r,e),this.j}m(){var t=new vs;gs(t,"input_frame_gpu"),gs(t,"norm_rect"),ms(t,"detections");var e=new ss;Mn(e,Vo,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),hs(r,"IMAGE:input_frame_gpu"),hs(r,"NORM_RECT:norm_rect"),us(r,"DETECTIONS:detections"),r.o(e),ps(t,r),this.g.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=Ss(e),this.j.detections.push(qo(t));ma(this,e)}),this.g.attachEmptyPacketListener("detections",t=>{ma(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};tu.prototype.detectForVideo=tu.prototype.G,tu.prototype.detect=tu.prototype.F,tu.prototype.setOptions=tu.prototype.o,tu.createFromModelPath=async function(t,e){return ph(tu,t,{baseOptions:{modelAssetPath:e}})},tu.createFromModelBuffer=function(t,e){return ph(tu,t,{baseOptions:{modelAssetBuffer:e}})},tu.createFromOptions=function(t,e){return ph(tu,t,e)};var eu=class{constructor(t,e,r){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=r}close(){this.segmentationMasks?.forEach(t=>{t.close()})}};function ru(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function nu(t){try{let e=new eu(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.u)return e;t.u(e)}finally{_a(t)}}eu.prototype.close=eu.prototype.close;var iu=class extends _h{constructor(t,e){super(new dh(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,Tr(t=this.h=new Xo,0,1,e=new qs),this.A=new To,Tr(this.h,0,3,this.A),this.j=new wo,Tr(this.h,0,2,this.j),Lr(this.j,4,1),Rr(this.j,2,.5),Rr(this.A,2,.5),Rr(this.h,4,.5)}get baseOptions(){return yr(this.h,qs,1)}set baseOptions(t){Tr(this.h,0,1,t)}o(t){return"numPoses"in t&&Lr(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&Rr(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&Rr(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&Rr(this.A,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}F(t,e,r){var n="function"!=typeof e?e:{};return this.u="function"==typeof e?e:r,ru(this),mh(this,t,n),nu(this)}G(t,e,r,n){var i="function"!=typeof r?r:{};return this.u="function"==typeof r?r:n,ru(this),vh(this,t,i,e),nu(this)}m(){var t=new vs;gs(t,"image_in"),gs(t,"norm_rect"),ms(t,"normalized_landmarks"),ms(t,"world_landmarks"),ms(t,"segmentation_masks");var e=new ss;Mn(e,Ho,this.h);var r=new cs;Ir(r,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),hs(r,"IMAGE:image_in"),hs(r,"NORM_RECT:norm_rect"),us(r,"NORM_LANDMARKS:normalized_landmarks"),us(r,"WORLD_LANDMARKS:world_landmarks"),r.o(e),ps(t,r),va(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(t,e)=>{this.landmarks=[];for(let e of t)t=Fs(e),this.landmarks.push($o(t));ma(this,e)}),this.g.attachEmptyPacketListener("normalized_landmarks",t=>{this.landmarks=[],ma(this,t)}),this.g.attachProtoVectorListener("world_landmarks",(t,e)=>{this.worldLandmarks=[];for(let e of t)t=Rs(e),this.worldLandmarks.push(Jo(t));ma(this,e)}),this.g.attachEmptyPacketListener("world_landmarks",t=>{this.worldLandmarks=[],ma(this,t)}),this.outputSegmentationMasks&&(us(r,"SEGMENTATION_MASK:segmentation_masks"),ya(this,"segmentation_masks"),this.g.aa("segmentation_masks",(t,e)=>{this.segmentationMasks=t.map(t=>yh(this,t,!0,!this.u)),ma(this,e)}),this.g.attachEmptyPacketListener("segmentation_masks",t=>{this.segmentationMasks=[],ma(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};iu.prototype.detectForVideo=iu.prototype.G,iu.prototype.detect=iu.prototype.F,iu.prototype.setOptions=iu.prototype.o,iu.createFromModelPath=function(t,e){return ph(iu,t,{baseOptions:{modelAssetPath:e}})},iu.createFromModelBuffer=function(t,e){return ph(iu,t,{baseOptions:{modelAssetBuffer:e}})},iu.createFromOptions=function(t,e){return ph(iu,t,e)},iu.POSE_CONNECTIONS=Gh,exports.DrawingUtils=Qa,exports.FaceDetector=Eh,exports.FaceLandmarker=Mh,exports.FilesetResolver=ia,exports.GestureRecognizer=Uh,exports.HandLandmarker=Bh,exports.HolisticLandmarker=Hh,exports.ImageClassifier=Wh,exports.ImageEmbedder=zh,exports.ImageSegmenter=Jh,exports.ImageSegmenterResult=Kh,exports.InteractiveSegmenter=Qh,exports.InteractiveSegmenterResult=Zh,exports.MPImage=hh,exports.MPMask=Va,exports.ObjectDetector=tu,exports.PoseLandmarker=iu,exports.TaskRunner=Ea,exports.VisionTaskRunner=_h;
2
2
  //# sourceMappingURL=vision_bundle_cjs.js.map