@contentauth/c2pa-wasm 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pkg/c2pa.js CHANGED
@@ -9,16 +9,16 @@ function getUint8ArrayMemory0() {
9
9
  return cachedUint8ArrayMemory0;
10
10
  }
11
11
 
12
- let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
13
 
14
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
14
+ cachedTextDecoder.decode();
15
15
 
16
16
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
17
  let numBytesDecoded = 0;
18
18
  function decodeText(ptr, len) {
19
19
  numBytesDecoded += len;
20
20
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
- cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
22
  cachedTextDecoder.decode();
23
23
  numBytesDecoded = len;
24
24
  }
@@ -30,80 +30,8 @@ function getStringFromWasm0(ptr, len) {
30
30
  return decodeText(ptr, len);
31
31
  }
32
32
 
33
- function addToExternrefTable0(obj) {
34
- const idx = wasm.__externref_table_alloc();
35
- wasm.__wbindgen_export_2.set(idx, obj);
36
- return idx;
37
- }
38
-
39
- function handleError(f, args) {
40
- try {
41
- return f.apply(this, args);
42
- } catch (e) {
43
- const idx = addToExternrefTable0(e);
44
- wasm.__wbindgen_exn_store(idx);
45
- }
46
- }
47
-
48
- function getArrayU8FromWasm0(ptr, len) {
49
- ptr = ptr >>> 0;
50
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
51
- }
52
-
53
- let WASM_VECTOR_LEN = 0;
54
-
55
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
56
-
57
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
58
- ? function (arg, view) {
59
- return cachedTextEncoder.encodeInto(arg, view);
60
- }
61
- : function (arg, view) {
62
- const buf = cachedTextEncoder.encode(arg);
63
- view.set(buf);
64
- return {
65
- read: arg.length,
66
- written: buf.length
67
- };
68
- });
69
-
70
- function passStringToWasm0(arg, malloc, realloc) {
71
-
72
- if (realloc === undefined) {
73
- const buf = cachedTextEncoder.encode(arg);
74
- const ptr = malloc(buf.length, 1) >>> 0;
75
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
76
- WASM_VECTOR_LEN = buf.length;
77
- return ptr;
78
- }
79
-
80
- let len = arg.length;
81
- let ptr = malloc(len, 1) >>> 0;
82
-
83
- const mem = getUint8ArrayMemory0();
84
-
85
- let offset = 0;
86
-
87
- for (; offset < len; offset++) {
88
- const code = arg.charCodeAt(offset);
89
- if (code > 0x7F) break;
90
- mem[ptr + offset] = code;
91
- }
92
-
93
- if (offset !== len) {
94
- if (offset !== 0) {
95
- arg = arg.slice(offset);
96
- }
97
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
98
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
99
- const ret = encodeString(arg, view);
100
-
101
- offset += ret.written;
102
- ptr = realloc(ptr, len, offset, 1) >>> 0;
103
- }
104
-
105
- WASM_VECTOR_LEN = offset;
106
- return ptr;
33
+ function isLikeNone(x) {
34
+ return x === undefined || x === null;
107
35
  }
108
36
 
109
37
  let cachedDataViewMemory0 = null;
@@ -115,10 +43,6 @@ function getDataViewMemory0() {
115
43
  return cachedDataViewMemory0;
116
44
  }
117
45
 
118
- function isLikeNone(x) {
119
- return x === undefined || x === null;
120
- }
121
-
122
46
  function debugString(val) {
123
47
  // primitive types
124
48
  const type = typeof val;
@@ -184,13 +108,83 @@ function debugString(val) {
184
108
  return className;
185
109
  }
186
110
 
111
+ let WASM_VECTOR_LEN = 0;
112
+
113
+ const cachedTextEncoder = new TextEncoder();
114
+
115
+ if (!('encodeInto' in cachedTextEncoder)) {
116
+ cachedTextEncoder.encodeInto = function (arg, view) {
117
+ const buf = cachedTextEncoder.encode(arg);
118
+ view.set(buf);
119
+ return {
120
+ read: arg.length,
121
+ written: buf.length
122
+ };
123
+ }
124
+ }
125
+
126
+ function passStringToWasm0(arg, malloc, realloc) {
127
+
128
+ if (realloc === undefined) {
129
+ const buf = cachedTextEncoder.encode(arg);
130
+ const ptr = malloc(buf.length, 1) >>> 0;
131
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
132
+ WASM_VECTOR_LEN = buf.length;
133
+ return ptr;
134
+ }
135
+
136
+ let len = arg.length;
137
+ let ptr = malloc(len, 1) >>> 0;
138
+
139
+ const mem = getUint8ArrayMemory0();
140
+
141
+ let offset = 0;
142
+
143
+ for (; offset < len; offset++) {
144
+ const code = arg.charCodeAt(offset);
145
+ if (code > 0x7F) break;
146
+ mem[ptr + offset] = code;
147
+ }
148
+
149
+ if (offset !== len) {
150
+ if (offset !== 0) {
151
+ arg = arg.slice(offset);
152
+ }
153
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
154
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
155
+ const ret = cachedTextEncoder.encodeInto(arg, view);
156
+
157
+ offset += ret.written;
158
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
159
+ }
160
+
161
+ WASM_VECTOR_LEN = offset;
162
+ return ptr;
163
+ }
164
+
165
+ function addToExternrefTable0(obj) {
166
+ const idx = wasm.__externref_table_alloc();
167
+ wasm.__wbindgen_externrefs.set(idx, obj);
168
+ return idx;
169
+ }
170
+
171
+ function handleError(f, args) {
172
+ try {
173
+ return f.apply(this, args);
174
+ } catch (e) {
175
+ const idx = addToExternrefTable0(e);
176
+ wasm.__wbindgen_exn_store(idx);
177
+ }
178
+ }
179
+
180
+ function getArrayU8FromWasm0(ptr, len) {
181
+ ptr = ptr >>> 0;
182
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
183
+ }
184
+
187
185
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
188
186
  ? { register: () => {}, unregister: () => {} }
189
- : new FinalizationRegistry(
190
- state => {
191
- wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
192
- }
193
- );
187
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
194
188
 
195
189
  function makeMutClosure(arg0, arg1, dtor, f) {
196
190
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
@@ -205,24 +199,33 @@ function makeMutClosure(arg0, arg1, dtor, f) {
205
199
  try {
206
200
  return f(a, state.b, ...args);
207
201
  } finally {
208
- if (--state.cnt === 0) {
209
- wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
210
- CLOSURE_DTORS.unregister(state);
211
- } else {
212
- state.a = a;
213
- }
202
+ state.a = a;
203
+ real._wbg_cb_unref();
204
+ }
205
+ };
206
+ real._wbg_cb_unref = () => {
207
+ if (--state.cnt === 0) {
208
+ state.dtor(state.a, state.b);
209
+ state.a = 0;
210
+ CLOSURE_DTORS.unregister(state);
214
211
  }
215
212
  };
216
- real.original = state;
217
213
  CLOSURE_DTORS.register(real, state, state);
218
214
  return real;
219
215
  }
220
216
 
221
217
  function takeFromExternrefTable0(idx) {
222
- const value = wasm.__wbindgen_export_2.get(idx);
218
+ const value = wasm.__wbindgen_externrefs.get(idx);
223
219
  wasm.__externref_table_dealloc(idx);
224
220
  return value;
225
221
  }
222
+ /**
223
+ * Called when the WASM binary is initialized.
224
+ */
225
+ export function run() {
226
+ wasm.run();
227
+ }
228
+
226
229
  /**
227
230
  * Accepts a JSON-serialized string to be loaded as c2pa-rs settings.
228
231
  * @param {string} settings
@@ -236,24 +239,19 @@ export function loadSettings(settings) {
236
239
  }
237
240
  }
238
241
 
239
- /**
240
- * Called when the WASM binary is initialized.
241
- */
242
- export function run() {
243
- wasm.run();
242
+ function wasm_bindgen__convert__closures_____invoke__hbb73f02d9cb5eeb0(arg0, arg1) {
243
+ wasm.wasm_bindgen__convert__closures_____invoke__hbb73f02d9cb5eeb0(arg0, arg1);
244
244
  }
245
245
 
246
- function __wbg_adapter_18(arg0, arg1) {
247
- wasm.wasm_bindgen__convert__closures_____invoke__h09e04d5375df482d(arg0, arg1);
246
+ function wasm_bindgen__convert__closures_____invoke__hedbe22ff1e6181ec(arg0, arg1, arg2) {
247
+ wasm.wasm_bindgen__convert__closures_____invoke__hedbe22ff1e6181ec(arg0, arg1, arg2);
248
248
  }
249
249
 
250
- function __wbg_adapter_23(arg0, arg1, arg2) {
251
- wasm.closure1669_externref_shim(arg0, arg1, arg2);
250
+ function wasm_bindgen__convert__closures_____invoke__h1fd2c9ff95892b8d(arg0, arg1, arg2, arg3) {
251
+ wasm.wasm_bindgen__convert__closures_____invoke__h1fd2c9ff95892b8d(arg0, arg1, arg2, arg3);
252
252
  }
253
253
 
254
- function __wbg_adapter_168(arg0, arg1, arg2, arg3) {
255
- wasm.closure2615_externref_shim(arg0, arg1, arg2, arg3);
256
- }
254
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
257
255
 
258
256
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
259
257
 
@@ -287,19 +285,66 @@ export class WasmBuilder {
287
285
  wasm.__wbg_wasmbuilder_free(ptr, 0);
288
286
  }
289
287
  /**
290
- * Attempts to create a new `WasmBuilder` from a JSON ManifestDefinition string.
291
- * @param {string} json
288
+ * Add an action to the manifest's `Actions` assertion.
289
+ * @param {any} action
290
+ */
291
+ addAction(action) {
292
+ const ret = wasm.wasmbuilder_addAction(this.__wbg_ptr, action);
293
+ if (ret[1]) {
294
+ throw takeFromExternrefTable0(ret[0]);
295
+ }
296
+ }
297
+ /**
298
+ * Sets the builder "intent."
299
+ * @param {any} json_intent
300
+ */
301
+ setIntent(json_intent) {
302
+ const ret = wasm.wasmbuilder_setIntent(this.__wbg_ptr, json_intent);
303
+ if (ret[1]) {
304
+ throw takeFromExternrefTable0(ret[0]);
305
+ }
306
+ }
307
+ /**
308
+ * "Save" a builder to an archive.
309
+ * @returns {Uint8Array}
310
+ */
311
+ toArchive() {
312
+ const ret = wasm.wasmbuilder_toArchive(this.__wbg_ptr);
313
+ if (ret[2]) {
314
+ throw takeFromExternrefTable0(ret[1]);
315
+ }
316
+ return takeFromExternrefTable0(ret[0]);
317
+ }
318
+ /**
319
+ * Attempts to create a new `WasmBuilder` from a builder archive.
320
+ * @param {Blob} archive
292
321
  * @returns {WasmBuilder}
293
322
  */
294
- static fromJson(json) {
295
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
296
- const len0 = WASM_VECTOR_LEN;
297
- const ret = wasm.wasmbuilder_fromJson(ptr0, len0);
323
+ static fromArchive(archive) {
324
+ const ret = wasm.wasmbuilder_fromArchive(archive);
298
325
  if (ret[2]) {
299
326
  throw takeFromExternrefTable0(ret[1]);
300
327
  }
301
328
  return WasmBuilder.__wrap(ret[0]);
302
329
  }
330
+ /**
331
+ * Sets the state of the no_embed flag.
332
+ * @param {boolean} no_embed
333
+ */
334
+ setNoEmbed(no_embed) {
335
+ wasm.wasmbuilder_setNoEmbed(this.__wbg_ptr, no_embed);
336
+ }
337
+ /**
338
+ * Get the current manifest definition.
339
+ * @returns {string}
340
+ */
341
+ getDefinition() {
342
+ const ret = wasm.wasmbuilder_getDefinition(this.__wbg_ptr);
343
+ if (ret[2]) {
344
+ throw takeFromExternrefTable0(ret[1]);
345
+ }
346
+ return takeFromExternrefTable0(ret[0]);
347
+ }
303
348
  /**
304
349
  * Sets the remote_url for a remote manifest.
305
350
  *
@@ -313,11 +358,17 @@ export class WasmBuilder {
313
358
  wasm.wasmbuilder_setRemoteUrl(this.__wbg_ptr, ptr0, len0);
314
359
  }
315
360
  /**
316
- * Sets the state of the no_embed flag.
317
- * @param {boolean} no_embed
361
+ * Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
362
+ * @param {string} id
363
+ * @param {Blob} blob
318
364
  */
319
- setNoEmbed(no_embed) {
320
- wasm.wasmbuilder_setNoEmbed(this.__wbg_ptr, no_embed);
365
+ addResourceFromBlob(id, blob) {
366
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
367
+ const len0 = WASM_VECTOR_LEN;
368
+ const ret = wasm.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, ptr0, len0, blob);
369
+ if (ret[1]) {
370
+ throw takeFromExternrefTable0(ret[0]);
371
+ }
321
372
  }
322
373
  /**
323
374
  * Sets a thumbnail from a [`Blob`] to be included in the manifest. The thumbnail should represent the asset being signed.
@@ -354,28 +405,29 @@ export class WasmBuilder {
354
405
  }
355
406
  }
356
407
  /**
357
- * Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
358
- * @param {string} id
359
- * @param {Blob} blob
408
+ * Sign an asset using the provided SignerDefinition, format, and source Blob.
409
+ * Use this method to get both the manifest bytes and the bytes of the signed asset.
410
+ * @param {SignerDefinition} signer_definition
411
+ * @param {string} format
412
+ * @param {Blob} source
413
+ * @returns {Promise<any>}
360
414
  */
361
- addResourceFromBlob(id, blob) {
362
- const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
415
+ signAndGetManifestBytes(signer_definition, format, source) {
416
+ const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
363
417
  const len0 = WASM_VECTOR_LEN;
364
- const ret = wasm.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, ptr0, len0, blob);
365
- if (ret[1]) {
366
- throw takeFromExternrefTable0(ret[0]);
367
- }
418
+ const ret = wasm.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, signer_definition, ptr0, len0, source);
419
+ return ret;
368
420
  }
369
421
  /**
370
- * Get the current manifest definition.
371
- * @returns {string}
422
+ * Creates a new `WasmBuilder` with a minimal manifest definition.
423
+ * @returns {WasmBuilder}
372
424
  */
373
- getDefinition() {
374
- const ret = wasm.wasmbuilder_getDefinition(this.__wbg_ptr);
425
+ static new() {
426
+ const ret = wasm.wasmbuilder_new();
375
427
  if (ret[2]) {
376
428
  throw takeFromExternrefTable0(ret[1]);
377
429
  }
378
- return takeFromExternrefTable0(ret[0]);
430
+ return WasmBuilder.__wrap(ret[0]);
379
431
  }
380
432
  /**
381
433
  * Sign an asset using the provided SignerDefinition, format, and source Blob.
@@ -390,7 +442,22 @@ export class WasmBuilder {
390
442
  const ret = wasm.wasmbuilder_sign(this.__wbg_ptr, signer_definition, ptr0, len0, source);
391
443
  return ret;
392
444
  }
445
+ /**
446
+ * Attempts to create a new `WasmBuilder` from a JSON ManifestDefinition string.
447
+ * @param {string} json
448
+ * @returns {WasmBuilder}
449
+ */
450
+ static fromJson(json) {
451
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
452
+ const len0 = WASM_VECTOR_LEN;
453
+ const ret = wasm.wasmbuilder_fromJson(ptr0, len0);
454
+ if (ret[2]) {
455
+ throw takeFromExternrefTable0(ret[1]);
456
+ }
457
+ return WasmBuilder.__wrap(ret[0]);
458
+ }
393
459
  }
460
+ if (Symbol.dispose) WasmBuilder.prototype[Symbol.dispose] = WasmBuilder.prototype.free;
394
461
 
395
462
  const WasmReaderFinalization = (typeof FinalizationRegistry === 'undefined')
396
463
  ? { register: () => {}, unregister: () => {} }
@@ -419,31 +486,6 @@ export class WasmReader {
419
486
  const ptr = this.__destroy_into_raw();
420
487
  wasm.__wbg_wasmreader_free(ptr, 0);
421
488
  }
422
- /**
423
- * Attempts to create a new `WasmReader` from an asset format and `Blob` of the asset's bytes.
424
- * @param {string} format
425
- * @param {Blob} blob
426
- * @returns {Promise<WasmReader>}
427
- */
428
- static fromBlob(format, blob) {
429
- const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
430
- const len0 = WASM_VECTOR_LEN;
431
- const ret = wasm.wasmreader_fromBlob(ptr0, len0, blob);
432
- return ret;
433
- }
434
- /**
435
- * Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
436
- * @param {string} format
437
- * @param {Blob} init
438
- * @param {Blob} fragment
439
- * @returns {Promise<WasmReader>}
440
- */
441
- static fromBlobFragment(format, init, fragment) {
442
- const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
443
- const len0 = WASM_VECTOR_LEN;
444
- const ret = wasm.wasmreader_fromBlobFragment(ptr0, len0, init, fragment);
445
- return ret;
446
- }
447
489
  /**
448
490
  * Returns the label of the asset's active manifest.
449
491
  * @returns {string | undefined}
@@ -459,7 +501,6 @@ export class WasmReader {
459
501
  }
460
502
  /**
461
503
  * Returns the asset's manifest store.
462
- * NOTE: at the moment, CAWG data is not decoded via this function. Use WasmReader::json() if CAWG is a requirement.
463
504
  * @returns {any}
464
505
  */
465
506
  manifestStore() {
@@ -471,7 +512,6 @@ export class WasmReader {
471
512
  }
472
513
  /**
473
514
  * Returns the asset's active manifest.
474
- * NOTE: at the moment, CAWG data is not decoded via this function. Use WasmReader::json() if CAWG is a requirement.
475
515
  * @returns {any}
476
516
  */
477
517
  activeManifest() {
@@ -481,6 +521,33 @@ export class WasmReader {
481
521
  }
482
522
  return takeFromExternrefTable0(ret[0]);
483
523
  }
524
+ /**
525
+ * Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
526
+ * @param {string} uri
527
+ * @returns {Uint8Array}
528
+ */
529
+ resourceToBytes(uri) {
530
+ const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
531
+ const len0 = WASM_VECTOR_LEN;
532
+ const ret = wasm.wasmreader_resourceToBytes(this.__wbg_ptr, ptr0, len0);
533
+ if (ret[2]) {
534
+ throw takeFromExternrefTable0(ret[1]);
535
+ }
536
+ return takeFromExternrefTable0(ret[0]);
537
+ }
538
+ /**
539
+ * Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
540
+ * @param {string} format
541
+ * @param {Blob} init
542
+ * @param {Blob} fragment
543
+ * @returns {Promise<WasmReader>}
544
+ */
545
+ static fromBlobFragment(format, init, fragment) {
546
+ const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
547
+ const len0 = WASM_VECTOR_LEN;
548
+ const ret = wasm.wasmreader_fromBlobFragment(ptr0, len0, init, fragment);
549
+ return ret;
550
+ }
484
551
  /**
485
552
  * Returns a JSON representation of the asset's manifest store.
486
553
  * @returns {string}
@@ -498,20 +565,19 @@ export class WasmReader {
498
565
  }
499
566
  }
500
567
  /**
501
- * Accepts a URI reference to a binary object in the resource store and returns a `js_sys::ArrayBuffer` containing the resource's bytes.
502
- * @param {string} uri
503
- * @returns {ArrayBuffer}
568
+ * Attempts to create a new `WasmReader` from an asset format and `Blob` of the asset's bytes.
569
+ * @param {string} format
570
+ * @param {Blob} blob
571
+ * @returns {Promise<WasmReader>}
504
572
  */
505
- resourceToBuffer(uri) {
506
- const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
573
+ static fromBlob(format, blob) {
574
+ const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
507
575
  const len0 = WASM_VECTOR_LEN;
508
- const ret = wasm.wasmreader_resourceToBuffer(this.__wbg_ptr, ptr0, len0);
509
- if (ret[2]) {
510
- throw takeFromExternrefTable0(ret[1]);
511
- }
512
- return takeFromExternrefTable0(ret[0]);
576
+ const ret = wasm.wasmreader_fromBlob(ptr0, len0, blob);
577
+ return ret;
513
578
  }
514
579
  }
580
+ if (Symbol.dispose) WasmReader.prototype[Symbol.dispose] = WasmReader.prototype.free;
515
581
 
516
582
  const WasmSignerFinalization = (typeof FinalizationRegistry === 'undefined')
517
583
  ? { register: () => {}, unregister: () => {} }
@@ -551,6 +617,7 @@ export class WasmSigner {
551
617
  return WasmSigner.__wrap(ret[0]);
552
618
  }
553
619
  }
620
+ if (Symbol.dispose) WasmSigner.prototype[Symbol.dispose] = WasmSigner.prototype.free;
554
621
 
555
622
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
556
623
 
@@ -590,44 +657,111 @@ async function __wbg_load(module, imports) {
590
657
  function __wbg_get_imports() {
591
658
  const imports = {};
592
659
  imports.wbg = {};
593
- imports.wbg.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
660
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
594
661
  const ret = Error(getStringFromWasm0(arg0, arg1));
595
662
  return ret;
596
663
  };
597
- imports.wbg.__wbg_Number_577a493fc95ea223 = function(arg0) {
664
+ imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
598
665
  const ret = Number(arg0);
599
666
  return ret;
600
667
  };
601
- imports.wbg.__wbg_abort_6665281623826052 = function(arg0) {
602
- arg0.abort();
668
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
669
+ const v = arg1;
670
+ const ret = typeof(v) === 'bigint' ? v : undefined;
671
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
672
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
673
+ };
674
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
675
+ const v = arg0;
676
+ const ret = typeof(v) === 'boolean' ? v : undefined;
677
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
678
+ };
679
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
680
+ const ret = debugString(arg1);
681
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
682
+ const len1 = WASM_VECTOR_LEN;
683
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
684
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
685
+ };
686
+ imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
687
+ const ret = arg0 in arg1;
688
+ return ret;
689
+ };
690
+ imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
691
+ const ret = typeof(arg0) === 'bigint';
692
+ return ret;
693
+ };
694
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
695
+ const ret = typeof(arg0) === 'function';
696
+ return ret;
697
+ };
698
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
699
+ const val = arg0;
700
+ const ret = typeof(val) === 'object' && val !== null;
701
+ return ret;
702
+ };
703
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
704
+ const ret = typeof(arg0) === 'string';
705
+ return ret;
706
+ };
707
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
708
+ const ret = arg0 === undefined;
709
+ return ret;
603
710
  };
