@loro-dev/flock 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -421,11 +421,6 @@ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$15$(param
421
421
  this._0 = param0;
422
422
  }
423
423
  $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$15$.prototype.$tag = 4;
424
- const Option$None$16$ = { $tag: 0 };
425
- function Option$Some$16$(param0) {
426
- this._0 = param0;
427
- }
428
- Option$Some$16$.prototype.$tag = 1;
429
424
  const moonbitlang$core$builtin$$MyInt64$convert_to_double_u = (a) => (a.hi >>> 0) * 4294967296.0 + (a.lo >>> 0);
430
425
  const moonbitlang$core$builtin$$MyInt64$reinterpret_as_double = function f(a) {
431
426
  let view = f._view;
@@ -438,17 +433,72 @@ const moonbitlang$core$builtin$$MyInt64$reinterpret_as_double = function f(a) {
438
433
  };
439
434
  const $9218868437227405311L = { hi: 2146435071, lo: -1 };
440
435
  const $_4503599627370497L = { hi: -1048577, lo: -1 };
441
- function Result$Err$17$(param0) {
436
+ function Result$Err$16$(param0) {
442
437
  this._0 = param0;
443
438
  }
444
- Result$Err$17$.prototype.$tag = 0;
445
- function Result$Ok$17$(param0) {
439
+ Result$Err$16$.prototype.$tag = 0;
440
+ function Result$Ok$16$(param0) {
446
441
  this._0 = param0;
447
442
  }
448
- Result$Ok$17$.prototype.$tag = 1;
443
+ Result$Ok$16$.prototype.$tag = 1;
449
444
  const moonbitlang$core$builtin$$get_int64_wasm_helper = function f() {
450
445
  if (f._exports) return f._exports;
451
- return f._exports = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11])), {}).exports;
446
+ if (typeof WebAssembly !== "undefined") {
447
+ try {
448
+ return f._exports = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11])), {}).exports;
449
+ } catch (_err) {
450
+ // Fall through to the JS fallback when WebAssembly instantiation is blocked.
451
+ }
452
+ }
453
+ if (typeof BigInt !== "function") {
454
+ throw new Error("WebAssembly unavailable and BigInt unsupported; cannot emulate int64 helpers");
455
+ }
456
+ let high = 0;
457
+ const to_int64 = (lo, hi) => BigInt.asIntN(64, (BigInt(hi >>> 0) << 32n) | BigInt(lo >>> 0));
458
+ const to_uint64 = (lo, hi) => BigInt.asUintN(64, (BigInt(hi >>> 0) << 32n) | BigInt(lo >>> 0));
459
+ const update = (value) => {
460
+ const normalized = BigInt.asUintN(64, value);
461
+ const lo = Number(normalized & 4294967295n) | 0;
462
+ high = Number(normalized >> 32n) | 0;
463
+ return lo;
464
+ };
465
+ const throw_on_divide_by_zero = () => {
466
+ throw new Error("integer divide by zero");
467
+ };
468
+ const div_overflow = -9223372036854775808n;
469
+ const exports = {
470
+ get_high: () => high,
471
+ mul: (alo, ahi, blo, bhi) => {
472
+ const result = to_int64(alo, ahi) * to_int64(blo, bhi);
473
+ return update(result);
474
+ },
475
+ div_s: (alo, ahi, blo, bhi) => {
476
+ const dividend = to_int64(alo, ahi);
477
+ const divisor = to_int64(blo, bhi);
478
+ if (divisor === 0n) return throw_on_divide_by_zero();
479
+ if (dividend === div_overflow && divisor === -1n) return throw_on_divide_by_zero();
480
+ return update(dividend / divisor);
481
+ },
482
+ div_u: (alo, ahi, blo, bhi) => {
483
+ const dividend = to_uint64(alo, ahi);
484
+ const divisor = to_uint64(blo, bhi);
485
+ if (divisor === 0n) return throw_on_divide_by_zero();
486
+ return update(dividend / divisor);
487
+ },
488
+ rem_s: (alo, ahi, blo, bhi) => {
489
+ const dividend = to_int64(alo, ahi);
490
+ const divisor = to_int64(blo, bhi);
491
+ if (divisor === 0n) return throw_on_divide_by_zero();
492
+ return update(dividend % divisor);
493
+ },
494
+ rem_u: (alo, ahi, blo, bhi) => {
495
+ const dividend = to_uint64(alo, ahi);
496
+ const divisor = to_uint64(blo, bhi);
497
+ if (divisor === 0n) return throw_on_divide_by_zero();
498
+ return update(dividend % divisor);
499
+ }
500
+ };
501
+ return f._exports = exports;
452
502
  };
