@bitwarden/sdk-internal 0.2.0-main.10 → 0.2.0-main.100

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,11 +1,9 @@
1
1
  let imports = {};
2
2
  imports["__wbindgen_placeholder__"] = module.exports;
3
3
  let wasm;
4
- const { TextDecoder, TextEncoder } = require(`util`);
4
+ const { TextEncoder, TextDecoder } = require(`util`);
5
5
 
6
- let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
7
-
8
- cachedTextDecoder.decode();
6
+ let WASM_VECTOR_LEN = 0;
9
7
 
10
8
  let cachedUint8ArrayMemory0 = null;
11
9
 
@@ -16,44 +14,6 @@ function getUint8ArrayMemory0() {
16
14
  return cachedUint8ArrayMemory0;
17
15
  }
18
16
 
19
- function getStringFromWasm0(ptr, len) {
20
- ptr = ptr >>> 0;
21
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
22
- }
23
-
24
- const heap = new Array(128).fill(undefined);
25
-
26
- heap.push(undefined, null, true, false);
27
-
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
- function getObject(idx) {
40
- return heap[idx];
41
- }
42
-
43
- function dropObject(idx) {
44
- if (idx < 132) return;
45
- heap[idx] = heap_next;
46
- heap_next = idx;
47
- }
48
-
49
- function takeObject(idx) {
50
- const ret = getObject(idx);
51
- dropObject(idx);
52
- return ret;
53
- }
54
-
55
- let WASM_VECTOR_LEN = 0;
56
-
57
17
  let cachedTextEncoder = new TextEncoder("utf-8");
58
18
 
59
19
  const encodeString =
@@ -110,10 +70,6 @@ function passStringToWasm0(arg, malloc, realloc) {
110
70
  return ptr;
111
71
  }
112
72
 
113
- function isLikeNone(x) {
114
- return x === undefined || x === null;
115
- }
116
-
117
73
  let cachedDataViewMemory0 = null;
118
74
 
