pluto-rtc 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -0
- package/dist/Connection.d.ts +35 -0
- package/dist/Connection.js +146 -0
- package/dist/ConnectionManager.d.ts +38 -0
- package/dist/ConnectionManager.js +78 -0
- package/dist/api/MediaTransport.d.ts +7 -0
- package/dist/api/MediaTransport.js +262 -0
- package/dist/api/PlutoPeerConnection.d.ts +38 -0
- package/dist/api/PlutoPeerConnection.js +242 -0
- package/dist/api/PlutoWebSocket.d.ts +24 -0
- package/dist/api/PlutoWebSocket.js +112 -0
- package/dist/api/PlutoWebTransport.d.ts +28 -0
- package/dist/api/PlutoWebTransport.js +88 -0
- package/dist/core/Client.d.ts +70 -0
- package/dist/core/Client.js +326 -0
- package/dist/core/Connection.d.ts +66 -0
- package/dist/core/Connection.js +392 -0
- package/dist/core/Room.d.ts +29 -0
- package/dist/core/Room.js +297 -0
- package/dist/core/Signaling.d.ts +37 -0
- package/dist/core/Signaling.js +199 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/react/index.d.ts +9 -0
- package/dist/react/index.js +34 -0
- package/package.json +47 -0
- package/wasm/pkg/README.md +218 -0
- package/wasm/pkg/iroh_wasm.d.ts +148 -0
- package/wasm/pkg/iroh_wasm.js +1382 -0
- package/wasm/pkg/iroh_wasm_bg.wasm +0 -0
- package/wasm/pkg/iroh_wasm_bg.wasm.d.ts +58 -0
- package/wasm/pkg/package.json +15 -0
|
@@ -0,0 +1,1382 @@
|
|
|
1
|
+
/* @ts-self-types="./iroh_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
export class BiStream {
|
|
4
|
+
static __wrap(ptr) {
|
|
5
|
+
ptr = ptr >>> 0;
|
|
6
|
+
const obj = Object.create(BiStream.prototype);
|
|
7
|
+
obj.__wbg_ptr = ptr;
|
|
8
|
+
BiStreamFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
9
|
+
return obj;
|
|
10
|
+
}
|
|
11
|
+
__destroy_into_raw() {
|
|
12
|
+
const ptr = this.__wbg_ptr;
|
|
13
|
+
this.__wbg_ptr = 0;
|
|
14
|
+
BiStreamFinalization.unregister(this);
|
|
15
|
+
return ptr;
|
|
16
|
+
}
|
|
17
|
+
free() {
|
|
18
|
+
const ptr = this.__destroy_into_raw();
|
|
19
|
+
wasm.__wbg_bistream_free(ptr, 0);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns {string}
|
|
23
|
+
*/
|
|
24
|
+
get endpoint_id() {
|
|
25
|
+
let deferred1_0;
|
|
26
|
+
let deferred1_1;
|
|
27
|
+
try {
|
|
28
|
+
const ret = wasm.bistream_endpoint_id(this.__wbg_ptr);
|
|
29
|
+
deferred1_0 = ret[0];
|
|
30
|
+
deferred1_1 = ret[1];
|
|
31
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
32
|
+
} finally {
|
|
33
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @returns {ReadableStream}
|
|
38
|
+
*/
|
|
39
|
+
get recv() {
|
|
40
|
+
const ret = wasm.bistream_recv(this.__wbg_ptr);
|
|
41
|
+
return ret;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @returns {WritableStream}
|
|
45
|
+
*/
|
|
46
|
+
get send() {
|
|
47
|
+
const ret = wasm.bistream_send(this.__wbg_ptr);
|
|
48
|
+
return ret;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (Symbol.dispose) BiStream.prototype[Symbol.dispose] = BiStream.prototype.free;
|
|
52
|
+
|
|
53
|
+
export class IntoUnderlyingByteSource {
|
|
54
|
+
static __wrap(ptr) {
|
|
55
|
+
ptr = ptr >>> 0;
|
|
56
|
+
const obj = Object.create(IntoUnderlyingByteSource.prototype);
|
|
57
|
+
obj.__wbg_ptr = ptr;
|
|
58
|
+
IntoUnderlyingByteSourceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
59
|
+
return obj;
|
|
60
|
+
}
|
|
61
|
+
__destroy_into_raw() {
|
|
62
|
+
const ptr = this.__wbg_ptr;
|
|
63
|
+
this.__wbg_ptr = 0;
|
|
64
|
+
IntoUnderlyingByteSourceFinalization.unregister(this);
|
|
65
|
+
return ptr;
|
|
66
|
+
}
|
|
67
|
+
free() {
|
|
68
|
+
const ptr = this.__destroy_into_raw();
|
|
69
|
+
wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @returns {number}
|
|
73
|
+
*/
|
|
74
|
+
get autoAllocateChunkSize() {
|
|
75
|
+
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
76
|
+
return ret >>> 0;
|
|
77
|
+
}
|
|
78
|
+
cancel() {
|
|
79
|
+
const ptr = this.__destroy_into_raw();
|
|
80
|
+
wasm.intounderlyingbytesource_cancel(ptr);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @param {ReadableByteStreamController} controller
|
|
84
|
+
* @returns {Promise<any>}
|
|
85
|
+
*/
|
|
86
|
+
pull(controller) {
|
|
87
|
+
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
|
|
88
|
+
return ret;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @param {ReadableByteStreamController} controller
|
|
92
|
+
*/
|
|
93
|
+
start(controller) {
|
|
94
|
+
wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @returns {ReadableStreamType}
|
|
98
|
+
*/
|
|
99
|
+
get type() {
|
|
100
|
+
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
101
|
+
return __wbindgen_enum_ReadableStreamType[ret];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
|
|
105
|
+
|
|
106
|
+
export class IntoUnderlyingSink {
|
|
107
|
+
static __wrap(ptr) {
|
|
108
|
+
ptr = ptr >>> 0;
|
|
109
|
+
const obj = Object.create(IntoUnderlyingSink.prototype);
|
|
110
|
+
obj.__wbg_ptr = ptr;
|
|
111
|
+
IntoUnderlyingSinkFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
112
|
+
return obj;
|
|
113
|
+
}
|
|
114
|
+
__destroy_into_raw() {
|
|
115
|
+
const ptr = this.__wbg_ptr;
|
|
116
|
+
this.__wbg_ptr = 0;
|
|
117
|
+
IntoUnderlyingSinkFinalization.unregister(this);
|
|
118
|
+
return ptr;
|
|
119
|
+
}
|
|
120
|
+
free() {
|
|
121
|
+
const ptr = this.__destroy_into_raw();
|
|
122
|
+
wasm.__wbg_intounderlyingsink_free(ptr, 0);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @param {any} reason
|
|
126
|
+
* @returns {Promise<any>}
|
|
127
|
+
*/
|
|
128
|
+
abort(reason) {
|
|
129
|
+
const ptr = this.__destroy_into_raw();
|
|
130
|
+
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
131
|
+
return ret;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @returns {Promise<any>}
|
|
135
|
+
*/
|
|
136
|
+
close() {
|
|
137
|
+
const ptr = this.__destroy_into_raw();
|
|
138
|
+
const ret = wasm.intounderlyingsink_close(ptr);
|
|
139
|
+
return ret;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @param {any} chunk
|
|
143
|
+
* @returns {Promise<any>}
|
|
144
|
+
*/
|
|
145
|
+
write(chunk) {
|
|
146
|
+
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
|
|
147
|
+
return ret;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
|
|
151
|
+
|
|
152
|
+
export class IntoUnderlyingSource {
|
|
153
|
+
static __wrap(ptr) {
|
|
154
|
+
ptr = ptr >>> 0;
|
|
155
|
+
const obj = Object.create(IntoUnderlyingSource.prototype);
|
|
156
|
+
obj.__wbg_ptr = ptr;
|
|
157
|
+
IntoUnderlyingSourceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
158
|
+
return obj;
|
|
159
|
+
}
|
|
160
|
+
__destroy_into_raw() {
|
|
161
|
+
const ptr = this.__wbg_ptr;
|
|
162
|
+
this.__wbg_ptr = 0;
|
|
163
|
+
IntoUnderlyingSourceFinalization.unregister(this);
|
|
164
|
+
return ptr;
|
|
165
|
+
}
|
|
166
|
+
free() {
|
|
167
|
+
const ptr = this.__destroy_into_raw();
|
|
168
|
+
wasm.__wbg_intounderlyingsource_free(ptr, 0);
|
|
169
|
+
}
|
|
170
|
+
cancel() {
|
|
171
|
+
const ptr = this.__destroy_into_raw();
|
|
172
|
+
wasm.intounderlyingsource_cancel(ptr);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @param {ReadableStreamDefaultController} controller
|
|
176
|
+
* @returns {Promise<any>}
|
|
177
|
+
*/
|
|
178
|
+
pull(controller) {
|
|
179
|
+
const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
|
|
180
|
+
return ret;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
|
|
184
|
+
|
|
185
|
+
export class IrohNode {
|
|
186
|
+
static __wrap(ptr) {
|
|
187
|
+
ptr = ptr >>> 0;
|
|
188
|
+
const obj = Object.create(IrohNode.prototype);
|
|
189
|
+
obj.__wbg_ptr = ptr;
|
|
190
|
+
IrohNodeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
191
|
+
return obj;
|
|
192
|
+
}
|
|
193
|
+
__destroy_into_raw() {
|
|
194
|
+
const ptr = this.__wbg_ptr;
|
|
195
|
+
this.__wbg_ptr = 0;
|
|
196
|
+
IrohNodeFinalization.unregister(this);
|
|
197
|
+
return ptr;
|
|
198
|
+
}
|
|
199
|
+
free() {
|
|
200
|
+
const ptr = this.__destroy_into_raw();
|
|
201
|
+
wasm.__wbg_irohnode_free(ptr, 0);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* @param {string} node_id
|
|
205
|
+
* @param {string | null | undefined} relay_url
|
|
206
|
+
* @param {string[]} direct_addresses
|
|
207
|
+
* @returns {Promise<void>}
|
|
208
|
+
*/
|
|
209
|
+
addNodeAddr(node_id, relay_url, direct_addresses) {
|
|
210
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
211
|
+
const len0 = WASM_VECTOR_LEN;
|
|
212
|
+
var ptr1 = isLikeNone(relay_url) ? 0 : passStringToWasm0(relay_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
213
|
+
var len1 = WASM_VECTOR_LEN;
|
|
214
|
+
const ptr2 = passArrayJsValueToWasm0(direct_addresses, wasm.__wbindgen_malloc);
|
|
215
|
+
const len2 = WASM_VECTOR_LEN;
|
|
216
|
+
const ret = wasm.irohnode_addNodeAddr(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
217
|
+
return ret;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* @param {string} endpoint_id
|
|
221
|
+
* @returns {ReadableStream}
|
|
222
|
+
*/
|
|
223
|
+
connect(endpoint_id) {
|
|
224
|
+
const ptr0 = passStringToWasm0(endpoint_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
225
|
+
const len0 = WASM_VECTOR_LEN;
|
|
226
|
+
const ret = wasm.irohnode_connect(this.__wbg_ptr, ptr0, len0);
|
|
227
|
+
if (ret[2]) {
|
|
228
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
229
|
+
}
|
|
230
|
+
return takeFromExternrefTable0(ret[0]);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* @param {string} endpoint_id
|
|
234
|
+
* @returns {Promise<void>}
|
|
235
|
+
*/
|
|
236
|
+
disconnect(endpoint_id) {
|
|
237
|
+
const ptr0 = passStringToWasm0(endpoint_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
238
|
+
const len0 = WASM_VECTOR_LEN;
|
|
239
|
+
const ret = wasm.irohnode_disconnect(this.__wbg_ptr, ptr0, len0);
|
|
240
|
+
return ret;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* @returns {string}
|
|
244
|
+
*/
|
|
245
|
+
get endpoint_id() {
|
|
246
|
+
let deferred1_0;
|
|
247
|
+
let deferred1_1;
|
|
248
|
+
try {
|
|
249
|
+
const ret = wasm.irohnode_endpoint_id(this.__wbg_ptr);
|
|
250
|
+
deferred1_0 = ret[0];
|
|
251
|
+
deferred1_1 = ret[1];
|
|
252
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
253
|
+
} finally {
|
|
254
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @returns {ReadableStream}
|
|
259
|
+
*/
|
|
260
|
+
events() {
|
|
261
|
+
const ret = wasm.irohnode_events(this.__wbg_ptr);
|
|
262
|
+
return ret;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* @returns {ReadableStream}
|
|
266
|
+
*/
|
|
267
|
+
incoming_streams() {
|
|
268
|
+
const ret = wasm.irohnode_incoming_streams(this.__wbg_ptr);
|
|
269
|
+
return ret;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @returns {Promise<string>}
|
|
273
|
+
*/
|
|
274
|
+
node_addr() {
|
|
275
|
+
const ret = wasm.irohnode_node_addr(this.__wbg_ptr);
|
|
276
|
+
return ret;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* @param {string} endpoint_id
|
|
280
|
+
* @returns {Promise<BiStream>}
|
|
281
|
+
*/
|
|
282
|
+
open_bi(endpoint_id) {
|
|
283
|
+
const ptr0 = passStringToWasm0(endpoint_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
284
|
+
const len0 = WASM_VECTOR_LEN;
|
|
285
|
+
const ret = wasm.irohnode_open_bi(this.__wbg_ptr, ptr0, len0);
|
|
286
|
+
return ret;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* @param {string} endpoint_id
|
|
290
|
+
* @returns {Promise<WritableStream>}
|
|
291
|
+
*/
|
|
292
|
+
open_uni(endpoint_id) {
|
|
293
|
+
const ptr0 = passStringToWasm0(endpoint_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
294
|
+
const len0 = WASM_VECTOR_LEN;
|
|
295
|
+
const ret = wasm.irohnode_open_uni(this.__wbg_ptr, ptr0, len0);
|
|
296
|
+
return ret;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* @returns {Uint8Array}
|
|
300
|
+
*/
|
|
301
|
+
get secret_key() {
|
|
302
|
+
const ret = wasm.irohnode_secret_key(this.__wbg_ptr);
|
|
303
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
304
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
305
|
+
return v1;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* @param {Uint8Array | null} [secret_key]
|
|
309
|
+
* @returns {Promise<IrohNode>}
|
|
310
|
+
*/
|
|
311
|
+
static spawn(secret_key) {
|
|
312
|
+
var ptr0 = isLikeNone(secret_key) ? 0 : passArray8ToWasm0(secret_key, wasm.__wbindgen_malloc);
|
|
313
|
+
var len0 = WASM_VECTOR_LEN;
|
|
314
|
+
const ret = wasm.irohnode_spawn(ptr0, len0);
|
|
315
|
+
return ret;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
if (Symbol.dispose) IrohNode.prototype[Symbol.dispose] = IrohNode.prototype.free;
|
|
319
|
+
|
|
320
|
+
export function start() {
|
|
321
|
+
wasm.start();
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function __wbg_get_imports() {
|
|
325
|
+
const import0 = {
|
|
326
|
+
__proto__: null,
|
|
327
|
+
__wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
|
|
328
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
329
|
+
return ret;
|
|
330
|
+
},
|
|
331
|
+
__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
|
|
332
|
+
const v = arg0;
|
|
333
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
334
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
335
|
+
},
|
|
336
|
+
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
|
|
337
|
+
const ret = debugString(arg1);
|
|
338
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
339
|
+
const len1 = WASM_VECTOR_LEN;
|
|
340
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
341
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
342
|
+
},
|
|
343
|
+
__wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
|
|
344
|
+
const ret = typeof(arg0) === 'function';
|
|
345
|
+
return ret;
|
|
346
|
+
},
|
|
347
|
+
__wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(arg0) {
|
|
348
|
+
const val = arg0;
|
|
349
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
350
|
+
return ret;
|
|
351
|
+
},
|
|
352
|
+
__wbg___wbindgen_is_string_cd444516edc5b180: function(arg0) {
|
|
353
|
+
const ret = typeof(arg0) === 'string';
|
|
354
|
+
return ret;
|
|
355
|
+
},
|
|
356
|
+
__wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
|
|
357
|
+
const ret = arg0 === undefined;
|
|
358
|
+
return ret;
|
|
359
|
+
},
|
|
360
|
+
__wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
|
|
361
|
+
const obj = arg1;
|
|
362
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
363
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
364
|
+
var len1 = WASM_VECTOR_LEN;
|
|
365
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
366
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
367
|
+
},
|
|
368
|
+
__wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
|
|
369
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
370
|
+
},
|
|
371
|
+
__wbg__wbg_cb_unref_d9b87ff7982e3b21: function(arg0) {
|
|
372
|
+
arg0._wbg_cb_unref();
|
|
373
|
+
},
|
|
374
|
+
__wbg_abort_2f0584e03e8e3950: function(arg0) {
|
|
375
|
+
arg0.abort();
|
|
376
|
+
},
|
|
377
|
+
__wbg_abort_d549b92d3c665de1: function(arg0, arg1) {
|
|
378
|
+
arg0.abort(arg1);
|
|
379
|
+
},
|
|
380
|
+
__wbg_addEventListener_14e74488d3142fa7: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
381
|
+
arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
382
|
+
}, arguments); },
|
|
383
|
+
__wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
384
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
385
|
+
}, arguments); },
|
|
386
|
+
__wbg_arrayBuffer_bb54076166006c39: function() { return handleError(function (arg0) {
|
|
387
|
+
const ret = arg0.arrayBuffer();
|
|
388
|
+
return ret;
|
|
389
|
+
}, arguments); },
|
|
390
|
+
__wbg_bistream_new: function(arg0) {
|
|
391
|
+
const ret = BiStream.__wrap(arg0);
|
|
392
|
+
return ret;
|
|
393
|
+
},
|
|
394
|
+
__wbg_body_3a0b4437dadea6bf: function(arg0) {
|
|
395
|
+
const ret = arg0.body;
|
|
396
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
397
|
+
},
|
|
398
|
+
__wbg_buffer_26d0910f3a5bc899: function(arg0) {
|
|
399
|
+
const ret = arg0.buffer;
|
|
400
|
+
return ret;
|
|
401
|
+
},
|
|
402
|
+
__wbg_byobRequest_80e594e6da4e1af7: function(arg0) {
|
|
403
|
+
const ret = arg0.byobRequest;
|
|
404
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
405
|
+
},
|
|
406
|
+
__wbg_byteLength_3417f266f4bf562a: function(arg0) {
|
|
407
|
+
const ret = arg0.byteLength;
|
|
408
|
+
return ret;
|
|
409
|
+
},
|
|
410
|
+
__wbg_byteOffset_f88547ca47c86358: function(arg0) {
|
|
411
|
+
const ret = arg0.byteOffset;
|
|
412
|
+
return ret;
|
|
413
|
+
},
|
|
414
|
+
__wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
|
|
415
|
+
const ret = arg0.call(arg1);
|
|
416
|
+
return ret;
|
|
417
|
+
}, arguments); },
|
|
418
|
+
__wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
|
|
419
|
+
const ret = arg0.call(arg1, arg2);
|
|
420
|
+
return ret;
|
|
421
|
+
}, arguments); },
|
|
422
|
+
__wbg_cancel_2c0a0a251ff6b2b7: function(arg0) {
|
|
423
|
+
const ret = arg0.cancel();
|
|
424
|
+
return ret;
|
|
425
|
+
},
|
|
426
|
+
__wbg_catch_c1f8c7623b458214: function(arg0, arg1) {
|
|
427
|
+
const ret = arg0.catch(arg1);
|
|
428
|
+
return ret;
|
|
429
|
+
},
|
|
430
|
+
__wbg_clearTimeout_7a42b49784aea641: function(arg0) {
|
|
431
|
+
const ret = clearTimeout(arg0);
|
|
432
|
+
return ret;
|
|
433
|
+
},
|
|
434
|
+
__wbg_clearTimeout_f7a6c75a3d228439: function() { return handleError(function (arg0, arg1) {
|
|
435
|
+
arg0.clearTimeout(arg1);
|
|
436
|
+
}, arguments); },
|
|
437
|
+
__wbg_close_06dfa0a815b9d71f: function() { return handleError(function (arg0) {
|
|
438
|
+
arg0.close();
|
|
439
|
+
}, arguments); },
|
|
440
|
+
__wbg_close_1d08eaf57ed325c0: function() { return handleError(function (arg0) {
|
|
441
|
+
arg0.close();
|
|
442
|
+
}, arguments); },
|
|
443
|
+
__wbg_close_a79afee31de55b36: function() { return handleError(function (arg0) {
|
|
444
|
+
arg0.close();
|
|
445
|
+
}, arguments); },
|
|
446
|
+
__wbg_code_35e4ec59fbc7d427: function(arg0) {
|
|
447
|
+
const ret = arg0.code;
|
|
448
|
+
return ret;
|
|
449
|
+
},
|
|
450
|
+
__wbg_code_a552f1e91eda69b7: function(arg0) {
|
|
451
|
+
const ret = arg0.code;
|
|
452
|
+
return ret;
|
|
453
|
+
},
|
|
454
|
+
__wbg_crypto_574e78ad8b13b65f: function(arg0) {
|
|
455
|
+
const ret = arg0.crypto;
|
|
456
|
+
return ret;
|
|
457
|
+
},
|
|
458
|
+
__wbg_data_5330da50312d0bc1: function(arg0) {
|
|
459
|
+
const ret = arg0.data;
|
|
460
|
+
return ret;
|
|
461
|
+
},
|
|
462
|
+
__wbg_debug_55137df391ebfd29: function(arg0, arg1) {
|
|
463
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
464
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
465
|
+
console.debug(...v0);
|
|
466
|
+
},
|
|
467
|
+
__wbg_done_57b39ecd9addfe81: function(arg0) {
|
|
468
|
+
const ret = arg0.done;
|
|
469
|
+
return ret;
|
|
470
|
+
},
|
|
471
|
+
__wbg_enqueue_2c63f2044f257c3e: function() { return handleError(function (arg0, arg1) {
|
|
472
|
+
arg0.enqueue(arg1);
|
|
473
|
+
}, arguments); },
|
|
474
|
+
__wbg_error_7534b8e9a36f1ab4: function(arg0, arg1) {
|
|
475
|
+
let deferred0_0;
|
|
476
|
+
let deferred0_1;
|
|
477
|
+
try {
|
|
478
|
+
deferred0_0 = arg0;
|
|
479
|
+
deferred0_1 = arg1;
|
|
480
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
481
|
+
} finally {
|
|
482
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
__wbg_error_91947ba14c44e1c9: function(arg0, arg1) {
|
|
486
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
487
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
488
|
+
console.error(...v0);
|
|
489
|
+
},
|
|
490
|
+
__wbg_fetch_74a3e84ebd2c9a0e: function(arg0) {
|
|
491
|
+
const ret = fetch(arg0);
|
|
492
|
+
return ret;
|
|
493
|
+
},
|
|
494
|
+
__wbg_fetch_afb6a4b6cacf876d: function(arg0, arg1) {
|
|
495
|
+
const ret = arg0.fetch(arg1);
|
|
496
|
+
return ret;
|
|
497
|
+
},
|
|
498
|
+
__wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
|
|
499
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
500
|
+
}, arguments); },
|
|
501
|
+
__wbg_getRandomValues_b8f5dbd5f3995a9e: function() { return handleError(function (arg0, arg1) {
|
|
502
|
+
arg0.getRandomValues(arg1);
|
|
503
|
+
}, arguments); },
|
|
504
|
+
__wbg_getReader_48e00749fe3f6089: function() { return handleError(function (arg0) {
|
|
505
|
+
const ret = arg0.getReader();
|
|
506
|
+
return ret;
|
|
507
|
+
}, arguments); },
|
|
508
|
+
__wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
|
|
509
|
+
const ret = Reflect.get(arg0, arg1);
|
|
510
|
+
return ret;
|
|
511
|
+
}, arguments); },
|
|
512
|
+
__wbg_get_done_1ad1c16537f444c6: function(arg0) {
|
|
513
|
+
const ret = arg0.done;
|
|
514
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
515
|
+
},
|
|
516
|
+
__wbg_get_value_6b77a1b7b90c9200: function(arg0) {
|
|
517
|
+
const ret = arg0.value;
|
|
518
|
+
return ret;
|
|
519
|
+
},
|
|
520
|
+
__wbg_has_d4e53238966c12b6: function() { return handleError(function (arg0, arg1) {
|
|
521
|
+
const ret = Reflect.has(arg0, arg1);
|
|
522
|
+
return ret;
|
|
523
|
+
}, arguments); },
|
|
524
|
+
__wbg_headers_59a2938db9f80985: function(arg0) {
|
|
525
|
+
const ret = arg0.headers;
|
|
526
|
+
return ret;
|
|
527
|
+
},
|
|
528
|
+
__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
|
|
529
|
+
let result;
|
|
530
|
+
try {
|
|
531
|
+
result = arg0 instanceof ArrayBuffer;
|
|
532
|
+
} catch (_) {
|
|
533
|
+
result = false;
|
|
534
|
+
}
|
|
535
|
+
const ret = result;
|
|
536
|
+
return ret;
|
|
537
|
+
},
|
|
538
|
+
__wbg_instanceof_Blob_ce92a9ddd729a84a: function(arg0) {
|
|
539
|
+
let result;
|
|
540
|
+
try {
|
|
541
|
+
result = arg0 instanceof Blob;
|
|
542
|
+
} catch (_) {
|
|
543
|
+
result = false;
|
|
544
|
+
}
|
|
545
|
+
const ret = result;
|
|
546
|
+
return ret;
|
|
547
|
+
},
|
|
548
|
+
__wbg_instanceof_Response_ee1d54d79ae41977: function(arg0) {
|
|
549
|
+
let result;
|
|
550
|
+
try {
|
|
551
|
+
result = arg0 instanceof Response;
|
|
552
|
+
} catch (_) {
|
|
553
|
+
result = false;
|
|
554
|
+
}
|
|
555
|
+
const ret = result;
|
|
556
|
+
return ret;
|
|
557
|
+
},
|
|
558
|
+
__wbg_irohnode_new: function(arg0) {
|
|
559
|
+
const ret = IrohNode.__wrap(arg0);
|
|
560
|
+
return ret;
|
|
561
|
+
},
|
|
562
|
+
__wbg_iterator_6ff6560ca1568e55: function() {
|
|
563
|
+
const ret = Symbol.iterator;
|
|
564
|
+
return ret;
|
|
565
|
+
},
|
|
566
|
+
__wbg_length_32ed9a279acd054c: function(arg0) {
|
|
567
|
+
const ret = arg0.length;
|
|
568
|
+
return ret;
|
|
569
|
+
},
|
|
570
|
+
__wbg_log_e51ef223c244b133: function(arg0, arg1) {
|
|
571
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
572
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
573
|
+
console.log(...v0);
|
|
574
|
+
},
|
|
575
|
+
__wbg_message_0b2b0298a231b0d4: function(arg0, arg1) {
|
|
576
|
+
const ret = arg1.message;
|
|
577
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
578
|
+
const len1 = WASM_VECTOR_LEN;
|
|
579
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
580
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
581
|
+
},
|
|
582
|
+
__wbg_msCrypto_a61aeb35a24c1329: function(arg0) {
|
|
583
|
+
const ret = arg0.msCrypto;
|
|
584
|
+
return ret;
|
|
585
|
+
},
|
|
586
|
+
__wbg_new_057993d5b5e07835: function() { return handleError(function (arg0, arg1) {
|
|
587
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
588
|
+
return ret;
|
|
589
|
+
}, arguments); },
|
|
590
|
+
__wbg_new_361308b2356cecd0: function() {
|
|
591
|
+
const ret = new Object();
|
|
592
|
+
return ret;
|
|
593
|
+
},
|
|
594
|
+
__wbg_new_3eb36ae241fe6f44: function() {
|
|
595
|
+
const ret = new Array();
|
|
596
|
+
return ret;
|
|
597
|
+
},
|
|
598
|
+
__wbg_new_64284bd487f9d239: function() { return handleError(function () {
|
|
599
|
+
const ret = new Headers();
|
|
600
|
+
return ret;
|
|
601
|
+
}, arguments); },
|
|
602
|
+
__wbg_new_72b49615380db768: function(arg0, arg1) {
|
|
603
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
604
|
+
return ret;
|
|
605
|
+
},
|
|
606
|
+
__wbg_new_8a6f238a6ece86ea: function() {
|
|
607
|
+
const ret = new Error();
|
|
608
|
+
return ret;
|
|
609
|
+
},
|
|
610
|
+
__wbg_new_b5d9e2fb389fef91: function(arg0, arg1) {
|
|
611
|
+
try {
|
|
612
|
+
var state0 = {a: arg0, b: arg1};
|
|
613
|
+
var cb0 = (arg0, arg1) => {
|
|
614
|
+
const a = state0.a;
|
|
615
|
+
state0.a = 0;
|
|
616
|
+
try {
|
|
617
|
+
return wasm_bindgen__convert__closures_____invoke__h39b19e5fabe12541(a, state0.b, arg0, arg1);
|
|
618
|
+
} finally {
|
|
619
|
+
state0.a = a;
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
const ret = new Promise(cb0);
|
|
623
|
+
return ret;
|
|
624
|
+
} finally {
|
|
625
|
+
state0.a = state0.b = 0;
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
__wbg_new_b949e7f56150a5d1: function() { return handleError(function () {
|
|
629
|
+
const ret = new AbortController();
|
|
630
|
+
return ret;
|
|
631
|
+
}, arguments); },
|
|
632
|
+
__wbg_new_dd2b680c8bf6ae29: function(arg0) {
|
|
633
|
+
const ret = new Uint8Array(arg0);
|
|
634
|
+
return ret;
|
|
635
|
+
},
|
|
636
|
+
__wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
|
|
637
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
638
|
+
return ret;
|
|
639
|
+
},
|
|
640
|
+
__wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
|
|
641
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
642
|
+
return ret;
|
|
643
|
+
},
|
|
644
|
+
__wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(arg0, arg1, arg2) {
|
|
645
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
646
|
+
return ret;
|
|
647
|
+
},
|
|
648
|
+
__wbg_new_with_into_underlying_byte_source_efd92db9d469fbc6: function() { return handleError(function (arg0) {
|
|
649
|
+
const ret = new ReadableStream(IntoUnderlyingByteSource.__wrap(arg0));
|
|
650
|
+
return ret;
|
|
651
|
+
}, arguments); },
|
|
652
|
+
__wbg_new_with_into_underlying_sink_08f1a3e40fc70d83: function(arg0) {
|
|
653
|
+
const ret = new WritableStream(IntoUnderlyingSink.__wrap(arg0));
|
|
654
|
+
return ret;
|
|
655
|
+
},
|
|
656
|
+
__wbg_new_with_into_underlying_source_b47f6a6a596a7f24: function(arg0, arg1) {
|
|
657
|
+
const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
|
|
658
|
+
return ret;
|
|
659
|
+
},
|
|
660
|
+
__wbg_new_with_length_a2c39cbe88fd8ff1: function(arg0) {
|
|
661
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
662
|
+
return ret;
|
|
663
|
+
},
|
|
664
|
+
__wbg_new_with_str_and_init_a61cbc6bdef21614: function() { return handleError(function (arg0, arg1, arg2) {
|
|
665
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
666
|
+
return ret;
|
|
667
|
+
}, arguments); },
|
|
668
|
+
__wbg_new_with_str_sequence_b67b3919b8b11238: function() { return handleError(function (arg0, arg1, arg2) {
|
|
669
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
670
|
+
return ret;
|
|
671
|
+
}, arguments); },
|
|
672
|
+
__wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
|
|
673
|
+
const ret = arg0.next();
|
|
674
|
+
return ret;
|
|
675
|
+
}, arguments); },
|
|
676
|
+
__wbg_next_418f80d8f5303233: function(arg0) {
|
|
677
|
+
const ret = arg0.next;
|
|
678
|
+
return ret;
|
|
679
|
+
},
|
|
680
|
+
__wbg_node_905d3e251edff8a2: function(arg0) {
|
|
681
|
+
const ret = arg0.node;
|
|
682
|
+
return ret;
|
|
683
|
+
},
|
|
684
|
+
__wbg_now_2c95c9de01293173: function(arg0) {
|
|
685
|
+
const ret = arg0.now();
|
|
686
|
+
return ret;
|
|
687
|
+
},
|
|
688
|
+
__wbg_now_a3af9a2f4bbaa4d1: function() {
|
|
689
|
+
const ret = Date.now();
|
|
690
|
+
return ret;
|
|
691
|
+
},
|
|
692
|
+
__wbg_performance_7a3ffd0b17f663ad: function(arg0) {
|
|
693
|
+
const ret = arg0.performance;
|
|
694
|
+
return ret;
|
|
695
|
+
},
|
|
696
|
+
__wbg_process_dc0fbacc7c1c06f7: function(arg0) {
|
|
697
|
+
const ret = arg0.process;
|
|
698
|
+
return ret;
|
|
699
|
+
},
|
|
700
|
+
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
|
|
701
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
702
|
+
},
|
|
703
|
+
__wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
|
|
704
|
+
const ret = arg0.push(arg1);
|
|
705
|
+
return ret;
|
|
706
|
+
},
|
|
707
|
+
__wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
|
|
708
|
+
const ret = arg0.queueMicrotask;
|
|
709
|
+
return ret;
|
|
710
|
+
},
|
|
711
|
+
__wbg_queueMicrotask_5bb536982f78a56f: function(arg0) {
|
|
712
|
+
queueMicrotask(arg0);
|
|
713
|
+
},
|
|
714
|
+
__wbg_randomFillSync_ac0988aba3254290: function() { return handleError(function (arg0, arg1) {
|
|
715
|
+
arg0.randomFillSync(arg1);
|
|
716
|
+
}, arguments); },
|
|
717
|
+
__wbg_read_68fd377df67e19b0: function(arg0) {
|
|
718
|
+
const ret = arg0.read();
|
|
719
|
+
return ret;
|
|
720
|
+
},
|
|
721
|
+
__wbg_readyState_1bb73ec7b8a54656: function(arg0) {
|
|
722
|
+
const ret = arg0.readyState;
|
|
723
|
+
return ret;
|
|
724
|
+
},
|
|
725
|
+
__wbg_reason_35fce8e55dd90f31: function(arg0, arg1) {
|
|
726
|
+
const ret = arg1.reason;
|
|
727
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
728
|
+
const len1 = WASM_VECTOR_LEN;
|
|
729
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
730
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
731
|
+
},
|
|
732
|
+
__wbg_releaseLock_aa5846c2494b3032: function(arg0) {
|
|
733
|
+
arg0.releaseLock();
|
|
734
|
+
},
|
|
735
|
+
__wbg_removeEventListener_34a7e78acf851dd7: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
736
|
+
arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
737
|
+
}, arguments); },
|
|
738
|
+
__wbg_require_60cc747a6bc5215a: function() { return handleError(function () {
|
|
739
|
+
const ret = module.require;
|
|
740
|
+
return ret;
|
|
741
|
+
}, arguments); },
|
|
742
|
+
__wbg_resolve_002c4b7d9d8f6b64: function(arg0) {
|
|
743
|
+
const ret = Promise.resolve(arg0);
|
|
744
|
+
return ret;
|
|
745
|
+
},
|
|
746
|
+
__wbg_respond_bf6ab10399ca8722: function() { return handleError(function (arg0, arg1) {
|
|
747
|
+
arg0.respond(arg1 >>> 0);
|
|
748
|
+
}, arguments); },
|
|
749
|
+
__wbg_send_542f95dea2df7994: function() { return handleError(function (arg0, arg1, arg2) {
|
|
750
|
+
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
751
|
+
}, arguments); },
|
|
752
|
+
__wbg_send_bc0336a1b5ce4fb7: function() { return handleError(function (arg0, arg1, arg2) {
|
|
753
|
+
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
754
|
+
}, arguments); },
|
|
755
|
+
__wbg_setTimeout_5a05e08489357e6b: function(arg0, arg1) {
|
|
756
|
+
const ret = setTimeout(arg0, arg1);
|
|
757
|
+
return ret;
|
|
758
|
+
},
|
|
759
|
+
__wbg_setTimeout_7bb3429662ab1e70: function(arg0, arg1) {
|
|
760
|
+
const ret = setTimeout(arg0, arg1);
|
|
761
|
+
return ret;
|
|
762
|
+
},
|
|
763
|
+
__wbg_setTimeout_ceaa8eadc563d26e: function() { return handleError(function (arg0, arg1, arg2) {
|
|
764
|
+
const ret = arg0.setTimeout(arg1, arg2);
|
|
765
|
+
return ret;
|
|
766
|
+
}, arguments); },
|
|
767
|
+
__wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
|
|
768
|
+
arg0[arg1] = arg2;
|
|
769
|
+
},
|
|
770
|
+
__wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
|
|
771
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
772
|
+
return ret;
|
|
773
|
+
}, arguments); },
|
|
774
|
+
__wbg_set_binaryType_5bbf62e9f705dc1a: function(arg0, arg1) {
|
|
775
|
+
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
776
|
+
},
|
|
777
|
+
__wbg_set_body_9a7e00afe3cfe244: function(arg0, arg1) {
|
|
778
|
+
arg0.body = arg1;
|
|
779
|
+
},
|
|
780
|
+
__wbg_set_cache_315a3ed773a41543: function(arg0, arg1) {
|
|
781
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
782
|
+
},
|
|
783
|
+
__wbg_set_cc56eefd2dd91957: function(arg0, arg1, arg2) {
|
|
784
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
785
|
+
},
|
|
786
|
+
__wbg_set_credentials_c4a58d2e05ef24fb: function(arg0, arg1) {
|
|
787
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
788
|
+
},
|
|
789
|
+
__wbg_set_handle_event_ea7145e4fd7c71f1: function(arg0, arg1) {
|
|
790
|
+
arg0.handleEvent = arg1;
|
|
791
|
+
},
|
|
792
|
+
__wbg_set_headers_cfc5f4b2c1f20549: function(arg0, arg1) {
|
|
793
|
+
arg0.headers = arg1;
|
|
794
|
+
},
|
|
795
|
+
__wbg_set_high_water_mark_a7ede9ba8be01a98: function(arg0, arg1) {
|
|
796
|
+
arg0.highWaterMark = arg1;
|
|
797
|
+
},
|
|
798
|
+
__wbg_set_method_c3e20375f5ae7fac: function(arg0, arg1, arg2) {
|
|
799
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
800
|
+
},
|
|
801
|
+
__wbg_set_mode_b13642c312648202: function(arg0, arg1) {
|
|
802
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
803
|
+
},
|
|
804
|
+
__wbg_set_onclose_d382f3e2c2b850eb: function(arg0, arg1) {
|
|
805
|
+
arg0.onclose = arg1;
|
|
806
|
+
},
|
|
807
|
+
__wbg_set_onerror_377f18bf4569bf85: function(arg0, arg1) {
|
|
808
|
+
arg0.onerror = arg1;
|
|
809
|
+
},
|
|
810
|
+
__wbg_set_onmessage_2114aa5f4f53051e: function(arg0, arg1) {
|
|
811
|
+
arg0.onmessage = arg1;
|
|
812
|
+
},
|
|
813
|
+
__wbg_set_onopen_b7b52d519d6c0f11: function(arg0, arg1) {
|
|
814
|
+
arg0.onopen = arg1;
|
|
815
|
+
},
|
|
816
|
+
__wbg_set_signal_f2d3f8599248896d: function(arg0, arg1) {
|
|
817
|
+
arg0.signal = arg1;
|
|
818
|
+
},
|
|
819
|
+
__wbg_signal_d1285ecab4ebc5ad: function(arg0) {
|
|
820
|
+
const ret = arg0.signal;
|
|
821
|
+
return ret;
|
|
822
|
+
},
|
|
823
|
+
__wbg_stack_0ed75d68575b0f3c: function(arg0, arg1) {
|
|
824
|
+
const ret = arg1.stack;
|
|
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
|
+
__wbg_static_accessor_GLOBAL_12837167ad935116: function() {
|
|
831
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
832
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
833
|
+
},
|
|
834
|
+
__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
|
|
835
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
836
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
837
|
+
},
|
|
838
|
+
__wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
|
|
839
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
840
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
841
|
+
},
|
|
842
|
+
__wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
|
|
843
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
844
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
845
|
+
},
|
|
846
|
+
__wbg_status_89d7e803db911ee7: function(arg0) {
|
|
847
|
+
const ret = arg0.status;
|
|
848
|
+
return ret;
|
|
849
|
+
},
|
|
850
|
+
__wbg_stringify_8d1cc6ff383e8bae: function() { return handleError(function (arg0) {
|
|
851
|
+
const ret = JSON.stringify(arg0);
|
|
852
|
+
return ret;
|
|
853
|
+
}, arguments); },
|
|
854
|
+
__wbg_subarray_a96e1fef17ed23cb: function(arg0, arg1, arg2) {
|
|
855
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
856
|
+
return ret;
|
|
857
|
+
},
|
|
858
|
+
__wbg_then_0d9fe2c7b1857d32: function(arg0, arg1, arg2) {
|
|
859
|
+
const ret = arg0.then(arg1, arg2);
|
|
860
|
+
return ret;
|
|
861
|
+
},
|
|
862
|
+
__wbg_then_b9e7b3b5f1a9e1b5: function(arg0, arg1) {
|
|
863
|
+
const ret = arg0.then(arg1);
|
|
864
|
+
return ret;
|
|
865
|
+
},
|
|
866
|
+
__wbg_url_c484c26b1fbf5126: function(arg0, arg1) {
|
|
867
|
+
const ret = arg1.url;
|
|
868
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
869
|
+
const len1 = WASM_VECTOR_LEN;
|
|
870
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
871
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
872
|
+
},
|
|
873
|
+
__wbg_url_cb4d34db86c24df9: function(arg0, arg1) {
|
|
874
|
+
const ret = arg1.url;
|
|
875
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
876
|
+
const len1 = WASM_VECTOR_LEN;
|
|
877
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
878
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
879
|
+
},
|
|
880
|
+
__wbg_value_0546255b415e96c1: function(arg0) {
|
|
881
|
+
const ret = arg0.value;
|
|
882
|
+
return ret;
|
|
883
|
+
},
|
|
884
|
+
__wbg_versions_c01dfd4722a88165: function(arg0) {
|
|
885
|
+
const ret = arg0.versions;
|
|
886
|
+
return ret;
|
|
887
|
+
},
|
|
888
|
+
__wbg_view_6c32e7184b8606ad: function(arg0) {
|
|
889
|
+
const ret = arg0.view;
|
|
890
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
891
|
+
},
|
|
892
|
+
__wbg_warn_479b8bbb8337357b: function(arg0, arg1) {
|
|
893
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
894
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
895
|
+
console.warn(...v0);
|
|
896
|
+
},
|
|
897
|
+
__wbg_wasClean_a9c77a7100d8534f: function(arg0) {
|
|
898
|
+
const ret = arg0.wasClean;
|
|
899
|
+
return ret;
|
|
900
|
+
},
|
|
901
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
902
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2443, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 2444, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
903
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h7cf29a7e95a6517c, wasm_bindgen__convert__closures_____invoke__h993a01742f0967bf);
|
|
904
|
+
return ret;
|
|
905
|
+
},
|
|
906
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
907
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2622, function: Function { arguments: [], shim_idx: 2623, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
908
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__heb08e36b77a85b9c, wasm_bindgen__convert__closures_____invoke__h36c5adc97d437817);
|
|
909
|
+
return ret;
|
|
910
|
+
},
|
|
911
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
912
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2632, function: Function { arguments: [], shim_idx: 2633, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
913
|
+
const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h18332ba013e398aa, wasm_bindgen__convert__closures_____invoke__hb17976c66e1a6d68);
|
|
914
|
+
return ret;
|
|
915
|
+
},
|
|
916
|
+
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
917
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3143, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3144, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
918
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h87cf50f4bd51ca2e, wasm_bindgen__convert__closures_____invoke__hb5204d4e41ff3977);
|
|
919
|
+
return ret;
|
|
920
|
+
},
|
|
921
|
+
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
922
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3217, function: Function { arguments: [], shim_idx: 3218, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
923
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h920903f13ccee978, wasm_bindgen__convert__closures_____invoke__h81b4c013358ef500);
|
|
924
|
+
return ret;
|
|
925
|
+
},
|
|
926
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
927
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4370, function: Function { arguments: [], shim_idx: 4371, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
928
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5ecb98b48ddb9e08, wasm_bindgen__convert__closures_____invoke__h19f413c72615257c);
|
|
929
|
+
return ret;
|
|
930
|
+
},
|
|
931
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
932
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4379, function: Function { arguments: [Externref], shim_idx: 4380, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
933
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5c4e7138d6491581, wasm_bindgen__convert__closures_____invoke__h650bb17850b2b136);
|
|
934
|
+
return ret;
|
|
935
|
+
},
|
|
936
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
937
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
938
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
939
|
+
return ret;
|
|
940
|
+
},
|
|
941
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
942
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
943
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
944
|
+
return ret;
|
|
945
|
+
},
|
|
946
|
+
__wbindgen_init_externref_table: function() {
|
|
947
|
+
const table = wasm.__wbindgen_externrefs;
|
|
948
|
+
const offset = table.grow(4);
|
|
949
|
+
table.set(0, undefined);
|
|
950
|
+
table.set(offset + 0, undefined);
|
|
951
|
+
table.set(offset + 1, null);
|
|
952
|
+
table.set(offset + 2, true);
|
|
953
|
+
table.set(offset + 3, false);
|
|
954
|
+
},
|
|
955
|
+
};
|
|
956
|
+
return {
|
|
957
|
+
__proto__: null,
|
|
958
|
+
"./iroh_wasm_bg.js": import0,
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
function wasm_bindgen__convert__closures_____invoke__h36c5adc97d437817(arg0, arg1) {
|
|
963
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h36c5adc97d437817(arg0, arg1);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
function wasm_bindgen__convert__closures_____invoke__hb17976c66e1a6d68(arg0, arg1) {
|
|
967
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hb17976c66e1a6d68(arg0, arg1);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
function wasm_bindgen__convert__closures_____invoke__h81b4c013358ef500(arg0, arg1) {
|
|
971
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h81b4c013358ef500(arg0, arg1);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
function wasm_bindgen__convert__closures_____invoke__h19f413c72615257c(arg0, arg1) {
|
|
975
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h19f413c72615257c(arg0, arg1);
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
function wasm_bindgen__convert__closures_____invoke__h993a01742f0967bf(arg0, arg1, arg2) {
|
|
979
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h993a01742f0967bf(arg0, arg1, arg2);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
function wasm_bindgen__convert__closures_____invoke__hb5204d4e41ff3977(arg0, arg1, arg2) {
|
|
983
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hb5204d4e41ff3977(arg0, arg1, arg2);
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
function wasm_bindgen__convert__closures_____invoke__h650bb17850b2b136(arg0, arg1, arg2) {
|
|
987
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h650bb17850b2b136(arg0, arg1, arg2);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
function wasm_bindgen__convert__closures_____invoke__h39b19e5fabe12541(arg0, arg1, arg2, arg3) {
|
|
991
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h39b19e5fabe12541(arg0, arg1, arg2, arg3);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1008
|
+
const BiStreamFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1009
|
+
? { register: () => {}, unregister: () => {} }
|
|
1010
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bistream_free(ptr >>> 0, 1));
|
|
1011
|
+
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1012
|
+
? { register: () => {}, unregister: () => {} }
|
|
1013
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
|
|
1014
|
+
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1015
|
+
? { register: () => {}, unregister: () => {} }
|
|
1016
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
|
|
1017
|
+
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1018
|
+
? { register: () => {}, unregister: () => {} }
|
|
1019
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
|
|
1020
|
+
const IrohNodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1021
|
+
? { register: () => {}, unregister: () => {} }
|
|
1022
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_irohnode_free(ptr >>> 0, 1));
|
|
1023
|
+
|
|
1024
|
+
function addToExternrefTable0(obj) {
|
|
1025
|
+
const idx = wasm.__externref_table_alloc();
|
|
1026
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
1027
|
+
return idx;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1031
|
+
? { register: () => {}, unregister: () => {} }
|
|
1032
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
1033
|
+
|
|
1034
|
+
function debugString(val) {
|
|
1035
|
+
// primitive types
|
|
1036
|
+
const type = typeof val;
|
|
1037
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1038
|
+
return `${val}`;
|
|
1039
|
+
}
|
|
1040
|
+
if (type == 'string') {
|
|
1041
|
+
return `"${val}"`;
|
|
1042
|
+
}
|
|
1043
|
+
if (type == 'symbol') {
|
|
1044
|
+
const description = val.description;
|
|
1045
|
+
if (description == null) {
|
|
1046
|
+
return 'Symbol';
|
|
1047
|
+
} else {
|
|
1048
|
+
return `Symbol(${description})`;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
if (type == 'function') {
|
|
1052
|
+
const name = val.name;
|
|
1053
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1054
|
+
return `Function(${name})`;
|
|
1055
|
+
} else {
|
|
1056
|
+
return 'Function';
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
// objects
|
|
1060
|
+
if (Array.isArray(val)) {
|
|
1061
|
+
const length = val.length;
|
|
1062
|
+
let debug = '[';
|
|
1063
|
+
if (length > 0) {
|
|
1064
|
+
debug += debugString(val[0]);
|
|
1065
|
+
}
|
|
1066
|
+
for(let i = 1; i < length; i++) {
|
|
1067
|
+
debug += ', ' + debugString(val[i]);
|
|
1068
|
+
}
|
|
1069
|
+
debug += ']';
|
|
1070
|
+
return debug;
|
|
1071
|
+
}
|
|
1072
|
+
// Test for built-in
|
|
1073
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1074
|
+
let className;
|
|
1075
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1076
|
+
className = builtInMatches[1];
|
|
1077
|
+
} else {
|
|
1078
|
+
// Failed to match the standard '[object ClassName]'
|
|
1079
|
+
return toString.call(val);
|
|
1080
|
+
}
|
|
1081
|
+
if (className == 'Object') {
|
|
1082
|
+
// we're a user defined class or Object
|
|
1083
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1084
|
+
// easier than looping through ownProperties of `val`.
|
|
1085
|
+
try {
|
|
1086
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1087
|
+
} catch (_) {
|
|
1088
|
+
return 'Object';
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
// errors
|
|
1092
|
+
if (val instanceof Error) {
|
|
1093
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1094
|
+
}
|
|
1095
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1096
|
+
return className;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1100
|
+
ptr = ptr >>> 0;
|
|
1101
|
+
const mem = getDataViewMemory0();
|
|
1102
|
+
const result = [];
|
|
1103
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1104
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
1105
|
+
}
|
|
1106
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
1107
|
+
return result;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1111
|
+
ptr = ptr >>> 0;
|
|
1112
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
let cachedDataViewMemory0 = null;
|
|
1116
|
+
function getDataViewMemory0() {
|
|
1117
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1118
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1119
|
+
}
|
|
1120
|
+
return cachedDataViewMemory0;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
function getStringFromWasm0(ptr, len) {
|
|
1124
|
+
ptr = ptr >>> 0;
|
|
1125
|
+
return decodeText(ptr, len);
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1129
|
+
function getUint8ArrayMemory0() {
|
|
1130
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1131
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1132
|
+
}
|
|
1133
|
+
return cachedUint8ArrayMemory0;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
function handleError(f, args) {
|
|
1137
|
+
try {
|
|
1138
|
+
return f.apply(this, args);
|
|
1139
|
+
} catch (e) {
|
|
1140
|
+
const idx = addToExternrefTable0(e);
|
|
1141
|
+
wasm.__wbindgen_exn_store(idx);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
function isLikeNone(x) {
|
|
1146
|
+
return x === undefined || x === null;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
function makeClosure(arg0, arg1, dtor, f) {
|
|
1150
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
1151
|
+
const real = (...args) => {
|
|
1152
|
+
|
|
1153
|
+
// First up with a closure we increment the internal reference
|
|
1154
|
+
// count. This ensures that the Rust closure environment won't
|
|
1155
|
+
// be deallocated while we're invoking it.
|
|
1156
|
+
state.cnt++;
|
|
1157
|
+
try {
|
|
1158
|
+
return f(state.a, state.b, ...args);
|
|
1159
|
+
} finally {
|
|
1160
|
+
real._wbg_cb_unref();
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
real._wbg_cb_unref = () => {
|
|
1164
|
+
if (--state.cnt === 0) {
|
|
1165
|
+
state.dtor(state.a, state.b);
|
|
1166
|
+
state.a = 0;
|
|
1167
|
+
CLOSURE_DTORS.unregister(state);
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
1170
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1171
|
+
return real;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
1175
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
1176
|
+
const real = (...args) => {
|
|
1177
|
+
|
|
1178
|
+
// First up with a closure we increment the internal reference
|
|
1179
|
+
// count. This ensures that the Rust closure environment won't
|
|
1180
|
+
// be deallocated while we're invoking it.
|
|
1181
|
+
state.cnt++;
|
|
1182
|
+
const a = state.a;
|
|
1183
|
+
state.a = 0;
|
|
1184
|
+
try {
|
|
1185
|
+
return f(a, state.b, ...args);
|
|
1186
|
+
} finally {
|
|
1187
|
+
state.a = a;
|
|
1188
|
+
real._wbg_cb_unref();
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1191
|
+
real._wbg_cb_unref = () => {
|
|
1192
|
+
if (--state.cnt === 0) {
|
|
1193
|
+
state.dtor(state.a, state.b);
|
|
1194
|
+
state.a = 0;
|
|
1195
|
+
CLOSURE_DTORS.unregister(state);
|
|
1196
|
+
}
|
|
1197
|
+
};
|
|
1198
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1199
|
+
return real;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1203
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1204
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1205
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1206
|
+
return ptr;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
1210
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
1211
|
+
for (let i = 0; i < array.length; i++) {
|
|
1212
|
+
const add = addToExternrefTable0(array[i]);
|
|
1213
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
1214
|
+
}
|
|
1215
|
+
WASM_VECTOR_LEN = array.length;
|
|
1216
|
+
return ptr;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1220
|
+
if (realloc === undefined) {
|
|
1221
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1222
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1223
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1224
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1225
|
+
return ptr;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
let len = arg.length;
|
|
1229
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1230
|
+
|
|
1231
|
+
const mem = getUint8ArrayMemory0();
|
|
1232
|
+
|
|
1233
|
+
let offset = 0;
|
|
1234
|
+
|
|
1235
|
+
for (; offset < len; offset++) {
|
|
1236
|
+
const code = arg.charCodeAt(offset);
|
|
1237
|
+
if (code > 0x7F) break;
|
|
1238
|
+
mem[ptr + offset] = code;
|
|
1239
|
+
}
|
|
1240
|
+
if (offset !== len) {
|
|
1241
|
+
if (offset !== 0) {
|
|
1242
|
+
arg = arg.slice(offset);
|
|
1243
|
+
}
|
|
1244
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1245
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1246
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1247
|
+
|
|
1248
|
+
offset += ret.written;
|
|
1249
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
WASM_VECTOR_LEN = offset;
|
|
1253
|
+
return ptr;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
function takeFromExternrefTable0(idx) {
|
|
1257
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1258
|
+
wasm.__externref_table_dealloc(idx);
|
|
1259
|
+
return value;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1263
|
+
cachedTextDecoder.decode();
|
|
1264
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1265
|
+
let numBytesDecoded = 0;
|
|
1266
|
+
function decodeText(ptr, len) {
|
|
1267
|
+
numBytesDecoded += len;
|
|
1268
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1269
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1270
|
+
cachedTextDecoder.decode();
|
|
1271
|
+
numBytesDecoded = len;
|
|
1272
|
+
}
|
|
1273
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1277
|
+
|
|
1278
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1279
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1280
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1281
|
+
view.set(buf);
|
|
1282
|
+
return {
|
|
1283
|
+
read: arg.length,
|
|
1284
|
+
written: buf.length
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
let WASM_VECTOR_LEN = 0;
|
|
1290
|
+
|
|
1291
|
+
let wasmModule, wasm;
|
|
1292
|
+
function __wbg_finalize_init(instance, module) {
|
|
1293
|
+
wasm = instance.exports;
|
|
1294
|
+
wasmModule = module;
|
|
1295
|
+
cachedDataViewMemory0 = null;
|
|
1296
|
+
cachedUint8ArrayMemory0 = null;
|
|
1297
|
+
wasm.__wbindgen_start();
|
|
1298
|
+
return wasm;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
async function __wbg_load(module, imports) {
|
|
1302
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1303
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1304
|
+
try {
|
|
1305
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1306
|
+
} catch (e) {
|
|
1307
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1308
|
+
|
|
1309
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1310
|
+
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);
|
|
1311
|
+
|
|
1312
|
+
} else { throw e; }
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
const bytes = await module.arrayBuffer();
|
|
1317
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1318
|
+
} else {
|
|
1319
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1320
|
+
|
|
1321
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1322
|
+
return { instance, module };
|
|
1323
|
+
} else {
|
|
1324
|
+
return instance;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
function expectedResponseType(type) {
|
|
1329
|
+
switch (type) {
|
|
1330
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1331
|
+
}
|
|
1332
|
+
return false;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
function initSync(module) {
|
|
1337
|
+
if (wasm !== undefined) return wasm;
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
if (module !== undefined) {
|
|
1341
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1342
|
+
({module} = module)
|
|
1343
|
+
} else {
|
|
1344
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
const imports = __wbg_get_imports();
|
|
1349
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
1350
|
+
module = new WebAssembly.Module(module);
|
|
1351
|
+
}
|
|
1352
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
1353
|
+
return __wbg_finalize_init(instance, module);
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
async function __wbg_init(module_or_path) {
|
|
1357
|
+
if (wasm !== undefined) return wasm;
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
if (module_or_path !== undefined) {
|
|
1361
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1362
|
+
({module_or_path} = module_or_path)
|
|
1363
|
+
} else {
|
|
1364
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
if (module_or_path === undefined) {
|
|
1369
|
+
module_or_path = new URL('iroh_wasm_bg.wasm', import.meta.url);
|
|
1370
|
+
}
|
|
1371
|
+
const imports = __wbg_get_imports();
|
|
1372
|
+
|
|
1373
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
1374
|
+
module_or_path = fetch(module_or_path);
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1378
|
+
|
|
1379
|
+
return __wbg_finalize_init(instance, module);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
export { initSync, __wbg_init as default };
|