@ermis-network/ermis-chat-sdk 1.0.9 → 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.
@@ -3,10 +3,10 @@ let wasm;
3
3
  let cachedUint8ArrayMemory0 = null;
4
4
 
5
5
  function getUint8ArrayMemory0() {
6
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
- }
9
- return cachedUint8ArrayMemory0;
6
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
+ }
9
+ return cachedUint8ArrayMemory0;
10
10
  }
11
11
 
12
12
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
@@ -16,18 +16,18 @@ cachedTextDecoder.decode();
16
16
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
17
  let numBytesDecoded = 0;
18
18
  function decodeText(ptr, len) {
19
- numBytesDecoded += len;
20
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
- cachedTextDecoder.decode();
23
- numBytesDecoded = len;
24
- }
25
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
19
+ numBytesDecoded += len;
20
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
+ cachedTextDecoder.decode();
23
+ numBytesDecoded = len;
24
+ }
25
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
26
  }
27
27
 
28
28
  function getStringFromWasm0(ptr, len) {
29
- ptr = ptr >>> 0;
30
- return decodeText(ptr, len);
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
31
31
  }
32
32
 
33
33
  let heap = new Array(128).fill(undefined);
@@ -37,1461 +37,1531 @@ heap.push(undefined, null, true, false);
37
37
  let heap_next = heap.length;
38
38
 
39
39
  function addHeapObject(obj) {
40
- if (heap_next === heap.length) heap.push(heap.length + 1);
41
- const idx = heap_next;
42
- heap_next = heap[idx];
40
+ if (heap_next === heap.length) heap.push(heap.length + 1);
41
+ const idx = heap_next;
42
+ heap_next = heap[idx];
43
43
 
44
- heap[idx] = obj;
45
- return idx;
44
+ heap[idx] = obj;
45
+ return idx;
46
46
  }
47
47
 
48
- function getObject(idx) { return heap[idx]; }
48
+ function getObject(idx) {
49
+ return heap[idx];
50
+ }
49
51
 
50
52
  let WASM_VECTOR_LEN = 0;
51
53
 
52
54
  const cachedTextEncoder = new TextEncoder();
53
55
 
54
56
  if (!('encodeInto' in cachedTextEncoder)) {
55
- cachedTextEncoder.encodeInto = function (arg, view) {
56
- const buf = cachedTextEncoder.encode(arg);
57
- view.set(buf);
58
- return {
59
- read: arg.length,
60
- written: buf.length
61
- };
62
- }
57
+ cachedTextEncoder.encodeInto = function (arg, view) {
58
+ const buf = cachedTextEncoder.encode(arg);
59
+ view.set(buf);
60
+ return {
61
+ read: arg.length,
62
+ written: buf.length,
63
+ };
64
+ };
63
65
  }
64
66
 
65
67
  function passStringToWasm0(arg, malloc, realloc) {
66
-
67
- if (realloc === undefined) {
68
- const buf = cachedTextEncoder.encode(arg);
69
- const ptr = malloc(buf.length, 1) >>> 0;
70
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
71
- WASM_VECTOR_LEN = buf.length;
72
- return ptr;
73
- }
74
-
75
- let len = arg.length;
76
- let ptr = malloc(len, 1) >>> 0;
77
-
78
- const mem = getUint8ArrayMemory0();
79
-
80
- let offset = 0;
81
-
82
- for (; offset < len; offset++) {
83
- const code = arg.charCodeAt(offset);
84
- if (code > 0x7F) break;
85
- mem[ptr + offset] = code;
86
- }
87
-
88
- if (offset !== len) {
89
- if (offset !== 0) {
90
- arg = arg.slice(offset);
91
- }
92
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
93
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
94
- const ret = cachedTextEncoder.encodeInto(arg, view);
95
-
96
- offset += ret.written;
97
- ptr = realloc(ptr, len, offset, 1) >>> 0;
98
- }
99
-
100
- WASM_VECTOR_LEN = offset;
101
- return ptr;
68
+ if (realloc === undefined) {
69
+ const buf = cachedTextEncoder.encode(arg);
70
+ const ptr = malloc(buf.length, 1) >>> 0;
71
+ getUint8ArrayMemory0()
72
+ .subarray(ptr, ptr + buf.length)
73
+ .set(buf);
74
+ WASM_VECTOR_LEN = buf.length;
75
+ return ptr;
76
+ }
77
+
78
+ let len = arg.length;
79
+ let ptr = malloc(len, 1) >>> 0;
80
+
81
+ const mem = getUint8ArrayMemory0();
82
+
83
+ let offset = 0;
84
+
85
+ for (; offset < len; offset++) {
86
+ const code = arg.charCodeAt(offset);
87
+ if (code > 0x7f) break;
88
+ mem[ptr + offset] = code;
89
+ }
90
+
91
+ if (offset !== len) {
92
+ if (offset !== 0) {
93
+ arg = arg.slice(offset);
94
+ }
95
+ ptr = realloc(ptr, len, (len = offset + arg.length * 3), 1) >>> 0;
96
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
97
+ const ret = cachedTextEncoder.encodeInto(arg, view);
98
+
99
+ offset += ret.written;
100
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
101
+ }
102
+
103
+ WASM_VECTOR_LEN = offset;
104
+ return ptr;
102
105
  }
103
106
 
104
107
  let cachedDataViewMemory0 = null;
105
108
 
106
109
  function getDataViewMemory0() {
107
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
108
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
109
- }
110
- return cachedDataViewMemory0;
110
+ if (
111
+ cachedDataViewMemory0 === null ||
112
+ cachedDataViewMemory0.buffer.detached === true ||
113
+ (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)
114
+ ) {
115
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
116
+ }
117
+ return cachedDataViewMemory0;
111
118
  }
112
119
 
113
120
  function isLikeNone(x) {
114
- return x === undefined || x === null;
121
+ return x === undefined || x === null;
115
122
  }
116
123
 
117
124
  function debugString(val) {
118
- // primitive types
119
- const type = typeof val;
120
- if (type == 'number' || type == 'boolean' || val == null) {
121
- return `${val}`;
122
- }
123
- if (type == 'string') {
124
- return `"${val}"`;
125
- }
126
- if (type == 'symbol') {
127
- const description = val.description;
128
- if (description == null) {
129
- return 'Symbol';
130
- } else {
131
- return `Symbol(${description})`;
132
- }
133
- }
134
- if (type == 'function') {
135
- const name = val.name;
136
- if (typeof name == 'string' && name.length > 0) {
137
- return `Function(${name})`;
138
- } else {
139
- return 'Function';
140
- }
141
- }
142
- // objects
143
- if (Array.isArray(val)) {
144
- const length = val.length;
145
- let debug = '[';
146
- if (length > 0) {
147
- debug += debugString(val[0]);
148
- }
149
- for(let i = 1; i < length; i++) {
150
- debug += ', ' + debugString(val[i]);
151
- }
152
- debug += ']';
153
- return debug;
154
- }
155
- // Test for built-in
156
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
157
- let className;
158
- if (builtInMatches && builtInMatches.length > 1) {
159
- className = builtInMatches[1];
160
- } else {
161
- // Failed to match the standard '[object ClassName]'
162
- return toString.call(val);
163
- }
164
- if (className == 'Object') {
165
- // we're a user defined class or Object
166
- // JSON.stringify avoids problems with cycles, and is generally much
167
- // easier than looping through ownProperties of `val`.
168
- try {
169
- return 'Object(' + JSON.stringify(val) + ')';
170
- } catch (_) {
171
- return 'Object';
172
- }
173
- }
174
- // errors
175
- if (val instanceof Error) {
176
- return `${val.name}: ${val.message}\n${val.stack}`;
177
- }
178
- // TODO we could test for more things here, like `Set`s and `Map`s.
179
- return className;
125
+ // primitive types
126
+ const type = typeof val;
127
+ if (type == 'number' || type == 'boolean' || val == null) {
128
+ return `${val}`;
129
+ }
130
+ if (type == 'string') {
131
+ return `"${val}"`;
132
+ }
133
+ if (type == 'symbol') {
134
+ const description = val.description;
135
+ if (description == null) {
136
+ return 'Symbol';
137
+ } else {
138
+ return `Symbol(${description})`;
139
+ }
140
+ }
141
+ if (type == 'function') {
142
+ const name = val.name;
143
+ if (typeof name == 'string' && name.length > 0) {
144
+ return `Function(${name})`;
145
+ } else {
146
+ return 'Function';
147
+ }
148
+ }
149
+ // objects
150
+ if (Array.isArray(val)) {
151
+ const length = val.length;
152
+ let debug = '[';
153
+ if (length > 0) {
154
+ debug += debugString(val[0]);
155
+ }
156
+ for (let i = 1; i < length; i++) {
157
+ debug += ', ' + debugString(val[i]);
158
+ }
159
+ debug += ']';
160
+ return debug;
161
+ }
162
+ // Test for built-in
163
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
164
+ let className;
165
+ if (builtInMatches && builtInMatches.length > 1) {
166
+ className = builtInMatches[1];
167
+ } else {
168
+ // Failed to match the standard '[object ClassName]'
169
+ return toString.call(val);
170
+ }
171
+ if (className == 'Object') {
172
+ // we're a user defined class or Object
173
+ // JSON.stringify avoids problems with cycles, and is generally much
174
+ // easier than looping through ownProperties of `val`.
175
+ try {
176
+ return 'Object(' + JSON.stringify(val) + ')';
177
+ } catch (_) {
178
+ return 'Object';
179
+ }
180
+ }
181
+ // errors
182
+ if (val instanceof Error) {
183
+ return `${val.name}: ${val.message}\n${val.stack}`;
184
+ }
185
+ // TODO we could test for more things here, like `Set`s and `Map`s.
186
+ return className;
180
187
  }
181
188
 
182
189
  function handleError(f, args) {
183
- try {
184
- return f.apply(this, args);
185
- } catch (e) {
186
- wasm.__wbindgen_export3(addHeapObject(e));
187
- }
190
+ try {
191
+ return f.apply(this, args);
192
+ } catch (e) {
193
+ wasm.__wbindgen_export3(addHeapObject(e));
194
+ }
188
195
  }
189
196
 
190
197
  function dropObject(idx) {
191
- if (idx < 132) return;
192
- heap[idx] = heap_next;
193
- heap_next = idx;
198
+ if (idx < 132) return;
199
+ heap[idx] = heap_next;
200
+ heap_next = idx;
194
201
  }
195
202
 
196
203
  function takeObject(idx) {
197
- const ret = getObject(idx);
198
- dropObject(idx);
199
- return ret;
204
+ const ret = getObject(idx);
205
+ dropObject(idx);
206
+ return ret;
200
207
  }
201
208
 
202
209
  function getArrayU8FromWasm0(ptr, len) {
203
- ptr = ptr >>> 0;
204
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
210
+ ptr = ptr >>> 0;
211
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
205
212
  }
206
213
 
207
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
208
- ? { register: () => {}, unregister: () => {} }
209
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
214
+ const CLOSURE_DTORS =
215
+ typeof FinalizationRegistry === 'undefined'
216
+ ? { register: () => {}, unregister: () => {} }
217
+ : new FinalizationRegistry((state) => state.dtor(state.a, state.b));
210
218
 
211
219
  function makeMutClosure(arg0, arg1, dtor, f) {
212
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
213
- const real = (...args) => {
214
-
215
- // First up with a closure we increment the internal reference
216
- // count. This ensures that the Rust closure environment won't
217
- // be deallocated while we're invoking it.
218
- state.cnt++;
219
- const a = state.a;
220
- state.a = 0;
221
- try {
222
- return f(a, state.b, ...args);
223
- } finally {
224
- state.a = a;
225
- real._wbg_cb_unref();
226
- }
227
- };
228
- real._wbg_cb_unref = () => {
229
- if (--state.cnt === 0) {
230
- state.dtor(state.a, state.b);
231
- state.a = 0;
232
- CLOSURE_DTORS.unregister(state);
233
- }
234
- };
235
- CLOSURE_DTORS.register(real, state, state);
236
- return real;
220
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
221
+ const real = (...args) => {
222
+ // First up with a closure we increment the internal reference
223
+ // count. This ensures that the Rust closure environment won't
224
+ // be deallocated while we're invoking it.
225
+ state.cnt++;
226
+ const a = state.a;
227
+ state.a = 0;
228
+ try {
229
+ return f(a, state.b, ...args);
230
+ } finally {
231
+ state.a = a;
232
+ real._wbg_cb_unref();
233
+ }
234
+ };
235
+ real._wbg_cb_unref = () => {
236
+ if (--state.cnt === 0) {
237
+ state.dtor(state.a, state.b);
238
+ state.a = 0;
239
+ CLOSURE_DTORS.unregister(state);
240
+ }
241
+ };
242
+ CLOSURE_DTORS.register(real, state, state);
243
+ return real;
237
244
  }
238
245
 
