@libp2p/bootstrap 8.0.0-b1024c6c → 8.0.0-c999d6a7
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/index.min.js +1 -1
- package/package.json +6 -9
package/dist/index.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Libp2PBootstrap = factory()}(typeof self !== 'undefined' ? self : this, function () {
|
|
2
|
-
"use strict";var Libp2PBootstrap=(()=>{var ts=Object.create;var De=Object.defineProperty;var rs=Object.getOwnPropertyDescriptor;var ns=Object.getOwnPropertyNames;var os=Object.getPrototypeOf,ss=Object.prototype.hasOwnProperty;var is=(r,e,t)=>e in r?De(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var re=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),y=(r,e)=>{for(var t in e)De(r,t,{get:e[t],enumerable:!0})},en=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ns(e))!ss.call(r,o)&&o!==t&&De(r,o,{get:()=>e[o],enumerable:!(n=rs(e,o))||n.enumerable});return r};var Qe=(r,e,t)=>(t=r!=null?ts(os(r)):{},en(e||!r||!r.__esModule?De(t,"default",{value:r,enumerable:!0}):t,r)),as=r=>en(De({},"__esModule",{value:!0}),r);var He=(r,e,t)=>(is(r,typeof e!="symbol"?e+"":e,t),t);var nn=re((Gd,rn)=>{var de=1e3,pe=de*60,fe=pe*60,ne=fe*24,ds=ne*7,ps=ne*365.25;rn.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return fs(r);if(t==="number"&&isFinite(r))return e.long?hs(r):us(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function fs(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*ps;case"weeks":case"week":case"w":return t*ds;case"days":case"day":case"d":return t*ne;case"hours":case"hour":case"hrs":case"hr":case"h":return t*fe;case"minutes":case"minute":case"mins":case"min":case"m":return t*pe;case"seconds":case"second":case"secs":case"sec":case"s":return t*de;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function us(r){var e=Math.abs(r);return e>=ne?Math.round(r/ne)+"d":e>=fe?Math.round(r/fe)+"h":e>=pe?Math.round(r/pe)+"m":e>=de?Math.round(r/de)+"s":r+"ms"}function hs(r){var e=Math.abs(r);return e>=ne?Ze(r,e,ne,"day"):e>=fe?Ze(r,e,fe,"hour"):e>=pe?Ze(r,e,pe,"minute"):e>=de?Ze(r,e,de,"second"):r+" ms"}function Ze(r,e,t,n){var o=e>=t*1.5;return Math.round(r/t)+" "+n+(o?"s":"")}});var sn=re((_d,on)=>{function ls(r){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=o,t.enabled=i,t.humanize=nn(),t.destroy=T,Object.keys(r).forEach(d=>{t[d]=r[d]}),t.names=[],t.skips=[],t.formatters={};function e(d){let f=0;for(let w=0;w<d.length;w++)f=(f<<5)-f+d.charCodeAt(w),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(d){let f,w=null,z,c;function u(...v){if(!u.enabled)return;let m=u,g=Number(new Date),C=g-(f||g);m.diff=C,m.prev=f,m.curr=g,f=g,v[0]=t.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let b=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(E,x)=>{if(E==="%%")return"%";b++;let A=t.formatters[x];if(typeof A=="function"){let O=v[b];E=A.call(m,O),v.splice(b,1),b--}return E}),t.formatArgs.call(m,v),(m.log||t.log).apply(m,v)}return u.namespace=d,u.useColors=t.useColors(),u.color=t.selectColor(d),u.extend=n,u.destroy=t.destroy,Object.defineProperty(u,"enabled",{enumerable:!0,configurable:!1,get:()=>w!==null?w:(z!==t.namespaces&&(z=t.namespaces,c=t.enabled(d)),c),set:v=>{w=v}}),typeof t.init=="function"&&t.init(u),u}function n(d,f){let w=t(this.namespace+(typeof f>"u"?":":f)+d);return w.log=this.log,w}function o(d){t.save(d),t.namespaces=d,t.names=[],t.skips=[];let f,w=(typeof d=="string"?d:"").split(/[\s,]+/),z=w.length;for(f=0;f<z;f++)w[f]&&(d=w[f].replace(/\*/g,".*?"),d[0]==="-"?t.skips.push(new RegExp("^"+d.slice(1)+"$")):t.names.push(new RegExp("^"+d+"$")))}function s(){let d=[...t.names.map(a),...t.skips.map(a).map(f=>"-"+f)].join(",");return t.enable(""),d}function i(d){if(d[d.length-1]==="*")return!0;let f,w;for(f=0,w=t.skips.length;f<w;f++)if(t.skips[f].test(d))return!1;for(f=0,w=t.names.length;f<w;f++)if(t.names[f].test(d))return!0;return!1}function a(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function T(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}on.exports=ls});var an=re((V,et)=>{V.formatArgs=bs;V.save=ws;V.load=gs;V.useColors=ms;V.storage=xs();V.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();V.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ms(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function bs(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+et.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,n=0;r[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(t++,o==="%c"&&(n=t))}),r.splice(n,0,e)}V.log=console.debug||console.log||(()=>{});function ws(r){try{r?V.storage.setItem("debug",r):V.storage.removeItem("debug")}catch{}}function gs(){let r;try{r=V.storage.getItem("debug")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}function xs(){try{return localStorage}catch{}}et.exports=sn()(V);var{formatters:ys}=et.exports;ys.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var mo=re((Zf,lo)=>{lo.exports=Sr;var ho=128,yc=127,vc=~yc,Cc=Math.pow(2,31);function Sr(r,e,t){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw Sr.bytes=0,new RangeError("Could not encode varint");e=e||[],t=t||0;for(var n=t;r>=Cc;)e[t++]=r&255|ho,r/=128;for(;r&vc;)e[t++]=r&255|ho,r>>>=7;return e[t]=r|0,Sr.bytes=t-n+1,e}});var go=re((eu,wo)=>{wo.exports=Ar;var Sc=128,bo=127;function Ar(r,n){var t=0,n=n||0,o=0,s=n,i,a=r.length;do{if(s>=a||o>49)throw Ar.bytes=0,new RangeError("Could not decode varint");i=r[s++],t+=o<28?(i&bo)<<o:(i&bo)*Math.pow(2,o),o+=7}while(i>=Sc);return Ar.bytes=s-n,t}});var yo=re((tu,xo)=>{var Ac=Math.pow(2,7),Ec=Math.pow(2,14),Tc=Math.pow(2,21),Ic=Math.pow(2,28),Uc=Math.pow(2,35),Fc=Math.pow(2,42),Pc=Math.pow(2,49),Nc=Math.pow(2,56),Dc=Math.pow(2,63);xo.exports=function(r){return r<Ac?1:r<Ec?2:r<Tc?3:r<Ic?4:r<Uc?5:r<Fc?6:r<Pc?7:r<Nc?8:r<Dc?9:10}});var pt=re((ru,vo)=>{vo.exports={encode:mo(),decode:go(),encodingLength:yo()}});var $d={};y($d,{bootstrap:()=>Vd});var Ye=class extends EventTarget{#e=new Map;listenerCount(e){let t=this.#e.get(e);return t==null?0:t.length}addEventListener(e,t,n){super.addEventListener(e,t,n);let o=this.#e.get(e);o==null&&(o=[],this.#e.set(e,o)),o.push({callback:t,once:(n!==!0&&n!==!1&&n?.once)??!1})}removeEventListener(e,t,n){super.removeEventListener(e.toString(),t??null,n);let o=this.#e.get(e);o!=null&&(o=o.filter(({callback:s})=>s!==t),this.#e.set(e,o))}dispatchEvent(e){let t=super.dispatchEvent(e),n=this.#e.get(e.type);return n==null||(n=n.filter(({once:o})=>!o),this.#e.set(e.type,n)),t}safeDispatchEvent(e,t){return this.dispatchEvent(new cs(e,t))}},St=class extends Event{detail;constructor(e,t){super(e,t),this.detail=t?.detail}},cs=globalThis.CustomEvent??St;var tn=Symbol.for("@libp2p/peer-discovery");var $=Qe(an(),1);var Ut={};y(Ut,{base32:()=>H,base32hex:()=>Fs,base32hexpad:()=>Ns,base32hexpadupper:()=>Ds,base32hexupper:()=>Ps,base32pad:()=>Is,base32padupper:()=>Us,base32upper:()=>Ts,base32z:()=>zs});function vs(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var o=0;o<r.length;o++){var s=r.charAt(o),i=s.charCodeAt(0);if(t[i]!==255)throw new TypeError(s+" is ambiguous");t[i]=o}var a=r.length,l=r.charAt(0),T=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var u=0,v=0,m=0,g=c.length;m!==g&&c[m]===0;)m++,u++;for(var C=(g-m)*d+1>>>0,b=new Uint8Array(C);m!==g;){for(var S=c[m],E=0,x=C-1;(S!==0||E<v)&&x!==-1;x--,E++)S+=256*b[x]>>>0,b[x]=S%a>>>0,S=S/a>>>0;if(S!==0)throw new Error("Non-zero carry");v=E,m++}for(var A=C-v;A!==C&&b[A]===0;)A++;for(var O=l.repeat(u);A<C;++A)O+=r.charAt(b[A]);return O}function w(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var u=0;if(c[u]!==" "){for(var v=0,m=0;c[u]===l;)v++,u++;for(var g=(c.length-u)*T+1>>>0,C=new Uint8Array(g);c[u];){var b=t[c.charCodeAt(u)];if(b===255)return;for(var S=0,E=g-1;(b!==0||S<m)&&E!==-1;E--,S++)b+=a*C[E]>>>0,C[E]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");m=S,u++}if(c[u]!==" "){for(var x=g-m;x!==g&&C[x]===0;)x++;for(var A=new Uint8Array(v+(g-x)),O=v;x!==g;)A[O++]=C[x++];return A}}}function z(c){var u=w(c);if(u)return u;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:w,decode:z}}var Cs=vs,Ss=Cs,cn=Ss;var Xd=new Uint8Array(0);var dn=(r,e)=>{if(r===e)return!0;if(r.byteLength!==e.byteLength)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0},J=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};var pn=r=>new TextEncoder().encode(r),fn=r=>new TextDecoder().decode(r);var At=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Et=class{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return hn(this,e)}},Tt=class{constructor(e){this.decoders=e}or(e){return hn(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},hn=(r,e)=>new Tt({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}}),It=class{constructor(e,t,n,o){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=o,this.encoder=new At(e,t,n),this.decoder=new Et(e,t,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},ue=({name:r,prefix:e,encode:t,decode:n})=>new It(r,e,t,n),Q=({prefix:r,name:e,alphabet:t})=>{let{encode:n,decode:o}=cn(t,e);return ue({prefix:r,name:e,encode:n,decode:s=>J(o(s))})},As=(r,e,t,n)=>{let o={};for(let d=0;d<e.length;++d)o[e[d]]=d;let s=r.length;for(;r[s-1]==="=";)--s;let i=new Uint8Array(s*t/8|0),a=0,l=0,T=0;for(let d=0;d<s;++d){let f=o[r[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);l=l<<t|f,a+=t,a>=8&&(a-=8,i[T++]=255&l>>a)}if(a>=t||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return i},Es=(r,e,t)=>{let n=e[e.length-1]==="=",o=(1<<t)-1,s="",i=0,a=0;for(let l=0;l<r.length;++l)for(a=a<<8|r[l],i+=8;i>t;)i-=t,s+=e[o&a>>i];if(i&&(s+=e[o&a<<t-i]),n)for(;s.length*t&7;)s+="=";return s},P=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>ue({prefix:e,name:r,encode(o){return Es(o,n,t)},decode(o){return As(o,n,t,r)}});var H=P({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ts=P({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Is=P({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Us=P({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Fs=P({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ps=P({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Ns=P({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ds=P({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),zs=P({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Ft={};y(Ft,{base58btc:()=>k,base58flickr:()=>Ms});var k=Q({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ms=Q({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Nt={};y(Nt,{base64:()=>Pt,base64pad:()=>Bs,base64url:()=>Os,base64urlpad:()=>ks});var Pt=P({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Bs=P({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Os=P({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ks=P({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});$.default.formatters.b=r=>r==null?"undefined":k.baseEncode(r);$.default.formatters.t=r=>r==null?"undefined":H.baseEncode(r);$.default.formatters.m=r=>r==null?"undefined":Pt.baseEncode(r);$.default.formatters.p=r=>r==null?"undefined":r.toString();$.default.formatters.c=r=>r==null?"undefined":r.toString();$.default.formatters.k=r=>r==null?"undefined":r.toString();$.default.formatters.a=r=>r==null?"undefined":r.toString();function Ls(r){let e=()=>{};return e.enabled=!1,e.color="",e.diff=0,e.log=()=>{},e.namespace=r,e.destroy=()=>!0,e.extend=()=>e,e}function ln(r){let e=Ls(`${r}:trace`);return $.default.enabled(`${r}:trace`)&&$.default.names.map(t=>t.toString()).find(t=>t.includes(":trace"))!=null&&(e=(0,$.default)(`${r}:trace`)),Object.assign((0,$.default)(r),{error:(0,$.default)(`${r}:error`),trace:e})}var mn=Symbol.for("@libp2p/peer-id");var Dt={};y(Dt,{identity:()=>Rs});var Rs=ue({prefix:"\0",name:"identity",encode:r=>fn(r),decode:r=>pn(r)});var zt={};y(zt,{base2:()=>Vs});var Vs=P({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Mt={};y(Mt,{base8:()=>$s});var $s=P({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Bt={};y(Bt,{base10:()=>js});var js=Q({prefix:"9",name:"base10",alphabet:"0123456789"});var Ot={};y(Ot,{base16:()=>qs,base16upper:()=>Js});var qs=P({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Js=P({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var kt={};y(kt,{base36:()=>Gs,base36upper:()=>_s});var Gs=Q({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),_s=Q({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Lt={};y(Lt,{base256emoji:()=>Hs});var bn=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),Ws=bn.reduce((r,e,t)=>(r[t]=e,r),[]),Xs=bn.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function Ks(r){return r.reduce((e,t)=>(e+=Ws[t],e),"")}function Qs(r){let e=[];for(let t of r){let n=Xs[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}var Hs=ue({prefix:"\u{1F680}",name:"base256emoji",encode:Ks,decode:Qs});var jt={};y(jt,{sha256:()=>rt,sha512:()=>bi});var Ys=xn,wn=128,Zs=127,ei=~Zs,ti=Math.pow(2,31);function xn(r,e,t){e=e||[],t=t||0;for(var n=t;r>=ti;)e[t++]=r&255|wn,r/=128;for(;r&ei;)e[t++]=r&255|wn,r>>>=7;return e[t]=r|0,xn.bytes=t-n+1,e}var ri=Rt,ni=128,gn=127;function Rt(r,n){var t=0,n=n||0,o=0,s=n,i,a=r.length;do{if(s>=a)throw Rt.bytes=0,new RangeError("Could not decode varint");i=r[s++],t+=o<28?(i&gn)<<o:(i&gn)*Math.pow(2,o),o+=7}while(i>=ni);return Rt.bytes=s-n,t}var oi=Math.pow(2,7),si=Math.pow(2,14),ii=Math.pow(2,21),ai=Math.pow(2,28),ci=Math.pow(2,35),di=Math.pow(2,42),pi=Math.pow(2,49),fi=Math.pow(2,56),ui=Math.pow(2,63),hi=function(r){return r<oi?1:r<si?2:r<ii?3:r<ai?4:r<ci?5:r<di?6:r<pi?7:r<fi?8:r<ui?9:10},li={encode:Ys,decode:ri,encodingLength:hi},mi=li,ze=mi;var Me=(r,e=0)=>[ze.decode(r,e),ze.decode.bytes],he=(r,e,t=0)=>(ze.encode(r,e,t),e),le=r=>ze.encodingLength(r);var Y=(r,e)=>{let t=e.byteLength,n=le(r),o=n+le(t),s=new Uint8Array(o+t);return he(r,s,0),he(t,s,n),s.set(e,o),new me(r,t,e,s)},Be=r=>{let e=J(r),[t,n]=Me(e),[o,s]=Me(e.subarray(n)),i=e.subarray(n+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new me(t,o,i,e)},yn=(r,e)=>{if(r===e)return!0;{let t=e;return r.code===t.code&&r.size===t.size&&t.bytes instanceof Uint8Array&&dn(r.bytes,t.bytes)}},me=class{constructor(e,t,n,o){this.code=e,this.size=t,this.digest=n,this.bytes=o}};var $t=({name:r,code:e,encode:t})=>new Vt(r,e,t),Vt=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?Y(this.code,t):t.then(n=>Y(this.code,n))}else throw Error("Unknown type, must be binary type")}};var Cn=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),rt=$t({name:"sha2-256",code:18,encode:Cn("SHA-256")}),bi=$t({name:"sha2-512",code:19,encode:Cn("SHA-512")});var qt={};y(qt,{identity:()=>nt});var Sn=0,wi="identity",An=J,gi=r=>Y(Sn,An(r)),nt={code:Sn,name:wi,encode:An,digest:gi};var Cp=new TextEncoder,Sp=new TextDecoder;var En=(r,e)=>{let{bytes:t,version:n}=r;switch(n){case 0:return Ci(t,Jt(r),e||k.encoder);default:return Si(t,Jt(r),e||H.encoder)}};var Tn=new WeakMap,Jt=r=>{let e=Tn.get(r);if(e==null){let t=new Map;return Tn.set(r,t),t}return e},F=class{constructor(e,t,n,o){this.code=t,this.version=e,this.multihash=n,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:e,multihash:t}=this;if(e!==Oe)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==Ai)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return F.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,n=Y(e,t);return F.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(e){return F.equals(this,e)}static equals(e,t){let n=t;return n&&e.code===n.code&&e.version===n.version&&yn(e.multihash,n.multihash)}toString(e){return En(this,e)}toJSON(){return{"/":En(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(e){if(e==null)return null;let t=e;if(t instanceof F)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){let{version:n,code:o,multihash:s,bytes:i}=t;return new F(n,o,s,i||In(n,o,s.bytes))}else if(t[Ei]===!0){let{version:n,multihash:o,code:s}=t,i=Be(o);return F.create(n,s,i)}else return null}static create(e,t,n){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(n.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:{if(t!==Oe)throw new Error(`Version 0 CID must use dag-pb (code: ${Oe}) block encoding`);return new F(e,t,n,n.bytes)}case 1:{let o=In(e,t,n.bytes);return new F(e,t,n,o)}default:throw new Error("Invalid version")}}static createV0(e){return F.create(0,Oe,e)}static createV1(e,t){return F.create(1,e,t)}static decode(e){let[t,n]=F.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return t}static decodeFirst(e){let t=F.inspectBytes(e),n=t.size-t.multihashSize,o=J(e.subarray(n,n+t.multihashSize));if(o.byteLength!==t.multihashSize)throw new Error("Incorrect length");let s=o.subarray(t.multihashSize-t.digestSize),i=new me(t.multihashCode,t.digestSize,s,o);return[t.version===0?F.createV0(i):F.createV1(t.codec,i),e.subarray(t.size)]}static inspectBytes(e){let t=0,n=()=>{let[f,w]=Me(e.subarray(t));return t+=w,f},o=n(),s=Oe;if(o===18?(o=0,t=0):s=n(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);let i=t,a=n(),l=n(),T=t+l,d=T-i;return{version:o,codec:s,multihashCode:a,digestSize:l,multihashSize:d,size:T}}static parse(e,t){let[n,o]=vi(e,t),s=F.decode(o);if(s.version===0&&e[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return Jt(s).set(n,e),s}},vi=(r,e)=>{switch(r[0]){case"Q":{let t=e||k;return[k.prefix,t.decode(`${k.prefix}${r}`)]}case k.prefix:{let t=e||k;return[k.prefix,t.decode(r)]}case H.prefix:{let t=e||H;return[H.prefix,t.decode(r)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],e.decode(r)]}}},Ci=(r,e,t)=>{let{prefix:n}=t;if(n!==k.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);let o=e.get(n);if(o==null){let s=t.encode(r).slice(1);return e.set(n,s),s}else return o},Si=(r,e,t)=>{let{prefix:n}=t,o=e.get(n);if(o==null){let s=t.encode(r);return e.set(n,s),s}else return o},Oe=112,Ai=18,In=(r,e,t)=>{let n=le(r),o=n+le(e),s=new Uint8Array(o+t.byteLength);return he(r,s,0),he(e,s,n),s.set(t,o),s},Ei=Symbol.for("@ipld/js-cid/CID");var Gt={...Dt,...zt,...Mt,...Bt,...Ot,...Ut,...kt,...Ft,...Nt,...Lt},zp={...jt,...qt};function ke(r,e){if(r===e)return!0;if(r.byteLength!==e.byteLength)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0}var Ti=Symbol.for("nodejs.util.inspect.custom"),Un=Object.values(Gt).map(r=>r.decoder).reduce((r,e)=>r.or(e),Gt.identity.decoder),Fn=114,Pn=36,Nn=37,Le=class{type;multihash;privateKey;publicKey;string;constructor(e){this.type=e.type,this.multihash=e.multihash,this.privateKey=e.privateKey,Object.defineProperty(this,"string",{enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return`PeerId(${this.toString()})`}[mn]=!0;toString(){return this.string==null&&(this.string=k.encode(this.multihash.bytes).slice(1)),this.string}toCID(){return F.createV1(Fn,this.multihash)}toBytes(){return this.multihash.bytes}toJSON(){return this.toString()}equals(e){if(e instanceof Uint8Array)return ke(this.multihash.bytes,e);if(typeof e=="string")return _t(e).equals(this);if(e?.multihash?.bytes!=null)return ke(this.multihash.bytes,e.multihash.bytes);throw new Error("not valid Id")}[Ti](){return`PeerId(${this.toString()})`}},Re=class extends Le{type="RSA";publicKey;constructor(e){super({...e,type:"RSA"}),this.publicKey=e.publicKey}},Ve=class extends Le{type="Ed25519";publicKey;constructor(e){super({...e,type:"Ed25519"}),this.publicKey=e.multihash.digest}},$e=class extends Le{type="secp256k1";publicKey;constructor(e){super({...e,type:"secp256k1"}),this.publicKey=e.multihash.digest}};function _t(r,e){if(e=e??Un,r.charAt(0)==="1"||r.charAt(0)==="Q"){let t=Be(k.decode(`z${r}`));return r.startsWith("12D")?new Ve({multihash:t}):r.startsWith("16U")?new $e({multihash:t}):new Re({multihash:t})}return Ii(Un.decode(r))}function Ii(r){try{let e=Be(r);if(e.code===nt.code){if(e.digest.length===Pn)return new Ve({multihash:e});if(e.digest.length===Nn)return new $e({multihash:e})}if(e.code===rt.code)return new Re({multihash:e})}catch{return Ui(F.decode(r))}throw new Error("Supplied PeerID CID is invalid")}function Ui(r){if(r==null||r.multihash==null||r.version==null||r.version===1&&r.code!==Fn)throw new Error("Supplied PeerID CID is invalid");let e=r.multihash;if(e.code===rt.code)return new Re({multihash:r.multihash});if(e.code===nt.code){if(e.digest.length===Pn)return new Ve({multihash:r.multihash});if(e.digest.length===Nn)return new $e({multihash:r.multihash})}throw new Error("Supplied PeerID CID is invalid")}var ot=class extends Error{code;props;constructor(e,t,n){super(e),this.code=t,this.name=n?.name??"CodeError",this.props=n??{}}};var Ht={};y(Ht,{base58btc:()=>L,base58flickr:()=>Mi});function Fi(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var o=0;o<r.length;o++){var s=r.charAt(o),i=s.charCodeAt(0);if(t[i]!==255)throw new TypeError(s+" is ambiguous");t[i]=o}var a=r.length,l=r.charAt(0),T=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var u=0,v=0,m=0,g=c.length;m!==g&&c[m]===0;)m++,u++;for(var C=(g-m)*d+1>>>0,b=new Uint8Array(C);m!==g;){for(var S=c[m],E=0,x=C-1;(S!==0||E<v)&&x!==-1;x--,E++)S+=256*b[x]>>>0,b[x]=S%a>>>0,S=S/a>>>0;if(S!==0)throw new Error("Non-zero carry");v=E,m++}for(var A=C-v;A!==C&&b[A]===0;)A++;for(var O=l.repeat(u);A<C;++A)O+=r.charAt(b[A]);return O}function w(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var u=0;if(c[u]!==" "){for(var v=0,m=0;c[u]===l;)v++,u++;for(var g=(c.length-u)*T+1>>>0,C=new Uint8Array(g);c[u];){var b=t[c.charCodeAt(u)];if(b===255)return;for(var S=0,E=g-1;(b!==0||S<m)&&E!==-1;E--,S++)b+=a*C[E]>>>0,C[E]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");m=S,u++}if(c[u]!==" "){for(var x=g-m;x!==g&&C[x]===0;)x++;for(var A=new Uint8Array(v+(g-x)),O=v;x!==g;)A[O++]=C[x++];return A}}}function z(c){var u=w(c);if(u)return u;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:w,decode:z}}var Pi=Fi,Ni=Pi,Dn=Ni;var Kp=new Uint8Array(0);var zn=(r,e)=>{if(r===e)return!0;if(r.byteLength!==e.byteLength)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0},G=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};var Mn=r=>new TextEncoder().encode(r),Bn=r=>new TextDecoder().decode(r);var Wt=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Xt=class{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return kn(this,e)}},Kt=class{constructor(e){this.decoders=e}or(e){return kn(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},kn=(r,e)=>new Kt({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}}),Qt=class{constructor(e,t,n,o){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=o,this.encoder=new Wt(e,t,n),this.decoder=new Xt(e,t,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},we=({name:r,prefix:e,encode:t,decode:n})=>new Qt(r,e,t,n),Z=({prefix:r,name:e,alphabet:t})=>{let{encode:n,decode:o}=Dn(t,e);return we({prefix:r,name:e,encode:n,decode:s=>G(o(s))})},Di=(r,e,t,n)=>{let o={};for(let d=0;d<e.length;++d)o[e[d]]=d;let s=r.length;for(;r[s-1]==="=";)--s;let i=new Uint8Array(s*t/8|0),a=0,l=0,T=0;for(let d=0;d<s;++d){let f=o[r[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);l=l<<t|f,a+=t,a>=8&&(a-=8,i[T++]=255&l>>a)}if(a>=t||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return i},zi=(r,e,t)=>{let n=e[e.length-1]==="=",o=(1<<t)-1,s="",i=0,a=0;for(let l=0;l<r.length;++l)for(a=a<<8|r[l],i+=8;i>t;)i-=t,s+=e[o&a>>i];if(i&&(s+=e[o&a<<t-i]),n)for(;s.length*t&7;)s+="=";return s},N=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>we({prefix:e,name:r,encode(o){return zi(o,n,t)},decode(o){return Di(o,n,t,r)}});var L=Z({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Mi=Z({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Bi=Vn,Ln=128,Oi=127,ki=~Oi,Li=Math.pow(2,31);function Vn(r,e,t){e=e||[],t=t||0;for(var n=t;r>=Li;)e[t++]=r&255|Ln,r/=128;for(;r&ki;)e[t++]=r&255|Ln,r>>>=7;return e[t]=r|0,Vn.bytes=t-n+1,e}var Ri=Yt,Vi=128,Rn=127;function Yt(r,n){var t=0,n=n||0,o=0,s=n,i,a=r.length;do{if(s>=a)throw Yt.bytes=0,new RangeError("Could not decode varint");i=r[s++],t+=o<28?(i&Rn)<<o:(i&Rn)*Math.pow(2,o),o+=7}while(i>=Vi);return Yt.bytes=s-n,t}var $i=Math.pow(2,7),ji=Math.pow(2,14),qi=Math.pow(2,21),Ji=Math.pow(2,28),Gi=Math.pow(2,35),_i=Math.pow(2,42),Wi=Math.pow(2,49),Xi=Math.pow(2,56),Ki=Math.pow(2,63),Qi=function(r){return r<$i?1:r<ji?2:r<qi?3:r<Ji?4:r<Gi?5:r<_i?6:r<Wi?7:r<Xi?8:r<Ki?9:10},Hi={encode:Bi,decode:Ri,encodingLength:Qi},Yi=Hi,je=Yi;var qe=(r,e=0)=>[je.decode(r,e),je.decode.bytes],ge=(r,e,t=0)=>(je.encode(r,e,t),e),xe=r=>je.encodingLength(r);var oe=(r,e)=>{let t=e.byteLength,n=xe(r),o=n+xe(t),s=new Uint8Array(o+t);return ge(r,s,0),ge(t,s,n),s.set(e,o),new ye(r,t,e,s)},it=r=>{let e=G(r),[t,n]=qe(e),[o,s]=qe(e.subarray(n)),i=e.subarray(n+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new ye(t,o,i,e)},$n=(r,e)=>{if(r===e)return!0;{let t=e;return r.code===t.code&&r.size===t.size&&t.bytes instanceof Uint8Array&&zn(r.bytes,t.bytes)}},ye=class{constructor(e,t,n,o){this.code=e,this.size=t,this.digest=n,this.bytes=o}};var Zt={};y(Zt,{base32:()=>_,base32hex:()=>ra,base32hexpad:()=>oa,base32hexpadupper:()=>sa,base32hexupper:()=>na,base32pad:()=>ea,base32padupper:()=>ta,base32upper:()=>Zi,base32z:()=>ia});var _=N({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Zi=N({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ea=N({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ta=N({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ra=N({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),na=N({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),oa=N({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),sa=N({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ia=N({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var jn=(r,e)=>{let{bytes:t,version:n}=r;switch(n){case 0:return ca(t,er(r),e||L.encoder);default:return da(t,er(r),e||_.encoder)}};var qn=new WeakMap,er=r=>{let e=qn.get(r);if(e==null){let t=new Map;return qn.set(r,t),t}return e},U=class{constructor(e,t,n,o){this.code=t,this.version=e,this.multihash=n,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:e,multihash:t}=this;if(e!==Je)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==pa)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return U.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,n=oe(e,t);return U.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(e){return U.equals(this,e)}static equals(e,t){let n=t;return n&&e.code===n.code&&e.version===n.version&&$n(e.multihash,n.multihash)}toString(e){return jn(this,e)}toJSON(){return{"/":jn(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(e){if(e==null)return null;let t=e;if(t instanceof U)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){let{version:n,code:o,multihash:s,bytes:i}=t;return new U(n,o,s,i||Jn(n,o,s.bytes))}else if(t[fa]===!0){let{version:n,multihash:o,code:s}=t,i=it(o);return U.create(n,s,i)}else return null}static create(e,t,n){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(n.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:{if(t!==Je)throw new Error(`Version 0 CID must use dag-pb (code: ${Je}) block encoding`);return new U(e,t,n,n.bytes)}case 1:{let o=Jn(e,t,n.bytes);return new U(e,t,n,o)}default:throw new Error("Invalid version")}}static createV0(e){return U.create(0,Je,e)}static createV1(e,t){return U.create(1,e,t)}static decode(e){let[t,n]=U.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return t}static decodeFirst(e){let t=U.inspectBytes(e),n=t.size-t.multihashSize,o=G(e.subarray(n,n+t.multihashSize));if(o.byteLength!==t.multihashSize)throw new Error("Incorrect length");let s=o.subarray(t.multihashSize-t.digestSize),i=new ye(t.multihashCode,t.digestSize,s,o);return[t.version===0?U.createV0(i):U.createV1(t.codec,i),e.subarray(t.size)]}static inspectBytes(e){let t=0,n=()=>{let[f,w]=qe(e.subarray(t));return t+=w,f},o=n(),s=Je;if(o===18?(o=0,t=0):s=n(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);let i=t,a=n(),l=n(),T=t+l,d=T-i;return{version:o,codec:s,multihashCode:a,digestSize:l,multihashSize:d,size:T}}static parse(e,t){let[n,o]=aa(e,t),s=U.decode(o);if(s.version===0&&e[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return er(s).set(n,e),s}},aa=(r,e)=>{switch(r[0]){case"Q":{let t=e||L;return[L.prefix,t.decode(`${L.prefix}${r}`)]}case L.prefix:{let t=e||L;return[L.prefix,t.decode(r)]}case _.prefix:{let t=e||_;return[_.prefix,t.decode(r)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],e.decode(r)]}}},ca=(r,e,t)=>{let{prefix:n}=t;if(n!==L.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);let o=e.get(n);if(o==null){let s=t.encode(r).slice(1);return e.set(n,s),s}else return o},da=(r,e,t)=>{let{prefix:n}=t,o=e.get(n);if(o==null){let s=t.encode(r);return e.set(n,s),s}else return o},Je=112,pa=18,Jn=(r,e,t)=>{let n=xe(r),o=n+xe(e),s=new Uint8Array(o+t.byteLength);return ge(r,s,0),ge(e,s,n),s.set(t,o),s},fa=Symbol.for("@ipld/js-cid/CID");var sr={};y(sr,{identity:()=>wa});function ua(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var o=0;o<r.length;o++){var s=r.charAt(o),i=s.charCodeAt(0);if(t[i]!==255)throw new TypeError(s+" is ambiguous");t[i]=o}var a=r.length,l=r.charAt(0),T=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var u=0,v=0,m=0,g=c.length;m!==g&&c[m]===0;)m++,u++;for(var C=(g-m)*d+1>>>0,b=new Uint8Array(C);m!==g;){for(var S=c[m],E=0,x=C-1;(S!==0||E<v)&&x!==-1;x--,E++)S+=256*b[x]>>>0,b[x]=S%a>>>0,S=S/a>>>0;if(S!==0)throw new Error("Non-zero carry");v=E,m++}for(var A=C-v;A!==C&&b[A]===0;)A++;for(var O=l.repeat(u);A<C;++A)O+=r.charAt(b[A]);return O}function w(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var u=0;if(c[u]!==" "){for(var v=0,m=0;c[u]===l;)v++,u++;for(var g=(c.length-u)*T+1>>>0,C=new Uint8Array(g);c[u];){var b=t[c.charCodeAt(u)];if(b===255)return;for(var S=0,E=g-1;(b!==0||S<m)&&E!==-1;E--,S++)b+=a*C[E]>>>0,C[E]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");m=S,u++}if(c[u]!==" "){for(var x=g-m;x!==g&&C[x]===0;)x++;for(var A=new Uint8Array(v+(g-x)),O=v;x!==g;)A[O++]=C[x++];return A}}}function z(c){var u=w(c);if(u)return u;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:w,decode:z}}var ha=ua,la=ha,Gn=la;var ff=new Uint8Array(0);var _n=(r,e)=>{if(r===e)return!0;if(r.byteLength!==e.byteLength)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0},W=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};var Wn=r=>new TextEncoder().encode(r),Xn=r=>new TextDecoder().decode(r);var tr=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},rr=class{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Qn(this,e)}},nr=class{constructor(e){this.decoders=e}or(e){return Qn(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},Qn=(r,e)=>new nr({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}}),or=class{constructor(e,t,n,o){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=o,this.encoder=new tr(e,t,n),this.decoder=new rr(e,t,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},Ce=({name:r,prefix:e,encode:t,decode:n})=>new or(r,e,t,n),ee=({prefix:r,name:e,alphabet:t})=>{let{encode:n,decode:o}=Gn(t,e);return Ce({prefix:r,name:e,encode:n,decode:s=>W(o(s))})},ma=(r,e,t,n)=>{let o={};for(let d=0;d<e.length;++d)o[e[d]]=d;let s=r.length;for(;r[s-1]==="=";)--s;let i=new Uint8Array(s*t/8|0),a=0,l=0,T=0;for(let d=0;d<s;++d){let f=o[r[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);l=l<<t|f,a+=t,a>=8&&(a-=8,i[T++]=255&l>>a)}if(a>=t||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return i},ba=(r,e,t)=>{let n=e[e.length-1]==="=",o=(1<<t)-1,s="",i=0,a=0;for(let l=0;l<r.length;++l)for(a=a<<8|r[l],i+=8;i>t;)i-=t,s+=e[o&a>>i];if(i&&(s+=e[o&a<<t-i]),n)for(;s.length*t&7;)s+="=";return s},D=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>Ce({prefix:e,name:r,encode(o){return ba(o,n,t)},decode(o){return ma(o,n,t,r)}});var wa=Ce({prefix:"\0",name:"identity",encode:r=>Xn(r),decode:r=>Wn(r)});var ir={};y(ir,{base2:()=>ga});var ga=D({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var ar={};y(ar,{base8:()=>xa});var xa=D({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var cr={};y(cr,{base10:()=>ya});var ya=ee({prefix:"9",name:"base10",alphabet:"0123456789"});var dr={};y(dr,{base16:()=>va,base16upper:()=>Ca});var va=D({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ca=D({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var pr={};y(pr,{base32:()=>Se,base32hex:()=>Ta,base32hexpad:()=>Ua,base32hexpadupper:()=>Fa,base32hexupper:()=>Ia,base32pad:()=>Aa,base32padupper:()=>Ea,base32upper:()=>Sa,base32z:()=>Pa});var Se=D({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Sa=D({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Aa=D({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Ea=D({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Ta=D({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ia=D({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Ua=D({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Fa=D({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Pa=D({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var fr={};y(fr,{base36:()=>Na,base36upper:()=>Da});var Na=ee({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Da=ee({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var ur={};y(ur,{base58btc:()=>j,base58flickr:()=>za});var j=ee({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),za=ee({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var hr={};y(hr,{base64:()=>Ma,base64pad:()=>Ba,base64url:()=>Oa,base64urlpad:()=>ka});var Ma=D({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Ba=D({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Oa=D({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ka=D({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var lr={};y(lr,{base256emoji:()=>ja});var Hn=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),La=Hn.reduce((r,e,t)=>(r[t]=e,r),[]),Ra=Hn.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function Va(r){return r.reduce((e,t)=>(e+=La[t],e),"")}function $a(r){let e=[];for(let t of r){let n=Ra[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}var ja=Ce({prefix:"\u{1F680}",name:"base256emoji",encode:Va,decode:$a});var gr={};y(gr,{sha256:()=>ac,sha512:()=>cc});var qa=eo,Yn=128,Ja=127,Ga=~Ja,_a=Math.pow(2,31);function eo(r,e,t){e=e||[],t=t||0;for(var n=t;r>=_a;)e[t++]=r&255|Yn,r/=128;for(;r&Ga;)e[t++]=r&255|Yn,r>>>=7;return e[t]=r|0,eo.bytes=t-n+1,e}var Wa=mr,Xa=128,Zn=127;function mr(r,n){var t=0,n=n||0,o=0,s=n,i,a=r.length;do{if(s>=a)throw mr.bytes=0,new RangeError("Could not decode varint");i=r[s++],t+=o<28?(i&Zn)<<o:(i&Zn)*Math.pow(2,o),o+=7}while(i>=Xa);return mr.bytes=s-n,t}var Ka=Math.pow(2,7),Qa=Math.pow(2,14),Ha=Math.pow(2,21),Ya=Math.pow(2,28),Za=Math.pow(2,35),ec=Math.pow(2,42),tc=Math.pow(2,49),rc=Math.pow(2,56),nc=Math.pow(2,63),oc=function(r){return r<Ka?1:r<Qa?2:r<Ha?3:r<Ya?4:r<Za?5:r<ec?6:r<tc?7:r<rc?8:r<nc?9:10},sc={encode:qa,decode:Wa,encodingLength:oc},ic=sc,Ge=ic;var _e=(r,e=0)=>[Ge.decode(r,e),Ge.decode.bytes],Ae=(r,e,t=0)=>(Ge.encode(r,e,t),e),Ee=r=>Ge.encodingLength(r);var se=(r,e)=>{let t=e.byteLength,n=Ee(r),o=n+Ee(t),s=new Uint8Array(o+t);return Ae(r,s,0),Ae(t,s,n),s.set(e,o),new Te(r,t,e,s)},to=r=>{let e=W(r),[t,n]=_e(e),[o,s]=_e(e.subarray(n)),i=e.subarray(n+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new Te(t,o,i,e)},ro=(r,e)=>{if(r===e)return!0;{let t=e;return r.code===t.code&&r.size===t.size&&t.bytes instanceof Uint8Array&&_n(r.bytes,t.bytes)}},Te=class{constructor(e,t,n,o){this.code=e,this.size=t,this.digest=n,this.bytes=o}};var wr=({name:r,code:e,encode:t})=>new br(r,e,t),br=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?se(this.code,t):t.then(n=>se(this.code,n))}else throw Error("Unknown type, must be binary type")}};var oo=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),ac=wr({name:"sha2-256",code:18,encode:oo("SHA-256")}),cc=wr({name:"sha2-512",code:19,encode:oo("SHA-512")});var xr={};y(xr,{identity:()=>fc});var so=0,dc="identity",io=W,pc=r=>se(so,io(r)),fc={code:so,name:dc,encode:io,digest:pc};var Df=new TextEncoder,zf=new TextDecoder;var ao=(r,e)=>{let{bytes:t,version:n}=r;switch(n){case 0:return mc(t,yr(r),e||j.encoder);default:return bc(t,yr(r),e||Se.encoder)}};var co=new WeakMap,yr=r=>{let e=co.get(r);if(e==null){let t=new Map;return co.set(r,t),t}return e},B=class{constructor(e,t,n,o){this.code=t,this.version=e,this.multihash=n,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:e,multihash:t}=this;if(e!==Xe)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==wc)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return B.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,n=se(e,t);return B.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(e){return B.equals(this,e)}static equals(e,t){let n=t;return n&&e.code===n.code&&e.version===n.version&&ro(e.multihash,n.multihash)}toString(e){return ao(this,e)}toJSON(){return{"/":ao(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(e){if(e==null)return null;let t=e;if(t instanceof B)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){let{version:n,code:o,multihash:s,bytes:i}=t;return new B(n,o,s,i||po(n,o,s.bytes))}else if(t[gc]===!0){let{version:n,multihash:o,code:s}=t,i=to(o);return B.create(n,s,i)}else return null}static create(e,t,n){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(n.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:{if(t!==Xe)throw new Error(`Version 0 CID must use dag-pb (code: ${Xe}) block encoding`);return new B(e,t,n,n.bytes)}case 1:{let o=po(e,t,n.bytes);return new B(e,t,n,o)}default:throw new Error("Invalid version")}}static createV0(e){return B.create(0,Xe,e)}static createV1(e,t){return B.create(1,e,t)}static decode(e){let[t,n]=B.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return t}static decodeFirst(e){let t=B.inspectBytes(e),n=t.size-t.multihashSize,o=W(e.subarray(n,n+t.multihashSize));if(o.byteLength!==t.multihashSize)throw new Error("Incorrect length");let s=o.subarray(t.multihashSize-t.digestSize),i=new Te(t.multihashCode,t.digestSize,s,o);return[t.version===0?B.createV0(i):B.createV1(t.codec,i),e.subarray(t.size)]}static inspectBytes(e){let t=0,n=()=>{let[f,w]=_e(e.subarray(t));return t+=w,f},o=n(),s=Xe;if(o===18?(o=0,t=0):s=n(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);let i=t,a=n(),l=n(),T=t+l,d=T-i;return{version:o,codec:s,multihashCode:a,digestSize:l,multihashSize:d,size:T}}static parse(e,t){let[n,o]=lc(e,t),s=B.decode(o);if(s.version===0&&e[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return yr(s).set(n,e),s}},lc=(r,e)=>{switch(r[0]){case"Q":{let t=e||j;return[j.prefix,t.decode(`${j.prefix}${r}`)]}case j.prefix:{let t=e||j;return[j.prefix,t.decode(r)]}case Se.prefix:{let t=e||Se;return[Se.prefix,t.decode(r)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],e.decode(r)]}}},mc=(r,e,t)=>{let{prefix:n}=t;if(n!==j.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);let o=e.get(n);if(o==null){let s=t.encode(r).slice(1);return e.set(n,s),s}else return o},bc=(r,e,t)=>{let{prefix:n}=t,o=e.get(n);if(o==null){let s=t.encode(r);return e.set(n,s),s}else return o},Xe=112,wc=18,po=(r,e,t)=>{let n=Ee(r),o=n+Ee(e),s=new Uint8Array(o+t.byteLength);return Ae(r,s,0),Ae(e,s,n),s.set(t,o),s},gc=Symbol.for("@ipld/js-cid/CID");var vr={...sr,...ir,...ar,...cr,...dr,...pr,...fr,...ur,...hr,...lr},qf={...gr,...xr};function Ie(r){return globalThis.Buffer!=null?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function ct(r=0){return globalThis.Buffer?.allocUnsafe!=null?Ie(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}function uo(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}var fo=uo("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),Cr=uo("ascii","a",r=>{let e="a";for(let t=0;t<r.length;t++)e+=String.fromCharCode(r[t]);return e},r=>{r=r.substring(1);let e=ct(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e}),xc={utf8:fo,"utf-8":fo,hex:vr.base16,latin1:Cr,ascii:Cr,binary:Cr,...vr},dt=xc;function R(r,e="utf8"){let t=dt[e];if(t==null)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(r.buffer,r.byteOffset,r.byteLength).toString("utf8"):t.encoder.encode(r).substring(1)}var Kr=Qe(pt(),1);function X(r,e){e==null&&(e=r.reduce((o,s)=>o+s.length,0));let t=ct(e),n=0;for(let o of r)t.set(o,n),n+=o.length;return Ie(t)}var Fe=Qe(pt(),1);var ft=class{index=0;input="";new(e){return this.index=0,this.input=e,this}readAtomically(e){let t=this.index,n=e();return n===void 0&&(this.index=t),n}parseWith(e){let t=e();if(this.index===this.input.length)return t}peekChar(){if(!(this.index>=this.input.length))return this.input[this.index]}readChar(){if(!(this.index>=this.input.length))return this.input[this.index++]}readGivenChar(e){return this.readAtomically(()=>{let t=this.readChar();if(t===e)return t})}readSeparator(e,t,n){return this.readAtomically(()=>{if(!(t>0&&this.readGivenChar(e)===void 0))return n()})}readNumber(e,t,n,o){return this.readAtomically(()=>{let s=0,i=0,a=this.peekChar();if(a===void 0)return;let l=a==="0",T=2**(8*o)-1;for(;;){let d=this.readAtomically(()=>{let f=this.readChar();if(f===void 0)return;let w=Number.parseInt(f,e);if(!Number.isNaN(w))return w});if(d===void 0)break;if(s*=e,s+=d,s>T||(i+=1,t!==void 0&&i>t))return}if(i!==0)return!n&&l&&i>1?void 0:s})}readIPv4Addr(){return this.readAtomically(()=>{let e=new Uint8Array(4);for(let t=0;t<e.length;t++){let n=this.readSeparator(".",t,()=>this.readNumber(10,3,!1,1));if(n===void 0)return;e[t]=n}return e})}readIPv6Addr(){let e=t=>{for(let n=0;n<t.length/2;n++){let o=n*2;if(n<t.length-3){let i=this.readSeparator(":",n,()=>this.readIPv4Addr());if(i!==void 0)return t[o]=i[0],t[o+1]=i[1],t[o+2]=i[2],t[o+3]=i[3],[o+4,!0]}let s=this.readSeparator(":",n,()=>this.readNumber(16,4,!0,2));if(s===void 0)return[o,!1];t[o]=s>>8,t[o+1]=s&255}return[t.length,!1]};return this.readAtomically(()=>{let t=new Uint8Array(16),[n,o]=e(t);if(n===16)return t;if(o||this.readGivenChar(":")===void 0||this.readGivenChar(":")===void 0)return;let s=new Uint8Array(14),i=16-(n+2),[a]=e(s.subarray(0,i));return t.set(s.subarray(0,a),16-a),t})}readIPAddr(){return this.readIPv4Addr()??this.readIPv6Addr()}};var Co=45,zc=15,Ue=new ft;function Er(r){if(!(r.length>zc))return Ue.new(r).parseWith(()=>Ue.readIPv4Addr())}function Tr(r){if(!(r.length>Co))return Ue.new(r).parseWith(()=>Ue.readIPv6Addr())}function ut(r){if(!(r.length>Co))return Ue.new(r).parseWith(()=>Ue.readIPAddr())}var mu=parseInt("0xFFFF",16),bu=new Uint8Array([0,0,0,0,0,0,0,0,0,0,255,255]);var Ir={};y(Ir,{identity:()=>Lc});var Lc=we({prefix:"\0",name:"identity",encode:r=>Bn(r),decode:r=>Mn(r)});var Ur={};y(Ur,{base2:()=>Rc});var Rc=N({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Fr={};y(Fr,{base8:()=>Vc});var Vc=N({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Pr={};y(Pr,{base10:()=>$c});var $c=Z({prefix:"9",name:"base10",alphabet:"0123456789"});var Nr={};y(Nr,{base16:()=>jc,base16upper:()=>qc});var jc=N({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),qc=N({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Dr={};y(Dr,{base36:()=>Jc,base36upper:()=>Gc});var Jc=Z({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Gc=Z({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var zr={};y(zr,{base64:()=>_c,base64pad:()=>Wc,base64url:()=>Xc,base64urlpad:()=>Kc});var _c=N({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Wc=N({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Xc=N({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Kc=N({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Mr={};y(Mr,{base256emoji:()=>ed});var Eo=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),Qc=Eo.reduce((r,e,t)=>(r[t]=e,r),[]),Hc=Eo.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function Yc(r){return r.reduce((e,t)=>(e+=Qc[t],e),"")}function Zc(r){let e=[];for(let t of r){let n=Hc[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}var ed=we({prefix:"\u{1F680}",name:"base256emoji",encode:Yc,decode:Zc});var kr={};y(kr,{sha256:()=>td,sha512:()=>rd});var Or=({name:r,code:e,encode:t})=>new Br(r,e,t),Br=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?oe(this.code,t):t.then(n=>oe(this.code,n))}else throw Error("Unknown type, must be binary type")}};var Io=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),td=Or({name:"sha2-256",code:18,encode:Io("SHA-256")}),rd=Or({name:"sha2-512",code:19,encode:Io("SHA-512")});var Lr={};y(Lr,{identity:()=>sd});var Uo=0,nd="identity",Fo=G,od=r=>oe(Uo,Fo(r)),sd={code:Uo,name:nd,encode:Fo,digest:od};var Qu=new TextEncoder,Hu=new TextDecoder;var Po={...Ir,...Ur,...Fr,...Pr,...Nr,...Zt,...Dr,...Ht,...zr,...Mr},rh={...kr,...Lr};function Rr(r,e="utf8"){let t=dt[e];if(t==null)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Ie(globalThis.Buffer.from(r,"utf-8")):t.decoder.decode(`${t.prefix}${r}`)}var q=Qe(pt(),1);function No(r){return!!Er(r)}function Do(r){return!!Tr(r)}function ht(r){return!!ut(r)}var zo=No,cd=Do,Vr=function(r){let e=0;if(r=r.toString().trim(),zo(r)){let t=new Uint8Array(e+4);return r.split(/\./g).forEach(n=>{t[e++]=parseInt(n,10)&255}),t}if(cd(r)){let t=r.split(":",8),n;for(n=0;n<t.length;n++){let s=zo(t[n]),i;s&&(i=Vr(t[n]),t[n]=R(i.slice(0,2),"base16")),i!=null&&++n<8&&t.splice(n,0,R(i.slice(2,4),"base16"))}if(t[0]==="")for(;t.length<8;)t.unshift("0");else if(t[t.length-1]==="")for(;t.length<8;)t.push("0");else if(t.length<8){for(n=0;n<t.length&&t[n]!=="";n++);let s=[n,1];for(n=9-t.length;n>0;n--)s.push("0");t.splice.apply(t,s)}let o=new Uint8Array(e+16);for(n=0;n<t.length;n++){let s=parseInt(t[n],16);o[e++]=s>>8&255,o[e++]=s&255}return o}throw new Error("invalid ip address")},Mo=function(r,e=0,t){e=~~e,t=t??r.length-e;let n=new DataView(r.buffer);if(t===4){let o=[];for(let s=0;s<t;s++)o.push(r[e+s]);return o.join(".")}if(t===16){let o=[];for(let s=0;s<t;s+=2)o.push(n.getUint16(e+s).toString(16));return o.join(":").replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}return""};var Ke={},$r={},pd=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,-1,"ip6zone"],[43,8,"ipcidr"],[53,-1,"dns",!0],[54,-1,"dns4",!0],[55,-1,"dns6",!0],[56,-1,"dnsaddr",!0],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[280,0,"webrtc-direct"],[281,0,"webrtc"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,-1,"unix",!1,!0],[421,-1,"ipfs"],[421,-1,"p2p"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,-1,"garlic64"],[448,0,"tls"],[449,-1,"sni"],[460,0,"quic"],[461,0,"quic-v1"],[465,0,"webtransport"],[466,-1,"certhash"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"],[777,-1,"memory"]];pd.forEach(r=>{let e=fd(...r);$r[e.code]=e,Ke[e.name]=e});function fd(r,e,t,n,o){return{code:r,size:e,name:t,resolvable:!!n,path:!!o}}function I(r){if(typeof r=="number"){if($r[r]!=null)return $r[r];throw new Error(`no protocol with code: ${r}`)}else if(typeof r=="string"){if(Ke[r]!=null)return Ke[r];throw new Error(`no protocol with name: ${r}`)}throw new Error(`invalid protocol id type: ${typeof r}`)}var Ch=I("ip4"),Sh=I("ip6"),Ah=I("ipcidr");function Ro(r,e){switch(I(r).code){case 4:case 41:return hd(e);case 42:return ko(e);case 6:case 273:case 33:case 132:return $o(e).toString();case 53:case 54:case 55:case 56:case 400:case 449:case 777:return ko(e);case 421:return wd(e);case 444:return Lo(e);case 445:return Lo(e);case 466:return bd(e);default:return R(e,"base16")}}function Vo(r,e){switch(I(r).code){case 4:return Bo(e);case 41:return Bo(e);case 42:return Oo(e);case 6:case 273:case 33:case 132:return qr(parseInt(e,10));case 53:case 54:case 55:case 56:case 400:case 449:case 777:return Oo(e);case 421:return ld(e);case 444:return gd(e);case 445:return xd(e);case 466:return md(e);default:return Rr(e,"base16")}}var jr=Object.values(Po).map(r=>r.decoder),ud=function(){let r=jr[0].or(jr[1]);return jr.slice(2).forEach(e=>r=r.or(e)),r}();function Bo(r){if(!ht(r))throw new Error("invalid ip address");return Vr(r)}function hd(r){let e=Mo(r,0,r.length);if(e==null)throw new Error("ipBuff is required");if(!ht(e))throw new Error("invalid ip address");return e}function qr(r){let e=new ArrayBuffer(2);return new DataView(e).setUint16(0,r),new Uint8Array(e)}function $o(r){return new DataView(r.buffer).getUint16(r.byteOffset)}function Oo(r){let e=Rr(r),t=Uint8Array.from(q.default.encode(e.length));return X([t,e],t.length+e.length)}function ko(r){let e=q.default.decode(r);if(r=r.slice(q.default.decode.bytes),r.length!==e)throw new Error("inconsistent lengths");return R(r)}function ld(r){let e;r[0]==="Q"||r[0]==="1"?e=it(L.decode(`z${r}`)).bytes:e=U.parse(r).multihash.bytes;let t=Uint8Array.from(q.default.encode(e.length));return X([t,e],t.length+e.length)}function md(r){let e=ud.decode(r),t=Uint8Array.from(q.default.encode(e.length));return X([t,e],t.length+e.length)}function bd(r){let e=q.default.decode(r),t=r.slice(q.default.decode.bytes);if(t.length!==e)throw new Error("inconsistent lengths");return"u"+R(t,"base64url")}function wd(r){let e=q.default.decode(r),t=r.slice(q.default.decode.bytes);if(t.length!==e)throw new Error("inconsistent lengths");return R(t,"base58btc")}function gd(r){let e=r.split(":");if(e.length!==2)throw new Error(`failed to parse onion addr: ["'${e.join('", "')}'"]' does not contain a port number`);if(e[0].length!==16)throw new Error(`failed to parse onion addr: ${e[0]} not a Tor onion address.`);let t=_.decode("b"+e[0]),n=parseInt(e[1],10);if(n<1||n>65536)throw new Error("Port number is not in range(1, 65536)");let o=qr(n);return X([t,o],t.length+o.length)}function xd(r){let e=r.split(":");if(e.length!==2)throw new Error(`failed to parse onion addr: ["'${e.join('", "')}'"]' does not contain a port number`);if(e[0].length!==56)throw new Error(`failed to parse onion addr: ${e[0]} not a Tor onion3 address.`);let t=_.decode(`b${e[0]}`),n=parseInt(e[1],10);if(n<1||n>65536)throw new Error("Port number is not in range(1, 65536)");let o=qr(n);return X([t,o],t.length+o.length)}function Lo(r){let e=r.slice(0,r.length-2),t=r.slice(r.length-2),n=R(e,"base32"),o=$o(t);return`${n}:${o}`}function yd(r){let e=[],t=r.split("/").slice(1);if(t.length===1&&t[0]==="")return[];for(let n=0;n<t.length;n++){let o=t[n],s=I(o);if(s.size===0){e.push([o]);continue}if(n++,n>=t.length)throw qo("invalid address: "+r);if(s.path===!0){e.push([o,Xr(t.slice(n).join("/"))]);break}e.push([o,t[n]])}return e}function vd(r){let e=[];return r.map(t=>{let n=bt(t);return e.push(n.name),t.length>1&&t[1]!=null&&e.push(t[1]),null}),Xr(e.join("/"))}function Cd(r){return r.map(e=>{Array.isArray(e)||(e=[e]);let t=bt(e);return e.length>1?[t.code,Vo(t.code,e[1])]:[t.code]})}function Jr(r){return r.map(e=>{let t=bt(e);return e[1]!=null?[t.code,Ro(t.code,e[1])]:[t.code]})}function Gr(r){return mt(X(r.map(e=>{let t=bt(e),n=Uint8Array.from(Fe.default.encode(t.code));return e.length>1&&e[1]!=null&&(n=X([n,e[1]])),n})))}function _r(r,e){return r.size>0?r.size/8:r.size===0?0:Fe.default.decode(e)+(Fe.default.decode.bytes??0)}function lt(r){let e=[],t=0;for(;t<r.length;){let n=Fe.default.decode(r,t),o=Fe.default.decode.bytes??0,s=I(n),i=_r(s,r.slice(t+o));if(i===0){e.push([n]),t+=o;continue}let a=r.slice(t+o,t+o+i);if(t+=i+o,t>r.length)throw qo("Invalid address Uint8Array: "+R(r,"base16"));e.push([n,a])}return e}function Wr(r){let e=lt(r),t=Jr(e);return vd(t)}function Sd(r){r=Xr(r);let e=yd(r),t=Cd(e);return Gr(t)}function jo(r){return Sd(r)}function mt(r){let e=Ad(r);if(e!=null)throw e;return Uint8Array.from(r)}function Ad(r){try{lt(r)}catch(e){return e}}function Xr(r){return"/"+r.trim().split("/").filter(e=>e).join("/")}function qo(r){return new Error("Error parsing address: "+r)}function bt(r){return I(r[0])}var Td=Symbol.for("nodejs.util.inspect.custom"),Id=[I("dns").code,I("dns4").code,I("dns6").code,I("dnsaddr").code],Ud=new Map,Jo=Symbol.for("@multiformats/js-multiaddr/multiaddr");function Fd(r){return!!r?.[Jo]}var K=class{bytes;#e;#r;#n;#t;[Jo]=!0;constructor(e){if(e==null&&(e=""),e instanceof Uint8Array)this.bytes=mt(e);else if(typeof e=="string"){if(e.length>0&&e.charAt(0)!=="/")throw new Error(`multiaddr "${e}" must start with a "/"`);this.bytes=jo(e)}else if(Fd(e))this.bytes=mt(e.bytes);else throw new Error("addr must be a string, Buffer, or another Multiaddr")}toString(){return this.#e==null&&(this.#e=Wr(this.bytes)),this.#e}toJSON(){return this.toString()}toOptions(){let e,t,n,o,s="",i=I("tcp"),a=I("udp"),l=I("ip4"),T=I("ip6"),d=I("dns6"),f=I("ip6zone");for(let[z,c]of this.stringTuples())z===f.code&&(s=`%${c??""}`),Id.includes(z)&&(t=i.name,o=443,n=`${c??""}${s}`,e=z===d.code?6:4),(z===i.code||z===a.code)&&(t=I(z).name,o=parseInt(c??"")),(z===l.code||z===T.code)&&(t=I(z).name,n=`${c??""}${s}`,e=z===T.code?6:4);if(e==null||t==null||n==null||o==null)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6, dnsaddr}/{address}/{tcp, udp}/{port}".');return{family:e,host:n,transport:t,port:o}}protos(){return this.protoCodes().map(e=>Object.assign({},I(e)))}protoCodes(){let e=[],t=this.bytes,n=0;for(;n<t.length;){let o=Kr.default.decode(t,n),s=Kr.default.decode.bytes??0,i=I(o),a=_r(i,t.slice(n+s));n+=a+s,e.push(o)}return e}protoNames(){return this.protos().map(e=>e.name)}tuples(){return this.#r==null&&(this.#r=lt(this.bytes)),this.#r}stringTuples(){return this.#n==null&&(this.#n=Jr(this.tuples())),this.#n}encapsulate(e){return e=new K(e),new K(this.toString()+e.toString())}decapsulate(e){let t=e.toString(),n=this.toString(),o=n.lastIndexOf(t);if(o<0)throw new Error(`Address ${this.toString()} does not contain subaddress: ${e.toString()}`);return new K(n.slice(0,o))}decapsulateCode(e){let t=this.tuples();for(let n=t.length-1;n>=0;n--)if(t[n][0]===e)return new K(Gr(t.slice(0,n)));return this}getPeerId(){try{let t=this.stringTuples().filter(n=>n[0]===Ke.ipfs.code).pop();if(t?.[1]!=null){let n=t[1];return n[0]==="Q"||n[0]==="1"?R(L.decode(`z${n}`),"base58btc"):R(U.parse(n).multihash.bytes,"base58btc")}return null}catch{return null}}getPath(){if(this.#t===void 0)try{this.#t=this.stringTuples().filter(e=>I(e[0]).path===!0)[0][1],this.#t==null&&(this.#t=null)}catch{this.#t=null}return this.#t}equals(e){return ke(this.bytes,e.bytes)}async resolve(e){let t=this.protos().find(s=>s.resolvable);if(t==null)return[this];let n=Ud.get(t.name);if(n==null)throw new ot(`no available resolver for ${t.name}`,"ERR_NO_AVAILABLE_RESOLVER");return(await n(this,e)).map(s=>new K(s))}nodeAddress(){let e=this.toOptions();if(e.transport!=="tcp"&&e.transport!=="udp")throw new Error(`multiaddr must have a valid format - no protocol with name: "${e.transport}". Must have a valid transport protocol: "{tcp, udp}"`);return{family:e.family,address:e.host,port:e.port}}isThinWaistAddress(e){let t=(e??this).protos();return!(t.length!==2||t[0].code!==4&&t[0].code!==41||t[1].code!==6&&t[1].code!==273)}[Td](){return`Multiaddr(${Wr(this.bytes)})`}};function Pe(r){return new K(r)}var Pd=p("dns4"),Nd=p("dns6"),Dd=p("dnsaddr"),ae=M(p("dns"),Dd,Pd,Nd),xt=M(p("ip4"),p("ip6")),Ne=M(h(xt,p("tcp")),h(ae,p("tcp"))),yt=h(xt,p("udp")),zd=h(yt,p("utp")),Md=h(yt,p("quic")),Bd=h(yt,p("quic-v1")),Qr=M(h(Ne,p("ws")),h(ae,p("ws"))),wt=M(h(Qr,p("p2p")),Qr),Hr=M(h(Ne,p("wss")),h(ae,p("wss")),h(Ne,p("tls"),p("ws")),h(ae,p("tls"),p("ws"))),gt=M(h(Hr,p("p2p")),Hr),Yr=M(h(Ne,p("http")),h(xt,p("http")),h(ae,p("http"))),Zr=M(h(Ne,p("https")),h(xt,p("https")),h(ae,p("https"))),Go=h(yt,p("webrtc-direct"),p("certhash")),Xo=M(h(Go,p("p2p")),Go),_o=h(Bd,p("webtransport"),p("certhash"),p("certhash")),Ko=M(h(_o,p("p2p")),_o),Qo=M(h(wt,p("p2p-webrtc-star"),p("p2p")),h(gt,p("p2p-webrtc-star"),p("p2p")),h(wt,p("p2p-webrtc-star")),h(gt,p("p2p-webrtc-star"))),Jh=M(h(wt,p("p2p-websocket-star"),p("p2p")),h(gt,p("p2p-websocket-star"),p("p2p")),h(wt,p("p2p-websocket-star")),h(gt,p("p2p-websocket-star"))),Ho=M(h(Yr,p("p2p-webrtc-direct"),p("p2p")),h(Zr,p("p2p-webrtc-direct"),p("p2p")),h(Yr,p("p2p-webrtc-direct")),h(Zr,p("p2p-webrtc-direct"))),ce=M(Qr,Hr,Yr,Zr,Qo,Ho,Ne,zd,Md,ae,Xo,Ko),Gh=M(h(ce,p("p2p-stardust"),p("p2p")),h(ce,p("p2p-stardust"))),te=M(h(ce,p("p2p")),Qo,Ho,Xo,Ko,p("p2p")),Wo=M(h(te,p("p2p-circuit"),te),h(te,p("p2p-circuit")),h(p("p2p-circuit"),te),h(ce,p("p2p-circuit")),h(p("p2p-circuit"),ce),p("p2p-circuit")),Yo=()=>M(h(Wo,Yo),Wo),ie=Yo(),Zo=M(h(ie,te,ie),h(te,ie),h(ie,te),ie,te);var _h=M(h(ie,p("webrtc"),p("p2p")),h(ie,p("webrtc")),h(ce,p("webrtc"),p("p2p")),h(ce,p("webrtc")),p("webrtc"));function es(r){function e(t){let n;try{n=Pe(t)}catch{return!1}let o=r(n.protoNames());return o===null?!1:o===!0||o===!1?o:o.length===0}return e}function h(...r){function e(t){if(t.length<r.length)return null;let n=t;return r.some(o=>(n=typeof o=="function"?o().partialMatch(t):o.partialMatch(t),Array.isArray(n)&&(t=n),n===null)),n}return{toString:function(){return"{ "+r.join(" ")+" }"},input:r,matches:es(e),partialMatch:e}}function M(...r){function e(n){let o=null;return r.some(s=>{let i=typeof s=="function"?s().partialMatch(n):s.partialMatch(n);return i!=null?(o=i,!0):!1}),o}return{toString:function(){return"{ "+r.join(" ")+" }"},input:r,matches:es(e),partialMatch:e}}function p(r){let e=r;function t(o){let s;try{s=Pe(o)}catch{return!1}let i=s.protoNames();return i.length===1&&i[0]===e}function n(o){return o.length===0?null:o[0]===e?o.slice(1):null}return{toString:function(){return e},matches:t,partialMatch:n}}var vt=ln("libp2p:bootstrap"),Od="bootstrap",kd=50,Ld=12e4,Rd=1e3,Ct=class extends Ye{timer;list;timeout;components;_init;constructor(e,t={list:[]}){if(t.list==null||t.list.length===0)throw new Error("Bootstrap requires a list of peer addresses");super(),this.components=e,this.timeout=t.timeout??Rd,this.list=[];for(let n of t.list){if(!Zo.matches(n)){vt.error("Invalid multiaddr");continue}let o=Pe(n),s=o.getPeerId();if(s==null){vt.error("Invalid bootstrap multiaddr without peer id");continue}let i={id:_t(s),multiaddrs:[o],protocols:[]};this.list.push(i)}this._init=t}[tn]=this;[Symbol.toStringTag]="@libp2p/bootstrap";isStarted(){return!!this.timer}start(){this.isStarted()||(vt("Starting bootstrap node discovery, discovering peers after %s ms",this.timeout),this.timer=setTimeout(()=>{this._discoverBootstrapPeers().catch(e=>{vt.error(e)})},this.timeout))}async _discoverBootstrapPeers(){if(this.timer!=null)for(let e of this.list){if(await this.components.peerStore.merge(e.id,{tags:{[this._init.tagName??Od]:{value:this._init.tagValue??kd,ttl:this._init.tagTTL??Ld}}}),this.timer==null)return;this.safeDispatchEvent("peer",{detail:e})}}stop(){this.timer!=null&&clearTimeout(this.timer),this.timer=void 0}};He(Ct,"tag","bootstrap");function Vd(r){return e=>new Ct(e,r)}return as($d);})();
|
|
2
|
+
"use strict";var Libp2PBootstrap=(()=>{var es=Object.create;var We=Object.defineProperty;var ts=Object.getOwnPropertyDescriptor;var rs=Object.getOwnPropertyNames;var ns=Object.getPrototypeOf,os=Object.prototype.hasOwnProperty;var Z=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),y=(r,e)=>{for(var t in e)We(r,t,{get:e[t],enumerable:!0})},Zr=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of rs(e))!os.call(r,o)&&o!==t&&We(r,o,{get:()=>e[o],enumerable:!(n=ts(e,o))||n.enumerable});return r};var Xe=(r,e,t)=>(t=r!=null?es(ns(r)):{},Zr(e||!r||!r.__esModule?We(t,"default",{value:r,enumerable:!0}):t,r)),ss=r=>Zr(We({},"__esModule",{value:!0}),r);var rn=Z((qd,tn)=>{var ae=1e3,ce=ae*60,de=ce*60,ee=de*24,as=ee*7,cs=ee*365.25;tn.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return ds(r);if(t==="number"&&isFinite(r))return e.long?fs(r):ps(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function ds(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*cs;case"weeks":case"week":case"w":return t*as;case"days":case"day":case"d":return t*ee;case"hours":case"hour":case"hrs":case"hr":case"h":return t*de;case"minutes":case"minute":case"mins":case"min":case"m":return t*ce;case"seconds":case"second":case"secs":case"sec":case"s":return t*ae;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function ps(r){var e=Math.abs(r);return e>=ee?Math.round(r/ee)+"d":e>=de?Math.round(r/de)+"h":e>=ce?Math.round(r/ce)+"m":e>=ae?Math.round(r/ae)+"s":r+"ms"}function fs(r){var e=Math.abs(r);return e>=ee?Qe(r,e,ee,"day"):e>=de?Qe(r,e,de,"hour"):e>=ce?Qe(r,e,ce,"minute"):e>=ae?Qe(r,e,ae,"second"):r+" ms"}function Qe(r,e,t,n){var o=e>=t*1.5;return Math.round(r/t)+" "+n+(o?"s":"")}});var on=Z((Jd,nn)=>{function us(r){t.debug=t,t.default=t,t.coerce=h,t.disable=s,t.enable=o,t.enabled=i,t.humanize=rn(),t.destroy=I,Object.keys(r).forEach(d=>{t[d]=r[d]}),t.names=[],t.skips=[],t.formatters={};function e(d){let f=0;for(let w=0;w<d.length;w++)f=(f<<5)-f+d.charCodeAt(w),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(d){let f,w=null,P,c;function u(...v){if(!u.enabled)return;let m=u,g=Number(new Date),C=g-(f||g);m.diff=C,m.prev=f,m.curr=g,f=g,v[0]=t.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let b=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(A,x)=>{if(A==="%%")return"%";b++;let E=t.formatters[x];if(typeof E=="function"){let z=v[b];A=E.call(m,z),v.splice(b,1),b--}return A}),t.formatArgs.call(m,v),(m.log||t.log).apply(m,v)}return u.namespace=d,u.useColors=t.useColors(),u.color=t.selectColor(d),u.extend=n,u.destroy=t.destroy,Object.defineProperty(u,"enabled",{enumerable:!0,configurable:!1,get:()=>w!==null?w:(P!==t.namespaces&&(P=t.namespaces,c=t.enabled(d)),c),set:v=>{w=v}}),typeof t.init=="function"&&t.init(u),u}function n(d,f){let w=t(this.namespace+(typeof f>"u"?":":f)+d);return w.log=this.log,w}function o(d){t.save(d),t.namespaces=d,t.names=[],t.skips=[];let f,w=(typeof d=="string"?d:"").split(/[\s,]+/),P=w.length;for(f=0;f<P;f++)w[f]&&(d=w[f].replace(/\*/g,".*?"),d[0]==="-"?t.skips.push(new RegExp("^"+d.slice(1)+"$")):t.names.push(new RegExp("^"+d+"$")))}function s(){let d=[...t.names.map(a),...t.skips.map(a).map(f=>"-"+f)].join(",");return t.enable(""),d}function i(d){if(d[d.length-1]==="*")return!0;let f,w;for(f=0,w=t.skips.length;f<w;f++)if(t.skips[f].test(d))return!1;for(f=0,w=t.names.length;f<w;f++)if(t.names[f].test(d))return!0;return!1}function a(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function h(d){return d instanceof Error?d.stack||d.message:d}function I(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}nn.exports=us});var sn=Z((k,He)=>{k.formatArgs=hs;k.save=ms;k.load=bs;k.useColors=ls;k.storage=ws();k.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();k.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ls(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function hs(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+He.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,n=0;r[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(t++,o==="%c"&&(n=t))}),r.splice(n,0,e)}k.log=console.debug||console.log||(()=>{});function ms(r){try{r?k.storage.setItem("debug",r):k.storage.removeItem("debug")}catch{}}function bs(){let r;try{r=k.storage.getItem("debug")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}function ws(){try{return localStorage}catch{}}He.exports=on()(k);var{formatters:gs}=He.exports;gs.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var ho=Z((Kf,lo)=>{lo.exports=yr;var uo=128,gc=127,xc=~gc,yc=Math.pow(2,31);function yr(r,e,t){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw yr.bytes=0,new RangeError("Could not encode varint");e=e||[],t=t||0;for(var n=t;r>=yc;)e[t++]=r&255|uo,r/=128;for(;r&xc;)e[t++]=r&255|uo,r>>>=7;return e[t]=r|0,yr.bytes=t-n+1,e}});var wo=Z((Qf,bo)=>{bo.exports=vr;var vc=128,mo=127;function vr(r,n){var t=0,n=n||0,o=0,s=n,i,a=r.length;do{if(s>=a||o>49)throw vr.bytes=0,new RangeError("Could not decode varint");i=r[s++],t+=o<28?(i&mo)<<o:(i&mo)*Math.pow(2,o),o+=7}while(i>=vc);return vr.bytes=s-n,t}});var xo=Z((Hf,go)=>{var Cc=Math.pow(2,7),Sc=Math.pow(2,14),Ec=Math.pow(2,21),Ac=Math.pow(2,28),Ic=Math.pow(2,35),Tc=Math.pow(2,42),Dc=Math.pow(2,49),Uc=Math.pow(2,56),Fc=Math.pow(2,63);go.exports=function(r){return r<Cc?1:r<Sc?2:r<Ec?3:r<Ac?4:r<Ic?5:r<Tc?6:r<Dc?7:r<Uc?8:r<Fc?9:10}});var ct=Z((Yf,yo)=>{yo.exports={encode:ho(),decode:wo(),encodingLength:xo()}});var Rd={};y(Rd,{bootstrap:()=>Ld});var Ke=class extends EventTarget{#e=new Map;listenerCount(e){let t=this.#e.get(e);return t==null?0:t.length}addEventListener(e,t,n){super.addEventListener(e,t,n);let o=this.#e.get(e);o==null&&(o=[],this.#e.set(e,o)),o.push({callback:t,once:(n!==!0&&n!==!1&&n?.once)??!1})}removeEventListener(e,t,n){super.removeEventListener(e.toString(),t??null,n);let o=this.#e.get(e);o!=null&&(o=o.filter(({callback:s})=>s!==t),this.#e.set(e,o))}dispatchEvent(e){let t=super.dispatchEvent(e),n=this.#e.get(e.type);return n==null||(n=n.filter(({once:o})=>!o),this.#e.set(e.type,n)),t}safeDispatchEvent(e,t){return this.dispatchEvent(new is(e,t))}},yt=class extends Event{detail;constructor(e,t){super(e,t),this.detail=t?.detail}},is=globalThis.CustomEvent??yt;var en=Symbol.for("@libp2p/peer-discovery");var L=Xe(sn(),1);var At={};y(At,{base32:()=>W,base32hex:()=>Ts,base32hexpad:()=>Us,base32hexpadupper:()=>Fs,base32hexupper:()=>Ds,base32pad:()=>As,base32padupper:()=>Is,base32upper:()=>Es,base32z:()=>Ps});function xs(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var o=0;o<r.length;o++){var s=r.charAt(o),i=s.charCodeAt(0);if(t[i]!==255)throw new TypeError(s+" is ambiguous");t[i]=o}var a=r.length,h=r.charAt(0),I=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var u=0,v=0,m=0,g=c.length;m!==g&&c[m]===0;)m++,u++;for(var C=(g-m)*d+1>>>0,b=new Uint8Array(C);m!==g;){for(var S=c[m],A=0,x=C-1;(S!==0||A<v)&&x!==-1;x--,A++)S+=256*b[x]>>>0,b[x]=S%a>>>0,S=S/a>>>0;if(S!==0)throw new Error("Non-zero carry");v=A,m++}for(var E=C-v;E!==C&&b[E]===0;)E++;for(var z=h.repeat(u);E<C;++E)z+=r.charAt(b[E]);return z}function w(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var u=0;if(c[u]!==" "){for(var v=0,m=0;c[u]===h;)v++,u++;for(var g=(c.length-u)*I+1>>>0,C=new Uint8Array(g);c[u];){var b=t[c.charCodeAt(u)];if(b===255)return;for(var S=0,A=g-1;(b!==0||S<m)&&A!==-1;A--,S++)b+=a*C[A]>>>0,C[A]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");m=S,u++}if(c[u]!==" "){for(var x=g-m;x!==g&&C[x]===0;)x++;for(var E=new Uint8Array(v+(g-x)),z=v;x!==g;)E[z++]=C[x++];return E}}}function P(c){var u=w(c);if(u)return u;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:w,decode:P}}var ys=xs,vs=ys,an=vs;var _d=new Uint8Array(0);var cn=(r,e)=>{if(r===e)return!0;if(r.byteLength!==e.byteLength)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0},$=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};var dn=r=>new TextEncoder().encode(r),pn=r=>new TextDecoder().decode(r);var vt=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Ct=class{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return un(this,e)}},St=class{constructor(e){this.decoders=e}or(e){return un(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},un=(r,e)=>new St({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}}),Et=class{constructor(e,t,n,o){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=o,this.encoder=new vt(e,t,n),this.decoder=new Ct(e,t,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},pe=({name:r,prefix:e,encode:t,decode:n})=>new Et(r,e,t,n),_=({prefix:r,name:e,alphabet:t})=>{let{encode:n,decode:o}=an(t,e);return pe({prefix:r,name:e,encode:n,decode:s=>$(o(s))})},Cs=(r,e,t,n)=>{let o={};for(let d=0;d<e.length;++d)o[e[d]]=d;let s=r.length;for(;r[s-1]==="=";)--s;let i=new Uint8Array(s*t/8|0),a=0,h=0,I=0;for(let d=0;d<s;++d){let f=o[r[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);h=h<<t|f,a+=t,a>=8&&(a-=8,i[I++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError("Unexpected end of data");return i},Ss=(r,e,t)=>{let n=e[e.length-1]==="=",o=(1<<t)-1,s="",i=0,a=0;for(let h=0;h<r.length;++h)for(a=a<<8|r[h],i+=8;i>t;)i-=t,s+=e[o&a>>i];if(i&&(s+=e[o&a<<t-i]),n)for(;s.length*t&7;)s+="=";return s},D=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>pe({prefix:e,name:r,encode(o){return Ss(o,n,t)},decode(o){return Cs(o,n,t,r)}});var W=D({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Es=D({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),As=D({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Is=D({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Ts=D({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ds=D({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Us=D({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Fs=D({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ps=D({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var It={};y(It,{base58btc:()=>M,base58flickr:()=>Ns});var M=_({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ns=_({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Dt={};y(Dt,{base64:()=>Tt,base64pad:()=>zs,base64url:()=>Ms,base64urlpad:()=>Bs});var Tt=D({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),zs=D({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Ms=D({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Bs=D({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});L.default.formatters.b=r=>r==null?"undefined":M.baseEncode(r);L.default.formatters.t=r=>r==null?"undefined":W.baseEncode(r);L.default.formatters.m=r=>r==null?"undefined":Tt.baseEncode(r);L.default.formatters.p=r=>r==null?"undefined":r.toString();L.default.formatters.c=r=>r==null?"undefined":r.toString();L.default.formatters.k=r=>r==null?"undefined":r.toString();L.default.formatters.a=r=>r==null?"undefined":r.toString();function Os(r){let e=()=>{};return e.enabled=!1,e.color="",e.diff=0,e.log=()=>{},e.namespace=r,e.destroy=()=>!0,e.extend=()=>e,e}function ln(r){let e=Os(`${r}:trace`);return L.default.enabled(`${r}:trace`)&&L.default.names.map(t=>t.toString()).find(t=>t.includes(":trace"))!=null&&(e=(0,L.default)(`${r}:trace`)),Object.assign((0,L.default)(r),{error:(0,L.default)(`${r}:error`),trace:e})}var hn=Symbol.for("@libp2p/peer-id");var Ut={};y(Ut,{identity:()=>ks});var ks=pe({prefix:"\0",name:"identity",encode:r=>pn(r),decode:r=>dn(r)});var Ft={};y(Ft,{base2:()=>Ls});var Ls=D({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Pt={};y(Pt,{base8:()=>Rs});var Rs=D({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Nt={};y(Nt,{base10:()=>Vs});var Vs=_({prefix:"9",name:"base10",alphabet:"0123456789"});var zt={};y(zt,{base16:()=>$s,base16upper:()=>js});var $s=D({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),js=D({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Mt={};y(Mt,{base36:()=>qs,base36upper:()=>Js});var qs=_({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Js=_({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Bt={};y(Bt,{base256emoji:()=>Ks});var mn=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),Gs=mn.reduce((r,e,t)=>(r[t]=e,r),[]),_s=mn.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function Ws(r){return r.reduce((e,t)=>(e+=Gs[t],e),"")}function Xs(r){let e=[];for(let t of r){let n=_s[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}var Ks=pe({prefix:"\u{1F680}",name:"base256emoji",encode:Ws,decode:Xs});var Rt={};y(Rt,{sha256:()=>Ze,sha512:()=>hi});var Qs=gn,bn=128,Hs=127,Ys=~Hs,Zs=Math.pow(2,31);function gn(r,e,t){e=e||[],t=t||0;for(var n=t;r>=Zs;)e[t++]=r&255|bn,r/=128;for(;r&Ys;)e[t++]=r&255|bn,r>>>=7;return e[t]=r|0,gn.bytes=t-n+1,e}var ei=Ot,ti=128,wn=127;function Ot(r,n){var t=0,n=n||0,o=0,s=n,i,a=r.length;do{if(s>=a)throw Ot.bytes=0,new RangeError("Could not decode varint");i=r[s++],t+=o<28?(i&wn)<<o:(i&wn)*Math.pow(2,o),o+=7}while(i>=ti);return Ot.bytes=s-n,t}var ri=Math.pow(2,7),ni=Math.pow(2,14),oi=Math.pow(2,21),si=Math.pow(2,28),ii=Math.pow(2,35),ai=Math.pow(2,42),ci=Math.pow(2,49),di=Math.pow(2,56),pi=Math.pow(2,63),fi=function(r){return r<ri?1:r<ni?2:r<oi?3:r<si?4:r<ii?5:r<ai?6:r<ci?7:r<di?8:r<pi?9:10},ui={encode:Qs,decode:ei,encodingLength:fi},li=ui,Fe=li;var Pe=(r,e=0)=>[Fe.decode(r,e),Fe.decode.bytes],fe=(r,e,t=0)=>(Fe.encode(r,e,t),e),ue=r=>Fe.encodingLength(r);var X=(r,e)=>{let t=e.byteLength,n=ue(r),o=n+ue(t),s=new Uint8Array(o+t);return fe(r,s,0),fe(t,s,n),s.set(e,o),new le(r,t,e,s)},Ne=r=>{let e=$(r),[t,n]=Pe(e),[o,s]=Pe(e.subarray(n)),i=e.subarray(n+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new le(t,o,i,e)},xn=(r,e)=>{if(r===e)return!0;{let t=e;return r.code===t.code&&r.size===t.size&&t.bytes instanceof Uint8Array&&cn(r.bytes,t.bytes)}},le=class{constructor(e,t,n,o){this.code=e,this.size=t,this.digest=n,this.bytes=o}};var Lt=({name:r,code:e,encode:t})=>new kt(r,e,t),kt=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?X(this.code,t):t.then(n=>X(this.code,n))}else throw Error("Unknown type, must be binary type")}};var vn=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),Ze=Lt({name:"sha2-256",code:18,encode:vn("SHA-256")}),hi=Lt({name:"sha2-512",code:19,encode:vn("SHA-512")});var Vt={};y(Vt,{identity:()=>et});var Cn=0,mi="identity",Sn=$,bi=r=>X(Cn,Sn(r)),et={code:Cn,name:mi,encode:Sn,digest:bi};var xp=new TextEncoder,yp=new TextDecoder;var En=(r,e)=>{let{bytes:t,version:n}=r;switch(n){case 0:return yi(t,$t(r),e||M.encoder);default:return vi(t,$t(r),e||W.encoder)}};var An=new WeakMap,$t=r=>{let e=An.get(r);if(e==null){let t=new Map;return An.set(r,t),t}return e},te=class r{constructor(e,t,n,o){this.code=t,this.version=e,this.multihash=n,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:e,multihash:t}=this;if(e!==ze)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==Ci)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return r.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,n=X(e,t);return r.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(e){return r.equals(this,e)}static equals(e,t){let n=t;return n&&e.code===n.code&&e.version===n.version&&xn(e.multihash,n.multihash)}toString(e){return En(this,e)}toJSON(){return{"/":En(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(e){if(e==null)return null;let t=e;if(t instanceof r)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){let{version:n,code:o,multihash:s,bytes:i}=t;return new r(n,o,s,i||In(n,o,s.bytes))}else if(t[Si]===!0){let{version:n,multihash:o,code:s}=t,i=Ne(o);return r.create(n,s,i)}else return null}static create(e,t,n){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(n.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:{if(t!==ze)throw new Error(`Version 0 CID must use dag-pb (code: ${ze}) block encoding`);return new r(e,t,n,n.bytes)}case 1:{let o=In(e,t,n.bytes);return new r(e,t,n,o)}default:throw new Error("Invalid version")}}static createV0(e){return r.create(0,ze,e)}static createV1(e,t){return r.create(1,e,t)}static decode(e){let[t,n]=r.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return t}static decodeFirst(e){let t=r.inspectBytes(e),n=t.size-t.multihashSize,o=$(e.subarray(n,n+t.multihashSize));if(o.byteLength!==t.multihashSize)throw new Error("Incorrect length");let s=o.subarray(t.multihashSize-t.digestSize),i=new le(t.multihashCode,t.digestSize,s,o);return[t.version===0?r.createV0(i):r.createV1(t.codec,i),e.subarray(t.size)]}static inspectBytes(e){let t=0,n=()=>{let[f,w]=Pe(e.subarray(t));return t+=w,f},o=n(),s=ze;if(o===18?(o=0,t=0):s=n(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);let i=t,a=n(),h=n(),I=t+h,d=I-i;return{version:o,codec:s,multihashCode:a,digestSize:h,multihashSize:d,size:I}}static parse(e,t){let[n,o]=xi(e,t),s=r.decode(o);if(s.version===0&&e[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return $t(s).set(n,e),s}},xi=(r,e)=>{switch(r[0]){case"Q":{let t=e||M;return[M.prefix,t.decode(`${M.prefix}${r}`)]}case M.prefix:{let t=e||M;return[M.prefix,t.decode(r)]}case W.prefix:{let t=e||W;return[W.prefix,t.decode(r)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],e.decode(r)]}}},yi=(r,e,t)=>{let{prefix:n}=t;if(n!==M.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);let o=e.get(n);if(o==null){let s=t.encode(r).slice(1);return e.set(n,s),s}else return o},vi=(r,e,t)=>{let{prefix:n}=t,o=e.get(n);if(o==null){let s=t.encode(r);return e.set(n,s),s}else return o},ze=112,Ci=18,In=(r,e,t)=>{let n=ue(r),o=n+ue(e),s=new Uint8Array(o+t.byteLength);return fe(r,s,0),fe(e,s,n),s.set(t,o),s},Si=Symbol.for("@ipld/js-cid/CID");var jt={...Ut,...Ft,...Pt,...Nt,...zt,...At,...Mt,...It,...Dt,...Bt},Fp={...Rt,...Vt};function Me(r,e){if(r===e)return!0;if(r.byteLength!==e.byteLength)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0}var Ei=Symbol.for("nodejs.util.inspect.custom"),Tn=Object.values(jt).map(r=>r.decoder).reduce((r,e)=>r.or(e),jt.identity.decoder),Dn=114,Un=36,Fn=37,Be=class{type;multihash;privateKey;publicKey;string;constructor(e){this.type=e.type,this.multihash=e.multihash,this.privateKey=e.privateKey,Object.defineProperty(this,"string",{enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return`PeerId(${this.toString()})`}[hn]=!0;toString(){return this.string==null&&(this.string=M.encode(this.multihash.bytes).slice(1)),this.string}toCID(){return te.createV1(Dn,this.multihash)}toBytes(){return this.multihash.bytes}toJSON(){return this.toString()}equals(e){if(e instanceof Uint8Array)return Me(this.multihash.bytes,e);if(typeof e=="string")return qt(e).equals(this);if(e?.multihash?.bytes!=null)return Me(this.multihash.bytes,e.multihash.bytes);throw new Error("not valid Id")}[Ei](){return`PeerId(${this.toString()})`}},Oe=class extends Be{type="RSA";publicKey;constructor(e){super({...e,type:"RSA"}),this.publicKey=e.publicKey}},ke=class extends Be{type="Ed25519";publicKey;constructor(e){super({...e,type:"Ed25519"}),this.publicKey=e.multihash.digest}},Le=class extends Be{type="secp256k1";publicKey;constructor(e){super({...e,type:"secp256k1"}),this.publicKey=e.multihash.digest}};function qt(r,e){if(e=e??Tn,r.charAt(0)==="1"||r.charAt(0)==="Q"){let t=Ne(M.decode(`z${r}`));return r.startsWith("12D")?new ke({multihash:t}):r.startsWith("16U")?new Le({multihash:t}):new Oe({multihash:t})}return Ai(Tn.decode(r))}function Ai(r){try{let e=Ne(r);if(e.code===et.code){if(e.digest.length===Un)return new ke({multihash:e});if(e.digest.length===Fn)return new Le({multihash:e})}if(e.code===Ze.code)return new Oe({multihash:e})}catch{return Ii(te.decode(r))}throw new Error("Supplied PeerID CID is invalid")}function Ii(r){if(r==null||r.multihash==null||r.version==null||r.version===1&&r.code!==Dn)throw new Error("Supplied PeerID CID is invalid");let e=r.multihash;if(e.code===Ze.code)return new Oe({multihash:r.multihash});if(e.code===et.code){if(e.digest.length===Un)return new ke({multihash:r.multihash});if(e.digest.length===Fn)return new Le({multihash:r.multihash})}throw new Error("Supplied PeerID CID is invalid")}var tt=class extends Error{code;props;constructor(e,t,n){super(e),this.code=t,this.name=n?.name??"CodeError",this.props=n??{}}};var Xt={};y(Xt,{base58btc:()=>B,base58flickr:()=>Ni});function Ti(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var o=0;o<r.length;o++){var s=r.charAt(o),i=s.charCodeAt(0);if(t[i]!==255)throw new TypeError(s+" is ambiguous");t[i]=o}var a=r.length,h=r.charAt(0),I=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var u=0,v=0,m=0,g=c.length;m!==g&&c[m]===0;)m++,u++;for(var C=(g-m)*d+1>>>0,b=new Uint8Array(C);m!==g;){for(var S=c[m],A=0,x=C-1;(S!==0||A<v)&&x!==-1;x--,A++)S+=256*b[x]>>>0,b[x]=S%a>>>0,S=S/a>>>0;if(S!==0)throw new Error("Non-zero carry");v=A,m++}for(var E=C-v;E!==C&&b[E]===0;)E++;for(var z=h.repeat(u);E<C;++E)z+=r.charAt(b[E]);return z}function w(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var u=0;if(c[u]!==" "){for(var v=0,m=0;c[u]===h;)v++,u++;for(var g=(c.length-u)*I+1>>>0,C=new Uint8Array(g);c[u];){var b=t[c.charCodeAt(u)];if(b===255)return;for(var S=0,A=g-1;(b!==0||S<m)&&A!==-1;A--,S++)b+=a*C[A]>>>0,C[A]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");m=S,u++}if(c[u]!==" "){for(var x=g-m;x!==g&&C[x]===0;)x++;for(var E=new Uint8Array(v+(g-x)),z=v;x!==g;)E[z++]=C[x++];return E}}}function P(c){var u=w(c);if(u)return u;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:w,decode:P}}var Di=Ti,Ui=Di,Pn=Ui;var Gp=new Uint8Array(0);var Nn=(r,e)=>{if(r===e)return!0;if(r.byteLength!==e.byteLength)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0},j=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};var zn=r=>new TextEncoder().encode(r),Mn=r=>new TextDecoder().decode(r);var Jt=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Gt=class{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return On(this,e)}},_t=class{constructor(e){this.decoders=e}or(e){return On(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},On=(r,e)=>new _t({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}}),Wt=class{constructor(e,t,n,o){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=o,this.encoder=new Jt(e,t,n),this.decoder=new Gt(e,t,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},me=({name:r,prefix:e,encode:t,decode:n})=>new Wt(r,e,t,n),K=({prefix:r,name:e,alphabet:t})=>{let{encode:n,decode:o}=Pn(t,e);return me({prefix:r,name:e,encode:n,decode:s=>j(o(s))})},Fi=(r,e,t,n)=>{let o={};for(let d=0;d<e.length;++d)o[e[d]]=d;let s=r.length;for(;r[s-1]==="=";)--s;let i=new Uint8Array(s*t/8|0),a=0,h=0,I=0;for(let d=0;d<s;++d){let f=o[r[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);h=h<<t|f,a+=t,a>=8&&(a-=8,i[I++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError("Unexpected end of data");return i},Pi=(r,e,t)=>{let n=e[e.length-1]==="=",o=(1<<t)-1,s="",i=0,a=0;for(let h=0;h<r.length;++h)for(a=a<<8|r[h],i+=8;i>t;)i-=t,s+=e[o&a>>i];if(i&&(s+=e[o&a<<t-i]),n)for(;s.length*t&7;)s+="=";return s},U=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>me({prefix:e,name:r,encode(o){return Pi(o,n,t)},decode(o){return Fi(o,n,t,r)}});var B=K({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ni=K({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var zi=Rn,kn=128,Mi=127,Bi=~Mi,Oi=Math.pow(2,31);function Rn(r,e,t){e=e||[],t=t||0;for(var n=t;r>=Oi;)e[t++]=r&255|kn,r/=128;for(;r&Bi;)e[t++]=r&255|kn,r>>>=7;return e[t]=r|0,Rn.bytes=t-n+1,e}var ki=Kt,Li=128,Ln=127;function Kt(r,n){var t=0,n=n||0,o=0,s=n,i,a=r.length;do{if(s>=a)throw Kt.bytes=0,new RangeError("Could not decode varint");i=r[s++],t+=o<28?(i&Ln)<<o:(i&Ln)*Math.pow(2,o),o+=7}while(i>=Li);return Kt.bytes=s-n,t}var Ri=Math.pow(2,7),Vi=Math.pow(2,14),$i=Math.pow(2,21),ji=Math.pow(2,28),qi=Math.pow(2,35),Ji=Math.pow(2,42),Gi=Math.pow(2,49),_i=Math.pow(2,56),Wi=Math.pow(2,63),Xi=function(r){return r<Ri?1:r<Vi?2:r<$i?3:r<ji?4:r<qi?5:r<Ji?6:r<Gi?7:r<_i?8:r<Wi?9:10},Ki={encode:zi,decode:ki,encodingLength:Xi},Qi=Ki,Re=Qi;var Ve=(r,e=0)=>[Re.decode(r,e),Re.decode.bytes],be=(r,e,t=0)=>(Re.encode(r,e,t),e),we=r=>Re.encodingLength(r);var re=(r,e)=>{let t=e.byteLength,n=we(r),o=n+we(t),s=new Uint8Array(o+t);return be(r,s,0),be(t,s,n),s.set(e,o),new ge(r,t,e,s)},nt=r=>{let e=j(r),[t,n]=Ve(e),[o,s]=Ve(e.subarray(n)),i=e.subarray(n+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new ge(t,o,i,e)},Vn=(r,e)=>{if(r===e)return!0;{let t=e;return r.code===t.code&&r.size===t.size&&t.bytes instanceof Uint8Array&&Nn(r.bytes,t.bytes)}},ge=class{constructor(e,t,n,o){this.code=e,this.size=t,this.digest=n,this.bytes=o}};var Qt={};y(Qt,{base32:()=>q,base32hex:()=>ea,base32hexpad:()=>ra,base32hexpadupper:()=>na,base32hexupper:()=>ta,base32pad:()=>Yi,base32padupper:()=>Zi,base32upper:()=>Hi,base32z:()=>oa});var q=U({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Hi=U({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Yi=U({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Zi=U({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ea=U({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),ta=U({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),ra=U({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),na=U({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),oa=U({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var $n=(r,e)=>{let{bytes:t,version:n}=r;switch(n){case 0:return ia(t,Ht(r),e||B.encoder);default:return aa(t,Ht(r),e||q.encoder)}};var jn=new WeakMap,Ht=r=>{let e=jn.get(r);if(e==null){let t=new Map;return jn.set(r,t),t}return e},Q=class r{constructor(e,t,n,o){this.code=t,this.version=e,this.multihash=n,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:e,multihash:t}=this;if(e!==$e)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==ca)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return r.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,n=re(e,t);return r.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(e){return r.equals(this,e)}static equals(e,t){let n=t;return n&&e.code===n.code&&e.version===n.version&&Vn(e.multihash,n.multihash)}toString(e){return $n(this,e)}toJSON(){return{"/":$n(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(e){if(e==null)return null;let t=e;if(t instanceof r)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){let{version:n,code:o,multihash:s,bytes:i}=t;return new r(n,o,s,i||qn(n,o,s.bytes))}else if(t[da]===!0){let{version:n,multihash:o,code:s}=t,i=nt(o);return r.create(n,s,i)}else return null}static create(e,t,n){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(n.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:{if(t!==$e)throw new Error(`Version 0 CID must use dag-pb (code: ${$e}) block encoding`);return new r(e,t,n,n.bytes)}case 1:{let o=qn(e,t,n.bytes);return new r(e,t,n,o)}default:throw new Error("Invalid version")}}static createV0(e){return r.create(0,$e,e)}static createV1(e,t){return r.create(1,e,t)}static decode(e){let[t,n]=r.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return t}static decodeFirst(e){let t=r.inspectBytes(e),n=t.size-t.multihashSize,o=j(e.subarray(n,n+t.multihashSize));if(o.byteLength!==t.multihashSize)throw new Error("Incorrect length");let s=o.subarray(t.multihashSize-t.digestSize),i=new ge(t.multihashCode,t.digestSize,s,o);return[t.version===0?r.createV0(i):r.createV1(t.codec,i),e.subarray(t.size)]}static inspectBytes(e){let t=0,n=()=>{let[f,w]=Ve(e.subarray(t));return t+=w,f},o=n(),s=$e;if(o===18?(o=0,t=0):s=n(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);let i=t,a=n(),h=n(),I=t+h,d=I-i;return{version:o,codec:s,multihashCode:a,digestSize:h,multihashSize:d,size:I}}static parse(e,t){let[n,o]=sa(e,t),s=r.decode(o);if(s.version===0&&e[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return Ht(s).set(n,e),s}},sa=(r,e)=>{switch(r[0]){case"Q":{let t=e||B;return[B.prefix,t.decode(`${B.prefix}${r}`)]}case B.prefix:{let t=e||B;return[B.prefix,t.decode(r)]}case q.prefix:{let t=e||q;return[q.prefix,t.decode(r)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],e.decode(r)]}}},ia=(r,e,t)=>{let{prefix:n}=t;if(n!==B.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);let o=e.get(n);if(o==null){let s=t.encode(r).slice(1);return e.set(n,s),s}else return o},aa=(r,e,t)=>{let{prefix:n}=t,o=e.get(n);if(o==null){let s=t.encode(r);return e.set(n,s),s}else return o},$e=112,ca=18,qn=(r,e,t)=>{let n=we(r),o=n+we(e),s=new Uint8Array(o+t.byteLength);return be(r,s,0),be(e,s,n),s.set(t,o),s},da=Symbol.for("@ipld/js-cid/CID");var rr={};y(rr,{identity:()=>ma});function pa(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var o=0;o<r.length;o++){var s=r.charAt(o),i=s.charCodeAt(0);if(t[i]!==255)throw new TypeError(s+" is ambiguous");t[i]=o}var a=r.length,h=r.charAt(0),I=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var u=0,v=0,m=0,g=c.length;m!==g&&c[m]===0;)m++,u++;for(var C=(g-m)*d+1>>>0,b=new Uint8Array(C);m!==g;){for(var S=c[m],A=0,x=C-1;(S!==0||A<v)&&x!==-1;x--,A++)S+=256*b[x]>>>0,b[x]=S%a>>>0,S=S/a>>>0;if(S!==0)throw new Error("Non-zero carry");v=A,m++}for(var E=C-v;E!==C&&b[E]===0;)E++;for(var z=h.repeat(u);E<C;++E)z+=r.charAt(b[E]);return z}function w(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var u=0;if(c[u]!==" "){for(var v=0,m=0;c[u]===h;)v++,u++;for(var g=(c.length-u)*I+1>>>0,C=new Uint8Array(g);c[u];){var b=t[c.charCodeAt(u)];if(b===255)return;for(var S=0,A=g-1;(b!==0||S<m)&&A!==-1;A--,S++)b+=a*C[A]>>>0,C[A]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");m=S,u++}if(c[u]!==" "){for(var x=g-m;x!==g&&C[x]===0;)x++;for(var E=new Uint8Array(v+(g-x)),z=v;x!==g;)E[z++]=C[x++];return E}}}function P(c){var u=w(c);if(u)return u;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:w,decode:P}}var fa=pa,ua=fa,Jn=ua;var af=new Uint8Array(0);var Gn=(r,e)=>{if(r===e)return!0;if(r.byteLength!==e.byteLength)return!1;for(let t=0;t<r.byteLength;t++)if(r[t]!==e[t])return!1;return!0},J=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};var _n=r=>new TextEncoder().encode(r),Wn=r=>new TextDecoder().decode(r);var Yt=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Zt=class{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Kn(this,e)}},er=class{constructor(e){this.decoders=e}or(e){return Kn(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},Kn=(r,e)=>new er({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}}),tr=class{constructor(e,t,n,o){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=o,this.encoder=new Yt(e,t,n),this.decoder=new Zt(e,t,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},ye=({name:r,prefix:e,encode:t,decode:n})=>new tr(r,e,t,n),H=({prefix:r,name:e,alphabet:t})=>{let{encode:n,decode:o}=Jn(t,e);return ye({prefix:r,name:e,encode:n,decode:s=>J(o(s))})},la=(r,e,t,n)=>{let o={};for(let d=0;d<e.length;++d)o[e[d]]=d;let s=r.length;for(;r[s-1]==="=";)--s;let i=new Uint8Array(s*t/8|0),a=0,h=0,I=0;for(let d=0;d<s;++d){let f=o[r[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);h=h<<t|f,a+=t,a>=8&&(a-=8,i[I++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError("Unexpected end of data");return i},ha=(r,e,t)=>{let n=e[e.length-1]==="=",o=(1<<t)-1,s="",i=0,a=0;for(let h=0;h<r.length;++h)for(a=a<<8|r[h],i+=8;i>t;)i-=t,s+=e[o&a>>i];if(i&&(s+=e[o&a<<t-i]),n)for(;s.length*t&7;)s+="=";return s},F=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>ye({prefix:e,name:r,encode(o){return ha(o,n,t)},decode(o){return la(o,n,t,r)}});var ma=ye({prefix:"\0",name:"identity",encode:r=>Wn(r),decode:r=>_n(r)});var nr={};y(nr,{base2:()=>ba});var ba=F({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var or={};y(or,{base8:()=>wa});var wa=F({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var sr={};y(sr,{base10:()=>ga});var ga=H({prefix:"9",name:"base10",alphabet:"0123456789"});var ir={};y(ir,{base16:()=>xa,base16upper:()=>ya});var xa=F({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ya=F({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var ar={};y(ar,{base32:()=>ve,base32hex:()=>Ea,base32hexpad:()=>Ia,base32hexpadupper:()=>Ta,base32hexupper:()=>Aa,base32pad:()=>Ca,base32padupper:()=>Sa,base32upper:()=>va,base32z:()=>Da});var ve=F({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),va=F({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Ca=F({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Sa=F({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Ea=F({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Aa=F({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Ia=F({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ta=F({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Da=F({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var cr={};y(cr,{base36:()=>Ua,base36upper:()=>Fa});var Ua=H({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Fa=H({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var dr={};y(dr,{base58btc:()=>R,base58flickr:()=>Pa});var R=H({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Pa=H({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var pr={};y(pr,{base64:()=>Na,base64pad:()=>za,base64url:()=>Ma,base64urlpad:()=>Ba});var Na=F({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),za=F({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Ma=F({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ba=F({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var fr={};y(fr,{base256emoji:()=>Va});var Qn=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),Oa=Qn.reduce((r,e,t)=>(r[t]=e,r),[]),ka=Qn.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function La(r){return r.reduce((e,t)=>(e+=Oa[t],e),"")}function Ra(r){let e=[];for(let t of r){let n=ka[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}var Va=ye({prefix:"\u{1F680}",name:"base256emoji",encode:La,decode:Ra});var mr={};y(mr,{sha256:()=>sc,sha512:()=>ic});var $a=Zn,Hn=128,ja=127,qa=~ja,Ja=Math.pow(2,31);function Zn(r,e,t){e=e||[],t=t||0;for(var n=t;r>=Ja;)e[t++]=r&255|Hn,r/=128;for(;r&qa;)e[t++]=r&255|Hn,r>>>=7;return e[t]=r|0,Zn.bytes=t-n+1,e}var Ga=ur,_a=128,Yn=127;function ur(r,n){var t=0,n=n||0,o=0,s=n,i,a=r.length;do{if(s>=a)throw ur.bytes=0,new RangeError("Could not decode varint");i=r[s++],t+=o<28?(i&Yn)<<o:(i&Yn)*Math.pow(2,o),o+=7}while(i>=_a);return ur.bytes=s-n,t}var Wa=Math.pow(2,7),Xa=Math.pow(2,14),Ka=Math.pow(2,21),Qa=Math.pow(2,28),Ha=Math.pow(2,35),Ya=Math.pow(2,42),Za=Math.pow(2,49),ec=Math.pow(2,56),tc=Math.pow(2,63),rc=function(r){return r<Wa?1:r<Xa?2:r<Ka?3:r<Qa?4:r<Ha?5:r<Ya?6:r<Za?7:r<ec?8:r<tc?9:10},nc={encode:$a,decode:Ga,encodingLength:rc},oc=nc,je=oc;var qe=(r,e=0)=>[je.decode(r,e),je.decode.bytes],Ce=(r,e,t=0)=>(je.encode(r,e,t),e),Se=r=>je.encodingLength(r);var ne=(r,e)=>{let t=e.byteLength,n=Se(r),o=n+Se(t),s=new Uint8Array(o+t);return Ce(r,s,0),Ce(t,s,n),s.set(e,o),new Ee(r,t,e,s)},eo=r=>{let e=J(r),[t,n]=qe(e),[o,s]=qe(e.subarray(n)),i=e.subarray(n+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new Ee(t,o,i,e)},to=(r,e)=>{if(r===e)return!0;{let t=e;return r.code===t.code&&r.size===t.size&&t.bytes instanceof Uint8Array&&Gn(r.bytes,t.bytes)}},Ee=class{constructor(e,t,n,o){this.code=e,this.size=t,this.digest=n,this.bytes=o}};var hr=({name:r,code:e,encode:t})=>new lr(r,e,t),lr=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?ne(this.code,t):t.then(n=>ne(this.code,n))}else throw Error("Unknown type, must be binary type")}};var no=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),sc=hr({name:"sha2-256",code:18,encode:no("SHA-256")}),ic=hr({name:"sha2-512",code:19,encode:no("SHA-512")});var br={};y(br,{identity:()=>dc});var oo=0,ac="identity",so=J,cc=r=>ne(oo,so(r)),dc={code:oo,name:ac,encode:so,digest:cc};var Df=new TextEncoder,Uf=new TextDecoder;var io=(r,e)=>{let{bytes:t,version:n}=r;switch(n){case 0:return lc(t,wr(r),e||R.encoder);default:return hc(t,wr(r),e||ve.encoder)}};var ao=new WeakMap,wr=r=>{let e=ao.get(r);if(e==null){let t=new Map;return ao.set(r,t),t}return e},st=class r{constructor(e,t,n,o){this.code=t,this.version=e,this.multihash=n,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:e,multihash:t}=this;if(e!==Ge)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==mc)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return r.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,n=ne(e,t);return r.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(e){return r.equals(this,e)}static equals(e,t){let n=t;return n&&e.code===n.code&&e.version===n.version&&to(e.multihash,n.multihash)}toString(e){return io(this,e)}toJSON(){return{"/":io(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(e){if(e==null)return null;let t=e;if(t instanceof r)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){let{version:n,code:o,multihash:s,bytes:i}=t;return new r(n,o,s,i||co(n,o,s.bytes))}else if(t[bc]===!0){let{version:n,multihash:o,code:s}=t,i=eo(o);return r.create(n,s,i)}else return null}static create(e,t,n){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(n.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:{if(t!==Ge)throw new Error(`Version 0 CID must use dag-pb (code: ${Ge}) block encoding`);return new r(e,t,n,n.bytes)}case 1:{let o=co(e,t,n.bytes);return new r(e,t,n,o)}default:throw new Error("Invalid version")}}static createV0(e){return r.create(0,Ge,e)}static createV1(e,t){return r.create(1,e,t)}static decode(e){let[t,n]=r.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return t}static decodeFirst(e){let t=r.inspectBytes(e),n=t.size-t.multihashSize,o=J(e.subarray(n,n+t.multihashSize));if(o.byteLength!==t.multihashSize)throw new Error("Incorrect length");let s=o.subarray(t.multihashSize-t.digestSize),i=new Ee(t.multihashCode,t.digestSize,s,o);return[t.version===0?r.createV0(i):r.createV1(t.codec,i),e.subarray(t.size)]}static inspectBytes(e){let t=0,n=()=>{let[f,w]=qe(e.subarray(t));return t+=w,f},o=n(),s=Ge;if(o===18?(o=0,t=0):s=n(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);let i=t,a=n(),h=n(),I=t+h,d=I-i;return{version:o,codec:s,multihashCode:a,digestSize:h,multihashSize:d,size:I}}static parse(e,t){let[n,o]=uc(e,t),s=r.decode(o);if(s.version===0&&e[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return wr(s).set(n,e),s}},uc=(r,e)=>{switch(r[0]){case"Q":{let t=e||R;return[R.prefix,t.decode(`${R.prefix}${r}`)]}case R.prefix:{let t=e||R;return[R.prefix,t.decode(r)]}case ve.prefix:{let t=e||ve;return[ve.prefix,t.decode(r)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],e.decode(r)]}}},lc=(r,e,t)=>{let{prefix:n}=t;if(n!==R.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);let o=e.get(n);if(o==null){let s=t.encode(r).slice(1);return e.set(n,s),s}else return o},hc=(r,e,t)=>{let{prefix:n}=t,o=e.get(n);if(o==null){let s=t.encode(r);return e.set(n,s),s}else return o},Ge=112,mc=18,co=(r,e,t)=>{let n=Se(r),o=n+Se(e),s=new Uint8Array(o+t.byteLength);return Ce(r,s,0),Ce(e,s,n),s.set(t,o),s},bc=Symbol.for("@ipld/js-cid/CID");var gr={...rr,...nr,...or,...sr,...ir,...ar,...cr,...dr,...pr,...fr},Rf={...mr,...br};function Ae(r){return globalThis.Buffer!=null?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function it(r=0){return globalThis.Buffer?.allocUnsafe!=null?Ae(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}function fo(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}var po=fo("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),xr=fo("ascii","a",r=>{let e="a";for(let t=0;t<r.length;t++)e+=String.fromCharCode(r[t]);return e},r=>{r=r.substring(1);let e=it(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e}),wc={utf8:po,"utf-8":po,hex:gr.base16,latin1:xr,ascii:xr,binary:xr,...gr},at=wc;function O(r,e="utf8"){let t=at[e];if(t==null)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(r.buffer,r.byteOffset,r.byteLength).toString("utf8"):t.encoder.encode(r).substring(1)}var _r=Xe(ct(),1);function G(r,e){e==null&&(e=r.reduce((o,s)=>o+s.length,0));let t=it(e),n=0;for(let o of r)t.set(o,n),n+=o.length;return Ae(t)}var Te=Xe(ct(),1);var dt=class{index=0;input="";new(e){return this.index=0,this.input=e,this}readAtomically(e){let t=this.index,n=e();return n===void 0&&(this.index=t),n}parseWith(e){let t=e();if(this.index===this.input.length)return t}peekChar(){if(!(this.index>=this.input.length))return this.input[this.index]}readChar(){if(!(this.index>=this.input.length))return this.input[this.index++]}readGivenChar(e){return this.readAtomically(()=>{let t=this.readChar();if(t===e)return t})}readSeparator(e,t,n){return this.readAtomically(()=>{if(!(t>0&&this.readGivenChar(e)===void 0))return n()})}readNumber(e,t,n,o){return this.readAtomically(()=>{let s=0,i=0,a=this.peekChar();if(a===void 0)return;let h=a==="0",I=2**(8*o)-1;for(;;){let d=this.readAtomically(()=>{let f=this.readChar();if(f===void 0)return;let w=Number.parseInt(f,e);if(!Number.isNaN(w))return w});if(d===void 0)break;if(s*=e,s+=d,s>I||(i+=1,t!==void 0&&i>t))return}if(i!==0)return!n&&h&&i>1?void 0:s})}readIPv4Addr(){return this.readAtomically(()=>{let e=new Uint8Array(4);for(let t=0;t<e.length;t++){let n=this.readSeparator(".",t,()=>this.readNumber(10,3,!1,1));if(n===void 0)return;e[t]=n}return e})}readIPv6Addr(){let e=t=>{for(let n=0;n<t.length/2;n++){let o=n*2;if(n<t.length-3){let i=this.readSeparator(":",n,()=>this.readIPv4Addr());if(i!==void 0)return t[o]=i[0],t[o+1]=i[1],t[o+2]=i[2],t[o+3]=i[3],[o+4,!0]}let s=this.readSeparator(":",n,()=>this.readNumber(16,4,!0,2));if(s===void 0)return[o,!1];t[o]=s>>8,t[o+1]=s&255}return[t.length,!1]};return this.readAtomically(()=>{let t=new Uint8Array(16),[n,o]=e(t);if(n===16)return t;if(o||this.readGivenChar(":")===void 0||this.readGivenChar(":")===void 0)return;let s=new Uint8Array(14),i=16-(n+2),[a]=e(s.subarray(0,i));return t.set(s.subarray(0,a),16-a),t})}readIPAddr(){return this.readIPv4Addr()??this.readIPv6Addr()}};var vo=45,Pc=15,Ie=new dt;function Cr(r){if(!(r.length>Pc))return Ie.new(r).parseWith(()=>Ie.readIPv4Addr())}function Sr(r){if(!(r.length>vo))return Ie.new(r).parseWith(()=>Ie.readIPv6Addr())}function pt(r){if(!(r.length>vo))return Ie.new(r).parseWith(()=>Ie.readIPAddr())}var fu=parseInt("0xFFFF",16),uu=new Uint8Array([0,0,0,0,0,0,0,0,0,0,255,255]);var Er={};y(Er,{identity:()=>Oc});var Oc=me({prefix:"\0",name:"identity",encode:r=>Mn(r),decode:r=>zn(r)});var Ar={};y(Ar,{base2:()=>kc});var kc=U({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Ir={};y(Ir,{base8:()=>Lc});var Lc=U({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Tr={};y(Tr,{base10:()=>Rc});var Rc=K({prefix:"9",name:"base10",alphabet:"0123456789"});var Dr={};y(Dr,{base16:()=>Vc,base16upper:()=>$c});var Vc=U({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),$c=U({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Ur={};y(Ur,{base36:()=>jc,base36upper:()=>qc});var jc=K({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),qc=K({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Fr={};y(Fr,{base64:()=>Jc,base64pad:()=>Gc,base64url:()=>_c,base64urlpad:()=>Wc});var Jc=U({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Gc=U({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),_c=U({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Wc=U({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Pr={};y(Pr,{base256emoji:()=>Yc});var Eo=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),Xc=Eo.reduce((r,e,t)=>(r[t]=e,r),[]),Kc=Eo.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function Qc(r){return r.reduce((e,t)=>(e+=Xc[t],e),"")}function Hc(r){let e=[];for(let t of r){let n=Kc[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}var Yc=me({prefix:"\u{1F680}",name:"base256emoji",encode:Qc,decode:Hc});var Mr={};y(Mr,{sha256:()=>Zc,sha512:()=>ed});var zr=({name:r,code:e,encode:t})=>new Nr(r,e,t),Nr=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?re(this.code,t):t.then(n=>re(this.code,n))}else throw Error("Unknown type, must be binary type")}};var Io=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),Zc=zr({name:"sha2-256",code:18,encode:Io("SHA-256")}),ed=zr({name:"sha2-512",code:19,encode:Io("SHA-512")});var Br={};y(Br,{identity:()=>nd});var To=0,td="identity",Do=j,rd=r=>re(To,Do(r)),nd={code:To,name:td,encode:Do,digest:rd};var _u=new TextEncoder,Wu=new TextDecoder;var Uo={...Er,...Ar,...Ir,...Tr,...Dr,...Qt,...Ur,...Xt,...Fr,...Pr},Yu={...Mr,...Br};function Or(r,e="utf8"){let t=at[e];if(t==null)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Ae(globalThis.Buffer.from(r,"utf-8")):t.decoder.decode(`${t.prefix}${r}`)}var V=Xe(ct(),1);function Fo(r){return!!Cr(r)}function Po(r){return!!Sr(r)}function ft(r){return!!pt(r)}var No=Fo,id=Po,kr=function(r){let e=0;if(r=r.toString().trim(),No(r)){let t=new Uint8Array(e+4);return r.split(/\./g).forEach(n=>{t[e++]=parseInt(n,10)&255}),t}if(id(r)){let t=r.split(":",8),n;for(n=0;n<t.length;n++){let s=No(t[n]),i;s&&(i=kr(t[n]),t[n]=O(i.slice(0,2),"base16")),i!=null&&++n<8&&t.splice(n,0,O(i.slice(2,4),"base16"))}if(t[0]==="")for(;t.length<8;)t.unshift("0");else if(t[t.length-1]==="")for(;t.length<8;)t.push("0");else if(t.length<8){for(n=0;n<t.length&&t[n]!=="";n++);let s=[n,1];for(n=9-t.length;n>0;n--)s.push("0");t.splice.apply(t,s)}let o=new Uint8Array(e+16);for(n=0;n<t.length;n++){let s=parseInt(t[n],16);o[e++]=s>>8&255,o[e++]=s&255}return o}throw new Error("invalid ip address")},zo=function(r,e=0,t){e=~~e,t=t??r.length-e;let n=new DataView(r.buffer);if(t===4){let o=[];for(let s=0;s<t;s++)o.push(r[e+s]);return o.join(".")}if(t===16){let o=[];for(let s=0;s<t;s+=2)o.push(n.getUint16(e+s).toString(16));return o.join(":").replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}return""};var _e={},Lr={},cd=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,-1,"ip6zone"],[43,8,"ipcidr"],[53,-1,"dns",!0],[54,-1,"dns4",!0],[55,-1,"dns6",!0],[56,-1,"dnsaddr",!0],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[280,0,"webrtc-direct"],[281,0,"webrtc"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,-1,"unix",!1,!0],[421,-1,"ipfs"],[421,-1,"p2p"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,-1,"garlic64"],[448,0,"tls"],[449,-1,"sni"],[460,0,"quic"],[461,0,"quic-v1"],[465,0,"webtransport"],[466,-1,"certhash"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"],[777,-1,"memory"]];cd.forEach(r=>{let e=dd(...r);Lr[e.code]=e,_e[e.name]=e});function dd(r,e,t,n,o){return{code:r,size:e,name:t,resolvable:!!n,path:!!o}}function T(r){if(typeof r=="number"){if(Lr[r]!=null)return Lr[r];throw new Error(`no protocol with code: ${r}`)}else if(typeof r=="string"){if(_e[r]!=null)return _e[r];throw new Error(`no protocol with name: ${r}`)}throw new Error(`invalid protocol id type: ${typeof r}`)}var gl=T("ip4"),xl=T("ip6"),yl=T("ipcidr");function Lo(r,e){switch(T(r).code){case 4:case 41:return fd(e);case 42:return Oo(e);case 6:case 273:case 33:case 132:return Vo(e).toString();case 53:case 54:case 55:case 56:case 400:case 449:case 777:return Oo(e);case 421:return md(e);case 444:return ko(e);case 445:return ko(e);case 466:return hd(e);default:return O(e,"base16")}}function Ro(r,e){switch(T(r).code){case 4:return Mo(e);case 41:return Mo(e);case 42:return Bo(e);case 6:case 273:case 33:case 132:return Vr(parseInt(e,10));case 53:case 54:case 55:case 56:case 400:case 449:case 777:return Bo(e);case 421:return ud(e);case 444:return bd(e);case 445:return wd(e);case 466:return ld(e);default:return Or(e,"base16")}}var Rr=Object.values(Uo).map(r=>r.decoder),pd=function(){let r=Rr[0].or(Rr[1]);return Rr.slice(2).forEach(e=>r=r.or(e)),r}();function Mo(r){if(!ft(r))throw new Error("invalid ip address");return kr(r)}function fd(r){let e=zo(r,0,r.length);if(e==null)throw new Error("ipBuff is required");if(!ft(e))throw new Error("invalid ip address");return e}function Vr(r){let e=new ArrayBuffer(2);return new DataView(e).setUint16(0,r),new Uint8Array(e)}function Vo(r){return new DataView(r.buffer).getUint16(r.byteOffset)}function Bo(r){let e=Or(r),t=Uint8Array.from(V.default.encode(e.length));return G([t,e],t.length+e.length)}function Oo(r){let e=V.default.decode(r);if(r=r.slice(V.default.decode.bytes),r.length!==e)throw new Error("inconsistent lengths");return O(r)}function ud(r){let e;r[0]==="Q"||r[0]==="1"?e=nt(B.decode(`z${r}`)).bytes:e=Q.parse(r).multihash.bytes;let t=Uint8Array.from(V.default.encode(e.length));return G([t,e],t.length+e.length)}function ld(r){let e=pd.decode(r),t=Uint8Array.from(V.default.encode(e.length));return G([t,e],t.length+e.length)}function hd(r){let e=V.default.decode(r),t=r.slice(V.default.decode.bytes);if(t.length!==e)throw new Error("inconsistent lengths");return"u"+O(t,"base64url")}function md(r){let e=V.default.decode(r),t=r.slice(V.default.decode.bytes);if(t.length!==e)throw new Error("inconsistent lengths");return O(t,"base58btc")}function bd(r){let e=r.split(":");if(e.length!==2)throw new Error(`failed to parse onion addr: ["'${e.join('", "')}'"]' does not contain a port number`);if(e[0].length!==16)throw new Error(`failed to parse onion addr: ${e[0]} not a Tor onion address.`);let t=q.decode("b"+e[0]),n=parseInt(e[1],10);if(n<1||n>65536)throw new Error("Port number is not in range(1, 65536)");let o=Vr(n);return G([t,o],t.length+o.length)}function wd(r){let e=r.split(":");if(e.length!==2)throw new Error(`failed to parse onion addr: ["'${e.join('", "')}'"]' does not contain a port number`);if(e[0].length!==56)throw new Error(`failed to parse onion addr: ${e[0]} not a Tor onion3 address.`);let t=q.decode(`b${e[0]}`),n=parseInt(e[1],10);if(n<1||n>65536)throw new Error("Port number is not in range(1, 65536)");let o=Vr(n);return G([t,o],t.length+o.length)}function ko(r){let e=r.slice(0,r.length-2),t=r.slice(r.length-2),n=O(e,"base32"),o=Vo(t);return`${n}:${o}`}function gd(r){let e=[],t=r.split("/").slice(1);if(t.length===1&&t[0]==="")return[];for(let n=0;n<t.length;n++){let o=t[n],s=T(o);if(s.size===0){e.push([o]);continue}if(n++,n>=t.length)throw jo("invalid address: "+r);if(s.path===!0){e.push([o,Gr(t.slice(n).join("/"))]);break}e.push([o,t[n]])}return e}function xd(r){let e=[];return r.map(t=>{let n=ht(t);return e.push(n.name),t.length>1&&t[1]!=null&&e.push(t[1]),null}),Gr(e.join("/"))}function yd(r){return r.map(e=>{Array.isArray(e)||(e=[e]);let t=ht(e);return e.length>1?[t.code,Ro(t.code,e[1])]:[t.code]})}function $r(r){return r.map(e=>{let t=ht(e);return e[1]!=null?[t.code,Lo(t.code,e[1])]:[t.code]})}function jr(r){return lt(G(r.map(e=>{let t=ht(e),n=Uint8Array.from(Te.default.encode(t.code));return e.length>1&&e[1]!=null&&(n=G([n,e[1]])),n})))}function qr(r,e){return r.size>0?r.size/8:r.size===0?0:Te.default.decode(e)+(Te.default.decode.bytes??0)}function ut(r){let e=[],t=0;for(;t<r.length;){let n=Te.default.decode(r,t),o=Te.default.decode.bytes??0,s=T(n),i=qr(s,r.slice(t+o));if(i===0){e.push([n]),t+=o;continue}let a=r.slice(t+o,t+o+i);if(t+=i+o,t>r.length)throw jo("Invalid address Uint8Array: "+O(r,"base16"));e.push([n,a])}return e}function Jr(r){let e=ut(r),t=$r(e);return xd(t)}function vd(r){r=Gr(r);let e=gd(r),t=yd(e);return jr(t)}function $o(r){return vd(r)}function lt(r){let e=Cd(r);if(e!=null)throw e;return Uint8Array.from(r)}function Cd(r){try{ut(r)}catch(e){return e}}function Gr(r){return"/"+r.trim().split("/").filter(e=>e).join("/")}function jo(r){return new Error("Error parsing address: "+r)}function ht(r){return T(r[0])}var Ed=Symbol.for("nodejs.util.inspect.custom"),Ad=[T("dns").code,T("dns4").code,T("dns6").code,T("dnsaddr").code],Id=new Map,qo=Symbol.for("@multiformats/js-multiaddr/multiaddr");function Td(r){return!!r?.[qo]}var Wr=class r{bytes;#e;#r;#n;#t;[qo]=!0;constructor(e){if(e==null&&(e=""),e instanceof Uint8Array)this.bytes=lt(e);else if(typeof e=="string"){if(e.length>0&&e.charAt(0)!=="/")throw new Error(`multiaddr "${e}" must start with a "/"`);this.bytes=$o(e)}else if(Td(e))this.bytes=lt(e.bytes);else throw new Error("addr must be a string, Buffer, or another Multiaddr")}toString(){return this.#e==null&&(this.#e=Jr(this.bytes)),this.#e}toJSON(){return this.toString()}toOptions(){let e,t,n,o,s="",i=T("tcp"),a=T("udp"),h=T("ip4"),I=T("ip6"),d=T("dns6"),f=T("ip6zone");for(let[P,c]of this.stringTuples())P===f.code&&(s=`%${c??""}`),Ad.includes(P)&&(t=i.name,o=443,n=`${c??""}${s}`,e=P===d.code?6:4),(P===i.code||P===a.code)&&(t=T(P).name,o=parseInt(c??"")),(P===h.code||P===I.code)&&(t=T(P).name,n=`${c??""}${s}`,e=P===I.code?6:4);if(e==null||t==null||n==null||o==null)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6, dnsaddr}/{address}/{tcp, udp}/{port}".');return{family:e,host:n,transport:t,port:o}}protos(){return this.protoCodes().map(e=>Object.assign({},T(e)))}protoCodes(){let e=[],t=this.bytes,n=0;for(;n<t.length;){let o=_r.default.decode(t,n),s=_r.default.decode.bytes??0,i=T(o),a=qr(i,t.slice(n+s));n+=a+s,e.push(o)}return e}protoNames(){return this.protos().map(e=>e.name)}tuples(){return this.#r==null&&(this.#r=ut(this.bytes)),this.#r}stringTuples(){return this.#n==null&&(this.#n=$r(this.tuples())),this.#n}encapsulate(e){return e=new r(e),new r(this.toString()+e.toString())}decapsulate(e){let t=e.toString(),n=this.toString(),o=n.lastIndexOf(t);if(o<0)throw new Error(`Address ${this.toString()} does not contain subaddress: ${e.toString()}`);return new r(n.slice(0,o))}decapsulateCode(e){let t=this.tuples();for(let n=t.length-1;n>=0;n--)if(t[n][0]===e)return new r(jr(t.slice(0,n)));return this}getPeerId(){try{let t=this.stringTuples().filter(n=>n[0]===_e.ipfs.code).pop();if(t?.[1]!=null){let n=t[1];return n[0]==="Q"||n[0]==="1"?O(B.decode(`z${n}`),"base58btc"):O(Q.parse(n).multihash.bytes,"base58btc")}return null}catch{return null}}getPath(){if(this.#t===void 0)try{this.#t=this.stringTuples().filter(e=>T(e[0]).path===!0)[0][1],this.#t==null&&(this.#t=null)}catch{this.#t=null}return this.#t}equals(e){return Me(this.bytes,e.bytes)}async resolve(e){let t=this.protos().find(s=>s.resolvable);if(t==null)return[this];let n=Id.get(t.name);if(n==null)throw new tt(`no available resolver for ${t.name}`,"ERR_NO_AVAILABLE_RESOLVER");return(await n(this,e)).map(s=>new r(s))}nodeAddress(){let e=this.toOptions();if(e.transport!=="tcp"&&e.transport!=="udp")throw new Error(`multiaddr must have a valid format - no protocol with name: "${e.transport}". Must have a valid transport protocol: "{tcp, udp}"`);return{family:e.family,address:e.host,port:e.port}}isThinWaistAddress(e){let t=(e??this).protos();return!(t.length!==2||t[0].code!==4&&t[0].code!==41||t[1].code!==6&&t[1].code!==273)}[Ed](){return`Multiaddr(${Jr(this.bytes)})`}};function De(r){return new Wr(r)}var Dd=p("dns4"),Ud=p("dns6"),Fd=p("dnsaddr"),se=N(p("dns"),Fd,Dd,Ud),wt=N(p("ip4"),p("ip6")),Ue=N(l(wt,p("tcp")),l(se,p("tcp"))),gt=l(wt,p("udp")),Pd=l(gt,p("utp")),Nd=l(gt,p("quic")),zd=l(gt,p("quic-v1")),Xr=N(l(Ue,p("ws")),l(se,p("ws"))),mt=N(l(Xr,p("p2p")),Xr),Kr=N(l(Ue,p("wss")),l(se,p("wss")),l(Ue,p("tls"),p("ws")),l(se,p("tls"),p("ws"))),bt=N(l(Kr,p("p2p")),Kr),Qr=N(l(Ue,p("http")),l(wt,p("http")),l(se,p("http"))),Hr=N(l(Ue,p("https")),l(wt,p("https")),l(se,p("https"))),Jo=l(gt,p("webrtc-direct"),p("certhash")),Wo=N(l(Jo,p("p2p")),Jo),Go=l(zd,p("webtransport"),p("certhash"),p("certhash")),Xo=N(l(Go,p("p2p")),Go),Ko=N(l(mt,p("p2p-webrtc-star"),p("p2p")),l(bt,p("p2p-webrtc-star"),p("p2p")),l(mt,p("p2p-webrtc-star")),l(bt,p("p2p-webrtc-star"))),Vl=N(l(mt,p("p2p-websocket-star"),p("p2p")),l(bt,p("p2p-websocket-star"),p("p2p")),l(mt,p("p2p-websocket-star")),l(bt,p("p2p-websocket-star"))),Qo=N(l(Qr,p("p2p-webrtc-direct"),p("p2p")),l(Hr,p("p2p-webrtc-direct"),p("p2p")),l(Qr,p("p2p-webrtc-direct")),l(Hr,p("p2p-webrtc-direct"))),ie=N(Xr,Kr,Qr,Hr,Ko,Qo,Ue,Pd,Nd,se,Wo,Xo),$l=N(l(ie,p("p2p-stardust"),p("p2p")),l(ie,p("p2p-stardust"))),Y=N(l(ie,p("p2p")),Ko,Qo,Wo,Xo,p("p2p")),_o=N(l(Y,p("p2p-circuit"),Y),l(Y,p("p2p-circuit")),l(p("p2p-circuit"),Y),l(ie,p("p2p-circuit")),l(p("p2p-circuit"),ie),p("p2p-circuit")),Ho=()=>N(l(_o,Ho),_o),oe=Ho(),Yo=N(l(oe,Y,oe),l(Y,oe),l(oe,Y),oe,Y);var jl=N(l(oe,p("webrtc"),p("p2p")),l(oe,p("webrtc")),l(ie,p("webrtc"),p("p2p")),l(ie,p("webrtc")),p("webrtc"));function Zo(r){function e(t){let n;try{n=De(t)}catch{return!1}let o=r(n.protoNames());return o===null?!1:o===!0||o===!1?o:o.length===0}return e}function l(...r){function e(t){if(t.length<r.length)return null;let n=t;return r.some(o=>(n=typeof o=="function"?o().partialMatch(t):o.partialMatch(t),Array.isArray(n)&&(t=n),n===null)),n}return{toString:function(){return"{ "+r.join(" ")+" }"},input:r,matches:Zo(e),partialMatch:e}}function N(...r){function e(n){let o=null;return r.some(s=>{let i=typeof s=="function"?s().partialMatch(n):s.partialMatch(n);return i!=null?(o=i,!0):!1}),o}return{toString:function(){return"{ "+r.join(" ")+" }"},input:r,matches:Zo(e),partialMatch:e}}function p(r){let e=r;function t(o){let s;try{s=De(o)}catch{return!1}let i=s.protoNames();return i.length===1&&i[0]===e}function n(o){return o.length===0?null:o[0]===e?o.slice(1):null}return{toString:function(){return e},matches:t,partialMatch:n}}var xt=ln("libp2p:bootstrap"),Md="bootstrap",Bd=50,Od=12e4,kd=1e3,Yr=class extends Ke{static tag="bootstrap";timer;list;timeout;components;_init;constructor(e,t={list:[]}){if(t.list==null||t.list.length===0)throw new Error("Bootstrap requires a list of peer addresses");super(),this.components=e,this.timeout=t.timeout??kd,this.list=[];for(let n of t.list){if(!Yo.matches(n)){xt.error("Invalid multiaddr");continue}let o=De(n),s=o.getPeerId();if(s==null){xt.error("Invalid bootstrap multiaddr without peer id");continue}let i={id:qt(s),multiaddrs:[o],protocols:[]};this.list.push(i)}this._init=t}[en]=this;[Symbol.toStringTag]="@libp2p/bootstrap";isStarted(){return!!this.timer}start(){this.isStarted()||(xt("Starting bootstrap node discovery, discovering peers after %s ms",this.timeout),this.timer=setTimeout(()=>{this._discoverBootstrapPeers().catch(e=>{xt.error(e)})},this.timeout))}async _discoverBootstrapPeers(){if(this.timer!=null)for(let e of this.list){if(await this.components.peerStore.merge(e.id,{tags:{[this._init.tagName??Md]:{value:this._init.tagValue??Bd,ttl:this._init.tagTTL??Od}}}),this.timer==null)return;this.safeDispatchEvent("peer",{detail:e})}}stop(){this.timer!=null&&clearTimeout(this.timer),this.timer=void 0}};function Ld(r){return e=>new Yr(e,r)}return ss(Rd);})();
|
|
3
3
|
return Libp2PBootstrap}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/bootstrap",
|
|
3
|
-
"version": "8.0.0-
|
|
3
|
+
"version": "8.0.0-c999d6a7",
|
|
4
4
|
"description": "Peer discovery via a list of bootstrap peers",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/master/packages/peer-discovery-bootstrap#readme",
|
|
@@ -48,18 +48,15 @@
|
|
|
48
48
|
"test:electron-main": "aegir test -t electron-main"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@libp2p/interface": "0.0.1-
|
|
52
|
-
"@libp2p/logger": "2.1.1-
|
|
53
|
-
"@libp2p/peer-id": "2.0.3-
|
|
51
|
+
"@libp2p/interface": "0.0.1-c999d6a7",
|
|
52
|
+
"@libp2p/logger": "2.1.1-c999d6a7",
|
|
53
|
+
"@libp2p/peer-id": "2.0.3-c999d6a7",
|
|
54
54
|
"@multiformats/mafmt": "^12.1.2",
|
|
55
55
|
"@multiformats/multiaddr": "^12.1.3"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@libp2p/interface-compliance-tests": "3.0.7-
|
|
59
|
-
"aegir": "^
|
|
58
|
+
"@libp2p/interface-compliance-tests": "3.0.7-c999d6a7",
|
|
59
|
+
"aegir": "^40.0.1",
|
|
60
60
|
"sinon-ts": "^1.0.0"
|
|
61
|
-
},
|
|
62
|
-
"typedoc": {
|
|
63
|
-
"entryPoint": "./src/index.ts"
|
|
64
61
|
}
|
|
65
62
|
}
|