@leofcoin/chain 1.0.16 → 1.0.19

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 (149) hide show
  1. package/dist/chain.browser.js +15520 -13164
  2. package/dist/chain.browser.min.js +1 -1
  3. package/dist/node.browser.js +54031 -54121
  4. package/dist/node.browser.min.js +1 -1
  5. package/docs/@leofcoin/chain/1.0.16/chain.js.html +738 -0
  6. package/docs/@leofcoin/chain/1.0.16/contracts_factory.js.html +182 -0
  7. package/docs/@leofcoin/chain/1.0.16/contracts_nameService.js.html +231 -0
  8. package/docs/@leofcoin/chain/1.0.16/contracts_proxies_factoryProxy.js.html +135 -0
  9. package/docs/@leofcoin/chain/1.0.16/contracts_proxies_nameServiceProxy.js.html +135 -0
  10. package/docs/@leofcoin/chain/1.0.16/contracts_proxies_nativeTokenProxy.js.html +135 -0
  11. package/docs/@leofcoin/chain/1.0.16/contracts_proxies_validatorsProxy.js.html +135 -0
  12. package/docs/@leofcoin/chain/1.0.16/contracts_proxies_votingProxy.js.html +135 -0
  13. package/docs/@leofcoin/chain/1.0.16/contracts_validators.js.html +242 -0
  14. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Bold-webfont.eot +0 -0
  15. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Bold-webfont.svg +1830 -0
  16. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Bold-webfont.woff +0 -0
  17. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  18. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  19. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  20. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Italic-webfont.eot +0 -0
  21. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Italic-webfont.svg +1830 -0
  22. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Italic-webfont.woff +0 -0
  23. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Light-webfont.eot +0 -0
  24. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Light-webfont.svg +1831 -0
  25. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Light-webfont.woff +0 -0
  26. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  27. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  28. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  29. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Regular-webfont.eot +0 -0
  30. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Regular-webfont.svg +1831 -0
  31. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Regular-webfont.woff +0 -0
  32. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Semibold-webfont.eot +0 -0
  33. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Semibold-webfont.svg +1830 -0
  34. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  35. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-Semibold-webfont.woff +0 -0
  36. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  37. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-SemiboldItalic-webfont.svg +1830 -0
  38. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  39. package/docs/@leofcoin/chain/1.0.16/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  40. package/docs/@leofcoin/chain/1.0.16/global.html +1153 -0
  41. package/docs/@leofcoin/chain/1.0.16/icons/home.svg +4 -0
  42. package/docs/@leofcoin/chain/1.0.16/icons/search.svg +4 -0
  43. package/docs/@leofcoin/chain/1.0.16/index.html +125 -0
  44. package/docs/@leofcoin/chain/1.0.16/machine.js.html +251 -0
  45. package/docs/@leofcoin/chain/1.0.16/scripts/linenumber.js +23 -0
  46. package/docs/@leofcoin/chain/1.0.16/scripts/pagelocation.js +89 -0
  47. package/docs/@leofcoin/chain/1.0.16/standards_roles.js.html +188 -0
  48. package/docs/@leofcoin/chain/1.0.16/standards_token.js.html +260 -0
  49. package/docs/@leofcoin/chain/1.0.16/styles/collapse.css +27 -0
  50. package/docs/@leofcoin/chain/1.0.16/styles/jsdoc-default.css +953 -0
  51. package/docs/@leofcoin/chain/1.0.16/styles/prettify-jsdoc.css +111 -0
  52. package/docs/@leofcoin/chain/1.0.16/styles/prettify-tomorrow.css +138 -0
  53. package/docs/@leofcoin/chain/1.0.17/chain.js.html +738 -0
  54. package/docs/@leofcoin/chain/1.0.17/contracts_factory.js.html +182 -0
  55. package/docs/@leofcoin/chain/1.0.17/contracts_nameService.js.html +231 -0
  56. package/docs/@leofcoin/chain/1.0.17/contracts_proxies_factoryProxy.js.html +135 -0
  57. package/docs/@leofcoin/chain/1.0.17/contracts_proxies_nameServiceProxy.js.html +135 -0
  58. package/docs/@leofcoin/chain/1.0.17/contracts_proxies_nativeTokenProxy.js.html +135 -0
  59. package/docs/@leofcoin/chain/1.0.17/contracts_proxies_validatorsProxy.js.html +135 -0
  60. package/docs/@leofcoin/chain/1.0.17/contracts_proxies_votingProxy.js.html +135 -0
  61. package/docs/@leofcoin/chain/1.0.17/contracts_validators.js.html +242 -0
  62. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Bold-webfont.eot +0 -0
  63. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Bold-webfont.svg +1830 -0
  64. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Bold-webfont.woff +0 -0
  65. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  66. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  67. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  68. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Italic-webfont.eot +0 -0
  69. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Italic-webfont.svg +1830 -0
  70. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Italic-webfont.woff +0 -0
  71. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Light-webfont.eot +0 -0
  72. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Light-webfont.svg +1831 -0
  73. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Light-webfont.woff +0 -0
  74. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  75. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  76. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  77. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Regular-webfont.eot +0 -0
  78. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Regular-webfont.svg +1831 -0
  79. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Regular-webfont.woff +0 -0
  80. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Semibold-webfont.eot +0 -0
  81. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Semibold-webfont.svg +1830 -0
  82. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  83. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-Semibold-webfont.woff +0 -0
  84. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  85. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-SemiboldItalic-webfont.svg +1830 -0
  86. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  87. package/docs/@leofcoin/chain/1.0.17/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  88. package/docs/@leofcoin/chain/1.0.17/global.html +1153 -0
  89. package/docs/@leofcoin/chain/1.0.17/icons/home.svg +4 -0
  90. package/docs/@leofcoin/chain/1.0.17/icons/search.svg +4 -0
  91. package/docs/@leofcoin/chain/1.0.17/index.html +125 -0
  92. package/docs/@leofcoin/chain/1.0.17/machine.js.html +251 -0
  93. package/docs/@leofcoin/chain/1.0.17/scripts/linenumber.js +23 -0
  94. package/docs/@leofcoin/chain/1.0.17/scripts/pagelocation.js +89 -0
  95. package/docs/@leofcoin/chain/1.0.17/standards_roles.js.html +188 -0
  96. package/docs/@leofcoin/chain/1.0.17/standards_token.js.html +260 -0
  97. package/docs/@leofcoin/chain/1.0.17/styles/collapse.css +27 -0
  98. package/docs/@leofcoin/chain/1.0.17/styles/jsdoc-default.css +953 -0
  99. package/docs/@leofcoin/chain/1.0.17/styles/prettify-jsdoc.css +111 -0
  100. package/docs/@leofcoin/chain/1.0.17/styles/prettify-tomorrow.css +138 -0
  101. package/docs/@leofcoin/chain/1.0.18/chain.js.html +738 -0
  102. package/docs/@leofcoin/chain/1.0.18/contracts_factory.js.html +182 -0
  103. package/docs/@leofcoin/chain/1.0.18/contracts_nameService.js.html +231 -0
  104. package/docs/@leofcoin/chain/1.0.18/contracts_proxies_factoryProxy.js.html +135 -0
  105. package/docs/@leofcoin/chain/1.0.18/contracts_proxies_nameServiceProxy.js.html +135 -0
  106. package/docs/@leofcoin/chain/1.0.18/contracts_proxies_nativeTokenProxy.js.html +135 -0
  107. package/docs/@leofcoin/chain/1.0.18/contracts_proxies_validatorsProxy.js.html +135 -0
  108. package/docs/@leofcoin/chain/1.0.18/contracts_proxies_votingProxy.js.html +135 -0
  109. package/docs/@leofcoin/chain/1.0.18/contracts_validators.js.html +242 -0
  110. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Bold-webfont.eot +0 -0
  111. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Bold-webfont.svg +1830 -0
  112. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Bold-webfont.woff +0 -0
  113. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  114. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  115. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  116. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Italic-webfont.eot +0 -0
  117. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Italic-webfont.svg +1830 -0
  118. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Italic-webfont.woff +0 -0
  119. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Light-webfont.eot +0 -0
  120. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Light-webfont.svg +1831 -0
  121. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Light-webfont.woff +0 -0
  122. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  123. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  124. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  125. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Regular-webfont.eot +0 -0
  126. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Regular-webfont.svg +1831 -0
  127. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Regular-webfont.woff +0 -0
  128. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Semibold-webfont.eot +0 -0
  129. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Semibold-webfont.svg +1830 -0
  130. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  131. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-Semibold-webfont.woff +0 -0
  132. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  133. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-SemiboldItalic-webfont.svg +1830 -0
  134. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  135. package/docs/@leofcoin/chain/1.0.18/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  136. package/docs/@leofcoin/chain/1.0.18/global.html +1153 -0
  137. package/docs/@leofcoin/chain/1.0.18/icons/home.svg +4 -0
  138. package/docs/@leofcoin/chain/1.0.18/icons/search.svg +4 -0
  139. package/docs/@leofcoin/chain/1.0.18/index.html +125 -0
  140. package/docs/@leofcoin/chain/1.0.18/machine.js.html +251 -0
  141. package/docs/@leofcoin/chain/1.0.18/scripts/linenumber.js +23 -0
  142. package/docs/@leofcoin/chain/1.0.18/scripts/pagelocation.js +89 -0
  143. package/docs/@leofcoin/chain/1.0.18/standards_roles.js.html +188 -0
  144. package/docs/@leofcoin/chain/1.0.18/standards_token.js.html +260 -0
  145. package/docs/@leofcoin/chain/1.0.18/styles/collapse.css +27 -0
  146. package/docs/@leofcoin/chain/1.0.18/styles/jsdoc-default.css +953 -0
  147. package/docs/@leofcoin/chain/1.0.18/styles/prettify-jsdoc.css +111 -0
  148. package/docs/@leofcoin/chain/1.0.18/styles/prettify-tomorrow.css +138 -0
  149. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see chain.browser.min.js.LICENSE.txt */
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){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"})}}class u 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"})}}class h 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"})}}class c 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"})}}class f extends i.FormatInterface{get keys(){return[]}constructor(t){super(t,s.default("\n\nmessage BWRequestMessage {\n}\n").BWRequestMessage,{name:"bw-request-message"})}}var l={ContractMessage:a,TransactionMessage:u,BlockMessage:h,BWMessage:c,BWRequestMessage:f};t.exports=l},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};
2
+ var __webpack_modules__={395:function(t,e,r){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(r(676)),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{ContractMessage:s,TransactionMessage:a,BlockMessage:h,BWMessage:u,BWRequestMessage:f}=i.default,{contractFactory:c,nativeToken:l,nameService:d,validators:p}={contractFactory:"ba5xdads6vcjiwvf34npzh6xrlaivpjgtp3mit3hwhxeumybwspjrhez3e",nativeToken:"ba5xdadfmb6fw42j2paz734pubzwxn7rgiwwmgs3dcicr4u2ekhqevqvcu",nameService:"ba5xdadsx73i3tkuk6q5bz4mm5zcgqipha3szmuixgit46albm2inuarp6",validators:"ba5xdac7kvy3cjka4aex7bz7w6ryqxgfbmwstomseyonytbssl7sleriud"},g=new Uint8Array(o.contractFactory.split(",")),m=new Uint8Array(o.nativeToken.split(",")),y=new Uint8Array(o.nameService.split(",")),w=new Uint8Array(o.validators.split(",")),b=t=>{if(t.decoded.to===p)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 v={nativeToken:l,nameService:d,contractFactory:c,validators:p,contractFactoryMessage:g,nativeTokenMessage:m,nameServiceMessage:y,validatorsMessage:w,TransactionMessage:a,ContractMessage:s,BlockMessage:h,BWMessage:u,BWRequestMessage:f,calculateFee:b,calculateTransactionFee:t=>(t=new a(t),b(t))};t.exports=v},676:function(t,e,r){r.r(e),r.d(e,{default:function(){return h}});var n=r(764).Buffer,i=r(158),o={7187: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 h(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,o,s,u;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=h(t))>0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,u=f,console&&console.warn&&console.warn(u)}return t}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 c(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.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 h(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 h=o[t];if(void 0===h)return!1;if("function"==typeof h)n(h,this,e);else{var u=h.length,f=p(h,u);for(r=0;r<u;++r)n(f[r],this,e)}return!0},o.prototype.addListener=function(t,e){return u(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return u(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,c(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,c(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):[]}},5717: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:(t,e,r)=>{t.exports=r(6066)(r(9653))},6066:(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:(t,e,r)=>{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:(t,e,r)=>{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:(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],h=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],c=t[8]^t[18]^t[28]^t[38]^t[48],l=t[9]^t[19]^t[29]^t[39]^t[49];let d=c^(o<<1|s>>>31),p=l^(s<<1|o>>>31);const g=t[0]^d,m=t[1]^p,y=t[10]^d,w=t[11]^p,b=t[20]^d,v=t[21]^p,E=t[30]^d,_=t[31]^p,M=t[40]^d,x=t[41]^p;d=n^(a<<1|h>>>31),p=i^(h<<1|a>>>31);const S=t[2]^d,k=t[3]^p,A=t[12]^d,T=t[13]^p,R=t[22]^d,B=t[23]^p,N=t[32]^d,O=t[33]^p,U=t[42]^d,C=t[43]^p;d=o^(u<<1|f>>>31),p=s^(f<<1|u>>>31);const I=t[4]^d,L=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^(c<<1|l>>>31),p=h^(l<<1|c>>>31);const W=t[6]^d,V=t[7]^p,G=t[16]^d,Z=t[17]^p,J=t[26]^d,K=t[27]^p,Y=t[36]^d,X=t[37]^p,Q=t[46]^d,tt=t[47]^p;d=u^(n<<1|i>>>31),p=f^(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,ht=t[39]^p,ut=t[48]^d,ft=t[49]^p,ct=g,lt=m,dt=w<<4|y>>>28,pt=y<<4|w>>>28,gt=b<<3|v>>>29,mt=v<<3|b>>>29,yt=_<<9|E>>>23,wt=E<<9|_>>>23,bt=M<<18|x>>>14,vt=x<<18|M>>>14,Et=S<<1|k>>>31,_t=k<<1|S>>>31,Mt=T<<12|A>>>20,xt=A<<12|T>>>20,St=R<<10|B>>>22,kt=B<<10|R>>>22,At=O<<13|N>>>19,Tt=N<<13|O>>>19,Rt=U<<2|C>>>30,Bt=C<<2|U>>>30,Nt=L<<30|I>>>2,Ot=I<<30|L>>>2,Ut=P<<6|j>>>26,Ct=j<<6|P>>>26,It=F<<11|D>>>21,Lt=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|V>>>4,zt=V<<28|W>>>4,$t=Z<<23|G>>>9,Ht=G<<23|Z>>>9,Wt=J<<25|K>>>7,Vt=K<<25|J>>>7,Gt=Y<<21|X>>>11,Zt=X<<21|Y>>>11,Jt=tt<<24|Q>>>8,Kt=Q<<24|tt>>>8,Yt=et<<27|rt>>>5,Xt=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|ht>>>24,ie=ht<<8|at>>>24,oe=ut<<14|ft>>>18,se=ft<<14|ut>>>18;t[0]=ct^~Mt&It,t[1]=lt^~xt&Lt,t[10]=qt^~Qt&gt,t[11]=zt^~te&mt,t[20]=Et^~Ut&Wt,t[21]=_t^~Ct&Vt,t[30]=Yt^~dt&St,t[31]=Xt^~pt&kt,t[40]=Nt^~$t&ee,t[41]=Ot^~Ht&re,t[2]=Mt^~It&Gt,t[3]=xt^~Lt&Zt,t[12]=Qt^~gt&At,t[13]=te^~mt&Tt,t[22]=Ut^~Wt&ne,t[23]=Ct^~Vt&ie,t[32]=dt^~St&Pt,t[33]=pt^~kt&jt,t[42]=$t^~ee&yt,t[43]=Ht^~re&wt,t[4]=It^~Gt&oe,t[5]=Lt^~Zt&se,t[14]=gt^~At&Dt,t[15]=mt^~Tt&Ft,t[24]=Wt^~ne&bt,t[25]=Vt^~ie&vt,t[34]=St^~Pt&Jt,t[35]=kt^~jt&Kt,t[44]=ee^~yt&Rt,t[45]=re^~wt&Bt,t[6]=Gt^~oe&ct,t[7]=Zt^~se&lt,t[16]=At^~Dt&qt,t[17]=Tt^~Ft&zt,t[26]=ne^~bt&Et,t[27]=ie^~vt&_t,t[36]=Pt^~Jt&Yt,t[37]=jt^~Kt&Xt,t[46]=yt^~Rt&Nt,t[47]=wt^~Bt&Ot,t[8]=oe^~ct&Mt,t[9]=se^~lt&xt,t[18]=Dt^~qt&Qt,t[19]=Ft^~zt&te,t[28]=bt^~Et&Ut,t[29]=vt^~_t&Ct,t[38]=Jt^~Yt&dt,t[39]=Kt^~Xt&pt,t[48]=Rt^~Nt&$t,t[49]=Bt^~Ot&Ht,t[0]^=r[2*e],t[1]^=r[2*e+1]}}},9653:(t,e,r)=>{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:(t,e,r)=>{var n=r(7126),i=r(2565);t.exports=n,t.exports.parse=n,t.exports.stringify=i},7126:(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")},h=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(c(t));break;case"extensions":e.extensions=f(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(u(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},u=function(t){return{name:t[1],message:c(t)}},f=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}},c=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=h(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=y(t));break;default:throw new Error("Unexpected token in option: "+t[0])}}},y=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=y(t)),r[i]=o,";"===t[0]&&t.shift();break;case"{":if(t.shift(),o=y(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")},w=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(c(e));break;case"enum":s.enums.push(g(e));break;case"option":var h=m(e);if(s.options[h.name])throw new Error("Duplicate option "+h.name);s.options[h.name]=h.value;break;case"import":s.imports.push(w(e));break;case"extend":s.extends.push(u(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: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: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: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: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:(t,e,r)=>{t.exports={encode:r(7659),decode:r(8853),encodingLength:r(184)}},184: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),h=Math.pow(2,56),u=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<h?8:t<u?9:10}},7986:(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)}},h=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}},u=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 f=[],c={},l=[],d=[];for(var p=0;p<r.length;p++){const r=t.fields[p];c[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&&f.push(r.name),r.oneof&&l.push(r.name)}function g(t,e,r,i,a,h,u){const f=e.name;if(e.oneof){const t=Object.keys(r);for(var c=0;c<t.length;c++)if(l.indexOf(t[c])>-1){const e=o(t[c]);delete r[`has${e}`],delete r[`get${e}`],delete r[`set${e}`],delete r[`clear${e}`],delete r[t[c]]}}let d;if(t.message){const o=n.decode(i,h);h+=n.decode.bytes;const s=t.decode(i,a,h,h+o);e.map?(d=r[f]||{},d[s.key]=s.value):e.repeated?(d=r[f]||[],d.push(s)):d=s}else e.repeated?(d=r[f]||[],d.push(t.decode(i,a,h))):d=t.decode(i,a,h);return s(r,f,d),h+t.decode.bytes}return function e(o,p,m,y){if(null==m&&(m=0),null==y&&(y=o.length),!(y<=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 w,b=m,v={};;){if(y<=m){var E,_,M="",x=0;for(x=0;x<f.length;x++)if(M=f[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(w=t.fields[x],_=d[x][0],E=d[x][1],M=w.name,!Object.prototype.hasOwnProperty.call(v,M)){var S=!1;if(w.oneof)for(var k=Object.keys(v),A=0;A<k.length;A++)if(l.indexOf(k[A])>-1){S=!0;break}S||(E?w.repeated?_=[]:(_=_&&E[_]?E[_].value:E[Object.keys(E)[0]].value,_=parseInt(_||0,10)):(e=h(w),_=u(w,_)),s(v,M,_,e))}}return e.bytes=m-b,v}var T=n.decode(o,m);m+=n.decode.bytes;var R=c[T>>3];if(null!=R){var B=r[R];if((w=t.fields[R]).packed){var N=n.decode(o,m);for(N+=m+=n.decode.bytes;m<N;)m=g(B,w,v,o,p,m)}else m=g(B,w,v,o,p,m)}else m=a(7&T,o,0,m)}}}},9611:(t,e,r)=>{var n=r(3864).r,i=r(138);t.exports=function(t,e,r,o,s){const a=Object.keys(o),h=r.length,u={};for(let e=0;e<h;e++){u[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 f(t,e,r,n,o,s,a){let h=0;if(!s)for(h=0;h<n.length;h++)t[r++]=n[h];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(c,l,d,p=0){null==l&&(l=new Uint8Array(s(c))),null==d&&(d=new DataView(l.buffer,l.byteOffset,l.byteLength));const g=p,m=Object.keys(c);let y=0,w=!1;for(y=0;y<a.length;y++){const t=a[y],e=o[y];if(m.indexOf(e)>-1){if(w)throw new Error("only one of the properties defined in oneof "+t+" can be set");w=!0}}for(y=0;y<h;y++){const e=r[y],o=t.fields[y];let s=c[o.name],a=0;if(!n(s)){if(o.required)throw new Error(o.name+" is required");continue}const h=u[y].p,g=u[y].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++]=h[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=f(l,d,p,g,e,m,t))}else p=f(l,d,p,g,e,m,s)}return e.bytes=p-g,l}}},1216:(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(h){let u=0,f=0,c=0;for(f=0;f<o.length;f++){const t=o[f],e=r[t];let i=!1;for(c=0;c<e.length;c++)if(n(h[e[c]])){if(i)throw new Error("only one of the properties defined in oneof "+t+" can be set");i=!0}}for(f=0;f<s;f++){const r=e[f],o=t.fields[f];let s=h[o.name];const l=a[f];let d;if(n(s)){if(o.map){const t=Object.keys(s);for(c=0;c<t.length;c++)t[c]={key:t[c],value:s[t[c]]};s=t}if(o.packed){let t=0;for(c=0;c<s.length;c++)n(s[c])&&(d=r.encodingLength(s[c]),t+=d,r.message&&(t+=i.encodingLength(d)));t&&(u+=l+t+i.encodingLength(t))}else if(o.repeated)for(c=0;c<s.length;c++)n(s[c])&&(d=r.encodingLength(s[c]),u+=l+d+(r.message?i.encodingLength(d):0));else d=r.encodingLength(s),u+=l+d+(r.message?i.encodingLength(d):0)}else if(o.required)throw new Error(o.name+" is required")}return u}}},104:(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:(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,h=o(e);n.encode(h,r,s),s+=n.encode.bytes,r.set(e,s),t.bytes=(s+=h)-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:(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:t=>{t.exports=function(t,e,r,n){return e.bytes=r.bytes=0,{type:t,encode:e,decode:r,encodingLength:n}}},9018:(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:(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:(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:(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:(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:(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:(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:(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:(t,e,r)=>{const n=r(138),i=r(7962),o=r(3071),s=r(9851);t.exports=s(2,(function t(e,r,o,s){const a=s,h=i(e).byteLength;n.encode(h,r,s,"utf-8"),s+=n.encode.bytes;const u=i(e);r.set(u,s),s+=u.length,t.bytes=s-a}),(function t(e,r,i){const s=i,a=n.decode(e,i);i+=n.decode.bytes;const h=o(e.subarray(i,i+a));return t.bytes=(i+=a)-s,h}),(function(t){const e=i(t).byteLength;return n.encodingLength(e)+e}))},3083:(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:(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={},h={},u={},f=function(t,e){t.enums&&t.enums.forEach((function(t){t.id=e+(e?".":"")+t.name,h[t.id]=t,f(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})),f(n,n.id)}))};f(t,"");const c=function(t,f,l){if(e&&e[t])return e[t];if(n[t])return n[t];const d=(f?f+"."+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]||h[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):u[d.id]||function(t,e){t.messages.forEach((function(r){e[r.name]=c(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 c(e.type,t.id)})),a=s(t,n,r),h=o(t,c,n,r,a),u=i(t,c,n);return h.bytes=u.bytes=0,e.buffer=!0,e.encode=h,e.decode=u,e.encodingLength=a,e}(d,u[d.id]={})};return(t.enums||[]).concat((t.messages||[]).map((function(t){return c(t.id)})))}},3864:(t,e)=>{e.r=function(t){return null!=t&&("number"!=typeof t||!isNaN(t))}},7160:(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: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,h;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 u=("number"!=typeof h&&(h=0),h+".".length>(a=t).length||-1===a.indexOf(".",h)?"argument":"property");s='The "'.concat(t,'" ').concat(u," ").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:(t,e,r)=>{var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(9481),s=r(4229);r(5717)(f,o);for(var a=n(s.prototype),h=0;h<a.length;h++){var u=a[h];f.prototype[u]||(f.prototype[u]=s.prototype[u])}function f(t){if(!(this instanceof f))return new f(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",c)))}function c(){this._writableState.ended||i.nextTick(l,this)}function l(t){t.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(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},2725:(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:(t,e,r)=>{var n;t.exports=S,S.ReadableState=x,r(7187).EventEmitter;var o,s=function(t,e){return t.listeners(e).length},a=r(2503),h=r(5291).Buffer,u=r.g.Uint8Array||function(){},f=r(4616);o=f&&f.debuglog?f.debuglog("stream"):function(){};var c,l,d,p=r(7327),g=r(1195),m=r(2457).getHighWaterMark,y=r(4281).q,w=y.ERR_INVALID_ARG_TYPE,b=y.ERR_STREAM_PUSH_AFTER_EOF,v=y.ERR_METHOD_NOT_IMPLEMENTED,E=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(S,a);var _=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&&(c||(c=r(2553).s),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(n=n||r(6753),!(this instanceof S))return new S(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 k(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?B(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,N(t)))}}(t,a);else if(i||(s=function(t,e){var r,n;return n=e,h.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new w("chunk",["string","Buffer","Uint8Array"],e)),r}(a,e)),s)_(t,s);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===h.prototype||(e=function(t){return h.from(t)}(e)),n)a.endEmitted?_(t,new E):A(t,a,e,!0);else if(a.ended)_(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&&B(t)),O(t,e)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=g.destroy,S.prototype._undestroy=g.undestroy,S.prototype._destroy=function(t,e){e(t)},S.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=h.from(t,e),e=""),r=!0),k(this,t,e,!1,r)},S.prototype.unshift=function(t){return k(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){c||(c=r(2553).s);var e=new c(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 T=1073741824;function R(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>=T?t=T:(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 B(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(N,t))}function N(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 I(t){o("readable nexttick read 0"),t.read(0)}function L(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}S.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):B(this),null;if(0===(t=R(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=R(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},S.prototype._read=function(t){_(this,new v("_read()"))},S.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:h;function h(){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",u),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",h),r.removeListener("end",g),r.removeListener("data",c),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}));var u=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",u);var f=!1;function c(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))&&!f&&(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")&&_(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",c),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},S.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},S.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?B(this):n.reading||i.nextTick(I,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(C,this),r},S.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(C,this),e},S.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(L,t,e))}(this,t)),t.paused=!1,this},S.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},S.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&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(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(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=j,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,e){return void 0===d&&(d=r(5167)),d(S,t,e)})},4605:(t,e,r)=>{t.exports=f;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,h=r(6753);function u(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 f(t){if(!(this instanceof f))return new f(t);h.call(this,t),this._transformState={afterTransform:u.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",c)}function c(){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)(f,h),f.prototype.push=function(t,e){return this._transformState.needTransform=!1,h.prototype.push.call(this,t,e)},f.prototype._transform=function(t,e,r){r(new i("_transform()"))},f.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)}},f.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))},f.prototype._destroy=function(t,e){h.prototype._destroy.call(this,t,(function(t){e(t)}))}},4229:(t,e,r)=>{function n(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)}}var o;t.exports=S,S.WritableState=x;var s,a={deprecate:r(4927)},h=r(2503),u=r(5291).Buffer,f=r.g.Uint8Array||function(){},c=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,y=d.ERR_STREAM_CANNOT_PIPE,w=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,v=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,_=c.errorOrDestroy;function M(){}function x(t,e,s){o=o||r(6753),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),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(N,t,e),t._writableState.errorEmitted=!0,_(t,n)):(o(n),t._writableState.errorEmitted=!0,_(t,n),N(t,e))}(t,r,n,e,o);else{var s=R(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||T(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 n(this)}function S(t){var e=this instanceof(o=o||r(6753));if(!e&&!s.call(S,this))return new S(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)),h.call(this)}function k(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new w("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(),N(t,e)}function T(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,o=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,h=!0;r;)o[a]=r,r.isBuf||(h=!1),r=r.next,a+=1;o.allBuffers=h,k(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,c=r.callback;if(k(t,e,!1,e.objectMode?1:u.length,u,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function R(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function B(t,e){t._final((function(r){e.pendingcb--,r&&_(t,r),e.prefinished=!0,t.emit("prefinish"),N(t,e)}))}function N(t,e){var r=R(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(B,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)(S,h),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(S,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===S&&t&&t._writableState instanceof x}})):s=function(t){return t instanceof this},S.prototype.pipe=function(){_(this,new y)},S.prototype.write=function(t,e,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=t,u.isBuffer(n)||n instanceof f);return a&&!u.isBuffer(t)&&(t=function(t){return u.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;_(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||(_(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=u.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 h=e.length<e.highWaterMark;if(h||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,a,n,i,o);return h}(this,o,a,t,e,r)),s},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||T(this,t))},S.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 E(t);return this._writableState.defaultEncoding=t,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(t,e,r){r(new g("_write()"))},S.prototype._writev=null,S.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,N(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),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(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=c.destroy,S.prototype._undestroy=c.undestroy,S.prototype._destroy=function(t,e){e(t)}},5850:(t,e,r)=>{var n;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"),h=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),c=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[c]=null,t[a]=null,t[h]=null,e(p(r,!1)))}}function m(t){i.nextTick(g,t)}var y=Object.getPrototypeOf((function(){})),w=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[u]?r(t[u]):e(p(void 0,!0))}))}));var r,n=this[c];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?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[c]=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),y);t.exports=function(t){var e,r=Object.create(w,(o(e={},d,{value:t,writable:!0}),o(e,a,{value:null,writable:!0}),o(e,h,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,l,{value:function(t,e){var n=r[d].read();n?(r[c]=null,r[a]=null,r[h]=null,t(p(n,!1))):(r[a]=t,r[h]=e)},writable:!0}),e));return r[c]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[h];return null!==e&&(r[c]=null,r[a]=null,r[h]=null,e(t)),void(r[u]=t)}var n=r[a];null!==n&&(r[c]=null,r[a]=null,r[h]=null,n(p(void 0,!0))),r[f]=!0})),t.on("readable",m.bind(null,r)),r}},7327:(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(5291).Buffer,a=r(2361).inspect,h=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:h,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:t=>{function e(t,e){n(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return a||h?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(n,this,t)):i.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?i.nextTick(r,s):(s._writableState.errorEmitted=!0,i.nextTick(e,s,t)):i.nextTick(e,s,t):o?(i.nextTick(r,s),o(t)):i.nextTick(r,s)})),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:(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,h=function(){e.writable||f()},u=e._writableState&&e._writableState.finished,f=function(){a=!1,u=!0,s||o.call(e)},c=e._readableState&&e._readableState.endEmitted,l=function(){s=!1,c=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!c?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!u?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",p),e.req?g():e.on("request",g)):a&&!e._writableState&&(e.on("end",h),e.on("close",h)),e.on("end",l),e.on("finish",f),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",f),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("end",l),e.removeListener("error",d),e.removeListener("close",p)}}},5167:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(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 h(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 h=!1;return function(e){if(!a&&!h)return h=!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 u(t){t()}function f(t,e){return t.pipe(e)}function c(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=c(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 h(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(u),o||(s.forEach(u),i(n))}))}));return e.reduce(f)}},2457:(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:(t,e,r)=>{t.exports=r(7187).EventEmitter},8473:(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:(t,e,r)=>{var n=r(5291),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:(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: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: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:(t,e,r)=>{t.exports={encode:r(508),decode:r(7721),encodingLength:r(8184)}},8184: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),h=Math.pow(2,56),u=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<h?8:t<u?9:10}},2553:(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=h,this.end=u,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=c,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 h(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 u(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 f(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 c(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}},7962:(t,e,r)=>{const n=r(5743);t.exports=function(t,e="utf8"){const r=n[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return r.decoder.decode(`${r.prefix}${t}`)}},3071:(t,e,r)=>{const n=r(5743);t.exports=function(t,e="utf8"){const r=n[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return r.encoder.encode(t).substring(1)}},5743:(t,e,r)=>{const{bases:n}=r(3595);function i(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const o=i("utf8","u",(t=>"u"+new TextDecoder("utf8").decode(t)),(t=>(new TextEncoder).encode(t.substring(1)))),s=i("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})),a={utf8:o,"utf-8":o,hex:n.base16,latin1:s,ascii:s,binary:s,...n};t.exports=a},4927:(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: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: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:(t,e,r)=>{t.exports={encode:r(1312),decode:r(6988),encodingLength:r(82)}},82: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),h=Math.pow(2,56),u=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<h?8:t<u?9:10}},5277:(t,e)=>{e.byteLength=function(t){var e=h(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=h(t),s=o[0],a=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),f=0,c=a>0?s-4:s;for(r=0;r<c;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)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,h=n-i;a<h;a+=s)o.push(u(t,a,a+s>h?h: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 h(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 u(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},5291:(t,e,r)=>{var n=r(5277),i=r(2608),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},e.INSPECT_MAX_BYTES=50;var s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(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 c(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|g(t,e),n=a(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return l(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(z(t,ArrayBuffer)||t&&z(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(z(t,SharedArrayBuffer)||t&&z(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');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return h.from(n,e,r);var i=function(t){if(h.isBuffer(t)){var 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||$(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 h.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 f(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 c(t){return f(t),a(t<0?0:0|p(t))}function l(t){for(var e=t.length<0?0:0|p(t.length),r=a(e),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');var 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,h.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(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||z(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);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(i)return n?-1:D(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){var 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 A(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w(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),$(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=h.from(e,n)),h.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){var o,s=1,a=t.length,h=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,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===h)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+h>a&&(r=a-h),o=r;o>=0;o--){for(var c=!0,l=0;l<h;l++)if(u(t,o+l)!==u(e,l)){c=!1;break}if(c)return o}return-1}function v(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if($(a))return s;t[r+s]=a}return s}function E(t,e,r,n){return q(D(e,t.length-r),t,r,n)}function _(t,e,r,n){return q(function(t){for(var e=[],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 _(t,e,r,n)}function x(t,e,r,n){return q(F(e),t,r,n)}function S(t,e,r,n){return q(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>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 A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,h,u=t[i],f=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c<=r)switch(c){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[i+1]))&&(h=(31&u)<<6|63&o)>127&&(f=h);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(h=(15&u)<<12|(63&o)<<6|63&s)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(h=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&h<1114112&&(f=h)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=c}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=T));return r}(n)}e.kMaxLength=s,h.TYPED_ARRAY_SUPPORT=function(){try{var 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}}(),h.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(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,r){return function(t,e,r){return f(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)},h.allocUnsafe=function(t){return c(t)},h.allocUnsafeSlow=function(t){return c(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(z(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),z(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,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},h.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}},h.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=h.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(z(o,Uint8Array)&&(o=h.from(o)),!h.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},h.byteLength=g,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},h.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):m.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(t,e,r,n,i){if(z(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.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;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(n,i),f=t.slice(e,r),c=0;c<a;++c)if(u[c]!==f[c]){o=u[c],s=f[c];break}return o<s?-1:s<o?1:0},h.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},h.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},h.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},h.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)}var 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");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function B(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function N(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H[t[o]];return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function U(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 C(t,e,r,n,i,o){if(!h.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 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 L(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 P(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}h.prototype.slice=function(t,e){var 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);var n=this.subarray(t,e);return Object.setPrototypeOf(n,h.prototype),n},h.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},h.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},h.prototype.readUInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},h.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},h.prototype.readInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||U(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){t>>>=0,e||U(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return t>>>=0,e||U(t,4,this.length),i.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||U(t,4,this.length),i.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||U(t,8,this.length),i.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||U(t,8,this.length),i.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},h.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},h.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(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},h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(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},h.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},h.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(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},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(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},h.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,n){if(!h.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);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;o>=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},h.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&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}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;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=h.isBuffer(t)?t:h.from(t,n),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var j=/[^+/0-9A-Za-z-_]/g;function D(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>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 F(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function z(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function $(t){return t!=t}var H=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},2608:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,h=(1<<a)-1,u=h>>1,f=-7,c=r?i-1:0,l=r?-1:1,d=t[e+c];for(c+=l,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+t[e+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+c],c+=l,f-=8);if(0===o)o=1-u;else{if(o===h)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,h,u=8*o-i-1,f=(1<<u)-1,c=f>>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=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+c>=1?l/h:l*Math.pow(2,1-c))*h>=2&&(s++,h/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(e*h-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-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,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*g}},2361:()=>{},4616:()=>{},3595:(t,e,r)=>{r.r(e),r.d(e,{CID:()=>Ft,bases:()=>Xt,bytes:()=>n,codecs:()=>te,digest:()=>p,hasher:()=>g,hashes:()=>Qt,varint:()=>d});var n={};r.r(n),r.d(n,{coerce:()=>x,empty:()=>v,equals:()=>M,fromHex:()=>_,fromString:()=>k,isBinary:()=>S,toHex:()=>E,toString:()=>A});var i={};r.r(i),r.d(i,{identity:()=>L});var o={};r.r(o),r.d(o,{base2:()=>P});var s={};r.r(s),r.d(s,{base8:()=>j});var a={};r.r(a),r.d(a,{base10:()=>D});var h={};r.r(h),r.d(h,{base16:()=>F,base16upper:()=>q});var u={};r.r(u),r.d(u,{base32:()=>z,base32hex:()=>V,base32hexpad:()=>Z,base32hexpadupper:()=>J,base32hexupper:()=>G,base32pad:()=>H,base32padupper:()=>W,base32upper:()=>$,base32z:()=>K});var f={};r.r(f),r.d(f,{base36:()=>Y,base36upper:()=>X});var c={};r.r(c),r.d(c,{base58btc:()=>Q,base58flickr:()=>tt});var l={};r.r(l),r.d(l,{base64:()=>et,base64pad:()=>rt,base64url:()=>nt,base64urlpad:()=>it});var d={};r.r(d),r.d(d,{decode:()=>mt,encodeTo:()=>yt,encodingLength:()=>wt});var p={};r.r(p),r.d(p,{Digest:()=>_t,create:()=>bt,decode:()=>vt,equals:()=>Et});var g={};r.r(g),r.d(g,{Hasher:()=>xt,from:()=>Mt});var m={};r.r(m),r.d(m,{sha256:()=>kt,sha512:()=>At});var y={};r.r(y),r.d(y,{identity:()=>Rt});var w={};r.r(w),r.d(w,{code:()=>Nt,decode:()=>Ut,encode:()=>Ot,name:()=>Bt});var b={};r.r(b),r.d(b,{code:()=>Pt,decode:()=>Dt,encode:()=>jt,name:()=>Lt});const v=new Uint8Array(0),E=t=>t.reduce(((t,e)=>t+e.toString(16).padStart(2,"0")),""),_=t=>{const e=t.match(/../g);return e?new Uint8Array(e.map((t=>parseInt(t,16)))):v},M=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},x=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")},S=t=>t instanceof ArrayBuffer||ArrayBuffer.isView(t),k=t=>(new TextEncoder).encode(t),A=t=>(new TextDecoder).decode(t);class T{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 R{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 N(this,t)}}class B{constructor(t){this.decoders=t}or(t){return N(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 N=(t,e)=>new B({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class O{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new T(t,e,r),this.decoder=new R(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const U=({name:t,prefix:e,encode:r,decode:n})=>new O(t,e,r,n),C=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=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,h=t.charAt(0),u=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function c(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]===h;)n++,e++;for(var o=(t.length-e)*u+1>>>0,s=new Uint8Array(o);t[e];){var f=r[t.charCodeAt(e)];if(255===f)return;for(var c=0,l=o-1;(0!==f||c<i)&&-1!==l;l--,c++)f+=a*s[l]>>>0,s[l]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");i=c,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)*f+1>>>0,u=new Uint8Array(s);i!==o;){for(var c=e[i],l=0,d=s-1;(0!==c||l<n)&&-1!==d;d--,l++)c+=256*u[d]>>>0,u[d]=c%a>>>0,c=c/a>>>0;if(0!==c)throw new Error("Non-zero carry");n=l,i++}for(var p=s-n;p!==s&&0===u[p];)p++;for(var g=h.repeat(r);p<s;++p)g+=t.charAt(u[p]);return g},decodeUnsafe:c,decode:function(t){var r=c(t);if(r)return r;throw new Error(`Non-${e} character`)}}}(r,e);return U({prefix:t,name:e,encode:n,decode:t=>x(i(t))})},I=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>U({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,h=0,u=0;for(let e=0;e<o;++e){const o=i[t[e]];if(void 0===o)throw new SyntaxError(`Non-${n} character`);h=h<<r|o,a+=r,a>=8&&(a-=8,s[u++]=255&h>>a)}if(a>=r||255&h<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,n,r,t)}),L=U({prefix:"\0",name:"identity",encode:t=>A(t),decode:t=>k(t)}),P=I({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),j=I({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),D=C({prefix:"9",name:"base10",alphabet:"0123456789"}),F=I({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),q=I({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),z=I({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),$=I({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),H=I({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),W=I({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),V=I({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),G=I({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Z=I({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),J=I({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),K=I({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Y=C({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),X=C({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Q=C({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),tt=C({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),et=I({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),rt=I({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),nt=I({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),it=I({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var ot=Math.pow(2,31),st=Math.pow(2,7),at=Math.pow(2,14),ht=Math.pow(2,21),ut=Math.pow(2,28),ft=Math.pow(2,35),ct=Math.pow(2,42),lt=Math.pow(2,49),dt=Math.pow(2,56),pt=Math.pow(2,63);const gt={encode:function t(e,r,n){r=r||[];for(var i=n=n||0;e>=ot;)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},decode: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},encodingLength:function(t){return t<st?1:t<at?2:t<ht?3:t<ut?4:t<ft?5:t<ct?6:t<lt?7:t<dt?8:t<pt?9:10}},mt=t=>[gt.decode(t),gt.decode.bytes],yt=(t,e,r=0)=>(gt.encode(t,e,r),e),wt=t=>gt.encodingLength(t),bt=(t,e)=>{const r=e.byteLength,n=wt(t),i=n+wt(r),o=new Uint8Array(i+r);return yt(t,o,0),yt(r,o,n),o.set(e,i),new _t(t,r,e,o)},vt=t=>{const e=x(t),[r,n]=mt(e),[i,o]=mt(e.subarray(n)),s=e.subarray(n+o);if(s.byteLength!==i)throw new Error("Incorrect length");return new _t(r,i,s,e)},Et=(t,e)=>t===e||t.code===e.code&&t.size===e.size&&M(t.bytes,e.bytes);class _t{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}const Mt=({name:t,code:e,encode:r})=>new xt(t,e,r);class xt{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?bt(this.code,e):e.then((t=>bt(this.code,t)))}throw Error("Unknown type, must be binary type")}}const St=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),kt=Mt({name:"sha2-256",code:18,encode:St("SHA-256")}),At=Mt({name:"sha2-512",code:19,encode:St("SHA-512")}),Tt=x,Rt={code:0,name:"identity",encode:Tt,digest:t=>bt(0,Tt(t))},Bt="raw",Nt=85,Ot=t=>x(t),Ut=t=>x(t),Ct=new TextEncoder,It=new TextDecoder,Lt="json",Pt=512,jt=t=>Ct.encode(JSON.stringify(t)),Dt=t=>JSON.parse(It.decode(t));class Ft{constructor(t,e,r,n){this.code=e,this.version=t,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Jt,byteLength:Jt,code:Zt,version:Zt,multihash:Zt,bytes:Zt,_baseCache:Jt,asCID:Jt})}toV0(){if(0===this.version)return this;{const{code:t,multihash:e}=this;if(t!==Ht)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==Wt)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Ft.createV0(e)}}toV1(){switch(this.version){case 0:{const{code:t,digest:e}=this.multihash,r=bt(t,e);return Ft.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(t){return t&&this.code===t.code&&this.version===t.version&&Et(this.multihash,t.multihash)}toString(t){const{bytes:e,version:r,_baseCache:n}=this;return 0===r?zt(e,n,t||Q.encoder):$t(e,n,t||z.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return Kt(/^0\.0/,Yt),!(!t||!t[Gt]&&t.asCID!==t)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof Ft)return t;if(null!=t&&t.asCID===t){const{version:e,code:r,multihash:n,bytes:i}=t;return new Ft(e,r,n,i||Vt(e,r,n.bytes))}if(null!=t&&!0===t[Gt]){const{version:e,multihash:r,code:n}=t,i=vt(r);return Ft.create(e,n,i)}return null}static create(t,e,r){if("number"!=typeof e)throw new Error("String codecs are no longer supported");switch(t){case 0:if(e!==Ht)throw new Error(`Version 0 CID must use dag-pb (code: ${Ht}) block encoding`);return new Ft(t,e,r,r.bytes);case 1:{const n=Vt(t,e,r.bytes);return new Ft(t,e,r,n)}default:throw new Error("Invalid version")}}static createV0(t){return Ft.create(0,Ht,t)}static createV1(t,e){return Ft.create(1,t,e)}static decode(t){const[e,r]=Ft.decodeFirst(t);if(r.length)throw new Error("Incorrect length");return e}static decodeFirst(t){const e=Ft.inspectBytes(t),r=e.size-e.multihashSize,n=x(t.subarray(r,r+e.multihashSize));if(n.byteLength!==e.multihashSize)throw new Error("Incorrect length");const i=n.subarray(e.multihashSize-e.digestSize),o=new _t(e.multihashCode,e.digestSize,i,n);return[0===e.version?Ft.createV0(o):Ft.createV1(e.codec,o),t.subarray(e.size)]}static inspectBytes(t){let e=0;const r=()=>{const[r,n]=mt(t.subarray(e));return e+=n,r};let n=r(),i=Ht;if(18===n?(n=0,e=0):1===n&&(i=r()),0!==n&&1!==n)throw new RangeError(`Invalid CID version ${n}`);const o=e,s=r(),a=r(),h=e+a;return{version:n,codec:i,multihashCode:s,digestSize:a,multihashSize:h-o,size:h}}static parse(t,e){const[r,n]=qt(t,e),i=Ft.decode(n);return i._baseCache.set(r,t),i}}const qt=(t,e)=>{switch(t[0]){case"Q":{const r=e||Q;return[Q.prefix,r.decode(`${Q.prefix}${t}`)]}case Q.prefix:{const r=e||Q;return[Q.prefix,r.decode(t)]}case z.prefix:{const r=e||z;return[z.prefix,r.decode(t)]}default:if(null==e)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}},zt=(t,e,r)=>{const{prefix:n}=r;if(n!==Q.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=e.get(n);if(null==i){const i=r.encode(t).slice(1);return e.set(n,i),i}return i},$t=(t,e,r)=>{const{prefix:n}=r,i=e.get(n);if(null==i){const i=r.encode(t);return e.set(n,i),i}return i},Ht=112,Wt=18,Vt=(t,e,r)=>{const n=wt(t),i=n+wt(e),o=new Uint8Array(i+r.byteLength);return yt(t,o,0),yt(e,o,n),o.set(r,i),o},Gt=Symbol.for("@ipld/js-cid/CID"),Zt={writable:!1,configurable:!1,enumerable:!0},Jt={writable:!1,enumerable:!1,configurable:!1},Kt=(t,e)=>{if(!t.test("0.0.0-dev"))throw new Error(e);console.warn(e)},Yt="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n",Xt={...i,...o,...s,...a,...h,...u,...f,...c,...l},Qt={...m,...y},te={raw:w,json:b}}},s={};function a(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={exports:{}};return o[t](r,r.exports,a),r.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e={},(()=>{a.d(e,{Z:()=>v});var t=a(7160),r=a.n(t);const i=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 h=(t.length-o)*i+1>>>0;let u=new Uint8Array(h);for(;t[o];){let n=e[t.charCodeAt(o)];if(255===n)return;let i=0;for(let t=h-1;(0!==n||i<a)&&-1!==t;t--,i++)n+=r*u[t]>>>0,u[t]=n%256>>>0,n=n/256>>>0;if(0!==n)throw new Error("Non-zero carry");a=i,o++}let f=h-a;for(;f!==h&&0===u[f];)f++;let c=new Uint8Array(s+(h-f)),l=s;for(;f!==h;)c[l++]=u[f++];return c};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 h=e.length;for(;a!==h&&0===e[a];)a++,i++;const u=(h-a)*o+1>>>0,f=new Uint8Array(u);for(;a!==h;){let t=e[a],n=0;for(let e=u-1;(0!==t||n<s)&&-1!==e;e--,n++)t+=256*f[e]>>>0,f[e]=t%r>>>0,t=t/r>>>0;if(0!==t)throw new Error("Non-zero carry");s=n,a++}let c=u-s;for(;c!==u&&0===f[c];)c++;let l=n.repeat(i);for(;c<u;++c)l+=t.charAt(f[c]);return l},decodeUnsafe:s,decode:t=>{const e=s(t);if(e)return e;throw new Error("Non-base"+r+" character")}}},o="abcdefghijklmnopqrstuvwxyz234567",s="0123456789abcdefghijklmnopqrstuv",h=(t,e=!1)=>i(e?s:o).decode(t),u="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",f=t=>i(u).decode(t);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=h(t),this.#t()}fromBs58(t){return this.encoded=f(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=n.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)=>i(e?s:o).encode(t))(this.encoded)}toBs58(){return this.encoded||this.#e(),t=this.encoded,i(u).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 l=a(4676),d=a.n(l);const p={"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 g extends c{get codecs(){return{...globalThis.peernet.codecs,...p}}constructor(t){if(super(),t){if(t instanceof Uint8Array){const e=d().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=d().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=d().encode(t)}fromName(t){const e=this.getCodec(t);this.name=t,this.codec=e,this.hashAlg=this.getHashAlg(t),this.codecBuffer=d().encode(e)}decode(){const t=d().decode(this.encoded);this.fromCodec(t)}encode(){const t=d().encode(this.decoded);return this.encoded=t,this.encoded}}var m=a(5811),y=a.n(m);class w 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 g(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 d().encode(this.size)}get buffer(){return this.encoded}get hash(){return this.encoded}fromJSON(t){return this.encode(n.from(JSON.stringify(t)))}encode(t,e){!this.name&&e&&(this.name=e),t||(t=this.buffer),this.discoCodec=new g(this.name,this.codecs),this.discoCodec.fromName(this.name);let r=this.discoCodec.hashAlg;r.includes("dbl")&&(r=r.replace("dbl-",""),t=y()(r.replace("-","")).update(t).digest()),this.digest=y()(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(n.isBuffer(t)){const e=d().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=d().decode(t);if(this.discoCodec=new g(e,this.codecs),t=t.slice(d().decode.bytes),this.size=d().decode(t),this.digest=t.slice(d().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}}}class b 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 w(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 g(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 g(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 g(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)))}}const v={ContractMessage:class extends b{get keys(){return["creator","contract","constructorParameters"]}constructor(t){super(t,r()("\nmessage ContractMessage {\n required string creator = 1;\n required bytes contract = 2;\n repeated string constructorParameters = 3;\n}\n").ContractMessage,{name:"contract-message"})}},TransactionMessage:class extends b{get keys(){return["timestamp","from","to","nonce","method","params"]}constructor(t){super(t,r()("\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"})}},BlockMessage:class extends b{get keys(){return["index","previousHash","timestamp","reward","fees","transactions","validators"]}constructor(t){super(t,r()("\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"})}},BWMessage:class extends b{get keys(){return["up","down"]}constructor(t){super(t,r()("\n\nmessage BWMessage {\n required uint64 up = 1;\n required uint64 down = 2;\n}\n").BWMessage,{name:"bw-message"})}},BWRequestMessage:class extends b{get keys(){return[]}constructor(t){super(t,r()("\n\nmessage BWRequestMessage {\n}\n").BWRequestMessage,{name:"bw-request-message"})}}}})();var h=e.Z},742:function(t,e){e.byteLength=function(t){var e=h(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=h(t),s=o[0],a=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),f=0,c=a>0?s-4:s;for(r=0;r<c;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)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,h=n-i;a<h;a+=s)o.push(u(t,a,a+s>h?h: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 h(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 u(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},764:function(t,e,r){const n=r(742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=function(t){return+t!=t&&(t=0),h.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,h.prototype),e}function h(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 c(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!h.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 h.from(n,e,r);const i=function(t){if(h.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 h.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 f(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 c(t){return f(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,h.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(h.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 V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(i)return n?-1:V(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 B(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function w(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=h.from(e,n)),h.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,h=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,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===h)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+h>a&&(r=a-h),o=r;o>=0;o--){let r=!0;for(let n=0;n<h;n++)if(u(t,o+n)!==u(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 E(t,e,r,n){return Z(V(e,t.length-r),t,r,n)}function _(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(G(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 S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(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,h;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(h=(31&e)<<6|63&r,h>127&&(o=h));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(h=(15&e)<<12|(63&r)<<6|63&n,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(h=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,h>65535&&h<1114112&&(o=h))}}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,h.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}}(),h.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(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,r){return function(t,e,r){return f(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)},h.allocUnsafe=function(t){return c(t)},h.allocUnsafeSlow=function(t){return c(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(J(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),J(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.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},h.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}},h.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=h.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?(h.isBuffer(e)||(e=h.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!h.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},h.byteLength=g,h.prototype._isBuffer=!0,h.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)y(this,e,e+1);return this},h.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)y(this,e,e+3),y(this,e+1,e+2);return this},h.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)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},h.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):m.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.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&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.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),u=this.slice(n,i),f=t.slice(e,r);for(let t=0;t<a;++t)if(u[t]!==f[t]){o=u[t],s=f[t];break}return o<s?-1:s<o?1:0},h.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},h.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},h.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},h.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 E(this,t,e,r);case"ascii":case"latin1":case"binary":return _(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}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function T(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 R(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 B(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+=Y[t[n]];return i}function N(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(!h.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 I(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 L(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||L(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||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}h.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,h.prototype),n},h.prototype.readUintLE=h.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},h.prototype.readUintBE=h.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},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.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]},h.prototype.readUint32BE=h.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])},h.prototype.readBigUInt64LE=X((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))})),h.prototype.readBigUInt64BE=X((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)})),h.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},h.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},h.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.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},h.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},h.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},h.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]},h.prototype.readBigInt64LE=X((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)})),h.prototype.readBigInt64BE=X((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)})),h.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.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},h.prototype.writeUintBE=h.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},h.prototype.writeUint8=h.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},h.prototype.writeUint16LE=h.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},h.prototype.writeUint16BE=h.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},h.prototype.writeUint32LE=h.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},h.prototype.writeUint32BE=h.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},h.prototype.writeBigUInt64LE=X((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),h.prototype.writeBigUInt64BE=X((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),h.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},h.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},h.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},h.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},h.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},h.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},h.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},h.prototype.writeBigInt64LE=X((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),h.prototype.writeBigInt64BE=X((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),h.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,n){if(!h.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},h.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&&!h.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=h.isBuffer(t)?t:h.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 V(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 G(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 Y=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 X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},645:function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,h=(1<<a)-1,u=h>>1,f=-7,c=r?i-1:0,l=r?-1:1,d=t[e+c];for(c+=l,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+t[e+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+c],c+=l,f-=8);if(0===o)o=1-u;else{if(o===h)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,h,u=8*o-i-1,f=(1<<u)-1,c=f>>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=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+c>=1?l/h:l*Math.pow(2,1-c))*h>=2&&(s++,h/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(e*h-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-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,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*g}},140: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}},158: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,h=[],u=!1,f=-1;function c(){u&&a&&(u=!1,a.length?h=a.concat(h):f=-1,h.length&&l())}function l(){if(!u){var t=s(c);u=!0;for(var e=h.length;e;){for(a=h,h=[];++f<e;)a&&a[f].run();f=-1,e=h.length}a=null,u=!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];h.push(new d(t,e)),1!==h.length||u||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}}},__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]={exports:{}};return __webpack_modules__[t](r,r.exports,__webpack_require__),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__.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})};var __webpack_exports__={};!function(){__webpack_require__.d(i,{Z:function(){return p}});var t={};__webpack_require__.r(t);var e={550: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(601).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 h(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function u(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),h=e;h<a;h++){var u=t.charCodeAt(h)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function f(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=h(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=h(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,h=0,f=r;f<a;f+=n)h=u(t,f,f+n,e),this.imuln(i),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var c=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)c*=e;this.imuln(c),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}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){f(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")]=c}catch(t){o.prototype.inspect=c}else o.prototype.inspect=c;function c(){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,h=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var f=h>>>26,c=67108863&h,l=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=l;d++){var p=u-d|0;f+=(s=(i=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&s}r.words[u]=0|c,h=0|f}return 0!==h?r.words[u]=0|h: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],h=(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-h.length]+h+r:h+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 u=d[t],f=p[t];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var g=c.modrn(f).toString(t);r=(c=c.idivn(f)).isZero()?g+r:l[u-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,h=r.words,u=0,f=0|s[0],c=8191&f,l=f>>>13,d=0|s[1],p=8191&d,g=d>>>13,m=0|s[2],y=8191&m,w=m>>>13,b=0|s[3],v=8191&b,E=b>>>13,_=0|s[4],M=8191&_,x=_>>>13,S=0|s[5],k=8191&S,A=S>>>13,T=0|s[6],R=8191&T,B=T>>>13,N=0|s[7],O=8191&N,U=N>>>13,C=0|s[8],I=8191&C,L=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,V=0|a[2],G=8191&V,Z=V>>>13,J=0|a[3],K=8191&J,Y=J>>>13,X=0|a[4],Q=8191&X,tt=X>>>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],ht=8191&at,ut=at>>>13,ft=0|a[8],ct=8191&ft,lt=ft>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(u+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,z))+Math.imul(l,q)|0))<<13)|0;u=((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 yt=(u+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(l,H)|0))<<13)|0;u=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(w,q)|0,o=Math.imul(w,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 wt=(u+(n=n+Math.imul(c,G)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,G)|0))<<13)|0;u=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(E,q)|0,o=Math.imul(E,z),n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Z)|0;var bt=(u+(n=n+Math.imul(c,K)|0)|0)+((8191&(i=(i=i+Math.imul(c,Y)|0)+Math.imul(l,K)|0))<<13)|0;u=((o=o+Math.imul(l,Y)|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(E,H)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,Y)|0;var vt=(u+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;u=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,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,G)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Y)|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 Et=(u+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;u=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,z))+Math.imul(B,q)|0,o=Math.imul(B,z),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,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 _t=(u+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;u=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=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(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(B,H)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,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=(u+(n=n+Math.imul(c,ht)|0)|0)+((8191&(i=(i=i+Math.imul(c,ut)|0)+Math.imul(l,ht)|0))<<13)|0;u=((o=o+Math.imul(l,ut)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(L,q)|0,o=Math.imul(L,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(R,G)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,Y)|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(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,ut)|0;var xt=(u+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;u=((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(I,H)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(U,G)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,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(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(y,ht)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,ut)|0,n=n+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var St=(u+(n=n+Math.imul(c,pt)|0)|0)+((8191&(i=(i=i+Math.imul(c,gt)|0)+Math.imul(l,pt)|0))<<13)|0;u=((o=o+Math.imul(l,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=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(I,G)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,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,ht)|0,i=(i=i+Math.imul(v,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,n=n+Math.imul(y,ct)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var kt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;u=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,Z))+Math.imul(D,G)|0,o=Math.imul(D,Z),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,Y)|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(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ht)|0,i=(i=i+Math.imul(M,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(E,ct)|0,o=o+Math.imul(E,lt)|0;var At=(u+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,Y))+Math.imul(D,K)|0,o=Math.imul(D,Y),n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,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(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,ut)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Tt=(u+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,gt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=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(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,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(R,ht)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,ut)|0,n=n+Math.imul(k,ct)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Rt=(u+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=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(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ut)|0)+Math.imul(U,ht)|0,o=o+Math.imul(U,ut)|0,n=n+Math.imul(R,ct)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(B,ct)|0,o=o+Math.imul(B,lt)|0;var Bt=(u+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((o=o+Math.imul(A,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=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(I,ht)|0,i=(i=i+Math.imul(I,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,n=n+Math.imul(O,ct)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(U,ct)|0,o=o+Math.imul(U,lt)|0;var Nt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(B,pt)|0))<<13)|0;u=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(j,ht),i=(i=Math.imul(j,ut))+Math.imul(D,ht)|0,o=Math.imul(D,ut),n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(L,ct)|0,o=o+Math.imul(L,lt)|0;var Ot=(u+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(U,pt)|0))<<13)|0;u=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(j,ct),i=(i=Math.imul(j,lt))+Math.imul(D,ct)|0,o=Math.imul(D,lt);var Ut=(u+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,gt)|0)+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863;var Ct=(u+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,gt))+Math.imul(D,pt)|0))<<13)|0;return u=((o=Math.imul(D,gt))+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,h[0]=mt,h[1]=yt,h[2]=wt,h[3]=bt,h[4]=vt,h[5]=Et,h[6]=_t,h[7]=Mt,h[8]=xt,h[9]=St,h[10]=kt,h[11]=At,h[12]=Tt,h[13]=Rt,h[14]=Bt,h[15]=Nt,h[16]=Ot,h[17]=Ut,h[18]=Ct,0!==u&&(h[19]=u,r.length++),r};function y(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,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var f=o-u,c=(0|t.words[f])*(0|e.words[u]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/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 w(t,e,r){return y(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?y(this,t,e):w(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,h=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var c=h,l=u,d=0;d<s;d++){var p=r[f+d],g=n[f+d],m=r[f+d+s],y=n[f+d+s],w=c*m-l*y;y=c*y+l*m,m=w,r[f+d]=p+m,n[f+d]=g+y,r[f+d+s]=p-m,n[f+d+s]=g-y,d!==a&&(w=h*c-u*l,l=h*l+u*c,c=w)}},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),h=new Array(n),u=new Array(n),f=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,u,n),this.transform(s,o,a,h,n,i),this.transform(u,o,f,c,n,i);for(var d=0;d<n;d++){var p=a[d]*f[d]-h[d]*c[d];h[d]=a[d]*c[d]+h[d]*f[d],a[d]=p}return this.conjugate(a,h,n),this.transform(a,h,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),w(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,h=(0|this.words[e])-a<<r;this.words[e]=h|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,h=r;if(i-=s,i=Math.max(0,i),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var c=0|this.words[u];this.words[u]=f<<26-o|c>>>o,f=c&a}return h&&0!==f&&(h.words[h.length++]=f),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 h=(0|t.words[i])*e;a=((o-=67108863&h)>>26)-(h/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,h=n.length-i.length;if("mod"!==e){(a=new o(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var f=n.clone()._ishlnsubmul(i,1,h);0===f.negative&&(n=f,a&&(a.words[h]=1));for(var c=h-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=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),h=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),c=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(f),s.isub(c)),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()||h.isOdd())&&(a.iadd(f),h.isub(c)),a.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(h)):(r.isub(e),a.isub(i),h.isub(s))}return{a:a,b:h,gcd:r.iushln(u)}},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),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(h),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 k(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 E(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(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(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){k.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)}E.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},E.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},E.prototype.split=function(t,e){t.iushrn(this.n,0,e)},E.prototype.imulK=function(t){return t.imul(this.k)},i(_,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},_.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,E),i(x,E),i(S,E),S.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 _;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 S}return v[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.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")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.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)},k.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},k.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)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.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),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var c=this.pow(f,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 y=this.pow(c,new o(1).iushln(p-m-1));l=l.redMul(y),c=y.redSqr(),d=d.redMul(c),p=m}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.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,h=e.bitLength()%26;for(0===h&&(h=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],f=h-1;f>=0;f--){var c=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}h=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,k),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)},601:()=>{}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var i={};(()=>{n.d(i,{Z:()=>J});var t=n(550),e=n.n(t);let r=!1,o=!1;const s={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=s.default,h=null;const u=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 f,c;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(f||(f={})),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"}(c||(c={}));const l="0123456789abcdef";class d{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>s[r]||console.log.apply(console,e)}debug(...t){this._log(d.levels.DEBUG,t)}info(...t){this._log(d.levels.INFO,t)}warn(...t){this._log(d.levels.WARNING,t)}makeError(t,e,r){if(o)return this.makeError("censored error",e,{});e||(e=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];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+=l[e[t]>>4],r+=l[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(e){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push(`code=${e}`),n.push(`version=${this.version}`);const i=t;let s="";switch(e){case c.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 c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.UNPREDICTABLE_GAS_LIMIT:s=e}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=i,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,d.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"),u&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"==typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,d.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",d.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",d.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",d.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return h||(h=new d("logger/5.6.0")),h}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),r){if(!t)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!t,r=!!e}static setLogLevel(t){const e=s[t.toLowerCase()];null!=e?a=e:d.globalLogger().warn("invalid log level - "+t)}static from(t){return new d(t)}}d.errors=c,d.levels=f;const p=new d("bytes/5.6.1");function g(t){return!!t.toHexString}function m(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return m(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function y(t){return"number"==typeof t&&t==t&&t%1==0}function w(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t)return!1;if(!y(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const r=t[e];if(!y(r)||r<0||r>=256)return!1}return!0}function b(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const v="0123456789abcdef";function E(t,e){if(e||(e={}),"number"==typeof t){p.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=v[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),g(t))return t.toHexString();if(b(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":p.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(w(t)){let e="0x";for(let r=0;r<t.length;r++){let n=t[r];e+=v[(240&n)>>4]+v[15&n]}return e}return p.throwArgumentError("invalid hexlify value","value",t)}function _(t,e){for("string"!=typeof t?t=E(t):b(t)||p.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&p.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}const M="bignumber/5.6.2";var x=e().BN;const S=new d(M),k={},A=9007199254740991;let T=!1;class R{constructor(t,e){t!==k&&S.throwError("cannot call constructor directly; use BigNumber.from",d.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return N(O(this).fromTwos(t))}toTwos(t){return N(O(this).toTwos(t))}abs(){return"-"===this._hex[0]?R.from(this._hex.substring(1)):this}add(t){return N(O(this).add(O(t)))}sub(t){return N(O(this).sub(O(t)))}div(t){return R.from(t).isZero()&&U("division-by-zero","div"),N(O(this).div(O(t)))}mul(t){return N(O(this).mul(O(t)))}mod(t){const e=O(t);return e.isNeg()&&U("division-by-zero","mod"),N(O(this).umod(e))}pow(t){const e=O(t);return e.isNeg()&&U("negative-power","pow"),N(O(this).pow(e))}and(t){const e=O(t);return(this.isNegative()||e.isNeg())&&U("unbound-bitwise-result","and"),N(O(this).and(e))}or(t){const e=O(t);return(this.isNegative()||e.isNeg())&&U("unbound-bitwise-result","or"),N(O(this).or(e))}xor(t){const e=O(t);return(this.isNegative()||e.isNeg())&&U("unbound-bitwise-result","xor"),N(O(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&U("negative-width","mask"),N(O(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&U("negative-width","shl"),N(O(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&U("negative-width","shr"),N(O(this).shrn(t))}eq(t){return O(this).eq(O(t))}lt(t){return O(this).lt(O(t))}lte(t){return O(this).lte(O(t))}gt(t){return O(this).gt(O(t))}gte(t){return O(this).gte(O(t))}isNegative(){return"-"===this._hex[0]}isZero(){return O(this).isZero()}toNumber(){try{return O(this).toNumber()}catch(t){U("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return S.throwError("this platform does not support BigInt",d.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?T||(T=!0,S.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?S.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",d.errors.UNEXPECTED_ARGUMENT,{}):S.throwError("BigNumber.toString does not accept parameters",d.errors.UNEXPECTED_ARGUMENT,{})),O(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof R)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new R(k,B(t)):t.match(/^-?[0-9]+$/)?new R(k,B(new x(t))):S.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&U("underflow","BigNumber.from",t),(t>=A||t<=-A)&&U("overflow","BigNumber.from",t),R.from(String(t));const e=t;if("bigint"==typeof e)return R.from(e.toString());if(w(e))return R.from(E(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"==typeof t)return R.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"==typeof t&&(b(t)||"-"===t[0]&&b(t.substring(1))))return R.from(t)}return S.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function B(t){if("string"!=typeof t)return B(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&S.throwArgumentError("invalid hex","value",t),"0x00"===(t=B(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 N(t){return R.from(B(t))}function O(t){const e=R.from(t).toHexString();return"-"===e[0]?new x("-"+e.substring(3),16):new x(e.substring(2),16)}function U(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),S.throwError(t,d.errors.NUMERIC_FAULT,n)}const C=new d(M),I={},L=R.from(0),P=R.from(-1);function j(t,e,r,n){const i={fault:e,operation:r};return void 0!==n&&(i.value=n),C.throwError(t,d.errors.NUMERIC_FAULT,i)}let D="0";for(;D.length<256;)D+=D;function F(t){if("number"!=typeof t)try{t=R.from(t).toNumber()}catch(t){}return"number"==typeof t&&t>=0&&t<=256&&!(t%1)?"1"+D.substring(0,t):C.throwArgumentError("invalid decimal size","decimals",t)}function q(t,e){null==e&&(e=0);const r=F(e),n=(t=R.from(t)).lt(L);n&&(t=t.mul(P));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 z(t,e){null==e&&(e=0);const r=F(e);"string"==typeof t&&t.match(/^-?[0-9.]+$/)||C.throwArgumentError("invalid decimal value","value",t);const n="-"===t.substring(0,1);n&&(t=t.substring(1)),"."===t&&C.throwArgumentError("missing value","value",t);const i=t.split(".");i.length>2&&C.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&&j("fractional component exceeds decimals","underflow","parseFixed"),""===s&&(s="0");s.length<r.length-1;)s+="0";const a=R.from(o),h=R.from(s);let u=a.mul(r).add(h);return n&&(u=u.mul(P)),u}class ${constructor(t,e,r,n){t!==I&&C.throwError("cannot use FixedFormat constructor; use FixedFormat.from",d.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=F(n),Object.freeze(this)}static from(t){if(t instanceof $)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||C.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&&C.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&&C.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&C.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new $(I,e,r,n)}}class H{constructor(t,e,r,n){t!==I&&C.throwError("cannot use FixedNumber constructor; use FixedNumber.from",d.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&&C.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}addUnsafe(t){this._checkFormat(t);const e=z(this._value,this.format.decimals),r=z(t._value,t.format.decimals);return H.fromValue(e.add(r),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);const e=z(this._value,this.format.decimals),r=z(t._value,t.format.decimals);return H.fromValue(e.sub(r),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);const e=z(this._value,this.format.decimals),r=z(t._value,t.format.decimals);return H.fromValue(e.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);const e=z(this._value,this.format.decimals),r=z(t._value,t.format.decimals);return H.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=H.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(e=e.subUnsafe(W.toFormat(e.format))),e}ceiling(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=H.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(e=e.addUnsafe(W.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)&&C.throwArgumentError("invalid decimal count","decimals",t),e[1].length<=t)return this;const r=H.from("1"+D.substring(0,t),this.format),n=V.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&&C.throwArgumentError("invalid byte width","width",t),_(R.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString(),t/8))}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return H.fromString(this._value,t)}static fromValue(t,e,r){return null!=r||null==e||function(t){return null!=t&&(R.isBigNumber(t)||"number"==typeof t&&t%1==0||"string"==typeof t&&!!t.match(/^-?[0-9]+$/)||b(t)||"bigint"==typeof t||w(t))}(e)||(r=e,e=null),null==e&&(e=0),null==r&&(r="fixed"),H.fromString(q(t,e),$.from(r))}static fromString(t,e){null==e&&(e="fixed");const r=$.from(e),n=z(t,r.decimals);!r.signed&&n.lt(L)&&j("unsigned value cannot be negative","overflow","value",t);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=_(i,r.width/8));const o=q(n,r.decimals);return new H(I,i,o,r)}static fromBytes(t,e){null==e&&(e="fixed");const r=$.from(e);if(function(t,e){if(e||(e={}),"number"==typeof t){p.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),m(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),g(t)&&(t=t.toHexString()),b(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":p.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 m(new Uint8Array(n))}return w(t)?m(new Uint8Array(t)):p.throwArgumentError("invalid arrayify value","value",t)}(t).length>r.width/8)throw new Error("overflow");let n=R.from(t);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=q(n,r.decimals);return new H(I,i,o,r)}static from(t,e){if("string"==typeof t)return H.fromString(t,e);if(w(t))return H.fromBytes(t,e);try{return H.fromValue(t,0,e)}catch(t){if(t.code!==d.errors.INVALID_ARGUMENT)throw t}return C.throwArgumentError("invalid FixedNumber value","value",t)}static isFixedNumber(t){return!(!t||!t._isFixedNumber)}}const W=H.from(1),V=H.from("0.5"),G=new d("units/5.6.1"),Z=["wei","kwei","mwei","gwei","szabo","finney","ether"];const J={BigNumber:R,formatUnits:function(t,e){if("string"==typeof e){const t=Z.indexOf(e);-1!==t&&(e=3*t)}return q(t,null!=e?e:18)},parseUnits:function(t,e){if("string"!=typeof t&&G.throwArgumentError("value must be a string","value",t),"string"==typeof e){const t=Z.indexOf(e);-1!==t&&(e=3*t)}return z(t,null!=e?e:18)}}})(),i.Z,__webpack_require__(140);var o=__webpack_require__(676),s=__webpack_require__(395),a=__webpack_require__.n(s);class h{#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(a().contractFactory),contractStore.get(a().nativeToken),contractStore.get(a().validators),contractStore.get(a().nameService)];t=await Promise.all(t);for(const e of t){const t=new o.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=t.BigNumber;const{ContractMessage:u,TransactionMessage:f,BlockMessage:c,BWMessage:l,BWRequestMessage:d}=a();class p{#a=[];#h=[];#u;#f=!1;#c={index:0,previousHash:"0x0"};constructor(){return this.#i()}get lib(){return a()}get lastBlock(){return this.#c}get nativeToken(){return a().nativeToken}get validators(){return[...this.#a]}get blocks(){return[...this.#h]}async hasTransactionToHandle(){return await transactionPoolStore.size()>0}async#l(){if(!(await this.staticCall(a().validators,"validators"))[peernet.id]?.active)return;this.#f=!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.#f=!1}async#p(){await contractStore.put(a().contractFactory,a().contractFactoryMessage),await contractStore.put(a().nativeToken,a().nativeTokenMessage),await contractStore.put(a().validators,a().validatorsMessage),await contractStore.put(a().nameService,a().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(a().contractFactory)||await this.#p(),this.#u=await new h,this.utils={BigNumber:t.BigNumber,formatUnits:t.formatUnits,parseUnits:t.parseUnits};try{let t=await chainStore.get("lastBlock");t=await peernet.get((new TextDecoder).decode(t)),t=new c(t),this.#c={...t.decoded,hash:t.hash}}catch(t){await this.#g()}return await peernet.addRequestHandler("bw-request-message",(()=>new l(peernet.client.bw)||{up:0,down:0})),await peernet.addRequestHandler("lastBlock",this.#m.bind(this)),peernet.subscribe("add-block",this.#y.bind(this)),peernet.subscribe("add-transaction",(async t=>{try{if(t=new f(t),await transactionPoolStore.put(t.hash,t.encoded),await this.hasTransactionToHandle()&&!this.#f)return this.#l()}catch(t){throw Error("invalid transaction")}})),pubsub.subscribe("peer:connected",this.#w.bind(this)),await this.resolveBlocks(),this}async#w(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.#c=this.#h[this.#h.length-1],console.log({lastBlock:this.#c}),console.log(this.#h);let r=t>0?t-e:e;r+=1,debug(`synced ${r} ${r>1?"blocks":"block"}`),this.#h.length,this.#h.length,await this.#b(this.#h);const n=new c(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 c(e);const r=e.encoded.length||e.encoded.byteLength;if(e={...e.decoded,hash:t},this.#h[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.#c=this.#h[this.#h.length-1],await this.#b(this.#h)}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.#u.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.#u.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#y(t){const e=new c(t);await Promise.all(e.decoded.transactions.map((t=>transactionPoolStore.delete(t.hash)))),this.#c={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(a().validators,"has",[peernet.id])||await this.createTransactionFrom(peernet.id,a().validators,"addValidator",[peernet.id]),await this.hasTransactionToHandle()&&!this.#f)return this.#l()}calculateFee(t){return t.decoded.to===a().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 f(new Uint8Array(n,n.byteOffset,n.byteLength)),e.fees+=Number(a().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 f(n),e.fees-=Number(a().calculateFee(n)),await transactionPoolStore.delete(n.hash)}if(t=r,0===t.length)return;e.transactions=t;const n=await this.staticCall(a().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 d;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 c(e);this.#c={...e,hash:t.hash},peernet.publish("add-block",t.encoded),this.#y(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 f(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 c(r),e=e.filter((e=>e.from===t));0===e.length&&0!==r.decoded.index;)r=await blockStore.get(r.decoded.previousHash),r=new c(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 f({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.#f&&this.#l(),{hash:o.hash,data:void 0,fee:a().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 u({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,a().contractFactory,"deployContract",[r,creator,t,constructorParameters])}catch(t){throw t}return this.#u.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.#u.execute(e,r,n)}call(t,e,r){return globalThis.msg=this.#o(),this.#u.execute(t,e,r)}staticCall(t,e,r){return globalThis.msg=this.#o(),this.#u.get(t,e,r)}delegate(t,e,r){return globalThis.msg=this.#o(),this.#u.execute(t,e,r)}staticDelegate(t,e,r){return globalThis.msg=this.#o(),this.#u.get(t,e,r)}mint(t,e){return this.call(a().nativeToken,"mint",[t,e])}transfer(t,e,r){return this.call(a().nativeToken,"transfer",[t,e,r])}get balances(){return this.staticCall(a().nativeToken,"balances")}deleteAll(){return this.#u.deleteAll()}lookup(t){return this.call(a().nameService,"lookup",[t])}}}();var __webpack_exports__default=__webpack_exports__.Z;export{__webpack_exports__default as default};