239
246
  function makeClosure(arg0, arg1, dtor, f) {
240
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
241
- const real = (...args) => {
242
-
243
- // First up with a closure we increment the internal reference
244
- // count. This ensures that the Rust closure environment won't
245
- // be deallocated while we're invoking it.
246
- state.cnt++;
247
- try {
248
- return f(state.a, state.b, ...args);
249
- } finally {
250
- real._wbg_cb_unref();
251
- }
252
- };
253
- real._wbg_cb_unref = () => {
254
- if (--state.cnt === 0) {
255
- state.dtor(state.a, state.b);
256
- state.a = 0;
257
- CLOSURE_DTORS.unregister(state);
258
- }
259
- };
260
- CLOSURE_DTORS.register(real, state, state);
261
- return real;
247
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
248
+ const real = (...args) => {
249
+ // First up with a closure we increment the internal reference
250
+ // count. This ensures that the Rust closure environment won't
251
+ // be deallocated while we're invoking it.
252
+ state.cnt++;
253
+ try {
254
+ return f(state.a, state.b, ...args);
255
+ } finally {
256
+ real._wbg_cb_unref();
257
+ }
258
+ };
259
+ real._wbg_cb_unref = () => {
260
+ if (--state.cnt === 0) {
261
+ state.dtor(state.a, state.b);
262
+ state.a = 0;
263
+ CLOSURE_DTORS.unregister(state);
264
+ }
265
+ };
266
+ CLOSURE_DTORS.register(real, state, state);
267
+ return real;
262
268
  }
263
269
 
264
270
  function passArray8ToWasm0(arg, malloc) {
265
- const ptr = malloc(arg.length * 1, 1) >>> 0;
266
- getUint8ArrayMemory0().set(arg, ptr / 1);
267
- WASM_VECTOR_LEN = arg.length;
268
- return ptr;
271
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
272
+ getUint8ArrayMemory0().set(arg, ptr / 1);
273
+ WASM_VECTOR_LEN = arg.length;
274
+ return ptr;
269
275
  }
