@bitwarden/sdk-internal 0.2.0-main.12 → 0.2.0-main.122

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.
@@ -1,58 +1,26 @@
1
1
  let imports = {};
2
2
  imports["__wbindgen_placeholder__"] = module.exports;
3
3
  let wasm;
4
- const { TextDecoder, TextEncoder } = require(`util`);
5
-
6
- let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
7
-
8
- cachedTextDecoder.decode();
9
-
10
- let cachedUint8ArrayMemory0 = null;
11
-
12
- function getUint8ArrayMemory0() {
13
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
14
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
15
- }
16
- return cachedUint8ArrayMemory0;
17
- }
18
-
19
- function getStringFromWasm0(ptr, len) {
20
- ptr = ptr >>> 0;
21
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
22
- }
4
+ const { TextEncoder, TextDecoder } = require(`util`);
23
5
 
24
6
  const heap = new Array(128).fill(undefined);
25
7
 
26
8
  heap.push(undefined, null, true, false);
27
9
 
28
- let heap_next = heap.length;
29
-
30
- function addHeapObject(obj) {
31
- if (heap_next === heap.length) heap.push(heap.length + 1);
32
- const idx = heap_next;
33
- heap_next = heap[idx];
34
-
35
- heap[idx] = obj;
36
- return idx;
37
- }
38
-
39
10
  function getObject(idx) {
40
11
  return heap[idx];
41
12
  }
42
13
 
43
- function dropObject(idx) {
44
- if (idx < 132) return;
45
- heap[idx] = heap_next;
46
- heap_next = idx;
47
- }
14
+ let WASM_VECTOR_LEN = 0;
48
15
 
49
- function takeObject(idx) {
50
- const ret = getObject(idx);
51
- dropObject(idx);
52
- return ret;
53
- }
16
+ let cachedUint8ArrayMemory0 = null;
54
17
 
55
- let WASM_VECTOR_LEN = 0;
18
+ function getUint8ArrayMemory0() {
19
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
20
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
21
+ }
22
+ return cachedUint8ArrayMemory0;
23
+ }
56
24
 
57
25
  let cachedTextEncoder = new TextEncoder("utf-8");
58
26
 
@@ -110,10 +78,6 @@ function passStringToWasm0(arg, malloc, realloc) {
110
78
  return ptr;
111
79
  }
112
80
 
113
- function isLikeNone(x) {
114
- return x === undefined || x === null;
115
- }
116
-
117
81
  let cachedDataViewMemory0 = null;
118
82
 
