
var ortWasmThreaded = (() => {
  var _scriptName = import.meta.url;
  
  return (
async function(moduleArg = {}) {
  var moduleRtn;

function e(){m.buffer!=q.buffer&&u();return q}function w(){m.buffer!=q.buffer&&u();return ba}function ca(){m.buffer!=q.buffer&&u();return da}function ea(){m.buffer!=q.buffer&&u();return fa}function z(){m.buffer!=q.buffer&&u();return ha}function A(){m.buffer!=q.buffer&&u();return ia}function ja(){m.buffer!=q.buffer&&u();return ka}function la(){m.buffer!=q.buffer&&u();return ma}
var B=Object.assign({},moduleArg),na,oa,pa=new Promise((a,b)=>{na=a;oa=b}),qa="object"==typeof window,C="function"==typeof importScripts,D="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,E=C&&"em-pthread"==self.name;if(D){const {createRequire:a}=await import("module");var require=a(import.meta.url),ra=require("worker_threads");global.Worker=ra.Worker;E=(C=!ra.hc)&&"em-pthread"==ra.workerData}"use strict";
B.mountExternalData=(a,b)=>{(B.Bb||(B.Bb=new Map)).set(a,b)};B.unmountExternalData=()=>{delete B.Bb};var SharedArrayBuffer=globalThis.SharedArrayBuffer??(new WebAssembly.Memory({initial:0,maximum:0,shared:!0})).buffer.constructor;"use strict";
let ta=()=>{const a=(c,d,f)=>(...g)=>{const k=F,l=d?.();g=c(...g);const p=d?.();l!==p&&(c=p,f(l),d=f=null);return F!=k?sa():g},b=c=>async(...d)=>{try{if(B.Ab)throw Error("Session already started");const f=B.Ab={Yb:d[0],errors:[]},g=await c(...d);if(B.Ab!==f)throw Error("Session mismatch");B.Ib?.flush();const k=f.errors;if(0<k.length){let l=await Promise.all(k);l=l.filter(p=>p);if(0<l.length)throw Error(l.join("\n"));}return g}finally{B.Ab=null}};B._OrtCreateSession=a(B._OrtCreateSession,()=>B._OrtCreateSession,
c=>B._OrtCreateSession=c);B._OrtRun=b(a(B._OrtRun,()=>B._OrtRun,c=>B._OrtRun=c));B._OrtRunWithBinding=b(a(B._OrtRunWithBinding,()=>B._OrtRunWithBinding,c=>B._OrtRunWithBinding=c));B._OrtBindInput=a(B._OrtBindInput,()=>B._OrtBindInput,c=>B._OrtBindInput=c);ta=void 0};
B.jsepInit=(a,b)=>{ta?.();if("webgpu"===a){[B.Ib,B.Pb,B.Tb,B.Jb,B.Sb,B.fb,B.Ub,B.Wb,B.Qb,B.Rb,B.Vb]=b;const c=B.Ib;B.jsepRegisterBuffer=(d,f,g,k)=>c.registerBuffer(d,f,g,k);B.jsepGetBuffer=d=>c.getBuffer(d);B.jsepCreateDownloader=(d,f,g)=>c.createDownloader(d,f,g);B.jsepOnReleaseSession=d=>{c.onReleaseSession(d)};B.jsepOnRunStart=d=>c.onRunStart(d)}};var ua=Object.assign({},B),va="./this.program",wa=(a,b)=>{throw b;},G="",xa,ya,za;
if(D){var fs=require("fs"),Aa=require("path");G=require("url").fileURLToPath(new URL("./",import.meta.url));xa=(a,b)=>{a=Ba(a)?new URL(a):Aa.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};za=a=>{a=xa(a,!0);a.buffer||(a=new Uint8Array(a));return a};ya=(a,b,c,d=!0)=>{a=Ba(a)?new URL(a):Aa.normalize(a);fs.readFile(a,d?void 0:"utf8",(f,g)=>{f?c(f):b(d?g.buffer:g)})};!B.thisProgram&&1<process.argv.length&&(va=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);wa=(a,b)=>{process.exitCode=
a;throw b;}}else if(qa||C)C?G=self.location.href:"undefined"!=typeof document&&document.currentScript&&(G=document.currentScript.src),_scriptName&&(G=_scriptName),G.startsWith("blob:")?G="":G=G.substr(0,G.replace(/[?#].*/,"").lastIndexOf("/")+1),D||(xa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},C&&(za=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ya=(a,b,c)=>{var d=new XMLHttpRequest;
d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)});D&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var Ca=console.log.bind(console),Da=console.error.bind(console);D&&(Ca=(...a)=>fs.writeSync(1,a.join(" ")+"\n"),Da=(...a)=>fs.writeSync(2,a.join(" ")+"\n"));var Ea=Ca,H=Da;Object.assign(B,ua);ua=null;
if(E){var Fa;if(D){var Ga=ra.parentPort;Ga.on("message",b=>onmessage({data:b}));Object.assign(globalThis,{self:global,importScripts:()=>{},postMessage:b=>Ga.postMessage(b),performance:global.performance||{now:Date.now}})}var Ha=!1;H=function(...b){b=b.join(" ");D?fs.writeSync(2,b+"\n"):console.error(b)};self.alert=function(...b){postMessage({Hb:"alert",text:b.join(" "),ic:Ia()})};B.instantiateWasm=(b,c)=>new Promise(d=>{Fa=f=>{f=new WebAssembly.Instance(f,Ja());c(f);d()}});self.onunhandledrejection=
b=>{throw b.reason||b;};function a(b){try{var c=b.data,d=c.cmd;if("load"===d){let f=[];self.onmessage=g=>f.push(g);self.startWorker=()=>{postMessage({cmd:"loaded"});for(let g of f)a(g);self.onmessage=a};for(const g of c.handlers)if(!B[g]||B[g].proxy)B[g]=(...k)=>{postMessage({Hb:"callHandler",fc:g,args:k})},"print"==g&&(Ea=B[g]),"printErr"==g&&(H=B[g]);m=c.wasmMemory;u();Fa(c.wasmModule)}else if("run"===d){Ka(c.pthread_ptr,0,0,1,0,0);La(c.pthread_ptr);Ma();Na();Ha||(Oa(),Ha=!0);try{Pa(c.start_routine,
c.arg)}catch(f){if("unwind"!=f)throw f;}}else"cancel"===d?Ia()&&Qa(-1):"setimmediate"!==c.target&&("checkMailbox"===d?Ha&&Ra():d&&(H(`worker: received unknown command ${d}`),H(c)))}catch(f){throw Sa(),f;}}self.onmessage=a}var m,Ta,I=!1,Ua,q,ba,da,fa,ha,ia,ka,J,Va,ma;
function u(){var a=m.buffer;B.HEAP8=q=new Int8Array(a);B.HEAP16=da=new Int16Array(a);B.HEAPU8=ba=new Uint8Array(a);B.HEAPU16=fa=new Uint16Array(a);B.HEAP32=ha=new Int32Array(a);B.HEAPU32=ia=new Uint32Array(a);B.HEAPF32=ka=new Float32Array(a);B.HEAPF64=ma=new Float64Array(a);B.HEAP64=J=new BigInt64Array(a);B.HEAPU64=Va=new BigUint64Array(a)}
if(!E){if(B.wasmMemory)m=B.wasmMemory;else if(m=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0}),!(m.buffer instanceof SharedArrayBuffer))throw H("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),D&&H("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");
u()}var Wa=[],Xa=[],Ya=[],Za=0,$a=null,ab=null;function bb(){Za--;if(0==Za&&(null!==$a&&(clearInterval($a),$a=null),ab)){var a=ab;ab=null;a()}}function cb(a){a="Aborted("+a+")";H(a);I=!0;Ua=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");oa(a);throw a;}var db=a=>a.startsWith("data:application/octet-stream;base64,"),Ba=a=>a.startsWith("file://"),eb;function fb(a){if(za)return za(a);throw"both async and sync fetching of the wasm failed";}
function gb(a){if(qa||C){if("function"==typeof fetch&&!Ba(a))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>fb(a));if(ya)return new Promise((b,c)=>{ya(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>fb(a))}function hb(a,b,c){return gb(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{H(`failed to asynchronously prepare wasm: ${d}`);cb(d)})}
function ib(a,b){var c=eb;return"function"!=typeof WebAssembly.instantiateStreaming||db(c)||Ba(c)||D||"function"!=typeof fetch?hb(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(f){H(`wasm streaming compile failed: ${f}`);H("falling back to ArrayBuffer instantiation");return hb(c,a,b)}))}
function Ja(){jb={wa:kb,b:lb,Y:mb,z:nb,ma:ob,U:pb,W:qb,na:rb,ka:sb,da:tb,ja:ub,I:vb,V:wb,S:xb,la:yb,T:zb,sa:Ab,C:Bb,M:Cb,L:Db,B:Eb,s:Fb,p:Gb,D:Hb,y:Ib,N:Jb,ra:Kb,ga:Lb,Q:Mb,Z:Nb,E:Ob,fa:La,pa:Pb,u:Qb,x:Rb,o:Sb,k:Tb,c:Ub,n:Vb,j:Wb,r:Xb,e:Yb,v:Zb,m:$b,g:ac,l:bc,i:cc,h:dc,f:ec,aa:fc,ba:gc,ca:hc,_:ic,$:jc,P:kc,d:lc,K:mc,F:nc,J:oc,ta:pc,oa:qc,R:rc,t:sc,w:tc,O:uc,va:vc,ua:wc,ha:xc,ia:yc,X:zc,A:Ac,H:Bc,ea:Cc,G:Dc,a:m,qa:Ec,q:Fc};return{a:jb}}
var Gc={840940:(a,b,c,d)=>{if("undefined"==typeof B||!B.Bb)return 1;a=K(a>>>0);a.startsWith("./")&&(a=a.substring(2));a=B.Bb.get(a);if(!a)return 2;b>>>=0;c>>>=0;d>>>=0;if(b+c>a.byteLength)return 3;try{return w().set(a.subarray(b,b+c),d>>>0),0}catch{return 4}},841441:()=>{B.Qb()},841472:()=>{B.Rb()},841501:()=>{B.Vb()},841526:a=>B.Pb(a),841559:a=>B.Tb(a),841591:(a,b,c)=>{B.Jb(a,b,c,!0)},841630:(a,b,c)=>{B.Jb(a,b,c)},841663:()=>"undefined"!==typeof wasmOffsetConverter,841720:a=>{B.fb("Abs",a,void 0)},
841771:a=>{B.fb("Neg",a,void 0)},841822:a=>{B.fb("Floor",a,void 0)},841875:a=>{B.fb("Ceil",a,void 0)},841927:a=>{B.fb("Reciprocal",a,void 0)},841985:a=>{B.fb("Sqrt",a,void 0)},842037:a=>{B.fb("Exp",a,void 0)},842088:a=>{B.fb("Erf",a,void 0)},842139:a=>{B.fb("Sigmoid",a,void 0)},842194:(a,b,c)=>{B.fb("HardSigmoid",a,{alpha:b,beta:c})},842273:a=>{B.fb("Log",a,void 0)},842324:a=>{B.fb("Sin",a,void 0)},842375:a=>{B.fb("Cos",a,void 0)},842426:a=>{B.fb("Tan",a,void 0)},842477:a=>{B.fb("Asin",a,void 0)},
842529:a=>{B.fb("Acos",a,void 0)},842581:a=>{B.fb("Atan",a,void 0)},842633:a=>{B.fb("Sinh",a,void 0)},842685:a=>{B.fb("Cosh",a,void 0)},842737:a=>{B.fb("Asinh",a,void 0)},842790:a=>{B.fb("Acosh",a,void 0)},842843:a=>{B.fb("Atanh",a,void 0)},842896:a=>{B.fb("Tanh",a,void 0)},842948:a=>{B.fb("Not",a,void 0)},842999:(a,b,c)=>{B.fb("Clip",a,{min:b,max:c})},843068:a=>{B.fb("Clip",a,void 0)},843120:(a,b)=>{B.fb("Elu",a,{alpha:b})},843178:a=>{B.fb("Relu",a,void 0)},843230:(a,b)=>{B.fb("LeakyRelu",a,{alpha:b})},
843294:(a,b)=>{B.fb("ThresholdedRelu",a,{alpha:b})},843364:(a,b)=>{B.fb("Cast",a,{to:b})},843422:a=>{B.fb("Add",a,void 0)},843473:a=>{B.fb("Sub",a,void 0)},843524:a=>{B.fb("Mul",a,void 0)},843575:a=>{B.fb("Div",a,void 0)},843626:a=>{B.fb("Pow",a,void 0)},843677:a=>{B.fb("Equal",a,void 0)},843730:a=>{B.fb("Greater",a,void 0)},843785:a=>{B.fb("GreaterOrEqual",a,void 0)},843847:a=>{B.fb("Less",a,void 0)},843899:a=>{B.fb("LessOrEqual",a,void 0)},843958:(a,b,c,d,f)=>{B.fb("ReduceMean",a,{keepDims:!!b,
noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},844117:(a,b,c,d,f)=>{B.fb("ReduceMax",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},844275:(a,b,c,d,f)=>{B.fb("ReduceMin",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},844433:(a,b,c,d,f)=>{B.fb("ReduceProd",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},844592:(a,b,c,d,f)=>{B.fb("ReduceSum",a,{keepDims:!!b,
noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},844750:(a,b,c,d,f)=>{B.fb("ReduceL1",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},844907:(a,b,c,d,f)=>{B.fb("ReduceL2",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},845064:(a,b,c,d,f)=>{B.fb("ReduceLogSum",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},845225:(a,b,c,d,f)=>{B.fb("ReduceSumSquare",a,
{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},845389:(a,b,c,d,f)=>{B.fb("ReduceLogSumExp",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},845553:a=>{B.fb("Where",a,void 0)},845606:(a,b,c)=>{B.fb("Transpose",a,{perm:b?Array.from(z().subarray(b>>>0,c>>>0)):[]})},845714:(a,b,c,d)=>{B.fb("DepthToSpace",a,{blocksize:b,mode:K(c),format:d?"NHWC":"NCHW"})},845847:(a,b,c,d)=>{B.fb("DepthToSpace",a,{blocksize:b,mode:K(c),format:d?
"NHWC":"NCHW"})},845980:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t)=>{B.fb("ConvTranspose",a,{format:p?"NHWC":"NCHW",autoPad:b,dilations:[c],group:d,kernelShape:[f],pads:[g,k],strides:[l],wIsConst:()=>!!e()[n>>>0],outputPadding:r?Array.from(z().subarray(r>>>0,x>>>0)):[],outputShape:y?Array.from(z().subarray(y>>>0,h>>>0)):[],activation:K(t)})},846381:(a,b,c,d,f,g,k,l,p,n,r,x,y,h)=>{B.fb("ConvTranspose",a,{format:l?"NHWC":"NCHW",autoPad:b,dilations:Array.from(z().subarray(c>>>0,(c>>>0)+2>>>0)),group:d,kernelShape:Array.from(z().subarray(f>>>
0,(f>>>0)+2>>>0)),pads:Array.from(z().subarray(g>>>0,(g>>>0)+4>>>0)),strides:Array.from(z().subarray(k>>>0,(k>>>0)+2>>>0)),wIsConst:()=>!!e()[p>>>0],outputPadding:n?Array.from(z().subarray(n>>>0,r>>>0)):[],outputShape:x?Array.from(z().subarray(x>>>0,y>>>0)):[],activation:K(h)})},846946:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t)=>{B.fb("ConvTranspose",a,{format:p?"NHWC":"NCHW",autoPad:b,dilations:[c],group:d,kernelShape:[f],pads:[g,k],strides:[l],wIsConst:()=>!!e()[n>>>0],outputPadding:r?Array.from(z().subarray(r>>>
0,x>>>0)):[],outputShape:y?Array.from(z().subarray(y>>>0,h>>>0)):[],activation:K(t)})},847347:(a,b,c,d,f,g,k,l,p,n,r,x,y,h)=>{B.fb("ConvTranspose",a,{format:l?"NHWC":"NCHW",autoPad:b,dilations:Array.from(z().subarray(c>>>0,(c>>>0)+2>>>0)),group:d,kernelShape:Array.from(z().subarray(f>>>0,(f>>>0)+2>>>0)),pads:Array.from(z().subarray(g>>>0,(g>>>0)+4>>>0)),strides:Array.from(z().subarray(k>>>0,(k>>>0)+2>>>0)),wIsConst:()=>!!e()[p>>>0],outputPadding:n?Array.from(z().subarray(n>>>0,r>>>0)):[],outputShape:x?
Array.from(z().subarray(x>>>0,y>>>0)):[],activation:K(h)})},847912:(a,b)=>{B.fb("GlobalAveragePool",a,{format:b?"NHWC":"NCHW"})},848003:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.fb("AveragePool",a,{format:v?"NHWC":"NCHW",auto_pad:b,ceil_mode:c,count_include_pad:d,storage_order:f,dilations:[g,k],kernel_shape:[l,p],pads:[n,r,x,y],strides:[h,t]})},848287:(a,b)=>{B.fb("GlobalAveragePool",a,{format:b?"NHWC":"NCHW"})},848378:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.fb("AveragePool",a,{format:v?"NHWC":"NCHW",auto_pad:b,
ceil_mode:c,count_include_pad:d,storage_order:f,dilations:[g,k],kernel_shape:[l,p],pads:[n,r,x,y],strides:[h,t]})},848662:(a,b)=>{B.fb("GlobalMaxPool",a,{format:b?"NHWC":"NCHW"})},848749:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.fb("MaxPool",a,{format:v?"NHWC":"NCHW",auto_pad:b,ceil_mode:c,count_include_pad:d,storage_order:f,dilations:[g,k],kernel_shape:[l,p],pads:[n,r,x,y],strides:[h,t]})},849029:(a,b)=>{B.fb("GlobalMaxPool",a,{format:b?"NHWC":"NCHW"})},849116:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.fb("MaxPool",
a,{format:v?"NHWC":"NCHW",auto_pad:b,ceil_mode:c,count_include_pad:d,storage_order:f,dilations:[g,k],kernel_shape:[l,p],pads:[n,r,x,y],strides:[h,t]})},849396:(a,b,c,d,f)=>{B.fb("Gemm",a,{alpha:b,beta:c,transA:d,transB:f})},849500:a=>{B.fb("MatMul",a,void 0)},849554:(a,b,c,d)=>{B.fb("ArgMax",a,{keepDims:!!b,selectLastIndex:!!c,axis:d})},849662:(a,b,c,d)=>{B.fb("ArgMin",a,{keepDims:!!b,selectLastIndex:!!c,axis:d})},849770:(a,b)=>{B.fb("Softmax",a,{axis:b})},849833:(a,b)=>{B.fb("Concat",a,{axis:b})},
849893:(a,b,c,d,f)=>{B.fb("Split",a,{axis:b,numOutputs:c,splitSizes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},850033:a=>{B.fb("Expand",a,void 0)},850087:(a,b)=>{B.fb("Gather",a,{axis:Number(b)})},850158:(a,b)=>{B.fb("GatherElements",a,{axis:Number(b)})},850237:(a,b,c,d,f,g,k,l,p,n,r)=>{B.fb("Resize",a,{antialias:b,axes:c?Array.from(z().subarray(c>>>0,d>>>0)):[],coordinateTransformMode:K(f),cubicCoeffA:g,excludeOutside:k,extrapolationValue:l,keepAspectRatioPolicy:K(p),mode:K(n),nearestMode:K(r)})},
850583:(a,b,c,d,f,g,k)=>{B.fb("Slice",a,{starts:b?Array.from(z().subarray(b>>>0,c>>>0)):[],ends:d?Array.from(z().subarray(d>>>0,f>>>0)):[],axes:g?Array.from(z().subarray(g>>>0,k>>>0)):[]})},850799:a=>{B.fb("Tile",a,void 0)},850851:(a,b,c,d)=>{B.fb("LayerNormalization",a,{axis:b,epsilon:c,simplified:!!d})},850962:(a,b,c)=>{B.fb("InstanceNormalization",a,{epsilon:b,format:c?"NHWC":"NCHW"})},851076:(a,b,c)=>{B.fb("InstanceNormalization",a,{epsilon:b,format:c?"NHWC":"NCHW"})},851190:a=>{B.fb("Range",
a,void 0)},851243:(a,b)=>{B.fb("Einsum",a,{equation:K(b)})},851324:(a,b,c,d,f)=>{B.fb("Pad",a,{mode:b,value:c,pads:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},851451:(a,b,c,d,f,g)=>{B.fb("BatchNormalization",a,{epsilon:b,momentum:c,spatial:!!f,trainingMode:!!d,format:g?"NHWC":"NCHW"})},851620:(a,b,c,d,f,g)=>{B.fb("BatchNormalization",a,{epsilon:b,momentum:c,spatial:!!f,trainingMode:!!d,format:g?"NHWC":"NCHW"})},851789:(a,b,c)=>{B.fb("CumSum",a,{exclusive:Number(b),reverse:Number(c)})},851886:(a,
b,c,d,f,g,k,l,p)=>{B.fb("Attention",a,{numHeads:b,isUnidirectional:c,maskFilterValue:d,scale:f,doRotary:g,qkvHiddenSizes:k?Array.from(z().subarray(Number(l)>>>0,Number(l)+k>>>0)):[],pastPresentShareBuffer:!!p})},852158:a=>{B.fb("BiasAdd",a,void 0)},852213:a=>{B.fb("BiasSplitGelu",a,void 0)},852274:a=>{B.fb("FastGelu",a,void 0)},852330:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.fb("Conv",a,{format:x?"NHWC":"NCHW",auto_pad:b,dilations:c?Array.from(z().subarray(c>>>0,d>>>0)):[],group:f,kernel_shape:g?Array.from(z().subarray(g>>>
0,k>>>0)):[],pads:l?Array.from(z().subarray(l>>>0,p>>>0)):[],strides:n?Array.from(z().subarray(n>>>0,r>>>0)):[],w_is_const:()=>!!e()[y>>>0],activation:K(h),activation_params:t?Array.from(ja().subarray(t>>>0,v>>>0)):[]})},852826:a=>{B.fb("Gelu",a,void 0)},852878:(a,b,c,d)=>{B.fb("GroupQueryAttention",a,{numHeads:b,kvNumHeads:c,scale:d})},852991:(a,b,c,d,f,g)=>{B.fb("MatMulNBits",a,{k:b,n:c,accuracyLevel:d,bits:f,blockSize:g})},853118:(a,b,c,d,f,g)=>{B.fb("MultiHeadAttention",a,{numHeads:b,isUnidirectional:c,
maskFilterValue:d,scale:f,doRotary:g})},853277:(a,b)=>{B.fb("QuickGelu",a,{alpha:b})},853341:(a,b,c,d,f)=>{B.fb("RotaryEmbedding",a,{interleaved:!!b,numHeads:c,rotaryEmbeddingDim:d,scale:f})},853480:(a,b,c)=>{B.fb("SkipLayerNormalization",a,{epsilon:b,simplified:!!c})},853582:(a,b,c)=>{B.fb("SkipLayerNormalization",a,{epsilon:b,simplified:!!c})},853684:(a,b,c,d)=>{B.fb("LayerNormalization",a,{axis:b,epsilon:c,simplified:!!d})},853795:a=>{B.Ub(a)},853829:(a,b)=>B.Wb(a,b,B.Ab.Yb,B.Ab.errors)};
function kb(a,b,c){return Hc(async()=>{await B.Sb(a,b,c)})}function Ic(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}
var Jc=a=>{a.terminate();a.onmessage=()=>{}},Mc=a=>{0==L.length&&(Kc(),Lc(L[0]));var b=L.pop();if(!b)return 6;M.push(b);N[a.wb]=b;b.wb=a.wb;var c={cmd:"run",start_routine:a.Zb,arg:a.Lb,pthread_ptr:a.wb};D&&b.unref();b.postMessage(c,a.dc);return 0},O=0,P=(a,b,...c)=>{for(var d=2*c.length,f=Nc(),g=Oc(8*d),k=g>>>3,l=0;l<c.length;l++){var p=c[l];"bigint"==typeof p?(J[k+2*l]=1n,J[k+2*l+1]=p):(J[k+2*l]=0n,la()[k+2*l+1>>>0]=p)}a=Pc(a,0,d,g,b);Qc(f);return a};
function Rc(a){if(E)return P(0,1,a);Ua=a;if(!(0<O)){for(var b of M)Jc(b);for(b of L)Jc(b);L=[];M=[];N=[];B.onExit?.(a);I=!0}wa(a,new Ic(a))}function Sc(a){if(E)return P(1,0,a);zc(a)}var zc=a=>{Ua=a;if(E)throw Sc(a),"unwind";Rc(a)},L=[],M=[],Uc=[],N={};function Vc(){for(var a=B.numThreads-1;a--;)Kc();Wa.unshift(()=>{Za++;Wc(()=>bb())})}var Yc=a=>{var b=a.wb;delete N[b];L.push(a);M.splice(M.indexOf(a),1);a.wb=0;Xc(b)};function Na(){Uc.forEach(a=>a())}
var Lc=a=>new Promise(b=>{a.onmessage=g=>{g=g.data;var k=g.cmd;if(g.targetThread&&g.targetThread!=Ia()){var l=N[g.targetThread];l?l.postMessage(g,g.transferList):H(`Internal error! Worker sent a message "${k}" to target pthread ${g.targetThread}, but that thread no longer exists!`)}else if("checkMailbox"===k)Ra();else if("spawnThread"===k)Mc(g);else if("cleanupThread"===k)Yc(N[g.thread]);else if("killThread"===k)g=g.thread,k=N[g],delete N[g],Jc(k),Xc(g),M.splice(M.indexOf(k),1),k.wb=0;else if("cancelThread"===
k)N[g.thread].postMessage({cmd:"cancel"});else if("loaded"===k)a.loaded=!0,D&&!a.wb&&a.unref(),b(a);else if("alert"===k)alert(`Thread ${g.threadId}: ${g.text}`);else if("setimmediate"===g.target)a.postMessage(g);else if("callHandler"===k)B[g.handler](...g.args);else k&&H(`worker sent an unknown command ${k}`)};a.onerror=g=>{H(`${"worker sent an error!"} ${g.filename}:${g.lineno}: ${g.message}`);throw g;};D&&(a.on("message",g=>a.onmessage({data:g})),a.on("error",g=>a.onerror(g)));var c=[],d=["onExit"],
f;for(f of d)B.hasOwnProperty(f)&&c.push(f);a.postMessage({cmd:"load",handlers:c,wasmMemory:m,wasmModule:Ta})});function Wc(a){E?a():Promise.all(L.map(Lc)).then(a)}function Kc(){var a=new Worker(new URL(import.meta.url),{type:"module",workerData:"em-pthread",name:"em-pthread"});L.push(a)}var Zc=a=>{for(;0<a.length;)a.shift()(B)},Ma=()=>{var a=Ia(),b=A()[a+52>>>2>>>0];a=A()[a+56>>>2>>>0];$c(b,b-a);Qc(b)},Pa=(a,b)=>{O=0;a=ad(a,b);0<O?Ua=a:Qa(a)};class bd{constructor(a){this.Eb=a-24}}
var cd=0,dd=0;function lb(a,b,c){a>>>=0;var d=new bd(a);b>>>=0;c>>>=0;A()[d.Eb+16>>>2>>>0]=0;A()[d.Eb+4>>>2>>>0]=b;A()[d.Eb+8>>>2>>>0]=c;cd=a;dd++;throw cd;}function ed(a,b,c,d){return E?P(2,1,a,b,c,d):mb(a,b,c,d)}
function mb(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;if("undefined"==typeof SharedArrayBuffer)return H("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var f=[];if(E&&0===f.length)return ed(a,b,c,d);a={Zb:c,wb:a,Lb:d,dc:f};return E?(a.Hb="spawnThread",postMessage(a,f),0):Mc(a)}
var fd="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,gd=(a,b,c)=>{b>>>=0;var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&fd)return fd.decode(a.buffer instanceof SharedArrayBuffer?a.slice(b,c):a.subarray(b,c));for(d="";b<c;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|g);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:(f&7)<<18|g<<12|k<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>
10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d},K=(a,b)=>(a>>>=0)?gd(w(),a,b):"";function nb(a,b,c){return E?P(3,1,a,b,c):0}function ob(a,b){if(E)return P(4,1,a,b)}
var hd=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},jd=(a,b,c,d)=>{c>>>=0;if(!(0<d))return 0;var f=c;d=c+d-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var l=a.charCodeAt(++g);k=65536+((k&1023)<<10)|l&1023}if(127>=k){if(c>=d)break;b[c++>>>0]=k}else{if(2047>=k){if(c+1>=d)break;b[c++>>>0]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++>>>0]=224|k>>12}else{if(c+3>=d)break;b[c++>>>0]=240|k>>
18;b[c++>>>0]=128|k>>12&63}b[c++>>>0]=128|k>>6&63}b[c++>>>0]=128|k&63}}b[c>>>0]=0;return c-f},kd=(a,b,c)=>jd(a,w(),b,c);function pb(a,b){if(E)return P(5,1,a,b)}function qb(a,b,c){if(E)return P(6,1,a,b,c)}function rb(a,b,c){return E?P(7,1,a,b,c):0}function sb(a,b){if(E)return P(8,1,a,b)}function tb(a,b,c){if(E)return P(9,1,a,b,c)}function ub(a,b,c,d){if(E)return P(10,1,a,b,c,d)}function vb(a,b,c,d){if(E)return P(11,1,a,b,c,d)}function wb(a,b,c,d){if(E)return P(12,1,a,b,c,d)}
function xb(a){if(E)return P(13,1,a)}function yb(a,b){if(E)return P(14,1,a,b)}function zb(a,b,c){if(E)return P(15,1,a,b,c)}var Ab=()=>{cb("")},ld,Q=a=>{for(var b="";w()[a>>>0];)b+=ld[w()[a++>>>0]];return b},md={},nd={},od={},R;
function pd(a,b,c={}){var d=b.name;if(!a)throw new R(`type "${d}" must have a positive integer typeid pointer`);if(nd.hasOwnProperty(a)){if(c.Nb)return;throw new R(`Cannot register type '${d}' twice`);}nd[a]=b;delete od[a];md.hasOwnProperty(a)&&(b=md[a],delete md[a],b.forEach(f=>f()))}function S(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");return pd(a,b,c)}
var qd=(a,b,c)=>{switch(b){case 1:return c?d=>e()[d>>>0]:d=>w()[d>>>0];case 2:return c?d=>ca()[d>>>1>>>0]:d=>ea()[d>>>1>>>0];case 4:return c?d=>z()[d>>>2>>>0]:d=>A()[d>>>2>>>0];case 8:return c?d=>J[d>>>3]:d=>Va[d>>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}};
function Bb(a,b,c){a>>>=0;c>>>=0;b=Q(b>>>0);S(a,{name:b,fromWireType:d=>d,toWireType:function(d,f){if("bigint"!=typeof f&&"number"!=typeof f)throw null===f?f="null":(d=typeof f,f="object"===d||"array"===d||"function"===d?f.toString():""+f),new TypeError(`Cannot convert "${f}" to ${this.name}`);"number"==typeof f&&(f=BigInt(f));return f},argPackAdvance:T,readValueFromPointer:qd(b,c,-1==b.indexOf("u")),zb:null})}var T=8;
function Cb(a,b,c,d){a>>>=0;b=Q(b>>>0);S(a,{name:b,fromWireType:function(f){return!!f},toWireType:function(f,g){return g?c:d},argPackAdvance:T,readValueFromPointer:function(f){return this.fromWireType(w()[f>>>0])},zb:null})}var rd=[],U=[];function Ub(a){a>>>=0;9<a&&0===--U[a+1]&&(U[a]=void 0,rd.push(a))}
var V=a=>{if(!a)throw new R("Cannot use deleted val. handle = "+a);return U[a]},W=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=rd.pop()||U.length;U[b]=a;U[b+1]=1;return b}};function sd(a){return this.fromWireType(A()[a>>>2>>>0])}var td={name:"emscripten::val",fromWireType:a=>{var b=V(a);Ub(a);return b},toWireType:(a,b)=>W(b),argPackAdvance:T,readValueFromPointer:sd,zb:null};function Db(a){return S(a>>>0,td)}
var ud=(a,b)=>{switch(b){case 4:return function(c){return this.fromWireType(ja()[c>>>2>>>0])};case 8:return function(c){return this.fromWireType(la()[c>>>3>>>0])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}};function Eb(a,b,c){a>>>=0;c>>>=0;b=Q(b>>>0);S(a,{name:b,fromWireType:d=>d,toWireType:(d,f)=>f,argPackAdvance:T,readValueFromPointer:ud(b,c),zb:null})}
function Fb(a,b,c,d,f){a>>>=0;c>>>=0;b=Q(b>>>0);-1===f&&(f=4294967295);f=l=>l;if(0===d){var g=32-8*c;f=l=>l<<g>>>g}var k=b.includes("unsigned")?function(l,p){return p>>>0}:function(l,p){return p};S(a,{name:b,fromWireType:f,toWireType:k,argPackAdvance:T,readValueFromPointer:qd(b,c,0!==d),zb:null})}
function Gb(a,b,c){function d(g){var k=A()[g>>>2>>>0];g=A()[g+4>>>2>>>0];return new f(e().buffer,g,k)}a>>>=0;var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=Q(c>>>0);S(a,{name:c,fromWireType:d,argPackAdvance:T,readValueFromPointer:d},{Nb:!0})}
function Hb(a,b){a>>>=0;b=Q(b>>>0);var c="std::string"===b;S(a,{name:b,fromWireType:function(d){var f=A()[d>>>2>>>0],g=d+4;if(c)for(var k=g,l=0;l<=f;++l){var p=g+l;if(l==f||0==w()[p>>>0]){k=K(k,p-k);if(void 0===n)var n=k;else n+=String.fromCharCode(0),n+=k;k=p+1}}else{n=Array(f);for(l=0;l<f;++l)n[l]=String.fromCharCode(w()[g+l>>>0]);n=n.join("")}X(d);return n},toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"==typeof f;if(!(g||f instanceof Uint8Array||f instanceof
Uint8ClampedArray||f instanceof Int8Array))throw new R("Cannot pass non-string to std::string");var k=c&&g?hd(f):f.length;var l=vd(4+k+1),p=l+4;A()[l>>>2>>>0]=k;if(c&&g)kd(f,p,k+1);else if(g)for(g=0;g<k;++g){var n=f.charCodeAt(g);if(255<n)throw X(p),new R("String has UTF-16 code units that do not fit in 8 bits");w()[p+g>>>0]=n}else for(g=0;g<k;++g)w()[p+g>>>0]=f[g];null!==d&&d.push(X,l);return l},argPackAdvance:T,readValueFromPointer:sd,zb(d){X(d)}})}
var wd="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,xd=(a,b)=>{var c=a>>1;for(var d=c+b/2;!(c>=d)&&ea()[c>>>0];)++c;c<<=1;if(32<c-a&&wd)return wd.decode(w().slice(a,c));c="";for(d=0;!(d>=b/2);++d){var f=ca()[a+2*d>>>1>>>0];if(0==f)break;c+=String.fromCharCode(f)}return c},yd=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f){var g=a.charCodeAt(f);ca()[b>>>1>>>0]=g;b+=2}ca()[b>>>1>>>0]=0;return b-d},zd=a=>2*a.length,Ad=(a,b)=>
{for(var c=0,d="";!(c>=b/4);){var f=z()[a+4*c>>>2>>>0];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d},Bd=(a,b,c)=>{b>>>=0;c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}z()[b>>>2>>>0]=g;b+=4;if(b+4>c)break}z()[b>>>2>>>0]=0;return b-d},Cd=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=
d&&57343>=d&&++c;b+=4}return b};
function Ib(a,b,c){a>>>=0;b>>>=0;c>>>=0;c=Q(c);if(2===b){var d=xd;var f=yd;var g=zd;var k=l=>ea()[l>>>1>>>0]}else 4===b&&(d=Ad,f=Bd,g=Cd,k=l=>A()[l>>>2>>>0]);S(a,{name:c,fromWireType:l=>{for(var p=A()[l>>>2>>>0],n,r=l+4,x=0;x<=p;++x){var y=l+4+x*b;if(x==p||0==k(y))r=d(r,y-r),void 0===n?n=r:(n+=String.fromCharCode(0),n+=r),r=y+b}X(l);return n},toWireType:(l,p)=>{if("string"!=typeof p)throw new R(`Cannot pass non-string to C++ string type ${c}`);var n=g(p),r=vd(4+n+b);A()[r>>>2>>>0]=n/b;f(p,r+4,n+b);
null!==l&&l.push(X,r);return r},argPackAdvance:T,readValueFromPointer:sd,zb(l){X(l)}})}function Jb(a,b){a>>>=0;b=Q(b>>>0);S(a,{Ob:!0,name:b,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})}var Kb=()=>1;function Lb(a){Ka(a>>>0,!C,1,!qa,131072,!1);Na()}var Dd=a=>{if(!I)try{if(a(),!(0<O))try{E?Qa(Ua):zc(Ua)}catch(b){b instanceof Ic||"unwind"==b||wa(1,b)}}catch(b){b instanceof Ic||"unwind"==b||wa(1,b)}};
function La(a){a>>>=0;"function"===typeof Atomics.ec&&(Atomics.ec(z(),a>>>2,a).value.then(Ra),a+=128,Atomics.store(z(),a>>>2,1))}var Ra=()=>{var a=Ia();a&&(La(a),Dd(Ed))};function Mb(a,b){a>>>=0;a==b>>>0?setTimeout(Ra):E?postMessage({targetThread:a,cmd:"checkMailbox"}):(a=N[a])&&a.postMessage({cmd:"checkMailbox"})}var Fd=[];function Nb(a,b,c,d,f){b>>>=0;d/=2;Fd.length=d;c=f>>>0>>>3;for(f=0;f<d;f++)Fd[f]=J[c+2*f]?J[c+2*f+1]:la()[c+2*f+1>>>0];return(b?Gc[b]:Gd[a])(...Fd)}
function Ob(a){a>>>=0;E?postMessage({cmd:"cleanupThread",thread:a}):Yc(N[a])}function Pb(a){D&&N[a>>>0].ref()}var Id=(a,b)=>{var c=nd[a];if(void 0===c)throw a=Hd(a),c=Q(a),X(a),new R(`${b} has unknown type ${c}`);return c},Jd=(a,b,c)=>{var d=[];a=a.toWireType(d,c);d.length&&(A()[b>>>2>>>0]=W(d));return a};function Qb(a,b,c){b>>>=0;c>>>=0;a=V(a>>>0);b=Id(b,"emval::as");return Jd(b,c,a)}var Kd=a=>{try{a()}catch(b){cb(b)}};
function Ld(){var a=Y,b={};for(let [c,d]of Object.entries(a))b[c]="function"==typeof d?(...f)=>{Md.push(c);try{return d(...f)}finally{I||(Md.pop(),F&&1===Z&&0===Md.length&&(Z=0,O+=1,Kd(Nd),"undefined"!=typeof Fibers&&Fibers.kc()))}}:d;return b}var Z=0,F=null,Od=0,Md=[],Pd={},Qd={},Rd=0,Sd=null,Td=[];function sa(){return new Promise((a,b)=>{Sd={resolve:a,reject:b}})}
function Ud(){var a=vd(65548),b=a+12;A()[a>>>2>>>0]=b;A()[a+4>>>2>>>0]=b+65536;b=Md[0];var c=Pd[b];void 0===c&&(c=Rd++,Pd[b]=c,Qd[c]=b);b=c;z()[a+8>>>2>>>0]=b;return a}function Vd(){var a=z()[F+8>>>2>>>0];a=Y[Qd[a]];--O;return a()}
function Wd(a){if(!I){if(0===Z){var b=!1,c=!1;a((d=0)=>{if(!I&&(Od=d,b=!0,c)){Z=2;Kd(()=>Xd(F));"undefined"!=typeof Browser&&Browser.Fb.Mb&&Browser.Fb.resume();d=!1;try{var f=Vd()}catch(l){f=l,d=!0}var g=!1;if(!F){var k=Sd;k&&(Sd=null,(d?k.reject:k.resolve)(f),g=!0)}if(d&&!g)throw f;}});c=!0;b||(Z=1,F=Ud(),"undefined"!=typeof Browser&&Browser.Fb.Mb&&Browser.Fb.pause(),Kd(()=>Yd(F)))}else 2===Z?(Z=0,Kd(Zd),X(F),F=null,Td.forEach(Dd)):cb(`invalid state: ${Z}`);return Od}}
function Hc(a){return Wd(b=>{a().then(b)})}function Rb(a){a>>>=0;return Hc(()=>{a=V(a);return a.then(W)})}var $d=[];function Sb(a,b,c,d){c>>>=0;d>>>=0;a=$d[a>>>0];b=V(b>>>0);return a(null,b,c,d)}var ae={},be=a=>{var b=ae[a];return void 0===b?Q(a):b};function Tb(a,b,c,d,f){c>>>=0;d>>>=0;f>>>=0;a=$d[a>>>0];b=V(b>>>0);c=be(c);return a(b,b[c],d,f)}var ce=()=>"object"==typeof globalThis?globalThis:Function("return this")();function Vb(a){a>>>=0;if(0===a)return W(ce());a=be(a);return W(ce()[a])}
var de=a=>{var b=$d.length;$d.push(a);return b},ee=(a,b)=>{for(var c=Array(a),d=0;d<a;++d)c[d]=Id(A()[b+4*d>>>2>>>0],"parameter "+d);return c},fe=(a,b)=>Object.defineProperty(b,"name",{value:a});function ge(a){var b=Function;if(!(b instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof b} which is not a function`);var c=fe(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}
function Wb(a,b,c){b=ee(a,b>>>0);var d=b.shift();a--;var f="return function (obj, func, destructorsRef, args) {\n",g=0,k=[];0===c&&k.push("obj");for(var l=["retType"],p=[d],n=0;n<a;++n)k.push("arg"+n),l.push("argType"+n),p.push(b[n]),f+=`  var arg${n} = argType${n}.readValueFromPointer(args${g?"+"+g:""});\n`,g+=b[n].argPackAdvance;f+=`  var rv = ${1===c?"new func":"func.call"}(${k.join(", ")});\n`;d.Ob||(l.push("emval_returnValue"),p.push(Jd),f+="  return emval_returnValue(retType, destructorsRef, rv);\n");
l.push(f+"};\n");a=ge(l)(...p);c=`methodCaller<(${b.map(r=>r.name).join(", ")}) => ${d.name}>`;return de(fe(c,a))}function Xb(a,b){b>>>=0;a=V(a>>>0);b=V(b);return W(a[b])}function Yb(a){a>>>=0;9<a&&(U[a+1]+=1)}function Zb(){return W([])}function $b(a){a=V(a>>>0);for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a[c];return W(b)}function ac(a){return W(be(a>>>0))}function bc(){return W({})}function cc(a){a>>>=0;for(var b=V(a);b.length;){var c=b.pop();b.pop()(c)}Ub(a)}
function dc(a,b,c){b>>>=0;c>>>=0;a=V(a>>>0);b=V(b);c=V(c);a[b]=c}function ec(a,b){b>>>=0;a=Id(a>>>0,"_emval_take_value");a=a.readValueFromPointer(b);return W(a)}
function fc(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);b>>>=0;a=new Date(1E3*a);z()[b>>>2>>>0]=a.getUTCSeconds();z()[b+4>>>2>>>0]=a.getUTCMinutes();z()[b+8>>>2>>>0]=a.getUTCHours();z()[b+12>>>2>>>0]=a.getUTCDate();z()[b+16>>>2>>>0]=a.getUTCMonth();z()[b+20>>>2>>>0]=a.getUTCFullYear()-1900;z()[b+24>>>2>>>0]=a.getUTCDay();a=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;z()[b+28>>>2>>>0]=a}
var he=a=>0===a%4&&(0!==a%100||0===a%400),ie=[0,31,60,91,121,152,182,213,244,274,305,335],je=[0,31,59,90,120,151,181,212,243,273,304,334];
function gc(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);b>>>=0;a=new Date(1E3*a);z()[b>>>2>>>0]=a.getSeconds();z()[b+4>>>2>>>0]=a.getMinutes();z()[b+8>>>2>>>0]=a.getHours();z()[b+12>>>2>>>0]=a.getDate();z()[b+16>>>2>>>0]=a.getMonth();z()[b+20>>>2>>>0]=a.getFullYear()-1900;z()[b+24>>>2>>>0]=a.getDay();var c=(he(a.getFullYear())?ie:je)[a.getMonth()]+a.getDate()-1|0;z()[b+28>>>2>>>0]=c;z()[b+36>>>2>>>0]=-(60*a.getTimezoneOffset());c=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();
var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();a=(c!=d&&a.getTimezoneOffset()==Math.min(d,c))|0;z()[b+32>>>2>>>0]=a}
function hc(a){a>>>=0;var b=new Date(z()[a+20>>>2>>>0]+1900,z()[a+16>>>2>>>0],z()[a+12>>>2>>>0],z()[a+8>>>2>>>0],z()[a+4>>>2>>>0],z()[a>>>2>>>0],0),c=z()[a+32>>>2>>>0],d=b.getTimezoneOffset(),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),g=(new Date(b.getFullYear(),0,1)).getTimezoneOffset(),k=Math.min(g,f);0>c?z()[a+32>>>2>>>0]=Number(f!=g&&k==d):0<c!=(k==d)&&(f=Math.max(g,f),b.setTime(b.getTime()+6E4*((0<c?k:f)-d)));z()[a+24>>>2>>>0]=b.getDay();c=(he(b.getFullYear())?ie:je)[b.getMonth()]+
b.getDate()-1|0;z()[a+28>>>2>>>0]=c;z()[a>>>2>>>0]=b.getSeconds();z()[a+4>>>2>>>0]=b.getMinutes();z()[a+8>>>2>>>0]=b.getHours();z()[a+12>>>2>>>0]=b.getDate();z()[a+16>>>2>>>0]=b.getMonth();z()[a+20>>>2>>>0]=b.getYear();a=b.getTime();return BigInt(isNaN(a)?-1:a/1E3)}function ic(a,b,c,d,f,g,k){return E?P(16,1,a,b,c,d,f,g,k):-52}function jc(a,b,c,d,f,g){if(E)return P(17,1,a,b,c,d,f,g)}
function kc(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;var f=(new Date).getFullYear(),g=new Date(f,0,1),k=new Date(f,6,1);f=g.getTimezoneOffset();var l=k.getTimezoneOffset(),p=Math.max(f,l);A()[a>>>2>>>0]=60*p;z()[b>>>2>>>0]=Number(f!=l);a=n=>n.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1];g=a(g);k=a(k);l<f?(kd(g,c,17),kd(k,d,17)):(kd(g,d,17),kd(k,c,17))}
var ke=[],le=(a,b)=>{ke.length=0;for(var c;c=w()[a++>>>0];){var d=105!=c;d&=112!=c;b+=d&&b%8?4:0;ke.push(112==c?A()[b>>>2>>>0]:106==c?J[b>>>3]:105==c?z()[b>>>2>>>0]:la()[b>>>3>>>0]);b+=d?8:4}return ke};function lc(a,b,c){a>>>=0;b=le(b>>>0,c>>>0);return Gc[a](...b)}function mc(a,b,c){a>>>=0;b=le(b>>>0,c>>>0);return Gc[a](...b)}var nc=()=>{},oc=()=>Date.now();function pc(a,b){return H(K(a>>>0,b>>>0))}var qc=()=>{O+=1;throw"unwind";};function rc(){return 4294901760}var sc;
sc=()=>performance.timeOrigin+performance.now();var tc=()=>D?require("os").cpus().length:navigator.hardwareConcurrency;function uc(a){a>>>=0;var b=w().length;if(a<=b||4294901760<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var f=Math;d=Math.max(a,d);a:{f=(f.min.call(f,4294901760,d+(65536-d%65536)%65536)-m.buffer.byteLength+65535)/65536;try{m.grow(f);u();var g=1;break a}catch(k){}g=void 0}if(g)return!0}return!1}
var me=()=>{cb("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER");return 0},ne={},oe=a=>{a.forEach(b=>{var c=me();c&&(ne[c]=b)})};function vc(){var a=Error().stack.toString().split("\n");"Error"==a[0]&&a.shift();oe(a);ne.Kb=me();ne.Xb=a;return ne.Kb}
function wc(a,b,c){a>>>=0;b>>>=0;if(ne.Kb==a)var d=ne.Xb;else d=Error().stack.toString().split("\n"),"Error"==d[0]&&d.shift(),oe(d);for(var f=3;d[f]&&me()!=a;)++f;for(a=0;a<c&&d[a+f];++a)z()[b+4*a>>>2>>>0]=me();return a}
var pe={},re=()=>{if(!qe){var 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",_:va||"./this.program"},b;for(b in pe)void 0===pe[b]?delete a[b]:a[b]=pe[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);qe=c}return qe},qe;
function xc(a,b){if(E)return P(18,1,a,b);a>>>=0;b>>>=0;var c=0;re().forEach((d,f)=>{var g=b+c;f=A()[a+4*f>>>2>>>0]=g;for(g=0;g<d.length;++g)e()[f++>>>0]=d.charCodeAt(g);e()[f>>>0]=0;c+=d.length+1});return 0}function yc(a,b){if(E)return P(19,1,a,b);a>>>=0;b>>>=0;var c=re();A()[a>>>2>>>0]=c.length;var d=0;c.forEach(f=>d+=f.length+1);A()[b>>>2>>>0]=d;return 0}function Ac(a){return E?P(20,1,a):52}function Bc(a,b,c,d){return E?P(21,1,a,b,c,d):52}function Cc(a,b,c,d){return E?P(22,1,a,b,c,d):70}
var se=[null,[],[]];function Dc(a,b,c,d){if(E)return P(23,1,a,b,c,d);b>>>=0;c>>>=0;d>>>=0;for(var f=0,g=0;g<c;g++){var k=A()[b>>>2>>>0],l=A()[b+4>>>2>>>0];b+=8;for(var p=0;p<l;p++){var n=w()[k+p>>>0],r=se[a];0===n||10===n?((1===a?Ea:H)(gd(r,0)),r.length=0):r.push(n)}f+=l}A()[d>>>2>>>0]=f;return 0}var te=[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 ve(a){var b=Array(hd(a)+1);jd(a,b,0,b.length);return b}var we=(a,b)=>{e().set(a,b>>>0)};
function Ec(a,b,c,d){function f(h,t,v){for(h="number"==typeof h?h.toString():h||"";h.length<t;)h=v[0]+h;return h}function g(h,t){return f(h,t,"0")}function k(h,t){function v(Tc){return 0>Tc?-1:0<Tc?1:0}var aa;0===(aa=v(h.getFullYear()-t.getFullYear()))&&0===(aa=v(h.getMonth()-t.getMonth()))&&(aa=v(h.getDate()-t.getDate()));return aa}function l(h){switch(h.getDay()){case 0:return new Date(h.getFullYear()-1,11,29);case 1:return h;case 2:return new Date(h.getFullYear(),0,3);case 3:return new Date(h.getFullYear(),
0,2);case 4:return new Date(h.getFullYear(),0,1);case 5:return new Date(h.getFullYear()-1,11,31);case 6:return new Date(h.getFullYear()-1,11,30)}}function p(h){var t=h.xb;for(h=new Date((new Date(h.yb+1900,0,1)).getTime());0<t;){var v=h.getMonth(),aa=(he(h.getFullYear())?te:ue)[v];if(t>aa-h.getDate())t-=aa-h.getDate()+1,h.setDate(1),11>v?h.setMonth(v+1):(h.setMonth(0),h.setFullYear(h.getFullYear()+1));else{h.setDate(h.getDate()+t);break}}v=new Date(h.getFullYear()+1,0,4);t=l(new Date(h.getFullYear(),
0,4));v=l(v);return 0>=k(t,h)?0>=k(v,h)?h.getFullYear()+1:h.getFullYear():h.getFullYear()-1}a>>>=0;b>>>=0;c>>>=0;d>>>=0;var n=A()[d+40>>>2>>>0];d={bc:z()[d>>>2>>>0],ac:z()[d+4>>>2>>>0],Cb:z()[d+8>>>2>>>0],Gb:z()[d+12>>>2>>>0],Db:z()[d+16>>>2>>>0],yb:z()[d+20>>>2>>>0],qb:z()[d+24>>>2>>>0],xb:z()[d+28>>>2>>>0],jc:z()[d+32>>>2>>>0],$b:z()[d+36>>>2>>>0],cc:n?K(n):""};c=K(c);n={"%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"};for(var r in n)c=c.replace(new RegExp(r,"g"),n[r]);var x="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),y="January February March April May June July August September October November December".split(" ");n={"%a":h=>x[h.qb].substring(0,3),"%A":h=>
x[h.qb],"%b":h=>y[h.Db].substring(0,3),"%B":h=>y[h.Db],"%C":h=>g((h.yb+1900)/100|0,2),"%d":h=>g(h.Gb,2),"%e":h=>f(h.Gb,2," "),"%g":h=>p(h).toString().substring(2),"%G":p,"%H":h=>g(h.Cb,2),"%I":h=>{h=h.Cb;0==h?h=12:12<h&&(h-=12);return g(h,2)},"%j":h=>{for(var t=0,v=0;v<=h.Db-1;t+=(he(h.yb+1900)?te:ue)[v++]);return g(h.Gb+t,3)},"%m":h=>g(h.Db+1,2),"%M":h=>g(h.ac,2),"%n":()=>"\n","%p":h=>0<=h.Cb&&12>h.Cb?"AM":"PM","%S":h=>g(h.bc,2),"%t":()=>"\t","%u":h=>h.qb||7,"%U":h=>g(Math.floor((h.xb+7-h.qb)/7),
2),"%V":h=>{var t=Math.floor((h.xb+7-(h.qb+6)%7)/7);2>=(h.qb+371-h.xb-2)%7&&t++;if(t)53==t&&(v=(h.qb+371-h.xb)%7,4==v||3==v&&he(h.yb)||(t=1));else{t=52;var v=(h.qb+7-h.xb-1)%7;(4==v||5==v&&he(h.yb%400-1))&&t++}return g(t,2)},"%w":h=>h.qb,"%W":h=>g(Math.floor((h.xb+7-(h.qb+6)%7)/7),2),"%y":h=>(h.yb+1900).toString().substring(2),"%Y":h=>h.yb+1900,"%z":h=>{h=h.$b;var t=0<=h;h=Math.abs(h)/60;return(t?"+":"-")+String("0000"+(h/60*100+h%60)).slice(-4)},"%Z":h=>h.cc,"%%":()=>"%"};c=c.replace(/%%/g,"\x00\x00");
for(r in n)c.includes(r)&&(c=c.replace(new RegExp(r,"g"),n[r](d)));c=c.replace(/\0\0/g,"%");r=ve(c);if(r.length>b)return 0;we(r,a);return r.length-1}function Fc(a,b,c,d){return Ec(a>>>0,b>>>0,c>>>0,d>>>0)}E||Vc();for(var xe=Array(256),ye=0;256>ye;++ye)xe[ye]=String.fromCharCode(ye);ld=xe;R=B.BindingError=class extends Error{constructor(a){super(a);this.name="BindingError"}};B.InternalError=class extends Error{constructor(a){super(a);this.name="InternalError"}};U.push(0,1,void 0,1,null,1,!0,1,!1,1);
B.count_emval_handles=()=>U.length/2-5-rd.length;
var Gd=[Rc,Sc,ed,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,ic,jc,xc,yc,Ac,Bc,Cc,Dc],jb,Y=function(){function a(c,d){Y=c.exports;Y=Ld();Y=ze();Uc.push(Y.eb);Xa.unshift(Y.xa);Ta=d;bb();return Y}var b=Ja();Za++;if(B.instantiateWasm)try{return B.instantiateWasm(b,a)}catch(c){H(`Module.instantiateWasm callback failed with error: ${c}`),oa(c)}eb||=B.locateFile?db("ort-wasm-simd-threaded.jsep.wasm")?"ort-wasm-simd-threaded.jsep.wasm":B.locateFile?B.locateFile("ort-wasm-simd-threaded.jsep.wasm",G):G+"ort-wasm-simd-threaded.jsep.wasm":
(new URL("ort-wasm-simd-threaded.jsep.wasm",import.meta.url)).href;ib(b,function(c){a(c.instance,c.module)}).catch(oa);return{}}(),Hd=a=>(Hd=Y.ya)(a),Oa=()=>(Oa=Y.za)();B._OrtInit=(a,b)=>(B._OrtInit=Y.Aa)(a,b);B._OrtGetLastError=(a,b)=>(B._OrtGetLastError=Y.Ba)(a,b);B._OrtCreateSessionOptions=(a,b,c,d,f,g,k,l,p,n)=>(B._OrtCreateSessionOptions=Y.Ca)(a,b,c,d,f,g,k,l,p,n);B._OrtAppendExecutionProvider=(a,b)=>(B._OrtAppendExecutionProvider=Y.Da)(a,b);
B._OrtAddFreeDimensionOverride=(a,b,c)=>(B._OrtAddFreeDimensionOverride=Y.Ea)(a,b,c);B._OrtAddSessionConfigEntry=(a,b,c)=>(B._OrtAddSessionConfigEntry=Y.Fa)(a,b,c);B._OrtReleaseSessionOptions=a=>(B._OrtReleaseSessionOptions=Y.Ga)(a);B._OrtCreateSession=(a,b,c)=>(B._OrtCreateSession=Y.Ha)(a,b,c);B._OrtReleaseSession=a=>(B._OrtReleaseSession=Y.Ia)(a);B._OrtGetInputOutputCount=(a,b,c)=>(B._OrtGetInputOutputCount=Y.Ja)(a,b,c);B._OrtGetInputName=(a,b)=>(B._OrtGetInputName=Y.Ka)(a,b);
B._OrtGetOutputName=(a,b)=>(B._OrtGetOutputName=Y.La)(a,b);B._OrtFree=a=>(B._OrtFree=Y.Ma)(a);B._OrtCreateTensor=(a,b,c,d,f,g)=>(B._OrtCreateTensor=Y.Na)(a,b,c,d,f,g);B._OrtGetTensorData=(a,b,c,d,f)=>(B._OrtGetTensorData=Y.Oa)(a,b,c,d,f);B._OrtReleaseTensor=a=>(B._OrtReleaseTensor=Y.Pa)(a);B._OrtCreateRunOptions=(a,b,c,d)=>(B._OrtCreateRunOptions=Y.Qa)(a,b,c,d);B._OrtAddRunConfigEntry=(a,b,c)=>(B._OrtAddRunConfigEntry=Y.Ra)(a,b,c);B._OrtReleaseRunOptions=a=>(B._OrtReleaseRunOptions=Y.Sa)(a);
B._OrtCreateBinding=a=>(B._OrtCreateBinding=Y.Ta)(a);B._OrtBindInput=(a,b,c)=>(B._OrtBindInput=Y.Ua)(a,b,c);B._OrtBindOutput=(a,b,c,d)=>(B._OrtBindOutput=Y.Va)(a,b,c,d);B._OrtClearBoundOutputs=a=>(B._OrtClearBoundOutputs=Y.Wa)(a);B._OrtReleaseBinding=a=>(B._OrtReleaseBinding=Y.Xa)(a);B._OrtRunWithBinding=(a,b,c,d,f)=>(B._OrtRunWithBinding=Y.Ya)(a,b,c,d,f);B._OrtRun=(a,b,c,d,f,g,k,l)=>(B._OrtRun=Y.Za)(a,b,c,d,f,g,k,l);B._OrtEndProfiling=a=>(B._OrtEndProfiling=Y._a)(a);
B._JsepOutput=(a,b,c)=>(B._JsepOutput=Y.$a)(a,b,c);B._JsepGetNodeName=a=>(B._JsepGetNodeName=Y.ab)(a);
var Ia=()=>(Ia=Y.bb)(),vd=B._malloc=a=>(vd=B._malloc=Y.cb)(a),X=B._free=a=>(X=B._free=Y.db)(a),Ka=(a,b,c,d,f,g)=>(Ka=Y.gb)(a,b,c,d,f,g),Sa=()=>(Sa=Y.hb)(),Pc=(a,b,c,d,f)=>(Pc=Y.ib)(a,b,c,d,f),Xc=a=>(Xc=Y.jb)(a),Qa=a=>(Qa=Y.kb)(a),Ed=()=>(Ed=Y.lb)(),$c=(a,b)=>($c=Y.mb)(a,b),Qc=a=>(Qc=Y.nb)(a),Oc=a=>(Oc=Y.ob)(a),Nc=()=>(Nc=Y.pb)(),ad=B.dynCall_ii=(a,b)=>(ad=B.dynCall_ii=Y.rb)(a,b),Yd=a=>(Yd=Y.sb)(a),Nd=()=>(Nd=Y.tb)(),Xd=a=>(Xd=Y.ub)(a),Zd=()=>(Zd=Y.vb)();B.___start_em_js=853941;B.___stop_em_js=854102;
function ze(){var a=Y;a=Object.assign({},a);var b=d=>f=>d(f)>>>0,c=d=>()=>d()>>>0;a.ya=b(a.ya);a.bb=c(a.bb);a.cb=b(a.cb);a.emscripten_main_runtime_thread_id=c(a.emscripten_main_runtime_thread_id);a.ob=b(a.ob);a.pb=c(a.pb);return a}B.stackSave=()=>Nc();B.stackRestore=a=>Qc(a);B.stackAlloc=a=>Oc(a);B.UTF8ToString=K;B.stringToUTF8=kd;B.lengthBytesUTF8=hd;var Ae;ab=function Be(){Ae||Ce();Ae||(ab=Be)};
function Ce(){if(!(0<Za))if(E)na(B),E||Zc(Xa),startWorker(B);else{if(B.preRun)for("function"==typeof B.preRun&&(B.preRun=[B.preRun]);B.preRun.length;)Wa.unshift(B.preRun.shift());Zc(Wa);0<Za||Ae||(Ae=!0,B.calledRun=!0,I||(E||Zc(Xa),na(B),E||Zc(Ya)))}}Ce();moduleRtn=pa;


  return moduleRtn;
}
);
})();
export default ortWasmThreaded;
var isPthread = globalThis.self?.name === 'em-pthread';
var isNode = typeof globalThis.process?.versions?.node == 'string';
if (isNode) isPthread = (await import('worker_threads')).workerData === 'em-pthread';

// When running as a pthread, construct a new instance on startup
isPthread && ortWasmThreaded();
