@leofcoin/chain 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/chain.browser.js +14224 -9130
  2. package/dist/chain.browser.min.js +1 -1
  3. package/docs/@leofcoin/chain/1.0.14/chain.js.html +738 -0
  4. package/docs/@leofcoin/chain/1.0.14/contracts_factory.js.html +182 -0
  5. package/docs/@leofcoin/chain/1.0.14/contracts_nameService.js.html +231 -0
  6. package/docs/@leofcoin/chain/1.0.14/contracts_proxies_factoryProxy.js.html +135 -0
  7. package/docs/@leofcoin/chain/1.0.14/contracts_proxies_nameServiceProxy.js.html +135 -0
  8. package/docs/@leofcoin/chain/1.0.14/contracts_proxies_nativeTokenProxy.js.html +135 -0
  9. package/docs/@leofcoin/chain/1.0.14/contracts_proxies_validatorsProxy.js.html +135 -0
  10. package/docs/@leofcoin/chain/1.0.14/contracts_proxies_votingProxy.js.html +135 -0
  11. package/docs/@leofcoin/chain/1.0.14/contracts_validators.js.html +242 -0
  12. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Bold-webfont.eot +0 -0
  13. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Bold-webfont.svg +1830 -0
  14. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Bold-webfont.woff +0 -0
  15. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  16. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  17. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  18. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Italic-webfont.eot +0 -0
  19. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Italic-webfont.svg +1830 -0
  20. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Italic-webfont.woff +0 -0
  21. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Light-webfont.eot +0 -0
  22. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Light-webfont.svg +1831 -0
  23. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Light-webfont.woff +0 -0
  24. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  25. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  26. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  27. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Regular-webfont.eot +0 -0
  28. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Regular-webfont.svg +1831 -0
  29. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Regular-webfont.woff +0 -0
  30. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Semibold-webfont.eot +0 -0
  31. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Semibold-webfont.svg +1830 -0
  32. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  33. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-Semibold-webfont.woff +0 -0
  34. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  35. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-SemiboldItalic-webfont.svg +1830 -0
  36. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  37. package/docs/@leofcoin/chain/1.0.14/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  38. package/docs/@leofcoin/chain/1.0.14/global.html +1153 -0
  39. package/docs/@leofcoin/chain/1.0.14/icons/home.svg +4 -0
  40. package/docs/@leofcoin/chain/1.0.14/icons/search.svg +4 -0
  41. package/docs/@leofcoin/chain/1.0.14/index.html +125 -0
  42. package/docs/@leofcoin/chain/1.0.14/machine.js.html +251 -0
  43. package/docs/@leofcoin/chain/1.0.14/scripts/linenumber.js +23 -0
  44. package/docs/@leofcoin/chain/1.0.14/scripts/pagelocation.js +89 -0
  45. package/docs/@leofcoin/chain/1.0.14/standards_roles.js.html +188 -0
  46. package/docs/@leofcoin/chain/1.0.14/standards_token.js.html +260 -0
  47. package/docs/@leofcoin/chain/1.0.14/styles/collapse.css +27 -0
  48. package/docs/@leofcoin/chain/1.0.14/styles/jsdoc-default.css +953 -0
  49. package/docs/@leofcoin/chain/1.0.14/styles/prettify-jsdoc.css +111 -0
  50. package/docs/@leofcoin/chain/1.0.14/styles/prettify-tomorrow.css +138 -0
  51. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see chain.browser.min.js.LICENSE.txt */
