glyph-server 0.5.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/bin/glyph.cjs +17 -5
- package/lib/cloudflare.cjs +10 -2
- package/lib/install.cjs +28 -3
- package/package.json +1 -1
- package/worker/index.js +2 -2
- package/worker/index_bg.wasm +0 -0
- package/worker/migrations/0015_sync_tombstone_index.sql +4 -0
- package/worker/migrations/0016_device_ban_marks.sql +6 -0
package/README.md
CHANGED
|
@@ -10,6 +10,9 @@ Node.js 22+ is required. Installation downloads the exact matching native releas
|
|
|
10
10
|
checks its SHA-256 and version, and supports Windows x64, macOS x64/arm64 and glibc
|
|
11
11
|
Linux x64/arm64. Rust is not required. `glyph-server` remains a compatibility alias.
|
|
12
12
|
|
|
13
|
+
Every command and flag: https://docs.glyph.my/self-hosting/cli (Markdown for AI
|
|
14
|
+
agents: https://docs.glyph.my/self-hosting/cli.md).
|
|
15
|
+
|
|
13
16
|
## Your own server
|
|
14
17
|
|
|
15
18
|
```sh
|
package/bin/glyph.cjs
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
const {spawnSync} = require('node:child_process');
|
|
4
4
|
const path = require('node:path');
|
|
5
|
+
// Same reference the native `glyph --help` ends with.
|
|
6
|
+
const DOCS='\nDocs: https://docs.glyph.my/self-hosting/cli\nMarkdown (for AI agents): https://docs.glyph.my/self-hosting/cli.md';
|
|
5
7
|
async function main() {
|
|
6
8
|
const args = process.argv.slice(2);
|
|
7
9
|
if((args[0]==='update' && ['cli','--help',undefined].includes(args[1]) || args[0]==='self-update') && args.includes('--help')) {
|
|
8
|
-
console.log('glyph update [cli] [--check]\nUpdates the npm CLI package. Running servers are left running.');return;
|
|
10
|
+
console.log('glyph update [cli] [--check]\nUpdates the npm CLI package. Running servers are left running.'+DOCS);return;
|
|
9
11
|
}
|
|
10
12
|
if(['version','check','update'].includes(args[0]) && ['companion','r-dlp'].includes(args[1]) && args.includes('--compose-dir')) {
|
|
11
13
|
if(args.length!==4 || args[2]!=='--compose-dir' || !args[3]) throw new Error('Usage: glyph check|version|update companion|r-dlp --compose-dir /path/to/project');
|
|
@@ -38,7 +40,7 @@ async function main() {
|
|
|
38
40
|
process.exitCode = result.status ?? 1; return;
|
|
39
41
|
}
|
|
40
42
|
if (args[0] === 'setup' && args[1] === 'cloudflare') {
|
|
41
|
-
if(args.includes('--help')) {console.log('glyph setup cloudflare [--dir project-directory]\nCreates your own Cloudflare resources and deploys the included Worker.');return;}
|
|
43
|
+
if(args.includes('--help')) {console.log('glyph setup cloudflare [--dir project-directory]\nCreates your own Cloudflare resources and deploys the included Worker.'+DOCS);return;}
|
|
42
44
|
if(args.length!==2 && !(args.length===4 && args[2]==='--dir')) throw new Error('Usage: glyph setup cloudflare [--dir project-directory]');
|
|
43
45
|
const readline=require('node:readline/promises').createInterface({input:process.stdin,output:process.stdout});
|
|
44
46
|
const question=text=>readline.question(text); question.close=()=>readline.close();
|
|
@@ -46,9 +48,20 @@ async function main() {
|
|
|
46
48
|
finally {readline.close();}
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
51
|
+
// `glyph config ... --worker-config wrangler.json`: the Worker's wrangler.json
|
|
52
|
+
// under the same command as server.toml and live settings (--server).
|
|
53
|
+
if (args[0] === 'config' && args.includes('--worker-config')) {
|
|
54
|
+
const rest=args.slice(1);const at=rest.indexOf('--worker-config');
|
|
55
|
+
if(!rest[at+1]) throw new Error('--worker-config needs a path');
|
|
56
|
+
const file=rest[at+1];rest.splice(at,2);
|
|
57
|
+
const [action,name,...value]=rest;
|
|
58
|
+
const map={list:'list',get:'list',set:'set',unset:'unset'};
|
|
59
|
+
if(!map[action] || (action==='set' && value.length!==1) || (action==='unset' && !name)) throw new Error('Usage: glyph config list|set <NAME> <value>|unset <NAME> --worker-config wrangler.json');
|
|
60
|
+
require('../lib/cloudflare.cjs').configure(file,map[action],name,value[0]);return;
|
|
61
|
+
}
|
|
49
62
|
if (args[0] === 'cloudflare') {
|
|
50
63
|
const cf=require('../lib/cloudflare.cjs');
|
|
51
|
-
if(args.length<2 || args.includes('--help') || args[1]==='help') {console.log(cf.configHelp());return;}
|
|
64
|
+
if(args.length<2 || args.includes('--help') || args[1]==='help') {console.log(cf.configHelp()+DOCS);return;}
|
|
52
65
|
const rest=args.slice(1);const at=rest.indexOf('--config');
|
|
53
66
|
let file=require('node:fs').existsSync('wrangler.json')?'wrangler.json':'glyph-cloudflare/wrangler.json';
|
|
54
67
|
if(at>=0) {if(!rest[at+1]) throw new Error('--config needs a path');file=rest[at+1];rest.splice(at,2);}
|
|
@@ -60,7 +73,7 @@ async function main() {
|
|
|
60
73
|
if (args[0] === 'deploy' || (args[0] === 'update' && args[1] === 'server' && args.includes('--worker-config'))) {
|
|
61
74
|
const flag=args[0]==='deploy'?'--config':'--worker-config';
|
|
62
75
|
const index=args.indexOf(flag);
|
|
63
|
-
if(args.includes('--help')) {console.log('glyph deploy [--config wrangler.json]\nglyph update server --worker-config wrangler.json');return;}
|
|
76
|
+
if(args.includes('--help')) {console.log('glyph deploy [--config wrangler.json]\nglyph update server --worker-config wrangler.json'+DOCS);return;}
|
|
64
77
|
const offset=args[0]==='deploy'?1:2;
|
|
65
78
|
if(args.length!==offset && !(args.length===offset+2 && index===offset && args[index+1])) throw new Error(`Usage: glyph deploy --config /path/to/wrangler.json`);
|
|
66
79
|
const fallback=require('node:fs').existsSync('wrangler.json')?'wrangler.json':'glyph-cloudflare/wrangler.json';
|
|
@@ -71,6 +84,5 @@ async function main() {
|
|
|
71
84
|
const result = spawnSync(file,args,{stdio:'inherit',env:{...process.env,GLYPH_NPM_MANAGED:'1'}});
|
|
72
85
|
if (result.error) throw result.error;
|
|
73
86
|
process.exitCode = result.status ?? 1;
|
|
74
|
-
if(result.status===0 && (args[0]==='help' || args.includes('--help'))) console.log('\nWith npm: glyph setup cloudflare [--dir directory] | glyph deploy [--config wrangler.json]\nCloudflare options: glyph cloudflare list|set|unset|secret|domain (glyph cloudflare --help)\nCloudflare update: glyph update server --worker-config wrangler.json');
|
|
75
87
|
}
|
|
76
88
|
main().catch(error => {console.error(`glyph: ${error.message}`);process.exitCode=1;});
|
package/lib/cloudflare.cjs
CHANGED
|
@@ -114,6 +114,7 @@ const VARS={
|
|
|
114
114
|
RATE_LIMIT_PER_MIN:{help:'anonymous requests per minute and IP (default 60)',check:v=>/^\d{1,6}$/.test(v)},
|
|
115
115
|
YOUTUBE_DAILY_BUDGET_UNITS:{help:'YouTube Data API units per day (default 9000)',check:v=>/^\d{1,9}$/.test(v)},
|
|
116
116
|
REQUIRE_ACCOUNT:{help:'true = only signed-in apps may use the API',check:v=>/^(true|false)$/.test(v)},
|
|
117
|
+
YOUTUBE_REQUIRE_ACCOUNT:{help:'true = YouTube audio and downloads only for signed-in accounts',check:v=>/^(true|false)$/.test(v)},
|
|
117
118
|
PUBLIC_ORIGIN:{help:'HTTPS origin of this Worker; accounts and passkeys are bound to it',check:v=>httpsOrigin(v)},
|
|
118
119
|
SHARE_ORIGIN:{help:'origin of short /p/ links (its domain must route /p/* here)',check:v=>httpsOrigin(v)},
|
|
119
120
|
YTDLP_SERVICE_URL:{help:'HTTPS URL of your companion (YouTube); pair with secret YTDLP_SERVICE_TOKEN',check:v=>httpsOrigin(v)},
|
|
@@ -126,7 +127,10 @@ const SECRETS={
|
|
|
126
127
|
SPOTIFY_CLIENT_ID:'Spotify client ID (playlist import)',
|
|
127
128
|
SPOTIFY_CLIENT_SECRET:'Spotify client secret',
|
|
128
129
|
LASTFM_API_KEY:'Last.fm API key (radio, similar artists)',
|
|
129
|
-
YTDLP_SERVICE_TOKEN:'companion token, 32+ characters',
|
|
130
|
+
YTDLP_SERVICE_TOKEN:'companion token for search and audio, 32+ characters (the Worker signs requests with it)',
|
|
131
|
+
COMPANION_ADMIN_TOKEN:'second companion token for status and updates, 32+ characters',
|
|
132
|
+
COMPANION_ACCESS_CLIENT_ID:'Cloudflare Access service token ID in front of the companion (optional)',
|
|
133
|
+
COMPANION_ACCESS_CLIENT_SECRET:'Cloudflare Access service token secret (optional)',
|
|
130
134
|
GLYPH_SERVER_BEARER:'shared bearer every app must send (private server)',
|
|
131
135
|
};
|
|
132
136
|
function httpsOrigin(v) {
|
|
@@ -134,6 +138,7 @@ function httpsOrigin(v) {
|
|
|
134
138
|
catch {return false;}
|
|
135
139
|
}
|
|
136
140
|
function writeConfig(file,config) {fs.writeFileSync(file,JSON.stringify(config,null,2)+'\n');}
|
|
141
|
+
const BEARER_WARNING='Warning: with GLYPH_SERVER_BEARER every request needs the token: the apps, and also the site, docs, /p/ links and jam invites this Worker serves (only /v1/health stays open). Remove it with: npx wrangler secret delete GLYPH_SERVER_BEARER';
|
|
137
142
|
const PASSKEY_WARNING='Warning: passkeys registered on the old origin stop working on the new one; password sign-in keeps working.';
|
|
138
143
|
function configHelp() {
|
|
139
144
|
const pad=Math.max(...Object.keys({...VARS,...SECRETS}).map(k=>k.length));
|
|
@@ -142,7 +147,9 @@ function configHelp() {
|
|
|
142
147
|
'glyph cloudflare unset <NAME> back to the default, then run glyph deploy',
|
|
143
148
|
'glyph cloudflare secret <NAME> store a secret in Cloudflare (asked without echo, applies at once)',
|
|
144
149
|
'glyph cloudflare domain <host> serve on your own domain (custom domain + PUBLIC_ORIGIN)',
|
|
145
|
-
'All take [--config wrangler.json]. Runtime limits (rate, accounts, companion, MCP) also change live
|
|
150
|
+
'All take [--config wrangler.json]. Runtime limits (rate, accounts, companion, MCP) also change live:',
|
|
151
|
+
' glyph config set rate_limit_per_min 120 --server https://your.worker',
|
|
152
|
+
'glyph config list|set|unset --worker-config wrangler.json is the same as glyph cloudflare list|set|unset.',
|
|
146
153
|
'','Values:',...Object.entries(VARS).map(([k,v])=>` ${k.padEnd(pad)} ${v.help}`),
|
|
147
154
|
'','Secrets:',...Object.entries(SECRETS).map(([k,v])=>` ${k.padEnd(pad)} ${v}`)].join('\n');
|
|
148
155
|
}
|
|
@@ -174,6 +181,7 @@ function configure(file,action,name,value,{run=wrangler,log=console.log}={}) {
|
|
|
174
181
|
}
|
|
175
182
|
if(action==='secret') {
|
|
176
183
|
if(!SECRETS[key]) throw new Error(`Unknown secret ${name||''}. ${VARS[key]?`${key} is a plain value: glyph cloudflare set ${key} <value>`:'See glyph cloudflare --help.'}`);
|
|
184
|
+
if(key==='GLYPH_SERVER_BEARER') log(BEARER_WARNING);
|
|
177
185
|
run(['secret','put',key,'--config',file]);
|
|
178
186
|
log(`${key} stored in Cloudflare; the Worker uses it right away.`);
|
|
179
187
|
return;
|
package/lib/install.cjs
CHANGED
|
@@ -7,6 +7,30 @@ const crypto = require('node:crypto');
|
|
|
7
7
|
const { spawnSync } = require('node:child_process');
|
|
8
8
|
const pkg = require('../package.json');
|
|
9
9
|
const MAX = 128 * 1024 * 1024;
|
|
10
|
+
// Glyph release key (minisign); the same list as glyph_protocol::release.
|
|
11
|
+
const RELEASE_KEYS = ['RWQ2xWZMYa2l251YUhrekvWRC+kaD698lXz0itKGjvNYAauLRTWCzg9o'];
|
|
12
|
+
const ED25519_SPKI = Buffer.from('302a300506032b6570032100','hex');
|
|
13
|
+
|
|
14
|
+
// Checks a minisign signature of `data` against `keys` and the expected
|
|
15
|
+
// trusted comment. Throws with a reason; returns nothing when it passes.
|
|
16
|
+
function verifySignature(data, minisig, keys, comment) {
|
|
17
|
+
const lines = minisig.toString().split(/\r?\n/);
|
|
18
|
+
if (lines.length < 4 || !lines[0].startsWith('untrusted comment:') || !lines[2].startsWith('trusted comment: ')) throw new Error('Release signature cannot be read');
|
|
19
|
+
const sig = Buffer.from(lines[1],'base64');
|
|
20
|
+
const trusted = lines[2].slice('trusted comment: '.length);
|
|
21
|
+
const global = Buffer.from(lines[3],'base64');
|
|
22
|
+
if (trusted !== comment) throw new Error(`Release signature is for "${trusted}", not "${comment}"`);
|
|
23
|
+
const alg = sig.subarray(0,2).toString('latin1');
|
|
24
|
+
if (sig.length !== 74 || global.length !== 64 || (alg !== 'ED' && alg !== 'Ed')) throw new Error('Release signature cannot be read');
|
|
25
|
+
const message = alg === 'ED' ? crypto.createHash('blake2b512').update(data).digest() : data;
|
|
26
|
+
for (const k of keys) {
|
|
27
|
+
const pk = Buffer.from(k,'base64');
|
|
28
|
+
if (pk.length !== 42 || !pk.subarray(2,10).equals(sig.subarray(2,10))) continue;
|
|
29
|
+
const key = crypto.createPublicKey({key:Buffer.concat([ED25519_SPKI,pk.subarray(10)]),format:'der',type:'spki'});
|
|
30
|
+
if (crypto.verify(null,message,key,sig.subarray(10)) && crypto.verify(null,Buffer.concat([sig.subarray(10),Buffer.from(trusted)]),key,global)) return;
|
|
31
|
+
}
|
|
32
|
+
throw new Error('Checksum list is not signed by the Glyph release key; installation aborted');
|
|
33
|
+
}
|
|
10
34
|
|
|
11
35
|
function target(platform = process.platform, arch = process.arch) {
|
|
12
36
|
const targets = { 'win32-x64': 'x86_64-pc-windows-msvc', 'linux-x64': 'x86_64-unknown-linux-gnu',
|
|
@@ -84,12 +108,13 @@ function verify(file, expected = pkg.version) {
|
|
|
84
108
|
const result = spawnSync(file,['--version'],{encoding:'utf8',timeout:10000,windowsHide:true});
|
|
85
109
|
return result.status === 0 && result.stdout.trim() === `glyph ${expected}`;
|
|
86
110
|
}
|
|
87
|
-
async function install() {
|
|
111
|
+
async function install({keys = RELEASE_KEYS} = {}) {
|
|
88
112
|
const file = executable();
|
|
89
113
|
if (fs.existsSync(file) && verify(file)) return file;
|
|
90
114
|
const name = `glyph-server-${pkg.version}-${target()}.${process.platform === 'win32' ? 'zip' : 'tar.gz'}`;
|
|
91
115
|
const base = `https://github.com/glyphmusic/server/releases/download/v${pkg.version}`;
|
|
92
|
-
const [archive, manifest] = await Promise.all([download(`${base}/${name}`),download(`${base}/SHA256SUMS.txt`,65536)]);
|
|
116
|
+
const [archive, manifest, signature] = await Promise.all([download(`${base}/${name}`),download(`${base}/SHA256SUMS.txt`,65536),download(`${base}/SHA256SUMS.txt.minisig`,4096)]);
|
|
117
|
+
verifySignature(manifest,signature,keys,`glyph-release repo=glyphmusic/server tag=v${pkg.version}`);
|
|
93
118
|
const hash = crypto.createHash('sha256').update(archive).digest('hex');
|
|
94
119
|
if (hash !== checksum(manifest.toString(),name)) throw new Error('SHA-256 mismatch; installation aborted');
|
|
95
120
|
const binary = unpack(archive,process.platform === 'win32',['glyph','glyph.exe','glyph-server','glyph-server.exe']);
|
|
@@ -102,4 +127,4 @@ async function install() {
|
|
|
102
127
|
} finally { fs.rmSync(staged,{force:true}); }
|
|
103
128
|
return file;
|
|
104
129
|
}
|
|
105
|
-
module.exports = {target,checksum,unpack,download,executable,verify,install};
|
|
130
|
+
module.exports = {target,checksum,unpack,download,executable,verify,verifySignature,install,RELEASE_KEYS};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glyph-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Glyph CLI: install, diagnose and manage Glyph servers and companions",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": { "type": "git", "url": "git+https://github.com/glyphmusic/server.git" },
|
package/worker/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{WorkerEntrypoint as xe}from"cloudflare:workers";var X=globalThis.__worker_init_state={criticalError:!1,instanceId:0};import ne from"./index_bg.wasm";var x=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,le.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_containerstartupoptions_free(e,0)}catch(t){i(t)}}get enableInternet(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_containerstartupoptions_enableInternet(this.__wbg_ptr)}catch(t){i(t)}return e===16777215?void 0:e!==0}get entrypoint(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_containerstartupoptions_entrypoint(this.__wbg_ptr)}catch(n){i(n)}var t=N(e[0],e[1]);return c.__wbindgen_free(e[0],e[1]*4,4),t}get env(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_containerstartupoptions_env(this.__wbg_ptr)}catch(t){i(t)}return e}set enableInternet(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_containerstartupoptions_enableInternet(this.__wbg_ptr,b(e)?16777215:e?1:0)}catch(t){i(t)}}set entrypoint(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t=I(e,c.__wbindgen_malloc),n=w;s();try{c.__wbg_set_containerstartupoptions_entrypoint(this.__wbg_ptr,t,n)}catch(_){i(_)}}set env(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_containerstartupoptions_env(this.__wbg_ptr,e)}catch(t){i(t)}}};Symbol.dispose&&(x.prototype[Symbol.dispose]=x.prototype.free);var O=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,he.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_intounderlyingbytesource_free(e,0)}catch(t){i(t)}}get autoAllocateChunkSize(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr)}catch(t){i(t)}return e>>>0}cancel(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw();s();try{c.intounderlyingbytesource_cancel(e)}catch(t){i(t)}}pull(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t;s();try{t=c.intounderlyingbytesource_pull(this.__wbg_ptr,e)}catch(n){i(n)}return t}start(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.intounderlyingbytesource_start(this.__wbg_ptr,e)}catch(t){i(t)}}get type(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.intounderlyingbytesource_type(this.__wbg_ptr)}catch(t){i(t)}return de[e]}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);var P=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,pe.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_intounderlyingsink_free(e,0)}catch(t){i(t)}}abort(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t=this.__destroy_into_raw(),n;s();try{n=c.intounderlyingsink_abort(t,e)}catch(_){i(_)}return n}close(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw(),t;s();try{t=c.intounderlyingsink_close(e)}catch(n){i(n)}return t}write(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t;s();try{t=c.intounderlyingsink_write(this.__wbg_ptr,e)}catch(n){i(n)}return t}};Symbol.dispose&&(P.prototype[Symbol.dispose]=P.prototype.free);var A=class r{static __wrap(e){let t=Object.create(r.prototype);return t.__wbg_ptr=e,Object.defineProperty(t,"__wbg_inst",{value:f,writable:!0}),Y.register(t,{ptr:e,instance:f},t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_intounderlyingsource_free(e,0)}catch(t){i(t)}}cancel(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw();s();try{c.intounderlyingsource_cancel(e)}catch(t){i(t)}}pull(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t;s();try{t=c.intounderlyingsource_pull(this.__wbg_ptr,e)}catch(n){i(n)}return t}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);var E=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_jamroom_free(e,0)}catch(t){i(t)}}fetch(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t;s();try{t=c.jamroom_fetch(this.__wbg_ptr,e)}catch(n){i(n)}return t}constructor(e,t){let n;s();try{n=c.jamroom_new(e,t)}catch(_){i(_)}return this.__wbg_ptr=n,Object.defineProperty(this,"__wbg_inst",{value:f,writable:!0}),Z.register(this,{ptr:n,instance:f},this),this}webSocketClose(e,t,n,_){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let o=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=w,d;s();try{d=c.jamroom_webSocketClose(this.__wbg_ptr,e,t,o,u,_)}catch(h){i(h)}return d}webSocketError(e,t){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let n;s();try{n=c.jamroom_webSocketError(this.__wbg_ptr,e,t)}catch(_){i(_)}return n}webSocketMessage(e,t){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let n;s();try{n=c.jamroom_webSocketMessage(this.__wbg_ptr,e,t)}catch(_){i(_)}return n}};Symbol.dispose&&(E.prototype[Symbol.dispose]=E.prototype.free);var v=class r{static __wrap(e){let t=Object.create(r.prototype);return t.__wbg_ptr=e,Object.defineProperty(t,"__wbg_inst",{value:f,writable:!0}),ee.register(t,{ptr:e,instance:f},t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_minifyconfig_free(e,0)}catch(t){i(t)}}get css(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_minifyconfig_css(this.__wbg_ptr)}catch(t){i(t)}return e!==0}get html(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_minifyconfig_html(this.__wbg_ptr)}catch(t){i(t)}return e!==0}get js(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_minifyconfig_js(this.__wbg_ptr)}catch(t){i(t)}return e!==0}set css(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_minifyconfig_css(this.__wbg_ptr,e)}catch(t){i(t)}}set html(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_minifyconfig_html(this.__wbg_ptr,e)}catch(t){i(t)}}set js(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_minifyconfig_js(this.__wbg_ptr,e)}catch(t){i(t)}}};Symbol.dispose&&(v.prototype[Symbol.dispose]=v.prototype.free);var j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ye.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_r2range_free(e,0)}catch(t){i(t)}}get length(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_r2range_length(this.__wbg_ptr)}catch(t){i(t)}return e[0]===0?void 0:e[1]}get offset(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_r2range_offset(this.__wbg_ptr)}catch(t){i(t)}return e[0]===0?void 0:e[1]}get suffix(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_r2range_suffix(this.__wbg_ptr)}catch(t){i(t)}return e[0]===0?void 0:e[1]}set length(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_r2range_length(this.__wbg_ptr,!b(e),b(e)?0:e)}catch(t){i(t)}}set offset(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_r2range_offset(this.__wbg_ptr,!b(e),b(e)?0:e)}catch(t){i(t)}}set suffix(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_r2range_suffix(this.__wbg_ptr,!b(e),b(e)?0:e)}catch(t){i(t)}}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);function U(){f++,m=null,k=null,F=null,typeof numBytesDecoded<"u"&&(numBytesDecoded=0),typeof w<"u"&&(w=0),H=!1,C=!1,$=new WebAssembly.Instance(ne,oe()),c=$.exports,c.__wbindgen_start()}function _e(){let r;s();try{r=c.__worker_init_state()}catch(e){i(e)}return r}function re(r,e,t){let n;s();try{n=c.fetch(r,e,t)}catch(_){i(_)}return n}function ce(r,e,t){let n;s();try{n=c.scheduled(r,e,t)}catch(_){i(_)}return n}function oe(){return{__proto__:null,"./index_bg.js":{__proto__:null,__wbg_Error_30c8987f7c2ed4e2:function(e,t){return Error(g(e,t))},__wbg_Number_14af1003b8dd5ead:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){let n=String(t),_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c:function(e,t){let n=t,_=typeof n=="bigint"?n:void 0;a().setBigInt64(e+8,b(_)?BigInt(0):_,!0),a().setInt32(e+0,!b(_),!0)},__wbg___wbindgen_boolean_get_5b446f51afd21013:function(e){let t=e,n=typeof t=="boolean"?t:void 0;return b(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_4687d8d8c2017d52:function(e,t){let n=B(t),_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg___wbindgen_in_92f62ee1427d9e49:function(e,t){return e in t},__wbg___wbindgen_is_bigint_b123553bed3bb382:function(e){return typeof e=="bigint"},__wbg___wbindgen_is_function_1f9d30630b8b1d3d:function(e){return typeof e=="function"},__wbg___wbindgen_is_null_e343b7d08827ba72:function(e){return e===null},__wbg___wbindgen_is_null_or_undefined_f9435d56bdcc06df:function(e){return e==null},__wbg___wbindgen_is_object_3c45d4f2dde4e749:function(e){let t=e;return typeof t=="object"&&t!==null},__wbg___wbindgen_is_string_90b56bc79aad6f6c:function(e){return typeof e=="string"},__wbg___wbindgen_is_undefined_8865fb403f8fe9d8:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_02babf21faa37971:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_677f21e468d6b461:function(e,t){return e==t},__wbg___wbindgen_number_get_2e0e7dee9f701a71:function(e,t){let n=t,_=typeof n=="number"?n:void 0;a().setFloat64(e+8,b(_)?0:_,!0),a().setInt32(e+0,!b(_),!0)},__wbg___wbindgen_reinit_3f79fdb34dee3ea9:function(){C=!0},__wbg___wbindgen_string_get_0380ccaa2f57f0d9:function(e,t){let n=t,_=typeof n=="string"?n:void 0;var o=b(_)?0:l(_,c.__wbindgen_malloc,c.__wbindgen_realloc),u=w;a().setInt32(e+4,u,!0),a().setInt32(e+0,o,!0)},__wbg___wbindgen_throw_41e9ee4f547fc59a:function(e,t){throw new WebAssembly.Exception(V,[new Error(g(e,t))])},__wbg__wbg_cb_unref_dcc1a90847f04c41:function(e){e._wbg_cb_unref()},__wbg_acceptWebSocket_fdf7466832747461:function(e,t,n,_){var o=N(n,_);c.__wbindgen_free(n,_*4,4),e.acceptWebSocket(t,o)},__wbg_all_2228d6712e7ddb97:function(e){return e.all()},__wbg_arrayBuffer_7b8b2e9be0285525:function(e){return e.arrayBuffer()},__wbg_batch_6b58fc32d9c19d60:function(e,t){return e.batch(t)},__wbg_bind_1f842289d2018ed8:function(e,t){return e.bind(...t)},__wbg_bodyUsed_3527d29edfc2c752:function(e){return e.bodyUsed},__wbg_body_4792166cb351f162:function(e){let t=e.body;return b(t)?0:p(t)},__wbg_body_4e088733babc630d:function(e){let t=e.body;return b(t)?0:p(t)},__wbg_body_a3a2b558805a2b84:function(e){return e.body},__wbg_buffer_56ec2905a66f58b9:function(e){return e.buffer},__wbg_byobRequest_54f7ce41d584549a:function(e){let t=e.byobRequest;return b(t)?0:p(t)},__wbg_byteLength_9f985b8373f1f3fe:function(e){return e.byteLength},__wbg_byteOffset_0bd5a6a03553639c:function(e){return e.byteOffset},__wbg_cacheControl_6ea9be880720803d:function(e,t){let n=t.cacheControl;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_cacheExpiry_ee9de6a8c623e1a8:function(e){let t=e.cacheExpiry;return b(t)?0:p(t)},__wbg_caches_0c4f8c535a6a0595:function(e){return e.caches},__wbg_call_1875a20c43a36133:function(e,t,n,_){return e.call(t,n,_)},__wbg_call_187d372bd5fdd4aa:function(e,t,n){return e.call(t,n)},__wbg_call_939a2607c4484b0b:function(e,t,n,_,o){return e.call(t,n,_,o)},__wbg_cancel_7c2a08c8db4c73f3:function(e){return e.cancel()},__wbg_catch_92594c2d17f55f12:function(e,t){return e.catch(t)},__wbg_cause_19276d032a32d4bd:function(e){return e.cause},__wbg_cf_909bcfb212a8822c:function(e){let t=e.cf;return b(t)?0:p(t)},__wbg_cf_b47fe5ff6d015a0d:function(e){let t=e.cf;return b(t)?0:p(t)},__wbg_clearTimeout_d49a4afcd9b218b7:function(e,t){e.clearTimeout(t)},__wbg_clone_0bde657d3f85c2d1:function(e){return e.clone()},__wbg_clone_946565396b302dfb:function(e){return e.clone()},__wbg_close_150f701b1a60e0ac:function(e,t,n,_){e.close(t,g(n,_))},__wbg_close_185286988f30f252:function(e){e.close()},__wbg_close_748f26698dabe269:function(e){e.close()},__wbg_constructor_076176ce0f386e16:function(e){return e.constructor},__wbg_contentDisposition_07447c7ffe1f25b9:function(e,t){let n=t.contentDisposition;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_contentEncoding_0a83e35746c3ada7:function(e,t){let n=t.contentEncoding;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_contentLanguage_ac8796c815bdf6a7:function(e,t){let n=t.contentLanguage;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_contentType_e59097c6037d86e1:function(e,t){let n=t.contentType;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_country_e8b34ad6526ea4f9:function(e,t){let n=t.country;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_cron_76b7eba30bc0443e:function(e,t){let n=t.cron,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_cursor_1c9a92814964774c:function(e,t){let n=t.cursor;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_customMetadata_9734802d06bda433:function(e){return e.customMetadata},__wbg_default_15d5007f8b46e0bc:function(e){return e.default},__wbg_delete_4a8ee012c43b86c0:function(e,t,n){let _,o;try{return _=t,o=n,e.delete(g(t,n))}finally{s();try{c.__wbindgen_free(_,o,1)}catch(u){i(u)}}},__wbg_delete_4f3412b083521508:function(e,t,n){var _=N(t,n);return c.__wbindgen_free(t,n*4,4),e.delete(_)},__wbg_done_b41a1d26cdb37fb6:function(e){return e.done},__wbg_enqueue_4a01c128f9a0de16:function(e,t){e.enqueue(t)},__wbg_entries_b55ec7e0dc443355:function(e){return e.entries()},__wbg_error_757e9472f8410341:function(e,t){let n,_;try{n=e,_=t,console.error(g(e,t))}finally{s();try{c.__wbindgen_free(n,_,1)}catch(o){i(o)}}},__wbg_error_a30e98d44009f1bb:function(e,t){console.error(e,t)},__wbg_error_c9cf3fc2064683a9:function(e){console.error(e)},__wbg_fetch_0e46da8cf7c730e4:function(e,t,n,_){return e.fetch(g(t,n),_)},__wbg_fetch_7b5de4f88137a4dc:function(e,t,n){return e.fetch(t,n)},__wbg_fetch_ae9b55b3c1c0b596:function(e,t){return e.fetch(t)},__wbg_first_3f7220e4ae4ce878:function(e,t,n){return e.first(t===0?void 0:g(t,n))},__wbg_getByName_88b6d54123310eb8:function(e,t,n){return e.getByName(g(t,n))},__wbg_getRandomValues_c44a50d8cfdaebeb:function(e,t){e.getRandomValues(t)},__wbg_getReader_bf34f92ee19c42b4:function(e){return e.getReader()},__wbg_getTags_8acc26fb7a9cf1c0:function(e,t,n){let _=t.getTags(n),o=I(_,c.__wbindgen_malloc),u=w;a().setInt32(e+4,u,!0),a().setInt32(e+0,o,!0)},__wbg_getTime_f5a55efff2585d5d:function(e){return e.getTime()},__wbg_getWebSockets_23a6ca37e30e4708:function(e,t){let n=t.getWebSockets(),_=I(n,c.__wbindgen_malloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_getWebSockets_6e51c20f6a9c1765:function(e,t,n,_){let o=t.getWebSockets(g(n,_)),u=I(o,c.__wbindgen_malloc),d=w;a().setInt32(e+4,d,!0),a().setInt32(e+0,u,!0)},__wbg_get_31af05bd4842a84f:function(e,t){return Reflect.get(e,t)},__wbg_get_6c896e0571ddae51:function(e,t){return e[t>>>0]},__wbg_get_806853698d9fc227:function(e,t){return Reflect.get(e,t>>>0)},__wbg_get_834ef2d65b3b5c73:function(e,t,n,_){let o,u;try{return o=t,u=n,e.get(g(t,n),_)}finally{s();try{c.__wbindgen_free(o,u,1)}catch(d){i(d)}}},__wbg_get_88983e33467eae60:function(e,t){let n=Reflect.get(e,t);return b(n)?0:p(n)},__wbg_get_done_7020b91c987365c7:function(e){let t=e.done;return b(t)?16777215:t?1:0},__wbg_get_f75619e20cb68514:function(e,t,n,_){let o=t.get(g(n,_));var u=b(o)?0:l(o,c.__wbindgen_malloc,c.__wbindgen_realloc),d=w;a().setInt32(e+4,d,!0),a().setInt32(e+0,u,!0)},__wbg_get_unchecked_288889d017702237:function(e,t){return e[t>>>0]},__wbg_get_value_87fbd6ad1283f2e7:function(e){return e.value},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_headers_6930a8bd09b630de:function(e){return e.headers},__wbg_headers_eba93595f8944c2f:function(e){return e.headers},__wbg_httpMetadata_529f7924a4f73fdd:function(e){return e.httpMetadata},__wbg_instanceId_9b67ff33ae8bef8a:function(e){return e.instanceId},__wbg_instanceof_ArrayBuffer_a99f175873e5d9b8:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Error_80a725f81f2e102d:function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},__wbg_instanceof_ReadableStream_e2d77912575119ab:function(e){let t;try{t=e instanceof ReadableStream}catch{t=!1}return t},__wbg_instanceof_Response_b8758567269c30b2:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_Uint8Array_828cef2aaacafc31:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_e15a2ff68ffdbef2:function(e){return Array.isArray(e)},__wbg_isSafeInteger_717808ad6a54bd9e:function(e){return Number.isSafeInteger(e)},__wbg_is_4b278c0bd3caba97:function(e,t){return Object.is(e,t)},__wbg_json_62c1da850fdfa792:function(e){return e.json()},__wbg_key_84de5b594a30a514:function(e,t){let n=t.key,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_keys_440be172f17c0265:function(e){return Object.keys(e)},__wbg_keys_bac434c8972731d5:function(e){return e.keys()},__wbg_length_7f3c00c40364105e:function(e){return e.length},__wbg_length_d4bdea10311bd9cf:function(e){return e.length},__wbg_list_9f5101697159e282:function(e,t){return e.list(t)},__wbg_log_17c30ef363c61cf4:function(e){console.log(e)},__wbg_match_4ddd34bd7a34ad07:function(e,t,n,_){return e.match(g(t,n),_)},__wbg_match_c2e851fa5be0ea84:function(e,t,n){return e.match(t,n)},__wbg_message_5f8387f0c32b90a7:function(e){return e.message},__wbg_meta_594bb85654c055e4:function(e){return e.meta},__wbg_method_6d02ee0808a7de31:function(e,t){let n=t.method,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_minifyconfig_new:function(e){return v.__wrap(e)},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_name_e2eac7cdfa054f65:function(e){return e.name},__wbg_name_f9b814d78e8e299f:function(e){return e.name},__wbg_new_0_72d020f0c63443d4:function(){return new Date},__wbg_new_1dbf7428bba60a42:function(e){return new Uint8Array(e)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_28744009d011f847:function(){return new Map},__wbg_new_343a093a3c2ffb4e:function(e,t){return new Error(g(e,t))},__wbg_new_617a8cdb8bb1130e:function(){return new Object},__wbg_new_83ca405eae412a62:function(){return new Headers},__wbg_new_85a9cbedb455cd92:function(e,t,n,_){return new WebSocketRequestResponsePair(g(e,t),g(n,_))},__wbg_new_a319c03ad1458611:function(){return new WebSocketPair},__wbg_new_big_int_84cdc69174f81f5b:function(e){return new FixedLengthStream(e)},__wbg_new_ee2291f50781bf1d:function(){return new Array},__wbg_new_f569a2e335eed0bb:function(e){return new FixedLengthStream(e>>>0)},__wbg_new_from_slice_9a868026ffa4208a:function(e,t){return new Uint8Array(M(e,t))},__wbg_new_typed_b01cb72a8af741a3:function(e,t){try{var n={a:e,b:t},_=(u,d)=>{let h=n.a;n.a=0;try{return be(h,n.b,u,d)}finally{n.a=h}};return new Promise(_)}finally{n.a=0}},__wbg_new_with_byte_offset_and_length_2f5d7fc2a828b74d:function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},__wbg_new_with_headers_7eaf3e64bd3f0a23:function(e){return new Headers(e)},__wbg_new_with_into_underlying_source_a57cfcc7c705351c:function(e,t){return new ReadableStream(A.__wrap(e),t)},__wbg_new_with_length_3da0ad195f6f63ba:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_opt_buffer_source_and_init_c1b859a23c80afca:function(e,t){return new Response(e,t)},__wbg_new_with_opt_readable_stream_and_init_df114f2d364f216d:function(e,t){return new Response(e,t)},__wbg_new_with_opt_str_and_init_33bef1b272950372:function(e,t,n){return new Response(e===0?void 0:g(e,t),n)},__wbg_new_with_str_and_init_4618dee4e950224f:function(e,t,n){return new Request(g(e,t),n)},__wbg_next_f4aac29c42af995c:function(e){return e.next()},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_now_aa4ccb83129e9e55:function(){return Date.now()},__wbg_objects_5b390b93a9ffcef3:function(e,t){let n=t.objects,_=I(n,c.__wbindgen_malloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_pipeTo_ac05d32161ffb42c:function(e,t){return e.pipeTo(t)},__wbg_prepare_6fe68a8990920f81:function(e,t,n){return e.prepare(g(t,n))},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_bc27214492979395:function(e,t,n){Uint8Array.prototype.set.call(M(e,t),n)},__wbg_push_2baf45db356cf468:function(e,t){return e.push(t)},__wbg_put_867461fd552109b2:function(e,t,n){return e.put(t,n)},__wbg_put_bbca42771defa466:function(e,t,n,_){return e.put(g(t,n),_)},__wbg_put_ece41e2507acd81b:function(e,t,n,_,o){let u,d;try{return u=t,d=n,e.put(g(t,n),_,o)}finally{s();try{c.__wbindgen_free(u,d,1)}catch(h){i(h)}}},__wbg_queueMicrotask_9833f9a49df95a49:function(e){return e.queueMicrotask},__wbg_queueMicrotask_a72f977e97f23c5f:function(e){queueMicrotask(e)},__wbg_randomFillSync_6c25eac9869eb53c:function(e,t){e.randomFillSync(t)},__wbg_read_2a943774344c9728:function(e){return e.read()},__wbg_readable_4d43535945ae9ca0:function(e){return e.readable},__wbg_region_539ec060a01aca98:function(e,t){let n=t.region;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_releaseLock_eb64cd83aa9fcfe4:function(e){e.releaseLock()},__wbg_require_b4edbdcf3e2a1ef0:function(){return module.require},__wbg_resolve_0076e10020304ede:function(e){return Promise.resolve(e)},__wbg_respond_c102fabcc79e5ef0:function(e,t){e.respond(t>>>0)},__wbg_results_a5533c886ed43a9a:function(e){let t=e.results;return b(t)?0:p(t)},__wbg_run_0ef9f3480a049b01:function(e){return e.run()},__wbg_scheduledTime_d6f16c8277d5313d:function(e){return e.scheduledTime},__wbg_send_b5bdd806efe4baf6:function(e,t,n){e.send(g(t,n))},__wbg_setTimeout_7fb1e1fe294b6ad9:function(e,t,n){return e.setTimeout(t,n)},__wbg_setWebSocketAutoResponse_1a68b97f21173d49:function(e,t){e.setWebSocketAutoResponse(t)},__wbg_set_145a351398b48c65:function(e,t,n){return Reflect.set(e,t,n)},__wbg_set_575d3ddb70fe831d:function(e,t,n){e.set(M(t,n))},__wbg_set_6ae97e73113c4f0b:function(e,t,n){return e.set(t,n)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_af5932e3f78b5648:function(e,t,n,_,o){e.set(g(t,n),g(_,o))},__wbg_set_bea140a88be9b277:function(e,t,n){e[t>>>0]=n},__wbg_set_body_1fb0f1008bfc7df6:function(e,t){e.body=t},__wbg_set_cache_7507c4cc5938ccc7:function(e,t){e.cache=we[t]},__wbg_set_criticalError_3904d60fe2a0b05b:function(e,t){e.criticalError=t!==0},__wbg_set_headers_40ad33dcf016613f:function(e,t){e.headers=t},__wbg_set_headers_69ef7c46a2e6c742:function(e,t){e.headers=t},__wbg_set_high_water_mark_3a96edf83df7e06c:function(e,t){e.highWaterMark=t},__wbg_set_ignore_method_5b0a1aa453c4d6d2:function(e,t){e.ignoreMethod=t!==0},__wbg_set_instanceId_9ad5caac0a4e519c:function(e,t){e.instanceId=t>>>0},__wbg_set_method_dcb32343247ec427:function(e,t,n){e.method=g(t,n)},__wbg_set_redirect_cc128ab2411da334:function(e,t){e.redirect=ge[t]},__wbg_set_signal_2dbd377604627f26:function(e,t){e.signal=t},__wbg_set_status_678f122cbe435d95:function(e,t){e.status=t},__wbg_size_023ff299b19aa360:function(e){return e.size},__wbg_slice_6da4cdc5d543fcd0:function(e,t){let n=t.slice(),_=I(n,c.__wbindgen_malloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_static_accessor_GLOBAL_266715b9d96ba635:function(){let e=typeof global>"u"?null:global;return b(e)?0:p(e)},__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179:function(){let e=typeof globalThis>"u"?null:globalThis;return b(e)?0:p(e)},__wbg_static_accessor_INIT_STATE_e3fce2ad8a08e94e:function(){return X},__wbg_static_accessor_SELF_0b583911f537483a:function(){let e=typeof self>"u"?null:self;return b(e)?0:p(e)},__wbg_static_accessor_WINDOW_d7f903d1508cbdc4:function(){let e=typeof window>"u"?null:window;return b(e)?0:p(e)},__wbg_status_ce0a98d3c57125f3:function(e){return e.status},__wbg_subarray_002b94d5e13d1411:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_c949d5a25a4e78f8:function(e,t,n){return e.then(t,n)},__wbg_then_e71170d78fcf8954:function(e,t){return e.then(t)},__wbg_truncated_cc05a4223c013ee9:function(e){return e.truncated},__wbg_uploaded_19ec3882ff291aab:function(e){return e.uploaded},__wbg_url_7bfada5c2297bc70:function(e,t){let n=t.url,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_value_f3c585ee8f5ba40c:function(e){return e.value},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbg_view_9c570f33e8d6ab96:function(e){let t=e.view;return b(t)?0:p(t)},__wbg_waitUntil_c51e37673c596e00:function(e,t){e.waitUntil(t)},__wbg_webSocket_2b7e8e9549bed673:function(e){let t=e.webSocket;return b(t)?0:p(t)},__wbg_writable_44735d15a1cee85d:function(e){return e.writable},__wbindgen_generic_0000000000000001:function(e,t){return J(e,t,ue)},__wbindgen_generic_0000000000000002:function(e,t){return J(e,t,fe)},__wbindgen_generic_0000000000000003:function(e,t){return J(e,t,ae)},__wbindgen_generic_0000000000000004:function(e){return e},__wbindgen_generic_0000000000000005:function(e){return e},__wbindgen_generic_0000000000000006:function(e,t){return M(e,t)},__wbindgen_generic_0000000000000007:function(e,t){return g(e,t)},__wbindgen_generic_0000000000000008:function(e){return BigInt.asUintN(64,e)},__wbindgen_init_externref_table:function(){let e=c.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},__wbindgen_jstag:WebAssembly.JSTag,__wbindgen_rethrow_critical:function(e){throw new Error("Critical error",{cause:e})}}}}var V=new WebAssembly.Tag({parameters:["externref"]}),D,H=!1;function ie(){H=!0;try{let r=G()[c.__abort_handler.value/4];r&&c.__wbindgen_export.get(r)()}catch{}}function i(r){throw r instanceof WebAssembly.Exception&&r.is(V)?r.getArg(V,0):(G()[D]=1,ie(),r)}function s(){if(D??=c.__instance_terminated.value/4,G()[D]){if(H||ie(),C){U();return}throw new Error("Module terminated")}else C&&U()}function ae(r,e){s();try{c.wasm_bindgen_5360ddf1c2d9e5d6___convert__closures_____invoke_______true_(r,e)}catch(t){i(t)}}function fe(r,e,t){s();try{c.wasm_bindgen_5360ddf1c2d9e5d6___convert__closures_____invoke___wasm_bindgen_5360ddf1c2d9e5d6___JsValue______true_(r,e,t)}catch(n){i(n)}}function ue(r,e,t){let n;s();try{n=c.wasm_bindgen_5360ddf1c2d9e5d6___convert__closures_____invoke___wasm_bindgen_5360ddf1c2d9e5d6___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_5360ddf1c2d9e5d6___JsError___true_(r,e,t)}catch(_){i(_)}if(n[1])throw me(n[0])}function be(r,e,t,n){s();try{c.wasm_bindgen_5360ddf1c2d9e5d6___convert__closures_____invoke___js_sys_6232fe8521f260d4___Function_fn_wasm_bindgen_5360ddf1c2d9e5d6___JsValue_____wasm_bindgen_5360ddf1c2d9e5d6___sys__Undefined___js_sys_6232fe8521f260d4___Function_fn_wasm_bindgen_5360ddf1c2d9e5d6___JsValue_____wasm_bindgen_5360ddf1c2d9e5d6___sys__Undefined_______true_(r,e,t,n)}catch(_){i(_)}}var de=["bytes"],we=["default","no-store","reload","no-cache","force-cache","only-if-cached"],ge=["follow","error","manual"],f=0,le=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_containerstartupoptions_free(r,1)}),he=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_intounderlyingbytesource_free(r,1)}),pe=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_intounderlyingsink_free(r,1)}),Y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_intounderlyingsource_free(r,1)}),Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_jamroom_free(r,1)}),ee=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_minifyconfig_free(r,1)}),ye=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_r2range_free(r,1)});function p(r){let e=c.__externref_table_alloc();return c.__wbindgen_externrefs.set(e,r),e}var te=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>{r.instance===f&&c.__wbindgen_destroy_closure(r.a,r.b)});function B(r){let e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){let _=r.description;return _==null?"Symbol":`Symbol(${_})`}if(e=="function"){let _=r.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(r)){let _=r.length,o="[";_>0&&(o+=B(r[0]));for(let u=1;u<_;u++)o+=", "+B(r[u]);return o+="]",o}let t=/\[object ([^\]]+)\]/.exec(toString.call(r)),n;if(t&&t.length>1)n=t[1];else return toString.call(r);if(n=="Object")try{return"Object("+JSON.stringify(r)+")"}catch{return"Object"}return r instanceof Error?`${r.name}: ${r.message}
|
|
2
|
-
${r.stack}`:n}function N(r,e){r=r>>>0;let t=a(),n=[];for(let _=r;_<r+4*e;_+=4)n.push(c.__wbindgen_externrefs.get(t.getUint32(_,!0)));return c.__externref_drop_slice(r,e),n}function
|
|
1
|
+
import{WorkerEntrypoint as xe}from"cloudflare:workers";var X=globalThis.__worker_init_state={criticalError:!1,instanceId:0};import ne from"./index_bg.wasm";var x=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,le.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_containerstartupoptions_free(e,0)}catch(t){i(t)}}get enableInternet(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_containerstartupoptions_enableInternet(this.__wbg_ptr)}catch(t){i(t)}return e===16777215?void 0:e!==0}get entrypoint(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_containerstartupoptions_entrypoint(this.__wbg_ptr)}catch(n){i(n)}var t=N(e[0],e[1]);return c.__wbindgen_free(e[0],e[1]*4,4),t}get env(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_containerstartupoptions_env(this.__wbg_ptr)}catch(t){i(t)}return e}set enableInternet(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_containerstartupoptions_enableInternet(this.__wbg_ptr,b(e)?16777215:e?1:0)}catch(t){i(t)}}set entrypoint(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t=I(e,c.__wbindgen_malloc),n=w;s();try{c.__wbg_set_containerstartupoptions_entrypoint(this.__wbg_ptr,t,n)}catch(_){i(_)}}set env(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_containerstartupoptions_env(this.__wbg_ptr,e)}catch(t){i(t)}}};Symbol.dispose&&(x.prototype[Symbol.dispose]=x.prototype.free);var M=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,he.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_intounderlyingbytesource_free(e,0)}catch(t){i(t)}}get autoAllocateChunkSize(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr)}catch(t){i(t)}return e>>>0}cancel(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw();s();try{c.intounderlyingbytesource_cancel(e)}catch(t){i(t)}}pull(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t;s();try{t=c.intounderlyingbytesource_pull(this.__wbg_ptr,e)}catch(n){i(n)}return t}start(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.intounderlyingbytesource_start(this.__wbg_ptr,e)}catch(t){i(t)}}get type(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.intounderlyingbytesource_type(this.__wbg_ptr)}catch(t){i(t)}return de[e]}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);var P=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,pe.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_intounderlyingsink_free(e,0)}catch(t){i(t)}}abort(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t=this.__destroy_into_raw(),n;s();try{n=c.intounderlyingsink_abort(t,e)}catch(_){i(_)}return n}close(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw(),t;s();try{t=c.intounderlyingsink_close(e)}catch(n){i(n)}return t}write(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t;s();try{t=c.intounderlyingsink_write(this.__wbg_ptr,e)}catch(n){i(n)}return t}};Symbol.dispose&&(P.prototype[Symbol.dispose]=P.prototype.free);var A=class r{static __wrap(e){let t=Object.create(r.prototype);return t.__wbg_ptr=e,Object.defineProperty(t,"__wbg_inst",{value:f,writable:!0}),Y.register(t,{ptr:e,instance:f},t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_intounderlyingsource_free(e,0)}catch(t){i(t)}}cancel(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw();s();try{c.intounderlyingsource_cancel(e)}catch(t){i(t)}}pull(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t;s();try{t=c.intounderlyingsource_pull(this.__wbg_ptr,e)}catch(n){i(n)}return t}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);var E=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_jamroom_free(e,0)}catch(t){i(t)}}fetch(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let t;s();try{t=c.jamroom_fetch(this.__wbg_ptr,e)}catch(n){i(n)}return t}constructor(e,t){let n;s();try{n=c.jamroom_new(e,t)}catch(_){i(_)}return this.__wbg_ptr=n,Object.defineProperty(this,"__wbg_inst",{value:f,writable:!0}),Z.register(this,{ptr:n,instance:f},this),this}webSocketClose(e,t,n,_){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let o=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=w,d;s();try{d=c.jamroom_webSocketClose(this.__wbg_ptr,e,t,o,u,_)}catch(h){i(h)}return d}webSocketError(e,t){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let n;s();try{n=c.jamroom_webSocketError(this.__wbg_ptr,e,t)}catch(_){i(_)}return n}webSocketMessage(e,t){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let n;s();try{n=c.jamroom_webSocketMessage(this.__wbg_ptr,e,t)}catch(_){i(_)}return n}};Symbol.dispose&&(E.prototype[Symbol.dispose]=E.prototype.free);var v=class r{static __wrap(e){let t=Object.create(r.prototype);return t.__wbg_ptr=e,Object.defineProperty(t,"__wbg_inst",{value:f,writable:!0}),ee.register(t,{ptr:e,instance:f},t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_minifyconfig_free(e,0)}catch(t){i(t)}}get css(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_minifyconfig_css(this.__wbg_ptr)}catch(t){i(t)}return e!==0}get html(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_minifyconfig_html(this.__wbg_ptr)}catch(t){i(t)}return e!==0}get js(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_minifyconfig_js(this.__wbg_ptr)}catch(t){i(t)}return e!==0}set css(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_minifyconfig_css(this.__wbg_ptr,e)}catch(t){i(t)}}set html(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_minifyconfig_html(this.__wbg_ptr,e)}catch(t){i(t)}}set js(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_minifyconfig_js(this.__wbg_ptr,e)}catch(t){i(t)}}};Symbol.dispose&&(v.prototype[Symbol.dispose]=v.prototype.free);var j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ye.unregister(this),e}free(){let e=this.__destroy_into_raw();s();try{c.__wbg_r2range_free(e,0)}catch(t){i(t)}}get length(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_r2range_length(this.__wbg_ptr)}catch(t){i(t)}return e[0]===0?void 0:e[1]}get offset(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_r2range_offset(this.__wbg_ptr)}catch(t){i(t)}return e[0]===0?void 0:e[1]}get suffix(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");let e;s();try{e=c.__wbg_get_r2range_suffix(this.__wbg_ptr)}catch(t){i(t)}return e[0]===0?void 0:e[1]}set length(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_r2range_length(this.__wbg_ptr,!b(e),b(e)?0:e)}catch(t){i(t)}}set offset(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_r2range_offset(this.__wbg_ptr,!b(e),b(e)?0:e)}catch(t){i(t)}}set suffix(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==f)throw new Error("Invalid stale object from previous Wasm instance");s();try{c.__wbg_set_r2range_suffix(this.__wbg_ptr,!b(e),b(e)?0:e)}catch(t){i(t)}}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);function U(){f++,m=null,k=null,S=null,typeof numBytesDecoded<"u"&&(numBytesDecoded=0),typeof w<"u"&&(w=0),H=!1,C=!1,$=new WebAssembly.Instance(ne,oe()),c=$.exports,c.__wbindgen_start()}function _e(){let r;s();try{r=c.__worker_init_state()}catch(e){i(e)}return r}function re(r,e,t){let n;s();try{n=c.fetch(r,e,t)}catch(_){i(_)}return n}function ce(r,e,t){let n;s();try{n=c.scheduled(r,e,t)}catch(_){i(_)}return n}function oe(){return{__proto__:null,"./index_bg.js":{__proto__:null,__wbg_Error_30c8987f7c2ed4e2:function(e,t){return Error(g(e,t))},__wbg_Number_14af1003b8dd5ead:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){let n=String(t),_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c:function(e,t){let n=t,_=typeof n=="bigint"?n:void 0;a().setBigInt64(e+8,b(_)?BigInt(0):_,!0),a().setInt32(e+0,!b(_),!0)},__wbg___wbindgen_boolean_get_5b446f51afd21013:function(e){let t=e,n=typeof t=="boolean"?t:void 0;return b(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_4687d8d8c2017d52:function(e,t){let n=B(t),_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg___wbindgen_in_92f62ee1427d9e49:function(e,t){return e in t},__wbg___wbindgen_is_bigint_b123553bed3bb382:function(e){return typeof e=="bigint"},__wbg___wbindgen_is_function_1f9d30630b8b1d3d:function(e){return typeof e=="function"},__wbg___wbindgen_is_null_e343b7d08827ba72:function(e){return e===null},__wbg___wbindgen_is_null_or_undefined_f9435d56bdcc06df:function(e){return e==null},__wbg___wbindgen_is_object_3c45d4f2dde4e749:function(e){let t=e;return typeof t=="object"&&t!==null},__wbg___wbindgen_is_string_90b56bc79aad6f6c:function(e){return typeof e=="string"},__wbg___wbindgen_is_undefined_8865fb403f8fe9d8:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_02babf21faa37971:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_677f21e468d6b461:function(e,t){return e==t},__wbg___wbindgen_number_get_2e0e7dee9f701a71:function(e,t){let n=t,_=typeof n=="number"?n:void 0;a().setFloat64(e+8,b(_)?0:_,!0),a().setInt32(e+0,!b(_),!0)},__wbg___wbindgen_reinit_3f79fdb34dee3ea9:function(){C=!0},__wbg___wbindgen_string_get_0380ccaa2f57f0d9:function(e,t){let n=t,_=typeof n=="string"?n:void 0;var o=b(_)?0:l(_,c.__wbindgen_malloc,c.__wbindgen_realloc),u=w;a().setInt32(e+4,u,!0),a().setInt32(e+0,o,!0)},__wbg___wbindgen_throw_41e9ee4f547fc59a:function(e,t){throw new WebAssembly.Exception(V,[new Error(g(e,t))])},__wbg__wbg_cb_unref_dcc1a90847f04c41:function(e){e._wbg_cb_unref()},__wbg_acceptWebSocket_fdf7466832747461:function(e,t,n,_){var o=N(n,_);c.__wbindgen_free(n,_*4,4),e.acceptWebSocket(t,o)},__wbg_all_2228d6712e7ddb97:function(e){return e.all()},__wbg_arrayBuffer_7b8b2e9be0285525:function(e){return e.arrayBuffer()},__wbg_batch_6b58fc32d9c19d60:function(e,t){return e.batch(t)},__wbg_bind_1f842289d2018ed8:function(e,t){return e.bind(...t)},__wbg_bodyUsed_3527d29edfc2c752:function(e){return e.bodyUsed},__wbg_body_4792166cb351f162:function(e){let t=e.body;return b(t)?0:p(t)},__wbg_body_4e088733babc630d:function(e){let t=e.body;return b(t)?0:p(t)},__wbg_body_a3a2b558805a2b84:function(e){return e.body},__wbg_buffer_56ec2905a66f58b9:function(e){return e.buffer},__wbg_byobRequest_54f7ce41d584549a:function(e){let t=e.byobRequest;return b(t)?0:p(t)},__wbg_byteLength_9f985b8373f1f3fe:function(e){return e.byteLength},__wbg_byteOffset_0bd5a6a03553639c:function(e){return e.byteOffset},__wbg_cacheControl_6ea9be880720803d:function(e,t){let n=t.cacheControl;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_cacheExpiry_ee9de6a8c623e1a8:function(e){let t=e.cacheExpiry;return b(t)?0:p(t)},__wbg_caches_0c4f8c535a6a0595:function(e){return e.caches},__wbg_call_1875a20c43a36133:function(e,t,n,_){return e.call(t,n,_)},__wbg_call_187d372bd5fdd4aa:function(e,t,n){return e.call(t,n)},__wbg_call_6137034ef55c9d0f:function(e,t){return e.call(t)},__wbg_call_939a2607c4484b0b:function(e,t,n,_,o){return e.call(t,n,_,o)},__wbg_cancel_7c2a08c8db4c73f3:function(e){return e.cancel()},__wbg_catch_92594c2d17f55f12:function(e,t){return e.catch(t)},__wbg_cause_19276d032a32d4bd:function(e){return e.cause},__wbg_cf_909bcfb212a8822c:function(e){let t=e.cf;return b(t)?0:p(t)},__wbg_cf_b47fe5ff6d015a0d:function(e){let t=e.cf;return b(t)?0:p(t)},__wbg_clearTimeout_d49a4afcd9b218b7:function(e,t){e.clearTimeout(t)},__wbg_clone_0bde657d3f85c2d1:function(e){return e.clone()},__wbg_clone_946565396b302dfb:function(e){return e.clone()},__wbg_close_150f701b1a60e0ac:function(e,t,n,_){e.close(t,g(n,_))},__wbg_close_185286988f30f252:function(e){e.close()},__wbg_close_748f26698dabe269:function(e){e.close()},__wbg_constructor_076176ce0f386e16:function(e){return e.constructor},__wbg_contentDisposition_07447c7ffe1f25b9:function(e,t){let n=t.contentDisposition;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_contentEncoding_0a83e35746c3ada7:function(e,t){let n=t.contentEncoding;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_contentLanguage_ac8796c815bdf6a7:function(e,t){let n=t.contentLanguage;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_contentType_e59097c6037d86e1:function(e,t){let n=t.contentType;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_country_e8b34ad6526ea4f9:function(e,t){let n=t.country;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_cron_76b7eba30bc0443e:function(e,t){let n=t.cron,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_cursor_1c9a92814964774c:function(e,t){let n=t.cursor;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_customMetadata_9734802d06bda433:function(e){return e.customMetadata},__wbg_default_15d5007f8b46e0bc:function(e){return e.default},__wbg_delete_4a8ee012c43b86c0:function(e,t,n){let _,o;try{return _=t,o=n,e.delete(g(t,n))}finally{s();try{c.__wbindgen_free(_,o,1)}catch(u){i(u)}}},__wbg_delete_4f3412b083521508:function(e,t,n){var _=N(t,n);return c.__wbindgen_free(t,n*4,4),e.delete(_)},__wbg_done_b41a1d26cdb37fb6:function(e){return e.done},__wbg_enqueue_4a01c128f9a0de16:function(e,t){e.enqueue(t)},__wbg_entries_b55ec7e0dc443355:function(e){return e.entries()},__wbg_entries_fb6397112b1de25f:function(e){return Object.entries(e)},__wbg_error_757e9472f8410341:function(e,t){let n,_;try{n=e,_=t,console.error(g(e,t))}finally{s();try{c.__wbindgen_free(n,_,1)}catch(o){i(o)}}},__wbg_error_a30e98d44009f1bb:function(e,t){console.error(e,t)},__wbg_error_c9cf3fc2064683a9:function(e){console.error(e)},__wbg_fetch_0e46da8cf7c730e4:function(e,t,n,_){return e.fetch(g(t,n),_)},__wbg_fetch_7b5de4f88137a4dc:function(e,t,n){return e.fetch(t,n)},__wbg_fetch_ae9b55b3c1c0b596:function(e,t){return e.fetch(t)},__wbg_first_3f7220e4ae4ce878:function(e,t,n){return e.first(t===0?void 0:g(t,n))},__wbg_getByName_88b6d54123310eb8:function(e,t,n){return e.getByName(g(t,n))},__wbg_getRandomValues_c44a50d8cfdaebeb:function(e,t){e.getRandomValues(t)},__wbg_getReader_bf34f92ee19c42b4:function(e){return e.getReader()},__wbg_getTags_8acc26fb7a9cf1c0:function(e,t,n){let _=t.getTags(n),o=I(_,c.__wbindgen_malloc),u=w;a().setInt32(e+4,u,!0),a().setInt32(e+0,o,!0)},__wbg_getTime_f5a55efff2585d5d:function(e){return e.getTime()},__wbg_getWebSockets_23a6ca37e30e4708:function(e,t){let n=t.getWebSockets(),_=I(n,c.__wbindgen_malloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_getWebSockets_6e51c20f6a9c1765:function(e,t,n,_){let o=t.getWebSockets(g(n,_)),u=I(o,c.__wbindgen_malloc),d=w;a().setInt32(e+4,d,!0),a().setInt32(e+0,u,!0)},__wbg_get_31af05bd4842a84f:function(e,t){return Reflect.get(e,t)},__wbg_get_658f6698067d9515:function(e,t){return Reflect.get(e,t)},__wbg_get_6c896e0571ddae51:function(e,t){return e[t>>>0]},__wbg_get_806853698d9fc227:function(e,t){return Reflect.get(e,t>>>0)},__wbg_get_834ef2d65b3b5c73:function(e,t,n,_){let o,u;try{return o=t,u=n,e.get(g(t,n),_)}finally{s();try{c.__wbindgen_free(o,u,1)}catch(d){i(d)}}},__wbg_get_88983e33467eae60:function(e,t){let n=Reflect.get(e,t);return b(n)?0:p(n)},__wbg_get_da0dea0b4d117d30:function(e,t,n){return e.get(g(t,n))},__wbg_get_done_7020b91c987365c7:function(e){let t=e.done;return b(t)?16777215:t?1:0},__wbg_get_f75619e20cb68514:function(e,t,n,_){let o=t.get(g(n,_));var u=b(o)?0:l(o,c.__wbindgen_malloc,c.__wbindgen_realloc),d=w;a().setInt32(e+4,d,!0),a().setInt32(e+0,u,!0)},__wbg_get_unchecked_288889d017702237:function(e,t){return e[t>>>0]},__wbg_get_value_87fbd6ad1283f2e7:function(e){return e.value},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_headers_6930a8bd09b630de:function(e){return e.headers},__wbg_headers_eba93595f8944c2f:function(e){return e.headers},__wbg_httpMetadata_529f7924a4f73fdd:function(e){return e.httpMetadata},__wbg_instanceId_9b67ff33ae8bef8a:function(e){return e.instanceId},__wbg_instanceof_ArrayBuffer_a99f175873e5d9b8:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Error_80a725f81f2e102d:function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},__wbg_instanceof_ReadableStream_e2d77912575119ab:function(e){let t;try{t=e instanceof ReadableStream}catch{t=!1}return t},__wbg_instanceof_Response_b8758567269c30b2:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_Uint8Array_828cef2aaacafc31:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_e15a2ff68ffdbef2:function(e){return Array.isArray(e)},__wbg_isSafeInteger_717808ad6a54bd9e:function(e){return Number.isSafeInteger(e)},__wbg_is_4b278c0bd3caba97:function(e,t){return Object.is(e,t)},__wbg_iterator_e3c31c892080e444:function(){return Symbol.iterator},__wbg_json_62c1da850fdfa792:function(e){return e.json()},__wbg_key_84de5b594a30a514:function(e,t){let n=t.key,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_keys_440be172f17c0265:function(e){return Object.keys(e)},__wbg_keys_bac434c8972731d5:function(e){return e.keys()},__wbg_length_7f3c00c40364105e:function(e){return e.length},__wbg_length_d4bdea10311bd9cf:function(e){return e.length},__wbg_list_9f5101697159e282:function(e,t){return e.list(t)},__wbg_log_17c30ef363c61cf4:function(e){console.log(e)},__wbg_match_4ddd34bd7a34ad07:function(e,t,n,_){return e.match(g(t,n),_)},__wbg_match_c2e851fa5be0ea84:function(e,t,n){return e.match(t,n)},__wbg_message_5f8387f0c32b90a7:function(e){return e.message},__wbg_meta_594bb85654c055e4:function(e){return e.meta},__wbg_method_6d02ee0808a7de31:function(e,t){let n=t.method,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_minifyconfig_new:function(e){return v.__wrap(e)},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_name_e2eac7cdfa054f65:function(e){return e.name},__wbg_name_f9b814d78e8e299f:function(e){return e.name},__wbg_new_0_72d020f0c63443d4:function(){return new Date},__wbg_new_1dbf7428bba60a42:function(e){return new Uint8Array(e)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_28744009d011f847:function(){return new Map},__wbg_new_343a093a3c2ffb4e:function(e,t){return new Error(g(e,t))},__wbg_new_617a8cdb8bb1130e:function(){return new Object},__wbg_new_83ca405eae412a62:function(){return new Headers},__wbg_new_85a9cbedb455cd92:function(e,t,n,_){return new WebSocketRequestResponsePair(g(e,t),g(n,_))},__wbg_new_a319c03ad1458611:function(){return new WebSocketPair},__wbg_new_big_int_84cdc69174f81f5b:function(e){return new FixedLengthStream(e)},__wbg_new_ee2291f50781bf1d:function(){return new Array},__wbg_new_f569a2e335eed0bb:function(e){return new FixedLengthStream(e>>>0)},__wbg_new_from_slice_9a868026ffa4208a:function(e,t){return new Uint8Array(z(e,t))},__wbg_new_typed_b01cb72a8af741a3:function(e,t){try{var n={a:e,b:t},_=(u,d)=>{let h=n.a;n.a=0;try{return be(h,n.b,u,d)}finally{n.a=h}};return new Promise(_)}finally{n.a=0}},__wbg_new_with_byte_offset_and_length_2f5d7fc2a828b74d:function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},__wbg_new_with_headers_7eaf3e64bd3f0a23:function(e){return new Headers(e)},__wbg_new_with_into_underlying_source_a57cfcc7c705351c:function(e,t){return new ReadableStream(A.__wrap(e),t)},__wbg_new_with_length_3da0ad195f6f63ba:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_opt_buffer_source_and_init_c1b859a23c80afca:function(e,t){return new Response(e,t)},__wbg_new_with_opt_readable_stream_and_init_df114f2d364f216d:function(e,t){return new Response(e,t)},__wbg_new_with_opt_str_and_init_33bef1b272950372:function(e,t,n){return new Response(e===0?void 0:g(e,t),n)},__wbg_new_with_str_and_init_4618dee4e950224f:function(e,t,n){return new Request(g(e,t),n)},__wbg_next_33784799010f1bbe:function(e){return e.next},__wbg_next_f4aac29c42af995c:function(e){return e.next()},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_now_aa4ccb83129e9e55:function(){return Date.now()},__wbg_objects_5b390b93a9ffcef3:function(e,t){let n=t.objects,_=I(n,c.__wbindgen_malloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_pipeTo_ac05d32161ffb42c:function(e,t){return e.pipeTo(t)},__wbg_prepare_6fe68a8990920f81:function(e,t,n){return e.prepare(g(t,n))},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_bc27214492979395:function(e,t,n){Uint8Array.prototype.set.call(z(e,t),n)},__wbg_push_2baf45db356cf468:function(e,t){return e.push(t)},__wbg_put_867461fd552109b2:function(e,t,n){return e.put(t,n)},__wbg_put_bbca42771defa466:function(e,t,n,_){return e.put(g(t,n),_)},__wbg_put_d364cb6c87efb8b4:function(e,t,n,_){return e.put(g(t,n),_)},__wbg_put_ece41e2507acd81b:function(e,t,n,_,o){let u,d;try{return u=t,d=n,e.put(g(t,n),_,o)}finally{s();try{c.__wbindgen_free(u,d,1)}catch(h){i(h)}}},__wbg_queueMicrotask_9833f9a49df95a49:function(e){return e.queueMicrotask},__wbg_queueMicrotask_a72f977e97f23c5f:function(e){queueMicrotask(e)},__wbg_randomFillSync_6c25eac9869eb53c:function(e,t){e.randomFillSync(t)},__wbg_read_2a943774344c9728:function(e){return e.read()},__wbg_readable_4d43535945ae9ca0:function(e){return e.readable},__wbg_region_539ec060a01aca98:function(e,t){let n=t.region;var _=b(n)?0:l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_releaseLock_eb64cd83aa9fcfe4:function(e){e.releaseLock()},__wbg_require_b4edbdcf3e2a1ef0:function(){return module.require},__wbg_resolve_0076e10020304ede:function(e){return Promise.resolve(e)},__wbg_respond_c102fabcc79e5ef0:function(e,t){e.respond(t>>>0)},__wbg_results_a5533c886ed43a9a:function(e){let t=e.results;return b(t)?0:p(t)},__wbg_run_0ef9f3480a049b01:function(e){return e.run()},__wbg_scheduledTime_d6f16c8277d5313d:function(e){return e.scheduledTime},__wbg_send_b5bdd806efe4baf6:function(e,t,n){e.send(g(t,n))},__wbg_setTimeout_7fb1e1fe294b6ad9:function(e,t,n){return e.setTimeout(t,n)},__wbg_setWebSocketAutoResponse_1a68b97f21173d49:function(e,t){e.setWebSocketAutoResponse(t)},__wbg_set_145a351398b48c65:function(e,t,n){return Reflect.set(e,t,n)},__wbg_set_575d3ddb70fe831d:function(e,t,n){e.set(z(t,n))},__wbg_set_6ae97e73113c4f0b:function(e,t,n){return e.set(t,n)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_af5932e3f78b5648:function(e,t,n,_,o){e.set(g(t,n),g(_,o))},__wbg_set_bea140a88be9b277:function(e,t,n){e[t>>>0]=n},__wbg_set_body_1fb0f1008bfc7df6:function(e,t){e.body=t},__wbg_set_cache_7507c4cc5938ccc7:function(e,t){e.cache=we[t]},__wbg_set_criticalError_3904d60fe2a0b05b:function(e,t){e.criticalError=t!==0},__wbg_set_headers_40ad33dcf016613f:function(e,t){e.headers=t},__wbg_set_headers_69ef7c46a2e6c742:function(e,t){e.headers=t},__wbg_set_high_water_mark_3a96edf83df7e06c:function(e,t){e.highWaterMark=t},__wbg_set_ignore_method_5b0a1aa453c4d6d2:function(e,t){e.ignoreMethod=t!==0},__wbg_set_instanceId_9ad5caac0a4e519c:function(e,t){e.instanceId=t>>>0},__wbg_set_method_dcb32343247ec427:function(e,t,n){e.method=g(t,n)},__wbg_set_redirect_cc128ab2411da334:function(e,t){e.redirect=ge[t]},__wbg_set_signal_2dbd377604627f26:function(e,t){e.signal=t},__wbg_set_status_678f122cbe435d95:function(e,t){e.status=t},__wbg_size_023ff299b19aa360:function(e){return e.size},__wbg_slice_6da4cdc5d543fcd0:function(e,t){let n=t.slice(),_=I(n,c.__wbindgen_malloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_static_accessor_GLOBAL_266715b9d96ba635:function(){let e=typeof global>"u"?null:global;return b(e)?0:p(e)},__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179:function(){let e=typeof globalThis>"u"?null:globalThis;return b(e)?0:p(e)},__wbg_static_accessor_INIT_STATE_e3fce2ad8a08e94e:function(){return X},__wbg_static_accessor_SELF_0b583911f537483a:function(){let e=typeof self>"u"?null:self;return b(e)?0:p(e)},__wbg_static_accessor_WINDOW_d7f903d1508cbdc4:function(){let e=typeof window>"u"?null:window;return b(e)?0:p(e)},__wbg_status_ce0a98d3c57125f3:function(e){return e.status},__wbg_storage_dbf440e5000527fe:function(e){return e.storage},__wbg_subarray_002b94d5e13d1411:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_c949d5a25a4e78f8:function(e,t,n){return e.then(t,n)},__wbg_then_e71170d78fcf8954:function(e,t){return e.then(t)},__wbg_truncated_cc05a4223c013ee9:function(e){return e.truncated},__wbg_uploaded_19ec3882ff291aab:function(e){return e.uploaded},__wbg_url_7bfada5c2297bc70:function(e,t){let n=t.url,_=l(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=w;a().setInt32(e+4,o,!0),a().setInt32(e+0,_,!0)},__wbg_value_f3c585ee8f5ba40c:function(e){return e.value},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbg_view_9c570f33e8d6ab96:function(e){let t=e.view;return b(t)?0:p(t)},__wbg_waitUntil_c51e37673c596e00:function(e,t){e.waitUntil(t)},__wbg_webSocket_2b7e8e9549bed673:function(e){let t=e.webSocket;return b(t)?0:p(t)},__wbg_writable_44735d15a1cee85d:function(e){return e.writable},__wbindgen_generic_0000000000000001:function(e,t){return J(e,t,ue)},__wbindgen_generic_0000000000000002:function(e,t){return J(e,t,fe)},__wbindgen_generic_0000000000000003:function(e,t){return J(e,t,ae)},__wbindgen_generic_0000000000000004:function(e){return e},__wbindgen_generic_0000000000000005:function(e){return e},__wbindgen_generic_0000000000000006:function(e,t){return z(e,t)},__wbindgen_generic_0000000000000007:function(e,t){return g(e,t)},__wbindgen_generic_0000000000000008:function(e){return BigInt.asUintN(64,e)},__wbindgen_init_externref_table:function(){let e=c.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},__wbindgen_jstag:WebAssembly.JSTag,__wbindgen_rethrow_critical:function(e){throw new Error("Critical error",{cause:e})}}}}var V=new WebAssembly.Tag({parameters:["externref"]}),D,H=!1;function ie(){H=!0;try{let r=G()[c.__abort_handler.value/4];r&&c.__wbindgen_export.get(r)()}catch{}}function i(r){throw r instanceof WebAssembly.Exception&&r.is(V)?r.getArg(V,0):(G()[D]=1,ie(),r)}function s(){if(D??=c.__instance_terminated.value/4,G()[D]){if(H||ie(),C){U();return}throw new Error("Module terminated")}else C&&U()}function ae(r,e){s();try{c.wasm_bindgen_5360ddf1c2d9e5d6___convert__closures_____invoke_______true_(r,e)}catch(t){i(t)}}function fe(r,e,t){s();try{c.wasm_bindgen_5360ddf1c2d9e5d6___convert__closures_____invoke___wasm_bindgen_5360ddf1c2d9e5d6___JsValue______true_(r,e,t)}catch(n){i(n)}}function ue(r,e,t){let n;s();try{n=c.wasm_bindgen_5360ddf1c2d9e5d6___convert__closures_____invoke___wasm_bindgen_5360ddf1c2d9e5d6___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_5360ddf1c2d9e5d6___JsError___true_(r,e,t)}catch(_){i(_)}if(n[1])throw me(n[0])}function be(r,e,t,n){s();try{c.wasm_bindgen_5360ddf1c2d9e5d6___convert__closures_____invoke___js_sys_6232fe8521f260d4___Function_fn_wasm_bindgen_5360ddf1c2d9e5d6___JsValue_____wasm_bindgen_5360ddf1c2d9e5d6___sys__Undefined___js_sys_6232fe8521f260d4___Function_fn_wasm_bindgen_5360ddf1c2d9e5d6___JsValue_____wasm_bindgen_5360ddf1c2d9e5d6___sys__Undefined_______true_(r,e,t,n)}catch(_){i(_)}}var de=["bytes"],we=["default","no-store","reload","no-cache","force-cache","only-if-cached"],ge=["follow","error","manual"],f=0,le=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_containerstartupoptions_free(r,1)}),he=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_intounderlyingbytesource_free(r,1)}),pe=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_intounderlyingsink_free(r,1)}),Y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_intounderlyingsource_free(r,1)}),Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_jamroom_free(r,1)}),ee=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_minifyconfig_free(r,1)}),ye=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===f&&c.__wbg_r2range_free(r,1)});function p(r){let e=c.__externref_table_alloc();return c.__wbindgen_externrefs.set(e,r),e}var te=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>{r.instance===f&&c.__wbindgen_destroy_closure(r.a,r.b)});function B(r){let e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){let _=r.description;return _==null?"Symbol":`Symbol(${_})`}if(e=="function"){let _=r.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(r)){let _=r.length,o="[";_>0&&(o+=B(r[0]));for(let u=1;u<_;u++)o+=", "+B(r[u]);return o+="]",o}let t=/\[object ([^\]]+)\]/.exec(toString.call(r)),n;if(t&&t.length>1)n=t[1];else return toString.call(r);if(n=="Object")try{return"Object("+JSON.stringify(r)+")"}catch{return"Object"}return r instanceof Error?`${r.name}: ${r.message}
|
|
2
|
+
${r.stack}`:n}function N(r,e){r=r>>>0;let t=a(),n=[];for(let _=r;_<r+4*e;_+=4)n.push(c.__wbindgen_externrefs.get(t.getUint32(_,!0)));return c.__externref_drop_slice(r,e),n}function z(r,e){return r=r>>>0,F().subarray(r/1,r/1+e)}var m=null;function a(){return(m===null||m.buffer.detached===!0||m.buffer.detached===void 0&&m.buffer!==c.memory.buffer)&&(m=new DataView(c.memory.buffer)),m}var k=null;function G(){return(k===null||k.byteLength===0)&&(k=new Int32Array(c.memory.buffer)),k}function g(r,e){return ve(r>>>0,e)}var S=null;function F(){return(S===null||S.byteLength===0)&&(S=new Uint8Array(c.memory.buffer)),S}function b(r){return r==null}function J(r,e,t){let n={a:r,b:e,cnt:1,instance:f},_=(...o)=>{if(n.instance!==f)throw new Error("Cannot invoke closure from previous WASM instance");n.cnt++;let u=n.a;n.a=0;try{return t(u,n.b,...o)}finally{n.a=u,_._wbg_cb_unref()}};return _._wbg_cb_unref=()=>{--n.cnt===0&&(c.__wbindgen_destroy_closure(n.a,n.b),n.a=0,te.unregister(n))},te.register(_,n,n),_}function I(r,e){let t=e(r.length*4,4)>>>0;for(let n=0;n<r.length;n++){let _=p(r[n]);a().setUint32(t+4*n,_,!0)}return w=r.length,t}function l(r,e,t){if(t===void 0){let d=W.encode(r),h=e(d.length,1)>>>0;return F().subarray(h,h+d.length).set(d),w=d.length,h}let n=r.length,_=e(n,1)>>>0,o=F(),u=0;for(;u<n;u++){let d=r.charCodeAt(u);if(d>127)break;o[_+u]=d}if(u!==n){u!==0&&(r=r.slice(u)),_=t(_,n,n=u+r.length*3,1)>>>0;let d=F().subarray(_+u,_+n),h=W.encodeInto(r,d);u+=h.written,_=t(_,n,u,1)>>>0}return w=u,_}var C=!1;function me(r){let e=c.__wbindgen_externrefs.get(r);return c.__externref_table_dealloc(r),e}var se=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});se.decode();function ve(r,e){return se.decode(F().subarray(r,r+e))}var W=new TextEncoder;"encodeInto"in W||(W.encodeInto=function(r,e){let t=W.encode(r);return e.set(t),{read:r.length,written:t.length}});var w=0,$=new WebAssembly.Instance(ne,oe()),c=$.exports;c.__wbindgen_start();Error.stackTraceLimit=100;var y=_e();function K(){y.criticalError&&(console.log("Reinitializing Wasm application"),U(),y.criticalError=!1,y.instanceId++)}addEventListener("error",r=>{Q(r.error)});function Q(r){r instanceof WebAssembly.RuntimeError&&(console.error("Critical",r),y.criticalError=!0)}var T=class extends xe{};T.prototype.fetch=function(e){return re.call(this,e,this.env,this.ctx)};T.prototype.scheduled=function(e){return ce.call(this,e,this.env,this.ctx)};var Ee={set:(r,e,t,n)=>Reflect.set(r.instance,e,t,n),has:(r,e)=>Reflect.has(r.instance,e),deleteProperty:(r,e)=>Reflect.deleteProperty(r.instance,e),apply:(r,e,t)=>Reflect.apply(r.instance,e,t),construct:(r,e,t)=>Reflect.construct(r.instance,e,t),getPrototypeOf:r=>Reflect.getPrototypeOf(r.instance),setPrototypeOf:(r,e)=>Reflect.setPrototypeOf(r.instance,e),isExtensible:r=>Reflect.isExtensible(r.instance),preventExtensions:r=>Reflect.preventExtensions(r.instance),getOwnPropertyDescriptor:(r,e)=>Reflect.getOwnPropertyDescriptor(r.instance,e),defineProperty:(r,e,t)=>Reflect.defineProperty(r.instance,e,t),ownKeys:r=>Reflect.ownKeys(r.instance)},O={construct(r,e,t){try{K();let n={instance:Reflect.construct(r,e,t),instanceId:y.instanceId,ctor:r,args:e,newTarget:t};return new Proxy(n,{...Ee,get(_,o,u){_.instanceId!==y.instanceId&&(_.instance=Reflect.construct(_.ctor,_.args,_.newTarget),_.instanceId=y.instanceId);let d=Reflect.get(_.instance,o,u);return typeof d!="function"?d:d.constructor===Function?new Proxy(d,{apply(h,L,q){K();try{return h.apply(L,q)}catch(R){throw Q(R),R}}}):new Proxy(d,{async apply(h,L,q){K();try{return await h.apply(L,q)}catch(R){throw Q(R),R}}})}})}catch(n){throw y.criticalError=!0,n}}},Fe=new Proxy(T,O),We=new Proxy(x,O),Ae=new Proxy(E,O),Te=new Proxy(v,O),Oe=new Proxy(j,O);export{We as ContainerStartupOptions,Ae as JamRoom,Te as MinifyConfig,Oe as R2Range,Fe as default};
|
package/worker/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
-- Every sync push purges old tombstones (purge_tombstones). Without this index
|
|
2
|
+
-- both statements scan all of a user's sync_items; the partial index only holds
|
|
3
|
+
-- deleted rows, so the purge reads just the tombstones it removes.
|
|
4
|
+
CREATE INDEX IF NOT EXISTS sync_items_tombstones ON sync_items(user_id, updated_at) WHERE deleted = 1;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Operator bans (`glyph remote ban account <handle>`): each device keeps a
|
|
2
|
+
-- salted hash of its last IP and the server-side hash of the app's hardware
|
|
3
|
+
-- id, so banning an account can also ban its addresses and devices. Never the
|
|
4
|
+
-- address itself. The ban list lives in server_settings (key 'bans').
|
|
5
|
+
ALTER TABLE devices ADD COLUMN ip_hash TEXT;
|
|
6
|
+
ALTER TABLE devices ADD COLUMN hw_hash TEXT;
|