453
503
  const moonbitlang$core$builtin$$MyInt64$compare = (a, b) => {
454
504
  const ahi = a.hi;
@@ -502,6 +552,15 @@ const moonbitlang$core$builtin$$MyInt64$convert_to_double = (a) => a.hi * 429496
502
552
  const $bytes_literal$0 = new Uint8Array();
503
553
  const moonbitlang$core$builtin$$JSArray$pop = (arr) => arr.pop();
504
554
  const moonbitlang$core$builtin$$JSArray$splice1 = (arr, idx, cnt, val) => arr.splice(idx, cnt, val);
555
+ function Result$Err$17$(param0) {
556
+ this._0 = param0;
557
+ }
558
+ Result$Err$17$.prototype.$tag = 0;
559
+ function Result$Ok$17$(param0) {
560
+ this._0 = param0;
561
+ }
562
+ Result$Ok$17$.prototype.$tag = 1;
563
+ const Yoorkin$jmop$$ffi_typeof = (x) => typeof x;
505
564
  function Result$Err$18$(param0) {
506
565
  this._0 = param0;
507
566
  }
@@ -510,7 +569,6 @@ function Result$Ok$18$(param0) {
510
569
  this._0 = param0;
511
570
  }
512
571
  Result$Ok$18$.prototype.$tag = 1;
513
- const Yoorkin$jmop$$ffi_typeof = (x) => typeof x;
514
572
  function Result$Err$19$(param0) {
515
573
  this._0 = param0;
516
574
  }
@@ -519,6 +577,8 @@ function Result$Ok$19$(param0) {
519
577
  this._0 = param0;
520
578
  }
521
579
  Result$Ok$19$.prototype.$tag = 1;
580
+ const Yoorkin$jmop$$ffi_object_is_null = (x) => x === null;
581
+ const Yoorkin$jmop$$ffi_is_array = (x) => Array.isArray(x);
522
582
  function Result$Err$20$(param0) {
523
583
  this._0 = param0;
524
584
  }
@@ -527,8 +587,8 @@ function Result$Ok$20$(param0) {
527
587
  this._0 = param0;
528
588
  }
529
589
  Result$Ok$20$.prototype.$tag = 1;
530
- const Yoorkin$jmop$$ffi_object_is_null = (x) => x === null;
531
- const Yoorkin$jmop$$ffi_is_array = (x) => Array.isArray(x);
590
+ const Yoorkin$jmop$$ffi_undefined = () => undefined;
591
+ const Yoorkin$jmop$$ffi_is_undefined = (x) => x === undefined;
532
592
  function Result$Err$21$(param0) {
533
593
  this._0 = param0;
534
594
  }
@@ -537,8 +597,6 @@ function Result$Ok$21$(param0) {
537
597
  this._0 = param0;
538
598
  }
539
599
  Result$Ok$21$.prototype.$tag = 1;
540
- const Yoorkin$jmop$$ffi_undefined = () => undefined;
541
- const Yoorkin$jmop$$ffi_is_undefined = (x) => x === undefined;
542
600
  function Result$Err$22$(param0) {
543
601
  this._0 = param0;
544
602
  }
@@ -547,14 +605,6 @@ function Result$Ok$22$(param0) {
547
605
  this._0 = param0;
548
606
  }
549
607
  Result$Ok$22$.prototype.$tag = 1;
550
- function Result$Err$23$(param0) {
551
- this._0 = param0;
552
- }
553
- Result$Err$23$.prototype.$tag = 0;
554
- function Result$Ok$23$(param0) {
555
- this._0 = param0;
556
- }
557
- Result$Ok$23$.prototype.$tag = 1;
558
608
  const Yoorkin$jmop$$ffi_init = (convert_thrown_error, ) => {
559
609
  globalThis["MoonBit"] = {
560
610
  Result: {
@@ -598,6 +648,14 @@ const Yoorkin$jmop$$ffi_init = (convert_thrown_error, ) => {
598
648
  }
599
649
  }
600
650
  };
651
+ function Result$Err$23$(param0) {
652
+ this._0 = param0;
653
+ }
654
+ Result$Err$23$.prototype.$tag = 0;
655
+ function Result$Ok$23$(param0) {
656
+ this._0 = param0;
657
+ }
658
+ Result$Ok$23$.prototype.$tag = 1;
601
659
  function Result$Err$24$(param0) {
602
660
  this._0 = param0;
603
661
  }
@@ -606,6 +664,10 @@ function Result$Ok$24$(param0) {
606
664
  this._0 = param0;
607
665
  }
608
666
  Result$Ok$24$.prototype.$tag = 1;
667
+ const $64L = { hi: 0, lo: 64 };
668
+ const $56L = { hi: 0, lo: 56 };
669
+ const $127L = { hi: 0, lo: 127 };
670
+ const $255L = { hi: 0, lo: 255 };
609
671
  function Result$Err$25$(param0) {
610
672
  this._0 = param0;
611
673
  }
@@ -614,10 +676,7 @@ function Result$Ok$25$(param0) {
614
676
  this._0 = param0;
615
677
  }
616
678
  Result$Ok$25$.prototype.$tag = 1;
617
- const $64L = { hi: 0, lo: 64 };
618
- const $56L = { hi: 0, lo: 56 };
619
- const $127L = { hi: 0, lo: 127 };
620
- const $255L = { hi: 0, lo: 255 };
679
+ const $256L = { hi: 0, lo: 256 };
621
680
  function Result$Err$26$(param0) {
622
681
  this._0 = param0;
623
682
  }
@@ -626,7 +685,6 @@ function Result$Ok$26$(param0) {
626
685
  this._0 = param0;
627
686
  }
628
687
  Result$Ok$26$.prototype.$tag = 1;
629
- const $256L = { hi: 0, lo: 256 };
630
688
  function Result$Err$27$(param0) {
631
689
  this._0 = param0;
632
690
  }
@@ -635,14 +693,6 @@ function Result$Ok$27$(param0) {
635
693
  this._0 = param0;
636
694
  }
637
695
  Result$Ok$27$.prototype.$tag = 1;
638
- function Result$Err$28$(param0) {
639
- this._0 = param0;
640
- }
641
- Result$Err$28$.prototype.$tag = 0;
642
- function Result$Ok$28$(param0) {
643
- this._0 = param0;
644
- }
645
- Result$Ok$28$.prototype.$tag = 1;
646
696
  function $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$Bytes(param0) {
647
697
  this._0 = param0;
648
698
  }
@@ -661,14 +711,23 @@ function $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$Float(param0) {
661
711
  $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$Float.prototype.$tag = 3;
662
712
  const $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$False = { $tag: 4 };
663
713
  const $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$True = { $tag: 5 };
664
- function Result$Err$29$(param0) {
714
+ function Result$Err$28$(param0) {
715
+ this._0 = param0;
716
+ }
717
+ Result$Err$28$.prototype.$tag = 0;
718
+ function Result$Ok$28$(param0) {
665
719
  this._0 = param0;
666
720
  }
667
- Result$Err$29$.prototype.$tag = 0;
668
- function Result$Ok$29$(param0) {
721
+ Result$Ok$28$.prototype.$tag = 1;
722
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$29$(param0) {
723
+ this._0 = param0;
724
+ }
725
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$29$.prototype.$tag = 0;
726
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$29$(param0) {
669
727
  this._0 = param0;
670
728
  }
671
- Result$Ok$29$.prototype.$tag = 1;
729
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$29$.prototype.$tag = 1;
730
+ const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$ = { $tag: 2 };
672
731
  function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$30$(param0) {
673
732
  this._0 = param0;
674
733
  }
@@ -678,107 +737,120 @@ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$(param0) {
678
737
  }
679
738
  $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$.prototype.$tag = 1;
680
739
  const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$ = { $tag: 2 };
681
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$31$(param0) {
740
+ const Option$None$31$ = { $tag: 0 };
741
+ function Option$Some$31$(param0) {
682
742
  this._0 = param0;
683
743
  }
684
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$31$.prototype.$tag = 0;
685
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$31$(param0) {
744
+ Option$Some$31$.prototype.$tag = 1;
745
+ function Result$Err$32$(param0) {
686
746
  this._0 = param0;
687
747
  }
688
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$31$.prototype.$tag = 1;
689
- const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$31$ = { $tag: 2 };
690
- const Option$None$32$ = { $tag: 0 };
691
- function Option$Some$32$(param0) {
748
+ Result$Err$32$.prototype.$tag = 0;
749
+ function Result$Ok$32$(param0) {
692
750
  this._0 = param0;
693
751
  }
694
- Option$Some$32$.prototype.$tag = 1;
695
- function Result$Err$33$(param0) {
752
+ Result$Ok$32$.prototype.$tag = 1;
753
+ const Option$None$33$ = { $tag: 0 };
754
+ function Option$Some$33$(param0) {
696
755
  this._0 = param0;
697
756
  }
698
- Result$Err$33$.prototype.$tag = 0;
699
- function Result$Ok$33$(param0) {
700
- this._0 = param0;
701
- }
702
- Result$Ok$33$.prototype.$tag = 1;
757
+ Option$Some$33$.prototype.$tag = 1;
703
758
  const Option$None$34$ = { $tag: 0 };
704
759
  function Option$Some$34$(param0) {
705
760
  this._0 = param0;
706
761
  }
707
762
  Option$Some$34$.prototype.$tag = 1;
708
- const Option$None$35$ = { $tag: 0 };
709
- function Option$Some$35$(param0) {
763
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$35$(param0) {
764
+ this._0 = param0;
765
+ }
766
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$35$.prototype.$tag = 0;
767
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$35$(param0) {
710
768
  this._0 = param0;
711
769
  }
712
- Option$Some$35$.prototype.$tag = 1;
713
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(param0) {
770
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$35$.prototype.$tag = 1;
771
+ const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$35$ = { $tag: 2 };
772
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$36$ = { $tag: 0 };
773
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$36$(param0) {
714
774
  this._0 = param0;
715
775
  }
716
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$.prototype.$tag = 0;
717
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(param0) {
776
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$36$.prototype.$tag = 1;
777
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$36$(param0) {
718
778
  this._0 = param0;
719
779
  }
720
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$.prototype.$tag = 1;
721
- const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$ = { $tag: 2 };
722
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$37$ = { $tag: 0 };
723
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$37$(param0) {
780
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$36$.prototype.$tag = 2;
781
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$36$(param0) {
724
782
  this._0 = param0;
725
783
  }
726
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$37$.prototype.$tag = 1;
727
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$37$(param0) {
784
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$36$.prototype.$tag = 3;
785
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$36$(param0) {
728
786
  this._0 = param0;
729
787
  }
730
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$37$.prototype.$tag = 2;
731
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$37$(param0) {
788
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$36$.prototype.$tag = 4;
789
+ function Result$Err$37$(param0) {
732
790
  this._0 = param0;
733
791
  }
734
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$37$.prototype.$tag = 3;
735
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$37$(param0) {
792
+ Result$Err$37$.prototype.$tag = 0;
793
+ function Result$Ok$37$(param0) {
736
794
  this._0 = param0;
737
795
  }
738
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$37$.prototype.$tag = 4;
739
- function Result$Err$38$(param0) {
796
+ Result$Ok$37$.prototype.$tag = 1;
797
+ const Option$None$38$ = { $tag: 0 };
798
+ function Option$Some$38$(param0) {
740
799
  this._0 = param0;
741
800
  }
742
- Result$Err$38$.prototype.$tag = 0;
743
- function Result$Ok$38$(param0) {
801
+ Option$Some$38$.prototype.$tag = 1;
802
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$39$ = { $tag: 0 };
803
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$39$(param0) {
744
804
  this._0 = param0;
745
805
  }
746
- Result$Ok$38$.prototype.$tag = 1;
747
- const Option$None$39$ = { $tag: 0 };
748
- function Option$Some$39$(param0) {
806
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$39$.prototype.$tag = 1;
807
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$39$(param0) {
749
808
  this._0 = param0;
750
809
  }
751
- Option$Some$39$.prototype.$tag = 1;
752
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$40$ = { $tag: 0 };
753
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$40$(param0) {
810
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$39$.prototype.$tag = 2;
811
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$39$(param0) {
754
812
  this._0 = param0;
755
813
  }
756
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$40$.prototype.$tag = 1;
757
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$40$(param0) {
814
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$39$.prototype.$tag = 3;
815
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$39$(param0) {
758
816
  this._0 = param0;
759
817
  }
760
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$40$.prototype.$tag = 2;
761
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$40$(param0) {
818
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$39$.prototype.$tag = 4;
819
+ const Option$None$40$ = { $tag: 0 };
820
+ function Option$Some$40$(param0) {
762
821
  this._0 = param0;
763
822
  }
764
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$40$.prototype.$tag = 3;
765
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$40$(param0) {
823
+ Option$Some$40$.prototype.$tag = 1;
824
+ function Result$Err$41$(param0) {
766
825
  this._0 = param0;
767
826
  }
768
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$40$.prototype.$tag = 4;
769
- const Option$None$41$ = { $tag: 0 };
770
- function Option$Some$41$(param0) {
827
+ Result$Err$41$.prototype.$tag = 0;
828
+ function Result$Ok$41$(param0) {
771
829
  this._0 = param0;
772
830
  }
773
- Option$Some$41$.prototype.$tag = 1;
774
- function Result$Err$42$(param0) {
831
+ Result$Ok$41$.prototype.$tag = 1;
832
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$42$ = { $tag: 0 };
833
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$42$(param0) {
775
834
  this._0 = param0;
776
835
  }
777
- Result$Err$42$.prototype.$tag = 0;
778
- function Result$Ok$42$(param0) {
836
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$42$.prototype.$tag = 1;
837
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$42$(param0) {
779
838
  this._0 = param0;
780
839
  }
781
- Result$Ok$42$.prototype.$tag = 1;
840
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$42$.prototype.$tag = 2;
841
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$42$(param0) {
842
+ this._0 = param0;
843
+ }
844
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$42$.prototype.$tag = 3;
845
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$42$(param0) {
846
+ this._0 = param0;
847
+ }
848
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$42$.prototype.$tag = 4;
849
+ const Option$None$29$ = { $tag: 0 };
850
+ function Option$Some$29$(param0) {
851
+ this._0 = param0;
852
+ }
853
+ Option$Some$29$.prototype.$tag = 1;
782
854
  const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$43$ = { $tag: 0 };
783
855
  function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$43$(param0) {
784
856
  this._0 = param0;
@@ -796,28 +868,6 @@ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$43$(param
796
868
  this._0 = param0;
797
869
  }
798
870
  $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$43$.prototype.$tag = 4;
799
- const Option$None$30$ = { $tag: 0 };
800
- function Option$Some$30$(param0) {
801
- this._0 = param0;
802
- }
803
- Option$Some$30$.prototype.$tag = 1;
804
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$44$ = { $tag: 0 };
805
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$44$(param0) {
806
- this._0 = param0;
807
- }
808
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$44$.prototype.$tag = 1;
809
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$44$(param0) {
810
- this._0 = param0;
811
- }
812
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$44$.prototype.$tag = 2;
813
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$44$(param0) {
814
- this._0 = param0;
815
- }
816
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$44$.prototype.$tag = 3;
817
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$44$(param0) {
818
- this._0 = param0;
819
- }
820
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$44$.prototype.$tag = 4;
821
871
  const zxch3n$flock$flock$$ffi_json_stringify_value = (value) => {
822
872
  const result = JSON.stringify(value);
823
873
  if (result === undefined) {
@@ -828,23 +878,23 @@ const zxch3n$flock$flock$$ffi_json_stringify_value = (value) => {
828
878
  const zxch3n$flock$flock$$ffi_json_parse_to_nullable = (json) => JSON.parse(json);
829
879
  const zxch3n$flock$flock$$ffi_any_is_null = (value) => value === null;
830
880
  const zxch3n$flock$flock$$ffi_any_is_undefined = (value) => value === undefined;
831
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$45$ = { $tag: 0 };
832
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$45$(param0) {
881
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$44$ = { $tag: 0 };
882
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$44$(param0) {
833
883
  this._0 = param0;
834
884
  }
835
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$45$.prototype.$tag = 1;
836
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$45$(param0) {
885
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$44$.prototype.$tag = 1;
886
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$44$(param0) {
837
887
  this._0 = param0;
838
888
  }
839
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$45$.prototype.$tag = 2;
840
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$45$(param0) {
889
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$44$.prototype.$tag = 2;
890
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$44$(param0) {
841
891
  this._0 = param0;
842
892
  }
843
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$45$.prototype.$tag = 3;
844
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$45$(param0) {
893
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$44$.prototype.$tag = 3;
894
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$44$(param0) {
845
895
  this._0 = param0;
846
896
  }
847
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$45$.prototype.$tag = 4;
897
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$44$.prototype.$tag = 4;
848
898
  const zxch3n$flock$flock$$ffi_invoke_listener = (listener, event) => listener(event);
849
899
  const zxch3n$flock$flock$$ffi_make_unsubscribe = (callback) => () => callback();
850
900
  const moonbitlang$core$strconv$$base_err_str = "invalid base";
@@ -946,18 +996,18 @@ const moonbitlang$core$builtin$$null = $64$moonbitlang$47$core$47$builtin$46$Jso
946
996
  const moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$1508 = 0;
947
997
  const moonbitlang$core$builtin$$brute_force_find$46$constr$47$1522 = 0;
948
998
  const gmlewis$sha256$$_K = [1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998];
949
- const gmlewis$sha256$$new$46$42$bind$47$2486 = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225];
999
+ const gmlewis$sha256$$new$46$42$bind$47$2484 = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225];
950
1000
  const zxch3n$expect$$to_string$46$42$bind$124$178 = ";";
951
- const zxch3n$expect$$red$46$constr$47$2561 = 1;
952
- const zxch3n$expect$$yellow$46$constr$47$2563 = 3;
953
- const zxch3n$expect$$blue$46$constr$47$2565 = 4;
954
- const zxch3n$flock$sorted_map$$range$46$tuple$47$2964 = { _0: true, _1: true };
955
- const zxch3n$flock$sorted_map$$range$46$tuple$47$2965 = { _0: true, _1: true };
956
- const zxch3n$flock$flock$$from_string$46$42$bind$124$604 = ",";
957
- const zxch3n$flock$flock$$zero$46$record$47$3043 = { physical_time: 0, logical_counter: 0 };
958
- const zxch3n$flock$flock$$new$46$42$bind$47$3223 = { physical_time: 0, logical_counter: 0 };
959
- const zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3465 = new Source$Import("import_json");
960
- const zxch3n$flock$flock$$newFlock$46$42$bind$47$3574 = { physical_time: 0, logical_counter: 0 };
1001
+ const zxch3n$expect$$red$46$constr$47$2570 = 1;
1002
+ const zxch3n$expect$$yellow$46$constr$47$2572 = 3;
1003
+ const zxch3n$expect$$blue$46$constr$47$2574 = 4;
1004
+ const zxch3n$flock$sorted_map$$range$46$tuple$47$2971 = { _0: true, _1: true };
1005
+ const zxch3n$flock$sorted_map$$range$46$tuple$47$2972 = { _0: true, _1: true };
1006
+ const zxch3n$flock$flock$$from_string$46$42$bind$124$598 = ",";
1007
+ const zxch3n$flock$flock$$zero$46$record$47$3050 = { physical_time: 0, logical_counter: 0 };
1008
+ const zxch3n$flock$flock$$new$46$42$bind$47$3233 = { physical_time: 0, logical_counter: 0 };
1009
+ const zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3484 = new Source$Import("import_json");
1010
+ const zxch3n$flock$flock$$newFlock$46$42$bind$47$3593 = { physical_time: 0, logical_counter: 0 };
961
1011
  (() => {
962
1012
  Yoorkin$jmop$$ffi_init(Yoorkin$jmop$$convert_thrown_error);
963
1013
  })();
@@ -974,10 +1024,10 @@ function moonbitlang$core$abort$$abort$2$(msg) {
974
1024
  return $panic();
975
1025
  }
976
1026
  function moonbitlang$core$abort$$abort$3$(msg) {
977
- return $panic();
1027
+ $panic();
978
1028
  }
979
1029
  function moonbitlang$core$abort$$abort$4$(msg) {
980
- $panic();
1030
+ return $panic();
981
1031
  }
982
1032
  function moonbitlang$core$abort$$abort$5$(msg) {
983
1033
  return $panic();
@@ -1021,7 +1071,7 @@ function moonbitlang$core$abort$$abort$17$(msg) {
1021
1071
  function moonbitlang$core$abort$$abort$18$(msg) {
1022
1072
  return $panic();
1023
1073
  }
1024
- function moonbitlang$core$string$$ToStringView$to_string_view$8$(self) {
1074
+ function moonbitlang$core$string$$ToStringView$to_string_view$7$(self) {
1025
1075
  return { str: self, start: 0, end: self.length };
1026
1076
  }
1027
1077
  function moonbitlang$core$uint$$UInt$to_int64(self) {
@@ -1037,7 +1087,7 @@ function moonbitlang$core$bytes$$BytesView$at(self, index) {
1037
1087
  $bound_check(_tmp, _tmp$2);
1038
1088
  return _tmp[_tmp$2];
1039
1089
  } else {
1040
- return moonbitlang$core$abort$$abort$12$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$19$(self.end - self.start | 0)} but the index is ${moonbitlang$core$builtin$$Show$to_string$19$(index)}`);
1090
+ return moonbitlang$core$abort$$abort$13$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$19$(self.end - self.start | 0)} but the index is ${moonbitlang$core$builtin$$Show$to_string$19$(index)}`);
1041
1091
  }
1042
1092
  }
1043
1093
  function moonbitlang$core$bytes$$Bytes$sub$46$inner(self, start, end) {
@@ -1106,13 +1156,13 @@ function moonbitlang$core$bytes$$BytesView$iterator(self) {
1106
1156
  return _p;
1107
1157
  }
1108
1158
  function moonbitlang$core$bytes$$Bytes$from_array(arr) {
1109
- return moonbitlang$core$bytes$$Bytes$makei$20$(arr.end - arr.start | 0, (i) => moonbitlang$core$array$$ArrayView$at$12$(arr, i));
1159
+ return moonbitlang$core$bytes$$Bytes$makei$20$(arr.end - arr.start | 0, (i) => moonbitlang$core$array$$ArrayView$at$13$(arr, i));
1110
1160
  }
1111
1161
  function moonbitlang$core$bytes$$Bytes$from_iter(iter) {
1112
- const _bind = moonbitlang$core$builtin$$Iter$collect$12$(iter);
1162
+ const _bind = moonbitlang$core$builtin$$Iter$collect$13$(iter);
1113
1163
  return moonbitlang$core$bytes$$Bytes$from_array({ buf: _bind, start: 0, end: _bind.length });
1114
1164
  }
1115
- function moonbitlang$core$builtin$$Hash$hash_combine$3$(self, hasher) {
1165
+ function moonbitlang$core$builtin$$Hash$hash_combine$2$(self, hasher) {
1116
1166
  moonbitlang$core$builtin$$Hasher$combine$11$(hasher, moonbitlang$core$bytes$$Bytes$sub$46$inner(self, 0, self.length));
1117
1167
  }
1118
1168
  function moonbitlang$core$env$$now() {
@@ -1141,7 +1191,7 @@ function moonbitlang$core$builtin$$Mod$mod$21$(self, other) {
1141
1191
  }
1142
1192
  function moonbitlang$core$builtin$$Shr$shr$21$(self, n) {
1143
1193
  if (n < 0) {
1144
- moonbitlang$core$abort$$abort$4$("negative shift count");
1194
+ moonbitlang$core$abort$$abort$3$("negative shift count");
1145
1195
  }
1146
1196
  return moonbitlang$core$bigint$$BigInt$js_shr(self, n);
1147
1197
  }
@@ -1425,10 +1475,10 @@ function moonbitlang$core$strconv$$check_and_consume_base(view, base) {
1425
1475
  function moonbitlang$core$strconv$$range_err$22$() {
1426
1476
  return new Result$Err$1$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$range_err_str));
1427
1477
  }
1428
- function moonbitlang$core$strconv$$range_err$4$() {
1478
+ function moonbitlang$core$strconv$$range_err$3$() {
1429
1479
  return new Result$Err$2$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$range_err_str));
1430
1480
  }
1431
- function moonbitlang$core$strconv$$syntax_err$13$() {
1481
+ function moonbitlang$core$strconv$$syntax_err$12$() {
1432
1482
  return new Result$Err$3$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
1433
1483
  }
1434
1484
  function moonbitlang$core$strconv$$syntax_err$22$() {
@@ -1440,7 +1490,7 @@ function moonbitlang$core$strconv$$syntax_err$24$() {
1440
1490
  function moonbitlang$core$strconv$$syntax_err$25$() {
1441
1491
  return new Result$Err$5$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
1442
1492
  }
1443
- function moonbitlang$core$strconv$$syntax_err$16$() {
1493
+ function moonbitlang$core$strconv$$syntax_err$15$() {
1444
1494
  return new Result$Err$6$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
1445
1495
  }
1446
1496
  function moonbitlang$core$strconv$$syntax_err$26$() {
@@ -1450,7 +1500,7 @@ function moonbitlang$core$strconv$$overflow_threshold(base, neg) {
1450
1500
  return !neg ? (base === 10 ? moonbitlang$core$builtin$$Add$add$22$(moonbitlang$core$builtin$$Div$div$22$($9223372036854775807L, $10L), $1L) : base === 16 ? moonbitlang$core$builtin$$Add$add$22$(moonbitlang$core$builtin$$Div$div$22$($9223372036854775807L, $16L), $1L) : moonbitlang$core$builtin$$Add$add$22$(moonbitlang$core$builtin$$Div$div$22$($9223372036854775807L, moonbitlang$core$int$$Int$to_int64(base)), $1L)) : base === 10 ? moonbitlang$core$builtin$$Div$div$22$($_9223372036854775808L, $10L) : base === 16 ? moonbitlang$core$builtin$$Div$div$22$($_9223372036854775808L, $16L) : moonbitlang$core$builtin$$Div$div$22$($_9223372036854775808L, moonbitlang$core$int$$Int$to_int64(base));
1451
1501
  }
1452
1502
  function moonbitlang$core$strconv$$parse_int64$46$inner(str, base) {
1453
- if (moonbitlang$core$builtin$$op_notequal$16$(str, { str: moonbitlang$core$strconv$$parse_int64$46$inner$46$42$bind$124$600, start: 0, end: moonbitlang$core$strconv$$parse_int64$46$inner$46$42$bind$124$600.length })) {
1503
+ if (moonbitlang$core$builtin$$op_notequal$15$(str, { str: moonbitlang$core$strconv$$parse_int64$46$inner$46$42$bind$124$600, start: 0, end: moonbitlang$core$strconv$$parse_int64$46$inner$46$42$bind$124$600.length })) {
1454
1504
  let _bind;
1455
1505
  let rest;
1456
1506
  _L: {
@@ -1648,7 +1698,7 @@ function moonbitlang$core$strconv$$parse_int64$46$inner(str, base) {
1648
1698
  if (c$2 >= 65 && c$2 <= 90) {
1649
1699
  d = c$2 + -55 | 0;
1650
1700
  } else {
1651
- const _bind$4 = moonbitlang$core$strconv$$syntax_err$13$();
1701
+ const _bind$4 = moonbitlang$core$strconv$$syntax_err$12$();
1652
1702
  if (_bind$4.$tag === 1) {
1653
1703
  const _ok = _bind$4;
1654
1704
  d = _ok._0;
@@ -2128,7 +2178,7 @@ function moonbitlang$core$strconv$$parse_decimal_from_view(str) {
2128
2178
  _tmp = _x$2;
2129
2179
  continue;
2130
2180
  } else {
2131
- const _bind$2 = moonbitlang$core$strconv$$syntax_err$16$();
2181
+ const _bind$2 = moonbitlang$core$strconv$$syntax_err$15$();
2132
2182
  if (_bind$2.$tag === 1) {
2133
2183
  const _ok = _bind$2;
2134
2184
  rest$2 = _ok._0;
@@ -2334,7 +2384,7 @@ function moonbitlang$core$strconv$$parse_decimal_from_view(str) {
2334
2384
  }
2335
2385
  break _L$4;
2336
2386
  }
2337
- const _bind = moonbitlang$core$strconv$$syntax_err$16$();
2387
+ const _bind = moonbitlang$core$strconv$$syntax_err$15$();
2338
2388
  if (_bind.$tag === 1) {
2339
2389
  const _ok = _bind;
2340
2390
  rest$3 = _ok._0;
@@ -3940,7 +3990,7 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
3940
3990
  return new Result$Ok$4$(moonbitlang$core$int64$$Int64$reinterpret_as_double(bits));
3941
3991
  }
3942
3992
  if (self.decimal_point > 310) {
3943
- const _bind = moonbitlang$core$strconv$$range_err$4$();
3993
+ const _bind = moonbitlang$core$strconv$$range_err$3$();
3944
3994
  if (_bind.$tag === 1) {
3945
3995
  const _ok = _bind;
3946
3996
  _ok._0;
@@ -4003,7 +4053,7 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
4003
4053
  exponent = exponent + n | 0;
4004
4054
  }
4005
4055
  if ((exponent - moonbitlang$core$strconv$$double_info.bias | 0) >= ((1 << moonbitlang$core$strconv$$double_info.exponent_bits) - 1 | 0)) {
4006
- const _bind = moonbitlang$core$strconv$$range_err$4$();
4056
+ const _bind = moonbitlang$core$strconv$$range_err$3$();
4007
4057
  if (_bind.$tag === 1) {
4008
4058
  const _ok = _bind;
4009
4059
  _ok._0;
@@ -4017,7 +4067,7 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
4017
4067
  mantissa = moonbitlang$core$builtin$$Shr$shr$22$(mantissa, 1);
4018
4068
  exponent = exponent + 1 | 0;
4019
4069
  if ((exponent - moonbitlang$core$strconv$$double_info.bias | 0) >= ((1 << moonbitlang$core$strconv$$double_info.exponent_bits) - 1 | 0)) {
4020
- const _bind = moonbitlang$core$strconv$$range_err$4$();
4070
+ const _bind = moonbitlang$core$strconv$$range_err$3$();
4021
4071
  if (_bind.$tag === 1) {
4022
4072
  const _ok = _bind;
4023
4073
  _ok._0;
@@ -4160,7 +4210,7 @@ function moonbitlang$core$json$$ParseContext$invalid_char$46$inner$14$(ctx, shif
4160
4210
  const _p$2 = 65533;
4161
4211
  return new Result$Err$9$(new Error$moonbitlang$47$core$47$json$46$ParseError$46$InvalidChar(moonbitlang$core$json$$offset_to_position(ctx.input, offset), _p === -1 ? _p$2 : _p));
4162
4212
  }
4163
- function moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, shift) {
4213
+ function moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, shift) {
4164
4214
  const offset = ctx.offset + shift | 0;
4165
4215
  const _p = moonbitlang$core$string$$StringView$get_char(ctx.input, offset);
4166
4216
  const _p$2 = 65533;
@@ -4210,7 +4260,7 @@ function moonbitlang$core$builtin$$Show$output$14$(self, logger) {
4210
4260
  const _String = self;
4211
4261
  const _s = _String._0;
4212
4262
  logger.method_0(logger.self, "String(");
4213
- moonbitlang$core$builtin$$Show$output$8$(_s, logger);
4263
+ moonbitlang$core$builtin$$Show$output$7$(_s, logger);
4214
4264
  logger.method_0(logger.self, ")");
4215
4265
  return;
4216
4266
  }
@@ -4336,7 +4386,7 @@ function moonbitlang$core$json$$ParseContext$expect_ascii_char(ctx, c) {
4336
4386
  const _tmp$2 = _p.start + _p$2 | 0;
4337
4387
  const c1 = _tmp.charCodeAt(_tmp$2);
4338
4388
  ctx.offset = ctx.offset + 1 | 0;
4339
- return c !== c1 ? moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1) : new Result$Ok$10$(undefined);
4389
+ return c !== c1 ? moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1) : new Result$Ok$10$(undefined);
4340
4390
  } else {
4341
4391
  return new Result$Err$10$(Error$moonbitlang$47$core$47$json$46$ParseError$46$InvalidEof);
4342
4392
  }
@@ -4616,7 +4666,7 @@ function moonbitlang$core$json$$ParseContext$lex_hex_digits(ctx, n) {
4616
4666
  if (_c >= 65) {
4617
4667
  const d = ((_c & ~32) - 65 | 0) + 10 | 0;
4618
4668
  if (d > 15) {
4619
- const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
4669
+ const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
4620
4670
  if (_bind$2.$tag === 1) {
4621
4671
  const _ok = _bind$2;
4622
4672
  _ok._0;
@@ -4629,7 +4679,7 @@ function moonbitlang$core$json$$ParseContext$lex_hex_digits(ctx, n) {
4629
4679
  if (_c >= 48) {
4630
4680
  const d = _c - 48 | 0;
4631
4681
  if (d > 9) {
4632
- const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
4682
+ const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
4633
4683
  if (_bind$2.$tag === 1) {
4634
4684
  const _ok = _bind$2;
4635
4685
  _ok._0;
@@ -4639,7 +4689,7 @@ function moonbitlang$core$json$$ParseContext$lex_hex_digits(ctx, n) {
4639
4689
  }
4640
4690
  r = r << 4 | d;
4641
4691
  } else {
4642
- const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
4692
+ const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
4643
4693
  if (_bind$2.$tag === 1) {
4644
4694
  const _ok = _bind$2;
4645
4695
  _ok._0;
@@ -4751,7 +4801,7 @@ function moonbitlang$core$json$$ParseContext$lex_string(ctx) {
4751
4801
  break;
4752
4802
  }
4753
4803
  default: {
4754
- const _bind$4 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
4804
+ const _bind$4 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
4755
4805
  if (_bind$4.$tag === 1) {
4756
4806
  const _ok = _bind$4;
4757
4807
  _ok._0;
@@ -4766,7 +4816,7 @@ function moonbitlang$core$json$$ParseContext$lex_string(ctx) {
4766
4816
  }
4767
4817
  default: {
4768
4818
  if (_x < 32) {
4769
- const _bind$3 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
4819
+ const _bind$3 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
4770
4820
  if (_bind$3.$tag === 1) {
4771
4821
  const _ok = _bind$3;
4772
4822
  _ok._0;
@@ -4781,7 +4831,7 @@ function moonbitlang$core$json$$ParseContext$lex_string(ctx) {
4781
4831
  }
4782
4832
  break _L$3;
4783
4833
  }
4784
- const _bind = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
4834
+ const _bind = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
4785
4835
  if (_bind.$tag === 1) {
4786
4836
  const _ok = _bind;
4787
4837
  _ok._0;
@@ -4816,7 +4866,7 @@ function moonbitlang$core$json$$ParseContext$lex_zero(ctx, start) {
4816
4866
  default: {
4817
4867
  if (_x >= 48 && _x <= 57) {
4818
4868
  ctx.offset = ctx.offset - 1 | 0;
4819
- const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, 0);
4869
+ const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, 0);
4820
4870
  if (_bind$2.$tag === 1) {
4821
4871
  const _ok = _bind$2;
4822
4872
  _ok._0;
@@ -4865,7 +4915,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
4865
4915
  if (allow_rbracket) {
4866
4916
  return new Result$Ok$12$($64$moonbitlang$47$core$47$json$46$Token$RBracket);
4867
4917
  } else {
4868
- const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
4918
+ const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
4869
4919
  if (_bind$2.$tag === 1) {
4870
4920
  const _ok = _bind$2;
4871
4921
  _ok._0;
@@ -4971,7 +5021,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
4971
5021
  }
4972
5022
  const _n = _bind$4._0;
4973
5023
  const _repr = _bind$4._1;
4974
- return new Result$Ok$12$(new $64$moonbitlang$47$core$47$json$46$Token$Number(_n, moonbitlang$core$option$$Option$map$36$(_repr, (_hole203) => moonbitlang$core$builtin$$Show$to_string$16$(_hole203))));
5024
+ return new Result$Ok$12$(new $64$moonbitlang$47$core$47$json$46$Token$Number(_n, moonbitlang$core$option$$Option$map$36$(_repr, (_hole203) => moonbitlang$core$builtin$$Show$to_string$15$(_hole203))));
4975
5025
  } else {
4976
5026
  if (_x$2 >= 49 && _x$2 <= 57) {
4977
5027
  const _bind$3 = moonbitlang$core$json$$ParseContext$lex_decimal_integer(ctx, ctx.offset - 2 | 0);
@@ -4984,9 +5034,9 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
4984
5034
  }
4985
5035
  const _n = _bind$4._0;
4986
5036
  const _repr = _bind$4._1;
4987
- return new Result$Ok$12$(new $64$moonbitlang$47$core$47$json$46$Token$Number(_n, moonbitlang$core$option$$Option$map$36$(_repr, (_hole208) => moonbitlang$core$builtin$$Show$to_string$16$(_hole208))));
5037
+ return new Result$Ok$12$(new $64$moonbitlang$47$core$47$json$46$Token$Number(_n, moonbitlang$core$option$$Option$map$36$(_repr, (_hole208) => moonbitlang$core$builtin$$Show$to_string$15$(_hole208))));
4988
5038
  }
4989
- const _bind$3 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
5039
+ const _bind$3 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
4990
5040
  if (_bind$3.$tag === 1) {
4991
5041
  const _ok = _bind$3;
4992
5042
  _ok._0;
@@ -5007,7 +5057,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
5007
5057
  }
5008
5058
  const _n = _bind$3._0;
5009
5059
  const _repr = _bind$3._1;
5010
- return new Result$Ok$12$(new $64$moonbitlang$47$core$47$json$46$Token$Number(_n, moonbitlang$core$option$$Option$map$36$(_repr, (_hole212) => moonbitlang$core$builtin$$Show$to_string$16$(_hole212))));
5060
+ return new Result$Ok$12$(new $64$moonbitlang$47$core$47$json$46$Token$Number(_n, moonbitlang$core$option$$Option$map$36$(_repr, (_hole212) => moonbitlang$core$builtin$$Show$to_string$15$(_hole212))));
5011
5061
  } else {
5012
5062
  if (_x >= 49 && _x <= 57) {
5013
5063
  const _bind$2 = moonbitlang$core$json$$ParseContext$lex_decimal_integer(ctx, ctx.offset - 1 | 0);
@@ -5020,7 +5070,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
5020
5070
  }
5021
5071
  const _n = _bind$3._0;
5022
5072
  const _repr = _bind$3._1;
5023
- return new Result$Ok$12$(new $64$moonbitlang$47$core$47$json$46$Token$Number(_n, moonbitlang$core$option$$Option$map$36$(_repr, (_hole216) => moonbitlang$core$builtin$$Show$to_string$16$(_hole216))));
5073
+ return new Result$Ok$12$(new $64$moonbitlang$47$core$47$json$46$Token$Number(_n, moonbitlang$core$option$$Option$map$36$(_repr, (_hole216) => moonbitlang$core$builtin$$Show$to_string$15$(_hole216))));
5024
5074
  } else {
5025
5075
  if (_x === 34) {
5026
5076
  const _bind$2 = moonbitlang$core$json$$ParseContext$lex_string(ctx);
@@ -5038,7 +5088,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
5038
5088
  }
5039
5089
  const _p = _x;
5040
5090
  const shift = -(_p <= 65535 ? 1 : 2) | 0;
5041
- const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, shift);
5091
+ const _bind$2 = moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, shift);
5042
5092
  if (_bind$2.$tag === 1) {
5043
5093
  const _ok = _bind$2;
5044
5094
  _ok._0;
@@ -5122,7 +5172,7 @@ function moonbitlang$core$json$$ParseContext$lex_after_property_name(ctx) {
5122
5172
  if (_x === 58) {
5123
5173
  return new Result$Ok$10$(undefined);
5124
5174
  } else {
5125
- return moonbitlang$core$json$$ParseContext$invalid_char$46$inner$4$(ctx, -1);
5175
+ return moonbitlang$core$json$$ParseContext$invalid_char$46$inner$3$(ctx, -1);
5126
5176
  }
5127
5177
  }
5128
5178
  }
@@ -5654,7 +5704,7 @@ function moonbitlang$core$json$$Json$as_number(self) {
5654
5704
  return Option$None$8$;
5655
5705
  }
5656
5706
  }
5657
- function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5707
+ function moonbitlang$core$array$$ArrayView$join$7$(self, separator) {
5658
5708
  if ((self.end - self.start | 0) === 0) {
5659
5709
  return "";
5660
5710
  } else {
@@ -5663,7 +5713,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5663
5713
  const _bind$2 = 1 + self.start | 0;
5664
5714
  const _bind$3 = self.end;
5665
5715
  const _x = { buf: _bind, start: _bind$2, end: _bind$3 };
5666
- const hd = moonbitlang$core$string$$ToStringView$to_string_view$8$(_hd);
5716
+ const hd = moonbitlang$core$string$$ToStringView$to_string_view$7$(_hd);
5667
5717
  let size_hint = hd.end - hd.start | 0;
5668
5718
  const _len = _x.end - _x.start | 0;
5669
5719
  let _tmp = 0;
@@ -5672,7 +5722,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5672
5722
  if (_i < _len) {
5673
5723
  const s = _bind[_bind$2 + _i | 0];
5674
5724
  const _tmp$2 = size_hint;
5675
- const _p = moonbitlang$core$string$$ToStringView$to_string_view$8$(s);
5725
+ const _p = moonbitlang$core$string$$ToStringView$to_string_view$7$(s);
5676
5726
  size_hint = _tmp$2 + ((_p.end - _p.start | 0) + (separator.end - separator.start | 0) | 0) | 0;
5677
5727
  _tmp = _i + 1 | 0;
5678
5728
  continue;
@@ -5690,7 +5740,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5690
5740
  const _i = _tmp$2;
5691
5741
  if (_i < _len$2) {
5692
5742
  const s = _bind[_bind$2 + _i | 0];
5693
- const s$2 = moonbitlang$core$string$$ToStringView$to_string_view$8$(s);
5743
+ const s$2 = moonbitlang$core$string$$ToStringView$to_string_view$7$(s);
5694
5744
  moonbitlang$core$builtin$$Logger$write_substring$35$(buf, s$2.str, s$2.start, s$2.end - s$2.start | 0);
5695
5745
  _tmp$2 = _i + 1 | 0;
5696
5746
  continue;
@@ -5705,7 +5755,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5705
5755
  const _i = _tmp$2;
5706
5756
  if (_i < _len$2) {
5707
5757
  const s = _bind[_bind$2 + _i | 0];
5708
- const s$2 = moonbitlang$core$string$$ToStringView$to_string_view$8$(s);
5758
+ const s$2 = moonbitlang$core$string$$ToStringView$to_string_view$7$(s);
5709
5759
  moonbitlang$core$builtin$$Logger$write_substring$35$(buf, separator.str, separator.start, separator.end - separator.start | 0);
5710
5760
  moonbitlang$core$builtin$$Logger$write_substring$35$(buf, s$2.str, s$2.start, s$2.end - s$2.start | 0);
5711
5761
  _tmp$2 = _i + 1 | 0;
@@ -5718,7 +5768,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5718
5768
  return buf.val;
5719
5769
  }
5720
5770
  }
5721
- function moonbitlang$core$array$$FixedArray$copy$12$(self) {
5771
+ function moonbitlang$core$array$$FixedArray$copy$13$(self) {
5722
5772
  return moonbitlang$core$array$$JSArray$copy(self);
5723
5773
  }
5724
5774
  function moonbitlang$core$array$$Array$copy$14$(self) {
@@ -5738,8 +5788,8 @@ function moonbitlang$core$array$$Array$last$42$(self) {
5738
5788
  return _last;
5739
5789
  }
5740
5790
  }
5741
- function moonbitlang$core$array$$Array$join$8$(self, separator) {
5742
- return moonbitlang$core$array$$ArrayView$join$8$({ buf: self, start: 0, end: self.length }, separator);
5791
+ function moonbitlang$core$array$$Array$join$7$(self, separator) {
5792
+ return moonbitlang$core$array$$ArrayView$join$7$({ buf: self, start: 0, end: self.length }, separator);
5743
5793
  }
5744
5794
  function moonbitlang$core$double$internal$ryu$$string_from_bytes(bytes, from, to) {
5745
5795
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(bytes.length);
@@ -5800,7 +5850,7 @@ function moonbitlang$core$double$internal$ryu$$pow5Factor(value) {
5800
5850
  break;
5801
5851
  }
5802
5852
  }
5803
- return moonbitlang$core$abort$$abort$13$(`IllegalArgumentException ${moonbitlang$core$builtin$$Show$to_string$28$(value$2)}`);
5853
+ return moonbitlang$core$abort$$abort$12$(`IllegalArgumentException ${moonbitlang$core$builtin$$Show$to_string$28$(value$2)}`);
5804
5854
  }
5805
5855
  function moonbitlang$core$double$internal$ryu$$multipleOfPowerOf5(value, p) {
5806
5856
  return moonbitlang$core$double$internal$ryu$$pow5Factor(value) >= p;
@@ -6391,7 +6441,7 @@ function moonbitlang$core$buffer$$Buffer$grow_if_necessary(self, required) {
6391
6441
  }
6392
6442
  if (enough_space !== self.data.length) {
6393
6443
  const new_data = $makebytes(enough_space, 0);
6394
- moonbitlang$core$array$$FixedArray$unsafe_blit$12$(new_data, 0, self.data, 0, self.len);
6444
+ moonbitlang$core$array$$FixedArray$unsafe_blit$13$(new_data, 0, self.data, 0, self.len);
6395
6445
  self.data = new_data;
6396
6446
  return;
6397
6447
  } else {
@@ -6407,7 +6457,7 @@ function moonbitlang$core$buffer$$Buffer$write_byte(self, value) {
6407
6457
  self.len = self.len + 1 | 0;
6408
6458
  }
6409
6459
  function moonbitlang$core$buffer$$Buffer$contents(self) {
6410
- return moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$FixedArray$sub$46$inner$12$(self.data, 0, self.len));
6460
+ return moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$FixedArray$sub$46$inner$13$(self.data, 0, self.len));
6411
6461
  }
6412
6462
  function moonbitlang$core$buffer$$new$46$inner(size_hint) {
6413
6463
  const initial = size_hint < 1 ? 1 : size_hint;
@@ -6425,13 +6475,13 @@ function moonbitlang$core$builtin$$Logger$write_char$43$(self, value) {
6425
6475
  const inc = moonbitlang$core$array$$FixedArray$set_utf16le_char(self.data, self.len, value);
6426
6476
  self.len = self.len + inc | 0;
6427
6477
  }
6428
- function moonbitlang$core$builtin$$Logger$write_object$8$(self, obj) {
6429
- moonbitlang$core$builtin$$Show$output$8$(obj, self);
6478
+ function moonbitlang$core$builtin$$Logger$write_object$7$(self, obj) {
6479
+ moonbitlang$core$builtin$$Show$output$7$(obj, self);
6430
6480
  }
6431
6481
  function moonbitlang$core$builtin$$Logger$write_object$14$(self, obj) {
6432
6482
  moonbitlang$core$builtin$$Show$output$14$(obj, self);
6433
6483
  }
6434
- function moonbitlang$core$array$$FixedArray$unsafe_blit$12$(dst, dst_offset, src, src_offset, len) {
6484
+ function moonbitlang$core$array$$FixedArray$unsafe_blit$13$(dst, dst_offset, src, src_offset, len) {
6435
6485
  if (dst === src && dst_offset < src_offset) {
6436
6486
  let _tmp = 0;
6437
6487
  while (true) {
@@ -6486,8 +6536,8 @@ function moonbitlang$core$string$$String$unsafe_char_at(self, index) {
6486
6536
  return c1;
6487
6537
  }
6488
6538
  }
6489
- function moonbitlang$core$builtin$$op_notequal$7$(x, y) {
6490
- return !moonbitlang$core$builtin$$Eq$equal$7$(x, y);
6539
+ function moonbitlang$core$builtin$$op_notequal$6$(x, y) {
6540
+ return !moonbitlang$core$builtin$$Eq$equal$6$(x, y);
6491
6541
  }
6492
6542
  function moonbitlang$core$builtin$$op_notequal$44$(x, y) {
6493
6543
  return !moonbitlang$core$builtin$$Eq$equal$45$(x, y);
@@ -6504,10 +6554,10 @@ function moonbitlang$core$builtin$$op_notequal$48$(x, y) {
6504
6554
  function moonbitlang$core$builtin$$op_notequal$0$(x, y) {
6505
6555
  return !moonbitlang$core$builtin$$Eq$equal$0$(x, y);
6506
6556
  }
6507
- function moonbitlang$core$builtin$$op_notequal$16$(x, y) {
6508
- return !moonbitlang$core$builtin$$Eq$equal$16$(x, y);
6557
+ function moonbitlang$core$builtin$$op_notequal$15$(x, y) {
6558
+ return !moonbitlang$core$builtin$$Eq$equal$15$(x, y);
6509
6559
  }
6510
- function moonbitlang$core$array$$Array$at$42$(self, index) {
6560
+ function moonbitlang$core$array$$Array$at$50$(self, index) {
6511
6561
  const len = self.length;
6512
6562
  if (index >= 0 && index < len) {
6513
6563
  $bound_check(self, index);
@@ -6516,7 +6566,7 @@ function moonbitlang$core$array$$Array$at$42$(self, index) {
6516
6566
  return $panic();
6517
6567
  }
6518
6568
  }
6519
- function moonbitlang$core$array$$Array$at$50$(self, index) {
6569
+ function moonbitlang$core$array$$Array$at$51$(self, index) {
6520
6570
  const len = self.length;
6521
6571
  if (index >= 0 && index < len) {
6522
6572
  $bound_check(self, index);
@@ -6525,7 +6575,7 @@ function moonbitlang$core$array$$Array$at$50$(self, index) {
6525
6575
  return $panic();
6526
6576
  }
6527
6577
  }
6528
- function moonbitlang$core$array$$Array$at$51$(self, index) {
6578
+ function moonbitlang$core$array$$Array$at$42$(self, index) {
6529
6579
  const len = self.length;
6530
6580
  if (index >= 0 && index < len) {
6531
6581
  $bound_check(self, index);
@@ -6561,7 +6611,7 @@ function moonbitlang$core$array$$Array$at$17$(self, index) {
6561
6611
  return $panic();
6562
6612
  }
6563
6613
  }
6564
- function moonbitlang$core$array$$Array$at$12$(self, index) {
6614
+ function moonbitlang$core$array$$Array$at$13$(self, index) {
6565
6615
  const len = self.length;
6566
6616
  if (index >= 0 && index < len) {
6567
6617
  $bound_check(self, index);
@@ -6601,14 +6651,14 @@ function moonbitlang$core$builtin$$Logger$write_string$35$(self, str) {
6601
6651
  const _bind = self;
6602
6652
  _bind.val = `${_bind.val}${str}`;
6603
6653
  }
6604
- function moonbitlang$core$builtin$$Hasher$combine$8$(self, value) {
6605
- moonbitlang$core$builtin$$Hash$hash_combine$8$(value, self);
6606
- }
6607
6654
  function moonbitlang$core$builtin$$Hasher$combine$7$(self, value) {
6608
6655
  moonbitlang$core$builtin$$Hash$hash_combine$7$(value, self);
6609
6656
  }
6610
- function moonbitlang$core$builtin$$Hasher$combine$13$(self, value) {
6611
- moonbitlang$core$builtin$$Hash$hash_combine$13$(value, self);
6657
+ function moonbitlang$core$builtin$$Hasher$combine$6$(self, value) {
6658
+ moonbitlang$core$builtin$$Hash$hash_combine$6$(value, self);
6659
+ }
6660
+ function moonbitlang$core$builtin$$Hasher$combine$12$(self, value) {
6661
+ moonbitlang$core$builtin$$Hash$hash_combine$12$(value, self);
6612
6662
  }
6613
6663
  function moonbitlang$core$builtin$$Hasher$combine$11$(self, value) {
6614
6664
  moonbitlang$core$builtin$$Hash$hash_combine$11$(value, self);
@@ -6620,14 +6670,14 @@ function moonbitlang$core$builtin$$Compare$op_lt$55$(x, y) {
6620
6670
  return moonbitlang$core$builtin$$Compare$compare$56$(x, y) < 0;
6621
6671
  }
6622
6672
  function moonbitlang$core$builtin$$Compare$op_lt$57$(x, y) {
6623
- return moonbitlang$core$builtin$$Compare$compare$7$(x, y) < 0;
6624
- }
6625
- function moonbitlang$core$builtin$$Compare$op_lt$28$(x, y) {
6626
- return moonbitlang$core$builtin$$Compare$compare$0$(x, y) < 0;
6673
+ return moonbitlang$core$builtin$$Compare$compare$6$(x, y) < 0;
6627
6674
  }
6628
6675
  function moonbitlang$core$builtin$$Compare$op_lt$27$(x, y) {
6629
6676
  return moonbitlang$core$builtin$$Compare$compare$22$(x, y) < 0;
6630
6677
  }
6678
+ function moonbitlang$core$builtin$$Compare$op_lt$28$(x, y) {
6679
+ return moonbitlang$core$builtin$$Compare$compare$0$(x, y) < 0;
6680
+ }
6631
6681
  function moonbitlang$core$builtin$$Compare$op_gt$55$(x, y) {
6632
6682
  return moonbitlang$core$builtin$$Compare$compare$56$(x, y) > 0;
6633
6683
  }
@@ -6640,12 +6690,12 @@ function moonbitlang$core$builtin$$Compare$op_gt$28$(x, y) {
6640
6690
  function moonbitlang$core$builtin$$Compare$op_gt$27$(x, y) {
6641
6691
  return moonbitlang$core$builtin$$Compare$compare$22$(x, y) > 0;
6642
6692
  }
6643
- function moonbitlang$core$builtin$$Compare$op_le$28$(x, y) {
6644
- return moonbitlang$core$builtin$$Compare$compare$0$(x, y) <= 0;
6645
- }
6646
6693
  function moonbitlang$core$builtin$$Compare$op_le$27$(x, y) {
6647
6694
  return moonbitlang$core$builtin$$Compare$compare$22$(x, y) <= 0;
6648
6695
  }
6696
+ function moonbitlang$core$builtin$$Compare$op_le$28$(x, y) {
6697
+ return moonbitlang$core$builtin$$Compare$compare$0$(x, y) <= 0;
6698
+ }
6649
6699
  function moonbitlang$core$builtin$$Compare$op_ge$54$(x, y) {
6650
6700
  return (x.physical_time < y.physical_time ? -1 : x.physical_time > y.physical_time ? 1 : $compare_int(x.logical_counter, y.logical_counter)) >= 0;
6651
6701
  }
@@ -6682,17 +6732,17 @@ function moonbitlang$core$builtin$$Hasher$new(seed$46$opt) {
6682
6732
  }
6683
6733
  function moonbitlang$core$builtin$$Hash$hash$59$(self) {
6684
6734
  const _self = moonbitlang$core$builtin$$Hasher$new(undefined);
6685
- moonbitlang$core$builtin$$Hasher$combine$8$(_self, self);
6735
+ moonbitlang$core$builtin$$Hasher$combine$7$(_self, self);
6686
6736
  return moonbitlang$core$builtin$$Hasher$finalize(_self);
6687
6737
  }
6688
6738
  function moonbitlang$core$builtin$$Hash$hash$57$(self) {
6689
6739
  const _self = moonbitlang$core$builtin$$Hasher$new(undefined);
6690
- moonbitlang$core$builtin$$Hasher$combine$7$(_self, self);
6740
+ moonbitlang$core$builtin$$Hasher$combine$6$(_self, self);
6691
6741
  return moonbitlang$core$builtin$$Hasher$finalize(_self);
6692
6742
  }
6693
6743
  function moonbitlang$core$builtin$$Hash$hash$19$(self) {
6694
6744
  const _self = moonbitlang$core$builtin$$Hasher$new(undefined);
6695
- moonbitlang$core$builtin$$Hasher$combine$13$(_self, self);
6745
+ moonbitlang$core$builtin$$Hasher$combine$12$(_self, self);
6696
6746
  return moonbitlang$core$builtin$$Hasher$finalize(_self);
6697
6747
  }
6698
6748
  function moonbitlang$core$builtin$$Show$to_string$60$(self) {
@@ -6702,7 +6752,7 @@ function moonbitlang$core$builtin$$Show$to_string$60$(self) {
6702
6752
  }
6703
6753
  function moonbitlang$core$builtin$$Show$to_string$19$(self) {
6704
6754
  const logger = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
6705
- moonbitlang$core$builtin$$Show$output$13$(self, { self: logger, method_0: moonbitlang$core$builtin$$Logger$write_string$35$, method_1: moonbitlang$core$builtin$$Logger$write_substring$35$, method_2: moonbitlang$core$builtin$$Logger$write_char$35$ });
6755
+ moonbitlang$core$builtin$$Show$output$12$(self, { self: logger, method_0: moonbitlang$core$builtin$$Logger$write_string$35$, method_1: moonbitlang$core$builtin$$Logger$write_substring$35$, method_2: moonbitlang$core$builtin$$Logger$write_char$35$ });
6706
6756
  return logger.val;
6707
6757
  }
6708
6758
  function moonbitlang$core$builtin$$Show$to_string$61$(self) {
@@ -6749,7 +6799,7 @@ function moonbitlang$core$string$$StringView$at(self, index) {
6749
6799
  const _tmp$2 = self.start + index | 0;
6750
6800
  return _tmp.charCodeAt(_tmp$2);
6751
6801
  } else {
6752
- return moonbitlang$core$abort$$abort$13$("Index out of bounds");
6802
+ return moonbitlang$core$abort$$abort$12$("Index out of bounds");
6753
6803
  }
6754
6804
  }
6755
6805
  function moonbitlang$core$string$$StringView$view$46$inner(self, start_offset, end_offset) {
@@ -6760,7 +6810,7 @@ function moonbitlang$core$string$$StringView$view$46$inner(self, start_offset, e
6760
6810
  const _Some = end_offset;
6761
6811
  end_offset$2 = _Some;
6762
6812
  }
6763
- return start_offset >= 0 && (start_offset <= end_offset$2 && end_offset$2 <= (self.end - self.start | 0)) ? { str: self.str, start: self.start + start_offset | 0, end: self.start + end_offset$2 | 0 } : moonbitlang$core$abort$$abort$16$("Invalid index for View");
6813
+ return start_offset >= 0 && (start_offset <= end_offset$2 && end_offset$2 <= (self.end - self.start | 0)) ? { str: self.str, start: self.start + start_offset | 0, end: self.start + end_offset$2 | 0 } : moonbitlang$core$abort$$abort$15$("Invalid index for View");
6764
6814
  }
6765
6815
  function moonbitlang$core$builtin$$unsafe_sub_string(_tmp, _tmp$2, _tmp$3) {
6766
6816
  return $unsafe_bytes_sub_string(_tmp, _tmp$2, _tmp$3);
@@ -6808,7 +6858,7 @@ function moonbitlang$core$builtin$$output$46$flush_segment$124$2622(_env, seg, i
6808
6858
  return;
6809
6859
  }
6810
6860
  }
6811
- function moonbitlang$core$builtin$$Show$output$8$(self, logger) {
6861
+ function moonbitlang$core$builtin$$Show$output$7$(self, logger) {
6812
6862
  logger.method_2(logger.self, 34);
6813
6863
  const _env = { _0: self, _1: logger };
6814
6864
  const len = self.length;
@@ -6886,7 +6936,7 @@ function moonbitlang$core$builtin$$Show$output$8$(self, logger) {
6886
6936
  }
6887
6937
  logger.method_2(logger.self, 34);
6888
6938
  }
6889
- function moonbitlang$core$builtin$$Show$to_string$16$(self) {
6939
+ function moonbitlang$core$builtin$$Show$to_string$15$(self) {
6890
6940
  return self.str.substring(self.start, self.end);
6891
6941
  }
6892
6942
  function moonbitlang$core$string$$StringView$iter(self) {
@@ -6928,7 +6978,7 @@ function moonbitlang$core$string$$StringView$iter(self) {
6928
6978
  };
6929
6979
  return _p;
6930
6980
  }
6931
- function moonbitlang$core$builtin$$Eq$equal$16$(self, other) {
6981
+ function moonbitlang$core$builtin$$Eq$equal$15$(self, other) {
6932
6982
  const len = self.end - self.start | 0;
6933
6983
  if (len === (other.end - other.start | 0)) {
6934
6984
  if (self.str === other.str && self.start === other.start) {
@@ -6966,7 +7016,7 @@ function moonbitlang$core$string$$String$view$46$inner(self, start_offset, end_o
6966
7016
  const _Some = end_offset;
6967
7017
  end_offset$2 = _Some;
6968
7018
  }
6969
- return start_offset >= 0 && (start_offset <= end_offset$2 && end_offset$2 <= self.length) ? { str: self, start: start_offset, end: end_offset$2 } : moonbitlang$core$abort$$abort$16$("Invalid index for View");
7019
+ return start_offset >= 0 && (start_offset <= end_offset$2 && end_offset$2 <= self.length) ? { str: self, start: start_offset, end: end_offset$2 } : moonbitlang$core$abort$$abort$15$("Invalid index for View");
6970
7020
  }
6971
7021
  function moonbitlang$core$string$$String$char_length_eq$46$inner(self, len, start_offset, end_offset) {
6972
7022
  let end_offset$2;
@@ -6991,7 +7041,7 @@ function moonbitlang$core$string$$String$char_length_eq$46$inner(self, len, star
6991
7041
  _tmp$2 = count + 1 | 0;
6992
7042
  continue;
6993
7043
  } else {
6994
- moonbitlang$core$abort$$abort$4$("invalid surrogate pair");
7044
+ moonbitlang$core$abort$$abort$3$("invalid surrogate pair");
6995
7045
  }
6996
7046
  }
6997
7047
  _tmp = index + 1 | 0;
@@ -7025,7 +7075,7 @@ function moonbitlang$core$string$$String$char_length_ge$46$inner(self, len, star
7025
7075
  _tmp$2 = count + 1 | 0;
7026
7076
  continue;
7027
7077
  } else {
7028
- moonbitlang$core$abort$$abort$4$("invalid surrogate pair");
7078
+ moonbitlang$core$abort$$abort$3$("invalid surrogate pair");
7029
7079
  }
7030
7080
  }
7031
7081
  _tmp = index + 1 | 0;
@@ -7278,7 +7328,7 @@ function moonbitlang$core$array$$Array$new$46$inner$50$(capacity) {
7278
7328
  function moonbitlang$core$array$$Array$new$46$inner$52$(capacity) {
7279
7329
  return [];
7280
7330
  }
7281
- function moonbitlang$core$array$$Array$new$46$inner$12$(capacity) {
7331
+ function moonbitlang$core$array$$Array$new$46$inner$13$(capacity) {
7282
7332
  return [];
7283
7333
  }
7284
7334
  function moonbitlang$core$array$$Array$new$46$inner$62$(capacity) {
@@ -7290,22 +7340,22 @@ function moonbitlang$core$array$$Array$new$46$inner$40$(capacity) {
7290
7340
  function moonbitlang$core$array$$Array$push$14$(self, value) {
7291
7341
  moonbitlang$core$builtin$$JSArray$push(self, value);
7292
7342
  }
7293
- function moonbitlang$core$array$$Array$push$39$(self, value) {
7294
- moonbitlang$core$builtin$$JSArray$push(self, value);
7295
- }
7296
7343
  function moonbitlang$core$array$$Array$push$50$(self, value) {
7297
7344
  moonbitlang$core$builtin$$JSArray$push(self, value);
7298
7345
  }
7299
7346
  function moonbitlang$core$array$$Array$push$51$(self, value) {
7300
7347
  moonbitlang$core$builtin$$JSArray$push(self, value);
7301
7348
  }
7349
+ function moonbitlang$core$array$$Array$push$39$(self, value) {
7350
+ moonbitlang$core$builtin$$JSArray$push(self, value);
7351
+ }
7302
7352
  function moonbitlang$core$array$$Array$push$62$(self, value) {
7303
7353
  moonbitlang$core$builtin$$JSArray$push(self, value);
7304
7354
  }
7305
7355
  function moonbitlang$core$array$$Array$push$42$(self, value) {
7306
7356
  moonbitlang$core$builtin$$JSArray$push(self, value);
7307
7357
  }
7308
- function moonbitlang$core$array$$Array$push$12$(self, value) {
7358
+ function moonbitlang$core$array$$Array$push$13$(self, value) {
7309
7359
  moonbitlang$core$builtin$$JSArray$push(self, value);
7310
7360
  }
7311
7361
  function moonbitlang$core$array$$Array$push$52$(self, value) {
@@ -7314,13 +7364,13 @@ function moonbitlang$core$array$$Array$push$52$(self, value) {
7314
7364
  function moonbitlang$core$array$$Array$push$17$(self, value) {
7315
7365
  moonbitlang$core$builtin$$JSArray$push(self, value);
7316
7366
  }
7317
- function moonbitlang$core$array$$Array$push$16$(self, value) {
7367
+ function moonbitlang$core$array$$Array$push$15$(self, value) {
7318
7368
  moonbitlang$core$builtin$$JSArray$push(self, value);
7319
7369
  }
7320
7370
  function moonbitlang$core$array$$Array$push$40$(self, value) {
7321
7371
  moonbitlang$core$builtin$$JSArray$push(self, value);
7322
7372
  }
7323
- function moonbitlang$core$array$$Array$push$8$(self, value) {
7373
+ function moonbitlang$core$array$$Array$push$7$(self, value) {
7324
7374
  moonbitlang$core$builtin$$JSArray$push(self, value);
7325
7375
  }
7326
7376
  function moonbitlang$core$array$$Array$push$41$(self, value) {
@@ -7423,17 +7473,17 @@ function moonbitlang$core$builtin$$Iter$each$64$(self, f) {
7423
7473
  }
7424
7474
  }
7425
7475
  }
7426
- function moonbitlang$core$builtin$$Iter$collect$12$(self) {
7476
+ function moonbitlang$core$builtin$$Iter$collect$15$(self) {
7427
7477
  const result = [];
7428
7478
  moonbitlang$core$builtin$$Iter$each$63$(self, (e) => {
7429
- moonbitlang$core$array$$Array$push$12$(result, e);
7479
+ moonbitlang$core$array$$Array$push$15$(result, e);
7430
7480
  });
7431
7481
  return result;
7432
7482
  }
7433
- function moonbitlang$core$builtin$$Iter$collect$16$(self) {
7483
+ function moonbitlang$core$builtin$$Iter$collect$13$(self) {
7434
7484
  const result = [];
7435
7485
  moonbitlang$core$builtin$$Iter$each$64$(self, (e) => {
7436
- moonbitlang$core$array$$Array$push$16$(result, e);
7486
+ moonbitlang$core$array$$Array$push$13$(result, e);
7437
7487
  });
7438
7488
  return result;
7439
7489
  }
@@ -7491,11 +7541,11 @@ function moonbitlang$core$builtin$$Iterator$next$38$(self) {
7491
7541
  const _func = self;
7492
7542
  return _func();
7493
7543
  }
7494
- function moonbitlang$core$builtin$$Iterator$next$12$(self) {
7544
+ function moonbitlang$core$builtin$$Iterator$next$13$(self) {
7495
7545
  const _func = self;
7496
7546
  return _func();
7497
7547
  }
7498
- function moonbitlang$core$builtin$$Show$output$13$(self, logger) {
7548
+ function moonbitlang$core$builtin$$Show$output$12$(self, logger) {
7499
7549
  logger.method_0(logger.self, moonbitlang$core$int$$Int$to_string$46$inner(self, 10));
7500
7550
  }
7501
7551
  function moonbitlang$core$builtin$$Show$output$0$(self, logger) {
@@ -7509,7 +7559,7 @@ function moonbitlang$core$builtin$$Show$output$31$(self, logger) {
7509
7559
  const _Some = self;
7510
7560
  const _arg = _Some;
7511
7561
  logger.method_0(logger.self, "Some(");
7512
- moonbitlang$core$builtin$$Logger$write_object$8$(logger, _arg);
7562
+ moonbitlang$core$builtin$$Logger$write_object$7$(logger, _arg);
7513
7563
  logger.method_0(logger.self, ")");
7514
7564
  return;
7515
7565
  }
@@ -7583,7 +7633,7 @@ function moonbitlang$core$array$$FixedArray$from_array$53$(array) {
7583
7633
  return _p$3;
7584
7634
  }
7585
7635
  }
7586
- function moonbitlang$core$array$$FixedArray$sub$46$inner$12$(self, start, end) {
7636
+ function moonbitlang$core$array$$FixedArray$sub$46$inner$13$(self, start, end) {
7587
7637
  const len = self.length;
7588
7638
  let end$2;
7589
7639
  if (end === undefined) {
@@ -7594,7 +7644,7 @@ function moonbitlang$core$array$$FixedArray$sub$46$inner$12$(self, start, end) {
7594
7644
  end$2 = _end < 0 ? len + _end | 0 : _end;
7595
7645
  }
7596
7646
  const start$2 = start < 0 ? len + start | 0 : start;
7597
- return start$2 >= 0 && (start$2 <= end$2 && end$2 <= len) ? { buf: self, start: start$2, end: end$2 } : moonbitlang$core$abort$$abort$15$("View index out of bounds");
7647
+ return start$2 >= 0 && (start$2 <= end$2 && end$2 <= len) ? { buf: self, start: start$2, end: end$2 } : moonbitlang$core$abort$$abort$16$("View index out of bounds");
7598
7648
  }
7599
7649
  function moonbitlang$core$builtin$$Eq$equal$45$(self, other) {
7600
7650
  if (self === undefined) {
@@ -7675,14 +7725,14 @@ function moonbitlang$core$option$$Option$unwrap_or_else$68$(self, default_) {
7675
7725
  }
7676
7726
  function moonbitlang$core$option$$Option$map$69$(self, f) {
7677
7727
  if (self === undefined) {
7678
- return Option$None$16$;
7728
+ return undefined;
7679
7729
  } else {
7680
7730
  const _Some = self;
7681
7731
  const _t = _Some;
7682
- return new Option$Some$16$(f(_t));
7732
+ return f(_t);
7683
7733
  }
7684
7734
  }
7685
- function moonbitlang$core$option$$Option$map$70$(self, f) {
7735
+ function moonbitlang$core$option$$Option$map$36$(self, f) {
7686
7736
  if (self === undefined) {
7687
7737
  return undefined;
7688
7738
  } else {
@@ -7691,7 +7741,7 @@ function moonbitlang$core$option$$Option$map$70$(self, f) {
7691
7741
  return f(_t);
7692
7742
  }
7693
7743
  }
7694
- function moonbitlang$core$option$$Option$map$36$(self, f) {
7744
+ function moonbitlang$core$option$$Option$bind$70$(self, f) {
7695
7745
  if (self === undefined) {
7696
7746
  return undefined;
7697
7747
  } else {
@@ -7700,14 +7750,6 @@ function moonbitlang$core$option$$Option$map$36$(self, f) {
7700
7750
  return f(_t);
7701
7751
  }
7702
7752
  }
7703
- function moonbitlang$core$option$$Option$flatten$14$(self) {
7704
- if (self.$tag === 1) {
7705
- const _Some = self;
7706
- return _Some._0;
7707
- } else {
7708
- return undefined;
7709
- }
7710
- }
7711
7753
  function moonbitlang$core$int$$Int$next_power_of_two(self) {
7712
7754
  if (self >= 0) {
7713
7755
  if (self <= 1) {
@@ -7721,7 +7763,7 @@ function moonbitlang$core$int$$Int$next_power_of_two(self) {
7721
7763
  return $panic();
7722
7764
  }
7723
7765
  }
7724
- function moonbitlang$core$builtin$$Map$new$46$inner$37$(capacity) {
7766
+ function moonbitlang$core$builtin$$Map$new$46$inner$71$(capacity) {
7725
7767
  const capacity$2 = moonbitlang$core$int$$Int$next_power_of_two(capacity);
7726
7768
  const _bind = capacity$2 - 1 | 0;
7727
7769
  const _bind$2 = (Math.imul(capacity$2, 13) | 0) / 16 | 0;
@@ -7729,7 +7771,7 @@ function moonbitlang$core$builtin$$Map$new$46$inner$37$(capacity) {
7729
7771
  const _bind$4 = undefined;
7730
7772
  return { entries: _bind$3, size: 0, capacity: capacity$2, capacity_mask: _bind, grow_at: _bind$2, head: _bind$4, tail: -1 };
7731
7773
  }
7732
- function moonbitlang$core$builtin$$Map$new$46$inner$71$(capacity) {
7774
+ function moonbitlang$core$builtin$$Map$new$46$inner$37$(capacity) {
7733
7775
  const capacity$2 = moonbitlang$core$int$$Int$next_power_of_two(capacity);
7734
7776
  const _bind = capacity$2 - 1 | 0;
7735
7777
  const _bind$2 = (Math.imul(capacity$2, 13) | 0) / 16 | 0;
@@ -8017,7 +8059,7 @@ function moonbitlang$core$builtin$$Map$set_with_hash$71$(self, key, value, hash)
8017
8059
  } else {
8018
8060
  const _Some = _bind$2;
8019
8061
  const _curr_entry = _Some;
8020
- if (_curr_entry.hash === hash && moonbitlang$core$builtin$$Eq$equal$7$(_curr_entry.key, key)) {
8062
+ if (_curr_entry.hash === hash && moonbitlang$core$builtin$$Eq$equal$6$(_curr_entry.key, key)) {
8021
8063
  _curr_entry.value = value;
8022
8064
  return undefined;
8023
8065
  }
@@ -8189,7 +8231,7 @@ function moonbitlang$core$builtin$$Map$get$71$(self, key) {
8189
8231
  } else {
8190
8232
  const _Some = _bind;
8191
8233
  const _entry = _Some;
8192
- if (_entry.hash === hash && moonbitlang$core$builtin$$Eq$equal$7$(_entry.key, key)) {
8234
+ if (_entry.hash === hash && moonbitlang$core$builtin$$Eq$equal$6$(_entry.key, key)) {
8193
8235
  return _entry.value;
8194
8236
  }
8195
8237
  if (i > _entry.psl) {
@@ -8366,7 +8408,7 @@ function moonbitlang$core$builtin$$Show$output$33$(self, logger) {
8366
8408
  if (_param_0 > 0) {
8367
8409
  logger.method_0(logger.self, ", ");
8368
8410
  }
8369
- moonbitlang$core$builtin$$Logger$write_object$8$(logger, _key);
8411
+ moonbitlang$core$builtin$$Logger$write_object$7$(logger, _key);
8370
8412
  logger.method_0(logger.self, ": ");
8371
8413
  moonbitlang$core$builtin$$Logger$write_object$14$(logger, _value);
8372
8414
  _tmp = _param_0 + 1 | 0;
@@ -8596,7 +8638,7 @@ function moonbitlang$core$builtin$$Eq$equal$14$(a, b) {
8596
8638
  }
8597
8639
  }
8598
8640
  }
8599
- function moonbitlang$core$builtin$$ToJson$to_json$13$(self) {
8641
+ function moonbitlang$core$builtin$$ToJson$to_json$12$(self) {
8600
8642
  const _p = self + 0;
8601
8643
  const _p$2 = undefined;
8602
8644
  return new $64$moonbitlang$47$core$47$builtin$46$Json$Number(_p, _p$2);
@@ -8980,10 +9022,10 @@ function moonbitlang$core$builtin$$Hasher$combine_string(self, value) {
8980
9022
  }
8981
9023
  }
8982
9024
  }
8983
- function moonbitlang$core$builtin$$Hash$hash_combine$8$(self, hasher) {
9025
+ function moonbitlang$core$builtin$$Hash$hash_combine$7$(self, hasher) {
8984
9026
  moonbitlang$core$builtin$$Hasher$combine_string(hasher, self);
8985
9027
  }
8986
- function moonbitlang$core$builtin$$Hash$hash_combine$13$(self, hasher) {
9028
+ function moonbitlang$core$builtin$$Hash$hash_combine$12$(self, hasher) {
8987
9029
  moonbitlang$core$builtin$$Hasher$combine_int(hasher, self);
8988
9030
  }
8989
9031
  function moonbitlang$core$builtin$$Hash$hash_combine$11$(self, hasher) {
@@ -9047,7 +9089,7 @@ function moonbitlang$core$bytes$$Bytes$makei$20$(length, value) {
9047
9089
  }
9048
9090
  return arr;
9049
9091
  }
9050
- function moonbitlang$core$builtin$$println$8$(input) {
9092
+ function moonbitlang$core$builtin$$println$7$(input) {
9051
9093
  console.log(input);
9052
9094
  }
9053
9095
  function moonbitlang$core$array$$FixedArray$blit_from_bytes(self, bytes_offset, src, src_offset, length) {
@@ -9056,7 +9098,7 @@ function moonbitlang$core$array$$FixedArray$blit_from_bytes(self, bytes_offset,
9056
9098
  const len1 = self.length;
9057
9099
  const len2 = src.length;
9058
9100
  if (length >= 0 && (bytes_offset >= 0 && (e1 < len1 && (src_offset >= 0 && e2 < len2)))) {
9059
- moonbitlang$core$array$$FixedArray$unsafe_blit$12$(self, bytes_offset, src, src_offset, length);
9101
+ moonbitlang$core$array$$FixedArray$unsafe_blit$13$(self, bytes_offset, src, src_offset, length);
9060
9102
  return;
9061
9103
  } else {
9062
9104
  $panic();
@@ -9096,11 +9138,11 @@ function moonbitlang$core$array$$FixedArray$set_utf16le_char(self, offset, value
9096
9138
  self[_tmp$3] = _p$4 & 255;
9097
9139
  return 4;
9098
9140
  } else {
9099
- return moonbitlang$core$abort$$abort$13$("Char out of range");
9141
+ return moonbitlang$core$abort$$abort$12$("Char out of range");
9100
9142
  }
9101
9143
  }
9102
9144
  }
9103
- function moonbitlang$core$builtin$$Eq$equal$3$(self, other) {
9145
+ function moonbitlang$core$builtin$$Eq$equal$2$(self, other) {
9104
9146
  if (self.length !== other.length) {
9105
9147
  return false;
9106
9148
  } else {
@@ -9123,17 +9165,17 @@ function moonbitlang$core$builtin$$Eq$equal$3$(self, other) {
9123
9165
  }
9124
9166
  }
9125
9167
  }
9126
- function moonbitlang$core$builtin$$Shr$shr$12$(self, count) {
9168
+ function moonbitlang$core$builtin$$Shr$shr$13$(self, count) {
9127
9169
  return (self >>> count | 0) & 255;
9128
9170
  }
9129
- function moonbitlang$core$array$$ArrayView$at$12$(self, index) {
9171
+ function moonbitlang$core$array$$ArrayView$at$13$(self, index) {
9130
9172
  if (index >= 0 && index < (self.end - self.start | 0)) {
9131
9173
  const _tmp = self.buf;
9132
9174
  const _tmp$2 = self.start + index | 0;
9133
9175
  $bound_check(_tmp, _tmp$2);
9134
9176
  return _tmp[_tmp$2];
9135
9177
  } else {
9136
- return moonbitlang$core$abort$$abort$12$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$19$(self.end - self.start | 0)} but the index is ${moonbitlang$core$builtin$$Show$to_string$19$(index)}`);
9178
+ return moonbitlang$core$abort$$abort$13$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$19$(self.end - self.start | 0)} but the index is ${moonbitlang$core$builtin$$Show$to_string$19$(index)}`);
9137
9179
  }
9138
9180
  }
9139
9181
  function moonbitlang$core$array$$Array$unsafe_pop$39$(self) {
@@ -9152,11 +9194,11 @@ function moonbitlang$core$array$$Array$insert$42$(self, index, value) {
9152
9194
  moonbitlang$core$builtin$$JSArray$splice1(self, index, 0, value);
9153
9195
  return;
9154
9196
  } else {
9155
- moonbitlang$core$abort$$abort$4$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$19$(self.length)} but the index is ${moonbitlang$core$builtin$$Show$to_string$19$(index)}`);
9197
+ moonbitlang$core$abort$$abort$3$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$19$(self.length)} but the index is ${moonbitlang$core$builtin$$Show$to_string$19$(index)}`);
9156
9198
  return;
9157
9199
  }
9158
9200
  }
9159
- function moonbitlang$core$array$$Array$set$12$(self, index, value) {
9201
+ function moonbitlang$core$array$$Array$set$13$(self, index, value) {
9160
9202
  const len = self.length;
9161
9203
  if (index >= 0 && index < len) {
9162
9204
  $bound_check(self, index);
@@ -9200,7 +9242,7 @@ function moonbitlang$core$builtin$$Eq$equal$32$(self, other) {
9200
9242
  return false;
9201
9243
  }
9202
9244
  }
9203
- function moonbitlang$core$array$$Array$rev$12$(self) {
9245
+ function moonbitlang$core$array$$Array$rev$13$(self) {
9204
9246
  const len = self.length;
9205
9247
  const arr = new Array(len);
9206
9248
  let _tmp = 0;
@@ -9233,7 +9275,7 @@ function moonbitlang$core$array$$Array$binary_search_by$42$(self, cmp) {
9233
9275
  continue;
9234
9276
  }
9235
9277
  } else {
9236
- return i < len && cmp(self[i]) === 0 ? new Result$Ok$18$(i) : new Result$Err$18$(i);
9278
+ return i < len && cmp(self[i]) === 0 ? new Result$Ok$17$(i) : new Result$Err$17$(i);
9237
9279
  }
9238
9280
  }
9239
9281
  }
@@ -9242,17 +9284,17 @@ function Yoorkin$jmop$$Value$get_type(self) {
9242
9284
  }
9243
9285
  function Yoorkin$jmop$$Value$to_number(self, loc) {
9244
9286
  if (Yoorkin$jmop$$Value$get_type(self) === "number") {
9245
- return new Result$Ok$19$(self);
9287
+ return new Result$Ok$18$(self);
9246
9288
  } else {
9247
- return new Result$Err$19$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "Double" }));
9289
+ return new Result$Err$18$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "Double" }));
9248
9290
  }
9249
9291
  }
9250
9292
  function Yoorkin$jmop$$Value$to_string(self, loc) {
9251
9293
  const _bind = Yoorkin$jmop$$Value$get_type(self);
9252
9294
  if (_bind === "string") {
9253
- return new Result$Ok$20$(self);
9295
+ return new Result$Ok$19$(self);
9254
9296
  } else {
9255
- return new Result$Err$20$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "String" }));
9297
+ return new Result$Err$19$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "String" }));
9256
9298
  }
9257
9299
  }
9258
9300
  function Yoorkin$jmop$$DynCastResult$rethrow$76$(self, loc) {
@@ -9264,11 +9306,11 @@ function Yoorkin$jmop$$DynCastResult$rethrow$76$(self, loc) {
9264
9306
  const _x$2 = _InvalidCast._0;
9265
9307
  const _value = _x$2._1;
9266
9308
  const _target = _x$2._2;
9267
- return new Result$Err$21$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: _value, _2: _target }));
9309
+ return new Result$Err$20$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: _value, _2: _target }));
9268
9310
  } else {
9269
9311
  const _Ok = _bind;
9270
9312
  const _x = _Ok._0;
9271
- return new Result$Ok$21$(_x);
9313
+ return new Result$Ok$20$(_x);
9272
9314
  }
9273
9315
  }
9274
9316
  function Yoorkin$jmop$$Value$to_array$76$(self, loc) {
@@ -9283,7 +9325,7 @@ function Yoorkin$jmop$$Value$to_array$76$(self, loc) {
9283
9325
  const _p$4 = _tmp;
9284
9326
  if (_p$4 < _p$3) {
9285
9327
  const _p$5 = arr[_p$4];
9286
- const _bind = Yoorkin$jmop$$DynCastResult$rethrow$76$(new Result$Ok$21$(_p$5), "/home/runner/work/flock/flock/.mooncakes/Yoorkin/jmop/value.mbt:156:18-156:50");
9328
+ const _bind = Yoorkin$jmop$$DynCastResult$rethrow$76$(new Result$Ok$20$(_p$5), "/home/runner/work/flock/flock/.mooncakes/Yoorkin/jmop/value.mbt:156:18-156:50");
9287
9329
  let _tmp$2;
9288
9330
  if (_bind.$tag === 1) {
9289
9331
  const _ok = _bind;
@@ -9301,28 +9343,28 @@ function Yoorkin$jmop$$Value$to_array$76$(self, loc) {
9301
9343
  break;
9302
9344
  }
9303
9345
  }
9304
- return new Result$Ok$17$(_p$2);
9346
+ return new Result$Ok$16$(_p$2);
9305
9347
  }
9306
- return new Result$Err$17$(_p);
9348
+ return new Result$Err$16$(_p);
9307
9349
  } else {
9308
- return new Result$Err$17$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "Array" }));
9350
+ return new Result$Err$16$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "Array" }));
9309
9351
  }
9310
9352
  }
9311
- function Yoorkin$jmop$$Optional$undefined$4$() {
9353
+ function Yoorkin$jmop$$Optional$undefined$76$() {
9312
9354
  return Yoorkin$jmop$$ffi_undefined();
9313
9355
  }
9314
9356
  function Yoorkin$jmop$$Optional$unwrap$77$(self, loc) {
9315
9357
  if (Yoorkin$jmop$$ffi_is_undefined(self)) {
9316
- return new Result$Err$22$(new Error$Yoorkin$47$jmop$46$UnwrapUndefined$46$UnwrapUndefined(loc));
9358
+ return new Result$Err$21$(new Error$Yoorkin$47$jmop$46$UnwrapUndefined$46$UnwrapUndefined(loc));
9317
9359
  } else {
9318
- return new Result$Ok$22$(self);
9360
+ return new Result$Ok$21$(self);
9319
9361
  }
9320
9362
  }
9321
9363
  function Yoorkin$jmop$$Nullable$unwrap$76$(self, loc) {
9322
9364
  if (Yoorkin$jmop$$ffi_object_is_null(self)) {
9323
- return new Result$Err$23$(new Error$Yoorkin$47$jmop$46$UnwrapNull$46$UnwrapNull(loc));
9365
+ return new Result$Err$22$(new Error$Yoorkin$47$jmop$46$UnwrapNull$46$UnwrapNull(loc));
9324
9366
  } else {
9325
- return new Result$Ok$23$(self);
9367
+ return new Result$Ok$22$(self);
9326
9368
  }
9327
9369
  }
9328
9370
  function Yoorkin$jmop$$Optional$unwrap_value(self, loc) {
@@ -9349,13 +9391,13 @@ function Yoorkin$jmop$$convert_thrown_error(x, payload0, payload1) {
9349
9391
  } else {
9350
9392
  return _bind;
9351
9393
  }
9352
- return new Result$Err$24$(new Error$Yoorkin$47$jmop$46$InvalidNestedPromise$46$InvalidNestedPromise(_tmp));
9394
+ return new Result$Err$23$(new Error$Yoorkin$47$jmop$46$InvalidNestedPromise$46$InvalidNestedPromise(_tmp));
9353
9395
  } else {
9354
- return new Result$Err$25$(new Error$Yoorkin$47$jmop$46$RuntimeError$46$RuntimeError(payload0));
9396
+ return new Result$Err$24$(new Error$Yoorkin$47$jmop$46$RuntimeError$46$RuntimeError(payload0));
9355
9397
  }
9356
9398
  }
9357
9399
  function gmlewis$sha256$$Digest$new() {
9358
- return { h: moonbitlang$core$array$$FixedArray$from_array$53$({ buf: gmlewis$sha256$$new$46$42$bind$47$2486, start: 0, end: 8 }), x: $makebytes(64, 0), nx: 0, len: $0L, name: "sha256" };
9400
+ return { h: moonbitlang$core$array$$FixedArray$from_array$53$({ buf: gmlewis$sha256$$new$46$42$bind$47$2484, start: 0, end: 8 }), x: $makebytes(64, 0), nx: 0, len: $0L, name: "sha256" };
9359
9401
  }
9360
9402
  function gmlewis$sha256$$to_hex(v) {
9361
9403
  return v < 10 ? v + 48 | 0 : (v - 10 | 0) + 97 | 0;
@@ -9621,6 +9663,70 @@ function gmlewis$sha256$$HashFunc$check_sum$78$(self) {
9621
9663
  }
9622
9664
  return moonbitlang$core$bytes$$Bytes$to_unchecked_string$46$inner(moonbitlang$core$buffer$$Buffer$contents(result), 0, undefined);
9623
9665
  }
9666
+ function zxch3n$flock$leb128$$encode_uint64(value) {
9667
+ const result = [];
9668
+ let val = value;
9669
+ while (true) {
9670
+ let byte = moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(val, $127L));
9671
+ val = moonbitlang$core$builtin$$Shr$shr$0$(val, 7);
9672
+ if (moonbitlang$core$builtin$$op_notequal$0$(val, $0L)) {
9673
+ const _p = byte;
9674
+ const _p$2 = 128;
9675
+ byte = (_p | _p$2) & 255;
9676
+ }
9677
+ moonbitlang$core$array$$Array$push$13$(result, byte);
9678
+ if (moonbitlang$core$builtin$$Eq$equal$0$(val, $0L)) {
9679
+ break;
9680
+ }
9681
+ continue;
9682
+ }
9683
+ return moonbitlang$core$bytes$$Bytes$from_array({ buf: result, start: 0, end: result.length });
9684
+ }
9685
+ function zxch3n$flock$leb128$$encode_int64(value) {
9686
+ const result = [];
9687
+ let val = value;
9688
+ let more = true;
9689
+ while (true) {
9690
+ if (more) {
9691
+ let byte = moonbitlang$core$int64$$Int64$to_byte(moonbitlang$core$builtin$$BitAnd$land$22$(val, $127L));
9692
+ val = moonbitlang$core$builtin$$Shr$shr$22$(val, 7);
9693
+ let _tmp;
9694
+ if (moonbitlang$core$builtin$$Eq$equal$22$(val, $0L)) {
9695
+ const _p = byte;
9696
+ const _p$2 = 64;
9697
+ const _p$3 = _p & _p$2 & 255;
9698
+ const _p$4 = 0;
9699
+ _tmp = _p$3 === _p$4;
9700
+ } else {
9701
+ _tmp = false;
9702
+ }
9703
+ if (_tmp) {
9704
+ more = false;
9705
+ } else {
9706
+ let _tmp$2;
9707
+ if (moonbitlang$core$builtin$$Eq$equal$22$(val, $_1L)) {
9708
+ const _p = byte;
9709
+ const _p$2 = 64;
9710
+ _tmp$2 = (_p & _p$2 & 255) !== 0;
9711
+ } else {
9712
+ _tmp$2 = false;
9713
+ }
9714
+ if (_tmp$2) {
9715
+ more = false;
9716
+ } else {
9717
+ const _p = byte;
9718
+ const _p$2 = 128;
9719
+ byte = (_p | _p$2) & 255;
9720
+ }
9721
+ }
9722
+ moonbitlang$core$array$$Array$push$13$(result, byte);
9723
+ continue;
9724
+ } else {
9725
+ break;
9726
+ }
9727
+ }
9728
+ return moonbitlang$core$bytes$$Bytes$from_array({ buf: result, start: 0, end: result.length });
9729
+ }
9624
9730
  function zxch3n$expect$$Color$to_bg_color_code(self) {
9625
9731
  switch (self) {
9626
9732
  case 0: {
@@ -9690,14 +9796,14 @@ function zxch3n$expect$$Formated$to_string(self) {
9690
9796
  } else {
9691
9797
  const _Some = _bind;
9692
9798
  const _color = _Some;
9693
- moonbitlang$core$array$$Array$push$8$(styles, zxch3n$expect$$Color$to_color_code(_color));
9799
+ moonbitlang$core$array$$Array$push$7$(styles, zxch3n$expect$$Color$to_color_code(_color));
9694
9800
  }
9695
9801
  const _bind$2 = self.bg_color;
9696
9802
  if (_bind$2 === undefined) {
9697
9803
  } else {
9698
9804
  const _Some = _bind$2;
9699
9805
  const _bg_color = _Some;
9700
- moonbitlang$core$array$$Array$push$8$(styles, zxch3n$expect$$Color$to_bg_color_code(_bg_color));
9806
+ moonbitlang$core$array$$Array$push$7$(styles, zxch3n$expect$$Color$to_bg_color_code(_bg_color));
9701
9807
  }
9702
9808
  const _arr = self.formats;
9703
9809
  const _len = _arr.length;
@@ -9708,31 +9814,31 @@ function zxch3n$expect$$Formated$to_string(self) {
9708
9814
  const format = _arr[_i];
9709
9815
  switch (format) {
9710
9816
  case 0: {
9711
- moonbitlang$core$array$$Array$push$8$(styles, "1");
9817
+ moonbitlang$core$array$$Array$push$7$(styles, "1");
9712
9818
  break;
9713
9819
  }
9714
9820
  case 1: {
9715
- moonbitlang$core$array$$Array$push$8$(styles, "4");
9821
+ moonbitlang$core$array$$Array$push$7$(styles, "4");
9716
9822
  break;
9717
9823
  }
9718
9824
  case 2: {
9719
- moonbitlang$core$array$$Array$push$8$(styles, "5");
9825
+ moonbitlang$core$array$$Array$push$7$(styles, "5");
9720
9826
  break;
9721
9827
  }
9722
9828
  case 3: {
9723
- moonbitlang$core$array$$Array$push$8$(styles, "7");
9829
+ moonbitlang$core$array$$Array$push$7$(styles, "7");
9724
9830
  break;
9725
9831
  }
9726
9832
  case 4: {
9727
- moonbitlang$core$array$$Array$push$8$(styles, "8");
9833
+ moonbitlang$core$array$$Array$push$7$(styles, "8");
9728
9834
  break;
9729
9835
  }
9730
9836
  case 5: {
9731
- moonbitlang$core$array$$Array$push$8$(styles, "9");
9837
+ moonbitlang$core$array$$Array$push$7$(styles, "9");
9732
9838
  break;
9733
9839
  }
9734
9840
  default: {
9735
- moonbitlang$core$array$$Array$push$8$(styles, "3");
9841
+ moonbitlang$core$array$$Array$push$7$(styles, "3");
9736
9842
  }
9737
9843
  }
9738
9844
  _tmp = _i + 1 | 0;
@@ -9742,7 +9848,7 @@ function zxch3n$expect$$Formated$to_string(self) {
9742
9848
  }
9743
9849
  }
9744
9850
  if (styles.length > 0) {
9745
- const style_string = moonbitlang$core$array$$Array$join$8$(styles, { str: zxch3n$expect$$to_string$46$42$bind$124$178, start: 0, end: zxch3n$expect$$to_string$46$42$bind$124$178.length });
9851
+ const style_string = moonbitlang$core$array$$Array$join$7$(styles, { str: zxch3n$expect$$to_string$46$42$bind$124$178, start: 0, end: zxch3n$expect$$to_string$46$42$bind$124$178.length });
9746
9852
  return `[${style_string}m${self.str}[0m`;
9747
9853
  } else {
9748
9854
  return self.str;
@@ -9752,13 +9858,13 @@ function zxch3n$expect$$Formated$format(str) {
9752
9858
  return { str: str, bg_color: undefined, color: undefined, formats: [] };
9753
9859
  }
9754
9860
  function zxch3n$expect$$Formated$red(self) {
9755
- return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$red$46$constr$47$2561, formats: self.formats };
9861
+ return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$red$46$constr$47$2570, formats: self.formats };
9756
9862
  }
9757
9863
  function zxch3n$expect$$Formated$yellow(self) {
9758
- return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$yellow$46$constr$47$2563, formats: self.formats };
9864
+ return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$yellow$46$constr$47$2572, formats: self.formats };
9759
9865
  }
9760
9866
  function zxch3n$expect$$Formated$blue(self) {
9761
- return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$blue$46$constr$47$2565, formats: self.formats };
9867
+ return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$blue$46$constr$47$2574, formats: self.formats };
9762
9868
  }
9763
9869
  function zxch3n$expect$$Formated$bold(self) {
9764
9870
  const _tmp = self.str;
@@ -9769,83 +9875,19 @@ function zxch3n$expect$$Formated$bold(self) {
9769
9875
  moonbitlang$core$array$$Array$push_iter$41$(_self, moonbitlang$core$array$$Array$iter$41$(self.formats));
9770
9876
  return { str: _tmp, bg_color: _tmp$2, color: _tmp$3, formats: _self };
9771
9877
  }
9772
- function zxch3n$expect$$panic$46$inner$4$(reason, loc) {
9878
+ function zxch3n$expect$$panic$46$inner$3$(reason, loc) {
9773
9879
  const msg = `${zxch3n$expect$$Formated$to_string(zxch3n$expect$$Formated$red(zxch3n$expect$$Formated$bold(zxch3n$expect$$Formated$format("Panic: "))))}${zxch3n$expect$$Formated$to_string(zxch3n$expect$$Formated$yellow(zxch3n$expect$$Formated$format(reason)))} at ${zxch3n$expect$$Formated$to_string(zxch3n$expect$$Formated$blue(zxch3n$expect$$Formated$format(loc)))}`;
9774
- moonbitlang$core$builtin$$println$8$(msg);
9775
- moonbitlang$core$abort$$abort$4$(msg);
9776
- }
9777
- function zxch3n$flock$leb128$$encode_uint64(value) {
9778
- const result = [];
9779
- let val = value;
9780
- while (true) {
9781
- let byte = moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(val, $127L));
9782
- val = moonbitlang$core$builtin$$Shr$shr$0$(val, 7);
9783
- if (moonbitlang$core$builtin$$op_notequal$0$(val, $0L)) {
9784
- const _p = byte;
9785
- const _p$2 = 128;
9786
- byte = (_p | _p$2) & 255;
9787
- }
9788
- moonbitlang$core$array$$Array$push$12$(result, byte);
9789
- if (moonbitlang$core$builtin$$Eq$equal$0$(val, $0L)) {
9790
- break;
9791
- }
9792
- continue;
9793
- }
9794
- return moonbitlang$core$bytes$$Bytes$from_array({ buf: result, start: 0, end: result.length });
9880
+ moonbitlang$core$builtin$$println$7$(msg);
9881
+ moonbitlang$core$abort$$abort$3$(msg);
9795
9882
  }
9796
- function zxch3n$flock$leb128$$encode_int64(value) {
9797
- const result = [];
9798
- let val = value;
9799
- let more = true;
9800
- while (true) {
9801
- if (more) {
9802
- let byte = moonbitlang$core$int64$$Int64$to_byte(moonbitlang$core$builtin$$BitAnd$land$22$(val, $127L));
9803
- val = moonbitlang$core$builtin$$Shr$shr$22$(val, 7);
9804
- let _tmp;
9805
- if (moonbitlang$core$builtin$$Eq$equal$22$(val, $0L)) {
9806
- const _p = byte;
9807
- const _p$2 = 64;
9808
- const _p$3 = _p & _p$2 & 255;
9809
- const _p$4 = 0;
9810
- _tmp = _p$3 === _p$4;
9811
- } else {
9812
- _tmp = false;
9813
- }
9814
- if (_tmp) {
9815
- more = false;
9816
- } else {
9817
- let _tmp$2;
9818
- if (moonbitlang$core$builtin$$Eq$equal$22$(val, $_1L)) {
9819
- const _p = byte;
9820
- const _p$2 = 64;
9821
- _tmp$2 = (_p & _p$2 & 255) !== 0;
9822
- } else {
9823
- _tmp$2 = false;
9824
- }
9825
- if (_tmp$2) {
9826
- more = false;
9827
- } else {
9828
- const _p = byte;
9829
- const _p$2 = 128;
9830
- byte = (_p | _p$2) & 255;
9831
- }
9832
- }
9833
- moonbitlang$core$array$$Array$push$12$(result, byte);
9834
- continue;
9835
- } else {
9836
- break;
9837
- }
9838
- }
9839
- return moonbitlang$core$bytes$$Bytes$from_array({ buf: result, start: 0, end: result.length });
9840
- }
9841
- function moonbitlang$core$builtin$$Eq$equal$7$(_x_165, _x_166) {
9842
- return moonbitlang$core$builtin$$Eq$equal$3$(_x_165, _x_166);
9883
+ function moonbitlang$core$builtin$$Eq$equal$6$(_x_165, _x_166) {
9884
+ return moonbitlang$core$builtin$$Eq$equal$2$(_x_165, _x_166);
9843
9885
  }
9844
- function moonbitlang$core$builtin$$Hash$hash_combine$7$(_x_157, _x_158) {
9845
- moonbitlang$core$builtin$$Hash$hash_combine$3$(_x_157, _x_158);
9886
+ function moonbitlang$core$builtin$$Hash$hash_combine$6$(_x_157, _x_158) {
9887
+ moonbitlang$core$builtin$$Hash$hash_combine$2$(_x_157, _x_158);
9846
9888
  }
9847
9889
  function zxch3n$flock$types$$string_to_utf8(str) {
9848
- const bytes = moonbitlang$core$array$$Array$new$46$inner$12$(0);
9890
+ const bytes = moonbitlang$core$array$$Array$new$46$inner$13$(0);
9849
9891
  let i = 0;
9850
9892
  while (true) {
9851
9893
  if (i < str.length) {
@@ -9858,27 +9900,27 @@ function zxch3n$flock$types$$string_to_utf8(str) {
9858
9900
  const low = str.charCodeAt(_tmp$2);
9859
9901
  if (low >= 56320 && low <= 57343) {
9860
9902
  const code_point = (65536 + (code - 55296 << 10) | 0) + (low - 56320 | 0) | 0;
9861
- moonbitlang$core$array$$Array$push$12$(bytes, (240 | code_point >> 18) & 255);
9862
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code_point >> 12 & 63) & 255);
9863
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code_point >> 6 & 63) & 255);
9864
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code_point & 63) & 255);
9903
+ moonbitlang$core$array$$Array$push$13$(bytes, (240 | code_point >> 18) & 255);
9904
+ moonbitlang$core$array$$Array$push$13$(bytes, (128 | code_point >> 12 & 63) & 255);
9905
+ moonbitlang$core$array$$Array$push$13$(bytes, (128 | code_point >> 6 & 63) & 255);
9906
+ moonbitlang$core$array$$Array$push$13$(bytes, (128 | code_point & 63) & 255);
9865
9907
  i = i + 1 | 0;
9866
9908
  } else {
9867
- moonbitlang$core$array$$Array$push$12$(bytes, (224 | code >> 12) & 255);
9868
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code >> 6 & 63) & 255);
9869
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code & 63) & 255);
9909
+ moonbitlang$core$array$$Array$push$13$(bytes, (224 | code >> 12) & 255);
9910
+ moonbitlang$core$array$$Array$push$13$(bytes, (128 | code >> 6 & 63) & 255);
9911
+ moonbitlang$core$array$$Array$push$13$(bytes, (128 | code & 63) & 255);
9870
9912
  }
9871
9913
  } else {
9872
9914
  if (code < 128) {
9873
- moonbitlang$core$array$$Array$push$12$(bytes, code & 255);
9915
+ moonbitlang$core$array$$Array$push$13$(bytes, code & 255);
9874
9916
  } else {
9875
9917
  if (code < 2048) {
9876
- moonbitlang$core$array$$Array$push$12$(bytes, (192 | code >> 6) & 255);
9877
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code & 63) & 255);
9918
+ moonbitlang$core$array$$Array$push$13$(bytes, (192 | code >> 6) & 255);
9919
+ moonbitlang$core$array$$Array$push$13$(bytes, (128 | code & 63) & 255);
9878
9920
  } else {
9879
- moonbitlang$core$array$$Array$push$12$(bytes, (224 | code >> 12) & 255);
9880
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code >> 6 & 63) & 255);
9881
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code & 63) & 255);
9921
+ moonbitlang$core$array$$Array$push$13$(bytes, (224 | code >> 12) & 255);
9922
+ moonbitlang$core$array$$Array$push$13$(bytes, (128 | code >> 6 & 63) & 255);
9923
+ moonbitlang$core$array$$Array$push$13$(bytes, (128 | code & 63) & 255);
9882
9924
  }
9883
9925
  }
9884
9926
  }
@@ -10144,7 +10186,7 @@ function zxch3n$flock$types$$compare_bytes(b1, b2) {
10144
10186
  }
10145
10187
  return $compare_int(n1, n2);
10146
10188
  }
10147
- function moonbitlang$core$builtin$$Compare$compare$7$(self, other) {
10189
+ function moonbitlang$core$builtin$$Compare$compare$6$(self, other) {
10148
10190
  const _bind = self;
10149
10191
  const _tmp = moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length);
10150
10192
  const _bind$2 = other;
@@ -10157,20 +10199,20 @@ function zxch3n$flock$memcomparable$$double_from_bits(bits) {
10157
10199
  return moonbitlang$core$uint64$$UInt64$reinterpret_as_double(bits);
10158
10200
  }
10159
10201
  function zxch3n$flock$memcomparable$$uint64_to_be_bytes(n) {
10160
- const bytes = moonbitlang$core$array$$Array$new$46$inner$12$(0);
10161
- moonbitlang$core$array$$Array$push$12$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 56), $255L)));
10162
- moonbitlang$core$array$$Array$push$12$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 48), $255L)));
10163
- moonbitlang$core$array$$Array$push$12$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 40), $255L)));
10164
- moonbitlang$core$array$$Array$push$12$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 32), $255L)));
10165
- moonbitlang$core$array$$Array$push$12$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 24), $255L)));
10166
- moonbitlang$core$array$$Array$push$12$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 16), $255L)));
10167
- moonbitlang$core$array$$Array$push$12$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 8), $255L)));
10168
- moonbitlang$core$array$$Array$push$12$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(n, $255L)));
10202
+ const bytes = moonbitlang$core$array$$Array$new$46$inner$13$(0);
10203
+ moonbitlang$core$array$$Array$push$13$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 56), $255L)));
10204
+ moonbitlang$core$array$$Array$push$13$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 48), $255L)));
10205
+ moonbitlang$core$array$$Array$push$13$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 40), $255L)));
10206
+ moonbitlang$core$array$$Array$push$13$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 32), $255L)));
10207
+ moonbitlang$core$array$$Array$push$13$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 24), $255L)));
10208
+ moonbitlang$core$array$$Array$push$13$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 16), $255L)));
10209
+ moonbitlang$core$array$$Array$push$13$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(moonbitlang$core$builtin$$Shr$shr$0$(n, 8), $255L)));
10210
+ moonbitlang$core$array$$Array$push$13$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(n, $255L)));
10169
10211
  return moonbitlang$core$bytes$$Bytes$from_array({ buf: bytes, start: 0, end: bytes.length });
10170
10212
  }
10171
10213
  function zxch3n$flock$memcomparable$$uint64_from_be_bytes(bytes) {
10172
10214
  if (bytes.length !== 8) {
10173
- zxch3n$expect$$panic$46$inner$4$("Invalid byte array length", "/home/runner/work/flock/flock/moon/memcomparable/utils.mbt:28:5-28:54");
10215
+ zxch3n$expect$$panic$46$inner$3$("Invalid byte array length", "/home/runner/work/flock/flock/moon/memcomparable/utils.mbt:28:5-28:54");
10174
10216
  }
10175
10217
  let result = $0L;
10176
10218
  const _tmp = result;
@@ -10234,7 +10276,7 @@ function zxch3n$flock$memcomparable$$encode_bytes(bytes, output) {
10234
10276
  moonbitlang$core$buffer$$Buffer$write_byte(output, 1);
10235
10277
  const _it = moonbitlang$core$bytes$$BytesView$iterator(bytes);
10236
10278
  while (true) {
10237
- const _bind = moonbitlang$core$builtin$$Iterator$next$12$(_it);
10279
+ const _bind = moonbitlang$core$builtin$$Iterator$next$13$(_it);
10238
10280
  if (_bind === -1) {
10239
10281
  break;
10240
10282
  } else {
@@ -10297,14 +10339,14 @@ function zxch3n$flock$memcomparable$$biguint_to_be_bytes(n) {
10297
10339
  while (true) {
10298
10340
  if (moonbitlang$core$builtin$$Compare$op_gt$58$(x, 0n)) {
10299
10341
  const byte = moonbitlang$core$bigint$$BigInt$to_int(moonbitlang$core$builtin$$Mod$mod$21$(x, 256n));
10300
- moonbitlang$core$array$$Array$push$12$(bytes, byte & 255);
10342
+ moonbitlang$core$array$$Array$push$13$(bytes, byte & 255);
10301
10343
  x = moonbitlang$core$builtin$$Div$div$21$(x, 256n);
10302
10344
  continue;
10303
10345
  } else {
10304
10346
  break;
10305
10347
  }
10306
10348
  }
10307
- const _bind = moonbitlang$core$array$$Array$rev$12$(bytes);
10349
+ const _bind = moonbitlang$core$array$$Array$rev$13$(bytes);
10308
10350
  return moonbitlang$core$bytes$$Bytes$from_array({ buf: _bind, start: 0, end: _bind.length });
10309
10351
  }
10310
10352
  function zxch3n$flock$memcomparable$$bigint_to_be_bytes(n, output) {
@@ -10323,7 +10365,7 @@ function zxch3n$flock$memcomparable$$bigint_to_be_bytes(n, output) {
10323
10365
  } else {
10324
10366
  moonbitlang$core$buffer$$Buffer$write_byte(output, 11);
10325
10367
  if (n$2 > 255) {
10326
- moonbitlang$core$abort$$abort$4$("n is too large");
10368
+ moonbitlang$core$abort$$abort$3$("n is too large");
10327
10369
  }
10328
10370
  const _p = n$2 & 255;
10329
10371
  const _p$2 = 255;
@@ -10354,7 +10396,7 @@ function zxch3n$flock$memcomparable$$bigint_to_be_bytes(n, output) {
10354
10396
  } else {
10355
10397
  moonbitlang$core$buffer$$Buffer$write_byte(output, 29);
10356
10398
  if (n$2 > 255) {
10357
- moonbitlang$core$abort$$abort$4$("n is too large");
10399
+ moonbitlang$core$abort$$abort$3$("n is too large");
10358
10400
  }
10359
10401
  moonbitlang$core$buffer$$Buffer$write_byte(output, n$2 & 255);
10360
10402
  }
@@ -10440,7 +10482,7 @@ function zxch3n$flock$memcomparable$$parse_slice(bytes, start) {
10440
10482
  continue;
10441
10483
  } else {
10442
10484
  const _bind = moonbitlang$core$buffer$$Buffer$contents(output);
10443
- return new Result$Ok$26$({ _0: moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length), _1: i });
10485
+ return new Result$Ok$25$({ _0: moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length), _1: i });
10444
10486
  }
10445
10487
  }
10446
10488
  moonbitlang$core$buffer$$Buffer$write_byte(output, b);
@@ -10449,7 +10491,7 @@ function zxch3n$flock$memcomparable$$parse_slice(bytes, start) {
10449
10491
  break;
10450
10492
  }
10451
10493
  }
10452
- return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10494
+ return new Result$Err$25$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10453
10495
  }
10454
10496
  function zxch3n$flock$memcomparable$$bytes_to_bigint(bytes) {
10455
10497
  let n = moonbitlang$core$bigint$$BigInt$from_int64($0L);
@@ -10482,11 +10524,11 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10482
10524
  const _p = 20;
10483
10525
  const n = (tag - _p | 0) & 255;
10484
10526
  if ((bytes.end - bytes.start | 0) < n) {
10485
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10527
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10486
10528
  }
10487
10529
  const num_bytes = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, 0, n);
10488
10530
  const rest = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, n, undefined);
10489
- return new Result$Ok$27$({ _0: rest, _1: zxch3n$flock$memcomparable$$bytes_to_bigint(num_bytes) });
10531
+ return new Result$Ok$26$({ _0: rest, _1: zxch3n$flock$memcomparable$$bytes_to_bigint(num_bytes) });
10490
10532
  } else {
10491
10533
  let _tmp$2;
10492
10534
  const _p = 20;
@@ -10500,7 +10542,7 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10500
10542
  const _p$3 = 20;
10501
10543
  const n = (_p$3 - tag | 0) & 255;
10502
10544
  if ((bytes.end - bytes.start | 0) < n) {
10503
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10545
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10504
10546
  }
10505
10547
  const num_bytes = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, 0, n);
10506
10548
  const rest = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, n, undefined);
@@ -10519,18 +10561,18 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10519
10561
  }
10520
10562
  }
10521
10563
  const _bind = moonbitlang$core$buffer$$Buffer$contents(inverted);
10522
- return new Result$Ok$27$({ _0: rest, _1: moonbitlang$core$builtin$$Neg$neg$21$(zxch3n$flock$memcomparable$$bytes_to_bigint(moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length))) });
10564
+ return new Result$Ok$26$({ _0: rest, _1: moonbitlang$core$builtin$$Neg$neg$21$(zxch3n$flock$memcomparable$$bytes_to_bigint(moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length))) });
10523
10565
  } else {
10524
10566
  const _p$3 = 11;
10525
10567
  if (tag === _p$3) {
10526
10568
  if ((bytes.end - bytes.start | 0) < 1) {
10527
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10569
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10528
10570
  }
10529
10571
  const raw_length = moonbitlang$core$bytes$$BytesView$at(bytes, 0);
10530
10572
  const _p$4 = 255;
10531
10573
  const n = (raw_length ^ _p$4) & 255;
10532
10574
  if ((bytes.end - bytes.start | 0) < (n + 1 | 0)) {
10533
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10575
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10534
10576
  }
10535
10577
  const num_bytes = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, 1, n + 1 | 0);
10536
10578
  const rest = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, n + 1 | 0, undefined);
@@ -10549,23 +10591,23 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10549
10591
  }
10550
10592
  }
10551
10593
  const _bind = moonbitlang$core$buffer$$Buffer$contents(inverted);
10552
- return new Result$Ok$27$({ _0: rest, _1: moonbitlang$core$builtin$$Neg$neg$21$(zxch3n$flock$memcomparable$$bytes_to_bigint(moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length))) });
10594
+ return new Result$Ok$26$({ _0: rest, _1: moonbitlang$core$builtin$$Neg$neg$21$(zxch3n$flock$memcomparable$$bytes_to_bigint(moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length))) });
10553
10595
  } else {
10554
10596
  const _p$4 = 29;
10555
10597
  if (tag === _p$4) {
10556
10598
  if ((bytes.end - bytes.start | 0) < 1) {
10557
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10599
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10558
10600
  }
10559
10601
  const raw_length = moonbitlang$core$bytes$$BytesView$at(bytes, 0);
10560
10602
  const n = raw_length;
10561
10603
  if ((bytes.end - bytes.start | 0) < (n + 1 | 0)) {
10562
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10604
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10563
10605
  }
10564
10606
  const num_bytes = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, 1, n + 1 | 0);
10565
10607
  const rest = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, n + 1 | 0, undefined);
10566
- return new Result$Ok$27$({ _0: rest, _1: zxch3n$flock$memcomparable$$bytes_to_bigint(num_bytes) });
10608
+ return new Result$Ok$26$({ _0: rest, _1: zxch3n$flock$memcomparable$$bytes_to_bigint(num_bytes) });
10567
10609
  } else {
10568
- return new Result$Err$27$(new Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidTag(tag));
10610
+ return new Result$Err$26$(new Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidTag(tag));
10569
10611
  }
10570
10612
  }
10571
10613
  }
@@ -10573,14 +10615,14 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10573
10615
  }
10574
10616
  function zxch3n$flock$memcomparable$$decode_float(bytes, start) {
10575
10617
  if ((start + 8 | 0) > (bytes.end - bytes.start | 0)) {
10576
- return new Result$Err$28$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10618
+ return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10577
10619
  }
10578
- const data = moonbitlang$core$array$$Array$new$46$inner$12$(0);
10620
+ const data = moonbitlang$core$array$$Array$new$46$inner$13$(0);
10579
10621
  let _tmp = 0;
10580
10622
  while (true) {
10581
10623
  const i = _tmp;
10582
10624
  if (i < 8) {
10583
- moonbitlang$core$array$$Array$push$12$(data, moonbitlang$core$bytes$$BytesView$at(bytes, start + i | 0));
10625
+ moonbitlang$core$array$$Array$push$13$(data, moonbitlang$core$bytes$$BytesView$at(bytes, start + i | 0));
10584
10626
  _tmp = i + 1 | 0;
10585
10627
  continue;
10586
10628
  } else {
@@ -10589,7 +10631,7 @@ function zxch3n$flock$memcomparable$$decode_float(bytes, start) {
10589
10631
  }
10590
10632
  const bits = zxch3n$flock$memcomparable$$uint64_from_be_bytes(moonbitlang$core$bytes$$Bytes$from_array({ buf: data, start: 0, end: data.length }));
10591
10633
  const f = moonbitlang$core$builtin$$Eq$equal$0$(moonbitlang$core$builtin$$BitAnd$land$0$(bits, $_9223372036854775808L), $0L) ? zxch3n$flock$memcomparable$$double_from_bits(moonbitlang$core$builtin$$BitXOr$lxor$0$(bits, $_1L)) : zxch3n$flock$memcomparable$$double_from_bits(moonbitlang$core$builtin$$BitXOr$lxor$0$(bits, $_9223372036854775808L));
10592
- return new Result$Ok$28$({ _0: f, _1: start + 8 | 0 });
10634
+ return new Result$Ok$27$({ _0: f, _1: start + 8 | 0 });
10593
10635
  }
10594
10636
  function zxch3n$flock$memcomparable$$Key$decode(bytes) {
10595
10637
  const key = zxch3n$flock$memcomparable$$Key$new();
@@ -10611,7 +10653,7 @@ function zxch3n$flock$memcomparable$$Key$decode(bytes) {
10611
10653
  const _next_i = _bind$2._1;
10612
10654
  const _bind$3 = zxch3n$flock$types$$Utf8Str$from_bytes_view(_data);
10613
10655
  if (_bind$3 === undefined) {
10614
- return new Result$Err$29$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidUTF8);
10656
+ return new Result$Err$28$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidUTF8);
10615
10657
  } else {
10616
10658
  const _Some = _bind$3;
10617
10659
  const _s = _Some;
@@ -10667,7 +10709,7 @@ function zxch3n$flock$memcomparable$$Key$decode(bytes) {
10667
10709
  if (tag === 39) {
10668
10710
  zxch3n$flock$memcomparable$$Key$push(key, $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$True);
10669
10711
  } else {
10670
- return new Result$Err$29$(new Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidTag(tag));
10712
+ return new Result$Err$28$(new Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidTag(tag));
10671
10713
  }
10672
10714
  }
10673
10715
  }
@@ -10679,7 +10721,7 @@ function zxch3n$flock$memcomparable$$Key$decode(bytes) {
10679
10721
  break;
10680
10722
  }
10681
10723
  }
10682
- return new Result$Ok$29$(key);
10724
+ return new Result$Ok$28$(key);
10683
10725
  }
10684
10726
  function zxch3n$flock$memcomparable$$json_to_key_part(part) {
10685
10727
  switch (part.$tag) {
@@ -10784,7 +10826,7 @@ function zxch3n$flock$memcomparable$$decode_key_to_json(bytes) {
10784
10826
  }
10785
10827
  break _L;
10786
10828
  }
10787
- key = moonbitlang$core$abort$$abort$2$("Failed to decode key");
10829
+ key = moonbitlang$core$abort$$abort$10$("Failed to decode key");
10788
10830
  }
10789
10831
  const parts = moonbitlang$core$array$$Array$new$46$inner$14$(0);
10790
10832
  const _arr = key.parts;
@@ -10811,7 +10853,7 @@ function zxch3n$flock$memcomparable$$decode_key_to_json(bytes) {
10811
10853
  }
10812
10854
  return parts;
10813
10855
  }
10814
- function zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, root) {
10856
+ function zxch3n$flock$sorted_map$$each$46$dfs$47$2800(f, root) {
10815
10857
  let _tmp = root;
10816
10858
  while (true) {
10817
10859
  const root$2 = _tmp;
@@ -10820,7 +10862,7 @@ function zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, root) {
10820
10862
  } else {
10821
10863
  const _Some = root$2;
10822
10864
  const _root = _Some;
10823
- zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, _root.left);
10865
+ zxch3n$flock$sorted_map$$each$46$dfs$47$2800(f, _root.left);
10824
10866
  f(_root.key, _root.value);
10825
10867
  _tmp = _root.right;
10826
10868
  continue;
@@ -10828,7 +10870,7 @@ function zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, root) {
10828
10870
  }
10829
10871
  }
10830
10872
  function zxch3n$flock$sorted_map$$SortedMap$each$79$(self, f) {
10831
- zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, self.root);
10873
+ zxch3n$flock$sorted_map$$each$46$dfs$47$2800(f, self.root);
10832
10874
  }
10833
10875
  function zxch3n$flock$sorted_map$$SortedMap$to_array$74$(self) {
10834
10876
  const arr = moonbitlang$core$array$$Array$new$46$inner$52$(self.size);
@@ -10843,7 +10885,7 @@ function zxch3n$flock$sorted_map$$SortedMap$new$74$() {
10843
10885
  function zxch3n$flock$sorted_map$$SortedMap$new$80$() {
10844
10886
  return { root: undefined, size: 0 };
10845
10887
  }
10846
- function zxch3n$flock$sorted_map$$height_ge$74$(x1, x2) {
10888
+ function zxch3n$flock$sorted_map$$height_ge$80$(x1, x2) {
10847
10889
  if (x2 === undefined) {
10848
10890
  return true;
10849
10891
  } else {
@@ -10858,7 +10900,7 @@ function zxch3n$flock$sorted_map$$height_ge$74$(x1, x2) {
10858
10900
  }
10859
10901
  }
10860
10902
  }
10861
- function zxch3n$flock$sorted_map$$height_ge$80$(x1, x2) {
10903
+ function zxch3n$flock$sorted_map$$height_ge$74$(x1, x2) {
10862
10904
  if (x2 === undefined) {
10863
10905
  return true;
10864
10906
  } else {
@@ -10873,7 +10915,7 @@ function zxch3n$flock$sorted_map$$height_ge$80$(x1, x2) {
10873
10915
  }
10874
10916
  }
10875
10917
  }
10876
- function zxch3n$flock$sorted_map$$Node$update_height$74$(self) {
10918
+ function zxch3n$flock$sorted_map$$Node$update_height$80$(self) {
10877
10919
  const _p = self.left;
10878
10920
  let _p$2;
10879
10921
  if (_p === undefined) {
@@ -10894,7 +10936,7 @@ function zxch3n$flock$sorted_map$$Node$update_height$74$(self) {
10894
10936
  }
10895
10937
  self.height = 1 + (_p$2 > _p$4 ? _p$2 : _p$4) | 0;
10896
10938
  }
10897
- function zxch3n$flock$sorted_map$$Node$update_height$80$(self) {
10939
+ function zxch3n$flock$sorted_map$$Node$update_height$74$(self) {
10898
10940
  const _p = self.left;
10899
10941
  let _p$2;
10900
10942
  if (_p === undefined) {
@@ -10915,7 +10957,7 @@ function zxch3n$flock$sorted_map$$Node$update_height$80$(self) {
10915
10957
  }
10916
10958
  self.height = 1 + (_p$2 > _p$4 ? _p$2 : _p$4) | 0;
10917
10959
  }
10918
- function zxch3n$flock$sorted_map$$rotate_l$74$(n) {
10960
+ function zxch3n$flock$sorted_map$$rotate_l$80$(n) {
10919
10961
  const _p = n.right;
10920
10962
  let r;
10921
10963
  if (_p === undefined) {
@@ -10926,11 +10968,11 @@ function zxch3n$flock$sorted_map$$rotate_l$74$(n) {
10926
10968
  }
10927
10969
  n.right = r.left;
10928
10970
  r.left = n;
10929
- zxch3n$flock$sorted_map$$Node$update_height$74$(n);
10930
- zxch3n$flock$sorted_map$$Node$update_height$74$(r);
10971
+ zxch3n$flock$sorted_map$$Node$update_height$80$(n);
10972
+ zxch3n$flock$sorted_map$$Node$update_height$80$(r);
10931
10973
  return r;
10932
10974
  }
10933
- function zxch3n$flock$sorted_map$$rotate_l$80$(n) {
10975
+ function zxch3n$flock$sorted_map$$rotate_l$74$(n) {
10934
10976
  const _p = n.right;
10935
10977
  let r;
10936
10978
  if (_p === undefined) {
@@ -10941,11 +10983,11 @@ function zxch3n$flock$sorted_map$$rotate_l$80$(n) {
10941
10983
  }
10942
10984
  n.right = r.left;
10943
10985
  r.left = n;
10944
- zxch3n$flock$sorted_map$$Node$update_height$80$(n);
10945
- zxch3n$flock$sorted_map$$Node$update_height$80$(r);
10986
+ zxch3n$flock$sorted_map$$Node$update_height$74$(n);
10987
+ zxch3n$flock$sorted_map$$Node$update_height$74$(r);
10946
10988
  return r;
10947
10989
  }
10948
- function zxch3n$flock$sorted_map$$rotate_r$74$(n) {
10990
+ function zxch3n$flock$sorted_map$$rotate_r$80$(n) {
10949
10991
  const _p = n.left;
10950
10992
  let l;
10951
10993
  if (_p === undefined) {
@@ -10956,11 +10998,11 @@ function zxch3n$flock$sorted_map$$rotate_r$74$(n) {
10956
10998
  }
10957
10999
  n.left = l.right;
10958
11000
  l.right = n;
10959
- zxch3n$flock$sorted_map$$Node$update_height$74$(n);
10960
- zxch3n$flock$sorted_map$$Node$update_height$74$(l);
11001
+ zxch3n$flock$sorted_map$$Node$update_height$80$(n);
11002
+ zxch3n$flock$sorted_map$$Node$update_height$80$(l);
10961
11003
  return l;
10962
11004
  }
10963
- function zxch3n$flock$sorted_map$$rotate_r$80$(n) {
11005
+ function zxch3n$flock$sorted_map$$rotate_r$74$(n) {
10964
11006
  const _p = n.left;
10965
11007
  let l;
10966
11008
  if (_p === undefined) {
@@ -10971,11 +11013,11 @@ function zxch3n$flock$sorted_map$$rotate_r$80$(n) {
10971
11013
  }
10972
11014
  n.left = l.right;
10973
11015
  l.right = n;
10974
- zxch3n$flock$sorted_map$$Node$update_height$80$(n);
10975
- zxch3n$flock$sorted_map$$Node$update_height$80$(l);
11016
+ zxch3n$flock$sorted_map$$Node$update_height$74$(n);
11017
+ zxch3n$flock$sorted_map$$Node$update_height$74$(l);
10976
11018
  return l;
10977
11019
  }
10978
- function zxch3n$flock$sorted_map$$rotate_lr$74$(n) {
11020
+ function zxch3n$flock$sorted_map$$rotate_lr$80$(n) {
10979
11021
  const _p = n.left;
10980
11022
  let l;
10981
11023
  if (_p === undefined) {
@@ -10984,11 +11026,11 @@ function zxch3n$flock$sorted_map$$rotate_lr$74$(n) {
10984
11026
  const _p$2 = _p;
10985
11027
  l = _p$2;
10986
11028
  }
10987
- const v = zxch3n$flock$sorted_map$$rotate_l$74$(l);
11029
+ const v = zxch3n$flock$sorted_map$$rotate_l$80$(l);
10988
11030
  n.left = v;
10989
- return zxch3n$flock$sorted_map$$rotate_r$74$(n);
11031
+ return zxch3n$flock$sorted_map$$rotate_r$80$(n);
10990
11032
  }
10991
- function zxch3n$flock$sorted_map$$rotate_lr$80$(n) {
11033
+ function zxch3n$flock$sorted_map$$rotate_lr$74$(n) {
10992
11034
  const _p = n.left;
10993
11035
  let l;
10994
11036
  if (_p === undefined) {
@@ -10997,11 +11039,11 @@ function zxch3n$flock$sorted_map$$rotate_lr$80$(n) {
10997
11039
  const _p$2 = _p;
10998
11040
  l = _p$2;
10999
11041
  }
11000
- const v = zxch3n$flock$sorted_map$$rotate_l$80$(l);
11042
+ const v = zxch3n$flock$sorted_map$$rotate_l$74$(l);
11001
11043
  n.left = v;
11002
- return zxch3n$flock$sorted_map$$rotate_r$80$(n);
11044
+ return zxch3n$flock$sorted_map$$rotate_r$74$(n);
11003
11045
  }
11004
- function zxch3n$flock$sorted_map$$rotate_rl$74$(n) {
11046
+ function zxch3n$flock$sorted_map$$rotate_rl$80$(n) {
11005
11047
  const _p = n.right;
11006
11048
  let r;
11007
11049
  if (_p === undefined) {
@@ -11010,11 +11052,11 @@ function zxch3n$flock$sorted_map$$rotate_rl$74$(n) {
11010
11052
  const _p$2 = _p;
11011
11053
  r = _p$2;
11012
11054
  }
11013
- const v = zxch3n$flock$sorted_map$$rotate_r$74$(r);
11055
+ const v = zxch3n$flock$sorted_map$$rotate_r$80$(r);
11014
11056
  n.right = v;
11015
- return zxch3n$flock$sorted_map$$rotate_l$74$(n);
11057
+ return zxch3n$flock$sorted_map$$rotate_l$80$(n);
11016
11058
  }
11017
- function zxch3n$flock$sorted_map$$rotate_rl$80$(n) {
11059
+ function zxch3n$flock$sorted_map$$rotate_rl$74$(n) {
11018
11060
  const _p = n.right;
11019
11061
  let r;
11020
11062
  if (_p === undefined) {
@@ -11023,11 +11065,11 @@ function zxch3n$flock$sorted_map$$rotate_rl$80$(n) {
11023
11065
  const _p$2 = _p;
11024
11066
  r = _p$2;
11025
11067
  }
11026
- const v = zxch3n$flock$sorted_map$$rotate_r$80$(r);
11068
+ const v = zxch3n$flock$sorted_map$$rotate_r$74$(r);
11027
11069
  n.right = v;
11028
- return zxch3n$flock$sorted_map$$rotate_l$80$(n);
11070
+ return zxch3n$flock$sorted_map$$rotate_l$74$(n);
11029
11071
  }
11030
- function zxch3n$flock$sorted_map$$balance$74$(root) {
11072
+ function zxch3n$flock$sorted_map$$balance$80$(root) {
11031
11073
  const l = root.left;
11032
11074
  const r = root.right;
11033
11075
  let hl;
@@ -11057,7 +11099,7 @@ function zxch3n$flock$sorted_map$$balance$74$(root) {
11057
11099
  }
11058
11100
  const _ll = _bind.left;
11059
11101
  const _lr = _bind.right;
11060
- new_root = zxch3n$flock$sorted_map$$height_ge$74$(_ll, _lr) ? zxch3n$flock$sorted_map$$rotate_r$74$(root) : zxch3n$flock$sorted_map$$rotate_lr$74$(root);
11102
+ new_root = zxch3n$flock$sorted_map$$height_ge$80$(_ll, _lr) ? zxch3n$flock$sorted_map$$rotate_r$80$(root) : zxch3n$flock$sorted_map$$rotate_lr$80$(root);
11061
11103
  } else {
11062
11104
  if (hr > (hl + 1 | 0)) {
11063
11105
  let _bind;
@@ -11069,15 +11111,15 @@ function zxch3n$flock$sorted_map$$balance$74$(root) {
11069
11111
  }
11070
11112
  const _rl = _bind.left;
11071
11113
  const _rr = _bind.right;
11072
- new_root = zxch3n$flock$sorted_map$$height_ge$74$(_rr, _rl) ? zxch3n$flock$sorted_map$$rotate_l$74$(root) : zxch3n$flock$sorted_map$$rotate_rl$74$(root);
11114
+ new_root = zxch3n$flock$sorted_map$$height_ge$80$(_rr, _rl) ? zxch3n$flock$sorted_map$$rotate_l$80$(root) : zxch3n$flock$sorted_map$$rotate_rl$80$(root);
11073
11115
  } else {
11074
11116
  new_root = root;
11075
11117
  }
11076
11118
  }
11077
- zxch3n$flock$sorted_map$$Node$update_height$74$(new_root);
11119
+ zxch3n$flock$sorted_map$$Node$update_height$80$(new_root);
11078
11120
  return new_root;
11079
11121
  }
11080
- function zxch3n$flock$sorted_map$$balance$80$(root) {
11122
+ function zxch3n$flock$sorted_map$$balance$74$(root) {
11081
11123
  const l = root.left;
11082
11124
  const r = root.right;
11083
11125
  let hl;
@@ -11107,7 +11149,7 @@ function zxch3n$flock$sorted_map$$balance$80$(root) {
11107
11149
  }
11108
11150
  const _ll = _bind.left;
11109
11151
  const _lr = _bind.right;
11110
- new_root = zxch3n$flock$sorted_map$$height_ge$80$(_ll, _lr) ? zxch3n$flock$sorted_map$$rotate_r$80$(root) : zxch3n$flock$sorted_map$$rotate_lr$80$(root);
11152
+ new_root = zxch3n$flock$sorted_map$$height_ge$74$(_ll, _lr) ? zxch3n$flock$sorted_map$$rotate_r$74$(root) : zxch3n$flock$sorted_map$$rotate_lr$74$(root);
11111
11153
  } else {
11112
11154
  if (hr > (hl + 1 | 0)) {
11113
11155
  let _bind;
@@ -11119,78 +11161,78 @@ function zxch3n$flock$sorted_map$$balance$80$(root) {
11119
11161
  }
11120
11162
  const _rl = _bind.left;
11121
11163
  const _rr = _bind.right;
11122
- new_root = zxch3n$flock$sorted_map$$height_ge$80$(_rr, _rl) ? zxch3n$flock$sorted_map$$rotate_l$80$(root) : zxch3n$flock$sorted_map$$rotate_rl$80$(root);
11164
+ new_root = zxch3n$flock$sorted_map$$height_ge$74$(_rr, _rl) ? zxch3n$flock$sorted_map$$rotate_l$74$(root) : zxch3n$flock$sorted_map$$rotate_rl$74$(root);
11123
11165
  } else {
11124
11166
  new_root = root;
11125
11167
  }
11126
11168
  }
11127
- zxch3n$flock$sorted_map$$Node$update_height$80$(new_root);
11169
+ zxch3n$flock$sorted_map$$Node$update_height$74$(new_root);
11128
11170
  return new_root;
11129
11171
  }
11130
- function zxch3n$flock$sorted_map$$new_node$74$(key, value) {
11172
+ function zxch3n$flock$sorted_map$$new_node$80$(key, value) {
11131
11173
  return { key: key, value: value, left: undefined, right: undefined, height: 1 };
11132
11174
  }
11133
- function zxch3n$flock$sorted_map$$new_node$80$(key, value) {
11175
+ function zxch3n$flock$sorted_map$$new_node$74$(key, value) {
11134
11176
  return { key: key, value: value, left: undefined, right: undefined, height: 1 };
11135
11177
  }
11136
- function zxch3n$flock$sorted_map$$add_node$74$(root, key, value) {
11178
+ function zxch3n$flock$sorted_map$$add_node$80$(root, key, value) {
11137
11179
  if (root === undefined) {
11138
- return { _0: zxch3n$flock$sorted_map$$new_node$74$(key, value), _1: true };
11180
+ return { _0: zxch3n$flock$sorted_map$$new_node$80$(key, value), _1: true };
11139
11181
  } else {
11140
11182
  const _Some = root;
11141
11183
  const _n = _Some;
11142
- if (moonbitlang$core$builtin$$Eq$equal$7$(key, _n.key)) {
11184
+ if (moonbitlang$core$builtin$$Eq$equal$6$(key, _n.key)) {
11143
11185
  _n.value = value;
11144
11186
  return { _0: _n, _1: false };
11145
11187
  } else {
11146
11188
  const l = _n.left;
11147
11189
  const r = _n.right;
11148
11190
  if (moonbitlang$core$builtin$$Compare$op_lt$57$(key, _n.key)) {
11149
- const _bind = zxch3n$flock$sorted_map$$add_node$74$(l, key, value);
11191
+ const _bind = zxch3n$flock$sorted_map$$add_node$80$(l, key, value);
11150
11192
  const _nl = _bind._0;
11151
11193
  const _inserted = _bind._1;
11152
11194
  _n.left = _nl;
11153
- return { _0: zxch3n$flock$sorted_map$$balance$74$(_n), _1: _inserted };
11195
+ return { _0: zxch3n$flock$sorted_map$$balance$80$(_n), _1: _inserted };
11154
11196
  } else {
11155
- const _bind = zxch3n$flock$sorted_map$$add_node$74$(r, key, value);
11197
+ const _bind = zxch3n$flock$sorted_map$$add_node$80$(r, key, value);
11156
11198
  const _nr = _bind._0;
11157
11199
  const _inserted = _bind._1;
11158
11200
  _n.right = _nr;
11159
- return { _0: zxch3n$flock$sorted_map$$balance$74$(_n), _1: _inserted };
11201
+ return { _0: zxch3n$flock$sorted_map$$balance$80$(_n), _1: _inserted };
11160
11202
  }
11161
11203
  }
11162
11204
  }
11163
11205
  }
11164
- function zxch3n$flock$sorted_map$$add_node$80$(root, key, value) {
11206
+ function zxch3n$flock$sorted_map$$add_node$74$(root, key, value) {
11165
11207
  if (root === undefined) {
11166
- return { _0: zxch3n$flock$sorted_map$$new_node$80$(key, value), _1: true };
11208
+ return { _0: zxch3n$flock$sorted_map$$new_node$74$(key, value), _1: true };
11167
11209
  } else {
11168
11210
  const _Some = root;
11169
11211
  const _n = _Some;
11170
- if (moonbitlang$core$builtin$$Eq$equal$7$(key, _n.key)) {
11212
+ if (moonbitlang$core$builtin$$Eq$equal$6$(key, _n.key)) {
11171
11213
  _n.value = value;
11172
11214
  return { _0: _n, _1: false };
11173
11215
  } else {
11174
11216
  const l = _n.left;
11175
11217
  const r = _n.right;
11176
11218
  if (moonbitlang$core$builtin$$Compare$op_lt$57$(key, _n.key)) {
11177
- const _bind = zxch3n$flock$sorted_map$$add_node$80$(l, key, value);
11219
+ const _bind = zxch3n$flock$sorted_map$$add_node$74$(l, key, value);
11178
11220
  const _nl = _bind._0;
11179
11221
  const _inserted = _bind._1;
11180
11222
  _n.left = _nl;
11181
- return { _0: zxch3n$flock$sorted_map$$balance$80$(_n), _1: _inserted };
11223
+ return { _0: zxch3n$flock$sorted_map$$balance$74$(_n), _1: _inserted };
11182
11224
  } else {
11183
- const _bind = zxch3n$flock$sorted_map$$add_node$80$(r, key, value);
11225
+ const _bind = zxch3n$flock$sorted_map$$add_node$74$(r, key, value);
11184
11226
  const _nr = _bind._0;
11185
11227
  const _inserted = _bind._1;
11186
11228
  _n.right = _nr;
11187
- return { _0: zxch3n$flock$sorted_map$$balance$80$(_n), _1: _inserted };
11229
+ return { _0: zxch3n$flock$sorted_map$$balance$74$(_n), _1: _inserted };
11188
11230
  }
11189
11231
  }
11190
11232
  }
11191
11233
  }
11192
- function zxch3n$flock$sorted_map$$SortedMap$set$74$(self, key, value) {
11193
- const _bind = zxch3n$flock$sorted_map$$add_node$74$(self.root, key, value);
11234
+ function zxch3n$flock$sorted_map$$SortedMap$set$80$(self, key, value) {
11235
+ const _bind = zxch3n$flock$sorted_map$$add_node$80$(self.root, key, value);
11194
11236
  const _new_root = _bind._0;
11195
11237
  const _inserted = _bind._1;
11196
11238
  if (moonbitlang$core$builtin$$op_notequal$46$(self.root, _new_root)) {
@@ -11203,8 +11245,8 @@ function zxch3n$flock$sorted_map$$SortedMap$set$74$(self, key, value) {
11203
11245
  return;
11204
11246
  }
11205
11247
  }
11206
- function zxch3n$flock$sorted_map$$SortedMap$set$80$(self, key, value) {
11207
- const _bind = zxch3n$flock$sorted_map$$add_node$80$(self.root, key, value);
11248
+ function zxch3n$flock$sorted_map$$SortedMap$set$74$(self, key, value) {
11249
+ const _bind = zxch3n$flock$sorted_map$$add_node$74$(self.root, key, value);
11208
11250
  const _new_root = _bind._0;
11209
11251
  const _inserted = _bind._1;
11210
11252
  if (moonbitlang$core$builtin$$op_notequal$48$(self.root, _new_root)) {
@@ -11222,13 +11264,13 @@ function zxch3n$flock$sorted_map$$SortedMap$get$80$(self, key) {
11222
11264
  while (true) {
11223
11265
  const _param = _tmp;
11224
11266
  if (_param === undefined) {
11225
- return Option$None$32$;
11267
+ return Option$None$31$;
11226
11268
  } else {
11227
11269
  const _Some = _param;
11228
11270
  const _node = _Some;
11229
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11271
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(key, _node.key);
11230
11272
  if (cmp === 0) {
11231
- return new Option$Some$32$(_node.value);
11273
+ return new Option$Some$31$(_node.value);
11232
11274
  } else {
11233
11275
  if (cmp > 0) {
11234
11276
  _tmp = _node.right;
@@ -11250,7 +11292,7 @@ function zxch3n$flock$sorted_map$$SortedMap$get$74$(self, key) {
11250
11292
  } else {
11251
11293
  const _Some = _param;
11252
11294
  const _node = _Some;
11253
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11295
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(key, _node.key);
11254
11296
  if (cmp === 0) {
11255
11297
  return _node.value;
11256
11298
  } else {
@@ -11265,6 +11307,34 @@ function zxch3n$flock$sorted_map$$SortedMap$get$74$(self, key) {
11265
11307
  }
11266
11308
  }
11267
11309
  }
11310
+ function zxch3n$flock$sorted_map$$SortedMap$entry$74$(self, key) {
11311
+ let _tmp = self.root;
11312
+ while (true) {
11313
+ const _param = _tmp;
11314
+ if (_param === undefined) {
11315
+ return { _0: undefined, _1: (v) => {
11316
+ zxch3n$flock$sorted_map$$SortedMap$set$74$(self, key, v);
11317
+ } };
11318
+ } else {
11319
+ const _Some = _param;
11320
+ const _node = _Some;
11321
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(key, _node.key);
11322
+ if (cmp === 0) {
11323
+ return { _0: _node.value, _1: (v) => {
11324
+ _node.value = v;
11325
+ } };
11326
+ } else {
11327
+ if (cmp > 0) {
11328
+ _tmp = _node.right;
11329
+ continue;
11330
+ } else {
11331
+ _tmp = _node.left;
11332
+ continue;
11333
+ }
11334
+ }
11335
+ }
11336
+ }
11337
+ }
11268
11338
  function zxch3n$flock$sorted_map$$SortedMap$at$80$(self, key) {
11269
11339
  let _tmp = self.root;
11270
11340
  while (true) {
@@ -11274,7 +11344,7 @@ function zxch3n$flock$sorted_map$$SortedMap$at$80$(self, key) {
11274
11344
  } else {
11275
11345
  const _Some = _param;
11276
11346
  const _node = _Some;
11277
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11347
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(key, _node.key);
11278
11348
  if (cmp === 0) {
11279
11349
  return _node.value;
11280
11350
  } else {
@@ -11297,7 +11367,7 @@ function zxch3n$flock$sorted_map$$SortedMap$contains$80$(self, key) {
11297
11367
  return false;
11298
11368
  }
11299
11369
  }
11300
- function zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, x) {
11370
+ function zxch3n$flock$sorted_map$$iter2$46$go$47$2955(yield_, x) {
11301
11371
  let _tmp = x;
11302
11372
  while (true) {
11303
11373
  const x$2 = _tmp;
@@ -11310,7 +11380,7 @@ function zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, x) {
11310
11380
  const _right = _x.right;
11311
11381
  const _key = _x.key;
11312
11382
  const _value = _x.value;
11313
- const _bind = zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, _left);
11383
+ const _bind = zxch3n$flock$sorted_map$$iter2$46$go$47$2955(yield_, _left);
11314
11384
  if (_bind === 0) {
11315
11385
  return 0;
11316
11386
  } else {
@@ -11326,10 +11396,10 @@ function zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, x) {
11326
11396
  }
11327
11397
  }
11328
11398
  function zxch3n$flock$sorted_map$$SortedMap$iter2$74$(self) {
11329
- const _p = (yield_) => zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, self.root);
11399
+ const _p = (yield_) => zxch3n$flock$sorted_map$$iter2$46$go$47$2955(yield_, self.root);
11330
11400
  return _p;
11331
11401
  }
11332
- function zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, x) {
11402
+ function zxch3n$flock$sorted_map$$range$46$go$47$2970(_env, x) {
11333
11403
  const yield_ = _env._4;
11334
11404
  const low = _env._3;
11335
11405
  const tuple = _env._2;
@@ -11356,14 +11426,14 @@ function zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, x) {
11356
11426
  case 0: {
11357
11427
  const _Inclusive = low;
11358
11428
  const _lo = _Inclusive._0;
11359
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(_key, _lo);
11429
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(_key, _lo);
11360
11430
  _bind = { _0: cmp > 0, _1: cmp >= 0 };
11361
11431
  break;
11362
11432
  }
11363
11433
  default: {
11364
11434
  const _Exclusive = low;
11365
11435
  const _lo$2 = _Exclusive._0;
11366
- const cmp$2 = moonbitlang$core$builtin$$Compare$compare$7$(_key, _lo$2);
11436
+ const cmp$2 = moonbitlang$core$builtin$$Compare$compare$6$(_key, _lo$2);
11367
11437
  _bind = { _0: cmp$2 > 0, _1: cmp$2 > 0 };
11368
11438
  }
11369
11439
  }
@@ -11378,14 +11448,14 @@ function zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, x) {
11378
11448
  case 0: {
11379
11449
  const _Inclusive$2 = high;
11380
11450
  const _hi = _Inclusive$2._0;
11381
- const cmp$3 = moonbitlang$core$builtin$$Compare$compare$7$(_key, _hi);
11451
+ const cmp$3 = moonbitlang$core$builtin$$Compare$compare$6$(_key, _hi);
11382
11452
  _bind$2 = { _0: cmp$3 < 0, _1: cmp$3 <= 0 };
11383
11453
  break;
11384
11454
  }
11385
11455
  default: {
11386
11456
  const _Exclusive$2 = high;
11387
11457
  const _hi$2 = _Exclusive$2._0;
11388
- const cmp$4 = moonbitlang$core$builtin$$Compare$compare$7$(_key, _hi$2);
11458
+ const cmp$4 = moonbitlang$core$builtin$$Compare$compare$6$(_key, _hi$2);
11389
11459
  _bind$2 = { _0: cmp$4 < 0, _1: cmp$4 < 0 };
11390
11460
  }
11391
11461
  }
@@ -11393,7 +11463,7 @@ function zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, x) {
11393
11463
  const _within_high = _bind$2._1;
11394
11464
  _L: {
11395
11465
  if (_go_left) {
11396
- const _bind$3 = zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, _left);
11466
+ const _bind$3 = zxch3n$flock$sorted_map$$range$46$go$47$2970(_env, _left);
11397
11467
  if (_bind$3 === 0) {
11398
11468
  return 0;
11399
11469
  } else {
@@ -11430,16 +11500,16 @@ function zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, x) {
11430
11500
  }
11431
11501
  function zxch3n$flock$sorted_map$$SortedMap$range$74$(self, low, high) {
11432
11502
  const _p = (yield_) => {
11433
- const _env = { _0: zxch3n$flock$sorted_map$$range$46$tuple$47$2964, _1: high, _2: zxch3n$flock$sorted_map$$range$46$tuple$47$2965, _3: low, _4: yield_ };
11434
- return zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, self.root);
11503
+ const _env = { _0: zxch3n$flock$sorted_map$$range$46$tuple$47$2971, _1: high, _2: zxch3n$flock$sorted_map$$range$46$tuple$47$2972, _3: low, _4: yield_ };
11504
+ return zxch3n$flock$sorted_map$$range$46$go$47$2970(_env, self.root);
11435
11505
  };
11436
11506
  return _p;
11437
11507
  }
11438
11508
  function moonbitlang$core$builtin$$Eq$equal$66$(self, other) {
11439
- return moonbitlang$core$builtin$$Eq$equal$7$(self.key, other.key);
11509
+ return moonbitlang$core$builtin$$Eq$equal$6$(self.key, other.key);
11440
11510
  }
11441
11511
  function moonbitlang$core$builtin$$Eq$equal$67$(self, other) {
11442
- return moonbitlang$core$builtin$$Eq$equal$7$(self.key, other.key);
11512
+ return moonbitlang$core$builtin$$Eq$equal$6$(self.key, other.key);
11443
11513
  }
11444
11514
  function zxch3n$flock$flock$$SubscriberSet$new$81$() {
11445
11515
  return { seq: 0, subscribers: moonbitlang$core$builtin$$Map$new$46$inner$72$(8) };
@@ -11483,7 +11553,7 @@ function zxch3n$flock$flock$$bytes_to_hex(bytes) {
11483
11553
  if (i < bytes.length) {
11484
11554
  $bound_check(bytes, i);
11485
11555
  const byte = bytes[i];
11486
- const _p = moonbitlang$core$builtin$$Shr$shr$12$(byte, 4);
11556
+ const _p = moonbitlang$core$builtin$$Shr$shr$13$(byte, 4);
11487
11557
  const _p$2 = 15;
11488
11558
  const hi = _p & _p$2 & 255;
11489
11559
  const _p$3 = 15;
@@ -11502,7 +11572,7 @@ function zxch3n$flock$flock$$bytes_to_hex(bytes) {
11502
11572
  }
11503
11573
  function zxch3n$flock$flock$$bytes_from_hex(hex) {
11504
11574
  if (((hex.end - hex.start | 0) % 2 | 0) !== 0) {
11505
- moonbitlang$core$builtin$$println$8$(`Invalid hex length: ${moonbitlang$core$builtin$$Show$to_string$19$(hex.end - hex.start | 0)}`);
11575
+ moonbitlang$core$builtin$$println$7$(`Invalid hex length: ${moonbitlang$core$builtin$$Show$to_string$19$(hex.end - hex.start | 0)}`);
11506
11576
  return undefined;
11507
11577
  }
11508
11578
  const bytes = [];
@@ -11522,7 +11592,7 @@ function zxch3n$flock$flock$$bytes_from_hex(hex) {
11522
11592
  if (first >= 65 && first <= 70) {
11523
11593
  value = value + (Math.imul((first - 65 | 0) + 10 | 0, 16) | 0) | 0;
11524
11594
  } else {
11525
- moonbitlang$core$builtin$$println$8$(`Invalid hex character: ${moonbitlang$core$builtin$$Show$to_string$19$(first)}`);
11595
+ moonbitlang$core$builtin$$println$7$(`Invalid hex character: ${moonbitlang$core$builtin$$Show$to_string$19$(first)}`);
11526
11596
  return undefined;
11527
11597
  }
11528
11598
  }
@@ -11536,12 +11606,12 @@ function zxch3n$flock$flock$$bytes_from_hex(hex) {
11536
11606
  if (second >= 65 && second <= 70) {
11537
11607
  value = value + ((second - 65 | 0) + 10 | 0) | 0;
11538
11608
  } else {
11539
- moonbitlang$core$builtin$$println$8$(`Invalid hex character: ${moonbitlang$core$builtin$$Show$to_string$19$(second)}`);
11609
+ moonbitlang$core$builtin$$println$7$(`Invalid hex character: ${moonbitlang$core$builtin$$Show$to_string$19$(second)}`);
11540
11610
  return undefined;
11541
11611
  }
11542
11612
  }
11543
11613
  }
11544
- moonbitlang$core$array$$Array$push$12$(bytes, value & 255);
11614
+ moonbitlang$core$array$$Array$push$13$(bytes, value & 255);
11545
11615
  _tmp = i + 2 | 0;
11546
11616
  continue;
11547
11617
  } else {
@@ -11557,7 +11627,7 @@ function moonbitlang$core$builtin$$Compare$compare$56$(a, b) {
11557
11627
  if (ans !== 0) {
11558
11628
  return ans;
11559
11629
  }
11560
- return moonbitlang$core$builtin$$Compare$compare$7$(a.peer, b.peer);
11630
+ return moonbitlang$core$builtin$$Compare$compare$6$(a.peer, b.peer);
11561
11631
  }
11562
11632
  function zxch3n$flock$flock$$Hlc$to_string(self) {
11563
11633
  return `${moonbitlang$core$builtin$$Show$to_string$61$(self.physical_time)},${moonbitlang$core$builtin$$Show$to_string$19$(self.logical_counter)}`;
@@ -11566,7 +11636,7 @@ function zxch3n$flock$flock$$HlcWithPeer$to_string(self) {
11566
11636
  return `${zxch3n$flock$flock$$Hlc$to_string(self.hlc)},${zxch3n$flock$flock$$bytes_to_hex(self.peer)}`;
11567
11637
  }
11568
11638
  function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
11569
- const _bind = moonbitlang$core$builtin$$Iter$collect$16$(moonbitlang$core$string$$StringView$split(s, { str: zxch3n$flock$flock$$from_string$46$42$bind$124$604, start: 0, end: zxch3n$flock$flock$$from_string$46$42$bind$124$604.length }));
11639
+ const _bind = moonbitlang$core$builtin$$Iter$collect$15$(moonbitlang$core$string$$StringView$split(s, { str: zxch3n$flock$flock$$from_string$46$42$bind$124$598, start: 0, end: zxch3n$flock$flock$$from_string$46$42$bind$124$598.length }));
11570
11640
  if (_bind.length === 3) {
11571
11641
  const _a = _bind[0];
11572
11642
  const _b = _bind[1];
@@ -11575,7 +11645,7 @@ function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
11575
11645
  let _try_err;
11576
11646
  _L: {
11577
11647
  _L$2: {
11578
- const _bind$2 = moonbitlang$core$builtin$$Show$to_string$16$(_a);
11648
+ const _bind$2 = moonbitlang$core$builtin$$Show$to_string$15$(_a);
11579
11649
  const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: _bind$2, start: 0, end: _bind$2.length }, 1024);
11580
11650
  let _tmp$2;
11581
11651
  if (_bind$3.$tag === 1) {
@@ -11597,7 +11667,7 @@ function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
11597
11667
  let _try_err$2;
11598
11668
  _L$2: {
11599
11669
  _L$3: {
11600
- const _bind$2 = moonbitlang$core$builtin$$Show$to_string$16$(_b);
11670
+ const _bind$2 = moonbitlang$core$builtin$$Show$to_string$15$(_b);
11601
11671
  const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: _bind$2, start: 0, end: _bind$2.length }, 1024);
11602
11672
  let _tmp$4;
11603
11673
  if (_bind$3.$tag === 1) {
@@ -11931,13 +12001,13 @@ function zxch3n$flock$flock$$make_entry(key, value) {
11931
12001
  return { key: key, value: value, overridden: false };
11932
12002
  }
11933
12003
  function zxch3n$flock$flock$$entries_equal(a, b) {
11934
- if (moonbitlang$core$builtin$$Eq$equal$7$(a.key, b.key)) {
12004
+ if (moonbitlang$core$builtin$$Eq$equal$6$(a.key, b.key)) {
11935
12005
  let _tmp;
11936
12006
  if (moonbitlang$core$builtin$$Eq$equal$45$(a.value.data, b.value.data)) {
11937
12007
  let _tmp$2;
11938
12008
  if (moonbitlang$core$builtin$$Eq$equal$65$(a.value.metadata, b.value.metadata)) {
11939
12009
  let _tmp$3;
11940
- if (moonbitlang$core$builtin$$Eq$equal$7$(a.value.clock.peer, b.value.clock.peer)) {
12010
+ if (moonbitlang$core$builtin$$Eq$equal$6$(a.value.clock.peer, b.value.clock.peer)) {
11941
12011
  const _p = a.value.clock.hlc;
11942
12012
  const _p$2 = b.value.clock.hlc;
11943
12013
  _tmp$3 = _p.physical_time === _p$2.physical_time && _p.logical_counter === _p$2.logical_counter;
@@ -11981,40 +12051,42 @@ function zxch3n$flock$flock$$Flock$record_pending_change$46$inner(self, remove_d
11981
12051
  }
11982
12052
  }
11983
12053
  }
11984
- function zxch3n$flock$flock$$Flock$apply_entry(self, entry) {
12054
+ function zxch3n$flock$flock$$Flock$apply_entry(self, entry, skip_same_value) {
11985
12055
  const entry_key = entry.key;
11986
12056
  const peer = entry.value.clock.peer;
11987
- const maybe_existing = zxch3n$flock$sorted_map$$SortedMap$get$74$(self.kv, entry_key);
12057
+ const _bind = zxch3n$flock$sorted_map$$SortedMap$entry$74$(self.kv, entry_key);
12058
+ const _maybe_existing = _bind._0;
12059
+ const _setter = _bind._1;
11988
12060
  let should_apply;
11989
- if (maybe_existing === undefined) {
12061
+ if (_maybe_existing === undefined) {
11990
12062
  should_apply = true;
11991
12063
  } else {
11992
- const _Some = maybe_existing;
12064
+ const _Some = _maybe_existing;
11993
12065
  const _existing = _Some;
11994
- should_apply = moonbitlang$core$builtin$$Compare$op_gt$55$(entry.value.clock, _existing.value.clock);
12066
+ should_apply = moonbitlang$core$builtin$$Compare$op_gt$55$(entry.value.clock, _existing.value.clock) || skip_same_value && moonbitlang$core$builtin$$Eq$equal$45$(entry.value.data, _existing.value.data);
11995
12067
  }
11996
12068
  if (!should_apply) {
11997
12069
  return false;
11998
12070
  }
11999
12071
  let removed_digest = undefined;
12000
- if (maybe_existing === undefined) {
12072
+ if (_maybe_existing === undefined) {
12001
12073
  } else {
12002
- const _Some = maybe_existing;
12074
+ const _Some = _maybe_existing;
12003
12075
  const _existing = _Some;
12004
12076
  removed_digest = zxch3n$flock$flock$$Entry$digest(_existing);
12005
12077
  _existing.overridden = true;
12006
12078
  }
12007
- const added_digest = moonbitlang$core$option$$Option$map$70$(entry.value.data, (_discard_) => zxch3n$flock$flock$$Entry$digest(entry));
12008
- zxch3n$flock$sorted_map$$SortedMap$set$74$(self.kv, entry_key, entry);
12079
+ const added_digest = moonbitlang$core$option$$Option$map$69$(entry.value.data, (_discard_) => zxch3n$flock$flock$$Entry$digest(entry));
12080
+ _setter(entry);
12009
12081
  if (!zxch3n$flock$sorted_map$$SortedMap$contains$80$(self.updates, peer)) {
12010
12082
  zxch3n$flock$sorted_map$$SortedMap$set$80$(self.updates, peer, []);
12011
12083
  }
12012
12084
  const updates = zxch3n$flock$sorted_map$$SortedMap$at$80$(self.updates, peer);
12013
12085
  let meet_rare_case = false;
12014
- const _bind = moonbitlang$core$array$$Array$last$42$(updates);
12015
- if (_bind === undefined) {
12086
+ const _bind$2 = moonbitlang$core$array$$Array$last$42$(updates);
12087
+ if (_bind$2 === undefined) {
12016
12088
  } else {
12017
- const _Some = _bind;
12089
+ const _Some = _bind$2;
12018
12090
  const _last = _Some;
12019
12091
  if (moonbitlang$core$builtin$$Compare$op_gt$55$(_last.value.clock, entry.value.clock)) {
12020
12092
  meet_rare_case = true;
@@ -12159,7 +12231,7 @@ function zxch3n$flock$flock$$Flock$new(peer_id) {
12159
12231
  const _bind$3 = zxch3n$flock$sorted_map$$SortedMap$new$80$();
12160
12232
  const _bind$4 = zxch3n$flock$flock$$SubscriberSet$new$81$();
12161
12233
  const _bind$5 = undefined;
12162
- return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$new$46$42$bind$47$3223, vv: _bind, kv: _bind$2, updates: _bind$3, subscribers: _bind$4, digest: _bind$5 };
12234
+ return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$new$46$42$bind$47$3233, vv: _bind, kv: _bind$2, updates: _bind$3, subscribers: _bind$4, digest: _bind$5 };
12163
12235
  }
12164
12236
  function zxch3n$flock$flock$$Flock$set_peer_id(self, peer_id) {
12165
12237
  self.peer_id = peer_id;
@@ -12180,7 +12252,7 @@ function zxch3n$flock$flock$$Flock$check_consistency(a, b) {
12180
12252
  const _bind$2 = moonbitlang$core$array$$Array$at$52$(entries_b, i);
12181
12253
  const _key_b = _bind$2._0;
12182
12254
  const _entry_b = _bind$2._1;
12183
- if (moonbitlang$core$builtin$$op_notequal$7$(_key_a, _key_b)) {
12255
+ if (moonbitlang$core$builtin$$op_notequal$6$(_key_a, _key_b)) {
12184
12256
  return false;
12185
12257
  }
12186
12258
  if (!zxch3n$flock$flock$$entries_equal(_entry_a, _entry_b)) {
@@ -12194,11 +12266,11 @@ function zxch3n$flock$flock$$Flock$check_consistency(a, b) {
12194
12266
  }
12195
12267
  return true;
12196
12268
  }
12197
- function zxch3n$flock$flock$$Flock$check_invariants(self) {}
12269
+ function zxch3n$flock$flock$$Flock$check_invariants(_self) {}
12198
12270
  function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata, now, hooks) {
12199
12271
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(key);
12200
12272
  if (_bind === undefined) {
12201
- return new Result$Err$33$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidKey(moonbitlang$core$builtin$$ToJson$to_json$32$(key)));
12273
+ return new Result$Err$32$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidKey(moonbitlang$core$builtin$$ToJson$to_json$32$(key)));
12202
12274
  } else {
12203
12275
  const _Some = _bind;
12204
12276
  const _encoded_key = _Some;
@@ -12236,9 +12308,9 @@ function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata,
12236
12308
  }
12237
12309
  const final_value = { data: transformed_value.data, metadata: transformed_value.metadata, clock: clock };
12238
12310
  const final_entry = zxch3n$flock$flock$$make_entry(_encoded_key, final_value);
12239
- const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry);
12311
+ const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry, true);
12240
12312
  if (!applied) {
12241
- return new Result$Ok$33$(undefined);
12313
+ return new Result$Ok$32$(undefined);
12242
12314
  }
12243
12315
  const final_clock = final_entry.value.clock.hlc;
12244
12316
  self.max_hlc = final_clock;
@@ -12246,9 +12318,9 @@ function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata,
12246
12318
  if (!zxch3n$flock$flock$$SubscriberSet$is_empty$81$(self.subscribers)) {
12247
12319
  const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
12248
12320
  const event_payload = zxch3n$flock$flock$$clone_raw_value(final_entry.value);
12249
- return new Result$Ok$33$(zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: Source$Local, events: [{ _0: event_key, _1: event_payload }] }));
12321
+ return new Result$Ok$32$(zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: Source$Local, events: [{ _0: event_key, _1: event_payload }] }));
12250
12322
  } else {
12251
- return new Result$Ok$33$(undefined);
12323
+ return new Result$Ok$32$(undefined);
12252
12324
  }
12253
12325
  }
12254
12326
  }
@@ -12304,10 +12376,10 @@ function zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, metadata$46$o
12304
12376
  return zxch3n$flock$flock$$Flock$put_with_meta$46$inner(self, key, value, metadata, now, hooks);
12305
12377
  }
12306
12378
  function zxch3n$flock$flock$$Flock$put$46$inner(self, key, value, now) {
12307
- return zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, Option$None$34$, now, Option$None$35$);
12379
+ return zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, Option$None$33$, now, Option$None$34$);
12308
12380
  }
12309
12381
  function zxch3n$flock$flock$$Flock$delete$46$inner(self, key, now) {
12310
- return zxch3n$flock$flock$$Flock$put_inner(self, key, undefined, Option$None$34$, now, Option$None$35$);
12382
+ return zxch3n$flock$flock$$Flock$put_inner(self, key, undefined, Option$None$33$, now, Option$None$34$);
12311
12383
  }
12312
12384
  function zxch3n$flock$flock$$Flock$get(self, key) {
12313
12385
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(key);
@@ -12316,7 +12388,7 @@ function zxch3n$flock$flock$$Flock$get(self, key) {
12316
12388
  } else {
12317
12389
  const _Some = _bind;
12318
12390
  const _encoded_key = _Some;
12319
- return moonbitlang$core$option$$Option$flatten$14$(moonbitlang$core$option$$Option$map$69$(zxch3n$flock$sorted_map$$SortedMap$get$74$(self.kv, _encoded_key), (entry) => entry.value.data));
12391
+ return moonbitlang$core$option$$Option$bind$70$(zxch3n$flock$sorted_map$$SortedMap$get$74$(self.kv, _encoded_key), (entry) => entry.value.data);
12320
12392
  }
12321
12393
  }
12322
12394
  function zxch3n$flock$flock$$empty_scan_iter() {
@@ -12327,12 +12399,12 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
12327
12399
  if ((bytes.end - bytes.start | 0) === 0) {
12328
12400
  return undefined;
12329
12401
  }
12330
- const data = moonbitlang$core$array$$Array$new$46$inner$12$(bytes.end - bytes.start | 0);
12402
+ const data = moonbitlang$core$array$$Array$new$46$inner$13$(bytes.end - bytes.start | 0);
12331
12403
  let _tmp = 0;
12332
12404
  while (true) {
12333
12405
  const i = _tmp;
12334
12406
  if (i < (bytes.end - bytes.start | 0)) {
12335
- moonbitlang$core$array$$Array$push$12$(data, moonbitlang$core$bytes$$BytesView$at(bytes, i));
12407
+ moonbitlang$core$array$$Array$push$13$(data, moonbitlang$core$bytes$$BytesView$at(bytes, i));
12336
12408
  _tmp = i + 1 | 0;
12337
12409
  continue;
12338
12410
  } else {
@@ -12343,15 +12415,15 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
12343
12415
  while (true) {
12344
12416
  const i = _tmp$2;
12345
12417
  if (i >= 0) {
12346
- const current = moonbitlang$core$array$$Array$at$12$(data, i);
12418
+ const current = moonbitlang$core$array$$Array$at$13$(data, i);
12347
12419
  if (current < 255) {
12348
- moonbitlang$core$array$$Array$set$12$(data, i, (current + 1 | 0) & 255);
12349
- const truncated = moonbitlang$core$array$$Array$new$46$inner$12$(i + 1 | 0);
12420
+ moonbitlang$core$array$$Array$set$13$(data, i, (current + 1 | 0) & 255);
12421
+ const truncated = moonbitlang$core$array$$Array$new$46$inner$13$(i + 1 | 0);
12350
12422
  let _tmp$3 = 0;
12351
12423
  while (true) {
12352
12424
  const j = _tmp$3;
12353
12425
  if (j <= i) {
12354
- moonbitlang$core$array$$Array$push$12$(truncated, moonbitlang$core$array$$Array$at$12$(data, j));
12426
+ moonbitlang$core$array$$Array$push$13$(truncated, moonbitlang$core$array$$Array$at$13$(data, j));
12355
12427
  _tmp$3 = j + 1 | 0;
12356
12428
  continue;
12357
12429
  } else {
@@ -12368,7 +12440,7 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
12368
12440
  }
12369
12441
  return undefined;
12370
12442
  }
12371
- function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, bytes, inclusive) {
12443
+ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$380(_env, bytes, inclusive) {
12372
12444
  const lower_inclusive = _env._1;
12373
12445
  const lower_bytes = _env._0;
12374
12446
  const _bind = lower_bytes.val;
@@ -12394,9 +12466,9 @@ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, bytes, i
12394
12466
  }
12395
12467
  }
12396
12468
  }
12397
- function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$386(_env, bytes, inclusive) {
12398
- const upper_bytes = _env._1;
12399
- const upper_inclusive = _env._0;
12469
+ function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$392(_env, bytes, inclusive) {
12470
+ const upper_inclusive = _env._1;
12471
+ const upper_bytes = _env._0;
12400
12472
  const _bind = upper_bytes.val;
12401
12473
  if (_bind === undefined) {
12402
12474
  upper_bytes.val = bytes;
@@ -12451,7 +12523,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12451
12523
  } else {
12452
12524
  const _Some = _bind;
12453
12525
  const _encoded_start = _Some;
12454
- start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(_encoded_start);
12526
+ start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$35$(_encoded_start);
12455
12527
  }
12456
12528
  break;
12457
12529
  }
@@ -12464,12 +12536,12 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12464
12536
  } else {
12465
12537
  const _Some = _bind$2;
12466
12538
  const _encoded_start = _Some;
12467
- start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(_encoded_start);
12539
+ start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$35$(_encoded_start);
12468
12540
  }
12469
12541
  break;
12470
12542
  }
12471
12543
  default: {
12472
- start_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$;
12544
+ start_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$35$;
12473
12545
  }
12474
12546
  }
12475
12547
  let end_bound_bytes;
@@ -12483,7 +12555,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12483
12555
  } else {
12484
12556
  const _Some = _bind$3;
12485
12557
  const _encoded_end = _Some;
12486
- end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(_encoded_end);
12558
+ end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$35$(_encoded_end);
12487
12559
  }
12488
12560
  break;
12489
12561
  }
@@ -12496,12 +12568,12 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12496
12568
  } else {
12497
12569
  const _Some = _bind$4;
12498
12570
  const _encoded_end = _Some;
12499
- end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(_encoded_end);
12571
+ end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$35$(_encoded_end);
12500
12572
  }
12501
12573
  break;
12502
12574
  }
12503
12575
  default: {
12504
- end_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$;
12576
+ end_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$35$;
12505
12577
  }
12506
12578
  }
12507
12579
  const lower_bytes = { val: undefined };
@@ -12512,63 +12584,63 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12512
12584
  } else {
12513
12585
  const _Some = _bind$5;
12514
12586
  const _prefix_key = _Some;
12515
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, _prefix_key, true);
12587
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$380(_env, _prefix_key, true);
12516
12588
  }
12517
12589
  switch (start_bound_bytes.$tag) {
12518
12590
  case 0: {
12519
12591
  const _Inclusive$3 = start_bound_bytes;
12520
12592
  const _start_key = _Inclusive$3._0;
12521
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, _start_key, true);
12593
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$380(_env, _start_key, true);
12522
12594
  break;
12523
12595
  }
12524
12596
  case 1: {
12525
12597
  const _Exclusive$3 = start_bound_bytes;
12526
12598
  const _start_key$2 = _Exclusive$3._0;
12527
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, _start_key$2, false);
12599
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$380(_env, _start_key$2, false);
12528
12600
  break;
12529
12601
  }
12530
12602
  }
12531
12603
  const _bind$6 = lower_bytes.val;
12532
12604
  let low_bound;
12533
12605
  if (_bind$6 === undefined) {
12534
- low_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$31$;
12606
+ low_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
12535
12607
  } else {
12536
12608
  const _Some = _bind$6;
12537
12609
  const _bytes = _Some;
12538
- low_bound = lower_inclusive.val ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$31$(_bytes) : new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$31$(_bytes);
12610
+ low_bound = lower_inclusive.val ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$30$(_bytes) : new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$(_bytes);
12539
12611
  }
12540
12612
  const upper_bytes = { val: undefined };
12541
12613
  const upper_inclusive = { val: true };
12542
- const _env$2 = { _0: upper_inclusive, _1: upper_bytes };
12614
+ const _env$2 = { _0: upper_bytes, _1: upper_inclusive };
12543
12615
  const _bind$7 = prefix_upper_bytes;
12544
12616
  if (_bind$7 === undefined) {
12545
12617
  } else {
12546
12618
  const _Some = _bind$7;
12547
12619
  const _prefix_upper = _Some;
12548
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$386(_env$2, _prefix_upper, false);
12620
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$392(_env$2, _prefix_upper, false);
12549
12621
  }
12550
12622
  switch (end_bound_bytes.$tag) {
12551
12623
  case 0: {
12552
12624
  const _Inclusive$4 = end_bound_bytes;
12553
12625
  const _end_key = _Inclusive$4._0;
12554
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$386(_env$2, _end_key, true);
12626
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$392(_env$2, _end_key, true);
12555
12627
  break;
12556
12628
  }
12557
12629
  case 1: {
12558
12630
  const _Exclusive$4 = end_bound_bytes;
12559
12631
  const _end_key$2 = _Exclusive$4._0;
12560
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$386(_env$2, _end_key$2, false);
12632
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$392(_env$2, _end_key$2, false);
12561
12633
  break;
12562
12634
  }
12563
12635
  }
12564
12636
  const _bind$8 = upper_bytes.val;
12565
12637
  let high_bound;
12566
12638
  if (_bind$8 === undefined) {
12567
- high_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$31$;
12639
+ high_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
12568
12640
  } else {
12569
12641
  const _Some = _bind$8;
12570
12642
  const _bytes = _Some;
12571
- high_bound = upper_inclusive.val ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$31$(_bytes) : new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$31$(_bytes);
12643
+ high_bound = upper_inclusive.val ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$30$(_bytes) : new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$(_bytes);
12572
12644
  }
12573
12645
  const range_iter = zxch3n$flock$sorted_map$$SortedMap$range$74$(self.kv, low_bound, high_bound);
12574
12646
  const _p = (yield_) => moonbitlang$core$builtin$$Iter2$run$74$(range_iter, (encoded_key, entry) => {
@@ -12608,14 +12680,14 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12608
12680
  function zxch3n$flock$flock$$Flock$scan(self, start$46$opt, end$46$opt, prefix) {
12609
12681
  let start;
12610
12682
  if (start$46$opt === undefined) {
12611
- start = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
12683
+ start = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
12612
12684
  } else {
12613
12685
  const _Some = start$46$opt;
12614
12686
  start = _Some;
12615
12687
  }
12616
12688
  let end;
12617
12689
  if (end$46$opt === undefined) {
12618
- end = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
12690
+ end = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
12619
12691
  } else {
12620
12692
  const _Some = end$46$opt;
12621
12693
  end = _Some;
@@ -12628,7 +12700,7 @@ function zxch3n$flock$flock$$Flock$subscribe(self, listener) {
12628
12700
  function zxch3n$flock$flock$$Flock$version(self) {
12629
12701
  return moonbitlang$core$builtin$$Map$copy$71$(self.vv);
12630
12702
  }
12631
- function zxch3n$flock$flock$$Flock$export_json(self, from) {
12703
+ function zxch3n$flock$flock$$Flock$export_json$46$inner(self, from, prune_tombstones_before) {
12632
12704
  const ans = moonbitlang$core$builtin$$Map$new$46$inner$37$(8);
12633
12705
  const _p = 0;
12634
12706
  const _p$2 = undefined;
@@ -12642,13 +12714,13 @@ function zxch3n$flock$flock$$Flock$export_json(self, from) {
12642
12714
  const _Some = from;
12643
12715
  const _f = _Some;
12644
12716
  if (!(_f.size === 0)) {
12645
- let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$37$;
12717
+ let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$36$;
12646
12718
  const _bind = moonbitlang$core$builtin$$Map$iter2$71$(self.vv);
12647
12719
  _bind((peer, clock) => {
12648
12720
  const _p$3 = moonbitlang$core$builtin$$Map$get$71$(_f, peer);
12649
12721
  let v;
12650
12722
  if (_p$3 === undefined) {
12651
- v = zxch3n$flock$flock$$zero$46$record$47$3043;
12723
+ v = zxch3n$flock$flock$$zero$46$record$47$3050;
12652
12724
  } else {
12653
12725
  const _p$4 = _p$3;
12654
12726
  v = _p$4;
@@ -12681,6 +12753,16 @@ function zxch3n$flock$flock$$Flock$export_json(self, from) {
12681
12753
  if (update.overridden) {
12682
12754
  break _L$3;
12683
12755
  }
12756
+ if (prune_tombstones_before.$tag === 1) {
12757
+ const _Some$3 = prune_tombstones_before;
12758
+ const _before = _Some$3._0;
12759
+ const _bind$4 = update.value.data;
12760
+ if (_bind$4 === undefined) {
12761
+ if (update.value.clock.hlc.physical_time < _before) {
12762
+ break _L$3;
12763
+ }
12764
+ }
12765
+ }
12684
12766
  const key = zxch3n$flock$memcomparable$$decode_key_to_json(update.key);
12685
12767
  const exported_value = update.value;
12686
12768
  moonbitlang$core$builtin$$Map$set$37$(entries, moonbitlang$core$json$$Json$stringify$46$inner(moonbitlang$core$builtin$$ToJson$to_json$32$(key), false, 0, undefined), zxch3n$flock$flock$$RawValue$to_json(exported_value));
@@ -12734,6 +12816,16 @@ function zxch3n$flock$flock$$Flock$export_json(self, from) {
12734
12816
  moonbitlang$core$builtin$$Map$set$37$(ans, "entries", new $64$moonbitlang$47$core$47$builtin$46$Json$Object(entries));
12735
12817
  return new $64$moonbitlang$47$core$47$builtin$46$Json$Object(ans);
12736
12818
  }
12819
+ function zxch3n$flock$flock$$Flock$export_json(self, from, prune_tombstones_before$46$opt) {
12820
+ let prune_tombstones_before;
12821
+ if (prune_tombstones_before$46$opt === undefined) {
12822
+ prune_tombstones_before = Option$None$8$;
12823
+ } else {
12824
+ const _Some = prune_tombstones_before$46$opt;
12825
+ prune_tombstones_before = _Some;
12826
+ }
12827
+ return zxch3n$flock$flock$$Flock$export_json$46$inner(self, from, prune_tombstones_before);
12828
+ }
12737
12829
  function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12738
12830
  if (json.$tag === 6) {
12739
12831
  const _Object = json;
@@ -12743,7 +12835,7 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12743
12835
  _L$2: {
12744
12836
  const _bind = moonbitlang$core$builtin$$Map$get$37$(_map, "version");
12745
12837
  if (_bind === undefined) {
12746
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "The imported json does not contain a version field"));
12838
+ return new Result$Err$37$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "The imported json does not contain a version field"));
12747
12839
  } else {
12748
12840
  const _Some = _bind;
12749
12841
  const _x = _Some;
@@ -12762,11 +12854,11 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12762
12854
  }
12763
12855
  break _L;
12764
12856
  }
12765
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, `The imported json uses an unsupported version ${moonbitlang$core$builtin$$Show$to_string$60$(version)}`));
12857
+ return new Result$Err$37$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, `The imported json uses an unsupported version ${moonbitlang$core$builtin$$Show$to_string$60$(version)}`));
12766
12858
  }
12767
- const events = { val: Option$None$39$ };
12859
+ const events = { val: Option$None$38$ };
12768
12860
  if (!zxch3n$flock$flock$$SubscriberSet$is_empty$81$(self.subscribers)) {
12769
- events.val = new Option$Some$39$(moonbitlang$core$array$$Array$new$46$inner$51$(0));
12861
+ events.val = new Option$Some$38$(moonbitlang$core$array$$Array$new$46$inner$51$(0));
12770
12862
  }
12771
12863
  const skipped_entries = moonbitlang$core$array$$Array$new$46$inner$50$(0);
12772
12864
  const accepted = { val: 0 };
@@ -12788,9 +12880,9 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12788
12880
  }
12789
12881
  break _L$2;
12790
12882
  }
12791
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "entries is not an object"));
12883
+ return new Result$Err$37$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "entries is not an object"));
12792
12884
  }
12793
- const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$40$ };
12885
+ const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$39$ };
12794
12886
  const _bind = moonbitlang$core$builtin$$Map$iter2$37$(entries);
12795
12887
  _bind((raw_key, raw_value_json) => {
12796
12888
  let _foreach_error;
@@ -12867,7 +12959,7 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12867
12959
  accepted.val = accepted.val + 1 | 0;
12868
12960
  const peer = final_entry.value.clock.peer;
12869
12961
  const clock = final_entry.value.clock.hlc;
12870
- const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry);
12962
+ const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry, false);
12871
12963
  if (moonbitlang$core$builtin$$Compare$op_lt$54$(self.max_hlc, clock)) {
12872
12964
  self.max_hlc = clock;
12873
12965
  }
@@ -12885,9 +12977,9 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12885
12977
  const _bind$5 = events.val;
12886
12978
  if (_bind$5.$tag === 1) {
12887
12979
  const _Some$2 = _bind$5;
12888
- const _evts = _Some$2._0;
12980
+ const _events_ = _Some$2._0;
12889
12981
  const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
12890
- moonbitlang$core$array$$Array$push$51$(_evts, { _0: event_key, _1: zxch3n$flock$flock$$clone_raw_value(final_entry.value) });
12982
+ moonbitlang$core$array$$Array$push$51$(_events_, { _0: event_key, _1: zxch3n$flock$flock$$clone_raw_value(final_entry.value) });
12891
12983
  }
12892
12984
  }
12893
12985
  }
@@ -12898,7 +12990,7 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12898
12990
  }
12899
12991
  return 1;
12900
12992
  }
12901
- _foreach_result.val = new $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$40$(_foreach_error);
12993
+ _foreach_result.val = new $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$39$(_foreach_error);
12902
12994
  return 0;
12903
12995
  });
12904
12996
  const _tmp = _foreach_result.val;
@@ -12913,11 +13005,11 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12913
13005
  }
12914
13006
  case 2: {
12915
13007
  const _return = _tmp;
12916
- return new Result$Ok$38$(_return._0);
13008
+ return new Result$Ok$37$(_return._0);
12917
13009
  }
12918
13010
  case 3: {
12919
13011
  const _error = _tmp;
12920
- return new Result$Err$38$(_error._0);
13012
+ return new Result$Err$37$(_error._0);
12921
13013
  }
12922
13014
  default: {
12923
13015
  $panic();
@@ -12928,12 +13020,12 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12928
13020
  const _Some = _bind$2;
12929
13021
  const _events = _Some._0;
12930
13022
  if (_events.length > 0) {
12931
- zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3465, events: _events });
13023
+ zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3484, events: _events });
12932
13024
  }
12933
13025
  }
12934
- return new Result$Ok$38$({ accepted: accepted.val, skipped: skipped_entries });
13026
+ return new Result$Ok$37$({ accepted: accepted.val, skipped: skipped_entries });
12935
13027
  } else {
12936
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "not an object"));
13028
+ return new Result$Err$37$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "not an object"));
12937
13029
  }
12938
13030
  }
12939
13031
  function zxch3n$flock$flock$$Flock$import_json(self, json, hooks$46$opt) {
@@ -12950,7 +13042,7 @@ function zxch3n$flock$flock$$Flock$merge(self, other) {
12950
13042
  let _try_err;
12951
13043
  _L: {
12952
13044
  _L$2: {
12953
- const _bind = zxch3n$flock$flock$$Flock$import_json(self, zxch3n$flock$flock$$Flock$export_json(other, zxch3n$flock$flock$$Flock$version(self)), Option$None$41$);
13045
+ const _bind = zxch3n$flock$flock$$Flock$import_json(self, zxch3n$flock$flock$$Flock$export_json(other, zxch3n$flock$flock$$Flock$version(self), undefined), Option$None$40$);
12954
13046
  if (_bind.$tag === 1) {
12955
13047
  const _ok = _bind;
12956
13048
  _ok._0;
@@ -12967,7 +13059,7 @@ function zxch3n$flock$flock$$Flock$merge(self, other) {
12967
13059
  }
12968
13060
  function zxch3n$flock$flock$$Flock$from_json(json, peer_id) {
12969
13061
  const flock = zxch3n$flock$flock$$Flock$new(peer_id);
12970
- const _bind = zxch3n$flock$flock$$Flock$import_json(flock, json, Option$None$41$);
13062
+ const _bind = zxch3n$flock$flock$$Flock$import_json(flock, json, Option$None$40$);
12971
13063
  let report;
12972
13064
  if (_bind.$tag === 1) {
12973
13065
  const _ok = _bind;
@@ -12975,14 +13067,14 @@ function zxch3n$flock$flock$$Flock$from_json(json, peer_id) {
12975
13067
  } else {
12976
13068
  return _bind;
12977
13069
  }
12978
- return new Result$Ok$42$(flock);
13070
+ return new Result$Ok$41$(flock);
12979
13071
  }
12980
13072
  function zxch3n$flock$flock$$Flock$kv_to_json(self) {
12981
- return zxch3n$flock$flock$$Flock$export_json(self, undefined);
13073
+ return zxch3n$flock$flock$$Flock$export_json(self, undefined, undefined);
12982
13074
  }
12983
13075
  function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
12984
- const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$43$ };
12985
- const _bind = zxch3n$flock$flock$$Flock$scan(self, undefined, undefined, new Option$Some$30$(key));
13076
+ const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$42$ };
13077
+ const _bind = zxch3n$flock$flock$$Flock$scan(self, undefined, undefined, new Option$Some$29$(key));
12986
13078
  _bind((k, v) => {
12987
13079
  let _foreach_error;
12988
13080
  _L: {
@@ -13002,7 +13094,7 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13002
13094
  }
13003
13095
  return 1;
13004
13096
  }
13005
- _foreach_result.val = new $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$43$(_foreach_error);
13097
+ _foreach_result.val = new $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$42$(_foreach_error);
13006
13098
  return 0;
13007
13099
  });
13008
13100
  const _tmp = _foreach_result.val;
@@ -13017,11 +13109,11 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13017
13109
  }
13018
13110
  case 2: {
13019
13111
  const _return = _tmp;
13020
- return new Result$Ok$33$(_return._0);
13112
+ return new Result$Ok$32$(_return._0);
13021
13113
  }
13022
13114
  case 3: {
13023
13115
  const _error = _tmp;
13024
- return new Result$Err$33$(_error._0);
13116
+ return new Result$Err$32$(_error._0);
13025
13117
  }
13026
13118
  default: {
13027
13119
  $panic();
@@ -13043,17 +13135,17 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13043
13135
  }
13044
13136
  break _L;
13045
13137
  }
13046
- return new Result$Err$33$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidValueForMvr(value));
13138
+ return new Result$Err$32$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidValueForMvr(value));
13047
13139
  }
13048
13140
  moonbitlang$core$array$$Array$push$14$(key$2, value);
13049
13141
  const _p = true;
13050
13142
  const _tmp$2 = _p ? $64$moonbitlang$47$core$47$builtin$46$Json$True : $64$moonbitlang$47$core$47$builtin$46$Json$False;
13051
- return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$34$, now, Option$None$35$);
13143
+ return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$33$, now, Option$None$34$);
13052
13144
  }
13053
13145
  function zxch3n$flock$flock$$Flock$get_mvr(self, key) {
13054
13146
  const ans = [];
13055
- let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$44$;
13056
- const _bind = zxch3n$flock$flock$$Flock$scan(self, undefined, undefined, new Option$Some$30$(key));
13147
+ let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$43$;
13148
+ const _bind = zxch3n$flock$flock$$Flock$scan(self, undefined, undefined, new Option$Some$29$(key));
13057
13149
  _bind((k, v) => {
13058
13150
  let _tmp;
13059
13151
  if (k.length !== (key.length + 1 | 0)) {
@@ -13100,7 +13192,7 @@ function zxch3n$flock$flock$$Flock$newFlock(peer_id) {
13100
13192
  const _bind$3 = zxch3n$flock$sorted_map$$SortedMap$new$80$();
13101
13193
  const _bind$4 = zxch3n$flock$flock$$SubscriberSet$new$81$();
13102
13194
  const _bind$5 = undefined;
13103
- return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$newFlock$46$42$bind$47$3574, vv: _bind, kv: _bind$2, updates: _bind$3, subscribers: _bind$4, digest: _bind$5 };
13195
+ return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$newFlock$46$42$bind$47$3593, vv: _bind, kv: _bind$2, updates: _bind$3, subscribers: _bind$4, digest: _bind$5 };
13104
13196
  }
13105
13197
  function zxch3n$flock$flock$$json_stringify_value(value) {
13106
13198
  return zxch3n$flock$flock$$ffi_json_stringify_value(value);
@@ -13174,7 +13266,7 @@ function zxch3n$flock$flock$$Flock$put_ffi(self, key, value, now) {
13174
13266
  }
13175
13267
  }
13176
13268
  const key_arr$2 = _p;
13177
- const _bind$4 = zxch3n$flock$flock$$Flock$put_inner(self, key_arr$2, value$2, Option$None$34$, new Option$Some$8$(now), Option$None$35$);
13269
+ const _bind$4 = zxch3n$flock$flock$$Flock$put_inner(self, key_arr$2, value$2, Option$None$33$, new Option$Some$8$(now), Option$None$34$);
13178
13270
  if (_bind$4.$tag === 1) {
13179
13271
  const _ok = _bind$4;
13180
13272
  _ok._0;
@@ -13223,7 +13315,7 @@ function zxch3n$flock$flock$$json_to_metadata(json) {
13223
13315
  return undefined;
13224
13316
  }
13225
13317
  default: {
13226
- return moonbitlang$core$abort$$abort$6$("metadata must be an object or null");
13318
+ return moonbitlang$core$abort$$abort$5$("metadata must be an object or null");
13227
13319
  }
13228
13320
  }
13229
13321
  }
@@ -13269,8 +13361,8 @@ function zxch3n$flock$flock$$Flock$get_ffi(self, key) {
13269
13361
  const key_arr$2 = _p;
13270
13362
  const ans = zxch3n$flock$flock$$Flock$get(self, key_arr$2);
13271
13363
  if (ans === undefined) {
13272
- const _p$3 = Yoorkin$jmop$$Optional$undefined$4$();
13273
- return _p$3;
13364
+ const a = Yoorkin$jmop$$Optional$undefined$76$();
13365
+ return a;
13274
13366
  } else {
13275
13367
  const _Some = ans;
13276
13368
  const _value = _Some;
@@ -13296,7 +13388,7 @@ function zxch3n$flock$flock$$json_to_version_vector(json) {
13296
13388
  const _bind$2 = zxch3n$flock$flock$$bytes_from_hex({ str: peer_hex, start: 0, end: peer_hex.length });
13297
13389
  let bytes;
13298
13390
  if (_bind$2 === undefined) {
13299
- bytes = moonbitlang$core$abort$$abort$3$("invalid peer id in version vector");
13391
+ bytes = moonbitlang$core$abort$$abort$2$("invalid peer id in version vector");
13300
13392
  } else {
13301
13393
  const _Some = _bind$2;
13302
13394
  bytes = _Some;
@@ -13319,23 +13411,23 @@ function zxch3n$flock$flock$$json_to_version_vector(json) {
13319
13411
  }
13320
13412
  break _L;
13321
13413
  }
13322
- moonbitlang$core$abort$$abort$4$("version vector entry must be [physical_time, logical_counter]");
13414
+ moonbitlang$core$abort$$abort$3$("version vector entry must be [physical_time, logical_counter]");
13323
13415
  }
13324
13416
  return 1;
13325
13417
  });
13326
13418
  return vv;
13327
13419
  } else {
13328
- return moonbitlang$core$abort$$abort$5$("version vector must be an object");
13420
+ return moonbitlang$core$abort$$abort$4$("version vector must be an object");
13329
13421
  }
13330
13422
  }
13331
- function zxch3n$flock$flock$$Flock$export_json_ffi(self, from) {
13423
+ function zxch3n$flock$flock$$Flock$export_json_ffi(self, from, prune_tombstones_before) {
13332
13424
  let _try_err;
13333
13425
  _L: {
13334
13426
  let export_from;
13335
13427
  if (zxch3n$flock$flock$$any_is_undefined(from) || zxch3n$flock$flock$$any_is_null(from)) {
13336
13428
  export_from = undefined;
13337
13429
  } else {
13338
- const _bind = Yoorkin$jmop$$Any$unwrap_value(from, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:75:32-75:51");
13430
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(from, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:82:32-82:51");
13339
13431
  let _tmp;
13340
13432
  if (_bind.$tag === 1) {
13341
13433
  const _ok = _bind;
@@ -13349,13 +13441,41 @@ function zxch3n$flock$flock$$Flock$export_json_ffi(self, from) {
13349
13441
  const json = zxch3n$flock$flock$$value_to_json(_tmp);
13350
13442
  export_from = zxch3n$flock$flock$$json_to_version_vector(json);
13351
13443
  }
13444
+ let prune_before;
13445
+ if (zxch3n$flock$flock$$any_is_undefined(prune_tombstones_before) || zxch3n$flock$flock$$any_is_null(prune_tombstones_before)) {
13446
+ prune_before = Option$None$8$;
13447
+ } else {
13448
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(prune_tombstones_before, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:89:12-89:50");
13449
+ let _tmp;
13450
+ if (_bind.$tag === 1) {
13451
+ const _ok = _bind;
13452
+ _tmp = _ok._0;
13453
+ } else {
13454
+ const _err = _bind;
13455
+ const _tmp$2 = _err._0;
13456
+ _try_err = _tmp$2;
13457
+ break _L;
13458
+ }
13459
+ const _bind$2 = Yoorkin$jmop$$Value$to_number(_tmp, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:89:12-89:62");
13460
+ let _tmp$2;
13461
+ if (_bind$2.$tag === 1) {
13462
+ const _ok = _bind$2;
13463
+ _tmp$2 = _ok._0;
13464
+ } else {
13465
+ const _err = _bind$2;
13466
+ const _tmp$3 = _err._0;
13467
+ _try_err = _tmp$3;
13468
+ break _L;
13469
+ }
13470
+ prune_before = new Option$Some$8$(_tmp$2);
13471
+ }
13352
13472
  let exported;
13353
13473
  if (export_from === undefined) {
13354
- exported = zxch3n$flock$flock$$Flock$export_json(self, undefined);
13474
+ exported = zxch3n$flock$flock$$Flock$export_json$46$inner(self, undefined, prune_before);
13355
13475
  } else {
13356
13476
  const _Some = export_from;
13357
13477
  const _vv = _Some;
13358
- exported = zxch3n$flock$flock$$Flock$export_json(self, _vv);
13478
+ exported = zxch3n$flock$flock$$Flock$export_json$46$inner(self, _vv, prune_before);
13359
13479
  }
13360
13480
  const _p = zxch3n$flock$flock$$json_to_value(exported);
13361
13481
  return _p;
@@ -13366,7 +13486,7 @@ function zxch3n$flock$flock$$Flock$import_json_ffi(self, json) {
13366
13486
  let _try_err;
13367
13487
  _L: {
13368
13488
  if (!(zxch3n$flock$flock$$any_is_undefined(json) || zxch3n$flock$flock$$any_is_null(json))) {
13369
- const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:92:32-92:51");
13489
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:109:32-109:51");
13370
13490
  let _tmp;
13371
13491
  if (_bind.$tag === 1) {
13372
13492
  const _ok = _bind;
@@ -13382,7 +13502,7 @@ function zxch3n$flock$flock$$Flock$import_json_ffi(self, json) {
13382
13502
  let _try_err$2;
13383
13503
  _L$2: {
13384
13504
  _L$3: {
13385
- const _bind$2 = zxch3n$flock$flock$$Flock$import_json(self, parsed, Option$None$41$);
13505
+ const _bind$2 = zxch3n$flock$flock$$Flock$import_json(self, parsed, Option$None$40$);
13386
13506
  if (_bind$2.$tag === 1) {
13387
13507
  const _ok = _bind$2;
13388
13508
  report = _ok._0;
@@ -13414,7 +13534,7 @@ function zxch3n$flock$flock$$Flock$import_json_ffi(self, json) {
13414
13534
  }
13415
13535
  }
13416
13536
  const report_obj = moonbitlang$core$builtin$$Map$new$46$inner$37$(8);
13417
- moonbitlang$core$builtin$$Map$set$37$(report_obj, "accepted", moonbitlang$core$builtin$$ToJson$to_json$13$(report.accepted));
13537
+ moonbitlang$core$builtin$$Map$set$37$(report_obj, "accepted", moonbitlang$core$builtin$$ToJson$to_json$12$(report.accepted));
13418
13538
  moonbitlang$core$builtin$$Map$set$37$(report_obj, "skipped", moonbitlang$core$builtin$$ToJson$to_json$32$(skipped_rows));
13419
13539
  const _p = zxch3n$flock$flock$$json_to_value(moonbitlang$core$builtin$$ToJson$to_json$33$(report_obj));
13420
13540
  return _p;
@@ -13428,7 +13548,7 @@ function zxch3n$flock$flock$$version_vector_to_json(vv) {
13428
13548
  const result = moonbitlang$core$builtin$$Map$new$46$inner$37$(8);
13429
13549
  const _bind = moonbitlang$core$builtin$$Map$iter2$71$(vv);
13430
13550
  _bind((peer, clock) => {
13431
- const entry = [moonbitlang$core$builtin$$ToJson$to_json$24$(clock.physical_time), moonbitlang$core$builtin$$ToJson$to_json$13$(clock.logical_counter)];
13551
+ const entry = [moonbitlang$core$builtin$$ToJson$to_json$24$(clock.physical_time), moonbitlang$core$builtin$$ToJson$to_json$12$(clock.logical_counter)];
13432
13552
  moonbitlang$core$builtin$$Map$set$37$(result, zxch3n$flock$flock$$bytes_to_hex(peer), moonbitlang$core$builtin$$ToJson$to_json$32$(entry));
13433
13553
  return 1;
13434
13554
  });
@@ -13445,7 +13565,7 @@ function zxch3n$flock$flock$$peer_id_to_hex(peer) {
13445
13565
  function zxch3n$flock$flock$$hex_to_peer_id(hex) {
13446
13566
  const _bind = zxch3n$flock$flock$$bytes_from_hex({ str: hex, start: 0, end: hex.length });
13447
13567
  if (_bind === undefined) {
13448
- return moonbitlang$core$abort$$abort$7$("invalid peer id hex");
13568
+ return moonbitlang$core$abort$$abort$6$("invalid peer id hex");
13449
13569
  } else {
13450
13570
  const _Some = _bind;
13451
13571
  const _bytes = _Some;
@@ -13474,7 +13594,7 @@ function zxch3n$flock$flock$$bound_from_json(json) {
13474
13594
  }
13475
13595
  break _L;
13476
13596
  }
13477
- kind = moonbitlang$core$abort$$abort$8$("bound.kind must be a string");
13597
+ kind = moonbitlang$core$abort$$abort$7$("bound.kind must be a string");
13478
13598
  }
13479
13599
  let key;
13480
13600
  _L$2: {
@@ -13495,11 +13615,11 @@ function zxch3n$flock$flock$$bound_from_json(json) {
13495
13615
  }
13496
13616
  break _L$2;
13497
13617
  }
13498
- key = moonbitlang$core$abort$$abort$9$("bound.key must be an array");
13618
+ key = moonbitlang$core$abort$$abort$8$("bound.key must be an array");
13499
13619
  }
13500
- return kind === "inclusive" ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$30$(key) : kind === "exclusive" ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$(key) : kind === "unbounded" ? $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$ : moonbitlang$core$abort$$abort$10$("unexpected bound.kind");
13620
+ return kind === "inclusive" ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$29$(key) : kind === "exclusive" ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$29$(key) : kind === "unbounded" ? $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$ : moonbitlang$core$abort$$abort$9$("unexpected bound.kind");
13501
13621
  } else {
13502
- return moonbitlang$core$abort$$abort$10$("bound must be an object");
13622
+ return moonbitlang$core$abort$$abort$9$("bound must be an object");
13503
13623
  }
13504
13624
  }
13505
13625
  function zxch3n$flock$flock$$check_consistency_ffi(a, b) {
@@ -13511,7 +13631,7 @@ function zxch3n$flock$flock$$Flock$check_invariants_ffi(self) {
13511
13631
  function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13512
13632
  let _try_err;
13513
13633
  _L: {
13514
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:207:21-207:39");
13634
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:224:21-224:39");
13515
13635
  let key_value;
13516
13636
  if (_bind.$tag === 1) {
13517
13637
  const _ok = _bind;
@@ -13522,7 +13642,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13522
13642
  _try_err = _tmp;
13523
13643
  break _L;
13524
13644
  }
13525
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:208:40-208:60");
13645
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:225:40-225:60");
13526
13646
  let key_arr;
13527
13647
  if (_bind$2.$tag === 1) {
13528
13648
  const _ok = _bind$2;
@@ -13548,7 +13668,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13548
13668
  }
13549
13669
  }
13550
13670
  const key_json = _p;
13551
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:210:36-210:56");
13671
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:227:36-227:56");
13552
13672
  let _tmp$2;
13553
13673
  if (_bind$3.$tag === 1) {
13554
13674
  const _ok = _bind$3;
@@ -13564,7 +13684,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13564
13684
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13565
13685
  now_value = Option$None$8$;
13566
13686
  } else {
13567
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:214:12-214:30");
13687
+ const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:231:12-231:30");
13568
13688
  let _tmp$3;
13569
13689
  if (_bind$4.$tag === 1) {
13570
13690
  const _ok = _bind$4;
@@ -13575,7 +13695,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13575
13695
  _try_err = _tmp$4;
13576
13696
  break _L;
13577
13697
  }
13578
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:214:12-214:42");
13698
+ const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:231:12-231:42");
13579
13699
  let _tmp$4;
13580
13700
  if (_bind$5.$tag === 1) {
13581
13701
  const _ok = _bind$5;
@@ -13605,7 +13725,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13605
13725
  function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata, now) {
13606
13726
  let _try_err;
13607
13727
  _L: {
13608
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:229:21-229:39");
13728
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:246:21-246:39");
13609
13729
  let key_value;
13610
13730
  if (_bind.$tag === 1) {
13611
13731
  const _ok = _bind;
@@ -13616,7 +13736,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13616
13736
  _try_err = _tmp;
13617
13737
  break _L;
13618
13738
  }
13619
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:230:40-230:60");
13739
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:247:40-247:60");
13620
13740
  let key_arr;
13621
13741
  if (_bind$2.$tag === 1) {
13622
13742
  const _ok = _bind$2;
@@ -13642,7 +13762,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13642
13762
  }
13643
13763
  }
13644
13764
  const key_json = _p;
13645
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:232:36-232:56");
13765
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:249:36-249:56");
13646
13766
  let _tmp$2;
13647
13767
  if (_bind$3.$tag === 1) {
13648
13768
  const _ok = _bind$3;
@@ -13658,7 +13778,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13658
13778
  if (zxch3n$flock$flock$$any_is_undefined(metadata) || zxch3n$flock$flock$$any_is_null(metadata)) {
13659
13779
  metadata_value = undefined;
13660
13780
  } else {
13661
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(metadata, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:236:41-236:64");
13781
+ const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(metadata, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:253:41-253:64");
13662
13782
  let _tmp$3;
13663
13783
  if (_bind$4.$tag === 1) {
13664
13784
  const _ok = _bind$4;
@@ -13676,7 +13796,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13676
13796
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13677
13797
  now_value = Option$None$8$;
13678
13798
  } else {
13679
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:242:12-242:30");
13799
+ const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:259:12-259:30");
13680
13800
  let _tmp$3;
13681
13801
  if (_bind$4.$tag === 1) {
13682
13802
  const _ok = _bind$4;
@@ -13687,7 +13807,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13687
13807
  _try_err = _tmp$4;
13688
13808
  break _L;
13689
13809
  }
13690
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:242:12-242:42");
13810
+ const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:259:12-259:42");
13691
13811
  let _tmp$4;
13692
13812
  if (_bind$5.$tag === 1) {
13693
13813
  const _ok = _bind$5;
@@ -13701,7 +13821,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13701
13821
  now_value = new Option$Some$8$(_tmp$4);
13702
13822
  }
13703
13823
  if (metadata_value === undefined) {
13704
- const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, Option$None$34$, now_value, Option$None$35$);
13824
+ const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, Option$None$33$, now_value, Option$None$34$);
13705
13825
  if (_bind$4.$tag === 1) {
13706
13826
  const _ok = _bind$4;
13707
13827
  _ok._0;
@@ -13715,7 +13835,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13715
13835
  } else {
13716
13836
  const _Some = metadata_value;
13717
13837
  const _meta = _Some;
13718
- const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, new Option$Some$34$(_meta), now_value, Option$None$35$);
13838
+ const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, new Option$Some$33$(_meta), now_value, Option$None$34$);
13719
13839
  if (_bind$4.$tag === 1) {
13720
13840
  const _ok = _bind$4;
13721
13841
  _ok._0;
@@ -13733,7 +13853,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13733
13853
  function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13734
13854
  let _try_err;
13735
13855
  _L: {
13736
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:260:21-260:39");
13856
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:281:21-281:39");
13737
13857
  let key_value;
13738
13858
  if (_bind.$tag === 1) {
13739
13859
  const _ok = _bind;
@@ -13744,7 +13864,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13744
13864
  _try_err = _tmp;
13745
13865
  break _L;
13746
13866
  }
13747
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:261:40-261:60");
13867
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:282:40-282:60");
13748
13868
  let key_arr;
13749
13869
  if (_bind$2.$tag === 1) {
13750
13870
  const _ok = _bind$2;
@@ -13774,7 +13894,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13774
13894
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13775
13895
  now_value = Option$None$8$;
13776
13896
  } else {
13777
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:266:12-266:30");
13897
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:287:12-287:30");
13778
13898
  let _tmp$2;
13779
13899
  if (_bind$3.$tag === 1) {
13780
13900
  const _ok = _bind$3;
@@ -13785,7 +13905,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13785
13905
  _try_err = _tmp$3;
13786
13906
  break _L;
13787
13907
  }
13788
- const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:266:12-266:42");
13908
+ const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:287:12-287:42");
13789
13909
  let _tmp$3;
13790
13910
  if (_bind$4.$tag === 1) {
13791
13911
  const _ok = _bind$4;
@@ -13825,10 +13945,10 @@ function zxch3n$flock$flock$$Flock$kv_to_json_ffi(self) {
13825
13945
  return _p;
13826
13946
  }
13827
13947
  function zxch3n$flock$flock$$FlockDigest$copy(self) {
13828
- return { bytes: moonbitlang$core$array$$FixedArray$copy$12$(self.bytes) };
13948
+ return { bytes: moonbitlang$core$array$$FixedArray$copy$13$(self.bytes) };
13829
13949
  }
13830
13950
  function zxch3n$flock$flock$$FlockDigest$xor(self, digest) {
13831
- const bytes = moonbitlang$core$array$$FixedArray$copy$12$(self.bytes);
13951
+ const bytes = moonbitlang$core$array$$FixedArray$copy$13$(self.bytes);
13832
13952
  const digest_bytes = digest.bytes;
13833
13953
  let _tmp = 0;
13834
13954
  while (true) {
@@ -13850,7 +13970,7 @@ function zxch3n$flock$flock$$FlockDigest$xor(self, digest) {
13850
13970
  }
13851
13971
  function zxch3n$flock$flock$$Flock$recompute_full_digest(self) {
13852
13972
  const sum = { val: zxch3n$flock$flock$$FlockDigest$zero() };
13853
- let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$45$;
13973
+ let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$44$;
13854
13974
  const _bind = zxch3n$flock$sorted_map$$SortedMap$iter2$74$(self.kv);
13855
13975
  _bind((__, entry) => {
13856
13976
  const _bind$2 = entry.value.data;
@@ -13951,7 +14071,7 @@ function zxch3n$flock$flock$$Flock$digest_hex_ffi(self) {
13951
14071
  function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
13952
14072
  let _try_err;
13953
14073
  _L: {
13954
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:300:21-300:39");
14074
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:321:21-321:39");
13955
14075
  let key_value;
13956
14076
  if (_bind.$tag === 1) {
13957
14077
  const _ok = _bind;
@@ -13962,7 +14082,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
13962
14082
  _try_err = _tmp;
13963
14083
  break _L;
13964
14084
  }
13965
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:301:40-301:60");
14085
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:322:40-322:60");
13966
14086
  let key_arr;
13967
14087
  if (_bind$2.$tag === 1) {
13968
14088
  const _ok = _bind$2;
@@ -13988,7 +14108,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
13988
14108
  }
13989
14109
  }
13990
14110
  const key_json = _p;
13991
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:303:36-303:56");
14111
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:324:36-324:56");
13992
14112
  let _tmp$2;
13993
14113
  if (_bind$3.$tag === 1) {
13994
14114
  const _ok = _bind$3;
@@ -14004,7 +14124,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14004
14124
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
14005
14125
  now_value = Option$None$8$;
14006
14126
  } else {
14007
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:307:12-307:30");
14127
+ const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:328:12-328:30");
14008
14128
  let _tmp$3;
14009
14129
  if (_bind$4.$tag === 1) {
14010
14130
  const _ok = _bind$4;
@@ -14015,7 +14135,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14015
14135
  _try_err = _tmp$4;
14016
14136
  break _L;
14017
14137
  }
14018
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:307:12-307:42");
14138
+ const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:328:12-328:42");
14019
14139
  let _tmp$4;
14020
14140
  if (_bind$5.$tag === 1) {
14021
14141
  const _ok = _bind$5;
@@ -14045,7 +14165,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14045
14165
  function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14046
14166
  let _try_err;
14047
14167
  _L: {
14048
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:316:21-316:39");
14168
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:337:21-337:39");
14049
14169
  let key_value;
14050
14170
  if (_bind.$tag === 1) {
14051
14171
  const _ok = _bind;
@@ -14056,7 +14176,7 @@ function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14056
14176
  _try_err = _tmp;
14057
14177
  break _L;
14058
14178
  }
14059
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:317:40-317:60");
14179
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:338:40-338:60");
14060
14180
  let key_arr;
14061
14181
  if (_bind$2.$tag === 1) {
14062
14182
  const _ok = _bind$2;
@@ -14091,7 +14211,7 @@ function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14091
14211
  function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14092
14212
  let _try_err;
14093
14213
  _L: {
14094
- const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:327:22-327:41");
14214
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:348:22-348:41");
14095
14215
  let json_value;
14096
14216
  if (_bind.$tag === 1) {
14097
14217
  const _ok = _bind;
@@ -14103,7 +14223,7 @@ function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14103
14223
  break _L;
14104
14224
  }
14105
14225
  const parsed = zxch3n$flock$flock$$value_to_json(json_value);
14106
- const _bind$2 = Yoorkin$jmop$$Any$unwrap_value(peer_id, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:329:22-329:44");
14226
+ const _bind$2 = Yoorkin$jmop$$Any$unwrap_value(peer_id, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:350:22-350:44");
14107
14227
  let peer_value;
14108
14228
  if (_bind$2.$tag === 1) {
14109
14229
  const _ok = _bind$2;
@@ -14114,7 +14234,7 @@ function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14114
14234
  _try_err = _tmp;
14115
14235
  break _L;
14116
14236
  }
14117
- const _bind$3 = Yoorkin$jmop$$Value$to_string(peer_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:330:20-330:42");
14237
+ const _bind$3 = Yoorkin$jmop$$Value$to_string(peer_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:351:20-351:42");
14118
14238
  let peer_hex;
14119
14239
  if (_bind$3.$tag === 1) {
14120
14240
  const _ok = _bind$3;
@@ -14143,9 +14263,9 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14143
14263
  _L: {
14144
14264
  let start_bound;
14145
14265
  if (zxch3n$flock$flock$$any_is_undefined(start) || zxch3n$flock$flock$$any_is_null(start)) {
14146
- start_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
14266
+ start_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
14147
14267
  } else {
14148
- const _bind = Yoorkin$jmop$$Any$unwrap_value(start, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:346:25-346:45");
14268
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(start, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:367:25-367:45");
14149
14269
  let start_value;
14150
14270
  if (_bind.$tag === 1) {
14151
14271
  const _ok = _bind;
@@ -14160,9 +14280,9 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14160
14280
  }
14161
14281
  let end_bound;
14162
14282
  if (zxch3n$flock$flock$$any_is_undefined(end) || zxch3n$flock$flock$$any_is_null(end)) {
14163
- end_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
14283
+ end_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
14164
14284
  } else {
14165
- const _bind = Yoorkin$jmop$$Any$unwrap_value(end, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:352:23-352:41");
14285
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(end, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:373:23-373:41");
14166
14286
  let end_value;
14167
14287
  if (_bind.$tag === 1) {
14168
14288
  const _ok = _bind;
@@ -14177,9 +14297,9 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14177
14297
  }
14178
14298
  let prefix_filter;
14179
14299
  if (zxch3n$flock$flock$$any_is_undefined(prefix) || zxch3n$flock$flock$$any_is_null(prefix)) {
14180
- prefix_filter = Option$None$30$;
14300
+ prefix_filter = Option$None$29$;
14181
14301
  } else {
14182
- const _bind = Yoorkin$jmop$$Any$unwrap_value(prefix, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:358:26-358:47");
14302
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(prefix, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:379:26-379:47");
14183
14303
  let prefix_value;
14184
14304
  if (_bind.$tag === 1) {
14185
14305
  const _ok = _bind;
@@ -14190,7 +14310,7 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14190
14310
  _try_err = _tmp;
14191
14311
  break _L;
14192
14312
  }
14193
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(prefix_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:359:45-359:68");
14313
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(prefix_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:380:45-380:68");
14194
14314
  let prefix_arr;
14195
14315
  if (_bind$2.$tag === 1) {
14196
14316
  const _ok = _bind$2;
@@ -14215,16 +14335,16 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14215
14335
  break;
14216
14336
  }
14217
14337
  }
14218
- prefix_filter = new Option$Some$30$(_p);
14338
+ prefix_filter = new Option$Some$29$(_p);
14219
14339
  }
14220
14340
  const rows = moonbitlang$core$array$$Array$new$46$inner$14$(0);
14221
14341
  let scan_iter;
14222
14342
  if (prefix_filter.$tag === 1) {
14223
14343
  const _Some = prefix_filter;
14224
14344
  const _prefix_value = _Some._0;
14225
- scan_iter = zxch3n$flock$flock$$Flock$scan$46$inner(self, start_bound, end_bound, new Option$Some$30$(_prefix_value));
14345
+ scan_iter = zxch3n$flock$flock$$Flock$scan$46$inner(self, start_bound, end_bound, new Option$Some$29$(_prefix_value));
14226
14346
  } else {
14227
- scan_iter = zxch3n$flock$flock$$Flock$scan$46$inner(self, start_bound, end_bound, Option$None$30$);
14347
+ scan_iter = zxch3n$flock$flock$$Flock$scan$46$inner(self, start_bound, end_bound, Option$None$29$);
14228
14348
  }
14229
14349
  moonbitlang$core$builtin$$Iter2$run$73$(scan_iter, (key, entry) => {
14230
14350
  const obj = moonbitlang$core$builtin$$Map$new$46$inner$37$(8);
@@ -14286,7 +14406,7 @@ function zxch3n$flock$flock$$raw_value_payload_to_json(value) {
14286
14406
  function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
14287
14407
  let _try_err;
14288
14408
  _L: {
14289
- const _bind = Yoorkin$jmop$$Any$unwrap_value(listener, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:408:26-408:49");
14409
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(listener, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:429:26-429:49");
14290
14410
  let listener_value;
14291
14411
  if (_bind.$tag === 1) {
14292
14412
  const _ok = _bind;
@@ -14350,4 +14470,4 @@ function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
14350
14470
  }
14351
14471
  return $panic();
14352
14472
  }
14353
- export { zxch3n$flock$flock$$Flock$set_peer_id as set_peer_id, zxch3n$flock$flock$$Flock$version as version, zxch3n$flock$flock$$Flock$export_json as export_json, zxch3n$flock$flock$$Flock$import_json as import_json, zxch3n$flock$flock$$Flock$merge as merge, zxch3n$flock$flock$$Flock$from_json as from_json, zxch3n$flock$flock$$Flock$newFlock as newFlock, zxch3n$flock$flock$$Flock$put_ffi as put_ffi, zxch3n$flock$flock$$Flock$get_ffi as get_ffi, zxch3n$flock$flock$$Flock$export_json_ffi as export_json_ffi, zxch3n$flock$flock$$Flock$import_json_ffi as import_json_ffi, zxch3n$flock$flock$$Flock$version_ffi as version_ffi, zxch3n$flock$flock$$check_consistency_ffi as check_consistency_ffi, zxch3n$flock$flock$$Flock$check_invariants_ffi as check_invariants_ffi, zxch3n$flock$flock$$Flock$put_json_ffi as put_json_ffi, zxch3n$flock$flock$$Flock$put_with_meta_ffi as put_with_meta_ffi, zxch3n$flock$flock$$Flock$delete_ffi as delete_ffi, zxch3n$flock$flock$$Flock$get_max_physical_time_ffi as get_max_physical_time_ffi, zxch3n$flock$flock$$Flock$peer_id_ffi as peer_id_ffi, zxch3n$flock$flock$$Flock$kv_to_json_ffi as kv_to_json_ffi, zxch3n$flock$flock$$Flock$digest_hex_ffi as digest_hex_ffi, zxch3n$flock$flock$$Flock$put_mvr_ffi as put_mvr_ffi, zxch3n$flock$flock$$Flock$get_mvr_ffi as get_mvr_ffi, zxch3n$flock$flock$$from_json_ffi as from_json_ffi, zxch3n$flock$flock$$Flock$scan_ffi as scan_ffi, zxch3n$flock$flock$$Flock$subscribe_ffi as subscribe_ffi }
14473
+ export { moonbitlang$core$builtin$$get_int64_wasm_helper as _int64_helper_for_test, zxch3n$flock$flock$$Flock$set_peer_id as set_peer_id, zxch3n$flock$flock$$Flock$version as version, zxch3n$flock$flock$$Flock$export_json as export_json, zxch3n$flock$flock$$Flock$import_json as import_json, zxch3n$flock$flock$$Flock$merge as merge, zxch3n$flock$flock$$Flock$from_json as from_json, zxch3n$flock$flock$$Flock$newFlock as newFlock, zxch3n$flock$flock$$Flock$put_ffi as put_ffi, zxch3n$flock$flock$$Flock$get_ffi as get_ffi, zxch3n$flock$flock$$Flock$export_json_ffi as export_json_ffi, zxch3n$flock$flock$$Flock$import_json_ffi as import_json_ffi, zxch3n$flock$flock$$Flock$version_ffi as version_ffi, zxch3n$flock$flock$$check_consistency_ffi as check_consistency_ffi, zxch3n$flock$flock$$Flock$check_invariants_ffi as check_invariants_ffi, zxch3n$flock$flock$$Flock$put_json_ffi as put_json_ffi, zxch3n$flock$flock$$Flock$put_with_meta_ffi as put_with_meta_ffi, zxch3n$flock$flock$$Flock$delete_ffi as delete_ffi, zxch3n$flock$flock$$Flock$get_max_physical_time_ffi as get_max_physical_time_ffi, zxch3n$flock$flock$$Flock$peer_id_ffi as peer_id_ffi, zxch3n$flock$flock$$Flock$kv_to_json_ffi as kv_to_json_ffi, zxch3n$flock$flock$$Flock$digest_hex_ffi as digest_hex_ffi, zxch3n$flock$flock$$Flock$put_mvr_ffi as put_mvr_ffi, zxch3n$flock$flock$$Flock$get_mvr_ffi as get_mvr_ffi, zxch3n$flock$flock$$from_json_ffi as from_json_ffi, zxch3n$flock$flock$$Flock$scan_ffi as scan_ffi, zxch3n$flock$flock$$Flock$subscribe_ffi as subscribe_ffi }