rust-fetch 1.1.0 → 2.1.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/rust_fetch.js CHANGED
@@ -1,137 +1,1050 @@
1
- let wasm;
1
+ /* @ts-self-types="./rust_fetch.d.ts" */
2
2
 
3
- let WASM_VECTOR_LEN = 0;
3
+ export class IntoUnderlyingByteSource {
4
+ __destroy_into_raw() {
5
+ const ptr = this.__wbg_ptr;
6
+ this.__wbg_ptr = 0;
7
+ IntoUnderlyingByteSourceFinalization.unregister(this);
8
+ return ptr;
9
+ }
10
+ free() {
11
+ const ptr = this.__destroy_into_raw();
12
+ wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
13
+ }
14
+ /**
15
+ * @returns {number}
16
+ */
17
+ get autoAllocateChunkSize() {
18
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
19
+ return ret >>> 0;
20
+ }
21
+ cancel() {
22
+ const ptr = this.__destroy_into_raw();
23
+ wasm.intounderlyingbytesource_cancel(ptr);
24
+ }
25
+ /**
26
+ * @param {ReadableByteStreamController} controller
27
+ * @returns {Promise<any>}
28
+ */
29
+ pull(controller) {
30
+ const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
31
+ return ret;
32
+ }
33
+ /**
34
+ * @param {ReadableByteStreamController} controller
35
+ */
36
+ start(controller) {
37
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
38
+ }
39
+ /**
40
+ * @returns {ReadableStreamType}
41
+ */
42
+ get type() {
43
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
44
+ return __wbindgen_enum_ReadableStreamType[ret];
45
+ }
46
+ }
47
+ if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
4
48
 
5
- let cachedUint8ArrayMemory0 = null;
49
+ export class IntoUnderlyingSink {
50
+ __destroy_into_raw() {
51
+ const ptr = this.__wbg_ptr;
52
+ this.__wbg_ptr = 0;
53
+ IntoUnderlyingSinkFinalization.unregister(this);
54
+ return ptr;
55
+ }
56
+ free() {
57
+ const ptr = this.__destroy_into_raw();
58
+ wasm.__wbg_intounderlyingsink_free(ptr, 0);
59
+ }
60
+ /**
61
+ * @param {any} reason
62
+ * @returns {Promise<any>}
63
+ */
64
+ abort(reason) {
65
+ const ptr = this.__destroy_into_raw();
66
+ const ret = wasm.intounderlyingsink_abort(ptr, reason);
67
+ return ret;
68
+ }
69
+ /**
70
+ * @returns {Promise<any>}
71
+ */
72
+ close() {
73
+ const ptr = this.__destroy_into_raw();
74
+ const ret = wasm.intounderlyingsink_close(ptr);
75
+ return ret;
76
+ }
77
+ /**
78
+ * @param {any} chunk
79
+ * @returns {Promise<any>}
80
+ */
81
+ write(chunk) {
82
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
83
+ return ret;
84
+ }
85
+ }
86
+ if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
6
87
 