119
83
  function getDataViewMemory0() {
@@ -128,6 +92,82 @@ function getDataViewMemory0() {
128
92
  return cachedDataViewMemory0;
129
93
  }
130
94
 
95
+ let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
96
+
97
+ cachedTextDecoder.decode();
98
+
99
+ function getStringFromWasm0(ptr, len) {
100
+ ptr = ptr >>> 0;
101
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
102
+ }
103
+
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;
112
+ return idx;
113
+ }
114
+
115
+ function handleError(f, args) {
116
+ try {
117
+ return f.apply(this, args);
118
+ } catch (e) {
119
+ wasm.__wbindgen_exn_store(addHeapObject(e));
120
+ }
121
+ }
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
+
135
+ function isLikeNone(x) {
136
+ return x === undefined || x === null;
137
+ }
138
+
139
+ const CLOSURE_DTORS =
140
+ typeof FinalizationRegistry === "undefined"
141
+ ? { register: () => {}, unregister: () => {} }
142
+ : new FinalizationRegistry((state) => {
143
+ wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
144
+ });
145
+
146
+ function makeMutClosure(arg0, arg1, dtor, f) {
147
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
148
+ const real = (...args) => {
149
+ // First up with a closure we increment the internal reference
150
+ // count. This ensures that the Rust closure environment won't
151
+ // be deallocated while we're invoking it.
152
+ state.cnt++;
153
+ const a = state.a;
154
+ state.a = 0;
155
+ try {
156
+ return f(a, state.b, ...args);
157
+ } finally {
158
+ if (--state.cnt === 0) {
159
+ wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
160
+ CLOSURE_DTORS.unregister(state);
161
+ } else {
162
+ state.a = a;
163
+ }
164
+ }
165
+ };
166
+ real.original = state;
167
+ CLOSURE_DTORS.register(real, state, state);
168
+ return real;
169
+ }
170
+
131
171
  function debugString(val) {
132
172
  // primitive types
133
173
  const type = typeof val;
@@ -169,7 +209,7 @@ function debugString(val) {
169
209
  // Test for built-in
170
210
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
171
211
  let className;
172
- if (builtInMatches.length > 1) {
212
+ if (builtInMatches && builtInMatches.length > 1) {
173
213
  className = builtInMatches[1];
174
214
  } else {
175
215
  // Failed to match the standard '[object ClassName]'
@@ -193,45 +233,6 @@ function debugString(val) {
193
233
  return className;
194
234
  }
195
235
 
196
- const CLOSURE_DTORS =
197
- typeof FinalizationRegistry === "undefined"
198
- ? { register: () => {}, unregister: () => {} }
199
- : new FinalizationRegistry((state) => {
200
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
201
- });
202
-
203
- function makeMutClosure(arg0, arg1, dtor, f) {
204
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
205
- const real = (...args) => {
206
- // First up with a closure we increment the internal reference
207
- // count. This ensures that the Rust closure environment won't
208
- // be deallocated while we're invoking it.
209
- state.cnt++;
210
- const a = state.a;
211
- state.a = 0;
212
- try {
213
- return f(a, state.b, ...args);
214
- } finally {
215
- if (--state.cnt === 0) {
216
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
217
- CLOSURE_DTORS.unregister(state);
218
- } else {
219
- state.a = a;
220
- }
221
- }
222
- };
223
- real.original = state;
224
- CLOSURE_DTORS.register(real, state, state);
225
- return real;
226
- }
227
- function __wbg_adapter_38(arg0, arg1, arg2) {
228
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcab43b83560065d8(
229
- arg0,
230
- arg1,
231
- addHeapObject(arg2),
232
- );
233
- }
234
-
235
236
  let stack_pointer = 128;
236
237
 
237
238
  function addBorrowedObject(obj) {
@@ -243,9 +244,9 @@ function addBorrowedObject(obj) {
243
244
  * @param {any} error
244
245
  * @returns {boolean}
245
246
  */
246
- module.exports.isCoreError = function (error) {
247
+ module.exports.isEncryptionSettingsError = function (error) {
247
248
  try {
248
- const ret = wasm.isCoreError(addBorrowedObject(error));
249
+ const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
249
250
  return ret !== 0;
250
251
  } finally {
251
252
  heap[stack_pointer++] = undefined;
@@ -256,9 +257,35 @@ module.exports.isCoreError = function (error) {
256
257
  * @param {any} error
257
258
  * @returns {boolean}
258
259
  */
259
- module.exports.isEncryptionSettingsError = function (error) {
260
+ module.exports.isCryptoError = function (error) {
260
261
  try {
261
- const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
262
+ const ret = wasm.isCryptoError(addBorrowedObject(error));
263
+ return ret !== 0;
264
+ } finally {
265
+ heap[stack_pointer++] = undefined;
266
+ }
267
+ };
268
+
269
+ /**
270
+ * @param {any} error
271
+ * @returns {boolean}
272
+ */
273
+ module.exports.isSshKeyExportError = function (error) {
274
+ try {
275
+ const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
276
+ return ret !== 0;
277
+ } finally {
278
+ heap[stack_pointer++] = undefined;
279
+ }
280
+ };
281
+
282
+ /**
283
+ * @param {any} error
284
+ * @returns {boolean}
285
+ */
286
+ module.exports.isSshKeyImportError = function (error) {
287
+ try {
288
+ const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
262
289
  return ret !== 0;
263
290
  } finally {
264
291
  heap[stack_pointer++] = undefined;
@@ -282,9 +309,61 @@ module.exports.isKeyGenerationError = function (error) {
282
309
  * @param {any} error
283
310
  * @returns {boolean}
284
311
  */
285
- module.exports.isTestError = function (error) {
312
+ module.exports.isDecryptFileError = function (error) {
286
313
  try {
287
- const ret = wasm.isTestError(addBorrowedObject(error));
314
+ const ret = wasm.isDecryptFileError(addBorrowedObject(error));
315
+ return ret !== 0;
316
+ } finally {
317
+ heap[stack_pointer++] = undefined;
318
+ }
319
+ };
320
+
321
+ /**
322
+ * @param {any} error
323
+ * @returns {boolean}
324
+ */
325
+ module.exports.isEncryptFileError = function (error) {
326
+ try {
327
+ const ret = wasm.isEncryptFileError(addBorrowedObject(error));
328
+ return ret !== 0;
329
+ } finally {
330
+ heap[stack_pointer++] = undefined;
331
+ }
332
+ };
333
+
334
+ /**
335
+ * @param {any} error
336
+ * @returns {boolean}
337
+ */
338
+ module.exports.isDecryptError = function (error) {
339
+ try {
340
+ const ret = wasm.isDecryptError(addBorrowedObject(error));
341
+ return ret !== 0;
342
+ } finally {
343
+ heap[stack_pointer++] = undefined;
344
+ }
345
+ };
346
+
347
+ /**
348
+ * @param {any} error
349
+ * @returns {boolean}
350
+ */
351
+ module.exports.isEncryptError = function (error) {
352
+ try {
353
+ const ret = wasm.isEncryptError(addBorrowedObject(error));
354
+ return ret !== 0;
355
+ } finally {
356
+ heap[stack_pointer++] = undefined;
357
+ }
358
+ };
359
+
360
+ /**
361
+ * @param {any} error
362
+ * @returns {boolean}
363
+ */
364
+ module.exports.isTotpError = function (error) {
365
+ try {
366
+ const ret = wasm.isTotpError(addBorrowedObject(error));
288
367
  return ret !== 0;
289
368
  } finally {
290
369
  heap[stack_pointer++] = undefined;
@@ -292,8 +371,41 @@ module.exports.isTestError = function (error) {
292
371
  };
293
372
 
294
373
  /**
374
+ * @param {LogLevel} level
375
+ */
376
+ module.exports.set_log_level = function (level) {
377
+ wasm.set_log_level(level);
378
+ };
379
+
380
+ /**
381
+ * @param {LogLevel | null} [log_level]
382
+ */
383
+ module.exports.init_sdk = function (log_level) {
384
+ wasm.init_sdk(isLikeNone(log_level) ? 5 : log_level);
385
+ };
386
+
387
+ function getArrayU8FromWasm0(ptr, len) {
388
+ ptr = ptr >>> 0;
389
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
390
+ }
391
+
392
+ function passArray8ToWasm0(arg, malloc) {
393
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
394
+ getUint8ArrayMemory0().set(arg, ptr / 1);
395
+ WASM_VECTOR_LEN = arg.length;
396
+ return ptr;
397
+ }
398
+ /**
399
+ * Generate a new SSH key pair
400
+ *
401
+ * # Arguments
402
+ * - `key_algorithm` - The algorithm to use for the key pair
403
+ *
404
+ * # Returns
405
+ * - `Ok(SshKey)` if the key was successfully generated
406
+ * - `Err(KeyGenerationError)` if the key could not be generated
295
407
  * @param {KeyAlgorithm} key_algorithm
296
- * @returns {GenerateSshKeyResult}
408
+ * @returns {SshKeyView}
297
409
  */
298
410
  module.exports.generate_ssh_key = function (key_algorithm) {
299
411
  try {
@@ -311,22 +423,79 @@ module.exports.generate_ssh_key = function (key_algorithm) {
311
423
  }
312
424
  };
313
425
 
314
- function handleError(f, args) {
426
+ /**
427
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
428
+ * to an OpenSSH private key with public key and fingerprint
429
+ *
430
+ * # Arguments
431
+ * - `imported_key` - The private key to convert
432
+ * - `password` - The password to use for decrypting the key
433
+ *
434
+ * # Returns
435
+ * - `Ok(SshKey)` if the key was successfully coneverted
436
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
437
+ * - `Err(WrongPassword)` if the password provided is incorrect
438
+ * - `Err(ParsingError)` if the key could not be parsed
439
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
440
+ * @param {string} imported_key
441
+ * @param {string | null} [password]
442
+ * @returns {SshKeyView}
443
+ */
444
+ module.exports.import_ssh_key = function (imported_key, password) {
315
445
  try {
316
- return f.apply(this, args);
317
- } catch (e) {
318
- wasm.__wbindgen_exn_store(addHeapObject(e));
319
- }
320
- }
321
- function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
322
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h7363c1bfa226a55d(
323
- arg0,
324
- arg1,
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);
463
+ }
464
+ };
465
+
466
+ /**
467
+ * @param {any} error
468
+ * @returns {boolean}
469
+ */
470
+ module.exports.isTestError = function (error) {
471
+ try {
472
+ const ret = wasm.isTestError(addBorrowedObject(error));
473
+ return ret !== 0;
474
+ } finally {
475
+ heap[stack_pointer++] = undefined;
476
+ }
477
+ };
478
+
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
+ );
485
+ }
486
+
487
+ function __wbg_adapter_150(arg0, arg1, arg2, arg3) {
488
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h33defb2ea0fdb769(
489
+ arg0,
490
+ arg1,
325
491
  addHeapObject(arg2),
326
492
  addHeapObject(arg3),
327
493
  );
328
494
  }
329
495
 
496
+ /**
497
+ * @enum {0 | 1 | 2 | 3 | 4}
498
+ */
330
499
  module.exports.LogLevel = Object.freeze({
331
500
  Trace: 0,
332
501
  0: "Trace",
@@ -362,14 +531,10 @@ class BitwardenClient {
362
531
  wasm.__wbg_bitwardenclient_free(ptr, 0);
363
532
  }
364
533
  /**
365
- * @param {ClientSettings | undefined} [settings]
366
- * @param {LogLevel | undefined} [log_level]
534
+ * @param {ClientSettings | null} [settings]
367
535
  */
368
- constructor(settings, log_level) {
369
- const ret = wasm.bitwardenclient_new(
370
- isLikeNone(settings) ? 0 : addHeapObject(settings),
371
- isLikeNone(log_level) ? 5 : log_level,
372
- );
536
+ constructor(settings) {
537
+ const ret = wasm.bitwardenclient_new(isLikeNone(settings) ? 0 : addHeapObject(settings));
373
538
  this.__wbg_ptr = ret >>> 0;
374
539
  BitwardenClientFinalization.register(this, this.__wbg_ptr, this);
375
540
  return this;
@@ -418,13 +583,21 @@ class BitwardenClient {
418
583
  }
419
584
  /**
420
585
  * @param {string} msg
421
- * @returns {Promise<void>}
422
586
  */
423
587
  throw(msg) {
424
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
425
- const len0 = WASM_VECTOR_LEN;
426
- const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
427
- return takeObject(ret);
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);
600
+ }
428
601
  }
429
602
  /**
430
603
  * Test method, calls http endpoint
@@ -438,46 +611,163 @@ class BitwardenClient {
438
611
  return takeObject(ret);
439
612
  }
440
613
  /**
441
- * @returns {ClientCrypto}
614
+ * @returns {CryptoClient}
442
615
  */
443
616
  crypto() {
444
617
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
445
- return ClientCrypto.__wrap(ret);
618
+ return CryptoClient.__wrap(ret);
446
619
  }
447
620
  /**
448
- * @returns {ClientVault}
621
+ * @returns {VaultClient}
449
622
  */
450
623
  vault() {
451
624
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
452
- return ClientVault.__wrap(ret);
625
+ return VaultClient.__wrap(ret);
453
626
  }
454
627
  }
455
628
  module.exports.BitwardenClient = BitwardenClient;
456
629
 
457
- const ClientCryptoFinalization =
630
+ const ClientFoldersFinalization =
631
+ typeof FinalizationRegistry === "undefined"
632
+ ? { register: () => {}, unregister: () => {} }
633
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
634
+
635
+ class ClientFolders {
636
+ static __wrap(ptr) {
637
+ ptr = ptr >>> 0;
638
+ const obj = Object.create(ClientFolders.prototype);
639
+ obj.__wbg_ptr = ptr;
640
+ ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
641
+ return obj;
642
+ }
643
+
644
+ __destroy_into_raw() {
645
+ const ptr = this.__wbg_ptr;
646
+ this.__wbg_ptr = 0;
647
+ ClientFoldersFinalization.unregister(this);
648
+ return ptr;
649
+ }
650
+
651
+ free() {
652
+ const ptr = this.__destroy_into_raw();
653
+ wasm.__wbg_clientfolders_free(ptr, 0);
654
+ }
655
+ /**
656
+ * Decrypt folder
657
+ * @param {Folder} folder
658
+ * @returns {FolderView}
659
+ */
660
+ decrypt(folder) {
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);
673
+ }
674
+ }
675
+ }
676
+ module.exports.ClientFolders = ClientFolders;
677
+
678
+ const ClientTotpFinalization =
679
+ typeof FinalizationRegistry === "undefined"
680
+ ? { register: () => {}, unregister: () => {} }
681
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clienttotp_free(ptr >>> 0, 1));
682
+
683
+ class ClientTotp {
684
+ static __wrap(ptr) {
685
+ ptr = ptr >>> 0;
686
+ const obj = Object.create(ClientTotp.prototype);
687
+ obj.__wbg_ptr = ptr;
688
+ ClientTotpFinalization.register(obj, obj.__wbg_ptr, obj);
689
+ return obj;
690
+ }
691
+
692
+ __destroy_into_raw() {
693
+ const ptr = this.__wbg_ptr;
694
+ this.__wbg_ptr = 0;
695
+ ClientTotpFinalization.unregister(this);
696
+ return ptr;
697
+ }
698
+
699
+ free() {
700
+ const ptr = this.__destroy_into_raw();
701
+ wasm.__wbg_clienttotp_free(ptr, 0);
702
+ }
703
+ /**
704
+ * Generates a TOTP code from a provided key
705
+ *
706
+ * # Arguments
707
+ * - `key` - Can be:
708
+ * - A base32 encoded string
709
+ * - OTP Auth URI
710
+ * - Steam URI
711
+ * - `time_ms` - Optional timestamp in milliseconds
712
+ *
713
+ * # Returns
714
+ * - `Ok(TotpResponse)` containing the generated code and period
715
+ * - `Err(TotpError)` if code generation fails
716
+ * @param {string} key
717
+ * @param {number | null} [time_ms]
718
+ * @returns {TotpResponse}
719
+ */
720
+ generate_totp(key, time_ms) {
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);
742
+ }
743
+ }
744
+ }
745
+ module.exports.ClientTotp = ClientTotp;
746
+
747
+ const CryptoClientFinalization =
458
748
  typeof FinalizationRegistry === "undefined"
459
749
  ? { register: () => {}, unregister: () => {} }
460
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientcrypto_free(ptr >>> 0, 1));
750
+ : new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
461
751
 
462
- class ClientCrypto {
752
+ class CryptoClient {
463
753
  static __wrap(ptr) {
464
754
  ptr = ptr >>> 0;
465
- const obj = Object.create(ClientCrypto.prototype);
755
+ const obj = Object.create(CryptoClient.prototype);
466
756
  obj.__wbg_ptr = ptr;
467
- ClientCryptoFinalization.register(obj, obj.__wbg_ptr, obj);
757
+ CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
468
758
  return obj;
469
759
  }
470
760
 
471
761
  __destroy_into_raw() {
472
762
  const ptr = this.__wbg_ptr;
473
763
  this.__wbg_ptr = 0;
474
- ClientCryptoFinalization.unregister(this);
764
+ CryptoClientFinalization.unregister(this);
475
765
  return ptr;
476
766
  }
477
767
 
478
768
  free() {
479
769
  const ptr = this.__destroy_into_raw();
480
- wasm.__wbg_clientcrypto_free(ptr, 0);
770
+ wasm.__wbg_cryptoclient_free(ptr, 0);
481
771
  }
482
772
  /**
483
773
  * Initialization method for the user crypto. Needs to be called before any other crypto
@@ -486,7 +776,7 @@ class ClientCrypto {
486
776
  * @returns {Promise<void>}
487
777
  */
488
778
  initialize_user_crypto(req) {
489
- const ret = wasm.clientcrypto_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
779
+ const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
490
780
  return takeObject(ret);
491
781
  }
492
782
  /**
@@ -496,84 +786,255 @@ class ClientCrypto {
496
786
  * @returns {Promise<void>}
497
787
  */
498
788
  initialize_org_crypto(req) {
499
- const ret = wasm.clientcrypto_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
789
+ const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
500
790
  return takeObject(ret);
501
791
  }
792
+ /**
793
+ * Generates a new key pair and encrypts the private key with the provided user key.
794
+ * Crypto initialization not required.
795
+ * @param {string} user_key
796
+ * @returns {MakeKeyPairResponse}
797
+ */
798
+ make_key_pair(user_key) {
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);
813
+ }
814
+ }
815
+ /**
816
+ * Verifies a user's asymmetric keys by decrypting the private key with the provided user
817
+ * key. Returns if the private key is decryptable and if it is a valid matching key.
818
+ * Crypto initialization not required.
819
+ * @param {VerifyAsymmetricKeysRequest} request
820
+ * @returns {VerifyAsymmetricKeysResponse}
821
+ */
822
+ verify_asymmetric_keys(request) {
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);
835
+ }
836
+ }
502
837
  }
503
- module.exports.ClientCrypto = ClientCrypto;
838
+ module.exports.CryptoClient = CryptoClient;
504
839
 
505
- const ClientFoldersFinalization =
840
+ const PureCryptoFinalization =
506
841
  typeof FinalizationRegistry === "undefined"
507
842
  ? { register: () => {}, unregister: () => {} }
508
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
509
-
510
- class ClientFolders {
511
- static __wrap(ptr) {
512
- ptr = ptr >>> 0;
513
- const obj = Object.create(ClientFolders.prototype);
514
- obj.__wbg_ptr = ptr;
515
- ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
516
- return obj;
517
- }
518
-
843
+ : new FinalizationRegistry((ptr) => wasm.__wbg_purecrypto_free(ptr >>> 0, 1));
844
+ /**
845
+ * This module represents a stopgap solution to provide access to primitive crypto functions for JS
846
+ * clients. It is not intended to be used outside of the JS clients and this pattern should not be
847
+ * proliferated. It is necessary because we want to use SDK crypto prior to the SDK being fully
848
+ * responsible for state and keys.
849
+ */
850
+ class PureCrypto {
519
851
  __destroy_into_raw() {
520
852
  const ptr = this.__wbg_ptr;
521
853
  this.__wbg_ptr = 0;
522
- ClientFoldersFinalization.unregister(this);
854
+ PureCryptoFinalization.unregister(this);
523
855
  return ptr;
524
856
  }
525
857
 
526
858
  free() {
527
859
  const ptr = this.__destroy_into_raw();
528
- wasm.__wbg_clientfolders_free(ptr, 0);
860
+ wasm.__wbg_purecrypto_free(ptr, 0);
529
861
  }
530
862
  /**
531
- * Decrypt folder
532
- * @param {Folder} folder
533
- * @returns {FolderView}
863
+ * @param {string} enc_string
864
+ * @param {string} key_b64
865
+ * @returns {string}
534
866
  */
535
- decrypt(folder) {
867
+ static symmetric_decrypt(enc_string, key_b64) {
868
+ let deferred4_0;
869
+ let deferred4_1;
536
870
  try {
537
871
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
538
- wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
872
+ const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
873
+ const len0 = WASM_VECTOR_LEN;
874
+ const ptr1 = passStringToWasm0(key_b64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
875
+ const len1 = WASM_VECTOR_LEN;
876
+ wasm.purecrypto_symmetric_decrypt(retptr, ptr0, len0, ptr1, len1);
539
877
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
540
878
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
541
879
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
542
- if (r2) {
543
- throw takeObject(r1);
880
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
881
+ var ptr3 = r0;
882
+ var len3 = r1;
883
+ if (r3) {
884
+ ptr3 = 0;
885
+ len3 = 0;
886
+ throw takeObject(r2);
544
887
  }
545
- return takeObject(r0);
888
+ deferred4_0 = ptr3;
889
+ deferred4_1 = len3;
890
+ return getStringFromWasm0(ptr3, len3);
891
+ } finally {
892
+ wasm.__wbindgen_add_to_stack_pointer(16);
893
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
894
+ }
895
+ }
896
+ /**
897
+ * @param {string} enc_string
898
+ * @param {string} key_b64
899
+ * @returns {Uint8Array}
900
+ */
901
+ static symmetric_decrypt_to_bytes(enc_string, key_b64) {
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);
921
+ }
922
+ }
923
+ /**
924
+ * @param {Uint8Array} enc_bytes
925
+ * @param {string} key_b64
926
+ * @returns {Uint8Array}
927
+ */
928
+ static symmetric_decrypt_array_buffer(enc_bytes, key_b64) {
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);
948
+ }
949
+ }
950
+ /**
951
+ * @param {string} plain
952
+ * @param {string} key_b64
953
+ * @returns {string}
954
+ */
955
+ static symmetric_encrypt(plain, key_b64) {
956
+ let deferred4_0;
957
+ let deferred4_1;
958
+ try {
959
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
960
+ const ptr0 = passStringToWasm0(plain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
961
+ const len0 = WASM_VECTOR_LEN;
962
+ const ptr1 = passStringToWasm0(key_b64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
963
+ const len1 = WASM_VECTOR_LEN;
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) {
972
+ ptr3 = 0;
973
+ len3 = 0;
974
+ throw takeObject(r2);
975
+ }
976
+ deferred4_0 = ptr3;
977
+ deferred4_1 = len3;
978
+ return getStringFromWasm0(ptr3, len3);
979
+ } finally {
980
+ wasm.__wbindgen_add_to_stack_pointer(16);
981
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
982
+ }
983
+ }
984
+ /**
985
+ * @param {Uint8Array} plain
986
+ * @param {string} key_b64
987
+ * @returns {Uint8Array}
988
+ */
989
+ static symmetric_encrypt_to_array_buffer(plain, key_b64) {
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;
546
1007
  } finally {
547
1008
  wasm.__wbindgen_add_to_stack_pointer(16);
548
1009
  }
549
1010
  }
550
1011
  }
551
- module.exports.ClientFolders = ClientFolders;
1012
+ module.exports.PureCrypto = PureCrypto;
552
1013
 
553
- const ClientVaultFinalization =
1014
+ const VaultClientFinalization =
554
1015
  typeof FinalizationRegistry === "undefined"
555
1016
  ? { register: () => {}, unregister: () => {} }
556
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientvault_free(ptr >>> 0, 1));
1017
+ : new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
557
1018
 
558
- class ClientVault {
1019
+ class VaultClient {
559
1020
  static __wrap(ptr) {
560
1021
  ptr = ptr >>> 0;
561
- const obj = Object.create(ClientVault.prototype);
1022
+ const obj = Object.create(VaultClient.prototype);
562
1023
  obj.__wbg_ptr = ptr;
563
- ClientVaultFinalization.register(obj, obj.__wbg_ptr, obj);
1024
+ VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
564
1025
  return obj;
565
1026
  }
566
1027
 
567
1028
  __destroy_into_raw() {
568
1029
  const ptr = this.__wbg_ptr;
569
1030
  this.__wbg_ptr = 0;
570
- ClientVaultFinalization.unregister(this);
1031
+ VaultClientFinalization.unregister(this);
571
1032
  return ptr;
572
1033
  }
573
1034
 
574
1035
  free() {
575
1036
  const ptr = this.__destroy_into_raw();
576
- wasm.__wbg_clientvault_free(ptr, 0);
1037
+ wasm.__wbg_vaultclient_free(ptr, 0);
577
1038
  }
578
1039
  /**
579
1040
  * @returns {ClientFolders}
@@ -582,189 +1043,176 @@ class ClientVault {
582
1043
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
583
1044
  return ClientFolders.__wrap(ret);
584
1045
  }
1046
+ /**
1047
+ * @returns {ClientTotp}
1048
+ */
1049
+ totp() {
1050
+ const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
1051
+ return ClientTotp.__wrap(ret);
1052
+ }
585
1053
  }
586
- module.exports.ClientVault = ClientVault;
1054
+ module.exports.VaultClient = VaultClient;
587
1055
 
588
- module.exports.__wbg_new_fe19e4f3db5c3999 = function (arg0, arg1) {
589
- let deferred0_0;
590
- let deferred0_1;
591
- try {
592
- deferred0_0 = arg0;
593
- deferred0_1 = arg1;
594
- const ret = new Error(getStringFromWasm0(arg0, arg1));
595
- return addHeapObject(ret);
596
- } finally {
597
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
598
- }
599
- };
600
-
601
- module.exports.__wbg_setname_46d623c31ae39910 = function (arg0, arg1, arg2) {
602
- let deferred0_0;
603
- let deferred0_1;
604
- try {
605
- deferred0_0 = arg1;
606
- deferred0_1 = arg2;
607
- getObject(arg0).name = getStringFromWasm0(arg1, arg2);
608
- } finally {
609
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
610
- }
611
- };
612
-
613
- module.exports.__wbg_setvariant_262a12673324f71b = function (arg0, arg1, arg2) {
614
- let deferred0_0;
615
- let deferred0_1;
616
- try {
617
- deferred0_0 = arg1;
618
- deferred0_1 = arg2;
619
- getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
620
- } finally {
621
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
622
- }
1056
+ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
1057
+ const ret = String(getObject(arg1));
1058
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1059
+ const len1 = WASM_VECTOR_LEN;
1060
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1061
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
623
1062
  };
624
1063
 
625
- module.exports.__wbindgen_string_new = function (arg0, arg1) {
626
- const ret = getStringFromWasm0(arg0, arg1);
627
- return addHeapObject(ret);
1064
+ module.exports.__wbg_abort_775ef1d17fc65868 = function (arg0) {
1065
+ getObject(arg0).abort();
628
1066
  };
629
1067
 
630
- module.exports.__wbg_get_ef828680c64da212 = function () {
631
- return handleError(function (arg0, arg1) {
632
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
633
- return addHeapObject(ret);
1068
+ module.exports.__wbg_append_299d5d48292c0495 = function () {
1069
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1070
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
634
1071
  }, arguments);
635
1072
  };
636
1073
 
637
- module.exports.__wbindgen_object_drop_ref = function (arg0) {
638
- takeObject(arg0);
639
- };
640
-
641
- module.exports.__wbindgen_string_get = function (arg0, arg1) {
642
- const obj = getObject(arg1);
643
- const ret = typeof obj === "string" ? obj : undefined;
644
- var ptr1 = isLikeNone(ret)
645
- ? 0
646
- : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
647
- var len1 = WASM_VECTOR_LEN;
648
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
649
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1074
+ module.exports.__wbg_append_8c7dd8d641a5f01b = function () {
1075
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1076
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1077
+ }, arguments);
650
1078
  };
651
1079
 
652
- module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
653
- const ret = getObject(arg0) == getObject(arg1);
654
- return ret;
1080
+ module.exports.__wbg_append_b2d1fc16de2a0e81 = function () {
1081
+ return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1082
+ getObject(arg0).append(
1083
+ getStringFromWasm0(arg1, arg2),
1084
+ getObject(arg3),
1085
+ getStringFromWasm0(arg4, arg5),
1086
+ );
1087
+ }, arguments);
655
1088
  };
656
1089
 
657
- module.exports.__wbindgen_is_object = function (arg0) {
658
- const val = getObject(arg0);
659
- const ret = typeof val === "object" && val !== null;
660
- return ret;
1090
+ module.exports.__wbg_append_b44785ebeb668479 = function () {
1091
+ return handleError(function (arg0, arg1, arg2, arg3) {
1092
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
1093
+ }, arguments);
661
1094
  };
662
1095
 
663
- module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function (arg0, arg1) {
664
- const ret = getObject(arg0)[getObject(arg1)];
1096
+ module.exports.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
1097
+ const ret = getObject(arg0).buffer;
665
1098
  return addHeapObject(ret);
666
1099
  };
667
1100
 
668
- module.exports.__wbindgen_is_undefined = function (arg0) {
669
- const ret = getObject(arg0) === undefined;
670
- return ret;
1101
+ module.exports.__wbg_call_672a4d21634d4a24 = function () {
1102
+ return handleError(function (arg0, arg1) {
1103
+ const ret = getObject(arg0).call(getObject(arg1));
1104
+ return addHeapObject(ret);
1105
+ }, arguments);
671
1106
  };
672
1107
 
673
- module.exports.__wbindgen_in = function (arg0, arg1) {
674
- const ret = getObject(arg0) in getObject(arg1);
675
- return ret;
1108
+ module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
1109
+ return handleError(function (arg0, arg1, arg2) {
1110
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1111
+ return addHeapObject(ret);
1112
+ }, arguments);
676
1113
  };
677
1114
 
678
- module.exports.__wbg_isSafeInteger_b9dff570f01a9100 = function (arg0) {
679
- const ret = Number.isSafeInteger(getObject(arg0));
680
- return ret;
1115
+ module.exports.__wbg_crypto_ed58b8e10a292839 = function (arg0) {
1116
+ const ret = getObject(arg0).crypto;
1117
+ return addHeapObject(ret);
681
1118
  };
682
1119
 
683
- module.exports.__wbindgen_as_number = function (arg0) {
684
- const ret = +getObject(arg0);
685
- return ret;
1120
+ module.exports.__wbg_debug_e17b51583ca6a632 = function (arg0, arg1, arg2, arg3) {
1121
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
686
1122
  };
687
1123
 
688
- module.exports.__wbindgen_is_string = function (arg0) {
689
- const ret = typeof getObject(arg0) === "string";
1124
+ module.exports.__wbg_done_769e5ede4b31c67b = function (arg0) {
1125
+ const ret = getObject(arg0).done;
690
1126
  return ret;
691
1127
  };
692
1128
 
693
- module.exports.__wbg_entries_c02034de337d3ee2 = function (arg0) {
1129
+ module.exports.__wbg_entries_3265d4158b33e5dc = function (arg0) {
694
1130
  const ret = Object.entries(getObject(arg0));
695
1131
  return addHeapObject(ret);
696
1132
  };
697
1133
 
698
- module.exports.__wbg_length_f217bbbf7e8e4df4 = function (arg0) {
699
- const ret = getObject(arg0).length;
700
- return ret;
1134
+ module.exports.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
1135
+ let deferred0_0;
1136
+ let deferred0_1;
1137
+ try {
1138
+ deferred0_0 = arg0;
1139
+ deferred0_1 = arg1;
1140
+ console.error(getStringFromWasm0(arg0, arg1));
1141
+ } finally {
1142
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1143
+ }
701
1144
  };
702
1145
 
703
- module.exports.__wbg_get_5419cf6b954aa11d = function (arg0, arg1) {
704
- const ret = getObject(arg0)[arg1 >>> 0];
705
- return addHeapObject(ret);
1146
+ module.exports.__wbg_error_80de38b3f7cc3c3c = function (arg0, arg1, arg2, arg3) {
1147
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
706
1148
  };
707
1149
 
708
- module.exports.__wbg_call_3bfa248576352471 = function () {
709
- return handleError(function (arg0, arg1, arg2) {
710
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
711
- return addHeapObject(ret);
712
- }, arguments);
1150
+ module.exports.__wbg_fetch_4465c2b10f21a927 = function (arg0) {
1151
+ const ret = fetch(getObject(arg0));
1152
+ return addHeapObject(ret);
713
1153
  };
714
1154
 
715
- module.exports.__wbindgen_object_clone_ref = function (arg0) {
716
- const ret = getObject(arg0);
1155
+ module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
1156
+ const ret = getObject(arg0).fetch(getObject(arg1));
717
1157
  return addHeapObject(ret);
718
1158
  };
719
1159
 
720
- module.exports.__wbg_new_e69b5f66fda8f13c = function () {
721
- const ret = new Object();
722
- return addHeapObject(ret);
1160
+ module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function () {
1161
+ return handleError(function (arg0, arg1) {
1162
+ getObject(arg0).getRandomValues(getObject(arg1));
1163
+ }, arguments);
723
1164
  };
724
1165
 
725
- module.exports.__wbg_setmethod_ce2da76000b02f6a = function (arg0, arg1, arg2) {
726
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1166
+ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
1167
+ const ret = getObject(arg0).getTime();
1168
+ return ret;
727
1169
  };
728
1170
 
729
- module.exports.__wbg_new_a9ae04a5200606a5 = function () {
730
- return handleError(function () {
731
- const ret = new Headers();
1171
+ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
1172
+ return handleError(function (arg0, arg1) {
1173
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
732
1174
  return addHeapObject(ret);
733
1175
  }, arguments);
734
1176
  };
735
1177
 
736
- module.exports.__wbg_setheaders_f5205d36e423a544 = function (arg0, arg1) {
737
- getObject(arg0).headers = getObject(arg1);
738
- };
739
-
740
- module.exports.__wbg_setmode_4919fd636102c586 = function (arg0, arg1) {
741
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1178
+ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
1179
+ const ret = getObject(arg0)[arg1 >>> 0];
1180
+ return addHeapObject(ret);
742
1181
  };
743
1182
 
744
- module.exports.__wbg_setcredentials_a4e661320cdb9738 = function (arg0, arg1) {
745
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1183
+ module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function (arg0, arg1) {
1184
+ const ret = getObject(arg0)[getObject(arg1)];
1185
+ return addHeapObject(ret);
746
1186
  };
747
1187
 
748
- module.exports.__wbg_setbody_aa8b691bec428bf4 = function (arg0, arg1) {
749
- getObject(arg0).body = getObject(arg1);
1188
+ module.exports.__wbg_has_a5ea9117f258a0ec = function () {
1189
+ return handleError(function (arg0, arg1) {
1190
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
1191
+ return ret;
1192
+ }, arguments);
750
1193
  };
751
1194
 
752
- module.exports.__wbg_signal_9acfcec9e7dffc22 = function (arg0) {
753
- const ret = getObject(arg0).signal;
1195
+ module.exports.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
1196
+ const ret = getObject(arg0).headers;
754
1197
  return addHeapObject(ret);
755
1198
  };
756
1199
 
757
- module.exports.__wbg_setsignal_812ccb8269a7fd90 = function (arg0, arg1) {
758
- getObject(arg0).signal = getObject(arg1);
1200
+ module.exports.__wbg_info_033d8b8a0838f1d3 = function (arg0, arg1, arg2, arg3) {
1201
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
759
1202
  };
760
1203
 
761
- module.exports.__wbg_append_8b3e7f74a47ea7d5 = function () {
762
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
763
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
764
- }, arguments);
1204
+ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function (arg0) {
1205
+ let result;
1206
+ try {
1207
+ result = getObject(arg0) instanceof ArrayBuffer;
1208
+ } catch (_) {
1209
+ result = false;
1210
+ }
1211
+ const ret = result;
1212
+ return ret;
765
1213
  };
766
1214
 
767
- module.exports.__wbg_instanceof_Response_3c0e210a57ff751d = function (arg0) {
1215
+ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
768
1216
  let result;
769
1217
  try {
770
1218
  result = getObject(arg0) instanceof Response;
@@ -775,82 +1223,66 @@ module.exports.__wbg_instanceof_Response_3c0e210a57ff751d = function (arg0) {
775
1223
  return ret;
776
1224
  };
777
1225
 
778
- module.exports.__wbg_status_5f4e900d22140a18 = function (arg0) {
779
- const ret = getObject(arg0).status;
1226
+ module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function (arg0) {
1227
+ let result;
1228
+ try {
1229
+ result = getObject(arg0) instanceof Uint8Array;
1230
+ } catch (_) {
1231
+ result = false;
1232
+ }
1233
+ const ret = result;
780
1234
  return ret;
781
1235
  };
782
1236
 
783
- module.exports.__wbg_url_58af972663531d16 = function (arg0, arg1) {
784
- const ret = getObject(arg1).url;
785
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
786
- const len1 = WASM_VECTOR_LEN;
787
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
788
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1237
+ module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function (arg0) {
1238
+ const ret = Number.isSafeInteger(getObject(arg0));
1239
+ return ret;
789
1240
  };
790
1241
 
791
- module.exports.__wbg_headers_1b9bf90c73fae600 = function (arg0) {
792
- const ret = getObject(arg0).headers;
1242
+ module.exports.__wbg_iterator_9a24c88df860dc65 = function () {
1243
+ const ret = Symbol.iterator;
793
1244
  return addHeapObject(ret);
794
1245
  };
795
1246
 
796
- module.exports.__wbg_next_b06e115d1b01e10b = function () {
797
- return handleError(function (arg0) {
798
- const ret = getObject(arg0).next();
799
- return addHeapObject(ret);
800
- }, arguments);
1247
+ module.exports.__wbg_length_a446193dc22c12f8 = function (arg0) {
1248
+ const ret = getObject(arg0).length;
1249
+ return ret;
801
1250
  };
802
1251
 
803
- module.exports.__wbg_done_983b5ffcaec8c583 = function (arg0) {
804
- const ret = getObject(arg0).done;
1252
+ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
1253
+ const ret = getObject(arg0).length;
805
1254
  return ret;
806
1255
  };
807
1256
 
808
- module.exports.__wbg_value_2ab8a198c834c26a = function (arg0) {
809
- const ret = getObject(arg0).value;
810
- return addHeapObject(ret);
1257
+ module.exports.__wbg_log_cad59bb680daec67 = function (arg0, arg1, arg2, arg3) {
1258
+ console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
811
1259
  };
812
1260
 
813
- module.exports.__wbg_stringify_eead5648c09faaf8 = function () {
814
- return handleError(function (arg0) {
815
- const ret = JSON.stringify(getObject(arg0));
816
- return addHeapObject(ret);
817
- }, arguments);
1261
+ module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function (arg0) {
1262
+ const ret = getObject(arg0).msCrypto;
1263
+ return addHeapObject(ret);
818
1264
  };
819
1265
 
820
- module.exports.__wbg_abort_c57daab47a6c1215 = function (arg0) {
821
- getObject(arg0).abort();
1266
+ module.exports.__wbg_new0_f788a2397c7ca929 = function () {
1267
+ const ret = new Date();
1268
+ return addHeapObject(ret);
822
1269
  };
823
1270
 
824
- module.exports.__wbg_text_ebeee8b31af4c919 = function () {
825
- return handleError(function (arg0) {
826
- const ret = getObject(arg0).text();
1271
+ module.exports.__wbg_new_018dcc2d6c8c2f6a = function () {
1272
+ return handleError(function () {
1273
+ const ret = new Headers();
827
1274
  return addHeapObject(ret);
828
1275
  }, arguments);
829
1276
  };
830
1277
 
831
- module.exports.__wbindgen_cb_drop = function (arg0) {
832
- const obj = takeObject(arg0).original;
833
- if (obj.cnt-- == 1) {
834
- obj.a = 0;
835
- return true;
836
- }
837
- const ret = false;
838
- return ret;
839
- };
840
-
841
- module.exports.__wbindgen_error_new = function (arg0, arg1) {
842
- const ret = new Error(getStringFromWasm0(arg0, arg1));
843
- return addHeapObject(ret);
844
- };
845
-
846
- module.exports.__wbg_new_1073970097e5a420 = function (arg0, arg1) {
1278
+ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
847
1279
  try {
848
1280
  var state0 = { a: arg0, b: arg1 };
849
1281
  var cb0 = (arg0, arg1) => {
850
1282
  const a = state0.a;
851
1283
  state0.a = 0;
852
1284
  try {
853
- return __wbg_adapter_125(a, state0.b, arg0, arg1);
1285
+ return __wbg_adapter_150(a, state0.b, arg0, arg1);
854
1286
  } finally {
855
1287
  state0.a = a;
856
1288
  }
@@ -862,287 +1294,293 @@ module.exports.__wbg_new_1073970097e5a420 = function (arg0, arg1) {
862
1294
  }
863
1295
  };
864
1296
 
865
- module.exports.__wbg_set_f975102236d3c502 = function (arg0, arg1, arg2) {
866
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1297
+ module.exports.__wbg_new_405e22f390576ce2 = function () {
1298
+ const ret = new Object();
1299
+ return addHeapObject(ret);
1300
+ };
1301
+
1302
+ module.exports.__wbg_new_78feb108b6472713 = function () {
1303
+ const ret = new Array();
1304
+ return addHeapObject(ret);
867
1305
  };
868
1306
 
869
- module.exports.__wbg_new_abda76e883ba8a5f = function () {
1307
+ module.exports.__wbg_new_8a6f238a6ece86ea = function () {
870
1308
  const ret = new Error();
871
1309
  return addHeapObject(ret);
872
1310
  };
873
1311
 
874
- module.exports.__wbg_stack_658279fe44541cf6 = function (arg0, arg1) {
875
- const ret = getObject(arg1).stack;
876
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
877
- const len1 = WASM_VECTOR_LEN;
878
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
879
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1312
+ module.exports.__wbg_new_9fd39a253424609a = function () {
1313
+ return handleError(function () {
1314
+ const ret = new FormData();
1315
+ return addHeapObject(ret);
1316
+ }, arguments);
1317
+ };
1318
+
1319
+ module.exports.__wbg_new_a12002a7f91c75be = function (arg0) {
1320
+ const ret = new Uint8Array(getObject(arg0));
1321
+ return addHeapObject(ret);
1322
+ };
1323
+
1324
+ module.exports.__wbg_new_c68d7209be747379 = function (arg0, arg1) {
1325
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1326
+ return addHeapObject(ret);
1327
+ };
1328
+
1329
+ module.exports.__wbg_new_e25e5aab09ff45db = function () {
1330
+ return handleError(function () {
1331
+ const ret = new AbortController();
1332
+ return addHeapObject(ret);
1333
+ }, arguments);
880
1334
  };
881
1335
 
882
- module.exports.__wbg_error_f851667af71bcfc6 = function (arg0, arg1) {
1336
+ module.exports.__wbg_new_f24b6d53abe5bc82 = function (arg0, arg1) {
883
1337
  let deferred0_0;
884
1338
  let deferred0_1;
885
1339
  try {
886
1340
  deferred0_0 = arg0;
887
1341
  deferred0_1 = arg1;
888
- console.error(getStringFromWasm0(arg0, arg1));
1342
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1343
+ return addHeapObject(ret);
889
1344
  } finally {
890
1345
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
891
1346
  }
892
1347
  };
893
1348
 
894
- module.exports.__wbg_crypto_1d1f22824a6a080c = function (arg0) {
895
- const ret = getObject(arg0).crypto;
1349
+ module.exports.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
1350
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
896
1351
  return addHeapObject(ret);
897
1352
  };
898
1353
 
899
- module.exports.__wbg_process_4a72847cc503995b = function (arg0) {
900
- const ret = getObject(arg0).process;
1354
+ module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
1355
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
901
1356
  return addHeapObject(ret);
902
1357
  };
903
1358
 
904
- module.exports.__wbg_versions_f686565e586dd935 = function (arg0) {
905
- const ret = getObject(arg0).versions;
906
- return addHeapObject(ret);
907
- };
908
-
909
- module.exports.__wbg_node_104a2ff8d6ea03a2 = function (arg0) {
910
- const ret = getObject(arg0).node;
1359
+ module.exports.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
1360
+ const ret = new Uint8Array(arg0 >>> 0);
911
1361
  return addHeapObject(ret);
912
1362
  };
913
1363
 
914
- module.exports.__wbg_require_cca90b1a94a0255b = function () {
915
- return handleError(function () {
916
- const ret = module.require;
1364
+ module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
1365
+ return handleError(function (arg0, arg1, arg2) {
1366
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
917
1367
  return addHeapObject(ret);
918
1368
  }, arguments);
919
1369
  };
920
1370
 
921
- module.exports.__wbindgen_is_function = function (arg0) {
922
- const ret = typeof getObject(arg0) === "function";
923
- return ret;
1371
+ module.exports.__wbg_newwithu8arraysequenceandoptions_068570c487f69127 = function () {
1372
+ return handleError(function (arg0, arg1) {
1373
+ const ret = new Blob(getObject(arg0), getObject(arg1));
1374
+ return addHeapObject(ret);
1375
+ }, arguments);
924
1376
  };
925
1377
 
926
- module.exports.__wbg_msCrypto_eb05e62b530a1508 = function (arg0) {
927
- const ret = getObject(arg0).msCrypto;
1378
+ module.exports.__wbg_next_25feadfc0913fea9 = function (arg0) {
1379
+ const ret = getObject(arg0).next;
928
1380
  return addHeapObject(ret);
929
1381
  };
930
1382
 
931
- module.exports.__wbg_newwithlength_76462a666eca145f = function (arg0) {
932
- const ret = new Uint8Array(arg0 >>> 0);
933
- return addHeapObject(ret);
1383
+ module.exports.__wbg_next_6574e1a8a62d1055 = function () {
1384
+ return handleError(function (arg0) {
1385
+ const ret = getObject(arg0).next();
1386
+ return addHeapObject(ret);
1387
+ }, arguments);
934
1388
  };
935
1389
 
936
- module.exports.__wbindgen_memory = function () {
937
- const ret = wasm.memory;
1390
+ module.exports.__wbg_node_02999533c4ea02e3 = function (arg0) {
1391
+ const ret = getObject(arg0).node;
938
1392
  return addHeapObject(ret);
939
1393
  };
940
1394
 
941
- module.exports.__wbg_buffer_ccaed51a635d8a2d = function (arg0) {
942
- const ret = getObject(arg0).buffer;
1395
+ module.exports.__wbg_process_5c1d670bc53614b8 = function (arg0) {
1396
+ const ret = getObject(arg0).process;
943
1397
  return addHeapObject(ret);
944
1398
  };
945
1399
 
946
- module.exports.__wbg_newwithbyteoffsetandlength_7e3eb787208af730 = function (arg0, arg1, arg2) {
947
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
948
- return addHeapObject(ret);
1400
+ module.exports.__wbg_push_737cfc8c1432c2c6 = function (arg0, arg1) {
1401
+ const ret = getObject(arg0).push(getObject(arg1));
1402
+ return ret;
949
1403
  };
950
1404
 
951
- module.exports.__wbg_randomFillSync_5c9c955aa56b6049 = function () {
952
- return handleError(function (arg0, arg1) {
953
- getObject(arg0).randomFillSync(takeObject(arg1));
954
- }, arguments);
1405
+ module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
1406
+ queueMicrotask(getObject(arg0));
955
1407
  };
956
1408
 
957
- module.exports.__wbg_subarray_975a06f9dbd16995 = function (arg0, arg1, arg2) {
958
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1409
+ module.exports.__wbg_queueMicrotask_d3219def82552485 = function (arg0) {
1410
+ const ret = getObject(arg0).queueMicrotask;
959
1411
  return addHeapObject(ret);
960
1412
  };
961
1413
 
962
- module.exports.__wbg_getRandomValues_3aa56aa6edec874c = function () {
1414
+ module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () {
963
1415
  return handleError(function (arg0, arg1) {
964
- getObject(arg0).getRandomValues(getObject(arg1));
1416
+ getObject(arg0).randomFillSync(takeObject(arg1));
965
1417
  }, arguments);
966
1418
  };
967
1419
 
968
- module.exports.__wbg_new_fec2611eb9180f95 = function (arg0) {
969
- const ret = new Uint8Array(getObject(arg0));
970
- return addHeapObject(ret);
1420
+ module.exports.__wbg_require_79b1e9274cde3c87 = function () {
1421
+ return handleError(function () {
1422
+ const ret = module.require;
1423
+ return addHeapObject(ret);
1424
+ }, arguments);
971
1425
  };
972
1426
 
973
- module.exports.__wbg_set_ec2fcf81bc573fd9 = function (arg0, arg1, arg2) {
974
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1427
+ module.exports.__wbg_resolve_4851785c9c5f573d = function (arg0) {
1428
+ const ret = Promise.resolve(getObject(arg0));
1429
+ return addHeapObject(ret);
975
1430
  };
976
1431
 
977
- module.exports.__wbg_self_bf91bf94d9e04084 = function () {
978
- return handleError(function () {
979
- const ret = self.self;
980
- return addHeapObject(ret);
981
- }, arguments);
1432
+ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
1433
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
982
1434
  };
983
1435
 
984
- module.exports.__wbg_window_52dd9f07d03fd5f8 = function () {
985
- return handleError(function () {
986
- const ret = window.window;
987
- return addHeapObject(ret);
988
- }, arguments);
1436
+ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
1437
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
989
1438
  };
990
1439
 
991
- module.exports.__wbg_globalThis_05c129bf37fcf1be = function () {
992
- return handleError(function () {
993
- const ret = globalThis.globalThis;
994
- return addHeapObject(ret);
995
- }, arguments);
1440
+ module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
1441
+ getObject(arg0).body = getObject(arg1);
996
1442
  };
997
1443
 
998
- module.exports.__wbg_global_3eca19bb09e9c484 = function () {
999
- return handleError(function () {
1000
- const ret = global.global;
1001
- return addHeapObject(ret);
1002
- }, arguments);
1444
+ module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function (arg0, arg1) {
1445
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1003
1446
  };
1004
1447
 
1005
- module.exports.__wbg_newnoargs_1ede4bf2ebbaaf43 = function (arg0, arg1) {
1006
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1007
- return addHeapObject(ret);
1448
+ module.exports.__wbg_setheaders_834c0bdb6a8949ad = function (arg0, arg1) {
1449
+ getObject(arg0).headers = getObject(arg1);
1008
1450
  };
1009
1451
 
1010
- module.exports.__wbg_call_a9ef466721e824f2 = function () {
1011
- return handleError(function (arg0, arg1) {
1012
- const ret = getObject(arg0).call(getObject(arg1));
1013
- return addHeapObject(ret);
1014
- }, arguments);
1452
+ module.exports.__wbg_setmethod_3c5280fe5d890842 = function (arg0, arg1, arg2) {
1453
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1015
1454
  };
1016
1455
 
1017
- module.exports.__wbg_iterator_695d699a44d6234c = function () {
1018
- const ret = Symbol.iterator;
1019
- return addHeapObject(ret);
1456
+ module.exports.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
1457
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1020
1458
  };
1021
1459
 
1022
- module.exports.__wbg_next_13b477da1eaa3897 = function (arg0) {
1023
- const ret = getObject(arg0).next;
1024
- return addHeapObject(ret);
1460
+ module.exports.__wbg_setname_c0e2d6f348c746f4 = function (arg0, arg1, arg2) {
1461
+ let deferred0_0;
1462
+ let deferred0_1;
1463
+ try {
1464
+ deferred0_0 = arg1;
1465
+ deferred0_1 = arg2;
1466
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
1467
+ } finally {
1468
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1469
+ }
1025
1470
  };
1026
1471
 
1027
- module.exports.__wbg_new_034f913e7636e987 = function () {
1028
- const ret = new Array();
1029
- return addHeapObject(ret);
1472
+ module.exports.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
1473
+ getObject(arg0).signal = getObject(arg1);
1030
1474
  };
1031
1475
 
1032
- module.exports.__wbg_push_36cf4d81d7da33d1 = function (arg0, arg1) {
1033
- const ret = getObject(arg0).push(getObject(arg1));
1034
- return ret;
1476
+ module.exports.__wbg_settype_39ed370d3edd403c = function (arg0, arg1, arg2) {
1477
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1035
1478
  };
1036
1479
 
1037
- module.exports.__wbg_instanceof_ArrayBuffer_74945570b4a62ec7 = function (arg0) {
1038
- let result;
1480
+ module.exports.__wbg_setvariant_d1d41b778dfe9c17 = function (arg0, arg1, arg2) {
1481
+ let deferred0_0;
1482
+ let deferred0_1;
1039
1483
  try {
1040
- result = getObject(arg0) instanceof ArrayBuffer;
1041
- } catch (_) {
1042
- result = false;
1484
+ deferred0_0 = arg1;
1485
+ deferred0_1 = arg2;
1486
+ getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
1487
+ } finally {
1488
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1043
1489
  }
1044
- const ret = result;
1045
- return ret;
1046
1490
  };
1047
1491
 
1048
- module.exports.__wbg_new_70a2f23d1565c04c = function (arg0, arg1) {
1049
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1492
+ module.exports.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
1493
+ const ret = getObject(arg0).signal;
1050
1494
  return addHeapObject(ret);
1051
1495
  };
1052
1496
 
1053
- module.exports.__wbg_has_bd717f25f195f23d = function () {
1054
- return handleError(function (arg0, arg1) {
1055
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
1056
- return ret;
1057
- }, arguments);
1497
+ module.exports.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
1498
+ const ret = getObject(arg1).stack;
1499
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1500
+ const len1 = WASM_VECTOR_LEN;
1501
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1502
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1058
1503
  };
1059
1504
 
1060
- module.exports.__wbg_resolve_0aad7c1484731c99 = function (arg0) {
1061
- const ret = Promise.resolve(getObject(arg0));
1062
- return addHeapObject(ret);
1505
+ module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
1506
+ const ret = typeof global === "undefined" ? null : global;
1507
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1063
1508
  };
1064
1509
 
1065
- module.exports.__wbg_then_748f75edfb032440 = function (arg0, arg1) {
1066
- const ret = getObject(arg0).then(getObject(arg1));
1067
- return addHeapObject(ret);
1510
+ module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
1511
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
1512
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1068
1513
  };
1069
1514
 
1070
- module.exports.__wbg_then_4866a7d9f55d8f3e = function (arg0, arg1, arg2) {
1071
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1072
- return addHeapObject(ret);
1515
+ module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
1516
+ const ret = typeof self === "undefined" ? null : self;
1517
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1073
1518
  };
1074
1519
 
1075
- module.exports.__wbg_length_9254c4bd3b9f23c4 = function (arg0) {
1076
- const ret = getObject(arg0).length;
1077
- return ret;
1520
+ module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
1521
+ const ret = typeof window === "undefined" ? null : window;
1522
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1078
1523
  };
1079
1524
 
1080
- module.exports.__wbg_instanceof_Uint8Array_df0761410414ef36 = function (arg0) {
1081
- let result;
1082
- try {
1083
- result = getObject(arg0) instanceof Uint8Array;
1084
- } catch (_) {
1085
- result = false;
1086
- }
1087
- const ret = result;
1525
+ module.exports.__wbg_status_f6360336ca686bf0 = function (arg0) {
1526
+ const ret = getObject(arg0).status;
1088
1527
  return ret;
1089
1528
  };
1090
1529
 
1091
- module.exports.__wbg_new_4e7308fbedde3997 = function () {
1092
- return handleError(function () {
1093
- const ret = new FormData();
1530
+ module.exports.__wbg_stringify_f7ed6987935b4a24 = function () {
1531
+ return handleError(function (arg0) {
1532
+ const ret = JSON.stringify(getObject(arg0));
1094
1533
  return addHeapObject(ret);
1095
1534
  }, arguments);
1096
1535
  };
1097
1536
 
1098
- module.exports.__wbg_append_43a4b1c9d5df4168 = function () {
1099
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1100
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1101
- }, arguments);
1102
- };
1103
-
1104
- module.exports.__wbg_settype_623d2ee701e6310a = function (arg0, arg1, arg2) {
1105
- getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1537
+ module.exports.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
1538
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1539
+ return addHeapObject(ret);
1106
1540
  };
1107
1541
 
1108
- module.exports.__wbg_newwithu8arraysequenceandoptions_d41c0fdf78490206 = function () {
1109
- return handleError(function (arg0, arg1) {
1110
- const ret = new Blob(getObject(arg0), getObject(arg1));
1542
+ module.exports.__wbg_text_7805bea50de2af49 = function () {
1543
+ return handleError(function (arg0) {
1544
+ const ret = getObject(arg0).text();
1111
1545
  return addHeapObject(ret);
1112
1546
  }, arguments);
1113
1547
  };
1114
1548
 
1115
- module.exports.__wbg_append_7ee78799a92a9731 = function () {
1116
- return handleError(function (arg0, arg1, arg2, arg3) {
1117
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
1118
- }, arguments);
1549
+ module.exports.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
1550
+ const ret = getObject(arg0).then(getObject(arg1));
1551
+ return addHeapObject(ret);
1119
1552
  };
1120
1553
 
1121
- module.exports.__wbg_append_8135c71037096394 = function () {
1122
- return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1123
- getObject(arg0).append(
1124
- getStringFromWasm0(arg1, arg2),
1125
- getObject(arg3),
1126
- getStringFromWasm0(arg4, arg5),
1127
- );
1128
- }, arguments);
1554
+ module.exports.__wbg_then_48b406749878a531 = function (arg0, arg1, arg2) {
1555
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1556
+ return addHeapObject(ret);
1129
1557
  };
1130
1558
 
1131
- module.exports.__wbg_fetch_f8d735ba6fe1b719 = function (arg0) {
1132
- const ret = fetch(getObject(arg0));
1559
+ module.exports.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
1560
+ const ret = getObject(arg1).url;
1561
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1562
+ const len1 = WASM_VECTOR_LEN;
1563
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1564
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1565
+ };
1566
+
1567
+ module.exports.__wbg_value_cd1ffa7b1ab794f1 = function (arg0) {
1568
+ const ret = getObject(arg0).value;
1133
1569
  return addHeapObject(ret);
1134
1570
  };
1135
1571
 
1136
- module.exports.__wbg_fetch_1fdc4448ed9eec00 = function (arg0, arg1) {
1137
- const ret = getObject(arg0).fetch(getObject(arg1));
1572
+ module.exports.__wbg_versions_c71aa1626a93e0a1 = function (arg0) {
1573
+ const ret = getObject(arg0).versions;
1138
1574
  return addHeapObject(ret);
1139
1575
  };
1140
1576
 
1141
- module.exports.__wbg_new_75169ae5a9683c55 = function () {
1142
- return handleError(function () {
1143
- const ret = new AbortController();
1144
- return addHeapObject(ret);
1145
- }, arguments);
1577
+ module.exports.__wbg_warn_aaf1f4664a035bd6 = function (arg0, arg1, arg2, arg3) {
1578
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1579
+ };
1580
+
1581
+ module.exports.__wbindgen_as_number = function (arg0) {
1582
+ const ret = +getObject(arg0);
1583
+ return ret;
1146
1584
  };
1147
1585
 
1148
1586
  module.exports.__wbindgen_boolean_get = function (arg0) {
@@ -1151,19 +1589,19 @@ module.exports.__wbindgen_boolean_get = function (arg0) {
1151
1589
  return ret;
1152
1590
  };
1153
1591
 
1154
- module.exports.__wbindgen_number_get = function (arg0, arg1) {
1155
- const obj = getObject(arg1);
1156
- const ret = typeof obj === "number" ? obj : undefined;
1157
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1158
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1592
+ module.exports.__wbindgen_cb_drop = function (arg0) {
1593
+ const obj = takeObject(arg0).original;
1594
+ if (obj.cnt-- == 1) {
1595
+ obj.a = 0;
1596
+ return true;
1597
+ }
1598
+ const ret = false;
1599
+ return ret;
1159
1600
  };
1160
1601
 
1161
- module.exports.__wbg_String_b9412f8799faab3e = function (arg0, arg1) {
1162
- const ret = String(getObject(arg1));
1163
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1164
- const len1 = WASM_VECTOR_LEN;
1165
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1166
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1602
+ module.exports.__wbindgen_closure_wrapper2148 = function (arg0, arg1, arg2) {
1603
+ const ret = makeMutClosure(arg0, arg1, 548, __wbg_adapter_40);
1604
+ return addHeapObject(ret);
1167
1605
  };
1168
1606
 
1169
1607
  module.exports.__wbindgen_debug_string = function (arg0, arg1) {
@@ -1174,51 +1612,88 @@ module.exports.__wbindgen_debug_string = function (arg0, arg1) {
1174
1612
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1175
1613
  };
1176
1614
 
1177
- module.exports.__wbindgen_throw = function (arg0, arg1) {
1178
- throw new Error(getStringFromWasm0(arg0, arg1));
1615
+ module.exports.__wbindgen_error_new = function (arg0, arg1) {
1616
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1617
+ return addHeapObject(ret);
1179
1618
  };
1180
1619
 
1181
- module.exports.__wbg_queueMicrotask_848aa4969108a57e = function (arg0) {
1182
- const ret = getObject(arg0).queueMicrotask;
1183
- return addHeapObject(ret);
1620
+ module.exports.__wbindgen_in = function (arg0, arg1) {
1621
+ const ret = getObject(arg0) in getObject(arg1);
1622
+ return ret;
1184
1623
  };
1185
1624
 
1186
- module.exports.__wbg_queueMicrotask_c5419c06eab41e73 = function (arg0) {
1187
- queueMicrotask(getObject(arg0));
1625
+ module.exports.__wbindgen_is_function = function (arg0) {
1626
+ const ret = typeof getObject(arg0) === "function";
1627
+ return ret;
1188
1628
  };
1189
1629
 
1190
- module.exports.__wbg_newwithstrandinit_4b92c89af0a8e383 = function () {
1191
- return handleError(function (arg0, arg1, arg2) {
1192
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1193
- return addHeapObject(ret);
1194
- }, arguments);
1630
+ module.exports.__wbindgen_is_object = function (arg0) {
1631
+ const val = getObject(arg0);
1632
+ const ret = typeof val === "object" && val !== null;
1633
+ return ret;
1195
1634
  };
1196
1635
 
1197
- module.exports.__wbg_debug_a0b6c2c5ac9a4bfd = function (arg0, arg1, arg2, arg3) {
1198
- console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1636
+ module.exports.__wbindgen_is_string = function (arg0) {
1637
+ const ret = typeof getObject(arg0) === "string";
1638
+ return ret;
1199
1639
  };
1200
1640
 
1201
- module.exports.__wbg_error_4d17c5bb1ca90c94 = function (arg0, arg1, arg2, arg3) {
1202
- console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1641
+ module.exports.__wbindgen_is_undefined = function (arg0) {
1642
+ const ret = getObject(arg0) === undefined;
1643
+ return ret;
1203
1644
  };
1204
1645
 
1205
- module.exports.__wbg_info_1c7fba7da21072d1 = function (arg0, arg1, arg2, arg3) {
1206
- console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1646
+ module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
1647
+ const ret = getObject(arg0) == getObject(arg1);
1648
+ return ret;
1207
1649
  };
1208
1650
 
1209
- module.exports.__wbg_log_4de37a0274d94769 = function (arg0, arg1, arg2, arg3) {
1210
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1651
+ module.exports.__wbindgen_memory = function () {
1652
+ const ret = wasm.memory;
1653
+ return addHeapObject(ret);
1211
1654
  };
1212
1655
 
1213
- module.exports.__wbg_warn_2e2787d40aad9a81 = function (arg0, arg1, arg2, arg3) {
1214
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1656
+ module.exports.__wbindgen_number_get = function (arg0, arg1) {
1657
+ const obj = getObject(arg1);
1658
+ const ret = typeof obj === "number" ? obj : undefined;
1659
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1660
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1661
+ };
1662
+
1663
+ module.exports.__wbindgen_number_new = function (arg0) {
1664
+ const ret = arg0;
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);
1215
1675
  };
1216
1676
 
1217
- module.exports.__wbindgen_closure_wrapper1799 = function (arg0, arg1, arg2) {
1218
- const ret = makeMutClosure(arg0, arg1, 491, __wbg_adapter_38);
1677
+ module.exports.__wbindgen_string_get = function (arg0, arg1) {
1678
+ const obj = getObject(arg1);
1679
+ const ret = typeof obj === "string" ? obj : undefined;
1680
+ var ptr1 = isLikeNone(ret)
1681
+ ? 0
1682
+ : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1683
+ var len1 = WASM_VECTOR_LEN;
1684
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1685
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1686
+ };
1687
+
1688
+ module.exports.__wbindgen_string_new = function (arg0, arg1) {
1689
+ const ret = getStringFromWasm0(arg0, arg1);
1219
1690
  return addHeapObject(ret);
1220
1691
  };
1221
1692
 
1693
+ module.exports.__wbindgen_throw = function (arg0, arg1) {
1694
+ throw new Error(getStringFromWasm0(arg0, arg1));
1695
+ };
1696
+
1222
1697
  const path = require("path").join(__dirname, "bitwarden_wasm_internal_bg.wasm");
1223
1698
  const bytes = require("fs").readFileSync(path);
1224
1699