@bitwarden/sdk-internal 0.2.0-main.118 → 0.2.0-main.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/bitwarden_wasm_internal.js +0 -1
- package/bitwarden_wasm_internal_bg.js +469 -283
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +47 -44
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.js +469 -285
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +47 -44
- package/package.json +1 -1
|
@@ -3,6 +3,14 @@ imports["__wbindgen_placeholder__"] = module.exports;
|
|
|
3
3
|
let wasm;
|
|
4
4
|
const { TextEncoder, TextDecoder } = require(`util`);
|
|
5
5
|
|
|
6
|
+
const heap = new Array(128).fill(undefined);
|
|
7
|
+
|
|
8
|
+
heap.push(undefined, null, true, false);
|
|
9
|
+
|
|
10
|
+
function getObject(idx) {
|
|
11
|
+
return heap[idx];
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
let WASM_VECTOR_LEN = 0;
|
|
7
15
|
|
|
8
16
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -93,9 +101,14 @@ function getStringFromWasm0(ptr, len) {
|
|
|
93
101
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
94
102
|
}
|
|
95
103
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
let heap_next = heap.length;
|
|
105
|
+
|
|
106
|
+
function addHeapObject(obj) {
|
|
107
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
108
|
+
const idx = heap_next;
|
|
109
|
+
heap_next = heap[idx];
|
|
110
|
+
|
|
111
|
+
heap[idx] = obj;
|
|
99
112
|
return idx;
|
|
100
113
|
}
|
|
101
114
|
|
|
@@ -103,11 +116,22 @@ function handleError(f, args) {
|
|
|
103
116
|
try {
|
|
104
117
|
return f.apply(this, args);
|
|
105
118
|
} catch (e) {
|
|
106
|
-
|
|
107
|
-
wasm.__wbindgen_exn_store(idx);
|
|
119
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
108
120
|
}
|
|
109
121
|
}
|
|
110
122
|
|
|
123
|
+
function dropObject(idx) {
|
|
124
|
+
if (idx < 132) return;
|
|
125
|
+
heap[idx] = heap_next;
|
|
126
|
+
heap_next = idx;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function takeObject(idx) {
|
|
130
|
+
const ret = getObject(idx);
|
|
131
|
+
dropObject(idx);
|
|
132
|
+
return ret;
|
|
133
|
+
}
|
|
134
|
+
|
|
111
135
|
function isLikeNone(x) {
|
|
112
136
|
return x === undefined || x === null;
|
|
113
137
|
}
|
|
@@ -116,7 +140,7 @@ const CLOSURE_DTORS =
|
|
|
116
140
|
typeof FinalizationRegistry === "undefined"
|
|
117
141
|
? { register: () => {}, unregister: () => {} }
|
|
118
142
|
: new FinalizationRegistry((state) => {
|
|
119
|
-
wasm.
|
|
143
|
+
wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
|
|
120
144
|
});
|
|
121
145
|
|
|
122
146
|
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
@@ -132,7 +156,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
132
156
|
return f(a, state.b, ...args);
|
|
133
157
|
} finally {
|
|
134
158
|
if (--state.cnt === 0) {
|
|
135
|
-
wasm.
|
|
159
|
+
wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
|
|
136
160
|
CLOSURE_DTORS.unregister(state);
|
|
137
161
|
} else {
|
|
138
162
|
state.a = a;
|
|
@@ -208,13 +232,25 @@ function debugString(val) {
|
|
|
208
232
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
209
233
|
return className;
|
|
210
234
|
}
|
|
235
|
+
|
|
236
|
+
let stack_pointer = 128;
|
|
237
|
+
|
|
238
|
+
function addBorrowedObject(obj) {
|
|
239
|
+
if (stack_pointer == 1) throw new Error("out of js stack");
|
|
240
|
+
heap[--stack_pointer] = obj;
|
|
241
|
+
return stack_pointer;
|
|
242
|
+
}
|
|
211
243
|
/**
|
|
212
244
|
* @param {any} error
|
|
213
245
|
* @returns {boolean}
|
|
214
246
|
*/
|
|
215
247
|
module.exports.isEncryptionSettingsError = function (error) {
|
|
216
|
-
|
|
217
|
-
|
|
248
|
+
try {
|
|
249
|
+
const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
|
|
250
|
+
return ret !== 0;
|
|
251
|
+
} finally {
|
|
252
|
+
heap[stack_pointer++] = undefined;
|
|
253
|
+
}
|
|
218
254
|
};
|
|
219
255
|
|
|
220
256
|
/**
|
|
@@ -222,8 +258,12 @@ module.exports.isEncryptionSettingsError = function (error) {
|
|
|
222
258
|
* @returns {boolean}
|
|
223
259
|
*/
|
|
224
260
|
module.exports.isCryptoError = function (error) {
|
|
225
|
-
|
|
226
|
-
|
|
261
|
+
try {
|
|
262
|
+
const ret = wasm.isCryptoError(addBorrowedObject(error));
|
|
263
|
+
return ret !== 0;
|
|
264
|
+
} finally {
|
|
265
|
+
heap[stack_pointer++] = undefined;
|
|
266
|
+
}
|
|
227
267
|
};
|
|
228
268
|
|
|
229
269
|
/**
|
|
@@ -231,8 +271,12 @@ module.exports.isCryptoError = function (error) {
|
|
|
231
271
|
* @returns {boolean}
|
|
232
272
|
*/
|
|
233
273
|
module.exports.isSshKeyExportError = function (error) {
|
|
234
|
-
|
|
235
|
-
|
|
274
|
+
try {
|
|
275
|
+
const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
|
|
276
|
+
return ret !== 0;
|
|
277
|
+
} finally {
|
|
278
|
+
heap[stack_pointer++] = undefined;
|
|
279
|
+
}
|
|
236
280
|
};
|
|
237
281
|
|
|
238
282
|
/**
|
|
@@ -240,8 +284,12 @@ module.exports.isSshKeyExportError = function (error) {
|
|
|
240
284
|
* @returns {boolean}
|
|
241
285
|
*/
|
|
242
286
|
module.exports.isSshKeyImportError = function (error) {
|
|
243
|
-
|
|
244
|
-
|
|
287
|
+
try {
|
|
288
|
+
const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
|
|
289
|
+
return ret !== 0;
|
|
290
|
+
} finally {
|
|
291
|
+
heap[stack_pointer++] = undefined;
|
|
292
|
+
}
|
|
245
293
|
};
|
|
246
294
|
|
|
247
295
|
/**
|
|
@@ -249,8 +297,12 @@ module.exports.isSshKeyImportError = function (error) {
|
|
|
249
297
|
* @returns {boolean}
|
|
250
298
|
*/
|
|
251
299
|
module.exports.isKeyGenerationError = function (error) {
|
|
252
|
-
|
|
253
|
-
|
|
300
|
+
try {
|
|
301
|
+
const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
|
|
302
|
+
return ret !== 0;
|
|
303
|
+
} finally {
|
|
304
|
+
heap[stack_pointer++] = undefined;
|
|
305
|
+
}
|
|
254
306
|
};
|
|
255
307
|
|
|
256
308
|
/**
|
|
@@ -258,8 +310,12 @@ module.exports.isKeyGenerationError = function (error) {
|
|
|
258
310
|
* @returns {boolean}
|
|
259
311
|
*/
|
|
260
312
|
module.exports.isDecryptFileError = function (error) {
|
|
261
|
-
|
|
262
|
-
|
|
313
|
+
try {
|
|
314
|
+
const ret = wasm.isDecryptFileError(addBorrowedObject(error));
|
|
315
|
+
return ret !== 0;
|
|
316
|
+
} finally {
|
|
317
|
+
heap[stack_pointer++] = undefined;
|
|
318
|
+
}
|
|
263
319
|
};
|
|
264
320
|
|
|
265
321
|
/**
|
|
@@ -267,8 +323,12 @@ module.exports.isDecryptFileError = function (error) {
|
|
|
267
323
|
* @returns {boolean}
|
|
268
324
|
*/
|
|
269
325
|
module.exports.isEncryptFileError = function (error) {
|
|
270
|
-
|
|
271
|
-
|
|
326
|
+
try {
|
|
327
|
+
const ret = wasm.isEncryptFileError(addBorrowedObject(error));
|
|
328
|
+
return ret !== 0;
|
|
329
|
+
} finally {
|
|
330
|
+
heap[stack_pointer++] = undefined;
|
|
331
|
+
}
|
|
272
332
|
};
|
|
273
333
|
|
|
274
334
|
/**
|
|
@@ -276,8 +336,12 @@ module.exports.isEncryptFileError = function (error) {
|
|
|
276
336
|
* @returns {boolean}
|
|
277
337
|
*/
|
|
278
338
|
module.exports.isDecryptError = function (error) {
|
|
279
|
-
|
|
280
|
-
|
|
339
|
+
try {
|
|
340
|
+
const ret = wasm.isDecryptError(addBorrowedObject(error));
|
|
341
|
+
return ret !== 0;
|
|
342
|
+
} finally {
|
|
343
|
+
heap[stack_pointer++] = undefined;
|
|
344
|
+
}
|
|
281
345
|
};
|
|
282
346
|
|
|
283
347
|
/**
|
|
@@ -285,8 +349,12 @@ module.exports.isDecryptError = function (error) {
|
|
|
285
349
|
* @returns {boolean}
|
|
286
350
|
*/
|
|
287
351
|
module.exports.isEncryptError = function (error) {
|
|
288
|
-
|
|
289
|
-
|
|
352
|
+
try {
|
|
353
|
+
const ret = wasm.isEncryptError(addBorrowedObject(error));
|
|
354
|
+
return ret !== 0;
|
|
355
|
+
} finally {
|
|
356
|
+
heap[stack_pointer++] = undefined;
|
|
357
|
+
}
|
|
290
358
|
};
|
|
291
359
|
|
|
292
360
|
/**
|
|
@@ -294,15 +362,14 @@ module.exports.isEncryptError = function (error) {
|
|
|
294
362
|
* @returns {boolean}
|
|
295
363
|
*/
|
|
296
364
|
module.exports.isTotpError = function (error) {
|
|
297
|
-
|
|
298
|
-
|
|
365
|
+
try {
|
|
366
|
+
const ret = wasm.isTotpError(addBorrowedObject(error));
|
|
367
|
+
return ret !== 0;
|
|
368
|
+
} finally {
|
|
369
|
+
heap[stack_pointer++] = undefined;
|
|
370
|
+
}
|
|
299
371
|
};
|
|
300
372
|
|
|
301
|
-
function takeFromExternrefTable0(idx) {
|
|
302
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
303
|
-
wasm.__externref_table_dealloc(idx);
|
|
304
|
-
return value;
|
|
305
|
-
}
|
|
306
373
|
/**
|
|
307
374
|
* @param {LogLevel} level
|
|
308
375
|
*/
|
|
@@ -341,11 +408,19 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
341
408
|
* @returns {SshKeyView}
|
|
342
409
|
*/
|
|
343
410
|
module.exports.generate_ssh_key = function (key_algorithm) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
411
|
+
try {
|
|
412
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
413
|
+
wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
|
|
414
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
415
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
416
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
417
|
+
if (r2) {
|
|
418
|
+
throw takeObject(r1);
|
|
419
|
+
}
|
|
420
|
+
return takeObject(r0);
|
|
421
|
+
} finally {
|
|
422
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
347
423
|
}
|
|
348
|
-
return takeFromExternrefTable0(ret[0]);
|
|
349
424
|
};
|
|
350
425
|
|
|
351
426
|
/**
|
|
@@ -367,17 +442,25 @@ module.exports.generate_ssh_key = function (key_algorithm) {
|
|
|
367
442
|
* @returns {SshKeyView}
|
|
368
443
|
*/
|
|
369
444
|
module.exports.import_ssh_key = function (imported_key, password) {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
445
|
+
try {
|
|
446
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
447
|
+
const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
|
+
const len0 = WASM_VECTOR_LEN;
|
|
449
|
+
var ptr1 = isLikeNone(password)
|
|
450
|
+
? 0
|
|
451
|
+
: passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
452
|
+
var len1 = WASM_VECTOR_LEN;
|
|
453
|
+
wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
|
|
454
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
455
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
456
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
457
|
+
if (r2) {
|
|
458
|
+
throw takeObject(r1);
|
|
459
|
+
}
|
|
460
|
+
return takeObject(r0);
|
|
461
|
+
} finally {
|
|
462
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
379
463
|
}
|
|
380
|
-
return takeFromExternrefTable0(ret[0]);
|
|
381
464
|
};
|
|
382
465
|
|
|
383
466
|
/**
|
|
@@ -385,16 +468,29 @@ module.exports.import_ssh_key = function (imported_key, password) {
|
|
|
385
468
|
* @returns {boolean}
|
|
386
469
|
*/
|
|
387
470
|
module.exports.isTestError = function (error) {
|
|
388
|
-
|
|
389
|
-
|
|
471
|
+
try {
|
|
472
|
+
const ret = wasm.isTestError(addBorrowedObject(error));
|
|
473
|
+
return ret !== 0;
|
|
474
|
+
} finally {
|
|
475
|
+
heap[stack_pointer++] = undefined;
|
|
476
|
+
}
|
|
390
477
|
};
|
|
391
478
|
|
|
392
|
-
function
|
|
393
|
-
wasm.
|
|
479
|
+
function __wbg_adapter_40(arg0, arg1, arg2) {
|
|
480
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8ef26cc0e999965d(
|
|
481
|
+
arg0,
|
|
482
|
+
arg1,
|
|
483
|
+
addHeapObject(arg2),
|
|
484
|
+
);
|
|
394
485
|
}
|
|
395
486
|
|
|
396
|
-
function
|
|
397
|
-
wasm.
|
|
487
|
+
function __wbg_adapter_150(arg0, arg1, arg2, arg3) {
|
|
488
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h33defb2ea0fdb769(
|
|
489
|
+
arg0,
|
|
490
|
+
arg1,
|
|
491
|
+
addHeapObject(arg2),
|
|
492
|
+
addHeapObject(arg3),
|
|
493
|
+
);
|
|
398
494
|
}
|
|
399
495
|
|
|
400
496
|
/**
|
|
@@ -438,7 +534,7 @@ class BitwardenClient {
|
|
|
438
534
|
* @param {ClientSettings | null} [settings]
|
|
439
535
|
*/
|
|
440
536
|
constructor(settings) {
|
|
441
|
-
const ret = wasm.bitwardenclient_new(isLikeNone(settings) ? 0 :
|
|
537
|
+
const ret = wasm.bitwardenclient_new(isLikeNone(settings) ? 0 : addHeapObject(settings));
|
|
442
538
|
this.__wbg_ptr = ret >>> 0;
|
|
443
539
|
BitwardenClientFinalization.register(this, this.__wbg_ptr, this);
|
|
444
540
|
return this;
|
|
@@ -452,13 +548,17 @@ class BitwardenClient {
|
|
|
452
548
|
let deferred2_0;
|
|
453
549
|
let deferred2_1;
|
|
454
550
|
try {
|
|
551
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
455
552
|
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
456
553
|
const len0 = WASM_VECTOR_LEN;
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
554
|
+
wasm.bitwardenclient_echo(retptr, this.__wbg_ptr, ptr0, len0);
|
|
555
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
556
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
557
|
+
deferred2_0 = r0;
|
|
558
|
+
deferred2_1 = r1;
|
|
559
|
+
return getStringFromWasm0(r0, r1);
|
|
461
560
|
} finally {
|
|
561
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
462
562
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
463
563
|
}
|
|
464
564
|
}
|
|
@@ -469,11 +569,15 @@ class BitwardenClient {
|
|
|
469
569
|
let deferred1_0;
|
|
470
570
|
let deferred1_1;
|
|
471
571
|
try {
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
572
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
573
|
+
wasm.bitwardenclient_version(retptr, this.__wbg_ptr);
|
|
574
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
575
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
576
|
+
deferred1_0 = r0;
|
|
577
|
+
deferred1_1 = r1;
|
|
578
|
+
return getStringFromWasm0(r0, r1);
|
|
476
579
|
} finally {
|
|
580
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
477
581
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
478
582
|
}
|
|
479
583
|
}
|
|
@@ -481,11 +585,18 @@ class BitwardenClient {
|
|
|
481
585
|
* @param {string} msg
|
|
482
586
|
*/
|
|
483
587
|
throw(msg) {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
588
|
+
try {
|
|
589
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
590
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
591
|
+
const len0 = WASM_VECTOR_LEN;
|
|
592
|
+
wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
|
|
593
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
594
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
595
|
+
if (r1) {
|
|
596
|
+
throw takeObject(r0);
|
|
597
|
+
}
|
|
598
|
+
} finally {
|
|
599
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
489
600
|
}
|
|
490
601
|
}
|
|
491
602
|
/**
|
|
@@ -497,7 +608,7 @@ class BitwardenClient {
|
|
|
497
608
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
498
609
|
const len0 = WASM_VECTOR_LEN;
|
|
499
610
|
const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
|
|
500
|
-
return ret;
|
|
611
|
+
return takeObject(ret);
|
|
501
612
|
}
|
|
502
613
|
/**
|
|
503
614
|
* @returns {CryptoClient}
|
|
@@ -547,11 +658,19 @@ class ClientFolders {
|
|
|
547
658
|
* @returns {FolderView}
|
|
548
659
|
*/
|
|
549
660
|
decrypt(folder) {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
661
|
+
try {
|
|
662
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
663
|
+
wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
|
|
664
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
665
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
666
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
667
|
+
if (r2) {
|
|
668
|
+
throw takeObject(r1);
|
|
669
|
+
}
|
|
670
|
+
return takeObject(r0);
|
|
671
|
+
} finally {
|
|
672
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
553
673
|
}
|
|
554
|
-
return takeFromExternrefTable0(ret[0]);
|
|
555
674
|
}
|
|
556
675
|
}
|
|
557
676
|
module.exports.ClientFolders = ClientFolders;
|
|
@@ -599,19 +718,28 @@ class ClientTotp {
|
|
|
599
718
|
* @returns {TotpResponse}
|
|
600
719
|
*/
|
|
601
720
|
generate_totp(key, time_ms) {
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
721
|
+
try {
|
|
722
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
723
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
724
|
+
const len0 = WASM_VECTOR_LEN;
|
|
725
|
+
wasm.clienttotp_generate_totp(
|
|
726
|
+
retptr,
|
|
727
|
+
this.__wbg_ptr,
|
|
728
|
+
ptr0,
|
|
729
|
+
len0,
|
|
730
|
+
!isLikeNone(time_ms),
|
|
731
|
+
isLikeNone(time_ms) ? 0 : time_ms,
|
|
732
|
+
);
|
|
733
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
734
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
735
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
736
|
+
if (r2) {
|
|
737
|
+
throw takeObject(r1);
|
|
738
|
+
}
|
|
739
|
+
return takeObject(r0);
|
|
740
|
+
} finally {
|
|
741
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
613
742
|
}
|
|
614
|
-
return takeFromExternrefTable0(ret[0]);
|
|
615
743
|
}
|
|
616
744
|
}
|
|
617
745
|
module.exports.ClientTotp = ClientTotp;
|
|
@@ -648,8 +776,8 @@ class CryptoClient {
|
|
|
648
776
|
* @returns {Promise<void>}
|
|
649
777
|
*/
|
|
650
778
|
initialize_user_crypto(req) {
|
|
651
|
-
const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, req);
|
|
652
|
-
return ret;
|
|
779
|
+
const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
|
|
780
|
+
return takeObject(ret);
|
|
653
781
|
}
|
|
654
782
|
/**
|
|
655
783
|
* Initialization method for the organization crypto. Needs to be called after
|
|
@@ -658,8 +786,8 @@ class CryptoClient {
|
|
|
658
786
|
* @returns {Promise<void>}
|
|
659
787
|
*/
|
|
660
788
|
initialize_org_crypto(req) {
|
|
661
|
-
const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, req);
|
|
662
|
-
return ret;
|
|
789
|
+
const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
|
|
790
|
+
return takeObject(ret);
|
|
663
791
|
}
|
|
664
792
|
/**
|
|
665
793
|
* Generates a new key pair and encrypts the private key with the provided user key.
|
|
@@ -668,13 +796,21 @@ class CryptoClient {
|
|
|
668
796
|
* @returns {MakeKeyPairResponse}
|
|
669
797
|
*/
|
|
670
798
|
make_key_pair(user_key) {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
799
|
+
try {
|
|
800
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
801
|
+
const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
802
|
+
const len0 = WASM_VECTOR_LEN;
|
|
803
|
+
wasm.cryptoclient_make_key_pair(retptr, this.__wbg_ptr, ptr0, len0);
|
|
804
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
805
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
806
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
807
|
+
if (r2) {
|
|
808
|
+
throw takeObject(r1);
|
|
809
|
+
}
|
|
810
|
+
return takeObject(r0);
|
|
811
|
+
} finally {
|
|
812
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
676
813
|
}
|
|
677
|
-
return takeFromExternrefTable0(ret[0]);
|
|
678
814
|
}
|
|
679
815
|
/**
|
|
680
816
|
* Verifies a user's asymmetric keys by decrypting the private key with the provided user
|
|
@@ -684,11 +820,19 @@ class CryptoClient {
|
|
|
684
820
|
* @returns {VerifyAsymmetricKeysResponse}
|
|
685
821
|
*/
|
|
686
822
|
verify_asymmetric_keys(request) {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
823
|
+
try {
|
|
824
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
825
|
+
wasm.cryptoclient_verify_asymmetric_keys(retptr, this.__wbg_ptr, addHeapObject(request));
|
|
826
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
827
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
828
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
829
|
+
if (r2) {
|
|
830
|
+
throw takeObject(r1);
|
|
831
|
+
}
|
|
832
|
+
return takeObject(r0);
|
|
833
|
+
} finally {
|
|
834
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
690
835
|
}
|
|
691
|
-
return takeFromExternrefTable0(ret[0]);
|
|
692
836
|
}
|
|
693
837
|
}
|
|
694
838
|
module.exports.CryptoClient = CryptoClient;
|
|
@@ -724,22 +868,28 @@ class PureCrypto {
|
|
|
724
868
|
let deferred4_0;
|
|
725
869
|
let deferred4_1;
|
|
726
870
|
try {
|
|
871
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
727
872
|
const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
728
873
|
const len0 = WASM_VECTOR_LEN;
|
|
729
874
|
const ptr1 = passStringToWasm0(key_b64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
730
875
|
const len1 = WASM_VECTOR_LEN;
|
|
731
|
-
|
|
732
|
-
var
|
|
733
|
-
var
|
|
734
|
-
|
|
876
|
+
wasm.purecrypto_symmetric_decrypt(retptr, ptr0, len0, ptr1, len1);
|
|
877
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
878
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
879
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
880
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
881
|
+
var ptr3 = r0;
|
|
882
|
+
var len3 = r1;
|
|
883
|
+
if (r3) {
|
|
735
884
|
ptr3 = 0;
|
|
736
885
|
len3 = 0;
|
|
737
|
-
throw
|
|
886
|
+
throw takeObject(r2);
|
|
738
887
|
}
|
|
739
888
|
deferred4_0 = ptr3;
|
|
740
889
|
deferred4_1 = len3;
|
|
741
890
|
return getStringFromWasm0(ptr3, len3);
|
|
742
891
|
} finally {
|
|
892
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
743
893
|
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
744
894
|
}
|
|
745
895
|
}
|
|
@@ -749,17 +899,26 @@ class PureCrypto {
|
|
|
749
899
|
* @returns {Uint8Array}
|
|
750
900
|
*/
|
|
751
901
|
static symmetric_decrypt_to_bytes(enc_string, key_b64) {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
902
|
+
try {
|
|
903
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
904
|
+
const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
905
|
+
const len0 = WASM_VECTOR_LEN;
|
|
906
|
+
const ptr1 = passStringToWasm0(key_b64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
907
|
+
const len1 = WASM_VECTOR_LEN;
|
|
908
|
+
wasm.purecrypto_symmetric_decrypt_to_bytes(retptr, ptr0, len0, ptr1, len1);
|
|
909
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
910
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
911
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
912
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
913
|
+
if (r3) {
|
|
914
|
+
throw takeObject(r2);
|
|
915
|
+
}
|
|
916
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
917
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
918
|
+
return v3;
|
|
919
|
+
} finally {
|
|
920
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
759
921
|
}
|
|
760
|
-
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
761
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
762
|
-
return v3;
|
|
763
922
|
}
|
|
764
923
|
/**
|
|
765
924
|
* @param {Uint8Array} enc_bytes
|
|
@@ -767,17 +926,26 @@ class PureCrypto {
|
|
|
767
926
|
* @returns {Uint8Array}
|
|
768
927
|
*/
|
|
769
928
|
static symmetric_decrypt_array_buffer(enc_bytes, key_b64) {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
929
|
+
try {
|
|
930
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
931
|
+
const ptr0 = passArray8ToWasm0(enc_bytes, wasm.__wbindgen_malloc);
|
|
932
|
+
const len0 = WASM_VECTOR_LEN;
|
|
933
|
+
const ptr1 = passStringToWasm0(key_b64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
934
|
+
const len1 = WASM_VECTOR_LEN;
|
|
935
|
+
wasm.purecrypto_symmetric_decrypt_array_buffer(retptr, ptr0, len0, ptr1, len1);
|
|
936
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
937
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
938
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
939
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
940
|
+
if (r3) {
|
|
941
|
+
throw takeObject(r2);
|
|
942
|
+
}
|
|
943
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
944
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
945
|
+
return v3;
|
|
946
|
+
} finally {
|
|
947
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
777
948
|
}
|
|
778
|
-
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
779
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
780
|
-
return v3;
|
|
781
949
|
}
|
|
782
950
|
/**
|
|
783
951
|
* @param {string} plain
|
|
@@ -788,22 +956,28 @@ class PureCrypto {
|
|
|
788
956
|
let deferred4_0;
|
|
789
957
|
let deferred4_1;
|
|
790
958
|
try {
|
|
959
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
791
960
|
const ptr0 = passStringToWasm0(plain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
792
961
|
const len0 = WASM_VECTOR_LEN;
|
|
793
962
|
const ptr1 = passStringToWasm0(key_b64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
794
963
|
const len1 = WASM_VECTOR_LEN;
|
|
795
|
-
|
|
796
|
-
var
|
|
797
|
-
var
|
|
798
|
-
|
|
964
|
+
wasm.purecrypto_symmetric_encrypt(retptr, ptr0, len0, ptr1, len1);
|
|
965
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
966
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
967
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
968
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
969
|
+
var ptr3 = r0;
|
|
970
|
+
var len3 = r1;
|
|
971
|
+
if (r3) {
|
|
799
972
|
ptr3 = 0;
|
|
800
973
|
len3 = 0;
|
|
801
|
-
throw
|
|
974
|
+
throw takeObject(r2);
|
|
802
975
|
}
|
|
803
976
|
deferred4_0 = ptr3;
|
|
804
977
|
deferred4_1 = len3;
|
|
805
978
|
return getStringFromWasm0(ptr3, len3);
|
|
806
979
|
} finally {
|
|
980
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
807
981
|
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
808
982
|
}
|
|
809
983
|
}
|
|
@@ -813,17 +987,26 @@ class PureCrypto {
|
|
|
813
987
|
* @returns {Uint8Array}
|
|
814
988
|
*/
|
|
815
989
|
static symmetric_encrypt_to_array_buffer(plain, key_b64) {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
990
|
+
try {
|
|
991
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
992
|
+
const ptr0 = passArray8ToWasm0(plain, wasm.__wbindgen_malloc);
|
|
993
|
+
const len0 = WASM_VECTOR_LEN;
|
|
994
|
+
const ptr1 = passStringToWasm0(key_b64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
995
|
+
const len1 = WASM_VECTOR_LEN;
|
|
996
|
+
wasm.purecrypto_symmetric_encrypt_to_array_buffer(retptr, ptr0, len0, ptr1, len1);
|
|
997
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
998
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
999
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1000
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1001
|
+
if (r3) {
|
|
1002
|
+
throw takeObject(r2);
|
|
1003
|
+
}
|
|
1004
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1005
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1006
|
+
return v3;
|
|
1007
|
+
} finally {
|
|
1008
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
823
1009
|
}
|
|
824
|
-
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
825
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
826
|
-
return v3;
|
|
827
1010
|
}
|
|
828
1011
|
}
|
|
829
1012
|
module.exports.PureCrypto = PureCrypto;
|
|
@@ -871,7 +1054,7 @@ class VaultClient {
|
|
|
871
1054
|
module.exports.VaultClient = VaultClient;
|
|
872
1055
|
|
|
873
1056
|
module.exports.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
|
|
874
|
-
const ret = String(arg1);
|
|
1057
|
+
const ret = String(getObject(arg1));
|
|
875
1058
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
876
1059
|
const len1 = WASM_VECTOR_LEN;
|
|
877
1060
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
@@ -879,69 +1062,73 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
|
|
|
879
1062
|
};
|
|
880
1063
|
|
|
881
1064
|
module.exports.__wbg_abort_775ef1d17fc65868 = function (arg0) {
|
|
882
|
-
arg0.abort();
|
|
1065
|
+
getObject(arg0).abort();
|
|
883
1066
|
};
|
|
884
1067
|
|
|
885
1068
|
module.exports.__wbg_append_299d5d48292c0495 = function () {
|
|
886
1069
|
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
887
|
-
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1070
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
888
1071
|
}, arguments);
|
|
889
1072
|
};
|
|
890
1073
|
|
|
891
1074
|
module.exports.__wbg_append_8c7dd8d641a5f01b = function () {
|
|
892
1075
|
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
893
|
-
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1076
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
894
1077
|
}, arguments);
|
|
895
1078
|
};
|
|
896
1079
|
|
|
897
1080
|
module.exports.__wbg_append_b2d1fc16de2a0e81 = function () {
|
|
898
1081
|
return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
899
|
-
arg0.append(
|
|
1082
|
+
getObject(arg0).append(
|
|
1083
|
+
getStringFromWasm0(arg1, arg2),
|
|
1084
|
+
getObject(arg3),
|
|
1085
|
+
getStringFromWasm0(arg4, arg5),
|
|
1086
|
+
);
|
|
900
1087
|
}, arguments);
|
|
901
1088
|
};
|
|
902
1089
|
|
|
903
1090
|
module.exports.__wbg_append_b44785ebeb668479 = function () {
|
|
904
1091
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
905
|
-
arg0.append(getStringFromWasm0(arg1, arg2), arg3);
|
|
1092
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
906
1093
|
}, arguments);
|
|
907
1094
|
};
|
|
908
1095
|
|
|
909
1096
|
module.exports.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
|
|
910
|
-
const ret = arg0.buffer;
|
|
911
|
-
return ret;
|
|
1097
|
+
const ret = getObject(arg0).buffer;
|
|
1098
|
+
return addHeapObject(ret);
|
|
912
1099
|
};
|
|
913
1100
|
|
|
914
1101
|
module.exports.__wbg_call_672a4d21634d4a24 = function () {
|
|
915
1102
|
return handleError(function (arg0, arg1) {
|
|
916
|
-
const ret = arg0.call(arg1);
|
|
917
|
-
return ret;
|
|
1103
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
1104
|
+
return addHeapObject(ret);
|
|
918
1105
|
}, arguments);
|
|
919
1106
|
};
|
|
920
1107
|
|
|
921
1108
|
module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
|
|
922
1109
|
return handleError(function (arg0, arg1, arg2) {
|
|
923
|
-
const ret = arg0.call(arg1, arg2);
|
|
924
|
-
return ret;
|
|
1110
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1111
|
+
return addHeapObject(ret);
|
|
925
1112
|
}, arguments);
|
|
926
1113
|
};
|
|
927
1114
|
|
|
928
1115
|
module.exports.__wbg_crypto_ed58b8e10a292839 = function (arg0) {
|
|
929
|
-
const ret = arg0.crypto;
|
|
930
|
-
return ret;
|
|
1116
|
+
const ret = getObject(arg0).crypto;
|
|
1117
|
+
return addHeapObject(ret);
|
|
931
1118
|
};
|
|
932
1119
|
|
|
933
1120
|
module.exports.__wbg_debug_e17b51583ca6a632 = function (arg0, arg1, arg2, arg3) {
|
|
934
|
-
console.debug(arg0, arg1, arg2, arg3);
|
|
1121
|
+
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
935
1122
|
};
|
|
936
1123
|
|
|
937
1124
|
module.exports.__wbg_done_769e5ede4b31c67b = function (arg0) {
|
|
938
|
-
const ret = arg0.done;
|
|
1125
|
+
const ret = getObject(arg0).done;
|
|
939
1126
|
return ret;
|
|
940
1127
|
};
|
|
941
1128
|
|
|
942
1129
|
module.exports.__wbg_entries_3265d4158b33e5dc = function (arg0) {
|
|
943
|
-
const ret = Object.entries(arg0);
|
|
944
|
-
return ret;
|
|
1130
|
+
const ret = Object.entries(getObject(arg0));
|
|
1131
|
+
return addHeapObject(ret);
|
|
945
1132
|
};
|
|
946
1133
|
|
|
947
1134
|
module.exports.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
|
|
@@ -957,67 +1144,67 @@ module.exports.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
|
|
|
957
1144
|
};
|
|
958
1145
|
|
|
959
1146
|
module.exports.__wbg_error_80de38b3f7cc3c3c = function (arg0, arg1, arg2, arg3) {
|
|
960
|
-
console.error(arg0, arg1, arg2, arg3);
|
|
1147
|
+
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
961
1148
|
};
|
|
962
1149
|
|
|
963
1150
|
module.exports.__wbg_fetch_4465c2b10f21a927 = function (arg0) {
|
|
964
|
-
const ret = fetch(arg0);
|
|
965
|
-
return ret;
|
|
1151
|
+
const ret = fetch(getObject(arg0));
|
|
1152
|
+
return addHeapObject(ret);
|
|
966
1153
|
};
|
|
967
1154
|
|
|
968
1155
|
module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
|
|
969
|
-
const ret = arg0.fetch(arg1);
|
|
970
|
-
return ret;
|
|
1156
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1157
|
+
return addHeapObject(ret);
|
|
971
1158
|
};
|
|
972
1159
|
|
|
973
1160
|
module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function () {
|
|
974
1161
|
return handleError(function (arg0, arg1) {
|
|
975
|
-
arg0.getRandomValues(arg1);
|
|
1162
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
976
1163
|
}, arguments);
|
|
977
1164
|
};
|
|
978
1165
|
|
|
979
1166
|
module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
980
|
-
const ret = arg0.getTime();
|
|
1167
|
+
const ret = getObject(arg0).getTime();
|
|
981
1168
|
return ret;
|
|
982
1169
|
};
|
|
983
1170
|
|
|
984
1171
|
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
985
1172
|
return handleError(function (arg0, arg1) {
|
|
986
|
-
const ret = Reflect.get(arg0, arg1);
|
|
987
|
-
return ret;
|
|
1173
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1174
|
+
return addHeapObject(ret);
|
|
988
1175
|
}, arguments);
|
|
989
1176
|
};
|
|
990
1177
|
|
|
991
1178
|
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
992
|
-
const ret = arg0[arg1 >>> 0];
|
|
993
|
-
return ret;
|
|
1179
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1180
|
+
return addHeapObject(ret);
|
|
994
1181
|
};
|
|
995
1182
|
|
|
996
1183
|
module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function (arg0, arg1) {
|
|
997
|
-
const ret = arg0[arg1];
|
|
998
|
-
return ret;
|
|
1184
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
1185
|
+
return addHeapObject(ret);
|
|
999
1186
|
};
|
|
1000
1187
|
|
|
1001
1188
|
module.exports.__wbg_has_a5ea9117f258a0ec = function () {
|
|
1002
1189
|
return handleError(function (arg0, arg1) {
|
|
1003
|
-
const ret = Reflect.has(arg0, arg1);
|
|
1190
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1004
1191
|
return ret;
|
|
1005
1192
|
}, arguments);
|
|
1006
1193
|
};
|
|
1007
1194
|
|
|
1008
1195
|
module.exports.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
|
|
1009
|
-
const ret = arg0.headers;
|
|
1010
|
-
return ret;
|
|
1196
|
+
const ret = getObject(arg0).headers;
|
|
1197
|
+
return addHeapObject(ret);
|
|
1011
1198
|
};
|
|
1012
1199
|
|
|
1013
1200
|
module.exports.__wbg_info_033d8b8a0838f1d3 = function (arg0, arg1, arg2, arg3) {
|
|
1014
|
-
console.info(arg0, arg1, arg2, arg3);
|
|
1201
|
+
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1015
1202
|
};
|
|
1016
1203
|
|
|
1017
1204
|
module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function (arg0) {
|
|
1018
1205
|
let result;
|
|
1019
1206
|
try {
|
|
1020
|
-
result = arg0 instanceof ArrayBuffer;
|
|
1207
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1021
1208
|
} catch (_) {
|
|
1022
1209
|
result = false;
|
|
1023
1210
|
}
|
|
@@ -1028,7 +1215,7 @@ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function (arg0) {
|
|
|
1028
1215
|
module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
|
|
1029
1216
|
let result;
|
|
1030
1217
|
try {
|
|
1031
|
-
result = arg0 instanceof Response;
|
|
1218
|
+
result = getObject(arg0) instanceof Response;
|
|
1032
1219
|
} catch (_) {
|
|
1033
1220
|
result = false;
|
|
1034
1221
|
}
|
|
@@ -1039,7 +1226,7 @@ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
|
|
|
1039
1226
|
module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function (arg0) {
|
|
1040
1227
|
let result;
|
|
1041
1228
|
try {
|
|
1042
|
-
result = arg0 instanceof Uint8Array;
|
|
1229
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
1043
1230
|
} catch (_) {
|
|
1044
1231
|
result = false;
|
|
1045
1232
|
}
|
|
@@ -1048,43 +1235,43 @@ module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function (arg0) {
|
|
|
1048
1235
|
};
|
|
1049
1236
|
|
|
1050
1237
|
module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function (arg0) {
|
|
1051
|
-
const ret = Number.isSafeInteger(arg0);
|
|
1238
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1052
1239
|
return ret;
|
|
1053
1240
|
};
|
|
1054
1241
|
|
|
1055
1242
|
module.exports.__wbg_iterator_9a24c88df860dc65 = function () {
|
|
1056
1243
|
const ret = Symbol.iterator;
|
|
1057
|
-
return ret;
|
|
1244
|
+
return addHeapObject(ret);
|
|
1058
1245
|
};
|
|
1059
1246
|
|
|
1060
1247
|
module.exports.__wbg_length_a446193dc22c12f8 = function (arg0) {
|
|
1061
|
-
const ret = arg0.length;
|
|
1248
|
+
const ret = getObject(arg0).length;
|
|
1062
1249
|
return ret;
|
|
1063
1250
|
};
|
|
1064
1251
|
|
|
1065
1252
|
module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
1066
|
-
const ret = arg0.length;
|
|
1253
|
+
const ret = getObject(arg0).length;
|
|
1067
1254
|
return ret;
|
|
1068
1255
|
};
|
|
1069
1256
|
|
|
1070
1257
|
module.exports.__wbg_log_cad59bb680daec67 = function (arg0, arg1, arg2, arg3) {
|
|
1071
|
-
console.log(arg0, arg1, arg2, arg3);
|
|
1258
|
+
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1072
1259
|
};
|
|
1073
1260
|
|
|
1074
1261
|
module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function (arg0) {
|
|
1075
|
-
const ret = arg0.msCrypto;
|
|
1076
|
-
return ret;
|
|
1262
|
+
const ret = getObject(arg0).msCrypto;
|
|
1263
|
+
return addHeapObject(ret);
|
|
1077
1264
|
};
|
|
1078
1265
|
|
|
1079
1266
|
module.exports.__wbg_new0_f788a2397c7ca929 = function () {
|
|
1080
1267
|
const ret = new Date();
|
|
1081
|
-
return ret;
|
|
1268
|
+
return addHeapObject(ret);
|
|
1082
1269
|
};
|
|
1083
1270
|
|
|
1084
1271
|
module.exports.__wbg_new_018dcc2d6c8c2f6a = function () {
|
|
1085
1272
|
return handleError(function () {
|
|
1086
1273
|
const ret = new Headers();
|
|
1087
|
-
return ret;
|
|
1274
|
+
return addHeapObject(ret);
|
|
1088
1275
|
}, arguments);
|
|
1089
1276
|
};
|
|
1090
1277
|
|
|
@@ -1095,13 +1282,13 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
1095
1282
|
const a = state0.a;
|
|
1096
1283
|
state0.a = 0;
|
|
1097
1284
|
try {
|
|
1098
|
-
return
|
|
1285
|
+
return __wbg_adapter_150(a, state0.b, arg0, arg1);
|
|
1099
1286
|
} finally {
|
|
1100
1287
|
state0.a = a;
|
|
1101
1288
|
}
|
|
1102
1289
|
};
|
|
1103
1290
|
const ret = new Promise(cb0);
|
|
1104
|
-
return ret;
|
|
1291
|
+
return addHeapObject(ret);
|
|
1105
1292
|
} finally {
|
|
1106
1293
|
state0.a = state0.b = 0;
|
|
1107
1294
|
}
|
|
@@ -1109,40 +1296,40 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
1109
1296
|
|
|
1110
1297
|
module.exports.__wbg_new_405e22f390576ce2 = function () {
|
|
1111
1298
|
const ret = new Object();
|
|
1112
|
-
return ret;
|
|
1299
|
+
return addHeapObject(ret);
|
|
1113
1300
|
};
|
|
1114
1301
|
|
|
1115
1302
|
module.exports.__wbg_new_78feb108b6472713 = function () {
|
|
1116
1303
|
const ret = new Array();
|
|
1117
|
-
return ret;
|
|
1304
|
+
return addHeapObject(ret);
|
|
1118
1305
|
};
|
|
1119
1306
|
|
|
1120
1307
|
module.exports.__wbg_new_8a6f238a6ece86ea = function () {
|
|
1121
1308
|
const ret = new Error();
|
|
1122
|
-
return ret;
|
|
1309
|
+
return addHeapObject(ret);
|
|
1123
1310
|
};
|
|
1124
1311
|
|
|
1125
1312
|
module.exports.__wbg_new_9fd39a253424609a = function () {
|
|
1126
1313
|
return handleError(function () {
|
|
1127
1314
|
const ret = new FormData();
|
|
1128
|
-
return ret;
|
|
1315
|
+
return addHeapObject(ret);
|
|
1129
1316
|
}, arguments);
|
|
1130
1317
|
};
|
|
1131
1318
|
|
|
1132
1319
|
module.exports.__wbg_new_a12002a7f91c75be = function (arg0) {
|
|
1133
|
-
const ret = new Uint8Array(arg0);
|
|
1134
|
-
return ret;
|
|
1320
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1321
|
+
return addHeapObject(ret);
|
|
1135
1322
|
};
|
|
1136
1323
|
|
|
1137
1324
|
module.exports.__wbg_new_c68d7209be747379 = function (arg0, arg1) {
|
|
1138
1325
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1139
|
-
return ret;
|
|
1326
|
+
return addHeapObject(ret);
|
|
1140
1327
|
};
|
|
1141
1328
|
|
|
1142
1329
|
module.exports.__wbg_new_e25e5aab09ff45db = function () {
|
|
1143
1330
|
return handleError(function () {
|
|
1144
1331
|
const ret = new AbortController();
|
|
1145
|
-
return ret;
|
|
1332
|
+
return addHeapObject(ret);
|
|
1146
1333
|
}, arguments);
|
|
1147
1334
|
};
|
|
1148
1335
|
|
|
@@ -1153,7 +1340,7 @@ module.exports.__wbg_new_f24b6d53abe5bc82 = function (arg0, arg1) {
|
|
|
1153
1340
|
deferred0_0 = arg0;
|
|
1154
1341
|
deferred0_1 = arg1;
|
|
1155
1342
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1156
|
-
return ret;
|
|
1343
|
+
return addHeapObject(ret);
|
|
1157
1344
|
} finally {
|
|
1158
1345
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1159
1346
|
}
|
|
@@ -1161,113 +1348,113 @@ module.exports.__wbg_new_f24b6d53abe5bc82 = function (arg0, arg1) {
|
|
|
1161
1348
|
|
|
1162
1349
|
module.exports.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
|
|
1163
1350
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1164
|
-
return ret;
|
|
1351
|
+
return addHeapObject(ret);
|
|
1165
1352
|
};
|
|
1166
1353
|
|
|
1167
1354
|
module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
|
|
1168
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1169
|
-
return ret;
|
|
1355
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
1356
|
+
return addHeapObject(ret);
|
|
1170
1357
|
};
|
|
1171
1358
|
|
|
1172
1359
|
module.exports.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
|
|
1173
1360
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1174
|
-
return ret;
|
|
1361
|
+
return addHeapObject(ret);
|
|
1175
1362
|
};
|
|
1176
1363
|
|
|
1177
1364
|
module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
|
|
1178
1365
|
return handleError(function (arg0, arg1, arg2) {
|
|
1179
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1180
|
-
return ret;
|
|
1366
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1367
|
+
return addHeapObject(ret);
|
|
1181
1368
|
}, arguments);
|
|
1182
1369
|
};
|
|
1183
1370
|
|
|
1184
1371
|
module.exports.__wbg_newwithu8arraysequenceandoptions_068570c487f69127 = function () {
|
|
1185
1372
|
return handleError(function (arg0, arg1) {
|
|
1186
|
-
const ret = new Blob(arg0, arg1);
|
|
1187
|
-
return ret;
|
|
1373
|
+
const ret = new Blob(getObject(arg0), getObject(arg1));
|
|
1374
|
+
return addHeapObject(ret);
|
|
1188
1375
|
}, arguments);
|
|
1189
1376
|
};
|
|
1190
1377
|
|
|
1191
1378
|
module.exports.__wbg_next_25feadfc0913fea9 = function (arg0) {
|
|
1192
|
-
const ret = arg0.next;
|
|
1193
|
-
return ret;
|
|
1379
|
+
const ret = getObject(arg0).next;
|
|
1380
|
+
return addHeapObject(ret);
|
|
1194
1381
|
};
|
|
1195
1382
|
|
|
1196
1383
|
module.exports.__wbg_next_6574e1a8a62d1055 = function () {
|
|
1197
1384
|
return handleError(function (arg0) {
|
|
1198
|
-
const ret = arg0.next();
|
|
1199
|
-
return ret;
|
|
1385
|
+
const ret = getObject(arg0).next();
|
|
1386
|
+
return addHeapObject(ret);
|
|
1200
1387
|
}, arguments);
|
|
1201
1388
|
};
|
|
1202
1389
|
|
|
1203
1390
|
module.exports.__wbg_node_02999533c4ea02e3 = function (arg0) {
|
|
1204
|
-
const ret = arg0.node;
|
|
1205
|
-
return ret;
|
|
1391
|
+
const ret = getObject(arg0).node;
|
|
1392
|
+
return addHeapObject(ret);
|
|
1206
1393
|
};
|
|
1207
1394
|
|
|
1208
1395
|
module.exports.__wbg_process_5c1d670bc53614b8 = function (arg0) {
|
|
1209
|
-
const ret = arg0.process;
|
|
1210
|
-
return ret;
|
|
1396
|
+
const ret = getObject(arg0).process;
|
|
1397
|
+
return addHeapObject(ret);
|
|
1211
1398
|
};
|
|
1212
1399
|
|
|
1213
1400
|
module.exports.__wbg_push_737cfc8c1432c2c6 = function (arg0, arg1) {
|
|
1214
|
-
const ret = arg0.push(arg1);
|
|
1401
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
1215
1402
|
return ret;
|
|
1216
1403
|
};
|
|
1217
1404
|
|
|
1218
1405
|
module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
|
|
1219
|
-
queueMicrotask(arg0);
|
|
1406
|
+
queueMicrotask(getObject(arg0));
|
|
1220
1407
|
};
|
|
1221
1408
|
|
|
1222
1409
|
module.exports.__wbg_queueMicrotask_d3219def82552485 = function (arg0) {
|
|
1223
|
-
const ret = arg0.queueMicrotask;
|
|
1224
|
-
return ret;
|
|
1410
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
1411
|
+
return addHeapObject(ret);
|
|
1225
1412
|
};
|
|
1226
1413
|
|
|
1227
1414
|
module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () {
|
|
1228
1415
|
return handleError(function (arg0, arg1) {
|
|
1229
|
-
arg0.randomFillSync(arg1);
|
|
1416
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1230
1417
|
}, arguments);
|
|
1231
1418
|
};
|
|
1232
1419
|
|
|
1233
1420
|
module.exports.__wbg_require_79b1e9274cde3c87 = function () {
|
|
1234
1421
|
return handleError(function () {
|
|
1235
1422
|
const ret = module.require;
|
|
1236
|
-
return ret;
|
|
1423
|
+
return addHeapObject(ret);
|
|
1237
1424
|
}, arguments);
|
|
1238
1425
|
};
|
|
1239
1426
|
|
|
1240
1427
|
module.exports.__wbg_resolve_4851785c9c5f573d = function (arg0) {
|
|
1241
|
-
const ret = Promise.resolve(arg0);
|
|
1242
|
-
return ret;
|
|
1428
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1429
|
+
return addHeapObject(ret);
|
|
1243
1430
|
};
|
|
1244
1431
|
|
|
1245
1432
|
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
1246
|
-
arg0[arg1] = arg2;
|
|
1433
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1247
1434
|
};
|
|
1248
1435
|
|
|
1249
1436
|
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
1250
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
1437
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
1251
1438
|
};
|
|
1252
1439
|
|
|
1253
1440
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
|
1254
|
-
arg0.body = arg1;
|
|
1441
|
+
getObject(arg0).body = getObject(arg1);
|
|
1255
1442
|
};
|
|
1256
1443
|
|
|
1257
1444
|
module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function (arg0, arg1) {
|
|
1258
|
-
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1445
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1259
1446
|
};
|
|
1260
1447
|
|
|
1261
1448
|
module.exports.__wbg_setheaders_834c0bdb6a8949ad = function (arg0, arg1) {
|
|
1262
|
-
arg0.headers = arg1;
|
|
1449
|
+
getObject(arg0).headers = getObject(arg1);
|
|
1263
1450
|
};
|
|
1264
1451
|
|
|
1265
1452
|
module.exports.__wbg_setmethod_3c5280fe5d890842 = function (arg0, arg1, arg2) {
|
|
1266
|
-
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1453
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
1267
1454
|
};
|
|
1268
1455
|
|
|
1269
1456
|
module.exports.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
|
|
1270
|
-
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1457
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
1271
1458
|
};
|
|
1272
1459
|
|
|
1273
1460
|
module.exports.__wbg_setname_c0e2d6f348c746f4 = function (arg0, arg1, arg2) {
|
|
@@ -1276,18 +1463,18 @@ module.exports.__wbg_setname_c0e2d6f348c746f4 = function (arg0, arg1, arg2) {
|
|
|
1276
1463
|
try {
|
|
1277
1464
|
deferred0_0 = arg1;
|
|
1278
1465
|
deferred0_1 = arg2;
|
|
1279
|
-
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
1466
|
+
getObject(arg0).name = getStringFromWasm0(arg1, arg2);
|
|
1280
1467
|
} finally {
|
|
1281
1468
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1282
1469
|
}
|
|
1283
1470
|
};
|
|
1284
1471
|
|
|
1285
1472
|
module.exports.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
|
|
1286
|
-
arg0.signal = arg1;
|
|
1473
|
+
getObject(arg0).signal = getObject(arg1);
|
|
1287
1474
|
};
|
|
1288
1475
|
|
|
1289
1476
|
module.exports.__wbg_settype_39ed370d3edd403c = function (arg0, arg1, arg2) {
|
|
1290
|
-
arg0.type = getStringFromWasm0(arg1, arg2);
|
|
1477
|
+
getObject(arg0).type = getStringFromWasm0(arg1, arg2);
|
|
1291
1478
|
};
|
|
1292
1479
|
|
|
1293
1480
|
module.exports.__wbg_setvariant_d1d41b778dfe9c17 = function (arg0, arg1, arg2) {
|
|
@@ -1296,19 +1483,19 @@ module.exports.__wbg_setvariant_d1d41b778dfe9c17 = function (arg0, arg1, arg2) {
|
|
|
1296
1483
|
try {
|
|
1297
1484
|
deferred0_0 = arg1;
|
|
1298
1485
|
deferred0_1 = arg2;
|
|
1299
|
-
arg0.variant = getStringFromWasm0(arg1, arg2);
|
|
1486
|
+
getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
|
|
1300
1487
|
} finally {
|
|
1301
1488
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1302
1489
|
}
|
|
1303
1490
|
};
|
|
1304
1491
|
|
|
1305
1492
|
module.exports.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
|
|
1306
|
-
const ret = arg0.signal;
|
|
1307
|
-
return ret;
|
|
1493
|
+
const ret = getObject(arg0).signal;
|
|
1494
|
+
return addHeapObject(ret);
|
|
1308
1495
|
};
|
|
1309
1496
|
|
|
1310
1497
|
module.exports.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
|
|
1311
|
-
const ret = arg1.stack;
|
|
1498
|
+
const ret = getObject(arg1).stack;
|
|
1312
1499
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1313
1500
|
const len1 = WASM_VECTOR_LEN;
|
|
1314
1501
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
@@ -1317,60 +1504,60 @@ module.exports.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
|
|
|
1317
1504
|
|
|
1318
1505
|
module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
|
|
1319
1506
|
const ret = typeof global === "undefined" ? null : global;
|
|
1320
|
-
return isLikeNone(ret) ? 0 :
|
|
1507
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1321
1508
|
};
|
|
1322
1509
|
|
|
1323
1510
|
module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
|
|
1324
1511
|
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
1325
|
-
return isLikeNone(ret) ? 0 :
|
|
1512
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1326
1513
|
};
|
|
1327
1514
|
|
|
1328
1515
|
module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
|
|
1329
1516
|
const ret = typeof self === "undefined" ? null : self;
|
|
1330
|
-
return isLikeNone(ret) ? 0 :
|
|
1517
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1331
1518
|
};
|
|
1332
1519
|
|
|
1333
1520
|
module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
|
|
1334
1521
|
const ret = typeof window === "undefined" ? null : window;
|
|
1335
|
-
return isLikeNone(ret) ? 0 :
|
|
1522
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1336
1523
|
};
|
|
1337
1524
|
|
|
1338
1525
|
module.exports.__wbg_status_f6360336ca686bf0 = function (arg0) {
|
|
1339
|
-
const ret = arg0.status;
|
|
1526
|
+
const ret = getObject(arg0).status;
|
|
1340
1527
|
return ret;
|
|
1341
1528
|
};
|
|
1342
1529
|
|
|
1343
1530
|
module.exports.__wbg_stringify_f7ed6987935b4a24 = function () {
|
|
1344
1531
|
return handleError(function (arg0) {
|
|
1345
|
-
const ret = JSON.stringify(arg0);
|
|
1346
|
-
return ret;
|
|
1532
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
1533
|
+
return addHeapObject(ret);
|
|
1347
1534
|
}, arguments);
|
|
1348
1535
|
};
|
|
1349
1536
|
|
|
1350
1537
|
module.exports.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
|
|
1351
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1352
|
-
return ret;
|
|
1538
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1539
|
+
return addHeapObject(ret);
|
|
1353
1540
|
};
|
|
1354
1541
|
|
|
1355
1542
|
module.exports.__wbg_text_7805bea50de2af49 = function () {
|
|
1356
1543
|
return handleError(function (arg0) {
|
|
1357
|
-
const ret = arg0.text();
|
|
1358
|
-
return ret;
|
|
1544
|
+
const ret = getObject(arg0).text();
|
|
1545
|
+
return addHeapObject(ret);
|
|
1359
1546
|
}, arguments);
|
|
1360
1547
|
};
|
|
1361
1548
|
|
|
1362
1549
|
module.exports.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
|
|
1363
|
-
const ret = arg0.then(arg1);
|
|
1364
|
-
return ret;
|
|
1550
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
1551
|
+
return addHeapObject(ret);
|
|
1365
1552
|
};
|
|
1366
1553
|
|
|
1367
1554
|
module.exports.__wbg_then_48b406749878a531 = function (arg0, arg1, arg2) {
|
|
1368
|
-
const ret = arg0.then(arg1, arg2);
|
|
1369
|
-
return ret;
|
|
1555
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1556
|
+
return addHeapObject(ret);
|
|
1370
1557
|
};
|
|
1371
1558
|
|
|
1372
1559
|
module.exports.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
|
|
1373
|
-
const ret = arg1.url;
|
|
1560
|
+
const ret = getObject(arg1).url;
|
|
1374
1561
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1375
1562
|
const len1 = WASM_VECTOR_LEN;
|
|
1376
1563
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
@@ -1378,32 +1565,32 @@ module.exports.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
|
|
|
1378
1565
|
};
|
|
1379
1566
|
|
|
1380
1567
|
module.exports.__wbg_value_cd1ffa7b1ab794f1 = function (arg0) {
|
|
1381
|
-
const ret = arg0.value;
|
|
1382
|
-
return ret;
|
|
1568
|
+
const ret = getObject(arg0).value;
|
|
1569
|
+
return addHeapObject(ret);
|
|
1383
1570
|
};
|
|
1384
1571
|
|
|
1385
1572
|
module.exports.__wbg_versions_c71aa1626a93e0a1 = function (arg0) {
|
|
1386
|
-
const ret = arg0.versions;
|
|
1387
|
-
return ret;
|
|
1573
|
+
const ret = getObject(arg0).versions;
|
|
1574
|
+
return addHeapObject(ret);
|
|
1388
1575
|
};
|
|
1389
1576
|
|
|
1390
1577
|
module.exports.__wbg_warn_aaf1f4664a035bd6 = function (arg0, arg1, arg2, arg3) {
|
|
1391
|
-
console.warn(arg0, arg1, arg2, arg3);
|
|
1578
|
+
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1392
1579
|
};
|
|
1393
1580
|
|
|
1394
1581
|
module.exports.__wbindgen_as_number = function (arg0) {
|
|
1395
|
-
const ret = +arg0;
|
|
1582
|
+
const ret = +getObject(arg0);
|
|
1396
1583
|
return ret;
|
|
1397
1584
|
};
|
|
1398
1585
|
|
|
1399
1586
|
module.exports.__wbindgen_boolean_get = function (arg0) {
|
|
1400
|
-
const v = arg0;
|
|
1587
|
+
const v = getObject(arg0);
|
|
1401
1588
|
const ret = typeof v === "boolean" ? (v ? 1 : 0) : 2;
|
|
1402
1589
|
return ret;
|
|
1403
1590
|
};
|
|
1404
1591
|
|
|
1405
1592
|
module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
1406
|
-
const obj = arg0.original;
|
|
1593
|
+
const obj = takeObject(arg0).original;
|
|
1407
1594
|
if (obj.cnt-- == 1) {
|
|
1408
1595
|
obj.a = 0;
|
|
1409
1596
|
return true;
|
|
@@ -1412,13 +1599,13 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
1412
1599
|
return ret;
|
|
1413
1600
|
};
|
|
1414
1601
|
|
|
1415
|
-
module.exports.
|
|
1416
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1417
|
-
return ret;
|
|
1602
|
+
module.exports.__wbindgen_closure_wrapper2148 = function (arg0, arg1, arg2) {
|
|
1603
|
+
const ret = makeMutClosure(arg0, arg1, 548, __wbg_adapter_40);
|
|
1604
|
+
return addHeapObject(ret);
|
|
1418
1605
|
};
|
|
1419
1606
|
|
|
1420
1607
|
module.exports.__wbindgen_debug_string = function (arg0, arg1) {
|
|
1421
|
-
const ret = debugString(arg1);
|
|
1608
|
+
const ret = debugString(getObject(arg1));
|
|
1422
1609
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1423
1610
|
const len1 = WASM_VECTOR_LEN;
|
|
1424
1611
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
@@ -1427,57 +1614,47 @@ module.exports.__wbindgen_debug_string = function (arg0, arg1) {
|
|
|
1427
1614
|
|
|
1428
1615
|
module.exports.__wbindgen_error_new = function (arg0, arg1) {
|
|
1429
1616
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1430
|
-
return ret;
|
|
1617
|
+
return addHeapObject(ret);
|
|
1431
1618
|
};
|
|
1432
1619
|
|
|
1433
1620
|
module.exports.__wbindgen_in = function (arg0, arg1) {
|
|
1434
|
-
const ret = arg0 in arg1;
|
|
1621
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
1435
1622
|
return ret;
|
|
1436
1623
|
};
|
|
1437
1624
|
|
|
1438
|
-
module.exports.__wbindgen_init_externref_table = function () {
|
|
1439
|
-
const table = wasm.__wbindgen_export_4;
|
|
1440
|
-
const offset = table.grow(4);
|
|
1441
|
-
table.set(0, undefined);
|
|
1442
|
-
table.set(offset + 0, undefined);
|
|
1443
|
-
table.set(offset + 1, null);
|
|
1444
|
-
table.set(offset + 2, true);
|
|
1445
|
-
table.set(offset + 3, false);
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
1625
|
module.exports.__wbindgen_is_function = function (arg0) {
|
|
1449
|
-
const ret = typeof arg0 === "function";
|
|
1626
|
+
const ret = typeof getObject(arg0) === "function";
|
|
1450
1627
|
return ret;
|
|
1451
1628
|
};
|
|
1452
1629
|
|
|
1453
1630
|
module.exports.__wbindgen_is_object = function (arg0) {
|
|
1454
|
-
const val = arg0;
|
|
1631
|
+
const val = getObject(arg0);
|
|
1455
1632
|
const ret = typeof val === "object" && val !== null;
|
|
1456
1633
|
return ret;
|
|
1457
1634
|
};
|
|
1458
1635
|
|
|
1459
1636
|
module.exports.__wbindgen_is_string = function (arg0) {
|
|
1460
|
-
const ret = typeof arg0 === "string";
|
|
1637
|
+
const ret = typeof getObject(arg0) === "string";
|
|
1461
1638
|
return ret;
|
|
1462
1639
|
};
|
|
1463
1640
|
|
|
1464
1641
|
module.exports.__wbindgen_is_undefined = function (arg0) {
|
|
1465
|
-
const ret = arg0 === undefined;
|
|
1642
|
+
const ret = getObject(arg0) === undefined;
|
|
1466
1643
|
return ret;
|
|
1467
1644
|
};
|
|
1468
1645
|
|
|
1469
1646
|
module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
|
|
1470
|
-
const ret = arg0 == arg1;
|
|
1647
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
1471
1648
|
return ret;
|
|
1472
1649
|
};
|
|
1473
1650
|
|
|
1474
1651
|
module.exports.__wbindgen_memory = function () {
|
|
1475
1652
|
const ret = wasm.memory;
|
|
1476
|
-
return ret;
|
|
1653
|
+
return addHeapObject(ret);
|
|
1477
1654
|
};
|
|
1478
1655
|
|
|
1479
1656
|
module.exports.__wbindgen_number_get = function (arg0, arg1) {
|
|
1480
|
-
const obj = arg1;
|
|
1657
|
+
const obj = getObject(arg1);
|
|
1481
1658
|
const ret = typeof obj === "number" ? obj : undefined;
|
|
1482
1659
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1483
1660
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
@@ -1485,11 +1662,20 @@ module.exports.__wbindgen_number_get = function (arg0, arg1) {
|
|
|
1485
1662
|
|
|
1486
1663
|
module.exports.__wbindgen_number_new = function (arg0) {
|
|
1487
1664
|
const ret = arg0;
|
|
1488
|
-
return ret;
|
|
1665
|
+
return addHeapObject(ret);
|
|
1666
|
+
};
|
|
1667
|
+
|
|
1668
|
+
module.exports.__wbindgen_object_clone_ref = function (arg0) {
|
|
1669
|
+
const ret = getObject(arg0);
|
|
1670
|
+
return addHeapObject(ret);
|
|
1671
|
+
};
|
|
1672
|
+
|
|
1673
|
+
module.exports.__wbindgen_object_drop_ref = function (arg0) {
|
|
1674
|
+
takeObject(arg0);
|
|
1489
1675
|
};
|
|
1490
1676
|
|
|
1491
1677
|
module.exports.__wbindgen_string_get = function (arg0, arg1) {
|
|
1492
|
-
const obj = arg1;
|
|
1678
|
+
const obj = getObject(arg1);
|
|
1493
1679
|
const ret = typeof obj === "string" ? obj : undefined;
|
|
1494
1680
|
var ptr1 = isLikeNone(ret)
|
|
1495
1681
|
? 0
|
|
@@ -1501,7 +1687,7 @@ module.exports.__wbindgen_string_get = function (arg0, arg1) {
|
|
|
1501
1687
|
|
|
1502
1688
|
module.exports.__wbindgen_string_new = function (arg0, arg1) {
|
|
1503
1689
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1504
|
-
return ret;
|
|
1690
|
+
return addHeapObject(ret);
|
|
1505
1691
|
};
|
|
1506
1692
|
|
|
1507
1693
|
module.exports.__wbindgen_throw = function (arg0, arg1) {
|
|
@@ -1515,5 +1701,3 @@ const wasmModule = new WebAssembly.Module(bytes);
|
|
|
1515
1701
|
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
1516
1702
|
wasm = wasmInstance.exports;
|
|
1517
1703
|
module.exports.__wasm = wasm;
|
|
1518
|
-
|
|
1519
|
-
wasm.__wbindgen_start();
|