7
- function getUint8ArrayMemory0() {
8
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
88
+ export class IntoUnderlyingSource {
89
+ static __wrap(ptr) {
90
+ const obj = Object.create(IntoUnderlyingSource.prototype);
91
+ obj.__wbg_ptr = ptr;
92
+ IntoUnderlyingSourceFinalization.register(obj, obj.__wbg_ptr, obj);
93
+ return obj;
94
+ }
95
+ __destroy_into_raw() {
96
+ const ptr = this.__wbg_ptr;
97
+ this.__wbg_ptr = 0;
98
+ IntoUnderlyingSourceFinalization.unregister(this);
99
+ return ptr;
100
+ }
101
+ free() {
102
+ const ptr = this.__destroy_into_raw();
103
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
104
+ }
105
+ cancel() {
106
+ const ptr = this.__destroy_into_raw();
107
+ wasm.intounderlyingsource_cancel(ptr);
108
+ }
109
+ /**
110
+ * @param {ReadableStreamDefaultController} controller
111
+ * @returns {Promise<any>}
112
+ */
113
+ pull(controller) {
114
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
115
+ return ret;
10
116
  }
11
- return cachedUint8ArrayMemory0;
12
117
  }
118
+ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
13
119
 
14
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
120
+ /**
121
+ * HTTP client for JavaScript
122
+ */
123
+ export class WasmClient {
124
+ static __wrap(ptr) {
125
+ const obj = Object.create(WasmClient.prototype);
126
+ obj.__wbg_ptr = ptr;
127
+ WasmClientFinalization.register(obj, obj.__wbg_ptr, obj);
128
+ return obj;
129
+ }
130
+ __destroy_into_raw() {
131
+ const ptr = this.__wbg_ptr;
132
+ this.__wbg_ptr = 0;
133
+ WasmClientFinalization.unregister(this);
134
+ return ptr;
135
+ }
136
+ free() {
137
+ const ptr = this.__destroy_into_raw();
138
+ wasm.__wbg_wasmclient_free(ptr, 0);
139
+ }
140
+ /**
141
+ * Run `interceptor` on every request before it is sent; returns an id for `ejectInterceptor`
142
+ * @param {RequestInterceptor} interceptor
143
+ * @returns {number}
144
+ */
145
+ addRequestInterceptor(interceptor) {
146
+ const ret = wasm.wasmclient_addRequestInterceptor(this.__wbg_ptr, interceptor);
147
+ return ret >>> 0;
148
+ }
149
+ /**
150
+ * Run handlers on every settled request, like `promise.then(onFulfilled, onRejected)`;
151
+ * returns an id for `ejectInterceptor`
152
+ * @param {ResponseFulfilledInterceptor | null} [on_fulfilled]
153
+ * @param {ResponseRejectedInterceptor | null} [on_rejected]
154
+ * @returns {number}
155
+ */
156
+ addResponseInterceptor(on_fulfilled, on_rejected) {
157
+ const ret = wasm.wasmclient_addResponseInterceptor(this.__wbg_ptr, isLikeNone(on_fulfilled) ? 0 : addToExternrefTable0(on_fulfilled), isLikeNone(on_rejected) ? 0 : addToExternrefTable0(on_rejected));
158
+ return ret >>> 0;
159
+ }
160
+ /**
161
+ * Remove all interceptors
162
+ */
163
+ clearInterceptors() {
164
+ wasm.wasmclient_clearInterceptors(this.__wbg_ptr);
165
+ }
166
+ /**
167
+ * Make a DELETE request
168
+ * @param {string} url
169
+ * @param {RequestOptions | null} [options]
170
+ * @returns {Promise<HttpResponse>}
171
+ */
172
+ delete(url, options) {
173
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
174
+ const len0 = WASM_VECTOR_LEN;
175
+ const ret = wasm.wasmclient_delete(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
176
+ return ret;
177
+ }
178
+ /**
179
+ * Remove an interceptor; returns whether it was registered
180
+ * @param {number} id
181
+ * @returns {boolean}
182
+ */
183
+ ejectInterceptor(id) {
184
+ const ret = wasm.wasmclient_ejectInterceptor(this.__wbg_ptr, id);
185
+ return ret !== 0;
186
+ }
187
+ /**
188
+ * Make a request described by a `fetch`-style init object
189
+ * @param {string} url
190
+ * @param {FetchInit | null} [init]
191
+ * @returns {Promise<HttpResponse>}
192
+ */
193
+ fetch(url, init) {
194
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
195
+ const len0 = WASM_VECTOR_LEN;
196
+ const ret = wasm.wasmclient_fetch(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
197
+ return ret;
198
+ }
199
+ /**
200
+ * Make a GET request
201
+ * @param {string} url
202
+ * @param {RequestOptions | null} [options]
203
+ * @returns {Promise<HttpResponse>}
204
+ */
205
+ get(url, options) {
206
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
207
+ const len0 = WASM_VECTOR_LEN;
208
+ const ret = wasm.wasmclient_get(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
209
+ return ret;
210
+ }
211
+ /**
212
+ * Make a HEAD request
213
+ * @param {string} url
214
+ * @param {RequestOptions | null} [options]
215
+ * @returns {Promise<HttpResponse>}
216
+ */
217
+ head(url, options) {
218
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
219
+ const len0 = WASM_VECTOR_LEN;
220
+ const ret = wasm.wasmclient_head(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
221
+ return ret;
222
+ }
223
+ /**
224
+ * Create a new client
225
+ * @param {ClientOptions | null} [options]
226
+ */
227
+ constructor(options) {
228
+ const ret = wasm.wasmclient_new(isLikeNone(options) ? 0 : addToExternrefTable0(options));
229
+ if (ret[2]) {
230
+ throw takeFromExternrefTable0(ret[1]);
231
+ }
232
+ this.__wbg_ptr = ret[0];
233
+ WasmClientFinalization.register(this, this.__wbg_ptr, this);
234
+ return this;
235
+ }
236
+ /**
237
+ * Make a PATCH request; the body is taken from `init.body`
238
+ * @param {string} url
239
+ * @param {FetchInit | null} [init]
240
+ * @returns {Promise<HttpResponse>}
241
+ */
242
+ patch(url, init) {
243
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
244
+ const len0 = WASM_VECTOR_LEN;
245
+ const ret = wasm.wasmclient_patch(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
246
+ return ret;
247
+ }
248
+ /**
249
+ * Make a PATCH request with a JSON body
250
+ * @param {string} url
251
+ * @param {any} body
252
+ * @param {RequestOptions | null} [options]
253
+ * @returns {Promise<HttpResponse>}
254
+ */
255
+ patch_json(url, body, options) {
256
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
+ const len0 = WASM_VECTOR_LEN;
258
+ const ret = wasm.wasmclient_patch_json(this.__wbg_ptr, ptr0, len0, body, isLikeNone(options) ? 0 : addToExternrefTable0(options));
259
+ return ret;
260
+ }
261
+ /**
262
+ * Make a POST request; the body is taken from `init.body`
263
+ * @param {string} url
264
+ * @param {FetchInit | null} [init]
265
+ * @returns {Promise<HttpResponse>}
266
+ */
267
+ post(url, init) {
268
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
269
+ const len0 = WASM_VECTOR_LEN;
270
+ const ret = wasm.wasmclient_post(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
271
+ return ret;
272
+ }
273
+ /**
274
+ * Make a POST request with a JSON body
275
+ * @param {string} url
276
+ * @param {any} body
277
+ * @param {RequestOptions | null} [options]
278
+ * @returns {Promise<HttpResponse>}
279
+ */
280
+ post_json(url, body, options) {
281
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
+ const len0 = WASM_VECTOR_LEN;
283
+ const ret = wasm.wasmclient_post_json(this.__wbg_ptr, ptr0, len0, body, isLikeNone(options) ? 0 : addToExternrefTable0(options));
284
+ return ret;
285
+ }
286
+ /**
287
+ * Make a PUT request; the body is taken from `init.body`
288
+ * @param {string} url
289
+ * @param {FetchInit | null} [init]
290
+ * @returns {Promise<HttpResponse>}
291
+ */
292
+ put(url, init) {
293
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
294
+ const len0 = WASM_VECTOR_LEN;
295
+ const ret = wasm.wasmclient_put(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
296
+ return ret;
297
+ }
298
+ /**
299
+ * Make a PUT request with a JSON body
300
+ * @param {string} url
301
+ * @param {any} body
302
+ * @param {RequestOptions | null} [options]
303
+ * @returns {Promise<HttpResponse>}
304
+ */
305
+ put_json(url, body, options) {
306
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
307
+ const len0 = WASM_VECTOR_LEN;
308
+ const ret = wasm.wasmclient_put_json(this.__wbg_ptr, ptr0, len0, body, isLikeNone(options) ? 0 : addToExternrefTable0(options));
309
+ return ret;
310
+ }
311
+ /**
312
+ * Make a request with any method, headers and body
313
+ * @param {string} method
314
+ * @param {string} url
315
+ * @param {HeadersLike | null} [headers]
316
+ * @param {RequestBody | null} [body]
317
+ * @param {RequestOptions | null} [options]
318
+ * @returns {Promise<HttpResponse>}
319
+ */
320
+ request(method, url, headers, body, options) {
321
+ const ptr0 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
322
+ const len0 = WASM_VECTOR_LEN;
323
+ const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
324
+ const len1 = WASM_VECTOR_LEN;
325
+ const ret = wasm.wasmclient_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(headers) ? 0 : addToExternrefTable0(headers), isLikeNone(body) ? 0 : addToExternrefTable0(body), isLikeNone(options) ? 0 : addToExternrefTable0(options));
326
+ return ret;
327
+ }
328
+ }
329
+ if (Symbol.dispose) WasmClient.prototype[Symbol.dispose] = WasmClient.prototype.free;
15
330
 
16
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
17
- ? function (arg, view) {
18
- return cachedTextEncoder.encodeInto(arg, view);
331
+ /**
332
+ * Create a configured HTTP client (exported for advanced use)
333
+ * @returns {WasmClient}
334
+ */
335
+ export function create_client() {
336
+ const ret = wasm.create_client();
337
+ if (ret[2]) {
338
+ throw takeFromExternrefTable0(ret[1]);
339
+ }
340
+ return WasmClient.__wrap(ret[0]);
19
341
  }
20
- : function (arg, view) {
21
- const buf = cachedTextEncoder.encode(arg);
22
- view.set(buf);
23
- return {
24
- read: arg.length,
25
- written: buf.length
26
- };
27
- });
28
342
 
29
- function passStringToWasm0(arg, malloc, realloc) {
343
+ /**
344
+ * Fetch a URL and parse the body as JSON (whatever its Content-Type).
345
+ * An empty body resolves to `null`.
346
+ * @param {string} url
347
+ * @returns {Promise<any>}
348
+ */
349
+ export function fetch_json(url) {
350
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
351
+ const len0 = WASM_VECTOR_LEN;
352
+ const ret = wasm.fetch_json(ptr0, len0);
353
+ return ret;
354
+ }
30
355
 
31
- if (realloc === undefined) {
32
- const buf = cachedTextEncoder.encode(arg);
33
- const ptr = malloc(buf.length, 1) >>> 0;
34
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
35
- WASM_VECTOR_LEN = buf.length;
36
- return ptr;
37
- }
356
+ /**
357
+ * Fetch JSON data and return as a Promise
358
+ * @param {string} url
359
+ * @returns {Promise<any>}
360
+ */
361
+ export function fetch_json_promise(url) {
362
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
363
+ const len0 = WASM_VECTOR_LEN;
364
+ const ret = wasm.fetch_json_promise(ptr0, len0);
365
+ return ret;
366
+ }
38
367
 
39
- let len = arg.length;
40
- let ptr = malloc(len, 1) >>> 0;
368
+ /**
369
+ * Fetch a URL and return the body as text
370
+ * @param {string} url
371
+ * @returns {Promise<string>}
372
+ */
373
+ export function fetch_text(url) {
374
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
375
+ const len0 = WASM_VECTOR_LEN;
376
+ const ret = wasm.fetch_text(ptr0, len0);
377
+ return ret;
378
+ }
41
379
 
42
- const mem = getUint8ArrayMemory0();
380
+ /**
381
+ * Fetch API data (deprecated, use fetch_json instead)
382
+ * @param {string} url
383
+ * @returns {Promise<any>}
384
+ */
385
+ export function fetch_wasm_api(url) {
386
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
387
+ const len0 = WASM_VECTOR_LEN;
388
+ const ret = wasm.fetch_wasm_api(ptr0, len0);
389
+ return ret;
390
+ }
43
391
 
44
- let offset = 0;
392
+ /**
393
+ * Fetch HTML data (deprecated, use fetch_text instead)
394
+ * @param {string} url
395
+ * @returns {Promise<string>}
396
+ */
397
+ export function fetch_wasm_html(url) {
398
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
399
+ const len0 = WASM_VECTOR_LEN;
400
+ const ret = wasm.fetch_wasm_html(ptr0, len0);
401
+ return ret;
402
+ }
45
403
 
46
- for (; offset < len; offset++) {
47
- const code = arg.charCodeAt(offset);
48
- if (code > 0x7F) break;
49
- mem[ptr + offset] = code;
50
- }
404
+ /**
405
+ * Fetch JSON data (deprecated, use fetch_json instead)
406
+ * @param {string} url
407
+ * @returns {Promise<any>}
408
+ */
409
+ export function fetch_wasm_json(url) {
410
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
411
+ const len0 = WASM_VECTOR_LEN;
412
+ const ret = wasm.fetch_wasm_json(ptr0, len0);
413
+ return ret;
414
+ }
51
415
 
52
- if (offset !== len) {
53
- if (offset !== 0) {
54
- arg = arg.slice(offset);
55
- }
56
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
57
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
58
- const ret = encodeString(arg, view);
416
+ /**
417
+ * Fetch data and return as map (deprecated, use fetch_json instead)
418
+ * @param {string} url
419
+ * @returns {Promise<any>}
420
+ */
421
+ export function fetch_wasm_map(url) {
422
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
423
+ const len0 = WASM_VECTOR_LEN;
424
+ const ret = wasm.fetch_wasm_map(ptr0, len0);
425
+ return ret;
426
+ }
59
427
 
60
- offset += ret.written;
61
- ptr = realloc(ptr, len, offset, 1) >>> 0;
62
- }
428
+ /**
429
+ * Fetch with a method, headers and an optional string body.
430
+ *
431
+ * Resolves to `{ status, statusText, ok, url, headers, body }`.
432
+ * @param {string} url
433
+ * @param {string} method
434
+ * @param {any} headers
435
+ * @param {string | null} [body]
436
+ * @returns {Promise<any>}
437
+ */
438
+ export function fetch_with_options(url, method, headers, body) {
439
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
440
+ const len0 = WASM_VECTOR_LEN;
441
+ const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
442
+ const len1 = WASM_VECTOR_LEN;
443
+ var ptr2 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
444
+ var len2 = WASM_VECTOR_LEN;
445
+ const ret = wasm.fetch_with_options(ptr0, len0, ptr1, len1, headers, ptr2, len2);
446
+ return ret;
447
+ }
448
+ function __wbg_get_imports() {
449
+ const import0 = {
450
+ __proto__: null,
451
+ __wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
452
+ const v = arg0;
453
+ const ret = typeof(v) === 'boolean' ? v : undefined;
454
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
455
+ },
456
+ __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
457
+ const ret = debugString(arg1);
458
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
459
+ const len1 = WASM_VECTOR_LEN;
460
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
461
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
462
+ },
463
+ __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
464
+ const ret = typeof(arg0) === 'function';
465
+ return ret;
466
+ },
467
+ __wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
468
+ const ret = arg0 === null;
469
+ return ret;
470
+ },
471
+ __wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
472
+ const val = arg0;
473
+ const ret = typeof(val) === 'object' && val !== null;
474
+ return ret;
475
+ },
476
+ __wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
477
+ const ret = arg0 === undefined;
478
+ return ret;
479
+ },
480
+ __wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
481
+ const obj = arg1;
482
+ const ret = typeof(obj) === 'number' ? obj : undefined;
483
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
484
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
485
+ },
486
+ __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
487
+ const obj = arg1;
488
+ const ret = typeof(obj) === 'string' ? obj : undefined;
489
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
490
+ var len1 = WASM_VECTOR_LEN;
491
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
492
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
493
+ },
494
+ __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
495
+ throw new Error(getStringFromWasm0(arg0, arg1));
496
+ },
497
+ __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
498
+ arg0._wbg_cb_unref();
499
+ },
500
+ __wbg_abort_334e7f918b7c5047: function(arg0, arg1) {
501
+ arg0.abort(arg1);
502
+ },
503
+ __wbg_abort_f78b99d80248bacb: function(arg0) {
504
+ arg0.abort();
505
+ },
506
+ __wbg_aborted_5b2b5f06b5e59fde: function(arg0) {
507
+ const ret = arg0.aborted;
508
+ return ret;
509
+ },
510
+ __wbg_addEventListener_4d0db17c671ea324: function() { return handleError(function (arg0, arg1, arg2, arg3) {
511
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
512
+ }, arguments); },
513
+ __wbg_append_1938ed58fb5613b8: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
514
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
515
+ }, arguments); },
516
+ __wbg_arrayBuffer_f07be74819944ea2: function() { return handleError(function (arg0) {
517
+ const ret = arg0.arrayBuffer();
518
+ return ret;
519
+ }, arguments); },
520
+ __wbg_body_4e088733babc630d: function(arg0) {
521
+ const ret = arg0.body;
522
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
523
+ },
524
+ __wbg_buffer_56ec2905a66f58b9: function(arg0) {
525
+ const ret = arg0.buffer;
526
+ return ret;
527
+ },
528
+ __wbg_byobRequest_54f7ce41d584549a: function(arg0) {
529
+ const ret = arg0.byobRequest;
530
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
531
+ },
532
+ __wbg_byteLength_27689b065d089962: function(arg0) {
533
+ const ret = arg0.byteLength;
534
+ return ret;
535
+ },
536
+ __wbg_byteLength_9f985b8373f1f3fe: function(arg0) {
537
+ const ret = arg0.byteLength;
538
+ return ret;
539
+ },
540
+ __wbg_byteOffset_0bd5a6a03553639c: function(arg0) {
541
+ const ret = arg0.byteOffset;
542
+ return ret;
543
+ },
544
+ __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
545
+ const ret = arg0.call(arg1, arg2);
546
+ return ret;
547
+ }, arguments); },
548
+ __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
549
+ const ret = arg0.call(arg1);
550
+ return ret;
551
+ }, arguments); },
552
+ __wbg_cancel_7c2a08c8db4c73f3: function(arg0) {
553
+ const ret = arg0.cancel();
554
+ return ret;
555
+ },
556
+ __wbg_catch_92594c2d17f55f12: function(arg0, arg1) {
557
+ const ret = arg0.catch(arg1);
558
+ return ret;
559
+ },
560
+ __wbg_clearTimeout_1daad5c6ee4fcd3b: function(arg0) {
561
+ const ret = clearTimeout(arg0);
562
+ return ret;
563
+ },
564
+ __wbg_clearTimeout_2d18004c33139d44: function(arg0) {
565
+ clearTimeout(arg0);
566
+ },
567
+ __wbg_close_185286988f30f252: function() { return handleError(function (arg0) {
568
+ arg0.close();
569
+ }, arguments); },
570
+ __wbg_close_748f26698dabe269: function() { return handleError(function (arg0) {
571
+ arg0.close();
572
+ }, arguments); },
573
+ __wbg_decode_0be77be735437c76: function() { return handleError(function (arg0, arg1) {
574
+ const ret = arg0.decode(arg1);
575
+ return ret;
576
+ }, arguments); },
577
+ __wbg_done_b41a1d26cdb37fb6: function(arg0) {
578
+ const ret = arg0.done;
579
+ return ret;
580
+ },
581
+ __wbg_enqueue_4a01c128f9a0de16: function() { return handleError(function (arg0, arg1) {
582
+ arg0.enqueue(arg1);
583
+ }, arguments); },
584
+ __wbg_entries_b55ec7e0dc443355: function(arg0) {
585
+ const ret = arg0.entries();
586
+ return ret;
587
+ },
588
+ __wbg_entries_fb6397112b1de25f: function(arg0) {
589
+ const ret = Object.entries(arg0);
590
+ return ret;
591
+ },
592
+ __wbg_fetch_43bae44b7171a171: function() { return handleError(function (arg0) {
593
+ const ret = fetch(arg0);
594
+ return ret;
595
+ }, arguments); },
596
+ __wbg_fetch_7a37768ab67c5bd8: function(arg0) {
597
+ const ret = fetch(arg0);
598
+ return ret;
599
+ },
600
+ __wbg_fetch_efc64baf325b084d: function(arg0, arg1) {
601
+ const ret = arg0.fetch(arg1);
602
+ return ret;
603
+ },
604
+ __wbg_for_beb5dc4e908dd8b8: function(arg0, arg1) {
605
+ const ret = Symbol.for(getStringFromWasm0(arg0, arg1));
606
+ return ret;
607
+ },
608
+ __wbg_fromEntries_5159142be68954c3: function() { return handleError(function (arg0) {
609
+ const ret = Object.fromEntries(arg0);
610
+ return ret;
611
+ }, arguments); },
612
+ __wbg_from_296ca31f8d0f1c52: function(arg0) {
613
+ const ret = Array.from(arg0);
614
+ return ret;
615
+ },
616
+ __wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
617
+ const ret = arg0.getReader();
618
+ return ret;
619
+ }, arguments); },
620
+ __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
621
+ const ret = Reflect.get(arg0, arg1);
622
+ return ret;
623
+ }, arguments); },
624
+ __wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
625
+ const ret = Reflect.get(arg0, arg1);
626
+ return ret;
627
+ }, arguments); },
628
+ __wbg_get_6c896e0571ddae51: function(arg0, arg1) {
629
+ const ret = arg0[arg1 >>> 0];
630
+ return ret;
631
+ },
632
+ __wbg_get_done_7020b91c987365c7: function(arg0) {
633
+ const ret = arg0.done;
634
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
635
+ },
636
+ __wbg_get_f75619e20cb68514: function() { return handleError(function (arg0, arg1, arg2, arg3) {
637
+ const ret = arg1.get(getStringFromWasm0(arg2, arg3));
638
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
639
+ var len1 = WASM_VECTOR_LEN;
640
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
641
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
642
+ }, arguments); },
643
+ __wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
644
+ const ret = arg0[arg1 >>> 0];
645
+ return ret;
646
+ },
647
+ __wbg_get_value_87fbd6ad1283f2e7: function(arg0) {
648
+ const ret = arg0.value;
649
+ return ret;
650
+ },
651
+ __wbg_has_5d6706e5209576c1: function() { return handleError(function (arg0, arg1) {
652
+ const ret = Reflect.has(arg0, arg1);
653
+ return ret;
654
+ }, arguments); },
655
+ __wbg_headers_eba93595f8944c2f: function(arg0) {
656
+ const ret = arg0.headers;
657
+ return ret;
658
+ },
659
+ __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
660
+ let result;
661
+ try {
662
+ result = arg0 instanceof ArrayBuffer;
663
+ } catch (_) {
664
+ result = false;
665
+ }
666
+ const ret = result;
667
+ return ret;
668
+ },
669
+ __wbg_instanceof_Response_b8758567269c30b2: function(arg0) {
670
+ let result;
671
+ try {
672
+ result = arg0 instanceof Response;
673
+ } catch (_) {
674
+ result = false;
675
+ }
676
+ const ret = result;
677
+ return ret;
678
+ },
679
+ __wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
680
+ const ret = Array.isArray(arg0);
681
+ return ret;
682
+ },
683
+ __wbg_isPrototypeOf_59fbabb5a4f3f1ff: function(arg0, arg1) {
684
+ const ret = arg0.isPrototypeOf(arg1);
685
+ return ret;
686
+ },
687
+ __wbg_isView_87b70d94ddaa60d3: function(arg0) {
688
+ const ret = ArrayBuffer.isView(arg0);
689
+ return ret;
690
+ },
691
+ __wbg_iterator_e3c31c892080e444: function() {
692
+ const ret = Symbol.iterator;
693
+ return ret;
694
+ },
695
+ __wbg_length_7f3c00c40364105e: function(arg0) {
696
+ const ret = arg0.length;
697
+ return ret;
698
+ },
699
+ __wbg_length_d4bdea10311bd9cf: function(arg0) {
700
+ const ret = arg0.length;
701
+ return ret;
702
+ },
703
+ __wbg_new_1dbf7428bba60a42: function(arg0) {
704
+ const ret = new Uint8Array(arg0);
705
+ return ret;
706
+ },
707
+ __wbg_new_2e41357094e99294: function() { return handleError(function () {
708
+ const ret = new AbortController();
709
+ return ret;
710
+ }, arguments); },
711
+ __wbg_new_343a093a3c2ffb4e: function(arg0, arg1) {
712
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
713
+ return ret;
714
+ },
715
+ __wbg_new_5502aad30c185fc8: function(arg0, arg1) {
716
+ try {
717
+ var state0 = {a: arg0, b: arg1};
718
+ var cb0 = (arg0, arg1) => {
719
+ const a = state0.a;
720
+ state0.a = 0;
721
+ try {
722
+ return wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined_______true_(a, state0.b, arg0, arg1);
723
+ } finally {
724
+ state0.a = a;
725
+ }
726
+ };
727
+ const ret = new Promise(cb0);
728
+ return ret;
729
+ } finally {
730
+ state0.a = 0;
731
+ }
732
+ },
733
+ __wbg_new_617a8cdb8bb1130e: function() {
734
+ const ret = new Object();
735
+ return ret;
736
+ },
737
+ __wbg_new_83ca405eae412a62: function() { return handleError(function () {
738
+ const ret = new Headers();
739
+ return ret;
740
+ }, arguments); },
741
+ __wbg_new_cdac6c2ae368ec54: function() {
742
+ const ret = new TextDecoder();
743
+ return ret;
744
+ },
745
+ __wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
746
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
747
+ return ret;
748
+ },
749
+ __wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
750
+ try {
751
+ var state0 = {a: arg0, b: arg1};
752
+ var cb0 = (arg0, arg1) => {
753
+ const a = state0.a;
754
+ state0.a = 0;
755
+ try {
756
+ return wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined_______true_(a, state0.b, arg0, arg1);
757
+ } finally {
758
+ state0.a = a;
759
+ }
760
+ };
761
+ const ret = new Promise(cb0);
762
+ return ret;
763
+ } finally {
764
+ state0.a = 0;
765
+ }
766
+ },
767
+ __wbg_new_with_byte_offset_and_length_2f5d7fc2a828b74d: function(arg0, arg1, arg2) {
768
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
769
+ return ret;
770
+ },
771
+ __wbg_new_with_into_underlying_source_fd904252f385f59c: function(arg0, arg1) {
772
+ const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
773
+ return ret;
774
+ },
775
+ __wbg_new_with_length_3da0ad195f6f63ba: function(arg0) {
776
+ const ret = new Uint8Array(arg0 >>> 0);
777
+ return ret;
778
+ },
779
+ __wbg_new_with_str_and_init_4618dee4e950224f: function() { return handleError(function (arg0, arg1, arg2) {
780
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
781
+ return ret;
782
+ }, arguments); },
783
+ __wbg_next_33784799010f1bbe: function(arg0) {
784
+ const ret = arg0.next;
785
+ return ret;
786
+ },
787
+ __wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
788
+ const ret = arg0.next();
789
+ return ret;
790
+ }, arguments); },
791
+ __wbg_of_20798cb14708764f: function(arg0, arg1) {
792
+ const ret = Array.of(arg0, arg1);
793
+ return ret;
794
+ },
795
+ __wbg_parse_0fc53dead14b3b42: function() { return handleError(function (arg0, arg1) {
796
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
797
+ return ret;
798
+ }, arguments); },
799
+ __wbg_parse_33ce4953982abfa3: function() { return handleError(function (arg0) {
800
+ const ret = JSON.parse(arg0);
801
+ return ret;
802
+ }, arguments); },
803
+ __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
804
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
805
+ },
806
+ __wbg_push_2baf45db356cf468: function(arg0, arg1) {
807
+ const ret = arg0.push(arg1);
808
+ return ret;
809
+ },
810
+ __wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
811
+ const ret = arg0.queueMicrotask;
812
+ return ret;
813
+ },
814
+ __wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
815
+ queueMicrotask(arg0);
816
+ },
817
+ __wbg_random_5a4cafd2f02395ff: function() {
818
+ const ret = Math.random();
819
+ return ret;
820
+ },
821
+ __wbg_read_2a943774344c9728: function(arg0) {
822
+ const ret = arg0.read();
823
+ return ret;
824
+ },
825
+ __wbg_reject_1548d2ad77237dc9: function(arg0) {
826
+ const ret = Promise.reject(arg0);
827
+ return ret;
828
+ },
829
+ __wbg_releaseLock_eb64cd83aa9fcfe4: function(arg0) {
830
+ arg0.releaseLock();
831
+ },
832
+ __wbg_removeEventListener_6e68185345978771: function() { return handleError(function (arg0, arg1, arg2, arg3) {
833
+ arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
834
+ }, arguments); },
835
+ __wbg_resolve_0076e10020304ede: function(arg0) {
836
+ const ret = Promise.resolve(arg0);
837
+ return ret;
838
+ },
839
+ __wbg_respond_c102fabcc79e5ef0: function() { return handleError(function (arg0, arg1) {
840
+ arg0.respond(arg1 >>> 0);
841
+ }, arguments); },
842
+ __wbg_setTimeout_61cdece84a7288cf: function(arg0, arg1) {
843
+ const ret = setTimeout(arg0, arg1);
844
+ return ret;
845
+ },
846
+ __wbg_setTimeout_b4a9096784635514: function(arg0, arg1) {
847
+ const ret = setTimeout(arg0, arg1);
848
+ return ret;
849
+ },
850
+ __wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
851
+ const ret = Reflect.set(arg0, arg1, arg2);
852
+ return ret;
853
+ }, arguments); },
854
+ __wbg_set_575d3ddb70fe831d: function(arg0, arg1, arg2) {
855
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
856
+ },
857
+ __wbg_set_af5932e3f78b5648: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
858
+ arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
859
+ }, arguments); },
860
+ __wbg_set_body_1fb0f1008bfc7df6: function(arg0, arg1) {
861
+ arg0.body = arg1;
862
+ },
863
+ __wbg_set_cache_7507c4cc5938ccc7: function(arg0, arg1) {
864
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
865
+ },
866
+ __wbg_set_credentials_e0dcce31ca532b7d: function(arg0, arg1) {
867
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
868
+ },
869
+ __wbg_set_headers_40ad33dcf016613f: function(arg0, arg1) {
870
+ arg0.headers = arg1;
871
+ },
872
+ __wbg_set_high_water_mark_3a96edf83df7e06c: function(arg0, arg1) {
873
+ arg0.highWaterMark = arg1;
874
+ },
875
+ __wbg_set_method_dcb32343247ec427: function(arg0, arg1, arg2) {
876
+ arg0.method = getStringFromWasm0(arg1, arg2);
877
+ },
878
+ __wbg_set_mode_74e772635acb96ec: function(arg0, arg1) {
879
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
880
+ },
881
+ __wbg_set_name_2c630595dc90a7aa: function(arg0, arg1, arg2) {
882
+ arg0.name = getStringFromWasm0(arg1, arg2);
883
+ },
884
+ __wbg_set_referrer_efd0fb956d6b70b2: function(arg0, arg1, arg2) {
885
+ arg0.referrer = getStringFromWasm0(arg1, arg2);
886
+ },
887
+ __wbg_set_referrer_policy_465382f52c1a03d3: function(arg0, arg1) {
888
+ arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
889
+ },
890
+ __wbg_set_signal_2dbd377604627f26: function(arg0, arg1) {
891
+ arg0.signal = arg1;
892
+ },
893
+ __wbg_signal_e5a49a2d9c65b7f6: function(arg0) {
894
+ const ret = arg0.signal;
895
+ return ret;
896
+ },
897
+ __wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
898
+ const ret = typeof global === 'undefined' ? null : global;
899
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
900
+ },
901
+ __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
902
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
903
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
904
+ },
905
+ __wbg_static_accessor_SELF_0b583911f537483a: function() {
906
+ const ret = typeof self === 'undefined' ? null : self;
907
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
908
+ },
909
+ __wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
910
+ const ret = typeof window === 'undefined' ? null : window;
911
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
912
+ },
913
+ __wbg_status_ce0a98d3c57125f3: function(arg0) {
914
+ const ret = arg0.status;
915
+ return ret;
916
+ },
917
+ __wbg_stringify_52ff602c1cc4fbb6: function() { return handleError(function (arg0) {
918
+ const ret = JSON.stringify(arg0);
919
+ return ret;
920
+ }, arguments); },
921
+ __wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
922
+ const ret = arg0.then(arg1, arg2);
923
+ return ret;
924
+ },
925
+ __wbg_then_e71170d78fcf8954: function(arg0, arg1) {
926
+ const ret = arg0.then(arg1);
927
+ return ret;
928
+ },
929
+ __wbg_toString_0a6162345e699dea: function(arg0) {
930
+ const ret = arg0.toString();
931
+ return ret;
932
+ },
933
+ __wbg_toString_aad181a510c306d8: function() { return handleError(function (arg0, arg1) {
934
+ const ret = arg0.toString(arg1);
935
+ return ret;
936
+ }, arguments); },
937
+ __wbg_url_8e28edeab4cd6bed: function(arg0, arg1) {
938
+ const ret = arg1.url;
939
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
940
+ const len1 = WASM_VECTOR_LEN;
941
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
942
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
943
+ },
944
+ __wbg_value_f3c585ee8f5ba40c: function(arg0) {
945
+ const ret = arg0.value;
946
+ return ret;
947
+ },
948
+ __wbg_view_9c570f33e8d6ab96: function(arg0) {
949
+ const ret = arg0.view;
950
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
951
+ },
952
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
953
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 220, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
954
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_);
955
+ return ret;
956
+ },
957
+ __wbindgen_generic_0000000000000002: function(arg0, arg1) {
958
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 340, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
959
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_6b82e471f4a4091b___JsError___true_);
960
+ return ret;
961
+ },
962
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
963
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 185, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
964
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_);
965
+ return ret;
966
+ },
967
+ __wbindgen_generic_0000000000000004: function(arg0) {
968
+ // Cast intrinsic for `F64 -> Externref`.
969
+ const ret = arg0;
970
+ return ret;
971
+ },
972
+ __wbindgen_generic_0000000000000005: function(arg0, arg1) {
973
+ // Cast intrinsic for `Ref(String) -> Externref`.
974
+ const ret = getStringFromWasm0(arg0, arg1);
975
+ return ret;
976
+ },
977
+ __wbindgen_init_externref_table: function() {
978
+ const table = wasm.__wbindgen_externrefs;
979
+ const offset = table.grow(4);
980
+ table.set(0, undefined);
981
+ table.set(offset + 0, undefined);
982
+ table.set(offset + 1, null);
983
+ table.set(offset + 2, true);
984
+ table.set(offset + 3, false);
985
+ },
986
+ };
987
+ return {
988
+ __proto__: null,
989
+ "./rust_fetch_bg.js": import0,
990
+ };
991
+ }
63
992
 
