larvitar 3.5.0 → 4.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunklarvitar=self.webpackChunklarvitar||[]).push([[216],{3216:(e,r,n)=>{n.r(r),n.d(r,{default:()=>w});var a={Unkown:0,Grayscale:1,AdobeRGB:2,RGB:3,CYMK:4},o=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,s=799,i=3406,c=2276,l=1567,f=3784,h=5793,u=2896;function b(e,r){for(var n,a,o=0,t=[],s=16;s>0&&!e[s-1];)s--;t.push({children:[],index:0});var i,c=t[0];for(n=0;n<s;n++){for(a=0;a<e[n];a++){for((c=t.pop()).children[c.index]=r[o];c.index>0;)c=t.pop();for(c.index++,t.push(c);t.length<=n;)t.push(i={children:[],index:0}),c.children[c.index]=i.children,c=i;o++}n+1<s&&(t.push(i={children:[],index:0}),c.children[c.index]=i.children,c=i)}return t[0].children}function v(e,r,n){return 64*((e.blocksPerLine+1)*r+n)}function m(e,r,n,a,t,s,i,c,l){n.precision,n.samplesPerLine,n.scanLines;var f=n.mcusPerLine,h=n.progressive,u=(n.maxH,n.maxV,r),b=0,m=0;function d(){if(m>0)return m--,b>>m&1;if(255==(b=e[r++])){var n=e[r++];if(n)throw"unexpected marker: "+(b<<8|n).toString(16)}return m=7,b>>>7}function p(e){for(var r,n=e;null!==(r=d());){if("number"==typeof(n=n[r]))return n;if("object"!=typeof n)throw"invalid huffman sequence"}return null}function k(e){for(var r=0;e>0;){var n=d();if(null===n)return;r=r<<1|n,e--}return r}function w(e){var r=k(e);return r>=1<<e-1?r:r+(-1<<e)+1}var C,P=0,g=0;function y(e,r,n,a,o){var t=n%f;r(e,v(e,(n/f|0)*e.v+a,t*e.h+o))}function D(e,r,n){r(e,v(e,n/e.blocksPerLine|0,n%e.blocksPerLine))}var L,x,T,A,U,I,q=a.length;I=h?0===s?0===c?function(e,r){var n=p(e.huffmanTableDC),a=0===n?0:w(n)<<l;e.blockData[r]=e.pred+=a}:function(e,r){e.blockData[r]|=d()<<l}:0===c?function(e,r){if(P>0)P--;else for(var n=s,a=i;n<=a;){var t=p(e.huffmanTableAC),c=15&t,f=t>>4;if(0!==c){var h=o[n+=f];e.blockData[r+h]=w(c)*(1<<l),n++}else{if(f<15){P=k(f)+(1<<f)-1;break}n+=16}}}:function(e,r){for(var n=s,a=i,t=0;n<=a;){var c=o[n];switch(g){case 0:var f=p(e.huffmanTableAC),h=15&f;if(t=f>>4,0===h)t<15?(P=k(t)+(1<<t),g=4):(t=16,g=1);else{if(1!==h)throw"invalid ACn encoding";C=w(h),g=t?2:3}continue;case 1:case 2:e.blockData[r+c]?e.blockData[r+c]+=d()<<l:0==--t&&(g=2==g?3:0);break;case 3:e.blockData[r+c]?e.blockData[r+c]+=d()<<l:(e.blockData[r+c]=C<<l,g=0);break;case 4:e.blockData[r+c]&&(e.blockData[r+c]+=d()<<l)}n++}4===g&&0==--P&&(g=0)}:function(e,r){var n=p(e.huffmanTableDC),a=0===n?0:w(n);e.blockData[r]=e.pred+=a;for(var t=1;t<64;){var s=p(e.huffmanTableAC),i=15&s,c=s>>4;if(0!==i){var l=o[t+=c];e.blockData[r+l]=w(i),t++}else{if(c<15)break;t+=16}}};var G,M,z,H,R=0;for(M=1==q?a[0].blocksPerLine*a[0].blocksPerColumn:f*n.mcusPerColumn,t||(t=M);R<M;){for(x=0;x<q;x++)a[x].pred=0;if(P=0,1==q)for(L=a[0],U=0;U<t;U++)D(L,I,R),R++;else for(U=0;U<t;U++){for(x=0;x<q;x++)for(z=(L=a[x]).h,H=L.v,T=0;T<H;T++)for(A=0;A<z;A++)y(L,I,R,T,A);R++}if(m=0,(G=e[r]<<8|e[r+1])<=65280)throw"marker was not found";if(!(G>=65488&&G<=65495))break;r+=2}return r-u}function d(e,r,n){var a,o,b,v,m,d,p,k,w,C,P=e.quantizationTable;for(C=0;C<64;C++)n[C]=e.blockData[r+C]*P[C];for(C=0;C<8;++C){var g=8*C;0!==n[1+g]||0!==n[2+g]||0!==n[3+g]||0!==n[4+g]||0!==n[5+g]||0!==n[6+g]||0!==n[7+g]?(a=h*n[0+g]+128>>8,o=h*n[4+g]+128>>8,b=n[2+g],v=n[6+g],m=u*(n[1+g]-n[7+g])+128>>8,k=u*(n[1+g]+n[7+g])+128>>8,d=n[3+g]<<4,p=n[5+g]<<4,w=a-o+1>>1,a=a+o+1>>1,o=w,w=b*f+v*l+128>>8,b=b*l-v*f+128>>8,v=w,w=m-p+1>>1,m=m+p+1>>1,p=w,w=k+d+1>>1,d=k-d+1>>1,k=w,w=a-v+1>>1,a=a+v+1>>1,v=w,w=o-b+1>>1,o=o+b+1>>1,b=w,w=m*c+k*i+2048>>12,m=m*i-k*c+2048>>12,k=w,w=d*s+p*t+2048>>12,d=d*t-p*s+2048>>12,p=w,n[0+g]=a+k,n[7+g]=a-k,n[1+g]=o+p,n[6+g]=o-p,n[2+g]=b+d,n[5+g]=b-d,n[3+g]=v+m,n[4+g]=v-m):(w=h*n[0+g]+512>>10,n[0+g]=w,n[1+g]=w,n[2+g]=w,n[3+g]=w,n[4+g]=w,n[5+g]=w,n[6+g]=w,n[7+g]=w)}for(C=0;C<8;++C){var y=C;0!==n[8+y]||0!==n[16+y]||0!==n[24+y]||0!==n[32+y]||0!==n[40+y]||0!==n[48+y]||0!==n[56+y]?(a=h*n[0+y]+2048>>12,o=h*n[32+y]+2048>>12,b=n[16+y],v=n[48+y],m=u*(n[8+y]-n[56+y])+2048>>12,k=u*(n[8+y]+n[56+y])+2048>>12,d=n[24+y],p=n[40+y],w=a-o+1>>1,a=a+o+1>>1,o=w,w=b*f+v*l+2048>>12,b=b*l-v*f+2048>>12,v=w,w=m-p+1>>1,m=m+p+1>>1,p=w,w=k+d+1>>1,d=k-d+1>>1,k=w,w=a-v+1>>1,a=a+v+1>>1,v=w,w=o-b+1>>1,o=o+b+1>>1,b=w,w=m*c+k*i+2048>>12,m=m*i-k*c+2048>>12,k=w,w=d*s+p*t+2048>>12,d=d*t-p*s+2048>>12,p=w,n[0+y]=a+k,n[56+y]=a-k,n[8+y]=o+p,n[48+y]=o-p,n[16+y]=b+d,n[40+y]=b-d,n[24+y]=v+m,n[32+y]=v-m):(w=h*n[C+0]+8192>>14,n[0+y]=w,n[8+y]=w,n[16+y]=w,n[24+y]=w,n[32+y]=w,n[40+y]=w,n[48+y]=w,n[56+y]=w)}for(C=0;C<64;++C){var D=r+C,L=n[C];L=L<=-2056/e.bitConversion?0:L>=2024/e.bitConversion?255/e.bitConversion:L+2056/e.bitConversion>>4,e.blockData[D]=L}}function p(e,r){for(var n=r.blocksPerLine,a=r.blocksPerColumn,o=new Int32Array(64),t=0;t<a;t++)for(var s=0;s<n;s++)d(r,v(r,t,s),o);return r.blockData}function k(e){return e<=0?0:e>=255?255:0|e}const w=class{constructor(){}load(e){var r=function(e){this.parse(e),this.onload&&this.onload()}.bind(this);if(e.indexOf("data:")>-1){for(var n=e.indexOf("base64,")+7,a=atob(e.substring(n)),o=new Uint8Array(a.length),t=a.length-1;t>=0;t--)o[t]=a.charCodeAt(t);r(a)}else{var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(){var e=new Uint8Array(s.response);r(e)}.bind(this),s.send(null)}}parse(e){function r(){var r=e[l]<<8|e[l+1];return l+=2,r}function n(e){for(var r=Math.ceil(e.samplesPerLine/8/e.maxH),n=Math.ceil(e.scanLines/8/e.maxV),a=0;a<e.components.length;a++){K=e.components[a];var o=Math.ceil(Math.ceil(e.samplesPerLine/8)*K.h/e.maxH),t=Math.ceil(Math.ceil(e.scanLines/8)*K.v/e.maxV),s=r*K.h,i=n*K.v*64*(s+1);K.blockData=new Int16Array(i),K.blocksPerLine=o,K.blocksPerColumn=t}e.mcusPerLine=r,e.mcusPerColumn=n}var t,s,i,c,l=0,f=(e.length,null),h=null,u=[],v=[],d=[],k=r();if(65496!=k)throw"SOI not found";for(k=r();65497!=k;){var w,C;switch(k){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var P=(i=void 0,c=void 0,i=r(),c=e.subarray(l,l+i-2),l+=c.length,c);65504===k&&74===P[0]&&70===P[1]&&73===P[2]&&70===P[3]&&0===P[4]&&(f={version:{major:P[5],minor:P[6]},densityUnits:P[7],xDensity:P[8]<<8|P[9],yDensity:P[10]<<8|P[11],thumbWidth:P[12],thumbHeight:P[13],thumbData:P.subarray(14,14+3*P[12]*P[13])}),65518===k&&65===P[0]&&100===P[1]&&111===P[2]&&98===P[3]&&101===P[4]&&0===P[5]&&(h={version:P[6],flags0:P[7]<<8|P[8],flags1:P[9]<<8|P[10],transformCode:P[11]});break;case 65499:for(var g=r()+l-2;l<g;){var y=e[l++],D=new Int32Array(64);if(y>>4){if(y>>4!=1)throw"DQT: invalid table spec";for(w=0;w<64;w++)D[o[w]]=r()}else for(w=0;w<64;w++)D[o[w]]=e[l++];u[15&y]=D}break;case 65472:case 65473:case 65474:if(t)throw"Only single frame JPEGs supported";r(),(t={}).extended=65473===k,t.progressive=65474===k,t.precision=e[l++],t.scanLines=r(),t.samplesPerLine=r(),t.components=[],t.componentIds={};var L,x=e[l++],T=0,A=0;for(J=0;J<x;J++){L=e[l];var U=e[l+1]>>4,I=15&e[l+1];T<U&&(T=U),A<I&&(A=I);var q=e[l+2];C=t.components.push({h:U,v:I,quantizationTable:u[q],quantizationTableId:q,bitConversion:255/((1<<t.precision)-1)}),t.componentIds[L]=C-1,l+=3}t.maxH=T,t.maxV=A,n(t);break;case 65476:var G=r();for(J=2;J<G;){var M=e[l++],z=new Uint8Array(16),H=0;for(w=0;w<16;w++,l++)H+=z[w]=e[l];var R=new Uint8Array(H);for(w=0;w<H;w++,l++)R[w]=e[l];J+=17+H,(M>>4?v:d)[15&M]=b(z,R)}break;case 65501:r(),s=r();break;case 65498:r();var V=e[l++],Y=[];for(J=0;J<V;J++){var B=t.componentIds[e[l++]];K=t.components[B];var O=e[l++];K.huffmanTableDC=d[O>>4],K.huffmanTableAC=v[15&O],Y.push(K)}var X=e[l++],j=e[l++],E=e[l++],S=m(e,l,t,Y,s,X,j,E>>4,15&E);l+=S;break;case 65535:255!==e[l]&&l--;break;default:if(255==e[l-3]&&e[l-2]>=192&&e[l-2]<=254){l-=3;break}throw"unknown JPEG marker "+k.toString(16)}k=r()}switch(this.width=t.samplesPerLine,this.height=t.scanLines,this.jfif=f,this.adobe=h,this.components=[],t.components.length){case 1:this.colorspace=a.Grayscale;break;case 3:this.adobe?this.colorspace=a.AdobeRGB:this.colorspace=a.RGB;break;case 4:this.colorspace=a.CYMK;break;default:this.colorspace=a.Unknown}for(var J=0;J<t.components.length;J++){var K;(K=t.components[J]).quantizationTable||null===K.quantizationTableId||(K.quantizationTable=u[K.quantizationTableId]),this.components.push({output:p(0,K),scaleX:K.h/t.maxH,scaleY:K.v/t.maxV,blocksPerLine:K.blocksPerLine,blocksPerColumn:K.blocksPerColumn,bitConversion:K.bitConversion})}}getData16(e,r){if(1!==this.components.length)throw"Unsupported color mode";var n,a,o,t,s,i,c=this.width/e,l=this.height/r,f=0,h=this.components.length,u=new Uint16Array(e*r*h),b=new Uint16Array((this.components[0].blocksPerLine<<3)*this.components[0].blocksPerColumn*8);for(i=0;i<h;i++){for(var m,d,p,k=(n=this.components[i]).blocksPerLine,w=n.blocksPerColumn,C=k<<3,P=0,g=0;g<w;g++)for(var y=g<<3,D=0;D<k;D++){var L=v(n,g,D),x=(f=0,D<<3);for(m=0;m<8;m++)for(P=(y+m)*C,d=0;d<8;d++)b[P+x+d]=n.output[L+f++]}for(a=n.scaleX*c,o=n.scaleY*l,f=i,s=0;s<r;s++)for(t=0;t<e;t++)p=(0|s*o)*C+(0|t*a),u[f]=b[p],f+=h}return u}getData(e,r){var n,a,o,t,s,i,c,l,f,h,u,b,m,d,p,w=this.width/e,C=this.height/r,P=0,g=this.components.length,y=e*r*g,D=new Uint8Array(y),L=new Uint8Array((this.components[0].blocksPerLine<<3)*this.components[0].blocksPerColumn*8);for(i=0;i<g;i++){for(var x,T,A,U=(n=this.components[i]).blocksPerLine,I=n.blocksPerColumn,q=U<<3,G=0,M=0;M<I;M++)for(var z=M<<3,H=0;H<U;H++){var R=v(n,M,H),V=(P=0,H<<3);for(x=0;x<8;x++)for(G=(z+x)*q,T=0;T<8;T++)L[G+V+T]=n.output[R+P++]*n.bitConversion}for(a=n.scaleX*w,o=n.scaleY*C,P=i,s=0;s<r;s++)for(t=0;t<e;t++)A=(0|s*o)*q+(0|t*a),D[P]=L[A],P+=g}switch(g){case 1:case 2:break;case 3:if(p=!0,this.adobe&&this.adobe.transformCode?p=!0:void 0!==this.colorTransform&&(p=!!this.colorTransform),p)for(i=0;i<y;i+=g)c=D[i],l=D[i+1],b=k(c-179.456+1.402*(f=D[i+2])),m=k(c+135.459-.344*l-.714*f),d=k(c-226.816+1.772*l),D[i]=b,D[i+1]=m,D[i+2]=d;break;case 4:if(!this.adobe)throw"Unsupported color mode (4 components)";if(p=!1,this.adobe&&this.adobe.transformCode?p=!0:void 0!==this.colorTransform&&(p=!!this.colorTransform),p)for(i=0;i<y;i+=g)c=D[i],l=D[i+1],h=k(434.456-c-1.402*(f=D[i+2])),u=k(119.541-c+.344*l+.714*f),c=k(481.816-c-1.772*l),D[i]=h,D[i+1]=u,D[i+2]=c;break;default:throw"Unsupported color mode"}return D}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunklarvitar=self.webpackChunklarvitar||[]).push([[232],{5232:(t,e,r)=>{r.r(e),r.d(e,{ComponentSpec:()=>i,DataStream:()=>a,Decoder:()=>w,FrameHeader:()=>o,HuffmanTable:()=>l,QuantizationTable:()=>f,ScanComponent:()=>d,ScanHeader:()=>p,Utils:()=>h});var s=Object.defineProperty,i={hSamp:0,quantTableSel:0,vSamp:0},a=class{buffer;index;constructor(t,e,r){this.buffer=new Uint8Array(t,e,r),this.index=0}get16(){const t=(this.buffer[this.index]<<8)+this.buffer[this.index+1];return this.index+=2,t}get8(){const t=this.buffer[this.index];return this.index+=1,t}},o=class{dimX=0;dimY=0;numComp=0;precision=0;components=[];read(t){let e,r=0;const s=t.get16();r+=2,this.precision=t.get8(),r+=1,this.dimY=t.get16(),r+=2,this.dimX=t.get16(),r+=2,this.numComp=t.get8(),r+=1;for(let a=1;a<=this.numComp;a+=1){if(r>s)throw new Error("ERROR: frame format error");const a=t.get8();if(r+=1,r>=s)throw new Error("ERROR: frame format error [c>=Lf]");e=t.get8(),r+=1,this.components[a]||(this.components[a]={...i}),this.components[a].hSamp=e>>4,this.components[a].vSamp=15&e,this.components[a].quantTableSel=t.get8(),r+=1}if(r!==s)throw new Error("ERROR: frame format error [Lf!=count]");return 1}},h={};((t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})})(h,{crc32:()=>m,crcTable:()=>u,createArray:()=>n,makeCRCTable:()=>c});var n=(...t)=>{if(t.length>1){const e=t[0],r=t.slice(1),s=[];for(let t=0;t<e;t++)s[t]=n(...r);return s}return Array(t[0]).fill(void 0)},c=function(){let t;const e=[];for(let r=0;r<256;r++){t=r;for(let e=0;e<8;e++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e},u=c(),m=function(t){const e=new Uint8Array(t);let r=-1;for(let t=0;t<e.length;t++)r=r>>>8^u[255&(r^e[t])];return~r>>>0},l=class t{static MSB=2147483648;l;th;v;tc;constructor(){this.l=n(4,2,16),this.th=[0,0,0,0],this.v=n(4,2,16,200),this.tc=[[0,0],[0,0],[0,0],[0,0]]}read(t,e){let r,s,i,a,o,h=0;const n=t.get16();for(h+=2;h<n;){if(r=t.get8(),h+=1,s=15&r,s>3)throw new Error("ERROR: Huffman table ID > 3");if(i=r>>4,i>2)throw new Error("ERROR: Huffman table [Table class > 2 ]");for(this.th[s]=1,this.tc[s][i]=1,a=0;a<16;a+=1)this.l[s][i][a]=t.get8(),h+=1;for(a=0;a<16;a+=1)for(o=0;o<this.l[s][i][a];o+=1){if(h>n)throw new Error("ERROR: Huffman table format error [count>Lh]");this.v[s][i][a][o]=t.get8(),h+=1}}if(h!==n)throw new Error("ERROR: Huffman table format error [count!=Lf]");for(a=0;a<4;a+=1)for(o=0;o<2;o+=1)0!==this.tc[a][o]&&this.buildHuffTable(e[a][o],this.l[a][o],this.v[a][o]);return 1}buildHuffTable(e,r,s){let i,a,o,h,n;for(a=0,o=0;o<8;o+=1)for(h=0;h<r[o];h+=1)for(n=0;n<256>>o+1;n+=1)e[a]=s[o][h]|o+1<<8,a+=1;for(o=1;a<256;o+=1,a+=1)e[a]=o|t.MSB;for(i=1,a=0,o=8;o<16;o+=1)for(h=0;h<r[o];h+=1){for(n=0;n<256>>o-7;n+=1)e[256*i+a]=s[o][h]|o+1<<8,a+=1;if(a>=256){if(a>256)throw new Error("ERROR: Huffman table error(1)!");a=0,i+=1}}}},f=class t{precision=[];tq=[0,0,0,0];quantTables=n(4,64);static enhanceQuantizationTable=function(t,e){for(let r=0;r<8;r+=1)t[e[0+r]]*=90,t[e[32+r]]*=90,t[e[16+r]]*=118,t[e[48+r]]*=49,t[e[40+r]]*=71,t[e[8+r]]*=126,t[e[56+r]]*=25,t[e[24+r]]*=106;for(let r=0;r<8;r+=1)t[e[0+8*r]]*=90,t[e[4+8*r]]*=90,t[e[2+8*r]]*=118,t[e[6+8*r]]*=49,t[e[5+8*r]]*=71,t[e[1+8*r]]*=126,t[e[7+8*r]]*=25,t[e[3+8*r]]*=106;for(let e=0;e<64;e+=1)t[e]>>=6};read(e,r){let s,i,a,o=0;const h=e.get16();for(o+=2;o<h;){if(s=e.get8(),o+=1,i=15&s,i>3)throw new Error("ERROR: Quantization table ID > 3");if(this.precision[i]=s>>4,0===this.precision[i])this.precision[i]=8;else{if(1!==this.precision[i])throw new Error("ERROR: Quantization table precision error");this.precision[i]=16}if(this.tq[i]=1,8===this.precision[i]){for(a=0;a<64;a+=1){if(o>h)throw new Error("ERROR: Quantization table format error");this.quantTables[i][a]=e.get8(),o+=1}t.enhanceQuantizationTable(this.quantTables[i],r)}else{for(a=0;a<64;a+=1){if(o>h)throw new Error("ERROR: Quantization table format error");this.quantTables[i][a]=e.get16(),o+=2}t.enhanceQuantizationTable(this.quantTables[i],r)}}if(o!==h)throw new Error("ERROR: Quantization table error [count!=Lq]");return 1}},d={acTabSel:0,dcTabSel:0,scanCompSel:0},p=class{ah=0;al=0;numComp=0;selection=0;spectralEnd=0;components=[];read(t){let e,r,s=0;const i=t.get16();for(s+=2,this.numComp=t.get8(),s+=1,e=0;e<this.numComp;e+=1){if(this.components[e]={...d},s>i)throw new Error("ERROR: scan header format error");this.components[e].scanCompSel=t.get8(),s+=1,r=t.get8(),s+=1,this.components[e].dcTabSel=r>>4,this.components[e].acTabSel=15&r}if(this.selection=t.get8(),s+=1,this.spectralEnd=t.get8(),s+=1,r=t.get8(),this.ah=r>>4,this.al=15&r,s+=1,s!==i)throw new Error("ERROR: scan header format error [count!=Ns]");return 1}},g=function(){const t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]}(),w=class t{static IDCT_P=[0,5,40,16,45,2,7,42,21,56,8,61,18,47,1,4,41,23,58,13,32,24,37,10,63,17,44,3,6,43,20,57,15,34,29,48,53,26,39,9,60,19,46,22,59,12,33,31,50,55,25,36,11,62,14,35,28,49,52,27,38,30,51,54];static TABLE=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63];static MAX_HUFFMAN_SUBTREE=50;static MSB=2147483648;static RESTART_MARKER_BEGIN=65488;static RESTART_MARKER_END=65495;buffer=null;stream=null;frame=new o;huffTable=new l;quantTable=new f;scan=new p;DU=n(10,4,64);HuffTab=n(4,2,12800);IDCT_Source=[];nBlock=[];acTab=n(10,1);dcTab=n(10,1);qTab=n(10,1);marker=0;markerIndex=0;numComp=0;restartInterval=0;selection=0;xDim=0;yDim=0;xLoc=0;yLoc=0;outputData=null;restarting=!1;mask=0;numBytes=0;precision=void 0;components=[];getter=null;setter=null;output=null;selector=null;constructor(t,e){this.buffer=t??null,this.numBytes=e??0}decompress(t,e,r){return this.decode(t,e,r).buffer}decode(e,r,s,i){let o=0;const h=[];let n,c;const u=[],m=[];let l;e&&(this.buffer=e),void 0!==i&&(this.numBytes=i),this.stream=new a(this.buffer,r,s),this.buffer=null,this.xLoc=0,this.yLoc=0;let f=this.stream.get16();if(65496!==f)throw new Error("Not a JPEG file");for(f=this.stream.get16();f>>4!=4092||65476===f;){switch(f){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,t.TABLE);break;case 65501:this.restartInterval=this.readNumber()??0;break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(f>>8!=255)throw new Error("ERROR: format throw new IOException! (decode)")}f=this.stream.get16()}if(f<65472||f>65479)throw new Error("ERROR: could not handle arithmetic code!");this.frame.read(this.stream),f=this.stream.get16();do{for(;65498!==f;){switch(f){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,t.TABLE);break;case 65501:this.restartInterval=this.readNumber()??0;break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(f>>8!=255)throw new Error("ERROR: format throw new IOException! (Parser.decode)")}f=this.stream.get16()}switch(this.precision=this.frame.precision,this.components=this.frame.components,this.numBytes||(this.numBytes=Math.round(Math.ceil(this.precision/8))),1===this.numBytes?this.mask=255:this.mask=65535,this.scan.read(this.stream),this.numComp=this.scan.numComp,this.selection=this.scan.selection,1===this.numBytes&&3===this.numComp?(this.getter=this.getValueRGB,this.setter=this.setValueRGB,this.output=this.outputRGB):(this.getter=this.getValue8,this.setter=this.setValue8,this.output=this.outputSingle),this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1}for(n=0;n<this.numComp;n+=1)c=this.scan.components[n].scanCompSel,this.qTab[n]=this.quantTable.quantTables[this.components[c].quantTableSel],this.nBlock[n]=this.components[c].vSamp*this.components[c].hSamp,this.dcTab[n]=this.HuffTab[this.scan.components[n].dcTabSel][0],this.acTab[n]=this.HuffTab[this.scan.components[n].acTabSel][1];for(this.xDim=this.frame.dimX,this.yDim=this.frame.dimY,1===this.numBytes?this.outputData=new Uint8Array(new ArrayBuffer(this.xDim*this.yDim*this.numBytes*this.numComp)):this.outputData=new Uint16Array(new ArrayBuffer(this.xDim*this.yDim*this.numBytes*this.numComp)),o+=1;;){for(u[0]=0,m[0]=0,n=0;n<10;n+=1)h[n]=1<<this.precision-1;if(0===this.restartInterval){for(f=this.decodeUnit(h,u,m);0===f&&this.xLoc<this.xDim&&this.yLoc<this.yDim;)this.output(h),f=this.decodeUnit(h,u,m);break}for(l=0;l<this.restartInterval&&(this.restarting=0===l,f=this.decodeUnit(h,u,m),this.output(h),0===f);l+=1);if(0===f&&(0!==this.markerIndex?(f=65280|this.marker,this.markerIndex=0):f=this.stream.get16()),!(f>=t.RESTART_MARKER_BEGIN&&f<=t.RESTART_MARKER_END))break}65500===f&&1===o&&(this.readNumber(),f=this.stream.get16())}while(65497!==f&&this.xLoc<this.xDim&&this.yLoc<this.yDim&&0===o);return this.outputData}decodeUnit(t,e,r){return 1===this.numComp?this.decodeSingle(t,e,r):3===this.numComp?this.decodeRGB(t,e,r):-1}select1(t){return this.getPreviousX(t)}select2(t){return this.getPreviousY(t)}select3(t){return this.getPreviousXY(t)}select4(t){return this.getPreviousX(t)+this.getPreviousY(t)-this.getPreviousXY(t)}select5(t){return this.getPreviousX(t)+(this.getPreviousY(t)-this.getPreviousXY(t)>>1)}select6(t){return this.getPreviousY(t)+(this.getPreviousX(t)-this.getPreviousXY(t)>>1)}select7(t){return(this.getPreviousX(t)+this.getPreviousY(t))/2}decodeRGB(e,r,s){if(null===this.selector)throw new Error("decode hasn't run yet");let i,a,o,h,n,c,u;for(e[0]=this.selector(0),e[1]=this.selector(1),e[2]=this.selector(2),h=0;h<this.numComp;h+=1)for(o=this.qTab[h],i=this.acTab[h],a=this.dcTab[h],n=0;n<this.nBlock[h];n+=1){for(c=0;c<this.IDCT_Source.length;c+=1)this.IDCT_Source[c]=0;let n=this.getHuffmanValue(a,r,s);if(n>=65280)return n;for(e[h]=this.IDCT_Source[0]=e[h]+this.getn(s,n,r,s),this.IDCT_Source[0]*=o[0],u=1;u<64;u+=1){if(n=this.getHuffmanValue(i,r,s),n>=65280)return n;if(u+=n>>4,15&n)this.IDCT_Source[t.IDCT_P[u]]=this.getn(s,15&n,r,s)*o[u];else if(!(n>>4))break}}return 0}decodeSingle(e,r,s){if(null===this.selector)throw new Error("decode hasn't run yet");let i,a,o,h;for(this.restarting?(this.restarting=!1,e[0]=1<<this.frame.precision-1):e[0]=this.selector(),a=0;a<this.nBlock[0];a+=1){if(i=this.getHuffmanValue(this.dcTab[0],r,s),i>=65280)return i;if(o=this.getn(e,i,r,s),h=o>>8,h>=t.RESTART_MARKER_BEGIN&&h<=t.RESTART_MARKER_END)return h;e[0]+=o}return 0}getHuffmanValue(e,r,s){let i,a;if(!this.stream)throw new Error("stream not initialized");if(s[0]<8?(r[0]<<=8,a=this.stream.get8(),255===a&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),r[0]|=a):s[0]-=8,i=e[r[0]>>s[0]],i&t.MSB){if(0!==this.markerIndex)return this.markerIndex=0,65280|this.marker;r[0]&=65535>>16-s[0],r[0]<<=8,a=this.stream.get8(),255===a&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),r[0]|=a,i=e[256*(255&i)+(r[0]>>s[0])],s[0]+=8}if(s[0]+=8-(i>>8),s[0]<0)throw new Error("index="+s[0]+" temp="+r[0]+" code="+i+" in HuffmanValue()");return s[0]<this.markerIndex?(this.markerIndex=0,65280|this.marker):(r[0]&=65535>>16-s[0],255&i)}getn(t,e,r,s){let i,a;if(null===this.stream)throw new Error("stream not initialized");if(0===e)return 0;if(16===e)return t[0]>=0?-32768:32768;if(s[0]-=e,s[0]>=0){if(s[0]<this.markerIndex&&!this.isLastPixel())return this.markerIndex=0,(65280|this.marker)<<8;i=r[0]>>s[0],r[0]&=65535>>16-s[0]}else{if(r[0]<<=8,a=this.stream.get8(),255===a&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),r[0]|=a,s[0]+=8,s[0]<0){if(0!==this.markerIndex)return this.markerIndex=0,(65280|this.marker)<<8;r[0]<<=8,a=this.stream.get8(),255===a&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),r[0]|=a,s[0]+=8}if(s[0]<0)throw new Error("index="+s[0]+" in getn()");if(s[0]<this.markerIndex)return this.markerIndex=0,(65280|this.marker)<<8;i=r[0]>>s[0],r[0]&=65535>>16-s[0]}return i<1<<e-1&&(i+=1+(-1<<e)),i}getPreviousX(t=0){if(null===this.getter)throw new Error("decode hasn't run yet");return this.xLoc>0?this.getter(this.yLoc*this.xDim+this.xLoc-1,t):this.yLoc>0?this.getPreviousY(t):1<<this.frame.precision-1}getPreviousXY(t=0){if(null===this.getter)throw new Error("decode hasn't run yet");return this.xLoc>0&&this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc-1,t):this.getPreviousY(t)}getPreviousY(t=0){if(null===this.getter)throw new Error("decode hasn't run yet");return this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc,t):this.getPreviousX(t)}isLastPixel(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1}outputSingle(t){if(null===this.setter)throw new Error("decode hasn't run yet");this.xLoc<this.xDim&&this.yLoc<this.yDim&&(this.setter(this.yLoc*this.xDim+this.xLoc,this.mask&t[0]),this.xLoc+=1,this.xLoc>=this.xDim&&(this.yLoc+=1,this.xLoc=0))}outputRGB(t){if(null===this.setter)throw new Error("decode hasn't run yet");const e=this.yLoc*this.xDim+this.xLoc;this.xLoc<this.xDim&&this.yLoc<this.yDim&&(this.setter(e,t[0],0),this.setter(e,t[1],1),this.setter(e,t[2],2),this.xLoc+=1,this.xLoc>=this.xDim&&(this.yLoc+=1,this.xLoc=0))}setValue8(t,e){if(!this.outputData)throw new Error("output data not ready");this.outputData[t]=g?e:(255&e)<<8|e>>8&255}getValue8(t){if(null===this.outputData)throw new Error("output data not ready");if(g)return this.outputData[t];{const e=this.outputData[t];return(255&e)<<8|e>>8&255}}setValueRGB(t,e,r=0){null!==this.outputData&&(this.outputData[3*t+r]=e)}getValueRGB(t,e){if(null===this.outputData)throw new Error("output data not ready");return this.outputData[3*t+e]}readApp(){if(null===this.stream)return null;let t=0;const e=this.stream.get16();for(t+=2;t<e;)this.stream.get8(),t+=1;return e}readComment(){if(null===this.stream)return null;let t="",e=0;const r=this.stream.get16();for(e+=2;e<r;)t+=this.stream.get8(),e+=1;return t}readNumber(){if(null===this.stream)return null;if(4!==this.stream.get16())throw new Error("ERROR: Define number format throw new IOException [Ld!=4]");return this.stream.get16()}}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 43.larvitar.js.LICENSE.txt */
2
+ (self.webpackChunklarvitar=self.webpackChunklarvitar||[]).push([[43],{9114:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="object"==typeof window,p="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(d){var y=r(6221),v=r(4457);h=p?v.dirname(h)+"/":"//",a=(t,e)=>(t=N(t)?new URL(t):v.normalize(t),y.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=N(t)?new URL(t):v.normalize(t),y.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof q))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(f||p)&&(p?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},p&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});i.print||console.log.bind(console);var g,m,w=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&z("no native wasm support detected");var b,_,T,P,C,$,A,S,x,E=!1,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e){return t?function(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&k)return k.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(T,t,e):""}function O(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,T,e,r)}function F(t){b=t,i.HEAP8=_=new Int8Array(t),i.HEAP16=P=new Int16Array(t),i.HEAP32=$=new Int32Array(t),i.HEAPU8=T=new Uint8Array(t),i.HEAPU16=C=new Uint16Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=S=new Float32Array(t),i.HEAPF64=x=new Float64Array(t)}i.INITIAL_MEMORY;var D,j,W,I=[],U=[],L=[],H=0,M=null,B=null;function z(t){i.onAbort&&i.onAbort(t),w(t="Aborted("+t+")"),E=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function V(t){return t.startsWith("data:application/octet-stream;base64,")}function N(t){return t.startsWith("file://")}function G(t){try{if(t==j&&g)return new Uint8Array(g);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}function q(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function J(t){for(;t.length>0;)t.shift()(i)}function X(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){$[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,_[this.ptr+12|0]=t},this.get_caught=function(){return 0!=_[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,_[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=_[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=$[this.ptr>>2];$[this.ptr>>2]=t+1},this.release_ref=function(){var t=$[this.ptr>>2];return $[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(ge(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}V(j="charlswasm_decode.wasm")||(W=j,j=i.locateFile?i.locateFile(W,h):h+W);var Y={};function K(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function Z(t){return this.fromWireType($[t>>2])}var Q={},tt={},et={};function rt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function nt(t,e){return t=rt(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ot(t,e){var r=nt(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var it=void 0;function at(t){throw new it(t)}function st(t,e,r){function n(e){var n=r(e);n.length!==t.length&&at("Mismatched type converter count");for(var o=0;o<t.length;++o)dt(t[o],n[o])}t.forEach((function(t){et[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{tt.hasOwnProperty(t)?o[e]=tt[t]:(i.push(t),Q.hasOwnProperty(t)||(Q[t]=[]),Q[t].push((()=>{o[e]=tt[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ut(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var ct=void 0;function lt(t){for(var e="",r=t;T[r];)e+=ct[T[r++]];return e}var ft=void 0;function pt(t){throw new ft(t)}function dt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||pt('type "'+n+'" must have a positive integer typeid pointer'),tt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;pt("Cannot register type '"+n+"' twice")}if(tt[t]=e,delete et[t],Q.hasOwnProperty(t)){var o=Q[t];delete Q[t],o.forEach((t=>t()))}}function ht(t){pt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var yt=!1;function vt(t){}function gt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function mt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=mt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var wt={};var bt=[];function _t(){for(;bt.length;){var t=bt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Tt=void 0;var Pt={};function Ct(t,e){return e.ptrType&&e.ptr||at("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&at("Both smartPtrType and smartPtr must be specified"),e.count={value:1},$t(Object.create(t,{$$:{value:e}}))}function $t(t){return"undefined"==typeof FinalizationRegistry?($t=t=>t,t):(yt=new FinalizationRegistry((t=>{gt(t.$$)})),$t=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};yt.register(t,r,t)}return t},vt=t=>yt.unregister(t),$t(t))}function At(){}function St(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||pt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function xt(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&pt("Cannot register public name '"+t+"' twice"),St(i,t,t),i.hasOwnProperty(r)&&pt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}function Et(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function kt(t,e,r){for(;e!==r;)e.upcast||pt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Rt(t,e){if(null===e)return this.isReference&&pt("null is not a valid "+this.name),0;e.$$||pt('Cannot pass "'+Jt(e)+'" as a '+this.name),e.$$.ptr||pt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return kt(e.$$.ptr,r,this.registeredClass)}function Ot(t,e){var r;if(null===e)return this.isReference&&pt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||pt('Cannot pass "'+Jt(e)+'" as a '+this.name),e.$$.ptr||pt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&pt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=kt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&pt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:pt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,qt.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:pt("Unsupporting sharing policy")}return r}function Ft(t,e){if(null===e)return this.isReference&&pt("null is not a valid "+this.name),0;e.$$||pt('Cannot pass "'+Jt(e)+'" as a '+this.name),e.$$.ptr||pt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&pt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return kt(e.$$.ptr,r,this.registeredClass)}function Dt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Ot:n?(this.toWireType=Rt,this.destructorFunction=null):(this.toWireType=Ft,this.destructorFunction=null)}function jt(t,e,r){i.hasOwnProperty(t)||at("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}var Wt=[];function It(t){var e=Wt[t];return e||(t>=Wt.length&&(Wt.length=t+1),Wt[t]=e=D.get(t)),e}function Ut(t,e){var r,n,o,a=(t=lt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),function(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):It(e).apply(null,r)}(r,n,o)}):It(e);return"function"!=typeof a&&pt("unknown function pointer with signature "+t+": "+e),a}var Lt=void 0;function Ht(t){var e=pe(t),r=lt(e);return de(e),r}function Mt(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||tt[e]||(et[e]?et[e].forEach(t):(r.push(e),n[e]=!0))})),new Lt(t+": "+r.map(Ht).join([", "]))}function Bt(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function zt(t,e,r,n,o){var i=e.length;i<2&&pt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+rt(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[pt,n,o,K,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=nt(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var Vt=[],Nt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Gt(t){t>4&&0==--Nt[t].refcount&&(Nt[t]=void 0,Vt.push(t))}var qt={toValue:t=>(t||pt("Cannot use deleted val. handle = "+t),Nt[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=Vt.length?Vt.pop():Nt.length;return Nt[e]={refcount:1,value:t},e}}};function Jt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Xt(t,e){switch(e){case 2:return function(t){return this.fromWireType(S[t>>2])};case 3:return function(t){return this.fromWireType(x[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Yt(t,e,r){switch(e){case 0:return r?function(t){return _[t]}:function(t){return T[t]};case 1:return r?function(t){return P[t>>1]}:function(t){return C[t>>1]};case 2:return r?function(t){return $[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var Kt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Zt(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&C[n];)++n;if((r=n<<1)-t>32&&Kt)return Kt.decode(T.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=P[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Qt(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);P[e>>1]=a,e+=2}return P[e>>1]=0,e-n}function te(t){return 2*t.length}function ee(t,e){for(var r=0,n="";!(r>=e/4);){var o=$[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function re(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),$[e>>2]=a,(e+=4)+4>o)break}return $[e>>2]=0,e-n}function ne(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var oe={};function ie(){return"object"==typeof globalThis?globalThis:Function("return this")()}function ae(t,e){var r=tt[t];return void 0===r&&pt(e+" has unknown type "+Ht(t)),r}var se={};function ue(t){try{return m.grow(t-b.byteLength+65535>>>16),F(m.buffer),1}catch(t){}}it=i.InternalError=ot(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);ct=t}(),ft=i.BindingError=ot(Error,"BindingError"),At.prototype.isAliasOf=function(t){if(!(this instanceof At))return!1;if(!(t instanceof At))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o},At.prototype.clone=function(){if(this.$$.ptr||ht(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=$t(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},At.prototype.delete=function(){this.$$.ptr||ht(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pt("Object already scheduled for deletion"),vt(this),gt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},At.prototype.isDeleted=function(){return!this.$$.ptr},At.prototype.deleteLater=function(){return this.$$.ptr||ht(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pt("Object already scheduled for deletion"),bt.push(this),1===bt.length&&Tt&&Tt(_t),this.$$.deleteScheduled=!0,this},i.getInheritedInstanceCount=function(){return Object.keys(Pt).length},i.getLiveInheritedInstances=function(){var t=[];for(var e in Pt)Pt.hasOwnProperty(e)&&t.push(Pt[e]);return t},i.flushPendingDeletes=_t,i.setDelayFunction=function(t){Tt=t,bt.length&&Tt&&Tt(_t)},Dt.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Dt.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Dt.prototype.argPackAdvance=8,Dt.prototype.readValueFromPointer=Z,Dt.prototype.deleteObject=function(t){null!==t&&t.delete()},Dt.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&pt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Pt[e]}(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Ct(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ct(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=wt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=mt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ct(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Ct(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},Lt=i.UnboundTypeError=ot(Error,"UnboundTypeError"),i.count_emval_handles=function(){for(var t=0,e=5;e<Nt.length;++e)void 0!==Nt[e]&&++t;return t},i.get_first_emval=function(){for(var t=5;t<Nt.length;++t)if(void 0!==Nt[t])return Nt[t];return null};var ce,le={h:function(t,e,r){throw new X(t).init(e,r),t},q:function(t){var e=Y[t];delete Y[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;st([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),K(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:n}]}))},r:function(t,e,r,n,o){},w:function(t,e,r,n,o){var i=ut(r);dt(t,{name:e=lt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=_;else if(2===r)n=P;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=$}return this.fromWireType(n[t>>i])},destructorFunction:null})},p:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=lt(l),i=Ut(o,i),s&&(s=Ut(a,s)),c&&(c=Ut(u,c)),p=Ut(f,p);var d=rt(l);xt(d,(function(){Mt("Cannot construct "+l+" due to unbound types",[n])})),st([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:At.prototype;var a=nt(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new ft("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new ft(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new ft("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new Et(l,a,u,p,r,i,s,c),h=new Dt(l,f,!0,!1,!1),y=new Dt(l+"*",f,!1,!1,!1),v=new Dt(l+" const*",f,!1,!0,!1);return wt[t]={pointerType:y,constPointerType:v},jt(d,a),[h,y,v]}))},o:function(t,e,r,n,o,i){e>0||z(undefined);var a=Bt(e,r);o=Ut(n,o),st([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new ft("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{Mt("Cannot construct "+t.name+" due to unbound types",a)},st([],a,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=zt(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=Bt(r,n);e=lt(e),i=Ut(o,i),st([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){Mt("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(St(c,e,n),c[e].overloadTable[r-2]=o),st([],u,(function(o){var s=zt(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},v:function(t,e){dt(t,{name:e=lt(e),fromWireType:function(t){var e=qt.toValue(t);return Gt(t),e},toWireType:function(t,e){return qt.toHandle(e)},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:null})},k:function(t,e,r){var n=ut(r);dt(t,{name:e=lt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:Xt(e,n),destructorFunction:null})},e:function(t,e,r,n,o,i){var a=Bt(e,r);t=lt(t),o=Ut(n,o),xt(t,(function(){Mt("Cannot call "+t+" due to unbound types",a)}),e-1),st([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return jt(t,zt(t,n,null,o,i),e-1),[]}))},b:function(t,e,r,n,o){e=lt(e),-1===o&&(o=4294967295);var i=ut(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");dt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:Yt(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}dt(t,{name:r=lt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},j:function(t,e){var r="std::string"===(e=lt(e));dt(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==T[s]){var u=R(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(T[o+a]);e=c.join("")}return de(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||pt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=fe(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)O(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(de(a),pt("String has UTF-16 code units that do not fit in 8 bits")),T[a+s]=u}else for(s=0;s<n;++s)T[a+s]=e[s];return null!==t&&t.push(de,i),i},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:function(t){de(t)}})},g:function(t,e,r){var n,o,i,a,s;r=lt(r),2===e?(n=Zt,o=Qt,a=te,i=()=>C,s=1):4===e&&(n=ee,o=re,a=ne,i=()=>A,s=2),dt(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return de(t),r},toWireType:function(t,n){"string"!=typeof n&&pt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=fe(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(de,u),u},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:function(t){de(t)}})},u:function(t,e,r,n,o,i){Y[t]={name:lt(e),rawConstructor:Ut(r,n),rawDestructor:Ut(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){Y[t].fields.push({fieldName:lt(e),getterReturnType:r,getter:Ut(n,o),getterContext:i,setterArgumentType:a,setter:Ut(s,u),setterContext:c})},x:function(t,e){dt(t,{isVoid:!0,name:e=lt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},i:Gt,m:function(t){return 0===t?qt.toHandle(ie()):(t=void 0===(r=oe[e=t])?lt(e):r,qt.toHandle(ie()[t]));var e,r},l:function(t){t>4&&(Nt[t].refcount+=1)},y:function(t,e,r,n){t=qt.toValue(t);var o=se[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(ae,i,qt.toHandle,(()=>A))}(e),se[e]=o),o(t,r,n)},n:function(t,e){var r=(t=ae(t,"_emval_take_value")).readValueFromPointer(e);return qt.toHandle(r)},f:function(){z("")},t:function(t,e,r){T.copyWithin(t,e,e+r)},s:function(t){var e,r=T.length,n=2147483648;if((t>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,t+100663296),ue(Math.min(n,(e=Math.max(t,i))+(65536-e%65536)%65536)))return!0}return!1}},fe=(function(){var t={a:le};function e(t,e){var r,n=t.exports;i.asm=n,F((m=i.asm.z).buffer),D=i.asm.C,r=i.asm.A,U.unshift(r),function(){if(H--,i.monitorRunDependencies&&i.monitorRunDependencies(H),0==H&&(null!==M&&(clearInterval(M),M=null),B)){var t=B;B=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!g&&(f||p)){if("function"==typeof fetch&&!N(j))return fetch(j,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+j+"'";return t.arrayBuffer()})).catch((function(){return G(j)}));if(s)return new Promise((function(t,e){s(j,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return G(j)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){w("failed to asynchronously prepare wasm: "+t),z(t)}))}if(H++,i.monitorRunDependencies&&i.monitorRunDependencies(H),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){w("Module.instantiateWasm callback failed with error: "+t),o(t)}(g||"function"!=typeof WebAssembly.instantiateStreaming||V(j)||N(j)||d||"function"!=typeof fetch?n(r):fetch(j,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return w("wasm streaming compile failed: "+t),w("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.A).apply(null,arguments)},i._malloc=function(){return(fe=i._malloc=i.asm.B).apply(null,arguments)}),pe=i.___getTypeName=function(){return(pe=i.___getTypeName=i.asm.D).apply(null,arguments)},de=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.E).apply(null,arguments)},i._free=function(){return(de=i._free=i.asm.F).apply(null,arguments)}),he=i.stackSave=function(){return(he=i.stackSave=i.asm.G).apply(null,arguments)},ye=i.stackRestore=function(){return(ye=i.stackRestore=i.asm.H).apply(null,arguments)},ve=i.stackAlloc=function(){return(ve=i.stackAlloc=i.asm.I).apply(null,arguments)},ge=i.___cxa_is_pointer_type=function(){return(ge=i.___cxa_is_pointer_type=i.asm.J).apply(null,arguments)};function me(t){function r(){ce||(ce=!0,i.calledRun=!0,E||(J(U),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),L.unshift(t);var t;J(L)}()))}t=t||l,H>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),I.unshift(t);var t;J(I)}(),H>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);O(t,e=ve(r),r)}return e},array:t=>{var e=ve(t.length);return function(t,e){_.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=he()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return function(t){return 0!==c&&ye(c),function(t){return"string"===e?R(t):"boolean"===e?Boolean(t):t}(t)}(p)},B=function t(){ce||me(),ce||(B=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return me(),t.ready});t.exports=o},1427:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p=(t,e)=>{throw e},d="object"==typeof window,h="function"==typeof importScripts,y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";if(y){var g=r(4150),m=r(1966);v=h?m.dirname(v)+"/":"//",a=(t,e)=>(t=K(t)?new URL(t):m.normalize(t),g.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=K(t)?new URL(t):m.normalize(t),g.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Q))throw t})),process.on("unhandledRejection",(function(t){throw t})),p=(t,e)=>{if(z())throw process.exitCode=t,e;var r;(r=e)instanceof Q||_("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}}else(d||h)&&(h?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),n&&(v=n),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},h&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var w,b=i.print||console.log.bind(console),_=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&(p=i.quit),i.wasmBinary&&(w=i.wasmBinary);var T,P=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&X("no native wasm support detected");var C,$,A,S,x,E,k,R,O,F=!1,D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function j(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&D)return D.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function W(t,e){return t?j(A,t,e):""}function I(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,A,e,r)}function U(t){C=t,i.HEAP8=$=new Int8Array(t),i.HEAP16=S=new Int16Array(t),i.HEAP32=E=new Int32Array(t),i.HEAPU8=A=new Uint8Array(t),i.HEAPU16=x=new Uint16Array(t),i.HEAPU32=k=new Uint32Array(t),i.HEAPF32=R=new Float32Array(t),i.HEAPF64=O=new Float64Array(t)}i.INITIAL_MEMORY;var L,H=[],M=[],B=[];function z(){return P}var V,N,G=0,q=null,J=null;function X(t){i.onAbort&&i.onAbort(t),_(t="Aborted("+t+")"),F=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function Y(t){return t.startsWith("data:application/octet-stream;base64,")}function K(t){return t.startsWith("file://")}function Z(t){try{if(t==V&&w)return new Uint8Array(w);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){X(t)}}function Q(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function tt(t){for(;t.length>0;)t.shift()(i)}function et(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){k[this.ptr+4>>2]=t},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(t){k[this.ptr+8>>2]=t},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_refcount=function(t){E[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,$[this.ptr+12|0]=t},this.get_caught=function(){return 0!=$[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,$[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=$[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=E[this.ptr>>2];E[this.ptr>>2]=t+1},this.release_ref=function(){var t=E[this.ptr>>2];return E[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){k[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ae(this.get_type()))return k[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}Y(V="libjpegturbowasm_decode.wasm")||(N=V,V=i.locateFile?i.locateFile(N,v):v+N);var rt={};function nt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function ot(t){return this.fromWireType(E[t>>2])}var it={},at={},st={};function ut(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function ct(t,e){return t=ut(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function lt(t,e){var r=ct(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ft=void 0;function pt(t){throw new ft(t)}function dt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&pt("Mismatched type converter count");for(var o=0;o<t.length;++o)wt(t[o],n[o])}t.forEach((function(t){st[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{at.hasOwnProperty(t)?o[e]=at[t]:(i.push(t),it.hasOwnProperty(t)||(it[t]=[]),it[t].push((()=>{o[e]=at[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ht(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var yt=void 0;function vt(t){for(var e="",r=t;A[r];)e+=yt[A[r++]];return e}var gt=void 0;function mt(t){throw new gt(t)}function wt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||mt('type "'+n+'" must have a positive integer typeid pointer'),at.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;mt("Cannot register type '"+n+"' twice")}if(at[t]=e,delete st[t],it.hasOwnProperty(t)){var o=it[t];delete it[t],o.forEach((t=>t()))}}function bt(t){mt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var _t=!1;function Tt(t){}function Pt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Ct(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ct(t,e,r.baseClass);return null===n?null:r.downcast(n)}var $t={};var At=[];function St(){for(;At.length;){var t=At.pop();t.$$.deleteScheduled=!1,t.delete()}}var xt=void 0;var Et={};function kt(t,e){return e.ptrType&&e.ptr||pt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Rt(Object.create(t,{$$:{value:e}}))}function Rt(t){return"undefined"==typeof FinalizationRegistry?(Rt=t=>t,t):(_t=new FinalizationRegistry((t=>{Pt(t.$$)})),Rt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};_t.register(t,r,t)}return t},Tt=t=>_t.unregister(t),Rt(t))}function Ot(){}function Ft(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||mt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Dt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function jt(t,e,r){for(;e!==r;)e.upcast||mt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Wt(t,e){if(null===e)return this.isReference&&mt("null is not a valid "+this.name),0;e.$$||mt('Cannot pass "'+Zt(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return jt(e.$$.ptr,r,this.registeredClass)}function It(t,e){var r;if(null===e)return this.isReference&&mt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||mt('Cannot pass "'+Zt(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&mt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&mt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:mt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,Kt.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:mt("Unsupporting sharing policy")}return r}function Ut(t,e){if(null===e)return this.isReference&&mt("null is not a valid "+this.name),0;e.$$||mt('Cannot pass "'+Zt(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&mt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return jt(e.$$.ptr,r,this.registeredClass)}function Lt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=It:n?(this.toWireType=Wt,this.destructorFunction=null):(this.toWireType=Ut,this.destructorFunction=null)}var Ht=[];function Mt(t){var e=Ht[t];return e||(t>=Ht.length&&(Ht.length=t+1),Ht[t]=e=L.get(t)),e}function Bt(t,e){var r,n,o,a=(t=vt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),function(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):Mt(e).apply(null,r)}(r,n,o)}):Mt(e);return"function"!=typeof a&&mt("unknown function pointer with signature "+t+": "+e),a}var zt=void 0;function Vt(t){var e=_e(t),r=vt(e);return be(e),r}function Nt(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||at[e]||(st[e]?st[e].forEach(t):(r.push(e),n[e]=!0))})),new zt(t+": "+r.map(Vt).join([", "]))}function Gt(t,e){for(var r=[],n=0;n<t;n++)r.push(k[e+4*n>>2]);return r}function qt(t,e,r,n,o){var i=e.length;i<2&&mt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ut(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[mt,n,o,nt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ct(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var Jt=[],Xt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Yt(t){t>4&&0==--Xt[t].refcount&&(Xt[t]=void 0,Jt.push(t))}var Kt={toValue:t=>(t||mt("Cannot use deleted val. handle = "+t),Xt[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=Jt.length?Jt.pop():Xt.length;return Xt[e]={refcount:1,value:t},e}}};function Zt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Qt(t,e){switch(e){case 2:return function(t){return this.fromWireType(R[t>>2])};case 3:return function(t){return this.fromWireType(O[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function te(t,e,r){switch(e){case 0:return r?function(t){return $[t]}:function(t){return A[t]};case 1:return r?function(t){return S[t>>1]}:function(t){return x[t>>1]};case 2:return r?function(t){return E[t>>2]}:function(t){return k[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ee="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function re(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&x[n];)++n;if((r=n<<1)-t>32&&ee)return ee.decode(A.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=S[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ne(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);S[e>>1]=a,e+=2}return S[e>>1]=0,e-n}function oe(t){return 2*t.length}function ie(t,e){for(var r=0,n="";!(r>=e/4);){var o=E[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function ae(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),E[e>>2]=a,(e+=4)+4>o)break}return E[e>>2]=0,e-n}function se(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var ue={};function ce(){return"object"==typeof globalThis?globalThis:Function("return this")()}function le(t,e){var r=at[t];return void 0===r&&mt(e+" has unknown type "+Vt(t)),r}var fe={};function pe(t){try{return T.grow(t-C.byteLength+65535>>>16),U(T.buffer),1}catch(t){}}var de={};function he(){if(!he.strings){var t={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",_:f||"./this.program"};for(var e in de)void 0===de[e]?delete t[e]:t[e]=de[e];var r=[];for(var e in t)r.push(e+"="+t[e]);he.strings=r}return he.strings}var ye=[null,[],[]];function ve(t,e){var r=ye[t];0===e||10===e?((1===t?b:_)(j(r,0)),r.length=0):r.push(e)}ft=i.InternalError=lt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);yt=t}(),gt=i.BindingError=lt(Error,"BindingError"),Ot.prototype.isAliasOf=function(t){if(!(this instanceof Ot))return!1;if(!(t instanceof Ot))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o},Ot.prototype.clone=function(){if(this.$$.ptr||bt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Rt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},Ot.prototype.delete=function(){this.$$.ptr||bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&mt("Object already scheduled for deletion"),Tt(this),Pt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Ot.prototype.isDeleted=function(){return!this.$$.ptr},Ot.prototype.deleteLater=function(){return this.$$.ptr||bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&mt("Object already scheduled for deletion"),At.push(this),1===At.length&&xt&&xt(St),this.$$.deleteScheduled=!0,this},i.getInheritedInstanceCount=function(){return Object.keys(Et).length},i.getLiveInheritedInstances=function(){var t=[];for(var e in Et)Et.hasOwnProperty(e)&&t.push(Et[e]);return t},i.flushPendingDeletes=St,i.setDelayFunction=function(t){xt=t,At.length&&xt&&xt(St)},Lt.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Lt.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Lt.prototype.argPackAdvance=8,Lt.prototype.readValueFromPointer=ot,Lt.prototype.deleteObject=function(t){null!==t&&t.delete()},Lt.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&mt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Et[e]}(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?kt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):kt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=$t[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Ct(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?kt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):kt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},zt=i.UnboundTypeError=lt(Error,"UnboundTypeError"),i.count_emval_handles=function(){for(var t=0,e=5;e<Xt.length;++e)void 0!==Xt[e]&&++t;return t},i.get_first_emval=function(){for(var t=5;t<Xt.length;++t)if(void 0!==Xt[t])return Xt[t];return null};var ge,me={g:function(t,e,r){throw new et(t).init(e,r),t},A:function(t){var e=rt[t];delete rt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;dt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),nt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:n}]}))},w:function(t,e,r,n,o){},F:function(t,e,r,n,o){var i=ht(r);wt(t,{name:e=vt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=$;else if(2===r)n=S;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=E}return this.fromWireType(n[t>>i])},destructorFunction:null})},u:function(t,e,r,n,o,a,s,u,c,l,f,p,d){f=vt(f),a=Bt(o,a),u&&(u=Bt(s,u)),l&&(l=Bt(c,l)),d=Bt(p,d);var h=ut(f);!function(t,e,r){i.hasOwnProperty(t)?(mt("Cannot register public name '"+t+"' twice"),Ft(i,t,t),i.hasOwnProperty(r)&&mt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[void 0]=e):i[t]=e}(h,(function(){Nt("Cannot construct "+f+" due to unbound types",[n])})),dt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Ot.prototype;var s=ct(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new gt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new gt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new gt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Dt(f,s,c,d,r,a,u,l),y=new Lt(f,p,!0,!1,!1),v=new Lt(f+"*",p,!1,!1,!1),g=new Lt(f+" const*",p,!1,!0,!1);return $t[t]={pointerType:v,constPointerType:g},function(t,e,r){i.hasOwnProperty(t)||pt("Replacing nonexistant public symbol"),i[t].overloadTable,i[t]=e,i[t].argCount=r}(h,s),[y,v,g]}))},t:function(t,e,r,n,o,i){e>0||X(undefined);var a=Gt(e,r);o=Bt(n,o),dt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new gt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{Nt("Cannot construct "+t.name+" due to unbound types",a)},dt([],a,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=qt(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=Gt(r,n);e=vt(e),i=Bt(o,i),dt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){Nt("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Ft(c,e,n),c[e].overloadTable[r-2]=o),dt([],u,(function(o){var s=qt(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},E:function(t,e){wt(t,{name:e=vt(e),fromWireType:function(t){var e=Kt.toValue(t);return Yt(t),e},toWireType:function(t,e){return Kt.toHandle(e)},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:null})},m:function(t,e,r){var n=ht(r);wt(t,{name:e=vt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:Qt(e,n),destructorFunction:null})},b:function(t,e,r,n,o){e=vt(e),-1===o&&(o=4294967295);var i=ht(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");wt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:te(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=k,r=e[t>>=2],o=e[t+1];return new n(C,o,r)}wt(t,{name:r=vt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},l:function(t,e){var r="std::string"===(e=vt(e));wt(t,{name:e,fromWireType:function(t){var e,n=k[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==A[s]){var u=W(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(A[o+a]);e=c.join("")}return be(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||mt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=we(4+n+1),a=i+4;if(k[i>>2]=n,r&&o)I(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(be(a),mt("String has UTF-16 code units that do not fit in 8 bits")),A[a+s]=u}else for(s=0;s<n;++s)A[a+s]=e[s];return null!==t&&t.push(be,i),i},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){be(t)}})},h:function(t,e,r){var n,o,i,a,s;r=vt(r),2===e?(n=re,o=ne,a=oe,i=()=>x,s=1):4===e&&(n=ie,o=ae,a=se,i=()=>k,s=2),wt(t,{name:r,fromWireType:function(t){for(var r,o=k[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return be(t),r},toWireType:function(t,n){"string"!=typeof n&&mt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=we(4+i+e);return k[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(be,u),u},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){be(t)}})},J:function(t,e,r,n,o,i){rt[t]={name:vt(e),rawConstructor:Bt(r,n),rawDestructor:Bt(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){rt[t].fields.push({fieldName:vt(e),getterReturnType:r,getter:Bt(n,o),getterContext:i,setterArgumentType:a,setter:Bt(s,u),setterContext:c})},G:function(t,e){wt(t,{isVoid:!0,name:e=vt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},x:function(){throw 1/0},i:Yt,r:function(t){return 0===t?Kt.toHandle(ce()):(t=void 0===(r=ue[e=t])?vt(e):r,Kt.toHandle(ce()[t]));var e,r},p:function(t){t>4&&(Xt[t].refcount+=1)},q:function(t,e,r,n){t=Kt.toValue(t);var o=fe[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(le,i,Kt.toHandle,(()=>k))}(e),fe[e]=o),o(t,r,n)},s:function(t,e){var r=(t=le(t,"_emval_take_value")).readValueFromPointer(e);return Kt.toHandle(r)},j:function(){X("")},D:function(t,e,r){A.copyWithin(t,e,e+r)},y:function(t){var e,r=A.length,n=2147483648;if((t>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,t+100663296),pe(Math.min(n,(e=Math.max(t,i))+(65536-e%65536)%65536)))return!0}return!1},z:function(t,e){var r=0;return he().forEach((function(n,o){var i=e+r;k[t+4*o>>2]=i,function(t,e){for(var r=0;r<t.length;++r)$[0|e++]=t.charCodeAt(r);$[0|e]=0}(n,i),r+=n.length+1})),0},B:function(t,e){var r=he();k[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),k[e>>2]=n,0},I:function(t,e){var r;r=t,z()||(i.onExit&&i.onExit(r),F=!0),p(r,new Q(r))},C:function(t){return 52},v:function(t,e,r,n,o){return 70},k:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=k[e>>2],s=k[e+4>>2];e+=8;for(var u=0;u<s;u++)ve(t,A[a+u]);o+=s}return k[n>>2]=o,0},o:function(t,e){var r=Pe();try{return Mt(t)(e)}catch(t){if(Ce(r),t!==t+0)throw t;Te(1,0)}},n:function(t,e,r){var n=Pe();try{return Mt(t)(e,r)}catch(t){if(Ce(n),t!==t+0)throw t;Te(1,0)}},H:function(t,e,r,n){var o=Pe();try{return Mt(t)(e,r,n)}catch(t){if(Ce(o),t!==t+0)throw t;Te(1,0)}},f:function(t,e){var r=Pe();try{Mt(t)(e)}catch(t){if(Ce(r),t!==t+0)throw t;Te(1,0)}},e:function(t,e,r,n){var o=Pe();try{Mt(t)(e,r,n)}catch(t){if(Ce(o),t!==t+0)throw t;Te(1,0)}}},we=(function(){var t={a:me};function e(t,e){var r,n=t.exports;i.asm=n,U((T=i.asm.K).buffer),L=i.asm.M,r=i.asm.L,M.unshift(r),function(){if(G--,i.monitorRunDependencies&&i.monitorRunDependencies(G),0==G&&(null!==q&&(clearInterval(q),q=null),J)){var t=J;J=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!w&&(d||h)){if("function"==typeof fetch&&!K(V))return fetch(V,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+V+"'";return t.arrayBuffer()})).catch((function(){return Z(V)}));if(s)return new Promise((function(t,e){s(V,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Z(V)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){_("failed to asynchronously prepare wasm: "+t),X(t)}))}if(G++,i.monitorRunDependencies&&i.monitorRunDependencies(G),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){_("Module.instantiateWasm callback failed with error: "+t),o(t)}(w||"function"!=typeof WebAssembly.instantiateStreaming||Y(V)||K(V)||y||"function"!=typeof fetch?n(r):fetch(V,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return _("wasm streaming compile failed: "+t),_("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.L).apply(null,arguments)},i._malloc=function(){return(we=i._malloc=i.asm.N).apply(null,arguments)}),be=i._free=function(){return(be=i._free=i.asm.O).apply(null,arguments)},_e=i.___getTypeName=function(){return(_e=i.___getTypeName=i.asm.P).apply(null,arguments)},Te=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.Q).apply(null,arguments)},i._setThrew=function(){return(Te=i._setThrew=i.asm.R).apply(null,arguments)}),Pe=i.stackSave=function(){return(Pe=i.stackSave=i.asm.S).apply(null,arguments)},Ce=i.stackRestore=function(){return(Ce=i.stackRestore=i.asm.T).apply(null,arguments)},$e=i.stackAlloc=function(){return($e=i.stackAlloc=i.asm.U).apply(null,arguments)},Ae=i.___cxa_is_pointer_type=function(){return(Ae=i.___cxa_is_pointer_type=i.asm.V).apply(null,arguments)};function Se(t){function r(){ge||(ge=!0,i.calledRun=!0,F||(tt(M),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),B.unshift(t);var t;tt(B)}()))}t=t||l,G>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),H.unshift(t);var t;tt(H)}(),G>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.W).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);I(t,e=$e(r),r)}return e},array:t=>{var e=$e(t.length);return function(t,e){$.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Pe()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return function(t){return 0!==c&&Ce(c),function(t){return"string"===e?W(t):"boolean"===e?Boolean(t):t}(t)}(p)},J=function t(){ge||Se(),ge||(J=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Se(),t.ready});t.exports=o},74:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y="";if(h){var v=r(9696),g=r(2544);y=d?g.dirname(y)+"/":"//",a=(t,e)=>(t=J(t)?new URL(t):g.normalize(t),v.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=J(t)?new URL(t):g.normalize(t),v.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Y))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(p||d)&&(d?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),n&&(y=n),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},d&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var m,w,b=i.print||console.log.bind(console),_=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(m=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&G("no native wasm support detected");var T,P,C,$,A,S,x,E,k,R=!1,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&O)return O.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(t,e){return t?F(C,t,e):""}function j(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,C,e,r)}function W(t){T=t,i.HEAP8=P=new Int8Array(t),i.HEAP16=$=new Int16Array(t),i.HEAP32=S=new Int32Array(t),i.HEAPU8=C=new Uint8Array(t),i.HEAPU16=A=new Uint16Array(t),i.HEAPU32=x=new Uint32Array(t),i.HEAPF32=E=new Float32Array(t),i.HEAPF64=k=new Float64Array(t)}i.INITIAL_MEMORY;var I,U,L,H=[],M=[],B=[],z=0,V=null,N=null;function G(t){i.onAbort&&i.onAbort(t),_(t="Aborted("+t+")"),R=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function q(t){return t.startsWith("data:application/octet-stream;base64,")}function J(t){return t.startsWith("file://")}function X(t){try{if(t==U&&m)return new Uint8Array(m);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){G(t)}}function Y(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function K(t){for(;t.length>0;)t.shift()(i)}function Z(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){x[this.ptr+4>>2]=t},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(t){x[this.ptr+8>>2]=t},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(t){S[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,P[this.ptr+12|0]=t},this.get_caught=function(){return 0!=P[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,P[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=P[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=S[this.ptr>>2];S[this.ptr>>2]=t+1},this.release_ref=function(){var t=S[this.ptr>>2];return S[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){x[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Te(this.get_type()))return x[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}q(U="openjpegwasm_decode.wasm")||(L=U,U=i.locateFile?i.locateFile(L,y):y+L);var Q={};function tt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function et(t){return this.fromWireType(S[t>>2])}var rt={},nt={},ot={};function it(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function at(t,e){return t=it(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function st(t,e){var r=at(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ut=void 0;function ct(t){throw new ut(t)}function lt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ct("Mismatched type converter count");for(var o=0;o<t.length;++o)vt(t[o],n[o])}t.forEach((function(t){ot[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{nt.hasOwnProperty(t)?o[e]=nt[t]:(i.push(t),rt.hasOwnProperty(t)||(rt[t]=[]),rt[t].push((()=>{o[e]=nt[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ft(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var pt=void 0;function dt(t){for(var e="",r=t;C[r];)e+=pt[C[r++]];return e}var ht=void 0;function yt(t){throw new ht(t)}function vt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||yt('type "'+n+'" must have a positive integer typeid pointer'),nt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;yt("Cannot register type '"+n+"' twice")}if(nt[t]=e,delete ot[t],rt.hasOwnProperty(t)){var o=rt[t];delete rt[t],o.forEach((t=>t()))}}function gt(t){yt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var mt=!1;function wt(t){}function bt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function _t(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=_t(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Tt={};var Pt=[];function Ct(){for(;Pt.length;){var t=Pt.pop();t.$$.deleteScheduled=!1,t.delete()}}var $t=void 0;var At={};function St(t,e){return e.ptrType&&e.ptr||ct("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ct("Both smartPtrType and smartPtr must be specified"),e.count={value:1},xt(Object.create(t,{$$:{value:e}}))}function xt(t){return"undefined"==typeof FinalizationRegistry?(xt=t=>t,t):(mt=new FinalizationRegistry((t=>{bt(t.$$)})),xt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};mt.register(t,r,t)}return t},wt=t=>mt.unregister(t),xt(t))}function Et(){}function kt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||yt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Rt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Ot(t,e,r){for(;e!==r;)e.upcast||yt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Ft(t,e){if(null===e)return this.isReference&&yt("null is not a valid "+this.name),0;e.$$||yt('Cannot pass "'+Xt(e)+'" as a '+this.name),e.$$.ptr||yt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Ot(e.$$.ptr,r,this.registeredClass)}function Dt(t,e){var r;if(null===e)return this.isReference&&yt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||yt('Cannot pass "'+Xt(e)+'" as a '+this.name),e.$$.ptr||yt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&yt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Ot(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&yt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:yt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,Jt.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:yt("Unsupporting sharing policy")}return r}function jt(t,e){if(null===e)return this.isReference&&yt("null is not a valid "+this.name),0;e.$$||yt('Cannot pass "'+Xt(e)+'" as a '+this.name),e.$$.ptr||yt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&yt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Ot(e.$$.ptr,r,this.registeredClass)}function Wt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Dt:n?(this.toWireType=Ft,this.destructorFunction=null):(this.toWireType=jt,this.destructorFunction=null)}var It=[];function Ut(t){var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=I.get(t)),e}function Lt(t,e){var r,n,o,a=(t=dt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),function(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):Ut(e).apply(null,r)}(r,n,o)}):Ut(e);return"function"!=typeof a&&yt("unknown function pointer with signature "+t+": "+e),a}var Ht=void 0;function Mt(t){var e=me(t),r=dt(e);return ge(e),r}function Bt(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||nt[e]||(ot[e]?ot[e].forEach(t):(r.push(e),n[e]=!0))})),new Ht(t+": "+r.map(Mt).join([", "]))}function zt(t,e){for(var r=[],n=0;n<t;n++)r.push(x[e+4*n>>2]);return r}function Vt(t,e,r,n,o){var i=e.length;i<2&&yt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+it(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[yt,n,o,tt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=at(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var Nt=[],Gt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function qt(t){t>4&&0==--Gt[t].refcount&&(Gt[t]=void 0,Nt.push(t))}var Jt={toValue:t=>(t||yt("Cannot use deleted val. handle = "+t),Gt[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=Nt.length?Nt.pop():Gt.length;return Gt[e]={refcount:1,value:t},e}}};function Xt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Yt(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Kt(t,e,r){switch(e){case 0:return r?function(t){return P[t]}:function(t){return C[t]};case 1:return r?function(t){return $[t>>1]}:function(t){return A[t>>1]};case 2:return r?function(t){return S[t>>2]}:function(t){return x[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var Zt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Qt(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&A[n];)++n;if((r=n<<1)-t>32&&Zt)return Zt.decode(C.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=$[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function te(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);$[e>>1]=a,e+=2}return $[e>>1]=0,e-n}function ee(t){return 2*t.length}function re(t,e){for(var r=0,n="";!(r>=e/4);){var o=S[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function ne(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),S[e>>2]=a,(e+=4)+4>o)break}return S[e>>2]=0,e-n}function oe(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var ie={};function ae(){return"object"==typeof globalThis?globalThis:Function("return this")()}function se(t,e){var r=nt[t];return void 0===r&&yt(e+" has unknown type "+Mt(t)),r}var ue={};function ce(t){try{return w.grow(t-T.byteLength+65535>>>16),W(w.buffer),1}catch(t){}}var le={};function fe(){if(!fe.strings){var t={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",_:f||"./this.program"};for(var e in le)void 0===le[e]?delete t[e]:t[e]=le[e];var r=[];for(var e in t)r.push(e+"="+t[e]);fe.strings=r}return fe.strings}var pe=[null,[],[]];function de(t,e){var r=pe[t];0===e||10===e?((1===t?b:_)(F(r,0)),r.length=0):r.push(e)}ut=i.InternalError=st(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pt=t}(),ht=i.BindingError=st(Error,"BindingError"),Et.prototype.isAliasOf=function(t){if(!(this instanceof Et))return!1;if(!(t instanceof Et))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o},Et.prototype.clone=function(){if(this.$$.ptr||gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=xt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},Et.prototype.delete=function(){this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&yt("Object already scheduled for deletion"),wt(this),bt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Et.prototype.isDeleted=function(){return!this.$$.ptr},Et.prototype.deleteLater=function(){return this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&yt("Object already scheduled for deletion"),Pt.push(this),1===Pt.length&&$t&&$t(Ct),this.$$.deleteScheduled=!0,this},i.getInheritedInstanceCount=function(){return Object.keys(At).length},i.getLiveInheritedInstances=function(){var t=[];for(var e in At)At.hasOwnProperty(e)&&t.push(At[e]);return t},i.flushPendingDeletes=Ct,i.setDelayFunction=function(t){$t=t,Pt.length&&$t&&$t(Ct)},Wt.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Wt.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Wt.prototype.argPackAdvance=8,Wt.prototype.readValueFromPointer=et,Wt.prototype.deleteObject=function(t){null!==t&&t.delete()},Wt.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&yt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),At[e]}(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=Tt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=_t(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?St(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):St(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},Ht=i.UnboundTypeError=st(Error,"UnboundTypeError"),i.count_emval_handles=function(){for(var t=0,e=5;e<Gt.length;++e)void 0!==Gt[e]&&++t;return t},i.get_first_emval=function(){for(var t=5;t<Gt.length;++t)if(void 0!==Gt[t])return Gt[t];return null};var he,ye={D:function(t,e,r){throw new Z(t).init(e,r),t},e:function(t){var e=Q[t];delete Q[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;lt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),tt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:et,destructorFunction:n}]}))},t:function(t,e,r,n,o){},B:function(t,e,r,n,o){var i=ft(r);vt(t,{name:e=dt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=P;else if(2===r)n=$;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=S}return this.fromWireType(n[t>>i])},destructorFunction:null})},r:function(t,e,r,n,o,a,s,u,c,l,f,p,d){f=dt(f),a=Lt(o,a),u&&(u=Lt(s,u)),l&&(l=Lt(c,l)),d=Lt(p,d);var h=it(f);!function(t,e,r){i.hasOwnProperty(t)?(yt("Cannot register public name '"+t+"' twice"),kt(i,t,t),i.hasOwnProperty(r)&&yt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[void 0]=e):i[t]=e}(h,(function(){Bt("Cannot construct "+f+" due to unbound types",[n])})),lt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Et.prototype;var s=at(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new ht("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new ht(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new ht("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Rt(f,s,c,d,r,a,u,l),y=new Wt(f,p,!0,!1,!1),v=new Wt(f+"*",p,!1,!1,!1),g=new Wt(f+" const*",p,!1,!0,!1);return Tt[t]={pointerType:v,constPointerType:g},function(t,e,r){i.hasOwnProperty(t)||ct("Replacing nonexistant public symbol"),i[t].overloadTable,i[t]=e,i[t].argCount=r}(h,s),[y,v,g]}))},q:function(t,e,r,n,o,i){e>0||G(undefined);var a=zt(e,r);o=Lt(n,o),lt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new ht("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{Bt("Cannot construct "+t.name+" due to unbound types",a)},lt([],a,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=Vt(r,n,null,o,i),[]})),[]}))},b:function(t,e,r,n,o,i,a,s){var u=zt(r,n);e=dt(e),i=Lt(o,i),lt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){Bt("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(kt(c,e,n),c[e].overloadTable[r-2]=o),lt([],u,(function(o){var s=Vt(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},A:function(t,e){vt(t,{name:e=dt(e),fromWireType:function(t){var e=Jt.toValue(t);return qt(t),e},toWireType:function(t,e){return Jt.toHandle(e)},argPackAdvance:8,readValueFromPointer:et,destructorFunction:null})},l:function(t,e,r){var n=ft(r);vt(t,{name:e=dt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:Yt(e,n),destructorFunction:null})},d:function(t,e,r,n,o){e=dt(e),-1===o&&(o=4294967295);var i=ft(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");vt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:Kt(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=x,r=e[t>>=2],o=e[t+1];return new n(T,o,r)}vt(t,{name:r=dt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},k:function(t,e){var r="std::string"===(e=dt(e));vt(t,{name:e,fromWireType:function(t){var e,n=x[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=D(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(C[o+a]);e=c.join("")}return ge(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||yt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=ve(4+n+1),a=i+4;if(x[i>>2]=n,r&&o)j(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(ge(a),yt("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s<n;++s)C[a+s]=e[s];return null!==t&&t.push(ge,i),i},argPackAdvance:8,readValueFromPointer:et,destructorFunction:function(t){ge(t)}})},f:function(t,e,r){var n,o,i,a,s;r=dt(r),2===e?(n=Qt,o=te,a=ee,i=()=>A,s=1):4===e&&(n=re,o=ne,a=oe,i=()=>x,s=2),vt(t,{name:r,fromWireType:function(t){for(var r,o=x[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return ge(t),r},toWireType:function(t,n){"string"!=typeof n&&yt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=ve(4+i+e);return x[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(ge,u),u},argPackAdvance:8,readValueFromPointer:et,destructorFunction:function(t){ge(t)}})},g:function(t,e,r,n,o,i){Q[t]={name:dt(e),rawConstructor:Lt(r,n),rawDestructor:Lt(o,i),fields:[]}},c:function(t,e,r,n,o,i,a,s,u,c){Q[t].fields.push({fieldName:dt(e),getterReturnType:r,getter:Lt(n,o),getterContext:i,setterArgumentType:a,setter:Lt(s,u),setterContext:c})},C:function(t,e){vt(t,{isVoid:!0,name:e=dt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},h:qt,o:function(t){return 0===t?Jt.toHandle(ae()):(t=void 0===(r=ie[e=t])?dt(e):r,Jt.toHandle(ae()[t]));var e,r},m:function(t){t>4&&(Gt[t].refcount+=1)},n:function(t,e,r,n){t=Jt.toValue(t);var o=ue[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(se,i,Jt.toHandle,(()=>x))}(e),ue[e]=o),o(t,r,n)},p:function(t,e){var r=(t=se(t,"_emval_take_value")).readValueFromPointer(e);return Jt.toHandle(r)},i:function(){G("")},v:function(){return 2147483648},z:function(t,e,r){C.copyWithin(t,e,e+r)},u:function(t){var e,r=C.length,n=2147483648;if((t>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,t+100663296),ce(Math.min(n,(e=Math.max(t,i))+(65536-e%65536)%65536)))return!0}return!1},w:function(t,e){var r=0;return fe().forEach((function(n,o){var i=e+r;x[t+4*o>>2]=i,function(t,e){for(var r=0;r<t.length;++r)P[0|e++]=t.charCodeAt(r);P[0|e]=0}(n,i),r+=n.length+1})),0},x:function(t,e){var r=fe();x[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),x[e>>2]=n,0},y:function(t){return 52},s:function(t,e,r,n,o){return 70},j:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=x[e>>2],s=x[e+4>>2];e+=8;for(var u=0;u<s;u++)de(t,C[a+u]);o+=s}return x[n>>2]=o,0}},ve=(function(){var t={a:ye};function e(t,e){var r,n=t.exports;i.asm=n,W((w=i.asm.E).buffer),I=i.asm.G,r=i.asm.F,M.unshift(r),function(){if(z--,i.monitorRunDependencies&&i.monitorRunDependencies(z),0==z&&(null!==V&&(clearInterval(V),V=null),N)){var t=N;N=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!m&&(p||d)){if("function"==typeof fetch&&!J(U))return fetch(U,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+U+"'";return t.arrayBuffer()})).catch((function(){return X(U)}));if(s)return new Promise((function(t,e){s(U,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return X(U)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){_("failed to asynchronously prepare wasm: "+t),G(t)}))}if(z++,i.monitorRunDependencies&&i.monitorRunDependencies(z),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){_("Module.instantiateWasm callback failed with error: "+t),o(t)}(m||"function"!=typeof WebAssembly.instantiateStreaming||q(U)||J(U)||h||"function"!=typeof fetch?n(r):fetch(U,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return _("wasm streaming compile failed: "+t),_("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.F).apply(null,arguments)},i._malloc=function(){return(ve=i._malloc=i.asm.H).apply(null,arguments)}),ge=i._free=function(){return(ge=i._free=i.asm.I).apply(null,arguments)},me=i.___getTypeName=function(){return(me=i.___getTypeName=i.asm.J).apply(null,arguments)},we=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.K).apply(null,arguments)},i.stackSave=function(){return(we=i.stackSave=i.asm.L).apply(null,arguments)}),be=i.stackRestore=function(){return(be=i.stackRestore=i.asm.M).apply(null,arguments)},_e=i.stackAlloc=function(){return(_e=i.stackAlloc=i.asm.N).apply(null,arguments)},Te=i.___cxa_is_pointer_type=function(){return(Te=i.___cxa_is_pointer_type=i.asm.O).apply(null,arguments)};function Pe(t){function r(){he||(he=!0,i.calledRun=!0,R||(K(M),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),B.unshift(t);var t;K(B)}()))}t=t||l,z>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),H.unshift(t);var t;K(H)}(),z>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_iji=function(){return(i.dynCall_iji=i.asm.P).apply(null,arguments)},i.dynCall_jji=function(){return(i.dynCall_jji=i.asm.Q).apply(null,arguments)},i.dynCall_iiji=function(){return(i.dynCall_iiji=i.asm.R).apply(null,arguments)},i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.S).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);j(t,e=_e(r),r)}return e},array:t=>{var e=_e(t.length);return function(t,e){P.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=we()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return function(t){return 0!==c&&be(c),function(t){return"string"===e?D(t):"boolean"===e?Boolean(t):t}(t)}(p)},N=function t(){he||Pe(),he||(N=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Pe(),t.ready});t.exports=o},3114:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(t,r){e=t,o=r}));var i,a,s,u=Object.assign({},t),c=[],l="object"==typeof window,f="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d="";if(p){var h=r(4304),y=r(1440);d=f?y.dirname(d)+"/":"//",i=(t,e)=>(t=G(t)?new URL(t):y.normalize(t),h.readFileSync(t,e?void 0:"utf8")),s=t=>{var e=i(t,!0);return e.buffer||(e=new Uint8Array(e)),e},a=(t,e,r)=>{t=G(t)?new URL(t):y.normalize(t),h.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),c=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof J))throw t})),process.on("unhandledRejection",(function(t){throw t})),t.inspect=function(){return"[Emscripten Module object]"}}else(l||f)&&(f?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},f&&(s=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),a=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var v,g,m=t.print||console.log.bind(console),w=t.printErr||console.warn.bind(console);Object.assign(t,u),u=null,t.arguments&&(c=t.arguments),t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(v=t.wasmBinary),t.noExitRuntime,"object"!=typeof WebAssembly&&V("no native wasm support detected");var b=!1;var _,T,P,C,$,A,S,x,E,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&k)return k.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function O(t,e){return t?R(P,t,e):""}function F(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,P,e,r)}function D(e){_=e,t.HEAP8=T=new Int8Array(e),t.HEAP16=C=new Int16Array(e),t.HEAP32=A=new Int32Array(e),t.HEAPU8=P=new Uint8Array(e),t.HEAPU16=$=new Uint16Array(e),t.HEAPU32=S=new Uint32Array(e),t.HEAPF32=x=new Float32Array(e),t.HEAPF64=E=new Float64Array(e)}t.INITIAL_MEMORY;var j,W,I,U=[],L=[],H=[],M=0,B=null,z=null;function V(e){t.onAbort&&t.onAbort(e),w(e="Aborted("+e+")"),b=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}function N(t){return t.startsWith("data:application/octet-stream;base64,")}function G(t){return t.startsWith("file://")}function q(t){try{if(t==W&&v)return new Uint8Array(v);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){V(t)}}function J(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function X(e){for(;e.length>0;)e.shift()(t)}N(W="openjphjs.wasm")||(I=W,W=t.locateFile?t.locateFile(I,d):d+I);var Y=[],K=0,Z=[];function Q(t){var e=Z[t];return e||(t>=Z.length&&(Z.length=t+1),Z[t]=e=j.get(t)),e}function tt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){S[this.ptr+4>>2]=t},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(t){S[this.ptr+8>>2]=t},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_refcount=function(t){A[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=A[this.ptr>>2];A[this.ptr>>2]=t+1},this.release_ref=function(){var t=A[this.ptr>>2];return A[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){S[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){if(_e(this.get_type()))return S[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var et={};function rt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function nt(t){return this.fromWireType(A[t>>2])}var ot={},it={},at={};function st(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function ut(t,e){return t=st(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ct(t,e){var r=ut(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var lt=void 0;function ft(t){throw new lt(t)}function pt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ft("Mismatched type converter count");for(var o=0;o<t.length;++o)mt(t[o],n[o])}t.forEach((function(t){at[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{it.hasOwnProperty(t)?o[e]=it[t]:(i.push(t),ot.hasOwnProperty(t)||(ot[t]=[]),ot[t].push((()=>{o[e]=it[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function dt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var ht=void 0;function yt(t){for(var e="",r=t;P[r];)e+=ht[P[r++]];return e}var vt=void 0;function gt(t){throw new vt(t)}function mt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||gt('type "'+n+'" must have a positive integer typeid pointer'),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;gt("Cannot register type '"+n+"' twice")}if(it[t]=e,delete at[t],ot.hasOwnProperty(t)){var o=ot[t];delete ot[t],o.forEach((t=>t()))}}function wt(t){gt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var bt=!1;function _t(t){}function Tt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Pt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Pt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Ct={};var $t=[];function At(){for(;$t.length;){var t=$t.pop();t.$$.deleteScheduled=!1,t.delete()}}var St=void 0;var xt={};function Et(t,e){return e.ptrType&&e.ptr||ft("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ft("Both smartPtrType and smartPtr must be specified"),e.count={value:1},kt(Object.create(t,{$$:{value:e}}))}function kt(t){return"undefined"==typeof FinalizationRegistry?(kt=t=>t,t):(bt=new FinalizationRegistry((t=>{Tt(t.$$)})),kt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};bt.register(t,r,t)}return t},_t=t=>bt.unregister(t),kt(t))}function Rt(){}function Ot(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||gt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Ft(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&gt("Cannot register public name '"+e+"' twice"),Ot(t,e,e),t.hasOwnProperty(n)&&gt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),t[e].overloadTable[n]=r):(t[e]=r,void 0!==n&&(t[e].numArguments=n))}function Dt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function jt(t,e,r){for(;e!==r;)e.upcast||gt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Wt(t,e){if(null===e)return this.isReference&&gt("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+Kt(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return jt(e.$$.ptr,r,this.registeredClass)}function It(t,e){var r;if(null===e)return this.isReference&&gt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||gt('Cannot pass "'+Kt(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&gt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&gt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:gt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,Yt.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:gt("Unsupporting sharing policy")}return r}function Ut(t,e){if(null===e)return this.isReference&&gt("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+Kt(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&gt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return jt(e.$$.ptr,r,this.registeredClass)}function Lt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=It:n?(this.toWireType=Wt,this.destructorFunction=null):(this.toWireType=Ut,this.destructorFunction=null)}function Ht(e,r,n){t.hasOwnProperty(e)||ft("Replacing nonexistant public symbol"),void 0!==t[e].overloadTable&&void 0!==n?t[e].overloadTable[n]=r:(t[e]=r,t[e].argCount=n)}function Mt(e,r){var n,o,i,a=(e=yt(e)).includes("j")?(n=e,o=r,i=[],function(){return i.length=0,Object.assign(i,arguments),function(e,r,n){return e.includes("j")?function(e,r,n){var o=t["dynCall_"+e];return n&&n.length?o.apply(null,[r].concat(n)):o.call(null,r)}(e,r,n):Q(r).apply(null,n)}(n,o,i)}):Q(r);return"function"!=typeof a&&gt("unknown function pointer with signature "+e+": "+r),a}var Bt=void 0;function zt(t){var e=ye(t),r=yt(e);return de(e),r}function Vt(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||it[e]||(at[e]?at[e].forEach(t):(r.push(e),n[e]=!0))})),new Bt(t+": "+r.map(zt).join([", "]))}function Nt(t,e){for(var r=[],n=0;n<t;n++)r.push(S[e+4*n>>2]);return r}function Gt(t,e,r,n,o){var i=e.length;i<2&&gt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+st(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[gt,n,o,rt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ut(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var qt=[],Jt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Xt(t){t>4&&0==--Jt[t].refcount&&(Jt[t]=void 0,qt.push(t))}var Yt={toValue:t=>(t||gt("Cannot use deleted val. handle = "+t),Jt[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=qt.length?qt.pop():Jt.length;return Jt[e]={refcount:1,value:t},e}}};function Kt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Zt(t,e){switch(e){case 2:return function(t){return this.fromWireType(x[t>>2])};case 3:return function(t){return this.fromWireType(E[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Qt(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return P[t]};case 1:return r?function(t){return C[t>>1]}:function(t){return $[t>>1]};case 2:return r?function(t){return A[t>>2]}:function(t){return S[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var te="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ee(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&$[n];)++n;if((r=n<<1)-t>32&&te)return te.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=C[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function re(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);C[e>>1]=a,e+=2}return C[e>>1]=0,e-n}function ne(t){return 2*t.length}function oe(t,e){for(var r=0,n="";!(r>=e/4);){var o=A[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function ie(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),A[e>>2]=a,(e+=4)+4>o)break}return A[e>>2]=0,e-n}function ae(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}function se(t){try{return g.grow(t-_.byteLength+65535>>>16),D(g.buffer),1}catch(t){}}var ue=[null,[],[]];function ce(t,e){var r=ue[t];0===e||10===e?((1===t?m:w)(R(r,0)),r.length=0):r.push(e)}lt=t.InternalError=ct(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);ht=t}(),vt=t.BindingError=ct(Error,"BindingError"),Rt.prototype.isAliasOf=function(t){if(!(this instanceof Rt))return!1;if(!(t instanceof Rt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o},Rt.prototype.clone=function(){if(this.$$.ptr||wt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=kt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},Rt.prototype.delete=function(){this.$$.ptr||wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&gt("Object already scheduled for deletion"),_t(this),Tt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Rt.prototype.isDeleted=function(){return!this.$$.ptr},Rt.prototype.deleteLater=function(){return this.$$.ptr||wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&gt("Object already scheduled for deletion"),$t.push(this),1===$t.length&&St&&St(At),this.$$.deleteScheduled=!0,this},t.getInheritedInstanceCount=function(){return Object.keys(xt).length},t.getLiveInheritedInstances=function(){var t=[];for(var e in xt)xt.hasOwnProperty(e)&&t.push(xt[e]);return t},t.flushPendingDeletes=At,t.setDelayFunction=function(t){St=t,$t.length&&St&&St(At)},Lt.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Lt.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Lt.prototype.argPackAdvance=8,Lt.prototype.readValueFromPointer=nt,Lt.prototype.deleteObject=function(t){null!==t&&t.delete()},Lt.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&gt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),xt[e]}(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=Ct[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Pt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},Bt=t.UnboundTypeError=ct(Error,"UnboundTypeError"),t.count_emval_handles=function(){for(var t=0,e=5;e<Jt.length;++e)void 0!==Jt[e]&&++t;return t},t.get_first_emval=function(){for(var t=5;t<Jt.length;++t)if(void 0!==Jt[t])return Jt[t];return null};var le,fe={__assert_fail:function(t,e,r,n){V("Assertion failed: "+O(t)+", at: "+[e?O(e):"unknown filename",r,n?O(n):"unknown function"])},__cxa_begin_catch:function(t){var e=new tt(t);return e.get_caught()||e.set_caught(!0),e.set_rethrown(!1),Y.push(e),function(t){t.add_ref()}(e),e.get_exception_ptr()},__cxa_end_catch:function(){_setThrew(0),function(t){if(t.release_ref()&&!t.get_rethrown()){var e=t.get_destructor();e&&Q(e)(t.excPtr),he(t.excPtr)}}(Y.pop()),K=0},__cxa_find_matching_catch_2:function(){var t=K;if(!t)return ve(0),0;var e=new tt(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return ve(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(be(o,r,i))return ve(o),t}return ve(r),t},__cxa_find_matching_catch_3:function(){var t=K;if(!t)return ve(0),0;var e=new tt(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return ve(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(be(o,r,i))return ve(o),t}return ve(r),t},__cxa_throw:function(t,e,r){throw new tt(t).init(e,r),K=t,t},__resumeException:function(t){throw K||(K=t),t},_embind_finalize_value_object:function(t){var e=et[t];delete et[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;pt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),rt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:n}]}))},_embind_register_bigint:function(t,e,r,n,o){},_embind_register_bool:function(t,e,r,n,o){var i=dt(r);mt(t,{name:e=yt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=C;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=A}return this.fromWireType(n[t>>i])},destructorFunction:null})},_embind_register_class:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=yt(l),i=Mt(o,i),s&&(s=Mt(a,s)),c&&(c=Mt(u,c)),p=Mt(f,p);var d=st(l);Ft(d,(function(){Vt("Cannot construct "+l+" due to unbound types",[n])})),pt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Rt.prototype;var a=ut(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new vt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new vt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new vt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new Dt(l,a,u,p,r,i,s,c),h=new Lt(l,f,!0,!1,!1),y=new Lt(l+"*",f,!1,!1,!1),v=new Lt(l+" const*",f,!1,!0,!1);return Ct[t]={pointerType:y,constPointerType:v},Ht(d,a),[h,y,v]}))},_embind_register_class_constructor:function(t,e,r,n,o,i){var a;e>0||V(a);var s=Nt(e,r);o=Mt(n,o),pt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new vt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{Vt("Cannot construct "+t.name+" due to unbound types",s)},pt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=Gt(r,n,null,o,i),[]})),[]}))},_embind_register_class_function:function(t,e,r,n,o,i,a,s){var u=Nt(r,n);e=yt(e),i=Mt(o,i),pt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){Vt("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Ot(c,e,n),c[e].overloadTable[r-2]=o),pt([],u,(function(o){var s=Gt(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},_embind_register_emval:function(t,e){mt(t,{name:e=yt(e),fromWireType:function(t){var e=Yt.toValue(t);return Xt(t),e},toWireType:function(t,e){return Yt.toHandle(e)},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:null})},_embind_register_float:function(t,e,r){var n=dt(r);mt(t,{name:e=yt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:Zt(e,n),destructorFunction:null})},_embind_register_function:function(t,e,r,n,o,i){var a=Nt(e,r);t=yt(t),o=Mt(n,o),Ft(t,(function(){Vt("Cannot call "+t+" due to unbound types",a)}),e-1),pt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Ht(t,Gt(t,n,null,o,i),e-1),[]}))},_embind_register_integer:function(t,e,r,n,o){e=yt(e),-1===o&&(o=4294967295);var i=dt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");mt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:Qt(e,i,0!==n),destructorFunction:null})},_embind_register_memory_view:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=S,r=e[t>>=2],o=e[t+1];return new n(_,o,r)}mt(t,{name:r=yt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(t,e){var r="std::string"===(e=yt(e));mt(t,{name:e,fromWireType:function(t){var e,n=S[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==P[s]){var u=O(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(P[o+a]);e=c.join("")}return de(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||gt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=pe(4+n+1),a=i+4;if(S[i>>2]=n,r&&o)F(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(de(a),gt("String has UTF-16 code units that do not fit in 8 bits")),P[a+s]=u}else for(s=0;s<n;++s)P[a+s]=e[s];return null!==t&&t.push(de,i),i},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:function(t){de(t)}})},_embind_register_std_wstring:function(t,e,r){var n,o,i,a,s;r=yt(r),2===e?(n=ee,o=re,a=ne,i=()=>$,s=1):4===e&&(n=oe,o=ie,a=ae,i=()=>S,s=2),mt(t,{name:r,fromWireType:function(t){for(var r,o=S[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return de(t),r},toWireType:function(t,n){"string"!=typeof n&&gt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=pe(4+i+e);return S[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(de,u),u},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:function(t){de(t)}})},_embind_register_value_object:function(t,e,r,n,o,i){et[t]={name:yt(e),rawConstructor:Mt(r,n),rawDestructor:Mt(o,i),fields:[]}},_embind_register_value_object_field:function(t,e,r,n,o,i,a,s,u,c){et[t].fields.push({fieldName:yt(e),getterReturnType:r,getter:Mt(n,o),getterContext:i,setterArgumentType:a,setter:Mt(s,u),setterContext:c})},_embind_register_void:function(t,e){mt(t,{isVoid:!0,name:e=yt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},_emval_decref:Xt,_emval_incref:function(t){t>4&&(Jt[t].refcount+=1)},_emval_take_value:function(t,e){var r,n;void 0===(n=it[r=t])&&gt("_emval_take_value has unknown type "+zt(r));var o=(t=n).readValueFromPointer(e);return Yt.toHandle(o)},abort:function(){V("")},emscripten_memcpy_big:function(t,e,r){P.copyWithin(t,e,e+r)},emscripten_resize_heap:function(t){var e,r=P.length,n=2147483648;if((t>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,t+100663296),se(Math.min(n,(e=Math.max(t,i))+(65536-e%65536)%65536)))return!0}return!1},fd_close:function(t){return 52},fd_seek:function(t,e,r,n,o){return 70},fd_write:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=S[e>>2],s=S[e+4>>2];e+=8;for(var u=0;u<s;u++)ce(t,P[a+u]);o+=s}return S[n>>2]=o,0},invoke_i:function(t){var e=ge();try{return Q(t)()}catch(t){if(me(e),t!==t+0)throw t;_setThrew(1,0)}},invoke_ii:function(t,e){var r=ge();try{return Q(t)(e)}catch(t){if(me(r),t!==t+0)throw t;_setThrew(1,0)}},invoke_iii:function(t,e,r){var n=ge();try{return Q(t)(e,r)}catch(t){if(me(n),t!==t+0)throw t;_setThrew(1,0)}},invoke_iiii:function(t,e,r,n){var o=ge();try{return Q(t)(e,r,n)}catch(t){if(me(o),t!==t+0)throw t;_setThrew(1,0)}},invoke_v:function(t){var e=ge();try{Q(t)()}catch(t){if(me(e),t!==t+0)throw t;_setThrew(1,0)}},invoke_vi:function(t,e){var r=ge();try{Q(t)(e)}catch(t){if(me(r),t!==t+0)throw t;_setThrew(1,0)}},invoke_viiii:function(t,e,r,n,o){var i=ge();try{Q(t)(e,r,n,o)}catch(t){if(me(i),t!==t+0)throw t;_setThrew(1,0)}},invoke_viiiiii:function(t,e,r,n,o,i,a){var s=ge();try{Q(t)(e,r,n,o,i,a)}catch(t){if(me(s),t!==t+0)throw t;_setThrew(1,0)}},llvm_eh_typeid_for:function(t){return t}},pe=(function(){var e={env:fe,wasi_snapshot_preview1:fe};function r(e,r){var n,o=e.exports;t.asm=o,D((g=t.asm.memory).buffer),j=t.asm.__indirect_function_table,n=t.asm.__wasm_call_ctors,L.unshift(n),function(){if(M--,t.monitorRunDependencies&&t.monitorRunDependencies(M),0==M&&(null!==B&&(clearInterval(B),B=null),z)){var e=z;z=null,e()}}()}function n(t){r(t.instance)}function i(t){return function(){if(!v&&(l||f)){if("function"==typeof fetch&&!G(W))return fetch(W,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+W+"'";return t.arrayBuffer()})).catch((function(){return q(W)}));if(a)return new Promise((function(t,e){a(W,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return q(W)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(t,(function(t){w("failed to asynchronously prepare wasm: "+t),V(t)}))}if(M++,t.monitorRunDependencies&&t.monitorRunDependencies(M),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(t){w("Module.instantiateWasm callback failed with error: "+t),o(t)}(v||"function"!=typeof WebAssembly.instantiateStreaming||N(W)||G(W)||p||"function"!=typeof fetch?i(n):fetch(W,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(t){return w("wasm streaming compile failed: "+t),w("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(o)}(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.__wasm_call_ctors).apply(null,arguments)},t._malloc=function(){return(pe=t._malloc=t.asm.malloc).apply(null,arguments)}),de=t._free=function(){return(de=t._free=t.asm.free).apply(null,arguments)},he=t.___cxa_free_exception=function(){return(he=t.___cxa_free_exception=t.asm.__cxa_free_exception).apply(null,arguments)},ye=t.___getTypeName=function(){return(ye=t.___getTypeName=t.asm.__getTypeName).apply(null,arguments)},ve=(t.__embind_initialize_bindings=function(){return(t.__embind_initialize_bindings=t.asm._embind_initialize_bindings).apply(null,arguments)},t.___errno_location=function(){return(t.___errno_location=t.asm.__errno_location).apply(null,arguments)},t.setTempRet0=function(){return(ve=t.setTempRet0=t.asm.setTempRet0).apply(null,arguments)}),ge=t.stackSave=function(){return(ge=t.stackSave=t.asm.stackSave).apply(null,arguments)},me=t.stackRestore=function(){return(me=t.stackRestore=t.asm.stackRestore).apply(null,arguments)},we=t.stackAlloc=function(){return(we=t.stackAlloc=t.asm.stackAlloc).apply(null,arguments)},be=t.___cxa_can_catch=function(){return(be=t.___cxa_can_catch=t.asm.__cxa_can_catch).apply(null,arguments)},_e=t.___cxa_is_pointer_type=function(){return(_e=t.___cxa_is_pointer_type=t.asm.__cxa_is_pointer_type).apply(null,arguments)};function Te(r){function n(){le||(le=!0,t.calledRun=!0,b||(X(L),e(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)e=t.postRun.shift(),H.unshift(e);var e;X(H)}()))}r=r||c,M>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),U.unshift(e);var e;X(U)}(),M>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),n()}),1)):n()))}if(t.dynCall_ji=function(){return(t.dynCall_ji=t.asm.dynCall_ji).apply(null,arguments)},t.dynCall_iiji=function(){return(t.dynCall_iiji=t.asm.dynCall_iiji).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.dynCall_jiji).apply(null,arguments)},t.ccall=function(e,r,n,o,i){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);F(t,e=we(r),r)}return e},array:t=>{var e=we(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(e){return t["_"+e]}(e),u=[],c=0;if(o)for(var l=0;l<o.length;l++){var f=a[n[l]];f?(0===c&&(c=ge()),u[l]=f(o[l])):u[l]=o[l]}var p=s.apply(null,u);return function(t){return 0!==c&&me(c),function(t){return"string"===r?O(t):"boolean"===r?Boolean(t):t}(t)}(p)},z=function t(){le||Te(),le||(z=t)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return Te(),t.ready});t.exports=o},7043:(t,e,r)=>{"use strict";var n=r(4590);var o=r(1427),i=r.n(o);const a=new URL(r(605),r.b),s={codec:void 0,decoder:void 0},u={JpegImage:void 0,decodeConfig:{}},c={jpeg:void 0,decodeConfig:{}};var l=r(9114),f=r.n(l);const p=new URL(r(9484),r.b),d={codec:void 0,decoder:void 0,decodeConfig:{}};var h=r(74),y=r.n(h);const v=new URL(r(6708),r.b),g={codec:void 0,decoder:void 0,decodeConfig:{}};var m=r(3114),w=r.n(m);const b=new URL(r(3650),r.b),_={codec:void 0,decoder:void 0,decodeConfig:{}};var T=r(7416),P=r(678),C=r(7092);const $={bilinear:function(t,e){const{rows:r,columns:n,data:o}=t,{rows:i,columns:a,data:s}=e,u=[],c=[],l=[];for(let t=0;t<a;t++){const e=t*(n-1)/(a-1);u[t]=Math.floor(e),c[t]=Math.min(u[t]+1,n-1),l[t]=e-u[t]}for(let t=0;t<i;t++){const e=t*(r-1)/(i-1),f=Math.floor(e)*n,p=Math.min(f+n,(r-1)*n),d=e-Math.floor(e),h=1-d,y=t*a;for(let t=0;t<a;t++){const e=o[f+u[t]],r=o[f+c[t]],n=o[p+u[t]],i=o[p+c[t]],a=1-l[t];s[y+t]=(e*a+r*l[t])*h+(n*a+i*l[t])*d}}return s},replicate:function(t,e){const{rows:r,columns:n,pixelData:o,samplesPerPixel:i=1}=t,{rows:a,columns:s,pixelData:u}=e,c=[];for(let t=0;t<s;t++){const e=t*(n-1)/(s-1);c[t]=Math.floor(e)*i}for(let t=0;t<a;t++){const e=t*(r-1)/(a-1),l=Math.floor(e)*n*i,f=t*s;for(let t=0;t<s;t++)for(let e=0;e<i;e++)u[f+t+e]=o[l+c[t]+e]}return u}},A={Uint8Array,Uint16Array,Int16Array,Float32Array,Uint32Array};function S(t,e,r){const n=new((0,P.A)(t,e))(r.pixelData.length);return n.set(r.pixelData,0),n}function x(t){if(!t)throw new Error("options.preScale.scalingParameters must be defined if preScale.enabled is true, and scalingParameters cannot be derived from the metadata providers.")}const E={decodeTask:({imageFrame:t,transferSyntax:e,decodeConfig:n,options:o,pixelData:l,callbackFn:h})=>async function(t,e,n,o,l,h){const m=(new Date).getTime();let E,k=null;switch(e){case"1.2.840.10008.1.2":case"1.2.840.10008.1.2.1":case"1.2.840.10008.1.2.1.99":k=async function(t,e){let r=e.buffer,n=e.byteOffset;const o=e.length;if(16===t.bitsAllocated)n%2&&(r=r.slice(n),n=0),0===t.pixelRepresentation?t.pixelData=new Uint16Array(r,n,o/2):t.pixelData=new Int16Array(r,n,o/2);else if(8===t.bitsAllocated||1===t.bitsAllocated)t.pixelData=e;else if(32===t.bitsAllocated){if(n%2&&(r=r.slice(n),n=0),t.floatPixelData||t.doubleFloatPixelData)throw new Error("Float pixel data is not supported for parsing into ImageFrame");0===t.pixelRepresentation?t.pixelData=new Uint32Array(r,n,o/4):1===t.pixelRepresentation?t.pixelData=new Int32Array(r,n,o/4):t.pixelData=new Float32Array(r,n,o/4)}return t}(t,n);break;case"1.2.840.10008.1.2.2":k=async function(t,e){if(16===t.bitsAllocated){let n=e.buffer,o=e.byteOffset;const i=e.length;o%2&&(n=n.slice(o),o=0),0===t.pixelRepresentation?t.pixelData=new Uint16Array(n,o,i/2):t.pixelData=new Int16Array(n,o,i/2);for(let e=0;e<t.pixelData.length;e++)t.pixelData[e]=(255&(r=t.pixelData[e]))<<8|r>>8&255}else 8===t.bitsAllocated&&(t.pixelData=e);var r;return t}(t,n);break;case"1.2.840.10008.1.2.5":k=async function(t,e){if(8===t.bitsAllocated)return t.planarConfiguration?function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o);let u=0;const c=i.getInt32(0,!0);for(let t=0;t<c;++t){u=t*n;let e=i.getInt32(4*(t+1),!0),o=i.getInt32(4*(t+2),!0);0===o&&(o=r.length);const l=n*c;for(;e<o;){const t=a[e++];if(t>=0&&t<=127)for(let r=0;r<t+1&&u<l;++r)s[u]=a[e++],u++;else if(t<=-1&&t>=-127){const r=a[e++];for(let e=0;e<1-t&&u<l;++e)s[u]=r,u++}}}return t.pixelData=new Uint8Array(o),t}(t,e):function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o);let u=0;const c=i.getInt32(0,!0);for(let e=0;e<c;++e){u=e;let o=i.getInt32(4*(e+1),!0),l=i.getInt32(4*(e+2),!0);0===l&&(l=r.length);const f=n*c;for(;o<l;){const e=a[o++];if(e>=0&&e<=127)for(let r=0;r<e+1&&u<f;++r)s[u]=a[o++],u+=t.samplesPerPixel;else if(e<=-1&&e>=-127){const r=a[o++];for(let n=0;n<1-e&&u<f;++n)s[u]=r,u+=t.samplesPerPixel}}}return t.pixelData=new Uint8Array(o),t}(t,e);if(16===t.bitsAllocated)return function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel*2),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o),u=i.getInt32(0,!0);for(let t=0;t<u;++t){let e=0;const o=0===t?1:0;let u=i.getInt32(4*(t+1),!0),c=i.getInt32(4*(t+2),!0);for(0===c&&(c=r.length);u<c;){const t=a[u++];if(t>=0&&t<=127)for(let r=0;r<t+1&&e<n;++r)s[2*e+o]=a[u++],e++;else if(t<=-1&&t>=-127){const r=a[u++];for(let i=0;i<1-t&&e<n;++i)s[2*e+o]=r,e++}}}return 0===t.pixelRepresentation?t.pixelData=new Uint16Array(o):t.pixelData=new Int16Array(o),t}(t,e);throw new Error("unsupported pixel format for RLE")}(t,n);break;case"1.2.840.10008.1.2.4.50":E={...t},k=async function(t,e){await function(){if(s.codec)return Promise.resolve();const t=i()({locateFile:t=>t.endsWith(".wasm")?a.toString():t});return new Promise(((e,r)=>{t.then((t=>{s.codec=t,s.decoder=new t.JPEGDecoder,e()}),r)}))}();const r=s.decoder;r.getEncodedBuffer(t.length).set(t),r.decode();const n=r.getFrameInfo(),o=r.getDecodedBuffer(),u={columns:n.width,rows:n.height,bitsPerPixel:n.bitsPerSample,signed:e.signed,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:n.componentCount},c=function(t,e){return t.isSigned?new Int8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(n,o),l={frameInfo:n};return{...e,pixelData:c,imageInfo:u,encodeOptions:l,...l,...u}}(n,E);break;case"1.2.840.10008.1.2.4.51":k=async function(t,e){if(await(u.decodeConfig=void 0,u.JpegImage?Promise.resolve():new Promise(((t,e)=>{r.e(216).then(r.bind(r,3216)).then((e=>{u.JpegImage=e.default,t()})).catch(e)}))),void 0===u.JpegImage)throw new Error("No JPEG Baseline decoder loaded");const n=new u.JpegImage;return n.parse(e),n.colorTransform=!1,8===t.bitsAllocated?(t.pixelData=n.getData(t.columns,t.rows),t):16===t.bitsAllocated?(t.pixelData=n.getData16(t.columns,t.rows),t):void 0}(t,n);break;case"1.2.840.10008.1.2.4.57":case"1.2.840.10008.1.2.4.70":k=async function(t,e){if(await(c.decodeConfig=void 0,c.jpeg?Promise.resolve():new Promise(((t,e)=>{r.e(232).then(r.bind(r,5232)).then((({Decoder:e})=>{const r=new e;c.jpeg=r,t()}),e)}))),void 0===c.jpeg)throw new Error("No JPEG Lossless decoder loaded");const n=t.bitsAllocated<=8?1:2,o=e.buffer,i=c.jpeg.decode(o,e.byteOffset,e.length,n);return 0===t.pixelRepresentation?16===t.bitsAllocated?(t.pixelData=new Uint16Array(i.buffer),t):(t.pixelData=new Uint8Array(i.buffer),t):(t.pixelData=new Int16Array(i.buffer),t)}(t,n);break;case"1.2.840.10008.1.2.4.80":case"1.2.840.10008.1.2.4.81":E={signed:1===t.pixelRepresentation,bytesPerPixel:t.bitsAllocated<=8?1:2,...t},k=async function(t,e){try{await function(){if(d.decodeConfig=void 0,d.codec)return Promise.resolve();const t=f()({locateFile:t=>t.endsWith(".wasm")?p.toString():t});return new Promise(((e,r)=>{t.then((t=>{d.codec=t,d.decoder=new t.JpegLSDecoder,e()}),r)}))}();const r=d.decoder;r.getEncodedBuffer(t.length).set(t),r.decode();const n=r.getFrameInfo(),o=r.getInterleaveMode(),i=r.getNearLossless(),a=r.getDecodedBuffer(),s={columns:n.width,rows:n.height,bitsPerPixel:n.bitsPerSample,signed:e.signed,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:n.componentCount},u=function(t,e,r){return t.bitsPerSample>8?r?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2):r?new Int8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(n,a,e.signed),c={nearLossless:i,interleaveMode:o,frameInfo:n};return{...e,pixelData:u,imageInfo:s,encodeOptions:c,...c,...s}}catch(t){throw"number"==typeof(r=t)?d.codec.getExceptionMessage(r):r}var r}(n,E);break;case"1.2.840.10008.1.2.4.90":case"1.2.840.10008.1.2.4.91":E={...t},k=async function(t,e){await function(){if(g.decodeConfig=void 0,g.codec)return Promise.resolve();const t=y()({locateFile:t=>t.endsWith(".wasm")?v.toString():t});return new Promise(((e,r)=>{t.then((t=>{g.codec=t,g.decoder=new t.J2KDecoder,e()}),r)}))}();const r=g.decoder,n=r.getEncodedBuffer(t.length);n.set(t),r.decode();const o=r.getFrameInfo(),i=r.getDecodedBuffer();new Uint8Array(i.length).set(i);const a=`x: ${r.getImageOffset().x}, y: ${r.getImageOffset().y}`,s=r.getNumDecompositions(),u=r.getNumLayers(),c=["unknown","LRCP","RLCP","RPCL","PCRL","CPRL"][r.getProgressionOrder()+1],l=r.getIsReversible(),f=`${r.getBlockDimensions().width} x ${r.getBlockDimensions().height}`,p=`${r.getTileSize().width} x ${r.getTileSize().height}`,d=`${r.getTileOffset().x}, ${r.getTileOffset().y}`,h=r.getColorSpace(),m=`${i.length.toLocaleString()} bytes`,w=`${(i.length/n.length).toFixed(2)}:1`,b={columns:o.width,rows:o.height,bitsPerPixel:o.bitsPerSample,signed:o.isSigned,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:o.componentCount},_=function(t,e){return t.bitsPerSample>8?t.isSigned?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2):t.isSigned?new Int8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(o,i),T={imageOffset:a,numDecompositions:s,numLayers:u,progessionOrder:c,reversible:l,blockDimensions:f,tileSize:p,tileOffset:d,colorTransform:h,decodedSize:m,compressionRatio:w};return{...e,pixelData:_,imageInfo:b,encodeOptions:T,...T,...b}}(n,E);break;case"3.2.840.10008.1.2.4.96":case"1.2.840.10008.1.2.4.201":case"1.2.840.10008.1.2.4.202":case"1.2.840.10008.1.2.4.203":E={...t},k=async function(t,e){await function(){if(_.decodeConfig=void 0,_.codec)return Promise.resolve();const t=w()({locateFile:t=>t.endsWith(".wasm")?b.toString():t});return new Promise(((e,r)=>{t.then((t=>{_.codec=t,_.decoder=new t.HTJ2KDecoder,e()}),r)}))}();const r=new _.codec.HTJ2KDecoder,n=r.getEncodedBuffer(t.length);n.set(t);const o=e.decodeLevel||0;r.decodeSubResolution(o);const i=r.getFrameInfo();if(e.decodeLevel>0){const{width:t,height:r}=function(t,e,r){const n={width:e,height:r};for(;t>0;)n.width=Math.ceil(n.width/2),n.height=Math.ceil(n.height/2),t--;return n}(e.decodeLevel,i.width,i.height);i.width=t,i.height=r}const a=r.getDecodedBuffer();new Uint8Array(a.length).set(a);const s=`x: ${r.getImageOffset().x}, y: ${r.getImageOffset().y}`,u=r.getNumDecompositions(),c=r.getNumLayers(),l=["unknown","LRCP","RLCP","RPCL","PCRL","CPRL"][r.getProgressionOrder()+1],f=r.getIsReversible(),p=`${r.getBlockDimensions().width} x ${r.getBlockDimensions().height}`,d=`${r.getTileSize().width} x ${r.getTileSize().height}`,h=`${r.getTileOffset().x}, ${r.getTileOffset().y}`,y=`${a.length.toLocaleString()} bytes`,v=`${(a.length/n.length).toFixed(2)}:1`,g={columns:i.width,rows:i.height,bitsPerPixel:i.bitsPerSample,signed:i.isSigned,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:i.componentCount};let m=function(t,e){return t.bitsPerSample>8?t.isSigned?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2):t.isSigned?new Int8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(i,a);const{buffer:T,byteOffset:P,byteLength:C}=m,$=T.slice(P,P+C);m=new m.constructor($);const A={imageOffset:s,numDecompositions:u,numLayers:c,progessionOrder:l,reversible:f,blockDimensions:p,tileSize:d,tileOffset:h,decodedSize:y,compressionRatio:v};return{...e,pixelData:m,imageInfo:g,encodeOptions:A,...A,...g}}(n,E);break;default:throw new Error(`no decoder for transfer syntax ${e}`)}if(!k)throw new Error("decodePromise not defined");const R=function(t,e,r){const n=void 0!==t.pixelRepresentation&&1===t.pixelRepresentation,o=n&&void 0!==t.bitsStored?32-t.bitsStored:void 0;if(n&&void 0!==o)for(let e=0;e<t.pixelData.length;e++)t.pixelData[e]=t.pixelData[e]<<o>>o;let i=t.pixelData;t.pixelDataLength=t.pixelData.length;const{min:a,max:s}=(0,T.A)(t.pixelData),u=void 0===e.allowFloatRendering||e.allowFloatRendering;let c=(0,C.A)(t.photometricInterpretation)&&void 0===e.targetBuffer?.offset;const l=e.preScale?.enabled,f=l&&Object.values(e.preScale.scalingParameters).some((t=>"number"==typeof t&&!Number.isInteger(t))),p=!e.preScale.enabled||!u&&f,d=e.targetBuffer?.type;if(d&&e.preScale.enabled&&!p){const{rescaleSlope:t,rescaleIntercept:r}=e.preScale.scalingParameters,n=t*a+r,o=t*s+r;c=!(0,P.r)(n,o,A[d])}i=d&&!c?function(t,e,r){const{arrayBuffer:n,type:o,offset:i=0,length:a,rows:s}=t.targetBuffer,u=r[o];if(!u)throw new Error(`target array ${o} is not supported, or doesn't exist.`);s&&s!=e.rows&&function(t,e,r){const n=function(t,e,r){const{samplesPerPixel:n}=t,{rows:o,columns:i}=e,a=o*i*n,s=new r(a),u=s.byteLength/a;return{pixelData:s,rows:o,columns:i,frameInfo:{...t.frameInfo,rows:o,columns:i},imageInfo:{...t.imageInfo,rows:o,columns:i,bytesPerPixel:u}}}(t,e,r),{scalingType:o="replicate"}=e;$[o](t,n),Object.assign(t,n),t.pixelDataLength=t.pixelData.length}(e,t.targetBuffer,u);const c=e.pixelDataLength,l=i,f=null!=a?a:c-l,p=e.pixelData;if(f!==p.length)throw new Error(`target array for image does not have the same length (${f}) as the decoded image length (${p.length}).`);const d=n?new u(n,l,f):new u(f);return d.set(p,0),d}(e,t,A):e.preScale.enabled&&!p?function(t,e,r,n){const o=t.preScale.scalingParameters;x(o);const{rescaleSlope:i,rescaleIntercept:a}=o;let s=e,u=r;return"number"==typeof i&&"number"==typeof a&&(s=i*e+a,u=i*r+a),S(s,u,n)}(e,a,s,t):S(a,s,t);let h=a,y=s;if(e.preScale.enabled&&!p){const r=e.preScale.scalingParameters;x(r);const{rescaleSlope:n,rescaleIntercept:o}=r,u=function(t){const{rescaleSlope:e,rescaleIntercept:r,modality:n,doseGridScaling:o,suvbw:i}=t;return"number"==typeof e&&"number"==typeof r||"RTDOSE"===n&&"number"==typeof o||"PT"===n&&"number"==typeof i}(r);if(u){!function(t,e){const r=t.length,{rescaleSlope:n,rescaleIntercept:o,suvbw:i,doseGridScaling:a}=e;if("PT"!==e.modality||"number"!=typeof i||isNaN(i))if("RTDOSE"!==e.modality||"number"!=typeof a||isNaN(a))for(let e=0;e<r;e++)t[e]=t[e]*n+o;else for(let e=0;e<r;e++)t[e]=t[e]*a;else for(let e=0;e<r;e++)t[e]=i*(t[e]*n+o)}(i,r),t.preScale={...e.preScale,scaled:!0};const{rescaleIntercept:n,rescaleSlope:o,suvbw:u}=r;h=o*a+n,y=o*s+n,u&&(h*=u,y*=u)}}else p&&(t.preScale={enabled:!0,scaled:!1},h=a,y=s);t.pixelData=i,t.smallestPixelValue=h,t.largestPixelValue=y;const v=(new Date).getTime();return t.decodeTimeInMS=v-r,t}(await k,l,m);return h?.(R),R}(t,e,l,0,o,h)};(0,n.p)(E)},7416:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){let e,r=t[0],n=t[0];const o=t.length;for(let i=1;i<o;i++)e=t[i],r=Math.min(r,e),n=Math.max(n,e);return{min:r,max:n}}},678:(t,e,r)=>{"use strict";function n(t,e){let r;return Number.isInteger(t)&&Number.isInteger(e)&&(t>=0?e<=255?r=Uint8Array:e<=65535?r=Uint16Array:e<=4294967295&&(r=Uint32Array):t>=-128&&e<=127?r=Int8Array:t>=-32768&&e<=32767&&(r=Int16Array)),r||Float32Array}function o(t,e,r){return n(t,e)===r}r.d(e,{A:()=>n,r:()=>o})},7092:(t,e,r)=>{"use strict";function n(t){return"RGB"===t||"PALETTE COLOR"===t||"YBR_FULL"===t||"YBR_FULL_422"===t||"YBR_PARTIAL_422"===t||"YBR_PARTIAL_420"===t||"YBR_RCT"===t||"YBR_ICT"===t}r.d(e,{A:()=>n})},9484:(t,e,r)=>{"use strict";t.exports=r.p+"5004fdc02f329ce53b69.wasm"},605:(t,e,r)=>{"use strict";t.exports=r.p+"c22b37c3488e1d6c3aa4.wasm"},6708:(t,e,r)=>{"use strict";t.exports=r.p+"031089e563a18ada8441.wasm"},3650:(t,e,r)=>{"use strict";t.exports=r.p+"a957c5cd315f89b6feb1.wasm"},4590:(t,e,r)=>{"use strict";r.d(e,{p:()=>f});const n=Symbol("Comlink.proxy"),o=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),s=Symbol("Comlink.thrown"),u=t=>"object"==typeof t&&null!==t||"function"==typeof t,c={canHandle:t=>u(t)&&t[n],serialize(t){const{port1:e,port2:r}=new MessageChannel;return f(t,e),[r,[r]]},deserialize:t=>(t.start(),function(t){const e=new Map;return t.addEventListener("message",(function(t){const{data:r}=t;if(!r||!r.id)return;const n=e.get(r.id);if(n)try{n(r)}finally{e.delete(r.id)}})),g(t,e,[],void 0)}(t))},l=new Map([["proxy",c],["throw",{canHandle:t=>u(t)&&s in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function f(t,e=globalThis,r=["*"]){e.addEventListener("message",(function o(i){if(!i||!i.data)return;if(!function(t,e){for(const r of t){if(e===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}return!1}(r,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:u,type:c,path:l}=Object.assign({path:[]},i.data),d=(i.data.argumentList||[]).map(_);let h;try{const e=l.slice(0,-1).reduce(((t,e)=>t[e]),t),r=l.reduce(((t,e)=>t[e]),t);switch(c){case"GET":h=r;break;case"SET":e[l.slice(-1)[0]]=_(i.data.value),h=!0;break;case"APPLY":h=r.apply(e,d);break;case"CONSTRUCT":h=function(t){return Object.assign(t,{[n]:!0})}(new r(...d));break;case"ENDPOINT":{const{port1:e,port2:r}=new MessageChannel;f(t,r),h=function(t,e){return w.set(t,e),t}(e,[e])}break;case"RELEASE":h=void 0;break;default:return}}catch(t){h={value:t,[s]:0}}Promise.resolve(h).catch((t=>({value:t,[s]:0}))).then((r=>{const[n,i]=b(r);e.postMessage(Object.assign(Object.assign({},n),{id:u}),i),"RELEASE"===c&&(e.removeEventListener("message",o),p(e),a in t&&"function"==typeof t[a]&&t[a]())})).catch((t=>{const[r,n]=b({value:new TypeError("Unserializable return value"),[s]:0});e.postMessage(Object.assign(Object.assign({},r),{id:u}),n)}))})),e.start&&e.start()}function p(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function d(t){if(t)throw new Error("Proxy has been released and is not useable")}function h(t){return T(t,new Map,{type:"RELEASE"}).then((()=>{p(t)}))}const y=new WeakMap,v="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(y.get(t)||0)-1;y.set(t,e),0===e&&h(t)}));function g(t,e,r=[],n=function(){}){let a=!1;const s=new Proxy(n,{get(n,o){if(d(a),o===i)return()=>{!function(t){v&&v.unregister(t)}(s),h(t),e.clear(),a=!0};if("then"===o){if(0===r.length)return{then:()=>s};const n=T(t,e,{type:"GET",path:r.map((t=>t.toString()))}).then(_);return n.then.bind(n)}return g(t,e,[...r,o])},set(n,o,i){d(a);const[s,u]=b(i);return T(t,e,{type:"SET",path:[...r,o].map((t=>t.toString())),value:s},u).then(_)},apply(n,i,s){d(a);const u=r[r.length-1];if(u===o)return T(t,e,{type:"ENDPOINT"}).then(_);if("bind"===u)return g(t,e,r.slice(0,-1));const[c,l]=m(s);return T(t,e,{type:"APPLY",path:r.map((t=>t.toString())),argumentList:c},l).then(_)},construct(n,o){d(a);const[i,s]=m(o);return T(t,e,{type:"CONSTRUCT",path:r.map((t=>t.toString())),argumentList:i},s).then(_)}});return function(t,e){const r=(y.get(e)||0)+1;y.set(e,r),v&&v.register(t,e,t)}(s,t),s}function m(t){const e=t.map(b);return[e.map((t=>t[0])),(r=e.map((t=>t[1])),Array.prototype.concat.apply([],r))];var r}const w=new WeakMap;function b(t){for(const[e,r]of l)if(r.canHandle(t)){const[n,o]=r.serialize(t);return[{type:"HANDLER",name:e,value:n},o]}return[{type:"RAW",value:t},w.get(t)||[]]}function _(t){switch(t.type){case"HANDLER":return l.get(t.name).deserialize(t.value);case"RAW":return t.value}}function T(t,e,r,n){return new Promise((o=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");e.set(i,o),t.start&&t.start(),t.postMessage(Object.assign({id:i},r),n)}))}}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
Binary file
@@ -0,0 +1 @@
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.larvitar=r():e.larvitar=r()}(self,(()=>(()=>{var e,r,t={6221:()=>{},4457:()=>{},4150:()=>{},1966:()=>{},9696:()=>{},2544:()=>{},4304:()=>{},1440:()=>{}},o={};function i(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,i),n.exports}return i.m=t,i.x=()=>{var e=i.O(void 0,[43],(()=>i(7043)));return i.O(e)},e=[],i.O=(r,t,o,n)=>{if(!t){var a=1/0;for(f=0;f<e.length;f++){for(var[t,o,n]=e[f],p=!0,l=0;l<t.length;l++)(!1&n||a>=n)&&Object.keys(i.O).every((e=>i.O[e](t[l])))?t.splice(l--,1):(p=!1,n<a&&(a=n));if(p){e.splice(f--,1);var c=o();void 0!==c&&(r=c)}}return r}n=n||0;for(var f=e.length;f>0&&e[f-1][2]>n;f--)e[f]=e[f-1];e[f]=[t,o,n]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>e+".larvitar.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var r=i.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{i.b=self.location+"";var e={661:1};i.f.i=(r,t)=>{e[r]||importScripts(i.p+i.u(r))};var r=self.webpackChunklarvitar=self.webpackChunklarvitar||[],t=r.push.bind(r);r.push=r=>{var[o,n,a]=r;for(var p in n)i.o(n,p)&&(i.m[p]=n[p]);for(a&&a(i);o.length;)e[o.pop()]=1;t(r)}})(),r=i.x,i.x=()=>i.e(43).then(r),i.x()})()));
@@ -0,0 +1 @@
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.larvitar=r():e.larvitar=r()}(self,(()=>(()=>{var e,r,t={1234:()=>{}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=t,n.x=()=>{var e=n.O(void 0,[718],(()=>n(6718)));return n.O(e)},n.amdD=function(){throw new Error("define cannot be used indirect")},n.amdO={},e=[],n.O=(r,t,o,i)=>{if(!t){var a=1/0;for(f=0;f<e.length;f++){for(var[t,o,i]=e[f],p=!0,c=0;c<t.length;c++)(!1&i||a>=i)&&Object.keys(n.O).every((e=>n.O[e](t[c])))?t.splice(c--,1):(p=!1,i<a&&(a=i));if(p){e.splice(f--,1);var l=o();void 0!==l&&(r=l)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,o,i]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>e+".larvitar.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var r=n.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={694:1};n.f.i=(r,t)=>{e[r]||importScripts(n.p+n.u(r))};var r=self.webpackChunklarvitar=self.webpackChunklarvitar||[],t=r.push.bind(r);r.push=r=>{var[o,i,a]=r;for(var p in i)n.o(i,p)&&(n.m[p]=i[p]);for(a&&a(n);o.length;)e[o.pop()]=1;t(r)}})(),r=n.x,n.x=()=>n.e(718).then(r),n.x()})()));