@loro-dev/flock 2.0.1 → 2.1.1

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.
@@ -443,7 +443,62 @@ function Result$Ok$16$(param0) {
443
443
  Result$Ok$16$.prototype.$tag = 1;
444
444
  const moonbitlang$core$builtin$$get_int64_wasm_helper = function f() {
445
445
  if (f._exports) return f._exports;
446
- 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;
447
502
  };
448
503
  const moonbitlang$core$builtin$$MyInt64$compare = (a, b) => {
449
504
  const ahi = a.hi;
@@ -948,11 +1003,11 @@ const zxch3n$expect$$yellow$46$constr$47$2572 = 3;
948
1003
  const zxch3n$expect$$blue$46$constr$47$2574 = 4;
949
1004
  const zxch3n$flock$sorted_map$$range$46$tuple$47$2971 = { _0: true, _1: true };
950
1005
  const zxch3n$flock$sorted_map$$range$46$tuple$47$2972 = { _0: true, _1: true };
951
- const zxch3n$flock$flock$$from_string$46$42$bind$124$593 = ",";
1006
+ const zxch3n$flock$flock$$from_string$46$42$bind$124$598 = ",";
952
1007
  const zxch3n$flock$flock$$zero$46$record$47$3050 = { physical_time: 0, logical_counter: 0 };
953
1008
  const zxch3n$flock$flock$$new$46$42$bind$47$3233 = { physical_time: 0, logical_counter: 0 };
954
- const zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3475 = new Source$Import("import_json");
955
- const zxch3n$flock$flock$$newFlock$46$42$bind$47$3584 = { 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 };
956
1011
  (() => {
957
1012
  Yoorkin$jmop$$ffi_init(Yoorkin$jmop$$convert_thrown_error);
958
1013
  })();
@@ -969,10 +1024,10 @@ function moonbitlang$core$abort$$abort$2$(msg) {
969
1024
  return $panic();
970
1025
  }
971
1026
  function moonbitlang$core$abort$$abort$3$(msg) {
972
- return $panic();
1027
+ $panic();
973
1028
  }
974
1029
  function moonbitlang$core$abort$$abort$4$(msg) {
975
- $panic();
1030
+ return $panic();
976
1031
  }
977
1032
  function moonbitlang$core$abort$$abort$5$(msg) {
978
1033
  return $panic();
@@ -1016,7 +1071,7 @@ function moonbitlang$core$abort$$abort$17$(msg) {
1016
1071
  function moonbitlang$core$abort$$abort$18$(msg) {
1017
1072
  return $panic();
1018
1073
  }
1019
- function moonbitlang$core$string$$ToStringView$to_string_view$8$(self) {
1074
+ function moonbitlang$core$string$$ToStringView$to_string_view$7$(self) {
1020
1075
  return { str: self, start: 0, end: self.length };
1021
1076
  }
1022
1077
  function moonbitlang$core$uint$$UInt$to_int64(self) {
@@ -1032,7 +1087,7 @@ function moonbitlang$core$bytes$$BytesView$at(self, index) {
1032
1087
  $bound_check(_tmp, _tmp$2);
1033
1088
  return _tmp[_tmp$2];
1034
1089
  } else {
1035
- 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$14$(`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)}`);
1036
1091
  }
1037
1092
  }
1038
1093
  function moonbitlang$core$bytes$$Bytes$sub$46$inner(self, start, end) {
@@ -1101,13 +1156,13 @@ function moonbitlang$core$bytes$$BytesView$iterator(self) {
1101
1156
  return _p;
1102
1157
  }
1103
1158
  function moonbitlang$core$bytes$$Bytes$from_array(arr) {
1104
- 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$14$(arr, i));
1105
1160
  }
1106
1161
  function moonbitlang$core$bytes$$Bytes$from_iter(iter) {
1107
- const _bind = moonbitlang$core$builtin$$Iter$collect$12$(iter);
1162
+ const _bind = moonbitlang$core$builtin$$Iter$collect$14$(iter);
1108
1163
  return moonbitlang$core$bytes$$Bytes$from_array({ buf: _bind, start: 0, end: _bind.length });
1109
1164
  }
1110
- function moonbitlang$core$builtin$$Hash$hash_combine$3$(self, hasher) {
1165
+ function moonbitlang$core$builtin$$Hash$hash_combine$2$(self, hasher) {
1111
1166
  moonbitlang$core$builtin$$Hasher$combine$11$(hasher, moonbitlang$core$bytes$$Bytes$sub$46$inner(self, 0, self.length));
1112
1167
  }
1113
1168
  function moonbitlang$core$env$$now() {
@@ -1136,7 +1191,7 @@ function moonbitlang$core$builtin$$Mod$mod$21$(self, other) {
1136
1191
  }
1137
1192
  function moonbitlang$core$builtin$$Shr$shr$21$(self, n) {
1138
1193
  if (n < 0) {
1139
- moonbitlang$core$abort$$abort$4$("negative shift count");
1194
+ moonbitlang$core$abort$$abort$3$("negative shift count");
1140
1195
  }
1141
1196
  return moonbitlang$core$bigint$$BigInt$js_shr(self, n);
1142
1197
  }
@@ -1420,7 +1475,7 @@ function moonbitlang$core$strconv$$check_and_consume_base(view, base) {
1420
1475
  function moonbitlang$core$strconv$$range_err$22$() {
1421
1476
  return new Result$Err$1$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$range_err_str));
1422
1477
  }
1423
- function moonbitlang$core$strconv$$range_err$4$() {
1478
+ function moonbitlang$core$strconv$$range_err$3$() {
1424
1479
  return new Result$Err$2$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$range_err_str));
1425
1480
  }
1426
1481
  function moonbitlang$core$strconv$$syntax_err$13$() {
@@ -1435,7 +1490,7 @@ function moonbitlang$core$strconv$$syntax_err$24$() {
1435
1490
  function moonbitlang$core$strconv$$syntax_err$25$() {
1436
1491
  return new Result$Err$5$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
1437
1492
  }
1438
- function moonbitlang$core$strconv$$syntax_err$16$() {
1493
+ function moonbitlang$core$strconv$$syntax_err$15$() {
1439
1494
  return new Result$Err$6$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
1440
1495
  }
1441
1496
  function moonbitlang$core$strconv$$syntax_err$26$() {
@@ -1445,7 +1500,7 @@ function moonbitlang$core$strconv$$overflow_threshold(base, neg) {
1445
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));
1446
1501
  }
1447
1502
  function moonbitlang$core$strconv$$parse_int64$46$inner(str, base) {
1448
- 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 })) {
1449
1504
  let _bind;
1450
1505
  let rest;
1451
1506
  _L: {
@@ -2123,7 +2178,7 @@ function moonbitlang$core$strconv$$parse_decimal_from_view(str) {
2123
2178
  _tmp = _x$2;
2124
2179
  continue;
2125
2180
  } else {
2126
- const _bind$2 = moonbitlang$core$strconv$$syntax_err$16$();
2181
+ const _bind$2 = moonbitlang$core$strconv$$syntax_err$15$();
2127
2182
  if (_bind$2.$tag === 1) {
2128
2183
  const _ok = _bind$2;
2129
2184
  rest$2 = _ok._0;
@@ -2329,7 +2384,7 @@ function moonbitlang$core$strconv$$parse_decimal_from_view(str) {
2329
2384
  }
2330
2385
  break _L$4;
2331
2386
  }
2332
- const _bind = moonbitlang$core$strconv$$syntax_err$16$();
2387
+ const _bind = moonbitlang$core$strconv$$syntax_err$15$();
2333
2388
  if (_bind.$tag === 1) {
2334
2389
  const _ok = _bind;
2335
2390
  rest$3 = _ok._0;
@@ -3935,7 +3990,7 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
3935
3990
  return new Result$Ok$4$(moonbitlang$core$int64$$Int64$reinterpret_as_double(bits));
3936
3991
  }
3937
3992
  if (self.decimal_point > 310) {
3938
- const _bind = moonbitlang$core$strconv$$range_err$4$();
3993
+ const _bind = moonbitlang$core$strconv$$range_err$3$();
3939
3994
  if (_bind.$tag === 1) {
3940
3995
  const _ok = _bind;
3941
3996
  _ok._0;
@@ -3998,7 +4053,7 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
3998
4053
  exponent = exponent + n | 0;
3999
4054
  }
4000
4055
  if ((exponent - moonbitlang$core$strconv$$double_info.bias | 0) >= ((1 << moonbitlang$core$strconv$$double_info.exponent_bits) - 1 | 0)) {
4001
- const _bind = moonbitlang$core$strconv$$range_err$4$();
4056
+ const _bind = moonbitlang$core$strconv$$range_err$3$();
4002
4057
  if (_bind.$tag === 1) {
4003
4058
  const _ok = _bind;
4004
4059
  _ok._0;
@@ -4012,7 +4067,7 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
4012
4067
  mantissa = moonbitlang$core$builtin$$Shr$shr$22$(mantissa, 1);
4013
4068
  exponent = exponent + 1 | 0;
4014
4069
  if ((exponent - moonbitlang$core$strconv$$double_info.bias | 0) >= ((1 << moonbitlang$core$strconv$$double_info.exponent_bits) - 1 | 0)) {
4015
- const _bind = moonbitlang$core$strconv$$range_err$4$();
4070
+ const _bind = moonbitlang$core$strconv$$range_err$3$();
4016
4071
  if (_bind.$tag === 1) {
4017
4072
  const _ok = _bind;
4018
4073
  _ok._0;
@@ -4149,13 +4204,13 @@ function moonbitlang$core$json$$offset_to_position(input, offset) {
4149
4204
  }
4150
4205
  return { line: line, column: column };
4151
4206
  }
4152
- function moonbitlang$core$json$$ParseContext$invalid_char$46$inner$14$(ctx, shift) {
4207
+ function moonbitlang$core$json$$ParseContext$invalid_char$46$inner$12$(ctx, shift) {
4153
4208
  const offset = ctx.offset + shift | 0;
4154
4209
  const _p = moonbitlang$core$string$$StringView$get_char(ctx.input, offset);
4155
4210
  const _p$2 = 65533;
4156
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));
4157
4212
  }
4158
- 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) {
4159
4214
  const offset = ctx.offset + shift | 0;
4160
4215
  const _p = moonbitlang$core$string$$StringView$get_char(ctx.input, offset);
4161
4216
  const _p$2 = 65533;
@@ -4173,7 +4228,7 @@ function moonbitlang$core$json$$ParseContext$invalid_char$46$inner$30$(ctx, shif
4173
4228
  const _p$2 = 65533;
4174
4229
  return new Result$Err$12$(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));
4175
4230
  }
4176
- function moonbitlang$core$builtin$$Show$output$14$(self, logger) {
4231
+ function moonbitlang$core$builtin$$Show$output$12$(self, logger) {
4177
4232
  switch (self.$tag) {
4178
4233
  case 0: {
4179
4234
  logger.method_0(logger.self, "Null");
@@ -4205,7 +4260,7 @@ function moonbitlang$core$builtin$$Show$output$14$(self, logger) {
4205
4260
  const _String = self;
4206
4261
  const _s = _String._0;
4207
4262
  logger.method_0(logger.self, "String(");
4208
- moonbitlang$core$builtin$$Show$output$8$(_s, logger);
4263
+ moonbitlang$core$builtin$$Show$output$7$(_s, logger);
4209
4264
  logger.method_0(logger.self, ")");
4210
4265
  return;
4211
4266
  }
@@ -4331,7 +4386,7 @@ function moonbitlang$core$json$$ParseContext$expect_ascii_char(ctx, c) {
4331
4386
  const _tmp$2 = _p.start + _p$2 | 0;
4332
4387
  const c1 = _tmp.charCodeAt(_tmp$2);
4333
4388
  ctx.offset = ctx.offset + 1 | 0;
4334
- 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);
4335
4390
  } else {
4336
4391
  return new Result$Err$10$(Error$moonbitlang$47$core$47$json$46$ParseError$46$InvalidEof);
4337
4392
  }
@@ -4611,7 +4666,7 @@ function moonbitlang$core$json$$ParseContext$lex_hex_digits(ctx, n) {
4611
4666
  if (_c >= 65) {
4612
4667
  const d = ((_c & ~32) - 65 | 0) + 10 | 0;
4613
4668
  if (d > 15) {
4614
- 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);
4615
4670
  if (_bind$2.$tag === 1) {
4616
4671
  const _ok = _bind$2;
4617
4672
  _ok._0;
@@ -4624,7 +4679,7 @@ function moonbitlang$core$json$$ParseContext$lex_hex_digits(ctx, n) {
4624
4679
  if (_c >= 48) {
4625
4680
  const d = _c - 48 | 0;
4626
4681
  if (d > 9) {
4627
- 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);
4628
4683
  if (_bind$2.$tag === 1) {
4629
4684
  const _ok = _bind$2;
4630
4685
  _ok._0;
@@ -4634,7 +4689,7 @@ function moonbitlang$core$json$$ParseContext$lex_hex_digits(ctx, n) {
4634
4689
  }
4635
4690
  r = r << 4 | d;
4636
4691
  } else {
4637
- 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);
4638
4693
  if (_bind$2.$tag === 1) {
4639
4694
  const _ok = _bind$2;
4640
4695
  _ok._0;
@@ -4746,7 +4801,7 @@ function moonbitlang$core$json$$ParseContext$lex_string(ctx) {
4746
4801
  break;
4747
4802
  }
4748
4803
  default: {
4749
- 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);
4750
4805
  if (_bind$4.$tag === 1) {
4751
4806
  const _ok = _bind$4;
4752
4807
  _ok._0;
@@ -4761,7 +4816,7 @@ function moonbitlang$core$json$$ParseContext$lex_string(ctx) {
4761
4816
  }
4762
4817
  default: {
4763
4818
  if (_x < 32) {
4764
- 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);
4765
4820
  if (_bind$3.$tag === 1) {
4766
4821
  const _ok = _bind$3;
4767
4822
  _ok._0;
@@ -4776,7 +4831,7 @@ function moonbitlang$core$json$$ParseContext$lex_string(ctx) {
4776
4831
  }
4777
4832
  break _L$3;
4778
4833
  }
4779
- 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);
4780
4835
  if (_bind.$tag === 1) {
4781
4836
  const _ok = _bind;
4782
4837
  _ok._0;
@@ -4811,7 +4866,7 @@ function moonbitlang$core$json$$ParseContext$lex_zero(ctx, start) {
4811
4866
  default: {
4812
4867
  if (_x >= 48 && _x <= 57) {
4813
4868
  ctx.offset = ctx.offset - 1 | 0;
4814
- 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);
4815
4870
  if (_bind$2.$tag === 1) {
4816
4871
  const _ok = _bind$2;
4817
4872
  _ok._0;
@@ -4860,7 +4915,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
4860
4915
  if (allow_rbracket) {
4861
4916
  return new Result$Ok$12$($64$moonbitlang$47$core$47$json$46$Token$RBracket);
4862
4917
  } else {
4863
- 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);
4864
4919
  if (_bind$2.$tag === 1) {
4865
4920
  const _ok = _bind$2;
4866
4921
  _ok._0;
@@ -4966,7 +5021,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
4966
5021
  }
4967
5022
  const _n = _bind$4._0;
4968
5023
  const _repr = _bind$4._1;
4969
- 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))));
4970
5025
  } else {
4971
5026
  if (_x$2 >= 49 && _x$2 <= 57) {
4972
5027
  const _bind$3 = moonbitlang$core$json$$ParseContext$lex_decimal_integer(ctx, ctx.offset - 2 | 0);
@@ -4979,9 +5034,9 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
4979
5034
  }
4980
5035
  const _n = _bind$4._0;
4981
5036
  const _repr = _bind$4._1;
4982
- 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))));
4983
5038
  }
4984
- 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);
4985
5040
  if (_bind$3.$tag === 1) {
4986
5041
  const _ok = _bind$3;
4987
5042
  _ok._0;
@@ -5002,7 +5057,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
5002
5057
  }
5003
5058
  const _n = _bind$3._0;
5004
5059
  const _repr = _bind$3._1;
5005
- 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))));
5006
5061
  } else {
5007
5062
  if (_x >= 49 && _x <= 57) {
5008
5063
  const _bind$2 = moonbitlang$core$json$$ParseContext$lex_decimal_integer(ctx, ctx.offset - 1 | 0);
@@ -5015,7 +5070,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
5015
5070
  }
5016
5071
  const _n = _bind$3._0;
5017
5072
  const _repr = _bind$3._1;
5018
- 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))));
5019
5074
  } else {
5020
5075
  if (_x === 34) {
5021
5076
  const _bind$2 = moonbitlang$core$json$$ParseContext$lex_string(ctx);
@@ -5033,7 +5088,7 @@ function moonbitlang$core$json$$ParseContext$lex_value(ctx, allow_rbracket) {
5033
5088
  }
5034
5089
  const _p = _x;
5035
5090
  const shift = -(_p <= 65535 ? 1 : 2) | 0;
5036
- 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);
5037
5092
  if (_bind$2.$tag === 1) {
5038
5093
  const _ok = _bind$2;
5039
5094
  _ok._0;
@@ -5117,7 +5172,7 @@ function moonbitlang$core$json$$ParseContext$lex_after_property_name(ctx) {
5117
5172
  if (_x === 58) {
5118
5173
  return new Result$Ok$10$(undefined);
5119
5174
  } else {
5120
- 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);
5121
5176
  }
5122
5177
  }
5123
5178
  }
@@ -5226,7 +5281,7 @@ function moonbitlang$core$json$$ParseContext$parse_value2(ctx, tok) {
5226
5281
  }
5227
5282
  }
5228
5283
  }
5229
- return new Result$Ok$9$(moonbitlang$core$abort$$abort$14$("unreachable"));
5284
+ return new Result$Ok$9$(moonbitlang$core$abort$$abort$12$("unreachable"));
5230
5285
  }
5231
5286
  function moonbitlang$core$json$$ParseContext$parse_array(ctx) {
5232
5287
  if (ctx.remaining_available_depth <= 0) {
@@ -5259,7 +5314,7 @@ function moonbitlang$core$json$$ParseContext$parse_array(ctx) {
5259
5314
  } else {
5260
5315
  return _bind$2;
5261
5316
  }
5262
- moonbitlang$core$array$$Array$push$14$(vec, _tmp$4);
5317
+ moonbitlang$core$array$$Array$push$12$(vec, _tmp$4);
5263
5318
  const _bind$3 = moonbitlang$core$json$$ParseContext$lex_after_array_value(ctx);
5264
5319
  let tok2;
5265
5320
  if (_bind$3.$tag === 1) {
@@ -5285,7 +5340,7 @@ function moonbitlang$core$json$$ParseContext$parse_array(ctx) {
5285
5340
  break _L;
5286
5341
  }
5287
5342
  default: {
5288
- _tmp = moonbitlang$core$abort$$abort$14$("unreachable");
5343
+ _tmp = moonbitlang$core$abort$$abort$12$("unreachable");
5289
5344
  break _L;
5290
5345
  }
5291
5346
  }
@@ -5361,13 +5416,13 @@ function moonbitlang$core$json$$ParseContext$parse_object(ctx) {
5361
5416
  break _L;
5362
5417
  }
5363
5418
  default: {
5364
- _tmp = moonbitlang$core$abort$$abort$14$("unreachable");
5419
+ _tmp = moonbitlang$core$abort$$abort$12$("unreachable");
5365
5420
  break _L;
5366
5421
  }
5367
5422
  }
5368
5423
  }
5369
5424
  default: {
5370
- _tmp = moonbitlang$core$abort$$abort$14$("unreachable");
5425
+ _tmp = moonbitlang$core$abort$$abort$12$("unreachable");
5371
5426
  break _L;
5372
5427
  }
5373
5428
  }
@@ -5385,7 +5440,7 @@ function moonbitlang$core$json$$parse$46$inner(input, max_nesting_depth) {
5385
5440
  return _bind;
5386
5441
  }
5387
5442
  moonbitlang$core$json$$ParseContext$lex_skip_whitespace(ctx);
5388
- return ctx.offset >= ctx.end_offset ? new Result$Ok$9$(val) : moonbitlang$core$json$$ParseContext$invalid_char$46$inner$14$(ctx, 0);
5443
+ return ctx.offset >= ctx.end_offset ? new Result$Ok$9$(val) : moonbitlang$core$json$$ParseContext$invalid_char$46$inner$12$(ctx, 0);
5389
5444
  }
