@saywright/studio 0.1.1 → 0.2.0

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.
Files changed (75) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +0 -6
  2. package/dist/bridge.js +1109 -179
  3. package/dist/cli.mjs +1966 -375
  4. package/dist/client/assets/CommandPalette-VEQNxJ4K.js +1 -0
  5. package/dist/client/assets/CommandPalette-VEQNxJ4K.js.br +0 -0
  6. package/dist/client/assets/CommandPalette-VEQNxJ4K.js.gz +0 -0
  7. package/dist/client/assets/HelpDialog-CnCVSSNP.js +1 -0
  8. package/dist/client/assets/HelpDialog-CnCVSSNP.js.br +0 -0
  9. package/dist/client/assets/HelpDialog-CnCVSSNP.js.gz +0 -0
  10. package/dist/client/assets/ReportView-BwBy4JIG.js +4 -0
  11. package/dist/client/assets/ReportView-BwBy4JIG.js.br +0 -0
  12. package/dist/client/assets/ReportView-BwBy4JIG.js.gz +0 -0
  13. package/dist/client/assets/SettingsDialog-CS5w9CxJ.js +1 -0
  14. package/dist/client/assets/SettingsDialog-CS5w9CxJ.js.br +0 -0
  15. package/dist/client/assets/SettingsDialog-CS5w9CxJ.js.gz +0 -0
  16. package/dist/client/assets/arrow-left-BpsxETMA.js +1 -0
  17. package/dist/client/assets/brand-BSL9G2NW.js +57 -0
  18. package/dist/client/assets/brand-BSL9G2NW.js.br +0 -0
  19. package/dist/client/assets/brand-BSL9G2NW.js.gz +0 -0
  20. package/dist/client/assets/footprints-Bc2dzReV.js +1 -0
  21. package/dist/client/assets/index-BrM0s_jp.css +2 -0
  22. package/dist/client/assets/index-BrM0s_jp.css.br +0 -0
  23. package/dist/client/assets/index-BrM0s_jp.css.gz +0 -0
  24. package/dist/client/assets/index-C3xqQUPf.js +19 -0
  25. package/dist/client/assets/index-C3xqQUPf.js.br +0 -0
  26. package/dist/client/assets/index-C3xqQUPf.js.gz +0 -0
  27. package/dist/client/assets/refresh-cw-DocKnJID.js +1 -0
  28. package/dist/client/index.html +3 -5
  29. package/dist/client/index.html.br +0 -0
  30. package/dist/client/index.html.gz +0 -0
  31. package/dist/sample/package.json +1 -1
  32. package/dist/sample/src/App.tsx +3 -2
  33. package/dist/sample/src/lib/route.ts +3 -2
  34. package/dist/sample/src/pages/Account.tsx +88 -0
  35. package/dist/sample/src/styles.css +5 -0
  36. package/package.json +1 -2
  37. package/dist/client/assets/Calibration-xY4YDLzU.js +0 -1
  38. package/dist/client/assets/Calibration-xY4YDLzU.js.br +0 -0
  39. package/dist/client/assets/Calibration-xY4YDLzU.js.gz +0 -0
  40. package/dist/client/assets/CommandPalette-BA3akF-p.js +0 -1
  41. package/dist/client/assets/CommandPalette-BA3akF-p.js.br +0 -0
  42. package/dist/client/assets/CommandPalette-BA3akF-p.js.gz +0 -0
  43. package/dist/client/assets/HelpDialog-C6qmdEwi.js +0 -1
  44. package/dist/client/assets/HelpDialog-C6qmdEwi.js.br +0 -0
  45. package/dist/client/assets/HelpDialog-C6qmdEwi.js.gz +0 -0
  46. package/dist/client/assets/ReportView-Bj9xxLCi.js +0 -4
  47. package/dist/client/assets/ReportView-Bj9xxLCi.js.br +0 -0
  48. package/dist/client/assets/ReportView-Bj9xxLCi.js.gz +0 -0
  49. package/dist/client/assets/SettingsDialog-VrACcdUX.js +0 -1
  50. package/dist/client/assets/SettingsDialog-VrACcdUX.js.br +0 -0
  51. package/dist/client/assets/SettingsDialog-VrACcdUX.js.gz +0 -0
  52. package/dist/client/assets/button-B2NFEpCs.js +0 -18
  53. package/dist/client/assets/button-B2NFEpCs.js.br +0 -0
  54. package/dist/client/assets/button-B2NFEpCs.js.gz +0 -0
  55. package/dist/client/assets/camera-BD9K1f5I.js +0 -1
  56. package/dist/client/assets/confirm-D1U-bFIL.js +0 -41
  57. package/dist/client/assets/confirm-D1U-bFIL.js.br +0 -0
  58. package/dist/client/assets/confirm-D1U-bFIL.js.gz +0 -0
  59. package/dist/client/assets/footprints-DiYtIryA.js +0 -1
  60. package/dist/client/assets/index-BakNwOFF.css +0 -2
  61. package/dist/client/assets/index-BakNwOFF.css.br +0 -0
  62. package/dist/client/assets/index-BakNwOFF.css.gz +0 -0
  63. package/dist/client/assets/index-DUAtV_Av.js +0 -18
  64. package/dist/client/assets/index-DUAtV_Av.js.br +0 -0
  65. package/dist/client/assets/index-DUAtV_Av.js.gz +0 -0
  66. package/dist/client/assets/preload-helper-BLdHbfdN.js +0 -1
  67. package/dist/client/assets/preload-helper-BLdHbfdN.js.br +0 -0
  68. package/dist/client/assets/preload-helper-BLdHbfdN.js.gz +0 -0
  69. package/dist/client/assets/refresh-cw-Dobx2YmO.js +0 -1
  70. package/dist/client/assets/tracker.worker-DWwj76VA.js +0 -41
  71. package/dist/client/assets/tracker.worker-DWwj76VA.js.br +0 -0
  72. package/dist/client/assets/tracker.worker-DWwj76VA.js.gz +0 -0
  73. package/dist/client/assets/vision_bundle-ByYCzljp.js +0 -41
  74. package/dist/client/assets/vision_bundle-ByYCzljp.js.br +0 -0
  75. package/dist/client/assets/vision_bundle-ByYCzljp.js.gz +0 -0
