@bitwarden/sdk-internal 0.2.0-main.14 → 0.2.0-main.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,12 +3,15 @@ export function __wbg_set_wasm(val) {
3
3
  wasm = val;
4
4
  }
5
5
 
6
- const lTextDecoder =
7
- typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
6
+ const heap = new Array(128).fill(undefined);
8
7
 
9
- let cachedTextDecoder = new lTextDecoder("utf-8", { ignoreBOM: true, fatal: true });
8
+ heap.push(undefined, null, true, false);
10
9
 
11
- cachedTextDecoder.decode();
10
+ function getObject(idx) {
11
+ return heap[idx];
12
+ }
13
+
14
+ let WASM_VECTOR_LEN = 0;
12
15
 
13
16
  let cachedUint8ArrayMemory0 = null;
14
17
 
@@ -19,44 +22,6 @@ function getUint8ArrayMemory0() {
19
22
  return cachedUint8ArrayMemory0;
20
23
  }
21
24
 
22
- function getStringFromWasm0(ptr, len) {
23
- ptr = ptr >>> 0;
24
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
25
- }
26
-
27
- const heap = new Array(128).fill(undefined);
28
-
29
- heap.push(undefined, null, true, false);
30
-
31
- let heap_next = heap.length;
32
-
33
- function addHeapObject(obj) {
34
- if (heap_next === heap.length) heap.push(heap.length + 1);
35
- const idx = heap_next;
36
- heap_next = heap[idx];
37
-
38
- heap[idx] = obj;
39
- return idx;
40
- }
41
-
42
- function getObject(idx) {
43
- return heap[idx];
44
- }
45
-
46
- function dropObject(idx) {
47
- if (idx < 132) return;
48
- heap[idx] = heap_next;
49
- heap_next = idx;
50
- }
51
-
52
- function takeObject(idx) {
53
- const ret = getObject(idx);
54
- dropObject(idx);
55
- return ret;
56
- }
57
-
58
- let WASM_VECTOR_LEN = 0;
59
-
60
25
  const lTextEncoder =
61
26
  typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder;
62
27
 
@@ -116,10 +81,6 @@ function passStringToWasm0(arg, malloc, realloc) {
116
81
  return ptr;
117
82
  }
118
83
 
119
- function isLikeNone(x) {
120
- return x === undefined || x === null;
121
- }
122
-
123
84
  let cachedDataViewMemory0 = null;
124
85
 
