@dmarket/p2p-tracker-core 0.1.0-SNAPSHOT.98 → 1.0.0-beta.1
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/VERSION +14 -0
- package/dmarket-p2p-tracker-core-domain.mjs +10678 -4377
- package/dmarket-p2p-tracker-core-domain.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +3172 -2659
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-coroutines-core.mjs +2758 -2428
- package/kotlinx-coroutines-core.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.mjs +44 -44
- package/kotlinx-io-kotlinx-io-core.mjs +496 -496
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1791 -1790
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1586 -1564
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/ktor-ktor-client-core.mjs +3008 -3000
- package/ktor-ktor-client-core.mjs.map +1 -1
- package/ktor-ktor-events.mjs +6 -6
- package/ktor-ktor-http-cio.mjs +491 -491
- package/ktor-ktor-http.mjs +646 -646
- package/ktor-ktor-io.mjs +1015 -1015
- package/ktor-ktor-utils.mjs +794 -786
- package/ktor-ktor-utils.mjs.map +1 -1
- package/ktor-ktor-websockets.mjs +745 -745
- package/p2p-tracker-core.d.mts +107 -40
- package/p2p-tracker-core.mjs +26890 -10515
- package/p2p-tracker-core.mjs.map +1 -1
- package/package.json +2 -4
- package/pkg/README.md +92 -0
- package/pkg/client_wasm.d.ts +312 -0
- package/pkg/client_wasm.js +1187 -0
- package/pkg/client_wasm_bg.wasm +0 -0
- package/pkg/client_wasm_bg.wasm.d.ts +32 -0
- package/pkg/package.json +19 -0
- package/pkg/snippets/web-spawn-05868593a72e2d44/js/spawn.js +73 -0
- package/pkg/spawn.js +73 -0
- package/transport/README.md +172 -0
- package/transport/dist/channel.d.ts +48 -0
- package/transport/dist/channel.d.ts.map +1 -0
- package/transport/dist/channel.js +150 -0
- package/transport/dist/channel.js.map +1 -0
- package/transport/dist/index.d.ts +8 -0
- package/transport/dist/index.d.ts.map +1 -0
- package/transport/dist/index.js +18 -0
- package/transport/dist/index.js.map +1 -0
- package/transport/dist/prover.d.ts +103 -0
- package/transport/dist/prover.d.ts.map +1 -0
- package/transport/dist/prover.js +139 -0
- package/transport/dist/prover.js.map +1 -0
- package/transport/dist/transport.d.ts +31 -0
- package/transport/dist/transport.d.ts.map +1 -0
- package/transport/dist/transport.js +75 -0
- package/transport/dist/transport.js.map +1 -0
- package/transport/dist/types.d.ts +162 -0
- package/transport/dist/types.d.ts.map +1 -0
- package/transport/dist/types.js +21 -0
- package/transport/dist/types.js.map +1 -0
- package/transport/dist/wasm-compat.d.ts +2 -0
- package/transport/dist/wasm-compat.d.ts.map +1 -0
- package/transport/dist/wasm-compat.js +15 -0
- package/transport/dist/wasm-compat.js.map +1 -0
- package/transport/package.json +28 -0
|
@@ -0,0 +1,1187 @@
|
|
|
1
|
+
/* @ts-self-types="./client_wasm.d.ts" */
|
|
2
|
+
import { startSpawnerWorker } from './snippets/web-spawn-05868593a72e2d44/js/spawn.js';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The successful result of [`prove`]: the two opaque `postcard` blobs the
|
|
7
|
+
* extension persists — `attestation` and `secrets` — plus the target's HTTP
|
|
8
|
+
* `response`.
|
|
9
|
+
*
|
|
10
|
+
* `attestation` and `secrets` are `Uint8Array` (wasm-bindgen's native `Vec<u8>`
|
|
11
|
+
* mapping), **not** tsify `number[]`: tsify renders `Vec<u8>` as `number[]`,
|
|
12
|
+
* which would bloat these large blobs, so they are returned as byte arrays via
|
|
13
|
+
* this `#[wasm_bindgen]` class rather than as fields of a tsify struct (branch
|
|
14
|
+
* journal 08). Persist `attestation` + `secrets` together and later hand them
|
|
15
|
+
* to [`present`].
|
|
16
|
+
*/
|
|
17
|
+
export class ProveOutput {
|
|
18
|
+
static __wrap(ptr) {
|
|
19
|
+
const obj = Object.create(ProveOutput.prototype);
|
|
20
|
+
obj.__wbg_ptr = ptr;
|
|
21
|
+
ProveOutputFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
22
|
+
return obj;
|
|
23
|
+
}
|
|
24
|
+
__destroy_into_raw() {
|
|
25
|
+
const ptr = this.__wbg_ptr;
|
|
26
|
+
this.__wbg_ptr = 0;
|
|
27
|
+
ProveOutputFinalization.unregister(this);
|
|
28
|
+
return ptr;
|
|
29
|
+
}
|
|
30
|
+
free() {
|
|
31
|
+
const ptr = this.__destroy_into_raw();
|
|
32
|
+
wasm.__wbg_proveoutput_free(ptr, 0);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The notary-signed attestation, `postcard`-encoded (`Uint8Array`).
|
|
36
|
+
* @returns {Uint8Array}
|
|
37
|
+
*/
|
|
38
|
+
get attestation() {
|
|
39
|
+
const ret = wasm.proveoutput_attestation(this.__wbg_ptr);
|
|
40
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
41
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
42
|
+
return v1;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The target's HTTP response observed during issuance (convenience only —
|
|
46
|
+
* the cryptographic material is `attestation` + `secrets`, not this).
|
|
47
|
+
* @returns {HttpResponse}
|
|
48
|
+
*/
|
|
49
|
+
get response() {
|
|
50
|
+
const ret = wasm.proveoutput_response(this.__wbg_ptr);
|
|
51
|
+
return ret;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The connection secrets, `postcard`-encoded (`Uint8Array`). Required by
|
|
55
|
+
* [`present`]; persist alongside `attestation`.
|
|
56
|
+
* @returns {Uint8Array}
|
|
57
|
+
*/
|
|
58
|
+
get secrets() {
|
|
59
|
+
const ret = wasm.proveoutput_secrets(this.__wbg_ptr);
|
|
60
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
61
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
62
|
+
return v1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (Symbol.dispose) ProveOutput.prototype[Symbol.dispose] = ProveOutput.prototype.free;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Global spawner which spawns closures into web workers.
|
|
69
|
+
*/
|
|
70
|
+
export class Spawner {
|
|
71
|
+
static __wrap(ptr) {
|
|
72
|
+
const obj = Object.create(Spawner.prototype);
|
|
73
|
+
obj.__wbg_ptr = ptr;
|
|
74
|
+
SpawnerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
__destroy_into_raw() {
|
|
78
|
+
const ptr = this.__wbg_ptr;
|
|
79
|
+
this.__wbg_ptr = 0;
|
|
80
|
+
SpawnerFinalization.unregister(this);
|
|
81
|
+
return ptr;
|
|
82
|
+
}
|
|
83
|
+
free() {
|
|
84
|
+
const ptr = this.__destroy_into_raw();
|
|
85
|
+
wasm.__wbg_spawner_free(ptr, 0);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @returns {number}
|
|
89
|
+
*/
|
|
90
|
+
intoRaw() {
|
|
91
|
+
const ptr = this.__destroy_into_raw();
|
|
92
|
+
const ret = wasm.spawner_intoRaw(ptr);
|
|
93
|
+
return ret >>> 0;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Runs the spawner.
|
|
97
|
+
* @param {string} url
|
|
98
|
+
* @returns {Promise<void>}
|
|
99
|
+
*/
|
|
100
|
+
run(url) {
|
|
101
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
102
|
+
const len0 = WASM_VECTOR_LEN;
|
|
103
|
+
const ret = wasm.spawner_run(this.__wbg_ptr, ptr0, len0);
|
|
104
|
+
return ret;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (Symbol.dispose) Spawner.prototype[Symbol.dispose] = Spawner.prototype.free;
|
|
108
|
+
|
|
109
|
+
export class WorkerData {
|
|
110
|
+
__destroy_into_raw() {
|
|
111
|
+
const ptr = this.__wbg_ptr;
|
|
112
|
+
this.__wbg_ptr = 0;
|
|
113
|
+
WorkerDataFinalization.unregister(this);
|
|
114
|
+
return ptr;
|
|
115
|
+
}
|
|
116
|
+
free() {
|
|
117
|
+
const ptr = this.__destroy_into_raw();
|
|
118
|
+
wasm.__wbg_workerdata_free(ptr, 0);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (Symbol.dispose) WorkerData.prototype[Symbol.dispose] = WorkerData.prototype.free;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Initializes the module: installs logging + the panic hook, starts the
|
|
125
|
+
* `web-spawn` spawner, and builds the rayon global thread pool used by the MPC
|
|
126
|
+
* backend. Call (and await) it before [`prove`](crate)ing.
|
|
127
|
+
*
|
|
128
|
+
* **Idempotent.** The tracing subscriber and rayon's *global* thread pool can
|
|
129
|
+
* each be installed only once — a second attempt panics / throws — and
|
|
130
|
+
* `web-spawn`'s spawner would start a second worker if re-run. Extension
|
|
131
|
+
* lifecycle code can easily call `initialize` more than once, so a duplicate
|
|
132
|
+
* call here is a no-op that returns `Ok(())`. On failure the one-time claim is
|
|
133
|
+
* released, so a genuine retry (e.g. after the page adds the COOP/COEP headers
|
|
134
|
+
* `start_spawner` needs) can proceed.
|
|
135
|
+
*
|
|
136
|
+
* A near-verbatim port of upstream `dep/tlsn/crates/wasm/src/lib.rs`, with the
|
|
137
|
+
* idempotency guard added and logging configured locally rather than via
|
|
138
|
+
* `tlsn-sdk-core` (see [`log`]).
|
|
139
|
+
* @param {LoggingConfig | null | undefined} logging_config
|
|
140
|
+
* @param {number} thread_count
|
|
141
|
+
* @returns {Promise<void>}
|
|
142
|
+
*/
|
|
143
|
+
export function initialize(logging_config, thread_count) {
|
|
144
|
+
const ret = wasm.initialize(isLikeNone(logging_config) ? 0 : addToExternrefTable0(logging_config), thread_count);
|
|
145
|
+
return ret;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Builds a verifiable `Presentation` from a persisted `(attestation, secrets)`
|
|
150
|
+
* pair, revealing exactly what `policy` permits. Offline — no notary, no
|
|
151
|
+
* network — so this needs no IO channel and no prior [`initialize`].
|
|
152
|
+
*
|
|
153
|
+
* `attestation_bytes` / `secrets_bytes` are the `postcard` blobs from a prior
|
|
154
|
+
* [`prove`] (its [`ProveOutput`] `attestation` / `secrets`). `policy` is
|
|
155
|
+
* optional: when omitted it falls back to the **safe**
|
|
156
|
+
* `client_core::HttpRevealPolicy::default`, which redacts the `authorization` /
|
|
157
|
+
* `cookie` / `user-agent` request-header values. Returns the `postcard`-encoded
|
|
158
|
+
* `Presentation` (`Uint8Array`) to ship to a verifying backend.
|
|
159
|
+
* @param {Uint8Array} attestation_bytes
|
|
160
|
+
* @param {Uint8Array} secrets_bytes
|
|
161
|
+
* @param {RevealPolicy | null} [policy]
|
|
162
|
+
* @returns {Uint8Array}
|
|
163
|
+
*/
|
|
164
|
+
export function present(attestation_bytes, secrets_bytes, policy) {
|
|
165
|
+
const ptr0 = passArray8ToWasm0(attestation_bytes, wasm.__wbindgen_malloc);
|
|
166
|
+
const len0 = WASM_VECTOR_LEN;
|
|
167
|
+
const ptr1 = passArray8ToWasm0(secrets_bytes, wasm.__wbindgen_malloc);
|
|
168
|
+
const len1 = WASM_VECTOR_LEN;
|
|
169
|
+
const ret = wasm.present(ptr0, len0, ptr1, len1, isLikeNone(policy) ? 0 : addToExternrefTable0(policy));
|
|
170
|
+
if (ret[3]) {
|
|
171
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
172
|
+
}
|
|
173
|
+
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
174
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
175
|
+
return v3;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Runs one full issuance over the two JS-supplied IO channels: MPC-TLS commit
|
|
180
|
+
* with the notary over `notary_io`, the single HTTP exchange with the target
|
|
181
|
+
* over `server_io`, the selective-disclosure prove step, then the
|
|
182
|
+
* length-prefixed `postcard(AttestationRequest)` → `Attestation` phase-2
|
|
183
|
+
* exchange — yielding a notary-signed attestation validated against the
|
|
184
|
+
* prover's own view.
|
|
185
|
+
*
|
|
186
|
+
* - `config` — the locked issuance surface ([`IssuanceConfig`]).
|
|
187
|
+
* - `request` — the single HTTP request to prove ([`HttpRequest`]).
|
|
188
|
+
* - `progress_cb` — optional; invoked at each `ProgressStage` boundary with
|
|
189
|
+
* `{ step, progress, message, source: "wasm" }` (shape mirrors upstream
|
|
190
|
+
* tlsn-wasm's progress events).
|
|
191
|
+
*
|
|
192
|
+
* [`initialize`] must have been called (and awaited) first — it installs the
|
|
193
|
+
* rayon pool the MPC backend needs. The returned `Promise` rejects with the
|
|
194
|
+
* stringified error on any failure.
|
|
195
|
+
* @param {IoChannel} notary_io
|
|
196
|
+
* @param {IoChannel} server_io
|
|
197
|
+
* @param {IssuanceConfig} config
|
|
198
|
+
* @param {HttpRequest} request
|
|
199
|
+
* @param {Function | null} [progress_cb]
|
|
200
|
+
* @returns {Promise<ProveOutput>}
|
|
201
|
+
*/
|
|
202
|
+
export function prove(notary_io, server_io, config, request, progress_cb) {
|
|
203
|
+
const ret = wasm.prove(notary_io, server_io, config, request, isLikeNone(progress_cb) ? 0 : addToExternrefTable0(progress_cb));
|
|
204
|
+
return ret;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Starts the thread spawner on a dedicated worker thread.
|
|
209
|
+
* @returns {Promise<any>}
|
|
210
|
+
*/
|
|
211
|
+
export function startSpawner() {
|
|
212
|
+
const ret = wasm.startSpawner();
|
|
213
|
+
return ret;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @param {number} spawner
|
|
218
|
+
* @returns {Spawner}
|
|
219
|
+
*/
|
|
220
|
+
export function web_spawn_recover_spawner(spawner) {
|
|
221
|
+
const ret = wasm.web_spawn_recover_spawner(spawner);
|
|
222
|
+
return Spawner.__wrap(ret);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @param {number} worker
|
|
227
|
+
*/
|
|
228
|
+
export function web_spawn_start_worker(worker) {
|
|
229
|
+
wasm.web_spawn_start_worker(worker);
|
|
230
|
+
}
|
|
231
|
+
function __wbg_get_imports(memory) {
|
|
232
|
+
const import0 = {
|
|
233
|
+
__proto__: null,
|
|
234
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
235
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
236
|
+
return ret;
|
|
237
|
+
},
|
|
238
|
+
__wbg_Number_9a4e0ecb0fa16705: function(arg0) {
|
|
239
|
+
const ret = Number(arg0);
|
|
240
|
+
return ret;
|
|
241
|
+
},
|
|
242
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
243
|
+
const ret = String(arg1);
|
|
244
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
245
|
+
const len1 = WASM_VECTOR_LEN;
|
|
246
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
247
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
248
|
+
},
|
|
249
|
+
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
|
|
250
|
+
const v = arg1;
|
|
251
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
252
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
253
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
254
|
+
},
|
|
255
|
+
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
256
|
+
const v = arg0;
|
|
257
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
258
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
259
|
+
},
|
|
260
|
+
__wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
|
|
261
|
+
const ret = debugString(arg1);
|
|
262
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
263
|
+
const len1 = WASM_VECTOR_LEN;
|
|
264
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
265
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
266
|
+
},
|
|
267
|
+
__wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
|
|
268
|
+
const ret = arg0 in arg1;
|
|
269
|
+
return ret;
|
|
270
|
+
},
|
|
271
|
+
__wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
|
|
272
|
+
const ret = typeof(arg0) === 'bigint';
|
|
273
|
+
return ret;
|
|
274
|
+
},
|
|
275
|
+
__wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
|
|
276
|
+
const ret = typeof(arg0) === 'function';
|
|
277
|
+
return ret;
|
|
278
|
+
},
|
|
279
|
+
__wbg___wbindgen_is_null_ea9085d691f535d3: function(arg0) {
|
|
280
|
+
const ret = arg0 === null;
|
|
281
|
+
return ret;
|
|
282
|
+
},
|
|
283
|
+
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
284
|
+
const val = arg0;
|
|
285
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
286
|
+
return ret;
|
|
287
|
+
},
|
|
288
|
+
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
289
|
+
const ret = typeof(arg0) === 'string';
|
|
290
|
+
return ret;
|
|
291
|
+
},
|
|
292
|
+
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
293
|
+
const ret = arg0 === undefined;
|
|
294
|
+
return ret;
|
|
295
|
+
},
|
|
296
|
+
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
|
|
297
|
+
const ret = arg0 === arg1;
|
|
298
|
+
return ret;
|
|
299
|
+
},
|
|
300
|
+
__wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
|
|
301
|
+
const ret = arg0 == arg1;
|
|
302
|
+
return ret;
|
|
303
|
+
},
|
|
304
|
+
__wbg___wbindgen_memory_de265df8aadd6273: function() {
|
|
305
|
+
const ret = wasm.memory;
|
|
306
|
+
return ret;
|
|
307
|
+
},
|
|
308
|
+
__wbg___wbindgen_module_a22faa8909381977: function() {
|
|
309
|
+
const ret = wasmModule;
|
|
310
|
+
return ret;
|
|
311
|
+
},
|
|
312
|
+
__wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
|
|
313
|
+
const obj = arg1;
|
|
314
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
315
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
316
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
317
|
+
},
|
|
318
|
+
__wbg___wbindgen_rethrow_4915403b40f010b4: function(arg0) {
|
|
319
|
+
throw arg0;
|
|
320
|
+
},
|
|
321
|
+
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
322
|
+
const obj = arg1;
|
|
323
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
324
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
325
|
+
var len1 = WASM_VECTOR_LEN;
|
|
326
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
327
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
328
|
+
},
|
|
329
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
330
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
331
|
+
},
|
|
332
|
+
__wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
|
|
333
|
+
arg0._wbg_cb_unref();
|
|
334
|
+
},
|
|
335
|
+
__wbg_async_37b7cd4cbabb646c: function(arg0) {
|
|
336
|
+
const ret = arg0.async;
|
|
337
|
+
return ret;
|
|
338
|
+
},
|
|
339
|
+
__wbg_buffer_0f212447ac64c53b: function(arg0) {
|
|
340
|
+
const ret = arg0.buffer;
|
|
341
|
+
return ret;
|
|
342
|
+
},
|
|
343
|
+
__wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
|
|
344
|
+
const ret = arg0.call(arg1);
|
|
345
|
+
return ret;
|
|
346
|
+
}, arguments); },
|
|
347
|
+
__wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
|
|
348
|
+
const ret = arg0.call(arg1, arg2);
|
|
349
|
+
return ret;
|
|
350
|
+
}, arguments); },
|
|
351
|
+
__wbg_close_7ceb188ccbe55280: function() { return handleError(function (arg0) {
|
|
352
|
+
const ret = arg0.close();
|
|
353
|
+
return ret;
|
|
354
|
+
}, arguments); },
|
|
355
|
+
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
356
|
+
const ret = arg0.crypto;
|
|
357
|
+
return ret;
|
|
358
|
+
},
|
|
359
|
+
__wbg_data_0965368f2b7f680a: function(arg0) {
|
|
360
|
+
const ret = arg0.data;
|
|
361
|
+
return ret;
|
|
362
|
+
},
|
|
363
|
+
__wbg_done_89b2b13e91a60321: function(arg0) {
|
|
364
|
+
const ret = arg0.done;
|
|
365
|
+
return ret;
|
|
366
|
+
},
|
|
367
|
+
__wbg_entries_015dc610cd81ede0: function(arg0) {
|
|
368
|
+
const ret = Object.entries(arg0);
|
|
369
|
+
return ret;
|
|
370
|
+
},
|
|
371
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
372
|
+
let deferred0_0;
|
|
373
|
+
let deferred0_1;
|
|
374
|
+
try {
|
|
375
|
+
deferred0_0 = arg0;
|
|
376
|
+
deferred0_1 = arg1;
|
|
377
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
378
|
+
} finally {
|
|
379
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
__wbg_getRandomValues_b2176991427f6db8: function() { return handleError(function (arg0) {
|
|
383
|
+
globalThis.crypto.getRandomValues(arg0);
|
|
384
|
+
}, arguments); },
|
|
385
|
+
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
386
|
+
arg0.getRandomValues(arg1);
|
|
387
|
+
}, arguments); },
|
|
388
|
+
__wbg_get_507a50627bffa49b: function(arg0, arg1) {
|
|
389
|
+
const ret = arg0[arg1 >>> 0];
|
|
390
|
+
return ret;
|
|
391
|
+
},
|
|
392
|
+
__wbg_get_c7eb1f358a7654df: function() { return handleError(function (arg0, arg1) {
|
|
393
|
+
const ret = Reflect.get(arg0, arg1);
|
|
394
|
+
return ret;
|
|
395
|
+
}, arguments); },
|
|
396
|
+
__wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
|
|
397
|
+
const ret = arg0[arg1 >>> 0];
|
|
398
|
+
return ret;
|
|
399
|
+
},
|
|
400
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
401
|
+
const ret = arg0[arg1];
|
|
402
|
+
return ret;
|
|
403
|
+
},
|
|
404
|
+
__wbg_hardwareConcurrency_94fd86e68bb941b9: function(arg0) {
|
|
405
|
+
const ret = arg0.hardwareConcurrency;
|
|
406
|
+
return ret;
|
|
407
|
+
},
|
|
408
|
+
__wbg_hardwareConcurrency_c9435647b41823d9: function(arg0) {
|
|
409
|
+
const ret = arg0.hardwareConcurrency;
|
|
410
|
+
return ret;
|
|
411
|
+
},
|
|
412
|
+
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
413
|
+
let result;
|
|
414
|
+
try {
|
|
415
|
+
result = arg0 instanceof ArrayBuffer;
|
|
416
|
+
} catch (_) {
|
|
417
|
+
result = false;
|
|
418
|
+
}
|
|
419
|
+
const ret = result;
|
|
420
|
+
return ret;
|
|
421
|
+
},
|
|
422
|
+
__wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
|
|
423
|
+
let result;
|
|
424
|
+
try {
|
|
425
|
+
result = arg0 instanceof Map;
|
|
426
|
+
} catch (_) {
|
|
427
|
+
result = false;
|
|
428
|
+
}
|
|
429
|
+
const ret = result;
|
|
430
|
+
return ret;
|
|
431
|
+
},
|
|
432
|
+
__wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
|
|
433
|
+
let result;
|
|
434
|
+
try {
|
|
435
|
+
result = arg0 instanceof Uint8Array;
|
|
436
|
+
} catch (_) {
|
|
437
|
+
result = false;
|
|
438
|
+
}
|
|
439
|
+
const ret = result;
|
|
440
|
+
return ret;
|
|
441
|
+
},
|
|
442
|
+
__wbg_instanceof_Window_05ba1ee4f6781663: function(arg0) {
|
|
443
|
+
let result;
|
|
444
|
+
try {
|
|
445
|
+
result = arg0 instanceof Window;
|
|
446
|
+
} catch (_) {
|
|
447
|
+
result = false;
|
|
448
|
+
}
|
|
449
|
+
const ret = result;
|
|
450
|
+
return ret;
|
|
451
|
+
},
|
|
452
|
+
__wbg_instanceof_WorkerGlobalScope_8ec07b5e040a41c3: function(arg0) {
|
|
453
|
+
let result;
|
|
454
|
+
try {
|
|
455
|
+
result = arg0 instanceof WorkerGlobalScope;
|
|
456
|
+
} catch (_) {
|
|
457
|
+
result = false;
|
|
458
|
+
}
|
|
459
|
+
const ret = result;
|
|
460
|
+
return ret;
|
|
461
|
+
},
|
|
462
|
+
__wbg_isArray_0677c962b281d01a: function(arg0) {
|
|
463
|
+
const ret = Array.isArray(arg0);
|
|
464
|
+
return ret;
|
|
465
|
+
},
|
|
466
|
+
__wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
|
|
467
|
+
const ret = Number.isSafeInteger(arg0);
|
|
468
|
+
return ret;
|
|
469
|
+
},
|
|
470
|
+
__wbg_iterator_6f722e4a93058b71: function() {
|
|
471
|
+
const ret = Symbol.iterator;
|
|
472
|
+
return ret;
|
|
473
|
+
},
|
|
474
|
+
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
475
|
+
const ret = arg0.length;
|
|
476
|
+
return ret;
|
|
477
|
+
},
|
|
478
|
+
__wbg_length_370319915dc99107: function(arg0) {
|
|
479
|
+
const ret = arg0.length;
|
|
480
|
+
return ret;
|
|
481
|
+
},
|
|
482
|
+
__wbg_log_a08c94858b7b3f5d: function(arg0, arg1) {
|
|
483
|
+
let deferred0_0;
|
|
484
|
+
let deferred0_1;
|
|
485
|
+
try {
|
|
486
|
+
deferred0_0 = arg0;
|
|
487
|
+
deferred0_1 = arg1;
|
|
488
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
489
|
+
} finally {
|
|
490
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
__wbg_log_af57d76a20981228: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
494
|
+
let deferred0_0;
|
|
495
|
+
let deferred0_1;
|
|
496
|
+
try {
|
|
497
|
+
deferred0_0 = arg0;
|
|
498
|
+
deferred0_1 = arg1;
|
|
499
|
+
console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
500
|
+
} finally {
|
|
501
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
__wbg_mark_be5ec5c35d91d156: function(arg0, arg1) {
|
|
505
|
+
performance.mark(getStringFromWasm0(arg0, arg1));
|
|
506
|
+
},
|
|
507
|
+
__wbg_measure_dc9d16991bb9411f: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
508
|
+
let deferred0_0;
|
|
509
|
+
let deferred0_1;
|
|
510
|
+
let deferred1_0;
|
|
511
|
+
let deferred1_1;
|
|
512
|
+
try {
|
|
513
|
+
deferred0_0 = arg0;
|
|
514
|
+
deferred0_1 = arg1;
|
|
515
|
+
deferred1_0 = arg2;
|
|
516
|
+
deferred1_1 = arg3;
|
|
517
|
+
performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
518
|
+
} finally {
|
|
519
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
520
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
521
|
+
}
|
|
522
|
+
}, arguments); },
|
|
523
|
+
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
524
|
+
const ret = arg0.msCrypto;
|
|
525
|
+
return ret;
|
|
526
|
+
},
|
|
527
|
+
__wbg_navigator_51379c10a84aeec9: function(arg0) {
|
|
528
|
+
const ret = arg0.navigator;
|
|
529
|
+
return ret;
|
|
530
|
+
},
|
|
531
|
+
__wbg_navigator_99621db14b3f1099: function(arg0) {
|
|
532
|
+
const ret = arg0.navigator;
|
|
533
|
+
return ret;
|
|
534
|
+
},
|
|
535
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
536
|
+
const ret = new Error();
|
|
537
|
+
return ret;
|
|
538
|
+
},
|
|
539
|
+
__wbg_new_32b398fb48b6d94a: function() {
|
|
540
|
+
const ret = new Array();
|
|
541
|
+
return ret;
|
|
542
|
+
},
|
|
543
|
+
__wbg_new_70f79e80a78a1f78: function(arg0) {
|
|
544
|
+
const ret = new Int32Array(arg0);
|
|
545
|
+
return ret;
|
|
546
|
+
},
|
|
547
|
+
__wbg_new_aec3e25493d729fe: function(arg0, arg1) {
|
|
548
|
+
try {
|
|
549
|
+
var state0 = {a: arg0, b: arg1};
|
|
550
|
+
var cb0 = (arg0, arg1) => {
|
|
551
|
+
const a = state0.a;
|
|
552
|
+
state0.a = 0;
|
|
553
|
+
try {
|
|
554
|
+
return wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
555
|
+
} finally {
|
|
556
|
+
state0.a = a;
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
const ret = new Promise(cb0);
|
|
560
|
+
return ret;
|
|
561
|
+
} finally {
|
|
562
|
+
state0.a = 0;
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
__wbg_new_cd45aabdf6073e84: function(arg0) {
|
|
566
|
+
const ret = new Uint8Array(arg0);
|
|
567
|
+
return ret;
|
|
568
|
+
},
|
|
569
|
+
__wbg_new_da52cf8fe3429cb2: function() {
|
|
570
|
+
const ret = new Object();
|
|
571
|
+
return ret;
|
|
572
|
+
},
|
|
573
|
+
__wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
|
|
574
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
575
|
+
return ret;
|
|
576
|
+
},
|
|
577
|
+
__wbg_new_typed_1824d93f294193e5: function(arg0, arg1) {
|
|
578
|
+
try {
|
|
579
|
+
var state0 = {a: arg0, b: arg1};
|
|
580
|
+
var cb0 = (arg0, arg1) => {
|
|
581
|
+
const a = state0.a;
|
|
582
|
+
state0.a = 0;
|
|
583
|
+
try {
|
|
584
|
+
return wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
585
|
+
} finally {
|
|
586
|
+
state0.a = a;
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
const ret = new Promise(cb0);
|
|
590
|
+
return ret;
|
|
591
|
+
} finally {
|
|
592
|
+
state0.a = 0;
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
__wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
|
|
596
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
597
|
+
return ret;
|
|
598
|
+
},
|
|
599
|
+
__wbg_new_with_options_6b48999e016c6fc6: function() { return handleError(function (arg0, arg1, arg2) {
|
|
600
|
+
const ret = new Worker(getStringFromWasm0(arg0, arg1), arg2);
|
|
601
|
+
return ret;
|
|
602
|
+
}, arguments); },
|
|
603
|
+
__wbg_new_worker_a37b91c84b1f9aa5: function(arg0, arg1) {
|
|
604
|
+
const ret = new Worker(getStringFromWasm0(arg0, arg1));
|
|
605
|
+
return ret;
|
|
606
|
+
},
|
|
607
|
+
__wbg_next_6dbf2c0ac8cde20f: function(arg0) {
|
|
608
|
+
const ret = arg0.next;
|
|
609
|
+
return ret;
|
|
610
|
+
},
|
|
611
|
+
__wbg_next_71f2aa1cb3d1e37e: function() { return handleError(function (arg0) {
|
|
612
|
+
const ret = arg0.next();
|
|
613
|
+
return ret;
|
|
614
|
+
}, arguments); },
|
|
615
|
+
__wbg_node_84ea875411254db1: function(arg0) {
|
|
616
|
+
const ret = arg0.node;
|
|
617
|
+
return ret;
|
|
618
|
+
},
|
|
619
|
+
__wbg_now_86c0d4ba3fa605b8: function() {
|
|
620
|
+
const ret = Date.now();
|
|
621
|
+
return ret;
|
|
622
|
+
},
|
|
623
|
+
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
624
|
+
const ret = arg0.now();
|
|
625
|
+
return ret;
|
|
626
|
+
},
|
|
627
|
+
__wbg_of_b0cd2e09b31a9684: function(arg0, arg1, arg2) {
|
|
628
|
+
const ret = Array.of(arg0, arg1, arg2);
|
|
629
|
+
return ret;
|
|
630
|
+
},
|
|
631
|
+
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
|
|
632
|
+
const ret = arg0.performance;
|
|
633
|
+
return ret;
|
|
634
|
+
},
|
|
635
|
+
__wbg_postMessage_56396682c54d5757: function() { return handleError(function (arg0, arg1) {
|
|
636
|
+
arg0.postMessage(arg1);
|
|
637
|
+
}, arguments); },
|
|
638
|
+
__wbg_postMessage_f48bc524bea113e2: function() { return handleError(function (arg0, arg1) {
|
|
639
|
+
arg0.postMessage(arg1);
|
|
640
|
+
}, arguments); },
|
|
641
|
+
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
642
|
+
const ret = arg0.process;
|
|
643
|
+
return ret;
|
|
644
|
+
},
|
|
645
|
+
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
646
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
647
|
+
},
|
|
648
|
+
__wbg_proveoutput_new: function(arg0) {
|
|
649
|
+
const ret = ProveOutput.__wrap(arg0);
|
|
650
|
+
return ret;
|
|
651
|
+
},
|
|
652
|
+
__wbg_push_d2ae3af0c1217ae6: function(arg0, arg1) {
|
|
653
|
+
const ret = arg0.push(arg1);
|
|
654
|
+
return ret;
|
|
655
|
+
},
|
|
656
|
+
__wbg_queueMicrotask_0ab5b2d2393e99b9: function(arg0) {
|
|
657
|
+
const ret = arg0.queueMicrotask;
|
|
658
|
+
return ret;
|
|
659
|
+
},
|
|
660
|
+
__wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
|
|
661
|
+
queueMicrotask(arg0);
|
|
662
|
+
},
|
|
663
|
+
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
664
|
+
arg0.randomFillSync(arg1);
|
|
665
|
+
}, arguments); },
|
|
666
|
+
__wbg_read_8274b1bb18fc5125: function() { return handleError(function (arg0) {
|
|
667
|
+
const ret = arg0.read();
|
|
668
|
+
return ret;
|
|
669
|
+
}, arguments); },
|
|
670
|
+
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
671
|
+
const ret = module.require;
|
|
672
|
+
return ret;
|
|
673
|
+
}, arguments); },
|
|
674
|
+
__wbg_resolve_2191a4dfe481c25b: function(arg0) {
|
|
675
|
+
const ret = Promise.resolve(arg0);
|
|
676
|
+
return ret;
|
|
677
|
+
},
|
|
678
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
679
|
+
arg0[arg1] = arg2;
|
|
680
|
+
},
|
|
681
|
+
__wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
|
|
682
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
683
|
+
return ret;
|
|
684
|
+
}, arguments); },
|
|
685
|
+
__wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
|
|
686
|
+
arg0[arg1 >>> 0] = arg2;
|
|
687
|
+
},
|
|
688
|
+
__wbg_set_name_9ee85c4227217134: function(arg0, arg1, arg2) {
|
|
689
|
+
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
690
|
+
},
|
|
691
|
+
__wbg_set_onmessage_e3a42c9af9f677a1: function(arg0, arg1) {
|
|
692
|
+
arg0.onmessage = arg1;
|
|
693
|
+
},
|
|
694
|
+
__wbg_set_type_e30b9a6650be2f07: function(arg0, arg1) {
|
|
695
|
+
arg0.type = __wbindgen_enum_WorkerType[arg1];
|
|
696
|
+
},
|
|
697
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
698
|
+
const ret = arg1.stack;
|
|
699
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
700
|
+
const len1 = WASM_VECTOR_LEN;
|
|
701
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
702
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
703
|
+
},
|
|
704
|
+
__wbg_startSpawnerWorker_d623376cb6a747f9: function(arg0, arg1, arg2) {
|
|
705
|
+
const ret = startSpawnerWorker(arg0, arg1, Spawner.__wrap(arg2));
|
|
706
|
+
return ret;
|
|
707
|
+
},
|
|
708
|
+
__wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
|
|
709
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
710
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
711
|
+
},
|
|
712
|
+
__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
|
|
713
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
714
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
715
|
+
},
|
|
716
|
+
__wbg_static_accessor_SELF_146583524fe1469b: function() {
|
|
717
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
718
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
719
|
+
},
|
|
720
|
+
__wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
|
|
721
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
722
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
723
|
+
},
|
|
724
|
+
__wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
|
|
725
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
726
|
+
return ret;
|
|
727
|
+
},
|
|
728
|
+
__wbg_then_16d107c451e9905d: function(arg0, arg1, arg2) {
|
|
729
|
+
const ret = arg0.then(arg1, arg2);
|
|
730
|
+
return ret;
|
|
731
|
+
},
|
|
732
|
+
__wbg_then_6ec10ae38b3e92f7: function(arg0, arg1) {
|
|
733
|
+
const ret = arg0.then(arg1);
|
|
734
|
+
return ret;
|
|
735
|
+
},
|
|
736
|
+
__wbg_then_e0960b859f3ff223: function(arg0, arg1) {
|
|
737
|
+
const ret = arg0.then(arg1);
|
|
738
|
+
return ret;
|
|
739
|
+
},
|
|
740
|
+
__wbg_timeOrigin_f3d5cb4f4a06c2b7: function(arg0) {
|
|
741
|
+
const ret = arg0.timeOrigin;
|
|
742
|
+
return ret;
|
|
743
|
+
},
|
|
744
|
+
__wbg_value_99213de42db60201: function(arg0) {
|
|
745
|
+
const ret = arg0.value;
|
|
746
|
+
return ret;
|
|
747
|
+
},
|
|
748
|
+
__wbg_value_a5d5488a9589444a: function(arg0) {
|
|
749
|
+
const ret = arg0.value;
|
|
750
|
+
return ret;
|
|
751
|
+
},
|
|
752
|
+
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
753
|
+
const ret = arg0.versions;
|
|
754
|
+
return ret;
|
|
755
|
+
},
|
|
756
|
+
__wbg_waitAsync_06c45f5361ba204a: function() {
|
|
757
|
+
const ret = Atomics.waitAsync;
|
|
758
|
+
return ret;
|
|
759
|
+
},
|
|
760
|
+
__wbg_waitAsync_919777b30820ea59: function(arg0, arg1, arg2) {
|
|
761
|
+
const ret = Atomics.waitAsync(arg0, arg1 >>> 0, arg2);
|
|
762
|
+
return ret;
|
|
763
|
+
},
|
|
764
|
+
__wbg_write_69b8e8e272e87a62: function() { return handleError(function (arg0, arg1) {
|
|
765
|
+
const ret = arg0.write(arg1);
|
|
766
|
+
return ret;
|
|
767
|
+
}, arguments); },
|
|
768
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
769
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1082, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
770
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___wasm_bindgen_1fa5c626ec3a32f9___JsValue______true_);
|
|
771
|
+
return ret;
|
|
772
|
+
},
|
|
773
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
774
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2300, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
775
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___wasm_bindgen_1fa5c626ec3a32f9___JsValue__core_b7b33017ae0f8bb5___result__Result_____wasm_bindgen_1fa5c626ec3a32f9___JsError___true_);
|
|
776
|
+
return ret;
|
|
777
|
+
},
|
|
778
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
779
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2302, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
780
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___futures__task__wait_async_polyfill__MessageEvent______true_);
|
|
781
|
+
return ret;
|
|
782
|
+
},
|
|
783
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
784
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
785
|
+
const ret = arg0;
|
|
786
|
+
return ret;
|
|
787
|
+
},
|
|
788
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
789
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
790
|
+
const ret = arg0;
|
|
791
|
+
return ret;
|
|
792
|
+
},
|
|
793
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
794
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
795
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
796
|
+
return ret;
|
|
797
|
+
},
|
|
798
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
799
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
800
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
801
|
+
return ret;
|
|
802
|
+
},
|
|
803
|
+
__wbindgen_cast_0000000000000008: function(arg0) {
|
|
804
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
805
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
806
|
+
return ret;
|
|
807
|
+
},
|
|
808
|
+
__wbindgen_init_externref_table: function() {
|
|
809
|
+
const table = wasm.__wbindgen_externrefs;
|
|
810
|
+
const offset = table.grow(4);
|
|
811
|
+
table.set(0, undefined);
|
|
812
|
+
table.set(offset + 0, undefined);
|
|
813
|
+
table.set(offset + 1, null);
|
|
814
|
+
table.set(offset + 2, true);
|
|
815
|
+
table.set(offset + 3, false);
|
|
816
|
+
},
|
|
817
|
+
__wbindgen_link_580560c8bba509f2: function(arg0) {
|
|
818
|
+
const val = `onmessage = function (ev) {
|
|
819
|
+
let [ia, index, value] = ev.data;
|
|
820
|
+
ia = new Int32Array(ia.buffer);
|
|
821
|
+
let result = Atomics.wait(ia, index, value);
|
|
822
|
+
postMessage(result);
|
|
823
|
+
};
|
|
824
|
+
`;
|
|
825
|
+
const ret = typeof URL.createObjectURL === 'undefined' ? "data:application/javascript," + encodeURIComponent(val) : URL.createObjectURL(new Blob([val], { type: "text/javascript" }));
|
|
826
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
827
|
+
const len1 = WASM_VECTOR_LEN;
|
|
828
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
829
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
830
|
+
},
|
|
831
|
+
memory: memory || new WebAssembly.Memory({initial:143,maximum:65536,shared:true}),
|
|
832
|
+
};
|
|
833
|
+
return {
|
|
834
|
+
__proto__: null,
|
|
835
|
+
"./client_wasm_bg.js": import0,
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
function wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___wasm_bindgen_1fa5c626ec3a32f9___JsValue______true_(arg0, arg1, arg2) {
|
|
840
|
+
wasm.wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___wasm_bindgen_1fa5c626ec3a32f9___JsValue______true_(arg0, arg1, arg2);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
function wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___futures__task__wait_async_polyfill__MessageEvent______true_(arg0, arg1, arg2) {
|
|
844
|
+
wasm.wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___futures__task__wait_async_polyfill__MessageEvent______true_(arg0, arg1, arg2);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
function wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___wasm_bindgen_1fa5c626ec3a32f9___JsValue__core_b7b33017ae0f8bb5___result__Result_____wasm_bindgen_1fa5c626ec3a32f9___JsError___true_(arg0, arg1, arg2) {
|
|
848
|
+
const ret = wasm.wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___wasm_bindgen_1fa5c626ec3a32f9___JsValue__core_b7b33017ae0f8bb5___result__Result_____wasm_bindgen_1fa5c626ec3a32f9___JsError___true_(arg0, arg1, arg2);
|
|
849
|
+
if (ret[1]) {
|
|
850
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
function wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
855
|
+
wasm.wasm_bindgen_1fa5c626ec3a32f9___convert__closures_____invoke___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined___js_sys_27d0ccca2911ffcd___Function_fn_wasm_bindgen_1fa5c626ec3a32f9___JsValue_____wasm_bindgen_1fa5c626ec3a32f9___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
const __wbindgen_enum_WorkerType = ["classic", "module"];
|
|
860
|
+
const ProveOutputFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
861
|
+
? { register: () => {}, unregister: () => {} }
|
|
862
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_proveoutput_free(ptr, 1));
|
|
863
|
+
const SpawnerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
864
|
+
? { register: () => {}, unregister: () => {} }
|
|
865
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_spawner_free(ptr, 1));
|
|
866
|
+
const WorkerDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
867
|
+
? { register: () => {}, unregister: () => {} }
|
|
868
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_workerdata_free(ptr, 1));
|
|
869
|
+
|
|
870
|
+
function addToExternrefTable0(obj) {
|
|
871
|
+
const idx = wasm.__externref_table_alloc();
|
|
872
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
873
|
+
return idx;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
877
|
+
? { register: () => {}, unregister: () => {} }
|
|
878
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
879
|
+
|
|
880
|
+
function debugString(val) {
|
|
881
|
+
// primitive types
|
|
882
|
+
const type = typeof val;
|
|
883
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
884
|
+
return `${val}`;
|
|
885
|
+
}
|
|
886
|
+
if (type == 'string') {
|
|
887
|
+
return `"${val}"`;
|
|
888
|
+
}
|
|
889
|
+
if (type == 'symbol') {
|
|
890
|
+
const description = val.description;
|
|
891
|
+
if (description == null) {
|
|
892
|
+
return 'Symbol';
|
|
893
|
+
} else {
|
|
894
|
+
return `Symbol(${description})`;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
if (type == 'function') {
|
|
898
|
+
const name = val.name;
|
|
899
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
900
|
+
return `Function(${name})`;
|
|
901
|
+
} else {
|
|
902
|
+
return 'Function';
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
// objects
|
|
906
|
+
if (Array.isArray(val)) {
|
|
907
|
+
const length = val.length;
|
|
908
|
+
let debug = '[';
|
|
909
|
+
if (length > 0) {
|
|
910
|
+
debug += debugString(val[0]);
|
|
911
|
+
}
|
|
912
|
+
for(let i = 1; i < length; i++) {
|
|
913
|
+
debug += ', ' + debugString(val[i]);
|
|
914
|
+
}
|
|
915
|
+
debug += ']';
|
|
916
|
+
return debug;
|
|
917
|
+
}
|
|
918
|
+
// Test for built-in
|
|
919
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
920
|
+
let className;
|
|
921
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
922
|
+
className = builtInMatches[1];
|
|
923
|
+
} else {
|
|
924
|
+
// Failed to match the standard '[object ClassName]'
|
|
925
|
+
return toString.call(val);
|
|
926
|
+
}
|
|
927
|
+
if (className == 'Object') {
|
|
928
|
+
// we're a user defined class or Object
|
|
929
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
930
|
+
// easier than looping through ownProperties of `val`.
|
|
931
|
+
try {
|
|
932
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
933
|
+
} catch (_) {
|
|
934
|
+
return 'Object';
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
// errors
|
|
938
|
+
if (val instanceof Error) {
|
|
939
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
940
|
+
}
|
|
941
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
942
|
+
return className;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
946
|
+
ptr = ptr >>> 0;
|
|
947
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
let cachedDataViewMemory0 = null;
|
|
951
|
+
function getDataViewMemory0() {
|
|
952
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
953
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
954
|
+
}
|
|
955
|
+
return cachedDataViewMemory0;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
function getStringFromWasm0(ptr, len) {
|
|
959
|
+
return decodeText(ptr >>> 0, len);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
let cachedUint8ArrayMemory0 = null;
|
|
963
|
+
function getUint8ArrayMemory0() {
|
|
964
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
965
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
966
|
+
}
|
|
967
|
+
return cachedUint8ArrayMemory0;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
function handleError(f, args) {
|
|
971
|
+
try {
|
|
972
|
+
return f.apply(this, args);
|
|
973
|
+
} catch (e) {
|
|
974
|
+
const idx = addToExternrefTable0(e);
|
|
975
|
+
wasm.__wbindgen_exn_store(idx);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
function isLikeNone(x) {
|
|
980
|
+
return x === undefined || x === null;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
984
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
985
|
+
const real = (...args) => {
|
|
986
|
+
|
|
987
|
+
// First up with a closure we increment the internal reference
|
|
988
|
+
// count. This ensures that the Rust closure environment won't
|
|
989
|
+
// be deallocated while we're invoking it.
|
|
990
|
+
state.cnt++;
|
|
991
|
+
const a = state.a;
|
|
992
|
+
state.a = 0;
|
|
993
|
+
try {
|
|
994
|
+
return f(a, state.b, ...args);
|
|
995
|
+
} finally {
|
|
996
|
+
state.a = a;
|
|
997
|
+
real._wbg_cb_unref();
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
real._wbg_cb_unref = () => {
|
|
1001
|
+
if (--state.cnt === 0) {
|
|
1002
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
1003
|
+
state.a = 0;
|
|
1004
|
+
CLOSURE_DTORS.unregister(state);
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1008
|
+
return real;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1012
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1013
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1014
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1015
|
+
return ptr;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1019
|
+
if (realloc === undefined) {
|
|
1020
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1021
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1022
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1023
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1024
|
+
return ptr;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
let len = arg.length;
|
|
1028
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1029
|
+
|
|
1030
|
+
const mem = getUint8ArrayMemory0();
|
|
1031
|
+
|
|
1032
|
+
let offset = 0;
|
|
1033
|
+
|
|
1034
|
+
for (; offset < len; offset++) {
|
|
1035
|
+
const code = arg.charCodeAt(offset);
|
|
1036
|
+
if (code > 0x7F) break;
|
|
1037
|
+
mem[ptr + offset] = code;
|
|
1038
|
+
}
|
|
1039
|
+
if (offset !== len) {
|
|
1040
|
+
if (offset !== 0) {
|
|
1041
|
+
arg = arg.slice(offset);
|
|
1042
|
+
}
|
|
1043
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1044
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1045
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1046
|
+
|
|
1047
|
+
offset += ret.written;
|
|
1048
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
WASM_VECTOR_LEN = offset;
|
|
1052
|
+
return ptr;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
function takeFromExternrefTable0(idx) {
|
|
1056
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1057
|
+
wasm.__externref_table_dealloc(idx);
|
|
1058
|
+
return value;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : undefined);
|
|
1062
|
+
if (cachedTextDecoder) cachedTextDecoder.decode();
|
|
1063
|
+
|
|
1064
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1065
|
+
let numBytesDecoded = 0;
|
|
1066
|
+
function decodeText(ptr, len) {
|
|
1067
|
+
numBytesDecoded += len;
|
|
1068
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1069
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1070
|
+
cachedTextDecoder.decode();
|
|
1071
|
+
numBytesDecoded = len;
|
|
1072
|
+
}
|
|
1073
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined);
|
|
1077
|
+
|
|
1078
|
+
if (cachedTextEncoder) {
|
|
1079
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1080
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1081
|
+
view.set(buf);
|
|
1082
|
+
return {
|
|
1083
|
+
read: arg.length,
|
|
1084
|
+
written: buf.length
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
let WASM_VECTOR_LEN = 0;
|
|
1090
|
+
|
|
1091
|
+
let wasmModule, wasmInstance, wasm;
|
|
1092
|
+
function __wbg_finalize_init(instance, module, thread_stack_size) {
|
|
1093
|
+
wasmInstance = instance;
|
|
1094
|
+
wasm = instance.exports;
|
|
1095
|
+
wasmModule = module;
|
|
1096
|
+
cachedDataViewMemory0 = null;
|
|
1097
|
+
cachedUint8ArrayMemory0 = null;
|
|
1098
|
+
if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) {
|
|
1099
|
+
throw new Error('invalid stack size');
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
wasm.__wbindgen_start(thread_stack_size);
|
|
1103
|
+
return wasm;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
async function __wbg_load(module, imports) {
|
|
1107
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1108
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1109
|
+
try {
|
|
1110
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1111
|
+
} catch (e) {
|
|
1112
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1113
|
+
|
|
1114
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1115
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1116
|
+
|
|
1117
|
+
} else { throw e; }
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
const bytes = await module.arrayBuffer();
|
|
1122
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1123
|
+
} else {
|
|
1124
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1125
|
+
|
|
1126
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1127
|
+
return { instance, module };
|
|
1128
|
+
} else {
|
|
1129
|
+
return instance;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
function expectedResponseType(type) {
|
|
1134
|
+
switch (type) {
|
|
1135
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1136
|
+
}
|
|
1137
|
+
return false;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
function initSync(module, memory) {
|
|
1142
|
+
if (wasm !== undefined) return wasm;
|
|
1143
|
+
|
|
1144
|
+
let thread_stack_size
|
|
1145
|
+
if (module !== undefined) {
|
|
1146
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1147
|
+
({module, memory, thread_stack_size} = module)
|
|
1148
|
+
} else {
|
|
1149
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
const imports = __wbg_get_imports(memory);
|
|
1154
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
1155
|
+
module = new WebAssembly.Module(module);
|
|
1156
|
+
}
|
|
1157
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
1158
|
+
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
async function __wbg_init(module_or_path, memory) {
|
|
1162
|
+
if (wasm !== undefined) return wasm;
|
|
1163
|
+
|
|
1164
|
+
let thread_stack_size
|
|
1165
|
+
if (module_or_path !== undefined) {
|
|
1166
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1167
|
+
({module_or_path, memory, thread_stack_size} = module_or_path)
|
|
1168
|
+
} else {
|
|
1169
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
if (module_or_path === undefined) {
|
|
1174
|
+
module_or_path = new URL('client_wasm_bg.wasm', import.meta.url);
|
|
1175
|
+
}
|
|
1176
|
+
const imports = __wbg_get_imports(memory);
|
|
1177
|
+
|
|
1178
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
1179
|
+
module_or_path = fetch(module_or_path);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1183
|
+
|
|
1184
|
+
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
export { initSync, __wbg_init as default };
|