270
- function __wasm_bindgen_func_elem_12858(arg0, arg1) {
271
- wasm.__wasm_bindgen_func_elem_12858(arg0, arg1);
276
+ function __wasm_bindgen_func_elem_12594(arg0, arg1) {
277
+ wasm.__wasm_bindgen_func_elem_12594(arg0, arg1);
272
278
  }
273
279
 
274
- function __wasm_bindgen_func_elem_11688(arg0, arg1, arg2) {
275
- wasm.__wasm_bindgen_func_elem_11688(arg0, arg1, addHeapObject(arg2));
280
+ function __wasm_bindgen_func_elem_11460(arg0, arg1, arg2) {
281
+ wasm.__wasm_bindgen_func_elem_11460(arg0, arg1, addHeapObject(arg2));
276
282
  }
277
283
 
278
- function __wasm_bindgen_func_elem_6230(arg0, arg1) {
279
- wasm.__wasm_bindgen_func_elem_6230(arg0, arg1);
284
+ function __wasm_bindgen_func_elem_5633(arg0, arg1) {
285
+ wasm.__wasm_bindgen_func_elem_5633(arg0, arg1);
280
286
  }
281
287
 
282
- function __wasm_bindgen_func_elem_2287(arg0, arg1, arg2) {
283
- wasm.__wasm_bindgen_func_elem_2287(arg0, arg1, addHeapObject(arg2));
288
+ function __wasm_bindgen_func_elem_2279(arg0, arg1, arg2) {
289
+ wasm.__wasm_bindgen_func_elem_2279(arg0, arg1, addHeapObject(arg2));
284
290
  }
285
291
 
286
- function __wasm_bindgen_func_elem_12912(arg0, arg1, arg2) {
287
- wasm.__wasm_bindgen_func_elem_12912(arg0, arg1, addHeapObject(arg2));
292
+ function __wasm_bindgen_func_elem_12647(arg0, arg1, arg2) {
293
+ wasm.__wasm_bindgen_func_elem_12647(arg0, arg1, addHeapObject(arg2));
288
294
  }
289
295
 
290
- function __wasm_bindgen_func_elem_5748(arg0, arg1) {
291
- wasm.__wasm_bindgen_func_elem_5748(arg0, arg1);
296
+ function __wasm_bindgen_func_elem_6078(arg0, arg1) {
297
+ wasm.__wasm_bindgen_func_elem_6078(arg0, arg1);
292
298
  }
293
299
 
294
- function __wasm_bindgen_func_elem_14376(arg0, arg1, arg2, arg3) {
295
- wasm.__wasm_bindgen_func_elem_14376(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
300
+ function __wasm_bindgen_func_elem_14072(arg0, arg1, arg2, arg3) {
301
+ wasm.__wasm_bindgen_func_elem_14072(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
296
302
  }
297
303
 
298
- const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
304
+ const __wbindgen_enum_BinaryType = ['blob', 'arraybuffer'];
299
305
 
300
- const __wbindgen_enum_ReadableStreamType = ["bytes"];
306
+ const __wbindgen_enum_ReadableStreamType = ['bytes'];
301
307
 
302
- const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
308
+ const __wbindgen_enum_RequestCache = ['default', 'no-store', 'reload', 'no-cache', 'force-cache', 'only-if-cached'];
303
309
 
304
- const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
310
+ const __wbindgen_enum_RequestCredentials = ['omit', 'same-origin', 'include'];
305
311
 
306
- const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
312
+ const __wbindgen_enum_RequestMode = ['same-origin', 'no-cors', 'cors', 'navigate'];
307
313
 
308
- const ConnectionStatsFinalization = (typeof FinalizationRegistry === 'undefined')
309
- ? { register: () => {}, unregister: () => {} }
310
- : new FinalizationRegistry(ptr => wasm.__wbg_connectionstats_free(ptr >>> 0, 1));
314
+ const ConnectionStatsFinalization =
315
+ typeof FinalizationRegistry === 'undefined'
316
+ ? { register: () => {}, unregister: () => {} }
317
+ : new FinalizationRegistry((ptr) => wasm.__wbg_connectionstats_free(ptr >>> 0, 1));
311
318
 
312
319
  export class ConnectionStats {
313
-
314
- __destroy_into_raw() {
315
- const ptr = this.__wbg_ptr;
316
- this.__wbg_ptr = 0;
317
- ConnectionStatsFinalization.unregister(this);
318
- return ptr;
319
- }
320
-
321
- free() {
322
- const ptr = this.__destroy_into_raw();
323
- wasm.__wbg_connectionstats_free(ptr, 0);
324
- }
325
- /**
326
- * @returns {number | undefined}
327
- */
328
- get rtt_ms() {
329
- try {
330
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
331
- wasm.__wbg_get_connectionstats_rtt_ms(retptr, this.__wbg_ptr);
332
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
333
- var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
334
- return r0 === 0 ? undefined : r2;
335
- } finally {
336
- wasm.__wbindgen_add_to_stack_pointer(16);
337
- }
338
- }
339
- /**
340
- * @param {number | null} [arg0]
341
- */
342
- set rtt_ms(arg0) {
343
- wasm.__wbg_set_connectionstats_rtt_ms(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
344
- }
345
- /**
346
- * @returns {number | undefined}
347
- */
348
- get packet_loss() {
349
- try {
350
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
351
- wasm.__wbg_get_connectionstats_packet_loss(retptr, this.__wbg_ptr);
352
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
353
- var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
354
- return r0 === 0 ? undefined : r2;
355
- } finally {
356
- wasm.__wbindgen_add_to_stack_pointer(16);
357
- }
358
- }
359
- /**
360
- * @param {number | null} [arg0]
361
- */
362
- set packet_loss(arg0) {
363
- wasm.__wbg_set_connectionstats_packet_loss(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
364
- }
365
- /**
366
- * @param {string | null} [connection_type]
367
- * @param {number | null} [rtt_ms]
368
- * @param {number | null} [packet_loss]
369
- */
370
- constructor(connection_type, rtt_ms, packet_loss) {
371
- var ptr0 = isLikeNone(connection_type) ? 0 : passStringToWasm0(connection_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
372
- var len0 = WASM_VECTOR_LEN;
373
- const ret = wasm.connectionstats_new(ptr0, len0, !isLikeNone(rtt_ms), isLikeNone(rtt_ms) ? 0 : rtt_ms, !isLikeNone(packet_loss), isLikeNone(packet_loss) ? 0 : packet_loss);
374
- this.__wbg_ptr = ret >>> 0;
375
- ConnectionStatsFinalization.register(this, this.__wbg_ptr, this);
376
- return this;
377
- }
378
- /**
379
- * @returns {string | undefined}
380
- */
381
- get connection_type() {
382
- try {
383
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
384
- wasm.connectionstats_connection_type(retptr, this.__wbg_ptr);
385
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
386
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
387
- let v1;
388
- if (r0 !== 0) {
389
- v1 = getStringFromWasm0(r0, r1).slice();
390
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
391
- }
392
- return v1;
393
- } finally {
394
- wasm.__wbindgen_add_to_stack_pointer(16);
395
- }
396
- }
397
- /**
398
- * @param {string | null} [value]
399
- */
400
- set connection_type(value) {
401
- var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
402
- var len0 = WASM_VECTOR_LEN;
403
- wasm.connectionstats_set_connection_type(this.__wbg_ptr, ptr0, len0);
404
- }
320
+ __destroy_into_raw() {
321
+ const ptr = this.__wbg_ptr;
322
+ this.__wbg_ptr = 0;
323
+ ConnectionStatsFinalization.unregister(this);
324
+ return ptr;
325
+ }
326
+
327
+ free() {
328
+ const ptr = this.__destroy_into_raw();
329
+ wasm.__wbg_connectionstats_free(ptr, 0);
330
+ }
331
+ /**
332
+ * @returns {string | undefined}
333
+ */
334
+ get connection_type() {
335
+ try {
336
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
337
+ wasm.connectionstats_connection_type(retptr, this.__wbg_ptr);
338
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
339
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
340
+ let v1;
341
+ if (r0 !== 0) {
342
+ v1 = getStringFromWasm0(r0, r1).slice();
343
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
344
+ }
345
+ return v1;
346
+ } finally {
347
+ wasm.__wbindgen_add_to_stack_pointer(16);
348
+ }
349
+ }
350
+ /**
351
+ * @param {string | null} [value]
352
+ */
353
+ set connection_type(value) {
354
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
355
+ var len0 = WASM_VECTOR_LEN;
356
+ wasm.connectionstats_set_connection_type(this.__wbg_ptr, ptr0, len0);
357
+ }
358
+ /**
359
+ * @param {string | null} [connection_type]
360
+ * @param {number | null} [rtt_ms]
361
+ * @param {number | null} [packet_loss]
362
+ */
363
+ constructor(connection_type, rtt_ms, packet_loss) {
364
+ var ptr0 = isLikeNone(connection_type)
365
+ ? 0
366
+ : passStringToWasm0(connection_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
367
+ var len0 = WASM_VECTOR_LEN;
368
+ const ret = wasm.connectionstats_new(
369
+ ptr0,
370
+ len0,
371
+ !isLikeNone(rtt_ms),
372
+ isLikeNone(rtt_ms) ? 0 : rtt_ms,
373
+ !isLikeNone(packet_loss),
374
+ isLikeNone(packet_loss) ? 0 : packet_loss,
375
+ );
376
+ this.__wbg_ptr = ret >>> 0;
377
+ ConnectionStatsFinalization.register(this, this.__wbg_ptr, this);
378
+ return this;
379
+ }
380
+ /**
381
+ * @returns {number | undefined}
382
+ */
383
+ get rtt_ms() {
384
+ try {
385
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
386
+ wasm.__wbg_get_connectionstats_rtt_ms(retptr, this.__wbg_ptr);
387
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
388
+ var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
389
+ return r0 === 0 ? undefined : r2;
390
+ } finally {
391
+ wasm.__wbindgen_add_to_stack_pointer(16);
392
+ }
393
+ }
394
+ /**
395
+ * @param {number | null} [arg0]
396
+ */
397
+ set rtt_ms(arg0) {
398
+ wasm.__wbg_set_connectionstats_rtt_ms(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
399
+ }
400
+ /**
401
+ * @returns {number | undefined}
402
+ */
403
+ get packet_loss() {
404
+ try {
405
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
406
+ wasm.__wbg_get_connectionstats_packet_loss(retptr, this.__wbg_ptr);
407
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
408
+ var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
409
+ return r0 === 0 ? undefined : r2;
410
+ } finally {
411
+ wasm.__wbindgen_add_to_stack_pointer(16);
412
+ }
413
+ }
414
+ /**
415
+ * @param {number | null} [arg0]
416
+ */
417
+ set packet_loss(arg0) {
418
+ wasm.__wbg_set_connectionstats_packet_loss(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
419
+ }
405
420
  }
406
421
  if (Symbol.dispose) ConnectionStats.prototype[Symbol.dispose] = ConnectionStats.prototype.free;
407
422
 
408
- const ErmisCallFinalization = (typeof FinalizationRegistry === 'undefined')
409
- ? { register: () => {}, unregister: () => {} }
410
- : new FinalizationRegistry(ptr => wasm.__wbg_ermiscall_free(ptr >>> 0, 1));
423
+ const ErmisCallFinalization =
424
+ typeof FinalizationRegistry === 'undefined'
425
+ ? { register: () => {}, unregister: () => {} }
426
+ : new FinalizationRegistry((ptr) => wasm.__wbg_ermiscall_free(ptr >>> 0, 1));
411
427
 
412
428
  export class ErmisCall {
413
-
414
- __destroy_into_raw() {
415
- const ptr = this.__wbg_ptr;
416
- this.__wbg_ptr = 0;
417
- ErmisCallFinalization.unregister(this);
418
- return ptr;
419
- }
420
-
421
- free() {
422
- const ptr = this.__destroy_into_raw();
423
- wasm.__wbg_ermiscall_free(ptr, 0);
424
- }
425
- constructor() {
426
- const ret = wasm.ermiscall_new();
427
- this.__wbg_ptr = ret >>> 0;
428
- ErmisCallFinalization.register(this, this.__wbg_ptr, this);
429
- return this;
430
- }
431
- /**
432
- * @param {any} relay_urls
433
- * @param {Uint8Array | null} [secret_key]
434
- * @returns {Promise<void>}
435
- */
436
- spawn(relay_urls, secret_key) {
437
- var ptr0 = isLikeNone(secret_key) ? 0 : passArray8ToWasm0(secret_key, wasm.__wbindgen_export);
438
- var len0 = WASM_VECTOR_LEN;
439
- const ret = wasm.ermiscall_spawn(this.__wbg_ptr, addHeapObject(relay_urls), ptr0, len0);
440
- return takeObject(ret);
441
- }
442
- /**
443
- * @returns {Promise<string>}
444
- */
445
- getLocalEndpointAddr() {
446
- const ret = wasm.ermiscall_getLocalEndpointAddr(this.__wbg_ptr);
447
- return takeObject(ret);
448
- }
449
- /**
450
- * @param {string} addr
451
- * @returns {Promise<void>}
452
- */
453
- connect(addr) {
454
- const ptr0 = passStringToWasm0(addr, wasm.__wbindgen_export, wasm.__wbindgen_export2);
455
- const len0 = WASM_VECTOR_LEN;
456
- const ret = wasm.ermiscall_connect(this.__wbg_ptr, ptr0, len0);
457
- return takeObject(ret);
458
- }
459
- /**
460
- * @returns {Promise<void>}
461
- */
462
- closeEndpoint() {
463
- const ret = wasm.ermiscall_closeEndpoint(this.__wbg_ptr);
464
- return takeObject(ret);
465
- }
466
- closeConnection() {
467
- try {
468
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
469
- wasm.ermiscall_closeConnection(retptr, this.__wbg_ptr);
470
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
471
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
472
- if (r1) {
473
- throw takeObject(r0);
474
- }
475
- } finally {
476
- wasm.__wbindgen_add_to_stack_pointer(16);
477
- }
478
- }
479
- /**
480
- * @returns {Promise<void>}
481
- */
482
- acceptConnection() {
483
- const ret = wasm.ermiscall_acceptConnection(this.__wbg_ptr);
484
- return takeObject(ret);
485
- }
486
- /**
487
- * @param {Uint8Array} data
488
- */
489
- sendControlFrame(data) {
490
- try {
491
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
492
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
493
- const len0 = WASM_VECTOR_LEN;
494
- wasm.ermiscall_sendControlFrame(retptr, this.__wbg_ptr, ptr0, len0);
495
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
496
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
497
- if (r1) {
498
- throw takeObject(r0);
499
- }
500
- } finally {
501
- wasm.__wbindgen_add_to_stack_pointer(16);
502
- }
503
- }
504
- /**
505
- * @param {Uint8Array} data
506
- */
507
- sendAudioFrame(data) {
508
- try {
509
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
510
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
511
- const len0 = WASM_VECTOR_LEN;
512
- wasm.ermiscall_sendAudioFrame(retptr, this.__wbg_ptr, ptr0, len0);
513
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
514
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
515
- if (r1) {
516
- throw takeObject(r0);
517
- }
518
- } finally {
519
- wasm.__wbindgen_add_to_stack_pointer(16);
520
- }
521
- }
522
- /**
523
- * @param {Uint8Array} data
524
- */
525
- sendFrame(data) {
526
- try {
527
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
528
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
529
- const len0 = WASM_VECTOR_LEN;
530
- wasm.ermiscall_sendFrame(retptr, this.__wbg_ptr, ptr0, len0);
531
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
532
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
533
- if (r1) {
534
- throw takeObject(r0);
535
- }
536
- } finally {
537
- wasm.__wbindgen_add_to_stack_pointer(16);
538
- }
539
- }
540
- notifyNewGop() {
541
- try {
542
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
543
- wasm.ermiscall_notifyNewGop(retptr, this.__wbg_ptr);
544
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
545
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
546
- if (r1) {
547
- throw takeObject(r0);
548
- }
549
- } finally {
550
- wasm.__wbindgen_add_to_stack_pointer(16);
551
- }
552
- }
553
- /**
554
- * @returns {Uint8Array}
555
- */
556
- recv() {
557
- try {
558
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
559
- wasm.ermiscall_recv(retptr, this.__wbg_ptr);
560
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
561
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
562
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
563
- if (r2) {
564
- throw takeObject(r1);
565
- }
566
- return takeObject(r0);
567
- } finally {
568
- wasm.__wbindgen_add_to_stack_pointer(16);
569
- }
570
- }
571
- /**
572
- * @returns {Promise<Uint8Array>}
573
- */
574
- asyncRecv() {
575
- const ret = wasm.ermiscall_asyncRecv(this.__wbg_ptr);
576
- return takeObject(ret);
577
- }
578
- /**
579
- * @param {Uint8Array} data
580
- */
581
- beginWithGop(data) {
582
- try {
583
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
584
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
585
- const len0 = WASM_VECTOR_LEN;
586
- wasm.ermiscall_beginWithGop(retptr, this.__wbg_ptr, ptr0, len0);
587
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
588
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
589
- if (r1) {
590
- throw takeObject(r0);
591
- }
592
- } finally {
593
- wasm.__wbindgen_add_to_stack_pointer(16);
594
- }
595
- }
596
- /**
597
- * @returns {string | undefined}
598
- */
599
- connectionType() {
600
- try {
601
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
602
- wasm.ermiscall_connectionType(retptr, this.__wbg_ptr);
603
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
604
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
605
- let v1;
606
- if (r0 !== 0) {
607
- v1 = getStringFromWasm0(r0, r1).slice();
608
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
609
- }
610
- return v1;
611
- } finally {
612
- wasm.__wbindgen_add_to_stack_pointer(16);
613
- }
614
- }
615
- /**
616
- * @returns {number | undefined}
617
- */
618
- roundTripTime() {
619
- try {
620
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
621
- wasm.ermiscall_roundTripTime(retptr, this.__wbg_ptr);
622
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
623
- var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
624
- return r0 === 0 ? undefined : r2;
625
- } finally {
626
- wasm.__wbindgen_add_to_stack_pointer(16);
627
- }
628
- }
629
- /**
630
- * @returns {number | undefined}
631
- */
632
- currentPacketLoss() {
633
- try {
634
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
635
- wasm.ermiscall_currentPacketLoss(retptr, this.__wbg_ptr);
636
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
637
- var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
638
- return r0 === 0 ? undefined : r2;
639
- } finally {
640
- wasm.__wbindgen_add_to_stack_pointer(16);
641
- }
642
- }
643
- networkChange() {
644
- wasm.ermiscall_networkChange(this.__wbg_ptr);
645
- }
646
- /**
647
- * @returns {any}
648
- */
649
- getStats() {
650
- try {
651
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
652
- wasm.ermiscall_getStats(retptr, this.__wbg_ptr);
653
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
654
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
655
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
656
- if (r2) {
657
- throw takeObject(r1);
658
- }
659
- return takeObject(r0);
660
- } finally {
661
- wasm.__wbindgen_add_to_stack_pointer(16);
662
- }
663
- }
429
+ __destroy_into_raw() {
430
+ const ptr = this.__wbg_ptr;
431
+ this.__wbg_ptr = 0;
432
+ ErmisCallFinalization.unregister(this);
433
+ return ptr;
434
+ }
435
+
436
+ free() {
437
+ const ptr = this.__destroy_into_raw();
438
+ wasm.__wbg_ermiscall_free(ptr, 0);
439
+ }
440
+ /**
441
+ * @returns {Promise<Uint8Array>}
442
+ */
443
+ asyncRecv() {
444
+ const ret = wasm.ermiscall_asyncRecv(this.__wbg_ptr);
445
+ return takeObject(ret);
446
+ }
447
+ /**
448
+ * @param {Uint8Array} data
449
+ */
450
+ sendFrame(data) {
451
+ try {
452
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
453
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
454
+ const len0 = WASM_VECTOR_LEN;
455
+ wasm.ermiscall_sendFrame(retptr, this.__wbg_ptr, ptr0, len0);
456
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
457
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
458
+ if (r1) {
459
+ throw takeObject(r0);
460
+ }
461
+ } finally {
462
+ wasm.__wbindgen_add_to_stack_pointer(16);
463
+ }
464
+ }
465
+ /**
466
+ * @param {Uint8Array} data
467
+ */
468
+ beginWithGop(data) {
469
+ try {
470
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
471
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
472
+ const len0 = WASM_VECTOR_LEN;
473
+ wasm.ermiscall_beginWithGop(retptr, this.__wbg_ptr, ptr0, len0);
474
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
475
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
476
+ if (r1) {
477
+ throw takeObject(r0);
478
+ }
479
+ } finally {
480
+ wasm.__wbindgen_add_to_stack_pointer(16);
481
+ }
482
+ }
483
+ /**
484
+ * @returns {Promise<void>}
485
+ */
486
+ closeEndpoint() {
487
+ const ret = wasm.ermiscall_closeEndpoint(this.__wbg_ptr);
488
+ return takeObject(ret);
489
+ }
490
+ networkChange() {
491
+ wasm.ermiscall_networkChange(this.__wbg_ptr);
492
+ }
493
+ notifyNewGop() {
494
+ try {
495
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
496
+ wasm.ermiscall_notifyNewGop(retptr, this.__wbg_ptr);
497
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
498
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
499
+ if (r1) {
500
+ throw takeObject(r0);
501
+ }
502
+ } finally {
503
+ wasm.__wbindgen_add_to_stack_pointer(16);
504
+ }
505
+ }
506
+ /**
507
+ * @returns {string | undefined}
508
+ */
509
+ connectionType() {
510
+ try {
511
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
512
+ wasm.ermiscall_connectionType(retptr, this.__wbg_ptr);
513
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
514
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
515
+ let v1;
516
+ if (r0 !== 0) {
517
+ v1 = getStringFromWasm0(r0, r1).slice();
518
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
519
+ }
520
+ return v1;
521
+ } finally {
522
+ wasm.__wbindgen_add_to_stack_pointer(16);
523
+ }
524
+ }
525
+ /**
526
+ * @returns {number | undefined}
527
+ */
528
+ roundTripTime() {
529
+ try {
530
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
531
+ wasm.ermiscall_roundTripTime(retptr, this.__wbg_ptr);
532
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
533
+ var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
534
+ return r0 === 0 ? undefined : r2;
535
+ } finally {
536
+ wasm.__wbindgen_add_to_stack_pointer(16);
537
+ }
538
+ }
539
+ closeConnection() {
540
+ try {
541
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
542
+ wasm.ermiscall_closeConnection(retptr, this.__wbg_ptr);
543
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
544
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
545
+ if (r1) {
546
+ throw takeObject(r0);
547
+ }
548
+ } finally {
549
+ wasm.__wbindgen_add_to_stack_pointer(16);
550
+ }
551
+ }
552
+ /**
553
+ * @param {Uint8Array} data
554
+ */
555
+ sendAudioFrame(data) {
556
+ try {
557
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
558
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
559
+ const len0 = WASM_VECTOR_LEN;
560
+ wasm.ermiscall_sendAudioFrame(retptr, this.__wbg_ptr, ptr0, len0);
561
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
562
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
563
+ if (r1) {
564
+ throw takeObject(r0);
565
+ }
566
+ } finally {
567
+ wasm.__wbindgen_add_to_stack_pointer(16);
568
+ }
569
+ }
570
+ /**
571
+ * @returns {Promise<void>}
572
+ */
573
+ acceptConnection() {
574
+ const ret = wasm.ermiscall_acceptConnection(this.__wbg_ptr);
575
+ return takeObject(ret);
576
+ }
577
+ /**
578
+ * @param {Uint8Array} data
579
+ */
580
+ sendControlFrame(data) {
581
+ try {
582
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
583
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
584
+ const len0 = WASM_VECTOR_LEN;
585
+ wasm.ermiscall_sendControlFrame(retptr, this.__wbg_ptr, ptr0, len0);
586
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
587
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
588
+ if (r1) {
589
+ throw takeObject(r0);
590
+ }
591
+ } finally {
592
+ wasm.__wbindgen_add_to_stack_pointer(16);
593
+ }
594
+ }
595
+ /**
596
+ * @returns {number | undefined}
597
+ */
598
+ currentPacketLoss() {
599
+ try {
600
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
601
+ wasm.ermiscall_currentPacketLoss(retptr, this.__wbg_ptr);
602
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
603
+ var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
604
+ return r0 === 0 ? undefined : r2;
605
+ } finally {
606
+ wasm.__wbindgen_add_to_stack_pointer(16);
607
+ }
608
+ }
609
+ /**
610
+ * @returns {Promise<string>}
611
+ */
612
+ getLocalEndpointAddr() {
613
+ const ret = wasm.ermiscall_getLocalEndpointAddr(this.__wbg_ptr);
614
+ return takeObject(ret);
615
+ }
616
+ constructor() {
617
+ const ret = wasm.ermiscall_new();
618
+ this.__wbg_ptr = ret >>> 0;
619
+ ErmisCallFinalization.register(this, this.__wbg_ptr, this);
620
+ return this;
621
+ }
622
+ /**
623
+ * @returns {Uint8Array}
624
+ */
625
+ recv() {
626
+ try {
627
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
628
+ wasm.ermiscall_recv(retptr, this.__wbg_ptr);
629
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
630
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
631
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
632
+ if (r2) {
633
+ throw takeObject(r1);
634
+ }
635
+ return takeObject(r0);
636
+ } finally {
637
+ wasm.__wbindgen_add_to_stack_pointer(16);
638
+ }
639
+ }
640
+ /**
641
+ * @param {any} relay_urls
642
+ * @param {Uint8Array | null} [secret_key]
643
+ * @returns {Promise<void>}
644
+ */
645
+ spawn(relay_urls, secret_key) {
646
+ var ptr0 = isLikeNone(secret_key) ? 0 : passArray8ToWasm0(secret_key, wasm.__wbindgen_export);
647
+ var len0 = WASM_VECTOR_LEN;
648
+ const ret = wasm.ermiscall_spawn(this.__wbg_ptr, addHeapObject(relay_urls), ptr0, len0);
649
+ return takeObject(ret);
650
+ }
651
+ /**
652
+ * @param {string} addr
653
+ * @returns {Promise<void>}
654
+ */
655
+ connect(addr) {
656
+ const ptr0 = passStringToWasm0(addr, wasm.__wbindgen_export, wasm.__wbindgen_export2);
657
+ const len0 = WASM_VECTOR_LEN;
658
+ const ret = wasm.ermiscall_connect(this.__wbg_ptr, ptr0, len0);
659
+ return takeObject(ret);
660
+ }
661
+ /**
662
+ * @returns {any}
663
+ */
664
+ getStats() {
665
+ try {
666
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
667
+ wasm.ermiscall_getStats(retptr, this.__wbg_ptr);
668
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
669
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
670
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
671
+ if (r2) {
672
+ throw takeObject(r1);
673
+ }
674
+ return takeObject(r0);
675
+ } finally {
676
+ wasm.__wbindgen_add_to_stack_pointer(16);
677
+ }
678
+ }
664
679
  }
665
680
  if (Symbol.dispose) ErmisCall.prototype[Symbol.dispose] = ErmisCall.prototype.free;
666
681
 
667
- const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
668
- ? { register: () => {}, unregister: () => {} }
669
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
682
+ const IntoUnderlyingByteSourceFinalization =
683
+ typeof FinalizationRegistry === 'undefined'
684
+ ? { register: () => {}, unregister: () => {} }
685
+ : new FinalizationRegistry((ptr) => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
670
686
 
671
687
  export class IntoUnderlyingByteSource {
672
-
673
- __destroy_into_raw() {
674
- const ptr = this.__wbg_ptr;
675
- this.__wbg_ptr = 0;
676
- IntoUnderlyingByteSourceFinalization.unregister(this);
677
- return ptr;
678
- }
679
-
680
- free() {
681
- const ptr = this.__destroy_into_raw();
682
- wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
683
- }
684
- /**
685
- * @returns {ReadableStreamType}
686
- */
687
- get type() {
688
- const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
689
- return __wbindgen_enum_ReadableStreamType[ret];
690
- }
691
- /**
692
- * @returns {number}
693
- */
694
- get autoAllocateChunkSize() {
695
- const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
696
- return ret >>> 0;
697
- }
698
- /**
699
- * @param {ReadableByteStreamController} controller
700
- */
701
- start(controller) {
702
- wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));
703
- }
704
- /**
705
- * @param {ReadableByteStreamController} controller
706
- * @returns {Promise<any>}
707
- */
708
- pull(controller) {
709
- const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));
710
- return takeObject(ret);
711
- }
712
- cancel() {
713
- const ptr = this.__destroy_into_raw();
714
- wasm.intounderlyingbytesource_cancel(ptr);
715
- }
688
+ __destroy_into_raw() {
689
+ const ptr = this.__wbg_ptr;
690
+ this.__wbg_ptr = 0;
691
+ IntoUnderlyingByteSourceFinalization.unregister(this);
692
+ return ptr;
693
+ }
694
+
695
+ free() {
696
+ const ptr = this.__destroy_into_raw();
697
+ wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
698
+ }
699
+ /**
700
+ * @returns {number}
701
+ */
702
+ get autoAllocateChunkSize() {
703
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
704
+ return ret >>> 0;
705
+ }
706
+ /**
707
+ * @param {ReadableByteStreamController} controller
708
+ * @returns {Promise<any>}
709
+ */
710
+ pull(controller) {
711
+ const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));
712
+ return takeObject(ret);
713
+ }
714
+ /**
715
+ * @param {ReadableByteStreamController} controller
716
+ */
717
+ start(controller) {
718
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));
719
+ }
720
+ /**
721
+ * @returns {ReadableStreamType}
722
+ */
723
+ get type() {
724
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
725
+ return __wbindgen_enum_ReadableStreamType[ret];
726
+ }
727
+ cancel() {
728
+ const ptr = this.__destroy_into_raw();
729
+ wasm.intounderlyingbytesource_cancel(ptr);
730
+ }
716
731
  }
717
732
  if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
718
733
 
719
- const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
720
- ? { register: () => {}, unregister: () => {} }
721
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
734
+ const IntoUnderlyingSinkFinalization =
735
+ typeof FinalizationRegistry === 'undefined'
736
+ ? { register: () => {}, unregister: () => {} }
737
+ : new FinalizationRegistry((ptr) => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
722
738
 
723
739
  export class IntoUnderlyingSink {
724
-
725
- __destroy_into_raw() {
726
- const ptr = this.__wbg_ptr;
727
- this.__wbg_ptr = 0;
728
- IntoUnderlyingSinkFinalization.unregister(this);
729
- return ptr;
730
- }
731
-
732
- free() {
733
- const ptr = this.__destroy_into_raw();
734
- wasm.__wbg_intounderlyingsink_free(ptr, 0);
735
- }
736
- /**
737
- * @param {any} chunk
738
- * @returns {Promise<any>}
739
- */
740
- write(chunk) {
741
- const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));
742
- return takeObject(ret);
743
- }
744
- /**
745
- * @returns {Promise<any>}
746
- */
747
- close() {
748
- const ptr = this.__destroy_into_raw();
749
- const ret = wasm.intounderlyingsink_close(ptr);
750
- return takeObject(ret);
751
- }
752
- /**
753
- * @param {any} reason
754
- * @returns {Promise<any>}
755
- */
756
- abort(reason) {
757
- const ptr = this.__destroy_into_raw();
758
- const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));
759
- return takeObject(ret);
760
- }
740
+ __destroy_into_raw() {
741
+ const ptr = this.__wbg_ptr;
742
+ this.__wbg_ptr = 0;
743
+ IntoUnderlyingSinkFinalization.unregister(this);
744
+ return ptr;
745
+ }
746
+
747
+ free() {
748
+ const ptr = this.__destroy_into_raw();
749
+ wasm.__wbg_intounderlyingsink_free(ptr, 0);
750
+ }
751
+ /**
752
+ * @param {any} reason
753
+ * @returns {Promise<any>}
754
+ */
755
+ abort(reason) {
756
+ const ptr = this.__destroy_into_raw();
757
+ const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));
758
+ return takeObject(ret);
759
+ }
760
+ /**
761
+ * @returns {Promise<any>}
762
+ */
763
+ close() {
764
+ const ptr = this.__destroy_into_raw();
765
+ const ret = wasm.intounderlyingsink_close(ptr);
766
+ return takeObject(ret);
767
+ }
768
+ /**
769
+ * @param {any} chunk
770
+ * @returns {Promise<any>}
771
+ */
772
+ write(chunk) {
773
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));
774
+ return takeObject(ret);
775
+ }
761
776
  }
762
777
  if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
763
778
 
764
- const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
765
- ? { register: () => {}, unregister: () => {} }
766
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
779
+ const IntoUnderlyingSourceFinalization =
780
+ typeof FinalizationRegistry === 'undefined'
781
+ ? { register: () => {}, unregister: () => {} }
782
+ : new FinalizationRegistry((ptr) => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
767
783
 
768
784
  export class IntoUnderlyingSource {
769
-
770
- __destroy_into_raw() {
771
- const ptr = this.__wbg_ptr;
772
- this.__wbg_ptr = 0;
773
- IntoUnderlyingSourceFinalization.unregister(this);
774
- return ptr;
775
- }
776
-
777
- free() {
778
- const ptr = this.__destroy_into_raw();
779
- wasm.__wbg_intounderlyingsource_free(ptr, 0);
780
- }
781
- /**
782
- * @param {ReadableStreamDefaultController} controller
783
- * @returns {Promise<any>}
784
- */
785
- pull(controller) {
786
- const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));
787
- return takeObject(ret);
788
- }
789
- cancel() {
790
- const ptr = this.__destroy_into_raw();
791
- wasm.intounderlyingsource_cancel(ptr);
792
- }
785
+ __destroy_into_raw() {
786
+ const ptr = this.__wbg_ptr;
787
+ this.__wbg_ptr = 0;
788
+ IntoUnderlyingSourceFinalization.unregister(this);
789
+ return ptr;
790
+ }
791
+
792
+ free() {
793
+ const ptr = this.__destroy_into_raw();
794
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
795
+ }
796
+ /**
797
+ * @param {ReadableStreamDefaultController} controller
798
+ * @returns {Promise<any>}
799
+ */
800
+ pull(controller) {
801
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));
802
+ return takeObject(ret);
803
+ }
804
+ cancel() {
805
+ const ptr = this.__destroy_into_raw();
806
+ wasm.intounderlyingsource_cancel(ptr);
807
+ }
793
808
  }