64
- WASM_VECTOR_LEN = offset;
65
- return ptr;
993
+ function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_(arg0, arg1) {
994
+ wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_(arg0, arg1);
66
995
  }
67
996
 
68
- let cachedDataViewMemory0 = null;
997
+ function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_(arg0, arg1, arg2) {
998
+ wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_(arg0, arg1, arg2);
999
+ }
69
1000
 
70
- function getDataViewMemory0() {
71
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
72
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1001
+ function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_6b82e471f4a4091b___JsError___true_(arg0, arg1, arg2) {
1002
+ const ret = wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_6b82e471f4a4091b___JsError___true_(arg0, arg1, arg2);
1003
+ if (ret[1]) {
1004
+ throw takeFromExternrefTable0(ret[0]);
73
1005
  }
74
- return cachedDataViewMemory0;
75
1006
  }
76
1007
 
77
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
1008
+ function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
1009
+ wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined___js_sys_6c670598d03a71fc___Function_fn_wasm_bindgen_6b82e471f4a4091b___JsValue_____wasm_bindgen_6b82e471f4a4091b___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
1010
+ }
78
1011
 
79
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
80
1012
 
81
- function getStringFromWasm0(ptr, len) {
82
- ptr = ptr >>> 0;
83
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
84
- }
1013
+ const __wbindgen_enum_ReadableStreamType = ["bytes"];
1014
+
1015
+
1016
+ const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
1017
+
1018
+
1019
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
1020
+
1021
+
1022
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
1023
+
1024
+
1025
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
1026
+ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1027
+ ? { register: () => {}, unregister: () => {} }
1028
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
1029
+ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
1030
+ ? { register: () => {}, unregister: () => {} }
1031
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
1032
+ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1033
+ ? { register: () => {}, unregister: () => {} }
1034
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
1035
+ const WasmClientFinalization = (typeof FinalizationRegistry === 'undefined')
1036
+ ? { register: () => {}, unregister: () => {} }
1037
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmclient_free(ptr, 1));
85
1038
 