5390
5445
  function moonbitlang$core$json$$escape(str, escape_slash) {
5391
5446
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(str.length);
@@ -5505,7 +5560,7 @@ function moonbitlang$core$json$$Json$stringify$46$inner(self, escape_slash, inde
5505
5560
  const _arr = _Array._0;
5506
5561
  const _i = _Array._1;
5507
5562
  if (_i < _arr.length) {
5508
- const element = moonbitlang$core$array$$Array$at$14$(_arr, _i);
5563
+ const element = moonbitlang$core$array$$Array$at$12$(_arr, _i);
5509
5564
  _Array._1 = _i + 1 | 0;
5510
5565
  if (_i > 0) {
5511
5566
  moonbitlang$core$builtin$$Logger$write_char$35$(buf, 44);
@@ -5649,7 +5704,7 @@ function moonbitlang$core$json$$Json$as_number(self) {
5649
5704
  return Option$None$8$;
5650
5705
  }
5651
5706
  }
5652
- function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5707
+ function moonbitlang$core$array$$ArrayView$join$7$(self, separator) {
5653
5708
  if ((self.end - self.start | 0) === 0) {
5654
5709
  return "";
5655
5710
  } else {
@@ -5658,7 +5713,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5658
5713
  const _bind$2 = 1 + self.start | 0;
5659
5714
  const _bind$3 = self.end;
5660
5715
  const _x = { buf: _bind, start: _bind$2, end: _bind$3 };
5661
- const hd = moonbitlang$core$string$$ToStringView$to_string_view$8$(_hd);
5716
+ const hd = moonbitlang$core$string$$ToStringView$to_string_view$7$(_hd);
5662
5717
  let size_hint = hd.end - hd.start | 0;
5663
5718
  const _len = _x.end - _x.start | 0;
5664
5719
  let _tmp = 0;
@@ -5667,7 +5722,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5667
5722
  if (_i < _len) {
5668
5723
  const s = _bind[_bind$2 + _i | 0];
5669
5724
  const _tmp$2 = size_hint;
5670
- const _p = moonbitlang$core$string$$ToStringView$to_string_view$8$(s);
5725
+ const _p = moonbitlang$core$string$$ToStringView$to_string_view$7$(s);
5671
5726
  size_hint = _tmp$2 + ((_p.end - _p.start | 0) + (separator.end - separator.start | 0) | 0) | 0;
5672
5727
  _tmp = _i + 1 | 0;
5673
5728
  continue;
@@ -5685,7 +5740,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5685
5740
  const _i = _tmp$2;
5686
5741
  if (_i < _len$2) {
5687
5742
  const s = _bind[_bind$2 + _i | 0];
5688
- 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);
5689
5744
  moonbitlang$core$builtin$$Logger$write_substring$35$(buf, s$2.str, s$2.start, s$2.end - s$2.start | 0);
5690
5745
  _tmp$2 = _i + 1 | 0;
5691
5746
  continue;
@@ -5700,7 +5755,7 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5700
5755
  const _i = _tmp$2;
5701
5756
  if (_i < _len$2) {
5702
5757
  const s = _bind[_bind$2 + _i | 0];
5703
- 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);
5704
5759
  moonbitlang$core$builtin$$Logger$write_substring$35$(buf, separator.str, separator.start, separator.end - separator.start | 0);
5705
5760
  moonbitlang$core$builtin$$Logger$write_substring$35$(buf, s$2.str, s$2.start, s$2.end - s$2.start | 0);
5706
5761
  _tmp$2 = _i + 1 | 0;
@@ -5713,10 +5768,10 @@ function moonbitlang$core$array$$ArrayView$join$8$(self, separator) {
5713
5768
  return buf.val;
5714
5769
  }
5715
5770
  }
5716
- function moonbitlang$core$array$$FixedArray$copy$12$(self) {
5771
+ function moonbitlang$core$array$$FixedArray$copy$14$(self) {
5717
5772
  return moonbitlang$core$array$$JSArray$copy(self);
5718
5773
  }
5719
- function moonbitlang$core$array$$Array$copy$14$(self) {
5774
+ function moonbitlang$core$array$$Array$copy$12$(self) {
5720
5775
  return moonbitlang$core$array$$JSArray$copy(self);
5721
5776
  }
5722
5777
  function moonbitlang$core$array$$Array$push_iter$41$(self, iter) {
@@ -5733,8 +5788,8 @@ function moonbitlang$core$array$$Array$last$42$(self) {
5733
5788
  return _last;
5734
5789
  }
5735
5790
  }
5736
- function moonbitlang$core$array$$Array$join$8$(self, separator) {
5737
- 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);
5738
5793
  }
5739
5794
  function moonbitlang$core$double$internal$ryu$$string_from_bytes(bytes, from, to) {
5740
5795
  const buf = moonbitlang$core$builtin$$StringBuilder$new$46$inner(bytes.length);
@@ -6386,7 +6441,7 @@ function moonbitlang$core$buffer$$Buffer$grow_if_necessary(self, required) {
6386
6441
  }
6387
6442
  if (enough_space !== self.data.length) {
6388
6443
  const new_data = $makebytes(enough_space, 0);
6389
- moonbitlang$core$array$$FixedArray$unsafe_blit$12$(new_data, 0, self.data, 0, self.len);
6444
+ moonbitlang$core$array$$FixedArray$unsafe_blit$14$(new_data, 0, self.data, 0, self.len);
6390
6445
  self.data = new_data;
6391
6446
  return;
6392
6447
  } else {
@@ -6402,7 +6457,7 @@ function moonbitlang$core$buffer$$Buffer$write_byte(self, value) {
6402
6457
  self.len = self.len + 1 | 0;
6403
6458
  }
6404
6459
  function moonbitlang$core$buffer$$Buffer$contents(self) {
6405
- 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$14$(self.data, 0, self.len));
6406
6461
  }
6407
6462
  function moonbitlang$core$buffer$$new$46$inner(size_hint) {
6408
6463
  const initial = size_hint < 1 ? 1 : size_hint;
@@ -6420,13 +6475,13 @@ function moonbitlang$core$builtin$$Logger$write_char$43$(self, value) {
6420
6475
  const inc = moonbitlang$core$array$$FixedArray$set_utf16le_char(self.data, self.len, value);
6421
6476
  self.len = self.len + inc | 0;
6422
6477
  }
6423
- function moonbitlang$core$builtin$$Logger$write_object$8$(self, obj) {
6424
- 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);
6425
6480
  }
6426
- function moonbitlang$core$builtin$$Logger$write_object$14$(self, obj) {
6427
- moonbitlang$core$builtin$$Show$output$14$(obj, self);
6481
+ function moonbitlang$core$builtin$$Logger$write_object$12$(self, obj) {
6482
+ moonbitlang$core$builtin$$Show$output$12$(obj, self);
6428
6483
  }
6429
- function moonbitlang$core$array$$FixedArray$unsafe_blit$12$(dst, dst_offset, src, src_offset, len) {
6484
+ function moonbitlang$core$array$$FixedArray$unsafe_blit$14$(dst, dst_offset, src, src_offset, len) {
6430
6485
  if (dst === src && dst_offset < src_offset) {
6431
6486
  let _tmp = 0;
6432
6487
  while (true) {
@@ -6481,14 +6536,14 @@ function moonbitlang$core$string$$String$unsafe_char_at(self, index) {
6481
6536
  return c1;
6482
6537
  }
6483
6538
  }
6484
- function moonbitlang$core$builtin$$op_notequal$7$(x, y) {
6485
- 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);
6486
6541
  }
6487
6542
  function moonbitlang$core$builtin$$op_notequal$44$(x, y) {
6488
6543
  return !moonbitlang$core$builtin$$Eq$equal$45$(x, y);
6489
6544
  }
6490
- function moonbitlang$core$builtin$$op_notequal$14$(x, y) {
6491
- return !moonbitlang$core$builtin$$Eq$equal$14$(x, y);
6545
+ function moonbitlang$core$builtin$$op_notequal$12$(x, y) {
6546
+ return !moonbitlang$core$builtin$$Eq$equal$12$(x, y);
6492
6547
  }
6493
6548
  function moonbitlang$core$builtin$$op_notequal$46$(x, y) {
6494
6549
  return !moonbitlang$core$builtin$$Eq$equal$47$(x, y);
@@ -6499,10 +6554,10 @@ function moonbitlang$core$builtin$$op_notequal$48$(x, y) {
6499
6554
  function moonbitlang$core$builtin$$op_notequal$0$(x, y) {
6500
6555
  return !moonbitlang$core$builtin$$Eq$equal$0$(x, y);
6501
6556
  }
6502
- function moonbitlang$core$builtin$$op_notequal$16$(x, y) {
6503
- 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);
6504
6559
  }
6505
- function moonbitlang$core$array$$Array$at$42$(self, index) {
6560
+ function moonbitlang$core$array$$Array$at$50$(self, index) {
6506
6561
  const len = self.length;
6507
6562
  if (index >= 0 && index < len) {
6508
6563
  $bound_check(self, index);
@@ -6511,7 +6566,7 @@ function moonbitlang$core$array$$Array$at$42$(self, index) {
6511
6566
  return $panic();
6512
6567
  }
6513
6568
  }
6514
- function moonbitlang$core$array$$Array$at$50$(self, index) {
6569
+ function moonbitlang$core$array$$Array$at$51$(self, index) {
6515
6570
  const len = self.length;
6516
6571
  if (index >= 0 && index < len) {
6517
6572
  $bound_check(self, index);
@@ -6520,7 +6575,7 @@ function moonbitlang$core$array$$Array$at$50$(self, index) {
6520
6575
  return $panic();
6521
6576
  }
6522
6577
  }
6523
- function moonbitlang$core$array$$Array$at$51$(self, index) {
6578
+ function moonbitlang$core$array$$Array$at$42$(self, index) {
6524
6579
  const len = self.length;
6525
6580
  if (index >= 0 && index < len) {
6526
6581
  $bound_check(self, index);
@@ -6529,7 +6584,7 @@ function moonbitlang$core$array$$Array$at$51$(self, index) {
6529
6584
  return $panic();
6530
6585
  }
6531
6586
  }
6532
- function moonbitlang$core$array$$Array$at$14$(self, index) {
6587
+ function moonbitlang$core$array$$Array$at$12$(self, index) {
6533
6588
  const len = self.length;
6534
6589
  if (index >= 0 && index < len) {
6535
6590
  $bound_check(self, index);
@@ -6556,7 +6611,7 @@ function moonbitlang$core$array$$Array$at$17$(self, index) {
6556
6611
  return $panic();
6557
6612
  }
6558
6613
  }
6559
- function moonbitlang$core$array$$Array$at$12$(self, index) {
6614
+ function moonbitlang$core$array$$Array$at$14$(self, index) {
6560
6615
  const len = self.length;
6561
6616
  if (index >= 0 && index < len) {
6562
6617
  $bound_check(self, index);
@@ -6596,12 +6651,12 @@ function moonbitlang$core$builtin$$Logger$write_string$35$(self, str) {
6596
6651
  const _bind = self;
6597
6652
  _bind.val = `${_bind.val}${str}`;
6598
6653
  }
6599
- function moonbitlang$core$builtin$$Hasher$combine$8$(self, value) {
6600
- moonbitlang$core$builtin$$Hash$hash_combine$8$(value, self);
6601
- }
6602
6654
  function moonbitlang$core$builtin$$Hasher$combine$7$(self, value) {
6603
6655
  moonbitlang$core$builtin$$Hash$hash_combine$7$(value, self);
6604
6656
  }
6657
+ function moonbitlang$core$builtin$$Hasher$combine$6$(self, value) {
6658
+ moonbitlang$core$builtin$$Hash$hash_combine$6$(value, self);
6659
+ }
6605
6660
  function moonbitlang$core$builtin$$Hasher$combine$13$(self, value) {
6606
6661
  moonbitlang$core$builtin$$Hash$hash_combine$13$(value, self);
6607
6662
  }
@@ -6615,14 +6670,14 @@ function moonbitlang$core$builtin$$Compare$op_lt$55$(x, y) {
6615
6670
  return moonbitlang$core$builtin$$Compare$compare$56$(x, y) < 0;
6616
6671
  }
6617
6672
  function moonbitlang$core$builtin$$Compare$op_lt$57$(x, y) {
6618
- return moonbitlang$core$builtin$$Compare$compare$7$(x, y) < 0;
6619
- }
6620
- function moonbitlang$core$builtin$$Compare$op_lt$28$(x, y) {
6621
- return moonbitlang$core$builtin$$Compare$compare$0$(x, y) < 0;
6673
+ return moonbitlang$core$builtin$$Compare$compare$6$(x, y) < 0;
6622
6674
  }
6623
6675
  function moonbitlang$core$builtin$$Compare$op_lt$27$(x, y) {
6624
6676
  return moonbitlang$core$builtin$$Compare$compare$22$(x, y) < 0;
6625
6677
  }
6678
+ function moonbitlang$core$builtin$$Compare$op_lt$28$(x, y) {
6679
+ return moonbitlang$core$builtin$$Compare$compare$0$(x, y) < 0;
6680
+ }
6626
6681
  function moonbitlang$core$builtin$$Compare$op_gt$55$(x, y) {
6627
6682
  return moonbitlang$core$builtin$$Compare$compare$56$(x, y) > 0;
6628
6683
  }
@@ -6635,12 +6690,12 @@ function moonbitlang$core$builtin$$Compare$op_gt$28$(x, y) {
6635
6690
  function moonbitlang$core$builtin$$Compare$op_gt$27$(x, y) {
6636
6691
  return moonbitlang$core$builtin$$Compare$compare$22$(x, y) > 0;
6637
6692
  }
6638
- function moonbitlang$core$builtin$$Compare$op_le$28$(x, y) {
6639
- return moonbitlang$core$builtin$$Compare$compare$0$(x, y) <= 0;
6640
- }
6641
6693
  function moonbitlang$core$builtin$$Compare$op_le$27$(x, y) {
6642
6694
  return moonbitlang$core$builtin$$Compare$compare$22$(x, y) <= 0;
6643
6695
  }
6696
+ function moonbitlang$core$builtin$$Compare$op_le$28$(x, y) {
6697
+ return moonbitlang$core$builtin$$Compare$compare$0$(x, y) <= 0;
6698
+ }
6644
6699
  function moonbitlang$core$builtin$$Compare$op_ge$54$(x, y) {
6645
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;
6646
6701
  }
@@ -6677,12 +6732,12 @@ function moonbitlang$core$builtin$$Hasher$new(seed$46$opt) {
6677
6732
  }
6678
6733
  function moonbitlang$core$builtin$$Hash$hash$59$(self) {
6679
6734
  const _self = moonbitlang$core$builtin$$Hasher$new(undefined);
6680
- moonbitlang$core$builtin$$Hasher$combine$8$(_self, self);
6735
+ moonbitlang$core$builtin$$Hasher$combine$7$(_self, self);
6681
6736
  return moonbitlang$core$builtin$$Hasher$finalize(_self);
6682
6737
  }
6683
6738
  function moonbitlang$core$builtin$$Hash$hash$57$(self) {
6684
6739
  const _self = moonbitlang$core$builtin$$Hasher$new(undefined);
6685
- moonbitlang$core$builtin$$Hasher$combine$7$(_self, self);
6740
+ moonbitlang$core$builtin$$Hasher$combine$6$(_self, self);
6686
6741
  return moonbitlang$core$builtin$$Hasher$finalize(_self);
6687
6742
  }
6688
6743
  function moonbitlang$core$builtin$$Hash$hash$19$(self) {
@@ -6692,7 +6747,7 @@ function moonbitlang$core$builtin$$Hash$hash$19$(self) {
6692
6747
  }
6693
6748
  function moonbitlang$core$builtin$$Show$to_string$60$(self) {
6694
6749
  const logger = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
6695
- moonbitlang$core$builtin$$Show$output$14$(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$ });
6750
+ 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$ });
6696
6751
  return logger.val;
6697
6752
  }
6698
6753
  function moonbitlang$core$builtin$$Show$to_string$19$(self) {
@@ -6710,11 +6765,11 @@ function moonbitlang$core$builtin$$Show$to_string$28$(self) {
6710
6765
  moonbitlang$core$builtin$$Show$output$0$(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$ });
6711
6766
  return logger.val;
6712
6767
  }
6713
- function moonbitlang$core$builtin$$Logger$write_iter$46$inner$14$(self, iter, prefix, suffix, sep, trailing) {
6768
+ function moonbitlang$core$builtin$$Logger$write_iter$46$inner$12$(self, iter, prefix, suffix, sep, trailing) {
6714
6769
  self.method_0(self.self, prefix);
6715
6770
  if (trailing) {
6716
6771
  iter((x) => {
6717
- moonbitlang$core$builtin$$Logger$write_object$14$(self, x);
6772
+ moonbitlang$core$builtin$$Logger$write_object$12$(self, x);
6718
6773
  self.method_0(self.self, sep);
6719
6774
  return 1;
6720
6775
  });
@@ -6726,7 +6781,7 @@ function moonbitlang$core$builtin$$Logger$write_iter$46$inner$14$(self, iter, pr
6726
6781
  } else {
6727
6782
  self.method_0(self.self, sep);
6728
6783
  }
6729
- moonbitlang$core$builtin$$Logger$write_object$14$(self, x);
6784
+ moonbitlang$core$builtin$$Logger$write_object$12$(self, x);
6730
6785
  return 1;
6731
6786
  });
6732
6787
  }
@@ -6755,7 +6810,7 @@ function moonbitlang$core$string$$StringView$view$46$inner(self, start_offset, e
6755
6810
  const _Some = end_offset;
6756
6811
  end_offset$2 = _Some;
6757
6812
  }
6758
- 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");
6759
6814
  }
6760
6815
  function moonbitlang$core$builtin$$unsafe_sub_string(_tmp, _tmp$2, _tmp$3) {
6761
6816
  return $unsafe_bytes_sub_string(_tmp, _tmp$2, _tmp$3);
@@ -6803,7 +6858,7 @@ function moonbitlang$core$builtin$$output$46$flush_segment$124$2622(_env, seg, i
6803
6858
  return;
6804
6859
  }
6805
6860
  }
6806
- function moonbitlang$core$builtin$$Show$output$8$(self, logger) {
6861
+ function moonbitlang$core$builtin$$Show$output$7$(self, logger) {
6807
6862
  logger.method_2(logger.self, 34);
6808
6863
  const _env = { _0: self, _1: logger };
6809
6864
  const len = self.length;
@@ -6881,7 +6936,7 @@ function moonbitlang$core$builtin$$Show$output$8$(self, logger) {
6881
6936
  }
6882
6937
  logger.method_2(logger.self, 34);
6883
6938
  }
6884
- function moonbitlang$core$builtin$$Show$to_string$16$(self) {
6939
+ function moonbitlang$core$builtin$$Show$to_string$15$(self) {
6885
6940
  return self.str.substring(self.start, self.end);
6886
6941
  }
6887
6942
  function moonbitlang$core$string$$StringView$iter(self) {
@@ -6923,7 +6978,7 @@ function moonbitlang$core$string$$StringView$iter(self) {
6923
6978
  };
6924
6979
  return _p;
6925
6980
  }
6926
- function moonbitlang$core$builtin$$Eq$equal$16$(self, other) {
6981
+ function moonbitlang$core$builtin$$Eq$equal$15$(self, other) {
6927
6982
  const len = self.end - self.start | 0;
6928
6983
  if (len === (other.end - other.start | 0)) {
6929
6984
  if (self.str === other.str && self.start === other.start) {
@@ -6961,7 +7016,7 @@ function moonbitlang$core$string$$String$view$46$inner(self, start_offset, end_o
6961
7016
  const _Some = end_offset;
6962
7017
  end_offset$2 = _Some;
6963
7018
  }
6964
- 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");
6965
7020
  }
6966
7021
  function moonbitlang$core$string$$String$char_length_eq$46$inner(self, len, start_offset, end_offset) {
6967
7022
  let end_offset$2;
@@ -6986,7 +7041,7 @@ function moonbitlang$core$string$$String$char_length_eq$46$inner(self, len, star
6986
7041
  _tmp$2 = count + 1 | 0;
6987
7042
  continue;
6988
7043
  } else {
6989
- moonbitlang$core$abort$$abort$4$("invalid surrogate pair");
7044
+ moonbitlang$core$abort$$abort$3$("invalid surrogate pair");
6990
7045
  }
6991
7046
  }
6992
7047
  _tmp = index + 1 | 0;
@@ -7020,7 +7075,7 @@ function moonbitlang$core$string$$String$char_length_ge$46$inner(self, len, star
7020
7075
  _tmp$2 = count + 1 | 0;
7021
7076
  continue;
7022
7077
  } else {
7023
- moonbitlang$core$abort$$abort$4$("invalid surrogate pair");
7078
+ moonbitlang$core$abort$$abort$3$("invalid surrogate pair");
7024
7079
  }
7025
7080
  }
7026
7081
  _tmp = index + 1 | 0;
@@ -7261,7 +7316,7 @@ function moonbitlang$core$string$$String$repeat(self, n) {
7261
7316
  }
7262
7317
  }
7263
7318
  }
7264
- function moonbitlang$core$array$$Array$new$46$inner$14$(capacity) {
7319
+ function moonbitlang$core$array$$Array$new$46$inner$12$(capacity) {
7265
7320
  return [];
7266
7321
  }
7267
7322
  function moonbitlang$core$array$$Array$new$46$inner$51$(capacity) {
@@ -7273,7 +7328,7 @@ function moonbitlang$core$array$$Array$new$46$inner$50$(capacity) {
7273
7328
  function moonbitlang$core$array$$Array$new$46$inner$52$(capacity) {
7274
7329
  return [];
7275
7330
  }
7276
- function moonbitlang$core$array$$Array$new$46$inner$12$(capacity) {
7331
+ function moonbitlang$core$array$$Array$new$46$inner$14$(capacity) {
7277
7332
  return [];
7278
7333
  }
7279
7334
  function moonbitlang$core$array$$Array$new$46$inner$62$(capacity) {
@@ -7282,10 +7337,7 @@ function moonbitlang$core$array$$Array$new$46$inner$62$(capacity) {
7282
7337
  function moonbitlang$core$array$$Array$new$46$inner$40$(capacity) {
7283
7338
  return [];
7284
7339
  }
7285
- function moonbitlang$core$array$$Array$push$14$(self, value) {
7286
- moonbitlang$core$builtin$$JSArray$push(self, value);
7287
- }
7288
- function moonbitlang$core$array$$Array$push$39$(self, value) {
7340
+ function moonbitlang$core$array$$Array$push$12$(self, value) {
7289
7341
  moonbitlang$core$builtin$$JSArray$push(self, value);
7290
7342
  }
7291
7343
  function moonbitlang$core$array$$Array$push$50$(self, value) {
@@ -7294,13 +7346,16 @@ function moonbitlang$core$array$$Array$push$50$(self, value) {
7294
7346
  function moonbitlang$core$array$$Array$push$51$(self, value) {
7295
7347
  moonbitlang$core$builtin$$JSArray$push(self, value);
7296
7348
  }
7349
+ function moonbitlang$core$array$$Array$push$39$(self, value) {
7350
+ moonbitlang$core$builtin$$JSArray$push(self, value);
7351
+ }
7297
7352
  function moonbitlang$core$array$$Array$push$62$(self, value) {
7298
7353
  moonbitlang$core$builtin$$JSArray$push(self, value);
7299
7354
  }
7300
7355
  function moonbitlang$core$array$$Array$push$42$(self, value) {
7301
7356
  moonbitlang$core$builtin$$JSArray$push(self, value);
7302
7357
  }
7303
- function moonbitlang$core$array$$Array$push$12$(self, value) {
7358
+ function moonbitlang$core$array$$Array$push$14$(self, value) {
7304
7359
  moonbitlang$core$builtin$$JSArray$push(self, value);
7305
7360
  }
7306
7361
  function moonbitlang$core$array$$Array$push$52$(self, value) {
@@ -7309,13 +7364,13 @@ function moonbitlang$core$array$$Array$push$52$(self, value) {
7309
7364
  function moonbitlang$core$array$$Array$push$17$(self, value) {
7310
7365
  moonbitlang$core$builtin$$JSArray$push(self, value);
7311
7366
  }
7312
- function moonbitlang$core$array$$Array$push$16$(self, value) {
7367
+ function moonbitlang$core$array$$Array$push$15$(self, value) {
7313
7368
  moonbitlang$core$builtin$$JSArray$push(self, value);
7314
7369
  }
7315
7370
  function moonbitlang$core$array$$Array$push$40$(self, value) {
7316
7371
  moonbitlang$core$builtin$$JSArray$push(self, value);
7317
7372
  }
7318
- function moonbitlang$core$array$$Array$push$8$(self, value) {
7373
+ function moonbitlang$core$array$$Array$push$7$(self, value) {
7319
7374
  moonbitlang$core$builtin$$JSArray$push(self, value);
7320
7375
  }
7321
7376
  function moonbitlang$core$array$$Array$push$41$(self, value) {
@@ -7418,17 +7473,17 @@ function moonbitlang$core$builtin$$Iter$each$64$(self, f) {
7418
7473
  }
7419
7474
  }
7420
7475
  }
7421
- function moonbitlang$core$builtin$$Iter$collect$12$(self) {
7476
+ function moonbitlang$core$builtin$$Iter$collect$15$(self) {
7422
7477
  const result = [];
7423
7478
  moonbitlang$core$builtin$$Iter$each$63$(self, (e) => {
7424
- moonbitlang$core$array$$Array$push$12$(result, e);
7479
+ moonbitlang$core$array$$Array$push$15$(result, e);
7425
7480
  });
7426
7481
  return result;
7427
7482
  }
7428
- function moonbitlang$core$builtin$$Iter$collect$16$(self) {
7483
+ function moonbitlang$core$builtin$$Iter$collect$14$(self) {
7429
7484
  const result = [];
7430
7485
  moonbitlang$core$builtin$$Iter$each$64$(self, (e) => {
7431
- moonbitlang$core$array$$Array$push$16$(result, e);
7486
+ moonbitlang$core$array$$Array$push$14$(result, e);
7432
7487
  });
7433
7488
  return result;
7434
7489
  }
@@ -7486,7 +7541,7 @@ function moonbitlang$core$builtin$$Iterator$next$38$(self) {
7486
7541
  const _func = self;
7487
7542
  return _func();
7488
7543
  }
7489
- function moonbitlang$core$builtin$$Iterator$next$12$(self) {
7544
+ function moonbitlang$core$builtin$$Iterator$next$14$(self) {
7490
7545
  const _func = self;
7491
7546
  return _func();
7492
7547
  }
@@ -7504,12 +7559,12 @@ function moonbitlang$core$builtin$$Show$output$31$(self, logger) {
7504
7559
  const _Some = self;
7505
7560
  const _arg = _Some;
7506
7561
  logger.method_0(logger.self, "Some(");
7507
- moonbitlang$core$builtin$$Logger$write_object$8$(logger, _arg);
7562
+ moonbitlang$core$builtin$$Logger$write_object$7$(logger, _arg);
7508
7563
  logger.method_0(logger.self, ")");
7509
7564
  return;
7510
7565
  }
7511
7566
  }
7512
- function moonbitlang$core$array$$Array$iter$14$(self) {
7567
+ function moonbitlang$core$array$$Array$iter$12$(self) {
7513
7568
  const _p = (yield_) => {
7514
7569
  const _len = self.length;
7515
7570
  let _tmp = 0;
@@ -7554,7 +7609,7 @@ function moonbitlang$core$array$$Array$iter$41$(self) {
7554
7609
  return _p;
7555
7610
  }
7556
7611
  function moonbitlang$core$builtin$$Show$output$32$(self, logger) {
7557
- moonbitlang$core$builtin$$Logger$write_iter$46$inner$14$(logger, moonbitlang$core$array$$Array$iter$14$(self), "[", "]", ", ", false);
7612
+ moonbitlang$core$builtin$$Logger$write_iter$46$inner$12$(logger, moonbitlang$core$array$$Array$iter$12$(self), "[", "]", ", ", false);
7558
7613
  }
7559
7614
  function moonbitlang$core$array$$FixedArray$from_array$53$(array) {
7560
7615
  const _p = array.end - array.start | 0;
@@ -7578,7 +7633,7 @@ function moonbitlang$core$array$$FixedArray$from_array$53$(array) {
7578
7633
  return _p$3;
7579
7634
  }
7580
7635
  }
7581
- function moonbitlang$core$array$$FixedArray$sub$46$inner$12$(self, start, end) {
7636
+ function moonbitlang$core$array$$FixedArray$sub$46$inner$14$(self, start, end) {
7582
7637
  const len = self.length;
7583
7638
  let end$2;
7584
7639
  if (end === undefined) {
@@ -7589,7 +7644,7 @@ function moonbitlang$core$array$$FixedArray$sub$46$inner$12$(self, start, end) {
7589
7644
  end$2 = _end < 0 ? len + _end | 0 : _end;
7590
7645
  }
7591
7646
  const start$2 = start < 0 ? len + start | 0 : start;
7592
- 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");
7593
7648
  }
7594
7649
  function moonbitlang$core$builtin$$Eq$equal$45$(self, other) {
7595
7650
  if (self === undefined) {
@@ -7602,7 +7657,7 @@ function moonbitlang$core$builtin$$Eq$equal$45$(self, other) {
7602
7657
  } else {
7603
7658
  const _Some$2 = other;
7604
7659
  const _y = _Some$2;
7605
- return moonbitlang$core$builtin$$Eq$equal$14$(_x, _y);
7660
+ return moonbitlang$core$builtin$$Eq$equal$12$(_x, _y);
7606
7661
  }
7607
7662
  }
7608
7663
  }
@@ -7708,7 +7763,7 @@ function moonbitlang$core$int$$Int$next_power_of_two(self) {
7708
7763
  return $panic();
7709
7764
  }
7710
7765
  }
7711
- function moonbitlang$core$builtin$$Map$new$46$inner$37$(capacity) {
7766
+ function moonbitlang$core$builtin$$Map$new$46$inner$71$(capacity) {
7712
7767
  const capacity$2 = moonbitlang$core$int$$Int$next_power_of_two(capacity);
7713
7768
  const _bind = capacity$2 - 1 | 0;
7714
7769
  const _bind$2 = (Math.imul(capacity$2, 13) | 0) / 16 | 0;
@@ -7716,7 +7771,7 @@ function moonbitlang$core$builtin$$Map$new$46$inner$37$(capacity) {
7716
7771
  const _bind$4 = undefined;
7717
7772
  return { entries: _bind$3, size: 0, capacity: capacity$2, capacity_mask: _bind, grow_at: _bind$2, head: _bind$4, tail: -1 };
7718
7773
  }
7719
- function moonbitlang$core$builtin$$Map$new$46$inner$71$(capacity) {
7774
+ function moonbitlang$core$builtin$$Map$new$46$inner$37$(capacity) {
7720
7775
  const capacity$2 = moonbitlang$core$int$$Int$next_power_of_two(capacity);
7721
7776
  const _bind = capacity$2 - 1 | 0;
7722
7777
  const _bind$2 = (Math.imul(capacity$2, 13) | 0) / 16 | 0;
@@ -8004,7 +8059,7 @@ function moonbitlang$core$builtin$$Map$set_with_hash$71$(self, key, value, hash)
8004
8059
  } else {
8005
8060
  const _Some = _bind$2;
8006
8061
  const _curr_entry = _Some;
8007
- 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)) {
8008
8063
  _curr_entry.value = value;
8009
8064
  return undefined;
8010
8065
  }
@@ -8176,7 +8231,7 @@ function moonbitlang$core$builtin$$Map$get$71$(self, key) {
8176
8231
  } else {
8177
8232
  const _Some = _bind;
8178
8233
  const _entry = _Some;
8179
- 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)) {
8180
8235
  return _entry.value;
8181
8236
  }
8182
8237
  if (i > _entry.psl) {
@@ -8230,7 +8285,7 @@ function moonbitlang$core$builtin$$Map$contains_kv$37$(self, key, value) {
8230
8285
  } else {
8231
8286
  const _Some = _bind;
8232
8287
  const _entry = _Some;
8233
- if (_entry.hash === hash && (_entry.key === key && moonbitlang$core$builtin$$Eq$equal$14$(_entry.value, value))) {
8288
+ if (_entry.hash === hash && (_entry.key === key && moonbitlang$core$builtin$$Eq$equal$12$(_entry.value, value))) {
8234
8289
  return true;
8235
8290
  }
8236
8291
  if (i > _entry.psl) {
@@ -8353,9 +8408,9 @@ function moonbitlang$core$builtin$$Show$output$33$(self, logger) {
8353
8408
  if (_param_0 > 0) {
8354
8409
  logger.method_0(logger.self, ", ");
8355
8410
  }
8356
- moonbitlang$core$builtin$$Logger$write_object$8$(logger, _key);
8411
+ moonbitlang$core$builtin$$Logger$write_object$7$(logger, _key);
8357
8412
  logger.method_0(logger.self, ": ");
8358
- moonbitlang$core$builtin$$Logger$write_object$14$(logger, _value);
8413
+ moonbitlang$core$builtin$$Logger$write_object$12$(logger, _value);
8359
8414
  _tmp = _param_0 + 1 | 0;
8360
8415
  _tmp$2 = _next;
8361
8416
  continue;
@@ -8514,7 +8569,7 @@ function moonbitlang$core$builtin$$Map$copy$71$(self) {
8514
8569
  return other;
8515
8570
  }
8516
8571
  }
8517
- function moonbitlang$core$builtin$$Eq$equal$14$(a, b) {
8572
+ function moonbitlang$core$builtin$$Eq$equal$12$(a, b) {
8518
8573
  switch (a.$tag) {
8519
8574
  case 0: {
8520
8575
  if (b.$tag === 0) {
@@ -8967,7 +9022,7 @@ function moonbitlang$core$builtin$$Hasher$combine_string(self, value) {
8967
9022
  }
8968
9023
  }
8969
9024
  }
8970
- function moonbitlang$core$builtin$$Hash$hash_combine$8$(self, hasher) {
9025
+ function moonbitlang$core$builtin$$Hash$hash_combine$7$(self, hasher) {
8971
9026
  moonbitlang$core$builtin$$Hasher$combine_string(hasher, self);
8972
9027
  }
8973
9028
  function moonbitlang$core$builtin$$Hash$hash_combine$13$(self, hasher) {
@@ -9034,7 +9089,7 @@ function moonbitlang$core$bytes$$Bytes$makei$20$(length, value) {
9034
9089
  }
9035
9090
  return arr;
9036
9091
  }
9037
- function moonbitlang$core$builtin$$println$8$(input) {
9092
+ function moonbitlang$core$builtin$$println$7$(input) {
9038
9093
  console.log(input);
9039
9094
  }
9040
9095
  function moonbitlang$core$array$$FixedArray$blit_from_bytes(self, bytes_offset, src, src_offset, length) {
@@ -9043,7 +9098,7 @@ function moonbitlang$core$array$$FixedArray$blit_from_bytes(self, bytes_offset,
9043
9098
  const len1 = self.length;
9044
9099
  const len2 = src.length;
9045
9100
  if (length >= 0 && (bytes_offset >= 0 && (e1 < len1 && (src_offset >= 0 && e2 < len2)))) {
9046
- moonbitlang$core$array$$FixedArray$unsafe_blit$12$(self, bytes_offset, src, src_offset, length);
9101
+ moonbitlang$core$array$$FixedArray$unsafe_blit$14$(self, bytes_offset, src, src_offset, length);
9047
9102
  return;
9048
9103
  } else {
9049
9104
  $panic();
@@ -9087,7 +9142,7 @@ function moonbitlang$core$array$$FixedArray$set_utf16le_char(self, offset, value
9087
9142
  }
9088
9143
  }
9089
9144
  }
9090
- function moonbitlang$core$builtin$$Eq$equal$3$(self, other) {
9145
+ function moonbitlang$core$builtin$$Eq$equal$2$(self, other) {
9091
9146
  if (self.length !== other.length) {
9092
9147
  return false;
9093
9148
  } else {
@@ -9110,17 +9165,17 @@ function moonbitlang$core$builtin$$Eq$equal$3$(self, other) {
9110
9165
  }
9111
9166
  }
9112
9167
  }
9113
- function moonbitlang$core$builtin$$Shr$shr$12$(self, count) {
9168
+ function moonbitlang$core$builtin$$Shr$shr$14$(self, count) {
9114
9169
  return (self >>> count | 0) & 255;
9115
9170
  }
9116
- function moonbitlang$core$array$$ArrayView$at$12$(self, index) {
9171
+ function moonbitlang$core$array$$ArrayView$at$14$(self, index) {
9117
9172
  if (index >= 0 && index < (self.end - self.start | 0)) {
9118
9173
  const _tmp = self.buf;
9119
9174
  const _tmp$2 = self.start + index | 0;
9120
9175
  $bound_check(_tmp, _tmp$2);
9121
9176
  return _tmp[_tmp$2];
9122
9177
  } else {
9123
- 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$14$(`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)}`);
9124
9179
  }
9125
9180
  }
9126
9181
  function moonbitlang$core$array$$Array$unsafe_pop$39$(self) {
@@ -9139,11 +9194,11 @@ function moonbitlang$core$array$$Array$insert$42$(self, index, value) {
9139
9194
  moonbitlang$core$builtin$$JSArray$splice1(self, index, 0, value);
9140
9195
  return;
9141
9196
  } else {
9142
- 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)}`);
9143
9198
  return;
9144
9199
  }
9145
9200
  }
9146
- function moonbitlang$core$array$$Array$set$12$(self, index, value) {
9201
+ function moonbitlang$core$array$$Array$set$14$(self, index, value) {
9147
9202
  const len = self.length;
9148
9203
  if (index >= 0 && index < len) {
9149
9204
  $bound_check(self, index);
@@ -9173,7 +9228,7 @@ function moonbitlang$core$builtin$$Eq$equal$32$(self, other) {
9173
9228
  while (true) {
9174
9229
  const i = _tmp;
9175
9230
  if (i < self_len) {
9176
- if (moonbitlang$core$builtin$$Eq$equal$14$(self[i], other[i])) {
9231
+ if (moonbitlang$core$builtin$$Eq$equal$12$(self[i], other[i])) {
9177
9232
  } else {
9178
9233
  return false;
9179
9234
  }
@@ -9187,7 +9242,7 @@ function moonbitlang$core$builtin$$Eq$equal$32$(self, other) {
9187
9242
  return false;
9188
9243
  }
9189
9244
  }
9190
- function moonbitlang$core$array$$Array$rev$12$(self) {
9245
+ function moonbitlang$core$array$$Array$rev$14$(self) {
9191
9246
  const len = self.length;
9192
9247
  const arr = new Array(len);
9193
9248
  let _tmp = 0;
@@ -9619,7 +9674,7 @@ function zxch3n$flock$leb128$$encode_uint64(value) {
9619
9674
  const _p$2 = 128;
9620
9675
  byte = (_p | _p$2) & 255;
9621
9676
  }
9622
- moonbitlang$core$array$$Array$push$12$(result, byte);
9677
+ moonbitlang$core$array$$Array$push$14$(result, byte);
9623
9678
  if (moonbitlang$core$builtin$$Eq$equal$0$(val, $0L)) {
9624
9679
  break;
9625
9680
  }
@@ -9664,7 +9719,7 @@ function zxch3n$flock$leb128$$encode_int64(value) {
9664
9719
  byte = (_p | _p$2) & 255;
9665
9720
  }
9666
9721
  }
9667
- moonbitlang$core$array$$Array$push$12$(result, byte);
9722
+ moonbitlang$core$array$$Array$push$14$(result, byte);
9668
9723
  continue;
9669
9724
  } else {
9670
9725
  break;
@@ -9741,14 +9796,14 @@ function zxch3n$expect$$Formated$to_string(self) {
9741
9796
  } else {
9742
9797
  const _Some = _bind;
9743
9798
  const _color = _Some;
9744
- 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));
9745
9800
  }
9746
9801
  const _bind$2 = self.bg_color;
9747
9802
  if (_bind$2 === undefined) {
9748
9803
  } else {
9749
9804
  const _Some = _bind$2;
9750
9805
  const _bg_color = _Some;
9751
- 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));
9752
9807
  }
9753
9808
  const _arr = self.formats;
9754
9809
  const _len = _arr.length;
@@ -9759,31 +9814,31 @@ function zxch3n$expect$$Formated$to_string(self) {
9759
9814
  const format = _arr[_i];
9760
9815
  switch (format) {
9761
9816
  case 0: {
9762
- moonbitlang$core$array$$Array$push$8$(styles, "1");
9817
+ moonbitlang$core$array$$Array$push$7$(styles, "1");
9763
9818
  break;
9764
9819
  }
9765
9820
  case 1: {
9766
- moonbitlang$core$array$$Array$push$8$(styles, "4");
9821
+ moonbitlang$core$array$$Array$push$7$(styles, "4");
9767
9822
  break;
9768
9823
  }
9769
9824
  case 2: {
9770
- moonbitlang$core$array$$Array$push$8$(styles, "5");
9825
+ moonbitlang$core$array$$Array$push$7$(styles, "5");
9771
9826
  break;
9772
9827
  }
9773
9828
  case 3: {
9774
- moonbitlang$core$array$$Array$push$8$(styles, "7");
9829
+ moonbitlang$core$array$$Array$push$7$(styles, "7");
9775
9830
  break;
9776
9831
  }
9777
9832
  case 4: {
9778
- moonbitlang$core$array$$Array$push$8$(styles, "8");
9833
+ moonbitlang$core$array$$Array$push$7$(styles, "8");
9779
9834
  break;
9780
9835
  }
9781
9836
  case 5: {
9782
- moonbitlang$core$array$$Array$push$8$(styles, "9");
9837
+ moonbitlang$core$array$$Array$push$7$(styles, "9");
9783
9838
  break;
9784
9839
  }
9785
9840
  default: {
9786
- moonbitlang$core$array$$Array$push$8$(styles, "3");
9841
+ moonbitlang$core$array$$Array$push$7$(styles, "3");
9787
9842
  }
9788
9843
  }
9789
9844
  _tmp = _i + 1 | 0;
@@ -9793,7 +9848,7 @@ function zxch3n$expect$$Formated$to_string(self) {
9793
9848
  }
9794
9849
  }
9795
9850
  if (styles.length > 0) {
9796
- 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 });
9797
9852
  return `[${style_string}m${self.str}[0m`;
9798
9853
  } else {
9799
9854
  return self.str;
@@ -9820,19 +9875,19 @@ function zxch3n$expect$$Formated$bold(self) {
9820
9875
  moonbitlang$core$array$$Array$push_iter$41$(_self, moonbitlang$core$array$$Array$iter$41$(self.formats));
9821
9876
  return { str: _tmp, bg_color: _tmp$2, color: _tmp$3, formats: _self };
9822
9877
  }
9823
- function zxch3n$expect$$panic$46$inner$4$(reason, loc) {
9878
+ function zxch3n$expect$$panic$46$inner$3$(reason, loc) {
9824
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)))}`;
9825
- moonbitlang$core$builtin$$println$8$(msg);
9826
- moonbitlang$core$abort$$abort$4$(msg);
9880
+ moonbitlang$core$builtin$$println$7$(msg);
9881
+ moonbitlang$core$abort$$abort$3$(msg);
9827
9882
  }
9828
- function moonbitlang$core$builtin$$Eq$equal$7$(_x_165, _x_166) {
9829
- 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);
9830
9885
  }
9831
- function moonbitlang$core$builtin$$Hash$hash_combine$7$(_x_157, _x_158) {
9832
- 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);
9833
9888
  }
9834
9889
  function zxch3n$flock$types$$string_to_utf8(str) {
9835
- const bytes = moonbitlang$core$array$$Array$new$46$inner$12$(0);
9890
+ const bytes = moonbitlang$core$array$$Array$new$46$inner$14$(0);
9836
9891
  let i = 0;
9837
9892
  while (true) {
9838
9893
  if (i < str.length) {
@@ -9845,27 +9900,27 @@ function zxch3n$flock$types$$string_to_utf8(str) {
9845
9900
  const low = str.charCodeAt(_tmp$2);
9846
9901
  if (low >= 56320 && low <= 57343) {
9847
9902
  const code_point = (65536 + (code - 55296 << 10) | 0) + (low - 56320 | 0) | 0;
9848
- moonbitlang$core$array$$Array$push$12$(bytes, (240 | code_point >> 18) & 255);
9849
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code_point >> 12 & 63) & 255);
9850
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code_point >> 6 & 63) & 255);
9851
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code_point & 63) & 255);
9903
+ moonbitlang$core$array$$Array$push$14$(bytes, (240 | code_point >> 18) & 255);
9904
+ moonbitlang$core$array$$Array$push$14$(bytes, (128 | code_point >> 12 & 63) & 255);
9905
+ moonbitlang$core$array$$Array$push$14$(bytes, (128 | code_point >> 6 & 63) & 255);
9906
+ moonbitlang$core$array$$Array$push$14$(bytes, (128 | code_point & 63) & 255);
9852
9907
  i = i + 1 | 0;
9853
9908
  } else {
9854
- moonbitlang$core$array$$Array$push$12$(bytes, (224 | code >> 12) & 255);
9855
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code >> 6 & 63) & 255);
9856
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code & 63) & 255);
9909
+ moonbitlang$core$array$$Array$push$14$(bytes, (224 | code >> 12) & 255);
9910
+ moonbitlang$core$array$$Array$push$14$(bytes, (128 | code >> 6 & 63) & 255);
9911
+ moonbitlang$core$array$$Array$push$14$(bytes, (128 | code & 63) & 255);
9857
9912
  }
9858
9913
  } else {
9859
9914
  if (code < 128) {
9860
- moonbitlang$core$array$$Array$push$12$(bytes, code & 255);
9915
+ moonbitlang$core$array$$Array$push$14$(bytes, code & 255);
9861
9916
  } else {
9862
9917
  if (code < 2048) {
9863
- moonbitlang$core$array$$Array$push$12$(bytes, (192 | code >> 6) & 255);
9864
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code & 63) & 255);
9918
+ moonbitlang$core$array$$Array$push$14$(bytes, (192 | code >> 6) & 255);
9919
+ moonbitlang$core$array$$Array$push$14$(bytes, (128 | code & 63) & 255);
9865
9920
  } else {
9866
- moonbitlang$core$array$$Array$push$12$(bytes, (224 | code >> 12) & 255);
9867
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code >> 6 & 63) & 255);
9868
- moonbitlang$core$array$$Array$push$12$(bytes, (128 | code & 63) & 255);
9921
+ moonbitlang$core$array$$Array$push$14$(bytes, (224 | code >> 12) & 255);
9922
+ moonbitlang$core$array$$Array$push$14$(bytes, (128 | code >> 6 & 63) & 255);
9923
+ moonbitlang$core$array$$Array$push$14$(bytes, (128 | code & 63) & 255);
9869
9924
  }
9870
9925
  }
9871
9926
  }
@@ -10131,7 +10186,7 @@ function zxch3n$flock$types$$compare_bytes(b1, b2) {
10131
10186
  }
10132
10187
  return $compare_int(n1, n2);
10133
10188
  }
10134
- function moonbitlang$core$builtin$$Compare$compare$7$(self, other) {
10189
+ function moonbitlang$core$builtin$$Compare$compare$6$(self, other) {
10135
10190
  const _bind = self;
10136
10191
  const _tmp = moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length);
10137
10192
  const _bind$2 = other;
@@ -10144,20 +10199,20 @@ function zxch3n$flock$memcomparable$$double_from_bits(bits) {
10144
10199
  return moonbitlang$core$uint64$$UInt64$reinterpret_as_double(bits);
10145
10200
  }
10146
10201
  function zxch3n$flock$memcomparable$$uint64_to_be_bytes(n) {
10147
- const bytes = moonbitlang$core$array$$Array$new$46$inner$12$(0);
10148
- 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)));
10149
- 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)));
10150
- 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)));
10151
- 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)));
10152
- 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)));
10153
- 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)));
10154
- 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)));
10155
- 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$14$(0);
10203
+ moonbitlang$core$array$$Array$push$14$(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$14$(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$14$(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$14$(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$14$(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$14$(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$14$(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$14$(bytes, moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(n, $255L)));
10156
10211
  return moonbitlang$core$bytes$$Bytes$from_array({ buf: bytes, start: 0, end: bytes.length });
10157
10212
  }
10158
10213
  function zxch3n$flock$memcomparable$$uint64_from_be_bytes(bytes) {
10159
10214
  if (bytes.length !== 8) {
10160
- 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");
10161
10216
  }
10162
10217
  let result = $0L;
10163
10218
  const _tmp = result;
@@ -10221,7 +10276,7 @@ function zxch3n$flock$memcomparable$$encode_bytes(bytes, output) {
10221
10276
  moonbitlang$core$buffer$$Buffer$write_byte(output, 1);
10222
10277
  const _it = moonbitlang$core$bytes$$BytesView$iterator(bytes);
10223
10278
  while (true) {
10224
- const _bind = moonbitlang$core$builtin$$Iterator$next$12$(_it);
10279
+ const _bind = moonbitlang$core$builtin$$Iterator$next$14$(_it);
10225
10280
  if (_bind === -1) {
10226
10281
  break;
10227
10282
  } else {
@@ -10284,14 +10339,14 @@ function zxch3n$flock$memcomparable$$biguint_to_be_bytes(n) {
10284
10339
  while (true) {
10285
10340
  if (moonbitlang$core$builtin$$Compare$op_gt$58$(x, 0n)) {
10286
10341
  const byte = moonbitlang$core$bigint$$BigInt$to_int(moonbitlang$core$builtin$$Mod$mod$21$(x, 256n));
10287
- moonbitlang$core$array$$Array$push$12$(bytes, byte & 255);
10342
+ moonbitlang$core$array$$Array$push$14$(bytes, byte & 255);
10288
10343
  x = moonbitlang$core$builtin$$Div$div$21$(x, 256n);
10289
10344
  continue;
10290
10345
  } else {
10291
10346
  break;
10292
10347
  }
10293
10348
  }
10294
- const _bind = moonbitlang$core$array$$Array$rev$12$(bytes);
10349
+ const _bind = moonbitlang$core$array$$Array$rev$14$(bytes);
10295
10350
  return moonbitlang$core$bytes$$Bytes$from_array({ buf: _bind, start: 0, end: _bind.length });
10296
10351
  }
10297
10352
  function zxch3n$flock$memcomparable$$bigint_to_be_bytes(n, output) {
@@ -10310,7 +10365,7 @@ function zxch3n$flock$memcomparable$$bigint_to_be_bytes(n, output) {
10310
10365
  } else {
10311
10366
  moonbitlang$core$buffer$$Buffer$write_byte(output, 11);
10312
10367
  if (n$2 > 255) {
10313
- moonbitlang$core$abort$$abort$4$("n is too large");
10368
+ moonbitlang$core$abort$$abort$3$("n is too large");
10314
10369
  }
10315
10370
  const _p = n$2 & 255;
10316
10371
  const _p$2 = 255;
@@ -10341,7 +10396,7 @@ function zxch3n$flock$memcomparable$$bigint_to_be_bytes(n, output) {
10341
10396
  } else {
10342
10397
  moonbitlang$core$buffer$$Buffer$write_byte(output, 29);
10343
10398
  if (n$2 > 255) {
10344
- moonbitlang$core$abort$$abort$4$("n is too large");
10399
+ moonbitlang$core$abort$$abort$3$("n is too large");
10345
10400
  }
10346
10401
  moonbitlang$core$buffer$$Buffer$write_byte(output, n$2 & 255);
10347
10402
  }
@@ -10562,12 +10617,12 @@ function zxch3n$flock$memcomparable$$decode_float(bytes, start) {
10562
10617
  if ((start + 8 | 0) > (bytes.end - bytes.start | 0)) {
10563
10618
  return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10564
10619
  }
10565
- const data = moonbitlang$core$array$$Array$new$46$inner$12$(0);
10620
+ const data = moonbitlang$core$array$$Array$new$46$inner$14$(0);
10566
10621
  let _tmp = 0;
10567
10622
  while (true) {
10568
10623
  const i = _tmp;
10569
10624
  if (i < 8) {
10570
- moonbitlang$core$array$$Array$push$12$(data, moonbitlang$core$bytes$$BytesView$at(bytes, start + i | 0));
10625
+ moonbitlang$core$array$$Array$push$14$(data, moonbitlang$core$bytes$$BytesView$at(bytes, start + i | 0));
10571
10626
  _tmp = i + 1 | 0;
10572
10627
  continue;
10573
10628
  } else {
@@ -10771,9 +10826,9 @@ function zxch3n$flock$memcomparable$$decode_key_to_json(bytes) {
10771
10826
  }
10772
10827
  break _L;
10773
10828
  }
10774
- key = moonbitlang$core$abort$$abort$2$("Failed to decode key");
10829
+ key = moonbitlang$core$abort$$abort$10$("Failed to decode key");
10775
10830
  }
10776
- const parts = moonbitlang$core$array$$Array$new$46$inner$14$(0);
10831
+ const parts = moonbitlang$core$array$$Array$new$46$inner$12$(0);
10777
10832
  const _arr = key.parts;
10778
10833
  const _len = _arr.length;
10779
10834
  let _tmp = 0;
@@ -10789,7 +10844,7 @@ function zxch3n$flock$memcomparable$$decode_key_to_json(bytes) {
10789
10844
  const _p$2 = _p;
10790
10845
  _tmp$2 = _p$2;
10791
10846
  }
10792
- moonbitlang$core$array$$Array$push$14$(parts, _tmp$2);
10847
+ moonbitlang$core$array$$Array$push$12$(parts, _tmp$2);
10793
10848
  _tmp = _i + 1 | 0;
10794
10849
  continue;
10795
10850
  } else {
@@ -11126,7 +11181,7 @@ function zxch3n$flock$sorted_map$$add_node$80$(root, key, value) {
11126
11181
  } else {
11127
11182
  const _Some = root;
11128
11183
  const _n = _Some;
11129
- if (moonbitlang$core$builtin$$Eq$equal$7$(key, _n.key)) {
11184
+ if (moonbitlang$core$builtin$$Eq$equal$6$(key, _n.key)) {
11130
11185
  _n.value = value;
11131
11186
  return { _0: _n, _1: false };
11132
11187
  } else {
@@ -11154,7 +11209,7 @@ function zxch3n$flock$sorted_map$$add_node$74$(root, key, value) {
11154
11209
  } else {
11155
11210
  const _Some = root;
11156
11211
  const _n = _Some;
11157
- if (moonbitlang$core$builtin$$Eq$equal$7$(key, _n.key)) {
11212
+ if (moonbitlang$core$builtin$$Eq$equal$6$(key, _n.key)) {
11158
11213
  _n.value = value;
11159
11214
  return { _0: _n, _1: false };
11160
11215
  } else {
@@ -11213,7 +11268,7 @@ function zxch3n$flock$sorted_map$$SortedMap$get$80$(self, key) {
11213
11268
  } else {
11214
11269
  const _Some = _param;
11215
11270
  const _node = _Some;
11216
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11271
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(key, _node.key);
11217
11272
  if (cmp === 0) {
11218
11273
  return new Option$Some$31$(_node.value);
11219
11274
  } else {
@@ -11237,7 +11292,7 @@ function zxch3n$flock$sorted_map$$SortedMap$get$74$(self, key) {
11237
11292
  } else {
11238
11293
  const _Some = _param;
11239
11294
  const _node = _Some;
11240
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11295
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(key, _node.key);
11241
11296
  if (cmp === 0) {
11242
11297
  return _node.value;
11243
11298
  } else {
@@ -11263,7 +11318,7 @@ function zxch3n$flock$sorted_map$$SortedMap$entry$74$(self, key) {
11263
11318
  } else {
11264
11319
  const _Some = _param;
11265
11320
  const _node = _Some;
11266
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11321
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(key, _node.key);
11267
11322
  if (cmp === 0) {
11268
11323
  return { _0: _node.value, _1: (v) => {
11269
11324
  _node.value = v;
@@ -11289,7 +11344,7 @@ function zxch3n$flock$sorted_map$$SortedMap$at$80$(self, key) {
11289
11344
  } else {
11290
11345
  const _Some = _param;
11291
11346
  const _node = _Some;
11292
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11347
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(key, _node.key);
11293
11348
  if (cmp === 0) {
11294
11349
  return _node.value;
11295
11350
  } else {
@@ -11371,14 +11426,14 @@ function zxch3n$flock$sorted_map$$range$46$go$47$2970(_env, x) {
11371
11426
  case 0: {
11372
11427
  const _Inclusive = low;
11373
11428
  const _lo = _Inclusive._0;
11374
- const cmp = moonbitlang$core$builtin$$Compare$compare$7$(_key, _lo);
11429
+ const cmp = moonbitlang$core$builtin$$Compare$compare$6$(_key, _lo);
11375
11430
  _bind = { _0: cmp > 0, _1: cmp >= 0 };
11376
11431
  break;
11377
11432
  }
11378
11433
  default: {
11379
11434
  const _Exclusive = low;
11380
11435
  const _lo$2 = _Exclusive._0;
11381
- 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);
11382
11437
  _bind = { _0: cmp$2 > 0, _1: cmp$2 > 0 };
11383
11438
  }
11384
11439
  }
@@ -11393,14 +11448,14 @@ function zxch3n$flock$sorted_map$$range$46$go$47$2970(_env, x) {
11393
11448
  case 0: {
11394
11449
  const _Inclusive$2 = high;
11395
11450
  const _hi = _Inclusive$2._0;
11396
- const cmp$3 = moonbitlang$core$builtin$$Compare$compare$7$(_key, _hi);
11451
+ const cmp$3 = moonbitlang$core$builtin$$Compare$compare$6$(_key, _hi);
11397
11452
  _bind$2 = { _0: cmp$3 < 0, _1: cmp$3 <= 0 };
11398
11453
  break;
11399
11454
  }
11400
11455
  default: {
11401
11456
  const _Exclusive$2 = high;
11402
11457
  const _hi$2 = _Exclusive$2._0;
11403
- 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);
11404
11459
  _bind$2 = { _0: cmp$4 < 0, _1: cmp$4 < 0 };
11405
11460
  }
11406
11461
  }
@@ -11451,10 +11506,10 @@ function zxch3n$flock$sorted_map$$SortedMap$range$74$(self, low, high) {
11451
11506
  return _p;
11452
11507
  }
11453
11508
  function moonbitlang$core$builtin$$Eq$equal$66$(self, other) {
11454
- return moonbitlang$core$builtin$$Eq$equal$7$(self.key, other.key);
11509
+ return moonbitlang$core$builtin$$Eq$equal$6$(self.key, other.key);
11455
11510
  }
11456
11511
  function moonbitlang$core$builtin$$Eq$equal$67$(self, other) {
11457
- return moonbitlang$core$builtin$$Eq$equal$7$(self.key, other.key);
11512
+ return moonbitlang$core$builtin$$Eq$equal$6$(self.key, other.key);
11458
11513
  }
11459
11514
  function zxch3n$flock$flock$$SubscriberSet$new$81$() {
11460
11515
  return { seq: 0, subscribers: moonbitlang$core$builtin$$Map$new$46$inner$72$(8) };
@@ -11498,7 +11553,7 @@ function zxch3n$flock$flock$$bytes_to_hex(bytes) {
11498
11553
  if (i < bytes.length) {
11499
11554
  $bound_check(bytes, i);
11500
11555
  const byte = bytes[i];
11501
- const _p = moonbitlang$core$builtin$$Shr$shr$12$(byte, 4);
11556
+ const _p = moonbitlang$core$builtin$$Shr$shr$14$(byte, 4);
11502
11557
  const _p$2 = 15;
11503
11558
  const hi = _p & _p$2 & 255;
11504
11559
  const _p$3 = 15;
@@ -11517,7 +11572,7 @@ function zxch3n$flock$flock$$bytes_to_hex(bytes) {
11517
11572
  }
11518
11573
  function zxch3n$flock$flock$$bytes_from_hex(hex) {
11519
11574
  if (((hex.end - hex.start | 0) % 2 | 0) !== 0) {
11520
- 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)}`);
11521
11576
  return undefined;
11522
11577
  }
11523
11578
  const bytes = [];
@@ -11537,7 +11592,7 @@ function zxch3n$flock$flock$$bytes_from_hex(hex) {
11537
11592
  if (first >= 65 && first <= 70) {
11538
11593
  value = value + (Math.imul((first - 65 | 0) + 10 | 0, 16) | 0) | 0;
11539
11594
  } else {
11540
- 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)}`);
11541
11596
  return undefined;
11542
11597
  }
11543
11598
  }
@@ -11551,12 +11606,12 @@ function zxch3n$flock$flock$$bytes_from_hex(hex) {
11551
11606
  if (second >= 65 && second <= 70) {
11552
11607
  value = value + ((second - 65 | 0) + 10 | 0) | 0;
11553
11608
  } else {
11554
- 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)}`);
11555
11610
  return undefined;
11556
11611
  }
11557
11612
  }
11558
11613
  }
11559
- moonbitlang$core$array$$Array$push$12$(bytes, value & 255);
11614
+ moonbitlang$core$array$$Array$push$14$(bytes, value & 255);
11560
11615
  _tmp = i + 2 | 0;
11561
11616
  continue;
11562
11617
  } else {
@@ -11572,7 +11627,7 @@ function moonbitlang$core$builtin$$Compare$compare$56$(a, b) {
11572
11627
  if (ans !== 0) {
11573
11628
  return ans;
11574
11629
  }
11575
- return moonbitlang$core$builtin$$Compare$compare$7$(a.peer, b.peer);
11630
+ return moonbitlang$core$builtin$$Compare$compare$6$(a.peer, b.peer);
11576
11631
  }
11577
11632
  function zxch3n$flock$flock$$Hlc$to_string(self) {
11578
11633
  return `${moonbitlang$core$builtin$$Show$to_string$61$(self.physical_time)},${moonbitlang$core$builtin$$Show$to_string$19$(self.logical_counter)}`;
@@ -11581,7 +11636,7 @@ function zxch3n$flock$flock$$HlcWithPeer$to_string(self) {
11581
11636
  return `${zxch3n$flock$flock$$Hlc$to_string(self.hlc)},${zxch3n$flock$flock$$bytes_to_hex(self.peer)}`;
11582
11637
  }
11583
11638
  function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
11584
- const _bind = moonbitlang$core$builtin$$Iter$collect$16$(moonbitlang$core$string$$StringView$split(s, { str: zxch3n$flock$flock$$from_string$46$42$bind$124$593, start: 0, end: zxch3n$flock$flock$$from_string$46$42$bind$124$593.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 }));
11585
11640
  if (_bind.length === 3) {
11586
11641
  const _a = _bind[0];
11587
11642
  const _b = _bind[1];
@@ -11590,7 +11645,7 @@ function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
11590
11645
  let _try_err;
11591
11646
  _L: {
11592
11647
  _L$2: {
11593
- const _bind$2 = moonbitlang$core$builtin$$Show$to_string$16$(_a);
11648
+ const _bind$2 = moonbitlang$core$builtin$$Show$to_string$15$(_a);
11594
11649
  const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: _bind$2, start: 0, end: _bind$2.length }, 1024);
11595
11650
  let _tmp$2;
11596
11651
  if (_bind$3.$tag === 1) {
@@ -11612,7 +11667,7 @@ function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
11612
11667
  let _try_err$2;
11613
11668
  _L$2: {
11614
11669
  _L$3: {
11615
- const _bind$2 = moonbitlang$core$builtin$$Show$to_string$16$(_b);
11670
+ const _bind$2 = moonbitlang$core$builtin$$Show$to_string$15$(_b);
11616
11671
  const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: _bind$2, start: 0, end: _bind$2.length }, 1024);
11617
11672
  let _tmp$4;
11618
11673
  if (_bind$3.$tag === 1) {
@@ -11815,7 +11870,7 @@ function zxch3n$flock$flock$$DigestWriter$write_json(self, value) {
11815
11870
  while (true) {
11816
11871
  const i = _tmp;
11817
11872
  if (i < _arr.length) {
11818
- zxch3n$flock$flock$$DigestWriter$write_json(self, moonbitlang$core$array$$Array$at$14$(_arr, i));
11873
+ zxch3n$flock$flock$$DigestWriter$write_json(self, moonbitlang$core$array$$Array$at$12$(_arr, i));
11819
11874
  _tmp = i + 1 | 0;
11820
11875
  continue;
11821
11876
  } else {
@@ -11946,13 +12001,13 @@ function zxch3n$flock$flock$$make_entry(key, value) {
11946
12001
  return { key: key, value: value, overridden: false };
11947
12002
  }
11948
12003
  function zxch3n$flock$flock$$entries_equal(a, b) {
11949
- if (moonbitlang$core$builtin$$Eq$equal$7$(a.key, b.key)) {
12004
+ if (moonbitlang$core$builtin$$Eq$equal$6$(a.key, b.key)) {
11950
12005
  let _tmp;
11951
12006
  if (moonbitlang$core$builtin$$Eq$equal$45$(a.value.data, b.value.data)) {
11952
12007
  let _tmp$2;
11953
12008
  if (moonbitlang$core$builtin$$Eq$equal$65$(a.value.metadata, b.value.metadata)) {
11954
12009
  let _tmp$3;
11955
- 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)) {
11956
12011
  const _p = a.value.clock.hlc;
11957
12012
  const _p$2 = b.value.clock.hlc;
11958
12013
  _tmp$3 = _p.physical_time === _p$2.physical_time && _p.logical_counter === _p$2.logical_counter;
@@ -12197,7 +12252,7 @@ function zxch3n$flock$flock$$Flock$check_consistency(a, b) {
12197
12252
  const _bind$2 = moonbitlang$core$array$$Array$at$52$(entries_b, i);
12198
12253
  const _key_b = _bind$2._0;
12199
12254
  const _entry_b = _bind$2._1;
12200
- if (moonbitlang$core$builtin$$op_notequal$7$(_key_a, _key_b)) {
12255
+ if (moonbitlang$core$builtin$$op_notequal$6$(_key_a, _key_b)) {
12201
12256
  return false;
12202
12257
  }
12203
12258
  if (!zxch3n$flock$flock$$entries_equal(_entry_a, _entry_b)) {
@@ -12344,12 +12399,12 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
12344
12399
  if ((bytes.end - bytes.start | 0) === 0) {
12345
12400
  return undefined;
12346
12401
  }
12347
- 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$14$(bytes.end - bytes.start | 0);
12348
12403
  let _tmp = 0;
12349
12404
  while (true) {
12350
12405
  const i = _tmp;
12351
12406
  if (i < (bytes.end - bytes.start | 0)) {
12352
- moonbitlang$core$array$$Array$push$12$(data, moonbitlang$core$bytes$$BytesView$at(bytes, i));
12407
+ moonbitlang$core$array$$Array$push$14$(data, moonbitlang$core$bytes$$BytesView$at(bytes, i));
12353
12408
  _tmp = i + 1 | 0;
12354
12409
  continue;
12355
12410
  } else {
@@ -12360,15 +12415,15 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
12360
12415
  while (true) {
12361
12416
  const i = _tmp$2;
12362
12417
  if (i >= 0) {
12363
- const current = moonbitlang$core$array$$Array$at$12$(data, i);
12418
+ const current = moonbitlang$core$array$$Array$at$14$(data, i);
12364
12419
  if (current < 255) {
12365
- moonbitlang$core$array$$Array$set$12$(data, i, (current + 1 | 0) & 255);
12366
- const truncated = moonbitlang$core$array$$Array$new$46$inner$12$(i + 1 | 0);
12420
+ moonbitlang$core$array$$Array$set$14$(data, i, (current + 1 | 0) & 255);
12421
+ const truncated = moonbitlang$core$array$$Array$new$46$inner$14$(i + 1 | 0);
12367
12422
  let _tmp$3 = 0;
12368
12423
  while (true) {
12369
12424
  const j = _tmp$3;
12370
12425
  if (j <= i) {
12371
- moonbitlang$core$array$$Array$push$12$(truncated, moonbitlang$core$array$$Array$at$12$(data, j));
12426
+ moonbitlang$core$array$$Array$push$14$(truncated, moonbitlang$core$array$$Array$at$14$(data, j));
12372
12427
  _tmp$3 = j + 1 | 0;
12373
12428
  continue;
12374
12429
  } else {
@@ -12385,7 +12440,7 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
12385
12440
  }
12386
12441
  return undefined;
12387
12442
  }
12388
- function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, bytes, inclusive) {
12443
+ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$380(_env, bytes, inclusive) {
12389
12444
  const lower_inclusive = _env._1;
12390
12445
  const lower_bytes = _env._0;
12391
12446
  const _bind = lower_bytes.val;
@@ -12411,7 +12466,7 @@ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, bytes, i
12411
12466
  }
12412
12467
  }
12413
12468
  }
12414
- function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env, bytes, inclusive) {
12469
+ function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$392(_env, bytes, inclusive) {
12415
12470
  const upper_inclusive = _env._1;
12416
12471
  const upper_bytes = _env._0;
12417
12472
  const _bind = upper_bytes.val;
@@ -12438,14 +12493,14 @@ function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env, bytes, i
12438
12493
  }
12439
12494
  }
12440
12495
  function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12441
- const prefix_filter = { val: moonbitlang$core$array$$Array$new$46$inner$14$(0) };
12496
+ const prefix_filter = { val: moonbitlang$core$array$$Array$new$46$inner$12$(0) };
12442
12497
  const has_prefix_filter = { val: false };
12443
12498
  let prefix_bytes = undefined;
12444
12499
  let prefix_upper_bytes = undefined;
12445
12500
  if (prefix.$tag === 1) {
12446
12501
  const _Some = prefix;
12447
12502
  const _p = _Some._0;
12448
- prefix_filter.val = moonbitlang$core$array$$Array$copy$14$(_p);
12503
+ prefix_filter.val = moonbitlang$core$array$$Array$copy$12$(_p);
12449
12504
  has_prefix_filter.val = true;
12450
12505
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(_p);
12451
12506
  if (_bind === undefined) {
@@ -12529,19 +12584,19 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12529
12584
  } else {
12530
12585
  const _Some = _bind$5;
12531
12586
  const _prefix_key = _Some;
12532
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, _prefix_key, true);
12587
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$380(_env, _prefix_key, true);
12533
12588
  }
12534
12589
  switch (start_bound_bytes.$tag) {
12535
12590
  case 0: {
12536
12591
  const _Inclusive$3 = start_bound_bytes;
12537
12592
  const _start_key = _Inclusive$3._0;
12538
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, _start_key, true);
12593
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$380(_env, _start_key, true);
12539
12594
  break;
12540
12595
  }
12541
12596
  case 1: {
12542
12597
  const _Exclusive$3 = start_bound_bytes;
12543
12598
  const _start_key$2 = _Exclusive$3._0;
12544
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, _start_key$2, false);
12599
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$380(_env, _start_key$2, false);
12545
12600
  break;
12546
12601
  }
12547
12602
  }
@@ -12562,19 +12617,19 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12562
12617
  } else {
12563
12618
  const _Some = _bind$7;
12564
12619
  const _prefix_upper = _Some;
12565
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env$2, _prefix_upper, false);
12620
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$392(_env$2, _prefix_upper, false);
12566
12621
  }
12567
12622
  switch (end_bound_bytes.$tag) {
12568
12623
  case 0: {
12569
12624
  const _Inclusive$4 = end_bound_bytes;
12570
12625
  const _end_key = _Inclusive$4._0;
12571
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env$2, _end_key, true);
12626
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$392(_env$2, _end_key, true);
12572
12627
  break;
12573
12628
  }
12574
12629
  case 1: {
12575
12630
  const _Exclusive$4 = end_bound_bytes;
12576
12631
  const _end_key$2 = _Exclusive$4._0;
12577
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env$2, _end_key$2, false);
12632
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$392(_env$2, _end_key$2, false);
12578
12633
  break;
12579
12634
  }
12580
12635
  }
@@ -12599,7 +12654,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12599
12654
  while (true) {
12600
12655
  const i = _tmp;
12601
12656
  if (i < prefix_filter.val.length) {
12602
- if (moonbitlang$core$builtin$$op_notequal$14$(moonbitlang$core$array$$Array$at$14$(prefix_filter.val, i), moonbitlang$core$array$$Array$at$14$(key_json, i))) {
12657
+ if (moonbitlang$core$builtin$$op_notequal$12$(moonbitlang$core$array$$Array$at$12$(prefix_filter.val, i), moonbitlang$core$array$$Array$at$12$(key_json, i))) {
12603
12658
  matches = false;
12604
12659
  break;
12605
12660
  }
@@ -12645,7 +12700,7 @@ function zxch3n$flock$flock$$Flock$subscribe(self, listener) {
12645
12700
  function zxch3n$flock$flock$$Flock$version(self) {
12646
12701
  return moonbitlang$core$builtin$$Map$copy$71$(self.vv);
12647
12702
  }
12648
- function zxch3n$flock$flock$$Flock$export_json(self, from) {
12703
+ function zxch3n$flock$flock$$Flock$export_json$46$inner(self, from, prune_tombstones_before) {
12649
12704
  const ans = moonbitlang$core$builtin$$Map$new$46$inner$37$(8);
12650
12705
  const _p = 0;
12651
12706
  const _p$2 = undefined;
@@ -12698,6 +12753,16 @@ function zxch3n$flock$flock$$Flock$export_json(self, from) {
12698
12753
  if (update.overridden) {
12699
12754
  break _L$3;
12700
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
+ }
12701
12766
  const key = zxch3n$flock$memcomparable$$decode_key_to_json(update.key);
12702
12767
  const exported_value = update.value;
12703
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));
@@ -12751,6 +12816,16 @@ function zxch3n$flock$flock$$Flock$export_json(self, from) {
12751
12816
  moonbitlang$core$builtin$$Map$set$37$(ans, "entries", new $64$moonbitlang$47$core$47$builtin$46$Json$Object(entries));
12752
12817
  return new $64$moonbitlang$47$core$47$builtin$46$Json$Object(ans);
12753
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
+ }
12754
12829
  function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12755
12830
  if (json.$tag === 6) {
12756
12831
  const _Object = json;
@@ -12843,12 +12918,12 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12843
12918
  if (key_json.$tag === 5) {
12844
12919
  const _Array = key_json;
12845
12920
  const _parts = _Array._0;
12846
- const key_parts = moonbitlang$core$array$$Array$new$46$inner$14$(0);
12921
+ const key_parts = moonbitlang$core$array$$Array$new$46$inner$12$(0);
12847
12922
  let _tmp = 0;
12848
12923
  while (true) {
12849
12924
  const i = _tmp;
12850
12925
  if (i < _parts.length) {
12851
- moonbitlang$core$array$$Array$push$14$(key_parts, moonbitlang$core$array$$Array$at$14$(_parts, i));
12926
+ moonbitlang$core$array$$Array$push$12$(key_parts, moonbitlang$core$array$$Array$at$12$(_parts, i));
12852
12927
  _tmp = i + 1 | 0;
12853
12928
  continue;
12854
12929
  } else {
@@ -12877,7 +12952,7 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12877
12952
  } else {
12878
12953
  const _Skip = _bind$4;
12879
12954
  const _reason = _Skip._0;
12880
- moonbitlang$core$array$$Array$push$50$(skipped_entries, { key: moonbitlang$core$array$$Array$copy$14$(key_parts), reason: _reason });
12955
+ moonbitlang$core$array$$Array$push$50$(skipped_entries, { key: moonbitlang$core$array$$Array$copy$12$(key_parts), reason: _reason });
12881
12956
  return 1;
12882
12957
  }
12883
12958
  }
@@ -12902,9 +12977,9 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12902
12977
  const _bind$5 = events.val;
12903
12978
  if (_bind$5.$tag === 1) {
12904
12979
  const _Some$2 = _bind$5;
12905
- const _evts = _Some$2._0;
12980
+ const _events_ = _Some$2._0;
12906
12981
  const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
12907
- 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) });
12908
12983
  }
12909
12984
  }
12910
12985
  }
@@ -12945,7 +13020,7 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12945
13020
  const _Some = _bind$2;
12946
13021
  const _events = _Some._0;
12947
13022
  if (_events.length > 0) {
12948
- zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3475, 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 });
12949
13024
  }
12950
13025
  }
12951
13026
  return new Result$Ok$37$({ accepted: accepted.val, skipped: skipped_entries });
@@ -12967,7 +13042,7 @@ function zxch3n$flock$flock$$Flock$merge(self, other) {
12967
13042
  let _try_err;
12968
13043
  _L: {
12969
13044
  _L$2: {
12970
- const _bind = zxch3n$flock$flock$$Flock$import_json(self, zxch3n$flock$flock$$Flock$export_json(other, zxch3n$flock$flock$$Flock$version(self)), Option$None$40$);
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$);
12971
13046
  if (_bind.$tag === 1) {
12972
13047
  const _ok = _bind;
12973
13048
  _ok._0;
@@ -12995,7 +13070,7 @@ function zxch3n$flock$flock$$Flock$from_json(json, peer_id) {
12995
13070
  return new Result$Ok$41$(flock);
12996
13071
  }
12997
13072
  function zxch3n$flock$flock$$Flock$kv_to_json(self) {
12998
- return zxch3n$flock$flock$$Flock$export_json(self, undefined);
13073
+ return zxch3n$flock$flock$$Flock$export_json(self, undefined, undefined);
12999
13074
  }
13000
13075
  function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13001
13076
  const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$42$ };
@@ -13044,7 +13119,7 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13044
13119
  $panic();
13045
13120
  }
13046
13121
  }
13047
- const key$2 = moonbitlang$core$array$$Array$copy$14$(key);
13122
+ const key$2 = moonbitlang$core$array$$Array$copy$12$(key);
13048
13123
  _L: {
13049
13124
  _L$2: {
13050
13125
  switch (value.$tag) {
@@ -13062,7 +13137,7 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13062
13137
  }
13063
13138
  return new Result$Err$32$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidValueForMvr(value));
13064
13139
  }
13065
- moonbitlang$core$array$$Array$push$14$(key$2, value);
13140
+ moonbitlang$core$array$$Array$push$12$(key$2, value);
13066
13141
  const _p = true;
13067
13142
  const _tmp$2 = _p ? $64$moonbitlang$47$core$47$builtin$46$Json$True : $64$moonbitlang$47$core$47$builtin$46$Json$False;
13068
13143
  return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$33$, now, Option$None$34$);
@@ -13083,8 +13158,8 @@ function zxch3n$flock$flock$$Flock$get_mvr(self, key) {
13083
13158
  if (_tmp) {
13084
13159
  return 1;
13085
13160
  }
13086
- const value = moonbitlang$core$array$$Array$at$14$(k, key.length);
13087
- moonbitlang$core$array$$Array$push$14$(ans, value);
13161
+ const value = moonbitlang$core$array$$Array$at$12$(k, key.length);
13162
+ moonbitlang$core$array$$Array$push$12$(ans, value);
13088
13163
  return 1;
13089
13164
  });
13090
13165
  const _tmp = _foreach_result;
@@ -13117,7 +13192,7 @@ function zxch3n$flock$flock$$Flock$newFlock(peer_id) {
13117
13192
  const _bind$3 = zxch3n$flock$sorted_map$$SortedMap$new$80$();
13118
13193
  const _bind$4 = zxch3n$flock$flock$$SubscriberSet$new$81$();
13119
13194
  const _bind$5 = undefined;
13120
- return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$newFlock$46$42$bind$47$3584, 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 };
13121
13196
  }
13122
13197
  function zxch3n$flock$flock$$json_stringify_value(value) {
13123
13198
  return zxch3n$flock$flock$$ffi_json_stringify_value(value);
@@ -13153,53 +13228,59 @@ function zxch3n$flock$flock$$Flock$put_ffi(self, key, value, now) {
13153
13228
  _try_err = _tmp;
13154
13229
  break _L;
13155
13230
  }
13156
- const _bind$2 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:23:31-23:51");
13157
- let _tmp;
13158
- if (_bind$2.$tag === 1) {
13159
- const _ok = _bind$2;
13160
- _tmp = _ok._0;
13161
- } else {
13162
- const _err = _bind$2;
13163
- const _tmp$2 = _err._0;
13164
- _try_err = _tmp$2;
13165
- break _L;
13231
+ let value$2;
13232
+ let _try_err$2;
13233
+ _L$2: {
13234
+ _L$3: {
13235
+ const _bind$2 = moonbitlang$core$json$$parse$46$inner({ str: value, start: 0, end: value.length }, 1024);
13236
+ if (_bind$2.$tag === 1) {
13237
+ const _ok = _bind$2;
13238
+ value$2 = _ok._0;
13239
+ } else {
13240
+ const _err = _bind$2;
13241
+ const _tmp = _err._0;
13242
+ _try_err$2 = _tmp;
13243
+ break _L$3;
13244
+ }
13245
+ break _L$2;
13246
+ }
13247
+ value$2 = $panic();
13166
13248
  }
13167
- const value$2 = zxch3n$flock$flock$$value_to_json(_tmp);
13168
- const _bind$3 = Yoorkin$jmop$$Value$to_array$76$(key$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:24:40-24:54");
13249
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:24:40-24:54");
13169
13250
  let key_arr;
13170
- if (_bind$3.$tag === 1) {
13171
- const _ok = _bind$3;
13251
+ if (_bind$2.$tag === 1) {
13252
+ const _ok = _bind$2;
13172
13253
  key_arr = _ok._0;
13173
13254
  } else {
13174
- const _err = _bind$3;
13175
- const _tmp$2 = _err._0;
13176
- _try_err = _tmp$2;
13255
+ const _err = _bind$2;
13256
+ const _tmp = _err._0;
13257
+ _try_err = _tmp;
13177
13258
  break _L;
13178
13259
  }
13179
13260
  const _p = new Array(key_arr.length);
13180
13261
  const _p$2 = key_arr.length;
13181
- let _tmp$2 = 0;
13262
+ let _tmp = 0;
13182
13263
  while (true) {
13183
- const _p$3 = _tmp$2;
13264
+ const _p$3 = _tmp;
13184
13265
  if (_p$3 < _p$2) {
13185
13266
  const _p$4 = key_arr[_p$3];
13186
13267
  _p[_p$3] = zxch3n$flock$flock$$value_to_json(_p$4);
13187
- _tmp$2 = _p$3 + 1 | 0;
13268
+ _tmp = _p$3 + 1 | 0;
13188
13269
  continue;
13189
13270
  } else {
13190
13271
  break;
13191
13272
  }
13192
13273
  }
13193
13274
  const key_arr$2 = _p;
13194
- 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$);
13195
- if (_bind$4.$tag === 1) {
13196
- const _ok = _bind$4;
13275
+ const _bind$3 = zxch3n$flock$flock$$Flock$put_inner(self, key_arr$2, value$2, Option$None$33$, new Option$Some$8$(now), Option$None$34$);
13276
+ if (_bind$3.$tag === 1) {
13277
+ const _ok = _bind$3;
13197
13278
  _ok._0;
13198
13279
  return;
13199
13280
  } else {
13200
- const _err = _bind$4;
13201
- const _tmp$3 = _err._0;
13202
- _try_err = _tmp$3;
13281
+ const _err = _bind$3;
13282
+ const _tmp$2 = _err._0;
13283
+ _try_err = _tmp$2;
13203
13284
  break _L;
13204
13285
  }
13205
13286
  }
@@ -13240,7 +13321,7 @@ function zxch3n$flock$flock$$json_to_metadata(json) {
13240
13321
  return undefined;
13241
13322
  }
13242
13323
  default: {
13243
- return moonbitlang$core$abort$$abort$6$("metadata must be an object or null");
13324
+ return moonbitlang$core$abort$$abort$5$("metadata must be an object or null");
13244
13325
  }
13245
13326
  }
13246
13327
  }
@@ -13313,7 +13394,7 @@ function zxch3n$flock$flock$$json_to_version_vector(json) {
13313
13394
  const _bind$2 = zxch3n$flock$flock$$bytes_from_hex({ str: peer_hex, start: 0, end: peer_hex.length });
13314
13395
  let bytes;
13315
13396
  if (_bind$2 === undefined) {
13316
- bytes = moonbitlang$core$abort$$abort$3$("invalid peer id in version vector");
13397
+ bytes = moonbitlang$core$abort$$abort$2$("invalid peer id in version vector");
13317
13398
  } else {
13318
13399
  const _Some = _bind$2;
13319
13400
  bytes = _Some;
@@ -13325,8 +13406,8 @@ function zxch3n$flock$flock$$json_to_version_vector(json) {
13325
13406
  const _Array = raw_clock;
13326
13407
  const _parts = _Array._0;
13327
13408
  if (_parts.length >= 2) {
13328
- const physical_time = moonbitlang$core$option$$Option$unwrap$24$(moonbitlang$core$json$$Json$as_number(moonbitlang$core$array$$Array$at$14$(_parts, 0)));
13329
- const logical_counter = moonbitlang$core$double$$Double$to_int(moonbitlang$core$option$$Option$unwrap$24$(moonbitlang$core$json$$Json$as_number(moonbitlang$core$array$$Array$at$14$(_parts, 1))));
13409
+ const physical_time = moonbitlang$core$option$$Option$unwrap$24$(moonbitlang$core$json$$Json$as_number(moonbitlang$core$array$$Array$at$12$(_parts, 0)));
13410
+ const logical_counter = moonbitlang$core$double$$Double$to_int(moonbitlang$core$option$$Option$unwrap$24$(moonbitlang$core$json$$Json$as_number(moonbitlang$core$array$$Array$at$12$(_parts, 1))));
13330
13411
  moonbitlang$core$builtin$$Map$set$71$(vv, peer, { physical_time: physical_time, logical_counter: logical_counter });
13331
13412
  } else {
13332
13413
  break _L$2;
@@ -13336,23 +13417,23 @@ function zxch3n$flock$flock$$json_to_version_vector(json) {
13336
13417
  }
13337
13418
  break _L;
13338
13419
  }
13339
- moonbitlang$core$abort$$abort$4$("version vector entry must be [physical_time, logical_counter]");
13420
+ moonbitlang$core$abort$$abort$3$("version vector entry must be [physical_time, logical_counter]");
13340
13421
  }
13341
13422
  return 1;
13342
13423
  });
13343
13424
  return vv;
13344
13425
  } else {
13345
- return moonbitlang$core$abort$$abort$5$("version vector must be an object");
13426
+ return moonbitlang$core$abort$$abort$4$("version vector must be an object");
13346
13427
  }
13347
13428
  }
13348
- function zxch3n$flock$flock$$Flock$export_json_ffi(self, from) {
13429
+ function zxch3n$flock$flock$$Flock$export_json_ffi(self, from, prune_tombstones_before) {
13349
13430
  let _try_err;
13350
13431
  _L: {
13351
13432
  let export_from;
13352
13433
  if (zxch3n$flock$flock$$any_is_undefined(from) || zxch3n$flock$flock$$any_is_null(from)) {
13353
13434
  export_from = undefined;
13354
13435
  } else {
13355
- const _bind = Yoorkin$jmop$$Any$unwrap_value(from, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:78:32-78:51");
13436
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(from, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:82:32-82:51");
13356
13437
  let _tmp;
13357
13438
  if (_bind.$tag === 1) {
13358
13439
  const _ok = _bind;
@@ -13366,13 +13447,41 @@ function zxch3n$flock$flock$$Flock$export_json_ffi(self, from) {
13366
13447
  const json = zxch3n$flock$flock$$value_to_json(_tmp);
13367
13448
  export_from = zxch3n$flock$flock$$json_to_version_vector(json);
13368
13449
  }
13450
+ let prune_before;
13451
+ if (zxch3n$flock$flock$$any_is_undefined(prune_tombstones_before) || zxch3n$flock$flock$$any_is_null(prune_tombstones_before)) {
13452
+ prune_before = Option$None$8$;
13453
+ } else {
13454
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(prune_tombstones_before, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:89:12-89:50");
13455
+ let _tmp;
13456
+ if (_bind.$tag === 1) {
13457
+ const _ok = _bind;
13458
+ _tmp = _ok._0;
13459
+ } else {
13460
+ const _err = _bind;
13461
+ const _tmp$2 = _err._0;
13462
+ _try_err = _tmp$2;
13463
+ break _L;
13464
+ }
13465
+ const _bind$2 = Yoorkin$jmop$$Value$to_number(_tmp, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:89:12-89:62");
13466
+ let _tmp$2;
13467
+ if (_bind$2.$tag === 1) {
13468
+ const _ok = _bind$2;
13469
+ _tmp$2 = _ok._0;
13470
+ } else {
13471
+ const _err = _bind$2;
13472
+ const _tmp$3 = _err._0;
13473
+ _try_err = _tmp$3;
13474
+ break _L;
13475
+ }
13476
+ prune_before = new Option$Some$8$(_tmp$2);
13477
+ }
13369
13478
  let exported;
13370
13479
  if (export_from === undefined) {
13371
- exported = zxch3n$flock$flock$$Flock$export_json(self, undefined);
13480
+ exported = zxch3n$flock$flock$$Flock$export_json$46$inner(self, undefined, prune_before);
13372
13481
  } else {
13373
13482
  const _Some = export_from;
13374
13483
  const _vv = _Some;
13375
- exported = zxch3n$flock$flock$$Flock$export_json(self, _vv);
13484
+ exported = zxch3n$flock$flock$$Flock$export_json$46$inner(self, _vv, prune_before);
13376
13485
  }
13377
13486
  const _p = zxch3n$flock$flock$$json_to_value(exported);
13378
13487
  return _p;
@@ -13383,7 +13492,7 @@ function zxch3n$flock$flock$$Flock$import_json_ffi(self, json) {
13383
13492
  let _try_err;
13384
13493
  _L: {
13385
13494
  if (!(zxch3n$flock$flock$$any_is_undefined(json) || zxch3n$flock$flock$$any_is_null(json))) {
13386
- const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:95:32-95:51");
13495
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:106:32-106:51");
13387
13496
  let _tmp;
13388
13497
  if (_bind.$tag === 1) {
13389
13498
  const _ok = _bind;
@@ -13413,7 +13522,7 @@ function zxch3n$flock$flock$$Flock$import_json_ffi(self, json) {
13413
13522
  }
13414
13523
  report = $panic();
13415
13524
  }
13416
- const skipped_rows = moonbitlang$core$array$$Array$new$46$inner$14$(0);
13525
+ const skipped_rows = moonbitlang$core$array$$Array$new$46$inner$12$(0);
13417
13526
  let _tmp$2 = 0;
13418
13527
  while (true) {
13419
13528
  const i = _tmp$2;
@@ -13423,7 +13532,7 @@ function zxch3n$flock$flock$$Flock$import_json_ffi(self, json) {
13423
13532
  moonbitlang$core$builtin$$Map$set$37$(obj, "key", moonbitlang$core$builtin$$ToJson$to_json$32$(skipped.key));
13424
13533
  const _p = skipped.reason;
13425
13534
  moonbitlang$core$builtin$$Map$set$37$(obj, "reason", new $64$moonbitlang$47$core$47$builtin$46$Json$String(_p));
13426
- moonbitlang$core$array$$Array$push$14$(skipped_rows, moonbitlang$core$builtin$$ToJson$to_json$33$(obj));
13535
+ moonbitlang$core$array$$Array$push$12$(skipped_rows, moonbitlang$core$builtin$$ToJson$to_json$33$(obj));
13427
13536
  _tmp$2 = i + 1 | 0;
13428
13537
  continue;
13429
13538
  } else {
@@ -13462,7 +13571,7 @@ function zxch3n$flock$flock$$peer_id_to_hex(peer) {
13462
13571
  function zxch3n$flock$flock$$hex_to_peer_id(hex) {
13463
13572
  const _bind = zxch3n$flock$flock$$bytes_from_hex({ str: hex, start: 0, end: hex.length });
13464
13573
  if (_bind === undefined) {
13465
- return moonbitlang$core$abort$$abort$7$("invalid peer id hex");
13574
+ return moonbitlang$core$abort$$abort$6$("invalid peer id hex");
13466
13575
  } else {
13467
13576
  const _Some = _bind;
13468
13577
  const _bytes = _Some;
@@ -13491,7 +13600,7 @@ function zxch3n$flock$flock$$bound_from_json(json) {
13491
13600
  }
13492
13601
  break _L;
13493
13602
  }
13494
- kind = moonbitlang$core$abort$$abort$8$("bound.kind must be a string");
13603
+ kind = moonbitlang$core$abort$$abort$7$("bound.kind must be a string");
13495
13604
  }
13496
13605
  let key;
13497
13606
  _L$2: {
@@ -13505,18 +13614,18 @@ function zxch3n$flock$flock$$bound_from_json(json) {
13505
13614
  if (_x.$tag === 5) {
13506
13615
  const _Array = _x;
13507
13616
  const _arr = _Array._0;
13508
- key = moonbitlang$core$array$$Array$copy$14$(_arr);
13617
+ key = moonbitlang$core$array$$Array$copy$12$(_arr);
13509
13618
  } else {
13510
13619
  break _L$3;
13511
13620
  }
13512
13621
  }
13513
13622
  break _L$2;
13514
13623
  }
13515
- key = moonbitlang$core$abort$$abort$9$("bound.key must be an array");
13624
+ key = moonbitlang$core$abort$$abort$8$("bound.key must be an array");
13516
13625
  }
13517
- 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$10$("unexpected bound.kind");
13626
+ 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");
13518
13627
  } else {
13519
- return moonbitlang$core$abort$$abort$10$("bound must be an object");
13628
+ return moonbitlang$core$abort$$abort$9$("bound must be an object");
13520
13629
  }
13521
13630
  }
13522
13631
  function zxch3n$flock$flock$$check_consistency_ffi(a, b) {
@@ -13528,7 +13637,7 @@ function zxch3n$flock$flock$$Flock$check_invariants_ffi(self) {
13528
13637
  function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13529
13638
  let _try_err;
13530
13639
  _L: {
13531
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:210:21-210:39");
13640
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:221:21-221:39");
13532
13641
  let key_value;
13533
13642
  if (_bind.$tag === 1) {
13534
13643
  const _ok = _bind;
@@ -13539,7 +13648,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13539
13648
  _try_err = _tmp;
13540
13649
  break _L;
13541
13650
  }
13542
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:211:40-211:60");
13651
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:222:40-222:60");
13543
13652
  let key_arr;
13544
13653
  if (_bind$2.$tag === 1) {
13545
13654
  const _ok = _bind$2;
@@ -13565,23 +13674,40 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13565
13674
  }
13566
13675
  }
13567
13676
  const key_json = _p;
13568
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:213:36-213:56");
13569
- let _tmp$2;
13570
- if (_bind$3.$tag === 1) {
13571
- const _ok = _bind$3;
13572
- _tmp$2 = _ok._0;
13573
- } else {
13574
- const _err = _bind$3;
13575
- const _tmp$3 = _err._0;
13576
- _try_err = _tmp$3;
13577
- break _L;
13677
+ let value_json;
13678
+ let _try_err$2;
13679
+ _L$2: {
13680
+ _L$3: {
13681
+ const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: value, start: 0, end: value.length }, 1024);
13682
+ if (_bind$3.$tag === 1) {
13683
+ const _ok = _bind$3;
13684
+ value_json = _ok._0;
13685
+ } else {
13686
+ const _err = _bind$3;
13687
+ const _tmp$2 = _err._0;
13688
+ _try_err$2 = _tmp$2;
13689
+ break _L$3;
13690
+ }
13691
+ break _L$2;
13692
+ }
13693
+ value_json = $panic();
13578
13694
  }
13579
- const value_json = zxch3n$flock$flock$$value_to_json(_tmp$2);
13580
13695
  let now_value;
13581
13696
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13582
13697
  now_value = Option$None$8$;
13583
13698
  } else {
13584
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:217:12-217:30");
13699
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:228:12-228:30");
13700
+ let _tmp$2;
13701
+ if (_bind$3.$tag === 1) {
13702
+ const _ok = _bind$3;
13703
+ _tmp$2 = _ok._0;
13704
+ } else {
13705
+ const _err = _bind$3;
13706
+ const _tmp$3 = _err._0;
13707
+ _try_err = _tmp$3;
13708
+ break _L;
13709
+ }
13710
+ const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:228:12-228:42");
13585
13711
  let _tmp$3;
13586
13712
  if (_bind$4.$tag === 1) {
13587
13713
  const _ok = _bind$4;
@@ -13592,28 +13718,17 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13592
13718
  _try_err = _tmp$4;
13593
13719
  break _L;
13594
13720
  }
13595
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:217:12-217:42");
13596
- let _tmp$4;
13597
- if (_bind$5.$tag === 1) {
13598
- const _ok = _bind$5;
13599
- _tmp$4 = _ok._0;
13600
- } else {
13601
- const _err = _bind$5;
13602
- const _tmp$5 = _err._0;
13603
- _try_err = _tmp$5;
13604
- break _L;
13605
- }
13606
- now_value = new Option$Some$8$(_tmp$4);
13721
+ now_value = new Option$Some$8$(_tmp$3);
13607
13722
  }
13608
- const _bind$4 = zxch3n$flock$flock$$Flock$put$46$inner(self, key_json, value_json, now_value);
13609
- if (_bind$4.$tag === 1) {
13610
- const _ok = _bind$4;
13723
+ const _bind$3 = zxch3n$flock$flock$$Flock$put$46$inner(self, key_json, value_json, now_value);
13724
+ if (_bind$3.$tag === 1) {
13725
+ const _ok = _bind$3;
13611
13726
  _ok._0;
13612
13727
  return;
13613
13728
  } else {
13614
- const _err = _bind$4;
13615
- const _tmp$3 = _err._0;
13616
- _try_err = _tmp$3;
13729
+ const _err = _bind$3;
13730
+ const _tmp$2 = _err._0;
13731
+ _try_err = _tmp$2;
13617
13732
  break _L;
13618
13733
  }
13619
13734
  }
@@ -13622,7 +13737,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13622
13737
  function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata, now) {
13623
13738
  let _try_err;
13624
13739
  _L: {
13625
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:232:21-232:39");
13740
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:243:21-243:39");
13626
13741
  let key_value;
13627
13742
  if (_bind.$tag === 1) {
13628
13743
  const _ok = _bind;
@@ -13633,7 +13748,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13633
13748
  _try_err = _tmp;
13634
13749
  break _L;
13635
13750
  }
13636
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:233:40-233:60");
13751
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:244:40-244:60");
13637
13752
  let key_arr;
13638
13753
  if (_bind$2.$tag === 1) {
13639
13754
  const _ok = _bind$2;
@@ -13659,41 +13774,58 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13659
13774
  }
13660
13775
  }
13661
13776
  const key_json = _p;
13662
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:235:36-235:56");
13663
- let _tmp$2;
13664
- if (_bind$3.$tag === 1) {
13665
- const _ok = _bind$3;
13666
- _tmp$2 = _ok._0;
13667
- } else {
13668
- const _err = _bind$3;
13669
- const _tmp$3 = _err._0;
13670
- _try_err = _tmp$3;
13671
- break _L;
13777
+ let value_json;
13778
+ let _try_err$2;
13779
+ _L$2: {
13780
+ _L$3: {
13781
+ const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: value, start: 0, end: value.length }, 1024);
13782
+ if (_bind$3.$tag === 1) {
13783
+ const _ok = _bind$3;
13784
+ value_json = _ok._0;
13785
+ } else {
13786
+ const _err = _bind$3;
13787
+ const _tmp$2 = _err._0;
13788
+ _try_err$2 = _tmp$2;
13789
+ break _L$3;
13790
+ }
13791
+ break _L$2;
13792
+ }
13793
+ value_json = $panic();
13672
13794
  }
13673
- const value_json = zxch3n$flock$flock$$value_to_json(_tmp$2);
13674
13795
  let metadata_value;
13675
13796
  if (zxch3n$flock$flock$$any_is_undefined(metadata) || zxch3n$flock$flock$$any_is_null(metadata)) {
13676
13797
  metadata_value = undefined;
13677
13798
  } else {
13678
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(metadata, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:239:41-239:64");
13679
- let _tmp$3;
13680
- if (_bind$4.$tag === 1) {
13681
- const _ok = _bind$4;
13682
- _tmp$3 = _ok._0;
13799
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(metadata, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:250:41-250:64");
13800
+ let _tmp$2;
13801
+ if (_bind$3.$tag === 1) {
13802
+ const _ok = _bind$3;
13803
+ _tmp$2 = _ok._0;
13683
13804
  } else {
13684
- const _err = _bind$4;
13685
- const _tmp$4 = _err._0;
13686
- _try_err = _tmp$4;
13805
+ const _err = _bind$3;
13806
+ const _tmp$3 = _err._0;
13807
+ _try_err = _tmp$3;
13687
13808
  break _L;
13688
13809
  }
13689
- const metadata_json = zxch3n$flock$flock$$value_to_json(_tmp$3);
13810
+ const metadata_json = zxch3n$flock$flock$$value_to_json(_tmp$2);
13690
13811
  metadata_value = zxch3n$flock$flock$$json_to_metadata(metadata_json);
13691
13812
  }
13692
13813
  let now_value;
13693
13814
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13694
13815
  now_value = Option$None$8$;
13695
13816
  } else {
13696
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:245:12-245:30");
13817
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:256:12-256:30");
13818
+ let _tmp$2;
13819
+ if (_bind$3.$tag === 1) {
13820
+ const _ok = _bind$3;
13821
+ _tmp$2 = _ok._0;
13822
+ } else {
13823
+ const _err = _bind$3;
13824
+ const _tmp$3 = _err._0;
13825
+ _try_err = _tmp$3;
13826
+ break _L;
13827
+ }
13828
+ const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:256:12-256:42");
13697
13829
  let _tmp$3;
13698
13830
  if (_bind$4.$tag === 1) {
13699
13831
  const _ok = _bind$4;
@@ -13704,43 +13836,32 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13704
13836
  _try_err = _tmp$4;
13705
13837
  break _L;
13706
13838
  }
13707
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:245:12-245:42");
13708
- let _tmp$4;
13709
- if (_bind$5.$tag === 1) {
13710
- const _ok = _bind$5;
13711
- _tmp$4 = _ok._0;
13712
- } else {
13713
- const _err = _bind$5;
13714
- const _tmp$5 = _err._0;
13715
- _try_err = _tmp$5;
13716
- break _L;
13717
- }
13718
- now_value = new Option$Some$8$(_tmp$4);
13839
+ now_value = new Option$Some$8$(_tmp$3);
13719
13840
  }
13720
13841
  if (metadata_value === undefined) {
13721
- const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, Option$None$33$, now_value, Option$None$34$);
13722
- if (_bind$4.$tag === 1) {
13723
- const _ok = _bind$4;
13842
+ const _bind$3 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, Option$None$33$, now_value, Option$None$34$);
13843
+ if (_bind$3.$tag === 1) {
13844
+ const _ok = _bind$3;
13724
13845
  _ok._0;
13725
13846
  return;
13726
13847
  } else {
13727
- const _err = _bind$4;
13728
- const _tmp$3 = _err._0;
13729
- _try_err = _tmp$3;
13848
+ const _err = _bind$3;
13849
+ const _tmp$2 = _err._0;
13850
+ _try_err = _tmp$2;
13730
13851
  break _L;
13731
13852
  }
13732
13853
  } else {
13733
13854
  const _Some = metadata_value;
13734
13855
  const _meta = _Some;
13735
- 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$);
13736
- if (_bind$4.$tag === 1) {
13737
- const _ok = _bind$4;
13856
+ const _bind$3 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, new Option$Some$33$(_meta), now_value, Option$None$34$);
13857
+ if (_bind$3.$tag === 1) {
13858
+ const _ok = _bind$3;
13738
13859
  _ok._0;
13739
13860
  return;
13740
13861
  } else {
13741
- const _err = _bind$4;
13742
- const _tmp$3 = _err._0;
13743
- _try_err = _tmp$3;
13862
+ const _err = _bind$3;
13863
+ const _tmp$2 = _err._0;
13864
+ _try_err = _tmp$2;
13744
13865
  break _L;
13745
13866
  }
13746
13867
  }
@@ -13750,7 +13871,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13750
13871
  function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13751
13872
  let _try_err;
13752
13873
  _L: {
13753
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:267:21-267:39");
13874
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:278:21-278:39");
13754
13875
  let key_value;
13755
13876
  if (_bind.$tag === 1) {
13756
13877
  const _ok = _bind;
@@ -13761,7 +13882,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13761
13882
  _try_err = _tmp;
13762
13883
  break _L;
13763
13884
  }
13764
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:268:40-268:60");
13885
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:279:40-279:60");
13765
13886
  let key_arr;
13766
13887
  if (_bind$2.$tag === 1) {
13767
13888
  const _ok = _bind$2;
@@ -13791,7 +13912,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13791
13912
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13792
13913
  now_value = Option$None$8$;
13793
13914
  } else {
13794
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:273:12-273:30");
13915
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:284:12-284:30");
13795
13916
  let _tmp$2;
13796
13917
  if (_bind$3.$tag === 1) {
13797
13918
  const _ok = _bind$3;
@@ -13802,7 +13923,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13802
13923
  _try_err = _tmp$3;
13803
13924
  break _L;
13804
13925
  }
13805
- const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:273:12-273:42");
13926
+ const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:284:12-284:42");
13806
13927
  let _tmp$3;
13807
13928
  if (_bind$4.$tag === 1) {
13808
13929
  const _ok = _bind$4;
@@ -13842,10 +13963,10 @@ function zxch3n$flock$flock$$Flock$kv_to_json_ffi(self) {
13842
13963
  return _p;
13843
13964
  }
13844
13965
  function zxch3n$flock$flock$$FlockDigest$copy(self) {
13845
- return { bytes: moonbitlang$core$array$$FixedArray$copy$12$(self.bytes) };
13966
+ return { bytes: moonbitlang$core$array$$FixedArray$copy$14$(self.bytes) };
13846
13967
  }
13847
13968
  function zxch3n$flock$flock$$FlockDigest$xor(self, digest) {
13848
- const bytes = moonbitlang$core$array$$FixedArray$copy$12$(self.bytes);
13969
+ const bytes = moonbitlang$core$array$$FixedArray$copy$14$(self.bytes);
13849
13970
  const digest_bytes = digest.bytes;
13850
13971
  let _tmp = 0;
13851
13972
  while (true) {
@@ -13968,7 +14089,7 @@ function zxch3n$flock$flock$$Flock$digest_hex_ffi(self) {
13968
14089
  function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
13969
14090
  let _try_err;
13970
14091
  _L: {
13971
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:307:21-307:39");
14092
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:318:21-318:39");
13972
14093
  let key_value;
13973
14094
  if (_bind.$tag === 1) {
13974
14095
  const _ok = _bind;
@@ -13979,7 +14100,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
13979
14100
  _try_err = _tmp;
13980
14101
  break _L;
13981
14102
  }
13982
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:308:40-308:60");
14103
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:319:40-319:60");
13983
14104
  let key_arr;
13984
14105
  if (_bind$2.$tag === 1) {
13985
14106
  const _ok = _bind$2;
@@ -14005,23 +14126,40 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14005
14126
  }
14006
14127
  }
14007
14128
  const key_json = _p;
14008
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:310:36-310:56");
14009
- let _tmp$2;
14010
- if (_bind$3.$tag === 1) {
14011
- const _ok = _bind$3;
14012
- _tmp$2 = _ok._0;
14013
- } else {
14014
- const _err = _bind$3;
14015
- const _tmp$3 = _err._0;
14016
- _try_err = _tmp$3;
14017
- break _L;
14129
+ let value_json;
14130
+ let _try_err$2;
14131
+ _L$2: {
14132
+ _L$3: {
14133
+ const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: value, start: 0, end: value.length }, 1024);
14134
+ if (_bind$3.$tag === 1) {
14135
+ const _ok = _bind$3;
14136
+ value_json = _ok._0;
14137
+ } else {
14138
+ const _err = _bind$3;
14139
+ const _tmp$2 = _err._0;
14140
+ _try_err$2 = _tmp$2;
14141
+ break _L$3;
14142
+ }
14143
+ break _L$2;
14144
+ }
14145
+ value_json = $panic();
14018
14146
  }
14019
- const value_json = zxch3n$flock$flock$$value_to_json(_tmp$2);
14020
14147
  let now_value;
14021
14148
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
14022
14149
  now_value = Option$None$8$;
14023
14150
  } else {
14024
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:314:12-314:30");
14151
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:325:12-325:30");
14152
+ let _tmp$2;
14153
+ if (_bind$3.$tag === 1) {
14154
+ const _ok = _bind$3;
14155
+ _tmp$2 = _ok._0;
14156
+ } else {
14157
+ const _err = _bind$3;
14158
+ const _tmp$3 = _err._0;
14159
+ _try_err = _tmp$3;
14160
+ break _L;
14161
+ }
14162
+ const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:325:12-325:42");
14025
14163
  let _tmp$3;
14026
14164
  if (_bind$4.$tag === 1) {
14027
14165
  const _ok = _bind$4;
@@ -14032,28 +14170,17 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14032
14170
  _try_err = _tmp$4;
14033
14171
  break _L;
14034
14172
  }
14035
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:314:12-314:42");
14036
- let _tmp$4;
14037
- if (_bind$5.$tag === 1) {
14038
- const _ok = _bind$5;
14039
- _tmp$4 = _ok._0;
14040
- } else {
14041
- const _err = _bind$5;
14042
- const _tmp$5 = _err._0;
14043
- _try_err = _tmp$5;
14044
- break _L;
14045
- }
14046
- now_value = new Option$Some$8$(_tmp$4);
14173
+ now_value = new Option$Some$8$(_tmp$3);
14047
14174
  }
14048
- const _bind$4 = zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key_json, value_json, now_value);
14049
- if (_bind$4.$tag === 1) {
14050
- const _ok = _bind$4;
14175
+ const _bind$3 = zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key_json, value_json, now_value);
14176
+ if (_bind$3.$tag === 1) {
14177
+ const _ok = _bind$3;
14051
14178
  _ok._0;
14052
14179
  return;
14053
14180
  } else {
14054
- const _err = _bind$4;
14055
- const _tmp$3 = _err._0;
14056
- _try_err = _tmp$3;
14181
+ const _err = _bind$3;
14182
+ const _tmp$2 = _err._0;
14183
+ _try_err = _tmp$2;
14057
14184
  break _L;
14058
14185
  }
14059
14186
  }
@@ -14062,7 +14189,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14062
14189
  function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14063
14190
  let _try_err;
14064
14191
  _L: {
14065
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:323:21-323:39");
14192
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:334:21-334:39");
14066
14193
  let key_value;
14067
14194
  if (_bind.$tag === 1) {
14068
14195
  const _ok = _bind;
@@ -14073,7 +14200,7 @@ function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14073
14200
  _try_err = _tmp;
14074
14201
  break _L;
14075
14202
  }
14076
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:324:40-324:60");
14203
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:335:40-335:60");
14077
14204
  let key_arr;
14078
14205
  if (_bind$2.$tag === 1) {
14079
14206
  const _ok = _bind$2;
@@ -14108,7 +14235,7 @@ function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14108
14235
  function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14109
14236
  let _try_err;
14110
14237
  _L: {
14111
- const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:334:22-334:41");
14238
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:345:22-345:41");
14112
14239
  let json_value;
14113
14240
  if (_bind.$tag === 1) {
14114
14241
  const _ok = _bind;
@@ -14120,7 +14247,7 @@ function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14120
14247
  break _L;
14121
14248
  }
14122
14249
  const parsed = zxch3n$flock$flock$$value_to_json(json_value);
14123
- const _bind$2 = Yoorkin$jmop$$Any$unwrap_value(peer_id, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:336:22-336:44");
14250
+ const _bind$2 = Yoorkin$jmop$$Any$unwrap_value(peer_id, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:347:22-347:44");
14124
14251
  let peer_value;
14125
14252
  if (_bind$2.$tag === 1) {
14126
14253
  const _ok = _bind$2;
@@ -14131,7 +14258,7 @@ function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14131
14258
  _try_err = _tmp;
14132
14259
  break _L;
14133
14260
  }
14134
- const _bind$3 = Yoorkin$jmop$$Value$to_string(peer_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:337:20-337:42");
14261
+ const _bind$3 = Yoorkin$jmop$$Value$to_string(peer_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:348:20-348:42");
14135
14262
  let peer_hex;
14136
14263
  if (_bind$3.$tag === 1) {
14137
14264
  const _ok = _bind$3;
@@ -14162,7 +14289,7 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14162
14289
  if (zxch3n$flock$flock$$any_is_undefined(start) || zxch3n$flock$flock$$any_is_null(start)) {
14163
14290
  start_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
14164
14291
  } else {
14165
- const _bind = Yoorkin$jmop$$Any$unwrap_value(start, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:353:25-353:45");
14292
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(start, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:364:25-364:45");
14166
14293
  let start_value;
14167
14294
  if (_bind.$tag === 1) {
14168
14295
  const _ok = _bind;
@@ -14179,7 +14306,7 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14179
14306
  if (zxch3n$flock$flock$$any_is_undefined(end) || zxch3n$flock$flock$$any_is_null(end)) {
14180
14307
  end_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
14181
14308
  } else {
14182
- const _bind = Yoorkin$jmop$$Any$unwrap_value(end, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:359:23-359:41");
14309
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(end, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:370:23-370:41");
14183
14310
  let end_value;
14184
14311
  if (_bind.$tag === 1) {
14185
14312
  const _ok = _bind;
@@ -14196,7 +14323,7 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14196
14323
  if (zxch3n$flock$flock$$any_is_undefined(prefix) || zxch3n$flock$flock$$any_is_null(prefix)) {
14197
14324
  prefix_filter = Option$None$29$;
14198
14325
  } else {
14199
- const _bind = Yoorkin$jmop$$Any$unwrap_value(prefix, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:365:26-365:47");
14326
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(prefix, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:376:26-376:47");
14200
14327
  let prefix_value;
14201
14328
  if (_bind.$tag === 1) {
14202
14329
  const _ok = _bind;
@@ -14207,7 +14334,7 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14207
14334
  _try_err = _tmp;
14208
14335
  break _L;
14209
14336
  }
14210
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(prefix_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:366:45-366:68");
14337
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(prefix_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:377:45-377:68");
14211
14338
  let prefix_arr;
14212
14339
  if (_bind$2.$tag === 1) {
14213
14340
  const _ok = _bind$2;
@@ -14234,7 +14361,7 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14234
14361
  }
14235
14362
  prefix_filter = new Option$Some$29$(_p);
14236
14363
  }
14237
- const rows = moonbitlang$core$array$$Array$new$46$inner$14$(0);
14364
+ const rows = moonbitlang$core$array$$Array$new$46$inner$12$(0);
14238
14365
  let scan_iter;
14239
14366
  if (prefix_filter.$tag === 1) {
14240
14367
  const _Some = prefix_filter;
@@ -14254,7 +14381,7 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14254
14381
  const _data = _Some;
14255
14382
  moonbitlang$core$builtin$$Map$set$37$(obj, "value", _data);
14256
14383
  }
14257
- moonbitlang$core$array$$Array$push$14$(rows, moonbitlang$core$builtin$$ToJson$to_json$33$(obj));
14384
+ moonbitlang$core$array$$Array$push$12$(rows, moonbitlang$core$builtin$$ToJson$to_json$33$(obj));
14258
14385
  return 1;
14259
14386
  });
14260
14387
  const _p = zxch3n$flock$flock$$json_to_value(moonbitlang$core$builtin$$ToJson$to_json$32$(rows));
@@ -14303,7 +14430,7 @@ function zxch3n$flock$flock$$raw_value_payload_to_json(value) {
14303
14430
  function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
14304
14431
  let _try_err;
14305
14432
  _L: {
14306
- const _bind = Yoorkin$jmop$$Any$unwrap_value(listener, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:415:26-415:49");
14433
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(listener, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:426:26-426:49");
14307
14434
  let listener_value;
14308
14435
  if (_bind.$tag === 1) {
14309
14436
  const _ok = _bind;
@@ -14315,7 +14442,7 @@ function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
14315
14442
  break _L;
14316
14443
  }
14317
14444
  const unsubscribe = zxch3n$flock$flock$$Flock$subscribe(self, (batch) => {
14318
- const events = moonbitlang$core$array$$Array$new$46$inner$14$(0);
14445
+ const events = moonbitlang$core$array$$Array$new$46$inner$12$(0);
14319
14446
  let _tmp = 0;
14320
14447
  while (true) {
14321
14448
  const i = _tmp;
@@ -14340,7 +14467,7 @@ function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
14340
14467
  moonbitlang$core$builtin$$Map$set$37$(obj, "metadata", zxch3n$flock$flock$$metadata_map_to_json(_meta));
14341
14468
  }
14342
14469
  moonbitlang$core$builtin$$Map$set$37$(obj, "payload", zxch3n$flock$flock$$raw_value_payload_to_json(_value));
14343
- moonbitlang$core$array$$Array$push$14$(events, moonbitlang$core$builtin$$ToJson$to_json$33$(obj));
14470
+ moonbitlang$core$array$$Array$push$12$(events, moonbitlang$core$builtin$$ToJson$to_json$33$(obj));
14344
14471
  _tmp = i + 1 | 0;
14345
14472
  continue;
14346
14473
  } else {
@@ -14367,4 +14494,4 @@ function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
14367
14494
  }
14368
14495
  return $panic();
14369
14496
  }
14370
- 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 }
14497
+ 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 }