794
809
  if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
795
810
 
796
811
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
797
812
 
798
813
  async function __wbg_load(module, imports) {
799
- if (typeof Response === 'function' && module instanceof Response) {
800
- if (typeof WebAssembly.instantiateStreaming === 'function') {
801
- try {
802
- return await WebAssembly.instantiateStreaming(module, imports);
803
-
804
- } catch (e) {
805
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
806
-
807
- if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
808
- 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);
809
-
810
- } else {
811
- throw e;
812
- }
813
- }
814
- }
815
-
816
- const bytes = await module.arrayBuffer();
817
- return await WebAssembly.instantiate(bytes, imports);
818
-
819
- } else {
820
- const instance = await WebAssembly.instantiate(module, imports);
821
-
822
- if (instance instanceof WebAssembly.Instance) {
823
- return { instance, module };
824
-
825
- } else {
826
- return instance;
827
- }
828
- }
814
+ if (typeof Response === 'function' && module instanceof Response) {
815
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
816
+ try {
817
+ return await WebAssembly.instantiateStreaming(module, imports);
818
+ } catch (e) {
819
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
820
+
821
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
822
+ console.warn(
823
+ '`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',
824
+ e,
825
+ );
826
+ } else {
827
+ throw e;
828
+ }
829
+ }
830
+ }
831
+
832
+ const bytes = await module.arrayBuffer();
833
+ return await WebAssembly.instantiate(bytes, imports);
834
+ } else {
835
+ const instance = await WebAssembly.instantiate(module, imports);
836
+
837
+ if (instance instanceof WebAssembly.Instance) {
838
+ return { instance, module };
839
+ } else {
840
+ return instance;
841
+ }
842
+ }
829
843
  }
830
844
 
