diff --git a/diesel-wasm-sqlite/esbuild.js b/diesel-wasm-sqlite/esbuild.js new file mode 100644 index 000000000..00164c0c4 --- /dev/null +++ b/diesel-wasm-sqlite/esbuild.js @@ -0,0 +1,9 @@ +const esbuild = require("esbuild"); + +esbuild.build({ + entryPoints: ["package.js"], + bundle: true, + outfile: "src/package.js", + format: "esm", + minify: true, +}).catch(() => process.exit(1)); diff --git a/diesel-wasm-sqlite/js-to-rust-test/package.json b/diesel-wasm-sqlite/js-to-rust-test/package.json deleted file mode 100644 index 3b5389021..000000000 --- a/diesel-wasm-sqlite/js-to-rust-test/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "js-to-rust-test", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "dependencies": { - "@xmtp/wa-sqlite": "^1.0.1", - } -} diff --git a/diesel-wasm-sqlite/js-to-rust-test/yarn.lock b/diesel-wasm-sqlite/js-to-rust-test/yarn.lock deleted file mode 100644 index a9e0b5b70..000000000 --- a/diesel-wasm-sqlite/js-to-rust-test/yarn.lock +++ /dev/null @@ -1,8 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@xmtp/wa-sqlite@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@xmtp/wa-sqlite/-/wa-sqlite-1.0.1.tgz#3ecab8cf3ea15386e3e1d152526d6190898f7529" - integrity sha512-/MVsgo5HG7FVdMMNUKsf5HTIDnOncSK0ljrOBr+xqkfH6qonQwqmUsjcW2Z4GyyCIVvhQlxOSy+1W+7Z/WH0DA== diff --git a/diesel-wasm-sqlite/package-lock.json b/diesel-wasm-sqlite/package-lock.json new file mode 100644 index 000000000..ab3a8e219 --- /dev/null +++ b/diesel-wasm-sqlite/package-lock.json @@ -0,0 +1,420 @@ +{ + "name": "diesel-wasm-sqlite", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "diesel-wasm-sqlite", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@xmtp/wa-sqlite": "^1.0.1", + "esbuild": "^0.23.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz", + "integrity": "sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.0.tgz", + "integrity": "sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.0.tgz", + "integrity": "sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.0.tgz", + "integrity": "sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.0.tgz", + "integrity": "sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.0.tgz", + "integrity": "sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.0.tgz", + "integrity": "sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.0.tgz", + "integrity": "sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.0.tgz", + "integrity": "sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.0.tgz", + "integrity": "sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.0.tgz", + "integrity": "sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.0.tgz", + "integrity": "sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.0.tgz", + "integrity": "sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.0.tgz", + "integrity": "sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.0.tgz", + "integrity": "sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.0.tgz", + "integrity": "sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.0.tgz", + "integrity": "sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.0.tgz", + "integrity": "sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.0.tgz", + "integrity": "sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.0.tgz", + "integrity": "sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.0.tgz", + "integrity": "sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.0.tgz", + "integrity": "sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.0.tgz", + "integrity": "sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz", + "integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@xmtp/wa-sqlite": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@xmtp/wa-sqlite/-/wa-sqlite-1.0.1.tgz", + "integrity": "sha512-/MVsgo5HG7FVdMMNUKsf5HTIDnOncSK0ljrOBr+xqkfH6qonQwqmUsjcW2Z4GyyCIVvhQlxOSy+1W+7Z/WH0DA==" + }, + "node_modules/esbuild": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz", + "integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.0", + "@esbuild/android-arm": "0.23.0", + "@esbuild/android-arm64": "0.23.0", + "@esbuild/android-x64": "0.23.0", + "@esbuild/darwin-arm64": "0.23.0", + "@esbuild/darwin-x64": "0.23.0", + "@esbuild/freebsd-arm64": "0.23.0", + "@esbuild/freebsd-x64": "0.23.0", + "@esbuild/linux-arm": "0.23.0", + "@esbuild/linux-arm64": "0.23.0", + "@esbuild/linux-ia32": "0.23.0", + "@esbuild/linux-loong64": "0.23.0", + "@esbuild/linux-mips64el": "0.23.0", + "@esbuild/linux-ppc64": "0.23.0", + "@esbuild/linux-riscv64": "0.23.0", + "@esbuild/linux-s390x": "0.23.0", + "@esbuild/linux-x64": "0.23.0", + "@esbuild/netbsd-x64": "0.23.0", + "@esbuild/openbsd-arm64": "0.23.0", + "@esbuild/openbsd-x64": "0.23.0", + "@esbuild/sunos-x64": "0.23.0", + "@esbuild/win32-arm64": "0.23.0", + "@esbuild/win32-ia32": "0.23.0", + "@esbuild/win32-x64": "0.23.0" + } + } + } +} diff --git a/diesel-wasm-sqlite/js-to-rust-test/index.js b/diesel-wasm-sqlite/package.js similarity index 100% rename from diesel-wasm-sqlite/js-to-rust-test/index.js rename to diesel-wasm-sqlite/package.js diff --git a/diesel-wasm-sqlite/package.json b/diesel-wasm-sqlite/package.json new file mode 100644 index 000000000..9709463a6 --- /dev/null +++ b/diesel-wasm-sqlite/package.json @@ -0,0 +1,16 @@ +{ + "name": "diesel-wasm-sqlite", + "version": "1.0.0", + "description": "", + "main": "esbuild.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "esbuild": "node esbuild.js" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@xmtp/wa-sqlite": "^1.0.1", + "esbuild": "^0.23.0" + } +} diff --git a/diesel-wasm-sqlite/src/ffi.rs b/diesel-wasm-sqlite/src/ffi.rs index aa164a9cb..d6db1dad1 100644 --- a/diesel-wasm-sqlite/src/ffi.rs +++ b/diesel-wasm-sqlite/src/ffi.rs @@ -1,7 +1,7 @@ use wasm_bindgen::{prelude::*, JsValue}; /// Simple Connection -#[wasm_bindgen(module = "/js-to-rust-test/index.js")] +#[wasm_bindgen(module = "/src/package.js")] extern "C" { #[wasm_bindgen(catch)] pub fn batch_execute(database: i32, query: &str) -> Result<(), JsValue>; @@ -11,7 +11,7 @@ extern "C" { } /// Direct Shim for wa-sqlite -#[wasm_bindgen(module = "/js-to-rust-test/index.js")] +#[wasm_bindgen(module = "/src/package.js")] extern "C" { #[wasm_bindgen] pub fn sqlite3_result_text(context: i32, value: String); diff --git a/diesel-wasm-sqlite/src/package.js b/diesel-wasm-sqlite/src/package.js new file mode 100644 index 000000000..a6d80be28 --- /dev/null +++ b/diesel-wasm-sqlite/src/package.js @@ -0,0 +1,2 @@ +var gt=0x7fffffffffffffffn,It=-0x8000000000000000n,Lt=Object.getPrototypeOf(async function(){}).constructor,ue=class extends Error{constructor(p,K){super(p),this.code=K}},Se=!0;function xt(m){let p={};m.retryOps=[];let K=m._getSqliteFree(),n=m._malloc(8),ie=[n,n+4];function te(d){if(typeof d!="string")return 0;let f=new TextEncoder().encode(d),u=m._sqlite3_malloc(f.byteLength+1);return m.HEAPU8.set(f,u),m.HEAPU8[u+f.byteLength]=0,u}function he(d,f){return BigInt(f)<<32n|BigInt(d)&0xffffffffn}let ge=function(){let d=BigInt(Number.MAX_SAFE_INTEGER)>>32n,f=BigInt(Number.MIN_SAFE_INTEGER)>>32n;return function(u,v){return v>d||v2147483647||q<-2147483648)return 25;let w=f(u,v,q);return B(d,w,G.get(u))}}(),p.bind_int64=function(){let d="sqlite3_bind_int64",f=m.cwrap(d,...I("nnnn:n"));return function(u,v,q){if(F(u),q>gt||q>32n,D=f(u,v,Number(w),Number(R));return B(d,D,G.get(u))}}(),p.bind_null=function(){let d="sqlite3_bind_null",f=m.cwrap(d,...I("nn:n"));return function(u,v){F(u);let q=f(u,v);return B(d,q,G.get(u))}}(),p.bind_parameter_name=function(){let f=m.cwrap("sqlite3_bind_parameter_name",...I("n:s"));return function(u,v){return F(u),f(u,v)}}(),p.bind_text=function(){let d="sqlite3_bind_text",f=m.cwrap(d,...I("nnnnn:n"));return function(u,v,q){F(u);let w=te(q),R=f(u,v,w,-1,K);return B(d,R,G.get(u))}}(),p.changes=function(){let f=m.cwrap("sqlite3_changes",...I("n:n"));return function(u){return fe(u),f(u)}}(),p.close=function(){let d="sqlite3_close",f=m.cwrap(d,...I("n:n"),{async:Se});return async function(u){fe(u);let v=await f(u);return re.delete(u),B(d,v,u)}}(),p.column=function(d,f){F(d);let u=p.column_type(d,f);switch(u){case 4:return p.column_blob(d,f);case 2:return p.column_double(d,f);case 1:let v=p.column_int(d,f),q=m.getTempRet0();return ge(v,q);case 5:return null;case 3:return p.column_text(d,f);default:throw new ue("unknown type",u)}},p.column_blob=function(){let f=m.cwrap("sqlite3_column_blob",...I("nn:n"));return function(u,v){F(u);let q=p.column_bytes(u,v),w=f(u,v);return m.HEAPU8.subarray(w,w+q)}}(),p.column_bytes=function(){let f=m.cwrap("sqlite3_column_bytes",...I("nn:n"));return function(u,v){return F(u),f(u,v)}}(),p.column_count=function(){let f=m.cwrap("sqlite3_column_count",...I("n:n"));return function(u){return F(u),f(u)}}(),p.column_double=function(){let f=m.cwrap("sqlite3_column_double",...I("nn:n"));return function(u,v){return F(u),f(u,v)}}(),p.column_int=function(){let f=m.cwrap("sqlite3_column_int64",...I("nn:n"));return function(u,v){return F(u),f(u,v)}}(),p.column_int64=function(){let f=m.cwrap("sqlite3_column_int64",...I("nn:n"));return function(u,v){F(u);let q=f(u,v),w=m.getTempRet0();return he(q,w)}}(),p.column_name=function(){let f=m.cwrap("sqlite3_column_name",...I("nn:s"));return function(u,v){return F(u),f(u,v)}}(),p.column_names=function(d){let f=[],u=p.column_count(d);for(let v=0;vk(C,m.HEAP32.subarray(Z/4,Z/4+U)):(C,U,Z)=>k(C,m.HEAP32.subarray(Z/4,Z/4+U))}let j=m.create_function(d,f,u,v,q,w&&W(w),R&&W(R),D);return B("sqlite3_create_function",j,d)},p.data_count=function(){let f=m.cwrap("sqlite3_data_count",...I("n:n"));return function(u){return F(u),f(u)}}(),p.exec=async function(d,f,u){for await(let v of p.statements(d,f)){let q;for(;await p.step(v)===100;)if(u){q=q??p.column_names(v);let w=p.row(v);await u(w,q)}}return 0},p.finalize=function(){let f=m.cwrap("sqlite3_finalize",...I("n:n"),{async:Se});return async function(u){let v=await f(u);return G.delete(u),v}}(),p.get_autocommit=function(){let f=m.cwrap("sqlite3_get_autocommit",...I("n:n"));return function(u){return f(u)}}(),p.libversion=function(){let f=m.cwrap("sqlite3_libversion",...I(":s"));return function(){return f()}}(),p.libversion_number=function(){let f=m.cwrap("sqlite3_libversion_number",...I(":n"));return function(){return f()}}(),p.limit=function(){let f=m.cwrap("sqlite3_limit",...I("nnn:n"));return function(u,v,q){return f(u,v,q)}}(),p.open_v2=function(){let d="sqlite3_open_v2",f=m.cwrap(d,...I("snnn:n"),{async:Se});return async function(u,v,q){v=v||6,q=te(q);try{let w=await ae(()=>f(u,ie[0],v,q)),R=m.getValue(ie[0],"*");return re.add(R),m.ccall("RegisterExtensionFunctions","void",["number"],[R]),B(d,w),R}finally{m._sqlite3_free(q)}}}(),p.progress_handler=function(d,f,u,v){fe(d),m.progress_handler(d,f,u,v)},p.reset=function(){let d="sqlite3_reset",f=m.cwrap(d,...I("n:n"),{async:Se});return async function(u){F(u);let v=await f(u);return B(d,v,G.get(u))}}(),p.result=function(d,f){switch(typeof f){case"number":f===(f|0)?p.result_int(d,f):p.result_double(d,f);break;case"string":p.result_text(d,f);break;default:if(f instanceof Uint8Array||Array.isArray(f))p.result_blob(d,f);else if(f===null)p.result_null(d);else{if(typeof f=="bigint")return p.result_int64(d,f);console.warn("unknown result converted to null",f),p.result_null(d)}break}},p.result_blob=function(){let f=m.cwrap("sqlite3_result_blob",...I("nnnn:n"));return function(u,v){let q=v.byteLength??v.length,w=m._sqlite3_malloc(q);m.HEAPU8.subarray(w).set(v),f(u,w,q,K)}}(),p.result_double=function(){let f=m.cwrap("sqlite3_result_double",...I("nn:n"));return function(u,v){f(u,v)}}(),p.result_int=function(){let f=m.cwrap("sqlite3_result_int",...I("nn:n"));return function(u,v){f(u,v)}}(),p.result_int64=function(){let f=m.cwrap("sqlite3_result_int64",...I("nnn:n"));return function(u,v){if(v>gt||v>32n;f(u,Number(q),Number(w))}}(),p.result_null=function(){let f=m.cwrap("sqlite3_result_null",...I("n:n"));return function(u){f(u)}}(),p.result_text=function(){let f=m.cwrap("sqlite3_result_text",...I("nnnn:n"));return function(u,v){let q=te(v);f(u,q,-1,K)}}(),p.row=function(d){let f=[],u=p.data_count(d);for(let v=0;vR(v(D,W,j,k,C,U)):(D,W,j,k,C,U)=>R(v(D,W,j,k,C,U))}let w=m.set_authorizer(d,q(f),u);return B("sqlite3_set_authorizer",w,d)},p.sql=function(){let f=m.cwrap("sqlite3_sql",...I("n:s"));return function(u){return F(u),f(u)}}(),p.statements=function(d,f,u={}){let v=m.cwrap("sqlite3_prepare_v3","number",["number","number","number","number","number","number"],{async:!0});return async function*(){let q=[];try{let U=function(){C&&!u.unscoped&&p.finalize(C),C=0},w=new TextEncoder().encode(f),R=w.byteLength-w.byteLength%4+12,D=m._sqlite3_malloc(R),W=D+w.byteLength+1;q.push(()=>m._sqlite3_free(D)),m.HEAPU8.set(w,D),m.HEAPU8[W-1]=0;let j=D+R-8,k=D+R-4,C;q.push(U),m.setValue(k,D,"*");do{U();let Z=m.getValue(k,"*"),y=await ae(()=>v(d,Z,W-k,u.flags||0,j,k));y!==0&&B("sqlite3_prepare_v3",y,d),C=m.getValue(j,"*"),C&&(G.set(C,d),yield C)}while(C)}finally{for(;q.length;)q.pop()()}}()},p.step=function(){let d="sqlite3_step",f=m.cwrap(d,...I("n:n"),{async:Se});return async function(u){F(u);let v=await ae(()=>f(u));return B(d,v,G.get(u),[100,101])}}(),p.value=function(d){let f=p.value_type(d);switch(f){case 4:return p.value_blob(d);case 2:return p.value_double(d);case 1:let u=p.value_int(d),v=m.getTempRet0();return ge(u,v);case 5:return null;case 3:return p.value_text(d);default:throw new ue("unknown type",f)}},p.value_blob=function(){let f=m.cwrap("sqlite3_value_blob",...I("n:n"));return function(u){let v=p.value_bytes(u),q=f(u);return m.HEAPU8.subarray(q,q+v)}}(),p.value_bytes=function(){let f=m.cwrap("sqlite3_value_bytes",...I("n:n"));return function(u){return f(u)}}(),p.value_double=function(){let f=m.cwrap("sqlite3_value_double",...I("n:n"));return function(u){return f(u)}}(),p.value_int=function(){let f=m.cwrap("sqlite3_value_int64",...I("n:n"));return function(u){return f(u)}}(),p.value_int64=function(){let f=m.cwrap("sqlite3_value_int64",...I("n:n"));return function(u){let v=f(u),q=m.getTempRet0();return he(v,q)}}(),p.value_text=function(){let f=m.cwrap("sqlite3_value_text",...I("n:s"));return function(u){return f(u)}}(),p.value_type=function(){let f=m.cwrap("sqlite3_value_type",...I("n:n"));return function(u){return f(u)}}(),p.vfs_register=function(d,f){let u=m.vfs_register(d,f);return B("sqlite3_vfs_register",u)};function B(d,f,u=null,v=[0]){if(v.includes(f))return f;let q=u?m.ccall("sqlite3_errmsg","string",["number"],[u]):d;throw new ue(q,f)}async function ae(d){let f;do m.retryOps.length&&(await Promise.all(m.retryOps),m.retryOps=[]),f=await d();while(f&&m.retryOps.length);return f}return p}function I(m){let p=[],K=m.match(/([ns@]*):([nsv@])/);switch(K[2]){case"n":p.push("number");break;case"s":p.push("string");break;case"v":p.push(null);break}let n=[];for(let ie of K[1])switch(ie){case"n":n.push("number");break;case"s":n.push("string");break}return p.push(n),p}var Ga=(()=>{var m=import.meta.url;return function(p={}){var K,n=p,ie,te,he=new Promise((e,t)=>{ie=e,te=t}),ge=typeof window=="object",re=typeof importScripts=="function",fe=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",G=Object.assign({},n),F=[],B="./this.program",ae=(e,t)=>{throw t},d="";function f(e){return n.locateFile?n.locateFile(e,d):d+e}var u,v;(ge||re)&&(re?d=self.location.href:typeof document<"u"&&document.currentScript&&(d=document.currentScript.src),m&&(d=m),d.startsWith("blob:")?d="":d=d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1),re&&(v=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),u=e=>fetch(e,{credentials:"same-origin"}).then(t=>t.ok?t.arrayBuffer():Promise.reject(new Error(t.status+" : "+t.url))));var q=n.print||console.log.bind(console),w=n.printErr||console.error.bind(console);Object.assign(n,G),G=null,n.arguments&&(F=n.arguments),n.thisProgram&&(B=n.thisProgram),n.quit&&(ae=n.quit);var R;n.wasmBinary&&(R=n.wasmBinary);var D,W=!1,j,k,C,U,Z,y,z,Oe,Qe;function He(){var e=D.buffer;n.HEAP8=k=new Int8Array(e),n.HEAP16=U=new Int16Array(e),n.HEAPU8=C=new Uint8Array(e),n.HEAPU16=Z=new Uint16Array(e),n.HEAP32=y=new Int32Array(e),n.HEAPU32=z=new Uint32Array(e),n.HEAPF32=Oe=new Float32Array(e),n.HEAPF64=Qe=new Float64Array(e)}var We=[],je=[],At=[],Ge=[],Nt=!1;function Rt(){if(n.preRun)for(typeof n.preRun=="function"&&(n.preRun=[n.preRun]);n.preRun.length;)Ct(n.preRun.shift());xe(We)}function kt(){Nt=!0,!n.noFSInit&&!s.init.initialized&&s.init(),s.ignorePermissions=!1,_e.init(),xe(je)}function Ot(){xe(At)}function Qt(){if(n.postRun)for(typeof n.postRun=="function"&&(n.postRun=[n.postRun]);n.postRun.length;)Pt(n.postRun.shift());xe(Ge)}function Ct(e){We.unshift(e)}function Ft(e){je.unshift(e)}function Pt(e){Ge.unshift(e)}var le=0,Ce=null,be=null;function Ha(e){return e}function Fe(e){le++,n.monitorRunDependencies?.(le)}function Ie(e){if(le--,n.monitorRunDependencies?.(le),le==0&&(Ce!==null&&(clearInterval(Ce),Ce=null),be)){var t=be;be=null,t()}}function ne(e){n.onAbort?.(e),e="Aborted("+e+")",w(e),W=!0,j=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw te(t),t}var Dt="data:application/octet-stream;base64,",Ke=e=>e.startsWith(Dt);function Mt(){if(n.locateFile){var e="wa-sqlite.wasm";return Ke(e)?e:f(e)}return new URL("wa-sqlite.wasm",import.meta.url).href}var Le;function Xe(e){if(e==Le&&R)return new Uint8Array(R);if(v)return v(e);throw"both async and sync fetching of the wasm failed"}function Ut(e){return R?Promise.resolve().then(()=>Xe(e)):u(e).then(t=>new Uint8Array(t),()=>Xe(e))}function Ve(e,t,r){return Ut(e).then(_=>WebAssembly.instantiate(_,t)).then(r,_=>{w(`failed to asynchronously prepare wasm: ${_}`),ne(_)})}function zt(e,t,r,_){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Ke(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(o=>{var a=WebAssembly.instantiateStreaming(o,r);return a.then(_,function(l){return w(`wasm streaming compile failed: ${l}`),w("falling back to ArrayBuffer instantiation"),Ve(t,r,_)})}):Ve(t,r,_)}function Bt(){return{a:jn}}function Ht(){var e=Bt();function t(_,o){return i=_.exports,D=i.ja,He(),ve=i.af,Ft(i.ka),Ie("wasm-instantiate"),i}Fe("wasm-instantiate");function r(_){t(_.instance)}if(n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(_){w(`Module.instantiateWasm callback failed with error: ${_}`),te(_)}return Le||(Le=Mt()),zt(R,Le,e,r).catch(te),{}}var S,P;function Ye(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var xe=e=>{for(;e.length>0;)e.shift()(n)};function $e(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":return k[e];case"i8":return k[e];case"i16":return U[e>>1];case"i32":return y[e>>2];case"i64":ne("to do getValue(i64) use WASM_BIGINT");case"float":return Oe[e>>2];case"double":return Qe[e>>3];case"*":return z[e>>2];default:ne(`invalid type for getValue: ${t}`)}}var Wt=n.noExitRuntime||!0;function Ae(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":k[e]=t;break;case"i8":k[e]=t;break;case"i16":U[e>>1]=t;break;case"i32":y[e>>2]=t;break;case"i64":ne("to do setValue(i64) use WASM_BIGINT");case"float":Oe[e>>2]=t;break;case"double":Qe[e>>3]=t;break;case"*":z[e>>2]=t;break;default:ne(`invalid type for setValue: ${r}`)}}var jt=e=>dt(e),Gt=()=>vt(),Ze=typeof TextDecoder<"u"?new TextDecoder:void 0,de=(e,t,r)=>{for(var _=t+r,o=t;e[o]&&!(o>=_);)++o;if(o-t>16&&e.buffer&&Ze)return Ze.decode(e.subarray(t,o));for(var a="";t>10,56320|h&1023)}}return a},ce=(e,t)=>e?de(C,e,t):"",Kt=(e,t,r,_)=>{ne(`Assertion failed: ${ce(e)}, at: `+[t?ce(t):"unknown filename",r,_?ce(_):"unknown function"])},Q={isAbs:e=>e.charAt(0)==="/",splitPath:e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return t.exec(e).slice(1)},normalizeArray:(e,t)=>{for(var r=0,_=e.length-1;_>=0;_--){var o=e[_];o==="."?e.splice(_,1):o===".."?(e.splice(_,1),r++):r&&(e.splice(_,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=Q.isAbs(e),r=e.substr(-1)==="/";return e=Q.normalizeArray(e.split("/").filter(_=>!!_),!t).join("/"),!e&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Q.splitPath(e),r=t[0],_=t[1];return!r&&!_?".":(_&&(_=_.substr(0,_.length-1)),r+_)},basename:e=>{if(e==="/")return"/";e=Q.normalize(e),e=e.replace(/\/$/,"");var t=e.lastIndexOf("/");return t===-1?e:e.substr(t+1)},join:(...e)=>Q.normalize(e.join("/")),join2:(e,t)=>Q.normalize(e+"/"+t)},Xt=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return e=>crypto.getRandomValues(e);ne("initRandomDevice")},Je=e=>(Je=Xt())(e),ee={resolve:(...e)=>{for(var t="",r=!1,_=e.length-1;_>=-1&&!r;_--){var o=_>=0?e[_]:s.cwd();if(typeof o!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";t=o+"/"+t,r=Q.isAbs(o)}return t=Q.normalizeArray(t.split("/").filter(a=>!!a),!r).join("/"),(r?"/":"")+t||"."},relative:(e,t)=>{e=ee.resolve(e).substr(1),t=ee.resolve(t).substr(1);function r(h){for(var g=0;g=0&&h[A]==="";A--);return g>A?[]:h.slice(g,A-g+1)}for(var _=r(e.split("/")),o=r(t.split("/")),a=Math.min(_.length,o.length),l=a,c=0;c{for(var t=0,r=0;r=55296&&_<=57343?(t+=4,++r):t+=3}return t},De=(e,t,r,_)=>{if(!(_>0))return 0;for(var o=r,a=r+_-1,l=0;l=55296&&c<=57343){var E=e.charCodeAt(++l);c=65536+((c&1023)<<10)|E&1023}if(c<=127){if(r>=a)break;t[r++]=c}else if(c<=2047){if(r+1>=a)break;t[r++]=192|c>>6,t[r++]=128|c&63}else if(c<=65535){if(r+2>=a)break;t[r++]=224|c>>12,t[r++]=128|c>>6&63,t[r++]=128|c&63}else{if(r+3>=a)break;t[r++]=240|c>>18,t[r++]=128|c>>12&63,t[r++]=128|c>>6&63,t[r++]=128|c&63}}return t[r]=0,r-o};function Me(e,t,r){var _=r>0?r:pe(e)+1,o=new Array(_),a=De(e,o,0,o.length);return t&&(o.length=a),o}var Vt=()=>{if(!Pe.length){var e=null;if(typeof window<"u"&&typeof window.prompt=="function"&&(e=window.prompt("Input: "),e!==null&&(e+=` +`)),!e)return null;Pe=Me(e,!0)}return Pe.shift()},_e={ttys:[],init(){},shutdown(){},register(e,t){_e.ttys[e]={input:[],output:[],ops:t},s.registerDevice(e,_e.stream_ops)},stream_ops:{open(e){var t=_e.ttys[e.node.rdev];if(!t)throw new s.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,_,o){if(!e.tty||!e.tty.ops.get_char)throw new s.ErrnoError(60);for(var a=0,l=0;l<_;l++){var c;try{c=e.tty.ops.get_char(e.tty)}catch{throw new s.ErrnoError(29)}if(c===void 0&&a===0)throw new s.ErrnoError(6);if(c==null)break;a++,t[r+l]=c}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,_,o){if(!e.tty||!e.tty.ops.put_char)throw new s.ErrnoError(60);try{for(var a=0;a<_;a++)e.tty.ops.put_char(e.tty,t[r+a])}catch{throw new s.ErrnoError(29)}return _&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char(e){return Vt()},put_char(e,t){t===null||t===10?(q(de(e.output,0)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(q(de(e.output,0)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,t,r){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,t){t===null||t===10?(w(de(e.output,0)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(de(e.output,0)),e.output=[])}}},Yt=(e,t)=>(C.fill(0,e,e+t),e),$t=(e,t)=>Math.ceil(e/t)*t,et=e=>{e=$t(e,65536);var t=ut(65536,e);return t?Yt(t,e):0},L={ops_table:null,mount(e){return L.createNode(null,"/",16895,0)},createNode(e,t,r,_){if(s.isBlkdev(r)||s.isFIFO(r))throw new s.ErrnoError(63);L.ops_table||={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:s.chrdev_stream_ops}};var o=s.createNode(e,t,r,_);return s.isDir(o.mode)?(o.node_ops=L.ops_table.dir.node,o.stream_ops=L.ops_table.dir.stream,o.contents={}):s.isFile(o.mode)?(o.node_ops=L.ops_table.file.node,o.stream_ops=L.ops_table.file.stream,o.usedBytes=0,o.contents=null):s.isLink(o.mode)?(o.node_ops=L.ops_table.link.node,o.stream_ops=L.ops_table.link.stream):s.isChrdev(o.mode)&&(o.node_ops=L.ops_table.chrdev.node,o.stream_ops=L.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){var _=1024*1024;t=Math.max(t,r*(r<_?2:1.125)>>>0),r!=0&&(t=Math.max(t,256));var o=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(o.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(t==0)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=s.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,s.isDir(e.mode)?t.size=4096:s.isFile(e.mode)?t.size=e.usedBytes:s.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){t.mode!==void 0&&(e.mode=t.mode),t.timestamp!==void 0&&(e.timestamp=t.timestamp),t.size!==void 0&&L.resizeFileStorage(e,t.size)},lookup(e,t){throw s.genericErrors[44]},mknod(e,t,r,_){return L.createNode(e,t,r,_)},rename(e,t,r){if(s.isDir(e.mode)){var _;try{_=s.lookupNode(t,r)}catch{}if(_)for(var o in _.contents)throw new s.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=s.lookupNode(e,t);for(var _ in r.contents)throw new s.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r of Object.keys(e.contents))t.push(r);return t},symlink(e,t,r){var _=L.createNode(e,t,41471,0);return _.link=r,_},readlink(e){if(!s.isLink(e.mode))throw new s.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,_,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var l=Math.min(e.node.usedBytes-o,_);if(l>8&&a.subarray)t.set(a.subarray(o,o+l),r);else for(var c=0;c0||r+t{var o=_?"":`al ${e}`;u(e).then(a=>{t(new Uint8Array(a)),o&&Ie(o)},a=>{if(r)r();else throw`Loading data file "${e}" failed.`}),o&&Fe(o)},Jt=(e,t,r,_,o,a)=>{s.createDataFile(e,t,r,_,o,a)},er=n.preloadPlugins||[],tr=(e,t,r,_)=>{typeof Browser<"u"&&Browser.init();var o=!1;return er.forEach(a=>{o||a.canHandle(t)&&(a.handle(e,t,r,_),o=!0)}),o},rr=(e,t,r,_,o,a,l,c,E,h)=>{var g=t?ee.resolve(Q.join2(e,t)):e,A=`cp ${g}`;function x(T){function b(M){h?.(),c||Jt(e,t,M,_,o,E),a?.(),Ie(A)}tr(T,g,b,()=>{l?.(),Ie(A)})||b(T)}Fe(A),typeof r=="string"?Zt(r,x,l):x(r)},nr=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},r=t[e];if(typeof r>"u")throw new Error(`Unknown file open mode: ${e}`);return r},Ue=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},s={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(e){this.name="ErrnoError",this.errno=e}},genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(e){this.node=e}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,t,r,_){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=s.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=_,this.readMode=365,this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return s.isDir(this.mode)}get isDevice(){return s.isChrdev(this.mode)}},lookupPath(e,t={}){if(e=ee.resolve(e),!e)return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};if(t=Object.assign(r,t),t.recurse_count>8)throw new s.ErrnoError(32);for(var _=e.split("/").filter(A=>!!A),o=s.root,a="/",l=0;l<_.length;l++){var c=l===_.length-1;if(c&&t.parent)break;if(o=s.lookupNode(o,_[l]),a=Q.join2(a,_[l]),s.isMountpoint(o)&&(!c||c&&t.follow_mount)&&(o=o.mounted.root),!c||t.follow)for(var E=0;s.isLink(o.mode);){var h=s.readlink(a);a=ee.resolve(Q.dirname(a),h);var g=s.lookupPath(a,{recurse_count:t.recurse_count+1});if(o=g.node,E++>40)throw new s.ErrnoError(32)}}return{path:a,node:o}},getPath(e){for(var t;;){if(s.isRoot(e)){var r=e.mount.mountpoint;return t?r[r.length-1]!=="/"?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,_=0;_>>0)%s.nameTable.length},hashAddNode(e){var t=s.hashName(e.parent.id,e.name);e.name_next=s.nameTable[t],s.nameTable[t]=e},hashRemoveNode(e){var t=s.hashName(e.parent.id,e.name);if(s.nameTable[t]===e)s.nameTable[t]=e.name_next;else for(var r=s.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=s.mayLookup(e);if(r)throw new s.ErrnoError(r);for(var _=s.hashName(e.id,t),o=s.nameTable[_];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===t)return o}return s.lookup(e,t)},createNode(e,t,r,_){var o=new s.FSNode(e,t,r,_);return s.hashAddNode(o),o},destroyNode(e){s.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)===32768},isDir(e){return(e&61440)===16384},isLink(e){return(e&61440)===40960},isChrdev(e){return(e&61440)===8192},isBlkdev(e){return(e&61440)===24576},isFIFO(e){return(e&61440)===4096},isSocket(e){return(e&49152)===49152},flagsToPermissionString(e){var t=["r","w","rw"][e&3];return e&512&&(t+="w"),t},nodePermissions(e,t){return s.ignorePermissions?0:t.includes("r")&&!(e.mode&292)||t.includes("w")&&!(e.mode&146)||t.includes("x")&&!(e.mode&73)?2:0},mayLookup(e){if(!s.isDir(e.mode))return 54;var t=s.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{var r=s.lookupNode(e,t);return 20}catch{}return s.nodePermissions(e,"wx")},mayDelete(e,t,r){var _;try{_=s.lookupNode(e,t)}catch(a){return a.errno}var o=s.nodePermissions(e,"wx");if(o)return o;if(r){if(!s.isDir(_.mode))return 54;if(s.isRoot(_)||s.getPath(_)===s.cwd())return 10}else if(s.isDir(_.mode))return 31;return 0},mayOpen(e,t){return e?s.isLink(e.mode)?32:s.isDir(e.mode)&&(s.flagsToPermissionString(t)!=="r"||t&512)?31:s.nodePermissions(e,s.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=s.MAX_OPEN_FDS;e++)if(!s.streams[e])return e;throw new s.ErrnoError(33)},getStreamChecked(e){var t=s.getStream(e);if(!t)throw new s.ErrnoError(8);return t},getStream:e=>s.streams[e],createStream(e,t=-1){return e=Object.assign(new s.FSStream,e),t==-1&&(t=s.nextfd()),e.fd=t,s.streams[t]=e,e},closeStream(e){s.streams[e]=null},dupStream(e,t=-1){var r=s.createStream(e,t);return r.stream_ops?.dup?.(r),r},chrdev_stream_ops:{open(e){var t=s.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new s.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,t)=>e<<8|t,registerDevice(e,t){s.devices[e]={stream_ops:t}},getDevice:e=>s.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var _=r.pop();t.push(_),r.push(..._.mounts)}return t},syncfs(e,t){typeof e=="function"&&(t=e,e=!1),s.syncFSRequests++,s.syncFSRequests>1&&w(`warning: ${s.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=s.getMounts(s.root.mount),_=0;function o(l){return s.syncFSRequests--,t(l)}function a(l){if(l)return a.errored?void 0:(a.errored=!0,o(l));++_>=r.length&&o(null)}r.forEach(l=>{if(!l.type.syncfs)return a(null);l.type.syncfs(l,e,a)})},mount(e,t,r){var _=r==="/",o=!r,a;if(_&&s.root)throw new s.ErrnoError(10);if(!_&&!o){var l=s.lookupPath(r,{follow_mount:!1});if(r=l.path,a=l.node,s.isMountpoint(a))throw new s.ErrnoError(10);if(!s.isDir(a.mode))throw new s.ErrnoError(54)}var c={type:e,opts:t,mountpoint:r,mounts:[]},E=e.mount(c);return E.mount=c,c.root=E,_?s.root=E:a&&(a.mounted=c,a.mount&&a.mount.mounts.push(c)),E},unmount(e){var t=s.lookupPath(e,{follow_mount:!1});if(!s.isMountpoint(t.node))throw new s.ErrnoError(28);var r=t.node,_=r.mounted,o=s.getMounts(_);Object.keys(s.nameTable).forEach(l=>{for(var c=s.nameTable[l];c;){var E=c.name_next;o.includes(c.mount)&&s.destroyNode(c),c=E}}),r.mounted=null;var a=r.mount.mounts.indexOf(_);r.mount.mounts.splice(a,1)},lookup(e,t){return e.node_ops.lookup(e,t)},mknod(e,t,r){var _=s.lookupPath(e,{parent:!0}),o=_.node,a=Q.basename(e);if(!a||a==="."||a==="..")throw new s.ErrnoError(28);var l=s.mayCreate(o,a);if(l)throw new s.ErrnoError(l);if(!o.node_ops.mknod)throw new s.ErrnoError(63);return o.node_ops.mknod(o,a,t,r)},create(e,t){return t=t!==void 0?t:438,t&=4095,t|=32768,s.mknod(e,t,0)},mkdir(e,t){return t=t!==void 0?t:511,t&=1023,t|=16384,s.mknod(e,t,0)},mkdirTree(e,t){for(var r=e.split("/"),_="",o=0;o"u"&&(r=t,t=438),t|=8192,s.mknod(e,t,r)},symlink(e,t){if(!ee.resolve(e))throw new s.ErrnoError(44);var r=s.lookupPath(t,{parent:!0}),_=r.node;if(!_)throw new s.ErrnoError(44);var o=Q.basename(t),a=s.mayCreate(_,o);if(a)throw new s.ErrnoError(a);if(!_.node_ops.symlink)throw new s.ErrnoError(63);return _.node_ops.symlink(_,o,e)},rename(e,t){var r=Q.dirname(e),_=Q.dirname(t),o=Q.basename(e),a=Q.basename(t),l,c,E;if(l=s.lookupPath(e,{parent:!0}),c=l.node,l=s.lookupPath(t,{parent:!0}),E=l.node,!c||!E)throw new s.ErrnoError(44);if(c.mount!==E.mount)throw new s.ErrnoError(75);var h=s.lookupNode(c,o),g=ee.relative(e,_);if(g.charAt(0)!==".")throw new s.ErrnoError(28);if(g=ee.relative(t,r),g.charAt(0)!==".")throw new s.ErrnoError(55);var A;try{A=s.lookupNode(E,a)}catch{}if(h!==A){var x=s.isDir(h.mode),T=s.mayDelete(c,o,x);if(T)throw new s.ErrnoError(T);if(T=A?s.mayDelete(E,a,x):s.mayCreate(E,a),T)throw new s.ErrnoError(T);if(!c.node_ops.rename)throw new s.ErrnoError(63);if(s.isMountpoint(h)||A&&s.isMountpoint(A))throw new s.ErrnoError(10);if(E!==c&&(T=s.nodePermissions(c,"w"),T))throw new s.ErrnoError(T);s.hashRemoveNode(h);try{c.node_ops.rename(h,E,a),h.parent=E}catch(b){throw b}finally{s.hashAddNode(h)}}},rmdir(e){var t=s.lookupPath(e,{parent:!0}),r=t.node,_=Q.basename(e),o=s.lookupNode(r,_),a=s.mayDelete(r,_,!0);if(a)throw new s.ErrnoError(a);if(!r.node_ops.rmdir)throw new s.ErrnoError(63);if(s.isMountpoint(o))throw new s.ErrnoError(10);r.node_ops.rmdir(r,_),s.destroyNode(o)},readdir(e){var t=s.lookupPath(e,{follow:!0}),r=t.node;if(!r.node_ops.readdir)throw new s.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var t=s.lookupPath(e,{parent:!0}),r=t.node;if(!r)throw new s.ErrnoError(44);var _=Q.basename(e),o=s.lookupNode(r,_),a=s.mayDelete(r,_,!1);if(a)throw new s.ErrnoError(a);if(!r.node_ops.unlink)throw new s.ErrnoError(63);if(s.isMountpoint(o))throw new s.ErrnoError(10);r.node_ops.unlink(r,_),s.destroyNode(o)},readlink(e){var t=s.lookupPath(e),r=t.node;if(!r)throw new s.ErrnoError(44);if(!r.node_ops.readlink)throw new s.ErrnoError(28);return ee.resolve(s.getPath(r.parent),r.node_ops.readlink(r))},stat(e,t){var r=s.lookupPath(e,{follow:!t}),_=r.node;if(!_)throw new s.ErrnoError(44);if(!_.node_ops.getattr)throw new s.ErrnoError(63);return _.node_ops.getattr(_)},lstat(e){return s.stat(e,!0)},chmod(e,t,r){var _;if(typeof e=="string"){var o=s.lookupPath(e,{follow:!r});_=o.node}else _=e;if(!_.node_ops.setattr)throw new s.ErrnoError(63);_.node_ops.setattr(_,{mode:t&4095|_.mode&-4096,timestamp:Date.now()})},lchmod(e,t){s.chmod(e,t,!0)},fchmod(e,t){var r=s.getStreamChecked(e);s.chmod(r.node,t)},chown(e,t,r,_){var o;if(typeof e=="string"){var a=s.lookupPath(e,{follow:!_});o=a.node}else o=e;if(!o.node_ops.setattr)throw new s.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,t,r){s.chown(e,t,r,!0)},fchown(e,t,r){var _=s.getStreamChecked(e);s.chown(_.node,t,r)},truncate(e,t){if(t<0)throw new s.ErrnoError(28);var r;if(typeof e=="string"){var _=s.lookupPath(e,{follow:!0});r=_.node}else r=e;if(!r.node_ops.setattr)throw new s.ErrnoError(63);if(s.isDir(r.mode))throw new s.ErrnoError(31);if(!s.isFile(r.mode))throw new s.ErrnoError(28);var o=s.nodePermissions(r,"w");if(o)throw new s.ErrnoError(o);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=s.getStreamChecked(e);if(!(r.flags&2097155))throw new s.ErrnoError(28);s.truncate(r.node,t)},utime(e,t,r){var _=s.lookupPath(e,{follow:!0}),o=_.node;o.node_ops.setattr(o,{timestamp:Math.max(t,r)})},open(e,t,r){if(e==="")throw new s.ErrnoError(44);t=typeof t=="string"?nr(t):t,t&64?(r=typeof r>"u"?438:r,r=r&4095|32768):r=0;var _;if(typeof e=="object")_=e;else{e=Q.normalize(e);try{var o=s.lookupPath(e,{follow:!(t&131072)});_=o.node}catch{}}var a=!1;if(t&64)if(_){if(t&128)throw new s.ErrnoError(20)}else _=s.mknod(e,r,0),a=!0;if(!_)throw new s.ErrnoError(44);if(s.isChrdev(_.mode)&&(t&=-513),t&65536&&!s.isDir(_.mode))throw new s.ErrnoError(54);if(!a){var l=s.mayOpen(_,t);if(l)throw new s.ErrnoError(l)}t&512&&!a&&s.truncate(_,0),t&=-131713;var c=s.createStream({node:_,path:s.getPath(_),flags:t,seekable:!0,position:0,stream_ops:_.stream_ops,ungotten:[],error:!1});return c.stream_ops.open&&c.stream_ops.open(c),n.logReadFiles&&!(t&1)&&(s.readFiles||(s.readFiles={}),e in s.readFiles||(s.readFiles[e]=1)),c},close(e){if(s.isClosed(e))throw new s.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(t){throw t}finally{s.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,t,r){if(s.isClosed(e))throw new s.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new s.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new s.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,_,o){if(_<0||o<0)throw new s.ErrnoError(28);if(s.isClosed(e))throw new s.ErrnoError(8);if((e.flags&2097155)===1)throw new s.ErrnoError(8);if(s.isDir(e.node.mode))throw new s.ErrnoError(31);if(!e.stream_ops.read)throw new s.ErrnoError(28);var a=typeof o<"u";if(!a)o=e.position;else if(!e.seekable)throw new s.ErrnoError(70);var l=e.stream_ops.read(e,t,r,_,o);return a||(e.position+=l),l},write(e,t,r,_,o,a){if(_<0||o<0)throw new s.ErrnoError(28);if(s.isClosed(e))throw new s.ErrnoError(8);if(!(e.flags&2097155))throw new s.ErrnoError(8);if(s.isDir(e.node.mode))throw new s.ErrnoError(31);if(!e.stream_ops.write)throw new s.ErrnoError(28);e.seekable&&e.flags&1024&&s.llseek(e,0,2);var l=typeof o<"u";if(!l)o=e.position;else if(!e.seekable)throw new s.ErrnoError(70);var c=e.stream_ops.write(e,t,r,_,o,a);return l||(e.position+=c),c},allocate(e,t,r){if(s.isClosed(e))throw new s.ErrnoError(8);if(t<0||r<=0)throw new s.ErrnoError(28);if(!(e.flags&2097155))throw new s.ErrnoError(8);if(!s.isFile(e.node.mode)&&!s.isDir(e.node.mode))throw new s.ErrnoError(43);if(!e.stream_ops.allocate)throw new s.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,_,o){if(_&2&&!(o&2)&&(e.flags&2097155)!==2)throw new s.ErrnoError(2);if((e.flags&2097155)===1)throw new s.ErrnoError(2);if(!e.stream_ops.mmap)throw new s.ErrnoError(43);return e.stream_ops.mmap(e,t,r,_,o)},msync(e,t,r,_,o){return e.stream_ops.msync?e.stream_ops.msync(e,t,r,_,o):0},ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new s.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary",t.encoding!=="utf8"&&t.encoding!=="binary")throw new Error(`Invalid encoding type "${t.encoding}"`);var r,_=s.open(e,t.flags),o=s.stat(e),a=o.size,l=new Uint8Array(a);return s.read(_,l,0,a,0),t.encoding==="utf8"?r=de(l,0):t.encoding==="binary"&&(r=l),s.close(_),r},writeFile(e,t,r={}){r.flags=r.flags||577;var _=s.open(e,r.flags,r.mode);if(typeof t=="string"){var o=new Uint8Array(pe(t)+1),a=De(t,o,0,o.length);s.write(_,o,0,a,void 0,r.canOwn)}else if(ArrayBuffer.isView(t))s.write(_,t,0,t.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");s.close(_)},cwd:()=>s.currentPath,chdir(e){var t=s.lookupPath(e,{follow:!0});if(t.node===null)throw new s.ErrnoError(44);if(!s.isDir(t.node.mode))throw new s.ErrnoError(54);var r=s.nodePermissions(t.node,"x");if(r)throw new s.ErrnoError(r);s.currentPath=t.path},createDefaultDirectories(){s.mkdir("/tmp"),s.mkdir("/home"),s.mkdir("/home/web_user")},createDefaultDevices(){s.mkdir("/dev"),s.registerDevice(s.makedev(1,3),{read:()=>0,write:(_,o,a,l,c)=>l}),s.mkdev("/dev/null",s.makedev(1,3)),_e.register(s.makedev(5,0),_e.default_tty_ops),_e.register(s.makedev(6,0),_e.default_tty1_ops),s.mkdev("/dev/tty",s.makedev(5,0)),s.mkdev("/dev/tty1",s.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(t===0&&(t=Je(e).byteLength),e[--t]);s.createDevice("/dev","random",r),s.createDevice("/dev","urandom",r),s.mkdir("/dev/shm"),s.mkdir("/dev/shm/tmp")},createSpecialDirectories(){s.mkdir("/proc");var e=s.mkdir("/proc/self");s.mkdir("/proc/self/fd"),s.mount({mount(){var t=s.createNode(e,"fd",16895,73);return t.node_ops={lookup(r,_){var o=+_,a=s.getStreamChecked(o),l={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>a.path}};return l.parent=l,l}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?s.createDevice("/dev","stdin",n.stdin):s.symlink("/dev/tty","/dev/stdin"),n.stdout?s.createDevice("/dev","stdout",null,n.stdout):s.symlink("/dev/tty","/dev/stdout"),n.stderr?s.createDevice("/dev","stderr",null,n.stderr):s.symlink("/dev/tty1","/dev/stderr");var e=s.open("/dev/stdin",0),t=s.open("/dev/stdout",1),r=s.open("/dev/stderr",1)},staticInit(){[44].forEach(e=>{s.genericErrors[e]=new s.ErrnoError(e),s.genericErrors[e].stack=""}),s.nameTable=new Array(4096),s.mount(L,{},"/"),s.createDefaultDirectories(),s.createDefaultDevices(),s.createSpecialDirectories(),s.filesystems={MEMFS:L}},init(e,t,r){s.init.initialized=!0,n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,s.createStandardStreams()},quit(){s.init.initialized=!1;for(var e=0;ethis.length-1||T<0)){var b=T%this.chunkSize,M=T/this.chunkSize|0;return this.getter(M)[b]}}setDataGetter(T){this.getter=T}cacheLength(){var T=new XMLHttpRequest;if(T.open("HEAD",r,!1),T.send(null),!(T.status>=200&&T.status<300||T.status===304))throw new Error("Couldn't load "+r+". Status: "+T.status);var b=Number(T.getResponseHeader("Content-length")),M,X=(M=T.getResponseHeader("Accept-Ranges"))&&M==="bytes",V=(M=T.getResponseHeader("Content-Encoding"))&&M==="gzip",Y=1024*1024;X||(Y=b);var $=(J,qe)=>{if(J>qe)throw new Error("invalid range ("+J+", "+qe+") or no bytes requested!");if(qe>b-1)throw new Error("only "+b+" bytes available! programmer error!");var H=new XMLHttpRequest;if(H.open("GET",r,!1),b!==Y&&H.setRequestHeader("Range","bytes="+J+"-"+qe),H.responseType="arraybuffer",H.overrideMimeType&&H.overrideMimeType("text/plain; charset=x-user-defined"),H.send(null),!(H.status>=200&&H.status<300||H.status===304))throw new Error("Couldn't load "+r+". Status: "+H.status);return H.response!==void 0?new Uint8Array(H.response||[]):Me(H.responseText||"",!0)},ye=this;ye.setDataGetter(J=>{var qe=J*Y,H=(J+1)*Y-1;if(H=Math.min(H,b-1),typeof ye.chunks[J]>"u"&&(ye.chunks[J]=$(qe,H)),typeof ye.chunks[J]>"u")throw new Error("doXHR failed!");return ye.chunks[J]}),(V||!b)&&(Y=b=1,b=this.getter(0).length,Y=b,q("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=b,this._chunkSize=Y,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!re)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var l=new a,c={isDevice:!1,contents:l}}else var c={isDevice:!1,url:r};var E=s.createFile(e,t,c,_,o);c.contents?E.contents=c.contents:c.url&&(E.contents=null,E.url=c.url),Object.defineProperties(E,{usedBytes:{get:function(){return this.contents.length}}});var h={},g=Object.keys(E.stream_ops);g.forEach(x=>{var T=E.stream_ops[x];h[x]=(...b)=>(s.forceLoadFile(E),T(...b))});function A(x,T,b,M,X){var V=x.node.contents;if(X>=V.length)return 0;var Y=Math.min(V.length-X,M);if(V.slice)for(var $=0;$(s.forceLoadFile(E),A(x,T,b,M,X)),h.mmap=(x,T,b,M,X)=>{s.forceLoadFile(E);var V=et(T);if(!V)throw new s.ErrnoError(48);return A(x,k,V,T,b),{ptr:V,allocated:!0}},E.stream_ops=h,E}},N={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(Q.isAbs(t))return t;var _;if(e===-100)_=s.cwd();else{var o=N.getStreamFromFD(e);_=o.path}if(t.length==0){if(!r)throw new s.ErrnoError(44);return _}return Q.join2(_,t)},doStat(e,t,r){var _=e(t);y[r>>2]=_.dev,y[r+4>>2]=_.mode,z[r+8>>2]=_.nlink,y[r+12>>2]=_.uid,y[r+16>>2]=_.gid,y[r+20>>2]=_.rdev,P=[_.size>>>0,(S=_.size,+Math.abs(S)>=1?S>0?+Math.floor(S/4294967296)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)],y[r+24>>2]=P[0],y[r+28>>2]=P[1],y[r+32>>2]=4096,y[r+36>>2]=_.blocks;var o=_.atime.getTime(),a=_.mtime.getTime(),l=_.ctime.getTime();return P=[Math.floor(o/1e3)>>>0,(S=Math.floor(o/1e3),+Math.abs(S)>=1?S>0?+Math.floor(S/4294967296)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)],y[r+40>>2]=P[0],y[r+44>>2]=P[1],z[r+48>>2]=o%1e3*1e3,P=[Math.floor(a/1e3)>>>0,(S=Math.floor(a/1e3),+Math.abs(S)>=1?S>0?+Math.floor(S/4294967296)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)],y[r+56>>2]=P[0],y[r+60>>2]=P[1],z[r+64>>2]=a%1e3*1e3,P=[Math.floor(l/1e3)>>>0,(S=Math.floor(l/1e3),+Math.abs(S)>=1?S>0?+Math.floor(S/4294967296)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)],y[r+72>>2]=P[0],y[r+76>>2]=P[1],z[r+80>>2]=l%1e3*1e3,P=[_.ino>>>0,(S=_.ino,+Math.abs(S)>=1?S>0?+Math.floor(S/4294967296)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)],y[r+88>>2]=P[0],y[r+92>>2]=P[1],0},doMsync(e,t,r,_,o){if(!s.isFile(t.node.mode))throw new s.ErrnoError(43);if(_&2)return 0;var a=C.slice(e,e+r);s.msync(t,a,o,r,_)},getStreamFromFD(e){var t=s.getStreamChecked(e);return t},varargs:void 0,getStr(e){var t=ce(e);return t}};function _r(e,t){try{return e=N.getStr(e),s.chmod(e,t),0}catch(r){if(typeof s>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}function sr(e,t,r,_){try{if(t=N.getStr(t),t=N.calculateAt(e,t),r&-8)return-28;var o=s.lookupPath(t,{follow:!0}),a=o.node;if(!a)return-44;var l="";return r&4&&(l+="r"),r&2&&(l+="w"),r&1&&(l+="x"),l&&s.nodePermissions(a,l)?-2:0}catch(c){if(typeof s>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}function or(e,t){try{return s.fchmod(e,t),0}catch(r){if(typeof s>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}function ir(e,t,r){try{return s.fchown(e,t,r),0}catch(_){if(typeof s>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}function Ne(){var e=y[+N.varargs>>2];return N.varargs+=4,e}var ar=Ne;function lr(e,t,r){N.varargs=r;try{var _=N.getStreamFromFD(e);switch(t){case 0:{var o=Ne();if(o<0)return-28;for(;s.streams[o];)o++;var a;return a=s.dupStream(_,o),a.fd}case 1:case 2:return 0;case 3:return _.flags;case 4:{var o=Ne();return _.flags|=o,0}case 12:{var o=ar(),l=0;return U[o+l>>1]=2,0}case 13:case 14:return 0}return-28}catch(c){if(typeof s>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}function cr(e,t){try{var r=N.getStreamFromFD(e);return N.doStat(s.stat,r.path,t)}catch(_){if(typeof s>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}var Te=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+t*4294967296:NaN;function ur(e,t,r){var _=Te(t,r);try{return isNaN(_)?61:(s.ftruncate(e,_),0)}catch(o){if(typeof s>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}var se=(e,t,r)=>De(e,C,t,r);function fr(e,t){try{if(t===0)return-28;var r=s.cwd(),_=pe(r)+1;return t<_?-68:(se(r,e,t),_)}catch(o){if(typeof s>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}function dr(e,t){try{return e=N.getStr(e),N.doStat(s.lstat,e,t)}catch(r){if(typeof s>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}function pr(e,t,r){try{return t=N.getStr(t),t=N.calculateAt(e,t),t=Q.normalize(t),t[t.length-1]==="/"&&(t=t.substr(0,t.length-1)),s.mkdir(t,r,0),0}catch(_){if(typeof s>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}function vr(e,t,r,_){try{t=N.getStr(t);var o=_&256,a=_&4096;return _=_&-6401,t=N.calculateAt(e,t,a),N.doStat(o?s.lstat:s.stat,t,r)}catch(l){if(typeof s>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}function mr(e,t,r,_){N.varargs=_;try{t=N.getStr(t),t=N.calculateAt(e,t);var o=_?Ne():0;return s.open(t,r,o).fd}catch(a){if(typeof s>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}function Er(e,t,r,_){try{if(t=N.getStr(t),t=N.calculateAt(e,t),_<=0)return-28;var o=s.readlink(t),a=Math.min(_,pe(o)),l=k[r+a];return se(o,r,_+1),k[r+a]=l,a}catch(c){if(typeof s>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}function qr(e){try{return e=N.getStr(e),s.rmdir(e),0}catch(t){if(typeof s>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}function hr(e,t){try{return e=N.getStr(e),N.doStat(s.stat,e,t)}catch(r){if(typeof s>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}function br(e,t,r){try{return t=N.getStr(t),t=N.calculateAt(e,t),r===0?s.unlink(t):r===512?s.rmdir(t):ne("Invalid flags passed to unlinkat"),0}catch(_){if(typeof s>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}var tt=e=>z[e>>2]+y[e+4>>2]*4294967296;function Tr(e,t,r,_){try{if(t=N.getStr(t),t=N.calculateAt(e,t,!0),r){var l=tt(r),c=y[r+8>>2];o=l*1e3+c/1e6,r+=16,l=tt(r),c=y[r+8>>2],a=l*1e3+c/1e6}else var o=Date.now(),a=o;return s.utime(t,o,a),0}catch(E){if(typeof s>"u"||E.name!=="ErrnoError")throw E;return-E.errno}}var wr=e=>e%4===0&&(e%100!==0||e%400===0),yr=[0,31,60,91,121,152,182,213,244,274,305,335],Sr=[0,31,59,90,120,151,181,212,243,273,304,334],gr=e=>{var t=wr(e.getFullYear()),r=t?yr:Sr,_=r[e.getMonth()]+e.getDate()-1;return _};function Ir(e,t,r){var _=Te(e,t),o=new Date(_*1e3);y[r>>2]=o.getSeconds(),y[r+4>>2]=o.getMinutes(),y[r+8>>2]=o.getHours(),y[r+12>>2]=o.getDate(),y[r+16>>2]=o.getMonth(),y[r+20>>2]=o.getFullYear()-1900,y[r+24>>2]=o.getDay();var a=gr(o)|0;y[r+28>>2]=a,y[r+36>>2]=-(o.getTimezoneOffset()*60);var l=new Date(o.getFullYear(),0,1),c=new Date(o.getFullYear(),6,1).getTimezoneOffset(),E=l.getTimezoneOffset(),h=(c!=E&&o.getTimezoneOffset()==Math.min(E,c))|0;y[r+32>>2]=h}function Lr(e,t,r,_,o,a,l,c){var E=Te(o,a);try{if(isNaN(E))return 61;var h=N.getStreamFromFD(_),g=s.mmap(h,e,E,t,r),A=g.ptr;return y[l>>2]=g.allocated,z[c>>2]=A,0}catch(x){if(typeof s>"u"||x.name!=="ErrnoError")throw x;return-x.errno}}function xr(e,t,r,_,o,a,l){var c=Te(a,l);try{var E=N.getStreamFromFD(o);r&2&&N.doMsync(e,E,t,_,c)}catch(h){if(typeof s>"u"||h.name!=="ErrnoError")throw h;return-h.errno}}var Ar=(e,t,r,_)=>{var o=new Date().getFullYear(),a=new Date(o,0,1),l=new Date(o,6,1),c=a.getTimezoneOffset(),E=l.getTimezoneOffset(),h=Math.max(c,E);z[e>>2]=h*60,y[t>>2]=+(c!=E);var g=T=>T.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1],A=g(a),x=g(l);EDate.now(),rt;rt=()=>performance.now();var Rr=()=>2147483648,kr=e=>{var t=D.buffer,r=(e-t.byteLength+65535)/65536;try{return D.grow(r),He(),1}catch{}},Or=e=>{var t=C.length;e>>>=0;var r=Rr();if(e>r)return!1;for(var _=(E,h)=>E+(h-E%h)%h,o=1;o<=4;o*=2){var a=t*(1+.2/o);a=Math.min(a,e+100663296);var l=Math.min(r,_(Math.max(e,a),65536)),c=kr(l);if(c)return!0}return!1},ze={},Qr=()=>B||"./this.program",we=()=>{if(!we.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Qr()};for(var r in ze)ze[r]===void 0?delete t[r]:t[r]=ze[r];var _=[];for(var r in t)_.push(`${r}=${t[r]}`);we.strings=_}return we.strings},Cr=(e,t)=>{for(var r=0;r{var r=0;return we().forEach((_,o)=>{var a=t+r;z[e+o*4>>2]=a,Cr(_,a),r+=_.length+1}),0},Pr=(e,t)=>{var r=we();z[e>>2]=r.length;var _=0;return r.forEach(o=>_+=o.length+1),z[t>>2]=_,0};function Dr(e){try{var t=N.getStreamFromFD(e);return s.close(t),0}catch(r){if(typeof s>"u"||r.name!=="ErrnoError")throw r;return r.errno}}function Mr(e,t){try{var r=0,_=0,o=0,a=N.getStreamFromFD(e),l=a.tty?2:s.isDir(a.mode)?3:s.isLink(a.mode)?7:4;return k[t]=l,U[t+2>>1]=o,P=[r>>>0,(S=r,+Math.abs(S)>=1?S>0?+Math.floor(S/4294967296)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)],y[t+8>>2]=P[0],y[t+12>>2]=P[1],P=[_>>>0,(S=_,+Math.abs(S)>=1?S>0?+Math.floor(S/4294967296)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)],y[t+16>>2]=P[0],y[t+20>>2]=P[1],0}catch(c){if(typeof s>"u"||c.name!=="ErrnoError")throw c;return c.errno}}var Ur=(e,t,r,_)=>{for(var o=0,a=0;a>2],c=z[t+4>>2];t+=8;var E=s.read(e,k,l,c,_);if(E<0)return-1;if(o+=E,E>2]=a,0}catch(l){if(typeof s>"u"||l.name!=="ErrnoError")throw l;return l.errno}}function Br(e,t,r,_,o){var a=Te(t,r);try{if(isNaN(a))return 61;var l=N.getStreamFromFD(e);return s.llseek(l,a,_),P=[l.position>>>0,(S=l.position,+Math.abs(S)>=1?S>0?+Math.floor(S/4294967296)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)],y[o>>2]=P[0],y[o+4>>2]=P[1],l.getdents&&a===0&&_===0&&(l.getdents=null),0}catch(c){if(typeof s>"u"||c.name!=="ErrnoError")throw c;return c.errno}}function Hr(e){try{var t=N.getStreamFromFD(e);return t.stream_ops?.fsync?t.stream_ops.fsync(t):0}catch(r){if(typeof s>"u"||r.name!=="ErrnoError")throw r;return r.errno}}var Wr=(e,t,r,_)=>{for(var o=0,a=0;a>2],c=z[t+4>>2];t+=8;var E=s.write(e,k,l,c,_);if(E<0)return-1;o+=E,typeof _<"u"&&(_+=E)}return o};function jr(e,t,r,_){try{var o=N.getStreamFromFD(e),a=Wr(o,t,r);return z[_>>2]=a,0}catch(l){if(typeof s>"u"||l.name!=="ErrnoError")throw l;return l.errno}}var O=function(){let e=typeof Asyncify=="object"?Asyncify.handleAsync.bind(Asyncify):null;n.handleAsync=e;let t=new Map;n.setCallback=(r,_)=>t.set(r,_),n.getCallback=r=>t.get(r),n.deleteCallback=r=>t.delete(r),O=function(r,_,...o){let a=t.get(_),l=null,c=typeof a=="function"?a:a[l=ce(o.shift())];if(r){if(e)return e(()=>c.apply(a,o));throw new Error("Synchronous WebAssembly cannot call async function")}let E=c.apply(a,o);if(typeof E?.then=="function")throw console.error("unexpected Promise",c),new Error(`${l} unexpectedly returned a Promise`);return E}};function Gr(...e){return O(!1,...e)}function Kr(...e){return O(!0,...e)}function Xr(...e){return O(!1,...e)}function Vr(...e){return O(!0,...e)}function Yr(...e){return O(!1,...e)}function $r(...e){return O(!0,...e)}function Zr(...e){return O(!1,...e)}function Jr(...e){return O(!0,...e)}function en(...e){return O(!1,...e)}function tn(...e){return O(!0,...e)}function rn(...e){return O(!1,...e)}function nn(...e){return O(!0,...e)}function _n(...e){return O(!1,...e)}function sn(...e){return O(!0,...e)}function on(...e){return O(!1,...e)}function an(...e){return O(!0,...e)}function ln(...e){return O(!1,...e)}function cn(...e){return O(!0,...e)}function un(...e){return O(!1,...e)}function fn(...e){return O(!0,...e)}function dn(...e){return O(!1,...e)}function pn(...e){return O(!0,...e)}function vn(...e){return O(!1,...e)}function mn(...e){return O(!0,...e)}function En(...e){return O(!1,...e)}function qn(...e){return O(!0,...e)}function hn(...e){return O(!1,...e)}function bn(...e){return O(!0,...e)}function Tn(...e){return O(!1,...e)}function wn(...e){return O(!0,...e)}var yn=0,Sn=()=>Wt||yn>0,gn=e=>{j=e,Sn()||(n.onExit?.(e),W=!0),ae(e,new Ye(e))},In=(e,t)=>{j=e,gn(e)},Ln=e=>{if(e instanceof Ye||e=="unwind")return j;ae(1,e)},nt=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},xn=e=>{for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:e[0]=="v"?[]:[t[e[0]]]},_=1;_{var r=e.slice(0,1),_=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),nt(_.length,t);for(var a=0;a<_.length;++a)t.push(o[_[a]]);r=="v"?t.push(0):t.push(1,o[r])},Nn=(e,t)=>{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(xn(t),e);var r=[1];An(t,r);var _=[0,97,115,109,1,0,0,0,1];nt(r.length,_),_.push(...r),_.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(_)),a=new WebAssembly.Instance(o,{e:{f:e}}),l=a.exports.f;return l},ve,Rn=e=>ve.get(e),kn=(e,t)=>{if(me)for(var r=e;r(me||(me=new WeakMap,kn(0,ve.length)),me.get(e)||0),_t=[],Qn=()=>{if(_t.length)return _t.pop();try{ve.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return ve.length-1},st=(e,t)=>ve.set(e,t),Cn=(e,t)=>{var r=On(e);if(r)return r;var _=Qn();try{st(_,e)}catch(a){if(!(a instanceof TypeError))throw a;var o=Nn(e,t);st(_,o)}return me.set(e,_),_},ot=e=>{var t=n["_"+e];return t},it=(e,t)=>{k.set(e,t)},at=e=>pt(e),Fn=e=>{var t=pe(e)+1,r=at(t);return se(e,r,t),r},Ee=(e,t,r,_,o)=>{var a={string:b=>{var M=0;return b!=null&&b!==0&&(M=Fn(b)),M},array:b=>{var M=at(b.length);return it(b,M),M}};function l(b){return t==="string"?ce(b):t==="boolean"?!!b:b}var c=ot(e),E=[],h=0;if(_)for(var g=0;g<_.length;g++){var A=a[r[g]];A?(h===0&&(h=Gt()),E[g]=A(_[g])):E[g]=_[g]}var x=c(...E);function T(b){return h!==0&&jt(h),l(b)}return x=T(x),x},Pn=(e,t,r,_)=>{var o=!r||r.every(l=>l==="number"||l==="boolean"),a=t!=="string";return a&&o&&!_?ot(e):(...l)=>Ee(e,t,r,l,_)},Dn=e=>ft(),Mn=(e,t,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var _=t,o=r>1]=l,t+=2}return U[t>>1]=0,t-_},Un=(e,t,r)=>{if(r??=2147483647,r<4)return 0;for(var _=t,o=_+r-4,a=0;a=55296&&l<=57343){var c=e.charCodeAt(++a);l=65536+((l&1023)<<10)|c&1023}if(y[t>>2]=l,t+=4,t+4>o)break}return y[t>>2]=0,t-_},zn=e=>{for(var t="";;){var r=C[e++];if(!r)return t;t+=String.fromCharCode(r)}},lt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Bn=(e,t)=>{for(var r=e,_=r>>1,o=_+t/2;!(_>=o)&&Z[_];)++_;if(r=_<<1,r-e>32&<)return lt.decode(C.subarray(e,r));for(var a="",l=0;!(l>=t/2);++l){var c=U[e+l*2>>1];if(c==0)break;a+=String.fromCharCode(c)}return a},Hn=(e,t)=>{for(var r=0,_="";!(r>=t/4);){var o=y[e+r*4>>2];if(o==0)break;if(++r,o>=65536){var a=o-65536;_+=String.fromCharCode(55296|a>>10,56320|a&1023)}else _+=String.fromCharCode(o)}return _};function Wn(e){for(var t=[],r=0;r255&&(_&=255),t.push(String.fromCharCode(_))}return t.join("")}s.createPreloadedFile=rr,s.staticInit(),O();var jn={a:Kt,Y:_r,$:sr,Z:or,X:ir,b:lr,W:cr,y:ur,Q:fr,U:dr,N:pr,T:vr,L:mr,J:Er,I:qr,V:hr,G:br,F:Tr,w:Ir,u:Lr,v:xr,M:Ar,n:Nr,m:rt,D:Or,O:Fr,P:Pr,o:Dr,E:Mr,K:zr,x:Br,S:Hr,H:jr,s:Gr,t:Kr,fa:Xr,ia:Vr,i:Yr,j:$r,c:Zr,d:Jr,ca:en,da:tn,ea:rn,ga:nn,g:_n,h:sn,z:on,A:an,e:ln,f:cn,aa:un,ba:fn,B:dn,C:pn,p:vn,q:mn,ha:En,r:qn,k:hn,l:bn,R:Tn,_:wn},i=Ht(),Gn=()=>(Gn=i.ka)(),Kn=n._sqlite3_status64=(e,t,r,_)=>(Kn=n._sqlite3_status64=i.la)(e,t,r,_),Xn=n._sqlite3_status=(e,t,r,_)=>(Xn=n._sqlite3_status=i.ma)(e,t,r,_),Vn=n._sqlite3_db_status=(e,t,r,_,o)=>(Vn=n._sqlite3_db_status=i.na)(e,t,r,_,o),Yn=n._sqlite3_msize=e=>(Yn=n._sqlite3_msize=i.oa)(e),$n=n._sqlite3_vfs_find=e=>($n=n._sqlite3_vfs_find=i.pa)(e),Zn=n._sqlite3_vfs_register=(e,t)=>(Zn=n._sqlite3_vfs_register=i.qa)(e,t),Jn=n._sqlite3_vfs_unregister=e=>(Jn=n._sqlite3_vfs_unregister=i.ra)(e),e_=n._sqlite3_release_memory=e=>(e_=n._sqlite3_release_memory=i.sa)(e),t_=n._sqlite3_soft_heap_limit64=(e,t)=>(t_=n._sqlite3_soft_heap_limit64=i.ta)(e,t),r_=n._sqlite3_memory_used=()=>(r_=n._sqlite3_memory_used=i.ua)(),n_=n._sqlite3_hard_heap_limit64=(e,t)=>(n_=n._sqlite3_hard_heap_limit64=i.va)(e,t),__=n._sqlite3_memory_highwater=e=>(__=n._sqlite3_memory_highwater=i.wa)(e),s_=n._sqlite3_malloc=e=>(s_=n._sqlite3_malloc=i.xa)(e),o_=n._sqlite3_malloc64=(e,t)=>(o_=n._sqlite3_malloc64=i.ya)(e,t),i_=n._sqlite3_free=e=>(i_=n._sqlite3_free=i.za)(e),a_=n._sqlite3_realloc=(e,t)=>(a_=n._sqlite3_realloc=i.Aa)(e,t),l_=n._sqlite3_realloc64=(e,t,r)=>(l_=n._sqlite3_realloc64=i.Ba)(e,t,r),c_=n._sqlite3_str_vappendf=(e,t,r)=>(c_=n._sqlite3_str_vappendf=i.Ca)(e,t,r),u_=n._sqlite3_str_append=(e,t,r)=>(u_=n._sqlite3_str_append=i.Da)(e,t,r),f_=n._sqlite3_str_appendchar=(e,t,r)=>(f_=n._sqlite3_str_appendchar=i.Ea)(e,t,r),d_=n._sqlite3_str_appendall=(e,t)=>(d_=n._sqlite3_str_appendall=i.Fa)(e,t),p_=n._sqlite3_str_appendf=(e,t,r)=>(p_=n._sqlite3_str_appendf=i.Ga)(e,t,r),v_=n._sqlite3_str_finish=e=>(v_=n._sqlite3_str_finish=i.Ha)(e),m_=n._sqlite3_str_errcode=e=>(m_=n._sqlite3_str_errcode=i.Ia)(e),E_=n._sqlite3_str_length=e=>(E_=n._sqlite3_str_length=i.Ja)(e),q_=n._sqlite3_str_value=e=>(q_=n._sqlite3_str_value=i.Ka)(e),h_=n._sqlite3_str_reset=e=>(h_=n._sqlite3_str_reset=i.La)(e),b_=n._sqlite3_str_new=e=>(b_=n._sqlite3_str_new=i.Ma)(e),T_=n._sqlite3_vmprintf=(e,t)=>(T_=n._sqlite3_vmprintf=i.Na)(e,t),w_=n._sqlite3_mprintf=(e,t)=>(w_=n._sqlite3_mprintf=i.Oa)(e,t),y_=n._sqlite3_vsnprintf=(e,t,r,_)=>(y_=n._sqlite3_vsnprintf=i.Pa)(e,t,r,_),S_=n._sqlite3_snprintf=(e,t,r,_)=>(S_=n._sqlite3_snprintf=i.Qa)(e,t,r,_),g_=n._sqlite3_log=(e,t,r)=>(g_=n._sqlite3_log=i.Ra)(e,t,r),I_=n._sqlite3_randomness=(e,t)=>(I_=n._sqlite3_randomness=i.Sa)(e,t),L_=n._sqlite3_stricmp=(e,t)=>(L_=n._sqlite3_stricmp=i.Ta)(e,t),x_=n._sqlite3_strnicmp=(e,t,r)=>(x_=n._sqlite3_strnicmp=i.Ua)(e,t,r),A_=n._sqlite3_os_init=()=>(A_=n._sqlite3_os_init=i.Va)(),N_=n._sqlite3_os_end=()=>(N_=n._sqlite3_os_end=i.Wa)(),R_=n._sqlite3_serialize=(e,t,r,_)=>(R_=n._sqlite3_serialize=i.Xa)(e,t,r,_),k_=n._sqlite3_prepare_v2=(e,t,r,_,o)=>(k_=n._sqlite3_prepare_v2=i.Ya)(e,t,r,_,o),O_=n._sqlite3_step=e=>(O_=n._sqlite3_step=i.Za)(e),Q_=n._sqlite3_column_int64=(e,t)=>(Q_=n._sqlite3_column_int64=i._a)(e,t),C_=n._sqlite3_reset=e=>(C_=n._sqlite3_reset=i.$a)(e),F_=n._sqlite3_exec=(e,t,r,_,o)=>(F_=n._sqlite3_exec=i.ab)(e,t,r,_,o),P_=n._sqlite3_column_int=(e,t)=>(P_=n._sqlite3_column_int=i.bb)(e,t),D_=n._sqlite3_finalize=e=>(D_=n._sqlite3_finalize=i.cb)(e),M_=n._sqlite3_deserialize=(e,t,r,_,o,a,l,c)=>(M_=n._sqlite3_deserialize=i.db)(e,t,r,_,o,a,l,c),U_=n._sqlite3_database_file_object=e=>(U_=n._sqlite3_database_file_object=i.eb)(e),z_=n._sqlite3_backup_init=(e,t,r,_)=>(z_=n._sqlite3_backup_init=i.fb)(e,t,r,_),B_=n._sqlite3_backup_step=(e,t)=>(B_=n._sqlite3_backup_step=i.gb)(e,t),H_=n._sqlite3_backup_finish=e=>(H_=n._sqlite3_backup_finish=i.hb)(e),W_=n._sqlite3_backup_remaining=e=>(W_=n._sqlite3_backup_remaining=i.ib)(e),j_=n._sqlite3_backup_pagecount=e=>(j_=n._sqlite3_backup_pagecount=i.jb)(e),G_=n._sqlite3_clear_bindings=e=>(G_=n._sqlite3_clear_bindings=i.kb)(e),K_=n._sqlite3_value_blob=e=>(K_=n._sqlite3_value_blob=i.lb)(e),X_=n._sqlite3_value_text=e=>(X_=n._sqlite3_value_text=i.mb)(e),V_=n._sqlite3_value_bytes=e=>(V_=n._sqlite3_value_bytes=i.nb)(e),Y_=n._sqlite3_value_bytes16=e=>(Y_=n._sqlite3_value_bytes16=i.ob)(e),$_=n._sqlite3_value_double=e=>($_=n._sqlite3_value_double=i.pb)(e),Z_=n._sqlite3_value_int=e=>(Z_=n._sqlite3_value_int=i.qb)(e),J_=n._sqlite3_value_int64=e=>(J_=n._sqlite3_value_int64=i.rb)(e),es=n._sqlite3_value_subtype=e=>(es=n._sqlite3_value_subtype=i.sb)(e),ts=n._sqlite3_value_pointer=(e,t)=>(ts=n._sqlite3_value_pointer=i.tb)(e,t),rs=n._sqlite3_value_text16=e=>(rs=n._sqlite3_value_text16=i.ub)(e),ns=n._sqlite3_value_text16be=e=>(ns=n._sqlite3_value_text16be=i.vb)(e),_s=n._sqlite3_value_text16le=e=>(_s=n._sqlite3_value_text16le=i.wb)(e),ss=n._sqlite3_value_type=e=>(ss=n._sqlite3_value_type=i.xb)(e),os=n._sqlite3_value_encoding=e=>(os=n._sqlite3_value_encoding=i.yb)(e),is=n._sqlite3_value_nochange=e=>(is=n._sqlite3_value_nochange=i.zb)(e),as=n._sqlite3_value_frombind=e=>(as=n._sqlite3_value_frombind=i.Ab)(e),ls=n._sqlite3_value_dup=e=>(ls=n._sqlite3_value_dup=i.Bb)(e),cs=n._sqlite3_value_free=e=>(cs=n._sqlite3_value_free=i.Cb)(e),us=n._sqlite3_result_blob=(e,t,r,_)=>(us=n._sqlite3_result_blob=i.Db)(e,t,r,_),fs=n._sqlite3_result_blob64=(e,t,r,_,o)=>(fs=n._sqlite3_result_blob64=i.Eb)(e,t,r,_,o),ds=n._sqlite3_result_double=(e,t)=>(ds=n._sqlite3_result_double=i.Fb)(e,t),ps=n._sqlite3_result_error=(e,t,r)=>(ps=n._sqlite3_result_error=i.Gb)(e,t,r),vs=n._sqlite3_result_error16=(e,t,r)=>(vs=n._sqlite3_result_error16=i.Hb)(e,t,r),ms=n._sqlite3_result_int=(e,t)=>(ms=n._sqlite3_result_int=i.Ib)(e,t),Es=n._sqlite3_result_int64=(e,t,r)=>(Es=n._sqlite3_result_int64=i.Jb)(e,t,r),qs=n._sqlite3_result_null=e=>(qs=n._sqlite3_result_null=i.Kb)(e),hs=n._sqlite3_result_pointer=(e,t,r,_)=>(hs=n._sqlite3_result_pointer=i.Lb)(e,t,r,_),bs=n._sqlite3_result_subtype=(e,t)=>(bs=n._sqlite3_result_subtype=i.Mb)(e,t),Ts=n._sqlite3_result_text=(e,t,r,_)=>(Ts=n._sqlite3_result_text=i.Nb)(e,t,r,_),ws=n._sqlite3_result_text64=(e,t,r,_,o,a)=>(ws=n._sqlite3_result_text64=i.Ob)(e,t,r,_,o,a),ys=n._sqlite3_result_text16=(e,t,r,_)=>(ys=n._sqlite3_result_text16=i.Pb)(e,t,r,_),Ss=n._sqlite3_result_text16be=(e,t,r,_)=>(Ss=n._sqlite3_result_text16be=i.Qb)(e,t,r,_),gs=n._sqlite3_result_text16le=(e,t,r,_)=>(gs=n._sqlite3_result_text16le=i.Rb)(e,t,r,_),Is=n._sqlite3_result_value=(e,t)=>(Is=n._sqlite3_result_value=i.Sb)(e,t),Ls=n._sqlite3_result_error_toobig=e=>(Ls=n._sqlite3_result_error_toobig=i.Tb)(e),xs=n._sqlite3_result_zeroblob=(e,t)=>(xs=n._sqlite3_result_zeroblob=i.Ub)(e,t),As=n._sqlite3_result_zeroblob64=(e,t,r)=>(As=n._sqlite3_result_zeroblob64=i.Vb)(e,t,r),Ns=n._sqlite3_result_error_code=(e,t)=>(Ns=n._sqlite3_result_error_code=i.Wb)(e,t),Rs=n._sqlite3_result_error_nomem=e=>(Rs=n._sqlite3_result_error_nomem=i.Xb)(e),ks=n._sqlite3_user_data=e=>(ks=n._sqlite3_user_data=i.Yb)(e),Os=n._sqlite3_context_db_handle=e=>(Os=n._sqlite3_context_db_handle=i.Zb)(e),Qs=n._sqlite3_vtab_nochange=e=>(Qs=n._sqlite3_vtab_nochange=i._b)(e),Cs=n._sqlite3_vtab_in_first=(e,t)=>(Cs=n._sqlite3_vtab_in_first=i.$b)(e,t),Fs=n._sqlite3_vtab_in_next=(e,t)=>(Fs=n._sqlite3_vtab_in_next=i.ac)(e,t),Ps=n._sqlite3_aggregate_context=(e,t)=>(Ps=n._sqlite3_aggregate_context=i.bc)(e,t),Ds=n._sqlite3_get_auxdata=(e,t)=>(Ds=n._sqlite3_get_auxdata=i.cc)(e,t),Ms=n._sqlite3_set_auxdata=(e,t,r,_)=>(Ms=n._sqlite3_set_auxdata=i.dc)(e,t,r,_),Us=n._sqlite3_column_count=e=>(Us=n._sqlite3_column_count=i.ec)(e),zs=n._sqlite3_data_count=e=>(zs=n._sqlite3_data_count=i.fc)(e),Bs=n._sqlite3_column_blob=(e,t)=>(Bs=n._sqlite3_column_blob=i.gc)(e,t),Hs=n._sqlite3_column_bytes=(e,t)=>(Hs=n._sqlite3_column_bytes=i.hc)(e,t),Ws=n._sqlite3_column_bytes16=(e,t)=>(Ws=n._sqlite3_column_bytes16=i.ic)(e,t),js=n._sqlite3_column_double=(e,t)=>(js=n._sqlite3_column_double=i.jc)(e,t),Gs=n._sqlite3_column_text=(e,t)=>(Gs=n._sqlite3_column_text=i.kc)(e,t),Ks=n._sqlite3_column_value=(e,t)=>(Ks=n._sqlite3_column_value=i.lc)(e,t),Xs=n._sqlite3_column_text16=(e,t)=>(Xs=n._sqlite3_column_text16=i.mc)(e,t),Vs=n._sqlite3_column_type=(e,t)=>(Vs=n._sqlite3_column_type=i.nc)(e,t),Ys=n._sqlite3_column_name=(e,t)=>(Ys=n._sqlite3_column_name=i.oc)(e,t),$s=n._sqlite3_column_name16=(e,t)=>($s=n._sqlite3_column_name16=i.pc)(e,t),Zs=n._sqlite3_bind_blob=(e,t,r,_,o)=>(Zs=n._sqlite3_bind_blob=i.qc)(e,t,r,_,o),Js=n._sqlite3_bind_blob64=(e,t,r,_,o,a)=>(Js=n._sqlite3_bind_blob64=i.rc)(e,t,r,_,o,a),eo=n._sqlite3_bind_double=(e,t,r)=>(eo=n._sqlite3_bind_double=i.sc)(e,t,r),to=n._sqlite3_bind_int=(e,t,r)=>(to=n._sqlite3_bind_int=i.tc)(e,t,r),ro=n._sqlite3_bind_int64=(e,t,r,_)=>(ro=n._sqlite3_bind_int64=i.uc)(e,t,r,_),no=n._sqlite3_bind_null=(e,t)=>(no=n._sqlite3_bind_null=i.vc)(e,t),_o=n._sqlite3_bind_pointer=(e,t,r,_,o)=>(_o=n._sqlite3_bind_pointer=i.wc)(e,t,r,_,o),so=n._sqlite3_bind_text=(e,t,r,_,o)=>(so=n._sqlite3_bind_text=i.xc)(e,t,r,_,o),oo=n._sqlite3_bind_text64=(e,t,r,_,o,a,l)=>(oo=n._sqlite3_bind_text64=i.yc)(e,t,r,_,o,a,l),io=n._sqlite3_bind_text16=(e,t,r,_,o)=>(io=n._sqlite3_bind_text16=i.zc)(e,t,r,_,o),ao=n._sqlite3_bind_value=(e,t,r)=>(ao=n._sqlite3_bind_value=i.Ac)(e,t,r),lo=n._sqlite3_bind_zeroblob=(e,t,r)=>(lo=n._sqlite3_bind_zeroblob=i.Bc)(e,t,r),co=n._sqlite3_bind_zeroblob64=(e,t,r,_)=>(co=n._sqlite3_bind_zeroblob64=i.Cc)(e,t,r,_),uo=n._sqlite3_bind_parameter_count=e=>(uo=n._sqlite3_bind_parameter_count=i.Dc)(e),fo=n._sqlite3_bind_parameter_name=(e,t)=>(fo=n._sqlite3_bind_parameter_name=i.Ec)(e,t),po=n._sqlite3_bind_parameter_index=(e,t)=>(po=n._sqlite3_bind_parameter_index=i.Fc)(e,t),vo=n._sqlite3_db_handle=e=>(vo=n._sqlite3_db_handle=i.Gc)(e),mo=n._sqlite3_stmt_readonly=e=>(mo=n._sqlite3_stmt_readonly=i.Hc)(e),Eo=n._sqlite3_stmt_isexplain=e=>(Eo=n._sqlite3_stmt_isexplain=i.Ic)(e),qo=n._sqlite3_stmt_explain=(e,t)=>(qo=n._sqlite3_stmt_explain=i.Jc)(e,t),ho=n._sqlite3_stmt_busy=e=>(ho=n._sqlite3_stmt_busy=i.Kc)(e),bo=n._sqlite3_next_stmt=(e,t)=>(bo=n._sqlite3_next_stmt=i.Lc)(e,t),To=n._sqlite3_stmt_status=(e,t,r)=>(To=n._sqlite3_stmt_status=i.Mc)(e,t,r),wo=n._sqlite3_sql=e=>(wo=n._sqlite3_sql=i.Nc)(e),yo=n._sqlite3_expanded_sql=e=>(yo=n._sqlite3_expanded_sql=i.Oc)(e),So=n._sqlite3_value_numeric_type=e=>(So=n._sqlite3_value_numeric_type=i.Pc)(e),go=n._sqlite3_blob_open=(e,t,r,_,o,a,l,c)=>(go=n._sqlite3_blob_open=i.Qc)(e,t,r,_,o,a,l,c),Io=n._sqlite3_blob_close=e=>(Io=n._sqlite3_blob_close=i.Rc)(e),Lo=n._sqlite3_blob_read=(e,t,r,_)=>(Lo=n._sqlite3_blob_read=i.Sc)(e,t,r,_),xo=n._sqlite3_blob_write=(e,t,r,_)=>(xo=n._sqlite3_blob_write=i.Tc)(e,t,r,_),Ao=n._sqlite3_blob_bytes=e=>(Ao=n._sqlite3_blob_bytes=i.Uc)(e),No=n._sqlite3_blob_reopen=(e,t,r)=>(No=n._sqlite3_blob_reopen=i.Vc)(e,t,r),Ro=n._sqlite3_set_authorizer=(e,t,r)=>(Ro=n._sqlite3_set_authorizer=i.Wc)(e,t,r),ko=n._sqlite3_strglob=(e,t)=>(ko=n._sqlite3_strglob=i.Xc)(e,t),Oo=n._sqlite3_strlike=(e,t,r)=>(Oo=n._sqlite3_strlike=i.Yc)(e,t,r),Qo=n._sqlite3_errmsg=e=>(Qo=n._sqlite3_errmsg=i.Zc)(e),Co=n._sqlite3_auto_extension=e=>(Co=n._sqlite3_auto_extension=i._c)(e),Fo=n._sqlite3_cancel_auto_extension=e=>(Fo=n._sqlite3_cancel_auto_extension=i.$c)(e),Po=n._sqlite3_reset_auto_extension=()=>(Po=n._sqlite3_reset_auto_extension=i.ad)(),Do=n._sqlite3_prepare=(e,t,r,_,o)=>(Do=n._sqlite3_prepare=i.bd)(e,t,r,_,o),Mo=n._sqlite3_prepare_v3=(e,t,r,_,o,a)=>(Mo=n._sqlite3_prepare_v3=i.cd)(e,t,r,_,o,a),Uo=n._sqlite3_prepare16=(e,t,r,_,o)=>(Uo=n._sqlite3_prepare16=i.dd)(e,t,r,_,o),zo=n._sqlite3_prepare16_v2=(e,t,r,_,o)=>(zo=n._sqlite3_prepare16_v2=i.ed)(e,t,r,_,o),Bo=n._sqlite3_prepare16_v3=(e,t,r,_,o,a)=>(Bo=n._sqlite3_prepare16_v3=i.fd)(e,t,r,_,o,a),Ho=n._sqlite3_get_table=(e,t,r,_,o,a)=>(Ho=n._sqlite3_get_table=i.gd)(e,t,r,_,o,a),Wo=n._sqlite3_free_table=e=>(Wo=n._sqlite3_free_table=i.hd)(e),jo=n._sqlite3_create_module=(e,t,r,_)=>(jo=n._sqlite3_create_module=i.id)(e,t,r,_),Go=n._sqlite3_create_module_v2=(e,t,r,_,o)=>(Go=n._sqlite3_create_module_v2=i.jd)(e,t,r,_,o),Ko=n._sqlite3_drop_modules=(e,t)=>(Ko=n._sqlite3_drop_modules=i.kd)(e,t),Xo=n._sqlite3_declare_vtab=(e,t)=>(Xo=n._sqlite3_declare_vtab=i.ld)(e,t),Vo=n._sqlite3_vtab_on_conflict=e=>(Vo=n._sqlite3_vtab_on_conflict=i.md)(e),Yo=n._sqlite3_vtab_config=(e,t,r)=>(Yo=n._sqlite3_vtab_config=i.nd)(e,t,r),$o=n._sqlite3_vtab_collation=(e,t)=>($o=n._sqlite3_vtab_collation=i.od)(e,t),Zo=n._sqlite3_vtab_in=(e,t,r)=>(Zo=n._sqlite3_vtab_in=i.pd)(e,t,r),Jo=n._sqlite3_vtab_rhs_value=(e,t,r)=>(Jo=n._sqlite3_vtab_rhs_value=i.qd)(e,t,r),ei=n._sqlite3_vtab_distinct=e=>(ei=n._sqlite3_vtab_distinct=i.rd)(e),ti=n._sqlite3_keyword_name=(e,t,r)=>(ti=n._sqlite3_keyword_name=i.sd)(e,t,r),ri=n._sqlite3_keyword_count=()=>(ri=n._sqlite3_keyword_count=i.td)(),ni=n._sqlite3_keyword_check=(e,t)=>(ni=n._sqlite3_keyword_check=i.ud)(e,t),_i=n._sqlite3_complete=e=>(_i=n._sqlite3_complete=i.vd)(e),si=n._sqlite3_complete16=e=>(si=n._sqlite3_complete16=i.wd)(e),oi=n._sqlite3_libversion=()=>(oi=n._sqlite3_libversion=i.xd)(),ii=n._sqlite3_libversion_number=()=>(ii=n._sqlite3_libversion_number=i.yd)(),ai=n._sqlite3_threadsafe=()=>(ai=n._sqlite3_threadsafe=i.zd)(),li=n._sqlite3_initialize=()=>(li=n._sqlite3_initialize=i.Ad)(),ci=n._sqlite3_shutdown=()=>(ci=n._sqlite3_shutdown=i.Bd)(),ui=n._sqlite3_config=(e,t)=>(ui=n._sqlite3_config=i.Cd)(e,t),fi=n._sqlite3_db_mutex=e=>(fi=n._sqlite3_db_mutex=i.Dd)(e),di=n._sqlite3_db_release_memory=e=>(di=n._sqlite3_db_release_memory=i.Ed)(e),pi=n._sqlite3_db_cacheflush=e=>(pi=n._sqlite3_db_cacheflush=i.Fd)(e),vi=n._sqlite3_db_config=(e,t,r)=>(vi=n._sqlite3_db_config=i.Gd)(e,t,r),mi=n._sqlite3_last_insert_rowid=e=>(mi=n._sqlite3_last_insert_rowid=i.Hd)(e),Ei=n._sqlite3_set_last_insert_rowid=(e,t,r)=>(Ei=n._sqlite3_set_last_insert_rowid=i.Id)(e,t,r),qi=n._sqlite3_changes64=e=>(qi=n._sqlite3_changes64=i.Jd)(e),hi=n._sqlite3_changes=e=>(hi=n._sqlite3_changes=i.Kd)(e),bi=n._sqlite3_total_changes64=e=>(bi=n._sqlite3_total_changes64=i.Ld)(e),Ti=n._sqlite3_total_changes=e=>(Ti=n._sqlite3_total_changes=i.Md)(e),wi=n._sqlite3_txn_state=(e,t)=>(wi=n._sqlite3_txn_state=i.Nd)(e,t),yi=n._sqlite3_close=e=>(yi=n._sqlite3_close=i.Od)(e),Si=n._sqlite3_close_v2=e=>(Si=n._sqlite3_close_v2=i.Pd)(e),gi=n._sqlite3_busy_handler=(e,t,r)=>(gi=n._sqlite3_busy_handler=i.Qd)(e,t,r),Ii=n._sqlite3_progress_handler=(e,t,r,_)=>(Ii=n._sqlite3_progress_handler=i.Rd)(e,t,r,_),Li=n._sqlite3_busy_timeout=(e,t)=>(Li=n._sqlite3_busy_timeout=i.Sd)(e,t),xi=n._sqlite3_interrupt=e=>(xi=n._sqlite3_interrupt=i.Td)(e),Ai=n._sqlite3_is_interrupted=e=>(Ai=n._sqlite3_is_interrupted=i.Ud)(e),Ni=n._sqlite3_create_function=(e,t,r,_,o,a,l,c)=>(Ni=n._sqlite3_create_function=i.Vd)(e,t,r,_,o,a,l,c),Ri=n._sqlite3_create_function_v2=(e,t,r,_,o,a,l,c,E)=>(Ri=n._sqlite3_create_function_v2=i.Wd)(e,t,r,_,o,a,l,c,E),ki=n._sqlite3_create_window_function=(e,t,r,_,o,a,l,c,E,h)=>(ki=n._sqlite3_create_window_function=i.Xd)(e,t,r,_,o,a,l,c,E,h),Oi=n._sqlite3_create_function16=(e,t,r,_,o,a,l,c)=>(Oi=n._sqlite3_create_function16=i.Yd)(e,t,r,_,o,a,l,c),Qi=n._sqlite3_overload_function=(e,t,r)=>(Qi=n._sqlite3_overload_function=i.Zd)(e,t,r),Ci=n._sqlite3_trace_v2=(e,t,r,_)=>(Ci=n._sqlite3_trace_v2=i._d)(e,t,r,_),Fi=n._sqlite3_commit_hook=(e,t,r)=>(Fi=n._sqlite3_commit_hook=i.$d)(e,t,r),Pi=n._sqlite3_update_hook=(e,t,r)=>(Pi=n._sqlite3_update_hook=i.ae)(e,t,r),Di=n._sqlite3_rollback_hook=(e,t,r)=>(Di=n._sqlite3_rollback_hook=i.be)(e,t,r),Mi=n._sqlite3_autovacuum_pages=(e,t,r,_)=>(Mi=n._sqlite3_autovacuum_pages=i.ce)(e,t,r,_),Ui=n._sqlite3_wal_autocheckpoint=(e,t)=>(Ui=n._sqlite3_wal_autocheckpoint=i.de)(e,t),zi=n._sqlite3_wal_hook=(e,t,r)=>(zi=n._sqlite3_wal_hook=i.ee)(e,t,r),Bi=n._sqlite3_wal_checkpoint_v2=(e,t,r,_,o)=>(Bi=n._sqlite3_wal_checkpoint_v2=i.fe)(e,t,r,_,o),Hi=n._sqlite3_wal_checkpoint=(e,t)=>(Hi=n._sqlite3_wal_checkpoint=i.ge)(e,t),Wi=n._sqlite3_error_offset=e=>(Wi=n._sqlite3_error_offset=i.he)(e),ji=n._sqlite3_errmsg16=e=>(ji=n._sqlite3_errmsg16=i.ie)(e),Gi=n._sqlite3_errcode=e=>(Gi=n._sqlite3_errcode=i.je)(e),Ki=n._sqlite3_extended_errcode=e=>(Ki=n._sqlite3_extended_errcode=i.ke)(e),Xi=n._sqlite3_system_errno=e=>(Xi=n._sqlite3_system_errno=i.le)(e),Vi=n._sqlite3_errstr=e=>(Vi=n._sqlite3_errstr=i.me)(e),Yi=n._sqlite3_limit=(e,t,r)=>(Yi=n._sqlite3_limit=i.ne)(e,t,r),$i=n._sqlite3_open=(e,t)=>($i=n._sqlite3_open=i.oe)(e,t),Zi=n._sqlite3_open_v2=(e,t,r,_)=>(Zi=n._sqlite3_open_v2=i.pe)(e,t,r,_),Ji=n._sqlite3_open16=(e,t)=>(Ji=n._sqlite3_open16=i.qe)(e,t),ea=n._sqlite3_create_collation=(e,t,r,_,o)=>(ea=n._sqlite3_create_collation=i.re)(e,t,r,_,o),ta=n._sqlite3_create_collation_v2=(e,t,r,_,o,a)=>(ta=n._sqlite3_create_collation_v2=i.se)(e,t,r,_,o,a),ra=n._sqlite3_create_collation16=(e,t,r,_,o)=>(ra=n._sqlite3_create_collation16=i.te)(e,t,r,_,o),na=n._sqlite3_collation_needed=(e,t,r)=>(na=n._sqlite3_collation_needed=i.ue)(e,t,r),_a=n._sqlite3_collation_needed16=(e,t,r)=>(_a=n._sqlite3_collation_needed16=i.ve)(e,t,r),sa=n._sqlite3_get_clientdata=(e,t)=>(sa=n._sqlite3_get_clientdata=i.we)(e,t),oa=n._sqlite3_set_clientdata=(e,t,r,_)=>(oa=n._sqlite3_set_clientdata=i.xe)(e,t,r,_),ia=n._sqlite3_get_autocommit=e=>(ia=n._sqlite3_get_autocommit=i.ye)(e),aa=n._sqlite3_table_column_metadata=(e,t,r,_,o,a,l,c,E)=>(aa=n._sqlite3_table_column_metadata=i.ze)(e,t,r,_,o,a,l,c,E),la=n._sqlite3_sleep=e=>(la=n._sqlite3_sleep=i.Ae)(e),ca=n._sqlite3_extended_result_codes=(e,t)=>(ca=n._sqlite3_extended_result_codes=i.Be)(e,t),ua=n._sqlite3_file_control=(e,t,r,_)=>(ua=n._sqlite3_file_control=i.Ce)(e,t,r,_),fa=n._sqlite3_test_control=(e,t)=>(fa=n._sqlite3_test_control=i.De)(e,t),da=n._sqlite3_create_filename=(e,t,r,_,o)=>(da=n._sqlite3_create_filename=i.Ee)(e,t,r,_,o),pa=n._sqlite3_free_filename=e=>(pa=n._sqlite3_free_filename=i.Fe)(e),va=n._sqlite3_uri_parameter=(e,t)=>(va=n._sqlite3_uri_parameter=i.Ge)(e,t),ma=n._sqlite3_uri_key=(e,t)=>(ma=n._sqlite3_uri_key=i.He)(e,t),Ea=n._sqlite3_uri_boolean=(e,t,r)=>(Ea=n._sqlite3_uri_boolean=i.Ie)(e,t,r),qa=n._sqlite3_uri_int64=(e,t,r,_)=>(qa=n._sqlite3_uri_int64=i.Je)(e,t,r,_),ha=n._sqlite3_filename_database=e=>(ha=n._sqlite3_filename_database=i.Ke)(e),ba=n._sqlite3_filename_journal=e=>(ba=n._sqlite3_filename_journal=i.Le)(e),Ta=n._sqlite3_filename_wal=e=>(Ta=n._sqlite3_filename_wal=i.Me)(e),wa=n._sqlite3_db_name=(e,t)=>(wa=n._sqlite3_db_name=i.Ne)(e,t),ya=n._sqlite3_db_filename=(e,t)=>(ya=n._sqlite3_db_filename=i.Oe)(e,t),Sa=n._sqlite3_db_readonly=(e,t)=>(Sa=n._sqlite3_db_readonly=i.Pe)(e,t),ga=n._sqlite3_compileoption_used=e=>(ga=n._sqlite3_compileoption_used=i.Qe)(e),Ia=n._sqlite3_compileoption_get=e=>(Ia=n._sqlite3_compileoption_get=i.Re)(e),La=n._sqlite3_sourceid=()=>(La=n._sqlite3_sourceid=i.Se)(),xa=n._malloc=e=>(xa=n._malloc=i.Te)(e),Aa=n._free=e=>(Aa=n._free=i.Ue)(e),Na=n._RegisterExtensionFunctions=e=>(Na=n._RegisterExtensionFunctions=i.Ve)(e),Ra=n._getSqliteFree=()=>(Ra=n._getSqliteFree=i.We)(),ct=n._main=(e,t)=>(ct=n._main=i.Xe)(e,t),ka=n._libauthorizer_set_authorizer=(e,t,r)=>(ka=n._libauthorizer_set_authorizer=i.Ye)(e,t,r),Oa=n._libfunction_create_function=(e,t,r,_,o,a,l,c)=>(Oa=n._libfunction_create_function=i.Ze)(e,t,r,_,o,a,l,c),Qa=n._libprogress_progress_handler=(e,t,r,_)=>(Qa=n._libprogress_progress_handler=i._e)(e,t,r,_),Ca=n._libvfs_vfs_register=(e,t,r,_,o,a)=>(Ca=n._libvfs_vfs_register=i.$e)(e,t,r,_,o,a),ut=(e,t)=>(ut=i.bf)(e,t),ft=()=>(ft=i.cf)(),dt=e=>(dt=i.df)(e),pt=e=>(pt=i.ef)(e),vt=()=>(vt=i.ff)(),Wa=n._sqlite3_version=5472;n.getTempRet0=Dn,n.ccall=Ee,n.cwrap=Pn,n.addFunction=Cn,n.setValue=Ae,n.getValue=$e,n.UTF8ToString=ce,n.stringToUTF8=se,n.lengthBytesUTF8=pe,n.intArrayFromString=Me,n.intArrayToString=Wn,n.AsciiToString=zn,n.UTF16ToString=Bn,n.stringToUTF16=Mn,n.UTF32ToString=Hn,n.stringToUTF32=Un,n.writeArrayToMemory=it;var Re;be=function e(){Re||mt(),Re||(be=e)};function Fa(){var e=ct,t=0,r=0;try{var _=e(t,r);return In(_,!0),_}catch(o){return Ln(o)}}function mt(){if(le>0||(Rt(),le>0))return;function e(){Re||(Re=!0,n.calledRun=!0,!W&&(kt(),Ot(),ie(n),n.onRuntimeInitialized?.(),Et&&Fa(),Qt()))}n.setStatus?(n.setStatus("Running..."),setTimeout(function(){setTimeout(function(){n.setStatus("")},1),e()},1)):e()}if(n.preInit)for(typeof n.preInit=="function"&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();var Et=!0;return n.noInitialRun&&(Et=!1),mt(),function(){let e=Object.getPrototypeOf(async function(){}).constructor,t=0;n.set_authorizer=function(r,_,o){t&&(n.deleteCallback(t),n._sqlite3_free(t),t=0),t=n._sqlite3_malloc(4),Ae(t,_ instanceof e?1:0,"i32");let a=Ee("libauthorizer_set_authorizer","number",["number","number","number"],[r,_?1:0,t]);return!a&&_&&n.setCallback(t,(l,c,E,h,g,A)=>_(o,c,E,h,g,A)),a}}(),function(){let e=Object.getPrototypeOf(async function(){}).constructor,t=["xFunc","xStep","xFinal"],r=new Map;n.create_function=function(_,o,a,l,c,E,h,g){let A=n._sqlite3_malloc(4),x={xFunc:E,xStep:h,xFinal:g};Ae(A,t.reduce((b,M,X)=>x[M]instanceof e?b|1<o(a))}}(),function(){let e=["xOpen","xDelete","xAccess","xFullPathname","xRandomness","xSleep","xCurrentTime","xGetLastError","xCurrentTimeInt64","xClose","xRead","xWrite","xTruncate","xSync","xFileSize","xLock","xUnlock","xCheckReservedLock","xFileControl","xSectorSize","xDeviceCharacteristics","xShmMap","xShmLock","xShmBarrier","xShmUnmap"],t=new Map;n.vfs_register=function(r,_){let o=0,a=0;e.forEach((c,E)=>{r[c]&&(o|=1<