diff --git a/dist/wa-sqlite-async.mjs b/dist/wa-sqlite-async.mjs index 3dc98d57..c127d2ae 100644 --- a/dist/wa-sqlite-async.mjs +++ b/dist/wa-sqlite-async.mjs @@ -7,12 +7,12 @@ function(moduleArg = {}) { var f=moduleArg,aa,ba;f.ready=new Promise((a,b)=>{aa=a;ba=b});var ca=Object.assign({},f),da="./this.program",ea=(a,b)=>{throw b;},fa="object"==typeof window,ia="function"==typeof importScripts,p="",ja; if(fa||ia)ia?p=self.location.href:"undefined"!=typeof document&&document.currentScript&&(p=document.currentScript.src),_scriptDir&&(p=_scriptDir),0!==p.indexOf("blob:")?p=p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1):p="",ia&&(ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var ka=f.print||console.log.bind(console),t=f.printErr||console.error.bind(console);Object.assign(f,ca);ca=null;f.thisProgram&&(da=f.thisProgram); -f.quit&&(ea=f.quit);var la;f.wasmBinary&&(la=f.wasmBinary);var noExitRuntime=f.noExitRuntime||!0;"object"!=typeof WebAssembly&&u("no native wasm support detected");var ma,v=!1,na,w,y,oa,z,B,pa,qa;function ra(){var a=ma.buffer;f.HEAP8=w=new Int8Array(a);f.HEAP16=oa=new Int16Array(a);f.HEAPU8=y=new Uint8Array(a);f.HEAPU16=new Uint16Array(a);f.HEAP32=z=new Int32Array(a);f.HEAPU32=B=new Uint32Array(a);f.HEAPF32=pa=new Float32Array(a);f.HEAPF64=qa=new Float64Array(a)}var sa=[],ta=[],ua=[],va=[],wa=0; -function xa(){var a=f.preRun.shift();sa.unshift(a)}var C=0,ya=null,za=null;function u(a){if(f.onAbort)f.onAbort(a);a="Aborted("+a+")";t(a);v=!0;na=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}function Aa(a){return a.startsWith("data:application/octet-stream;base64,")}var Ba;if(f.locateFile){if(Ba="wa-sqlite-async.wasm",!Aa(Ba)){var Ca=Ba;Ba=f.locateFile?f.locateFile(Ca,p):p+Ca}}else Ba=(new URL("wa-sqlite-async.wasm",import.meta.url)).href; -function Da(a){if(a==Ba&&la)return new Uint8Array(la);if(ja)return ja(a);throw"both async and sync fetching of the wasm failed";}function Ea(a){return la||!fa&&!ia||"function"!=typeof fetch?Promise.resolve().then(()=>Da(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>Da(a))} -function Fa(a,b,c){return Ea(a).then(d=>WebAssembly.instantiate(d,b)).then(d=>d).then(c,d=>{t(`failed to asynchronously prepare wasm: ${d}`);u(d)})}function Ga(a,b){var c=Ba;return la||"function"!=typeof WebAssembly.instantiateStreaming||Aa(c)||"function"!=typeof fetch?Fa(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){t(`wasm streaming compile failed: ${e}`);t("falling back to ArrayBuffer instantiation");return Fa(c,a,b)}))}var D,F; -function Ha(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ia=a=>{for(;0>0];case "i8":return w[a>>0];case "i16":return oa[a>>1];case "i32":return z[a>>2];case "i64":u("to do getValue(i64) use WASM_BIGINT");case "float":return pa[a>>2];case "double":return qa[a>>3];case "*":return B[a>>2];default:u(`invalid type for getValue: ${b}`)}} -function J(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":w[a>>0]=b;break;case "i8":w[a>>0]=b;break;case "i16":oa[a>>1]=b;break;case "i32":z[a>>2]=b;break;case "i64":u("to do setValue(i64) use WASM_BIGINT");case "float":pa[a>>2]=b;break;case "double":qa[a>>3]=b;break;case "*":B[a>>2]=b;break;default:u(`invalid type for setValue: ${c}`)}} +f.quit&&(ea=f.quit);var la;f.wasmBinary&&(la=f.wasmBinary);"object"!=typeof WebAssembly&&u("no native wasm support detected");var ma,v=!1,na,w,y,oa,z,B,pa,qa;function ra(){var a=ma.buffer;f.HEAP8=w=new Int8Array(a);f.HEAP16=oa=new Int16Array(a);f.HEAPU8=y=new Uint8Array(a);f.HEAPU16=new Uint16Array(a);f.HEAP32=z=new Int32Array(a);f.HEAPU32=B=new Uint32Array(a);f.HEAPF32=pa=new Float32Array(a);f.HEAPF64=qa=new Float64Array(a)}var sa=[],ta=[],ua=[],va=[]; +function wa(){var a=f.preRun.shift();sa.unshift(a)}var C=0,xa=null,ya=null;function u(a){if(f.onAbort)f.onAbort(a);a="Aborted("+a+")";t(a);v=!0;na=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var za=a=>a.startsWith("data:application/octet-stream;base64,"),Aa;if(f.locateFile){if(Aa="wa-sqlite-async.wasm",!za(Aa)){var Ba=Aa;Aa=f.locateFile?f.locateFile(Ba,p):p+Ba}}else Aa=(new URL("wa-sqlite-async.wasm",import.meta.url)).href; +function Ca(a){if(a==Aa&&la)return new Uint8Array(la);if(ja)return ja(a);throw"both async and sync fetching of the wasm failed";}function Da(a){return la||!fa&&!ia||"function"!=typeof fetch?Promise.resolve().then(()=>Ca(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>Ca(a))} +function Ea(a,b,c){return Da(a).then(d=>WebAssembly.instantiate(d,b)).then(d=>d).then(c,d=>{t(`failed to asynchronously prepare wasm: ${d}`);u(d)})}function Fa(a,b){var c=Aa;return la||"function"!=typeof WebAssembly.instantiateStreaming||za(c)||"function"!=typeof fetch?Ea(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){t(`wasm streaming compile failed: ${e}`);t("falling back to ArrayBuffer instantiation");return Ea(c,a,b)}))}var D,F; +function Ga(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ha=a=>{for(;0>0];case "i8":return w[a>>0];case "i16":return oa[a>>1];case "i32":return z[a>>2];case "i64":u("to do getValue(i64) use WASM_BIGINT");case "float":return pa[a>>2];case "double":return qa[a>>3];case "*":return B[a>>2];default:u(`invalid type for getValue: ${b}`)}} +var Ia=f.noExitRuntime||!0;function J(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":w[a>>0]=b;break;case "i8":w[a>>0]=b;break;case "i16":oa[a>>1]=b;break;case "i32":z[a>>2]=b;break;case "i64":u("to do setValue(i64) use WASM_BIGINT");case "float":pa[a>>2]=b;break;case "double":qa[a>>3]=b;break;case "*":B[a>>2]=b;break;default:u(`invalid type for setValue: ${c}`)}} var Ja="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(a,b,c)=>{var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}, Ka=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},M=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ka(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},La=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},Ma=a=>{if("/"=== a)return"/";a=M(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Na=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);u("initRandomDevice")},Oa=a=>(Oa=Na())(a); @@ -45,23 +45,23 @@ function Kb(a,b,c){a=M("/dev/"+a);var d=eb(!!b,!!c);Lb||(Lb=64);var e=Lb++<<8|0; function Mb(a,b,c){if("/"===b.charAt(0))return b;a=-100===a?"/":S(a).path;if(0==b.length){if(!c)throw new N(44);return a}return M(a+"/"+b)} function Nb(a,b,c){try{var d=a(b)}catch(h){if(h&&h.node&&M(b)!==M(lb(h.node)))return-54;throw h;}z[c>>2]=d.Hc;z[c+4>>2]=d.mode;B[c+8>>2]=d.Nc;z[c+12>>2]=d.uid;z[c+16>>2]=d.Kc;z[c+20>>2]=d.ec;F=[d.size>>>0,(D=d.size,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+24>>2]=F[0];z[c+28>>2]=F[1];z[c+32>>2]=4096;z[c+36>>2]=d.Fc;a=d.Dc.getTime();b=d.Mc.getTime();var e=d.Gc.getTime();F=[Math.floor(a/1E3)>>>0,(D=Math.floor(a/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+40>>2]=F[0];z[c+44>>2]=F[1];B[c+48>>2]=a%1E3*1E3;F=[Math.floor(b/1E3)>>>0,(D=Math.floor(b/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+56>>2]=F[0];z[c+60>>2]=F[1];B[c+64>>2]=b%1E3*1E3;F=[Math.floor(e/1E3)>>>0,(D=Math.floor(e/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+72>>2]=F[0];z[c+76>>2]=F[1];B[c+80>>2]= -e%1E3*1E3;F=[d.yc>>>0,(D=d.yc,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+88>>2]=F[0];z[c+92>>2]=F[1];return 0}var Ob=void 0;function Pb(){var a=z[Ob>>2];Ob+=4;return a} +e%1E3*1E3;F=[d.yc>>>0,(D=d.yc,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+88>>2]=F[0];z[c+92>>2]=F[1];return 0}var Ob=void 0;function Pb(){var a=z[+Ob>>2];Ob+=4;return a} var Qb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Rb=[0,31,60,91,121,152,182,213,244,274,305,335],Sb=[0,31,59,90,120,151,181,212,243,273,304,334],Ub=a=>{var b=Ra(a)+1,c=Tb(b);c&&Sa(a,y,c,b);return c},Vb={},Xb=()=>{if(!Wb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:da||"./this.program"},b;for(b in Vb)void 0===Vb[b]?delete a[b]:a[b]=Vb[b]; var c=[];for(b in a)c.push(`${b}=${a[b]}`);Wb=c}return Wb},Wb;function Yb(){}function Zb(){}function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){} -function Ac(){}function Bc(){}function Cc(){}function Dc(){}function Ec(){}function Fc(){}function Gc(){}function Hc(){}function Ic(){}function Jc(){}var Kc=a=>{na=a;if(!(noExitRuntime||0{a instanceof Ha||"unwind"==a||ea(1,a)},Mc=a=>{try{a()}catch(b){u(b)}}; -function Nc(a){var b={},c;for(c in a)(function(d){var e=a[d];b[d]="function"==typeof e?function(){Oc.push(d);try{return e.apply(null,arguments)}finally{v||(Oc.pop()===d||u(),V&&1===X&&0===Oc.length&&(X=0,Mc(Pc),"undefined"!=typeof Fibers&&Fibers.cd()))}}:e})(c);return b}var X=0,V=null,Qc=0,Oc=[],Rc={},Sc={},Tc=0,Uc=null,Vc=[];function Wc(){return new Promise((a,b)=>{Uc={resolve:a,reject:b}})} -function Xc(){var a=Tb(16396),b=a+12;B[a>>2]=b;B[a+4>>2]=b+16384;b=Oc[0];var c=Rc[b];void 0===c&&(c=Tc++,Rc[b]=c,Sc[c]=b);z[a+8>>2]=c;return a} -function Yc(a){if(!v){if(0===X){var b=!1,c=!1;a((d=0)=>{if(!v&&(Qc=d,b=!0,c)){X=2;Mc(()=>Zc(V));"undefined"!=typeof Browser&&Browser.qc.Jc&&Browser.qc.resume();d=!1;try{var e=(0,Y[Sc[z[V+8>>2]]])()}catch(n){e=n,d=!0}var h=!1;if(!V){var g=Uc;g&&(Uc=null,(d?g.reject:g.resolve)(e),h=!0)}if(d&&!h)throw e;}});c=!0;b||(X=1,V=Xc(),"undefined"!=typeof Browser&&Browser.qc.Jc&&Browser.qc.pause(),Mc(()=>$c(V)))}else 2===X?(X=0,Mc(ad),bd(V),V=null,Vc.forEach(d=>{if(!v)try{if(d(),!(noExitRuntime||0{a().then(b)})} -var dd={},Z=(a,b,c,d,e)=>{function h(m){--wa;0!==k&&ed(k);return"string"===b?m?K(y,m):"":"boolean"===b?!!m:m}var g={string:m=>{var q=0;if(null!==m&&void 0!==m&&0!==m){q=Ra(m)+1;var x=fd(q);Sa(m,y,x,q);q=x}return q},array:m=>{var q=fd(m.length);w.set(m,q);return q}};a=f["_"+a];var n=[],k=0;if(d)for(var l=0;l{na=a;if(!(Ia||0{a instanceof Ga||"unwind"==a||ea(1,a)},Nc=a=>{try{a()}catch(b){u(b)}}; +function Oc(){var a=V,b={},c;for(c in a)(function(d){var e=a[d];b[d]="function"==typeof e?function(){Pc.push(d);try{return e.apply(null,arguments)}finally{v||(Pc.pop()===d||u(),X&&1===Y&&0===Pc.length&&(Y=0,Nc(Qc),"undefined"!=typeof Fibers&&Fibers.cd()))}}:e})(c);return b}var Y=0,X=null,Rc=0,Pc=[],Sc={},Tc={},Uc=0,Vc=null,Wc=[];function Xc(){return new Promise((a,b)=>{Vc={resolve:a,reject:b}})} +function Yc(){var a=Tb(16396),b=a+12;B[a>>2]=b;B[a+4>>2]=b+16384;b=Pc[0];var c=Sc[b];void 0===c&&(c=Uc++,Sc[b]=c,Tc[c]=b);z[a+8>>2]=c;return a} +function Zc(a){if(!v){if(0===Y){var b=!1,c=!1;a((d=0)=>{if(!v&&(Rc=d,b=!0,c)){Y=2;Nc(()=>$c(X));"undefined"!=typeof Browser&&Browser.qc.Jc&&Browser.qc.resume();d=!1;try{var e=(0,V[Tc[z[X+8>>2]]])()}catch(n){e=n,d=!0}var h=!1;if(!X){var g=Vc;g&&(Vc=null,(d?g.reject:g.resolve)(e),h=!0)}if(d&&!h)throw e;}});c=!0;b||(Y=1,X=Yc(),"undefined"!=typeof Browser&&Browser.qc.Jc&&Browser.qc.pause(),Nc(()=>ad(X)))}else 2===Y?(Y=0,Nc(bd),cd(X),X=null,Wc.forEach(d=>{if(!v)try{if(d(),!(Ia||0{a().then(b)})} +var ed={},Z=(a,b,c,d,e)=>{function h(m){--Kc;0!==k&&fd(k);return"string"===b?m?K(y,m):"":"boolean"===b?!!m:m}var g={string:m=>{var q=0;if(null!==m&&void 0!==m&&0!==m){q=Ra(m)+1;var x=gd(q);Sa(m,y,x,q);q=x}return q},array:m=>{var q=gd(m.length);w.set(m,q);return q}};a=f["_"+a];var n=[],k=0;if(d)for(var l=0;l0,write:(d,e,h,g)=>g});yb("/dev/null",259);Ua(1280,Xa);Ua(1536,Ya);yb("/dev/tty",1280);yb("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Oa(a).byteLength);return a[--b]};Kb("random",c);Kb("urandom",c);T("/dev/shm");T("/dev/shm/tmp")})(); (function(){T("/proc");var a=T("/proc/self");T("/proc/self/fd");wb({Ub(){var b=ab(a,"fd",16895,73);b.Cb={cc(c,d){var e=S(+d);c={parent:null,Ub:{zc:"fake"},Cb:{fc:()=>e.path}};return c.parent=c}};return b}},"/proc/self/fd")})(); (function(){const a=new Map;f.setAuthorizer=function(b,c,d){c?a.set(b,{f:c,tc:d}):a.delete(b);return Z("set_authorizer","number",["number"],[b])};Yb=function(b,c,d,e,h,g){if(a.has(b)){const {f:n,tc:k}=a.get(b);return n(k,c,d?d?K(y,d):"":null,e?e?K(y,e):"":null,h?h?K(y,h):"":null,g?g?K(y,g):"":null)}return 0}})(); (function(){const a=new Map,b=new Map;f.createFunction=function(c,d,e,h,g,n){const k=a.size;a.set(k,{f:n,Xb:g});return Z("create_function","number","number string number number number number".split(" "),[c,d,e,h,k,0])};f.createAggregate=function(c,d,e,h,g,n,k){const l=a.size;a.set(l,{step:n,Ic:k,Xb:g});return Z("create_function","number","number string number number number number".split(" "),[c,d,e,h,l,1])};f.getFunctionUserData=function(c){return b.get(c)};$b=function(c,d,e,h){c=a.get(c);b.set(d, c.Xb);c.f(d,new Uint32Array(y.buffer,h,e));b.delete(d)};bc=function(c,d,e,h){c=a.get(c);b.set(d,c.Xb);c.step(d,new Uint32Array(y.buffer,h,e));b.delete(d)};Zb=function(c,d){c=a.get(c);b.set(d,c.Xb);c.Ic(d);b.delete(d)}})();(function(){const a=new Map;f.progressHandler=function(b,c,d,e){d?a.set(b,{f:d,tc:e}):a.delete(b);return Z("progress_handler",null,["number","number"],[b,c])};ac=function(b){if(a.has(b)){const {f:c,tc:d}=a.get(b);return c(d)}return 0}})(); -(function(){function a(k,l){const r=`get${k}`,m=`set${k}`;return new Proxy(new DataView(y.buffer,l,"Int32"===k?4:8),{get(q,x){if(x===r)return function(A,G){if(!G)throw Error("must be little endian");return q[x](A,G)};if(x===m)return function(A,G,E){if(!E)throw Error("must be little endian");return q[x](A,G,E)};if("string"===typeof x&&x.match(/^(get)|(set)/))throw Error("invalid type");return q[x]}})}const b="object"===typeof dd,c=new Map,d=new Map,e=new Map,h=b?new Set:null,g=b?new Set:null,n=new Map; -sc=function(k,l,r,m){n.set(k?K(y,k):"",{size:l,dc:Array.from(new Uint32Array(y.buffer,m,r))})};f.createModule=function(k,l,r,m){b&&(r.handleAsync=cd);const q=c.size;c.set(q,{module:r,Xb:m});m=0;r.xCreate&&(m|=1);r.xConnect&&(m|=2);r.xBestIndex&&(m|=4);r.xDisconnect&&(m|=8);r.xDestroy&&(m|=16);r.xOpen&&(m|=32);r.xClose&&(m|=64);r.xFilter&&(m|=128);r.xNext&&(m|=256);r.xEof&&(m|=512);r.xColumn&&(m|=1024);r.xRowid&&(m|=2048);r.xUpdate&&(m|=4096);r.xBegin&&(m|=8192);r.xSync&&(m|=16384);r.xCommit&&(m|= +(function(){function a(k,l){const r=`get${k}`,m=`set${k}`;return new Proxy(new DataView(y.buffer,l,"Int32"===k?4:8),{get(q,x){if(x===r)return function(A,G){if(!G)throw Error("must be little endian");return q[x](A,G)};if(x===m)return function(A,G,E){if(!E)throw Error("must be little endian");return q[x](A,G,E)};if("string"===typeof x&&x.match(/^(get)|(set)/))throw Error("invalid type");return q[x]}})}const b="object"===typeof ed,c=new Map,d=new Map,e=new Map,h=b?new Set:null,g=b?new Set:null,n=new Map; +sc=function(k,l,r,m){n.set(k?K(y,k):"",{size:l,dc:Array.from(new Uint32Array(y.buffer,m,r))})};f.createModule=function(k,l,r,m){b&&(r.handleAsync=dd);const q=c.size;c.set(q,{module:r,Xb:m});m=0;r.xCreate&&(m|=1);r.xConnect&&(m|=2);r.xBestIndex&&(m|=4);r.xDisconnect&&(m|=8);r.xDestroy&&(m|=16);r.xOpen&&(m|=32);r.xClose&&(m|=64);r.xFilter&&(m|=128);r.xNext&&(m|=256);r.xEof&&(m|=512);r.xColumn&&(m|=1024);r.xRowid&&(m|=2048);r.xUpdate&&(m|=4096);r.xBegin&&(m|=8192);r.xSync&&(m|=16384);r.xCommit&&(m|= 32768);r.xRollback&&(m|=65536);r.xFindFunction&&(m|=131072);r.xRename&&(m|=262144);return Z("create_module","number",["number","string","number","number"],[k,l,q,m])};ic=function(k,l,r,m,q,x){l=c.get(l);d.set(q,l);if(b){h.delete(q);for(const A of h)d.delete(A)}m=Array.from(new Uint32Array(y.buffer,m,r)).map(A=>A?K(y,A):"");return l.module.xCreate(k,l.Xb,m,q,a("Int32",x))};hc=function(k,l,r,m,q,x){l=c.get(l);d.set(q,l);if(b){h.delete(q);for(const A of h)d.delete(A)}m=Array.from(new Uint32Array(y.buffer, m,r)).map(A=>A?K(y,A):"");return l.module.xConnect(k,l.Xb,m,q,a("Int32",x))};dc=function(k,l){var r=d.get(k),m=n.get("sqlite3_index_info").dc;const q={};q.nConstraint=I(l+m[0],"i32");q.aConstraint=[];var x=I(l+m[1],"*"),A=n.get("sqlite3_index_constraint").size;for(var G=0;GA?K(y,A):"");return l.module.xConnect(k,l.Xb,m,q,a("Int32",x))};dc= q.estimatedCost,"double");J(l+r[10],q.estimatedRows,"i32");J(l+r[11],q.idxFlags,"i32");return k};kc=function(k){const l=d.get(k);b?h.add(k):d.delete(k);return l.module.xDisconnect(k)};jc=function(k){const l=d.get(k);b?h.add(k):d.delete(k);return l.module.xDestroy(k)};oc=function(k,l){const r=d.get(k);e.set(l,r);if(b){g.delete(l);for(const m of g)e.delete(m)}return r.module.xOpen(k,l)};ec=function(k){const l=e.get(k);b?g.add(k):e.delete(k);return l.module.xClose(k)};lc=function(k){return e.get(k).module.xEof(k)? 1:0};mc=function(k,l,r,m,q){const x=e.get(k);r=r?r?K(y,r):"":null;q=new Uint32Array(y.buffer,q,m);return x.module.xFilter(k,l,r,q)};nc=function(k){return e.get(k).module.xNext(k)};fc=function(k,l,r){return e.get(k).module.xColumn(k,l,r)};rc=function(k,l){return e.get(k).module.xRowid(k,a("BigInt64",l))};uc=function(k,l,r,m){const q=d.get(k);r=new Uint32Array(y.buffer,r,l);return q.module.xUpdate(k,r,a("BigInt64",m))};cc=function(k){return d.get(k).module.xBegin(k)};tc=function(k){return d.get(k).module.xSync(k)}; gc=function(k){return d.get(k).module.xCommit(k)};qc=function(k){return d.get(k).module.xRollback(k)};pc=function(k,l){const r=d.get(k);l=l?K(y,l):"";return r.module.xRename(k,l)}})(); -(function(){function a(g,n){const k=`get${g}`,l=`set${g}`;return new Proxy(new DataView(y.buffer,n,"Int32"===g?4:8),{get(r,m){if(m===k)return function(q,x){if(!x)throw Error("must be little endian");return r[m](q,x)};if(m===l)return function(q,x,A){if(!A)throw Error("must be little endian");return r[m](q,x,A)};if("string"===typeof m&&m.match(/^(get)|(set)/))throw Error("invalid type");return r[m]}})}function b(g){g>>=2;return B[g]+B[g+1]*2**32}const c="object"===typeof dd,d=new Map,e=new Map;f.registerVFS= -function(g,n){if(Z("sqlite3_vfs_find","number",["string"],[g.name]))throw Error(`VFS '${g.name}' already registered`);c&&(g.handleAsync=cd);var k=g.ad??64;const l=f._malloc(4);n=Z("register_vfs","number",["string","number","number","number"],[g.name,k,n?1:0,l]);n||(k=I(l,"*"),d.set(k,g));f._free(l);return n};const h=c?new Set:null;xc=function(g){const n=e.get(g);c?h.add(g):e.delete(g);return n.xClose(g)};Ec=function(g,n,k,l){return e.get(g).xRead(g,y.subarray(n,n+k),b(l))};Jc=function(g,n,k,l){return e.get(g).xWrite(g, +(function(){function a(g,n){const k=`get${g}`,l=`set${g}`;return new Proxy(new DataView(y.buffer,n,"Int32"===g?4:8),{get(r,m){if(m===k)return function(q,x){if(!x)throw Error("must be little endian");return r[m](q,x)};if(m===l)return function(q,x,A){if(!A)throw Error("must be little endian");return r[m](q,x,A)};if("string"===typeof m&&m.match(/^(get)|(set)/))throw Error("invalid type");return r[m]}})}function b(g){g>>=2;return B[g]+B[g+1]*2**32}const c="object"===typeof ed,d=new Map,e=new Map;f.registerVFS= +function(g,n){if(Z("sqlite3_vfs_find","number",["string"],[g.name]))throw Error(`VFS '${g.name}' already registered`);c&&(g.handleAsync=dd);var k=g.ad??64;const l=f._malloc(4);n=Z("register_vfs","number",["string","number","number","number"],[g.name,k,n?1:0,l]);n||(k=I(l,"*"),d.set(k,g));f._free(l);return n};const h=c?new Set:null;xc=function(g){const n=e.get(g);c?h.add(g):e.delete(g);return n.xClose(g)};Ec=function(g,n,k,l){return e.get(g).xRead(g,y.subarray(n,n+k),b(l))};Jc=function(g,n,k,l){return e.get(g).xWrite(g, y.subarray(n,n+k),b(l))};Hc=function(g,n){return e.get(g).xTruncate(g,b(n))};Gc=function(g,n){return e.get(g).xSync(g,n)};Bc=function(g,n){const k=e.get(g);n=a("BigInt64",n);return k.xFileSize(g,n)};Cc=function(g,n){return e.get(g).xLock(g,n)};Ic=function(g,n){return e.get(g).xUnlock(g,n)};wc=function(g,n){const k=e.get(g);n=a("Int32",n);return k.xCheckReservedLock(g,n)};Ac=function(g,n,k){const l=e.get(g);k=new DataView(y.buffer,k);return l.xFileControl(g,n,k)};Fc=function(g){return e.get(g).xSectorSize(g)}; zc=function(g){return e.get(g).xDeviceCharacteristics(g)};Dc=function(g,n,k,l,r){g=d.get(g);e.set(k,g);if(c){h.delete(k);for(var m of h)e.delete(m)}m=null;if(l&64){m=1;const q=[];for(;m;){const x=y[n++];if(x)q.push(x);else switch(y[n]||(m=null),m){case 1:q.push(63);m=2;break;case 2:q.push(61);m=3;break;case 3:q.push(38),m=2}}m=(new TextDecoder).decode(new Uint8Array(q))}else n&&(m=n?K(y,n):"");r=a("Int32",r);return g.xOpen(m,k,l,r)};yc=function(g,n,k){return d.get(g).xDelete(n?K(y,n):"",k)};vc=function(g, n,k,l){g=d.get(g);l=a("Int32",l);return g.xAccess(n?K(y,n):"",k,l)}})(); -var jd={a:(a,b,c,d)=>{u(`Assertion failed: ${a?K(y,a):""}, at: `+[b?b?K(y,b):"":"unknown filename",c,d?d?K(y,d):"":"unknown function"])},K:function(a,b){try{return a=a?K(y,a):"",Db(a,b),0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Ob}},M:function(a,b,c){try{b=b?K(y,b):"";b=Mb(a,b);if(c&-8)return-28;var d=R(b,{Yb:!0}).node;if(!d)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&ob(d,a)?-2:0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e; +var kd={a:(a,b,c,d)=>{u(`Assertion failed: ${a?K(y,a):""}, at: `+[b?b?K(y,b):"":"unknown filename",c,d?d?K(y,d):"":"unknown function"])},K:function(a,b){try{return a=a?K(y,a):"",Db(a,b),0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Ob}},M:function(a,b,c){try{b=b?K(y,b):"";b=Mb(a,b);if(c&-8)return-28;var d=R(b,{Yb:!0}).node;if(!d)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&ob(d,a)?-2:0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e; return-e.Ob}},L:function(a,b){try{var c=S(a);Db(c.node,b);return 0}catch(d){if("undefined"==typeof U||"ErrnoError"!==d.name)throw d;return-d.Ob}},J:function(a){try{var b=S(a).node;var c="string"==typeof b?R(b,{Yb:!0}).node:b;if(!c.Cb.Qb)throw new N(63);c.Cb.Qb(c,{timestamp:Date.now()});return 0}catch(d){if("undefined"==typeof U||"ErrnoError"!==d.name)throw d;return-d.Ob}},b:function(a,b,c){Ob=c;try{var d=S(a);switch(b){case 0:var e=Pb();if(0>e)return-28;for(;hb[e];)e++;return ub(d,e).Wb;case 1:case 2:return 0; -case 3:return d.flags;case 4:return e=Pb(),d.flags|=e,0;case 5:return e=Pb(),oa[e+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return z[hd()>>2]=28,-1;default:return-28}}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Ob}},I:function(a,b){try{var c=S(a);return Nb(Bb,c.path,b)}catch(d){if("undefined"==typeof U||"ErrnoError"!==d.name)throw d;return-d.Ob}},n:function(a,b,c){b=Qb(b,c);try{if(isNaN(b))return 61;var d=S(a);if(0===(d.flags&2097155))throw new N(28); +case 3:return d.flags;case 4:return e=Pb(),d.flags|=e,0;case 5:return e=Pb(),oa[e+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return z[jd()>>2]=28,-1;default:return-28}}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Ob}},I:function(a,b){try{var c=S(a);return Nb(Bb,c.path,b)}catch(d){if("undefined"==typeof U||"ErrnoError"!==d.name)throw d;return-d.Ob}},n:function(a,b,c){b=Qb(b,c);try{if(isNaN(b))return 61;var d=S(a);if(0===(d.flags&2097155))throw new N(28); Eb(d.node,b);return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Ob}},C:function(a,b){try{if(0===b)return-28;var c=Ra("/")+1;if(b=d)return-28; var e=kb(b),h=Math.min(d,Ra(e)),g=w[c+h];Sa(e,y,c,d+1);w[c+h]=g;return h}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Ob}},u:function(a){try{return a=a?K(y,a):"",Ab(a),0}catch(b){if("undefined"==typeof U||"ErrnoError"!==b.name)throw b;return-b.Ob}},H:function(a,b){try{return a=a?K(y,a):"",Nb(Bb,a,b)}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Ob}},r:function(a,b,c){try{b=b?K(y,b):"";b=Mb(a,b);if(0===c){a=b;var d=R(a,{parent:!0}).node;if(!d)throw new N(44); @@ -88,22 +88,22 @@ b=d(g);a=Ub(a);b=Ub(b);n>2]=a,B[c+4>>2]=b):(B[c>>2]=b,B[c+4>>2]=a)},e:() 0;h>0]=d.charCodeAt(h);w[e>>0]=0;c+=d.length+1});return 0},B:(a,b)=>{var c=Xb();B[a>>2]=c.length;var d=0;c.forEach(e=>d+=e.length+1);B[b>>2]=d;return 0},f:function(a){try{var b=S(a);if(null===b.Wb)throw new N(8);b.pc&&(b.pc=null);try{b.Mb.close&&b.Mb.close(b)}catch(c){throw c;}finally{hb[b.Wb]=null}b.Wb=null;return 0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return c.Ob}},p:function(a,b){try{var c=S(a);w[b>>0]=c.Sb?2:P(c.mode)?3:40960===(c.mode&61440)?7: 4;oa[b+2>>1]=0;F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[b+8>>2]=F[0];z[b+12>>2]=F[1];F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[b+16>>2]=F[0];z[b+20>>2]=F[1];return 0}catch(d){if("undefined"==typeof U||"ErrnoError"!==d.name)throw d;return d.Ob}},x:function(a,b,c,d){try{a:{var e=S(a);a=b;for(var h,g=b=0;g>2],k=B[a+4>>2];a+=8;var l=e,r=n,m=k,q=h,x= w;if(0>m||0>q)throw new N(28);if(null===l.Wb)throw new N(8);if(1===(l.flags&2097155))throw new N(8);if(P(l.node.mode))throw new N(31);if(!l.Mb.read)throw new N(28);var A="undefined"!=typeof q;if(!A)q=l.position;else if(!l.seekable)throw new N(70);var G=l.Mb.read(l,x,r,m,q);A||(l.position+=G);var E=G;if(0>E){var L=-1;break a}b+=E;if(E>2]=L;return 0}catch(H){if("undefined"==typeof U||"ErrnoError"!==H.name)throw H;return H.Ob}},m:function(a,b,c,d,e){b= -Qb(b,c);try{if(isNaN(b))return 61;var h=S(a);Hb(h,b,d);F=[h.position>>>0,(D=h.position,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[e>>2]=F[0];z[e+4>>2]=F[1];h.pc&&0===b&&0===d&&(h.pc=null);return 0}catch(g){if("undefined"==typeof U||"ErrnoError"!==g.name)throw g;return g.Ob}},D:function(a){try{var b=S(a);return Yc(c=>{var d=b.node.Ub;d.type.Qc?d.type.Qc(d,!1,e=>{e?c(29):c(0)}):c(0)})}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c; +Qb(b,c);try{if(isNaN(b))return 61;var h=S(a);Hb(h,b,d);F=[h.position>>>0,(D=h.position,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[e>>2]=F[0];z[e+4>>2]=F[1];h.pc&&0===b&&0===d&&(h.pc=null);return 0}catch(g){if("undefined"==typeof U||"ErrnoError"!==g.name)throw g;return g.Ob}},D:function(a){try{var b=S(a);return Zc(c=>{var d=b.node.Ub;d.type.Qc?d.type.Qc(d,!1,e=>{e?c(29):c(0)}):c(0)})}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c; return c.Ob}},t:function(a,b,c,d){try{a:{var e=S(a);a=b;for(var h,g=b=0;g>2],k=B[a+4>>2];a+=8;var l=e,r=n,m=k,q=h,x=w;if(0>m||0>q)throw new N(28);if(null===l.Wb)throw new N(8);if(0===(l.flags&2097155))throw new N(8);if(P(l.node.mode))throw new N(31);if(!l.Mb.write)throw new N(28);l.seekable&&l.flags&1024&&Hb(l,0,2);var A="undefined"!=typeof q;if(!A)q=l.position;else if(!l.seekable)throw new N(70);var G=l.Mb.write(l,x,r,m,q,void 0);A||(l.position+=G);var E=G;if(0>E){var L=-1;break a}b+= -E;"undefined"!==typeof h&&(h+=E)}L=b}B[d>>2]=L;return 0}catch(H){if("undefined"==typeof U||"ErrnoError"!==H.name)throw H;return H.Ob}},ra:Yb,N:Zb,ga:$b,ca:ac,Y:bc,la:cc,G:dc,h:ec,oa:fc,ja:gc,ea:hc,fa:ic,k:jc,v:kc,pa:lc,g:mc,qa:nc,da:oc,ha:pc,ia:qc,na:rc,c:sc,ka:tc,ma:uc,aa:vc,V:wc,$:xc,ba:yc,S:zc,U:Ac,Z:Bc,X:Cc,R:Dc,Q:Ec,T:Fc,_:Gc,O:Hc,W:Ic,P:Jc},Y=function(){function a(c){c=c.exports;Y=c=Nc(c);ma=Y.sa;ra();ta.unshift(Y.ta);C--;f.monitorRunDependencies&&f.monitorRunDependencies(C);if(0==C&&(null!== -ya&&(clearInterval(ya),ya=null),za)){var d=za;za=null;d()}return c}var b={a:jd};C++;f.monitorRunDependencies&&f.monitorRunDependencies(C);if(f.instantiateWasm)try{return f.instantiateWasm(b,a)}catch(c){t(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ga(b,function(c){a(c.instance)}).catch(ba);return{}}();f._sqlite3_vfs_find=a=>(f._sqlite3_vfs_find=Y.ua)(a);f._sqlite3_malloc=a=>(f._sqlite3_malloc=Y.va)(a);f._sqlite3_free=a=>(f._sqlite3_free=Y.wa)(a); -f._sqlite3_prepare_v2=(a,b,c,d,e)=>(f._sqlite3_prepare_v2=Y.xa)(a,b,c,d,e);f._sqlite3_step=a=>(f._sqlite3_step=Y.ya)(a);f._sqlite3_column_int64=(a,b)=>(f._sqlite3_column_int64=Y.za)(a,b);f._sqlite3_column_int=(a,b)=>(f._sqlite3_column_int=Y.Aa)(a,b);f._sqlite3_finalize=a=>(f._sqlite3_finalize=Y.Ba)(a);f._sqlite3_reset=a=>(f._sqlite3_reset=Y.Ca)(a);f._sqlite3_clear_bindings=a=>(f._sqlite3_clear_bindings=Y.Da)(a);f._sqlite3_value_blob=a=>(f._sqlite3_value_blob=Y.Ea)(a); -f._sqlite3_value_text=a=>(f._sqlite3_value_text=Y.Fa)(a);f._sqlite3_value_bytes=a=>(f._sqlite3_value_bytes=Y.Ga)(a);f._sqlite3_value_double=a=>(f._sqlite3_value_double=Y.Ha)(a);f._sqlite3_value_int=a=>(f._sqlite3_value_int=Y.Ia)(a);f._sqlite3_value_int64=a=>(f._sqlite3_value_int64=Y.Ja)(a);f._sqlite3_value_type=a=>(f._sqlite3_value_type=Y.Ka)(a);f._sqlite3_result_blob=(a,b,c,d)=>(f._sqlite3_result_blob=Y.La)(a,b,c,d);f._sqlite3_result_double=(a,b)=>(f._sqlite3_result_double=Y.Ma)(a,b); -f._sqlite3_result_error=(a,b,c)=>(f._sqlite3_result_error=Y.Na)(a,b,c);f._sqlite3_result_int=(a,b)=>(f._sqlite3_result_int=Y.Oa)(a,b);f._sqlite3_result_int64=(a,b,c)=>(f._sqlite3_result_int64=Y.Pa)(a,b,c);f._sqlite3_result_null=a=>(f._sqlite3_result_null=Y.Qa)(a);f._sqlite3_result_text=(a,b,c,d)=>(f._sqlite3_result_text=Y.Ra)(a,b,c,d);f._sqlite3_column_count=a=>(f._sqlite3_column_count=Y.Sa)(a);f._sqlite3_data_count=a=>(f._sqlite3_data_count=Y.Ta)(a); -f._sqlite3_column_blob=(a,b)=>(f._sqlite3_column_blob=Y.Ua)(a,b);f._sqlite3_column_bytes=(a,b)=>(f._sqlite3_column_bytes=Y.Va)(a,b);f._sqlite3_column_double=(a,b)=>(f._sqlite3_column_double=Y.Wa)(a,b);f._sqlite3_column_text=(a,b)=>(f._sqlite3_column_text=Y.Xa)(a,b);f._sqlite3_column_type=(a,b)=>(f._sqlite3_column_type=Y.Ya)(a,b);f._sqlite3_column_name=(a,b)=>(f._sqlite3_column_name=Y.Za)(a,b);f._sqlite3_bind_blob=(a,b,c,d,e)=>(f._sqlite3_bind_blob=Y._a)(a,b,c,d,e); -f._sqlite3_bind_double=(a,b,c)=>(f._sqlite3_bind_double=Y.$a)(a,b,c);f._sqlite3_bind_int=(a,b,c)=>(f._sqlite3_bind_int=Y.ab)(a,b,c);f._sqlite3_bind_int64=(a,b,c,d)=>(f._sqlite3_bind_int64=Y.bb)(a,b,c,d);f._sqlite3_bind_null=(a,b)=>(f._sqlite3_bind_null=Y.cb)(a,b);f._sqlite3_bind_text=(a,b,c,d,e)=>(f._sqlite3_bind_text=Y.db)(a,b,c,d,e);f._sqlite3_bind_parameter_count=a=>(f._sqlite3_bind_parameter_count=Y.eb)(a);f._sqlite3_bind_parameter_name=(a,b)=>(f._sqlite3_bind_parameter_name=Y.fb)(a,b); -f._sqlite3_sql=a=>(f._sqlite3_sql=Y.gb)(a);f._sqlite3_exec=(a,b,c,d,e)=>(f._sqlite3_exec=Y.hb)(a,b,c,d,e);f._sqlite3_errmsg=a=>(f._sqlite3_errmsg=Y.ib)(a);f._sqlite3_declare_vtab=(a,b)=>(f._sqlite3_declare_vtab=Y.jb)(a,b);f._sqlite3_libversion=()=>(f._sqlite3_libversion=Y.kb)();f._sqlite3_libversion_number=()=>(f._sqlite3_libversion_number=Y.lb)();f._sqlite3_changes=a=>(f._sqlite3_changes=Y.mb)(a);f._sqlite3_close=a=>(f._sqlite3_close=Y.nb)(a); -f._sqlite3_limit=(a,b,c)=>(f._sqlite3_limit=Y.ob)(a,b,c);f._sqlite3_open_v2=(a,b,c,d)=>(f._sqlite3_open_v2=Y.pb)(a,b,c,d);f._sqlite3_get_autocommit=a=>(f._sqlite3_get_autocommit=Y.qb)(a);var hd=()=>(hd=Y.rb)(),Tb=f._malloc=a=>(Tb=f._malloc=Y.sb)(a),bd=f._free=a=>(bd=f._free=Y.tb)(a);f._RegisterExtensionFunctions=a=>(f._RegisterExtensionFunctions=Y.ub)(a);f._set_authorizer=a=>(f._set_authorizer=Y.vb)(a);f._create_function=(a,b,c,d,e,h)=>(f._create_function=Y.wb)(a,b,c,d,e,h); -f._create_module=(a,b,c,d)=>(f._create_module=Y.xb)(a,b,c,d);f._progress_handler=(a,b)=>(f._progress_handler=Y.yb)(a,b);f._register_vfs=(a,b,c,d)=>(f._register_vfs=Y.zb)(a,b,c,d);f._getSqliteFree=()=>(f._getSqliteFree=Y.Ab)();var kd=f._main=(a,b)=>(kd=f._main=Y.Bb)(a,b),db=(a,b)=>(db=Y.Db)(a,b),ld=()=>(ld=Y.Eb)(),gd=()=>(gd=Y.Fb)(),ed=a=>(ed=Y.Gb)(a),fd=a=>(fd=Y.Hb)(a),$c=a=>($c=Y.Ib)(a),Pc=()=>(Pc=Y.Jb)(),Zc=a=>(Zc=Y.Kb)(a),ad=()=>(ad=Y.Lb)();f.getTempRet0=ld;f.ccall=Z; -f.cwrap=(a,b,c,d)=>{var e=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&e&&!d?f["_"+a]:function(){return Z(a,b,c,arguments,d)}};f.setValue=J;f.getValue=I;f.UTF8ToString=(a,b)=>a?K(y,a,b):"";f.stringToUTF8=(a,b,c)=>Sa(a,y,b,c);f.lengthBytesUTF8=Ra;var md;za=function nd(){md||od();md||(za=nd)}; -function od(){function a(){if(!md&&(md=!0,f.calledRun=!0,!v)){f.noFSInit||Jb||(Jb=!0,Ib(),f.stdin=f.stdin,f.stdout=f.stdout,f.stderr=f.stderr,f.stdin?Kb("stdin",f.stdin):zb("/dev/tty","/dev/stdin"),f.stdout?Kb("stdout",null,f.stdout):zb("/dev/tty","/dev/stdout"),f.stderr?Kb("stderr",null,f.stderr):zb("/dev/tty1","/dev/stderr"),Fb("/dev/stdin",0),Fb("/dev/stdout",1),Fb("/dev/stderr",1));jb=!1;Ia(ta);Ia(ua);aa(f);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(pd){var b=kd;try{var c=b(0,0);na= -c;Kc(c)}catch(d){Lc(d)}}if(f.postRun)for("function"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;)b=f.postRun.shift(),va.unshift(b);Ia(va)}}if(!(0>2]=L;return 0}catch(H){if("undefined"==typeof U||"ErrnoError"!==H.name)throw H;return H.Ob}},ra:Yb,N:Zb,ga:$b,ca:ac,Y:bc,la:cc,G:dc,h:ec,oa:fc,ja:gc,ea:hc,fa:ic,k:jc,v:kc,pa:lc,g:mc,qa:nc,da:oc,ha:pc,ia:qc,na:rc,c:sc,ka:tc,ma:uc,aa:vc,V:wc,$:xc,ba:yc,S:zc,U:Ac,Z:Bc,X:Cc,R:Dc,Q:Ec,T:Fc,_:Gc,O:Hc,W:Ic,P:Jc},V=function(){function a(c){V=c.exports;V=Oc();ma=V.sa;ra();ta.unshift(V.ta);C--;f.monitorRunDependencies&&f.monitorRunDependencies(C);0==C&&(null!==xa&& +(clearInterval(xa),xa=null),ya&&(c=ya,ya=null,c()));return V}var b={a:kd};C++;f.monitorRunDependencies&&f.monitorRunDependencies(C);if(f.instantiateWasm)try{return f.instantiateWasm(b,a)}catch(c){t(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Fa(b,function(c){a(c.instance)}).catch(ba);return{}}();f._sqlite3_vfs_find=a=>(f._sqlite3_vfs_find=V.ua)(a);f._sqlite3_malloc=a=>(f._sqlite3_malloc=V.va)(a);f._sqlite3_free=a=>(f._sqlite3_free=V.wa)(a); +f._sqlite3_prepare_v2=(a,b,c,d,e)=>(f._sqlite3_prepare_v2=V.xa)(a,b,c,d,e);f._sqlite3_step=a=>(f._sqlite3_step=V.ya)(a);f._sqlite3_column_int64=(a,b)=>(f._sqlite3_column_int64=V.za)(a,b);f._sqlite3_column_int=(a,b)=>(f._sqlite3_column_int=V.Aa)(a,b);f._sqlite3_finalize=a=>(f._sqlite3_finalize=V.Ba)(a);f._sqlite3_reset=a=>(f._sqlite3_reset=V.Ca)(a);f._sqlite3_clear_bindings=a=>(f._sqlite3_clear_bindings=V.Da)(a);f._sqlite3_value_blob=a=>(f._sqlite3_value_blob=V.Ea)(a); +f._sqlite3_value_text=a=>(f._sqlite3_value_text=V.Fa)(a);f._sqlite3_value_bytes=a=>(f._sqlite3_value_bytes=V.Ga)(a);f._sqlite3_value_double=a=>(f._sqlite3_value_double=V.Ha)(a);f._sqlite3_value_int=a=>(f._sqlite3_value_int=V.Ia)(a);f._sqlite3_value_int64=a=>(f._sqlite3_value_int64=V.Ja)(a);f._sqlite3_value_type=a=>(f._sqlite3_value_type=V.Ka)(a);f._sqlite3_result_blob=(a,b,c,d)=>(f._sqlite3_result_blob=V.La)(a,b,c,d);f._sqlite3_result_double=(a,b)=>(f._sqlite3_result_double=V.Ma)(a,b); +f._sqlite3_result_error=(a,b,c)=>(f._sqlite3_result_error=V.Na)(a,b,c);f._sqlite3_result_int=(a,b)=>(f._sqlite3_result_int=V.Oa)(a,b);f._sqlite3_result_int64=(a,b,c)=>(f._sqlite3_result_int64=V.Pa)(a,b,c);f._sqlite3_result_null=a=>(f._sqlite3_result_null=V.Qa)(a);f._sqlite3_result_text=(a,b,c,d)=>(f._sqlite3_result_text=V.Ra)(a,b,c,d);f._sqlite3_column_count=a=>(f._sqlite3_column_count=V.Sa)(a);f._sqlite3_data_count=a=>(f._sqlite3_data_count=V.Ta)(a); +f._sqlite3_column_blob=(a,b)=>(f._sqlite3_column_blob=V.Ua)(a,b);f._sqlite3_column_bytes=(a,b)=>(f._sqlite3_column_bytes=V.Va)(a,b);f._sqlite3_column_double=(a,b)=>(f._sqlite3_column_double=V.Wa)(a,b);f._sqlite3_column_text=(a,b)=>(f._sqlite3_column_text=V.Xa)(a,b);f._sqlite3_column_type=(a,b)=>(f._sqlite3_column_type=V.Ya)(a,b);f._sqlite3_column_name=(a,b)=>(f._sqlite3_column_name=V.Za)(a,b);f._sqlite3_bind_blob=(a,b,c,d,e)=>(f._sqlite3_bind_blob=V._a)(a,b,c,d,e); +f._sqlite3_bind_double=(a,b,c)=>(f._sqlite3_bind_double=V.$a)(a,b,c);f._sqlite3_bind_int=(a,b,c)=>(f._sqlite3_bind_int=V.ab)(a,b,c);f._sqlite3_bind_int64=(a,b,c,d)=>(f._sqlite3_bind_int64=V.bb)(a,b,c,d);f._sqlite3_bind_null=(a,b)=>(f._sqlite3_bind_null=V.cb)(a,b);f._sqlite3_bind_text=(a,b,c,d,e)=>(f._sqlite3_bind_text=V.db)(a,b,c,d,e);f._sqlite3_bind_parameter_count=a=>(f._sqlite3_bind_parameter_count=V.eb)(a);f._sqlite3_bind_parameter_name=(a,b)=>(f._sqlite3_bind_parameter_name=V.fb)(a,b); +f._sqlite3_sql=a=>(f._sqlite3_sql=V.gb)(a);f._sqlite3_exec=(a,b,c,d,e)=>(f._sqlite3_exec=V.hb)(a,b,c,d,e);f._sqlite3_errmsg=a=>(f._sqlite3_errmsg=V.ib)(a);f._sqlite3_declare_vtab=(a,b)=>(f._sqlite3_declare_vtab=V.jb)(a,b);f._sqlite3_libversion=()=>(f._sqlite3_libversion=V.kb)();f._sqlite3_libversion_number=()=>(f._sqlite3_libversion_number=V.lb)();f._sqlite3_changes=a=>(f._sqlite3_changes=V.mb)(a);f._sqlite3_close=a=>(f._sqlite3_close=V.nb)(a); +f._sqlite3_limit=(a,b,c)=>(f._sqlite3_limit=V.ob)(a,b,c);f._sqlite3_open_v2=(a,b,c,d)=>(f._sqlite3_open_v2=V.pb)(a,b,c,d);f._sqlite3_get_autocommit=a=>(f._sqlite3_get_autocommit=V.qb)(a);var jd=()=>(jd=V.rb)(),Tb=f._malloc=a=>(Tb=f._malloc=V.sb)(a),cd=f._free=a=>(cd=f._free=V.tb)(a);f._RegisterExtensionFunctions=a=>(f._RegisterExtensionFunctions=V.ub)(a);f._set_authorizer=a=>(f._set_authorizer=V.vb)(a);f._create_function=(a,b,c,d,e,h)=>(f._create_function=V.wb)(a,b,c,d,e,h); +f._create_module=(a,b,c,d)=>(f._create_module=V.xb)(a,b,c,d);f._progress_handler=(a,b)=>(f._progress_handler=V.yb)(a,b);f._register_vfs=(a,b,c,d)=>(f._register_vfs=V.zb)(a,b,c,d);f._getSqliteFree=()=>(f._getSqliteFree=V.Ab)();var ld=f._main=(a,b)=>(ld=f._main=V.Bb)(a,b),db=(a,b)=>(db=V.Db)(a,b),md=()=>(md=V.Eb)(),hd=()=>(hd=V.Fb)(),fd=a=>(fd=V.Gb)(a),gd=a=>(gd=V.Hb)(a),ad=a=>(ad=V.Ib)(a),Qc=()=>(Qc=V.Jb)(),$c=a=>($c=V.Kb)(a),bd=()=>(bd=V.Lb)();f.getTempRet0=md;f.ccall=Z; +f.cwrap=(a,b,c,d)=>{var e=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&e&&!d?f["_"+a]:function(){return Z(a,b,c,arguments,d)}};f.setValue=J;f.getValue=I;f.UTF8ToString=(a,b)=>a?K(y,a,b):"";f.stringToUTF8=(a,b,c)=>Sa(a,y,b,c);f.lengthBytesUTF8=Ra;var nd;ya=function od(){nd||pd();nd||(ya=od)}; +function pd(){function a(){if(!nd&&(nd=!0,f.calledRun=!0,!v)){f.noFSInit||Jb||(Jb=!0,Ib(),f.stdin=f.stdin,f.stdout=f.stdout,f.stderr=f.stderr,f.stdin?Kb("stdin",f.stdin):zb("/dev/tty","/dev/stdin"),f.stdout?Kb("stdout",null,f.stdout):zb("/dev/tty","/dev/stdout"),f.stderr?Kb("stderr",null,f.stderr):zb("/dev/tty1","/dev/stderr"),Fb("/dev/stdin",0),Fb("/dev/stdout",1),Fb("/dev/stderr",1));jb=!1;Ha(ta);Ha(ua);aa(f);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(qd){var b=ld;try{var c=b(0,0);na= +c;Lc(c)}catch(d){Mc(d)}}if(f.postRun)for("function"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;)b=f.postRun.shift(),va.unshift(b);Ha(va)}}if(!(0{aa=a;ba=b});var ca=Object.assign({},f),ea="./this.program",fa=(a,b)=>{throw b;},ha="object"==typeof window,ia="function"==typeof importScripts,q="",ja; if(ha||ia)ia?q=self.location.href:"undefined"!=typeof document&&document.currentScript&&(q=document.currentScript.src),_scriptDir&&(q=_scriptDir),0!==q.indexOf("blob:")?q=q.substr(0,q.replace(/[?#].*/,"").lastIndexOf("/")+1):q="",ia&&(ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var ka=f.print||console.log.bind(console),t=f.printErr||console.error.bind(console);Object.assign(f,ca);ca=null;f.thisProgram&&(ea=f.thisProgram); -f.quit&&(fa=f.quit);var la;f.wasmBinary&&(la=f.wasmBinary);var noExitRuntime=f.noExitRuntime||!0;"object"!=typeof WebAssembly&&u("no native wasm support detected");var ma,na=!1,v,w,oa,x,z,pa,qa;function ra(){var a=ma.buffer;f.HEAP8=v=new Int8Array(a);f.HEAP16=oa=new Int16Array(a);f.HEAPU8=w=new Uint8Array(a);f.HEAPU16=new Uint16Array(a);f.HEAP32=x=new Int32Array(a);f.HEAPU32=z=new Uint32Array(a);f.HEAPF32=pa=new Float32Array(a);f.HEAPF64=qa=new Float64Array(a)}var sa=[],ta=[],ua=[],va=[]; -function wa(){var a=f.preRun.shift();sa.unshift(a)}var B=0,xa=null,ya=null;function u(a){if(f.onAbort)f.onAbort(a);a="Aborted("+a+")";t(a);na=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}function za(a){return a.startsWith("data:application/octet-stream;base64,")}var C;if(f.locateFile){if(C="wa-sqlite.wasm",!za(C)){var Aa=C;C=f.locateFile?f.locateFile(Aa,q):q+Aa}}else C=(new URL("wa-sqlite.wasm",import.meta.url)).href; +f.quit&&(fa=f.quit);var la;f.wasmBinary&&(la=f.wasmBinary);"object"!=typeof WebAssembly&&u("no native wasm support detected");var ma,na=!1,v,w,oa,x,z,pa,qa;function ra(){var a=ma.buffer;f.HEAP8=v=new Int8Array(a);f.HEAP16=oa=new Int16Array(a);f.HEAPU8=w=new Uint8Array(a);f.HEAPU16=new Uint16Array(a);f.HEAP32=x=new Int32Array(a);f.HEAPU32=z=new Uint32Array(a);f.HEAPF32=pa=new Float32Array(a);f.HEAPF64=qa=new Float64Array(a)}var sa=[],ta=[],ua=[],va=[]; +function wa(){var a=f.preRun.shift();sa.unshift(a)}var B=0,xa=null,ya=null;function u(a){if(f.onAbort)f.onAbort(a);a="Aborted("+a+")";t(a);na=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var za=a=>a.startsWith("data:application/octet-stream;base64,"),C;if(f.locateFile){if(C="wa-sqlite.wasm",!za(C)){var Aa=C;C=f.locateFile?f.locateFile(Aa,q):q+Aa}}else C=(new URL("wa-sqlite.wasm",import.meta.url)).href; function Ba(a){if(a==C&&la)return new Uint8Array(la);if(ja)return ja(a);throw"both async and sync fetching of the wasm failed";}function Ca(a){return la||!ha&&!ia||"function"!=typeof fetch?Promise.resolve().then(()=>Ba(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>Ba(a))} function Da(a,b,c){return Ca(a).then(d=>WebAssembly.instantiate(d,b)).then(d=>d).then(c,d=>{t(`failed to asynchronously prepare wasm: ${d}`);u(d)})}function Ea(a,b){var c=C;return la||"function"!=typeof WebAssembly.instantiateStreaming||za(c)||"function"!=typeof fetch?Da(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){t(`wasm streaming compile failed: ${e}`);t("falling back to ArrayBuffer instantiation");return Da(c,a,b)}))}var D,F; function Fa(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ga=a=>{for(;0>0];case "i8":return v[a>>0];case "i16":return oa[a>>1];case "i32":return x[a>>2];case "i64":u("to do getValue(i64) use WASM_BIGINT");case "float":return pa[a>>2];case "double":return qa[a>>3];case "*":return z[a>>2];default:u(`invalid type for getValue: ${b}`)}} -function J(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":v[a>>0]=b;break;case "i8":v[a>>0]=b;break;case "i16":oa[a>>1]=b;break;case "i32":x[a>>2]=b;break;case "i64":u("to do setValue(i64) use WASM_BIGINT");case "float":pa[a>>2]=b;break;case "double":qa[a>>3]=b;break;case "*":z[a>>2]=b;break;default:u(`invalid type for setValue: ${c}`)}} -var Ha="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(a,b,c)=>{var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}, -Ia=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},M=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ia(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Ja=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},Ka=a=>{if("/"=== -a)return"/";a=M(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},La=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);u("initRandomDevice")},Ma=a=>(Ma=La())(a); -function Na(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Ia(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."} -var Oa=[],N=a=>{for(var b=0,c=0;c=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},O=(a,b,c,d)=>{if(!(0=g){var m=a.charCodeAt(++h);g=65536+((g&1023)<<10)|m&1023}if(127>=g){if(c>=d)break;b[c++]=g}else{if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6}else{if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>> -12&63}b[c++]=128|g>>6&63}b[c++]=128|g&63}}b[c]=0;return c-e},Pa=[];function Qa(a,b){Pa[a]={input:[],Nb:[],Zb:b};Ra(a,Sa)} -var Sa={open(a){var b=Pa[a.node.bc];if(!b)throw new P(43);a.Ob=b;a.seekable=!1},close(a){a.Ob.Zb.Wb(a.Ob)},Wb(a){a.Ob.Zb.Wb(a.Ob)},read(a,b,c,d){if(!a.Ob||!a.Ob.Zb.sc)throw new P(60);for(var e=0,h=0;h=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Jb,a.Jb=new Uint8Array(b),0>0]=b;break;case "i8":v[a>>0]=b;break;case "i16":oa[a>>1]=b;break;case "i32":x[a>>2]=b;break;case "i64":u("to do setValue(i64) use WASM_BIGINT");case "float":pa[a>>2]=b;break;case "double":qa[a>>3]=b;break;case "*":z[a>>2]=b;break;default:u(`invalid type for setValue: ${c}`)}} +var Ia="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(a,b,c)=>{var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}, +Ja=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},M=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ja(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Ka=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},La=a=>{if("/"=== +a)return"/";a=M(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Ma=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);u("initRandomDevice")},Na=a=>(Na=Ma())(a); +function Oa(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Ja(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."} +var Pa=[],N=a=>{for(var b=0,c=0;c=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},O=(a,b,c,d)=>{if(!(0=g){var m=a.charCodeAt(++h);g=65536+((g&1023)<<10)|m&1023}if(127>=g){if(c>=d)break;b[c++]=g}else{if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6}else{if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>> +12&63}b[c++]=128|g>>6&63}b[c++]=128|g&63}}b[c]=0;return c-e},Qa=[];function Ra(a,b){Qa[a]={input:[],Nb:[],Zb:b};Sa(a,Ta)} +var Ta={open(a){var b=Qa[a.node.bc];if(!b)throw new P(43);a.Ob=b;a.seekable=!1},close(a){a.Ob.Zb.Wb(a.Ob)},Wb(a){a.Ob.Zb.Wb(a.Ob)},read(a,b,c,d){if(!a.Ob||!a.Ob.Zb.sc)throw new P(60);for(var e=0,h=0;h=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Jb,a.Jb=new Uint8Array(b),0=a.node.Lb)return 0;a=Math.min(a.node.Lb-e,d);if(8b)throw new P(28);return b},pc(a,b,c){Va(a.node,b+c);a.node.Lb=Math.max(a.node.Lb,b+c)},fc(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new P(43);a=a.node.Jb;if(e&2||a.buffer!== -v.buffer){if(0{var c=0;a&&(c|=365);b&&(c|=146);return c},bb=null,cb={},db=[],eb=1,S=null,fb=!0,P=null,Ya={}; -function T(a,b={}){a=Na(a);if(!a)return{path:"",node:null};b=Object.assign({rc:!0,nc:0},b);if(8!!g);for(var c=bb,d="/",e=0;e>>0)%S.length}function jb(a){var b=ib(a.parent.id,a.name);if(S[b]===a)S[b]=a.Yb;else for(b=S[b];b;){if(b.Yb===a){b.Yb=a.Yb;break}b=b.Yb}} -function Za(a,b){var c;if(c=(c=kb(a,"x"))?c:a.Cb.$b?0:2)throw new P(c,a);for(c=S[ib(a.id,b)];c;c=c.Yb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Cb.$b(a,b)}function Xa(a,b,c,d){a=new lb(a,b,c,d);b=ib(a.parent.id,a.name);a.Yb=S[b];return S[b]=a}function R(a){return 16384===(a&61440)}function mb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b} -function kb(a,b){if(fb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function nb(a,b){try{return Za(a,b),20}catch(c){}return kb(a,"wx")}function ob(a,b,c){try{var d=Za(a,b)}catch(e){return e.Kb}if(a=kb(a,"wx"))return a;if(c){if(!R(d.mode))return 54;if(d===d.parent||"/"===hb(d))return 10}else if(R(d.mode))return 31;return 0}function pb(){for(var a=0;4096>=a;a++)if(!db[a])return a;throw new P(33);} -function V(a){a=db[a];if(!a)throw new P(8);return a}function qb(a,b=-1){rb||(rb=function(){this.dc={}},rb.prototype={},Object.defineProperties(rb.prototype,{object:{get(){return this.node},set(c){this.node=c}},flags:{get(){return this.dc.flags},set(c){this.dc.flags=c}},position:{get(){return this.dc.position},set(c){this.dc.position=c}}}));a=Object.assign(new rb,a);-1==b&&(b=pb());a.Sb=b;return db[b]=a}var Wa={open(a){a.Ib=cb[a.node.bc].Ib;a.Ib.open&&a.Ib.open(a)},Vb(){throw new P(70);}}; -function Ra(a,b){cb[a]={Ib:b}}function sb(a,b){var c="/"===b,d=!b;if(c&&bb)throw new P(10);if(!c&&!d){var e=T(b,{rc:!1});b=e.path;e=e.node;if(e.Xb)throw new P(10);if(!R(e.mode))throw new P(54);}b={type:a,Wc:{},uc:b,Gc:[]};a=a.Rb(b);a.Rb=b;b.root=a;c?bb=a:e&&(e.Xb=b,e.Rb&&e.Rb.Gc.push(b))}function tb(a,b,c){var d=T(a,{parent:!0}).node;a=Ka(a);if(!a||"."===a||".."===a)throw new P(28);var e=nb(d,a);if(e)throw new P(e);if(!d.Cb.ec)throw new P(63);return d.Cb.ec(d,a,b,c)} -function W(a,b){return tb(a,(void 0!==b?b:511)&1023|16384,0)}function ub(a,b,c){"undefined"==typeof c&&(c=b,b=438);tb(a,b|8192,c)}function vb(a,b){if(!Na(a))throw new P(44);var c=T(b,{parent:!0}).node;if(!c)throw new P(44);b=Ka(b);var d=nb(c,b);if(d)throw new P(d);if(!c.Cb.jc)throw new P(63);c.Cb.jc(c,b,a)}function wb(a){var b=T(a,{parent:!0}).node;a=Ka(a);var c=Za(b,a),d=ob(b,a,!0);if(d)throw new P(d);if(!b.Cb.ic)throw new P(63);if(c.Xb)throw new P(10);b.Cb.ic(b,a);jb(c)} -function gb(a){a=T(a).node;if(!a)throw new P(44);if(!a.Cb.cc)throw new P(28);return Na(hb(a.parent),a.Cb.cc(a))}function xb(a,b){a=T(a,{Ub:!b}).node;if(!a)throw new P(44);if(!a.Cb.Pb)throw new P(63);return a.Cb.Pb(a)}function yb(a){return xb(a,!0)}function zb(a,b){a="string"==typeof a?T(a,{Ub:!0}).node:a;if(!a.Cb.Mb)throw new P(63);a.Cb.Mb(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} -function Ab(a,b){if(0>b)throw new P(28);a="string"==typeof a?T(a,{Ub:!0}).node:a;if(!a.Cb.Mb)throw new P(63);if(R(a.mode))throw new P(31);if(32768!==(a.mode&61440))throw new P(28);var c=kb(a,"w");if(c)throw new P(c);a.Cb.Mb(a,{size:b,timestamp:Date.now()})} -function Bb(a,b,c){if(""===a)throw new P(44);if("string"==typeof b){var d={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof d)throw Error(`Unknown file open mode: ${b}`);b=d}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var e=a;else{a=M(a);try{e=T(a,{Ub:!(b&131072)}).node}catch(h){}}d=!1;if(b&64)if(e){if(b&128)throw new P(20);}else e=tb(a,c,0),d=!0;if(!e)throw new P(44);8192===(e.mode&61440)&&(b&=-513);if(b&65536&&!R(e.mode))throw new P(54);if(!d&&(c= -e?40960===(e.mode&61440)?32:R(e.mode)&&("r"!==mb(b)||b&512)?31:kb(e,mb(b)):44))throw new P(c);b&512&&!d&&Ab(e,0);b&=-131713;e=qb({node:e,path:hb(e),flags:b,seekable:!0,position:0,Ib:e.Ib,Lc:[],error:!1});e.Ib.open&&e.Ib.open(e);!f.logReadFiles||b&1||(Cb||(Cb={}),a in Cb||(Cb[a]=1));return e}function Db(a,b,c){if(null===a.Sb)throw new P(8);if(!a.seekable||!a.Ib.Vb)throw new P(70);if(0!=c&&1!=c&&2!=c)throw new P(28);a.position=a.Ib.Vb(a,b,c);a.Lc=[]} -function Eb(){P||(P=function(a,b){this.name="ErrnoError";this.node=b;this.Kc=function(c){this.Kb=c};this.Kc(a);this.message="FS error"},P.prototype=Error(),P.prototype.constructor=P,[44].forEach(a=>{Ya[a]=new P(a);Ya[a].stack=""}))}var Fb; -function Gb(a,b,c){a=M("/dev/"+a);var d=ab(!!b,!!c);Hb||(Hb=64);var e=Hb++<<8|0;Ra(e,{open(h){h.seekable=!1},close(){c&&c.buffer&&c.buffer.length&&c(10)},read(h,g,m,l){for(var k=0,p=0;p>2]=d.Cc;x[c+4>>2]=d.mode;z[c+8>>2]=d.Ic;x[c+12>>2]=d.uid;x[c+16>>2]=d.Ec;x[c+20>>2]=d.bc;F=[d.size>>>0,(D=d.size,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+24>>2]=F[0];x[c+28>>2]=F[1];x[c+32>>2]=4096;x[c+36>>2]=d.Ac;a=d.yc.getTime();b=d.Hc.getTime();var e=d.Bc.getTime();F=[Math.floor(a/1E3)>>>0,(D=Math.floor(a/1E3),1<=+Math.abs(D)?0b)throw new P(28);return b},pc(a,b,c){Wa(a.node,b+c);a.node.Lb=Math.max(a.node.Lb,b+c)},fc(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new P(43);a=a.node.Jb;if(e&2||a.buffer!== +v.buffer){if(0{var c=0;a&&(c|=365);b&&(c|=146);return c},cb=null,db={},eb=[],fb=1,S=null,gb=!0,P=null,Za={}; +function T(a,b={}){a=Oa(a);if(!a)return{path:"",node:null};b=Object.assign({rc:!0,nc:0},b);if(8!!g);for(var c=cb,d="/",e=0;e>>0)%S.length}function kb(a){var b=jb(a.parent.id,a.name);if(S[b]===a)S[b]=a.Yb;else for(b=S[b];b;){if(b.Yb===a){b.Yb=a.Yb;break}b=b.Yb}} +function $a(a,b){var c;if(c=(c=lb(a,"x"))?c:a.Cb.$b?0:2)throw new P(c,a);for(c=S[jb(a.id,b)];c;c=c.Yb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Cb.$b(a,b)}function Ya(a,b,c,d){a=new mb(a,b,c,d);b=jb(a.parent.id,a.name);a.Yb=S[b];return S[b]=a}function R(a){return 16384===(a&61440)}function nb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b} +function lb(a,b){if(gb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function ob(a,b){try{return $a(a,b),20}catch(c){}return lb(a,"wx")}function pb(a,b,c){try{var d=$a(a,b)}catch(e){return e.Kb}if(a=lb(a,"wx"))return a;if(c){if(!R(d.mode))return 54;if(d===d.parent||"/"===ib(d))return 10}else if(R(d.mode))return 31;return 0}function qb(){for(var a=0;4096>=a;a++)if(!eb[a])return a;throw new P(33);} +function V(a){a=eb[a];if(!a)throw new P(8);return a}function rb(a,b=-1){sb||(sb=function(){this.dc={}},sb.prototype={},Object.defineProperties(sb.prototype,{object:{get(){return this.node},set(c){this.node=c}},flags:{get(){return this.dc.flags},set(c){this.dc.flags=c}},position:{get(){return this.dc.position},set(c){this.dc.position=c}}}));a=Object.assign(new sb,a);-1==b&&(b=qb());a.Sb=b;return eb[b]=a}var Xa={open(a){a.Ib=db[a.node.bc].Ib;a.Ib.open&&a.Ib.open(a)},Vb(){throw new P(70);}}; +function Sa(a,b){db[a]={Ib:b}}function tb(a,b){var c="/"===b,d=!b;if(c&&cb)throw new P(10);if(!c&&!d){var e=T(b,{rc:!1});b=e.path;e=e.node;if(e.Xb)throw new P(10);if(!R(e.mode))throw new P(54);}b={type:a,Wc:{},uc:b,Gc:[]};a=a.Rb(b);a.Rb=b;b.root=a;c?cb=a:e&&(e.Xb=b,e.Rb&&e.Rb.Gc.push(b))}function ub(a,b,c){var d=T(a,{parent:!0}).node;a=La(a);if(!a||"."===a||".."===a)throw new P(28);var e=ob(d,a);if(e)throw new P(e);if(!d.Cb.ec)throw new P(63);return d.Cb.ec(d,a,b,c)} +function W(a,b){return ub(a,(void 0!==b?b:511)&1023|16384,0)}function vb(a,b,c){"undefined"==typeof c&&(c=b,b=438);ub(a,b|8192,c)}function wb(a,b){if(!Oa(a))throw new P(44);var c=T(b,{parent:!0}).node;if(!c)throw new P(44);b=La(b);var d=ob(c,b);if(d)throw new P(d);if(!c.Cb.jc)throw new P(63);c.Cb.jc(c,b,a)}function xb(a){var b=T(a,{parent:!0}).node;a=La(a);var c=$a(b,a),d=pb(b,a,!0);if(d)throw new P(d);if(!b.Cb.ic)throw new P(63);if(c.Xb)throw new P(10);b.Cb.ic(b,a);kb(c)} +function hb(a){a=T(a).node;if(!a)throw new P(44);if(!a.Cb.cc)throw new P(28);return Oa(ib(a.parent),a.Cb.cc(a))}function yb(a,b){a=T(a,{Ub:!b}).node;if(!a)throw new P(44);if(!a.Cb.Pb)throw new P(63);return a.Cb.Pb(a)}function zb(a){return yb(a,!0)}function Ab(a,b){a="string"==typeof a?T(a,{Ub:!0}).node:a;if(!a.Cb.Mb)throw new P(63);a.Cb.Mb(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} +function Bb(a,b){if(0>b)throw new P(28);a="string"==typeof a?T(a,{Ub:!0}).node:a;if(!a.Cb.Mb)throw new P(63);if(R(a.mode))throw new P(31);if(32768!==(a.mode&61440))throw new P(28);var c=lb(a,"w");if(c)throw new P(c);a.Cb.Mb(a,{size:b,timestamp:Date.now()})} +function Cb(a,b,c){if(""===a)throw new P(44);if("string"==typeof b){var d={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof d)throw Error(`Unknown file open mode: ${b}`);b=d}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var e=a;else{a=M(a);try{e=T(a,{Ub:!(b&131072)}).node}catch(h){}}d=!1;if(b&64)if(e){if(b&128)throw new P(20);}else e=ub(a,c,0),d=!0;if(!e)throw new P(44);8192===(e.mode&61440)&&(b&=-513);if(b&65536&&!R(e.mode))throw new P(54);if(!d&&(c= +e?40960===(e.mode&61440)?32:R(e.mode)&&("r"!==nb(b)||b&512)?31:lb(e,nb(b)):44))throw new P(c);b&512&&!d&&Bb(e,0);b&=-131713;e=rb({node:e,path:ib(e),flags:b,seekable:!0,position:0,Ib:e.Ib,Lc:[],error:!1});e.Ib.open&&e.Ib.open(e);!f.logReadFiles||b&1||(Db||(Db={}),a in Db||(Db[a]=1));return e}function Eb(a,b,c){if(null===a.Sb)throw new P(8);if(!a.seekable||!a.Ib.Vb)throw new P(70);if(0!=c&&1!=c&&2!=c)throw new P(28);a.position=a.Ib.Vb(a,b,c);a.Lc=[]} +function Fb(){P||(P=function(a,b){this.name="ErrnoError";this.node=b;this.Kc=function(c){this.Kb=c};this.Kc(a);this.message="FS error"},P.prototype=Error(),P.prototype.constructor=P,[44].forEach(a=>{Za[a]=new P(a);Za[a].stack=""}))}var Gb; +function Hb(a,b,c){a=M("/dev/"+a);var d=bb(!!b,!!c);Ib||(Ib=64);var e=Ib++<<8|0;Sa(e,{open(h){h.seekable=!1},close(){c&&c.buffer&&c.buffer.length&&c(10)},read(h,g,m,l){for(var k=0,p=0;p>2]=d.Cc;x[c+4>>2]=d.mode;z[c+8>>2]=d.Ic;x[c+12>>2]=d.uid;x[c+16>>2]=d.Ec;x[c+20>>2]=d.bc;F=[d.size>>>0,(D=d.size,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+24>>2]=F[0];x[c+28>>2]=F[1];x[c+32>>2]=4096;x[c+36>>2]=d.Ac;a=d.yc.getTime();b=d.Hc.getTime();var e=d.Bc.getTime();F=[Math.floor(a/1E3)>>>0,(D=Math.floor(a/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+40>>2]=F[0];x[c+44>>2]=F[1];z[c+48>>2]=a%1E3*1E3;F=[Math.floor(b/1E3)>>>0,(D=Math.floor(b/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+56>>2]=F[0];x[c+60>>2]=F[1];z[c+64>>2]=b%1E3*1E3;F=[Math.floor(e/1E3)>>>0,(D=Math.floor(e/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+72>>2]=F[0];x[c+76>>2]=F[1];z[c+80>>2]= -e%1E3*1E3;F=[d.tc>>>0,(D=d.tc,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+88>>2]=F[0];x[c+92>>2]=F[1];return 0}var Kb=void 0;function Lb(){var a=x[Kb>>2];Kb+=4;return a} -var Mb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Nb=[0,31,60,91,121,152,182,213,244,274,305,335],Ob=[0,31,59,90,120,151,181,212,243,273,304,334],Qb=a=>{var b=N(a)+1,c=Pb(b);c&&O(a,w,c,b);return c},Rb={},Tb=()=>{if(!Sb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in Rb)void 0===Rb[b]?delete a[b]:a[b]=Rb[b]; -var c=[];for(b in a)c.push(`${b}=${a[b]}`);Sb=c}return Sb},Sb;function Ub(){}function Vb(){}function Wb(){}function Xb(){}function Yb(){}function Zb(){}function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){} -function wc(){}function xc(){}function yc(){}function zc(){}function Ac(){}function Bc(){}function Cc(){}function Dc(){}function Ec(){}function Fc(){} -var Y=(a,b,c,d)=>{var e={string:k=>{var p=0;if(null!==k&&void 0!==k&&0!==k){p=N(k)+1;var n=Gc(p);O(k,w,n,p);p=n}return p},array:k=>{var p=Gc(k.length);v.set(k,p);return p}};a=f["_"+a];var h=[],g=0;if(d)for(var m=0;m0,write:(d,e,h,g)=>g});ub("/dev/null",259);Qa(1280,Ta);Qa(1536,Ua);ub("/dev/tty",1280);ub("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Ma(a).byteLength);return a[--b]};Gb("random",c);Gb("urandom",c);W("/dev/shm");W("/dev/shm/tmp")})(); -(function(){W("/proc");var a=W("/proc/self");W("/proc/self/fd");sb({Rb(){var b=Xa(a,"fd",16895,73);b.Cb={$b(c,d){var e=V(+d);c={parent:null,Rb:{uc:"fake"},Cb:{cc:()=>e.path}};return c.parent=c}};return b}},"/proc/self/fd")})(); -(function(){const a=new Map;f.setAuthorizer=function(b,c,d){c?a.set(b,{f:c,oc:d}):a.delete(b);return Y("set_authorizer","number",["number"],[b])};Ub=function(b,c,d,e,h,g){if(a.has(b)){const {f:m,oc:l}=a.get(b);return m(l,c,d?d?K(w,d):"":null,e?e?K(w,e):"":null,h?h?K(w,h):"":null,g?g?K(w,g):"":null)}return 0}})(); -(function(){const a=new Map,b=new Map;f.createFunction=function(c,d,e,h,g,m){const l=a.size;a.set(l,{f:m,Tb:g});return Y("create_function","number","number string number number number number".split(" "),[c,d,e,h,l,0])};f.createAggregate=function(c,d,e,h,g,m,l){const k=a.size;a.set(k,{step:m,Dc:l,Tb:g});return Y("create_function","number","number string number number number number".split(" "),[c,d,e,h,k,1])};f.getFunctionUserData=function(c){return b.get(c)};Wb=function(c,d,e,h){c=a.get(c);b.set(d, -c.Tb);c.f(d,new Uint32Array(w.buffer,h,e));b.delete(d)};Yb=function(c,d,e,h){c=a.get(c);b.set(d,c.Tb);c.step(d,new Uint32Array(w.buffer,h,e));b.delete(d)};Vb=function(c,d){c=a.get(c);b.set(d,c.Tb);c.Dc(d);b.delete(d)}})();(function(){const a=new Map;f.progressHandler=function(b,c,d,e){d?a.set(b,{f:d,oc:e}):a.delete(b);return Y("progress_handler",null,["number","number"],[b,c])};Xb=function(b){if(a.has(b)){const {f:c,oc:d}=a.get(b);return c(d)}return 0}})(); +e%1E3*1E3;F=[d.tc>>>0,(D=d.tc,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+88>>2]=F[0];x[c+92>>2]=F[1];return 0}var Lb=void 0;function Mb(){var a=x[+Lb>>2];Lb+=4;return a} +var Nb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Ob=[0,31,60,91,121,152,182,213,244,274,305,335],Pb=[0,31,59,90,120,151,181,212,243,273,304,334],Rb=a=>{var b=N(a)+1,c=Qb(b);c&&O(a,w,c,b);return c},Sb={},Ub=()=>{if(!Tb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in Sb)void 0===Sb[b]?delete a[b]:a[b]=Sb[b]; +var c=[];for(b in a)c.push(`${b}=${a[b]}`);Tb=c}return Tb},Tb;function Vb(){}function Wb(){}function Xb(){}function Yb(){}function Zb(){}function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){} +function xc(){}function yc(){}function zc(){}function Ac(){}function Bc(){}function Cc(){}function Dc(){}function Ec(){}function Fc(){}function Gc(){} +var Y=(a,b,c,d)=>{var e={string:k=>{var p=0;if(null!==k&&void 0!==k&&0!==k){p=N(k)+1;var n=Hc(p);O(k,w,n,p);p=n}return p},array:k=>{var p=Hc(k.length);v.set(k,p);return p}};a=f["_"+a];var h=[],g=0;if(d)for(var m=0;m0,write:(d,e,h,g)=>g});vb("/dev/null",259);Ra(1280,Ua);Ra(1536,Va);vb("/dev/tty",1280);vb("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Na(a).byteLength);return a[--b]};Hb("random",c);Hb("urandom",c);W("/dev/shm");W("/dev/shm/tmp")})(); +(function(){W("/proc");var a=W("/proc/self");W("/proc/self/fd");tb({Rb(){var b=Ya(a,"fd",16895,73);b.Cb={$b(c,d){var e=V(+d);c={parent:null,Rb:{uc:"fake"},Cb:{cc:()=>e.path}};return c.parent=c}};return b}},"/proc/self/fd")})(); +(function(){const a=new Map;f.setAuthorizer=function(b,c,d){c?a.set(b,{f:c,oc:d}):a.delete(b);return Y("set_authorizer","number",["number"],[b])};Vb=function(b,c,d,e,h,g){if(a.has(b)){const {f:m,oc:l}=a.get(b);return m(l,c,d?d?K(w,d):"":null,e?e?K(w,e):"":null,h?h?K(w,h):"":null,g?g?K(w,g):"":null)}return 0}})(); +(function(){const a=new Map,b=new Map;f.createFunction=function(c,d,e,h,g,m){const l=a.size;a.set(l,{f:m,Tb:g});return Y("create_function","number","number string number number number number".split(" "),[c,d,e,h,l,0])};f.createAggregate=function(c,d,e,h,g,m,l){const k=a.size;a.set(k,{step:m,Dc:l,Tb:g});return Y("create_function","number","number string number number number number".split(" "),[c,d,e,h,k,1])};f.getFunctionUserData=function(c){return b.get(c)};Xb=function(c,d,e,h){c=a.get(c);b.set(d, +c.Tb);c.f(d,new Uint32Array(w.buffer,h,e));b.delete(d)};Zb=function(c,d,e,h){c=a.get(c);b.set(d,c.Tb);c.step(d,new Uint32Array(w.buffer,h,e));b.delete(d)};Wb=function(c,d){c=a.get(c);b.set(d,c.Tb);c.Dc(d);b.delete(d)}})();(function(){const a=new Map;f.progressHandler=function(b,c,d,e){d?a.set(b,{f:d,oc:e}):a.delete(b);return Y("progress_handler",null,["number","number"],[b,c])};Yb=function(b){if(a.has(b)){const {f:c,oc:d}=a.get(b);return c(d)}return 0}})(); (function(){function a(l,k){const p=`get${l}`,n=`set${l}`;return new Proxy(new DataView(w.buffer,k,"Int32"===l?4:8),{get(r,y){if(y===p)return function(A,G){if(!G)throw Error("must be little endian");return r[y](A,G)};if(y===n)return function(A,G,E){if(!E)throw Error("must be little endian");return r[y](A,G,E)};if("string"===typeof y&&y.match(/^(get)|(set)/))throw Error("invalid type");return r[y]}})}const b="object"===typeof Asyncify,c=new Map,d=new Map,e=new Map,h=b?new Set:null,g=b?new Set:null, -m=new Map;oc=function(l,k,p,n){m.set(l?K(w,l):"",{size:k,ac:Array.from(new Uint32Array(w.buffer,n,p))})};f.createModule=function(l,k,p,n){b&&(p.handleAsync=Asyncify.Fc);const r=c.size;c.set(r,{module:p,Tb:n});n=0;p.xCreate&&(n|=1);p.xConnect&&(n|=2);p.xBestIndex&&(n|=4);p.xDisconnect&&(n|=8);p.xDestroy&&(n|=16);p.xOpen&&(n|=32);p.xClose&&(n|=64);p.xFilter&&(n|=128);p.xNext&&(n|=256);p.xEof&&(n|=512);p.xColumn&&(n|=1024);p.xRowid&&(n|=2048);p.xUpdate&&(n|=4096);p.xBegin&&(n|=8192);p.xSync&&(n|=16384); -p.xCommit&&(n|=32768);p.xRollback&&(n|=65536);p.xFindFunction&&(n|=131072);p.xRename&&(n|=262144);return Y("create_module","number",["number","string","number","number"],[l,k,r,n])};ec=function(l,k,p,n,r,y){k=c.get(k);d.set(r,k);if(b){h.delete(r);for(const A of h)d.delete(A)}n=Array.from(new Uint32Array(w.buffer,n,p)).map(A=>A?K(w,A):"");return k.module.xCreate(l,k.Tb,n,r,a("Int32",y))};dc=function(l,k,p,n,r,y){k=c.get(k);d.set(r,k);if(b){h.delete(r);for(const A of h)d.delete(A)}n=Array.from(new Uint32Array(w.buffer, -n,p)).map(A=>A?K(w,A):"");return k.module.xConnect(l,k.Tb,n,r,a("Int32",y))};$b=function(l,k){var p=d.get(l),n=m.get("sqlite3_index_info").ac;const r={};r.nConstraint=I(k+n[0],"i32");r.aConstraint=[];var y=I(k+n[1],"*"),A=m.get("sqlite3_index_constraint").size;for(var G=0;GA?K(w,A):"");return k.module.xCreate(l,k.Tb,n,r,a("Int32",y))};ec=function(l,k,p,n,r,y){k=c.get(k);d.set(r,k);if(b){h.delete(r);for(const A of h)d.delete(A)}n=Array.from(new Uint32Array(w.buffer, +n,p)).map(A=>A?K(w,A):"");return k.module.xConnect(l,k.Tb,n,r,a("Int32",y))};ac=function(l,k){var p=d.get(l),n=m.get("sqlite3_index_info").ac;const r={};r.nConstraint=I(k+n[0],"i32");r.aConstraint=[];var y=I(k+n[1],"*"),A=m.get("sqlite3_index_constraint").size;for(var G=0;G>=2;return z[g]+z[g+1]*2**32}const c="object"===typeof Asyncify,d=new Map,e=new Map; -f.registerVFS=function(g,m){if(Y("sqlite3_vfs_find","number",["string"],[g.name]))throw Error(`VFS '${g.name}' already registered`);c&&(g.handleAsync=Asyncify.Fc);var l=g.Vc??64;const k=f._malloc(4);m=Y("register_vfs","number",["string","number","number","number"],[g.name,l,m?1:0,k]);m||(l=I(k,"*"),d.set(l,g));f._free(k);return m};const h=c?new Set:null;tc=function(g){const m=e.get(g);c?h.add(g):e.delete(g);return m.xClose(g)};Ac=function(g,m,l,k){return e.get(g).xRead(g,w.subarray(m,m+l),b(k))}; -Fc=function(g,m,l,k){return e.get(g).xWrite(g,w.subarray(m,m+l),b(k))};Dc=function(g,m){return e.get(g).xTruncate(g,b(m))};Cc=function(g,m){return e.get(g).xSync(g,m)};xc=function(g,m){const l=e.get(g);m=a("BigInt64",m);return l.xFileSize(g,m)};yc=function(g,m){return e.get(g).xLock(g,m)};Ec=function(g,m){return e.get(g).xUnlock(g,m)};sc=function(g,m){const l=e.get(g);m=a("Int32",m);return l.xCheckReservedLock(g,m)};wc=function(g,m,l){const k=e.get(g);l=new DataView(w.buffer,l);return k.xFileControl(g, -m,l)};Bc=function(g){return e.get(g).xSectorSize(g)};vc=function(g){return e.get(g).xDeviceCharacteristics(g)};zc=function(g,m,l,k,p){g=d.get(g);e.set(l,g);if(c){h.delete(l);for(var n of h)e.delete(n)}n=null;if(k&64){n=1;const r=[];for(;n;){const y=w[m++];if(y)r.push(y);else switch(w[m]||(n=null),n){case 1:r.push(63);n=2;break;case 2:r.push(61);n=3;break;case 3:r.push(38),n=2}}n=(new TextDecoder).decode(new Uint8Array(r))}else m&&(n=m?K(w,m):"");p=a("Int32",p);return g.xOpen(n,l,k,p)};uc=function(g, -m,l){return d.get(g).xDelete(m?K(w,m):"",l)};rc=function(g,m,l,k){g=d.get(g);k=a("Int32",k);return g.xAccess(m?K(w,m):"",l,k)}})(); -var Kc={a:(a,b,c,d)=>{u(`Assertion failed: ${a?K(w,a):""}, at: `+[b?b?K(w,b):"":"unknown filename",c,d?d?K(w,d):"":"unknown function"])},K:function(a,b){try{return a=a?K(w,a):"",zb(a,b),0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return-c.Kb}},M:function(a,b,c){try{b=b?K(w,b):"";b=Ib(a,b);if(c&-8)return-28;var d=T(b,{Ub:!0}).node;if(!d)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&kb(d,a)?-2:0}catch(e){if("undefined"==typeof X||"ErrnoError"!==e.name)throw e; -return-e.Kb}},L:function(a,b){try{var c=V(a);zb(c.node,b);return 0}catch(d){if("undefined"==typeof X||"ErrnoError"!==d.name)throw d;return-d.Kb}},J:function(a){try{var b=V(a).node;var c="string"==typeof b?T(b,{Ub:!0}).node:b;if(!c.Cb.Mb)throw new P(63);c.Cb.Mb(c,{timestamp:Date.now()});return 0}catch(d){if("undefined"==typeof X||"ErrnoError"!==d.name)throw d;return-d.Kb}},b:function(a,b,c){Kb=c;try{var d=V(a);switch(b){case 0:var e=Lb();if(0>e)return-28;for(;db[e];)e++;return qb(d,e).Sb;case 1:case 2:return 0; -case 3:return d.flags;case 4:return e=Lb(),d.flags|=e,0;case 5:return e=Lb(),oa[e+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return x[Jc()>>2]=28,-1;default:return-28}}catch(h){if("undefined"==typeof X||"ErrnoError"!==h.name)throw h;return-h.Kb}},I:function(a,b){try{var c=V(a);return Jb(xb,c.path,b)}catch(d){if("undefined"==typeof X||"ErrnoError"!==d.name)throw d;return-d.Kb}},n:function(a,b,c){b=Mb(b,c);try{if(isNaN(b))return 61;var d=V(a);if(0===(d.flags&2097155))throw new P(28); -Ab(d.node,b);return 0}catch(e){if("undefined"==typeof X||"ErrnoError"!==e.name)throw e;return-e.Kb}},C:function(a,b){try{if(0===b)return-28;var c=N("/")+1;if(b=d)return-28;var e=gb(b), -h=Math.min(d,N(e)),g=v[c+h];O(e,w,c,d+1);v[c+h]=g;return h}catch(m){if("undefined"==typeof X||"ErrnoError"!==m.name)throw m;return-m.Kb}},u:function(a){try{return a=a?K(w,a):"",wb(a),0}catch(b){if("undefined"==typeof X||"ErrnoError"!==b.name)throw b;return-b.Kb}},H:function(a,b){try{return a=a?K(w,a):"",Jb(xb,a,b)}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return-c.Kb}},r:function(a,b,c){try{b=b?K(w,b):"";b=Ib(a,b);if(0===c){a=b;var d=T(a,{parent:!0}).node;if(!d)throw new P(44); -var e=Ka(a),h=Za(d,e),g=ob(d,e,!1);if(g)throw new P(g);if(!d.Cb.kc)throw new P(63);if(h.Xb)throw new P(10);d.Cb.kc(d,e);jb(h)}else 512===c?wb(b):u("Invalid flags passed to unlinkat");return 0}catch(m){if("undefined"==typeof X||"ErrnoError"!==m.name)throw m;return-m.Kb}},q:function(a,b,c){try{b=b?K(w,b):"";b=Ib(a,b,!0);if(c){var d=z[c>>2]+4294967296*x[c+4>>2],e=x[c+8>>2];h=1E3*d+e/1E6;c+=16;d=z[c>>2]+4294967296*x[c+4>>2];e=x[c+8>>2];g=1E3*d+e/1E6}else var h=Date.now(),g=h;a=h;var m=T(b,{Ub:!0}).node; -m.Cb.Mb(m,{timestamp:Math.max(a,g)});return 0}catch(l){if("undefined"==typeof X||"ErrnoError"!==l.name)throw l;return-l.Kb}},l:function(a,b,c){a=new Date(1E3*Mb(a,b));x[c>>2]=a.getSeconds();x[c+4>>2]=a.getMinutes();x[c+8>>2]=a.getHours();x[c+12>>2]=a.getDate();x[c+16>>2]=a.getMonth();x[c+20>>2]=a.getFullYear()-1900;x[c+24>>2]=a.getDay();b=a.getFullYear();x[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Ob:Nb)[a.getMonth()]+a.getDate()-1|0;x[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(), -6,1)).getTimezoneOffset();var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();x[c+32>>2]=(b!=d&&a.getTimezoneOffset()==Math.min(d,b))|0},i:function(a,b,c,d,e,h,g,m){e=Mb(e,h);try{if(isNaN(e))return 61;var l=V(d);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new P(2);if(1===(l.flags&2097155))throw new P(2);if(!l.Ib.fc)throw new P(43);var k=l.Ib.fc(l,a,e,b,c);var p=k.Jc;x[g>>2]=k.xc;z[m>>2]=p;return 0}catch(n){if("undefined"==typeof X||"ErrnoError"!==n.name)throw n;return-n.Kb}},j:function(a, -b,c,d,e,h,g){h=Mb(h,g);try{if(isNaN(h))return 61;var m=V(e);if(c&2){if(32768!==(m.node.mode&61440))throw new P(43);d&2||m.Ib.hc&&m.Ib.hc(m,w.slice(a,a+b),h,b,d)}}catch(l){if("undefined"==typeof X||"ErrnoError"!==l.name)throw l;return-l.Kb}},s:(a,b,c)=>{function d(l){return(l=l.toTimeString().match(/\(([A-Za-z ]+)\)$/))?l[1]:"GMT"}var e=(new Date).getFullYear(),h=new Date(e,0,1),g=new Date(e,6,1);e=h.getTimezoneOffset();var m=g.getTimezoneOffset();z[a>>2]=60*Math.max(e,m);x[b>>2]=Number(e!=m);a=d(h); -b=d(g);a=Qb(a);b=Qb(b);m>2]=a,z[c+4>>2]=b):(z[c>>2]=b,z[c+4>>2]=a)},e:()=>Date.now(),d:()=>performance.now(),o:a=>{var b=w.length;a>>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var e=Math;d=Math.max(a,d);a:{e=(e.min.call(e,2147483648,d+(65536-d%65536)%65536)-ma.buffer.byteLength+65535)/65536;try{ma.grow(e);ra();var h=1;break a}catch(g){}h=void 0}if(h)return!0}return!1},A:(a,b)=>{var c=0;Tb().forEach((d,e)=>{var h=b+c;e=z[a+4*e>>2]=h;for(h= -0;h>0]=d.charCodeAt(h);v[e>>0]=0;c+=d.length+1});return 0},B:(a,b)=>{var c=Tb();z[a>>2]=c.length;var d=0;c.forEach(e=>d+=e.length+1);z[b>>2]=d;return 0},f:function(a){try{var b=V(a);if(null===b.Sb)throw new P(8);b.lc&&(b.lc=null);try{b.Ib.close&&b.Ib.close(b)}catch(c){throw c;}finally{db[b.Sb]=null}b.Sb=null;return 0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return c.Kb}},p:function(a,b){try{var c=V(a);v[b>>0]=c.Ob?2:R(c.mode)?3:40960===(c.mode&61440)?7: +f.registerVFS=function(g,m){if(Y("sqlite3_vfs_find","number",["string"],[g.name]))throw Error(`VFS '${g.name}' already registered`);c&&(g.handleAsync=Asyncify.Fc);var l=g.Vc??64;const k=f._malloc(4);m=Y("register_vfs","number",["string","number","number","number"],[g.name,l,m?1:0,k]);m||(l=I(k,"*"),d.set(l,g));f._free(k);return m};const h=c?new Set:null;uc=function(g){const m=e.get(g);c?h.add(g):e.delete(g);return m.xClose(g)};Bc=function(g,m,l,k){return e.get(g).xRead(g,w.subarray(m,m+l),b(k))}; +Gc=function(g,m,l,k){return e.get(g).xWrite(g,w.subarray(m,m+l),b(k))};Ec=function(g,m){return e.get(g).xTruncate(g,b(m))};Dc=function(g,m){return e.get(g).xSync(g,m)};yc=function(g,m){const l=e.get(g);m=a("BigInt64",m);return l.xFileSize(g,m)};zc=function(g,m){return e.get(g).xLock(g,m)};Fc=function(g,m){return e.get(g).xUnlock(g,m)};tc=function(g,m){const l=e.get(g);m=a("Int32",m);return l.xCheckReservedLock(g,m)};xc=function(g,m,l){const k=e.get(g);l=new DataView(w.buffer,l);return k.xFileControl(g, +m,l)};Cc=function(g){return e.get(g).xSectorSize(g)};wc=function(g){return e.get(g).xDeviceCharacteristics(g)};Ac=function(g,m,l,k,p){g=d.get(g);e.set(l,g);if(c){h.delete(l);for(var n of h)e.delete(n)}n=null;if(k&64){n=1;const r=[];for(;n;){const y=w[m++];if(y)r.push(y);else switch(w[m]||(n=null),n){case 1:r.push(63);n=2;break;case 2:r.push(61);n=3;break;case 3:r.push(38),n=2}}n=(new TextDecoder).decode(new Uint8Array(r))}else m&&(n=m?K(w,m):"");p=a("Int32",p);return g.xOpen(n,l,k,p)};vc=function(g, +m,l){return d.get(g).xDelete(m?K(w,m):"",l)};sc=function(g,m,l,k){g=d.get(g);k=a("Int32",k);return g.xAccess(m?K(w,m):"",l,k)}})(); +var Lc={a:(a,b,c,d)=>{u(`Assertion failed: ${a?K(w,a):""}, at: `+[b?b?K(w,b):"":"unknown filename",c,d?d?K(w,d):"":"unknown function"])},K:function(a,b){try{return a=a?K(w,a):"",Ab(a,b),0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return-c.Kb}},M:function(a,b,c){try{b=b?K(w,b):"";b=Jb(a,b);if(c&-8)return-28;var d=T(b,{Ub:!0}).node;if(!d)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&lb(d,a)?-2:0}catch(e){if("undefined"==typeof X||"ErrnoError"!==e.name)throw e; +return-e.Kb}},L:function(a,b){try{var c=V(a);Ab(c.node,b);return 0}catch(d){if("undefined"==typeof X||"ErrnoError"!==d.name)throw d;return-d.Kb}},J:function(a){try{var b=V(a).node;var c="string"==typeof b?T(b,{Ub:!0}).node:b;if(!c.Cb.Mb)throw new P(63);c.Cb.Mb(c,{timestamp:Date.now()});return 0}catch(d){if("undefined"==typeof X||"ErrnoError"!==d.name)throw d;return-d.Kb}},b:function(a,b,c){Lb=c;try{var d=V(a);switch(b){case 0:var e=Mb();if(0>e)return-28;for(;eb[e];)e++;return rb(d,e).Sb;case 1:case 2:return 0; +case 3:return d.flags;case 4:return e=Mb(),d.flags|=e,0;case 5:return e=Mb(),oa[e+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return x[Kc()>>2]=28,-1;default:return-28}}catch(h){if("undefined"==typeof X||"ErrnoError"!==h.name)throw h;return-h.Kb}},I:function(a,b){try{var c=V(a);return Kb(yb,c.path,b)}catch(d){if("undefined"==typeof X||"ErrnoError"!==d.name)throw d;return-d.Kb}},n:function(a,b,c){b=Nb(b,c);try{if(isNaN(b))return 61;var d=V(a);if(0===(d.flags&2097155))throw new P(28); +Bb(d.node,b);return 0}catch(e){if("undefined"==typeof X||"ErrnoError"!==e.name)throw e;return-e.Kb}},C:function(a,b){try{if(0===b)return-28;var c=N("/")+1;if(b=d)return-28;var e=hb(b), +h=Math.min(d,N(e)),g=v[c+h];O(e,w,c,d+1);v[c+h]=g;return h}catch(m){if("undefined"==typeof X||"ErrnoError"!==m.name)throw m;return-m.Kb}},u:function(a){try{return a=a?K(w,a):"",xb(a),0}catch(b){if("undefined"==typeof X||"ErrnoError"!==b.name)throw b;return-b.Kb}},H:function(a,b){try{return a=a?K(w,a):"",Kb(yb,a,b)}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return-c.Kb}},r:function(a,b,c){try{b=b?K(w,b):"";b=Jb(a,b);if(0===c){a=b;var d=T(a,{parent:!0}).node;if(!d)throw new P(44); +var e=La(a),h=$a(d,e),g=pb(d,e,!1);if(g)throw new P(g);if(!d.Cb.kc)throw new P(63);if(h.Xb)throw new P(10);d.Cb.kc(d,e);kb(h)}else 512===c?xb(b):u("Invalid flags passed to unlinkat");return 0}catch(m){if("undefined"==typeof X||"ErrnoError"!==m.name)throw m;return-m.Kb}},q:function(a,b,c){try{b=b?K(w,b):"";b=Jb(a,b,!0);if(c){var d=z[c>>2]+4294967296*x[c+4>>2],e=x[c+8>>2];h=1E3*d+e/1E6;c+=16;d=z[c>>2]+4294967296*x[c+4>>2];e=x[c+8>>2];g=1E3*d+e/1E6}else var h=Date.now(),g=h;a=h;var m=T(b,{Ub:!0}).node; +m.Cb.Mb(m,{timestamp:Math.max(a,g)});return 0}catch(l){if("undefined"==typeof X||"ErrnoError"!==l.name)throw l;return-l.Kb}},l:function(a,b,c){a=new Date(1E3*Nb(a,b));x[c>>2]=a.getSeconds();x[c+4>>2]=a.getMinutes();x[c+8>>2]=a.getHours();x[c+12>>2]=a.getDate();x[c+16>>2]=a.getMonth();x[c+20>>2]=a.getFullYear()-1900;x[c+24>>2]=a.getDay();b=a.getFullYear();x[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Pb:Ob)[a.getMonth()]+a.getDate()-1|0;x[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(), +6,1)).getTimezoneOffset();var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();x[c+32>>2]=(b!=d&&a.getTimezoneOffset()==Math.min(d,b))|0},i:function(a,b,c,d,e,h,g,m){e=Nb(e,h);try{if(isNaN(e))return 61;var l=V(d);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new P(2);if(1===(l.flags&2097155))throw new P(2);if(!l.Ib.fc)throw new P(43);var k=l.Ib.fc(l,a,e,b,c);var p=k.Jc;x[g>>2]=k.xc;z[m>>2]=p;return 0}catch(n){if("undefined"==typeof X||"ErrnoError"!==n.name)throw n;return-n.Kb}},j:function(a, +b,c,d,e,h,g){h=Nb(h,g);try{if(isNaN(h))return 61;var m=V(e);if(c&2){if(32768!==(m.node.mode&61440))throw new P(43);d&2||m.Ib.hc&&m.Ib.hc(m,w.slice(a,a+b),h,b,d)}}catch(l){if("undefined"==typeof X||"ErrnoError"!==l.name)throw l;return-l.Kb}},s:(a,b,c)=>{function d(l){return(l=l.toTimeString().match(/\(([A-Za-z ]+)\)$/))?l[1]:"GMT"}var e=(new Date).getFullYear(),h=new Date(e,0,1),g=new Date(e,6,1);e=h.getTimezoneOffset();var m=g.getTimezoneOffset();z[a>>2]=60*Math.max(e,m);x[b>>2]=Number(e!=m);a=d(h); +b=d(g);a=Rb(a);b=Rb(b);m>2]=a,z[c+4>>2]=b):(z[c>>2]=b,z[c+4>>2]=a)},e:()=>Date.now(),d:()=>performance.now(),o:a=>{var b=w.length;a>>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var e=Math;d=Math.max(a,d);a:{e=(e.min.call(e,2147483648,d+(65536-d%65536)%65536)-ma.buffer.byteLength+65535)/65536;try{ma.grow(e);ra();var h=1;break a}catch(g){}h=void 0}if(h)return!0}return!1},A:(a,b)=>{var c=0;Ub().forEach((d,e)=>{var h=b+c;e=z[a+4*e>>2]=h;for(h= +0;h>0]=d.charCodeAt(h);v[e>>0]=0;c+=d.length+1});return 0},B:(a,b)=>{var c=Ub();z[a>>2]=c.length;var d=0;c.forEach(e=>d+=e.length+1);z[b>>2]=d;return 0},f:function(a){try{var b=V(a);if(null===b.Sb)throw new P(8);b.lc&&(b.lc=null);try{b.Ib.close&&b.Ib.close(b)}catch(c){throw c;}finally{eb[b.Sb]=null}b.Sb=null;return 0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return c.Kb}},p:function(a,b){try{var c=V(a);v[b>>0]=c.Ob?2:R(c.mode)?3:40960===(c.mode&61440)?7: 4;oa[b+2>>1]=0;F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[b+8>>2]=F[0];x[b+12>>2]=F[1];F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[b+16>>2]=F[0];x[b+20>>2]=F[1];return 0}catch(d){if("undefined"==typeof X||"ErrnoError"!==d.name)throw d;return d.Kb}},x:function(a,b,c,d){try{a:{var e=V(a);a=b;for(var h,g=b=0;g>2],l=z[a+4>>2];a+=8;var k=e,p=m,n=l,r=h,y= v;if(0>n||0>r)throw new P(28);if(null===k.Sb)throw new P(8);if(1===(k.flags&2097155))throw new P(8);if(R(k.node.mode))throw new P(31);if(!k.Ib.read)throw new P(28);var A="undefined"!=typeof r;if(!A)r=k.position;else if(!k.seekable)throw new P(70);var G=k.Ib.read(k,y,p,n,r);A||(k.position+=G);var E=G;if(0>E){var L=-1;break a}b+=E;if(E>2]=L;return 0}catch(H){if("undefined"==typeof X||"ErrnoError"!==H.name)throw H;return H.Kb}},m:function(a,b,c,d,e){b= -Mb(b,c);try{if(isNaN(b))return 61;var h=V(a);Db(h,b,d);F=[h.position>>>0,(D=h.position,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[e>>2]=F[0];x[e+4>>2]=F[1];h.lc&&0===b&&0===d&&(h.lc=null);return 0}catch(g){if("undefined"==typeof X||"ErrnoError"!==g.name)throw g;return g.Kb}},D:function(a){try{var b=V(a);return b.Ib&&b.Ib.Wb?b.Ib.Wb(b):0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return c.Kb}},t:function(a,b,c,d){try{a:{var e= -V(a);a=b;for(var h,g=b=0;g>2],l=z[a+4>>2];a+=8;var k=e,p=m,n=l,r=h,y=v;if(0>n||0>r)throw new P(28);if(null===k.Sb)throw new P(8);if(0===(k.flags&2097155))throw new P(8);if(R(k.node.mode))throw new P(31);if(!k.Ib.write)throw new P(28);k.seekable&&k.flags&1024&&Db(k,0,2);var A="undefined"!=typeof r;if(!A)r=k.position;else if(!k.seekable)throw new P(70);var G=k.Ib.write(k,y,p,n,r,void 0);A||(k.position+=G);var E=G;if(0>E){var L=-1;break a}b+=E;"undefined"!==typeof h&&(h+=E)}L=b}z[d>> -2]=L;return 0}catch(H){if("undefined"==typeof X||"ErrnoError"!==H.name)throw H;return H.Kb}},ra:Ub,N:Vb,ga:Wb,ca:Xb,Y:Yb,la:Zb,G:$b,h:ac,oa:bc,ja:cc,ea:dc,fa:ec,k:fc,v:gc,pa:hc,g:ic,qa:jc,da:kc,ha:lc,ia:mc,na:nc,c:oc,ka:pc,ma:qc,aa:rc,V:sc,$:tc,ba:uc,S:vc,U:wc,Z:xc,X:yc,R:zc,Q:Ac,T:Bc,_:Cc,O:Dc,W:Ec,P:Fc},Z=function(){function a(c){Z=c=c.exports;ma=Z.sa;ra();ta.unshift(Z.ta);B--;f.monitorRunDependencies&&f.monitorRunDependencies(B);if(0==B&&(null!==xa&&(clearInterval(xa),xa=null),ya)){var d=ya;ya= -null;d()}return c}var b={a:Kc};B++;f.monitorRunDependencies&&f.monitorRunDependencies(B);if(f.instantiateWasm)try{return f.instantiateWasm(b,a)}catch(c){t(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ea(b,function(c){a(c.instance)}).catch(ba);return{}}();f._sqlite3_vfs_find=a=>(f._sqlite3_vfs_find=Z.ua)(a);f._sqlite3_malloc=a=>(f._sqlite3_malloc=Z.va)(a);f._sqlite3_free=a=>(f._sqlite3_free=Z.wa)(a);f._sqlite3_prepare_v2=(a,b,c,d,e)=>(f._sqlite3_prepare_v2=Z.xa)(a,b,c,d,e); +Nb(b,c);try{if(isNaN(b))return 61;var h=V(a);Eb(h,b,d);F=[h.position>>>0,(D=h.position,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[e>>2]=F[0];x[e+4>>2]=F[1];h.lc&&0===b&&0===d&&(h.lc=null);return 0}catch(g){if("undefined"==typeof X||"ErrnoError"!==g.name)throw g;return g.Kb}},D:function(a){try{var b=V(a);return b.Ib&&b.Ib.Wb?b.Ib.Wb(b):0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return c.Kb}},t:function(a,b,c,d){try{a:{var e= +V(a);a=b;for(var h,g=b=0;g>2],l=z[a+4>>2];a+=8;var k=e,p=m,n=l,r=h,y=v;if(0>n||0>r)throw new P(28);if(null===k.Sb)throw new P(8);if(0===(k.flags&2097155))throw new P(8);if(R(k.node.mode))throw new P(31);if(!k.Ib.write)throw new P(28);k.seekable&&k.flags&1024&&Eb(k,0,2);var A="undefined"!=typeof r;if(!A)r=k.position;else if(!k.seekable)throw new P(70);var G=k.Ib.write(k,y,p,n,r,void 0);A||(k.position+=G);var E=G;if(0>E){var L=-1;break a}b+=E;"undefined"!==typeof h&&(h+=E)}L=b}z[d>> +2]=L;return 0}catch(H){if("undefined"==typeof X||"ErrnoError"!==H.name)throw H;return H.Kb}},ra:Vb,N:Wb,ga:Xb,ca:Yb,Y:Zb,la:$b,G:ac,h:bc,oa:cc,ja:dc,ea:ec,fa:fc,k:gc,v:hc,pa:ic,g:jc,qa:kc,da:lc,ha:mc,ia:nc,na:oc,c:pc,ka:qc,ma:rc,aa:sc,V:tc,$:uc,ba:vc,S:wc,U:xc,Z:yc,X:zc,R:Ac,Q:Bc,T:Cc,_:Dc,O:Ec,W:Fc,P:Gc},Z=function(){function a(c){Z=c.exports;ma=Z.sa;ra();ta.unshift(Z.ta);B--;f.monitorRunDependencies&&f.monitorRunDependencies(B);0==B&&(null!==xa&&(clearInterval(xa),xa=null),ya&&(c=ya,ya=null,c())); +return Z}var b={a:Lc};B++;f.monitorRunDependencies&&f.monitorRunDependencies(B);if(f.instantiateWasm)try{return f.instantiateWasm(b,a)}catch(c){t(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ea(b,function(c){a(c.instance)}).catch(ba);return{}}();f._sqlite3_vfs_find=a=>(f._sqlite3_vfs_find=Z.ua)(a);f._sqlite3_malloc=a=>(f._sqlite3_malloc=Z.va)(a);f._sqlite3_free=a=>(f._sqlite3_free=Z.wa)(a);f._sqlite3_prepare_v2=(a,b,c,d,e)=>(f._sqlite3_prepare_v2=Z.xa)(a,b,c,d,e); f._sqlite3_step=a=>(f._sqlite3_step=Z.ya)(a);f._sqlite3_column_int64=(a,b)=>(f._sqlite3_column_int64=Z.za)(a,b);f._sqlite3_column_int=(a,b)=>(f._sqlite3_column_int=Z.Aa)(a,b);f._sqlite3_finalize=a=>(f._sqlite3_finalize=Z.Ba)(a);f._sqlite3_reset=a=>(f._sqlite3_reset=Z.Ca)(a);f._sqlite3_clear_bindings=a=>(f._sqlite3_clear_bindings=Z.Da)(a);f._sqlite3_value_blob=a=>(f._sqlite3_value_blob=Z.Ea)(a);f._sqlite3_value_text=a=>(f._sqlite3_value_text=Z.Fa)(a); f._sqlite3_value_bytes=a=>(f._sqlite3_value_bytes=Z.Ga)(a);f._sqlite3_value_double=a=>(f._sqlite3_value_double=Z.Ha)(a);f._sqlite3_value_int=a=>(f._sqlite3_value_int=Z.Ia)(a);f._sqlite3_value_int64=a=>(f._sqlite3_value_int64=Z.Ja)(a);f._sqlite3_value_type=a=>(f._sqlite3_value_type=Z.Ka)(a);f._sqlite3_result_blob=(a,b,c,d)=>(f._sqlite3_result_blob=Z.La)(a,b,c,d);f._sqlite3_result_double=(a,b)=>(f._sqlite3_result_double=Z.Ma)(a,b); f._sqlite3_result_error=(a,b,c)=>(f._sqlite3_result_error=Z.Na)(a,b,c);f._sqlite3_result_int=(a,b)=>(f._sqlite3_result_int=Z.Oa)(a,b);f._sqlite3_result_int64=(a,b,c)=>(f._sqlite3_result_int64=Z.Pa)(a,b,c);f._sqlite3_result_null=a=>(f._sqlite3_result_null=Z.Qa)(a);f._sqlite3_result_text=(a,b,c,d)=>(f._sqlite3_result_text=Z.Ra)(a,b,c,d);f._sqlite3_column_count=a=>(f._sqlite3_column_count=Z.Sa)(a);f._sqlite3_data_count=a=>(f._sqlite3_data_count=Z.Ta)(a); f._sqlite3_column_blob=(a,b)=>(f._sqlite3_column_blob=Z.Ua)(a,b);f._sqlite3_column_bytes=(a,b)=>(f._sqlite3_column_bytes=Z.Va)(a,b);f._sqlite3_column_double=(a,b)=>(f._sqlite3_column_double=Z.Wa)(a,b);f._sqlite3_column_text=(a,b)=>(f._sqlite3_column_text=Z.Xa)(a,b);f._sqlite3_column_type=(a,b)=>(f._sqlite3_column_type=Z.Ya)(a,b);f._sqlite3_column_name=(a,b)=>(f._sqlite3_column_name=Z.Za)(a,b);f._sqlite3_bind_blob=(a,b,c,d,e)=>(f._sqlite3_bind_blob=Z._a)(a,b,c,d,e); f._sqlite3_bind_double=(a,b,c)=>(f._sqlite3_bind_double=Z.$a)(a,b,c);f._sqlite3_bind_int=(a,b,c)=>(f._sqlite3_bind_int=Z.ab)(a,b,c);f._sqlite3_bind_int64=(a,b,c,d)=>(f._sqlite3_bind_int64=Z.bb)(a,b,c,d);f._sqlite3_bind_null=(a,b)=>(f._sqlite3_bind_null=Z.cb)(a,b);f._sqlite3_bind_text=(a,b,c,d,e)=>(f._sqlite3_bind_text=Z.db)(a,b,c,d,e);f._sqlite3_bind_parameter_count=a=>(f._sqlite3_bind_parameter_count=Z.eb)(a);f._sqlite3_bind_parameter_name=(a,b)=>(f._sqlite3_bind_parameter_name=Z.fb)(a,b); f._sqlite3_sql=a=>(f._sqlite3_sql=Z.gb)(a);f._sqlite3_exec=(a,b,c,d,e)=>(f._sqlite3_exec=Z.hb)(a,b,c,d,e);f._sqlite3_errmsg=a=>(f._sqlite3_errmsg=Z.ib)(a);f._sqlite3_declare_vtab=(a,b)=>(f._sqlite3_declare_vtab=Z.jb)(a,b);f._sqlite3_libversion=()=>(f._sqlite3_libversion=Z.kb)();f._sqlite3_libversion_number=()=>(f._sqlite3_libversion_number=Z.lb)();f._sqlite3_changes=a=>(f._sqlite3_changes=Z.mb)(a);f._sqlite3_close=a=>(f._sqlite3_close=Z.nb)(a); -f._sqlite3_limit=(a,b,c)=>(f._sqlite3_limit=Z.ob)(a,b,c);f._sqlite3_open_v2=(a,b,c,d)=>(f._sqlite3_open_v2=Z.pb)(a,b,c,d);f._sqlite3_get_autocommit=a=>(f._sqlite3_get_autocommit=Z.qb)(a);var Jc=()=>(Jc=Z.rb)(),Pb=f._malloc=a=>(Pb=f._malloc=Z.sb)(a);f._free=a=>(f._free=Z.tb)(a);f._RegisterExtensionFunctions=a=>(f._RegisterExtensionFunctions=Z.ub)(a);f._set_authorizer=a=>(f._set_authorizer=Z.vb)(a);f._create_function=(a,b,c,d,e,h)=>(f._create_function=Z.wb)(a,b,c,d,e,h); -f._create_module=(a,b,c,d)=>(f._create_module=Z.xb)(a,b,c,d);f._progress_handler=(a,b)=>(f._progress_handler=Z.yb)(a,b);f._register_vfs=(a,b,c,d)=>(f._register_vfs=Z.zb)(a,b,c,d);f._getSqliteFree=()=>(f._getSqliteFree=Z.Ab)();var Lc=f._main=(a,b)=>(Lc=f._main=Z.Bb)(a,b),$a=(a,b)=>($a=Z.Db)(a,b),Mc=()=>(Mc=Z.Eb)(),Hc=()=>(Hc=Z.Fb)(),Ic=a=>(Ic=Z.Gb)(a),Gc=a=>(Gc=Z.Hb)(a);f.getTempRet0=Mc;f.ccall=Y; -f.cwrap=(a,b,c,d)=>{var e=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&e&&!d?f["_"+a]:function(){return Y(a,b,c,arguments,d)}};f.setValue=J;f.getValue=I;f.UTF8ToString=(a,b)=>a?K(w,a,b):"";f.stringToUTF8=(a,b,c)=>O(a,w,b,c);f.lengthBytesUTF8=N;var Nc;ya=function Oc(){Nc||Pc();Nc||(ya=Oc)}; -function Pc(){function a(){if(!Nc&&(Nc=!0,f.calledRun=!0,!na)){f.noFSInit||Fb||(Fb=!0,Eb(),f.stdin=f.stdin,f.stdout=f.stdout,f.stderr=f.stderr,f.stdin?Gb("stdin",f.stdin):vb("/dev/tty","/dev/stdin"),f.stdout?Gb("stdout",null,f.stdout):vb("/dev/tty","/dev/stdout"),f.stderr?Gb("stderr",null,f.stderr):vb("/dev/tty1","/dev/stderr"),Bb("/dev/stdin",0),Bb("/dev/stdout",1),Bb("/dev/stderr",1));fb=!1;Ga(ta);Ga(ua);aa(f);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(Qc){var b=Lc;try{var c=b(0,0);if(!noExitRuntime){if(f.onExit)f.onExit(c); +f._sqlite3_limit=(a,b,c)=>(f._sqlite3_limit=Z.ob)(a,b,c);f._sqlite3_open_v2=(a,b,c,d)=>(f._sqlite3_open_v2=Z.pb)(a,b,c,d);f._sqlite3_get_autocommit=a=>(f._sqlite3_get_autocommit=Z.qb)(a);var Kc=()=>(Kc=Z.rb)(),Qb=f._malloc=a=>(Qb=f._malloc=Z.sb)(a);f._free=a=>(f._free=Z.tb)(a);f._RegisterExtensionFunctions=a=>(f._RegisterExtensionFunctions=Z.ub)(a);f._set_authorizer=a=>(f._set_authorizer=Z.vb)(a);f._create_function=(a,b,c,d,e,h)=>(f._create_function=Z.wb)(a,b,c,d,e,h); +f._create_module=(a,b,c,d)=>(f._create_module=Z.xb)(a,b,c,d);f._progress_handler=(a,b)=>(f._progress_handler=Z.yb)(a,b);f._register_vfs=(a,b,c,d)=>(f._register_vfs=Z.zb)(a,b,c,d);f._getSqliteFree=()=>(f._getSqliteFree=Z.Ab)();var Mc=f._main=(a,b)=>(Mc=f._main=Z.Bb)(a,b),ab=(a,b)=>(ab=Z.Db)(a,b),Nc=()=>(Nc=Z.Eb)(),Ic=()=>(Ic=Z.Fb)(),Jc=a=>(Jc=Z.Gb)(a),Hc=a=>(Hc=Z.Hb)(a);f.getTempRet0=Nc;f.ccall=Y; +f.cwrap=(a,b,c,d)=>{var e=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&e&&!d?f["_"+a]:function(){return Y(a,b,c,arguments,d)}};f.setValue=J;f.getValue=I;f.UTF8ToString=(a,b)=>a?K(w,a,b):"";f.stringToUTF8=(a,b,c)=>O(a,w,b,c);f.lengthBytesUTF8=N;var Oc;ya=function Pc(){Oc||Qc();Oc||(ya=Pc)}; +function Qc(){function a(){if(!Oc&&(Oc=!0,f.calledRun=!0,!na)){f.noFSInit||Gb||(Gb=!0,Fb(),f.stdin=f.stdin,f.stdout=f.stdout,f.stderr=f.stderr,f.stdin?Hb("stdin",f.stdin):wb("/dev/tty","/dev/stdin"),f.stdout?Hb("stdout",null,f.stdout):wb("/dev/tty","/dev/stdout"),f.stderr?Hb("stderr",null,f.stderr):wb("/dev/tty1","/dev/stderr"),Cb("/dev/stdin",0),Cb("/dev/stdout",1),Cb("/dev/stderr",1));gb=!1;Ga(ta);Ga(ua);aa(f);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(Rc){var b=Mc;try{var c=b(0,0);if(!Ha){if(f.onExit)f.onExit(c); na=!0}fa(c,new Fa(c))}catch(d){d instanceof Fa||"unwind"==d||fa(1,d)}}if(f.postRun)for("function"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;)b=f.postRun.shift(),va.unshift(b);Ga(va)}}if(!(0} [changedPages] @@ -94,6 +95,7 @@ export class IDBBatchAtomicVFS extends VFS.Base { path: url.pathname, flags, block0: null, + isMetadataChanged: true, locks: new WebLocks(url.pathname) }; this.#mapIdToFile.set(fileId, file); @@ -241,12 +243,17 @@ export class IDBBatchAtomicVFS extends VFS.Base { log(`xWrite ${file.path} ${pData.byteLength} ${iOffset}`); try { + // Update file size if appending. + const prevFileSize = file.block0.fileSize; + if (file.block0.fileSize < iOffset + pData.byteLength) { + file.block0.fileSize = iOffset + pData.byteLength; + file.isMetadataChanged = true; + } + // Convert the write directly into an IndexedDB object. Our assumption // is that SQLite will only overwrite data with an xWrite of the same // offset and size unless the database page size changes, except when // changing database page size which is handled by #reblockIfNeeded(). - const prevFileSize = file.block0.fileSize; - file.block0.fileSize = Math.max(file.block0.fileSize, iOffset + pData.byteLength); const block = iOffset === 0 ? file.block0 : { path: file.path, offset: -iOffset, @@ -271,6 +278,9 @@ export class IDBBatchAtomicVFS extends VFS.Base { // Not a batch atomic write so write through. this.#idb.run('readwrite', ({blocks}) => blocks.put(block)); } + + // Clear dirty flag if page 0 was written. + file.isMetadataChanged = iOffset === 0 ? false : file.isMetadataChanged; return VFS.SQLITE_OK; } catch (e) { console.error(e); @@ -485,6 +495,18 @@ export class IDBBatchAtomicVFS extends VFS.Base { return VFS.SQLITE_IOERR; } } + + if (file.isMetadataChanged) { + // Metadata has changed so write block 0 to IndexedDB. + try { + this.#idb.run('readwrite', async ({blocks}) => { + await blocks.put(file.block0); + }); + } catch (e) { + console.error(e); + return VFS.SQLITE_IOERR; + } + } return VFS.SQLITE_OK; case 22: // SQLITE_FCNTL_COMMIT_PHASETWO @@ -522,6 +544,7 @@ export class IDBBatchAtomicVFS extends VFS.Base { block0.data = block0.data.slice(); const changedPages = file.changedPages; file.changedPages = null; + file.isMetadataChanged = false; this.#idb.run('readwrite', async ({blocks})=> { // Write block 0 to commit the new version. blocks.put(block0); @@ -557,6 +580,7 @@ export class IDBBatchAtomicVFS extends VFS.Base { // be left in IndexedDB to be removed by the next atomic write // transaction. file.changedPages = null; + file.isMetadataChanged = false; file.block0 = await this.#idb.run('readonly', ({blocks}) => { return blocks.get([file.path, 0, file.block0.version + 1]); });