UNPKG

dicomweb-proxy

Version:

A proxy to translate between dicomweb and dimse

2 lines 865 kB
/*! For license information please see 8185.bundle.eca7ea7f224b56d7a760.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([[8185],{66123:(e,A,t)=>{"use strict";t.d(A,{Bj:()=>Hu,pY:()=>Du,OU:()=>Fu});var n,r,i,a,s,o,u,l,d,c,p,h,f,g,m,w,B,y,v,b,C,$,I,E,Q,U,x,_,F,S,T,O=t(15327),H=t(4667),k=t(81429).hp,D=Object.defineProperty,M=Object.getOwnPropertyDescriptor,R=Object.getOwnPropertyNames,P=Object.prototype.hasOwnProperty,L=(e,A)=>()=>(e&&(A=e(e=0)),A),K=(e,A)=>()=>(A||e((A={exports:{}}).exports,A),A.exports),z=(e,A)=>{for(var t in A)D(e,t,{get:A[t],enumerable:!0})},N=e=>((e,A,t,n)=>{if(A&&"object"==typeof A||"function"==typeof A)for(let r of R(A))!P.call(e,r)&&r!==t&&D(e,r,{get:()=>A[r],enumerable:!(n=M(A,r))||n.enumerable});return e})(D({},"__esModule",{value:!0}),e),V=L((()=>{n=new Map,r=[],i=(e,A,t)=>{if(!A||"function"!=typeof A.init||"function"!=typeof A.createInferenceSessionHandler)throw new TypeError("not a valid backend");{let i=n.get(e);if(void 0===i)n.set(e,{backend:A,priority:t});else{if(i.priority>t)return;if(i.priority===t&&i.backend!==A)throw new Error(`cannot register backend "${e}" using priority ${t}`)}if(t>=0){let A=r.indexOf(e);-1!==A&&r.splice(A,1);for(let A=0;A<r.length;A++)if(n.get(r[A]).priority<=t)return void r.splice(A,0,e);r.push(e)}}},a=async e=>{let A=0===e.length?r:e,t=[];for(let e of A){let A=n.get(e);if(A){if(A.initialized)return A.backend;if(A.aborted)continue;let n=!!A.initPromise;try{return n||(A.initPromise=A.backend.init(e)),await A.initPromise,A.initialized=!0,A.backend}catch(r){n||t.push({name:e,err:r}),A.aborted=!0}finally{delete A.initPromise}}}throw new Error(`no available backend found. ERR: ${t.map((e=>`[${e.name}] ${e.err}`)).join(", ")}`)}})),G=L((()=>{V()})),W=L((()=>{s="1.17.1"})),q=L((()=>{W(),o="warning",u={wasm:{},webgl:{},webgpu:{},versions:{common:s},set logLevel(e){if(void 0!==e){if("string"!=typeof e||-1===["verbose","info","warning","error","fatal"].indexOf(e))throw new Error(`Unsupported logging level: ${e}`);o=e}},get logLevel(){return o}},Object.defineProperty(u,"logLevel",{enumerable:!0})})),j=L((()=>{q(),l=u})),Y=L((()=>{d=(e,A)=>{let t=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);t.width=e.dims[3],t.height=e.dims[2];let n=t.getContext("2d");if(null!=n){let r,i;void 0!==A?.tensorLayout&&"NHWC"===A.tensorLayout?(r=e.dims[2],i=e.dims[3]):(r=e.dims[3],i=e.dims[2]);let a,s,o=void 0!==A?.format?A.format:"RGB",u=A?.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 l=i*r,d=0,c=l,p=2*l,h=-1;"RGBA"===o?(d=0,c=l,p=2*l,h=3*l):"RGB"===o?(d=0,c=l,p=2*l):"RBG"===o&&(d=0,p=l,c=2*l);for(let A=0;A<i;A++)for(let t=0;t<r;t++){let r=(e.data[d++]-s[0])*a[0],i=(e.data[c++]-s[1])*a[1],o=(e.data[p++]-s[2])*a[2],u=-1===h?255:(e.data[h++]-s[3])*a[3];n.fillStyle="rgba("+r+","+i+","+o+","+u+")",n.fillRect(t,A,1,1)}if("toDataURL"in t)return t.toDataURL();throw new Error("toDataURL is not supported")}throw new Error("Can not access image data")},c=(e,A)=>{let t,n=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d");if(null==n)throw new Error("Can not access image data");{let r,i,a;void 0!==A?.tensorLayout&&"NHWC"===A.tensorLayout?(r=e.dims[2],i=e.dims[1],a=e.dims[3]):(r=e.dims[3],i=e.dims[2],a=e.dims[1]);let s,o,u=void 0!==A&&void 0!==A.format?A.format:"RGB",l=A?.norm;void 0===l||void 0===l.mean?s=[255,255,255,255]:"number"==typeof l.mean?s=[l.mean,l.mean,l.mean,l.mean]:(s=[l.mean[0],l.mean[1],l.mean[2],255],void 0!==l.mean[3]&&(s[3]=l.mean[3])),void 0===l||void 0===l.bias?o=[0,0,0,0]:"number"==typeof l.bias?o=[l.bias,l.bias,l.bias,l.bias]:(o=[l.bias[0],l.bias[1],l.bias[2],0],void 0!==l.bias[3]&&(o[3]=l.bias[3]));let d=i*r;if(void 0!==A&&(void 0!==A.format&&4===a&&"RGBA"!==A.format||3===a&&"RGB"!==A.format&&"BGR"!==A.format))throw new Error("Tensor format doesn't match input tensor dims");let c=4,p=0,h=1,f=2,g=3,m=0,w=d,B=2*d,y=-1;"RGBA"===u?(m=0,w=d,B=2*d,y=3*d):"RGB"===u?(m=0,w=d,B=2*d):"RBG"===u&&(m=0,B=d,w=2*d),t=n.createImageData(r,i);for(let A=0;A<i*r;p+=c,h+=c,f+=c,g+=c,A++)t.data[p]=(e.data[m++]-o[0])*s[0],t.data[h]=(e.data[w++]-o[1])*s[1],t.data[f]=(e.data[B++]-o[2])*s[2],t.data[g]=-1===y?255:(e.data[y++]-o[3])*s[3]}return t}})),X=L((()=>{ee(),p=(e,A)=>{if(void 0===e)throw new Error("Image buffer must be defined");if(void 0===A.height||void 0===A.width)throw new Error("Image height and width must be defined");if("NHWC"===A.tensorLayout)throw new Error("NHWC Tensor layout is not supported yet");let t,n,{height:r,width:i}=A,a=A.norm??{mean:255,bias:0};t="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!==A.format?A.format:"RGBA",o=void 0!==A.tensorFormat&&void 0!==A.tensorFormat?A.tensorFormat:"RGB",u=r*i,l="RGBA"===o?new Float32Array(4*u):new Float32Array(3*u),d=4,c=0,p=1,h=2,f=3,g=0,m=u,w=2*u,B=-1;"RGB"===s&&(d=3,c=0,p=1,h=2,f=-1),"RGBA"===o?B=3*u:"RBG"===o?(g=0,w=u,m=2*u):"BGR"===o&&(w=0,m=u,g=2*u);for(let A=0;A<u;A++,c+=d,h+=d,p+=d,f+=d)l[g++]=(e[c]+n[0])/t[0],l[m++]=(e[p]+n[1])/t[1],l[w++]=(e[h]+n[2])/t[2],-1!==B&&-1!==f&&(l[B++]=(e[f]+n[3])/t[3]);return new $("float32",l,"RGBA"===o?[1,4,r,i]:[1,3,r,i])},h=async(e,A)=>{let t,n=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,r=typeof ImageData<"u"&&e instanceof ImageData,i=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,a="string"==typeof e,s=A??{},o=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},u=e=>e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext("2d"):null;if(n){let n=o();n.width=e.width,n.height=e.height;let r=u(n);if(null==r)throw new Error("Can not access image data");{let n=e.height,i=e.width;if(void 0!==A&&void 0!==A.resizedHeight&&void 0!==A.resizedWidth&&(n=A.resizedHeight,i=A.resizedWidth),void 0!==A){if(s=A,void 0!==A.tensorFormat)throw new 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;r.drawImage(e,0,0),t=r.getImageData(0,0,i,n).data}}else{if(!r){if(i){if(void 0===A)throw new Error("Please provide image config with format for Imagebitmap");let n=o();n.width=e.width,n.height=e.height;let r=u(n);if(null!=r){let A=e.height,n=e.width;return r.drawImage(e,0,0,n,A),t=r.getImageData(0,0,n,A).data,s.height=A,s.width=n,p(t,s)}throw new Error("Can not access image data")}if(a)return new Promise(((A,t)=>{let n=o(),r=u(n);if(!e||!r)return t();let i=new Image;i.crossOrigin="Anonymous",i.src=e,i.onload=()=>{n.width=i.width,n.height=i.height,r.drawImage(i,0,0,n.width,n.height);let e=r.getImageData(0,0,n.width,n.height);s.height=n.height,s.width=n.width,A(p(e.data,s))}}));throw new Error("Input data provided is not supported - aborted tensor creation")}{let n,r;if(void 0!==A&&void 0!==A.resizedWidth&&void 0!==A.resizedHeight?(n=A.resizedHeight,r=A.resizedWidth):(n=e.height,r=e.width),void 0!==A&&(s=A),s.format="RGBA",s.height=n,s.width=r,void 0!==A){let A=o();A.width=r,A.height=n;let i=u(A);if(null==i)throw new Error("Can not access image data");i.putImageData(e,0,0),t=i.getImageData(0,0,r,n).data}else t=e.data}}if(void 0!==t)return p(t,s);throw new Error("Input data provided is not supported - aborted tensor creation")},f=(e,A)=>{let{width:t,height:n,download:r,dispose:i}=A;return new $({location:"texture",type:"float32",texture:e,dims:[1,n,t,4],download:r,dispose:i})},g=(e,A)=>{let{dataType:t,dims:n,download:r,dispose:i}=A;return new $({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:n,download:r,dispose:i})},m=(e,A,t)=>new $({location:"cpu-pinned",type:e,data:A,dims:t??[A.length]})})),J=L((()=>{w=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["float16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),B=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),y=!1,v=()=>{if(!y){y=!0;let e=typeof BigInt64Array<"u"&&"function"==typeof BigInt64Array.from,A=typeof BigUint64Array<"u"&&"function"==typeof BigUint64Array.from;e&&(w.set("int64",BigInt64Array),B.set(BigInt64Array,"int64")),A&&(w.set("uint64",BigUint64Array),B.set(BigUint64Array,"uint64"))}}})),Z=L((()=>{ee(),b=e=>{let A=1;for(let t=0;t<e.length;t++){let n=e[t];if("number"!=typeof n||!Number.isSafeInteger(n))throw new TypeError(`dims[${t}] must be an integer, got: ${n}`);if(n<0)throw new RangeError(`dims[${t}] must be a non-negative integer, got: ${n}`);A*=n}return A},C=(e,A)=>{switch(e.location){case"cpu":return new $(e.type,e.data,A);case"cpu-pinned":return new $({location:"cpu-pinned",data:e.data,type:e.type,dims:A});case"texture":return new $({location:"texture",texture:e.texture,type:e.type,dims:A});case"gpu-buffer":return new $({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:A});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}}})),ee=L((()=>{Y(),X(),J(),Z(),$=class{constructor(e,A,t){let n,r;if(v(),"object"==typeof e&&"location"in e)switch(this.dataLocation=e.location,n=e.type,r=e.dims,e.location){case"cpu-pinned":{let A=w.get(n);if(!A)throw new TypeError(`unsupported type "${n}" to create tensor from pinned buffer`);if(!(e.data instanceof A))throw new TypeError(`buffer should be of type ${A.name}`);this.cpuData=e.data;break}case"texture":if("float32"!==n)throw new TypeError(`unsupported type "${n}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case"gpu-buffer":if("float32"!==n&&"float16"!==n&&"int32"!==n&&"int64"!==n&&"uint32"!==n&&"bool"!==n)throw new TypeError(`unsupported type "${n}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let i,a;if("string"==typeof e)if(n=e,a=t,"string"===e){if(!Array.isArray(A))throw new TypeError("A string tensor's data must be a string array.");i=A}else{let t=w.get(e);if(void 0===t)throw new TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(A)){if("float16"===e)throw new TypeError("Creating a float16 tensor from number array is not supported. Please use Uint16Array as data.");i="uint64"===e||"int64"===e?t.from(A,BigInt):t.from(A)}else{if(!(A instanceof t))throw new TypeError(`A ${n} tensor's data must be type of ${t}`);i=A}}else if(a=A,Array.isArray(e)){if(0===e.length)throw new TypeError("Tensor type cannot be inferred from an empty array.");let A=typeof e[0];if("string"===A)n="string",i=e;else{if("boolean"!==A)throw new TypeError(`Invalid element type of data array: ${A}.`);n="bool",i=Uint8Array.from(e)}}else{let A=B.get(e.constructor);if(void 0===A)throw new TypeError(`Unsupported type for tensor data: ${e.constructor}.`);n=A,i=e}if(void 0===a)a=[i.length];else if(!Array.isArray(a))throw new TypeError("A tensor's dims must be a number array");r=a,this.cpuData=i,this.dataLocation="cpu"}let i=b(r);if(this.cpuData&&i!==this.cpuData.length)throw new Error(`Tensor's size(${i}) does not match data length(${this.cpuData.length}).`);this.type=n,this.dims=r,this.size=i}static async fromImage(e,A){return h(e,A)}static fromTexture(e,A){return f(e,A)}static fromGpuBuffer(e,A){return g(e,A)}static fromPinnedBuffer(e,A,t){return m(e,A,t)}toDataURL(e){return d(this,e)}toImageData(e){return c(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw new 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 new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}async getData(e){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;let A=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=A,e&&this.disposer&&(this.disposer(),this.disposer=void 0),A}finally{this.isDownloading=!1}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new 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.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if("none"===this.dataLocation)throw new Error("The tensor is disposed.")}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return C(this,e)}}})),Ae=L((()=>{ee(),I=$})),te=L((()=>{q(),E=(e,A)=>{u.wasm.trace&&console.timeStamp(`${e}::ORT::${A}`)},Q=(e,A)=>{let t=(new Error).stack?.split(/\r\n|\r|\n/g)||[],n=!1;for(let r=0;r<t.length;r++){if(n&&!t[r].includes("TRACE_FUNC")){let n=`FUNC_${e}::${t[r].trim().split(" ")[1]}`;return A&&(n+=`::${A}`),void E("CPU",n)}t[r].includes("TRACE_FUNC")&&(n=!0)}},U=e=>{u.wasm.trace&&Q("BEGIN",e)},x=e=>{u.wasm.trace&&Q("END",e)}})),ne=L((()=>{V(),Ae(),te(),_=class e{constructor(e){this.handler=e}async run(e,A,t){U();let n={},r={};if("object"!=typeof e||null===e||e instanceof I||Array.isArray(e))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let i=!0;if("object"==typeof A){if(null===A)throw new TypeError("Unexpected argument[1]: cannot be null.");if(A instanceof I)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(A)){if(0===A.length)throw new TypeError("'fetches' cannot be an empty array.");i=!1;for(let e of A){if("string"!=typeof e)throw new TypeError("'fetches' must be a string array or an object.");if(-1===this.outputNames.indexOf(e))throw new RangeError(`'fetches' contains invalid output name: ${e}.`);n[e]=null}if("object"==typeof t&&null!==t)r=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else{let e=!1,a=Object.getOwnPropertyNames(A);for(let t of this.outputNames)if(-1!==a.indexOf(t)){let r=A[t];(null===r||r instanceof I)&&(e=!0,i=!1,n[t]=r)}if(e){if("object"==typeof t&&null!==t)r=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else r=A}}else if(typeof A<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let A of this.inputNames)if(typeof e[A]>"u")throw new Error(`input '${A}' is missing in 'feeds'.`);if(i)for(let e of this.outputNames)n[e]=null;let a=await this.handler.run(e,n,r),s={};for(let e in a)if(Object.hasOwnProperty.call(a,e)){let A=a[e];s[e]=A instanceof I?A:new I(A.type,A.data,A.dims)}return x(),s}async release(){return this.handler.dispose()}static async create(A,t,n,r){U();let i,s={};if("string"==typeof A){if(i=A,"object"==typeof t&&null!==t)s=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(A instanceof Uint8Array){if(i=A,"object"==typeof t&&null!==t)s=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else{if(!(A instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&A instanceof SharedArrayBuffer))throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");{let e=A,a=0,o=A.byteLength;if("object"==typeof t&&null!==t)s=t;else if("number"==typeof t){if(a=t,!Number.isSafeInteger(a))throw new RangeError("'byteOffset' must be an integer.");if(a<0||a>=e.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(o=A.byteLength-a,"number"==typeof n){if(o=n,!Number.isSafeInteger(o))throw new RangeError("'byteLength' must be an integer.");if(o<=0||a+o>e.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${e.byteLength-a}].`);if("object"==typeof r&&null!==r)s=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else if(typeof n<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");i=new Uint8Array(e,a,o)}}let o=(s.executionProviders||[]).map((e=>"string"==typeof e?e:e.name)),u=await(await a(o)).createInferenceSessionHandler(i,s);return x(),new e(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}}})),re=L((()=>{ne(),F=_})),ie=L((()=>{})),ae=L((()=>{V(),Ae(),S=class e{constructor(e,A,t){this.handler=e,this.hasOptimizerModel=A,this.hasEvalModel=t}get trainingInputNames(){return this.handler.inputNames}get trainingOutputNames(){return this.handler.outputNames}get evalInputNames(){if(this.hasEvalModel)return this.handler.evalInputNames;throw new Error("This training session has no evalModel loaded.")}get evalOutputNames(){if(this.hasEvalModel)return this.handler.evalOutputNames;throw new Error("This training session has no evalModel loaded.")}static async create(A,t){let n=A.evalModel||"",r=A.optimizerModel||"",i=t||{},s=(i.executionProviders||[]).map((e=>"string"==typeof e?e:e.name)),o=await a(s);if(o.createTrainingSessionHandler){let t=await o.createTrainingSessionHandler(A.checkpointState,A.trainModel,n,r,i);return new e(t,!!A.optimizerModel,!!A.evalModel)}throw new Error("Training backend could not be resolved. Make sure you're using the correct configuration & WebAssembly files.")}typeNarrowingForRunStep(e,A,t,n,r){let i={},a={};if("object"!=typeof t||null===t||t instanceof I||Array.isArray(t))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let s=!0;if("object"==typeof n){if(null===n)throw new TypeError("Unexpected argument[1]: cannot be null.");if(n instanceof I)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(n)){if(0===n.length)throw new TypeError("'fetches' cannot be an empty array.");s=!1;for(let e of n){if("string"!=typeof e)throw new TypeError("'fetches' must be a string array or an object.");if(-1===A.indexOf(e))throw new RangeError(`'fetches' contains invalid output name: ${e}.`);i[e]=null}if("object"==typeof r&&null!==r)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else{let e=!1,t=Object.getOwnPropertyNames(n);for(let r of A)if(-1!==t.indexOf(r)){let A=n[r];(null===A||A instanceof I)&&(e=!0,s=!1,i[r]=A)}if(e){if("object"==typeof r&&null!==r)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else a=n}}else if(typeof n<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let A of e)if(typeof t[A]>"u")throw new Error(`input '${A}' is missing in 'feeds'.`);if(s)for(let e of A)i[e]=null;return[i,a]}convertHandlerReturnTypeToMapOfTensors(e){let A={};for(let t in e)if(Object.hasOwnProperty.call(e,t)){let n=e[t];A[t]=n instanceof I?n:new I(n.type,n.data,n.dims)}return A}async lazyResetGrad(){await this.handler.lazyResetGrad()}async runTrainStep(e,A,t){let[n,r]=this.typeNarrowingForRunStep(this.trainingInputNames,this.trainingOutputNames,e,A,t),i=await this.handler.runTrainStep(e,n,r);return this.convertHandlerReturnTypeToMapOfTensors(i)}async runOptimizerStep(e){if(!this.hasOptimizerModel)throw new Error("This TrainingSession has no OptimizerModel loaded.");await this.handler.runOptimizerStep(e||{})}async runEvalStep(e,A,t){if(this.hasEvalModel){let[n,r]=this.typeNarrowingForRunStep(this.evalInputNames,this.evalOutputNames,e,A,t),i=await this.handler.runEvalStep(e,n,r);return this.convertHandlerReturnTypeToMapOfTensors(i)}throw new Error("This TrainingSession has no EvalModel loaded.")}async getParametersSize(e=!0){return this.handler.getParametersSize(e)}async loadParametersBuffer(e,A=!0){let t=await this.getParametersSize(A);if(e.length!==4*t)throw new Error("Size of the buffer passed into loadParametersBuffer must match the number of parameters in the model. Please use getParametersSize method to check.");return this.handler.loadParametersBuffer(e,A)}async getContiguousParameters(e=!0){return this.handler.getContiguousParameters(e)}async release(){return this.handler.dispose()}}})),se=L((()=>{ae(),T=S})),oe={};z(oe,{InferenceSession:()=>F,TRACE:()=>E,TRACE_FUNC_BEGIN:()=>U,TRACE_FUNC_END:()=>x,Tensor:()=>I,TrainingSession:()=>T,env:()=>l,registerBackend:()=>i});var ue=L((()=>{G(),j(),re(),Ae(),te(),ie(),se()})),le={};z(le,{createReadStream:()=>pe,readFile:()=>de,readFileSync:()=>ce});var de,ce,pe,he=L((()=>{de=void 0,ce=void 0,pe=void 0})),fe={};z(fe,{join:()=>ge});var ge,me=L((()=>{ge=void 0})),we=K(((e,A)=>{var t,n=(t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,typeof __filename<"u"&&(t=t||__filename),function(e={}){var A,n,r=e;r.ready=new Promise(((e,t)=>{A=e,n=t})),r.mountExternalData=(e,A)=>{(r.Fa||(r.Fa=new Map)).set(e,A)},r.unmountExternalData=()=>{delete r.Fa},r.jsepInit=(e,A,t,n,i,a,s,o)=>{r.ab=e,r.Qa=A,r.Sa=t,r.La=n,r.Ra=i,r.sa=a,r.Ta=s,r.Ua=o,A=(e,A,t)=>(...n)=>{let r=ge,i=A?.();n=e(...n);let a=A?.();return i!==a&&(e=a,t(i),A=t=null),ge!=r?new Promise(((e,A)=>{Ce={resolve:e,reject:A}})):n},t=A=>async(...t)=>{try{if(r.Ea)throw Error("Session already started");let n=r.Ea={Va:t[0],errors:[]},i=await A(...t);if(r.Ea!==n)throw Error("Session mismatch");e.flush();let a=n.errors;if(0<a.length){let e=await Promise.all(a);if(e=e.filter((e=>e)),0<e.length)throw Error(e.join("\n"))}return i}finally{r.Ea=null}},r._OrtRun=t(A(r._OrtRun,(()=>r._OrtRun),(e=>r._OrtRun=e))),r._OrtRunWithBinding=t(A(r._OrtRunWithBinding,(()=>r._OrtRunWithBinding),(e=>r._OrtRunWithBinding=e))),r._OrtBindInput=A(r._OrtBindInput,(()=>r._OrtBindInput),(e=>r._OrtBindInput=e)),r.jsepRegisterBuffer=(A,t,n,r)=>e.registerBuffer(A,t,n,r),r.jsepUnregisterBuffers=A=>{e.unregisterBuffers(A)},r.jsepGetBuffer=A=>e.getBuffer(A),r.jsepCreateDownloader=(A,t,n)=>e.createDownloader(A,t,n)};var i,a,s,o=Object.assign({},r),u="./this.program",l=(e,A)=>{throw A},d="object"==typeof window,c="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(p){var f=(he(),N(le)),g=(me(),N(fe));h=c?g.dirname(h)+"/":__dirname+"/",i=(e,A)=>(e=M(e)?new URL(e):g.normalize(e),f.readFileSync(e,A?void 0:"utf8")),s=e=>((e=i(e,!0)).buffer||(e=new Uint8Array(e)),e),a=(e,A,t,n=!0)=>{e=M(e)?new URL(e):g.normalize(e),f.readFile(e,n?void 0:"utf8",((e,r)=>{e?t(e):A(n?r.buffer:r)}))},!r.thisProgram&&1<process.argv.length&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),l=(e,A)=>{throw process.exitCode=e,A},r.inspect=()=>"[Emscripten Module object]"}else(d||c)&&(c?h=self.location.href:typeof document<"u"&&document.currentScript&&(h=document.currentScript.src),t&&(h=t),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=e=>{var A=new XMLHttpRequest;return A.open("GET",e,!1),A.send(null),A.responseText},c&&(s=e=>{var A=new XMLHttpRequest;return A.open("GET",e,!1),A.responseType="arraybuffer",A.send(null),new Uint8Array(A.response)}),a=(e,A,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?A(n.response):t()},n.onerror=t,n.send(null)});var m=console.log.bind(console),w=console.error.bind(console);Object.assign(r,o),o=null,"object"!=typeof WebAssembly&&H("no native wasm support detected");var B,y,v,b,C,$,I,E,Q=!1;function U(){var e=B.buffer;r.HEAP8=v=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAPU8=b=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAP32=C=new Int32Array(e),r.HEAPU32=$=new Uint32Array(e),r.HEAPF32=I=new Float32Array(e),r.HEAPF64=E=new Float64Array(e)}var x=[],_=[],F=[],S=0,T=null,O=null;function H(e){throw w(e="Aborted("+e+")"),Q=!0,y=1,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),n(e),e}var k,D=e=>e.startsWith("data:application/octet-stream;base64,"),M=e=>e.startsWith("file://");if(!D(k="ort-wasm-simd.wasm")){var R=k;k=r.locateFile?r.locateFile(R,h):h+R}function P(e){if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function L(e,A,t){return function(e){if(d||c){if("function"==typeof fetch&&!M(e))return fetch(e,{credentials:"same-origin"}).then((A=>{if(!A.ok)throw"failed to load wasm binary file at '"+e+"'";return A.arrayBuffer()})).catch((()=>P(e)));if(a)return new Promise(((A,t)=>{a(e,(e=>A(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>P(e)))}(e).then((e=>WebAssembly.instantiate(e,A))).then((e=>e)).then(t,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),H(e)}))}var K,z={931056:(e,A,t,n)=>{if(typeof r>"u"||!r.Fa)return 1;if((e=Y(e>>>0)).startsWith("./")&&(e=e.substring(2)),!(e=r.Fa.get(e)))return 2;if((A>>>=0)+(t>>>=0)>e.byteLength)return 3;try{return b.set(e.subarray(A,A+t),n>>>0>>>0),0}catch{return 4}},931557:e=>r.Qa(e),931590:e=>r.Sa(e),931622:(e,A,t)=>{r.La(e,A,t,!0)},931661:(e,A,t)=>{r.La(e,A,t)},931694:e=>{r.sa("Abs",e,void 0)},931745:e=>{r.sa("Neg",e,void 0)},931796:e=>{r.sa("Floor",e,void 0)},931849:e=>{r.sa("Ceil",e,void 0)},931901:e=>{r.sa("Reciprocal",e,void 0)},931959:e=>{r.sa("Sqrt",e,void 0)},932011:e=>{r.sa("Exp",e,void 0)},932062:e=>{r.sa("Erf",e,void 0)},932113:e=>{r.sa("Sigmoid",e,void 0)},932168:e=>{r.sa("Log",e,void 0)},932219:e=>{r.sa("Sin",e,void 0)},932270:e=>{r.sa("Cos",e,void 0)},932321:e=>{r.sa("Tan",e,void 0)},932372:e=>{r.sa("Asin",e,void 0)},932424:e=>{r.sa("Acos",e,void 0)},932476:e=>{r.sa("Atan",e,void 0)},932528:e=>{r.sa("Sinh",e,void 0)},932580:e=>{r.sa("Cosh",e,void 0)},932632:e=>{r.sa("Asinh",e,void 0)},932685:e=>{r.sa("Acosh",e,void 0)},932738:e=>{r.sa("Atanh",e,void 0)},932791:e=>{r.sa("Tanh",e,void 0)},932843:e=>{r.sa("Not",e,void 0)},932894:(e,A,t)=>{r.sa("Clip",e,{min:A,max:t})},932963:e=>{r.sa("Clip",e,void 0)},933015:(e,A)=>{r.sa("Elu",e,{alpha:A})},933073:e=>{r.sa("Relu",e,void 0)},933125:(e,A)=>{r.sa("LeakyRelu",e,{alpha:A})},933189:(e,A)=>{r.sa("ThresholdedRelu",e,{alpha:A})},933259:(e,A)=>{r.sa("Cast",e,{to:A})},933317:e=>{r.sa("Add",e,void 0)},933368:e=>{r.sa("Sub",e,void 0)},933419:e=>{r.sa("Mul",e,void 0)},933470:e=>{r.sa("Div",e,void 0)},933521:e=>{r.sa("Pow",e,void 0)},933572:e=>{r.sa("Equal",e,void 0)},933625:e=>{r.sa("Greater",e,void 0)},933680:e=>{r.sa("GreaterOrEqual",e,void 0)},933742:e=>{r.sa("Less",e,void 0)},933794:e=>{r.sa("LessOrEqual",e,void 0)},933853:(e,A,t,n,i)=>{r.sa("ReduceMean",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},934012:(e,A,t,n,i)=>{r.sa("ReduceMax",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},934170:(e,A,t,n,i)=>{r.sa("ReduceMin",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},934328:(e,A,t,n,i)=>{r.sa("ReduceProd",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},934487:(e,A,t,n,i)=>{r.sa("ReduceSum",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},934645:(e,A,t,n,i)=>{r.sa("ReduceL1",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},934802:(e,A,t,n,i)=>{r.sa("ReduceL2",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},934959:(e,A,t,n,i)=>{r.sa("ReduceLogSum",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},935120:(e,A,t,n,i)=>{r.sa("ReduceSumSquare",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},935284:(e,A,t,n,i)=>{r.sa("ReduceLogSumExp",e,{keepDims:!!A,noopWithEmptyAxes:!!t,axes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},935448:e=>{r.sa("Where",e,void 0)},935501:(e,A,t)=>{r.sa("Transpose",e,{perm:A?Array.from(C.subarray(A>>>0,t>>>0)):[]})},935609:(e,A,t,n,i,a,s,o,u,l,d,c,p,h,f)=>{r.sa("ConvTranspose",e,{format:u?"NHWC":"NCHW",autoPad:A,dilations:[t],group:n,kernel_shape:[i],pads:[a,s],strides:[o],wIsConst:()=>!!v[l>>>0],outputPadding:d?Array.from(C.subarray(d>>>0,c>>>0)):[],outputShape:p?Array.from(C.subarray(p>>>0,h>>>0)):[],activation:Y(f)})},936011:(e,A,t,n,i,a,s,o,u,l,d,c,p,h)=>{r.sa("ConvTranspose",e,{format:o?"NHWC":"NCHW",autoPad:A,dilations:Array.from(C.subarray(t>>>0,2+(t>>>0)>>>0)),group:n,kernelShape:Array.from(C.subarray(i>>>0,2+(i>>>0)>>>0)),pads:Array.from(C.subarray(a>>>0,4+(a>>>0)>>>0)),strides:Array.from(C.subarray(s>>>0,2+(s>>>0)>>>0)),wIsConst:()=>!!v[u>>>0],outputPadding:l?Array.from(C.subarray(l>>>0,d>>>0)):[],outputShape:c?Array.from(C.subarray(c>>>0,p>>>0)):[],activation:Y(h)})},936576:(e,A,t,n,i,a,s,o,u,l,d,c,p,h,f)=>{r.sa("ConvTranspose",e,{format:u?"NHWC":"NCHW",autoPad:A,dilations:[t],group:n,kernel_shape:[i],pads:[a,s],strides:[o],wIsConst:()=>!!v[l>>>0],outputPadding:d?Array.from(C.subarray(d>>>0,c>>>0)):[],outputShape:p?Array.from(C.subarray(p>>>0,h>>>0)):[],activation:Y(f)})},936978:(e,A,t,n,i,a,s,o,u,l,d,c,p,h)=>{r.sa("ConvTranspose",e,{format:o?"NHWC":"NCHW",autoPad:A,dilations:Array.from(C.subarray(t>>>0,2+(t>>>0)>>>0)),group:n,kernelShape:Array.from(C.subarray(i>>>0,2+(i>>>0)>>>0)),pads:Array.from(C.subarray(a>>>0,4+(a>>>0)>>>0)),strides:Array.from(C.subarray(s>>>0,2+(s>>>0)>>>0)),wIsConst:()=>!!v[u>>>0],outputPadding:l?Array.from(C.subarray(l>>>0,d>>>0)):[],outputShape:c?Array.from(C.subarray(c>>>0,p>>>0)):[],activation:Y(h)})},937543:(e,A)=>{r.sa("GlobalAveragePool",e,{format:A?"NHWC":"NCHW"})},937634:(e,A,t,n,i,a,s,o,u,l,d,c,p,h,f,g)=>{r.sa("AveragePool",e,{format:g?"NHWC":"NCHW",auto_pad:A,ceil_mode:t,count_include_pad:n,storage_order:i,dilations:[a,s],kernel_shape:[o,u],pads:[l,d,c,p],strides:[h,f]})},937918:(e,A)=>{r.sa("GlobalAveragePool",e,{format:A?"NHWC":"NCHW"})},938009:(e,A,t,n,i,a,s,o,u,l,d,c,p,h,f,g)=>{r.sa("AveragePool",e,{format:g?"NHWC":"NCHW",auto_pad:A,ceil_mode:t,count_include_pad:n,storage_order:i,dilations:[a,s],kernel_shape:[o,u],pads:[l,d,c,p],strides:[h,f]})},938293:(e,A)=>{r.sa("GlobalMaxPool",e,{format:A?"NHWC":"NCHW"})},938380:(e,A,t,n,i,a,s,o,u,l,d,c,p,h,f,g)=>{r.sa("MaxPool",e,{format:g?"NHWC":"NCHW",auto_pad:A,ceil_mode:t,count_include_pad:n,storage_order:i,dilations:[a,s],kernel_shape:[o,u],pads:[l,d,c,p],strides:[h,f]})},938660:(e,A)=>{r.sa("GlobalMaxPool",e,{format:A?"NHWC":"NCHW"})},938747:(e,A,t,n,i,a,s,o,u,l,d,c,p,h,f,g)=>{r.sa("MaxPool",e,{format:g?"NHWC":"NCHW",auto_pad:A,ceil_mode:t,count_include_pad:n,storage_order:i,dilations:[a,s],kernel_shape:[o,u],pads:[l,d,c,p],strides:[h,f]})},939027:(e,A,t,n,i)=>{r.sa("Gemm",e,{alpha:A,beta:t,transA:n,transB:i})},939131:e=>{r.sa("MatMul",e,void 0)},939185:(e,A,t,n)=>{r.sa("ArgMax",e,{keepDims:!!A,selectLastIndex:!!t,axis:n})},939293:(e,A,t,n)=>{r.sa("ArgMin",e,{keepDims:!!A,selectLastIndex:!!t,axis:n})},939401:(e,A)=>{r.sa("Softmax",e,{axis:A})},939464:(e,A)=>{r.sa("Concat",e,{axis:A})},939524:(e,A,t,n,i)=>{r.sa("Split",e,{axis:A,numOutputs:t,splitSizes:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},939664:e=>{r.sa("Expand",e,void 0)},939718:(e,A)=>{r.sa("Gather",e,{axis:Number(A)})},939789:(e,A)=>{r.sa("GatherElements",e,{axis:Number(A)})},939868:(e,A,t,n,i,a,s,o,u,l,d)=>{r.sa("Resize",e,{antialias:A,axes:t?Array.from(C.subarray(t>>>0,n>>>0)):[],coordinateTransformMode:Y(i),cubicCoeffA:a,excludeOutside:s,extrapolationValue:o,keepAspectRatioPolicy:Y(u),mode:Y(l),nearestMode:Y(d)})},940214:(e,A,t,n,i,a,s)=>{r.sa("Slice",e,{starts:A?Array.from(C.subarray(A>>>0,t>>>0)):[],ends:n?Array.from(C.subarray(n>>>0,i>>>0)):[],axes:a?Array.from(C.subarray(a>>>0,s>>>0)):[]})},940430:e=>{r.sa("Tile",e,void 0)},940482:(e,A,t)=>{r.sa("LayerNormalization",e,{axis:Number(A),epsilon:Number(t)})},940589:(e,A,t)=>{r.sa("InstanceNormalization",e,{epsilon:A,format:t?"NHWC":"NCHW"})},940703:(e,A,t)=>{r.sa("InstanceNormalization",e,{epsilon:A,format:t?"NHWC":"NCHW"})},940817:e=>{r.sa("Range",e,void 0)},940870:(e,A)=>{r.sa("Einsum",e,{equation:Y(A)})},940951:(e,A,t,n,i)=>{r.sa("Pad",e,{mode:A,value:t,pads:n?Array.from(C.subarray(n>>>0,i>>>0)):[]})},941078:(e,A,t,n,i,a)=>{r.sa("BatchNormalization",e,{epsilon:A,momentum:t,spatial:!!i,trainingMode:!!n,format:a?"NHWC":"NCHW"})},941247:(e,A,t,n,i,a)=>{r.sa("BatchNormalization",e,{epsilon:A,momentum:t,spatial:!!i,trainingMode:!!n,format:a?"NHWC":"NCHW"})},941416:(e,A,t)=>{r.sa("CumSum",e,{exclusive:Number(A),reverse:Number(t)})},941513:(e,A,t,n,i,a,s,o,u)=>{r.sa("Attention",e,{numHeads:A,isUnidirectional:t,maskFilterValue:n,scale:i,doRotary:a,qkvHiddenSizes:s?Array.from(C.subarray(Number(o)>>>0,Number(o)+s>>>0)):[],pastPresentShareBuffer:!!u})},941785:e=>{r.sa("Gelu",e,void 0)},941837:(e,A,t,n,i,a)=>{r.sa("MultiHeadAttention",e,{numHeads:A,isUnidirectional:t,maskFilterValue:n,scale:i,doRotary:a})},941996:e=>{r.sa("BiasAdd",e,void 0)},942051:e=>{r.sa("BiasSplitGelu",e,void 0)},942112:(e,A)=>{r.sa("SkipLayerNormalization",e,{epsilon:A})},942193:(e,A,t,n,i,a,s,o,u,l,d,c,p)=>{r.sa("Conv",e,{format:u?"NHWC":"NCHW",auto_pad:A,dilations:[t],group:n,kernel_shape:[i],pads:a?Array.from(C.subarray(a>>>0,s>>>0)):[],strides:[o],w_is_const:()=>!!v[l>>>0],activation:Y(d),activation_params:c?Array.from(I.subarray(c>>>0,p>>>0)):[]})},942563:(e,A,t,n,i,a,s,o,u,l,d,c,p,h,f,g)=>{r.sa("Conv",e,{format:c?"NHWC":"NCHW",auto_pad:A,dilations:[t,n],group:i,kernel_shape:[a,s],pads:o?Array.from(C.subarray(o>>>0,u>>>0)):[],strides:[l,d],w_is_const:()=>!!v[p>>>0],activation:Y(h),activation_params:f?Array.from(I.subarray(f>>>0,g>>>0)):[]})},942954:e=>{r.Ta(e)},942988:(e,A)=>r.Ua(e,A,r.Ea.Va,r.Ea.errors)};function V(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}function G(e){this.Ja=e-24,this.Oa=function(e){$[this.Ja+4>>>2>>>0]=e},this.Na=function(e){$[this.Ja+8>>>2>>>0]=e},this.$a=function(e,A){this.Ma(),this.Oa(e),this.Na(A)},this.Ma=function(){$[this.Ja+16>>>2>>>0]=0}}var W,q=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,j=(e,A,t)=>{var n=(A>>>=0)+t;for(t=A;e[t]&&!(t>=n);)++t;if(16<t-A&&e.buffer&&q)return q.decode(e.subarray(A,t));for(n="";A<t;){var r=e[A++];if(128&r){var i=63&e[A++];if(192==(224&r))n+=String.fromCharCode((31&r)<<6|i);else{var a=63&e[A++];65536>(r=224==(240&r)?(15&r)<<12|i<<6|a:(7&r)<<18|i<<12|a<<6|63&e[A++])?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r))}}else n+=String.fromCharCode(r)}return n},Y=(e,A)=>(e>>>=0)?j(b,e,A):"",X=e=>{for(var A=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);127>=n?A++:2047>=n?A+=2:55296<=n&&57343>=n?(A+=4,++t):A+=3}return A},J=(e,A,t,n)=>{if(!(0<n))return 0;var r=t>>>=0;n=t+n-1;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),127>=a){if(t>=n)break;A[t++>>>0]=a}else{if(2047>=a){if(t+1>=n)break;A[t++>>>0]=192|a>>6}else{if(65535>=a){if(t+2>=n)break;A[t++>>>0]=224|a>>12}else{if(t+3>=n)break;A[t++>>>0]=240|a>>18,A[t++>>>0]=128|a>>12&63}A[t++>>>0]=128|a>>6&63}A[t++>>>0]=128|63&a}}return A[t>>>0]=0,t-r},Z=e=>e%4==0&&(e%100!=0||e%400==0),ee=[0,31,60,91,121,152,182,213,244,274,305,335],Ae=[0,31,59,90,120,151,181,212,243,273,304,334],te=e=>{var A=X(e)+1,t=_e(A);return t&&J(e,b,t,A),t},ne=[],re=(e,A)=>{ne.length=0;for(var t;t=b[e++>>>0];){var n=105!=t;A+=(n&=112!=t)&&A%8?4:0,ne.push(112==t?$[A>>>2>>>0]:105==t?C[A>>>2>>>0]:E[A>>>3>>>0]),A+=n?8:4}return ne},ie={},ae=()=>{if(!W){var e,A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(e in ie)void 0===ie[e]?delete A[e]:A[e]=ie[e];var t=[];for(e in A)t.push(`${e}=${A[e]}`);W=t}return W},se=[null,[],[]],oe=[31,29,31,30,31,30,31,31,30,31,30,31],ue=[31,28,31,30,31,30,31,31,30,31,30,31];function de(e,A,t,n){function r(e,A,t){for(e="number"==typeof e?e.toString():e||"";e.length<A;)e=t[0]+e;return e}function i(e,A){return r(e,A,"0")}function a(e,A){function t(e){return 0>e?-1:0<e?1:0}var n;return 0===(n=t(e.getFullYear()-A.getFullYear()))&&0===(n=t(e.getMonth()-A.getMonth()))&&(n=t(e.getDate()-A.getDate())),n}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function o(e){var A=e.Ca;for(e=new Date(new Date(e.Da+1900,0,1).getTime());0<A;){var t=e.getMonth(),n=(Z(e.getFullYear())?oe:ue)[t];if(!(A>n-e.getDate())){e.setDate(e.getDate()+A);break}A-=n-e.getDate()+1,e.setDate(1),11>t?e.setMonth(t+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return t=new Date(e.getFullYear()+1,0,4),A=s(new Date(e.getFullYear(),0,4)),t=s(t),0>=a(A,e)?0>=a(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}e>>>=0,A>>>=0,t>>>=0;var u=$[40+(n>>>=0)>>>2>>>0];for(var l in n={Ya:C[n>>>2>>>0],Xa:C[n+4>>>2>>>0],Ga:C[n+8>>>2>>>0],Ka:C[n+12>>>2>>>0],Ha:C[n+16>>>2>>>0],Da:C[n+20>>>2>>>0],xa:C[n+24>>>2>>>0],Ca:C[n+28>>>2>>>0],bb:C[n+32>>>2>>>0],Wa:C[n+36>>>2>>>0],Za:u?Y(u):""},t=Y(t),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})t=t.replace(new RegExp(l,"g"),u[l]);var d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),c="January February March April May June July August September October November December".split(" ");for(l in u={"%a":e=>d[e.xa].substring(0,3),"%A":e=>d[e.xa],"%b":e=>c[e.Ha].substring(0,3),"%B":e=>c[e.Ha],"%C":e=>i((e.Da+1900)/100|0,2),"%d":e=>i(e.Ka,2),"%e":e=>r(e.Ka,2," "),"%g":e=>o(e).toString().substring(2),"%G":e=>o(e),"%H":e=>i(e.Ga,2),"%I":e=>(0==(e=e.Ga)?e=12:12<e&&(e-=12),i(e,2)),"%j":e=>{for(var A=0,t=0;t<=e.Ha-1;A+=(Z(e.Da+1900)?oe:ue)[t++]);return i(e.Ka+A,3)},"%m":e=>i(e.Ha+1,2),"%M":e=>i(e.Xa,2),"%n":()=>"\n","%p":e=>0<=e.Ga&&12>e.Ga?"AM":"PM","%S":e=>i(e.Ya,2),"%t":()=>"\t","%u":e=>e.xa||7,"%U":e=>i(Math.floor((e.Ca+7-e.xa)/7),2),"%V":e=>{var A=Math.floor((e.Ca+7-(e.xa+6)%7)/7);if(2>=(e.xa+371-e.Ca-2)%7&&A++,A)53==A&&(4==(t=(e.xa+371-e.Ca)%7)||3==t&&Z(e.Da)||(A=1));else{A=52;var t=(e.xa+7-e.Ca-1)%7;(4==t||5==t&&Z(e.Da%400-1))&&A++}return i(A,2)},"%w":e=>e.xa,"%W":e=>i(Math.floor((e.Ca+7-(e.xa+6)%7)/7),2),"%y":e=>(e.Da+1900).toString().substring(2),"%Y":e=>e.Da+1900,"%z":e=>(0<=(e=e.Wa)?"+":"-")+("0000"+((e=Math.abs(e)/60)/60*100+e%60)).slice(-4),"%Z":e=>e.Za,"%%":()=>"%"},t=t.replace(/%%/g,"\0\0"),u)t.includes(l)&&(t=t.replace(new RegExp(l,"g"),u[l](n)));return l=function(e){var A=Array(X(e)+1);return J(e,A,0,A.length),A}(t=t.replace(/\0\0/g,"%")),l.length>A?0:(v.set(l,e>>>0),l.length-1)}var ce=e=>{try{e()}catch(e){H(e)}},pe=0,ge=null,we=0,Be=[],ye={},ve={},be=0,Ce=null,$e=[];function Ie(e){if(!Q){if(0===pe){var A=!1,t=!1;e(((e=0)=>{if(!Q&&(we=e,A=!0,t)){pe=2,ce((()=>Me(ge))),typeof Browser<"u"&&Browser.Ia.Pa&&Browser.Ia.resume(),e=!1;try{var n=(0,Qe[ve[C[ge+8>>>2>>>0]]])()}catch(A){n=A,e=!0}var r=!1;if(!ge){var i=Ce;i&&(Ce=null,(e?i.reject:i.resolve)(n),r=!0)}if(e&&!r)throw n}})),t=!0,A||(pe=1,ge=function(){var e=_e(65548),A=e+12;$[e>>>2>>>0]=A,$[e+4>>>2>>>0]=A+65536,A=Be[0];var t=ye[A];return void 0===t&&(t=be++,ye[A]=t,ve[t]=A),C[e+8>>>2>>>0]=t,e}(),typeof Browser<"u"&&Browser.Ia.Pa&&Browser.Ia.pause(),ce((()=>ke(ge))))}else 2===pe?(pe=0,ce(Re),Fe(ge),ge=null,$e.forEach((e=>{if(!Q)try{e();try{y=y=e=y,r.onExit?.(e),Q=!0,l(e,new V(e))}catch(e){e instanceof V||"unwind"==e||l(1,e)}}catch(e){e instanceof V||"unwind"==e||l(1,e)}}))):H(`invalid state: ${pe}`);return we}}var Ee={n:function(e,A,t){return function(e){return Ie((A=>{e().then(A)}))}((async()=>{await r.Ra(e,A,t)}))},a:function(e,A,t){throw new G(e>>>=0).$a(A>>>0,t>>>0),e},g:function(){return 0},J:function(){},A:function(){},C:function(){},L:function(){return 0},H:function(){},D:function(){},G:function(){},l:function(){},B:function(){},y:function(){},I:function(){},z:function(){},m:()=>1,q:function(e,A,t){e=A+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*A:NaN,t>>>=0,e=new Date(1e3*e),C[t>>>2>>>0]=e.getUTCSeconds(),C[t+4>>>2>>>0]=e.getUTCMinutes(),C[t+8>>>2>>>0]=e.getUTCHours(),C[t+12>>>2>>>0]=e.getUTCDate(),C[t+16>>>2>>>0]=e.getUTCMonth(),C[t+20>>>2>>>0]=e.getUTCFullYear()-1900,C[t+24>>>2>>>0]=e.getUTCDay(),C[t+28>>>2>>>0]=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},r:function(e,A,t){e=A+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*A:NaN,t>>>=0,e=new Date(1e3*e),C[t>>>2>>>0]=e.getSeconds(),C[t+4>>>2>>>0]=e.getMinutes(),C[t+8>>>2>>>0]=e.getHours(),C[t+12>>>2>>>0]=e.getDate(),C[t+16>>>2>>>0]=e.getMonth(),C[t+20>>>2>>>0]=e.getFullYear()-1900,C[t+24>>>2>>>0]=e.getDay(),C[t+28>>>2>>>0]=(Z(e.getFullYear())?ee:Ae)[e.getMonth()]+e.getDate()-1|0,C[t+36>>>2>>>0]=-60*e.getTimezoneOffset(),A=new Date(e.getFullYear(),6,1).getTimezoneOffset();var n=new Date(e.getFullYear(),0,1).getTimezoneOffset();C[t+32>>>2>>>0]=0|(A!=n&&e.getTimezoneOffset()==Math.min(n,A))},s:function(e){e>>>=0;var A=new Date(C[e+20>>>2>>>0]+1900,C[e+16>>>2>>>0],C[e+12>>>2>>>0],C[e+8>>>2>>>0],C[e+4>>>2>>>0],C[e>>>2>>>0],0),t=C[e+32>>>2>>>0],n=A.getTimezoneOffset(),r=new Date(A.getFullYear(),6,1).getTimezoneOffset(),i=new Date(A.getFullYear(),0,1).getTimezoneOffset(),a=Math.min(i,r);return 0>t?C[e+32>>>2>>>0]=+(r!=i&&a==n):0<t!=(a==n)&&(r=Math.max(i,r),A.setTime(A.getTime()+6e4*((0<t?a:r)-n))),C[e+24>>>2>>>0]=A.getDay(),C[e+28>>>2>>>0]=(Z(A.getFullYear())?ee:Ae)[A.getMonth()]+A.getDate()-1|0,C[e>>>2>>>0]=A.getSeconds(),C[e+4>>>2>>>0]=A.getMinutes(),C[e+8>>>2>>>0]=A.getHours(),C[e+12>>>2>>>0]=A.getDate(),C[e+16>>>2>>>0]=A.getMonth(),C[e+20>>>2>>>0]=A.getYear(),e=A.getTime(),isNaN(e)?(C[xe()>>>2>>>0]=61,e=-1):e/=1e3,Se((K=e,1<=+Math.abs(K)?0<K?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)),e>>>0},o:function(){return-52},p:function(){},w:function(e,A,t){function n(e){return(e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/))?e[1]:"GMT"}t>>>=0;var r=(new Date).getFullYear(),i=new Date(r,0,1),a=new Date(r,6,1);r=i.getTimezoneOffset();var s=a.getTimezoneOffset();$[e>>>0>>>2>>>0]=60*Math.max(r,s),C[A>>>0>>>2>>>0]=+(r!=s),e=n(i),A=n(a),e=te(e),A=te(A),s<r?($[t>>>2>>>0]=e,$[t+4>>>2>>>0]=A):($[t>>>2>>>0]=A,$[t+4>>>2>>>0]=e)},e:()=>{H("")},b:function(e,A,t){return e>>>=0,A=re(A>>>0,t>>>0),z[e].apply(null,A)},i:function(e,A,t){return e>>>=0,A=re(A>>>0,t>>>0),z[e].apply(null,A)},h:()=>Date.now(),x:function(){return 4294901760},c:()=>performance.now(),K:function(e,A,t){return A>>>=0,b.copyWithin(e>>>0>>>0,A>>>0,A+(t>>>0)>>>0)},u:function(e){e>>>=0;var A=b.length;if(4294901760<e)return!1;for(var t=1;4>=t;t*=2){var n=A*(1+.2/t);n=Math.min(n,e+100663296);var r=Math;n=Math.max(e,n);e:{r=(r.min.call(r,4294901760,n+(65536-n%65536)%65536)-B.buffer.byteLength+65535)/65536;try{B.grow(r),U();var i=1;break e}catch{}i=void 0}if(i)return!0}return!1},E:function(e,A){e>>>=0,A>>>=0;var t=0;return ae().forEach(((n,r)=>{var i=A+t;for(r=$[e+4*r>>>2>>>0]=i,i=0;i<n.length;++i)v[r++>>>0>>>0]=n.charCodeAt(i);v[r>>>0>>>0]=0,t+=n.length+1})),0},F:function(e,A){e>>>=0,A>>>=0;var t=ae();$[e>>>2>>>0]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),$[A>>>2>>>0]=n,0},f:()=>52,k:function(){return 52},t:function(){return 70},j:function(e,A,t,n){A>>>=0,t>>>=0,n>>>=0;for(var r=0,i=0;i<t;i++){var a=$[A>>>2>>>0],s=$[A+4>>>2>>>0];A+=8;for(var o=0;o<s;o++){var u=b[a+o>>>0],l=se[e];0===u||10===u?((1===e?m:w)(j(l,0)),l.length=0):l.push(u)}r+=s}return $[n>>>2>>>0]=r,0},v:de,d:function(e,A,t,n){return de(e>>>0,A>>>0,t>>>0,n>>>0)}},Qe=function(){function e(e){return Qe=e.exports,Qe=function(){var e=Qe,A={};for(let[t,n]of Object.entries(e))A[t]="function"==typeof n?function(){Be.push(t);try{return n.apply(null,arguments)}finally{Q||(Be.pop(),ge&&1===pe&&0===Be.length&&(pe=0,ce(De),typeof Fibers<"u"&&Fibers.cb()))}}:n;return A}(),Qe=function(){var e=Qe;e=Object.assign({},e);var A=e=>()=>e()>>>0,t=e=>A=>e(A)>>>0;return e.pa=A(e.pa),e.qa=t(e.qa),e.ua=A(e.ua),e.wa=t(e.wa),e}(),B=Qe.M,U(),_.unshift(Qe.N),0==--S&&(null!==T&&(clearInterval(T),T=null),O&&(e=O,O=null,e())),Qe}var A={a:Ee};if(S++,r.instantiateWasm)try{return r.instantiateWasm(A,e)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return function(e,A){var t=k;return"function"!=typeof WebAssembly.instantiateStreaming||D(t)||M(t)||p||"function"!=typeof fetch?L(t,e,A):fetch(t,{credentials:"same-origin"}).then((n=>WebAssembly.instantiateStreaming(n,e).then(A,(function(n){return w(`wasm streaming compile failed: ${n}`),w("falling back to ArrayBuffer instantiation"),L(t,e,A)}))))}(A,(function(A){e(A.instance)})).catch(n),{}}();r._OrtInit=(e,A)=>(r._OrtInit=Qe.O)(e,A),r._OrtGetLastError=(e,A)=>(r._OrtGetLastError=Qe.P)(e,A),r._OrtCreateSessionOptions=(e,A,t,n,i,a,s,o,u,l)=>(r._OrtCreateSessionOptions=Qe.Q)(e,A,t,n,i,a,s,o,u,l),r._OrtAppendExecutionProvider=(e,A)=>(r._OrtAppendExecutionProvider=Qe.R)(e,A),r._OrtAddFreeDimensionOverride=(e,A,t)=>(r._OrtAddFreeDimensionOverride=Qe.S)(e,A,t),r._OrtAddSessionConfigEntry=(e,A,t)=>(r._OrtAddSessionConfigEntry=Qe.T)(e,A,t),r._OrtReleaseSessionOptions=e=>(r._OrtReleaseSessionOptions=Qe.U)(e),r._OrtCreateSession=(e,A,t)=>(r._OrtCreateSession=Qe.V)(e,A,t),r._OrtReleaseSession=e=>(r._OrtReleaseSession=Qe.W)(e),r._OrtGetInputOutputCount=(e,A,t)=>(r._OrtGetInputOutputCount=Qe.X)(e,A,t),r._OrtGetInputName=(e,A)=>(r._OrtGetInputName=Qe.Y)(e,A),r._OrtGetOutputName=(e,A)=>(r._OrtGetOutputName=Qe.Z)(e,A),r._OrtFree=e=>(r._OrtFree=Qe._)(e),r._OrtCreateTensor=(e,A,t,n,i,a)=>(r._OrtCreateTensor=Qe.$)(e,A,t,n,i,a),r._OrtGetTensorData=(e,A,t,n,i)=>(r._OrtGetTensorData=Qe.aa)(e,A,t,n,i),r._OrtReleaseTensor=e=>(r._OrtReleaseTensor=Qe.ba)(e),r._OrtCreateRunOptions=(e,A,t,n)=>(r._OrtCreateRunOptions=Qe.ca)(e,A,t,n),r._OrtAddRunConfigEntry=(e,A,t)=>(r._OrtAddRunConfigEntry=Qe.da)(e,A,t),r._OrtReleaseRunOptions=e=>(r._OrtReleaseRunOptions=Qe.ea)(e),r._OrtCreateBinding=e=>(r._OrtCreateBinding=Qe.fa)(e),r._OrtBindInput=(e,A,t)=>(r._OrtBindInput=Qe.ga)(e,A,t),r._OrtBindOutput=(e,A,t,n)=>(r._OrtBindOutput=Qe.ha)(e,A,t,n),r._OrtClearBoundOutputs=e=>(r._OrtClearBoundOutputs=Qe.ia)(e),r._OrtReleaseBinding=e=>(r._OrtReleaseBinding=Qe.ja)(e),r._OrtRunWithBinding=(e,A,t,n,i)=>(r._OrtRunWithBinding=Qe.ka)(e,A,t,n,i),r._OrtRun=(e,A,t,n,i,a,s,o)=>(r._OrtRun=Qe.la)(e,A,t,n,i,a,s,o),r._OrtEndProfiling=e=>(r._OrtEndProfiling=Qe.ma)(e),r._JsepOutput=(e,A,t)=>(r._JsepOutput=Qe.na)(e,A,t),r._JsepGetNodeName=e=>(r._JsepGetNodeName=Qe.oa)(e);var Ue,xe=()=>(xe=Qe.pa)(),_e=r._malloc=e=>(_e=r._malloc=Qe.qa)(e),Fe=r._free=e=>(Fe=r._free=Qe.ra)(e),Se=e=>(Se=Qe.ta)(e),Te=()=>(Te=Qe.ua)(),Oe=e=>(Oe=Qe.va)(e),He=e=>(He=Qe.wa)(e),ke=e=>(ke=Qe.ya)(e),De=()=>(De=Qe.za)(),Me=e=>(Me=Qe.Aa)(e),Re=()=>(Re=Qe.Ba)();function Pe(){if(!(0<S)){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;){var e=r.preRun.shift();x.unshift(e)}for(;0<x.length;)x.shift()(r);if(!(0<S||Ue||(Ue=!0,r.calledRun=!0,Q))){for(;0<_.length;)_.shift()(r);for(A(r);0<F.length;)F.shift()(r)}}}return r.___start_em_js=943100,r.___stop_em_js=943261,r.stackAlloc=He,r.stackSave=Te,r.stackRestore=Oe,r.UTF8ToString=Y,r.stringToUTF8=(e,A,t)=>J(e,b,A,t),r.lengthBytesUTF8=X,O=function e(){Ue||Pe(),Ue||(O=e)},Pe(),e.ready});"object"==typeof e&&"object"==typeof A?A.exports=n:"function"==typeof define&&define.amd&&define([],(()=>n))})),Be=K((()=>{})),ye=K((()=>{})),ve={};z(ve,{cpus:()=>be});var be,Ce,$e,Ie,Ee,Qe,Ue,xe,_e,Fe,Se,Te,Oe,He,ke,De,Me,Re,Pe,Le,Ke,ze,Ne,Ve,Ge,We,qe,je,Ye,Xe,Je,Ze,eA,AA,tA,nA,rA,iA,aA,sA,oA,uA,lA,dA,cA,pA,hA,fA,gA,mA,wA,BA,yA,vA,bA,CA,$A,IA,EA,QA,UA,xA,_A,FA,SA,TA,OA,HA,kA,DA,MA,RA,PA,LA,KA,zA,NA,VA,GA,WA,qA,jA,YA,XA,JA,ZA,et,At,tt,nt,rt,it,at,st,ot,ut,lt,dt,ct,pt,ht,ft,gt,mt,wt,Bt,yt,vt,bt,Ct,$t,It,Et,Qt,Ut,xt,_t,Ft,St,Tt,Ot,Ht,kt,Dt,Mt,Rt,Pt,Lt,Kt,zt,Nt,Vt,Gt,Wt,qt,jt,Yt,Xt,Jt,Zt,en,An,tn,nn,rn,an,sn,on,un,ln,dn,cn,pn,hn,fn,gn,mn,wn,Bn,yn,vn,bn,Cn,$n,In,En,Qn,Un,xn,_n,Fn,Sn,Tn,On,Hn,kn,Dn,Mn,Rn,Pn,Ln,Kn,zn,Nn,Vn,Gn,Wn,qn,jn,Yn,Xn,Jn,Zn,er,Ar,tr,nr,rr,ir,ar,sr,or,ur,lr,dr,cr,pr,hr,fr,gr,mr,wr,Br,yr,vr,br,Cr,$r,Ir,Er,Qr,Ur,xr,_r,Fr,Sr,Tr,Or,Hr,kr,Dr,Mr,Rr,Pr,Lr,Kr,zr,Nr,Vr,Gr,Wr,qr,jr,Yr,Xr,Jr,Zr,ei,Ai,ti,ni,ri,ii,ai,si,oi,ui,li,di,ci,pi,hi,fi,gi,mi,wi,Bi,yi,vi,bi,Ci,$i,Ii,Ei,Qi,Ui,xi,_i,Fi,Si,Ti,Oi,Hi,ki,Di,Mi,Ri,Pi,Li,Ki,zi,Ni,Vi,Gi,Wi,qi,ji,Yi,Xi,Ji,Zi,ea,Aa,ta,na,ra,ia,aa,sa,oa,ua,la,da,ca,pa,ha,fa,ga,ma,wa,Ba,ya,va,ba,Ca,$a,Ia,Ea,Qa,Ua,xa,_a,Fa,Sa,Ta,Oa,Ha,ka,Da,Ma,Ra,Pa,La,Ka,za,Na,Va,Ga,Wa,qa,ja,Ya,Xa,Ja,Za,es,As,ts,ns,rs,is,as,ss,os,us,ls,ds,cs,ps,hs=L((()=>{be=void 0})),fs=K(((e,A)=>{var t,n=(t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,typeof __filename<"u"&&(t=t||__filename),function(e={}){function A(){return x.buffer!=S.buffer&&R(),S}function n(){return x.b