@@ -1,41 +0,0 @@
1
- import{t as e}from"./preload-helper-BLdHbfdN.js";var t=typeof self<`u`?self:{};function n(e,n){t:{for(var r=[`CLOSURE_FLAGS`],i=t,a=0;a<r.length;a++)if((i=i[r[a]])==null){r=null;break t}r=i}return(e=r&&r[e])??n}function r(e,n){e=e.split(`.`);for(var r,i=t;e.length&&(r=e.shift());)e.length||n===void 0?i=i[r]&&i[r]!==Object.prototype[r]?i[r]:i[r]={}:i[r]=n}function i(){throw Error(`Invalid UTF8`)}function a(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}var o,s,c=void 0,l=typeof TextDecoder<`u`,u=typeof TextEncoder<`u`;function d(e){if(u)e=(s||=new TextEncoder).encode(e);else{let n=0,r=new Uint8Array(3*e.length);for(let i=0;i<e.length;i++){var t=e.charCodeAt(i);if(t<128)r[n++]=t;else{if(t<2048)r[n++]=t>>6|192;else{if(t>=55296&&t<=57343){if(t<=56319&&i<e.length){let a=e.charCodeAt(++i);if(a>=56320&&a<=57343){t=1024*(t-55296)+a-56320+65536,r[n++]=t>>18|240,r[n++]=t>>12&63|128,r[n++]=t>>6&63|128,r[n++]=63&t|128;continue}i--}t=65533}r[n++]=t>>12|224,r[n++]=t>>6&63|128}r[n++]=63&t|128}}e=n===r.length?r:r.subarray(0,n)}return e}function ee(e){t.setTimeout(()=>{throw e},0)}var te=n(610401301,!1),ne=n(748402147,!0);function re(){var e=t.navigator;return(e&&=e.userAgent)?e:``}var ie,ae=t.navigator;function oe(e){return oe[` `](e),e}ie=ae&&ae.userAgentData||null,oe[` `]=function(){};var se={},ce=null;function le(e){var t=e.length,n=3*t/4;n%3?n=Math.floor(n):`=.`.indexOf(e[t-1])!=-1&&(n=`=.`.indexOf(e[t-2])==-1?n-1:n-2);var r=new Uint8Array(n),i=0;return function(e,t){function n(t){for(;r<e.length;){let t=e.charAt(r++),n=ce[t];if(n!=null)return n;if(!/^[\s\xa0]*$/.test(t))throw Error(`Unknown base64 encoding at char: `+t)}return t}ue();for(var r=0;;){let e=n(-1),r=n(0),i=n(64),a=n(64);if(a===64&&e===-1)break;t(e<<2|r>>4),i!=64&&(t(r<<4&240|i>>2),a!=64&&t(i<<6&192|a))}}(e,function(e){r[i++]=e}),i===n?r:r.subarray(0,i)}function ue(){if(!ce){ce={};var e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.split(``),t=[`+/=`,`+/`,`-_=`,`-_.`,`-_`];for(let n=0;n<5;n++){let r=e.concat(t[n].split(``));se[n]=r;for(let e=0;e<r.length;e++){let t=r[e];ce[t]===void 0&&(ce[t]=e)}}}}var de=typeof Uint8Array<`u`,fe=(!!(te&&ie&&ie.brands.length>0)||re().indexOf(`Trident`)==-1&&re().indexOf(`MSIE`)==-1)&&typeof btoa==`function`,pe=/[-_.]/g,me={"-":`+`,_:`/`,".":`=`};function he(e){return me[e]||``}function ge(e){if(!fe)return le(e);e=pe.test(e)?e.replace(pe,he):e,e=atob(e);var t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function _e(e){return de&&e!=null&&e instanceof Uint8Array}var ve={};function ye(){return xe||=new Se(null,ve)}function be(e){Ce(ve);var t=e.h;return(t=t==null||_e(t)?t:typeof t==`string`?ge(t):null)==null?t:e.h=t}var xe,Se=class{i(){return new Uint8Array(be(this)||0)}constructor(e,t){if(Ce(t),this.h=e,e!=null&&e.length===0)throw Error(`ByteString should be constructed with non-empty values`)}};function Ce(e){if(e!==ve)throw Error(`illegal external caller`)}function we(e,t){e.__closure__error__context__984382||={},e.__closure__error__context__984382.severity=t}var Te=void 0;function Ee(e){return we(e=Error(e),`warning`),e}function De(e,t){if(e!=null){var n=Te??={},r=n[e]||0;r>=t||(n[e]=r+1,we(e=Error(),`incident`),ee(e))}}function Oe(){return typeof BigInt==`function`}var ke=typeof Symbol==`function`&&typeof Symbol()==`symbol`;function Ae(e,t,n=!1){return typeof Symbol==`function`&&typeof Symbol()==`symbol`?n&&Symbol.for&&e?Symbol.for(e):e==null?Symbol():Symbol(e):t}var je,Me=Ae(`jas`,void 0,!0),Ne=Ae(void 0,`0di`),Pe=Ae(void 0,`1oa`),Fe=Ae(void 0,Symbol()),Ie=Ae(void 0,`0ub`),Le=Ae(void 0,`0ubs`),Re=Ae(void 0,`0ubsb`),ze=Ae(void 0,`0actk`),Be=Ae(`m_m`,`lb`,!0),Ve=Ae(),He={Wa:{value:0,configurable:!0,writable:!0,enumerable:!1}},Ue=Object.defineProperties,f=ke?Me:`Wa`,We=[];function Ge(e,t){ke||f in e||Ue(e,He),e[f]|=t}function p(e,t){ke||f in e||Ue(e,He),e[f]=t}function Ke(e){return Ge(e,34),e}function qe(e){return Ge(e,8192),e}p(We,7),je=Object.freeze(We);var Je={};function Ye(e,t){return t===void 0?e.i!==Xe&&!!(2&e.B[f]):!!(2&t)&&e.i!==Xe}var Xe={};function Ze(e,t){if(e!=null){if(typeof e==`string`)e=e?new Se(e,ve):ye();else if(e.constructor!==Se){if(_e(e))e=e.length?new Se(new Uint8Array(e),ve):ye();else{if(!t)throw Error();e=void 0}}}return e}var Qe=class{constructor(e,t,n){this.h=e,this.i=t,this.l=n}next(){var e=this.h.next();return e.done||(e.value=this.i.call(this.l,e.value)),e}[Symbol.iterator](){return this}},$e=Object.freeze({});function et(e,t,n){var r,i=128&t?0:-1,a=e.length;(r=!!a)&&(r=(r=e[a-1])!=null&&typeof r==`object`&&r.constructor===Object);var o=a+(r?-1:0);for(t=128&t?1:0;t<o;t++)n(t-i,e[t]);if(r){e=e[a-1];for(let t in e)!isNaN(t)&&n(+t,e[t])}}var tt={};function nt(e){return 128&e?tt:void 0}function rt(e){return e.jb=!0,e}var it=rt(e=>typeof e==`number`),at=rt(e=>typeof e==`string`),ot=rt(e=>typeof e==`boolean`),st=typeof t.BigInt==`function`&&typeof t.BigInt(0)==`bigint`;function m(e){var t=e;if(at(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(it(t)&&!Number.isSafeInteger(t))throw Error(String(t));return st?BigInt(e):e=ot(e)?e?`1`:`0`:at(e)?e.trim()||`0`:String(e)}var ct=rt(e=>st?e>=ut&&e<=ft:e[0]===`-`?pt(e,lt):pt(e,dt)),lt=(-(2**53-1)).toString(),ut=st?BigInt(-(2**53-1)):void 0,dt=(2**53-1).toString(),ft=st?BigInt(2**53-1):void 0;function pt(e,t){if(e.length>t.length)return!1;if(e.length<t.length||e===t)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r>i)return!1;if(r<i)return!0}}var mt,ht=typeof Uint8Array.prototype.slice==`function`,h=0,g=0;function gt(e){var t=e>>>0;h=t,g=(e-t)/4294967296>>>0}function _t(e){if(e<0){gt(-e);let[t,n]=Et(h,g);h=t>>>0,g=n>>>0}else gt(e)}function vt(e){var t=mt||=new DataView(new ArrayBuffer(8));t.setFloat32(0,+e,!0),g=0,h=t.getUint32(0,!0)}function yt(e,t){var n=4294967296*t+(e>>>0);return Number.isSafeInteger(n)?n:St(e,t)}function bt(e,t){return m(Oe()?BigInt.asUintN(64,(BigInt(t>>>0)<<BigInt(32))+BigInt(e>>>0)):St(e,t))}function xt(e,t){return Oe()?m(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(t))<<BigInt(32))+BigInt.asUintN(32,BigInt(e)))):m(wt(e,t))}function St(e,t){if(e>>>=0,(t>>>=0)<=2097151)var n=``+(4294967296*t+e);else Oe()?n=``+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(n=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,e>=1e7&&(n+=e/1e7>>>0,e%=1e7),n>=1e7&&(t+=n/1e7>>>0,n%=1e7),n=t+Ct(n)+Ct(e));return n}function Ct(e){return e=String(e),`0000000`.slice(e.length)+e}function wt(e,t){if(2147483648&t){if(Oe())e=``+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{let[n,r]=Et(e,t);e=`-`+St(n,r)}}else e=St(e,t);return e}function Tt(e){if(e.length<16)_t(Number(e));else if(Oe())e=BigInt(e),h=Number(e&BigInt(4294967295))>>>0,g=Number(e>>BigInt(32)&BigInt(4294967295));else{let t=+(e[0]===`-`);g=h=0;let n=e.length;for(let r=t,i=(n-t)%6+t;i<=n;r=i,i+=6){let t=Number(e.slice(r,i));g*=1e6,(h=1e6*h+t)>=4294967296&&(g+=Math.trunc(h/4294967296),g>>>=0,h>>>=0)}if(t){let[e,t]=Et(h,g);h=e,g=t}}}function Et(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function Dt(e){return Array.prototype.slice.call(e)}var Ot=typeof BigInt==`function`?BigInt.asIntN:void 0,kt=typeof BigInt==`function`?BigInt.asUintN:void 0,At=Number.isSafeInteger,jt=Number.isFinite,Mt=Math.trunc,Nt=m(0);function Pt(e){if(typeof e!=`number`)throw Error(`Value of float/double field must be a number, found ${typeof e}: ${e}`);return e}function Ft(e){return e==null||typeof e==`number`?e:e===`NaN`||e===`Infinity`||e===`-Infinity`?Number(e):void 0}function It(e){if(typeof e!=`boolean`){var t=typeof e;throw Error(`Expected boolean but got ${t==`object`?e?Array.isArray(e)?`array`:t:`null`:t}: ${e}`)}return e}var Lt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Rt(e){switch(typeof e){case`bigint`:return!0;case`number`:return jt(e);case`string`:return Lt.test(e);default:return!1}}function zt(e){if(e!=null){if(!jt(e))throw Ee(`enum`);e|=0}return e}function Bt(e){if(e==null)return e;if(typeof e==`string`&&e)e=+e;else if(typeof e!=`number`)return;return jt(e)?0|e:void 0}function Vt(e){if(e==null)return e;if(typeof e==`string`&&e)e=+e;else if(typeof e!=`number`)return;return jt(e)?e>>>0:void 0}function Ht(e,t){if(t??=1024,!Rt(e))throw Ee(`int64`);var n=typeof e;switch(t){case 512:switch(n){case`string`:return Jt(e);case`bigint`:return String(Ot(64,e));default:return qt(e)}case 1024:switch(n){case`string`:return Yt(e);case`bigint`:return m(Ot(64,e));default:return Xt(e)}case 0:switch(n){case`string`:return Jt(e);case`bigint`:return m(Ot(64,e));default:return Gt(e)}default:return function(e,t=`unexpected value ${e}!`){throw Error(t)}(t,`Unknown format requested type for int64`)}}function Ut(e){var t=e.length;return(e[0]===`-`?t<20||t===20&&e<=`-9223372036854775808`:t<19||t===19&&e<=`9223372036854775807`)?e:(Tt(e),wt(h,g))}function Wt(e){if(e[0]===`-`)var t=!1;else t=(t=e.length)<20||t===20&&e<=`18446744073709551615`;return t?e:(Tt(e),St(h,g))}function Gt(e){if(e=Mt(e),!At(e)){_t(e);var t=h,n=g;(e=2147483648&n)&&(n=~n>>>0,(t=1+~t>>>0)==0&&(n=n+1>>>0)),e=typeof(t=yt(t,n))==`number`?e?-t:t:e?`-`+t:t}return e}function Kt(e){return(e=Mt(e))>=0&&At(e)||(_t(e),e=yt(h,g)),e}function qt(e){return e=Mt(e),At(e)?e=String(e):(_t(e),e=wt(h,g)),e}function Jt(e){var t=Mt(Number(e));return At(t)?String(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),Ut(e))}function Yt(e){var t=Mt(Number(e));return At(t)?m(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),Oe()?m(Ot(64,BigInt(e))):m(Ut(e)))}function Xt(e){return At(e)?m(Gt(e)):m(qt(e))}function Zt(e){var t=typeof e;return e==null?e:t===`bigint`?m(Ot(64,e)):Rt(e)?t===`string`?Yt(e):Xt(e):void 0}function Qt(e){if(e==null)return e;var t=typeof e;if(t===`bigint`)return String(Ot(64,e));if(Rt(e)){if(t===`string`)return Jt(e);if(t===`number`)return Gt(e)}}function $t(e){if(e==null||typeof e==`string`||e instanceof Se)return e}function en(e){if(typeof e!=`string`)throw Error();return e}function tn(e){if(e!=null&&typeof e!=`string`)throw Error();return e}function _(e){return e==null||typeof e==`string`?e:void 0}function nn(e,t,n,r){return e!=null&&e[Be]===Je?e:Array.isArray(e)?((r=(n=0|e[f])|32&r|2&r)!==n&&p(e,r),new t(e)):(n?2&r?((e=t[Ne])||(Ke((e=new t).B),e=t[Ne]=e),t=e):t=new t:t=void 0,t)}function rn(e,t,n){return(e=t?Ht(e,1024):Zt(e))??(n?Nt:void 0)}function an(e){return e}var on={},sn=function(){try{return oe(new class extends Map{constructor(){super()}}),!1}catch{return!0}}(),cn=class{constructor(){this.h=new Map}get(e){return this.h.get(e)}set(e,t){return this.h.set(e,t),this.size=this.h.size,this}delete(e){return e=this.h.delete(e),this.size=this.h.size,e}clear(){this.h.clear(),this.size=this.h.size}has(e){return this.h.has(e)}entries(){return this.h.entries()}keys(){return this.h.keys()}values(){return this.h.values()}forEach(e,t){return this.h.forEach(e,t)}[Symbol.iterator](){return this.entries()}},ln=sn?(Object.setPrototypeOf(cn.prototype,Map.prototype),Object.defineProperties(cn.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),cn):class extends Map{constructor(){super()}};function un(e){return e}function dn(e){if(2&e.N)throw Error(`Cannot mutate an immutable Map`)}var fn,pn=class extends ln{constructor(e,t,n=un,r=un){super(),this.N=0|e[f],this.O=t,this.ca=n,this.oa=this.O?mn:r;for(let i=0;i<e.length;i++){let a=e[i],o=n(a[0],!1,!0),s=a[1];t?s===void 0&&(s=null):s=r(a[1],!1,!0,void 0,void 0,this.N),super.set(o,s)}}fa(e){return qe(Array.from(super.entries(),e))}clear(){dn(this),super.clear()}delete(e){return dn(this),super.delete(this.ca(e,!0,!1))}entries(){if(this.O){var e=super.keys();e=new Qe(e,hn,this)}else e=super.entries();return e}values(){if(this.O){var e=super.keys();e=new Qe(e,pn.prototype.get,this)}else e=super.values();return e}forEach(e,t){this.O?super.forEach((n,r,i)=>{e.call(t,i.get(r),r,i)}):super.forEach(e,t)}set(e,t){return dn(this),(e=this.ca(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.oa(t,!0,!0,this.O,!1,this.N))}hb(e){var t=this.ca(e[0],!1,!0);e=e[1],e=this.O?e===void 0?null:e:this.oa(e,!1,!0,void 0,!1,this.N),super.set(t,e)}has(e){return super.has(this.ca(e,!1,!1))}get(e){e=this.ca(e,!1,!1);var t=super.get(e);if(t!==void 0){var n=this.O;return n?((n=this.oa(t,!1,!0,n,this.Ga,this.N))!==t&&super.set(e,n),n):t}}[Symbol.iterator](){return this.entries()}};function mn(e,t,n,r,i,a){return e=nn(e,r,n,a),i&&(e=Fn(e)),e}function hn(e){return[e,this.get(e)]}function gn(){return fn||=new pn(Ke([]),void 0,void 0,void 0,on)}function _n(e){return Fe?e[Fe]:void 0}function vn(e,t){for(let n in e)!isNaN(n)&&t(e,+n,e[n])}pn.prototype.toJSON=void 0;var yn,bn,xn=class{},Sn={eb:!0};function Cn(e,t){t<100||De(Le,1)}function wn(e,t,n,r){var i=r!==void 0;r=!!r;var a,o=Fe;!i&&ke&&o&&(a=e[o])&&vn(a,Cn),o=[];var s=e.length;a=4294967295;var c=!1,l=!!(64&t),u=l?128&t?0:-1:void 0;if(!(1&t)){var d=s&&e[s-1];typeof d==`object`&&d&&d.constructor===Object?a=--s:d=void 0,!l||128&t||i||(c=!0,a=an(a-u,u,e,d,void 0)+u)}t=void 0;for(var ee=0;ee<s;ee++){let i=e[ee];if(i!=null&&(i=n(i,r))!=null){if(l&&ee>=a){let e=ee-u;(t??={})[e]=i}else o[ee]=i}}if(d)for(let e in d){if((s=d[e])==null||(s=n(s,r))==null)continue;let i;ee=+e,l&&!Number.isNaN(ee)&&(i=ee+u)<a?o[i]=s:(t??={})[e]=s}return t&&(c?o.push(t):o[a]=t),i&&Fe&&(e=_n(e))&&e instanceof xn&&(o[Fe]=function(e){var t=new xn;return vn(e,(e,n,r)=>{t[n]=Dt(r)}),t.la=e.la,t}(e)),o}function Tn(e){return e[0]=En(e[0]),e[1]=En(e[1]),e}function En(e){switch(typeof e){case`number`:return Number.isFinite(e)?e:``+e;case`bigint`:return ct(e)?Number(e):``+e;case`boolean`:return+!!e;case`object`:if(Array.isArray(e)){var t=0|e[f];return e.length===0&&1&t?void 0:wn(e,t,En)}if(e!=null&&e[Be]===Je)return Dn(e);if(e instanceof Se){if((t=e.h)==null)e=``;else if(typeof t==`string`)e=t;else{if(fe){for(var n=``,r=0,i=t.length-10240;r<i;)n+=String.fromCharCode.apply(null,t.subarray(r,r+=10240));n+=String.fromCharCode.apply(null,r?t.subarray(r):t),t=btoa(n)}else{n===void 0&&(n=0),ue(),n=se[n],r=Array(Math.floor(t.length/3)),i=n[64]||``;let e=0,l=0;for(;e<t.length-2;e+=3){var a=t[e],o=t[e+1],s=t[e+2],c=n[a>>2];a=n[(3&a)<<4|o>>4],o=n[(15&o)<<2|s>>6],s=n[63&s],r[l++]=c+a+o+s}switch(c=0,s=i,t.length-e){case 2:s=n[(15&(c=t[e+1]))<<2]||i;case 1:t=t[e],r[l]=n[t>>2]+n[(3&t)<<4|c>>4]+s+i}t=r.join(``)}e=e.h=t}return e}return e instanceof pn?e=e.size===0?void 0:e.fa(Tn):void 0}return e}function Dn(e){return wn(e=e.B,0|e[f],En)}function On(e,t){return kn(e,t[0],t[1])}function kn(e,t,n,r=0){if(e==null){var i=32;n?(e=[n],i|=128):e=[],t&&(i=-16760833&i|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error(`narr`);if(i=0|e[f],ne&&1&i)throw Error(`rfarr`);if(2048&i&&!(2&i)&&function(){if(ne)throw Error(`carr`);De(ze,5)}(),256&i)throw Error(`farr`);if(64&i)return(i|r)!==i&&p(e,i|r),e;if(n&&(i|=128,n!==e[0]))throw Error(`mid`);t:{i|=64;var a=(n=e).length;if(a){var o=a-1;let e=n[o];if(typeof e==`object`&&e&&e.constructor===Object){if((o-=t=128&i?0:-1)>=1024)throw Error(`pvtlmt`);for(var s in e)(a=+s)<o&&(n[a+t]=e[s],delete e[s]);i=-16760833&i|(1023&o)<<14;break t}}if(t){if((s=Math.max(t,a-(128&i?0:-1)))>1024)throw Error(`spvt`);i=-16760833&i|(1023&s)<<14}}}return p(e,64|i|r),e}function An(e,t){if(typeof e!=`object`)return e;if(Array.isArray(e)){var n=0|e[f];return e.length===0&&1&n?void 0:jn(e,n,t)}if(e!=null&&e[Be]===Je)return Nn(e);if(e instanceof pn){if(2&(t=e.N))return e;if(!e.size)return;if(n=Ke(e.fa()),e.O)for(e=0;e<n.length;e++){let r=n[e],i=r[1];i=typeof i!=`object`||!i?void 0:i!=null&&i[Be]===Je?Nn(i):Array.isArray(i)?jn(i,0|i[f],!!(32&t)):void 0,r[1]=i}return n}return e instanceof Se?e:void 0}function jn(e,t,n){return 2&t||(!n||4096&t||16&t?e=Pn(e,t,!1,n&&!(16&t)):(Ge(e,34),4&t&&Object.freeze(e))),e}function Mn(e,t,n){return e=new e.constructor(t),n&&(e.i=Xe),e.o=Xe,e}function Nn(e){var t=e.B,n=0|t[f];return Ye(e,n)?e:zn(e,t,n)?Mn(e,t):Pn(t,n)}function Pn(e,t,n,r){return r??=!!(34&t),e=wn(e,t,An,r),r=32,n&&(r|=2),p(e,t=16769217&t|r),e}function Fn(e){var t=e.B,n=0|t[f];return Ye(e,n)?zn(e,t,n)?Mn(e,t,!0):new e.constructor(Pn(t,n,!1)):e}function In(e){if(e.i!==Xe)return!1;var t=e.B;return Ge(t=Pn(t,0|t[f]),2048),e.B=t,e.i=void 0,e.o=void 0,!0}function Ln(e){if(!In(e)&&Ye(e,0|e.B[f]))throw Error()}function Rn(e,t){t===void 0&&(t=0|e[f]),32&t&&!(4096&t)&&p(e,4096|t)}function zn(e,t,n){return!!(2&n)||!(!(32&n)||4096&n)&&(p(t,2|n),e.i=Xe,!0)}var Bn=m(0),Vn={};function v(e,t,n,r){if((t=Hn(e.B,t,void 0,r))!==null||n&&e.o!==Xe)return t}function Hn(e,t,n,r){if(t===-1)return null;var i=t+(n?0:-1),a=e.length-1;if(!(a<1+(n?0:-1))){if(i>=a){var o=e[a];if(typeof o==`object`&&o&&o.constructor===Object){n=o[t];var s=!0}else{if(i!==a)return;n=o}}else n=e[i];if(r&&n!=null){if((r=r(n))==null)return r;if(!Object.is(r,n))return s?o[t]=r:e[i]=r,r}return n}}function y(e,t,n,r){Ln(e);var i=e.B;return b(i,0|i[f],t,n,r),e}function b(e,t,n,r,i){var a=n+(i?0:-1),o=e.length-1;if(o>=1+(i?0:-1)&&a>=o){let i=e[o];if(typeof i==`object`&&i&&i.constructor===Object)return i[n]=r,t}return a<=o?(e[a]=r,t):(r!==void 0&&(n>=(o=(t??=0|e[f])>>14&1023||536870912)?r!=null&&(e[o+(i?0:-1)]={[n]:r}):e[a]=r),t)}function Un(e,t,n,r){var i=e.B;return ar(i,0|i[f],t,e=er(e,r)===n?n:-1)!==void 0}function Wn(){return $e===void 0?2:4}function Gn(e,t,n,r,i){var a=e.B,o=0|a[f];r=Ye(e,o)?1:r,i=!!i||r===3,r===2&&In(e)&&(o=0|(a=e.B)[f]);var s=(e=qn(a,t))===je?7:0|e[f],c=Jn(s,o),l=!(4&c);if(l){4&c&&(e=Dt(e),s=0,c=dr(c,o),o=b(a,o,t,e));let r=0,i=0;for(;r<e.length;r++){let t=n(e[r]);t!=null&&(e[i++]=t)}i<r&&(e.length=i),n=-513&c|4,c=n&=-1025,c&=-4097}return c!==s&&(p(e,c),2&c&&Object.freeze(e)),Kn(e,c,a,o,t,r,l,i)}function Kn(e,t,n,r,i,a,o,s){var c=t;return a===1||a===4&&(2&t||!(16&t)&&32&r)?Yn(t)||((t|=!e.length||o&&!(4096&t)||32&r&&!(4096&t||16&t)?2:256)!==c&&p(e,t),Object.freeze(e)):(a===2&&Yn(t)&&(e=Dt(e),c=0,t=dr(t,r),r=b(n,r,i,e)),Yn(t)||(s||(t|=16),t!==c&&p(e,t))),2&t||!(4096&t||16&t)||Rn(n,r),e}function qn(e,t,n){return e=Hn(e,t,n),Array.isArray(e)?e:je}function Jn(e,t){return 2&t&&(e|=2),1|e}function Yn(e){return!!(2&e)&&!!(4&e)||!!(256&e)}function Xn(e){return Ze(e,!0)}function Zn(e){e=Dt(e);for(let t=0;t<e.length;t++){let n=e[t]=Dt(e[t]);Array.isArray(n[1])&&(n[1]=Ke(n[1]))}return qe(e)}function Qn(e,t,n,r){Ln(e),b(e=e.B,0|e[f],t,(r===`0`?Number(n)===0:n===r)?void 0:n)}function $n(e,t,n){if(2&t)throw Error();var r=nt(t),i=qn(e,n,r),a=i===je?7:0|i[f],o=Jn(a,t);return(2&o||Yn(o)||16&o)&&(o===a||Yn(o)||p(i,o),i=Dt(i),a=0,o=dr(o,t),b(e,t,n,i,r)),(o&=-13)!==a&&p(i,o),i}function er(e,t){return rr(tr(e=e.B),e,void 0,t)}function tr(e){if(ke)return e[Pe]??(e[Pe]=new Map);if(Pe in e)return e[Pe];var t=new Map;return Object.defineProperty(e,Pe,{value:t}),t}function nr(e,t,n,r,i){var a=tr(e),o=rr(a,e,t,n,i);return o!==r&&(o&&(t=b(e,t,o,void 0,i)),a.set(n,r)),t}function rr(e,t,n,r,i){var a=e.get(r);if(a!=null)return a;a=0;for(let e=0;e<r.length;e++){let o=r[e];Hn(t,o,i)!=null&&(a!==0&&(n=b(t,n,a,void 0,i)),a=o)}return e.set(r,a),a}function ir(e,t,n){var r=0|e[f],i=nt(r),a=Hn(e,n,i);if(a!=null&&a[Be]===Je){if(!Ye(a))return In(a),a.B;var o=a.B}else Array.isArray(a)&&(o=a);if(o){let e=0|o[f];2&e&&(o=Pn(o,e))}return(o=On(o,t))!==a&&b(e,r,n,o,i),o}function ar(e,t,n,r,i){var a=!1;if((r=Hn(e,r,i,e=>{var r=nn(e,n,!1,t);return a=r!==e&&r!=null,r}))!=null)return a&&!Ye(r)&&Rn(e,t),r}function x(e,t,n,r){var i=e.B,a=0|i[f];if((t=ar(i,a,t,n,r))==null)return t;if(!Ye(e,a=0|i[f])){let o=Fn(t);o!==t&&(In(e)&&(a=0|(i=e.B)[f]),Rn(i,a=b(i,a,n,t=o,r)))}return t}function or(e,t,n,r,i,a,o,s){var c=Ye(e,n);a=c?1:a,o=!!o||a===3,c=s&&!c,(a===2||c)&&In(e)&&(n=0|(t=e.B)[f]);var l=(e=qn(t,i))===je?7:0|e[f],u=Jn(l,n);if(s=!(4&u)){var d=e,ee=n;let t=!!(2&u);t&&(ee|=2);let i=!t,a=!0,o=0,s=0;for(;o<d.length;o++){let e=nn(d[o],r,!1,ee);if(e instanceof r){if(!t){let t=Ye(e);i&&=!t,a&&=t}d[s++]=e}}s<o&&(d.length=s),u|=4,u=a?-4097&u:4096|u,u=i?8|u:-9&u}if(u!==l&&(p(e,u),2&u&&Object.freeze(e)),c&&!(8&u||!e.length&&(a===1||a===4&&(2&u||!(16&u)&&32&n)))){for(Yn(u)&&(e=Dt(e),u=dr(u,n),n=b(t,n,i,e)),r=e,c=u,l=0;l<r.length;l++)(d=r[l])!==(u=Fn(d))&&(r[l]=u);c|=8,p(e,u=c=r.length?4096|c:-4097&c)}return Kn(e,u,t,n,i,a,s,o)}function sr(e,t,n){var r=e.B;return or(e,r,0|r[f],t,n,Wn(),!1,!0)}function cr(e){return e??=void 0,e}function S(e,t,n,r,i){return y(e,n,r=cr(r),i),r&&!Ye(r)&&Rn(e.B),e}function lr(e,t,n,r){t:{var i=r=cr(r);Ln(e);let a=e.B,o=0|a[f];if(i==null){let e=tr(a);if(rr(e,a,o,n)!==t)break t;e.set(n,0)}else o=nr(a,o,n,t);b(a,o,t,i)}return r&&!Ye(r)&&Rn(e.B),e}function ur(e,t,n){Ln(e);var r=e.B,i=0|r[f];if(n==null)return b(r,i,t),e;var a=n===je?7:0|n[f],o=a,s=Yn(a),c=s||Object.isFrozen(n),l=!0,u=!0;for(let e=0;e<n.length;e++){var d=n[e];s||(d=Ye(d),l&&=!d,u&&=d)}return s||(a=l?13:5,a=u?-4097&a:4096|a),c&&a===o||(n=Dt(n),o=0,a=dr(a,i)),a!==o&&p(n,a),i=b(r,i,t,n),2&a||!(4096&a||16&a)||Rn(r,i),e}function dr(e,t){return-273&(2&t?2|e:-3&e)}function fr(e,t,n,r){var i=r;Ln(e),e=or(e,r=e.B,0|r[f],n,t,2,!0),i??=new n,e.push(i),t=n=e===je?7:0|e[f],(i=Ye(i))?(n&=-9,e.length===1&&(n&=-4097)):n|=4096,n!==t&&p(e,n),i||Rn(r)}function pr(e,t,n){return Bt(v(e,t,n))}function C(e,t){return v(e,t,void 0,Ft)??0}function mr(e,t,n,r){return x(e,t,n=er(e,r)===n?n:-1,void 0)}function hr(e,t){Qn(e,3,t==null?t:It(t),!1)}function gr(e,t,n){if(n!=null){if(typeof n!=`number`||!jt(n))throw Ee(`int32`);n|=0}y(e,t,n)}function _r(e,t,n){return y(e,t,n==null?n:Ht(n))}function vr(e,t,n){return y(e,t,n==null?n:function(e){if(!Rt(e))throw Ee(`uint64`);switch(typeof e){case`string`:var t=Mt(Number(e));return At(t)&&t>=0?e=m(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),e=Oe()?m(kt(64,BigInt(e))):m(Wt(e))),e;case`bigint`:return m(kt(64,e));default:return At(e)?e=m(Kt(e)):((e=Mt(e))>=0&&At(e)?e=String(e):(_t(e),e=St(h,g)),e=m(e)),e}}(n))}function w(e,t,n){y(e,t,n==null?n:Pt(n))}function yr(e,t,n){Qn(e,t,n==null?n:Pt(n),0)}function br(e,t,n){Qn(e,t,tn(n),``)}function xr(e,t,n){{Ln(e);let o=e.B,s=0|o[f];if(n==null)b(o,s,t);else{var r=e=n===je?7:0|n[f],i=Yn(e),a=i||Object.isFrozen(n);for(i||(e=0),a||=(n=Dt(n),r=0,e=dr(e,s),!1),e|=5,e|=(4&e?512&e?512:1024&e?1024:0:void 0)??1024,i=0;i<n.length;i++){let t=n[i],o=en(t);Object.is(t,o)||(a&&=(n=Dt(n),r=0,e=dr(e,s),!1),n[i]=o)}e!==r&&(a&&(n=Dt(n),e=dr(e,s)),p(n,e)),b(o,s,t,n)}}}function Sr(e,t,n){Ln(e),Gn(e,t,_,2,!0).push(en(n))}var Cr=class{constructor(e,t,n){if(this.buffer=e,n&&!t)throw Error();this.h=t}};function wr(e,t){if(typeof e==`string`)return new Cr(ge(e),t);if(Array.isArray(e))return new Cr(new Uint8Array(e),t);if(e.constructor===Uint8Array)return new Cr(e,!1);if(e.constructor===ArrayBuffer)return e=new Uint8Array(e),new Cr(e,!1);if(e.constructor===Se)return t=be(e)||new Uint8Array,new Cr(t,!0,e);if(e instanceof Uint8Array)return e=e.constructor===Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Cr(e,!1);throw Error()}function Tr(e,t){var n=0,r=0,i=0,a=e.i,o=e.h;do{var s=a[o++];n|=(127&s)<<i,i+=7}while(i<32&&128&s);if(i>32)for(r|=(127&s)>>4,i=3;i<32&&128&s;i+=7)r|=(127&(s=a[o++]))<<i;if(Nr(e,o),!(128&s))return t(n>>>0,r>>>0);throw Error()}function Er(e){for(var t=0,n=e.h,r=n+10,i=e.i;n<r;){let r=i[n++];if(t|=r,!(128&r))return Nr(e,n),!!(127&t)}throw Error()}function Dr(e){var t=e.i,n=e.h,r=t[n++],i=127&r;if(128&r&&(i|=(127&(r=t[n++]))<<7,128&r&&(i|=(127&(r=t[n++]))<<14,128&r&&(i|=(127&(r=t[n++]))<<21,128&r&&(i|=(r=t[n++])<<28,128&r&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++])))))throw Error();return Nr(e,n),i}function Or(e){return Dr(e)>>>0}function kr(e){return Tr(e,xt)}function Ar(e){var t=e.i,n=e.h,r=t[n],i=t[n+1],a=t[n+2];return t=t[n+3],Nr(e,e.h+4),(r|i<<8|a<<16|t<<24)>>>0}function jr(e){var t=Ar(e);e=2*(t>>31)+1;var n=t>>>23&255;return t&=8388607,n==255?t?NaN:1/0*e:n==0?1401298464324817e-60*e*t:e*2**(n-150)*(t+8388608)}function Mr(e){return Dr(e)}function Nr(e,t){if(e.h=t,t>e.l)throw Error()}function Pr(e,t){if(t<0)throw Error();var n=e.h;if((t=n+t)>e.l)throw Error();return e.h=t,n}function Fr(e,t){if(t==0)return ye();var n=Pr(e,t);return e.ga&&e.u?n=e.i.subarray(n,n+t):(e=e.i,n=n===(t=n+t)?new Uint8Array:ht?e.slice(n,t):new Uint8Array(e.subarray(n,t))),n.length==0?ye():new Se(n,ve)}var Ir=class{constructor(e,t,n,r){this.i=null,this.u=!1,this.h=this.l=this.o=0,this.init(e,t,n,r)}init(e,t,n,{ga:r=!1,na:i=!1}={}){this.ga=r,this.na=i,e&&(e=wr(e,this.na),this.i=e.buffer,this.u=e.h,this.o=t||0,this.l=n===void 0?this.i.length:this.o+n,this.h=this.o)}clear(){this.i=null,this.u=!1,this.h=this.l=this.o=0,this.ga=!1}},Lr=[],Rr=0;function zr(e,t,n,r){if(Yr.length){let i=Yr.pop();return i.A(r),i.h.init(e,t,n,r),i}return new Jr(e,t,n,r)}function Br(e){e.h.clear(),e.l=-1,e.i=-1,Yr.length<100&&Yr.push(e)}function Vr(e){var t=e.h;if(t.h==t.l)return!1;e.o=e.h.h;var n=Or(e.h);if(t=n>>>3,!((n&=7)>=0&&n<=5)||t<1)throw Error();return e.l=t,e.i=n,!0}function Hr(e){try{switch(e.i){case 0:e.i==0?Er(e.h):Hr(e);break;case 1:var t=e.h;Nr(t,t.h+8);break;case 2:if(e.i!=2)Hr(e);else{var n=Or(e.h),r=e.h;Nr(r,r.h+n)}break;case 5:var i=e.h;Nr(i,i.h+4);break;case 3:Ur();let a=e.l;try{for(;;){if(!Vr(e))throw Error();if(e.i==4){if(e.l!=a)throw Error();break}Hr(e)}}catch(e){throw e instanceof RangeError?SyntaxError():e}finally{Rr>0&&Rr--}break;default:throw Error()}}catch(e){throw e instanceof RangeError?SyntaxError():e}}function Ur(){if(Rr>=100)throw SyntaxError();Rr++}function Wr(e,t,n){var r=e.h.l,i=Or(e.h),a=(i=e.h.h+i)-r;if(a<=0&&(e.h.l=i,n(t,e,void 0,void 0,void 0),a=i-e.h.h),a)throw Error();return e.h.h=i,e.h.l=r,t}function Gr(e){var t=Or(e.h),n=Pr(e=e.h,t);if(e=e.i,l){var r,s=e;(r=o)||(r=o=new TextDecoder(`utf-8`,{fatal:!0})),t=n+t,s=n===0&&t===s.length?s:s.subarray(n,t);try{var u=r.decode(s)}catch(e){if(c===void 0){try{r.decode(new Uint8Array([128]))}catch{}try{r.decode(new Uint8Array([97])),c=!0}catch{c=!1}}throw!c&&(o=void 0),e}}else{t=(u=n)+t,n=[];let o,c=null;for(;u<t;){var d=e[u++];d<128?n.push(d):d<224?u>=t?i():(o=e[u++],d<194||(192&o)!=128?(u--,i()):n.push((31&d)<<6|63&o)):d<240?u>=t-1?i():(o=e[u++],(192&o)!=128||d===224&&o<160||d===237&&o>=160||(192&(r=e[u++]))!=128?(u--,i()):n.push((15&d)<<12|(63&o)<<6|63&r)):d<=244?u>=t-2?i():(o=e[u++],(192&o)!=128||o-144+(d<<28)>>30||(192&(r=e[u++]))!=128||(192&(s=e[u++]))!=128?(u--,i()):(d=(7&d)<<18|(63&o)<<12|(63&r)<<6|63&s,d-=65536,n.push(55296+(d>>10&1023),56320+(1023&d)))):i(),n.length>=8192&&(c=a(c,n),n.length=0)}u=a(c,n)}return u}function Kr(e){var t=Or(e.h);return Fr(e.h,t)}function qr(e,t,n){var r=Or(e.h);for(r=e.h.h+r;e.h.h<r;)n.push(t(e.h))}var Jr=class{constructor(e,t,n,r){if(Lr.length){let i=Lr.pop();i.init(e,t,n,r),e=i}else e=new Ir(e,t,n,r);this.h=e,this.o=this.h.h,this.i=this.l=-1,this.A(r)}A({sa:e=!1}={}){this.sa=e}},Yr=[];function Xr(e){return new $r(0|e,Math.floor(e/4294967296))}function Zr(e){return e?/^\d+$/.test(e)?(Tt(e),new $r(h,g)):null:Qr||=new $r(0,0)}var Qr,$r=class{constructor(e,t){this.i=e>>>0,this.h=t>>>0}};function ei(e){return new ui(0|e,Math.floor(e/4294967296))}function ti(e){return e?/^-?\d+$/.test(e)?(Tt(e),new ui(h,g)):null:ni||=new ui(0,0)}var ni,ri,ii,ai,oi,si,ci,li,ui=class{constructor(e,t){this.i=e>>>0,this.h=t>>>0}};function di(e,t,n){return typeof BigInt64Array<`u`?(ci||(ci=new BigInt64Array(1),li=new Uint32Array(ci.buffer),ci[0]=BigInt(1),si=li[0]===1),ci[0]=e,new t(li[e=+!si],li[1-e])):(oi||=(ri=BigInt(-(2**53-1)),ii=BigInt(2**53-1),ai=BigInt(4294967295),BigInt(32)),e>=ri&&e<=ii?n(Number(e)):(e=BigInt.asUintN(64,e),new t(Number(e&ai),Number(e>>oi))))}function fi(e,t,n){for(;n>0||t>127;)e.h.push(127&t|128),t=(t>>>7|n<<25)>>>0,n>>>=7;e.h.push(t)}function pi(e,t){for(;t>127;)e.h.push(127&t|128),t>>>=7;e.h.push(t)}function mi(e,t){if(t>=0)pi(e,t);else{for(let n=0;n<9;n++)e.h.push(127&t|128),t>>=7;e.h.push(1)}}function hi(e,t){Tt(t),function(e){var t=g>>31;e(h<<1^t,(g<<1|h>>>31)^t)}((t,n)=>{fi(e,t>>>0,n>>>0)})}function gi(e,t){e.h.push(t>>>0&255),e.h.push(t>>>8&255),e.h.push(t>>>16&255),e.h.push(t>>>24&255)}var _i=class{constructor(){this.h=[]}length(){return this.h.length}end(){var e=this.h;return this.h=[],e}};function vi(e,t){t.length!==0&&(e.l.push(t),e.i+=t.length)}function T(e,t,n){pi(e.h,8*t+n)}function yi(e,t){return T(e,t,2),t=e.h.end(),vi(e,t),t.push(e.i),t}function bi(e,t){var n=t.pop();for(n=e.i+e.h.length()-n;n>127;)t.push(127&n|128),n>>>=7,e.i++;t.push(n),e.i++}function xi(e,t,n){if(n!=null)switch(T(e,t,0),typeof n){case`number`:e=e.h,_t(n),fi(e,h,g);break;case`bigint`:n=di(n,ui,ei),fi(e.h,n.i,n.h);break;default:n=ti(n),fi(e.h,n.i,n.h)}}function Si(e,t,n){T(e,t,2),pi(e.h,n.length),vi(e,e.h.end()),vi(e,n)}function Ci(e,t,n,r){n!=null&&(t=yi(e,t),r(n,e),bi(e,t))}var wi=class{constructor(){this.l=[],this.i=0,this.h=new _i}};function Ti(e){typeof e==`string`&&ti(e)}function Ei(){var e=class{constructor(){throw Error()}};return Object.setPrototypeOf(e,e.prototype),e}var Di=Ei(),Oi=Ei(),ki=Ei(),Ai=Ei(),ji=Ei(),Mi=Ei(),Ni=Ei(),Pi=Ei(),Fi=Ei(),Ii=Ei(),Li=Ei(),Ri=Ei();function zi(e,t,n){var r=e.B;Fe&&Fe in r&&(r=r[Fe])&&delete r[t.h],t.i?t.u(e,t.i,t.h,n,t.l):t.u(e,t.h,n,t.l)}var E=class{constructor(e,t){this.B=kn(e,t,void 0,2048)}toJSON(){return Dn(this)}u(){var e=Ws,t=this.B,n=e.h,r=Fe;if(ke&&r&&t[r]?.[n]!=null&&De(Ie,3),t=e.h,Ve&&Fe&&Ve===void 0&&(r=(n=this.B)[Fe])&&(r=r.la))try{r(n,t,Sn)}catch(e){ee(e)}return e.i?e.o(this,e.i,e.h,e.l):e.o(this,e.h,e.defaultValue,e.l)}clone(){var e=this.B,t=0|e[f];return zn(this,e,t)?Mn(this,e,!0):new this.constructor(Pn(e,t,!1))}};E.prototype[Be]=Je,E.prototype.toString=function(){return this.B.toString()};var Bi=class{constructor(e,t,n){this.h=e,this.i=t,e=Di,this.l=!!e&&n===e||!1}};function Vi(e,t){return new Bi(e,t,Di)}function Hi(e,t,n,r,i){Ci(e,n,ea(t,r),i)}var Ui,Wi,Gi=Vi(function(e,t,n,r,i){return e.i===2&&(Wr(e,ir(t,r,n),i),!0)},Hi),Ki=Vi(function(e,t,n,r,i){return e.i===2&&(Wr(e,ir(t,r,n),i),!0)},Hi),qi=Symbol(),Ji=Symbol(),Yi=Symbol(),Xi=Symbol(),Zi=Symbol();function Qi(e,t,n,r){var i=r[e];if(i)return i;(i={}).Fa=r,i.da=function(e){switch(typeof e){case`boolean`:return yn||=[0,void 0,!0];case`number`:return e>0?void 0:e===0?bn||=[0,void 0]:[-e,void 0];case`string`:return[0,e];case`object`:return e}}(r[0]);var a=r[1],o=1;a&&a.constructor===Object&&(i.ja=a,typeof(a=r[++o])==`function`&&(i.xa=!0,Ui??=a,Wi??=r[o+1],a=r[o+=2]));for(var s={};a&&Array.isArray(a)&&a.length&&typeof a[0]==`number`&&a[0]>0;){for(var c=0;c<a.length;c++)s[a[c]]=a;a=r[++o]}for(c=1;a!==void 0;){let e;typeof a==`number`&&(c+=a,a=r[++o]);var l=void 0;if(a instanceof Bi?e=a:(e=Gi,o--),e?.l){a=r[++o],l=r;var u=o;typeof a==`function`&&(a=a(),l[u]=a),l=a}for(u=c+1,typeof(a=r[++o])==`number`&&a<0&&(u-=a,a=r[++o]);c<u;c++){let r=s[c];l?n(i,c,e,l,r):t(i,c,e,r)}}return r[e]=i}function $i(e){return Array.isArray(e)?e[0]instanceof Bi?e:[Ki,e]:[e,void 0]}function ea(e,t){return e instanceof E?e.B:Array.isArray(e)?On(e,t):void 0}function ta(e,t,n,r){var i=n.h;e[t]=r?(e,t,n)=>i(e,t,n,r):i}function na(e,t,n,r,i){var a,o,s=n.h;e[t]=(e,t,n)=>s(e,t,n,o||=Qi(Ji,ta,na,r).da,a||=ra(r),i)}function ra(e){var t=e[Yi];if(t!=null)return t;var n=Qi(Ji,ta,na,e);return t=n.xa?(e,t)=>Ui(e,t,n):(e,t)=>{t:{Ur();try{for(;Vr(t)&&t.i!=4;){let c=t.l,l=n[c];if(l==null){let e=n.ja;if(e){let t=e[c];if(t){let e=aa(t);e!=null&&(l=n[c]=e)}}}if(l==null||!l(t,e,c)){var r=t;let n=r.o;if(Hr(r),r.sa)var i=void 0;else{let e=r.h.h-n;r.h.h=n,i=Fr(r.h,e)}r=void 0;var a=e,o=c,s=i;s&&((r=a[Fe]??(a[Fe]=new xn))[o]??(r[o]=[])).push(s)}}let l=_n(e);l&&(l.la=n.Fa[Zi]);var c=!0;break t}catch(e){throw e instanceof RangeError?SyntaxError():e}finally{Rr>0&&Rr--}}return c},e[Yi]=t,e[Zi]=ia.bind(e),t}function ia(e,t,n,r){var i=this[Ji],a=this[Yi],o=On(void 0,i.da),s=_n(e);if(s){var c=!1,l=i.ja;if(l){if(i=(t,n,i)=>{if(i.length!==0){if(l[n])for(let e of i){t=zr(e);try{c=!0,a(o,t)}finally{Br(t)}}else r?.(e,n,i)}},t==null)vn(s,i);else if(s!=null){let e=s[t];e&&i(s,t,e)}if(c){let r=0|e[f];if(2&r&&2048&r&&!n?.eb)throw Error();let i=nt(r),a=(t,a)=>{if(Hn(e,t,i)!=null){if(n?.mb===1)return;throw Error()}a!=null&&(r=b(e,r,t,a,i)),delete s[t]};t==null?et(o,0|o[f],(e,t)=>{a(e,t)}):a(t,Hn(o,t,i))}}}}function aa(e){var t=(e=$i(e))[0].h;if(e=e[1]){let n=ra(e),r=Qi(Ji,ta,na,e).da;return(e,i,a)=>t(e,i,a,r,n)}return t}function oa(e,t,n){e[t]=n.i}function sa(e,t,n,r){var i,a,o=n.i;e[t]=(e,t,n)=>o(e,t,n,a||=Qi(qi,oa,sa,r).da,i||=ca(r))}function ca(e){var t=e[Xi];if(!t){let n=Qi(qi,oa,sa,e);t=(e,t)=>la(e,t,n),e[Xi]=t}return t}function la(e,t,n){et(e,0|e[f],(e,r)=>{if(r!=null){var i=function(e,t){var n=e[t];if(n)return n;if((n=e.ja)&&(n=n[t])){var r=(n=$i(n))[0].i;if(n=n[1]){let t=ca(n),i=Qi(qi,oa,sa,n).da;n=e.xa?Wi(i,t):(e,n,a)=>r(e,n,a,i,t)}else n=r;return e[t]=n}}(n,e);i?i(t,r,e):e<500||De(Re,3)}}),(e=_n(e))&&vn(e,(e,n,r)=>{for(vi(t,t.h.end()),e=0;e<r.length;e++)vi(t,be(r[e])||new Uint8Array)})}var ua=m(0);function da(e,t,n){if(Array.isArray(t)){var r=0|t[f];if(4&r)return t;for(var i=0,a=0;i<t.length;i++){let n=e(t[i]);n!=null&&(t[a++]=n)}return a<i&&(t.length=a),e=1|r,n&&(e=-1537&e|4),e!==r&&p(t,e),n&&2&e&&Object.freeze(t),t}}var fa=(e,t)=>{var n=new wi;la(e.B,n,Qi(qi,oa,sa,t)),vi(n,n.h.end()),e=new Uint8Array(n.i);var r=(t=n.l).length,i=0;for(let n=0;n<r;n++){let r=t[n];e.set(r,i),i+=r.length}return n.l=[e],e};function D(e,t,n){return new Bi(e,t,n)}function pa(e,t,n){return new Bi(e,t,n)}function O(e,t,n){b(e,0|e[f],t,n,nt(0|e[f]))}var ma=Vi(function(e,t,n,r,i){if(e.i!==2)return!1;if(e=Dt(e=Wr(e,On([void 0,void 0],r),i)),i=nt(r=0|t[f]),2&r)throw Error();var a=Hn(t,n,i);if(a instanceof pn)2&a.N?((a=a.fa()).push(e),b(t,r,n,a,i)):a.hb(e);else if(Array.isArray(a)){var o=0|a[f];8192&o||p(a,o|=8192),2&o&&b(t,r,n,a=Zn(a),i),a.push(e)}else b(t,r,n,qe([e]),i);return!0},function(e,t,n,r,i){if(t instanceof pn)t.forEach((t,a)=>{Ci(e,n,On([a,t],r),i)});else if(Array.isArray(t)){for(let a=0;a<t.length;a++){let o=t[a];Array.isArray(o)&&Ci(e,n,On(o,r),i)}qe(t)}});function ha(e,t,n){(t=Ft(t))!=null&&(T(e,n,5),e=e.h,vt(t),gi(e,h))}function ga(e,t,n){(t=Qt(t))!=null&&(Ti(t),xi(e,n,t))}function _a(e,t,n){(t=Bt(t))!=null&&t!=null&&(T(e,n,0),mi(e.h,t))}function va(e,t,n){(t=t==null||typeof t==`boolean`?t:typeof t==`number`?!!t:void 0)!=null&&(T(e,n,0),e.h.h.push(+!!t))}function ya(e,t,n){(t=_(t))!=null&&Si(e,n,d(t))}function ba(e,t,n,r,i){Ci(e,n,ea(t,r),i)}function xa(e,t,n){(t=$t(t))!=null&&Si(e,n,wr(t,!0).buffer)}function Sa(e,t,n){(t=Vt(t))!=null&&t!=null&&(T(e,n,0),pi(e.h,t))}function Ca(e,t,n){(t=Bt(t))!=null&&(t=parseInt(t,10),T(e,n,0),mi(e.h,t))}function wa(e,t,n){return(e.i===5||e.i===2)&&(t=$n(t,0|t[f],n),e.i==2?qr(e,jr,t):t.push(jr(e.h)),!0)}function Ta(e,t,n){return e.i===0&&(O(t,n,kr(e.h)),!0)}function Ea(e,t,n){return(e.i===0||e.i===2)&&(t=$n(t,0|t[f],n),e.i==2?qr(e,Dr,t):t.push(Dr(e.h)),!0)}function Da(e,t,n){return e.i===2&&(O(t,n,(e=Kr(e))===ye()?void 0:e),!0)}var Oa=D(function(e,t,n){if(e.i!==1)return!1;var r=e.h;e=Ar(r);var i=Ar(r);r=2*(i>>31)+1;var a=i>>>20&2047;return e=4294967296*(1048575&i)+e,O(t,n,a==2047?e?NaN:1/0*r:a==0?5e-324*r*e:r*2**(a-1075)*(e+4503599627370496)),!0},function(e,t,n){(t=Ft(t))!=null&&(T(e,n,1),e=e.h,(n=mt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+t,!0),h=n.getUint32(0,!0),g=n.getUint32(4,!0),gi(e,h),gi(e,g))},Ii),k=D(function(e,t,n){return e.i===5&&(O(t,n,jr(e.h)),!0)},ha,Fi),ka=pa(wa,function(e,t,n){if((t=da(Ft,t,!0))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&(T(r,i,5),r=r.h,vt(a),gi(r,h))}},Fi),Aa=pa(wa,function(e,t,n){if((t=da(Ft,t,!0))!=null&&t.length){T(e,n,2),pi(e.h,4*t.length);for(let r=0;r<t.length;r++)n=e.h,vt(t[r]),gi(n,h)}},Fi),ja=D(function(e,t,n){return e.i===5&&(O(t,n,(e=jr(e.h))===0?void 0:e),!0)},ha,Fi),Ma=D(function(e,t,n){return Ta(e,t,n)},ga,Mi),A=D(function(e,t,n){return Ta(e,t,n)},ga,Mi),Na=pa(function(e,t,n){return e.i!==0&&e.i!==2?e=!1:(t=$n(t,0|t[f],n),e.i==2?qr(e,kr,t):t.push(kr(e.h)),e=!0),e},function(e,t,n){if((t=da(Qt,t,!1))!=null)for(let r=0;r<t.length;r++)xi(e,n,t[r])},Mi),Pa=D(function(e,t,n){return e.i===0?(O(t,n,(e=kr(e.h))===ua?void 0:e),t=!0):t=!1,t},ga,Mi),Fa=D(function(e,t,n){return e.i===0?(O(t,n,Tr(e.h,bt)),e=!0):e=!1,e},function(e,t,n){if(t=function(e){if(e==null)return e;var t=typeof e;if(t===`bigint`)return String(kt(64,e));if(Rt(e)){if(t===`string`)return t=Mt(Number(e)),At(t)&&t>=0?e=String(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),e=Wt(e)),e;if(t===`number`)return Kt(e)}}(t),t!=null&&(typeof t==`string`&&Zr(t),t!=null))switch(T(e,n,0),typeof t){case`number`:e=e.h,_t(t),fi(e,h,g);break;case`bigint`:n=di(t,$r,Xr),fi(e.h,n.i,n.h);break;default:n=Zr(t),fi(e.h,n.i,n.h)}},Ni),j=D(function(e,t,n){return e.i===0&&(O(t,n,Dr(e.h)),!0)},_a,Ai),Ia=pa(Ea,function(e,t,n){if((t=da(Bt,t,!0))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&(T(r,i,0),mi(r.h,a))}},Ai),La=pa(Ea,function(e,t,n){if((t=da(Bt,t,!0))!=null&&t.length){n=yi(e,n);for(let n=0;n<t.length;n++)mi(e.h,t[n]);bi(e,n)}},Ai),Ra=D(function(e,t,n){return e.i===0&&(O(t,n,(e=Dr(e.h))===0?void 0:e),!0)},_a,Ai),M=D(function(e,t,n){return e.i===0&&(O(t,n,Er(e.h)),!0)},va,Oi),za=D(function(e,t,n){return e.i===0&&(O(t,n,!1===(e=Er(e.h))?void 0:e),!0)},va,Oi),N=pa(function(e,t,n){return e.i===2&&(e=Gr(e),$n(t,0|t[f],n).push(e),!0)},function(e,t,n){if((t=da(_,t,!0))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&Si(r,i,d(a))}},ki),Ba=D(function(e,t,n){return e.i===2&&(O(t,n,(e=Gr(e))===``?void 0:e),!0)},ya,ki),P=D(function(e,t,n){return e.i===2&&(O(t,n,Gr(e)),!0)},ya,ki),F=function(e,t,n=Di){return new Bi(e,t,n)}(function(e,t,n,r,i){return e.i===2&&(r=On(void 0,r),$n(t,0|t[f],n).push(r),Wr(e,r,i),!0)},function(e,t,n,r,i){if(Array.isArray(t)){for(let a=0;a<t.length;a++)ba(e,t[a],n,r,i);1&(e=0|t[f])||p(t,1|e)}}),I=Vi(function(e,t,n,r,i,a){if(e.i!==2)return!1;var o=0|t[f];return nr(t,o,a,n,nt(o)),Wr(e,t=ir(t,r,n),i),!0},ba),Va=D(function(e,t,n){return e.i===2&&(O(t,n,Kr(e)),!0)},xa,Li),Ha=pa(function(e,t,n){return e.i===2&&(e=Kr(e),$n(t,0|t[f],n).push(e),!0)},function(e,t,n){if((t=da($t,t,!1))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&Si(r,i,wr(a,!0).buffer)}},Li),Ua=D(function(e,t,n){return e.i===0&&(O(t,n,Or(e.h)),!0)},Sa,ji),Wa=pa(function(e,t,n){return(e.i===0||e.i===2)&&(t=$n(t,0|t[f],n),e.i==2?qr(e,Or,t):t.push(Or(e.h)),!0)},function(e,t,n){if((t=da(Vt,t,!0))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&(T(r,i,0),pi(r.h,a))}},ji),Ga=D(function(e,t,n){return e.i===0&&(O(t,n,(e=Or(e.h))===0?void 0:e),!0)},Sa,ji),L=D(function(e,t,n){return e.i===0&&(O(t,n,Dr(e.h)),!0)},Ca,Ri),Ka=D(function(e,t,n){return e.i===0&&(O(t,n,(e=Dr(e.h))===0?void 0:e),!0)},Ca,Ri),qa=D(function(e,t,n){return e.i===0?(O(t,n,function(e){return Tr(e,(e,t)=>{var n=-(1&e);return xt(e=(e>>>1|t<<31)^n,t>>>1^n)})}(e.h)),e=!0):e=!1,e},function(e,t,n){if((t=Qt(t))!=null&&(Ti(t),t!=null))switch(T(e,n,0),typeof t){case`number`:e=e.h,t=(n=t)<0,gt(n=2*Math.abs(n)),n=h;let r=g;t&&(n==0?r==0?r=n=4294967295:(r--,n=4294967295):n--),fi(e,h=n,g=r);break;case`bigint`:e=e.h,t=t<<BigInt(1)^t>>BigInt(63),h=Number(BigInt.asUintN(32,t)),g=Number(BigInt.asUintN(32,t>>BigInt(32))),fi(e,h,g);break;default:hi(e.h,t)}},Pi),Ja=class{constructor(e,t){var n=Co;this.h=e,this.i=t,this.o=x,this.u=S,this.defaultValue=void 0,this.l=n.kb==null?void 0:tt}register(){oe(this)}};function Ya(e,t){return new Ja(e,t)}function Xa(e,t){return(n,r)=>{t:{let a={na:!0};r&&Object.assign(a,r),n=zr(n,void 0,void 0,a);try{let r=new e,a=r.B;ra(t)(a,n);var i=r;break t}catch(e){throw e instanceof RangeError?SyntaxError():e}finally{Br(n)}}return i}}function Za(e){return t=>fa(t,e)}function Qa(e){return function(){return fa(this,e)}}var $a=[0,Va,Ha,M,P],eo=[0,Ba,[0,Ka,[0,Pa,Ra],Ka,-1,[0,L],Ka,-1],D(Da,xa,Li)],to,no=class extends E{constructor(e){super(e)}},ro=[0,Ba,D(Da,function(e,t,n){if(t!=null){if(t instanceof E){let r=t.nb;r?(t=r(t),t!=null&&Si(e,n,wr(t,!0).buffer)):De(Re,3);return}if(Array.isArray(t))return void De(Re,3)}xa(e,t,n)},Li)],io=[0,1,[0,12,j,10,M],[0,7,[0,j,-1]]],ao=globalThis.trustedTypes,oo=class{constructor(e){this.h=e}toString(){return this.h+``}};function so(e){var t;return to===void 0&&(to=function(){var e=null;if(!ao)return e;try{let t=e=>e;e=ao.createPolicy(`goog#html`,{createHTML:t,createScript:t,createScriptURL:t})}catch{}return e}()),e=(t=to)?t.createScriptURL(e):e,new oo(e)}function co(e,...t){if(t.length===0)return so(e[0]);var n=e[0];for(let r=0;r<t.length;r++)n+=encodeURIComponent(t[r])+e[r+1];return so(n)}var lo=[0,j,L,M,-1,La,L,-1,M,-1],uo=[0,L,-1,M],fo=class extends E{constructor(e){super(e)}},po=[0,M,P,M,L,-1,pa(function(e,t,n){return(e.i===0||e.i===2)&&(t=$n(t,0|t[f],n),e.i==2?qr(e,Mr,t):t.push(Dr(e.h)),!0)},function(e,t,n){if((t=da(Bt,t,!0))!=null&&t.length){n=yi(e,n);for(let n=0;n<t.length;n++)mi(e.h,t[n]);bi(e,n)}},Ri),P,-1,[0,M,-1],L,M,-1,uo],mo=class extends E{constructor(e){super(e)}},ho=class extends E{constructor(e){super(e)}},go=class extends E{constructor(e){super(e)}h(){var e=this.B;return ar(e,0|e[f],ho,9)!==void 0}},_o=[0,3,M,-1,2,[0,[2],j,I,[0,Ua]],[0,L,M,L,M,L,4,[0,M,P,-1,M]],[0,[3,4],P,-1,I,[0,j],I,[0,L,-1]],[0],P],vo=[0,P,-2],yo=class extends E{constructor(e){super(e)}},bo=[0],xo=class extends E{constructor(e){super(e)}},So=[0,j,M,1,M,-4],Co=class extends E{constructor(e){super(e,2)}},R={};R[336783863]=[0,P,M,-1,j,[0,[1,2,3,4,5,6,7,8,9],I,bo,I,po,I,vo,I,So,I,lo,I,[0,P,-2],I,[0,P,L],I,_o,I,uo],[0,P],M,[0,[1,3],[2,4],I,[0,La],-1,I,[0,N],-1,F,[0,P,-1]],P];var wo=[0,Pa,-1,za,-3,Pa,La,Ba,Ra,Pa,-1,za,Ra,za,-2,Ba];function z(e,t){Sr(e,3,t)}function B(e,t){Sr(e,4,t)}var To=class extends E{constructor(e){super(e,500)}A(e){return S(this,0,7,e)}},Eo=[-1,{}],Do=[0,P,1,Eo],Oo=[0,P,N,Eo];function ko(e,t){fr(e,1,To,t)}function V(e,t){Sr(e,10,t)}function H(e,t){Sr(e,15,t)}var Ao=class extends E{constructor(e){super(e,500)}A(e){return S(this,0,1001,e)}},jo=[-500,F,[-500,Ba,-1,N,-3,[-2,R,M],F,ro,Ra,-1,Do,Oo,F,[0,Ba,za],Ba,wo,Ra,N,987,N],4,F,[-500,P,-1,[-1,{}],998,P],F,[-500,P,N,-1,[-2,{},M],997,N,-1],Ra,F,[-500,P,N,Eo,998,N],N,Ra,Do,Oo,F,[0,Ba,-1,Eo],N,-2,wo,Ba,-1,za,[0,za,Ga],978,Eo,F,ro];Ao.prototype.h=Qa(jo);var Mo=Xa(Ao,jo),No=class extends E{constructor(e){super(e)}},Po=class extends E{constructor(e){super(e)}h(){return sr(this,No,1)}},Fo=[0,F,[0,j,k,P,-1]],Io=Xa(Po,Fo),Lo=class extends E{constructor(e){super(e)}},Ro=class extends E{constructor(e){super(e)}},zo=class extends E{constructor(e){super(e)}l(){return x(this,Lo,2)}h(){return sr(this,Ro,5)}},Bo=Xa(class extends E{constructor(e){super(e)}},[0,N,La,Aa,[0,L,[0,j,-3],[0,k,-3],[0,j,-1,[0,F,[0,j,-2]]],F,[0,k,-1,P,k]],P,-1,A,F,[0,j,k],N,A]),Vo=class extends E{constructor(e){super(e)}},Ho=Xa(class extends E{constructor(e){super(e)}},[0,F,[0,k,-4]]),Uo=class extends E{constructor(e){super(e)}},Wo=Xa(class extends E{constructor(e){super(e)}},[0,F,[0,k,-4]]),Go=class extends E{constructor(e){super(e)}},Ko=[0,j,-1,Aa,L],qo=class extends E{constructor(e){super(e)}};qo.prototype.h=Qa([0,k,-4,A]);var Jo=class extends E{constructor(e){super(e)}},Yo=Xa(class extends E{constructor(e){super(e)}},[0,F,[0,1,j,P,Fo],A]),Xo=class extends E{constructor(e){super(e)}},Zo=class extends E{constructor(e){super(e)}h(){return v(this,1,void 0,Xn)??ye()}},Qo=class extends E{constructor(e){super(e)}},$o=[1,2],es=Xa(class extends E{constructor(e){super(e)}},[0,F,[0,$o,I,[0,Aa],I,[0,Va],j,P],A]),ts=class extends E{constructor(e){super(e)}},ns=[0,P,j,k,N,-1],rs=class extends E{constructor(e){super(e)}},is=[0,M,-1],as=class extends E{constructor(e){super(e)}h(){return Un(this,fo,2,os)}l(){return mr(this,go,6,os)}},os=[1,2,3,4,5,6],ss=class extends E{constructor(e){super(e)}h(){return v(this,1,void 0,Xn)!=null}l(){return _(v(this,2))!=null}},U=class extends E{constructor(e){super(e)}},cs=[0,Va,P,[0,j,A,-1],[0,Fa,A]],W=[0,cs,M,[0,os,I,So,I,po,I,lo,I,bo,I,vo,I,_o],L],ls=Za(W),us=class extends E{constructor(e){super(e)}},ds=[0,W,k,-1,j],fs=Ya(502141897,us);R[502141897]=ds;var ps=Xa(class extends E{constructor(e){super(e)}},[0,[0,L,-1,ka,Wa],Ko]),ms=class extends E{constructor(e){super(e)}},hs=class extends E{constructor(e){super(e)}},gs=[0,W,k,[0,W],M],_s=Ya(508968150,hs);R[508968150]=[0,W,ds,gs,k,[0,[0,cs]]],R[508968149]=gs;var vs=class extends E{constructor(e){super(e)}l(){return x(this,ts,2)}h(){y(this,2)}},ys=[0,W,ns];R[478825465]=ys;var bs=class extends E{constructor(e){super(e)}},xs=class extends E{constructor(e){super(e)}},Ss=class extends E{constructor(e){super(e)}},Cs=class extends E{constructor(e){super(e)}},ws=class extends E{constructor(e){super(e)}},Ts=[0,W,[0,W],ys,-1],Es=[0,W,k,j],Ds=[0,W,k],Os=[0,W,Es,Ds,k],ks=Ya(479097054,ws);R[479097054]=[0,W,Os,Ts],R[463370452]=Ts,R[464864288]=Es;var As=Ya(462713202,Cs);R[462713202]=Os,R[474472470]=Ds;var js=class extends E{constructor(e){super(e)}},Ms=class extends E{constructor(e){super(e)}},Ns=class extends E{constructor(e){super(e)}},Ps=class extends E{constructor(e){super(e)}},Fs=[0,W,k,-1,j],Is=[0,W,k,M];Ps.prototype.h=Qa([0,W,Ds,[0,W],ds,gs,Fs,Is]);var Ls=class extends E{constructor(e){super(e)}},Rs=Ya(456383383,Ls);R[456383383]=[0,W,ns];var zs=class extends E{constructor(e){super(e)}},Bs=Ya(476348187,zs);R[476348187]=[0,W,is];var Vs=class extends E{constructor(e){super(e)}},Hs=class extends E{constructor(e){super(e)}},Us=[0,L,-1],Ws=Ya(458105876,class extends E{constructor(e){super(e)}h(){var e=this.B,t=0|e[f],n=Ye(this,t);return e=function(e,t,n,r){var i=Hs;!r&&In(e)&&(n=0|(t=e.B)[f]);var a=Hn(t,2);if(e=!1,a==null){if(r)return gn();a=[]}else if(a.constructor===pn){if(!(2&a.N)||r)return a;a=a.fa()}else Array.isArray(a)?e=!!(2&a[f]):a=[];if(r){if(!a.length)return gn();e||(e=!0,Ke(a))}else e&&(e=!1,qe(a),a=Zn(a));return!e&&32&n&&Ge(a,32),n=b(t,n,2,r=new pn(a,i,rn,void 0)),e||Rn(t,n),r}(this,e,t,n),!n&&Hs&&(e.Ga=!0),e}});R[458105876]=[0,Us,ma,[!0,A,[0,P,-1,N]],[0,La,M,L],M];var Gs=class extends E{constructor(e){super(e)}},Ks=Ya(458105758,Gs);R[458105758]=[0,W,P,Us];var qs=class extends E{constructor(e){super(e)}},Js=class extends E{constructor(e){super(e)}},Ys=class extends E{constructor(e){super(e)}},Xs=Za([0,F,[0,Ka,F,[0,ja,-1],za]]),Zs=class extends E{constructor(e){super(e)}},Qs=[0,ja,-1,za],$s=class extends E{constructor(e){super(e)}},ec=class extends E{constructor(e){super(e)}},tc=[1,2];ec.prototype.h=Qa([0,tc,I,Qs,I,[0,F,Qs]]);var nc=class extends E{constructor(e){super(e)}},rc=Ya(443442058,nc);R[443442058]=[0,W,P,j,k,N,-1,M,k],R[514774813]=Fs;var ic=class extends E{constructor(e){super(e)}},ac=Ya(516587230,ic);function oc(e,t){return t=t?t.clone():new ts,e.displayNamesLocale===void 0?e.displayNamesLocale===void 0&&y(t,1):y(t,1,tn(e.displayNamesLocale)),e.maxResults===void 0?`maxResults`in e&&y(t,2):gr(t,2,e.maxResults),e.scoreThreshold===void 0?`scoreThreshold`in e&&y(t,3):w(t,3,e.scoreThreshold),e.categoryAllowlist===void 0?`categoryAllowlist`in e&&y(t,4):xr(t,4,e.categoryAllowlist),e.categoryDenylist===void 0?`categoryDenylist`in e&&y(t,5):xr(t,5,e.categoryDenylist),t}function sc(e){var t=Number(e);return Number.isSafeInteger(t)?t:String(e)}function cc(e,t=-1,n=``){return{categories:e.map(e=>({index:pr(e,1)??0??-1,score:C(e,2)??0,categoryName:_(v(e,3))??``??``,displayName:_(v(e,4))??``??``})),headIndex:t,headName:n}}function lc(e){var t={classifications:sr(e,Jo,1).map(e=>cc(x(e,Po,4)?.h()??[],pr(e,2)??0,_(v(e,3))??``))};return function(e){return e==null?e:typeof e==`bigint`?(ct(e)?e=Number(e):(e=Ot(64,e),e=ct(e)?Number(e):String(e)),e):Rt(e)?typeof e==`number`?Gt(e):Jt(e):void 0}(v(e,2,void 0,Zt))!=null&&(t.timestampMs=sc(v(e,2,void 0,Zt)??Bn)),t}function uc(e){var t=Gn(e,3,Ft,Wn()),n=Gn(e,2,Bt,Wn()),r=Gn(e,1,_,Wn()),i=Gn(e,9,_,Wn()),a={categories:[],keypoints:[]};for(let e=0;e<t.length;e++)a.categories.push({score:t[e],index:n[e]??-1,categoryName:r[e]??``,displayName:i[e]??``});if((t=x(e,zo,4)?.l())&&(a.boundingBox={originX:pr(t,1,Vn)??0,originY:pr(t,2,Vn)??0,width:pr(t,3,Vn)??0,height:pr(t,4,Vn)??0,angle:0}),x(e,zo,4)?.h().length)for(let t of x(e,zo,4).h())a.keypoints.push({x:v(t,1,Vn,Ft)??0,y:v(t,2,Vn,Ft)??0,score:v(t,4,Vn,Ft)??0,label:_(v(t,3,Vn))??``});return a}function dc(e){var t=[];for(let n of sr(e,Uo,1))e={x:C(n,1)??0,y:C(n,2)??0,z:C(n,3)??0,visibility:C(n,4)??0},v(n,5,void 0,Ft)!=null&&(e.presence=C(n,5)??0),t.push(e);return t}function fc(e){var t=[];for(let n of sr(e,Vo,1))e={x:C(n,1)??0,y:C(n,2)??0,z:C(n,3)??0,visibility:C(n,4)??0},v(n,5,void 0,Ft)!=null&&(e.presence=C(n,5)??0),t.push(e);return t}function pc(e){return Array.from(e,e=>e>127?e-256:e)}function mc(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);var n=0,r=0,i=0;for(let a=0;a<e.length;a++)n+=e[a]*t[a],r+=e[a]*e[a],i+=t[a]*t[a];if(r<=0||i<=0)throw Error(`Cannot compute cosine similarity on embedding with 0 norm.`);return n/Math.sqrt(r*i)}R[516587230]=[0,W,Fs,Is,k],R[518928384]=Is;var hc,gc=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 _c(e){if(e)return!0;if(hc===void 0)try{await WebAssembly.instantiate(gc),hc=!0}catch{hc=!1}return hc}async function vc(e,t,n){return{wasmLoaderPath:`${t}/${e}_${n=`wasm${n?`_module`:``}${await _c(n)?``:`_nosimd`}_internal`}.js`,wasmBinaryPath:`${t}/${e}_${n}.wasm`}}var yc=class{};function bc(e){return y(new xc,1,zt(e))}yc.forVisionTasks=function(e,t=!1){return vc(`vision`,e??co``,t)},yc.forLiteRtLmTextTasks=function(e,t=!1){return vc(`litertlm_text`,e??co``,t)},yc.forTextTasks=function(e,t=!1){return vc(`text`,e??co``,t)},yc.forRetrievalTasks=function(e,t=!1){return vc(`retrieval`,e??co``,t)},yc.forGenAiTasks=function(e,t=!1){return vc(`genai`,e??co``,t)},yc.forDecisionTasks=function(e,t=!1){return vc(`decision`,e??co``,t)},yc.forAudioTasks=function(e,t=!1){return vc(`audio`,e??co``,t)},yc.isSimdSupported=function(e=!1){return _c(e)};var xc=class extends E{constructor(e){super(e)}},Sc=class extends E{constructor(e){super(e)}},Cc=[0,L,2,Fa,-2,A,F,[0,L,A]],wc=class extends E{constructor(e){super(e)}},Tc=class extends E{constructor(e){super(e)}};function Ec(e,t){return y(e,1,zt(t))}function Dc(e,t){return y(e,2,zt(t))}var Oc=class extends E{constructor(e){super(e)}},kc=[3,4,5,6,7],Ac=class extends E{constructor(e){super(e)}},jc=class extends E{constructor(e){super(e)}};jc.prototype.h=Qa([0,[0,L,P,-3,L],[0,kc,L,-1,I,[0,L,P,Fa],I,Cc,I,[0,1,Cc],I,[0,L],I,[0,L,P,Fa]]]);var Mc=class{constructor(){this.h=typeof AbortController<`u`}async send(e,t,n){var r=this.h?new AbortController:void 0,i=r&&e.ma>0?setTimeout(()=>{r.abort()},e.ma):void 0;try{let i=await fetch(e.url,{method:e.cb,headers:{...e.bb},...e.body&&{body:e.body},...e.withCredentials&&{credentials:`include`},signal:e.ma&&r?r.signal:null});i.status===200?t?.(await i.text()):n?.(i.status)}catch(e){e?.name===`AbortError`?n?.(408):n?.(400)}finally{clearTimeout(i)}}},Nc=class extends E{constructor(e){super(e,37)}},Pc=[-4,{},io,L,eo],Fc=[0,P,L,1,P,-1,L,1,L,1,A],Ic=[0,L,P,-2],Lc=[0,P,L],Rc=[0,P,L],zc=[0,M,-3],Bc=[0,L,P,-1,A,j,-1,P,-5,F,[0,P,-4],-1,M,[0,M,-3],L],Vc=class extends E{constructor(e){super(e,19)}},Hc=Za([-19,{},[0,L,1,[0,P,-6,A,j,P,-1,A],1,[0,P,1,P,-5],P,-1,[0,L,P,-8],[0,P,-3],[0,P,L,P,-2],[0,P,-1,L,P,-1,L,P,-1,[0,F,[0,P,-1],M,P,-5],[0,L,M,j,-2]],A,[0,P,-3,A,j,P,-1],[0,L,P,-1],[0,P,-9],[0,P,-6,L,P,1,P,M,L,-1,M,P,-2,L,P,L,P,j,-1],1,[0,L],1,[0,P,-4],1,Fc,[0,[1,2,3,4,5,6],I,Fc,I,Lc,I,Rc,I,[0,L],I,Bc,I,Ic],Lc,Rc,Bc,[0,[0,L,P,-1,A,j,-1,P,-4,F,[0,P,-4],-1,1,zc],[0,L,P,-1,A,j,-1,P,-4,zc]],Ic,[0,P,[0,j,-3,L],L,-2,[0,j,-1],M],4,[0,P,L,P,-1,A,L,P,-1,L,j,-1]],L,F,[-37,{},Ma,P,F,[0,P,-1],Va,1,Va,[0,N,-1,Ia,Na,-1],P,[0,j,P,-1],M,j,A,P,-1,qa,$a,Ma,Va,L,Ia,A,-1,[0,L,-1],P,M,P,La,P,-1,Oa,1,Oa,Pc,M,[0,L,[0,k,j,-2],[0,k]],[0,L,A]],Ma,Ha,P,-1,Ma,L,-1,[0,M,-1,L,M],[0,A,-1,P],[0,Ma,M,A],A,1,Ua,1,Pc]),Uc=class{constructor(e){this.i=[],this.o=new Mc,this.l=e??``,this.h=setInterval(()=>{this.flush()},6e4)}close(){this.h!==void 0&&(clearInterval(this.h),this.h=void 0),this.flush()}flush(e,t){if(this.error)t?.(`net-send-failed`);else if(this.i.length===0)e?.();else{var n=this.i;this.i=[],n=function(e){var t=new Vc;return ur(t=y(t,2,zt(1786)),3,e)}(n),n=Hc(n),this.o.send({url:`https://odml.pa.googleapis.com/v1/log`,cb:`POST`,ma:1e4,body:n,ib:2,bb:{"Content-Type":`application/x-protobuf`,"x-goog-api-key":this.l},withCredentials:!1},()=>{e?.()},e=>{this.error=Error(`Logging failed with HTTP error: ${e}`),this.i=[],this.h!==void 0&&(clearInterval(this.h),this.h=void 0),t?.(`net-send-failed`,e)})}}},Wc=class{constructor(){this.ba=this.V=this.Y=this.S=this.W=this.U=this.R=0}};function Gc(e,t){var n=new jc;n=S(n,0,1,e.C),n=S(n,0,2,t),t=y(t=new Nc,6,Ze(n=n.h(),!1)),(e=e.m).error||e.i.push(t)}function Kc(e,t){var n={R:t.R-e.l.R,U:t.U-e.l.U,W:t.W-e.l.W,S:t.S-e.l.S,Y:t.Y-e.l.Y,V:t.V,ba:t.ba},r=Dc(Ec(new Oc,e.D),1);n=qc(e,n),Gc(e,r=lr(r,4,kc,n)),e.l=t}function qc(e,t){var n=new Sc;return e=vr(e=_r(e=y(n,1,zt(e.F)),7,t.S),5,t.V),e=vr(e,6,t.ba),t.W>0&&vr(e,4,t.Y/t.W),t.R!==0&&(n=_r(n=bc(3),2,t.R),fr(e,8,xc,n)),t.U!==0&&(t=_r(n=bc(4),2,t.U),fr(e,8,xc,t)),e}var Jc=class{constructor(e,t,n){this.v=performance.now(),this.o=performance.now(),this.i=new Map,this.u=0,this.h=new Wc,this.l=new Wc,this.m=new Uc(n),this.D=function(e){switch(e){case`AudioClassifier`:return 4;case`AudioEmbedder`:return 5;case`TextClassifier`:return 6;case`TextEmbedder`:return 7;case`GestureRecognizer`:return 8;case`HandDetector`:return 9;case`HandLandmarker`:return 10;case`ImageClassifier`:return 11;case`ImageEmbedder`:return 12;case`ImageSegmenter`:return 13;case`ObjectDetector`:return 14;case`FaceDetector`:return 15;case`FaceLandmarker`:return 16;case`InteractiveSegmenter`:case`InteractiveSegmenterLegacy`:return 18;case`HolisticLandmarker`:return 20;case`LlmInference`:return 21;case`LanguageDetector`:return 22;case`PoseLandmarker`:return 23;case`UniversalEmbedder`:return 28;case`SemanticRetriever`:return 29;case`DecisionMaker`:return 30;default:return 0}}(e),this.F=function(e){switch(e){case`IMAGE`:return 11;case`VIDEO`:return 12;case`LIVE_STREAM`:return 13;case`AUDIO_CLIPS`:return 14;case`AUDIO_STREAM`:return 15;default:return 10}}(t),e=new Ac,typeof window>`u`?t=0:(t=navigator.userAgent,t=/Android/i.test(t)?1:/iPhone|iPad|iPod/i.test(t)?2:/Windows/i.test(t)?5:/Macintosh/i.test(t)?4:/Linux/i.test(t)?3:0),e=y(e,1,zt(t)),e=y(e,2,tn(``)),e=y(e,3,tn(``)),e=y(e,4,tn(`1.1.0`)),e=y(e,5,tn(``)),this.C=y(e,6,zt(4))}za(){var e=new Tc;e=vr(e=y(e,1,zt(this.F)),3,performance.now()-this.v),Gc(this,e=lr(Dc(Ec(new Oc,this.D),0),3,kc,e)),this.o=performance.now()}Aa(e){var t=this.i.get(e);if(t!==void 0&&(this.i.delete(e),e=performance.now()-t,++this.h.W,this.h.Y+=e,this.h.V=Math.max(this.h.V,e),this.u=Math.max(this.u,e),performance.now()>this.o+3e4)){for(let[n,r]of this.i.entries())e=n,r<t&&(this.h.S++,this.i.delete(e));t={...this.h,ba:performance.now()-this.o},this.h.V=0,this.o=performance.now(),Kc(this,t)}}ya(){var e={...this.h,S:this.h.S+this.i.size,V:this.u,ba:performance.now()-this.v};Kc(this,e);var t=new wc;t=S(t,0,2,e=qc(this,e)),Gc(this,t=lr(e=Dc(Ec(new Oc,this.D),2),5,kc,t))}close(){var e=this.m;typeof e.close==`function`?e.close():e.flush()}};function Yc(){var e=navigator;return typeof OffscreenCanvas<`u`&&(!function(e=navigator){return(e=e.userAgent).includes(`Safari`)&&!e.includes(`Chrome`)}(e)||!!((e=e.userAgent.match(/Version\/([\d]+).*Safari/))&&e.length>=1&&Number(e[1])>=17))}async function Xc(t){if(typeof importScripts!=`function`){let e=document.createElement(`script`);return e.src=t.toString(),e.crossOrigin=`anonymous`,new Promise((t,n)=>{e.addEventListener(`load`,()=>{t()},!1),e.addEventListener(`error`,e=>{n(e)},!1),document.body.appendChild(e)})}try{importScripts(t.toString())}catch(n){if(!(n instanceof TypeError))throw n;{let n=self.import;n?await n(t.toString()):await e(()=>import(t.toString()),[])}}}function Zc(e){return e.videoWidth===void 0?e.naturalWidth===void 0?e.displayWidth===void 0?[e.width,e.height]:[e.displayWidth,e.displayHeight]:[e.naturalWidth,e.naturalHeight]:[e.videoWidth,e.videoHeight]}function G(e,t,n){e.o||console.error(`No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target`),n(t=e.j.stringToNewUTF8(t)),e.j._free(t)}function Qc(e,t,n){if(!e.j.canvas)throw Error(`No OpenGL canvas configured.`);if(n?e.j._bindTextureToStream(n):e.j._bindTextureToCanvas(),!(n=e.j.canvas.getContext(`webgl2`)||e.j.canvas.getContext(`webgl`)))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.j.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.j.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);var[r,i]=Zc(t);return!e.l||r===e.j.canvas.width&&i===e.j.canvas.height||(e.j.canvas.width=r,e.j.canvas.height=i),[r,i]}function $c(e,t,n){e.o||console.error(`No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target`);var r=new Uint32Array(t.length);for(let n=0;n<t.length;n++)r[n]=e.j.stringToNewUTF8(t[n]);t=e.j._malloc(4*r.length),e.j.HEAPU32.set(r,t>>2),n(t);for(let t of r)e.j._free(t);e.j._free(t)}function el(e,t,n){e.j.simpleListeners=e.j.simpleListeners||{},e.j.simpleListeners[t]=n}function tl(e,t,n){var r=[];e.j.simpleListeners=e.j.simpleListeners||{},e.j.simpleListeners[t]=(e,t,i)=>{t?(n(r,i),r=[]):r.push(e)}}var nl=class{constructor(e,t){this.l=!0,this.j=e,this.h=null,this.i=0,this.o=typeof this.j._addIntToInputStream==`function`,t===void 0?Yc()?this.j.canvas=new OffscreenCanvas(1,1):(console.warn(`OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas.`),this.j.canvas=document.createElement(`canvas`)):this.j.canvas=t}async initializeGraph(e){var t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(`.pbtxt`)||e.endsWith(`.textproto`)),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){var n=e.length,r=this.j._malloc(n);this.j.HEAPU8.set(e,r),t?this.j._changeBinaryGraph(n,r):this.j._changeTextGraph(n,r),this.j._free(r)}configureAudio(e,t,n,r,i){this.j._configureAudio||console.warn(`Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?`),G(this,r||`input_audio`,r=>{G(this,i||=`audio_header`,i=>{this.j._configureAudio(r,i,e,t??0,n)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.j._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.j.gpuOriginForWebTexturesIsBottomLeft=e}ka(e){el(this,`__graph_config__`,t=>{e(t)}),G(this,`__graph_config__`,e=>{this.j._getGraphConfig(e,void 0)}),delete this.j.simpleListeners.__graph_config__}attachErrorListener(e){this.j.errorListener=e}attachEmptyPacketListener(e,t){this.j.emptyPacketListeners=this.j.emptyPacketListeners||{},this.j.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,r,i){var a=4*e.length;this.i!==a&&(this.h&&this.j._free(this.h),this.h=this.j._malloc(a),this.i=a),this.j.HEAPF32.set(e,this.h/4),G(this,r,e=>{this.j._addAudioToInputStream(this.h,t,n,e,i)})}addGpuBufferToStream(e,t,n){G(this,t,t=>{var[r,i]=Qc(this,e,t);this.j._addBoundTextureToStream(t,r,i,n)})}addBoolToStream(e,t,n){G(this,t,t=>{this.j._addBoolToInputStream(e,t,n)})}addDoubleToStream(e,t,n){G(this,t,t=>{this.j._addDoubleToInputStream(e,t,n)})}addFloatToStream(e,t,n){G(this,t,t=>{this.j._addFloatToInputStream(e,t,n)})}addIntToStream(e,t,n){G(this,t,t=>{this.j._addIntToInputStream(e,t,n)})}addUintToStream(e,t,n){G(this,t,t=>{this.j._addUintToInputStream(e,t,n)})}addStringToStream(e,t,n){G(this,t,t=>{G(this,e,e=>{this.j._addStringToInputStream(e,t,n)})})}addStringRecordToStream(e,t,n){G(this,t,t=>{$c(this,Object.keys(e),r=>{$c(this,Object.values(e),i=>{this.j._addFlatHashMapToInputStream(r,i,Object.keys(e).length,t,n)})})})}addProtoToStream(e,t,n,r){G(this,n,n=>{G(this,t,t=>{var i=this.j._malloc(e.length);this.j.HEAPU8.set(e,i),this.j._addProtoToInputStream(i,e.length,t,n,r),this.j._free(i)})})}addEmptyPacketToStream(e,t){G(this,e,e=>{this.j._addEmptyPacketToInputStream(e,t)})}addBoolVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateBoolVector(e.length);if(!r)throw Error(`Unable to allocate new bool vector on heap.`);for(let t of e)this.j._addBoolVectorEntry(r,t);this.j._addBoolVectorToInputStream(r,t,n)})}addDoubleVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateDoubleVector(e.length);if(!r)throw Error(`Unable to allocate new double vector on heap.`);for(let t of e)this.j._addDoubleVectorEntry(r,t);this.j._addDoubleVectorToInputStream(r,t,n)})}addFloatVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateFloatVector(e.length);if(!r)throw Error(`Unable to allocate new float vector on heap.`);for(let t of e)this.j._addFloatVectorEntry(r,t);this.j._addFloatVectorToInputStream(r,t,n)})}addIntVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateIntVector(e.length);if(!r)throw Error(`Unable to allocate new int vector on heap.`);for(let t of e)this.j._addIntVectorEntry(r,t);this.j._addIntVectorToInputStream(r,t,n)})}addUintVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateUintVector(e.length);if(!r)throw Error(`Unable to allocate new unsigned int vector on heap.`);for(let t of e)this.j._addUintVectorEntry(r,t);this.j._addUintVectorToInputStream(r,t,n)})}addStringVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateStringVector(e.length);if(!r)throw Error(`Unable to allocate new string vector on heap.`);for(let t of e)G(this,t,e=>{this.j._addStringVectorEntry(r,e)});this.j._addStringVectorToInputStream(r,t,n)})}addBoolToInputSidePacket(e,t){G(this,t,t=>{this.j._addBoolToInputSidePacket(e,t)})}addDoubleToInputSidePacket(e,t){G(this,t,t=>{this.j._addDoubleToInputSidePacket(e,t)})}addFloatToInputSidePacket(e,t){G(this,t,t=>{this.j._addFloatToInputSidePacket(e,t)})}addIntToInputSidePacket(e,t){G(this,t,t=>{this.j._addIntToInputSidePacket(e,t)})}addUintToInputSidePacket(e,t){G(this,t,t=>{this.j._addUintToInputSidePacket(e,t)})}addStringToInputSidePacket(e,t){G(this,t,t=>{G(this,e,e=>{this.j._addStringToInputSidePacket(e,t)})})}addProtoToInputSidePacket(e,t,n){G(this,n,n=>{G(this,t,t=>{var r=this.j._malloc(e.length);this.j.HEAPU8.set(e,r),this.j._addProtoToInputSidePacket(r,e.length,t,n),this.j._free(r)})})}addBoolVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateBoolVector(e.length);if(!n)throw Error(`Unable to allocate new bool vector on heap.`);for(let t of e)this.j._addBoolVectorEntry(n,t);this.j._addBoolVectorToInputSidePacket(n,t)})}addDoubleVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateDoubleVector(e.length);if(!n)throw Error(`Unable to allocate new double vector on heap.`);for(let t of e)this.j._addDoubleVectorEntry(n,t);this.j._addDoubleVectorToInputSidePacket(n,t)})}addFloatVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateFloatVector(e.length);if(!n)throw Error(`Unable to allocate new float vector on heap.`);for(let t of e)this.j._addFloatVectorEntry(n,t);this.j._addFloatVectorToInputSidePacket(n,t)})}addIntVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateIntVector(e.length);if(!n)throw Error(`Unable to allocate new int vector on heap.`);for(let t of e)this.j._addIntVectorEntry(n,t);this.j._addIntVectorToInputSidePacket(n,t)})}addUintVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateUintVector(e.length);if(!n)throw Error(`Unable to allocate new unsigned int vector on heap.`);for(let t of e)this.j._addUintVectorEntry(n,t);this.j._addUintVectorToInputSidePacket(n,t)})}addStringVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateStringVector(e.length);if(!n)throw Error(`Unable to allocate new string vector on heap.`);for(let t of e)G(this,t,e=>{this.j._addStringVectorEntry(n,e)});this.j._addStringVectorToInputSidePacket(n,t)})}attachBoolListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachBoolListener(e)})}attachBoolVectorListener(e,t){tl(this,e,t),G(this,e,e=>{this.j._attachBoolVectorListener(e)})}attachIntListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachIntListener(e)})}attachIntVectorListener(e,t){tl(this,e,t),G(this,e,e=>{this.j._attachIntVectorListener(e)})}attachUintListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachUintListener(e)})}attachUintVectorListener(e,t){tl(this,e,t),G(this,e,e=>{this.j._attachUintVectorListener(e)})}attachDoubleListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachDoubleListener(e)})}attachDoubleVectorListener(e,t){tl(this,e,t),G(this,e,e=>{this.j._attachDoubleVectorListener(e)})}attachFloatListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachFloatListener(e)})}attachFloatVectorListener(e,t){tl(this,e,t),G(this,e,e=>{this.j._attachFloatVectorListener(e)})}attachStringListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachStringListener(e)})}attachStringVectorListener(e,t){tl(this,e,t),G(this,e,e=>{this.j._attachStringVectorListener(e)})}attachProtoListener(e,t,n){el(this,e,t),G(this,e,e=>{this.j._attachProtoListener(e,n||!1)})}attachProtoVectorListener(e,t,n){tl(this,e,t),G(this,e,e=>{this.j._attachProtoVectorListener(e,n||!1)})}attachAudioListener(e,t,n){this.j._attachAudioListener||console.warn(`Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?`),el(this,e,(e,n)=>{e=new Float32Array(e.buffer,e.byteOffset,e.length/4),t(e,n)}),G(this,e,e=>{this.j._attachAudioListener(e,n||!1)})}finishProcessing(){this.j._waitUntilIdle()}closeGraph(){this.j._closeGraph(),this.j.simpleListeners=void 0,this.j.emptyPacketListeners=void 0}};function rl(e){return class extends e{get qa(){return this.j}Ta(){if(typeof this.qa._mediapipeLoggerGetEncodedApiKey==`function`){let e=this.qa._mediapipeLoggerGetEncodedApiKey();return this.qa._decodeBase64(e)}}}}function il(e){return class extends e{ab(){this.j._registerModelResourcesGraphService()}}}var al=rl(il(nl)),ol=class extends al{};async function sl(e,t,n,r){return e=await(async(e,t,n,r,i)=>{if(t&&await Xc(t),!self.ModuleFactory||n&&(await Xc(n),!self.ModuleFactory))throw Error(`ModuleFactory not set.`);return self.Module&&i&&((t=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(t.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new e(i,r)})(e,n.wasmLoaderPath,n.assetLoaderPath,t,{locateFile:e=>e.endsWith(`.wasm`)?n.wasmBinaryPath.toString():n.assetBinaryPath&&e.endsWith(`.data`)?n.assetBinaryPath.toString():e}),function(e,t){t=t.runningMode??``;var n=e.h.Ta();e.o=new Jc(e.D(),t,n)}(e,r),await e.A(r),e}async function cl(e,t,n,r){return sl(e,t,n,r)}function ll(e,t,n){try{e.h.j.FS_unlink(`/${n}`)}catch{}e.h.j.FS_createDataFile(`/`,n,t,!0,!1,!1),ul(e,`/${n}`)}function ul(e,t){var n=x(e.baseOptions,ss,1)||new ss;typeof t==`string`?(y(n,2,tn(t)),y(n,1)):t instanceof Uint8Array&&(y(n,1,Ze(t,!1)),y(n,2)),S(e.baseOptions,0,1,n)}function dl(e){try{let t=e.L.length;if(t===1)throw Error(e.L[0].message);if(t>1)throw Error(`Encountered multiple errors: `+e.L.map(e=>e.message).join(`, `))}finally{e.L=[]}}function K(e,t){e.J=Math.max(e.J,t)}function fl(e,t){e.F=new To,br(e.F,2,`PassThroughCalculator`),z(e.F,`free_memory`),B(e.F,`free_memory_unused_out`),V(t,`free_memory`),ko(t,e.F)}function pl(e,t){z(e.F,t),B(e.F,t+`_unused_out`)}function ml(e){e.h.addBoolToStream(!0,`free_memory`,e.J)}var hl=class{constructor(e){this.h=e,this.L=[],this.J=0,this.h.setAutoRenderToScreen(!1)}l(e,t=!0,n=!1,r=!1){if(t){let t=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error(`Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer`);if(!(x(this.baseOptions,ss,1)?.h()||x(this.baseOptions,ss,1)?.l()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error(`Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set`);(function(e,t,n=!1){var r=x(e.baseOptions,as,3);if(!r){var i=r=new as,a=new yo;lr(i,4,os,a)}`delegate`in t&&(t.delegate===`GPU`?(t=r,i=new fo,lr(t,2,os,i)):(t=r,i=new yo,lr(t,4,os,i))),n&&(n=r.l(),t=r.h()||!0===n?.h(),n=new go,t?S(n,0,9,t=new ho):S(n,0,8,t=new mo),lr(r,6,os,n)),S(e.baseOptions,0,3,r)})(this,t,r);let i=n?`model.litertlm`:`model.dat`;if(t.modelAssetPath)return fetch(t.modelAssetPath.toString()).then(e=>{if(e.ok)return e.arrayBuffer();throw Error(`Failed to fetch model: ${t.modelAssetPath} (${e.status})`)}).then(e=>{ll(this,new Uint8Array(e),i),this.u(),this.M()});if(t.modelAssetBuffer instanceof Uint8Array)n?ll(this,t.modelAssetBuffer,i):ul(this,t.modelAssetBuffer);else if(t.modelAssetBuffer)return async function(e){for(var t=[],n=0;;){let{done:r,value:i}=await e.read();if(r)break;t.push(i),n+=i.length}if(t.length===0)return new Uint8Array;if(t.length===1)return t[0];e=new Uint8Array(n),n=0;for(let r of t)e.set(r,n),n+=r.length;return e}(t.modelAssetBuffer).then(e=>{n?ll(this,e,i):ul(this,e),this.u(),this.M()})}return this.u(),this.M(),Promise.resolve()}M(){}ka(){var e;if(this.h.ka(t=>{e=Mo(t)}),!e)throw Error(`Failed to retrieve CalculatorGraphConfig`);return e}setGraph(e,t){this.h.attachErrorListener((e,t)=>{this.L.push(Error(t))}),this.h.ab(),this.h.setGraph(e,t),this.o?.za(),this.F=void 0,dl(this)}finishProcessing(e){this.h.finishProcessing(),dl(this),this.o&&e!==void 0&&this.o.Aa(e)}close(){this.F=void 0,this.o?.ya(),this.o?.close(),this.h.closeGraph()}};function q(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}hl.prototype.close=hl.prototype.close;var gl=class{constructor(e,t,n,r){this.h=e,this.i=t,this.o=n,this.l=r}bind(){this.h.bindVertexArray(this.i)}close(){this.h.deleteVertexArray(this.i),this.h.deleteBuffer(this.o),this.h.deleteBuffer(this.l)}};function _l(e,t,n){var r=e.h;if(n=q(r.createShader(n),`Failed to create WebGL shader`),r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(e.i,n),n}function vl(e,t){var n=e.h,r=q(n.createVertexArray(),`Failed to create vertex array`);n.bindVertexArray(r);var i=q(n.createBuffer(),`Failed to create buffer`);n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(e.G),n.vertexAttribPointer(e.G,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);var a=q(n.createBuffer(),`Failed to create buffer`);return n.bindBuffer(n.ARRAY_BUFFER,a),n.enableVertexAttribArray(e.L),n.vertexAttribPointer(e.L,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(t?[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 gl(n,r,i,a)}function yl(e,t){if(e.h){if(t!==e.h)throw Error(`Cannot change GL context once initialized`)}else e.h=t}function bl(e,t,n,r){return yl(e,t),e.i||(e.o(),e.J()),n?(e.m||(e.m=vl(e,!0)),n=e.m):(e.F||(e.F=vl(e,!1)),n=e.F),t.useProgram(e.i),n.bind(),e.l(),e=r(),n.h.bindVertexArray(null),e}function xl(e,t,n){return yl(e,t),e=q(t.createTexture(),`Failed to create texture`),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function Sl(e,t,n){yl(e,t),e.D||=q(t.createFramebuffer(),`Failed to create framebuffe.`),t.bindFramebuffer(t.FRAMEBUFFER,e.D),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)}function Cl(e){e.h?.bindFramebuffer(e.h.FRAMEBUFFER,null)}var wl=class{C(){return`
2
- precision mediump float;
3
- varying vec2 vTex;
4
- uniform sampler2D inputTexture;
5
- void main() {
6
- gl_FragColor = texture2D(inputTexture, vTex);
7
- }
8
- `}o(){var e=this.h;if(this.i=q(e.createProgram(),`Failed to create WebGL program`),this.ea=_l(this,`
9
- attribute vec2 aVertex;
10
- attribute vec2 aTex;
11
- varying vec2 vTex;
12
- void main(void) {
13
- gl_Position = vec4(aVertex, 0.0, 1.0);
14
- vTex = aTex;
15
- }`,e.VERTEX_SHADER),this.aa=_l(this,this.C(),e.FRAGMENT_SHADER),e.linkProgram(this.i),!e.getProgramParameter(this.i,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.i)}`);this.G=e.getAttribLocation(this.i,`aVertex`),this.L=e.getAttribLocation(this.i,`aTex`)}J(){}l(){}close(){if(this.i){let e=this.h;e.deleteProgram(this.i),e.deleteShader(this.ea),e.deleteShader(this.aa)}this.D&&this.h.deleteFramebuffer(this.D),this.F&&this.F.close(),this.m&&this.m.close()}},Tl=class extends wl{C(){return`
16
- precision mediump float;
17
- uniform sampler2D backgroundTexture;
18
- uniform sampler2D maskTexture;
19
- uniform sampler2D colorMappingTexture;
20
- varying vec2 vTex;
21
- void main() {
22
- vec4 backgroundColor = texture2D(backgroundTexture, vTex);
23
- float category = texture2D(maskTexture, vTex).r;
24
- vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));
25
- gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);
26
- }
27
- `}J(){var e=this.h;e.activeTexture(e.TEXTURE1),this.v=xl(this,e,e.LINEAR),e.activeTexture(e.TEXTURE2),this.u=xl(this,e,e.NEAREST)}o(){super.o();var e=this.h;this.P=q(e.getUniformLocation(this.i,`backgroundTexture`),`Uniform location`),this.Z=q(e.getUniformLocation(this.i,`colorMappingTexture`),`Uniform location`),this.M=q(e.getUniformLocation(this.i,`maskTexture`),`Uniform location`)}l(){super.l();var e=this.h;e.uniform1i(this.M,0),e.uniform1i(this.P,1),e.uniform1i(this.Z,2)}close(){this.v&&this.h.deleteTexture(this.v),this.u&&this.h.deleteTexture(this.u),super.close()}},El=class extends wl{C(){return`
28
- precision mediump float;
29
- uniform sampler2D maskTexture;
30
- uniform sampler2D defaultTexture;
31
- uniform sampler2D overlayTexture;
32
- varying vec2 vTex;
33
- void main() {
34
- float confidence = texture2D(maskTexture, vTex).r;
35
- vec4 defaultColor = texture2D(defaultTexture, vTex);
36
- vec4 overlayColor = texture2D(overlayTexture, vTex);
37
- // Apply the alpha from the overlay and merge in the default color
38
- overlayColor = mix(defaultColor, overlayColor, overlayColor.a);
39
- gl_FragColor = mix(defaultColor, overlayColor, confidence);
40
- }
41
- `}J(){var e=this.h;e.activeTexture(e.TEXTURE1),this.u=xl(this,e),e.activeTexture(e.TEXTURE2),this.v=xl(this,e)}o(){super.o();var e=this.h;this.M=q(e.getUniformLocation(this.i,`defaultTexture`),`Uniform location`),this.P=q(e.getUniformLocation(this.i,`overlayTexture`),`Uniform location`),this.K=q(e.getUniformLocation(this.i,`maskTexture`),`Uniform location`)}l(){super.l();var e=this.h;e.uniform1i(this.K,0),e.uniform1i(this.M,1),e.uniform1i(this.P,2)}close(){this.u&&this.h.deleteTexture(this.u),this.v&&this.h.deleteTexture(this.v),super.close()}};function Dl(e,t){switch(t){case 0:return e.h.find(e=>e instanceof Uint8Array);case 1:return e.h.find(e=>e instanceof Float32Array);case 2:return e.h.find(e=>typeof WebGLTexture<`u`&&e instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function Ol(e){var t=Dl(e,1);if(!t){if(t=Dl(e,0))t=new Float32Array(t).map(e=>e/255);else{t=new Float32Array(e.width*e.height);let r=Al(e);var n=Ml(e);if(Sl(n,r,kl(e)),`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(e.width*e.height*4),r.readPixels(0,0,e.width,e.height,r.RGBA,r.FLOAT,n);for(let e=0,r=0;e<t.length;++e,r+=4)t[e]=n[r]}else r.readPixels(0,0,e.width,e.height,r.RED,r.FLOAT,t)}e.h.push(t)}return t}function kl(e){var t=Dl(e,2);if(!t){let n=Al(e);t=Nl(e);let r=Ol(e),i=jl(e);n.texImage2D(n.TEXTURE_2D,0,i,e.width,e.height,0,n.RED,n.FLOAT,r),Pl(e)}return t}function Al(e){if(!e.canvas)throw Error(`Conversion to different image formats require that a canvas is passed when initializing the image.`);return e.i||=q(e.canvas.getContext(`webgl2`),`You cannot use a canvas that is already bound to a different type of rendering context.`),e.i}function jl(e){if(e=Al(e),!Fl){if(e.getExtension(`EXT_color_buffer_float`)&&e.getExtension(`OES_texture_float_linear`)&&e.getExtension(`EXT_float_blend`))Fl=e.R32F;else{if(!e.getExtension(`EXT_color_buffer_half_float`))throw Error(`GPU does not fully support 4-channel float32 or float16 formats`);Fl=e.R16F}}return Fl}function Ml(e){return e.l||=new wl,e.l}function Nl(e){var t=Al(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);var n=Dl(e,2);return n||(n=xl(Ml(e),t,e.o?t.LINEAR:t.NEAREST),e.h.push(n),e.u=!0),t.bindTexture(t.TEXTURE_2D,n),n}function Pl(e){e.i.bindTexture(e.i.TEXTURE_2D,null)}var Fl,J=class{constructor(e,t,n,r,i,a,o){this.h=e,this.o=t,this.u=n,this.canvas=r,this.l=i,this.width=a,this.height=o,this.u&&--Il===0&&console.error(`You seem to be creating MPMask instances without invoking .close(). This leaks resources.`)}Va(){return!!Dl(this,0)}va(){return!!Dl(this,1)}X(){return!!Dl(this,2)}ua(){return(t=Dl(e=this,0))||(t=Ol(e),t=new Uint8Array(t.map(e=>Math.round(255*e))),e.h.push(t)),t;var e,t}ta(){return Ol(this)}T(){return kl(this)}clone(){var e=[];for(let t of this.h){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{let e=Al(this),t=Ml(this);e.activeTexture(e.TEXTURE1),n=xl(t,e,this.o?e.LINEAR:e.NEAREST),e.bindTexture(e.TEXTURE_2D,n);let r=jl(this);e.texImage2D(e.TEXTURE_2D,0,r,this.width,this.height,0,e.RED,e.FLOAT,null),e.bindTexture(e.TEXTURE_2D,null),Sl(t,e,n),bl(t,e,!1,()=>{Nl(this),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),Pl(this)}),Cl(t),Pl(this)}}e.push(n)}return new J(e,this.o,this.X(),this.canvas,this.l,this.width,this.height)}close(){this.u&&Al(this).deleteTexture(Dl(this,2)),Il=-1}};J.prototype.close=J.prototype.close,J.prototype.clone=J.prototype.clone,J.prototype.getAsWebGLTexture=J.prototype.T,J.prototype.getAsFloat32Array=J.prototype.ta,J.prototype.getAsUint8Array=J.prototype.ua,J.prototype.hasWebGLTexture=J.prototype.X,J.prototype.hasFloat32Array=J.prototype.va,J.prototype.hasUint8Array=J.prototype.Va;var Il=250,Ll={color:`white`,lineWidth:4,radius:6};function Rl(e){return{...Ll,fillColor:(e||={}).color,...e}}function zl(e,t){return e instanceof Function?e(t):e}function Bl(e,t,n){return Math.max(Math.min(t,n),Math.min(Math.max(t,n),e))}function Vl(e){if(!e.l)throw Error(`CPU rendering requested but CanvasRenderingContext2D not provided.`);return e.l}function Hl(e){if(!e.u)throw Error(`GPU rendering requested but WebGL2RenderingContext not provided.`);return e.u}function Ul(e,t,n){if(t.X())n(t.T());else{let r=t.va()?t.ta():t.ua();e.o=e.o??new wl;let i=Hl(e);n((e=new J([r],t.o,!1,i.canvas,e.o,t.width,t.height)).T()),e.close()}}function Wl(e,t,n,r){var i=function(e){return e.h||=new Tl,e.h}(e),a=Hl(e),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;bl(i,a,!0,()=>{(function(e,t,n,r){var i=e.h;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,e.v),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),e.K&&function(e,t){if(e!==t)return!1;e=e.entries(),t=t.entries();for(let[n,r]of e){e=n;let i=r,a=t.next();if(a.done)return!1;let[o,s]=a.value;if(e!==o||i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2]||i[3]!==s[3])return!1}return!!t.next().done}(e.K,r))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,e.u);else{e.K=r;let t=Array(1024).fill(0);r.forEach((e,n)=>{if(e.length!==4)throw Error(`Color at index ${n} is not a four-channel value.`);t[4*n]=e[0],t[4*n+1]=e[1],t[4*n+2]=e[2],t[4*n+3]=e[3]}),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,e.u),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(t))}})(i,t,o,r),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.drawArrays(a.TRIANGLE_FAN,0,4);var e=i.h;e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,null)})}function Gl(e,t,n,r){var i=Hl(e),a=function(e){return e.i||=new El,e.i}(e),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n,s=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;bl(a,i,!0,()=>{var e=a.h;e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,a.u),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,a.v),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,s),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),(e=a.h).activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,null)})}var Kl=class{constructor(e,t){typeof CanvasRenderingContext2D<`u`&&e instanceof CanvasRenderingContext2D||e instanceof OffscreenCanvasRenderingContext2D?(this.l=e,this.u=t):this.u=e}Na(e,t){if(e){var n=Vl(this);t=Rl(t),n.save();var r=n.canvas,i=0;for(let a of e)n.fillStyle=zl(t.fillColor,{index:i,from:a}),n.strokeStyle=zl(t.color,{index:i,from:a}),n.lineWidth=zl(t.lineWidth,{index:i,from:a}),(e=new Path2D).arc(a.x*r.width,a.y*r.height,zl(t.radius,{index:i,from:a}),0,2*Math.PI),n.fill(e),n.stroke(e),++i;n.restore()}}Ma(e,t,n){if(e&&t){var r=Vl(this);n=Rl(n),r.save();var i=r.canvas,a=0;for(let o of t){r.beginPath(),t=e[o.start];let s=e[o.end];t&&s&&(r.strokeStyle=zl(n.color,{index:a,from:t,to:s}),r.lineWidth=zl(n.lineWidth,{index:a,from:t,to:s}),r.moveTo(t.x*i.width,t.y*i.height),r.lineTo(s.x*i.width,s.y*i.height)),++a,r.stroke()}r.restore()}}Ja(e,t){var n=Vl(this);t=Rl(t),n.save(),n.beginPath(),n.lineWidth=zl(t.lineWidth,{}),n.strokeStyle=zl(t.color,{}),n.fillStyle=zl(t.fillColor,{}),n.moveTo(e.originX,e.originY),n.lineTo(e.originX+e.width,e.originY),n.lineTo(e.originX+e.width,e.originY+e.height),n.lineTo(e.originX,e.originY+e.height),n.lineTo(e.originX,e.originY),n.stroke(),n.fill(),n.restore()}Ka(e,t,n=[0,0,0,255]){this.l?function(e,t,n,r){var i=Hl(e);Ul(e,t,t=>{Wl(e,t,n,r),(t=Vl(e)).drawImage(i.canvas,0,0,t.canvas.width,t.canvas.height)})}(this,e,n,t):Wl(this,e.T(),n,t)}La(e,t,n){this.l?function(e,t,n,r){var i=Hl(e);Ul(e,t,t=>{Gl(e,t,n,r),(t=Vl(e)).drawImage(i.canvas,0,0,t.canvas.width,t.canvas.height)})}(this,e,t,n):Gl(this,e.T(),t,n)}close(){this.h?.close(),this.h=void 0,this.i?.close(),this.i=void 0,this.o?.close(),this.o=void 0}};function ql(e,t){switch(t){case 0:return e.h.find(e=>e instanceof ImageData);case 1:return e.h.find(e=>typeof ImageBitmap<`u`&&e instanceof ImageBitmap);case 2:return e.h.find(e=>typeof WebGLTexture<`u`&&e instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function Jl(e){var t=ql(e,0);if(!t){t=Xl(e);let n=Zl(e),r=new Uint8Array(e.width*e.height*4);Sl(n,t,Yl(e)),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,r),Cl(n),t=new ImageData(new Uint8ClampedArray(r.buffer),e.width,e.height),e.h.push(t)}return t}function Yl(e){var t=ql(e,2);if(!t){let n=Xl(e);t=Ql(e);let r=ql(e,1)||Jl(e);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),$l(e)}return t}function Xl(e){if(!e.canvas)throw Error(`Conversion to different image formats require that a canvas is passed when initializing the image.`);return e.i||=q(e.canvas.getContext(`webgl2`),`You cannot use a canvas that is already bound to a different type of rendering context.`),e.i}function Zl(e){return e.l||=new wl,e.l}function Ql(e){var t=Xl(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);var n=ql(e,2);return n||(n=xl(Zl(e),t),e.h.push(n),e.o=!0),t.bindTexture(t.TEXTURE_2D,n),n}function $l(e){e.i.bindTexture(e.i.TEXTURE_2D,null)}function eu(e){var t=Xl(e);return bl(Zl(e),t,!0,()=>function(e,t){var n=e.canvas;if(n.width===e.width&&n.height===e.height)return t();var r=n.width,i=n.height;return n.width=e.width,n.height=e.height,e=t(),n.width=r,n.height=i,e}(e,()=>{if(t.bindFramebuffer(t.FRAMEBUFFER,null),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),!(e.canvas instanceof OffscreenCanvas))throw Error(`Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas`);return e.canvas.transferToImageBitmap()}))}Kl.prototype.close=Kl.prototype.close,Kl.prototype.drawConfidenceMask=Kl.prototype.La,Kl.prototype.drawCategoryMask=Kl.prototype.Ka,Kl.prototype.drawBoundingBox=Kl.prototype.Ja,Kl.prototype.drawConnectors=Kl.prototype.Ma,Kl.prototype.drawLandmarks=Kl.prototype.Na,Kl.lerp=function(e,t,n,r,i){return Bl(r*(1-(e-t)/(n-t))+i*(1-(n-e)/(n-t)),r,i)},Kl.clamp=Bl;var Y=class{constructor(e,t,n,r,i,a,o){this.h=e,this.u=t,this.o=n,this.canvas=r,this.l=i,this.width=a,this.height=o,(this.u||this.o)&&--tu===0&&console.error(`You seem to be creating MPImage instances without invoking .close(). This leaks resources.`)}Ua(){return!!ql(this,0)}wa(){return!!ql(this,1)}X(){return!!ql(this,2)}Ra(){return Jl(this)}Qa(){var e=ql(this,1);return e||(Yl(this),Ql(this),e=eu(this),$l(this),this.h.push(e),this.u=!0),e}T(){return Yl(this)}clone(){var e=[];for(let t of this.h){let n;if(t instanceof ImageData)n=new ImageData(t.data,this.width,this.height);else if(t instanceof WebGLTexture){let e=Xl(this),t=Zl(this);e.activeTexture(e.TEXTURE1),n=xl(t,e),e.bindTexture(e.TEXTURE_2D,n),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,null),e.bindTexture(e.TEXTURE_2D,null),Sl(t,e,n),bl(t,e,!1,()=>{Ql(this),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),$l(this)}),Cl(t),$l(this)}else{if(!(t instanceof ImageBitmap))throw Error(`Type is not supported: ${t}`);Yl(this),Ql(this),n=eu(this),$l(this)}e.push(n)}return new Y(e,this.wa(),this.X(),this.canvas,this.l,this.width,this.height)}close(){this.u&&ql(this,1).close(),this.o&&Xl(this).deleteTexture(ql(this,2)),tu=-1}};Y.prototype.close=Y.prototype.close,Y.prototype.clone=Y.prototype.clone,Y.prototype.getAsWebGLTexture=Y.prototype.T,Y.prototype.getAsImageBitmap=Y.prototype.Qa,Y.prototype.getAsImageData=Y.prototype.Ra,Y.prototype.hasWebGLTexture=Y.prototype.X,Y.prototype.hasImageBitmap=Y.prototype.wa,Y.prototype.hasImageData=Y.prototype.Ua;var tu=250;function nu(...e){return e.map(([e,t])=>({start:e,end:t}))}var ru,iu=il((ru=rl(nl),class extends ru{get pa(){return this.j}Ea(e,t,n){G(this,t,t=>{var[r,i]=Qc(this,e,t);this.pa._addBoundTextureAsImageToStream(t,r,i,n)})}ha(e,t){el(this,e,t),G(this,e,e=>{this.pa._attachImageListener(e)})}ia(e,t){tl(this,e,t),G(this,e,e=>{this.pa._attachImageVectorListener(e)})}})),au=class extends iu{};async function X(e,t,n){return cl(e,n.canvas??(Yc()?void 0:document.createElement(`canvas`)),t,n)}function ou(e,t,n,r){if(e.o&&r!==void 0){var i=x(e.baseOptions,as,3);i?.h()||i?.l()?.h()?(++(i=e.o).h.U,i.i.set(r,performance.now())):(++(i=e.o).h.R,i.i.set(r,performance.now()))}if(e.ra){if(i=new qo,n?.regionOfInterest){if(!e.Da)throw Error(`This task doesn't support region-of-interest.`);var a=n.regionOfInterest;if(a.left>=a.right||a.top>=a.bottom)throw Error(`Expected RectF with left < right and top < bottom.`);if(a.left<0||a.top<0||a.right>1||a.bottom>1)throw Error(`Expected RectF values to be in [0,1].`);w(i,1,(a.left+a.right)/2),w(i,2,(a.top+a.bottom)/2),w(i,4,a.right-a.left),w(i,3,a.bottom-a.top)}else w(i,1,.5),w(i,2,.5),w(i,4,1),w(i,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error(`Expected rotation to be a multiple of 90°.`);if(w(i,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){let[e,r]=Zc(t);n=C(i,3)*r/e,a=C(i,4)*e/r,w(i,4,n),w(i,3,a)}}e.h.addProtoToStream(i.h(),`mediapipe.NormalizedRect`,e.ra,r)}e.h.Ea(t,e.Ca,r??performance.now()),e.finishProcessing(r)}function su(e,t,n){if(e.K)throw Error(`Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.`);ou(e,t,n,e.J+1)}function cu(e,t,n,r){if(!e.K)throw Error(`Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.`);ou(e,t,n,r)}function lu(e,t,n,r){var i=t.data,a=t.width,o=a*(t=t.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error(`Unsupported channel count: `+i.length/o);return e=new J([i],n,!1,e.h.j.canvas,e.ea,a,t),r?e.clone():e}var uu=class extends hl{constructor(e,t,n,r){super(e),this.h=e,this.Ca=t,this.ra=n,this.Da=r,this.ea=new wl,this.K=!1}l(e,t=!0,n=!1,r=!1){if(`runningMode`in e){var i=this.K=!!e.runningMode&&e.runningMode!==`IMAGE`;y(this.baseOptions,2,i==null?i:It(i))}if(e.canvas!==void 0&&this.h.j.canvas!==e.canvas)throw Error(`You must create a new task to reset the canvas.`);return super.l(e,t,n,r)}close(){this.ea.close(),super.close()}};uu.prototype.close=uu.prototype.close;var du=class extends uu{constructor(e,t){super(new au(e,t),`image_in`,`norm_rect_in`,!1),this.m={detections:[]},S(e=this.i=new us,0,1,t=new U),w(this.i,2,.5),w(this.i,3,.3)}D(){return`FaceDetector`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`minDetectionConfidence`in e&&w(this.i,2,e.minDetectionConfidence??.5),`minSuppressionThreshold`in e&&w(this.i,3,e.minSuppressionThreshold??.3),this.l(e)}H(e,t){return this.m={detections:[]},su(this,e,t),this.m}I(e,t,n){return this.m={detections:[]},cu(this,e,n,t),this.m}u(){var e=new Ao;V(e,`image_in`),V(e,`norm_rect_in`),H(e,`detections`);var t=new Co;zi(t,fs,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.face_detector.FaceDetectorGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect_in`),B(n,`DETECTIONS:detections`),n.A(t),ko(e,n),this.h.attachProtoVectorListener(`detections`,(e,t)=>{for(let t of e)e=Bo(t),this.m.detections.push(uc(e));K(this,t)}),this.h.attachEmptyPacketListener(`detections`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};du.prototype.detectForVideo=du.prototype.I,du.prototype.detect=du.prototype.H,du.prototype.setOptions=du.prototype.A,du.createFromModelPath=async function(e,t){return X(du,e,{baseOptions:{modelAssetPath:t}})},du.createFromModelBuffer=function(e,t){return X(du,e,{baseOptions:{modelAssetBuffer:t}})},du.createFromOptions=function(e,t){return X(du,e,t)};var fu=nu([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]),pu=nu([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]),mu=nu([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),hu=nu([474,475],[475,476],[476,477],[477,474]),gu=nu([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]),_u=nu([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),vu=nu([469,470],[470,471],[471,472],[472,469]),yu=nu([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]),bu=[...fu,...pu,...mu,...gu,..._u,...yu],xu=nu([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 Su(e){e.m={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Z=class extends uu{constructor(e,t){super(new au(e,t),`image_in`,`norm_rect`,!1),this.m={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,S(e=this.i=new hs,0,1,t=new U),this.C=new ms,S(this.i,0,3,this.C),this.v=new us,S(this.i,0,2,this.v),gr(this.v,4,1),w(this.v,2,.5),w(this.C,2,.5),w(this.i,4,.5)}D(){return`FaceLandmarker`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`numFaces`in e&&gr(this.v,4,e.numFaces??1),`minFaceDetectionConfidence`in e&&w(this.v,2,e.minFaceDetectionConfidence??.5),`minTrackingConfidence`in e&&w(this.i,4,e.minTrackingConfidence??.5),`minFacePresenceConfidence`in e&&w(this.C,2,e.minFacePresenceConfidence??.5),`outputFaceBlendshapes`in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),`outputFacialTransformationMatrixes`in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}H(e,t){return Su(this),su(this,e,t),this.m}I(e,t,n){return Su(this),cu(this,e,n,t),this.m}u(){var e=new Ao;V(e,`image_in`),V(e,`norm_rect`),H(e,`face_landmarks`);var t=new Co;zi(t,_s,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`NORM_LANDMARKS:face_landmarks`),n.A(t),ko(e,n),this.h.attachProtoVectorListener(`face_landmarks`,(e,t)=>{for(let t of e)e=Wo(t),this.m.faceLandmarks.push(dc(e));K(this,t)}),this.h.attachEmptyPacketListener(`face_landmarks`,e=>{K(this,e)}),this.outputFaceBlendshapes&&(H(e,`blendshapes`),B(n,`BLENDSHAPES:blendshapes`),this.h.attachProtoVectorListener(`blendshapes`,(e,t)=>{if(this.outputFaceBlendshapes)for(let t of e)e=Io(t),this.m.faceBlendshapes.push(cc(e.h()??[]));K(this,t)}),this.h.attachEmptyPacketListener(`blendshapes`,e=>{K(this,e)})),this.outputFacialTransformationMatrixes&&(H(e,`face_geometry`),B(n,`FACE_GEOMETRY:face_geometry`),this.h.attachProtoVectorListener(`face_geometry`,(e,t)=>{if(this.outputFacialTransformationMatrixes)for(let t of e)(e=x(e=ps(t),Go,2))&&this.m.facialTransformationMatrixes.push({rows:pr(e,1)??0??0,columns:pr(e,2)??0??0,data:Gn(e,3,Ft,Wn()).slice()??[]});K(this,t)}),this.h.attachEmptyPacketListener(`face_geometry`,e=>{K(this,e)})),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Z.prototype.detectForVideo=Z.prototype.I,Z.prototype.detect=Z.prototype.H,Z.prototype.setOptions=Z.prototype.A,Z.createFromModelPath=function(e,t){return X(Z,e,{baseOptions:{modelAssetPath:t}})},Z.createFromModelBuffer=function(e,t){return X(Z,e,{baseOptions:{modelAssetBuffer:t}})},Z.createFromOptions=function(e,t){return X(Z,e,t)},Z.FACE_LANDMARKS_LIPS=fu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS`,Z.FACE_LANDMARKS_LIPS),Z.FACE_LANDMARKS_LEFT_EYE=pu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE`,Z.FACE_LANDMARKS_LEFT_EYE),Z.FACE_LANDMARKS_LEFT_EYEBROW=mu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW`,Z.FACE_LANDMARKS_LEFT_EYEBROW),Z.FACE_LANDMARKS_LEFT_IRIS=hu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS`,Z.FACE_LANDMARKS_LEFT_IRIS),Z.FACE_LANDMARKS_RIGHT_EYE=gu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE`,Z.FACE_LANDMARKS_RIGHT_EYE),Z.FACE_LANDMARKS_RIGHT_EYEBROW=_u,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW`,Z.FACE_LANDMARKS_RIGHT_EYEBROW),Z.FACE_LANDMARKS_RIGHT_IRIS=vu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS`,Z.FACE_LANDMARKS_RIGHT_IRIS),Z.FACE_LANDMARKS_FACE_OVAL=yu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL`,Z.FACE_LANDMARKS_FACE_OVAL),Z.FACE_LANDMARKS_CONTOURS=bu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS`,Z.FACE_LANDMARKS_CONTOURS),Z.FACE_LANDMARKS_TESSELATION=xu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION`,Z.FACE_LANDMARKS_TESSELATION);var Cu=nu([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 wu(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function Tu(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function Eu(e,t=!0){var n=[];for(let i of e){var r=Io(i);e=[];for(let n of r.h())r=t&&pr(n,1)!=null?pr(n,1)??0:-1,e.push({score:C(n,2)??0,index:r,categoryName:_(v(n,3))??``??``,displayName:_(v(n,4))??``??``});n.push(e)}return n}var Du=class extends uu{constructor(e,t){super(new au(e,t),`image_in`,`norm_rect`,!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],S(e=this.m=new ws,0,1,t=new U),this.v=new Cs,S(this.m,0,2,this.v),this.G=new Ss,S(this.v,0,3,this.G),this.C=new xs,S(this.v,0,2,this.C),this.i=new bs,S(this.m,0,3,this.i),w(this.C,2,.5),w(this.v,4,.5),w(this.G,2,.5)}D(){return`GestureRecognizer`}get baseOptions(){return x(this.m,U,1)}set baseOptions(e){S(this.m,0,1,e)}A(e){if(gr(this.C,3,e.numHands??1),`minHandDetectionConfidence`in e&&w(this.C,2,e.minHandDetectionConfidence??.5),`minTrackingConfidence`in e&&w(this.v,4,e.minTrackingConfidence??.5),`minHandPresenceConfidence`in e&&w(this.G,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new vs,n=t,r=oc(e.cannedGesturesClassifierOptions,x(this.i,vs,3)?.l());S(n,0,2,r),S(this.i,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&x(this.i,vs,3)?.h();return e.customGesturesClassifierOptions?(S(n=t=new vs,0,2,r=oc(e.customGesturesClassifierOptions,x(this.i,vs,4)?.l())),S(this.i,0,4,t)):e.customGesturesClassifierOptions===void 0&&x(this.i,vs,4)?.h(),this.l(e)}Ya(e,t){return wu(this),su(this,e,t),Tu(this)}Za(e,t,n){return wu(this),cu(this,e,n,t),Tu(this)}u(){var e=new Ao;V(e,`image_in`),V(e,`norm_rect`),H(e,`hand_gestures`),H(e,`hand_landmarks`),H(e,`world_hand_landmarks`),H(e,`handedness`);var t=new Co;zi(t,ks,this.m);var n=new To;br(n,2,`mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`HAND_GESTURES:hand_gestures`),B(n,`LANDMARKS:hand_landmarks`),B(n,`WORLD_LANDMARKS:world_hand_landmarks`),B(n,`HANDEDNESS:handedness`),n.A(t),ko(e,n),this.h.attachProtoVectorListener(`hand_landmarks`,(e,t)=>{for(let t of e)e=Wo(t),this.landmarks.push(dc(e));K(this,t)}),this.h.attachEmptyPacketListener(`hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`world_hand_landmarks`,(e,t)=>{for(let t of e)e=Ho(t),this.worldLandmarks.push(fc(e));K(this,t)}),this.h.attachEmptyPacketListener(`world_hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`hand_gestures`,(e,t)=>{this.gestures.push(...Eu(e,!1)),K(this,t)}),this.h.attachEmptyPacketListener(`hand_gestures`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`handedness`,(e,t)=>{this.handedness.push(...Eu(e)),K(this,t)}),this.h.attachEmptyPacketListener(`handedness`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};function Ou(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}Du.prototype.recognizeForVideo=Du.prototype.Za,Du.prototype.recognize=Du.prototype.Ya,Du.prototype.setOptions=Du.prototype.A,Du.createFromModelPath=function(e,t){return X(Du,e,{baseOptions:{modelAssetPath:t}})},Du.createFromModelBuffer=function(e,t){return X(Du,e,{baseOptions:{modelAssetBuffer:t}})},Du.createFromOptions=function(e,t){return X(Du,e,t)},Du.HAND_CONNECTIONS=Cu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS`,Du.HAND_CONNECTIONS);var Q=class extends uu{constructor(e,t){super(new au(e,t),`image_in`,`norm_rect`,!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],S(e=this.i=new Cs,0,1,t=new U),this.v=new Ss,S(this.i,0,3,this.v),this.m=new xs,S(this.i,0,2,this.m),gr(this.m,3,1),w(this.m,2,.5),w(this.v,2,.5),w(this.i,4,.5)}D(){return`HandLandmarker`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`numHands`in e&&gr(this.m,3,e.numHands??1),`minHandDetectionConfidence`in e&&w(this.m,2,e.minHandDetectionConfidence??.5),`minTrackingConfidence`in e&&w(this.i,4,e.minTrackingConfidence??.5),`minHandPresenceConfidence`in e&&w(this.v,2,e.minHandPresenceConfidence??.5),this.l(e)}H(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],su(this,e,t),Ou(this)}I(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],cu(this,e,n,t),Ou(this)}u(){var e=new Ao;V(e,`image_in`),V(e,`norm_rect`),H(e,`hand_landmarks`),H(e,`world_hand_landmarks`),H(e,`handedness`);var t=new Co;zi(t,As,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`LANDMARKS:hand_landmarks`),B(n,`WORLD_LANDMARKS:world_hand_landmarks`),B(n,`HANDEDNESS:handedness`),n.A(t),ko(e,n),this.h.attachProtoVectorListener(`hand_landmarks`,(e,t)=>{for(let t of e)e=Wo(t),this.landmarks.push(dc(e));K(this,t)}),this.h.attachEmptyPacketListener(`hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`world_hand_landmarks`,(e,t)=>{for(let t of e)e=Ho(t),this.worldLandmarks.push(fc(e));K(this,t)}),this.h.attachEmptyPacketListener(`world_hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`handedness`,(e,t)=>{var n=this.handedness,r=n.push,i=[];for(let t of e){e=Io(t);let n=[];for(let t of e.h())n.push({score:C(t,2)??0,index:pr(t,1)??0??-1,categoryName:_(v(t,3))??``??``,displayName:_(v(t,4))??``??``});i.push(n)}r.call(n,...i),K(this,t)}),this.h.attachEmptyPacketListener(`handedness`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Q.prototype.detectForVideo=Q.prototype.I,Q.prototype.detect=Q.prototype.H,Q.prototype.setOptions=Q.prototype.A,Q.createFromModelPath=function(e,t){return X(Q,e,{baseOptions:{modelAssetPath:t}})},Q.createFromModelBuffer=function(e,t){return X(Q,e,{baseOptions:{modelAssetBuffer:t}})},Q.createFromOptions=function(e,t){return X(Q,e,t)},Q.HAND_CONNECTIONS=Cu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS`,Q.HAND_CONNECTIONS);var ku=nu([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 Au(e){e.i={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function ju(e){try{if(!e.G)return e.i;e.G(e.i)}finally{ml(e)}}function Mu(e,t){e=Wo(e),t.push(dc(e))}var $=class extends uu{constructor(e,t){super(new au(e,t),`input_frames_image`,null,!1),this.i={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,S(e=this.m=new Ps,0,1,t=new U),this.Z=new Ss,S(this.m,0,2,this.Z),this.Ba=new js,S(this.m,0,3,this.Ba),this.v=new us,S(this.m,0,4,this.v),this.P=new ms,S(this.m,0,5,this.P),this.C=new Ms,S(this.m,0,6,this.C),this.aa=new Ns,S(this.m,0,7,this.aa),w(this.v,2,.5),w(this.v,3,.3),w(this.P,2,.5),w(this.C,2,.5),w(this.C,3,.3),w(this.aa,2,.5),w(this.Z,2,.5)}D(){return`HolisticLandmarker`}get baseOptions(){return x(this.m,U,1)}set baseOptions(e){S(this.m,0,1,e)}A(e){return`minFaceDetectionConfidence`in e&&w(this.v,2,e.minFaceDetectionConfidence??.5),`minFaceSuppressionThreshold`in e&&w(this.v,3,e.minFaceSuppressionThreshold??.3),`minFacePresenceConfidence`in e&&w(this.P,2,e.minFacePresenceConfidence??.5),`outputFaceBlendshapes`in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),`minPoseDetectionConfidence`in e&&w(this.C,2,e.minPoseDetectionConfidence??.5),`minPoseSuppressionThreshold`in e&&w(this.C,3,e.minPoseSuppressionThreshold??.3),`minPosePresenceConfidence`in e&&w(this.aa,2,e.minPosePresenceConfidence??.5),`outputPoseSegmentationMasks`in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),`minHandLandmarksConfidence`in e&&w(this.Z,2,e.minHandLandmarksConfidence??.5),this.l(e)}H(e,t,n){var r=typeof t==`function`?{}:t;return this.G=typeof t==`function`?t:n,Au(this),su(this,e,r),ju(this)}I(e,t,n,r){var i=typeof n==`function`?{}:n;return this.G=typeof n==`function`?n:r,Au(this),cu(this,e,i,t),ju(this)}u(){var e=new Ao;V(e,`input_frames_image`),H(e,`pose_landmarks`),H(e,`pose_world_landmarks`),H(e,`face_landmarks`),H(e,`left_hand_landmarks`),H(e,`left_hand_world_landmarks`),H(e,`right_hand_landmarks`),H(e,`right_hand_world_landmarks`);var t=new Co,n=new no;br(n,1,`type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions`),function(e,t){if(t!=null){if(Array.isArray(t))y(e,2,wn(t,0,En));else{if(!(typeof t==`string`||t instanceof Se||_e(t)))throw Error(`invalid value in Any.value field: `+t+` expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array`);Qn(e,2,Ze(t,!1),ye())}}}(n,this.m.h());var r=new To;br(r,2,`mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph`),fr(r,8,no,n),z(r,`IMAGE:input_frames_image`),B(r,`POSE_LANDMARKS:pose_landmarks`),B(r,`POSE_WORLD_LANDMARKS:pose_world_landmarks`),B(r,`FACE_LANDMARKS:face_landmarks`),B(r,`LEFT_HAND_LANDMARKS:left_hand_landmarks`),B(r,`LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks`),B(r,`RIGHT_HAND_LANDMARKS:right_hand_landmarks`),B(r,`RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks`),r.A(t),ko(e,r),fl(this,e),this.h.attachProtoListener(`pose_landmarks`,(e,t)=>{Mu(e,this.i.poseLandmarks),K(this,t)}),this.h.attachEmptyPacketListener(`pose_landmarks`,e=>{K(this,e)}),this.h.attachProtoListener(`pose_world_landmarks`,(e,t)=>{var n=this.i.poseWorldLandmarks;e=Ho(e),n.push(fc(e)),K(this,t)}),this.h.attachEmptyPacketListener(`pose_world_landmarks`,e=>{K(this,e)}),this.outputPoseSegmentationMasks&&(B(r,`POSE_SEGMENTATION_MASK:pose_segmentation_mask`),pl(this,`pose_segmentation_mask`),this.h.ha(`pose_segmentation_mask`,(e,t)=>{this.i.poseSegmentationMasks=[lu(this,e,!0,!this.G)],K(this,t)}),this.h.attachEmptyPacketListener(`pose_segmentation_mask`,e=>{this.i.poseSegmentationMasks=[],K(this,e)})),this.h.attachProtoListener(`face_landmarks`,(e,t)=>{Mu(e,this.i.faceLandmarks),K(this,t)}),this.h.attachEmptyPacketListener(`face_landmarks`,e=>{K(this,e)}),this.outputFaceBlendshapes&&(H(e,`extra_blendshapes`),B(r,`FACE_BLENDSHAPES:extra_blendshapes`),this.h.attachProtoListener(`extra_blendshapes`,(e,t)=>{var n=this.i.faceBlendshapes;this.outputFaceBlendshapes&&(e=Io(e),n.push(cc(e.h()??[]))),K(this,t)}),this.h.attachEmptyPacketListener(`extra_blendshapes`,e=>{K(this,e)})),this.h.attachProtoListener(`left_hand_landmarks`,(e,t)=>{Mu(e,this.i.leftHandLandmarks),K(this,t)}),this.h.attachEmptyPacketListener(`left_hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoListener(`left_hand_world_landmarks`,(e,t)=>{var n=this.i.leftHandWorldLandmarks;e=Ho(e),n.push(fc(e)),K(this,t)}),this.h.attachEmptyPacketListener(`left_hand_world_landmarks`,e=>{K(this,e)}),this.h.attachProtoListener(`right_hand_landmarks`,(e,t)=>{Mu(e,this.i.rightHandLandmarks),K(this,t)}),this.h.attachEmptyPacketListener(`right_hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoListener(`right_hand_world_landmarks`,(e,t)=>{var n=this.i.rightHandWorldLandmarks;e=Ho(e),n.push(fc(e)),K(this,t)}),this.h.attachEmptyPacketListener(`right_hand_world_landmarks`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};$.prototype.detectForVideo=$.prototype.I,$.prototype.detect=$.prototype.H,$.prototype.setOptions=$.prototype.A,$.createFromModelPath=function(e,t){return X($,e,{baseOptions:{modelAssetPath:t}})},$.createFromModelBuffer=function(e,t){return X($,e,{baseOptions:{modelAssetBuffer:t}})},$.createFromOptions=function(e,t){return X($,e,t)},$.HAND_CONNECTIONS=Cu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.HAND_CONNECTIONS`,$.HAND_CONNECTIONS),$.POSE_CONNECTIONS=ku,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.POSE_CONNECTIONS`,$.POSE_CONNECTIONS),$.FACE_LANDMARKS_LIPS=fu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LIPS`,$.FACE_LANDMARKS_LIPS),$.FACE_LANDMARKS_LEFT_EYE=pu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYE`,$.FACE_LANDMARKS_LEFT_EYE),$.FACE_LANDMARKS_LEFT_EYEBROW=mu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYEBROW`,$.FACE_LANDMARKS_LEFT_EYEBROW),$.FACE_LANDMARKS_LEFT_IRIS=hu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_IRIS`,$.FACE_LANDMARKS_LEFT_IRIS),$.FACE_LANDMARKS_RIGHT_EYE=gu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYE`,$.FACE_LANDMARKS_RIGHT_EYE),$.FACE_LANDMARKS_RIGHT_EYEBROW=_u,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW`,$.FACE_LANDMARKS_RIGHT_EYEBROW),$.FACE_LANDMARKS_RIGHT_IRIS=vu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_IRIS`,$.FACE_LANDMARKS_RIGHT_IRIS),$.FACE_LANDMARKS_FACE_OVAL=yu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_FACE_OVAL`,$.FACE_LANDMARKS_FACE_OVAL),$.FACE_LANDMARKS_CONTOURS=bu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_CONTOURS`,$.FACE_LANDMARKS_CONTOURS),$.FACE_LANDMARKS_TESSELATION=xu,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_TESSELATION`,$.FACE_LANDMARKS_TESSELATION);var Nu=class extends uu{constructor(e,t){super(new au(e,t),`input_image`,`norm_rect`,!0),this.m={classifications:[]},S(e=this.i=new Ls,0,1,t=new U)}D(){return`ImageClassifier`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return S(this.i,0,2,oc(e,x(this.i,ts,2))),this.l(e)}Ha(e,t){return this.m={classifications:[]},su(this,e,t),this.m}Ia(e,t,n){return this.m={classifications:[]},cu(this,e,n,t),this.m}u(){var e=new Ao;V(e,`input_image`),V(e,`norm_rect`),H(e,`classifications`);var t=new Co;zi(t,Rs,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.image_classifier.ImageClassifierGraph`),z(n,`IMAGE:input_image`),z(n,`NORM_RECT:norm_rect`),B(n,`CLASSIFICATIONS:classifications`),n.A(t),ko(e,n),this.h.attachProtoListener(`classifications`,(e,t)=>{this.m=lc(Yo(e)),K(this,t)}),this.h.attachEmptyPacketListener(`classifications`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Nu.prototype.classifyForVideo=Nu.prototype.Ia,Nu.prototype.classify=Nu.prototype.Ha,Nu.prototype.setOptions=Nu.prototype.A,Nu.createFromModelPath=function(e,t){return X(Nu,e,{baseOptions:{modelAssetPath:t}})},Nu.createFromModelBuffer=function(e,t){return X(Nu,e,{baseOptions:{modelAssetBuffer:t}})},Nu.createFromOptions=function(e,t){return X(Nu,e,t)};var Pu=class extends uu{constructor(e,t){super(new au(e,t),`image_in`,`norm_rect`,!0),this.i=new zs,this.embeddings={embeddings:[]},S(e=this.i,0,1,t=new U)}D(){return`ImageEmbedder`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){var t=this.i,n=x(this.i,rs,2);if(n=n?n.clone():new rs,e.l2Normalize!==void 0){var r=e.l2Normalize;y(n,1,r==null?r:It(r))}else`l2Normalize`in e&&y(n,1);return e.quantize===void 0?`quantize`in e&&y(n,2):y(n,2,(r=e.quantize)==null?r:It(r)),S(t,0,2,n),this.l(e)}Oa(e,t){return su(this,e,t),this.embeddings}Pa(e,t,n){return cu(this,e,n,t),this.embeddings}u(){var e=new Ao;V(e,`image_in`),V(e,`norm_rect`),H(e,`embeddings_out`);var t=new Co;zi(t,Bs,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`EMBEDDINGS:embeddings_out`),n.A(t),ko(e,n),this.h.attachProtoListener(`embeddings_out`,(e,t)=>{e=es(e),this.embeddings=function(e){return{embeddings:sr(e,Qo,1).map(e=>{var t={headIndex:pr(e,3)??0??-1,headName:_(v(e,4))??``??``};if(Un(e,Xo,1,$o))e=Gn(e=mr(e,Xo,1,$o),1,Ft,Wn()),t.floatEmbedding=e.slice();else{let n=new Uint8Array;t.quantizedEmbedding=mr(e,Zo,2,$o)?.h()?.i()??n}return t}),timestampMs:sc(v(e,2,void 0,Zt)??Bn)}}(e),K(this,t)}),this.h.attachEmptyPacketListener(`embeddings_out`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Pu.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=mc(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error(`Cannot compute cosine similarity between quantized and float embeddings.`);e=mc(pc(e.quantizedEmbedding),pc(t.quantizedEmbedding))}return e},Pu.prototype.embedForVideo=Pu.prototype.Pa,Pu.prototype.embed=Pu.prototype.Oa,Pu.prototype.setOptions=Pu.prototype.A,Pu.createFromModelPath=function(e,t){return X(Pu,e,{baseOptions:{modelAssetPath:t}})},Pu.createFromModelBuffer=function(e,t){return X(Pu,e,{baseOptions:{modelAssetBuffer:t}})},Pu.createFromOptions=function(e,t){return X(Pu,e,t)};var Fu=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){this.confidenceMasks?.forEach(e=>{e.close()}),this.categoryMask?.close()}};function Iu(e){var t=function(e){return sr(e,To,1)}(e.ka()).filter(e=>(_(v(e,1))??``).includes(`mediapipe.tasks.TensorsToSegmentationCalculator`));if(e.v=[],t.length>1)throw Error(`The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.`);t.length===1&&(x(t[0],Co,7)?.u()?.h()??new Map).forEach((t,n)=>{e.v[Number(n)]=_(v(t,1))??``})}function Lu(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function Ru(e){try{let t=new Fu(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.m)return t;e.m(t)}finally{ml(e)}}Fu.prototype.close=Fu.prototype.close;var zu=class extends uu{constructor(e,t){super(new au(e,t),`image_in`,`norm_rect`,!1),this.v=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.i=new Gs,this.C=new Vs,S(this.i,0,3,this.C),S(e=this.i,0,1,t=new U)}D(){return`ImageSegmenter`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return e.displayNamesLocale===void 0?`displayNamesLocale`in e&&y(this.i,2):y(this.i,2,tn(e.displayNamesLocale)),`outputCategoryMask`in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),`outputConfidenceMasks`in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}M(){Iu(this)}segment(e,t,n){var r=typeof t==`function`?{}:t;return this.m=typeof t==`function`?t:n,Lu(this),su(this,e,r),Ru(this)}fb(e,t,n,r){var i=typeof n==`function`?{}:n;return this.m=typeof n==`function`?n:r,Lu(this),cu(this,e,i,t),Ru(this)}Sa(){return this.v}u(){var e=new Ao;V(e,`image_in`),V(e,`norm_rect`);var t=new Co;zi(t,Ks,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),n.A(t),ko(e,n),fl(this,e),this.outputConfidenceMasks&&(H(e,`confidence_masks`),B(n,`CONFIDENCE_MASKS:confidence_masks`),pl(this,`confidence_masks`),this.h.ia(`confidence_masks`,(e,t)=>{this.confidenceMasks=e.map(e=>lu(this,e,!0,!this.m)),K(this,t)}),this.h.attachEmptyPacketListener(`confidence_masks`,e=>{this.confidenceMasks=[],K(this,e)})),this.outputCategoryMask&&(H(e,`category_mask`),B(n,`CATEGORY_MASK:category_mask`),pl(this,`category_mask`),this.h.ha(`category_mask`,(e,t)=>{this.categoryMask=lu(this,e,!1,!this.m),K(this,t)}),this.h.attachEmptyPacketListener(`category_mask`,e=>{this.categoryMask=void 0,K(this,e)})),H(e,`quality_scores`),B(n,`QUALITY_SCORES:quality_scores`),this.h.attachFloatVectorListener(`quality_scores`,(e,t)=>{this.qualityScores=e,K(this,t)}),this.h.attachEmptyPacketListener(`quality_scores`,e=>{this.categoryMask=void 0,K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};zu.prototype.getLabels=zu.prototype.Sa,zu.prototype.segmentForVideo=zu.prototype.fb,zu.prototype.segment=zu.prototype.segment,zu.prototype.setOptions=zu.prototype.A,zu.createFromModelPath=function(e,t){return X(zu,e,{baseOptions:{modelAssetPath:t}})},zu.createFromModelBuffer=function(e,t){return X(zu,e,{baseOptions:{modelAssetBuffer:t}})},zu.createFromOptions=function(e,t){return X(zu,e,t)};var Bu={0:0,1:1,2:2,3:3};function Vu(){return Yc()?void 0:document.createElement(`canvas`)}var Hu=class extends hl{constructor(e,t){super(new ol(e,t)),this.v=new wl,this.delegate=`CPU`,this.i=0,this.baseOptions=new U,this.C=this.m=0}D(){return`InteractiveSegmenter`}get j(){return this.h.j}A(e){return this.delegate=e.baseOptions?.delegate??`CPU`,super.l(e)}gb(e){if(this.i===0)throw Error(`Segmenter is not initialized.`);var t;if(this.m!==0&&(this.j._free(this.m),this.m=0),!(t=typeof ImageData<`u`&&e instanceof ImageData)){if(typeof e!=`object`||!e)t=!1;else{t=e.data;var n=e.width,r=e.height;t=Number.isInteger(n)&&n>0&&Number.isInteger(r)&&r>0&&(t instanceof Uint8ClampedArray||t instanceof Uint8Array)}}if(t)t=e.width,n=e.height,e=e.data;else{if([t,n]=Zc(e),typeof OffscreenCanvas<`u`)r=new OffscreenCanvas(t,n);else{if(typeof document>`u`)throw Error(`Canvas is not supported in this environment.`);r=document.createElement(`canvas`)}if(r.width=t,r.height=n,!(r=r.getContext(`2d`)))throw Error(`Canvas 2D context is not supported in this environment.`);r.drawImage(e,0,0),e=r.getImageData(0,0,t,n).data}if(!e)throw Error(`Unsupported image source or failed to extract image pixels.`);r=function({Xa:e,width:t,height:n}){if(t<=0||n<=0)throw Error(`Invalid image dimensions: ${t}x${n}. Dimensions must be positive.`);if(e%(t*n)!==0)throw Error(`Invalid image dimensions or pixel data length. Pixel data length ${e} is not a multiple of the number of pixels (${t*n}).`);if((e/=t*n)!==4&&e!==3&&e!==1)throw Error(`Invalid image dimensions or pixel data length. Calculated channels: ${e}. Expected 1, 3, or 4.`);return e}({Xa:e.length,width:t,height:n});var i=this.j._malloc(e.length);if(this.j.HEAPU8.set(e,i),this.m=i,!this.j._interactive_segmenter_set_image(this.i,i,t,n,r))throw Error(`Failed to set image on native engine.`)}segment(e){if(this.i===0)throw Error(`Segmenter is not initialized.`);var t=function(e){e=e.map(({isCompleted:e,brushMode:t,point:n})=>{t=Bu[t]??0,n=n.map(({x:e,y:t})=>{var n=new qs;return yr(n,1,e),yr(n,2,t),n});var r=new Js;return hr(r,e),Qn(r,1,zt(t),0),ur(r,2,n),r});var t=new Ys;return ur(t,1,e),Xs(t)}(e);e=this.j._malloc(t.length),this.j.HEAPU8.set(t,e);var n=this.j._malloc(12),r=n+4,i=n+8,a=0,o=this.C++;try{if(this.o){if(this.delegate===`GPU`){var s=this.o;++s.h.U,s.i.set(o,performance.now())}else{var c=this.o;++c.h.R,c.i.set(o,performance.now())}}if((a=this.j._interactive_segmenter_segment(this.i,e,t.length,n,r,i))===0)throw Error(`Segmentation failed.`);this.o?.Aa(o);let u=this.j.HEAPU32[n/4],d=this.j.HEAPU32[r/4],ee=new Float32Array(this.j.HEAPU8.buffer,a,this.j.HEAPU32[i/4]/4);var l=new Float32Array(ee);if(s=u*d,(l instanceof Uint8Array||l instanceof Float32Array)&&l.length!==s)throw Error(`Unsupported channel count: `+l.length/s);return new J([l],!0,!1,this.h.j.canvas??void 0,this.v,u,d)}finally{e!==0&&this.j._free(e),n!==0&&this.j._free(n),a!==0&&this.j._free(a)}}u(){this.i!==0&&(this.o?.ya(),this.j._interactive_segmenter_close(this.i),this.i=0),this.m!==0&&(this.j._free(this.m),this.m=0);var e=new as;if(this.delegate===`GPU`){var t=new fo;lr(e,2,os,t)}else gr(t=new xo,1,4),lr(e,1,os,t);if(S(this.baseOptions,0,3,e),e=ls(this.baseOptions),t=this.j._malloc(e.length),this.j.HEAPU8.set(e,t),this.i=this.j._interactive_segmenter_create(t,e.length),this.j._free(t),this.i===0)throw Error(`Failed to create native InteractiveSegmenter engine.`);this.o?.za()}close(){this.i!==0&&(this.j._interactive_segmenter_close(this.i),this.i=0),this.m!==0&&(this.j._free(this.m),this.m=0),this.v.close(),super.close()}};Hu.prototype.close=Hu.prototype.close,Hu.prototype.segment=Hu.prototype.segment,Hu.prototype.setImage=Hu.prototype.gb,Hu.prototype.setOptions=Hu.prototype.A,Hu.createFromModelPath=function(e,t){return cl(Hu,Vu(),e,{baseOptions:{modelAssetPath:t}})},Hu.createFromModelBuffer=function(e,t){return cl(Hu,Vu(),e,{baseOptions:{modelAssetBuffer:t}})},Hu.createFromOptions=function(e,t){return cl(Hu,t.canvas??Vu(),e,t)};var Uu=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){this.confidenceMasks?.forEach(e=>{e.close()}),this.categoryMask?.close()}};Uu.prototype.close=Uu.prototype.close;var Wu=class extends uu{constructor(e,t){super(new au(e,t),`image_in`,`norm_rect_in`,!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.i=new Gs,this.v=new Vs,S(this.i,0,3,this.v),S(e=this.i,0,1,t=new U)}D(){return`InteractiveSegmenterLegacy`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`outputCategoryMask`in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),`outputConfidenceMasks`in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,r){var i=typeof n==`function`?{}:n;if(this.m=typeof n==`function`?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.J+1,r=new ec,t.keypoint&&t.scribble)throw Error(`Cannot provide both keypoint and scribble.`);if(t.keypoint){var a=new Zs;hr(a,!0),yr(a,1,t.keypoint.x),yr(a,2,t.keypoint.y),lr(r,1,tc,a)}else{if(!t.scribble)throw Error(`Must provide either a keypoint or a scribble.`);{let e=new $s;for(a of t.scribble)hr(t=new Zs,!0),yr(t,1,a.x),yr(t,2,a.y),fr(e,1,Zs,t);lr(r,2,tc,e)}}this.h.addProtoToStream(r.h(),`mediapipe.tasks.vision.interactive_segmenter_legacy.proto.RegionOfInterest`,`roi_in`,n),su(this,e,i);t:{try{let e=new Uu(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.m){var o=e;break t}this.m(e)}finally{ml(this)}o=void 0}return o}u(){var e=new Ao;V(e,`image_in`),V(e,`roi_in`),V(e,`norm_rect_in`);var t=new Co;zi(t,Ks,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.interactive_segmenter_legacy.InteractiveSegmenterLegacyGraph`),z(n,`IMAGE:image_in`),z(n,`ROI:roi_in`),z(n,`NORM_RECT:norm_rect_in`),n.A(t),ko(e,n),fl(this,e),this.outputConfidenceMasks&&(H(e,`confidence_masks`),B(n,`CONFIDENCE_MASKS:confidence_masks`),pl(this,`confidence_masks`),this.h.ia(`confidence_masks`,(e,t)=>{this.confidenceMasks=e.map(e=>lu(this,e,!0,!this.m)),K(this,t)}),this.h.attachEmptyPacketListener(`confidence_masks`,e=>{this.confidenceMasks=[],K(this,e)})),this.outputCategoryMask&&(H(e,`category_mask`),B(n,`CATEGORY_MASK:category_mask`),pl(this,`category_mask`),this.h.ha(`category_mask`,(e,t)=>{this.categoryMask=lu(this,e,!1,!this.m),K(this,t)}),this.h.attachEmptyPacketListener(`category_mask`,e=>{this.categoryMask=void 0,K(this,e)})),H(e,`quality_scores`),B(n,`QUALITY_SCORES:quality_scores`),this.h.attachFloatVectorListener(`quality_scores`,(e,t)=>{this.qualityScores=e,K(this,t)}),this.h.attachEmptyPacketListener(`quality_scores`,e=>{this.categoryMask=void 0,K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Wu.prototype.segment=Wu.prototype.segment,Wu.prototype.setOptions=Wu.prototype.A,Wu.createFromModelPath=function(e,t){return X(Wu,e,{baseOptions:{modelAssetPath:t}})},Wu.createFromModelBuffer=function(e,t){return X(Wu,e,{baseOptions:{modelAssetBuffer:t}})},Wu.createFromOptions=function(e,t){return X(Wu,e,t)};var Gu=class extends uu{constructor(e,t){super(new au(e,t),`input_frame_gpu`,`norm_rect`,!1),this.m={detections:[]},S(e=this.i=new nc,0,1,t=new U)}D(){return`ObjectDetector`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return e.displayNamesLocale===void 0?`displayNamesLocale`in e&&y(this.i,2):y(this.i,2,tn(e.displayNamesLocale)),e.maxResults===void 0?`maxResults`in e&&y(this.i,3):gr(this.i,3,e.maxResults),e.scoreThreshold===void 0?`scoreThreshold`in e&&y(this.i,4):w(this.i,4,e.scoreThreshold),e.categoryAllowlist===void 0?`categoryAllowlist`in e&&y(this.i,5):xr(this.i,5,e.categoryAllowlist),e.categoryDenylist===void 0?`categoryDenylist`in e&&y(this.i,6):xr(this.i,6,e.categoryDenylist),this.l(e)}H(e,t){return this.m={detections:[]},su(this,e,t),this.m}I(e,t,n){return this.m={detections:[]},cu(this,e,n,t),this.m}u(){var e=new Ao;V(e,`input_frame_gpu`),V(e,`norm_rect`),H(e,`detections`);var t=new Co;zi(t,rc,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.ObjectDetectorGraph`),z(n,`IMAGE:input_frame_gpu`),z(n,`NORM_RECT:norm_rect`),B(n,`DETECTIONS:detections`),n.A(t),ko(e,n),this.h.attachProtoVectorListener(`detections`,(e,t)=>{for(let t of e)e=Bo(t),this.m.detections.push(uc(e));K(this,t)}),this.h.attachEmptyPacketListener(`detections`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Gu.prototype.detectForVideo=Gu.prototype.I,Gu.prototype.detect=Gu.prototype.H,Gu.prototype.setOptions=Gu.prototype.A,Gu.createFromModelPath=async function(e,t){return X(Gu,e,{baseOptions:{modelAssetPath:t}})},Gu.createFromModelBuffer=function(e,t){return X(Gu,e,{baseOptions:{modelAssetBuffer:t}})},Gu.createFromOptions=function(e,t){return X(Gu,e,t)};var Ku=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach(e=>{e.close()})}};function qu(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function Ju(e){try{let t=new Ku(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.v)return t;e.v(t)}finally{ml(e)}}Ku.prototype.close=Ku.prototype.close;var Yu=class extends uu{constructor(e,t){super(new au(e,t),`image_in`,`norm_rect`,!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,S(e=this.i=new ic,0,1,t=new U),this.C=new Ns,S(this.i,0,3,this.C),this.m=new Ms,S(this.i,0,2,this.m),gr(this.m,4,1),w(this.m,2,.5),w(this.C,2,.5),w(this.i,4,.5)}D(){return`PoseLandmarker`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`numPoses`in e&&gr(this.m,4,e.numPoses??1),`minPoseDetectionConfidence`in e&&w(this.m,2,e.minPoseDetectionConfidence??.5),`minTrackingConfidence`in e&&w(this.i,4,e.minTrackingConfidence??.5),`minPosePresenceConfidence`in e&&w(this.C,2,e.minPosePresenceConfidence??.5),`outputSegmentationMasks`in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}H(e,t,n){var r=typeof t==`function`?{}:t;return this.v=typeof t==`function`?t:n,qu(this),su(this,e,r),Ju(this)}I(e,t,n,r){var i=typeof n==`function`?{}:n;return this.v=typeof n==`function`?n:r,qu(this),cu(this,e,i,t),Ju(this)}u(){var e=new Ao;V(e,`image_in`),V(e,`norm_rect`),H(e,`normalized_landmarks`),H(e,`world_landmarks`),H(e,`segmentation_masks`);var t=new Co;zi(t,ac,this.i);var n=new To;br(n,2,`mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`NORM_LANDMARKS:normalized_landmarks`),B(n,`WORLD_LANDMARKS:world_landmarks`),n.A(t),ko(e,n),fl(this,e),this.h.attachProtoVectorListener(`normalized_landmarks`,(e,t)=>{this.landmarks=[];for(let t of e)e=Wo(t),this.landmarks.push(dc(e));K(this,t)}),this.h.attachEmptyPacketListener(`normalized_landmarks`,e=>{this.landmarks=[],K(this,e)}),this.h.attachProtoVectorListener(`world_landmarks`,(e,t)=>{this.worldLandmarks=[];for(let t of e)e=Ho(t),this.worldLandmarks.push(fc(e));K(this,t)}),this.h.attachEmptyPacketListener(`world_landmarks`,e=>{this.worldLandmarks=[],K(this,e)}),this.outputSegmentationMasks&&(B(n,`SEGMENTATION_MASK:segmentation_masks`),pl(this,`segmentation_masks`),this.h.ia(`segmentation_masks`,(e,t)=>{this.segmentationMasks=e.map(e=>lu(this,e,!0,!this.v)),K(this,t)}),this.h.attachEmptyPacketListener(`segmentation_masks`,e=>{this.segmentationMasks=[],K(this,e)})),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Yu.prototype.detectForVideo=Yu.prototype.I,Yu.prototype.detect=Yu.prototype.H,Yu.prototype.setOptions=Yu.prototype.A,Yu.createFromModelPath=function(e,t){return X(Yu,e,{baseOptions:{modelAssetPath:t}})},Yu.createFromModelBuffer=function(e,t){return X(Yu,e,{baseOptions:{modelAssetBuffer:t}})},Yu.createFromOptions=function(e,t){return X(Yu,e,t)},Yu.POSE_CONNECTIONS=ku,r(`module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS`,Yu.POSE_CONNECTIONS);export{yc as FilesetResolver,Q as HandLandmarker};