({8566:function(){var e=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(r,o){function i(e){try{s(a.next(e))}catch(t){o(t)}}function l(e){try{s(a.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((a=a.apply(e,t||[])).next())}))};function t(e){}addEventListener("message",(n=>{let{wasmUrl:a,imageData:r,imageWidth:o,imageHeight:i,kernelData:l,type:s}=n.data;(function(n,a,r,o,i,l){return e(this,void 0,void 0,(function*(){const e={env:{emscripten_notify_memory_growth:t}};let{instance:s}=yield WebAssembly.instantiateStreaming(fetch(n),e);const c=s.exports,h=c.memalloc(a.length);new Uint8ClampedArray(c.memory.buffer,h,a.length).set(a);const m=c.memalloc(a.length),f=new Uint8ClampedArray(c.memory.buffer,m,a.length),u=c.memalloc(i.length*i[0].length);switch(new Uint8ClampedArray(c.memory.buffer,u,i.length*i[0].length).set(i.flat()),l){case"dilate":c.processDilation(h,m,r,o,u,i.length,i[0].length);break;case"erode":c.processErosion(h,m,r,o,u,i.length,i[0].length);break;default:throw new Error("convolution type not supported")}return f}))})(a,r,o,i,l,s).then((e=>{postMessage(e)}))}))}})[8566]();
//# sourceMappingURL=1.chunk.js.map