1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[396],{54177:function(t,e){"use strict";e.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,i=f(t),a=i[0],s=i[1],u=new o((a+s)*3/4-s),h=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[h++]=e>>16&255,u[h++]=e>>8&255,u[h++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[h++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(function(t,e,n){for(var o,i=[],a=e;a<n;a+=3)i.push(r[(o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]))>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(t,a,a+16383>s?s:a+16383));return 1===o?i.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===o&&i.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function f(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},87376:function(t,e,r){"use strict";var n=r(54177),o=r(94045),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return h(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!s.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|d(t,e),n=a(r),o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(C(t,Uint8Array)){var e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(C(t,ArrayBuffer)||t&&C(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(C(t,SharedArrayBuffer)||t&&C(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);var o=function(t){if(s.isBuffer(t)){var e,r=0|c(t.length),n=a(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?a(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),a(t<0?0:0|c(t))}function l(t){for(var e=t.length<0?0:0|c(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){var n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),s.prototype),n}function c(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||C(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(t).length;default:if(o)return n?-1:I(t).length;e=(""+e).toLowerCase(),o=!0}}function y(t,e,r){var o,i,a=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=x[t[i]];return o}(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}(this,e,r);case"base64":return o=e,i=r,0===o&&i===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(o,i));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}(this,e,r);default:if(a)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,o){var i;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(i=r=+r)!=i&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return -1;r=t.length-1}
1else if(r<0){if(!o)return -1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){var i,a=1,s=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;a=2,s/=2,f/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var h=-1;for(i=r;i<s;i++)if(u(t,i)===u(e,-1===h?0:i-h)){if(-1===h&&(h=i),i-h+1===f)return h*a}else -1!==h&&(i-=i-h),h=-1}else for(r+f>s&&(r=s-f),i=r;i>=0;i--){for(var l=!0,p=0;p<f;p++)if(u(t,i+p)!==u(e,p)){l=!1;break}if(l)return i}return -1}function b(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,f,u=t[o],h=null,l=u>239?4:u>223?3:u>191?2:1;if(o+l<=r)switch(l){case 1:u<128&&(h=u);break;case 2:(192&(i=t[o+1]))==128&&(f=(31&u)<<6|63&i)>127&&(h=f);break;case 3:i=t[o+1],a=t[o+2],(192&i)==128&&(192&a)==128&&(f=(15&u)<<12|(63&i)<<6|63&a)>2047&&(f<55296||f>57343)&&(h=f);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],(192&i)==128&&(192&a)==128&&(192&s)==128&&(f=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&f<1114112&&(h=f)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),o+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function v(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function E(t,e,r,n,o,i){if(!s.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function A(t,e,r,n,o,i){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function B(t,e,r,n,i){return e=+e,r>>>=0,i||A(t,e,r,4,34028234663852886e22,-34028234663852886e22),o.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return e=+e,r>>>=0,i||A(t,e,r,8,17976931348623157e292,-17976931348623157e292),o.write(t,e,r,n,52,8),r+8}e.lW=s,e.h2=50,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return(u(t),t<=0)?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)},s.allocUnsafe=function(t){return h(t)},s.allocUnsafeSlow=function(t){return h(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(C(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;var r,n=s.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];
vendor: 9,447 bytes, line 1
1if(C(i,Uint8Array))o+i.length>n.length?s.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else if(s.isBuffer(i))i.copy(n,o);else throw TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):y.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.h2;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,o){if(C(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var i=o-n,a=r-e,f=Math.min(i,a),u=this.slice(n,o),h=t.slice(e,r),l=0;l<f;++l)if(u[l]!==h[l]){i=u[l],a=h[l];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o,i,a,s,f,u,h,l,p=this.length-e;if((void 0===r||r>p)&&(r=p),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var c=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(s!=s)break;t[r+a]=s}return a}(this,t,e,r);case"utf8":case"utf-8":return o=e,i=r,R(I(t,this.length-o),this,o,i);case"ascii":case"latin1":case"binary":return a=e,s=r,R(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,a,s);case"base64":return f=e,u=r,R(L(t),this,f,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h=e,l=r,R(function(t,e){for(var r,n,o=[],i=0;i<t.length&&!((e-=2)<0);++i)n=(r=t.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(t,this.length-h),this,h,l);default:if(c)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||v(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return(t>>>=0,e||v(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||v(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||v(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||v(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||v(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||v(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||v(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;E(this,t,e,r,o,0)}var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;E(this,t,e,r,o,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);E(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);E(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o}
1,s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var o,i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=s.isBuffer(t)?t:s.from(t,n),f=a.length;if(0===f)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=a[o%f]}return this};var T=/[^+/0-9A-Za-z-_]/g;function I(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319||a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function L(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function R(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length)&&!(o>=t.length);++o)e[o+r]=t[o];return o}function C(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var x=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)e[n+o]=t[r]+t[o];return e}()},94045:function(t,e){e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,f=(1<<s)-1,u=f>>1,h=-7,l=r?o-1:0,p=r?-1:1,c=t[e+l];for(l+=p,i=c&(1<<-h)-1,c>>=-h,h+=s;h>0;i=256*i+t[e+l],l+=p,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=256*a+t[e+l],l+=p,h-=8);if(0===i)i=1-u;else{if(i===f)return a?NaN:1/0*(c?-1:1);a+=Math.pow(2,n),i-=u}return(c?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,f,u=8*i-o-1,h=(1<<u)-1,l=h>>1,p=23===o?5960464477539062e-23:0,c=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+l>=1?e+=p/f:e+=p*Math.pow(2,1-l),e*f>=2&&(a++,f/=2),a+l>=h?(s=0,a=h):a+l>=1?(s=(e*f-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+c]=255&s,c+=d,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;t[r+c]=255&a,c+=d,a/=256,u-=8);t[r+c-d]|=128*y}},81323:function(t,e,r){"use strict";r.r(e),r.d(e,{InferenceSession:function(){return D},TRACE:function(){return L},TRACE_FUNC_BEGIN:function(){return C},TRACE_FUNC_END:function(){return x},Tensor:function(){return I},env:function(){return h},registerBackend:function(){return i}});let n=new Map,o=[],i=(t,e,r)=>{if(e&&"function"==typeof e.init&&"function"==typeof e.createInferenceSessionHandler){let i=n.get(t);if(void 0===i)n.set(t,{backend:e,priority:r});else if(i.priority>r)return;else if(i.priority===r&&i.backend!==e)throw Error(`cannot register backend "${t}" using priority ${r}`);if(r>=0){let e=o.indexOf(t);-1!==e&&o.splice(e,1);for(let e=0;e<o.length;e++)if(n.get(o[e]).priority<=r){o.splice(e,0,t);return}o.push(t)}return}throw TypeError("not a valid backend")},a=async t=>{let e=n.get(t);if(!e)return"backend not found.";if(e.initialized)return e.backend;if(e.aborted)return e.error;{let r=!!e.initPromise;try{return r||(e.initPromise=e.backend.init(t)),await e.initPromise,e.initialized=!0,e.backend}catch(t){return r||(e.error=`${t}`,e.aborted=!0),e.error}finally{delete e.initPromise}}},s=async t=>{let e;let r=t.executionProviders||[],n=r.map(t=>"string"==typeof t?t:t.name),i=0===n.length?o:n,s=[],f=new Set;for(let t of i){let r=await a(t);"string"==typeof r?s.push({name:t,err:r}):(e||(e=r),e===r&&f.add(t))}if(!e)throw Error(`no available backend found. ERR: ${s.map(t=>`[${t.name}] ${t.err}`).join(", ")}`);for(let{name:t,err:e}of s)n.includes(t)&&console.warn(`removing requested execution provider "${t}" from session options because it is not available: ${e}`);let u=r.filter(t=>f.has("string"==typeof t?t:t.name));return[e,new Proxy(t,{get:(t,e)=>"executionProviders"===e?u:Reflect.get(t,e)})]},f="warning",u={wasm:{},webgl:{},webgpu:{},versions:{common:"1.22.0-dev.20250409-89f8206ba4"},set logLevel(value){if(void 0===value)return;if("string"!=typeof value||-1===["verbose","info","warning","error","fatal"].indexOf(value))throw Error(`Unsupported logging level: ${value}`);f=value},get logLevel(){return f}};Object.defineProperty(u,"logLevel",{enumerable:!0});let h=u,l=(t,e)=>{let r="undefined"!=typeof document?document.createElement("canvas"):new OffscreenCanvas(1,1);
1r.width=t.dims[3],r.height=t.dims[2];let n=r.getContext("2d");if(null!=n){let o,i,a,s;e?.tensorLayout!==void 0&&"NHWC"===e.tensorLayout?(o=t.dims[2],i=t.dims[3]):(o=t.dims[3],i=t.dims[2]);let f=e?.format!==void 0?e.format:"RGB",u=e?.norm;void 0===u||void 0===u.mean?a=[255,255,255,255]:"number"==typeof u.mean?a=[u.mean,u.mean,u.mean,u.mean]:(a=[u.mean[0],u.mean[1],u.mean[2],0],void 0!==u.mean[3]&&(a[3]=u.mean[3])),void 0===u||void 0===u.bias?s=[0,0,0,0]:"number"==typeof u.bias?s=[u.bias,u.bias,u.bias,u.bias]:(s=[u.bias[0],u.bias[1],u.bias[2],0],void 0!==u.bias[3]&&(s[3]=u.bias[3]));let h=i*o,l=0,p=h,c=2*h,d=-1;"RGBA"===f?(l=0,p=h,c=2*h,d=3*h):"RGB"===f?(l=0,p=h,c=2*h):"RBG"===f&&(l=0,c=h,p=2*h);for(let e=0;e<i;e++)for(let r=0;r<o;r++){let o=(t.data[l++]-s[0])*a[0],i=(t.data[p++]-s[1])*a[1],f=(t.data[c++]-s[2])*a[2],u=-1===d?255:(t.data[d++]-s[3])*a[3];n.fillStyle="rgba("+o+","+i+","+f+","+u+")",n.fillRect(r,e,1,1)}if("toDataURL"in r)return r.toDataURL();throw Error("toDataURL is not supported")}throw Error("Can not access image data")},p=(t,e)=>{let r;let n="undefined"!=typeof document?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d");if(null!=n){let o,i,a,s,f;e?.tensorLayout!==void 0&&"NHWC"===e.tensorLayout?(o=t.dims[2],i=t.dims[1],a=t.dims[3]):(o=t.dims[3],i=t.dims[2],a=t.dims[1]);let u=void 0!==e&&void 0!==e.format?e.format:"RGB",h=e?.norm;void 0===h||void 0===h.mean?s=[255,255,255,255]:"number"==typeof h.mean?s=[h.mean,h.mean,h.mean,h.mean]:(s=[h.mean[0],h.mean[1],h.mean[2],255],void 0!==h.mean[3]&&(s[3]=h.mean[3])),void 0===h||void 0===h.bias?f=[0,0,0,0]:"number"==typeof h.bias?f=[h.bias,h.bias,h.bias,h.bias]:(f=[h.bias[0],h.bias[1],h.bias[2],0],void 0!==h.bias[3]&&(f[3]=h.bias[3]));let l=i*o;if(void 0!==e&&(void 0!==e.format&&4===a&&"RGBA"!==e.format||3===a&&"RGB"!==e.format&&"BGR"!==e.format))throw Error("Tensor format doesn't match input tensor dims");let p=0,c=1,d=2,y=3,g=0,m=l,w=2*l,b=-1;"RGBA"===u?(g=0,m=l,w=2*l,b=3*l):"RGB"===u?(g=0,m=l,w=2*l):"RBG"===u&&(g=0,w=l,m=2*l),r=n.createImageData(o,i);for(let e=0;e<i*o;p+=4,c+=4,d+=4,y+=4,e++)r.data[p]=(t.data[g++]-f[0])*s[0],r.data[c]=(t.data[m++]-f[1])*s[1],r.data[d]=(t.data[w++]-f[2])*s[2],r.data[y]=-1===b?255:(t.data[b++]-f[3])*s[3]}else throw Error("Can not access image data");return r},c=(t,e)=>{let r,n;if(void 0===t)throw Error("Image buffer must be defined");if(void 0===e.height||void 0===e.width)throw Error("Image height and width must be defined");if("NHWC"===e.tensorLayout)throw Error("NHWC Tensor layout is not supported yet");let{height:o,width:i}=e,a=e.norm??{mean:255,bias:0};r="number"==typeof a.mean?[a.mean,a.mean,a.mean,a.mean]:[a.mean[0],a.mean[1],a.mean[2],a.mean[3]??255],n="number"==typeof a.bias?[a.bias,a.bias,a.bias,a.bias]:[a.bias[0],a.bias[1],a.bias[2],a.bias[3]??0];let s=void 0!==e.format?e.format:"RGBA",f=void 0!==e.tensorFormat&&void 0!==e.tensorFormat?e.tensorFormat:"RGB",u=o*i,h=new Float32Array("RGBA"===f?4*u:3*u),l=4,p=0,c=1,d=2,y=3,g=0,m=u,w=2*u,b=-1;"RGB"===s&&(l=3,p=0,c=1,d=2,y=-1),"RGBA"===f?b=3*u:"RBG"===f?(g=0,w=u,m=2*u):"BGR"===f&&(w=0,m=u,g=2*u);for(let e=0;e<u;e++,p+=l,d+=l,c+=l,y+=l)h[g++]=(t[p]+n[0])/r[0],h[m++]=(t[c]+n[1])/r[1],h[w++]=(t[d]+n[2])/r[2],-1!==b&&-1!==y&&(h[b++]=(t[y]+n[3])/r[3]);return"RGBA"===f?new T("float32",h,[1,4,o,i]):new T("float32",h,[1,3,o,i])},d=async(t,e)=>{let r;let n="undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement,o="undefined"!=typeof ImageData&&t instanceof ImageData,i="undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap,a="string"==typeof t,s=e??{},f=()=>{if("undefined"!=typeof document)return document.createElement("canvas");if("undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(1,1);throw Error("Canvas is not supported")},u=t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement?t.getContext("2d"):t instanceof OffscreenCanvas?t.getContext("2d"):null;if(n){let n=f();n.width=t.width,n.height=t.height;let o=u(n);if(null!=o){let n=t.height,i=t.width;if(void 0!==e&&void 0!==e.resizedHeight&&void 0!==e.resizedWidth&&(n=e.resizedHeight,i=e.resizedWidth),void 0!==e){if(s=e,void 0!==e.tensorFormat)throw Error("Image input config format must be RGBA for HTMLImageElement");s.tensorFormat="RGBA",s.height=n,s.width=i}else s.tensorFormat="RGBA",s.height=n,s.width=i;o.drawImage(t,0,0),r=o.getImageData(0,0,i,n).data}else throw Error("Can not access image data")}else if(o){let n,o;
1if(void 0!==e&&void 0!==e.resizedWidth&&void 0!==e.resizedHeight?(n=e.resizedHeight,o=e.resizedWidth):(n=t.height,o=t.width),void 0!==e&&(s=e),s.format="RGBA",s.height=n,s.width=o,void 0!==e){let e=f();e.width=o,e.height=n;let i=u(e);if(null!=i)i.putImageData(t,0,0),r=i.getImageData(0,0,o,n).data;else throw Error("Can not access image data")}else r=t.data}else if(i){if(void 0===e)throw Error("Please provide image config with format for Imagebitmap");let n=f();n.width=t.width,n.height=t.height;let o=u(n);if(null!=o){let e=t.height,n=t.width;return o.drawImage(t,0,0,n,e),r=o.getImageData(0,0,n,e).data,s.height=e,s.width=n,c(r,s)}throw Error("Can not access image data")}else if(a)return new Promise((e,r)=>{let n=f(),o=u(n);if(!t||!o)return r();let i=new Image;i.crossOrigin="Anonymous",i.src=t,i.onload=()=>{n.width=i.width,n.height=i.height,o.drawImage(i,0,0,n.width,n.height);let t=o.getImageData(0,0,n.width,n.height);s.height=n.height,s.width=n.width,e(c(t.data,s))}});else throw Error("Input data provided is not supported - aborted tensor creation");if(void 0!==r)return c(r,s);throw Error("Input data provided is not supported - aborted tensor creation")},y=(t,e)=>{let{width:r,height:n,download:o,dispose:i}=e;return new T({location:"texture",type:"float32",texture:t,dims:[1,n,r,4],download:o,dispose:i})},g=(t,e)=>{let{dataType:r,dims:n,download:o,dispose:i}=e;return new T({location:"gpu-buffer",type:r??"float32",gpuBuffer:t,dims:n,download:o,dispose:i})},m=(t,e)=>{let{dataType:r,dims:n,download:o,dispose:i}=e;return new T({location:"ml-tensor",type:r??"float32",mlTensor:t,dims:n,download:o,dispose:i})},w=(t,e,r)=>new T({location:"cpu-pinned",type:t,data:e,dims:r??[e.length]}),b=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),v=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),E=!1,A=()=>{if(!E){E=!0;let t="undefined"!=typeof BigInt64Array&&BigInt64Array.from,e="undefined"!=typeof BigUint64Array&&BigUint64Array.from,r=globalThis.Float16Array,n=void 0!==r&&r.from;t&&(b.set("int64",BigInt64Array),v.set(BigInt64Array,"int64")),e&&(b.set("uint64",BigUint64Array),v.set(BigUint64Array,"uint64")),n?(b.set("float16",r),v.set(r,"float16")):b.set("float16",Uint16Array)}},B=t=>{let e=1;for(let r=0;r<t.length;r++){let n=t[r];if("number"!=typeof n||!Number.isSafeInteger(n))throw TypeError(`dims[${r}] must be an integer, got: ${n}`);if(n<0)throw RangeError(`dims[${r}] must be a non-negative integer, got: ${n}`);e*=n}return e},U=(t,e)=>{switch(t.location){case"cpu":return new T(t.type,t.data,e);case"cpu-pinned":return new T({location:"cpu-pinned",data:t.data,type:t.type,dims:e});case"texture":return new T({location:"texture",texture:t.texture,type:t.type,dims:e});case"gpu-buffer":return new T({location:"gpu-buffer",gpuBuffer:t.gpuBuffer,type:t.type,dims:e});case"ml-tensor":return new T({location:"ml-tensor",mlTensor:t.mlTensor,type:t.type,dims:e});default:throw Error(`tensorReshape: tensor location ${t.location} is not supported`)}};class T{constructor(t,e,r){let n,o;if(A(),"object"==typeof t&&"location"in t)switch(this.dataLocation=t.location,n=t.type,o=t.dims,t.location){case"cpu-pinned":{let e=b.get(n);if(!e)throw TypeError(`unsupported type "${n}" to create tensor from pinned buffer`);if(!(t.data instanceof e))throw TypeError(`buffer should be of type ${e.name}`);this.cpuData=t.data;break}case"texture":if("float32"!==n)throw TypeError(`unsupported type "${n}" to create tensor from texture`);this.gpuTextureData=t.texture,this.downloader=t.download,this.disposer=t.dispose;break;case"gpu-buffer":if("float32"!==n&&"float16"!==n&&"int32"!==n&&"int64"!==n&&"uint32"!==n&&"uint8"!==n&&"bool"!==n&&"uint4"!==n&&"int4"!==n)throw TypeError(`unsupported type "${n}" to create tensor from gpu buffer`);this.gpuBufferData=t.gpuBuffer,this.downloader=t.download,this.disposer=t.dispose;break;case"ml-tensor":if("float32"!==n&&"float16"!==n&&"int32"!==n&&"int64"!==n&&"uint32"!==n&&"uint64"!==n&&"int8"!==n&&"uint8"!==n&&"bool"!==n&&"uint4"!==n&&"int4"!==n)throw TypeError(`unsupported type "${n}" to create tensor from MLTensor`);this.mlTensorData=t.mlTensor,this.downloader=t.download,this.disposer=t.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let i,a;if("string"==typeof t){if(n=t,a=r,"string"===t){if(!Array.isArray(e))throw TypeError("A string tensor's data must be a string array.");i=e}else{let r=b.get(t);if(void 0===r)throw TypeError(`Unsupported tensor type: ${t}.`);if(Array.isArray(e)){if("float16"===t&&r===Uint16Array||"uint4"===t||"int4"===t)throw TypeError(`Creating a ${t} tensor from number array is not supported. Please use ${r.name} as data.`);i="uint64"===t||"int64"===t?r.from(e,BigInt):r.from(e)}else if(e instanceof r)i=e;else if(e instanceof Uint8ClampedArray){if("uint8"===t)i=Uint8Array.from(e);else throw TypeError("A Uint8ClampedArray tensor's data must be type of uint8")}else if("float16"===t&&e instanceof Uint16Array&&r!==Uint16Array)i=new globalThis.Float16Array(e.buffer,e.byteOffset,e.length);else throw TypeError(`A ${n} tensor's data must be type of ${r}`)}}else if(a=e,Array.isArray(t)){if(0===t.length)throw TypeError("Tensor type cannot be inferred from an empty array.");let e=typeof t[0];if("string"===e)n="string",i=t;else if("boolean"===e)n="bool",i=Uint8Array.from(t);else throw TypeError(`Invalid element type of data array: ${e}.`)}else if(t instanceof Uint8ClampedArray)n="uint8",i=Uint8Array.from(t);else{let e=v.get(t.constructor);if(void 0===e)throw TypeError(`Unsupported type for tensor data: ${t.constructor}.`);n=e,i=t}if(void 0===a)a=[i.length];else if(!Array.isArray(a))throw TypeError("A tensor's dims must be a number array");o=a,this.cpuData=i,this.dataLocation="cpu"}let i=B(o);if(this.cpuData&&i!==this.cpuData.length){if(("uint4"===n||"int4"===n)&&Math.ceil(i/2)===this.cpuData.length);else throw Error(`Tensor's size(${i}) does not match data length(${this.cpuData.length}).`)}
1this.type=n,this.dims=o,this.size=i}static async fromImage(t,e){return d(t,e)}static fromTexture(t,e){return y(t,e)}static fromGpuBuffer(t,e){return g(t,e)}static fromMLTensor(t,e){return m(t,e)}static fromPinnedBuffer(t,e,r){return w(t,e,r)}toDataURL(t){return l(this,t)}toImageData(t){return p(this,t)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(t){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":if(!this.downloader)throw Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw Error("The current tensor is being downloaded.");try{this.isDownloading=!0;let e=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=e,t&&this.disposer&&(this.disposer(),this.disposer=void 0),e}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if("none"===this.dataLocation)throw Error("The tensor is disposed.")}reshape(t){if(this.ensureValid(),this.downloader||this.disposer)throw Error("Cannot reshape a tensor that owns GPU resource.");return U(this,t)}}let I=T,L=(t,e)=>{(void 0===u.trace?!u.wasm.trace:!u.trace)||console.timeStamp(`${t}::ORT::${e}`)},R=(t,e)=>{let r=Error().stack?.split(/\r\n|\r|\n/g)||[],n=!1;for(let o=0;o<r.length;o++){if(n&&!r[o].includes("TRACE_FUNC")){let n=`FUNC_${t}::${r[o].trim().split(" ")[1]}`;e&&(n+=`::${e}`),L("CPU",n);return}r[o].includes("TRACE_FUNC")&&(n=!0)}},C=t=>{(void 0===u.trace?!u.wasm.trace:!u.trace)||R("BEGIN",t)},x=t=>{(void 0===u.trace?!u.wasm.trace:!u.trace)||R("END",t)};class O{constructor(t){this.handler=t}async run(t,e,r){C();let n={},o={};if("object"!=typeof t||null===t||t instanceof I||Array.isArray(t))throw TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let i=!0;if("object"==typeof e){if(null===e)throw TypeError("Unexpected argument[1]: cannot be null.");if(e instanceof I)throw TypeError("'fetches' cannot be a Tensor");if(Array.isArray(e)){if(0===e.length)throw TypeError("'fetches' cannot be an empty array.");for(let t of(i=!1,e)){if("string"!=typeof t)throw TypeError("'fetches' must be a string array or an object.");if(-1===this.outputNames.indexOf(t))throw RangeError(`'fetches' contains invalid output name: ${t}.`);n[t]=null}if("object"==typeof r&&null!==r)o=r;else if(void 0!==r)throw TypeError("'options' must be an object.")}else{let t=!1,a=Object.getOwnPropertyNames(e);for(let r of this.outputNames)if(-1!==a.indexOf(r)){let o=e[r];(null===o||o instanceof I)&&(t=!0,i=!1,n[r]=o)}if(t){if("object"==typeof r&&null!==r)o=r;else if(void 0!==r)throw TypeError("'options' must be an object.")}else o=e}}else if(void 0!==e)throw TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let e of this.inputNames)if(void 0===t[e])throw Error(`input '${e}' is missing in 'feeds'.`);if(i)for(let t of this.outputNames)n[t]=null;let a=await this.handler.run(t,n,o),s={};for(let t in a)if(Object.hasOwnProperty.call(a,t)){let e=a[t];e instanceof I?s[t]=e:s[t]=new I(e.type,e.data,e.dims)}return x(),s}async release(){return this.handler.dispose()}static async create(t,e,r,n){let o;C();let i={};if("string"==typeof t){if(o=t,"object"==typeof e&&null!==e)i=e;else if(void 0!==e)throw TypeError("'options' must be an object.")}else if(t instanceof Uint8Array){if(o=t,"object"==typeof e&&null!==e)i=e;else if(void 0!==e)throw TypeError("'options' must be an object.")}else if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer){let a=0,s=t.byteLength;if("object"==typeof e&&null!==e)i=e;else if("number"==typeof e){if(!Number.isSafeInteger(a=e))throw RangeError("'byteOffset' must be an integer.");if(a<0||a>=t.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(s=t.byteLength-a,"number"==typeof r){if(!Number.isSafeInteger(s=r))throw RangeError("'byteLength' must be an integer.");if(s<=0||a+s>t.byteLength)throw RangeError(`'byteLength' is out of range (0, ${t.byteLength-a}].`);if("object"==typeof n&&null!==n)i=n;else if(void 0!==n)throw TypeError("'options' must be an object.")}else if(void 0!==r)throw TypeError("'byteLength' must be a number.")}else if(void 0!==e)throw TypeError("'options' must be an object.");o=new Uint8Array(t,a,s)}else throw TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");let[a,f]=await s(i),u=await a.createInferenceSessionHandler(o,f);return x(),new O(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}
1get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}}let D=O}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.