119
75
  function getDataViewMemory0() {
@@ -128,6 +84,66 @@ function getDataViewMemory0() {
128
84
  return cachedDataViewMemory0;
129
85
  }
130
86
 
87
+ let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
88
+
89
+ cachedTextDecoder.decode();
90
+
91
+ function getStringFromWasm0(ptr, len) {
92
+ ptr = ptr >>> 0;
93
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
94
+ }
95
+
96
+ function addToExternrefTable0(obj) {
97
+ const idx = wasm.__externref_table_alloc();
98
+ wasm.__wbindgen_export_4.set(idx, obj);
99
+ return idx;
100
+ }
101
+
102
+ function handleError(f, args) {
103
+ try {
104
+ return f.apply(this, args);
105
+ } catch (e) {
106
+ const idx = addToExternrefTable0(e);
107
+ wasm.__wbindgen_exn_store(idx);
108
+ }
109
+ }
110
+
111
+ function isLikeNone(x) {
112
+ return x === undefined || x === null;
113
+ }
114
+
115
+ const CLOSURE_DTORS =
116
+ typeof FinalizationRegistry === "undefined"
117
+ ? { register: () => {}, unregister: () => {} }
118
+ : new FinalizationRegistry((state) => {
119
+ wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
120
+ });
121
+
122
+ function makeMutClosure(arg0, arg1, dtor, f) {
123
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
124
+ const real = (...args) => {
125
+ // First up with a closure we increment the internal reference
126
+ // count. This ensures that the Rust closure environment won't
127
+ // be deallocated while we're invoking it.
128
+ state.cnt++;
129
+ const a = state.a;
130
+ state.a = 0;
131
+ try {
132
+ return f(a, state.b, ...args);
133
+ } finally {
134
+ if (--state.cnt === 0) {
135
+ wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
136
+ CLOSURE_DTORS.unregister(state);
137
+ } else {
138
+ state.a = a;
139
+ }
140
+ }
141
+ };
142
+ real.original = state;
143
+ CLOSURE_DTORS.register(real, state, state);
144
+ return real;
145
+ }
146
+
131
147
  function debugString(val) {
132
148
  // primitive types
133
149
  const type = typeof val;
@@ -169,7 +185,7 @@ function debugString(val) {
169
185
  // Test for built-in
170
186
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
171
187
  let className;
172
- if (builtInMatches.length > 1) {
188
+ if (builtInMatches && builtInMatches.length > 1) {
173
189
  className = builtInMatches[1];
174
190
  } else {
175
191
  // Failed to match the standard '[object ClassName]'
@@ -192,141 +208,173 @@ function debugString(val) {
192
208
  // TODO we could test for more things here, like `Set`s and `Map`s.
193
209
  return className;
194
210
  }
211
+ /**
212
+ * @param {any} error
213
+ * @returns {boolean}
214
+ */
215
+ module.exports.isEncryptionSettingsError = function (error) {
216
+ const ret = wasm.isEncryptionSettingsError(error);
217
+ return ret !== 0;
218
+ };
195
219
 
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
- });
220
+ /**
221
+ * @param {any} error
222
+ * @returns {boolean}
223
+ */
224
+ module.exports.isCryptoError = function (error) {
225
+ const ret = wasm.isCryptoError(error);
226
+ return ret !== 0;
227
+ };
202
228
 
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
- }
229
+ /**
230
+ * @param {any} error
231
+ * @returns {boolean}
232
+ */
233
+ module.exports.isSshKeyExportError = function (error) {
234
+ const ret = wasm.isSshKeyExportError(error);
235
+ return ret !== 0;
236
+ };
237
+
238
+ /**
239
+ * @param {any} error
240
+ * @returns {boolean}
241
+ */
242
+ module.exports.isSshKeyImportError = function (error) {
243
+ const ret = wasm.isSshKeyImportError(error);
244
+ return ret !== 0;
245
+ };
234
246
 
235
- let stack_pointer = 128;
247
+ /**
248
+ * @param {any} error
249
+ * @returns {boolean}
250
+ */
251
+ module.exports.isKeyGenerationError = function (error) {
252
+ const ret = wasm.isKeyGenerationError(error);
253
+ return ret !== 0;
254
+ };
236
255
 
237
- function addBorrowedObject(obj) {
238
- if (stack_pointer == 1) throw new Error("out of js stack");
239
- heap[--stack_pointer] = obj;
240
- return stack_pointer;
241
- }
242
256
  /**
243
257
  * @param {any} error
244
258
  * @returns {boolean}
245
259
  */
246
- module.exports.isCoreError = function (error) {
247
- try {
248
- const ret = wasm.isCoreError(addBorrowedObject(error));
249
- return ret !== 0;
250
- } finally {
251
- heap[stack_pointer++] = undefined;
252
- }
260
+ module.exports.isDecryptFileError = function (error) {
261
+ const ret = wasm.isDecryptFileError(error);
262
+ return ret !== 0;
253
263
  };
254
264
 
255
265
  /**
256
266
  * @param {any} error
257
267
  * @returns {boolean}
258
268
  */
259
- module.exports.isEncryptionSettingsError = function (error) {
260
- try {
261
- const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
262
- return ret !== 0;
263
- } finally {
264
- heap[stack_pointer++] = undefined;
265
- }
269
+ module.exports.isEncryptFileError = function (error) {
270
+ const ret = wasm.isEncryptFileError(error);
271
+ return ret !== 0;
266
272
  };
267
273
 
268
274
  /**
269
275
  * @param {any} error
270
276
  * @returns {boolean}
271
277
  */
272
- module.exports.isKeyGenerationError = function (error) {
273
- try {
274
- const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
275
- return ret !== 0;
276
- } finally {
277
- heap[stack_pointer++] = undefined;
278
- }
278
+ module.exports.isDecryptError = function (error) {
279
+ const ret = wasm.isDecryptError(error);
280
+ return ret !== 0;
279
281
  };
280
282
 
281
283
  /**
282
284
  * @param {any} error
283
285
  * @returns {boolean}
284
286
  */
285
- module.exports.isTestError = function (error) {
286
- try {
287
- const ret = wasm.isTestError(addBorrowedObject(error));
288
- return ret !== 0;
289
- } finally {
290
- heap[stack_pointer++] = undefined;
291
- }
287
+ module.exports.isEncryptError = function (error) {
288
+ const ret = wasm.isEncryptError(error);
289
+ return ret !== 0;
290
+ };
291
+
292
+ /**
293
+ * @param {any} error
294
+ * @returns {boolean}
295
+ */
296
+ module.exports.isTotpError = function (error) {
297
+ const ret = wasm.isTotpError(error);
298
+ return ret !== 0;
292
299
  };
293
300
 
301
+ function takeFromExternrefTable0(idx) {
302
+ const value = wasm.__wbindgen_export_4.get(idx);
303
+ wasm.__externref_table_dealloc(idx);
304
+ return value;
305
+ }
294
306
  /**
307
+ * Generate a new SSH key pair
308
+ *
309
+ * # Arguments
310
+ * - `key_algorithm` - The algorithm to use for the key pair
311
+ *
312
+ * # Returns
313
+ * - `Ok(SshKey)` if the key was successfully generated
314
+ * - `Err(KeyGenerationError)` if the key could not be generated
295
315
  * @param {KeyAlgorithm} key_algorithm
296
- * @returns {GenerateSshKeyResult}
316
+ * @returns {SshKeyView}
297
317
  */
298
318
  module.exports.generate_ssh_key = function (key_algorithm) {
299
- try {
300
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
301
- wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
302
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
303
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
304
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
305
- if (r2) {
306
- throw takeObject(r1);
307
- }
308
- return takeObject(r0);
309
- } finally {
310
- wasm.__wbindgen_add_to_stack_pointer(16);
319
+ const ret = wasm.generate_ssh_key(key_algorithm);
320
+ if (ret[2]) {
321
+ throw takeFromExternrefTable0(ret[1]);
311
322
  }
323
+ return takeFromExternrefTable0(ret[0]);
312
324
  };
313
325
 
314
- function handleError(f, args) {
315
- try {
316
- return f.apply(this, args);
317
- } catch (e) {
318
- wasm.__wbindgen_exn_store(addHeapObject(e));
326
+ /**
327
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
328
+ * to an OpenSSH private key with public key and fingerprint
329
+ *
330
+ * # Arguments
331
+ * - `imported_key` - The private key to convert
332
+ * - `password` - The password to use for decrypting the key
333
+ *
334
+ * # Returns
335
+ * - `Ok(SshKey)` if the key was successfully coneverted
336
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
337
+ * - `Err(WrongPassword)` if the password provided is incorrect
338
+ * - `Err(ParsingError)` if the key could not be parsed
339
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
340
+ * @param {string} imported_key
341
+ * @param {string | null} [password]
342
+ * @returns {SshKeyView}
343
+ */
344
+ module.exports.import_ssh_key = function (imported_key, password) {
345
+ const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
346
+ const len0 = WASM_VECTOR_LEN;
347
+ var ptr1 = isLikeNone(password)
348
+ ? 0
349
+ : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
350
+ var len1 = WASM_VECTOR_LEN;
351
+ const ret = wasm.import_ssh_key(ptr0, len0, ptr1, len1);
352
+ if (ret[2]) {
353
+ throw takeFromExternrefTable0(ret[1]);
319
354
  }
355
+ return takeFromExternrefTable0(ret[0]);
356
+ };
357
+
358
+ /**
359
+ * @param {any} error
360
+ * @returns {boolean}
361
+ */
362
+ module.exports.isTestError = function (error) {
363
+ const ret = wasm.isTestError(error);
364
+ return ret !== 0;
365
+ };
366
+
367
+ function __wbg_adapter_42(arg0, arg1, arg2) {
368
+ wasm.closure605_externref_shim(arg0, arg1, arg2);
320
369
  }
321
- function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
322
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h7363c1bfa226a55d(
323
- arg0,
324
- arg1,
325
- addHeapObject(arg2),
326
- addHeapObject(arg3),
327
- );
370
+
371
+ function __wbg_adapter_145(arg0, arg1, arg2, arg3) {
372
+ wasm.closure453_externref_shim(arg0, arg1, arg2, arg3);
328
373
  }
329
374
 
375
+ /**
376
+ * @enum {0 | 1 | 2 | 3 | 4}
377
+ */
330
378
  module.exports.LogLevel = Object.freeze({
331
379
  Trace: 0,
332
380
  0: "Trace",
@@ -362,12 +410,12 @@ class BitwardenClient {
362
410
  wasm.__wbg_bitwardenclient_free(ptr, 0);
363
411
  }
364
412
  /**
365
- * @param {ClientSettings | undefined} [settings]
366
- * @param {LogLevel | undefined} [log_level]
413
+ * @param {ClientSettings | null} [settings]
414
+ * @param {LogLevel | null} [log_level]
367
415
  */
368
416
  constructor(settings, log_level) {
369
417
  const ret = wasm.bitwardenclient_new(
370
- isLikeNone(settings) ? 0 : addHeapObject(settings),
418
+ isLikeNone(settings) ? 0 : addToExternrefTable0(settings),
371
419
  isLikeNone(log_level) ? 5 : log_level,
372
420
  );
373
421
  this.__wbg_ptr = ret >>> 0;
@@ -383,17 +431,13 @@ class BitwardenClient {
383
431
  let deferred2_0;
384
432
  let deferred2_1;
385
433
  try {
386
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
387
434
  const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
388
435
  const len0 = WASM_VECTOR_LEN;
389
- wasm.bitwardenclient_echo(retptr, this.__wbg_ptr, ptr0, len0);
390
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
391
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
392
- deferred2_0 = r0;
393
- deferred2_1 = r1;
394
- return getStringFromWasm0(r0, r1);
436
+ const ret = wasm.bitwardenclient_echo(this.__wbg_ptr, ptr0, len0);
437
+ deferred2_0 = ret[0];
438
+ deferred2_1 = ret[1];
439
+ return getStringFromWasm0(ret[0], ret[1]);
395
440
  } finally {
396
- wasm.__wbindgen_add_to_stack_pointer(16);
397
441
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
398
442
  }
399
443
  }
@@ -404,27 +448,24 @@ class BitwardenClient {
404
448
  let deferred1_0;
405
449
  let deferred1_1;
406
450
  try {
407
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
408
- wasm.bitwardenclient_version(retptr, this.__wbg_ptr);
409
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
410
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
411
- deferred1_0 = r0;
412
- deferred1_1 = r1;
413
- return getStringFromWasm0(r0, r1);
451
+ const ret = wasm.bitwardenclient_version(this.__wbg_ptr);
452
+ deferred1_0 = ret[0];
453
+ deferred1_1 = ret[1];
454
+ return getStringFromWasm0(ret[0], ret[1]);
414
455
  } finally {
415
- wasm.__wbindgen_add_to_stack_pointer(16);
416
456
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
417
457
  }
418
458
  }
419
459
  /**
420
460
  * @param {string} msg
421
- * @returns {Promise<void>}
422
461
  */
423
462
  throw(msg) {
424
463
  const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
425
464
  const len0 = WASM_VECTOR_LEN;
426
465
  const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
427
- return takeObject(ret);
466
+ if (ret[1]) {
467
+ throw takeFromExternrefTable0(ret[0]);
468
+ }
428
469
  }
429
470
  /**
430
471
  * Test method, calls http endpoint
@@ -435,327 +476,392 @@ class BitwardenClient {
435
476
  const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
436
477
  const len0 = WASM_VECTOR_LEN;
437
478
  const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
438
- return takeObject(ret);
479
+ return ret;
439
480
  }
440
481
  /**
441
- * @returns {ClientCrypto}
482
+ * @returns {CryptoClient}
442
483
  */
443
484
  crypto() {
444
485
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
445
- return ClientCrypto.__wrap(ret);
486
+ return CryptoClient.__wrap(ret);
446
487
  }
447
488
  /**
448
- * @returns {ClientVault}
489
+ * @returns {VaultClient}
449
490
  */
450
491
  vault() {
451
492
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
452
- return ClientVault.__wrap(ret);
493
+ return VaultClient.__wrap(ret);
453
494
  }
454
495
  }
455
496
  module.exports.BitwardenClient = BitwardenClient;
456
497
 
457
- const ClientCryptoFinalization =
498
+ const ClientFoldersFinalization =
458
499
  typeof FinalizationRegistry === "undefined"
459
500
  ? { register: () => {}, unregister: () => {} }
460
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientcrypto_free(ptr >>> 0, 1));
501
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
461
502
 
462
- class ClientCrypto {
503
+ class ClientFolders {
463
504
  static __wrap(ptr) {
464
505
  ptr = ptr >>> 0;
465
- const obj = Object.create(ClientCrypto.prototype);
506
+ const obj = Object.create(ClientFolders.prototype);
466
507
  obj.__wbg_ptr = ptr;
467
- ClientCryptoFinalization.register(obj, obj.__wbg_ptr, obj);
508
+ ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
468
509
  return obj;
469
510
  }
470
511
 
471
512
  __destroy_into_raw() {
472
513
  const ptr = this.__wbg_ptr;
473
514
  this.__wbg_ptr = 0;
474
- ClientCryptoFinalization.unregister(this);
515
+ ClientFoldersFinalization.unregister(this);
475
516
  return ptr;
476
517
  }
477
518
 
478
519
  free() {
479
520
  const ptr = this.__destroy_into_raw();
480
- wasm.__wbg_clientcrypto_free(ptr, 0);
481
- }
482
- /**
483
- * Initialization method for the user crypto. Needs to be called before any other crypto
484
- * operations.
485
- * @param {InitUserCryptoRequest} req
486
- * @returns {Promise<void>}
487
- */
488
- initialize_user_crypto(req) {
489
- const ret = wasm.clientcrypto_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
490
- return takeObject(ret);
521
+ wasm.__wbg_clientfolders_free(ptr, 0);
491
522
  }
492
523
  /**
493
- * Initialization method for the organization crypto. Needs to be called after
494
- * `initialize_user_crypto` but before any other crypto operations.
495
- * @param {InitOrgCryptoRequest} req
496
- * @returns {Promise<void>}
524
+ * Decrypt folder
525
+ * @param {Folder} folder
526
+ * @returns {FolderView}
497
527
  */
498
- initialize_org_crypto(req) {
499
- const ret = wasm.clientcrypto_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
500
- return takeObject(ret);
528
+ decrypt(folder) {
529
+ const ret = wasm.clientfolders_decrypt(this.__wbg_ptr, folder);
530
+ if (ret[2]) {
531
+ throw takeFromExternrefTable0(ret[1]);
532
+ }
533
+ return takeFromExternrefTable0(ret[0]);
501
534
  }
502
535
  }
503
- module.exports.ClientCrypto = ClientCrypto;
536
+ module.exports.ClientFolders = ClientFolders;
504
537
 
505
- const ClientFoldersFinalization =
538
+ const ClientTotpFinalization =
506
539
  typeof FinalizationRegistry === "undefined"
507
540
  ? { register: () => {}, unregister: () => {} }
508
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
541
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clienttotp_free(ptr >>> 0, 1));
509
542
 
510
- class ClientFolders {
543
+ class ClientTotp {
511
544
  static __wrap(ptr) {
512
545
  ptr = ptr >>> 0;
513
- const obj = Object.create(ClientFolders.prototype);
546
+ const obj = Object.create(ClientTotp.prototype);
514
547
  obj.__wbg_ptr = ptr;
515
- ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
548
+ ClientTotpFinalization.register(obj, obj.__wbg_ptr, obj);
516
549
  return obj;
517
550
  }
518
551
 
519
552
  __destroy_into_raw() {
520
553
  const ptr = this.__wbg_ptr;
521
554
  this.__wbg_ptr = 0;
522
- ClientFoldersFinalization.unregister(this);
555
+ ClientTotpFinalization.unregister(this);
523
556
  return ptr;
524
557
  }
525
558
 
526
559
  free() {
527
560
  const ptr = this.__destroy_into_raw();
528
- wasm.__wbg_clientfolders_free(ptr, 0);
561
+ wasm.__wbg_clienttotp_free(ptr, 0);
529
562
  }
530
563
  /**
531
- * Decrypt folder
532
- * @param {Folder} folder
533
- * @returns {FolderView}
564
+ * Generates a TOTP code from a provided key
565
+ *
566
+ * # Arguments
567
+ * - `key` - Can be:
568
+ * - A base32 encoded string
569
+ * - OTP Auth URI
570
+ * - Steam URI
571
+ * - `time_ms` - Optional timestamp in milliseconds
572
+ *
573
+ * # Returns
574
+ * - `Ok(TotpResponse)` containing the generated code and period
575
+ * - `Err(TotpError)` if code generation fails
576
+ * @param {string} key
577
+ * @param {number | null} [time_ms]
578
+ * @returns {TotpResponse}
534
579
  */
535
- decrypt(folder) {
536
- try {
537
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
538
- wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
539
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
540
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
541
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
542
- if (r2) {
543
- throw takeObject(r1);
544
- }
545
- return takeObject(r0);
546
- } finally {
547
- wasm.__wbindgen_add_to_stack_pointer(16);
580
+ generate_totp(key, time_ms) {
581
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
582
+ const len0 = WASM_VECTOR_LEN;
583
+ const ret = wasm.clienttotp_generate_totp(
584
+ this.__wbg_ptr,
585
+ ptr0,
586
+ len0,
587
+ !isLikeNone(time_ms),
588
+ isLikeNone(time_ms) ? 0 : time_ms,
589
+ );
590
+ if (ret[2]) {
591
+ throw takeFromExternrefTable0(ret[1]);
548
592
  }
593
+ return takeFromExternrefTable0(ret[0]);
549
594
  }
550
595
  }
551
- module.exports.ClientFolders = ClientFolders;
596
+ module.exports.ClientTotp = ClientTotp;
552
597
 
553
- const ClientVaultFinalization =
598
+ const CryptoClientFinalization =
554
599
  typeof FinalizationRegistry === "undefined"
555
600
  ? { register: () => {}, unregister: () => {} }
556
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientvault_free(ptr >>> 0, 1));
601
+ : new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
557
602
 
558
- class ClientVault {
603
+ class CryptoClient {
559
604
  static __wrap(ptr) {
560
605
  ptr = ptr >>> 0;
561
- const obj = Object.create(ClientVault.prototype);
606
+ const obj = Object.create(CryptoClient.prototype);
562
607
  obj.__wbg_ptr = ptr;
563
- ClientVaultFinalization.register(obj, obj.__wbg_ptr, obj);
608
+ CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
564
609
  return obj;
565
610
  }
566
611
 
567
612
  __destroy_into_raw() {
568
613
  const ptr = this.__wbg_ptr;
569
614
  this.__wbg_ptr = 0;
570
- ClientVaultFinalization.unregister(this);
615
+ CryptoClientFinalization.unregister(this);
571
616
  return ptr;
572
617
  }
573
618
 
574
619
  free() {
575
620
  const ptr = this.__destroy_into_raw();
576
- wasm.__wbg_clientvault_free(ptr, 0);
621
+ wasm.__wbg_cryptoclient_free(ptr, 0);
577
622
  }
578
623
  /**
579
- * @returns {ClientFolders}
624
+ * Initialization method for the user crypto. Needs to be called before any other crypto
625
+ * operations.
626
+ * @param {InitUserCryptoRequest} req
627
+ * @returns {Promise<void>}
580
628
  */
581
- folders() {
582
- const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
583
- return ClientFolders.__wrap(ret);
584
- }
585
- }
586
- module.exports.ClientVault = ClientVault;
587
-
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);
629
+ initialize_user_crypto(req) {
630
+ const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, req);
631
+ return ret;
598
632
  }
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);
633
+ /**
634
+ * Initialization method for the organization crypto. Needs to be called after
635
+ * `initialize_user_crypto` but before any other crypto operations.
636
+ * @param {InitOrgCryptoRequest} req
637
+ * @returns {Promise<void>}
638
+ */
639
+ initialize_org_crypto(req) {
640
+ const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, req);
641
+ return ret;
610
642
  }
611
- };
643
+ /**
644
+ * Generates a new key pair and encrypts the private key with the provided user key.
645
+ * Crypto initialization not required.
646
+ * @param {string} user_key
647
+ * @returns {MakeKeyPairResponse}
648
+ */
649
+ make_key_pair(user_key) {
650
+ const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
651
+ const len0 = WASM_VECTOR_LEN;
652
+ const ret = wasm.cryptoclient_make_key_pair(this.__wbg_ptr, ptr0, len0);
653
+ if (ret[2]) {
654
+ throw takeFromExternrefTable0(ret[1]);
655
+ }
656
+ return takeFromExternrefTable0(ret[0]);
657
+ }
658
+ /**
659
+ * Verifies a user's asymmetric keys by decrypting the private key with the provided user
660
+ * key. Returns if the private key is decryptable and if it is a valid matching key.
661
+ * Crypto initialization not required.
662
+ * @param {VerifyAsymmetricKeysRequest} request
663
+ * @returns {VerifyAsymmetricKeysResponse}
664
+ */
665
+ verify_asymmetric_keys(request) {
666
+ const ret = wasm.cryptoclient_verify_asymmetric_keys(this.__wbg_ptr, request);
667
+ if (ret[2]) {
668
+ throw takeFromExternrefTable0(ret[1]);
669
+ }
670
+ return takeFromExternrefTable0(ret[0]);
671
+ }
672
+ }
673
+ module.exports.CryptoClient = CryptoClient;
612
674
 
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);
675
+ const VaultClientFinalization =
676
+ typeof FinalizationRegistry === "undefined"
677
+ ? { register: () => {}, unregister: () => {} }
678
+ : new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
679
+
680
+ class VaultClient {
681
+ static __wrap(ptr) {
682
+ ptr = ptr >>> 0;
683
+ const obj = Object.create(VaultClient.prototype);
684
+ obj.__wbg_ptr = ptr;
685
+ VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
686
+ return obj;
687
+ }
688
+
689
+ __destroy_into_raw() {
690
+ const ptr = this.__wbg_ptr;
691
+ this.__wbg_ptr = 0;
692
+ VaultClientFinalization.unregister(this);
693
+ return ptr;
694
+ }
695
+
696
+ free() {
697
+ const ptr = this.__destroy_into_raw();
698
+ wasm.__wbg_vaultclient_free(ptr, 0);
622
699
  }
700
+ /**
701
+ * @returns {ClientFolders}
702
+ */
703
+ folders() {
704
+ const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
705
+ return ClientFolders.__wrap(ret);
706
+ }
707
+ /**
708
+ * @returns {ClientTotp}
709
+ */
710
+ totp() {
711
+ const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
712
+ return ClientTotp.__wrap(ret);
713
+ }
714
+ }
715
+ module.exports.VaultClient = VaultClient;
716
+
717
+ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
718
+ const ret = String(arg1);
719
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
720
+ const len1 = WASM_VECTOR_LEN;
721
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
722
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
623
723
  };
624
724
 
625
- module.exports.__wbindgen_string_new = function (arg0, arg1) {
626
- const ret = getStringFromWasm0(arg0, arg1);
627
- return addHeapObject(ret);
725
+ module.exports.__wbg_abort_775ef1d17fc65868 = function (arg0) {
726
+ arg0.abort();
628
727
  };
629
728
 
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);
729
+ module.exports.__wbg_append_299d5d48292c0495 = function () {
730
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
731
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
634
732
  }, arguments);
635
733
  };
636
734
 
637
- module.exports.__wbindgen_object_drop_ref = function (arg0) {
638
- takeObject(arg0);
735
+ module.exports.__wbg_append_8c7dd8d641a5f01b = function () {
736
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
737
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
738
+ }, arguments);
639
739
  };
640
740
 
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);
741
+ module.exports.__wbg_append_b2d1fc16de2a0e81 = function () {
742
+ return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
743
+ arg0.append(getStringFromWasm0(arg1, arg2), arg3, getStringFromWasm0(arg4, arg5));
744
+ }, arguments);
650
745
  };