125
86
  function getDataViewMemory0() {
@@ -134,6 +95,85 @@ function getDataViewMemory0() {
134
95
  return cachedDataViewMemory0;
135
96
  }
136
97
 
98
+ const lTextDecoder =
99
+ typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
100
+
101
+ let cachedTextDecoder = new lTextDecoder("utf-8", { ignoreBOM: true, fatal: true });
102
+
103
+ cachedTextDecoder.decode();
104
+
105
+ function getStringFromWasm0(ptr, len) {
106
+ ptr = ptr >>> 0;
107
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
108
+ }
109
+
110
+ let heap_next = heap.length;
111
+
112
+ function addHeapObject(obj) {
113
+ if (heap_next === heap.length) heap.push(heap.length + 1);
114
+ const idx = heap_next;
115
+ heap_next = heap[idx];
116
+
117
+ heap[idx] = obj;
118
+ return idx;
119
+ }
120
+
121
+ function handleError(f, args) {
122
+ try {
123
+ return f.apply(this, args);
124
+ } catch (e) {
125
+ wasm.__wbindgen_exn_store(addHeapObject(e));
126
+ }
127
+ }
128
+
129
+ function dropObject(idx) {
130
+ if (idx < 132) return;
131
+ heap[idx] = heap_next;
132
+ heap_next = idx;
133
+ }
134
+
135
+ function takeObject(idx) {
136
+ const ret = getObject(idx);
137
+ dropObject(idx);
138
+ return ret;
139
+ }
140
+
141
+ function isLikeNone(x) {
142
+ return x === undefined || x === null;
143
+ }
144
+
145
+ const CLOSURE_DTORS =
146
+ typeof FinalizationRegistry === "undefined"
147
+ ? { register: () => {}, unregister: () => {} }
148
+ : new FinalizationRegistry((state) => {
149
+ wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
150
+ });
151
+
152
+ function makeMutClosure(arg0, arg1, dtor, f) {
153
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
154
+ const real = (...args) => {
155
+ // First up with a closure we increment the internal reference
156
+ // count. This ensures that the Rust closure environment won't
157
+ // be deallocated while we're invoking it.
158
+ state.cnt++;
159
+ const a = state.a;
160
+ state.a = 0;
161
+ try {
162
+ return f(a, state.b, ...args);
163
+ } finally {
164
+ if (--state.cnt === 0) {
165
+ wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
166
+ CLOSURE_DTORS.unregister(state);
167
+ } else {
168
+ state.a = a;
169
+ }
170
+ }
171
+ };
172
+ real.original = state;
173
+ CLOSURE_DTORS.register(real, state, state);
174
+ return real;
175
+ }
176
+
137
177
  function debugString(val) {
138
178
  // primitive types
139
179
  const type = typeof val;
@@ -175,7 +215,7 @@ function debugString(val) {
175
215
  // Test for built-in
176
216
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
177
217
  let className;
178
- if (builtInMatches.length > 1) {
218
+ if (builtInMatches && builtInMatches.length > 1) {
179
219
  className = builtInMatches[1];
180
220
  } else {
181
221
  // Failed to match the standard '[object ClassName]'
@@ -199,45 +239,6 @@ function debugString(val) {
199
239
  return className;
200
240
  }
201
241
 
202
- const CLOSURE_DTORS =
203
- typeof FinalizationRegistry === "undefined"
204
- ? { register: () => {}, unregister: () => {} }
205
- : new FinalizationRegistry((state) => {
206
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
207
- });
208
-
209
- function makeMutClosure(arg0, arg1, dtor, f) {
210
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
211
- const real = (...args) => {
212
- // First up with a closure we increment the internal reference
213
- // count. This ensures that the Rust closure environment won't
214
- // be deallocated while we're invoking it.
215
- state.cnt++;
216
- const a = state.a;
217
- state.a = 0;
218
- try {
219
- return f(a, state.b, ...args);
220
- } finally {
221
- if (--state.cnt === 0) {
222
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
223
- CLOSURE_DTORS.unregister(state);
224
- } else {
225
- state.a = a;
226
- }
227
- }
228
- };
229
- real.original = state;
230
- CLOSURE_DTORS.register(real, state, state);
231
- return real;
232
- }
233
- function __wbg_adapter_38(arg0, arg1, arg2) {
234
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcab43b83560065d8(
235
- arg0,
236
- arg1,
237
- addHeapObject(arg2),
238
- );
239
- }
240
-
241
242
  let stack_pointer = 128;
242
243
 
243
244
  function addBorrowedObject(obj) {
@@ -249,9 +250,9 @@ function addBorrowedObject(obj) {
249
250
  * @param {any} error
250
251
  * @returns {boolean}
251
252
  */
252
- export function isCoreError(error) {
253
+ export function isEncryptionSettingsError(error) {
253
254
  try {
254
- const ret = wasm.isCoreError(addBorrowedObject(error));
255
+ const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
255
256
  return ret !== 0;
256
257
  } finally {
257
258
  heap[stack_pointer++] = undefined;
@@ -262,9 +263,65 @@ export function isCoreError(error) {
262
263
  * @param {any} error
263
264
  * @returns {boolean}
264
265
  */
265
- export function isEncryptionSettingsError(error) {
266
+ export function isCryptoError(error) {
266
267
  try {
267
- const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
268
+ const ret = wasm.isCryptoError(addBorrowedObject(error));
269
+ return ret !== 0;
270
+ } finally {
271
+ heap[stack_pointer++] = undefined;
272
+ }
273
+ }
274
+
275
+ function getArrayU8FromWasm0(ptr, len) {
276
+ ptr = ptr >>> 0;
277
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
278
+ }
279
+
280
+ function passArray8ToWasm0(arg, malloc) {
281
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
282
+ getUint8ArrayMemory0().set(arg, ptr / 1);
283
+ WASM_VECTOR_LEN = arg.length;
284
+ return ptr;
285
+ }
286
+
287
+ function _assertClass(instance, klass) {
288
+ if (!(instance instanceof klass)) {
289
+ throw new Error(`expected instance of ${klass.name}`);
290
+ }
291
+ }
292
+ /**
293
+ * @param {any} error
294
+ * @returns {boolean}
295
+ */
296
+ export function isDeserializeError(error) {
297
+ try {
298
+ const ret = wasm.isDeserializeError(addBorrowedObject(error));
299
+ return ret !== 0;
300
+ } finally {
301
+ heap[stack_pointer++] = undefined;
302
+ }
303
+ }
304
+
305
+ /**
306
+ * @param {any} error
307
+ * @returns {boolean}
308
+ */
309
+ export function isSshKeyExportError(error) {
310
+ try {
311
+ const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
312
+ return ret !== 0;
313
+ } finally {
314
+ heap[stack_pointer++] = undefined;
315
+ }
316
+ }
317
+
318
+ /**
319
+ * @param {any} error
320
+ * @returns {boolean}
321
+ */
322
+ export function isSshKeyImportError(error) {
323
+ try {
324
+ const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
268
325
  return ret !== 0;
269
326
  } finally {
270
327
  heap[stack_pointer++] = undefined;
@@ -288,9 +345,9 @@ export function isKeyGenerationError(error) {
288
345
  * @param {any} error
289
346
  * @returns {boolean}
290
347
  */
291
- export function isTestError(error) {
348
+ export function isDecryptFileError(error) {
292
349
  try {
293
- const ret = wasm.isTestError(addBorrowedObject(error));
350
+ const ret = wasm.isDecryptFileError(addBorrowedObject(error));
294
351
  return ret !== 0;
295
352
  } finally {
296
353
  heap[stack_pointer++] = undefined;
@@ -298,43 +355,303 @@ export function isTestError(error) {
298
355
  }
299
356
 
300
357
  /**
301
- * @param {KeyAlgorithm} key_algorithm
302
- * @returns {GenerateSshKeyResult}
358
+ * @param {any} error
359
+ * @returns {boolean}
303
360
  */
304
- export function generate_ssh_key(key_algorithm) {
361
+ export function isEncryptFileError(error) {
305
362
  try {
306
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
307
- wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
308
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
309
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
310
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
311
- if (r2) {
312
- throw takeObject(r1);
313
- }
314
- return takeObject(r0);
363
+ const ret = wasm.isEncryptFileError(addBorrowedObject(error));
364
+ return ret !== 0;
315
365
  } finally {
316
- wasm.__wbindgen_add_to_stack_pointer(16);
366
+ heap[stack_pointer++] = undefined;
317
367
  }
318
368
  }
319
369
 
320
- function handleError(f, args) {
370
+ /**
371
+ * @param {any} error
372
+ * @returns {boolean}
373
+ */
374
+ export function isDecryptError(error) {
321
375
  try {
322
- return f.apply(this, args);
323
- } catch (e) {
324
- wasm.__wbindgen_exn_store(addHeapObject(e));
376
+ const ret = wasm.isDecryptError(addBorrowedObject(error));
377
+ return ret !== 0;
378
+ } finally {
379
+ heap[stack_pointer++] = undefined;
325
380
  }
326
381
  }
327
- function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
328
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h7363c1bfa226a55d(
329
- arg0,
330
- arg1,
331
- addHeapObject(arg2),
332
- addHeapObject(arg3),
333
- );
382
+
383
+ /**
384
+ * @param {any} error
385
+ * @returns {boolean}
386
+ */
387
+ export function isEncryptError(error) {
388
+ try {
389
+ const ret = wasm.isEncryptError(addBorrowedObject(error));
390
+ return ret !== 0;
391
+ } finally {
392
+ heap[stack_pointer++] = undefined;
393
+ }
334
394
  }
335
395
 
336
- export const LogLevel = Object.freeze({
337
- Trace: 0,
396
+ /**
397
+ * @param {any} error
398
+ * @returns {boolean}
399
+ */
400
+ export function isTotpError(error) {
401
+ try {
402
+ const ret = wasm.isTotpError(addBorrowedObject(error));
403
+ return ret !== 0;
404
+ } finally {
405
+ heap[stack_pointer++] = undefined;
406
+ }
407
+ }
408
+
409
+ /**
410
+ * @param {any} error
411
+ * @returns {boolean}
412
+ */
413
+ export function isCipherError(error) {
414
+ try {
415
+ const ret = wasm.isCipherError(addBorrowedObject(error));
416
+ return ret !== 0;
417
+ } finally {
418
+ heap[stack_pointer++] = undefined;
419
+ }
420
+ }
421
+
422
+ /**
423
+ * @param {LogLevel} level
424
+ */
425
+ export function set_log_level(level) {
426
+ wasm.set_log_level(level);
427
+ }
428
+
429
+ /**
430
+ * @param {LogLevel | null} [log_level]
431
+ */
432
+ export function init_sdk(log_level) {
433
+ wasm.init_sdk(isLikeNone(log_level) ? 5 : log_level);
434
+ }
435
+
436
+ /**
437
+ * Generate a new SSH key pair
438
+ *
439
+ * # Arguments
440
+ * - `key_algorithm` - The algorithm to use for the key pair
441
+ *
442
+ * # Returns
443
+ * - `Ok(SshKey)` if the key was successfully generated
444
+ * - `Err(KeyGenerationError)` if the key could not be generated
445
+ * @param {KeyAlgorithm} key_algorithm
446
+ * @returns {SshKeyView}
447
+ */
448
+ export function generate_ssh_key(key_algorithm) {
449
+ try {
450
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
451
+ wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
452
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
453
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
454
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
455
+ if (r2) {
456
+ throw takeObject(r1);
457
+ }
458
+ return takeObject(r0);
459
+ } finally {
460
+ wasm.__wbindgen_add_to_stack_pointer(16);
461
+ }
462
+ }
463
+
464
+ /**
465
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
466
+ * to an OpenSSH private key with public key and fingerprint
467
+ *
468
+ * # Arguments
469
+ * - `imported_key` - The private key to convert
470
+ * - `password` - The password to use for decrypting the key
471
+ *
472
+ * # Returns
473
+ * - `Ok(SshKey)` if the key was successfully coneverted
474
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
475
+ * - `Err(WrongPassword)` if the password provided is incorrect
476
+ * - `Err(ParsingError)` if the key could not be parsed
477
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
478
+ * @param {string} imported_key
479
+ * @param {string | null} [password]
480
+ * @returns {SshKeyView}
481
+ */
482
+ export function import_ssh_key(imported_key, password) {
483
+ try {
484
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
485
+ const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
486
+ const len0 = WASM_VECTOR_LEN;
487
+ var ptr1 = isLikeNone(password)
488
+ ? 0
489
+ : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
490
+ var len1 = WASM_VECTOR_LEN;
491
+ wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
492
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
493
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
494
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
495
+ if (r2) {
496
+ throw takeObject(r1);
497
+ }
498
+ return takeObject(r0);
499
+ } finally {
500
+ wasm.__wbindgen_add_to_stack_pointer(16);
501
+ }
502
+ }
503
+
504
+ function passArrayJsValueToWasm0(array, malloc) {
505
+ const ptr = malloc(array.length * 4, 4) >>> 0;
506
+ const mem = getDataViewMemory0();
507
+ for (let i = 0; i < array.length; i++) {
508
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
509
+ }
510
+ WASM_VECTOR_LEN = array.length;
511
+ return ptr;
512
+ }
513
+
514
+ function getArrayJsValueFromWasm0(ptr, len) {
515
+ ptr = ptr >>> 0;
516
+ const mem = getDataViewMemory0();
517
+ const result = [];
518
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
519
+ result.push(takeObject(mem.getUint32(i, true)));
520
+ }
521
+ return result;
522
+ }
523
+ /**
524
+ * @param {any} error
525
+ * @returns {boolean}
526
+ */
527
+ export function isTestError(error) {
528
+ try {
529
+ const ret = wasm.isTestError(addBorrowedObject(error));
530
+ return ret !== 0;
531
+ } finally {
532
+ heap[stack_pointer++] = undefined;
533
+ }
534
+ }
535
+
536
+ function __wbg_adapter_50(arg0, arg1, arg2) {
537
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8ef26cc0e999965d(
538
+ arg0,
539
+ arg1,
540
+ addHeapObject(arg2),
541
+ );
542
+ }
543
+
544
+ function __wbg_adapter_217(arg0, arg1, arg2, arg3) {
545
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h33defb2ea0fdb769(
546
+ arg0,
547
+ arg1,
548
+ addHeapObject(arg2),
549
+ addHeapObject(arg3),
550
+ );
551
+ }
552
+
553
+ /**
554
+ * @enum {300 | 301 | 302 | 303 | 304 | 305}
555
+ */
556
+ export const CardLinkedIdType = Object.freeze({
557
+ CardholderName: 300,
558
+ 300: "CardholderName",
559
+ ExpMonth: 301,
560
+ 301: "ExpMonth",
561
+ ExpYear: 302,
562
+ 302: "ExpYear",
563
+ Code: 303,
564
+ 303: "Code",
565
+ Brand: 304,
566
+ 304: "Brand",
567
+ Number: 305,
568
+ 305: "Number",
569
+ });
570
+ /**
571
+ * @enum {0 | 1}
572
+ */
573
+ export const CipherRepromptType = Object.freeze({
574
+ None: 0,
575
+ 0: "None",
576
+ Password: 1,
577
+ 1: "Password",
578
+ });
579
+ /**
580
+ * @enum {1 | 2 | 3 | 4 | 5}
581
+ */
582
+ export const CipherType = Object.freeze({
583
+ Login: 1,
584
+ 1: "Login",
585
+ SecureNote: 2,
586
+ 2: "SecureNote",
587
+ Card: 3,
588
+ 3: "Card",
589
+ Identity: 4,
590
+ 4: "Identity",
591
+ SshKey: 5,
592
+ 5: "SshKey",
593
+ });
594
+ /**
595
+ * @enum {0 | 1 | 2 | 3}
596
+ */
597
+ export const FieldType = Object.freeze({
598
+ Text: 0,
599
+ 0: "Text",
600
+ Hidden: 1,
601
+ 1: "Hidden",
602
+ Boolean: 2,
603
+ 2: "Boolean",
604
+ Linked: 3,
605
+ 3: "Linked",
606
+ });
607
+ /**
608
+ * @enum {400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418}
609
+ */
610
+ export const IdentityLinkedIdType = Object.freeze({
611
+ Title: 400,
612
+ 400: "Title",
613
+ MiddleName: 401,
614
+ 401: "MiddleName",
615
+ Address1: 402,
616
+ 402: "Address1",
617
+ Address2: 403,
618
+ 403: "Address2",
619
+ Address3: 404,
620
+ 404: "Address3",
621
+ City: 405,
622
+ 405: "City",
623
+ State: 406,
624
+ 406: "State",
625
+ PostalCode: 407,
626
+ 407: "PostalCode",
627
+ Country: 408,
628
+ 408: "Country",
629
+ Company: 409,
630
+ 409: "Company",
631
+ Email: 410,
632
+ 410: "Email",
633
+ Phone: 411,
634
+ 411: "Phone",
635
+ Ssn: 412,
636
+ 412: "Ssn",
637
+ Username: 413,
638
+ 413: "Username",
639
+ PassportNumber: 414,
640
+ 414: "PassportNumber",
641
+ LicenseNumber: 415,
642
+ 415: "LicenseNumber",
643
+ FirstName: 416,
644
+ 416: "FirstName",
645
+ LastName: 417,
646
+ 417: "LastName",
647
+ FullName: 418,
648
+ 418: "FullName",
649
+ });
650
+ /**
651
+ * @enum {0 | 1 | 2 | 3 | 4}
652
+ */
653
+ export const LogLevel = Object.freeze({
654
+ Trace: 0,
338
655
  0: "Trace",
339
656
  Debug: 1,
340
657
  1: "Debug",
@@ -345,6 +662,39 @@ export const LogLevel = Object.freeze({
345
662
  Error: 4,
346
663
  4: "Error",
347
664
  });
665
+ /**
666
+ * @enum {100 | 101}
667
+ */
668
+ export const LoginLinkedIdType = Object.freeze({
669
+ Username: 100,
670
+ 100: "Username",
671
+ Password: 101,
672
+ 101: "Password",
673
+ });
674
+ /**
675
+ * @enum {0}
676
+ */
677
+ export const SecureNoteType = Object.freeze({
678
+ Generic: 0,
679
+ 0: "Generic",
680
+ });
681
+ /**
682
+ * @enum {0 | 1 | 2 | 3 | 4 | 5}
683
+ */
684
+ export const UriMatchType = Object.freeze({
685
+ Domain: 0,
686
+ 0: "Domain",
687
+ Host: 1,
688
+ 1: "Host",
689
+ StartsWith: 2,
690
+ 2: "StartsWith",
691
+ Exact: 3,
692
+ 3: "Exact",
693
+ RegularExpression: 4,
694
+ 4: "RegularExpression",
695
+ Never: 5,
696
+ 5: "Never",
697
+ });
348
698
 
349
699
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
350
700
 
@@ -368,14 +718,10 @@ export class BitwardenClient {
368
718
  wasm.__wbg_bitwardenclient_free(ptr, 0);
369
719
  }
370
720
  /**
371
- * @param {ClientSettings | undefined} [settings]
372
- * @param {LogLevel | undefined} [log_level]
721
+ * @param {ClientSettings | null} [settings]
373
722
  */
374
- constructor(settings, log_level) {
375
- const ret = wasm.bitwardenclient_new(
376
- isLikeNone(settings) ? 0 : addHeapObject(settings),
377
- isLikeNone(log_level) ? 5 : log_level,
378
- );
723
+ constructor(settings) {
724
+ const ret = wasm.bitwardenclient_new(isLikeNone(settings) ? 0 : addHeapObject(settings));
379
725
  this.__wbg_ptr = ret >>> 0;
380
726
  BitwardenClientFinalization.register(this, this.__wbg_ptr, this);
381
727
  return this;
@@ -424,13 +770,21 @@ export class BitwardenClient {
424
770
  }
425
771
  /**
426
772
  * @param {string} msg
427
- * @returns {Promise<void>}
428
773
  */
429
774
  throw(msg) {
430
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
431
- const len0 = WASM_VECTOR_LEN;
432
- const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
433
- return takeObject(ret);
775
+ try {
776
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
777
+ const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
778
+ const len0 = WASM_VECTOR_LEN;
779
+ wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
780
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
781
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
782
+ if (r1) {
783
+ throw takeObject(r0);
784
+ }
785
+ } finally {
786
+ wasm.__wbindgen_add_to_stack_pointer(16);
787
+ }
434
788
  }
435
789
  /**
436
790
  * Test method, calls http endpoint
@@ -444,65 +798,209 @@ export class BitwardenClient {
444
798
  return takeObject(ret);
445
799
  }
446
800
  /**
447
- * @returns {ClientCrypto}
801
+ * @returns {CryptoClient}
448
802
  */
449
803
  crypto() {
450
804
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
451
- return ClientCrypto.__wrap(ret);
805
+ return CryptoClient.__wrap(ret);
452
806
  }
453
807
  /**
454
- * @returns {ClientVault}
808
+ * @returns {VaultClient}
455
809
  */
456
810
  vault() {
457
811
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
458
- return ClientVault.__wrap(ret);
812
+ return VaultClient.__wrap(ret);
459
813
  }
460
814
  }
461
815
 
462
- const ClientCryptoFinalization =
816
+ const ClientCiphersFinalization =
463
817
  typeof FinalizationRegistry === "undefined"
464
818
  ? { register: () => {}, unregister: () => {} }
465
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientcrypto_free(ptr >>> 0, 1));
819
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clientciphers_free(ptr >>> 0, 1));
466
820
 
467
- export class ClientCrypto {
821
+ export class ClientCiphers {
468
822
  static __wrap(ptr) {
469
823
  ptr = ptr >>> 0;
470
- const obj = Object.create(ClientCrypto.prototype);
824
+ const obj = Object.create(ClientCiphers.prototype);
471
825
  obj.__wbg_ptr = ptr;
472
- ClientCryptoFinalization.register(obj, obj.__wbg_ptr, obj);
826
+ ClientCiphersFinalization.register(obj, obj.__wbg_ptr, obj);
473
827
  return obj;
474
828
  }
475
829
 
476
830
  __destroy_into_raw() {
477
831
  const ptr = this.__wbg_ptr;
478
832
  this.__wbg_ptr = 0;
479
- ClientCryptoFinalization.unregister(this);
833
+ ClientCiphersFinalization.unregister(this);
480
834
  return ptr;
481
835
  }
482
836
 
483
837
  free() {
484
838
  const ptr = this.__destroy_into_raw();
485
- wasm.__wbg_clientcrypto_free(ptr, 0);
839
+ wasm.__wbg_clientciphers_free(ptr, 0);
486
840
  }
487
841
  /**
488
- * Initialization method for the user crypto. Needs to be called before any other crypto
489
- * operations.
490
- * @param {InitUserCryptoRequest} req
491
- * @returns {Promise<void>}
842
+ * Encrypt cipher
843
+ *
844
+ * # Arguments
845
+ * - `cipher_view` - The decrypted cipher to encrypt
846
+ *
847
+ * # Returns
848
+ * - `Ok(Cipher)` containing the encrypted cipher
849
+ * - `Err(EncryptError)` if encryption fails
850
+ * @param {CipherView} cipher_view
851
+ * @returns {Cipher}
492
852
  */
493
- initialize_user_crypto(req) {
494
- const ret = wasm.clientcrypto_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
495
- return takeObject(ret);
853
+ encrypt(cipher_view) {
854
+ try {
855
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
856
+ wasm.clientciphers_encrypt(retptr, this.__wbg_ptr, addHeapObject(cipher_view));
857
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
858
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
859
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
860
+ if (r2) {
861
+ throw takeObject(r1);
862
+ }
863
+ return takeObject(r0);
864
+ } finally {
865
+ wasm.__wbindgen_add_to_stack_pointer(16);
866
+ }
496
867
  }
497
868
  /**
498
- * Initialization method for the organization crypto. Needs to be called after
499
- * `initialize_user_crypto` but before any other crypto operations.
500
- * @param {InitOrgCryptoRequest} req
501
- * @returns {Promise<void>}
869
+ * Decrypt cipher
870
+ *
871
+ * # Arguments
872
+ * - `cipher` - The encrypted cipher to decrypt
873
+ *
874
+ * # Returns
875
+ * - `Ok(CipherView)` containing the decrypted cipher
876
+ * - `Err(DecryptError)` if decryption fails
877
+ * @param {Cipher} cipher
878
+ * @returns {CipherView}
502
879
  */
503
- initialize_org_crypto(req) {
504
- const ret = wasm.clientcrypto_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
505
- return takeObject(ret);
880
+ decrypt(cipher) {
881
+ try {
882
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
883
+ wasm.clientciphers_decrypt(retptr, this.__wbg_ptr, addHeapObject(cipher));
884
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
885
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
886
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
887
+ if (r2) {
888
+ throw takeObject(r1);
889
+ }
890
+ return takeObject(r0);
891
+ } finally {
892
+ wasm.__wbindgen_add_to_stack_pointer(16);
893
+ }
894
+ }
895
+ /**
896
+ * Decrypt list of ciphers
897
+ *
898
+ * # Arguments
899
+ * - `ciphers` - The list of encrypted ciphers to decrypt
900
+ *
901
+ * # Returns
902
+ * - `Ok(Vec<CipherListView>)` containing the decrypted ciphers
903
+ * - `Err(DecryptError)` if decryption fails
904
+ * @param {Cipher[]} ciphers
905
+ * @returns {CipherListView[]}
906
+ */
907
+ decrypt_list(ciphers) {
908
+ try {
909
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
910
+ const ptr0 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
911
+ const len0 = WASM_VECTOR_LEN;
912
+ wasm.clientciphers_decrypt_list(retptr, this.__wbg_ptr, ptr0, len0);
913
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
914
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
915
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
916
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
917
+ if (r3) {
918
+ throw takeObject(r2);
919
+ }
920
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
921
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
922
+ return v2;
923
+ } finally {
924
+ wasm.__wbindgen_add_to_stack_pointer(16);
925
+ }
926
+ }
927
+ /**
928
+ * Decrypt FIDO2 credentials
929
+ *
930
+ * # Arguments
931
+ * - `cipher_view` - Cipher to encrypt containing the FIDO2 credential
932
+ *
933
+ * # Returns
934
+ * - `Ok(Vec<Fido2CredentialView>)` containing the decrypted FIDO2 credentials
935
+ * - `Err(DecryptError)` if decryption fails
936
+ * @param {CipherView} cipher_view
937
+ * @returns {Fido2CredentialView[]}
938
+ */
939
+ decrypt_fido2_credentials(cipher_view) {
940
+ try {
941
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
942
+ wasm.clientciphers_decrypt_fido2_credentials(
943
+ retptr,
944
+ this.__wbg_ptr,
945
+ addHeapObject(cipher_view),
946
+ );
947
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
948
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
949
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
950
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
951
+ if (r3) {
952
+ throw takeObject(r2);
953
+ }
954
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
955
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
956
+ return v1;
957
+ } finally {
958
+ wasm.__wbindgen_add_to_stack_pointer(16);
959
+ }
960
+ }
961
+ /**
962
+ * Decrypt key
963
+ *
964
+ * This method is a temporary solution to allow typescript client access to decrypted key
965
+ * values, particularly for FIDO2 credentials.
966
+ *
967
+ * # Arguments
968
+ * - `cipher_view` - Decrypted cipher containing the key
969
+ *
970
+ * # Returns
971
+ * - `Ok(String)` containing the decrypted key
972
+ * - `Err(CipherError)`
973
+ * @param {CipherView} cipher_view
974
+ * @returns {string}
975
+ */
976
+ decrypt_fido2_private_key(cipher_view) {
977
+ let deferred2_0;
978
+ let deferred2_1;
979
+ try {
980
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
981
+ wasm.clientciphers_decrypt_fido2_private_key(
982
+ retptr,
983
+ this.__wbg_ptr,
984
+ addHeapObject(cipher_view),
985
+ );
986
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
987
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
988
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
989
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
990
+ var ptr1 = r0;
991
+ var len1 = r1;
992
+ if (r3) {
993
+ ptr1 = 0;
994
+ len1 = 0;
995
+ throw takeObject(r2);
996
+ }
997
+ deferred2_0 = ptr1;
998
+ deferred2_1 = len1;
999
+ return getStringFromWasm0(ptr1, len1);
1000
+ } finally {
1001
+ wasm.__wbindgen_add_to_stack_pointer(16);
1002
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1003
+ }
506
1004
  }
507
1005
  }
508
1006
 
@@ -553,223 +1051,989 @@ export class ClientFolders {
553
1051
  }
554
1052
  }
555
1053
 
556
- const ClientVaultFinalization =
1054
+ const ClientTotpFinalization =
557
1055
  typeof FinalizationRegistry === "undefined"
558
1056
  ? { register: () => {}, unregister: () => {} }
559
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientvault_free(ptr >>> 0, 1));
1057
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clienttotp_free(ptr >>> 0, 1));
560
1058
 
561
- export class ClientVault {
1059
+ export class ClientTotp {
562
1060
  static __wrap(ptr) {
563
1061
  ptr = ptr >>> 0;
564
- const obj = Object.create(ClientVault.prototype);
1062
+ const obj = Object.create(ClientTotp.prototype);
565
1063
  obj.__wbg_ptr = ptr;
566
- ClientVaultFinalization.register(obj, obj.__wbg_ptr, obj);
1064
+ ClientTotpFinalization.register(obj, obj.__wbg_ptr, obj);
567
1065
  return obj;
568
1066
  }
569
1067
 
570
1068
  __destroy_into_raw() {
571
1069
  const ptr = this.__wbg_ptr;
572
1070
  this.__wbg_ptr = 0;
573
- ClientVaultFinalization.unregister(this);
1071
+ ClientTotpFinalization.unregister(this);
574
1072
  return ptr;
575
1073
  }
576
1074
 
577
1075
  free() {
578
1076
  const ptr = this.__destroy_into_raw();
579
- wasm.__wbg_clientvault_free(ptr, 0);
1077
+ wasm.__wbg_clienttotp_free(ptr, 0);
580
1078
  }
581
1079
  /**
582
- * @returns {ClientFolders}
1080
+ * Generates a TOTP code from a provided key
1081
+ *
1082
+ * # Arguments
1083
+ * - `key` - Can be:
1084
+ * - A base32 encoded string
1085
+ * - OTP Auth URI
1086
+ * - Steam URI
1087
+ * - `time_ms` - Optional timestamp in milliseconds
1088
+ *
1089
+ * # Returns
1090
+ * - `Ok(TotpResponse)` containing the generated code and period
1091
+ * - `Err(TotpError)` if code generation fails
1092
+ * @param {string} key
1093
+ * @param {number | null} [time_ms]
1094
+ * @returns {TotpResponse}
583
1095
  */
584
- folders() {
585
- const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
586
- return ClientFolders.__wrap(ret);
1096
+ generate_totp(key, time_ms) {
1097
+ try {
1098
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1099
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1100
+ const len0 = WASM_VECTOR_LEN;
1101
+ wasm.clienttotp_generate_totp(
1102
+ retptr,
1103
+ this.__wbg_ptr,
1104
+ ptr0,
1105
+ len0,
1106
+ !isLikeNone(time_ms),
1107
+ isLikeNone(time_ms) ? 0 : time_ms,
1108
+ );
1109
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1110
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1111
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1112
+ if (r2) {
1113
+ throw takeObject(r1);
1114
+ }
1115
+ return takeObject(r0);
1116
+ } finally {
1117
+ wasm.__wbindgen_add_to_stack_pointer(16);
1118
+ }
587
1119
  }
588
1120
  }
589
1121
 
590
- export function __wbg_new_fe19e4f3db5c3999(arg0, arg1) {
591
- let deferred0_0;
592
- let deferred0_1;
593
- try {
594
- deferred0_0 = arg0;
595
- deferred0_1 = arg1;
596
- const ret = new Error(getStringFromWasm0(arg0, arg1));
597
- return addHeapObject(ret);
598
- } finally {
599
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1122
+ const CryptoClientFinalization =
1123
+ typeof FinalizationRegistry === "undefined"
1124
+ ? { register: () => {}, unregister: () => {} }
1125
+ : new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
1126
+
1127
+ export class CryptoClient {
1128
+ static __wrap(ptr) {
1129
+ ptr = ptr >>> 0;
1130
+ const obj = Object.create(CryptoClient.prototype);
1131
+ obj.__wbg_ptr = ptr;
1132
+ CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
1133
+ return obj;
600
1134
  }
601
- }
602
1135
 
603
- export function __wbg_setname_46d623c31ae39910(arg0, arg1, arg2) {
604
- let deferred0_0;
605
- let deferred0_1;
606
- try {
607
- deferred0_0 = arg1;
608
- deferred0_1 = arg2;
609
- getObject(arg0).name = getStringFromWasm0(arg1, arg2);
610
- } finally {
611
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1136
+ __destroy_into_raw() {
1137
+ const ptr = this.__wbg_ptr;
1138
+ this.__wbg_ptr = 0;
1139
+ CryptoClientFinalization.unregister(this);
1140
+ return ptr;
1141
+ }
1142
+
1143
+ free() {
1144
+ const ptr = this.__destroy_into_raw();
1145
+ wasm.__wbg_cryptoclient_free(ptr, 0);
1146
+ }
1147
+ /**
1148
+ * Initialization method for the user crypto. Needs to be called before any other crypto
1149
+ * operations.
1150
+ * @param {InitUserCryptoRequest} req
1151
+ * @returns {Promise<void>}
1152
+ */
1153
+ initialize_user_crypto(req) {
1154
+ const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
1155
+ return takeObject(ret);
1156
+ }
1157
+ /**
1158
+ * Initialization method for the organization crypto. Needs to be called after
1159
+ * `initialize_user_crypto` but before any other crypto operations.
1160
+ * @param {InitOrgCryptoRequest} req
1161
+ * @returns {Promise<void>}
1162
+ */
1163
+ initialize_org_crypto(req) {
1164
+ const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
1165
+ return takeObject(ret);
1166
+ }
1167
+ /**
1168
+ * Generates a new key pair and encrypts the private key with the provided user key.
1169
+ * Crypto initialization not required.
1170
+ * @param {string} user_key
1171
+ * @returns {MakeKeyPairResponse}
1172
+ */
1173
+ make_key_pair(user_key) {
1174
+ try {
1175
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1176
+ const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1177
+ const len0 = WASM_VECTOR_LEN;
1178
+ wasm.cryptoclient_make_key_pair(retptr, this.__wbg_ptr, ptr0, len0);
1179
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1180
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1181
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1182
+ if (r2) {
1183
+ throw takeObject(r1);
1184
+ }
1185
+ return takeObject(r0);
1186
+ } finally {
1187
+ wasm.__wbindgen_add_to_stack_pointer(16);
1188
+ }
1189
+ }
1190
+ /**
1191
+ * Verifies a user's asymmetric keys by decrypting the private key with the provided user
1192
+ * key. Returns if the private key is decryptable and if it is a valid matching key.
1193
+ * Crypto initialization not required.
1194
+ * @param {VerifyAsymmetricKeysRequest} request
1195
+ * @returns {VerifyAsymmetricKeysResponse}
1196
+ */
1197
+ verify_asymmetric_keys(request) {
1198
+ try {
1199
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1200
+ wasm.cryptoclient_verify_asymmetric_keys(retptr, this.__wbg_ptr, addHeapObject(request));
1201
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1202
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1203
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1204
+ if (r2) {
1205
+ throw takeObject(r1);
1206
+ }
1207
+ return takeObject(r0);
1208
+ } finally {
1209
+ wasm.__wbindgen_add_to_stack_pointer(16);
1210
+ }
612
1211
  }
613
1212
  }
614
1213
 
615
- export function __wbg_setvariant_262a12673324f71b(arg0, arg1, arg2) {
616
- let deferred0_0;
617
- let deferred0_1;
618
- try {
619
- deferred0_0 = arg1;
620
- deferred0_1 = arg2;
621
- getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
622
- } finally {
623
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1214
+ const IncomingMessageFinalization =
1215
+ typeof FinalizationRegistry === "undefined"
1216
+ ? { register: () => {}, unregister: () => {} }
1217
+ : new FinalizationRegistry((ptr) => wasm.__wbg_incomingmessage_free(ptr >>> 0, 1));
1218
+
1219
+ export class IncomingMessage {
1220
+ static __wrap(ptr) {
1221
+ ptr = ptr >>> 0;
1222
+ const obj = Object.create(IncomingMessage.prototype);
1223
+ obj.__wbg_ptr = ptr;
1224
+ IncomingMessageFinalization.register(obj, obj.__wbg_ptr, obj);
1225
+ return obj;
1226
+ }
1227
+
1228
+ __destroy_into_raw() {
1229
+ const ptr = this.__wbg_ptr;
1230
+ this.__wbg_ptr = 0;
1231
+ IncomingMessageFinalization.unregister(this);
1232
+ return ptr;
1233
+ }
1234
+
1235
+ free() {
1236
+ const ptr = this.__destroy_into_raw();
1237
+ wasm.__wbg_incomingmessage_free(ptr, 0);
1238
+ }
1239
+ /**
1240
+ * @returns {Uint8Array}
1241
+ */
1242
+ get payload() {
1243
+ try {
1244
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1245
+ wasm.__wbg_get_incomingmessage_payload(retptr, this.__wbg_ptr);
1246
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1247
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1248
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1249
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1250
+ return v1;
1251
+ } finally {
1252
+ wasm.__wbindgen_add_to_stack_pointer(16);
1253
+ }
1254
+ }
1255
+ /**
1256
+ * @param {Uint8Array} arg0
1257
+ */
1258
+ set payload(arg0) {
1259
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
1260
+ const len0 = WASM_VECTOR_LEN;
1261
+ wasm.__wbg_set_incomingmessage_payload(this.__wbg_ptr, ptr0, len0);
1262
+ }
1263
+ /**
1264
+ * @returns {Endpoint}
1265
+ */
1266
+ get destination() {
1267
+ const ret = wasm.__wbg_get_incomingmessage_destination(this.__wbg_ptr);
1268
+ return takeObject(ret);
1269
+ }
1270
+ /**
1271
+ * @param {Endpoint} arg0
1272
+ */
1273
+ set destination(arg0) {
1274
+ wasm.__wbg_set_incomingmessage_destination(this.__wbg_ptr, addHeapObject(arg0));
1275
+ }
1276
+ /**
1277
+ * @returns {Endpoint}
1278
+ */
1279
+ get source() {
1280
+ const ret = wasm.__wbg_get_incomingmessage_source(this.__wbg_ptr);
1281
+ return takeObject(ret);
1282
+ }
1283
+ /**
1284
+ * @param {Endpoint} arg0
1285
+ */
1286
+ set source(arg0) {
1287
+ wasm.__wbg_set_incomingmessage_source(this.__wbg_ptr, addHeapObject(arg0));
1288
+ }
1289
+ /**
1290
+ * @returns {string | undefined}
1291
+ */
1292
+ get topic() {
1293
+ try {
1294
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1295
+ wasm.__wbg_get_incomingmessage_topic(retptr, this.__wbg_ptr);
1296
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1297
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1298
+ let v1;
1299
+ if (r0 !== 0) {
1300
+ v1 = getStringFromWasm0(r0, r1).slice();
1301
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1302
+ }
1303
+ return v1;
1304
+ } finally {
1305
+ wasm.__wbindgen_add_to_stack_pointer(16);
1306
+ }
1307
+ }
1308
+ /**
1309
+ * @param {string | null} [arg0]
1310
+ */
1311
+ set topic(arg0) {
1312
+ var ptr0 = isLikeNone(arg0)
1313
+ ? 0
1314
+ : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1315
+ var len0 = WASM_VECTOR_LEN;
1316
+ wasm.__wbg_set_incomingmessage_topic(this.__wbg_ptr, ptr0, len0);
1317
+ }
1318
+ /**
1319
+ * @param {Uint8Array} payload
1320
+ * @param {Endpoint} destination
1321
+ * @param {Endpoint} source
1322
+ * @param {string | null} [topic]
1323
+ */
1324
+ constructor(payload, destination, source, topic) {
1325
+ const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
1326
+ const len0 = WASM_VECTOR_LEN;
1327
+ var ptr1 = isLikeNone(topic)
1328
+ ? 0
1329
+ : passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1330
+ var len1 = WASM_VECTOR_LEN;
1331
+ const ret = wasm.incomingmessage_new(
1332
+ ptr0,
1333
+ len0,
1334
+ addHeapObject(destination),
1335
+ addHeapObject(source),
1336
+ ptr1,
1337
+ len1,
1338
+ );
1339
+ this.__wbg_ptr = ret >>> 0;
1340
+ IncomingMessageFinalization.register(this, this.__wbg_ptr, this);
1341
+ return this;
1342
+ }
1343
+ /**
1344
+ * Try to parse the payload as JSON.
1345
+ * @returns {any} The parsed JSON value, or undefined if the payload is not valid JSON.
1346
+ */
1347
+ parse_payload_as_json() {
1348
+ const ret = wasm.incomingmessage_parse_payload_as_json(this.__wbg_ptr);
1349
+ return takeObject(ret);
624
1350
  }
625
1351
  }
626
1352
 
627
- export function __wbindgen_string_new(arg0, arg1) {
628
- const ret = getStringFromWasm0(arg0, arg1);
629
- return addHeapObject(ret);
1353
+ const IpcClientFinalization =
1354
+ typeof FinalizationRegistry === "undefined"
1355
+ ? { register: () => {}, unregister: () => {} }
1356
+ : new FinalizationRegistry((ptr) => wasm.__wbg_ipcclient_free(ptr >>> 0, 1));
1357
+
1358
+ export class IpcClient {
1359
+ __destroy_into_raw() {
1360
+ const ptr = this.__wbg_ptr;
1361
+ this.__wbg_ptr = 0;
1362
+ IpcClientFinalization.unregister(this);
1363
+ return ptr;
1364
+ }
1365
+
1366
+ free() {
1367
+ const ptr = this.__destroy_into_raw();
1368
+ wasm.__wbg_ipcclient_free(ptr, 0);
1369
+ }
1370
+ /**
1371
+ * @param {CommunicationBackend} communication_provider
1372
+ */
1373
+ constructor(communication_provider) {
1374
+ const ret = wasm.ipcclient_new(addHeapObject(communication_provider));
1375
+ this.__wbg_ptr = ret >>> 0;
1376
+ IpcClientFinalization.register(this, this.__wbg_ptr, this);
1377
+ return this;
1378
+ }
1379
+ /**
1380
+ * @param {OutgoingMessage} message
1381
+ * @returns {Promise<void>}
1382
+ */
1383
+ send(message) {
1384
+ _assertClass(message, OutgoingMessage);
1385
+ var ptr0 = message.__destroy_into_raw();
1386
+ const ret = wasm.ipcclient_send(this.__wbg_ptr, ptr0);
1387
+ return takeObject(ret);
1388
+ }
1389
+ /**
1390
+ * @returns {Promise<IncomingMessage>}
1391
+ */
1392
+ receive() {
1393
+ const ret = wasm.ipcclient_receive(this.__wbg_ptr);
1394
+ return takeObject(ret);
1395
+ }
630
1396
  }
631
1397
 
632
- export function __wbg_get_ef828680c64da212() {
633
- return handleError(function (arg0, arg1) {
634
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
635
- return addHeapObject(ret);
636
- }, arguments);
1398
+ const OutgoingMessageFinalization =
1399
+ typeof FinalizationRegistry === "undefined"
1400
+ ? { register: () => {}, unregister: () => {} }
1401
+ : new FinalizationRegistry((ptr) => wasm.__wbg_outgoingmessage_free(ptr >>> 0, 1));
1402
+
1403
+ export class OutgoingMessage {
1404
+ static __wrap(ptr) {
1405
+ ptr = ptr >>> 0;
1406
+ const obj = Object.create(OutgoingMessage.prototype);
1407
+ obj.__wbg_ptr = ptr;
1408
+ OutgoingMessageFinalization.register(obj, obj.__wbg_ptr, obj);
1409
+ return obj;
1410
+ }
1411
+
1412
+ __destroy_into_raw() {
1413
+ const ptr = this.__wbg_ptr;
1414
+ this.__wbg_ptr = 0;
1415
+ OutgoingMessageFinalization.unregister(this);
1416
+ return ptr;
1417
+ }
1418
+
1419
+ free() {
1420
+ const ptr = this.__destroy_into_raw();
1421
+ wasm.__wbg_outgoingmessage_free(ptr, 0);
1422
+ }
1423
+ /**
1424
+ * @returns {Uint8Array}
1425
+ */
1426
+ get payload() {
1427
+ try {
1428
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1429
+ wasm.__wbg_get_outgoingmessage_payload(retptr, this.__wbg_ptr);
1430
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1431
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1432
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1433
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1434
+ return v1;
1435
+ } finally {
1436
+ wasm.__wbindgen_add_to_stack_pointer(16);
1437
+ }
1438
+ }
1439
+ /**
1440
+ * @param {Uint8Array} arg0
1441
+ */
1442
+ set payload(arg0) {
1443
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
1444
+ const len0 = WASM_VECTOR_LEN;
1445
+ wasm.__wbg_set_outgoingmessage_payload(this.__wbg_ptr, ptr0, len0);
1446
+ }
1447
+ /**
1448
+ * @returns {Endpoint}
1449
+ */
1450
+ get destination() {
1451
+ const ret = wasm.__wbg_get_incomingmessage_destination(this.__wbg_ptr);
1452
+ return takeObject(ret);
1453
+ }
1454
+ /**
1455
+ * @param {Endpoint} arg0
1456
+ */
1457
+ set destination(arg0) {
1458
+ wasm.__wbg_set_incomingmessage_destination(this.__wbg_ptr, addHeapObject(arg0));
1459
+ }
1460
+ /**
1461
+ * @returns {string | undefined}
1462
+ */
1463
+ get topic() {
1464
+ try {
1465
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1466
+ wasm.__wbg_get_outgoingmessage_topic(retptr, this.__wbg_ptr);
1467
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1468
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1469
+ let v1;
1470
+ if (r0 !== 0) {
1471
+ v1 = getStringFromWasm0(r0, r1).slice();
1472
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1473
+ }
1474
+ return v1;
1475
+ } finally {
1476
+ wasm.__wbindgen_add_to_stack_pointer(16);
1477
+ }
1478
+ }
1479
+ /**
1480
+ * @param {string | null} [arg0]
1481
+ */
1482
+ set topic(arg0) {
1483
+ var ptr0 = isLikeNone(arg0)
1484
+ ? 0
1485
+ : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1486
+ var len0 = WASM_VECTOR_LEN;
1487
+ wasm.__wbg_set_outgoingmessage_topic(this.__wbg_ptr, ptr0, len0);
1488
+ }
1489
+ /**
1490
+ * @param {Uint8Array} payload
1491
+ * @param {Endpoint} destination
1492
+ * @param {string | null} [topic]
1493
+ */
1494
+ constructor(payload, destination, topic) {
1495
+ const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
1496
+ const len0 = WASM_VECTOR_LEN;
1497
+ var ptr1 = isLikeNone(topic)
1498
+ ? 0
1499
+ : passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1500
+ var len1 = WASM_VECTOR_LEN;
1501
+ const ret = wasm.outgoingmessage_new(ptr0, len0, addHeapObject(destination), ptr1, len1);
1502
+ this.__wbg_ptr = ret >>> 0;
1503
+ OutgoingMessageFinalization.register(this, this.__wbg_ptr, this);
1504
+ return this;
1505
+ }
1506
+ /**
1507
+ * Create a new message and encode the payload as JSON.
1508
+ * @param {any} payload
1509
+ * @param {Endpoint} destination
1510
+ * @param {string | null} [topic]
1511
+ * @returns {OutgoingMessage}
1512
+ */
1513
+ static new_json_payload(payload, destination, topic) {
1514
+ try {
1515
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1516
+ var ptr0 = isLikeNone(topic)
1517
+ ? 0
1518
+ : passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1519
+ var len0 = WASM_VECTOR_LEN;
1520
+ wasm.outgoingmessage_new_json_payload(
1521
+ retptr,
1522
+ addHeapObject(payload),
1523
+ addHeapObject(destination),
1524
+ ptr0,
1525
+ len0,
1526
+ );
1527
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1528
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1529
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1530
+ if (r2) {
1531
+ throw takeObject(r1);
1532
+ }
1533
+ return OutgoingMessage.__wrap(r0);
1534
+ } finally {
1535
+ wasm.__wbindgen_add_to_stack_pointer(16);
1536
+ }
1537
+ }
637
1538
  }
638
1539
 
639
- export function __wbindgen_object_drop_ref(arg0) {
640
- takeObject(arg0);
1540
+ const PureCryptoFinalization =
1541
+ typeof FinalizationRegistry === "undefined"
1542
+ ? { register: () => {}, unregister: () => {} }
1543
+ : new FinalizationRegistry((ptr) => wasm.__wbg_purecrypto_free(ptr >>> 0, 1));
1544
+ /**
1545
+ * This module represents a stopgap solution to provide access to primitive crypto functions for JS
1546
+ * clients. It is not intended to be used outside of the JS clients and this pattern should not be
1547
+ * proliferated. It is necessary because we want to use SDK crypto prior to the SDK being fully
1548
+ * responsible for state and keys.
1549
+ */
1550
+ export class PureCrypto {
1551
+ __destroy_into_raw() {
1552
+ const ptr = this.__wbg_ptr;
1553
+ this.__wbg_ptr = 0;
1554
+ PureCryptoFinalization.unregister(this);
1555
+ return ptr;
1556
+ }
1557
+
1558
+ free() {
1559
+ const ptr = this.__destroy_into_raw();
1560
+ wasm.__wbg_purecrypto_free(ptr, 0);
1561
+ }
1562
+ /**
1563
+ * @param {string} enc_string
1564
+ * @param {Uint8Array} key
1565
+ * @returns {string}
1566
+ */
1567
+ static symmetric_decrypt(enc_string, key) {
1568
+ let deferred4_0;
1569
+ let deferred4_1;
1570
+ try {
1571
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1572
+ const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1573
+ const len0 = WASM_VECTOR_LEN;
1574
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
1575
+ const len1 = WASM_VECTOR_LEN;
1576
+ wasm.purecrypto_symmetric_decrypt(retptr, ptr0, len0, ptr1, len1);
1577
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1578
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1579
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1580
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1581
+ var ptr3 = r0;
1582
+ var len3 = r1;
1583
+ if (r3) {
1584
+ ptr3 = 0;
1585
+ len3 = 0;
1586
+ throw takeObject(r2);
1587
+ }
1588
+ deferred4_0 = ptr3;
1589
+ deferred4_1 = len3;
1590
+ return getStringFromWasm0(ptr3, len3);
1591
+ } finally {
1592
+ wasm.__wbindgen_add_to_stack_pointer(16);
1593
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
1594
+ }
1595
+ }
1596
+ /**
1597
+ * @param {string} enc_string
1598
+ * @param {Uint8Array} key
1599
+ * @returns {Uint8Array}
1600
+ */
1601
+ static symmetric_decrypt_to_bytes(enc_string, key) {
1602
+ try {
1603
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1604
+ const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1605
+ const len0 = WASM_VECTOR_LEN;
1606
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
1607
+ const len1 = WASM_VECTOR_LEN;
1608
+ wasm.purecrypto_symmetric_decrypt_to_bytes(retptr, ptr0, len0, ptr1, len1);
1609
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1610
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1611
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1612
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1613
+ if (r3) {
1614
+ throw takeObject(r2);
1615
+ }
1616
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
1617
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1618
+ return v3;
1619
+ } finally {
1620
+ wasm.__wbindgen_add_to_stack_pointer(16);
1621
+ }
1622
+ }
1623
+ /**
1624
+ * @param {Uint8Array} enc_bytes
1625
+ * @param {Uint8Array} key
1626
+ * @returns {Uint8Array}
1627
+ */
1628
+ static symmetric_decrypt_array_buffer(enc_bytes, key) {
1629
+ try {
1630
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1631
+ const ptr0 = passArray8ToWasm0(enc_bytes, wasm.__wbindgen_malloc);
1632
+ const len0 = WASM_VECTOR_LEN;
1633
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
1634
+ const len1 = WASM_VECTOR_LEN;
1635
+ wasm.purecrypto_symmetric_decrypt_array_buffer(retptr, ptr0, len0, ptr1, len1);
1636
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1637
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1638
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1639
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1640
+ if (r3) {
1641
+ throw takeObject(r2);
1642
+ }
1643
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
1644
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1645
+ return v3;
1646
+ } finally {
1647
+ wasm.__wbindgen_add_to_stack_pointer(16);
1648
+ }
1649
+ }
1650
+ /**
1651
+ * @param {string} plain
1652
+ * @param {Uint8Array} key
1653
+ * @returns {string}
1654
+ */
1655
+ static symmetric_encrypt(plain, key) {
1656
+ let deferred4_0;
1657
+ let deferred4_1;
1658
+ try {
1659
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1660
+ const ptr0 = passStringToWasm0(plain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1661
+ const len0 = WASM_VECTOR_LEN;
1662
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
1663
+ const len1 = WASM_VECTOR_LEN;
1664
+ wasm.purecrypto_symmetric_encrypt(retptr, ptr0, len0, ptr1, len1);
1665
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1666
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1667
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1668
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1669
+ var ptr3 = r0;
1670
+ var len3 = r1;
1671
+ if (r3) {
1672
+ ptr3 = 0;
1673
+ len3 = 0;
1674
+ throw takeObject(r2);
1675
+ }
1676
+ deferred4_0 = ptr3;
1677
+ deferred4_1 = len3;
1678
+ return getStringFromWasm0(ptr3, len3);
1679
+ } finally {
1680
+ wasm.__wbindgen_add_to_stack_pointer(16);
1681
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
1682
+ }
1683
+ }
1684
+ /**
1685
+ * @param {Uint8Array} plain
1686
+ * @param {Uint8Array} key
1687
+ * @returns {Uint8Array}
1688
+ */
1689
+ static symmetric_encrypt_to_array_buffer(plain, key) {
1690
+ try {
1691
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1692
+ const ptr0 = passArray8ToWasm0(plain, wasm.__wbindgen_malloc);
1693
+ const len0 = WASM_VECTOR_LEN;
1694
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
1695
+ const len1 = WASM_VECTOR_LEN;
1696
+ wasm.purecrypto_symmetric_encrypt_to_array_buffer(retptr, ptr0, len0, ptr1, len1);
1697
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1698
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1699
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1700
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1701
+ if (r3) {
1702
+ throw takeObject(r2);
1703
+ }
1704
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
1705
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1706
+ return v3;
1707
+ } finally {
1708
+ wasm.__wbindgen_add_to_stack_pointer(16);
1709
+ }
1710
+ }
641
1711
  }
642
1712
 
643
- export function __wbindgen_string_get(arg0, arg1) {
644
- const obj = getObject(arg1);
645
- const ret = typeof obj === "string" ? obj : undefined;
646
- var ptr1 = isLikeNone(ret)
647
- ? 0
648
- : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
649
- var len1 = WASM_VECTOR_LEN;
1713
+ const ReceiveErrorFinalization =
1714
+ typeof FinalizationRegistry === "undefined"
1715
+ ? { register: () => {}, unregister: () => {} }
1716
+ : new FinalizationRegistry((ptr) => wasm.__wbg_receiveerror_free(ptr >>> 0, 1));
1717
+
1718
+ export class ReceiveError {
1719
+ static __wrap(ptr) {
1720
+ ptr = ptr >>> 0;
1721
+ const obj = Object.create(ReceiveError.prototype);
1722
+ obj.__wbg_ptr = ptr;
1723
+ ReceiveErrorFinalization.register(obj, obj.__wbg_ptr, obj);
1724
+ return obj;
1725
+ }
1726
+
1727
+ __destroy_into_raw() {
1728
+ const ptr = this.__wbg_ptr;
1729
+ this.__wbg_ptr = 0;
1730
+ ReceiveErrorFinalization.unregister(this);
1731
+ return ptr;
1732
+ }
1733
+
1734
+ free() {
1735
+ const ptr = this.__destroy_into_raw();
1736
+ wasm.__wbg_receiveerror_free(ptr, 0);
1737
+ }
1738
+ /**
1739
+ * @returns {boolean}
1740
+ */
1741
+ get timeout() {
1742
+ const ret = wasm.__wbg_get_receiveerror_timeout(this.__wbg_ptr);
1743
+ return ret !== 0;
1744
+ }
1745
+ /**
1746
+ * @param {boolean} arg0
1747
+ */
1748
+ set timeout(arg0) {
1749
+ wasm.__wbg_set_receiveerror_timeout(this.__wbg_ptr, arg0);
1750
+ }
1751
+ /**
1752
+ * @returns {any}
1753
+ */
1754
+ get crypto() {
1755
+ const ret = wasm.__wbg_get_receiveerror_crypto(this.__wbg_ptr);
1756
+ return takeObject(ret);
1757
+ }
1758
+ /**
1759
+ * @param {any} arg0
1760
+ */
1761
+ set crypto(arg0) {
1762
+ wasm.__wbg_set_receiveerror_crypto(this.__wbg_ptr, addHeapObject(arg0));
1763
+ }
1764
+ /**
1765
+ * @returns {any}
1766
+ */
1767
+ get communication() {
1768
+ const ret = wasm.__wbg_get_receiveerror_communication(this.__wbg_ptr);
1769
+ return takeObject(ret);
1770
+ }
1771
+ /**
1772
+ * @param {any} arg0
1773
+ */
1774
+ set communication(arg0) {
1775
+ wasm.__wbg_set_receiveerror_communication(this.__wbg_ptr, addHeapObject(arg0));
1776
+ }
1777
+ }
1778
+
1779
+ const SendErrorFinalization =
1780
+ typeof FinalizationRegistry === "undefined"
1781
+ ? { register: () => {}, unregister: () => {} }
1782
+ : new FinalizationRegistry((ptr) => wasm.__wbg_senderror_free(ptr >>> 0, 1));
1783
+
1784
+ export class SendError {
1785
+ static __wrap(ptr) {
1786
+ ptr = ptr >>> 0;
1787
+ const obj = Object.create(SendError.prototype);
1788
+ obj.__wbg_ptr = ptr;
1789
+ SendErrorFinalization.register(obj, obj.__wbg_ptr, obj);
1790
+ return obj;
1791
+ }
1792
+
1793
+ __destroy_into_raw() {
1794
+ const ptr = this.__wbg_ptr;
1795
+ this.__wbg_ptr = 0;
1796
+ SendErrorFinalization.unregister(this);
1797
+ return ptr;
1798
+ }
1799
+
1800
+ free() {
1801
+ const ptr = this.__destroy_into_raw();
1802
+ wasm.__wbg_senderror_free(ptr, 0);
1803
+ }
1804
+ /**
1805
+ * @returns {any}
1806
+ */
1807
+ get crypto() {
1808
+ const ret = wasm.__wbg_get_receiveerror_crypto(this.__wbg_ptr);
1809
+ return takeObject(ret);
1810
+ }
1811
+ /**
1812
+ * @param {any} arg0
1813
+ */
1814
+ set crypto(arg0) {
1815
+ wasm.__wbg_set_receiveerror_crypto(this.__wbg_ptr, addHeapObject(arg0));
1816
+ }
1817
+ /**
1818
+ * @returns {any}
1819
+ */
1820
+ get communication() {
1821
+ const ret = wasm.__wbg_get_receiveerror_communication(this.__wbg_ptr);
1822
+ return takeObject(ret);
1823
+ }
1824
+ /**
1825
+ * @param {any} arg0
1826
+ */
1827
+ set communication(arg0) {
1828
+ wasm.__wbg_set_receiveerror_communication(this.__wbg_ptr, addHeapObject(arg0));
1829
+ }
1830
+ }
1831
+
1832
+ const VaultClientFinalization =
1833
+ typeof FinalizationRegistry === "undefined"
1834
+ ? { register: () => {}, unregister: () => {} }
1835
+ : new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
1836
+
1837
+ export class VaultClient {
1838
+ static __wrap(ptr) {
1839
+ ptr = ptr >>> 0;
1840
+ const obj = Object.create(VaultClient.prototype);
1841
+ obj.__wbg_ptr = ptr;
1842
+ VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
1843
+ return obj;
1844
+ }
1845
+
1846
+ __destroy_into_raw() {
1847
+ const ptr = this.__wbg_ptr;
1848
+ this.__wbg_ptr = 0;
1849
+ VaultClientFinalization.unregister(this);
1850
+ return ptr;
1851
+ }
1852
+
1853
+ free() {
1854
+ const ptr = this.__destroy_into_raw();
1855
+ wasm.__wbg_vaultclient_free(ptr, 0);
1856
+ }
1857
+ /**
1858
+ * @returns {ClientCiphers}
1859
+ */
1860
+ ciphers() {
1861
+ const ret = wasm.vaultclient_ciphers(this.__wbg_ptr);
1862
+ return ClientCiphers.__wrap(ret);
1863
+ }
1864
+ /**
1865
+ * @returns {ClientFolders}
1866
+ */
1867
+ folders() {
1868
+ const ret = wasm.vaultclient_ciphers(this.__wbg_ptr);
1869
+ return ClientFolders.__wrap(ret);
1870
+ }
1871
+ /**
1872
+ * @returns {ClientTotp}
1873
+ */
1874
+ totp() {
1875
+ const ret = wasm.vaultclient_totp(this.__wbg_ptr);
1876
+ return ClientTotp.__wrap(ret);
1877
+ }
1878
+ }
1879
+
1880
+ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
1881
+ const ret = String(getObject(arg1));
1882
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1883
+ const len1 = WASM_VECTOR_LEN;
650
1884
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
651
1885
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
652
1886
  }
653
1887
 
654
- export function __wbindgen_jsval_loose_eq(arg0, arg1) {
655
- const ret = getObject(arg0) == getObject(arg1);
656
- return ret;
1888
+ export function __wbg_abort_775ef1d17fc65868(arg0) {
1889
+ getObject(arg0).abort();
1890
+ }
1891
+
1892
+ export function __wbg_append_299d5d48292c0495() {
1893
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1894
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1895
+ }, arguments);
1896
+ }
1897
+
1898
+ export function __wbg_append_8c7dd8d641a5f01b() {
1899
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1900
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1901
+ }, arguments);
1902
+ }
1903
+
1904
+ export function __wbg_append_b2d1fc16de2a0e81() {
1905
+ return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1906
+ getObject(arg0).append(
1907
+ getStringFromWasm0(arg1, arg2),
1908
+ getObject(arg3),
1909
+ getStringFromWasm0(arg4, arg5),
1910
+ );
1911
+ }, arguments);
657
1912
  }
658
1913
 
659
- export function __wbindgen_is_object(arg0) {
660
- const val = getObject(arg0);
661
- const ret = typeof val === "object" && val !== null;
662
- return ret;
1914
+ export function __wbg_append_b44785ebeb668479() {
1915
+ return handleError(function (arg0, arg1, arg2, arg3) {
1916
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
1917
+ }, arguments);
663
1918
  }
664
1919
 
665
- export function __wbg_getwithrefkey_edc2c8960f0f1191(arg0, arg1) {
666
- const ret = getObject(arg0)[getObject(arg1)];
1920
+ export function __wbg_buffer_609cc3eee51ed158(arg0) {
1921
+ const ret = getObject(arg0).buffer;
667
1922
  return addHeapObject(ret);
668
1923
  }
669
1924
 
670
- export function __wbindgen_is_undefined(arg0) {
671
- const ret = getObject(arg0) === undefined;
672
- return ret;
1925
+ export function __wbg_call_672a4d21634d4a24() {
1926
+ return handleError(function (arg0, arg1) {
1927
+ const ret = getObject(arg0).call(getObject(arg1));
1928
+ return addHeapObject(ret);
1929
+ }, arguments);
673
1930
  }
674
1931
 
675
- export function __wbindgen_in(arg0, arg1) {
676
- const ret = getObject(arg0) in getObject(arg1);
677
- return ret;
1932
+ export function __wbg_call_7cccdd69e0791ae2() {
1933
+ return handleError(function (arg0, arg1, arg2) {
1934
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1935
+ return addHeapObject(ret);
1936
+ }, arguments);
678
1937
  }
679
1938
 
680
- export function __wbg_isSafeInteger_b9dff570f01a9100(arg0) {
681
- const ret = Number.isSafeInteger(getObject(arg0));
682
- return ret;
1939
+ export function __wbg_crypto_ed58b8e10a292839(arg0) {
1940
+ const ret = getObject(arg0).crypto;
1941
+ return addHeapObject(ret);
683
1942
  }
684
1943
 
685
- export function __wbindgen_as_number(arg0) {
686
- const ret = +getObject(arg0);
687
- return ret;
1944
+ export function __wbg_debug_e17b51583ca6a632(arg0, arg1, arg2, arg3) {
1945
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
688
1946
  }
689
1947
 
690
- export function __wbindgen_is_string(arg0) {
691
- const ret = typeof getObject(arg0) === "string";
1948
+ export function __wbg_done_769e5ede4b31c67b(arg0) {
1949
+ const ret = getObject(arg0).done;
692
1950
  return ret;
693
1951
  }
694
1952
 
695
- export function __wbg_entries_c02034de337d3ee2(arg0) {
1953
+ export function __wbg_entries_3265d4158b33e5dc(arg0) {
696
1954
  const ret = Object.entries(getObject(arg0));
697
1955
  return addHeapObject(ret);
698
1956
  }
699
1957
 
700
- export function __wbg_length_f217bbbf7e8e4df4(arg0) {
701
- const ret = getObject(arg0).length;
702
- return ret;
1958
+ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
1959
+ let deferred0_0;
1960
+ let deferred0_1;
1961
+ try {
1962
+ deferred0_0 = arg0;
1963
+ deferred0_1 = arg1;
1964
+ console.error(getStringFromWasm0(arg0, arg1));
1965
+ } finally {
1966
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1967
+ }
703
1968
  }
704
1969
 
705
- export function __wbg_get_5419cf6b954aa11d(arg0, arg1) {
706
- const ret = getObject(arg0)[arg1 >>> 0];
707
- return addHeapObject(ret);
1970
+ export function __wbg_error_80de38b3f7cc3c3c(arg0, arg1, arg2, arg3) {
1971
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
708
1972
  }
709
1973
 
710
- export function __wbg_call_3bfa248576352471() {
711
- return handleError(function (arg0, arg1, arg2) {
712
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
713
- return addHeapObject(ret);
714
- }, arguments);
1974
+ export function __wbg_fetch_4465c2b10f21a927(arg0) {
1975
+ const ret = fetch(getObject(arg0));
1976
+ return addHeapObject(ret);
715
1977
  }
716
1978
 
717
- export function __wbindgen_object_clone_ref(arg0) {
718
- const ret = getObject(arg0);
1979
+ export function __wbg_fetch_509096533071c657(arg0, arg1) {
1980
+ const ret = getObject(arg0).fetch(getObject(arg1));
719
1981
  return addHeapObject(ret);
720
1982
  }
721
1983
 
722
- export function __wbg_new_e69b5f66fda8f13c() {
723
- const ret = new Object();
724
- return addHeapObject(ret);
1984
+ export function __wbg_getRandomValues_bcb4912f16000dc4() {
1985
+ return handleError(function (arg0, arg1) {
1986
+ getObject(arg0).getRandomValues(getObject(arg1));
1987
+ }, arguments);
725
1988
  }
726
1989
 
727
- export function __wbg_setmethod_ce2da76000b02f6a(arg0, arg1, arg2) {
728
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1990
+ export function __wbg_getTime_46267b1c24877e30(arg0) {
1991
+ const ret = getObject(arg0).getTime();
1992
+ return ret;
729
1993
  }
730
1994
 
731
- export function __wbg_new_a9ae04a5200606a5() {
732
- return handleError(function () {
733
- const ret = new Headers();
1995
+ export function __wbg_get_67b2ba62fc30de12() {
1996
+ return handleError(function (arg0, arg1) {
1997
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
734
1998
  return addHeapObject(ret);
735
1999
  }, arguments);
736
2000
  }
737
2001
 
738
- export function __wbg_setheaders_f5205d36e423a544(arg0, arg1) {
739
- getObject(arg0).headers = getObject(arg1);
740
- }
741
-
742
- export function __wbg_setmode_4919fd636102c586(arg0, arg1) {
743
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
2002
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
2003
+ const ret = getObject(arg0)[arg1 >>> 0];
2004
+ return addHeapObject(ret);
744
2005
  }
745
2006
 
746
- export function __wbg_setcredentials_a4e661320cdb9738(arg0, arg1) {
747
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
2007
+ export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
2008
+ const ret = getObject(arg0)[getObject(arg1)];
2009
+ return addHeapObject(ret);
748
2010
  }
749
2011
 
750
- export function __wbg_setbody_aa8b691bec428bf4(arg0, arg1) {
751
- getObject(arg0).body = getObject(arg1);
2012
+ export function __wbg_has_a5ea9117f258a0ec() {
2013
+ return handleError(function (arg0, arg1) {
2014
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
2015
+ return ret;
2016
+ }, arguments);
752
2017
  }
753
2018
 
754
- export function __wbg_signal_9acfcec9e7dffc22(arg0) {
755
- const ret = getObject(arg0).signal;
2019
+ export function __wbg_headers_9cb51cfd2ac780a4(arg0) {
2020
+ const ret = getObject(arg0).headers;
756
2021
  return addHeapObject(ret);
757
2022
  }
758
2023
 
759
- export function __wbg_setsignal_812ccb8269a7fd90(arg0, arg1) {
760
- getObject(arg0).signal = getObject(arg1);
2024
+ export function __wbg_incomingmessage_new(arg0) {
2025
+ const ret = IncomingMessage.__wrap(arg0);
2026
+ return addHeapObject(ret);
761
2027
  }
762
2028
 
763
- export function __wbg_append_8b3e7f74a47ea7d5() {
764
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
765
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
766
- }, arguments);
2029
+ export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
2030
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
767
2031
  }
768
2032
 
769
- export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
2033
+ export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
770
2034
  let result;
771
2035
  try {
772
- result = getObject(arg0) instanceof Response;
2036
+ result = getObject(arg0) instanceof ArrayBuffer;
773
2037
  } catch (_) {
774
2038
  result = false;
775
2039
  }
@@ -777,82 +2041,93 @@ export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
777
2041
  return ret;
778
2042
  }
779
2043
 
780
- export function __wbg_status_5f4e900d22140a18(arg0) {
781
- const ret = getObject(arg0).status;
2044
+ export function __wbg_instanceof_Map_f3469ce2244d2430(arg0) {
2045
+ let result;
2046
+ try {
2047
+ result = getObject(arg0) instanceof Map;
2048
+ } catch (_) {
2049
+ result = false;
2050
+ }
2051
+ const ret = result;
782
2052
  return ret;
783
2053
  }
784
2054
 
785
- export function __wbg_url_58af972663531d16(arg0, arg1) {
786
- const ret = getObject(arg1).url;
787
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
788
- const len1 = WASM_VECTOR_LEN;
789
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
790
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2055
+ export function __wbg_instanceof_Response_f2cc20d9f7dfd644(arg0) {
2056
+ let result;
2057
+ try {
2058
+ result = getObject(arg0) instanceof Response;
2059
+ } catch (_) {
2060
+ result = false;
2061
+ }
2062
+ const ret = result;
2063
+ return ret;
791
2064
  }
792
2065
 
793
- export function __wbg_headers_1b9bf90c73fae600(arg0) {
794
- const ret = getObject(arg0).headers;
795
- return addHeapObject(ret);
2066
+ export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
2067
+ let result;
2068
+ try {
2069
+ result = getObject(arg0) instanceof Uint8Array;
2070
+ } catch (_) {
2071
+ result = false;
2072
+ }
2073
+ const ret = result;
2074
+ return ret;
796
2075
  }
797
2076
 
798
- export function __wbg_next_b06e115d1b01e10b() {
799
- return handleError(function (arg0) {
800
- const ret = getObject(arg0).next();
801
- return addHeapObject(ret);
802
- }, arguments);
2077
+ export function __wbg_isArray_a1eab7e0d067391b(arg0) {
2078
+ const ret = Array.isArray(getObject(arg0));
2079
+ return ret;
803
2080
  }
804
2081
 
805
- export function __wbg_done_983b5ffcaec8c583(arg0) {
806
- const ret = getObject(arg0).done;
2082
+ export function __wbg_isSafeInteger_343e2beeeece1bb0(arg0) {
2083
+ const ret = Number.isSafeInteger(getObject(arg0));
807
2084
  return ret;
808
2085
  }
809
2086
 
810
- export function __wbg_value_2ab8a198c834c26a(arg0) {
811
- const ret = getObject(arg0).value;
2087
+ export function __wbg_iterator_9a24c88df860dc65() {
2088
+ const ret = Symbol.iterator;
812
2089
  return addHeapObject(ret);
813
2090
  }
814
2091
 
815
- export function __wbg_stringify_eead5648c09faaf8() {
816
- return handleError(function (arg0) {
817
- const ret = JSON.stringify(getObject(arg0));
818
- return addHeapObject(ret);
819
- }, arguments);
2092
+ export function __wbg_length_a446193dc22c12f8(arg0) {
2093
+ const ret = getObject(arg0).length;
2094
+ return ret;
820
2095
  }
821
2096
 
822
- export function __wbg_abort_c57daab47a6c1215(arg0) {
823
- getObject(arg0).abort();
2097
+ export function __wbg_length_e2d2a49132c1b256(arg0) {
2098
+ const ret = getObject(arg0).length;
2099
+ return ret;
824
2100
  }
825
2101
 
826
- export function __wbg_text_ebeee8b31af4c919() {
827
- return handleError(function (arg0) {
828
- const ret = getObject(arg0).text();
829
- return addHeapObject(ret);
830
- }, arguments);
2102
+ export function __wbg_log_cad59bb680daec67(arg0, arg1, arg2, arg3) {
2103
+ console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
831
2104
  }
832
2105
 
833
- export function __wbindgen_cb_drop(arg0) {
834
- const obj = takeObject(arg0).original;
835
- if (obj.cnt-- == 1) {
836
- obj.a = 0;
837
- return true;
838
- }
839
- const ret = false;
840
- return ret;
2106
+ export function __wbg_msCrypto_0a36e2ec3a343d26(arg0) {
2107
+ const ret = getObject(arg0).msCrypto;
2108
+ return addHeapObject(ret);
841
2109
  }
842
2110
 
843
- export function __wbindgen_error_new(arg0, arg1) {
844
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2111
+ export function __wbg_new0_f788a2397c7ca929() {
2112
+ const ret = new Date();
845
2113
  return addHeapObject(ret);
846
2114
  }
847
2115
 
848
- export function __wbg_new_1073970097e5a420(arg0, arg1) {
2116
+ export function __wbg_new_018dcc2d6c8c2f6a() {
2117
+ return handleError(function () {
2118
+ const ret = new Headers();
2119
+ return addHeapObject(ret);
2120
+ }, arguments);
2121
+ }
2122
+
2123
+ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
849
2124
  try {
850
2125
  var state0 = { a: arg0, b: arg1 };
851
2126
  var cb0 = (arg0, arg1) => {
852
2127
  const a = state0.a;
853
2128
  state0.a = 0;
854
2129
  try {
855
- return __wbg_adapter_125(a, state0.b, arg0, arg1);
2130
+ return __wbg_adapter_217(a, state0.b, arg0, arg1);
856
2131
  } finally {
857
2132
  state0.a = a;
858
2133
  }
@@ -864,287 +2139,345 @@ export function __wbg_new_1073970097e5a420(arg0, arg1) {
864
2139
  }
865
2140
  }
866
2141
 
867
- export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
868
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2142
+ export function __wbg_new_405e22f390576ce2() {
2143
+ const ret = new Object();
2144
+ return addHeapObject(ret);
2145
+ }
2146
+
2147
+ export function __wbg_new_78feb108b6472713() {
2148
+ const ret = new Array();
2149
+ return addHeapObject(ret);
869
2150
  }
870
2151
 
871
- export function __wbg_new_abda76e883ba8a5f() {
2152
+ export function __wbg_new_8a6f238a6ece86ea() {
872
2153
  const ret = new Error();
873
2154
  return addHeapObject(ret);
874
2155
  }
875
2156
 
876
- export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
877
- const ret = getObject(arg1).stack;
878
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
879
- const len1 = WASM_VECTOR_LEN;
880
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
881
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2157
+ export function __wbg_new_9fd39a253424609a() {
2158
+ return handleError(function () {
2159
+ const ret = new FormData();
2160
+ return addHeapObject(ret);
2161
+ }, arguments);
2162
+ }
2163
+
2164
+ export function __wbg_new_a12002a7f91c75be(arg0) {
2165
+ const ret = new Uint8Array(getObject(arg0));
2166
+ return addHeapObject(ret);
2167
+ }
2168
+
2169
+ export function __wbg_new_c68d7209be747379(arg0, arg1) {
2170
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2171
+ return addHeapObject(ret);
2172
+ }
2173
+
2174
+ export function __wbg_new_e25e5aab09ff45db() {
2175
+ return handleError(function () {
2176
+ const ret = new AbortController();
2177
+ return addHeapObject(ret);
2178
+ }, arguments);
882
2179
  }
883
2180
 
884
- export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
2181
+ export function __wbg_new_f24b6d53abe5bc82(arg0, arg1) {
885
2182
  let deferred0_0;
886
2183
  let deferred0_1;
887
2184
  try {
888
2185
  deferred0_0 = arg0;
889
2186
  deferred0_1 = arg1;
890
- console.error(getStringFromWasm0(arg0, arg1));
2187
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2188
+ return addHeapObject(ret);
891
2189
  } finally {
892
2190
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
893
2191
  }
894
2192
  }
895
2193
 
896
- export function __wbg_crypto_1d1f22824a6a080c(arg0) {
897
- const ret = getObject(arg0).crypto;
2194
+ export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
2195
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
898
2196
  return addHeapObject(ret);
899
2197
  }
900
2198
 
901
- export function __wbg_process_4a72847cc503995b(arg0) {
902
- const ret = getObject(arg0).process;
2199
+ export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) {
2200
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
903
2201
  return addHeapObject(ret);
904
2202
  }
905
2203
 
906
- export function __wbg_versions_f686565e586dd935(arg0) {
907
- const ret = getObject(arg0).versions;
2204
+ export function __wbg_newwithlength_a381634e90c276d4(arg0) {
2205
+ const ret = new Uint8Array(arg0 >>> 0);
908
2206
  return addHeapObject(ret);
909
2207
  }
910
2208
 
911
- export function __wbg_node_104a2ff8d6ea03a2(arg0) {
912
- const ret = getObject(arg0).node;
913
- return addHeapObject(ret);
2209
+ export function __wbg_newwithstrandinit_06c535e0a867c635() {
2210
+ return handleError(function (arg0, arg1, arg2) {
2211
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
2212
+ return addHeapObject(ret);
2213
+ }, arguments);
914
2214
  }
915
2215
 
916
- export function __wbg_require_cca90b1a94a0255b() {
917
- return handleError(function () {
918
- const ret = module.require;
2216
+ export function __wbg_newwithu8arraysequenceandoptions_068570c487f69127() {
2217
+ return handleError(function (arg0, arg1) {
2218
+ const ret = new Blob(getObject(arg0), getObject(arg1));
919
2219
  return addHeapObject(ret);
920
2220
  }, arguments);
921
2221
  }
922
2222
 
923
- export function __wbindgen_is_function(arg0) {
924
- const ret = typeof getObject(arg0) === "function";
925
- return ret;
2223
+ export function __wbg_next_25feadfc0913fea9(arg0) {
2224
+ const ret = getObject(arg0).next;
2225
+ return addHeapObject(ret);
926
2226
  }
927
2227
 
928
- export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
929
- const ret = getObject(arg0).msCrypto;
930
- return addHeapObject(ret);
2228
+ export function __wbg_next_6574e1a8a62d1055() {
2229
+ return handleError(function (arg0) {
2230
+ const ret = getObject(arg0).next();
2231
+ return addHeapObject(ret);
2232
+ }, arguments);
931
2233
  }
932
2234
 
933
- export function __wbg_newwithlength_76462a666eca145f(arg0) {
934
- const ret = new Uint8Array(arg0 >>> 0);
2235
+ export function __wbg_node_02999533c4ea02e3(arg0) {
2236
+ const ret = getObject(arg0).node;
935
2237
  return addHeapObject(ret);
936
2238
  }
937
2239
 
938
- export function __wbindgen_memory() {
939
- const ret = wasm.memory;
2240
+ export function __wbg_parse_def2e24ef1252aff() {
2241
+ return handleError(function (arg0, arg1) {
2242
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
2243
+ return addHeapObject(ret);
2244
+ }, arguments);
2245
+ }
2246
+
2247
+ export function __wbg_process_5c1d670bc53614b8(arg0) {
2248
+ const ret = getObject(arg0).process;
940
2249
  return addHeapObject(ret);
941
2250
  }
942
2251
 
943
- export function __wbg_buffer_ccaed51a635d8a2d(arg0) {
944
- const ret = getObject(arg0).buffer;
2252
+ export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
2253
+ const ret = getObject(arg0).push(getObject(arg1));
2254
+ return ret;
2255
+ }
2256
+
2257
+ export function __wbg_queueMicrotask_97d92b4fcc8a61c5(arg0) {
2258
+ queueMicrotask(getObject(arg0));
2259
+ }
2260
+
2261
+ export function __wbg_queueMicrotask_d3219def82552485(arg0) {
2262
+ const ret = getObject(arg0).queueMicrotask;
945
2263
  return addHeapObject(ret);
946
2264
  }
947
2265
 
948
- export function __wbg_newwithbyteoffsetandlength_7e3eb787208af730(arg0, arg1, arg2) {
949
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2266
+ export function __wbg_randomFillSync_ab2cfe79ebbf2740() {
2267
+ return handleError(function (arg0, arg1) {
2268
+ getObject(arg0).randomFillSync(takeObject(arg1));
2269
+ }, arguments);
2270
+ }
2271
+
2272
+ export function __wbg_receive_9512d555fb8b5130() {
2273
+ return handleError(function (arg0) {
2274
+ const ret = getObject(arg0).receive();
2275
+ return addHeapObject(ret);
2276
+ }, arguments);
2277
+ }
2278
+
2279
+ export function __wbg_receiveerror_new(arg0) {
2280
+ const ret = ReceiveError.__wrap(arg0);
950
2281
  return addHeapObject(ret);
951
2282
  }
952
2283
 
953
- export function __wbg_randomFillSync_5c9c955aa56b6049() {
954
- return handleError(function (arg0, arg1) {
955
- getObject(arg0).randomFillSync(takeObject(arg1));
2284
+ export function __wbg_require_79b1e9274cde3c87() {
2285
+ return handleError(function () {
2286
+ const ret = module.require;
2287
+ return addHeapObject(ret);
956
2288
  }, arguments);
957
2289
  }
958
2290
 
959
- export function __wbg_subarray_975a06f9dbd16995(arg0, arg1, arg2) {
960
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2291
+ export function __wbg_resolve_4851785c9c5f573d(arg0) {
2292
+ const ret = Promise.resolve(getObject(arg0));
961
2293
  return addHeapObject(ret);
962
2294
  }
963
2295
 
964
- export function __wbg_getRandomValues_3aa56aa6edec874c() {
2296
+ export function __wbg_send_c9eacaae08065b18() {
965
2297
  return handleError(function (arg0, arg1) {
966
- getObject(arg0).getRandomValues(getObject(arg1));
2298
+ const ret = getObject(arg0).send(OutgoingMessage.__wrap(arg1));
2299
+ return addHeapObject(ret);
967
2300
  }, arguments);
968
2301
  }
969
2302
 
970
- export function __wbg_new_fec2611eb9180f95(arg0) {
971
- const ret = new Uint8Array(getObject(arg0));
2303
+ export function __wbg_senderror_new(arg0) {
2304
+ const ret = SendError.__wrap(arg0);
972
2305
  return addHeapObject(ret);
973
2306
  }
974
2307
 
975
- export function __wbg_set_ec2fcf81bc573fd9(arg0, arg1, arg2) {
976
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2308
+ export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
2309
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
977
2310
  }
978
2311
 
979
- export function __wbg_self_bf91bf94d9e04084() {
980
- return handleError(function () {
981
- const ret = self.self;
982
- return addHeapObject(ret);
983
- }, arguments);
2312
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
2313
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
984
2314
  }
985
2315
 
986
- export function __wbg_window_52dd9f07d03fd5f8() {
987
- return handleError(function () {
988
- const ret = window.window;
989
- return addHeapObject(ret);
990
- }, arguments);
2316
+ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
2317
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
991
2318
  }
992
2319
 
993
- export function __wbg_globalThis_05c129bf37fcf1be() {
994
- return handleError(function () {
995
- const ret = globalThis.globalThis;
996
- return addHeapObject(ret);
997
- }, arguments);
2320
+ export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
2321
+ getObject(arg0).body = getObject(arg1);
998
2322
  }
999
2323
 
1000
- export function __wbg_global_3eca19bb09e9c484() {
1001
- return handleError(function () {
1002
- const ret = global.global;
1003
- return addHeapObject(ret);
1004
- }, arguments);
2324
+ export function __wbg_setcredentials_c3a22f1cd105a2c6(arg0, arg1) {
2325
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1005
2326
  }
1006
2327
 
1007
- export function __wbg_newnoargs_1ede4bf2ebbaaf43(arg0, arg1) {
1008
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1009
- return addHeapObject(ret);
2328
+ export function __wbg_setheaders_834c0bdb6a8949ad(arg0, arg1) {
2329
+ getObject(arg0).headers = getObject(arg1);
1010
2330
  }
1011
2331
 
1012
- export function __wbg_call_a9ef466721e824f2() {
1013
- return handleError(function (arg0, arg1) {
1014
- const ret = getObject(arg0).call(getObject(arg1));
1015
- return addHeapObject(ret);
1016
- }, arguments);
2332
+ export function __wbg_setmethod_3c5280fe5d890842(arg0, arg1, arg2) {
2333
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1017
2334
  }
1018
2335
 
1019
- export function __wbg_iterator_695d699a44d6234c() {
1020
- const ret = Symbol.iterator;
1021
- return addHeapObject(ret);
2336
+ export function __wbg_setmode_5dc300b865044b65(arg0, arg1) {
2337
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1022
2338
  }
1023
2339
 
1024
- export function __wbg_next_13b477da1eaa3897(arg0) {
1025
- const ret = getObject(arg0).next;
1026
- return addHeapObject(ret);
2340
+ export function __wbg_setname_c0e2d6f348c746f4(arg0, arg1, arg2) {
2341
+ let deferred0_0;
2342
+ let deferred0_1;
2343
+ try {
2344
+ deferred0_0 = arg1;
2345
+ deferred0_1 = arg2;
2346
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
2347
+ } finally {
2348
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2349
+ }
1027
2350
  }
1028
2351
 
1029
- export function __wbg_new_034f913e7636e987() {
1030
- const ret = new Array();
1031
- return addHeapObject(ret);
2352
+ export function __wbg_setsignal_75b21ef3a81de905(arg0, arg1) {
2353
+ getObject(arg0).signal = getObject(arg1);
1032
2354
  }
1033
2355
 
1034
- export function __wbg_push_36cf4d81d7da33d1(arg0, arg1) {
1035
- const ret = getObject(arg0).push(getObject(arg1));
1036
- return ret;
2356
+ export function __wbg_settype_39ed370d3edd403c(arg0, arg1, arg2) {
2357
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1037
2358
  }
1038
2359
 
1039
- export function __wbg_instanceof_ArrayBuffer_74945570b4a62ec7(arg0) {
1040
- let result;
2360
+ export function __wbg_setvariant_d1d41b778dfe9c17(arg0, arg1, arg2) {
2361
+ let deferred0_0;
2362
+ let deferred0_1;
1041
2363
  try {
1042
- result = getObject(arg0) instanceof ArrayBuffer;
1043
- } catch (_) {
1044
- result = false;
2364
+ deferred0_0 = arg1;
2365
+ deferred0_1 = arg2;
2366
+ getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
2367
+ } finally {
2368
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1045
2369
  }
1046
- const ret = result;
1047
- return ret;
1048
2370
  }
1049
2371
 
1050
- export function __wbg_new_70a2f23d1565c04c(arg0, arg1) {
1051
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2372
+ export function __wbg_signal_aaf9ad74119f20a4(arg0) {
2373
+ const ret = getObject(arg0).signal;
1052
2374
  return addHeapObject(ret);
1053
2375
  }
1054
2376
 
1055
- export function __wbg_has_bd717f25f195f23d() {
1056
- return handleError(function (arg0, arg1) {
1057
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
1058
- return ret;
1059
- }, arguments);
2377
+ export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
2378
+ const ret = getObject(arg1).stack;
2379
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2380
+ const len1 = WASM_VECTOR_LEN;
2381
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2382
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1060
2383
  }
1061
2384
 
1062
- export function __wbg_resolve_0aad7c1484731c99(arg0) {
1063
- const ret = Promise.resolve(getObject(arg0));
1064
- return addHeapObject(ret);
2385
+ export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
2386
+ const ret = typeof global === "undefined" ? null : global;
2387
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1065
2388
  }
1066
2389
 
1067
- export function __wbg_then_748f75edfb032440(arg0, arg1) {
1068
- const ret = getObject(arg0).then(getObject(arg1));
1069
- return addHeapObject(ret);
2390
+ export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
2391
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
2392
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1070
2393
  }
1071
2394
 
1072
- export function __wbg_then_4866a7d9f55d8f3e(arg0, arg1, arg2) {
1073
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1074
- return addHeapObject(ret);
2395
+ export function __wbg_static_accessor_SELF_37c5d418e4bf5819() {
2396
+ const ret = typeof self === "undefined" ? null : self;
2397
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1075
2398
  }
1076
2399
 
1077
- export function __wbg_length_9254c4bd3b9f23c4(arg0) {
1078
- const ret = getObject(arg0).length;
1079
- return ret;
2400
+ export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
2401
+ const ret = typeof window === "undefined" ? null : window;
2402
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1080
2403
  }
1081
2404
 
1082
- export function __wbg_instanceof_Uint8Array_df0761410414ef36(arg0) {
1083
- let result;
1084
- try {
1085
- result = getObject(arg0) instanceof Uint8Array;
1086
- } catch (_) {
1087
- result = false;
1088
- }
1089
- const ret = result;
2405
+ export function __wbg_status_f6360336ca686bf0(arg0) {
2406
+ const ret = getObject(arg0).status;
1090
2407
  return ret;
1091
2408
  }
1092
2409
 
1093
- export function __wbg_new_4e7308fbedde3997() {
1094
- return handleError(function () {
1095
- const ret = new FormData();
2410
+ export function __wbg_stringify_f7ed6987935b4a24() {
2411
+ return handleError(function (arg0) {
2412
+ const ret = JSON.stringify(getObject(arg0));
1096
2413
  return addHeapObject(ret);
1097
2414
  }, arguments);
1098
2415
  }
1099
2416
 
1100
- export function __wbg_append_43a4b1c9d5df4168() {
1101
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1102
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2417
+ export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
2418
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2419
+ return addHeapObject(ret);
2420
+ }
2421
+
2422
+ export function __wbg_text_7805bea50de2af49() {
2423
+ return handleError(function (arg0) {
2424
+ const ret = getObject(arg0).text();
2425
+ return addHeapObject(ret);
1103
2426
  }, arguments);
1104
2427
  }
1105
2428
 
1106
- export function __wbg_settype_623d2ee701e6310a(arg0, arg1, arg2) {
1107
- getObject(arg0).type = getStringFromWasm0(arg1, arg2);
2429
+ export function __wbg_then_44b73946d2fb3e7d(arg0, arg1) {
2430
+ const ret = getObject(arg0).then(getObject(arg1));
2431
+ return addHeapObject(ret);
1108
2432
  }
1109
2433
 
1110
- export function __wbg_newwithu8arraysequenceandoptions_d41c0fdf78490206() {
1111
- return handleError(function (arg0, arg1) {
1112
- const ret = new Blob(getObject(arg0), getObject(arg1));
1113
- return addHeapObject(ret);
1114
- }, arguments);
2434
+ export function __wbg_then_48b406749878a531(arg0, arg1, arg2) {
2435
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2436
+ return addHeapObject(ret);
1115
2437
  }
1116
2438
 
1117
- export function __wbg_append_7ee78799a92a9731() {
1118
- return handleError(function (arg0, arg1, arg2, arg3) {
1119
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
1120
- }, arguments);
2439
+ export function __wbg_url_ae10c34ca209681d(arg0, arg1) {
2440
+ const ret = getObject(arg1).url;
2441
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2442
+ const len1 = WASM_VECTOR_LEN;
2443
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2444
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1121
2445
  }
1122
2446
 
1123
- export function __wbg_append_8135c71037096394() {
1124
- return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1125
- getObject(arg0).append(
1126
- getStringFromWasm0(arg1, arg2),
1127
- getObject(arg3),
1128
- getStringFromWasm0(arg4, arg5),
1129
- );
1130
- }, arguments);
2447
+ export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
2448
+ const ret = getObject(arg0).value;
2449
+ return addHeapObject(ret);
1131
2450
  }
1132
2451
 
1133
- export function __wbg_fetch_f8d735ba6fe1b719(arg0) {
1134
- const ret = fetch(getObject(arg0));
2452
+ export function __wbg_versions_c71aa1626a93e0a1(arg0) {
2453
+ const ret = getObject(arg0).versions;
1135
2454
  return addHeapObject(ret);
1136
2455
  }
1137
2456
 
1138
- export function __wbg_fetch_1fdc4448ed9eec00(arg0, arg1) {
1139
- const ret = getObject(arg0).fetch(getObject(arg1));
2457
+ export function __wbg_warn_aaf1f4664a035bd6(arg0, arg1, arg2, arg3) {
2458
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2459
+ }
2460
+
2461
+ export function __wbindgen_as_number(arg0) {
2462
+ const ret = +getObject(arg0);
2463
+ return ret;
2464
+ }
2465
+
2466
+ export function __wbindgen_bigint_from_i64(arg0) {
2467
+ const ret = arg0;
1140
2468
  return addHeapObject(ret);
1141
2469
  }
1142
2470
 
1143
- export function __wbg_new_75169ae5a9683c55() {
1144
- return handleError(function () {
1145
- const ret = new AbortController();
1146
- return addHeapObject(ret);
1147
- }, arguments);
2471
+ export function __wbindgen_bigint_from_u64(arg0) {
2472
+ const ret = BigInt.asUintN(64, arg0);
2473
+ return addHeapObject(ret);
2474
+ }
2475
+
2476
+ export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
2477
+ const v = getObject(arg1);
2478
+ const ret = typeof v === "bigint" ? v : undefined;
2479
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
2480
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1148
2481
  }
1149
2482
 
1150
2483
  export function __wbindgen_boolean_get(arg0) {
@@ -1153,19 +2486,19 @@ export function __wbindgen_boolean_get(arg0) {
1153
2486
  return ret;
1154
2487
  }
1155
2488
 
1156
- export function __wbindgen_number_get(arg0, arg1) {
1157
- const obj = getObject(arg1);
1158
- const ret = typeof obj === "number" ? obj : undefined;
1159
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1160
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2489
+ export function __wbindgen_cb_drop(arg0) {
2490
+ const obj = takeObject(arg0).original;
2491
+ if (obj.cnt-- == 1) {
2492
+ obj.a = 0;
2493
+ return true;
2494
+ }
2495
+ const ret = false;
2496
+ return ret;
1161
2497
  }
1162
2498
 
1163
- export function __wbg_String_b9412f8799faab3e(arg0, arg1) {
1164
- const ret = String(getObject(arg1));
1165
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1166
- const len1 = WASM_VECTOR_LEN;
1167
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1168
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2499
+ export function __wbindgen_closure_wrapper2563(arg0, arg1, arg2) {
2500
+ const ret = makeMutClosure(arg0, arg1, 634, __wbg_adapter_50);
2501
+ return addHeapObject(ret);
1169
2502
  }
1170
2503
 
1171
2504
  export function __wbindgen_debug_string(arg0, arg1) {
@@ -1176,47 +2509,94 @@ export function __wbindgen_debug_string(arg0, arg1) {
1176
2509
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1177
2510
  }
1178
2511
 
1179
- export function __wbindgen_throw(arg0, arg1) {
1180
- throw new Error(getStringFromWasm0(arg0, arg1));
2512
+ export function __wbindgen_error_new(arg0, arg1) {
2513
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2514
+ return addHeapObject(ret);
1181
2515
  }
1182
2516
 
1183
- export function __wbg_queueMicrotask_848aa4969108a57e(arg0) {
1184
- const ret = getObject(arg0).queueMicrotask;
1185
- return addHeapObject(ret);
2517
+ export function __wbindgen_in(arg0, arg1) {
2518
+ const ret = getObject(arg0) in getObject(arg1);
2519
+ return ret;
1186
2520
  }
1187
2521
 
1188
- export function __wbg_queueMicrotask_c5419c06eab41e73(arg0) {
1189
- queueMicrotask(getObject(arg0));
2522
+ export function __wbindgen_is_bigint(arg0) {
2523
+ const ret = typeof getObject(arg0) === "bigint";
2524
+ return ret;
1190
2525
  }
1191
2526
 
1192
- export function __wbg_newwithstrandinit_4b92c89af0a8e383() {
1193
- return handleError(function (arg0, arg1, arg2) {
1194
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1195
- return addHeapObject(ret);
1196
- }, arguments);
2527
+ export function __wbindgen_is_function(arg0) {
2528
+ const ret = typeof getObject(arg0) === "function";
2529
+ return ret;
1197
2530
  }
1198
2531
 
1199
- export function __wbg_debug_a0b6c2c5ac9a4bfd(arg0, arg1, arg2, arg3) {
1200
- console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2532
+ export function __wbindgen_is_object(arg0) {
2533
+ const val = getObject(arg0);
2534
+ const ret = typeof val === "object" && val !== null;
2535
+ return ret;
1201
2536
  }
1202
2537
 
1203
- export function __wbg_error_4d17c5bb1ca90c94(arg0, arg1, arg2, arg3) {
1204
- console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2538
+ export function __wbindgen_is_string(arg0) {
2539
+ const ret = typeof getObject(arg0) === "string";
2540
+ return ret;
1205
2541
  }
1206
2542
 
1207
- export function __wbg_info_1c7fba7da21072d1(arg0, arg1, arg2, arg3) {
1208
- console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2543
+ export function __wbindgen_is_undefined(arg0) {
2544
+ const ret = getObject(arg0) === undefined;
2545
+ return ret;
1209
2546
  }
1210
2547
 
1211
- export function __wbg_log_4de37a0274d94769(arg0, arg1, arg2, arg3) {
1212
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2548
+ export function __wbindgen_jsval_eq(arg0, arg1) {
2549
+ const ret = getObject(arg0) === getObject(arg1);
2550
+ return ret;
1213
2551
  }
1214
2552
 
1215
- export function __wbg_warn_2e2787d40aad9a81(arg0, arg1, arg2, arg3) {
1216
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2553
+ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
2554
+ const ret = getObject(arg0) == getObject(arg1);
2555
+ return ret;
2556
+ }
2557
+
2558
+ export function __wbindgen_memory() {
2559
+ const ret = wasm.memory;
2560
+ return addHeapObject(ret);
2561
+ }
2562
+
2563
+ export function __wbindgen_number_get(arg0, arg1) {
2564
+ const obj = getObject(arg1);
2565
+ const ret = typeof obj === "number" ? obj : undefined;
2566
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2567
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2568
+ }
2569
+
2570
+ export function __wbindgen_number_new(arg0) {
2571
+ const ret = arg0;
2572
+ return addHeapObject(ret);
2573
+ }
2574
+
2575
+ export function __wbindgen_object_clone_ref(arg0) {
2576
+ const ret = getObject(arg0);
2577
+ return addHeapObject(ret);
2578
+ }
2579
+
2580
+ export function __wbindgen_object_drop_ref(arg0) {
2581
+ takeObject(arg0);
2582
+ }
2583
+
2584
+ export function __wbindgen_string_get(arg0, arg1) {
2585
+ const obj = getObject(arg1);
2586
+ const ret = typeof obj === "string" ? obj : undefined;
2587
+ var ptr1 = isLikeNone(ret)
2588
+ ? 0
2589
+ : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2590
+ var len1 = WASM_VECTOR_LEN;
2591
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2592
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1217
2593
  }
1218
2594
 
1219
- export function __wbindgen_closure_wrapper1799(arg0, arg1, arg2) {
1220
- const ret = makeMutClosure(arg0, arg1, 491, __wbg_adapter_38);
2595
+ export function __wbindgen_string_new(arg0, arg1) {
2596
+ const ret = getStringFromWasm0(arg0, arg1);
1221
2597
  return addHeapObject(ret);
1222
2598
  }
2599
+
2600
+ export function __wbindgen_throw(arg0, arg1) {
2601
+ throw new Error(getStringFromWasm0(arg0, arg1));
2602
+ }