604
- imports.wbg.__wbg_abort_c11a5d245a242912 = function(arg0, arg1) {
711
+ imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
712
+ const ret = arg0 === arg1;
713
+ return ret;
714
+ };
715
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
716
+ const ret = arg0 == arg1;
717
+ return ret;
718
+ };
719
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
720
+ const obj = arg1;
721
+ const ret = typeof(obj) === 'number' ? obj : undefined;
722
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
723
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
724
+ };
725
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
726
+ const obj = arg1;
727
+ const ret = typeof(obj) === 'string' ? obj : undefined;
728
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
729
+ var len1 = WASM_VECTOR_LEN;
730
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
731
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
732
+ };
733
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
734
+ throw new Error(getStringFromWasm0(arg0, arg1));
735
+ };
736
+ imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
737
+ arg0._wbg_cb_unref();
738
+ };
739
+ imports.wbg.__wbg_abort_28ad55c5825b004d = function(arg0, arg1) {
605
740
  arg0.abort(arg1);
606
741
  };
607
- imports.wbg.__wbg_append_3e86b0cd6215edd8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
742
+ imports.wbg.__wbg_abort_e7eb059f72f9ed0c = function(arg0) {
743
+ arg0.abort();
744
+ };
745
+ imports.wbg.__wbg_append_b577eb3a177bc0fa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
608
746
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
609
747
  }, arguments) };