831
845
  function __wbg_get_imports() {
832
- const imports = {};
833
- imports.wbg = {};
834
- imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
835
- const ret = Error(getStringFromWasm0(arg0, arg1));
836
- return addHeapObject(ret);
837
- };
838
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
839
- const ret = String(getObject(arg1));
840
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
841
- const len1 = WASM_VECTOR_LEN;
842
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
843
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
844
- };
845
- imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
846
- const v = getObject(arg0);
847
- const ret = typeof(v) === 'boolean' ? v : undefined;
848
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
849
- };
850
- imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
851
- const ret = debugString(getObject(arg1));
852
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
853
- const len1 = WASM_VECTOR_LEN;
854
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
855
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
856
- };
857
- imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
858
- const ret = typeof(getObject(arg0)) === 'function';
859
- return ret;
860
- };
861
- imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
862
- const val = getObject(arg0);
863
- const ret = typeof(val) === 'object' && val !== null;
864
- return ret;
865
- };
866
- imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
867
- const ret = typeof(getObject(arg0)) === 'string';
868
- return ret;
869
- };
870
- imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
871
- const ret = getObject(arg0) === undefined;
872
- return ret;
873
- };
874
- imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
875
- const ret = getObject(arg0) == getObject(arg1);
876
- return ret;
877
- };
878
- imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
879
- const obj = getObject(arg1);
880
- const ret = typeof(obj) === 'number' ? obj : undefined;
881
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
882
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
883
- };
884
- imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
885
- const obj = getObject(arg1);
886
- const ret = typeof(obj) === 'string' ? obj : undefined;
887
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
888
- var len1 = WASM_VECTOR_LEN;
889
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
890
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
891
- };
892
- imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
893
- throw new Error(getStringFromWasm0(arg0, arg1));
894
- };
895
- imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
896
- getObject(arg0)._wbg_cb_unref();
897
- };
898
- imports.wbg.__wbg_abort_28ad55c5825b004d = function(arg0, arg1) {
899
- getObject(arg0).abort(getObject(arg1));
900
- };
901
- imports.wbg.__wbg_abort_e7eb059f72f9ed0c = function(arg0) {
902
- getObject(arg0).abort();
903
- };
904
- imports.wbg.__wbg_addEventListener_40dc0fc428fc49e1 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
905
- getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
906
- }, arguments) };
907
- imports.wbg.__wbg_append_b577eb3a177bc0fa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
908
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
909
- }, arguments) };
910
- imports.wbg.__wbg_body_587542b2fd8e06c0 = function(arg0) {
911
- const ret = getObject(arg0).body;
912
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
913
- };
914
- imports.wbg.__wbg_buffer_ccc4520b36d3ccf4 = function(arg0) {
915
- const ret = getObject(arg0).buffer;
916
- return addHeapObject(ret);
917
- };
918
- imports.wbg.__wbg_byobRequest_2344e6975f27456e = function(arg0) {
919
- const ret = getObject(arg0).byobRequest;
920
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
921
- };
922
- imports.wbg.__wbg_byteLength_bcd42e4025299788 = function(arg0) {
923
- const ret = getObject(arg0).byteLength;
924
- return ret;
925
- };
926
- imports.wbg.__wbg_byteOffset_ca3a6cf7944b364b = function(arg0) {
927
- const ret = getObject(arg0).byteOffset;
928
- return ret;
929
- };
930
- imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
931
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
932
- return addHeapObject(ret);
933
- }, arguments) };
934
- imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
935
- const ret = getObject(arg0).call(getObject(arg1));
936
- return addHeapObject(ret);
937
- }, arguments) };
938
- imports.wbg.__wbg_cancel_48ab6f9dc366e369 = function(arg0) {
939
- const ret = getObject(arg0).cancel();
940
- return addHeapObject(ret);
941
- };
942
- imports.wbg.__wbg_catch_943836faa5d29bfb = function(arg0, arg1) {
943
- const ret = getObject(arg0).catch(getObject(arg1));
944
- return addHeapObject(ret);
945
- };
946
- imports.wbg.__wbg_clearTimeout_15dfc3d1dcb635c6 = function() { return handleError(function (arg0, arg1) {
947
- getObject(arg0).clearTimeout(takeObject(arg1));
948
- }, arguments) };
949
- imports.wbg.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
950
- const ret = clearTimeout(takeObject(arg0));
951
- return addHeapObject(ret);
952
- };
953
- imports.wbg.__wbg_close_5a6caed3231b68cd = function() { return handleError(function (arg0) {
954
- getObject(arg0).close();
955
- }, arguments) };
956
- imports.wbg.__wbg_close_6956df845478561a = function() { return handleError(function (arg0) {
957
- getObject(arg0).close();
958
- }, arguments) };
959
- imports.wbg.__wbg_close_885e277edf06b3fa = function() { return handleError(function (arg0) {
960
- getObject(arg0).close();
961
- }, arguments) };
962
- imports.wbg.__wbg_code_20d453b11b200026 = function(arg0) {
963
- const ret = getObject(arg0).code;
964
- return ret;
965
- };
966
- imports.wbg.__wbg_code_218f5fdf8c7fcabd = function(arg0) {
967
- const ret = getObject(arg0).code;
968
- return ret;
969
- };
970
- imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
971
- const ret = getObject(arg0).crypto;
972
- return addHeapObject(ret);
973
- };
974
- imports.wbg.__wbg_data_ee4306d069f24f2d = function(arg0) {
975
- const ret = getObject(arg0).data;
976
- return addHeapObject(ret);
977
- };
978
- imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
979
- const ret = getObject(arg0).done;
980
- return ret;
981
- };
982
- imports.wbg.__wbg_enqueue_7b18a650aec77898 = function() { return handleError(function (arg0, arg1) {
983
- getObject(arg0).enqueue(getObject(arg1));
984
- }, arguments) };
985
- imports.wbg.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
986
- const ret = fetch(getObject(arg0));
987
- return addHeapObject(ret);
988
- };
989
- imports.wbg.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
990
- const ret = getObject(arg0).fetch(getObject(arg1));
991
- return addHeapObject(ret);
992
- };
993
- imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
994
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
995
- }, arguments) };
996
- imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
997
- getObject(arg0).getRandomValues(getObject(arg1));
998
- }, arguments) };
999
- imports.wbg.__wbg_getReader_48e00749fe3f6089 = function() { return handleError(function (arg0) {
1000
- const ret = getObject(arg0).getReader();
1001
- return addHeapObject(ret);
1002
- }, arguments) };
1003
- imports.wbg.__wbg_getTime_14776bfb48a1bff9 = function(arg0) {
1004
- const ret = getObject(arg0).getTime();
1005
- return ret;
1006
- };
1007
- imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
1008
- const ret = getObject(arg0)[arg1 >>> 0];
1009
- return addHeapObject(ret);
1010
- };
1011
- imports.wbg.__wbg_get_done_a0463af43a1fc764 = function(arg0) {
1012
- const ret = getObject(arg0).done;
1013
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1014
- };
1015
- imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
1016
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
1017
- return addHeapObject(ret);
1018
- }, arguments) };
1019
- imports.wbg.__wbg_get_value_5ce96c9f81ce7398 = function(arg0) {
1020
- const ret = getObject(arg0).value;
1021
- return addHeapObject(ret);
1022
- };
1023
- imports.wbg.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
1024
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
1025
- return ret;
1026
- }, arguments) };
1027
- imports.wbg.__wbg_headers_b87d7eaba61c3278 = function(arg0) {
1028
- const ret = getObject(arg0).headers;
1029
- return addHeapObject(ret);
1030
- };
1031
- imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
1032
- let result;
1033
- try {
1034
- result = getObject(arg0) instanceof ArrayBuffer;
1035
- } catch (_) {
1036
- result = false;
1037
- }
1038
- const ret = result;
1039
- return ret;
1040
- };
1041
- imports.wbg.__wbg_instanceof_Blob_23b3322f66e5a83b = function(arg0) {
1042
- let result;
1043
- try {
1044
- result = getObject(arg0) instanceof Blob;
1045
- } catch (_) {
1046
- result = false;
1047
- }
1048
- const ret = result;
1049
- return ret;
1050
- };
1051
- imports.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
1052
- let result;
1053
- try {
1054
- result = getObject(arg0) instanceof Response;
1055
- } catch (_) {
1056
- result = false;
1057
- }
1058
- const ret = result;
1059
- return ret;
1060
- };
1061
- imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
1062
- let result;
1063
- try {
1064
- result = getObject(arg0) instanceof Uint8Array;
1065
- } catch (_) {
1066
- result = false;
1067
- }
1068
- const ret = result;
1069
- return ret;
1070
- };
1071
- imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
1072
- const ret = Array.isArray(getObject(arg0));
1073
- return ret;
1074
- };
1075
- imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
1076
- const ret = Symbol.iterator;
1077
- return addHeapObject(ret);
1078
- };
1079
- imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
1080
- const ret = getObject(arg0).length;
1081
- return ret;
1082
- };
1083
- imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
1084
- const ret = getObject(arg0).length;
1085
- return ret;
1086
- };
1087
- imports.wbg.__wbg_log_ee0138cca4957740 = function(arg0, arg1) {
1088
- console.log(getStringFromWasm0(arg0, arg1));
1089
- };
1090
- imports.wbg.__wbg_message_bd42dbe3f2f3ed8e = function(arg0, arg1) {
1091
- const ret = getObject(arg1).message;
1092
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1093
- const len1 = WASM_VECTOR_LEN;
1094
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1095
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1096
- };
1097
- imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1098
- const ret = getObject(arg0).msCrypto;
1099
- return addHeapObject(ret);
1100
- };
1101
- imports.wbg.__wbg_new_0_f9740686d739025c = function() {
1102
- const ret = new Date();
1103
- return addHeapObject(ret);
1104
- };
1105
- imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
1106
- const ret = new Object();
1107
- return addHeapObject(ret);
1108
- };
1109
- imports.wbg.__wbg_new_2531773dac38ebb3 = function() { return handleError(function () {
1110
- const ret = new AbortController();
1111
- return addHeapObject(ret);
1112
- }, arguments) };
1113
- imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
1114
- try {
1115
- var state0 = {a: arg0, b: arg1};
1116
- var cb0 = (arg0, arg1) => {
1117
- const a = state0.a;
1118
- state0.a = 0;
1119
- try {
1120
- return __wasm_bindgen_func_elem_14376(a, state0.b, arg0, arg1);
1121
- } finally {
1122
- state0.a = a;
1123
- }
1124
- };
1125
- const ret = new Promise(cb0);
1126
- return addHeapObject(ret);
1127
- } finally {
1128
- state0.a = state0.b = 0;
1129
- }
1130
- };
1131
- imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
1132
- const ret = new Uint8Array(getObject(arg0));
1133
- return addHeapObject(ret);
1134
- };
1135
- imports.wbg.__wbg_new_881c4fe631eee9ad = function() { return handleError(function (arg0, arg1) {
1136
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
1137
- return addHeapObject(ret);
1138
- }, arguments) };
1139
- imports.wbg.__wbg_new_9edf9838a2def39c = function() { return handleError(function () {
1140
- const ret = new Headers();
1141
- return addHeapObject(ret);
1142
- }, arguments) };
1143
- imports.wbg.__wbg_new_a7442b4b19c1a356 = function(arg0, arg1) {
1144
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1145
- return addHeapObject(ret);
1146
- };
1147
- imports.wbg.__wbg_new_e17d9f43105b08be = function() {
1148
- const ret = new Array();
1149
- return addHeapObject(ret);
1150
- };
1151
- imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
1152
- const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1153
- return addHeapObject(ret);
1154
- };
1155
- imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
1156
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1157
- return addHeapObject(ret);
1158
- };
1159
- imports.wbg.__wbg_new_with_byte_offset_and_length_46e3e6a5e9f9e89b = function(arg0, arg1, arg2) {
1160
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1161
- return addHeapObject(ret);
1162
- };
1163
- imports.wbg.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
1164
- const ret = new Uint8Array(arg0 >>> 0);
1165
- return addHeapObject(ret);
1166
- };
1167
- imports.wbg.__wbg_new_with_str_and_init_0ae7728b6ec367b1 = function() { return handleError(function (arg0, arg1, arg2) {
1168
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1169
- return addHeapObject(ret);
1170
- }, arguments) };
1171
- imports.wbg.__wbg_new_with_str_sequence_57a88eb77393f23f = function() { return handleError(function (arg0, arg1, arg2) {
1172
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));
1173
- return addHeapObject(ret);
1174
- }, arguments) };
1175
- imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
1176
- const ret = getObject(arg0).next();
1177
- return addHeapObject(ret);
1178
- }, arguments) };
1179
- imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
1180
- const ret = getObject(arg0).next;
1181
- return addHeapObject(ret);
1182
- };
1183
- imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
1184
- const ret = getObject(arg0).node;
1185
- return addHeapObject(ret);
1186
- };
1187
- imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
1188
- const ret = getObject(arg0).now();
1189
- return ret;
1190
- };
1191
- imports.wbg.__wbg_now_793306c526e2e3b6 = function() {
1192
- const ret = Date.now();
1193
- return ret;
1194
- };
1195
- imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
1196
- const ret = getObject(arg0).performance;
1197
- return addHeapObject(ret);
1198
- };
1199
- imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1200
- const ret = getObject(arg0).process;
1201
- return addHeapObject(ret);
1202
- };
1203
- imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
1204
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1205
- };
1206
- imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
1207
- const ret = getObject(arg0).push(getObject(arg1));
1208
- return ret;
1209
- };
1210
- imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
1211
- const ret = getObject(arg0).queueMicrotask;
1212
- return addHeapObject(ret);
1213
- };
1214
- imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
1215
- queueMicrotask(getObject(arg0));
1216
- };
1217
- imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1218
- getObject(arg0).randomFillSync(takeObject(arg1));
1219
- }, arguments) };
1220
- imports.wbg.__wbg_read_48f1593df542f968 = function(arg0) {
1221
- const ret = getObject(arg0).read();
1222
- return addHeapObject(ret);
1223
- };
1224
- imports.wbg.__wbg_readyState_97984f126080aeda = function(arg0) {
1225
- const ret = getObject(arg0).readyState;
1226
- return ret;
1227
- };
1228
- imports.wbg.__wbg_reason_1cced37e3a93763e = function(arg0, arg1) {
1229
- const ret = getObject(arg1).reason;
1230
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1231
- const len1 = WASM_VECTOR_LEN;
1232
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1233
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1234
- };
1235
- imports.wbg.__wbg_releaseLock_5d0b5a68887b891d = function(arg0) {
1236
- getObject(arg0).releaseLock();
1237
- };
1238
- imports.wbg.__wbg_removeEventListener_924d9db66a4f775d = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1239
- getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
1240
- }, arguments) };
1241
- imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1242
- const ret = module.require;
1243
- return addHeapObject(ret);
1244
- }, arguments) };
1245
- imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
1246
- const ret = Promise.resolve(getObject(arg0));
1247
- return addHeapObject(ret);
1248
- };
1249
- imports.wbg.__wbg_respond_0f4dbf5386f5c73e = function() { return handleError(function (arg0, arg1) {
1250
- getObject(arg0).respond(arg1 >>> 0);
1251
- }, arguments) };
1252
- imports.wbg.__wbg_send_171576d2f7487517 = function() { return handleError(function (arg0, arg1, arg2) {
1253
- getObject(arg0).send(getStringFromWasm0(arg1, arg2));
1254
- }, arguments) };
1255
- imports.wbg.__wbg_send_3d2cf376613294f0 = function() { return handleError(function (arg0, arg1, arg2) {
1256
- getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
1257
- }, arguments) };
1258
- imports.wbg.__wbg_setTimeout_4eb823e8b72fbe79 = function() { return handleError(function (arg0, arg1, arg2) {
1259
- const ret = getObject(arg0).setTimeout(takeObject(arg1), arg2);
1260
- return addHeapObject(ret);
1261
- }, arguments) };
1262
- imports.wbg.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
1263
- const ret = setTimeout(getObject(arg0), arg1);
1264
- return addHeapObject(ret);
1265
- };
1266
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1267
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1268
- };
1269
- imports.wbg.__wbg_set_9e6516df7b7d0f19 = function(arg0, arg1, arg2) {
1270
- getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
1271
- };
1272
- imports.wbg.__wbg_set_binaryType_9d839cea8fcdc5c3 = function(arg0, arg1) {
1273
- getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
1274
- };
1275
- imports.wbg.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
1276
- getObject(arg0).body = getObject(arg1);
1277
- };
1278
- imports.wbg.__wbg_set_cache_2f9deb19b92b81e3 = function(arg0, arg1) {
1279
- getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
1280
- };
1281
- imports.wbg.__wbg_set_credentials_f621cd2d85c0c228 = function(arg0, arg1) {
1282
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1283
- };
1284
- imports.wbg.__wbg_set_handle_event_b2de49ad6c81e3c8 = function(arg0, arg1) {
1285
- getObject(arg0).handleEvent = getObject(arg1);
1286
- };
1287
- imports.wbg.__wbg_set_headers_6926da238cd32ee4 = function(arg0, arg1) {
1288
- getObject(arg0).headers = getObject(arg1);
1289
- };
1290
- imports.wbg.__wbg_set_method_c02d8cbbe204ac2d = function(arg0, arg1, arg2) {
1291
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1292
- };
1293
- imports.wbg.__wbg_set_mode_52ef73cfa79639cb = function(arg0, arg1) {
1294
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1295
- };
1296
- imports.wbg.__wbg_set_onclose_c09e4f7422de8dae = function(arg0, arg1) {
1297
- getObject(arg0).onclose = getObject(arg1);
1298
- };
1299
- imports.wbg.__wbg_set_onerror_337a3a2db9517378 = function(arg0, arg1) {
1300
- getObject(arg0).onerror = getObject(arg1);
1301
- };
1302
- imports.wbg.__wbg_set_onmessage_8661558551a89792 = function(arg0, arg1) {
1303
- getObject(arg0).onmessage = getObject(arg1);
1304
- };
1305
- imports.wbg.__wbg_set_onopen_efccb9305427b907 = function(arg0, arg1) {
1306
- getObject(arg0).onopen = getObject(arg1);
1307
- };
1308
- imports.wbg.__wbg_set_signal_dda2cf7ccb6bee0f = function(arg0, arg1) {
1309
- getObject(arg0).signal = getObject(arg1);
1310
- };
1311
- imports.wbg.__wbg_signal_4db5aa055bf9eb9a = function(arg0) {
1312
- const ret = getObject(arg0).signal;
1313
- return addHeapObject(ret);
1314
- };
1315
- imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
1316
- const ret = typeof global === 'undefined' ? null : global;
1317
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1318
- };
1319
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
1320
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1321
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1322
- };
1323
- imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
1324
- const ret = typeof self === 'undefined' ? null : self;
1325
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1326
- };
1327
- imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
1328
- const ret = typeof window === 'undefined' ? null : window;
1329
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1330
- };
1331
- imports.wbg.__wbg_status_de7eed5a7a5bfd5d = function(arg0) {
1332
- const ret = getObject(arg0).status;
1333
- return ret;
1334
- };
1335
- imports.wbg.__wbg_stringify_b5fb28f6465d9c3e = function() { return handleError(function (arg0) {
1336
- const ret = JSON.stringify(getObject(arg0));
1337
- return addHeapObject(ret);
1338
- }, arguments) };
1339
- imports.wbg.__wbg_subarray_480600f3d6a9f26c = function(arg0, arg1, arg2) {
1340
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1341
- return addHeapObject(ret);
1342
- };
1343
- imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
1344
- const ret = getObject(arg0).then(getObject(arg1));
1345
- return addHeapObject(ret);
1346
- };
1347
- imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
1348
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1349
- return addHeapObject(ret);
1350
- };
1351
- imports.wbg.__wbg_url_9bd0af1cd8643de7 = function(arg0, arg1) {
1352
- const ret = getObject(arg1).url;
1353
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1354
- const len1 = WASM_VECTOR_LEN;
1355
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1356
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1357
- };
1358
- imports.wbg.__wbg_url_b36d2a5008eb056f = function(arg0, arg1) {
1359
- const ret = getObject(arg1).url;
1360
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1361
- const len1 = WASM_VECTOR_LEN;
1362
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1363
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1364
- };
1365
- imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
1366
- const ret = getObject(arg0).value;
1367
- return addHeapObject(ret);
1368
- };
1369
- imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
1370
- const ret = getObject(arg0).versions;
1371
- return addHeapObject(ret);
1372
- };
1373
- imports.wbg.__wbg_view_f6c15ac9fed63bbd = function(arg0) {
1374
- const ret = getObject(arg0).view;
1375
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1376
- };
1377
- imports.wbg.__wbg_wasClean_3d7c0cf05bd0a123 = function(arg0) {
1378
- const ret = getObject(arg0).wasClean;
1379
- return ret;
1380
- };
1381
- imports.wbg.__wbindgen_cast_0b4723bb5ff7475b = function(arg0, arg1) {
1382
- // Cast intrinsic for `Closure(Closure { dtor_idx: 2388, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2389, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1383
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_11664, __wasm_bindgen_func_elem_11688);
1384
- return addHeapObject(ret);
1385
- };
1386
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1387
- // Cast intrinsic for `Ref(String) -> Externref`.
1388
- const ret = getStringFromWasm0(arg0, arg1);
1389
- return addHeapObject(ret);
1390
- };
1391
- imports.wbg.__wbindgen_cast_253c73f2760a05aa = function(arg0, arg1) {
1392
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1351, function: Function { arguments: [], shim_idx: 1352, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1393
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_6219, __wasm_bindgen_func_elem_6230);
1394
- return addHeapObject(ret);
1395
- };
1396
- imports.wbg.__wbindgen_cast_343835dd8f264af2 = function(arg0, arg1) {
1397
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1255, function: Function { arguments: [], shim_idx: 1256, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1398
- const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_5735, __wasm_bindgen_func_elem_5748);
1399
- return addHeapObject(ret);
1400
- };
1401
- imports.wbg.__wbindgen_cast_7bacc9fa7d2c65f4 = function(arg0, arg1) {
1402
- // Cast intrinsic for `Closure(Closure { dtor_idx: 2465, function: Function { arguments: [], shim_idx: 2466, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1403
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_12841, __wasm_bindgen_func_elem_12858);
1404
- return addHeapObject(ret);
1405
- };
1406
- imports.wbg.__wbindgen_cast_88fdcfb6b716b7f8 = function(arg0, arg1) {
1407
- // Cast intrinsic for `Closure(Closure { dtor_idx: 2473, function: Function { arguments: [Externref], shim_idx: 2474, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1408
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_12896, __wasm_bindgen_func_elem_12912);
1409
- return addHeapObject(ret);
1410
- };
1411
- imports.wbg.__wbindgen_cast_c43a1cf1b94f2e7c = function(arg0, arg1) {
1412
- // Cast intrinsic for `Closure(Closure { dtor_idx: 544, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 545, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1413
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2083, __wasm_bindgen_func_elem_2287);
1414
- return addHeapObject(ret);
1415
- };
1416
- imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1417
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1418
- const ret = getArrayU8FromWasm0(arg0, arg1);
1419
- return addHeapObject(ret);
1420
- };
1421
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1422
- // Cast intrinsic for `F64 -> Externref`.
1423
- const ret = arg0;
1424
- return addHeapObject(ret);
1425
- };
1426
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1427
- const ret = getObject(arg0);
1428
- return addHeapObject(ret);
1429
- };
1430
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1431
- takeObject(arg0);
1432
- };
1433
-
1434
- return imports;
846
+ const imports = {};
847
+ imports.wbg = {};
848
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function (arg0, arg1) {
849
+ const ret = Error(getStringFromWasm0(arg0, arg1));
850
+ return addHeapObject(ret);
851
+ };
852
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
853
+ const ret = String(getObject(arg1));
854
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
855
+ const len1 = WASM_VECTOR_LEN;
856
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
857
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
858
+ };
859
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function (arg0) {
860
+ const v = getObject(arg0);
861
+ const ret = typeof v === 'boolean' ? v : undefined;
862
+ return isLikeNone(ret) ? 0xffffff : ret ? 1 : 0;
863
+ };
864
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function (arg0, arg1) {
865
+ const ret = debugString(getObject(arg1));
866
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
867
+ const len1 = WASM_VECTOR_LEN;
868
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
869
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
870
+ };
871
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function (arg0) {
872
+ const ret = typeof getObject(arg0) === 'function';
873
+ return ret;
874
+ };
875
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function (arg0) {
876
+ const val = getObject(arg0);
877
+ const ret = typeof val === 'object' && val !== null;
878
+ return ret;
879
+ };
880
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function (arg0) {
881
+ const ret = typeof getObject(arg0) === 'string';
882
+ return ret;
883
+ };
884
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function (arg0) {
885
+ const ret = getObject(arg0) === undefined;
886
+ return ret;
887
+ };
888
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function (arg0, arg1) {
889
+ const ret = getObject(arg0) == getObject(arg1);
890
+ return ret;
891
+ };
892
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function (arg0, arg1) {
893
+ const obj = getObject(arg1);
894
+ const ret = typeof obj === 'number' ? obj : undefined;
895
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
896
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
897
+ };
898
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function (arg0, arg1) {
899
+ const obj = getObject(arg1);
900
+ const ret = typeof obj === 'string' ? obj : undefined;
901
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
902
+ var len1 = WASM_VECTOR_LEN;
903
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
904
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
905
+ };
906
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function (arg0, arg1) {
907
+ throw new Error(getStringFromWasm0(arg0, arg1));
908
+ };
909
+ imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function (arg0) {
910
+ getObject(arg0)._wbg_cb_unref();
911
+ };
912
+ imports.wbg.__wbg_abort_28ad55c5825b004d = function (arg0, arg1) {
913
+ getObject(arg0).abort(getObject(arg1));
914
+ };
915
+ imports.wbg.__wbg_abort_e7eb059f72f9ed0c = function (arg0) {
916
+ getObject(arg0).abort();
917
+ };
918
+ imports.wbg.__wbg_addEventListener_40dc0fc428fc49e1 = function () {
919
+ return handleError(function (arg0, arg1, arg2, arg3) {
920
+ getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
921
+ }, arguments);
922
+ };
923
+ imports.wbg.__wbg_append_b577eb3a177bc0fa = function () {
924
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
925
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
926
+ }, arguments);
927
+ };
928
+ imports.wbg.__wbg_body_587542b2fd8e06c0 = function (arg0) {
929
+ const ret = getObject(arg0).body;
930
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
931
+ };
932
+ imports.wbg.__wbg_buffer_ccc4520b36d3ccf4 = function (arg0) {
933
+ const ret = getObject(arg0).buffer;
934
+ return addHeapObject(ret);
935
+ };
936
+ imports.wbg.__wbg_byobRequest_2344e6975f27456e = function (arg0) {
937
+ const ret = getObject(arg0).byobRequest;
938
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
939
+ };
940
+ imports.wbg.__wbg_byteLength_bcd42e4025299788 = function (arg0) {
941
+ const ret = getObject(arg0).byteLength;
942
+ return ret;
943
+ };
944
+ imports.wbg.__wbg_byteOffset_ca3a6cf7944b364b = function (arg0) {
945
+ const ret = getObject(arg0).byteOffset;
946
+ return ret;
947
+ };
948
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function () {
949
+ return handleError(function (arg0, arg1, arg2) {
950
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
951
+ return addHeapObject(ret);
952
+ }, arguments);
953
+ };
954
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function () {
955
+ return handleError(function (arg0, arg1) {
956
+ const ret = getObject(arg0).call(getObject(arg1));
957
+ return addHeapObject(ret);
958
+ }, arguments);
959
+ };
960
+ imports.wbg.__wbg_cancel_48ab6f9dc366e369 = function (arg0) {
961
+ const ret = getObject(arg0).cancel();
962
+ return addHeapObject(ret);
963
+ };
964
+ imports.wbg.__wbg_catch_943836faa5d29bfb = function (arg0, arg1) {
965
+ const ret = getObject(arg0).catch(getObject(arg1));
966
+ return addHeapObject(ret);
967
+ };
968
+ imports.wbg.__wbg_clearTimeout_15dfc3d1dcb635c6 = function () {
969
+ return handleError(function (arg0, arg1) {
970
+ getObject(arg0).clearTimeout(takeObject(arg1));
971
+ }, arguments);
972
+ };
973
+ imports.wbg.__wbg_clearTimeout_7a42b49784aea641 = function (arg0) {
974
+ const ret = clearTimeout(takeObject(arg0));
975
+ return addHeapObject(ret);
976
+ };
977
+ imports.wbg.__wbg_close_5a6caed3231b68cd = function () {
978
+ return handleError(function (arg0) {
979
+ getObject(arg0).close();
980
+ }, arguments);
981
+ };
982
+ imports.wbg.__wbg_close_6956df845478561a = function () {
983
+ return handleError(function (arg0) {
984
+ getObject(arg0).close();
985
+ }, arguments);
986
+ };
987
+ imports.wbg.__wbg_close_885e277edf06b3fa = function () {
988
+ return handleError(function (arg0) {
989
+ getObject(arg0).close();
990
+ }, arguments);
991
+ };
992
+ imports.wbg.__wbg_code_20d453b11b200026 = function (arg0) {
993
+ const ret = getObject(arg0).code;
994
+ return ret;
995
+ };
996
+ imports.wbg.__wbg_code_218f5fdf8c7fcabd = function (arg0) {
997
+ const ret = getObject(arg0).code;
998
+ return ret;
999
+ };
1000
+ imports.wbg.__wbg_crypto_574e78ad8b13b65f = function (arg0) {
1001
+ const ret = getObject(arg0).crypto;
1002
+ return addHeapObject(ret);
1003
+ };
1004
+ imports.wbg.__wbg_data_ee4306d069f24f2d = function (arg0) {
1005
+ const ret = getObject(arg0).data;
1006
+ return addHeapObject(ret);
1007
+ };
1008
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function (arg0) {
1009
+ const ret = getObject(arg0).done;
1010
+ return ret;
1011
+ };
1012
+ imports.wbg.__wbg_enqueue_7b18a650aec77898 = function () {
1013
+ return handleError(function (arg0, arg1) {
1014
+ getObject(arg0).enqueue(getObject(arg1));
1015
+ }, arguments);
1016
+ };
1017
+ imports.wbg.__wbg_fetch_74a3e84ebd2c9a0e = function (arg0) {
1018
+ const ret = fetch(getObject(arg0));
1019
+ return addHeapObject(ret);
1020
+ };
1021
+ imports.wbg.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
1022
+ const ret = getObject(arg0).fetch(getObject(arg1));
1023
+ return addHeapObject(ret);
1024
+ };
1025
+ imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function () {
1026
+ return handleError(function (arg0, arg1) {
1027
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1028
+ }, arguments);
1029
+ };
1030
+ imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function () {
1031
+ return handleError(function (arg0, arg1) {
1032
+ getObject(arg0).getRandomValues(getObject(arg1));
1033
+ }, arguments);
1034
+ };
1035
+ imports.wbg.__wbg_getReader_48e00749fe3f6089 = function () {
1036
+ return handleError(function (arg0) {
1037
+ const ret = getObject(arg0).getReader();
1038
+ return addHeapObject(ret);
1039
+ }, arguments);
1040
+ };
1041
+ imports.wbg.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
1042
+ const ret = getObject(arg0).getTime();
1043
+ return ret;
1044
+ };
1045
+ imports.wbg.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
1046
+ const ret = getObject(arg0)[arg1 >>> 0];
1047
+ return addHeapObject(ret);
1048
+ };
1049
+ imports.wbg.__wbg_get_done_a0463af43a1fc764 = function (arg0) {
1050
+ const ret = getObject(arg0).done;
1051
+ return isLikeNone(ret) ? 0xffffff : ret ? 1 : 0;
1052
+ };
1053
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function () {
1054
+ return handleError(function (arg0, arg1) {
1055
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
1056
+ return addHeapObject(ret);
1057
+ }, arguments);
1058
+ };
1059
+ imports.wbg.__wbg_get_value_5ce96c9f81ce7398 = function (arg0) {
1060
+ const ret = getObject(arg0).value;
1061
+ return addHeapObject(ret);
1062
+ };
1063
+ imports.wbg.__wbg_has_787fafc980c3ccdb = function () {
1064
+ return handleError(function (arg0, arg1) {
1065
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
1066
+ return ret;
1067
+ }, arguments);
1068
+ };
1069
+ imports.wbg.__wbg_headers_b87d7eaba61c3278 = function (arg0) {
1070
+ const ret = getObject(arg0).headers;
1071
+ return addHeapObject(ret);
1072
+ };
1073
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function (arg0) {
1074
+ let result;
1075
+ try {
1076
+ result = getObject(arg0) instanceof ArrayBuffer;
1077
+ } catch (_) {
1078
+ result = false;
1079
+ }
1080
+ const ret = result;
1081
+ return ret;
1082
+ };
1083
+ imports.wbg.__wbg_instanceof_Blob_23b3322f66e5a83b = function (arg0) {
1084
+ let result;
1085
+ try {
1086
+ result = getObject(arg0) instanceof Blob;
1087
+ } catch (_) {
1088
+ result = false;
1089
+ }
1090
+ const ret = result;
1091
+ return ret;
1092
+ };
1093
+ imports.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c = function (arg0) {
1094
+ let result;
1095
+ try {
1096
+ result = getObject(arg0) instanceof Response;
1097
+ } catch (_) {
1098
+ result = false;
1099
+ }
1100
+ const ret = result;
1101
+ return ret;
1102
+ };
1103
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function (arg0) {
1104
+ let result;
1105
+ try {
1106
+ result = getObject(arg0) instanceof Uint8Array;
1107
+ } catch (_) {
1108
+ result = false;
1109
+ }
1110
+ const ret = result;
1111
+ return ret;
1112
+ };
1113
+ imports.wbg.__wbg_isArray_96e0af9891d0945d = function (arg0) {
1114
+ const ret = Array.isArray(getObject(arg0));
1115
+ return ret;
1116
+ };
1117
+ imports.wbg.__wbg_iterator_e5822695327a3c39 = function () {
1118
+ const ret = Symbol.iterator;
1119
+ return addHeapObject(ret);
1120
+ };
1121
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function (arg0) {
1122
+ const ret = getObject(arg0).length;
1123
+ return ret;
1124
+ };
1125
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function (arg0) {
1126
+ const ret = getObject(arg0).length;
1127
+ return ret;
1128
+ };
1129
+ imports.wbg.__wbg_log_ee0138cca4957740 = function (arg0, arg1) {
1130
+ console.log(getStringFromWasm0(arg0, arg1));
1131
+ };
1132
+ imports.wbg.__wbg_message_bd42dbe3f2f3ed8e = function (arg0, arg1) {
1133
+ const ret = getObject(arg1).message;
1134
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1135
+ const len1 = WASM_VECTOR_LEN;
1136
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1137
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1138
+ };
1139
+ imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function (arg0) {
1140
+ const ret = getObject(arg0).msCrypto;
1141
+ return addHeapObject(ret);
1142
+ };
1143
+ imports.wbg.__wbg_new_0_f9740686d739025c = function () {
1144
+ const ret = new Date();
1145
+ return addHeapObject(ret);
1146
+ };
1147
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function () {
1148
+ const ret = new Object();
1149
+ return addHeapObject(ret);
1150
+ };
1151
+ imports.wbg.__wbg_new_2531773dac38ebb3 = function () {
1152
+ return handleError(function () {
1153
+ const ret = new AbortController();
1154
+ return addHeapObject(ret);
1155
+ }, arguments);
1156
+ };
1157
+ imports.wbg.__wbg_new_3c3d849046688a66 = function (arg0, arg1) {
1158
+ try {
1159
+ var state0 = { a: arg0, b: arg1 };
1160
+ var cb0 = (arg0, arg1) => {
1161
+ const a = state0.a;
1162
+ state0.a = 0;
1163
+ try {
1164
+ return __wasm_bindgen_func_elem_14072(a, state0.b, arg0, arg1);
1165
+ } finally {
1166
+ state0.a = a;
1167
+ }
1168
+ };
1169
+ const ret = new Promise(cb0);
1170
+ return addHeapObject(ret);
1171
+ } finally {
1172
+ state0.a = state0.b = 0;
1173
+ }
1174
+ };
1175
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function (arg0) {
1176
+ const ret = new Uint8Array(getObject(arg0));
1177
+ return addHeapObject(ret);
1178
+ };
1179
+ imports.wbg.__wbg_new_881c4fe631eee9ad = function () {
1180
+ return handleError(function (arg0, arg1) {
1181
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
1182
+ return addHeapObject(ret);
1183
+ }, arguments);
1184
+ };
1185
+ imports.wbg.__wbg_new_9edf9838a2def39c = function () {
1186
+ return handleError(function () {
1187
+ const ret = new Headers();
1188
+ return addHeapObject(ret);
1189
+ }, arguments);
1190
+ };
1191
+ imports.wbg.__wbg_new_a7442b4b19c1a356 = function (arg0, arg1) {
1192
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1193
+ return addHeapObject(ret);
1194
+ };
1195
+ imports.wbg.__wbg_new_e17d9f43105b08be = function () {
1196
+ const ret = new Array();
1197
+ return addHeapObject(ret);
1198
+ };
1199
+ imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function (arg0, arg1) {
1200
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1201
+ return addHeapObject(ret);
1202
+ };
1203
+ imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function (arg0, arg1) {
1204
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1205
+ return addHeapObject(ret);
1206
+ };
1207
+ imports.wbg.__wbg_new_with_byte_offset_and_length_46e3e6a5e9f9e89b = function (arg0, arg1, arg2) {
1208
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1209
+ return addHeapObject(ret);
1210
+ };
1211
+ imports.wbg.__wbg_new_with_length_01aa0dc35aa13543 = function (arg0) {
1212
+ const ret = new Uint8Array(arg0 >>> 0);
1213
+ return addHeapObject(ret);
1214
+ };
1215
+ imports.wbg.__wbg_new_with_str_and_init_0ae7728b6ec367b1 = function () {
1216
+ return handleError(function (arg0, arg1, arg2) {
1217
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1218
+ return addHeapObject(ret);
1219
+ }, arguments);
1220
+ };
1221
+ imports.wbg.__wbg_new_with_str_sequence_57a88eb77393f23f = function () {
1222
+ return handleError(function (arg0, arg1, arg2) {
1223
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));
1224
+ return addHeapObject(ret);
1225
+ }, arguments);
1226
+ };
1227
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function () {
1228
+ return handleError(function (arg0) {
1229
+ const ret = getObject(arg0).next();
1230
+ return addHeapObject(ret);
1231
+ }, arguments);
1232
+ };
1233
+ imports.wbg.__wbg_next_2c826fe5dfec6b6a = function (arg0) {
1234
+ const ret = getObject(arg0).next;
1235
+ return addHeapObject(ret);
1236
+ };
1237
+ imports.wbg.__wbg_node_905d3e251edff8a2 = function (arg0) {
1238
+ const ret = getObject(arg0).node;
1239
+ return addHeapObject(ret);
1240
+ };
1241
+ imports.wbg.__wbg_now_2c95c9de01293173 = function (arg0) {
1242
+ const ret = getObject(arg0).now();
1243
+ return ret;
1244
+ };
1245
+ imports.wbg.__wbg_now_793306c526e2e3b6 = function () {
1246
+ const ret = Date.now();
1247
+ return ret;
1248
+ };
1249
+ imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function (arg0) {
1250
+ const ret = getObject(arg0).performance;
1251
+ return addHeapObject(ret);
1252
+ };
1253
+ imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function (arg0) {
1254
+ const ret = getObject(arg0).process;
1255
+ return addHeapObject(ret);
1256
+ };
1257
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function (arg0, arg1, arg2) {
1258
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1259
+ };
1260
+ imports.wbg.__wbg_push_df81a39d04db858c = function (arg0, arg1) {
1261
+ const ret = getObject(arg0).push(getObject(arg1));
1262
+ return ret;
1263
+ };
1264
+ imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function (arg0) {
1265
+ const ret = getObject(arg0).queueMicrotask;
1266
+ return addHeapObject(ret);
1267
+ };
1268
+ imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function (arg0) {
1269
+ queueMicrotask(getObject(arg0));
1270
+ };
1271
+ imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function () {
1272
+ return handleError(function (arg0, arg1) {
1273
+ getObject(arg0).randomFillSync(takeObject(arg1));
1274
+ }, arguments);
1275
+ };
1276
+ imports.wbg.__wbg_read_48f1593df542f968 = function (arg0) {
1277
+ const ret = getObject(arg0).read();
1278
+ return addHeapObject(ret);
1279
+ };
1280
+ imports.wbg.__wbg_readyState_97984f126080aeda = function (arg0) {
1281
+ const ret = getObject(arg0).readyState;
1282
+ return ret;
1283
+ };
1284
+ imports.wbg.__wbg_reason_1cced37e3a93763e = function (arg0, arg1) {
1285
+ const ret = getObject(arg1).reason;
1286
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1287
+ const len1 = WASM_VECTOR_LEN;
1288
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1289
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1290
+ };
1291
+ imports.wbg.__wbg_releaseLock_5d0b5a68887b891d = function (arg0) {
1292
+ getObject(arg0).releaseLock();
1293
+ };
1294
+ imports.wbg.__wbg_removeEventListener_924d9db66a4f775d = function () {
1295
+ return handleError(function (arg0, arg1, arg2, arg3) {
1296
+ getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
1297
+ }, arguments);
1298
+ };
1299
+ imports.wbg.__wbg_require_60cc747a6bc5215a = function () {
1300
+ return handleError(function () {
1301
+ const ret = module.require;
1302
+ return addHeapObject(ret);
1303
+ }, arguments);
1304
+ };
1305
+ imports.wbg.__wbg_resolve_caf97c30b83f7053 = function (arg0) {
1306
+ const ret = Promise.resolve(getObject(arg0));
1307
+ return addHeapObject(ret);
1308
+ };
1309
+ imports.wbg.__wbg_respond_0f4dbf5386f5c73e = function () {
1310
+ return handleError(function (arg0, arg1) {
1311
+ getObject(arg0).respond(arg1 >>> 0);
1312
+ }, arguments);
1313
+ };
1314
+ imports.wbg.__wbg_send_171576d2f7487517 = function () {
1315
+ return handleError(function (arg0, arg1, arg2) {
1316
+ getObject(arg0).send(getStringFromWasm0(arg1, arg2));
1317
+ }, arguments);
1318
+ };
1319
+ imports.wbg.__wbg_send_3d2cf376613294f0 = function () {
1320
+ return handleError(function (arg0, arg1, arg2) {
1321
+ getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
1322
+ }, arguments);
1323
+ };
1324
+ imports.wbg.__wbg_setTimeout_4eb823e8b72fbe79 = function () {
1325
+ return handleError(function (arg0, arg1, arg2) {
1326
+ const ret = getObject(arg0).setTimeout(takeObject(arg1), arg2);
1327
+ return addHeapObject(ret);
1328
+ }, arguments);
1329
+ };
1330
+ imports.wbg.__wbg_setTimeout_7bb3429662ab1e70 = function (arg0, arg1) {
1331
+ const ret = setTimeout(getObject(arg0), arg1);
1332
+ return addHeapObject(ret);
1333
+ };
1334
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
1335
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1336
+ };
1337
+ imports.wbg.__wbg_set_9e6516df7b7d0f19 = function (arg0, arg1, arg2) {
1338
+ getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
1339
+ };
1340
+ imports.wbg.__wbg_set_binaryType_9d839cea8fcdc5c3 = function (arg0, arg1) {
1341
+ getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
1342
+ };
1343
+ imports.wbg.__wbg_set_body_3c365989753d61f4 = function (arg0, arg1) {
1344
+ getObject(arg0).body = getObject(arg1);
1345
+ };
1346
+ imports.wbg.__wbg_set_cache_2f9deb19b92b81e3 = function (arg0, arg1) {
1347
+ getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
1348
+ };
1349
+ imports.wbg.__wbg_set_credentials_f621cd2d85c0c228 = function (arg0, arg1) {
1350
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1351
+ };
1352
+ imports.wbg.__wbg_set_handle_event_b2de49ad6c81e3c8 = function (arg0, arg1) {
1353
+ getObject(arg0).handleEvent = getObject(arg1);
1354
+ };
1355
+ imports.wbg.__wbg_set_headers_6926da238cd32ee4 = function (arg0, arg1) {
1356
+ getObject(arg0).headers = getObject(arg1);
1357
+ };
1358
+ imports.wbg.__wbg_set_method_c02d8cbbe204ac2d = function (arg0, arg1, arg2) {
1359
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1360
+ };
1361
+ imports.wbg.__wbg_set_mode_52ef73cfa79639cb = function (arg0, arg1) {
1362
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1363
+ };
1364
+ imports.wbg.__wbg_set_onclose_c09e4f7422de8dae = function (arg0, arg1) {
1365
+ getObject(arg0).onclose = getObject(arg1);
1366
+ };
1367
+ imports.wbg.__wbg_set_onerror_337a3a2db9517378 = function (arg0, arg1) {
1368
+ getObject(arg0).onerror = getObject(arg1);
1369
+ };
1370
+ imports.wbg.__wbg_set_onmessage_8661558551a89792 = function (arg0, arg1) {
1371
+ getObject(arg0).onmessage = getObject(arg1);
1372
+ };
1373
+ imports.wbg.__wbg_set_onopen_efccb9305427b907 = function (arg0, arg1) {
1374
+ getObject(arg0).onopen = getObject(arg1);
1375
+ };
1376
+ imports.wbg.__wbg_set_signal_dda2cf7ccb6bee0f = function (arg0, arg1) {
1377
+ getObject(arg0).signal = getObject(arg1);
1378
+ };
1379
+ imports.wbg.__wbg_signal_4db5aa055bf9eb9a = function (arg0) {
1380
+ const ret = getObject(arg0).signal;
1381
+ return addHeapObject(ret);
1382
+ };
1383
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function () {
1384
+ const ret = typeof global === 'undefined' ? null : global;
1385
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1386
+ };
1387
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function () {
1388
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1389
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1390
+ };
1391
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function () {
1392
+ const ret = typeof self === 'undefined' ? null : self;
1393
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1394
+ };
1395
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function () {
1396
+ const ret = typeof window === 'undefined' ? null : window;
1397
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1398
+ };
1399
+ imports.wbg.__wbg_status_de7eed5a7a5bfd5d = function (arg0) {
1400
+ const ret = getObject(arg0).status;
1401
+ return ret;
1402
+ };
1403
+ imports.wbg.__wbg_stringify_b5fb28f6465d9c3e = function () {
1404
+ return handleError(function (arg0) {
1405
+ const ret = JSON.stringify(getObject(arg0));
1406
+ return addHeapObject(ret);
1407
+ }, arguments);
1408
+ };
1409
+ imports.wbg.__wbg_subarray_480600f3d6a9f26c = function (arg0, arg1, arg2) {
1410
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1411
+ return addHeapObject(ret);
1412
+ };
1413
+ imports.wbg.__wbg_then_4f46f6544e6b4a28 = function (arg0, arg1) {
1414
+ const ret = getObject(arg0).then(getObject(arg1));
1415
+ return addHeapObject(ret);
1416
+ };
1417
+ imports.wbg.__wbg_then_70d05cf780a18d77 = function (arg0, arg1, arg2) {
1418
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1419
+ return addHeapObject(ret);
1420
+ };
1421
+ imports.wbg.__wbg_url_9bd0af1cd8643de7 = function (arg0, arg1) {
1422
+ const ret = getObject(arg1).url;
1423
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1424
+ const len1 = WASM_VECTOR_LEN;
1425
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1426
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1427
+ };
1428
+ imports.wbg.__wbg_url_b36d2a5008eb056f = function (arg0, arg1) {
1429
+ const ret = getObject(arg1).url;
1430
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1431
+ const len1 = WASM_VECTOR_LEN;
1432
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1433
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1434
+ };
1435
+ imports.wbg.__wbg_value_692627309814bb8c = function (arg0) {
1436
+ const ret = getObject(arg0).value;
1437
+ return addHeapObject(ret);
1438
+ };
1439
+ imports.wbg.__wbg_versions_c01dfd4722a88165 = function (arg0) {
1440
+ const ret = getObject(arg0).versions;
1441
+ return addHeapObject(ret);
1442
+ };
1443
+ imports.wbg.__wbg_view_f6c15ac9fed63bbd = function (arg0) {
1444
+ const ret = getObject(arg0).view;
1445
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1446
+ };
1447
+ imports.wbg.__wbg_wasClean_3d7c0cf05bd0a123 = function (arg0) {
1448
+ const ret = getObject(arg0).wasClean;
1449
+ return ret;
1450
+ };
1451
+ imports.wbg.__wbindgen_cast_03c7ce370dde4234 = function (arg0, arg1) {
1452
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 545, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 546, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1453
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2072, __wasm_bindgen_func_elem_2279);
1454
+ return addHeapObject(ret);
1455
+ };
1456
+ imports.wbg.__wbindgen_cast_0548e2a34f33830b = function (arg0, arg1) {
1457
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1340, function: Function { arguments: [], shim_idx: 1341, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1458
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_6067, __wasm_bindgen_func_elem_6078);
1459
+ return addHeapObject(ret);
1460
+ };
1461
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
1462
+ // Cast intrinsic for `Ref(String) -> Externref`.
1463
+ const ret = getStringFromWasm0(arg0, arg1);
1464
+ return addHeapObject(ret);
1465
+ };
1466
+ imports.wbg.__wbindgen_cast_297907e58b496a50 = function (arg0, arg1) {
1467
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 2446, function: Function { arguments: [], shim_idx: 2447, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1468
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_12577, __wasm_bindgen_func_elem_12594);
1469
+ return addHeapObject(ret);
1470
+ };
1471
+ imports.wbg.__wbindgen_cast_5f086fd16774f149 = function (arg0, arg1) {
1472
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 2366, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2367, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1473
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_11415, __wasm_bindgen_func_elem_11460);
1474
+ return addHeapObject(ret);
1475
+ };
1476
+ imports.wbg.__wbindgen_cast_81d295fd67d7c7c1 = function (arg0, arg1) {
1477
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 2454, function: Function { arguments: [Externref], shim_idx: 2455, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1478
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_12631, __wasm_bindgen_func_elem_12647);
1479
+ return addHeapObject(ret);
1480
+ };
1481
+ imports.wbg.__wbindgen_cast_aeaa8ca4ff3b8539 = function (arg0, arg1) {
1482
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1248, function: Function { arguments: [], shim_idx: 1249, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1483
+ const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_5618, __wasm_bindgen_func_elem_5633);
1484
+ return addHeapObject(ret);
1485
+ };
1486
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function (arg0, arg1) {
1487
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1488
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1489
+ return addHeapObject(ret);
1490
+ };
1491
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
1492
+ // Cast intrinsic for `F64 -> Externref`.
1493
+ const ret = arg0;
1494
+ return addHeapObject(ret);
1495
+ };
1496
+ imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
1497
+ const ret = getObject(arg0);
1498
+ return addHeapObject(ret);
1499
+ };
1500
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
1501
+ takeObject(arg0);
1502
+ };
1503
+
1504
+ return imports;
1435
1505
  }