86
1039
  function addToExternrefTable0(obj) {
87
1040
  const idx = wasm.__externref_table_alloc();
88
- wasm.__wbindgen_export_4.set(idx, obj);
1041
+ wasm.__wbindgen_externrefs.set(idx, obj);
89
1042
  return idx;
90
1043
  }
91
1044
 
92
- function handleError(f, args) {
93
- try {
94
- return f.apply(this, args);
95
- } catch (e) {
96
- const idx = addToExternrefTable0(e);
97
- wasm.__wbindgen_exn_store(idx);
98
- }
99
- }
100
-
101
- function isLikeNone(x) {
102
- return x === undefined || x === null;
103
- }
104
-
105
1045
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
106
1046
  ? { register: () => {}, unregister: () => {} }
107
- : new FinalizationRegistry(state => {
108
- wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
109
- });
110
-
111
- function makeMutClosure(arg0, arg1, dtor, f) {
112
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
113
- const real = (...args) => {
114
- // First up with a closure we increment the internal reference
115
- // count. This ensures that the Rust closure environment won't
116
- // be deallocated while we're invoking it.
117
- state.cnt++;
118
- const a = state.a;
119
- state.a = 0;
120
- try {
121
- return f(a, state.b, ...args);
122
- } finally {
123
- if (--state.cnt === 0) {
124
- wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
125
- CLOSURE_DTORS.unregister(state);
126
- } else {
127
- state.a = a;
128
- }
129
- }
130
- };
131
- real.original = state;
132
- CLOSURE_DTORS.register(real, state, state);
133
- return real;
134
- }
1047
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
135
1048
 