610
- imports.wbg.__wbg_arrayBuffer_55e4a430671abfd8 = function() { return handleError(function (arg0) {
748
+ imports.wbg.__wbg_arrayBuffer_b375eccb84b4ddf3 = function() { return handleError(function (arg0) {
611
749
  const ret = arg0.arrayBuffer();
612
750
  return ret;
613
751
  }, arguments) };
614
- imports.wbg.__wbg_buffer_1f897e9f3ed6b41d = function(arg0) {
615
- const ret = arg0.buffer;
616
- return ret;
617
- };
618
- imports.wbg.__wbg_byteLength_7029fecd0c136e6d = function(arg0) {
752
+ imports.wbg.__wbg_byteLength_bcd42e4025299788 = function(arg0) {
619
753
  const ret = arg0.byteLength;
620
754
  return ret;
621
755
  };
622
- imports.wbg.__wbg_call_2f8d426a20a307fe = function() { return handleError(function (arg0, arg1) {
623
- const ret = arg0.call(arg1);
756
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
757
+ const ret = arg0.call(arg1, arg2);
624
758
  return ret;
625
759
  }, arguments) };
626
- imports.wbg.__wbg_call_f53f0647ceb9c567 = function() { return handleError(function (arg0, arg1, arg2) {
627
- const ret = arg0.call(arg1, arg2);
760
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
761
+ const ret = arg0.call(arg1);
628
762
  return ret;
629
763
  }, arguments) };
630
- imports.wbg.__wbg_clearTimeout_0b53d391c1b94dda = function(arg0) {
764
+ imports.wbg.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
631
765
  const ret = clearTimeout(arg0);
632
766
  return ret;
633
767
  };
@@ -635,10 +769,14 @@ function __wbg_get_imports() {
635
769
  const ret = arg0.crypto;
636
770
  return ret;
637
771
  };
638
- imports.wbg.__wbg_done_4a7743b6f942c9f3 = function(arg0) {
772
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
639
773
  const ret = arg0.done;
640
774
  return ret;
641
775
  };
776
+ imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
777
+ const ret = Object.entries(arg0);
778
+ return ret;
779
+ };
642
780
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
643
781
  let deferred0_0;
644
782
  let deferred0_1;
@@ -650,15 +788,15 @@ function __wbg_get_imports() {
650
788
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
651
789
  }
652
790
  };
653
- imports.wbg.__wbg_fetch_11bff8299d0ecd2b = function(arg0) {
791
+ imports.wbg.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
654
792
  const ret = fetch(arg0);
655
793
  return ret;
656
794
  };
657
- imports.wbg.__wbg_fetch_9885d2e26ad251bb = function(arg0, arg1) {
795
+ imports.wbg.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
658
796
  const ret = arg0.fetch(arg1);
659
797
  return ret;
660
798
  };
661
- imports.wbg.__wbg_from_237b1ad767238d8b = function(arg0) {
799
+ imports.wbg.__wbg_from_a4ad7cbddd0d7135 = function(arg0) {
662
800
  const ret = Array.from(arg0);
663
801
  return ret;
664
802
  };
@@ -668,23 +806,51 @@ function __wbg_get_imports() {
668
806
  imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
669
807
  arg0.getRandomValues(arg1);
670
808
  }, arguments) };
671
- imports.wbg.__wbg_getTime_5b1dd03bb6d4b784 = function(arg0) {
809
+ imports.wbg.__wbg_getTime_14776bfb48a1bff9 = function(arg0) {
672
810
  const ret = arg0.getTime();
673
811
  return ret;
674
812
  };
675
- imports.wbg.__wbg_get_27b4bcbec57323ca = function() { return handleError(function (arg0, arg1) {
813
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
814
+ const ret = arg0[arg1 >>> 0];
815
+ return ret;
816
+ };
817
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
676
818
  const ret = Reflect.get(arg0, arg1);
677
819
  return ret;
678
820
  }, arguments) };
679
- imports.wbg.__wbg_has_85abdd8aeb8edebf = function() { return handleError(function (arg0, arg1) {
821
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
822
+ const ret = arg0[arg1];
823
+ return ret;
824
+ };
825
+ imports.wbg.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
680
826
  const ret = Reflect.has(arg0, arg1);
681
827
  return ret;
682
828
  }, arguments) };