1436
1506
 
1437
1507
  function __wbg_finalize_init(instance, module) {
1438
- wasm = instance.exports;
1439
- __wbg_init.__wbindgen_wasm_module = module;
1440
- cachedDataViewMemory0 = null;
1441
- cachedUint8ArrayMemory0 = null;
1442
-
1508
+ wasm = instance.exports;
1509
+ __wbg_init.__wbindgen_wasm_module = module;
1510
+ cachedDataViewMemory0 = null;
1511
+ cachedUint8ArrayMemory0 = null;
1443
1512
 
1444
-
1445
- return wasm;
1513
+ return wasm;
1446
1514
  }
1447
1515
 
1448
1516
  function initSync(module) {
1449
- if (wasm !== undefined) return wasm;
1450
-
1517
+ if (wasm !== undefined) return wasm;
1451
1518
 
1452
- if (typeof module !== 'undefined') {
1453
- if (Object.getPrototypeOf(module) === Object.prototype) {
1454
- ({module} = module)
1455
- } else {
1456
- console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1457
- }
1458
- }
1519
+ if (typeof module !== 'undefined') {
1520
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1521
+ ({ module } = module);
1522
+ } else {
1523
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
1524
+ }
1525
+ }
1459
1526
 
1460
- const imports = __wbg_get_imports();
1527
+ const imports = __wbg_get_imports();
1461
1528
 