136
1049
  function debugString(val) {
137
1050
  // primitive types
@@ -198,739 +1111,199 @@ function debugString(val) {
198
1111
  return className;
199
1112
  }
200
1113
 
201
- function takeFromExternrefTable0(idx) {
202
- const value = wasm.__wbindgen_export_4.get(idx);
203
- wasm.__externref_table_dealloc(idx);
204
- return value;
205
- }
206
- /**
207
- * Simple fetch function for JSON data
208
- * @param {string} url
209
- * @returns {Promise<any>}
210
- */
211
- export function fetch_json(url) {
212
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
213
- const len0 = WASM_VECTOR_LEN;
214
- const ret = wasm.fetch_json(ptr0, len0);
215
- return ret;
216
- }
217
-
218
- /**
219
- * Fetch JSON data and return as a Promise
220
- * @param {string} url
221
- * @returns {Promise<any>}
222
- */
223
- export function fetch_json_promise(url) {
224
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
225
- const len0 = WASM_VECTOR_LEN;
226
- const ret = wasm.fetch_json_promise(ptr0, len0);
227
- return ret;
228
- }
229
-
230
- /**
231
- * Simple fetch function for text/HTML data
232
- * @param {string} url
233
- * @returns {Promise<string>}
234
- */
235
- export function fetch_text(url) {
236
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
237
- const len0 = WASM_VECTOR_LEN;
238
- const ret = wasm.fetch_text(ptr0, len0);
239
- return ret;
240
- }
241
-
242
- /**
243
- * Advanced fetch function with full options
244
- * @param {string} url
245
- * @param {string} method
246
- * @param {any} headers
247
- * @param {string | undefined} [body]
248
- * @returns {Promise<any>}
249
- */
250
- export function fetch_with_options(url, method, headers, body) {
251
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
252
- const len0 = WASM_VECTOR_LEN;
253
- const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
254
- const len1 = WASM_VECTOR_LEN;
255
- var ptr2 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
256
- var len2 = WASM_VECTOR_LEN;
257
- const ret = wasm.fetch_with_options(ptr0, len0, ptr1, len1, headers, ptr2, len2);
258
- return ret;
1114
+ function getArrayU8FromWasm0(ptr, len) {
1115
+ ptr = ptr >>> 0;
1116
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
259
1117
  }
260
1118
 
261
- /**
262
- * Create a configured HTTP client (exported for advanced use)
263
- * @returns {WasmClient}
264
- */
265
- export function create_client() {
266
- const ret = wasm.create_client();
267
- if (ret[2]) {
268
- throw takeFromExternrefTable0(ret[1]);
1119
+ let cachedDataViewMemory0 = null;
1120
+ function getDataViewMemory0() {
1121
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1122
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
269
1123
  }
270
- return WasmClient.__wrap(ret[0]);
1124
+ return cachedDataViewMemory0;
271
1125
  }
272
1126
 
273
- /**
274
- * Fetch JSON data (deprecated, use fetch_json instead)
275
- * @param {string} url
276
- * @returns {Promise<any>}
277
- */
278
- export function fetch_wasm_json(url) {
279
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
280
- const len0 = WASM_VECTOR_LEN;
281
- const ret = wasm.fetch_wasm_json(ptr0, len0);
282
- return ret;
1127
+ function getStringFromWasm0(ptr, len) {
1128
+ return decodeText(ptr >>> 0, len);
283
1129
  }
284
1130
 
285
- /**
286
- * Fetch HTML data (deprecated, use fetch_text instead)
287
- * @param {string} url
288
- * @returns {Promise<string>}
289
- */
290
- export function fetch_wasm_html(url) {
291
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
292
- const len0 = WASM_VECTOR_LEN;
293
- const ret = wasm.fetch_wasm_html(ptr0, len0);
294
- return ret;
1131
+ let cachedUint8ArrayMemory0 = null;
1132
+ function getUint8ArrayMemory0() {
1133
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1134
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1135
+ }
1136
+ return cachedUint8ArrayMemory0;
295
1137
  }
296
1138
 
297
- /**
298
- * Fetch data and return as map (deprecated, use fetch_json instead)
299
- * @param {string} url
300
- * @returns {Promise<any>}
301
- */
302
- export function fetch_wasm_map(url) {
303
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
304
- const len0 = WASM_VECTOR_LEN;
305
- const ret = wasm.fetch_wasm_map(ptr0, len0);
306
- return ret;
1139
+ function handleError(f, args) {
1140
+ try {
1141
+ return f.apply(this, args);
1142
+ } catch (e) {
1143
+ const idx = addToExternrefTable0(e);
1144
+ wasm.__wbindgen_exn_store(idx);
1145
+ }
307
1146
  }
308
1147
 
309
- /**
310
- * Fetch API data (deprecated, use fetch_json instead)
311
- * @param {string} url
312
- * @returns {Promise<any>}
313
- */
314
- export function fetch_wasm_api(url) {
315
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
316
- const len0 = WASM_VECTOR_LEN;
317
- const ret = wasm.fetch_wasm_api(ptr0, len0);
318
- return ret;
1148
+ function isLikeNone(x) {
1149
+ return x === undefined || x === null;
319
1150
  }
320
1151
 
321
- function __wbg_adapter_52(arg0, arg1, arg2) {
322
- wasm.closure260_externref_shim(arg0, arg1, arg2);
323
- }
1152
+ function makeMutClosure(arg0, arg1, f) {
1153
+ const state = { a: arg0, b: arg1, cnt: 1 };
1154
+ const real = (...args) => {
324
1155
 
325
- function __wbg_adapter_164(arg0, arg1, arg2, arg3) {
326
- wasm.closure282_externref_shim(arg0, arg1, arg2, arg3);
1156
+ // First up with a closure we increment the internal reference
1157
+ // count. This ensures that the Rust closure environment won't
1158
+ // be deallocated while we're invoking it.
1159
+ state.cnt++;
1160
+ const a = state.a;
1161
+ state.a = 0;
1162
+ try {
1163
+ return f(a, state.b, ...args);
1164
+ } finally {
1165
+ state.a = a;
1166
+ real._wbg_cb_unref();
1167
+ }
1168
+ };
1169
+ real._wbg_cb_unref = () => {
1170
+ if (--state.cnt === 0) {
1171
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1172
+ state.a = 0;
1173
+ CLOSURE_DTORS.unregister(state);
1174
+ }
1175
+ };
1176
+ CLOSURE_DTORS.register(real, state, state);
1177
+ return real;
327
1178
  }
328
1179
 
329
- const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
330
-
331
- const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
332
-
333
- const WasmClientFinalization = (typeof FinalizationRegistry === 'undefined')
334
- ? { register: () => {}, unregister: () => {} }
335
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmclient_free(ptr >>> 0, 1));
336
- /**
337
- * WASM bindings for the client
338
- */
339
- export class WasmClient {
340
-
341
- static __wrap(ptr) {
342
- ptr = ptr >>> 0;
343
- const obj = Object.create(WasmClient.prototype);
344
- obj.__wbg_ptr = ptr;
345
- WasmClientFinalization.register(obj, obj.__wbg_ptr, obj);
346
- return obj;
347
- }
348
-
349
- __destroy_into_raw() {
350
- const ptr = this.__wbg_ptr;
351
- this.__wbg_ptr = 0;
352
- WasmClientFinalization.unregister(this);
1180
+ function passStringToWasm0(arg, malloc, realloc) {
1181
+ if (realloc === undefined) {
1182
+ const buf = cachedTextEncoder.encode(arg);
1183
+ const ptr = malloc(buf.length, 1) >>> 0;
1184
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1185
+ WASM_VECTOR_LEN = buf.length;
353
1186
  return ptr;
354
1187
  }
355
-
356
- free() {
357
- const ptr = this.__destroy_into_raw();
358
- wasm.__wbg_wasmclient_free(ptr, 0);
359
- }
360
- /**
361
- * Create a new client
362
- */
363
- constructor() {
364
- const ret = wasm.wasmclient_new();
365
- if (ret[2]) {
366
- throw takeFromExternrefTable0(ret[1]);
367
- }
368
- this.__wbg_ptr = ret[0] >>> 0;
369
- WasmClientFinalization.register(this, this.__wbg_ptr, this);
370
- return this;
371
- }
372
- /**
373
- * Make a GET request
374
- * @param {string} url
375
- * @returns {Promise<any>}
376
- */
377
- get(url) {
378
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
379
- const len0 = WASM_VECTOR_LEN;
380
- const ret = wasm.wasmclient_get(this.__wbg_ptr, ptr0, len0);
381
- return ret;
382
- }
383
- /**
384
- * Make a POST request with JSON body
385
- * @param {string} url
386
- * @param {any} body
387
- * @returns {Promise<any>}
388
- */
389
- post_json(url, body) {
390
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
391
- const len0 = WASM_VECTOR_LEN;
392
- const ret = wasm.wasmclient_post_json(this.__wbg_ptr, ptr0, len0, body);
393
- return ret;
394
- }
395
- /**
396
- * Make a PUT request with JSON body
397
- * @param {string} url
398
- * @param {any} body
399
- * @returns {Promise<any>}
400
- */
401
- put_json(url, body) {
402
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
403
- const len0 = WASM_VECTOR_LEN;
404
- const ret = wasm.wasmclient_put_json(this.__wbg_ptr, ptr0, len0, body);
405
- return ret;
406
- }
407
- /**
408
- * Make a DELETE request
409
- * @param {string} url
410
- * @returns {Promise<any>}
411
- */
412
- delete(url) {
413
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
414
- const len0 = WASM_VECTOR_LEN;
415
- const ret = wasm.wasmclient_delete(this.__wbg_ptr, ptr0, len0);
416
- return ret;
417
- }
418
- /**
419
- * Make a PATCH request with JSON body
420
- * @param {string} url
421
- * @param {any} body
422
- * @returns {Promise<any>}
423
- */
424
- patch_json(url, body) {
425
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
426
- const len0 = WASM_VECTOR_LEN;
427
- const ret = wasm.wasmclient_patch_json(this.__wbg_ptr, ptr0, len0, body);
428
- return ret;
1188
+
1189
+ let len = arg.length;
1190
+ let ptr = malloc(len, 1) >>> 0;
1191
+
1192
+ const mem = getUint8ArrayMemory0();
1193
+
1194
+ let offset = 0;
1195
+
1196
+ for (; offset < len; offset++) {
1197
+ const code = arg.charCodeAt(offset);
1198
+ if (code > 0x7F) break;
1199
+ mem[ptr + offset] = code;
429
1200
  }
430
- /**
431
- * Make a HEAD request
432
- * @param {string} url
433
- * @returns {Promise<any>}
434
- */
435
- head(url) {
436
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
437
- const len0 = WASM_VECTOR_LEN;
438
- const ret = wasm.wasmclient_head(this.__wbg_ptr, ptr0, len0);
439
- return ret;
1201
+ if (offset !== len) {
1202
+ if (offset !== 0) {
1203
+ arg = arg.slice(offset);
1204
+ }
1205
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1206
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1207
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1208
+
1209
+ offset += ret.written;
1210
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
440
1211
  }
441
- /**
442
- * Make a custom request with method, headers, and body
443
- * @param {string} method
444
- * @param {string} url
445
- * @param {any} headers
446
- * @param {any} body
447
- * @returns {Promise<any>}
448
- */
449
- request(method, url, headers, body) {
450
- const ptr0 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
451
- const len0 = WASM_VECTOR_LEN;
452
- const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
453
- const len1 = WASM_VECTOR_LEN;
454
- const ret = wasm.wasmclient_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, headers, body);
455
- return ret;
1212
+
1213
+ WASM_VECTOR_LEN = offset;
1214
+ return ptr;
1215
+ }
1216
+
1217
+ function takeFromExternrefTable0(idx) {
1218
+ const value = wasm.__wbindgen_externrefs.get(idx);
1219
+ wasm.__externref_table_dealloc(idx);
1220
+ return value;
1221
+ }
1222
+
1223
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1224
+ cachedTextDecoder.decode();
1225
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1226
+ let numBytesDecoded = 0;
1227
+ function decodeText(ptr, len) {
1228
+ numBytesDecoded += len;
1229
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1230
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1231
+ cachedTextDecoder.decode();
1232
+ numBytesDecoded = len;
456
1233
  }
1234
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1235
+ }
1236
+
1237
+ const cachedTextEncoder = new TextEncoder();
1238
+
1239
+ if (!('encodeInto' in cachedTextEncoder)) {
1240
+ cachedTextEncoder.encodeInto = function (arg, view) {
1241
+ const buf = cachedTextEncoder.encode(arg);
1242
+ view.set(buf);
1243
+ return {
1244
+ read: arg.length,
1245
+ written: buf.length
1246
+ };
1247
+ };
1248
+ }
1249
+
1250
+ let WASM_VECTOR_LEN = 0;
1251
+
1252
+ let wasmModule, wasmInstance, wasm;
1253
+ function __wbg_finalize_init(instance, module) {
1254
+ wasmInstance = instance;
1255
+ wasm = instance.exports;
1256
+ wasmModule = module;
1257
+ cachedDataViewMemory0 = null;
1258
+ cachedUint8ArrayMemory0 = null;
1259
+ wasm.__wbindgen_start();
1260
+ return wasm;
457
1261
  }
458
1262
 
459
1263
  async function __wbg_load(module, imports) {
460
1264
  if (typeof Response === 'function' && module instanceof Response) {
1265
+ if (!module.ok) {
1266
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
1267
+ }
1268
+
461
1269
  if (typeof WebAssembly.instantiateStreaming === 'function') {
462
1270
  try {
463
1271
  return await WebAssembly.instantiateStreaming(module, imports);
464
-
465
1272
  } catch (e) {
466
- if (module.headers.get('Content-Type') != 'application/wasm') {
1273
+ const validResponse = expectedResponseType(module.type);
1274
+
1275
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
467
1276
  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);
468
1277
 
469
- } else {
470
- throw e;
471
- }
1278
+ } else { throw e; }
472
1279
  }
473
1280
  }
474
1281
 
475
1282
  const bytes = await module.arrayBuffer();
476
1283
  return await WebAssembly.instantiate(bytes, imports);
477
-
478
1284
  } else {
479
1285
  const instance = await WebAssembly.instantiate(module, imports);
480
1286
 
481
1287
  if (instance instanceof WebAssembly.Instance) {
482
1288
  return { instance, module };
483
-
484
1289
  } else {
485
1290
  return instance;
486
1291
  }
487
1292
  }
488
- }
489
1293
 
490
- function __wbg_get_imports() {
491
- const imports = {};
492
- imports.wbg = {};
493
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
494
- const ret = String(arg1);
495
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
496
- const len1 = WASM_VECTOR_LEN;
497
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
498
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
499
- };
500
- imports.wbg.__wbg_abort_05026c983d86824c = function(arg0) {
501
- arg0.abort();
502
- };
503
- imports.wbg.__wbg_append_72d1635ad8643998 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
504
- arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
505
- }, arguments) };
506
- imports.wbg.__wbg_arrayBuffer_d0ca2ad8bda0039b = function() { return handleError(function (arg0) {
507
- const ret = arg0.arrayBuffer();
508
- return ret;
509
- }, arguments) };
510
- imports.wbg.__wbg_buffer_61b7ce01341d7f88 = function(arg0) {
511
- const ret = arg0.buffer;
512
- return ret;
513
- };
514
- imports.wbg.__wbg_call_500db948e69c7330 = function() { return handleError(function (arg0, arg1, arg2) {
515
- const ret = arg0.call(arg1, arg2);
516
- return ret;
517
- }, arguments) };
518
- imports.wbg.__wbg_call_b0d8e36992d9900d = function() { return handleError(function (arg0, arg1) {
519
- const ret = arg0.call(arg1);
520
- return ret;
521
- }, arguments) };
522
- imports.wbg.__wbg_done_f22c1561fa919baa = function(arg0) {
523
- const ret = arg0.done;
524
- return ret;
525
- };
526
- imports.wbg.__wbg_entries_4f2bb9b0d701c0f6 = function(arg0) {
527
- const ret = Object.entries(arg0);
528
- return ret;
529
- };
530
- imports.wbg.__wbg_fetch_229368eecee9d217 = function(arg0, arg1) {
531
- const ret = arg0.fetch(arg1);
532
- return ret;
533
- };
534
- imports.wbg.__wbg_fetch_f1856afdb49415d1 = function(arg0) {
535
- const ret = fetch(arg0);
536
- return ret;
537
- };
538
- imports.wbg.__wbg_from_d68eaa96dba25449 = function(arg0) {
539
- const ret = Array.from(arg0);
540
- return ret;
541
- };
542
- imports.wbg.__wbg_get_9aa3dff3f0266054 = function(arg0, arg1) {
543
- const ret = arg0[arg1 >>> 0];
544
- return ret;
545
- };
546
- imports.wbg.__wbg_get_bbccf8970793c087 = function() { return handleError(function (arg0, arg1) {
547
- const ret = Reflect.get(arg0, arg1);
548
- return ret;
549
- }, arguments) };
550
- imports.wbg.__wbg_has_94c2fc1d261bbfe9 = function() { return handleError(function (arg0, arg1) {
551
- const ret = Reflect.has(arg0, arg1);
552
- return ret;
553
- }, arguments) };
554
- imports.wbg.__wbg_headers_24e3e19fe3f187c0 = function(arg0) {
555
- const ret = arg0.headers;
556
- return ret;
557
- };
558
- imports.wbg.__wbg_instanceof_ArrayBuffer_670ddde44cdb2602 = function(arg0) {
559
- let result;
560
- try {
561
- result = arg0 instanceof ArrayBuffer;
562
- } catch (_) {
563
- result = false;
564
- }
565
- const ret = result;
566
- return ret;
567
- };
568
- imports.wbg.__wbg_instanceof_Map_98ecb30afec5acdb = function(arg0) {
569
- let result;
570
- try {
571
- result = arg0 instanceof Map;
572
- } catch (_) {
573
- result = false;
574
- }
575
- const ret = result;
576
- return ret;
577
- };
578
- imports.wbg.__wbg_instanceof_Response_d3453657e10c4300 = function(arg0) {
579
- let result;
580
- try {
581
- result = arg0 instanceof Response;
582
- } catch (_) {
583
- result = false;
584
- }
585
- const ret = result;
586
- return ret;
587
- };
588
- imports.wbg.__wbg_instanceof_Uint8Array_28af5bc19d6acad8 = function(arg0) {
589
- let result;
590
- try {
591
- result = arg0 instanceof Uint8Array;
592
- } catch (_) {
593
- result = false;
594
- }
595
- const ret = result;
596
- return ret;
597
- };
598
- imports.wbg.__wbg_instanceof_Window_d2514c6a7ee7ba60 = function(arg0) {
599
- let result;
600
- try {
601
- result = arg0 instanceof Window;
602
- } catch (_) {
603
- result = false;
604
- }
605
- const ret = result;
606
- return ret;
607
- };
608
- imports.wbg.__wbg_isArray_1ba11a930108ec51 = function(arg0) {
609
- const ret = Array.isArray(arg0);
610
- return ret;
611
- };
612
- imports.wbg.__wbg_isSafeInteger_12f5549b2fca23f4 = function(arg0) {
613
- const ret = Number.isSafeInteger(arg0);
614
- return ret;
615
- };
616
- imports.wbg.__wbg_iterator_23604bb983791576 = function() {
617
- const ret = Symbol.iterator;
618
- return ret;
619
- };
620
- imports.wbg.__wbg_length_65d1cd11729ced11 = function(arg0) {
621
- const ret = arg0.length;
622
- return ret;
623
- };
624
- imports.wbg.__wbg_length_d65cf0786bfc5739 = function(arg0) {
625
- const ret = arg0.length;
626
- return ret;
627
- };
628
- imports.wbg.__wbg_new_254fa9eac11932ae = function() {
629
- const ret = new Array();
630
- return ret;
631
- };
632
- imports.wbg.__wbg_new_35d748855c4620b9 = function() { return handleError(function () {
633
- const ret = new Headers();
634
- return ret;
635
- }, arguments) };
636
- imports.wbg.__wbg_new_3d446df9155128ef = function(arg0, arg1) {
637
- try {
638
- var state0 = {a: arg0, b: arg1};
639
- var cb0 = (arg0, arg1) => {
640
- const a = state0.a;
641
- state0.a = 0;
642
- try {
643
- return __wbg_adapter_164(a, state0.b, arg0, arg1);
644
- } finally {
645
- state0.a = a;
646
- }
647
- };
648
- const ret = new Promise(cb0);
649
- return ret;
650
- } finally {
651
- state0.a = state0.b = 0;
652
- }
653
- };
654
- imports.wbg.__wbg_new_3ff5b33b1ce712df = function(arg0) {
655
- const ret = new Uint8Array(arg0);
656
- return ret;
657
- };
658
- imports.wbg.__wbg_new_5f48f21d4be11586 = function() { return handleError(function () {
659
- const ret = new AbortController();
660
- return ret;
661
- }, arguments) };
662
- imports.wbg.__wbg_new_688846f374351c92 = function() {
663
- const ret = new Object();
664
- return ret;
665
- };
666
- imports.wbg.__wbg_new_bc96c6a1c0786643 = function() {
667
- const ret = new Map();
668
- return ret;
669
- };
670
- imports.wbg.__wbg_newnoargs_fd9e4bf8be2bc16d = function(arg0, arg1) {
671
- const ret = new Function(getStringFromWasm0(arg0, arg1));
672
- return ret;
673
- };
674
- imports.wbg.__wbg_newwithbyteoffsetandlength_ba35896968751d91 = function(arg0, arg1, arg2) {
675
- const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
676
- return ret;
677
- };
678
- imports.wbg.__wbg_newwithstrandinit_a1f6583f20e4faff = function() { return handleError(function (arg0, arg1, arg2) {
679
- const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
680
- return ret;
681
- }, arguments) };
682
- imports.wbg.__wbg_next_01dd9234a5bf6d05 = function() { return handleError(function (arg0) {
683
- const ret = arg0.next();
684
- return ret;
685
- }, arguments) };
686
- imports.wbg.__wbg_next_137428deb98342b0 = function(arg0) {
687
- const ret = arg0.next;
688
- return ret;
689
- };
690
- imports.wbg.__wbg_queueMicrotask_2181040e064c0dc8 = function(arg0) {
691
- queueMicrotask(arg0);
692
- };
693
- imports.wbg.__wbg_queueMicrotask_ef9ac43769cbcc4f = function(arg0) {
694
- const ret = arg0.queueMicrotask;
695
- return ret;
696
- };
697
- imports.wbg.__wbg_resolve_0bf7c44d641804f9 = function(arg0) {
698
- const ret = Promise.resolve(arg0);
699
- return ret;
700
- };
701
- imports.wbg.__wbg_setTimeout_8d2afdcdb34b4e5a = function() { return handleError(function (arg0, arg1, arg2) {
702
- const ret = arg0.setTimeout(arg1, arg2);
703
- return ret;
704
- }, arguments) };
705
- imports.wbg.__wbg_set_1d80752d0d5f0b21 = function(arg0, arg1, arg2) {
706
- arg0[arg1 >>> 0] = arg2;
707
- };
708
- imports.wbg.__wbg_set_23d69db4e5c66a6e = function(arg0, arg1, arg2) {
709
- arg0.set(arg1, arg2 >>> 0);
710
- };
711
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
712
- arg0[arg1] = arg2;
713
- };
714
- imports.wbg.__wbg_set_4e647025551483bd = function() { return handleError(function (arg0, arg1, arg2) {
715
- const ret = Reflect.set(arg0, arg1, arg2);
716
- return ret;
717
- }, arguments) };
718
- imports.wbg.__wbg_set_76818dc3c59a63d5 = function(arg0, arg1, arg2) {
719
- const ret = arg0.set(arg1, arg2);
720
- return ret;
721
- };
722
- imports.wbg.__wbg_setbody_64920df008e48adc = function(arg0, arg1) {
723
- arg0.body = arg1;
724
- };
725
- imports.wbg.__wbg_setcredentials_cfc15e48e3a3a535 = function(arg0, arg1) {
726
- arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
727
- };
728
- imports.wbg.__wbg_setheaders_4c921e8e226bdfa7 = function(arg0, arg1) {
729
- arg0.headers = arg1;
730
- };
731
- imports.wbg.__wbg_setmethod_cfc7f688ba46a6be = function(arg0, arg1, arg2) {
732
- arg0.method = getStringFromWasm0(arg1, arg2);
733
- };
734
- imports.wbg.__wbg_setmode_cd03637eb7da01e0 = function(arg0, arg1) {
735
- arg0.mode = __wbindgen_enum_RequestMode[arg1];
736
- };
737
- imports.wbg.__wbg_setsignal_f766190d206f09e5 = function(arg0, arg1) {
738
- arg0.signal = arg1;
739
- };
740
- imports.wbg.__wbg_signal_1fdadeba2d04660e = function(arg0) {
741
- const ret = arg0.signal;
742
- return ret;
743
- };
744
- imports.wbg.__wbg_static_accessor_GLOBAL_0be7472e492ad3e3 = function() {
745
- const ret = typeof global === 'undefined' ? null : global;
746
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
747
- };
748
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_1a6eb482d12c9bfb = function() {
749
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
750
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
751
- };
752
- imports.wbg.__wbg_static_accessor_SELF_1dc398a895c82351 = function() {
753
- const ret = typeof self === 'undefined' ? null : self;
754
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
755
- };
756
- imports.wbg.__wbg_static_accessor_WINDOW_ae1c80c7eea8d64a = function() {
757
- const ret = typeof window === 'undefined' ? null : window;
758
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
759
- };
760
- imports.wbg.__wbg_status_317f53bc4c7638df = function(arg0) {
761
- const ret = arg0.status;
762
- return ret;
763
- };
764
- imports.wbg.__wbg_stringify_f4f701bc34ceda61 = function() { return handleError(function (arg0) {
765
- const ret = JSON.stringify(arg0);
766
- return ret;
767
- }, arguments) };
768
- imports.wbg.__wbg_text_dfc4cb7631d2eb34 = function() { return handleError(function (arg0) {
769
- const ret = arg0.text();
770
- return ret;
771
- }, arguments) };
772
- imports.wbg.__wbg_then_0438fad860fe38e1 = function(arg0, arg1) {
773
- const ret = arg0.then(arg1);
774
- return ret;
775
- };
776
- imports.wbg.__wbg_then_0ffafeddf0e182a4 = function(arg0, arg1, arg2) {
777
- const ret = arg0.then(arg1, arg2);
778
- return ret;
779
- };
780
- imports.wbg.__wbg_url_5327bc0a41a9b085 = function(arg0, arg1) {
781
- const ret = arg1.url;
782
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
783
- const len1 = WASM_VECTOR_LEN;
784
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
785
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
786
- };
787
- imports.wbg.__wbg_value_4c32fd138a88eee2 = function(arg0) {
788
- const ret = arg0.value;
789
- return ret;
790
- };
791
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
792
- const ret = arg0;
793
- return ret;
794
- };
795
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
796
- const ret = BigInt.asUintN(64, arg0);
797
- return ret;
798
- };
799
- imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
800
- const v = arg1;
801
- const ret = typeof(v) === 'bigint' ? v : undefined;
802
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
803
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
804
- };
805
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
806
- const v = arg0;
807
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
808
- return ret;
809
- };
810
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
811
- const obj = arg0.original;
812
- if (obj.cnt-- == 1) {
813
- obj.a = 0;
814
- return true;
1294
+ function expectedResponseType(type) {
1295
+ switch (type) {
1296
+ case 'basic': case 'cors': case 'default': return true;
815
1297
  }
816
- const ret = false;
817
- return ret;
818
- };
819
- imports.wbg.__wbindgen_closure_wrapper1733 = function(arg0, arg1, arg2) {
820
- const ret = makeMutClosure(arg0, arg1, 261, __wbg_adapter_52);
821
- return ret;
822
- };
823
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
824
- const ret = debugString(arg1);
825
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
826
- const len1 = WASM_VECTOR_LEN;
827
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
828
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
829
- };
830
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
831
- const ret = new Error(getStringFromWasm0(arg0, arg1));
832
- return ret;
833
- };
834
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
835
- const ret = arg0 in arg1;
836
- return ret;
837
- };
838
- imports.wbg.__wbindgen_init_externref_table = function() {
839
- const table = wasm.__wbindgen_export_4;
840
- const offset = table.grow(4);
841
- table.set(0, undefined);
842
- table.set(offset + 0, undefined);
843
- table.set(offset + 1, null);
844
- table.set(offset + 2, true);
845
- table.set(offset + 3, false);
846
- ;
847
- };
848
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
849
- const ret = typeof(arg0) === 'bigint';
850
- return ret;
851
- };
852
- imports.wbg.__wbindgen_is_function = function(arg0) {
853
- const ret = typeof(arg0) === 'function';
854
- return ret;
855
- };
856
- imports.wbg.__wbindgen_is_null = function(arg0) {
857
- const ret = arg0 === null;
858
- return ret;
859
- };
860
- imports.wbg.__wbindgen_is_object = function(arg0) {
861
- const val = arg0;
862
- const ret = typeof(val) === 'object' && val !== null;
863
- return ret;
864
- };
865
- imports.wbg.__wbindgen_is_string = function(arg0) {
866
- const ret = typeof(arg0) === 'string';
867
- return ret;
868
- };
869
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
870
- const ret = arg0 === undefined;
871
- return ret;
872
- };
873
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
874
- const ret = arg0 === arg1;
875
- return ret;
876
- };
877
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
878
- const ret = arg0 == arg1;
879
- return ret;
880
- };
881
- imports.wbg.__wbindgen_memory = function() {
882
- const ret = wasm.memory;
883
- return ret;
884
- };
885
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
886
- const obj = arg1;
887
- const ret = typeof(obj) === 'number' ? obj : undefined;
888
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
889
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
890
- };
891
- imports.wbg.__wbindgen_number_new = function(arg0) {
892
- const ret = arg0;
893
- return ret;
894
- };
895
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
896
- const obj = arg1;
897
- const ret = typeof(obj) === 'string' ? obj : undefined;
898
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
899
- var len1 = WASM_VECTOR_LEN;
900
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
901
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
902
- };
903
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
904
- const ret = getStringFromWasm0(arg0, arg1);
905
- return ret;
906
- };
907
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
908
- throw new Error(getStringFromWasm0(arg0, arg1));
909
- };
910
-
911
- return imports;
912
- }
913
-
914
- function __wbg_init_memory(imports, memory) {
915
-
916
- }
917
-
918
- function __wbg_finalize_init(instance, module) {
919
- wasm = instance.exports;
920
- __wbg_init.__wbindgen_wasm_module = module;
921
- cachedDataViewMemory0 = null;
922
- cachedUint8ArrayMemory0 = null;
923
-
924
-
925
- wasm.__wbindgen_start();
926
- return wasm;
1298
+ return false;
1299
+ }
927
1300
  }