683
- imports.wbg.__wbg_headers_177bc880a5823968 = function(arg0) {
829
+ imports.wbg.__wbg_headers_b87d7eaba61c3278 = function(arg0) {
684
830
  const ret = arg0.headers;
685
831
  return ret;
686
832
  };
687
- imports.wbg.__wbg_instanceof_Promise_1147df2e75727145 = function(arg0) {
833
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
834
+ let result;
835
+ try {
836
+ result = arg0 instanceof ArrayBuffer;
837
+ } catch (_) {
838
+ result = false;
839
+ }
840
+ const ret = result;
841
+ return ret;
842
+ };
843
+ imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
844
+ let result;
845
+ try {
846
+ result = arg0 instanceof Map;
847
+ } catch (_) {
848
+ result = false;
849
+ }
850
+ const ret = result;
851
+ return ret;
852
+ };
853
+ imports.wbg.__wbg_instanceof_Promise_001fdd42afa1b7ef = function(arg0) {
688
854
  let result;
689
855
  try {
690
856
  result = arg0 instanceof Promise;
@@ -694,7 +860,7 @@ function __wbg_get_imports() {
694
860
  const ret = result;
695
861
  return ret;
696
862
  };
697
- imports.wbg.__wbg_instanceof_Response_0ab386c6818f788a = function(arg0) {
863
+ imports.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
698
864
  let result;
699
865
  try {
700
866
  result = arg0 instanceof Response;
@@ -704,11 +870,33 @@ function __wbg_get_imports() {
704
870
  const ret = result;
705
871
  return ret;
706
872
  };
707
- imports.wbg.__wbg_iterator_96378c3c9a17347c = function() {
873
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
874
+ let result;
875
+ try {
876
+ result = arg0 instanceof Uint8Array;
877
+ } catch (_) {
878
+ result = false;
879
+ }
880
+ const ret = result;
881
+ return ret;
882
+ };
883
+ imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
884
+ const ret = Array.isArray(arg0);
885
+ return ret;
886
+ };
887
+ imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
888
+ const ret = Number.isSafeInteger(arg0);
889
+ return ret;
890
+ };
891
+ imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
708
892
  const ret = Symbol.iterator;
709
893
  return ret;
710
894
  };
711
- imports.wbg.__wbg_length_904c0910ed998bf3 = function(arg0) {
895
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
896
+ const ret = arg0.length;
897
+ return ret;
898
+ };
899
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
712
900
  const ret = arg0.length;
713
901
  return ret;
714
902
  };
