@freqhole/midden 0.1.32 → 0.2.2

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/midden_bg.js CHANGED
@@ -11,7 +11,6 @@
11
11
  */
12
12
  export class BiStream {
13
13
  static __wrap(ptr) {
14
- ptr = ptr >>> 0;
15
14
  const obj = Object.create(BiStream.prototype);
16
15
  obj.__wbg_ptr = ptr;
17
16
  BiStreamFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -147,7 +146,7 @@ export class BiStream {
147
146
  * race the QUIC flush -- the peer's `read_to_end` then errors with
148
147
  * "connection lost" mid-payload because the in-flight frames are
149
148
  * torn down with the connection. matters most for large payloads
150
- * (e.g. base64-encoded blob bodies in `proxy_response`).
149
+ * (e.g. base64-encoded blob bodies in `api_response`).
151
150
  * @param {Uint8Array} data
152
151
  * @returns {Promise<void>}
153
152
  */
@@ -160,12 +159,120 @@ export class BiStream {
160
159
  }
161
160
  if (Symbol.dispose) BiStream.prototype[Symbol.dispose] = BiStream.prototype.free;
162
161
 
162
+ /**
163
+ * incremental blake3 hasher for streaming uploads — feed fixed-size chunks
164
+ * via update() and read the final hex hash from finalize(). lets JS hash a
165
+ * File while streaming it (file.stream() reader loop) instead of holding
166
+ * the whole payload in memory for a one-shot hash_blake3().
167
+ */
168
+ export class Blake3Hasher {
169
+ __destroy_into_raw() {
170
+ const ptr = this.__wbg_ptr;
171
+ this.__wbg_ptr = 0;
172
+ Blake3HasherFinalization.unregister(this);
173
+ return ptr;
174
+ }
175
+ free() {
176
+ const ptr = this.__destroy_into_raw();
177
+ wasm.__wbg_blake3hasher_free(ptr, 0);
178
+ }
179
+ /**
180
+ * finish and return the hash as a 64-char hex string. the hasher can
181
+ * keep absorbing after this (blake3 finalize is non-destructive), but
182
+ * callers should treat the session as done.
183
+ * @returns {string}
184
+ */
185
+ finalize() {
186
+ let deferred1_0;
187
+ let deferred1_1;
188
+ try {
189
+ const ret = wasm.blake3hasher_finalize(this.__wbg_ptr);
190
+ deferred1_0 = ret[0];
191
+ deferred1_1 = ret[1];
192
+ return getStringFromWasm0(ret[0], ret[1]);
193
+ } finally {
194
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
195
+ }
196
+ }
197
+ constructor() {
198
+ const ret = wasm.blake3hasher_new();
199
+ this.__wbg_ptr = ret;
200
+ Blake3HasherFinalization.register(this, this.__wbg_ptr, this);
201
+ return this;
202
+ }
203
+ /**
204
+ * absorb the next chunk of data.
205
+ * @param {Uint8Array} chunk
206
+ */
207
+ update(chunk) {
208
+ const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_malloc);
209
+ const len0 = WASM_VECTOR_LEN;
210
+ wasm.blake3hasher_update(this.__wbg_ptr, ptr0, len0);
211
+ }
212
+ }
213
+ if (Symbol.dispose) Blake3Hasher.prototype[Symbol.dispose] = Blake3Hasher.prototype.free;
214
+
215
+ /**
216
+ * cooperative cancellation for in-flight downloads (pause/cancel from JS).
217
+ * the download loops select on `cancelled()` between progress events —
218
+ * cancellation takes effect at the next event boundary, and the partial
219
+ * data stays in the store, so a later download of the same hash resumes
220
+ * from the persisted bitfield (only missing ranges transfer).
221
+ */
222
+ export class CancelToken {
223
+ static __wrap(ptr) {
224
+ const obj = Object.create(CancelToken.prototype);
225
+ obj.__wbg_ptr = ptr;
226
+ CancelTokenFinalization.register(obj, obj.__wbg_ptr, obj);
227
+ return obj;
228
+ }
229
+ __destroy_into_raw() {
230
+ const ptr = this.__wbg_ptr;
231
+ this.__wbg_ptr = 0;
232
+ CancelTokenFinalization.unregister(this);
233
+ return ptr;
234
+ }
235
+ free() {
236
+ const ptr = this.__destroy_into_raw();
237
+ wasm.__wbg_canceltoken_free(ptr, 0);
238
+ }
239
+ /**
240
+ * request cancellation. idempotent.
241
+ */
242
+ cancel() {
243
+ wasm.canceltoken_cancel(this.__wbg_ptr);
244
+ }
245
+ /**
246
+ * return a new CancelToken sharing the same cancellation state.
247
+ * needed because passing a wasm class by value consumes the JS handle —
248
+ * callers keep the original and pass a clone into download calls.
249
+ * @returns {CancelToken}
250
+ */
251
+ clone_token() {
252
+ const ret = wasm.canceltoken_clone_token(this.__wbg_ptr);
253
+ return CancelToken.__wrap(ret);
254
+ }
255
+ /**
256
+ * @returns {boolean}
257
+ */
258
+ is_cancelled() {
259
+ const ret = wasm.canceltoken_is_cancelled(this.__wbg_ptr);
260
+ return ret !== 0;
261
+ }
262
+ constructor() {
263
+ const ret = wasm.canceltoken_new();
264
+ this.__wbg_ptr = ret;
265
+ CancelTokenFinalization.register(this, this.__wbg_ptr, this);
266
+ return this;
267
+ }
268
+ }
269
+ if (Symbol.dispose) CancelToken.prototype[Symbol.dispose] = CancelToken.prototype.free;
270
+
163
271
  /**
164
272
  * result from fetching the server hello image from a peer
165
273
  */
166
274
  export class HelloImageResult {
167
275
  static __wrap(ptr) {
168
- ptr = ptr >>> 0;
169
276
  const obj = Object.create(HelloImageResult.prototype);
170
277
  obj.__wbg_ptr = ptr;
171
278
  HelloImageResultFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -203,6 +310,65 @@ export class HelloImageResult {
203
310
  }
204
311
  if (Symbol.dispose) HelloImageResult.prototype[Symbol.dispose] = HelloImageResult.prototype.free;
205
312
 
313
+ /**
314
+ * chunked import session — the streaming counterpart to import_blob.
315
+ *
316
+ * created via MiddenNode::start_import(). JS feeds fixed-size chunks with
317
+ * push() (backpressured: the promise resolves only once the chunk is
318
+ * queued), then finish() completes the import and returns the blake3 hash.
319
+ * the wasm boundary never sees the whole payload at once; the store's
320
+ * ImportByteStream machinery computes the bao tree incrementally.
321
+ *
322
+ * the finished blob is pinned in the node's active_tags (same as
323
+ * import_blob) until release_blob() is called.
324
+ */
325
+ export class ImportSession {
326
+ static __wrap(ptr) {
327
+ const obj = Object.create(ImportSession.prototype);
328
+ obj.__wbg_ptr = ptr;
329
+ ImportSessionFinalization.register(obj, obj.__wbg_ptr, obj);
330
+ return obj;
331
+ }
332
+ __destroy_into_raw() {
333
+ const ptr = this.__wbg_ptr;
334
+ this.__wbg_ptr = 0;
335
+ ImportSessionFinalization.unregister(this);
336
+ return ptr;
337
+ }
338
+ free() {
339
+ const ptr = this.__destroy_into_raw();
340
+ wasm.__wbg_importsession_free(ptr, 0);
341
+ }
342
+ /**
343
+ * abort the import. any partially-imported data is left to GC.
344
+ */
345
+ abort() {
346
+ wasm.importsession_abort(this.__wbg_ptr);
347
+ }
348
+ /**
349
+ * signal end-of-stream, wait for the import to complete, pin the
350
+ * resulting blob, and return its blake3 hash as a hex string.
351
+ * @returns {Promise<string>}
352
+ */
353
+ finish() {
354
+ const ret = wasm.importsession_finish(this.__wbg_ptr);
355
+ return ret;
356
+ }
357
+ /**
358
+ * queue the next chunk. resolves once the chunk has been accepted by
359
+ * the import stream (bounded channel — this is the backpressure point).
360
+ * @param {Uint8Array} chunk
361
+ * @returns {Promise<void>}
362
+ */
363
+ push(chunk) {
364
+ const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_malloc);
365
+ const len0 = WASM_VECTOR_LEN;
366
+ const ret = wasm.importsession_push(this.__wbg_ptr, ptr0, len0);
367
+ return ret;
368
+ }
369
+ }
370
+ if (Symbol.dispose) ImportSession.prototype[Symbol.dispose] = ImportSession.prototype.free;
371
+
206
372
  export class IntoUnderlyingByteSource {
207
373
  __destroy_into_raw() {
208
374
  const ptr = this.__wbg_ptr;
@@ -318,12 +484,11 @@ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderly
318
484
  * browser P2P node for freqhole federation
319
485
  *
320
486
  * supports two protocols:
321
- * - freqhole/1: API proxying and small blob streaming
487
+ * - freqhole/1: API requests and small blob streaming
322
488
  * - iroh-blobs: verified streaming for audio files
323
489
  */
324
490
  export class MiddenNode {
325
491
  static __wrap(ptr) {
326
- ptr = ptr >>> 0;
327
492
  const obj = Object.create(MiddenNode.prototype);
328
493
  obj.__wbg_ptr = ptr;
329
494
  MiddenNodeFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -349,6 +514,18 @@ export class MiddenNode {
349
514
  *
350
515
  * the caller should check `stream.alpn()` to route the connection
351
516
  * to the appropriate handler.
517
+ *
518
+ * a single incoming attempt failing during the TLS handshake (e.g. the
519
+ * peer aborts mid-handshake - normal during connection-path racing, or
520
+ * a peer that redials before noticing an earlier attempt is still
521
+ * live) does not end this call: it's logged and the loop moves on to
522
+ * the next queued incoming connection. propagating that failure to the
523
+ * caller instead would surface as a JS-level error on every accept()
524
+ * call, forcing the caller through a full error-handling/backoff cycle
525
+ * (see `IrohNetworkAdapter`'s accept loop) before the next, perfectly
526
+ * good, already-queued connection is even looked at - under a burst of
527
+ * aborted handshakes this can visibly stall new connections from ever
528
+ * completing.
352
529
  * @returns {Promise<any>}
353
530
  */
354
531
  accept() {
@@ -363,6 +540,40 @@ export class MiddenNode {
363
540
  const ret = wasm.middennode_active_blob_count(this.__wbg_ptr);
364
541
  return ret >>> 0;
365
542
  }
543
+ /**
544
+ * send an API request to a peer
545
+ * peer_addr can be plain node_id or full endpoint JSON with relay/IP hints
546
+ * @param {string} peer_addr
547
+ * @param {string} method
548
+ * @param {string} path
549
+ * @param {string | null} [body]
550
+ * @returns {Promise<any>}
551
+ */
552
+ api_request(peer_addr, method, path, body) {
553
+ const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
554
+ const len0 = WASM_VECTOR_LEN;
555
+ const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
556
+ const len1 = WASM_VECTOR_LEN;
557
+ const ptr2 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
558
+ const len2 = WASM_VECTOR_LEN;
559
+ var ptr3 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
560
+ var len3 = WASM_VECTOR_LEN;
561
+ const ret = wasm.middennode_api_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
562
+ return ret;
563
+ }
564
+ /**
565
+ * PROTOTYPE: remove a hash's restriction, returning it to the default
566
+ * (served to anyone) state.
567
+ * @param {string} blake3_hash
568
+ */
569
+ clear_blob_restriction(blake3_hash) {
570
+ const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
571
+ const len0 = WASM_VECTOR_LEN;
572
+ const ret = wasm.middennode_clear_blob_restriction(this.__wbg_ptr, ptr0, len0);
573
+ if (ret[1]) {
574
+ throw takeFromExternrefTable0(ret[0]);
575
+ }
576
+ }
366
577
  /**
367
578
  * compute blake3 hash for a blob on demand
368
579
  *
@@ -384,8 +595,10 @@ export class MiddenNode {
384
595
  return ret;
385
596
  }
386
597
  /**
387
- * create a new node with random identity
388
- * waits for relay connection before returning.
598
+ * create a new node with random identity, an in-memory blob store, and
599
+ * the default ALPN set. waits for relay connection before returning.
600
+ *
601
+ * deprecated: use `create_with_options` instead.
389
602
  *
390
603
  * `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
391
604
  * (defaults to 10s when omitted/undefined).
@@ -393,13 +606,15 @@ export class MiddenNode {
393
606
  * @returns {Promise<MiddenNode>}
394
607
  */
395
608
  static create(connect_timeout_ms) {
396
- const ret = wasm.middennode_create(isLikeNone(connect_timeout_ms) ? 0x100000001 : (connect_timeout_ms) >>> 0);
609
+ const ret = wasm.middennode_create(isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
397
610
  return ret;
398
611
  }
399
612
  /**
400
613
  * create a node from existing secret key bytes (for persistence)
401
614
  * key_bytes must be exactly 32 bytes.
402
615
  *
616
+ * deprecated: use `create_with_options` instead.
617
+ *
403
618
  * `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
404
619
  * (defaults to 10s when omitted/undefined).
405
620
  * @param {Uint8Array} key_bytes
@@ -409,14 +624,16 @@ export class MiddenNode {
409
624
  static create_from_key(key_bytes, connect_timeout_ms) {
410
625
  const ptr0 = passArray8ToWasm0(key_bytes, wasm.__wbindgen_malloc);
411
626
  const len0 = WASM_VECTOR_LEN;
412
- const ret = wasm.middennode_create_from_key(ptr0, len0, isLikeNone(connect_timeout_ms) ? 0x100000001 : (connect_timeout_ms) >>> 0);
627
+ const ret = wasm.middennode_create_from_key(ptr0, len0, isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
413
628
  return ret;
414
629
  }
415
630
  /**
416
631
  * create a node from existing secret key with additional ALPN protocols.
417
632
  *
633
+ * deprecated: use `create_with_options` instead.
634
+ *
418
635
  * `extra_alpns` is a JS array of strings (e.g. ["iroh/automerge-repo/1"]).
419
- * the node always registers "freqhole/1" plus whatever extra ALPNs are given.
636
+ * the node always registers the default ALPN set plus whatever extra ALPNs are given.
420
637
  *
421
638
  * `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
422
639
  * (defaults to 10s when omitted/undefined).
@@ -428,7 +645,20 @@ export class MiddenNode {
428
645
  static create_with_alpns(key_bytes, extra_alpns, connect_timeout_ms) {
429
646
  const ptr0 = passArray8ToWasm0(key_bytes, wasm.__wbindgen_malloc);
430
647
  const len0 = WASM_VECTOR_LEN;
431
- const ret = wasm.middennode_create_with_alpns(ptr0, len0, extra_alpns, isLikeNone(connect_timeout_ms) ? 0x100000001 : (connect_timeout_ms) >>> 0);
648
+ const ret = wasm.middennode_create_with_alpns(ptr0, len0, extra_alpns, isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
649
+ return ret;
650
+ }
651
+ /**
652
+ * create a node from an options bag. this is the single canonical
653
+ * constructor — `create`/`create_from_key`/`create_with_alpns` below
654
+ * are deprecated wrappers kept for existing callers (spume, playlistz).
655
+ * @param {MiddenNodeOptions} options
656
+ * @returns {Promise<MiddenNode>}
657
+ */
658
+ static create_with_options(options) {
659
+ _assertClass(options, MiddenNodeOptions);
660
+ var ptr0 = options.__destroy_into_raw();
661
+ const ret = wasm.middennode_create_with_options(ptr0);
432
662
  return ret;
433
663
  }
434
664
  /**
@@ -472,6 +702,25 @@ export class MiddenNode {
472
702
  const ret = wasm.middennode_download_verified_by_id(this.__wbg_ptr, ptr0, len0, ptr1, len1);
473
703
  return ret;
474
704
  }
705
+ /**
706
+ * full pipeline from blob_id with progress reporting.
707
+ *
708
+ * computes blake3 on demand, then uses verified download with progress.
709
+ * returns [data: Uint8Array, blake3: string].
710
+ * @param {string} peer_addr
711
+ * @param {string} blob_id
712
+ * @param {number} total_size
713
+ * @param {Function} on_progress
714
+ * @returns {Promise<Array<any>>}
715
+ */
716
+ download_verified_by_id_progress(peer_addr, blob_id, total_size, on_progress) {
717
+ const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
718
+ const len0 = WASM_VECTOR_LEN;
719
+ const ptr1 = passStringToWasm0(blob_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
720
+ const len1 = WASM_VECTOR_LEN;
721
+ const ret = wasm.middennode_download_verified_by_id_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress);
722
+ return ret;
723
+ }
475
724
  /**
476
725
  * download a verified blob and stream chunks to JS via callback
477
726
  *
@@ -496,33 +745,46 @@ export class MiddenNode {
496
745
  * @param {number} total_size
497
746
  * @param {Function} on_chunk
498
747
  * @param {Function} on_progress
748
+ * @param {CancelToken | null} [cancel]
499
749
  * @returns {Promise<number>}
500
750
  */
501
- download_verified_streaming(peer_addr, blake3_hash, total_size, on_chunk, on_progress) {
751
+ download_verified_streaming(peer_addr, blake3_hash, total_size, on_chunk, on_progress, cancel) {
502
752
  const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
503
753
  const len0 = WASM_VECTOR_LEN;
504
754
  const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
505
755
  const len1 = WASM_VECTOR_LEN;
506
- const ret = wasm.middennode_download_verified_streaming(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_chunk, on_progress);
756
+ let ptr2 = 0;
757
+ if (!isLikeNone(cancel)) {
758
+ _assertClass(cancel, CancelToken);
759
+ ptr2 = cancel.__destroy_into_raw();
760
+ }
761
+ const ret = wasm.middennode_download_verified_streaming(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_chunk, on_progress, ptr2);
507
762
  return ret;
508
763
  }
509
764
  /**
510
765
  * streaming download with auto ensure+retry. first attempts the streaming
511
766
  * download; if the verified download fails (blob not in peer's store), calls
512
- * ensure_blob to load it, then retries.
767
+ * ensure_blob to load it, then retries. a deliberate cancellation is NOT
768
+ * retried — it propagates immediately with the "download cancelled" message.
513
769
  * @param {string} peer_addr
514
770
  * @param {string} blake3_hash
515
771
  * @param {number} total_size
516
772
  * @param {Function} on_chunk
517
773
  * @param {Function} on_progress
774
+ * @param {CancelToken | null} [cancel]
518
775
  * @returns {Promise<number>}
519
776
  */
520
- download_verified_streaming_with_ensure(peer_addr, blake3_hash, total_size, on_chunk, on_progress) {
777
+ download_verified_streaming_with_ensure(peer_addr, blake3_hash, total_size, on_chunk, on_progress, cancel) {
521
778
  const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
522
779
  const len0 = WASM_VECTOR_LEN;
523
780
  const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
524
781
  const len1 = WASM_VECTOR_LEN;
525
- const ret = wasm.middennode_download_verified_streaming_with_ensure(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_chunk, on_progress);
782
+ let ptr2 = 0;
783
+ if (!isLikeNone(cancel)) {
784
+ _assertClass(cancel, CancelToken);
785
+ ptr2 = cancel.__destroy_into_raw();
786
+ }
787
+ const ret = wasm.middennode_download_verified_streaming_with_ensure(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_chunk, on_progress, ptr2);
526
788
  return ret;
527
789
  }
528
790
  /**
@@ -542,6 +804,71 @@ export class MiddenNode {
542
804
  const ret = wasm.middennode_download_verified_with_ensure(this.__wbg_ptr, ptr0, len0, ptr1, len1);
543
805
  return ret;
544
806
  }
807
+ /**
808
+ * download with ensure + retry and progress reporting.
809
+ *
810
+ * tries download first; if blob not in peer's FsStore, calls ensure_blob
811
+ * then retries. progress callback receives fraction (0.0 to 1.0).
812
+ * `cancel`: optional cooperative cancellation (pause) — a deliberate
813
+ * cancellation is NOT retried, it propagates immediately.
814
+ *
815
+ * NOTE: any failure on the first attempt triggers this same
816
+ * ensure-then-retry fallback, not just the "blob not in FsStore yet"
817
+ * case the fallback was designed for. for a large blob, the first
818
+ * attempt can stream a substantial fraction of the bytes (driving
819
+ * `on_progress` most/all of the way to 1.0) before failing late, so the
820
+ * caller-visible symptom is a full 0->100% progress cycle that silently
821
+ * restarts from 0 for a second full cycle. logging the first attempt's
822
+ * error and explicitly resetting progress to 0 here makes this restart
823
+ * visible/diagnosable instead of looking like a silent glitch.
824
+ * @param {string} peer_addr
825
+ * @param {string} blake3_hash
826
+ * @param {number} total_size
827
+ * @param {Function} on_progress
828
+ * @param {CancelToken | null} [cancel]
829
+ * @returns {Promise<Uint8Array>}
830
+ */
831
+ download_verified_with_ensure_progress(peer_addr, blake3_hash, total_size, on_progress, cancel) {
832
+ const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
833
+ const len0 = WASM_VECTOR_LEN;
834
+ const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
835
+ const len1 = WASM_VECTOR_LEN;
836
+ let ptr2 = 0;
837
+ if (!isLikeNone(cancel)) {
838
+ _assertClass(cancel, CancelToken);
839
+ ptr2 = cancel.__destroy_into_raw();
840
+ }
841
+ const ret = wasm.middennode_download_verified_with_ensure_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress, ptr2);
842
+ return ret;
843
+ }
844
+ /**
845
+ * download a blob with progress reporting via JS callback
846
+ *
847
+ * same as download_verified but calls on_progress(fraction) where
848
+ * fraction is bytes_received / total_size (0.0 to 1.0).
849
+ * total_size should come from the caller's known size field.
850
+ * `cancel`: optional cooperative cancellation (pause) — see
851
+ * download_verified_streaming for the semantics.
852
+ * @param {string} peer_addr
853
+ * @param {string} blake3_hash
854
+ * @param {number} total_size
855
+ * @param {Function} on_progress
856
+ * @param {CancelToken | null} [cancel]
857
+ * @returns {Promise<Uint8Array>}
858
+ */
859
+ download_verified_with_progress(peer_addr, blake3_hash, total_size, on_progress, cancel) {
860
+ const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
861
+ const len0 = WASM_VECTOR_LEN;
862
+ const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
863
+ const len1 = WASM_VECTOR_LEN;
864
+ let ptr2 = 0;
865
+ if (!isLikeNone(cancel)) {
866
+ _assertClass(cancel, CancelToken);
867
+ ptr2 = cancel.__destroy_into_raw();
868
+ }
869
+ const ret = wasm.middennode_download_verified_with_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress, ptr2);
870
+ return ret;
871
+ }
545
872
  /**
546
873
  * ensure a blob is loaded into the peer's FsStore by blake3 hash
547
874
  *
@@ -575,7 +902,7 @@ export class MiddenNode {
575
902
  return ret;
576
903
  }
577
904
  /**
578
- * check whether a blob with the given blake3 hash is currently held in the MemStore
905
+ * check whether a blob with the given blake3 hash is currently held in the store
579
906
  * via an active TempTag. avoids expensive OPFS read + bao recomputation when the
580
907
  * blob is already loaded.
581
908
  * @param {string} blake3_hash
@@ -587,6 +914,20 @@ export class MiddenNode {
587
914
  const ret = wasm.middennode_has_active_blob(this.__wbg_ptr, ptr0, len0);
588
915
  return ret !== 0;
589
916
  }
917
+ /**
918
+ * check whether a COMPLETE blob with this hash exists in the blob store
919
+ * itself — with the persistent opfs store this is true across reloads,
920
+ * even when no TempTag pins it. lets serving paths skip re-imports
921
+ * entirely.
922
+ * @param {string} blake3_hash
923
+ * @returns {Promise<boolean>}
924
+ */
925
+ has_complete_blob(blake3_hash) {
926
+ const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
927
+ const len0 = WASM_VECTOR_LEN;
928
+ const ret = wasm.middennode_has_complete_blob(this.__wbg_ptr, ptr0, len0);
929
+ return ret;
930
+ }
590
931
  /**
591
932
  * import a blob from its pre-computed bao-encoded bytes, skipping the
592
933
  * expensive bao tree computation. `blake3_hash` is the 64-char hex hash,
@@ -612,7 +953,7 @@ export class MiddenNode {
612
953
  * import raw bytes into the iroh-blobs store, returning the blake3 hash.
613
954
  * this makes the blob available for verified download by peers.
614
955
  * the blob stays in the store as long as its TempTag is held in active_tags.
615
- * call release_blob() to allow GC, or it will be evicted when the map exceeds 3 entries.
956
+ * call release_blob() to allow GC.
616
957
  * @param {Uint8Array} data
617
958
  * @returns {Promise<string>}
618
959
  */
@@ -685,7 +1026,7 @@ export class MiddenNode {
685
1026
  * open a bidirectional stream to a peer on a specific ALPN.
686
1027
  *
687
1028
  * `peer_addr` can be a plain node_id hex string or a full endpoint
688
- * address JSON (same format as proxy_request). `alpn` is the protocol
1029
+ * address JSON (same format as api_request). `alpn` is the protocol
689
1030
  * to negotiate (e.g. "iroh/automerge-repo/1").
690
1031
  *
691
1032
  * returns a BiStream for length-delimited message exchange.
@@ -701,6 +1042,20 @@ export class MiddenNode {
701
1042
  const ret = wasm.middennode_open_bi(this.__wbg_ptr, ptr0, len0, ptr1, len1);
702
1043
  return ret;
703
1044
  }
1045
+ /**
1046
+ * pin a hash so gc won't sweep it (e.g. a paused partial download).
1047
+ * idempotent. pair with unprotect_blob when the partial is resumed to
1048
+ * completion or discarded.
1049
+ * @param {string} blake3_hash
1050
+ */
1051
+ protect_blob(blake3_hash) {
1052
+ const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1053
+ const len0 = WASM_VECTOR_LEN;
1054
+ const ret = wasm.middennode_protect_blob(this.__wbg_ptr, ptr0, len0);
1055
+ if (ret[1]) {
1056
+ throw takeFromExternrefTable0(ret[0]);
1057
+ }
1058
+ }
704
1059
  /**
705
1060
  * dispatch a typed admin command to a peer over the freqhole-admin/1 ALPN.
706
1061
  *
@@ -723,27 +1078,6 @@ export class MiddenNode {
723
1078
  const ret = wasm.middennode_proxy_admin(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
724
1079
  return ret;
725
1080
  }
726
- /**
727
- * send an API request to a peer
728
- * peer_addr can be plain node_id or full endpoint JSON with relay/IP hints
729
- * @param {string} peer_addr
730
- * @param {string} method
731
- * @param {string} path
732
- * @param {string | null} [body]
733
- * @returns {Promise<any>}
734
- */
735
- proxy_request(peer_addr, method, path, body) {
736
- const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
737
- const len0 = WASM_VECTOR_LEN;
738
- const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
739
- const len1 = WASM_VECTOR_LEN;
740
- const ptr2 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
741
- const len2 = WASM_VECTOR_LEN;
742
- var ptr3 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
743
- var len3 = WASM_VECTOR_LEN;
744
- const ret = wasm.middennode_proxy_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
745
- return ret;
746
- }
747
1081
  /**
748
1082
  * release a blob's TempTag, allowing the store to garbage-collect it.
749
1083
  * blake3_hash should be the 64-char hex string returned by import_blob.
@@ -757,6 +1091,27 @@ export class MiddenNode {
757
1091
  throw takeFromExternrefTable0(ret[0]);
758
1092
  }
759
1093
  }
1094
+ /**
1095
+ * PROTOTYPE: restrict a blob (by blake3 hex hash) so only the given
1096
+ * peer node ids may fetch it over the `iroh-blobs/*` ALPN. a hash with
1097
+ * no restriction registered is served to anyone (today's default
1098
+ * behavior, unchanged) — calling this is what opts a specific hash
1099
+ * into gating.
1100
+ *
1101
+ * this is a stopgap/demo hook, not the real canvas-ACL integration: it
1102
+ * has to be called explicitly, from JS, with an already-resolved list
1103
+ * of allowed peer node ids for this one hash.
1104
+ * @param {string} blake3_hash
1105
+ * @param {Array<any>} peer_node_ids
1106
+ */
1107
+ restrict_blob_to_peers(blake3_hash, peer_node_ids) {
1108
+ const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1109
+ const len0 = WASM_VECTOR_LEN;
1110
+ const ret = wasm.middennode_restrict_blob_to_peers(this.__wbg_ptr, ptr0, len0, peer_node_ids);
1111
+ if (ret[1]) {
1112
+ throw takeFromExternrefTable0(ret[0]);
1113
+ }
1114
+ }
760
1115
  /**
761
1116
  * get the secret key bytes for persistence (32 bytes)
762
1117
  * store this in IndexedDB to maintain the same identity across sessions
@@ -786,6 +1141,16 @@ export class MiddenNode {
786
1141
  start_blob_server() {
787
1142
  wasm.middennode_start_blob_server(this.__wbg_ptr);
788
1143
  }
1144
+ /**
1145
+ * begin a chunked import — the streaming counterpart to import_blob for
1146
+ * payloads that shouldn't be materialized as one contiguous &[u8] across
1147
+ * the wasm boundary. see ImportSession for the push/finish protocol.
1148
+ * @returns {ImportSession}
1149
+ */
1150
+ start_import() {
1151
+ const ret = wasm.middennode_start_import(this.__wbg_ptr);
1152
+ return ImportSession.__wrap(ret);
1153
+ }
789
1154
  /**
790
1155
  * connect to a freqhole radio broadcaster.
791
1156
  *
@@ -815,9 +1180,128 @@ export class MiddenNode {
815
1180
  const ret = wasm.middennode_tune_radio(this.__wbg_ptr, ptr0, len0, ptr1, len1, on_hello, on_meta, on_chunk);
816
1181
  return ret;
817
1182
  }
1183
+ /**
1184
+ * remove a gc pin added by protect_blob (or by a cancelled download).
1185
+ * @param {string} blake3_hash
1186
+ */
1187
+ unprotect_blob(blake3_hash) {
1188
+ const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1189
+ const len0 = WASM_VECTOR_LEN;
1190
+ const ret = wasm.middennode_unprotect_blob(this.__wbg_ptr, ptr0, len0);
1191
+ if (ret[1]) {
1192
+ throw takeFromExternrefTable0(ret[0]);
1193
+ }
1194
+ }
818
1195
  }
819
1196
  if (Symbol.dispose) MiddenNode.prototype[Symbol.dispose] = MiddenNode.prototype.free;
820
1197
 
1198
+ /**
1199
+ * options bag for `MiddenNode::create_with_options`, the single canonical
1200
+ * constructor. build one, set whichever fields are needed, and pass it in:
1201
+ *
1202
+ * ```js
1203
+ * const opts = new MiddenNodeOptions();
1204
+ * opts.opfs_store_dir = "midden-blob-store";
1205
+ * opts.connect_timeout_ms = 5000;
1206
+ * const node = await MiddenNode.create_with_options(opts);
1207
+ * ```
1208
+ *
1209
+ * `create`/`create_from_key`/`create_with_alpns` remain as deprecated
1210
+ * wrappers over this constructor for existing callers (spume, playlistz).
1211
+ */
1212
+ export class MiddenNodeOptions {
1213
+ __destroy_into_raw() {
1214
+ const ptr = this.__wbg_ptr;
1215
+ this.__wbg_ptr = 0;
1216
+ MiddenNodeOptionsFinalization.unregister(this);
1217
+ return ptr;
1218
+ }
1219
+ free() {
1220
+ const ptr = this.__destroy_into_raw();
1221
+ wasm.__wbg_middennodeoptions_free(ptr, 0);
1222
+ }
1223
+ /**
1224
+ * per-dial timeout (ms) for `open_bi`/`connect` (defaults to 10s).
1225
+ * @returns {number | undefined}
1226
+ */
1227
+ get connect_timeout_ms() {
1228
+ const ret = wasm.middennodeoptions_get_connect_timeout_ms(this.__wbg_ptr);
1229
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
1230
+ }
1231
+ /**
1232
+ * additional ALPN protocols to register beyond the default set.
1233
+ * @returns {string[] | undefined}
1234
+ */
1235
+ get extra_alpns() {
1236
+ const ret = wasm.middennodeoptions_get_extra_alpns(this.__wbg_ptr);
1237
+ let v1;
1238
+ if (ret[0] !== 0) {
1239
+ v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
1240
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1241
+ }
1242
+ return v1;
1243
+ }
1244
+ /**
1245
+ * when given, blobs persist in an OPFS-backed store under this
1246
+ * directory (worker context required); otherwise (or when OPFS is
1247
+ * unavailable) an in-memory store is used.
1248
+ * @returns {string | undefined}
1249
+ */
1250
+ get opfs_store_dir() {
1251
+ const ret = wasm.middennodeoptions_get_opfs_store_dir(this.__wbg_ptr);
1252
+ let v1;
1253
+ if (ret[0] !== 0) {
1254
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1255
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1256
+ }
1257
+ return v1;
1258
+ }
1259
+ /**
1260
+ * the node's secret key (32 raw bytes). omit (or pass null/undefined)
1261
+ * to generate a random identity.
1262
+ * @returns {Uint8Array | undefined}
1263
+ */
1264
+ get secret_key() {
1265
+ const ret = wasm.middennodeoptions_get_secret_key(this.__wbg_ptr);
1266
+ return ret;
1267
+ }
1268
+ constructor() {
1269
+ const ret = wasm.middennodeoptions_new();
1270
+ this.__wbg_ptr = ret;
1271
+ MiddenNodeOptionsFinalization.register(this, this.__wbg_ptr, this);
1272
+ return this;
1273
+ }
1274
+ /**
1275
+ * @param {number | null} [ms]
1276
+ */
1277
+ set connect_timeout_ms(ms) {
1278
+ wasm.middennodeoptions_set_connect_timeout_ms(this.__wbg_ptr, isLikeNone(ms) ? Number.MAX_SAFE_INTEGER : (ms) >>> 0);
1279
+ }
1280
+ /**
1281
+ * @param {string[] | null} [alpns]
1282
+ */
1283
+ set extra_alpns(alpns) {
1284
+ var ptr0 = isLikeNone(alpns) ? 0 : passArrayJsValueToWasm0(alpns, wasm.__wbindgen_malloc);
1285
+ var len0 = WASM_VECTOR_LEN;
1286
+ wasm.middennodeoptions_set_extra_alpns(this.__wbg_ptr, ptr0, len0);
1287
+ }
1288
+ /**
1289
+ * @param {string | null} [dir]
1290
+ */
1291
+ set opfs_store_dir(dir) {
1292
+ var ptr0 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1293
+ var len0 = WASM_VECTOR_LEN;
1294
+ wasm.middennodeoptions_set_opfs_store_dir(this.__wbg_ptr, ptr0, len0);
1295
+ }
1296
+ /**
1297
+ * @param {Uint8Array | null} [key]
1298
+ */
1299
+ set secret_key(key) {
1300
+ wasm.middennodeoptions_set_secret_key(this.__wbg_ptr, isLikeNone(key) ? 0 : addToExternrefTable0(key));
1301
+ }
1302
+ }
1303
+ if (Symbol.dispose) MiddenNodeOptions.prototype[Symbol.dispose] = MiddenNodeOptions.prototype.free;
1304
+
821
1305
  /**
822
1306
  * handle returned to JS for a tuned-in radio session. dropping the handle
823
1307
  * (or calling `leave()`) closes the iroh connection, which tears down both
@@ -825,7 +1309,6 @@ if (Symbol.dispose) MiddenNode.prototype[Symbol.dispose] = MiddenNode.prototype.
825
1309
  */
826
1310
  export class RadioHandle {
827
1311
  static __wrap(ptr) {
828
- ptr = ptr >>> 0;
829
1312
  const obj = Object.create(RadioHandle.prototype);
830
1313
  obj.__wbg_ptr = ptr;
831
1314
  RadioHandleFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -871,10 +1354,33 @@ export function hash_blake3(data) {
871
1354
  }
872
1355
  }
873
1356
 
1357
+ /**
1358
+ * opfs store selftest — runs the full import/export round trip against
1359
+ * real OPFS through the real iroh-blobs api. worker context required
1360
+ * (sync access handles). wasm-only debug helper, used for manual
1361
+ * debugging from the blob worker, not from automated tests.
1362
+ * @returns {Promise<string>}
1363
+ */
1364
+ export function opfs_store_selftest() {
1365
+ const ret = wasm.opfs_store_selftest();
1366
+ return ret;
1367
+ }
1368
+
1369
+ /**
1370
+ * persistence selftest: blobs + tags survive a store shutdown/reopen over
1371
+ * the same OPFS directory. worker context required. wasm-only debug
1372
+ * helper, used for manual debugging from the blob worker.
1373
+ * @returns {Promise<string>}
1374
+ */
1375
+ export function opfs_store_selftest_persistence() {
1376
+ const ret = wasm.opfs_store_selftest_persistence();
1377
+ return ret;
1378
+ }
1379
+
874
1380
  export function start() {
875
1381
  wasm.start();
876
1382
  }
877
- export function __wbg_Error_83742b46f01ce22d(arg0, arg1) {
1383
+ export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
878
1384
  const ret = Error(getStringFromWasm0(arg0, arg1));
879
1385
  return ret;
880
1386
  }
@@ -885,36 +1391,36 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
885
1391
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
886
1392
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
887
1393
  }
888
- export function __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1(arg0) {
1394
+ export function __wbg___wbindgen_boolean_get_fa956cfa2d1bd751(arg0) {
889
1395
  const v = arg0;
890
1396
  const ret = typeof(v) === 'boolean' ? v : undefined;
891
1397
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
892
1398
  }
893
- export function __wbg___wbindgen_debug_string_5398f5bb970e0daa(arg0, arg1) {
1399
+ export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
894
1400
  const ret = debugString(arg1);
895
1401
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
896
1402
  const len1 = WASM_VECTOR_LEN;
897
1403
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
898
1404
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
899
1405
  }
900
- export function __wbg___wbindgen_is_function_3c846841762788c1(arg0) {
1406
+ export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
901
1407
  const ret = typeof(arg0) === 'function';
902
1408
  return ret;
903
1409
  }
904
- export function __wbg___wbindgen_is_object_781bc9f159099513(arg0) {
1410
+ export function __wbg___wbindgen_is_object_a27215656b807791(arg0) {
905
1411
  const val = arg0;
906
1412
  const ret = typeof(val) === 'object' && val !== null;
907
1413
  return ret;
908
1414
  }
909
- export function __wbg___wbindgen_is_string_7ef6b97b02428fae(arg0) {
1415
+ export function __wbg___wbindgen_is_string_ea5e6cc2e4141dfe(arg0) {
910
1416
  const ret = typeof(arg0) === 'string';
911
1417
  return ret;
912
1418
  }
913
- export function __wbg___wbindgen_is_undefined_52709e72fb9f179c(arg0) {
1419
+ export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
914
1420
  const ret = arg0 === undefined;
915
1421
  return ret;
916
1422
  }
917
- export function __wbg___wbindgen_string_get_395e606bd0ee4427(arg0, arg1) {
1423
+ export function __wbg___wbindgen_string_get_b0ca35b86a603356(arg0, arg1) {
918
1424
  const obj = arg1;
919
1425
  const ret = typeof(obj) === 'string' ? obj : undefined;
920
1426
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -922,25 +1428,25 @@ export function __wbg___wbindgen_string_get_395e606bd0ee4427(arg0, arg1) {
922
1428
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
923
1429
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
924
1430
  }
925
- export function __wbg___wbindgen_throw_6ddd609b62940d55(arg0, arg1) {
1431
+ export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
926
1432
  throw new Error(getStringFromWasm0(arg0, arg1));
927
1433
  }
928
- export function __wbg__wbg_cb_unref_6b5b6b8576d35cb1(arg0) {
1434
+ export function __wbg__wbg_cb_unref_fffb441def202758(arg0) {
929
1435
  arg0._wbg_cb_unref();
930
1436
  }
931
- export function __wbg_abort_5ef96933660780b7(arg0) {
1437
+ export function __wbg_abort_8bae0f33e7833997(arg0) {
932
1438
  arg0.abort();
933
1439
  }
934
- export function __wbg_abort_6479c2d794ebf2ee(arg0, arg1) {
1440
+ export function __wbg_abort_eee9248a6d680839(arg0, arg1) {
935
1441
  arg0.abort(arg1);
936
1442
  }
937
- export function __wbg_addEventListener_3f4b57aea6662d2e() { return handleError(function (arg0, arg1, arg2, arg3) {
1443
+ export function __wbg_addEventListener_c33b246adf950d7c() { return handleError(function (arg0, arg1, arg2, arg3) {
938
1444
  arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
939
1445
  }, arguments); }
940
- export function __wbg_append_608dfb635ee8998f() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1446
+ export function __wbg_append_01c74e5c6b58aa64() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
941
1447
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
942
1448
  }, arguments); }
943
- export function __wbg_arrayBuffer_eb8e9ca620af2a19() { return handleError(function (arg0) {
1449
+ export function __wbg_arrayBuffer_3b637f0fa65c5351() { return handleError(function (arg0) {
944
1450
  const ret = arg0.arrayBuffer();
945
1451
  return ret;
946
1452
  }, arguments); }
@@ -948,75 +1454,86 @@ export function __wbg_bistream_new(arg0) {
948
1454
  const ret = BiStream.__wrap(arg0);
949
1455
  return ret;
950
1456
  }
951
- export function __wbg_body_ac1dad652946e6da(arg0) {
1457
+ export function __wbg_body_18c9f2ac15ead4b2(arg0) {
952
1458
  const ret = arg0.body;
953
1459
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
954
1460
  }
955
- export function __wbg_buffer_60b8043cd926067d(arg0) {
1461
+ export function __wbg_buffer_54b87055582c8a81(arg0) {
956
1462
  const ret = arg0.buffer;
957
1463
  return ret;
958
1464
  }
959
- export function __wbg_byobRequest_6342e5f2b232c0f9(arg0) {
1465
+ export function __wbg_byobRequest_06b654bb15590436(arg0) {
960
1466
  const ret = arg0.byobRequest;
961
1467
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
962
1468
  }
963
- export function __wbg_byteLength_607b856aa6c5a508(arg0) {
1469
+ export function __wbg_byteLength_41862ca4020b9c43(arg0) {
964
1470
  const ret = arg0.byteLength;
965
1471
  return ret;
966
1472
  }
967
- export function __wbg_byteOffset_b26b63681c83856c(arg0) {
1473
+ export function __wbg_byteOffset_d42e18c4441f628b(arg0) {
968
1474
  const ret = arg0.byteOffset;
969
1475
  return ret;
970
1476
  }
971
- export function __wbg_call_2d781c1f4d5c0ef8() { return handleError(function (arg0, arg1, arg2) {
972
- const ret = arg0.call(arg1, arg2);
1477
+ export function __wbg_call_44b7209e1e252e6a() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1478
+ const ret = arg0.call(arg1, arg2, arg3, arg4);
973
1479
  return ret;
974
1480
  }, arguments); }
975
- export function __wbg_call_dcc2662fa17a72cf() { return handleError(function (arg0, arg1, arg2, arg3) {
976
- const ret = arg0.call(arg1, arg2, arg3);
1481
+ export function __wbg_call_8a2dd23819f8a60a() { return handleError(function (arg0, arg1) {
1482
+ const ret = arg0.call(arg1);
977
1483
  return ret;
978
1484
  }, arguments); }
979
- export function __wbg_call_f858478a02f9600f() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
980
- const ret = arg0.call(arg1, arg2, arg3, arg4);
1485
+ export function __wbg_call_a6e5c5dce5018821() { return handleError(function (arg0, arg1, arg2) {
1486
+ const ret = arg0.call(arg1, arg2);
1487
+ return ret;
1488
+ }, arguments); }
1489
+ export function __wbg_call_e3b662382210db98() { return handleError(function (arg0, arg1, arg2, arg3) {
1490
+ const ret = arg0.call(arg1, arg2, arg3);
981
1491
  return ret;
982
1492
  }, arguments); }
983
- export function __wbg_cancel_79b3bea07a1028e7(arg0) {
1493
+ export function __wbg_cancel_3983a93e24cc66b3(arg0) {
984
1494
  const ret = arg0.cancel();
985
1495
  return ret;
986
1496
  }
987
- export function __wbg_catch_d7ed0375ab6532a5(arg0, arg1) {
1497
+ export function __wbg_catch_c1a60df4c30d76d3(arg0, arg1) {
988
1498
  const ret = arg0.catch(arg1);
989
1499
  return ret;
990
1500
  }
991
- export function __wbg_clearTimeout_2256f1e7b94ef517(arg0) {
1501
+ export function __wbg_clearTimeout_333bba87532ab9d3(arg0) {
992
1502
  const ret = clearTimeout(arg0);
993
1503
  return ret;
994
1504
  }
995
1505
  export function __wbg_clearTimeout_47a40e3be01ed7a3() { return handleError(function (arg0, arg1) {
996
1506
  arg0.clearTimeout(arg1);
997
1507
  }, arguments); }
998
- export function __wbg_close_690d36108c557337() { return handleError(function (arg0) {
1508
+ export function __wbg_close_249a23304523681b() { return handleError(function (arg0) {
999
1509
  arg0.close();
1000
1510
  }, arguments); }
1001
- export function __wbg_close_737b4b1fbc658540() { return handleError(function (arg0) {
1511
+ export function __wbg_close_72d318d9c16e83ef() { return handleError(function (arg0) {
1002
1512
  arg0.close();
1003
1513
  }, arguments); }
1004
- export function __wbg_close_af26905c832a88cb() { return handleError(function (arg0) {
1514
+ export function __wbg_close_c65ca0257e895318() { return handleError(function (arg0) {
1005
1515
  arg0.close();
1006
1516
  }, arguments); }
1007
- export function __wbg_code_aea376e2d265a64f(arg0) {
1517
+ export function __wbg_close_d00f4cb641f9db10(arg0) {
1518
+ arg0.close();
1519
+ }
1520
+ export function __wbg_code_1fc52b4142a112ac(arg0) {
1008
1521
  const ret = arg0.code;
1009
1522
  return ret;
1010
1523
  }
1011
- export function __wbg_code_bc4dde4d67926010(arg0) {
1524
+ export function __wbg_code_cb4327cfc515673b(arg0) {
1012
1525
  const ret = arg0.code;
1013
1526
  return ret;
1014
1527
  }
1528
+ export function __wbg_createSyncAccessHandle_0caafebe31e4f2d9(arg0) {
1529
+ const ret = arg0.createSyncAccessHandle();
1530
+ return ret;
1531
+ }
1015
1532
  export function __wbg_crypto_38df2bab126b63dc(arg0) {
1016
1533
  const ret = arg0.crypto;
1017
1534
  return ret;
1018
1535
  }
1019
- export function __wbg_data_a3d9ff9cdd801002(arg0) {
1536
+ export function __wbg_data_328de4280640da92(arg0) {
1020
1537
  const ret = arg0.data;
1021
1538
  return ret;
1022
1539
  }
@@ -1025,14 +1542,14 @@ export function __wbg_debug_eaef3b49d572d680(arg0, arg1) {
1025
1542
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
1026
1543
  console.debug(...v0);
1027
1544
  }
1028
- export function __wbg_done_08ce71ee07e3bd17(arg0) {
1545
+ export function __wbg_done_89b2b13e91a60321(arg0) {
1029
1546
  const ret = arg0.done;
1030
1547
  return ret;
1031
1548
  }
1032
- export function __wbg_enqueue_ec3552838b4b7fbf() { return handleError(function (arg0, arg1) {
1549
+ export function __wbg_enqueue_6d83b4c6281bafd6() { return handleError(function (arg0, arg1) {
1033
1550
  arg0.enqueue(arg1);
1034
1551
  }, arguments); }
1035
- export function __wbg_entries_5b8fe91cea59610e(arg0) {
1552
+ export function __wbg_entries_900cefd6f70eb290(arg0) {
1036
1553
  const ret = arg0.entries();
1037
1554
  return ret;
1038
1555
  }
@@ -1052,45 +1569,64 @@ export function __wbg_error_a6fa202b58aa1cd3(arg0, arg1) {
1052
1569
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1053
1570
  }
1054
1571
  }
1055
- export function __wbg_fetch_43b2f110608a59ff(arg0) {
1572
+ export function __wbg_fetch_074561c3e313c86f(arg0) {
1056
1573
  const ret = fetch(arg0);
1057
1574
  return ret;
1058
1575
  }
1059
- export function __wbg_fetch_5550a88cf343aaa9(arg0, arg1) {
1576
+ export function __wbg_fetch_b5951fc96f52f786(arg0, arg1) {
1060
1577
  const ret = arg0.fetch(arg1);
1061
1578
  return ret;
1062
1579
  }
1063
- export function __wbg_getRandomValues_76dfc69825c9c552() { return handleError(function (arg0, arg1) {
1064
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1580
+ export function __wbg_flush_a4bd8d4e05ad23f6() { return handleError(function (arg0) {
1581
+ arg0.flush();
1065
1582
  }, arguments); }
1583
+ export function __wbg_getDirectoryHandle_cf175faf1a75a384(arg0, arg1, arg2, arg3) {
1584
+ const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
1585
+ return ret;
1586
+ }
1587
+ export function __wbg_getDirectory_389283588dfb8117(arg0) {
1588
+ const ret = arg0.getDirectory();
1589
+ return ret;
1590
+ }
1591
+ export function __wbg_getFileHandle_72de55ab3ca9ad57(arg0, arg1, arg2, arg3) {
1592
+ const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
1593
+ return ret;
1594
+ }
1066
1595
  export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
1067
1596
  arg0.getRandomValues(arg1);
1068
1597
  }, arguments); }
1598
+ export function __wbg_getRandomValues_cc7f052a444bb2ce() { return handleError(function (arg0, arg1) {
1599
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1600
+ }, arguments); }
1069
1601
  export function __wbg_getReader_9facd4f899beac89() { return handleError(function (arg0) {
1070
1602
  const ret = arg0.getReader();
1071
1603
  return ret;
1072
1604
  }, arguments); }
1073
- export function __wbg_get_3ef1eba1850ade27() { return handleError(function (arg0, arg1) {
1074
- const ret = Reflect.get(arg0, arg1);
1605
+ export function __wbg_getSize_29187e13478442fb() { return handleError(function (arg0) {
1606
+ const ret = arg0.getSize();
1075
1607
  return ret;
1076
1608
  }, arguments); }
1077
- export function __wbg_get_a8ee5c45dabc1b3b(arg0, arg1) {
1609
+ export function __wbg_get_507a50627bffa49b(arg0, arg1) {
1078
1610
  const ret = arg0[arg1 >>> 0];
1079
1611
  return ret;
1080
1612
  }
1081
- export function __wbg_get_done_d0ab690f8df5501f(arg0) {
1613
+ export function __wbg_get_78f252d074a84d0b() { return handleError(function (arg0, arg1) {
1614
+ const ret = Reflect.get(arg0, arg1);
1615
+ return ret;
1616
+ }, arguments); }
1617
+ export function __wbg_get_done_670108eb06ecbe46(arg0) {
1082
1618
  const ret = arg0.done;
1083
1619
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1084
1620
  }
1085
- export function __wbg_get_value_548ae6adf5a174e4(arg0) {
1621
+ export function __wbg_get_value_f465f5be30aa0963(arg0) {
1086
1622
  const ret = arg0.value;
1087
1623
  return ret;
1088
1624
  }
1089
- export function __wbg_has_926ef2ff40b308cf() { return handleError(function (arg0, arg1) {
1625
+ export function __wbg_has_8374cf06984d8bfc() { return handleError(function (arg0, arg1) {
1090
1626
  const ret = Reflect.has(arg0, arg1);
1091
1627
  return ret;
1092
1628
  }, arguments); }
1093
- export function __wbg_headers_eb2234545f9ff993(arg0) {
1629
+ export function __wbg_headers_cf9c80f30e2a4eff(arg0) {
1094
1630
  const ret = arg0.headers;
1095
1631
  return ret;
1096
1632
  }
@@ -1098,7 +1634,7 @@ export function __wbg_helloimageresult_new(arg0) {
1098
1634
  const ret = HelloImageResult.__wrap(arg0);
1099
1635
  return ret;
1100
1636
  }
1101
- export function __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6(arg0) {
1637
+ export function __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb(arg0) {
1102
1638
  let result;
1103
1639
  try {
1104
1640
  result = arg0 instanceof ArrayBuffer;
@@ -1108,7 +1644,7 @@ export function __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6(arg0) {
1108
1644
  const ret = result;
1109
1645
  return ret;
1110
1646
  }
1111
- export function __wbg_instanceof_Blob_c91af000f11c2d0b(arg0) {
1647
+ export function __wbg_instanceof_Blob_c6523f92a32c8695(arg0) {
1112
1648
  let result;
1113
1649
  try {
1114
1650
  result = arg0 instanceof Blob;
@@ -1118,7 +1654,37 @@ export function __wbg_instanceof_Blob_c91af000f11c2d0b(arg0) {
1118
1654
  const ret = result;
1119
1655
  return ret;
1120
1656
  }
1121
- export function __wbg_instanceof_Response_9b4d9fd451e051b1(arg0) {
1657
+ export function __wbg_instanceof_FileSystemDirectoryHandle_c9ab7c5cdb7a7c30(arg0) {
1658
+ let result;
1659
+ try {
1660
+ result = arg0 instanceof FileSystemDirectoryHandle;
1661
+ } catch (_) {
1662
+ result = false;
1663
+ }
1664
+ const ret = result;
1665
+ return ret;
1666
+ }
1667
+ export function __wbg_instanceof_FileSystemFileHandle_68e80b30532d5f04(arg0) {
1668
+ let result;
1669
+ try {
1670
+ result = arg0 instanceof FileSystemFileHandle;
1671
+ } catch (_) {
1672
+ result = false;
1673
+ }
1674
+ const ret = result;
1675
+ return ret;
1676
+ }
1677
+ export function __wbg_instanceof_FileSystemSyncAccessHandle_db0b7504516129c1(arg0) {
1678
+ let result;
1679
+ try {
1680
+ result = arg0 instanceof FileSystemSyncAccessHandle;
1681
+ } catch (_) {
1682
+ result = false;
1683
+ }
1684
+ const ret = result;
1685
+ return ret;
1686
+ }
1687
+ export function __wbg_instanceof_Response_c8b64b2256f01bec(arg0) {
1122
1688
  let result;
1123
1689
  try {
1124
1690
  result = arg0 instanceof Response;
@@ -1128,15 +1694,35 @@ export function __wbg_instanceof_Response_9b4d9fd451e051b1(arg0) {
1128
1694
  const ret = result;
1129
1695
  return ret;
1130
1696
  }
1131
- export function __wbg_isArray_33b91feb269ff46e(arg0) {
1697
+ export function __wbg_instanceof_Window_05ba1ee4f6781663(arg0) {
1698
+ let result;
1699
+ try {
1700
+ result = arg0 instanceof Window;
1701
+ } catch (_) {
1702
+ result = false;
1703
+ }
1704
+ const ret = result;
1705
+ return ret;
1706
+ }
1707
+ export function __wbg_instanceof_WorkerGlobalScope_8ec07b5e040a41c3(arg0) {
1708
+ let result;
1709
+ try {
1710
+ result = arg0 instanceof WorkerGlobalScope;
1711
+ } catch (_) {
1712
+ result = false;
1713
+ }
1714
+ const ret = result;
1715
+ return ret;
1716
+ }
1717
+ export function __wbg_isArray_0677c962b281d01a(arg0) {
1132
1718
  const ret = Array.isArray(arg0);
1133
1719
  return ret;
1134
1720
  }
1135
- export function __wbg_length_b3416cf66a5452c8(arg0) {
1721
+ export function __wbg_length_1f0964f4a5e2c6d8(arg0) {
1136
1722
  const ret = arg0.length;
1137
1723
  return ret;
1138
1724
  }
1139
- export function __wbg_length_ea16607d7b61445b(arg0) {
1725
+ export function __wbg_length_370319915dc99107(arg0) {
1140
1726
  const ret = arg0.length;
1141
1727
  return ret;
1142
1728
  }
@@ -1145,7 +1731,7 @@ export function __wbg_log_7a0760e115750083(arg0, arg1) {
1145
1731
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
1146
1732
  console.log(...v0);
1147
1733
  }
1148
- export function __wbg_message_e959edc81e4b6cb7(arg0, arg1) {
1734
+ export function __wbg_message_fb0e6e7854e6ea7a(arg0, arg1) {
1149
1735
  const ret = arg1.message;
1150
1736
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1151
1737
  const len1 = WASM_VECTOR_LEN;
@@ -1160,7 +1746,15 @@ export function __wbg_msCrypto_bd5a034af96bcba6(arg0) {
1160
1746
  const ret = arg0.msCrypto;
1161
1747
  return ret;
1162
1748
  }
1163
- export function __wbg_new_0837727332ac86ba() { return handleError(function () {
1749
+ export function __wbg_navigator_51379c10a84aeec9(arg0) {
1750
+ const ret = arg0.navigator;
1751
+ return ret;
1752
+ }
1753
+ export function __wbg_navigator_99621db14b3f1099(arg0) {
1754
+ const ret = arg0.navigator;
1755
+ return ret;
1756
+ }
1757
+ export function __wbg_new_0d809930cd1354c6() { return handleError(function () {
1164
1758
  const ret = new Headers();
1165
1759
  return ret;
1166
1760
  }, arguments); }
@@ -1168,46 +1762,46 @@ export function __wbg_new_227d7c05414eb861() {
1168
1762
  const ret = new Error();
1169
1763
  return ret;
1170
1764
  }
1171
- export function __wbg_new_49d5571bd3f0c4d4() {
1172
- const ret = new Map();
1173
- return ret;
1174
- }
1175
- export function __wbg_new_5f486cdf45a04d78(arg0) {
1176
- const ret = new Uint8Array(arg0);
1177
- return ret;
1178
- }
1179
- export function __wbg_new_a70fbab9066b301f() {
1765
+ export function __wbg_new_32b398fb48b6d94a() {
1180
1766
  const ret = new Array();
1181
1767
  return ret;
1182
1768
  }
1183
- export function __wbg_new_ab79df5bd7c26067() {
1184
- const ret = new Object();
1185
- return ret;
1186
- }
1187
- export function __wbg_new_c518c60af666645b() { return handleError(function () {
1769
+ export function __wbg_new_4339b2a2675a03e3() { return handleError(function () {
1188
1770
  const ret = new AbortController();
1189
1771
  return ret;
1190
1772
  }, arguments); }
1191
- export function __wbg_new_d15cb560a6a0e5f0(arg0, arg1) {
1773
+ export function __wbg_new_7796ffc7ed656783() {
1774
+ const ret = new Map();
1775
+ return ret;
1776
+ }
1777
+ export function __wbg_new_b667d279fd5aa943(arg0, arg1) {
1192
1778
  const ret = new Error(getStringFromWasm0(arg0, arg1));
1193
1779
  return ret;
1194
1780
  }
1195
- export function __wbg_new_dd50bcc3f60ba434() { return handleError(function (arg0, arg1) {
1781
+ export function __wbg_new_bf8729ffe10e9ee7() { return handleError(function (arg0, arg1) {
1196
1782
  const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
1197
1783
  return ret;
1198
1784
  }, arguments); }
1199
- export function __wbg_new_from_slice_22da9388ac046e50(arg0, arg1) {
1785
+ export function __wbg_new_cd45aabdf6073e84(arg0) {
1786
+ const ret = new Uint8Array(arg0);
1787
+ return ret;
1788
+ }
1789
+ export function __wbg_new_da52cf8fe3429cb2() {
1790
+ const ret = new Object();
1791
+ return ret;
1792
+ }
1793
+ export function __wbg_new_from_slice_77cdfb7977362f3c(arg0, arg1) {
1200
1794
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1201
1795
  return ret;
1202
1796
  }
1203
- export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
1797
+ export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
1204
1798
  try {
1205
1799
  var state0 = {a: arg0, b: arg1};
1206
1800
  var cb0 = (arg0, arg1) => {
1207
1801
  const a = state0.a;
1208
1802
  state0.a = 0;
1209
1803
  try {
1210
- return wasm_bindgen__convert__closures_____invoke__h357561f53ac5f508(a, state0.b, arg0, arg1);
1804
+ return wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1211
1805
  } finally {
1212
1806
  state0.a = a;
1213
1807
  }
@@ -1215,26 +1809,26 @@ export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
1215
1809
  const ret = new Promise(cb0);
1216
1810
  return ret;
1217
1811
  } finally {
1218
- state0.a = state0.b = 0;
1812
+ state0.a = 0;
1219
1813
  }
1220
1814
  }
1221
- export function __wbg_new_with_byte_offset_and_length_b2ec5bf7b2f35743(arg0, arg1, arg2) {
1815
+ export function __wbg_new_with_byte_offset_and_length_54c7724ee3ec7d82(arg0, arg1, arg2) {
1222
1816
  const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1223
1817
  return ret;
1224
1818
  }
1225
- export function __wbg_new_with_length_825018a1616e9e55(arg0) {
1819
+ export function __wbg_new_with_length_e6785c33c8e4cce8(arg0) {
1226
1820
  const ret = new Uint8Array(arg0 >>> 0);
1227
1821
  return ret;
1228
1822
  }
1229
- export function __wbg_new_with_str_and_init_b4b54d1a819bc724() { return handleError(function (arg0, arg1, arg2) {
1823
+ export function __wbg_new_with_str_and_init_d95cbe11ce28e65e() { return handleError(function (arg0, arg1, arg2) {
1230
1824
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1231
1825
  return ret;
1232
1826
  }, arguments); }
1233
- export function __wbg_new_with_str_sequence_82c04ad794ead10e() { return handleError(function (arg0, arg1, arg2) {
1827
+ export function __wbg_new_with_str_sequence_2de2f569c29910ad() { return handleError(function (arg0, arg1, arg2) {
1234
1828
  const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
1235
1829
  return ret;
1236
1830
  }, arguments); }
1237
- export function __wbg_next_11b99ee6237339e3() { return handleError(function (arg0) {
1831
+ export function __wbg_next_71f2aa1cb3d1e37e() { return handleError(function (arg0) {
1238
1832
  const ret = arg0.next();
1239
1833
  return ret;
1240
1834
  }, arguments); }
@@ -1242,7 +1836,7 @@ export function __wbg_node_84ea875411254db1(arg0) {
1242
1836
  const ret = arg0.node;
1243
1837
  return ret;
1244
1838
  }
1245
- export function __wbg_now_16f0c993d5dd6c27() {
1839
+ export function __wbg_now_86c0d4ba3fa605b8() {
1246
1840
  const ret = Date.now();
1247
1841
  return ret;
1248
1842
  }
@@ -1258,25 +1852,25 @@ export function __wbg_process_44c7a14e11e9f69e(arg0) {
1258
1852
  const ret = arg0.process;
1259
1853
  return ret;
1260
1854
  }
1261
- export function __wbg_protocol_1ac9e6bde227a312(arg0, arg1) {
1855
+ export function __wbg_protocol_14b3b1c4bf71cd4a(arg0, arg1) {
1262
1856
  const ret = arg1.protocol;
1263
1857
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1264
1858
  const len1 = WASM_VECTOR_LEN;
1265
1859
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1266
1860
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1267
1861
  }
1268
- export function __wbg_prototypesetcall_d62e5099504357e6(arg0, arg1, arg2) {
1862
+ export function __wbg_prototypesetcall_4770620bbe4688a0(arg0, arg1, arg2) {
1269
1863
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1270
1864
  }
1271
- export function __wbg_push_e87b0e732085a946(arg0, arg1) {
1865
+ export function __wbg_push_d2ae3af0c1217ae6(arg0, arg1) {
1272
1866
  const ret = arg0.push(arg1);
1273
1867
  return ret;
1274
1868
  }
1275
- export function __wbg_queueMicrotask_0c399741342fb10f(arg0) {
1869
+ export function __wbg_queueMicrotask_0ab5b2d2393e99b9(arg0) {
1276
1870
  const ret = arg0.queueMicrotask;
1277
1871
  return ret;
1278
1872
  }
1279
- export function __wbg_queueMicrotask_a082d78ce798393e(arg0) {
1873
+ export function __wbg_queueMicrotask_6a09b7bc46549209(arg0) {
1280
1874
  queueMicrotask(arg0);
1281
1875
  }
1282
1876
  export function __wbg_radiohandle_new(arg0) {
@@ -1286,109 +1880,130 @@ export function __wbg_radiohandle_new(arg0) {
1286
1880
  export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
1287
1881
  arg0.randomFillSync(arg1);
1288
1882
  }, arguments); }
1289
- export function __wbg_read_7f593a961a7f80ed(arg0) {
1883
+ export function __wbg_random_039a7d5d06e0d333() {
1884
+ const ret = Math.random();
1885
+ return ret;
1886
+ }
1887
+ export function __wbg_read_27d98fb08886b1fc() { return handleError(function (arg0, arg1, arg2, arg3) {
1888
+ const ret = arg0.read(getArrayU8FromWasm0(arg1, arg2), arg3);
1889
+ return ret;
1890
+ }, arguments); }
1891
+ export function __wbg_read_8afa15f12a160ef8(arg0) {
1290
1892
  const ret = arg0.read();
1291
1893
  return ret;
1292
1894
  }
1293
- export function __wbg_readyState_1f1e7f1bdf9f4d42(arg0) {
1895
+ export function __wbg_readyState_50bc38c2a9e83db6(arg0) {
1294
1896
  const ret = arg0.readyState;
1295
1897
  return ret;
1296
1898
  }
1297
- export function __wbg_reason_cbcb9911796c4714(arg0, arg1) {
1899
+ export function __wbg_reason_5dc8e429d537d6a9(arg0, arg1) {
1298
1900
  const ret = arg1.reason;
1299
1901
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1300
1902
  const len1 = WASM_VECTOR_LEN;
1301
1903
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1302
1904
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1303
1905
  }
1304
- export function __wbg_releaseLock_ef7766a5da654ff8(arg0) {
1906
+ export function __wbg_releaseLock_5b92874cad775644(arg0) {
1305
1907
  arg0.releaseLock();
1306
1908
  }
1307
- export function __wbg_removeEventListener_c15bc311b6a5d11f() { return handleError(function (arg0, arg1, arg2, arg3) {
1909
+ export function __wbg_removeEntry_e38219fa4a98cfb3(arg0, arg1, arg2) {
1910
+ const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
1911
+ return ret;
1912
+ }
1913
+ export function __wbg_removeEventListener_eb8291c80ca9056d() { return handleError(function (arg0, arg1, arg2, arg3) {
1308
1914
  arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
1309
1915
  }, arguments); }
1310
1916
  export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function () {
1311
1917
  const ret = module.require;
1312
1918
  return ret;
1313
1919
  }, arguments); }
1314
- export function __wbg_resolve_ae8d83246e5bcc12(arg0) {
1920
+ export function __wbg_resolve_2191a4dfe481c25b(arg0) {
1315
1921
  const ret = Promise.resolve(arg0);
1316
1922
  return ret;
1317
1923
  }
1318
- export function __wbg_respond_e286ee502e7cf7e4() { return handleError(function (arg0, arg1) {
1924
+ export function __wbg_respond_510e32df8aeb6817() { return handleError(function (arg0, arg1) {
1319
1925
  arg0.respond(arg1 >>> 0);
1320
1926
  }, arguments); }
1321
- export function __wbg_send_4a1dc66e8653e5ed() { return handleError(function (arg0, arg1, arg2) {
1322
- arg0.send(getStringFromWasm0(arg1, arg2));
1323
- }, arguments); }
1324
- export function __wbg_send_d31a693c975dea74() { return handleError(function (arg0, arg1, arg2) {
1927
+ export function __wbg_send_a321b376d40ec867() { return handleError(function (arg0, arg1, arg2) {
1325
1928
  arg0.send(getArrayU8FromWasm0(arg1, arg2));
1326
1929
  }, arguments); }
1930
+ export function __wbg_send_df98dd5ede9b3f4d() { return handleError(function (arg0, arg1, arg2) {
1931
+ arg0.send(getStringFromWasm0(arg1, arg2));
1932
+ }, arguments); }
1933
+ export function __wbg_setTimeout_3a808dd861dd3c12(arg0, arg1) {
1934
+ const ret = setTimeout(arg0, arg1);
1935
+ return ret;
1936
+ }
1327
1937
  export function __wbg_setTimeout_6613a51400c1bf9f() { return handleError(function (arg0, arg1, arg2) {
1328
1938
  const ret = arg0.setTimeout(arg1, arg2);
1329
1939
  return ret;
1330
1940
  }, arguments); }
1331
- export function __wbg_setTimeout_b188b3bcc8977c7d(arg0, arg1) {
1332
- const ret = setTimeout(arg0, arg1);
1333
- return ret;
1941
+ export function __wbg_set_4d7dd76f3dae2926(arg0, arg1, arg2) {
1942
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
1334
1943
  }
1335
- export function __wbg_set_282384002438957f(arg0, arg1, arg2) {
1336
- arg0[arg1 >>> 0] = arg2;
1944
+ export function __wbg_set_575dd786d51585f8(arg0, arg1, arg2) {
1945
+ const ret = arg0.set(arg1, arg2);
1946
+ return ret;
1337
1947
  }
1338
1948
  export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
1339
1949
  arg0[arg1] = arg2;
1340
1950
  }
1341
- export function __wbg_set_7eaa4f96924fd6b3() { return handleError(function (arg0, arg1, arg2) {
1951
+ export function __wbg_set_8535240470bf2500() { return handleError(function (arg0, arg1, arg2) {
1342
1952
  const ret = Reflect.set(arg0, arg1, arg2);
1343
1953
  return ret;
1344
1954
  }, arguments); }
1345
- export function __wbg_set_8c0b3ffcf05d61c2(arg0, arg1, arg2) {
1346
- arg0.set(getArrayU8FromWasm0(arg1, arg2));
1955
+ export function __wbg_set_8a16b38e4805b298(arg0, arg1, arg2) {
1956
+ arg0[arg1 >>> 0] = arg2;
1347
1957
  }
1348
- export function __wbg_set_bf7251625df30a02(arg0, arg1, arg2) {
1349
- const ret = arg0.set(arg1, arg2);
1350
- return ret;
1958
+ export function __wbg_set_at_674f6538cd77adef(arg0, arg1) {
1959
+ arg0.at = arg1;
1351
1960
  }
1352
- export function __wbg_set_binaryType_3dcf8281ec100a8f(arg0, arg1) {
1961
+ export function __wbg_set_binaryType_a37b086c78ca7c29(arg0, arg1) {
1353
1962
  arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
1354
1963
  }
1355
- export function __wbg_set_body_a3d856b097dfda04(arg0, arg1) {
1964
+ export function __wbg_set_body_029f2d171e0a005f(arg0, arg1) {
1356
1965
  arg0.body = arg1;
1357
1966
  }
1358
- export function __wbg_set_cache_ec7e430c6056ebda(arg0, arg1) {
1967
+ export function __wbg_set_cache_b4a740b195c051f4(arg0, arg1) {
1359
1968
  arg0.cache = __wbindgen_enum_RequestCache[arg1];
1360
1969
  }
1361
- export function __wbg_set_credentials_ed63183445882c65(arg0, arg1) {
1970
+ export function __wbg_set_create_a807a6e9ac628698(arg0, arg1) {
1971
+ arg0.create = arg1 !== 0;
1972
+ }
1973
+ export function __wbg_set_create_fa1dfa475fac91e9(arg0, arg1) {
1974
+ arg0.create = arg1 !== 0;
1975
+ }
1976
+ export function __wbg_set_credentials_bb34a40189e3b43b(arg0, arg1) {
1362
1977
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1363
1978
  }
1364
- export function __wbg_set_handle_event_d54649fda219fb74(arg0, arg1) {
1979
+ export function __wbg_set_handle_event_dd6bc370a8cb4486(arg0, arg1) {
1365
1980
  arg0.handleEvent = arg1;
1366
1981
  }
1367
- export function __wbg_set_headers_3c8fecc693b75327(arg0, arg1) {
1982
+ export function __wbg_set_headers_9c61d123c3ee1f10(arg0, arg1) {
1368
1983
  arg0.headers = arg1;
1369
1984
  }
1370
- export function __wbg_set_method_8c015e8bcafd7be1(arg0, arg1, arg2) {
1985
+ export function __wbg_set_method_5532d59b92d76467(arg0, arg1, arg2) {
1371
1986
  arg0.method = getStringFromWasm0(arg1, arg2);
1372
1987
  }
1373
- export function __wbg_set_mode_5a87f2c809cf37c2(arg0, arg1) {
1988
+ export function __wbg_set_mode_66c79886ad78fc05(arg0, arg1) {
1374
1989
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
1375
1990
  }
1376
- export function __wbg_set_onclose_8da801226bdd7a7b(arg0, arg1) {
1991
+ export function __wbg_set_onclose_f706475385ecce07(arg0, arg1) {
1377
1992
  arg0.onclose = arg1;
1378
1993
  }
1379
- export function __wbg_set_onerror_901ca711f94a5bbb(arg0, arg1) {
1994
+ export function __wbg_set_onerror_9f5773fd31512333(arg0, arg1) {
1380
1995
  arg0.onerror = arg1;
1381
1996
  }
1382
- export function __wbg_set_onmessage_6f80ab771bf151aa(arg0, arg1) {
1997
+ export function __wbg_set_onmessage_836d2f72130b4706(arg0, arg1) {
1383
1998
  arg0.onmessage = arg1;
1384
1999
  }
1385
- export function __wbg_set_onopen_34e3e24cf9337ddd(arg0, arg1) {
2000
+ export function __wbg_set_onopen_4f65470ae522a61a(arg0, arg1) {
1386
2001
  arg0.onopen = arg1;
1387
2002
  }
1388
- export function __wbg_set_signal_0cebecb698f25d21(arg0, arg1) {
2003
+ export function __wbg_set_signal_c4ef8faddb4c1446(arg0, arg1) {
1389
2004
  arg0.signal = arg1;
1390
2005
  }
1391
- export function __wbg_signal_166e1da31adcac18(arg0) {
2006
+ export function __wbg_signal_dad7cb35193abd31(arg0) {
1392
2007
  const ret = arg0.signal;
1393
2008
  return ret;
1394
2009
  }
@@ -1399,53 +2014,64 @@ export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
1399
2014
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1400
2015
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1401
2016
  }
1402
- export function __wbg_static_accessor_GLOBAL_8adb955bd33fac2f() {
2017
+ export function __wbg_static_accessor_GLOBAL_4ef717fb391d88b7() {
1403
2018
  const ret = typeof global === 'undefined' ? null : global;
1404
2019
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1405
2020
  }
1406
- export function __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913() {
2021
+ export function __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4() {
1407
2022
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
1408
2023
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1409
2024
  }
1410
- export function __wbg_static_accessor_SELF_f207c857566db248() {
2025
+ export function __wbg_static_accessor_SELF_146583524fe1469b() {
1411
2026
  const ret = typeof self === 'undefined' ? null : self;
1412
2027
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1413
2028
  }
1414
- export function __wbg_static_accessor_WINDOW_bb9f1ba69d61b386() {
2029
+ export function __wbg_static_accessor_WINDOW_f2829a2234d7819e() {
1415
2030
  const ret = typeof window === 'undefined' ? null : window;
1416
2031
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1417
2032
  }
1418
- export function __wbg_status_318629ab93a22955(arg0) {
2033
+ export function __wbg_status_c45b3b9b3033184a(arg0) {
1419
2034
  const ret = arg0.status;
1420
2035
  return ret;
1421
2036
  }
1422
- export function __wbg_subarray_a068d24e39478a8a(arg0, arg1, arg2) {
1423
- const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
2037
+ export function __wbg_storage_3c893ad40b9e831e(arg0) {
2038
+ const ret = arg0.storage;
1424
2039
  return ret;
1425
2040
  }
1426
- export function __wbg_then_098abe61755d12f6(arg0, arg1) {
1427
- const ret = arg0.then(arg1);
2041
+ export function __wbg_storage_756400487605531a(arg0) {
2042
+ const ret = arg0.storage;
2043
+ return ret;
2044
+ }
2045
+ export function __wbg_subarray_3ed232c8a6baee09(arg0, arg1, arg2) {
2046
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1428
2047
  return ret;
1429
2048
  }
1430
- export function __wbg_then_9e335f6dd892bc11(arg0, arg1, arg2) {
2049
+ export function __wbg_then_16d107c451e9905d(arg0, arg1, arg2) {
1431
2050
  const ret = arg0.then(arg1, arg2);
1432
2051
  return ret;
1433
2052
  }
1434
- export function __wbg_url_778f9516ea867e17(arg0, arg1) {
2053
+ export function __wbg_then_6ec10ae38b3e92f7(arg0, arg1) {
2054
+ const ret = arg0.then(arg1);
2055
+ return ret;
2056
+ }
2057
+ export function __wbg_truncate_98a6032d23095328() { return handleError(function (arg0, arg1) {
2058
+ arg0.truncate(arg1);
2059
+ }, arguments); }
2060
+ export function __wbg_url_a410c0bec2fb1b2c(arg0, arg1) {
1435
2061
  const ret = arg1.url;
1436
2062
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1437
2063
  const len1 = WASM_VECTOR_LEN;
1438
2064
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1439
2065
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1440
2066
  }
1441
- export function __wbg_url_7fefc1820fba4e0c(arg0, arg1) {
2067
+ export function __wbg_url_abdb8fb08377f8c0(arg0, arg1) {
1442
2068
  const ret = arg1.url;
1443
2069
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1444
2070
  const len1 = WASM_VECTOR_LEN;
1445
2071
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1446
2072
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1447
2073
  }
1448
- export function __wbg_value_21fc78aab0322612(arg0) {
2074
+ export function __wbg_value_a5d5488a9589444a(arg0) {
1449
2075
  const ret = arg0.value;
1450
2076
  return ret;
1451
2077
  }
@@ -1453,7 +2079,7 @@ export function __wbg_versions_276b2795b1c6a219(arg0) {
1453
2079
  const ret = arg0.versions;
1454
2080
  return ret;
1455
2081
  }
1456
- export function __wbg_view_f68a712e7315f8b2(arg0) {
2082
+ export function __wbg_view_21f1d4a4f175dfa9(arg0) {
1457
2083
  const ret = arg0.view;
1458
2084
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1459
2085
  }
@@ -1462,71 +2088,70 @@ export function __wbg_warn_3a37cdd7216f1479(arg0, arg1) {
1462
2088
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
1463
2089
  console.warn(...v0);
1464
2090
  }
1465
- export function __wbg_wasClean_69f68dc4ed2d2cc7(arg0) {
2091
+ export function __wbg_wasClean_3c7aa2335da09e74(arg0) {
1466
2092
  const ret = arg0.wasClean;
1467
2093
  return ret;
1468
2094
  }
2095
+ export function __wbg_write_e557b5312ec23477() { return handleError(function (arg0, arg1, arg2, arg3) {
2096
+ const ret = arg0.write(getArrayU8FromWasm0(arg1, arg2), arg3);
2097
+ return ret;
2098
+ }, arguments); }
1469
2099
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
1470
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3042, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 3043, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1471
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb183e556614092ca, wasm_bindgen__convert__closures_____invoke__hbe731298a115c9e4);
2100
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3530, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2101
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_);
1472
2102
  return ret;
1473
2103
  }
1474
2104
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
1475
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3198, function: Function { arguments: [], shim_idx: 3199, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1476
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h85ae81daf1218992, wasm_bindgen__convert__closures_____invoke__hc6f3654ebee0b80e);
2105
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5576, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2106
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_);
1477
2107
  return ret;
1478
2108
  }
1479
2109
  export function __wbindgen_cast_0000000000000003(arg0, arg1) {
1480
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3222, function: Function { arguments: [Externref], shim_idx: 3223, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1481
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h9c0e6de874b60dbc, wasm_bindgen__convert__closures_____invoke__hd1f261354767d15e);
2110
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 2808, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2111
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_);
1482
2112
  return ret;
1483
2113
  }
1484
2114
  export function __wbindgen_cast_0000000000000004(arg0, arg1) {
1485
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3267, function: Function { arguments: [], shim_idx: 3268, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1486
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h23a1c12cd048d3cb, wasm_bindgen__convert__closures_____invoke__hfa08fd7116a7315b);
2115
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 4161, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2116
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_);
1487
2117
  return ret;
1488
2118
  }
1489
2119
  export function __wbindgen_cast_0000000000000005(arg0, arg1) {
1490
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3320, function: Function { arguments: [], shim_idx: 3321, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1491
- const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hea58ba9208361aba, wasm_bindgen__convert__closures_____invoke__he25ef9f974db7a85);
2120
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3449, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2121
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_);
1492
2122
  return ret;
1493
2123
  }
1494
2124
  export function __wbindgen_cast_0000000000000006(arg0, arg1) {
1495
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3741, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3742, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1496
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he82de21879ef6972, wasm_bindgen__convert__closures_____invoke__heb521225421210b0);
2125
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3703, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2126
+ const ret = makeClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_);
1497
2127
  return ret;
1498
2128
  }
1499
2129
  export function __wbindgen_cast_0000000000000007(arg0, arg1) {
1500
- // Cast intrinsic for `Closure(Closure { dtor_idx: 5074, function: Function { arguments: [], shim_idx: 5075, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1501
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hc498dc21c6574762, wasm_bindgen__convert__closures_____invoke__he2934cb51e5b7bf4);
2130
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5540, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2131
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_);
1502
2132
  return ret;
1503
2133
  }
1504
- export function __wbindgen_cast_0000000000000008(arg0, arg1) {
1505
- // Cast intrinsic for `Closure(Closure { dtor_idx: 5083, function: Function { arguments: [Externref], shim_idx: 5084, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1506
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb75a498ac0db6fe5, wasm_bindgen__convert__closures_____invoke__h190e8892b208884b);
1507
- return ret;
1508
- }
1509
- export function __wbindgen_cast_0000000000000009(arg0) {
2134
+ export function __wbindgen_cast_0000000000000008(arg0) {
1510
2135
  // Cast intrinsic for `F64 -> Externref`.
1511
2136
  const ret = arg0;
1512
2137
  return ret;
1513
2138
  }
1514
- export function __wbindgen_cast_000000000000000a(arg0) {
2139
+ export function __wbindgen_cast_0000000000000009(arg0) {
1515
2140
  // Cast intrinsic for `I64 -> Externref`.
1516
2141
  const ret = arg0;
1517
2142
  return ret;
1518
2143
  }
1519
- export function __wbindgen_cast_000000000000000b(arg0, arg1) {
2144
+ export function __wbindgen_cast_000000000000000a(arg0, arg1) {
1520
2145
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1521
2146
  const ret = getArrayU8FromWasm0(arg0, arg1);
1522
2147
  return ret;
1523
2148
  }
1524
- export function __wbindgen_cast_000000000000000c(arg0, arg1) {
2149
+ export function __wbindgen_cast_000000000000000b(arg0, arg1) {
1525
2150
  // Cast intrinsic for `Ref(String) -> Externref`.
1526
2151
  const ret = getStringFromWasm0(arg0, arg1);
1527
2152
  return ret;
1528
2153
  }
1529
- export function __wbindgen_cast_000000000000000d(arg0) {
2154
+ export function __wbindgen_cast_000000000000000c(arg0) {
1530
2155
  // Cast intrinsic for `U64 -> Externref`.
1531
2156
  const ret = BigInt.asUintN(64, arg0);
1532
2157
  return ret;
@@ -1540,43 +2165,39 @@ export function __wbindgen_init_externref_table() {
1540
2165
  table.set(offset + 2, true);
1541
2166
  table.set(offset + 3, false);
1542
2167
  }
1543
- function wasm_bindgen__convert__closures_____invoke__hc6f3654ebee0b80e(arg0, arg1) {
1544
- wasm.wasm_bindgen__convert__closures_____invoke__hc6f3654ebee0b80e(arg0, arg1);
2168
+ function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_(arg0, arg1) {
2169
+ wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_(arg0, arg1);
1545
2170
  }
1546
2171
 
1547
- function wasm_bindgen__convert__closures_____invoke__hfa08fd7116a7315b(arg0, arg1) {
1548
- wasm.wasm_bindgen__convert__closures_____invoke__hfa08fd7116a7315b(arg0, arg1);
2172
+ function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_(arg0, arg1) {
2173
+ wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_(arg0, arg1);
1549
2174
  }
1550
2175
 
1551
- function wasm_bindgen__convert__closures_____invoke__he25ef9f974db7a85(arg0, arg1) {
1552
- wasm.wasm_bindgen__convert__closures_____invoke__he25ef9f974db7a85(arg0, arg1);
2176
+ function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_(arg0, arg1) {
2177
+ wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_(arg0, arg1);
1553
2178
  }
1554
2179
 
1555
- function wasm_bindgen__convert__closures_____invoke__he2934cb51e5b7bf4(arg0, arg1) {
1556
- wasm.wasm_bindgen__convert__closures_____invoke__he2934cb51e5b7bf4(arg0, arg1);
2180
+ function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_(arg0, arg1, arg2) {
2181
+ wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_(arg0, arg1, arg2);
1557
2182
  }
1558
2183
 
1559
- function wasm_bindgen__convert__closures_____invoke__hbe731298a115c9e4(arg0, arg1, arg2) {
1560
- wasm.wasm_bindgen__convert__closures_____invoke__hbe731298a115c9e4(arg0, arg1, arg2);
2184
+ function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2) {
2185
+ wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2);
1561
2186
  }
1562
2187
 
1563
- function wasm_bindgen__convert__closures_____invoke__hd1f261354767d15e(arg0, arg1, arg2) {
1564
- wasm.wasm_bindgen__convert__closures_____invoke__hd1f261354767d15e(arg0, arg1, arg2);
2188
+ function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_(arg0, arg1, arg2) {
2189
+ wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_(arg0, arg1, arg2);
1565
2190
  }
1566
2191
 
1567
- function wasm_bindgen__convert__closures_____invoke__heb521225421210b0(arg0, arg1, arg2) {
1568
- wasm.wasm_bindgen__convert__closures_____invoke__heb521225421210b0(arg0, arg1, arg2);
1569
- }
1570
-
1571
- function wasm_bindgen__convert__closures_____invoke__h190e8892b208884b(arg0, arg1, arg2) {
1572
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h190e8892b208884b(arg0, arg1, arg2);
2192
+ function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_(arg0, arg1, arg2) {
2193
+ const ret = wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_(arg0, arg1, arg2);
1573
2194
  if (ret[1]) {
1574
2195
  throw takeFromExternrefTable0(ret[0]);
1575
2196
  }
1576
2197
  }
1577
2198
 
1578
- function wasm_bindgen__convert__closures_____invoke__h357561f53ac5f508(arg0, arg1, arg2, arg3) {
1579
- wasm.wasm_bindgen__convert__closures_____invoke__h357561f53ac5f508(arg0, arg1, arg2, arg3);
2199
+ function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
2200
+ wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
1580
2201
  }
1581
2202
 
1582
2203
 
@@ -1595,25 +2216,37 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
1595
2216
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
1596
2217
  const BiStreamFinalization = (typeof FinalizationRegistry === 'undefined')
1597
2218
  ? { register: () => {}, unregister: () => {} }
1598
- : new FinalizationRegistry(ptr => wasm.__wbg_bistream_free(ptr >>> 0, 1));
2219
+ : new FinalizationRegistry(ptr => wasm.__wbg_bistream_free(ptr, 1));
2220
+ const Blake3HasherFinalization = (typeof FinalizationRegistry === 'undefined')
2221
+ ? { register: () => {}, unregister: () => {} }
2222
+ : new FinalizationRegistry(ptr => wasm.__wbg_blake3hasher_free(ptr, 1));
2223
+ const CancelTokenFinalization = (typeof FinalizationRegistry === 'undefined')
2224
+ ? { register: () => {}, unregister: () => {} }
2225
+ : new FinalizationRegistry(ptr => wasm.__wbg_canceltoken_free(ptr, 1));
1599
2226
  const HelloImageResultFinalization = (typeof FinalizationRegistry === 'undefined')
1600
2227
  ? { register: () => {}, unregister: () => {} }
1601
- : new FinalizationRegistry(ptr => wasm.__wbg_helloimageresult_free(ptr >>> 0, 1));
2228
+ : new FinalizationRegistry(ptr => wasm.__wbg_helloimageresult_free(ptr, 1));
2229
+ const ImportSessionFinalization = (typeof FinalizationRegistry === 'undefined')
2230
+ ? { register: () => {}, unregister: () => {} }
2231
+ : new FinalizationRegistry(ptr => wasm.__wbg_importsession_free(ptr, 1));
1602
2232
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1603
2233
  ? { register: () => {}, unregister: () => {} }
1604
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
2234
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
1605
2235
  const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
1606
2236
  ? { register: () => {}, unregister: () => {} }
1607
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
2237
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
1608
2238
  const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1609
2239
  ? { register: () => {}, unregister: () => {} }
1610
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
2240
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
1611
2241
  const MiddenNodeFinalization = (typeof FinalizationRegistry === 'undefined')
1612
2242
  ? { register: () => {}, unregister: () => {} }
1613
- : new FinalizationRegistry(ptr => wasm.__wbg_middennode_free(ptr >>> 0, 1));
2243
+ : new FinalizationRegistry(ptr => wasm.__wbg_middennode_free(ptr, 1));
2244
+ const MiddenNodeOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
2245
+ ? { register: () => {}, unregister: () => {} }
2246
+ : new FinalizationRegistry(ptr => wasm.__wbg_middennodeoptions_free(ptr, 1));
1614
2247
  const RadioHandleFinalization = (typeof FinalizationRegistry === 'undefined')
1615
2248
  ? { register: () => {}, unregister: () => {} }
1616
- : new FinalizationRegistry(ptr => wasm.__wbg_radiohandle_free(ptr >>> 0, 1));
2249
+ : new FinalizationRegistry(ptr => wasm.__wbg_radiohandle_free(ptr, 1));
1617
2250
 
1618
2251
  function addToExternrefTable0(obj) {
1619
2252
  const idx = wasm.__externref_table_alloc();
@@ -1621,9 +2254,15 @@ function addToExternrefTable0(obj) {
1621
2254
  return idx;
1622
2255
  }
1623
2256
 
2257
+ function _assertClass(instance, klass) {
2258
+ if (!(instance instanceof klass)) {
2259
+ throw new Error(`expected instance of ${klass.name}`);
2260
+ }
2261
+ }
2262
+
1624
2263
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1625
2264
  ? { register: () => {}, unregister: () => {} }
1626
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
2265
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
1627
2266
 
1628
2267
  function debugString(val) {
1629
2268
  // primitive types
@@ -1715,8 +2354,7 @@ function getDataViewMemory0() {
1715
2354
  }
1716
2355
 
1717
2356
  function getStringFromWasm0(ptr, len) {
1718
- ptr = ptr >>> 0;
1719
- return decodeText(ptr, len);
2357
+ return decodeText(ptr >>> 0, len);
1720
2358
  }
1721
2359
 
1722
2360
  let cachedUint8ArrayMemory0 = null;
@@ -1740,8 +2378,8 @@ function isLikeNone(x) {
1740
2378
  return x === undefined || x === null;
1741
2379
  }
1742
2380
 
1743
- function makeClosure(arg0, arg1, dtor, f) {
1744
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
2381
+ function makeClosure(arg0, arg1, f) {
2382
+ const state = { a: arg0, b: arg1, cnt: 1 };
1745
2383
  const real = (...args) => {
1746
2384
 
1747
2385
  // First up with a closure we increment the internal reference
@@ -1756,7 +2394,7 @@ function makeClosure(arg0, arg1, dtor, f) {
1756
2394
  };
1757
2395
  real._wbg_cb_unref = () => {
1758
2396
  if (--state.cnt === 0) {
1759
- state.dtor(state.a, state.b);
2397
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1760
2398
  state.a = 0;
1761
2399
  CLOSURE_DTORS.unregister(state);
1762
2400
  }
@@ -1765,8 +2403,8 @@ function makeClosure(arg0, arg1, dtor, f) {
1765
2403
  return real;
1766
2404
  }
1767
2405
 
1768
- function makeMutClosure(arg0, arg1, dtor, f) {
1769
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
2406
+ function makeMutClosure(arg0, arg1, f) {
2407
+ const state = { a: arg0, b: arg1, cnt: 1 };
1770
2408
  const real = (...args) => {
1771
2409
 
1772
2410
  // First up with a closure we increment the internal reference
@@ -1784,7 +2422,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
1784
2422
  };
1785
2423
  real._wbg_cb_unref = () => {
1786
2424
  if (--state.cnt === 0) {
1787
- state.dtor(state.a, state.b);
2425
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1788
2426
  state.a = 0;
1789
2427
  CLOSURE_DTORS.unregister(state);
1790
2428
  }
@@ -1800,6 +2438,16 @@ function passArray8ToWasm0(arg, malloc) {
1800
2438
  return ptr;
1801
2439
  }
1802
2440
 
2441
+ function passArrayJsValueToWasm0(array, malloc) {
2442
+ const ptr = malloc(array.length * 4, 4) >>> 0;
2443
+ for (let i = 0; i < array.length; i++) {
2444
+ const add = addToExternrefTable0(array[i]);
2445
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
2446
+ }
2447
+ WASM_VECTOR_LEN = array.length;
2448
+ return ptr;
2449
+ }
2450
+
1803
2451
  function passStringToWasm0(arg, malloc, realloc) {
1804
2452
  if (realloc === undefined) {
1805
2453
  const buf = cachedTextEncoder.encode(arg);