UNPKG

@chris.troutner/ipfs-message-port-client

Version:
25 lines 129 kB
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.ChrisTroutnerIpfsMessagePortClient = factory()}(typeof self !== 'undefined' ? self : this, function () {
var ChrisTroutnerIpfsMessagePortClient=(()=>{var Pa=Object.defineProperty;var g=(r,e)=>()=>(r&&(e=r(r=0)),e),b=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),U=(r,e)=>{for(var t in e)Pa(r,t,{get:e[t],enumerable:!0})};var an=b(ot=>{a();"use strict";ot.byteLength=$a;ot.toByteArray=Va;ot.fromByteArray=Ja;var W=[],$=[],Ha=typeof Uint8Array!="undefined"?Uint8Array:Array,qt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ae=0,Wa=qt.length;Ae<Wa;++Ae)W[Ae]=qt[Ae],$[qt.charCodeAt(Ae)]=Ae;$["-".charCodeAt(0)]=62;$["_".charCodeAt(0)]=63;function on(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function $a(r){var e=on(r),t=e[0],n=e[1];return(t+n)*3/4-n}function Ga(r,e,t){return(e+t)*3/4-t}function Va(r){var e,t=on(r),n=t[0],i=t[1],s=new Ha(Ga(r,n,i)),o=0,u=i>0?n-4:n,c;for(c=0;c<u;c+=4)e=$[r.charCodeAt(c)]<<18|$[r.charCodeAt(c+1)]<<12|$[r.charCodeAt(c+2)]<<6|$[r.charCodeAt(c+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=$[r.charCodeAt(c)]<<2|$[r.charCodeAt(c+1)]>>4,s[o++]=e&255),i===1&&(e=$[r.charCodeAt(c)]<<10|$[r.charCodeAt(c+1)]<<4|$[r.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function Xa(r){return W[r>>18&63]+W[r>>12&63]+W[r>>6&63]+W[r&63]}function Qa(r,e,t){for(var n,i=[],s=e;s<t;s+=3)n=(r[s]<<16&16711680)+(r[s+1]<<8&65280)+(r[s+2]&255),i.push(Xa(n));return i.join("")}function Ja(r){for(var e,t=r.length,n=t%3,i=[],s=16383,o=0,u=t-n;o<u;o+=s)i.push(Qa(r,o,o+s>u?u:o+s));return n===1?(e=r[t-1],i.push(W[e>>2]+W[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(W[e>>10]+W[e>>4&63]+W[e<<2&63]+"=")),i.join("")}});var cn=b(Rt=>{a();Rt.read=function(r,e,t,n,i){var s,o,u=i*8-n-1,c=(1<<u)-1,l=c>>1,h=-7,d=t?i-1:0,I=t?-1:1,m=r[e+d];for(d+=I,s=m&(1<<-h)-1,m>>=-h,h+=u;h>0;s=s*256+r[e+d],d+=I,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=o*256+r[e+d],d+=I,h-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(m?-1:1)*Infinity;o=o+Math.pow(2,n),s=s-l}return(m?-1:1)*o*Math.pow(2,s-n)};Rt.write=function(r,e,t,n,i,s){var o,u,c,l=s*8-i-1,h=(1<<l)-1,d=h>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:s-1,y=n?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===Infinity?(u=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+d>=1?e+=I/c:e+=I*Math.pow(2,1-d),e*c>=2&&(o++,c/=2),o+d>=h?(u=0,o=h):o+d>=1?(u=(e*c-1)*Math.pow(2,i),o=o+d):(u=e*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;r[t+m]=u&255,m+=y,u/=256,i-=8);for(o=o<<i|u,l+=i;l>0;r[t+m]=o&255,m+=y,o/=256,l-=8);r[t+m-y]|=w*128}});var An=b(Ie=>{a();"use strict";var Pt=an(),Te=cn(),un=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ie.Buffer=f;Ie.SlowBuffer=Ya;Ie.INSPECT_MAX_BYTES=50;var at=2147483647;Ie.kMaxLength=at;f.TYPED_ARRAY_SUPPORT=Ka();!f.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ka(){try{let r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch(r){return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(!!f.isBuffer(this))return this.buffer}});Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(!!f.isBuffer(this))return this.byteOffset}});function re(r){if(r>at)throw new RangeError('The value "'+r+'" is invalid for option "size"');let e=new Uint8Array(r);return Object.setPrototypeOf(e,f.prototype),e}function f(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return $t(r)}return ln(r,e,t)}f.poolSize=8192;function ln(r,e,t){if(typeof r=="string")return Za(r,e);if(ArrayBuffer.isView(r))return ec(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(G(r,ArrayBuffer)||r&&G(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(G(r,SharedArrayBuffer)||r&&G(r.buffer,SharedArrayBuffer)))return Vt(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return f.from(n,e,t);let i=tc(r);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return f.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}f.from=function(r,e,t){return ln(r,e,t)};Object.setPrototypeOf(f.prototype,Uint8Array.prototype);Object.setPrototypeOf(f,Uint8Array);function fn(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function rc(r,e,t){return fn(r),r<=0?re(r):e!==void 0?typeof t=="string"?re(r).fill(e,t):re(r).fill(e):re(r)}f.alloc=function(r,e,t){return rc(r,e,t)};function $t(r){return fn(r),re(r<0?0:Jt(r)|0)}f.allocUnsafe=function(r){return $t(r)};f.allocUnsafeSlow=function(r){return $t(r)};function Za(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let t=hn(r,e)|0,n=re(t),i=n.write(r,e);return i!==t&&(n=n.slice(0,i)),n}function Ht(r){let e=r.length<0?0:Jt(r.length)|0,t=re(e);for(let n=0;n<e;n+=1)t[n]=r[n]&255;return t}function ec(r){if(G(r,Uint8Array)){let e=new Uint8Array(r);return Vt(e.buffer,e.byteOffset,e.byteLength)}return Ht(r)}function Vt(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(r):t===void 0?n=new Uint8Array(r,e):n=new Uint8Array(r,e,t),Object.setPrototypeOf(n,f.prototype),n}function tc(r){if(f.isBuffer(r)){let e=Jt(r.length)|0,t=re(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||Wt(r.length)?re(0):Ht(r);if(r.type==="Buffer"&&Array.isArray(r.data))return Ht(r.data)}function Jt(r){if(r>=at)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+at.toString(16)+" bytes");return r|0}function Ya(r){return+r!=r&&(r=0),f.alloc(+r)}f.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==f.prototype};f.compare=function(e,t){if(G(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let s=0,o=Math.min(n,i);s<o;++s)if(e[s]!==t[s]){n=e[s],i=t[s];break}return n<i?-1:i<n?1:0};f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return f.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let i=f.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){let o=e[n];if(G(o,Uint8Array))s+o.length>i.length?(f.isBuffer(o)||(o=f.from(o)),o.copy(i,s)):Uint8Array.prototype.set.call(i,o,s);else if(f.isBuffer(o))o.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=o.length}return i};function hn(r,e){if(f.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||G(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let t=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Gt(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return bn(r).length;default:if(i)return n?-1:Gt(r).length;e=(""+e).toLowerCase(),i=!0}}f.byteLength=hn;function cc(r,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return oc(this,e,t);case"utf8":case"utf-8":return dn(this,e,t);case"ascii":return ic(this,e,t);case"latin1":case"binary":return sc(this,e,t);case"base64":return nc(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ac(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}f.prototype._isBuffer=!0;function ye(r,e,t){let n=r[e];r[e]=r[t],r[t]=n}f.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)ye(this,t,t+1);return this};f.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)ye(this,t,t+3),ye(this,t+1,t+2);return this};f.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)ye(this,t,t+7),ye(this,t+1,t+6),ye(this,t+2,t+5),ye(this,t+3,t+4);return this};f.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?dn(this,0,e):cc.apply(this,arguments)};f.prototype.toLocaleString=f.prototype.toString;f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:f.compare(this,e)===0};f.prototype.inspect=function(){let e="",t=Ie.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"};un&&(f.prototype[un]=f.prototype.inspect);f.prototype.compare=function(e,t,n,i,s){if(G(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),t<0||n>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&t>=n)return 0;if(i>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,s>>>=0,this===e)return 0;let o=s-i,u=n-t,c=Math.min(o,u),l=this.slice(i,s),h=e.slice(t,n);for(let d=0;d<c;++d)if(l[d]!==h[d]){o=l[d],u=h[d];break}return o<u?-1:u<o?1:0};function xn(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Wt(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=f.from(e,n)),f.isBuffer(e))return e.length===0?-1:pn(r,e,t,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):pn(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function pn(r,e,t,n,i){let s=1,o=r.length,u=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;s=2,o/=2,u/=2,t/=2}function c(h,d){return s===1?h[d]:h.readUInt16BE(d*s)}let l;if(i){let h=-1;for(l=t;l<o;l++)if(c(r,l)===c(e,h===-1?0:l-h)){if(h===-1&&(h=l),l-h+1===u)return h*s}else h!==-1&&(l-=l-h),h=-1}else for(t+u>o&&(t=o-u),l=t;l>=0;l--){let h=!0;for(let d=0;d<u;d++)if(c(r,l+d)!==c(e,d)){h=!1;break}if(h)return l}return-1}f.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};f.prototype.indexOf=function(e,t,n){return xn(this,e,t,n,!0)};f.prototype.lastIndexOf=function(e,t,n){return xn(this,e,t,n,!1)};function uc(r,e,t,n){t=Number(t)||0;let i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let s=e.length;n>s/2&&(n=s/2);let o;for(o=0;o<n;++o){let u=parseInt(e.substr(o*2,2),16);if(Wt(u))return o;r[t+o]=u}return o}function lc(r,e,t,n){return ct(Gt(e,r.length-t),r,t,n)}function hc(r,e,t,n){return ct(fc(e),r,t,n)}function bc(r,e,t,n){return ct(bn(e),r,t,n)}function pc(r,e,t,n){return ct(dc(e,r.length-t),r,t,n)}f.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-t;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return uc(this,e,t,n);case"utf8":case"utf-8":return lc(this,e,t,n);case"ascii":case"latin1":case"binary":return hc(this,e,t,n);case"base64":return bc(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pc(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function nc(r,e,t){return e===0&&t===r.length?Pt.fromByteArray(r):Pt.fromByteArray(r.slice(e,t))}function dn(r,e,t){t=Math.min(r.length,t);let n=[],i=e;for(;i<t;){let s=r[i],o=null,u=s>239?4:s>223?3:s>191?2:1;if(i+u<=t){let c,l,h,d;switch(u){case 1:s<128&&(o=s);break;case 2:c=r[i+1],(c&192)==128&&(d=(s&31)<<6|c&63,d>127&&(o=d));break;case 3:c=r[i+1],l=r[i+2],(c&192)==128&&(l&192)==128&&(d=(s&15)<<12|(c&63)<<6|l&63,d>2047&&(d<55296||d>57343)&&(o=d));break;case 4:c=r[i+1],l=r[i+2],h=r[i+3],(c&192)==128&&(l&192)==128&&(h&192)==128&&(d=(s&15)<<18|(c&63)<<12|(l&63)<<6|h&63,d>65535&&d<1114112&&(o=d))}}o===null?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=u}return xc(n)}var yn=4096;function xc(r){let e=r.length;if(e<=yn)return String.fromCharCode.apply(String,r);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=yn));return t}function ic(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function sc(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function oc(r,e,t){let n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let i="";for(let s=e;s<t;++s)i+=yc[r[s]];return i}function ac(r,e,t){let n=r.slice(e,t),i="";for(let s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}f.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let i=this.subarray(e,t);return Object.setPrototypeOf(i,f.prototype),i};function j(r,e,t){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||j(e,t,this.length);let i=this[e],s=1,o=0;for(;++o<t&&(s*=256);)i+=this[e+o]*s;return i};f.prototype.readUintBE=f.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||j(e,t,this.length);let i=this[e+--t],s=1;for(;t>0&&(s*=256);)i+=this[e+--t]*s;return i};f.prototype.readUint8=f.prototype.readUInt8=function(e,t){return e=e>>>0,t||j(e,1,this.length),this[e]};f.prototype.readUint16LE=f.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||j(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUint16BE=f.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||j(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUint32LE=f.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};f.prototype.readUint32BE=f.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||j(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};f.prototype.readBigUInt64LE=le(function(e){e=e>>>0,ve(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&$e(e,this.length-8);let i=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,s=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(s)<<BigInt(32))});f.prototype.readBigUInt64BE=le(function(e){e=e>>>0,ve(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&$e(e,this.length-8);let i=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],s=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(s)});f.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||j(e,t,this.length);let i=this[e],s=1,o=0;for(;++o<t&&(s*=256);)i+=this[e+o]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i};f.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||j(e,t,this.length);let i=t,s=1,o=this[e+--i];for(;i>0&&(s*=256);)o+=this[e+--i]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*t)),o};f.prototype.readInt8=function(e,t){return e=e>>>0,t||j(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,t){e=e>>>0,t||j(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(e,t){e=e>>>0,t||j(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(e,t){return e=e>>>0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};f.prototype.readInt32BE=function(e,t){return e=e>>>0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};f.prototype.readBigInt64LE=le(function(e){e=e>>>0,ve(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&$e(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});f.prototype.readBigInt64BE=le(function(e){e=e>>>0,ve(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&$e(e,this.length-8);let i=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});f.prototype.readFloatLE=function(e,t){return e=e>>>0,t||j(e,4,this.length),Te.read(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,t){return e=e>>>0,t||j(e,4,this.length),Te.read(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||j(e,8,this.length),Te.read(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||j(e,8,this.length),Te.read(this,e,!1,52,8)};function R(r,e,t,n,i,s){if(!f.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let u=Math.pow(2,8*n)-1;R(this,e,t,n,u,0)}let s=1,o=0;for(this[t]=e&255;++o<n&&(s*=256);)this[t+o]=e/s&255;return t+n};f.prototype.writeUintBE=f.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let u=Math.pow(2,8*n)-1;R(this,e,t,n,u,0)}let s=n-1,o=1;for(this[t+s]=e&255;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+n};f.prototype.writeUint8=f.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,1,255,0),this[t]=e&255,t+1};f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function gn(r,e,t,n,i){mn(e,n,i,r,t,7);let s=Number(e&BigInt(4294967295));r[t++]=s,s=s>>8,r[t++]=s,s=s>>8,r[t++]=s,s=s>>8,r[t++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=o,o=o>>8,r[t++]=o,o=o>>8,r[t++]=o,o=o>>8,r[t++]=o,t}function kn(r,e,t,n,i){mn(e,n,i,r,t,7);let s=Number(e&BigInt(4294967295));r[t+7]=s,s=s>>8,r[t+6]=s,s=s>>8,r[t+5]=s,s=s>>8,r[t+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=o,o=o>>8,r[t+2]=o,o=o>>8,r[t+1]=o,o=o>>8,r[t]=o,t+8}f.prototype.writeBigUInt64LE=le(function(e,t=0){return gn(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});f.prototype.writeBigUInt64BE=le(function(e,t=0){return kn(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});f.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let c=Math.pow(2,8*n-1);R(this,e,t,n,c-1,-c)}let s=0,o=1,u=0;for(this[t]=e&255;++s<n&&(o*=256);)e<0&&u===0&&this[t+s-1]!==0&&(u=1),this[t+s]=(e/o>>0)-u&255;return t+n};f.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let c=Math.pow(2,8*n-1);R(this,e,t,n,c-1,-c)}let s=n-1,o=1,u=0;for(this[t+s]=e&255;--s>=0&&(o*=256);)e<0&&u===0&&this[t+s+1]!==0&&(u=1),this[t+s]=(e/o>>0)-u&255;return t+n};f.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};f.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};f.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};f.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};f.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};f.prototype.writeBigInt64LE=le(function(e,t=0){return gn(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});f.prototype.writeBigInt64BE=le(function(e,t=0){return kn(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wn(r,e,t,n,i,s){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function En(r,e,t,n,i){return e=+e,t=t>>>0,i||wn(r,e,t,4,34028234663852886e22,-34028234663852886e22),Te.write(r,e,t,n,23,4),t+4}f.prototype.writeFloatLE=function(e,t,n){return En(this,e,t,!0,n)};f.prototype.writeFloatBE=function(e,t,n){return En(this,e,t,!1,n)};function Bn(r,e,t,n,i){return e=+e,t=t>>>0,i||wn(r,e,t,8,17976931348623157e292,-17976931348623157e292),Te.write(r,e,t,n,52,8),t+8}f.prototype.writeDoubleLE=function(e,t,n){return Bn(this,e,t,!0,n)};f.prototype.writeDoubleBE=function(e,t,n){return Bn(this,e,t,!1,n)};f.prototype.copy=function(e,t,n,i){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);let s=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),s};f.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let o=e.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(e=o)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let s;if(typeof e=="number")for(s=t;s<n;++s)this[s]=e;else{let o=f.isBuffer(e)?e:f.from(e,i),u=o.length;if(u===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-t;++s)this[s+t]=o[s%u]}return this};var Ce={};function Xt(r,e,t){Ce[r]=class extends t{constructor(){super();Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}Xt("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Xt("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError);Xt("ERR_OUT_OF_RANGE",function(r,e,t){let n=`The value of "${r}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=Sn(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=Sn(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Sn(r){let e="",t=r.length,n=r[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function mc(r,e,t){ve(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&$e(e,r.length-(t+1))}function mn(r,e,t,n,i,s){if(r>t||r<e){let o=typeof e=="bigint"?"n":"",u;throw s>3?e===0||e===BigInt(0)?u=`>= 0${o} and < 2${o} ** ${(s+1)*8}${o}`:u=`>= -(2${o} ** ${(s+1)*8-1}${o}) and < 2 ** ${(s+1)*8-1}${o}`:u=`>= ${e}${o} and <= ${t}${o}`,new Ce.ERR_OUT_OF_RANGE("value",u,r)}mc(n,i,s)}function ve(r,e){if(typeof r!="number")throw new Ce.ERR_INVALID_ARG_TYPE(e,"number",r)}function $e(r,e,t){throw Math.floor(r)!==r?(ve(r,t),new Ce.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new Ce.ERR_BUFFER_OUT_OF_BOUNDS:new Ce.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}var gc=/[^+/0-9A-Za-z-_]/g;function kc(r){if(r=r.split("=")[0],r=r.trim().replace(gc,""),r.length<2)return"";for(;r.length%4!=0;)r=r+"=";return r}function Gt(r,e){e=e||Infinity;let t,n=r.length,i=null,s=[];for(let o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function fc(r){let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function dc(r,e){let t,n,i,s=[];for(let o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,i=t%256,s.push(i),s.push(n);return s}function bn(r){return Pt.toByteArray(kc(r))}function ct(r,e,t,n){let i;for(i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function G(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function Wt(r){return r!==r}var yc=function(){let r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)e[n+i]=r[t]+r[i]}return e}();function le(r){return typeof BigInt=="undefined"?wc:r}function wc(){throw new Error("BigInt not supported")}});var Fn=b((jf,In)=>{a();var C=In.exports={},X,Q;function Qt(){throw new Error("setTimeout has not been defined")}function Yt(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?X=setTimeout:X=Qt}catch(r){X=Qt}try{typeof clearTimeout=="function"?Q=clearTimeout:Q=Yt}catch(r){Q=Yt}})();function Tn(r){if(X===setTimeout)return setTimeout(r,0);if((X===Qt||!X)&&setTimeout)return X=setTimeout,setTimeout(r,0);try{return X(r,0)}catch(e){try{return X.call(null,r,0)}catch(t){return X.call(this,r,0)}}}function Ec(r){if(Q===clearTimeout)return clearTimeout(r);if((Q===Yt||!Q)&&clearTimeout)return Q=clearTimeout,clearTimeout(r);try{return Q(r)}catch(e){try{return Q.call(null,r)}catch(t){return Q.call(this,r)}}}var ne=[],Fe=!1,me,ut=-1;function Bc(){!Fe||!me||(Fe=!1,me.length?ne=me.concat(ne):ut=-1,ne.length&&vn())}function vn(){if(!Fe){var r=Tn(Bc);Fe=!0;for(var e=ne.length;e;){for(me=ne,ne=[];++ut<e;)me&&me[ut].run();ut=-1,e=ne.length}me=null,Fe=!1,Ec(r)}}C.nextTick=function(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ne.push(new Cn(r,e)),ne.length===1&&!Fe&&Tn(vn)};function Cn(r,e){this.fun=r,this.array=e}Cn.prototype.run=function(){this.fun.apply(null,this.array)};C.title="browser";C.browser=!0;C.env={};C.argv=[];C.version="";C.versions={};function ie(){}C.on=ie;C.addListener=ie;C.once=ie;C.off=ie;C.removeListener=ie;C.removeAllListeners=ie;C.emit=ie;C.prependListener=ie;C.prependOnceListener=ie;C.listeners=function(r){return[]};C.binding=function(r){throw new Error("process.binding is not supported")};C.cwd=function(){return"/"};C.chdir=function(r){throw new Error("process.chdir is not supported")};C.umask=function(){return 0}});var Buffer,process,a=g(()=>{({Buffer}=An()),process=Fn()});var lt=b(Kt=>{a();"use strict";var Sc=r=>{let{name:e,message:t,stack:n,code:i,detail:s}=r;return{name:e,message:t,stack:n,code:i,detail:s}};Kt.encodeError=Sc;var Ic=r=>{if(r instanceof Error)return r;{let{name:e,message:t,stack:n,code:i}=r;return Object.assign(Ac(e,t),{name:e,stack:n,code:i})}};Kt.decodeError=Ic;var Ac=(r,e)=>{switch(r){case"RangeError":return new RangeError(e);case"ReferenceError":return ReferenceError(e);case"SyntaxError":return new SyntaxError(e);case"TypeError":return new TypeError(e);case"URIError":return new URIError(e);default:return new Error(e)}}});var Dn=b(ft=>{a();"use strict";ft.TimeoutError=class extends Error{get name(){return this.constructor.name}};ft.AbortError=class extends Error{get name(){return this.constructor.name}};ft.DisconnectError=class extends Error{get name(){return this.constructor.name}}});var Nn=b((Pf,Un)=>{a();"use strict";var{decodeError:Tc}=lt(),{DisconnectError:vc,TimeoutError:Cc,AbortError:Fc}=Dn();Un.exports=class ht{constructor(e){this.port=null,this.id=Math.random().toString(32).slice(2),this.nextID=0,this.queries=Object.create(null),e&&this.connect(e)}execute(e){let t=`${this.id}@${this.nextID++}`;return this.queries[t]=e,e.timeout>0&&e.timeout<Infinity&&(e.timerID=setTimeout(ht.timeout,e.timeout,this,t)),e.signal&&e.signal.addEventListener("abort",()=>this.abort(t),{once:!0}),this.port&&ht.postQuery(this.port,t,e),e.result}connect(e){if(this.port)throw new Error("Transport is already open");this.port=e,this.port.addEventListener("message",this),this.port.start();for(let[t,n]of Object.entries(this.queries))ht.postQuery(e,t,n)}disconnect(){let e=new vc;for(let[t,n]of Object.entries(this.queries))n.fail(e),this.abort(t);this.port&&(this.port.removeEventListener("message",this),this.port.close())}static timeout(e,t){let{queries:n}=e,i=n[t];i&&(delete n[t],i.fail(new Cc("request timed out")),e.port&&e.port.postMessage({type:"abort",id:t}))}abort(e){let{queries:t}=this,n=t[e];n&&(delete t[e],n.fail(new Fc),this.port&&this.port.postMessage({type:"abort",id:e}),n.timerID!=null&&clearTimeout(n.timerID))}static postQuery(e,t,n){e.postMessage({type:"query",namespace:n.namespace,method:n.method,id:t,input:n.toJSON()},[...new Set(n.transfer()||[])])}handleEvent(e){let{id:t,result:n}=e.data,i=this.queries[t];i&&(delete this.queries[t],n.ok?i.succeed(n.value):i.fail(Tc(n.error)),i.timerID!=null&&clearTimeout(i.timerID))}}});var jn=b((Vf,_n)=>{a();"use strict";_n.exports=class{constructor(e,t,n){this.result=new Promise((i,s)=>{this.succeed=i,this.fail=s,this.signal=n.signal,this.input=n,this.namespace=e,this.method=t,this.timeout=n.timeout==null?Infinity:n.timeout,this.timerID=null})}toJSON(){return this.input}transfer(){return this.input.transfer}}});var Mn=b((Hf,On)=>{a();"use strict";var Dc=jn();On.exports=class{constructor(e,t,n){this.transport=n;let i=this;for(let s of t)i[s]=o=>this.transport.execute(new Dc(e,s.toString(),o))}}});var Ve=b((Gf,Ln)=>{a();"use strict";var Uc=Mn();Ln.exports=class{constructor(e,t,n){this.remote=new Uc(e,t,n)}}});var qn=b((Xf,zn)=>{a();"use strict";function Nc(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var n=0;n<r.length;n++){var i=r.charAt(n),s=i.charCodeAt(0);if(e[s]!==255)throw new TypeError(i+" is ambiguous");e[s]=n}var o=r.length,u=r.charAt(0),c=Math.log(o)/Math.log(256),l=Math.log(256)/Math.log(o);function h(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(m.length===0)return"";for(var y=0,w=0,N=0,S=m.length;N!==S&&m[N]===0;)N++,y++;for(var T=(S-N)*l+1>>>0,E=new Uint8Array(T);N!==S;){for(var B=m[N],_=0,D=T-1;(B!==0||_<w)&&D!==-1;D--,_++)B+=256*E[D]>>>0,E[D]=B%o>>>0,B=B/o>>>0;if(B!==0)throw new Error("Non-zero carry");w=_,N++}for(var v=T-w;v!==T&&E[v]===0;)v++;for(var q=u.repeat(y);v<T;++v)q+=r.charAt(E[v]);return q}function d(m){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return new Uint8Array;var y=0;if(m[y]!==" "){for(var w=0,N=0;m[y]===u;)w++,y++;for(var S=(m.length-y)*c+1>>>0,T=new Uint8Array(S);m[y];){var E=e[m.charCodeAt(y)];if(E===255)return;for(var B=0,_=S-1;(E!==0||B<N)&&_!==-1;_--,B++)E+=o*T[_]>>>0,T[_]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");N=B,y++}if(m[y]!==" "){for(var D=S-N;D!==S&&T[D]===0;)D++;for(var v=new Uint8Array(w+(S-D)),q=w;D!==S;)v[q++]=T[D++];return v}}}function I(m){var y=d(m);if(y)return y;throw new Error("Non-base"+o+" character")}return{encode:h,decodeUnsafe:d,decode:I}}zn.exports=Nc});var bt=b((Qf,Rn)=>{a();"use strict";var _c=new TextDecoder,jc=r=>_c.decode(r),Oc=new TextEncoder,Mc=r=>Oc.encode(r);function Lc(r,e){let t=new Uint8Array(e),n=0;for(let i of r)t.set(i,n),n+=i.length;return t}Rn.exports={decodeText:jc,encodeText:Mc,concat:Lc}});var Vn=b((Yf,Pn)=>{a();"use strict";var{encodeText:zc}=bt(),$n=class{constructor(e,t,n,i){this.name=e,this.code=t,this.codeBuf=zc(this.code),this.alphabet=i,this.codec=n(i)}encode(e){return this.codec.encode(e)}decode(e){for(let t of e)if(this.alphabet&&this.alphabet.indexOf(t)<0)throw new Error(`invalid character '${t}' in '${e}'`);return this.codec.decode(e)}};Pn.exports=$n});var Hn=b((Kf,Jn)=>{a();"use strict";var qc=(r,e,t)=>{let n={};for(let l=0;l<e.length;++l)n[e[l]]=l;let i=r.length;for(;r[i-1]==="=";)--i;let s=new Uint8Array(i*t/8|0),o=0,u=0,c=0;for(let l=0;l<i;++l){let h=n[r[l]];if(h===void 0)throw new SyntaxError("Invalid character "+r[l]);u=u<<t|h,o+=t,o>=8&&(o-=8,s[c++]=255&u>>o)}if(o>=t||255&u<<8-o)throw new SyntaxError("Unexpected end of data");return s},Rc=(r,e,t)=>{let n=e[e.length-1]==="=",i=(1<<t)-1,s="",o=0,u=0;for(let c=0;c<r.length;++c)for(u=u<<8|r[c],o+=8;o>t;)o-=t,s+=e[i&u>>o];if(o&&(s+=e[i&u<<t-o]),n)for(;s.length*t&7;)s+="=";return s},Pc=r=>e=>({encode(t){return Rc(t,e,r)},decode(t){return qc(t,e,r)}});Jn.exports={rfc4648:Pc}});var Qn=b((Zf,Wn)=>{a();"use strict";var Je=qn(),$c=Vn(),{rfc4648:z}=Hn(),{decodeText:Vc,encodeText:Jc}=bt(),Hc=()=>({encode:Vc,decode:Jc}),Gn=[["identity","\0",Hc,""],["base2","0",z(1),"01"],["base8","7",z(3),"01234567"],["base10","9",Je,"0123456789"],["base16","f",z(4),"0123456789abcdef"],["base16upper","F",z(4),"0123456789ABCDEF"],["base32hex","v",z(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",z(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",z(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",z(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",z(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",z(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",z(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",z(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",z(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",Je,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",Je,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",Je,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",Je,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",z(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",z(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",z(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",z(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],Xn=Gn.reduce((r,e)=>(r[e[0]]=new $c(e[0],e[1],e[2],e[3]),r),{}),Wc=Gn.reduce((r,e)=>(r[e[1]]=Xn[e[0]],r),{});Wn.exports={names:Xn,codes:Wc}});var Zt=b((se,Yn)=>{a();"use strict";var De=Qn(),{encodeText:Gc,decodeText:dt,concat:Kn}=bt();function Qc(r,e){if(!e)throw new Error("requires an encoded Uint8Array");let{name:t,codeBuf:n}=ge(r);return Xc(t,e),Kn([n,e],n.length+e.length)}function Yc(r,e){let t=ge(r),n=Gc(t.encode(e));return Kn([t.codeBuf,n],t.codeBuf.length+n.length)}function Kc(r){r instanceof Uint8Array&&(r=dt(r));let e=r[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(e)&&(r=r.toLowerCase()),ge(r[0]).decode(r.substring(1))}function Zc(r){if(r instanceof Uint8Array&&(r=dt(r)),Object.prototype.toString.call(r)!=="[object String]")return!1;try{return ge(r[0]).name}catch(e){return!1}}function Xc(r,e){ge(r).decode(dt(e))}function ge(r){if(Object.prototype.hasOwnProperty.call(De.names,r))return De.names[r];if(Object.prototype.hasOwnProperty.call(De.codes,r))return De.codes[r];throw new Error(`Unsupported encoding: ${r}`)}function e0(r){return r instanceof Uint8Array&&(r=dt(r)),ge(r[0])}se=Yn.exports=Qc;se.encode=Yc;se.decode=Kc;se.isEncoded=Zc;se.encoding=ge;se.encodingFromData=e0;var t0=Object.freeze(De.names),r0=Object.freeze(De.codes);se.names=t0;se.codes=r0});var ri=b((e2,Zn)=>{a();Zn.exports=ei;var ti=128,n0=127,i0=~n0,s0=Math.pow(2,31);function ei(r,e,t){e=e||[],t=t||0;for(var n=t;r>=s0;)e[t++]=r&255|ti,r/=128;for(;r&i0;)e[t++]=r&255|ti,r>>>=7;return e[t]=r|0,ei.bytes=t-n+1,e}});var si=b((t2,ni)=>{a();ni.exports=er;var o0=128,ii=127;function er(r,e){var t=0,e=e||0,n=0,i=e,s,o=r.length;do{if(i>=o)throw er.bytes=0,new RangeError("Could not decode varint");s=r[i++],t+=n<28?(s&ii)<<n:(s&ii)*Math.pow(2,n),n+=7}while(s>=o0);return er.bytes=i-e,t}});var ai=b((r2,oi)=>{a();var a0=Math.pow(2,7),c0=Math.pow(2,14),u0=Math.pow(2,21),l0=Math.pow(2,28),f0=Math.pow(2,35),h0=Math.pow(2,42),b0=Math.pow(2,49),d0=Math.pow(2,56),p0=Math.pow(2,63);oi.exports=function(r){return r<a0?1:r<c0?2:r<u0?3:r<l0?4:r<f0?5:r<h0?6:r<b0?7:r<d0?8:r<p0?9:10}});var ui=b((n2,ci)=>{a();ci.exports={encode:ri(),decode:si(),encodingLength:ai()}});var fi=b((i2,li)=>{a();"use strict";var x0=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,"murmur3-128":34,"murmur3-32":35,"dbl-sha2-256":86,md4:212,md5:213,bmt:214,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082});li.exports={names:x0}});function y0(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 i=0;i<r.length;i++){var s=r.charAt(i),o=s.charCodeAt(0);if(t[o]!==255)throw new TypeError(s+" is ambiguous");t[o]=i}var u=r.length,c=r.charAt(0),l=Math.log(u)/Math.log(256),h=Math.log(256)/Math.log(u);function d(y){if(y instanceof Uint8Array||(ArrayBuffer.isView(y)?y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength):Array.isArray(y)&&(y=Uint8Array.from(y))),!(y instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(y.length===0)return"";for(var w=0,N=0,S=0,T=y.length;S!==T&&y[S]===0;)S++,w++;for(var E=(T-S)*h+1>>>0,B=new Uint8Array(E);S!==T;){for(var _=y[S],D=0,v=E-1;(_!==0||D<N)&&v!==-1;v--,D++)_+=256*B[v]>>>0,B[v]=_%u>>>0,_=_/u>>>0;if(_!==0)throw new Error("Non-zero carry");N=D,S++}for(var q=E-N;q!==E&&B[q]===0;)q++;for(var st=c.repeat(w);q<E;++q)st+=r.charAt(B[q]);return st}function I(y){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;var w=0;if(y[w]!==" "){for(var N=0,S=0;y[w]===c;)N++,w++;for(var T=(y.length-w)*l+1>>>0,E=new Uint8Array(T);y[w];){var B=t[y.charCodeAt(w)];if(B===255)return;for(var _=0,D=T-1;(B!==0||_<S)&&D!==-1;D--,_++)B+=u*E[D]>>>0,E[D]=B%256>>>0,B=B/256>>>0;if(B!==0)throw new Error("Non-zero carry");S=_,w++}if(y[w]!==" "){for(var v=T-S;v!==T&&E[v]===0;)v++;for(var q=new Uint8Array(N+(T-v)),st=N;v!==T;)q[st++]=E[v++];return q}}}function m(y){var w=I(y);if(w)return w;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:I,decode:m}}var m0,g0,hi,bi=g(()=>{a();m0=y0,g0=m0,hi=g0});var o2,pi,oe,xi,yi,fe=g(()=>{a();o2=new Uint8Array(0),pi=(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},oe=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")},xi=r=>new TextEncoder().encode(r),yi=r=>new TextDecoder().decode(r)});var mi,gi,pt,ki,xt,he,k0,w0,A,Y=g(()=>{a();bi();fe();mi=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")}},gi=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseDecode=n}decode(e){if(typeof e=="string")switch(e[0]){case this.prefix:return this.baseDecode(e.slice(1));default:throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}else throw Error("Can only multibase decode strings")}or(e){let t={[this.prefix]:this,...e.decoders||{[e.prefix]:e}};return new pt(t)}},pt=class{constructor(e){this.decoders=e}or(e){let t=e.decoders||{[e.prefix]:e};return new pt({...this.decoders,...t})}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`)}},ki=class{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new mi(e,t,n),this.decoder=new gi(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},xt=({name:r,prefix:e,encode:t,decode:n})=>new ki(r,e,t,n),he=({prefix:r,name:e,alphabet:t})=>{let{encode:n,decode:i}=hi(t,e);return xt({prefix:r,name:e,encode:n,decode:s=>oe(i(s))})},k0=(r,e,t,n)=>{let i={};for(let h=0;h<e.length;++h)i[e[h]]=h;let s=r.length;for(;r[s-1]==="=";)--s;let o=new Uint8Array(s*t/8|0),u=0,c=0,l=0;for(let h=0;h<s;++h){let d=i[r[h]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<t|d,u+=t,u>=8&&(u-=8,o[l++]=255&c>>u)}if(u>=t||255&c<<8-u)throw new SyntaxError("Unexpected end of data");return o},w0=(r,e,t)=>{let n=e[e.length-1]==="=",i=(1<<t)-1,s="",o=0,u=0;for(let c=0;c<r.length;++c)for(u=u<<8|r[c],o+=8;o>t;)o-=t,s+=e[i&u>>o];if(o&&(s+=e[i&u<<t-o]),n)for(;s.length*t&7;)s+="=";return s},A=({name:r,prefix:e,bitsPerChar:t,alphabet:n})=>xt({prefix:e,name:r,encode(i){return w0(i,n,t)},decode(i){return k0(i,n,t,r)}})});var tr={};U(tr,{identity:()=>E0});var E0,wi=g(()=>{a();Y();fe();E0=xt({prefix:"\0",name:"identity",encode:r=>yi(r),decode:r=>xi(r)})});var rr={};U(rr,{base2:()=>B0});var B0,Ei=g(()=>{a();Y();B0=A({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})});var nr={};U(nr,{base8:()=>S0});var S0,Bi=g(()=>{a();Y();S0=A({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})});var ir={};U(ir,{base10:()=>A0});var A0,Si=g(()=>{a();Y();A0=he({prefix:"9",name:"base10",alphabet:"0123456789"})});var sr={};U(sr,{base16:()=>I0,base16upper:()=>T0});var I0,T0,Ai=g(()=>{a();Y();I0=A({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),T0=A({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});var or={};U(or,{base32:()=>Ue,base32hex:()=>D0,base32hexpad:()=>N0,base32hexpadupper:()=>_0,base32hexupper:()=>U0,base32pad:()=>C0,base32padupper:()=>F0,base32upper:()=>v0,base32z:()=>j0});var Ue,v0,C0,F0,D0,U0,N0,_0,j0,ar=g(()=>{a();Y();Ue=A({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),v0=A({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),C0=A({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),F0=A({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),D0=A({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),U0=A({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),N0=A({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),_0=A({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),j0=A({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})});var cr={};U(cr,{base36:()=>O0,base36upper:()=>M0});var O0,M0,Ii=g(()=>{a();Y();O0=he({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),M0=he({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})});var ur={};U(ur,{base58btc:()=>K,base58flickr:()=>L0});var K,L0,lr=g(()=>{a();Y();K=he({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),L0=he({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});var fr={};U(fr,{base64:()=>z0,base64pad:()=>q0,base64url:()=>R0,base64urlpad:()=>P0});var z0,q0,R0,P0,Ti=g(()=>{a();Y();z0=A({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),q0=A({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),R0=A({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),P0=A({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});function vi(r,e,t){e=e||[],t=t||0;for(var n=t;r>=H0;)e[t++]=r&255|Ci,r/=128;for(;r&J0;)e[t++]=r&255|Ci,r>>>=7;return e[t]=r|0,vi.bytes=t-n+1,e}function hr(r,e){var t=0,e=e||0,n=0,i=e,s,o=r.length;do{if(i>=o)throw hr.bytes=0,new RangeError("Could not decode varint");s=r[i++],t+=n<28?(s&Fi)<<n:(s&Fi)*Math.pow(2,n),n+=7}while(s>=G0);return hr.bytes=i-e,t}var $0,Ci,V0,J0,H0,W0,G0,Fi,X0,Q0,Y0,K0,Z0,eu,tu,ru,nu,iu,su,ou,He,Di=g(()=>{a();$0=vi,Ci=128,V0=127,J0=~V0,H0=Math.pow(2,31);W0=hr,G0=128,Fi=127;X0=Math.pow(2,7),Q0=Math.pow(2,14),Y0=Math.pow(2,21),K0=Math.pow(2,28),Z0=Math.pow(2,35),eu=Math.pow(2,42),tu=Math.pow(2,49),ru=Math.pow(2,56),nu=Math.pow(2,63),iu=function(r){return r<X0?1:r<Q0?2:r<Y0?3:r<K0?4:r<Z0?5:r<eu?6:r<tu?7:r<ru?8:r<nu?9:10},su={encode:$0,decode:W0,encodingLength:iu},ou=su,He=ou});var We,Ne,_e,yt=g(()=>{a();Di();We=r=>[He.decode(r),He.decode.bytes],Ne=(r,e,t=0)=>(He.encode(r,e,t),e),_e=r=>He.encodingLength(r)});var mt,_i,ji,Ge,gt=g(()=>{a();fe();yt();mt=(r,e)=>{let t=e.byteLength,n=_e(r),i=n+_e(t),s=new Uint8Array(i+t);return Ne(r,s,0),Ne(t,s,n),s.set(e,i),new Ge(r,t,e,s)},_i=r=>{let e=oe(r),[t,n]=We(e),[i,s]=We(e.subarray(n)),o=e.subarray(n+s);if(o.byteLength!==i)throw new Error("Incorrect length");return new Ge(t,i,o,e)},ji=(r,e)=>r===e?!0:r.code===e.code&&r.size===e.size&&pi(r.bytes,e.bytes),Ge=class{constructor(e,t,n,i){this.code=e,this.size=t,this.digest=n,this.bytes=i}}});var Xe,Mi,kt=g(()=>{a();gt();Xe=({name:r,code:e,encode:t})=>new Mi(r,e,t),Mi=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}async digest(e){if(e instanceof Uint8Array){let t=await this.encode(e);return mt(this.code,t)}else throw Error("Unknown type, must be binary type")}}});var br={};U(br,{sha256:()=>au,sha512:()=>cu});var Li,au,cu,zi=g(()=>{a();kt();Li=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),au=Xe({name:"sha2-256",code:18,encode:Li("SHA-256")}),cu=Xe({name:"sha2-512",code:19,encode:Li("SHA-512")})});var dr={};U(dr,{identity:()=>uu});var uu,qi=g(()=>{a();kt();fe();uu=Xe({name:"identity",code:0,encode:r=>oe(r)})});var Ri=g(()=>{a();fe()});var Pi=g(()=>{a()});var O,hu,bu,du,Qe,pu,$i,Vi,wt,Et,mu,xu,yu,Ji=g(()=>{a();yt();gt();lr();ar();fe();O=class{constructor(e,t,n,i){this.code=t,this.version=e,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Et,byteLength:Et,code:wt,version:wt,multihash:wt,bytes:wt,_baseCache:Et,asCID:Et})}toV0(){switch(this.version){case 0:return this;default:{let{code:e,multihash:t}=this;if(e!==Qe)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==pu)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return O.createV0(t)}}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,n=mt(e,t);return O.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&ji(this.multihash,e.multihash)}toString(e){let{bytes:t,version:n,_baseCache:i}=this;switch(n){case 0:return bu(t,i,e||K.encoder);default:return du(t,i,e||Ue.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return xu(/^0\.0/,yu),!!(e&&(e[Vi]||e.asCID===e))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof O)return e;if(e!=null&&e.asCID===e){let{version:t,code:n,multihash:i,bytes:s}=e;return new O(t,n,i,s||$i(t,n,i.bytes))}else if(e!=null&&e[Vi]===!0){let{version:t,multihash:n,code:i}=e,s=_i(n);return O.create(t,i,s)}else return null}static create(e,t,n){if(typeof t!="number")throw new Error("String codecs are no longer supported");switch(e){case 0:{if(t!==Qe)throw new Error(`Version 0 CID must use dag-pb (code: ${Qe}) block encoding`);return new O(e,t,n,n.bytes)}case 1:{let i=$i(e,t,n.bytes);return new O(e,t,n,i)}default:throw new Error("Invalid version")}}static createV0(e){return O.create(0,Qe,e)}static createV1(e,t){return O.create(1,e,t)}static decode(e){let[t,n]=O.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return t}static decodeFirst(e){let t=O.inspectBytes(e),n=t.size-t.multihashSize,i=oe(e.subarray(n,n+t.multihashSize));if(i.byteLength!==t.multihashSize)throw new Error("Incorrect length");let s=i.subarray(t.multihashSize-t.digestSize),o=new Ge(t.multihashCode,t.digestSize,s,i);return[t.version===0?O.createV0(o):O.createV1(t.codec,o),e.subarray(t.size)]}static inspectBytes(e){let t=0,n=()=>{let[d,I]=We(e.subarray(t));return t+=I,d},i=n(),s=Qe;if(i===18?(i=0,t=0):i===1&&(s=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let o=t,u=n(),c=n(),l=t+c,h=l-o;return{version:i,codec:s,multihashCode:u,digestSize:c,multihashSize:h,size:l}}static parse(e,t){let[n,i]=hu(e,t),s=O.decode(i);return s._baseCache.set(n,e),s}},hu=(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 Ue.prefix:{let t=e||Ue;return[Ue.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)]}}},bu=(r,e,t)=>{let{prefix:n}=t;if(n!==K.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);let i=e.get(n);if(i==null){let s=t.encode(r).slice(1);return e.set(n,s),s}else return i},du=(r,e,t)=>{let{prefix:n}=t,i=e.get(n);if(i==null){let s=t.encode(r);return e.set(n,s),s}else return i},Qe=112,pu=18,$i=(r,e,t)=>{let n=_e(r),i=n+_e(e),s=new Uint8Array(i+t.byteLength);return Ne(r,s,0),Ne(e,s,n),s.set(t,i),s},Vi=Symbol.for("@ipld/js-cid/CID"),wt={writable:!1,configurable:!1,enumerable:!0},Et={writable:!1,enumerable:!1,configurable:!1},mu="0.0.0-dev",xu=(r,e)=>{if(r.test(mu))console.warn(e);else throw new Error(e)},yu=`CID.isCID(v) is deprecated and will be removed in the next major release.
Following code pattern:

if (CID.isCID(value)) {
  doSomethingWithCID(value)
}

Is replaced with:

const cid = CID.asCID(value)
if (cid) {
  // Make sure to use cid instead of value
  doSomethingWithCID(cid)
}
`});var Hi=g(()=>{a();Ji();yt();fe();kt();gt()});var ae,z2,Bt=g(()=>{a();wi();Ei();Bi();Si();Ai();ar();Ii();lr();Ti();zi();qi();Ri();Pi();Hi();ae={...tr,...rr,...nr,...ir,...sr,...or,...cr,...ur,...fr},z2={...br,...dr}});function Wi(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}var Gi,pr,gu,St,xr=g(()=>{a();Bt();Gi=Wi("utf8","u",r=>{let e=new TextDecoder("utf8");return"u"+e.decode(r)},r=>new TextEncoder().encode(r.substring(1))),pr=Wi("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=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e}),gu={utf8:Gi,"utf-8":Gi,hex:ae.base16,latin1:pr,ascii:pr,binary:pr,...ae},St=gu});var Xi={};U(Xi,{toString:()=>ku});function ku(r,e="utf8"){let t=St[e];if(!t)throw new Error(`Unsupported encoding "${e}"`);return t.encoder.encode(r).substring(1)}var Qi=g(()=>{a();xr()});var Yi={};U(Yi,{fromString:()=>wu});function wu(r,e="utf8"){let t=St[e];if(!t)throw new Error(`Unsupported encoding "${e}"`);return t.decoder.decode(`${t.prefix}${r}`)}var Ki=g(()=>{a();xr()});var Zi={};U(Zi,{concat:()=>Eu});function Eu(r,e){e||(e=r.reduce((i,s)=>i+s.length,0));let t=new Uint8Array(e),n=0;for(let i of r)t.set(i,n),n+=i.length;return t}var es=g(()=>{a()});var mr=b((V2,ts)=>{a();"use strict";var rs=Zt(),je=ui(),{names:Ye}=fi(),{toString:At}=(Qi(),Xi),{fromString:Bu}=(Ki(),Yi),{concat:Su}=(es(),Zi),Oe={};for(let r in Ye){let e=r;Oe[Ye[e]]=e}Object.freeze(Oe);function Au(r){if(!(r instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return At(r,"base16")}function Iu(r){return Bu(r,"base16")}function Tu(r){if(!(r instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return At(rs.encode("base58btc",r)).slice(1)}function vu(r){let e=r instanceof Uint8Array?At(r):r;return rs.decode("z"+e)}function is(r){if(!(r instanceof Uint8Array))throw new Error("multihash must be a Uint8Array");if(r.length<2)throw new Error("multihash too short. must be > 2 bytes.");let e=je.decode(r);if(!ns(e))throw new Error(`multihash unknown function code: 0x${e.toString(16)}`);r=r.slice(je.decode.bytes);let t=je.decode(r);if(t<0)throw new Error(`multihash invalid length: ${t}`);if(r=r.slice(je.decode.bytes),r.length!==t)throw new Error(`multihash length inconsistent: 0x${At(r,"base16")}`);return{code:e,name:Oe[e],length:t,digest:r}}function Cu(r,e,t){if(!r||e===void 0)throw new Error("multihash encode requires at least two args: digest, code");let n=ss(e);if(!(r instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(t==null&&(t=r.length),t&&r.length!==t)throw new Error("digest length should be equal to specified length.");let i=je.encode(n),s=je.encode(t);return Su([i,s,r],i.length+s.length+r.length)}function ss(r){let e=r;if(typeof r=="string"){if(Ye[r]===void 0)throw new Error(`Unrecognized hash function named: ${r}`);e=Ye[r]}if(typeof e!="number")throw new Error(`Hash function code should be a number. Got: ${e}`);if(Oe[e]===void 0&&!yr(e))throw new Error(`Unrecognized function code: ${e}`);return e}function yr(r){return r>0&&r<16}function ns(r){return!!(yr(r)||Oe[r])}function os(r){is(r)}function Fu(r){return os(r),r.subarray(0,2)}ts.exports={names:Ye,codes:Oe,toHexString:Au,fromHexString:Iu,toB58String:Tu,fromB58String:vu,decode:is,encode:Cu,coerceCode:ss,isAppCode:yr,validate:os,prefix:Fu,isValidCode:ns}});var us=b((J2,as)=>{a();as.exports=gr;var cs=128,Du=127,Uu=~Du,Nu=Math.pow(2,31);function gr(r,e,t){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw gr.bytes=0,new RangeError("Could not encode varint");e=e||[],t=t||0;for(var n=t;r>=Nu;)e[t++]=r&255|cs,r/=128;for(;r&Uu;)e[t++]=r&255|cs,r>>>=7;return e[t]=r|0,gr.bytes=t-n+1,e}});var hs=b((H2,ls)=>{a();ls.exports=kr;var _u=128,fs=127;function kr(r,e){var t=0,e=e||0,n=0,i=e,s,o=r.length;do{if(i>=o||n>49)throw kr.bytes=0,new RangeError("Could not decode varint");s=r[i++],t+=n<28?(s&fs)<<n:(s&fs)*Math.pow(2,n),n+=7}while(s>=_u);return kr.bytes=i-e,t}});var ds=b((W2,bs)=>{a();var ju=Math.pow(2,7),Ou=Math.pow(2,14),Mu=Math.pow(2,21),Lu=Math.pow(2,28),zu=Math.pow(2,35),qu=Math.pow(2,42),Ru=Math.pow(2,49),Pu=Math.pow(2,56),$u=Math.pow(2,63);bs.exports=function(r){return r<ju?1:r<Ou?2:r<Mu?3:r<Lu?4:r<zu?5:r<qu?6:r<Ru?7:r<Pu?8:r<$u?9:10}});var wr=b((G2,ps)=>{a();ps.exports={encode:us(),decode:hs(),encodingLength:ds()}});var xs={};U(xs,{concat:()=>Vu});function Vu(r,e){e||(e=r.reduce((i,s)=>i+s.length,0));let t=new Uint8Array(e),n=0;for(let i of r)t.set(i,n),n+=i.length;return t}var ys=g(()=>{a()});function ms(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}var gs,Er,Ju,It,Br=g(()=>{a();Bt();gs=ms("utf8","u",r=>{let e=new TextDecoder("utf8");return"u"+e.decode(r)},r=>new TextEncoder().encode(r.substring(1))),Er=ms("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=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e}),Ju={utf8:gs,"utf-8":gs,hex:ae.base16,latin1:Er,ascii:Er,binary:Er,...ae},It=Ju});var ks={};U(ks,{toString:()=>Hu});function Hu(r,e="utf8"){let t=It[e];if(!t)throw new Error(`Unsupported encoding "${e}"`);return t.encoder.encode(r).substring(1)}var ws=g(()=>{a();Br()});var Es={};U(Es,{fromString:()=>Wu});function Wu(r,e="utf8"){let t=It[e];if(!t)throw new Error(`Unsupported encoding "${e}"`);return t.decoder.decode(`${t.prefix}${r}`)}var Bs=g(()=>{a();Br()});var Sr=b((Z2,Ss)=>{a();"use strict";var As=wr(),{toString:Gu}=(ws(),ks),{fromString:Xu}=(Bs(),Es);Ss.exports={numberToUint8Array:Qu,uint8ArrayToNumber:Is,varintUint8ArrayEncode:Yu,varintEncode:Ku};function Is(r){return parseInt(Gu(r,"base16"),16)}function Qu(r){let e=r.toString(16);return e.length%2==1&&(e="0"+e),Xu(e,"base16")}function Yu(r){return Uint8Array.from(As.encode(Is(r)))}function Ku(r){return Uint8Array.from(As.encode(r))}});var vs=b((eh,Ts)=>{a();"use strict";var Zu=Object.freeze({identity:0,cidv1:1,cidv2:2,cidv3:3,ip4:4,tcp:6,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,dccp:33,"murmur3-128":34,"murmur3-32":35,ip6:41,ip6zone:42,path:47,multicodec:48,multihash:49,multiaddr:50,multibase:51,dns:53,dns4:54,dns6:55,dnsaddr:56,protobuf:80,cbor:81,raw:85,"dbl-sha2-256":86,rlp:96,bencode:99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,sctp:132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"eth-receipt-log-trie":153,"eth-reciept-log":154,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"caip-50":202,streamid:206,"stellar-block":208,"stellar-tx":209,md4:212,md5:213,bmt:214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,zeronet:230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"bls12_381-g1g2-pub":238,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,udp:273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,udt:301,utp:302,unix:400,thread:406,p2p:421,ipfs:421,https:443,onion:444,onion3:445,garlic64:446,garlic32:447,tls:448,noise:454,quic:460,ws:477,wss:478,"p2p-websocket-star":479,http:480,"swhid-1-snp":496,json:512,messagepack:513,"libp2p-peer-record":769,"libp2p-relay-rsvp":770,"car-index-sorted":1024,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"p256-pub":4608,"p384-pub":4609,"p521-pub":4610,"ed448-pub":4611,"x448-pub":4612,"ed25519-priv":4864,"secp256k1-priv":4865,"x25519-priv":4866,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332,"skynet-ns":11639056,"arweave-ns":11704592});Ts.exports={baseTable:Zu}});var Fs=b((th,Cs)=>{a();"use strict";var{baseTable:Ar}=vs(),el=Sr().varintEncode,Ir={},Tr={},Tt={};for(let r in Ar){let e=r,t=Ar[e];Ir[e]=el(t);let n=e.toUpperCase().replace(/-/g,"_");Tr[n]=t,Tt[t]||(Tt[t]=e)}Object.freeze(Ir);Object.freeze(Tr);Object.freeze(Tt);var tl=Object.freeze(Ar);Cs.exports={nameToVarint:Ir,constantToCode:Tr,nameToCode:tl,codeToName:Tt}});var qs=b((rh,Ds)=>{a();"use strict";var vt=wr(),{concat:rl}=(ys(),xs),Us=Sr(),{nameToVarint:Ct,constantToCode:nl,nameToCode:Ns,codeToName:vr}=Fs();function il(r,e){let t;if(r instanceof Uint8Array)t=Us.varintUint8ArrayEncode(r);else if(Ct[r])t=Ct[r];else throw new Error("multicodec not recognized");return rl([t,e],t.length+e.length)}function sl(r){return vt.decode(r),r.slice(vt.decode.bytes)}function _s(r){let e=vt.decode(r),t=vr[e];if(t===void 0)throw new Error(`Code "${e}" not found`);return t}function js(r){return vr[r]}function Os(r){let e=Ns[r];if(e===void 0)throw new Error(`Codec "${r}" not found`);return e}function Ms(r){return vt.decode(r)}function Ls(r){let e=Ct[r];if(e===void 0)throw new Error(`Codec "${r}" not found`);return e}function zs(r){return Us.varintEncode(r)}function ol(r){return _s(r)}function al(r){return js(r)}function cl(r){return Os(r)}function ul(r){return Ms(r)}function ll(r){return Ls(r)}function fl(r){return Array.from(zs(r))}Ds.exports={addPrefix:il,rmPrefix:sl,getNameFromData:_s,getNameFromCode:js,getCodeFromName:Os,getCodeFromData:Ms,getVarintFromName:Ls,getVarintFromCode:zs,getCodec:ol,getName:al,getNumber:cl,getCode:ul,getCodeVarint:ll,getVarint:fl,...nl,nameToVarint:Ct,nameToCode:Ns,codeToName:vr}});var Ps=b((nh,Rs)=>{a();"use strict";var hl=mr(),bl={checkCIDComponents:function(r){if(r==null)return"null values are not valid CIDs";if(!(r.version===0||r.version===1))return"Invalid version, must be a number equal to 1 or 0";if(typeof r.codec!="string")return"codec must be string";if(r.version===0){if(r.codec!=="dag-pb")return"codec must be 'dag-pb' for CIDv0";if(r.multibaseName!=="base58btc")return"multibaseName must be 'base58btc' for CIDv0"}if(!(r.multihash instanceof Uint8Array))return"multihash must be a Uint8Array";try{hl.validate(r.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};Rs.exports=bl});var $s={};U($s,{concat:()=>dl});function dl(r,e){e||(e=r.reduce((i,s)=>i+s.length,0));let t=new Uint8Array(e),n=0;for(let i of r)t.set(i,n),n+=i.length;return t}var Vs=g(()=>{a()});function Js(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}var Hs,Cr,pl,Ws,Gs=g(()=>{a();Bt();Hs=Js("utf8","u",r=>{let e=new TextDecoder("utf8");return"u"+e.decode(r)},r=>new TextEncoder().encode(r.substring(1))),Cr=Js("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=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e}),pl={utf8:Hs,"utf-8":Hs,hex:ae.base16,latin1:Cr,ascii:Cr,binary:Cr,...ae},Ws=pl});var Xs={};U(Xs,{toString:()=>xl});function xl(r,e="utf8"){let t=Ws[e];if(!t)throw new Error(`Unsupported encoding "${e}"`);return t.encoder.encode(r).substring(1)}var Qs=g(()=>{a();Gs()});var Ys={};U(Ys,{equals:()=>yl});function yl(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 Ks=g(()=>{a()});var we=b((ah,Zs)=>{a();"use strict";var Ft=mr(),Fr=Zt(),ke=qs(),ml=Ps(),{concat:eo}=(Vs(),$s),{toString:gl}=(Qs(),Xs),{equals:kl}=(Ks(),Ys),Dt=ke.nameToCode,wl=Object.keys(Dt).reduce((r,e)=>(r[Dt[e]]=e,r),{}),to=Symbol.for("@ipld/js-cid/CID"),J=class{constructor(e,t,n,i){if(this.version,this.codec,this.multihash,Object.defineProperty(this,to,{value:!0}),J.isCID(e)){let s=e;this.version=s.version,this.codec=s.codec,this.multihash=s.multihash,this.multibaseName=s.multibaseName||(s.version===0?"base58btc":"base32");return}if(typeof e=="string"){let s=Fr.isEncoded(e);if(s){let o=Fr.decode(e);this.version=parseInt(o[0].toString(),16),this.codec=ke.getCodec(o.slice(1)),this.multihash=ke.rmPrefix(o.slice(1)),this.multibaseName=s}else this.version=0,this.codec="dag-pb",this.multihash=Ft.fromB58String(e),this.multibaseName="base58btc";J.validateCID(this),Object.defineProperty(this,"string",{value:e});return}if(e instanceof Uint8Array){let s=parseInt(e[0].toString(),16);if(s===1){let o=e;this.version=s,this.codec=ke.getCodec(o.slice(1)),this.multihash=ke.rmPrefix(o.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";J.validateCID(this);return}this.version=e,typeof t=="number"&&(t=wl[t]),this.codec=t,this.multihash=n,this.multibaseName=i||(e===0?"base58btc":"base32"),J.validateCID(this)}get bytes(){let e=this._bytes;if(!e){if(this.version===0)e=this.multihash;else if(this.version===1){let t=ke.getCodeVarint(this.codec);e=eo([[1],t,this.multihash],1+t.byteLength+this.multihash.byteLength)}else throw new Error("unsupported version");Object.defineProperty(this,"_bytes",{value:e})}return e}get prefix(){let e=ke.getCodeVarint(this.codec),t=Ft.prefix(this.multihash);return eo([[this.version],e,t],1+e.byteLength+t.byteLength)}get code(){return Dt[this.codec]}toV0(){if(this.codec!=="dag-pb")throw new Error("Cannot convert a non dag-pb CID to CIDv0");let{name:e,length:t}=Ft.decode(this.multihash);if(e!=="sha2-256")throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(t!==32)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new J(0,this.codec,this.multihash)}toV1(){return new J(1,this.codec,this.multihash,this.multibaseName)}toBaseEncodedString(e=this.multibaseName){if(this.string&&this.string.length!==0&&e===this.multibaseName)return this.string;let t;if(this.version===0){if(e!=="base58btc")throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=Ft.toB58String(this.multihash)}else if(this.version===1)t=gl(Fr.encode(e,this.bytes));else throw new Error("unsupported version");return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&kl(this.multihash,e.multihash)}static validateCID(e){let t=ml.checkCIDComponents(e);if(t)throw new Error(t)}static isCID(e){return e instanceof J||Boolean(e&&e[to])}};J.codecs=Dt;Zs.exports=J});var Ee=b(Dr=>{a();"use strict";var El=we(),Bl=(r,e)=>(e&&e.push(r.multihash.buffer),r);Dr.encodeCID=Bl;var Sl=r=>{let e=r;return Object.setPrototypeOf(e.multihash,Uint8Array.prototype),Object.setPrototypeOf(e,El.prototype),Object.defineProperty(e,Symbol.for("@ipld/js-cid/CID"),{value:!0}),e};Dr.decodeCID=Sl});var no=b((uh,ro)=>{ro.exports={name:"ipld-block",version:"0.11.1",description:"JavaScript Implementation of IPLD Block",leadMaintainer:"Volker Mische <volker.mische@gmail.com>",main:"src/index.js",types:"dist/src/index.d.ts",scripts:{lint:"aegir lint",check:"tsc --noEmit --noErrorTruncation",test:"aegir test","test:node":"aegir test --target node","test:browser":"aegir test --target browser",release:"aegir release --docs","release-minor":"aegir release --type minor --docs","release-major":"aegir release --type major --docs",coverage:"aegir coverage","coverage-publish":"aegir coverage --provider coveralls",docs:"aegir docs",prepare:"aegir build --no-bundle",prepublishOnly:"aegir build"},"pre-push":["lint","test"],repository:{type:"git",url:"git+https://github.com/ipld/js-ipld-block.git"},keywords:["IPLD"],license:"MIT",bugs:{url:"https://github.com/ipld/js-ipld-block/issues"},homepage:"https://github.com/ipld/js-ipld-block#readme",devDependencies:{aegir:"^31.0.4",uint8arrays:"^2.1.3"},dependencies:{cids:"^1.0.0"},engines:{node:">=6.0.0",npm:">=3.0.0"},contributors:["David Dias <daviddias.p@gmail.com>","Volker Mische <volker.mische@gmail.com>","Friedel Ziegelmayer <dignifiedquire@gmail.com>","Irakli Gozalishvili <contact@gozala.io>","achingbrain <alex@achingbrain.net>","\u1D20\u026A\u1D04\u1D1B\u1D0F\u0280 \u0299\u1D0A\u1D07\u029F\u1D0B\u029C\u1D0F\u029F\u1D0D <victorbjelkholm@gmail.com>","Alan Shaw <alan.shaw@protocol.ai>","Charlie <the_charlie_daly@hotmail.co.uk>","Diogo Silva <fsdiogo@gmail.com>","Hugo Dias <hugomrdias@gmail.com>","Mikeal Rogers <mikeal.rogers@gmail.com>","Richard Littauer <richard.littauer@gmail.com>","Richard Schneider <makaretu@gmail.com>","Xmader <xmader@outlook.com>"]}});var uo=b((lh,io)=>{a();"use strict";var Al=we(),{version:Il}=no(),so=Symbol.for("@ipld/js-ipld-block/block"),oo={writable:!1,configurable:!1,enumerable:!0},ao=class{constructor(e,t){if(!e||!(e instanceof Uint8Array))throw new Error("first argument  must be a Uint8Array");if(!t||!Al.isCID(t))throw new Error("second argument must be a CID");this.data=e,this.cid=t,Object.defineProperties(this,{data:oo,cid:oo})}get _data(){return vl(),this.data}get _cid(){return Tl(),this.cid}get[Symbol.toStringTag](){return"Block"}get[so](){return!0}static isBlock(e){return Boolean(e&&e[so])}},co=(r,e)=>{let t=!1;return()=>{if(r.test(Il))t||(t=!0,console.warn(e));else throw new Error(e)}},Tl=co(/^0\.10|^0\.11/,"block._cid is deprecated and will be removed in 0.12 release. Please use block.cid instead"),vl=co(/^0\.10|^0.11/,"block._data is deprecated and will be removed in 0.12 release. Please use block.data instead");io.exports=ao});var fo=b(Ut=>{a();"use strict";var{encodeCID:Cl,decodeCID:Fl}=Ee(),lo=uo(),Dl=({cid:r,data:e},t)=>(t&&t.push(e.buffer),{cid:Cl(r,t),data:e});Ut.encodeBlock=Dl;var Ul=({cid:r,data:e})=>new lo(e,Fl(r));Ut.decodeBlock=Ul;Ut.Block=lo});var xo=b((hh,ho)=>{a();"use strict";var Nl=Ve(),{encodeCID:Ke,decodeCID:bo}=Ee(),{decodeError:_l}=lt(),{encodeBlock:jl,decodeBlock:po}=fo(),Ze=we(),Me=class extends Nl{constructor(e){super("block",["put","get","rm","stat"],e)}};Me.prototype.get=async function(e,t={}){let{transfer:n}=t,{block:i}=await this.remote.get({...t,cid:Ke(new Ze(e),n)});return po(i)};Me.prototype.put=async function(e,t={}){let{transfer:n}=t;delete t.progress;let i=await this.remote.put({...t,cid:t.cid==null?void 0:Ke(new Ze(t.cid),n),block:e instanceof Uint8Array?e:jl(e,n)});return po(i.block)};Me.prototype.rm=async function*(e,t={}){let{transfer:n}=t;yield*(await this.remote.rm({...t,cids:Array.isArray(e)?e.map(s=>Ke(new Ze(s),n)):[Ke(new Ze(e),n)]})).map(Ol)};Me.prototype.stat=async function(e,t={}){let{transfer:n}=t,i=await this.remote.stat({...t,cid:Ke(new Ze(e),n)});return{...i,cid:bo(i.cid)}};var Ol=r=>{let e=bo(r.cid);return r.error?{cid:e,error:_l(r.error)}:{cid:e}};ho.exports=Me});var yo=b(Ur=>{a();"use strict";var Ml=we(),{encodeCID:Ll,decodeCID:zl}=Ee(),ql=({dagNode:r,cids:e})=>{for(let t of e)zl(t);return r};Ur.decodeNode=ql;var Rl=(r,e)=>{let t=[];return Nr(r,t,e),{dagNode:r,cids:t}};Ur.encodeNode=Rl;var Nr=(r,e,t)=>{if(r!=null&&typeof r=="object")if(Ml.isCID(r))e.push(r),Ll(r,t);else if(r instanceof ArrayBuffer)t&&t.push(r);else if(ArrayBuffer.isView(r))t&&t.push(r.buffer);else if(Array.isArray(r))for(let n of r)Nr(n,e,t);else for(let n of Object.values(r))Nr(n,e,t)}});var ko=b((dh,mo)=>{a();"use strict";var Pl=Ve(),{encodeCID:Nt,decodeCID:go}=Ee(),{encodeNode:$l,decodeNode:Vl}=yo(),Le=class extends Pl{constructor(e){super("dag",["put","get","resolve","tree"],e)}};Le.prototype.put=async function(e,t={}){let{cid:n}=t,i=await this.remote.put({...t,encodedCid:n!=null?Nt(n):void 0,dagNode:$l(e,t.transfer)});return go(i)};Le.prototype.get=async function(e,t={}){let{value:n,remainderPath:i}=await this.remote.get({...t,cid:Nt(e,t.transfer)});return{value:Vl(n),remainderPath:i}};Le.prototype.resolve=async function(e,t={}){let{cid:n,remainderPath:i}=await this.remote.resolve({...t,cid:Jl(e,t.transfer)});return{cid:go(n),remainderPath:i}};Le.prototype.tree=async function*(e,t={}){yield*await this.remote.tree({...t,cid:Nt(e,t.transfer)})};var Jl=(r,e)=>typeof r=="string"?r:Nt(r,e);mo.exports=Le});var wo=b(et=>{a();"use strict";var{encodeError:Hl,decodeError:Wl}=lt(),Gl=async function*({port:r},e){let t=o=>{},n=()=>new Promise(o=>t=o),i=()=>(r.postMessage({method:"next"}),n());r.onmessage=o=>t(o.data);let s=!1;try{for(;!s;){let{done:o,value:u,error:c}=await i();if(s=o,c!=null)throw Wl(c);u!=null&&(yield e(u))}}finally{s||r.postMessage({method:"return"}),r.close()}};et.decodeIterable=Gl;var Ql=(r,e,t)=>{let{port1:n,port2:i}=new MessageChannel,s=[],o=Xl(r);return n.onmessage=async({data:{method:u}})=>{switch(u){case"next":{try{let{done:c,value:l}=await o.next();c?(n.postMessage({type:"next",done:!0}),n.close()):(s.length=0,n.postMessage({type:"next",done:!1,value:e(l,s)},s))}catch(c){n.postMessage({type:"throw",error:Hl(c)}),n.close()}break}case"return":{n.close(),o.return&&o.return();break}default:break}},n.start(),t.push(i),{type:"RemoteIterable",port:i}};et.encodeIterable=Ql;var Xl=r=>{if(r!=null){if(typeof r[Symbol.asyncIterator]=="function")return r[Symbol.asyncIterator]();if(typeof r[Symbol.iterator]=="function")return r[Symbol.iterator]()}throw TypeError("Value must be async or sync iterable")},Yl=(r,e)=>{let{port1:t,port2:n}=new MessageChannel;return t.onmessage=({data:i})=>r.apply(null,i),e.push(n),{type:"RemoteCallback",port:n}};et.encodeCallback=Yl;var Kl=({port:r})=>(t,n=[])=>{r.postMessage(t,[...new Set(n)])};et.decodeCallback=Kl});var Bo=b((xh,Eo)=>{a();"use strict";async function*Zl(r,e={}){let t=r.getReader();try{for(;;){let n=await t.read();if(n.done)return;yield n.value}}finally{e.preventCancel!==!0&&t.cancel(),t.releaseLock()}}Eo.exports=Zl});var Ao=b((yh,So)=>{a();"use strict";So.exports=ef;function ef(r,e){for(var t=new Array(arguments.length-1),n=0,i=2,s=!0;i<arguments.length;)t[n++]=arguments[i++];return new Promise(function(u,c){t[n]=function(h){if(s)if(s=!1,h)c(h);else{for(var d=new Array(arguments.length-1),I=0;I<d.length;)d[I++]=arguments[I];u.apply(null,d)}};try{r.apply(e||null,t)}catch(l){s&&(s=!1,c(l))}})}});var Co=b(Io=>{a();"use strict";var _t=Io;_t.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&e.charAt(t)==="=";)++n;return Math.ceil(e.length*3)/4-n};var ze=new Array(64),To=new Array(123);for(var Z=0;Z<64;)To[ze[Z]=Z<26?Z+65:Z<52?Z+71:Z<62?Z-4:Z-59|43]=Z++;_t.encode=function(e,t,n){for(var i=null,s=[],o=0,u=0,c;t<n;){var l=e[t++];switch(u){case 0:s[o++]=ze[l>>2],c=(l&3)<<4,u=1;break;case 1:s[o++]=ze[c|l>>4],c=(l&15)<<2,u=2;break;case 2:s[o++]=ze[c|l>>6],s[o++]=ze[l&63],u=0;break}o>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),o=0)}return u&&(s[o++]=ze[c],s[o++]=61,u===1&&(s[o++]=61)),i?(o&&i.push(String.fromCharCode.apply(String,s.slice(0,o))),i.join("")):String.fromCharCode.apply(String,s.slice(0,o))};var vo="invalid encoding";_t.decode=function(e,t,n){for(var i=n,s=0,o,u=0;u<e.length;){var c=e.charCodeAt(u++);if(c===61&&s>1)break;if((c=To[c])===void 0)throw Error(vo);switch(s){case 0:o=c,s=1;break;case 1:t[n++]=o<<2|(c&48)>>4,o=c,s=2;break;case 2:t[n++]=(o&15)<<4|(c&60)>>2,o=c,s=3;break;case 3:t[n++]=(o&3)<<6|c,s=0;break}}if(s===1)throw Error(vo);return n-i};_t.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var Do=b((gh,Fo)=>{a();"use strict";Fo.exports=jt;function jt(){this._listeners={}}jt.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this};jt.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var n=this._listeners[e],i=0;i<n.length;)n[i].fn===t?n.splice(i,1):++i;return this};jt.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],i=1;i<arguments.length;)n.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,n)}return this}});var Lo=b((kh,Uo)=>{a();"use strict";Uo.exports=No(No);function No(r){return typeof Float32Array!="undefined"?function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),n=t[3]===128;function i(c,l,h){e[0]=c,l[h]=t[0],l[h+1]=t[1],l[h+2]=t[2],l[h+3]=t[3]}function s(c,l,h){e[0]=c,l[h]=t[3],l[h+1]=t[2],l[h+2]=t[1],l[h+3]=t[0]}r.writeFloatLE=n?i:s,r.writeFloatBE=n?s:i;function o(c,l){return t[0]=c[l],t[1]=c[l+1],t[2]=c[l+2],t[3]=c[l+3],e[0]}function u(c,l){return t[3]=c[l],t[2]=c[l+1],t[1]=c[l+2],t[0]=c[l+3],e[0]}r.readFloatLE=n?o:u,r.readFloatBE=n?u:o}():function(){function e(n,i,s,o){var u=i<0?1:0;if(u&&(i=-i),i===0)n(1/i>0?0:2147483648,s,o);else if(isNaN(i))n(2143289344,s,o);else if(i>34028234663852886e22)n((u<<31|2139095040)>>>0,s,o);else if(i<11754943508222875e-54)n((u<<31|Math.round(i/1401298464324817e-60))>>>0,s,o);else{var c=Math.floor(Math.log(i)/Math.LN2),l=Math.round(i*Math.pow(2,-c)*8388608)&8388607;n((u<<31|c+127<<23|l)>>>0,s,o)}}r.writeFloatLE=e.bind(null,_o),r.writeFloatBE=e.bind(null,jo);function t(n,i,s){var o=n(i,s),u=(o>>31)*2+1,c=o>>>23&255,l=o&8388607;return c===255?l?NaN:u*Infinity:c===0?u*1401298464324817e-60*l:u*Math.pow(2,c-150)*(l+8388608)}r.readFloatLE=t.bind(null,Oo),r.readFloatBE=t.bind(null,Mo)}(),typeof Float64Array!="undefined"?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),n=t[7]===128;function i(c,l,h){e[0]=c,l[h]=t[0],l[h+1]=t[1],l[h+2]=t[2],l[h+3]=t[3],l[h+4]=t[4],l[h+5]=t[5],l[h+6]=t[6],l[h+7]=t[7]}function s(c,l,h){e[0]=c,l[h]=t[7],l[h+1]=t[6],l[h+2]=t[5],l[h+3]=t[4],l[h+4]=t[3],l[h+5]=t[2],l[h+6]=t[1],l[h+7]=t[0]}r.writeDoubleLE=n?i:s,r.writeDoubleBE=n?s:i;function o(c,l){return t[0]=c[l],t[1]=c[l+1],t[2]=c[l+2],t[3]=c[l+3],t[4]=c[l+4],t[5]=c[l+5],t[6]=c[l+6],t[7]=c[l+7],e[0]}function u(c,l){return t[7]=c[l],t[6]=c[l+1],t[5]=c[l+2],t[4]=c[l+3],t[3]=c[l+4],t[2]=c[l+5],t[1]=c[l+6],t[0]=c[l+7],e[0]}r.readDoubleLE=n?o:u,r.readDoubleBE=n?u:o}():function(){function e(n,i,s,o,u,c){var l=o<0?1:0;if(l&&(o=-o),o===0)n(0,u,c+i),n(1/o>0?0:2147483648,u,c+s);else if(isNaN(o))n(0,u,c+i),n(2146959360,u,c+s);else if(o>17976931348623157e292)n(0,u,c+i),n((l<<31|2146435072)>>>0,u,c+s);else{var h;if(o<22250738585072014e-324)h=o/5e-324,n(h>>>0,u,c+i),n((l<<31|h/4294967296)>>>0,u,c+s);else{var d=Math.floor(Math.log(o)/Math.LN2);d===1024&&(d=1023),h=o*Math.pow(2,-d),n(h*4503599627370496>>>0,u,c+i),n((l<<31|d+1023<<20|h*1048576&1048575)>>>0,u,c+s)}}}r.writeDoubleLE=e.bind(null,_o,0,4),r.writeDoubleBE=e.bind(null,jo,4,0);function t(n,i,s,o,u){var c=n(o,u+i),l=n(o,u+s),h=(l>>31)*2+1,d=l>>>20&2047,I=4294967296*(l&1048575)+c;return d===2047?I?NaN:h*Infinity:d===0?h*5e-324*I:h*Math.pow(2,d-1075)*(I+4503599627370496)}r.readDoubleLE=t.bind(null,Oo,0,4),r.readDoubleBE=t.bind(null,Mo,4,0)}(),r}function _o(r,e,t){e[t]=r&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24}function jo(r,e,t){e[t]=r>>>24,e[t+1]=r>>>16&255,e[t+2]=r>>>8&255,e[t+3]=r&255}function Oo(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0}function Mo(r,e){return(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}});var zo=b((exports,module)=>{a();"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(r){}return null}});var Ro=b(qo=>{a();"use strict";var _r=qo;_r.length=function(e){for(var t=0,n=0,i=0;i<e.length;++i)n=e.charCodeAt(i),n<128?t+=1:n<2048?t+=2:(n&64512)==55296&&(e.charCodeAt(i+1)&64512)==56320?(++i,t+=4):t+=3;return t};_r.read=function(e,t,n){var i=n-t;if(i<1)return"";for(var s=null,o=[],u=0,c;t<n;)c=e[t++],c<128?o[u++]=c:c>191&&c<224?o[u++]=(c&31)<<6|e[t++]&63:c>239&&c<365?(c=((c&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,o[u++]=55296+(c>>10),o[u++]=56320+(c&1023)):o[u++]=(c&15)<<12|(e[t++]&63)<<6|e[t++]&63,u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):String.fromCharCode.apply(String,o.slice(0,u))};_r.write=function(e,t,n){for(var i=n,s,o,u=0;u<e.length;++u)s=e.charCodeAt(u),s<128?t[n++]=s:s<2048?(t[n++]=s>>6|192,t[n++]=s&63|128):(s&64512)==55296&&((o=e.charCodeAt(u+1))&64512)==56320?(s=65536+((s&1023)<<10)+(o&1023),++u,t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128);return n-i}});var $o=b((Eh,Po)=>{a();"use strict";Po.exports=tf;function tf(r,e,t){var n=t||8192,i=n>>>1,s=null,o=n;return function(c){if(c<1||c>i)return r(c);o+c>n&&(s=r(n),o=0);var l=e.call(s,o,o+=c);return o&7&&(o=(o|7)+1),l}}});var Jo=b((Bh,Vo)=>{a();"use strict";Vo.exports=M;var tt=be();function M(r,e){this.lo=r>>>0,this.hi=e>>>0}var Be=M.zero=new M(0,0);Be.toNumber=function(){return 0};Be.zzEncode=Be.zzDecode=function(){return this};Be.length=function(){return 1};var rf=M.zeroHash="\0\0\0\0\0\0\0\0";M.fromNumber=function(e){if(e===0)return Be;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new M(n,i)};M.from=function(e){if(typeof e=="number")return M.fromNumber(e);if(tt.isString(e))if(tt.Long)e=tt.Long.fromString(e);else return M.fromNumber(parseInt(e,10));return e.low||e.high?new M(e.low>>>0,e.high>>>0):Be};M.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+n*4294967296)}return this.lo+this.hi*4294967296};M.prototype.toLong=function(e){return tt.Long?new tt.Long(this.lo|0,this.hi|0,Boolean(e)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(e)}};var de=String.prototype.charCodeAt;M.fromHash=function(e){return e===rf?Be:new M((de.call(e,0)|de.call(e,1)<<8|de.call(e,2)<<16|de.call(e,3)<<24)>>>0,(de.call(e,4)|de.call(e,5)<<8|de.call(e,6)<<16|de.call(e,7)<<24)>>>0)};M.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};M.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};M.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};M.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}});var be=b(jr=>{a();"use strict";var p=jr;p.asPromise=Ao();p.base64=Co();p.EventEmitter=Do();p.float=Lo();p.inquire=zo();p.utf8=Ro();p.pool=$o();p.LongBits=Jo();p.isNode=Boolean(typeof globalThis!="undefined"&&globalThis&&globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);p.global=p.isNode&&globalThis||typeof window!="undefined"&&window||typeof self!="undefined"&&self||jr;p.emptyArray=Object.freeze?Object.freeze([]):[];p.emptyObject=Object.freeze?Object.freeze({}):{};p.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};p.isString=function(e){return typeof e=="string"||e instanceof String};p.isObject=function(e){return e&&typeof e=="object"};p.isset=p.isSet=function(e,t){var n=e[t];return n!=null&&e.hasOwnProperty(t)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};p.Buffer=function(){try{var r=p.inquire("buffer").Buffer;return r.prototype.utf8Write?r:null}catch(e){return null}}();p._Buffer_from=null;p._Buffer_allocUnsafe=null;p.newBuffer=function(e){return typeof e=="number"?p.Buffer?p._Buffer_allocUnsafe(e):new p.Array(e):p.Buffer?p._Buffer_from(e):typeof Uint8Array=="undefined"?e:new Uint8Array(e)};p.Array=typeof Uint8Array!="undefined"?Uint8Array:Array;p.Long=p.global.dcodeIO&&p.global.dcodeIO.Long||p.global.Long||p.inquire("long");p.key2Re=/^true|false|0|1$/;p.key32Re=/^-?(?:0|[1-9][0-9]*)$/;p.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;p.longToHash=function(e){return e?p.LongBits.from(e).toHash():p.LongBits.zeroHash};p.longFromHash=function(e,t){var n=p.LongBits.fromHash(e);return p.Long?p.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))};function Ho(r,e,t){for(var n=Object.keys(e),i=0;i<n.length;++i)(r[n[i]]===void 0||!t)&&(r[n[i]]=e[n[i]]);return r}p.merge=Ho;p.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function Wo(r){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&Ho(this,n)}return(e.prototype=Object.create(Error.prototype)).constructor=e,Object.defineProperty(e.prototype,"name",{get:function(){return r}}),e.prototype.toString=function(){return this.name+": "+this.message},e}p.newError=Wo;p.ProtocolError=Wo("ProtocolError");p.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var i=Object.keys(this),s=i.length-1;s>-1;--s)if(t[i[s]]===1&&this[i[s]]!==void 0&&this[i[s]]!==null)return i[s]}};p.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}};p.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};p._configure=function(){var r=p.Buffer;if(!r){p._Buffer_from=p._Buffer_allocUnsafe=null;return}p._Buffer_from=r.from!==Uint8Array.from&&r.from||function(t,n){return new r(t,n)},p._Buffer_allocUnsafe=r.allocUnsafe||function(t){return new r(t)}}});var Pr=b((Ah,Go)=>{a();"use strict";Go.exports=k;var V=be(),Or,Ot=V.LongBits,Xo=V.base64,Qo=V.utf8;function rt(r,e,t){this.fn=r,this.len=e,this.next=void 0,this.val=t}function Mr(){}function nf(r){this.head=r.head,this.tail=r.tail,this.len=r.len,this.next=r.states}function k(){this.len=0,this.head=new rt(Mr,0,0),this.tail=this.head,this.states=null}var Yo=function(){return V.Buffer?function(){return(k.create=function(){return new Or})()}:function(){return new k}};k.create=Yo();k.alloc=function(e){return new V.Array(e)};V.Array!==Array&&(k.alloc=V.pool(k.alloc,V.Array.prototype.subarray));k.prototype._push=function(e,t,n){return this.tail=this.tail.next=new rt(e,t,n),this.len+=t,this};function Lr(r,e,t){e[t]=r&255}function sf(r,e,t){for(;r>127;)e[t++]=r&127|128,r>>>=7;e[t]=r}function zr(r,e){this.len=r,this.next=void 0,this.val=e}zr.prototype=Object.create(rt.prototype);zr.prototype.fn=sf;k.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new zr((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};k.prototype.int32=function(e){return e<0?this._push(qr,10,Ot.fromNumber(e)):this.uint32(e)};k.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function qr(r,e,t){for(;r.hi;)e[t++]=r.lo&127|128,r.lo=(r.lo>>>7|r.hi<<25)>>>0,r.hi>>>=7;for(;r.lo>127;)e[t++]=r.lo&127|128,r.lo=r.lo>>>7;e[t++]=r.lo}k.prototype.uint64=function(e){var t=Ot.from(e);return this._push(qr,t.length(),t)};k.prototype.int64=k.prototype.uint64;k.prototype.sint64=function(e){var t=Ot.from(e).zzEncode();return this._push(qr,t.length(),t)};k.prototype.bool=function(e){return this._push(Lr,1,e?1:0)};function Rr(r,e,t){e[t]=r&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24}k.prototype.fixed32=function(e){return this._push(Rr,4,e>>>0)};k.prototype.sfixed32=k.prototype.fixed32;k.prototype.fixed64=function(e){var t=Ot.from(e);return this._push(Rr,4,t.lo)._push(Rr,4,t.hi)};k.prototype.sfixed64=k.prototype.fixed64;k.prototype.float=function(e){return this._push(V.float.writeFloatLE,4,e)};k.prototype.double=function(e){return this._push(V.float.writeDoubleLE,8,e)};var of=V.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var i=0;i<e.length;++i)t[n+i]=e[i]};k.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(Lr,1,0);if(V.isString(e)){var n=k.alloc(t=Xo.length(e));Xo.decode(e,n,0),e=n}return this.uint32(t)._push(of,t,e)};k.prototype.string=function(e){var t=Qo.length(e);return t?this.uint32(t)._push(Qo.write,t,e):this._push(Lr,1,0)};k.prototype.fork=function(){return this.states=new nf(this),this.head=this.tail=new rt(Mr,0,0),this.len=0,this};k.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new rt(Mr,0,0),this.len=0),this};k.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this};k.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t};k._configure=function(r){Or=r,k.create=Yo(),Or._configure()}});var ea=b((Ih,Ko)=>{a();"use strict";Ko.exports=ee;var Zo=Pr();(ee.prototype=Object.create(Zo.prototype)).constructor=ee;var pe=be();function ee(){Zo.call(this)}ee._configure=function(){ee.alloc=pe._Buffer_allocUnsafe,ee.writeBytesBuffer=pe.Buffer&&pe.Buffer.prototype instanceof Uint8Array&&pe.Buffer.prototype.set.name==="set"?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var i=0;i<e.length;)t[n++]=e[i++]}};ee.prototype.bytes=function(e){pe.isString(e)&&(e=pe._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(ee.writeBytesBuffer,t,e),this};function af(r,e,t){r.length<40?pe.utf8.write(r,e,t):e.utf8Write?e.utf8Write(r,t):e.write(r,t)}ee.prototype.string=function(e){var t=pe.Buffer.byteLength(e);return this.uint32(t),t&&this._push(af,t,e),this};ee._configure()});var Jr=b((Th,ta)=>{a();"use strict";ta.exports=F;var te=be(),$r,ra=te.LongBits,cf=te.utf8;function H(r,e){return RangeError("index out of range: "+r.pos+" + "+(e||1)+" > "+r.len)}function F(r){this.buf=r,this.pos=0,this.len=r.length}var na=typeof Uint8Array!="undefined"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new F(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new F(e);throw Error("illegal buffer")},ia=function(){return te.Buffer?function(t){return(F.create=function(i){return te.Buffer.isBuffer(i)?new $r(i):na(i)})(t)}:na};F.create=ia();F.prototype._slice=te.Array.prototype.subarray||te.Array.prototype.slice;F.prototype.uint32=function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,H(this,10);return e}}();F.prototype.int32=function(){return this.uint32()|0};F.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function Vr(){var r=new ra(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(r.lo=(r.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return r;if(r.lo=(r.lo|(this.buf[this.pos]&127)<<28)>>>0,r.hi=(r.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return r;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw H(this);if(r.lo=(r.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return r}return r.lo=(r.lo|(this.buf[this.pos++]&127)<<e*7)>>>0,r}if(this.len-this.pos>4){for(;e<5;++e)if(r.hi=(r.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return r}else for(;e<5;++e){if(this.pos>=this.len)throw H(this);if(r.hi=(r.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return r}throw Error("invalid varint encoding")}F.prototype.bool=function(){return this.uint32()!==0};function Mt(r,e){return(r[e-4]|r[e-3]<<8|r[e-2]<<16|r[e-1]<<24)>>>0}F.prototype.fixed32=function(){if(this.pos+4>this.len)throw H(this,4);return Mt(this.buf,this.pos+=4)};F.prototype.sfixed32=function(){if(this.pos+4>this.len)throw H(this,4);return Mt(this.buf,this.pos+=4)|0};function sa(){if(this.pos+8>this.len)throw H(this,8);return new ra(Mt(this.buf,this.pos+=4),Mt(this.buf,this.pos+=4))}F.prototype.float=function(){if(this.pos+4>this.len)throw H(this,4);var e=te.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};F.prototype.double=function(){if(this.pos+8>this.len)throw H(this,4);var e=te.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};F.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw H(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)};F.prototype.string=function(){var e=this.bytes();return cf.read(e,0,e.length)};F.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw H(this,e);this.pos+=e}else do if(this.pos>=this.len)throw H(this);while(this.buf[this.pos++]&128);return this};F.prototype.skipType=function(r){switch(r){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(r=this.uint32()&7)!=4;)this.skipType(r);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+r+" at offset "+this.pos)}return this};F._configure=function(r){$r=r,F.create=ia(),$r._configure();var e=te.Long?"toLong":"toNumber";te.merge(F.prototype,{int64:function(){return Vr.call(this)[e](!1)},uint64:function(){return Vr.call(this)[e](!0)},sint64:function(){return Vr.call(this).zzDecode()[e](!1)},fixed64:function(){return sa.call(this)[e](!0)},sfixed64:function(){return sa.call(this)[e](!1)}})}});var ua=b((vh,oa)=>{a();"use strict";oa.exports=Se;var aa=Jr();(Se.prototype=Object.create(aa.prototype)).constructor=Se;var ca=be();function Se(r){aa.call(this,r)}Se._configure=function(){ca.Buffer&&(Se.prototype._slice=ca.Buffer.prototype.slice)};Se.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))};Se._configure()});var fa=b((Ch,la)=>{a();"use strict";la.exports=nt;var Hr=be();(nt.prototype=Object.create(Hr.EventEmitter.prototype)).constructor=nt;function nt(r,e,t){if(typeof r!="function")throw TypeError("rpcImpl must be a function");Hr.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(t)}nt.prototype.rpcCall=function r(e,t,n,i,s){if(!i)throw TypeError("request must be specified");var o=this;if(!s)return Hr.asPromise(r,o,e,t,n,i);if(!o.rpcImpl){setTimeout(function(){s(Error("already ended"))},0);return}try{return o.rpcImpl(e,t[o.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(c,l){if(c)return o.emit("error",c,e),s(c);if(l===null){o.end(!0);return}if(!(l instanceof n))try{l=n[o.responseDelimited?"decodeDelimited":"decode"](l)}catch(h){return o.emit("error",h,e),s(h)}return o.emit("data",l,e),s(null,l)})}catch(u){o.emit("error",u,e),setTimeout(function(){s(u)},0);return}};nt.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var ba=b(ha=>{a();"use strict";var uf=ha;uf.Service=fa()});var pa=b((Dh,da)=>{a();"use strict";da.exports={}});var ma=b(xa=>{a();"use strict";var P=xa;P.build="minimal";P.Writer=Pr();P.BufferWriter=ea();P.Reader=Jr();P.BufferReader=ua();P.util=be();P.rpc=ba();P.roots=pa();P.configure=ya;function ya(){P.util._configure(),P.Writer._configure(P.BufferWriter),P.Reader._configure(P.BufferReader)}ya()});var ka=b((Nh,ga)=>{a();"use strict";ga.exports=ma()});var Ea=b((_h,wa)=>{a();"use strict";var xe=ka(),qe=xe.Reader,Wr=xe.Writer,x=xe.util,L=xe.roots["ipfs-unixfs"]||(xe.roots["ipfs-unixfs"]={});L.Data=function(){function r(e){if(this.blocksizes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&(this[t[n]]=e[t[n]])}return r.prototype.Type=0,r.prototype.Data=x.newBuffer([]),r.prototype.filesize=x.Long?x.Long.fromBits(0,0,!0):0,r.prototype.blocksizes=x.emptyArray,r.prototype.hashType=x.Long?x.Long.fromBits(0,0,!0):0,r.prototype.fanout=x.Long?x.Long.fromBits(0,0,!0):0,r.prototype.mode=0,r.prototype.mtime=null,r.encode=function(t,n){if(n||(n=Wr.create()),n.uint32(8).int32(t.Type),t.Data!=null&&Object.hasOwnProperty.call(t,"Data")&&n.uint32(18).bytes(t.Data),t.filesize!=null&&Object.hasOwnProperty.call(t,"filesize")&&n.uint32(24).uint64(t.filesize),t.blocksizes!=null&&t.blocksizes.length)for(var i=0;i<t.blocksizes.length;++i)n.uint32(32).uint64(t.blocksizes[i]);return t.hashType!=null&&Object.hasOwnProperty.call(t,"hashType")&&n.uint32(40).uint64(t.hashType),t.fanout!=null&&Object.hasOwnProperty.call(t,"fanout")&&n.uint32(48).uint64(t.fanout),t.mode!=null&&Object.hasOwnProperty.call(t,"mode")&&n.uint32(56).uint32(t.mode),t.mtime!=null&&Object.hasOwnProperty.call(t,"mtime")&&L.UnixTime.encode(t.mtime,n.uint32(66).fork()).ldelim(),n},r.decode=function(t,n){t instanceof qe||(t=qe.create(t));for(var i=n===void 0?t.len:t.pos+n,s=new L.Data;t.pos<i;){var o=t.uint32();switch(o>>>3){case 1:s.Type=t.int32();break;case 2:s.Data=t.bytes();break;case 3:s.filesize=t.uint64();break;case 4:if(s.blocksizes&&s.blocksizes.length||(s.blocksizes=[]),(o&7)==2)for(var u=t.uint32()+t.pos;t.pos<u;)s.blocksizes.push(t.uint64());else s.blocksizes.push(t.uint64());break;case 5:s.hashType=t.uint64();break;case 6:s.fanout=t.uint64();break;case 7:s.mode=t.uint32();break;case 8:s.mtime=L.UnixTime.decode(t,t.uint32());break;default:t.skipType(o&7);break}}if(!s.hasOwnProperty("Type"))throw x.ProtocolError("missing required 'Type'",{instance:s});return s},r.fromObject=function(t){if(t instanceof L.Data)return t;var n=new L.Data;switch(t.Type){case"Raw":case 0:n.Type=0;break;case"Directory":case 1:n.Type=1;break;case"File":case 2:n.Type=2;break;case"Metadata":case 3:n.Type=3;break;case"Symlink":case 4:n.Type=4;break;case"HAMTShard":case 5:n.Type=5;break}if(t.Data!=null&&(typeof t.Data=="string"?x.base64.decode(t.Data,n.Data=x.newBuffer(x.base64.length(t.Data)),0):t.Data.length&&(n.Data=t.Data)),t.filesize!=null&&(x.Long?(n.filesize=x.Long.fromValue(t.filesize)).unsigned=!0:typeof t.filesize=="string"?n.filesize=parseInt(t.filesize,10):typeof t.filesize=="number"?n.filesize=t.filesize:typeof t.filesize=="object"&&(n.filesize=new x.LongBits(t.filesize.low>>>0,t.filesize.high>>>0).toNumber(!0))),t.blocksizes){if(!Array.isArray(t.blocksizes))throw TypeError(".Data.blocksizes: array expected");n.blocksizes=[];for(var i=0;i<t.blocksizes.length;++i)x.Long?(n.blocksizes[i]=x.Long.fromValue(t.blocksizes[i])).unsigned=!0:typeof t.blocksizes[i]=="string"?n.blocksizes[i]=parseInt(t.blocksizes[i],10):typeof t.blocksizes[i]=="number"?n.blocksizes[i]=t.blocksizes[i]:typeof t.blocksizes[i]=="object"&&(n.blocksizes[i]=new x.LongBits(t.blocksizes[i].low>>>0,t.blocksizes[i].high>>>0).toNumber(!0))}if(t.hashType!=null&&(x.Long?(n.hashType=x.Long.fromValue(t.hashType)).unsigned=!0:typeof t.hashType=="string"?n.hashType=parseInt(t.hashType,10):typeof t.hashType=="number"?n.hashType=t.hashType:typeof t.hashType=="object"&&(n.hashType=new x.LongBits(t.hashType.low>>>0,t.hashType.high>>>0).toNumber(!0))),t.fanout!=null&&(x.Long?(n.fanout=x.Long.fromValue(t.fanout)).unsigned=!0:typeof t.fanout=="string"?n.fanout=parseInt(t.fanout,10):typeof t.fanout=="number"?n.fanout=t.fanout:typeof t.fanout=="object"&&(n.fanout=new x.LongBits(t.fanout.low>>>0,t.fanout.high>>>0).toNumber(!0))),t.mode!=null&&(n.mode=t.mode>>>0),t.mtime!=null){if(typeof t.mtime!="object")throw TypeError(".Data.mtime: object expected");n.mtime=L.UnixTime.fromObject(t.mtime)}return n},r.toObject=function(t,n){n||(n={});var i={};if((n.arrays||n.defaults)&&(i.blocksizes=[]),n.defaults){if(i.Type=n.enums===String?"Raw":0,n.bytes===String?i.Data="":(i.Data=[],n.bytes!==Array&&(i.Data=x.newBuffer(i.Data))),x.Long){var s=new x.Long(0,0,!0);i.filesize=n.longs===String?s.toString():n.longs===Number?s.toNumber():s}else i.filesize=n.longs===String?"0":0;if(x.Long){var s=new x.Long(0,0,!0);i.hashType=n.longs===String?s.toString():n.longs===Number?s.toNumber():s}else i.hashType=n.longs===String?"0":0;if(x.Long){var s=new x.Long(0,0,!0);i.fanout=n.longs===String?s.toString():n.longs===Number?s.toNumber():s}else i.fanout=n.longs===String?"0":0;i.mode=0,i.mtime=null}if(t.Type!=null&&t.hasOwnProperty("Type")&&(i.Type=n.enums===String?L.Data.DataType[t.Type]:t.Type),t.Data!=null&&t.hasOwnProperty("Data")&&(i.Data=n.bytes===String?x.base64.encode(t.Data,0,t.Data.length):n.bytes===Array?Array.prototype.slice.call(t.Data):t.Data),t.filesize!=null&&t.hasOwnProperty("filesize")&&(typeof t.filesize=="number"?i.filesize=n.longs===String?String(t.filesize):t.filesize:i.filesize=n.longs===String?x.Long.prototype.toString.call(t.filesize):n.longs===Number?new x.LongBits(t.filesize.low>>>0,t.filesize.high>>>0).toNumber(!0):t.filesize),t.blocksizes&&t.blocksizes.length){i.blocksizes=[];for(var o=0;o<t.blocksizes.length;++o)typeof t.blocksizes[o]=="number"?i.blocksizes[o]=n.longs===String?String(t.blocksizes[o]):t.blocksizes[o]:i.blocksizes[o]=n.longs===String?x.Long.prototype.toString.call(t.blocksizes[o]):n.longs===Number?new x.LongBits(t.blocksizes[o].low>>>0,t.blocksizes[o].high>>>0).toNumber(!0):t.blocksizes[o]}return t.hashType!=null&&t.hasOwnProperty("hashType")&&(typeof t.hashType=="number"?i.hashType=n.longs===String?String(t.hashType):t.hashType:i.hashType=n.longs===String?x.Long.prototype.toString.call(t.hashType):n.longs===Number?new x.LongBits(t.hashType.low>>>0,t.hashType.high>>>0).toNumber(!0):t.hashType),t.fanout!=null&&t.hasOwnProperty("fanout")&&(typeof t.fanout=="number"?i.fanout=n.longs===String?String(t.fanout):t.fanout:i.fanout=n.longs===String?x.Long.prototype.toString.call(t.fanout):n.longs===Number?new x.LongBits(t.fanout.low>>>0,t.fanout.high>>>0).toNumber(!0):t.fanout),t.mode!=null&&t.hasOwnProperty("mode")&&(i.mode=t.mode),t.mtime!=null&&t.hasOwnProperty("mtime")&&(i.mtime=L.UnixTime.toObject(t.mtime,n)),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,xe.util.toJSONOptions)},r.DataType=function(){var e={},t=Object.create(e);return t[e[0]="Raw"]=0,t[e[1]="Directory"]=1,t[e[2]="File"]=2,t[e[3]="Metadata"]=3,t[e[4]="Symlink"]=4,t[e[5]="HAMTShard"]=5,t}(),r}();L.UnixTime=function(){function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&(this[t[n]]=e[t[n]])}return r.prototype.Seconds=x.Long?x.Long.fromBits(0,0,!1):0,r.prototype.FractionalNanoseconds=0,r.encode=function(t,n){return n||(n=Wr.create()),n.uint32(8).int64(t.Seconds),t.FractionalNanoseconds!=null&&Object.hasOwnProperty.call(t,"FractionalNanoseconds")&&n.uint32(21).fixed32(t.FractionalNanoseconds),n},r.decode=function(t,n){t instanceof qe||(t=qe.create(t));for(var i=n===void 0?t.len:t.pos+n,s=new L.UnixTime;t.pos<i;){var o=t.uint32();switch(o>>>3){case 1:s.Seconds=t.int64();break;case 2:s.FractionalNanoseconds=t.fixed32();break;default:t.skipType(o&7);break}}if(!s.hasOwnProperty("Seconds"))throw x.ProtocolError("missing required 'Seconds'",{instance:s});return s},r.fromObject=function(t){if(t instanceof L.UnixTime)return t;var n=new L.UnixTime;return t.Seconds!=null&&(x.Long?(n.Seconds=x.Long.fromValue(t.Seconds)).unsigned=!1:typeof t.Seconds=="string"?n.Seconds=parseInt(t.Seconds,10):typeof t.Seconds=="number"?n.Seconds=t.Seconds:typeof t.Seconds=="object"&&(n.Seconds=new x.LongBits(t.Seconds.low>>>0,t.Seconds.high>>>0).toNumber())),t.FractionalNanoseconds!=null&&(n.FractionalNanoseconds=t.FractionalNanoseconds>>>0),n},r.toObject=function(t,n){n||(n={});var i={};if(n.defaults){if(x.Long){var s=new x.Long(0,0,!1);i.Seconds=n.longs===String?s.toString():n.longs===Number?s.toNumber():s}else i.Seconds=n.longs===String?"0":0;i.FractionalNanoseconds=0}return t.Seconds!=null&&t.hasOwnProperty("Seconds")&&(typeof t.Seconds=="number"?i.Seconds=n.longs===String?String(t.Seconds):t.Seconds:i.Seconds=n.longs===String?x.Long.prototype.toString.call(t.Seconds):n.longs===Number?new x.LongBits(t.Seconds.low>>>0,t.Seconds.high>>>0).toNumber():t.Seconds),t.FractionalNanoseconds!=null&&t.hasOwnProperty("FractionalNanoseconds")&&(i.FractionalNanoseconds=t.FractionalNanoseconds),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,xe.util.toJSONOptions)},r}();L.Metadata=function(){function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&(this[t[n]]=e[t[n]])}return r.prototype.MimeType="",r.encode=function(t,n){return n||(n=Wr.create()),t.MimeType!=null&&Object.hasOwnProperty.call(t,"MimeType")&&n.uint32(10).string(t.MimeType),n},r.decode=function(t,n){t instanceof qe||(t=qe.create(t));for(var i=n===void 0?t.len:t.pos+n,s=new L.Metadata;t.pos<i;){var o=t.uint32();switch(o>>>3){case 1:s.MimeType=t.string();break;default:t.skipType(o&7);break}}return s},r.fromObject=function(t){if(t instanceof L.Metadata)return t;var n=new L.Metadata;return t.MimeType!=null&&(n.MimeType=String(t.MimeType)),n},r.toObject=function(t,n){n||(n={});var i={};return n.defaults&&(i.MimeType=""),t.MimeType!=null&&t.hasOwnProperty("MimeType")&&(i.MimeType=t.MimeType),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,xe.util.toJSONOptions)},r}();wa.exports=L});var Aa=b((jh,Ba)=>{a();"use strict";function Sa(r,e){for(let t in e)Object.defineProperty(r,t,{value:e[t],enumerable:!0,configurable:!0});return r}function lf(r,e,t){if(!r||typeof r=="string")throw new TypeError("Please pass an Error to err-code");t||(t={}),typeof e=="object"&&(t=e,e=""),e&&(t.code=e);try{return Sa(r,t)}catch(n){t.message=r.message,t.stack=r.stack;let i=function(){};return i.prototype=Object.create(Object.getPrototypeOf(r)),Sa(new i,t)}}Ba.exports=lf});var Fa=b((Oh,Ia)=>{a();"use strict";var{Data:ce}=Ea(),Gr=Aa(),Ta=["raw","directory","file","metadata","symlink","hamt-sharded-directory"],ff=["directory","hamt-sharded-directory"],va=parseInt("0644",8),Ca=parseInt("0755",8);function Lt(r){if(r!=null)return typeof r=="number"?r&4095:(r=r.toString(),r.substring(0,1)==="0"?parseInt(r,8)&4095:parseInt(r,10)&4095)}function Xr(r){if(r==null)return;let e;if(r.secs!=null&&(e={secs:r.secs,nsecs:r.nsecs}),r.Seconds!=null&&(e={secs:r.Seconds,nsecs:r.FractionalNanoseconds}),Array.isArray(r)&&(e={secs:r[0],nsecs:r[1]}),r instanceof Date){let t=r.getTime(),n=Math.floor(t/1e3);e={secs:n,nsecs:(t-n*1e3)*1e3}}if(!!Object.prototype.hasOwnProperty.call(e,"secs")){if(e!=null&&e.nsecs!=null&&(e.nsecs<0||e.nsecs>999999999))throw Gr(new Error("mtime-nsecs must be within the range [0,999999999]"),"ERR_INVALID_MTIME_NSECS");return e}}var zt=class{static unmarshal(e){let t=ce.decode(e),n=ce.toObject(t,{defaults:!1,arrays:!0,longs:Number,objects:!1}),i=new zt({type:Ta[n.Type],data:n.Data,blockSizes:n.blocksizes,mode:n.mode,mtime:n.mtime?{secs:n.mtime.Seconds,nsecs:n.mtime.FractionalNanoseconds}:void 0});return i._originalMode=n.mode||0,i}constructor(e={type:"file"}){let{type:t,data:n,blockSizes:i,hashType:s,fanout:o,mtime:u,mode:c}=e;if(t&&!Ta.includes(t))throw Gr(new Error("Type: "+t+" is not valid"),"ERR_INVALID_TYPE");this.type=t||"file",this.data=n,this.hashType=s,this.fanout=o,this.blockSizes=i||[],this._originalMode=0,this.mode=Lt(c),u&&(this.mtime=Xr(u),this.mtime&&!this.mtime.nsecs&&(this.mtime.nsecs=0))}set mode(e){this._mode=this.isDirectory()?Ca:va;let t=Lt(e);t!==void 0&&(this._mode=t)}get mode(){return this._mode}isDirectory(){return Boolean(this.type&&ff.includes(this.type))}addBlockSize(e){this.blockSizes.push(e)}removeBlockSize(e){this.blockSizes.splice(e,1)}fileSize(){if(this.isDirectory())return 0;let e=0;return this.blockSizes.forEach(t=>{e+=t}),this.data&&(e+=this.data.length),e}marshal(){let e;switch(this.type){case"raw":e=ce.DataType.Raw;break;case"directory":e=ce.DataType.Directory;break;case"file":e=ce.DataType.File;break;case"metadata":e=ce.DataType.Metadata;break;case"symlink":e=ce.DataType.Symlink;break;case"hamt-sharded-directory":e=ce.DataType.HAMTShard;break;default:throw Gr(new Error("Type: "+e+" is not valid"),"ERR_INVALID_TYPE")}let t=this.data;(!this.data||!this.data.length)&&(t=void 0);let n;this.mode!=null&&(n=this._originalMode&4294963200|(Lt(this.mode)||0),n===va&&!this.isDirectory()&&(n=void 0),n===Ca&&this.isDirectory()&&(n=void 0));let i;if(this.mtime!=null){let o=Xr(this.mtime);o&&(i={Seconds:o.secs,FractionalNanoseconds:o.nsecs},i.FractionalNanoseconds===0&&delete i.FractionalNanoseconds)}let s={Type:e,Data:t,filesize:this.isDirectory()?void 0:this.fileSize(),blocksizes:this.blockSizes,hashType:this.hashType,fanout:this.fanout,mode:n,mtime:i};return ce.encode(s).finish()}};Ia.exports={UnixFS:zt,parseMode:Lt,parseMtime:Xr}});var Ma=b((Mh,Da)=>{a();"use strict";var hf=Ve(),Ua=we(),{encodeCID:Na,decodeCID:_a}=Ee(),{decodeIterable:Qr,encodeIterable:ue,encodeCallback:ja}=wo(),Yr=Bo(),{parseMode:bf,parseMtime:df}=Fa(),Re=class extends hf{constructor(e){super("core",["add","addAll","cat","ls"],e)}};Re.prototype.addAll=async function*(e,t={}){let{timeout:n,signal:i}=t,s=[...t.transfer||[]],o=t.progress?ja(t.progress,s):void 0,u=await this.remote.addAll({...t,input:pf(e,s),progress:void 0,progressCallback:o,transfer:s,timeout:n,signal:i});yield*Qr(u.data,Oa)};Re.prototype.add=async function(e,t={}){let{timeout:n,signal:i}=t,s=[...t.transfer||[]],o=t.progress?ja(t.progress,s):void 0,u=await this.remote.add({...t,input:xf(e,s),progress:void 0,progressCallback:o,transfer:s,timeout:n,signal:i});return Oa(u.data)};Re.prototype.cat=async function*(e,t={}){let n=Ua.isCID(e)?Na(e):e,i=await this.remote.cat({...t,path:n});yield*Qr(i.data,yf)};Re.prototype.ls=async function*(e,t={}){let n=Ua.isCID(e)?Na(e):e,i=await this.remote.ls({...t,path:n});yield*Qr(i.data,mf)};var Oa=({path:r,cid:e,mode:t,mtime:n,size:i})=>({path:r,cid:_a(e),mode:t,mtime:n,size:i}),mf=({depth:r,name:e,path:t,size:n,cid:i,type:s,mode:o,mtime:u})=>({cid:_a(i),type:s,name:e,path:t,mode:o,mtime:u,size:n,depth:r}),yf=r=>r,xf=(r,e)=>{if(r instanceof Blob)return r;if(typeof r=="string")return r;if(r instanceof ArrayBuffer)return r;if(ArrayBuffer.isView(r))return r;{let t=en(r);if(t)return ue(t,Kr,e);let n=tn(r);if(n)return ue(n,Pe,e);let i=rn(r);if(i)return ue(Yr(i),Pe,e);let s=nn(r);if(s)return Zr(s,e);throw TypeError("Unexpected input: "+typeof r)}},pf=(r,e)=>{let t=en(r);if(t)return ue(t,Kr,e);let n=tn(r);if(n)return ue(n,Pe,e);let i=rn(r);if(i)return ue(Yr(i),Pe,e);throw TypeError("Unexpected input: "+typeof r)},Pe=(r,e)=>{if(r instanceof ArrayBuffer)return r;if(ArrayBuffer.isView(r))return r;if(r instanceof Blob)return{path:"",content:r};if(typeof r=="string")return{path:"",content:r};{let t=nn(r);if(t)return Zr(t,e);throw TypeError("Unexpected input: "+typeof r)}},Kr=(r,e)=>{if(typeof r=="number")throw TypeError("Iterable of numbers is not supported");if(r instanceof ArrayBuffer)return r;if(ArrayBuffer.isView(r))return r;if(r instanceof Blob)return{path:"",content:r};if(typeof r=="string")return{path:"",content:r};{let t=nn(r);if(t)return Zr(t,e);throw TypeError("Unexpected input: "+typeof r)}},Zr=({path:r,mode:e,mtime:t,content:n},i)=>{let s={path:r,mode:bf(e),mtime:df(t)};return n&&(s.content=gf(n,i)),s},gf=(r,e)=>{if(r==null)return"";if(r instanceof ArrayBuffer||ArrayBuffer.isView(r))return r;if(r instanceof Blob)return r;if(typeof r=="string")return r;{let t=en(r);if(t)return ue(t,Kr,e);let n=tn(r);if(n)return ue(n,Pe,e);let i=rn(r);if(i)return ue(Yr(i),Pe,e);throw TypeError("Unexpected input: "+typeof r)}},en=r=>{let e=r;return e&&typeof e[Symbol.iterator]=="function"?e:null},tn=r=>{let e=r;return e&&typeof e[Symbol.asyncIterator]=="function"?e:null},rn=r=>r&&typeof r.getReader=="function"?r:null,nn=r=>typeof r=="object"&&(r.path||r.content)?r:null;Da.exports=Re});var za=b((Lh,La)=>{a();"use strict";var kf=Ve(),{decodeCID:wf}=Ee(),Ef=we(),sn=class extends kf{constructor(e){super("files",["stat"],e)}};sn.prototype.stat=async function(e,t={}){let{size:n,hash:i,withLocal:s,timeout:o,signal:u}=t,{stat:c}=await this.remote.stat({path:Bf(e),size:n,hash:i,withLocal:s,timeout:o,signal:u});return Sf(c)};La.exports=sn;var Bf=r=>Ef.isCID(r)?`/ipfs/${r.toString()}`:r,Sf=r=>({...r,cid:wf(r.cid)})});var Cf=b((zh,qa)=>{a();"use strict";var Ra=Nn(),Af=xo(),If=ko(),Tf=Ma(),vf=za(),it=class extends Tf{constructor(e){super(e);this.transport=e,this.dag=new If(this.transport),this.files=new vf(this.transport),this.block=new Af(this.transport)}static attach(e,t){e.transport.connect(t)}static detached(){return new it(new Ra(void 0))}static from(e){return new it(new Ra(e))}};qa.exports=it});return Cf();})();
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
return ChrisTroutnerIpfsMessagePortClient}));