2
- var __webpack_modules__={6745:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var r=e=>{if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),o=r.charCodeAt(0);if(255!==t[o])throw new TypeError(r+" is ambiguous");t[o]=n}const n=e.length,r=e.charAt(0),o=Math.log(n)/Math.log(256),i=Math.log(256)/Math.log(n),s=e=>{if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let i=0,s=0,a=0;for(;e[i]===r;)s++,i++;const c=(e.length-i)*o+1>>>0;let u=new Uint8Array(c);for(;e[i];){let r=t[e.charCodeAt(i)];if(255===r)return;let o=0;for(let e=c-1;(0!==r||o<a)&&-1!==e;e--,o++)r+=n*u[e]>>>0,u[e]=r%256>>>0,r=r/256>>>0;if(0!==r)throw new Error("Non-zero carry");a=o,i++}let f=c-a;for(;f!==c&&0===u[f];)f++;let h=new Uint8Array(s+(c-f)),l=s;for(;f!==c;)h[l++]=u[f++];return h};return{encode:t=>{if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let o=0,s=0,a=0;const c=t.length;for(;a!==c&&0===t[a];)a++,o++;const u=(c-a)*i+1>>>0,f=new Uint8Array(u);for(;a!==c;){let e=t[a],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*f[t]>>>0,f[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,a++}let h=u-s;for(;h!==u&&0===f[h];)h++;let l=r.repeat(o);for(;h<u;++h)l+=e.charAt(f[h]);return l},decodeUnsafe:s,decode:e=>{const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}};const o="abcdefghijklmnopqrstuvwxyz234567",i="0123456789abcdefghijklmnopqrstuv";var s=(e,t=!1)=>r(t?i:o).decode(e);const a="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var c=e=>r(a).decode(e),u=n(8764).Buffer;class f{#e(){if(!this.decode)throw new Error("bad implementation: needs decode func");this.decode()}#t(){if(!this.encode)throw new Error("bad implementation: needs encode func");this.encode()}isHex(e){return(e=>/^[A-F0-9]+$/i.test(e))(e)}isBase32(e){return base32.isBase32(e)}isBase58(e){return base58.isBase32(e)}fromBs32(e){return this.encoded=s(e),this.#e()}fromBs58(e){return this.encoded=c(e),this.#e()}async toArray(){const e=[];for await(const t of this.encoded.values())e.push(t);return e}fromString(e){return this.encoded=new Uint8Array(e.split(",")),this.#e()}fromArray(e){return this.encoded=new Uint8Array([...e]),this.#e()}fromEncoded(e){return this.encoded=e,this.#e()}fromHex(e){return this.encoded=u.from(e,"hex"),this.#e()}toString(e="utf8"){return this.encoded||this.#t(),this.encoded.toString(e)}toHex(){return this.toString("hex")}toBs32(){return this.encoded||this.#t(),((e,t=!1)=>r(t?i:o).encode(e))(this.encoded)}toBs58(){return this.encoded||this.#t(),e=this.encoded,r(a).encode(e);var e}create(e){const t={};if(this.keys?.length>0){for(const n of this.keys)Object.defineProperties(t,{[n]:{enumerable:!0,configurable:!0,set:t=>value=e[n],get:()=>e[n]}});this.decoded=t,this.encode()}}}var h=n(4676),l=n.n(h),d={"disco-hash":{codec:parseInt("30",16),hashAlg:"dbl-keccak-256"},"peernet-peer-response":{codec:parseInt("707072",16),hashAlg:"keccak-256"},"peernet-peer":{codec:parseInt("7070",16),hashAlg:"keccak-256"},"peernet-dht":{codec:parseInt("706468",16),hashAlg:"keccak-256"},"peernet-dht-response":{codec:parseInt("706472",16),hashAlg:"keccak-256"},"peernet-data":{codec:parseInt("706461",16),hashAlg:"keccak-256"},"peernet-data-response":{codec:parseInt("70646172",16),hashAlg:"keccak-256"},"peernet-message":{codec:parseInt("706d65",16),hashAlg:"keccak-256"},"peernet-ps":{codec:parseInt("707073",16),hashAlg:"keccak-256"},"peernet-response":{codec:parseInt("7072",16),hashAlg:"keccak-256"},"peernet-request":{codec:parseInt("707271",16),hashAlg:"keccak-256"},"leofcoin-block":{codec:parseInt("6c62",16),hashAlg:"dbl-keccak-512"},"leofcoin-tx":{codec:parseInt("6c74",16),hashAlg:"dbl-keccak-512"},"leofcoin-itx":{codec:parseInt("6c69",16),hashAlg:"keccak-512"},"leofcoin-pr":{codec:parseInt("6c70",16),hashAlg:"keccak-256"},"chat-message":{codec:parseInt("636d",16),hashAlg:"dbl-keccak-256"}};class p extends f{get codecs(){return{...globalThis.peernet.codecs,...d}}constructor(e){if(super(),e){if(e instanceof Uint8Array){const t=l().decode(e),n=this.getCodecName(t);n?(this.name=n,this.encoded=e,this.decode(e)):this.encode(e)}else if(e instanceof ArrayBuffer){const t=new Uint8Array(e.byteLength);for(let n=0;n<e.byteLength;n++)t[n]=e[n];return this.encoded=t,void this.decode(e)}if("string"==typeof e)if(this.codecs[e])this.fromName(e);else if(this.isHex(e))this.fromHex(e);else if(this.isBase32(e))this.fromBs32(e);else{if(!this.isBase58(e))throw new Error(`unsupported string ${e}`);this.fromBs58(e)}isNaN(e)||this.codecs[this.getCodecName(e)]&&this.fromCodec(e)}}fromEncoded(e){const t=l().decode(e),n=this.getCodecName(t);this.name=n,this.encoded=e,this.decode(e)}getCodec(e){return this.codecs[e].codec}getCodecName(e){return Object.keys(this.codecs).reduce(((t,n)=>this.codecs[n].codec===e?n:t),void 0)}getHashAlg(e){return this.codecs[e].hashAlg}fromCodec(e){this.name=this.getCodecName(e),this.hashAlg=this.getHashAlg(this.name),this.codec=this.getCodec(this.name),this.codecBuffer=l().encode(e)}fromName(e){const t=this.getCodec(e);this.name=e,this.codec=t,this.hashAlg=this.getHashAlg(e),this.codecBuffer=l().encode(t)}decode(){const e=l().decode(this.encoded);this.fromCodec(e)}encode(){const e=l().encode(this.decoded);return this.encoded=e,this.encoded}}var g=n(5811),b=n.n(g),y=n(8764).Buffer;class w extends f{constructor(e,t={}){if(super(),t.name?this.name=t.name:this.name="disco-hash",t.codecs&&(this.codecs=t.codecs),e){if(e instanceof Uint8Array){this.discoCodec=new p(e,this.codecs);const t=this.discoCodec.name;t?(this.name=t,this.decode(e)):this.encode(e)}if("string"==typeof e)if(this.isHex(e)&&this.fromHex(e),this.isBase32(e))this.fromBs32(e);else{if(!this.isBase58(e))throw new Error(`unsupported string ${e}`);this.fromBs58(e)}else"object"==typeof e&&this.fromJSON(e)}}get prefix(){const e=this.length,t=new Uint8Array(e.length+this.discoCodec.codecBuffer.length);return t.set(e),t.set(this.discoCodec.codecBuffer,e.length),t}get length(){return l().encode(this.size)}get buffer(){return this.encoded}get hash(){return this.encoded}fromJSON(e){return this.encode(y.from(JSON.stringify(e)))}encode(e,t){!this.name&&t&&(this.name=t),e||(e=this.buffer),this.discoCodec=new p(this.name,this.codecs),this.discoCodec.fromName(this.name);let n=this.discoCodec.hashAlg;n.includes("dbl")&&(n=n.replace("dbl-",""),e=b()(n.replace("-","")).update(e).digest()),this.digest=b()(n.replace("-","")).update(e).digest(),this.size=this.digest.length,this.codec=this.discoCodec.encode(),this.codec=this.discoCodec.codecBuffer;const r=new Uint8Array(this.digest.length+this.prefix.length);return r.set(this.prefix),r.set(this.digest,this.prefix.length),this.encoded=r,this.encoded}validate(e){if(y.isBuffer(e)){const t=l().decode(e);this.codecs[t]?this.decode(e):this.encode(e)}"string"==typeof e&&(this.isHex(e)&&this.fromHex(e),this.isBase32(e)&&this.fromBs32(e)),"object"==typeof e&&this.fromJSON(e)}decode(e){this.encoded=e;const t=l().decode(e);if(this.discoCodec=new p(t,this.codecs),e=e.slice(l().decode.bytes),this.size=l().decode(e),this.digest=e.slice(l().decode.bytes),this.digest.length!==this.size)throw new Error(`hash length inconsistent: 0x${this.encoded.toString("hex")}`);return this.name=this.discoCodec.name,this.size=this.digest.length,{codec:this.codec,name:this.name,size:this.size,length:this.length,digest:this.digest}}}var m={codecs:d,Codec:p,CodecHash:w,FormatInterface:class extends f{constructor(e,t,n={}){if(super(),this.protoEncode=t.encode,this.protoDecode=t.decode,this.hashFormat=n.hashFormat||"bs32",n.name&&(this.name=n.name),e instanceof Uint8Array)this.fromUint8Array(e);else if(e instanceof ArrayBuffer)this.fromArrayBuffer(e);else{if(e.name===n.name)return e;if(e instanceof String)if(this.isHex(e))this.fromHex(e);else if(this.isBase32(e))this.fromBs32(e);else{if(!this.isBase58(e))throw new Error(`unsupported string ${e}`);this.fromBs58(e)}else this.create(e)}}get peernetHash(){return new w(this.decoded,{name:this.name})}get hash(){const e=`${this.hashFormat.charAt(0).toUpperCase()}${this.hashFormat.substring(1,this.hashFormat.length)}`;return this.peernetHash[`to${e}`]()}decode(){let e=this.encoded;const t=new p(this.encoded);return e=e.slice(t.codecBuffer.length),this.name=t.name,this.decoded=this.protoDecode(e),this.decoded}encode(e){e||(e=this.decoded);const t=new p(this.name),n=this.protoEncode(e),r=new Uint8Array(n.length+t.codecBuffer.length);return r.set(t.codecBuffer),r.set(n,t.codecBuffer.length),this.encoded=r,this.encoded}hasCodec(){return!!this.encoded&&(!!new p(this.encoded).name||void 0)}fromUint8Array(e){this.encoded=e,this.hasCodec()?this.decode():this.create(JSON.parse((new TextDecoder).decode(this.encoded)))}fromArrayBuffer(e){this.encoded=new Uint8Array(e,e.byteOffset,e.byteLength),this.hasCodec()?this.decode():this.create(JSON.parse((new TextDecoder).decode(this.encoded)))}},BasicInterface:f}},8395:function(e,t,n){var r=n(7936),o={contractFactory:"237,198,1,10,54,51,67,122,86,52,88,98,115,81,54,72,57,100,75,49,76,101,105,66,75,65,120,114,54,81,105,77,71,53,116,68,105,55,122,77,77,72,118,117,120,104,121,50,101,118,70,101,118,72,49,77,85,76,99,18,146,8,114,101,116,117,114,110,32,99,108,97,115,115,32,70,97,99,116,111,114,121,123,35,110,97,109,101,61,34,65,114,116,79,110,108,105,110,101,67,111,110,116,114,97,99,116,70,97,99,116,111,114,121,34,59,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,61,48,59,35,99,111,110,116,114,97,99,116,115,61,91,93,59,99,111,110,115,116,114,117,99,116,111,114,40,115,116,97,116,101,41,123,115,116,97,116,101,38,38,40,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,61,115,116,97,116,101,46,99,111,110,116,114,97,99,116,115,44,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,61,115,116,97,116,101,46,116,111,116,97,108,67,111,110,116,114,97,99,116,115,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,116,111,116,97,108,67,111,110,116,114,97,99,116,115,58,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,44,99,111,110,116,114,97,99,116,115,58,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,125,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,99,111,110,116,114,97,99,116,115,40,41,123,114,101,116,117,114,110,91,46,46,46,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,93,125,103,101,116,32,116,111,116,97,108,67,111,110,116,114,97,99,116,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,125,105,115,118,97,108,105,100,40,104,97,115,104,44,99,114,101,97,116,111,114,44,99,111,110,116,114,97,99,116,44,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,61,91,93,41,123,99,111,110,115,116,32,109,101,115,115,97,103,101,61,110,101,119,32,67,111,110,116,114,97,99,116,77,101,115,115,97,103,101,40,123,99,114,101,97,116,111,114,58,99,114,101,97,116,111,114,44,99,111,110,116,114,97,99,116,58,99,111,110,116,114,97,99,116,44,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,58,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,125,41,59,114,101,116,117,114,110,32,66,111,111,108,101,97,110,40,109,101,115,115,97,103,101,46,104,97,115,104,61,61,61,104,97,115,104,41,125,97,115,121,110,99,32,100,101,112,108,111,121,67,111,110,116,114,97,99,116,40,99,111,110,116,114,97,99,116,72,97,115,104,44,99,114,101,97,116,111,114,44,99,111,110,116,114,97,99,116,44,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,61,91,93,41,123,105,102,40,99,111,110,116,114,97,99,116,46,99,114,101,97,116,111,114,33,61,61,109,115,103,46,115,101,110,100,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,111,110,108,121,32,97,32,99,111,110,116,114,97,99,116,32,99,114,101,97,116,111,114,32,99,97,110,32,100,101,112,108,111,121,32,97,32,99,111,110,116,114,97,99,116,34,41,59,105,102,40,97,119,97,105,116,32,99,111,110,116,114,97,99,116,83,116,111,114,101,46,104,97,115,40,104,97,115,104,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,100,117,112,108,105,99,97,116,101,32,99,111,110,116,114,97,99,116,34,41,59,105,102,40,33,116,104,105,115,46,105,115,86,97,108,105,100,40,99,111,110,116,114,97,99,116,72,97,115,104,44,99,114,101,97,116,111,114,44,99,111,110,116,114,97,99,116,44,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,105,110,118,97,108,105,100,32,99,111,110,116,114,97,99,116,34,41,59,97,119,97,105,116,32,99,111,110,116,114,97,99,116,83,116,111,114,101,46,112,117,116,40,104,97,115,104,44,101,110,99,111,100,101,100,41,44,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,43,61,49,44,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,46,112,117,115,104,40,104,97,115,104,41,125,125,59,10",nativeToken:"237,198,1,10,54,51,67,122,86,52,88,98,115,81,54,72,57,100,75,49,76,101,105,66,75,65,120,114,54,81,105,77,71,53,116,68,105,55,122,77,77,72,118,117,120,104,121,50,101,118,70,101,118,72,49,77,85,76,99,18,152,26,114,101,116,117,114,110,32,99,108,97,115,115,32,65,114,116,79,110,108,105,110,101,32,101,120,116,101,110,100,115,32,99,108,97,115,115,32,84,111,107,101,110,32,101,120,116,101,110,100,115,32,99,108,97,115,115,32,82,111,108,101,115,123,35,114,111,108,101,115,61,123,79,87,78,69,82,58,91,93,44,77,73,78,84,58,91,93,44,66,85,82,78,58,91,93,125,59,99,111,110,115,116,114,117,99,116,111,114,40,114,111,108,101,115,41,123,105,102,40,114,111,108,101,115,41,123,105,102,40,33,40,114,111,108,101,115,32,105,110,115,116,97,110,99,101,111,102,32,79,98,106,101,99,116,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,101,120,112,101,99,116,101,100,32,114,111,108,101,115,32,116,111,32,98,101,32,97,110,32,111,98,106,101,99,116,34,41,59,116,104,105,115,46,35,114,111,108,101,115,61,123,46,46,46,114,111,108,101,115,44,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,101,108,115,101,32,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,34,79,87,78,69,82,34,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,114,111,108,101,115,58,116,104,105,115,46,114,111,108,101,115,125,125,103,101,116,32,114,111,108,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,114,101,116,117,114,110,33,33,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,38,38,45,49,33,61,61,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,100,101,120,79,102,40,97,100,100,114,101,115,115,41,125,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,103,114,97,110,116,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,112,117,115,104,40,97,100,100,114,101,115,115,41,125,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,114,101,118,111,107,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,105,102,40,34,79,87,78,69,82,34,61,61,61,114,111,108,101,38,38,49,61,61,61,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,108,101,110,103,116,104,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,97,116,108,101,97,115,116,32,111,110,101,32,111,119,110,101,114,32,105,115,32,110,101,101,100,101,100,33,34,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,115,112,108,105,99,101,40,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,100,101,120,79,102,40,97,100,100,114,101,115,115,41,41,125,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,34,79,87,78,69,82,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,78,111,116,32,97,108,108,111,119,101,100,34,41,59,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,34,79,87,78,69,82,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,78,111,116,32,97,108,108,111,119,101,100,34,41,59,116,104,105,115,46,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,125,123,35,110,97,109,101,59,35,115,121,109,98,111,108,59,35,104,111,108,100,101,114,115,61,48,59,35,98,97,108,97,110,99,101,115,61,123,125,59,35,97,112,112,114,111,118,97,108,115,61,123,125,59,35,100,101,99,105,109,97,108,115,61,49,56,59,35,116,111,116,97,108,83,117,112,112,108,121,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,48,41,59,99,111,110,115,116,114,117,99,116,111,114,40,110,97,109,101,44,115,121,109,98,111,108,44,100,101,99,105,109,97,108,115,61,49,56,44,115,116,97,116,101,41,123,105,102,40,33,110,97,109,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,97,109,101,32,117,110,100,101,102,105,110,101,100,34,41,59,105,102,40,33,115,121,109,98,111,108,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,115,121,109,98,111,108,32,117,110,100,101,102,105,110,101,100,34,41,59,115,117,112,101,114,40,115,116,97,116,101,63,46,114,111,108,101,115,41,44,116,104,105,115,46,35,110,97,109,101,61,110,97,109,101,44,116,104,105,115,46,35,115,121,109,98,111,108,61,115,121,109,98,111,108,44,116,104,105,115,46,35,100,101,99,105,109,97,108,115,61,100,101,99,105,109,97,108,115,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,46,46,46,115,117,112,101,114,46,115,116,97,116,101,44,104,111,108,100,101,114,115,58,116,104,105,115,46,104,111,108,100,101,114,115,44,98,97,108,97,110,99,101,115,58,116,104,105,115,46,98,97,108,97,110,99,101,115,44,97,112,112,114,111,118,97,108,115,58,123,46,46,46,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,125,44,116,111,116,97,108,83,117,112,112,108,121,58,116,104,105,115,46,116,111,116,97,108,83,117,112,112,108,121,125,125,103,101,116,32,116,111,116,97,108,83,117,112,112,108,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,115,121,109,98,111,108,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,115,121,109,98,111,108,125,103,101,116,32,104,111,108,100,101,114,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,104,111,108,100,101,114,115,125,103,101,116,32,98,97,108,97,110,99,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,98,97,108,97,110,99,101,115,125,125,109,105,110,116,40,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,34,77,73,78,84,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,108,108,111,119,101,100,34,41,59,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,61,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,46,97,100,100,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,98,117,114,110,40,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,34,66,85,82,78,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,108,108,111,119,101,100,34,41,59,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,61,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,46,115,117,98,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,35,98,101,102,111,114,101,84,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,102,114,111,109,93,124,124,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,102,114,111,109,93,60,97,109,111,117,110,116,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,97,109,111,117,110,116,32,101,120,99,101,101,100,115,32,98,97,108,97,110,99,101,34,41,125,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,123,34,48,120,48,48,34,61,61,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,116,111,72,101,120,83,116,114,105,110,103,40,41,63,116,104,105,115,46,35,104,111,108,100,101,114,115,45,61,49,58,34,48,120,48,48,34,33,61,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,116,111,72,101,120,83,116,114,105,110,103,40,41,38,38,34,48,120,48,48,34,61,61,61,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,46,116,111,72,101,120,83,116,114,105,110,103,40,41,38,38,40,116,104,105,115,46,35,104,111,108,100,101,114,115,43,61,49,41,125,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,97,100,100,114,101,115,115,44,97,109,111,117,110,116,41,123,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,124,124,40,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,48,41,41,59,99,111,110,115,116,32,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,59,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,97,100,100,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,125,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,97,100,100,114,101,115,115,44,97,109,111,117,110,116,41,123,99,111,110,115,116,32,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,59,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,115,117,98,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,125,98,97,108,97,110,99,101,79,102,40,97,100,100,114,101,115,115,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,125,115,101,116,65,112,112,114,111,118,97,108,40,111,112,101,114,97,116,111,114,44,97,109,111,117,110,116,41,123,99,111,110,115,116,32,111,119,110,101,114,61,103,108,111,98,97,108,84,104,105,115,46,109,115,103,46,115,101,110,100,101,114,59,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,124,124,40,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,61,123,125,41,44,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,91,111,112,101,114,97,116,111,114,93,61,97,109,111,117,110,116,125,97,112,112,114,111,118,101,100,40,111,119,110,101,114,44,111,112,101,114,97,116,111,114,44,97,109,111,117,110,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,91,111,112,101,114,97,116,111,114,93,61,61,61,97,109,111,117,110,116,125,116,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,123,97,109,111,117,110,116,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,98,101,102,111,114,101,84,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,44,116,104,105,115,46,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,102,114,111,109,44,97,109,111,117,110,116,41,44,116,104,105,115,46,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,125,123,99,111,110,115,116,114,117,99,116,111,114,40,115,116,97,116,101,41,123,115,117,112,101,114,40,34,65,114,116,79,110,108,105,110,101,34,44,34,65,82,84,34,44,49,56,44,115,116,97,116,101,41,125,125,59,10",nameService:"237,198,1,10,54,51,67,122,86,52,88,98,115,81,54,72,57,100,75,49,76,101,105,66,75,65,120,114,54,81,105,77,71,53,116,68,105,55,122,77,77,72,118,117,120,104,121,50,101,118,70,101,118,72,49,77,85,76,99,18,138,12,114,101,116,117,114,110,32,99,108,97,115,115,32,78,97,109,101,83,101,114,118,105,99,101,123,35,110,97,109,101,61,34,65,114,116,79,110,108,105,110,101,78,97,109,101,83,101,114,118,105,99,101,34,59,35,111,119,110,101,114,59,35,112,114,105,99,101,61,48,59,35,114,101,103,105,115,116,114,121,61,123,125,59,35,99,117,114,114,101,110,99,121,59,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,114,101,103,105,115,116,114,121,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,101,103,105,115,116,114,121,125,125,103,101,116,32,115,116,97,116,101,40,41,123,125,99,111,110,115,116,114,117,99,116,111,114,40,102,97,99,116,111,114,121,65,100,100,114,101,115,115,44,99,117,114,114,101,110,99,121,44,118,97,108,105,100,97,116,111,114,65,100,100,114,101,115,115,44,112,114,105,99,101,44,115,116,97,116,101,41,123,115,116,97,116,101,63,40,116,104,105,115,46,35,111,119,110,101,114,61,115,116,97,116,101,46,111,119,110,101,114,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,61,115,116,97,116,101,46,114,101,103,105,115,116,114,121,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,115,116,97,116,101,46,99,117,114,114,101,110,99,121,44,116,104,105,115,46,35,112,114,105,99,101,61,115,116,97,116,101,46,112,114,105,99,101,41,58,40,116,104,105,115,46,35,111,119,110,101,114,61,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,112,114,105,99,101,61,112,114,105,99,101,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,67,111,110,116,114,97,99,116,70,97,99,116,111,114,121,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,102,97,99,116,111,114,121,65,100,100,114,101,115,115,125,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,84,111,107,101,110,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,99,117,114,114,101,110,99,121,125,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,86,97,108,105,100,97,116,111,114,115,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,118,97,108,105,100,97,116,111,114,65,100,100,114,101,115,115,125,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,41,125,99,104,97,110,103,101,79,119,110,101,114,40,111,119,110,101,114,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,111,119,110,101,114,61,111,119,110,101,114,125,99,104,97,110,103,101,80,114,105,99,101,40,112,114,105,99,101,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,112,114,105,99,101,61,112,114,105,99,101,125,99,104,97,110,103,101,67,117,114,114,101,110,99,121,40,99,117,114,114,101,110,99,121,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,125,97,115,121,110,99,32,112,117,114,99,104,97,115,101,78,97,109,101,40,110,97,109,101,44,97,100,100,114,101,115,115,41,123,105,102,40,97,119,97,105,116,32,109,115,103,46,99,97,108,108,40,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,34,98,97,108,97,110,99,101,79,102,34,44,91,109,115,103,46,115,101,110,100,101,114,93,41,60,116,104,105,115,46,35,112,114,105,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,112,114,105,99,101,32,101,120,99,101,101,100,115,32,98,97,108,97,110,99,101,34,41,59,116,114,121,123,97,119,97,105,116,32,109,115,103,46,99,97,108,108,40,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,34,116,114,97,110,115,102,101,114,34,44,91,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,111,119,110,101,114,44,116,104,105,115,46,35,112,114,105,99,101,93,41,125,99,97,116,99,104,40,101,41,123,116,104,114,111,119,32,101,125,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,97,100,100,114,101,115,115,125,125,108,111,111,107,117,112,40,110,97,109,101,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,125,116,114,97,110,115,102,101,114,79,119,110,101,114,115,104,105,112,40,110,97,109,101,44,116,111,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,46,111,119,110,101,114,61,116,111,125,99,104,97,110,103,101,65,100,100,114,101,115,115,40,110,97,109,101,44,97,100,100,114,101,115,115,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,46,97,100,100,114,101,115,115,61,97,100,100,114,101,115,115,125,125,59,10,26,58,98,97,53,120,100,97,100,115,54,118,99,106,105,119,118,102,51,52,110,112,122,104,54,120,114,108,97,105,118,112,106,103,116,112,51,109,105,116,51,104,119,104,120,101,117,109,121,98,119,115,112,106,114,104,101,122,51,101,26,58,98,97,53,120,100,97,100,102,109,98,54,102,119,52,50,106,50,112,97,122,55,51,52,112,117,98,122,119,120,110,55,114,103,105,119,119,109,103,115,51,100,99,105,99,114,52,117,50,101,107,104,113,101,118,113,118,99,117,26,58,98,97,53,120,100,97,99,55,107,118,121,51,99,106,107,97,52,97,101,120,55,98,122,55,119,54,114,121,113,120,103,102,98,109,119,115,116,111,109,115,101,121,111,110,121,116,98,115,115,108,55,115,108,101,114,105,117,100,26,4,49,48,48,48",validators:"237,198,1,10,54,51,67,122,86,52,88,98,115,81,54,72,57,100,75,49,76,101,105,66,75,65,120,114,54,81,105,77,71,53,116,68,105,55,122,77,77,72,118,117,120,104,121,50,101,118,70,101,118,72,49,77,85,76,99,18,215,16,114,101,116,117,114,110,32,99,108,97,115,115,32,86,97,108,105,100,97,116,111,114,115,123,35,110,97,109,101,61,34,65,114,116,79,110,108,105,110,101,86,97,108,105,100,97,116,111,114,115,34,59,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,61,48,59,35,118,97,108,105,100,97,116,111,114,115,61,123,125,59,35,111,119,110,101,114,59,35,99,117,114,114,101,110,99,121,59,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,59,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,111,119,110,101,114,58,116,104,105,115,46,35,111,119,110,101,114,44,109,105,110,105,109,117,109,66,97,108,97,110,99,101,58,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,44,99,117,114,114,101,110,99,121,58,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,44,118,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,125,125,99,111,110,115,116,114,117,99,116,111,114,40,116,111,107,101,110,65,100,100,114,101,115,115,44,115,116,97,116,101,41,123,115,116,97,116,101,63,40,116,104,105,115,46,35,111,119,110,101,114,61,115,116,97,116,101,46,111,119,110,101,114,44,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,61,115,116,97,116,101,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,115,116,97,116,101,46,99,117,114,114,101,110,99,121,44,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,118,97,108,105,100,97,116,111,114,115,41,58,40,116,104,105,115,46,35,111,119,110,101,114,61,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,61,53,101,52,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,116,111,107,101,110,65,100,100,114,101,115,115,44,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,109,115,103,46,115,101,110,100,101,114,93,61,123,102,105,114,115,116,83,101,101,110,58,40,110,101,119,32,68,97,116,101,41,46,103,101,116,84,105,109,101,40,41,44,97,99,116,105,118,101,58,33,48,125,41,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,111,119,110,101,114,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,111,119,110,101,114,125,103,101,116,32,99,117,114,114,101,110,99,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,99,117,114,114,101,110,99,121,125,103,101,116,32,118,97,108,105,100,97,116,111,114,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,125,125,103,101,116,32,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,125,103,101,116,32,109,105,110,105,109,117,109,66,97,108,97,110,99,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,99,104,97,110,103,101,79,119,110,101,114,40,111,119,110,101,114,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,110,32,111,119,110,101,114,34,41,125,99,104,97,110,103,101,67,117,114,114,101,110,99,121,40,99,117,114,114,101,110,99,121,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,110,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,125,104,97,115,40,118,97,108,105,100,97,116,111,114,41,123,114,101,116,117,114,110,32,66,111,111,108,101,97,110,40,118,111,105,100,32,48,33,61,61,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,41,125,97,115,121,110,99,32,97,100,100,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,41,123,105,102,40,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,97,108,114,101,97,100,121,32,97,32,118,97,108,105,100,97,116,111,114,34,41,59,99,111,110,115,116,32,98,97,108,97,110,99,101,61,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,116,104,105,115,46,99,117,114,114,101,110,99,121,44,34,98,97,108,97,110,99,101,79,102,34,44,91,109,115,103,46,115,101,110,100,101,114,93,41,59,105,102,40,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,98,97,108,97,110,99,101,32,116,111,32,108,111,119,33,32,103,111,116,58,32,36,123,98,97,108,97,110,99,101,125,32,110,101,101,100,58,32,36,123,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,96,41,59,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,61,123,102,105,114,115,116,83,101,101,110,58,40,110,101,119,32,68,97,116,101,41,46,103,101,116,84,105,109,101,40,41,44,97,99,116,105,118,101,58,33,48,125,125,114,101,109,111,118,101,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,41,123,105,102,40,33,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,118,97,108,105,100,97,116,111,114,32,110,111,116,32,102,111,117,110,100,34,41,59,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,45,61,49,44,100,101,108,101,116,101,32,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,125,97,115,121,110,99,32,117,112,100,97,116,101,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,44,97,99,116,105,118,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,118,97,108,105,100,97,116,111,114,32,110,111,116,32,102,111,117,110,100,34,41,59,99,111,110,115,116,32,98,97,108,97,110,99,101,61,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,116,104,105,115,46,99,117,114,114,101,110,99,121,44,34,98,97,108,97,110,99,101,79,102,34,44,91,109,115,103,46,115,101,110,100,101,114,93,41,59,105,102,40,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,38,38,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,38,38,40,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,61,33,49,41,44,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,98,97,108,97,110,99,101,32,116,111,32,108,111,119,33,32,103,111,116,58,32,36,123,98,97,108,97,110,99,101,125,32,110,101,101,100,58,32,36,123,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,96,41,59,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,61,97,99,116,105,118,101,125,125,59,10,26,58,98,97,53,120,100,97,100,102,109,98,54,102,119,52,50,106,50,112,97,122,55,51,52,112,117,98,122,119,120,110,55,114,103,105,119,119,109,103,115,51,100,99,105,99,114,52,117,50,101,107,104,113,101,118,113,118,99,117"};const{contractFactory:i,nativeToken:s,nameService:a,validators:c}={contractFactory:"ba5xdads6vcjiwvf34npzh6xrlaivpjgtp3mit3hwhxeumybwspjrhez3e",nativeToken:"ba5xdadfmb6fw42j2paz734pubzwxn7rgiwwmgs3dcicr4u2ekhqevqvcu",nameService:"ba5xdadsx73i3tkuk6q5bz4mm5zcgqipha3szmuixgit46albm2inuarp6",validators:"ba5xdac7kvy3cjka4aex7bz7w6ryqxgfbmwstomseyonytbssl7sleriud"},u=new Uint8Array(o.contractFactory.split(",")),f=new Uint8Array(o.nativeToken.split(",")),h=new Uint8Array(o.nameService.split(",")),l=new Uint8Array(o.validators.split(",")),d=e=>{if(e.decoded.to===c)return 0;let t=e.encoded.length;t/=1024,t/=1e6;const n=String(t).split(".");let r=0;if(n[1]){const e=n[1].split("e");n[1]=e[0],r=Number(e[1].replace(/\-|\+/g,""))+Number(e[0].length)}return Number.parseFloat(t.toString()).toFixed(r)};var p={nativeToken:s,nameService:a,contractFactory:i,validators:c,contractFactoryMessage:u,nativeTokenMessage:f,nameServiceMessage:h,validatorsMessage:l,TransactionMessage:r.TransactionMessage,ContractMessage:r.ContractMessage,BlockMessage:r.BlockMessage,BWMessage:r.BWMessage,BWRequestMessage:r.BWRequestMessage,calculateFee:d,calculateTransactionFee:e=>(e=new r.TransactionMessage(e),d(e))};e.exports=p},7936:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(7160),o=n(6745);function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(r);class a extends o.FormatInterface{get keys(){return["creator","contract","constructorParameters"]}constructor(e){super(e,s.default("\nmessage ContractMessage {\n required string creator = 1;\n required bytes contract = 2;\n repeated string constructorParameters = 3;\n}\n").ContractMessage,{name:"contract-message"})}}var c=Object.freeze({__proto__:null,default:a});class u extends o.FormatInterface{get keys(){return["timestamp","from","to","nonce","method","params"]}constructor(e){super(e,s.default("\n\nmessage TransactionMessage {\n required uint64 timestamp = 1;\n required string from = 2;\n required string to = 3;\n required uint64 nonce = 4;\n required string method = 5;\n repeated string params = 6;\n}\n").TransactionMessage,{name:"transaction-message"})}}var f=Object.freeze({__proto__:null,default:u});class h extends o.FormatInterface{get keys(){return["index","previousHash","timestamp","reward","fees","transactions","validators"]}constructor(e){super(e,s.default("\nmessage ValidatorMessage {\n required string address = 1;\n required string reward = 2;\n}\n\nmessage Transaction {\n required string hash = 1;\n required uint64 timestamp = 2;\n required string from = 3;\n required string to = 4;\n required uint64 nonce = 5;\n required string method = 6;\n repeated string params = 7;\n}\n\nmessage BlockMessage {\n required uint64 index = 1;\n required string previousHash = 3;\n required uint64 timestamp = 4;\n required uint64 reward = 5;\n required string fees = 6;\n repeated Transaction transactions = 7;\n repeated ValidatorMessage validators = 8;\n}\n").BlockMessage,{name:"block-message"})}}var l=Object.freeze({__proto__:null,default:h});class d extends o.FormatInterface{get keys(){return["up","down"]}constructor(e){super(e,s.default("\n\nmessage BWMessage {\n required uint64 up = 1;\n required uint64 down = 2;\n}\n").BWMessage,{name:"bw-message"})}}var p=Object.freeze({__proto__:null,default:d});class g extends o.FormatInterface{get keys(){return[]}constructor(e){super(e,s.default("\n\nmessage BWRequestMessage {\n}\n").BWRequestMessage,{name:"bw-request-message"})}}var b=Object.freeze({__proto__:null,default:g});t.BWMessage=p,t.BWRequestMessage=b,t.BlockMessage=l,t.ContractMessage=c,t.TransactionMessage=f},7948:function(){},9742:function(e,t){t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=c(e),s=i[0],a=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),f=0,h=a>0?s-4:s;for(n=0;n<h;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;return 2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[f++]=255&t),1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],s=16383,a=0,c=r-o;a<c;a+=s)i.push(u(e,a,a+s>c?c:a+s));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s<a;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var o,i,s=[],a=t;a<r;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:function(e,t,n){const r=n(9742),o=n(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=a(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const o=function(e){if(c.isBuffer(e)){const t=0|p(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return f(e),a(e<0?0:0|p(e))}function l(e){const t=e.length<0?0:0|p(e.length),n=a(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(o)return r?-1:V(e).length;t=(""+t).toLowerCase(),o=!0}}function b(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return B(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){let i,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let r=-1;for(i=n;i<a;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*s}else-1!==r&&(i-=i-r),r=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function v(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let s;for(r>i/2&&(r=i/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(K(r))return s;e[n+s]=r}return s}function _(e,t,n,r){return J(V(t,e.length-n),e,n,r)}function E(e,t,n,r){return J(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return J(G(t),e,n,r)}function k(e,t,n,r){return J(function(e,t){let n,r,o;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function B(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(o+s<=n){let n,r,a,c;switch(s){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],a=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=s}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}(r)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return f(e),e<=0?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},c.allocUnsafe=function(e){return h(e)},c.allocUnsafeSlow=function(e){return h(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.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,r=t.length;for(let o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let o=0;for(n=0;n<e.length;++n){let t=e[n];if(Y(t,Uint8Array))o+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const 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)y(this,t,t+1);return this},c.prototype.swap32=function(){const 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)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const 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)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?B(this,0,e):b.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const a=Math.min(i,s),u=this.slice(r,o),f=e.slice(t,n);for(let e=0;e<a;++e)if(u[e]!==f[e]){i=u[e],s=f[e];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function R(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function M(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Z[e[r]];return o}function O(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function C(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function U(e,t,n,r,o){z(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function j(e,t,n,r,o){z(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function N(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(e,t,n,r,i){return t=+t,n>>>=0,i||N(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,i){return t=+t,n>>>=0,i||N(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){$(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){$(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){$(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){$(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let o=0,i=1,s=0;for(this[t]=255&e;++o<n&&(i*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let o=n-1,i=1,s=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(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]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)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(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const o=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=i[o%s]}return this};const q={};function D(e,t,n){q[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function z(e,t,n,r,o,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new q.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){$(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,o,i)}function $(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw $(e,n),new q.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=F(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=F(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function G(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},7187:function(e){var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var o,i,s,u;if(a(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=s.length,u=f,console&&console.warn&&console.warn(u)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=f.bind(r);return o.listener=n,r.wrapFn=o,o}function l(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):p(o,o.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,f=p(c,u);for(n=0;n<u;++n)r(f[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return l(this,e,!0)},i.prototype.rawListeners=function(e){return l(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:function(e,t){t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,c=(1<<a)-1,u=c>>1,f=-7,h=n?o-1:0,l=n?-1:1,d=e[t+h];for(h+=l,i=d&(1<<-f)-1,d>>=-f,f+=a;f>0;i=256*i+e[t+h],h+=l,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=r;f>0;s=256*s+e[t+h],h+=l,f-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=u}return(d?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,c,u=8*i-o-1,f=(1<<u)-1,h=f>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+h>=1?l/c:l*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(t*c-1)*Math.pow(2,o),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[n+d]=255&a,d+=p,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;e[n+d]=255&s,d+=p,s/=256,u-=8);e[n+d-p]|=128*g}},5717:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},5811:function(e,t,n){e.exports=n(6066)(n(9653))},6066:function(e,t,n){const r=n(7016),o=n(5675);e.exports=function(e){const t=r(e),n=o(e);return function(e,r){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,r);case"keccak256":return new t(1088,512,null,256,r);case"keccak384":return new t(832,768,null,384,r);case"keccak512":return new t(576,1024,null,512,r);case"sha3-224":return new t(1152,448,6,224,r);case"sha3-256":return new t(1088,512,6,256,r);case"sha3-384":return new t(832,768,6,384,r);case"sha3-512":return new t(576,1024,6,512,r);case"shake128":return new n(1344,256,31,r);case"shake256":return new n(1088,512,31,r);default:throw new Error("Invald algorithm: "+e)}}}},7016:function(e,t,n){var r=n(8764).Buffer;const{Transform:o}=n(8473);e.exports=e=>class t extends o{constructor(t,n,r,o,i){super(i),this._rate=t,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=o,this._options=i,this._state=new e,this._state.initialize(t,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return r.isBuffer(e)||(e=r.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},5675:function(e,t,n){var r=n(8764).Buffer;const{Transform:o}=n(8473);e.exports=e=>class t extends o{constructor(t,n,r,o){super(o),this._rate=t,this._capacity=n,this._delimitedSuffix=r,this._options=o,this._state=new e,this._state.initialize(t,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return r.isBuffer(e)||(e=r.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},4040:function(e,t){const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],i=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49];let d=h^(i<<1|s>>>31),p=l^(s<<1|i>>>31);const g=e[0]^d,b=e[1]^p,y=e[10]^d,w=e[11]^p,m=e[20]^d,v=e[21]^p,_=e[30]^d,E=e[31]^p,x=e[40]^d,k=e[41]^p;d=r^(a<<1|c>>>31),p=o^(c<<1|a>>>31);const S=e[2]^d,B=e[3]^p,A=e[12]^d,T=e[13]^p,R=e[22]^d,M=e[23]^p,O=e[32]^d,C=e[33]^p,L=e[42]^d,U=e[43]^p;d=i^(u<<1|f>>>31),p=s^(f<<1|u>>>31);const j=e[4]^d,N=e[5]^p,I=e[14]^d,P=e[15]^p,q=e[24]^d,D=e[25]^p,F=e[34]^d,z=e[35]^p,$=e[44]^d,H=e[45]^p;d=a^(h<<1|l>>>31),p=c^(l<<1|h>>>31);const W=e[6]^d,V=e[7]^p,G=e[16]^d,J=e[17]^p,Y=e[26]^d,K=e[27]^p,Z=e[36]^d,X=e[37]^p,Q=e[46]^d,ee=e[47]^p;d=u^(r<<1|o>>>31),p=f^(o<<1|r>>>31);const te=e[8]^d,ne=e[9]^p,re=e[18]^d,oe=e[19]^p,ie=e[28]^d,se=e[29]^p,ae=e[38]^d,ce=e[39]^p,ue=e[48]^d,fe=e[49]^p,he=g,le=b,de=w<<4|y>>>28,pe=y<<4|w>>>28,ge=m<<3|v>>>29,be=v<<3|m>>>29,ye=E<<9|_>>>23,we=_<<9|E>>>23,me=x<<18|k>>>14,ve=k<<18|x>>>14,_e=S<<1|B>>>31,Ee=B<<1|S>>>31,xe=T<<12|A>>>20,ke=A<<12|T>>>20,Se=R<<10|M>>>22,Be=M<<10|R>>>22,Ae=C<<13|O>>>19,Te=O<<13|C>>>19,Re=L<<2|U>>>30,Me=U<<2|L>>>30,Oe=N<<30|j>>>2,Ce=j<<30|N>>>2,Le=I<<6|P>>>26,Ue=P<<6|I>>>26,je=D<<11|q>>>21,Ne=q<<11|D>>>21,Ie=F<<15|z>>>17,Pe=z<<15|F>>>17,qe=H<<29|$>>>3,De=$<<29|H>>>3,Fe=W<<28|V>>>4,ze=V<<28|W>>>4,$e=J<<23|G>>>9,He=G<<23|J>>>9,We=Y<<25|K>>>7,Ve=K<<25|Y>>>7,Ge=Z<<21|X>>>11,Je=X<<21|Z>>>11,Ye=ee<<24|Q>>>8,Ke=Q<<24|ee>>>8,Ze=te<<27|ne>>>5,Xe=ne<<27|te>>>5,Qe=re<<20|oe>>>12,et=oe<<20|re>>>12,tt=se<<7|ie>>>25,nt=ie<<7|se>>>25,rt=ae<<8|ce>>>24,ot=ce<<8|ae>>>24,it=ue<<14|fe>>>18,st=fe<<14|ue>>>18;e[0]=he^~xe&je,e[1]=le^~ke&Ne,e[10]=Fe^~Qe&ge,e[11]=ze^~et&be,e[20]=_e^~Le&We,e[21]=Ee^~Ue&Ve,e[30]=Ze^~de&Se,e[31]=Xe^~pe&Be,e[40]=Oe^~$e&tt,e[41]=Ce^~He&nt,e[2]=xe^~je&Ge,e[3]=ke^~Ne&Je,e[12]=Qe^~ge&Ae,e[13]=et^~be&Te,e[22]=Le^~We&rt,e[23]=Ue^~Ve&ot,e[32]=de^~Se&Ie,e[33]=pe^~Be&Pe,e[42]=$e^~tt&ye,e[43]=He^~nt&we,e[4]=je^~Ge&it,e[5]=Ne^~Je&st,e[14]=ge^~Ae&qe,e[15]=be^~Te&De,e[24]=We^~rt&me,e[25]=Ve^~ot&ve,e[34]=Se^~Ie&Ye,e[35]=Be^~Pe&Ke,e[44]=tt^~ye&Re,e[45]=nt^~we&Me,e[6]=Ge^~it&he,e[7]=Je^~st&le,e[16]=Ae^~qe&Fe,e[17]=Te^~De&ze,e[26]=rt^~me&_e,e[27]=ot^~ve&Ee,e[36]=Ie^~Ye&Ze,e[37]=Pe^~Ke&Xe,e[46]=ye^~Re&Oe,e[47]=we^~Me&Ce,e[8]=it^~he&xe,e[9]=st^~le&ke,e[18]=qe^~Fe&Qe,e[19]=De^~ze&et,e[28]=me^~_e&Le,e[29]=ve^~Ee&Ue,e[38]=Ye^~Ze&de,e[39]=Ke^~Xe&pe,e[48]=Re^~Oe&$e,e[49]=Me^~Ce&He,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},9653:function(e,t,n){var r=n(8764).Buffer;const o=n(4040);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(o.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!=(128&e)&&this.count===this.blockSize-1&&o.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,o.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=r.alloc(e);for(let n=0;n<e;++n)t[n]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(o.p1600(this.state),this.count=0);return t},i.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i},4894:function(e,t,n){var r=n(7126),o=n(2565);e.exports=r,e.exports.parse=r,e.exports.stringify=o},7126:function(e,t,n){var r=n(989),o=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],i=function(e){var t=e.shift();if("{"!==t)return t;t={};for(var n="";e.length;)switch(e[0]){case"}":return e.shift(),t;case":":e.shift(),t[n]=i(e);break;default:n=e.shift()}},s=function(e){for(var t={};e.length;)switch(e[0]){case"[":case",":e.shift();var n=e.shift();"("===n&&(n=e.shift(),e.shift());var r=[];if("."===e[0][0]&&(r=e[0].substr(1).split("."),e.shift()),"="!==e[0])throw new Error("Unexpected token in field options: "+e[0]);if(e.shift(),"]"===e[0])throw new Error("Unexpected ] in field option");var o=[n].concat(r),s=o.pop();o.reduce((function(e,t,n){return null==e[t]&&(e[t]={}),e[t]}),t)[s]=i(e);break;case"]":return e.shift(),t;default:throw new Error("Unexpected token in field options: "+e[0])}throw new Error("No closing tag for field options")},a=function(e){for(var t={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};e.length;)switch(e[0]){case"=":e.shift(),t.tag=Number(e.shift());break;case"map":if(t.type="map",t.map={from:null,to:null},e.shift(),"<"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.from=e.shift(),","!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.to=e.shift(),">"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);e.shift(),t.name=e.shift();break;case"repeated":case"required":case"optional":var n=e.shift();t.required="required"===n,t.repeated="repeated"===n,t.type=e.shift(),t.name=e.shift();break;case"[":t.options=s(e);break;case";":if(null===t.name)throw new Error("Missing field name");if(null===t.type)throw new Error("Missing type in message field: "+t.name);if(-1===t.tag)throw new Error("Missing tag number in message field: "+t.name);return e.shift(),t;default:throw new Error("Unexpected token in message field: "+e[0])}throw new Error("No ; found for message field")},c=function(e){for(var t={enums:[],options:{},messages:[],fields:[],extends:[],extensions:null};e.length;)switch(e[0]){case"map":case"repeated":case"optional":case"required":t.fields.push(a(e));break;case"enum":t.enums.push(g(e));break;case"message":t.messages.push(h(e));break;case"extensions":t.extensions=f(e);break;case"oneof":e.shift();var n=e.shift();if("{"!==e[0])throw new Error("Unexpected token in oneof: "+e[0]);for(e.shift();"}"!==e[0];){e.unshift("optional");var r=a(e);r.oneof=n,t.fields.push(r)}e.shift();break;case"extend":t.extends.push(u(e));break;case";":e.shift();break;case"reserved":for(e.shift();";"!==e[0];)e.shift();break;case"option":var o=b(e);if(void 0!==t.options[o.name])throw new Error("Duplicate option "+o.name);t.options[o.name]=o.value;break;default:e.unshift("optional"),t.fields.push(a(e))}return t},u=function(e){return{name:e[1],message:h(e)}},f=function(e){e.shift();var t=Number(e.shift());if(isNaN(t))throw new Error("Invalid from in extensions definition");if("to"!==e.shift())throw new Error("Expected keyword 'to' in extensions definition");var n=e.shift();if("max"===n&&(n=536870911),n=Number(n),isNaN(n))throw new Error("Invalid to in extensions definition");if(";"!==e.shift())throw new Error("Missing ; in extensions definition");return{from:t,to:n}},h=function(e){e.shift();var t=1,n=[],r={name:e.shift(),options:{},enums:[],extends:[],messages:[],fields:[]};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("{"===e[0]?t++:"}"===e[0]&&t--,!t)return e.shift(),n=c(n),r.enums=n.enums,r.messages=n.messages,r.fields=n.fields,r.extends=n.extends,r.extensions=n.extensions,r.options=n.options,r;n.push(e.shift())}if(t)throw new Error("No closing tag for message")},l=function(e){e.shift();var t=e.shift();if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},d=function(e){if(e.shift(),"="!==e[0])throw new Error("Expected = but found "+e[0]);e.shift();var t=e.shift();switch(t){case'"proto2"':t=2;break;case'"proto3"':t=3;break;default:throw new Error("Expected protobuf syntax version but found "+t)}if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},p=function(e){if(e.length<4)throw new Error("Invalid enum value: "+e.slice(0,3).join(" "));if("reserved"===e[0]){for(e.shift();";"!==e[0];)e.shift();return e.shift(),null}if("="!==e[1])throw new Error("Expected = but found "+e[1]);if(";"!==e[3]&&"["!==e[3])throw new Error("Expected ; or [ but found "+e[1]);var t=e.shift();e.shift();var n={value:null,options:{}};return n.value=Number(e.shift()),"["===e[0]&&(n.options=s(e)),e.shift(),{name:t,val:n}},g=function(e){e.shift();var t={},n={name:e.shift(),values:{},options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),n;if("option"!==e[0]){var r=p(e);null!==r&&(n.values[r.name]=r.val)}else t=b(e),n.options[t.name]=t.value}throw new Error("No closing tag for enum")},b=function(e){for(var t=null,n=null,r=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")};e.length;){if(";"===e[0])return e.shift(),{name:t,value:n};switch(e[0]){case"option":e.shift();var o="("===e[0];if(o&&e.shift(),t=e.shift(),o){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}"."===e[0][0]&&(t+=e.shift());break;case"=":if(e.shift(),null===t)throw new Error("Expected key for option with value: "+e[0]);if(n=r(e.shift()),"optimize_for"===t&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(n))throw new Error("Unexpected value for option optimize_for: "+n);"{"===n&&(n=y(e));break;default:throw new Error("Unexpected token in option: "+e[0])}}},y=function(e){for(var t=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")},n={};e.length;){if("}"===e[0])return e.shift(),n;var r="("===e[0];r&&e.shift();var o=e.shift();if(r){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}var i=null;switch(e[0]){case":":if(void 0!==n[o])throw new Error("Duplicate option map key "+o);e.shift(),"{"===(i=t(e.shift()))&&(i=y(e)),n[o]=i,";"===e[0]&&e.shift();break;case"{":if(e.shift(),i=y(e),void 0===n[o]&&(n[o]=[]),!Array.isArray(n[o]))throw new Error("Duplicate option map key "+o);n[o].push(i);break;default:throw new Error("Unexpected token in option map: "+e[0])}}throw new Error("No closing tag for option map")},w=function(e){e.shift();var t=e.shift().replace(/^"+|"+$/gm,"");if(";"!==e[0])throw new Error("Unexpected token: "+e[0]+'. Expected ";"');return e.shift(),t},m=function(e){e.shift();var t={name:e.shift(),methods:[],options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;switch(e[0]){case"option":var n=b(e);if(void 0!==t.options[n.name])throw new Error("Duplicate option "+n.name);t.options[n.name]=n.value;break;case"rpc":t.methods.push(v(e));break;default:throw new Error("Unexpected token in service: "+e[0])}}throw new Error("No closing tag for service")},v=function(e){e.shift();var t={name:e.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.client_streaming=!0),t.input_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),"returns"!==e[0])throw new Error("Expected returns but found "+e[0]);if(e.shift(),"("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.server_streaming=!0),t.output_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),";"===e[0])return e.shift(),t;if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;if("option"!==e[0])throw new Error("Unexpected token in rpc options: "+e[0]);var n=b(e);if(void 0!==t.options[n.name])throw new Error("Duplicate option "+n.name);t.options[n.name]=n.value}throw new Error("No closing tag for rpc")};e.exports=function(e){for(var t=r(e.toString()),n=0;n<t.length;n++){var i;if(/^("|')([^'"]*)$/.test(t[n]))for(i=1===t[n].length?n+1:n;i<t.length;i++)if(/^[^'"\\]*(?:\\.[^'"\\]*)*("|')$/.test(t[i])){t=t.slice(0,n).concat(t.slice(n,i+1).join("")).concat(t.slice(i+1));break}}for(var s={syntax:3,package:null,imports:[],enums:[],messages:[],options:{},extends:[]},a=!0;t.length;){switch(t[0]){case"package":s.package=l(t);break;case"syntax":if(!a)throw new Error("Protobuf syntax version should be first thing in file");s.syntax=d(t);break;case"message":s.messages.push(h(t));break;case"enum":s.enums.push(g(t));break;case"option":var c=b(t);if(s.options[c.name])throw new Error("Duplicate option "+c.name);s.options[c.name]=c.value;break;case"import":s.imports.push(w(t));break;case"extend":s.extends.push(u(t));break;case"service":s.services||(s.services=[]),s.services.push(m(t));break;default:throw new Error("Unexpected token: "+t[0])}a=!1}return s.extends.forEach((function(e){s.messages.forEach((function(t){t.name===e.name&&e.message.fields.forEach((function(e){if(!t.extensions||e.tag<t.extensions.from||e.tag>t.extensions.to)throw new Error(t.name+" does not declare "+e.tag+" as an extension number");t.fields.push(e)}))}))})),s.messages.forEach((function(e){e.fields.forEach((function(t){var n,r,i,a;if(t.options&&"true"===t.options.packed&&-1===o.indexOf(t.type)){if(-1===t.type.indexOf(".")){if(e.enums&&e.enums.some((function(e){return e.name===t.type})))return}else{if((n=t.type.split(".")).length>2)throw new Error("what is this?");if(r=n[0],i=n[1],s.messages.some((function(e){if(e.name===r)return a=e,e})),a&&a.enums&&a.enums.some((function(e){return e.name===i})))return}throw new Error("Fields of type "+t.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}}))})),s}},2565:function(e){var t=function(e,t){var n=e.repeated?"repeated":e.required?"required":"optional";"map"===e.type&&(n="map<"+e.map.from+","+e.map.to+">"),e.oneof&&(n="");var r=Object.keys(e.options||{}).map((function(t){return t+" = "+e.options[t]})).join(",");return r&&(r=" ["+r+"]"),t.push((n?n+" ":"")+("map"===e.map?"":e.type+" ")+e.name+" = "+e.tag+r+";"),t},n=function(e,o){o.push("message "+e.name+" {"),e.options||(e.options={}),i(e.options,o),e.enums||(e.enums=[]),e.enums.forEach((function(e){o.push(r(e,[]))})),e.messages||(e.messages=[]),e.messages.forEach((function(e){o.push(n(e,[]))}));var s={};return e.fields||(e.fields=[]),e.fields.forEach((function(e){e.oneof?(s[e.oneof]||(s[e.oneof]=[]),s[e.oneof].push(t(e,[]))):o.push(t(e,[]))})),Object.keys(s).forEach((function(e){s[e].unshift("oneof "+e+" {"),s[e].push("}"),o.push(s[e])})),o.push("}",""),o},r=function(e,t){t.push("enum "+e.name+" {"),e.options||(e.options={});var n=i(e.options,[]);return n.length>1&&t.push(n.slice(0,-1)),Object.keys(e.values).map((function(n){var r=o(e.values[n]);t.push([n+" = "+r+";"])})),t.push("}",""),t},o=function(e,t){var n=Object.keys(e.options||{}).map((function(t){return t+" = "+e.options[t]})).join(",");return n&&(n=" ["+n+"]"),e.value+n},i=function(e,t){var n=Object.keys(e);return n.forEach((function(n){var r=e[n];~n.indexOf(".")&&(n="("+n+")");var o=typeof r;"object"===o?(r=s(r,[])).length&&t.push("option "+n+" = {",r,"};"):("string"===o&&"optimize_for"!==n&&(r='"'+r+'"'),t.push("option "+n+" = "+r+";"))})),n.length>0&&t.push(""),t},s=function(e,t){return Object.keys(e).forEach((function(n){var r=e[n],o=typeof r;"object"===o?Array.isArray(r)?r.forEach((function(e){(e=s(e,[])).length&&t.push(n+" {",e,"}")})):(r=s(r,[])).length&&t.push(n+" {",r,"}"):("string"===o&&(r='"'+r+'"'),t.push(n+": "+r))})),t},a=function(e){return function(t){return Array.isArray(t)?t.map(a(e+" ")).join("\n"):e+t}};e.exports=function(e){var t=[];return t.push('syntax = "proto'+e.syntax+'";',""),e.package&&t.push("package "+e.package+";",""),e.imports&&e.imports.forEach((function(e){!function(e,t){t.push('import "'+e+'";',"")}(e,t)})),e.options||(e.options={}),i(e.options,t),e.enums||(e.enums=[]),e.enums.forEach((function(e){r(e,t)})),e.messages||(e.messages=[]),e.messages.forEach((function(e){n(e,t)})),e.services&&e.services.forEach((function(e){!function(e,t){t.push("service "+e.name+" {"),e.options||(e.options={}),i(e.options,t),e.methods||(e.methods=[]),e.methods.forEach((function(e){t.push(function(e,t){var n="rpc "+e.name+"(";e.client_streaming&&(n+="stream "),n+=e.input_type+") returns (",e.server_streaming&&(n+="stream "),n+=e.output_type+")",e.options||(e.options={});var r=i(e.options,[]);return r.length>1?t.push(n+" {",r.slice(0,-1),"}"):t.push(n+";"),t}(e,[]))})),t.push("}","")}(e,t)})),t.map(a("")).join("\n")}},989:function(e){e.exports=function(e){var t,n,r=function(e){return e.trim()},o=[];return e.replace(/"(\\"|[^"\n])*?"|'(\\'|[^'\n])*?'/gm,(n=o,function(e){var t="$"+n.length+"$";return n.push(e),t})).replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(r).filter(Boolean).map((function(e){var t=e.indexOf("//");return t>-1?e.slice(0,t):e})).map(r).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter((t=!1,function(e){return"/*"===e?(t=!0,!1):"*/"===e?(t=!1,!1):!t})).map(function(e){var t=/^\$(\d+)\$$/;return function(n){var r=n.match(t);return r?e[+r[1]]:n}}(o))}},8853:function(e){e.exports=function e(t,n){var r,o=0,i=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],o+=i<28?(127&r)<<i:(127&r)*Math.pow(2,i),i+=7}while(r>=128);return e.bytes=s-n,o}},7659:function(e){e.exports=function e(n,r,o){r=r||[];for(var i=o=o||0;n>=t;)r[o++]=255&n|128,n/=128;for(;-128&n;)r[o++]=255&n|128,n>>>=7;return r[o]=0|n,e.bytes=o-i+1,r};var t=Math.pow(2,31)},138:function(e,t,n){e.exports={encode:n(7659),decode:n(8853),encodingLength:n(184)}},184:function(e){var t=Math.pow(2,7),n=Math.pow(2,14),r=Math.pow(2,21),o=Math.pow(2,28),i=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),c=Math.pow(2,56),u=Math.pow(2,63);e.exports=function(e){return e<t?1:e<n?2:e<r?3:e<o?4:e<i?5:e<s?6:e<a?7:e<c?8:e<u?9:10}},7986:function(e,t,n){const r=n(138),o=n(3864).r;function i(e){return`${e.substring(0,1).toUpperCase()}${e.substring(1)}`}function s(e,t,n,r){if(Object.prototype.hasOwnProperty.call(e,t))return;const o=i(t);Object.defineProperties(e,{[t]:{enumerable:!0,configurable:!0,set:e=>{n=e},get:()=>void 0===n?r:n},[`has${o}`]:{configurable:!0,value:()=>void 0!==n},[`set${o}`]:{configurable:!0,value:e=>{n=e}},[`get${o}`]:{configurable:!0,value:()=>n},[`clear${o}`]:{configurable:!0,value:()=>{n=void 0,e[t]=void 0}}})}var a=function(e,t,n,o){switch(e){case 0:return r.decode(t,o),o+r.decode.bytes;case 1:return o+8;case 2:var i=r.decode(t,o);return o+r.decode.bytes+i;case 3:case 4:throw new Error("Groups are not supported");case 5:return o+4;default:throw new Error("Unknown wire type: "+e)}},c=function(e){if(e.map)return{};if(e.repeated)return[];switch(e.type){case"string":return"";case"bool":return!1;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return 0;default:return null}},u=function(e,t){if(void 0===t)return t;switch(e.type){case"bool":return"true"===t;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(t,10);default:return t}};e.exports=function(e,t,n){const f=[],h={},l=[],d=[];for(var p=0;p<n.length;p++){const n=e.fields[p];h[n.tag]=p;const r=n.options&&n.options.default,o=t(n.type,e.id,!1);d[p]=[r,o&&o.values],e.fields[p].packed=n.repeated&&n.options&&n.options.packed&&"false"!==n.options.packed,n.required&&f.push(n.name),n.oneof&&l.push(n.name)}function g(e,t,n,o,a,c,u){const f=t.name;if(t.oneof){const e=Object.keys(n);for(var h=0;h<e.length;h++)if(l.indexOf(e[h])>-1){const t=i(e[h]);delete n[`has${t}`],delete n[`get${t}`],delete n[`set${t}`],delete n[`clear${t}`],delete n[e[h]]}}let d;if(e.message){const i=r.decode(o,c);c+=r.decode.bytes;const s=e.decode(o,a,c,c+i);t.map?(d=n[f]||{},d[s.key]=s.value):t.repeated?(d=n[f]||[],d.push(s)):d=s}else t.repeated?(d=n[f]||[],d.push(e.decode(o,a,c))):d=e.decode(o,a,c);return s(n,f,d),c+e.decode.bytes}return function t(i,p,b,y){if(null==b&&(b=0),null==y&&(y=i.length),!(y<=i.length&&b<=i.length))throw new Error("Decoded message is not valid");p||(p=new DataView(i.buffer,i.byteOffset,i.byteLength));for(var w,m=b,v={};;){if(y<=b){var _,E,x="",k=0;for(k=0;k<f.length;k++)if(x=f[k],!o(v[x]))throw new Error("Decoded message is not valid, missing required field: "+x);for(k=0;k<n.length;k++){let t;if(w=e.fields[k],E=d[k][0],_=d[k][1],x=w.name,!Object.prototype.hasOwnProperty.call(v,x)){var S=!1;if(w.oneof)for(var B=Object.keys(v),A=0;A<B.length;A++)if(l.indexOf(B[A])>-1){S=!0;break}S||(_?w.repeated?E=[]:(E=E&&_[E]?_[E].value:_[Object.keys(_)[0]].value,E=parseInt(E||0,10)):(t=c(w),E=u(w,E)),s(v,x,E,t))}}return t.bytes=b-m,v}var T=r.decode(i,b);b+=r.decode.bytes;var R=h[T>>3];if(null!=R){var M=n[R];if((w=e.fields[R]).packed){var O=r.decode(i,b);for(O+=b+=r.decode.bytes;b<O;)b=g(M,w,v,i,p,b)}else b=g(M,w,v,i,p,b)}else b=a(7&T,i,0,b)}}}},9611:function(e,t,n){var r=n(3864).r,o=n(138);e.exports=function(e,t,n,i,s){const a=Object.keys(i),c=n.length,u={};for(let t=0;t<c;t++){u[t]={p:o.encode(e.fields[t].tag<<3|2),h:o.encode(e.fields[t].tag<<3|n[t].type)};const r=e.fields[t];e.fields[t].packed=r.repeated&&r.options&&r.options.packed&&"false"!==r.options.packed}function f(e,t,n,r,i,s,a){let c=0;if(!s)for(c=0;c<r.length;c++)e[n++]=r[c];return i.message&&(o.encode(i.encodingLength(a),e,n),n+=o.encode.bytes),i.encode(a,e,t,n),n+i.encode.bytes}return function t(h,l,d,p=0){null==l&&(l=new Uint8Array(s(h))),null==d&&(d=new DataView(l.buffer,l.byteOffset,l.byteLength));const g=p,b=Object.keys(h);let y=0,w=!1;for(y=0;y<a.length;y++){const e=a[y],t=i[y];if(b.indexOf(t)>-1){if(w)throw new Error("only one of the properties defined in oneof "+e+" can be set");w=!0}}for(y=0;y<c;y++){const t=n[y],i=e.fields[y];let s=h[i.name],a=0;if(!r(s)){if(i.required)throw new Error(i.name+" is required");continue}const c=u[y].p,g=u[y].h,b=i.packed;if(i.map){const e=Object.keys(s);for(a=0;a<e.length;a++)e[a]={key:e[a],value:s[e[a]]};s=e}if(b){let e=0;for(a=0;a<s.length;a++)Object.prototype.hasOwnProperty.call(s,a)&&(e+=t.encodingLength(s[a]));if(e){for(a=0;a<g.length;a++)l[p++]=c[a];o.encode(e,l,p),p+=o.encode.bytes}}if(i.repeated){let e;for(a=0;a<s.length;a++)e=s[a],r(e)&&(p=f(l,d,p,g,t,b,e))}else p=f(l,d,p,g,t,b,s)}return t.bytes=p-g,l}}},1216:function(e,t,n){var r=n(3864).r,o=n(138);e.exports=function(e,t,n){const i=Object.keys(n),s=t.length,a=new Array(s);for(let n=0;n<e.fields.length;n++){a[n]=o.encodingLength(e.fields[n].tag<<3|t[n].type);const r=e.fields[n];e.fields[n].packed=r.repeated&&r.options&&r.options.packed&&"false"!==r.options.packed}return function(c){let u=0,f=0,h=0;for(f=0;f<i.length;f++){const e=i[f],t=n[e];let o=!1;for(h=0;h<t.length;h++)if(r(c[t[h]])){if(o)throw new Error("only one of the properties defined in oneof "+e+" can be set");o=!0}}for(f=0;f<s;f++){const n=t[f],i=e.fields[f];let s=c[i.name];const l=a[f];let d;if(r(s)){if(i.map){const e=Object.keys(s);for(h=0;h<e.length;h++)e[h]={key:e[h],value:s[e[h]]};s=e}if(i.packed){let e=0;for(h=0;h<s.length;h++)r(s[h])&&(d=n.encodingLength(s[h]),e+=d,n.message&&(e+=o.encodingLength(d)));e&&(u+=l+e+o.encodingLength(e))}else if(i.repeated)for(h=0;h<s.length;h++)r(s[h])&&(d=n.encodingLength(s[h]),u+=l+d+(n.message?o.encodingLength(d):0));else d=n.encodingLength(s),u+=l+d+(n.message?o.encodingLength(d):0)}else if(i.required)throw new Error(i.name+" is required")}return u}}},104:function(e,t,n){const r=n(9851);e.exports=r(0,(function e(t,n,r,o){n[o]=t?1:0,e.bytes=1}),(function e(t,n,r){const o=t[r]>0;return e.bytes=1,o}),(function(){return 1}))},1092:function(e,t,n){const r=n(138),o=n(9851);function i(e){return e.byteLength}e.exports=o(2,(function e(t,n,o,s){const a=s,c=i(t);r.encode(c,n,s),s+=r.encode.bytes,n.set(t,s),e.bytes=(s+=c)-a}),(function e(t,n,o){const i=o,s=r.decode(t,o);o+=r.decode.bytes;const a=t.slice(o,o+s);return o+=a.length,e.bytes=o-i,a}),(function(e){const t=i(e);return r.encodingLength(t)+t}))},9620:function(e,t,n){const r=n(9851);e.exports=r(1,(function e(t,n,r,o){r.setFloat64(o,t,!0),e.bytes=8}),(function e(t,n,r){const o=n.getFloat64(r,!0);return e.bytes=8,o}),(function(){return 8}))},9851:function(e){e.exports=function(e,t,n,r){return t.bytes=n.bytes=0,{type:e,encode:t,decode:n,encodingLength:r}}},9018:function(e,t,n){const r=n(9851);e.exports=r(5,(function e(t,n,r,o){r.setUint32(o,t,!0),e.bytes=4}),(function e(t,n,r){const o=n.getUint32(r,!0);return e.bytes=4,o}),(function(e){return 4}))},3334:function(e,t,n){const r=n(9851);e.exports=r(1,(function e(t,n,r,o){for(const e of t)n[o]=e,o++;e.bytes=8}),(function e(t,n,r){const o=t.slice(r,r+8);return e.bytes=8,o}),(function(){return 8}))},4606:function(e,t,n){const r=n(9851);e.exports=r(5,(function e(t,n,r,o){r.setFloat32(o,t,!0),e.bytes=4}),(function e(t,n,r){const o=n.getFloat32(r,!0);return e.bytes=4,o}),(function(){return 4}))},119:function(e,t,n){t.make=n(9851),t.bytes=n(1092),t.string=n(6626),t.bool=n(104),t.int32=n(5282),t.int64=n(4291),t.sint32=t.sint64=n(2407),t.uint32=t.uint64=t.enum=t.varint=n(3083),t.fixed64=t.sfixed64=n(3334),t.double=n(9620),t.fixed32=n(9018),t.sfixed32=n(2730),t.float=n(4606)},5282:function(e,t,n){const r=n(138),o=n(9851);e.exports=o(0,(function e(t,n,o,i){r.encode(t<0?t+4294967296:t,n,i),e.bytes=r.encode.bytes}),(function e(t,n,o){const i=r.decode(t,o);return e.bytes=r.decode.bytes,i>2147483647?i-4294967296:i}),(function(e){return r.encodingLength(e<0?e+4294967296:e)}))},4291:function(e,t,n){const r=n(138),o=n(9851);e.exports=o(0,(function e(t,n,o,i){if(t<0){const o=i+9;for(r.encode(-1*t,n,i),n[i+=r.encode.bytes-1]=128|n[i];i<o-1;)n[++i]=255;n[o]=1,e.bytes=10}else r.encode(t,n,i),e.bytes=r.encode.bytes}),(function e(t,n,o){let i=r.decode(t,o);if(i>=Math.pow(2,63)){let n=9;for(;255===t[o+n-1];)n--;n=n||9;const s=t.subarray(o,o+n);s[n-1]=127&s[n-1],i=-1*r.decode(s,0),e.bytes=10}else e.bytes=r.decode.bytes;return i}),(function(e){return e<0?10:r.encodingLength(e)}))},2730:function(e,t,n){const r=n(9851);e.exports=r(5,(function e(t,n,r,o){r.setInt32(o,t,!0),e.bytes=4}),(function e(t,n,r){const o=n.getInt32(r,!0);return e.bytes=4,o}),(function(e){return 4}))},2407:function(e,t,n){const r=n(1842),o=n(9851);e.exports=o(0,(function e(t,n,o,i){r.encode(t,n,i),e.bytes=r.encode.bytes}),(function e(t,n,o){const i=r.decode(t,o);return e.bytes=r.decode.bytes,i}),r.encodingLength)},6626:function(e,t,n){const r=n(138),{fromString:o}=n(2217),{toString:i}=n(2263),s=n(9851);e.exports=s(2,(function e(t,n,i,s){const a=s,c=o(t).byteLength;r.encode(c,n,s,"utf-8"),s+=r.encode.bytes;const u=o(t);n.set(u,s),s+=u.length,e.bytes=s-a}),(function e(t,n,o){const s=o,a=r.decode(t,o);o+=r.decode.bytes;const c=i(t.subarray(o,o+a));return e.bytes=(o+=a)-s,c}),(function(e){const t=o(e).byteLength;return r.encodingLength(t)+t}))},3083:function(e,t,n){const r=n(138),o=n(9851);e.exports=o(0,(function e(t,n,o,i){r.encode(t,n,i),e.bytes=r.encode.bytes}),(function e(t,n,o){const i=r.decode(t,o);return e.bytes=r.decode.bytes,i}),r.encodingLength)},7961:function(e,t,n){const r=n(119),o=n(7986),i=n(9611),s=n(1216),a=n(138);e.exports=function(e,t){const n={},c={},u={},f=function(e,t){e.enums&&e.enums.forEach((function(e){e.id=t+(t?".":"")+e.name,c[e.id]=e,f(e,e.id)})),e.messages&&e.messages.forEach((function(r){r.id=t+(t?".":"")+r.name,n[r.id]=r,r.fields.forEach((function(r){if(!r.map)return;const o="Map_"+r.map.from+"_"+r.map.to,i={name:o,enums:[],messages:[],fields:[{name:"key",type:r.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:r.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:t+(t?".":"")+o};n[i.id]||(n[i.id]=i,e.messages.push(i)),r.type=o,r.repeated=!0})),f(r,r.id)}))};f(e,"");const h=function(e,f,l){if(t&&t[e])return t[e];if(r[e])return r[e];const d=(f?f+"."+e:e).split(".").map((function(t,n,r){return r.slice(0,n).concat(e).join(".")})).reverse().reduce((function(e,t){return e||n[t]||c[t]}),null);if(!1===l)return d;if(!d)throw new Error("Could not resolve "+e);return d.values?function(e){const t=Object.keys(e.values||[]).map((function(t){return parseInt(e.values[t].value,10)}));return r.make(0,(function e(n,r,o,i){if(!t.length||-1===t.indexOf(n))throw new Error("Invalid enum value: "+n);return a.encode(n,r,i),e.bytes=a.encode.bytes,r}),(function e(n,r,o){var i=a.decode(n,o);if(!t.length||-1===t.indexOf(i))throw new Error("Invalid enum value: "+i);return e.bytes=a.decode.bytes,i}),a.encodingLength)}(d):u[d.id]||function(e,t){e.messages.forEach((function(n){t[n.name]=h(n.name,e.id)})),e.enums.forEach((function(e){t[e.name]=function(e){if(!e)return null;const t={};return Object.keys(e).forEach((function(n){t[n]=e[n].value})),t}(e.values)})),t.type=2,t.message=!0,t.name=e.name;const n={};e.fields.forEach((function(e){e.oneof&&(n[e.oneof]||(n[e.oneof]=[]),n[e.oneof].push(e.name))}));const r=e.fields.map((function(t){return h(t.type,e.id)})),a=s(e,r,n),c=i(e,h,r,n,a),u=o(e,h,r);return c.bytes=u.bytes=0,t.buffer=!0,t.encode=c,t.decode=u,t.encodingLength=a,t}(d,u[d.id]={})};return(e.enums||[]).concat((e.messages||[]).map((function(e){return h(e.id)})))}},3864:function(e,t){t.r=function(e){return null!=e&&("number"!=typeof e||!isNaN(e))}},7160:function(e,t,n){var r=n(4894),o=n(7961);e.exports=function(e,t){if(t||(t={}),!e)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var n="object"!=typeof e||e instanceof Uint8Array?r.parse(e):e,i=function(){var e=this;o(n,t.encodings||{}).forEach((function(t){e[t.name]=function(e){if(!e)return null;var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].value})),t}(t.values)||t}))};return i.prototype.toString=function(){return r.stringify(n)},i.prototype.toJSON=function(){return n},new i}},4281:function(e){var t={};function n(e,n,r){r||(r=Error);var o=function(e){var t,r;function o(t,r,o){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,o))||this}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o}(r);o.prototype.name=r.name,o.prototype.code=e,t[e]=o}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var o,i,s,a,c;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(o," ").concat(r(t,"type"));else{var u=("number"!=typeof c&&(c=0),c+".".length>(a=e).length||-1===a.indexOf(".",c)?"argument":"property");s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(r(t,"type"))}return s+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:function(e,t,n){var r=n(3158),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(9481),s=n(4229);n(5717)(f,i);for(var a=o(s.prototype),c=0;c<a.length;c++){var u=a[c];f.prototype[u]||(f.prototype[u]=s.prototype[u])}function f(e){if(!(this instanceof f))return new f(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||r.nextTick(l,this)}function l(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},2725:function(e,t,n){e.exports=o;var r=n(4605);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}n(5717)(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},9481:function(e,t,n){var r,o=n(3158);e.exports=S,S.ReadableState=k,n(7187).EventEmitter;var i,s=function(e,t){return e.listeners(t).length},a=n(2503),c=n(8764).Buffer,u=n.g.Uint8Array||function(){},f=n(4616);i=f&&f.debuglog?f.debuglog("stream"):function(){};var h,l,d,p=n(7327),g=n(1195),b=n(2457).getHighWaterMark,y=n(4281).q,w=y.ERR_INVALID_ARG_TYPE,m=y.ERR_STREAM_PUSH_AFTER_EOF,v=y.ERR_METHOD_NOT_IMPLEMENTED,_=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(5717)(S,a);var E=g.errorOrDestroy,x=["error","close","destroy","pause","resume"];function k(e,t,o){r=r||n(6753),e=e||{},"boolean"!=typeof o&&(o=t instanceof r),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=b(this,e,"readableHighWaterMark",o),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=n(2553).s),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function S(e){if(r=r||n(6753),!(this instanceof S))return new S(e);var t=this instanceof r;this._readableState=new k(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function B(e,t,n,r,o){i("readableAddChunk",t);var s,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?M(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,a);else if(o||(s=function(e,t){var n,r;return r=t,c.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new w("chunk",["string","Buffer","Uint8Array"],t)),n}(a,t)),s)E(e,s);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r)a.endEmitted?E(e,new _):A(e,a,t,!0);else if(a.ended)E(e,new m);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?A(e,a,t,!1):C(e,a)):A(e,a,t,!1)}else r||(a.reading=!1,C(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function A(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&M(e)),C(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=g.destroy,S.prototype._undestroy=g.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),n=!0),B(this,e,t,!1,n)},S.prototype.unshift=function(e){return B(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){h||(h=n(2553).s);var t=new h(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,o="";null!==r;)o+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var T=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(O,e))}function O(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function C(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(i("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function U(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function j(e){i("readable nexttick read 0"),e.read(0)}function N(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function P(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function q(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(D,t,e))}function D(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function F(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?q(this):M(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&q(this),null;var r,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(n,t))),null===(r=e>0?P(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&q(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(e){E(this,new v("_read()"))},S.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,i("pipe count=%d opts=%j",r.pipesCount,t);var a=t&&!1===t.end||e===o.stdout||e===o.stderr?g:c;function c(){i("onend"),e.end()}r.endEmitted?o.nextTick(a):n.once("end",a),e.on("unpipe",(function t(o,s){i("onunpipe"),o===n&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",l),e.removeListener("unpipe",t),n.removeListener("end",c),n.removeListener("end",g),n.removeListener("data",h),f=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,I(e))}}(n);e.on("drain",u);var f=!1;function h(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==F(r.pipes,e))&&!f&&(i("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function l(t){i("onerror",t),g(),e.removeListener("error",l),0===s(e,"error")&&E(e,t)}function d(){e.removeListener("finish",p),g()}function p(){i("onfinish"),e.removeListener("close",d),g()}function g(){i("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(n):e._events.error=[n,e._events.error]:e.on(t,n)}(e,"error",l),e.once("close",d),e.once("finish",p),e.emit("pipe",n),r.flowing||(i("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},S.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,i("on readable",r.length,r.reading),r.length?M(this):r.reading||o.nextTick(j,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(U,this),n},S.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(U,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(N,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){i("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s<x.length;s++)e.on(x[s],this.emit.bind(this,x[s]));return this._read=function(t){i("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=n(5850)),l(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=P,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(e,t){return void 0===d&&(d=n(5167)),d(S,e,t)})},4605:function(e,t,n){e.exports=f;var r=n(4281).q,o=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,c=n(6753);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,n){l(e,t,n)}))}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}n(5717)(f,c),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,n){n(new o("_transform()"))},f.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},4229:function(e,t,n){var r,o=n(3158);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var o=r.callback;t.pendingcb--,o(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=S,S.WritableState=k;var s,a={deprecate:n(4927)},c=n(2503),u=n(8764).Buffer,f=n.g.Uint8Array||function(){},h=n(1195),l=n(2457).getHighWaterMark,d=n(4281).q,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,b=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,w=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,v=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function x(){}function k(e,t,s){r=r||n(6753),e=e||{},"boolean"!=typeof s&&(s=t instanceof r),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=l(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new b;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(O,e,t),e._writableState.errorEmitted=!0,E(e,r)):(i(r),e._writableState.errorEmitted=!0,E(e,r),O(e,t))}(e,n,r,t,i);else{var s=R(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||T(e,n),r?o.nextTick(A,e,n,s,i):A(e,n,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function S(e){var t=this instanceof(r=r||n(6753));if(!t&&!s.call(S,this))return new S(e);this._writableState=new k(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function B(e,t,n,r,o,i,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new w("write")):n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function A(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),O(e,t)}function T(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),s=t.corkedRequestsFree;s.entry=n;for(var a=0,c=!0;n;)o[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;o.allBuffers=c,B(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,f=n.encoding,h=n.callback;if(B(e,t,!1,t.objectMode?1:u.length,u,f,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function M(e,t){e._final((function(n){t.pendingcb--,n&&E(e,n),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=R(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(M,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(5717)(S,c),k.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(k.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===S&&e&&e._writableState instanceof k}})):s=function(e){return e instanceof this},S.prototype.pipe=function(){E(this,new y)},S.prototype.write=function(e,t,n){var r,i=this._writableState,s=!1,a=!i.objectMode&&(r=e,u.isBuffer(r)||r instanceof f);return a&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=x),i.ending?function(e,t){var n=new v;E(e,n),o.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var i;return null===n?i=new m:"string"==typeof n||t.objectMode||(i=new p("chunk",["string","Buffer"],n)),!i||(E(e,i),o.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,s=function(e,t,n,r,o,i){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,n)),t}(t,r,o);r!==s&&(n=!0,o="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else B(e,t,!1,a,r,o,i);return c}(this,i,a,e,t,n)),s},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,n){n(new g("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=h.destroy,S.prototype._undestroy=h.undestroy,S.prototype._destroy=function(e,t){t(e)}},5850:function(e,t,n){var r,o=n(3158);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(8610),a=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),l=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function g(e){var t=e[a];if(null!==t){var n=e[d].read();null!==n&&(e[h]=null,e[a]=null,e[c]=null,t(p(n,!1)))}}function b(e){o.nextTick(g,e)}var y=Object.getPrototypeOf((function(){})),w=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,n){o.nextTick((function(){e[u]?n(e[u]):t(p(void 0,!0))}))}));var n,r=this[h];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[f]?n(p(void 0,!0)):t[l](n,r)}),r)}}(r,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(p(i,!1));n=new Promise(this[l])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(p(void 0,!0))}))}))})),r),y);e.exports=function(e){var t,n=Object.create(w,(i(t={},d,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,f,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var r=n[d].read();r?(n[h]=null,n[a]=null,n[c]=null,e(p(r,!1))):(n[a]=e,n[c]=t)},writable:!0}),t));return n[h]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[c];return null!==t&&(n[h]=null,n[a]=null,n[c]=null,t(e)),void(n[u]=e)}var r=n[a];null!==r&&(n[h]=null,n[a]=null,n[c]=null,r(p(void 0,!0))),n[f]=!0})),e.on("readable",b.bind(null,n)),n}},7327:function(e,t,n){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=n(8764).Buffer,a=n(2361).inspect,c=a&&a.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,n,r,o=s.allocUnsafe(e>>>0),i=this.head,a=0;i;)t=i.data,n=o,r=a,s.prototype.copy.call(t,n,r),a+=i.data.length,i=i.next;return o}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0==(e-=i)){i===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(i));break}++r}return this.length-=r,t}},{key:c,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],n&&i(t.prototype,n),e}()},1195:function(e,t,n){var r=n(3158);function o(e,t){s(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(s,this,e)):r.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?r.nextTick(i,n):(n._writableState.errorEmitted=!0,r.nextTick(o,n,e)):r.nextTick(o,n,e):t?(r.nextTick(i,n),t(e)):r.nextTick(i,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:function(e,t,n){var r=n(4281).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,i){if("function"==typeof n)return e(t,null,n);n||(n={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r)}}}(i||o);var s=n.readable||!1!==n.readable&&t.readable,a=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||f()},u=t._writableState&&t._writableState.finished,f=function(){a=!1,u=!0,s||i.call(t)},h=t._readableState&&t._readableState.endEmitted,l=function(){s=!1,h=!0,a||i.call(t)},d=function(e){i.call(t,e)},p=function(){var e;return s&&!h?(t._readableState&&t._readableState.ended||(e=new r),i.call(t,e)):a&&!u?(t._writableState&&t._writableState.ended||(e=new r),i.call(t,e)):void 0},g=function(){t.req.on("finish",f)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",f),t.on("abort",p),t.req?g():t.on("request",g)):a&&!t._writableState&&(t.on("end",c),t.on("close",c)),t.on("end",l),t.on("finish",f),!1!==n.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",f),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",f),t.removeListener("end",l),t.removeListener("error",d),t.removeListener("close",p)}}},5167:function(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:function(e,t,n){var r,o=n(4281).q,i=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e,t,o,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=n(8610)),r(e,{readable:t,writable:o},(function(e){if(e)return i(e);a=!0,i()}));var c=!1;return function(t){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void i(t||new s("pipe"))}}function u(e){e()}function f(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new i("streams");var s=t.map((function(e,n){var i=n<t.length-1;return c(e,i,n>0,(function(e){r||(r=e),e&&s.forEach(u),i||(s.forEach(u),o(r))}))}));return t.reduce(f)}},2457:function(e,t,n){var r=n(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,o){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new r(o?n:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},2503:function(e,t,n){e.exports=n(7187).EventEmitter},8473:function(e,t,n){(t=e.exports=n(9481)).Stream=t,t.Readable=t,t.Writable=n(4229),t.Duplex=n(6753),t.Transform=n(4605),t.PassThrough=n(2725),t.finished=n(8610),t.pipeline=n(9946)},9509:function(e,t,n){var r=n(8764),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},1842:function(e,t,n){var r=n(9365);t.encode=function e(t,n,o){t=t>=0?2*t:-2*t-1;var i=r.encode(t,n,o);return e.bytes=r.encode.bytes,i},t.decode=function e(t,n){var o=r.decode(t,n);return e.bytes=r.decode.bytes,1&o?(o+1)/-2:o/2},t.encodingLength=function(e){return r.encodingLength(e>=0?2*e:-2*e-1)}},7721:function(e){e.exports=function e(t,n){var r,o=0,i=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],o+=i<28?(127&r)<<i:(127&r)*Math.pow(2,i),i+=7}while(r>=128);return e.bytes=s-n,o}},508:function(e){e.exports=function e(n,r,o){r=r||[];for(var i=o=o||0;n>=t;)r[o++]=255&n|128,n/=128;for(;-128&n;)r[o++]=255&n|128,n>>>=7;return r[o]=0|n,e.bytes=o-i+1,r};var t=Math.pow(2,31)},9365:function(e,t,n){e.exports={encode:n(508),decode:n(7721),encodingLength:n(8184)}},8184:function(e){var t=Math.pow(2,7),n=Math.pow(2,14),r=Math.pow(2,21),o=Math.pow(2,28),i=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),c=Math.pow(2,56),u=Math.pow(2,63);e.exports=function(e){return e<t?1:e<n?2:e<r?3:e<o?4:e<i?5:e<s?6:e<a?7:e<c?8:e<u?9:10}},2553:function(e,t,n){var r=n(9509).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=s(t[r]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--r<n||-2===o?0:(o=s(t[r]))>=0?(o>0&&(e.lastNeed=o-2),o):--r<n||-2===o?0:(o=s(t[r]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},4927:function(e,t,n){function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},6988:function(e){e.exports=function e(t,n){var r,o=0,i=0,s=n=n||0,a=t.length;do{if(s>=a||i>49)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],o+=i<28?(127&r)<<i:(127&r)*Math.pow(2,i),i+=7}while(r>=128);return e.bytes=s-n,o}},1312:function(e){e.exports=function e(n,r,o){if(Number.MAX_SAFE_INTEGER&&n>Number.MAX_SAFE_INTEGER)throw e.bytes=0,new RangeError("Could not encode varint");r=r||[];for(var i=o=o||0;n>=t;)r[o++]=255&n|128,n/=128;for(;-128&n;)r[o++]=255&n|128,n>>>=7;return r[o]=0|n,e.bytes=o-i+1,r};var t=Math.pow(2,31)},4676:function(e,t,n){e.exports={encode:n(1312),decode:n(6988),encodingLength:n(82)}},82:function(e){var t=Math.pow(2,7),n=Math.pow(2,14),r=Math.pow(2,21),o=Math.pow(2,28),i=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),c=Math.pow(2,56),u=Math.pow(2,63);e.exports=function(e){return e<t?1:e<n?2:e<r?3:e<o?4:e<i?5:e<s?6:e<a?7:e<c?8:e<u?9:10}},5140:function(__unused_webpack_module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(e){return function(e,t,n){e[t]=n}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var n=t.contentWindow,r=n.eval,o=n.execScript;!r&&o&&(o.call(n,"null"),r=n.eval),forEach(Object_keys(e),(function(t){n[t]=e[t]})),forEach(globals,(function(t){e[t]&&(n[t]=e[t])}));var i=Object_keys(n),s=r.call(n,this.code);return forEach(Object_keys(n),(function(t){(t in e||-1===indexOf(i,t))&&(e[t]=n[t])})),forEach(globals,(function(t){t in e||defineProp(e,t,n[t])})),document.body.removeChild(t),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),n=this.runInContext(t);return e&&forEach(Object_keys(t),(function(n){e[n]=t[n]})),n},forEach(Object_keys(Script.prototype),(function(e){exports[e]=Script[e]=function(t){var n=Script(t);return n[e].apply(n,[].slice.call(arguments,1))}})),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),(function(n){t[n]=e[n]})),t}},3158:function(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,c=[],u=!1,f=-1;function h(){u&&a&&(u=!1,a.length?c=a.concat(c):f=-1,c.length&&l())}function l(){if(!u){var e=s(h);u=!0;for(var t=c.length;t;){for(a=c,c=[];++f<t;)a&&a[f].run();f=-1,t=c.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||u||s(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},2361:function(){},4616:function(){},2217:function(e,t,n){n.r(t),n.d(t,{fromString:function(){return o}});var r=n(660);function o(e,t="utf8"){const n=r.Z[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return n.decoder.decode(`${n.prefix}${e}`)}},2263:function(e,t,n){n.r(t),n.d(t,{toString:function(){return o}});var r=n(660);function o(e,t="utf8"){const n=r.Z[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return n.encoder.encode(e).substring(1)}},660:function(e,t,n){n.d(t,{Z:function(){return Ce}});var r={};n.r(r),n.d(r,{identity:function(){return B}});var o={};n.r(o),n.d(o,{base2:function(){return A}});var i={};n.r(i),n.d(i,{base8:function(){return T}});var s={};n.r(s),n.d(s,{base10:function(){return R}});var a={};n.r(a),n.d(a,{base16:function(){return M},base16upper:function(){return O}});var c={};n.r(c),n.d(c,{base32:function(){return C},base32hex:function(){return N},base32hexpad:function(){return P},base32hexpadupper:function(){return q},base32hexupper:function(){return I},base32pad:function(){return U},base32padupper:function(){return j},base32upper:function(){return L},base32z:function(){return D}});var u={};n.r(u),n.d(u,{base36:function(){return F},base36upper:function(){return z}});var f={};n.r(f),n.d(f,{base58btc:function(){return $},base58flickr:function(){return H}});var h={};n.r(h),n.d(h,{base64:function(){return W},base64pad:function(){return V},base64url:function(){return G},base64urlpad:function(){return J}});var l={};n.r(l),n.d(l,{sha256:function(){return pe},sha512:function(){return ge}});var d={};n.r(d),n.d(d,{identity:function(){return ye}});var p={};n.r(p),n.d(p,{code:function(){return me},decode:function(){return _e},encode:function(){return ve},name:function(){return we}});var g={};n.r(g),n.d(g,{code:function(){return Se},decode:function(){return Ae},encode:function(){return Be},name:function(){return ke}});var b=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),s=i.charCodeAt(0);if(255!==n[s])throw new TypeError(i+" is ambiguous");n[s]=o}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function h(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,o=0;e[t]===c;)r++,t++;for(var i=(e.length-t)*u+1>>>0,s=new Uint8Array(i);e[t];){var f=n[e.charCodeAt(t)];if(255===f)return;for(var h=0,l=i-1;(0!==f||h<o)&&-1!==l;l--,h++)f+=a*s[l]>>>0,s[l]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=h,t++}if(" "!==e[t]){for(var d=i-o;d!==i&&0===s[d];)d++;for(var p=new Uint8Array(r+(i-d)),g=r;d!==i;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,o=0,i=t.length;o!==i&&0===t[o];)o++,n++;for(var s=(i-o)*f+1>>>0,u=new Uint8Array(s);o!==i;){for(var h=t[o],l=0,d=s-1;(0!==h||l<r)&&-1!==d;d--,l++)h+=256*u[d]>>>0,u[d]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");r=l,o++}for(var p=s-r;p!==s&&0===u[p];)p++;for(var g=c.repeat(n);p<s;++p)g+=e.charAt(u[p]);return g},decodeUnsafe:h,decode:function(e){var n=h(e);if(n)return n;throw new Error(`Non-${t} character`)}}};new Uint8Array(0);const y=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class w{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")}}class m{constructor(e,t,n){this.name=e,this.prefix=t,this.baseDecode=n}decode(e){if("string"==typeof e){if(e[0]===this.prefix)return this.baseDecode(e.slice(1));throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}throw Error("Can only multibase decode strings")}or(e){return _(this,e)}}class v{constructor(e){this.decoders=e}or(e){return _(this,e)}decode(e){const 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`)}}const _=(e,t)=>new v({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class E{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new w(e,t,n),this.decoder=new m(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const x=({name:e,prefix:t,encode:n,decode:r})=>new E(e,t,n,r),k=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:o}=b(n,t);return x({prefix:e,name:t,encode:r,decode:e=>y(o(e))})},S=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>x({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],o=(1<<n)-1;let i="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,i+=t[o&a>>s];if(s&&(i+=t[o&a<<n-s]),r)for(;i.length*n&7;)i+="=";return i})(e,r,n),decode:t=>((e,t,n,r)=>{const o={};for(let e=0;e<t.length;++e)o[t[e]]=e;let i=e.length;for(;"="===e[i-1];)--i;const s=new Uint8Array(i*n/8|0);let a=0,c=0,u=0;for(let t=0;t<i;++t){const i=o[e[t]];if(void 0===i)throw new SyntaxError(`Non-${r} character`);c=c<<n|i,a+=n,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)}),B=x({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),A=S({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),T=S({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),R=k({prefix:"9",name:"base10",alphabet:"0123456789"}),M=S({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),O=S({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),C=S({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),L=S({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),U=S({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),j=S({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),N=S({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),I=S({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),P=S({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),q=S({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),D=S({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),F=k({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),z=k({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$=k({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),H=k({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),W=S({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),V=S({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),G=S({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),J=S({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Y=Math.pow(2,31),K=Math.pow(2,7),Z=Math.pow(2,14),X=Math.pow(2,21),Q=Math.pow(2,28),ee=Math.pow(2,35),te=Math.pow(2,42),ne=Math.pow(2,49),re=Math.pow(2,56),oe=Math.pow(2,63),ie=function e(t,n,r){n=n||[];for(var o=r=r||0;t>=Y;)n[r++]=255&t|128,t/=128;for(;-128&t;)n[r++]=255&t|128,t>>>=7;return n[r]=0|t,e.bytes=r-o+1,n},se=function(e){return e<K?1:e<Z?2:e<X?3:e<Q?4:e<ee?5:e<te?6:e<ne?7:e<re?8:e<oe?9:10};const ae=(e,t,n=0)=>(ie(e,t,n),t),ce=e=>se(e),ue=(e,t)=>{const n=t.byteLength,r=ce(e),o=r+ce(n),i=new Uint8Array(o+n);return ae(e,i,0),ae(n,i,r),i.set(t,o),new fe(e,n,t,i)};class fe{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const he=({name:e,code:t,encode:n})=>new le(e,t,n);class le{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ue(this.code,t):t.then((e=>ue(this.code,e)))}throw Error("Unknown type, must be binary type")}}const de=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),pe=he({name:"sha2-256",code:18,encode:de("SHA-256")}),ge=he({name:"sha2-512",code:19,encode:de("SHA-512")}),be=y,ye={code:0,name:"identity",encode:be,digest:e=>ue(0,be(e))},we="raw",me=85,ve=e=>y(e),_e=e=>y(e),Ee=new TextEncoder,xe=new TextDecoder,ke="json",Se=512,Be=e=>Ee.encode(JSON.stringify(e)),Ae=e=>JSON.parse(xe.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom"),Symbol.for("@ipld/js-cid/CID");const Te={...r,...o,...i,...s,...a,...c,...u,...f,...h};function Re(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const Me=Re("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Oe=Re("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{e=e.substring(1);const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}));var Ce={utf8:Me,"utf-8":Me,hex:Te.base16,latin1:Oe,ascii:Oe,binary:Oe,...Te}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};!function(){__webpack_require__.d(__webpack_exports__,{Z:function(){return f}});var e=__webpack_require__(7948),t=(__webpack_require__(5140),__webpack_require__(7936)),n=__webpack_require__(8395),r=__webpack_require__.n(n);class o{#n={};#r={};constructor(){return this.#o()}#i(e=peernet.id){return{sender:e,call:this.execute,staticCall:this.get.bind(this)}}async#o(){try{let e=[contractStore.get(r().contractFactory),contractStore.get(r().nativeToken),contractStore.get(r().validators),contractStore.get(r().nameService)];e=await Promise.all(e);for(const n of e){const e=new t.ContractMessage(new Uint8Array(n.buffer,n.buffer.byteOffset,n.buffer.byteLength));await this.#s(e)}}catch(e){console.log(e)}return this}async#s(e){const t=e.decoded.constructorParameters;try{const n=new Function((new TextDecoder).decode(e.decoded.contract))();globalThis.msg=this.#i(e.decoded.creator),this.#n[e.hash]=new n(...t),debug(`loaded contract: ${e.hash}`),debug(`size: ${Math.round(e.encoded.length/1024*100)/100} kb`)}catch(t){console.log(t),console.warn(`removing contract ${e.hash}`),await contractStore.delete(e.hash,e.encoded)}}async addContract(e){if(!await contractStore.has(e.hash))return await contractStore.put(e.hash,e.encoded),await this.#s(e),e.hash;throw new Error("duplicate contract")}async execute(e,t,n){try{let r;return r=this.#n[e].fallback?this.#n[e].fallback(t,n):await this.#n[e][t](...n),r}catch(e){throw e}}addJob(e,t,n,r,o){if(this.#r[r]||(this.#r[r]=o),o===this.#r[r]+1)return this.#n[e][t](...n)}get(e,t,n){let r;return r=n?.length>0?this.#n[e][t](...n):this.#n[e][t],r}async delete(e){return contractStore.delete(e)}async deleteAll(){let e=await contractStore.get();return e=Object.keys(e).map((e=>this.delete(e))),Promise.all(e)}}globalThis.BigNumber=e.BigNumber;const{ContractMessage:i,TransactionMessage:s,BlockMessage:a,BWMessage:c,BWRequestMessage:u}=r();class f{#a=[];#c=[];#u;#f=!1;#h={index:0,previousHash:"0x0"};constructor(){return this.#o()}get lib(){return r()}get lastBlock(){return this.#h}get nativeToken(){return r().nativeToken}get validators(){return[...this.#a]}get blocks(){return[...this.#c]}async hasTransactionToHandle(){return await transactionPoolStore.size()>0}async#l(){if(!(await this.staticCall(r().validators,"validators"))[peernet.id]?.active)return;this.#f=!0;const e=(new Date).getTime();await this.#d();const t=(new Date).getTime();if(console.log((t-e)/1e3+" s"),await this.hasTransactionToHandle())return this.#l();this.#f=!1}async#p(){await contractStore.put(r().contractFactory,r().contractFactoryMessage),await contractStore.put(r().nativeToken,r().nativeTokenMessage),await contractStore.put(r().validators,r().validatorsMessage),await contractStore.put(r().nameService,r().nameServiceMessage),console.log("handle native contracts")}async#g(){let e=[];for(const t of peernet.connections)if(t.peerId!==this.id){let n=new peernet.protos["peernet-request"]({request:"lastBlock"});const r=await peernet.prepareMessage(id,n.encoded);e.push(t.request(r.encoded))}e=await Promise.allSettled(e),e=e.reduce(((e,t)=>(console.log({c:t}),t.index>e.index&&(e.index=t.index,e.hash=t.hash),e)),{index:0,hash:"0x0"})}async#o(){this.participants=[],await contractStore.has(r().contractFactory)||await this.#p(),this.#u=await new o,this.utils={BigNumber:e.BigNumber,formatUnits:e.formatUnits,parseUnits:e.parseUnits};try{let e=await chainStore.get("lastBlock");e=await peernet.get((new TextDecoder).decode(e)),e=new a(e),this.#h={...e.decoded,hash:e.hash}}catch(e){await this.#g()}return await peernet.addRequestHandler("bw-request-message",(()=>new c(peernet.client.bw)||{up:0,down:0})),await peernet.addRequestHandler("lastBlock",this.#b.bind(this)),peernet.subscribe("add-block",this.#y.bind(this)),peernet.subscribe("add-transaction",(async e=>{try{if(e=new s(e),await transactionPoolStore.put(e.hash,e.encoded),await this.hasTransactionToHandle()&&!this.#f)return this.#l()}catch(e){throw Error("invalid transaction")}})),pubsub.subscribe("peer:connected",this.#w.bind(this)),await this.resolveBlocks(),this}async#w(e){let t=new peernet.protos["peernet-request"]({request:"lastBlock"});t=await peernet.prepareMessage(e.id,t.encoded);let n=await e.request(t.encoded);n=new Uint8Array(Object.values(n));const r=new globalThis.peernet.protos["peernet-message"](n);n=new globalThis.peernet.protos["peernet-response"](r.decoded.data);let o=JSON.parse((new TextDecoder).decode(n.decoded.response));if(!this.lastBlock||this.lastBlock.index<o.index){const e=this.lastBlock?this.lastBlock.index:0,t=o.index;await this.resolveBlock(o.hash),this.#h=this.#c[this.#c.length-1],console.log({lastBlock:this.#h}),console.log(this.#c);let n=e>0?e-t:t;n+=1,debug(`synced ${n} ${n>1?"blocks":"block"}`),this.#c.length,this.#c.length,await this.#m(this.#c);const r=new a(this.lastBlock);await blockStore.put(r.hash,r.encoded),await chainStore.put("lastBlock",(new TextEncoder).encode(this.lastBlock.hash))}}async#b(){return new peernet.protos["peernet-response"]({response:(new TextEncoder).encode(JSON.stringify({hash:this.lastBlock?.hash,index:this.lastBlock?.index}))})}async resolveBlock(e){let t=await peernet.get(e,"block");await peernet.has(e,"block")||await peernet.put(e,t,"block"),t=await new a(t);const n=t.encoded.length||t.encoded.byteLength;if(t={...t.decoded,hash:e},this.#c[t.index]=t,console.log(`loaded block: ${e} @${t.index} ${Math.round(n/1024/1024*100)/100} mb`),0!==t.index)return this.resolveBlock(t.previousHash)}async resolveBlocks(){try{const e=await chainStore.get("lastBlock");"0x0"!==(new TextDecoder).decode(e)&&await this.resolveBlock((new TextDecoder).decode(e)),this.#h=this.#c[this.#c.length-1],await this.#m(this.#c)}catch(e){return await chainStore.put("lastBlock",(new TextEncoder).encode("0x0")),this.resolveBlocks()}}async#m(e){for(const t of e)if(!t.loaded){for(const e of t.transactions)try{await this.#u.execute(e.to,e.method,e.params)}catch(e){console.log(e)}t.loaded=!0}}async#v({hash:e,from:t,to:n,method:r,params:o,nonce:i}){try{let s=await this.#u.execute(n,r,o,t,i);return pubsub.publish(`transaction.completed.${e}`,{status:"fulfilled",hash:e}),s||"no state change"}catch(t){throw pubsub.publish(`transaction.completed.${e}`,{status:"fail",hash:e,error:t}),t}}async#y(e){const t=new a(e);await Promise.all(t.decoded.transactions.map((e=>transactionPoolStore.delete(e.hash)))),this.#h={hash:t.hash,...t.decoded},await blockStore.put(t.hash,t.encoded),await chainStore.put("lastBlock",(new TextEncoder).encode(t.hash)),debug(`added block: ${t.hash}`);let n=[],r=[];for(let e of t.decoded.transactions)-1===r.indexOf(e.to)&&r.push(e.to),n.push(this.#v(e));try{n=await Promise.allSettled(n),pubsub.publish("block-processed",t.decoded)}catch(e){console.log(e)}}async participate(){if(await this.staticCall(r().validators,"has",[peernet.id])||await this.createTransactionFrom(peernet.id,r().validators,"addValidator",[peernet.id]),await this.hasTransactionToHandle()&&!this.#f)return this.#l()}calculateFee(e){return e.decoded.to===r().validators?0:e.encoded.length/1024/1e-6}async#d(){let e=await transactionPoolStore.get();if(0===Object.keys(e)?.length)return;let t={transactions:[],validators:[],fees:0},n=[];for(let o of Object.values(e))o=new s(new Uint8Array(o,o.byteOffset,o.byteLength)),t.fees+=Number(r().calculateFee(o)),n.push({...o.decoded,hash:o.hash});e=n.sort(((e,t)=>e.nonce-t.nonce)),n=[];for(let o of e)try{await this.#v(o),n.push(o)}catch(e){o=new s(o),t.fees-=Number(r().calculateFee(o)),await transactionPoolStore.delete(o.hash)}if(e=n,0===e.length)return;t.transactions=e;const o=await this.staticCall(r().validators,"validators");console.log({validators:o});const i={};for(const e of peernet.peerEntries)i[e[0]]=e[1];for(const e of Object.keys(o))if(o[e].active){const n=i[e];if(n&&n.connected){let r=new u;const o=await peernet.prepareMessage(e,r.encoded);try{const r=await n.request(o.encoded);console.log(r),t.validators.push({address:e,bw:r.up+r.down})}catch(e){}}else peernet.id===e&&t.validators.push({address:peernet.id,bw:peernet.bw.up+peernet.bw.down})}console.log(t.validators),t.reward=150,t.validators=t.validators.map((e=>(e.reward=String(Number(t.fees)+t.reward/t.validators.length),delete e.bw,e))),t.index=this.lastBlock?.index,void 0===t.index?t.index=0:t.index+=1,t.previousHash=this.lastBlock?.hash||"0x0",t.timestamp=(new Date).getTime();const c=String(t.fees).split(".");let f=0;if(c[1]){const e=c[1].split("e");e[0]!==c[1]?(c[1]=e[0],f=Number(e[1]?.replace(/\-|\+/g,""))+Number(e[0].length)):f=c[1].length}t.fees=Number.parseFloat(String(t.fees)).toFixed(f);try{let e=new a(t);this.#h={...t,hash:e.hash},peernet.publish("add-block",e.encoded),this.#y(e.encoded)}catch(e){throw Error(`invalid block ${t}`)}}async getNonce(e){let t=await transactionPoolStore.get();if(t=Object.keys(t).map((e=>new s(t[e]))),t=t.filter((t=>t.decoded.from===e)),t=t.map((e=>({...e.decoded,hash:e.hash}))),this.lastBlock&&0===t.length){let n=await peernet.get(this.lastBlock.hash);for(n=new a(n),t=t.filter((t=>t.from===e));0===t.length&&0!==n.decoded.index;)n=await blockStore.get(n.decoded.previousHash),n=new a(n),t=n.decoded.transactions.filter((t=>t.from===e))}return 0===t.length?0:(t=t.sort(((e,t)=>e.timestamp-t.timestamp)),t[t.length-1].nonce)}createTransaction(e,t,n,r){return this.createTransactionFrom(peernet.id,e,t,n,r)}async createTransactionFrom(e,t,n,o,i){void 0===i&&(i=await this.getNonce(e),i+=1);let a=new s({timestamp:(new Date).getTime(),from:e,to:t,nonce:i,method:n,params:o});try{await transactionPoolStore.put(a.hash,a.encoded),peernet.publish("add-transaction",a.encoded)}catch(e){throw e}return await this.hasTransactionToHandle()&&!this.#f&&this.#l(),{hash:a.hash,data:void 0,fee:r().calculateFee(a),wait:()=>new Promise(((e,t)=>{const n=r=>{"fulfilled"===r.status?e(r.hash):t({hash:r.hash,error:r.error}),pubsub.unsubscribe(`transaction.completed.${a.hash}`,n)};pubsub.subscribe(`transaction.completed.${a.hash}`,n)}))}}async createContractMessage(e,t,n=[]){return new i({creator:e,contract:t,constructorParameters:n})}async createContractAddress(e,t,n=[]){return this.createContractMessage(e,t,n).hash}async deployContract(e,t=[]){globalThis.msg={sender:peernet.id,call:this.call};const n=await this.createContractAddress(creator,e,t);try{await this.createTransactionFrom(peernet.id,r().contractFactory,"deployContract",[n,creator,e,constructorParameters])}catch(e){throw e}return this.#u.addContract(message)}#i(e=peernet.id){return{sender:peernet.id,call:this.call,staticCall:this.staticCall,delegate:this.delegate,staticDelegate:this.staticDelegate}}internalCall(e,t,n,r){return globalThis.msg=this.#i(e),this.#u.execute(t,n,r)}call(e,t,n){return globalThis.msg=this.#i(),this.#u.execute(e,t,n)}staticCall(e,t,n){return globalThis.msg=this.#i(),this.#u.get(e,t,n)}delegate(e,t,n){return globalThis.msg=this.#i(),this.#u.execute(e,t,n)}staticDelegate(e,t,n){return globalThis.msg=this.#i(),this.#u.get(e,t,n)}mint(e,t){return this.call(r().nativeToken,"mint",[e,t])}transfer(e,t,n){return this.call(r().nativeToken,"transfer",[e,t,n])}get balances(){return this.staticCall(r().nativeToken,"balances")}deleteAll(){return this.#u.deleteAll()}lookup(e){return this.call(r().nameService,"lookup",[e])}}}();var __webpack_exports__default=__webpack_exports__.Z;export{__webpack_exports__default as default};
2
+ var __webpack_modules__={6745:function(t,e,r){r.r(e),r.d(e,{default:function(){return b}});var n=t=>{if(t.length>=255)throw new TypeError("Alphabet too long");const e=new Uint8Array(256);for(let t=0;t<e.length;t++)e[t]=255;for(let r=0;r<t.length;r++){const n=t.charAt(r),i=n.charCodeAt(0);if(255!==e[i])throw new TypeError(n+" is ambiguous");e[i]=r}const r=t.length,n=t.charAt(0),i=Math.log(r)/Math.log(256),o=Math.log(256)/Math.log(r),s=t=>{if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return new Uint8Array;let o=0,s=0,a=0;for(;t[o]===n;)s++,o++;const u=(t.length-o)*i+1>>>0;let h=new Uint8Array(u);for(;t[o];){let n=e[t.charCodeAt(o)];if(255===n)return;let i=0;for(let t=u-1;(0!==n||i<a)&&-1!==t;t--,i++)n+=r*h[t]>>>0,h[t]=n%256>>>0,n=n/256>>>0;if(0!==n)throw new Error("Non-zero carry");a=i,o++}let c=u-a;for(;c!==u&&0===h[c];)c++;let f=new Uint8Array(s+(u-c)),l=s;for(;c!==u;)f[l++]=h[c++];return f};return{encode:e=>{if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";let i=0,s=0,a=0;const u=e.length;for(;a!==u&&0===e[a];)a++,i++;const h=(u-a)*o+1>>>0,c=new Uint8Array(h);for(;a!==u;){let t=e[a],n=0;for(let e=h-1;(0!==t||n<s)&&-1!==e;e--,n++)t+=256*c[e]>>>0,c[e]=t%r>>>0,t=t/r>>>0;if(0!==t)throw new Error("Non-zero carry");s=n,a++}let f=h-s;for(;f!==h&&0===c[f];)f++;let l=n.repeat(i);for(;f<h;++f)l+=t.charAt(c[f]);return l},decodeUnsafe:s,decode:t=>{const e=s(t);if(e)return e;throw new Error("Non-base"+r+" character")}}};const i="abcdefghijklmnopqrstuvwxyz234567",o="0123456789abcdefghijklmnopqrstuv";var s=(t,e=!1)=>n(e?o:i).decode(t);const a="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var u=t=>n(a).decode(t),h=r(8764).Buffer;class c{#t(){if(!this.decode)throw new Error("bad implementation: needs decode func");this.decode()}#e(){if(!this.encode)throw new Error("bad implementation: needs encode func");this.encode()}isHex(t){return(t=>/^[A-F0-9]+$/i.test(t))(t)}isBase32(t){return base32.isBase32(t)}isBase58(t){return base58.isBase32(t)}fromBs32(t){return this.encoded=s(t),this.#t()}fromBs58(t){return this.encoded=u(t),this.#t()}async toArray(){const t=[];for await(const e of this.encoded.values())t.push(e);return t}fromString(t){return this.encoded=new Uint8Array(t.split(",")),this.#t()}fromArray(t){return this.encoded=new Uint8Array([...t]),this.#t()}fromEncoded(t){return this.encoded=t,this.#t()}fromHex(t){return this.encoded=h.from(t,"hex"),this.#t()}toString(t="utf8"){return this.encoded||this.#e(),this.encoded.toString(t)}toHex(){return this.toString("hex")}toBs32(){return this.encoded||this.#e(),((t,e=!1)=>n(e?o:i).encode(t))(this.encoded)}toBs58(){return this.encoded||this.#e(),t=this.encoded,n(a).encode(t);var t}create(t){const e={};if(this.keys?.length>0){for(const r of this.keys)Object.defineProperties(e,{[r]:{enumerable:!0,configurable:!0,set:e=>value=t[r],get:()=>t[r]}});this.decoded=e,this.encode()}}}var f=r(4676),l=r.n(f),d={"disco-hash":{codec:parseInt("30",16),hashAlg:"dbl-keccak-256"},"peernet-peer-response":{codec:parseInt("707072",16),hashAlg:"keccak-256"},"peernet-peer":{codec:parseInt("7070",16),hashAlg:"keccak-256"},"peernet-dht":{codec:parseInt("706468",16),hashAlg:"keccak-256"},"peernet-dht-response":{codec:parseInt("706472",16),hashAlg:"keccak-256"},"peernet-data":{codec:parseInt("706461",16),hashAlg:"keccak-256"},"peernet-data-response":{codec:parseInt("70646172",16),hashAlg:"keccak-256"},"peernet-message":{codec:parseInt("706d65",16),hashAlg:"keccak-256"},"peernet-ps":{codec:parseInt("707073",16),hashAlg:"keccak-256"},"peernet-response":{codec:parseInt("7072",16),hashAlg:"keccak-256"},"peernet-request":{codec:parseInt("707271",16),hashAlg:"keccak-256"},"leofcoin-block":{codec:parseInt("6c62",16),hashAlg:"dbl-keccak-512"},"leofcoin-tx":{codec:parseInt("6c74",16),hashAlg:"dbl-keccak-512"},"leofcoin-itx":{codec:parseInt("6c69",16),hashAlg:"keccak-512"},"leofcoin-pr":{codec:parseInt("6c70",16),hashAlg:"keccak-256"},"chat-message":{codec:parseInt("636d",16),hashAlg:"dbl-keccak-256"}};class p extends c{get codecs(){return{...globalThis.peernet.codecs,...d}}constructor(t){if(super(),t){if(t instanceof Uint8Array){const e=l().decode(t),r=this.getCodecName(e);r?(this.name=r,this.encoded=t,this.decode(t)):this.encode(t)}else if(t instanceof ArrayBuffer){const e=new Uint8Array(t.byteLength);for(let r=0;r<t.byteLength;r++)e[r]=t[r];return this.encoded=e,void this.decode(t)}if("string"==typeof t)if(this.codecs[t])this.fromName(t);else if(this.isHex(t))this.fromHex(t);else if(this.isBase32(t))this.fromBs32(t);else{if(!this.isBase58(t))throw new Error(`unsupported string ${t}`);this.fromBs58(t)}isNaN(t)||this.codecs[this.getCodecName(t)]&&this.fromCodec(t)}}fromEncoded(t){const e=l().decode(t),r=this.getCodecName(e);this.name=r,this.encoded=t,this.decode(t)}getCodec(t){return this.codecs[t].codec}getCodecName(t){return Object.keys(this.codecs).reduce(((e,r)=>this.codecs[r].codec===t?r:e),void 0)}getHashAlg(t){return this.codecs[t].hashAlg}fromCodec(t){this.name=this.getCodecName(t),this.hashAlg=this.getHashAlg(this.name),this.codec=this.getCodec(this.name),this.codecBuffer=l().encode(t)}fromName(t){const e=this.getCodec(t);this.name=t,this.codec=e,this.hashAlg=this.getHashAlg(t),this.codecBuffer=l().encode(e)}decode(){const t=l().decode(this.encoded);this.fromCodec(t)}encode(){const t=l().encode(this.decoded);return this.encoded=t,this.encoded}}var g=r(5811),m=r.n(g),w=r(8764).Buffer;class y extends c{constructor(t,e={}){if(super(),e.name?this.name=e.name:this.name="disco-hash",e.codecs&&(this.codecs=e.codecs),t){if(t instanceof Uint8Array){this.discoCodec=new p(t,this.codecs);const e=this.discoCodec.name;e?(this.name=e,this.decode(t)):this.encode(t)}if("string"==typeof t)if(this.isHex(t)&&this.fromHex(t),this.isBase32(t))this.fromBs32(t);else{if(!this.isBase58(t))throw new Error(`unsupported string ${t}`);this.fromBs58(t)}else"object"==typeof t&&this.fromJSON(t)}}get prefix(){const t=this.length,e=new Uint8Array(t.length+this.discoCodec.codecBuffer.length);return e.set(t),e.set(this.discoCodec.codecBuffer,t.length),e}get length(){return l().encode(this.size)}get buffer(){return this.encoded}get hash(){return this.encoded}fromJSON(t){return this.encode(w.from(JSON.stringify(t)))}encode(t,e){!this.name&&e&&(this.name=e),t||(t=this.buffer),this.discoCodec=new p(this.name,this.codecs),this.discoCodec.fromName(this.name);let r=this.discoCodec.hashAlg;r.includes("dbl")&&(r=r.replace("dbl-",""),t=m()(r.replace("-","")).update(t).digest()),this.digest=m()(r.replace("-","")).update(t).digest(),this.size=this.digest.length,this.codec=this.discoCodec.encode(),this.codec=this.discoCodec.codecBuffer;const n=new Uint8Array(this.digest.length+this.prefix.length);return n.set(this.prefix),n.set(this.digest,this.prefix.length),this.encoded=n,this.encoded}validate(t){if(w.isBuffer(t)){const e=l().decode(t);this.codecs[e]?this.decode(t):this.encode(t)}"string"==typeof t&&(this.isHex(t)&&this.fromHex(t),this.isBase32(t)&&this.fromBs32(t)),"object"==typeof t&&this.fromJSON(t)}decode(t){this.encoded=t;const e=l().decode(t);if(this.discoCodec=new p(e,this.codecs),t=t.slice(l().decode.bytes),this.size=l().decode(t),this.digest=t.slice(l().decode.bytes),this.digest.length!==this.size)throw new Error(`hash length inconsistent: 0x${this.encoded.toString("hex")}`);return this.name=this.discoCodec.name,this.size=this.digest.length,{codec:this.codec,name:this.name,size:this.size,length:this.length,digest:this.digest}}}var b={codecs:d,Codec:p,CodecHash:y,FormatInterface:class extends c{constructor(t,e,r={}){if(super(),this.protoEncode=e.encode,this.protoDecode=e.decode,this.hashFormat=r.hashFormat||"bs32",r.name&&(this.name=r.name),t instanceof Uint8Array)this.fromUint8Array(t);else if(t instanceof ArrayBuffer)this.fromArrayBuffer(t);else{if(t.name===r.name)return t;if(t instanceof String)if(this.isHex(t))this.fromHex(t);else if(this.isBase32(t))this.fromBs32(t);else{if(!this.isBase58(t))throw new Error(`unsupported string ${t}`);this.fromBs58(t)}else this.create(t)}}get peernetHash(){return new y(this.decoded,{name:this.name})}get hash(){const t=`${this.hashFormat.charAt(0).toUpperCase()}${this.hashFormat.substring(1,this.hashFormat.length)}`;return this.peernetHash[`to${t}`]()}decode(){let t=this.encoded;const e=new p(this.encoded);return t=t.slice(e.codecBuffer.length),this.name=e.name,this.decoded=this.protoDecode(t),this.decoded}encode(t){t||(t=this.decoded);const e=new p(this.name),r=this.protoEncode(t),n=new Uint8Array(r.length+e.codecBuffer.length);return n.set(e.codecBuffer),n.set(r,e.codecBuffer.length),this.encoded=n,this.encoded}hasCodec(){return!!this.encoded&&(!!new p(this.encoded).name||void 0)}fromUint8Array(t){this.encoded=t,this.hasCodec()?this.decode():this.create(JSON.parse((new TextDecoder).decode(this.encoded)))}fromArrayBuffer(t){this.encoded=new Uint8Array(t,t.byteOffset,t.byteLength),this.hasCodec()?this.decode():this.create(JSON.parse((new TextDecoder).decode(this.encoded)))}},BasicInterface:c}},8395:function(t,e,r){var n=r(7936),i={contractFactory:"237,198,1,10,54,51,67,122,86,52,88,98,115,81,54,72,57,100,75,49,76,101,105,66,75,65,120,114,54,81,105,77,71,53,116,68,105,55,122,77,77,72,118,117,120,104,121,50,101,118,70,101,118,72,49,77,85,76,99,18,146,8,114,101,116,117,114,110,32,99,108,97,115,115,32,70,97,99,116,111,114,121,123,35,110,97,109,101,61,34,65,114,116,79,110,108,105,110,101,67,111,110,116,114,97,99,116,70,97,99,116,111,114,121,34,59,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,61,48,59,35,99,111,110,116,114,97,99,116,115,61,91,93,59,99,111,110,115,116,114,117,99,116,111,114,40,115,116,97,116,101,41,123,115,116,97,116,101,38,38,40,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,61,115,116,97,116,101,46,99,111,110,116,114,97,99,116,115,44,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,61,115,116,97,116,101,46,116,111,116,97,108,67,111,110,116,114,97,99,116,115,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,116,111,116,97,108,67,111,110,116,114,97,99,116,115,58,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,44,99,111,110,116,114,97,99,116,115,58,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,125,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,99,111,110,116,114,97,99,116,115,40,41,123,114,101,116,117,114,110,91,46,46,46,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,93,125,103,101,116,32,116,111,116,97,108,67,111,110,116,114,97,99,116,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,125,105,115,118,97,108,105,100,40,104,97,115,104,44,99,114,101,97,116,111,114,44,99,111,110,116,114,97,99,116,44,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,61,91,93,41,123,99,111,110,115,116,32,109,101,115,115,97,103,101,61,110,101,119,32,67,111,110,116,114,97,99,116,77,101,115,115,97,103,101,40,123,99,114,101,97,116,111,114,58,99,114,101,97,116,111,114,44,99,111,110,116,114,97,99,116,58,99,111,110,116,114,97,99,116,44,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,58,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,125,41,59,114,101,116,117,114,110,32,66,111,111,108,101,97,110,40,109,101,115,115,97,103,101,46,104,97,115,104,61,61,61,104,97,115,104,41,125,97,115,121,110,99,32,100,101,112,108,111,121,67,111,110,116,114,97,99,116,40,99,111,110,116,114,97,99,116,72,97,115,104,44,99,114,101,97,116,111,114,44,99,111,110,116,114,97,99,116,44,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,61,91,93,41,123,105,102,40,99,111,110,116,114,97,99,116,46,99,114,101,97,116,111,114,33,61,61,109,115,103,46,115,101,110,100,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,111,110,108,121,32,97,32,99,111,110,116,114,97,99,116,32,99,114,101,97,116,111,114,32,99,97,110,32,100,101,112,108,111,121,32,97,32,99,111,110,116,114,97,99,116,34,41,59,105,102,40,97,119,97,105,116,32,99,111,110,116,114,97,99,116,83,116,111,114,101,46,104,97,115,40,104,97,115,104,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,100,117,112,108,105,99,97,116,101,32,99,111,110,116,114,97,99,116,34,41,59,105,102,40,33,116,104,105,115,46,105,115,86,97,108,105,100,40,99,111,110,116,114,97,99,116,72,97,115,104,44,99,114,101,97,116,111,114,44,99,111,110,116,114,97,99,116,44,99,111,110,115,116,114,117,99,116,111,114,80,97,114,97,109,101,116,101,114,115,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,105,110,118,97,108,105,100,32,99,111,110,116,114,97,99,116,34,41,59,97,119,97,105,116,32,99,111,110,116,114,97,99,116,83,116,111,114,101,46,112,117,116,40,104,97,115,104,44,101,110,99,111,100,101,100,41,44,116,104,105,115,46,35,116,111,116,97,108,67,111,110,116,114,97,99,116,115,43,61,49,44,116,104,105,115,46,35,99,111,110,116,114,97,99,116,115,46,112,117,115,104,40,104,97,115,104,41,125,125,59,10",nativeToken:"237,198,1,10,54,51,67,122,86,52,88,98,115,81,54,72,57,100,75,49,76,101,105,66,75,65,120,114,54,81,105,77,71,53,116,68,105,55,122,77,77,72,118,117,120,104,121,50,101,118,70,101,118,72,49,77,85,76,99,18,152,26,114,101,116,117,114,110,32,99,108,97,115,115,32,65,114,116,79,110,108,105,110,101,32,101,120,116,101,110,100,115,32,99,108,97,115,115,32,84,111,107,101,110,32,101,120,116,101,110,100,115,32,99,108,97,115,115,32,82,111,108,101,115,123,35,114,111,108,101,115,61,123,79,87,78,69,82,58,91,93,44,77,73,78,84,58,91,93,44,66,85,82,78,58,91,93,125,59,99,111,110,115,116,114,117,99,116,111,114,40,114,111,108,101,115,41,123,105,102,40,114,111,108,101,115,41,123,105,102,40,33,40,114,111,108,101,115,32,105,110,115,116,97,110,99,101,111,102,32,79,98,106,101,99,116,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,101,120,112,101,99,116,101,100,32,114,111,108,101,115,32,116,111,32,98,101,32,97,110,32,111,98,106,101,99,116,34,41,59,116,104,105,115,46,35,114,111,108,101,115,61,123,46,46,46,114,111,108,101,115,44,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,101,108,115,101,32,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,34,79,87,78,69,82,34,41,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,114,111,108,101,115,58,116,104,105,115,46,114,111,108,101,115,125,125,103,101,116,32,114,111,108,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,111,108,101,115,125,125,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,114,101,116,117,114,110,33,33,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,38,38,45,49,33,61,61,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,100,101,120,79,102,40,97,100,100,114,101,115,115,41,125,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,103,114,97,110,116,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,112,117,115,104,40,97,100,100,114,101,115,115,41,125,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,36,123,114,111,108,101,125,32,114,111,108,101,32,97,108,114,101,97,100,121,32,114,101,118,111,107,101,100,32,102,111,114,32,36,123,97,100,100,114,101,115,115,125,96,41,59,105,102,40,34,79,87,78,69,82,34,61,61,61,114,111,108,101,38,38,49,61,61,61,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,108,101,110,103,116,104,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,97,116,108,101,97,115,116,32,111,110,101,32,111,119,110,101,114,32,105,115,32,110,101,101,100,101,100,33,34,41,59,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,115,112,108,105,99,101,40,116,104,105,115,46,35,114,111,108,101,115,91,114,111,108,101,93,46,105,110,100,101,120,79,102,40,97,100,100,114,101,115,115,41,41,125,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,34,79,87,78,69,82,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,78,111,116,32,97,108,108,111,119,101,100,34,41,59,116,104,105,115,46,35,103,114,97,110,116,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,97,100,100,114,101,115,115,44,34,79,87,78,69,82,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,78,111,116,32,97,108,108,111,119,101,100,34,41,59,116,104,105,115,46,35,114,101,118,111,107,101,82,111,108,101,40,97,100,100,114,101,115,115,44,114,111,108,101,41,125,125,123,35,110,97,109,101,59,35,115,121,109,98,111,108,59,35,104,111,108,100,101,114,115,61,48,59,35,98,97,108,97,110,99,101,115,61,123,125,59,35,97,112,112,114,111,118,97,108,115,61,123,125,59,35,100,101,99,105,109,97,108,115,61,49,56,59,35,116,111,116,97,108,83,117,112,112,108,121,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,48,41,59,99,111,110,115,116,114,117,99,116,111,114,40,110,97,109,101,44,115,121,109,98,111,108,44,100,101,99,105,109,97,108,115,61,49,56,44,115,116,97,116,101,41,123,105,102,40,33,110,97,109,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,97,109,101,32,117,110,100,101,102,105,110,101,100,34,41,59,105,102,40,33,115,121,109,98,111,108,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,115,121,109,98,111,108,32,117,110,100,101,102,105,110,101,100,34,41,59,115,117,112,101,114,40,115,116,97,116,101,63,46,114,111,108,101,115,41,44,116,104,105,115,46,35,110,97,109,101,61,110,97,109,101,44,116,104,105,115,46,35,115,121,109,98,111,108,61,115,121,109,98,111,108,44,116,104,105,115,46,35,100,101,99,105,109,97,108,115,61,100,101,99,105,109,97,108,115,125,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,46,46,46,115,117,112,101,114,46,115,116,97,116,101,44,104,111,108,100,101,114,115,58,116,104,105,115,46,104,111,108,100,101,114,115,44,98,97,108,97,110,99,101,115,58,116,104,105,115,46,98,97,108,97,110,99,101,115,44,97,112,112,114,111,118,97,108,115,58,123,46,46,46,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,125,44,116,111,116,97,108,83,117,112,112,108,121,58,116,104,105,115,46,116,111,116,97,108,83,117,112,112,108,121,125,125,103,101,116,32,116,111,116,97,108,83,117,112,112,108,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,115,121,109,98,111,108,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,115,121,109,98,111,108,125,103,101,116,32,104,111,108,100,101,114,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,104,111,108,100,101,114,115,125,103,101,116,32,98,97,108,97,110,99,101,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,98,97,108,97,110,99,101,115,125,125,109,105,110,116,40,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,34,77,73,78,84,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,108,108,111,119,101,100,34,41,59,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,61,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,46,97,100,100,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,98,117,114,110,40,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,104,97,115,82,111,108,101,40,109,115,103,46,115,101,110,100,101,114,44,34,66,85,82,78,34,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,108,108,111,119,101,100,34,41,59,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,61,116,104,105,115,46,35,116,111,116,97,108,83,117,112,112,108,121,46,115,117,98,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,35,98,101,102,111,114,101,84,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,123,105,102,40,33,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,102,114,111,109,93,124,124,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,102,114,111,109,93,60,97,109,111,117,110,116,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,97,109,111,117,110,116,32,101,120,99,101,101,100,115,32,98,97,108,97,110,99,101,34,41,125,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,123,34,48,120,48,48,34,61,61,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,116,111,72,101,120,83,116,114,105,110,103,40,41,63,116,104,105,115,46,35,104,111,108,100,101,114,115,45,61,49,58,34,48,120,48,48,34,33,61,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,116,111,72,101,120,83,116,114,105,110,103,40,41,38,38,34,48,120,48,48,34,61,61,61,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,46,116,111,72,101,120,83,116,114,105,110,103,40,41,38,38,40,116,104,105,115,46,35,104,111,108,100,101,114,115,43,61,49,41,125,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,97,100,100,114,101,115,115,44,97,109,111,117,110,116,41,123,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,124,124,40,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,48,41,41,59,99,111,110,115,116,32,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,59,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,97,100,100,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,125,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,97,100,100,114,101,115,115,44,97,109,111,117,110,116,41,123,99,111,110,115,116,32,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,59,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,61,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,46,115,117,98,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,117,112,100,97,116,101,72,111,108,100,101,114,115,40,97,100,100,114,101,115,115,44,112,114,101,118,105,111,117,115,66,97,108,97,110,99,101,41,125,98,97,108,97,110,99,101,79,102,40,97,100,100,114,101,115,115,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,98,97,108,97,110,99,101,115,91,97,100,100,114,101,115,115,93,125,115,101,116,65,112,112,114,111,118,97,108,40,111,112,101,114,97,116,111,114,44,97,109,111,117,110,116,41,123,99,111,110,115,116,32,111,119,110,101,114,61,103,108,111,98,97,108,84,104,105,115,46,109,115,103,46,115,101,110,100,101,114,59,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,124,124,40,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,61,123,125,41,44,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,91,111,112,101,114,97,116,111,114,93,61,97,109,111,117,110,116,125,97,112,112,114,111,118,101,100,40,111,119,110,101,114,44,111,112,101,114,97,116,111,114,44,97,109,111,117,110,116,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,97,112,112,114,111,118,97,108,115,91,111,119,110,101,114,93,91,111,112,101,114,97,116,111,114,93,61,61,61,97,109,111,117,110,116,125,116,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,123,97,109,111,117,110,116,61,66,105,103,78,117,109,98,101,114,46,102,114,111,109,40,97,109,111,117,110,116,41,44,116,104,105,115,46,35,98,101,102,111,114,101,84,114,97,110,115,102,101,114,40,102,114,111,109,44,116,111,44,97,109,111,117,110,116,41,44,116,104,105,115,46,35,100,101,99,114,101,97,115,101,66,97,108,97,110,99,101,40,102,114,111,109,44,97,109,111,117,110,116,41,44,116,104,105,115,46,35,105,110,99,114,101,97,115,101,66,97,108,97,110,99,101,40,116,111,44,97,109,111,117,110,116,41,125,125,123,99,111,110,115,116,114,117,99,116,111,114,40,115,116,97,116,101,41,123,115,117,112,101,114,40,34,65,114,116,79,110,108,105,110,101,34,44,34,65,82,84,34,44,49,56,44,115,116,97,116,101,41,125,125,59,10",nameService:"237,198,1,10,54,51,67,122,86,52,88,98,115,81,54,72,57,100,75,49,76,101,105,66,75,65,120,114,54,81,105,77,71,53,116,68,105,55,122,77,77,72,118,117,120,104,121,50,101,118,70,101,118,72,49,77,85,76,99,18,138,12,114,101,116,117,114,110,32,99,108,97,115,115,32,78,97,109,101,83,101,114,118,105,99,101,123,35,110,97,109,101,61,34,65,114,116,79,110,108,105,110,101,78,97,109,101,83,101,114,118,105,99,101,34,59,35,111,119,110,101,114,59,35,112,114,105,99,101,61,48,59,35,114,101,103,105,115,116,114,121,61,123,125,59,35,99,117,114,114,101,110,99,121,59,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,114,101,103,105,115,116,114,121,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,114,101,103,105,115,116,114,121,125,125,103,101,116,32,115,116,97,116,101,40,41,123,125,99,111,110,115,116,114,117,99,116,111,114,40,102,97,99,116,111,114,121,65,100,100,114,101,115,115,44,99,117,114,114,101,110,99,121,44,118,97,108,105,100,97,116,111,114,65,100,100,114,101,115,115,44,112,114,105,99,101,44,115,116,97,116,101,41,123,115,116,97,116,101,63,40,116,104,105,115,46,35,111,119,110,101,114,61,115,116,97,116,101,46,111,119,110,101,114,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,61,115,116,97,116,101,46,114,101,103,105,115,116,114,121,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,115,116,97,116,101,46,99,117,114,114,101,110,99,121,44,116,104,105,115,46,35,112,114,105,99,101,61,115,116,97,116,101,46,112,114,105,99,101,41,58,40,116,104,105,115,46,35,111,119,110,101,114,61,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,112,114,105,99,101,61,112,114,105,99,101,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,67,111,110,116,114,97,99,116,70,97,99,116,111,114,121,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,102,97,99,116,111,114,121,65,100,100,114,101,115,115,125,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,84,111,107,101,110,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,99,117,114,114,101,110,99,121,125,44,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,65,114,116,79,110,108,105,110,101,86,97,108,105,100,97,116,111,114,115,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,118,97,108,105,100,97,116,111,114,65,100,100,114,101,115,115,125,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,41,125,99,104,97,110,103,101,79,119,110,101,114,40,111,119,110,101,114,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,111,119,110,101,114,61,111,119,110,101,114,125,99,104,97,110,103,101,80,114,105,99,101,40,112,114,105,99,101,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,112,114,105,99,101,61,112,114,105,99,101,125,99,104,97,110,103,101,67,117,114,114,101,110,99,121,40,99,117,114,114,101,110,99,121,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,125,97,115,121,110,99,32,112,117,114,99,104,97,115,101,78,97,109,101,40,110,97,109,101,44,97,100,100,114,101,115,115,41,123,105,102,40,97,119,97,105,116,32,109,115,103,46,99,97,108,108,40,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,34,98,97,108,97,110,99,101,79,102,34,44,91,109,115,103,46,115,101,110,100,101,114,93,41,60,116,104,105,115,46,35,112,114,105,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,112,114,105,99,101,32,101,120,99,101,101,100,115,32,98,97,108,97,110,99,101,34,41,59,116,114,121,123,97,119,97,105,116,32,109,115,103,46,99,97,108,108,40,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,34,116,114,97,110,115,102,101,114,34,44,91,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,111,119,110,101,114,44,116,104,105,115,46,35,112,114,105,99,101,93,41,125,99,97,116,99,104,40,101,41,123,116,104,114,111,119,32,101,125,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,61,123,111,119,110,101,114,58,109,115,103,46,115,101,110,100,101,114,44,97,100,100,114,101,115,115,58,97,100,100,114,101,115,115,125,125,108,111,111,107,117,112,40,110,97,109,101,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,125,116,114,97,110,115,102,101,114,79,119,110,101,114,115,104,105,112,40,110,97,109,101,44,116,111,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,46,111,119,110,101,114,61,116,111,125,99,104,97,110,103,101,65,100,100,114,101,115,115,40,110,97,109,101,44,97,100,100,114,101,115,115,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,114,101,103,105,115,116,114,121,46,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,114,101,103,105,115,116,114,121,91,110,97,109,101,93,46,97,100,100,114,101,115,115,61,97,100,100,114,101,115,115,125,125,59,10,26,58,98,97,53,120,100,97,100,115,54,118,99,106,105,119,118,102,51,52,110,112,122,104,54,120,114,108,97,105,118,112,106,103,116,112,51,109,105,116,51,104,119,104,120,101,117,109,121,98,119,115,112,106,114,104,101,122,51,101,26,58,98,97,53,120,100,97,100,102,109,98,54,102,119,52,50,106,50,112,97,122,55,51,52,112,117,98,122,119,120,110,55,114,103,105,119,119,109,103,115,51,100,99,105,99,114,52,117,50,101,107,104,113,101,118,113,118,99,117,26,58,98,97,53,120,100,97,99,55,107,118,121,51,99,106,107,97,52,97,101,120,55,98,122,55,119,54,114,121,113,120,103,102,98,109,119,115,116,111,109,115,101,121,111,110,121,116,98,115,115,108,55,115,108,101,114,105,117,100,26,4,49,48,48,48",validators:"237,198,1,10,54,51,67,122,86,52,88,98,115,81,54,72,57,100,75,49,76,101,105,66,75,65,120,114,54,81,105,77,71,53,116,68,105,55,122,77,77,72,118,117,120,104,121,50,101,118,70,101,118,72,49,77,85,76,99,18,215,16,114,101,116,117,114,110,32,99,108,97,115,115,32,86,97,108,105,100,97,116,111,114,115,123,35,110,97,109,101,61,34,65,114,116,79,110,108,105,110,101,86,97,108,105,100,97,116,111,114,115,34,59,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,61,48,59,35,118,97,108,105,100,97,116,111,114,115,61,123,125,59,35,111,119,110,101,114,59,35,99,117,114,114,101,110,99,121,59,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,59,103,101,116,32,115,116,97,116,101,40,41,123,114,101,116,117,114,110,123,111,119,110,101,114,58,116,104,105,115,46,35,111,119,110,101,114,44,109,105,110,105,109,117,109,66,97,108,97,110,99,101,58,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,44,99,117,114,114,101,110,99,121,58,116,104,105,115,46,35,99,117,114,114,101,110,99,121,44,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,44,118,97,108,105,100,97,116,111,114,115,58,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,125,125,99,111,110,115,116,114,117,99,116,111,114,40,116,111,107,101,110,65,100,100,114,101,115,115,44,115,116,97,116,101,41,123,115,116,97,116,101,63,40,116,104,105,115,46,35,111,119,110,101,114,61,115,116,97,116,101,46,111,119,110,101,114,44,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,61,115,116,97,116,101,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,115,116,97,116,101,46,99,117,114,114,101,110,99,121,44,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,61,115,116,97,116,101,46,118,97,108,105,100,97,116,111,114,115,41,58,40,116,104,105,115,46,35,111,119,110,101,114,61,109,115,103,46,115,101,110,100,101,114,44,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,61,53,101,52,44,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,116,111,107,101,110,65,100,100,114,101,115,115,44,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,109,115,103,46,115,101,110,100,101,114,93,61,123,102,105,114,115,116,83,101,101,110,58,40,110,101,119,32,68,97,116,101,41,46,103,101,116,84,105,109,101,40,41,44,97,99,116,105,118,101,58,33,48,125,41,125,103,101,116,32,110,97,109,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,110,97,109,101,125,103,101,116,32,111,119,110,101,114,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,111,119,110,101,114,125,103,101,116,32,99,117,114,114,101,110,99,121,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,99,117,114,114,101,110,99,121,125,103,101,116,32,118,97,108,105,100,97,116,111,114,115,40,41,123,114,101,116,117,114,110,123,46,46,46,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,125,125,103,101,116,32,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,125,103,101,116,32,109,105,110,105,109,117,109,66,97,108,97,110,99,101,40,41,123,114,101,116,117,114,110,32,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,99,104,97,110,103,101,79,119,110,101,114,40,111,119,110,101,114,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,110,32,111,119,110,101,114,34,41,125,99,104,97,110,103,101,67,117,114,114,101,110,99,121,40,99,117,114,114,101,110,99,121,41,123,105,102,40,109,115,103,46,115,101,110,100,101,114,33,61,61,116,104,105,115,46,35,111,119,110,101,114,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,110,111,116,32,97,110,32,111,119,110,101,114,34,41,59,116,104,105,115,46,35,99,117,114,114,101,110,99,121,61,99,117,114,114,101,110,99,121,125,104,97,115,40,118,97,108,105,100,97,116,111,114,41,123,114,101,116,117,114,110,32,66,111,111,108,101,97,110,40,118,111,105,100,32,48,33,61,61,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,41,125,97,115,121,110,99,32,97,100,100,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,41,123,105,102,40,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,97,108,114,101,97,100,121,32,97,32,118,97,108,105,100,97,116,111,114,34,41,59,99,111,110,115,116,32,98,97,108,97,110,99,101,61,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,116,104,105,115,46,99,117,114,114,101,110,99,121,44,34,98,97,108,97,110,99,101,79,102,34,44,91,109,115,103,46,115,101,110,100,101,114,93,41,59,105,102,40,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,98,97,108,97,110,99,101,32,116,111,32,108,111,119,33,32,103,111,116,58,32,36,123,98,97,108,97,110,99,101,125,32,110,101,101,100,58,32,36,123,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,96,41,59,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,43,61,49,44,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,61,123,102,105,114,115,116,83,101,101,110,58,40,110,101,119,32,68,97,116,101,41,46,103,101,116,84,105,109,101,40,41,44,97,99,116,105,118,101,58,33,48,125,125,114,101,109,111,118,101,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,41,123,105,102,40,33,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,118,97,108,105,100,97,116,111,114,32,110,111,116,32,102,111,117,110,100,34,41,59,116,104,105,115,46,35,116,111,116,97,108,86,97,108,105,100,97,116,111,114,115,45,61,49,44,100,101,108,101,116,101,32,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,125,97,115,121,110,99,32,117,112,100,97,116,101,86,97,108,105,100,97,116,111,114,40,118,97,108,105,100,97,116,111,114,44,97,99,116,105,118,101,41,123,105,102,40,33,116,104,105,115,46,104,97,115,40,118,97,108,105,100,97,116,111,114,41,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,118,97,108,105,100,97,116,111,114,32,110,111,116,32,102,111,117,110,100,34,41,59,99,111,110,115,116,32,98,97,108,97,110,99,101,61,97,119,97,105,116,32,109,115,103,46,115,116,97,116,105,99,67,97,108,108,40,116,104,105,115,46,99,117,114,114,101,110,99,121,44,34,98,97,108,97,110,99,101,79,102,34,44,91,109,115,103,46,115,101,110,100,101,114,93,41,59,105,102,40,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,38,38,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,38,38,40,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,61,33,49,41,44,98,97,108,97,110,99,101,60,116,104,105,115,46,109,105,110,105,109,117,109,66,97,108,97,110,99,101,41,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,98,97,108,97,110,99,101,32,116,111,32,108,111,119,33,32,103,111,116,58,32,36,123,98,97,108,97,110,99,101,125,32,110,101,101,100,58,32,36,123,116,104,105,115,46,35,109,105,110,105,109,117,109,66,97,108,97,110,99,101,125,96,41,59,116,104,105,115,46,35,118,97,108,105,100,97,116,111,114,115,91,118,97,108,105,100,97,116,111,114,93,46,97,99,116,105,118,101,61,97,99,116,105,118,101,125,125,59,10,26,58,98,97,53,120,100,97,100,102,109,98,54,102,119,52,50,106,50,112,97,122,55,51,52,112,117,98,122,119,120,110,55,114,103,105,119,119,109,103,115,51,100,99,105,99,114,52,117,50,101,107,104,113,101,118,113,118,99,117"};const{contractFactory:o,nativeToken:s,nameService:a,validators:u}={contractFactory:"ba5xdads6vcjiwvf34npzh6xrlaivpjgtp3mit3hwhxeumybwspjrhez3e",nativeToken:"ba5xdadfmb6fw42j2paz734pubzwxn7rgiwwmgs3dcicr4u2ekhqevqvcu",nameService:"ba5xdadsx73i3tkuk6q5bz4mm5zcgqipha3szmuixgit46albm2inuarp6",validators:"ba5xdac7kvy3cjka4aex7bz7w6ryqxgfbmwstomseyonytbssl7sleriud"},h=new Uint8Array(i.contractFactory.split(",")),c=new Uint8Array(i.nativeToken.split(",")),f=new Uint8Array(i.nameService.split(",")),l=new Uint8Array(i.validators.split(",")),d=t=>{if(t.decoded.to===u)return 0;let e=t.encoded.length;e/=1024,e/=1e6;const r=String(e).split(".");let n=0;if(r[1]){const t=r[1].split("e");r[1]=t[0],n=Number(t[1].replace(/\-|\+/g,""))+Number(t[0].length)}return Number.parseFloat(e.toString()).toFixed(n)};var p={nativeToken:s,nameService:a,contractFactory:o,validators:u,contractFactoryMessage:h,nativeTokenMessage:c,nameServiceMessage:f,validatorsMessage:l,TransactionMessage:n.TransactionMessage,ContractMessage:n.ContractMessage,BlockMessage:n.BlockMessage,BWMessage:n.BWMessage,BWRequestMessage:n.BWRequestMessage,calculateFee:d,calculateTransactionFee:t=>(t=new n.TransactionMessage(t),d(t))};t.exports=p},7936:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});var n=r(7160),i=r(6745);function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(n);class a extends i.FormatInterface{get keys(){return["creator","contract","constructorParameters"]}constructor(t){super(t,s.default("\nmessage ContractMessage {\n required string creator = 1;\n required bytes contract = 2;\n repeated string constructorParameters = 3;\n}\n").ContractMessage,{name:"contract-message"})}}var u=Object.freeze({__proto__:null,default:a});class h extends i.FormatInterface{get keys(){return["timestamp","from","to","nonce","method","params"]}constructor(t){super(t,s.default("\n\nmessage TransactionMessage {\n required uint64 timestamp = 1;\n required string from = 2;\n required string to = 3;\n required uint64 nonce = 4;\n required string method = 5;\n repeated string params = 6;\n}\n").TransactionMessage,{name:"transaction-message"})}}var c=Object.freeze({__proto__:null,default:h});class f extends i.FormatInterface{get keys(){return["index","previousHash","timestamp","reward","fees","transactions","validators"]}constructor(t){super(t,s.default("\nmessage ValidatorMessage {\n required string address = 1;\n required string reward = 2;\n}\n\nmessage Transaction {\n required string hash = 1;\n required uint64 timestamp = 2;\n required string from = 3;\n required string to = 4;\n required uint64 nonce = 5;\n required string method = 6;\n repeated string params = 7;\n}\n\nmessage BlockMessage {\n required uint64 index = 1;\n required string previousHash = 3;\n required uint64 timestamp = 4;\n required uint64 reward = 5;\n required string fees = 6;\n repeated Transaction transactions = 7;\n repeated ValidatorMessage validators = 8;\n}\n").BlockMessage,{name:"block-message"})}}var l=Object.freeze({__proto__:null,default:f});class d extends i.FormatInterface{get keys(){return["up","down"]}constructor(t){super(t,s.default("\n\nmessage BWMessage {\n required uint64 up = 1;\n required uint64 down = 2;\n}\n").BWMessage,{name:"bw-message"})}}var p=Object.freeze({__proto__:null,default:d});class g extends i.FormatInterface{get keys(){return[]}constructor(t){super(t,s.default("\n\nmessage BWRequestMessage {\n}\n").BWRequestMessage,{name:"bw-request-message"})}}var m=Object.freeze({__proto__:null,default:g});e.BWMessage=p,e.BWRequestMessage=m,e.BlockMessage=l,e.ContractMessage=u,e.TransactionMessage=c},9742:function(t,e){e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],h=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),c=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],h[c++]=e>>16&255,h[c++]=e>>8&255,h[c++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[c++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e),h},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(h(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3550:function(t,e,r){!function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function h(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var h=t.charCodeAt(u)-48;o*=i,s=h>=49?h-49+10:h>=17?h-17+10:h,n(h>=0&&s<i,"Invalid character"),o+=s}return o}function c(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c<a;c+=n)u=h(t,c,c+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=h(t,c,t.length,e),c=0;c<s;c++)f*=e;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){c(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h<n;h++){for(var c=u>>>26,f=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?l[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=d[t],c=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(c).toString(t);r=(f=f.idivn(c)).isZero()?g+r:l[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,h=0,c=0|s[0],f=8191&c,l=c>>>13,d=0|s[1],p=8191&d,g=d>>>13,m=0|s[2],w=8191&m,y=m>>>13,b=0|s[3],v=8191&b,_=b>>>13,E=0|s[4],M=8191&E,x=E>>>13,k=0|s[5],S=8191&k,A=k>>>13,R=0|s[6],T=8191&R,N=R>>>13,B=0|s[7],O=8191&B,U=B>>>13,C=0|s[8],L=8191&C,I=C>>>13,P=0|s[9],j=8191&P,D=P>>>13,F=0|a[0],q=8191&F,z=F>>>13,$=0|a[1],H=8191&$,W=$>>>13,G=0|a[2],V=8191&G,Z=G>>>13,J=0|a[3],K=8191&J,X=J>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],ft=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(h+(n=Math.imul(f,q))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(l,q)|0))<<13)|0;h=((o=Math.imul(l,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(g,q)|0,o=Math.imul(g,z);var wt=(h+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(l,H)|0))<<13)|0;h=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(y,q)|0,o=Math.imul(y,z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,W)|0;var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,Z)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,K)|0))<<13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,z))+Math.imul(x,q)|0,o=Math.imul(x,z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,X)|0;var vt=(h+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0;var _t=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(N,q)|0,o=Math.imul(N,z),n=n+Math.imul(S,H)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var Et=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Mt=(h+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,z))+Math.imul(I,q)|0,o=Math.imul(I,z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(U,H)|0,o=o+Math.imul(U,W)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ht)|0;var xt=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(D,q)|0,o=Math.imul(D,z),n=n+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,lt)|0;var kt=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(D,H)|0,o=Math.imul(D,W),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(y,ft)|0,o=o+Math.imul(y,lt)|0;var St=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;h=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,Z))+Math.imul(D,V)|0,o=Math.imul(D,Z),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ht)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,lt)|0;var At=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(y,pt)|0))<<13)|0;h=((o=o+Math.imul(y,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,X))+Math.imul(D,K)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ft)|0,o=o+Math.imul(x,lt)|0;var Rt=(h+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,gt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(x,pt)|0))<<13)|0;h=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ht)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var Nt=(h+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,gt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(U,ft)|0,o=o+Math.imul(U,lt)|0;var Bt=(h+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(N,pt)|0))<<13)|0;h=((o=o+Math.imul(N,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(D,ut)|0,o=Math.imul(D,ht),n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,lt)|0;var Ot=(h+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(U,pt)|0))<<13)|0;h=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Ut=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,gt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863;var Ct=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,gt))+Math.imul(D,pt)|0))<<13)|0;return h=((o=Math.imul(D,gt))+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,u[0]=mt,u[1]=wt,u[2]=yt,u[3]=bt,u[4]=vt,u[5]=_t,u[6]=Et,u[7]=Mt,u[8]=xt,u[9]=kt,u[10]=St,u[11]=At,u[12]=Rt,u[13]=Tt,u[14]=Nt,u[15]=Bt,u[16]=Ot,u[17]=Ut,u[18]=Ct,0!==h&&(u[19]=h,r.length++),r};function w(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=u;h++){var c=o-h,f=(0|t.words[c])*(0|e.words[h]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(t,e,r){return w(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?w(this,t,e):y(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var f=u,l=h,d=0;d<s;d++){var p=r[c+d],g=n[c+d],m=r[c+d+s],w=n[c+d+s],y=f*m-l*w;w=f*w+l*m,m=y,r[c+d]=p+m,n[c+d]=g+w,r[c+d+s]=p-m,n[c+d+s]=g-w,d!==a&&(y=u*f-h*l,l=u*l+h*f,f=y)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,a,u,n,i),this.transform(h,o,c,f,n,i);for(var d=0;d<n;d++){var p=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),y(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c<<26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,g=1;0==(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(E,_),E.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(M,_),i(x,_),i(k,_),k.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new E;else if("p224"===t)e=new M;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return v[t]=e,e},S.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var g=d,m=0;0!==g.cmp(a);m++)g=g.redSqr();n(m<p);var w=this.pow(f,new o(1).iushln(p-m-1));l=l.redMul(w),f=w.redSqr(),d=d.redMul(f),p=m}return l},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,S),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},8764:function(t,e,r){const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?a(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return c(t),a(t<0?0:0|p(t))}function l(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(i)return n?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function w(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return-1}function v(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(K(n))return s;t[r+s]=n}return s}function _(t,e,r,n){return Z(G(e,t.length-r),t,r,n)}function E(t,e,r,n){return Z(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function M(t,e,r,n){return Z(V(e),t,r,n)}function x(t,e,r,n){return Z(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=A));return r}(n)}e.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return h(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return f(t)},u.allocUnsafeSlow=function(t){return f(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).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}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(J(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)w(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)w(this,e,e+3),w(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)w(this,e,e+7),w(this,e+1,e+6),w(this,e+2,e+5),w(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?S(this,0,t):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),h=this.slice(n,i),c=t.slice(e,r);for(let t=0;t<a;++t)if(h[t]!==c[t]){o=h[t],s=c[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return E(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function R(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function T(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function N(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=X[t[n]];return i}function B(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function O(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function C(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function L(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function I(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,n,o){return e=+e,r>>>=0,o||I(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,o){return e=+e,r>>>=0,o||I(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Y((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=Y((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Y((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=Y((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||H(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||U(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||U(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Y((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Y((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Y((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Y((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const D={};function F(t,e,r){D[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function q(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){$(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||H(e,t.length-(r+1))}(n,i,o)}function $(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Y(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},7187:function(t){var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&g(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function h(t,e,r,n){var i,o,s,h;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,h=c,console&&console.warn&&console.warn(h)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function l(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function g(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var h=u.length,c=p(u,h);for(r=0;r<h;++r)n(c[r],this,e)}return!0},o.prototype.addListener=function(t,e){return h(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return h(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,f(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,f(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return l(this,t,!0)},o.prototype.rawListeners=function(t){return l(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},645:function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,h=u>>1,c=-7,f=r?i-1:0,l=r?-1:1,d=t[e+f];for(f+=l,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+t[e+f],f+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+f],f+=l,c-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=h}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,c=(1<<h)-1,f=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[r+d]=255&s,d+=p,s/=256,h-=8);t[r+d-p]|=128*g}},5717:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},5811:function(t,e,r){t.exports=r(6066)(r(9653))},6066:function(t,e,r){const n=r(7016),i=r(5675);t.exports=function(t){const e=n(t),r=i(t);return function(t,n){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,n);case"keccak256":return new e(1088,512,null,256,n);case"keccak384":return new e(832,768,null,384,n);case"keccak512":return new e(576,1024,null,512,n);case"sha3-224":return new e(1152,448,6,224,n);case"sha3-256":return new e(1088,512,6,256,n);case"sha3-384":return new e(832,768,6,384,n);case"sha3-512":return new e(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+t)}}}},7016:function(t,e,r){var n=r(8764).Buffer;const{Transform:i}=r(8473);t.exports=t=>class e extends i{constructor(e,r,n,i,o){super(o),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,r),this._finalized=!1}_transform(t,e,r){let n=null;try{this.update(t,e)}catch(t){n=t}r(n)}_flush(t){let e=null;try{this.push(this.digest())}catch(t){e=t}t(e)}update(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},5675:function(t,e,r){var n=r(8764).Buffer;const{Transform:i}=r(8473);t.exports=t=>class e extends i{constructor(e,r,n,i){super(i),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new t,this._state.initialize(e,r),this._finalized=!1}_transform(t,e,r){let n=null;try{this.update(t,e)}catch(t){n=t}r(n)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}squeeze(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(t);return void 0!==e&&(r=r.toString(e)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},4040:function(t,e){const r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];e.p1600=function(t){for(let e=0;e<24;++e){const n=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],c=t[7]^t[17]^t[27]^t[37]^t[47],f=t[8]^t[18]^t[28]^t[38]^t[48],l=t[9]^t[19]^t[29]^t[39]^t[49];let d=f^(o<<1|s>>>31),p=l^(s<<1|o>>>31);const g=t[0]^d,m=t[1]^p,w=t[10]^d,y=t[11]^p,b=t[20]^d,v=t[21]^p,_=t[30]^d,E=t[31]^p,M=t[40]^d,x=t[41]^p;d=n^(a<<1|u>>>31),p=i^(u<<1|a>>>31);const k=t[2]^d,S=t[3]^p,A=t[12]^d,R=t[13]^p,T=t[22]^d,N=t[23]^p,B=t[32]^d,O=t[33]^p,U=t[42]^d,C=t[43]^p;d=o^(h<<1|c>>>31),p=s^(c<<1|h>>>31);const L=t[4]^d,I=t[5]^p,P=t[14]^d,j=t[15]^p,D=t[24]^d,F=t[25]^p,q=t[34]^d,z=t[35]^p,$=t[44]^d,H=t[45]^p;d=a^(f<<1|l>>>31),p=u^(l<<1|f>>>31);const W=t[6]^d,G=t[7]^p,V=t[16]^d,Z=t[17]^p,J=t[26]^d,K=t[27]^p,X=t[36]^d,Y=t[37]^p,Q=t[46]^d,tt=t[47]^p;d=h^(n<<1|i>>>31),p=c^(i<<1|n>>>31);const et=t[8]^d,rt=t[9]^p,nt=t[18]^d,it=t[19]^p,ot=t[28]^d,st=t[29]^p,at=t[38]^d,ut=t[39]^p,ht=t[48]^d,ct=t[49]^p,ft=g,lt=m,dt=y<<4|w>>>28,pt=w<<4|y>>>28,gt=b<<3|v>>>29,mt=v<<3|b>>>29,wt=E<<9|_>>>23,yt=_<<9|E>>>23,bt=M<<18|x>>>14,vt=x<<18|M>>>14,_t=k<<1|S>>>31,Et=S<<1|k>>>31,Mt=R<<12|A>>>20,xt=A<<12|R>>>20,kt=T<<10|N>>>22,St=N<<10|T>>>22,At=O<<13|B>>>19,Rt=B<<13|O>>>19,Tt=U<<2|C>>>30,Nt=C<<2|U>>>30,Bt=I<<30|L>>>2,Ot=L<<30|I>>>2,Ut=P<<6|j>>>26,Ct=j<<6|P>>>26,Lt=F<<11|D>>>21,It=D<<11|F>>>21,Pt=q<<15|z>>>17,jt=z<<15|q>>>17,Dt=H<<29|$>>>3,Ft=$<<29|H>>>3,qt=W<<28|G>>>4,zt=G<<28|W>>>4,$t=Z<<23|V>>>9,Ht=V<<23|Z>>>9,Wt=J<<25|K>>>7,Gt=K<<25|J>>>7,Vt=X<<21|Y>>>11,Zt=Y<<21|X>>>11,Jt=tt<<24|Q>>>8,Kt=Q<<24|tt>>>8,Xt=et<<27|rt>>>5,Yt=rt<<27|et>>>5,Qt=nt<<20|it>>>12,te=it<<20|nt>>>12,ee=st<<7|ot>>>25,re=ot<<7|st>>>25,ne=at<<8|ut>>>24,ie=ut<<8|at>>>24,oe=ht<<14|ct>>>18,se=ct<<14|ht>>>18;t[0]=ft^~Mt&Lt,t[1]=lt^~xt&It,t[10]=qt^~Qt&gt,t[11]=zt^~te&mt,t[20]=_t^~Ut&Wt,t[21]=Et^~Ct&Gt,t[30]=Xt^~dt&kt,t[31]=Yt^~pt&St,t[40]=Bt^~$t&ee,t[41]=Ot^~Ht&re,t[2]=Mt^~Lt&Vt,t[3]=xt^~It&Zt,t[12]=Qt^~gt&At,t[13]=te^~mt&Rt,t[22]=Ut^~Wt&ne,t[23]=Ct^~Gt&ie,t[32]=dt^~kt&Pt,t[33]=pt^~St&jt,t[42]=$t^~ee&wt,t[43]=Ht^~re&yt,t[4]=Lt^~Vt&oe,t[5]=It^~Zt&se,t[14]=gt^~At&Dt,t[15]=mt^~Rt&Ft,t[24]=Wt^~ne&bt,t[25]=Gt^~ie&vt,t[34]=kt^~Pt&Jt,t[35]=St^~jt&Kt,t[44]=ee^~wt&Tt,t[45]=re^~yt&Nt,t[6]=Vt^~oe&ft,t[7]=Zt^~se&lt,t[16]=At^~Dt&qt,t[17]=Rt^~Ft&zt,t[26]=ne^~bt&_t,t[27]=ie^~vt&Et,t[36]=Pt^~Jt&Xt,t[37]=jt^~Kt&Yt,t[46]=wt^~Tt&Bt,t[47]=yt^~Nt&Ot,t[8]=oe^~ft&Mt,t[9]=se^~lt&xt,t[18]=Dt^~qt&Qt,t[19]=Ft^~zt&te,t[28]=bt^~_t&Ut,t[29]=vt^~Et&Ct,t[38]=Jt^~Xt&dt,t[39]=Kt^~Yt&pt,t[48]=Tt^~Bt&$t,t[49]=Nt^~Ot&Ht,t[0]^=r[2*e],t[1]^=r[2*e+1]}}},9653:function(t,e,r){var n=r(8764).Buffer;const i=r(4040);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(t,e){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},o.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&this.count===this.blockSize-1&&i.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,i.p1600(this.state),this.count=0,this.squeezing=!0},o.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=n.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return e},o.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=o},4894:function(t,e,r){var n=r(7126),i=r(2565);t.exports=n,t.exports.parse=n,t.exports.stringify=i},7126:function(t,e,r){var n=r(989),i=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],o=function(t){var e=t.shift();if("{"!==e)return e;e={};for(var r="";t.length;)switch(t[0]){case"}":return t.shift(),e;case":":t.shift(),e[r]=o(t);break;default:r=t.shift()}},s=function(t){for(var e={};t.length;)switch(t[0]){case"[":case",":t.shift();var r=t.shift();"("===r&&(r=t.shift(),t.shift());var n=[];if("."===t[0][0]&&(n=t[0].substr(1).split("."),t.shift()),"="!==t[0])throw new Error("Unexpected token in field options: "+t[0]);if(t.shift(),"]"===t[0])throw new Error("Unexpected ] in field option");var i=[r].concat(n),s=i.pop();i.reduce((function(t,e,r){return null==t[e]&&(t[e]={}),t[e]}),e)[s]=o(t);break;case"]":return t.shift(),e;default:throw new Error("Unexpected token in field options: "+t[0])}throw new Error("No closing tag for field options")},a=function(t){for(var e={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};t.length;)switch(t[0]){case"=":t.shift(),e.tag=Number(t.shift());break;case"map":if(e.type="map",e.map={from:null,to:null},t.shift(),"<"!==t[0])throw new Error("Unexpected token in map type: "+t[0]);if(t.shift(),e.map.from=t.shift(),","!==t[0])throw new Error("Unexpected token in map type: "+t[0]);if(t.shift(),e.map.to=t.shift(),">"!==t[0])throw new Error("Unexpected token in map type: "+t[0]);t.shift(),e.name=t.shift();break;case"repeated":case"required":case"optional":var r=t.shift();e.required="required"===r,e.repeated="repeated"===r,e.type=t.shift(),e.name=t.shift();break;case"[":e.options=s(t);break;case";":if(null===e.name)throw new Error("Missing field name");if(null===e.type)throw new Error("Missing type in message field: "+e.name);if(-1===e.tag)throw new Error("Missing tag number in message field: "+e.name);return t.shift(),e;default:throw new Error("Unexpected token in message field: "+t[0])}throw new Error("No ; found for message field")},u=function(t){for(var e={enums:[],options:{},messages:[],fields:[],extends:[],extensions:null};t.length;)switch(t[0]){case"map":case"repeated":case"optional":case"required":e.fields.push(a(t));break;case"enum":e.enums.push(g(t));break;case"message":e.messages.push(f(t));break;case"extensions":e.extensions=c(t);break;case"oneof":t.shift();var r=t.shift();if("{"!==t[0])throw new Error("Unexpected token in oneof: "+t[0]);for(t.shift();"}"!==t[0];){t.unshift("optional");var n=a(t);n.oneof=r,e.fields.push(n)}t.shift();break;case"extend":e.extends.push(h(t));break;case";":t.shift();break;case"reserved":for(t.shift();";"!==t[0];)t.shift();break;case"option":var i=m(t);if(void 0!==e.options[i.name])throw new Error("Duplicate option "+i.name);e.options[i.name]=i.value;break;default:t.unshift("optional"),e.fields.push(a(t))}return e},h=function(t){return{name:t[1],message:f(t)}},c=function(t){t.shift();var e=Number(t.shift());if(isNaN(e))throw new Error("Invalid from in extensions definition");if("to"!==t.shift())throw new Error("Expected keyword 'to' in extensions definition");var r=t.shift();if("max"===r&&(r=536870911),r=Number(r),isNaN(r))throw new Error("Invalid to in extensions definition");if(";"!==t.shift())throw new Error("Missing ; in extensions definition");return{from:e,to:r}},f=function(t){t.shift();var e=1,r=[],n={name:t.shift(),options:{},enums:[],extends:[],messages:[],fields:[]};if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("{"===t[0]?e++:"}"===t[0]&&e--,!e)return t.shift(),r=u(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n.options=r.options,n;r.push(t.shift())}if(e)throw new Error("No closing tag for message")},l=function(t){t.shift();var e=t.shift();if(";"!==t[0])throw new Error("Expected ; but found "+t[0]);return t.shift(),e},d=function(t){if(t.shift(),"="!==t[0])throw new Error("Expected = but found "+t[0]);t.shift();var e=t.shift();switch(e){case'"proto2"':e=2;break;case'"proto3"':e=3;break;default:throw new Error("Expected protobuf syntax version but found "+e)}if(";"!==t[0])throw new Error("Expected ; but found "+t[0]);return t.shift(),e},p=function(t){if(t.length<4)throw new Error("Invalid enum value: "+t.slice(0,3).join(" "));if("reserved"===t[0]){for(t.shift();";"!==t[0];)t.shift();return t.shift(),null}if("="!==t[1])throw new Error("Expected = but found "+t[1]);if(";"!==t[3]&&"["!==t[3])throw new Error("Expected ; or [ but found "+t[1]);var e=t.shift();t.shift();var r={value:null,options:{}};return r.value=Number(t.shift()),"["===t[0]&&(r.options=s(t)),t.shift(),{name:e,val:r}},g=function(t){t.shift();var e={},r={name:t.shift(),values:{},options:{}};if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("}"===t[0])return t.shift(),";"===t[0]&&t.shift(),r;if("option"!==t[0]){var n=p(t);null!==n&&(r.values[n.name]=n.val)}else e=m(t),r.options[e.name]=e.value}throw new Error("No closing tag for enum")},m=function(t){for(var e=null,r=null,n=function(t){return"true"===t||"false"!==t&&t.replace(/^"+|"+$/gm,"")};t.length;){if(";"===t[0])return t.shift(),{name:e,value:r};switch(t[0]){case"option":t.shift();var i="("===t[0];if(i&&t.shift(),e=t.shift(),i){if(")"!==t[0])throw new Error("Expected ) but found "+t[0]);t.shift()}"."===t[0][0]&&(e+=t.shift());break;case"=":if(t.shift(),null===e)throw new Error("Expected key for option with value: "+t[0]);if(r=n(t.shift()),"optimize_for"===e&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(r))throw new Error("Unexpected value for option optimize_for: "+r);"{"===r&&(r=w(t));break;default:throw new Error("Unexpected token in option: "+t[0])}}},w=function(t){for(var e=function(t){return"true"===t||"false"!==t&&t.replace(/^"+|"+$/gm,"")},r={};t.length;){if("}"===t[0])return t.shift(),r;var n="("===t[0];n&&t.shift();var i=t.shift();if(n){if(")"!==t[0])throw new Error("Expected ) but found "+t[0]);t.shift()}var o=null;switch(t[0]){case":":if(void 0!==r[i])throw new Error("Duplicate option map key "+i);t.shift(),"{"===(o=e(t.shift()))&&(o=w(t)),r[i]=o,";"===t[0]&&t.shift();break;case"{":if(t.shift(),o=w(t),void 0===r[i]&&(r[i]=[]),!Array.isArray(r[i]))throw new Error("Duplicate option map key "+i);r[i].push(o);break;default:throw new Error("Unexpected token in option map: "+t[0])}}throw new Error("No closing tag for option map")},y=function(t){t.shift();var e=t.shift().replace(/^"+|"+$/gm,"");if(";"!==t[0])throw new Error("Unexpected token: "+t[0]+'. Expected ";"');return t.shift(),e},b=function(t){t.shift();var e={name:t.shift(),methods:[],options:{}};if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("}"===t[0])return t.shift(),";"===t[0]&&t.shift(),e;switch(t[0]){case"option":var r=m(t);if(void 0!==e.options[r.name])throw new Error("Duplicate option "+r.name);e.options[r.name]=r.value;break;case"rpc":e.methods.push(v(t));break;default:throw new Error("Unexpected token in service: "+t[0])}}throw new Error("No closing tag for service")},v=function(t){t.shift();var e={name:t.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==t[0])throw new Error("Expected ( but found "+t[0]);if(t.shift(),"stream"===t[0]&&(t.shift(),e.client_streaming=!0),e.input_type=t.shift(),")"!==t[0])throw new Error("Expected ) but found "+t[0]);if(t.shift(),"returns"!==t[0])throw new Error("Expected returns but found "+t[0]);if(t.shift(),"("!==t[0])throw new Error("Expected ( but found "+t[0]);if(t.shift(),"stream"===t[0]&&(t.shift(),e.server_streaming=!0),e.output_type=t.shift(),")"!==t[0])throw new Error("Expected ) but found "+t[0]);if(t.shift(),";"===t[0])return t.shift(),e;if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("}"===t[0])return t.shift(),";"===t[0]&&t.shift(),e;if("option"!==t[0])throw new Error("Unexpected token in rpc options: "+t[0]);var r=m(t);if(void 0!==e.options[r.name])throw new Error("Duplicate option "+r.name);e.options[r.name]=r.value}throw new Error("No closing tag for rpc")};t.exports=function(t){for(var e=n(t.toString()),r=0;r<e.length;r++){var o;if(/^("|')([^'"]*)$/.test(e[r]))for(o=1===e[r].length?r+1:r;o<e.length;o++)if(/^[^'"\\]*(?:\\.[^'"\\]*)*("|')$/.test(e[o])){e=e.slice(0,r).concat(e.slice(r,o+1).join("")).concat(e.slice(o+1));break}}for(var s={syntax:3,package:null,imports:[],enums:[],messages:[],options:{},extends:[]},a=!0;e.length;){switch(e[0]){case"package":s.package=l(e);break;case"syntax":if(!a)throw new Error("Protobuf syntax version should be first thing in file");s.syntax=d(e);break;case"message":s.messages.push(f(e));break;case"enum":s.enums.push(g(e));break;case"option":var u=m(e);if(s.options[u.name])throw new Error("Duplicate option "+u.name);s.options[u.name]=u.value;break;case"import":s.imports.push(y(e));break;case"extend":s.extends.push(h(e));break;case"service":s.services||(s.services=[]),s.services.push(b(e));break;default:throw new Error("Unexpected token: "+e[0])}a=!1}return s.extends.forEach((function(t){s.messages.forEach((function(e){e.name===t.name&&t.message.fields.forEach((function(t){if(!e.extensions||t.tag<e.extensions.from||t.tag>e.extensions.to)throw new Error(e.name+" does not declare "+t.tag+" as an extension number");e.fields.push(t)}))}))})),s.messages.forEach((function(t){t.fields.forEach((function(e){var r,n,o,a;if(e.options&&"true"===e.options.packed&&-1===i.indexOf(e.type)){if(-1===e.type.indexOf(".")){if(t.enums&&t.enums.some((function(t){return t.name===e.type})))return}else{if((r=e.type.split(".")).length>2)throw new Error("what is this?");if(n=r[0],o=r[1],s.messages.some((function(t){if(t.name===n)return a=t,t})),a&&a.enums&&a.enums.some((function(t){return t.name===o})))return}throw new Error("Fields of type "+e.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}}))})),s}},2565:function(t){var e=function(t,e){var r=t.repeated?"repeated":t.required?"required":"optional";"map"===t.type&&(r="map<"+t.map.from+","+t.map.to+">"),t.oneof&&(r="");var n=Object.keys(t.options||{}).map((function(e){return e+" = "+t.options[e]})).join(",");return n&&(n=" ["+n+"]"),e.push((r?r+" ":"")+("map"===t.map?"":t.type+" ")+t.name+" = "+t.tag+n+";"),e},r=function(t,i){i.push("message "+t.name+" {"),t.options||(t.options={}),o(t.options,i),t.enums||(t.enums=[]),t.enums.forEach((function(t){i.push(n(t,[]))})),t.messages||(t.messages=[]),t.messages.forEach((function(t){i.push(r(t,[]))}));var s={};return t.fields||(t.fields=[]),t.fields.forEach((function(t){t.oneof?(s[t.oneof]||(s[t.oneof]=[]),s[t.oneof].push(e(t,[]))):i.push(e(t,[]))})),Object.keys(s).forEach((function(t){s[t].unshift("oneof "+t+" {"),s[t].push("}"),i.push(s[t])})),i.push("}",""),i},n=function(t,e){e.push("enum "+t.name+" {"),t.options||(t.options={});var r=o(t.options,[]);return r.length>1&&e.push(r.slice(0,-1)),Object.keys(t.values).map((function(r){var n=i(t.values[r]);e.push([r+" = "+n+";"])})),e.push("}",""),e},i=function(t,e){var r=Object.keys(t.options||{}).map((function(e){return e+" = "+t.options[e]})).join(",");return r&&(r=" ["+r+"]"),t.value+r},o=function(t,e){var r=Object.keys(t);return r.forEach((function(r){var n=t[r];~r.indexOf(".")&&(r="("+r+")");var i=typeof n;"object"===i?(n=s(n,[])).length&&e.push("option "+r+" = {",n,"};"):("string"===i&&"optimize_for"!==r&&(n='"'+n+'"'),e.push("option "+r+" = "+n+";"))})),r.length>0&&e.push(""),e},s=function(t,e){return Object.keys(t).forEach((function(r){var n=t[r],i=typeof n;"object"===i?Array.isArray(n)?n.forEach((function(t){(t=s(t,[])).length&&e.push(r+" {",t,"}")})):(n=s(n,[])).length&&e.push(r+" {",n,"}"):("string"===i&&(n='"'+n+'"'),e.push(r+": "+n))})),e},a=function(t){return function(e){return Array.isArray(e)?e.map(a(t+" ")).join("\n"):t+e}};t.exports=function(t){var e=[];return e.push('syntax = "proto'+t.syntax+'";',""),t.package&&e.push("package "+t.package+";",""),t.imports&&t.imports.forEach((function(t){!function(t,e){e.push('import "'+t+'";',"")}(t,e)})),t.options||(t.options={}),o(t.options,e),t.enums||(t.enums=[]),t.enums.forEach((function(t){n(t,e)})),t.messages||(t.messages=[]),t.messages.forEach((function(t){r(t,e)})),t.services&&t.services.forEach((function(t){!function(t,e){e.push("service "+t.name+" {"),t.options||(t.options={}),o(t.options,e),t.methods||(t.methods=[]),t.methods.forEach((function(t){e.push(function(t,e){var r="rpc "+t.name+"(";t.client_streaming&&(r+="stream "),r+=t.input_type+") returns (",t.server_streaming&&(r+="stream "),r+=t.output_type+")",t.options||(t.options={});var n=o(t.options,[]);return n.length>1?e.push(r+" {",n.slice(0,-1),"}"):e.push(r+";"),e}(t,[]))})),e.push("}","")}(t,e)})),e.map(a("")).join("\n")}},989:function(t){t.exports=function(t){var e,r,n=function(t){return t.trim()},i=[];return t.replace(/"(\\"|[^"\n])*?"|'(\\'|[^'\n])*?'/gm,(r=i,function(t){var e="$"+r.length+"$";return r.push(t),e})).replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(n).filter(Boolean).map((function(t){var e=t.indexOf("//");return e>-1?t.slice(0,e):t})).map(n).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter((e=!1,function(t){return"/*"===t?(e=!0,!1):"*/"===t?(e=!1,!1):!e})).map(function(t){var e=/^\$(\d+)\$$/;return function(r){var n=r.match(e);return n?t[+n[1]]:r}}(i))}},8853:function(t){t.exports=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return t.bytes=s-r,i}},7659:function(t){t.exports=function t(r,n,i){n=n||[];for(var o=i=i||0;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},138:function(t,e,r){t.exports={encode:r(7659),decode:r(8853),encodingLength:r(184)}},184:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t<e?1:t<r?2:t<n?3:t<i?4:t<o?5:t<s?6:t<a?7:t<u?8:t<h?9:10}},7986:function(t,e,r){const n=r(138),i=r(3864).r;function o(t){return`${t.substring(0,1).toUpperCase()}${t.substring(1)}`}function s(t,e,r,n){if(Object.prototype.hasOwnProperty.call(t,e))return;const i=o(e);Object.defineProperties(t,{[e]:{enumerable:!0,configurable:!0,set:t=>{r=t},get:()=>void 0===r?n:r},[`has${i}`]:{configurable:!0,value:()=>void 0!==r},[`set${i}`]:{configurable:!0,value:t=>{r=t}},[`get${i}`]:{configurable:!0,value:()=>r},[`clear${i}`]:{configurable:!0,value:()=>{r=void 0,t[e]=void 0}}})}var a=function(t,e,r,i){switch(t){case 0:return n.decode(e,i),i+n.decode.bytes;case 1:return i+8;case 2:var o=n.decode(e,i);return i+n.decode.bytes+o;case 3:case 4:throw new Error("Groups are not supported");case 5:return i+4;default:throw new Error("Unknown wire type: "+t)}},u=function(t){if(t.map)return{};if(t.repeated)return[];switch(t.type){case"string":return"";case"bool":return!1;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return 0;default:return null}},h=function(t,e){if(void 0===e)return e;switch(t.type){case"bool":return"true"===e;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(e,10);default:return e}};t.exports=function(t,e,r){const c=[],f={},l=[],d=[];for(var p=0;p<r.length;p++){const r=t.fields[p];f[r.tag]=p;const n=r.options&&r.options.default,i=e(r.type,t.id,!1);d[p]=[n,i&&i.values],t.fields[p].packed=r.repeated&&r.options&&r.options.packed&&"false"!==r.options.packed,r.required&&c.push(r.name),r.oneof&&l.push(r.name)}function g(t,e,r,i,a,u,h){const c=e.name;if(e.oneof){const t=Object.keys(r);for(var f=0;f<t.length;f++)if(l.indexOf(t[f])>-1){const e=o(t[f]);delete r[`has${e}`],delete r[`get${e}`],delete r[`set${e}`],delete r[`clear${e}`],delete r[t[f]]}}let d;if(t.message){const o=n.decode(i,u);u+=n.decode.bytes;const s=t.decode(i,a,u,u+o);e.map?(d=r[c]||{},d[s.key]=s.value):e.repeated?(d=r[c]||[],d.push(s)):d=s}else e.repeated?(d=r[c]||[],d.push(t.decode(i,a,u))):d=t.decode(i,a,u);return s(r,c,d),u+t.decode.bytes}return function e(o,p,m,w){if(null==m&&(m=0),null==w&&(w=o.length),!(w<=o.length&&m<=o.length))throw new Error("Decoded message is not valid");p||(p=new DataView(o.buffer,o.byteOffset,o.byteLength));for(var y,b=m,v={};;){if(w<=m){var _,E,M="",x=0;for(x=0;x<c.length;x++)if(M=c[x],!i(v[M]))throw new Error("Decoded message is not valid, missing required field: "+M);for(x=0;x<r.length;x++){let e;if(y=t.fields[x],E=d[x][0],_=d[x][1],M=y.name,!Object.prototype.hasOwnProperty.call(v,M)){var k=!1;if(y.oneof)for(var S=Object.keys(v),A=0;A<S.length;A++)if(l.indexOf(S[A])>-1){k=!0;break}k||(_?y.repeated?E=[]:(E=E&&_[E]?_[E].value:_[Object.keys(_)[0]].value,E=parseInt(E||0,10)):(e=u(y),E=h(y,E)),s(v,M,E,e))}}return e.bytes=m-b,v}var R=n.decode(o,m);m+=n.decode.bytes;var T=f[R>>3];if(null!=T){var N=r[T];if((y=t.fields[T]).packed){var B=n.decode(o,m);for(B+=m+=n.decode.bytes;m<B;)m=g(N,y,v,o,p,m)}else m=g(N,y,v,o,p,m)}else m=a(7&R,o,0,m)}}}},9611:function(t,e,r){var n=r(3864).r,i=r(138);t.exports=function(t,e,r,o,s){const a=Object.keys(o),u=r.length,h={};for(let e=0;e<u;e++){h[e]={p:i.encode(t.fields[e].tag<<3|2),h:i.encode(t.fields[e].tag<<3|r[e].type)};const n=t.fields[e];t.fields[e].packed=n.repeated&&n.options&&n.options.packed&&"false"!==n.options.packed}function c(t,e,r,n,o,s,a){let u=0;if(!s)for(u=0;u<n.length;u++)t[r++]=n[u];return o.message&&(i.encode(o.encodingLength(a),t,r),r+=i.encode.bytes),o.encode(a,t,e,r),r+o.encode.bytes}return function e(f,l,d,p=0){null==l&&(l=new Uint8Array(s(f))),null==d&&(d=new DataView(l.buffer,l.byteOffset,l.byteLength));const g=p,m=Object.keys(f);let w=0,y=!1;for(w=0;w<a.length;w++){const t=a[w],e=o[w];if(m.indexOf(e)>-1){if(y)throw new Error("only one of the properties defined in oneof "+t+" can be set");y=!0}}for(w=0;w<u;w++){const e=r[w],o=t.fields[w];let s=f[o.name],a=0;if(!n(s)){if(o.required)throw new Error(o.name+" is required");continue}const u=h[w].p,g=h[w].h,m=o.packed;if(o.map){const t=Object.keys(s);for(a=0;a<t.length;a++)t[a]={key:t[a],value:s[t[a]]};s=t}if(m){let t=0;for(a=0;a<s.length;a++)Object.prototype.hasOwnProperty.call(s,a)&&(t+=e.encodingLength(s[a]));if(t){for(a=0;a<g.length;a++)l[p++]=u[a];i.encode(t,l,p),p+=i.encode.bytes}}if(o.repeated){let t;for(a=0;a<s.length;a++)t=s[a],n(t)&&(p=c(l,d,p,g,e,m,t))}else p=c(l,d,p,g,e,m,s)}return e.bytes=p-g,l}}},1216:function(t,e,r){var n=r(3864).r,i=r(138);t.exports=function(t,e,r){const o=Object.keys(r),s=e.length,a=new Array(s);for(let r=0;r<t.fields.length;r++){a[r]=i.encodingLength(t.fields[r].tag<<3|e[r].type);const n=t.fields[r];t.fields[r].packed=n.repeated&&n.options&&n.options.packed&&"false"!==n.options.packed}return function(u){let h=0,c=0,f=0;for(c=0;c<o.length;c++){const t=o[c],e=r[t];let i=!1;for(f=0;f<e.length;f++)if(n(u[e[f]])){if(i)throw new Error("only one of the properties defined in oneof "+t+" can be set");i=!0}}for(c=0;c<s;c++){const r=e[c],o=t.fields[c];let s=u[o.name];const l=a[c];let d;if(n(s)){if(o.map){const t=Object.keys(s);for(f=0;f<t.length;f++)t[f]={key:t[f],value:s[t[f]]};s=t}if(o.packed){let t=0;for(f=0;f<s.length;f++)n(s[f])&&(d=r.encodingLength(s[f]),t+=d,r.message&&(t+=i.encodingLength(d)));t&&(h+=l+t+i.encodingLength(t))}else if(o.repeated)for(f=0;f<s.length;f++)n(s[f])&&(d=r.encodingLength(s[f]),h+=l+d+(r.message?i.encodingLength(d):0));else d=r.encodingLength(s),h+=l+d+(r.message?i.encodingLength(d):0)}else if(o.required)throw new Error(o.name+" is required")}return h}}},104:function(t,e,r){const n=r(9851);t.exports=n(0,(function t(e,r,n,i){r[i]=e?1:0,t.bytes=1}),(function t(e,r,n){const i=e[n]>0;return t.bytes=1,i}),(function(){return 1}))},1092:function(t,e,r){const n=r(138),i=r(9851);function o(t){return t.byteLength}t.exports=i(2,(function t(e,r,i,s){const a=s,u=o(e);n.encode(u,r,s),s+=n.encode.bytes,r.set(e,s),t.bytes=(s+=u)-a}),(function t(e,r,i){const o=i,s=n.decode(e,i);i+=n.decode.bytes;const a=e.slice(i,i+s);return i+=a.length,t.bytes=i-o,a}),(function(t){const e=o(t);return n.encodingLength(e)+e}))},9620:function(t,e,r){const n=r(9851);t.exports=n(1,(function t(e,r,n,i){n.setFloat64(i,e,!0),t.bytes=8}),(function t(e,r,n){const i=r.getFloat64(n,!0);return t.bytes=8,i}),(function(){return 8}))},9851:function(t){t.exports=function(t,e,r,n){return e.bytes=r.bytes=0,{type:t,encode:e,decode:r,encodingLength:n}}},9018:function(t,e,r){const n=r(9851);t.exports=n(5,(function t(e,r,n,i){n.setUint32(i,e,!0),t.bytes=4}),(function t(e,r,n){const i=r.getUint32(n,!0);return t.bytes=4,i}),(function(t){return 4}))},3334:function(t,e,r){const n=r(9851);t.exports=n(1,(function t(e,r,n,i){for(const t of e)r[i]=t,i++;t.bytes=8}),(function t(e,r,n){const i=e.slice(n,n+8);return t.bytes=8,i}),(function(){return 8}))},4606:function(t,e,r){const n=r(9851);t.exports=n(5,(function t(e,r,n,i){n.setFloat32(i,e,!0),t.bytes=4}),(function t(e,r,n){const i=r.getFloat32(n,!0);return t.bytes=4,i}),(function(){return 4}))},119:function(t,e,r){e.make=r(9851),e.bytes=r(1092),e.string=r(6626),e.bool=r(104),e.int32=r(5282),e.int64=r(4291),e.sint32=e.sint64=r(2407),e.uint32=e.uint64=e.enum=e.varint=r(3083),e.fixed64=e.sfixed64=r(3334),e.double=r(9620),e.fixed32=r(9018),e.sfixed32=r(2730),e.float=r(4606)},5282:function(t,e,r){const n=r(138),i=r(9851);t.exports=i(0,(function t(e,r,i,o){n.encode(e<0?e+4294967296:e,r,o),t.bytes=n.encode.bytes}),(function t(e,r,i){const o=n.decode(e,i);return t.bytes=n.decode.bytes,o>2147483647?o-4294967296:o}),(function(t){return n.encodingLength(t<0?t+4294967296:t)}))},4291:function(t,e,r){const n=r(138),i=r(9851);t.exports=i(0,(function t(e,r,i,o){if(e<0){const i=o+9;for(n.encode(-1*e,r,o),r[o+=n.encode.bytes-1]=128|r[o];o<i-1;)r[++o]=255;r[i]=1,t.bytes=10}else n.encode(e,r,o),t.bytes=n.encode.bytes}),(function t(e,r,i){let o=n.decode(e,i);if(o>=Math.pow(2,63)){let r=9;for(;255===e[i+r-1];)r--;r=r||9;const s=e.subarray(i,i+r);s[r-1]=127&s[r-1],o=-1*n.decode(s,0),t.bytes=10}else t.bytes=n.decode.bytes;return o}),(function(t){return t<0?10:n.encodingLength(t)}))},2730:function(t,e,r){const n=r(9851);t.exports=n(5,(function t(e,r,n,i){n.setInt32(i,e,!0),t.bytes=4}),(function t(e,r,n){const i=r.getInt32(n,!0);return t.bytes=4,i}),(function(t){return 4}))},2407:function(t,e,r){const n=r(1842),i=r(9851);t.exports=i(0,(function t(e,r,i,o){n.encode(e,r,o),t.bytes=n.encode.bytes}),(function t(e,r,i){const o=n.decode(e,i);return t.bytes=n.decode.bytes,o}),n.encodingLength)},6626:function(t,e,r){const n=r(138),{fromString:i}=r(2217),{toString:o}=r(2263),s=r(9851);t.exports=s(2,(function t(e,r,o,s){const a=s,u=i(e).byteLength;n.encode(u,r,s,"utf-8"),s+=n.encode.bytes;const h=i(e);r.set(h,s),s+=h.length,t.bytes=s-a}),(function t(e,r,i){const s=i,a=n.decode(e,i);i+=n.decode.bytes;const u=o(e.subarray(i,i+a));return t.bytes=(i+=a)-s,u}),(function(t){const e=i(t).byteLength;return n.encodingLength(e)+e}))},3083:function(t,e,r){const n=r(138),i=r(9851);t.exports=i(0,(function t(e,r,i,o){n.encode(e,r,o),t.bytes=n.encode.bytes}),(function t(e,r,i){const o=n.decode(e,i);return t.bytes=n.decode.bytes,o}),n.encodingLength)},7961:function(t,e,r){const n=r(119),i=r(7986),o=r(9611),s=r(1216),a=r(138);t.exports=function(t,e){const r={},u={},h={},c=function(t,e){t.enums&&t.enums.forEach((function(t){t.id=e+(e?".":"")+t.name,u[t.id]=t,c(t,t.id)})),t.messages&&t.messages.forEach((function(n){n.id=e+(e?".":"")+n.name,r[n.id]=n,n.fields.forEach((function(n){if(!n.map)return;const i="Map_"+n.map.from+"_"+n.map.to,o={name:i,enums:[],messages:[],fields:[{name:"key",type:n.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:n.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:e+(e?".":"")+i};r[o.id]||(r[o.id]=o,t.messages.push(o)),n.type=i,n.repeated=!0})),c(n,n.id)}))};c(t,"");const f=function(t,c,l){if(e&&e[t])return e[t];if(n[t])return n[t];const d=(c?c+"."+t:t).split(".").map((function(e,r,n){return n.slice(0,r).concat(t).join(".")})).reverse().reduce((function(t,e){return t||r[e]||u[e]}),null);if(!1===l)return d;if(!d)throw new Error("Could not resolve "+t);return d.values?function(t){const e=Object.keys(t.values||[]).map((function(e){return parseInt(t.values[e].value,10)}));return n.make(0,(function t(r,n,i,o){if(!e.length||-1===e.indexOf(r))throw new Error("Invalid enum value: "+r);return a.encode(r,n,o),t.bytes=a.encode.bytes,n}),(function t(r,n,i){var o=a.decode(r,i);if(!e.length||-1===e.indexOf(o))throw new Error("Invalid enum value: "+o);return t.bytes=a.decode.bytes,o}),a.encodingLength)}(d):h[d.id]||function(t,e){t.messages.forEach((function(r){e[r.name]=f(r.name,t.id)})),t.enums.forEach((function(t){e[t.name]=function(t){if(!t)return null;const e={};return Object.keys(t).forEach((function(r){e[r]=t[r].value})),e}(t.values)})),e.type=2,e.message=!0,e.name=t.name;const r={};t.fields.forEach((function(t){t.oneof&&(r[t.oneof]||(r[t.oneof]=[]),r[t.oneof].push(t.name))}));const n=t.fields.map((function(e){return f(e.type,t.id)})),a=s(t,n,r),u=o(t,f,n,r,a),h=i(t,f,n);return u.bytes=h.bytes=0,e.buffer=!0,e.encode=u,e.decode=h,e.encodingLength=a,e}(d,h[d.id]={})};return(t.enums||[]).concat((t.messages||[]).map((function(t){return f(t.id)})))}},3864:function(t,e){e.r=function(t){return null!=t&&("number"!=typeof t||!isNaN(t))}},7160:function(t,e,r){var n=r(4894),i=r(7961);t.exports=function(t,e){if(e||(e={}),!t)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var r="object"!=typeof t||t instanceof Uint8Array?n.parse(t):t,o=function(){var t=this;i(r,e.encodings||{}).forEach((function(e){t[e.name]=function(t){if(!t)return null;var e={};return Object.keys(t).forEach((function(r){e[r]=t[r].value})),e}(e.values)||e}))};return o.prototype.toString=function(){return n.stringify(r)},o.prototype.toJSON=function(){return r},new o}},4281:function(t){var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,s,a,u;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var h=("number"!=typeof u&&(u=0),u+".".length>(a=t).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(t,'" ').concat(h," ").concat(i," ").concat(n(e,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6753:function(t,e,r){var n=r(3158),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var o=r(9481),s=r(4229);r(5717)(c,o);for(var a=i(s.prototype),u=0;u<a.length;u++){var h=a[u];c.prototype[h]||(c.prototype[h]=s.prototype[h])}function c(t){if(!(this instanceof c))return new c(t);o.call(this,t),s.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||n.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},2725:function(t,e,r){t.exports=i;var n=r(4605);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5717)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},9481:function(t,e,r){var n,i=r(3158);t.exports=k,k.ReadableState=x,r(7187).EventEmitter;var o,s=function(t,e){return t.listeners(e).length},a=r(2503),u=r(8764).Buffer,h=r.g.Uint8Array||function(){},c=r(4616);o=c&&c.debuglog?c.debuglog("stream"):function(){};var f,l,d,p=r(7327),g=r(1195),m=r(2457).getHighWaterMark,w=r(4281).q,y=w.ERR_INVALID_ARG_TYPE,b=w.ERR_STREAM_PUSH_AFTER_EOF,v=w.ERR_METHOD_NOT_IMPLEMENTED,_=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(k,a);var E=g.errorOrDestroy,M=["error","close","destroy","pause","resume"];function x(t,e,i){n=n||r(6753),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=r(2553).s),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function k(t){if(n=n||r(6753),!(this instanceof k))return new k(t);var e=this instanceof n;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function S(t,e,r,n,i){o("readableAddChunk",e);var s,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?N(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,B(t)))}}(t,a);else if(i||(s=function(t,e){var r,n;return n=e,u.isBuffer(n)||n instanceof h||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e)),r}(a,e)),s)E(t,s);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n)a.endEmitted?E(t,new _):A(t,a,e,!0);else if(a.ended)E(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?A(t,a,e,!1):O(t,a)):A(t,a,e,!1)}else n||(a.reading=!1,O(t,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function A(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&N(t)),O(t,e)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),k.prototype.destroy=g.destroy,k.prototype._undestroy=g.undestroy,k.prototype._destroy=function(t,e){e(t)},k.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=u.from(t,e),e=""),r=!0),S(this,t,e,!1,r)},k.prototype.unshift=function(t){return S(this,t,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(t){f||(f=r(2553).s);var e=new f(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function T(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=R?t=R:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function N(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(B,t))}function B(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,P(t)}function O(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(U,t,e))}function U(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(o("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function C(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function L(t){o("readable nexttick read 0"),t.read(0)}function I(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),P(t),e.flowing&&!e.reading&&t.read(0)}function P(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function j(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function D(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}k.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):N(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&D(this),null;var n,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",i=!0),e.ended||e.reading?o("reading or ended",i=!1):i&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(r,e))),null===(n=t>0?j(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(t){E(this,new v("_read()"))},k.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,e);var a=e&&!1===e.end||t===i.stdout||t===i.stderr?g:u;function u(){o("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",(function e(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",h),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),c=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}));var h=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,P(t))}}(r);t.on("drain",h);var c=!1;function f(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==q(n.pipes,t))&&!c&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){o("onerror",e),g(),t.removeListener("error",l),0===s(t,"error")&&E(t,e)}function d(){t.removeListener("finish",p),g()}function p(){o("onfinish"),t.removeListener("close",d),g()}function g(){o("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events.error?Array.isArray(t._events.error)?t._events.error.unshift(r):t._events.error=[r,t._events.error]:t.on(e,r)}(t,"error",l),t.once("close",d),t.once("finish",p),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},k.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=q(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},k.prototype.on=function(t,e){var r=a.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?N(this):n.reading||i.nextTick(L,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(C,this),r},k.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(C,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(I,t,e))}(this,t)),t.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s<M.length;s++)t.on(M[s],this.emit.bind(this,M[s]));return this._read=function(e){o("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(5850)),l(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),k._fromList=j,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(t,e){return void 0===d&&(d=r(5167)),d(k,t,e)})},4605:function(t,e,r){t.exports=c;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function h(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);u.call(this,t),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(e,r){l(t,e,r)}))}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5717)(c,u),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,r){r(new i("_transform()"))},c.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},c.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},4229:function(t,e,r){var n,i=r(3158);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(undefined),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=k,k.WritableState=x;var s,a={deprecate:r(4927)},u=r(2503),h=r(8764).Buffer,c=r.g.Uint8Array||function(){},f=r(1195),l=r(2457).getHighWaterMark,d=r(4281).q,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,w=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,v=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,E=f.errorOrDestroy;function M(){}function x(t,e,s){n=n||r(6753),t=t||{},"boolean"!=typeof s&&(s=e instanceof n),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(B,t,e),t._writableState.errorEmitted=!0,E(t,n)):(o(n),t._writableState.errorEmitted=!0,E(t,n),B(t,e))}(t,r,n,e,o);else{var s=T(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||R(t,r),n?i.nextTick(A,t,r,s,o):A(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function k(t){var e=this instanceof(n=n||r(6753));if(!e&&!s.call(k,this))return new k(t);this._writableState=new x(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function S(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),B(t,e)}function R(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,S(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,c=r.encoding,f=r.callback;if(S(t,e,!1,e.objectMode?1:h.length,h,c,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function T(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function N(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),B(t,e)}))}function B(t,e){var r=T(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(N,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(5717)(k,u),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===k&&t&&t._writableState instanceof x}})):s=function(t){return t instanceof this},k.prototype.pipe=function(){E(this,new w)},k.prototype.write=function(t,e,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=t,h.isBuffer(n)||n instanceof c);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=M),o.ending?function(t,e){var r=new v;E(t,r),i.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),i.nextTick(n,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else S(t,e,!1,a,n,i,o);return u}(this,o,a,t,e,r)),s},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},k.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,r){r(new g("_write()"))},k.prototype._writev=null,k.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,B(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(t,e){e(t)}},5850:function(t,e,r){var n,i=r(3158);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(8610),a=Symbol("lastResolve"),u=Symbol("lastReject"),h=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function g(t){var e=t[a];if(null!==e){var r=t[d].read();null!==r&&(t[f]=null,t[a]=null,t[u]=null,e(p(r,!1)))}}function m(t){i.nextTick(g,t)}var w=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var t=this,e=this[h];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[h]?r(t[h]):e(p(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[l](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[l])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),w);t.exports=function(t){var e,r=Object.create(y,(o(e={},d,{value:t,writable:!0}),o(e,a,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,h,{value:null,writable:!0}),o(e,c,{value:t._readableState.endEmitted,writable:!0}),o(e,l,{value:function(t,e){var n=r[d].read();n?(r[f]=null,r[a]=null,r[u]=null,t(p(n,!1))):(r[a]=t,r[u]=e)},writable:!0}),e));return r[f]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[f]=null,r[a]=null,r[u]=null,e(t)),void(r[h]=t)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[u]=null,n(p(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}},7327:function(t,e,r){function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(8764).Buffer,a=r(2361).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r;return e=t,r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],r&&o(e.prototype,r),t}()},1195:function(t,e,r){var n=r(3158);function i(t,e){s(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,t)):n.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(o,r),e(t)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},8610:function(t,e,r){var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||c()},h=e._writableState&&e._writableState.finished,c=function(){a=!1,h=!0,s||o.call(e)},f=e._readableState&&e._readableState.endEmitted,l=function(){s=!1,f=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!f?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!h?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",c)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",c),e.on("abort",p),e.req?g():e.on("request",g)):a&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",l),e.on("finish",c),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",c),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("end",l),e.removeListener("error",d),e.removeListener("close",p)}}},5167:function(t){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:function(t,e,r){var n,i=r(4281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(8610)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function h(t){t()}function c(t,e){return t.pipe(e)}function f(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=f(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(h),o||(s.forEach(h),i(n))}))}));return e.reduce(c)}},2457:function(t,e,r){var n=r(4281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},2503:function(t,e,r){t.exports=r(7187).EventEmitter},8473:function(t,e,r){(e=t.exports=r(9481)).Stream=e,e.Readable=e,e.Writable=r(4229),e.Duplex=r(6753),e.Transform=r(4605),e.PassThrough=r(2725),e.finished=r(8610),e.pipeline=r(9946)},9509:function(t,e,r){var n=r(8764),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},1842:function(t,e,r){var n=r(9365);e.encode=function t(e,r,i){e=e>=0?2*e:-2*e-1;var o=n.encode(e,r,i);return t.bytes=n.encode.bytes,o},e.decode=function t(e,r){var i=n.decode(e,r);return t.bytes=n.decode.bytes,1&i?(i+1)/-2:i/2},e.encodingLength=function(t){return n.encodingLength(t>=0?2*t:-2*t-1)}},7721:function(t){t.exports=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return t.bytes=s-r,i}},508:function(t){t.exports=function t(r,n,i){n=n||[];for(var o=i=i||0;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},9365:function(t,e,r){t.exports={encode:r(508),decode:r(7721),encodingLength:r(8184)}},8184:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t<e?1:t<r?2:t<n?3:t<i?4:t<o?5:t<s?6:t<a?7:t<u?8:t<h?9:10}},2553:function(t,e,r){var n=r(9509).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=h,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=f,e=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},4927:function(t,e,r){function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},6988:function(t){t.exports=function t(e,r){var n,i=0,o=0,s=r=r||0,a=e.length;do{if(s>=a||o>49)throw t.bytes=0,new RangeError("Could not decode varint");n=e[s++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return t.bytes=s-r,i}},1312:function(t){t.exports=function t(r,n,i){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw t.bytes=0,new RangeError("Could not encode varint");n=n||[];for(var o=i=i||0;r>=e;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,t.bytes=i-o+1,n};var e=Math.pow(2,31)},4676:function(t,e,r){t.exports={encode:r(1312),decode:r(6988),encodingLength:r(82)}},82:function(t){var e=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),u=Math.pow(2,56),h=Math.pow(2,63);t.exports=function(t){return t<e?1:t<r?2:t<n?3:t<i?4:t<o?5:t<s?6:t<a?7:t<u?8:t<h?9:10}},5140:function(__unused_webpack_module,exports){var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(t),(function(e){r[e]=t[e]})),forEach(globals,(function(e){t[e]&&(r[e]=t[e])}));var o=Object_keys(r),s=n.call(r,this.code);return forEach(Object_keys(r),(function(e){(e in t||-1===indexOf(o,e))&&(t[e]=r[e])})),forEach(globals,(function(e){e in t||defineProp(t,e,r[e])})),document.body.removeChild(e),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),r},forEach(Object_keys(Script.prototype),(function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}})),exports.isContext=function(t){return t instanceof Context},exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),(function(r){e[r]=t[r]})),e}},3158:function(t){var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,u=[],h=!1,c=-1;function f(){h&&a&&(h=!1,a.length?u=a.concat(u):c=-1,u.length&&l())}function l(){if(!h){var t=s(f);h=!0;for(var e=u.length;e;){for(a=u,u=[];++c<e;)a&&a[c].run();c=-1,e=u.length}a=null,h=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new d(t,e)),1!==u.length||h||s(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},6601:function(){},2361:function(){},4616:function(){},2217:function(t,e,r){r.r(e),r.d(e,{fromString:function(){return i}});var n=r(660);function i(t,e="utf8"){const r=n.Z[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return r.decoder.decode(`${r.prefix}${t}`)}},2263:function(t,e,r){r.r(e),r.d(e,{toString:function(){return i}});var n=r(660);function i(t,e="utf8"){const r=n.Z[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return r.encoder.encode(t).substring(1)}},660:function(t,e,r){r.d(e,{Z:function(){return Ot}});var n={};r.r(n),r.d(n,{identity:function(){return S}});var i={};r.r(i),r.d(i,{base2:function(){return A}});var o={};r.r(o),r.d(o,{base8:function(){return R}});var s={};r.r(s),r.d(s,{base10:function(){return T}});var a={};r.r(a),r.d(a,{base16:function(){return N},base16upper:function(){return B}});var u={};r.r(u),r.d(u,{base32:function(){return O},base32hex:function(){return I},base32hexpad:function(){return j},base32hexpadupper:function(){return D},base32hexupper:function(){return P},base32pad:function(){return C},base32padupper:function(){return L},base32upper:function(){return U},base32z:function(){return F}});var h={};r.r(h),r.d(h,{base36:function(){return q},base36upper:function(){return z}});var c={};r.r(c),r.d(c,{base58btc:function(){return $},base58flickr:function(){return H}});var f={};r.r(f),r.d(f,{base64:function(){return W},base64pad:function(){return G},base64url:function(){return V},base64urlpad:function(){return Z}});var l={};r.r(l),r.d(l,{sha256:function(){return pt},sha512:function(){return gt}});var d={};r.r(d),r.d(d,{identity:function(){return wt}});var p={};r.r(p),r.d(p,{code:function(){return bt},decode:function(){return _t},encode:function(){return vt},name:function(){return yt}});var g={};r.r(g),r.d(g,{code:function(){return kt},decode:function(){return At},encode:function(){return St},name:function(){return xt}});var m=function(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw new TypeError(o+" is ambiguous");r[s]=i}var a=t.length,u=t.charAt(0),h=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function f(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return new Uint8Array;var e=0;if(" "!==t[e]){for(var n=0,i=0;t[e]===u;)n++,e++;for(var o=(t.length-e)*h+1>>>0,s=new Uint8Array(o);t[e];){var c=r[t.charCodeAt(e)];if(255===c)return;for(var f=0,l=o-1;(0!==c||f<i)&&-1!==l;l--,f++)c+=a*s[l]>>>0,s[l]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=f,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var s=(o-i)*c+1>>>0,h=new Uint8Array(s);i!==o;){for(var f=e[i],l=0,d=s-1;(0!==f||l<n)&&-1!==d;d--,l++)f+=256*h[d]>>>0,h[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");n=l,i++}for(var p=s-n;p!==s&&0===h[p];)p++;for(var g=u.repeat(r);p<s;++p)g+=t.charAt(h[p]);return g},decodeUnsafe:f,decode:function(t){var r=f(t);if(r)return r;throw new Error(`Non-${e} character`)}}};new Uint8Array(0);const w=t=>{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};class y{constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class b{constructor(t,e,r){this.name=t,this.prefix=e,this.baseDecode=r}decode(t){if("string"==typeof t){if(t[0]===this.prefix)return this.baseDecode(t.slice(1));throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}throw Error("Can only multibase decode strings")}or(t){return _(this,t)}}class v{constructor(t){this.decoders=t}or(t){return _(this,t)}decode(t){const e=t[0],r=this.decoders[e];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const _=(t,e)=>new v({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class E{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new y(t,e,r),this.decoder=new b(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const M=({name:t,prefix:e,encode:r,decode:n})=>new E(t,e,r,n),x=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=m(r,e);return M({prefix:t,name:e,encode:n,decode:t=>w(i(t))})},k=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>M({prefix:e,name:t,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<<r)-1;let o="",s=0,a=0;for(let n=0;n<t.length;++n)for(a=a<<8|t[n],s+=8;s>r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o})(t,n,r),decode:e=>((t,e,r,n)=>{const i={};for(let t=0;t<e.length;++t)i[e[t]]=t;let o=t.length;for(;"="===t[o-1];)--o;const s=new Uint8Array(o*r/8|0);let a=0,u=0,h=0;for(let e=0;e<o;++e){const o=i[t[e]];if(void 0===o)throw new SyntaxError(`Non-${n} character`);u=u<<r|o,a+=r,a>=8&&(a-=8,s[h++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)}),S=M({prefix:"\0",name:"identity",encode:t=>{return e=t,(new TextDecoder).decode(e);var e},decode:t=>(t=>(new TextEncoder).encode(t))(t)}),A=k({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),R=k({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),T=x({prefix:"9",name:"base10",alphabet:"0123456789"}),N=k({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),B=k({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),O=k({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),U=k({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),C=k({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),L=k({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),I=k({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),P=k({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),j=k({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),D=k({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),F=k({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),q=x({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),z=x({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$=x({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),H=x({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),W=k({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),G=k({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),V=k({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Z=k({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var J=Math.pow(2,31),K=Math.pow(2,7),X=Math.pow(2,14),Y=Math.pow(2,21),Q=Math.pow(2,28),tt=Math.pow(2,35),et=Math.pow(2,42),rt=Math.pow(2,49),nt=Math.pow(2,56),it=Math.pow(2,63),ot=function t(e,r,n){r=r||[];for(var i=n=n||0;e>=J;)r[n++]=255&e|128,e/=128;for(;-128&e;)r[n++]=255&e|128,e>>>=7;return r[n]=0|e,t.bytes=n-i+1,r},st=function(t){return t<K?1:t<X?2:t<Y?3:t<Q?4:t<tt?5:t<et?6:t<rt?7:t<nt?8:t<it?9:10};const at=(t,e,r=0)=>(ot(t,e,r),e),ut=t=>st(t),ht=(t,e)=>{const r=e.byteLength,n=ut(t),i=n+ut(r),o=new Uint8Array(i+r);return at(t,o,0),at(r,o,n),o.set(e,i),new ct(t,r,e,o)};class ct{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}const ft=({name:t,code:e,encode:r})=>new lt(t,e,r);class lt{constructor(t,e,r){this.name=t,this.code=e,this.encode=r}digest(t){if(t instanceof Uint8Array){const e=this.encode(t);return e instanceof Uint8Array?ht(this.code,e):e.then((t=>ht(this.code,t)))}throw Error("Unknown type, must be binary type")}}const dt=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),pt=ft({name:"sha2-256",code:18,encode:dt("SHA-256")}),gt=ft({name:"sha2-512",code:19,encode:dt("SHA-512")}),mt=w,wt={code:0,name:"identity",encode:mt,digest:t=>ht(0,mt(t))},yt="raw",bt=85,vt=t=>w(t),_t=t=>w(t),Et=new TextEncoder,Mt=new TextDecoder,xt="json",kt=512,St=t=>Et.encode(JSON.stringify(t)),At=t=>JSON.parse(Mt.decode(t));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom"),Symbol.for("@ipld/js-cid/CID");const Rt={...n,...i,...o,...s,...a,...u,...h,...c,...f};function Tt(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const Nt=Tt("utf8","u",(t=>"u"+new TextDecoder("utf8").decode(t)),(t=>(new TextEncoder).encode(t.substring(1)))),Bt=Tt("ascii","a",(t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}),(t=>{t=t.substring(1);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}));var Ot={utf8:Nt,"utf-8":Nt,hex:Rt.base16,latin1:Bt,ascii:Bt,binary:Bt,...Rt}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=function(t,e){for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var __webpack_exports__={};!function(){__webpack_require__.d(__webpack_exports__,{Z:function(){return it}});var t=__webpack_require__(3550),e=__webpack_require__.n(t);let r=!1,n=!1;const i={debug:1,default:2,info:2,warning:3,error:4,off:5};let o=i.default,s=null;const a=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var u,h;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(u||(u={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(h||(h={}));const c="0123456789abcdef";class f{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==i[r]&&this.throwArgumentError("invalid log level name","logLevel",t),o>i[r]||console.log.apply(console,e)}debug(...t){this._log(f.levels.DEBUG,t)}info(...t){this._log(f.levels.INFO,t)}warn(...t){this._log(f.levels.WARNING,t)}makeError(t,e,r){if(n)return this.makeError("censored error",e,{});e||(e=f.errors.UNKNOWN_ERROR),r||(r={});const i=[];Object.keys(r).forEach((t=>{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t<e.length;t++)r+=c[e[t]>>4],r+=c[15&e[t]];i.push(t+"=Uint8Array(0x"+r+")")}else i.push(t+"="+JSON.stringify(e))}catch(e){i.push(t+"="+JSON.stringify(r[t].toString()))}})),i.push(`code=${e}`),i.push(`version=${this.version}`);const o=t;let s="";switch(e){case h.NUMERIC_FAULT:{s="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":s+="-"+e;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case h.CALL_EXCEPTION:case h.INSUFFICIENT_FUNDS:case h.MISSING_NEW:case h.NONCE_EXPIRED:case h.REPLACEMENT_UNDERPRICED:case h.TRANSACTION_REPLACED:case h.UNPREDICTABLE_GAS_LIMIT:s=e}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(t+=" ("+i.join(", ")+")");const a=new Error(t);return a.reason=o,a.code=e,Object.keys(r).forEach((function(t){a[t]=r[t]})),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,f.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),a&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:a})}checkSafeUint53(t,e){"number"==typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,f.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,f.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",f.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",f.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return s||(s=new f("logger/5.6.0")),s}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),r){if(!t)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}n=!!t,r=!!e}static setLogLevel(t){const e=i[t.toLowerCase()];null!=e?o=e:f.globalLogger().warn("invalid log level - "+t)}static from(t){return new f(t)}}f.errors=h,f.levels=u;const l=new f("bytes/5.6.1");function d(t){return!!t.toHexString}function p(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return p(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function g(t){return"number"==typeof t&&t==t&&t%1==0}function m(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t)return!1;if(!g(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const r=t[e];if(!g(r)||r<0||r>=256)return!1}return!0}function w(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const y="0123456789abcdef";function b(t,e){if(e||(e={}),"number"==typeof t){l.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=y[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"==typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),d(t))return t.toHexString();if(w(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":l.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(m(t)){let e="0x";for(let r=0;r<t.length;r++){let n=t[r];e+=y[(240&n)>>4]+y[15&n]}return e}return l.throwArgumentError("invalid hexlify value","value",t)}function v(t,e){for("string"!=typeof t?t=b(t):w(t)||l.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&l.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}const _="bignumber/5.6.2";var E=e().BN;const M=new f(_),x={},k=9007199254740991;let S=!1;class A{constructor(t,e){t!==x&&M.throwError("cannot call constructor directly; use BigNumber.from",f.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return T(N(this).fromTwos(t))}toTwos(t){return T(N(this).toTwos(t))}abs(){return"-"===this._hex[0]?A.from(this._hex.substring(1)):this}add(t){return T(N(this).add(N(t)))}sub(t){return T(N(this).sub(N(t)))}div(t){return A.from(t).isZero()&&B("division-by-zero","div"),T(N(this).div(N(t)))}mul(t){return T(N(this).mul(N(t)))}mod(t){const e=N(t);return e.isNeg()&&B("division-by-zero","mod"),T(N(this).umod(e))}pow(t){const e=N(t);return e.isNeg()&&B("negative-power","pow"),T(N(this).pow(e))}and(t){const e=N(t);return(this.isNegative()||e.isNeg())&&B("unbound-bitwise-result","and"),T(N(this).and(e))}or(t){const e=N(t);return(this.isNegative()||e.isNeg())&&B("unbound-bitwise-result","or"),T(N(this).or(e))}xor(t){const e=N(t);return(this.isNegative()||e.isNeg())&&B("unbound-bitwise-result","xor"),T(N(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&B("negative-width","mask"),T(N(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&B("negative-width","shl"),T(N(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&B("negative-width","shr"),T(N(this).shrn(t))}eq(t){return N(this).eq(N(t))}lt(t){return N(this).lt(N(t))}lte(t){return N(this).lte(N(t))}gt(t){return N(this).gt(N(t))}gte(t){return N(this).gte(N(t))}isNegative(){return"-"===this._hex[0]}isZero(){return N(this).isZero()}toNumber(){try{return N(this).toNumber()}catch(t){B("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return M.throwError("this platform does not support BigInt",f.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?S||(S=!0,M.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?M.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.errors.UNEXPECTED_ARGUMENT,{}):M.throwError("BigNumber.toString does not accept parameters",f.errors.UNEXPECTED_ARGUMENT,{})),N(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof A)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new A(x,R(t)):t.match(/^-?[0-9]+$/)?new A(x,R(new E(t))):M.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&B("underflow","BigNumber.from",t),(t>=k||t<=-k)&&B("overflow","BigNumber.from",t),A.from(String(t));const e=t;if("bigint"==typeof e)return A.from(e.toString());if(m(e))return A.from(b(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"==typeof t)return A.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"==typeof t&&(w(t)||"-"===t[0]&&w(t.substring(1))))return A.from(t)}return M.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function R(t){if("string"!=typeof t)return R(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&M.throwArgumentError("invalid hex","value",t),"0x00"===(t=R(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function T(t){return A.from(R(t))}function N(t){const e=A.from(t).toHexString();return"-"===e[0]?new E("-"+e.substring(3),16):new E(e.substring(2),16)}function B(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),M.throwError(t,f.errors.NUMERIC_FAULT,n)}const O=new f(_),U={},C=A.from(0),L=A.from(-1);function I(t,e,r,n){const i={fault:e,operation:r};return void 0!==n&&(i.value=n),O.throwError(t,f.errors.NUMERIC_FAULT,i)}let P="0";for(;P.length<256;)P+=P;function j(t){if("number"!=typeof t)try{t=A.from(t).toNumber()}catch(t){}return"number"==typeof t&&t>=0&&t<=256&&!(t%1)?"1"+P.substring(0,t):O.throwArgumentError("invalid decimal size","decimals",t)}function D(t,e){null==e&&(e=0);const r=j(e),n=(t=A.from(t)).lt(C);n&&(t=t.mul(L));let i=t.mod(r).toString();for(;i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const o=t.div(r).toString();return t=1===r.length?o:o+"."+i,n&&(t="-"+t),t}function F(t,e){null==e&&(e=0);const r=j(e);"string"==typeof t&&t.match(/^-?[0-9.]+$/)||O.throwArgumentError("invalid decimal value","value",t);const n="-"===t.substring(0,1);n&&(t=t.substring(1)),"."===t&&O.throwArgumentError("missing value","value",t);const i=t.split(".");i.length>2&&O.throwArgumentError("too many decimal points","value",t);let o=i[0],s=i[1];for(o||(o="0"),s||(s="0");"0"===s[s.length-1];)s=s.substring(0,s.length-1);for(s.length>r.length-1&&I("fractional component exceeds decimals","underflow","parseFixed"),""===s&&(s="0");s.length<r.length-1;)s+="0";const a=A.from(o),u=A.from(s);let h=a.mul(r).add(u);return n&&(h=h.mul(L)),h}class q{constructor(t,e,r,n){t!==U&&O.throwError("cannot use FixedFormat constructor; use FixedFormat.from",f.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=e,this.width=r,this.decimals=n,this.name=(e?"":"u")+"fixed"+String(r)+"x"+String(n),this._multiplier=j(n),Object.freeze(this)}static from(t){if(t instanceof q)return t;"number"==typeof t&&(t=`fixed128x${t}`);let e=!0,r=128,n=18;if("string"==typeof t)if("fixed"===t);else if("ufixed"===t)e=!1;else{const i=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||O.throwArgumentError("invalid fixed format","format",t),e="u"!==i[1],r=parseInt(i[2]),n=parseInt(i[3])}else if(t){const i=(e,r,n)=>null==t[e]?n:(typeof t[e]!==r&&O.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,t[e]),t[e]);e=i("signed","boolean",e),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&O.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&O.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new q(U,e,r,n)}}class z{constructor(t,e,r,n){t!==U&&O.throwError("cannot use FixedNumber constructor; use FixedNumber.from",f.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=e,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(t){this.format.name!==t.format.name&&O.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}addUnsafe(t){this._checkFormat(t);const e=F(this._value,this.format.decimals),r=F(t._value,t.format.decimals);return z.fromValue(e.add(r),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);const e=F(this._value,this.format.decimals),r=F(t._value,t.format.decimals);return z.fromValue(e.sub(r),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);const e=F(this._value,this.format.decimals),r=F(t._value,t.format.decimals);return z.fromValue(e.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);const e=F(this._value,this.format.decimals),r=F(t._value,t.format.decimals);return z.fromValue(e.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=z.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(e=e.subUnsafe($.toFormat(e.format))),e}ceiling(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=z.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(e=e.addUnsafe($.toFormat(e.format))),e}round(t){null==t&&(t=0);const e=this.toString().split(".");if(1===e.length&&e.push("0"),(t<0||t>80||t%1)&&O.throwArgumentError("invalid decimal count","decimals",t),e[1].length<=t)return this;const r=z.from("1"+P.substring(0,t),this.format),n=H.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(t){return null==t?this._hex:(t%8&&O.throwArgumentError("invalid byte width","width",t),v(A.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString(),t/8))}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return z.fromString(this._value,t)}static fromValue(t,e,r){return null!=r||null==e||function(t){return null!=t&&(A.isBigNumber(t)||"number"==typeof t&&t%1==0||"string"==typeof t&&!!t.match(/^-?[0-9]+$/)||w(t)||"bigint"==typeof t||m(t))}(e)||(r=e,e=null),null==e&&(e=0),null==r&&(r="fixed"),z.fromString(D(t,e),q.from(r))}static fromString(t,e){null==e&&(e="fixed");const r=q.from(e),n=F(t,r.decimals);!r.signed&&n.lt(C)&&I("unsigned value cannot be negative","overflow","value",t);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=v(i,r.width/8));const o=D(n,r.decimals);return new z(U,i,o,r)}static fromBytes(t,e){null==e&&(e="fixed");const r=q.from(e);if(function(t,e){if(e||(e={}),"number"==typeof t){l.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),p(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),d(t)&&(t=t.toHexString()),w(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":l.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let t=0;t<r.length;t+=2)n.push(parseInt(r.substring(t,t+2),16));return p(new Uint8Array(n))}return m(t)?p(new Uint8Array(t)):l.throwArgumentError("invalid arrayify value","value",t)}(t).length>r.width/8)throw new Error("overflow");let n=A.from(t);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=D(n,r.decimals);return new z(U,i,o,r)}static from(t,e){if("string"==typeof t)return z.fromString(t,e);if(m(t))return z.fromBytes(t,e);try{return z.fromValue(t,0,e)}catch(t){if(t.code!==f.errors.INVALID_ARGUMENT)throw t}return O.throwArgumentError("invalid FixedNumber value","value",t)}static isFixedNumber(t){return!(!t||!t._isFixedNumber)}}const $=z.from(1),H=z.from("0.5"),W=new f("units/5.6.1"),G=["wei","kwei","mwei","gwei","szabo","finney","ether"];function V(t,e){if("string"==typeof e){const t=G.indexOf(e);-1!==t&&(e=3*t)}return D(t,null!=e?e:18)}function Z(t,e){if("string"!=typeof t&&W.throwArgumentError("value must be a string","value",t),"string"==typeof e){const t=G.indexOf(e);-1!==t&&(e=3*t)}return F(t,null!=e?e:18)}__webpack_require__(5140);var J=__webpack_require__(7936),K=__webpack_require__(8395),X=__webpack_require__.n(K);class Y{#r={};#n={};constructor(){return this.#i()}#o(t=peernet.id){return{sender:t,call:this.execute,staticCall:this.get.bind(this)}}async#i(){try{let t=[contractStore.get(X().contractFactory),contractStore.get(X().nativeToken),contractStore.get(X().validators),contractStore.get(X().nameService)];t=await Promise.all(t);for(const e of t){const t=new J.ContractMessage(new Uint8Array(e.buffer,e.buffer.byteOffset,e.buffer.byteLength));await this.#s(t)}}catch(t){console.log(t)}return this}async#s(t){const e=t.decoded.constructorParameters;try{const r=new Function((new TextDecoder).decode(t.decoded.contract))();globalThis.msg=this.#o(t.decoded.creator),this.#r[t.hash]=new r(...e),debug(`loaded contract: ${t.hash}`),debug(`size: ${Math.round(t.encoded.length/1024*100)/100} kb`)}catch(e){console.log(e),console.warn(`removing contract ${t.hash}`),await contractStore.delete(t.hash,t.encoded)}}async addContract(t){if(!await contractStore.has(t.hash))return await contractStore.put(t.hash,t.encoded),await this.#s(t),t.hash;throw new Error("duplicate contract")}async execute(t,e,r){try{let n;return n=this.#r[t].fallback?this.#r[t].fallback(e,r):await this.#r[t][e](...r),n}catch(t){throw t}}addJob(t,e,r,n,i){if(this.#n[n]||(this.#n[n]=i),i===this.#n[n]+1)return this.#r[t][e](...r)}get(t,e,r){let n;return n=r?.length>0?this.#r[t][e](...r):this.#r[t][e],n}async delete(t){return contractStore.delete(t)}async deleteAll(){let t=await contractStore.get();return t=Object.keys(t).map((t=>this.delete(t))),Promise.all(t)}}globalThis.BigNumber=A;const{ContractMessage:Q,TransactionMessage:tt,BlockMessage:et,BWMessage:rt,BWRequestMessage:nt}=X();class it{#a=[];#u=[];#h;#c=!1;#f={index:0,previousHash:"0x0"};constructor(){return this.#i()}get lib(){return X()}get lastBlock(){return this.#f}get nativeToken(){return X().nativeToken}get validators(){return[...this.#a]}get blocks(){return[...this.#u]}async hasTransactionToHandle(){return await transactionPoolStore.size()>0}async#l(){if(!(await this.staticCall(X().validators,"validators"))[peernet.id]?.active)return;this.#c=!0;const t=(new Date).getTime();await this.#d();const e=(new Date).getTime();if(console.log((e-t)/1e3+" s"),await this.hasTransactionToHandle())return this.#l();this.#c=!1}async#p(){await contractStore.put(X().contractFactory,X().contractFactoryMessage),await contractStore.put(X().nativeToken,X().nativeTokenMessage),await contractStore.put(X().validators,X().validatorsMessage),await contractStore.put(X().nameService,X().nameServiceMessage),console.log("handle native contracts")}async#g(){let t=[];for(const e of peernet.connections)if(e.peerId!==this.id){let r=new peernet.protos["peernet-request"]({request:"lastBlock"});const n=await peernet.prepareMessage(id,r.encoded);t.push(e.request(n.encoded))}t=await Promise.allSettled(t),t=t.reduce(((t,e)=>(console.log({c:e}),e.index>t.index&&(t.index=e.index,t.hash=e.hash),t)),{index:0,hash:"0x0"})}async#i(){this.participants=[],await contractStore.has(X().contractFactory)||await this.#p(),this.#h=await new Y,this.utils={BigNumber:A,formatUnits:V,parseUnits:Z};try{let t=await chainStore.get("lastBlock");t=await peernet.get((new TextDecoder).decode(t)),t=new et(t),this.#f={...t.decoded,hash:t.hash}}catch(t){await this.#g()}return await peernet.addRequestHandler("bw-request-message",(()=>new rt(peernet.client.bw)||{up:0,down:0})),await peernet.addRequestHandler("lastBlock",this.#m.bind(this)),peernet.subscribe("add-block",this.#w.bind(this)),peernet.subscribe("add-transaction",(async t=>{try{if(t=new tt(t),await transactionPoolStore.put(t.hash,t.encoded),await this.hasTransactionToHandle()&&!this.#c)return this.#l()}catch(t){throw Error("invalid transaction")}})),pubsub.subscribe("peer:connected",this.#y.bind(this)),await this.resolveBlocks(),this}async#y(t){let e=new peernet.protos["peernet-request"]({request:"lastBlock"});e=await peernet.prepareMessage(t.id,e.encoded);let r=await t.request(e.encoded);r=new Uint8Array(Object.values(r));const n=new globalThis.peernet.protos["peernet-message"](r);r=new globalThis.peernet.protos["peernet-response"](n.decoded.data);let i=JSON.parse((new TextDecoder).decode(r.decoded.response));if(!this.lastBlock||this.lastBlock.index<i.index){const t=this.lastBlock?this.lastBlock.index:0,e=i.index;await this.resolveBlock(i.hash),this.#f=this.#u[this.#u.length-1],console.log({lastBlock:this.#f}),console.log(this.#u);let r=t>0?t-e:e;r+=1,debug(`synced ${r} ${r>1?"blocks":"block"}`),this.#u.length,this.#u.length,await this.#b(this.#u);const n=new et(this.lastBlock);await blockStore.put(n.hash,n.encoded),await chainStore.put("lastBlock",(new TextEncoder).encode(this.lastBlock.hash))}}async#m(){return new peernet.protos["peernet-response"]({response:(new TextEncoder).encode(JSON.stringify({hash:this.lastBlock?.hash,index:this.lastBlock?.index}))})}async resolveBlock(t){let e=await peernet.get(t,"block");await peernet.has(t,"block")||await peernet.put(t,e,"block"),e=await new et(e);const r=e.encoded.length||e.encoded.byteLength;if(e={...e.decoded,hash:t},this.#u[e.index]=e,console.log(`loaded block: ${t} @${e.index} ${Math.round(r/1024/1024*100)/100} mb`),0!==e.index)return this.resolveBlock(e.previousHash)}async resolveBlocks(){try{const t=await chainStore.get("lastBlock");"0x0"!==(new TextDecoder).decode(t)&&await this.resolveBlock((new TextDecoder).decode(t)),this.#f=this.#u[this.#u.length-1],await this.#b(this.#u)}catch(t){return await chainStore.put("lastBlock",(new TextEncoder).encode("0x0")),this.resolveBlocks()}}async#b(t){for(const e of t)if(!e.loaded){for(const t of e.transactions)try{await this.#h.execute(t.to,t.method,t.params)}catch(t){console.log(t)}e.loaded=!0}}async#v({hash:t,from:e,to:r,method:n,params:i,nonce:o}){try{let s=await this.#h.execute(r,n,i,e,o);return pubsub.publish(`transaction.completed.${t}`,{status:"fulfilled",hash:t}),s||"no state change"}catch(e){throw pubsub.publish(`transaction.completed.${t}`,{status:"fail",hash:t,error:e}),e}}async#w(t){const e=new et(t);await Promise.all(e.decoded.transactions.map((t=>transactionPoolStore.delete(t.hash)))),this.#f={hash:e.hash,...e.decoded},await blockStore.put(e.hash,e.encoded),await chainStore.put("lastBlock",(new TextEncoder).encode(e.hash)),debug(`added block: ${e.hash}`);let r=[],n=[];for(let t of e.decoded.transactions)-1===n.indexOf(t.to)&&n.push(t.to),r.push(this.#v(t));try{r=await Promise.allSettled(r),pubsub.publish("block-processed",e.decoded)}catch(t){console.log(t)}}async participate(){if(await this.staticCall(X().validators,"has",[peernet.id])||await this.createTransactionFrom(peernet.id,X().validators,"addValidator",[peernet.id]),await this.hasTransactionToHandle()&&!this.#c)return this.#l()}calculateFee(t){return t.decoded.to===X().validators?0:t.encoded.length/1024/1e-6}async#d(){let t=await transactionPoolStore.get();if(0===Object.keys(t)?.length)return;let e={transactions:[],validators:[],fees:0},r=[];for(let n of Object.values(t))n=new tt(new Uint8Array(n,n.byteOffset,n.byteLength)),e.fees+=Number(X().calculateFee(n)),r.push({...n.decoded,hash:n.hash});t=r.sort(((t,e)=>t.nonce-e.nonce)),r=[];for(let n of t)try{await this.#v(n),r.push(n)}catch(t){n=new tt(n),e.fees-=Number(X().calculateFee(n)),await transactionPoolStore.delete(n.hash)}if(t=r,0===t.length)return;e.transactions=t;const n=await this.staticCall(X().validators,"validators");console.log({validators:n});const i={};for(const t of peernet.peerEntries)i[t[0]]=t[1];for(const t of Object.keys(n))if(n[t].active){const r=i[t];if(r&&r.connected){let n=new nt;const i=await peernet.prepareMessage(t,n.encoded);try{const n=await r.request(i.encoded);console.log(n),e.validators.push({address:t,bw:n.up+n.down})}catch(t){}}else peernet.id===t&&e.validators.push({address:peernet.id,bw:peernet.bw.up+peernet.bw.down})}console.log(e.validators),e.reward=150,e.validators=e.validators.map((t=>(t.reward=String(Number(e.fees)+e.reward/e.validators.length),delete t.bw,t))),e.index=this.lastBlock?.index,void 0===e.index?e.index=0:e.index+=1,e.previousHash=this.lastBlock?.hash||"0x0",e.timestamp=(new Date).getTime();const o=String(e.fees).split(".");let s=0;if(o[1]){const t=o[1].split("e");t[0]!==o[1]?(o[1]=t[0],s=Number(t[1]?.replace(/\-|\+/g,""))+Number(t[0].length)):s=o[1].length}e.fees=Number.parseFloat(String(e.fees)).toFixed(s);try{let t=new et(e);this.#f={...e,hash:t.hash},peernet.publish("add-block",t.encoded),this.#w(t.encoded)}catch(t){throw Error(`invalid block ${e}`)}}async getNonce(t){let e=await transactionPoolStore.get();if(e=Object.keys(e).map((t=>new tt(e[t]))),e=e.filter((e=>e.decoded.from===t)),e=e.map((t=>({...t.decoded,hash:t.hash}))),this.lastBlock&&0===e.length){let r=await peernet.get(this.lastBlock.hash);for(r=new et(r),e=e.filter((e=>e.from===t));0===e.length&&0!==r.decoded.index;)r=await blockStore.get(r.decoded.previousHash),r=new et(r),e=r.decoded.transactions.filter((e=>e.from===t))}return 0===e.length?0:(e=e.sort(((t,e)=>t.timestamp-e.timestamp)),e[e.length-1].nonce)}createTransaction(t,e,r,n){return this.createTransactionFrom(peernet.id,t,e,r,n)}async createTransactionFrom(t,e,r,n,i){void 0===i&&(i=await this.getNonce(t),i+=1);let o=new tt({timestamp:(new Date).getTime(),from:t,to:e,nonce:i,method:r,params:n});try{await transactionPoolStore.put(o.hash,o.encoded),peernet.publish("add-transaction",o.encoded)}catch(t){throw t}return await this.hasTransactionToHandle()&&!this.#c&&this.#l(),{hash:o.hash,data:void 0,fee:X().calculateFee(o),wait:()=>new Promise(((t,e)=>{const r=n=>{"fulfilled"===n.status?t(n.hash):e({hash:n.hash,error:n.error}),pubsub.unsubscribe(`transaction.completed.${o.hash}`,r)};pubsub.subscribe(`transaction.completed.${o.hash}`,r)}))}}async createContractMessage(t,e,r=[]){return new Q({creator:t,contract:e,constructorParameters:r})}async createContractAddress(t,e,r=[]){return this.createContractMessage(t,e,r).hash}async deployContract(t,e=[]){globalThis.msg={sender:peernet.id,call:this.call};const r=await this.createContractAddress(creator,t,e);try{await this.createTransactionFrom(peernet.id,X().contractFactory,"deployContract",[r,creator,t,constructorParameters])}catch(t){throw t}return this.#h.addContract(message)}#o(t=peernet.id){return{sender:peernet.id,call:this.call,staticCall:this.staticCall,delegate:this.delegate,staticDelegate:this.staticDelegate}}internalCall(t,e,r,n){return globalThis.msg=this.#o(t),this.#h.execute(e,r,n)}call(t,e,r){return globalThis.msg=this.#o(),this.#h.execute(t,e,r)}staticCall(t,e,r){return globalThis.msg=this.#o(),this.#h.get(t,e,r)}delegate(t,e,r){return globalThis.msg=this.#o(),this.#h.execute(t,e,r)}staticDelegate(t,e,r){return globalThis.msg=this.#o(),this.#h.get(t,e,r)}mint(t,e){return this.call(X().nativeToken,"mint",[t,e])}transfer(t,e,r){return this.call(X().nativeToken,"transfer",[t,e,r])}get balances(){return this.staticCall(X().nativeToken,"balances")}deleteAll(){return this.#h.deleteAll()}lookup(t){return this.call(X().nameService,"lookup",[t])}}}();var __webpack_exports__default=__webpack_exports__.Z;export{__webpack_exports__default as default};