@abaxxtech/id 0.0.0 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -13,11 +13,11 @@ var __export = (target, all) => {
13
13
  for (var name7 in all)
14
14
  __defProp(target, name7, { get: all[name7], enumerable: true });
15
15
  };
16
- var __copyProps = (to, from8, except, desc) => {
17
- if (from8 && typeof from8 === "object" || typeof from8 === "function") {
18
- for (let key of __getOwnPropNames(from8))
16
+ var __copyProps = (to, from7, except, desc) => {
17
+ if (from7 && typeof from7 === "object" || typeof from7 === "function") {
18
+ for (let key of __getOwnPropNames(from7))
19
19
  if (!__hasOwnProp.call(to, key) && key !== except)
20
- __defProp(to, key, { get: () => from8[key], enumerable: !(desc = __getOwnPropDesc(from8, key)) || desc.enumerable });
20
+ __defProp(to, key, { get: () => from7[key], enumerable: !(desc = __getOwnPropDesc(from7, key)) || desc.enumerable });
21
21
  }
22
22
  return to;
23
23
  };
@@ -396,8 +396,8 @@ var require_eventemitter3 = __commonJS({
396
396
  }
397
397
  listeners.fn.apply(listeners.context, args);
398
398
  } else {
399
- var length6 = listeners.length, j;
400
- for (i = 0; i < length6; i++) {
399
+ var length5 = listeners.length, j;
400
+ for (i = 0; i < length5; i++) {
401
401
  if (listeners[i].once)
402
402
  this.removeListener(event, listeners[i].fn, void 0, true);
403
403
  switch (len) {
@@ -444,7 +444,7 @@ var require_eventemitter3 = __commonJS({
444
444
  clearEvent(this, evt);
445
445
  }
446
446
  } else {
447
- for (var i = 0, events = [], length6 = listeners.length; i < length6; i++) {
447
+ for (var i = 0, events = [], length5 = listeners.length; i < length5; i++) {
448
448
  if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {
449
449
  events.push(listeners[i]);
450
450
  }
@@ -731,11 +731,11 @@ var slice = useBuffer ? (bytes, start, end) => {
731
731
  } : (bytes, start, end) => {
732
732
  return bytes.slice(start, end);
733
733
  };
734
- var concat = useBuffer ? (chunks, length6) => {
734
+ var concat = useBuffer ? (chunks, length5) => {
735
735
  chunks = chunks.map((c) => c instanceof Uint8Array ? c : globalThis.Buffer.from(c));
736
- return asU8A(globalThis.Buffer.concat(chunks, length6));
737
- } : (chunks, length6) => {
738
- const out = new Uint8Array(length6);
736
+ return asU8A(globalThis.Buffer.concat(chunks, length5));
737
+ } : (chunks, length5) => {
738
+ const out = new Uint8Array(length5);
739
739
  let off = 0;
740
740
  for (let b of chunks) {
741
741
  if (off + b.length > out.length) {
@@ -765,10 +765,10 @@ function compare(b1, b2) {
765
765
  }
766
766
  function utf8ToBytes(string3, units = Infinity) {
767
767
  let codePoint;
768
- const length6 = string3.length;
768
+ const length5 = string3.length;
769
769
  let leadSurrogate = null;
770
770
  const bytes = [];
771
- for (let i = 0; i < length6; ++i) {
771
+ for (let i = 0; i < length5; ++i) {
772
772
  codePoint = string3.charCodeAt(i);
773
773
  if (codePoint > 55295 && codePoint < 57344) {
774
774
  if (!leadSurrogate) {
@@ -776,7 +776,7 @@ function utf8ToBytes(string3, units = Infinity) {
776
776
  if ((units -= 3) > -1)
777
777
  bytes.push(239, 191, 189);
778
778
  continue;
779
- } else if (i + 1 === length6) {
779
+ } else if (i + 1 === length5) {
780
780
  if ((units -= 3) > -1)
781
781
  bytes.push(239, 191, 189);
782
782
  continue;
@@ -1174,10 +1174,10 @@ encodeNegint.compareTokens = function compareTokens2(tok1, tok2) {
1174
1174
  };
1175
1175
 
1176
1176
  // ../../node_modules/.bun/cborg@2.0.5/node_modules/cborg/esm/lib/2bytes.js
1177
- function toToken(data, pos, prefix, length6) {
1178
- assertEnoughData(data, pos, prefix + length6);
1179
- const buf2 = slice(data, pos + prefix, pos + prefix + length6);
1180
- return new Token(Type.bytes, buf2, prefix + length6);
1177
+ function toToken(data, pos, prefix, length5) {
1178
+ assertEnoughData(data, pos, prefix + length5);
1179
+ const buf2 = slice(data, pos + prefix, pos + prefix + length5);
1180
+ return new Token(Type.bytes, buf2, prefix + length5);
1181
1181
  }
1182
1182
  function decodeBytesCompact(data, pos, minor, _options) {
1183
1183
  return toToken(data, pos, 1, minor);
@@ -1221,8 +1221,8 @@ function compareBytes(b1, b2) {
1221
1221
  }
1222
1222
 
1223
1223
  // ../../node_modules/.bun/cborg@2.0.5/node_modules/cborg/esm/lib/3string.js
1224
- function toToken2(data, pos, prefix, length6, options) {
1225
- const totLength = prefix + length6;
1224
+ function toToken2(data, pos, prefix, length5, options) {
1225
+ const totLength = prefix + length5;
1226
1226
  assertEnoughData(data, pos, totLength);
1227
1227
  const tok = new Token(Type.string, toString(data, pos + prefix, pos + totLength), totLength);
1228
1228
  if (options.retainStringBytes === true) {
@@ -1252,8 +1252,8 @@ function decodeString64(data, pos, _minor, options) {
1252
1252
  var encodeString = encodeBytes;
1253
1253
 
1254
1254
  // ../../node_modules/.bun/cborg@2.0.5/node_modules/cborg/esm/lib/4array.js
1255
- function toToken3(_data, _pos, prefix, length6) {
1256
- return new Token(Type.array, length6, prefix);
1255
+ function toToken3(_data, _pos, prefix, length5) {
1256
+ return new Token(Type.array, length5, prefix);
1257
1257
  }
1258
1258
  function decodeArrayCompact(data, pos, minor, _options) {
1259
1259
  return toToken3(data, pos, 1, minor);
@@ -1289,8 +1289,8 @@ encodeArray.encodedSize = function encodedSize5(token) {
1289
1289
  };
1290
1290
 
1291
1291
  // ../../node_modules/.bun/cborg@2.0.5/node_modules/cborg/esm/lib/5map.js
1292
- function toToken4(_data, _pos, prefix, length6) {
1293
- return new Token(Type.map, length6, prefix);
1292
+ function toToken4(_data, _pos, prefix, length5) {
1293
+ return new Token(Type.map, length5, prefix);
1294
1294
  }
1295
1295
  function decodeMapCompact(data, pos, minor, _options) {
1296
1296
  return toToken4(data, pos, 1, minor);
@@ -1798,8 +1798,8 @@ var typeEncoders = {
1798
1798
  Object(obj, typ, options, refStack) {
1799
1799
  const isMap = typ !== "Object";
1800
1800
  const keys = isMap ? obj.keys() : Object.keys(obj);
1801
- const length6 = isMap ? obj.size : keys.length;
1802
- if (!length6) {
1801
+ const length5 = isMap ? obj.size : keys.length;
1802
+ if (!length5) {
1803
1803
  if (options.addBreakTokens === true) {
1804
1804
  return [
1805
1805
  simpleTokens.emptyMap,
@@ -1820,13 +1820,13 @@ var typeEncoders = {
1820
1820
  sortMapEntries(entries, options);
1821
1821
  if (options.addBreakTokens) {
1822
1822
  return [
1823
- new Token(Type.map, length6),
1823
+ new Token(Type.map, length5),
1824
1824
  entries,
1825
1825
  new Token(Type.break)
1826
1826
  ];
1827
1827
  }
1828
1828
  return [
1829
- new Token(Type.map, length6),
1829
+ new Token(Type.map, length5),
1830
1830
  entries
1831
1831
  ];
1832
1832
  }
@@ -2070,7 +2070,7 @@ function base(ALPHABET, name7) {
2070
2070
  var LEADER = ALPHABET.charAt(0);
2071
2071
  var FACTOR = Math.log(BASE) / Math.log(256);
2072
2072
  var iFACTOR = Math.log(256) / Math.log(BASE);
2073
- function encode20(source) {
2073
+ function encode18(source) {
2074
2074
  if (source instanceof Uint8Array)
2075
2075
  ;
2076
2076
  else if (ArrayBuffer.isView(source)) {
@@ -2085,7 +2085,7 @@ function base(ALPHABET, name7) {
2085
2085
  return "";
2086
2086
  }
2087
2087
  var zeroes = 0;
2088
- var length6 = 0;
2088
+ var length5 = 0;
2089
2089
  var pbegin = 0;
2090
2090
  var pend = source.length;
2091
2091
  while (pbegin !== pend && source[pbegin] === 0) {
@@ -2097,7 +2097,7 @@ function base(ALPHABET, name7) {
2097
2097
  while (pbegin !== pend) {
2098
2098
  var carry = source[pbegin];
2099
2099
  var i2 = 0;
2100
- for (var it1 = size - 1; (carry !== 0 || i2 < length6) && it1 !== -1; it1--, i2++) {
2100
+ for (var it1 = size - 1; (carry !== 0 || i2 < length5) && it1 !== -1; it1--, i2++) {
2101
2101
  carry += 256 * b58[it1] >>> 0;
2102
2102
  b58[it1] = carry % BASE >>> 0;
2103
2103
  carry = carry / BASE >>> 0;
@@ -2105,10 +2105,10 @@ function base(ALPHABET, name7) {
2105
2105
  if (carry !== 0) {
2106
2106
  throw new Error("Non-zero carry");
2107
2107
  }
2108
- length6 = i2;
2108
+ length5 = i2;
2109
2109
  pbegin++;
2110
2110
  }
2111
- var it2 = size - length6;
2111
+ var it2 = size - length5;
2112
2112
  while (it2 !== size && b58[it2] === 0) {
2113
2113
  it2++;
2114
2114
  }
@@ -2130,7 +2130,7 @@ function base(ALPHABET, name7) {
2130
2130
  return;
2131
2131
  }
2132
2132
  var zeroes = 0;
2133
- var length6 = 0;
2133
+ var length5 = 0;
2134
2134
  while (source[psz] === LEADER) {
2135
2135
  zeroes++;
2136
2136
  psz++;
@@ -2143,7 +2143,7 @@ function base(ALPHABET, name7) {
2143
2143
  return;
2144
2144
  }
2145
2145
  var i2 = 0;
2146
- for (var it3 = size - 1; (carry !== 0 || i2 < length6) && it3 !== -1; it3--, i2++) {
2146
+ for (var it3 = size - 1; (carry !== 0 || i2 < length5) && it3 !== -1; it3--, i2++) {
2147
2147
  carry += BASE * b256[it3] >>> 0;
2148
2148
  b256[it3] = carry % 256 >>> 0;
2149
2149
  carry = carry / 256 >>> 0;
@@ -2151,13 +2151,13 @@ function base(ALPHABET, name7) {
2151
2151
  if (carry !== 0) {
2152
2152
  throw new Error("Non-zero carry");
2153
2153
  }
2154
- length6 = i2;
2154
+ length5 = i2;
2155
2155
  psz++;
2156
2156
  }
2157
2157
  if (source[psz] === " ") {
2158
2158
  return;
2159
2159
  }
2160
- var it4 = size - length6;
2160
+ var it4 = size - length5;
2161
2161
  while (it4 !== size && b256[it4] === 0) {
2162
2162
  it4++;
2163
2163
  }
@@ -2168,7 +2168,7 @@ function base(ALPHABET, name7) {
2168
2168
  }
2169
2169
  return vch;
2170
2170
  }
2171
- function decode26(string3) {
2171
+ function decode22(string3) {
2172
2172
  var buffer3 = decodeUnsafe(string3);
2173
2173
  if (buffer3) {
2174
2174
  return buffer3;
@@ -2176,9 +2176,9 @@ function base(ALPHABET, name7) {
2176
2176
  throw new Error(`Non-${name7} character`);
2177
2177
  }
2178
2178
  return {
2179
- encode: encode20,
2179
+ encode: encode18,
2180
2180
  decodeUnsafe,
2181
- decode: decode26
2181
+ decode: decode22
2182
2182
  };
2183
2183
  }
2184
2184
  var src = base;
@@ -2348,17 +2348,17 @@ var Codec = class {
2348
2348
  return this.decoder.decode(input);
2349
2349
  }
2350
2350
  };
2351
- var from = ({ name: name7, prefix, encode: encode20, decode: decode26 }) => new Codec(name7, prefix, encode20, decode26);
2351
+ var from = ({ name: name7, prefix, encode: encode18, decode: decode22 }) => new Codec(name7, prefix, encode18, decode22);
2352
2352
  var baseX = ({ prefix, name: name7, alphabet: alphabet3 }) => {
2353
- const { encode: encode20, decode: decode26 } = base_x_default(alphabet3, name7);
2353
+ const { encode: encode18, decode: decode22 } = base_x_default(alphabet3, name7);
2354
2354
  return from({
2355
2355
  prefix,
2356
2356
  name: name7,
2357
- encode: encode20,
2357
+ encode: encode18,
2358
2358
  /**
2359
2359
  * @param {string} text
2360
2360
  */
2361
- decode: (text) => coerce(decode26(text))
2361
+ decode: (text) => coerce(decode22(text))
2362
2362
  });
2363
2363
  };
2364
2364
  var decode2 = (string3, alphabet3, bitsPerChar, name7) => {
@@ -2623,7 +2623,7 @@ var Digest = class {
2623
2623
  };
2624
2624
 
2625
2625
  // ../../node_modules/.bun/multiformats@12.1.3/node_modules/multiformats/src/cid.js
2626
- var format = (link, base5) => {
2626
+ var format = (link, base4) => {
2627
2627
  const { bytes, version } = link;
2628
2628
  switch (version) {
2629
2629
  case 0:
@@ -2631,26 +2631,26 @@ var format = (link, base5) => {
2631
2631
  bytes,
2632
2632
  baseCache(link),
2633
2633
  /** @type {API.MultibaseEncoder<"z">} */
2634
- base5 || base58btc.encoder
2634
+ base4 || base58btc.encoder
2635
2635
  );
2636
2636
  default:
2637
2637
  return toStringV1(
2638
2638
  bytes,
2639
2639
  baseCache(link),
2640
2640
  /** @type {API.MultibaseEncoder<Prefix>} */
2641
- base5 || base32.encoder
2641
+ base4 || base32.encoder
2642
2642
  );
2643
2643
  }
2644
2644
  };
2645
2645
  var cache = /* @__PURE__ */ new WeakMap();
2646
2646
  var baseCache = (cid) => {
2647
- const baseCache5 = cache.get(cid);
2648
- if (baseCache5 == null) {
2649
- const baseCache6 = /* @__PURE__ */ new Map();
2650
- cache.set(cid, baseCache6);
2651
- return baseCache6;
2647
+ const baseCache4 = cache.get(cid);
2648
+ if (baseCache4 == null) {
2649
+ const baseCache5 = /* @__PURE__ */ new Map();
2650
+ cache.set(cid, baseCache5);
2651
+ return baseCache5;
2652
2652
  }
2653
- return baseCache5;
2653
+ return baseCache4;
2654
2654
  };
2655
2655
  var CID = class {
2656
2656
  /**
@@ -2770,8 +2770,8 @@ var CID = class {
2770
2770
  * @param {API.MultibaseEncoder<string>} [base]
2771
2771
  * @returns {string}
2772
2772
  */
2773
- toString(base5) {
2774
- return format(this, base5);
2773
+ toString(base4) {
2774
+ return format(this, base4);
2775
2775
  }
2776
2776
  /**
2777
2777
  * @returns {API.LinkJSON<this>}
@@ -2981,8 +2981,8 @@ var CID = class {
2981
2981
  static inspectBytes(initialBytes) {
2982
2982
  let offset = 0;
2983
2983
  const next = () => {
2984
- const [i, length6] = decode4(initialBytes.subarray(offset));
2985
- offset += length6;
2984
+ const [i, length5] = decode4(initialBytes.subarray(offset));
2985
+ offset += length5;
2986
2986
  return i;
2987
2987
  };
2988
2988
  let version = (
@@ -3032,8 +3032,8 @@ var CID = class {
3032
3032
  * @param {API.MultibaseDecoder<Prefix>} [base]
3033
3033
  * @returns {CID<Data, Code, Alg, Ver>}
3034
3034
  */
3035
- static parse(source, base5) {
3036
- const [prefix, bytes] = parseCIDtoBytes(source, base5);
3035
+ static parse(source, base4) {
3036
+ const [prefix, bytes] = parseCIDtoBytes(source, base4);
3037
3037
  const cid = CID.decode(bytes);
3038
3038
  if (cid.version === 0 && source[0] !== "Q") {
3039
3039
  throw Error("Version 0 CID string must not include multibase prefix");
@@ -3042,10 +3042,10 @@ var CID = class {
3042
3042
  return cid;
3043
3043
  }
3044
3044
  };
3045
- var parseCIDtoBytes = (source, base5) => {
3045
+ var parseCIDtoBytes = (source, base4) => {
3046
3046
  switch (source[0]) {
3047
3047
  case "Q": {
3048
- const decoder = base5 || base58btc;
3048
+ const decoder = base4 || base58btc;
3049
3049
  return [
3050
3050
  /** @type {Prefix} */
3051
3051
  base58btc.prefix,
@@ -3053,7 +3053,7 @@ var parseCIDtoBytes = (source, base5) => {
3053
3053
  ];
3054
3054
  }
3055
3055
  case base58btc.prefix: {
3056
- const decoder = base5 || base58btc;
3056
+ const decoder = base4 || base58btc;
3057
3057
  return [
3058
3058
  /** @type {Prefix} */
3059
3059
  base58btc.prefix,
@@ -3061,7 +3061,7 @@ var parseCIDtoBytes = (source, base5) => {
3061
3061
  ];
3062
3062
  }
3063
3063
  case base32.prefix: {
3064
- const decoder = base5 || base32;
3064
+ const decoder = base4 || base32;
3065
3065
  return [
3066
3066
  /** @type {Prefix} */
3067
3067
  base32.prefix,
@@ -3069,7 +3069,7 @@ var parseCIDtoBytes = (source, base5) => {
3069
3069
  ];
3070
3070
  }
3071
3071
  default: {
3072
- if (base5 == null) {
3072
+ if (base4 == null) {
3073
3073
  throw Error(
3074
3074
  "To parse non base32 or base58btc encoded CID multibase decoder must be provided"
3075
3075
  );
@@ -3077,31 +3077,31 @@ var parseCIDtoBytes = (source, base5) => {
3077
3077
  return [
3078
3078
  /** @type {Prefix} */
3079
3079
  source[0],
3080
- base5.decode(source)
3080
+ base4.decode(source)
3081
3081
  ];
3082
3082
  }
3083
3083
  }
3084
3084
  };
3085
- var toStringV0 = (bytes, cache5, base5) => {
3086
- const { prefix } = base5;
3085
+ var toStringV0 = (bytes, cache4, base4) => {
3086
+ const { prefix } = base4;
3087
3087
  if (prefix !== base58btc.prefix) {
3088
- throw Error(`Cannot string encode V0 in ${base5.name} encoding`);
3088
+ throw Error(`Cannot string encode V0 in ${base4.name} encoding`);
3089
3089
  }
3090
- const cid = cache5.get(prefix);
3090
+ const cid = cache4.get(prefix);
3091
3091
  if (cid == null) {
3092
- const cid2 = base5.encode(bytes).slice(1);
3093
- cache5.set(prefix, cid2);
3092
+ const cid2 = base4.encode(bytes).slice(1);
3093
+ cache4.set(prefix, cid2);
3094
3094
  return cid2;
3095
3095
  } else {
3096
3096
  return cid;
3097
3097
  }
3098
3098
  };
3099
- var toStringV1 = (bytes, cache5, base5) => {
3100
- const { prefix } = base5;
3101
- const cid = cache5.get(prefix);
3099
+ var toStringV1 = (bytes, cache4, base4) => {
3100
+ const { prefix } = base4;
3101
+ const cid = cache4.get(prefix);
3102
3102
  if (cid == null) {
3103
- const cid2 = base5.encode(bytes);
3104
- cache5.set(prefix, cid2);
3103
+ const cid2 = base4.encode(bytes);
3104
+ cache4.set(prefix, cid2);
3105
3105
  return cid2;
3106
3106
  } else {
3107
3107
  return cid;
@@ -3351,7 +3351,7 @@ function base2(ALPHABET, name7) {
3351
3351
  var LEADER = ALPHABET.charAt(0);
3352
3352
  var FACTOR = Math.log(BASE) / Math.log(256);
3353
3353
  var iFACTOR = Math.log(256) / Math.log(BASE);
3354
- function encode20(source) {
3354
+ function encode18(source) {
3355
3355
  if (source instanceof Uint8Array)
3356
3356
  ;
3357
3357
  else if (ArrayBuffer.isView(source)) {
@@ -3366,7 +3366,7 @@ function base2(ALPHABET, name7) {
3366
3366
  return "";
3367
3367
  }
3368
3368
  var zeroes = 0;
3369
- var length6 = 0;
3369
+ var length5 = 0;
3370
3370
  var pbegin = 0;
3371
3371
  var pend = source.length;
3372
3372
  while (pbegin !== pend && source[pbegin] === 0) {
@@ -3378,7 +3378,7 @@ function base2(ALPHABET, name7) {
3378
3378
  while (pbegin !== pend) {
3379
3379
  var carry = source[pbegin];
3380
3380
  var i2 = 0;
3381
- for (var it1 = size - 1; (carry !== 0 || i2 < length6) && it1 !== -1; it1--, i2++) {
3381
+ for (var it1 = size - 1; (carry !== 0 || i2 < length5) && it1 !== -1; it1--, i2++) {
3382
3382
  carry += 256 * b58[it1] >>> 0;
3383
3383
  b58[it1] = carry % BASE >>> 0;
3384
3384
  carry = carry / BASE >>> 0;
@@ -3386,10 +3386,10 @@ function base2(ALPHABET, name7) {
3386
3386
  if (carry !== 0) {
3387
3387
  throw new Error("Non-zero carry");
3388
3388
  }
3389
- length6 = i2;
3389
+ length5 = i2;
3390
3390
  pbegin++;
3391
3391
  }
3392
- var it2 = size - length6;
3392
+ var it2 = size - length5;
3393
3393
  while (it2 !== size && b58[it2] === 0) {
3394
3394
  it2++;
3395
3395
  }
@@ -3411,7 +3411,7 @@ function base2(ALPHABET, name7) {
3411
3411
  return;
3412
3412
  }
3413
3413
  var zeroes = 0;
3414
- var length6 = 0;
3414
+ var length5 = 0;
3415
3415
  while (source[psz] === LEADER) {
3416
3416
  zeroes++;
3417
3417
  psz++;
@@ -3424,7 +3424,7 @@ function base2(ALPHABET, name7) {
3424
3424
  return;
3425
3425
  }
3426
3426
  var i2 = 0;
3427
- for (var it3 = size - 1; (carry !== 0 || i2 < length6) && it3 !== -1; it3--, i2++) {
3427
+ for (var it3 = size - 1; (carry !== 0 || i2 < length5) && it3 !== -1; it3--, i2++) {
3428
3428
  carry += BASE * b256[it3] >>> 0;
3429
3429
  b256[it3] = carry % 256 >>> 0;
3430
3430
  carry = carry / 256 >>> 0;
@@ -3432,13 +3432,13 @@ function base2(ALPHABET, name7) {
3432
3432
  if (carry !== 0) {
3433
3433
  throw new Error("Non-zero carry");
3434
3434
  }
3435
- length6 = i2;
3435
+ length5 = i2;
3436
3436
  psz++;
3437
3437
  }
3438
3438
  if (source[psz] === " ") {
3439
3439
  return;
3440
3440
  }
3441
- var it4 = size - length6;
3441
+ var it4 = size - length5;
3442
3442
  while (it4 !== size && b256[it4] === 0) {
3443
3443
  it4++;
3444
3444
  }
@@ -3449,7 +3449,7 @@ function base2(ALPHABET, name7) {
3449
3449
  }
3450
3450
  return vch;
3451
3451
  }
3452
- function decode26(string3) {
3452
+ function decode22(string3) {
3453
3453
  var buffer3 = decodeUnsafe(string3);
3454
3454
  if (buffer3) {
3455
3455
  return buffer3;
@@ -3457,9 +3457,9 @@ function base2(ALPHABET, name7) {
3457
3457
  throw new Error(`Non-${name7} character`);
3458
3458
  }
3459
3459
  return {
3460
- encode: encode20,
3460
+ encode: encode18,
3461
3461
  decodeUnsafe,
3462
- decode: decode26
3462
+ decode: decode22
3463
3463
  };
3464
3464
  }
3465
3465
  var src2 = base2;
@@ -3601,17 +3601,17 @@ var Codec2 = class {
3601
3601
  return this.decoder.decode(input);
3602
3602
  }
3603
3603
  };
3604
- var from2 = ({ name: name7, prefix, encode: encode20, decode: decode26 }) => new Codec2(name7, prefix, encode20, decode26);
3604
+ var from2 = ({ name: name7, prefix, encode: encode18, decode: decode22 }) => new Codec2(name7, prefix, encode18, decode22);
3605
3605
  var baseX2 = ({ prefix, name: name7, alphabet: alphabet3 }) => {
3606
- const { encode: encode20, decode: decode26 } = base_x_default2(alphabet3, name7);
3606
+ const { encode: encode18, decode: decode22 } = base_x_default2(alphabet3, name7);
3607
3607
  return from2({
3608
3608
  prefix,
3609
3609
  name: name7,
3610
- encode: encode20,
3610
+ encode: encode18,
3611
3611
  /**
3612
3612
  * @param {string} text
3613
3613
  */
3614
- decode: (text) => coerce2(decode26(text))
3614
+ decode: (text) => coerce2(decode22(text))
3615
3615
  });
3616
3616
  };
3617
3617
  var decode10 = (string3, alphabet3, bitsPerChar, name7) => {
@@ -3750,7 +3750,7 @@ var base32z2 = rfc46482({
3750
3750
  });
3751
3751
 
3752
3752
  // ../../node_modules/.bun/multiformats@11.0.2/node_modules/multiformats/src/cid.js
3753
- var format2 = (link, base5) => {
3753
+ var format2 = (link, base4) => {
3754
3754
  const { bytes, version } = link;
3755
3755
  switch (version) {
3756
3756
  case 0:
@@ -3758,26 +3758,26 @@ var format2 = (link, base5) => {
3758
3758
  bytes,
3759
3759
  baseCache2(link),
3760
3760
  /** @type {API.MultibaseEncoder<"z">} */
3761
- base5 || base58btc2.encoder
3761
+ base4 || base58btc2.encoder
3762
3762
  );
3763
3763
  default:
3764
3764
  return toStringV12(
3765
3765
  bytes,
3766
3766
  baseCache2(link),
3767
3767
  /** @type {API.MultibaseEncoder<Prefix>} */
3768
- base5 || base322.encoder
3768
+ base4 || base322.encoder
3769
3769
  );
3770
3770
  }
3771
3771
  };
3772
3772
  var cache2 = /* @__PURE__ */ new WeakMap();
3773
3773
  var baseCache2 = (cid) => {
3774
- const baseCache5 = cache2.get(cid);
3775
- if (baseCache5 == null) {
3776
- const baseCache6 = /* @__PURE__ */ new Map();
3777
- cache2.set(cid, baseCache6);
3778
- return baseCache6;
3774
+ const baseCache4 = cache2.get(cid);
3775
+ if (baseCache4 == null) {
3776
+ const baseCache5 = /* @__PURE__ */ new Map();
3777
+ cache2.set(cid, baseCache5);
3778
+ return baseCache5;
3779
3779
  }
3780
- return baseCache5;
3780
+ return baseCache4;
3781
3781
  };
3782
3782
  var CID2 = class {
3783
3783
  /**
@@ -3898,8 +3898,8 @@ var CID2 = class {
3898
3898
  * @param {API.MultibaseEncoder<string>} [base]
3899
3899
  * @returns {string}
3900
3900
  */
3901
- toString(base5) {
3902
- return format2(this, base5);
3901
+ toString(base4) {
3902
+ return format2(this, base4);
3903
3903
  }
3904
3904
  toJSON() {
3905
3905
  return { "/": format2(this) };
@@ -4106,8 +4106,8 @@ var CID2 = class {
4106
4106
  static inspectBytes(initialBytes) {
4107
4107
  let offset = 0;
4108
4108
  const next = () => {
4109
- const [i, length6] = decode8(initialBytes.subarray(offset));
4110
- offset += length6;
4109
+ const [i, length5] = decode8(initialBytes.subarray(offset));
4110
+ offset += length5;
4111
4111
  return i;
4112
4112
  };
4113
4113
  let version = (
@@ -4157,8 +4157,8 @@ var CID2 = class {
4157
4157
  * @param {API.MultibaseDecoder<Prefix>} [base]
4158
4158
  * @returns {CID<Data, Code, Alg, Ver>}
4159
4159
  */
4160
- static parse(source, base5) {
4161
- const [prefix, bytes] = parseCIDtoBytes2(source, base5);
4160
+ static parse(source, base4) {
4161
+ const [prefix, bytes] = parseCIDtoBytes2(source, base4);
4162
4162
  const cid = CID2.decode(bytes);
4163
4163
  if (cid.version === 0 && source[0] !== "Q") {
4164
4164
  throw Error("Version 0 CID string must not include multibase prefix");
@@ -4167,10 +4167,10 @@ var CID2 = class {
4167
4167
  return cid;
4168
4168
  }
4169
4169
  };
4170
- var parseCIDtoBytes2 = (source, base5) => {
4170
+ var parseCIDtoBytes2 = (source, base4) => {
4171
4171
  switch (source[0]) {
4172
4172
  case "Q": {
4173
- const decoder = base5 || base58btc2;
4173
+ const decoder = base4 || base58btc2;
4174
4174
  return [
4175
4175
  /** @type {Prefix} */
4176
4176
  base58btc2.prefix,
@@ -4178,7 +4178,7 @@ var parseCIDtoBytes2 = (source, base5) => {
4178
4178
  ];
4179
4179
  }
4180
4180
  case base58btc2.prefix: {
4181
- const decoder = base5 || base58btc2;
4181
+ const decoder = base4 || base58btc2;
4182
4182
  return [
4183
4183
  /** @type {Prefix} */
4184
4184
  base58btc2.prefix,
@@ -4186,7 +4186,7 @@ var parseCIDtoBytes2 = (source, base5) => {
4186
4186
  ];
4187
4187
  }
4188
4188
  case base322.prefix: {
4189
- const decoder = base5 || base322;
4189
+ const decoder = base4 || base322;
4190
4190
  return [
4191
4191
  /** @type {Prefix} */
4192
4192
  base322.prefix,
@@ -4194,7 +4194,7 @@ var parseCIDtoBytes2 = (source, base5) => {
4194
4194
  ];
4195
4195
  }
4196
4196
  default: {
4197
- if (base5 == null) {
4197
+ if (base4 == null) {
4198
4198
  throw Error(
4199
4199
  "To parse non base32 or base58btc encoded CID multibase decoder must be provided"
4200
4200
  );
@@ -4202,31 +4202,31 @@ var parseCIDtoBytes2 = (source, base5) => {
4202
4202
  return [
4203
4203
  /** @type {Prefix} */
4204
4204
  source[0],
4205
- base5.decode(source)
4205
+ base4.decode(source)
4206
4206
  ];
4207
4207
  }
4208
4208
  }
4209
4209
  };
4210
- var toStringV02 = (bytes, cache5, base5) => {
4211
- const { prefix } = base5;
4210
+ var toStringV02 = (bytes, cache4, base4) => {
4211
+ const { prefix } = base4;
4212
4212
  if (prefix !== base58btc2.prefix) {
4213
- throw Error(`Cannot string encode V0 in ${base5.name} encoding`);
4213
+ throw Error(`Cannot string encode V0 in ${base4.name} encoding`);
4214
4214
  }
4215
- const cid = cache5.get(prefix);
4215
+ const cid = cache4.get(prefix);
4216
4216
  if (cid == null) {
4217
- const cid2 = base5.encode(bytes).slice(1);
4218
- cache5.set(prefix, cid2);
4217
+ const cid2 = base4.encode(bytes).slice(1);
4218
+ cache4.set(prefix, cid2);
4219
4219
  return cid2;
4220
4220
  } else {
4221
4221
  return cid;
4222
4222
  }
4223
4223
  };
4224
- var toStringV12 = (bytes, cache5, base5) => {
4225
- const { prefix } = base5;
4226
- const cid = cache5.get(prefix);
4224
+ var toStringV12 = (bytes, cache4, base4) => {
4225
+ const { prefix } = base4;
4226
+ const cid = cache4.get(prefix);
4227
4227
  if (cid == null) {
4228
- const cid2 = base5.encode(bytes);
4229
- cache5.set(prefix, cid2);
4228
+ const cid2 = base4.encode(bytes);
4229
+ cache4.set(prefix, cid2);
4230
4230
  return cid2;
4231
4231
  } else {
4232
4232
  return cid;
@@ -4334,8 +4334,8 @@ function allocUnsafe(size = 0) {
4334
4334
 
4335
4335
  // ../../node_modules/.bun/uint8arrays@5.1.0/node_modules/uint8arrays/dist/src/concat.node.js
4336
4336
  var import_node_buffer2 = require("node:buffer");
4337
- function concat2(arrays, length6) {
4338
- return asUint8Array(import_node_buffer2.Buffer.concat(arrays, length6));
4337
+ function concat2(arrays, length5) {
4338
+ return asUint8Array(import_node_buffer2.Buffer.concat(arrays, length5));
4339
4339
  }
4340
4340
 
4341
4341
  // ../../node_modules/.bun/uint8arrays@5.1.0/node_modules/uint8arrays/dist/src/equals.js
@@ -4403,19 +4403,19 @@ var Uint8ArrayList = class {
4403
4403
  * Add all `bufs` to the end of this Uint8ArrayList
4404
4404
  */
4405
4405
  appendAll(bufs) {
4406
- let length6 = 0;
4406
+ let length5 = 0;
4407
4407
  for (const buf2 of bufs) {
4408
4408
  if (buf2 instanceof Uint8Array) {
4409
- length6 += buf2.byteLength;
4409
+ length5 += buf2.byteLength;
4410
4410
  this.bufs.push(buf2);
4411
4411
  } else if (isUint8ArrayList(buf2)) {
4412
- length6 += buf2.byteLength;
4412
+ length5 += buf2.byteLength;
4413
4413
  this.bufs.push(...buf2.bufs);
4414
4414
  } else {
4415
4415
  throw new Error("Could not append value, must be an Uint8Array or a Uint8ArrayList");
4416
4416
  }
4417
4417
  }
4418
- this.length += length6;
4418
+ this.length += length5;
4419
4419
  }
4420
4420
  /**
4421
4421
  * Add one or more `bufs` to the start of this Uint8ArrayList
@@ -4427,19 +4427,19 @@ var Uint8ArrayList = class {
4427
4427
  * Add all `bufs` to the start of this Uint8ArrayList
4428
4428
  */
4429
4429
  prependAll(bufs) {
4430
- let length6 = 0;
4430
+ let length5 = 0;
4431
4431
  for (const buf2 of bufs.reverse()) {
4432
4432
  if (buf2 instanceof Uint8Array) {
4433
- length6 += buf2.byteLength;
4433
+ length5 += buf2.byteLength;
4434
4434
  this.bufs.unshift(buf2);
4435
4435
  } else if (isUint8ArrayList(buf2)) {
4436
- length6 += buf2.byteLength;
4436
+ length5 += buf2.byteLength;
4437
4437
  this.bufs.unshift(...buf2.bufs);
4438
4438
  } else {
4439
4439
  throw new Error("Could not prepend value, must be an Uint8Array or a Uint8ArrayList");
4440
4440
  }
4441
4441
  }
4442
- this.length += length6;
4442
+ this.length += length5;
4443
4443
  }
4444
4444
  /**
4445
4445
  * Read the value at `index`
@@ -4503,8 +4503,8 @@ var Uint8ArrayList = class {
4503
4503
  * - note this is different to the behaviour of Node Buffers.
4504
4504
  */
4505
4505
  slice(beginInclusive, endExclusive) {
4506
- const { bufs, length: length6 } = this._subList(beginInclusive, endExclusive);
4507
- return concat2(bufs, length6);
4506
+ const { bufs, length: length5 } = this._subList(beginInclusive, endExclusive);
4507
+ return concat2(bufs, length5);
4508
4508
  }
4509
4509
  /**
4510
4510
  * Returns a alloc from the given start and end element index.
@@ -4513,11 +4513,11 @@ var Uint8ArrayList = class {
4513
4513
  * internally this is a no-copy operation otherwise it is a copy operation.
4514
4514
  */
4515
4515
  subarray(beginInclusive, endExclusive) {
4516
- const { bufs, length: length6 } = this._subList(beginInclusive, endExclusive);
4516
+ const { bufs, length: length5 } = this._subList(beginInclusive, endExclusive);
4517
4517
  if (bufs.length === 1) {
4518
4518
  return bufs[0];
4519
4519
  }
4520
- return concat2(bufs, length6);
4520
+ return concat2(bufs, length5);
4521
4521
  }
4522
4522
  /**
4523
4523
  * Returns a allocList from the given start and end element index.
@@ -4525,9 +4525,9 @@ var Uint8ArrayList = class {
4525
4525
  * This is a no-copy operation.
4526
4526
  */
4527
4527
  sublist(beginInclusive, endExclusive) {
4528
- const { bufs, length: length6 } = this._subList(beginInclusive, endExclusive);
4528
+ const { bufs, length: length5 } = this._subList(beginInclusive, endExclusive);
4529
4529
  const list = new Uint8ArrayList();
4530
- list.length = length6;
4530
+ list.length = length5;
4531
4531
  list.bufs = [...bufs];
4532
4532
  return list;
4533
4533
  }
@@ -4770,13 +4770,13 @@ var Uint8ArrayList = class {
4770
4770
  * Create a Uint8ArrayList from a pre-existing list of Uint8Arrays. Use this
4771
4771
  * method if you know the total size of all the Uint8Arrays ahead of time.
4772
4772
  */
4773
- static fromUint8Arrays(bufs, length6) {
4773
+ static fromUint8Arrays(bufs, length5) {
4774
4774
  const list = new Uint8ArrayList();
4775
4775
  list.bufs = bufs;
4776
- if (length6 == null) {
4777
- length6 = bufs.reduce((acc, curr) => acc + curr.byteLength, 0);
4776
+ if (length5 == null) {
4777
+ length5 = bufs.reduce((acc, curr) => acc + curr.byteLength, 0);
4778
4778
  }
4779
- list.length = length6;
4779
+ list.length = length5;
4780
4780
  return list;
4781
4781
  }
4782
4782
  };
@@ -4895,7 +4895,7 @@ function base3(ALPHABET, name7) {
4895
4895
  var LEADER = ALPHABET.charAt(0);
4896
4896
  var FACTOR = Math.log(BASE) / Math.log(256);
4897
4897
  var iFACTOR = Math.log(256) / Math.log(BASE);
4898
- function encode20(source) {
4898
+ function encode18(source) {
4899
4899
  if (source instanceof Uint8Array)
4900
4900
  ;
4901
4901
  else if (ArrayBuffer.isView(source)) {
@@ -4910,7 +4910,7 @@ function base3(ALPHABET, name7) {
4910
4910
  return "";
4911
4911
  }
4912
4912
  var zeroes = 0;
4913
- var length6 = 0;
4913
+ var length5 = 0;
4914
4914
  var pbegin = 0;
4915
4915
  var pend = source.length;
4916
4916
  while (pbegin !== pend && source[pbegin] === 0) {
@@ -4922,7 +4922,7 @@ function base3(ALPHABET, name7) {
4922
4922
  while (pbegin !== pend) {
4923
4923
  var carry = source[pbegin];
4924
4924
  var i2 = 0;
4925
- for (var it1 = size - 1; (carry !== 0 || i2 < length6) && it1 !== -1; it1--, i2++) {
4925
+ for (var it1 = size - 1; (carry !== 0 || i2 < length5) && it1 !== -1; it1--, i2++) {
4926
4926
  carry += 256 * b58[it1] >>> 0;
4927
4927
  b58[it1] = carry % BASE >>> 0;
4928
4928
  carry = carry / BASE >>> 0;
@@ -4930,10 +4930,10 @@ function base3(ALPHABET, name7) {
4930
4930
  if (carry !== 0) {
4931
4931
  throw new Error("Non-zero carry");
4932
4932
  }
4933
- length6 = i2;
4933
+ length5 = i2;
4934
4934
  pbegin++;
4935
4935
  }
4936
- var it2 = size - length6;
4936
+ var it2 = size - length5;
4937
4937
  while (it2 !== size && b58[it2] === 0) {
4938
4938
  it2++;
4939
4939
  }
@@ -4955,7 +4955,7 @@ function base3(ALPHABET, name7) {
4955
4955
  return;
4956
4956
  }
4957
4957
  var zeroes = 0;
4958
- var length6 = 0;
4958
+ var length5 = 0;
4959
4959
  while (source[psz] === LEADER) {
4960
4960
  zeroes++;
4961
4961
  psz++;
@@ -4968,7 +4968,7 @@ function base3(ALPHABET, name7) {
4968
4968
  return;
4969
4969
  }
4970
4970
  var i2 = 0;
4971
- for (var it3 = size - 1; (carry !== 0 || i2 < length6) && it3 !== -1; it3--, i2++) {
4971
+ for (var it3 = size - 1; (carry !== 0 || i2 < length5) && it3 !== -1; it3--, i2++) {
4972
4972
  carry += BASE * b256[it3] >>> 0;
4973
4973
  b256[it3] = carry % 256 >>> 0;
4974
4974
  carry = carry / 256 >>> 0;
@@ -4976,13 +4976,13 @@ function base3(ALPHABET, name7) {
4976
4976
  if (carry !== 0) {
4977
4977
  throw new Error("Non-zero carry");
4978
4978
  }
4979
- length6 = i2;
4979
+ length5 = i2;
4980
4980
  psz++;
4981
4981
  }
4982
4982
  if (source[psz] === " ") {
4983
4983
  return;
4984
4984
  }
4985
- var it4 = size - length6;
4985
+ var it4 = size - length5;
4986
4986
  while (it4 !== size && b256[it4] === 0) {
4987
4987
  it4++;
4988
4988
  }
@@ -4993,7 +4993,7 @@ function base3(ALPHABET, name7) {
4993
4993
  }
4994
4994
  return vch;
4995
4995
  }
4996
- function decode26(string3) {
4996
+ function decode22(string3) {
4997
4997
  var buffer3 = decodeUnsafe(string3);
4998
4998
  if (buffer3) {
4999
4999
  return buffer3;
@@ -5001,9 +5001,9 @@ function base3(ALPHABET, name7) {
5001
5001
  throw new Error(`Non-${name7} character`);
5002
5002
  }
5003
5003
  return {
5004
- encode: encode20,
5004
+ encode: encode18,
5005
5005
  decodeUnsafe,
5006
- decode: decode26
5006
+ decode: decode22
5007
5007
  };
5008
5008
  }
5009
5009
  var src3 = base3;
@@ -5103,16 +5103,16 @@ var Codec3 = class {
5103
5103
  return this.decoder.decode(input);
5104
5104
  }
5105
5105
  };
5106
- function from3({ name: name7, prefix, encode: encode20, decode: decode26 }) {
5107
- return new Codec3(name7, prefix, encode20, decode26);
5106
+ function from3({ name: name7, prefix, encode: encode18, decode: decode22 }) {
5107
+ return new Codec3(name7, prefix, encode18, decode22);
5108
5108
  }
5109
5109
  function baseX3({ name: name7, prefix, alphabet: alphabet3 }) {
5110
- const { encode: encode20, decode: decode26 } = base_x_default3(alphabet3, name7);
5110
+ const { encode: encode18, decode: decode22 } = base_x_default3(alphabet3, name7);
5111
5111
  return from3({
5112
5112
  prefix,
5113
5113
  name: name7,
5114
- encode: encode20,
5115
- decode: (text) => coerce3(decode26(text))
5114
+ encode: encode18,
5115
+ decode: (text) => coerce3(decode22(text))
5116
5116
  });
5117
5117
  }
5118
5118
  function decode11(string3, alphabetIdx, bitsPerChar, name7) {
@@ -5394,24 +5394,24 @@ var Digest3 = class {
5394
5394
  };
5395
5395
 
5396
5396
  // ../../node_modules/.bun/multiformats@13.4.2/node_modules/multiformats/dist/src/cid.js
5397
- function format3(link, base5) {
5397
+ function format3(link, base4) {
5398
5398
  const { bytes, version } = link;
5399
5399
  switch (version) {
5400
5400
  case 0:
5401
- return toStringV03(bytes, baseCache3(link), base5 ?? base58btc3.encoder);
5401
+ return toStringV03(bytes, baseCache3(link), base4 ?? base58btc3.encoder);
5402
5402
  default:
5403
- return toStringV13(bytes, baseCache3(link), base5 ?? base323.encoder);
5403
+ return toStringV13(bytes, baseCache3(link), base4 ?? base323.encoder);
5404
5404
  }
5405
5405
  }
5406
5406
  var cache3 = /* @__PURE__ */ new WeakMap();
5407
5407
  function baseCache3(cid) {
5408
- const baseCache5 = cache3.get(cid);
5409
- if (baseCache5 == null) {
5410
- const baseCache6 = /* @__PURE__ */ new Map();
5411
- cache3.set(cid, baseCache6);
5412
- return baseCache6;
5408
+ const baseCache4 = cache3.get(cid);
5409
+ if (baseCache4 == null) {
5410
+ const baseCache5 = /* @__PURE__ */ new Map();
5411
+ cache3.set(cid, baseCache5);
5412
+ return baseCache5;
5413
5413
  }
5414
- return baseCache5;
5414
+ return baseCache4;
5415
5415
  }
5416
5416
  var CID3 = class {
5417
5417
  code;
@@ -5490,8 +5490,8 @@ var CID3 = class {
5490
5490
  const unknown = other;
5491
5491
  return unknown != null && self.code === unknown.code && self.version === unknown.version && equals7(self.multihash, unknown.multihash);
5492
5492
  }
5493
- toString(base5) {
5494
- return format3(this, base5);
5493
+ toString(base4) {
5494
+ return format3(this, base4);
5495
5495
  }
5496
5496
  toJSON() {
5497
5497
  return { "/": format3(this) };
@@ -5623,8 +5623,8 @@ var CID3 = class {
5623
5623
  static inspectBytes(initialBytes) {
5624
5624
  let offset = 0;
5625
5625
  const next = () => {
5626
- const [i, length6] = decode13(initialBytes.subarray(offset));
5627
- offset += length6;
5626
+ const [i, length5] = decode13(initialBytes.subarray(offset));
5627
+ offset += length5;
5628
5628
  return i;
5629
5629
  };
5630
5630
  let version = next();
@@ -5651,8 +5651,8 @@ var CID3 = class {
5651
5651
  * throw an error if encoding of the CID is not compatible with supplied (or
5652
5652
  * a default decoder).
5653
5653
  */
5654
- static parse(source, base5) {
5655
- const [prefix, bytes] = parseCIDtoBytes3(source, base5);
5654
+ static parse(source, base4) {
5655
+ const [prefix, bytes] = parseCIDtoBytes3(source, base4);
5656
5656
  const cid = CID3.decode(bytes);
5657
5657
  if (cid.version === 0 && source[0] !== "Q") {
5658
5658
  throw Error("Version 0 CID string must not include multibase prefix");
@@ -5661,55 +5661,55 @@ var CID3 = class {
5661
5661
  return cid;
5662
5662
  }
5663
5663
  };
5664
- function parseCIDtoBytes3(source, base5) {
5664
+ function parseCIDtoBytes3(source, base4) {
5665
5665
  switch (source[0]) {
5666
5666
  case "Q": {
5667
- const decoder = base5 ?? base58btc3;
5667
+ const decoder = base4 ?? base58btc3;
5668
5668
  return [
5669
5669
  base58btc3.prefix,
5670
5670
  decoder.decode(`${base58btc3.prefix}${source}`)
5671
5671
  ];
5672
5672
  }
5673
5673
  case base58btc3.prefix: {
5674
- const decoder = base5 ?? base58btc3;
5674
+ const decoder = base4 ?? base58btc3;
5675
5675
  return [base58btc3.prefix, decoder.decode(source)];
5676
5676
  }
5677
5677
  case base323.prefix: {
5678
- const decoder = base5 ?? base323;
5678
+ const decoder = base4 ?? base323;
5679
5679
  return [base323.prefix, decoder.decode(source)];
5680
5680
  }
5681
5681
  case base36.prefix: {
5682
- const decoder = base5 ?? base36;
5682
+ const decoder = base4 ?? base36;
5683
5683
  return [base36.prefix, decoder.decode(source)];
5684
5684
  }
5685
5685
  default: {
5686
- if (base5 == null) {
5686
+ if (base4 == null) {
5687
5687
  throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");
5688
5688
  }
5689
- return [source[0], base5.decode(source)];
5689
+ return [source[0], base4.decode(source)];
5690
5690
  }
5691
5691
  }
5692
5692
  }
5693
- function toStringV03(bytes, cache5, base5) {
5694
- const { prefix } = base5;
5693
+ function toStringV03(bytes, cache4, base4) {
5694
+ const { prefix } = base4;
5695
5695
  if (prefix !== base58btc3.prefix) {
5696
- throw Error(`Cannot string encode V0 in ${base5.name} encoding`);
5696
+ throw Error(`Cannot string encode V0 in ${base4.name} encoding`);
5697
5697
  }
5698
- const cid = cache5.get(prefix);
5698
+ const cid = cache4.get(prefix);
5699
5699
  if (cid == null) {
5700
- const cid2 = base5.encode(bytes).slice(1);
5701
- cache5.set(prefix, cid2);
5700
+ const cid2 = base4.encode(bytes).slice(1);
5701
+ cache4.set(prefix, cid2);
5702
5702
  return cid2;
5703
5703
  } else {
5704
5704
  return cid;
5705
5705
  }
5706
5706
  }
5707
- function toStringV13(bytes, cache5, base5) {
5708
- const { prefix } = base5;
5709
- const cid = cache5.get(prefix);
5707
+ function toStringV13(bytes, cache4, base4) {
5708
+ const { prefix } = base4;
5709
+ const cid = cache4.get(prefix);
5710
5710
  if (cid == null) {
5711
- const cid2 = base5.encode(bytes);
5712
- cache5.set(prefix, cid2);
5711
+ const cid2 = base4.encode(bytes);
5712
+ cache4.set(prefix, cid2);
5713
5713
  return cid2;
5714
5714
  } else {
5715
5715
  return cid;
@@ -5941,7 +5941,7 @@ function sizeNode(node) {
5941
5941
  }
5942
5942
  function encodeVarint(bytes, offset, v) {
5943
5943
  offset -= sov(v);
5944
- const base5 = offset;
5944
+ const base4 = offset;
5945
5945
  while (v >= maxUInt32) {
5946
5946
  bytes[offset++] = v & 127 | 128;
5947
5947
  v /= 128;
@@ -5951,7 +5951,7 @@ function encodeVarint(bytes, offset, v) {
5951
5951
  v >>>= 7;
5952
5952
  }
5953
5953
  bytes[offset] = v;
5954
- return base5;
5954
+ return base4;
5955
5955
  }
5956
5956
  function sov(x) {
5957
5957
  if (x % 2 === 0) {
@@ -6973,13 +6973,13 @@ var Uint8ArrayReader = class {
6973
6973
  * Reads a sequence of bytes preceded by its length as a varint
6974
6974
  */
6975
6975
  bytes() {
6976
- const length6 = this.uint32();
6976
+ const length5 = this.uint32();
6977
6977
  const start = this.pos;
6978
- const end = this.pos + length6;
6978
+ const end = this.pos + length5;
6979
6979
  if (end > this.len) {
6980
- throw indexOutOfRange(this, length6);
6980
+ throw indexOutOfRange(this, length5);
6981
6981
  }
6982
- this.pos += length6;
6982
+ this.pos += length5;
6983
6983
  return start === end ? new Uint8Array(0) : this.buf.subarray(start, end);
6984
6984
  }
6985
6985
  /**
@@ -6992,12 +6992,12 @@ var Uint8ArrayReader = class {
6992
6992
  /**
6993
6993
  * Skips the specified number of bytes if specified, otherwise skips a varint
6994
6994
  */
6995
- skip(length6) {
6996
- if (typeof length6 === "number") {
6997
- if (this.pos + length6 > this.len) {
6998
- throw indexOutOfRange(this, length6);
6995
+ skip(length5) {
6996
+ if (typeof length5 === "number") {
6997
+ if (this.pos + length5 > this.len) {
6998
+ throw indexOutOfRange(this, length5);
6999
6999
  }
7000
- this.pos += length6;
7000
+ this.pos += length5;
7001
7001
  } else {
7002
7002
  do {
7003
7003
  if (this.pos >= this.len) {
@@ -7380,8 +7380,8 @@ var import_crypto = __toESM(require("crypto"), 1);
7380
7380
 
7381
7381
  // ../../node_modules/.bun/multiformats@13.4.2/node_modules/multiformats/dist/src/hashes/hasher.js
7382
7382
  var DEFAULT_MIN_DIGEST_LENGTH = 20;
7383
- function from4({ name: name7, code: code8, encode: encode20, minDigestLength, maxDigestLength }) {
7384
- return new Hasher(name7, code8, encode20, minDigestLength, maxDigestLength);
7383
+ function from4({ name: name7, code: code8, encode: encode18, minDigestLength, maxDigestLength }) {
7384
+ return new Hasher(name7, code8, encode18, minDigestLength, maxDigestLength);
7385
7385
  }
7386
7386
  var Hasher = class {
7387
7387
  name;
@@ -7389,10 +7389,10 @@ var Hasher = class {
7389
7389
  encode;
7390
7390
  minDigestLength;
7391
7391
  maxDigestLength;
7392
- constructor(name7, code8, encode20, minDigestLength, maxDigestLength) {
7392
+ constructor(name7, code8, encode18, minDigestLength, maxDigestLength) {
7393
7393
  this.name = name7;
7394
7394
  this.code = code8;
7395
- this.encode = encode20;
7395
+ this.encode = encode18;
7396
7396
  this.minDigestLength = minDigestLength ?? DEFAULT_MIN_DIGEST_LENGTH;
7397
7397
  this.maxDigestLength = maxDigestLength;
7398
7398
  }
@@ -7443,17 +7443,17 @@ var bases = { ...identity_exports, ...base2_exports, ...base8_exports, ...base10
7443
7443
  var hashes = { ...sha2_exports, ...identity_exports2 };
7444
7444
 
7445
7445
  // ../../node_modules/.bun/uint8arrays@5.1.0/node_modules/uint8arrays/dist/src/util/bases.js
7446
- function createCodec(name7, prefix, encode20, decode26) {
7446
+ function createCodec(name7, prefix, encode18, decode22) {
7447
7447
  return {
7448
7448
  name: name7,
7449
7449
  prefix,
7450
7450
  encoder: {
7451
7451
  name: name7,
7452
7452
  prefix,
7453
- encode: encode20
7453
+ encode: encode18
7454
7454
  },
7455
7455
  decoder: {
7456
- decode: decode26
7456
+ decode: decode22
7457
7457
  }
7458
7458
  };
7459
7459
  }
@@ -7491,14 +7491,14 @@ var bases_default = BASES;
7491
7491
 
7492
7492
  // ../../node_modules/.bun/uint8arrays@5.1.0/node_modules/uint8arrays/dist/src/from-string.node.js
7493
7493
  function fromString4(string3, encoding = "utf8") {
7494
- const base5 = bases_default[encoding];
7495
- if (base5 == null) {
7494
+ const base4 = bases_default[encoding];
7495
+ if (base4 == null) {
7496
7496
  throw new Error(`Unsupported encoding "${encoding}"`);
7497
7497
  }
7498
7498
  if (encoding === "utf8" || encoding === "utf-8") {
7499
7499
  return asUint8Array(import_node_buffer3.Buffer.from(string3, "utf-8"));
7500
7500
  }
7501
- return base5.decoder.decode(`${base5.prefix}${string3}`);
7501
+ return base4.decoder.decode(`${base4.prefix}${string3}`);
7502
7502
  }
7503
7503
 
7504
7504
  // ../../node_modules/.bun/protons-runtime@5.6.0/node_modules/protons-runtime/dist/src/utils/pool.js
@@ -7923,12 +7923,12 @@ var CODEC_TYPES;
7923
7923
  CODEC_TYPES2[CODEC_TYPES2["END_GROUP"] = 4] = "END_GROUP";
7924
7924
  CODEC_TYPES2[CODEC_TYPES2["BIT32"] = 5] = "BIT32";
7925
7925
  })(CODEC_TYPES || (CODEC_TYPES = {}));
7926
- function createCodec2(name7, type, encode20, decode26) {
7926
+ function createCodec2(name7, type, encode18, decode22) {
7927
7927
  return {
7928
7928
  name: name7,
7929
7929
  type,
7930
- encode: encode20,
7931
- decode: decode26
7930
+ encode: encode18,
7931
+ decode: decode22
7932
7932
  };
7933
7933
  }
7934
7934
 
@@ -7940,20 +7940,20 @@ function enumeration(v) {
7940
7940
  }
7941
7941
  return v[val];
7942
7942
  }
7943
- const encode20 = function enumEncode(val, writer) {
7943
+ const encode18 = function enumEncode(val, writer) {
7944
7944
  const enumValue = findValue(val);
7945
7945
  writer.int32(enumValue);
7946
7946
  };
7947
- const decode26 = function enumDecode(reader) {
7947
+ const decode22 = function enumDecode(reader) {
7948
7948
  const val = reader.int32();
7949
7949
  return findValue(val);
7950
7950
  };
7951
- return createCodec2("enum", CODEC_TYPES.VARINT, encode20, decode26);
7951
+ return createCodec2("enum", CODEC_TYPES.VARINT, encode18, decode22);
7952
7952
  }
7953
7953
 
7954
7954
  // ../../node_modules/.bun/protons-runtime@5.6.0/node_modules/protons-runtime/dist/src/codecs/message.js
7955
- function message(encode20, decode26) {
7956
- return createCodec2("message", CODEC_TYPES.LENGTH_DELIMITED, encode20, decode26);
7955
+ function message(encode18, decode22) {
7956
+ return createCodec2("message", CODEC_TYPES.LENGTH_DELIMITED, encode18, decode22);
7957
7957
  }
7958
7958
 
7959
7959
  // ../../node_modules/.bun/ipfs-unixfs@11.2.5/node_modules/ipfs-unixfs/dist/src/unixfs.js
@@ -8026,11 +8026,11 @@ var Data;
8026
8026
  if (opts.lengthDelimited !== false) {
8027
8027
  w.ldelim();
8028
8028
  }
8029
- }, (reader, length6) => {
8029
+ }, (reader, length5) => {
8030
8030
  const obj = {
8031
8031
  blocksizes: []
8032
8032
  };
8033
- const end = length6 == null ? reader.len : reader.pos + length6;
8033
+ const end = length5 == null ? reader.len : reader.pos + length5;
8034
8034
  while (reader.pos < end) {
8035
8035
  const tag = reader.uint32();
8036
8036
  switch (tag >>> 3) {
@@ -8095,9 +8095,9 @@ var UnixTime;
8095
8095
  if (opts.lengthDelimited !== false) {
8096
8096
  w.ldelim();
8097
8097
  }
8098
- }, (reader, length6) => {
8098
+ }, (reader, length5) => {
8099
8099
  const obj = {};
8100
- const end = length6 == null ? reader.len : reader.pos + length6;
8100
+ const end = length5 == null ? reader.len : reader.pos + length5;
8101
8101
  while (reader.pos < end) {
8102
8102
  const tag = reader.uint32();
8103
8103
  switch (tag >>> 3) {
@@ -8140,9 +8140,9 @@ var Metadata;
8140
8140
  if (opts.lengthDelimited !== false) {
8141
8141
  w.ldelim();
8142
8142
  }
8143
- }, (reader, length6) => {
8143
+ }, (reader, length5) => {
8144
8144
  const obj = {};
8145
- const end = length6 == null ? reader.len : reader.pos + length6;
8145
+ const end = length5 == null ? reader.len : reader.pos + length5;
8146
8146
  while (reader.pos < end) {
8147
8147
  const tag = reader.uint32();
8148
8148
  switch (tag >>> 3) {
@@ -8354,7 +8354,7 @@ var CustomProgressEvent = class extends Event {
8354
8354
  var import_crypto2 = __toESM(require("crypto"), 1);
8355
8355
 
8356
8356
  // ../../node_modules/.bun/multiformats@11.0.2/node_modules/multiformats/src/hashes/hasher.js
8357
- var from5 = ({ name: name7, code: code8, encode: encode20 }) => new Hasher2(name7, code8, encode20);
8357
+ var from5 = ({ name: name7, code: code8, encode: encode18 }) => new Hasher2(name7, code8, encode18);
8358
8358
  var Hasher2 = class {
8359
8359
  /**
8360
8360
  *
@@ -8362,10 +8362,10 @@ var Hasher2 = class {
8362
8362
  * @param {Code} code
8363
8363
  * @param {(input: Uint8Array) => Await<Uint8Array>} encode
8364
8364
  */
8365
- constructor(name7, code8, encode20) {
8365
+ constructor(name7, code8, encode18) {
8366
8366
  this.name = name7;
8367
8367
  this.code = code8;
8368
- this.encode = encode20;
8368
+ this.encode = encode18;
8369
8369
  }
8370
8370
  /**
8371
8371
  * @param {Uint8Array} input
@@ -8873,7 +8873,7 @@ __export(sha2_exports2, {
8873
8873
  var import_crypto3 = __toESM(require("crypto"), 1);
8874
8874
 
8875
8875
  // ../../node_modules/.bun/multiformats@12.1.3/node_modules/multiformats/src/hashes/hasher.js
8876
- var from6 = ({ name: name7, code: code8, encode: encode20 }) => new Hasher3(name7, code8, encode20);
8876
+ var from6 = ({ name: name7, code: code8, encode: encode18 }) => new Hasher3(name7, code8, encode18);
8877
8877
  var Hasher3 = class {
8878
8878
  /**
8879
8879
  *
@@ -8881,10 +8881,10 @@ var Hasher3 = class {
8881
8881
  * @param {Code} code
8882
8882
  * @param {(input: Uint8Array) => Await<Uint8Array>} encode
8883
8883
  */
8884
- constructor(name7, code8, encode20) {
8884
+ constructor(name7, code8, encode18) {
8885
8885
  this.name = name7;
8886
8886
  this.code = code8;
8887
- this.encode = encode20;
8887
+ this.encode = encode18;
8888
8888
  }
8889
8889
  /**
8890
8890
  * @param {Uint8Array} input
@@ -8925,17 +8925,17 @@ function allocUnsafe2(size = 0) {
8925
8925
  }
8926
8926
 
8927
8927
  // ../../node_modules/.bun/uint8arrays@4.0.10/node_modules/uint8arrays/dist/src/util/bases.js
8928
- function createCodec3(name7, prefix, encode20, decode26) {
8928
+ function createCodec3(name7, prefix, encode18, decode22) {
8929
8929
  return {
8930
8930
  name: name7,
8931
8931
  prefix,
8932
8932
  encoder: {
8933
8933
  name: name7,
8934
8934
  prefix,
8935
- encode: encode20
8935
+ encode: encode18
8936
8936
  },
8937
8937
  decoder: {
8938
- decode: decode26
8938
+ decode: decode22
8939
8939
  }
8940
8940
  };
8941
8941
  }
@@ -8973,14 +8973,14 @@ var bases_default2 = BASES2;
8973
8973
 
8974
8974
  // ../../node_modules/.bun/uint8arrays@4.0.10/node_modules/uint8arrays/dist/src/from-string.js
8975
8975
  function fromString5(string3, encoding = "utf8") {
8976
- const base5 = bases_default2[encoding];
8977
- if (base5 == null) {
8976
+ const base4 = bases_default2[encoding];
8977
+ if (base4 == null) {
8978
8978
  throw new Error(`Unsupported encoding "${encoding}"`);
8979
8979
  }
8980
8980
  if ((encoding === "utf8" || encoding === "utf-8") && globalThis.Buffer != null && globalThis.Buffer.from != null) {
8981
8981
  return asUint8Array2(globalThis.Buffer.from(string3, "utf-8"));
8982
8982
  }
8983
- return base5.decoder.decode(`${base5.prefix}${string3}`);
8983
+ return base4.decoder.decode(`${base4.prefix}${string3}`);
8984
8984
  }
8985
8985
 
8986
8986
  // ../../node_modules/.bun/ipfs-unixfs-importer@15.1.5/node_modules/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.js
@@ -9237,8 +9237,8 @@ function fmix32(k) {
9237
9237
  function murmurHash3_x64_128(key, seed = 0) {
9238
9238
  let h1 = u64(seed, 0);
9239
9239
  let h2 = u64(seed, 0);
9240
- const length6 = key.length;
9241
- const blocks = Math.floor(length6 / 16);
9240
+ const length5 = key.length;
9241
+ const blocks = Math.floor(length5 / 16);
9242
9242
  const c1 = u64(289559509, 2277735313);
9243
9243
  const c2 = u64(658871167, 1291169091);
9244
9244
  for (let i = 0; i < blocks; i++) {
@@ -9302,7 +9302,7 @@ function murmurHash3_x64_128(key, seed = 0) {
9302
9302
  k1 = mul64(k1, c2);
9303
9303
  h1 = xor64(h1, k1);
9304
9304
  }
9305
- const len642 = u64(length6, 0);
9305
+ const len642 = u64(length5, 0);
9306
9306
  h1 = xor64(h1, len642);
9307
9307
  h2 = xor64(h2, len642);
9308
9308
  h1 = add64(h1, h2);
@@ -9332,8 +9332,8 @@ function murmurHash3_x64_128(key, seed = 0) {
9332
9332
  }
9333
9333
  function murmurHash3_x86_32(key, seed = 0) {
9334
9334
  let h1 = seed >>> 0;
9335
- const length6 = key.length;
9336
- const blocks = Math.floor(length6 / 4);
9335
+ const length5 = key.length;
9336
+ const blocks = Math.floor(length5 / 4);
9337
9337
  const c1 = 3432918353;
9338
9338
  const c2 = 461845907;
9339
9339
  for (let i = 0; i < blocks; i++) {
@@ -9359,7 +9359,7 @@ function murmurHash3_x86_32(key, seed = 0) {
9359
9359
  k1 = mul32(k1, c2);
9360
9360
  h1 ^= k1;
9361
9361
  }
9362
- h1 ^= length6;
9362
+ h1 ^= length5;
9363
9363
  h1 = fmix32(h1);
9364
9364
  return h1;
9365
9365
  }
@@ -9644,12 +9644,12 @@ var ConsumableBuffer = class {
9644
9644
  return this._currentBytePos >= 0;
9645
9645
  }
9646
9646
  };
9647
- function byteBitsToInt(byte, start, length6) {
9648
- const mask = maskFor(start, length6);
9647
+ function byteBitsToInt(byte, start, length5) {
9648
+ const mask = maskFor(start, length5);
9649
9649
  return (byte & mask) >>> start;
9650
9650
  }
9651
- function maskFor(start, length6) {
9652
- return START_MASKS[start] & STOP_MASKS[Math.min(length6 + start - 1, 7)];
9651
+ function maskFor(start, length5) {
9652
+ return START_MASKS[start] & STOP_MASKS[Math.min(length5 + start - 1, 7)];
9653
9653
  }
9654
9654
 
9655
9655
  // ../../node_modules/.bun/hamt-sharding@3.0.6/node_modules/hamt-sharding/dist/src/consumable-hash.js
@@ -11288,7 +11288,7 @@ var h2b2 = (hex) => {
11288
11288
  return arr;
11289
11289
  };
11290
11290
  var b2n = (b) => BigInt("0x" + (b2h2(b) || "0"));
11291
- var slcNum = (b, from8, to) => b2n(b.slice(from8, to));
11291
+ var slcNum = (b, from7, to) => b2n(b.slice(from7, to));
11292
11292
  var n2b = (num) => {
11293
11293
  return big(num) && num >= 0n && num < B256 ? h2b2(padh2(num, 2 * fLen)) : err2("bigint expected");
11294
11294
  };
@@ -20557,10 +20557,10 @@ var DataStream = class {
20557
20557
  static concatenateArrayOfBytes(arrayOfBytes) {
20558
20558
  const totalLength = arrayOfBytes.reduce((accumulatedValue, currentValue) => accumulatedValue + currentValue.length, 0);
20559
20559
  const result = new Uint8Array(totalLength);
20560
- let length6 = 0;
20560
+ let length5 = 0;
20561
20561
  for (const bytes of arrayOfBytes) {
20562
- result.set(bytes, length6);
20563
- length6 += bytes.length;
20562
+ result.set(bytes, length5);
20563
+ length5 += bytes.length;
20564
20564
  }
20565
20565
  return result;
20566
20566
  }
@@ -21150,8 +21150,8 @@ var __awaiter19 = function(thisArg, _arguments, P3, generator) {
21150
21150
  });
21151
21151
  };
21152
21152
  var DidResolver = class {
21153
- constructor(resolvers2, cache5) {
21154
- this.cache = cache5 || new MemoryCache(600);
21153
+ constructor(resolvers2, cache4) {
21154
+ this.cache = cache4 || new MemoryCache(600);
21155
21155
  if (resolvers2 === void 0 || resolvers2.length === 0) {
21156
21156
  resolvers2 = [
21157
21157
  new DidIonResolver(),
@@ -21289,8 +21289,8 @@ var __awaiter21 = function(thisArg, _arguments, P3, generator) {
21289
21289
  });
21290
21290
  };
21291
21291
  var GeneralJwsVerifier = class {
21292
- constructor(cache5) {
21293
- this.cache = cache5 || new MemoryCache(600);
21292
+ constructor(cache4) {
21293
+ this.cache = cache4 || new MemoryCache(600);
21294
21294
  }
21295
21295
  static get singleton() {
21296
21296
  if (GeneralJwsVerifier._singleton === void 0) {
@@ -25626,7 +25626,7 @@ function last(source) {
25626
25626
  }
25627
25627
  var src_default4 = last;
25628
25628
 
25629
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/is.js
25629
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/is.js
25630
25630
  var objectTypeNames2 = [
25631
25631
  "Object",
25632
25632
  // for Object.create(null) and other non-plain objects
@@ -25694,7 +25694,7 @@ function getObjectType2(value) {
25694
25694
  return void 0;
25695
25695
  }
25696
25696
 
25697
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/token.js
25697
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/token.js
25698
25698
  var Type2 = class {
25699
25699
  /**
25700
25700
  * @param {number} major
@@ -25762,7 +25762,7 @@ var Token2 = class {
25762
25762
  }
25763
25763
  };
25764
25764
 
25765
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/byte-utils.js
25765
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/byte-utils.js
25766
25766
  var useBuffer2 = globalThis.process && // @ts-ignore
25767
25767
  !globalThis.process.browser && // @ts-ignore
25768
25768
  globalThis.Buffer && // @ts-ignore
@@ -25835,13 +25835,13 @@ var concat3 = useBuffer2 ? (
25835
25835
  * @param {number} length
25836
25836
  * @returns {Uint8Array}
25837
25837
  */
25838
- (chunks, length6) => {
25838
+ (chunks, length5) => {
25839
25839
  chunks = chunks.map((c) => c instanceof Uint8Array ? c : (
25840
25840
  // eslint-disable-line operator-linebreak
25841
25841
  // @ts-ignore
25842
25842
  globalThis.Buffer.from(c)
25843
25843
  ));
25844
- return asU8A2(globalThis.Buffer.concat(chunks, length6));
25844
+ return asU8A2(globalThis.Buffer.concat(chunks, length5));
25845
25845
  }
25846
25846
  ) : (
25847
25847
  // eslint-disable-line operator-linebreak
@@ -25850,8 +25850,8 @@ var concat3 = useBuffer2 ? (
25850
25850
  * @param {number} length
25851
25851
  * @returns {Uint8Array}
25852
25852
  */
25853
- (chunks, length6) => {
25854
- const out = new Uint8Array(length6);
25853
+ (chunks, length5) => {
25854
+ const out = new Uint8Array(length5);
25855
25855
  let off = 0;
25856
25856
  for (let b of chunks) {
25857
25857
  if (off + b.length > out.length) {
@@ -25922,7 +25922,7 @@ function utf8ToBytes2(str3) {
25922
25922
  return out;
25923
25923
  }
25924
25924
 
25925
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/bl.js
25925
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/bl.js
25926
25926
  var defaultChunkSize2 = 256;
25927
25927
  var Bl2 = class {
25928
25928
  /**
@@ -26037,7 +26037,7 @@ var U8Bl = class {
26037
26037
  }
26038
26038
  };
26039
26039
 
26040
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/common.js
26040
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/common.js
26041
26041
  var decodeErrPrefix2 = "CBOR decode error:";
26042
26042
  var encodeErrPrefix2 = "CBOR encode error:";
26043
26043
  var uintMinorPrefixBytes2 = [];
@@ -26052,7 +26052,7 @@ function assertEnoughData2(data, pos, need) {
26052
26052
  }
26053
26053
  }
26054
26054
 
26055
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/0uint.js
26055
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/0uint.js
26056
26056
  var uintBoundaries2 = [24, 256, 65536, 4294967296, BigInt("18446744073709551616")];
26057
26057
  function readUint82(data, offset, options) {
26058
26058
  assertEnoughData2(data, offset, 1);
@@ -26173,7 +26173,7 @@ encodeUint2.compareTokens = function compareTokens4(tok1, tok2) {
26173
26173
  );
26174
26174
  };
26175
26175
 
26176
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/1negint.js
26176
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/1negint.js
26177
26177
  function decodeNegint82(data, pos, _minor, options) {
26178
26178
  return new Token2(Type2.negint, -1 - readUint82(data, pos + 1, options), 2);
26179
26179
  }
@@ -26227,11 +26227,11 @@ encodeNegint2.compareTokens = function compareTokens5(tok1, tok2) {
26227
26227
  );
26228
26228
  };
26229
26229
 
26230
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/2bytes.js
26231
- function toToken5(data, pos, prefix, length6) {
26232
- assertEnoughData2(data, pos, prefix + length6);
26233
- const buf2 = data.slice(pos + prefix, pos + prefix + length6);
26234
- return new Token2(Type2.bytes, buf2, prefix + length6);
26230
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/2bytes.js
26231
+ function toToken5(data, pos, prefix, length5) {
26232
+ assertEnoughData2(data, pos, prefix + length5);
26233
+ const buf2 = data.slice(pos + prefix, pos + prefix + length5);
26234
+ return new Token2(Type2.bytes, buf2, prefix + length5);
26235
26235
  }
26236
26236
  function decodeBytesCompact2(data, pos, minor, _options) {
26237
26237
  return toToken5(data, pos, 1, minor);
@@ -26274,7 +26274,7 @@ function compareBytes2(b1, b2) {
26274
26274
  return b1.length < b2.length ? -1 : b1.length > b2.length ? 1 : compare2(b1, b2);
26275
26275
  }
26276
26276
 
26277
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/3string.js
26277
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/3string.js
26278
26278
  var textDecoder6 = new TextDecoder();
26279
26279
  var ASCII_THRESHOLD = 32;
26280
26280
  function toStr(bytes, start, end) {
@@ -26292,8 +26292,8 @@ function toStr(bytes, start, end) {
26292
26292
  }
26293
26293
  return textDecoder6.decode(bytes.subarray(start, end));
26294
26294
  }
26295
- function toToken6(data, pos, prefix, length6, options) {
26296
- const totLength = prefix + length6;
26295
+ function toToken6(data, pos, prefix, length5, options) {
26296
+ const totLength = prefix + length5;
26297
26297
  assertEnoughData2(data, pos, totLength);
26298
26298
  const tok = new Token2(Type2.string, toStr(data, pos + prefix, pos + totLength), totLength);
26299
26299
  if (options.retainStringBytes === true) {
@@ -26322,9 +26322,9 @@ function decodeString642(data, pos, _minor, options) {
26322
26322
  }
26323
26323
  var encodeString2 = encodeBytes2;
26324
26324
 
26325
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/4array.js
26326
- function toToken7(_data, _pos, prefix, length6) {
26327
- return new Token2(Type2.array, length6, prefix);
26325
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/4array.js
26326
+ function toToken7(_data, _pos, prefix, length5) {
26327
+ return new Token2(Type2.array, length5, prefix);
26328
26328
  }
26329
26329
  function decodeArrayCompact2(data, pos, minor, _options) {
26330
26330
  return toToken7(data, pos, 1, minor);
@@ -26359,9 +26359,9 @@ encodeArray2.encodedSize = function encodedSize13(token) {
26359
26359
  return encodeUintValue2.encodedSize(token.value);
26360
26360
  };
26361
26361
 
26362
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/5map.js
26363
- function toToken8(_data, _pos, prefix, length6) {
26364
- return new Token2(Type2.map, length6, prefix);
26362
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/5map.js
26363
+ function toToken8(_data, _pos, prefix, length5) {
26364
+ return new Token2(Type2.map, length5, prefix);
26365
26365
  }
26366
26366
  function decodeMapCompact2(data, pos, minor, _options) {
26367
26367
  return toToken8(data, pos, 1, minor);
@@ -26396,7 +26396,7 @@ encodeMap2.encodedSize = function encodedSize14(token) {
26396
26396
  return encodeUintValue2.encodedSize(token.value);
26397
26397
  };
26398
26398
 
26399
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/6tag.js
26399
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/6tag.js
26400
26400
  function decodeTagCompact2(_data, _pos, minor, _options) {
26401
26401
  return new Token2(Type2.tag, minor, 1);
26402
26402
  }
@@ -26420,7 +26420,7 @@ encodeTag2.encodedSize = function encodedSize15(token) {
26420
26420
  return encodeUintValue2.encodedSize(token.value);
26421
26421
  };
26422
26422
 
26423
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/7float.js
26423
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/7float.js
26424
26424
  var MINOR_FALSE2 = 20;
26425
26425
  var MINOR_TRUE2 = 21;
26426
26426
  var MINOR_NULL2 = 22;
@@ -26596,7 +26596,7 @@ function readFloat642(ui8a3, pos) {
26596
26596
  }
26597
26597
  encodeFloat2.compareTokens = encodeUint2.compareTokens;
26598
26598
 
26599
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/jump.js
26599
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/jump.js
26600
26600
  function invalidMinor2(data, pos, minor) {
26601
26601
  throw new Error(`${decodeErrPrefix2} encountered invalid minor (${minor}) for major ${data[pos] >>> 5}`);
26602
26602
  }
@@ -26752,7 +26752,7 @@ function quickEncodeToken2(token) {
26752
26752
  }
26753
26753
  }
26754
26754
 
26755
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/encode.js
26755
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/encode.js
26756
26756
  var rfc8949EncodeOptions = Object.freeze({
26757
26757
  float64: true,
26758
26758
  mapSorter: rfc8949MapSorter,
@@ -27084,7 +27084,7 @@ function encodeCustom2(data, encoders, options, destination) {
27084
27084
  return writeTo.toBytes(true);
27085
27085
  }
27086
27086
 
27087
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/cborg/lib/decode.js
27087
+ // ../../node_modules/.bun/cborg@4.5.8/node_modules/cborg/lib/decode.js
27088
27088
  var defaultDecodeOptions2 = {
27089
27089
  strict: false,
27090
27090
  allowIndefinite: true,
@@ -27227,879 +27227,6 @@ function decode19(data, options) {
27227
27227
  return decoded;
27228
27228
  }
27229
27229
 
27230
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bytes.js
27231
- var empty4 = new Uint8Array(0);
27232
- function equals8(aa, bb) {
27233
- if (aa === bb) {
27234
- return true;
27235
- }
27236
- if (aa.byteLength !== bb.byteLength) {
27237
- return false;
27238
- }
27239
- for (let ii = 0; ii < aa.byteLength; ii++) {
27240
- if (aa[ii] !== bb[ii]) {
27241
- return false;
27242
- }
27243
- }
27244
- return true;
27245
- }
27246
- function coerce4(o) {
27247
- if (o instanceof Uint8Array && o.constructor.name === "Uint8Array") {
27248
- return o;
27249
- }
27250
- if (o instanceof ArrayBuffer) {
27251
- return new Uint8Array(o);
27252
- }
27253
- if (ArrayBuffer.isView(o)) {
27254
- return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);
27255
- }
27256
- throw new Error("Unknown type, must be binary type");
27257
- }
27258
-
27259
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/vendor/base-x.js
27260
- function base4(ALPHABET, name7) {
27261
- if (ALPHABET.length >= 255) {
27262
- throw new TypeError("Alphabet too long");
27263
- }
27264
- var BASE_MAP = new Uint8Array(256);
27265
- for (var j = 0; j < BASE_MAP.length; j++) {
27266
- BASE_MAP[j] = 255;
27267
- }
27268
- for (var i = 0; i < ALPHABET.length; i++) {
27269
- var x = ALPHABET.charAt(i);
27270
- var xc = x.charCodeAt(0);
27271
- if (BASE_MAP[xc] !== 255) {
27272
- throw new TypeError(x + " is ambiguous");
27273
- }
27274
- BASE_MAP[xc] = i;
27275
- }
27276
- var BASE = ALPHABET.length;
27277
- var LEADER = ALPHABET.charAt(0);
27278
- var FACTOR = Math.log(BASE) / Math.log(256);
27279
- var iFACTOR = Math.log(256) / Math.log(BASE);
27280
- function encode20(source) {
27281
- if (source instanceof Uint8Array)
27282
- ;
27283
- else if (ArrayBuffer.isView(source)) {
27284
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
27285
- } else if (Array.isArray(source)) {
27286
- source = Uint8Array.from(source);
27287
- }
27288
- if (!(source instanceof Uint8Array)) {
27289
- throw new TypeError("Expected Uint8Array");
27290
- }
27291
- if (source.length === 0) {
27292
- return "";
27293
- }
27294
- var zeroes = 0;
27295
- var length6 = 0;
27296
- var pbegin = 0;
27297
- var pend = source.length;
27298
- while (pbegin !== pend && source[pbegin] === 0) {
27299
- pbegin++;
27300
- zeroes++;
27301
- }
27302
- var size = (pend - pbegin) * iFACTOR + 1 >>> 0;
27303
- var b58 = new Uint8Array(size);
27304
- while (pbegin !== pend) {
27305
- var carry = source[pbegin];
27306
- var i2 = 0;
27307
- for (var it1 = size - 1; (carry !== 0 || i2 < length6) && it1 !== -1; it1--, i2++) {
27308
- carry += 256 * b58[it1] >>> 0;
27309
- b58[it1] = carry % BASE >>> 0;
27310
- carry = carry / BASE >>> 0;
27311
- }
27312
- if (carry !== 0) {
27313
- throw new Error("Non-zero carry");
27314
- }
27315
- length6 = i2;
27316
- pbegin++;
27317
- }
27318
- var it2 = size - length6;
27319
- while (it2 !== size && b58[it2] === 0) {
27320
- it2++;
27321
- }
27322
- var str3 = LEADER.repeat(zeroes);
27323
- for (; it2 < size; ++it2) {
27324
- str3 += ALPHABET.charAt(b58[it2]);
27325
- }
27326
- return str3;
27327
- }
27328
- function decodeUnsafe(source) {
27329
- if (typeof source !== "string") {
27330
- throw new TypeError("Expected String");
27331
- }
27332
- if (source.length === 0) {
27333
- return new Uint8Array();
27334
- }
27335
- var psz = 0;
27336
- if (source[psz] === " ") {
27337
- return;
27338
- }
27339
- var zeroes = 0;
27340
- var length6 = 0;
27341
- while (source[psz] === LEADER) {
27342
- zeroes++;
27343
- psz++;
27344
- }
27345
- var size = (source.length - psz) * FACTOR + 1 >>> 0;
27346
- var b256 = new Uint8Array(size);
27347
- while (source[psz]) {
27348
- var carry = BASE_MAP[source.charCodeAt(psz)];
27349
- if (carry === 255) {
27350
- return;
27351
- }
27352
- var i2 = 0;
27353
- for (var it3 = size - 1; (carry !== 0 || i2 < length6) && it3 !== -1; it3--, i2++) {
27354
- carry += BASE * b256[it3] >>> 0;
27355
- b256[it3] = carry % 256 >>> 0;
27356
- carry = carry / 256 >>> 0;
27357
- }
27358
- if (carry !== 0) {
27359
- throw new Error("Non-zero carry");
27360
- }
27361
- length6 = i2;
27362
- psz++;
27363
- }
27364
- if (source[psz] === " ") {
27365
- return;
27366
- }
27367
- var it4 = size - length6;
27368
- while (it4 !== size && b256[it4] === 0) {
27369
- it4++;
27370
- }
27371
- var vch = new Uint8Array(zeroes + (size - it4));
27372
- var j2 = zeroes;
27373
- while (it4 !== size) {
27374
- vch[j2++] = b256[it4++];
27375
- }
27376
- return vch;
27377
- }
27378
- function decode26(string3) {
27379
- var buffer3 = decodeUnsafe(string3);
27380
- if (buffer3) {
27381
- return buffer3;
27382
- }
27383
- throw new Error(`Non-${name7} character`);
27384
- }
27385
- return {
27386
- encode: encode20,
27387
- decodeUnsafe,
27388
- decode: decode26
27389
- };
27390
- }
27391
- var src4 = base4;
27392
- var _brrp__multiformats_scope_baseX4 = src4;
27393
- var base_x_default4 = _brrp__multiformats_scope_baseX4;
27394
-
27395
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bases/base.js
27396
- var Encoder5 = class {
27397
- name;
27398
- prefix;
27399
- baseEncode;
27400
- constructor(name7, prefix, baseEncode) {
27401
- this.name = name7;
27402
- this.prefix = prefix;
27403
- this.baseEncode = baseEncode;
27404
- }
27405
- encode(bytes) {
27406
- if (bytes instanceof Uint8Array) {
27407
- return `${this.prefix}${this.baseEncode(bytes)}`;
27408
- } else {
27409
- throw Error("Unknown type, must be binary type");
27410
- }
27411
- }
27412
- };
27413
- var Decoder4 = class {
27414
- name;
27415
- prefix;
27416
- baseDecode;
27417
- prefixCodePoint;
27418
- constructor(name7, prefix, baseDecode) {
27419
- this.name = name7;
27420
- this.prefix = prefix;
27421
- const prefixCodePoint = prefix.codePointAt(0);
27422
- if (prefixCodePoint === void 0) {
27423
- throw new Error("Invalid prefix character");
27424
- }
27425
- this.prefixCodePoint = prefixCodePoint;
27426
- this.baseDecode = baseDecode;
27427
- }
27428
- decode(text) {
27429
- if (typeof text === "string") {
27430
- if (text.codePointAt(0) !== this.prefixCodePoint) {
27431
- throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
27432
- }
27433
- return this.baseDecode(text.slice(this.prefix.length));
27434
- } else {
27435
- throw Error("Can only multibase decode strings");
27436
- }
27437
- }
27438
- or(decoder) {
27439
- return or4(this, decoder);
27440
- }
27441
- };
27442
- var ComposedDecoder4 = class {
27443
- decoders;
27444
- constructor(decoders) {
27445
- this.decoders = decoders;
27446
- }
27447
- or(decoder) {
27448
- return or4(this, decoder);
27449
- }
27450
- decode(input) {
27451
- const prefix = input[0];
27452
- const decoder = this.decoders[prefix];
27453
- if (decoder != null) {
27454
- return decoder.decode(input);
27455
- } else {
27456
- throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
27457
- }
27458
- }
27459
- };
27460
- function or4(left, right) {
27461
- return new ComposedDecoder4({
27462
- ...left.decoders ?? { [left.prefix]: left },
27463
- ...right.decoders ?? { [right.prefix]: right }
27464
- });
27465
- }
27466
- var Codec4 = class {
27467
- name;
27468
- prefix;
27469
- baseEncode;
27470
- baseDecode;
27471
- encoder;
27472
- decoder;
27473
- constructor(name7, prefix, baseEncode, baseDecode) {
27474
- this.name = name7;
27475
- this.prefix = prefix;
27476
- this.baseEncode = baseEncode;
27477
- this.baseDecode = baseDecode;
27478
- this.encoder = new Encoder5(name7, prefix, baseEncode);
27479
- this.decoder = new Decoder4(name7, prefix, baseDecode);
27480
- }
27481
- encode(input) {
27482
- return this.encoder.encode(input);
27483
- }
27484
- decode(input) {
27485
- return this.decoder.decode(input);
27486
- }
27487
- };
27488
- function from7({ name: name7, prefix, encode: encode20, decode: decode26 }) {
27489
- return new Codec4(name7, prefix, encode20, decode26);
27490
- }
27491
- function baseX4({ name: name7, prefix, alphabet: alphabet3 }) {
27492
- const { encode: encode20, decode: decode26 } = base_x_default4(alphabet3, name7);
27493
- return from7({
27494
- prefix,
27495
- name: name7,
27496
- encode: encode20,
27497
- decode: (text) => coerce4(decode26(text))
27498
- });
27499
- }
27500
- function decode20(string3, alphabetIdx, bitsPerChar, name7) {
27501
- let end = string3.length;
27502
- while (string3[end - 1] === "=") {
27503
- --end;
27504
- }
27505
- const out = new Uint8Array(end * bitsPerChar / 8 | 0);
27506
- let bits = 0;
27507
- let buffer3 = 0;
27508
- let written = 0;
27509
- for (let i = 0; i < end; ++i) {
27510
- const value = alphabetIdx[string3[i]];
27511
- if (value === void 0) {
27512
- throw new SyntaxError(`Non-${name7} character`);
27513
- }
27514
- buffer3 = buffer3 << bitsPerChar | value;
27515
- bits += bitsPerChar;
27516
- if (bits >= 8) {
27517
- bits -= 8;
27518
- out[written++] = 255 & buffer3 >> bits;
27519
- }
27520
- }
27521
- if (bits >= bitsPerChar || (255 & buffer3 << 8 - bits) !== 0) {
27522
- throw new SyntaxError("Unexpected end of data");
27523
- }
27524
- return out;
27525
- }
27526
- function encode16(data, alphabet3, bitsPerChar) {
27527
- const pad = alphabet3[alphabet3.length - 1] === "=";
27528
- const mask = (1 << bitsPerChar) - 1;
27529
- let out = "";
27530
- let bits = 0;
27531
- let buffer3 = 0;
27532
- for (let i = 0; i < data.length; ++i) {
27533
- buffer3 = buffer3 << 8 | data[i];
27534
- bits += 8;
27535
- while (bits > bitsPerChar) {
27536
- bits -= bitsPerChar;
27537
- out += alphabet3[mask & buffer3 >> bits];
27538
- }
27539
- }
27540
- if (bits !== 0) {
27541
- out += alphabet3[mask & buffer3 << bitsPerChar - bits];
27542
- }
27543
- if (pad) {
27544
- while ((out.length * bitsPerChar & 7) !== 0) {
27545
- out += "=";
27546
- }
27547
- }
27548
- return out;
27549
- }
27550
- function createAlphabetIdx2(alphabet3) {
27551
- const alphabetIdx = {};
27552
- for (let i = 0; i < alphabet3.length; ++i) {
27553
- alphabetIdx[alphabet3[i]] = i;
27554
- }
27555
- return alphabetIdx;
27556
- }
27557
- function rfc46484({ name: name7, prefix, bitsPerChar, alphabet: alphabet3 }) {
27558
- const alphabetIdx = createAlphabetIdx2(alphabet3);
27559
- return from7({
27560
- prefix,
27561
- name: name7,
27562
- encode(input) {
27563
- return encode16(input, alphabet3, bitsPerChar);
27564
- },
27565
- decode(input) {
27566
- return decode20(input, alphabetIdx, bitsPerChar, name7);
27567
- }
27568
- });
27569
- }
27570
-
27571
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bases/base32.js
27572
- var base324 = rfc46484({
27573
- prefix: "b",
27574
- name: "base32",
27575
- alphabet: "abcdefghijklmnopqrstuvwxyz234567",
27576
- bitsPerChar: 5
27577
- });
27578
- var base32upper4 = rfc46484({
27579
- prefix: "B",
27580
- name: "base32upper",
27581
- alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
27582
- bitsPerChar: 5
27583
- });
27584
- var base32pad4 = rfc46484({
27585
- prefix: "c",
27586
- name: "base32pad",
27587
- alphabet: "abcdefghijklmnopqrstuvwxyz234567=",
27588
- bitsPerChar: 5
27589
- });
27590
- var base32padupper4 = rfc46484({
27591
- prefix: "C",
27592
- name: "base32padupper",
27593
- alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",
27594
- bitsPerChar: 5
27595
- });
27596
- var base32hex4 = rfc46484({
27597
- prefix: "v",
27598
- name: "base32hex",
27599
- alphabet: "0123456789abcdefghijklmnopqrstuv",
27600
- bitsPerChar: 5
27601
- });
27602
- var base32hexupper4 = rfc46484({
27603
- prefix: "V",
27604
- name: "base32hexupper",
27605
- alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
27606
- bitsPerChar: 5
27607
- });
27608
- var base32hexpad4 = rfc46484({
27609
- prefix: "t",
27610
- name: "base32hexpad",
27611
- alphabet: "0123456789abcdefghijklmnopqrstuv=",
27612
- bitsPerChar: 5
27613
- });
27614
- var base32hexpadupper4 = rfc46484({
27615
- prefix: "T",
27616
- name: "base32hexpadupper",
27617
- alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=",
27618
- bitsPerChar: 5
27619
- });
27620
- var base32z4 = rfc46484({
27621
- prefix: "h",
27622
- name: "base32z",
27623
- alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769",
27624
- bitsPerChar: 5
27625
- });
27626
-
27627
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bases/base36.js
27628
- var base363 = baseX4({
27629
- prefix: "k",
27630
- name: "base36",
27631
- alphabet: "0123456789abcdefghijklmnopqrstuvwxyz"
27632
- });
27633
- var base36upper3 = baseX4({
27634
- prefix: "K",
27635
- name: "base36upper",
27636
- alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
27637
- });
27638
-
27639
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bases/base58.js
27640
- var base58btc4 = baseX4({
27641
- name: "base58btc",
27642
- prefix: "z",
27643
- alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
27644
- });
27645
- var base58flickr4 = baseX4({
27646
- name: "base58flickr",
27647
- prefix: "Z",
27648
- alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
27649
- });
27650
-
27651
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/vendor/varint.js
27652
- var encode_14 = encode17;
27653
- var MSB5 = 128;
27654
- var REST5 = 127;
27655
- var MSBALL4 = ~REST5;
27656
- var INT4 = Math.pow(2, 31);
27657
- function encode17(num, out, offset) {
27658
- out = out || [];
27659
- offset = offset || 0;
27660
- var oldOffset = offset;
27661
- while (num >= INT4) {
27662
- out[offset++] = num & 255 | MSB5;
27663
- num /= 128;
27664
- }
27665
- while (num & MSBALL4) {
27666
- out[offset++] = num & 255 | MSB5;
27667
- num >>>= 7;
27668
- }
27669
- out[offset] = num | 0;
27670
- encode17.bytes = offset - oldOffset + 1;
27671
- return out;
27672
- }
27673
- var decode21 = read5;
27674
- var MSB$14 = 128;
27675
- var REST$14 = 127;
27676
- function read5(buf2, offset) {
27677
- var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf2.length;
27678
- do {
27679
- if (counter >= l) {
27680
- read5.bytes = 0;
27681
- throw new RangeError("Could not decode varint");
27682
- }
27683
- b = buf2[counter++];
27684
- res += shift < 28 ? (b & REST$14) << shift : (b & REST$14) * Math.pow(2, shift);
27685
- shift += 7;
27686
- } while (b >= MSB$14);
27687
- read5.bytes = counter - offset;
27688
- return res;
27689
- }
27690
- var N15 = Math.pow(2, 7);
27691
- var N25 = Math.pow(2, 14);
27692
- var N35 = Math.pow(2, 21);
27693
- var N45 = Math.pow(2, 28);
27694
- var N55 = Math.pow(2, 35);
27695
- var N65 = Math.pow(2, 42);
27696
- var N75 = Math.pow(2, 49);
27697
- var N84 = Math.pow(2, 56);
27698
- var N94 = Math.pow(2, 63);
27699
- var length5 = function(value) {
27700
- return value < N15 ? 1 : value < N25 ? 2 : value < N35 ? 3 : value < N45 ? 4 : value < N55 ? 5 : value < N65 ? 6 : value < N75 ? 7 : value < N84 ? 8 : value < N94 ? 9 : 10;
27701
- };
27702
- var varint5 = {
27703
- encode: encode_14,
27704
- decode: decode21,
27705
- encodingLength: length5
27706
- };
27707
- var _brrp_varint4 = varint5;
27708
- var varint_default4 = _brrp_varint4;
27709
-
27710
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/varint.js
27711
- function decode22(data, offset = 0) {
27712
- const code8 = varint_default4.decode(data, offset);
27713
- return [code8, varint_default4.decode.bytes];
27714
- }
27715
- function encodeTo4(int, target, offset = 0) {
27716
- varint_default4.encode(int, target, offset);
27717
- return target;
27718
- }
27719
- function encodingLength5(int) {
27720
- return varint_default4.encodingLength(int);
27721
- }
27722
-
27723
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/hashes/digest.js
27724
- function create4(code8, digest4) {
27725
- const size = digest4.byteLength;
27726
- const sizeOffset = encodingLength5(code8);
27727
- const digestOffset = sizeOffset + encodingLength5(size);
27728
- const bytes = new Uint8Array(digestOffset + size);
27729
- encodeTo4(code8, bytes, 0);
27730
- encodeTo4(size, bytes, sizeOffset);
27731
- bytes.set(digest4, digestOffset);
27732
- return new Digest4(code8, size, digest4, bytes);
27733
- }
27734
- function decode23(multihash) {
27735
- const bytes = coerce4(multihash);
27736
- const [code8, sizeOffset] = decode22(bytes);
27737
- const [size, digestOffset] = decode22(bytes.subarray(sizeOffset));
27738
- const digest4 = bytes.subarray(sizeOffset + digestOffset);
27739
- if (digest4.byteLength !== size) {
27740
- throw new Error("Incorrect length");
27741
- }
27742
- return new Digest4(code8, size, digest4, bytes);
27743
- }
27744
- function equals9(a, b) {
27745
- if (a === b) {
27746
- return true;
27747
- } else {
27748
- const data = b;
27749
- return a.code === data.code && a.size === data.size && data.bytes instanceof Uint8Array && equals8(a.bytes, data.bytes);
27750
- }
27751
- }
27752
- var Digest4 = class {
27753
- code;
27754
- size;
27755
- digest;
27756
- bytes;
27757
- /**
27758
- * Creates a multihash digest.
27759
- */
27760
- constructor(code8, size, digest4, bytes) {
27761
- this.code = code8;
27762
- this.size = size;
27763
- this.digest = digest4;
27764
- this.bytes = bytes;
27765
- }
27766
- };
27767
-
27768
- // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/cid.js
27769
- function format4(link, base5) {
27770
- const { bytes, version } = link;
27771
- switch (version) {
27772
- case 0:
27773
- return toStringV04(bytes, baseCache4(link), base5 ?? base58btc4.encoder);
27774
- default:
27775
- return toStringV14(bytes, baseCache4(link), base5 ?? base324.encoder);
27776
- }
27777
- }
27778
- var cache4 = /* @__PURE__ */ new WeakMap();
27779
- function baseCache4(cid) {
27780
- const baseCache5 = cache4.get(cid);
27781
- if (baseCache5 == null) {
27782
- const baseCache6 = /* @__PURE__ */ new Map();
27783
- cache4.set(cid, baseCache6);
27784
- return baseCache6;
27785
- }
27786
- return baseCache5;
27787
- }
27788
- var CID4 = class {
27789
- code;
27790
- version;
27791
- multihash;
27792
- bytes;
27793
- "/";
27794
- /**
27795
- * @param version - Version of the CID
27796
- * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
27797
- * @param multihash - (Multi)hash of the of the content.
27798
- */
27799
- constructor(version, code8, multihash, bytes) {
27800
- this.code = code8;
27801
- this.version = version;
27802
- this.multihash = multihash;
27803
- this.bytes = bytes;
27804
- this["/"] = bytes;
27805
- }
27806
- /**
27807
- * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes`
27808
- * please either use `CID.asCID(cid)` or switch to new signalling mechanism
27809
- *
27810
- * @deprecated
27811
- */
27812
- get asCID() {
27813
- return this;
27814
- }
27815
- // ArrayBufferView
27816
- get byteOffset() {
27817
- return this.bytes.byteOffset;
27818
- }
27819
- // ArrayBufferView
27820
- get byteLength() {
27821
- return this.bytes.byteLength;
27822
- }
27823
- toV0() {
27824
- switch (this.version) {
27825
- case 0: {
27826
- return this;
27827
- }
27828
- case 1: {
27829
- const { code: code8, multihash } = this;
27830
- if (code8 !== DAG_PB_CODE4) {
27831
- throw new Error("Cannot convert a non dag-pb CID to CIDv0");
27832
- }
27833
- if (multihash.code !== SHA_256_CODE4) {
27834
- throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");
27835
- }
27836
- return CID4.createV0(multihash);
27837
- }
27838
- default: {
27839
- throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`);
27840
- }
27841
- }
27842
- }
27843
- toV1() {
27844
- switch (this.version) {
27845
- case 0: {
27846
- const { code: code8, digest: digest4 } = this.multihash;
27847
- const multihash = create4(code8, digest4);
27848
- return CID4.createV1(this.code, multihash);
27849
- }
27850
- case 1: {
27851
- return this;
27852
- }
27853
- default: {
27854
- throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`);
27855
- }
27856
- }
27857
- }
27858
- equals(other) {
27859
- return CID4.equals(this, other);
27860
- }
27861
- static equals(self, other) {
27862
- const unknown = other;
27863
- return unknown != null && self.code === unknown.code && self.version === unknown.version && equals9(self.multihash, unknown.multihash);
27864
- }
27865
- toString(base5) {
27866
- return format4(this, base5);
27867
- }
27868
- toJSON() {
27869
- return { "/": format4(this) };
27870
- }
27871
- link() {
27872
- return this;
27873
- }
27874
- [Symbol.toStringTag] = "CID";
27875
- // Legacy
27876
- [Symbol.for("nodejs.util.inspect.custom")]() {
27877
- return `CID(${this.toString()})`;
27878
- }
27879
- /**
27880
- * Takes any input `value` and returns a `CID` instance if it was
27881
- * a `CID` otherwise returns `null`. If `value` is instanceof `CID`
27882
- * it will return value back. If `value` is not instance of this CID
27883
- * class, but is compatible CID it will return new instance of this
27884
- * `CID` class. Otherwise returns null.
27885
- *
27886
- * This allows two different incompatible versions of CID library to
27887
- * co-exist and interop as long as binary interface is compatible.
27888
- */
27889
- static asCID(input) {
27890
- if (input == null) {
27891
- return null;
27892
- }
27893
- const value = input;
27894
- if (value instanceof CID4) {
27895
- return value;
27896
- } else if (value["/"] != null && value["/"] === value.bytes || value.asCID === value) {
27897
- const { version, code: code8, multihash, bytes } = value;
27898
- return new CID4(version, code8, multihash, bytes ?? encodeCID4(version, code8, multihash.bytes));
27899
- } else if (value[cidSymbol4] === true) {
27900
- const { version, multihash, code: code8 } = value;
27901
- const digest4 = decode23(multihash);
27902
- return CID4.create(version, code8, digest4);
27903
- } else {
27904
- return null;
27905
- }
27906
- }
27907
- /**
27908
- * @param version - Version of the CID
27909
- * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
27910
- * @param digest - (Multi)hash of the of the content.
27911
- */
27912
- static create(version, code8, digest4) {
27913
- if (typeof code8 !== "number") {
27914
- throw new Error("String codecs are no longer supported");
27915
- }
27916
- if (!(digest4.bytes instanceof Uint8Array)) {
27917
- throw new Error("Invalid digest");
27918
- }
27919
- switch (version) {
27920
- case 0: {
27921
- if (code8 !== DAG_PB_CODE4) {
27922
- throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE4}) block encoding`);
27923
- } else {
27924
- return new CID4(version, code8, digest4, digest4.bytes);
27925
- }
27926
- }
27927
- case 1: {
27928
- const bytes = encodeCID4(version, code8, digest4.bytes);
27929
- return new CID4(version, code8, digest4, bytes);
27930
- }
27931
- default: {
27932
- throw new Error("Invalid version");
27933
- }
27934
- }
27935
- }
27936
- /**
27937
- * Simplified version of `create` for CIDv0.
27938
- */
27939
- static createV0(digest4) {
27940
- return CID4.create(0, DAG_PB_CODE4, digest4);
27941
- }
27942
- /**
27943
- * Simplified version of `create` for CIDv1.
27944
- *
27945
- * @param code - Content encoding format code.
27946
- * @param digest - Multihash of the content.
27947
- */
27948
- static createV1(code8, digest4) {
27949
- return CID4.create(1, code8, digest4);
27950
- }
27951
- /**
27952
- * Decoded a CID from its binary representation. The byte array must contain
27953
- * only the CID with no additional bytes.
27954
- *
27955
- * An error will be thrown if the bytes provided do not contain a valid
27956
- * binary representation of a CID.
27957
- */
27958
- static decode(bytes) {
27959
- const [cid, remainder] = CID4.decodeFirst(bytes);
27960
- if (remainder.length !== 0) {
27961
- throw new Error("Incorrect length");
27962
- }
27963
- return cid;
27964
- }
27965
- /**
27966
- * Decoded a CID from its binary representation at the beginning of a byte
27967
- * array.
27968
- *
27969
- * Returns an array with the first element containing the CID and the second
27970
- * element containing the remainder of the original byte array. The remainder
27971
- * will be a zero-length byte array if the provided bytes only contained a
27972
- * binary CID representation.
27973
- */
27974
- static decodeFirst(bytes) {
27975
- const specs = CID4.inspectBytes(bytes);
27976
- const prefixSize = specs.size - specs.multihashSize;
27977
- const multihashBytes = coerce4(bytes.subarray(prefixSize, prefixSize + specs.multihashSize));
27978
- if (multihashBytes.byteLength !== specs.multihashSize) {
27979
- throw new Error("Incorrect length");
27980
- }
27981
- const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize);
27982
- const digest4 = new Digest4(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes);
27983
- const cid = specs.version === 0 ? CID4.createV0(digest4) : CID4.createV1(specs.codec, digest4);
27984
- return [cid, bytes.subarray(specs.size)];
27985
- }
27986
- /**
27987
- * Inspect the initial bytes of a CID to determine its properties.
27988
- *
27989
- * Involves decoding up to 4 varints. Typically this will require only 4 to 6
27990
- * bytes but for larger multicodec code values and larger multihash digest
27991
- * lengths these varints can be quite large. It is recommended that at least
27992
- * 10 bytes be made available in the `initialBytes` argument for a complete
27993
- * inspection.
27994
- */
27995
- static inspectBytes(initialBytes) {
27996
- let offset = 0;
27997
- const next = () => {
27998
- const [i, length6] = decode22(initialBytes.subarray(offset));
27999
- offset += length6;
28000
- return i;
28001
- };
28002
- let version = next();
28003
- let codec = DAG_PB_CODE4;
28004
- if (version === 18) {
28005
- version = 0;
28006
- offset = 0;
28007
- } else {
28008
- codec = next();
28009
- }
28010
- if (version !== 0 && version !== 1) {
28011
- throw new RangeError(`Invalid CID version ${version}`);
28012
- }
28013
- const prefixSize = offset;
28014
- const multihashCode = next();
28015
- const digestSize = next();
28016
- const size = offset + digestSize;
28017
- const multihashSize = size - prefixSize;
28018
- return { version, codec, multihashCode, digestSize, multihashSize, size };
28019
- }
28020
- /**
28021
- * Takes cid in a string representation and creates an instance. If `base`
28022
- * decoder is not provided will use a default from the configuration. It will
28023
- * throw an error if encoding of the CID is not compatible with supplied (or
28024
- * a default decoder).
28025
- */
28026
- static parse(source, base5) {
28027
- const [prefix, bytes] = parseCIDtoBytes4(source, base5);
28028
- const cid = CID4.decode(bytes);
28029
- if (cid.version === 0 && source[0] !== "Q") {
28030
- throw Error("Version 0 CID string must not include multibase prefix");
28031
- }
28032
- baseCache4(cid).set(prefix, source);
28033
- return cid;
28034
- }
28035
- };
28036
- function parseCIDtoBytes4(source, base5) {
28037
- switch (source[0]) {
28038
- case "Q": {
28039
- const decoder = base5 ?? base58btc4;
28040
- return [
28041
- base58btc4.prefix,
28042
- decoder.decode(`${base58btc4.prefix}${source}`)
28043
- ];
28044
- }
28045
- case base58btc4.prefix: {
28046
- const decoder = base5 ?? base58btc4;
28047
- return [base58btc4.prefix, decoder.decode(source)];
28048
- }
28049
- case base324.prefix: {
28050
- const decoder = base5 ?? base324;
28051
- return [base324.prefix, decoder.decode(source)];
28052
- }
28053
- case base363.prefix: {
28054
- const decoder = base5 ?? base363;
28055
- return [base363.prefix, decoder.decode(source)];
28056
- }
28057
- default: {
28058
- if (base5 == null) {
28059
- throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");
28060
- }
28061
- return [source[0], base5.decode(source)];
28062
- }
28063
- }
28064
- }
28065
- function toStringV04(bytes, cache5, base5) {
28066
- const { prefix } = base5;
28067
- if (prefix !== base58btc4.prefix) {
28068
- throw Error(`Cannot string encode V0 in ${base5.name} encoding`);
28069
- }
28070
- const cid = cache5.get(prefix);
28071
- if (cid == null) {
28072
- const cid2 = base5.encode(bytes).slice(1);
28073
- cache5.set(prefix, cid2);
28074
- return cid2;
28075
- } else {
28076
- return cid;
28077
- }
28078
- }
28079
- function toStringV14(bytes, cache5, base5) {
28080
- const { prefix } = base5;
28081
- const cid = cache5.get(prefix);
28082
- if (cid == null) {
28083
- const cid2 = base5.encode(bytes);
28084
- cache5.set(prefix, cid2);
28085
- return cid2;
28086
- } else {
28087
- return cid;
28088
- }
28089
- }
28090
- var DAG_PB_CODE4 = 112;
28091
- var SHA_256_CODE4 = 18;
28092
- function encodeCID4(version, code8, multihash) {
28093
- const codeOffset = encodingLength5(version);
28094
- const hashOffset = codeOffset + encodingLength5(code8);
28095
- const bytes = new Uint8Array(hashOffset + multihash.byteLength);
28096
- encodeTo4(version, bytes, 0);
28097
- encodeTo4(code8, bytes, codeOffset);
28098
- bytes.set(multihash, hashOffset);
28099
- return bytes;
28100
- }
28101
- var cidSymbol4 = Symbol.for("@ipld/js-cid/CID");
28102
-
28103
27230
  // ../../node_modules/.bun/@ipld+dag-cbor@9.2.5/node_modules/@ipld/dag-cbor/src/index.js
28104
27231
  var CID_CBOR_TAG2 = 42;
28105
27232
  function toByteView2(buf2) {
@@ -28112,7 +27239,7 @@ function cidEncoder2(obj) {
28112
27239
  if (obj.asCID !== obj && obj["/"] !== obj.bytes) {
28113
27240
  return null;
28114
27241
  }
28115
- const cid = CID4.asCID(obj);
27242
+ const cid = CID3.asCID(obj);
28116
27243
  if (!cid) {
28117
27244
  return null;
28118
27245
  }
@@ -28162,7 +27289,7 @@ function cidDecoder2(bytes) {
28162
27289
  if (bytes[0] !== 0) {
28163
27290
  throw new Error("Invalid CID for CBOR tag 42; expected leading 0x00");
28164
27291
  }
28165
- return CID4.decode(bytes.subarray(1));
27292
+ return CID3.decode(bytes.subarray(1));
28166
27293
  }
28167
27294
  var _decodeOptions = {
28168
27295
  allowIndefinite: false,
@@ -28184,7 +27311,7 @@ var decodeOptions2 = {
28184
27311
  tags: _decodeOptions.tags.slice()
28185
27312
  };
28186
27313
  var code6 = 113;
28187
- var decode24 = (data) => decode19(toByteView2(data), _decodeOptions);
27314
+ var decode20 = (data) => decode19(toByteView2(data), _decodeOptions);
28188
27315
 
28189
27316
  // ../../node_modules/.bun/ipfs-unixfs-exporter@13.1.5/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/index.js
28190
27317
  var import_err_code11 = __toESM(require_err_code(), 1);
@@ -28192,15 +27319,15 @@ var import_err_code11 = __toESM(require_err_code(), 1);
28192
27319
  // ../../node_modules/.bun/multiformats@11.0.2/node_modules/multiformats/src/hashes/identity.js
28193
27320
  var code7 = 0;
28194
27321
  var name6 = "identity";
28195
- var encode18 = coerce2;
28196
- var digest3 = (input) => create2(code7, encode18(input));
28197
- var identity5 = { code: code7, name: name6, encode: encode18, digest: digest3 };
27322
+ var encode16 = coerce2;
27323
+ var digest3 = (input) => create2(code7, encode16(input));
27324
+ var identity5 = { code: code7, name: name6, encode: encode16, digest: digest3 };
28198
27325
 
28199
27326
  // ../../node_modules/.bun/ipfs-unixfs-exporter@13.1.5/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.js
28200
27327
  var import_err_code5 = __toESM(require_err_code(), 1);
28201
27328
  var resolve = async (cid, name7, path, toResolve, resolve5, depth, blockstore, options) => {
28202
27329
  const block = await blockstore.get(cid, options);
28203
- const object = decode24(block);
27330
+ const object = decode20(block);
28204
27331
  let subObject = object;
28205
27332
  let subPath = path;
28206
27333
  while (toResolve.length > 0) {
@@ -28275,10 +27402,10 @@ var extract_data_from_block_default = extractDataFromBlock;
28275
27402
 
28276
27403
  // ../../node_modules/.bun/ipfs-unixfs-exporter@13.1.5/node_modules/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.js
28277
27404
  var import_err_code6 = __toESM(require_err_code(), 1);
28278
- var validateOffsetAndLength = (size, offset = 0, length6 = size) => {
27405
+ var validateOffsetAndLength = (size, offset = 0, length5 = size) => {
28279
27406
  const fileSize = BigInt(size);
28280
27407
  const start = BigInt(offset ?? 0);
28281
- let end = BigInt(length6);
27408
+ let end = BigInt(length5);
28282
27409
  if (end !== fileSize) {
28283
27410
  end = start + end;
28284
27411
  }
@@ -29214,8 +28341,8 @@ var duplexPipelineFn = (duplex) => {
29214
28341
  var directoryContent = (cid, node, unixfs, path, resolve5, depth, blockstore) => {
29215
28342
  async function* yieldDirectoryContent(options = {}) {
29216
28343
  const offset = options.offset ?? 0;
29217
- const length6 = options.length ?? node.Links.length;
29218
- const links2 = node.Links.slice(offset, length6);
28344
+ const length5 = options.length ?? node.Links.length;
28345
+ const links2 = node.Links.slice(offset, length5);
29219
28346
  options.onProgress?.(new CustomProgressEvent("unixfs:exporter:walk:directory", {
29220
28347
  cid
29221
28348
  }));
@@ -29800,7 +28927,7 @@ var fileContent = (cid, node, unixfs, path, resolve5, depth, blockstore) => {
29800
28927
  if (end === 0n) {
29801
28928
  return;
29802
28929
  }
29803
- let read6 = 0n;
28930
+ let read5 = 0n;
29804
28931
  const wanted = end - start;
29805
28932
  const queue = pushable();
29806
28933
  options.onProgress?.(new CustomProgressEvent("unixfs:exporter:walk:file", {
@@ -29813,22 +28940,22 @@ var fileContent = (cid, node, unixfs, path, resolve5, depth, blockstore) => {
29813
28940
  if (buf2 == null) {
29814
28941
  continue;
29815
28942
  }
29816
- read6 += BigInt(buf2.byteLength);
29817
- if (read6 > wanted) {
28943
+ read5 += BigInt(buf2.byteLength);
28944
+ if (read5 > wanted) {
29818
28945
  queue.end();
29819
28946
  throw (0, import_err_code9.default)(new Error("Read too many bytes - the file size reported by the UnixFS data in the root node may be incorrect"), "ERR_OVER_READ");
29820
28947
  }
29821
- if (read6 === wanted) {
28948
+ if (read5 === wanted) {
29822
28949
  queue.end();
29823
28950
  }
29824
28951
  options.onProgress?.(new CustomProgressEvent("unixfs:exporter:progress:unixfs:file", {
29825
- bytesRead: read6,
28952
+ bytesRead: read5,
29826
28953
  totalBytes: wanted,
29827
28954
  fileSize
29828
28955
  }));
29829
28956
  yield buf2;
29830
28957
  }
29831
- if (read6 < wanted) {
28958
+ if (read5 < wanted) {
29832
28959
  throw (0, import_err_code9.default)(new Error("Traversed entire DAG but did not read enough bytes"), "ERR_UNDER_READ");
29833
28960
  }
29834
28961
  }
@@ -30418,18 +29545,18 @@ function* linksWithin(path, value) {
30418
29545
  }
30419
29546
  }
30420
29547
  }
30421
- function* links(source, base5) {
29548
+ function* links(source, base4) {
30422
29549
  if (source == null || source instanceof Uint8Array) {
30423
29550
  return;
30424
29551
  }
30425
29552
  const cid = CID2.asCID(source);
30426
29553
  if (cid) {
30427
- yield [base5.join("/"), cid];
29554
+ yield [base4.join("/"), cid];
30428
29555
  }
30429
29556
  for (const [key, value] of Object.entries(source)) {
30430
29557
  const path = (
30431
29558
  /** @type {[string|number, string]} */
30432
- [...base5, key]
29559
+ [...base4, key]
30433
29560
  );
30434
29561
  yield* linksWithin(path, value);
30435
29562
  }
@@ -30447,14 +29574,14 @@ function* treeWithin(path, value) {
30447
29574
  yield* tree(value, path);
30448
29575
  }
30449
29576
  }
30450
- function* tree(source, base5) {
29577
+ function* tree(source, base4) {
30451
29578
  if (source == null || typeof source !== "object") {
30452
29579
  return;
30453
29580
  }
30454
29581
  for (const [key, value] of Object.entries(source)) {
30455
29582
  const path = (
30456
29583
  /** @type {[string|number, string]} */
30457
- [...base5, key]
29584
+ [...base4, key]
30458
29585
  );
30459
29586
  yield path.join("/");
30460
29587
  if (value != null && !(value instanceof Uint8Array) && typeof value === "object" && !CID2.asCID(value)) {
@@ -30516,7 +29643,7 @@ var Block = class {
30516
29643
  return get(this.value, path.split("/").filter(Boolean));
30517
29644
  }
30518
29645
  };
30519
- async function encode19({ value, codec, hasher }) {
29646
+ async function encode17({ value, codec, hasher }) {
30520
29647
  if (typeof value === "undefined")
30521
29648
  throw new Error('Missing required argument "value"');
30522
29649
  if (!codec || !hasher)
@@ -30530,7 +29657,7 @@ async function encode19({ value, codec, hasher }) {
30530
29657
  );
30531
29658
  return new Block({ value, bytes, cid });
30532
29659
  }
30533
- async function decode25({ bytes, codec, hasher }) {
29660
+ async function decode21({ bytes, codec, hasher }) {
30534
29661
  if (!bytes)
30535
29662
  throw new Error('Missing required argument "bytes"');
30536
29663
  if (!codec || !hasher)
@@ -30998,7 +30125,7 @@ var MessageStoreLevel = class {
30998
30125
  if (!bytes) {
30999
30126
  return void 0;
31000
30127
  }
31001
- const decodedBlock = yield executeUnlessAborted(decode25({ bytes, codec: src_exports, hasher: sha2562 }), options === null || options === void 0 ? void 0 : options.signal);
30128
+ const decodedBlock = yield executeUnlessAborted(decode21({ bytes, codec: src_exports, hasher: sha2562 }), options === null || options === void 0 ? void 0 : options.signal);
31002
30129
  const message2 = decodedBlock.value;
31003
30130
  return message2;
31004
30131
  });
@@ -31127,7 +30254,7 @@ var MessageStoreLevel = class {
31127
30254
  var _a2;
31128
30255
  (_a2 = options === null || options === void 0 ? void 0 : options.signal) === null || _a2 === void 0 ? void 0 : _a2.throwIfAborted();
31129
30256
  const partition = yield executeUnlessAborted(this.blockstore.partition(tenant), options === null || options === void 0 ? void 0 : options.signal);
31130
- const encodedMessageBlock = yield executeUnlessAborted(encode19({ value: message2, codec: src_exports, hasher: sha2562 }), options === null || options === void 0 ? void 0 : options.signal);
30257
+ const encodedMessageBlock = yield executeUnlessAborted(encode17({ value: message2, codec: src_exports, hasher: sha2562 }), options === null || options === void 0 ? void 0 : options.signal);
31131
30258
  const messageCid = Cid.parseCid(yield Message.getCid(message2));
31132
30259
  yield partition.put(messageCid, encodedMessageBlock.bytes, options);
31133
30260
  const messageCidString = messageCid.toString();