@@ -716,50 +904,30 @@ function __wbg_get_imports() {
716
904
  const ret = arg0.msCrypto;
717
905
  return ret;
718
906
  };
719
- imports.wbg.__wbg_new0_85cc856927102294 = function() {
907
+ imports.wbg.__wbg_new_0_f9740686d739025c = function() {
720
908
  const ret = new Date();
721
909
  return ret;
722
910
  };
723
- imports.wbg.__wbg_new_12588505388d0897 = function() { return handleError(function () {
724
- const ret = new Headers();
911
+ imports.wbg.__wbg_new_0d96c0bf6ceac0b0 = function() { return handleError(function () {
912
+ const ret = new FileReaderSync();
725
913
  return ret;
726
914
  }, arguments) };
727
- imports.wbg.__wbg_new_1930cbb8d9ffc31b = function() {
915
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
728
916
  const ret = new Object();
729
917
  return ret;
730
918
  };
731
- imports.wbg.__wbg_new_56407f99198feff7 = function() {
732
- const ret = new Map();
733
- return ret;
734
- };
735
- imports.wbg.__wbg_new_6a8b180049d9484e = function() { return handleError(function () {
919
+ imports.wbg.__wbg_new_2531773dac38ebb3 = function() { return handleError(function () {
736
920
  const ret = new AbortController();
737
921
  return ret;
738
922
  }, arguments) };
739
- imports.wbg.__wbg_new_7e574c906ccc59b1 = function() { return handleError(function () {
740
- const ret = new FileReaderSync();
741
- return ret;
742
- }, arguments) };
743
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
744
- const ret = new Error();
745
- return ret;
746
- };
747
- imports.wbg.__wbg_new_9190433fb67ed635 = function(arg0) {
748
- const ret = new Uint8Array(arg0);
749
- return ret;
750
- };
751
- imports.wbg.__wbg_new_97ddeb994a38bb69 = function(arg0, arg1) {
752
- const ret = new Error(getStringFromWasm0(arg0, arg1));
753
- return ret;
754
- };
755
- imports.wbg.__wbg_new_d5e3800b120e37e1 = function(arg0, arg1) {
923
+ imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
756
924
  try {
757
925
  var state0 = {a: arg0, b: arg1};
758
926
  var cb0 = (arg0, arg1) => {
759
927
  const a = state0.a;
760
928
  state0.a = 0;
761
929
  try {
762
- return __wbg_adapter_168(a, state0.b, arg0, arg1);
930
+ return wasm_bindgen__convert__closures_____invoke__h1fd2c9ff95892b8d(a, state0.b, arg0, arg1);
763
931
  } finally {
764
932
  state0.a = a;
765
933
  }
@@ -770,31 +938,51 @@ function __wbg_get_imports() {
770
938
  state0.a = state0.b = 0;
771
939
  }
772
940
  };
773
- imports.wbg.__wbg_new_e969dc3f68d25093 = function() {
941
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
942
+ const ret = new Uint8Array(arg0);
943
+ return ret;
944
+ };
945
+ imports.wbg.__wbg_new_68651c719dcda04e = function() {
946
+ const ret = new Map();
947
+ return ret;
948
+ };
949
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
950
+ const ret = new Error();
951
+ return ret;
952
+ };
953
+ imports.wbg.__wbg_new_9edf9838a2def39c = function() { return handleError(function () {
954
+ const ret = new Headers();
955
+ return ret;
956
+ }, arguments) };
957
+ imports.wbg.__wbg_new_a7442b4b19c1a356 = function(arg0, arg1) {
958
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
959
+ return ret;
960
+ };
961
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
774
962
  const ret = new Array();
775
963
  return ret;
776
964
  };
777
- imports.wbg.__wbg_newfromslice_d0d56929c6d9c842 = function(arg0, arg1) {
965
+ imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
778
966
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
779
967
  return ret;
780
968
  };
781
- imports.wbg.__wbg_newnoargs_a81330f6e05d8aca = function(arg0, arg1) {
969
+ imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
782
970
  const ret = new Function(getStringFromWasm0(arg0, arg1));
783
971
  return ret;
784
972
  };
785
- imports.wbg.__wbg_newwithlength_ed0ee6c1edca86fc = function(arg0) {
973
+ imports.wbg.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
786
974
  const ret = new Uint8Array(arg0 >>> 0);
787
975
  return ret;
788
976
  };
789
- imports.wbg.__wbg_newwithstrandinit_e8e22e9851f3c2fe = function() { return handleError(function (arg0, arg1, arg2) {
977
+ imports.wbg.__wbg_new_with_str_and_init_0ae7728b6ec367b1 = function() { return handleError(function (arg0, arg1, arg2) {
790
978
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
791
979
  return ret;
792
980
  }, arguments) };
793
- imports.wbg.__wbg_next_2e6b37020ac5fe58 = function() { return handleError(function (arg0) {
981
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
794
982
  const ret = arg0.next();
795
983
  return ret;
796
984
  }, arguments) };
797
- imports.wbg.__wbg_next_3de8f2669431a3ff = function(arg0) {
985
+ imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
798
986
  const ret = arg0.next;
799
987
  return ret;
800
988
  };
@@ -802,7 +990,7 @@ function __wbg_get_imports() {
802
990
  const ret = arg0.node;
803
991
  return ret;
804
992
  };
805
- imports.wbg.__wbg_now_e3057dd824ca0191 = function() {
993
+ imports.wbg.__wbg_now_793306c526e2e3b6 = function() {
806
994
  const ret = Date.now();
807
995
  return ret;
808
996
  };
@@ -810,20 +998,20 @@ function __wbg_get_imports() {
810
998
  const ret = arg0.process;
811
999
  return ret;
812
1000
  };
813
- imports.wbg.__wbg_prototypesetcall_c5f74efd31aea86b = function(arg0, arg1, arg2) {
1001
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
814
1002
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
815
1003
  };
816
- imports.wbg.__wbg_queueMicrotask_bcc6e26d899696db = function(arg0) {
1004
+ imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
817
1005
  const ret = arg0.queueMicrotask;
818
1006
  return ret;
819
1007
  };
820
- imports.wbg.__wbg_queueMicrotask_f24a794d09c42640 = function(arg0) {
1008
+ imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
821
1009
  queueMicrotask(arg0);
822
1010
  };
823
1011
  imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
824
1012
  arg0.randomFillSync(arg1);
825
1013
  }, arguments) };
826
- imports.wbg.__wbg_readAsArrayBuffer_b45cdda102d3c0b2 = function() { return handleError(function (arg0, arg1) {
1014
+ imports.wbg.__wbg_readAsArrayBuffer_36927e3348e676c3 = function() { return handleError(function (arg0, arg1) {
827
1015
  const ret = arg0.readAsArrayBuffer(arg1);
828
1016
  return ret;
829
1017
  }, arguments) };
@@ -831,54 +1019,57 @@ function __wbg_get_imports() {
831
1019
  const ret = module.require;
832
1020
  return ret;
833
1021
  }, arguments) };
834
- imports.wbg.__wbg_resolve_5775c0ef9222f556 = function(arg0) {
1022
+ imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
835
1023
  const ret = Promise.resolve(arg0);
836
1024
  return ret;
837
1025
  };
838
- imports.wbg.__wbg_setTimeout_73ce8df12de4f2f2 = function(arg0, arg1) {
1026
+ imports.wbg.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
839
1027
  const ret = setTimeout(arg0, arg1);
840
1028
  return ret;
841
1029
  };
842
- imports.wbg.__wbg_set_1d5fe1e3f51a48d8 = function(arg0, arg1, arg2) {
843
- arg0.set(getArrayU8FromWasm0(arg1, arg2));
1030
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1031
+ arg0[arg1] = arg2;
844
1032
  };
845
- imports.wbg.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
1033
+ imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
846
1034
  const ret = arg0.set(arg1, arg2);
847
1035
  return ret;
848
1036
  };
849
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
850
- arg0[arg1] = arg2;
1037
+ imports.wbg.__wbg_set_9e6516df7b7d0f19 = function(arg0, arg1, arg2) {
1038
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
851
1039
  };
852
- imports.wbg.__wbg_set_d636a0463acf1dbc = function(arg0, arg1, arg2) {
1040
+ imports.wbg.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
1041
+ arg0.body = arg1;
1042
+ };
1043
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
853
1044
  arg0[arg1 >>> 0] = arg2;
854
1045
  };
855
- imports.wbg.__wbg_setbody_e324371c31597f2a = function(arg0, arg1) {
856
- arg0.body = arg1;
1046
+ imports.wbg.__wbg_set_cache_2f9deb19b92b81e3 = function(arg0, arg1) {
1047
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
857
1048
  };
858
- imports.wbg.__wbg_setcredentials_55a9317ed2777533 = function(arg0, arg1) {
1049
+ imports.wbg.__wbg_set_credentials_f621cd2d85c0c228 = function(arg0, arg1) {
859
1050
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
860
1051
  };
861
- imports.wbg.__wbg_setheaders_ac0b1e4890a949cd = function(arg0, arg1) {
1052
+ imports.wbg.__wbg_set_headers_6926da238cd32ee4 = function(arg0, arg1) {
862
1053
  arg0.headers = arg1;
863
1054
  };
864
- imports.wbg.__wbg_setmethod_9ce6e95af1ae0eaf = function(arg0, arg1, arg2) {
1055
+ imports.wbg.__wbg_set_method_c02d8cbbe204ac2d = function(arg0, arg1, arg2) {
865
1056
  arg0.method = getStringFromWasm0(arg1, arg2);
866
1057
  };
867
- imports.wbg.__wbg_setmode_b89d1784e7e7f118 = function(arg0, arg1) {
1058
+ imports.wbg.__wbg_set_mode_52ef73cfa79639cb = function(arg0, arg1) {
868
1059
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
869
1060
  };
870
- imports.wbg.__wbg_setsignal_e663c6d962763cd5 = function(arg0, arg1) {
1061
+ imports.wbg.__wbg_set_signal_dda2cf7ccb6bee0f = function(arg0, arg1) {
871
1062
  arg0.signal = arg1;
872
1063
  };
873
- imports.wbg.__wbg_signal_bdb003fe19e53a13 = function(arg0) {
1064
+ imports.wbg.__wbg_signal_4db5aa055bf9eb9a = function(arg0) {
874
1065
  const ret = arg0.signal;
875
1066
  return ret;
876
1067
  };
877
- imports.wbg.__wbg_size_4181b899cbfa6483 = function(arg0) {
1068
+ imports.wbg.__wbg_size_0a5a003dbf5dfee8 = function(arg0) {
878
1069
  const ret = arg0.size;
879
1070
  return ret;
880
1071
  };
881
- imports.wbg.__wbg_slice_dc41c7f2c4886814 = function() { return handleError(function (arg0, arg1, arg2) {
1072
+ imports.wbg.__wbg_slice_4947c0e051116da5 = function() { return handleError(function (arg0, arg1, arg2) {
882
1073
  const ret = arg0.slice(arg1, arg2);
883
1074
  return ret;
884
1075
  }, arguments) };
@@ -889,54 +1080,54 @@ function __wbg_get_imports() {
889
1080
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
890
1081
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
891
1082
  };
892
- imports.wbg.__wbg_static_accessor_GLOBAL_1f13249cc3acc96d = function() {
1083
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
893
1084
  const ret = typeof global === 'undefined' ? null : global;
894
1085
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
895
1086
  };
896
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_df7ae94b1e0ed6a3 = function() {
1087
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
897
1088
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
898
1089
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
899
1090
  };
900
- imports.wbg.__wbg_static_accessor_SELF_6265471db3b3c228 = function() {
1091
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
901
1092
  const ret = typeof self === 'undefined' ? null : self;
902
1093
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
903
1094
  };
904
- imports.wbg.__wbg_static_accessor_WINDOW_16fb482f8ec52863 = function() {
1095
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
905
1096
  const ret = typeof window === 'undefined' ? null : window;
906
1097
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
907
1098
  };
908
- imports.wbg.__wbg_status_31874648c8651949 = function(arg0) {
1099
+ imports.wbg.__wbg_status_de7eed5a7a5bfd5d = function(arg0) {
909
1100
  const ret = arg0.status;
910
1101
  return ret;
911
1102
  };
912
- imports.wbg.__wbg_stringify_1f41b6198e0932e0 = function() { return handleError(function (arg0) {
1103
+ imports.wbg.__wbg_stringify_b5fb28f6465d9c3e = function() { return handleError(function (arg0) {
913
1104
  const ret = JSON.stringify(arg0);
914
1105
  return ret;
915
1106
  }, arguments) };
916
- imports.wbg.__wbg_subarray_a219824899e59712 = function(arg0, arg1, arg2) {
1107
+ imports.wbg.__wbg_subarray_480600f3d6a9f26c = function(arg0, arg1, arg2) {
917
1108
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
918
1109
  return ret;
919
1110
  };
920
- imports.wbg.__wbg_then_8d2fcccde5380a03 = function(arg0, arg1, arg2) {
921
- const ret = arg0.then(arg1, arg2);
1111
+ imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
1112
+ const ret = arg0.then(arg1);
922
1113
  return ret;
923
1114
  };
924
- imports.wbg.__wbg_then_9cc266be2bf537b6 = function(arg0, arg1) {
925
- const ret = arg0.then(arg1);
1115
+ imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
1116
+ const ret = arg0.then(arg1, arg2);
926
1117
  return ret;
927
1118
  };
928
- imports.wbg.__wbg_url_d5273b9e10503471 = function(arg0, arg1) {
1119
+ imports.wbg.__wbg_url_b36d2a5008eb056f = function(arg0, arg1) {
929
1120
  const ret = arg1.url;
930
1121
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
931
1122
  const len1 = WASM_VECTOR_LEN;
932
1123
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
933
1124
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
934
1125
  };
935
- imports.wbg.__wbg_valueOf_94f1c9efbe2ba399 = function(arg0) {
1126
+ imports.wbg.__wbg_valueOf_e1f2752ef9caddb2 = function(arg0) {
936
1127
  const ret = arg0.valueOf();
937
1128
  return ret;
938
1129
  };
939
- imports.wbg.__wbg_value_09d0b4eaab48b91d = function(arg0) {
1130
+ imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
940
1131
  const ret = arg0.value;
941
1132
  return ret;
942
1133
  };
@@ -948,50 +1139,6 @@ function __wbg_get_imports() {
948
1139
  const ret = WasmReader.__wrap(arg0);
949
1140
  return ret;
950
1141
  };
951
- imports.wbg.__wbg_wbindgencbdrop_a85ed476c6a370b9 = function(arg0) {
952
- const obj = arg0.original;
953
- if (obj.cnt-- == 1) {
954
- obj.a = 0;
955
- return true;
956
- }
957
- const ret = false;
958
- return ret;
959
- };
960
- imports.wbg.__wbg_wbindgendebugstring_bb652b1bc2061b6d = function(arg0, arg1) {
961
- const ret = debugString(arg1);
962
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
963
- const len1 = WASM_VECTOR_LEN;
964
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
965
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
966
- };
967
- imports.wbg.__wbg_wbindgenisfunction_ea72b9d66a0e1705 = function(arg0) {
968
- const ret = typeof(arg0) === 'function';
969
- return ret;
970
- };
971
- imports.wbg.__wbg_wbindgenisobject_dfe064a121d87553 = function(arg0) {
972
- const val = arg0;
973
- const ret = typeof(val) === 'object' && val !== null;
974
- return ret;
975
- };
976
- imports.wbg.__wbg_wbindgenisstring_4b74e4111ba029e6 = function(arg0) {
977
- const ret = typeof(arg0) === 'string';
978
- return ret;
979
- };
980
- imports.wbg.__wbg_wbindgenisundefined_71f08a6ade4354e7 = function(arg0) {
981
- const ret = arg0 === undefined;
982
- return ret;
983
- };
984
- imports.wbg.__wbg_wbindgenstringget_43fe05afe34b0cb1 = function(arg0, arg1) {
985
- const obj = arg1;
986
- const ret = typeof(obj) === 'string' ? obj : undefined;
987
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
988
- var len1 = WASM_VECTOR_LEN;
989
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
990
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
991
- };
992
- imports.wbg.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
993
- throw new Error(getStringFromWasm0(arg0, arg1));
994
- };
995
1142
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
996
1143
  // Cast intrinsic for `Ref(String) -> Externref`.
997
1144
  const ret = getStringFromWasm0(arg0, arg1);
@@ -1002,6 +1149,11 @@ function __wbg_get_imports() {
1002
1149
  const ret = (BigInt.asUintN(64, arg0) | (arg1 << BigInt(64)));
1003
1150
  return ret;
1004
1151
  };
1152
+ imports.wbg.__wbindgen_cast_3f8afe4d69afce15 = function(arg0, arg1) {
1153
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1274, function: Function { arguments: [Externref], shim_idx: 1285, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1154
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h4e2af4dd32e0f9a7, wasm_bindgen__convert__closures_____invoke__hedbe22ff1e6181ec);
1155
+ return ret;
1156
+ };
1005
1157
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1006
1158
  // Cast intrinsic for `U64 -> Externref`.
1007
1159
  const ret = BigInt.asUintN(64, arg0);
@@ -1019,11 +1171,6 @@ function __wbg_get_imports() {
1019
1171
  const ret = arg0;
1020
1172
  return ret;
1021
1173
  };
1022
- imports.wbg.__wbindgen_cast_cb60167f8bf6c33f = function(arg0, arg1) {
1023
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1658, function: Function { arguments: [Externref], shim_idx: 1669, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1024
- const ret = makeMutClosure(arg0, arg1, 1658, __wbg_adapter_23);
1025
- return ret;
1026
- };
1027
1174
  imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1028
1175
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1029
1176
  const ret = getArrayU8FromWasm0(arg0, arg1);
@@ -1034,13 +1181,13 @@ function __wbg_get_imports() {
1034
1181
  const ret = arg0;
1035
1182
  return ret;
1036
1183
  };
1037
- imports.wbg.__wbindgen_cast_e943630f8c22ccf7 = function(arg0, arg1) {
1038
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1651, function: Function { arguments: [], shim_idx: 1652, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1039
- const ret = makeMutClosure(arg0, arg1, 1651, __wbg_adapter_18);
1184
+ imports.wbg.__wbindgen_cast_eea71553507a2f52 = function(arg0, arg1) {
1185
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1266, function: Function { arguments: [], shim_idx: 1267, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1186
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3685db4568587cc8, wasm_bindgen__convert__closures_____invoke__hbb73f02d9cb5eeb0);
1040
1187
  return ret;
1041
1188
  };
1042
1189
  imports.wbg.__wbindgen_init_externref_table = function() {
1043
- const table = wasm.__wbindgen_export_2;
1190
+ const table = wasm.__wbindgen_externrefs;
1044
1191
  const offset = table.grow(4);
1045
1192
  table.set(0, undefined);
1046
1193
  table.set(offset + 0, undefined);
@@ -1053,10 +1200,6 @@ function __wbg_get_imports() {
1053
1200
  return imports;
1054
1201
  }
1055
1202
 
1056
- function __wbg_init_memory(imports, memory) {
1057
-
1058
- }
1059
-
1060
1203
  function __wbg_finalize_init(instance, module) {
1061
1204
  wasm = instance.exports;
1062
1205
  __wbg_init.__wbindgen_wasm_module = module;
@@ -1082,8 +1225,6 @@ function initSync(module) {
1082
1225
 
1083
1226
  const imports = __wbg_get_imports();
1084
1227
 
1085
- __wbg_init_memory(imports);
1086
-
1087
1228
  if (!(module instanceof WebAssembly.Module)) {
1088
1229
  module = new WebAssembly.Module(module);
1089
1230
  }
@@ -1112,8 +1253,6 @@ async function __wbg_init(module_or_path) {
1112
1253
  module_or_path = fetch(module_or_path);
1113
1254
  }
1114
1255
 
1115
- __wbg_init_memory(imports);
1116
-
1117
1256
  const { instance, module } = await __wbg_load(await module_or_path, imports);
1118
1257
 
1119
1258
  return __wbg_finalize_init(instance, module);
@@ -1121,4 +1260,4 @@ async function __wbg_init(module_or_path) {
1121
1260
 
1122
1261
  export { initSync };
1123
1262
  export default __wbg_init;
1124
- export const WASM_SRI = "sha512-l3IeNQ0oUfQxJIgCRyA2ms8ANqNnsxAr65TnXBBp0VATrFRqIIJkQ9mzQtBW1SRclCGFpFiU4q/L399OYZvFpw==";
1263
+ export const WASM_SRI = "sha512-0Bft1wLozl93+XmqnNddxgbrBhvF/jz1S1VLEXcAqfygqW7AZ4nrrpSR2I0YqD9+dBNlIgzMULACLQFfxfZlGA==";