rust-fetch 1.1.0 → 2.0.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/LICENSE-APACHE +202 -0
- package/LICENSE-MIT +21 -0
- package/README.md +303 -664
- package/node.js +13 -0
- package/package.json +29 -5
- package/rust_fetch.d.ts +346 -93
- package/rust_fetch.js +1107 -792
- package/rust_fetch_bg.wasm +0 -0
- package/rust_fetch_bg.wasm.d.ts +54 -0
package/rust_fetch.js
CHANGED
|
@@ -1,137 +1,1000 @@
|
|
|
1
|
-
|
|
1
|
+
/* @ts-self-types="./rust_fetch.d.ts" */
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
40
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
61
|
-
|
|
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_body_4e088733babc630d: function(arg0) {
|
|
517
|
+
const ret = arg0.body;
|
|
518
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
519
|
+
},
|
|
520
|
+
__wbg_buffer_56ec2905a66f58b9: function(arg0) {
|
|
521
|
+
const ret = arg0.buffer;
|
|
522
|
+
return ret;
|
|
523
|
+
},
|
|
524
|
+
__wbg_byobRequest_54f7ce41d584549a: function(arg0) {
|
|
525
|
+
const ret = arg0.byobRequest;
|
|
526
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
527
|
+
},
|
|
528
|
+
__wbg_byteLength_9f985b8373f1f3fe: function(arg0) {
|
|
529
|
+
const ret = arg0.byteLength;
|
|
530
|
+
return ret;
|
|
531
|
+
},
|
|
532
|
+
__wbg_byteOffset_0bd5a6a03553639c: function(arg0) {
|
|
533
|
+
const ret = arg0.byteOffset;
|
|
534
|
+
return ret;
|
|
535
|
+
},
|
|
536
|
+
__wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
|
|
537
|
+
const ret = arg0.call(arg1, arg2);
|
|
538
|
+
return ret;
|
|
539
|
+
}, arguments); },
|
|
540
|
+
__wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
|
|
541
|
+
const ret = arg0.call(arg1);
|
|
542
|
+
return ret;
|
|
543
|
+
}, arguments); },
|
|
544
|
+
__wbg_cancel_7c2a08c8db4c73f3: function(arg0) {
|
|
545
|
+
const ret = arg0.cancel();
|
|
546
|
+
return ret;
|
|
547
|
+
},
|
|
548
|
+
__wbg_catch_92594c2d17f55f12: function(arg0, arg1) {
|
|
549
|
+
const ret = arg0.catch(arg1);
|
|
550
|
+
return ret;
|
|
551
|
+
},
|
|
552
|
+
__wbg_clearTimeout_1daad5c6ee4fcd3b: function(arg0) {
|
|
553
|
+
const ret = clearTimeout(arg0);
|
|
554
|
+
return ret;
|
|
555
|
+
},
|
|
556
|
+
__wbg_clearTimeout_80e0bf42f165386a: function(arg0) {
|
|
557
|
+
clearTimeout(arg0);
|
|
558
|
+
},
|
|
559
|
+
__wbg_close_185286988f30f252: function() { return handleError(function (arg0) {
|
|
560
|
+
arg0.close();
|
|
561
|
+
}, arguments); },
|
|
562
|
+
__wbg_close_748f26698dabe269: function() { return handleError(function (arg0) {
|
|
563
|
+
arg0.close();
|
|
564
|
+
}, arguments); },
|
|
565
|
+
__wbg_done_b41a1d26cdb37fb6: function(arg0) {
|
|
566
|
+
const ret = arg0.done;
|
|
567
|
+
return ret;
|
|
568
|
+
},
|
|
569
|
+
__wbg_enqueue_4a01c128f9a0de16: function() { return handleError(function (arg0, arg1) {
|
|
570
|
+
arg0.enqueue(arg1);
|
|
571
|
+
}, arguments); },
|
|
572
|
+
__wbg_entries_b55ec7e0dc443355: function(arg0) {
|
|
573
|
+
const ret = arg0.entries();
|
|
574
|
+
return ret;
|
|
575
|
+
},
|
|
576
|
+
__wbg_entries_fb6397112b1de25f: function(arg0) {
|
|
577
|
+
const ret = Object.entries(arg0);
|
|
578
|
+
return ret;
|
|
579
|
+
},
|
|
580
|
+
__wbg_fetch_7a37768ab67c5bd8: function(arg0) {
|
|
581
|
+
const ret = fetch(arg0);
|
|
582
|
+
return ret;
|
|
583
|
+
},
|
|
584
|
+
__wbg_fetch_efc64baf325b084d: function(arg0, arg1) {
|
|
585
|
+
const ret = arg0.fetch(arg1);
|
|
586
|
+
return ret;
|
|
587
|
+
},
|
|
588
|
+
__wbg_from_296ca31f8d0f1c52: function(arg0) {
|
|
589
|
+
const ret = Array.from(arg0);
|
|
590
|
+
return ret;
|
|
591
|
+
},
|
|
592
|
+
__wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
|
|
593
|
+
const ret = arg0.getReader();
|
|
594
|
+
return ret;
|
|
595
|
+
}, arguments); },
|
|
596
|
+
__wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
|
|
597
|
+
const ret = Reflect.get(arg0, arg1);
|
|
598
|
+
return ret;
|
|
599
|
+
}, arguments); },
|
|
600
|
+
__wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
|
|
601
|
+
const ret = Reflect.get(arg0, arg1);
|
|
602
|
+
return ret;
|
|
603
|
+
}, arguments); },
|
|
604
|
+
__wbg_get_6c896e0571ddae51: function(arg0, arg1) {
|
|
605
|
+
const ret = arg0[arg1 >>> 0];
|
|
606
|
+
return ret;
|
|
607
|
+
},
|
|
608
|
+
__wbg_get_done_7020b91c987365c7: function(arg0) {
|
|
609
|
+
const ret = arg0.done;
|
|
610
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
611
|
+
},
|
|
612
|
+
__wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
|
|
613
|
+
const ret = arg0[arg1 >>> 0];
|
|
614
|
+
return ret;
|
|
615
|
+
},
|
|
616
|
+
__wbg_get_value_87fbd6ad1283f2e7: function(arg0) {
|
|
617
|
+
const ret = arg0.value;
|
|
618
|
+
return ret;
|
|
619
|
+
},
|
|
620
|
+
__wbg_has_5d6706e5209576c1: function() { return handleError(function (arg0, arg1) {
|
|
621
|
+
const ret = Reflect.has(arg0, arg1);
|
|
622
|
+
return ret;
|
|
623
|
+
}, arguments); },
|
|
624
|
+
__wbg_headers_eba93595f8944c2f: function(arg0) {
|
|
625
|
+
const ret = arg0.headers;
|
|
626
|
+
return ret;
|
|
627
|
+
},
|
|
628
|
+
__wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
|
|
629
|
+
let result;
|
|
630
|
+
try {
|
|
631
|
+
result = arg0 instanceof ArrayBuffer;
|
|
632
|
+
} catch (_) {
|
|
633
|
+
result = false;
|
|
634
|
+
}
|
|
635
|
+
const ret = result;
|
|
636
|
+
return ret;
|
|
637
|
+
},
|
|
638
|
+
__wbg_instanceof_Response_b8758567269c30b2: function(arg0) {
|
|
639
|
+
let result;
|
|
640
|
+
try {
|
|
641
|
+
result = arg0 instanceof Response;
|
|
642
|
+
} catch (_) {
|
|
643
|
+
result = false;
|
|
644
|
+
}
|
|
645
|
+
const ret = result;
|
|
646
|
+
return ret;
|
|
647
|
+
},
|
|
648
|
+
__wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
|
|
649
|
+
const ret = Array.isArray(arg0);
|
|
650
|
+
return ret;
|
|
651
|
+
},
|
|
652
|
+
__wbg_isPrototypeOf_59fbabb5a4f3f1ff: function(arg0, arg1) {
|
|
653
|
+
const ret = arg0.isPrototypeOf(arg1);
|
|
654
|
+
return ret;
|
|
655
|
+
},
|
|
656
|
+
__wbg_isView_87b70d94ddaa60d3: function(arg0) {
|
|
657
|
+
const ret = ArrayBuffer.isView(arg0);
|
|
658
|
+
return ret;
|
|
659
|
+
},
|
|
660
|
+
__wbg_iterator_e3c31c892080e444: function() {
|
|
661
|
+
const ret = Symbol.iterator;
|
|
662
|
+
return ret;
|
|
663
|
+
},
|
|
664
|
+
__wbg_length_7f3c00c40364105e: function(arg0) {
|
|
665
|
+
const ret = arg0.length;
|
|
666
|
+
return ret;
|
|
667
|
+
},
|
|
668
|
+
__wbg_length_d4bdea10311bd9cf: function(arg0) {
|
|
669
|
+
const ret = arg0.length;
|
|
670
|
+
return ret;
|
|
671
|
+
},
|
|
672
|
+
__wbg_new_1dbf7428bba60a42: function(arg0) {
|
|
673
|
+
const ret = new Uint8Array(arg0);
|
|
674
|
+
return ret;
|
|
675
|
+
},
|
|
676
|
+
__wbg_new_2e41357094e99294: function() { return handleError(function () {
|
|
677
|
+
const ret = new AbortController();
|
|
678
|
+
return ret;
|
|
679
|
+
}, arguments); },
|
|
680
|
+
__wbg_new_343a093a3c2ffb4e: function(arg0, arg1) {
|
|
681
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
682
|
+
return ret;
|
|
683
|
+
},
|
|
684
|
+
__wbg_new_5502aad30c185fc8: function(arg0, arg1) {
|
|
685
|
+
try {
|
|
686
|
+
var state0 = {a: arg0, b: arg1};
|
|
687
|
+
var cb0 = (arg0, arg1) => {
|
|
688
|
+
const a = state0.a;
|
|
689
|
+
state0.a = 0;
|
|
690
|
+
try {
|
|
691
|
+
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);
|
|
692
|
+
} finally {
|
|
693
|
+
state0.a = a;
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
const ret = new Promise(cb0);
|
|
697
|
+
return ret;
|
|
698
|
+
} finally {
|
|
699
|
+
state0.a = 0;
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
__wbg_new_617a8cdb8bb1130e: function() {
|
|
703
|
+
const ret = new Object();
|
|
704
|
+
return ret;
|
|
705
|
+
},
|
|
706
|
+
__wbg_new_83ca405eae412a62: function() { return handleError(function () {
|
|
707
|
+
const ret = new Headers();
|
|
708
|
+
return ret;
|
|
709
|
+
}, arguments); },
|
|
710
|
+
__wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
|
|
711
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
712
|
+
return ret;
|
|
713
|
+
},
|
|
714
|
+
__wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
|
|
715
|
+
try {
|
|
716
|
+
var state0 = {a: arg0, b: arg1};
|
|
717
|
+
var cb0 = (arg0, arg1) => {
|
|
718
|
+
const a = state0.a;
|
|
719
|
+
state0.a = 0;
|
|
720
|
+
try {
|
|
721
|
+
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);
|
|
722
|
+
} finally {
|
|
723
|
+
state0.a = a;
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
const ret = new Promise(cb0);
|
|
727
|
+
return ret;
|
|
728
|
+
} finally {
|
|
729
|
+
state0.a = 0;
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
__wbg_new_with_byte_offset_and_length_2f5d7fc2a828b74d: function(arg0, arg1, arg2) {
|
|
733
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
734
|
+
return ret;
|
|
735
|
+
},
|
|
736
|
+
__wbg_new_with_into_underlying_source_fd904252f385f59c: function(arg0, arg1) {
|
|
737
|
+
const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
|
|
738
|
+
return ret;
|
|
739
|
+
},
|
|
740
|
+
__wbg_new_with_length_3da0ad195f6f63ba: function(arg0) {
|
|
741
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
742
|
+
return ret;
|
|
743
|
+
},
|
|
744
|
+
__wbg_new_with_str_and_init_4618dee4e950224f: function() { return handleError(function (arg0, arg1, arg2) {
|
|
745
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
746
|
+
return ret;
|
|
747
|
+
}, arguments); },
|
|
748
|
+
__wbg_next_33784799010f1bbe: function(arg0) {
|
|
749
|
+
const ret = arg0.next;
|
|
750
|
+
return ret;
|
|
751
|
+
},
|
|
752
|
+
__wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
|
|
753
|
+
const ret = arg0.next();
|
|
754
|
+
return ret;
|
|
755
|
+
}, arguments); },
|
|
756
|
+
__wbg_parse_0fc53dead14b3b42: function() { return handleError(function (arg0, arg1) {
|
|
757
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
758
|
+
return ret;
|
|
759
|
+
}, arguments); },
|
|
760
|
+
__wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
|
|
761
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
762
|
+
},
|
|
763
|
+
__wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
|
|
764
|
+
const ret = arg0.queueMicrotask;
|
|
765
|
+
return ret;
|
|
766
|
+
},
|
|
767
|
+
__wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
|
|
768
|
+
queueMicrotask(arg0);
|
|
769
|
+
},
|
|
770
|
+
__wbg_random_5a4cafd2f02395ff: function() {
|
|
771
|
+
const ret = Math.random();
|
|
772
|
+
return ret;
|
|
773
|
+
},
|
|
774
|
+
__wbg_read_2a943774344c9728: function(arg0) {
|
|
775
|
+
const ret = arg0.read();
|
|
776
|
+
return ret;
|
|
777
|
+
},
|
|
778
|
+
__wbg_reject_1548d2ad77237dc9: function(arg0) {
|
|
779
|
+
const ret = Promise.reject(arg0);
|
|
780
|
+
return ret;
|
|
781
|
+
},
|
|
782
|
+
__wbg_releaseLock_eb64cd83aa9fcfe4: function(arg0) {
|
|
783
|
+
arg0.releaseLock();
|
|
784
|
+
},
|
|
785
|
+
__wbg_removeEventListener_6e68185345978771: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
786
|
+
arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
787
|
+
}, arguments); },
|
|
788
|
+
__wbg_resolve_0076e10020304ede: function(arg0) {
|
|
789
|
+
const ret = Promise.resolve(arg0);
|
|
790
|
+
return ret;
|
|
791
|
+
},
|
|
792
|
+
__wbg_respond_c102fabcc79e5ef0: function() { return handleError(function (arg0, arg1) {
|
|
793
|
+
arg0.respond(arg1 >>> 0);
|
|
794
|
+
}, arguments); },
|
|
795
|
+
__wbg_setTimeout_52f32a16f2242504: function(arg0, arg1) {
|
|
796
|
+
const ret = setTimeout(arg0, arg1);
|
|
797
|
+
return ret;
|
|
798
|
+
},
|
|
799
|
+
__wbg_setTimeout_b4a9096784635514: function(arg0, arg1) {
|
|
800
|
+
const ret = setTimeout(arg0, arg1);
|
|
801
|
+
return ret;
|
|
802
|
+
},
|
|
803
|
+
__wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
|
|
804
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
805
|
+
return ret;
|
|
806
|
+
}, arguments); },
|
|
807
|
+
__wbg_set_575d3ddb70fe831d: function(arg0, arg1, arg2) {
|
|
808
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
809
|
+
},
|
|
810
|
+
__wbg_set_body_1fb0f1008bfc7df6: function(arg0, arg1) {
|
|
811
|
+
arg0.body = arg1;
|
|
812
|
+
},
|
|
813
|
+
__wbg_set_cache_7507c4cc5938ccc7: function(arg0, arg1) {
|
|
814
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
815
|
+
},
|
|
816
|
+
__wbg_set_credentials_e0dcce31ca532b7d: function(arg0, arg1) {
|
|
817
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
818
|
+
},
|
|
819
|
+
__wbg_set_headers_40ad33dcf016613f: function(arg0, arg1) {
|
|
820
|
+
arg0.headers = arg1;
|
|
821
|
+
},
|
|
822
|
+
__wbg_set_high_water_mark_3a96edf83df7e06c: function(arg0, arg1) {
|
|
823
|
+
arg0.highWaterMark = arg1;
|
|
824
|
+
},
|
|
825
|
+
__wbg_set_method_dcb32343247ec427: function(arg0, arg1, arg2) {
|
|
826
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
827
|
+
},
|
|
828
|
+
__wbg_set_mode_74e772635acb96ec: function(arg0, arg1) {
|
|
829
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
830
|
+
},
|
|
831
|
+
__wbg_set_name_2c630595dc90a7aa: function(arg0, arg1, arg2) {
|
|
832
|
+
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
833
|
+
},
|
|
834
|
+
__wbg_set_referrer_efd0fb956d6b70b2: function(arg0, arg1, arg2) {
|
|
835
|
+
arg0.referrer = getStringFromWasm0(arg1, arg2);
|
|
836
|
+
},
|
|
837
|
+
__wbg_set_referrer_policy_465382f52c1a03d3: function(arg0, arg1) {
|
|
838
|
+
arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
|
|
839
|
+
},
|
|
840
|
+
__wbg_set_signal_2dbd377604627f26: function(arg0, arg1) {
|
|
841
|
+
arg0.signal = arg1;
|
|
842
|
+
},
|
|
843
|
+
__wbg_signal_e5a49a2d9c65b7f6: function(arg0) {
|
|
844
|
+
const ret = arg0.signal;
|
|
845
|
+
return ret;
|
|
846
|
+
},
|
|
847
|
+
__wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
|
|
848
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
849
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
850
|
+
},
|
|
851
|
+
__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
|
|
852
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
853
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
854
|
+
},
|
|
855
|
+
__wbg_static_accessor_SELF_0b583911f537483a: function() {
|
|
856
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
857
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
858
|
+
},
|
|
859
|
+
__wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
|
|
860
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
861
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
862
|
+
},
|
|
863
|
+
__wbg_status_ce0a98d3c57125f3: function(arg0) {
|
|
864
|
+
const ret = arg0.status;
|
|
865
|
+
return ret;
|
|
866
|
+
},
|
|
867
|
+
__wbg_stringify_52ff602c1cc4fbb6: function() { return handleError(function (arg0) {
|
|
868
|
+
const ret = JSON.stringify(arg0);
|
|
869
|
+
return ret;
|
|
870
|
+
}, arguments); },
|
|
871
|
+
__wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
|
|
872
|
+
const ret = arg0.then(arg1, arg2);
|
|
873
|
+
return ret;
|
|
874
|
+
},
|
|
875
|
+
__wbg_then_e71170d78fcf8954: function(arg0, arg1) {
|
|
876
|
+
const ret = arg0.then(arg1);
|
|
877
|
+
return ret;
|
|
878
|
+
},
|
|
879
|
+
__wbg_toString_0a6162345e699dea: function(arg0) {
|
|
880
|
+
const ret = arg0.toString();
|
|
881
|
+
return ret;
|
|
882
|
+
},
|
|
883
|
+
__wbg_toString_aad181a510c306d8: function() { return handleError(function (arg0, arg1) {
|
|
884
|
+
const ret = arg0.toString(arg1);
|
|
885
|
+
return ret;
|
|
886
|
+
}, arguments); },
|
|
887
|
+
__wbg_url_8e28edeab4cd6bed: function(arg0, arg1) {
|
|
888
|
+
const ret = arg1.url;
|
|
889
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
890
|
+
const len1 = WASM_VECTOR_LEN;
|
|
891
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
892
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
893
|
+
},
|
|
894
|
+
__wbg_value_f3c585ee8f5ba40c: function(arg0) {
|
|
895
|
+
const ret = arg0.value;
|
|
896
|
+
return ret;
|
|
897
|
+
},
|
|
898
|
+
__wbg_view_9c570f33e8d6ab96: function(arg0) {
|
|
899
|
+
const ret = arg0.view;
|
|
900
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
901
|
+
},
|
|
902
|
+
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
903
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 211, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
904
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_);
|
|
905
|
+
return ret;
|
|
906
|
+
},
|
|
907
|
+
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
908
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 331, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
909
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_6b82e471f4a4091b___JsError___true_);
|
|
910
|
+
return ret;
|
|
911
|
+
},
|
|
912
|
+
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
913
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 176, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
914
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_);
|
|
915
|
+
return ret;
|
|
916
|
+
},
|
|
917
|
+
__wbindgen_generic_0000000000000004: function(arg0) {
|
|
918
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
919
|
+
const ret = arg0;
|
|
920
|
+
return ret;
|
|
921
|
+
},
|
|
922
|
+
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
923
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
924
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
925
|
+
return ret;
|
|
926
|
+
},
|
|
927
|
+
__wbindgen_init_externref_table: function() {
|
|
928
|
+
const table = wasm.__wbindgen_externrefs;
|
|
929
|
+
const offset = table.grow(4);
|
|
930
|
+
table.set(0, undefined);
|
|
931
|
+
table.set(offset + 0, undefined);
|
|
932
|
+
table.set(offset + 1, null);
|
|
933
|
+
table.set(offset + 2, true);
|
|
934
|
+
table.set(offset + 3, false);
|
|
935
|
+
},
|
|
936
|
+
};
|
|
937
|
+
return {
|
|
938
|
+
__proto__: null,
|
|
939
|
+
"./rust_fetch_bg.js": import0,
|
|
940
|
+
};
|
|
941
|
+
}
|
|
63
942
|
|
|
64
|
-
|
|
65
|
-
|
|
943
|
+
function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
944
|
+
wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke_______true_(arg0, arg1);
|
|
66
945
|
}
|
|
67
946
|
|
|
68
|
-
|
|
947
|
+
function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_(arg0, arg1, arg2) {
|
|
948
|
+
wasm.wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue______true_(arg0, arg1, arg2);
|
|
949
|
+
}
|
|
69
950
|
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
|
|
951
|
+
function wasm_bindgen_6b82e471f4a4091b___convert__closures_____invoke___wasm_bindgen_6b82e471f4a4091b___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_6b82e471f4a4091b___JsError___true_(arg0, arg1, arg2) {
|
|
952
|
+
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);
|
|
953
|
+
if (ret[1]) {
|
|
954
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
73
955
|
}
|
|
74
|
-
return cachedDataViewMemory0;
|
|
75
956
|
}
|
|
76
957
|
|
|
77
|
-
|
|
958
|
+
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) {
|
|
959
|
+
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);
|
|
960
|
+
}
|
|
78
961
|
|
|
79
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
80
962
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
963
|
+
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
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"];
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
976
|
+
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
977
|
+
? { register: () => {}, unregister: () => {} }
|
|
978
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
|
|
979
|
+
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
980
|
+
? { register: () => {}, unregister: () => {} }
|
|
981
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
|
|
982
|
+
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
983
|
+
? { register: () => {}, unregister: () => {} }
|
|
984
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
|
|
985
|
+
const WasmClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
986
|
+
? { register: () => {}, unregister: () => {} }
|
|
987
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmclient_free(ptr, 1));
|
|
85
988
|
|
|
86
989
|
function addToExternrefTable0(obj) {
|
|
87
990
|
const idx = wasm.__externref_table_alloc();
|
|
88
|
-
wasm.
|
|
991
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
89
992
|
return idx;
|
|
90
993
|
}
|
|
91
994
|
|
|
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
995
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
106
996
|
? { 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
|
-
}
|
|
997
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
135
998
|
|
|
136
999
|
function debugString(val) {
|
|
137
1000
|
// primitive types
|
|
@@ -198,739 +1061,199 @@ function debugString(val) {
|
|
|
198
1061
|
return className;
|
|
199
1062
|
}
|
|
200
1063
|
|
|
201
|
-
function
|
|
202
|
-
|
|
203
|
-
|
|
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;
|
|
1064
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1065
|
+
ptr = ptr >>> 0;
|
|
1066
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
259
1067
|
}
|
|
260
1068
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
export function create_client() {
|
|
266
|
-
const ret = wasm.create_client();
|
|
267
|
-
if (ret[2]) {
|
|
268
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1069
|
+
let cachedDataViewMemory0 = null;
|
|
1070
|
+
function getDataViewMemory0() {
|
|
1071
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1072
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
269
1073
|
}
|
|
270
|
-
return
|
|
1074
|
+
return cachedDataViewMemory0;
|
|
271
1075
|
}
|
|
272
1076
|
|
|
273
|
-
|
|
274
|
-
|
|
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;
|
|
1077
|
+
function getStringFromWasm0(ptr, len) {
|
|
1078
|
+
return decodeText(ptr >>> 0, len);
|
|
283
1079
|
}
|
|
284
1080
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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;
|
|
1081
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1082
|
+
function getUint8ArrayMemory0() {
|
|
1083
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1084
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1085
|
+
}
|
|
1086
|
+
return cachedUint8ArrayMemory0;
|
|
295
1087
|
}
|
|
296
1088
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const len0 = WASM_VECTOR_LEN;
|
|
305
|
-
const ret = wasm.fetch_wasm_map(ptr0, len0);
|
|
306
|
-
return ret;
|
|
1089
|
+
function handleError(f, args) {
|
|
1090
|
+
try {
|
|
1091
|
+
return f.apply(this, args);
|
|
1092
|
+
} catch (e) {
|
|
1093
|
+
const idx = addToExternrefTable0(e);
|
|
1094
|
+
wasm.__wbindgen_exn_store(idx);
|
|
1095
|
+
}
|
|
307
1096
|
}
|
|
308
1097
|
|
|
309
|
-
|
|
310
|
-
|
|
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;
|
|
1098
|
+
function isLikeNone(x) {
|
|
1099
|
+
return x === undefined || x === null;
|
|
319
1100
|
}
|
|
320
1101
|
|
|
321
|
-
function
|
|
322
|
-
|
|
323
|
-
|
|
1102
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
1103
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1104
|
+
const real = (...args) => {
|
|
324
1105
|
|
|
325
|
-
|
|
326
|
-
|
|
1106
|
+
// First up with a closure we increment the internal reference
|
|
1107
|
+
// count. This ensures that the Rust closure environment won't
|
|
1108
|
+
// be deallocated while we're invoking it.
|
|
1109
|
+
state.cnt++;
|
|
1110
|
+
const a = state.a;
|
|
1111
|
+
state.a = 0;
|
|
1112
|
+
try {
|
|
1113
|
+
return f(a, state.b, ...args);
|
|
1114
|
+
} finally {
|
|
1115
|
+
state.a = a;
|
|
1116
|
+
real._wbg_cb_unref();
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
real._wbg_cb_unref = () => {
|
|
1120
|
+
if (--state.cnt === 0) {
|
|
1121
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
1122
|
+
state.a = 0;
|
|
1123
|
+
CLOSURE_DTORS.unregister(state);
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1127
|
+
return real;
|
|
327
1128
|
}
|
|
328
1129
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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);
|
|
1130
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1131
|
+
if (realloc === undefined) {
|
|
1132
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1133
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1134
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1135
|
+
WASM_VECTOR_LEN = buf.length;
|
|
353
1136
|
return ptr;
|
|
354
1137
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
const
|
|
365
|
-
if (
|
|
366
|
-
|
|
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;
|
|
1138
|
+
|
|
1139
|
+
let len = arg.length;
|
|
1140
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1141
|
+
|
|
1142
|
+
const mem = getUint8ArrayMemory0();
|
|
1143
|
+
|
|
1144
|
+
let offset = 0;
|
|
1145
|
+
|
|
1146
|
+
for (; offset < len; offset++) {
|
|
1147
|
+
const code = arg.charCodeAt(offset);
|
|
1148
|
+
if (code > 0x7F) break;
|
|
1149
|
+
mem[ptr + offset] = code;
|
|
429
1150
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
const
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
1151
|
+
if (offset !== len) {
|
|
1152
|
+
if (offset !== 0) {
|
|
1153
|
+
arg = arg.slice(offset);
|
|
1154
|
+
}
|
|
1155
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1156
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1157
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1158
|
+
|
|
1159
|
+
offset += ret.written;
|
|
1160
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
440
1161
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
1162
|
+
|
|
1163
|
+
WASM_VECTOR_LEN = offset;
|
|
1164
|
+
return ptr;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
function takeFromExternrefTable0(idx) {
|
|
1168
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1169
|
+
wasm.__externref_table_dealloc(idx);
|
|
1170
|
+
return value;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1174
|
+
cachedTextDecoder.decode();
|
|
1175
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1176
|
+
let numBytesDecoded = 0;
|
|
1177
|
+
function decodeText(ptr, len) {
|
|
1178
|
+
numBytesDecoded += len;
|
|
1179
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1180
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1181
|
+
cachedTextDecoder.decode();
|
|
1182
|
+
numBytesDecoded = len;
|
|
456
1183
|
}
|
|
1184
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1188
|
+
|
|
1189
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1190
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1191
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1192
|
+
view.set(buf);
|
|
1193
|
+
return {
|
|
1194
|
+
read: arg.length,
|
|
1195
|
+
written: buf.length
|
|
1196
|
+
};
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
let WASM_VECTOR_LEN = 0;
|
|
1201
|
+
|
|
1202
|
+
let wasmModule, wasmInstance, wasm;
|
|
1203
|
+
function __wbg_finalize_init(instance, module) {
|
|
1204
|
+
wasmInstance = instance;
|
|
1205
|
+
wasm = instance.exports;
|
|
1206
|
+
wasmModule = module;
|
|
1207
|
+
cachedDataViewMemory0 = null;
|
|
1208
|
+
cachedUint8ArrayMemory0 = null;
|
|
1209
|
+
wasm.__wbindgen_start();
|
|
1210
|
+
return wasm;
|
|
457
1211
|
}
|
|
458
1212
|
|
|
459
1213
|
async function __wbg_load(module, imports) {
|
|
460
1214
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
1215
|
+
if (!module.ok) {
|
|
1216
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
1217
|
+
}
|
|
1218
|
+
|
|
461
1219
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
462
1220
|
try {
|
|
463
1221
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
464
|
-
|
|
465
1222
|
} catch (e) {
|
|
466
|
-
|
|
1223
|
+
const validResponse = expectedResponseType(module.type);
|
|
1224
|
+
|
|
1225
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
467
1226
|
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
1227
|
|
|
469
|
-
} else {
|
|
470
|
-
throw e;
|
|
471
|
-
}
|
|
1228
|
+
} else { throw e; }
|
|
472
1229
|
}
|
|
473
1230
|
}
|
|
474
1231
|
|
|
475
1232
|
const bytes = await module.arrayBuffer();
|
|
476
1233
|
return await WebAssembly.instantiate(bytes, imports);
|
|
477
|
-
|
|
478
1234
|
} else {
|
|
479
1235
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
480
1236
|
|
|
481
1237
|
if (instance instanceof WebAssembly.Instance) {
|
|
482
1238
|
return { instance, module };
|
|
483
|
-
|
|
484
1239
|
} else {
|
|
485
1240
|
return instance;
|
|
486
1241
|
}
|
|
487
1242
|
}
|
|
488
|
-
}
|
|
489
1243
|
|
|
490
|
-
function
|
|
491
|
-
|
|
492
|
-
|
|
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;
|
|
1244
|
+
function expectedResponseType(type) {
|
|
1245
|
+
switch (type) {
|
|
1246
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
815
1247
|
}
|
|
816
|
-
|
|
817
|
-
|
|
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;
|
|
1248
|
+
return false;
|
|
1249
|
+
}
|
|
927
1250
|
}
|
|
928
1251
|
|
|
929
1252
|
function initSync(module) {
|
|
930
1253
|
if (wasm !== undefined) return wasm;
|
|
931
1254
|
|
|
932
1255
|
|
|
933
|
-
if (
|
|
1256
|
+
if (module !== undefined) {
|
|
934
1257
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
935
1258
|
({module} = module)
|
|
936
1259
|
} else {
|
|
@@ -939,15 +1262,10 @@ function initSync(module) {
|
|
|
939
1262
|
}
|
|
940
1263
|
|
|
941
1264
|
const imports = __wbg_get_imports();
|
|
942
|
-
|
|
943
|
-
__wbg_init_memory(imports);
|
|
944
|
-
|
|
945
1265
|
if (!(module instanceof WebAssembly.Module)) {
|
|
946
1266
|
module = new WebAssembly.Module(module);
|
|
947
1267
|
}
|
|
948
|
-
|
|
949
1268
|
const instance = new WebAssembly.Instance(module, imports);
|
|
950
|
-
|
|
951
1269
|
return __wbg_finalize_init(instance, module);
|
|
952
1270
|
}
|
|
953
1271
|
|
|
@@ -955,7 +1273,7 @@ async function __wbg_init(module_or_path) {
|
|
|
955
1273
|
if (wasm !== undefined) return wasm;
|
|
956
1274
|
|
|
957
1275
|
|
|
958
|
-
if (
|
|
1276
|
+
if (module_or_path !== undefined) {
|
|
959
1277
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
960
1278
|
({module_or_path} = module_or_path)
|
|
961
1279
|
} else {
|
|
@@ -963,7 +1281,7 @@ async function __wbg_init(module_or_path) {
|
|
|
963
1281
|
}
|
|
964
1282
|
}
|
|
965
1283
|
|
|
966
|
-
if (
|
|
1284
|
+
if (module_or_path === undefined) {
|
|
967
1285
|
module_or_path = new URL('rust_fetch_bg.wasm', import.meta.url);
|
|
968
1286
|
}
|
|
969
1287
|
const imports = __wbg_get_imports();
|
|
@@ -972,12 +1290,9 @@ async function __wbg_init(module_or_path) {
|
|
|
972
1290
|
module_or_path = fetch(module_or_path);
|
|
973
1291
|
}
|
|
974
1292
|
|
|
975
|
-
__wbg_init_memory(imports);
|
|
976
|
-
|
|
977
1293
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
978
1294
|
|
|
979
1295
|
return __wbg_finalize_init(instance, module);
|
|
980
1296
|
}
|
|
981
1297
|
|
|
982
|
-
export { initSync };
|
|
983
|
-
export default __wbg_init;
|
|
1298
|
+
export { initSync, __wbg_init as default };
|