@mediapipe/tasks-audio 1.0.1 → 1.1.0-rc.20260918
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +218 -0
- package/NOTICE +32053 -0
- package/README.md +0 -0
- package/audio.d.ts +24 -0
- package/audio_bundle.cjs +1 -1
- package/audio_bundle.cjs.map +1 -1
- package/audio_bundle.js +1 -1
- package/audio_bundle.js.map +1 -0
- package/audio_bundle.mjs +1 -1
- package/audio_bundle.mjs.map +1 -1
- package/package.json +1 -1
- package/wasm/audio_wasm_internal.js +245 -153
- package/wasm/audio_wasm_internal.wasm +0 -0
- package/wasm/audio_wasm_module_internal.js +245 -153
- package/wasm/audio_wasm_module_internal.wasm +0 -0
- package/wasm/audio_wasm_nosimd_internal.js +245 -153
- package/wasm/audio_wasm_nosimd_internal.wasm +0 -0
package/README.md
CHANGED
|
File without changes
|
package/audio.d.ts
CHANGED
|
@@ -263,6 +263,18 @@ export declare class FilesetResolver {
|
|
|
263
263
|
* tasks.
|
|
264
264
|
*/
|
|
265
265
|
static forGenAiTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
|
|
266
|
+
/**
|
|
267
|
+
* Creates a fileset for the MediaPipe Retrieval tasks.
|
|
268
|
+
*
|
|
269
|
+
* @export
|
|
270
|
+
* @param basePath An optional base path to specify the directory the Wasm
|
|
271
|
+
* files should be loaded from. If not specified, the Wasm files are
|
|
272
|
+
* loaded from the host's root directory.
|
|
273
|
+
* @param useModule Whether to use ES6 Modules for the Wasm files.
|
|
274
|
+
* @return A `WasmFileset` that can be used to initialize MediaPipe Retrieval
|
|
275
|
+
* tasks.
|
|
276
|
+
*/
|
|
277
|
+
static forRetrievalTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
|
|
266
278
|
/**
|
|
267
279
|
* Creates a fileset for the MediaPipe Text tasks.
|
|
268
280
|
*
|
|
@@ -275,6 +287,18 @@ export declare class FilesetResolver {
|
|
|
275
287
|
* tasks.
|
|
276
288
|
*/
|
|
277
289
|
static forTextTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
|
|
290
|
+
/**
|
|
291
|
+
* Creates a fileset for the MediaPipe LiteRT LM Text tasks.
|
|
292
|
+
*
|
|
293
|
+
* @export
|
|
294
|
+
* @param basePath An optional base path to specify the directory the Wasm
|
|
295
|
+
* files should be loaded from. If not specified, the Wasm files are
|
|
296
|
+
* loaded from the host's root directory.
|
|
297
|
+
* @param useModule Whether to use ES6 Modules for the Wasm files.
|
|
298
|
+
* @return A `WasmFileset` that can be used to initialize MediaPipe LiteRT LM
|
|
299
|
+
* Text tasks.
|
|
300
|
+
*/
|
|
301
|
+
static forLiteRtLmTextTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
|
|
278
302
|
/**
|
|
279
303
|
* Creates a fileset for the MediaPipe Vision tasks.
|
|
280
304
|
*
|
package/audio_bundle.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t="undefined"!=typeof self?self:{};function r(r,e){t:{for(var n=["CLOSURE_FLAGS"],i=t,o=0;o<n.length;o++)if(null==(i=i[n[o]])){n=null;break t}n=i}return null!=(r=n&&n[r])?r:e}function e(){throw Error("Invalid UTF8")}function n(t,r){return r=String.fromCharCode.apply(null,r),null==t?r:t+r}var i,o,a=void 0,s="undefined"!=typeof TextDecoder,u="undefined"!=typeof TextEncoder;function l(t){if(u)t=(o||=new TextEncoder).encode(t);else{let e=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var r=t.charCodeAt(i);if(r<128)n[e++]=r;else{if(r<2048)n[e++]=r>>6|192;else{if(r>=55296&&r<=57343){if(r<=56319&&i<t.length){let o=t.charCodeAt(++i);if(o>=56320&&o<=57343){r=1024*(r-55296)+o-56320+65536,n[e++]=r>>18|240,n[e++]=r>>12&63|128,n[e++]=r>>6&63|128,n[e++]=63&r|128;continue}i--}r=65533}n[e++]=r>>12|224,n[e++]=r>>6&63|128}n[e++]=63&r|128}}t=e===n.length?n:n.subarray(0,e)}return t}var c=r(610401301,!1),h=r(748402147,!0);function f(){var r=t.navigator;return r&&(r=r.userAgent)?r:""}var d,g=t.navigator;function v(t){return v[" "](t),t}d=g&&g.userAgentData||null,v[" "]=function(){};var p={},m=null;function y(t){var r=t.length,e=3*r/4;e%3?e=Math.floor(e):-1!="=.".indexOf(t[r-1])&&(e=-1!="=.".indexOf(t[r-2])?e-2:e-1);var n=new Uint8Array(e),i=0;return function(t,r){function e(r){for(;n<t.length;){let r=t.charAt(n++),e=m[r];if(null!=e)return e;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return r}w();for(var n=0;;){let t=e(-1),n=e(0),i=e(64),o=e(64);if(64===o&&-1===t)break;r(t<<2|n>>4),64!=i&&(r(n<<4&240|i>>2),64!=o&&r(i<<6&192|o))}}(t,function(t){n[i++]=t}),i!==e?n.subarray(0,i):n}function w(){if(!m){m={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),r=["+/=","+/","-_=","-_.","-_"];for(let e=0;e<5;e++){let n=t.concat(r[e].split(""));p[e]=n;for(let t=0;t<n.length;t++){let r=n[t];void 0===m[r]&&(m[r]=t)}}}}var b="undefined"!=typeof Uint8Array,_=!(!(c&&d&&d.brands.length>0)&&(-1!=f().indexOf("Trident")||-1!=f().indexOf("MSIE")))&&"function"==typeof btoa,S=/[-_.]/g,A={"-":"+",_:"/",".":"="};function I(t){return A[t]||""}function E(t){if(!_)return y(t);t=S.test(t)?t.replace(S,I):t,t=atob(t);var r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}var T={};function B(){return P||=new x(null,T)}function U(t){L(T);var r=t.g;return null==(r=null==r||b&&null!=r&&r instanceof Uint8Array?r:"string"==typeof r?E(r):null)?r:t.g=r}var P,x=class{constructor(t,r){if(L(r),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function L(t){if(t!==T)throw Error("illegal external caller")}function N(t,r){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=r}var j=void 0;function O(t){return N(t=Error(t),"warning"),t}function V(r,e){if(null!=r){var n=j??={},i=n[r]||0;i>=e||(n[r]=i+1,N(r=Error(),"incident"),function(r){t.setTimeout(()=>{throw r},0)}(r))}}function k(){return"function"==typeof BigInt}var F="function"==typeof Symbol&&"symbol"==typeof Symbol();function M(t,r,e=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?e&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():r}var C,G=M("jas",void 0,!0),D=M(void 0,"1oa"),R=M(void 0,Symbol()),W=M(void 0,"0ubs"),H=M(void 0,"0ubsb"),$=M(void 0,"0actk"),z=M("m_m","ha",!0),K={W:{value:0,configurable:!0,writable:!0,enumerable:!1}},J=Object.defineProperties,X=F?G:"W",Y=[];function Z(t,r){F||X in t||J(t,K),t[X]|=r}function q(t,r){F||X in t||J(t,K),t[X]=r}q(Y,7),C=Object.freeze(Y);var Q={};function tt(t,r){return void 0===r?t.g!==rt&&!!(2&t.l[X]):!!(2&r)&&t.g!==rt}var rt={};function et(t,r){if(null!=t)if("string"==typeof t)t=t?new x(t,T):B();else if(t.constructor!==x)if(b&&null!=t&&t instanceof Uint8Array)t=t.length?new x(new Uint8Array(t),T):B();else{if(!r)throw Error();t=void 0}return t}var nt=Object.freeze({});function it(t,r,e){var n,i=128&r?0:-1,o=t.length;(n=!!o)&&(n=null!=(n=t[o-1])&&"object"==typeof n&&n.constructor===Object);var a=o+(n?-1:0);for(r=128&r?1:0;r<a;r++)e(r-i,t[r]);if(n){t=t[o-1];for(let r in t)!isNaN(r)&&e(+r,t[r])}}var ot={};function at(t){return 128&t?ot:void 0}function st(t){return t.fa=!0,t}var ut=st(t=>"number"==typeof t),lt=st(t=>"string"==typeof t),ct=st(t=>"boolean"==typeof t),ht="function"==typeof t.BigInt&&"bigint"==typeof t.BigInt(0);function ft(t){var r=t;if(lt(r)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(r))throw Error(String(r))}else if(ut(r)&&!Number.isSafeInteger(r))throw Error(String(r));return ht?BigInt(t):t=ct(t)?t?"1":"0":lt(t)?t.trim()||"0":String(t)}var dt=st(t=>ht?t>=vt&&t<=mt:"-"===t[0]?yt(t,gt):yt(t,pt)),gt=Number.MIN_SAFE_INTEGER.toString(),vt=ht?BigInt(Number.MIN_SAFE_INTEGER):void 0,pt=Number.MAX_SAFE_INTEGER.toString(),mt=ht?BigInt(Number.MAX_SAFE_INTEGER):void 0;function yt(t,r){if(t.length>r.length)return!1;if(t.length<r.length||t===r)return!0;for(let e=0;e<t.length;e++){let n=t[e],i=r[e];if(n>i)return!1;if(n<i)return!0}}var wt,bt="function"==typeof Uint8Array.prototype.slice,_t=0,St=0;function At(t){var r=t>>>0;_t=r,St=(t-r)/4294967296>>>0}function It(t){if(t<0){At(-t);let[r,e]=Nt(_t,St);_t=r>>>0,St=e>>>0}else At(t)}function Et(t,r){var e=4294967296*r+(t>>>0);return Number.isSafeInteger(e)?e:Ut(t,r)}function Tt(t,r){return ft(k()?BigInt.asUintN(64,(BigInt(r>>>0)<<BigInt(32))+BigInt(t>>>0)):Ut(t,r))}function Bt(t,r){return k()?ft(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(r))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):ft(xt(t,r))}function Ut(t,r){if(t>>>=0,(r>>>=0)<=2097151)var e=""+(4294967296*r+t);else k()?e=""+(BigInt(r)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(e=16777215&(t>>>24|r<<8))+6710656*(r=r>>16&65535),e+=8147497*r,r*=2,t>=1e7&&(e+=t/1e7>>>0,t%=1e7),e>=1e7&&(r+=e/1e7>>>0,e%=1e7),e=r+Pt(e)+Pt(t));return e}function Pt(t){return t=String(t),"0000000".slice(t.length)+t}function xt(t,r){if(2147483648&r)if(k())t=""+(BigInt(0|r)<<BigInt(32)|BigInt(t>>>0));else{let[e,n]=Nt(t,r);t="-"+Ut(e,n)}else t=Ut(t,r);return t}function Lt(t){if(t.length<16)It(Number(t));else if(k())t=BigInt(t),_t=Number(t&BigInt(4294967295))>>>0,St=Number(t>>BigInt(32)&BigInt(4294967295));else{let r=+("-"===t[0]);St=_t=0;let e=t.length;for(let n=r,i=(e-r)%6+r;i<=e;n=i,i+=6){let r=Number(t.slice(n,i));St*=1e6,(_t=1e6*_t+r)>=4294967296&&(St+=Math.trunc(_t/4294967296),St>>>=0,_t>>>=0)}if(r){let[t,r]=Nt(_t,St);_t=t,St=r}}}function Nt(t,r){return r=~r,t?t=1+~t:r+=1,[t,r]}function jt(t){return Array.prototype.slice.call(t)}var Ot="function"==typeof BigInt?BigInt.asIntN:void 0,Vt="function"==typeof BigInt?BigInt.asUintN:void 0,kt=Number.isSafeInteger,Ft=Number.isFinite,Mt=Math.trunc;function Ct(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}var Gt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Dt(t){switch(typeof t){case"bigint":return!0;case"number":return Ft(t);case"string":return Gt.test(t);default:return!1}}function Rt(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Ft(t)?0|t:void 0}function Wt(t){var r=t.length;return("-"===t[0]?r<20||20===r&&t<="-9223372036854775808":r<19||19===r&&t<="9223372036854775807")?t:(Lt(t),xt(_t,St))}function Ht(t){if("-"===t[0])var r=!1;else r=(r=t.length)<20||20===r&&t<="18446744073709551615";return r?t:(Lt(t),Ut(_t,St))}function $t(t){if(t=Mt(t),!kt(t)){It(t);var r=_t,e=St;(t=2147483648&e)&&(e=~e>>>0,0==(r=1+~r>>>0)&&(e=e+1>>>0)),t="number"==typeof(r=Et(r,e))?t?-r:r:t?"-"+r:r}return t}function zt(t){return(t=Mt(t))>=0&&kt(t)||(It(t),t=Et(_t,St)),t}function Kt(t){var r=Mt(Number(t));return kt(r)?String(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),Wt(t))}function Jt(t){var r=Mt(Number(t));return kt(r)?ft(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),k()?ft(Ot(64,BigInt(t))):ft(Wt(t)))}function Xt(t){return kt(t)?t=ft($t(t)):(t=Mt(t),kt(t)?t=String(t):(It(t),t=xt(_t,St)),t=ft(t)),t}function Yt(t){var r=typeof t;return null==t?t:"bigint"===r?ft(Ot(64,t)):Dt(t)?"string"===r?Jt(t):Xt(t):void 0}function Zt(t){if(null==t)return t;var r=typeof t;if("bigint"===r)return String(Ot(64,t));if(Dt(t)){if("string"===r)return Kt(t);if("number"===r)return $t(t)}}function qt(t){if(null==t||"string"==typeof t||t instanceof x)return t}function Qt(t){if("string"!=typeof t)throw Error();return t}function tr(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function rr(t){return null==t||"string"==typeof t?t:void 0}function er(t,r,e){if(null!=t&&t[z]===Q)return t;if(Array.isArray(t)){var n=0|t[X];return(e=n|32&e|2&e)!==n&&q(t,e),new r(t)}}function nr(t){return t}function ir(t){return R?t[R]:void 0}function or(t,r){for(let e in t)!isNaN(e)&&r(t,+e,t[e])}var ar,sr,ur,lr=class{};function cr(t,r){r<100||V(W,1)}function hr(t,r,e,n){var i=void 0!==n;n=!!n;var o,a=R;!i&&F&&a&&(o=t[a])&&or(o,cr),a=[];var s=t.length;o=4294967295;var u=!1,l=!!(64&r),c=l?128&r?0:-1:void 0;if(!(1&r)){var h=s&&t[s-1];null!=h&&"object"==typeof h&&h.constructor===Object?o=--s:h=void 0,!l||128&r||i||(u=!0,o=(ar??nr)(o-c,c,t,h,void 0)+c)}r=void 0;for(var f=0;f<s;f++){let i=t[f];if(null!=i&&null!=(i=e(i,n)))if(l&&f>=o){let t=f-c;(r??={})[t]=i}else a[f]=i}if(h)for(let t in h){if(null==(s=h[t])||null==(s=e(s,n)))continue;let i;f=+t,l&&!Number.isNaN(f)&&(i=f+c)<o?a[i]=s:(r??={})[t]=s}return r&&(u?a.push(r):a[o]=r),i&&R&&(t=ir(t))&&t instanceof lr&&(a[R]=function(t){var r=new lr;return or(t,(t,e,n)=>{r[e]=jt(n)}),r.g=t.g,r}(t)),a}function fr(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return dt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var r=0|t[X];return 0===t.length&&1&r?void 0:hr(t,r,fr)}if(null!=t&&t[z]===Q)return dr(t);if(t instanceof x){if(null==(r=t.g))t="";else if("string"==typeof r)t=r;else{if(_){for(var e="",n=0,i=r.length-10240;n<i;)e+=String.fromCharCode.apply(null,r.subarray(n,n+=10240));e+=String.fromCharCode.apply(null,n?r.subarray(n):r),r=btoa(e)}else{void 0===e&&(e=0),w(),e=p[e],n=Array(Math.floor(r.length/3)),i=e[64]||"";let t=0,l=0;for(;t<r.length-2;t+=3){var o=r[t],a=r[t+1],s=r[t+2],u=e[o>>2];o=e[(3&o)<<4|a>>4],a=e[(15&a)<<2|s>>6],s=e[63&s],n[l++]=u+o+a+s}switch(u=0,s=i,r.length-t){case 2:s=e[(15&(u=r[t+1]))<<2]||i;case 1:r=r[t],n[l]=e[r>>2]+e[(3&r)<<4|u>>4]+s+i}r=n.join("")}t=t.g=r}return t}return}return t}function dr(t){return hr(t=t.l,0|t[X],fr)}function gr(t,r){return vr(t,r[0],r[1])}function vr(t,r,e,n=0){if(null==t){var i=32;e?(t=[e],i|=128):t=[],r&&(i=-16760833&i|(1023&r)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[X],h&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(h)throw Error("carr");V($,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&q(t,i|n),t;if(e&&(i|=128,e!==t[0]))throw Error("mid");t:{i|=64;var o=(e=t).length;if(o){var a=o-1;let t=e[a];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((a-=r=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var s in t)(o=+s)<a&&(e[o+r]=t[s],delete t[s]);i=-16760833&i|(1023&a)<<14;break t}}if(r){if((s=Math.max(r,o-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&s)<<14}}}return q(t,64|i|n),t}function pr(t,r){if("object"!=typeof t)return t;if(Array.isArray(t)){var e=0|t[X];return 0===t.length&&1&e?t=void 0:2&e||(!r||4096&e||16&e?t=yr(t,e,!1,r&&!(16&e)):(Z(t,34),4&e&&Object.freeze(t))),t}return null!=t&&t[z]===Q?tt(t,e=0|(r=t.l)[X])?t:Ar(t,r,e)?mr(t,r):yr(r,e):t instanceof x?t:void 0}function mr(t,r,e){return t=new t.constructor(r),e&&(t.g=rt),t.m=rt,t}function yr(t,r,e,n){return n??=!!(34&r),t=hr(t,r,pr,n),n=32,e&&(n|=2),q(t,r=16769217&r|n),t}function wr(t){var r=t.l,e=0|r[X];return tt(t,e)?Ar(t,r,e)?mr(t,r,!0):new t.constructor(yr(r,e,!1)):t}function br(t){if(t.g!==rt)return!1;var r=t.l;return Z(r=yr(r,0|r[X]),2048),t.l=r,t.g=void 0,t.m=void 0,!0}function _r(t){if(!br(t)&&tt(t,0|t.l[X]))throw Error()}function Sr(t,r){void 0===r&&(r=0|t[X]),32&r&&!(4096&r)&&q(t,4096|r)}function Ar(t,r,e){return!!(2&e)||!(!(32&e)||4096&e)&&(q(r,2|e),t.g=rt,!0)}var Ir=ft(0);function Er(t,r,e,n){if(null!==(t=Tr(t.l,r,e,n)))return t}function Tr(t,r,e,n){if(-1===r)return null;var i=r+(e?0:-1),o=t.length-1;if(!(o<1+(e?0:-1))){if(i>=o){var a=t[o];if(null!=a&&"object"==typeof a&&a.constructor===Object){e=a[r];var s=!0}else{if(i!==o)return;e=a}}else e=t[i];if(n&&null!=e){if(null==(n=n(e)))return n;if(!Object.is(n,e))return s?a[r]=n:t[i]=n,n}return e}}function Br(t,r,e,n){_r(t);var i=t.l;return Ur(i,0|i[X],r,e,n),t}function Ur(t,r,e,n,i){var o=e+(i?0:-1),a=t.length-1;if(a>=1+(i?0:-1)&&o>=a){let i=t[a];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[e]=n,r}return o<=a?(t[o]=n,r):(void 0!==n&&(e>=(a=(r??=0|t[X])>>14&1023||536870912)?null!=n&&(t[a+(i?0:-1)]={[e]:n}):t[o]=n),r)}function Pr(t,r,e,n,i,o,a,s){var u=r;return 1===o||4===o&&(2&r||!(16&r)&&32&n)?Nr(r)||((r|=!t.length||a&&!(4096&r)||32&n&&!(4096&r||16&r)?2:256)!==u&&q(t,r),Object.freeze(t)):(2===o&&Nr(r)&&(t=jt(t),u=0,r=Kr(r,n),n=Ur(e,n,i,t)),Nr(r)||(s||(r|=16),r!==u&&q(t,r))),2&r||!(4096&r||16&r)||Sr(e,n),t}function xr(t,r,e){return t=Tr(t,r,e),Array.isArray(t)?t:C}function Lr(t,r){return 2&r&&(t|=2),1|t}function Nr(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function jr(t){return et(t,!0)}function Or(t,r,e){_r(t);var n=0|(t=t.l)[X];if(null==e)Ur(t,n,r);else{var i=e===C?7:0|e[X],o=i,a=Nr(i),s=a||Object.isFrozen(e);for(a||(i=0),s||(e=jt(e),o=0,i=Kr(i,n),s=!1),i|=5,i|=(4&i?512&i?512:1024&i?1024:0:void 0)??1024,a=0;a<e.length;a++){let t=e[a],r=Qt(t);Object.is(t,r)||(s&&(e=jt(e),o=0,i=Kr(i,n),s=!1),e[a]=r)}i!==o&&(s&&(e=jt(e),i=Kr(i,n)),q(e,i)),Ur(t,n,r,e)}}function Vr(t,r,e){if(2&r)throw Error();var n=at(r),i=xr(t,e,n),o=i===C?7:0|i[X],a=Lr(o,r);return(2&a||Nr(a)||16&a)&&(a===o||Nr(a)||q(i,a),i=jt(i),o=0,a=Kr(a,r),Ur(t,r,e,i,n)),(a&=-13)!==o&&q(i,a),i}function kr(t){if(F)return t[D]??(t[D]=new Map);if(D in t)return t[D];var r=new Map;return Object.defineProperty(t,D,{value:r}),r}function Fr(t,r,e,n,i){var o=kr(t),a=Mr(o,t,r,e,i);return a!==n&&(a&&(r=Ur(t,r,a,void 0,i)),o.set(e,n)),r}function Mr(t,r,e,n,i){var o=t.get(n);if(null!=o)return o;o=0;for(let t=0;t<n.length;t++){let a=n[t];null!=Tr(r,a,i)&&(0!==o&&(e=Ur(r,e,o,void 0,i)),o=a)}return t.set(n,o),o}function Cr(t,r,e){var n=0|t[X],i=at(n),o=Tr(t,e,i);if(null!=o&&o[z]===Q){if(!tt(o))return br(o),o.l;var a=o.l}else Array.isArray(o)&&(a=o);if(a){let t=0|a[X];2&t&&(a=yr(a,t))}return(a=gr(a,r))!==o&&Ur(t,n,e,a,i),a}function Gr(t,r,e,n){var i=!1;if(null!=(n=Tr(t,n,void 0,t=>{var n=er(t,e,r);return i=n!==t&&null!=n,n})))return i&&!tt(n)&&Sr(t,r),n}function Dr(t,r,e){var n=t.l,i=0|n[X];if(null==(r=Gr(n,i,r,e)))return r;if(!tt(t,i=0|n[X])){let o=wr(r);o!==r&&(br(t)&&(i=0|(n=t.l)[X]),Sr(n,i=Ur(n,i,e,r=o)))}return r}function Rr(t,r,e,n,i,o,a,s){var u=tt(t,e);o=u?1:o,a=!!a||3===o,u=s&&!u,(2===o||u)&&br(t)&&(e=0|(r=t.l)[X]);var l=(t=xr(r,i))===C?7:0|t[X],c=Lr(l,e);if(s=!(4&c)){var h=t,f=e;let r=!!(2&c);r&&(f|=2);let i=!r,o=!0,a=0,s=0;for(;a<h.length;a++){let t=er(h[a],n,f);if(t instanceof n){if(!r){let r=tt(t);i&&=!r,o&&=r}h[s++]=t}}s<a&&(h.length=s),c|=4,c=o?-4097&c:4096|c,c=i?8|c:-9&c}if(c!==l&&(q(t,c),2&c&&Object.freeze(t)),u&&!(8&c||!t.length&&(1===o||4===o&&(2&c||!(16&c)&&32&e)))){for(Nr(c)&&(t=jt(t),c=Kr(c,e),e=Ur(r,e,i,t)),n=t,u=c,l=0;l<n.length;l++)(h=n[l])!==(c=wr(h))&&(n[l]=c);u|=8,q(t,c=u=n.length?4096|u:-4097&u)}return Pr(t,c,r,e,i,o,s,a)}function Wr(t,r){var e=t.l;return Rr(t,e,0|e[X],r,1,void 0===nt?2:4,!1,!0)}function Hr(t){return null==t&&(t=void 0),t}function $r(t,r,e,n,i){return Br(t,e,n=Hr(n),i),n&&!tt(n)&&Sr(t.l),t}function zr(t,r,e,n){t:{var i=n=Hr(n);_r(t);let o=t.l,a=0|o[X];if(null==i){let t=kr(o);if(Mr(t,o,a,e)!==r)break t;t.set(e,0)}else a=Fr(o,a,e,r);Ur(o,a,r,i)}return n&&!tt(n)&&Sr(t.l),t}function Kr(t,r){return-273&(t=2&r?2|t:-3&t)}function Jr(t,r,e,n){_r(t);var i=t.l;t=Rr(t,i,0|i[X],e,r,2,!0),n=null!=n?n:new e,t.push(n),r=e=t===C?7:0|t[X],(n=tt(n))?(e&=-9,1===t.length&&(e&=-4097)):e|=4096,e!==r&&q(t,e),n||Sr(i)}function Xr(t,r,e){if(null!=e)t:{if(!Dt(e))throw O("int64");switch(typeof e){case"string":e=Jt(e);break t;case"bigint":e=ft(Ot(64,e));break t;default:e=Xt(e)}}return Br(t,r,e)}function Yr(t,r,e){return Br(t,r,null==e?e:function(t){if(!Dt(t))throw O("uint64");switch(typeof t){case"string":var r=Mt(Number(t));return kt(r)&&r>=0?t=ft(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),t=k()?ft(Vt(64,BigInt(t))):ft(Ht(t))),t;case"bigint":return ft(Vt(64,t));default:return kt(t)?t=ft(zt(t)):((t=Mt(t))>=0&&kt(t)?t=String(t):(It(t),t=Ut(_t,St)),t=ft(t)),t}}(e))}function Zr(t,r,e){if(null!=e){if(!Ft(e))throw O("enum");e|=0}return Br(t,r,e)}function qr(t,r,e){_r(t);var n=t.l,i=0|n[X],o=tt(t,i)?1:2;2===o&&br(t)&&(i=0|(n=t.l)[X]);var a=(t=xr(n,r))===C?7:0|t[X],s=Lr(a,i),u=!(4&s);if(u){4&s&&(t=jt(t),a=0,s=Kr(s,i),i=Ur(n,i,r,t));let e=0,o=0;for(;e<t.length;e++){let r=rr(t[e]);null!=r&&(t[o++]=r)}o<e&&(t.length=o),s=-513&s|4,s&=-1025,s&=-4097}s!==a&&(q(t,s),2&s&&Object.freeze(t)),(t=Pr(t,s,n,i,r,o,u,!0)).push(Qt(e))}var Qr=class{constructor(t,r,e){if(this.buffer=t,e&&!r)throw Error();this.g=r}};function te(t,r){if("string"==typeof t)return new Qr(E(t),r);if(Array.isArray(t))return new Qr(new Uint8Array(t),r);if(t.constructor===Uint8Array)return new Qr(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Qr(t,!1);if(t.constructor===x)return r=U(t)||new Uint8Array(0),new Qr(r,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Qr(t,!1);throw Error()}function re(t,r){var e=0,n=0,i=0,o=t.i,a=t.g;do{var s=o[a++];e|=(127&s)<<i,i+=7}while(i<32&&128&s);if(i>32)for(n|=(127&s)>>4,i=3;i<32&&128&s;i+=7)n|=(127&(s=o[a++]))<<i;if(se(t,a),!(128&s))return r(e>>>0,n>>>0);throw Error()}function ee(t){for(var r=0,e=t.g,n=e+10,i=t.i;e<n;){let n=i[e++];if(r|=n,!(128&n))return se(t,e),!!(127&r)}throw Error()}function ne(t){var r=t.i,e=t.g,n=r[e++],i=127&n;if(128&n&&(i|=(127&(n=r[e++]))<<7,128&n&&(i|=(127&(n=r[e++]))<<14,128&n&&(i|=(127&(n=r[e++]))<<21,128&n&&(i|=(n=r[e++])<<28,128&n&&128&r[e++]&&128&r[e++]&&128&r[e++]&&128&r[e++]&&128&r[e++])))))throw Error();return se(t,e),i}function ie(t){return re(t,Bt)}function oe(t){var r=t.i,e=t.g,n=r[e],i=r[e+1],o=r[e+2];return r=r[e+3],se(t,t.g+4),(n|i<<8|o<<16|r<<24)>>>0}function ae(t){return ne(t)}function se(t,r){if(t.g=r,r>t.j)throw Error()}function ue(t,r){if(r<0)throw Error();var e=t.g;if((r=e+r)>t.j)throw Error();return t.g=r,e}function le(t,r){if(0==r)return B();var e=ue(t,r);return t.K&&t.o?e=t.i.subarray(e,e+r):(t=t.i,e=e===(r=e+r)?new Uint8Array(0):bt?t.slice(e,r):new Uint8Array(t.subarray(e,r))),0==e.length?B():new x(e,T)}var ce=class{constructor(t,r,e,n){this.i=null,this.o=!1,this.g=this.j=this.m=0,this.init(t,r,e,n)}init(t,r,e,{K:n=!1,N:i=!1}={}){this.K=n,this.N=i,t&&(t=te(t,this.N),this.i=t.buffer,this.o=t.g,this.m=r||0,this.j=void 0!==e?this.m+e:this.i.length,this.g=this.m)}clear(){this.i=null,this.o=!1,this.g=this.j=this.m=0,this.K=!1}},he=[],fe=0;function de(t,r,e,n){if(Ae.length){let i=Ae.pop();return i.u(n),i.g.init(t,r,e,n),i}return new Se(t,r,e,n)}function ge(t){t.g.clear(),t.j=-1,t.i=-1,Ae.length<100&&Ae.push(t)}function ve(t){var r=t.g;if(r.g==r.j)return!1;t.m=t.g.g;var e=ne(t.g)>>>0;if(r=e>>>3,!((e&=7)>=0&&e<=5))throw Error();if(r<1)throw Error();return t.j=r,t.i=e,!0}function pe(t){try{switch(t.i){case 0:0!=t.i?pe(t):ee(t.g);break;case 1:var r=t.g;se(r,r.g+8);break;case 2:if(2!=t.i)pe(t);else{var e=ne(t.g)>>>0,n=t.g;se(n,n.g+e)}break;case 5:var i=t.g;se(i,i.g+4);break;case 3:me();let o=t.j;try{for(;;){if(!ve(t))throw Error();if(4==t.i){if(t.j!=o)throw Error();break}pe(t)}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{fe>0&&fe--}break;default:throw Error()}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}}function me(){if(fe>=100)throw new SyntaxError;fe++}function ye(t,r,e){var n=t.g.j,i=ne(t.g)>>>0,o=(i=t.g.g+i)-n;if(o<=0&&(t.g.j=i,e(r,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error();t.g.g=i,t.g.j=n}function we(t){var r=ne(t.g)>>>0,o=ue(t=t.g,r);if(t=t.i,s){var u,l=t;(u=i)||(u=i=new TextDecoder("utf-8",{fatal:!0})),r=o+r,l=0===o&&r===l.length?l:l.subarray(o,r);try{var c=u.decode(l)}catch(t){if(void 0===a){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),a=!0}catch(t){a=!1}}throw!a&&(i=void 0),t}}else{r=(c=o)+r,o=[];let i,a=null;for(;c<r;){var h=t[c++];h<128?o.push(h):h<224?c>=r?e():(i=t[c++],h<194||128!=(192&i)?(c--,e()):o.push((31&h)<<6|63&i)):h<240?c>=r-1?e():(i=t[c++],128!=(192&i)||224===h&&i<160||237===h&&i>=160||128!=(192&(u=t[c++]))?(c--,e()):o.push((15&h)<<12|(63&i)<<6|63&u)):h<=244?c>=r-2?e():(i=t[c++],128!=(192&i)||i-144+(h<<28)>>30||128!=(192&(u=t[c++]))||128!=(192&(l=t[c++]))?(c--,e()):(h=(7&h)<<18|(63&i)<<12|(63&u)<<6|63&l,h-=65536,o.push(55296+(h>>10&1023),56320+(1023&h)))):e(),o.length>=8192&&(a=n(a,o),o.length=0)}c=n(a,o)}return c}function be(t){var r=ne(t.g)>>>0;return le(t.g,r)}function _e(t,r,e){var n=ne(t.g)>>>0;for(n=t.g.g+n;t.g.g<n;)e.push(r(t.g))}var Se=class{constructor(t,r,e,n){if(he.length){let i=he.pop();i.init(t,r,e,n),t=i}else t=new ce(t,r,e,n);this.g=t,this.m=this.g.g,this.i=this.j=-1,this.u(n)}u({P:t=!1}={}){this.P=t}},Ae=[];function Ie(t){return new Be(4294967295&t,Math.floor(t/4294967296))}function Ee(t){return t?/^\d+$/.test(t)?(Lt(t),new Be(_t,St)):null:Te||=new Be(0,0)}var Te,Be=class{constructor(t,r){this.i=t>>>0,this.g=r>>>0}};function Ue(t){return new Me(4294967295&t,Math.floor(t/4294967296))}function Pe(t){return t?/^-?\d+$/.test(t)?(Lt(t),new Me(_t,St)):null:xe||=new Me(0,0)}var xe,Le,Ne,je,Oe,Ve,ke,Fe,Me=class{constructor(t,r){this.i=t>>>0,this.g=r>>>0}};function Ce(t,r,e){return"undefined"!=typeof BigInt64Array?(ke||(ke=new BigInt64Array(1),Fe=new Uint32Array(ke.buffer),ke[0]=BigInt(1),Ve=1===Fe[0]),ke[0]=t,new r(Fe[t=Ve?0:1],Fe[1-t])):(Oe||(Le=BigInt(Number.MIN_SAFE_INTEGER),Ne=BigInt(Number.MAX_SAFE_INTEGER),je=BigInt(4294967295),Oe=BigInt(32)),t>=Le&&t<=Ne?e(Number(t)):(t=BigInt.asUintN(64,t),new r(Number(t&je),Number(t>>Oe))))}function Ge(t,r,e){for(;e>0||r>127;)t.g.push(127&r|128),r=(r>>>7|e<<25)>>>0,e>>>=7;t.g.push(r)}function De(t,r){for(;r>127;)t.g.push(127&r|128),r>>>=7;t.g.push(r)}function Re(t,r){if(r>=0)De(t,r);else{for(let e=0;e<9;e++)t.g.push(127&r|128),r>>=7;t.g.push(1)}}function We(t,r){Lt(r),function(t){var r=St>>31;t(_t<<1^r,(St<<1|_t>>>31)^r)}((r,e)=>{Ge(t,r>>>0,e>>>0)})}function He(t,r){t.g.push(r>>>0&255),t.g.push(r>>>8&255),t.g.push(r>>>16&255),t.g.push(r>>>24&255)}var $e=class{constructor(){this.g=[]}length(){return this.g.length}end(){var t=this.g;return this.g=[],t}};function ze(t,r){0!==r.length&&(t.j.push(r),t.i+=r.length)}function Ke(t,r,e){De(t.g,8*r+e)}function Je(t,r){return Ke(t,r,2),r=t.g.end(),ze(t,r),r.push(t.i),r}function Xe(t,r){var e=r.pop();for(e=t.i+t.g.length()-e;e>127;)r.push(127&e|128),e>>>=7,t.i++;r.push(e),t.i++}function Ye(t,r,e){if(null!=e)switch(Ke(t,r,0),typeof e){case"number":t=t.g,It(e),Ge(t,_t,St);break;case"bigint":e=Ce(e,Me,Ue),Ge(t.g,e.i,e.g);break;default:e=Pe(e),Ge(t.g,e.i,e.g)}}function Ze(t,r,e){Ke(t,r,2),De(t.g,e.length),ze(t,t.g.end()),ze(t,e)}var qe=class{constructor(){this.j=[],this.i=0,this.g=new $e}};function Qe(t){if("string"==typeof t)Pe(t)}function tn(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var rn=tn(),en=tn(),nn=tn(),on=tn(),an=tn(),sn=tn(),un=tn(),ln=tn(),cn=tn(),hn=tn(),fn=tn(),dn=tn();var gn=class{constructor(t,r){this.l=vr(t,r,void 0,2048)}toJSON(){return dr(this)}};gn.prototype[z]=Q,gn.prototype.toString=function(){return this.l.toString()};var vn=class{constructor(t,r,e){this.g=t,this.i=r,t=rn,this.j=!!t&&e===t||!1}};function pn(t,r){return new vn(t,r,rn)}function mn(t,r,e,n,i){null!=(r=Pn(r,n))&&(e=Je(t,e),i(r,t),Xe(t,e))}var yn,wn,bn=pn(function(t,r,e,n,i){return 2===t.i&&(ye(t,Cr(r,n,e),i),!0)},mn),_n=pn(function(t,r,e,n,i){return 2===t.i&&(ye(t,Cr(r,n,e),i),!0)},mn),Sn=Symbol(),An=Symbol(),In=Symbol(),En=Symbol(),Tn=Symbol();function Bn(t,r,e,n){var i=n[t];if(i)return i;(i={}).T=n,i.I=function(t){switch(typeof t){case"boolean":return sr||=[0,void 0,!0];case"number":return t>0?void 0:0===t?ur||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var o=n[1],a=1;o&&o.constructor===Object&&(i.L=o,"function"==typeof(o=n[++a])&&(i.R=!0,yn??=o,wn??=n[a+1],o=n[a+=2]));for(var s={};o&&Array.isArray(o)&&o.length&&"number"==typeof o[0]&&o[0]>0;){for(var u=0;u<o.length;u++)s[o[u]]=o;o=n[++a]}for(u=1;void 0!==o;){let t;"number"==typeof o&&(u+=o,o=n[++a]);var l=void 0;if(o instanceof vn?t=o:(t=bn,a--),t?.j){o=n[++a],l=n;var c=a;"function"==typeof o&&(o=o(),l[c]=o),l=o}for(c=u+1,"number"==typeof(o=n[++a])&&o<0&&(c-=o,o=n[++a]);u<c;u++){let n=s[u];l?e(i,u,t,l,n):r(i,u,t,n)}}return n[t]=i}function Un(t){return Array.isArray(t)?t[0]instanceof vn?t:[_n,t]:[t,void 0]}function Pn(t,r){return t instanceof gn?t.l:Array.isArray(t)?gr(t,r):void 0}function xn(t,r,e,n){var i=e.g;t[r]=n?(t,r,e)=>i(t,r,e,n):i}function Ln(t,r,e,n,i){var o,a,s=e.g;t[r]=(t,r,e)=>s(t,r,e,a||=Bn(An,xn,Ln,n).I,o||=Nn(n),i)}function Nn(t){var r=t[In];if(null!=r)return r;var e=Bn(An,xn,Ln,t);return r=e.R?(t,r)=>yn(t,r,e):(t,r)=>{t:{me();try{for(;ve(r)&&4!=r.i;){let u=r.j,l=e[u];if(null==l){let t=e.L;if(t){let r=t[u];if(r){let t=On(r);null!=t&&(l=e[u]=t)}}}if(null==l||!l(r,t,u)){var n=r;let e=n.m;if(pe(n),n.P)var i=void 0;else{let t=n.g.g-e;n.g.g=e,i=le(n.g,t)}n=void 0;var o=t,a=u,s=i;s&&((n=o[R]??(o[R]=new lr))[a]??(n[a]=[])).push(s)}}let l=ir(t);l&&(l.g=e.T[Tn]);var u=!0;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{fe>0&&fe--}u=void 0}return u},t[In]=r,t[Tn]=jn.bind(t),r}function jn(t,r,e,n){var i=this[An],o=this[In],a=gr(void 0,i.I),s=ir(t);if(s){var u=!1,l=i.L;if(l){if(i=(r,e,i)=>{if(0!==i.length)if(l[e])for(let t of i){r=de(t);try{u=!0,o(a,r)}finally{ge(r)}}else n?.(t,e,i)},null==r)or(s,i);else if(null!=s){let t=s[r];t&&i(s,r,t)}if(u){let n=0|t[X];if(2&n&&2048&n&&!e?.ja)throw Error();let i=at(n),o=(r,o)=>{if(null!=Tr(t,r,i)){if(1===e?.ia)return;throw Error()}null!=o&&(n=Ur(t,n,r,o,i)),delete s[r]};null==r?it(a,0|a[X],(t,r)=>{o(t,r)}):o(r,Tr(a,r,i))}}}}function On(t){var r=(t=Un(t))[0].g;if(t=t[1]){let e=Nn(t),n=Bn(An,xn,Ln,t).I;return(t,i,o)=>r(t,i,o,n,e)}return r}function Vn(t,r,e){t[r]=e.i}function kn(t,r,e,n){var i,o,a=e.i;t[r]=(t,r,e)=>a(t,r,e,o||=Bn(Sn,Vn,kn,n).I,i||=Fn(n))}function Fn(t){var r=t[En];if(!r){let e=Bn(Sn,Vn,kn,t);r=(t,r)=>Mn(t,r,e),t[En]=r}return r}function Mn(t,r,e){it(t,0|t[X],(t,n)=>{if(null!=n){var i=function(t,r){var e=t[r];if(e)return e;if((e=t.L)&&(e=e[r])){var n=(e=Un(e))[0].i;if(e=e[1]){let r=Fn(e),i=Bn(Sn,Vn,kn,e).I;e=t.R?wn(i,r):(t,e,o)=>n(t,e,o,i,r)}else e=n;return t[r]=e}}(e,t);i?i(r,n,t):t<500||V(H,3)}}),(t=ir(t))&&or(t,(t,e,n)=>{for(ze(r,r.g.end()),t=0;t<n.length;t++)ze(r,U(n[t])||new Uint8Array(0))})}var Cn=ft(0);function Gn(t,r,e){if(Array.isArray(r)){var n=0|r[X];if(4&n)return r;for(var i=0,o=0;i<r.length;i++){let e=t(r[i]);null!=e&&(r[o++]=e)}return o<i&&(r.length=o),t=1|n,e&&(t=-1537&t|4),t!==n&&q(r,t),e&&2&t&&Object.freeze(r),r}}var Dn=(t,r)=>{var e=new qe;Mn(t.l,e,Bn(Sn,Vn,kn,r)),ze(e,e.g.end()),t=new Uint8Array(e.i);var n=(r=e.j).length,i=0;for(let e=0;e<n;e++){let n=r[e];t.set(n,i),i+=n.length}return e.j=[t],t};function Rn(t,r,e){return new vn(t,r,e)}function Wn(t,r,e){return new vn(t,r,e)}function Hn(t,r,e){Ur(t,0|t[X],r,e,at(0|t[X]))}function $n(t,r,e){null!=(r=Zt(r))&&(Qe(r),Ye(t,e,r))}function zn(t,r,e){null!=(r=Rt(r))&&null!=r&&(Ke(t,e,0),Re(t.g,r))}function Kn(t,r,e){null!=(r=null==r||"boolean"==typeof r?r:"number"==typeof r?!!r:void 0)&&(Ke(t,e,0),t.g.g.push(r?1:0))}function Jn(t,r,e){null!=(r=rr(r))&&Ze(t,e,l(r))}function Xn(t,r,e,n,i){null!=(r=Pn(r,n))&&(e=Je(t,e),i(r,t),Xe(t,e))}function Yn(t,r,e){null!=(r=qt(r))&&Ze(t,e,te(r,!0).buffer)}function Zn(t,r,e){r=function(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Ft(t)?t>>>0:void 0}(r),null!=r&&null!=r&&(Ke(t,e,0),De(t.g,r))}function qn(t,r,e){null!=(r=Rt(r))&&(r=parseInt(r,10),Ke(t,e,0),Re(t.g,r))}function Qn(t,r,e){return 0===t.i&&(Hn(r,e,ie(t.g)),!0)}function ti(t,r,e){return(0===t.i||2===t.i)&&(r=Vr(r,0|r[X],e),2==t.i?_e(t,ne,r):r.push(ne(t.g)),!0)}function ri(t,r,e){return 2===t.i&&(Hn(r,e,(t=be(t))===B()?void 0:t),!0)}var ei=Rn(function(t,r,e){if(1!==t.i)return!1;var n=t.g;t=oe(n);var i=oe(n);n=2*(i>>31)+1;var o=i>>>20&2047;return t=4294967296*(1048575&i)+t,Hn(r,e,2047==o?t?NaN:n*(1/0):0==o?5e-324*n*t:n*Math.pow(2,o-1075)*(t+4503599627370496)),!0},function(t,r,e){null!=(r=Ct(r))&&(Ke(t,e,1),t=t.g,(e=wt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+r,!0),_t=e.getUint32(0,!0),St=e.getUint32(4,!0),He(t,_t),He(t,St))},hn),ni=Rn(function(t,r,e){if(5!==t.i)return!1;var n=oe(t.g);t=2*(n>>31)+1;var i=n>>>23&255;return n&=8388607,Hn(r,e,255==i?n?NaN:t*(1/0):0==i?1401298464324817e-60*t*n:t*Math.pow(2,i-150)*(n+8388608)),!0},function(t,r,e){null!=(r=Ct(r))&&(Ke(t,e,5),t=t.g,(e=wt||=new DataView(new ArrayBuffer(8))).setFloat32(0,+r,!0),St=0,He(t,_t=e.getUint32(0,!0)))},cn),ii=Rn(function(t,r,e){return Qn(t,r,e)},$n,sn),oi=Rn(function(t,r,e){return Qn(t,r,e)},$n,sn),ai=Wn(function(t,r,e){return 0!==t.i&&2!==t.i?t=!1:(r=Vr(r,0|r[X],e),2==t.i?_e(t,ie,r):r.push(ie(t.g)),t=!0),t},function(t,r,e){if(null!=(r=Gn(Zt,r,!1)))for(let n=0;n<r.length;n++)Ye(t,e,r[n])},sn),si=Rn(function(t,r,e){return 0!==t.i?r=!1:(Hn(r,e,(t=ie(t.g))===Cn?void 0:t),r=!0),r},$n,sn),ui=Rn(function(t,r,e){return 0!==t.i?t=!1:(Hn(r,e,re(t.g,Tt)),t=!0),t},function(t,r,e){if(r=function(t){if(null==t)return t;var r=typeof t;if("bigint"===r)return String(Vt(64,t));if(Dt(t)){if("string"===r)return r=Mt(Number(t)),kt(r)&&r>=0?t=String(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),t=Ht(t)),t;if("number"===r)return zt(t)}}(r),null!=r){if("string"==typeof r)Ee(r);if(null!=r)switch(Ke(t,e,0),typeof r){case"number":t=t.g,It(r),Ge(t,_t,St);break;case"bigint":e=Ce(r,Be,Ie),Ge(t.g,e.i,e.g);break;default:e=Ee(r),Ge(t.g,e.i,e.g)}}},un),li=Rn(function(t,r,e){return 0===t.i&&(Hn(r,e,ne(t.g)),!0)},zn,on),ci=Wn(ti,function(t,r,e){if(null!=(r=Gn(Rt,r,!0)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&(Ke(n,i,0),Re(n.g,o))}},on),hi=Wn(ti,function(t,r,e){if(null!=(r=Gn(Rt,r,!0))&&r.length){e=Je(t,e);for(let e=0;e<r.length;e++)Re(t.g,r[e]);Xe(t,e)}},on),fi=Rn(function(t,r,e){return 0===t.i&&(Hn(r,e,0===(t=ne(t.g))?void 0:t),!0)},zn,on),di=Rn(function(t,r,e){return 0===t.i&&(Hn(r,e,ee(t.g)),!0)},Kn,en),gi=Rn(function(t,r,e){return 0===t.i&&(Hn(r,e,!1===(t=ee(t.g))?void 0:t),!0)},Kn,en),vi=Wn(function(t,r,e){return 2===t.i&&(t=we(t),Vr(r,0|r[X],e).push(t),!0)},function(t,r,e){if(null!=(r=Gn(rr,r,!0)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&Ze(n,i,l(o))}},nn),pi=Rn(function(t,r,e){return 2===t.i&&(Hn(r,e,""===(t=we(t))?void 0:t),!0)},Jn,nn),mi=Rn(function(t,r,e){return 2===t.i&&(Hn(r,e,we(t)),!0)},Jn,nn),yi=function(t,r,e=rn){return new vn(t,r,e)}(function(t,r,e,n,i){return 2===t.i&&(n=gr(void 0,n),Vr(r,0|r[X],e).push(n),ye(t,n,i),!0)},function(t,r,e,n,i){if(Array.isArray(r)){for(let o=0;o<r.length;o++)Xn(t,r[o],e,n,i);1&(t=0|r[X])||q(r,1|t)}}),wi=pn(function(t,r,e,n,i,o){if(2!==t.i)return!1;var a=0|r[X];return Fr(r,a,o,e,at(a)),ye(t,r=Cr(r,n,e),i),!0},Xn),bi=Rn(function(t,r,e){return 2===t.i&&(Hn(r,e,be(t)),!0)},Yn,fn),_i=Wn(function(t,r,e){return 2===t.i&&(t=be(t),Vr(r,0|r[X],e).push(t),!0)},function(t,r,e){if(null!=(r=Gn(qt,r,!1)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&Ze(n,i,te(o,!0).buffer)}},fn),Si=Rn(function(t,r,e){return 0===t.i&&(Hn(r,e,ne(t.g)>>>0),!0)},Zn,an),Ai=Rn(function(t,r,e){return 0===t.i&&(Hn(r,e,0===(t=ne(t.g)>>>0)?void 0:t),!0)},Zn,an),Ii=Rn(function(t,r,e){return 0===t.i&&(Hn(r,e,ne(t.g)),!0)},qn,dn),Ei=Rn(function(t,r,e){return 0===t.i&&(Hn(r,e,0===(t=ne(t.g))?void 0:t),!0)},qn,dn),Ti=Rn(function(t,r,e){return 0!==t.i?t=!1:(Hn(r,e,function(t){return re(t,(t,r)=>{var e=-(1&t);return Bt(t=(t>>>1|r<<31)^e,r>>>1^e)})}(t.g)),t=!0),t},function(t,r,e){if(null!=(r=Zt(r))&&(Qe(r),null!=r))switch(Ke(t,e,0),typeof r){case"number":t=t.g,r=(e=r)<0,At(e=2*Math.abs(e)),e=_t;let n=St;r&&(0==e?0==n?n=e=4294967295:(n--,e=4294967295):e--),Ge(t,_t=e,St=n);break;case"bigint":t=t.g,r=r<<BigInt(1)^r>>BigInt(63),_t=Number(BigInt.asUintN(32,r)),St=Number(BigInt.asUintN(32,r>>BigInt(32))),Ge(t,_t,St);break;default:We(t.g,r)}},ln);function Bi(t){return function(){return Dn(this,t)}}var Ui,Pi=[0,bi,_i,di,mi],xi=[0,pi,[0,Ei,[0,si,fi],Ei,-1,[0,Ii],Ei,-1],Rn(ri,Yn,fn)],Li=[0,pi,Rn(ri,function(t,r,e){if(null!=r){if(r instanceof gn){let n=r.la;return void(n?(r=n(r),null!=r&&Ze(t,e,te(r,!0).buffer)):V(H,3))}if(Array.isArray(r))return void V(H,3)}Yn(t,r,e)},fn)],Ni=[0,1,[0,12,li,10,di],[0,7,[0,li,-1]]],ji=globalThis.trustedTypes;var Oi=class{constructor(t){this.g=t}toString(){return this.g+""}};function Vi(t){var r;return void 0===Ui&&(Ui=function(){var t=null;if(!ji)return t;try{let r=t=>t;t=ji.createPolicy("goog#html",{createHTML:r,createScript:r,createScriptURL:r})}catch(t){}return t}()),t=(r=Ui)?r.createScriptURL(t):t,new Oi(t)}function ki(t,...r){if(0===r.length)return Vi(t[0]);var e=t[0];for(let n=0;n<r.length;n++)e+=encodeURIComponent(r[n])+t[n+1];return Vi(e)}var Fi=[0,li,Ii,di,-1,hi,Ii,-1,di,-1],Mi=[0,Ii,-1,di],Ci=class extends gn{constructor(t){super(t)}},Gi=[0,di,mi,di,Ii,-1,Wn(function(t,r,e){return(0===t.i||2===t.i)&&(r=Vr(r,0|r[X],e),2==t.i?_e(t,ae,r):r.push(ne(t.g)),!0)},function(t,r,e){if(null!=(r=Gn(Rt,r,!0))&&r.length){e=Je(t,e);for(let e=0;e<r.length;e++)Re(t.g,r[e]);Xe(t,e)}},dn),mi,-1,[0,di,-1],Ii,di,-1,Mi],Di=[0,3,di,-1,2,[0,[2],li,wi,[0,Si]],[0,Ii,di,Ii,di,Ii,4,[0,di,mi,-1,di]],[0,[3,4],mi,-1,wi,[0,li],wi,[0,Ii,-1]],[0]],Ri=[0,mi,-2],Wi=class extends gn{constructor(t){super(t)}},Hi=[0],$i=[0,li,di,1,di,-4],zi=class extends gn{constructor(t){super(t,2)}},Ki={};Ki[336783863]=[0,mi,di,-1,li,[0,[1,2,3,4,5,6,7,8,9],wi,Hi,wi,Gi,wi,Ri,wi,$i,wi,Fi,wi,[0,mi,-2],wi,[0,mi,Ii],wi,Di,wi,Mi],[0,mi],di,[0,[1,3],[2,4],wi,[0,hi],-1,wi,[0,vi],-1,yi,[0,mi,-1]],mi];var Ji=[0,si,-1,gi,-3,si,hi,pi,fi,si,-1,gi,fi,gi,-2,pi],Xi=class extends gn{constructor(t){super(t,500)}u(t){return $r(this,0,7,t)}},Yi=[-1,{}],Zi=[0,mi,1,Yi],qi=[0,mi,vi,Yi],Qi=class extends gn{constructor(t){super(t,500)}u(t){return $r(this,0,1001,t)}};Qi.prototype.i=Bi([-500,yi,[-500,pi,-1,vi,-3,[-2,Ki,di],yi,Li,fi,-1,Zi,qi,yi,[0,pi,gi],pi,Ji,fi,vi,987,vi],4,yi,[-500,mi,-1,[-1,{}],998,mi],yi,[-500,mi,vi,-1,[-2,{},di],997,vi,-1],fi,yi,[-500,mi,vi,Yi,998,vi],vi,fi,Zi,qi,yi,[0,pi,-1,Yi],vi,-2,Ji,pi,-1,gi,[0,gi,Ai],978,Yi,yi,Li]);var to,ro=class extends gn{constructor(t){super(t)}},eo=class extends gn{constructor(t){super(t)}i(){return Wr(this,ro)}},no=[0,yi,[0,li,ni,mi,-1]],io=class extends gn{constructor(t){super(t)}},oo=class extends gn{constructor(t){super(t)}i(){var t=this.l,r=0|t[X],e=ao,n=this.l;return e=2===Mr(kr(n),n,void 0,e)?2:-1,void 0!==Gr(t,r,Ci,e)}},ao=[1,2,3,4,5,6],so=class extends gn{constructor(t){super(t)}i(){return null!=Er(this,1,void 0,jr)}j(){return null!=rr(Er(this,2))}},uo=class extends gn{constructor(t){super(t)}},lo=class extends gn{constructor(t){super(t)}};to=new class{constructor(){var t=zi;this.g=lo,this.j=$r,this.defaultValue=void 0,this.i=null!=t.ga?ot:void 0}register(){v(this)}},Ki[451755788]=[0,[0,[0,bi,mi,[0,li,oi,-1],[0,ui,oi]],di,[0,ao,wi,$i,wi,Gi,wi,Fi,wi,Hi,wi,Ri,wi,Di],Ii],[0,mi,li,ni,vi,-1],ei];var co,ho,fo=class extends gn{constructor(t){super(t)}},go=(co=class extends gn{constructor(t){super(t)}},ho=[0,yi,[0,1,li,mi,no],oi],(t,r)=>{t:{let n={N:!0};r&&Object.assign(n,r),t=de(t,void 0,void 0,n);try{let r=new co,n=r.l;Nn(ho)(n,t);var e=r;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{ge(t)}e=void 0}return e});function vo(t){return Zr(new po,1,t)}var po=class extends gn{constructor(t){super(t)}},mo=class extends gn{constructor(t){super(t)}},yo=[0,Ii,2,ui,-2,oi,yi,[0,Ii,oi]],wo=class extends gn{constructor(t){super(t)}},bo=class extends gn{constructor(t){super(t)}};function _o(t){var r=new So;return r=Zr(r,1,4),Zr(r,2,t)}var So=class extends gn{constructor(t){super(t)}},Ao=[3,4,5,6,7],Io=class extends gn{constructor(t){super(t)}},Eo=class extends gn{constructor(t){super(t)}};Eo.prototype.i=Bi([0,[0,Ii,mi,-3,Ii],[0,Ao,Ii,-1,wi,[0,Ii,mi,ui],wi,yo,wi,[0,1,yo],wi,[0,Ii],wi,[0,Ii,mi,ui]]]);var To=class{constructor(){this.g="undefined"!=typeof AbortController}async send(t,r,e){var n=this.g?new AbortController:void 0,i=n&&t.M>0?setTimeout(()=>{n.abort()},t.M):void 0;try{let i=await fetch(t.url,{method:t.ba,headers:{...t.aa},...t.body&&{body:t.body},...t.withCredentials&&{credentials:"include"},signal:t.M&&n?n.signal:null});200===i.status?r?.(await i.text()):e?.(i.status)}catch(t){if("AbortError"===t?.name)e?.(408);else e?.(400)}finally{clearTimeout(i)}}},Bo=class extends gn{constructor(t){super(t,37)}},Uo=[-4,{},Ni,Ii,xi],Po=[0,mi,Ii,1,mi,-1,Ii,1,Ii,1,oi],xo=[0,Ii,mi,-2],Lo=[0,mi,Ii],No=[0,mi,Ii],jo=[0,di,-3],Oo=[0,Ii,mi,-1,oi,li,-1,mi,-5,yi,[0,mi,-4],-1,di,[0,di,-3],Ii];var Vo=class extends gn{constructor(t){super(t,19)}},ko=function(t){return r=>Dn(r,t)}([-19,{},[0,Ii,1,[0,mi,-6,oi,li,mi,-1,oi],1,[0,mi,1,mi,-5],mi,-1,[0,Ii,mi,-8],[0,mi,-3],[0,mi,Ii,mi,-2],[0,mi,-1,Ii,mi,-1,Ii,mi,-1,[0,yi,[0,mi,-1],di,mi,-5],[0,Ii,di,li,-2]],oi,[0,mi,-3,oi,li,mi,-1],[0,Ii,mi,-1],[0,mi,-9],[0,mi,-6,Ii,mi,1,mi,di,Ii,-1,di,mi,-2,Ii,mi,Ii,mi,li,-1],1,[0,Ii],1,[0,mi,-4],1,Po,[0,[1,2,3,4,5,6],wi,Po,wi,Lo,wi,No,wi,[0,Ii],wi,Oo,wi,xo],Lo,No,Oo,[0,[0,Ii,mi,-1,oi,li,-1,mi,-4,yi,[0,mi,-4],-1,1,jo],[0,Ii,mi,-1,oi,li,-1,mi,-4,jo]],xo,[0,mi,[0,li,-3,Ii],Ii,-2,[0,li,-1],di],4,[0,mi,Ii,mi,-1,oi,Ii,mi,-1,Ii,li,-1]],Ii,yi,[-37,{},ii,mi,yi,[0,mi,-1],bi,1,bi,[0,vi,-1,ci,ai,-1],mi,[0,li,mi,-1],di,li,oi,mi,-1,Ti,Pi,ii,bi,Ii,ci,oi,-1,[0,Ii,-1],mi,di,mi,hi,mi,-1,ei,1,ei,Uo,di,[0,Ii,[0,ni,li,-2],[0,ni]],[0,Ii,oi]],ii,_i,mi,-1,ii,Ii,-1,[0,di,-1,Ii,di],[0,oi,-1,mi],[0,ii,di,oi],oi,1,Si,1,Uo]),Fo=class{constructor(t){this.i=[],this.m=new To,this.j=t??"",this.g=setInterval(()=>{this.flush()},6e4)}close(){void 0!==this.g&&(clearInterval(this.g),this.g=void 0),this.flush()}flush(t,r){if(this.error)r?.("net-send-failed");else if(0===this.i.length)t?.();else{var e=this.i;this.i=[],e=function(t){var r=new Vo;{_r(r=Zr(r,2,1786));let l=r.l,c=0|l[X];if(null==t)Ur(l,c,3);else{var e=t===C?7:0|t[X],n=e,i=Nr(e),o=i||Object.isFrozen(t),a=!0,s=!0;for(let r=0;r<t.length;r++){var u=t[r];i||(u=tt(u),a&&=!u,s&&=u)}i||(e=a?13:5,e=s?-4097&e:4096|e),o&&e===n||(t=jt(t),n=0,e=Kr(e,c)),e!==n&&q(t,e),c=Ur(l,c,3,t),2&e||!(4096&e||16&e)||Sr(l,c)}}return r}(e),e=ko(e),this.m.send({url:"https://odml.pa.googleapis.com/v1/log",ba:"POST",M:1e4,body:e,ea:2,aa:{"Content-Type":"application/x-protobuf","x-goog-api-key":this.j},withCredentials:!1},()=>{t?.()},t=>{this.error=Error(`Logging failed with HTTP error: ${t}`),this.i=[],void 0!==this.g&&(clearInterval(this.g),this.g=void 0),r?.("net-send-failed",t)})}}};class Mo{constructor(){this.H=this.A=this.G=this.v=this.C=this.D=this.B=0}}function Co(t,r){var e=new Eo;e=$r(e,0,1,t.da),e=$r(e,0,2,r),r=Br(r=new Bo,6,et(e=e.i(),!1)),(t=t.F).error||t.i.push(r)}function Go(t,r){var e={B:r.B-t.j.B,D:r.D-t.j.D,C:r.C-t.j.C,v:r.v-t.j.v,G:r.G-t.j.G,A:r.A,H:r.H},n=_o(1);e=Do(t,e),Co(t,n=zr(n,4,Ao,e)),t.j=r}function Do(t,r){var e=new mo;return t=Yr(t=Xr(t=Zr(e,1,t.J),7,r.v),5,r.A),t=Yr(t,6,r.H),r.C>0&&Yr(t,4,r.G/r.C),0!==r.B&&(e=Xr(e=vo(3),2,r.B),Jr(t,8,po,e)),0!==r.D&&(r=Xr(e=vo(4),2,r.D),Jr(t,8,po,r)),t}var Ro=class{constructor(t,r){this.S=performance.now(),this.m=performance.now(),this.i=new Map,this.o=0,this.g=new Mo,this.j=new Mo,this.F=new Fo(r),this.J=function(t){switch(t){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),t=new Io,"undefined"==typeof window?r=0:(r=navigator.userAgent,r=/Android/i.test(r)?1:/iPhone|iPad|iPod/i.test(r)?2:/Windows/i.test(r)?5:/Macintosh/i.test(r)?4:/Linux/i.test(r)?3:0),t=Br(t=Zr(t,1,r),2,tr("")),t=Br(t,3,tr("")),t=Br(t,4,tr("1.0.1")),t=Br(t,5,tr("")),this.da=Zr(t,6,4)}Y(){var t=new bo;t=Yr(t=Zr(t,1,this.J),3,performance.now()-this.S),Co(this,t=zr(_o(0),3,Ao,t)),this.m=performance.now()}X(){var t={...this.g,v:this.g.v+this.i.size,A:this.o,H:performance.now()-this.S};Go(this,t);var r=new wo;r=$r(r,0,2,t=Do(this,t)),Co(this,r=zr(t=_o(2),5,Ao,r))}close(){var t=this.F;"function"==typeof t.close?t.close():t.flush()}};function Wo(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Ho(t){if("function"!=typeof importScripts){let r=document.createElement("script");return r.src=t.toString(),r.crossOrigin="anonymous",new Promise((t,e)=>{r.addEventListener("load",()=>{t()},!1),r.addEventListener("error",t=>{e(t)},!1),document.body.appendChild(r)})}try{importScripts(t.toString())}catch(r){if(!(r instanceof TypeError))throw r;{let r=self.import;r?await r(t.toString()):await import(t.toString())}}}function $o(t,r,e){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),e(r=t.h.stringToNewUTF8(r)),t.h._free(r)}function zo(t,r,e){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(r.length);for(let e=0;e<r.length;e++)n[e]=t.h.stringToNewUTF8(r[e]);r=t.h._malloc(4*n.length),t.h.HEAPU32.set(n,r>>2),e(r);for(let r of n)t.h._free(r);t.h._free(r)}function Ko(t,r,e){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[r]=e}function Jo(t,r,e){var n=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[r]=(t,r,i)=>{r?(e(n,i),n=[]):n.push(t)}}var Xo=function(t){return class extends t{get O(){return this.h}V(){if("function"==typeof this.O._mediapipeLoggerGetEncodedApiKey){let t=this.O._mediapipeLoggerGetEncodedApiKey();return this.O._decodeBase64(t)}}}}(function(t){return class extends t{Z(){this.h._registerModelResourcesGraphService()}}}(class{constructor(t,r){this.j=!0,this.h=t,this.g=null,this.i=0,this.m="function"==typeof this.h._addIntToInputStream,void 0!==r?this.h.canvas=r:Wo()?this.h.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.h.canvas=document.createElement("canvas"))}async initializeGraph(t){var r=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(r),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,r){var e=t.length,n=this.h._malloc(e);this.h.HEAPU8.set(t,n),r?this.h._changeBinaryGraph(e,n):this.h._changeTextGraph(e,n),this.h._free(n)}configureAudio(t,r,e,n,i){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),$o(this,n||"input_audio",n=>{$o(this,i=i||"audio_header",i=>{this.h._configureAudio(n,i,t,r??0,e)})})}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.h._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.h.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.h.errorListener=t}attachEmptyPacketListener(t,r){this.h.emptyPacketListeners=this.h.emptyPacketListeners||{},this.h.emptyPacketListeners[t]=r}addAudioToStream(t,r,e){this.addAudioToStreamWithShape(t,0,0,r,e)}addAudioToStreamWithShape(t,r,e,n,i){var o=4*t.length;this.i!==o&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(o),this.i=o),this.h.HEAPF32.set(t,this.g/4),$o(this,n,t=>{this.h._addAudioToInputStream(this.g,r,e,t,i)})}addGpuBufferToStream(t,r,e){$o(this,r,r=>{if(!this.h.canvas)throw Error("No OpenGL canvas configured.");r?this.h._bindTextureToStream(r):this.h._bindTextureToCanvas();var n=this.h.canvas.getContext("webgl2")||this.h.canvas.getContext("webgl");if(!n)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");this.h.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),this.h.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);var[i,o]=void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height];!this.j||i===this.h.canvas.width&&o===this.h.canvas.height||(this.h.canvas.width=i,this.h.canvas.height=o);var[a,s]=[i,o];this.h._addBoundTextureToStream(r,a,s,e)})}addBoolToStream(t,r,e){$o(this,r,r=>{this.h._addBoolToInputStream(t,r,e)})}addDoubleToStream(t,r,e){$o(this,r,r=>{this.h._addDoubleToInputStream(t,r,e)})}addFloatToStream(t,r,e){$o(this,r,r=>{this.h._addFloatToInputStream(t,r,e)})}addIntToStream(t,r,e){$o(this,r,r=>{this.h._addIntToInputStream(t,r,e)})}addUintToStream(t,r,e){$o(this,r,r=>{this.h._addUintToInputStream(t,r,e)})}addStringToStream(t,r,e){$o(this,r,r=>{$o(this,t,t=>{this.h._addStringToInputStream(t,r,e)})})}addStringRecordToStream(t,r,e){$o(this,r,r=>{zo(this,Object.keys(t),n=>{zo(this,Object.values(t),i=>{this.h._addFlatHashMapToInputStream(n,i,Object.keys(t).length,r,e)})})})}addProtoToStream(t,r,e,n){$o(this,e,e=>{$o(this,r,r=>{var i=this.h._malloc(t.length);this.h.HEAPU8.set(t,i),this.h._addProtoToInputStream(i,t.length,r,e,n),this.h._free(i)})})}addEmptyPacketToStream(t,r){$o(this,t,t=>{this.h._addEmptyPacketToInputStream(t,r)})}addBoolVectorToStream(t,r,e){$o(this,r,r=>{var n=this.h._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let r of t)this.h._addBoolVectorEntry(n,r);this.h._addBoolVectorToInputStream(n,r,e)})}addDoubleVectorToStream(t,r,e){$o(this,r,r=>{var n=this.h._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let r of t)this.h._addDoubleVectorEntry(n,r);this.h._addDoubleVectorToInputStream(n,r,e)})}addFloatVectorToStream(t,r,e){$o(this,r,r=>{var n=this.h._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let r of t)this.h._addFloatVectorEntry(n,r);this.h._addFloatVectorToInputStream(n,r,e)})}addIntVectorToStream(t,r,e){$o(this,r,r=>{var n=this.h._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let r of t)this.h._addIntVectorEntry(n,r);this.h._addIntVectorToInputStream(n,r,e)})}addUintVectorToStream(t,r,e){$o(this,r,r=>{var n=this.h._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let r of t)this.h._addUintVectorEntry(n,r);this.h._addUintVectorToInputStream(n,r,e)})}addStringVectorToStream(t,r,e){$o(this,r,r=>{var n=this.h._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let r of t)$o(this,r,t=>{this.h._addStringVectorEntry(n,t)});this.h._addStringVectorToInputStream(n,r,e)})}addBoolToInputSidePacket(t,r){$o(this,r,r=>{this.h._addBoolToInputSidePacket(t,r)})}addDoubleToInputSidePacket(t,r){$o(this,r,r=>{this.h._addDoubleToInputSidePacket(t,r)})}addFloatToInputSidePacket(t,r){$o(this,r,r=>{this.h._addFloatToInputSidePacket(t,r)})}addIntToInputSidePacket(t,r){$o(this,r,r=>{this.h._addIntToInputSidePacket(t,r)})}addUintToInputSidePacket(t,r){$o(this,r,r=>{this.h._addUintToInputSidePacket(t,r)})}addStringToInputSidePacket(t,r){$o(this,r,r=>{$o(this,t,t=>{this.h._addStringToInputSidePacket(t,r)})})}addProtoToInputSidePacket(t,r,e){$o(this,e,e=>{$o(this,r,r=>{var n=this.h._malloc(t.length);this.h.HEAPU8.set(t,n),this.h._addProtoToInputSidePacket(n,t.length,r,e),this.h._free(n)})})}addBoolVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.h._allocateBoolVector(t.length);if(!e)throw Error("Unable to allocate new bool vector on heap.");for(let r of t)this.h._addBoolVectorEntry(e,r);this.h._addBoolVectorToInputSidePacket(e,r)})}addDoubleVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.h._allocateDoubleVector(t.length);if(!e)throw Error("Unable to allocate new double vector on heap.");for(let r of t)this.h._addDoubleVectorEntry(e,r);this.h._addDoubleVectorToInputSidePacket(e,r)})}addFloatVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.h._allocateFloatVector(t.length);if(!e)throw Error("Unable to allocate new float vector on heap.");for(let r of t)this.h._addFloatVectorEntry(e,r);this.h._addFloatVectorToInputSidePacket(e,r)})}addIntVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.h._allocateIntVector(t.length);if(!e)throw Error("Unable to allocate new int vector on heap.");for(let r of t)this.h._addIntVectorEntry(e,r);this.h._addIntVectorToInputSidePacket(e,r)})}addUintVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.h._allocateUintVector(t.length);if(!e)throw Error("Unable to allocate new unsigned int vector on heap.");for(let r of t)this.h._addUintVectorEntry(e,r);this.h._addUintVectorToInputSidePacket(e,r)})}addStringVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.h._allocateStringVector(t.length);if(!e)throw Error("Unable to allocate new string vector on heap.");for(let r of t)$o(this,r,t=>{this.h._addStringVectorEntry(e,t)});this.h._addStringVectorToInputSidePacket(e,r)})}attachBoolListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.h._attachBoolListener(t)})}attachBoolVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.h._attachBoolVectorListener(t)})}attachIntListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.h._attachIntListener(t)})}attachIntVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.h._attachIntVectorListener(t)})}attachUintListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.h._attachUintListener(t)})}attachUintVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.h._attachUintVectorListener(t)})}attachDoubleListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.h._attachDoubleListener(t)})}attachDoubleVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.h._attachDoubleVectorListener(t)})}attachFloatListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.h._attachFloatListener(t)})}attachFloatVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.h._attachFloatVectorListener(t)})}attachStringListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.h._attachStringListener(t)})}attachStringVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.h._attachStringVectorListener(t)})}attachProtoListener(t,r,e){Ko(this,t,r),$o(this,t,t=>{this.h._attachProtoListener(t,e||!1)})}attachProtoVectorListener(t,r,e){Jo(this,t,r),$o(this,t,t=>{this.h._attachProtoVectorListener(t,e||!1)})}attachAudioListener(t,r,e){this.h._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Ko(this,t,(t,e)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),r(t,e)}),$o(this,t,t=>{this.h._attachAudioListener(t,e||!1)})}finishProcessing(){this.h._waitUntilIdle()}closeGraph(){this.h._closeGraph(),this.h.simpleListeners=void 0,this.h.emptyPacketListeners=void 0}})),Yo=class extends Xo{};async function Zo(t,r){var e=await(async(t,r,e)=>{var n=sa;if(t&&await Ho(t),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await Ho(r),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&e&&((t=self.Module).locateFile=e.locateFile,e.mainScriptUrlOrBlob&&(t.mainScriptUrlOrBlob=e.mainScriptUrlOrBlob)),e=await self.ModuleFactory(self.Module||e),self.ModuleFactory=self.Module=void 0,new n(e,null)})(t.wasmLoaderPath,t.assetLoaderPath,{locateFile:r=>r.endsWith(".wasm")?t.wasmBinaryPath.toString():t.assetBinaryPath&&r.endsWith(".data")?t.assetBinaryPath.toString():r});return function(t,r){r=r.ka??"";var e=t.g.V();t.i=new Ro(r,e)}(e,r),await e.u(r),e}async function qo(t,r){return Zo(t,r)}function Qo(t,r){var e=Dr(t.baseOptions,so,1)||new so;"string"==typeof r?(Br(e,2,tr(r)),Br(e,1)):r instanceof Uint8Array&&(Br(e,1,et(r,!1)),Br(e,2)),$r(t.baseOptions,0,1,e)}function ta(t,r){var e=r.baseOptions||{};if(r.baseOptions?.modelAssetBuffer&&r.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Dr(t.baseOptions,so,1)?.i()||Dr(t.baseOptions,so,1)?.j()||r.baseOptions?.modelAssetBuffer||r.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,r){var e=Dr(t.baseOptions,oo,3);if(!e){var n=e=new oo,i=new Wi;zr(n,4,ao,i)}"delegate"in r&&("GPU"===r.delegate?(r=e,n=new Ci,zr(r,2,ao,n)):(r=e,n=new Wi,zr(r,4,ao,n))),$r(t.baseOptions,0,3,e)}(t,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then(t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)}).then(r=>{try{t.g.h.FS_unlink("/model.dat")}catch{}t.g.h.FS_createDataFile("/","model.dat",new Uint8Array(r),!0,!1,!1),Qo(t,"/model.dat"),aa(t)});if(e.modelAssetBuffer instanceof Uint8Array)Qo(t,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){for(var r=[],e=0;;){let{done:n,value:i}=await t.read();if(n)break;r.push(i),e+=i.length}if(0===r.length)return new Uint8Array(0);if(1===r.length)return r[0];t=new Uint8Array(e),e=0;for(let n of r)t.set(n,e),e+=n.length;return t}(e.modelAssetBuffer).then(r=>{Qo(t,r),aa(t)});return aa(t),Promise.resolve()}function ra(t){try{let r=t.o.length;if(1===r)throw Error(t.o[0].message);if(r>1)throw Error("Encountered multiple errors: "+t.o.map(t=>t.message).join(", "))}finally{t.o=[]}}var ea=class{constructor(t){this.g=t,this.o=[],this.m=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,r){this.g.attachErrorListener((t,r)=>{this.o.push(Error(r))}),this.g.Z(),this.g.setGraph(t,r),this.i?.Y(),ra(this)}finishProcessing(t){if(this.g.finishProcessing(),ra(this),this.i&&void 0!==t){var r=this.i,e=r.i.get(t);if(void 0!==e&&(r.i.delete(t),t=performance.now()-e,++r.g.C,r.g.G+=t,r.g.A=Math.max(r.g.A,t),r.o=Math.max(r.o,t),performance.now()>r.m+3e4)){for(let[n,i]of r.i.entries())t=n,i<e&&(r.g.v++,r.i.delete(t));e={...r.g,H:performance.now()-r.m},r.g.A=0,r.m=performance.now(),Go(r,e)}}}close(){this.i?.X(),this.i?.close(),this.g.closeGraph()}};async function na(t,r){return qo(t,r)}ea.prototype.close=ea.prototype.close;var ia=class extends ea{constructor(){super(...arguments),this.J=48e3}ca(t){this.J=t}};function oa(t){var r={classifications:Wr(t,fo).map(t=>function(t,r=-1,e=""){return{categories:t.map(t=>({index:Rt(Er(t,1))??0??-1,score:Er(t,2,void 0,Ct)??0??0,categoryName:rr(Er(t,3))??""??"",displayName:rr(Er(t,4))??""??""})),headIndex:r,headName:e}}(Dr(t,eo,4)?.i()??[],Rt(Er(t,2))??0,rr(Er(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(dt(t)?t=Number(t):(t=Ot(64,t),t=dt(t)?Number(t):String(t)),t):Dt(t)?"number"==typeof t?$t(t):Kt(t):void 0}(Er(t,2,void 0,Yt))&&(r.timestampMs=function(t){var r=Number(t);return Number.isSafeInteger(r)?r:String(t)}(Er(t,2,void 0,Yt)??Ir)),r}function aa(t){var r=new Qi;qr(r,10,"audio_in"),qr(r,10,"sample_rate"),qr(r,15,"timestamped_classifications");var e=new zi;!function(t,r){var e=to,n=t.l;R&&R in n&&(n=n[R])&&delete n[451755788],e.g?e.j(t,e.g,451755788,r,e.i):e.j(t,451755788,r,e.i)}(e,t.j);var n=new Xi;!function(t){var r=tr("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph");_r(t),Ur(t=t.l,0|t[X],2,""===r?void 0:r)}(n),qr(n,3,"AUDIO:audio_in"),qr(n,3,"SAMPLE_RATE:sample_rate"),qr(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.u(e),Jr(r,1,Xi,n),t.g.attachProtoVectorListener("timestamped_classifications",(r,e)=>{!function(t,r){r.forEach(r=>{r=go(r),t.F.push(oa(r))})}(t,r),t.m=Math.max(t.m,e)}),t.g.attachEmptyPacketListener("timestamped_classifications",r=>{t.m=Math.max(t.m,r)}),r=r.i(),t.setGraph(new Uint8Array(r),!0)}ia.prototype.setDefaultSampleRate=ia.prototype.ca;var sa=class extends ia{constructor(t,r){super(new Yo(t,r)),this.F=[],$r(t=this.j=new lo,0,1,r=new uo)}get baseOptions(){return Dr(this.j,uo,1)}set baseOptions(t){$r(this.j,0,1,t)}u(t){var r=this.j,e=Dr(this.j,io,2);if(e){var n=e.l;let t=0|n[X];e=Ar(e,n,t)?mr(e,n,!0):new e.constructor(yr(n,t,!1))}else e=new io;if(void 0!==t.displayNamesLocale?Br(e,1,tr(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Br(e,1),void 0!==t.maxResults){if(null!=(n=t.maxResults)){if("number"!=typeof n)throw O("int32");if(!Ft(n))throw O("int32");n|=0}Br(e,2,n)}else"maxResults"in t&&Br(e,2);if(void 0!==t.scoreThreshold){if(null!=(n=t.scoreThreshold)&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Br(e,3,n)}else"scoreThreshold"in t&&Br(e,3);return void 0!==t.categoryAllowlist?Or(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Br(e,4),void 0!==t.categoryDenylist?Or(e,5,t.categoryDenylist):"categoryDenylist"in t&&Br(e,5),$r(r,0,2,e),ta(this,t)}U(t,r){r=r??this.J;var e=this.m+1;if(this.i&&void 0!==e)if(Dr(this.baseOptions,oo,3)?.i()){var n=this.i;++n.g.D,n.i.set(e,performance.now())}else++(n=this.i).g.B,n.i.set(e,performance.now());return this.g.addDoubleToStream(r,"sample_rate",e),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",e),this.F=[],this.finishProcessing(e),[...this.F]}};sa.prototype.classify=sa.prototype.U,sa.prototype.setOptions=sa.prototype.u,sa.createFromModelPath=function(t,r){return qo(t,{baseOptions:{modelAssetPath:r}})},sa.createFromModelBuffer=function(t,r){return na(t,{baseOptions:{modelAssetBuffer:r}})},sa.createFromOptions=function(t,r){return na(t,r)};var ua,la=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 ca(t){if(t)return!0;if(void 0===ua)try{await WebAssembly.instantiate(la),ua=!0}catch{ua=!1}return ua}async function ha(t,r,e){return{wasmLoaderPath:`${r}/${t}_${e=`wasm${e?"_module":""}${await ca(e)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${r}/${t}_${e}.wasm`}}var fa=class{};fa.forVisionTasks=function(t,r=!1){return ha("vision",t??ki``,r)},fa.forTextTasks=function(t,r=!1){return ha("text",t??ki``,r)},fa.forGenAiTasks=function(t,r=!1){return ha("genai",t??ki``,r)},fa.forAudioTasks=function(t,r=!1){return ha("audio",t??ki``,r)},fa.isSimdSupported=function(t=!1){return ca(t)},exports.AudioClassifier=sa,exports.AudioTaskRunner=ia,exports.FilesetResolver=fa,exports.TaskRunner=ea;
|
|
1
|
+
"use strict";var t="undefined"!=typeof self?self:{};function r(r,e){t:{for(var n=["CLOSURE_FLAGS"],i=t,o=0;o<n.length;o++)if(null==(i=i[n[o]])){n=null;break t}n=i}return null!=(r=n&&n[r])?r:e}function e(){throw Error("Invalid UTF8")}function n(t,r){return r=String.fromCharCode.apply(null,r),null==t?r:t+r}var i,o,a=void 0,s="undefined"!=typeof TextDecoder,u="undefined"!=typeof TextEncoder;function l(t){if(u)t=(o||=new TextEncoder).encode(t);else{let e=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var r=t.charCodeAt(i);if(r<128)n[e++]=r;else{if(r<2048)n[e++]=r>>6|192;else{if(r>=55296&&r<=57343){if(r<=56319&&i<t.length){let o=t.charCodeAt(++i);if(o>=56320&&o<=57343){r=1024*(r-55296)+o-56320+65536,n[e++]=r>>18|240,n[e++]=r>>12&63|128,n[e++]=r>>6&63|128,n[e++]=63&r|128;continue}i--}r=65533}n[e++]=r>>12|224,n[e++]=r>>6&63|128}n[e++]=63&r|128}}t=e===n.length?n:n.subarray(0,e)}return t}var h=r(610401301,!1),c=r(748402147,!0);function f(){var r=t.navigator;return r&&(r=r.userAgent)?r:""}var d,v=t.navigator;function p(t){return p[" "](t),t}d=v&&v.userAgentData||null,p[" "]=function(){};var g={},m=null;function y(t){var r=t.length,e=3*r/4;e%3?e=Math.floor(e):-1!="=.".indexOf(t[r-1])&&(e=-1!="=.".indexOf(t[r-2])?e-2:e-1);var n=new Uint8Array(e),i=0;return function(t,r){function e(r){for(;n<t.length;){let r=t.charAt(n++),e=m[r];if(null!=e)return e;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return r}w();for(var n=0;;){let t=e(-1),n=e(0),i=e(64),o=e(64);if(64===o&&-1===t)break;r(t<<2|n>>4),64!=i&&(r(n<<4&240|i>>2),64!=o&&r(i<<6&192|o))}}(t,function(t){n[i++]=t}),i!==e?n.subarray(0,i):n}function w(){if(!m){m={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),r=["+/=","+/","-_=","-_.","-_"];for(let e=0;e<5;e++){let n=t.concat(r[e].split(""));g[e]=n;for(let t=0;t<n.length;t++){let r=n[t];void 0===m[r]&&(m[r]=t)}}}}var b="undefined"!=typeof Uint8Array,_=!(!(!!h&&(!!d&&d.brands.length>0))&&(-1!=f().indexOf("Trident")||-1!=f().indexOf("MSIE")))&&"function"==typeof btoa,S=/[-_.]/g,A={"-":"+",_:"/",".":"="};function I(t){return A[t]||""}function j(t){if(!_)return y(t);t=S.test(t)?t.replace(S,I):t,t=atob(t);var r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}var E={};function T(){return U||=new P(null,E)}function B(t){x(E);var r=t.h;return null==(r=null==r||b&&null!=r&&r instanceof Uint8Array?r:"string"==typeof r?j(r):null)?r:t.h=r}var U,P=class{constructor(t,r){if(x(r),this.h=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function x(t){if(t!==E)throw Error("illegal external caller")}function L(t,r){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=r}var N=void 0;function O(t){return L(t=Error(t),"warning"),t}function k(r,e){if(null!=r){var n=N??={},i=n[r]||0;i>=e||(n[r]=i+1,L(r=Error(),"incident"),function(r){t.setTimeout(()=>{throw r},0)}(r))}}function V(){return"function"==typeof BigInt}var F="function"==typeof Symbol&&"symbol"==typeof Symbol();function M(t,r,e=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?e&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():r}var G,C=M("jas",void 0,!0),D=M(void 0,"1oa"),R=M(void 0,Symbol()),W=M(void 0,"0ubs"),H=M(void 0,"0ubsb"),$=M(void 0,"0actk"),z=M("m_m","ia",!0),K={Y:{value:0,configurable:!0,writable:!0,enumerable:!1}},J=Object.defineProperties,X=F?C:"Y",Y=[];function Z(t,r){F||X in t||J(t,K),t[X]|=r}function q(t,r){F||X in t||J(t,K),t[X]=r}q(Y,7),G=Object.freeze(Y);var Q={};function tt(t,r){return void 0===r?t.h!==rt&&!!(2&t.m[X]):!!(2&r)&&t.h!==rt}var rt={};function et(t,r){if(null!=t)if("string"==typeof t)t=t?new P(t,E):T();else if(t.constructor!==P)if(b&&null!=t&&t instanceof Uint8Array)t=t.length?new P(new Uint8Array(t),E):T();else{if(!r)throw Error();t=void 0}return t}var nt=Object.freeze({});function it(t,r,e){var n,i=128&r?0:-1,o=t.length;(n=!!o)&&(n=null!=(n=t[o-1])&&"object"==typeof n&&n.constructor===Object);var a=o+(n?-1:0);for(r=128&r?1:0;r<a;r++)e(r-i,t[r]);if(n){t=t[o-1];for(let r in t)!isNaN(r)&&e(+r,t[r])}}var ot={};function at(t){return 128&t?ot:void 0}function st(t){return t.ga=!0,t}var ut=st(t=>"number"==typeof t),lt=st(t=>"string"==typeof t),ht=st(t=>"boolean"==typeof t),ct="function"==typeof t.BigInt&&"bigint"==typeof t.BigInt(0);function ft(t){var r=t;if(lt(r)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(r))throw Error(String(r))}else if(ut(r)&&!Number.isSafeInteger(r))throw Error(String(r));return ct?BigInt(t):t=ht(t)?t?"1":"0":lt(t)?t.trim()||"0":String(t)}var dt=st(t=>ct?t>=pt&&t<=mt:"-"===t[0]?yt(t,vt):yt(t,gt)),vt=Number.MIN_SAFE_INTEGER.toString(),pt=ct?BigInt(Number.MIN_SAFE_INTEGER):void 0,gt=Number.MAX_SAFE_INTEGER.toString(),mt=ct?BigInt(Number.MAX_SAFE_INTEGER):void 0;function yt(t,r){if(t.length>r.length)return!1;if(t.length<r.length||t===r)return!0;for(let e=0;e<t.length;e++){let n=t[e],i=r[e];if(n>i)return!1;if(n<i)return!0}}var wt,bt="function"==typeof Uint8Array.prototype.slice,_t=0,St=0;function At(t){var r=t>>>0;_t=r,St=(t-r)/4294967296>>>0}function It(t){if(t<0){At(-t);let[r,e]=Lt(_t,St);_t=r>>>0,St=e>>>0}else At(t)}function jt(t,r){var e=4294967296*r+(t>>>0);return Number.isSafeInteger(e)?e:Bt(t,r)}function Et(t,r){return ft(V()?BigInt.asUintN(64,(BigInt(r>>>0)<<BigInt(32))+BigInt(t>>>0)):Bt(t,r))}function Tt(t,r){return V()?ft(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(r))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):ft(Pt(t,r))}function Bt(t,r){if(t>>>=0,(r>>>=0)<=2097151)var e=""+(4294967296*r+t);else V()?e=""+(BigInt(r)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(e=16777215&(t>>>24|r<<8))+6710656*(r=r>>16&65535),e+=8147497*r,r*=2,t>=1e7&&(e+=t/1e7>>>0,t%=1e7),e>=1e7&&(r+=e/1e7>>>0,e%=1e7),e=r+Ut(e)+Ut(t));return e}function Ut(t){return t=String(t),"0000000".slice(t.length)+t}function Pt(t,r){if(2147483648&r)if(V())t=""+(BigInt(0|r)<<BigInt(32)|BigInt(t>>>0));else{let[e,n]=Lt(t,r);t="-"+Bt(e,n)}else t=Bt(t,r);return t}function xt(t){if(t.length<16)It(Number(t));else if(V())t=BigInt(t),_t=Number(t&BigInt(4294967295))>>>0,St=Number(t>>BigInt(32)&BigInt(4294967295));else{let r=+("-"===t[0]);St=_t=0;let e=t.length;for(let n=r,i=(e-r)%6+r;i<=e;n=i,i+=6){let r=Number(t.slice(n,i));St*=1e6,(_t=1e6*_t+r)>=4294967296&&(St+=Math.trunc(_t/4294967296),St>>>=0,_t>>>=0)}if(r){let[t,r]=Lt(_t,St);_t=t,St=r}}}function Lt(t,r){return r=~r,t?t=1+~t:r+=1,[t,r]}function Nt(t){return Array.prototype.slice.call(t)}var Ot="function"==typeof BigInt?BigInt.asIntN:void 0,kt="function"==typeof BigInt?BigInt.asUintN:void 0,Vt=Number.isSafeInteger,Ft=Number.isFinite,Mt=Math.trunc;function Gt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}var Ct=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Dt(t){switch(typeof t){case"bigint":return!0;case"number":return Ft(t);case"string":return Ct.test(t);default:return!1}}function Rt(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Ft(t)?0|t:void 0}function Wt(t){var r=t.length;return("-"===t[0]?r<20||20===r&&t<="-9223372036854775808":r<19||19===r&&t<="9223372036854775807")?t:(xt(t),Pt(_t,St))}function Ht(t){if("-"===t[0])var r=!1;else r=(r=t.length)<20||20===r&&t<="18446744073709551615";return r?t:(xt(t),Bt(_t,St))}function $t(t){if(t=Mt(t),!Vt(t)){It(t);var r=_t,e=St;(t=2147483648&e)&&(e=~e>>>0,0==(r=1+~r>>>0)&&(e=e+1>>>0)),t="number"==typeof(r=jt(r,e))?t?-r:r:t?"-"+r:r}return t}function zt(t){return(t=Mt(t))>=0&&Vt(t)||(It(t),t=jt(_t,St)),t}function Kt(t){var r=Mt(Number(t));return Vt(r)?String(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),Wt(t))}function Jt(t){var r=Mt(Number(t));return Vt(r)?ft(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),V()?ft(Ot(64,BigInt(t))):ft(Wt(t)))}function Xt(t){return Vt(t)?t=ft($t(t)):(t=Mt(t),Vt(t)?t=String(t):(It(t),t=Pt(_t,St)),t=ft(t)),t}function Yt(t){var r=typeof t;return null==t?t:"bigint"===r?ft(Ot(64,t)):Dt(t)?"string"===r?Jt(t):Xt(t):void 0}function Zt(t){if(null==t)return t;var r=typeof t;if("bigint"===r)return String(Ot(64,t));if(Dt(t)){if("string"===r)return Kt(t);if("number"===r)return $t(t)}}function qt(t){if(null==t||"string"==typeof t||t instanceof P)return t}function Qt(t){if("string"!=typeof t)throw Error();return t}function tr(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function rr(t){return null==t||"string"==typeof t?t:void 0}function er(t,r,e){if(null!=t&&t[z]===Q)return t;if(Array.isArray(t)){var n=0|t[X];return(e=n|32&e|2&e)!==n&&q(t,e),new r(t)}}function nr(t){return t}function ir(t){return R?t[R]:void 0}function or(t,r){for(let e in t)!isNaN(e)&&r(t,+e,t[e])}var ar,sr,ur,lr=class{};function hr(t,r){r<100||k(W,1)}function cr(t,r,e,n){var i=void 0!==n;n=!!n;var o,a=R;!i&&F&&a&&(o=t[a])&&or(o,hr),a=[];var s=t.length;o=4294967295;var u=!1,l=!!(64&r),h=l?128&r?0:-1:void 0;if(!(1&r)){var c=s&&t[s-1];null!=c&&"object"==typeof c&&c.constructor===Object?o=--s:c=void 0,!l||128&r||i||(u=!0,o=(ar??nr)(o-h,h,t,c,void 0)+h)}r=void 0;for(var f=0;f<s;f++){let i=t[f];if(null!=i&&null!=(i=e(i,n)))if(l&&f>=o){let t=f-h;(r??={})[t]=i}else a[f]=i}if(c)for(let t in c){if(null==(s=c[t])||null==(s=e(s,n)))continue;let i;f=+t,l&&!Number.isNaN(f)&&(i=f+h)<o?a[i]=s:(r??={})[t]=s}return r&&(u?a.push(r):a[o]=r),i&&R&&(t=ir(t))&&t instanceof lr&&(a[R]=function(t){var r=new lr;return or(t,(t,e,n)=>{r[e]=Nt(n)}),r.h=t.h,r}(t)),a}function fr(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return dt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var r=0|t[X];return 0===t.length&&1&r?void 0:cr(t,r,fr)}if(null!=t&&t[z]===Q)return dr(t);if(t instanceof P){if(null==(r=t.h))t="";else if("string"==typeof r)t=r;else{if(_){for(var e="",n=0,i=r.length-10240;n<i;)e+=String.fromCharCode.apply(null,r.subarray(n,n+=10240));e+=String.fromCharCode.apply(null,n?r.subarray(n):r),r=btoa(e)}else{void 0===e&&(e=0),w(),e=g[e],n=Array(Math.floor(r.length/3)),i=e[64]||"";let t=0,l=0;for(;t<r.length-2;t+=3){var o=r[t],a=r[t+1],s=r[t+2],u=e[o>>2];o=e[(3&o)<<4|a>>4],a=e[(15&a)<<2|s>>6],s=e[63&s],n[l++]=u+o+a+s}switch(u=0,s=i,r.length-t){case 2:s=e[(15&(u=r[t+1]))<<2]||i;case 1:r=r[t],n[l]=e[r>>2]+e[(3&r)<<4|u>>4]+s+i}r=n.join("")}t=t.h=r}return t}return}return t}function dr(t){return cr(t=t.m,0|t[X],fr)}function vr(t,r){return pr(t,r[0],r[1])}function pr(t,r,e,n=0){if(null==t){var i=32;e?(t=[e],i|=128):t=[],r&&(i=-16760833&i|(1023&r)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[X],c&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(c)throw Error("carr");k($,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&q(t,i|n),t;if(e&&(i|=128,e!==t[0]))throw Error("mid");t:{i|=64;var o=(e=t).length;if(o){var a=o-1;let t=e[a];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((a-=r=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var s in t)(o=+s)<a&&(e[o+r]=t[s],delete t[s]);i=-16760833&i|(1023&a)<<14;break t}}if(r){if((s=Math.max(r,o-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&s)<<14}}}return q(t,64|i|n),t}function gr(t,r){if("object"!=typeof t)return t;if(Array.isArray(t)){var e=0|t[X];return 0===t.length&&1&e?t=void 0:2&e||(!r||4096&e||16&e?t=yr(t,e,!1,r&&!(16&e)):(Z(t,34),4&e&&Object.freeze(t))),t}return null!=t&&t[z]===Q?tt(t,e=0|(r=t.m)[X])?t:Ar(t,r,e)?mr(t,r):yr(r,e):t instanceof P?t:void 0}function mr(t,r,e){return t=new t.constructor(r),e&&(t.h=rt),t.o=rt,t}function yr(t,r,e,n){return n??=!!(34&r),t=cr(t,r,gr,n),n=32,e&&(n|=2),q(t,r=16769217&r|n),t}function wr(t){var r=t.m,e=0|r[X];return tt(t,e)?Ar(t,r,e)?mr(t,r,!0):new t.constructor(yr(r,e,!1)):t}function br(t){if(t.h!==rt)return!1;var r=t.m;return Z(r=yr(r,0|r[X]),2048),t.m=r,t.h=void 0,t.o=void 0,!0}function _r(t){if(!br(t)&&tt(t,0|t.m[X]))throw Error()}function Sr(t,r){void 0===r&&(r=0|t[X]),32&r&&!(4096&r)&&q(t,4096|r)}function Ar(t,r,e){return!!(2&e)||!(!(32&e)||4096&e)&&(q(r,2|e),t.h=rt,!0)}var Ir=ft(0);function jr(t,r,e,n){if(null!==(t=Er(t.m,r,e,n)))return t}function Er(t,r,e,n){if(-1===r)return null;var i=r+(e?0:-1),o=t.length-1;if(!(o<1+(e?0:-1))){if(i>=o){var a=t[o];if(null!=a&&"object"==typeof a&&a.constructor===Object){e=a[r];var s=!0}else{if(i!==o)return;e=a}}else e=t[i];if(n&&null!=e){if(null==(n=n(e)))return n;if(!Object.is(n,e))return s?a[r]=n:t[i]=n,n}return e}}function Tr(t,r,e,n){_r(t);var i=t.m;return Br(i,0|i[X],r,e,n),t}function Br(t,r,e,n,i){var o=e+(i?0:-1),a=t.length-1;if(a>=1+(i?0:-1)&&o>=a){let i=t[a];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[e]=n,r}return o<=a?(t[o]=n,r):(void 0!==n&&(e>=(a=(r??=0|t[X])>>14&1023||536870912)?null!=n&&(t[a+(i?0:-1)]={[e]:n}):t[o]=n),r)}function Ur(t,r,e,n,i,o,a,s){var u=r;return 1===o||4===o&&(2&r||!(16&r)&&32&n)?Lr(r)||((r|=!t.length||a&&!(4096&r)||32&n&&!(4096&r||16&r)?2:256)!==u&&q(t,r),Object.freeze(t)):(2===o&&Lr(r)&&(t=Nt(t),u=0,r=Kr(r,n),n=Br(e,n,i,t)),Lr(r)||(s||(r|=16),r!==u&&q(t,r))),2&r||!(4096&r||16&r)||Sr(e,n),t}function Pr(t,r,e){return t=Er(t,r,e),Array.isArray(t)?t:G}function xr(t,r){return 2&r&&(t|=2),1|t}function Lr(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function Nr(t){return et(t,!0)}function Or(t,r,e){_r(t);var n=0|(t=t.m)[X];if(null==e)Br(t,n,r);else{var i=e===G?7:0|e[X],o=i,a=Lr(i),s=a||Object.isFrozen(e);for(a||(i=0),s||(e=Nt(e),o=0,i=Kr(i,n),s=!1),i|=5,i|=(4&i?512&i?512:1024&i?1024:0:void 0)??1024,a=0;a<e.length;a++){let t=e[a],r=Qt(t);Object.is(t,r)||(s&&(e=Nt(e),o=0,i=Kr(i,n),s=!1),e[a]=r)}i!==o&&(s&&(e=Nt(e),i=Kr(i,n)),q(e,i)),Br(t,n,r,e)}}function kr(t,r,e){if(2&r)throw Error();var n=at(r),i=Pr(t,e,n),o=i===G?7:0|i[X],a=xr(o,r);return(2&a||Lr(a)||16&a)&&(a===o||Lr(a)||q(i,a),i=Nt(i),o=0,a=Kr(a,r),Br(t,r,e,i,n)),(a&=-13)!==o&&q(i,a),i}function Vr(t){if(F)return t[D]??(t[D]=new Map);if(D in t)return t[D];var r=new Map;return Object.defineProperty(t,D,{value:r}),r}function Fr(t,r,e,n,i){var o=Vr(t),a=Mr(o,t,r,e,i);return a!==n&&(a&&(r=Br(t,r,a,void 0,i)),o.set(e,n)),r}function Mr(t,r,e,n,i){var o=t.get(n);if(null!=o)return o;o=0;for(let t=0;t<n.length;t++){let a=n[t];null!=Er(r,a,i)&&(0!==o&&(e=Br(r,e,o,void 0,i)),o=a)}return t.set(n,o),o}function Gr(t,r,e){var n=0|t[X],i=at(n),o=Er(t,e,i);if(null!=o&&o[z]===Q){if(!tt(o))return br(o),o.m;var a=o.m}else Array.isArray(o)&&(a=o);if(a){let t=0|a[X];2&t&&(a=yr(a,t))}return(a=vr(a,r))!==o&&Br(t,n,e,a,i),a}function Cr(t,r,e,n){var i=!1;if(null!=(n=Er(t,n,void 0,t=>{var n=er(t,e,r);return i=n!==t&&null!=n,n})))return i&&!tt(n)&&Sr(t,r),n}function Dr(t,r,e){var n=t.m,i=0|n[X];if(null==(r=Cr(n,i,r,e)))return r;if(!tt(t,i=0|n[X])){let o=wr(r);o!==r&&(br(t)&&(i=0|(n=t.m)[X]),Sr(n,i=Br(n,i,e,r=o)))}return r}function Rr(t,r,e,n,i,o,a,s){var u=tt(t,e);o=u?1:o,a=!!a||3===o,u=s&&!u,(2===o||u)&&br(t)&&(e=0|(r=t.m)[X]);var l=(t=Pr(r,i))===G?7:0|t[X],h=xr(l,e);if(s=!(4&h)){var c=t,f=e;let r=!!(2&h);r&&(f|=2);let i=!r,o=!0,a=0,s=0;for(;a<c.length;a++){let t=er(c[a],n,f);if(t instanceof n){if(!r){let r=tt(t);i&&=!r,o&&=r}c[s++]=t}}s<a&&(c.length=s),h|=4,h=o?-4097&h:4096|h,h=i?8|h:-9&h}if(h!==l&&(q(t,h),2&h&&Object.freeze(t)),u&&!(8&h||!t.length&&(1===o||4===o&&(2&h||!(16&h)&&32&e)))){for(Lr(h)&&(t=Nt(t),h=Kr(h,e),e=Br(r,e,i,t)),n=t,u=h,l=0;l<n.length;l++)(c=n[l])!==(h=wr(c))&&(n[l]=h);u|=8,q(t,h=u=n.length?4096|u:-4097&u)}return Ur(t,h,r,e,i,o,s,a)}function Wr(t,r){var e=t.m;return Rr(t,e,0|e[X],r,1,void 0===nt?2:4,!1,!0)}function Hr(t){return null==t&&(t=void 0),t}function $r(t,r,e,n,i){return Tr(t,e,n=Hr(n),i),n&&!tt(n)&&Sr(t.m),t}function zr(t,r,e,n){t:{var i=n=Hr(n);_r(t);let o=t.m,a=0|o[X];if(null==i){let t=Vr(o);if(Mr(t,o,a,e)!==r)break t;t.set(e,0)}else a=Fr(o,a,e,r);Br(o,a,r,i)}return n&&!tt(n)&&Sr(t.m),t}function Kr(t,r){return-273&(t=2&r?2|t:-3&t)}function Jr(t,r,e,n){_r(t);var i=t.m;t=Rr(t,i,0|i[X],e,r,2,!0),n=null!=n?n:new e,t.push(n),r=e=t===G?7:0|t[X],(n=tt(n))?(e&=-9,1===t.length&&(e&=-4097)):e|=4096,e!==r&&q(t,e),n||Sr(i)}function Xr(t,r,e){if(null!=e)t:{if(!Dt(e))throw O("int64");switch(typeof e){case"string":e=Jt(e);break t;case"bigint":e=ft(Ot(64,e));break t;default:e=Xt(e)}}return Tr(t,r,e)}function Yr(t,r,e){return Tr(t,r,null==e?e:function(t){if(!Dt(t))throw O("uint64");switch(typeof t){case"string":var r=Mt(Number(t));return Vt(r)&&r>=0?t=ft(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),t=V()?ft(kt(64,BigInt(t))):ft(Ht(t))),t;case"bigint":return ft(kt(64,t));default:return Vt(t)?t=ft(zt(t)):((t=Mt(t))>=0&&Vt(t)?t=String(t):(It(t),t=Bt(_t,St)),t=ft(t)),t}}(e))}function Zr(t,r,e){if(null!=e){if(!Ft(e))throw O("enum");e|=0}return Tr(t,r,e)}function qr(t,r,e){_r(t);var n=t.m,i=0|n[X],o=tt(t,i)?1:2;2===o&&br(t)&&(i=0|(n=t.m)[X]);var a=(t=Pr(n,r))===G?7:0|t[X],s=xr(a,i),u=!(4&s);if(u){4&s&&(t=Nt(t),a=0,s=Kr(s,i),i=Br(n,i,r,t));let e=0,o=0;for(;e<t.length;e++){let r=rr(t[e]);null!=r&&(t[o++]=r)}o<e&&(t.length=o),s=-513&s|4,s&=-1025,s&=-4097}s!==a&&(q(t,s),2&s&&Object.freeze(t)),(t=Ur(t,s,n,i,r,o,u,!0)).push(Qt(e))}var Qr=class{constructor(t,r,e){if(this.buffer=t,e&&!r)throw Error();this.h=r}};function te(t,r){if("string"==typeof t)return new Qr(j(t),r);if(Array.isArray(t))return new Qr(new Uint8Array(t),r);if(t.constructor===Uint8Array)return new Qr(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Qr(t,!1);if(t.constructor===P)return r=B(t)||new Uint8Array(0),new Qr(r,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Qr(t,!1);throw Error()}function re(t,r){var e=0,n=0,i=0,o=t.j,a=t.h;do{var s=o[a++];e|=(127&s)<<i,i+=7}while(i<32&&128&s);if(i>32)for(n|=(127&s)>>4,i=3;i<32&&128&s;i+=7)n|=(127&(s=o[a++]))<<i;if(se(t,a),!(128&s))return r(e>>>0,n>>>0);throw Error()}function ee(t){for(var r=0,e=t.h,n=e+10,i=t.j;e<n;){let n=i[e++];if(r|=n,!(128&n))return se(t,e),!!(127&r)}throw Error()}function ne(t){var r=t.j,e=t.h,n=r[e++],i=127&n;if(128&n&&(i|=(127&(n=r[e++]))<<7,128&n&&(i|=(127&(n=r[e++]))<<14,128&n&&(i|=(127&(n=r[e++]))<<21,128&n&&(i|=(n=r[e++])<<28,128&n&&128&r[e++]&&128&r[e++]&&128&r[e++]&&128&r[e++]&&128&r[e++])))))throw Error();return se(t,e),i}function ie(t){return re(t,Tt)}function oe(t){var r=t.j,e=t.h,n=r[e],i=r[e+1],o=r[e+2];return r=r[e+3],se(t,t.h+4),(n|i<<8|o<<16|r<<24)>>>0}function ae(t){return ne(t)}function se(t,r){if(t.h=r,r>t.l)throw Error()}function ue(t,r){if(r<0)throw Error();var e=t.h;if((r=e+r)>t.l)throw Error();return t.h=r,e}function le(t,r){if(0==r)return T();var e=ue(t,r);return t.L&&t.u?e=t.j.subarray(e,e+r):(t=t.j,e=e===(r=e+r)?new Uint8Array(0):bt?t.slice(e,r):new Uint8Array(t.subarray(e,r))),0==e.length?T():new P(e,E)}var he=class{constructor(t,r,e,n){this.j=null,this.u=!1,this.h=this.l=this.o=0,this.init(t,r,e,n)}init(t,r,e,{L:n=!1,O:i=!1}={}){this.L=n,this.O=i,t&&(t=te(t,this.O),this.j=t.buffer,this.u=t.h,this.o=r||0,this.l=void 0!==e?this.o+e:this.j.length,this.h=this.o)}clear(){this.j=null,this.u=!1,this.h=this.l=this.o=0,this.L=!1}},ce=[],fe=0;function de(t,r,e,n){if(Ae.length){let i=Ae.pop();return i.v(n),i.h.init(t,r,e,n),i}return new Se(t,r,e,n)}function ve(t){t.h.clear(),t.l=-1,t.j=-1,Ae.length<100&&Ae.push(t)}function pe(t){var r=t.h;if(r.h==r.l)return!1;t.o=t.h.h;var e=ne(t.h)>>>0;if(r=e>>>3,!((e&=7)>=0&&e<=5))throw Error();if(r<1)throw Error();return t.l=r,t.j=e,!0}function ge(t){try{switch(t.j){case 0:0!=t.j?ge(t):ee(t.h);break;case 1:var r=t.h;se(r,r.h+8);break;case 2:if(2!=t.j)ge(t);else{var e=ne(t.h)>>>0,n=t.h;se(n,n.h+e)}break;case 5:var i=t.h;se(i,i.h+4);break;case 3:me();let o=t.l;try{for(;;){if(!pe(t))throw Error();if(4==t.j){if(t.l!=o)throw Error();break}ge(t)}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{fe>0&&fe--}break;default:throw Error()}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}}function me(){if(fe>=100)throw new SyntaxError;fe++}function ye(t,r,e){var n=t.h.l,i=ne(t.h)>>>0,o=(i=t.h.h+i)-n;if(o<=0&&(t.h.l=i,e(r,t,void 0,void 0,void 0),o=i-t.h.h),o)throw Error();t.h.h=i,t.h.l=n}function we(t){var r=ne(t.h)>>>0,o=ue(t=t.h,r);if(t=t.j,s){var u,l=t;(u=i)||(u=i=new TextDecoder("utf-8",{fatal:!0})),r=o+r,l=0===o&&r===l.length?l:l.subarray(o,r);try{var h=u.decode(l)}catch(t){if(void 0===a){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),a=!0}catch(t){a=!1}}throw!a&&(i=void 0),t}}else{r=(h=o)+r,o=[];let i,a=null;for(;h<r;){var c=t[h++];c<128?o.push(c):c<224?h>=r?e():(i=t[h++],c<194||128!=(192&i)?(h--,e()):o.push((31&c)<<6|63&i)):c<240?h>=r-1?e():(i=t[h++],128!=(192&i)||224===c&&i<160||237===c&&i>=160||128!=(192&(u=t[h++]))?(h--,e()):o.push((15&c)<<12|(63&i)<<6|63&u)):c<=244?h>=r-2?e():(i=t[h++],128!=(192&i)||i-144+(c<<28)>>30||128!=(192&(u=t[h++]))||128!=(192&(l=t[h++]))?(h--,e()):(c=(7&c)<<18|(63&i)<<12|(63&u)<<6|63&l,c-=65536,o.push(55296+(c>>10&1023),56320+(1023&c)))):e(),o.length>=8192&&(a=n(a,o),o.length=0)}h=n(a,o)}return h}function be(t){var r=ne(t.h)>>>0;return le(t.h,r)}function _e(t,r,e){var n=ne(t.h)>>>0;for(n=t.h.h+n;t.h.h<n;)e.push(r(t.h))}var Se=class{constructor(t,r,e,n){if(ce.length){let i=ce.pop();i.init(t,r,e,n),t=i}else t=new he(t,r,e,n);this.h=t,this.o=this.h.h,this.j=this.l=-1,this.v(n)}v({R:t=!1}={}){this.R=t}},Ae=[];function Ie(t){return new Te(4294967295&t,Math.floor(t/4294967296))}function je(t){return t?/^\d+$/.test(t)?(xt(t),new Te(_t,St)):null:Ee||=new Te(0,0)}var Ee,Te=class{constructor(t,r){this.j=t>>>0,this.h=r>>>0}};function Be(t){return new Me(4294967295&t,Math.floor(t/4294967296))}function Ue(t){return t?/^-?\d+$/.test(t)?(xt(t),new Me(_t,St)):null:Pe||=new Me(0,0)}var Pe,xe,Le,Ne,Oe,ke,Ve,Fe,Me=class{constructor(t,r){this.j=t>>>0,this.h=r>>>0}};function Ge(t,r,e){return"undefined"!=typeof BigInt64Array?(Ve||(Ve=new BigInt64Array(1),Fe=new Uint32Array(Ve.buffer),Ve[0]=BigInt(1),ke=1===Fe[0]),Ve[0]=t,new r(Fe[t=ke?0:1],Fe[1-t])):(Oe||(xe=BigInt(Number.MIN_SAFE_INTEGER),Le=BigInt(Number.MAX_SAFE_INTEGER),Ne=BigInt(4294967295),Oe=BigInt(32)),t>=xe&&t<=Le?e(Number(t)):(t=BigInt.asUintN(64,t),new r(Number(t&Ne),Number(t>>Oe))))}function Ce(t,r,e){for(;e>0||r>127;)t.h.push(127&r|128),r=(r>>>7|e<<25)>>>0,e>>>=7;t.h.push(r)}function De(t,r){for(;r>127;)t.h.push(127&r|128),r>>>=7;t.h.push(r)}function Re(t,r){if(r>=0)De(t,r);else{for(let e=0;e<9;e++)t.h.push(127&r|128),r>>=7;t.h.push(1)}}function We(t,r){xt(r),function(t){var r=St>>31;t(_t<<1^r,(St<<1|_t>>>31)^r)}((r,e)=>{Ce(t,r>>>0,e>>>0)})}function He(t,r){t.h.push(r>>>0&255),t.h.push(r>>>8&255),t.h.push(r>>>16&255),t.h.push(r>>>24&255)}var $e=class{constructor(){this.h=[]}length(){return this.h.length}end(){var t=this.h;return this.h=[],t}};function ze(t,r){0!==r.length&&(t.l.push(r),t.j+=r.length)}function Ke(t,r,e){De(t.h,8*r+e)}function Je(t,r){return Ke(t,r,2),r=t.h.end(),ze(t,r),r.push(t.j),r}function Xe(t,r){var e=r.pop();for(e=t.j+t.h.length()-e;e>127;)r.push(127&e|128),e>>>=7,t.j++;r.push(e),t.j++}function Ye(t,r,e){if(null!=e)switch(Ke(t,r,0),typeof e){case"number":t=t.h,It(e),Ce(t,_t,St);break;case"bigint":e=Ge(e,Me,Be),Ce(t.h,e.j,e.h);break;default:e=Ue(e),Ce(t.h,e.j,e.h)}}function Ze(t,r,e){Ke(t,r,2),De(t.h,e.length),ze(t,t.h.end()),ze(t,e)}var qe=class{constructor(){this.l=[],this.j=0,this.h=new $e}};function Qe(t){if("string"==typeof t)Ue(t)}function tn(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var rn=tn(),en=tn(),nn=tn(),on=tn(),an=tn(),sn=tn(),un=tn(),ln=tn(),hn=tn(),cn=tn(),fn=tn(),dn=tn();var vn=class{constructor(t,r){this.m=pr(t,r,void 0,2048)}toJSON(){return dr(this)}};vn.prototype[z]=Q,vn.prototype.toString=function(){return this.m.toString()};var pn=class{constructor(t,r,e){this.h=t,this.j=r,t=rn,this.l=!!t&&e===t||!1}};function gn(t,r){return new pn(t,r,rn)}function mn(t,r,e,n,i){null!=(r=Un(r,n))&&(e=Je(t,e),i(r,t),Xe(t,e))}var yn,wn,bn=gn(function(t,r,e,n,i){return 2===t.j&&(ye(t,Gr(r,n,e),i),!0)},mn),_n=gn(function(t,r,e,n,i){return 2===t.j&&(ye(t,Gr(r,n,e),i),!0)},mn),Sn=Symbol(),An=Symbol(),In=Symbol(),jn=Symbol(),En=Symbol();function Tn(t,r,e,n){var i=n[t];if(i)return i;(i={}).V=n,i.J=function(t){switch(typeof t){case"boolean":return sr||=[0,void 0,!0];case"number":return t>0?void 0:0===t?ur||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var o=n[1],a=1;o&&o.constructor===Object&&(i.M=o,"function"==typeof(o=n[++a])&&(i.S=!0,yn??=o,wn??=n[a+1],o=n[a+=2]));for(var s={};o&&Array.isArray(o)&&o.length&&"number"==typeof o[0]&&o[0]>0;){for(var u=0;u<o.length;u++)s[o[u]]=o;o=n[++a]}for(u=1;void 0!==o;){let t;"number"==typeof o&&(u+=o,o=n[++a]);var l=void 0;if(o instanceof pn?t=o:(t=bn,a--),t?.l){o=n[++a],l=n;var h=a;"function"==typeof o&&(o=o(),l[h]=o),l=o}for(h=u+1,"number"==typeof(o=n[++a])&&o<0&&(h-=o,o=n[++a]);u<h;u++){let n=s[u];l?e(i,u,t,l,n):r(i,u,t,n)}}return n[t]=i}function Bn(t){return Array.isArray(t)?t[0]instanceof pn?t:[_n,t]:[t,void 0]}function Un(t,r){return t instanceof vn?t.m:Array.isArray(t)?vr(t,r):void 0}function Pn(t,r,e,n){var i=e.h;t[r]=n?(t,r,e)=>i(t,r,e,n):i}function xn(t,r,e,n,i){var o,a,s=e.h;t[r]=(t,r,e)=>s(t,r,e,a||=Tn(An,Pn,xn,n).J,o||=Ln(n),i)}function Ln(t){var r=t[In];if(null!=r)return r;var e=Tn(An,Pn,xn,t);return r=e.S?(t,r)=>yn(t,r,e):(t,r)=>{t:{me();try{for(;pe(r)&&4!=r.j;){let u=r.l,l=e[u];if(null==l){let t=e.M;if(t){let r=t[u];if(r){let t=On(r);null!=t&&(l=e[u]=t)}}}if(null==l||!l(r,t,u)){var n=r;let e=n.o;if(ge(n),n.R)var i=void 0;else{let t=n.h.h-e;n.h.h=e,i=le(n.h,t)}n=void 0;var o=t,a=u,s=i;s&&((n=o[R]??(o[R]=new lr))[a]??(n[a]=[])).push(s)}}let l=ir(t);l&&(l.h=e.V[En]);var u=!0;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{fe>0&&fe--}u=void 0}return u},t[In]=r,t[En]=Nn.bind(t),r}function Nn(t,r,e,n){var i=this[An],o=this[In],a=vr(void 0,i.J),s=ir(t);if(s){var u=!1,l=i.M;if(l){if(i=(r,e,i)=>{if(0!==i.length)if(l[e])for(let t of i){r=de(t);try{u=!0,o(a,r)}finally{ve(r)}}else n?.(t,e,i)},null==r)or(s,i);else if(null!=s){let t=s[r];t&&i(s,r,t)}if(u){let n=0|t[X];if(2&n&&2048&n&&!e?.ka)throw Error();let i=at(n),o=(r,o)=>{if(null!=Er(t,r,i)){if(1===e?.ja)return;throw Error()}null!=o&&(n=Br(t,n,r,o,i)),delete s[r]};null==r?it(a,0|a[X],(t,r)=>{o(t,r)}):o(r,Er(a,r,i))}}}}function On(t){var r=(t=Bn(t))[0].h;if(t=t[1]){let e=Ln(t),n=Tn(An,Pn,xn,t).J;return(t,i,o)=>r(t,i,o,n,e)}return r}function kn(t,r,e){t[r]=e.j}function Vn(t,r,e,n){var i,o,a=e.j;t[r]=(t,r,e)=>a(t,r,e,o||=Tn(Sn,kn,Vn,n).J,i||=Fn(n))}function Fn(t){var r=t[jn];if(!r){let e=Tn(Sn,kn,Vn,t);r=(t,r)=>Mn(t,r,e),t[jn]=r}return r}function Mn(t,r,e){it(t,0|t[X],(t,n)=>{if(null!=n){var i=function(t,r){var e=t[r];if(e)return e;if((e=t.M)&&(e=e[r])){var n=(e=Bn(e))[0].j;if(e=e[1]){let r=Fn(e),i=Tn(Sn,kn,Vn,e).J;e=t.S?wn(i,r):(t,e,o)=>n(t,e,o,i,r)}else e=n;return t[r]=e}}(e,t);i?i(r,n,t):t<500||k(H,3)}}),(t=ir(t))&&or(t,(t,e,n)=>{for(ze(r,r.h.end()),t=0;t<n.length;t++)ze(r,B(n[t])||new Uint8Array(0))})}var Gn=ft(0);function Cn(t,r,e){if(Array.isArray(r)){var n=0|r[X];if(4&n)return r;for(var i=0,o=0;i<r.length;i++){let e=t(r[i]);null!=e&&(r[o++]=e)}return o<i&&(r.length=o),t=1|n,e&&(t=-1537&t|4),t!==n&&q(r,t),e&&2&t&&Object.freeze(r),r}}var Dn=(t,r)=>{var e=new qe;Mn(t.m,e,Tn(Sn,kn,Vn,r)),ze(e,e.h.end()),t=new Uint8Array(e.j);var n=(r=e.l).length,i=0;for(let e=0;e<n;e++){let n=r[e];t.set(n,i),i+=n.length}return e.l=[t],t};function Rn(t,r,e){return new pn(t,r,e)}function Wn(t,r,e){return new pn(t,r,e)}function Hn(t,r,e){Br(t,0|t[X],r,e,at(0|t[X]))}function $n(t,r,e){null!=(r=Zt(r))&&(Qe(r),Ye(t,e,r))}function zn(t,r,e){null!=(r=Rt(r))&&null!=r&&(Ke(t,e,0),Re(t.h,r))}function Kn(t,r,e){null!=(r=null==r||"boolean"==typeof r?r:"number"==typeof r?!!r:void 0)&&(Ke(t,e,0),t.h.h.push(r?1:0))}function Jn(t,r,e){null!=(r=rr(r))&&Ze(t,e,l(r))}function Xn(t,r,e,n,i){null!=(r=Un(r,n))&&(e=Je(t,e),i(r,t),Xe(t,e))}function Yn(t,r,e){null!=(r=qt(r))&&Ze(t,e,te(r,!0).buffer)}function Zn(t,r,e){r=function(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Ft(t)?t>>>0:void 0}(r),null!=r&&null!=r&&(Ke(t,e,0),De(t.h,r))}function qn(t,r,e){null!=(r=Rt(r))&&(r=parseInt(r,10),Ke(t,e,0),Re(t.h,r))}function Qn(t,r,e){return 0===t.j&&(Hn(r,e,ie(t.h)),!0)}function ti(t,r,e){return(0===t.j||2===t.j)&&(r=kr(r,0|r[X],e),2==t.j?_e(t,ne,r):r.push(ne(t.h)),!0)}function ri(t,r,e){return 2===t.j&&(Hn(r,e,(t=be(t))===T()?void 0:t),!0)}var ei=Rn(function(t,r,e){if(1!==t.j)return!1;var n=t.h;t=oe(n);var i=oe(n);n=2*(i>>31)+1;var o=i>>>20&2047;return t=4294967296*(1048575&i)+t,Hn(r,e,2047==o?t?NaN:n*(1/0):0==o?5e-324*n*t:n*Math.pow(2,o-1075)*(t+4503599627370496)),!0},function(t,r,e){null!=(r=Gt(r))&&(Ke(t,e,1),t=t.h,(e=wt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+r,!0),_t=e.getUint32(0,!0),St=e.getUint32(4,!0),He(t,_t),He(t,St))},cn),ni=Rn(function(t,r,e){if(5!==t.j)return!1;var n=oe(t.h);t=2*(n>>31)+1;var i=n>>>23&255;return n&=8388607,Hn(r,e,255==i?n?NaN:t*(1/0):0==i?1401298464324817e-60*t*n:t*Math.pow(2,i-150)*(n+8388608)),!0},function(t,r,e){null!=(r=Gt(r))&&(Ke(t,e,5),t=t.h,(e=wt||=new DataView(new ArrayBuffer(8))).setFloat32(0,+r,!0),St=0,He(t,_t=e.getUint32(0,!0)))},hn),ii=Rn(function(t,r,e){return Qn(t,r,e)},$n,sn),oi=Rn(function(t,r,e){return Qn(t,r,e)},$n,sn),ai=Wn(function(t,r,e){return 0!==t.j&&2!==t.j?t=!1:(r=kr(r,0|r[X],e),2==t.j?_e(t,ie,r):r.push(ie(t.h)),t=!0),t},function(t,r,e){if(null!=(r=Cn(Zt,r,!1)))for(let n=0;n<r.length;n++)Ye(t,e,r[n])},sn),si=Rn(function(t,r,e){return 0!==t.j?r=!1:(Hn(r,e,(t=ie(t.h))===Gn?void 0:t),r=!0),r},$n,sn),ui=Rn(function(t,r,e){return 0!==t.j?t=!1:(Hn(r,e,re(t.h,Et)),t=!0),t},function(t,r,e){if(r=function(t){if(null==t)return t;var r=typeof t;if("bigint"===r)return String(kt(64,t));if(Dt(t)){if("string"===r)return r=Mt(Number(t)),Vt(r)&&r>=0?t=String(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),t=Ht(t)),t;if("number"===r)return zt(t)}}(r),null!=r){if("string"==typeof r)je(r);if(null!=r)switch(Ke(t,e,0),typeof r){case"number":t=t.h,It(r),Ce(t,_t,St);break;case"bigint":e=Ge(r,Te,Ie),Ce(t.h,e.j,e.h);break;default:e=je(r),Ce(t.h,e.j,e.h)}}},un),li=Rn(function(t,r,e){return 0===t.j&&(Hn(r,e,ne(t.h)),!0)},zn,on),hi=Wn(ti,function(t,r,e){if(null!=(r=Cn(Rt,r,!0)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&(Ke(n,i,0),Re(n.h,o))}},on),ci=Wn(ti,function(t,r,e){if(null!=(r=Cn(Rt,r,!0))&&r.length){e=Je(t,e);for(let e=0;e<r.length;e++)Re(t.h,r[e]);Xe(t,e)}},on),fi=Rn(function(t,r,e){return 0===t.j&&(Hn(r,e,0===(t=ne(t.h))?void 0:t),!0)},zn,on),di=Rn(function(t,r,e){return 0===t.j&&(Hn(r,e,ee(t.h)),!0)},Kn,en),vi=Rn(function(t,r,e){return 0===t.j&&(Hn(r,e,!1===(t=ee(t.h))?void 0:t),!0)},Kn,en),pi=Wn(function(t,r,e){return 2===t.j&&(t=we(t),kr(r,0|r[X],e).push(t),!0)},function(t,r,e){if(null!=(r=Cn(rr,r,!0)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&Ze(n,i,l(o))}},nn),gi=Rn(function(t,r,e){return 2===t.j&&(Hn(r,e,""===(t=we(t))?void 0:t),!0)},Jn,nn),mi=Rn(function(t,r,e){return 2===t.j&&(Hn(r,e,we(t)),!0)},Jn,nn),yi=function(t,r,e=rn){return new pn(t,r,e)}(function(t,r,e,n,i){return 2===t.j&&(n=vr(void 0,n),kr(r,0|r[X],e).push(n),ye(t,n,i),!0)},function(t,r,e,n,i){if(Array.isArray(r)){for(let o=0;o<r.length;o++)Xn(t,r[o],e,n,i);1&(t=0|r[X])||q(r,1|t)}}),wi=gn(function(t,r,e,n,i,o){if(2!==t.j)return!1;var a=0|r[X];return Fr(r,a,o,e,at(a)),ye(t,r=Gr(r,n,e),i),!0},Xn),bi=Rn(function(t,r,e){return 2===t.j&&(Hn(r,e,be(t)),!0)},Yn,fn),_i=Wn(function(t,r,e){return 2===t.j&&(t=be(t),kr(r,0|r[X],e).push(t),!0)},function(t,r,e){if(null!=(r=Cn(qt,r,!1)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&Ze(n,i,te(o,!0).buffer)}},fn),Si=Rn(function(t,r,e){return 0===t.j&&(Hn(r,e,ne(t.h)>>>0),!0)},Zn,an),Ai=Rn(function(t,r,e){return 0===t.j&&(Hn(r,e,0===(t=ne(t.h)>>>0)?void 0:t),!0)},Zn,an),Ii=Rn(function(t,r,e){return 0===t.j&&(Hn(r,e,ne(t.h)),!0)},qn,dn),ji=Rn(function(t,r,e){return 0===t.j&&(Hn(r,e,0===(t=ne(t.h))?void 0:t),!0)},qn,dn),Ei=Rn(function(t,r,e){return 0!==t.j?t=!1:(Hn(r,e,function(t){return re(t,(t,r)=>{var e=-(1&t);return Tt(t=(t>>>1|r<<31)^e,r>>>1^e)})}(t.h)),t=!0),t},function(t,r,e){if(null!=(r=Zt(r))&&(Qe(r),null!=r))switch(Ke(t,e,0),typeof r){case"number":t=t.h,r=(e=r)<0,At(e=2*Math.abs(e)),e=_t;let n=St;r&&(0==e?0==n?n=e=4294967295:(n--,e=4294967295):e--),Ce(t,_t=e,St=n);break;case"bigint":t=t.h,r=r<<BigInt(1)^r>>BigInt(63),_t=Number(BigInt.asUintN(32,r)),St=Number(BigInt.asUintN(32,r>>BigInt(32))),Ce(t,_t,St);break;default:We(t.h,r)}},ln);function Ti(t){return function(){return Dn(this,t)}}var Bi,Ui=[0,bi,_i,di,mi],Pi=[0,gi,[0,ji,[0,si,fi],ji,-1,[0,Ii],ji,-1],Rn(ri,Yn,fn)],xi=[0,gi,Rn(ri,function(t,r,e){if(null!=r){if(r instanceof vn){let n=r.ma;return void(n?(r=n(r),null!=r&&Ze(t,e,te(r,!0).buffer)):k(H,3))}if(Array.isArray(r))return void k(H,3)}Yn(t,r,e)},fn)],Li=[0,1,[0,12,li,10,di],[0,7,[0,li,-1]]],Ni=globalThis.trustedTypes;var Oi=class{constructor(t){this.h=t}toString(){return this.h+""}};function ki(t){var r;return void 0===Bi&&(Bi=function(){var t=null;if(!Ni)return t;try{let r=t=>t;t=Ni.createPolicy("goog#html",{createHTML:r,createScript:r,createScriptURL:r})}catch(t){}return t}()),t=(r=Bi)?r.createScriptURL(t):t,new Oi(t)}function Vi(t,...r){if(0===r.length)return ki(t[0]);var e=t[0];for(let n=0;n<r.length;n++)e+=encodeURIComponent(r[n])+t[n+1];return ki(e)}var Fi=[0,li,Ii,di,-1,ci,Ii,-1,di,-1],Mi=[0,Ii,-1,di],Gi=class extends vn{constructor(t){super(t)}},Ci=[0,di,mi,di,Ii,-1,Wn(function(t,r,e){return(0===t.j||2===t.j)&&(r=kr(r,0|r[X],e),2==t.j?_e(t,ae,r):r.push(ne(t.h)),!0)},function(t,r,e){if(null!=(r=Cn(Rt,r,!0))&&r.length){e=Je(t,e);for(let e=0;e<r.length;e++)Re(t.h,r[e]);Xe(t,e)}},dn),mi,-1,[0,di,-1],Ii,di,-1,Mi],Di=[0,3,di,-1,2,[0,[2],li,wi,[0,Si]],[0,Ii,di,Ii,di,Ii,4,[0,di,mi,-1,di]],[0,[3,4],mi,-1,wi,[0,li],wi,[0,Ii,-1]],[0],mi],Ri=[0,mi,-2],Wi=class extends vn{constructor(t){super(t)}},Hi=[0],$i=[0,li,di,1,di,-4],zi=class extends vn{constructor(t){super(t,2)}},Ki={};Ki[336783863]=[0,mi,di,-1,li,[0,[1,2,3,4,5,6,7,8,9],wi,Hi,wi,Ci,wi,Ri,wi,$i,wi,Fi,wi,[0,mi,-2],wi,[0,mi,Ii],wi,Di,wi,Mi],[0,mi],di,[0,[1,3],[2,4],wi,[0,ci],-1,wi,[0,pi],-1,yi,[0,mi,-1]],mi];var Ji=[0,si,-1,vi,-3,si,ci,gi,fi,si,-1,vi,fi,vi,-2,gi],Xi=class extends vn{constructor(t){super(t,500)}v(t){return $r(this,0,7,t)}},Yi=[-1,{}],Zi=[0,mi,1,Yi],qi=[0,mi,pi,Yi],Qi=class extends vn{constructor(t){super(t,500)}v(t){return $r(this,0,1001,t)}};Qi.prototype.j=Ti([-500,yi,[-500,gi,-1,pi,-3,[-2,Ki,di],yi,xi,fi,-1,Zi,qi,yi,[0,gi,vi],gi,Ji,fi,pi,987,pi],4,yi,[-500,mi,-1,[-1,{}],998,mi],yi,[-500,mi,pi,-1,[-2,{},di],997,pi,-1],fi,yi,[-500,mi,pi,Yi,998,pi],pi,fi,Zi,qi,yi,[0,gi,-1,Yi],pi,-2,Ji,gi,-1,vi,[0,vi,Ai],978,Yi,yi,xi]);var to,ro=class extends vn{constructor(t){super(t)}},eo=class extends vn{constructor(t){super(t)}j(){return Wr(this,ro)}},no=[0,yi,[0,li,ni,mi,-1]],io=class extends vn{constructor(t){super(t)}},oo=class extends vn{constructor(t){super(t)}j(){var t=this.m,r=0|t[X],e=ao,n=this.m;return e=2===Mr(Vr(n),n,void 0,e)?2:-1,void 0!==Cr(t,r,Gi,e)}},ao=[1,2,3,4,5,6],so=class extends vn{constructor(t){super(t)}j(){return null!=jr(this,1,void 0,Nr)}l(){return null!=rr(jr(this,2))}},uo=class extends vn{constructor(t){super(t)}},lo=class extends vn{constructor(t){super(t)}};to=new class{constructor(){var t=zi;this.h=lo,this.l=$r,this.defaultValue=void 0,this.j=null!=t.ha?ot:void 0}register(){p(this)}},Ki[451755788]=[0,[0,[0,bi,mi,[0,li,oi,-1],[0,ui,oi]],di,[0,ao,wi,$i,wi,Ci,wi,Fi,wi,Hi,wi,Ri,wi,Di],Ii],[0,mi,li,ni,pi,-1],ei];var ho,co,fo=class extends vn{constructor(t){super(t)}},vo=(ho=class extends vn{constructor(t){super(t)}},co=[0,yi,[0,1,li,mi,no],oi],(t,r)=>{t:{let n={O:!0};r&&Object.assign(n,r),t=de(t,void 0,void 0,n);try{let r=new ho,n=r.m;Ln(co)(n,t);var e=r;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{ve(t)}e=void 0}return e});function po(t){return Zr(new go,1,t)}var go=class extends vn{constructor(t){super(t)}},mo=class extends vn{constructor(t){super(t)}},yo=[0,Ii,2,ui,-2,oi,yi,[0,Ii,oi]],wo=class extends vn{constructor(t){super(t)}},bo=class extends vn{constructor(t){super(t)}};function _o(t){var r=new So;return r=Zr(r,1,4),Zr(r,2,t)}var So=class extends vn{constructor(t){super(t)}},Ao=[3,4,5,6,7],Io=class extends vn{constructor(t){super(t)}},jo=class extends vn{constructor(t){super(t)}};jo.prototype.j=Ti([0,[0,Ii,mi,-3,Ii],[0,Ao,Ii,-1,wi,[0,Ii,mi,ui],wi,yo,wi,[0,1,yo],wi,[0,Ii],wi,[0,Ii,mi,ui]]]);var Eo=class{constructor(){this.h="undefined"!=typeof AbortController}async send(t,r,e){var n=this.h?new AbortController:void 0,i=n&&t.N>0?setTimeout(()=>{n.abort()},t.N):void 0;try{let i=await fetch(t.url,{method:t.da,headers:{...t.ca},...t.body&&{body:t.body},...t.withCredentials&&{credentials:"include"},signal:t.N&&n?n.signal:null});200===i.status?r?.(await i.text()):e?.(i.status)}catch(t){if("AbortError"===t?.name)e?.(408);else e?.(400)}finally{clearTimeout(i)}}},To=class extends vn{constructor(t){super(t,37)}},Bo=[-4,{},Li,Ii,Pi],Uo=[0,mi,Ii,1,mi,-1,Ii,1,Ii,1,oi],Po=[0,Ii,mi,-2],xo=[0,mi,Ii],Lo=[0,mi,Ii],No=[0,di,-3],Oo=[0,Ii,mi,-1,oi,li,-1,mi,-5,yi,[0,mi,-4],-1,di,[0,di,-3],Ii];var ko=class extends vn{constructor(t){super(t,19)}},Vo=function(t){return r=>Dn(r,t)}([-19,{},[0,Ii,1,[0,mi,-6,oi,li,mi,-1,oi],1,[0,mi,1,mi,-5],mi,-1,[0,Ii,mi,-8],[0,mi,-3],[0,mi,Ii,mi,-2],[0,mi,-1,Ii,mi,-1,Ii,mi,-1,[0,yi,[0,mi,-1],di,mi,-5],[0,Ii,di,li,-2]],oi,[0,mi,-3,oi,li,mi,-1],[0,Ii,mi,-1],[0,mi,-9],[0,mi,-6,Ii,mi,1,mi,di,Ii,-1,di,mi,-2,Ii,mi,Ii,mi,li,-1],1,[0,Ii],1,[0,mi,-4],1,Uo,[0,[1,2,3,4,5,6],wi,Uo,wi,xo,wi,Lo,wi,[0,Ii],wi,Oo,wi,Po],xo,Lo,Oo,[0,[0,Ii,mi,-1,oi,li,-1,mi,-4,yi,[0,mi,-4],-1,1,No],[0,Ii,mi,-1,oi,li,-1,mi,-4,No]],Po,[0,mi,[0,li,-3,Ii],Ii,-2,[0,li,-1],di],4,[0,mi,Ii,mi,-1,oi,Ii,mi,-1,Ii,li,-1]],Ii,yi,[-37,{},ii,mi,yi,[0,mi,-1],bi,1,bi,[0,pi,-1,hi,ai,-1],mi,[0,li,mi,-1],di,li,oi,mi,-1,Ei,Ui,ii,bi,Ii,hi,oi,-1,[0,Ii,-1],mi,di,mi,ci,mi,-1,ei,1,ei,Bo,di,[0,Ii,[0,ni,li,-2],[0,ni]],[0,Ii,oi]],ii,_i,mi,-1,ii,Ii,-1,[0,di,-1,Ii,di],[0,oi,-1,mi],[0,ii,di,oi],oi,1,Si,1,Bo]),Fo=class{constructor(t){this.j=[],this.o=new Eo,this.l=t??"",this.h=setInterval(()=>{this.flush()},6e4)}close(){void 0!==this.h&&(clearInterval(this.h),this.h=void 0),this.flush()}flush(t,r){if(this.error)r?.("net-send-failed");else if(0===this.j.length)t?.();else{var e=this.j;this.j=[],e=function(t){var r=new ko;{_r(r=Zr(r,2,1786));let l=r.m,h=0|l[X];if(null==t)Br(l,h,3);else{var e=t===G?7:0|t[X],n=e,i=Lr(e),o=i||Object.isFrozen(t),a=!0,s=!0;for(let r=0;r<t.length;r++){var u=t[r];i||(u=tt(u),a&&=!u,s&&=u)}i||(e=a?13:5,e=s?-4097&e:4096|e),o&&e===n||(t=Nt(t),n=0,e=Kr(e,h)),e!==n&&q(t,e),h=Br(l,h,3,t),2&e||!(4096&e||16&e)||Sr(l,h)}}return r}(e),e=Vo(e),this.o.send({url:"https://odml.pa.googleapis.com/v1/log",da:"POST",N:1e4,body:e,fa:2,ca:{"Content-Type":"application/x-protobuf","x-goog-api-key":this.l},withCredentials:!1},()=>{t?.()},t=>{this.error=Error(`Logging failed with HTTP error: ${t}`),this.j=[],void 0!==this.h&&(clearInterval(this.h),this.h=void 0),r?.("net-send-failed",t)})}}};class Mo{constructor(){this.I=this.B=this.H=this.A=this.D=this.F=this.C=0}}function Go(t,r){var e=new jo;e=$r(e,0,1,t.U),e=$r(e,0,2,r),r=Tr(r=new To,6,et(e=e.j(),!1)),(t=t.G).error||t.j.push(r)}function Co(t,r){var e={C:r.C-t.l.C,F:r.F-t.l.F,D:r.D-t.l.D,A:r.A-t.l.A,H:r.H-t.l.H,B:r.B,I:r.I},n=_o(1);e=Do(t,e),Go(t,n=zr(n,4,Ao,e)),t.l=r}function Do(t,r){var e=new mo;return t=Yr(t=Xr(t=Zr(e,1,t.K),7,r.A),5,r.B),t=Yr(t,6,r.I),r.D>0&&Yr(t,4,r.H/r.D),0!==r.C&&(e=Xr(e=po(3),2,r.C),Jr(t,8,go,e)),0!==r.F&&(r=Xr(e=po(4),2,r.F),Jr(t,8,go,r)),t}var Ro=class{constructor(t,r){this.T=performance.now(),this.o=performance.now(),this.j=new Map,this.u=0,this.h=new Mo,this.l=new Mo,this.G=new Fo(r),this.K=function(t){switch(t){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),t=new Io,"undefined"==typeof window?r=0:(r=navigator.userAgent,r=/Android/i.test(r)?1:/iPhone|iPad|iPod/i.test(r)?2:/Windows/i.test(r)?5:/Macintosh/i.test(r)?4:/Linux/i.test(r)?3:0),t=Tr(t=Zr(t,1,r),2,tr("")),t=Tr(t,3,tr("")),t=Tr(t,4,tr("1.1.0")),t=Tr(t,5,tr("")),this.U=Zr(t,6,4)}aa(){var t=new bo;t=Yr(t=Zr(t,1,this.K),3,performance.now()-this.T),Go(this,t=zr(_o(0),3,Ao,t)),this.o=performance.now()}Z(){var t={...this.h,A:this.h.A+this.j.size,B:this.u,I:performance.now()-this.T};Co(this,t);var r=new wo;r=$r(r,0,2,t=Do(this,t)),Go(this,r=zr(t=_o(2),5,Ao,r))}close(){var t=this.G;"function"==typeof t.close?t.close():t.flush()}};function Wo(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Ho(t){if("function"!=typeof importScripts){let r=document.createElement("script");return r.src=t.toString(),r.crossOrigin="anonymous",new Promise((t,e)=>{r.addEventListener("load",()=>{t()},!1),r.addEventListener("error",t=>{e(t)},!1),document.body.appendChild(r)})}try{importScripts(t.toString())}catch(r){if(!(r instanceof TypeError))throw r;{let r=self.import;r?await r(t.toString()):await import(t.toString())}}}function $o(t,r,e){t.o||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),e(r=t.i.stringToNewUTF8(r)),t.i._free(r)}function zo(t,r,e){t.o||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(r.length);for(let e=0;e<r.length;e++)n[e]=t.i.stringToNewUTF8(r[e]);r=t.i._malloc(4*n.length),t.i.HEAPU32.set(n,r>>2),e(r);for(let r of n)t.i._free(r);t.i._free(r)}function Ko(t,r,e){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[r]=e}function Jo(t,r,e){var n=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[r]=(t,r,i)=>{r?(e(n,i),n=[]):n.push(t)}}var Xo=function(t){return class extends t{get P(){return this.i}X(){if("function"==typeof this.P._mediapipeLoggerGetEncodedApiKey){let t=this.P._mediapipeLoggerGetEncodedApiKey();return this.P._decodeBase64(t)}}}}(function(t){return class extends t{ba(){this.i._registerModelResourcesGraphService()}}}(class{constructor(t,r){this.l=!0,this.i=t,this.h=null,this.j=0,this.o="function"==typeof this.i._addIntToInputStream,void 0!==r?this.i.canvas=r:Wo()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){var r=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(r),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,r){var e=t.length,n=this.i._malloc(e);this.i.HEAPU8.set(t,n),r?this.i._changeBinaryGraph(e,n):this.i._changeTextGraph(e,n),this.i._free(n)}configureAudio(t,r,e,n,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),$o(this,n||"input_audio",n=>{$o(this,i=i||"audio_header",i=>{this.i._configureAudio(n,i,t,r??0,e)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,r){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=r}addAudioToStream(t,r,e){this.addAudioToStreamWithShape(t,0,0,r,e)}addAudioToStreamWithShape(t,r,e,n,i){var o=4*t.length;this.j!==o&&(this.h&&this.i._free(this.h),this.h=this.i._malloc(o),this.j=o),this.i.HEAPF32.set(t,this.h/4),$o(this,n,t=>{this.i._addAudioToInputStream(this.h,r,e,t,i)})}addGpuBufferToStream(t,r,e){$o(this,r,r=>{if(!this.i.canvas)throw Error("No OpenGL canvas configured.");r?this.i._bindTextureToStream(r):this.i._bindTextureToCanvas();var n=this.i.canvas.getContext("webgl2")||this.i.canvas.getContext("webgl");if(!n)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");this.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),this.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);var[i,o]=void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height];!this.l||i===this.i.canvas.width&&o===this.i.canvas.height||(this.i.canvas.width=i,this.i.canvas.height=o);var[a,s]=[i,o];this.i._addBoundTextureToStream(r,a,s,e)})}addBoolToStream(t,r,e){$o(this,r,r=>{this.i._addBoolToInputStream(t,r,e)})}addDoubleToStream(t,r,e){$o(this,r,r=>{this.i._addDoubleToInputStream(t,r,e)})}addFloatToStream(t,r,e){$o(this,r,r=>{this.i._addFloatToInputStream(t,r,e)})}addIntToStream(t,r,e){$o(this,r,r=>{this.i._addIntToInputStream(t,r,e)})}addUintToStream(t,r,e){$o(this,r,r=>{this.i._addUintToInputStream(t,r,e)})}addStringToStream(t,r,e){$o(this,r,r=>{$o(this,t,t=>{this.i._addStringToInputStream(t,r,e)})})}addStringRecordToStream(t,r,e){$o(this,r,r=>{zo(this,Object.keys(t),n=>{zo(this,Object.values(t),i=>{this.i._addFlatHashMapToInputStream(n,i,Object.keys(t).length,r,e)})})})}addProtoToStream(t,r,e,n){$o(this,e,e=>{$o(this,r,r=>{var i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,r,e,n),this.i._free(i)})})}addEmptyPacketToStream(t,r){$o(this,t,t=>{this.i._addEmptyPacketToInputStream(t,r)})}addBoolVectorToStream(t,r,e){$o(this,r,r=>{var n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let r of t)this.i._addBoolVectorEntry(n,r);this.i._addBoolVectorToInputStream(n,r,e)})}addDoubleVectorToStream(t,r,e){$o(this,r,r=>{var n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let r of t)this.i._addDoubleVectorEntry(n,r);this.i._addDoubleVectorToInputStream(n,r,e)})}addFloatVectorToStream(t,r,e){$o(this,r,r=>{var n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let r of t)this.i._addFloatVectorEntry(n,r);this.i._addFloatVectorToInputStream(n,r,e)})}addIntVectorToStream(t,r,e){$o(this,r,r=>{var n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let r of t)this.i._addIntVectorEntry(n,r);this.i._addIntVectorToInputStream(n,r,e)})}addUintVectorToStream(t,r,e){$o(this,r,r=>{var n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let r of t)this.i._addUintVectorEntry(n,r);this.i._addUintVectorToInputStream(n,r,e)})}addStringVectorToStream(t,r,e){$o(this,r,r=>{var n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let r of t)$o(this,r,t=>{this.i._addStringVectorEntry(n,t)});this.i._addStringVectorToInputStream(n,r,e)})}addBoolToInputSidePacket(t,r){$o(this,r,r=>{this.i._addBoolToInputSidePacket(t,r)})}addDoubleToInputSidePacket(t,r){$o(this,r,r=>{this.i._addDoubleToInputSidePacket(t,r)})}addFloatToInputSidePacket(t,r){$o(this,r,r=>{this.i._addFloatToInputSidePacket(t,r)})}addIntToInputSidePacket(t,r){$o(this,r,r=>{this.i._addIntToInputSidePacket(t,r)})}addUintToInputSidePacket(t,r){$o(this,r,r=>{this.i._addUintToInputSidePacket(t,r)})}addStringToInputSidePacket(t,r){$o(this,r,r=>{$o(this,t,t=>{this.i._addStringToInputSidePacket(t,r)})})}addProtoToInputSidePacket(t,r,e){$o(this,e,e=>{$o(this,r,r=>{var n=this.i._malloc(t.length);this.i.HEAPU8.set(t,n),this.i._addProtoToInputSidePacket(n,t.length,r,e),this.i._free(n)})})}addBoolVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.i._allocateBoolVector(t.length);if(!e)throw Error("Unable to allocate new bool vector on heap.");for(let r of t)this.i._addBoolVectorEntry(e,r);this.i._addBoolVectorToInputSidePacket(e,r)})}addDoubleVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.i._allocateDoubleVector(t.length);if(!e)throw Error("Unable to allocate new double vector on heap.");for(let r of t)this.i._addDoubleVectorEntry(e,r);this.i._addDoubleVectorToInputSidePacket(e,r)})}addFloatVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.i._allocateFloatVector(t.length);if(!e)throw Error("Unable to allocate new float vector on heap.");for(let r of t)this.i._addFloatVectorEntry(e,r);this.i._addFloatVectorToInputSidePacket(e,r)})}addIntVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.i._allocateIntVector(t.length);if(!e)throw Error("Unable to allocate new int vector on heap.");for(let r of t)this.i._addIntVectorEntry(e,r);this.i._addIntVectorToInputSidePacket(e,r)})}addUintVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.i._allocateUintVector(t.length);if(!e)throw Error("Unable to allocate new unsigned int vector on heap.");for(let r of t)this.i._addUintVectorEntry(e,r);this.i._addUintVectorToInputSidePacket(e,r)})}addStringVectorToInputSidePacket(t,r){$o(this,r,r=>{var e=this.i._allocateStringVector(t.length);if(!e)throw Error("Unable to allocate new string vector on heap.");for(let r of t)$o(this,r,t=>{this.i._addStringVectorEntry(e,t)});this.i._addStringVectorToInputSidePacket(e,r)})}attachBoolListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.i._attachBoolListener(t)})}attachBoolVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.i._attachBoolVectorListener(t)})}attachIntListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.i._attachIntListener(t)})}attachIntVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.i._attachIntVectorListener(t)})}attachUintListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.i._attachUintListener(t)})}attachUintVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.i._attachUintVectorListener(t)})}attachDoubleListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.i._attachDoubleListener(t)})}attachDoubleVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.i._attachDoubleVectorListener(t)})}attachFloatListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.i._attachFloatListener(t)})}attachFloatVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.i._attachFloatVectorListener(t)})}attachStringListener(t,r){Ko(this,t,r),$o(this,t,t=>{this.i._attachStringListener(t)})}attachStringVectorListener(t,r){Jo(this,t,r),$o(this,t,t=>{this.i._attachStringVectorListener(t)})}attachProtoListener(t,r,e){Ko(this,t,r),$o(this,t,t=>{this.i._attachProtoListener(t,e||!1)})}attachProtoVectorListener(t,r,e){Jo(this,t,r),$o(this,t,t=>{this.i._attachProtoVectorListener(t,e||!1)})}attachAudioListener(t,r,e){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Ko(this,t,(t,e)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),r(t,e)}),$o(this,t,t=>{this.i._attachAudioListener(t,e||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}})),Yo=class extends Xo{};async function Zo(t,r){var e=await(async(t,r,e)=>{var n=sa;if(t&&await Ho(t),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await Ho(r),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&e&&((t=self.Module).locateFile=e.locateFile,e.mainScriptUrlOrBlob&&(t.mainScriptUrlOrBlob=e.mainScriptUrlOrBlob)),e=await self.ModuleFactory(self.Module||e),self.ModuleFactory=self.Module=void 0,new n(e,null)})(t.wasmLoaderPath,t.assetLoaderPath,{locateFile:r=>r.endsWith(".wasm")?t.wasmBinaryPath.toString():t.assetBinaryPath&&r.endsWith(".data")?t.assetBinaryPath.toString():r});return function(t,r){r=r.la??"";var e=t.h.X();t.j=new Ro(r,e)}(e,r),await e.v(r),e}async function qo(t,r){return Zo(t,r)}function Qo(t,r){var e=Dr(t.baseOptions,so,1)||new so;"string"==typeof r?(Tr(e,2,tr(r)),Tr(e,1)):r instanceof Uint8Array&&(Tr(e,1,et(r,!1)),Tr(e,2)),$r(t.baseOptions,0,1,e)}function ta(t,r){var e=r.baseOptions||{};if(r.baseOptions?.modelAssetBuffer&&r.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Dr(t.baseOptions,so,1)?.j()||Dr(t.baseOptions,so,1)?.l()||r.baseOptions?.modelAssetBuffer||r.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,r){var e=Dr(t.baseOptions,oo,3);if(!e){var n=e=new oo,i=new Wi;zr(n,4,ao,i)}"delegate"in r&&("GPU"===r.delegate?(r=e,n=new Gi,zr(r,2,ao,n)):(r=e,n=new Wi,zr(r,4,ao,n))),$r(t.baseOptions,0,3,e)}(t,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then(t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)}).then(r=>{r=new Uint8Array(r);try{t.h.i.FS_unlink("/model.dat")}catch{}t.h.i.FS_createDataFile("/","model.dat",r,!0,!1,!1),Qo(t,"/model.dat"),aa(t)});if(e.modelAssetBuffer instanceof Uint8Array)Qo(t,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){for(var r=[],e=0;;){let{done:n,value:i}=await t.read();if(n)break;r.push(i),e+=i.length}if(0===r.length)return new Uint8Array(0);if(1===r.length)return r[0];t=new Uint8Array(e),e=0;for(let n of r)t.set(n,e),e+=n.length;return t}(e.modelAssetBuffer).then(r=>{Qo(t,r),aa(t)});return aa(t),Promise.resolve()}function ra(t){try{let r=t.u.length;if(1===r)throw Error(t.u[0].message);if(r>1)throw Error("Encountered multiple errors: "+t.u.map(t=>t.message).join(", "))}finally{t.u=[]}}var ea=class{constructor(t){this.h=t,this.u=[],this.o=0,this.h.setAutoRenderToScreen(!1)}setGraph(t,r){this.h.attachErrorListener((t,r)=>{this.u.push(Error(r))}),this.h.ba(),this.h.setGraph(t,r),this.j?.aa(),ra(this)}finishProcessing(t){if(this.h.finishProcessing(),ra(this),this.j&&void 0!==t){var r=this.j,e=r.j.get(t);if(void 0!==e&&(r.j.delete(t),t=performance.now()-e,++r.h.D,r.h.H+=t,r.h.B=Math.max(r.h.B,t),r.u=Math.max(r.u,t),performance.now()>r.o+3e4)){for(let[n,i]of r.j.entries())t=n,i<e&&(r.h.A++,r.j.delete(t));e={...r.h,I:performance.now()-r.o},r.h.B=0,r.o=performance.now(),Co(r,e)}}}close(){this.j?.Z(),this.j?.close(),this.h.closeGraph()}};async function na(t,r){return qo(t,r)}ea.prototype.close=ea.prototype.close;var ia=class extends ea{constructor(){super(...arguments),this.K=48e3}ea(t){this.K=t}};function oa(t){var r={classifications:Wr(t,fo).map(t=>function(t,r=-1,e=""){return{categories:t.map(t=>({index:Rt(jr(t,1))??0??-1,score:jr(t,2,void 0,Gt)??0??0,categoryName:rr(jr(t,3))??""??"",displayName:rr(jr(t,4))??""??""})),headIndex:r,headName:e}}(Dr(t,eo,4)?.j()??[],Rt(jr(t,2))??0,rr(jr(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(dt(t)?t=Number(t):(t=Ot(64,t),t=dt(t)?Number(t):String(t)),t):Dt(t)?"number"==typeof t?$t(t):Kt(t):void 0}(jr(t,2,void 0,Yt))&&(r.timestampMs=function(t){var r=Number(t);return Number.isSafeInteger(r)?r:String(t)}(jr(t,2,void 0,Yt)??Ir)),r}function aa(t){var r=new Qi;qr(r,10,"audio_in"),qr(r,10,"sample_rate"),qr(r,15,"timestamped_classifications");var e=new zi;!function(t,r){var e=to,n=t.m;R&&R in n&&(n=n[R])&&delete n[451755788],e.h?e.l(t,e.h,451755788,r,e.j):e.l(t,451755788,r,e.j)}(e,t.l);var n=new Xi;!function(t){var r=tr("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph");_r(t),Br(t=t.m,0|t[X],2,""===r?void 0:r)}(n),qr(n,3,"AUDIO:audio_in"),qr(n,3,"SAMPLE_RATE:sample_rate"),qr(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.v(e),Jr(r,1,Xi,n),t.h.attachProtoVectorListener("timestamped_classifications",(r,e)=>{!function(t,r){r.forEach(r=>{r=vo(r),t.G.push(oa(r))})}(t,r),t.o=Math.max(t.o,e)}),t.h.attachEmptyPacketListener("timestamped_classifications",r=>{t.o=Math.max(t.o,r)}),r=r.j(),t.setGraph(new Uint8Array(r),!0)}ia.prototype.setDefaultSampleRate=ia.prototype.ea;var sa=class extends ia{constructor(t,r){super(new Yo(t,r)),this.G=[],$r(t=this.l=new lo,0,1,r=new uo)}get baseOptions(){return Dr(this.l,uo,1)}set baseOptions(t){$r(this.l,0,1,t)}v(t){var r=this.l,e=Dr(this.l,io,2);if(e){var n=e.m;let t=0|n[X];e=Ar(e,n,t)?mr(e,n,!0):new e.constructor(yr(n,t,!1))}else e=new io;if(void 0!==t.displayNamesLocale?Tr(e,1,tr(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Tr(e,1),void 0!==t.maxResults){if(null!=(n=t.maxResults)){if("number"!=typeof n)throw O("int32");if(!Ft(n))throw O("int32");n|=0}Tr(e,2,n)}else"maxResults"in t&&Tr(e,2);if(void 0!==t.scoreThreshold){if(null!=(n=t.scoreThreshold)&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Tr(e,3,n)}else"scoreThreshold"in t&&Tr(e,3);return void 0!==t.categoryAllowlist?Or(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Tr(e,4),void 0!==t.categoryDenylist?Or(e,5,t.categoryDenylist):"categoryDenylist"in t&&Tr(e,5),$r(r,0,2,e),ta(this,t)}W(t,r){r=r??this.K;var e=this.o+1;if(this.j&&void 0!==e)if(Dr(this.baseOptions,oo,3)?.j()){var n=this.j;++n.h.F,n.j.set(e,performance.now())}else++(n=this.j).h.C,n.j.set(e,performance.now());return this.h.addDoubleToStream(r,"sample_rate",e),this.h.addAudioToStreamWithShape(t,1,t.length,"audio_in",e),this.G=[],this.finishProcessing(e),[...this.G]}};sa.prototype.classify=sa.prototype.W,sa.prototype.setOptions=sa.prototype.v,sa.createFromModelPath=function(t,r){return qo(t,{baseOptions:{modelAssetPath:r}})},sa.createFromModelBuffer=function(t,r){return na(t,{baseOptions:{modelAssetBuffer:r}})},sa.createFromOptions=function(t,r){return na(t,r)};var ua,la=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 ha(t){if(t)return!0;if(void 0===ua)try{await WebAssembly.instantiate(la),ua=!0}catch{ua=!1}return ua}async function ca(t,r,e){return{wasmLoaderPath:`${r}/${t}_${e=`wasm${e?"_module":""}${await ha(e)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${r}/${t}_${e}.wasm`}}var fa=class{};fa.forVisionTasks=function(t,r=!1){return ca("vision",t??Vi``,r)},fa.forLiteRtLmTextTasks=function(t,r=!1){return ca("litertlm_text",t??Vi``,r)},fa.forTextTasks=function(t,r=!1){return ca("text",t??Vi``,r)},fa.forRetrievalTasks=function(t,r=!1){return ca("retrieval",t??Vi``,r)},fa.forGenAiTasks=function(t,r=!1){return ca("genai",t??Vi``,r)},fa.forAudioTasks=function(t,r=!1){return ca("audio",t??Vi``,r)},fa.isSimdSupported=function(t=!1){return ha(t)},exports.AudioClassifier=sa,exports.AudioTaskRunner=ia,exports.FilesetResolver=fa,exports.TaskRunner=ea;
|
|
2
2
|
//# sourceMappingURL=audio_bundle_cjs.js.map
|