1462
- if (!(module instanceof WebAssembly.Module)) {
1463
- module = new WebAssembly.Module(module);
1464
- }
1529
+ if (!(module instanceof WebAssembly.Module)) {
1530
+ module = new WebAssembly.Module(module);
1531
+ }
1465
1532
 
1466
- const instance = new WebAssembly.Instance(module, imports);
1533
+ const instance = new WebAssembly.Instance(module, imports);
1467
1534
 
1468
- return __wbg_finalize_init(instance, module);
1535
+ return __wbg_finalize_init(instance, module);
1469
1536
  }
1470
1537
 
1471
1538
  async function __wbg_init(module_or_path) {
1472
- if (wasm !== undefined) return wasm;
1473
-
1474
-
1475
- if (typeof module_or_path !== 'undefined') {
1476
- if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1477
- ({module_or_path} = module_or_path)
1478
- } else {
1479
- console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1480
- }
1481
- }
1482
-
1483
- if (typeof module_or_path === 'undefined') {
1484
- module_or_path = '/ermis_call_node_wasm_bg.wasm';
1485
- }
1486
- const imports = __wbg_get_imports();
1487
-
1488
- if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1489
- module_or_path = fetch(module_or_path);
1490
- }
1491
-
1492
- const { instance, module } = await __wbg_load(await module_or_path, imports);
1493
-
1494
- return __wbg_finalize_init(instance, module);
1539
+ if (wasm !== undefined) return wasm;
1540
+
1541
+ if (typeof module_or_path !== 'undefined') {
1542
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1543
+ ({ module_or_path } = module_or_path);
1544
+ } else {
1545
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead');
1546
+ }
1547
+ }
1548
+
1549
+ if (typeof module_or_path === 'undefined') {
1550
+ module_or_path = '/ermis_call_node_wasm_bg.wasm';
1551
+ }
1552
+ const imports = __wbg_get_imports();
1553
+
1554
+ if (
1555
+ typeof module_or_path === 'string' ||
1556
+ (typeof Request === 'function' && module_or_path instanceof Request) ||
1557
+ (typeof URL === 'function' && module_or_path instanceof URL)
1558
+ ) {
1559
+ module_or_path = fetch(module_or_path);
1560
+ }
1561
+
1562
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1563
+
1564
+ return __wbg_finalize_init(instance, module);
1495
1565
  }
1496
1566
 
1497
1567
  export { initSync };