651
746
 
652
- module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
653
- const ret = getObject(arg0) == getObject(arg1);
654
- return ret;
747
+ module.exports.__wbg_append_b44785ebeb668479 = function () {
748
+ return handleError(function (arg0, arg1, arg2, arg3) {
749
+ arg0.append(getStringFromWasm0(arg1, arg2), arg3);
750
+ }, arguments);
655
751
  };
656
752
 
657
- module.exports.__wbindgen_is_object = function (arg0) {
658
- const val = getObject(arg0);
659
- const ret = typeof val === "object" && val !== null;
753
+ module.exports.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
754
+ const ret = arg0.buffer;
660
755
  return ret;
661
756
  };
662
757
 
663
- module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function (arg0, arg1) {
664
- const ret = getObject(arg0)[getObject(arg1)];
665
- return addHeapObject(ret);
758
+ module.exports.__wbg_call_672a4d21634d4a24 = function () {
759
+ return handleError(function (arg0, arg1) {
760
+ const ret = arg0.call(arg1);
761
+ return ret;
762
+ }, arguments);
666
763
  };
667
764
 
668
- module.exports.__wbindgen_is_undefined = function (arg0) {
669
- const ret = getObject(arg0) === undefined;
670
- return ret;
765
+ module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
766
+ return handleError(function (arg0, arg1, arg2) {
767
+ const ret = arg0.call(arg1, arg2);
768
+ return ret;
769
+ }, arguments);
671
770
  };
672
771
 
673
- module.exports.__wbindgen_in = function (arg0, arg1) {
674
- const ret = getObject(arg0) in getObject(arg1);
772
+ module.exports.__wbg_crypto_ed58b8e10a292839 = function (arg0) {
773
+ const ret = arg0.crypto;
675
774
  return ret;
676
775
  };
677
776
 
678
- module.exports.__wbg_isSafeInteger_b9dff570f01a9100 = function (arg0) {
679
- const ret = Number.isSafeInteger(getObject(arg0));
680
- return ret;
777
+ module.exports.__wbg_debug_e17b51583ca6a632 = function (arg0, arg1, arg2, arg3) {
778
+ console.debug(arg0, arg1, arg2, arg3);
681
779
  };
682
780
 
683
- module.exports.__wbindgen_as_number = function (arg0) {
684
- const ret = +getObject(arg0);
781
+ module.exports.__wbg_done_769e5ede4b31c67b = function (arg0) {
782
+ const ret = arg0.done;
685
783
  return ret;
686
784
  };
687
785
 
688
- module.exports.__wbindgen_is_string = function (arg0) {
689
- const ret = typeof getObject(arg0) === "string";
786
+ module.exports.__wbg_entries_3265d4158b33e5dc = function (arg0) {
787
+ const ret = Object.entries(arg0);
690
788
  return ret;
691
789
  };
692
790
 
693
- module.exports.__wbg_entries_c02034de337d3ee2 = function (arg0) {
694
- const ret = Object.entries(getObject(arg0));
695
- return addHeapObject(ret);
696
- };
697
-
698
- module.exports.__wbg_length_f217bbbf7e8e4df4 = function (arg0) {
699
- const ret = getObject(arg0).length;
700
- return ret;
791
+ module.exports.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
792
+ let deferred0_0;
793
+ let deferred0_1;
794
+ try {
795
+ deferred0_0 = arg0;
796
+ deferred0_1 = arg1;
797
+ console.error(getStringFromWasm0(arg0, arg1));
798
+ } finally {
799
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
800
+ }
701
801
  };
702
802
 
703
- module.exports.__wbg_get_5419cf6b954aa11d = function (arg0, arg1) {
704
- const ret = getObject(arg0)[arg1 >>> 0];
705
- return addHeapObject(ret);
803
+ module.exports.__wbg_error_80de38b3f7cc3c3c = function (arg0, arg1, arg2, arg3) {
804
+ console.error(arg0, arg1, arg2, arg3);
706
805
  };
707
806
 
708
- module.exports.__wbg_new_e69b5f66fda8f13c = function () {
709
- const ret = new Object();
710
- return addHeapObject(ret);
807
+ module.exports.__wbg_fetch_4465c2b10f21a927 = function (arg0) {
808
+ const ret = fetch(arg0);
809
+ return ret;
711
810
  };
712
811
 
713
- module.exports.__wbg_setmethod_ce2da76000b02f6a = function (arg0, arg1, arg2) {
714
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
812
+ module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
813
+ const ret = arg0.fetch(arg1);
814
+ return ret;
715
815
  };
716
816
 
717
- module.exports.__wbg_new_a9ae04a5200606a5 = function () {
718
- return handleError(function () {
719
- const ret = new Headers();
720
- return addHeapObject(ret);
817
+ module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function () {
818
+ return handleError(function (arg0, arg1) {
819
+ arg0.getRandomValues(arg1);
721
820
  }, arguments);
722
821
  };
723
822
 
724
- module.exports.__wbg_setheaders_f5205d36e423a544 = function (arg0, arg1) {
725
- getObject(arg0).headers = getObject(arg1);
823
+ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
824
+ const ret = arg0.getTime();
825
+ return ret;
726
826
  };
727
827
 
728
- module.exports.__wbg_setmode_4919fd636102c586 = function (arg0, arg1) {
729
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
828
+ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
829
+ return handleError(function (arg0, arg1) {
830
+ const ret = Reflect.get(arg0, arg1);
831
+ return ret;
832
+ }, arguments);
730
833
  };
731
834
 
732
- module.exports.__wbg_setcredentials_a4e661320cdb9738 = function (arg0, arg1) {
733
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
835
+ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
836
+ const ret = arg0[arg1 >>> 0];
837
+ return ret;
734
838
  };
735
839
 
736
- module.exports.__wbg_setbody_aa8b691bec428bf4 = function (arg0, arg1) {
737
- getObject(arg0).body = getObject(arg1);
840
+ module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function (arg0, arg1) {
841
+ const ret = arg0[arg1];
842
+ return ret;
738
843
  };
739
844
 
740
- module.exports.__wbg_signal_9acfcec9e7dffc22 = function (arg0) {
741
- const ret = getObject(arg0).signal;
742
- return addHeapObject(ret);
845
+ module.exports.__wbg_has_a5ea9117f258a0ec = function () {
846
+ return handleError(function (arg0, arg1) {
847
+ const ret = Reflect.has(arg0, arg1);
848
+ return ret;
849
+ }, arguments);
743
850
  };
744
851
 
745
- module.exports.__wbg_setsignal_812ccb8269a7fd90 = function (arg0, arg1) {
746
- getObject(arg0).signal = getObject(arg1);
852
+ module.exports.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
853
+ const ret = arg0.headers;
854
+ return ret;
747
855
  };
748
856
 
749
- module.exports.__wbg_append_8b3e7f74a47ea7d5 = function () {
750
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
751
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
752
- }, arguments);
857
+ module.exports.__wbg_info_033d8b8a0838f1d3 = function (arg0, arg1, arg2, arg3) {
858
+ console.info(arg0, arg1, arg2, arg3);
753
859
  };
754
860
 
755
- module.exports.__wbg_instanceof_Response_3c0e210a57ff751d = function (arg0) {
861
+ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function (arg0) {
756
862
  let result;
757
863
  try {
758
- result = getObject(arg0) instanceof Response;
864
+ result = arg0 instanceof ArrayBuffer;
759
865
  } catch (_) {
760
866
  result = false;
761
867
  }
@@ -763,460 +869,487 @@ module.exports.__wbg_instanceof_Response_3c0e210a57ff751d = function (arg0) {
763
869
  return ret;
764
870
  };
765
871
 
766
- module.exports.__wbg_status_5f4e900d22140a18 = function (arg0) {
767
- const ret = getObject(arg0).status;
872
+ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
873
+ let result;
874
+ try {
875
+ result = arg0 instanceof Response;
876
+ } catch (_) {
877
+ result = false;
878
+ }
879
+ const ret = result;
768
880
  return ret;
769
881
  };
770
882
 
771
- module.exports.__wbg_url_58af972663531d16 = function (arg0, arg1) {
772
- const ret = getObject(arg1).url;
773
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
774
- const len1 = WASM_VECTOR_LEN;
775
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
776
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
777
- };
778
-
779
- module.exports.__wbg_headers_1b9bf90c73fae600 = function (arg0) {
780
- const ret = getObject(arg0).headers;
781
- return addHeapObject(ret);
782
- };
783
-
784
- module.exports.__wbg_next_b06e115d1b01e10b = function () {
785
- return handleError(function (arg0) {
786
- const ret = getObject(arg0).next();
787
- return addHeapObject(ret);
788
- }, arguments);
789
- };
790
-
791
- module.exports.__wbg_done_983b5ffcaec8c583 = function (arg0) {
792
- const ret = getObject(arg0).done;
883
+ module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function (arg0) {
884
+ let result;
885
+ try {
886
+ result = arg0 instanceof Uint8Array;
887
+ } catch (_) {
888
+ result = false;
889
+ }
890
+ const ret = result;
793
891
  return ret;
794
892
  };
795
893
 
796
- module.exports.__wbg_value_2ab8a198c834c26a = function (arg0) {
797
- const ret = getObject(arg0).value;
798
- return addHeapObject(ret);
894
+ module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function (arg0) {
895
+ const ret = Number.isSafeInteger(arg0);
896
+ return ret;
799
897
  };
800
898
 
801
- module.exports.__wbg_stringify_eead5648c09faaf8 = function () {
802
- return handleError(function (arg0) {
803
- const ret = JSON.stringify(getObject(arg0));
804
- return addHeapObject(ret);
805
- }, arguments);
899
+ module.exports.__wbg_iterator_9a24c88df860dc65 = function () {
900
+ const ret = Symbol.iterator;
901
+ return ret;
806
902
  };
807
903
 
808
- module.exports.__wbg_abort_c57daab47a6c1215 = function (arg0) {
809
- getObject(arg0).abort();
904
+ module.exports.__wbg_length_a446193dc22c12f8 = function (arg0) {
905
+ const ret = arg0.length;
906
+ return ret;
810
907
  };
811
908
 
812
- module.exports.__wbg_text_ebeee8b31af4c919 = function () {
813
- return handleError(function (arg0) {
814
- const ret = getObject(arg0).text();
815
- return addHeapObject(ret);
816
- }, arguments);
909
+ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
910
+ const ret = arg0.length;
911
+ return ret;
817
912
  };
818
913
 
819
- module.exports.__wbg_call_3bfa248576352471 = function () {
820
- return handleError(function (arg0, arg1, arg2) {
821
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
822
- return addHeapObject(ret);
823
- }, arguments);
914
+ module.exports.__wbg_log_cad59bb680daec67 = function (arg0, arg1, arg2, arg3) {
915
+ console.log(arg0, arg1, arg2, arg3);
824
916
  };
825
917
 
826
- module.exports.__wbindgen_object_clone_ref = function (arg0) {
827
- const ret = getObject(arg0);
828
- return addHeapObject(ret);
918
+ module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function (arg0) {
919
+ const ret = arg0.msCrypto;
920
+ return ret;
829
921
  };
830
922
 
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;
923
+ module.exports.__wbg_new0_f788a2397c7ca929 = function () {
924
+ const ret = new Date();
838
925
  return ret;
839
926
  };
840
927
 
841
- module.exports.__wbindgen_error_new = function (arg0, arg1) {
842
- const ret = new Error(getStringFromWasm0(arg0, arg1));
843
- return addHeapObject(ret);
928
+ module.exports.__wbg_new_018dcc2d6c8c2f6a = function () {
929
+ return handleError(function () {
930
+ const ret = new Headers();
931
+ return ret;
932
+ }, arguments);
844
933
  };
845
934
 
846
- module.exports.__wbg_new_1073970097e5a420 = function (arg0, arg1) {
935
+ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
847
936
  try {
848
937
  var state0 = { a: arg0, b: arg1 };
849
938
  var cb0 = (arg0, arg1) => {
850
939
  const a = state0.a;
851
940
  state0.a = 0;
852
941
  try {
853
- return __wbg_adapter_125(a, state0.b, arg0, arg1);
942
+ return __wbg_adapter_145(a, state0.b, arg0, arg1);
854
943
  } finally {
855
944
  state0.a = a;
856
945
  }
857
946
  };
858
947
  const ret = new Promise(cb0);
859
- return addHeapObject(ret);
948
+ return ret;
860
949
  } finally {
861
950
  state0.a = state0.b = 0;
862
951
  }
863
952
  };
864
953
 
865
- module.exports.__wbg_set_f975102236d3c502 = function (arg0, arg1, arg2) {
866
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
954
+ module.exports.__wbg_new_405e22f390576ce2 = function () {
955
+ const ret = new Object();
956
+ return ret;
957
+ };
958
+
959
+ module.exports.__wbg_new_78feb108b6472713 = function () {
960
+ const ret = new Array();
961
+ return ret;
867
962
  };
868
963
 
869
- module.exports.__wbg_new_abda76e883ba8a5f = function () {
964
+ module.exports.__wbg_new_8a6f238a6ece86ea = function () {
870
965
  const ret = new Error();
871
- return addHeapObject(ret);
966
+ return ret;
872
967
  };
873
968
 
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);
969
+ module.exports.__wbg_new_9fd39a253424609a = function () {
970
+ return handleError(function () {
971
+ const ret = new FormData();
972
+ return ret;
973
+ }, arguments);
880
974
  };
881
975
 
882
- module.exports.__wbg_error_f851667af71bcfc6 = function (arg0, arg1) {
976
+ module.exports.__wbg_new_a12002a7f91c75be = function (arg0) {
977
+ const ret = new Uint8Array(arg0);
978
+ return ret;
979
+ };
980
+
981
+ module.exports.__wbg_new_c68d7209be747379 = function (arg0, arg1) {
982
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
983
+ return ret;
984
+ };
985
+
986
+ module.exports.__wbg_new_e25e5aab09ff45db = function () {
987
+ return handleError(function () {
988
+ const ret = new AbortController();
989
+ return ret;
990
+ }, arguments);
991
+ };
992
+
993
+ module.exports.__wbg_new_f24b6d53abe5bc82 = function (arg0, arg1) {
883
994
  let deferred0_0;
884
995
  let deferred0_1;
885
996
  try {
886
997
  deferred0_0 = arg0;
887
998
  deferred0_1 = arg1;
888
- console.error(getStringFromWasm0(arg0, arg1));
999
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1000
+ return ret;
889
1001
  } finally {
890
1002
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
891
1003
  }
892
1004
  };
893
1005
 
894
- module.exports.__wbg_crypto_1d1f22824a6a080c = function (arg0) {
895
- const ret = getObject(arg0).crypto;
896
- return addHeapObject(ret);
1006
+ module.exports.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
1007
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1008
+ return ret;
897
1009
  };
898
1010
 
899
- module.exports.__wbg_process_4a72847cc503995b = function (arg0) {
900
- const ret = getObject(arg0).process;
901
- return addHeapObject(ret);
1011
+ module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
1012
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1013
+ return ret;
902
1014
  };
903
1015
 
904
- module.exports.__wbg_versions_f686565e586dd935 = function (arg0) {
905
- const ret = getObject(arg0).versions;
906
- return addHeapObject(ret);
1016
+ module.exports.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
1017
+ const ret = new Uint8Array(arg0 >>> 0);
1018
+ return ret;
907
1019
  };
908
1020
 
909
- module.exports.__wbg_node_104a2ff8d6ea03a2 = function (arg0) {
910
- const ret = getObject(arg0).node;
911
- return addHeapObject(ret);
1021
+ module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
1022
+ return handleError(function (arg0, arg1, arg2) {
1023
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1024
+ return ret;
1025
+ }, arguments);
912
1026
  };
913
1027
 
914
- module.exports.__wbg_require_cca90b1a94a0255b = function () {
915
- return handleError(function () {
916
- const ret = module.require;
917
- return addHeapObject(ret);
1028
+ module.exports.__wbg_newwithu8arraysequenceandoptions_068570c487f69127 = function () {
1029
+ return handleError(function (arg0, arg1) {
1030
+ const ret = new Blob(arg0, arg1);
1031
+ return ret;
918
1032
  }, arguments);
919
1033
  };
920
1034
 
921
- module.exports.__wbindgen_is_function = function (arg0) {
922
- const ret = typeof getObject(arg0) === "function";
1035
+ module.exports.__wbg_next_25feadfc0913fea9 = function (arg0) {
1036
+ const ret = arg0.next;
923
1037
  return ret;
924
1038
  };
925
1039
 
926
- module.exports.__wbg_msCrypto_eb05e62b530a1508 = function (arg0) {
927
- const ret = getObject(arg0).msCrypto;
928
- return addHeapObject(ret);
929
- };
930
-
931
- module.exports.__wbg_newwithlength_76462a666eca145f = function (arg0) {
932
- const ret = new Uint8Array(arg0 >>> 0);
933
- return addHeapObject(ret);
1040
+ module.exports.__wbg_next_6574e1a8a62d1055 = function () {
1041
+ return handleError(function (arg0) {
1042
+ const ret = arg0.next();
1043
+ return ret;
1044
+ }, arguments);
934
1045
  };
935
1046
 
936
- module.exports.__wbindgen_memory = function () {
937
- const ret = wasm.memory;
938
- return addHeapObject(ret);
1047
+ module.exports.__wbg_node_02999533c4ea02e3 = function (arg0) {
1048
+ const ret = arg0.node;
1049
+ return ret;
939
1050
  };
940
1051
 
941
- module.exports.__wbg_buffer_ccaed51a635d8a2d = function (arg0) {
942
- const ret = getObject(arg0).buffer;
943
- return addHeapObject(ret);
1052
+ module.exports.__wbg_process_5c1d670bc53614b8 = function (arg0) {
1053
+ const ret = arg0.process;
1054
+ return ret;
944
1055
  };
945
1056
 
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);
1057
+ module.exports.__wbg_push_737cfc8c1432c2c6 = function (arg0, arg1) {
1058
+ const ret = arg0.push(arg1);
1059
+ return ret;
949
1060
  };
950
1061
 
951
- module.exports.__wbg_randomFillSync_5c9c955aa56b6049 = function () {
952
- return handleError(function (arg0, arg1) {
953
- getObject(arg0).randomFillSync(takeObject(arg1));
954
- }, arguments);
1062
+ module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
1063
+ queueMicrotask(arg0);
955
1064
  };
956
1065
 
957
- module.exports.__wbg_subarray_975a06f9dbd16995 = function (arg0, arg1, arg2) {
958
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
959
- return addHeapObject(ret);
1066
+ module.exports.__wbg_queueMicrotask_d3219def82552485 = function (arg0) {
1067
+ const ret = arg0.queueMicrotask;
1068
+ return ret;
960
1069
  };
961
1070
 
962
- module.exports.__wbg_getRandomValues_3aa56aa6edec874c = function () {
1071
+ module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () {
963
1072
  return handleError(function (arg0, arg1) {
964
- getObject(arg0).getRandomValues(getObject(arg1));
1073
+ arg0.randomFillSync(arg1);
965
1074
  }, arguments);
966
1075
  };
967
1076
 
968
- module.exports.__wbg_new_fec2611eb9180f95 = function (arg0) {
969
- const ret = new Uint8Array(getObject(arg0));
970
- return addHeapObject(ret);
1077
+ module.exports.__wbg_require_79b1e9274cde3c87 = function () {
1078
+ return handleError(function () {
1079
+ const ret = module.require;
1080
+ return ret;
1081
+ }, arguments);
971
1082
  };
972
1083
 
973
- module.exports.__wbg_set_ec2fcf81bc573fd9 = function (arg0, arg1, arg2) {
974
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1084
+ module.exports.__wbg_resolve_4851785c9c5f573d = function (arg0) {
1085
+ const ret = Promise.resolve(arg0);
1086
+ return ret;
975
1087
  };
976
1088
 
977
- module.exports.__wbg_self_bf91bf94d9e04084 = function () {
978
- return handleError(function () {
979
- const ret = self.self;
980
- return addHeapObject(ret);
981
- }, arguments);
1089
+ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
1090
+ arg0[arg1] = arg2;
982
1091
  };
983
1092
 
984
- module.exports.__wbg_window_52dd9f07d03fd5f8 = function () {
985
- return handleError(function () {
986
- const ret = window.window;
987
- return addHeapObject(ret);
988
- }, arguments);
1093
+ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
1094
+ arg0.set(arg1, arg2 >>> 0);
989
1095
  };
990
1096
 
991
- module.exports.__wbg_globalThis_05c129bf37fcf1be = function () {
992
- return handleError(function () {
993
- const ret = globalThis.globalThis;
994
- return addHeapObject(ret);
995
- }, arguments);
1097
+ module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
1098
+ arg0.body = arg1;
996
1099
  };
997
1100
 
998
- module.exports.__wbg_global_3eca19bb09e9c484 = function () {
999
- return handleError(function () {
1000
- const ret = global.global;
1001
- return addHeapObject(ret);
1002
- }, arguments);
1101
+ module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function (arg0, arg1) {
1102
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1003
1103
  };
1004
1104
 
1005
- module.exports.__wbg_newnoargs_1ede4bf2ebbaaf43 = function (arg0, arg1) {
1006
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1007
- return addHeapObject(ret);
1105
+ module.exports.__wbg_setheaders_834c0bdb6a8949ad = function (arg0, arg1) {
1106
+ arg0.headers = arg1;
1008
1107
  };
1009
1108
 
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);
1109
+ module.exports.__wbg_setmethod_3c5280fe5d890842 = function (arg0, arg1, arg2) {
1110
+ arg0.method = getStringFromWasm0(arg1, arg2);
1015
1111
  };
1016
1112
 
1017
- module.exports.__wbg_iterator_695d699a44d6234c = function () {
1018
- const ret = Symbol.iterator;
1019
- return addHeapObject(ret);
1113
+ module.exports.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
1114
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
1020
1115
  };
1021
1116
 
1022
- module.exports.__wbg_next_13b477da1eaa3897 = function (arg0) {
1023
- const ret = getObject(arg0).next;
1024
- return addHeapObject(ret);
1117
+ module.exports.__wbg_setname_c0e2d6f348c746f4 = function (arg0, arg1, arg2) {
1118
+ let deferred0_0;
1119
+ let deferred0_1;
1120
+ try {
1121
+ deferred0_0 = arg1;
1122
+ deferred0_1 = arg2;
1123
+ arg0.name = getStringFromWasm0(arg1, arg2);
1124
+ } finally {
1125
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1126
+ }
1025
1127
  };
1026
1128
 
1027
- module.exports.__wbg_new_034f913e7636e987 = function () {
1028
- const ret = new Array();
1029
- return addHeapObject(ret);
1129
+ module.exports.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
1130
+ arg0.signal = arg1;
1030
1131
  };
1031
1132
 
1032
- module.exports.__wbg_push_36cf4d81d7da33d1 = function (arg0, arg1) {
1033
- const ret = getObject(arg0).push(getObject(arg1));
1034
- return ret;
1133
+ module.exports.__wbg_settype_39ed370d3edd403c = function (arg0, arg1, arg2) {
1134
+ arg0.type = getStringFromWasm0(arg1, arg2);
1035
1135
  };
1036
1136
 
1037
- module.exports.__wbg_instanceof_ArrayBuffer_74945570b4a62ec7 = function (arg0) {
1038
- let result;
1137
+ module.exports.__wbg_setvariant_d1d41b778dfe9c17 = function (arg0, arg1, arg2) {
1138
+ let deferred0_0;
1139
+ let deferred0_1;
1039
1140
  try {
1040
- result = getObject(arg0) instanceof ArrayBuffer;
1041
- } catch (_) {
1042
- result = false;
1141
+ deferred0_0 = arg1;
1142
+ deferred0_1 = arg2;
1143
+ arg0.variant = getStringFromWasm0(arg1, arg2);
1144
+ } finally {
1145
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1043
1146
  }
1044
- const ret = result;
1045
- return ret;
1046
1147
  };
1047
1148
 
1048
- module.exports.__wbg_new_70a2f23d1565c04c = function (arg0, arg1) {
1049
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1050
- return addHeapObject(ret);
1149
+ module.exports.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
1150
+ const ret = arg0.signal;
1151
+ return ret;
1051
1152
  };
1052
1153
 
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);
1154
+ module.exports.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
1155
+ const ret = arg1.stack;
1156
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1157
+ const len1 = WASM_VECTOR_LEN;
1158
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1159
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1058
1160
  };
1059
1161
 
1060
- module.exports.__wbg_resolve_0aad7c1484731c99 = function (arg0) {
1061
- const ret = Promise.resolve(getObject(arg0));
1062
- return addHeapObject(ret);
1162
+ module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
1163
+ const ret = typeof global === "undefined" ? null : global;
1164
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1063
1165
  };
1064
1166
 
1065
- module.exports.__wbg_then_748f75edfb032440 = function (arg0, arg1) {
1066
- const ret = getObject(arg0).then(getObject(arg1));
1067
- return addHeapObject(ret);
1167
+ module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
1168
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
1169
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1068
1170
  };
1069
1171
 
1070
- module.exports.__wbg_then_4866a7d9f55d8f3e = function (arg0, arg1, arg2) {
1071
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1072
- return addHeapObject(ret);
1172
+ module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
1173
+ const ret = typeof self === "undefined" ? null : self;
1174
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1073
1175
  };
1074
1176
 
1075
- module.exports.__wbg_length_9254c4bd3b9f23c4 = function (arg0) {
1076
- const ret = getObject(arg0).length;
1077
- return ret;
1177
+ module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
1178
+ const ret = typeof window === "undefined" ? null : window;
1179
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1078
1180
  };
1079
1181
 
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;
1182
+ module.exports.__wbg_status_f6360336ca686bf0 = function (arg0) {
1183
+ const ret = arg0.status;
1088
1184
  return ret;
1089
1185
  };
1090
1186
 
1091
- module.exports.__wbg_new_4e7308fbedde3997 = function () {
1092
- return handleError(function () {
1093
- const ret = new FormData();
1094
- return addHeapObject(ret);
1187
+ module.exports.__wbg_stringify_f7ed6987935b4a24 = function () {
1188
+ return handleError(function (arg0) {
1189
+ const ret = JSON.stringify(arg0);
1190
+ return ret;
1095
1191
  }, arguments);
1096
1192
  };
1097
1193
 
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));
1194
+ module.exports.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
1195
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1196
+ return ret;
1197
+ };
1198
+
1199
+ module.exports.__wbg_text_7805bea50de2af49 = function () {
1200
+ return handleError(function (arg0) {
1201
+ const ret = arg0.text();
1202
+ return ret;
1101
1203
  }, arguments);
1102
1204
  };
1103
1205
 
1104
- module.exports.__wbg_settype_623d2ee701e6310a = function (arg0, arg1, arg2) {
1105
- getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1206
+ module.exports.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
1207
+ const ret = arg0.then(arg1);
1208
+ return ret;
1106
1209
  };
1107
1210
 
1108
- module.exports.__wbg_newwithu8arraysequenceandoptions_d41c0fdf78490206 = function () {
1109
- return handleError(function (arg0, arg1) {
1110
- const ret = new Blob(getObject(arg0), getObject(arg1));
1111
- return addHeapObject(ret);
1112
- }, arguments);
1211
+ module.exports.__wbg_then_48b406749878a531 = function (arg0, arg1, arg2) {
1212
+ const ret = arg0.then(arg1, arg2);
1213
+ return ret;
1113
1214
  };
1114
1215
 
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);
1216
+ module.exports.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
1217
+ const ret = arg1.url;
1218
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1219
+ const len1 = WASM_VECTOR_LEN;
1220
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1221
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1119
1222
  };
1120
1223
 
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);
1224
+ module.exports.__wbg_value_cd1ffa7b1ab794f1 = function (arg0) {
1225
+ const ret = arg0.value;
1226
+ return ret;
1129
1227
  };
1130
1228
 
1131
- module.exports.__wbg_fetch_f8d735ba6fe1b719 = function (arg0) {
1132
- const ret = fetch(getObject(arg0));
1133
- return addHeapObject(ret);
1229
+ module.exports.__wbg_versions_c71aa1626a93e0a1 = function (arg0) {
1230
+ const ret = arg0.versions;
1231
+ return ret;
1134
1232
  };
1135
1233
 
1136
- module.exports.__wbg_fetch_1fdc4448ed9eec00 = function (arg0, arg1) {
1137
- const ret = getObject(arg0).fetch(getObject(arg1));
1138
- return addHeapObject(ret);
1234
+ module.exports.__wbg_warn_aaf1f4664a035bd6 = function (arg0, arg1, arg2, arg3) {
1235
+ console.warn(arg0, arg1, arg2, arg3);
1139
1236
  };
1140
1237
 
1141
- module.exports.__wbg_new_75169ae5a9683c55 = function () {
1142
- return handleError(function () {
1143
- const ret = new AbortController();
1144
- return addHeapObject(ret);
1145
- }, arguments);
1238
+ module.exports.__wbindgen_as_number = function (arg0) {
1239
+ const ret = +arg0;
1240
+ return ret;
1146
1241
  };
1147
1242
 
1148
1243
  module.exports.__wbindgen_boolean_get = function (arg0) {
1149
- const v = getObject(arg0);
1244
+ const v = arg0;
1150
1245
  const ret = typeof v === "boolean" ? (v ? 1 : 0) : 2;
1151
1246
  return ret;
1152
1247
  };
1153
1248
 
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);
1249
+ module.exports.__wbindgen_cb_drop = function (arg0) {
1250
+ const obj = arg0.original;
1251
+ if (obj.cnt-- == 1) {
1252
+ obj.a = 0;
1253
+ return true;
1254
+ }
1255
+ const ret = false;
1256
+ return ret;
1159
1257
  };
1160
1258
 
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);
1259
+ module.exports.__wbindgen_closure_wrapper2160 = function (arg0, arg1, arg2) {
1260
+ const ret = makeMutClosure(arg0, arg1, 606, __wbg_adapter_42);
1261
+ return ret;
1167
1262
  };
1168
1263
 
1169
1264
  module.exports.__wbindgen_debug_string = function (arg0, arg1) {
1170
- const ret = debugString(getObject(arg1));
1265
+ const ret = debugString(arg1);
1171
1266
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1172
1267
  const len1 = WASM_VECTOR_LEN;
1173
1268
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1174
1269
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1175
1270
  };
1176
1271
 
1177
- module.exports.__wbindgen_throw = function (arg0, arg1) {
1178
- throw new Error(getStringFromWasm0(arg0, arg1));
1272
+ module.exports.__wbindgen_error_new = function (arg0, arg1) {
1273
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1274
+ return ret;
1179
1275
  };
1180
1276
 
1181
- module.exports.__wbg_queueMicrotask_848aa4969108a57e = function (arg0) {
1182
- const ret = getObject(arg0).queueMicrotask;
1183
- return addHeapObject(ret);
1277
+ module.exports.__wbindgen_in = function (arg0, arg1) {
1278
+ const ret = arg0 in arg1;
1279
+ return ret;
1184
1280
  };
1185
1281
 
1186
- module.exports.__wbg_queueMicrotask_c5419c06eab41e73 = function (arg0) {
1187
- queueMicrotask(getObject(arg0));
1282
+ module.exports.__wbindgen_init_externref_table = function () {
1283
+ const table = wasm.__wbindgen_export_4;
1284
+ const offset = table.grow(4);
1285
+ table.set(0, undefined);
1286
+ table.set(offset + 0, undefined);
1287
+ table.set(offset + 1, null);
1288
+ table.set(offset + 2, true);
1289
+ table.set(offset + 3, false);
1188
1290
  };
1189
1291
 
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);
1292
+ module.exports.__wbindgen_is_function = function (arg0) {
1293
+ const ret = typeof arg0 === "function";
1294
+ return ret;
1295
+ };
1296
+
1297
+ module.exports.__wbindgen_is_object = function (arg0) {
1298
+ const val = arg0;
1299
+ const ret = typeof val === "object" && val !== null;
1300
+ return ret;
1301
+ };
1302
+
1303
+ module.exports.__wbindgen_is_string = function (arg0) {
1304
+ const ret = typeof arg0 === "string";
1305
+ return ret;
1306
+ };
1307
+
1308
+ module.exports.__wbindgen_is_undefined = function (arg0) {
1309
+ const ret = arg0 === undefined;
1310
+ return ret;
1311
+ };
1312
+
1313
+ module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
1314
+ const ret = arg0 == arg1;
1315
+ return ret;
1195
1316
  };
1196
1317
 
1197
- module.exports.__wbg_debug_a0b6c2c5ac9a4bfd = function (arg0, arg1, arg2, arg3) {
1198
- console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1318
+ module.exports.__wbindgen_memory = function () {
1319
+ const ret = wasm.memory;
1320
+ return ret;
1199
1321
  };
1200
1322
 
1201
- module.exports.__wbg_error_4d17c5bb1ca90c94 = function (arg0, arg1, arg2, arg3) {
1202
- console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1323
+ module.exports.__wbindgen_number_get = function (arg0, arg1) {
1324
+ const obj = arg1;
1325
+ const ret = typeof obj === "number" ? obj : undefined;
1326
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1327
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1203
1328
  };
1204
1329
 
1205
- module.exports.__wbg_info_1c7fba7da21072d1 = function (arg0, arg1, arg2, arg3) {
1206
- console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1330
+ module.exports.__wbindgen_number_new = function (arg0) {
1331
+ const ret = arg0;
1332
+ return ret;
1207
1333
  };
1208
1334
 
1209
- module.exports.__wbg_log_4de37a0274d94769 = function (arg0, arg1, arg2, arg3) {
1210
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1335
+ module.exports.__wbindgen_string_get = function (arg0, arg1) {
1336
+ const obj = arg1;
1337
+ const ret = typeof obj === "string" ? obj : undefined;
1338
+ var ptr1 = isLikeNone(ret)
1339
+ ? 0
1340
+ : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1341
+ var len1 = WASM_VECTOR_LEN;
1342
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1343
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1211
1344
  };
1212
1345
 
1213
- module.exports.__wbg_warn_2e2787d40aad9a81 = function (arg0, arg1, arg2, arg3) {
1214
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1346
+ module.exports.__wbindgen_string_new = function (arg0, arg1) {
1347
+ const ret = getStringFromWasm0(arg0, arg1);
1348
+ return ret;
1215
1349
  };
1216
1350
 
1217
- module.exports.__wbindgen_closure_wrapper1799 = function (arg0, arg1, arg2) {
1218
- const ret = makeMutClosure(arg0, arg1, 491, __wbg_adapter_38);
1219
- return addHeapObject(ret);
1351
+ module.exports.__wbindgen_throw = function (arg0, arg1) {
1352
+ throw new Error(getStringFromWasm0(arg0, arg1));
1220
1353
  };
1221
1354
 
1222
1355
  const path = require("path").join(__dirname, "bitwarden_wasm_internal_bg.wasm");
@@ -1226,3 +1359,5 @@ const wasmModule = new WebAssembly.Module(bytes);
1226
1359
  const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
1227
1360
  wasm = wasmInstance.exports;
1228
1361
  module.exports.__wasm = wasm;
1362
+
1363
+ wasm.__wbindgen_start();