928
1301
 
929
1302
  function initSync(module) {
930
1303
  if (wasm !== undefined) return wasm;
931
1304
 
932
1305
 
933
- if (typeof module !== 'undefined') {
1306
+ if (module !== undefined) {
934
1307
  if (Object.getPrototypeOf(module) === Object.prototype) {
935
1308
  ({module} = module)
936
1309
  } else {
@@ -939,15 +1312,10 @@ function initSync(module) {
939
1312
  }
940
1313
 
941
1314
  const imports = __wbg_get_imports();
942
-
943
- __wbg_init_memory(imports);
944
-
945
1315
  if (!(module instanceof WebAssembly.Module)) {
946
1316
  module = new WebAssembly.Module(module);
947
1317
  }
948
-
949
1318
  const instance = new WebAssembly.Instance(module, imports);
950
-
951
1319
  return __wbg_finalize_init(instance, module);
952
1320
  }
953
1321
 
@@ -955,7 +1323,7 @@ async function __wbg_init(module_or_path) {
955
1323
  if (wasm !== undefined) return wasm;
956
1324
 
957
1325
 
958
- if (typeof module_or_path !== 'undefined') {
1326
+ if (module_or_path !== undefined) {
959
1327
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
960
1328
  ({module_or_path} = module_or_path)
961
1329
  } else {
@@ -963,7 +1331,7 @@ async function __wbg_init(module_or_path) {
963
1331
  }
964
1332
  }
965
1333
 
966
- if (typeof module_or_path === 'undefined') {
1334
+ if (module_or_path === undefined) {
967
1335
  module_or_path = new URL('rust_fetch_bg.wasm', import.meta.url);
968
1336
  }
969
1337
  const imports = __wbg_get_imports();
@@ -972,12 +1340,9 @@ async function __wbg_init(module_or_path) {
972
1340
  module_or_path = fetch(module_or_path);
973
1341
  }
974
1342
 
975
- __wbg_init_memory(imports);
976
-
977
1343
  const { instance, module } = await __wbg_load(await module_or_path, imports);
978
1344
 
979
1345
  return __wbg_finalize_init(instance, module);
980
1346
  }
981
1347
 
982
- export { initSync };
983
- export default __wbg_init;
1348
+ export { initSync, __wbg_init as default };