{"snapId":"npm:@metamask/institutional-wallet-snap","manifest":{"version":"1.5.0","description":"Institutional accounts in MetaMask.","proposedName":"Institutional Wallet","repository":{"type":"git","url":"git+https://github.com/MetaMask/snap-institutional-wallet.git"},"source":{"shasum":"9KSYI8gbTMuwmAeXT1KFr5Cp0sSpZ8f6h0cefgt0SKE=","location":{"npm":{"filePath":"dist/bundle.js","iconPath":"images/icon.svg","packageName":"@metamask/institutional-wallet-snap","registry":"https://registry.npmjs.org/"}}},"initialConnections":{"localhost:8000":{},"http://localhost:3000":{},"https://localhost:3000":{},"http://localhost:8000":{},"https://neptune-custody-ui.metamask-institutional.io":{},"https://ui-v2.sit.zodia.io":{},"https://ui-v2.qa.zodia.io":{},"https://ui-preprod-v2.qa.zodia.io":{},"https://ui-preprod-v2.uat.zodia.io":{},"https://v2.custody.zodia.io":{},"https://console.fireblocks.io":{},"https://eu-console.fireblocks.io":{},"https://eu2-console.fireblocks.io":{},"https://sandbox.fireblocks.io":{},"https://local.waterballoons.xyz:4200":{},"https://dev4-console.waterballoons.xyz":{},"https://dev10-console.waterballoons.xyz":{},"https://console.dev.mpcvault.com":{},"https://saturn-custody-ui.metamask-institutional.io":{},"https://console.mpcvault.com":{},"https://app.bitgo.com":{},"https://app.bitgo-test.com":{},"https://apps-portal.safe.global":{},"https://alpha.mycactus.io":{},"https://pre.mycactus.com":{},"https://www.mycactus.dev":{},"https://debug.mycactus.dev:1443":{},"https://www.mycactus.com":{},"https://app-gamma.signer.cubist.dev":{},"https://app-beta.signer.cubist.dev":{},"https://app.signer.cubist.dev":{}},"initialPermissions":{"snap_notify":{},"endowment:network-access":{},"endowment:ethereum-provider":{},"endowment:keyring":{"allowedOrigins":["localhost:8000","http://localhost:8000"]},"endowment:rpc":{"allowedOrigins":["localhost:8000","http://localhost:8000","localhost:3000","https://localhost:3000","http://localhost:3000","https://neptune-custody-ui.metamask-institutional.io","https://zodia.io","https://ui-v2.sit.zodia.io","https://ui-v2.qa.zodia.io","https://ui-preprod-v2.qa.zodia.io","https://ui-preprod-v2.uat.zodia.io","https://v2.custody.zodia.io","https://console.fireblocks.io","https://eu-console.fireblocks.io","https://eu2-console.fireblocks.io","https://sandbox.fireblocks.io","https://local.waterballoons.xyz:4200","https://dev4-console.waterballoons.xyz","https://dev10-console.waterballoons.xyz","https://console.dev.mpcvault.com","https://saturn-custody-ui.metamask-institutional.io","https://console.mpcvault.com","https://app.bitgo.com","https://app.bitgo-test.com","https://apps-portal.safe.global","https://alpha.mycactus.io","https://pre.mycactus.com","https://www.mycactus.dev","https://debug.mycactus.dev:1443","https://www.mycactus.com","https://app-gamma.signer.cubist.dev","https://app-beta.signer.cubist.dev","https://app.signer.cubist.dev"]},"endowment:cronjob":{"jobs":[{"expression":"5/15 * * * * *","request":{"method":"execute"}},{"expression":"* * * * *","request":{"method":"manageSleepState"}}]},"snap_manageAccounts":{},"snap_manageState":{},"snap_dialog":{},"endowment:page-home":{}},"manifestVersion":"0.1"},"files":[{"path":"images/icon.svg","value":"<svg width=\"24\" height=\"25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.037 0H6.975C2.605 0 0 2.617 0 6.987v10.05c0 4.37 2.605 6.975 6.975 6.975h10.05c4.37 0 6.975-2.605 6.975-6.976V6.988C24.012 2.617 21.407 0 17.037 0ZM11.49 17.757c0 .36-.18.684-.492.876a.975.975 0 0 1-.54.156 1.11 1.11 0 0 1-.469-.108l-4.202-2.1a1.811 1.811 0 0 1-.985-1.61v-3.973c0-.36.18-.685.493-.877a1.04 1.04 0 0 1 1.008-.048l4.202 2.101a1.8 1.8 0 0 1 .997 1.609v3.974h-.012Zm-.252-6.423L6.723 8.896a1.045 1.045 0 0 1-.528-.924c0-.384.204-.744.528-.924l4.515-2.438a1.631 1.631 0 0 1 1.524 0l4.515 2.438c.324.18.528.528.528.924s-.204.744-.528.924l-4.515 2.438c-.24.132-.504.192-.768.192a1.54 1.54 0 0 1-.756-.192Zm7.972 3.638c0 .684-.385 1.308-.997 1.608l-4.202 2.101c-.144.072-.3.108-.468.108a.975.975 0 0 1-.54-.156 1.017 1.017 0 0 1-.493-.876v-3.974c0-.684.384-1.309.997-1.609l4.202-2.101a1.04 1.04 0 0 1 1.008.048c.313.192.493.516.493.877v3.974Z\" fill=\"#24272A\"/></svg>\n"},{"path":"dist/bundle.js","value":"(()=>{var t={6975:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.byteArrayToHashObject=e.hashObjectToByteArray=void 0,e.hashObjectToByteArray=function(t,e,r){let n=t.h0;e[0+r]=255&n,n>>=8,e[1+r]=255&n,n>>=8,e[2+r]=255&n,n>>=8,e[3+r]=255&n,n=t.h1,e[4+r]=255&n,n>>=8,e[5+r]=255&n,n>>=8,e[6+r]=255&n,n>>=8,e[7+r]=255&n,n=t.h2,e[8+r]=255&n,n>>=8,e[9+r]=255&n,n>>=8,e[10+r]=255&n,n>>=8,e[11+r]=255&n,n=t.h3,e[12+r]=255&n,n>>=8,e[13+r]=255&n,n>>=8,e[14+r]=255&n,n>>=8,e[15+r]=255&n,n=t.h4,e[16+r]=255&n,n>>=8,e[17+r]=255&n,n>>=8,e[18+r]=255&n,n>>=8,e[19+r]=255&n,n=t.h5,e[20+r]=255&n,n>>=8,e[21+r]=255&n,n>>=8,e[22+r]=255&n,n>>=8,e[23+r]=255&n,n=t.h6,e[24+r]=255&n,n>>=8,e[25+r]=255&n,n>>=8,e[26+r]=255&n,n>>=8,e[27+r]=255&n,n=t.h7,e[28+r]=255&n,n>>=8,e[29+r]=255&n,n>>=8,e[30+r]=255&n,n>>=8,e[31+r]=255&n},e.byteArrayToHashObject=function(t){let e=0;e|=255&t[3],e<<=8,e|=255&t[2],e<<=8,e|=255&t[1],e<<=8,e|=255&t[0];const r=e;e=0,e|=255&t[7],e<<=8,e|=255&t[6],e<<=8,e|=255&t[5],e<<=8,e|=255&t[4];const n=e;e=0,e|=255&t[11],e<<=8,e|=255&t[10],e<<=8,e|=255&t[9],e<<=8,e|=255&t[8];const i=e;e=0,e|=255&t[15],e<<=8,e|=255&t[14],e<<=8,e|=255&t[13],e<<=8,e|=255&t[12];const o=e;e=0,e|=255&t[19],e<<=8,e|=255&t[18],e<<=8,e|=255&t[17],e<<=8,e|=255&t[16];const s=e;e=0,e|=255&t[23],e<<=8,e|=255&t[22],e<<=8,e|=255&t[21],e<<=8,e|=255&t[20];const a=e;e=0,e|=255&t[27],e<<=8,e|=255&t[26],e<<=8,e|=255&t[25],e<<=8,e|=255&t[24];const u=e;return e=0,e|=255&t[31],e<<=8,e|=255&t[30],e<<=8,e|=255&t[29],e<<=8,e|=255&t[28],{h0:r,h1:n,h2:i,h3:o,h4:s,h5:a,h6:u,h7:e}}},45113:(t,e)=>{\"use strict\";function r(t,e){const r=BigInt(1)<<BigInt(t);if(e>=r)throw new Error(`index ${e} too large for depth ${t}`);return r|e}Object.defineProperty(e,\"__esModule\",{value:!0}),e.gindexChild=e.gindexParent=e.gindexSibling=e.concatGindices=e.getGindexBits=e.gindexIterator=e.getGindicesAtDepth=e.iterateAtDepth=e.countToDepth=e.convertGindexToBitstring=e.toGindexBitstring=e.toGindex=e.bitIndexBigInt=void 0,e.bitIndexBigInt=function(t){return t.toString(2).length-1},e.toGindex=r,e.toGindexBitstring=function(t,e){const r=e?Number(e).toString(2):\"\";if(r.length>t)throw new Error(\"index too large for depth\");return\"1\"+r.padStart(t,\"0\")},e.convertGindexToBitstring=function(t){if(\"string\"==typeof t){if(0===t.length)throw new Error(n);return t}if(t<1)throw new Error(n);return t.toString(2)},e.countToDepth=function(t){return t<=1?0:(t-BigInt(1)).toString(2).length},e.iterateAtDepth=function(t,e,n){if(e+n>BigInt(1)<<BigInt(t))throw new Error(\"Too large for depth\");let i=r(t,e);const o=i+n;return{[Symbol.iterator]:()=>({next(){if(i<o){const t=i;return i++,{done:!1,value:t}}return{done:!0,value:void 0}}})}},e.getGindicesAtDepth=function(t,e,n){if(e+n>BigInt(1)<<BigInt(t))throw new Error(\"Too large for depth\");let i=r(t,BigInt(e));const o=[];for(let t=0;t<n;t++)o.push(i++);return o};const n=\"Invalid gindex\";e.gindexIterator=function(t){let e;if(\"string\"==typeof t){if(!t.length)throw new Error(n);e=t}else{if(t<1)throw new Error(n);e=t.toString(2)}let r=1;const i=()=>{if(r===e.length)return{done:!0,value:void 0};const t=Number(e[r]);return r++,{done:!1,value:t}};return{[Symbol.iterator]:()=>({next:i}),remainingBitLength:()=>e.length-r}},e.getGindexBits=function(t){let e;if(\"string\"==typeof t){if(!t.length)throw new Error(n);e=t}else{if(t<1)throw new Error(n);e=t.toString(2)}const r=[];for(let t=1;t<e.length;t++)r.push(Number(e[t]));return r},e.concatGindices=function(t){return BigInt(t.reduce(((t,e)=>t+e.toString(2).slice(1)),\"0b1\"))},e.gindexSibling=function(t){return t^BigInt(1)},e.gindexParent=function(t){return t/BigInt(2)},e.gindexChild=function(t,e){return t*BigInt(2)+BigInt(e)}},29457:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.setHasher=e.hasher=void 0;const o=r(7207);i(r(64571),e),i(r(336),e),e.hasher=o.hasher,e.setHasher=function(t){e.hasher=t}},7207:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hasher=void 0;const n=r(67929),i=r(336),o=(t,e)=>n.sha256.create().update(t).update(e).digest();e.hasher={digest64:o,digest64HashObjects:(t,e)=>i.uint8ArrayToHashObject(o(i.hashObjectToUint8Array(t),i.hashObjectToUint8Array(e)))}},64571:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},336:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.uint8ArrayToHashObject=e.hashObjectToUint8Array=void 0;const n=r(6975);e.hashObjectToUint8Array=function(t){const e=new Uint8Array(32);return n.hashObjectToByteArray(t,e,0),e},e.uint8ArrayToHashObject=function(t){return n.byteArrayToHashObject(t)}},56567:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(45113),e),i(r(29457),e),i(r(78894),e),i(r(60628),e),i(r(47392),e),i(r(8738),e),i(r(72969),e),i(r(67048),e)},78894:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.bitwiseOrNodeH=e.setNodeH=e.getNodeH=e.compose=e.identity=e.LeafNode=e.BranchNode=e.Node=void 0;const n=r(29457),i=2**32;class o{constructor(t,e,r,n,i,o,s,a){this.h0=t,this.h1=e,this.h2=r,this.h3=n,this.h4=i,this.h5=o,this.h6=s,this.h7=a}applyHash(t){this.h0=t.h0,this.h1=t.h1,this.h2=t.h2,this.h3=t.h3,this.h4=t.h4,this.h5=t.h5,this.h6=t.h6,this.h7=t.h7}}e.Node=o;e.BranchNode=class extends o{constructor(t,e){if(super(null,0,0,0,0,0,0,0),this._left=t,this._right=e,!t)throw new Error(\"Left node is undefined\");if(!e)throw new Error(\"Right node is undefined\")}get rootHashObject(){return null===this.h0&&super.applyHash(n.hasher.digest64HashObjects(this.left.rootHashObject,this.right.rootHashObject)),this}get root(){return n.hashObjectToUint8Array(this.rootHashObject)}isLeaf(){return!1}get left(){return this._left}get right(){return this._right}};class s extends o{static fromRoot(t){return this.fromHashObject(n.uint8ArrayToHashObject(t))}static fromHashObject(t){return new s(t.h0,t.h1,t.h2,t.h3,t.h4,t.h5,t.h6,t.h7)}static fromZero(){return new s(0,0,0,0,0,0,0,0)}static fromUint32(t){return new s(t,0,0,0,0,0,0,0)}clone(){return s.fromHashObject(this)}get rootHashObject(){return this}get root(){return n.hashObjectToUint8Array(this)}isLeaf(){return!0}get left(){throw Error(\"LeafNode has no left node\")}get right(){throw Error(\"LeafNode has no right node\")}writeToBytes(t,e,r){t.set(this.root.slice(0,r),e)}getUint(t,e,r){const n=Math.floor(e/4);if(t<4){const r=e%4*8,i=a(this,n);return 1===t?255&i>>r:65535&i>>r}if(4===t)return a(this,n)>>>0;if(8===t){const t=a(this,n),e=a(this,n+1);return 0===e?t>>>0:-1===e&&-1===t&&r?1/0:(t>>>0)+(e>>>0)*i}throw Error(\"uintBytes > 8\")}getUintBigint(t,e){const r=Math.floor(e/4);if(t<4){const n=e%4*8,i=a(this,r);return 1===t?BigInt(255&i>>n):BigInt(65535&i>>n)}if(4===t)return BigInt(a(this,r)>>>0);{const e=Math.ceil(t/4);let n=BigInt(0);for(let t=0;t<e;t++)n+=BigInt(a(this,r+t)>>>0)<<BigInt(32*t);return n}}setUint(t,e,r,n){const o=Math.floor(e/4);if(t<4){const n=e%4*8;let i=a(this,o);1===t?(i&=~(255<<n),i|=r<<n):(i&=~(65535<<n),i|=r<<n),u(this,o,i)}else if(4===t)u(this,o,r);else{if(8!==t)throw Error(\"uintBytes > 8\");r===1/0&&n?(u(this,o,-1),u(this,o+1,-1)):(u(this,o,4294967295&r),u(this,o+1,r/i&4294967295))}}setUintBigint(t,e,r){const n=Math.floor(e/4);if(t<4){const i=Number(r),o=e%4*8;let s=a(this,n);1===t?(s&=~(255<<o),s|=i<<o):(s&=~(65535<<o),s|=i<<o),u(this,n,s)}else if(4===t)u(this,n,Number(r));else{const e=n+Math.ceil(t/4);for(let t=n;t<e;t++)u(this,t,Number(r&BigInt(4294967295))),r>>=BigInt(32)}}bitwiseOrUint(t,e,r){const n=Math.floor(e/4);if(t<4){h(this,n,r<<e%4*8)}else if(4===t)h(this,n,r);else{const e=n+Math.ceil(t/4);for(let t=n;t<e;t++)h(this,t,4294967295&r),r>>=32}}}function a(t,e){if(0===e)return t.h0;if(1===e)return t.h1;if(2===e)return t.h2;if(3===e)return t.h3;if(4===e)return t.h4;if(5===e)return t.h5;if(6===e)return t.h6;if(7===e)return t.h7;throw Error(\"hIndex > 7\")}function u(t,e,r){if(0===e)t.h0=r;else if(1===e)t.h1=r;else if(2===e)t.h2=r;else if(3===e)t.h3=r;else if(4===e)t.h4=r;else if(5===e)t.h5=r;else if(6===e)t.h6=r;else{if(7!==e)throw Error(\"hIndex > 7\");t.h7=r}}function h(t,e,r){if(0===e)t.h0|=r;else if(1===e)t.h1|=r;else if(2===e)t.h2|=r;else if(3===e)t.h3|=r;else if(4===e)t.h4|=r;else if(5===e)t.h5|=r;else if(6===e)t.h6|=r;else{if(7!==e)throw Error(\"hIndex > 7\");t.h7|=r}}e.LeafNode=s,e.identity=function(t){return t},e.compose=function(t,e){return function(r){return e(t(r))}},e.getNodeH=a,e.setNodeH=u,e.bitwiseOrNodeH=h},60628:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.packedNodeRootsToBytes=e.packedRootsBytesToLeafNodes=e.packedRootsBytesToNode=void 0;const n=r(8738),i=r(78894);function o(t,e,r){const n=r-e,o=Math.floor(n/32),s=new Array(Math.ceil(n/32));for(let r=0;r<o;r++){const n=e+32*r;s[r]=new i.LeafNode(t.getInt32(n+0,!0),t.getInt32(n+4,!0),t.getInt32(n+8,!0),t.getInt32(n+12,!0),t.getInt32(n+16,!0),t.getInt32(n+20,!0),t.getInt32(n+24,!0),t.getInt32(n+28,!0))}const a=n%32;if(a>0){const r=new i.LeafNode(0,0,0,0,0,0,0,0);s[o]=r;const u=Math.floor(a/4);for(let n=0;n<u;n++)i.setNodeH(r,n,t.getInt32(e+32*o+4*n,!0));const h=n%4;if(h>0){let o=0;for(let r=0;r<h;r++)o|=t.getUint8(e+n-h+r)<<8*r;i.setNodeH(r,u,o)}}return s}e.packedRootsBytesToNode=function(t,e,r,i){const s=o(e,r,i);return n.subtreeFillToContents(s,t)},e.packedRootsBytesToLeafNodes=o,e.packedNodeRootsToBytes=function(t,e,r,n){const o=r%32,s=Math.floor(r/32);for(let r=0;r<s;r++){const i=n[r],o=e+32*r;t.setInt32(o+0,i.h0,!0),t.setInt32(o+4,i.h1,!0),t.setInt32(o+8,i.h2,!0),t.setInt32(o+12,i.h3,!0),t.setInt32(o+16,i.h4,!0),t.setInt32(o+20,i.h5,!0),t.setInt32(o+24,i.h6,!0),t.setInt32(o+28,i.h7,!0)}if(o>0){const a=n[s],u=Math.floor(o/4);for(let r=0;r<u;r++)t.setInt32(e+32*s+4*r,i.getNodeH(a,r),!0);const h=r%4;if(h>0){const n=i.getNodeH(a,u);for(let i=0;i<h;i++)t.setUint8(e+r-h+i,n>>8*i&255)}}}},50065:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createNodeFromCompactMultiProof=e.createCompactMultiProof=e.compactMultiProofToNode=e.nodeToCompactMultiProof=e.descriptorToBitlist=e.computeDescriptor=void 0;const n=r(45113),i=r(78894),o=r(85410);function s(t,e){const r=e%8,n=t[Math.floor(e/8)];switch(r){case 0:return 0!=(128&n);case 1:return 0!=(64&n);case 2:return 0!=(32&n);case 3:return 0!=(16&n);case 4:return 0!=(8&n);case 5:return 0!=(4&n);case 6:return 0!=(2&n);case 7:return 0!=(1&n);default:throw new Error(\"unreachable\")}}function a(t){const e=[],r=8*t.length;let n=0,i=0;for(let o=0;o<r;o++){const a=s(t,o);if(e.push(a),a?i++:n++,i>n){if(o++,o+7<r)throw new Error(\"Invalid descriptor: too many bytes\");for(;o<r;o++){if(s(t,o))throw new Error(\"Invalid descriptor: too many 1 bits\")}return e}}throw new Error(\"Invalid descriptor: not enough 1 bits\")}function u(t,e,r){if(e[r])return[t.root];{const n=u(t.left,e,r+1),i=u(t.right,e,r+2*n.length);return[...n,...i]}}function h(t,e,r){return t[r.bitIndex++]?i.LeafNode.fromRoot(e[r.leafIndex++]):new i.BranchNode(h(t,e,r),h(t,e,r))}e.computeDescriptor=function(t){const e=new Set,r=new Set;for(const i of t){const t=n.convertGindexToBitstring(i);e.add(t);const{branch:s,path:a}=o.computeProofBitstrings(t);a.delete(t);for(const t of a)r.add(t);for(const t of s)e.add(t)}for(const t of r)e.delete(t);const i=Array.from(e).sort(((t,e)=>t.localeCompare(e)));let s=\"\";for(const t of i)for(let e=0;e<t.length;e++)if(\"1\"===t[t.length-1-e]){s+=\"1\".padStart(e+1,\"0\");break}s.length%8!=0&&(s=s.padEnd(8-s.length%8+s.length,\"0\"));const a=new Uint8Array(s.length/8);for(let t=0;t<a.length;t++)a[t]=Number(\"0b\"+s.substring(8*t,8*(t+1)));return a},e.descriptorToBitlist=a,e.nodeToCompactMultiProof=u,e.compactMultiProofToNode=h,e.createCompactMultiProof=function(t,e){return u(t,a(e),0)},e.createNodeFromCompactMultiProof=function(t,e){const r=a(e);if(r.length!==2*t.length-1)throw new Error(\"Invalid multiproof: invalid number of leaves\");return h(r,t,{bitIndex:0,leafIndex:0})}},47392:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.deserializeProof=e.serializeProof=e.createNodeFromProof=e.createProof=e.ProofTypeSerialized=e.ProofType=e.descriptorToBitlist=e.computeDescriptor=void 0;const n=r(4871),i=r(50065),o=r(42456),s=r(85492);var a,u=r(50065);Object.defineProperty(e,\"computeDescriptor\",{enumerable:!0,get:function(){return u.computeDescriptor}}),Object.defineProperty(e,\"descriptorToBitlist\",{enumerable:!0,get:function(){return u.descriptorToBitlist}}),function(t){t.single=\"single\",t.treeOffset=\"treeOffset\",t.multi=\"multi\",t.compactMulti=\"compactMulti\"}(a=e.ProofType||(e.ProofType={})),e.ProofTypeSerialized=[a.single,a.treeOffset,a.multi,a.compactMulti],e.createProof=function(t,e){switch(e.type){case a.single:{const[r,n]=o.createSingleProof(t,e.gindex);return{type:a.single,gindex:e.gindex,leaf:r,witnesses:n}}case a.treeOffset:{const[r,n]=s.createTreeOffsetProof(t,e.gindices);return{type:a.treeOffset,offsets:r,leaves:n}}case a.multi:{const[r,i,o]=n.createMultiProof(t,e.gindices);return{type:a.multi,leaves:r,witnesses:i,gindices:o}}case a.compactMulti:{const r=i.createCompactMultiProof(t,e.descriptor);return{type:a.compactMulti,leaves:r,descriptor:e.descriptor}}default:throw new Error(\"Invalid proof type\")}},e.createNodeFromProof=function(t){switch(t.type){case a.single:return o.createNodeFromSingleProof(t.gindex,t.leaf,t.witnesses);case a.treeOffset:return s.createNodeFromTreeOffsetProof(t.offsets,t.leaves);case a.multi:return n.createNodeFromMultiProof(t.leaves,t.witnesses,t.gindices);case a.compactMulti:return i.createNodeFromCompactMultiProof(t.leaves,t.descriptor);default:throw new Error(\"Invalid proof type\")}},e.serializeProof=function(t){switch(t.type){case a.single:case a.multi:throw new Error(\"Not implemented\");case a.treeOffset:{const r=new Uint8Array(1+s.computeTreeOffsetProofSerializedLength(t.offsets,t.leaves));return r[0]=e.ProofTypeSerialized.indexOf(a.treeOffset),s.serializeTreeOffsetProof(r,1,t.offsets,t.leaves),r}default:throw new Error(\"Invalid proof type\")}},e.deserializeProof=function(t){const r=e.ProofTypeSerialized[t[0]];if(!r)throw new Error(\"Invalid proof type\");switch(r){case a.single:case a.multi:throw new Error(\"Not implemented\");case a.treeOffset:{const[e,r]=s.deserializeTreeOffsetProof(t,1);return{type:a.treeOffset,offsets:e,leaves:r}}default:throw new Error(\"Invalid proof type\")}}},4871:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createNodeFromMultiProof=e.createMultiProof=void 0;const n=r(78894),i=r(72969),o=r(85410);e.createMultiProof=function(t,e){const r=new i.Tree(t),n=o.computeMultiProofBitstrings(e.map((t=>t.toString(2))),!1,o.SortOrder.Decreasing),s=e.slice().sort(((t,e)=>t<e?1:-1));return[s.map((t=>r.getRoot(t))),n.map((t=>r.getRoot(t))),s]},e.createNodeFromMultiProof=function(t,e,r){if(t.length!==r.length)throw new Error(\"Leaves length should equal gindices length\");const i=r.map((t=>t.toString(2))),s=o.computeMultiProofBitstrings(i,!1,o.SortOrder.Decreasing);if(s.length!==e.length)throw new Error(\"Witnesses length should equal witnesses gindices length\");const a=Math.max(i[0]?.length??0,s[0]?.length??0),u=Object.fromEntries(Array.from({length:a},((t,e)=>[e+1,{}])));for(let e=0;e<i.length;e++){const r=i[e],o=t[e];u[r.length][r]=n.LeafNode.fromRoot(o)}for(let t=0;t<s.length;t++){const r=s[t],i=e[t];u[r.length][r]=n.LeafNode.fromRoot(i)}for(let t=a;t>1;t--){const e=u[t],r=u[t-1];for(const t of Object.keys(e)){const i=e[t];if(!i)continue;const o=\"0\"===t[t.length-1],s=t.substring(0,t.length-1),a=s+(o?\"1\":\"0\"),u=e[a];if(!u)throw new Error(`Sibling not found: ${a}`);const h=o?new n.BranchNode(i,u):new n.BranchNode(u,i);r[s]=h,delete e[t],delete e[a]}}const h=u[1][1];if(!h)throw new Error(\"Internal consistency error: no root found\");return h}},42456:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createNodeFromSingleProof=e.createSingleProof=e.ERR_INVALID_NAV=void 0;const n=r(78894),i=r(45113);e.ERR_INVALID_NAV=\"Invalid tree navigation\",e.createSingleProof=function(t,r){const n=[];let o=t;for(const t of i.gindexIterator(r))if(t){if(o.isLeaf())throw new Error(e.ERR_INVALID_NAV);n.push(o.left.root),o=o.right}else{if(o.isLeaf())throw new Error(e.ERR_INVALID_NAV);n.push(o.right.root),o=o.left}return[o.root,n.reverse()]},e.createNodeFromSingleProof=function(t,e,r){let i=n.LeafNode.fromRoot(e);const o=r.slice().reverse();for(;t>1;){const e=n.LeafNode.fromRoot(o.pop());i=t%BigInt(2)===BigInt(0)?new n.BranchNode(i,e):new n.BranchNode(e,i),t/=BigInt(2)}return i}},85492:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.deserializeTreeOffsetProof=e.serializeTreeOffsetProof=e.computeTreeOffsetProofSerializedLength=e.createNodeFromTreeOffsetProof=e.createTreeOffsetProof=e.treeOffsetProofToNode=e.nodeToTreeOffsetProof=void 0;const n=r(78894),i=r(85410);function o(t,e,r){if(r.length&&r[0].startsWith(e)){if(e===r[0])return r.shift(),[[],[t.root]];{const[n,i]=o(t.left,e+\"0\",r),[s,a]=o(t.right,e+\"1\",r);return[[i.length].concat(n,s),i.concat(a)]}}return[[],[]]}function s(t,e){if(e.length){if(1===e.length)return n.LeafNode.fromRoot(e[0]);{const r=t[0];return new n.BranchNode(s(t.slice(1,r),e.slice(0,r)),s(t.slice(r),e.slice(r)))}}throw new Error(\"Proof must contain gt 0 leaves\")}e.nodeToTreeOffsetProof=o,e.treeOffsetProofToNode=s,e.createTreeOffsetProof=function(t,e){return o(t,\"1\",i.computeMultiProofBitstrings(e.map((t=>t.toString(2)))))},e.createNodeFromTreeOffsetProof=function(t,e){return s(t,e)},e.computeTreeOffsetProofSerializedLength=function(t,e){return 2*(t.length+1)+32*e.length},e.serializeTreeOffsetProof=function(t,e,r,n){const i=new DataView(t.buffer,t.byteOffset,t.byteLength);i.setUint16(e,n.length,!0);const o=e+2;for(let t=0;t<r.length;t++)i.setUint16(2*t+o,r[t],!0);const s=o+2*r.length;for(let e=0;e<n.length;e++)t.set(n[e],32*e+s)},e.deserializeTreeOffsetProof=function(t,e){const r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=r.getUint16(e,!0);if(t.length<2*(n-1)+32*n)throw new Error(\"Unable to deserialize tree offset proof: not enough bytes\");const i=e+2,o=Array.from({length:n-1},((t,e)=>r.getUint16(2*e+i,!0))),s=i+2*o.length,a=Array.from({length:n},((e,r)=>t.subarray(32*r+s,32*(r+1)+s)));return[o,a]}},85410:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.computeMultiProofBitstrings=e.SortOrder=e.filterParentBitstrings=e.sortDecreasingBitstrings=e.sortInOrderBitstrings=e.computeProofBitstrings=e.computeProofGindices=void 0;const n=r(45113);function i(t){const e=new Set,r=new Set;let n=t;for(;n.length>1;){e.add(n);const t=n[n.length-1],i=n.substring(0,n.length-1);r.add(i+(1^Number(t))),n=i}return{path:e,branch:r}}function o(t,e){return t.length?t.map((t=>t.padEnd(e))).sort().map((t=>t.trim())):[]}function s(t){return t.length?t.sort(((t,e)=>{if(t.length<e.length)return 1;if(e.length<t.length)return-1;let r=t.indexOf(\"0\"),n=e.indexOf(\"0\");for(;;){if(-1===r)return-1;if(-1===n)return 1;if(r<n)return 1;if(n<r)return-1;r=t.indexOf(\"0\",r+1),n=e.indexOf(\"0\",n+1)}})):[]}function a(t){const e=t.slice().sort(((t,e)=>t.length-e.length)),r=[];t:for(let t=0;t<e.length;t++){const n=e[t];for(let r=t+1;r<e.length;r++){if(e[r].startsWith(n))continue t}r.push(n)}return r}var u;e.computeProofGindices=function(t){const e=new Set,r=new Set;let i=t;for(;i>1;)e.add(i),r.add(n.gindexSibling(i)),i=n.gindexParent(i);return{path:e,branch:r}},e.computeProofBitstrings=i,e.sortInOrderBitstrings=o,e.sortDecreasingBitstrings=s,e.filterParentBitstrings=a,function(t){t[t.InOrder=0]=\"InOrder\",t[t.Decreasing=1]=\"Decreasing\",t[t.Unsorted=2]=\"Unsorted\"}(u=e.SortOrder||(e.SortOrder={})),e.computeMultiProofBitstrings=function(t,e=!0,r=u.InOrder){const n=a(t),h=new Set(e?n:[]),c=new Set,f=new Set;let l=1;for(const t of n){t.length>l&&(l=t.length);const{path:e,branch:r}=i(t);e.forEach((t=>c.add(t))),r.forEach((t=>f.add(t)))}switch(c.forEach((t=>f.delete(t))),f.forEach((t=>h.add(t))),r){case u.InOrder:return o(Array.from(h),l);case u.Decreasing:return s(Array.from(h));case u.Unsorted:return Array.from(h)}}},8738:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.subtreeFillToContents=e.subtreeFillToLength=e.subtreeFillToDepth=void 0;const n=r(78894),i=r(67048);function o(t,e){let r=t;for(;e>0;)r=new n.BranchNode(r,r),e--;return r}e.subtreeFillToDepth=o,e.subtreeFillToLength=function t(e,r,s){const a=1<<r;if(s>a)throw new Error(\"ERR_TOO_MANY_NODES\");if(s===a)return o(e,r);if(0===r){if(1===s)return e;throw new Error(\"ERR_NAVIGATION\")}if(1===r)return new n.BranchNode(e,s>1?e:i.zeroNode(0));const u=a>>1;return s<=u?new n.BranchNode(t(e,r-1,s),i.zeroNode(r-1)):new n.BranchNode(o(e,r-1),t(e,r-1,s-u))},e.subtreeFillToContents=function(t,e){const r=2**e;if(t.length>r)throw new Error(`nodes.length ${t.length} over maxIndex at depth ${e}`);if(0===t.length)return i.zeroNode(e);if(0===e)return t[0];if(1===e)return t.length>1?new n.BranchNode(t[0],t[1]):new n.BranchNode(t[0],i.zeroNode(0));let o=t.length;for(let r=e;r>0;r--){const s=o%2,a=o-s;for(let e=0;e<a;e+=2)t[e/2]=new n.BranchNode(t[e],t[e+1]);s>0&&(t[a/2]=new n.BranchNode(t[a],i.zeroNode(e-r))),o=a/2+s}return t[0]}},72969:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.treeZeroAfterIndex=e.iterateNodesAtDepth=e.getNodesAtDepth=e.setNodesAtDepth=e.setNodeAtDepth=e.getNodeAtDepth=e.setNodeWithFn=e.setNode=e.getNode=e.Tree=void 0;const n=r(67048),i=r(45113),o=r(78894),s=r(47392),a=r(42456);class u{constructor(t,e){this._rootNode=t,e&&(\"undefined\"==typeof WeakRef?this.hook=e:this.hook=new WeakRef(e))}static createFromProof(t){return new u(s.createNodeFromProof(t))}get rootNode(){return this._rootNode}set rootNode(t){if(this._rootNode=t,this.hook)if(\"undefined\"==typeof WeakRef)this.hook(t);else{const e=this.hook.deref();e?e(t):this.hook=void 0}}get root(){return this.rootNode.root}clone(){return new u(this.rootNode)}getSubtree(t){return new u(this.getNode(t),(e=>this.setNode(t,e)))}getNode(t){return h(this.rootNode,t)}getNodeAtDepth(t,e){return p(this.rootNode,t,e)}getRoot(t){return this.getNode(t).root}setNode(t,e){this.rootNode=c(this.rootNode,t,e)}setNodeWithFn(t,e){this.rootNode=f(this.rootNode,t,e)}setNodeAtDepth(t,e,r){this.rootNode=m(this.rootNode,t,e,r)}setRoot(t,e){this.setNode(t,o.LeafNode.fromRoot(e))}getNodesAtDepth(t,e,r){return y(this.rootNode,t,e,r)}iterateNodesAtDepth(t,e,r){return b(this.rootNode,t,e,r)}getSingleProof(t){return a.createSingleProof(this.rootNode,t)[1]}getProof(t){return s.createProof(this.rootNode,t)}}function h(t,e){const r=i.convertGindexToBitstring(e);let n=t;for(let t=1;t<r.length;t++){if(n.isLeaf())throw new Error(`Invalid tree - found leaf at depth ${t}`);n=\"1\"===r[t]?n.right:n.left}return n}function c(t,e,r){const n=i.convertGindexToBitstring(e);return d(n,l(t,n),r)}function f(t,e,r){const n=i.convertGindexToBitstring(e),o=l(t,n),s=o[o.length-1];return d(n,o,r(\"1\"===n[n.length-1]?s.right:s.left))}function l(t,e){let r=t;const n=[t];for(let t=1;t<e.length-1;t++)r=\"1\"===e[t]?r.right:r.left,n.push(r);return n}function d(t,e,r){let n=r;for(let r=t.length-1;r>=1;r--)n=\"1\"===t[r]?new o.BranchNode(e[r-1].left,n):new o.BranchNode(n,e[r-1].right);return n}function p(t,e,r){if(0===e)return t;if(1===e)return 0===r?t.left:t.right;let n=t;for(let t=e-1;t>=0;t--)n=v(t,r)?n.left:n.right;return n}function m(t,e,r,n){return g(t,e,[r],[n])}function g(t,e,r,n){if(0===e)return n.length>0?n[0]:t;const i=new Array(e),s=new Array(e),a=e-1;let u=a,h=t;i[a]=t;for(let t=0;t<r.length;t++){const e=r[t];for(let t=u;t>0;t--)h=v(t,e)?h.left:h.right,i[t-1]=h;u=0;1!=(1&e)?e+1===r[t+1]?(h=new o.BranchNode(n[t],n[t+1]),t++):h=new o.BranchNode(n[t],h.right):h=new o.BranchNode(h.left,n[t]);const l=t>=r.length-1,d=l?a:(c=e,f=r[t+1],Math.ceil(Math.log2(-~(c^f)))-1);for(let t=1;t<=d;t++)if(v(t,e))l||t!==d?h=new o.BranchNode(h,i[t].right):(s[t]=h,h=i[t]);else{const e=s[t];void 0!==e?(h=new o.BranchNode(e,h),s[t]=void 0):h=new o.BranchNode(i[t].left,h)}u=d}var c,f;return h}function y(t,e,r,n){if(0===e)return 0===r&&n>0?[t]:[];if(1===e)return 0===n?[]:1===n?0===r?[t.left]:[t.right]:[t.left,t.right];const i=e-1;let o=i,s=t;const a=new Array(e),u=new Array(e),h=new Array(n);a[i]=t;for(let t=0;t<n;t++){for(let e=o;e>=0;e--){e!==o&&(a[e]=s);const n=v(e,r+t);u[e]=n,s=n?s.left:s.right}h[t]=s;for(let t=0;t<=i;t++)if(!0===u[t]){o=t;break}s=a[o]}return h}function*b(t,e,r,n){const i=r+n,o=e-1;let s=o,a=t;const u=new Array(e),h=new Array(e);u[o]=t;for(let t=r;t<i;t++){for(let e=s;e>=0;e--){e!==s&&(u[e]=a);const r=v(e,t);h[e]=r,a=r?a.left:a.right}yield a;for(let t=0;t<=o;t++)if(!0===h[t]){s=t;break}a=u[s]}}function v(t,e){if(t>31){const r=1<<t-32;return(e/2**32>>>0&r)!==r}const r=1<<t;return(e&r)!==r}e.Tree=u,e.getNode=h,e.setNode=c,e.setNodeWithFn=f,e.getNodeAtDepth=p,e.setNodeAtDepth=m,e.setNodesAtDepth=g,e.getNodesAtDepth=y,e.iterateNodesAtDepth=b,e.treeZeroAfterIndex=function(t,e,r){if(r<0)return n.zeroNode(e);const i=new Array(e),s=e-1;let a=s,u=t;i[s]=t;for(let t=a;t>=0;t--)u=v(t,r)?u.left:u.right,i[t-1]=u;a=0;for(let t=0;t<=s;t++)u=v(t,r)?new o.BranchNode(u,n.zeroNode(t)):new o.BranchNode(i[t].left,u);return u}},67048:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.zeroNode=void 0;const n=r(78894),i=[n.LeafNode.fromZero()];e.zeroNode=function(t){if(t>=i.length)for(let e=i.length;e<=t;e++)i[e]=new n.BranchNode(i[e-1],i[e-1]);return i[t]}},60289:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(\"positive integer expected, got \"+t)}function n(t,...e){if(!((r=t)instanceof Uint8Array||ArrayBuffer.isView(r)&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(e.length>0&&!e.includes(t.length))throw new Error(\"Uint8Array expected of length \"+e+\", got length=\"+t.length)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.anumber=r,e.abytes=n,e.ahash=function(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(t.outputLen),r(t.blockLen)},e.aexists=function(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")},e.aoutput=function(t,e){n(t);const r=e.outputLen;if(t.length<r)throw new Error(\"digestInto() expects output buffer of length at least \"+r)}},54584:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.HashMD=void 0,e.setBigUint64=o,e.Chi=function(t,e,r){return t&e^~t&r},e.Maj=function(t,e,r){return t&e^t&r^e&r};const n=r(60289),i=r(58955);function o(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}class s extends i.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.createView)(this.buffer)}update(t){(0,n.aexists)(this);const{view:e,buffer:r,blockLen:o}=this,s=(t=(0,i.toBytes)(t)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(t.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(e,0),this.pos=0);else{const e=(0,i.createView)(t);for(;o<=s-n;n+=o)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.aexists)(this),(0,n.aoutput)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:s,isLE:a}=this;let{pos:u}=this;e[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>s-u&&(this.process(r,0),u=0);for(let t=u;t<s;t++)e[t]=0;o(r,s-8,BigInt(8*this.length),a),this.process(r,0);const h=(0,i.createView)(t),c=this.outputLen;if(c%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const f=c/4,l=this.get();if(f>l.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t<f;t++)h.setUint32(4*t,l[t],a)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}e.HashMD=s},49873:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=void 0,e.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},67929:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.sha224=e.sha256=e.SHA256=void 0;const n=r(54584),i=r(58955),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class u extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=a[t-15],r=a[t-2],n=(0,i.rotr)(e,7)^(0,i.rotr)(e,18)^e>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;a[t]=o+a[t-7]+n+a[t-16]|0}let{A:r,B:s,C:u,D:h,E:c,F:f,G:l,H:d}=this;for(let t=0;t<64;t++){const e=d+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+(0,n.Chi)(c,f,l)+o[t]+a[t]|0,p=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,s,u)|0;d=l,l=f,f=c,c=h+e|0,h=u,u=s,s=r,r=e+p|0}r=r+this.A|0,s=s+this.B|0,u=u+this.C|0,h=h+this.D|0,c=c+this.E|0,f=f+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,s,u,h,c,f,l,d)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}e.SHA256=u;class h extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new u)),e.sha224=(0,i.wrapConstructor)((()=>new h))},58955:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Hash=e.nextTick=e.byteSwapIfBE=e.isLE=void 0,e.isBytes=function(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&\"Uint8Array\"===t.constructor.name},e.u8=function(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},e.u32=function(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))},e.createView=function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)},e.rotr=function(t,e){return t<<32-e|t>>>e},e.rotl=function(t,e){return t<<e|t>>>32-e>>>0},e.byteSwap=o,e.byteSwap32=function(t){for(let e=0;e<t.length;e++)t[e]=o(t[e])},e.bytesToHex=function(t){(0,i.abytes)(t);let e=\"\";for(let r=0;r<t.length;r++)e+=s[t[r]];return e},e.hexToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=u(t.charCodeAt(i)),o=u(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o<t;o++){n(o);const t=Date.now()-i;t>=0&&t<r||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=h,e.toBytes=c,e.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];(0,i.abytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r},e.checkOpts=function(t,e){if(void 0!==e&&\"[object Object]\"!=={}.toString.call(e))throw new Error(\"Options should be object or undefined\");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(c(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(c(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(c(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));if(n.crypto&&\"function\"==typeof n.crypto.randomBytes)return n.crypto.randomBytes(t);throw new Error(\"crypto.getRandomValues must be defined\")};const n=r(49873),i=r(60289);function o(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],e.byteSwapIfBE=e.isLE?t=>t:t=>o(t);const s=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));const a={_0:48,_9:57,A:65,F:70,a:97,f:102};function u(t){return t>=a._0&&t<=a._9?t-a._0:t>=a.A&&t<=a.F?t-(a.A-10):t>=a.a&&t<=a.f?t-(a.a-10):void 0}function h(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function c(t){return\"string\"==typeof t&&(t=h(t)),(0,i.abytes)(t),t}e.nextTick=async()=>{};e.Hash=class{clone(){return this._cloneInto()}}},8747:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BranchNodeStruct=void 0;const n=r(56567);class i extends n.Node{constructor(t,e){super(null,0,0,0,0,0,0,0),this.valueToNode=t,this.value=e}get rootHashObject(){if(null===this.h0){const t=this.valueToNode(this.value);super.applyHash(t.rootHashObject)}return this}get root(){return n.hashObjectToUint8Array(this.rootHashObject)}isLeaf(){return!1}get left(){return this.valueToNode(this.value).left}get right(){return this.valueToNode(this.value).right}}e.BranchNodeStruct=i},60557:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hash64=e.byteArrayEquals=e.toHexString=e.fromHexString=e.getUint8ByteToBitBooleanArray=e.BitArray=e.TreeViewDU=e.TreeView=e.isCompositeType=e.CompositeType=e.isBasicType=e.BasicType=e.Type=e.ByteArrayType=e.BitArrayType=e.ArrayType=e.VectorCompositeType=e.VectorBasicType=e.UnionType=e.UintNumberType=e.UintBigintType=e.NoneType=e.ListCompositeType=e.ListBasicType=e.ContainerNodeStructType=e.ContainerType=e.ByteVectorType=e.ByteListType=e.BooleanType=e.BitVectorType=e.BitListType=void 0;var n=r(10284);Object.defineProperty(e,\"BitListType\",{enumerable:!0,get:function(){return n.BitListType}});var i=r(21393);Object.defineProperty(e,\"BitVectorType\",{enumerable:!0,get:function(){return i.BitVectorType}});var o=r(12034);Object.defineProperty(e,\"BooleanType\",{enumerable:!0,get:function(){return o.BooleanType}});var s=r(13568);Object.defineProperty(e,\"ByteListType\",{enumerable:!0,get:function(){return s.ByteListType}});var a=r(50245);Object.defineProperty(e,\"ByteVectorType\",{enumerable:!0,get:function(){return a.ByteVectorType}});var u=r(25039);Object.defineProperty(e,\"ContainerType\",{enumerable:!0,get:function(){return u.ContainerType}});var h=r(73261);Object.defineProperty(e,\"ContainerNodeStructType\",{enumerable:!0,get:function(){return h.ContainerNodeStructType}});var c=r(26866);Object.defineProperty(e,\"ListBasicType\",{enumerable:!0,get:function(){return c.ListBasicType}});var f=r(5189);Object.defineProperty(e,\"ListCompositeType\",{enumerable:!0,get:function(){return f.ListCompositeType}});var l=r(81638);Object.defineProperty(e,\"NoneType\",{enumerable:!0,get:function(){return l.NoneType}});var d=r(30436);Object.defineProperty(e,\"UintBigintType\",{enumerable:!0,get:function(){return d.UintBigintType}}),Object.defineProperty(e,\"UintNumberType\",{enumerable:!0,get:function(){return d.UintNumberType}});var p=r(51851);Object.defineProperty(e,\"UnionType\",{enumerable:!0,get:function(){return p.UnionType}});var m=r(55021);Object.defineProperty(e,\"VectorBasicType\",{enumerable:!0,get:function(){return m.VectorBasicType}});var g=r(54013);Object.defineProperty(e,\"VectorCompositeType\",{enumerable:!0,get:function(){return g.VectorCompositeType}});var y=r(89659);Object.defineProperty(e,\"ArrayType\",{enumerable:!0,get:function(){return y.ArrayType}});var b=r(86612);Object.defineProperty(e,\"BitArrayType\",{enumerable:!0,get:function(){return b.BitArrayType}});var v=r(54316);Object.defineProperty(e,\"ByteArrayType\",{enumerable:!0,get:function(){return v.ByteArrayType}});var w=r(57451);Object.defineProperty(e,\"Type\",{enumerable:!0,get:function(){return w.Type}});var M=r(70645);Object.defineProperty(e,\"BasicType\",{enumerable:!0,get:function(){return M.BasicType}}),Object.defineProperty(e,\"isBasicType\",{enumerable:!0,get:function(){return M.isBasicType}});var _=r(18715);Object.defineProperty(e,\"CompositeType\",{enumerable:!0,get:function(){return _.CompositeType}}),Object.defineProperty(e,\"isCompositeType\",{enumerable:!0,get:function(){return _.isCompositeType}});var E=r(62542);Object.defineProperty(e,\"TreeView\",{enumerable:!0,get:function(){return E.TreeView}});var A=r(40332);Object.defineProperty(e,\"TreeViewDU\",{enumerable:!0,get:function(){return A.TreeViewDU}});var S=r(21714);Object.defineProperty(e,\"BitArray\",{enumerable:!0,get:function(){return S.BitArray}}),Object.defineProperty(e,\"getUint8ByteToBitBooleanArray\",{enumerable:!0,get:function(){return S.getUint8ByteToBitBooleanArray}});var x=r(71518);Object.defineProperty(e,\"fromHexString\",{enumerable:!0,get:function(){return x.fromHexString}}),Object.defineProperty(e,\"toHexString\",{enumerable:!0,get:function(){return x.toHexString}}),Object.defineProperty(e,\"byteArrayEquals\",{enumerable:!0,get:function(){return x.byteArrayEquals}});var B=r(35397);Object.defineProperty(e,\"hash64\",{enumerable:!0,get:function(){return B.hash64}})},57451:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Type=void 0;e.Type=class{value_toTree(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),this.tree_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}tree_toValue(t){const e=new Uint8Array(this.tree_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.tree_serializeToBytes({uint8Array:e,dataView:r},0,t),this.value_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}serialize(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),e}deserialize(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_deserializeFromBytes({uint8Array:t,dataView:e},0,t.length)}}},89659:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayType=void 0;const n=r(56567),i=r(18715),o=r(63191);class s extends i.CompositeType{constructor(t){super(),this.elementType=t}defaultValue(){return o.value_defaultValueArray(this.elementType,this.defaultLen)}getPropertyType(){return this.elementType}getPropertyGindex(t){if(\"number\"!=typeof t)throw Error(`Invalid array index: ${t}`);const e=Math.floor(t/this.itemsPerChunk);return n.toGindex(this.depth,BigInt(e))}getIndexProperty(t){return t}tree_getLeafGindices(t,e){let r;if(this.isList){if(!e)throw new Error(\"List type requires tree argument to get leaves\");r=this.tree_getLength(e)}else r=this.tree_getLength(null);const o=[];if(i.isCompositeType(this.elementType)){const i=n.toGindex(this.depth,BigInt(0)),s=i+BigInt(r),a=n.concatGindices([t,i]);if(null===this.elementType.fixedSize){if(!e)throw new Error(\"Array of variable size requires tree argument to get leaves\");for(let t=i,r=a;t<s;t++,r++)o.push(...this.elementType.tree_getLeafGindices(r,n.getNode(e,t)))}else for(let t=0,e=a;t<r;t++,e++)o.push(...this.elementType.tree_getLeafGindices(e))}else{const e=Math.ceil(r/this.itemsPerChunk),i=n.concatGindices([t,n.toGindex(this.depth,BigInt(0))]),s=i+BigInt(e);for(let t=i;t<s;t++)o.push(t)}return this.isList&&o.push(n.concatGindices([t,i.LENGTH_GINDEX])),o}fromJson(t){return o.value_fromJsonArray(this.elementType,t,this)}toJson(t){return o.value_toJsonArray(this.elementType,t,this)}clone(t){return o.value_cloneArray(this.elementType,t)}equals(t,e){return o.value_equals(this.elementType,t,e)}}e.ArrayType=s},63191:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertValidArrayLength=e.value_defaultValueArray=e.value_equals=e.value_cloneArray=e.value_toJsonArray=e.value_fromJsonArray=e.tree_deserializeFromBytesArrayBasic=e.tree_serializeToBytesArrayBasic=e.value_deserializeFromBytesArrayBasic=e.value_serializeToBytesArrayBasic=e.setChunksNode=e.addLengthNode=e.getChunksNodeFromRootNode=e.getLengthFromRootNode=void 0;const n=r(56567);function i(t,e){return new n.BranchNode(t,n.LeafNode.fromUint32(e))}function o(t,e,r){if(r&&t%1!=0)throw Error(\"size not multiple of element fixedSize\");if(e.isList){if(t>e.limit)throw new Error(`Invalid list length ${t} over limit ${e.limit}`)}else if(t!==e.length)throw new Error(`Incorrect vector length ${t} expected ${e.length}`)}e.getLengthFromRootNode=function(t){return t.right.getUint(4,0)},e.getChunksNodeFromRootNode=function(t){return t.left},e.addLengthNode=i,e.setChunksNode=function(t,e,r){const i=void 0!==r?n.LeafNode.fromUint32(r):t.right;return new n.BranchNode(e,i)},e.value_serializeToBytesArrayBasic=function(t,e,r,n,i){const o=t.byteLength;for(let s=0;s<e;s++)t.value_serializeToBytes(r,n+s*o,i[s]);return n+e*o},e.value_deserializeFromBytesArrayBasic=function(t,e,r,n,i){const s=t.byteLength,a=(n-r)/s;o(a,i,!0);const u=new Array(a);for(let n=0;n<a;n++)u[n]=t.value_deserializeFromBytes(e,r+n*s,r+(n+1)*s);return u},e.tree_serializeToBytesArrayBasic=function(t,e,r,i,o,s){const a=t.byteLength*e,u=Math.ceil(a/32),h=n.getNodesAtDepth(s,r,0,u);return n.packedNodeRootsToBytes(i.dataView,o,a,h),o+a},e.tree_deserializeFromBytesArrayBasic=function(t,e,r,s,a,u){const h=(a-s)/t.byteLength;o(h,u,!0);const c=n.packedRootsBytesToNode(e,r.dataView,s,a);return u.isList?i(c,h):c},e.value_fromJsonArray=function(t,e,r){if(!Array.isArray(e))throw Error(\"JSON is not an array\");o(e.length,r);const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=t.fromJson(e[r]);return n},e.value_toJsonArray=function(t,e,r){const n=r.isList?e.length:r.length,i=new Array(n);for(let r=0;r<n;r++)i[r]=t.toJson(e[r]);return i},e.value_cloneArray=function(t,e){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.clone(e[n]);return r},e.value_equals=function(t,e,r){if(e.length!==r.length)return!1;for(let n=0;n<e.length;n++)if(!t.equals(e[n],r[n]))return!1;return!0},e.value_defaultValueArray=function(t,e){const r=new Array(e);for(let n=0;n<e;n++)r[n]=t.defaultValue();return r},e.assertValidArrayLength=o},50404:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.value_getRootsArrayComposite=e.tree_deserializeFromBytesArrayComposite=e.tree_serializeToBytesArrayComposite=e.tree_serializedSizeArrayComposite=e.value_deserializeFromBytesArrayComposite=e.value_serializeToBytesArrayComposite=e.value_serializedSizeArrayComposite=e.maxSizeArrayComposite=e.minSizeArrayComposite=void 0;const n=r(56567),i=r(63191);function o(t,e,r,n,o){const s=n-r;let a;if(null===t)a=function(t,e,r){if(0===r)return new Uint32Array(0);const n=t.getUint32(e,!0),i=n;if(0===n)throw Error(\"First offset must be > 0\");if(i%4!=0)throw Error(\"Offset data length not multiple of 4\");const o=i/4,s=new Uint32Array(o);s[0]=n;for(let n=1;n<o;n++){const i=t.getUint32(e+4*n,!0);if(s[n]=i,i>r)throw new Error(`Offset out of bounds ${i} > ${r}`);if(i<s[n-1])throw new Error(`Offsets must be increasing ${i} < ${s[n-1]}`)}return s}(e,r,s);else{if(0===t)throw Error(\"element fixed length is 0\");if(s%t!=0)throw Error(`size ${s} is not multiple of element fixedSize ${t}`);const e=s/t;a=new Uint32Array(e);for(let r=0;r<e;r++)a[r]=r*t}return i.assertValidArrayLength(a.length,o),a}e.minSizeArrayComposite=function(t,e){return null===t.fixedSize?e*(4+t.minSize):e*t.minSize},e.maxSizeArrayComposite=function(t,e){return null===t.fixedSize?e*(4+t.maxSize):e*t.maxSize},e.value_serializedSizeArrayComposite=function(t,e,r){if(null===t.fixedSize){let n=0;for(let i=0;i<e;i++)n+=4+t.value_serializedSize(r[i]);return n}return e*t.fixedSize},e.value_serializeToBytesArrayComposite=function(t,e,r,n,i){if(null===t.fixedSize){let o=n+4*e;for(let s=0;s<e;s++)r.dataView.setUint32(n+4*s,o-n,!0),o=t.value_serializeToBytes(r,o,i[s]);return o}for(let o=0;o<e;o++)t.value_serializeToBytes(r,n+o*t.fixedSize,i[o]);return n+e*t.fixedSize},e.value_deserializeFromBytesArrayComposite=function(t,e,r,n,i){const s=o(t.fixedSize,e.dataView,r,n,i),a=s.length,u=new Array(a);for(let i=0;i<a;i++){const o=r+s[i],h=i===a-1?n:r+s[i+1];u[i]=t.value_deserializeFromBytes(e,o,h)}return u},e.tree_serializedSizeArrayComposite=function(t,e,r,i){if(null===t.fixedSize){const o=n.getNodesAtDepth(i,r,0,e);let s=0;for(let e=0;e<o.length;e++)s+=4+t.tree_serializedSize(o[e]);return s}return e*t.fixedSize},e.tree_serializeToBytesArrayComposite=function(t,e,r,i,o,s){const a=n.getNodesAtDepth(i,r,0,e);if(null===t.fixedSize){let r=s+4*e;const{dataView:n}=o;for(let e=0;e<a.length;e++)n.setUint32(s+4*e,r-s,!0),r=t.tree_serializeToBytes(o,r,a[e]);return r}for(let e=0;e<a.length;e++)s=t.tree_serializeToBytes(o,s,a[e]);return s},e.tree_deserializeFromBytesArrayComposite=function(t,e,r,s,a,u){const h=o(t.fixedSize,r.dataView,s,a,u),c=h.length,f=new Array(c);for(let e=0;e<c;e++){const n=s+h[e],i=e===c-1?a:s+h[e+1];f[e]=t.tree_deserializeFromBytes(r,n,i)}const l=n.subtreeFillToContents(f,e);return u.isList?i.addLengthNode(l,c):l},e.value_getRootsArrayComposite=function(t,e,r){const n=new Array(e);for(let i=0;i<e;i++)n[i]=t.hashTreeRoot(r[i]);return n}},70645:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isBasicType=e.BasicType=void 0;const n=r(57451);class i extends n.Type{constructor(){super(...arguments),this.isBasic=!0,this.depth=0,this.maxChunkCount=1}value_serializedSize(){return this.byteLength}tree_serializedSize(){return this.byteLength}assertValidSize(t){if(t!==this.byteLength)throw Error(`BasicType invalid size ${t} expected ${this.byteLength}`)}hashTreeRoot(t){const e=new Uint8Array(32),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),e}clone(t){return t}equals(t,e){return t===e}}e.BasicType=i,e.isBasicType=function(t){return t.isBasic}},86612:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitArrayType=void 0;const n=r(56567),i=r(71518),o=r(35397),s=r(18715),a=r(76572),u=r(57844);class h extends s.CompositeType{constructor(){super(...arguments),this.isViewMutable=!0}getView(t){return new a.BitArrayTreeView(this,t)}getViewDU(t){return new u.BitArrayTreeViewDU(this,t)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}getRoots(t){return o.splitIntoRootChunks(t.uint8Array)}getPropertyGindex(){return null}getPropertyType(){throw Error(\"Must only request BitArray complete data\")}getIndexProperty(){throw Error(\"Must only request BitArray complete data\")}tree_fromProofNode(t){return{node:t,done:!0}}tree_getLeafGindices(t,e){const r=this.tree_getByteLen(e),i=Math.ceil(r/32),o=n.concatGindices([t,n.toGindex(this.depth,BigInt(0))]),a=new Array(i);for(let t=0,e=o;t<i;t++,e++)a[t]=e;return this.isList&&a.push(n.concatGindices([t,s.LENGTH_GINDEX])),a}fromJson(t){const e=i.fromHexString(t),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}toJson(t){return i.toHexString(this.serialize(t))}clone(t){return t.clone()}equals(t,e){return t.bitLen===e.bitLen&&i.byteArrayEquals(t.uint8Array,e.uint8Array)}}e.BitArrayType=h},10284:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitListType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(63191),a=r(21714),u=r(86612);class h extends u.BitArrayType{constructor(t,e){if(super(),this.limitBits=t,this.fixedSize=null,this.minSize=1,this.isList=!0,0===t)throw Error(\"List limit must be > 0\");this.typeName=e?.typeName??`BitList[${t}]`,this.maxChunkCount=Math.ceil(this.limitBits/8/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=1+this.chunkDepth,this.maxSize=Math.ceil(t/8)+1}static named(t,e){return new(o.namedClass(h,e.typeName))(t,e)}defaultValue(){return a.BitArray.fromBitLen(0)}value_serializedSize(t){return c(t.bitLen)}value_serializeToBytes(t,e,r){return t.uint8Array.set(r.uint8Array,e),f(t.uint8Array,e,r.bitLen)}value_deserializeFromBytes(t,e,r){const{uint8Array:n,bitLen:i}=this.deserializeUint8ArrayBitListFromBytes(t.uint8Array,e,r);return new a.BitArray(n,i)}tree_serializedSize(t){return c(s.getLengthFromRootNode(t))}tree_serializeToBytes(t,e,r){const i=s.getChunksNodeFromRootNode(r),o=s.getLengthFromRootNode(r),a=Math.ceil(o/8),u=Math.ceil(a/32),h=n.getNodesAtDepth(i,this.chunkDepth,0,u);return n.packedNodeRootsToBytes(t.dataView,e,a,h),f(t.uint8Array,e,o)}tree_deserializeFromBytes(t,e,r){const{uint8Array:i,bitLen:o}=this.deserializeUint8ArrayBitListFromBytes(t.uint8Array,e,r),a=new DataView(i.buffer,i.byteOffset,i.byteLength),u=n.packedRootsBytesToNode(this.chunkDepth,a,0,i.length);return s.addLengthNode(u,o)}tree_getByteLen(t){if(!t)throw new Error(\"BitListType requires a node to get leaves\");return Math.ceil(s.getLengthFromRootNode(t)/8)}hashTreeRoot(t){return i.mixInLength(super.hashTreeRoot(t),t.bitLen)}deserializeUint8ArrayBitListFromBytes(t,e,r){const{uint8Array:n,bitLen:i}=function(t,e,r){if(r>t.length)throw Error(`BitList attempting to read byte ${r} of data length ${t.length}`);const n=t[r-1],i=r-e;if(0===n)throw new Error(\"Invalid deserialized bitlist, padding bit required\");if(1===n){return{uint8Array:Uint8Array.prototype.slice.call(t,e,r-1),bitLen:8*(i-1)}}const o=Uint8Array.prototype.slice.call(t,e,r),s=n.toString(2).length-1,a=8*(i-1)+s,u=255>>8-s;return o[i-1]&=u,{uint8Array:o,bitLen:a}}(t,e,r);if(i>this.limitBits)throw Error(`bitLen over limit ${i} > ${this.limitBits}`);return{uint8Array:n,bitLen:i}}}function c(t){const e=Math.ceil(t/8);return t%8==0?e+1:e}function f(t,e,r){const n=e+Math.ceil(r/8);return r%8==0?(t[n]=1,n+1):(t[n-1]|=1<<r%8,n)}e.BitListType=h},21393:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitVectorType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(21714),a=r(86612);class u extends a.BitArrayType{constructor(t,e){if(super(),this.lengthBits=t,this.isList=!1,0===t)throw Error(\"Vector length must be > 0\");this.typeName=e?.typeName??`BitVector[${t}]`,this.chunkCount=Math.ceil(this.lengthBits/8/32),this.maxChunkCount=this.chunkCount,this.depth=i.maxChunksToDepth(this.chunkCount),this.fixedSize=Math.ceil(this.lengthBits/8),this.minSize=this.fixedSize,this.maxSize=this.fixedSize,this.zeroBitsMask=t%8==0?0:255&255<<t%8}static named(t,e){return new(o.namedClass(u,e.typeName))(t,e)}defaultValue(){return s.BitArray.fromBitLen(this.lengthBits)}value_serializedSize(){return this.fixedSize}value_serializeToBytes(t,e,r){return t.uint8Array.set(r.uint8Array,e),e+this.fixedSize}value_deserializeFromBytes(t,e,r){return this.assertValidLength(t.uint8Array,e,r),new s.BitArray(Uint8Array.prototype.slice.call(t.uint8Array,e,r),this.lengthBits)}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(t,e,r){const i=n.getNodesAtDepth(r,this.depth,0,this.chunkCount);return n.packedNodeRootsToBytes(t.dataView,e,this.fixedSize,i),e+this.fixedSize}tree_deserializeFromBytes(t,e,r){return this.assertValidLength(t.uint8Array,e,r),n.packedRootsBytesToNode(this.depth,t.dataView,e,r)}tree_getByteLen(){return this.fixedSize}assertValidLength(t,e,r){const n=r-e;if(r-e!==this.fixedSize)throw Error(`Invalid BitVector size ${n} != ${this.fixedSize}`);if(this.zeroBitsMask>0&&(t[r-1]&this.zeroBitsMask)>0)throw Error(\"BitVector: nonzero bits past length\")}}e.BitVectorType=u},12034:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BooleanType=void 0;const n=r(56567),i=r(61425),o=r(70645);class s extends o.BasicType{constructor(t){super(),this.byteLength=1,this.itemsPerChunk=32,this.fixedSize=1,this.minSize=1,this.maxSize=1,this.typeName=t?.typeName??\"boolean\"}static named(t){return new(i.namedClass(s,t.typeName))(t)}defaultValue(){return!1}value_serializeToBytes(t,e,r){return t.uint8Array[e]=r?1:0,e+1}value_deserializeFromBytes(t,e,r){switch(this.assertValidSize(r-e),t.uint8Array[e]){case 1:return!0;case 0:return!1;default:throw new Error(`Boolean: invalid value: ${t.uint8Array[e]}`)}}tree_serializeToBytes(t,e,r){return t.uint8Array[e]=r.getUint(4,0),e+1}tree_deserializeFromBytes(t,e,r){this.assertValidSize(r-e);const i=t.uint8Array[e];if(i>1)throw Error(`Boolean: invalid value ${i}`);return n.LeafNode.fromUint32(i)}tree_getFromNode(t){return 1===t.getUint(4,0)}tree_setToNode(t,e){t.setUint(4,0,e?1:0)}tree_getFromPackedNode(t,e){const r=e%this.itemsPerChunk;return 0!==t.getUint(1,r)}tree_setToPackedNode(t,e,r){const n=e%this.itemsPerChunk;t.setUint(1,n,r?1:0)}fromJson(t){if(\"boolean\"!=typeof t)throw Error(`JSON invalid type ${typeof t} expected boolean`);return t}toJson(t){return t}}e.BooleanType=s},54316:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ByteArrayType=void 0;const n=r(56567),i=r(71518),o=r(35397),s=r(18715);class a extends s.CompositeType{constructor(){super(...arguments),this.isViewMutable=!1}defaultValue(){return new Uint8Array(this.minSize)}getView(t){return this.getViewDU(t.rootNode)}getViewDU(t){return this.tree_toValue(t)}commitView(t){return this.commitViewDU(t)}commitViewDU(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),this.tree_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}cacheOfViewDU(){}toView(t){return t}toViewDU(t){return t}value_serializeToBytes(t,e,r){return t.uint8Array.set(r,e),e+r.length}value_deserializeFromBytes(t,e,r){return this.assertValidSize(r-e),Uint8Array.prototype.slice.call(t.uint8Array,e,r)}getRoots(t){return o.splitIntoRootChunks(t)}getPropertyGindex(){return null}getPropertyType(){throw Error(\"Must only request ByteArray complete data\")}getIndexProperty(){throw Error(\"Must only request ByteArray complete data\")}tree_fromProofNode(t){return{node:t,done:!0}}tree_getLeafGindices(t,e){const r=this.tree_getByteLen(e),i=Math.ceil(r/32),o=n.concatGindices([t,n.toGindex(this.depth,BigInt(0))]),a=new Array(i);for(let t=0,e=o;t<i;t++,e++)a[t]=e;return this.isList&&a.push(n.concatGindices([t,s.LENGTH_GINDEX])),a}fromJson(t){const e=i.fromHexString(t);return this.assertValidSize(e.length),e}toJson(t){return i.toHexString(t)}clone(t){return t}equals(t,e){return i.byteArrayEquals(t,e)}}e.ByteArrayType=a},13568:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ByteListType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(63191),a=r(54316);class u extends a.ByteArrayType{constructor(t,e){if(super(),this.limitBytes=t,this.fixedSize=null,this.isList=!0,0===t)throw Error(\"List limit must be > 0\");this.typeName=e?.typeName??`ByteList[${t}]`,this.maxChunkCount=Math.ceil(this.limitBytes/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=1+this.chunkDepth,this.minSize=0,this.maxSize=this.limitBytes}static named(t,e){return new(o.namedClass(u,e.typeName))(t,e)}value_serializedSize(t){return t.length}tree_serializedSize(t){return s.getLengthFromRootNode(t)}tree_serializeToBytes(t,e,r){const i=s.getChunksNodeFromRootNode(r),o=s.getLengthFromRootNode(r),a=Math.ceil(o/32),u=n.getNodesAtDepth(i,this.chunkDepth,0,a);return n.packedNodeRootsToBytes(t.dataView,e,o,u),e+o}tree_deserializeFromBytes(t,e,r){this.assertValidSize(r-e);const i=n.packedRootsBytesToNode(this.chunkDepth,t.dataView,e,r);return s.addLengthNode(i,r-e)}tree_getByteLen(t){if(!t)throw new Error(\"ByteListType requires a node to get leaves\");return s.getLengthFromRootNode(t)}hashTreeRoot(t){return i.mixInLength(super.hashTreeRoot(t),t.length)}assertValidSize(t){if(t>this.limitBytes)throw Error(`ByteList invalid size ${t} limit ${this.limitBytes}`)}}e.ByteListType=u},50245:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ByteVectorType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(54316);class a extends s.ByteArrayType{constructor(t,e){if(super(),this.lengthBytes=t,this.isList=!1,0===t)throw Error(\"Vector length must be > 0\");this.typeName=e?.typeName??`ByteVector[${t}]`,this.maxChunkCount=Math.ceil(this.lengthBytes/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=this.lengthBytes,this.minSize=this.fixedSize,this.maxSize=this.fixedSize}static named(t,e){return new(o.namedClass(a,e.typeName))(t,e)}value_serializedSize(){return this.fixedSize}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(t,e,r){const i=n.getNodesAtDepth(r,this.chunkDepth,0,this.maxChunkCount);return n.packedNodeRootsToBytes(t.dataView,e,this.fixedSize,i),e+this.fixedSize}tree_deserializeFromBytes(t,e,r){return this.assertValidSize(r-e),n.packedRootsBytesToNode(this.chunkDepth,t.dataView,e,r)}tree_getByteLen(){return this.lengthBytes}assertValidSize(t){if(t!==this.lengthBytes)throw Error(`ByteVector invalid size ${t} expected ${this.lengthBytes}`)}}e.ByteVectorType=a},18715:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isCompositeType=e.CompositeType=e.LENGTH_GINDEX=void 0;const n=r(56567),i=r(71518),o=r(35397),s=r(18081),a=r(57451);e.LENGTH_GINDEX=BigInt(3);const u=Symbol(\"ssz_cached_permanent_root\");class h extends a.Type{constructor(t){super(),this.cachePermanentRootStruct=t,this.isBasic=!1}defaultView(){return this.toView(this.defaultValue())}defaultViewDU(){return this.toViewDU(this.defaultValue())}deserializeToView(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=this.tree_deserializeFromBytes({uint8Array:t,dataView:e},0,t.length);return this.getView(new n.Tree(r))}deserializeToViewDU(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=this.tree_deserializeFromBytes({uint8Array:t,dataView:e},0,t.length);return this.getViewDU(r)}toView(t){const e=this.value_toTree(t);return this.getView(new n.Tree(e))}toViewDU(t){const e=this.value_toTree(t);return this.getViewDU(e)}toValueFromView(t){const e=this.commitView(t);return this.tree_toValue(e)}toValueFromViewDU(t){const e=this.commitViewDU(t);return this.tree_toValue(e)}toViewFromViewDU(t){const e=this.commitViewDU(t);return this.getView(new n.Tree(e))}toViewDUFromView(t){const e=this.commitView(t);return this.getViewDU(e)}hashTreeRoot(t){if(this.cachePermanentRootStruct){const e=t[u];if(e)return e}const e=o.merkleize(this.getRoots(t),this.maxChunkCount);return this.cachePermanentRootStruct&&(t[u]=e),e}getCachedPermanentRoot(t){return t[u]}createFromProof(t,e){const r=n.Tree.createFromProof(t).rootNode,o=s.treePostProcessFromProofNode(r,this);if(void 0!==e&&!i.byteArrayEquals(o.root,e))throw new Error(\"Proof does not match trusted root\");return this.getView(new n.Tree(o))}tree_createProof(t,e){const r=this.tree_createProofGindexes(t,e);return n.createProof(t,{type:n.ProofType.treeOffset,gindices:r})}tree_createProofGindexes(t,e){const r=[];for(const i of e){const{type:e,gindex:o}=this.getPathInfo(i);if(c(e)){const i=e.tree_getLeafGindices(o,null===e.fixedSize?n.getNode(t,o):void 0);for(const t of i)r.push(t)}else r.push(o)}return r}getPathInfo(t){const e=[];let r=this;for(const n of t){if(r.isBasic)throw new Error(\"Invalid path: cannot navigate beyond a basic type\");const t=r.getPropertyGindex(n);null!==t&&(e.push(t),r=r.getPropertyType(n))}return{type:r,gindex:n.concatGindices(e)}}tree_fromProofNode(t){return{node:t,done:!1}}}function c(t){return!t.isBasic}e.CompositeType=h,e.isCompositeType=c},25039:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.renderContainerTypeName=e.precomputeJsonKey=e.ContainerType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(18715),a=r(37685),u=r(68865),h=r(79705);class c extends s.CompositeType{constructor(t,e){super(e?.cachePermanentRootStruct),this.fields=t,this.opts=e,this.isList=!1,this.isViewMutable=!0,this.typeName=e?.typeName??l(t),this.maxChunkCount=Object.keys(t).length,this.depth=i.maxChunksToDepth(this.maxChunkCount),this.fieldsEntries=[];for(const r of Object.keys(t))this.fieldsEntries.push({fieldName:r,fieldType:this.fields[r],jsonKey:f(r,e?.casingMap,e?.jsonCase),gindex:n.toGindex(this.depth,BigInt(this.fieldsEntries.length))});if(0===this.fieldsEntries.length)throw Error(\"Container must have > 0 fields\");this.fieldsGindex={};for(let t=0;t<this.fieldsEntries.length;t++)this.fieldsGindex[this.fieldsEntries[t].fieldName]=n.toGindex(this.depth,BigInt(t));this.jsonKeyToFieldName={};for(const{fieldName:t,jsonKey:e}of this.fieldsEntries)this.jsonKeyToFieldName[e]=t;const{minLen:r,maxLen:o,fixedSize:s}=function(t){let e=0,r=0,n=0;for(const i of Object.values(t))e+=i.minSize,r+=i.maxSize,null===i.fixedSize?(e+=4,r+=4,n=null):null!==n&&(n+=i.fixedSize);return{minLen:e,maxLen:r,fixedSize:n}}(t);this.minSize=r,this.maxSize=o,this.fixedSize=s;const{isFixedLen:h,fieldRangesFixedLen:c,variableOffsetsPosition:d,fixedEnd:p}=function(t){const e=[],r=[],n=[];let i=0;for(const o of Object.values(t))e.push(null!==o.fixedSize),null===o.fixedSize?(n.push(i),i+=4):(r.push({start:i,end:i+o.fixedSize}),i+=o.fixedSize);return{isFixedLen:e,fieldRangesFixedLen:r,variableOffsetsPosition:n,fixedEnd:i}}(t);this.isFixedLen=h,this.fieldRangesFixedLen=c,this.variableOffsetsPosition=d,this.fixedEnd=p,this.TreeView=e?.getContainerTreeViewClass?.(this)??a.getContainerTreeViewClass(this),this.TreeViewDU=e?.getContainerTreeViewDUClass?.(this)??u.getContainerTreeViewDUClass(this)}static named(t,e){return new(o.namedClass(c,e.typeName))(t,e)}defaultValue(){const t={};for(const{fieldName:e,fieldType:r}of this.fieldsEntries)t[e]=r.defaultValue();return t}getView(t){return new this.TreeView(this,t)}getViewDU(t,e){return new this.TreeViewDU(this,t,e)}cacheOfViewDU(t){return t.cache}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}value_serializedSize(t){let e=0;for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];e+=null===i.fixedSize?4+i.value_serializedSize(t[n]):i.fixedSize}return e}value_serializeToBytes(t,e,r){let n=e,i=e+this.fixedEnd;for(let o=0;o<this.fieldsEntries.length;o++){const{fieldName:s,fieldType:a}=this.fieldsEntries[o];null===a.fixedSize?(t.dataView.setUint32(n,i-e,!0),n+=4,i=a.value_serializeToBytes(t,i,r[s])):n=a.value_serializeToBytes(t,n,r[s])}return i}value_deserializeFromBytes(t,e,r){const n=this.getFieldRanges(t.dataView,e,r),i={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:o,fieldType:s}=this.fieldsEntries[r],a=n[r];i[o]=s.value_deserializeFromBytes(t,e+a.start,e+a.end)}return i}tree_serializedSize(t){let e=0;const r=n.getNodesAtDepth(t,this.depth,0,this.fieldsEntries.length);for(let t=0;t<this.fieldsEntries.length;t++){const{fieldType:n}=this.fieldsEntries[t],i=r[t];e+=null===n.fixedSize?4+n.tree_serializedSize(i):n.fixedSize}return e}tree_serializeToBytes(t,e,r){let i=e,o=e+this.fixedEnd;const s=n.getNodesAtDepth(r,this.depth,0,this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldType:n}=this.fieldsEntries[r],a=s[r];null===n.fixedSize?(t.dataView.setUint32(i,o-e,!0),i+=4,o=n.tree_serializeToBytes(t,o,a)):i=n.tree_serializeToBytes(t,i,a)}return o}tree_deserializeFromBytes(t,e,r){const i=this.getFieldRanges(t.dataView,e,r),o=new Array(this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldType:n}=this.fieldsEntries[r],s=i[r];o[r]=n.tree_deserializeFromBytes(t,e+s.start,e+s.end)}return n.subtreeFillToContents(o,this.depth)}getRoots(t){const e=new Array(this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];e[r]=i.hashTreeRoot(t[n])}return e}getPropertyGindex(t){const e=this.fieldsGindex[t]??this.fieldsGindex[this.jsonKeyToFieldName[t]];if(void 0===e)throw Error(`Unknown container property ${t}`);return e}getPropertyType(t){const e=this.fields[t]??this.fields[this.jsonKeyToFieldName[t]];if(void 0===e)throw Error(`Unknown container property ${t}`);return e}getIndexProperty(t){return t>=this.fieldsEntries.length?null:this.fieldsEntries[t].fieldName}tree_getLeafGindices(t,e){const r=[];for(let i=0;i<this.fieldsEntries.length;i++){const{fieldName:o,fieldType:s}=this.fieldsEntries[i],a=this.fieldsGindex[o],u=n.concatGindices([t,a]);if(s.isBasic)r.push(u);else{const t=s;if(null===s.fixedSize){if(!e)throw new Error(\"variable type requires tree argument to get leaves\");r.push(...t.tree_getLeafGindices(u,n.getNode(e,a)))}else r.push(...t.tree_getLeafGindices(u))}}return r}fromJson(t){if(\"object\"!=typeof t)throw Error(\"JSON must be of type object\");if(null===t)throw Error(\"JSON must not be null\");const e={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i,jsonKey:o}=this.fieldsEntries[r],s=t[o];if(void 0===s)throw Error(`JSON expected key ${o} is undefined`);e[n]=i.fromJson(s)}return e}toJson(t){const e={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i,jsonKey:o}=this.fieldsEntries[r];e[o]=i.toJson(t[n])}return e}clone(t){const e={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];e[n]=i.clone(t[n])}return e}equals(t,e){for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];if(!i.equals(t[n],e[n]))return!1}return!0}getFieldRanges(t,e,r){if(0===this.variableOffsetsPosition.length){const t=r-e;if(t!==this.fixedEnd)throw Error(`${this.typeName} size ${t} not equal fixed size ${this.fixedEnd}`);return this.fieldRangesFixedLen}const n=function(t,e,r,n,i){const o=r-e,s=new Array(i.length);for(let r=0;r<i.length;r++){const a=t.getUint32(e+i[r],!0);if(a>o)throw new Error(`Offset out of bounds ${a} > ${o}`);if(0===r){if(a!==n)throw new Error(`First offset must equal to fixedEnd ${a} != ${n}`)}else if(a<s[r-1])throw new Error(`Offsets must be increasing ${a} < ${s[r-1]}`);s[r]=a}return s}(t,e,r,this.fixedEnd,this.variableOffsetsPosition);n.push(r-e);let i=0,o=0;const s=new Array(this.isFixedLen.length);for(let t=0;t<this.isFixedLen.length;t++)this.isFixedLen[t]?s[t]=this.fieldRangesFixedLen[o++]:(s[t]={start:n[i],end:n[i+1]},i++);return s}}function f(t,e,r){if(e){const r=e[t];if(void 0===r)throw Error(`casingMap[${t}] not defined`);return r}return r?h.Case[r](t):t}function l(t,e=\"Container\"){return`${e}({${Object.keys(t).map((e=>`${e}: ${t[e].typeName}`)).join(\", \")}})`}e.ContainerType=c,e.precomputeJsonKey=f,e.renderContainerTypeName=l},73261:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ContainerNodeStructType=void 0;const n=r(18715),i=r(25039),o=r(61425),s=r(81225),a=r(84320),u=r(8747);class h extends i.ContainerType{constructor(t,e){super(t,{typeName:e?.typeName??i.renderContainerTypeName(t,\"ContainerNodeStruct\"),...e,getContainerTreeViewClass:s.getContainerTreeViewClass,getContainerTreeViewDUClass:a.getContainerTreeViewDUClass}),this.fields=t;for(const{fieldName:t,fieldType:e}of this.fieldsEntries)if(n.isCompositeType(e)&&e.isViewMutable)throw Error(`ContainerNodeStructType field '${t}' ${e.typeName} view is mutable`)}static named(t,e){return new(o.namedClass(i.ContainerType,e.typeName))(t,e)}tree_serializedSize(t){return this.value_serializedSize(t.value)}tree_serializeToBytes(t,e,r){const{value:n}=r;return this.value_serializeToBytes(t,e,n)}tree_deserializeFromBytes(t,e,r){const n=this.value_deserializeFromBytes(t,e,r);return new u.BranchNodeStruct(this.valueToTree.bind(this),n)}getPropertyGindex(){return null}tree_fromProofNode(t){const e=new Uint8Array(super.tree_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);super.tree_serializeToBytes({uint8Array:e,dataView:r},0,t);const n=this.value_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length);return{node:new u.BranchNodeStruct(this.valueToTree.bind(this),n),done:!0}}tree_toValue(t){return t.value}value_toTree(t){return new u.BranchNodeStruct(this.valueToTree.bind(this),t)}valueToTree(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),super.tree_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}}e.ContainerNodeStructType=h},26866:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListBasicType=void 0;const n=r(63191),i=r(35397),o=r(61425),s=r(19291),a=r(61828),u=r(89659);class h extends u.ArrayType{constructor(t,e,r){if(super(t),this.elementType=t,this.limit=e,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,this.defaultLen=0,!t.isBasic)throw Error(\"elementType must be basic\");if(0===e)throw Error(\"List limit must be > 0\");this.typeName=r?.typeName??`List[${t.typeName}, ${e}]`,this.itemsPerChunk=32/t.byteLength,this.maxChunkCount=Math.ceil(this.limit*t.byteLength/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth+1,this.minSize=0,this.maxSize=this.limit*t.maxSize}static named(t,e,r){return new(o.namedClass(h,r.typeName))(t,e,r)}getView(t){return new s.ListBasicTreeView(this,t)}getViewDU(t,e){return new a.ListBasicTreeViewDU(this,t,e)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}value_serializedSize(t){return t.length*this.elementType.byteLength}value_serializeToBytes(t,e,r){return n.value_serializeToBytesArrayBasic(this.elementType,r.length,t,e,r)}value_deserializeFromBytes(t,e,r){return n.value_deserializeFromBytesArrayBasic(this.elementType,t,e,r,this)}tree_serializedSize(t){return this.tree_getLength(t)*this.elementType.byteLength}tree_serializeToBytes(t,e,r){const i=this.tree_getChunksNode(r),o=this.tree_getLength(r);return n.tree_serializeToBytesArrayBasic(this.elementType,o,this.chunkDepth,t,e,i)}tree_deserializeFromBytes(t,e,r){return n.tree_deserializeFromBytesArrayBasic(this.elementType,this.chunkDepth,t,e,r,this)}tree_getLength(t){return t.right.getUint(4,0)}tree_setLength(t,e){t.rootNode=n.addLengthNode(t.rootNode.left,e)}tree_getChunksNode(t){return t.left}tree_setChunksNode(t,e,r){return n.setChunksNode(t,e,r)}hashTreeRoot(t){return i.mixInLength(super.hashTreeRoot(t),t.length)}getRoots(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.value_serializeToBytesArrayBasic(this.elementType,t.length,{uint8Array:e,dataView:r},0,t),i.splitIntoRootChunks(e)}}e.ListBasicType=h},5189:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListCompositeType=void 0;const n=r(35397),i=r(61425),o=r(63191),s=r(50404),a=r(11783),u=r(82029),h=r(89659);class c extends h.ArrayType{constructor(t,e,r){if(super(t),this.elementType=t,this.limit=e,this.itemsPerChunk=1,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,this.defaultLen=0,t.isBasic)throw Error(\"elementType must not be basic\");if(0===e)throw Error(\"List limit must be > 0\");this.typeName=r?.typeName??`List[${t.typeName}, ${e}]`,this.maxChunkCount=this.limit,this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth+1,this.minSize=0,this.maxSize=s.maxSizeArrayComposite(t,this.limit)}static named(t,e,r){return new(i.namedClass(c,r.typeName))(t,e,r)}getView(t){return new a.ListCompositeTreeView(this,t)}getViewDU(t,e){return new u.ListCompositeTreeViewDU(this,t,e)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}value_serializedSize(t){return s.value_serializedSizeArrayComposite(this.elementType,t.length,t)}value_serializeToBytes(t,e,r){return s.value_serializeToBytesArrayComposite(this.elementType,r.length,t,e,r)}value_deserializeFromBytes(t,e,r){return s.value_deserializeFromBytesArrayComposite(this.elementType,t,e,r,this)}tree_serializedSize(t){const e=this.tree_getChunksNode(t),r=this.tree_getLength(t);return s.tree_serializedSizeArrayComposite(this.elementType,r,this.chunkDepth,e)}tree_serializeToBytes(t,e,r){const n=this.tree_getChunksNode(r),i=this.tree_getLength(r);return s.tree_serializeToBytesArrayComposite(this.elementType,i,this.chunkDepth,n,t,e)}tree_deserializeFromBytes(t,e,r){return s.tree_deserializeFromBytesArrayComposite(this.elementType,this.chunkDepth,t,e,r,this)}tree_getLength(t){return o.getLengthFromRootNode(t)}tree_setLength(t,e){t.rootNode=o.addLengthNode(t.rootNode.left,e)}tree_getChunksNode(t){return t.left}tree_setChunksNode(t,e,r){return o.setChunksNode(t,e,r)}hashTreeRoot(t){return n.mixInLength(super.hashTreeRoot(t),t.length)}getRoots(t){return s.value_getRootsArrayComposite(this.elementType,t.length,t)}}e.ListCompositeType=c},81638:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.NoneType=void 0;const n=r(56567),i=r(70645);class o extends i.BasicType{constructor(){super(...arguments),this.typeName=\"none\",this.byteLength=0,this.itemsPerChunk=32,this.fixedSize=0,this.minSize=0,this.maxSize=0}defaultValue(){return null}value_serializeToBytes(t,e,r){return e}value_deserializeFromBytes(t,e){return null}tree_serializeToBytes(t,e,r){return e}tree_deserializeFromBytes(t,e,r){return n.zeroNode(0)}tree_getFromNode(t){return null}tree_setToNode(t,e){}tree_getFromPackedNode(t,e){return null}tree_setToPackedNode(t,e,r){}fromJson(t){if(null!==t)throw Error(\"JSON invalid type none must be null\");return null}toJson(t){return null}}e.NoneType=o},30436:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.UintBigintType=e.UintNumberType=e.uintBigintByteLens=e.uintNumberByteLens=void 0;const n=r(56567),i=r(61425),o=r(70645),s=BigInt(Number.MAX_SAFE_INTEGER),a=BigInt(2)**BigInt(64),u=BigInt(2)**BigInt(128),h=BigInt(2)**BigInt(192),c=2**32,f=4294967295;e.uintNumberByteLens=[1,2,4,8],e.uintBigintByteLens=[1,2,4,8,16,32];class l extends o.BasicType{constructor(t,e){if(super(),this.byteLength=t,t>8)throw Error(\"UintNumber byteLength limit is 8\");if(Math.log2(t)%1!=0)throw Error(\"byteLength must be a power of 2\");this.typeName=e?.typeName??\"uint\"+8*t,e?.clipInfinity&&(this.typeName+=\"Inf\"),e?.setBitwiseOR&&(this.typeName+=\"OR\"),this.itemsPerChunk=32/this.byteLength,this.fixedSize=t,this.minSize=t,this.maxSize=t,this.maxDecimalStr=(BigInt(2)**BigInt(8*this.byteLength)-BigInt(1)).toString(10),this.clipInfinity=!0===e?.clipInfinity,this.setBitwiseOR=!0===e?.setBitwiseOR}static named(t,e){return new(i.namedClass(l,e.typeName))(t,e)}defaultValue(){return 0}value_serializeToBytes({dataView:t},e,r){switch(this.byteLength){case 1:t.setInt8(e,r);break;case 2:t.setUint16(e,r,!0);break;case 4:t.setUint32(e,r,!0);break;case 8:r===1/0?(t.setUint32(e,4294967295),t.setUint32(e+4,4294967295)):(t.setUint32(e,4294967295&r,!0),t.setUint32(e+4,r/c&4294967295,!0))}return e+this.byteLength}value_deserializeFromBytes({dataView:t},e,r){switch(this.assertValidSize(r-e),this.byteLength){case 1:return t.getUint8(e);case 2:return t.getUint16(e,!0);case 4:return t.getUint32(e,!0);case 8:{const r=t.getUint32(e,!0),n=t.getUint32(e+4,!0);return n===f&&r===f&&this.clipInfinity?1/0:n*c+r}}}tree_serializeToBytes(t,e,r){const n=r.getUint(this.byteLength,0,this.clipInfinity);return this.value_serializeToBytes(t,e,n),e+this.byteLength}tree_deserializeFromBytes(t,e,r){this.assertValidSize(r-e);const i=this.value_deserializeFromBytes(t,e,r),o=n.LeafNode.fromZero();return o.setUint(this.byteLength,0,i,this.clipInfinity),o}tree_getFromNode(t){return t.getUint(this.byteLength,0,this.clipInfinity)}tree_setToNode(t,e){this.tree_setToPackedNode(t,0,e)}tree_getFromPackedNode(t,e){const r=this.byteLength*(e%this.itemsPerChunk);return t.getUint(this.byteLength,r,this.clipInfinity)}tree_setToPackedNode(t,e,r){const n=this.byteLength*(e%this.itemsPerChunk);this.setBitwiseOR?t.bitwiseOrUint(this.byteLength,n,r):t.setUint(this.byteLength,n,r,this.clipInfinity)}fromJson(t){if(\"number\"==typeof t)return t;if(\"string\"==typeof t){if(this.clipInfinity&&t===this.maxDecimalStr)return 1/0;{const e=parseInt(t,10);if(isNaN(e))throw Error(\"JSON invalid number isNaN\");if(e>Number.MAX_SAFE_INTEGER)throw Error(\"JSON invalid number > MAX_SAFE_INTEGER\");return e}}if(\"bigint\"==typeof t){if(t>s)throw Error(\"JSON invalid number > MAX_SAFE_INTEGER_BN\");return Number(t)}throw Error(`JSON invalid type ${typeof t} expected number`)}toJson(t){return t===1/0?this.maxDecimalStr:t.toString(10)}}e.UintNumberType=l;class d extends o.BasicType{constructor(t,e){if(super(),this.byteLength=t,t>32)throw Error(\"UintBigint byteLength limit is 32\");if(Math.log2(t)%1!=0)throw Error(\"byteLength must be a power of 2\");this.typeName=e?.typeName??\"uintBigint\"+8*t,this.byteLength=t,this.itemsPerChunk=32/this.byteLength,this.fixedSize=t,this.minSize=t,this.maxSize=t}static named(t,e){return new(i.namedClass(d,e.typeName))(t,e)}defaultValue(){return BigInt(0)}value_serializeToBytes({dataView:t},e,r){switch(this.byteLength){case 1:t.setInt8(e,Number(r));break;case 2:t.setUint16(e,Number(r),!0);break;case 4:t.setUint32(e,Number(r),!0);break;case 8:t.setBigUint64(e,r,!0);break;default:for(let n=0;n<this.byteLength;n+=8){n>0&&(r/=a);const i=BigInt.asUintN(64,r);t.setBigUint64(e+n,i,!0)}}return e+this.byteLength}value_deserializeFromBytes({dataView:t},e,r){const n=r-e;if(n!==this.byteLength)throw Error(`Invalid size ${n} expected ${this.byteLength}`);switch(this.byteLength){case 1:return BigInt(t.getUint8(e));case 2:return BigInt(t.getUint16(e,!0));case 4:return BigInt(t.getUint32(e,!0));case 8:return t.getBigUint64(e,!0);case 16:{const r=t.getBigUint64(e,!0);return t.getBigUint64(e+8,!0)*a+r}case 32:{const r=t.getBigUint64(e,!0),n=t.getBigUint64(e+8,!0),i=t.getBigUint64(e+16,!0);return t.getBigUint64(e+24,!0)*h+i*u+n*a+r}}}tree_serializeToBytes(t,e,r){const n=r.getUintBigint(this.byteLength,0);return this.value_serializeToBytes(t,e,n),e+this.byteLength}tree_deserializeFromBytes(t,e,r){const i=r-e;if(i!==this.byteLength)throw Error(`Invalid size ${i} expected ${this.byteLength}`);const o=this.value_deserializeFromBytes(t,e,r),s=n.LeafNode.fromZero();return s.setUintBigint(this.byteLength,0,o),s}tree_getFromNode(t){return t.getUintBigint(this.byteLength,0)}tree_setToNode(t,e){this.tree_setToPackedNode(t,0,e)}tree_getFromPackedNode(t,e){const r=this.byteLength*(e%this.itemsPerChunk);return t.getUintBigint(this.byteLength,r)}tree_setToPackedNode(t,e,r){const n=this.byteLength*(e%this.itemsPerChunk);t.setUintBigint(this.byteLength,n,r)}fromJson(t){if(\"bigint\"==typeof t)return t;if(\"string\"==typeof t||\"number\"==typeof t)return BigInt(t);throw Error(`JSON invalid type ${typeof t} expected bigint`)}toJson(t){return t.toString(10)}}e.UintBigintType=d},51851:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.UnionType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(18715),a=r(63191),u=r(81638),h=BigInt(2),c=BigInt(3);class f extends s.CompositeType{constructor(t,e){if(super(),this.types=t,this.depth=1,this.maxChunkCount=1,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,t.length>=128)throw Error(\"Must have less than 128 types\");if(0===t.length)throw Error(\"Must have at least 1 type option\");if(t[0]instanceof u.NoneType&&t.length<2)throw Error(\"Must have at least 2 type options if the first is None\");for(let e=1;e<t.length;e++)if(t[e]instanceof u.NoneType)throw Error(\"None may only be the first option\");this.typeName=e?.typeName??`Union[${t.map((t=>t.typeName)).join(\",\")}]`;const r=[],n=[];for(const e of t)r.push(e.minSize),n.push(e.maxSize);this.minSize=1+Math.min(...r),this.maxSize=1+Math.max(...n),this.maxSelector=this.types.length-1}static named(t,e){return new(o.namedClass(f,e.typeName))(t,e)}defaultValue(){return{selector:0,value:this.types[0].defaultValue()}}getView(t){return this.tree_toValue(t.rootNode)}getViewDU(t){return this.tree_toValue(t)}cacheOfViewDU(){}commitView(t){return this.value_toTree(t)}commitViewDU(t){return this.value_toTree(t)}value_serializedSize(t){return 1+this.types[t.selector].value_serializedSize(t.value)}value_serializeToBytes(t,e,r){return t.uint8Array[e]=r.selector,this.types[r.selector].value_serializeToBytes(t,e+1,r.value)}value_deserializeFromBytes(t,e,r){const n=t.uint8Array[e];if(n>this.maxSelector)throw Error(`Invalid selector ${n}`);return{selector:n,value:this.types[n].value_deserializeFromBytes(t,e+1,r)}}tree_serializedSize(t){const e=a.getLengthFromRootNode(t),r=t.left;return 1+this.types[e].value_serializedSize(r)}tree_serializeToBytes(t,e,r){const n=a.getLengthFromRootNode(r),i=r.left;return t.uint8Array[e]=n,this.types[n].tree_serializeToBytes(t,e+1,i)}tree_deserializeFromBytes(t,e,r){const n=t.uint8Array[e];if(n>this.maxSelector)throw Error(`Invalid selector ${n}`);const i=this.types[n].tree_deserializeFromBytes(t,e+1,r);return a.addLengthNode(i,n)}hashTreeRoot(t){return i.mixInLength(super.hashTreeRoot(t),t.selector)}getRoots(t){return[this.types[t.selector].hashTreeRoot(t.value)]}getPropertyGindex(t){switch(t){case\"value\":return h;case\"selector\":return c;default:throw new Error(`Invalid Union type property ${t}`)}}getPropertyType(){throw new Error(\"Not applicable for Union type\")}getIndexProperty(t){if(0===t)return\"value\";if(1===t)return\"selector\";throw Error(\"Union index of out bounds\")}tree_getLeafGindices(t,e){if(!e)throw Error(\"rootNode required\");const r=[n.concatGindices([t,c])],i=a.getLengthFromRootNode(e),o=this.types[i],u=n.concatGindices([t,h]);return s.isCompositeType(o)?r.push(...o.tree_getLeafGindices(u,n.getNode(e,h))):r.push(u),r}fromJson(t){if(\"object\"!=typeof t)throw new Error(\"JSON must be of type object\");const e=t;if(\"number\"!=typeof e.selector)throw new Error(\"Invalid JSON Union selector must be number\");const r=this.types[e.selector];if(!r)throw new Error(\"Invalid JSON Union selector out of range\");return{selector:e.selector,value:r.toJson(e.value)}}toJson(t){return{selector:t.selector,value:this.types[t.selector].toJson(t.value)}}clone(t){return{selector:t.selector,value:this.types[t.selector].clone(t.value)}}equals(t,e){return t.selector===e.selector&&this.types[t.selector].equals(t.value,e.value)}}e.UnionType=f},55021:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.VectorBasicType=void 0;const n=r(35397),i=r(61425),o=r(63191),s=r(77733),a=r(63341),u=r(89659);class h extends u.ArrayType{constructor(t,e,r){if(super(t),this.elementType=t,this.length=e,this.isList=!1,this.isViewMutable=!0,!t.isBasic)throw Error(\"elementType must be basic\");if(0===e)throw Error(\"Vector length must be > 0\");this.typeName=r?.typeName??`Vector[${t.typeName}, ${e}]`,this.itemsPerChunk=32/t.byteLength,this.maxChunkCount=Math.ceil(e*t.byteLength/32),this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=e*t.byteLength,this.minSize=this.fixedSize,this.maxSize=this.fixedSize,this.defaultLen=e}static named(t,e,r){return new(i.namedClass(h,r.typeName))(t,e,r)}getView(t){return new s.ArrayBasicTreeView(this,t)}getViewDU(t,e){return new a.ArrayBasicTreeViewDU(this,t,e)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}value_serializedSize(){return this.fixedSize}value_serializeToBytes(t,e,r){return o.value_serializeToBytesArrayBasic(this.elementType,this.length,t,e,r)}value_deserializeFromBytes(t,e,r){return o.value_deserializeFromBytesArrayBasic(this.elementType,t,e,r,this)}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(t,e,r){return o.tree_serializeToBytesArrayBasic(this.elementType,this.length,this.depth,t,e,r)}tree_deserializeFromBytes(t,e,r){return o.tree_deserializeFromBytesArrayBasic(this.elementType,this.depth,t,e,r,this)}tree_getLength(){return this.length}tree_setLength(){}tree_getChunksNode(t){return t}tree_setChunksNode(t,e){return e}getRoots(t){const e=new Uint8Array(this.fixedSize),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return o.value_serializeToBytesArrayBasic(this.elementType,this.length,{uint8Array:e,dataView:r},0,t),n.splitIntoRootChunks(e)}}e.VectorBasicType=h},54013:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.VectorCompositeType=void 0;const n=r(35397),i=r(61425),o=r(50404),s=r(56330),a=r(82309),u=r(89659);class h extends u.ArrayType{constructor(t,e,r){if(super(t),this.elementType=t,this.length=e,this.itemsPerChunk=1,this.isList=!1,this.isViewMutable=!0,t.isBasic)throw Error(\"elementType must not be basic\");if(0===e)throw Error(\"Vector length must be > 0\");this.typeName=r?.typeName??`Vector[${t.typeName}, ${e}]`,this.maxChunkCount=e,this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=null===t.fixedSize?null:e*t.fixedSize,this.minSize=o.minSizeArrayComposite(t,e),this.maxSize=o.maxSizeArrayComposite(t,e),this.defaultLen=e}static named(t,e,r){return new(i.namedClass(h,r.typeName))(t,e,r)}getView(t){return new s.ArrayCompositeTreeView(this,t)}getViewDU(t,e){return new a.ArrayCompositeTreeViewDU(this,t,e)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}value_serializedSize(t){return o.value_serializedSizeArrayComposite(this.elementType,this.length,t)}value_serializeToBytes(t,e,r){return o.value_serializeToBytesArrayComposite(this.elementType,this.length,t,e,r)}value_deserializeFromBytes(t,e,r){return o.value_deserializeFromBytesArrayComposite(this.elementType,t,e,r,this)}tree_serializedSize(t){return o.tree_serializedSizeArrayComposite(this.elementType,this.length,this.depth,t)}tree_serializeToBytes(t,e,r){return o.tree_serializeToBytesArrayComposite(this.elementType,this.length,this.depth,r,t,e)}tree_deserializeFromBytes(t,e,r){return o.tree_deserializeFromBytesArrayComposite(this.elementType,this.depth,t,e,r,this)}tree_getLength(){return this.length}tree_setLength(){}tree_getChunksNode(t){return t}tree_setChunksNode(t,e){return e}getRoots(t){return o.value_getRootsArrayComposite(this.elementType,this.length,t)}}e.VectorCompositeType=h},71518:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.byteArrayEquals=e.fromHexString=e.toHexString=void 0;const r=new Array(256);e.toHexString=function(t){let e=\"0x\";for(const n of t)r[n]||(r[n]=n<16?\"0\"+n.toString(16):n.toString(16)),e+=r[n];return e},e.fromHexString=function(t){if(\"string\"!=typeof t)throw new Error(`hex argument type ${typeof t} must be of type string`);if(t.startsWith(\"0x\")&&(t=t.slice(2)),t.length%2!=0)throw new Error(`hex string length ${t.length} must be multiple of 2`);const e=t.length/2,r=new Uint8Array(e);for(let n=0;n<e;n++){const e=parseInt(t.slice(2*n,2*(n+1)),16);r[n]=e}return r},e.byteArrayEquals=function(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}},35397:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.nextPowerOf2=e.maxChunksToDepth=e.bitLength=e.mixInLength=e.splitIntoRootChunks=e.merkleize=e.hash64=void 0;const i=r(29457),o=r(80038);function s(t,e){return i.hasher.digest64(t,e)}function a(t){return 0===t?0:Math.floor(Math.log2(t))+1}function u(t){return t<=0?1:Math.pow(2,a(t-1))}e.hash64=s,e.merkleize=function(t,e){const r=a(u(e)-1);if(0==t.length)return o.zeroHash(r);let n=t.length;for(let e=0;e<r;e++){const r=n%2,i=n+r;for(let i=0;i<r;i++)t[n+i]=o.zeroHash(e);for(let e=0;e<i;e+=2)t[e/2]=s(t[e],t[e+1]);n=i/2}return t[0]},e.splitIntoRootChunks=function(t){const e=Math.ceil(t.length/32),r=new Array(e);for(let n=0;n<e;n++){const e=new Uint8Array(32);e.set(t.slice(32*n,32*(n+1))),r[n]=e}return r},e.mixInLength=function(t,e){const r=n.alloc(32);return r.writeUIntLE(e,0,6),s(t,r)},e.bitLength=a,e.maxChunksToDepth=function(t){return 0===t?0:Math.ceil(Math.log2(t))},e.nextPowerOf2=u},61425:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.namedClass=void 0,e.namedClass=function(t,e){return new Function(\"superClass\",`return class ${e} extends superClass {}`)(t)}},18081:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.treePostProcessFromProofNode=void 0;const n=r(56567);function i(t){return!t.isBasic}function o(t){return\"\"===t?0:parseInt(t,2)}e.treePostProcessFromProofNode=function t(e,r,s=\"\",a=0){if(0===a){const t=r.tree_fromProofNode(e);if(t.done)return t.node;e=t.node}const u=r.depth===a;if(e.isLeaf()){if(u){const t=r.getIndexProperty(o(s));if(null===t)return e;const n=r.getPropertyType(t);return 1===n.maxChunkCount&&i(n)?n.tree_fromProofNode(e).node:e}return e}if(u){const n=r.getIndexProperty(o(s));if(null===n)return e;const a=r.getPropertyType(n);if(!i(a))throw Error(\"BranchNode does not map to CompositeType\");const u=a.tree_fromProofNode(e);return u.done?u.node:t(u.node,a)}{const i=t(e.left,r,s+\"0\",a+1),o=t(e.right,r,s+\"1\",a+1);return i===e.left&&o===e.right?e:new n.BranchNode(i,o)}}},79705:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Case=void 0,e.Case={snake:t=>t.replace(/[^0-z]/g,\"\").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(t=>t[0]+\"_\"+t[1].toLowerCase())),constant:t=>t.replace(/[^0-z]/g,\"\").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(t=>t[0]+\"_\"+t[1])).toUpperCase(),pascal:t=>(t[0].toUpperCase()+t.slice(1)).replace(/[^0-z]/g,\"\"),camel:t=>t[0].toLowerCase()+t.slice(1),header:t=>t[0].toUpperCase()+t.slice(1).replace(/[^0-z]/g,\"\").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(t=>t[0]+\"-\"+t[1])),eth2:t=>e.Case.snake(t).replace(/(\\d)$/,\"_$1\")}},80038:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.zeroHash=void 0;const n=r(29457),i=[new Uint8Array(32)];e.zeroHash=function(t){if(t>=i.length)for(let e=i.length;e<=t;e++)i[e]=n.hasher.digest64(i[e-1],i[e-1]);return i[t]}},21714:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getUint8ByteToBitBooleanArray=e.BitArray=void 0;const r=new Array(256);class n{constructor(t,e){if(this.uint8Array=t,this.bitLen=e,t.length!==Math.ceil(e/8))throw Error(\"BitArray uint8Array length does not match bitLen\")}static fromBitLen(t){return new n(new Uint8Array(Math.ceil(t/8)),t)}static fromSingleBit(t,e){const r=n.fromBitLen(t);return r.set(e,!0),r}static fromBoolArray(t){const e=n.fromBitLen(t.length);for(let r=0;r<t.length;r++)!0===t[r]&&e.set(r,!0);return e}clone(){return new n(Uint8Array.prototype.slice.call(this.uint8Array,0),this.bitLen)}get(t){const e=Math.floor(t/8),r=1<<t%8;return(this.uint8Array[e]&r)===r}set(t,e){if(t>=this.bitLen)throw Error(`BitArray set bitIndex ${t} beyond bitLen ${this.bitLen}`);const r=Math.floor(t/8),n=1<<t%8;let i=this.uint8Array[r];e?(i|=n,this.uint8Array[r]=i):(i&n)===n&&(i^=n,this.uint8Array[r]=i)}mergeOrWith(t){if(t.bitLen!==this.bitLen)throw Error(\"Must merge BitArrays of same bitLen\");for(let e=0;e<this.uint8Array.length;e++)this.uint8Array[e]=this.uint8Array[e]|t.uint8Array[e]}intersectValues(t){const e=[];if(t.length!==this.bitLen)throw Error(`Must not intersect values of length ${t.length} != bitLen ${this.bitLen}`);const r=Math.floor(this.bitLen/8),n=this.bitLen%8,o=this.uint8Array;for(let n=0;n<r;n++){const r=i(o[n]);for(let i=0;i<8;i++)r[i]&&e.push(t[8*n+i])}if(n>0){const s=i(o[r]);for(let i=0;i<n;i++)s[i]&&e.push(t[8*r+i])}return e}getTrueBitIndexes(){const t=[],e=this.uint8Array;for(let r=0,n=e.length;r<n;r++){const n=i(e[r]);for(let e=0;e<8;e++)n[e]&&t.push(8*r+e)}return t}getSingleTrueBit(){let t=null;const e=this.uint8Array;for(let r=0,n=e.length;r<n;r++){if(0===e[r])continue;const n=i(e[r]);for(let e=0;e<8;e++)if(!0===n[e]){if(null!==t)return null;t=8*r+e}}return null===t?null:t}toBoolArray(){const t=new Array(this.bitLen);for(let e=0;e<this.bitLen;e++)t[e]=this.get(e);return t}}function i(t){return r[t]||(r[t]=function(t){const e=t.toString(2),r=e.length,n=new Array(8);for(let t=0;t<8;t++)n[t]=t<r&&\"1\"===e[r-t-1];return n}(t)),r[t]}e.BitArray=n,e.getUint8ByteToBitBooleanArray=i},62542:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.TreeView=void 0;const n=r(56567);e.TreeView=class{serialize(){const t=new Uint8Array(this.type.tree_serializedSize(this.node)),e=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.type.tree_serializeToBytes({uint8Array:t,dataView:e},0,this.node),t}hashTreeRoot(){return this.node.root}createProof(t){return this.type.tree_createProof(this.node,t)}toValue(){return this.type.tree_toValue(this.node)}clone(){return this.type.getView(new n.Tree(this.node))}}},77733:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayBasicTreeView=void 0;const n=r(56567),i=r(62542);class o extends i.TreeView{constructor(t,e){super(),this.type=t,this.tree=e}get length(){return this.type.tree_getLength(this.tree.rootNode)}get node(){return this.tree.rootNode}get(t){const e=Math.floor(t/this.type.itemsPerChunk),r=this.tree.getNodeAtDepth(this.type.depth,e);return this.type.elementType.tree_getFromPackedNode(r,t)}set(t,e){const r=this.length;if(t>=r)throw Error(`Error setting index over length ${t} > ${r}`);const n=Math.floor(t/this.type.itemsPerChunk),i=this.tree.getNodeAtDepth(this.type.depth,n).clone();this.type.elementType.tree_setToPackedNode(i,t,e),this.tree.setNodeAtDepth(this.type.depth,n,i)}getAll(){const t=this.length,e=this.type.tree_getChunksNode(this.node),r=Math.ceil(t/this.type.itemsPerChunk),i=n.getNodesAtDepth(e,this.type.chunkDepth,0,r),o=new Array(t),s=this.type.itemsPerChunk,a=Math.floor(t/s),u=t%s;for(let t=0;t<a;t++){const e=i[t];for(let r=0;r<s;r++)o[t*s+r]=this.type.elementType.tree_getFromPackedNode(e,r)}if(u>0){const t=i[a];for(let e=0;e<u;e++)o[a*s+e]=this.type.elementType.tree_getFromPackedNode(t,e)}return o}}e.ArrayBasicTreeView=o},56330:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayCompositeTreeView=void 0;const n=r(56567),i=r(62542);class o extends i.TreeView{constructor(t,e){super(),this.type=t,this.tree=e}get length(){return this.type.tree_getLength(this.tree.rootNode)}get node(){return this.tree.rootNode}get(t){const e=n.toGindexBitstring(this.type.depth,t),r=this.tree.getSubtree(e);return this.type.elementType.getView(r)}getReadonly(t){const e=n.toGindexBitstring(this.type.depth,t),r=new n.Tree(this.tree.getNode(e));return this.type.elementType.getView(r)}set(t,e){const r=this.length;if(t>=r)throw Error(`Error setting index over length ${t} > ${r}`);const n=this.type.elementType.commitView(e);this.tree.setNodeAtDepth(this.type.depth,t,n)}getAllReadonly(){const t=this.length,e=this.type.tree_getChunksNode(this.node),r=n.getNodesAtDepth(e,this.type.chunkDepth,0,t),i=new Array(t);for(let e=0;e<t;e++)i[e]=this.type.elementType.getView(new n.Tree(r[e]));return i}getAllReadonlyValues(){const t=this.length,e=this.type.tree_getChunksNode(this.node),r=n.getNodesAtDepth(e,this.type.chunkDepth,0,t),i=new Array(t);for(let e=0;e<t;e++)i[e]=this.type.elementType.tree_toValue(r[e]);return i}}e.ArrayCompositeTreeView=o},76572:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitArrayTreeView=void 0;const n=r(62542);class i extends n.TreeView{constructor(t,e){super(),this.type=t,this.tree=e,this.bitArray=t.tree_toValue(e.rootNode)}get node(){return this.tree.rootNode}get uint8Array(){return this.bitArray.uint8Array}get bitLen(){return this.bitArray.bitLen}get(t){return this.bitArray.get(t)}set(t,e){this.bitArray.set(t,e),this.tree.rootNode=this.type.value_toTree(this.bitArray)}mergeOrWith(t){this.bitArray.mergeOrWith(t)}intersectValues(t){return this.bitArray.intersectValues(t)}getTrueBitIndexes(){return this.bitArray.getTrueBitIndexes()}getSingleTrueBit(){return this.bitArray.getSingleTrueBit()}toBoolArray(){return this.bitArray.toBoolArray()}}e.BitArrayTreeView=i},37685:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getContainerTreeViewClass=void 0;const n=r(56567),i=r(70645),o=r(18715),s=r(62542);class a extends s.TreeView{constructor(t,e){super(),this.type=t,this.tree=e}get node(){return this.tree.rootNode}}e.getContainerTreeViewClass=function(t){class e extends a{}for(let r=0;r<t.fieldsEntries.length;r++){const{fieldName:s,fieldType:a}=t.fieldsEntries[r];if(i.isBasicType(a))Object.defineProperty(e.prototype,s,{configurable:!1,enumerable:!0,get:function(){const t=n.getNodeAtDepth(this.node,this.type.depth,r);return a.tree_getFromNode(t)},set:function(t){const e=n.getNodeAtDepth(this.node,this.type.depth,r).clone();a.tree_setToNode(e,t),this.tree.setNodeAtDepth(this.type.depth,r,e)}});else{if(!o.isCompositeType(a))throw Error(`Unknown fieldType ${a.typeName} for fieldName ${s}`);Object.defineProperty(e.prototype,s,{configurable:!1,enumerable:!0,get:function(){const t=n.toGindexBitstring(this.type.depth,r);return a.getView(this.tree.getSubtree(t))},set:function(t){const e=a.commitView(t);this.tree.setNodeAtDepth(this.type.depth,r,e)}})}}return Object.defineProperty(e,\"name\",{value:t.typeName,writable:!1}),e}},81225:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getContainerTreeViewClass=void 0;const n=r(18715),i=r(8747),o=r(62542);class s extends o.TreeView{constructor(t,e){super(),this.type=t,this.tree=e}get node(){return this.tree.rootNode}}e.getContainerTreeViewClass=function(t){class e extends s{}for(let r=0;r<t.fieldsEntries.length;r++){const{fieldName:o,fieldType:s}=t.fieldsEntries[r];if(s.isBasic)Object.defineProperty(e.prototype,o,{configurable:!1,enumerable:!0,get:function(){return this.tree.rootNode.value[o]},set:function(t){const e=this.tree.rootNode,r=this.type.clone(e.value);r[o]=t,this.tree.rootNode=new i.BranchNodeStruct(e.valueToNode,r)}});else{if(!n.isCompositeType(s))throw Error(`Unknown fieldType ${s.typeName} for fieldName ${o}`);Object.defineProperty(e.prototype,o,{configurable:!1,enumerable:!0,get:function(){const{value:t}=this.tree.rootNode;return s.toView(t[o])},set:function(t){const e=this.tree.rootNode,r=this.type.clone(e.value);r[o]=s.toValueFromView(t),this.tree.rootNode=new i.BranchNodeStruct(e.valueToNode,r)}})}}return Object.defineProperty(e,\"name\",{value:t.typeName,writable:!1}),e}},19291:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListBasicTreeView=void 0;const n=r(56567),i=r(77733);class o extends i.ArrayBasicTreeView{constructor(t,e){super(t,e),this.type=t,this.tree=e}push(t){const e=this.length;if(e>=this.type.limit)throw Error(\"Error pushing over limit\");if(this.type.tree_setLength(this.tree,e+1),e%this.type.itemsPerChunk==0){const r=n.LeafNode.fromZero();this.type.elementType.tree_setToPackedNode(r,e,t);const i=Math.floor(e/this.type.itemsPerChunk);this.tree.setNodeAtDepth(this.type.depth,i,r)}else this.set(e,t)}}e.ListBasicTreeView=o},11783:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListCompositeTreeView=void 0;const n=r(56330);class i extends n.ArrayCompositeTreeView{constructor(t,e){super(t,e),this.type=t,this.tree=e}push(t){const e=this.length;if(e>=this.type.limit)throw Error(\"Error pushing over limit\");this.type.tree_setLength(this.tree,e+1),this.set(e,t)}}e.ListCompositeTreeView=i},40332:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.TreeViewDU=void 0;const n=r(62542);class i extends n.TreeView{hashTreeRoot(){return this.commit(),super.hashTreeRoot()}serialize(){return this.commit(),super.serialize()}clone(t){if(t)return this.type.getViewDU(this.node);{const t=this.cache;return this.clearCache(),this.type.getViewDU(this.node,t)}}}e.TreeViewDU=i},63341:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayBasicTreeViewDU=void 0;const n=r(56567),i=r(40332);class o extends i.TreeViewDU{constructor(t,e,r){super(),this.type=t,this._rootNode=e,this.nodesChanged=new Set,this.dirtyLength=!1,r?(this.nodes=r.nodes,this._length=r.length,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this._length=this.type.tree_getLength(e),this.nodesPopulated=!1)}get length(){return this._length}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,length:this._length,nodesPopulated:this.nodesPopulated}}get(t){const e=Math.floor(t/this.type.itemsPerChunk);let r=this.nodes[e];return void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,e),this.nodes[e]=r),this.type.elementType.tree_getFromPackedNode(r,t)}set(t,e){if(t>=this._length)throw Error(`Error setting index over length ${t} > ${this._length}`);const r=Math.floor(t/this.type.itemsPerChunk);let i;if(this.nodesChanged.has(r))i=this.nodes[r];else{i=(this.nodes[r]??n.getNodeAtDepth(this._rootNode,this.type.depth,r)).clone(),this.nodes[r]=i,this.nodesChanged.add(r)}this.type.elementType.tree_setToPackedNode(i,t,e)}getAll(){if(!this.nodesPopulated){const t=this.nodes,e=this.type.tree_getChunksNode(this.node),r=Math.ceil(this._length/this.type.itemsPerChunk);this.nodes=n.getNodesAtDepth(e,this.type.chunkDepth,0,r);for(const e of this.nodesChanged)this.nodes[e]=t[e];this.nodesPopulated=!0}const t=new Array(this._length),e=this.type.itemsPerChunk,r=Math.floor(this._length/e),i=this._length%e;for(let n=0;n<r;n++){const r=this.nodes[n];for(let i=0;i<e;i++)t[n*e+i]=this.type.elementType.tree_getFromPackedNode(r,i)}if(i>0){const n=this.nodes[r];for(let o=0;o<i;o++)t[r*e+o]=this.type.elementType.tree_getFromPackedNode(n,o)}return t}commit(){if(0===this.nodesChanged.size)return;const t=Array.from(this.nodesChanged.keys()).sort(((t,e)=>t-e)),e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=this.nodes[t[r]];const r=this.type.tree_getChunksNode(this._rootNode),i=n.setNodesAtDepth(r,this.type.chunkDepth,t,e);this._rootNode=this.type.tree_setChunksNode(this._rootNode,i,this.dirtyLength?this._length:void 0),this.nodesChanged.clear(),this.dirtyLength=!1}clearCache(){this.nodes=[],this.nodesPopulated=!1,this.nodesChanged.clear(),this.dirtyLength&&(this._length=this.type.tree_getLength(this._rootNode),this.dirtyLength=!1)}}e.ArrayBasicTreeViewDU=o},82309:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayCompositeTreeViewDU=void 0;const n=r(56567),i=r(40332);class o extends i.TreeViewDU{constructor(t,e,r){super(),this.type=t,this._rootNode=e,this.viewsChanged=new Map,this.dirtyLength=!1,r?(this.nodes=r.nodes,this.caches=r.caches,this._length=r.length,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this.caches=[],this._length=this.type.tree_getLength(e),this.nodesPopulated=0===this._length)}get length(){return this._length}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,caches:this.caches,length:this._length,nodesPopulated:this.nodesPopulated}}get(t){const e=this.viewsChanged.get(t);if(e)return e;let r=this.nodes[t];void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,t),this.nodes[t]=r);const i=this.type.elementType.getViewDU(r,this.caches[t]);return this.type.elementType.isViewMutable&&this.viewsChanged.set(t,i),i}getReadonly(t){const e=this.viewsChanged.get(t);if(e)return e;let r=this.nodes[t];return void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,t),this.nodes[t]=r),this.type.elementType.getViewDU(r,this.caches[t])}set(t,e){if(t>=this._length)throw Error(`Error setting index over length ${t} > ${this._length}`);this.viewsChanged.set(t,e)}getAllReadonly(){this.populateAllNodes();const t=new Array(this._length);for(let e=0;e<this._length;e++)t[e]=this.type.elementType.getViewDU(this.nodes[e],this.caches[e]);return t}getAllReadonlyValues(){this.populateAllNodes();const t=new Array(this._length);for(let e=0;e<this._length;e++)t[e]=this.type.elementType.tree_toValue(this.nodes[e]);return t}commit(){if(0===this.viewsChanged.size)return;const t=[];for(const[e,r]of this.viewsChanged){const n=this.type.elementType.commitViewDU(r);this.nodes[e]=n,t.push({index:e,node:n});const i=this.type.elementType.cacheOfViewDU(r);i&&(this.caches[e]=i)}const e=t.sort(((t,e)=>t.index-e.index)),r=e.map((t=>t.index)),i=e.map((t=>t.node)),o=this.type.tree_getChunksNode(this._rootNode),s=n.setNodesAtDepth(o,this.type.chunkDepth,r,i);this._rootNode=this.type.tree_setChunksNode(this._rootNode,s,this.dirtyLength?this._length:void 0),this.viewsChanged.clear(),this.dirtyLength=!1}clearCache(){this.nodes=[],this.caches=[],this.nodesPopulated=!1,this.viewsChanged.clear(),this.dirtyLength&&(this._length=this.type.tree_getLength(this._rootNode),this.dirtyLength=!1)}populateAllNodes(){if(this.viewsChanged.size>0)throw Error(\"Must commit changes before reading all nodes\");this.nodesPopulated||(this.nodes=n.getNodesAtDepth(this._rootNode,this.type.depth,0,this.length),this.nodesPopulated=!0)}}e.ArrayCompositeTreeViewDU=o},57844:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitArrayTreeViewDU=void 0;const n=r(40332);class i extends n.TreeViewDU{constructor(t,e){super(),this.type=t,this._rootNode=e,this._bitArray=null}get node(){return this._rootNode}get cache(){}commit(){null!==this._bitArray&&(this._rootNode=this.type.value_toTree(this._bitArray))}get uint8Array(){return this.bitArray.uint8Array}get bitLen(){return this.bitArray.bitLen}get(t){return this.bitArray.get(t)}set(t,e){this.bitArray.set(t,e)}mergeOrWith(t){this.bitArray.mergeOrWith(t)}intersectValues(t){return this.bitArray.intersectValues(t)}getTrueBitIndexes(){return this.bitArray.getTrueBitIndexes()}getSingleTrueBit(){return this.bitArray.getSingleTrueBit()}toBoolArray(){return this.bitArray.toBoolArray()}get bitArray(){return null===this._bitArray&&(this._bitArray=this.type.tree_toValue(this._rootNode)),this._bitArray}clearCache(){this._bitArray=null}}e.BitArrayTreeViewDU=i},68865:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getContainerTreeViewDUClass=void 0;const n=r(56567),i=r(70645),o=r(18715),s=r(40332);class a extends s.TreeViewDU{constructor(t,e,r){super(),this.type=t,this._rootNode=e,this.nodes=[],this.nodesChanged=new Set,this.viewsChanged=new Map,r?(this.nodes=r.nodes,this.caches=r.caches,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this.caches=[],this.nodesPopulated=!1)}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,caches:this.caches,nodesPopulated:this.nodesPopulated}}commit(){if(0===this.nodesChanged.size&&0===this.viewsChanged.size)return;const t=[];for(const[e,r]of this.viewsChanged){const n=this.type.fieldsEntries[e].fieldType,i=n.commitViewDU(r);this.nodes[e]=i,t.push({index:e,node:i});const o=n.cacheOfViewDU(r);o&&(this.caches[e]=o)}for(const e of this.nodesChanged)t.push({index:e,node:this.nodes[e]});const e=t.sort(((t,e)=>t.index-e.index)),r=e.map((t=>t.index)),i=e.map((t=>t.node));this._rootNode=n.setNodesAtDepth(this._rootNode,this.type.depth,r,i),this.nodesChanged.clear(),this.viewsChanged.clear()}clearCache(){this.nodes=[],this.caches=[],this.nodesPopulated=!1,this.nodesChanged.clear(),this.viewsChanged.clear()}}e.getContainerTreeViewDUClass=function(t){class e extends a{}for(let r=0;r<t.fieldsEntries.length;r++){const{fieldName:s,fieldType:a}=t.fieldsEntries[r];if(i.isBasicType(a))Object.defineProperty(e.prototype,s,{configurable:!1,enumerable:!0,get:function(){let t=this.nodes[r];return void 0===t&&(t=n.getNodeAtDepth(this._rootNode,this.type.depth,r),this.nodes[r]=t),a.tree_getFromNode(t)},set:function(t){let e;if(this.nodesChanged.has(r))e=this.nodes[r];else{e=(this.nodes[r]??n.getNodeAtDepth(this._rootNode,this.type.depth,r)).clone(),this.nodes[r]=e,this.nodesChanged.add(r)}a.tree_setToNode(e,t)}});else{if(!o.isCompositeType(a))throw Error(`Unknown fieldType ${a.typeName} for fieldName ${s}`);Object.defineProperty(e.prototype,s,{configurable:!1,enumerable:!0,get:function(){const t=this.viewsChanged.get(r);if(t)return t;let e=this.nodes[r];void 0===e&&(e=n.getNodeAtDepth(this._rootNode,this.type.depth,r),this.nodes[r]=e);const i=a.getViewDU(e,this.caches[r]);return a.isViewMutable&&this.viewsChanged.set(r,i),i},set:function(t){this.viewsChanged.set(r,t)}})}}return Object.defineProperty(e,\"name\",{value:t.typeName,writable:!1}),e}},84320:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getContainerTreeViewDUClass=void 0;const n=r(18715),i=r(40332);class o extends i.TreeViewDU{constructor(t,e){super(),this.type=t,this.valueChanged=null,this._rootNode=e}get node(){return this._rootNode}get cache(){}commit(){if(null===this.valueChanged)return;const t=this.valueChanged;this.valueChanged=null,this._rootNode=this.type.value_toTree(t)}clearCache(){this.valueChanged=null}}e.getContainerTreeViewDUClass=function(t){class e extends o{}for(let r=0;r<t.fieldsEntries.length;r++){const{fieldName:i,fieldType:o}=t.fieldsEntries[r];if(o.isBasic)Object.defineProperty(e.prototype,i,{configurable:!1,enumerable:!0,get:function(){return(this.valueChanged||this._rootNode.value)[i]},set:function(t){null===this.valueChanged&&(this.valueChanged=this.type.clone(this._rootNode.value)),this.valueChanged[i]=t}});else{if(!n.isCompositeType(o))throw Error(`Unknown fieldType ${o.typeName} for fieldName ${i}`);Object.defineProperty(e.prototype,i,{configurable:!1,enumerable:!0,get:function(){const t=this.valueChanged||this._rootNode.value;return o.toViewDU(t[i])},set:function(t){null===this.valueChanged&&(this.valueChanged=this.type.clone(this._rootNode.value));const e=o.toValueFromViewDU(t);this.valueChanged[i]=e}})}}return Object.defineProperty(e,\"name\",{value:t.typeName,writable:!1}),e}},61828:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListBasicTreeViewDU=void 0;const n=r(56567),i=r(63341);class o extends i.ArrayBasicTreeViewDU{constructor(t,e,r){super(t,e,r),this.type=t,this._rootNode=e}push(t){if(this._length>=this.type.limit)throw Error(\"Error pushing over limit\");this.dirtyLength=!0;const e=this._length++;if(e%this.type.itemsPerChunk==0){const t=Math.floor(e/this.type.itemsPerChunk);this.nodes[t]=n.zeroNode(0)}this.set(e,t)}}e.ListBasicTreeViewDU=o},82029:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListCompositeTreeViewDU=void 0;const n=r(56567),i=r(82309);class o extends i.ArrayCompositeTreeViewDU{constructor(t,e,r){super(t,e,r),this.type=t,this._rootNode=e}push(t){if(this._length>=this.type.limit)throw Error(\"Error pushing over limit\");this.dirtyLength=!0;const e=this._length++;this.set(e,t)}sliceTo(t){this.commit();const e=this._rootNode;if(t>=this.type.tree_getLength(e)-1)return this;const r=this.type.tree_getChunksNode(e),i=n.treeZeroAfterIndex(r,this.type.chunkDepth,t),o=t+1,s=this.type.tree_setChunksNode(e,i,o);return this.type.getViewDU(s)}}e.ListCompositeTreeViewDU=o},19752:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Common=void 0;const i=r(99065),o=r(97108),s=r(22699),a=r(24579),u=r(73192),h=r(14002),c=r(27623),f=r(86369),l=r(43925),d=r(90649),p=r(12188),m=r(73824);class g extends s.EventEmitter{constructor(t){super(),this._eips=[],this._customChains=t.customChains??[],this._chainParams=this.setChain(t.chain),this.DEFAULT_HARDFORK=this._chainParams.defaultHardfork??d.Hardfork.Merge,this.HARDFORK_CHANGES=this.hardforks().map((t=>[t.name,p.hardforks[t.name]])),this._hardfork=this.DEFAULT_HARDFORK,void 0!==t.hardfork&&this.setHardfork(t.hardfork),t.eips&&this.setEIPs(t.eips)}static custom(t,e={}){const r=e.baseChain??\"mainnet\",n={...g._getChainParams(r)};if(n.name=\"custom-chain\",\"string\"!=typeof t)return new g({chain:{...n,...t},...e});if(t===d.CustomChain.PolygonMainnet)return g.custom({name:d.CustomChain.PolygonMainnet,chainId:137,networkId:137},e);if(t===d.CustomChain.PolygonMumbai)return g.custom({name:d.CustomChain.PolygonMumbai,chainId:80001,networkId:80001},e);if(t===d.CustomChain.ArbitrumRinkebyTestnet)return g.custom({name:d.CustomChain.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},e);if(t===d.CustomChain.ArbitrumOne)return g.custom({name:d.CustomChain.ArbitrumOne,chainId:42161,networkId:42161},e);if(t===d.CustomChain.xDaiChain)return g.custom({name:d.CustomChain.xDaiChain,chainId:100,networkId:100},e);if(t===d.CustomChain.OptimisticKovan)return g.custom({name:d.CustomChain.OptimisticKovan,chainId:69,networkId:69},{hardfork:d.Hardfork.Berlin,...e});if(t===d.CustomChain.OptimisticEthereum)return g.custom({name:d.CustomChain.OptimisticEthereum,chainId:10,networkId:10},{hardfork:d.Hardfork.Berlin,...e});throw new Error(`Custom chain ${t} not supported`)}static fromGethGenesis(t,{chain:e,eips:r,genesisHash:n,hardfork:i,mergeForkIdPostMerge:o}){const s=(0,m.parseGethGenesis)(t,e,o),a=new g({chain:s.name??\"custom\",customChains:[s],eips:r,hardfork:i??s.hardfork});return void 0!==n&&a.setForkHashes(n),a}static isSupportedChainId(t){const e=this._getInitializedChains();return Boolean(e.names[t.toString()])}static _getChainParams(t,e){const r=this._getInitializedChains(e);if(\"number\"==typeof t||\"bigint\"==typeof t){if(t=t.toString(),r.names[t]){return r[r.names[t]]}throw new Error(`Chain with ID ${t} not supported`)}if(void 0!==r[t])return r[t];throw new Error(`Chain with name ${t} not supported`)}setChain(t){if(\"number\"==typeof t||\"bigint\"==typeof t||\"string\"==typeof t)this._chainParams=g._getChainParams(t,this._customChains);else{if(\"object\"!=typeof t)throw new Error(\"Wrong input format\");{if(this._customChains.length>0)throw new Error(\"Chain must be a string, number, or bigint when initialized with customChains passed in\");const e=[\"networkId\",\"genesis\",\"hardforks\",\"bootstrapNodes\"];for(const r of e)if(!(r in t))throw new Error(`Missing required chain parameter: ${r}`);this._chainParams=t}}for(const t of this.hardforks())if(void 0===t.block)throw new Error(\"Hardfork cannot have undefined block number\");return this._chainParams}setHardfork(t){let e=!1;for(const r of this.HARDFORK_CHANGES)r[0]===t&&(this._hardfork!==t&&(this._hardfork=t,this.emit(\"hardforkChanged\",t)),e=!0);if(!e)throw new Error(`Hardfork with name ${t} not supported`)}getHardforkByBlockNumber(t,e,r){t=(0,i.toType)(t,i.TypeOutput.BigInt),e=(0,i.toType)(e,i.TypeOutput.BigInt),r=(0,i.toType)(r,i.TypeOutput.Number);const n=this.hardforks().filter((t=>null!==t.block||null!==t.ttd&&void 0!==t.ttd||void 0!==t.timestamp)),o=n.findIndex((t=>null!==t.ttd&&void 0!==t.ttd));if(n.slice(o+1).findIndex((t=>null!==t.ttd&&void 0!==t.ttd))>=0)throw Error(\"More than one merge hardforks found with ttd specified\");let s=n.findIndex((e=>null!==e.block&&e.block>t||void 0!==r&&Number(e.timestamp)>r));if(-1===s)s=n.length;else if(0===s)throw Error(\"Must have at least one hardfork at block 0\");if(void 0===r){s-=n.slice(0,s).reverse().findIndex((t=>null!==t.block||void 0!==t.ttd))}if(s-=1,null===n[s].block&&void 0===n[s].timestamp)(null==e||BigInt(n[s].ttd)>e)&&(s-=1);else if(o>=0&&null!=e){if(s>=o&&BigInt(n[o].ttd)>e)throw Error(\"Maximum HF determined by total difficulty is lower than the block number HF\");if(s<o&&BigInt(n[o].ttd)<=e)throw Error(\"HF determined by block number is lower than the minimum total difficulty HF\")}const a=s;for(;s<n.length-1&&(n[s].block===n[s+1].block&&n[s].timestamp===n[s+1].timestamp);s++);if(r){if(n.slice(0,a).reduce(((t,e)=>Math.max(Number(e.timestamp??\"0\"),t)),0)>r)throw Error(\"Maximum HF determined by timestamp is lower than the block number/ttd HF\");if(n.slice(s+1).reduce(((t,e)=>Math.min(Number(e.timestamp??r),t)),r)<r)throw Error(\"Maximum HF determined by block number/ttd is lower than timestamp HF\")}return n[s].name}setHardforkByBlockNumber(t,e,r){const n=this.getHardforkByBlockNumber(t,e,r);return this.setHardfork(n),n}_getHardfork(t){const e=this.hardforks();for(const r of e)if(r.name===t)return r;return null}setEIPs(t=[]){for(const e of t){if(!(e in l.EIPs))throw new Error(`${e} not supported`);const r=this.gteHardfork(l.EIPs[e].minimumHardfork);if(!r)throw new Error(`${e} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${r}`);if(void 0!==l.EIPs[e].requiredEIPs)for(const r of l.EIPs[e].requiredEIPs)if(!t.includes(r)&&!this.isActivatedEIP(r))throw new Error(`${e} requires EIP ${r}, but is not included in the EIP list`)}this._eips=t}param(t,e){let r;for(const n of this._eips)if(r=this.paramByEIP(t,e,n),void 0!==r)return r;return this.paramByHardfork(t,e,this._hardfork)}paramByHardfork(t,e,r){let n=null;for(const i of this.HARDFORK_CHANGES){if(\"eips\"in i[1]){const r=i[1].eips;for(const i of r){const r=this.paramByEIP(t,e,i);n=\"bigint\"==typeof r?r:n}}else{if(void 0===i[1][t])throw new Error(`Topic ${t} not defined`);void 0!==i[1][t][e]&&(n=i[1][t][e].v)}if(i[0]===r)break}return BigInt(n??0)}paramByEIP(t,e,r){if(!(r in l.EIPs))throw new Error(`${r} not supported`);const n=l.EIPs[r];if(!(t in n))throw new Error(`Topic ${t} not defined`);if(void 0===n[t][e])return;const i=n[t][e].v;return BigInt(i)}paramByBlock(t,e,r,n,i){const o=this.getHardforkByBlockNumber(r,n,i);return this.paramByHardfork(t,e,o)}isActivatedEIP(t){if(this.eips().includes(t))return!0;for(const e of this.HARDFORK_CHANGES){const r=e[1];if(this.gteHardfork(r.name)&&\"eips\"in r&&r.eips.includes(t))return!0}return!1}hardforkIsActiveOnBlock(t,e){e=(0,i.toType)(e,i.TypeOutput.BigInt),t=t??this._hardfork;const r=this.hardforkBlock(t);return\"bigint\"==typeof r&&r!==BigInt(0)&&e>=r}activeOnBlock(t){return this.hardforkIsActiveOnBlock(null,t)}hardforkGteHardfork(t,e){t=t??this._hardfork;const r=this.hardforks();let n=-1,i=-1,o=0;for(const s of r)s.name===t&&(n=o),s.name===e&&(i=o),o+=1;return n>=i&&-1!==i}gteHardfork(t){return this.hardforkGteHardfork(null,t)}hardforkBlock(t){t=t??this._hardfork;const e=this._getHardfork(t)?.block;return null==e?null:BigInt(e)}hardforkTimestamp(t){t=t??this._hardfork;const e=this._getHardfork(t)?.timestamp;return null==e?null:BigInt(e)}eipBlock(t){for(const e of this.HARDFORK_CHANGES){const r=e[1];if(\"eips\"in r&&r.eips.includes(t))return this.hardforkBlock(e[0])}return null}hardforkTTD(t){t=t??this._hardfork;const e=this._getHardfork(t)?.ttd;return null==e?null:BigInt(e)}isHardforkBlock(t,e){t=(0,i.toType)(t,i.TypeOutput.BigInt),e=e??this._hardfork;const r=this.hardforkBlock(e);return\"bigint\"==typeof r&&r!==BigInt(0)&&r===t}nextHardforkBlockOrTimestamp(t){t=t??this._hardfork;const e=this.hardforks();let r=e.findIndex((e=>e.name===t));if(t===d.Hardfork.Merge&&(r-=1),r<0)return null;let n=e[r].timestamp??e[r].block;n=null!=n?Number(n):null;const i=e.slice(r+1).find((t=>{let e=t.timestamp??t.block;return e=null!=e?Number(e):null,t.name!==d.Hardfork.Merge&&null!=e&&e!==n}));if(void 0===i)return null;const o=i.timestamp??i.block;return null==o?null:BigInt(o)}nextHardforkBlock(t){t=t??this._hardfork;let e=this.hardforkBlock(t);if(null===e&&t===d.Hardfork.Merge){const t=this.hardforks(),r=t.findIndex((t=>null!==t.ttd&&void 0!==t.ttd));if(r<0)throw Error(\"Merge hardfork should have been found\");e=this.hardforkBlock(t[r-1].name)}if(null===e)return null;return this.hardforks().reduce(((t,r)=>{const n=BigInt(null===r.block||void 0!==r.ttd&&null!==r.ttd?0:r.block);return n>e&&null===t?n:t}),null)}isNextHardforkBlock(t,e){t=(0,i.toType)(t,i.TypeOutput.BigInt),e=e??this._hardfork;const r=this.nextHardforkBlock(e);return null!==r&&r===t}_calcForkHash(t,e){let r=n.alloc(0),s=0;for(const e of this.hardforks()){const{block:i,timestamp:o,name:a}=e;let u=o??i;if(u=null!==u?Number(u):null,\"number\"==typeof u&&0!==u&&u!==s&&a!==d.Hardfork.Merge){const t=n.from(u.toString(16).padStart(16,\"0\"),\"hex\");r=n.concat([r,t]),s=u}if(e.name===t)break}const a=n.concat([e,r]);return`0x${(0,i.intToBuffer)((0,o.buf)(a)>>>0).toString(\"hex\")}`}forkHash(t,e){t=t??this._hardfork;const r=this._getHardfork(t);if(null===r||null===r?.block&&void 0===r?.timestamp&&void 0===r?.ttd){throw new Error(\"No fork hash calculation possible for future hardfork\")}if(null!=r?.forkHash)return r.forkHash;if(!e)throw new Error(\"genesisHash required for forkHash calculation\");return this._calcForkHash(t,e)}hardforkForForkHash(t){const e=this.hardforks().filter((e=>e.forkHash===t));return e.length>=1?e[e.length-1]:null}setForkHashes(t){for(const e of this.hardforks()){const r=e.timestamp??e.block;null!==e.forkHash&&void 0!==e.forkHash||null==r&&void 0===e.ttd||(e.forkHash=this.forkHash(e.name,t))}}genesis(){return this._chainParams.genesis}hardforks(){return this._chainParams.hardforks}bootstrapNodes(){return this._chainParams.bootstrapNodes}dnsNetworks(){return this._chainParams.dnsNetworks}hardfork(){return this._hardfork}chainId(){return BigInt(this._chainParams.chainId)}chainName(){return this._chainParams.name}networkId(){return BigInt(this._chainParams.networkId)}eips(){return this._eips}consensusType(){const t=this.hardfork();let e;for(const r of this.HARDFORK_CHANGES)if(\"consensus\"in r[1]&&(e=r[1].consensus.type),r[0]===t)break;return e??this._chainParams.consensus.type}consensusAlgorithm(){const t=this.hardfork();let e;for(const r of this.HARDFORK_CHANGES)if(\"consensus\"in r[1]&&(e=r[1].consensus.algorithm),r[0]===t)break;return e??this._chainParams.consensus.algorithm}consensusConfig(){const t=this.hardfork();let e;for(const r of this.HARDFORK_CHANGES)if(\"consensus\"in r[1]&&(e=r[1].consensus[r[1].consensus.algorithm]),r[0]===t)break;return e??this._chainParams.consensus[this.consensusAlgorithm()]??{}}copy(){const t=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return t.removeAllListeners(),t}static _getInitializedChains(t){const e={};for(const[t,r]of Object.entries(d.Chain))e[r]=t.toLowerCase();const r={mainnet:u,ropsten:c,rinkeby:h,goerli:a,sepolia:f};if(t)for(const n of t){const{name:t}=n;e[n.chainId.toString()]=t,r[t]=n}return r.names=e,r}}e.Common=g},43925:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.EIPs=void 0,e.EIPs={1153:r(59765),1559:r(59659),2315:r(609),2537:r(34335),2565:r(40354),2718:r(43928),2929:r(10810),2930:r(33501),3074:r(96973),3198:r(24984),3529:r(3573),3540:r(36685),3541:r(96309),3554:r(93609),3607:r(4204),3651:r(69727),3670:r(18038),3675:r(33021),3855:r(94222),3860:r(54359),4345:r(58444),4399:r(46401),4844:r(51200),4895:r(3122),5133:r(29694)}},90649:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.CustomChain=e.ConsensusAlgorithm=e.ConsensusType=e.Hardfork=e.Chain=void 0,function(t){t[t.Mainnet=1]=\"Mainnet\",t[t.Ropsten=3]=\"Ropsten\",t[t.Rinkeby=4]=\"Rinkeby\",t[t.Goerli=5]=\"Goerli\",t[t.Sepolia=11155111]=\"Sepolia\"}(e.Chain||(e.Chain={})),function(t){t.Chainstart=\"chainstart\",t.Homestead=\"homestead\",t.Dao=\"dao\",t.TangerineWhistle=\"tangerineWhistle\",t.SpuriousDragon=\"spuriousDragon\",t.Byzantium=\"byzantium\",t.Constantinople=\"constantinople\",t.Petersburg=\"petersburg\",t.Istanbul=\"istanbul\",t.MuirGlacier=\"muirGlacier\",t.Berlin=\"berlin\",t.London=\"london\",t.ArrowGlacier=\"arrowGlacier\",t.GrayGlacier=\"grayGlacier\",t.MergeForkIdTransition=\"mergeForkIdTransition\",t.Merge=\"merge\",t.Shanghai=\"shanghai\",t.ShardingForkDev=\"shardingFork\"}(e.Hardfork||(e.Hardfork={})),function(t){t.ProofOfStake=\"pos\",t.ProofOfWork=\"pow\",t.ProofOfAuthority=\"poa\"}(e.ConsensusType||(e.ConsensusType={})),function(t){t.Ethash=\"ethash\",t.Clique=\"clique\",t.Casper=\"casper\"}(e.ConsensusAlgorithm||(e.ConsensusAlgorithm={})),function(t){t.PolygonMainnet=\"polygon-mainnet\",t.PolygonMumbai=\"polygon-mumbai\",t.ArbitrumRinkebyTestnet=\"arbitrum-rinkeby-testnet\",t.ArbitrumOne=\"arbitrum-one\",t.xDaiChain=\"x-dai-chain\",t.OptimisticKovan=\"optimistic-kovan\",t.OptimisticEthereum=\"optimistic-ethereum\"}(e.CustomChain||(e.CustomChain={}))},12188:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hardforks=void 0,e.hardforks={chainstart:r(80021),homestead:r(72001),dao:r(75774),tangerineWhistle:r(70116),spuriousDragon:r(40610),byzantium:r(21773),constantinople:r(29517),petersburg:r(76694),istanbul:r(23316),muirGlacier:r(68288),berlin:r(45515),london:r(46497),shanghai:r(23317),arrowGlacier:r(98874),grayGlacier:r(13292),mergeForkIdTransition:r(76552),merge:r(69024),shardingFork:r(68870)}},31664:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(19752),e),i(r(90649),e),i(r(13732),e),i(r(73824),e)},13732:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},73824:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.parseGethGenesis=void 0;const n=r(99065),i=r(90649);function o(t,e=!0){const{name:r,config:o,difficulty:s,mixHash:a,gasLimit:u,coinbase:h,baseFeePerGas:c}=t;let{extraData:f,timestamp:l,nonce:d}=t;const p=Number(l),{chainId:m}=o;if(\"\"===f&&(f=\"0x\"),(0,n.isHexPrefixed)(l)||(l=(0,n.intToHex)(parseInt(l))),18!==d.length&&(d=function(t){return t&&\"0x0\"!==t?(0,n.isHexPrefixed)(t)?\"0x\"+(0,n.stripHexPrefix)(t).padStart(16,\"0\"):\"0x\"+t.padStart(16,\"0\"):\"0x0000000000000000\"}(d)),o.eip155Block!==o.eip158Block)throw new Error(\"EIP155 block number must equal EIP 158 block number since both are part of SpuriousDragon hardfork and the client only supports activating the full hardfork\");const g={name:r,chainId:m,networkId:m,genesis:{timestamp:l,gasLimit:parseInt(u),difficulty:parseInt(s),nonce:d,extraData:f,mixHash:a,coinbase:h,baseFeePerGas:c},hardfork:void 0,hardforks:[],bootstrapNodes:[],consensus:void 0!==o.clique?{type:\"poa\",algorithm:\"clique\",clique:{period:o.clique.period??o.clique.blockperiodseconds,epoch:o.clique.epoch??o.clique.epochlength}}:{type:\"pow\",algorithm:\"ethash\",ethash:{}}},y={[i.Hardfork.Homestead]:{name:\"homesteadBlock\"},[i.Hardfork.Dao]:{name:\"daoForkBlock\"},[i.Hardfork.TangerineWhistle]:{name:\"eip150Block\"},[i.Hardfork.SpuriousDragon]:{name:\"eip155Block\"},[i.Hardfork.Byzantium]:{name:\"byzantiumBlock\"},[i.Hardfork.Constantinople]:{name:\"constantinopleBlock\"},[i.Hardfork.Petersburg]:{name:\"petersburgBlock\"},[i.Hardfork.Istanbul]:{name:\"istanbulBlock\"},[i.Hardfork.MuirGlacier]:{name:\"muirGlacierBlock\"},[i.Hardfork.Berlin]:{name:\"berlinBlock\"},[i.Hardfork.London]:{name:\"londonBlock\"},[i.Hardfork.MergeForkIdTransition]:{name:\"mergeForkBlock\",postMerge:e},[i.Hardfork.Shanghai]:{name:\"shanghaiTime\",postMerge:!0,isTimestamp:!0},[i.Hardfork.ShardingForkDev]:{name:\"shardingForkTime\",postMerge:!0,isTimestamp:!0}},b=Object.keys(y).reduce(((t,e)=>(t[y[e].name]=e,t)),{}),v=Object.keys(o).filter((t=>void 0!==b[t]&&void 0!==o[t]&&null!==o[t]));if(g.hardforks=v.map((t=>({name:b[t],block:!0===y[b[t]].isTimestamp||\"number\"!=typeof o[t]?null:o[t],timestamp:!0===y[b[t]].isTimestamp&&\"number\"==typeof o[t]?o[t]:void 0}))).filter((t=>null!==t.block||void 0!==t.timestamp)),g.hardforks.sort((function(t,e){return(t.block??1/0)-(e.block??1/0)})),g.hardforks.sort((function(t,e){return(t.timestamp??p)-(e.timestamp??p)})),void 0!==o.terminalTotalDifficulty){const t={name:i.Hardfork.Merge,ttd:o.terminalTotalDifficulty,block:null},e=g.hardforks.findIndex((t=>!0===y[t.name]?.postMerge));-1!==e?g.hardforks.splice(e,0,t):g.hardforks.push(t)}const w=g.hardforks.length>0?g.hardforks.slice(-1)[0]:void 0;return g.hardfork=w?.name,g.hardforks.unshift({name:i.Hardfork.Chainstart,block:0}),g}e.parseGethGenesis=function(t,e,r){try{if([\"config\",\"difficulty\",\"gasLimit\",\"alloc\"].some((e=>!(e in t))))throw new Error(\"Invalid format, expected geth genesis fields missing\");return void 0!==e&&(t.name=e),o(t,r)}catch(t){throw new Error(`Error parsing parameters file: ${t.message}`)}}},81381:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const i=r(57256),o=r(1115),s=r(80101),a=r(10144),u=r(69084),h=r(85835),c=r(96564),f=r(34933),l=BigInt(0);class d{constructor(t=l,e=l,r=h.KECCAK256_RLP,n=h.KECCAK256_NULL){this.nonce=t,this.balance=e,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(t){const{nonce:e,balance:r,storageRoot:n,codeHash:i}=t;return new d(void 0!==e?(0,u.bufferToBigInt)((0,u.toBuffer)(e)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==i?(0,u.toBuffer)(i):void 0)}static fromRlpSerializedAccount(t){const e=(0,u.arrToBufArr)(i.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(e))throw new Error(\"Invalid serialized account input. Must be array\");return this.fromValuesArray(e)}static fromValuesArray(t){const[e,r,n,i]=t;return new d((0,u.bufferToBigInt)(e),(0,u.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<l)throw new Error(\"nonce must be greater than zero\");if(this.balance<l)throw new Error(\"balance must be greater than zero\");if(32!==this.storageRoot.length)throw new Error(\"storageRoot must have a length of 32\");if(32!==this.codeHash.length)throw new Error(\"codeHash must have a length of 32\")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(h.KECCAK256_NULL)}isEmpty(){return this.balance===l&&this.nonce===l&&this.codeHash.equals(h.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)};e.toChecksumAddress=function(t,e){(0,c.assertIsHexString)(t);const r=(0,f.stripHexPrefix)(t).toLowerCase();let i=\"\";if(void 0!==e){i=(0,u.bufferToBigInt)((0,u.toBuffer)(e)).toString()+\"0x\"}const s=n.from(i+r,\"utf8\"),h=(0,a.bytesToHex)((0,o.keccak256)(s));let l=\"0x\";for(let t=0;t<r.length;t++)parseInt(h[t],16)>=8?l+=r[t].toUpperCase():l+=r[t];return l};e.isValidChecksumAddress=function(t,r){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,r)===t};e.generateAddress=function(t,e){return(0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,u.bufferToBigInt)(e)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,e])))).slice(-20)};e.generateAddress2=function(t,e,r){if((0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,c.assertIsBuffer)(r),20!==t.length)throw new Error(\"Expected from to be of length 20\");if(32!==e.length)throw new Error(\"Expected salt to be of length 32\");const i=(0,o.keccak256)(n.concat([n.from(\"ff\",\"hex\"),t,e,(0,o.keccak256)(r)]));return(0,u.toBuffer)(i).slice(-20)};e.isValidPrivate=function(t){return s.secp256k1.utils.isValidPrivateKey(t)};e.isValidPublic=function(t,e=!1){if((0,c.assertIsBuffer)(t),64===t.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),t])),!0}catch(t){return!1}if(!e)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(t),!0}catch(t){return!1}};e.pubToAddress=function(t,e=!1){if((0,c.assertIsBuffer)(t),e&&64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),64!==t.length)throw new Error(\"Expected pubKey to be of length 64\");return n.from((0,o.keccak256)(t)).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(t){return(0,c.assertIsBuffer)(t),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1))};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(t){return(0,c.assertIsBuffer)(t),64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),t};e.zeroAddress=function(){const t=(0,u.zeros)(20);return(0,u.bufferToHex)(t)};function p(t){const[e,r,n,i]=t;return[e,r,0===(0,u.arrToBufArr)(n).length?h.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?h.KECCAK256_NULL:i]}e.isZeroAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return(0,e.zeroAddress)()===t},e.accountBodyFromSlim=p;const m=new Uint8Array(0);e.accountBodyToSlim=function(t){const[e,r,n,i]=t;return[e,r,(0,u.arrToBufArr)(n).equals(h.KECCAK256_RLP)?m:n,(0,u.arrToBufArr)(i).equals(h.KECCAK256_NULL)?m:i]},e.accountBodyToRLP=function(t,e=!0){const r=e?p(t):t;return(0,u.arrToBufArr)(i.RLP.encode(r))}},45337:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Address=void 0;const i=r(81381),o=r(69084);class s{constructor(t){if(20!==t.length)throw new Error(\"Invalid address length\");this.buf=t}static zero(){return new s((0,o.zeros)(20))}static fromString(t){if(!(0,i.isValidAddress)(t))throw new Error(\"Invalid address\");return new s((0,o.toBuffer)(t))}static fromPublicKey(t){if(!n.isBuffer(t))throw new Error(\"Public key should be Buffer\");const e=(0,i.pubToAddress)(t);return new s(e)}static fromPrivateKey(t){if(!n.isBuffer(t))throw new Error(\"Private key should be Buffer\");const e=(0,i.privateToAddress)(t);return new s(e)}static generate(t,e){if(\"bigint\"!=typeof e)throw new Error(\"Expected nonce to be a bigint\");return new s((0,i.generateAddress)(t.buf,(0,o.bigIntToBuffer)(e)))}static generate2(t,e,r){if(!n.isBuffer(e))throw new Error(\"Expected salt to be a Buffer\");if(!n.isBuffer(r))throw new Error(\"Expected initCode to be a Buffer\");return new s((0,i.generateAddress2)(t.buf,e,r))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const t=(0,o.bufferToBigInt)(this.buf),e=BigInt(0),r=BigInt(\"0xffff\");return t>=e&&t<=r}toString(){return\"0x\"+this.buf.toString(\"hex\")}toBuffer(){return n.from(this.buf)}}e.Address=s},24179:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.AsyncEventEmitter=void 0;const n=r(22699);class i extends n.EventEmitter{emit(t,...e){let[r,n]=e;const i=this;let o=i._events[t]??[];return void 0===n&&\"function\"==typeof r&&(n=r,r=void 0),\"newListener\"!==t&&\"removeListener\"!==t||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(t,e,r){let n;for await(const i of e)try{i.length<2?i.call(t,r):await new Promise(((e,n)=>{i.call(t,r,(t=>{t?n(t):e()}))}))}catch(t){n=t}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(t)>0}once(t,e){const r=this;let n;if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return n=e.length>=2?function(i,o){r.removeListener(t,n),e(i,o)}:function(i){r.removeListener(t,n),e(i,n)},r.on(t,n),r}first(t,e){let r=this._events[t]??[];if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return Array.isArray(r)||(this._events[t]=r=[r]),r.unshift(e),this}before(t,e,r){return this.beforeOrAfter(t,e,r)}after(t,e,r){return this.beforeOrAfter(t,e,r,\"after\")}beforeOrAfter(t,e,r,n){let i,o,s=this._events[t]??[];const a=\"after\"===n?1:0;if(\"function\"!=typeof r)throw new TypeError(\"listener must be a function\");if(\"function\"!=typeof e)throw new TypeError(\"target must be a function\");for(Array.isArray(s)||(this._events[t]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===e){o=i+a;break}return s.splice(o,0,r),this}on(t,e){return super.on(t,e)}addListener(t,e){return super.addListener(t,e)}prependListener(t,e){return super.prependListener(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,e){return super.removeListener(t,e)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}e.AsyncEventEmitter=i},69084:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const i=r(96564),o=r(34933);e.intToHex=function(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return n.from((0,o.padToEven)(r.slice(2)),\"hex\")};e.zeros=function(t){return n.allocUnsafe(t).fill(0)};const s=function(t,r,n){const i=(0,e.zeros)(r);return n?t.length<r?(t.copy(i),i):t.slice(0,r):t.length<r?(t.copy(i,r-t.length),i):t.slice(-r)};e.setLengthLeft=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!1)};e.setLengthRight=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!0)};const a=function(t){let e=t[0];for(;t.length>0&&\"0\"===e.toString();)e=(t=t.slice(1))[0];return t};e.unpadBuffer=function(t){return(0,i.assertIsBuffer)(t),a(t)};e.unpadArray=function(t){return(0,i.assertIsArray)(t),a(t)};e.unpadHexString=function(t){return(0,i.assertIsHexString)(t),t=(0,o.stripHexPrefix)(t),\"0x\"+a(t)};e.toBuffer=function(t){if(null==t)return n.allocUnsafe(0);if(n.isBuffer(t))return n.from(t);if(Array.isArray(t)||t instanceof Uint8Array)return n.from(t);if(\"string\"==typeof t){if(!(0,o.isHexString)(t))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(t)),\"hex\")}if(\"number\"==typeof t)return(0,e.intToBuffer)(t);if(\"bigint\"==typeof t){if(t<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${t}`);let e=t.toString(16);return e.length%2&&(e=\"0\"+e),n.from(e,\"hex\")}if(t.toArray)return n.from(t.toArray());if(t.toBuffer)return n.from(t.toBuffer());throw new Error(\"invalid type\")};function u(t){const r=(0,e.bufferToHex)(t);return\"0x\"===r?BigInt(0):BigInt(r)}function h(t){return(0,e.toBuffer)(\"0x\"+t.toString(16))}e.bufferToHex=function(t){return\"0x\"+(t=(0,e.toBuffer)(t)).toString(\"hex\")},e.bufferToBigInt=u,e.bigIntToBuffer=h;e.bufferToInt=function(t){const e=Number(u(t));if(!Number.isSafeInteger(e))throw new Error(\"Number exceeds 53 bits\");return e};e.fromSigned=function(t){return BigInt.asIntN(256,u(t))};e.toUnsigned=function(t){return h(BigInt.asUintN(256,t))};e.addHexPrefix=function(t){return\"string\"!=typeof t||(0,o.isHexPrefixed)(t)?t:\"0x\"+t},e.short=function(t,e=50){const r=n.isBuffer(t)?t.toString(\"hex\"):t;return r.length<=e?r:r.slice(0,e)+\"…\"};e.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error(\"Invalid non-even hex string input for toUtf8() provided\");return n.from(t.replace(/^(00)+|(00)+$/g,\"\"),\"hex\").toString(\"utf8\")};e.baToJSON=function(t){if(n.isBuffer(t))return`0x${t.toString(\"hex\")}`;if(t instanceof Array){const r=[];for(let n=0;n<t.length;n++)r.push((0,e.baToJSON)(t[n]));return r}};e.validateNoLeadingZeroes=function(t){for(const[e,r]of Object.entries(t))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${e} cannot have leading zeroes, received: ${r.toString(\"hex\")}`)},e.arrToBufArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):n.from(e)},e.bufArrToArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):Uint8Array.from(e??[])};e.bigIntToHex=t=>\"0x\"+t.toString(16),e.bigIntToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)(h(t))},e.intToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)((0,e.intToBuffer)(t))}},85835:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const n=r(48834),i=r(80101);e.MAX_UINT64=BigInt(\"0xffffffffffffffff\"),e.MAX_INTEGER=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),e.MAX_INTEGER_BIGINT=BigInt(\"115792089237316195423570985008687907853269984665640564039457584007913129639935\"),e.SECP256K1_ORDER=i.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt(\"0x10000000000000000000000000000000000000000000000000000000000000000\"),e.KECCAK256_NULL_S=\"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",e.KECCAK256_NULL=n.Buffer.from(e.KECCAK256_NULL_S,\"hex\"),e.KECCAK256_RLP_ARRAY_S=\"1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",e.KECCAK256_RLP_ARRAY=n.Buffer.from(e.KECCAK256_RLP_ARRAY_S,\"hex\"),e.KECCAK256_RLP_S=\"56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",e.KECCAK256_RLP=n.Buffer.from(e.KECCAK256_RLP_S,\"hex\"),e.RLP_EMPTY_STRING=n.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16},18439:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;e.hasTerminator=t=>t.length>0&&16===t[t.length-1];e.nibblesToBytes=(t,e)=>{for(let r=0,n=0;n<t.length;r+=1,n+=2)e[r]=t[n]<<4|t[n+1]};e.nibblesToCompactBytes=t=>{let r=0;(0,e.hasTerminator)(t)&&(r=1,t=t.subarray(0,t.length-1));const n=new Uint8Array(t.length/2+1);return n[0]=r<<5,1==(1&t.length)&&(n[0]|=16,n[0]|=t[0],t=t.subarray(1)),(0,e.nibblesToBytes)(t,n.subarray(1)),n};e.bytesToNibbles=t=>{const e=2*t.length+1,r=new Uint8Array(e);for(let e=0;e<t.length;e++){const n=t[e];r[2*e]=n/16,r[2*e+1]=n%16}return r[e-1]=16,r};e.compactBytesToNibbles=t=>{if(0===t.length)return t;let r=(0,e.bytesToNibbles)(t);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},96564:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertIsString=e.assertIsArray=e.assertIsBuffer=e.assertIsHexString=void 0;const i=r(34933);e.assertIsHexString=function(t){if(!(0,i.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};e.assertIsBuffer=function(t){if(!n.isBuffer(t)){throw new Error(`This method only supports Buffer but input was: ${t}`)}};e.assertIsArray=function(t){if(!Array.isArray(t)){throw new Error(`This method only supports number arrays but input was: ${t}`)}};e.assertIsString=function(t){if(\"string\"!=typeof t){throw new Error(`This method only supports strings but input was: ${t}`)}}},99065:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,i(r(85835),e),i(r(61332),e),i(r(81381),e),i(r(45337),e),i(r(62503),e),i(r(83441),e),i(r(69084),e),i(r(30912),e),i(r(18439),e),i(r(24179),e);var o=r(34933);Object.defineProperty(e,\"arrayContainsArray\",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,\"fromAscii\",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,\"fromUtf8\",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,\"getBinarySize\",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,\"getKeys\",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,\"isHexPrefixed\",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,\"isHexString\",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,\"padToEven\",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,\"stripHexPrefix\",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,\"toAscii\",{enumerable:!0,get:function(){return o.toAscii}}),i(r(91576),e),i(r(48989),e)},34933:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;function i(t){if(\"string\"!=typeof t)throw new Error(\"[isHexPrefixed] input must be type 'string', received type \"+typeof t);return\"0\"===t[0]&&\"x\"===t[1]}Object.defineProperty(e,\"__esModule\",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,e.isHexPrefixed=i;function o(t){let e=t;if(\"string\"!=typeof e)throw new Error(\"[padToEven] value must be type 'string', received \"+typeof e);return e.length%2&&(e=`0${e}`),e}e.stripHexPrefix=t=>{if(\"string\"!=typeof t)throw new Error(\"[stripHexPrefix] input must be type 'string', received \"+typeof t);return i(t)?t.slice(2):t},e.padToEven=o,e.getBinarySize=function(t){if(\"string\"!=typeof t)throw new Error(\"[getBinarySize] method requires input type 'string', received \"+typeof t);return n.byteLength(t,\"utf8\")},e.arrayContainsArray=function(t,e,r){if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`);if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof e}'`);return e[!0===r?\"some\":\"every\"]((e=>t.indexOf(e)>=0))},e.toAscii=function(t){let e=\"\",r=0;const n=t.length;for(\"0x\"===t.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(t.substr(r,2),16);e+=String.fromCharCode(n)}return e},e.fromUtf8=function(t){return`0x${o(n.from(t,\"utf8\").toString(\"hex\")).replace(/^0+|0+$/g,\"\")}`},e.fromAscii=function(t){let e=\"\";for(let r=0;r<t.length;r++){const n=t.charCodeAt(r).toString(16);e+=n.length<2?`0${n}`:n}return`0x${e}`},e.getKeys=function(t,e,r){if(!Array.isArray(t))throw new Error(\"[getKeys] method expects input 'params' to be an array, got \"+typeof t);if(\"string\"!=typeof e)throw new Error(\"[getKeys] method expects input 'key' to be type 'string', got \"+typeof t);const n=[];for(let i=0;i<t.length;i++){let o=t[i][e];if(!0!==r||o){if(\"string\"!=typeof o)throw new Error(\"invalid abi - expected type 'string', received \"+typeof o)}else o=\"\";n.push(o)}return n},e.isHexString=function(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==e&&e>0&&t.length!==2+2*e)}},91576:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Lock=void 0;e.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((t=>this.promiseResolverQueue.push(t)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn(\"Lock.permits should never be > 0 when there is someone waiting.\");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}},48989:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getProvider=e.fetchFromProvider=void 0;const n=r(42973);e.fetchFromProvider=async(t,e)=>(await(0,n.default)(t,{headers:{\"content-type\":\"application/json\"},type:\"json\",data:{method:e.method,params:e.params,jsonrpc:\"2.0\",id:1}})).result;e.getProvider=t=>{if(\"string\"==typeof t)return t;if(void 0!==t?.connection?.url)return t.connection.url;throw new Error(\"Must provide valid provider URL or Web3Provider\")}},83441:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;const i=r(1115),o=r(80101),s=r(69084),a=r(85835),u=r(96564);function h(t,e){return t===BigInt(0)||t===BigInt(1)?t:void 0===e?t-BigInt(27):t-(e*BigInt(2)+BigInt(35))}function c(t){return t===BigInt(0)||t===BigInt(1)}e.ecsign=function(t,e,r){const i=o.secp256k1.sign(t,e),s=i.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}};e.ecrecover=function(t,e,r,i,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(i,32)],64),f=h(e,a);if(!c(f))throw new Error(\"Invalid signature v value\");const l=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(t);return n.from(l.toRawBytes(!1).slice(1))};e.toRpcSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(t)]))};e.toCompactSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");let o=r;return(t>BigInt(28)&&t%BigInt(2)===BigInt(1)||t===BigInt(1)||t===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(o,32)]))};e.fromRpcSig=function(t){const e=(0,s.toBuffer)(t);let r,n,i;if(e.length>=65)r=e.slice(0,32),n=e.slice(32,64),i=(0,s.bufferToBigInt)(e.slice(64));else{if(64!==e.length)throw new Error(\"Invalid signature length\");r=e.slice(0,32),n=e.slice(32,64),i=BigInt((0,s.bufferToInt)(e.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r,s:n}};e.isValidSignature=function(t,e,r,n=!0,i){if(32!==e.length||32!==r.length)return!1;if(!c(h(t,i)))return!1;const o=(0,s.bufferToBigInt)(e),u=(0,s.bufferToBigInt)(r);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER)&&!(n&&u>=a.SECP256K1_ORDER_DIV_2)};e.hashPersonalMessage=function(t){(0,u.assertIsBuffer)(t);const e=n.from(`\u0019Ethereum Signed Message:\\n${t.length}`,\"utf-8\");return n.from((0,i.keccak256)(n.concat([e,t])))}},30912:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toType=e.TypeOutput=void 0;const n=r(69084),i=r(34933);var o;!function(t){t[t.Number=0]=\"Number\",t[t.BigInt=1]=\"BigInt\",t[t.Buffer=2]=\"Buffer\",t[t.PrefixedHexString=3]=\"PrefixedHexString\"}(o=e.TypeOutput||(e.TypeOutput={})),e.toType=function(t,e){if(null===t)return null;if(void 0===t)return;if(\"string\"==typeof t&&!(0,i.isHexString)(t))throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`);if(\"number\"==typeof t&&!Number.isSafeInteger(t))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)\");const r=(0,n.toBuffer)(t);switch(e){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const t=(0,n.bufferToBigInt)(r);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)\");return Number(t)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error(\"unknown outputType\")}}},61332:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.GWEI_TO_WEI=void 0,e.GWEI_TO_WEI=BigInt(1e9)},62503:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Withdrawal=void 0;const i=r(45337),o=r(69084),s=r(30912);class a{constructor(t,e,r,n){this.index=t,this.validatorIndex=e,this.address=r,this.amount=n}static fromWithdrawalData(t){const{index:e,validatorIndex:r,address:n,amount:o}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt),h=(0,s.toType)(r,s.TypeOutput.BigInt),c=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,h,c,f)}static fromValuesArray(t){if(4!==t.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[e,r,n,i]=t;return a.fromWithdrawalData({index:e,validatorIndex:r,address:n,amount:i})}static toBufferArray(t){const{index:e,validatorIndex:r,address:o,amount:a}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(e,s.TypeOutput.Buffer),h=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let c;c=o instanceof i.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer);return[u,h,c,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:\"0x\"+this.address.buf.toString(\"hex\"),amount:(0,o.bigIntToHex)(this.amount)}}}e.Withdrawal=a},57256:(t,e)=>{\"use strict\";function r(t){if(Array.isArray(t)){const e=[];let n=0;for(let i=0;i<t.length;i++){const o=r(t[i]);e.push(o),n+=o.length}return l(o(n,192),...e)}const e=g(t);return 1===e.length&&e[0]<128?e:l(o(e.length,128),e)}function n(t,e,r){if(r>t.length)throw new Error(\"invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds\");return t.slice(e,r)}function i(t){if(0===t[0])throw new Error(\"invalid RLP: extra zeros\");return c(h(t))}function o(t,e){if(t<56)return Uint8Array.from([t+e]);const r=p(t),n=p(e+55+r.length/2);return Uint8Array.from(f(n+r))}function s(t,e=!1){if(null==t||0===t.length)return Uint8Array.from([]);const r=a(g(t));if(e)return r;if(0!==r.remainder.length)throw new Error(\"invalid RLP: remainder must be zero\");return r.data}function a(t){let e,r,o,s,u;const h=[],c=t[0];if(c<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(c<=183){if(e=c-127,o=128===c?Uint8Array.from([]):n(t,1,e),2===e&&o[0]<128)throw new Error(\"invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed\");return{data:o,remainder:t.slice(e)}}if(c<=191){if(r=c-182,t.length-1<r)throw new Error(\"invalid RLP: not enough bytes for string length\");if(e=i(n(t,1,r)),e<=55)throw new Error(\"invalid RLP: expected string length to be greater than 55\");return o=n(t,r,e+r),{data:o,remainder:t.slice(e+r)}}if(c<=247){for(e=c-191,s=n(t,1,e);s.length;)u=a(s),h.push(u.data),s=u.remainder;return{data:h,remainder:t.slice(e)}}{if(r=c-246,e=i(n(t,1,r)),e<56)throw new Error(\"invalid RLP: encoded list too short\");const o=r+e;if(o>t.length)throw new Error(\"invalid RLP: total length is larger than the data\");for(s=n(t,r,o);s.length;)u=a(s),h.push(u.data),s=u.remainder;return{data:h,remainder:t.slice(o)}}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.RLP=e.utils=e.decode=e.encode=void 0,e.encode=r,e.decode=s;const u=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function h(t){let e=\"\";for(let r=0;r<t.length;r++)e+=u[t[r]];return e}function c(t){const e=Number.parseInt(t,16);if(Number.isNaN(e))throw new Error(\"Invalid byte sequence\");return e}function f(t){if(\"string\"!=typeof t)throw new TypeError(\"hexToBytes: expected string, got \"+typeof t);if(t.length%2)throw new Error(\"hexToBytes: received invalid unpadded hex\");const e=new Uint8Array(t.length/2);for(let r=0;r<e.length;r++){const n=2*r;e[r]=c(t.slice(n,n+2))}return e}function l(...t){if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}function d(t){return(new TextEncoder).encode(t)}function p(t){if(t<0)throw new Error(\"Invalid integer as argument, must be unsigned!\");const e=t.toString(16);return e.length%2?`0${e}`:e}function m(t){return t.length>=2&&\"0\"===t[0]&&\"x\"===t[1]}function g(t){if(t instanceof Uint8Array)return t;if(\"string\"==typeof t)return m(t)?f((e=\"string\"!=typeof(r=t)?r:m(r)?r.slice(2):r).length%2?`0${e}`:e):d(t);var e,r;if(\"number\"==typeof t||\"bigint\"==typeof t)return t?f(p(t)):Uint8Array.from([]);if(null==t)return Uint8Array.from([]);throw new Error(\"toBytes: received unsupported type \"+typeof t)}e.utils={bytesToHex:h,concatBytes:l,hexToBytes:f,utf8ToBytes:d},e.RLP={encode:r,decode:s}},68872:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.decodeSingle=e.decode=e.encodePacked=e.encodeSingle=e.encode=void 0;const n=r(67827),i=r(39777),o=r(69472);e.encode=(t,e,r,n)=>{try{return(0,o.pack)({types:t,values:e,packed:r,tight:n})}catch(t){if(t instanceof i.ParserError)throw new i.ParserError(`Unable to encode value: ${t.message}`,t);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(t)}`,t)}};e.encodeSingle=(t,r)=>(0,e.encode)([t],[r]);e.encodePacked=(t,r,n)=>(0,e.encode)(t,r,!0,n);e.decode=(t,e)=>{const r=(0,n.createBytes)(e);try{return(0,o.unpack)(t,r)}catch(t){if(t instanceof i.ParserError)throw new i.ParserError(`Unable to decode value: ${t.message}`,t);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(t)}`,t)}};e.decodeSingle=(t,r)=>{const o=(0,e.decode)([t],r);return(0,n.assert)(1===o.length,new i.ParserError(\"Decoded value array has unexpected length.\")),o[0]}},39777:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ParserError=e.getErrorStack=e.getErrorMessage=void 0;const n=r(67827);e.getErrorMessage=t=>\"string\"==typeof t?t:t instanceof Error||(0,n.isObject)(t)&&(0,n.hasProperty)(t,\"message\")&&\"string\"==typeof t.message?t.message:\"Unknown error.\";e.getErrorStack=t=>{if(t instanceof Error)return t.stack};class i extends Error{constructor(t,r){super(t),this.name=\"ParserError\";const n=(0,e.getErrorStack)(r);n&&(this.stack=n)}}e.ParserError=i},40260:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(68872),e),i(r(39777),e),i(r(75858),e)},12378:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.iterate=void 0;const n=r(67827);e.iterate=function*(t,e=32){for(let r=0;r<t.length;r+=e){const i=t=>{(0,n.assert)(t>=0,\"Cannot skip a negative number of bytes.\"),(0,n.assert)(t%e==0,\"Length must be a multiple of the size.\"),r+=t},o=t.subarray(r);yield{skip:i,value:o}}return{skip:()=>{},value:new Uint8Array}}},69472:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.unpack=e.pack=e.isDynamicParser=e.getParser=void 0;const n=r(67827),i=r(39777),o=r(12378),s=r(84206),a=r(92313);e.getParser=t=>{const e={address:s.address,array:s.array,bool:s.bool,bytes:s.bytes,fixedBytes:s.fixedBytes,function:s.fn,number:s.number,string:s.string,tuple:s.tuple},r=e[t];if(r)return r;const n=Object.values(e).find((e=>e.isType(t)));if(n)return n;throw new i.ParserError(`The type \"${t}\" is not supported.`)};e.isDynamicParser=(t,e)=>{const{isDynamic:r}=t;return\"function\"==typeof r?r(e):r};e.pack=({types:t,values:r,packed:o=!1,tight:s=!1,arrayPacked:u=!1,byteArray:h=new Uint8Array})=>{(0,n.assert)(t.length===r.length,new i.ParserError(`The number of types (${t.length}) does not match the number of values (${r.length}).`));const{staticBuffer:c,dynamicBuffer:f,pointers:l}=t.reduce((({staticBuffer:t,dynamicBuffer:i,pointers:a},h,c)=>{const f=(0,e.getParser)(h),l=r[c];if(o||u||!(0,e.isDynamicParser)(f,h))return{staticBuffer:f.encode({buffer:t,value:l,type:h,packed:o,tight:s}),dynamicBuffer:i,pointers:a};return{staticBuffer:(0,n.concatBytes)([t,new Uint8Array(32)]),dynamicBuffer:f.encode({buffer:i,value:l,type:h,packed:o,tight:s}),pointers:[...a,{position:t.length,pointer:i.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,n.assert)(!o&&!u||0===f.length,new i.ParserError(\"Invalid pack state.\"));const d=c.length,p=l.reduce(((t,{pointer:e,position:r})=>{const i=(0,a.padStart)((0,n.numberToBytes)(d+e));return(0,a.set)(t,i,r)}),c);return(0,n.concatBytes)([h,p,f])};e.unpack=(t,r)=>{const s=(0,o.iterate)(r);return t.map((t=>{const{value:{value:o,skip:a},done:u}=s.next();(0,n.assert)(!u,new i.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse \"${t}\".`));const h=(0,e.getParser)(t);if((0,e.isDynamicParser)(h,t)){const e=(0,n.bytesToNumber)(o.subarray(0,32)),i=r.subarray(e);return h.decode({type:t,value:i,skip:a})}return h.decode({type:t,value:o,skip:a})}))}},27683:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.address=e.getAddress=void 0;const n=r(67827),i=r(39777),o=r(92313);e.getAddress=t=>{const e=(0,n.createBytes)(t);return(0,n.assert)(e.length<=20,new i.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${e.length} bytes.`)),(0,o.padStart)(e,20)},e.address={isDynamic:!1,isType:t=>\"address\"===t,getByteLength:()=>32,encode({buffer:t,value:r,packed:i}){const s=(0,e.getAddress)(r);if(i)return(0,n.concatBytes)([t,s]);const a=(0,o.padStart)(s);return(0,n.concatBytes)([t,a])},decode:({value:t})=>(0,n.add0x)((0,n.bytesToHex)(t.slice(12,32)))}},37759:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.array=e.getTupleType=e.getArrayType=e.isArrayType=void 0;const n=r(67827),i=r(39777),o=r(69472),s=r(92313),a=r(92408),u=r(44409),h=/^(?<type>.*)\\[(?<length>\\d*?)\\]$/u;e.isArrayType=t=>h.test(t);e.getArrayType=t=>{const e=t.match(h);return(0,n.assert)(e?.groups?.type,new i.ParserError(`Invalid array type. Expected an array type, but received \"${t}\".`)),[e.groups.type,e.groups.length?parseInt(e.groups.length,10):void 0]};e.getTupleType=(t,e)=>`(${new Array(e).fill(t).join(\",\")})`,e.array={isDynamic(t){const[r,n]=(0,e.getArrayType)(t);return void 0===n||(0,o.isDynamicParser)((0,o.getParser)(r),r)},isType:t=>(0,e.isArrayType)(t),getByteLength(t){(0,n.assert)((0,e.isArrayType)(t),new i.ParserError(`Expected an array type, but received \"${t}\".`));const[r,s]=(0,e.getArrayType)(t);return(0,o.isDynamicParser)(this,t)||void 0===s?32:u.tuple.getByteLength((0,e.getTupleType)(r,s))},encode({type:t,buffer:r,value:h,packed:c,tight:f}){const[l,d]=(0,e.getArrayType)(t);if((0,n.assert)(!c||!(0,e.isArrayType)(l),new i.ParserError(\"Cannot pack nested arrays.\")),c&&(0,o.isDynamicParser)((0,o.getParser)(l),l))return(0,o.pack)({types:new Array(h.length).fill(l),values:h,byteArray:r,packed:c,arrayPacked:!0,tight:f});if(d)return(0,n.assert)(d===h.length,new i.ParserError(`Array length does not match type length. Expected a length of ${d}, but received ${h.length}.`)),u.tuple.encode({type:(0,e.getTupleType)(l,d),buffer:r,value:h,packed:a.fixedBytes.isType(l)&&f,tight:f});if(c)return(0,o.pack)({types:new Array(h.length).fill(l),values:h,byteArray:r,packed:a.fixedBytes.isType(l)&&f,arrayPacked:!0,tight:f});const p=(0,s.padStart)((0,n.numberToBytes)(h.length));return(0,o.pack)({types:new Array(h.length).fill(l),values:h,byteArray:(0,n.concatBytes)([r,p]),packed:c,tight:f})},decode({type:t,value:r,...s}){const[a,h]=(0,e.getArrayType)(t);if(h){const t=u.tuple.decode({type:(0,e.getTupleType)(a,h),value:r,...s});return(0,n.assert)(t.length===h,new i.ParserError(`Array length does not match type length. Expected a length of ${h}, but received ${t.length}.`)),t}const c=(0,n.bytesToNumber)(r.subarray(0,32));return(0,o.unpack)(new Array(c).fill(a),r.subarray(32))}}},18457:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.bool=e.getBooleanValue=void 0;const n=r(57169),i=r(67827),o=r(39777),s=r(1001),a=(0,n.coerce)((0,n.boolean)(),(0,n.union)([(0,n.literal)(\"true\"),(0,n.literal)(\"false\")]),(t=>\"true\"===t));e.getBooleanValue=t=>{try{return(0,n.create)(t,a)?BigInt(1):BigInt(0)}catch{throw new o.ParserError(`Invalid boolean value. Expected a boolean literal, or the string \"true\" or \"false\", but received \"${t}\".`)}},e.bool={isDynamic:!1,isType:t=>\"bool\"===t,getByteLength:()=>32,encode({buffer:t,value:r,packed:n,tight:o}){const a=(0,e.getBooleanValue)(r);return n?(0,i.concatBytes)([t,(0,i.bigIntToBytes)(a)]):s.number.encode({type:\"uint256\",buffer:t,value:a,packed:n,tight:o})},decode:t=>s.number.decode({...t,type:\"uint256\"})===BigInt(1)}},37300:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.bytes=void 0;const n=r(67827),i=r(92313);e.bytes={isDynamic:!0,isType:t=>\"bytes\"===t,getByteLength:()=>32,encode({buffer:t,value:e,packed:r}){const o=(0,n.createBytes)(e);if(r)return(0,n.concatBytes)([t,o]);const s=32*Math.ceil(o.byteLength/32);return(0,n.concatBytes)([t,(0,i.padStart)((0,n.numberToBytes)(o.byteLength)),(0,i.padEnd)(o,s)])},decode({value:t}){const e=t.subarray(0,32),r=(0,n.bytesToNumber)(e);return t.slice(32,32+r)}}},92408:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.fixedBytes=e.getByteLength=void 0;const n=r(67827),i=r(39777),o=r(92313),s=/^bytes([0-9]{1,2})$/u;e.getByteLength=t=>{const e=t.match(s)?.[1];(0,n.assert)(e,`Invalid byte length. Expected a number between 1 and 32, but received \"${t}\".`);const r=Number(e);return(0,n.assert)(r>0&&r<=32,new i.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received \"${t}\".`)),r},e.fixedBytes={isDynamic:!1,isType:t=>s.test(t),getByteLength:()=>32,encode({type:t,buffer:r,value:s,packed:a}){const u=(0,e.getByteLength)(t),h=(0,n.createBytes)(s);return(0,n.assert)(h.length<=u,new i.ParserError(`Expected a value of length ${u}, but received a value of length ${h.length}.`)),a?(0,n.concatBytes)([r,(0,o.padEnd)(h,u)]):(0,n.concatBytes)([r,(0,o.padEnd)(h)])},decode({type:t,value:r}){const n=(0,e.getByteLength)(t);return r.slice(0,n)}}},42345:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.fn=e.getFunction=void 0;const n=r(57169),i=r(67827),o=r(39777),s=r(92408),a=(0,n.coerce)((0,n.object)({address:i.StrictHexStruct,selector:i.StrictHexStruct}),(0,n.union)([i.StrictHexStruct,(0,n.instance)(Uint8Array)]),(t=>{const e=(0,i.createBytes)(t);return(0,i.assert)(24===e.length,new o.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${e.length} bytes.`)),{address:(0,i.bytesToHex)(e.subarray(0,20)),selector:(0,i.bytesToHex)(e.subarray(20,24))}}));e.getFunction=t=>{const e=(0,n.create)(t,a);return(0,i.concatBytes)([(0,i.hexToBytes)(e.address),(0,i.hexToBytes)(e.selector)])},e.fn={isDynamic:!1,isType:t=>\"function\"===t,getByteLength:()=>32,encode({buffer:t,value:r,packed:n,tight:i}){const o=(0,e.getFunction)(r);return s.fixedBytes.encode({type:\"bytes24\",buffer:t,value:o,packed:n,tight:i})},decode:({value:t})=>({address:(0,i.bytesToHex)(t.slice(0,20)),selector:(0,i.bytesToHex)(t.slice(20,24))})}},84206:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(27683),e),i(r(37759),e),i(r(18457),e),i(r(37300),e),i(r(92408),e),i(r(42345),e),i(r(1001),e),i(r(10052),e),i(r(85967),e),i(r(44409),e)},1001:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.number=e.getBigInt=e.assertNumberLength=e.getLength=e.isSigned=void 0;const n=r(67827),i=r(39777),o=r(92313),s=/^u?int(?<length>[0-9]*)?$/u;e.isSigned=t=>!t.startsWith(\"u\");e.getLength=t=>{if(\"int\"===t||\"uint\"===t)return 256;const e=t.match(s);(0,n.assert)(e?.groups?.length,new i.ParserError(`Invalid number type. Expected a number type, but received \"${t}\".`));const r=parseInt(e.groups.length,10);return(0,n.assert)(r>=8&&r<=256,new i.ParserError(`Invalid number length. Expected a number between 8 and 256, but received \"${t}\".`)),(0,n.assert)(r%8==0,new i.ParserError(`Invalid number length. Expected a multiple of 8, but received \"${t}\".`)),r};e.assertNumberLength=(t,r)=>{const o=(0,e.getLength)(r),s=BigInt(2)**BigInt(o-((0,e.isSigned)(r)?1:0))-BigInt(1);(0,e.isSigned)(r)?(0,n.assert)(t>=-(s+BigInt(1))&&t<=s,new i.ParserError(`Number \"${t}\" is out of range for type \"${r}\".`)):(0,n.assert)(t<=s,new i.ParserError(`Number \"${t}\" is out of range for type \"${r}\".`))};e.getBigInt=t=>{try{return(0,n.createBigInt)(t)}catch{throw new i.ParserError(`Invalid number. Expected a valid number value, but received \"${t}\".`)}},e.number={isDynamic:!1,isType:t=>s.test(t),getByteLength:()=>32,encode({type:t,buffer:r,value:i,packed:s}){const a=(0,e.getBigInt)(i);if((0,e.assertNumberLength)(a,t),(0,e.isSigned)(t)){if(s){const i=(0,e.getLength)(t)/8;return(0,n.concatBytes)([r,(0,n.signedBigIntToBytes)(a,i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.signedBigIntToBytes)(a,32))])}if(s){const i=(0,e.getLength)(t)/8;return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(a),i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(a))])},decode({type:t,value:r}){const i=r.subarray(0,32);if((0,e.isSigned)(t)){const r=(0,n.bytesToSignedBigInt)(i);return(0,e.assertNumberLength)(r,t),r}const o=(0,n.bytesToBigInt)(i);return(0,e.assertNumberLength)(o,t),o}}},10052:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},85967:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.string=void 0;const n=r(67827),i=r(37300);e.string={isDynamic:!0,isType:t=>\"string\"===t,getByteLength:()=>32,encode:({buffer:t,value:e,packed:r,tight:o})=>i.bytes.encode({type:\"bytes\",buffer:t,value:(0,n.stringToBytes)(e),packed:r,tight:o}),decode:t=>(0,n.bytesToString)(i.bytes.decode(t))}},44409:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.tuple=e.getTupleElements=void 0;const n=r(67827),i=r(39777),o=r(69472),s=/^\\((.+)\\)$/u;e.getTupleElements=t=>{(0,n.assert)(t.startsWith(\"(\")&&t.endsWith(\")\"),new i.ParserError(`Invalid tuple type. Expected tuple type, but received \"${t}\".`));const e=[];let r=\"\",o=0;for(let n=1;n<t.length-1;n++){const i=t[n];\",\"===i&&0===o?(e.push(r.trim()),r=\"\"):(r+=i,\"(\"===i?o+=1:\")\"===i&&(o-=1))}return r.trim()&&e.push(r.trim()),e},e.tuple={isDynamic:t=>(0,e.getTupleElements)(t).some((t=>{const e=(0,o.getParser)(t);return(0,o.isDynamicParser)(e,t)})),isType:t=>(t=>s.test(t))(t),getByteLength(t){if((0,o.isDynamicParser)(this,t))return 32;return(0,e.getTupleElements)(t).reduce(((t,e)=>t+(0,o.getParser)(e).getByteLength(e)),0)},encode({type:t,buffer:r,value:n,packed:i,tight:s}){const a=(0,e.getTupleElements)(t);return(0,o.pack)({types:a,values:n,byteArray:r,packed:i,tight:s})},decode({type:t,value:r,skip:n}){const i=(0,e.getTupleElements)(t);return n(this.getByteLength(t)-32),(0,o.unpack)(i,r)}}},54163:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},75858:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(54163),e)},21348:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.padEnd=e.padStart=e.set=void 0;const n=r(67827);e.set=(t,e,r)=>(0,n.concatBytes)([t.subarray(0,r),e,t.subarray(r+e.length)]);e.padStart=(t,e=32)=>{const r=new Uint8Array(Math.max(e-t.length,0)).fill(0);return(0,n.concatBytes)([r,t])};e.padEnd=(t,e=32)=>{const r=new Uint8Array(Math.max(e-t.length,0)).fill(0);return(0,n.concatBytes)([t,r])}},92313:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(21348),e)},92517:function(t,e,r){\"use strict\";var n=r(48834).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)\"default\"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getEncryptionPublicKey=e.decryptSafely=e.decrypt=e.encryptSafely=e.encrypt=void 0;const a=s(r(10717)),u=s(r(251)),h=r(65491);function c({publicKey:t,data:e,version:r}){if((0,h.isNullish)(t))throw new Error(\"Missing publicKey parameter\");if((0,h.isNullish)(e))throw new Error(\"Missing data parameter\");if((0,h.isNullish)(r))throw new Error(\"Missing version parameter\");if(\"x25519-xsalsa20-poly1305\"===r){if(\"string\"!=typeof e)throw new Error(\"Message data must be given as a string\");const r=a.box.keyPair();let n;try{n=u.decodeBase64(t)}catch(t){throw new Error(\"Bad public key\")}const i=u.decodeUTF8(e),o=a.randomBytes(a.box.nonceLength),s=a.box(i,o,n,r.secretKey);return{version:\"x25519-xsalsa20-poly1305\",nonce:u.encodeBase64(o),ephemPublicKey:u.encodeBase64(r.publicKey),ciphertext:u.encodeBase64(s)}}throw new Error(\"Encryption type/version not supported\")}function f({encryptedData:t,privateKey:e}){if((0,h.isNullish)(t))throw new Error(\"Missing encryptedData parameter\");if((0,h.isNullish)(e))throw new Error(\"Missing privateKey parameter\");if(\"x25519-xsalsa20-poly1305\"===t.version){const r=l(e),n=a.box.keyPair.fromSecretKey(r).secretKey,i=u.decodeBase64(t.nonce),o=u.decodeBase64(t.ciphertext),s=u.decodeBase64(t.ephemPublicKey),h=a.box.open(o,i,s,n);try{if(!h)throw new Error;const t=u.encodeUTF8(h);if(!t)throw new Error;return t}catch(t){if(t&&\"string\"==typeof t.message&&t.message.length)throw new Error(`Decryption failed: ${t.message}`);throw new Error(\"Decryption failed.\")}}throw new Error(\"Encryption type/version not supported.\")}function l(t){const e=n.from(t,\"hex\").toString(\"base64\");return u.decodeBase64(e)}e.encrypt=c,e.encryptSafely=function({publicKey:t,data:e,version:r}){if((0,h.isNullish)(t))throw new Error(\"Missing publicKey parameter\");if((0,h.isNullish)(e))throw new Error(\"Missing data parameter\");if((0,h.isNullish)(r))throw new Error(\"Missing version parameter\");if(\"object\"==typeof e&&e&&\"toJSON\"in e)throw new Error(\"Cannot encrypt with toJSON property.  Please remove toJSON property\");const i={data:e,padding:\"\"},o=n.byteLength(JSON.stringify(i),\"utf-8\")%2048;let s=0;return o>0&&(s=2048-o-16),i.padding=\"0\".repeat(s),c({publicKey:t,data:JSON.stringify(i),version:r})},e.decrypt=f,e.decryptSafely=function({encryptedData:t,privateKey:e}){if((0,h.isNullish)(t))throw new Error(\"Missing encryptedData parameter\");if((0,h.isNullish)(e))throw new Error(\"Missing privateKey parameter\");return JSON.parse(f({encryptedData:t,privateKey:e})).data},e.getEncryptionPublicKey=function(t){const e=l(t),r=a.box.keyPair.fromSecretKey(e).publicKey;return u.encodeBase64(r)}},50539:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.normalize=e.concatSig=void 0,i(r(91695),e),i(r(5190),e),i(r(92517),e);var o=r(65491);Object.defineProperty(e,\"concatSig\",{enumerable:!0,get:function(){return o.concatSig}}),Object.defineProperty(e,\"normalize\",{enumerable:!0,get:function(){return o.normalize}})},91695:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.extractPublicKey=e.recoverPersonalSignature=e.personalSign=void 0;const n=r(59303),i=r(65491);function o(t,e){const r=(0,n.hashPersonalMessage)((0,i.legacyToBuffer)(t));return(0,i.recoverPublicKey)(r,e)}e.personalSign=function({privateKey:t,data:e}){if((0,i.isNullish)(e))throw new Error(\"Missing data parameter\");if((0,i.isNullish)(t))throw new Error(\"Missing privateKey parameter\");const r=(0,i.legacyToBuffer)(e),o=(0,n.hashPersonalMessage)(r),s=(0,n.ecsign)(o,t);return(0,i.concatSig)((0,n.toBuffer)(s.v),s.r,s.s)},e.recoverPersonalSignature=function({data:t,signature:e}){if((0,i.isNullish)(t))throw new Error(\"Missing data parameter\");if((0,i.isNullish)(e))throw new Error(\"Missing signature parameter\");const r=o(t,e),s=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(s)},e.extractPublicKey=function({data:t,signature:e}){if((0,i.isNullish)(t))throw new Error(\"Missing data parameter\");if((0,i.isNullish)(e))throw new Error(\"Missing signature parameter\");return`0x${o(t,e).toString(\"hex\")}`}},5190:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.recoverTypedSignature=e.signTypedData=e.typedSignatureHash=e.TypedDataUtils=e.TYPED_MESSAGE_SCHEMA=e.SignTypedDataVersion=void 0;const n=r(59303),i=r(40260),o=r(84206),s=r(92313),a=r(17487),u=r(1115),h=r(65491);var c;function f(t,e){if(!Object.keys(c).includes(t))throw new Error(`Invalid version: '${t}'`);if(e&&!e.includes(t))throw new Error(`SignTypedDataVersion not allowed: '${t}'. Allowed versions are: ${e.join(\", \")}`)}function l(t,e){(0,a.assert)(null!==e,`Unable to encode value: Invalid number. Expected a valid number value, but received \"${e}\".`);const r=BigInt(e),n=(0,o.getLength)(t),i=BigInt(2)**BigInt(n)-BigInt(1);return(0,a.assert)(r>=-i&&r<=i,`Unable to encode value: Number \"${e}\" is out of range for type \"${t}\".`),r}function d(t){let e=BigInt(0);for(let r=0;r<t.length;r++){const n=BigInt(t.charCodeAt(r)-48);e*=BigInt(10),e+=n>=49?n-BigInt(49)+BigInt(10):n>=17?n-BigInt(17)+BigInt(10):n}return(0,s.padStart)((0,a.bigIntToBytes)(e),20)}function p(t,e,r,o,h){if(f(h,[c.V3,c.V4]),void 0!==t[r])return[\"bytes32\",h===c.V4&&null==o?\"0x0000000000000000000000000000000000000000000000000000000000000000\":(0,n.arrToBufArr)((0,u.keccak256)(m(r,o,t,h)))];if(\"function\"===r)throw new Error('Unsupported or invalid type: \"function\"');if(void 0===o)throw new Error(`missing value for field ${e} of type ${r}`);if(\"address\"===r){if(\"number\"==typeof o)return[\"address\",(0,s.padStart)((0,a.numberToBytes)(o),20)];if((0,a.isStrictHexString)(o))return[\"address\",(0,a.add0x)(o)];if(\"string\"==typeof o)return[\"address\",d(o).subarray(0,20)]}if(\"bool\"===r)return[\"bool\",Boolean(o)];if(\"bytes\"===r)return\"number\"==typeof o?o=(0,a.numberToBytes)(o):(0,a.isStrictHexString)(o)||\"0x\"===o?o=(0,a.hexToBytes)(o):\"string\"==typeof o&&(o=(0,a.stringToBytes)(o)),[\"bytes32\",(0,n.arrToBufArr)((0,u.keccak256)(o))];if(r.startsWith(\"bytes\")&&\"bytes\"!==r&&!r.includes(\"[\"))return\"number\"==typeof o?o<0?[\"bytes32\",new Uint8Array(32)]:[\"bytes32\",(0,a.bigIntToBytes)(BigInt(o))]:(0,a.isStrictHexString)(o)?[\"bytes32\",(0,a.hexToBytes)(o)]:[\"bytes32\",o];if(r.startsWith(\"int\")&&!r.includes(\"[\")){const t=l(r,o);return t>=BigInt(0)?[\"uint256\",t]:[\"int256\",t]}if(\"string\"===r)return o=\"number\"==typeof o?(0,a.numberToBytes)(o):(0,a.stringToBytes)(null!=o?o:\"\"),[\"bytes32\",(0,n.arrToBufArr)((0,u.keccak256)(o))];if(r.endsWith(\"]\")){if(h===c.V3)throw new Error(\"Arrays are unimplemented in encodeData; use V4 extension\");const s=r.slice(0,r.lastIndexOf(\"[\")),a=o.map((r=>p(t,e,s,r,h)));return[\"bytes32\",(0,n.arrToBufArr)((0,u.keccak256)((0,i.encode)(a.map((([t])=>t)),a.map((([,t])=>t)))))]}return[r,o]}function m(t,e,r,o){f(o,[c.V3,c.V4]);const s=[\"bytes32\"],a=[v(t,r)];for(const n of r[t]){if(o===c.V3&&void 0===e[n.name])continue;const[t,i]=p(r,n.name,n.type,e[n.name],o);s.push(t),a.push(i)}return(0,n.arrToBufArr)((0,i.encode)(s,a))}function g(t,e){let r=\"\";const n=y(t,e);n.delete(t);const i=[t,...Array.from(n).sort()];for(const t of i){if(!e[t])throw new Error(`No type definition specified: ${t}`);r+=`${t}(${e[t].map((({name:t,type:e})=>`${e} ${t}`)).join(\",\")})`}return r}function y(t,e,r=new Set){if(\"string\"!=typeof t)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(t)}`);const n=t.match(/^\\w*/u);if([t]=n,r.has(t)||void 0===e[t])return r;r.add(t);for(const n of e[t])y(n.type,e,r);return r}function b(t,e,r,i){f(i,[c.V3,c.V4]);const o=m(t,e,r,i),s=(0,u.keccak256)(o);return(0,n.arrToBufArr)(s)}function v(t,e){const r=(0,a.stringToBytes)(g(t,e));return(0,n.arrToBufArr)((0,u.keccak256)(r))}function w(t){const r={};for(const n in e.TYPED_MESSAGE_SCHEMA.properties)t[n]&&(r[n]=t[n]);return\"types\"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function M(t,e){f(e,[c.V3,c.V4]);const r=w(t),{domain:n}=r;return b(\"EIP712Domain\",n,{EIP712Domain:r.types.EIP712Domain},e)}function _(t,e){if((0,o.isArrayType)(t)&&Array.isArray(e)){const[r]=(0,o.getArrayType)(t);return e.map((t=>_(r,t)))}if(\"address\"===t){if(\"number\"==typeof e)return(0,s.padStart)((0,a.numberToBytes)(e),20);if((0,a.isStrictHexString)(e))return(0,s.padStart)((0,a.hexToBytes)(e).subarray(0,20),20);if(e instanceof Uint8Array)return(0,s.padStart)(e.subarray(0,20),20)}if(\"bool\"===t)return Boolean(e);if(t.startsWith(\"bytes\")&&\"bytes\"!==t){const r=(0,o.getByteLength)(t);if(\"number\"==typeof e)return e<0?new Uint8Array:(0,a.numberToBytes)(e).subarray(0,r);if((0,a.isStrictHexString)(e))return(0,a.hexToBytes)(e).subarray(0,r);if(e instanceof Uint8Array)return e.subarray(0,r)}if(t.startsWith(\"uint\")&&\"number\"==typeof e)return Math.abs(e);if(t.startsWith(\"int\")&&\"number\"==typeof e){const r=(0,o.getLength)(t);return BigInt.asIntN(r,BigInt(e))}return e}function E(t,e){return e.map((e=>{if(\"string\"==typeof e||\"number\"==typeof e||\"bigint\"==typeof e){const r=l(t,e);if(r>=BigInt(0))return(0,s.padStart)((0,a.bigIntToBytes)(r),32);const n=(0,o.getLength)(t),i=BigInt.asIntN(n,r);return(0,a.signedBigIntToBytes)(i,32)}return e}))}function A(t){const e=new Error(\"Expect argument to be non-empty array\");if(\"object\"!=typeof t||!(\"length\"in t)||!t.length)throw e;const r=t.map((({name:t,type:e,value:r})=>{if(\"address[]\"===e)return{name:t,type:\"bytes32[]\",value:(n=r,n.map((t=>\"number\"==typeof t?(0,s.padStart)((0,a.numberToBytes)(t),32):(0,a.isStrictHexString)(t)?(0,s.padStart)((0,a.hexToBytes)(t).subarray(0,32),32):t instanceof Uint8Array?(0,s.padStart)(t.subarray(0,32),32):t)))};var n;if(e.startsWith(\"int\")&&(0,o.isArrayType)(e)){const[n,i]=(0,o.getArrayType)(e);return{name:t,type:`bytes32[${null!=i?i:\"\"}]`,value:E(n,r)}}return{name:t,type:e,value:_(e,r)}})),c=r.map((t=>\"bytes\"!==t.type?t.value:(0,h.legacyToBuffer)(t.value))),f=r.map((t=>{if(\"function\"===t.type)throw new Error('Unsupported or invalid type: \"function\"');return t.type})),l=t.map((t=>{if(!t.name)throw e;return`${t.type} ${t.name}`}));return(0,n.arrToBufArr)((0,u.keccak256)((0,i.encodePacked)([\"bytes32\",\"bytes32\"],[(0,u.keccak256)((0,i.encodePacked)([\"string[]\"],[l],!0)),(0,u.keccak256)((0,i.encodePacked)(f,c,!0))])))}!function(t){t.V1=\"V1\",t.V3=\"V3\",t.V4=\"V4\"}(c=e.SignTypedDataVersion||(e.SignTypedDataVersion={})),e.TYPED_MESSAGE_SCHEMA={type:\"object\",properties:{types:{type:\"object\",additionalProperties:{type:\"array\",items:{type:\"object\",properties:{name:{type:\"string\"},type:{type:\"string\"}},required:[\"name\",\"type\"]}}},primaryType:{type:\"string\"},domain:{type:\"object\"},message:{type:\"object\"}},required:[\"types\",\"primaryType\",\"domain\",\"message\"]},e.TypedDataUtils={encodeData:m,encodeType:g,findTypeDependencies:y,hashStruct:b,hashType:v,sanitizeData:w,eip712Hash:function(t,e){f(e,[c.V3,c.V4]);const r=w(t),i=[(0,a.hexToBytes)(\"1901\")];return i.push(M(t,e)),\"EIP712Domain\"!==r.primaryType&&i.push(b(r.primaryType,r.message,r.types,e)),(0,n.arrToBufArr)((0,u.keccak256)((0,a.concatBytes)(i)))},eip712DomainHash:M},e.typedSignatureHash=function(t){const e=A(t);return(0,a.bytesToHex)(e)},e.signTypedData=function({privateKey:t,data:r,version:i}){if(f(i),(0,h.isNullish)(r))throw new Error(\"Missing data parameter\");if((0,h.isNullish)(t))throw new Error(\"Missing private key parameter\");const o=i===c.V1?A(r):e.TypedDataUtils.eip712Hash(r,i),s=(0,n.ecsign)(o,t);return(0,h.concatSig)((0,n.arrToBufArr)((0,a.bigIntToBytes)(s.v)),s.r,s.s)},e.recoverTypedSignature=function({data:t,signature:r,version:i}){if(f(i),(0,h.isNullish)(t))throw new Error(\"Missing data parameter\");if((0,h.isNullish)(r))throw new Error(\"Missing signature parameter\");const o=i===c.V1?A(t):e.TypedDataUtils.eip712Hash(t,i),s=(0,h.recoverPublicKey)(o,r),u=(0,n.publicToAddress)(s);return(0,a.bytesToHex)(u)}},65491:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.normalize=e.recoverPublicKey=e.concatSig=e.legacyToBuffer=e.isNullish=e.padWithZeroes=void 0;const i=r(59303),o=r(17487);function s(t,e){if(\"\"!==t&&!/^[a-f0-9]+$/iu.test(t))throw new Error(`Expected an unprefixed hex string. Received: ${t}`);if(e<0)throw new Error(`Expected a non-negative integer target length. Received: ${e}`);return String.prototype.padStart.call(t,e,\"0\")}function a(t){return null==t}e.padWithZeroes=s,e.isNullish=a,e.legacyToBuffer=function(t){return\"string\"!=typeof t||(0,i.isHexString)(t)?(0,i.toBuffer)(t):n.from(t)},e.concatSig=function(t,e,r){const n=(0,i.fromSigned)(e),a=(0,i.fromSigned)(r),u=(0,i.bufferToInt)(t),h=s((0,i.toUnsigned)(n).toString(\"hex\"),64),c=s((0,i.toUnsigned)(a).toString(\"hex\"),64),f=(0,o.remove0x)((0,o.numberToHex)(u));return(0,o.add0x)(h.concat(c,f))},e.recoverPublicKey=function(t,e){const r=(0,i.fromRpcSig)(e);return(0,i.ecrecover)(t,r.v,r.r,r.s)},e.normalize=function(t){if(!a(t)){if(\"number\"==typeof t){if(t<0)return\"0x\";const e=(0,o.numberToBytes)(t);t=(0,o.bytesToHex)(e)}if(\"string\"!=typeof t){let e=\"eth-sig-util.normalize() requires hex string or integer input.\";throw e+=` received ${typeof t}: ${t}`,new Error(e)}return(0,o.add0x)(t.toLowerCase())}}},32660:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const i=r(57256),o=r(1115),s=r(80101),a=r(10144),u=r(40756),h=r(68413),c=r(36243),f=r(54403),l=BigInt(0);class d{constructor(t=l,e=l,r=h.KECCAK256_RLP,n=h.KECCAK256_NULL){this.nonce=t,this.balance=e,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(t){const{nonce:e,balance:r,storageRoot:n,codeHash:i}=t;return new d(void 0!==e?(0,u.bufferToBigInt)((0,u.toBuffer)(e)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==i?(0,u.toBuffer)(i):void 0)}static fromRlpSerializedAccount(t){const e=(0,u.arrToBufArr)(i.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(e))throw new Error(\"Invalid serialized account input. Must be array\");return this.fromValuesArray(e)}static fromValuesArray(t){const[e,r,n,i]=t;return new d((0,u.bufferToBigInt)(e),(0,u.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<l)throw new Error(\"nonce must be greater than zero\");if(this.balance<l)throw new Error(\"balance must be greater than zero\");if(32!==this.storageRoot.length)throw new Error(\"storageRoot must have a length of 32\");if(32!==this.codeHash.length)throw new Error(\"codeHash must have a length of 32\")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(h.KECCAK256_NULL)}isEmpty(){return this.balance===l&&this.nonce===l&&this.codeHash.equals(h.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)};e.toChecksumAddress=function(t,e){(0,c.assertIsHexString)(t);const r=(0,f.stripHexPrefix)(t).toLowerCase();let i=\"\";if(void 0!==e){i=(0,u.bufferToBigInt)((0,u.toBuffer)(e)).toString()+\"0x\"}const s=n.from(i+r,\"utf8\"),h=(0,a.bytesToHex)((0,o.keccak256)(s));let l=\"0x\";for(let t=0;t<r.length;t++)parseInt(h[t],16)>=8?l+=r[t].toUpperCase():l+=r[t];return l};e.isValidChecksumAddress=function(t,r){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,r)===t};e.generateAddress=function(t,e){return(0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,u.bufferToBigInt)(e)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,e])))).slice(-20)};e.generateAddress2=function(t,e,r){if((0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,c.assertIsBuffer)(r),20!==t.length)throw new Error(\"Expected from to be of length 20\");if(32!==e.length)throw new Error(\"Expected salt to be of length 32\");const i=(0,o.keccak256)(n.concat([n.from(\"ff\",\"hex\"),t,e,(0,o.keccak256)(r)]));return(0,u.toBuffer)(i).slice(-20)};e.isValidPrivate=function(t){return s.secp256k1.utils.isValidPrivateKey(t)};e.isValidPublic=function(t,e=!1){if((0,c.assertIsBuffer)(t),64===t.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),t])),!0}catch(t){return!1}if(!e)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(t),!0}catch(t){return!1}};e.pubToAddress=function(t,e=!1){if((0,c.assertIsBuffer)(t),e&&64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),64!==t.length)throw new Error(\"Expected pubKey to be of length 64\");return n.from((0,o.keccak256)(t)).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(t){return(0,c.assertIsBuffer)(t),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1))};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(t){return(0,c.assertIsBuffer)(t),64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),t};e.zeroAddress=function(){const t=(0,u.zeros)(20);return(0,u.bufferToHex)(t)};function p(t){const[e,r,n,i]=t;return[e,r,0===(0,u.arrToBufArr)(n).length?h.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?h.KECCAK256_NULL:i]}e.isZeroAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return(0,e.zeroAddress)()===t},e.accountBodyFromSlim=p;const m=new Uint8Array(0);e.accountBodyToSlim=function(t){const[e,r,n,i]=t;return[e,r,(0,u.arrToBufArr)(n).equals(h.KECCAK256_RLP)?m:n,(0,u.arrToBufArr)(i).equals(h.KECCAK256_NULL)?m:i]},e.accountBodyToRLP=function(t,e=!0){const r=e?p(t):t;return(0,u.arrToBufArr)(i.RLP.encode(r))}},6175:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Address=void 0;const i=r(32660),o=r(40756);class s{constructor(t){if(20!==t.length)throw new Error(\"Invalid address length\");this.buf=t}static zero(){return new s((0,o.zeros)(20))}static fromString(t){if(!(0,i.isValidAddress)(t))throw new Error(\"Invalid address\");return new s((0,o.toBuffer)(t))}static fromPublicKey(t){if(!n.isBuffer(t))throw new Error(\"Public key should be Buffer\");const e=(0,i.pubToAddress)(t);return new s(e)}static fromPrivateKey(t){if(!n.isBuffer(t))throw new Error(\"Private key should be Buffer\");const e=(0,i.privateToAddress)(t);return new s(e)}static generate(t,e){if(\"bigint\"!=typeof e)throw new Error(\"Expected nonce to be a bigint\");return new s((0,i.generateAddress)(t.buf,(0,o.bigIntToBuffer)(e)))}static generate2(t,e,r){if(!n.isBuffer(e))throw new Error(\"Expected salt to be a Buffer\");if(!n.isBuffer(r))throw new Error(\"Expected initCode to be a Buffer\");return new s((0,i.generateAddress2)(t.buf,e,r))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const t=(0,o.bufferToBigInt)(this.buf),e=BigInt(0),r=BigInt(\"0xffff\");return t>=e&&t<=r}toString(){return\"0x\"+this.buf.toString(\"hex\")}toBuffer(){return n.from(this.buf)}}e.Address=s},25778:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.AsyncEventEmitter=void 0;const n=r(22699);class i extends n.EventEmitter{emit(t,...e){let[r,n]=e;const i=this;let o=i._events[t]??[];return void 0===n&&\"function\"==typeof r&&(n=r,r=void 0),\"newListener\"!==t&&\"removeListener\"!==t||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(t,e,r){let n;for await(const i of e)try{i.length<2?i.call(t,r):await new Promise(((e,n)=>{i.call(t,r,(t=>{t?n(t):e()}))}))}catch(t){n=t}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(t)>0}once(t,e){const r=this;let n;if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return n=e.length>=2?function(i,o){r.removeListener(t,n),e(i,o)}:function(i){r.removeListener(t,n),e(i,n)},r.on(t,n),r}first(t,e){let r=this._events[t]??[];if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return Array.isArray(r)||(this._events[t]=r=[r]),r.unshift(e),this}before(t,e,r){return this.beforeOrAfter(t,e,r)}after(t,e,r){return this.beforeOrAfter(t,e,r,\"after\")}beforeOrAfter(t,e,r,n){let i,o,s=this._events[t]??[];const a=\"after\"===n?1:0;if(\"function\"!=typeof r)throw new TypeError(\"listener must be a function\");if(\"function\"!=typeof e)throw new TypeError(\"target must be a function\");for(Array.isArray(s)||(this._events[t]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===e){o=i+a;break}return s.splice(o,0,r),this}on(t,e){return super.on(t,e)}addListener(t,e){return super.addListener(t,e)}prependListener(t,e){return super.prependListener(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,e){return super.removeListener(t,e)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}e.AsyncEventEmitter=i},40756:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const i=r(36243),o=r(54403);e.intToHex=function(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return n.from((0,o.padToEven)(r.slice(2)),\"hex\")};e.zeros=function(t){return n.allocUnsafe(t).fill(0)};const s=function(t,r,n){const i=(0,e.zeros)(r);return n?t.length<r?(t.copy(i),i):t.slice(0,r):t.length<r?(t.copy(i,r-t.length),i):t.slice(-r)};e.setLengthLeft=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!1)};e.setLengthRight=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!0)};const a=function(t){let e=t[0];for(;t.length>0&&\"0\"===e.toString();)e=(t=t.slice(1))[0];return t};e.unpadBuffer=function(t){return(0,i.assertIsBuffer)(t),a(t)};e.unpadArray=function(t){return(0,i.assertIsArray)(t),a(t)};e.unpadHexString=function(t){return(0,i.assertIsHexString)(t),t=(0,o.stripHexPrefix)(t),\"0x\"+a(t)};e.toBuffer=function(t){if(null==t)return n.allocUnsafe(0);if(n.isBuffer(t))return n.from(t);if(Array.isArray(t)||t instanceof Uint8Array)return n.from(t);if(\"string\"==typeof t){if(!(0,o.isHexString)(t))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(t)),\"hex\")}if(\"number\"==typeof t)return(0,e.intToBuffer)(t);if(\"bigint\"==typeof t){if(t<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${t}`);let e=t.toString(16);return e.length%2&&(e=\"0\"+e),n.from(e,\"hex\")}if(t.toArray)return n.from(t.toArray());if(t.toBuffer)return n.from(t.toBuffer());throw new Error(\"invalid type\")};function u(t){const r=(0,e.bufferToHex)(t);return\"0x\"===r?BigInt(0):BigInt(r)}function h(t){return(0,e.toBuffer)(\"0x\"+t.toString(16))}e.bufferToHex=function(t){return\"0x\"+(t=(0,e.toBuffer)(t)).toString(\"hex\")},e.bufferToBigInt=u,e.bigIntToBuffer=h;e.bufferToInt=function(t){const e=Number(u(t));if(!Number.isSafeInteger(e))throw new Error(\"Number exceeds 53 bits\");return e};e.fromSigned=function(t){return BigInt.asIntN(256,u(t))};e.toUnsigned=function(t){return h(BigInt.asUintN(256,t))};e.addHexPrefix=function(t){return\"string\"!=typeof t||(0,o.isHexPrefixed)(t)?t:\"0x\"+t},e.short=function(t,e=50){const r=n.isBuffer(t)?t.toString(\"hex\"):t;return r.length<=e?r:r.slice(0,e)+\"…\"};e.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error(\"Invalid non-even hex string input for toUtf8() provided\");return n.from(t.replace(/^(00)+|(00)+$/g,\"\"),\"hex\").toString(\"utf8\")};e.baToJSON=function(t){if(n.isBuffer(t))return`0x${t.toString(\"hex\")}`;if(t instanceof Array){const r=[];for(let n=0;n<t.length;n++)r.push((0,e.baToJSON)(t[n]));return r}};e.validateNoLeadingZeroes=function(t){for(const[e,r]of Object.entries(t))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${e} cannot have leading zeroes, received: ${r.toString(\"hex\")}`)},e.arrToBufArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):n.from(e)},e.bufArrToArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):Uint8Array.from(e??[])};e.bigIntToHex=t=>\"0x\"+t.toString(16),e.bigIntToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)(h(t))},e.intToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)((0,e.intToBuffer)(t))}},68413:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const n=r(48834),i=r(80101);e.MAX_UINT64=BigInt(\"0xffffffffffffffff\"),e.MAX_INTEGER=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),e.MAX_INTEGER_BIGINT=BigInt(\"115792089237316195423570985008687907853269984665640564039457584007913129639935\"),e.SECP256K1_ORDER=i.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt(\"0x10000000000000000000000000000000000000000000000000000000000000000\"),e.KECCAK256_NULL_S=\"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",e.KECCAK256_NULL=n.Buffer.from(e.KECCAK256_NULL_S,\"hex\"),e.KECCAK256_RLP_ARRAY_S=\"1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",e.KECCAK256_RLP_ARRAY=n.Buffer.from(e.KECCAK256_RLP_ARRAY_S,\"hex\"),e.KECCAK256_RLP_S=\"56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",e.KECCAK256_RLP=n.Buffer.from(e.KECCAK256_RLP_S,\"hex\"),e.RLP_EMPTY_STRING=n.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16},12921:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;e.hasTerminator=t=>t.length>0&&16===t[t.length-1];e.nibblesToBytes=(t,e)=>{for(let r=0,n=0;n<t.length;r+=1,n+=2)e[r]=t[n]<<4|t[n+1]};e.nibblesToCompactBytes=t=>{let r=0;(0,e.hasTerminator)(t)&&(r=1,t=t.subarray(0,t.length-1));const n=new Uint8Array(t.length/2+1);return n[0]=r<<5,1==(1&t.length)&&(n[0]|=16,n[0]|=t[0],t=t.subarray(1)),(0,e.nibblesToBytes)(t,n.subarray(1)),n};e.bytesToNibbles=t=>{const e=2*t.length+1,r=new Uint8Array(e);for(let e=0;e<t.length;e++){const n=t[e];r[2*e]=n/16,r[2*e+1]=n%16}return r[e-1]=16,r};e.compactBytesToNibbles=t=>{if(0===t.length)return t;let r=(0,e.bytesToNibbles)(t);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},36243:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertIsString=e.assertIsArray=e.assertIsBuffer=e.assertIsHexString=void 0;const i=r(54403);e.assertIsHexString=function(t){if(!(0,i.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};e.assertIsBuffer=function(t){if(!n.isBuffer(t)){throw new Error(`This method only supports Buffer but input was: ${t}`)}};e.assertIsArray=function(t){if(!Array.isArray(t)){throw new Error(`This method only supports number arrays but input was: ${t}`)}};e.assertIsString=function(t){if(\"string\"!=typeof t){throw new Error(`This method only supports strings but input was: ${t}`)}}},59303:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,i(r(68413),e),i(r(80945),e),i(r(32660),e),i(r(6175),e),i(r(62334),e),i(r(96413),e),i(r(40756),e),i(r(5263),e),i(r(12921),e),i(r(25778),e);var o=r(54403);Object.defineProperty(e,\"arrayContainsArray\",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,\"fromAscii\",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,\"fromUtf8\",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,\"getBinarySize\",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,\"getKeys\",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,\"isHexPrefixed\",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,\"isHexString\",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,\"padToEven\",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,\"stripHexPrefix\",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,\"toAscii\",{enumerable:!0,get:function(){return o.toAscii}}),i(r(95594),e),i(r(26698),e)},54403:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;function i(t){if(\"string\"!=typeof t)throw new Error(\"[isHexPrefixed] input must be type 'string', received type \"+typeof t);return\"0\"===t[0]&&\"x\"===t[1]}Object.defineProperty(e,\"__esModule\",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,e.isHexPrefixed=i;function o(t){let e=t;if(\"string\"!=typeof e)throw new Error(\"[padToEven] value must be type 'string', received \"+typeof e);return e.length%2&&(e=`0${e}`),e}e.stripHexPrefix=t=>{if(\"string\"!=typeof t)throw new Error(\"[stripHexPrefix] input must be type 'string', received \"+typeof t);return i(t)?t.slice(2):t},e.padToEven=o,e.getBinarySize=function(t){if(\"string\"!=typeof t)throw new Error(\"[getBinarySize] method requires input type 'string', received \"+typeof t);return n.byteLength(t,\"utf8\")},e.arrayContainsArray=function(t,e,r){if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`);if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof e}'`);return e[!0===r?\"some\":\"every\"]((e=>t.indexOf(e)>=0))},e.toAscii=function(t){let e=\"\",r=0;const n=t.length;for(\"0x\"===t.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(t.substr(r,2),16);e+=String.fromCharCode(n)}return e},e.fromUtf8=function(t){return`0x${o(n.from(t,\"utf8\").toString(\"hex\")).replace(/^0+|0+$/g,\"\")}`},e.fromAscii=function(t){let e=\"\";for(let r=0;r<t.length;r++){const n=t.charCodeAt(r).toString(16);e+=n.length<2?`0${n}`:n}return`0x${e}`},e.getKeys=function(t,e,r){if(!Array.isArray(t))throw new Error(\"[getKeys] method expects input 'params' to be an array, got \"+typeof t);if(\"string\"!=typeof e)throw new Error(\"[getKeys] method expects input 'key' to be type 'string', got \"+typeof t);const n=[];for(let i=0;i<t.length;i++){let o=t[i][e];if(!0!==r||o){if(\"string\"!=typeof o)throw new Error(\"invalid abi - expected type 'string', received \"+typeof o)}else o=\"\";n.push(o)}return n},e.isHexString=function(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==e&&e>0&&t.length!==2+2*e)}},95594:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Lock=void 0;e.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((t=>this.promiseResolverQueue.push(t)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn(\"Lock.permits should never be > 0 when there is someone waiting.\");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}},26698:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getProvider=e.fetchFromProvider=void 0;const n=r(42973);e.fetchFromProvider=async(t,e)=>(await(0,n.default)(t,{headers:{\"content-type\":\"application/json\"},type:\"json\",data:{method:e.method,params:e.params,jsonrpc:\"2.0\",id:1}})).result;e.getProvider=t=>{if(\"string\"==typeof t)return t;if(void 0!==t?.connection?.url)return t.connection.url;throw new Error(\"Must provide valid provider URL or Web3Provider\")}},96413:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;const i=r(1115),o=r(80101),s=r(40756),a=r(68413),u=r(36243);function h(t,e){return t===BigInt(0)||t===BigInt(1)?t:void 0===e?t-BigInt(27):t-(e*BigInt(2)+BigInt(35))}function c(t){return t===BigInt(0)||t===BigInt(1)}e.ecsign=function(t,e,r){const i=o.secp256k1.sign(t,e),s=i.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}};e.ecrecover=function(t,e,r,i,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(i,32)],64),f=h(e,a);if(!c(f))throw new Error(\"Invalid signature v value\");const l=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(t);return n.from(l.toRawBytes(!1).slice(1))};e.toRpcSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(t)]))};e.toCompactSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");let o=r;return(t>BigInt(28)&&t%BigInt(2)===BigInt(1)||t===BigInt(1)||t===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(o,32)]))};e.fromRpcSig=function(t){const e=(0,s.toBuffer)(t);let r,n,i;if(e.length>=65)r=e.slice(0,32),n=e.slice(32,64),i=(0,s.bufferToBigInt)(e.slice(64));else{if(64!==e.length)throw new Error(\"Invalid signature length\");r=e.slice(0,32),n=e.slice(32,64),i=BigInt((0,s.bufferToInt)(e.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r,s:n}};e.isValidSignature=function(t,e,r,n=!0,i){if(32!==e.length||32!==r.length)return!1;if(!c(h(t,i)))return!1;const o=(0,s.bufferToBigInt)(e),u=(0,s.bufferToBigInt)(r);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER)&&!(n&&u>=a.SECP256K1_ORDER_DIV_2)};e.hashPersonalMessage=function(t){(0,u.assertIsBuffer)(t);const e=n.from(`\u0019Ethereum Signed Message:\\n${t.length}`,\"utf-8\");return n.from((0,i.keccak256)(n.concat([e,t])))}},5263:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toType=e.TypeOutput=void 0;const n=r(40756),i=r(54403);var o;!function(t){t[t.Number=0]=\"Number\",t[t.BigInt=1]=\"BigInt\",t[t.Buffer=2]=\"Buffer\",t[t.PrefixedHexString=3]=\"PrefixedHexString\"}(o=e.TypeOutput||(e.TypeOutput={})),e.toType=function(t,e){if(null===t)return null;if(void 0===t)return;if(\"string\"==typeof t&&!(0,i.isHexString)(t))throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`);if(\"number\"==typeof t&&!Number.isSafeInteger(t))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)\");const r=(0,n.toBuffer)(t);switch(e){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const t=(0,n.bufferToBigInt)(r);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)\");return Number(t)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error(\"unknown outputType\")}}},80945:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.GWEI_TO_WEI=void 0,e.GWEI_TO_WEI=BigInt(1e9)},62334:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Withdrawal=void 0;const i=r(6175),o=r(40756),s=r(5263);class a{constructor(t,e,r,n){this.index=t,this.validatorIndex=e,this.address=r,this.amount=n}static fromWithdrawalData(t){const{index:e,validatorIndex:r,address:n,amount:o}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt),h=(0,s.toType)(r,s.TypeOutput.BigInt),c=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,h,c,f)}static fromValuesArray(t){if(4!==t.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[e,r,n,i]=t;return a.fromWithdrawalData({index:e,validatorIndex:r,address:n,amount:i})}static toBufferArray(t){const{index:e,validatorIndex:r,address:o,amount:a}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(e,s.TypeOutput.Buffer),h=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let c;c=o instanceof i.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer);return[u,h,c,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:\"0x\"+this.address.buf.toString(\"hex\"),amount:(0,o.bigIntToHex)(this.amount)}}}e.Withdrawal=a},45887:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getHash=s,e.createCurve=function(t,e){const r=e=>(0,o.weierstrass)({...t,...s(e)});return Object.freeze({...r(e),create:r})};const n=r(97493),i=r(96013),o=r(57851);function s(t){return{hash:t,hmac:(e,...r)=>(0,n.hmac)(t,e,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}},41465:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.wNAF=function(t,e){const r=(t,e)=>{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(t,e){const{windows:r,windowSize:i}=n(e),o=[];let s=t,a=s;for(let t=0;t<r;t++){a=s,o.push(a);for(let t=1;t<i;t++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,i,o){const{windows:a,windowSize:u}=n(e);let h=t.ZERO,c=t.BASE;const f=BigInt(2**e-1),l=2**e,d=BigInt(e);for(let t=0;t<a;t++){const e=t*u;let n=Number(o&f);o>>=d,n>u&&(n-=l,o+=s);const a=e,p=e+Math.abs(n)-1,m=t%2!=0,g=n<0;0===n?c=c.add(r(m,i[a])):h=h.add(r(g,i[p]))}return{p:h,f:c}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}},e.validateBasic=function(t){return(0,n.validateField)(t.Fp),(0,i.validateObject)(t,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...(0,n.nLength)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})};const n=r(49530),i=r(4323),o=BigInt(0),s=BigInt(1)},91322:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.expand_message_xmd=h,e.expand_message_xof=c,e.hash_to_field=f,e.isogenyMap=function(t,e){const r=e.map((t=>Array.from(t).reverse()));return(e,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>t.add(t.mul(r,e),n)))));return e=t.div(i,o),n=t.mul(n,t.div(s,a)),{x:e,y:n}}},e.createHasher=function(t,e,r){if(\"function\"!=typeof e)throw new Error(\"mapToCurve() must be defined\");return{hashToCurve(n,i){const o=f(n,2,{...r,DST:r.DST,...i}),s=t.fromAffine(e(o[0])),a=t.fromAffine(e(o[1])),u=s.add(a).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=f(n,1,{...r,DST:r.encodeDST,...i}),s=t.fromAffine(e(o[0])).clearCofactor();return s.assertValidity(),s},mapToCurve(r){if(!Array.isArray(r))throw new Error(\"mapToCurve: expected array of bigints\");for(const t of r)if(\"bigint\"!=typeof t)throw new Error(`mapToCurve: expected array of bigints, got ${t} in array`);const n=t.fromAffine(e(r)).clearCofactor();return n.assertValidity(),n}}};const n=r(49530),i=r(4323),o=i.bytesToNumberBE;function s(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=255&t,t>>>=8;return new Uint8Array(r)}function a(t,e){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function u(t){if(!Number.isSafeInteger(t))throw new Error(\"number expected\")}function h(t,e,r,n){(0,i.abytes)(t),(0,i.abytes)(e),u(r),e.length>255&&(e=n((0,i.concatBytes)((0,i.utf8ToBytes)(\"H2C-OVERSIZE-DST-\"),e)));const{outputLen:o,blockLen:h}=n,c=Math.ceil(r/o);if(c>255)throw new Error(\"Invalid xmd length\");const f=(0,i.concatBytes)(e,s(e.length,1)),l=s(0,h),d=s(r,2),p=new Array(c),m=n((0,i.concatBytes)(l,t,d,s(0,1),f));p[0]=n((0,i.concatBytes)(m,s(1,1),f));for(let t=1;t<=c;t++){const e=[a(m,p[t-1]),s(t+1,1),f];p[t]=n((0,i.concatBytes)(...e))}return(0,i.concatBytes)(...p).slice(0,r)}function c(t,e,r,n,o){if((0,i.abytes)(t),(0,i.abytes)(e),u(r),e.length>255){const t=Math.ceil(2*n/8);e=o.create({dkLen:t}).update((0,i.utf8ToBytes)(\"H2C-OVERSIZE-DST-\")).update(e).digest()}if(r>65535||e.length>255)throw new Error(\"expand_message_xof: invalid lenInBytes\");return o.create({dkLen:r}).update(t).update(s(r,2)).update(e).update(s(e.length,1)).digest()}function f(t,e,r){(0,i.validateObject)(r,{DST:\"stringOrUint8Array\",p:\"bigint\",m:\"isSafeInteger\",k:\"isSafeInteger\",hash:\"hash\"});const{p:s,k:a,m:f,hash:l,expand:d,DST:p}=r;(0,i.abytes)(t),u(e);const m=\"string\"==typeof p?(0,i.utf8ToBytes)(p):p,g=s.toString(2).length,y=Math.ceil((g+a)/8),b=e*f*y;let v;if(\"xmd\"===d)v=h(t,m,b,l);else if(\"xof\"===d)v=c(t,m,b,a,l);else{if(\"_internal_pass\"!==d)throw new Error('expand must be \"xmd\" or \"xof\"');v=t}const w=new Array(e);for(let t=0;t<e;t++){const e=new Array(f);for(let r=0;r<f;r++){const i=y*(r+t*f),a=v.subarray(i,i+y);e[r]=(0,n.mod)(o(a),s)}w[t]=e}return w}},49530:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isNegativeLE=void 0,e.mod=f,e.pow=l,e.pow2=function(t,e,r){let n=t;for(;e-- >i;)n*=n,n%=r;return n},e.invert=d,e.tonelliShanks=p,e.FpSqrt=m,e.validateField=function(t){const e=g.reduce(((t,e)=>(t[e]=\"function\",t)),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});return(0,n.validateObject)(t,e)},e.FpPow=y,e.FpInvertBatch=b,e.FpDiv=function(t,e,r){return t.mul(e,\"bigint\"==typeof r?d(r,t.ORDER):t.inv(r))},e.FpIsSquare=function(t){const e=(t.ORDER-o)/s;return r=>{const n=t.pow(r,e);return t.eql(n,t.ZERO)||t.eql(n,t.ONE)}},e.nLength=v,e.Field=function(t,e,r=!1,s={}){if(t<=i)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:a,nByteLength:u}=v(t,e);if(u>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const h=m(t),c=Object.freeze({ORDER:t,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:e=>f(e,t),isValid:e=>{if(\"bigint\"!=typeof e)throw new Error(\"Invalid field element: expected bigint, got \"+typeof e);return i<=e&&e<t},is0:t=>t===i,isOdd:t=>(t&o)===o,neg:e=>f(-e,t),eql:(t,e)=>t===e,sqr:e=>f(e*e,t),add:(e,r)=>f(e+r,t),sub:(e,r)=>f(e-r,t),mul:(e,r)=>f(e*r,t),pow:(t,e)=>y(c,t,e),div:(e,r)=>f(e*d(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>d(e,t),sqrt:s.sqrt||(t=>h(c,t)),invertBatch:t=>b(c,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?(0,n.numberToBytesLE)(t,u):(0,n.numberToBytesBE)(t,u),fromBytes:t=>{if(t.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${t.length}`);return r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t)}});return Object.freeze(c)},e.FpSqrtOdd=function(t,e){if(!t.isOdd)throw new Error(\"Field doesn't have isOdd\");const r=t.sqrt(e);return t.isOdd(r)?r:t.neg(r)},e.FpSqrtEven=function(t,e){if(!t.isOdd)throw new Error(\"Field doesn't have isOdd\");const r=t.sqrt(e);return t.isOdd(r)?t.neg(r):r},e.hashToPrivateScalar=function(t,e,r=!1){const i=(t=(0,n.ensureBytes)(\"privateHash\",t)).length,s=v(e).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t),e-o)+o},e.getFieldBytesLength=w,e.getMinHashLength=M,e.mapHashToField=function(t,e,r=!1){const i=t.length,s=w(e),a=M(e);if(i<16||i<a||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const u=f(r?(0,n.bytesToNumberBE)(t):(0,n.bytesToNumberLE)(t),e-o)+o;return r?(0,n.numberToBytesLE)(u,s):(0,n.numberToBytesBE)(u,s)};const n=r(4323),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),h=BigInt(5),c=BigInt(8);BigInt(9),BigInt(16);function f(t,e){const r=t%e;return r>=i?r:e+r}function l(t,e,r){if(r<=i||e<i)throw new Error(\"Expected power/modulo > 0\");if(r===o)return i;let n=o;for(;e>i;)e&o&&(n=n*t%r),t=t*t%r,e>>=o;return n}function d(t,e){if(t===i||e<=i)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=f(t,e),n=e,s=i,a=o,u=o,h=i;for(;r!==i;){const t=n/r,e=n%r,i=s-u*t,o=a-h*t;n=r,r=e,s=u,a=h,u=i,h=o}if(n!==o)throw new Error(\"invert: does not exist\");return f(s,e)}function p(t){const e=(t-o)/s;let r,n,a;for(r=t-o,n=0;r%s===i;r/=s,n++);for(a=s;a<t&&l(a,e,t)!==t-o;a++);if(1===n){const e=(t+o)/u;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const h=(r+o)/s;return function(t,i){if(t.pow(i,e)===t.neg(t.ONE))throw new Error(\"Cannot find square root\");let s=n,u=t.pow(t.mul(t.ONE,a),r),c=t.pow(i,h),f=t.pow(i,r);for(;!t.eql(f,t.ONE);){if(t.eql(f,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(f);e<s&&!t.eql(r,t.ONE);e++)r=t.sqr(r);const r=t.pow(u,o<<BigInt(s-e-1));u=t.sqr(r),c=t.mul(c,r),f=t.mul(f,u),s=e}return c}}function m(t){if(t%u===a){const e=(t+o)/u;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(t%c===h){const e=(t-h)/c;return function(t,r){const n=t.mul(r,s),i=t.pow(n,e),o=t.mul(r,i),a=t.mul(t.mul(o,s),i),u=t.mul(o,t.sub(a,t.ONE));if(!t.eql(t.sqr(u),r))throw new Error(\"Cannot find square root\");return u}}return p(t)}e.isNegativeLE=(t,e)=>(f(t,e)&o)===o;const g=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function y(t,e,r){if(r<i)throw new Error(\"Expected power > 0\");if(r===i)return t.ONE;if(r===o)return e;let n=t.ONE,s=e;for(;r>i;)r&o&&(n=t.mul(n,s)),s=t.sqr(s),r>>=o;return n}function b(t,e){const r=new Array(e.length),n=e.reduce(((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n))),t.ONE),i=t.inv(n);return e.reduceRight(((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n))),i),r}function v(t,e){const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(t){if(\"bigint\"!=typeof t)throw new Error(\"field order must be bigint\");const e=t.toString(2).length;return Math.ceil(e/8)}function M(t){const e=w(t);return e+Math.ceil(e/2)}},4323:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.bitMask=void 0,e.isBytes=o,e.abytes=s,e.bytesToHex=u,e.numberToHexUnpadded=h,e.hexToNumber=c,e.hexToBytes=d,e.bytesToNumberBE=function(t){return c(u(t))},e.bytesToNumberLE=function(t){return s(t),c(u(Uint8Array.from(t).reverse()))},e.numberToBytesBE=p,e.numberToBytesLE=function(t,e){return p(t,e).reverse()},e.numberToVarBytesBE=function(t){return d(h(t))},e.ensureBytes=function(t,e,r){let n;if(\"string\"==typeof e)try{n=d(e)}catch(r){throw new Error(`${t} must be valid hex string, got \"${e}\". Cause: ${r}`)}else{if(!o(e))throw new Error(`${t} must be hex string or Uint8Array`);n=Uint8Array.from(e)}const i=n.length;if(\"number\"==typeof r&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n},e.concatBytes=m,e.equalBytes=function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r},e.utf8ToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))},e.bitLen=function(t){let e;for(e=0;t>r;t>>=n,e+=1);return e},e.bitGet=function(t,e){return t>>BigInt(e)&n},e.bitSet=function(t,e,i){return t|(i?n:r)<<BigInt(e)},e.createHmacDrbg=function(t,e,r){if(\"number\"!=typeof t||t<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof e||e<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=g(t),i=g(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...t)=>r(i,n,...t),u=(t=g())=>{i=a(y([0]),t),n=a(),0!==t.length&&(i=a(y([1]),t),n=a())},h=()=>{if(o++>=1e3)throw new Error(\"drbg: tried 1000 values\");let t=0;const r=[];for(;t<e;){n=a();const e=n.slice();r.push(e),t+=n.length}return m(...r)};return(t,e)=>{let r;for(s(),u(t);!(r=e(h()));)u();return s(),r}},e.validateObject=function(t,e,r={}){const n=(e,r,n)=>{const i=b[r];if(\"function\"!=typeof i)throw new Error(`Invalid validator \"${r}\", expected function`);const o=t[e];if(!(n&&void 0===o||i(o,t)))throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(const[t,r]of Object.entries(e))n(t,r,!1);for(const[t,e]of Object.entries(r))n(t,e,!0);return t};const r=BigInt(0),n=BigInt(1),i=BigInt(2);function o(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function s(t){if(!o(t))throw new Error(\"Uint8Array expected\")}const a=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function u(t){s(t);let e=\"\";for(let r=0;r<t.length;r++)e+=a[t[r]];return e}function h(t){const e=t.toString(16);return 1&e.length?`0${e}`:e}function c(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);return BigInt(\"\"===t?\"0\":`0x${t}`)}const f={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function l(t){return t>=f._0&&t<=f._9?t-f._0:t>=f._A&&t<=f._F?t-(f._A-10):t>=f._a&&t<=f._f?t-(f._a-10):void 0}function d(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=l(t.charCodeAt(i)),o=l(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n}function p(t,e){return d(t.toString(16).padStart(2*e,\"0\"))}function m(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];s(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}e.bitMask=t=>(i<<BigInt(t-1))-n;const g=t=>new Uint8Array(t),y=t=>Uint8Array.from(t);const b={bigint:t=>\"bigint\"==typeof t,function:t=>\"function\"==typeof t,boolean:t=>\"boolean\"==typeof t,string:t=>\"string\"==typeof t,stringOrUint8Array:t=>\"string\"==typeof t||o(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>\"function\"==typeof t&&Number.isSafeInteger(t.outputLen)}},57851:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.DER=void 0,e.weierstrassPoints=p,e.weierstrass=function(t){const r=function(t){const e=(0,n.validateBasic)(t);return o.validateObject(e,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...e})}(t),{Fp:a,n:u}=r,f=a.BYTES+1,l=2*a.BYTES+1;function d(t){return i.mod(t,u)}function m(t){return i.invert(t,u)}const{ProjectivePoint:g,normPrivateKeyToScalar:y,weierstrassEquation:b,isWithinCurveOrder:v}=p({...r,toBytes(t,e,r){const n=e.toAffine(),i=a.toBytes(n.x),s=o.concatBytes;return r?s(Uint8Array.from([e.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,a.toBytes(n.y))},fromBytes(t){const e=t.length,r=t[0],n=t.subarray(1);if(e!==f||2!==r&&3!==r){if(e===l&&4===r){return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))}}throw new Error(`Point of length ${e} was invalid. Expected ${f} compressed bytes or ${l} uncompressed bytes`)}{const t=o.bytesToNumberBE(n);if(!(h<(i=t)&&i<a.ORDER))throw new Error(\"Point is not on curve\");const e=b(t);let s;try{s=a.sqrt(e)}catch(t){const e=t instanceof Error?\": \"+t.message:\"\";throw new Error(\"Point is not on curve\"+e)}return 1==(1&r)!==((s&c)===c)&&(s=a.neg(s)),{x:t,y:s}}var i}}),w=t=>o.bytesToHex(o.numberToBytesBE(t,r.nByteLength));function M(t){return t>u>>c}const _=(t,e,r)=>o.bytesToNumberBE(t.slice(e,r));class E{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){const e=r.nByteLength;return t=(0,s.ensureBytes)(\"compactSignature\",t,2*e),new E(_(t,0,e),_(t,e,2*e))}static fromDER(t){const{r,s:n}=e.DER.toSig((0,s.ensureBytes)(\"DER\",t));return new E(r,n)}assertValidity(){if(!v(this.r))throw new Error(\"r must be 0 < r < CURVE.n\");if(!v(this.s))throw new Error(\"s must be 0 < s < CURVE.n\")}addRecoveryBit(t){return new E(this.r,this.s,t)}recoverPublicKey(t){const{r:e,s:n,recovery:i}=this,o=B((0,s.ensureBytes)(\"msgHash\",t));if(null==i||![0,1,2,3].includes(i))throw new Error(\"recovery id invalid\");const u=2===i||3===i?e+r.n:e;if(u>=a.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const h=0==(1&i)?\"02\":\"03\",c=g.fromHex(h+w(u)),f=m(u),l=d(-o*f),p=d(n*f),y=g.BASE.multiplyAndAddUnsafe(c,l,p);if(!y)throw new Error(\"point at infinify\");return y.assertValidity(),y}hasHighS(){return M(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const A={isValidPrivateKey(t){try{return y(t),!0}catch(t){return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const t=i.getMinHashLength(r.n);return i.mapHashToField(r.randomBytes(t),r.n)},precompute:(t=8,e=g.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function S(t){const e=o.isBytes(t),r=\"string\"==typeof t,n=(e||r)&&t.length;return e?n===f||n===l:r?n===2*f||n===2*l:t instanceof g}const x=r.bits2int||function(t){const e=o.bytesToNumberBE(t),n=8*t.length-r.nBitLength;return n>0?e>>BigInt(n):e},B=r.bits2int_modN||function(t){return d(x(t))},T=o.bitMask(r.nBitLength);function I(t){if(\"bigint\"!=typeof t)throw new Error(\"bigint expected\");if(!(h<=t&&t<T))throw new Error(`bigint expected < 2^${r.nBitLength}`);return o.numberToBytesBE(t,r.nByteLength)}function k(t,e,n=P){if([\"recovered\",\"canonical\"].some((t=>t in n)))throw new Error(\"sign() legacy options not supported\");const{hash:i,randomBytes:u}=r;let{lowS:f,prehash:l,extraEntropy:p}=n;null==f&&(f=!0),t=(0,s.ensureBytes)(\"msgHash\",t),l&&(t=(0,s.ensureBytes)(\"prehashed msgHash\",i(t)));const b=B(t),w=y(e),_=[I(w),I(b)];if(null!=p&&!1!==p){const t=!0===p?u(a.BYTES):p;_.push((0,s.ensureBytes)(\"extraEntropy\",t))}const A=o.concatBytes(..._),S=b;return{seed:A,k2sig:function(t){const e=x(t);if(!v(e))return;const r=m(e),n=g.BASE.multiply(e).toAffine(),i=d(n.x);if(i===h)return;const o=d(r*d(S+i*w));if(o===h)return;let s=(n.x===i?0:2)|Number(n.y&c),a=o;return f&&M(o)&&(a=function(t){return M(t)?d(-t):t}(o),s^=1),new E(i,a,s)}}}const P={lowS:r.lowS,prehash:!1},C={lowS:r.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(t,e=!0){return g.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(S(t))throw new Error(\"first arg must be private key\");if(!S(e))throw new Error(\"second arg must be public key\");return g.fromHex(e).multiply(y(t)).toRawBytes(r)},sign:function(t,e,n=P){const{seed:i,k2sig:s}=k(t,e,n),a=r;return o.createHmacDrbg(a.hash.outputLen,a.nByteLength,a.hmac)(i,s)},verify:function(t,n,i,a=C){const u=t;if(n=(0,s.ensureBytes)(\"msgHash\",n),i=(0,s.ensureBytes)(\"publicKey\",i),\"strict\"in a)throw new Error(\"options.strict was renamed to lowS\");const{lowS:h,prehash:c}=a;let f,l;try{if(\"string\"==typeof u||o.isBytes(u))try{f=E.fromDER(u)}catch(t){if(!(t instanceof e.DER.Err))throw t;f=E.fromCompact(u)}else{if(\"object\"!=typeof u||\"bigint\"!=typeof u.r||\"bigint\"!=typeof u.s)throw new Error(\"PARSE\");{const{r:t,s:e}=u;f=new E(t,e)}}l=g.fromHex(i)}catch(t){if(\"PARSE\"===t.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(h&&f.hasHighS())return!1;c&&(n=r.hash(n));const{r:p,s:y}=f,b=B(n),v=m(y),w=d(b*v),M=d(p*v),_=g.BASE.multiplyAndAddUnsafe(l,w,M)?.toAffine();if(!_)return!1;return d(_.x)===p},ProjectivePoint:g,Signature:E,utils:A}},e.SWUFpSqrtRatio=m,e.mapToCurveSimpleSWU=function(t,e){if(i.validateField(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error(\"mapToCurveSimpleSWU: invalid opts\");const r=m(t,e.Z);if(!t.isOdd)throw new Error(\"Fp.isOdd is not implemented!\");return n=>{let i,o,s,a,u,h,c,f;i=t.sqr(n),i=t.mul(i,e.Z),o=t.sqr(i),o=t.add(o,i),s=t.add(o,t.ONE),s=t.mul(s,e.B),a=t.cmov(e.Z,t.neg(o),!t.eql(o,t.ZERO)),a=t.mul(a,e.A),o=t.sqr(s),h=t.sqr(a),u=t.mul(h,e.A),o=t.add(o,u),o=t.mul(o,s),h=t.mul(h,a),u=t.mul(h,e.B),o=t.add(o,u),c=t.mul(i,s);const{isValid:l,value:d}=r(o,h);f=t.mul(i,n),f=t.mul(f,d),c=t.cmov(c,s,l),f=t.cmov(f,d,l);const p=t.isOdd(n)===t.isOdd(f);return f=t.cmov(t.neg(f),f,p),c=t.div(c,a),{x:c,y:f}}};const n=r(41465),i=r(49530),o=r(4323),s=r(4323);const{bytesToNumberBE:a,hexToBytes:u}=o;e.DER={Err:class extends Error{constructor(t=\"\"){super(t)}},_parseInt(t){const{Err:r}=e.DER;if(t.length<2||2!==t[0])throw new r(\"Invalid signature integer tag\");const n=t[1],i=t.subarray(2,n+2);if(!n||i.length!==n)throw new r(\"Invalid signature integer: wrong length\");if(128&i[0])throw new r(\"Invalid signature integer: negative\");if(0===i[0]&&!(128&i[1]))throw new r(\"Invalid signature integer: unnecessary leading zero\");return{d:a(i),l:t.subarray(n+2)}},toSig(t){const{Err:r}=e.DER,n=\"string\"==typeof t?u(t):t;o.abytes(n);let i=n.length;if(i<2||48!=n[0])throw new r(\"Invalid signature tag\");if(n[1]!==i-2)throw new r(\"Invalid signature: incorrect length\");const{d:s,l:a}=e.DER._parseInt(n.subarray(2)),{d:h,l:c}=e.DER._parseInt(a);if(c.length)throw new r(\"Invalid signature: left bytes after parsing\");return{r:s,s:h}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?\"00\"+t:t,r=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}};const h=BigInt(0),c=BigInt(1),f=BigInt(2),l=BigInt(3),d=BigInt(4);function p(t){const e=function(t){const e=(0,n.validateBasic)(t);o.validateObject(e,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:i,a:s}=e;if(r){if(!i.eql(s,i.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...e})}(t),{Fp:r}=e,a=e.toBytes||((t,e,n)=>{const i=e.toAffine();return o.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),u=e.fromBytes||(t=>{const e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function f(t){const{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),f(e.Gx)))throw new Error(\"bad generator point: equation left != right\");function d(t){return\"bigint\"==typeof t&&h<t&&t<e.n}function p(t){if(!d(t))throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\")}function m(t){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:a,n:u}=e;if(r&&\"bigint\"!=typeof t){if(o.isBytes(t)&&(t=o.bytesToHex(t)),\"string\"!=typeof t||!r.includes(t.length))throw new Error(\"Invalid key\");t=t.padStart(2*n,\"0\")}let h;try{h=\"bigint\"==typeof t?t:o.bytesToNumberBE((0,s.ensureBytes)(\"private key\",t,n))}catch(e){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof t}`)}return a&&(h=i.mod(h,u)),p(h),h}const g=new Map;function y(t){if(!(t instanceof b))throw new Error(\"ProjectivePoint expected\")}class b{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw new Error(\"x required\");if(null==e||!r.isValid(e))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(t){const{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw new Error(\"invalid affine point\");if(t instanceof b)throw new Error(\"projective point not allowed\");const i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?b.ZERO:new b(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(b.fromAffine)}static fromHex(t){const e=b.fromAffine(u((0,s.ensureBytes)(\"pointHex\",t)));return e.assertValidity(),e}static fromPrivateKey(t){return b.BASE.multiply(m(t))}_setWindowSize(t){this._WINDOW_SIZE=t,g.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const i=r.sqr(n),o=f(t);if(!r.eql(i,o))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw new Error(\"Field doesn't support isOdd\")}equals(t){y(t);const{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,u=r.eql(r.mul(e,a),r.mul(o,i)),h=r.eql(r.mul(n,a),r.mul(s,i));return u&&h}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:t,b:n}=e,i=r.mul(n,l),{px:o,py:s,pz:a}=this;let u=r.ZERO,h=r.ZERO,c=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),m=r.mul(o,s);return m=r.add(m,m),c=r.mul(o,a),c=r.add(c,c),u=r.mul(t,c),h=r.mul(i,p),h=r.add(u,h),u=r.sub(d,h),h=r.add(d,h),h=r.mul(u,h),u=r.mul(m,u),c=r.mul(i,c),p=r.mul(t,p),m=r.sub(f,p),m=r.mul(t,m),m=r.add(m,c),c=r.add(f,f),f=r.add(c,f),f=r.add(f,p),f=r.mul(f,m),h=r.add(h,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,m),u=r.sub(u,f),c=r.mul(p,d),c=r.add(c,c),c=r.add(c,c),new b(u,h,c)}add(t){y(t);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=t;let h=r.ZERO,c=r.ZERO,f=r.ZERO;const d=e.a,p=r.mul(e.b,l);let m=r.mul(n,s),g=r.mul(i,a),v=r.mul(o,u),w=r.add(n,i),M=r.add(s,a);w=r.mul(w,M),M=r.add(m,g),w=r.sub(w,M),M=r.add(n,o);let _=r.add(s,u);return M=r.mul(M,_),_=r.add(m,v),M=r.sub(M,_),_=r.add(i,o),h=r.add(a,u),_=r.mul(_,h),h=r.add(g,v),_=r.sub(_,h),f=r.mul(d,M),h=r.mul(p,v),f=r.add(h,f),h=r.sub(g,f),f=r.add(g,f),c=r.mul(h,f),g=r.add(m,m),g=r.add(g,m),v=r.mul(d,v),M=r.mul(p,M),g=r.add(g,v),v=r.sub(m,v),v=r.mul(d,v),M=r.add(M,v),m=r.mul(g,M),c=r.add(c,m),m=r.mul(_,M),h=r.mul(w,h),h=r.sub(h,m),m=r.mul(w,g),f=r.mul(_,f),f=r.add(f,m),new b(h,c,f)}subtract(t){return this.add(t.negate())}is0(){return this.equals(b.ZERO)}wNAF(t){return w.wNAFCached(this,g,t,(t=>{const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(b.fromAffine)}))}multiplyUnsafe(t){const n=b.ZERO;if(t===h)return n;if(p(t),t===c)return this;const{endo:i}=e;if(!i)return w.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:a,k2:u}=i.splitScalar(t),f=n,l=n,d=this;for(;s>h||u>h;)s&c&&(f=f.add(d)),u&c&&(l=l.add(d)),d=d.double(),s>>=c,u>>=c;return o&&(f=f.negate()),a&&(l=l.negate()),l=new b(r.mul(l.px,i.beta),l.py,l.pz),f.add(l)}multiply(t){p(t);let n,i,o=t;const{endo:s}=e;if(s){const{k1neg:t,k1:e,k2neg:a,k2:u}=s.splitScalar(o);let{p:h,f:c}=this.wNAF(e),{p:f,f:l}=this.wNAF(u);h=w.constTimeNegate(t,h),f=w.constTimeNegate(a,f),f=new b(r.mul(f.px,s.beta),f.py,f.pz),n=h.add(f),i=c.add(l)}else{const{p:t,f:e}=this.wNAF(o);n=t,i=e}return b.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){const n=b.BASE,i=(t,e)=>e!==h&&e!==c&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){const{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));const s=r.mul(e,t),a=r.mul(n,t),u=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error(\"invZ was invalid\");return{x:s,y:a}}isTorsionFree(){const{h:t,isTorsionFree:r}=e;if(t===c)return!0;if(r)return r(b,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:t,clearCofactor:r}=e;return t===c?this:r?r(b,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),a(b,this,t)}toHex(t=!0){return o.bytesToHex(this.toRawBytes(t))}}b.BASE=new b(e.Gx,e.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const v=e.nBitLength,w=(0,n.wNAF)(b,e.endo?Math.ceil(v/2):v);return{CURVE:e,ProjectivePoint:b,normPrivateKeyToScalar:m,weierstrassEquation:f,isWithinCurveOrder:d}}function m(t,e){const r=t.ORDER;let n=h;for(let t=r-c;t%f===h;t/=f)n+=c;const i=n,o=f<<i-c-c,s=o*f,a=(r-c)/s,u=(a-c)/f,p=s-c,m=o,g=t.pow(e,a),y=t.pow(e,(a+c)/f);let b=(e,r)=>{let n=g,o=t.pow(r,p),s=t.sqr(o);s=t.mul(s,r);let a=t.mul(e,s);a=t.pow(a,u),a=t.mul(a,o),o=t.mul(a,r),s=t.mul(a,e);let h=t.mul(s,o);a=t.pow(h,m);let l=t.eql(a,t.ONE);o=t.mul(s,y),a=t.mul(h,n),s=t.cmov(o,s,l),h=t.cmov(a,h,l);for(let e=i;e>c;e--){let r=e-f;r=f<<r-c;let i=t.pow(h,r);const a=t.eql(i,t.ONE);o=t.mul(s,n),n=t.mul(n,n),i=t.mul(h,n),s=t.cmov(o,s,a),h=t.cmov(i,h,a)}return{isValid:l,value:s}};if(t.ORDER%d===l){const r=(t.ORDER-l)/d,n=t.sqrt(t.neg(e));b=(e,i)=>{let o=t.sqr(i);const s=t.mul(e,i);o=t.mul(o,s);let a=t.pow(o,r);a=t.mul(a,s);const u=t.mul(a,n),h=t.mul(t.sqr(a),i),c=t.eql(h,e);return{isValid:c,value:t.cmov(u,a,c)}}}return b}},11613:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function n(t){if(\"boolean\"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function i(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function o(t,...e){if(!i(t))throw new Error(\"Uint8Array expected\");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function s(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(t.outputLen),r(t.blockLen)}function a(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function u(t,e){o(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=e.isBytes=void 0,e.number=r,e.bool=n,e.isBytes=i,e.bytes=o,e.hash=s,e.exists=a,e.output=u;const h={number:r,bool:n,bytes:o,hash:s,exists:a,output:u};e.default=h},70126:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.HashMD=e.Maj=e.Chi=void 0;const n=r(11613),i=r(96013);e.Chi=(t,e,r)=>t&e^~t&r;e.Maj=(t,e,r)=>t&e^t&r^e&r;class o extends i.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.createView)(this.buffer)}update(t){(0,n.exists)(this);const{view:e,buffer:r,blockLen:o}=this,s=(t=(0,i.toBytes)(t)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(t.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(e,0),this.pos=0);else{const e=(0,i.createView)(t);for(;o<=s-n;n+=o)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.exists)(this),(0,n.output)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let t=a;t<o;t++)e[t]=0;!function(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(t),h=this.outputLen;if(h%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=h/4,f=this.get();if(c>f.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t<c;t++)u.setUint32(4*t,f[t],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}e.HashMD=o},19419:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=void 0,e.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},97493:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hmac=e.HMAC=void 0;const n=r(11613),i=r(96013);class o extends i.Hash{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(t);const r=(0,i.toBytes)(e);if(this.iHash=t.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let t=0;t<s.length;t++)s[t]^=54;this.iHash.update(s),this.oHash=t.create();for(let t=0;t<s.length;t++)s[t]^=106;this.oHash.update(s),s.fill(0)}update(t){return(0,n.exists)(this),this.iHash.update(t),this}digestInto(t){(0,n.exists)(this),(0,n.bytes)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=o;e.hmac=(t,e,r)=>new o(t,e).update(r).digest(),e.hmac.create=(t,e)=>new o(t,e)},77371:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.sha224=e.sha256=void 0;const n=r(70126),i=r(96013),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class u extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=a[t-15],r=a[t-2],n=(0,i.rotr)(e,7)^(0,i.rotr)(e,18)^e>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;a[t]=o+a[t-7]+n+a[t-16]|0}let{A:r,B:s,C:u,D:h,E:c,F:f,G:l,H:d}=this;for(let t=0;t<64;t++){const e=d+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+(0,n.Chi)(c,f,l)+o[t]+a[t]|0,p=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,s,u)|0;d=l,l=f,f=c,c=h+e|0,h=u,u=s,s=r,r=e+p|0}r=r+this.A|0,s=s+this.B|0,u=u+this.C|0,h=h+this.D|0,c=c+this.E|0,f=f+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,s,u,h,c,f,l,d)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class h extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new u)),e.sha224=(0,i.wrapConstructor)((()=>new h))},96013:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const n=r(19419),i=r(11613);e.isBytes=function(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name};e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);e.rotr=(t,e)=>t<<32-e|t>>>e;e.rotl=(t,e)=>t<<e|t>>>32-e>>>0,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];e.byteSwap=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255,e.byteSwapIfBE=e.isLE?t=>t:t=>(0,e.byteSwap)(t),e.byteSwap32=function(t){for(let r=0;r<t.length;r++)t[r]=(0,e.byteSwap)(t[r])};const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));e.bytesToHex=function(t){(0,i.bytes)(t);let e=\"\";for(let r=0;r<t.length;r++)e+=o[t[r]];return e};const s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(t){return t>=s._0&&t<=s._9?t-s._0:t>=s._A&&t<=s._F?t-(s._A-10):t>=s._a&&t<=s._f?t-(s._a-10):void 0}e.hexToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=a(t.charCodeAt(i)),o=a(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n};function u(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function h(t){return\"string\"==typeof t&&(t=u(t)),(0,i.bytes)(t),t}e.nextTick=async()=>{},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o<t;o++){n(o);const t=Date.now()-i;t>=0&&t<r||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=u,e.toBytes=h,e.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];(0,i.bytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r};e.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;e.checkOpts=function(t,e){if(void 0!==e&&\"[object Object]\"!==c.call(e))throw new Error(\"Options should be object or undefined\");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(h(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));throw new Error(\"crypto.getRandomValues must be defined\")}},38358:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;const n=r(77371),i=r(96013),o=r(45887),s=r(91322),a=r(49530),u=r(4323),h=r(57851),c=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),f=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),l=BigInt(1),d=BigInt(2),p=(t,e)=>(t+e/d)/e;function m(t){const e=c,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),u=BigInt(44),h=BigInt(88),f=t*t*t%e,l=f*f*t%e,p=(0,a.pow2)(l,r,e)*l%e,m=(0,a.pow2)(p,r,e)*l%e,y=(0,a.pow2)(m,d,e)*f%e,b=(0,a.pow2)(y,i,e)*y%e,v=(0,a.pow2)(b,o,e)*b%e,w=(0,a.pow2)(v,u,e)*v%e,M=(0,a.pow2)(w,h,e)*w%e,_=(0,a.pow2)(M,u,e)*v%e,E=(0,a.pow2)(_,r,e)*l%e,A=(0,a.pow2)(E,s,e)*b%e,S=(0,a.pow2)(A,n,e)*f%e,x=(0,a.pow2)(S,d,e);if(!g.eql(g.sqr(x),t))throw new Error(\"Cannot find square root\");return x}const g=(0,a.Field)(c,void 0,void 0,{sqrt:m});e.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:g,n:f,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:t=>{const e=f,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-l*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),i=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),o=r,s=BigInt(\"0x100000000000000000000000000000000\"),u=p(o*t,e),h=p(-n*t,e);let c=(0,a.mod)(t-u*r-h*i,e),d=(0,a.mod)(-u*n-h*o,e);const m=c>s,g=d>s;if(m&&(c=e-c),g&&(d=e-d),c>s||d>s)throw new Error(\"splitScalar: Endomorphism failed, k=\"+t);return{k1neg:m,k1:c,k2neg:g,k2:d}}}},n.sha256);const y=BigInt(0),b=t=>\"bigint\"==typeof t&&y<t&&t<c,v=t=>\"bigint\"==typeof t&&y<t&&t<f,w={};function M(t,...e){let r=w[t];if(void 0===r){const e=(0,n.sha256)(Uint8Array.from(t,(t=>t.charCodeAt(0))));r=(0,u.concatBytes)(e,e),w[t]=r}return(0,n.sha256)((0,u.concatBytes)(r,...e))}const _=t=>t.toRawBytes(!0).slice(1),E=t=>(0,u.numberToBytesBE)(t,32),A=t=>(0,a.mod)(t,c),S=t=>(0,a.mod)(t,f),x=e.secp256k1.ProjectivePoint,B=(t,e,r)=>x.BASE.multiplyAndAddUnsafe(t,e,r);function T(t){let r=e.secp256k1.utils.normPrivateKeyToScalar(t),n=x.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:_(n)}}function I(t){if(!b(t))throw new Error(\"bad x: need 0 < x < p\");const e=A(t*t);let r=m(A(e*t+BigInt(7)));r%d!==y&&(r=A(-r));const n=new x(t,r,l);return n.assertValidity(),n}function k(...t){return S((0,u.bytesToNumberBE)(M(\"BIP0340/challenge\",...t)))}function P(t){return T(t).bytes}function C(t,e,r=(0,i.randomBytes)(32)){const n=(0,u.ensureBytes)(\"message\",t),{bytes:o,scalar:s}=T(e),a=(0,u.ensureBytes)(\"auxRand\",r,32),h=E(s^(0,u.bytesToNumberBE)(M(\"BIP0340/aux\",a))),c=M(\"BIP0340/nonce\",h,o,n),f=S((0,u.bytesToNumberBE)(c));if(f===y)throw new Error(\"sign failed: k is zero\");const{bytes:l,scalar:d}=T(f),p=k(l,o,n),m=new Uint8Array(64);if(m.set(l,0),m.set(E(S(d+p*s)),32),!R(m,n,o))throw new Error(\"sign: Invalid signature produced\");return m}function R(t,e,r){const n=(0,u.ensureBytes)(\"signature\",t,64),i=(0,u.ensureBytes)(\"message\",e),o=(0,u.ensureBytes)(\"publicKey\",r,32);try{const t=I((0,u.bytesToNumberBE)(o)),e=(0,u.bytesToNumberBE)(n.subarray(0,32));if(!b(e))return!1;const r=(0,u.bytesToNumberBE)(n.subarray(32,64));if(!v(r))return!1;const s=k(E(e),_(t),i),a=B(t,r,S(-s));return!(!a||!a.hasEvenY()||a.toAffine().x!==e)}catch(t){return!1}}e.schnorr={getPublicKey:P,sign:C,verify:R,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:I,pointToBytes:_,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,taggedHash:M,mod:a.mod}};const O=(0,s.isogenyMap)(g,[[\"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"],[\"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\"0x0000000000000000000000000000000000000000000000000000000000000001\"],[\"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"],[\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\"0x0000000000000000000000000000000000000000000000000000000000000001\"]].map((t=>t.map((t=>BigInt(t)))))),L=(0,h.mapToCurveSimpleSWU)(g,{A:BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),B:BigInt(\"1771\"),Z:g.create(BigInt(\"-11\"))}),N=(0,s.createHasher)(e.secp256k1.ProjectivePoint,(t=>{const{x:e,y:r}=L(g.create(t[0]));return O(e,r)}),{DST:\"secp256k1_XMD:SHA-256_SSWU_RO_\",encodeDST:\"secp256k1_XMD:SHA-256_SSWU_NU_\",p:g.ORDER,m:1,k:128,expand:\"xmd\",hash:n.sha256});e.hashToCurve=N.hashToCurve,e.encodeToCurve=N.encodeToCurve},53525:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function n(t){if(\"boolean\"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function i(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function o(t,...e){if(!i(t))throw new Error(\"Uint8Array expected\");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function s(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(t.outputLen),r(t.blockLen)}function a(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function u(t,e){o(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.isBytes=i,e.number=r,e.bool=n,e.bytes=o,e.hash=s,e.exists=a,e.output=u;const h={number:r,bool:n,bytes:o,hash:s,exists:a,output:u};e.default=h},11655:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.add5L=e.add5H=e.add4H=e.add4L=e.add3H=e.add3L=e.rotlBL=e.rotlBH=e.rotlSL=e.rotlSH=e.rotr32L=e.rotr32H=e.rotrBL=e.rotrBH=e.rotrSL=e.rotrSH=e.shrSL=e.shrSH=e.toBig=void 0,e.fromBig=i,e.split=o,e.add=v;const r=BigInt(2**32-1),n=BigInt(32);function i(t,e=!1){return e?{h:Number(t&r),l:Number(t>>n&r)}:{h:0|Number(t>>n&r),l:0|Number(t&r)}}function o(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let o=0;o<t.length;o++){const{h:s,l:a}=i(t[o],e);[r[o],n[o]]=[s,a]}return[r,n]}const s=(t,e)=>BigInt(t>>>0)<<n|BigInt(e>>>0);e.toBig=s;const a=(t,e,r)=>t>>>r;e.shrSH=a;const u=(t,e,r)=>t<<32-r|e>>>r;e.shrSL=u;const h=(t,e,r)=>t>>>r|e<<32-r;e.rotrSH=h;const c=(t,e,r)=>t<<32-r|e>>>r;e.rotrSL=c;const f=(t,e,r)=>t<<64-r|e>>>r-32;e.rotrBH=f;const l=(t,e,r)=>t>>>r-32|e<<64-r;e.rotrBL=l;const d=(t,e)=>e;e.rotr32H=d;const p=(t,e)=>t;e.rotr32L=p;const m=(t,e,r)=>t<<r|e>>>32-r;e.rotlSH=m;const g=(t,e,r)=>e<<r|t>>>32-r;e.rotlSL=g;const y=(t,e,r)=>e<<r-32|t>>>64-r;e.rotlBH=y;const b=(t,e,r)=>t<<r-32|e>>>64-r;function v(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}}e.rotlBL=b;const w=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0);e.add3L=w;const M=(t,e,r,n)=>e+r+n+(t/2**32|0)|0;e.add3H=M;const _=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0);e.add4L=_;const E=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0;e.add4H=E;const A=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0);e.add5L=A;const S=(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0;e.add5H=S;const x={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:u,rotrSH:h,rotrSL:c,rotrBH:f,rotrBL:l,rotr32H:d,rotr32L:p,rotlSH:m,rotlSL:g,rotlBH:y,rotlBL:b,add:v,add3L:w,add3H:M,add4L:_,add4H:E,add5H:S,add5L:A};e.default=x},70825:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=void 0,e.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},80125:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.shake256=e.shake128=e.keccak_512=e.keccak_384=e.keccak_256=e.keccak_224=e.sha3_512=e.sha3_384=e.sha3_256=e.sha3_224=e.Keccak=void 0,e.keccakP=v;const n=r(53525),i=r(11655),o=r(70064),s=[],a=[],u=[],h=BigInt(0),c=BigInt(1),f=BigInt(2),l=BigInt(7),d=BigInt(256),p=BigInt(113);for(let t=0,e=c,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((t+1)*(t+2)/2%64);let i=h;for(let t=0;t<7;t++)e=(e<<c^(e>>l)*p)%d,e&f&&(i^=c<<(c<<BigInt(t))-c);u.push(i)}const[m,g]=(0,i.split)(u,!0),y=(t,e,r)=>r>32?(0,i.rotlBH)(t,e,r):(0,i.rotlSH)(t,e,r),b=(t,e,r)=>r>32?(0,i.rotlBL)(t,e,r):(0,i.rotlSL)(t,e,r);function v(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=y(o,s,1)^r[n],u=b(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=a[r],o=y(e,i,n),u=b(e,i,n),h=s[r];e=t[h],i=t[h+1],t[h]=o,t[h+1]=u}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=m[n],t[1]^=g[n]}r.fill(0)}class w extends o.Hash{constructor(t,e,r,i=!1,s=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){o.isLE||(0,o.byteSwap32)(this.state32),v(this.state32,this.rounds),o.isLE||(0,o.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,n.exists)(this);const{blockLen:e,state:r}=this,i=(t=(0,o.toBytes)(t)).length;for(let n=0;n<i;){const o=Math.min(e-this.pos,i-n);for(let e=0;e<o;e++)r[this.pos++]^=t[n++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,0!=(128&e)&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){(0,n.exists)(this,!1),(0,n.bytes)(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return(0,n.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,n.output)(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new w(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}e.Keccak=w;const M=(t,e,r)=>(0,o.wrapConstructor)((()=>new w(e,t,r)));e.sha3_224=M(6,144,28),e.sha3_256=M(6,136,32),e.sha3_384=M(6,104,48),e.sha3_512=M(6,72,64),e.keccak_224=M(1,144,28),e.keccak_256=M(1,136,32),e.keccak_384=M(1,104,48),e.keccak_512=M(1,72,64);const _=(t,e,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(e,t,void 0===n.dkLen?r:n.dkLen,!0)));e.shake128=_(31,168,16),e.shake256=_(31,136,32)},70064:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Hash=e.nextTick=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=void 0,e.isBytes=function(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name},e.byteSwap32=function(t){for(let r=0;r<t.length;r++)t[r]=(0,e.byteSwap)(t[r])},e.bytesToHex=function(t){(0,i.bytes)(t);let e=\"\";for(let r=0;r<t.length;r++)e+=o[t[r]];return e},e.hexToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=a(t.charCodeAt(i)),o=a(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o<t;o++){n(o);const t=Date.now()-i;t>=0&&t<r||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=u,e.toBytes=h,e.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];(0,i.bytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r},e.checkOpts=function(t,e){if(void 0!==e&&\"[object Object]\"!==c.call(e))throw new Error(\"Options should be object or undefined\");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(h(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));if(n.crypto&&\"function\"==typeof n.crypto.randomBytes)return n.crypto.randomBytes(t);throw new Error(\"crypto.getRandomValues must be defined\")};const n=r(70825),i=r(53525);e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);e.rotr=(t,e)=>t<<32-e|t>>>e;e.rotl=(t,e)=>t<<e|t>>>32-e>>>0,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];e.byteSwap=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255,e.byteSwapIfBE=e.isLE?t=>t:t=>(0,e.byteSwap)(t);const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));const s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(t){return t>=s._0&&t<=s._9?t-s._0:t>=s._A&&t<=s._F?t-(s._A-10):t>=s._a&&t<=s._f?t-(s._a-10):void 0}function u(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function h(t){return\"string\"==typeof t&&(t=u(t)),(0,i.bytes)(t),t}e.nextTick=async()=>{};e.Hash=class{clone(){return this._cloneInto()}};const c={}.toString},36237:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t))throw new Error(`Wrong integer: ${t}`)}function n(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function i(...t){const e=t=>t,r=(t,e)=>r=>t(e(r));return{encode:t.map((t=>t.encode)).reduceRight(r,e),decode:t.map((t=>t.decode)).reduce(r,e)}}function o(t){return{encode:e=>{if(!Array.isArray(e)||e.length&&\"number\"!=typeof e[0])throw new Error(\"alphabet.encode input should be an array of numbers\");return e.map((e=>{if(r(e),e<0||e>=t.length)throw new Error(`Digit index outside alphabet: ${e} (alphabet: ${t.length})`);return t[e]}))},decode:e=>{if(!Array.isArray(e)||e.length&&\"string\"!=typeof e[0])throw new Error(\"alphabet.decode input should be array of strings\");return e.map((e=>{if(\"string\"!=typeof e)throw new Error(`alphabet.decode: not string element=${e}`);const r=t.indexOf(e);if(-1===r)throw new Error(`Unknown letter: \"${e}\". Allowed: ${t}`);return r}))}}}function s(t=\"\"){if(\"string\"!=typeof t)throw new Error(\"join separator should be string\");return{encode:e=>{if(!Array.isArray(e)||e.length&&\"string\"!=typeof e[0])throw new Error(\"join.encode input should be array of strings\");for(let t of e)if(\"string\"!=typeof t)throw new Error(`join.encode: non-string input=${t}`);return e.join(t)},decode:e=>{if(\"string\"!=typeof e)throw new Error(\"join.decode input should be string\");return e.split(t)}}}function a(t,e=\"=\"){if(r(t),\"string\"!=typeof e)throw new Error(\"padding chr should be string\");return{encode(r){if(!Array.isArray(r)||r.length&&\"string\"!=typeof r[0])throw new Error(\"padding.encode input should be array of strings\");for(let t of r)if(\"string\"!=typeof t)throw new Error(`padding.encode: non-string input=${t}`);for(;r.length*t%8;)r.push(e);return r},decode(r){if(!Array.isArray(r)||r.length&&\"string\"!=typeof r[0])throw new Error(\"padding.encode input should be array of strings\");for(let t of r)if(\"string\"!=typeof t)throw new Error(`padding.decode: non-string input=${t}`);let n=r.length;if(n*t%8)throw new Error(\"Invalid padding: string should have whole number of bytes\");for(;n>0&&r[n-1]===e;n--)if(!((n-1)*t%8))throw new Error(\"Invalid padding: string has too much padding\");return r.slice(0,n)}}}function u(t){if(\"function\"!=typeof t)throw new Error(\"normalize fn should be function\");return{encode:t=>t,decode:e=>t(e)}}function h(t,e,n){if(e<2)throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(t))throw new Error(\"convertRadix: data should be array\");if(!t.length)return[];let i=0;const o=[],s=Array.from(t);for(s.forEach((t=>{if(r(t),t<0||t>=e)throw new Error(`Wrong integer: ${t}`)}));;){let t=0,r=!0;for(let o=i;o<s.length;o++){const a=s[o],u=e*t+a;if(!Number.isSafeInteger(u)||e*t/e!==t||u-a!=e*t)throw new Error(\"convertRadix: carry overflow\");t=u%n;const h=Math.floor(u/n);if(s[o]=h,!Number.isSafeInteger(h)||h*n+t!==u)throw new Error(\"convertRadix: carry overflow\");r&&(h?r=!1:i=o)}if(o.push(t),r)break}for(let e=0;e<t.length-1&&0===t[e];e++)o.push(0);return o.reverse()}Object.defineProperty(e,\"__esModule\",{value:!0}),e.bytes=e.stringToBytes=e.str=e.bytesToString=e.hex=e.utf8=e.bech32m=e.bech32=e.base58check=e.createBase58check=e.base58xmr=e.base58xrp=e.base58flickr=e.base58=e.base64urlnopad=e.base64url=e.base64nopad=e.base64=e.base32crockford=e.base32hexnopad=e.base32hex=e.base32nopad=e.base32=e.base16=e.utils=void 0,e.assertNumber=r;const c=(t,e)=>e?c(e,t%e):t,f=(t,e)=>t+(e-c(t,e));function l(t,e,n,i){if(!Array.isArray(t))throw new Error(\"convertRadix2: data should be array\");if(e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(f(e,n)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${f(e,n)}`);let o=0,s=0;const a=2**n-1,u=[];for(const i of t){if(r(i),i>=2**e)throw new Error(`convertRadix2: invalid data word=${i} from=${e}`);if(o=o<<e|i,s+e>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${e}`);for(s+=e;s>=n;s-=n)u.push((o>>s-n&a)>>>0);o&=2**s-1}if(o=o<<n-s&a,!i&&s>=e)throw new Error(\"Excess padding\");if(!i&&o)throw new Error(`Non-zero padding: ${o}`);return i&&s>0&&u.push(o>>>0),u}function d(t){return r(t),{encode:e=>{if(!n(e))throw new Error(\"radix.encode input should be Uint8Array\");return h(Array.from(e),256,t)},decode:e=>{if(!Array.isArray(e)||e.length&&\"number\"!=typeof e[0])throw new Error(\"radix.decode input should be array of numbers\");return Uint8Array.from(h(e,t,256))}}}function p(t,e=!1){if(r(t),t<=0||t>32)throw new Error(\"radix2: bits should be in (0..32]\");if(f(8,t)>32||f(t,8)>32)throw new Error(\"radix2: carry overflow\");return{encode:r=>{if(!n(r))throw new Error(\"radix2.encode input should be Uint8Array\");return l(Array.from(r),8,t,!e)},decode:r=>{if(!Array.isArray(r)||r.length&&\"number\"!=typeof r[0])throw new Error(\"radix2.decode input should be array of numbers\");return Uint8Array.from(l(r,t,8,e))}}}function m(t){if(\"function\"!=typeof t)throw new Error(\"unsafeWrapper fn should be function\");return function(...e){try{return t.apply(null,e)}catch(t){}}}function g(t,e){if(r(t),\"function\"!=typeof e)throw new Error(\"checksum fn should be function\");return{encode(r){if(!n(r))throw new Error(\"checksum.encode: input should be Uint8Array\");const i=e(r).slice(0,t),o=new Uint8Array(r.length+t);return o.set(r),o.set(i,r.length),o},decode(r){if(!n(r))throw new Error(\"checksum.decode: input should be Uint8Array\");const i=r.slice(0,-t),o=e(i).slice(0,t),s=r.slice(-t);for(let e=0;e<t;e++)if(o[e]!==s[e])throw new Error(\"Invalid checksum\");return i}}}e.utils={alphabet:o,chain:i,checksum:g,convertRadix:h,convertRadix2:l,radix:d,radix2:p,join:s,padding:a},e.base16=i(p(4),o(\"0123456789ABCDEF\"),s(\"\")),e.base32=i(p(5),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),a(5),s(\"\")),e.base32nopad=i(p(5),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),s(\"\")),e.base32hex=i(p(5),o(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),a(5),s(\"\")),e.base32hexnopad=i(p(5),o(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),s(\"\")),e.base32crockford=i(p(5),o(\"0123456789ABCDEFGHJKMNPQRSTVWXYZ\"),s(\"\"),u((t=>t.toUpperCase().replace(/O/g,\"0\").replace(/[IL]/g,\"1\")))),e.base64=i(p(6),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),a(6),s(\"\")),e.base64nopad=i(p(6),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),s(\"\")),e.base64url=i(p(6),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),a(6),s(\"\")),e.base64urlnopad=i(p(6),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),s(\"\"));const y=t=>i(d(58),o(t),s(\"\"));e.base58=y(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"),e.base58flickr=y(\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"),e.base58xrp=y(\"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz\");const b=[0,2,3,5,6,7,9,10,11];e.base58xmr={encode(t){let r=\"\";for(let n=0;n<t.length;n+=8){const i=t.subarray(n,n+8);r+=e.base58.encode(i).padStart(b[i.length],\"1\")}return r},decode(t){let r=[];for(let n=0;n<t.length;n+=11){const i=t.slice(n,n+11),o=b.indexOf(i.length),s=e.base58.decode(i);for(let t=0;t<s.length-o;t++)if(0!==s[t])throw new Error(\"base58xmr: wrong padding\");r=r.concat(Array.from(s.slice(s.length-o)))}return Uint8Array.from(r)}};e.createBase58check=t=>i(g(4,(e=>t(t(e)))),e.base58),e.base58check=e.createBase58check;const v=i(o(\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"),s(\"\")),w=[996825010,642813549,513874426,1027748829,705979059];function M(t){const e=t>>25;let r=(33554431&t)<<5;for(let t=0;t<w.length;t++)1==(e>>t&1)&&(r^=w[t]);return r}function _(t,e,r=1){const n=t.length;let i=1;for(let e=0;e<n;e++){const r=t.charCodeAt(e);if(r<33||r>126)throw new Error(`Invalid prefix (${t})`);i=M(i)^r>>5}i=M(i);for(let e=0;e<n;e++)i=M(i)^31&t.charCodeAt(e);for(let t of e)i=M(i)^t;for(let t=0;t<6;t++)i=M(i);return i^=r,v.encode(l([i%2**30],30,5,!1))}function E(t){const e=\"bech32\"===t?1:734539939,r=p(5),n=r.decode,i=r.encode,o=m(n);function s(t,r,n=90){if(\"string\"!=typeof t)throw new Error(\"bech32.encode prefix should be string, not \"+typeof t);if(r instanceof Uint8Array&&(r=Array.from(r)),!Array.isArray(r)||r.length&&\"number\"!=typeof r[0])throw new Error(\"bech32.encode words should be array of numbers, not \"+typeof r);if(0===t.length)throw new TypeError(`Invalid prefix length ${t.length}`);const i=t.length+7+r.length;if(!1!==n&&i>n)throw new TypeError(`Length ${i} exceeds limit ${n}`);const o=t.toLowerCase(),s=_(o,r,e);return`${o}1${v.encode(r)}${s}`}function a(t,r=90){if(\"string\"!=typeof t)throw new Error(\"bech32.decode input should be string, not \"+typeof t);if(t.length<8||!1!==r&&t.length>r)throw new TypeError(`Wrong string length: ${t.length} (${t}). Expected (8..${r})`);const n=t.toLowerCase();if(t!==n&&t!==t.toUpperCase())throw new Error(\"String must be lowercase or uppercase\");const i=n.lastIndexOf(\"1\");if(0===i||-1===i)throw new Error('Letter \"1\" must be present between prefix and data only');const o=n.slice(0,i),s=n.slice(i+1);if(s.length<6)throw new Error(\"Data must be at least 6 characters long\");const a=v.decode(s).slice(0,-6),u=_(o,a,e);if(!s.endsWith(u))throw new Error(`Invalid checksum in ${t}: expected \"${u}\"`);return{prefix:o,words:a}}return{encode:s,decode:a,encodeFromBytes:function(t,e){return s(t,i(e))},decodeToBytes:function(t){const{prefix:e,words:r}=a(t,!1);return{prefix:e,words:r,bytes:n(r)}},decodeUnsafe:m(a),fromWords:n,fromWordsUnsafe:o,toWords:i}}e.bech32=E(\"bech32\"),e.bech32m=E(\"bech32m\"),e.utf8={encode:t=>(new TextDecoder).decode(t),decode:t=>(new TextEncoder).encode(t)},e.hex=i(p(4),o(\"0123456789abcdef\"),s(\"\"),u((t=>{if(\"string\"!=typeof t||t.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof t} with length ${t.length}`);return t.toLowerCase()})));const A={utf8:e.utf8,hex:e.hex,base16:e.base16,base32:e.base32,base64:e.base64,base64url:e.base64url,base58:e.base58,base58xmr:e.base58xmr},S=\"Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr\";e.bytesToString=(t,e)=>{if(\"string\"!=typeof t||!A.hasOwnProperty(t))throw new TypeError(S);if(!n(e))throw new TypeError(\"bytesToString() expects Uint8Array\");return A[t].encode(e)},e.str=e.bytesToString;e.stringToBytes=(t,e)=>{if(!A.hasOwnProperty(t))throw new TypeError(S);if(\"string\"!=typeof e)throw new TypeError(\"stringToBytes() expects string\");return A[t].decode(e)},e.bytes=e.stringToBytes},22812:(t,e,r)=>{\"use strict\";const n=e;n.bignum=r(90735),n.define=r(45192).define,n.base=r(84798),n.constants=r(96906),n.decoders=r(18211),n.encoders=r(89116)},45192:(t,e,r)=>{\"use strict\";const n=r(89116),i=r(18211),o=r(91285);function s(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new s(t,e)},s.prototype._createNamed=function(t){const e=this.name;function r(t){this._initNamed(t,e)}return o(r,t),r.prototype._initNamed=function(e,r){t.call(this,e,r)},new r(this)},s.prototype._getDecoder=function(t){return t=t||\"der\",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},s.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},s.prototype._getEncoder=function(t){return t=t||\"der\",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n[t])),this.encoders[t]},s.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},47362:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(80126).b,o=r(27654).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error(\"Input not Buffer\")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return a.isEncoderBuffer(t)||(t=new a(t,e)),this.length+=t.length,t}),this);else if(\"number\"==typeof t){if(!(0<=t&&t<=255))return e.error(\"non-byte EncoderBuffer value\");this.value=t,this.length=1}else if(\"string\"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error(\"Unsupported type: \"+typeof t);this.value=t,this.length=t.length}}n(s,i),e.C=s,s.isDecoderBuffer=function(t){if(t instanceof s)return!0;return\"object\"==typeof t&&o.isBuffer(t.base)&&\"DecoderBuffer\"===t.constructor.name&&\"number\"==typeof t.offset&&\"number\"==typeof t.length&&\"function\"==typeof t.save&&\"function\"==typeof t.restore&&\"function\"==typeof t.isEmpty&&\"function\"==typeof t.readUInt8&&\"function\"==typeof t.skip&&\"function\"==typeof t.raw},s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){const e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||\"DecoderBuffer overrun\")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||\"DecoderBuffer overrun\");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.R=a,a.isEncoderBuffer=function(t){if(t instanceof a)return!0;return\"object\"==typeof t&&\"EncoderBuffer\"===t.constructor.name&&\"number\"==typeof t.length&&\"function\"==typeof t.join},a.prototype.join=function(t,e){return t||(t=o.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):(\"number\"==typeof this.value?t[e]=this.value:\"string\"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},84798:(t,e,r)=>{\"use strict\";const n=e;n.Reporter=r(80126).b,n.DecoderBuffer=r(47362).C,n.EncoderBuffer=r(47362).R,n.Node=r(80847)},80847:(t,e,r)=>{\"use strict\";const n=r(80126).b,i=r(47362).R,o=r(47362).C,s=r(79561),a=[\"seq\",\"seqof\",\"set\",\"setof\",\"objid\",\"bool\",\"gentime\",\"utctime\",\"null_\",\"enum\",\"int\",\"objDesc\",\"bitstr\",\"bmpstr\",\"charstr\",\"genstr\",\"graphstr\",\"ia5str\",\"iso646str\",\"numstr\",\"octstr\",\"printstr\",\"t61str\",\"unistr\",\"utf8str\",\"videostr\"],u=[\"key\",\"obj\",\"use\",\"optional\",\"explicit\",\"implicit\",\"def\",\"choice\",\"any\",\"contains\"].concat(a);function h(t,e,r){const n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=h;const c=[\"enc\",\"parent\",\"children\",\"tag\",\"args\",\"reverseArgs\",\"choice\",\"optional\",\"any\",\"obj\",\"use\",\"alteredUse\",\"key\",\"default\",\"explicit\",\"implicit\",\"contains\"];h.prototype.clone=function(){const t=this._baseState,e={};c.forEach((function(r){e[r]=t[r]}));const r=new this.constructor(e.parent);return r._baseState=e,r},h.prototype._wrap=function(){const t=this._baseState;u.forEach((function(e){this[e]=function(){const r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},h.prototype._init=function(t){const e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),s.equal(e.children.length,1,\"Root node can have only one child\")},h.prototype._useArgs=function(t){const e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if(\"object\"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);const n=t[r];e[n]=r})),e})))},[\"_peekTag\",\"_decodeTag\",\"_use\",\"_decodeStr\",\"_decodeObjid\",\"_decodeTime\",\"_decodeNull\",\"_decodeInt\",\"_decodeBool\",\"_decodeList\",\"_encodeComposite\",\"_encodeStr\",\"_encodeObjid\",\"_encodeTime\",\"_encodeNull\",\"_encodeInt\",\"_encodeBool\"].forEach((function(t){h.prototype[t]=function(){const e=this._baseState;throw new Error(t+\" not implemented for encoding: \"+e.enc)}})),a.forEach((function(t){h.prototype[t]=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}})),h.prototype.use=function(t){s(t);const e=this._baseState;return s(null===e.use),e.use=t,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(t){const e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},h.prototype.explicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},h.prototype.implicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},h.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},h.prototype.key=function(t){const e=this._baseState;return s(null===e.key),e.key=t,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(t){const e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},h.prototype.contains=function(t){const e=this._baseState;return s(null===e.use),e.contains=t,this},h.prototype._decode=function(t,e){const r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));let n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(s=this._peekTag(t,n,r.any),t.isError(s))return s}else{const n=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(n)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){const e=this._decodeTag(t,r.explicit);if(t.isError(e))return e;t=e}const n=t.offset;if(null===r.use&&null===r.choice){let e;r.any&&(e=t.save());const n=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(n))return n;r.any?i=t.raw(e):t=n}if(e&&e.track&&null!==r.tag&&e.track(t.path(),n,t.length,\"tagged\"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,\"content\"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&(\"octstr\"===r.tag||\"bitstr\"===r.tag)){const n=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(n,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},h.prototype._decodeGeneric=function(t,e,r){const n=this._baseState;return\"seq\"===t||\"set\"===t?null:\"seqof\"===t||\"setof\"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):\"objid\"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):\"objid\"===t?this._decodeObjid(e,null,null,r):\"gentime\"===t||\"utctime\"===t?this._decodeTime(e,t,r):\"null_\"===t?this._decodeNull(e,r):\"bool\"===t?this._decodeBool(e,r):\"objDesc\"===t?this._decodeStr(e,t,r):\"int\"===t||\"enum\"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error(\"unknown tag: \"+t)},h.prototype._getUse=function(t,e){const r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},h.prototype._decodeChoice=function(t,e){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const s=t.save(),a=r.choice[o];try{const r=a._decode(t,e);if(t.isError(r))return!1;n={type:o,value:r},i=!0}catch(e){return t.restore(s),!1}return!0}),this),i?n:t.error(\"Choice not matched\")},h.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},h.prototype._encode=function(t,e,r){const n=this._baseState;if(null!==n.default&&n.default===t)return;const i=this._encodeValue(t,e,r);return void 0===i||this._skipDefault(i,e,r)?void 0:i},h.prototype._encodeValue=function(t,e,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);let o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}let s=null,a=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),a=!0;else if(i.children)s=i.children.map((function(r){if(\"null_\"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error(\"Child should have a key\");const n=e.enterKey(r._baseState.key);if(\"object\"!=typeof t)return e.error(\"Child expected, but input is not object\");const i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i}),this).filter((function(t){return t})),s=this._createEncoderBuffer(s);else if(\"seqof\"===i.tag||\"setof\"===i.tag){if(!i.args||1!==i.args.length)return e.error(\"Too many args for : \"+i.tag);if(!Array.isArray(t))return e.error(\"seqof/setof, but data is not Array\");const r=this.clone();r._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(r){const n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),a=!0);if(!i.any&&null===i.choice){const t=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?\"universal\":\"context\";null===t?null===i.use&&e.error(\"Tag could be omitted only for .use()\"):null===i.use&&(o=this._encodeComposite(t,a,r,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,\"context\",o)),o},h.prototype._encodeChoice=function(t,e){const r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+\" not found in \"+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},h.prototype._encodePrimitive=function(t,e){const r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if(\"objid\"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if(\"objid\"===t)return this._encodeObjid(e,null,null);if(\"gentime\"===t||\"utctime\"===t)return this._encodeTime(e,t);if(\"null_\"===t)return this._encodeNull();if(\"int\"===t||\"enum\"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if(\"bool\"===t)return this._encodeBool(e);if(\"objDesc\"===t)return this._encodeStr(e,t);throw new Error(\"Unsupported tag: \"+t)},h.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},h.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},80126:(t,e,r)=>{\"use strict\";const n=r(91285);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.b=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){const n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join(\"/\")},i.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){const e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){let e;const r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return\"[\"+JSON.stringify(t)+\"]\"})).join(\"\"),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+\" at: \"+(this.path||\"(shallow)\"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},4131:(t,e)=>{\"use strict\";function r(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e}e.tagClass={0:\"universal\",1:\"application\",2:\"context\",3:\"private\"},e.tagClassByName=r(e.tagClass),e.tag={0:\"end\",1:\"bool\",2:\"int\",3:\"bitstr\",4:\"octstr\",5:\"null_\",6:\"objid\",7:\"objDesc\",8:\"external\",9:\"real\",10:\"enum\",11:\"embed\",12:\"utf8str\",13:\"relativeOid\",16:\"seq\",17:\"set\",18:\"numstr\",19:\"printstr\",20:\"t61str\",21:\"videostr\",22:\"ia5str\",23:\"utctime\",24:\"gentime\",25:\"graphstr\",26:\"iso646str\",27:\"genstr\",28:\"unistr\",29:\"charstr\",30:\"bmpstr\"},e.tagByName=r(e.tag)},96906:(t,e,r)=>{\"use strict\";const n=e;n._reverse=function(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e},n.der=r(4131)},41066:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(90735),o=r(47362).C,s=r(80847),a=r(4131);function u(t){this.enc=\"der\",this.name=t.name,this.entity=t,this.tree=new h,this.tree._init(t.body)}function h(t){s.call(this,\"der\",t)}function c(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=t.readUInt8(e),t.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return t.error(\"length octect is too long\");n=0;for(let e=0;e<i;e++){n<<=8;const e=t.readUInt8(r);if(t.isError(e))return e;n|=e}return n}t.exports=u,u.prototype.decode=function(t,e){return o.isDecoderBuffer(t)||(t=new o(t,e)),this.tree._decode(t,e)},n(h,s),h.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;const n=t.save(),i=c(t,'Failed to peek tag: \"'+e+'\"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+\"of\"===e||r)},h.prototype._decodeTag=function(t,e,r){const n=c(t,'Failed to decode tag of \"'+e+'\"');if(t.isError(n))return n;let i=f(t,n.primitive,'Failed to get length of \"'+e+'\"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+\"of\"!==e)return t.error('Failed to match tag: \"'+e+'\"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: \"'+e+'\"');const o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: \"'+this.tag+'\"');return t.isError(s)?s:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: \"'+e+'\"'))},h.prototype._skipUntilEnd=function(t,e){for(;;){const r=c(t,e);if(t.isError(r))return r;const n=f(t,r.primitive,e);if(t.isError(n))return n;let i;if(i=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(i))return i;if(\"end\"===r.tagStr)break}},h.prototype._decodeList=function(t,e,r,n){const i=[];for(;!t.isEmpty();){const e=this._peekTag(t,\"end\");if(t.isError(e))return e;const o=r.decode(t,\"der\",n);if(t.isError(o)&&e)break;i.push(o)}return i},h.prototype._decodeStr=function(t,e){if(\"bitstr\"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if(\"bmpstr\"===e){const e=t.raw();if(e.length%2==1)return t.error(\"Decoding of string type: bmpstr length mismatch\");let r=\"\";for(let t=0;t<e.length/2;t++)r+=String.fromCharCode(e.readUInt16BE(2*t));return r}if(\"numstr\"===e){const e=t.raw().toString(\"ascii\");return this._isNumstr(e)?e:t.error(\"Decoding of string type: numstr unsupported characters\")}if(\"octstr\"===e)return t.raw();if(\"objDesc\"===e)return t.raw();if(\"printstr\"===e){const e=t.raw().toString(\"ascii\");return this._isPrintstr(e)?e:t.error(\"Decoding of string type: printstr unsupported characters\")}return/str$/.test(e)?t.raw().toString():t.error(\"Decoding of string type: \"+e+\" unsupported\")},h.prototype._decodeObjid=function(t,e,r){let n;const i=[];let o=0,s=0;for(;!t.isEmpty();)s=t.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0);128&s&&i.push(o);const a=i[0]/40|0,u=i[0]%40;if(n=r?i:[a,u].concat(i.slice(1)),e){let t=e[n.join(\" \")];void 0===t&&(t=e[n.join(\".\")]),void 0!==t&&(n=t)}return n},h.prototype._decodeTime=function(t,e){const r=t.raw().toString();let n,i,o,s,a,u;if(\"gentime\"===e)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),u=0|r.slice(12,14);else{if(\"utctime\"!==e)return t.error(\"Decoding \"+e+\" time is not supported yet\");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,u,0)},h.prototype._decodeNull=function(){return null},h.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},h.prototype._decodeInt=function(t,e){const r=t.raw();let n=new i(r);return e&&(n=e[n.toString(10)]||n),n},h.prototype._use=function(t,e){return\"function\"==typeof t&&(t=t(e)),t._getDecoder(\"der\").tree}},18211:(t,e,r)=>{\"use strict\";const n=e;n.der=r(41066),n.pem=r(63956)},63956:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(27654).Buffer,o=r(41066);function s(t){o.call(this,t),this.enc=\"pem\"}n(s,o),t.exports=s,s.prototype.decode=function(t,e){const r=t.toString().split(/[\\r\\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,u=-1;for(let t=0;t<r.length;t++){const e=r[t].match(s);if(null!==e&&e[2]===n){if(-1!==a){if(\"END\"!==e[1])break;u=t;break}if(\"BEGIN\"!==e[1])break;a=t}}if(-1===a||-1===u)throw new Error(\"PEM section not found for: \"+n);const h=r.slice(a+1,u).join(\"\");h.replace(/[^a-z0-9+/=]+/gi,\"\");const c=i.from(h,\"base64\");return o.prototype.decode.call(this,c,e)}},95758:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(27654).Buffer,o=r(80847),s=r(4131);function a(t){this.enc=\"der\",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.call(this,\"der\",t)}function h(t){return t<10?\"0\"+t:t}t.exports=a,a.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,o),u.prototype._encodeComposite=function(t,e,r,n){const o=function(t,e,r,n){let i;\"seqof\"===t?t=\"seq\":\"setof\"===t&&(t=\"set\");if(s.tagByName.hasOwnProperty(t))i=s.tagByName[t];else{if(\"number\"!=typeof t||(0|t)!==t)return n.error(\"Unknown tag: \"+t);i=t}if(i>=31)return n.error(\"Multi-octet tag encoding unsupported\");e||(i|=32);return i|=s.tagClassByName[r||\"universal\"]<<6,i}(t,e,r,this.reporter);if(n.length<128){const t=i.alloc(2);return t[0]=o,t[1]=n.length,this._createEncoderBuffer([t,n])}let a=1;for(let t=n.length;t>=256;t>>=8)a++;const u=i.alloc(2+a);u[0]=o,u[1]=128|a;for(let t=1+a,e=n.length;e>0;t--,e>>=8)u[t]=255&e;return this._createEncoderBuffer([u,n])},u.prototype._encodeStr=function(t,e){if(\"bitstr\"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if(\"bmpstr\"===e){const e=i.alloc(2*t.length);for(let r=0;r<t.length;r++)e.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(e)}return\"numstr\"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: numstr supports only digits and space\"):\"printstr\"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark\"):/str$/.test(e)||\"objDesc\"===e?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: \"+e+\" unsupported\")},u.prototype._encodeObjid=function(t,e,r){if(\"string\"==typeof t){if(!e)return this.reporter.error(\"string objid given, but no values map found\");if(!e.hasOwnProperty(t))return this.reporter.error(\"objid not found in values map\");t=e[t].split(/[\\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error(\"objid() should be either array or string, got: \"+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error(\"Second objid identifier OOB\");t.splice(0,2,40*t[0]+t[1])}let n=0;for(let e=0;e<t.length;e++){let r=t[e];for(n++;r>=128;r>>=7)n++}const o=i.alloc(n);let s=o.length-1;for(let e=t.length-1;e>=0;e--){let r=t[e];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(t,e){let r;const n=new Date(t);return\"gentime\"===e?r=[h(n.getUTCFullYear()),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),\"Z\"].join(\"\"):\"utctime\"===e?r=[h(n.getUTCFullYear()%100),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),\"Z\"].join(\"\"):this.reporter.error(\"Encoding \"+e+\" time is not supported yet\"),this._encodeStr(r,\"octstr\")},u.prototype._encodeNull=function(){return this._createEncoderBuffer(\"\")},u.prototype._encodeInt=function(t,e){if(\"string\"==typeof t){if(!e)return this.reporter.error(\"String int or enum given, but no values map\");if(!e.hasOwnProperty(t))return this.reporter.error(\"Values map doesn't contain: \"+JSON.stringify(t));t=e[t]}if(\"number\"!=typeof t&&!i.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=i.from(e)}if(i.isBuffer(t)){let e=t.length;0===t.length&&e++;const r=i.alloc(e);return t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const n=new Array(r);for(let e=n.length-1;e>=0;e--)n[e]=255&t,t>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return\"function\"==typeof t&&(t=t(e)),t._getEncoder(\"der\").tree},u.prototype._skipDefault=function(t,e,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},89116:(t,e,r)=>{\"use strict\";const n=e;n.der=r(95758),n.pem=r(99245)},99245:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(95758);function o(t){i.call(this,t),this.enc=\"pem\"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){const r=i.prototype.encode.call(this,t).toString(\"base64\"),n=[\"-----BEGIN \"+e.label+\"-----\"];for(let t=0;t<r.length;t+=64)n.push(r.slice(t,t+64));return n.push(\"-----END \"+e.label+\"-----\"),n.join(\"\\n\")}},90735:function(t,e,r){!function(t,e){\"use strict\";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(83397).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}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,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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.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},o.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var c=[\"\",\"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\"],f=[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],l=[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 d(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);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+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)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){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\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},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 p=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,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>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,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))<<13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(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)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(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)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(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)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(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)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(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)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;h=((o=o+Math.imul(M,mt)|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(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=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(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))<<13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=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(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=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(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(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()}(this,t,e):m(this,t,e),r},g.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},g.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},g.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]]},g.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],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.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},g.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}},g.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},g.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))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.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),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),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]&1<<i)>>>i}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.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(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.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},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,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=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,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 E(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 y={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(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){E.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.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},v.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(w,b),i(M,b),i(_,b),_.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(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.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\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.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)},E.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},E.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)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.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 m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.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},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),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)},95766:(t,e)=>{\"use strict\";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],h=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),c=0,f=u>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;2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[c++]=255&e);1===u&&(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);return h},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));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]+\"=\"));return o.join(\"\")};for(var r=[],n=[],i=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(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},66534:(t,e)=>{\"use strict\";e.gW=void 0;const r=\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\",n={};for(let t=0;t<32;t++){const e=r.charAt(t);n[e]=t}function i(t){const e=t>>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function o(t){let e=1;for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);if(n<33||n>126)return\"Invalid prefix (\"+t+\")\";e=i(e)^n>>5}e=i(e);for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);e=i(e)^31&n}return e}function s(t,e,r,n){let i=0,o=0;const s=(1<<r)-1,a=[];for(let n=0;n<t.length;++n)for(i=i<<e|t[n],o+=e;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=e)return\"Excess padding\";if(i<<r-o&s)return\"Non-zero padding\"}return a}function a(t){return s(t,8,5,!0)}function u(t){const e=s(t,5,8,!1);if(Array.isArray(e))return e}function h(t){const e=s(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}function c(t){let e;function s(t,r){if(r=r||90,t.length<8)return t+\" too short\";if(t.length>r)return\"Exceeds length limit\";const s=t.toLowerCase(),a=t.toUpperCase();if(t!==s&&t!==a)return\"Mixed-case string \"+t;const u=(t=s).lastIndexOf(\"1\");if(-1===u)return\"No separator character for \"+t;if(0===u)return\"Missing prefix for \"+t;const h=t.slice(0,u),c=t.slice(u+1);if(c.length<6)return\"Data too short\";let f=o(h);if(\"string\"==typeof f)return f;const l=[];for(let t=0;t<c.length;++t){const e=c.charAt(t),r=n[e];if(void 0===r)return\"Unknown character \"+e;f=i(f)^r,t+6>=c.length||l.push(r)}return f!==e?\"Invalid checksum for \"+t:{prefix:h,words:l}}return e=\"bech32\"===t?1:734539939,{decodeUnsafe:function(t,e){const r=s(t,e);if(\"object\"==typeof r)return r},decode:function(t,e){const r=s(t,e);if(\"object\"==typeof r)return r;throw new Error(r)},encode:function(t,n,s){if(s=s||90,t.length+7+n.length>s)throw new TypeError(\"Exceeds length limit\");let a=o(t=t.toLowerCase());if(\"string\"==typeof a)throw new Error(a);let u=t+\"1\";for(let t=0;t<n.length;++t){const e=n[t];if(e>>5!=0)throw new Error(\"Non 5-bit word\");a=i(a)^e,u+=r.charAt(e)}for(let t=0;t<6;++t)a=i(a);a^=e;for(let t=0;t<6;++t){u+=r.charAt(a>>5*(5-t)&31)}return u},toWords:a,fromWordsUnsafe:u,fromWords:h}}e.gW=c(\"bech32\"),c(\"bech32m\")},62197:function(t,e,r){!function(t,e){\"use strict\";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(33196).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];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 m=f.modrn(c).toString(t);r=(f=f.idivn(c)).isZero()?m+r:l[h-m.length]+m+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)};function m(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.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 g=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,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>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,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))<<13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(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)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(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)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(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)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(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)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(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)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;h=((o=o+Math.imul(M,mt)|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(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=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(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))<<13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=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(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=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(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,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,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 b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?m(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.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},v.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},v.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]]},v.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],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},v.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},v.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}},v.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},v.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))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.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),b(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,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=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,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 x(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 w={k256:null,p224:null,p192:null,p25519:null};function M(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 _(){M.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function E(){M.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function A(){M.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function S(){M.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function x(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 B(t){x.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)}M.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},M.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},M.prototype.split=function(t,e){t.iushrn(this.n,0,e)},M.prototype.imulK=function(t){return t.imul(this.k)},i(_,M),_.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(E,M),i(A,M),i(S,M),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(w[t])return w[t];var e;if(\"k256\"===t)e=new _;else if(\"p224\"===t)e=new E;else if(\"p192\"===t)e=new A;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new S}return w[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},x.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\")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.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 m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},x.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},x.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},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new B(t)},i(B,x),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.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)},B.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)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},82745:(t,e,r)=>{var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},\"object\"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:\"object\"==typeof window&&(i.prototype._rand=function(){throw new Error(\"Not implemented yet\")});else try{var o=r(38087);if(\"function\"!=typeof o.randomBytes)throw new Error(\"Not supported\");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},52970:(t,e,r)=>{var n=r(77834).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,n,i){for(var o,s,a,u,h=r[0],c=r[1],f=r[2],l=r[3],d=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],y=4,b=1;b<i;b++)o=h[d>>>24]^c[p>>>16&255]^f[m>>>8&255]^l[255&g]^e[y++],s=h[p>>>24]^c[m>>>16&255]^f[g>>>8&255]^l[255&d]^e[y++],a=h[m>>>24]^c[g>>>16&255]^f[d>>>8&255]^l[255&p]^e[y++],u=h[g>>>24]^c[d>>>16&255]^f[p>>>8&255]^l[255&m]^e[y++],d=o,p=s,m=a,g=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^e[y++],s=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&d])^e[y++],a=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[y++],u=(n[g>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^e[y++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var h=a^a<<1^a<<2^a<<3^a<<4;h=h>>>8^255&h^99,r[s]=h,n[h]=s;var c=t[s],f=t[c],l=t[f],d=257*t[h]^16843008*h;i[0][s]=d<<24|d>>>8,i[1][s]=d<<16|d>>>16,i[2][s]=d<<8|d>>>24,i[3][s]=d,d=16843009*l^65537*f^257*c^16843008*s,o[0][h]=d<<24|d>>>8,o[1][h]=d<<16|d>>>16,o[2][h]=d<<8|d>>>24,o[3][h]=d,0===s?s=a=1:(s=c^t[t[t[l^c]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function h(t){this._key=i(t),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var s=i[o-1];o%e==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-e]^s}for(var h=[],c=0;c<n;c++){var f=n-c,l=i[f-(c%4?0:4)];h[c]=c<4||f<=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=h},h.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},h.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},h.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},h.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=h},3313:(t,e,r)=>{var n=r(52970),i=r(77834).Buffer,o=r(13973),s=r(91285),a=r(42895),u=r(31313),h=r(14182);function c(t,e,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var c=this._cipher.encryptBlock(u);this._ghash=new a(c),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,c=i.alloc(8);c.writeUIntBE(u,0,8),n.update(c),t._finID=n.state;var f=i.from(t._finID);return h(f),f}(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(c,o),c.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error(\"Unsupported state or unable to authenticate data\");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error(\"Unsupported state or unable to authenticate data\");this._authTag=t,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error(\"Attempting to get auth tag in unsupported state\");return this._authTag},c.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error(\"Attempting to set auth tag in unsupported state\");this._authTag=t},c.prototype.setAAD=function(t){if(this._called)throw new Error(\"Attempting to set AAD in unsupported state\");this._ghash.update(t),this._alen+=t.length},t.exports=c},10010:(t,e,r)=>{var n=r(89309),i=r(57612),o=r(49234);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},57612:(t,e,r)=>{var n=r(3313),i=r(77834).Buffer,o=r(68702),s=r(37041),a=r(13973),u=r(52970),h=r(59341);function c(t,e,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function l(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError(\"invalid suite type\");if(\"string\"==typeof r&&(r=i.from(r)),\"GCM\"!==a.mode&&r.length!==a.iv)throw new TypeError(\"invalid iv length \"+r.length);if(\"string\"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError(\"invalid key length \"+e.length);return\"stream\"===a.type?new s(a.module,e,r,!0):\"auth\"===a.type?new n(a.module,e,r,!0):new c(a.module,e,r)}r(91285)(c,a),c.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error(\"unable to decrypt data\");var r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error(\"unable to decrypt data\");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error(\"data not multiple of block length\")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},f.prototype.add=function(t){this.cache=i.concat([this.cache,t])},f.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError(\"invalid suite type\");var n=h(e,!1,r.key,r.iv);return l(t,n.key,n.iv)},e.createDecipheriv=l},89309:(t,e,r)=>{var n=r(68702),i=r(3313),o=r(77834).Buffer,s=r(37041),a=r(13973),u=r(52970),h=r(59341);function c(t,e,r){a.call(this),this._cache=new l,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(91285)(c,a),c.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function d(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError(\"invalid suite type\");if(\"string\"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError(\"invalid key length \"+e.length);if(\"string\"==typeof r&&(r=o.from(r)),\"GCM\"!==a.mode&&r.length!==a.iv)throw new TypeError(\"invalid iv length \"+r.length);return\"stream\"===a.type?new s(a.module,e,r):\"auth\"===a.type?new i(a.module,e,r):new c(a.module,e,r)}c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(f))throw this._cipher.scrub(),new Error(\"data not multiple of block length\")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=o.concat([this.cache,t])},l.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError(\"invalid suite type\");var i=h(e,!1,r.key,r.iv);return d(t,i.key,i.iv)}},42895:(t,e,r)=>{var n=r(77834).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},14182:t=>{t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},8796:(t,e,r)=>{var n=r(31313);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},76528:(t,e,r)=>{var n=r(77834).Buffer,i=r(31313);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},60918:(t,e,r)=>{var n=r(77834).Buffer;function i(t,e,r){for(var n,i,s=-1,a=0;++s<8;)n=e&1<<7-s?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>s%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},27263:(t,e,r)=>{var n=r(77834).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},48219:(t,e,r)=>{var n=r(31313),i=r(77834).Buffer,o=r(14182);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var u=s(t),h=o+16*a;t._cache.writeUInt32BE(u[0],h+0),t._cache.writeUInt32BE(u[1],h+4),t._cache.writeUInt32BE(u[2],h+8),t._cache.writeUInt32BE(u[3],h+12)}var c=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,c)}},57028:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},68702:(t,e,r)=>{var n={ECB:r(57028),CBC:r(8796),CFB:r(76528),CFB8:r(27263),CFB1:r(60918),OFB:r(34256),CTR:r(48219),GCM:r(48219)},i=r(49234);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},34256:(t,e,r)=>{var n=r(48834).Buffer,i=r(31313);function o(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=n.concat([t._cache,o(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,r)}},37041:(t,e,r)=>{var n=r(52970),i=r(77834).Buffer,o=r(13973);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(91285)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},93667:(t,e,r)=>{var n=r(37214),i=r(10010),o=r(68702),s=r(62820),a=r(59341);function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t});throw new TypeError(\"invalid suite type\")}function h(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError(\"invalid suite type\")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError(\"invalid suite type\");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return u(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError(\"invalid suite type\");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return h(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=h,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},37214:(t,e,r)=>{var n=r(13973),i=r(84387),o=r(91285),s=r(77834).Buffer,a={\"des-ede3-cbc\":i.CBC.instantiate(i.EDE),\"des-ede3\":i.EDE,\"des-ede-cbc\":i.CBC.instantiate(i.EDE),\"des-ede\":i.EDE,\"des-cbc\":i.CBC.instantiate(i.DES),\"des-ecb\":i.DES};function u(t){n.call(this);var e,r=t.mode.toLowerCase(),i=a[r];e=t.decrypt?\"decrypt\":\"encrypt\";var o=t.key;s.isBuffer(o)||(o=s.from(o)),\"des-ede\"!==r&&\"des-ede-cbc\"!==r||(o=s.concat([o,o.slice(0,8)]));var u=t.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:o,iv:u,type:e})}a.des=a[\"des-cbc\"],a.des3=a[\"des-ede3-cbc\"],t.exports=u,o(u,n),u.prototype._update=function(t){return s.from(this._des.update(t))},u.prototype._final=function(){return s.from(this._des.final())}},62820:(t,e)=>{e[\"des-ecb\"]={key:8,iv:0},e[\"des-cbc\"]=e.des={key:8,iv:8},e[\"des-ede3-cbc\"]=e.des3={key:24,iv:8},e[\"des-ede3\"]={key:24,iv:0},e[\"des-ede-cbc\"]={key:16,iv:8},e[\"des-ede\"]={key:16,iv:0}},91857:(t,e,r)=>{var n=r(48834).Buffer,i=r(62197),o=r(95003);function s(t){var e,r=t.modulus.byteLength();do{e=new i(o(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,e){var r=function(t){var e=s(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),o=e.modulus.byteLength(),a=new i(t).mul(r.blinder).umod(e.modulus),u=a.toRed(i.mont(e.prime1)),h=a.toRed(i.mont(e.prime2)),c=e.coefficient,f=e.prime1,l=e.prime2,d=u.redPow(e.exponent1).fromRed(),p=h.redPow(e.exponent2).fromRed(),m=d.isub(p).imul(c).umod(f).imul(l);return p.iadd(m).imul(r.unblinder).umod(e.modulus).toArrayLike(n,\"be\",o)}a.getr=s,t.exports=a},24778:(t,e,r)=>{\"use strict\";t.exports=r(40026)},95263:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=r(16162),o=r(67525),s=r(91285),a=r(262),u=r(5643),h=r(40026);function c(t){o.Writable.call(this);var e=h[t];if(!e)throw new Error(\"Unknown message digest\");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function f(t){o.Writable.call(this);var e=h[t];if(!e)throw new Error(\"Unknown message digest\");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){return new c(t)}function d(t){return new f(t)}Object.keys(h).forEach((function(t){h[t].id=n.from(h[t].id,\"hex\"),h[t.toLowerCase()]=h[t]})),s(c,o.Writable),c.prototype._write=function(t,e,r){this._hash.update(t),r()},c.prototype.update=function(t,e){return this._hash.update(\"string\"==typeof t?n.from(t,e):t),this},c.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=a(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},s(f,o.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return this._hash.update(\"string\"==typeof t?n.from(t,e):t),this},f.prototype.verify=function(t,e,r){var i=\"string\"==typeof e?n.from(e,r):e;this.end();var o=this._hash.digest();return u(i,o,t,this._signType,this._tag)},t.exports={Sign:l,Verify:d,createSign:l,createVerify:d}},262:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=r(50011),o=r(91857),s=r(87554).ec,a=r(62197),u=r(28016),h=r(39167);function c(t,e,r,o){if((t=n.from(t.toArray())).length<e.byteLength()){var s=n.alloc(e.byteLength()-t.length);t=n.concat([s,t])}var a=r.length,u=function(t,e){t=f(t,e),t=t.mod(e);var r=n.from(t.toArray());if(r.length<e.byteLength()){var i=n.alloc(e.byteLength()-r.length);r=n.concat([i,r])}return r}(r,e),h=n.alloc(a);h.fill(1);var c=n.alloc(a);return c=i(o,c).update(h).update(n.from([0])).update(t).update(u).digest(),h=i(o,c).update(h).digest(),{k:c=i(o,c).update(h).update(n.from([1])).update(t).update(u).digest(),v:h=i(o,c).update(h).digest()}}function f(t,e){var r=new a(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function l(t,e,r){var o,s;do{for(o=n.alloc(0);8*o.length<t.bitLength();)e.v=i(r,e.k).update(e.v).digest(),o=n.concat([o,e.v]);s=f(o,t),e.k=i(r,e.k).update(e.v).update(n.from([0])).digest(),e.v=i(r,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function d(t,e,r,n){return t.toRed(a.mont(r)).redPow(e).fromRed().mod(n)}t.exports=function(t,e,r,i,p){var m=u(e);if(m.curve){if(\"ecdsa\"!==i&&\"ecdsa/rsa\"!==i)throw new Error(\"wrong private key type\");return function(t,e){var r=h[e.curve.join(\".\")];if(!r)throw new Error(\"unknown curve \"+e.curve.join(\".\"));var i=new s(r).keyFromPrivate(e.privateKey),o=i.sign(t);return n.from(o.toDER())}(t,m)}if(\"dsa\"===m.type){if(\"dsa\"!==i)throw new Error(\"wrong private key type\");return function(t,e,r){var i,o=e.params.priv_key,s=e.params.p,u=e.params.q,h=e.params.g,p=new a(0),m=f(t,u).mod(u),g=!1,y=c(o,u,t,r);for(;!1===g;)p=d(h,i=l(u,y,r),s,u),0===(g=i.invm(u).imul(m.add(o.mul(p))).mod(u)).cmpn(0)&&(g=!1,p=new a(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t));128&e[0]&&(e=[0].concat(e));var r=t.length+e.length+4,i=[48,r,2,t.length];return i=i.concat(t,[2,e.length],e),n.from(i)}(p,g)}(t,m,r)}if(\"rsa\"!==i&&\"ecdsa/rsa\"!==i)throw new Error(\"wrong private key type\");if(void 0!==e.padding&&1!==e.padding)throw new Error(\"illegal or unsupported padding mode\");t=n.concat([p,t]);for(var g=m.modulus.byteLength(),y=[0,1];t.length+y.length+1<g;)y.push(255);y.push(0);for(var b=-1;++b<t.length;)y.push(t[b]);return o(y,m)},t.exports.getKey=c,t.exports.makeKey=l},5643:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=r(62197),o=r(87554).ec,s=r(28016),a=r(39167);function u(t,e){if(t.cmpn(0)<=0)throw new Error(\"invalid sig\");if(t.cmp(e)>=0)throw new Error(\"invalid sig\")}t.exports=function(t,e,r,h,c){var f=s(r);if(\"ec\"===f.type){if(\"ecdsa\"!==h&&\"ecdsa/rsa\"!==h)throw new Error(\"wrong public key type\");return function(t,e,r){var n=a[r.data.algorithm.curve.join(\".\")];if(!n)throw new Error(\"unknown curve \"+r.data.algorithm.curve.join(\".\"));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(e,t,s)}(t,e,f)}if(\"dsa\"===f.type){if(\"dsa\"!==h)throw new Error(\"wrong public key type\");return function(t,e,r){var n=r.data.p,o=r.data.q,a=r.data.g,h=r.data.pub_key,c=s.signature.decode(t,\"der\"),f=c.s,l=c.r;u(f,o),u(l,o);var d=i.mont(n),p=f.invm(o),m=a.toRed(d).redPow(new i(e).mul(p).mod(o)).fromRed().mul(h.toRed(d).redPow(l.mul(p).mod(o)).fromRed()).mod(n).mod(o);return 0===m.cmp(l)}(t,e,f)}if(\"rsa\"!==h&&\"ecdsa/rsa\"!==h)throw new Error(\"wrong public key type\");e=n.concat([c,e]);for(var l=f.modulus.byteLength(),d=[1],p=0;e.length+d.length+2<l;)d.push(255),p+=1;d.push(0);for(var m=-1;++m<e.length;)d.push(e[m]);d=n.from(d);var g=i.mont(f.modulus);t=(t=new i(t).toRed(g)).redPow(new i(f.publicExponent)),t=n.from(t.fromRed().toArray());var y=p<8?1:0;for(l=Math.min(t.length,d.length),t.length!==d.length&&(y=1),m=-1;++m<l;)y|=t[m]^d[m];return 0===y}},31313:(t,e,r)=>{var n=r(48834).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),i=new n(r),o=0;o<r;++o)i[o]=t[o]^e[o];return i}},48834:(t,e,r)=>{\"use strict\";const n=r(95766),i=r(62333),o=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return 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){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!u.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);const r=0|m(t,e);let n=a(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(W(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(W(t,ArrayBuffer)||t&&W(t.buffer,ArrayBuffer))return d(t,e,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(W(t,SharedArrayBuffer)||t&&W(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}if(void 0!==t.length)return\"number\"!=typeof t.length||Z(t.length)?a(0):l(t);if(\"Buffer\"===t.type&&Array.isArray(t.data))return l(t.data)}(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 m(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||W(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 K(t).length;default:if(i)return n?-1:G(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function g(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 k(this,e,r);case\"utf8\":case\"utf-8\":return x(this,e,r);case\"ascii\":return T(this,e,r);case\"latin1\":case\"binary\":return I(this,e,r);case\"base64\":return S(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return P(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 b(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),Z(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:v(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):v(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function v(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 w(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(Z(n))return s;t[r+s]=n}return s}function M(t,e,r,n){return J(G(e,t.length-r),t,r,n)}function _(t,e,r,n){return J(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 E(t,e,r,n){return J(K(e),t,r,n)}function A(t,e,r,n){return J(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 x(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<=B)return String.fromCharCode.apply(String,t);let r=\"\",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=B));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(W(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),W(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(W(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=m,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)y(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)y(this,e,e+3),y(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)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},u.prototype.toString=function(){const t=this.length;return 0===t?\"\":0===arguments.length?x(this,0,t):g.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(W(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 b(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return b(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 w(this,t,e,r);case\"utf8\":case\"utf-8\":return M(this,t,e,r);case\"ascii\":case\"latin1\":case\"binary\":return _(this,t,e,r);case\"base64\":return E(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return A(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 B=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 I(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 k(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 P(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 C(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 R(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 O(t,e,r,n,i){F(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){F(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 N(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 U(t,e,r,n,o){return e=+e,r>>>=0,o||N(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||N(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||C(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||C(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||C(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(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||C(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||V(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||V(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||C(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||C(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||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||C(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||C(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||C(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||C(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||V(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||V(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||C(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){R(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){if(t=+t,e>>>=0,r>>>=0,!n){R(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||R(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||R(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||R(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||R(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||R(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 O(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);R(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);R(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||R(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||R(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||R(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||R(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||R(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 O(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 U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(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 z(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 H(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 F(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]||V(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 V(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)}z(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(t){return t?`${t} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),z(\"ERR_INVALID_ARG_TYPE\",(function(t,e){return`The \"${t}\" argument must be of type number. Received type ${typeof e}`}),TypeError),z(\"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=H(String(r)):\"bigint\"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+=\"n\"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const q=/[^+/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 K(t){return n.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(q,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function J(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 W(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(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\")}},62680:(t,e,r)=>{\"use strict\";var n=r(67286),i=r(89429),o=i(n(\"String.prototype.indexOf\"));t.exports=function(t,e){var r=n(t,!!e);return\"function\"==typeof r&&o(t,\".prototype.\")>-1?i(r):r}},89429:(t,e,r)=>{\"use strict\";var n=r(4090),i=r(67286),o=r(47669),s=r(5408),a=i(\"%Function.prototype.apply%\"),u=i(\"%Function.prototype.call%\"),h=i(\"%Reflect.apply%\",!0)||n.call(u,a),c=r(70999),f=i(\"%Math.max%\");t.exports=function(t){if(\"function\"!=typeof t)throw new s(\"a function is required\");var e=h(n,u,arguments);return o(e,1+f(0,t.length-(arguments.length-1)),!0)};var l=function(){return h(n,a,arguments)};c?c(t.exports,\"apply\",{value:l}):t.exports.apply=l},13973:(t,e,r)=>{var n=r(77834).Buffer,i=r(54851).Transform,o=r(30214).s;function s(t){i.call(this),this.hashMode=\"string\"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(91285)(s,i),s.prototype.update=function(t,e,r){\"string\"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error(\"trying to get auth tag in unsupported state\")},s.prototype.setAuthTag=function(){throw new Error(\"trying to set auth tag in unsupported state\")},s.prototype.setAAD=function(){throw new Error(\"trying to set aad in unsupported state\")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error(\"can't switch encodings\");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},97108:(t,e)=>{var r;r=function(t){t.version=\"1.2.2\";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return\"undefined\"!=typeof Int32Array?new Int32Array(e):e}(),r=function(t){var e=0,r=0,n=0,i=\"undefined\"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=t[n];for(n=0;256!=n;++n)for(r=t[n],e=256+n;e<4096;e+=256)r=i[e]=r>>>8^t[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]=\"undefined\"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(e),n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],h=r[6],c=r[7],f=r[8],l=r[9],d=r[10],p=r[11],m=r[12],g=r[13],y=r[14];t.table=e,t.bstr=function(t,r){for(var n=-1^r,i=0,o=t.length;i<o;)n=n>>>8^e[255&(n^t.charCodeAt(i++))];return~n},t.buf=function(t,r){for(var b=-1^r,v=t.length-15,w=0;w<v;)b=y[t[w++]^255&b]^g[t[w++]^b>>8&255]^m[t[w++]^b>>16&255]^p[t[w++]^b>>>24]^d[t[w++]]^l[t[w++]]^f[t[w++]]^c[t[w++]]^h[t[w++]]^u[t[w++]]^a[t[w++]]^s[t[w++]]^o[t[w++]]^i[t[w++]]^n[t[w++]]^e[t[w++]];for(v+=15;w<v;)b=b>>>8^e[255&(b^t[w++])];return~b},t.str=function(t,r){for(var n=-1^r,i=0,o=t.length,s=0,a=0;i<o;)(s=t.charCodeAt(i++))<128?n=n>>>8^e[255&(n^s)]:s<2048?n=(n=n>>>8^e[255&(n^(192|s>>6&31))])>>>8^e[255&(n^(128|63&s))]:s>=55296&&s<57344?(s=64+(1023&s),a=1023&t.charCodeAt(i++),n=(n=(n=(n=n>>>8^e[255&(n^(240|s>>8&7))])>>>8^e[255&(n^(128|s>>2&63))])>>>8^e[255&(n^(128|a>>6&15|(3&s)<<4))])>>>8^e[255&(n^(128|63&a))]):n=(n=(n=n>>>8^e[255&(n^(224|s>>12&15))])>>>8^e[255&(n^(128|s>>6&63))])>>>8^e[255&(n^(128|63&s))];return~n}},\"undefined\"==typeof DO_NOT_EXPORT_CRC?r(e):r({})},95363:(t,e,r)=>{var n=r(48834).Buffer,i=r(87554),o=r(59239);t.exports=function(t){return new a(t)};var s={secp256k1:{name:\"secp256k1\",byteLength:32},secp224r1:{name:\"p224\",byteLength:28},prime256v1:{name:\"p256\",byteLength:32},prime192v1:{name:\"p192\",byteLength:24},ed25519:{name:\"ed25519\",byteLength:32},secp384r1:{name:\"p384\",byteLength:48},secp521r1:{name:\"p521\",byteLength:66}};function a(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new n(t);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return e?i.toString(e):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,a.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},a.prototype.computeSecret=function(t,e,r){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),u(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic(\"compressed\"===e,!0);return\"hybrid\"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),u(r,t)},a.prototype.getPrivateKey=function(t){return u(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,e){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,e){e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e));var r=new o(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},59239:function(t,e,r){!function(t,e){\"use strict\";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(88351).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}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,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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.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},o.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var c=[\"\",\"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\"],f=[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],l=[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 d(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);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+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)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){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\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},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 p=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,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>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,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))<<13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(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)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(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)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(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)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(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)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(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)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;h=((o=o+Math.imul(M,mt)|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(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=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(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))<<13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=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(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=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(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(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()}(this,t,e):m(this,t,e),r},g.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},g.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},g.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]]},g.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],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.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},g.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}},g.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},g.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))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.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),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),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]&1<<i)>>>i}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.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(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.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},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,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=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,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 E(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 y={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(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){E.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.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},v.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(w,b),i(M,b),i(_,b),_.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(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.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\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.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)},E.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},E.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)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.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 m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.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},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),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)},16162:(t,e,r)=>{\"use strict\";var n=r(91285),i=r(27993),o=r(51445),s=r(9065),a=r(13973);function u(t){a.call(this,\"digest\"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return\"md5\"===(t=t.toLowerCase())?new i:\"rmd160\"===t||\"ripemd160\"===t?new o:new u(s(t))}},22511:(t,e,r)=>{var n=r(27993);t.exports=function(t){return(new n).update(t).digest()}},50011:(t,e,r)=>{\"use strict\";var n=r(91285),i=r(6456),o=r(13973),s=r(77834).Buffer,a=r(22511),u=r(51445),h=r(9065),c=s.alloc(128);function f(t,e){o.call(this,\"digest\"),\"string\"==typeof e&&(e=s.from(e));var r=\"sha512\"===t||\"sha384\"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=(\"rmd160\"===t?new u:h(t)).update(e).digest():e.length<r&&(e=s.concat([e,c],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash=\"rmd160\"===t?new u:h(t),this._hash.update(n)}n(f,o),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){var t=this._hash.digest();return(\"rmd160\"===this._alg?new u:h(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return\"rmd160\"===(t=t.toLowerCase())||\"ripemd160\"===t?new f(\"rmd160\",e):\"md5\"===t?new i(a,e):new f(t,e)}},6456:(t,e,r)=>{\"use strict\";var n=r(91285),i=r(77834).Buffer,o=r(13973),s=i.alloc(128),a=64;function u(t,e){o.call(this,\"digest\"),\"string\"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},5634:(t,e,r)=>{\"use strict\";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(95003),e.createHash=e.Hash=r(16162),e.createHmac=e.Hmac=r(50011);var n=r(24778),i=Object.keys(n),o=[\"sha1\",\"sha224\",\"sha256\",\"sha384\",\"sha512\",\"md5\",\"rmd160\"].concat(i);e.getHashes=function(){return o};var s=r(30499);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var a=r(93667);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var u=r(67602);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var h=r(95263);e.createSign=h.createSign,e.Sign=h.Sign,e.createVerify=h.createVerify,e.Verify=h.Verify,e.createECDH=r(95363);var c=r(8493);e.publicEncrypt=c.publicEncrypt,e.privateEncrypt=c.privateEncrypt,e.publicDecrypt=c.publicDecrypt,e.privateDecrypt=c.privateDecrypt;var f=r(69631);e.randomFill=f.randomFill,e.randomFillSync=f.randomFillSync,e.createCredentials=function(){throw new Error([\"sorry, createCredentials is not implemented yet\",\"we accept pull requests\",\"https://github.com/crypto-browserify/crypto-browserify\"].join(\"\\n\"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},25130:(t,e,r)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+e[0]+(this.useColors?\"%c \":\" \")+\"+\"+t.exports.humanize(this.diff),!this.useColors)return;const r=\"color: \"+this.color;e.splice(1,0,r,\"color: inherit\");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{\"%%\"!==t&&(n++,\"%c\"===t&&(i=n))})),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem(\"debug\",t):e.storage.removeItem(\"debug\")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem(\"debug\")}catch(t){}!t&&\"undefined\"!=typeof process&&\"env\"in process&&(t=\"false\");return t},e.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&(\"renderer\"===window.process.type||window.process.__nwjs))return!0;if(\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let t;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))&&parseInt(t[1],10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"))}})(),e.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"],e.log=console.debug||console.log||(()=>{}),t.exports=r(87123)(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}}},87123:(t,e,r)=>{t.exports=function(t){function e(t){let r,i,o,s=null;function a(...t){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,t[0]=e.coerce(t[0]),\"string\"!=typeof t[0]&&t.unshift(\"%O\");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if(\"%%\"===r)return\"%\";s++;const o=e.formatters[i];if(\"function\"==typeof o){const e=t[s];r=o.call(n,e),t.splice(s,1),s--}return r})),e.formatArgs.call(n,t);(n.log||e.log).apply(n,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=n,a.destroy=e.destroy,Object.defineProperty(a,\"enabled\",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),\"function\"==typeof e.init&&e.init(a),a}function n(t,r){const n=e(this.namespace+(void 0===r?\":\":r)+t);return n.log=this.log,n}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\\.\\*\\?$/,\"*\")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>\"-\"+t))].join(\",\");return e.enable(\"\"),t},e.enable=function(t){let r;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const n=(\"string\"==typeof t?t:\"\").split(/[\\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&(\"-\"===(t=n[r].replace(/\\*/g,\".*?\"))[0]?e.skips.push(new RegExp(\"^\"+t.slice(1)+\"$\")):e.names.push(new RegExp(\"^\"+t+\"$\")))},e.enabled=function(t){if(\"*\"===t[t.length-1])return!0;let r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(11378),e.destroy=function(){console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\")},Object.keys(t).forEach((r=>{e[r]=t[r]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}},75195:(t,e,r)=>{\"use strict\";var n=r(70999),i=r(48342),o=r(5408),s=r(50326);t.exports=function(t,e,r){if(!t||\"object\"!=typeof t&&\"function\"!=typeof t)throw new o(\"`obj` must be an object or a function`\");if(\"string\"!=typeof e&&\"symbol\"!=typeof e)throw new o(\"`property` must be a string or a symbol`\");if(arguments.length>3&&\"boolean\"!=typeof arguments[3]&&null!==arguments[3])throw new o(\"`nonEnumerable`, if provided, must be a boolean or null\");if(arguments.length>4&&\"boolean\"!=typeof arguments[4]&&null!==arguments[4])throw new o(\"`nonWritable`, if provided, must be a boolean or null\");if(arguments.length>5&&\"boolean\"!=typeof arguments[5]&&null!==arguments[5])throw new o(\"`nonConfigurable`, if provided, must be a boolean or null\");if(arguments.length>6&&\"boolean\"!=typeof arguments[6])throw new o(\"`loose`, if provided, must be a boolean\");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!s&&s(t,e);if(n)n(t,e,{configurable:null===h&&f?f.configurable:!h,enumerable:null===a&&f?f.enumerable:!a,value:r,writable:null===u&&f?f.writable:!u});else{if(!c&&(a||u||h))throw new i(\"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.\");t[e]=r}}},84387:(t,e,r)=>{\"use strict\";e.utils=r(94112),e.Cipher=r(43639),e.DES=r(4225),e.CBC=r(59692),e.EDE=r(4335)},59692:(t,e,r)=>{\"use strict\";var n=r(79561),i=r(91285),o={};function s(t){n.equal(t.length,8,\"Invalid IV length\"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n<r.length;n++){var s=r[n];e.prototype[s]=o[s]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if(\"encrypt\"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=t[e+a];o._update.call(this,s,0,r,n);for(a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{o._update.call(this,t,e,r,n);for(a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=t[e+a]}}},43639:(t,e,r)=>{\"use strict\";var n=r(79561);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:\"decrypt\"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r=\"encrypt\"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,\"Not enough data to decrypt\");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},4225:(t,e,r)=>{\"use strict\";var n=r(79561),i=r(91285),o=r(94112),s=r(43639);function a(){this.tmp=new Array(2),this.keys=null}function u(t){s.call(this,t);var e=new a;this._desState=e,this.deriveKeys(e,t.key)}i(u,s),t.exports=u,u.create=function(t){return new u(t)};var h=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,\"Invalid key length\");var r=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var s=0;s<t.keys.length;s+=2){var a=h[s>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,t.keys,s)}},u.prototype._update=function(t,e,r,n){var i=this._desState,s=o.readUInt32BE(t,e),a=o.readUInt32BE(t,e+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],\"encrypt\"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},u.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,r,n,i){for(var s=e,a=r,u=0;u<t.keys.length;u+=2){var h=t.keys[u],c=t.keys[u+1];o.expand(a,t.tmp,0),h^=t.tmp[0],c^=t.tmp[1];var f=o.substitute(h,c),l=a;a=(s^o.permute(f))>>>0,s=l}o.rip(a,s,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var s=r,a=e,u=t.keys.length-2;u>=0;u-=2){var h=t.keys[u],c=t.keys[u+1];o.expand(s,t.tmp,0),h^=t.tmp[0],c^=t.tmp[1];var f=o.substitute(h,c),l=s;s=(a^o.permute(f))>>>0,a=l}o.rip(s,a,n,i)}},4335:(t,e,r)=>{\"use strict\";var n=r(79561),i=r(91285),o=r(43639),s=r(4225);function a(t,e){n.equal(e.length,24,\"Invalid key length\");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers=\"encrypt\"===t?[s.create({type:\"encrypt\",key:r}),s.create({type:\"decrypt\",key:i}),s.create({type:\"encrypt\",key:o})]:[s.create({type:\"decrypt\",key:o}),s.create({type:\"encrypt\",key:i}),s.create({type:\"decrypt\",key:r})]}function u(t){o.call(this,t);var e=new a(this.type,this.options.key);this._edeState=e}i(u,o),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},94112:(t,e)=>{\"use strict\";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+s&1,i<<=1,i|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,s=0,a=r.length>>>1,u=0;u<a;u++)o<<=1,o|=t>>>r[u]&1;for(u=a;u<r.length;u++)s<<=1,s|=e>>>r[u]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(t>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)]}return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r<i.length;r++)e<<=1,e|=t>>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n=\"0\"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(\" \")}},67602:(t,e,r)=>{var n=r(48834).Buffer,i=r(32808),o=r(23418),s=r(30767);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new n(o[t].prime,\"hex\"),r=new n(o[t].gen,\"hex\");return new s(e,r)},e.createDiffieHellman=e.DiffieHellman=function t(e,r,o,u){return n.isBuffer(r)||void 0===a[r]?t(e,\"binary\",r,o):(r=r||\"binary\",u=u||\"binary\",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),\"number\"==typeof e?new s(i(e,o),o,!0):(n.isBuffer(e)||(e=new n(e,r)),new s(e,o,!0)))}},30767:(t,e,r)=>{var n=r(48834).Buffer,i=r(3908),o=new(r(46676)),s=new i(24),a=new i(11),u=new i(10),h=new i(3),c=new i(7),f=r(32808),l=r(95003);function d(t,e){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),this._pub=new i(t),this}function p(t,e){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),this._priv=new i(t),this}t.exports=g;var m={};function g(t,e,r){this.setGenerator(e),this.__prime=new i(t),this._prime=i.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function y(t,e){var r=new n(t.toArray());return e?r.toString(e):r}Object.defineProperty(g.prototype,\"verifyError\",{enumerable:!0,get:function(){return\"number\"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString(\"hex\"),n=[r,t.toString(16)].join(\"_\");if(n in m)return m[n];var i,l=0;if(t.isEven()||!f.simpleSieve||!f.fermatTest(t)||!o.test(t))return l+=1,l+=\"02\"===r||\"05\"===r?8:4,m[n]=l,l;switch(o.test(t.shrn(1))||(l+=2),r){case\"02\":t.mod(s).cmp(a)&&(l+=8);break;case\"05\":(i=t.mod(u)).cmp(h)&&i.cmp(c)&&(l+=8);break;default:l+=4}return m[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new i(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(t){var e=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(e.toArray()),o=this.getPrime();if(r.length<o.length){var s=new n(o.length-r.length);s.fill(0),r=n.concat([s,r])}return r},g.prototype.getPublicKey=function(t){return y(this._pub,t)},g.prototype.getPrivateKey=function(t){return y(this._priv,t)},g.prototype.getPrime=function(t){return y(this.__prime,t)},g.prototype.getGenerator=function(t){return y(this._gen,t)},g.prototype.setGenerator=function(t,e){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),this.__gen=t,this._gen=new i(t),this}},32808:(t,e,r)=>{var n=r(95003);t.exports=b,b.simpleSieve=g,b.fermatTest=y;var i=r(3908),o=new i(24),s=new(r(46676)),a=new i(1),u=new i(2),h=new i(5),c=(new i(16),new i(8),new i(10)),f=new i(3),l=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return p=t,t}function g(t){for(var e=m(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function y(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function b(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,p;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(h))for(;r.mod(c).cmp(f);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&y(p)&&y(r)&&s.test(p)&&s.test(r))return r}}},3908:function(t,e,r){!function(t,e){\"use strict\";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(20395).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}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,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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.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},o.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var c=[\"\",\"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\"],f=[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],l=[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 d(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);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+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)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){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\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},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 p=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,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>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,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))<<13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(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)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(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)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(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)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(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)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(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)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;h=((o=o+Math.imul(M,mt)|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(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=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(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))<<13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=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(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=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(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(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()}(this,t,e):m(this,t,e),r},g.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},g.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},g.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]]},g.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],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.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},g.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}},g.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},g.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))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.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),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),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]&1<<i)>>>i}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.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(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.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},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,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=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,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 E(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 y={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(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){E.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.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},v.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(w,b),i(M,b),i(_,b),_.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(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.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\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.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)},E.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},E.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)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.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 m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.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},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),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)},87554:(t,e,r)=>{\"use strict\";var n=e;n.version=r(40763).i8,n.utils=r(18288),n.rand=r(82745),n.curve=r(82284),n.curves=r(41479),n.ec=r(38596),n.eddsa=r(39208)},48919:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(18288),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error(\"Not implemented\")},u.prototype.validate=function(){throw new Error(\"Not implemented\")},u.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,u,h=[];for(s=0;s<n.length;s+=r.step){u=0;for(var c=s+r.step-1;c>=s;c--)u=(u<<1)+n[c];h.push(u)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s<h.length;s++)(u=h[s])===d?l=l.mixedAdd(r.points[s]):u===-d&&(l=l.mixedAdd(r.points[s].neg()));f=f.add(l)}return f.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r,this._bitLength),u=this.jpoint(null,null,null),h=s.length-1;h>=0;h--){for(var c=0;h>=0&&0===s[h];h--)c++;if(h>=0&&c++,u=u.dblp(c),h<0)break;var f=s[h];a(0!==f),u=\"affine\"===t.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return\"affine\"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var a,u,h,c=this._wnafT1,f=this._wnafT2,l=this._wnafT3,d=0;for(a=0;a<n;a++){var p=(h=e[a])._getNAFPoints(t);c[a]=p.wnd,f[a]=p.points}for(a=n-1;a>=1;a-=2){var m=a-1,g=a;if(1===c[m]&&1===c[g]){var y=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(y[1]=e[m].add(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].add(e[g].neg())):(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[m],r[g]);for(d=Math.max(v[0].length,d),l[m]=new Array(d),l[g]=new Array(d),u=0;u<d;u++){var w=0|v[0][u],M=0|v[1][u];l[m][u]=b[3*(w+1)+(M+1)],l[g][u]=0,f[m]=y}}else l[m]=o(r[m],c[m],this._bitLength),l[g]=o(r[g],c[g],this._bitLength),d=Math.max(l[m].length,d),d=Math.max(l[g].length,d)}var _=this.jpoint(null,null,null),E=this._wnafT4;for(a=d;a>=0;a--){for(var A=0;a>=0;){var S=!0;for(u=0;u<n;u++)E[u]=0|l[u][a],0!==E[u]&&(S=!1);if(!S)break;A++,a--}if(a>=0&&A++,_=_.dblp(A),a<0)break;for(u=0;u<n;u++){var x=E[u];0!==x&&(x>0?h=f[u][x-1>>1]:x<0&&(h=f[u][-x-1>>1].neg()),_=\"affine\"===h.type?_.mixedAdd(h):_.add(h))}}for(a=0;a<n;a++)f[a]=null;return i?_:_.toP()},u.BasePoint=h,h.prototype.eq=function(){throw new Error(\"Not implemented\")},h.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error(\"Unknown point format\")},h.prototype.encodeCompressed=function(t){return this.encode(t,!0)},h.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray(\"be\",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray(\"be\",e))},h.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},h.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},h.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},h.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},h.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},h.prototype._getBeta=function(){return null},h.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},37105:(t,e,r)=>{\"use strict\";var n=r(18288),i=r(72140),o=r(91285),s=r(48919),a=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,\"edwards\",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function h(t,e,r,n,o){s.BasePoint.call(this,t,\"projective\"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error(\"invalid point\");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error(\"invalid point\");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error(\"invalid point\");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(h,s.BasePoint),u.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new h(this,t,e,r,n)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.prototype.inspect=function(){return this.isInfinity()?\"<EC Point Infinity>\":\"<EC Point x: \"+this.x.fromRed().toString(16,2)+\" y: \"+this.y.fromRed().toString(16,2)+\" z: \"+this.z.fromRed().toString(16,2)+\">\"},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),u=i.redMul(s),h=o.redMul(a),c=i.redMul(a),f=s.redMul(o);return this.curve.point(u,h,f,c)},h.prototype._projDbl=function(){var t,e,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var h=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(t=s.redSub(a).redSub(u).redMul(h.redSub(this.curve.two)),e=h.redMul(n.redSub(u)),r=h.redSqr().redSub(h).redSub(h)):(i=this.z.redSqr(),o=h.redSub(i).redISub(i),t=s.redSub(a).redISub(u).redMul(o),e=h.redMul(n.redSub(u)),r=h.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(t,e,r)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(e),h=o.redMul(s),c=a.redMul(u),f=o.redMul(u),l=s.redMul(a);return this.curve.point(h,c,l,f)},h.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),h=i.redAdd(a),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),f=n.redMul(u).redMul(c);return this.curve.twisted?(e=n.redMul(h).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(h)):(e=n.redMul(h).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(h)),this.curve.point(f,e,r)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},h.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},82284:(t,e,r)=>{\"use strict\";var n=e;n.base=r(48919),n.short=r(27715),n.mont=r(95125),n.edwards=r(37105)},95125:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(91285),o=r(48919),s=r(18288);function a(t){o.call(this,\"mont\",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,\"projective\"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new u(this,t,e)},a.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray(\"be\",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?\"<EC Point Infinity>\":\"<EC Point x: \"+this.x.fromRed().toString(16,2)+\" z: \"+this.z.fromRed().toString(16,2)+\">\"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.jumlAdd=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},27715:(t,e,r)=>{\"use strict\";var n=r(18288),i=r(72140),o=r(91285),s=r(48919),a=n.assert;function u(t){s.call(this,\"short\",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function h(t,e,r,n){s.BasePoint.call(this,t,\"affine\"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(t,e,r,n){s.BasePoint.call(this,t,\"jacobian\"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,u,h,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,d=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),y=new i(1),b=0;0!==l.cmpn(0);){var v=d.div(l);h=d.sub(v.mul(l)),c=g.sub(v.mul(p));var w=y.sub(v.mul(m));if(!n&&h.cmp(f)<0)e=u.neg(),r=p,n=h.neg(),o=c;else if(n&&2==++b)break;u=h,d=l,l=h,g=p,p=c,y=m,m=w}s=h.neg(),a=c;var M=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(M)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),h=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(h).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error(\"invalid point\");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var h=this._wnafMulAdd(1,n,i,2*o,r),c=0;c<2*o;c++)n[c]=null,i[c]=null;return h},o(h,s.BasePoint),u.prototype.point=function(t,e,r){return new h(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return h.fromJSON(this,t,e)},h.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},h.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},h.fromJSON=function(t,e,r){\"string\"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},h.prototype.inspect=function(){return this.isInfinity()?\"<EC Point Infinity>\":\"<EC Point x: \"+this.x.fromRed().toString(16,2)+\" y: \"+this.y.fromRed().toString(16,2)+\">\"},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},h.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},h.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},h.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,s.BasePoint),u.prototype.jpoint=function(t,e,r){return new c(this,t,e,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=a.redSqr(),c=h.redMul(a),f=n.redMul(h),l=u.redSqr().redIAdd(c).redISub(f).redISub(f),d=u.redMul(f.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(l,d,p)},c.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),h=u.redMul(s),c=r.redMul(u),f=a.redSqr().redIAdd(h).redISub(c).redISub(c),l=a.redMul(c.redISub(f)).redISub(i.redMul(h)),d=this.z.redMul(s);return this.curve.jpoint(f,l,d)},c.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),h=s.redAdd(s);for(e=0;e<t;e++){var c=o.redSqr(),f=h.redSqr(),l=f.redSqr(),d=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(u)),p=o.redMul(f),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(l);var b=h.redMul(a);e+1<t&&(u=u.redMul(l)),o=m,a=b,h=y}return this.curve.jpoint(o,h.redMul(i),a)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),t=u,e=a.redMul(s.redISub(u)).redISub(h),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),f=this.y.redSqr(),l=f.redSqr(),d=this.x.redAdd(f).redSqr().redISub(c).redISub(l);d=d.redIAdd(d);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=l.redIAdd(l);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},c.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),e=a.redMul(s.redISub(u)).redISub(h),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),f=this.y.redSqr(),l=this.x.redMul(f),d=this.x.redSub(c).redMul(this.x.redAdd(c));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(c);var g=f.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},c.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),h=(u=u.redIAdd(u)).redMul(s),c=a.redSqr().redISub(h.redAdd(h)),f=h.redISub(c),l=s.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=a.redMul(f).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,d,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var h=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),c=e.redMul(h);c=(c=c.redIAdd(c)).redIAdd(c);var f=this.x.redMul(a).redISub(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.y.redMul(h.redMul(u.redISub(h)).redISub(s.redMul(a)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(f,l,d)},c.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},c.prototype.eq=function(t){if(\"affine\"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},c.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?\"<EC JPoint Infinity>\":\"<EC JPoint x: \"+this.x.toString(16,2)+\" y: \"+this.y.toString(16,2)+\" z: \"+this.z.toString(16,2)+\">\"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},41479:(t,e,r)=>{\"use strict\";var n,i=e,o=r(34485),s=r(82284),a=r(18288).assert;function u(t){\"short\"===t.type?this.curve=new s.short(t):\"edwards\"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),\"Invalid curve\"),a(this.g.mul(this.n).isInfinity(),\"Invalid curve, G*N != O\")}function h(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,h(\"p192\",{type:\"short\",prime:\"p192\",p:\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\",a:\"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc\",b:\"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1\",n:\"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831\",hash:o.sha256,gRed:!1,g:[\"188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012\",\"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811\"]}),h(\"p224\",{type:\"short\",prime:\"p224\",p:\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\",a:\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe\",b:\"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4\",n:\"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d\",hash:o.sha256,gRed:!1,g:[\"b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21\",\"bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34\"]}),h(\"p256\",{type:\"short\",prime:null,p:\"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff\",a:\"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc\",b:\"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b\",n:\"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551\",hash:o.sha256,gRed:!1,g:[\"6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296\",\"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5\"]}),h(\"p384\",{type:\"short\",prime:null,p:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff\",a:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc\",b:\"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef\",n:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973\",hash:o.sha384,gRed:!1,g:[\"aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7\",\"3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f\"]}),h(\"p521\",{type:\"short\",prime:null,p:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff\",a:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc\",b:\"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00\",n:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409\",hash:o.sha512,gRed:!1,g:[\"000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66\",\"00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650\"]}),h(\"curve25519\",{type:\"mont\",prime:\"p25519\",p:\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",a:\"76d06\",b:\"1\",n:\"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",hash:o.sha256,gRed:!1,g:[\"9\"]}),h(\"ed25519\",{type:\"edwards\",prime:\"p25519\",p:\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",a:\"-1\",c:\"1\",d:\"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3\",n:\"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",hash:o.sha256,gRed:!1,g:[\"216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\",\"6666666666666666666666666666666666666666666666666666666666666658\"]});try{n=r(47983)}catch(t){n=void 0}h(\"secp256k1\",{type:\"short\",prime:\"k256\",p:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\",a:\"0\",b:\"7\",n:\"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141\",h:\"1\",hash:o.sha256,beta:\"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\",lambda:\"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\",basis:[{a:\"3086d221a7d46bcde86c90e49284eb15\",b:\"-e4437ed6010e88286f547fa90abfe4c3\"},{a:\"114ca50f7a8e2f3f657c1108d9d44cfd8\",b:\"3086d221a7d46bcde86c90e49284eb15\"}],gRed:!1,g:[\"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\",n]})},38596:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(78873),o=r(18288),s=r(41479),a=r(82745),u=o.assert,h=r(22307),c=r(71798);function f(t){if(!(this instanceof f))return new f(t);\"string\"==typeof t&&(u(Object.prototype.hasOwnProperty.call(s,t),\"Unknown curve \"+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=f,f.prototype.keyPair=function(t){return new h(this,t)},f.prototype.keyFromPrivate=function(t,e){return h.fromPrivate(this,t,e)},f.prototype.keyFromPublic=function(t,e){return h.fromPublic(this,t,e)},f.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||\"utf8\",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||\"utf8\",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(t,e,r){var i;if(n.isBN(t)||\"number\"==typeof t)i=(t=new n(t,16)).byteLength();else if(\"object\"==typeof t)i=t.length,t=new n(t,16);else{var o=t.toString();i=o.length+1>>>1,t=new n(o,16)}\"number\"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},f.prototype.sign=function(t,e,r,o){if(\"object\"==typeof r&&(o=r,r=null),o||(o={}),\"string\"!=typeof t&&\"number\"!=typeof t&&!n.isBN(t)){u(\"object\"==typeof t&&t&&\"number\"==typeof t.length,\"Expected message to be an array-like, a hex string, or a BN instance\"),u(t.length>>>0===t.length);for(var s=0;s<t.length;s++)u((255&t[s])===t[s])}e=this.keyFromPrivate(e,r),t=this._truncateToN(t,!1,o.msgBitLength),u(!t.isNeg(),\"Can not sign a negative message\");var a=this.n.byteLength(),h=e.getPrivate().toArray(\"be\",a),f=t.toArray(\"be\",a);u(new n(f).eq(t),\"Can not sign message\");for(var l=new i({hash:this.hash,entropy:h,nonce:f,pers:o.pers,persEnc:o.persEnc||\"utf8\"}),d=this.n.sub(new n(1)),p=0;;p++){var m=o.k?o.k(p):new n(l.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(d)>=0)){var g=this.g.mul(m);if(!g.isInfinity()){var y=g.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var v=m.invm(this.n).mul(b.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var w=(g.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),w^=1),new c({r:b,s:v,recoveryParam:w})}}}}}},f.prototype.verify=function(t,e,r,n,i){i||(i={}),t=this._truncateToN(t,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var o=(e=new c(e,\"hex\")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),h=u.mul(t).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(h,r.getPublic(),f)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(h,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,\"The recovery param is more than two bits\"),e=new c(e,i);var o=this.n,s=new n(t),a=e.r,h=e.s,f=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error(\"Unable to find sencond key candinate\");a=l?this.curve.pointFromX(a.add(this.curve.n),f):this.curve.pointFromX(a,f);var d=e.r.invm(o),p=o.sub(s).mul(d).umod(o),m=h.mul(d).umod(o);return this.g.mulAdd(p,a,m)},f.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new c(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error(\"Unable to find valid recovery factor\")}},22307:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(18288).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:\"Invalid public key\"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:\"Public key * N != O\"}:{result:!1,reason:\"Public key is not a point\"}},o.prototype.getPublic=function(t,e){return\"string\"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return\"hex\"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return\"mont\"===this.ec.curve.type?i(t.x,\"Need x coordinate\"):\"short\"!==this.ec.curve.type&&\"edwards\"!==this.ec.curve.type||i(t.x&&t.y,\"Need both x and y coordinate\"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),\"public point not validated\"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e,r){return this.ec.verify(t,e,this,void 0,r)},o.prototype.inspect=function(){return\"<Key priv: \"+(this.priv&&this.priv.toString(16,2))+\" pub: \"+(this.pub&&this.pub.inspect())+\" >\"}},71798:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(18288),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,\"Signature without r or s\"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===t[e.place])return!1;for(var i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function h(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function c(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=u(t,r);if(!1===s)return!1;if(0!=(128&t[r.place]))return!1;var h=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var c=u(t,r);if(!1===c)return!1;if(t.length!==c+r.place)return!1;if(0!=(128&t[r.place]))return!1;var f=t.slice(r.place,c+r.place);if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(h),this.s=new n(f),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=h(e),r=h(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,e.length),(n=n.concat(e)).push(2),c(n,r.length);var o=n.concat(r),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,t)}},39208:(t,e,r)=>{\"use strict\";var n=r(34485),i=r(41479),o=r(18288),s=o.assert,a=o.parseBytes,u=r(851),h=r(6117);function c(t){if(s(\"ed25519\"===t,\"only tested with ed25519 so far\"),!(this instanceof c))return new c(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=c,c.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},c.prototype.verify=function(t,e,r){if(t=a(t),(e=this.makeSignature(e)).S().gte(e.eddsa.curve.n)||e.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},c.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},c.prototype.makeSignature=function(t){return t instanceof h?t:new h(this,t)},c.prototype.encodePoint=function(t){var e=t.getY().toArray(\"le\",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},c.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},c.prototype.encodeInt=function(t){return t.toArray(\"le\",this.encodingLength)},c.prototype.decodeInt=function(t){return o.intFromLE(t)},c.prototype.isPoint=function(t){return t instanceof this.pointClass}},851:(t,e,r)=>{\"use strict\";var n=r(18288),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,\"pubBytes\",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,\"pub\",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,\"privBytes\",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,\"priv\",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,\"hash\",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,\"messagePrefix\",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,\"KeyPair can only verify\"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,\"KeyPair is public only\"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},6117:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(18288),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,\"object\"!=typeof e&&(e=a(e)),Array.isArray(e)&&(o(e.length===2*t.encodingLength,\"Signature has invalid size\"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,\"Signature without R or S\"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,\"S\",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,\"R\",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,\"Rencoded\",(function(){return this.eddsa.encodePoint(this.R())})),s(u,\"Sencoded\",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),\"hex\").toUpperCase()},t.exports=u},47983:t=>{t.exports={doubles:{step:4,points:[[\"e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a\",\"f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821\"],[\"8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508\",\"11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf\"],[\"175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739\",\"d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695\"],[\"363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640\",\"4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9\"],[\"8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c\",\"4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36\"],[\"723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda\",\"96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f\"],[\"eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa\",\"5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999\"],[\"100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0\",\"cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09\"],[\"e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d\",\"9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d\"],[\"feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d\",\"e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088\"],[\"da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1\",\"9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d\"],[\"53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0\",\"5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8\"],[\"8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047\",\"10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a\"],[\"385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862\",\"283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453\"],[\"6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7\",\"7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160\"],[\"3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd\",\"56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0\"],[\"85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83\",\"7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6\"],[\"948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a\",\"53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589\"],[\"6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8\",\"bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17\"],[\"e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d\",\"4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda\"],[\"e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725\",\"7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd\"],[\"213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754\",\"4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2\"],[\"4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c\",\"17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6\"],[\"fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6\",\"6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f\"],[\"76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39\",\"c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01\"],[\"c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891\",\"893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3\"],[\"d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b\",\"febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f\"],[\"b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03\",\"2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7\"],[\"e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d\",\"eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78\"],[\"a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070\",\"7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1\"],[\"90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4\",\"e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150\"],[\"8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da\",\"662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82\"],[\"e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11\",\"1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc\"],[\"8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e\",\"efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b\"],[\"e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41\",\"2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51\"],[\"b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef\",\"67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45\"],[\"d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8\",\"db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120\"],[\"324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d\",\"648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84\"],[\"4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96\",\"35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d\"],[\"9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd\",\"ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d\"],[\"6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5\",\"9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8\"],[\"a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266\",\"40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8\"],[\"7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71\",\"34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac\"],[\"928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac\",\"c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f\"],[\"85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751\",\"1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962\"],[\"ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e\",\"493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907\"],[\"827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241\",\"c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec\"],[\"eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3\",\"be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d\"],[\"e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f\",\"4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414\"],[\"1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19\",\"aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd\"],[\"146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be\",\"b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0\"],[\"fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9\",\"6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811\"],[\"da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2\",\"8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1\"],[\"a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13\",\"7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c\"],[\"174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c\",\"ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73\"],[\"959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba\",\"2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd\"],[\"d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151\",\"e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405\"],[\"64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073\",\"d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589\"],[\"8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458\",\"38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e\"],[\"13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b\",\"69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27\"],[\"bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366\",\"d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1\"],[\"8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa\",\"40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482\"],[\"8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0\",\"620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945\"],[\"dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787\",\"7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573\"],[\"f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e\",\"ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82\"]]},naf:{wnd:7,points:[[\"f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9\",\"388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672\"],[\"2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4\",\"d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6\"],[\"5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc\",\"6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da\"],[\"acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe\",\"cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37\"],[\"774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb\",\"d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b\"],[\"f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8\",\"ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81\"],[\"d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e\",\"581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58\"],[\"defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34\",\"4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77\"],[\"2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c\",\"85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a\"],[\"352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5\",\"321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c\"],[\"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f\",\"2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67\"],[\"9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714\",\"73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402\"],[\"daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729\",\"a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55\"],[\"c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db\",\"2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482\"],[\"6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4\",\"e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82\"],[\"1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5\",\"b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396\"],[\"605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479\",\"2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49\"],[\"62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d\",\"80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf\"],[\"80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f\",\"1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a\"],[\"7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb\",\"d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7\"],[\"d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9\",\"eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933\"],[\"49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963\",\"758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a\"],[\"77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74\",\"958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6\"],[\"f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530\",\"e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37\"],[\"463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b\",\"5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e\"],[\"f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247\",\"cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6\"],[\"caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1\",\"cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476\"],[\"2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120\",\"4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40\"],[\"7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435\",\"91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61\"],[\"754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18\",\"673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683\"],[\"e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8\",\"59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5\"],[\"186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb\",\"3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b\"],[\"df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f\",\"55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417\"],[\"5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143\",\"efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868\"],[\"290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba\",\"e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a\"],[\"af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45\",\"f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6\"],[\"766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a\",\"744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996\"],[\"59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e\",\"c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e\"],[\"f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8\",\"e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d\"],[\"7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c\",\"30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2\"],[\"948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519\",\"e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e\"],[\"7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab\",\"100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437\"],[\"3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca\",\"ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311\"],[\"d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf\",\"8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4\"],[\"1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610\",\"68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575\"],[\"733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4\",\"f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d\"],[\"15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c\",\"d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d\"],[\"a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940\",\"edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629\"],[\"e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980\",\"a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06\"],[\"311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3\",\"66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374\"],[\"34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf\",\"9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee\"],[\"f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63\",\"4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1\"],[\"d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448\",\"fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b\"],[\"32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf\",\"5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661\"],[\"7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5\",\"8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6\"],[\"ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6\",\"8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e\"],[\"16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5\",\"5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d\"],[\"eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99\",\"f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc\"],[\"78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51\",\"f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4\"],[\"494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5\",\"42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c\"],[\"a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5\",\"204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b\"],[\"c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997\",\"4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913\"],[\"841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881\",\"73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154\"],[\"5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5\",\"39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865\"],[\"36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66\",\"d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc\"],[\"336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726\",\"ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224\"],[\"8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede\",\"6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e\"],[\"1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94\",\"60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6\"],[\"85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31\",\"3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511\"],[\"29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51\",\"b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b\"],[\"a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252\",\"ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2\"],[\"4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5\",\"cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c\"],[\"d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b\",\"6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3\"],[\"ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4\",\"322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d\"],[\"af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f\",\"6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700\"],[\"e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889\",\"2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4\"],[\"591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246\",\"b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196\"],[\"11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984\",\"998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4\"],[\"3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a\",\"b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257\"],[\"cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030\",\"bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13\"],[\"c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197\",\"6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096\"],[\"c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593\",\"c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38\"],[\"a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef\",\"21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f\"],[\"347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38\",\"60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448\"],[\"da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a\",\"49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a\"],[\"c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111\",\"5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4\"],[\"4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502\",\"7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437\"],[\"3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea\",\"be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7\"],[\"cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26\",\"8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d\"],[\"b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986\",\"39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a\"],[\"d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e\",\"62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54\"],[\"48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4\",\"25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77\"],[\"dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda\",\"ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517\"],[\"6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859\",\"cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10\"],[\"e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f\",\"f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125\"],[\"eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c\",\"6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e\"],[\"13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942\",\"fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1\"],[\"ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a\",\"1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2\"],[\"b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80\",\"5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423\"],[\"ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d\",\"438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8\"],[\"8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1\",\"cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758\"],[\"52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63\",\"c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375\"],[\"e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352\",\"6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d\"],[\"7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193\",\"ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec\"],[\"5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00\",\"9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0\"],[\"32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58\",\"ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c\"],[\"e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7\",\"d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4\"],[\"8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8\",\"c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f\"],[\"4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e\",\"67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649\"],[\"3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d\",\"cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826\"],[\"674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b\",\"299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5\"],[\"d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f\",\"f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87\"],[\"30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6\",\"462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b\"],[\"be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297\",\"62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc\"],[\"93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a\",\"7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c\"],[\"b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c\",\"ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f\"],[\"d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52\",\"4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a\"],[\"d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb\",\"bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46\"],[\"463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065\",\"bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f\"],[\"7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917\",\"603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03\"],[\"74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9\",\"cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08\"],[\"30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3\",\"553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8\"],[\"9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57\",\"712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373\"],[\"176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66\",\"ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3\"],[\"75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8\",\"9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8\"],[\"809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721\",\"9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1\"],[\"1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180\",\"4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9\"]]}}},18288:(t,e,r)=>{\"use strict\";var n=e,i=r(72140),o=r(79561),s=r(43022);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n,i=new Array(Math.max(t.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<e+1,s=t.clone();for(n=0;n<i.length;n++){var a,u=s.andln(o-1);s.isOdd()?(a=u>(o>>1)-1?(o>>1)-u:u,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,h=e.andln(3)+o&3;3===u&&(u=-1),3===h&&(h=-1),s=0==(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==h?u:-u,r[0].push(s),a=0==(1&h)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?h:-h,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n=\"_\"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return\"string\"==typeof t?n.toArray(t,\"hex\"):t},n.intFromLE=function(t){return new i(t,\"hex\",\"le\")}},72140:function(t,e,r){!function(t,e){\"use strict\";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(30488).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}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,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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.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},o.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var c=[\"\",\"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\"],f=[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],l=[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 d(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);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+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)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){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\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},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 p=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,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>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,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))<<13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(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)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(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)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(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)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(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)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(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)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;h=((o=o+Math.imul(M,mt)|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(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=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(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))<<13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=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(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=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(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(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()}(this,t,e):m(this,t,e),r},g.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},g.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},g.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]]},g.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],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.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},g.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}},g.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},g.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))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.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),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),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]&1<<i)>>>i}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.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(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.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},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,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=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,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 E(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 y={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(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){E.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.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},v.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(w,b),i(M,b),i(_,b),_.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(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.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\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.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)},E.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},E.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)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.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 m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.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},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),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)},70999:(t,e,r)=>{\"use strict\";var n=r(67286)(\"%Object.defineProperty%\",!0)||!1;if(n)try{n({},\"a\",{value:1})}catch(t){n=!1}t.exports=n},69654:t=>{\"use strict\";t.exports=EvalError},42321:t=>{\"use strict\";t.exports=Error},48205:t=>{\"use strict\";t.exports=RangeError},2976:t=>{\"use strict\";t.exports=ReferenceError},48342:t=>{\"use strict\";t.exports=SyntaxError},5408:t=>{\"use strict\";t.exports=TypeError},82885:t=>{\"use strict\";t.exports=URIError},1115:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.keccak512=e.keccak384=e.keccak256=e.keccak224=void 0;const n=r(73488),i=r(10144);e.keccak224=(0,i.wrapHash)(n.keccak_224),e.keccak256=(()=>{const t=(0,i.wrapHash)(n.keccak_256);return t.create=n.keccak_256.create,t})(),e.keccak384=(0,i.wrapHash)(n.keccak_384),e.keccak512=(0,i.wrapHash)(n.keccak_512)},91839:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function n(t){if(\"boolean\"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function i(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function o(t,...e){if(!i(t))throw new Error(\"Uint8Array expected\");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function s(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(t.outputLen),r(t.blockLen)}function a(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function u(t,e){o(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=e.isBytes=void 0,e.number=r,e.bool=n,e.isBytes=i,e.bytes=o,e.hash=s,e.exists=a,e.output=u;const h={number:r,bool:n,bytes:o,hash:s,exists:a,output:u};e.default=h},91116:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.HashMD=e.Maj=e.Chi=void 0;const n=r(91839),i=r(50300);e.Chi=(t,e,r)=>t&e^~t&r;e.Maj=(t,e,r)=>t&e^t&r^e&r;class o extends i.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.createView)(this.buffer)}update(t){(0,n.exists)(this);const{view:e,buffer:r,blockLen:o}=this,s=(t=(0,i.toBytes)(t)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(t.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(e,0),this.pos=0);else{const e=(0,i.createView)(t);for(;o<=s-n;n+=o)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.exists)(this),(0,n.output)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let t=a;t<o;t++)e[t]=0;!function(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(t),h=this.outputLen;if(h%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=h/4,f=this.get();if(c>f.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t<c;t++)u.setUint32(4*t,f[t],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}e.HashMD=o},2426:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.add5L=e.add5H=e.add4H=e.add4L=e.add3H=e.add3L=e.add=e.rotlBL=e.rotlBH=e.rotlSL=e.rotlSH=e.rotr32L=e.rotr32H=e.rotrBL=e.rotrBH=e.rotrSL=e.rotrSH=e.shrSL=e.shrSH=e.toBig=e.split=e.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(t,e=!1){return e?{h:Number(t&r),l:Number(t>>n&r)}:{h:0|Number(t>>n&r),l:0|Number(t&r)}}function o(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let o=0;o<t.length;o++){const{h:s,l:a}=i(t[o],e);[r[o],n[o]]=[s,a]}return[r,n]}e.fromBig=i,e.split=o;const s=(t,e)=>BigInt(t>>>0)<<n|BigInt(e>>>0);e.toBig=s;const a=(t,e,r)=>t>>>r;e.shrSH=a;const u=(t,e,r)=>t<<32-r|e>>>r;e.shrSL=u;const h=(t,e,r)=>t>>>r|e<<32-r;e.rotrSH=h;const c=(t,e,r)=>t<<32-r|e>>>r;e.rotrSL=c;const f=(t,e,r)=>t<<64-r|e>>>r-32;e.rotrBH=f;const l=(t,e,r)=>t>>>r-32|e<<64-r;e.rotrBL=l;const d=(t,e)=>e;e.rotr32H=d;const p=(t,e)=>t;e.rotr32L=p;const m=(t,e,r)=>t<<r|e>>>32-r;e.rotlSH=m;const g=(t,e,r)=>e<<r|t>>>32-r;e.rotlSL=g;const y=(t,e,r)=>e<<r-32|t>>>64-r;e.rotlBH=y;const b=(t,e,r)=>t<<r-32|e>>>64-r;function v(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}}e.rotlBL=b,e.add=v;const w=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0);e.add3L=w;const M=(t,e,r,n)=>e+r+n+(t/2**32|0)|0;e.add3H=M;const _=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0);e.add4L=_;const E=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0;e.add4H=E;const A=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0);e.add5L=A;const S=(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0;e.add5H=S;const x={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:u,rotrSH:h,rotrSL:c,rotrBH:f,rotrBL:l,rotr32H:d,rotr32L:p,rotlSH:m,rotlSL:g,rotlBH:y,rotlBL:b,add:v,add3L:w,add3H:M,add4L:_,add4H:E,add5H:S,add5L:A};e.default=x},44937:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=void 0,e.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},13426:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.sha224=e.sha256=void 0;const n=r(91116),i=r(50300),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class u extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=a[t-15],r=a[t-2],n=(0,i.rotr)(e,7)^(0,i.rotr)(e,18)^e>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;a[t]=o+a[t-7]+n+a[t-16]|0}let{A:r,B:s,C:u,D:h,E:c,F:f,G:l,H:d}=this;for(let t=0;t<64;t++){const e=d+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+(0,n.Chi)(c,f,l)+o[t]+a[t]|0,p=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,s,u)|0;d=l,l=f,f=c,c=h+e|0,h=u,u=s,s=r,r=e+p|0}r=r+this.A|0,s=s+this.B|0,u=u+this.C|0,h=h+this.D|0,c=c+this.E|0,f=f+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,s,u,h,c,f,l,d)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class h extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new u)),e.sha224=(0,i.wrapConstructor)((()=>new h))},73488:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.shake256=e.shake128=e.keccak_512=e.keccak_384=e.keccak_256=e.keccak_224=e.sha3_512=e.sha3_384=e.sha3_256=e.sha3_224=e.Keccak=e.keccakP=void 0;const n=r(91839),i=r(2426),o=r(50300),s=[],a=[],u=[],h=BigInt(0),c=BigInt(1),f=BigInt(2),l=BigInt(7),d=BigInt(256),p=BigInt(113);for(let t=0,e=c,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((t+1)*(t+2)/2%64);let i=h;for(let t=0;t<7;t++)e=(e<<c^(e>>l)*p)%d,e&f&&(i^=c<<(c<<BigInt(t))-c);u.push(i)}const[m,g]=(0,i.split)(u,!0),y=(t,e,r)=>r>32?(0,i.rotlBH)(t,e,r):(0,i.rotlSH)(t,e,r),b=(t,e,r)=>r>32?(0,i.rotlBL)(t,e,r):(0,i.rotlSL)(t,e,r);function v(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=y(o,s,1)^r[n],u=b(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=a[r],o=y(e,i,n),u=b(e,i,n),h=s[r];e=t[h],i=t[h+1],t[h]=o,t[h+1]=u}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=m[n],t[1]^=g[n]}r.fill(0)}e.keccakP=v;class w extends o.Hash{constructor(t,e,r,i=!1,s=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){o.isLE||(0,o.byteSwap32)(this.state32),v(this.state32,this.rounds),o.isLE||(0,o.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,n.exists)(this);const{blockLen:e,state:r}=this,i=(t=(0,o.toBytes)(t)).length;for(let n=0;n<i;){const o=Math.min(e-this.pos,i-n);for(let e=0;e<o;e++)r[this.pos++]^=t[n++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,0!=(128&e)&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){(0,n.exists)(this,!1),(0,n.bytes)(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return(0,n.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,n.output)(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new w(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}e.Keccak=w;const M=(t,e,r)=>(0,o.wrapConstructor)((()=>new w(e,t,r)));e.sha3_224=M(6,144,28),e.sha3_256=M(6,136,32),e.sha3_384=M(6,104,48),e.sha3_512=M(6,72,64),e.keccak_224=M(1,144,28),e.keccak_256=M(1,136,32),e.keccak_384=M(1,104,48),e.keccak_512=M(1,72,64);const _=(t,e,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(e,t,void 0===n.dkLen?r:n.dkLen,!0)));e.shake128=_(31,168,16),e.shake256=_(31,136,32)},50300:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const n=r(44937),i=r(91839);e.isBytes=function(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name};e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);e.rotr=(t,e)=>t<<32-e|t>>>e;e.rotl=(t,e)=>t<<e|t>>>32-e>>>0,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];e.byteSwap=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255,e.byteSwapIfBE=e.isLE?t=>t:t=>(0,e.byteSwap)(t),e.byteSwap32=function(t){for(let r=0;r<t.length;r++)t[r]=(0,e.byteSwap)(t[r])};const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));e.bytesToHex=function(t){(0,i.bytes)(t);let e=\"\";for(let r=0;r<t.length;r++)e+=o[t[r]];return e};const s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(t){return t>=s._0&&t<=s._9?t-s._0:t>=s._A&&t<=s._F?t-(s._A-10):t>=s._a&&t<=s._f?t-(s._a-10):void 0}e.hexToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=a(t.charCodeAt(i)),o=a(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n};function u(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function h(t){return\"string\"==typeof t&&(t=u(t)),(0,i.bytes)(t),t}e.nextTick=async()=>{},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o<t;o++){n(o);const t=Date.now()-i;t>=0&&t<r||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=u,e.toBytes=h,e.concatBytes=function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];(0,i.bytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r};e.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;e.checkOpts=function(t,e){if(void 0!==e&&\"[object Object]\"!==c.call(e))throw new Error(\"Options should be object or undefined\");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(h(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));throw new Error(\"crypto.getRandomValues must be defined\")}},80101:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.secp256k1=void 0;var n=r(38358);Object.defineProperty(e,\"secp256k1\",{enumerable:!0,get:function(){return n.secp256k1}})},55806:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.sha256=void 0;const n=r(13426),i=r(10144);e.sha256=(0,i.wrapHash)(n.sha256)},10144:function(t,e,r){\"use strict\";t=r.nmd(t);var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=e.utf8ToBytes=e.createView=e.concatBytes=e.toHex=e.bytesToHex=e.assertBytes=e.assertBool=void 0,e.bytesToUtf8=function(t){if(!(t instanceof Uint8Array))throw new TypeError(\"bytesToUtf8 expected Uint8Array, got \"+typeof t);return(new TextDecoder).decode(t)},e.hexToBytes=function(t){const e=t.startsWith(\"0x\")?t.substring(2):t;return(0,o.hexToBytes)(e)},e.equalsBytes=function(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},e.wrapHash=function(t){return e=>(i.default.bytes(e),t(e))};const i=n(r(91839)),o=r(50300),s=i.default.bool;e.assertBool=s;const a=i.default.bytes;e.assertBytes=a;var u=r(50300);Object.defineProperty(e,\"bytesToHex\",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(e,\"toHex\",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(e,\"concatBytes\",{enumerable:!0,get:function(){return u.concatBytes}}),Object.defineProperty(e,\"createView\",{enumerable:!0,get:function(){return u.createView}}),Object.defineProperty(e,\"utf8ToBytes\",{enumerable:!0,get:function(){return u.utf8ToBytes}}),e.crypto=(()=>{const e=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,r=\"function\"==typeof t.require&&t.require.bind(t);return{node:r&&!e?r(\"crypto\"):void 0,web:e}})()},22699:t=>{\"use strict\";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))}m(t,e,o,{once:!0}),\"error\"!==e&&function(t,e,r){\"function\"==typeof t.on&&m(t,\"error\",e,r)}(t,i,{once:!0})}))},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 m(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):[]}},59341:(t,e,r)=>{var n=r(77834).Buffer,i=r(27993);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,\"binary\")),e&&(n.isBuffer(e)||(e=n.from(e,\"binary\")),8!==e.length))throw new RangeError(\"salt should be Buffer with 8 byte length\");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),h=n.alloc(0);s>0||o>0;){var c=new i;c.update(h),c.update(t),e&&c.update(e),h=c.digest();var f=0;if(s>0){var l=a.length-s;f=Math.min(s,h.length),h.copy(a,l,0,f),s-=f}if(f<h.length&&o>0){var d=u.length-o,p=Math.min(o,h.length-f);h.copy(u,d,f,f+p),o-=p}}return h.fill(0),{key:a,iv:u}}},77847:t=>{t.exports=s,s.default=s,s.stable=c,s.stableStringify=c;var e=\"[...]\",r=\"[Circular]\",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var a;void 0===s&&(s=o()),u(t,\"\",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(t,e,r):JSON.stringify(t,l(e),r)}catch(t){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var h=n.pop();4===h.length?Object.defineProperty(h[0],h[1],h[3]):h[0][h[1]]=h[2]}}return a}function a(t,e,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:t}),n.push([o,r,e,s])):i.push([e,r,t]):(o[r]=t,n.push([o,r,e]))}function u(t,n,i,o,s,h,c){var f;if(h+=1,\"object\"==typeof t&&null!==t){for(f=0;f<o.length;f++)if(o[f]===t)return void a(r,t,n,s);if(void 0!==c.depthLimit&&h>c.depthLimit)return void a(e,t,n,s);if(void 0!==c.edgesLimit&&i+1>c.edgesLimit)return void a(e,t,n,s);if(o.push(t),Array.isArray(t))for(f=0;f<t.length;f++)u(t[f],f,f,o,t,h,c);else{var l=Object.keys(t);for(f=0;f<l.length;f++){var d=l[f];u(t[d],d,f,o,t,h,c)}}o.pop()}}function h(t,e){return t<e?-1:t>e?1:0}function c(t,e,r,s){void 0===s&&(s=o());var a,u=f(t,\"\",0,[],void 0,0,s)||t;try{a=0===i.length?JSON.stringify(u,e,r):JSON.stringify(u,l(e),r)}catch(t){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var h=n.pop();4===h.length?Object.defineProperty(h[0],h[1],h[3]):h[0][h[1]]=h[2]}}return a}function f(t,i,o,s,u,c,l){var d;if(c+=1,\"object\"==typeof t&&null!==t){for(d=0;d<s.length;d++)if(s[d]===t)return void a(r,t,i,u);try{if(\"function\"==typeof t.toJSON)return}catch(t){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void a(e,t,i,u);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void a(e,t,i,u);if(s.push(t),Array.isArray(t))for(d=0;d<t.length;d++)f(t[d],d,d,s,t,c,l);else{var p={},m=Object.keys(t).sort(h);for(d=0;d<m.length;d++){var g=m[d];f(t[g],g,d,s,t,c,l),p[g]=t[g]}if(void 0===u)return p;n.push([u,i,t]),u[i]=p}s.pop()}}function l(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===e&&o[0]===r){r=o[2],i.splice(n,1);break}}return t.call(this,e,r)}}},83243:(t,e,r)=>{\"use strict\";var n=r(9680),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError(\"iterator must be a function\");var s;arguments.length>=3&&(s=r),\"[object Array]\"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s):\"string\"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,s):function(t,e,r){for(var n in t)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s)}},37795:t=>{\"use strict\";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var i=0;i<e.length;i+=1)r[i+t.length]=e[i];return r};t.exports=function(t){var i=this;if(\"function\"!=typeof i||\"[object Function]\"!==e.apply(i))throw new TypeError(\"Function.prototype.bind called on incompatible \"+i);for(var o,s=function(t,e){for(var r=[],n=e||0,i=0;n<t.length;n+=1,i+=1)r[i]=t[n];return r}(arguments,1),a=r(0,i.length-s.length),u=[],h=0;h<a;h++)u[h]=\"$\"+h;if(o=Function(\"binder\",\"return function (\"+function(t,e){for(var r=\"\",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(u,\",\")+\"){ return binder.apply(this,arguments); }\")((function(){if(this instanceof o){var e=i.apply(this,n(s,arguments));return Object(e)===e?e:this}return i.apply(t,n(s,arguments))})),i.prototype){var c=function(){};c.prototype=i.prototype,o.prototype=new c,c.prototype=null}return o}},4090:(t,e,r)=>{\"use strict\";var n=r(37795);t.exports=Function.prototype.bind||n},67286:(t,e,r)=>{\"use strict\";var n,i=r(42321),o=r(69654),s=r(48205),a=r(2976),u=r(48342),h=r(5408),c=r(82885),f=Function,l=function(t){try{return f('\"use strict\"; return ('+t+\").constructor;\")()}catch(t){}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},\"\")}catch(t){d=null}var p=function(){throw new h},m=d?function(){try{return p}catch(t){try{return d(arguments,\"callee\").get}catch(t){return p}}}():p,g=r(32636)(),y=r(18486)(),b=Object.getPrototypeOf||(y?function(t){return t.__proto__}:null),v={},w=\"undefined\"!=typeof Uint8Array&&b?b(Uint8Array):n,M={__proto__:null,\"%AggregateError%\":\"undefined\"==typeof AggregateError?n:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":\"undefined\"==typeof ArrayBuffer?n:ArrayBuffer,\"%ArrayIteratorPrototype%\":g&&b?b([][Symbol.iterator]()):n,\"%AsyncFromSyncIteratorPrototype%\":n,\"%AsyncFunction%\":v,\"%AsyncGenerator%\":v,\"%AsyncGeneratorFunction%\":v,\"%AsyncIteratorPrototype%\":v,\"%Atomics%\":\"undefined\"==typeof Atomics?n:Atomics,\"%BigInt%\":\"undefined\"==typeof BigInt?n:BigInt,\"%BigInt64Array%\":\"undefined\"==typeof BigInt64Array?n:BigInt64Array,\"%BigUint64Array%\":\"undefined\"==typeof BigUint64Array?n:BigUint64Array,\"%Boolean%\":Boolean,\"%DataView%\":\"undefined\"==typeof DataView?n:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":i,\"%eval%\":eval,\"%EvalError%\":o,\"%Float32Array%\":\"undefined\"==typeof Float32Array?n:Float32Array,\"%Float64Array%\":\"undefined\"==typeof Float64Array?n:Float64Array,\"%FinalizationRegistry%\":\"undefined\"==typeof FinalizationRegistry?n:FinalizationRegistry,\"%Function%\":f,\"%GeneratorFunction%\":v,\"%Int8Array%\":\"undefined\"==typeof Int8Array?n:Int8Array,\"%Int16Array%\":\"undefined\"==typeof Int16Array?n:Int16Array,\"%Int32Array%\":\"undefined\"==typeof Int32Array?n:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":g&&b?b(b([][Symbol.iterator]())):n,\"%JSON%\":\"object\"==typeof JSON?JSON:n,\"%Map%\":\"undefined\"==typeof Map?n:Map,\"%MapIteratorPrototype%\":\"undefined\"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":Object,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":\"undefined\"==typeof Promise?n:Promise,\"%Proxy%\":\"undefined\"==typeof Proxy?n:Proxy,\"%RangeError%\":s,\"%ReferenceError%\":a,\"%Reflect%\":\"undefined\"==typeof Reflect?n:Reflect,\"%RegExp%\":RegExp,\"%Set%\":\"undefined\"==typeof Set?n:Set,\"%SetIteratorPrototype%\":\"undefined\"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,\"%SharedArrayBuffer%\":\"undefined\"==typeof SharedArrayBuffer?n:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":g&&b?b(\"\"[Symbol.iterator]()):n,\"%Symbol%\":g?Symbol:n,\"%SyntaxError%\":u,\"%ThrowTypeError%\":m,\"%TypedArray%\":w,\"%TypeError%\":h,\"%Uint8Array%\":\"undefined\"==typeof Uint8Array?n:Uint8Array,\"%Uint8ClampedArray%\":\"undefined\"==typeof Uint8ClampedArray?n:Uint8ClampedArray,\"%Uint16Array%\":\"undefined\"==typeof Uint16Array?n:Uint16Array,\"%Uint32Array%\":\"undefined\"==typeof Uint32Array?n:Uint32Array,\"%URIError%\":c,\"%WeakMap%\":\"undefined\"==typeof WeakMap?n:WeakMap,\"%WeakRef%\":\"undefined\"==typeof WeakRef?n:WeakRef,\"%WeakSet%\":\"undefined\"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var _=b(b(t));M[\"%Error.prototype%\"]=_}var E=function t(e){var r;if(\"%AsyncFunction%\"===e)r=l(\"async function () {}\");else if(\"%GeneratorFunction%\"===e)r=l(\"function* () {}\");else if(\"%AsyncGeneratorFunction%\"===e)r=l(\"async function* () {}\");else if(\"%AsyncGenerator%\"===e){var n=t(\"%AsyncGeneratorFunction%\");n&&(r=n.prototype)}else if(\"%AsyncIteratorPrototype%\"===e){var i=t(\"%AsyncGenerator%\");i&&b&&(r=b(i.prototype))}return M[e]=r,r},A={__proto__:null,\"%ArrayBufferPrototype%\":[\"ArrayBuffer\",\"prototype\"],\"%ArrayPrototype%\":[\"Array\",\"prototype\"],\"%ArrayProto_entries%\":[\"Array\",\"prototype\",\"entries\"],\"%ArrayProto_forEach%\":[\"Array\",\"prototype\",\"forEach\"],\"%ArrayProto_keys%\":[\"Array\",\"prototype\",\"keys\"],\"%ArrayProto_values%\":[\"Array\",\"prototype\",\"values\"],\"%AsyncFunctionPrototype%\":[\"AsyncFunction\",\"prototype\"],\"%AsyncGenerator%\":[\"AsyncGeneratorFunction\",\"prototype\"],\"%AsyncGeneratorPrototype%\":[\"AsyncGeneratorFunction\",\"prototype\",\"prototype\"],\"%BooleanPrototype%\":[\"Boolean\",\"prototype\"],\"%DataViewPrototype%\":[\"DataView\",\"prototype\"],\"%DatePrototype%\":[\"Date\",\"prototype\"],\"%ErrorPrototype%\":[\"Error\",\"prototype\"],\"%EvalErrorPrototype%\":[\"EvalError\",\"prototype\"],\"%Float32ArrayPrototype%\":[\"Float32Array\",\"prototype\"],\"%Float64ArrayPrototype%\":[\"Float64Array\",\"prototype\"],\"%FunctionPrototype%\":[\"Function\",\"prototype\"],\"%Generator%\":[\"GeneratorFunction\",\"prototype\"],\"%GeneratorPrototype%\":[\"GeneratorFunction\",\"prototype\",\"prototype\"],\"%Int8ArrayPrototype%\":[\"Int8Array\",\"prototype\"],\"%Int16ArrayPrototype%\":[\"Int16Array\",\"prototype\"],\"%Int32ArrayPrototype%\":[\"Int32Array\",\"prototype\"],\"%JSONParse%\":[\"JSON\",\"parse\"],\"%JSONStringify%\":[\"JSON\",\"stringify\"],\"%MapPrototype%\":[\"Map\",\"prototype\"],\"%NumberPrototype%\":[\"Number\",\"prototype\"],\"%ObjectPrototype%\":[\"Object\",\"prototype\"],\"%ObjProto_toString%\":[\"Object\",\"prototype\",\"toString\"],\"%ObjProto_valueOf%\":[\"Object\",\"prototype\",\"valueOf\"],\"%PromisePrototype%\":[\"Promise\",\"prototype\"],\"%PromiseProto_then%\":[\"Promise\",\"prototype\",\"then\"],\"%Promise_all%\":[\"Promise\",\"all\"],\"%Promise_reject%\":[\"Promise\",\"reject\"],\"%Promise_resolve%\":[\"Promise\",\"resolve\"],\"%RangeErrorPrototype%\":[\"RangeError\",\"prototype\"],\"%ReferenceErrorPrototype%\":[\"ReferenceError\",\"prototype\"],\"%RegExpPrototype%\":[\"RegExp\",\"prototype\"],\"%SetPrototype%\":[\"Set\",\"prototype\"],\"%SharedArrayBufferPrototype%\":[\"SharedArrayBuffer\",\"prototype\"],\"%StringPrototype%\":[\"String\",\"prototype\"],\"%SymbolPrototype%\":[\"Symbol\",\"prototype\"],\"%SyntaxErrorPrototype%\":[\"SyntaxError\",\"prototype\"],\"%TypedArrayPrototype%\":[\"TypedArray\",\"prototype\"],\"%TypeErrorPrototype%\":[\"TypeError\",\"prototype\"],\"%Uint8ArrayPrototype%\":[\"Uint8Array\",\"prototype\"],\"%Uint8ClampedArrayPrototype%\":[\"Uint8ClampedArray\",\"prototype\"],\"%Uint16ArrayPrototype%\":[\"Uint16Array\",\"prototype\"],\"%Uint32ArrayPrototype%\":[\"Uint32Array\",\"prototype\"],\"%URIErrorPrototype%\":[\"URIError\",\"prototype\"],\"%WeakMapPrototype%\":[\"WeakMap\",\"prototype\"],\"%WeakSetPrototype%\":[\"WeakSet\",\"prototype\"]},S=r(4090),x=r(72196),B=S.call(Function.call,Array.prototype.concat),T=S.call(Function.apply,Array.prototype.splice),I=S.call(Function.call,String.prototype.replace),k=S.call(Function.call,String.prototype.slice),P=S.call(Function.call,RegExp.prototype.exec),C=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,R=/\\\\(\\\\)?/g,O=function(t,e){var r,n=t;if(x(A,n)&&(n=\"%\"+(r=A[n])[0]+\"%\"),x(M,n)){var i=M[n];if(i===v&&(i=E(n)),void 0===i&&!e)throw new h(\"intrinsic \"+t+\" exists, but is not available. Please file an issue!\");return{alias:r,name:n,value:i}}throw new u(\"intrinsic \"+t+\" does not exist!\")};t.exports=function(t,e){if(\"string\"!=typeof t||0===t.length)throw new h(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&\"boolean\"!=typeof e)throw new h('\"allowMissing\" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new u(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");var r=function(t){var e=k(t,0,1),r=k(t,-1);if(\"%\"===e&&\"%\"!==r)throw new u(\"invalid intrinsic syntax, expected closing `%`\");if(\"%\"===r&&\"%\"!==e)throw new u(\"invalid intrinsic syntax, expected opening `%`\");var n=[];return I(t,C,(function(t,e,r,i){n[n.length]=r?I(i,R,\"$1\"):e||t})),n}(t),n=r.length>0?r[0]:\"\",i=O(\"%\"+n+\"%\",e),o=i.name,s=i.value,a=!1,c=i.alias;c&&(n=c[0],T(r,B([0,1],c)));for(var f=1,l=!0;f<r.length;f+=1){var p=r[f],m=k(p,0,1),g=k(p,-1);if(('\"'===m||\"'\"===m||\"`\"===m||'\"'===g||\"'\"===g||\"`\"===g)&&m!==g)throw new u(\"property names with quotes must have matching quotes\");if(\"constructor\"!==p&&l||(a=!0),x(M,o=\"%\"+(n+=\".\"+p)+\"%\"))s=M[o];else if(null!=s){if(!(p in s)){if(!e)throw new h(\"base intrinsic for \"+t+\" exists, but the property is not available.\");return}if(d&&f+1>=r.length){var y=d(s,p);s=(l=!!y)&&\"get\"in y&&!(\"originalValue\"in y.get)?y.get:s[p]}else l=x(s,p),s=s[p];l&&!a&&(M[o]=s)}}return s}},50326:(t,e,r)=>{\"use strict\";var n=r(67286)(\"%Object.getOwnPropertyDescriptor%\",!0);if(n)try{n([],\"length\")}catch(t){n=null}t.exports=n},81181:(t,e,r)=>{\"use strict\";var n=r(70999),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],\"length\",{value:1}).length}catch(t){return!0}},t.exports=i},18486:t=>{\"use strict\";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},32636:(t,e,r)=>{\"use strict\";var n=\"undefined\"!=typeof Symbol&&Symbol,i=r(66679);t.exports=function(){return\"function\"==typeof n&&(\"function\"==typeof Symbol&&(\"symbol\"==typeof n(\"foo\")&&(\"symbol\"==typeof Symbol(\"bar\")&&i())))}},66679:t=>{\"use strict\";t.exports=function(){if(\"function\"!=typeof Symbol||\"function\"!=typeof Object.getOwnPropertySymbols)return!1;if(\"symbol\"==typeof Symbol.iterator)return!0;var t={},e=Symbol(\"test\"),r=Object(e);if(\"string\"==typeof e)return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(e))return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if(\"function\"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if(\"function\"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(\"function\"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},67226:(t,e,r)=>{\"use strict\";var n=r(66679);t.exports=function(){return n()&&!!Symbol.toStringTag}},84485:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=r(67525).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(91285)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&\"string\"!=typeof t)throw new TypeError(e+\" must be a string or a buffer\")}(t,\"Data\"),this._finalized)throw new Error(\"Digest already called\");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error(\"_update is not implemented\")},o.prototype.digest=function(t){if(this._finalized)throw new Error(\"Digest already called\");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error(\"_digest is not implemented\")},t.exports=o},34485:(t,e,r)=>{var n=e;n.utils=r(50212),n.common=r(74495),n.sha=r(45530),n.ripemd=r(91396),n.hmac=r(15047),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},74495:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(79561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian=\"big\",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,\"big\"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},15047:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(79561);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},91396:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(74495),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,h=i.BlockHash;function c(){if(!(this instanceof c))return new c;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian=\"little\"}function f(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(c,h),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],h=this.h[3],c=this.h[4],b=r,v=n,w=i,M=h,_=c,E=0;E<80;E++){var A=s(o(u(r,f(E,n,i,h),t[p[E]+e],l(E)),g[E]),c);r=c,c=h,h=o(i,10),i=n,n=A,A=s(o(u(b,f(79-E,v,w,M),t[m[E]+e],d(E)),y[E]),_),b=_,_=M,M=o(w,10),w=v,v=A}A=a(this.h[1],i,M),this.h[1]=a(this.h[2],h,_),this.h[2]=a(this.h[3],c,b),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=A},c.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"little\"):n.split32(this.h,\"little\")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},45530:(t,e,r)=>{\"use strict\";e.sha1=r(35079),e.sha224=r(63823),e.sha256=r(68032),e.sha384=r(25328),e.sha512=r(20168)},35079:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(74495),o=r(40713),s=n.rotl32,a=n.sum32,u=n.sum32_5,h=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],l=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=u(s(i,5),h(p,o,c,l),d,r[n],f[p]);d=l,l=c,c=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],l),this.h[4]=a(this.h[4],d)},l.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},63823:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(68032);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h.slice(0,7),\"big\"):n.split32(this.h.slice(0,7),\"big\")}},68032:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(74495),o=r(40713),s=r(79561),a=n.sum32,u=n.sum32_4,h=n.sum32_5,c=o.ch32,f=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(b,g),t.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],M=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var _=h(M,d(b),c(b,v,w),this.k[n],r[n]),E=a(l(i),f(i,o,g));M=w,w=v,v=b,b=a(y,_),y=g,g=o,o=i,i=a(_,E)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],M)},b.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},25328:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(20168);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h.slice(0,12),\"big\"):n.split32(this.h.slice(0,12),\"big\")}},20168:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(74495),o=r(79561),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,h=n.shr64_lo,c=n.sum64,f=n.sum64_hi,l=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function M(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function _(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function E(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function A(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function S(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function x(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function B(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=a(t,e,1)^a(t,e,8)^h(t,e,7);return r<0&&(r+=4294967296),r}function k(t,e){var r=s(t,e,19)^s(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function P(t,e){var r=a(t,e,19)^a(e,t,29)^h(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=k(r[n-4],r[n-3]),o=P(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],u=T(r[n-30],r[n-29]),h=I(r[n-30],r[n-29]),c=r[n-32],f=r[n-31];r[n]=d(i,o,s,a,u,h,c,f),r[n+1]=p(i,o,s,a,u,h,c,f)}},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],u=this.h[4],h=this.h[5],d=this.h[6],p=this.h[7],y=this.h[8],b=this.h[9],v=this.h[10],T=this.h[11],I=this.h[12],k=this.h[13],P=this.h[14],C=this.h[15];o(this.k.length===r.length);for(var R=0;R<r.length;R+=2){var O=P,L=C,N=x(y,b),U=B(y,b),j=w(y,b,v,T,I),D=M(y,b,v,T,I,k),z=this.k[R],H=this.k[R+1],F=r[R],$=r[R+1],V=m(O,L,N,U,j,D,z,H,F,$),q=g(O,L,N,U,j,D,z,H,F,$);O=A(n,i),L=S(n,i),N=_(n,i,s,a,u),U=E(n,i,s,a,u,h);var G=f(O,L,N,U),K=l(O,L,N,U);P=I,C=k,I=v,k=T,v=y,T=b,y=f(d,p,V,q),b=l(p,p,V,q),d=u,p=h,u=s,h=a,s=n,a=i,n=f(V,q,G,K),i=l(V,q,G,K)}c(this.h,0,n,i),c(this.h,2,s,a),c(this.h,4,u,h),c(this.h,6,d,p),c(this.h,8,y,b),c(this.h,10,v,T),c(this.h,12,I,k),c(this.h,14,P,C)},v.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},40713:(t,e,r)=>{\"use strict\";var n=r(50212).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},50212:(t,e,r)=>{\"use strict\";var n=r(79561),i=r(91285);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?\"0\"+t:t}function u(t){return 7===t.length?\"0\"+t:6===t.length?\"00\"+t:5===t.length?\"000\"+t:4===t.length?\"0000\"+t:3===t.length?\"00000\"+t:2===t.length?\"000000\"+t:1===t.length?\"0000000\"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(\"string\"==typeof t)if(e){if(\"hex\"===e)for((t=t.replace(/[^a-z0-9]+/gi,\"\")).length%2!=0&&(t=\"0\"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e=\"\",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r=\"\",n=0;n<t.length;n++){var i=t[n];\"little\"===e&&(i=s(i)),r+=u(i.toString(16))}return r},e.zero2=a,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var h;h=\"big\"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=h>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];\"big\"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,h=e;return u+=(h=h+n>>>0)<e?1:0,u+=(h=h+o>>>0)<o?1:0,t+r+i+s+(u+=(h=h+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,h){var c=0,f=e;return c+=(f=f+n>>>0)<e?1:0,c+=(f=f+o>>>0)<o?1:0,c+=(f=f+a>>>0)<a?1:0,t+r+i+s+u+(c+=(f=f+h>>>0)<h?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,h){return e+n+o+a+h>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},72196:(t,e,r)=>{\"use strict\";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(4090);t.exports=o.call(n,i)},78873:(t,e,r)=>{\"use strict\";var n=r(34485),i=r(43022),o=r(79561);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||\"hex\"),r=i.toArray(t.nonce,t.nonceEnc||\"hex\"),n=i.toArray(t.pers,t.persEnc||\"hex\");o(e.length>=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){\"string\"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error(\"Reseed is required\");\"string\"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||\"hex\"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},62333:(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,m=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*m}},91285: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}}},52635:(t,e,r)=>{\"use strict\";var n=r(67226)(),i=r(62680)(\"Object.prototype.toString\"),o=function(t){return!(n&&t&&\"object\"==typeof t&&Symbol.toStringTag in t)&&\"[object Arguments]\"===i(t)},s=function(t){return!!o(t)||null!==t&&\"object\"==typeof t&&\"number\"==typeof t.length&&t.length>=0&&\"[object Array]\"!==i(t)&&\"[object Function]\"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},9680:t=>{\"use strict\";var e,r,n=Function.prototype.toString,i=\"object\"==typeof Reflect&&null!==Reflect&&Reflect.apply;if(\"function\"==typeof i&&\"function\"==typeof Object.defineProperty)try{e=Object.defineProperty({},\"length\",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\\s*class\\b/,s=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},a=function(t){try{return!s(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,h=\"function\"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),f=function(){return!1};if(\"object\"==typeof document){var l=document.all;u.call(l)===u.call(document.all)&&(f=function(t){if((c||!t)&&(void 0===t||\"object\"==typeof t))try{var e=u.call(t);return(\"[object HTMLAllCollection]\"===e||\"[object HTML document.all class]\"===e||\"[object HTMLCollection]\"===e||\"[object Object]\"===e)&&null==t(\"\")}catch(t){}return!1})}t.exports=i?function(t){if(f(t))return!0;if(!t)return!1;if(\"function\"!=typeof t&&\"object\"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!s(t)&&a(t)}:function(t){if(f(t))return!0;if(!t)return!1;if(\"function\"!=typeof t&&\"object\"!=typeof t)return!1;if(h)return a(t);if(s(t))return!1;var e=u.call(t);return!(\"[object Function]\"!==e&&\"[object GeneratorFunction]\"!==e&&!/^\\[object HTML/.test(e))&&a(t)}},43138:(t,e,r)=>{\"use strict\";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\\s*(?:function)?\\*/,a=r(67226)(),u=Object.getPrototypeOf;t.exports=function(t){if(\"function\"!=typeof t)return!1;if(s.test(o.call(t)))return!0;if(!a)return\"[object GeneratorFunction]\"===i.call(t);if(!u)return!1;if(void 0===n){var e=function(){if(!a)return!1;try{return Function(\"return function*() {}\")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},50198:(t,e,r)=>{\"use strict\";var n=r(32094);t.exports=function(t){return!!n(t)}},27993:(t,e,r)=>{\"use strict\";var n=r(91285),i=r(84485),o=r(77834).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function h(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function c(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=h(r,n,i,o,t[0],3614090360,7),o=h(o,r,n,i,t[1],3905402710,12),i=h(i,o,r,n,t[2],606105819,17),n=h(n,i,o,r,t[3],3250441966,22),r=h(r,n,i,o,t[4],4118548399,7),o=h(o,r,n,i,t[5],1200080426,12),i=h(i,o,r,n,t[6],2821735955,17),n=h(n,i,o,r,t[7],4249261313,22),r=h(r,n,i,o,t[8],1770035416,7),o=h(o,r,n,i,t[9],2336552879,12),i=h(i,o,r,n,t[10],4294925233,17),n=h(n,i,o,r,t[11],2304563134,22),r=h(r,n,i,o,t[12],1804603682,7),o=h(o,r,n,i,t[13],4254626195,12),i=h(i,o,r,n,t[14],2792965006,17),r=c(r,n=h(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=c(o,r,n,i,t[6],3225465664,9),i=c(i,o,r,n,t[11],643717713,14),n=c(n,i,o,r,t[0],3921069994,20),r=c(r,n,i,o,t[5],3593408605,5),o=c(o,r,n,i,t[10],38016083,9),i=c(i,o,r,n,t[15],3634488961,14),n=c(n,i,o,r,t[4],3889429448,20),r=c(r,n,i,o,t[9],568446438,5),o=c(o,r,n,i,t[14],3275163606,9),i=c(i,o,r,n,t[3],4107603335,14),n=c(n,i,o,r,t[8],1163531501,20),r=c(r,n,i,o,t[13],2850285829,5),o=c(o,r,n,i,t[2],4243563512,9),i=c(i,o,r,n,t[7],1735328473,14),r=f(r,n=c(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=f(o,r,n,i,t[8],2272392833,11),i=f(i,o,r,n,t[11],1839030562,16),n=f(n,i,o,r,t[14],4259657740,23),r=f(r,n,i,o,t[1],2763975236,4),o=f(o,r,n,i,t[4],1272893353,11),i=f(i,o,r,n,t[7],4139469664,16),n=f(n,i,o,r,t[10],3200236656,23),r=f(r,n,i,o,t[13],681279174,4),o=f(o,r,n,i,t[0],3936430074,11),i=f(i,o,r,n,t[3],3572445317,16),n=f(n,i,o,r,t[6],76029189,23),r=f(r,n,i,o,t[9],3654602809,4),o=f(o,r,n,i,t[12],3873151461,11),i=f(i,o,r,n,t[15],530742520,16),r=l(r,n=f(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=l(o,r,n,i,t[7],1126891415,10),i=l(i,o,r,n,t[14],2878612391,15),n=l(n,i,o,r,t[5],4237533241,21),r=l(r,n,i,o,t[12],1700485571,6),o=l(o,r,n,i,t[3],2399980690,10),i=l(i,o,r,n,t[10],4293915773,15),n=l(n,i,o,r,t[1],2240044497,21),r=l(r,n,i,o,t[8],1873313359,6),o=l(o,r,n,i,t[15],4264355552,10),i=l(i,o,r,n,t[6],2734768916,15),n=l(n,i,o,r,t[13],1309151649,21),r=l(r,n,i,o,t[4],4149444226,6),o=l(o,r,n,i,t[11],3174756917,10),i=l(i,o,r,n,t[2],718787259,15),n=l(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},42973:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.InvalidStatusCodeError=e.InvalidCertError=void 0;const i=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class o extends Error{constructor(t,e){super(t),this.fingerprint256=e}}e.InvalidCertError=o;class s extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}function a(t,e){if(!e||\"text\"===e||\"json\"===e)try{let r=new TextDecoder(\"utf8\",{fatal:!0}).decode(t);if(\"text\"===e)return r;try{return JSON.parse(r)}catch(t){if(\"json\"===e)throw t;return r}}catch(t){if(\"text\"===e||\"json\"===e)throw t}return t}e.InvalidStatusCodeError=s;let u={};function h(t,e){let c={...i,...e};const f=r(732),l=r(99640),d=r(94087),{promisify:p}=r(43335),{resolve:m}=r(883),g=!!/^https/.test(t);let y={method:c.method||\"GET\",headers:{\"Accept-Encoding\":\"gzip, deflate, br\"}};const b=t=>t.replace(/:| /g,\"\").toLowerCase();if(c.keepAlive){const t={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},e=[g,g&&c.sslPinnedCertificates?.map((t=>b(t))).sort()].join();y.agent=u[e]||(u[e]=new(g?l:f).Agent(t))}\"json\"===c.type&&(y.headers[\"Content-Type\"]=\"application/json\"),c.data&&(c.method||(y.method=\"POST\"),y.body=\"json\"===c.type?JSON.stringify(c.data):c.data),y.headers={...y.headers,...c.headers},c.sslAllowSelfSigned&&(y.rejectUnauthorized=!1);return new Promise(((e,r)=>{const i=async e=>{if(e&&\"DEPTH_ZERO_SELF_SIGNED_CERT\"===e.code)try{await h(t,{...c,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(t){t&&t.fingerprint256&&(e=new o(`Self-signed SSL certificate: ${t.fingerprint256}`,t.fingerprint256))}r(e)},u=(g?l:f).request(t,y,(o=>{o.on(\"error\",i),(async()=>{try{e(await(async e=>{const r=e.statusCode;if(c.redirect&&300<=r&&r<400&&e.headers.location){if(10==c._redirectCount)throw new Error(\"Request failed. Too much redirects.\");return c._redirectCount+=1,await h(m(t,e.headers.location),c)}if(c.expectStatusCode&&r!==c.expectStatusCode)throw e.resume(),new s(r);let i=[];for await(const t of e)i.push(t);let o=n.concat(i);const u=e.headers[\"content-encoding\"];\"br\"===u&&(o=await p(d.brotliDecompress)(o)),\"gzip\"!==u&&\"deflate\"!==u||(o=await p(d.unzip)(o));const f=a(o,c.type);return c.full?{headers:e.headers,status:r,body:f}:f})(o))}catch(t){r(t)}})()}));u.on(\"error\",i);const v=c.sslPinnedCertificates?.map((t=>b(t))),w=t=>{const e=b(t.getPeerCertificate()?.fingerprint256||\"\");if((e||!t.isSessionReused())&&!v.includes(e))return u.emit(\"error\",new o(`Invalid SSL certificate: ${e} Expected: ${v}`,e)),u.abort()};c.sslPinnedCertificates&&u.on(\"socket\",(t=>{const e=t.listeners(\"secureConnect\").map((t=>(t.name||\"\").replace(\"bound \",\"\"))).includes(\"mfetchSecureConnect\");e||t.on(\"secureConnect\",w.bind(null,t))})),c.keepAlive&&u.setNoDelay(!0),y.body&&u.write(y.body),u.end()}))}const c=new Set([\"Accept\",\"Accept-Language\",\"Content-Language\",\"Content-Type\"].map((t=>t.toLowerCase()))),f=new Set([\"Accept-Charset\",\"Accept-Encoding\",\"Access-Control-Request-Headers\",\"Access-Control-Request-Method\",\"Connection\",\"Content-Length\",\"Cookie\",\"Cookie2\",\"Date\",\"DNT\",\"Expect\",\"Host\",\"Keep-Alive\",\"Origin\",\"Referer\",\"TE\",\"Trailer\",\"Transfer-Encoding\",\"Upgrade\",\"Via\"].map((t=>t.toLowerCase())));async function l(t,e){let r={...i,...e};const n=new Headers;\"json\"===r.type&&n.set(\"Content-Type\",\"application/json\");let o=new URL(t);if(o.username){const t=btoa(`${o.username}:${o.password}`);n.set(\"Authorization\",`Basic ${t}`),o.username=\"\",o.password=\"\"}t=\"\"+o;for(let t in r.headers){const e=t.toLowerCase();(c.has(e)||r.cors&&!f.has(e))&&n.set(t,r.headers[t])}let u={headers:n,redirect:r.redirect?\"follow\":\"manual\"};r.referrer||(u.referrerPolicy=\"no-referrer\"),r.cors&&(u.mode=\"cors\"),r.data&&(r.method||(u.method=\"POST\"),u.body=\"json\"===r.type?JSON.stringify(r.data):r.data);const h=await fetch(t,u);if(r.expectStatusCode&&h.status!==r.expectStatusCode)throw new s(h.status);const l=a(new Uint8Array(await h.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(h.headers.entries()),status:h.status,body:l}:l}const d=!!(\"object\"==typeof process&&process.versions&&process.versions.node&&process.versions.v8);e.default=function(t,e){return(d?h:l)(t,e)}},46676:(t,e,r)=>{var n=r(1466),i=r(82745);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),s=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),u=0;!a.testn(u);u++);for(var h=t.shrn(u),c=a.toRed(o);e>0;e--){var f=this._randrange(new n(2),a);r&&r(f);var l=f.toRed(o).redPow(h);if(0!==l.cmp(s)&&0!==l.cmp(c)){for(var d=1;d<u;d++){if(0===(l=l.redSqr()).cmp(s))return!1;if(0===l.cmp(c))break}if(d===u)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var u=t.shrn(a),h=s.toRed(i);e>0;e--){var c=this._randrange(new n(2),s),f=t.gcd(c);if(0!==f.cmpn(1))return f;var l=c.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(h)){for(var d=1;d<a;d++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(t);if(0===l.cmp(h))break}if(d===a)return(l=l.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},1466:function(t,e,r){!function(t,e){\"use strict\";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(6024).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}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,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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.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},o.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var c=[\"\",\"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\"],f=[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],l=[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 d(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);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+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)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){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\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},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 p=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,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>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,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))<<13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(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)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(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)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(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)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(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)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(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)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;h=((o=o+Math.imul(M,mt)|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(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=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(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))<<13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=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(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=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(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(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()}(this,t,e):m(this,t,e),r},g.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},g.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},g.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]]},g.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],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.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},g.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}},g.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},g.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))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.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),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),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]&1<<i)>>>i}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.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(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.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},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,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=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,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 E(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 y={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(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){E.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.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},v.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(w,b),i(M,b),i(_,b),_.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(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.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\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.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)},E.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},E.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)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.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 m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.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},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),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)},79561:t=>{function e(t,e){if(!t)throw new Error(e||\"Assertion failed\")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||\"Assertion failed: \"+t+\" != \"+e)}},43022:(t,e)=>{\"use strict\";var r=e;function n(t){return 1===t.length?\"0\"+t:t}function i(t){for(var e=\"\",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(\"string\"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if(\"hex\"===e){(t=t.replace(/[^a-z0-9]+/gi,\"\")).length%2!=0&&(t=\"0\"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return\"hex\"===e?i(t):t}},11378:t=>{var e=1e3,r=60*e,n=60*r,i=24*n,o=7*i,s=365.25*i;function a(t,e,r,n){var i=e>=1.5*r;return Math.round(t/r)+\" \"+n+(i?\"s\":\"\")}t.exports=function(t,u){u=u||{};var h=typeof t;if(\"string\"===h&&t.length>0)return function(t){if((t=String(t)).length>100)return;var a=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return u*s;case\"weeks\":case\"week\":case\"w\":return u*o;case\"days\":case\"day\":case\"d\":return u*i;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return u*n;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return u*r;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return u*e;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return u;default:return}}(t);if(\"number\"===h&&isFinite(t))return u.long?function(t){var o=Math.abs(t);if(o>=i)return a(t,o,i,\"day\");if(o>=n)return a(t,o,n,\"hour\");if(o>=r)return a(t,o,r,\"minute\");if(o>=e)return a(t,o,e,\"second\");return t+\" ms\"}(t):function(t){var o=Math.abs(t);if(o>=i)return Math.round(t/i)+\"d\";if(o>=n)return Math.round(t/n)+\"h\";if(o>=r)return Math.round(t/r)+\"m\";if(o>=e)return Math.round(t/e)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},99500:(t,e,r)=>{var n=\"function\"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,\"size\"):null,o=n&&i&&\"function\"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a=\"function\"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,\"size\"):null,h=a&&u&&\"function\"==typeof u.get?u.get:null,c=a&&Set.prototype.forEach,f=\"function\"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l=\"function\"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d=\"function\"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,M=String.prototype.toLowerCase,_=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,S=Array.prototype.slice,x=Math.floor,B=\"function\"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,I=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?Symbol.prototype.toString:null,k=\"function\"==typeof Symbol&&\"object\"==typeof Symbol.iterator,P=\"function\"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||\"symbol\")?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,R=(\"function\"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function O(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(\"number\"==typeof t){var n=t<0?-x(-t):x(t);if(n!==t){var i=String(n),o=b.call(e,i.length+1);return v.call(i,r,\"$&_\")+\".\"+v.call(v.call(o,/([0-9]{3})/g,\"$&_\"),/_$/,\"\")}}return v.call(e,r,\"$&_\")}var L=r(53260),N=L.custom,U=F(N)?N:null;function j(t,e,r){var n=\"double\"===(r.quoteStyle||e)?'\"':\"'\";return n+t+n}function D(t){return v.call(String(t),/\"/g,\"&quot;\")}function z(t){return!(\"[object Array]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}function H(t){return!(\"[object RegExp]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}function F(t){if(k)return t&&\"object\"==typeof t&&t instanceof Symbol;if(\"symbol\"==typeof t)return!0;if(!t||\"object\"!=typeof t||!I)return!1;try{return I.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,i,a){var u=n||{};if(V(u,\"quoteStyle\")&&\"single\"!==u.quoteStyle&&\"double\"!==u.quoteStyle)throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');if(V(u,\"maxStringLength\")&&(\"number\"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');var m=!V(u,\"customInspect\")||u.customInspect;if(\"boolean\"!=typeof m&&\"symbol\"!==m)throw new TypeError(\"option \\\"customInspect\\\", if provided, must be `true`, `false`, or `'symbol'`\");if(V(u,\"indent\")&&null!==u.indent&&\"\\t\"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');if(V(u,\"numericSeparator\")&&\"boolean\"!=typeof u.numericSeparator)throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');var w=u.numericSeparator;if(void 0===e)return\"undefined\";if(null===e)return\"null\";if(\"boolean\"==typeof e)return e?\"true\":\"false\";if(\"string\"==typeof e)return K(e,u);if(\"number\"==typeof e){if(0===e)return 1/0/e>0?\"0\":\"-0\";var _=String(e);return w?O(e,_):_}if(\"bigint\"==typeof e){var x=String(e)+\"n\";return w?O(e,x):x}var T=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=T&&T>0&&\"object\"==typeof e)return z(e)?\"[Array]\":\"[Object]\";var N=function(t,e){var r;if(\"\\t\"===t.indent)r=\"\\t\";else{if(!(\"number\"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1),\" \")}return{base:r,prev:A.call(Array(e+1),r)}}(u,i);if(void 0===a)a=[];else if(G(a,e)>=0)return\"[Circular]\";function $(e,r,n){if(r&&(a=S.call(a)).push(r),n){var o={depth:u.depth};return V(u,\"quoteStyle\")&&(o.quoteStyle=u.quoteStyle),t(e,o,i+1,a)}return t(e,u,i+1,a)}if(\"function\"==typeof e&&!H(e)){var J=function(t){if(t.name)return t.name;var e=y.call(g.call(t),/^function\\s*([\\w$]+)/);if(e)return e[1];return null}(e),tt=Q(e,$);return\"[Function\"+(J?\": \"+J:\" (anonymous)\")+\"]\"+(tt.length>0?\" { \"+A.call(tt,\", \")+\" }\":\"\")}if(F(e)){var et=k?v.call(String(e),/^(Symbol\\(.*\\))_[^)]*$/,\"$1\"):I.call(e);return\"object\"!=typeof e||k?et:W(et)}if(function(t){if(!t||\"object\"!=typeof t)return!1;if(\"undefined\"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return\"string\"==typeof t.nodeName&&\"function\"==typeof t.getAttribute}(e)){for(var rt=\"<\"+M.call(String(e.nodeName)),nt=e.attributes||[],it=0;it<nt.length;it++)rt+=\" \"+nt[it].name+\"=\"+j(D(nt[it].value),\"double\",u);return rt+=\">\",e.childNodes&&e.childNodes.length&&(rt+=\"...\"),rt+=\"</\"+M.call(String(e.nodeName))+\">\"}if(z(e)){if(0===e.length)return\"[]\";var ot=Q(e,$);return N&&!function(t){for(var e=0;e<t.length;e++)if(G(t[e],\"\\n\")>=0)return!1;return!0}(ot)?\"[\"+Y(ot,N)+\"]\":\"[ \"+A.call(ot,\", \")+\" ]\"}if(function(t){return!(\"[object Error]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e)){var st=Q(e,$);return\"cause\"in Error.prototype||!(\"cause\"in e)||C.call(e,\"cause\")?0===st.length?\"[\"+String(e)+\"]\":\"{ [\"+String(e)+\"] \"+A.call(st,\", \")+\" }\":\"{ [\"+String(e)+\"] \"+A.call(E.call(\"[cause]: \"+$(e.cause),st),\", \")+\" }\"}if(\"object\"==typeof e&&m){if(U&&\"function\"==typeof e[U]&&L)return L(e,{depth:T-i});if(\"symbol\"!==m&&\"function\"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||\"object\"!=typeof t)return!1;try{o.call(t);try{h.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var at=[];return s&&s.call(e,(function(t,r){at.push($(r,e,!0)+\" => \"+$(t,e))})),X(\"Map\",o.call(e),at,N)}if(function(t){if(!h||!t||\"object\"!=typeof t)return!1;try{h.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return c&&c.call(e,(function(t){ut.push($(t,e))})),X(\"Set\",h.call(e),ut,N)}if(function(t){if(!f||!t||\"object\"!=typeof t)return!1;try{f.call(t,f);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Z(\"WeakMap\");if(function(t){if(!l||!t||\"object\"!=typeof t)return!1;try{l.call(t,l);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Z(\"WeakSet\");if(function(t){if(!d||!t||\"object\"!=typeof t)return!1;try{return d.call(t),!0}catch(t){}return!1}(e))return Z(\"WeakRef\");if(function(t){return!(\"[object Number]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e))return W($(Number(e)));if(function(t){if(!t||\"object\"!=typeof t||!B)return!1;try{return B.call(t),!0}catch(t){}return!1}(e))return W($(B.call(e)));if(function(t){return!(\"[object Boolean]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e))return W(p.call(e));if(function(t){return!(\"[object String]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e))return W($(String(e)));if(\"undefined\"!=typeof window&&e===window)return\"{ [object Window] }\";if(\"undefined\"!=typeof globalThis&&e===globalThis||void 0!==r.g&&e===r.g)return\"{ [object globalThis] }\";if(!function(t){return!(\"[object Date]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e)&&!H(e)){var ht=Q(e,$),ct=R?R(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?\"\":\"null prototype\",lt=!ct&&P&&Object(e)===e&&P in e?b.call(q(e),8,-1):ft?\"Object\":\"\",dt=(ct||\"function\"!=typeof e.constructor?\"\":e.constructor.name?e.constructor.name+\" \":\"\")+(lt||ft?\"[\"+A.call(E.call([],lt||[],ft||[]),\": \")+\"] \":\"\");return 0===ht.length?dt+\"{}\":N?dt+\"{\"+Y(ht,N)+\"}\":dt+\"{ \"+A.call(ht,\", \")+\" }\"}return String(e)};var $=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return $.call(t,e)}function q(t){return m.call(t)}function G(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function K(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n=\"... \"+r+\" more character\"+(r>1?\"s\":\"\");return K(b.call(t,0,e.maxStringLength),e)+n}return j(v.call(v.call(t,/(['\\\\])/g,\"\\\\$1\"),/[\\x00-\\x1f]/g,J),\"single\",e)}function J(t){var e=t.charCodeAt(0),r={8:\"b\",9:\"t\",10:\"n\",12:\"f\",13:\"r\"}[e];return r?\"\\\\\"+r:\"\\\\x\"+(e<16?\"0\":\"\")+w.call(e.toString(16))}function W(t){return\"Object(\"+t+\")\"}function Z(t){return t+\" { ? }\"}function X(t,e,r,n){return t+\" (\"+e+\") {\"+(n?Y(r,n):A.call(r,\", \"))+\"}\"}function Y(t,e){if(0===t.length)return\"\";var r=\"\\n\"+e.prev+e.base;return r+A.call(t,\",\"+r)+\"\\n\"+e.prev}function Q(t,e){var r=z(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=V(t,i)?e(t[i],t):\"\"}var o,s=\"function\"==typeof T?T(t):[];if(k){o={};for(var a=0;a<s.length;a++)o[\"$\"+s[a]]=s[a]}for(var u in t)V(t,u)&&(r&&String(Number(u))===u&&u<t.length||k&&o[\"$\"+u]instanceof Symbol||(_.call(/[^\\w$]/,u)?n.push(e(u,t)+\": \"+e(t[u],t)):n.push(u+\": \"+e(t[u],t))));if(\"function\"==typeof T)for(var h=0;h<s.length;h++)C.call(t,s[h])&&n.push(\"[\"+e(s[h])+\"]: \"+e(t[s[h]],t));return n}},58045:(t,e,r)=>{\"use strict\";var n=r(22812);e.certificate=r(27832);var i=n.define(\"RSAPrivateKey\",(function(){this.seq().obj(this.key(\"version\").int(),this.key(\"modulus\").int(),this.key(\"publicExponent\").int(),this.key(\"privateExponent\").int(),this.key(\"prime1\").int(),this.key(\"prime2\").int(),this.key(\"exponent1\").int(),this.key(\"exponent2\").int(),this.key(\"coefficient\").int())}));e.RSAPrivateKey=i;var o=n.define(\"RSAPublicKey\",(function(){this.seq().obj(this.key(\"modulus\").int(),this.key(\"publicExponent\").int())}));e.RSAPublicKey=o;var s=n.define(\"SubjectPublicKeyInfo\",(function(){this.seq().obj(this.key(\"algorithm\").use(a),this.key(\"subjectPublicKey\").bitstr())}));e.PublicKey=s;var a=n.define(\"AlgorithmIdentifier\",(function(){this.seq().obj(this.key(\"algorithm\").objid(),this.key(\"none\").null_().optional(),this.key(\"curve\").objid().optional(),this.key(\"params\").seq().obj(this.key(\"p\").int(),this.key(\"q\").int(),this.key(\"g\").int()).optional())})),u=n.define(\"PrivateKeyInfo\",(function(){this.seq().obj(this.key(\"version\").int(),this.key(\"algorithm\").use(a),this.key(\"subjectPrivateKey\").octstr())}));e.PrivateKey=u;var h=n.define(\"EncryptedPrivateKeyInfo\",(function(){this.seq().obj(this.key(\"algorithm\").seq().obj(this.key(\"id\").objid(),this.key(\"decrypt\").seq().obj(this.key(\"kde\").seq().obj(this.key(\"id\").objid(),this.key(\"kdeparams\").seq().obj(this.key(\"salt\").octstr(),this.key(\"iters\").int())),this.key(\"cipher\").seq().obj(this.key(\"algo\").objid(),this.key(\"iv\").octstr()))),this.key(\"subjectPrivateKey\").octstr())}));e.EncryptedPrivateKey=h;var c=n.define(\"DSAPrivateKey\",(function(){this.seq().obj(this.key(\"version\").int(),this.key(\"p\").int(),this.key(\"q\").int(),this.key(\"g\").int(),this.key(\"pub_key\").int(),this.key(\"priv_key\").int())}));e.DSAPrivateKey=c,e.DSAparam=n.define(\"DSAparam\",(function(){this.int()}));var f=n.define(\"ECPrivateKey\",(function(){this.seq().obj(this.key(\"version\").int(),this.key(\"privateKey\").octstr(),this.key(\"parameters\").optional().explicit(0).use(l),this.key(\"publicKey\").optional().explicit(1).bitstr())}));e.ECPrivateKey=f;var l=n.define(\"ECParameters\",(function(){this.choice({namedCurve:this.objid()})}));e.signature=n.define(\"signature\",(function(){this.seq().obj(this.key(\"r\").int(),this.key(\"s\").int())}))},27832:(t,e,r)=>{\"use strict\";var n=r(22812),i=n.define(\"Time\",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define(\"AttributeTypeValue\",(function(){this.seq().obj(this.key(\"type\").objid(),this.key(\"value\").any())})),s=n.define(\"AlgorithmIdentifier\",(function(){this.seq().obj(this.key(\"algorithm\").objid(),this.key(\"parameters\").optional(),this.key(\"curve\").objid().optional())})),a=n.define(\"SubjectPublicKeyInfo\",(function(){this.seq().obj(this.key(\"algorithm\").use(s),this.key(\"subjectPublicKey\").bitstr())})),u=n.define(\"RelativeDistinguishedName\",(function(){this.setof(o)})),h=n.define(\"RDNSequence\",(function(){this.seqof(u)})),c=n.define(\"Name\",(function(){this.choice({rdnSequence:this.use(h)})})),f=n.define(\"Validity\",(function(){this.seq().obj(this.key(\"notBefore\").use(i),this.key(\"notAfter\").use(i))})),l=n.define(\"Extension\",(function(){this.seq().obj(this.key(\"extnID\").objid(),this.key(\"critical\").bool().def(!1),this.key(\"extnValue\").octstr())})),d=n.define(\"TBSCertificate\",(function(){this.seq().obj(this.key(\"version\").explicit(0).int().optional(),this.key(\"serialNumber\").int(),this.key(\"signature\").use(s),this.key(\"issuer\").use(c),this.key(\"validity\").use(f),this.key(\"subject\").use(c),this.key(\"subjectPublicKeyInfo\").use(a),this.key(\"issuerUniqueID\").implicit(1).bitstr().optional(),this.key(\"subjectUniqueID\").implicit(2).bitstr().optional(),this.key(\"extensions\").explicit(3).seqof(l).optional())})),p=n.define(\"X509Certificate\",(function(){this.seq().obj(this.key(\"tbsCertificate\").use(d),this.key(\"signatureAlgorithm\").use(s),this.key(\"signatureValue\").bitstr())}));t.exports=p},82968:(t,e,r)=>{var n=/Proc-Type: 4,ENCRYPTED[\\n\\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\\n\\r]+([0-9A-z\\n\\r+/=]+)[\\n\\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\\n\\r+/=]+)-----END \\1-----$/m,s=r(59341),a=r(10010),u=r(77834).Buffer;t.exports=function(t,e){var r,h=t.toString(),c=h.match(n);if(c){var f=\"aes\"+c[1],l=u.from(c[2],\"hex\"),d=u.from(c[3].replace(/[\\r\\n]/g,\"\"),\"base64\"),p=s(e,l.slice(0,8),parseInt(c[1],10)).key,m=[],g=a.createDecipheriv(f,p,l);m.push(g.update(d)),m.push(g.final()),r=u.concat(m)}else{var y=h.match(o);r=u.from(y[2].replace(/[\\r\\n]/g,\"\"),\"base64\")}return{tag:h.match(i)[1],data:r}}},28016:(t,e,r)=>{var n=r(58045),i=r(68675),o=r(82968),s=r(10010),a=r(30499),u=r(77834).Buffer;function h(t){var e;\"object\"!=typeof t||u.isBuffer(t)||(e=t.passphrase,t=t.key),\"string\"==typeof t&&(t=u.from(t));var r,h,c=o(t,e),f=c.tag,l=c.data;switch(f){case\"CERTIFICATE\":h=n.certificate.decode(l,\"der\").tbsCertificate.subjectPublicKeyInfo;case\"PUBLIC KEY\":switch(h||(h=n.PublicKey.decode(l,\"der\")),r=h.algorithm.algorithm.join(\".\")){case\"1.2.840.113549.1.1.1\":return n.RSAPublicKey.decode(h.subjectPublicKey.data,\"der\");case\"1.2.840.10045.2.1\":return h.subjectPrivateKey=h.subjectPublicKey,{type:\"ec\",data:h};case\"1.2.840.10040.4.1\":return h.algorithm.params.pub_key=n.DSAparam.decode(h.subjectPublicKey.data,\"der\"),{type:\"dsa\",data:h.algorithm.params};default:throw new Error(\"unknown key id \"+r)}case\"ENCRYPTED PRIVATE KEY\":l=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(\".\")],h=t.algorithm.decrypt.cipher.iv,c=t.subjectPrivateKey,f=parseInt(o.split(\"-\")[1],10)/8,l=a.pbkdf2Sync(e,r,n,f,\"sha1\"),d=s.createDecipheriv(o,l,h),p=[];return p.push(d.update(c)),p.push(d.final()),u.concat(p)}(l=n.EncryptedPrivateKey.decode(l,\"der\"),e);case\"PRIVATE KEY\":switch(r=(h=n.PrivateKey.decode(l,\"der\")).algorithm.algorithm.join(\".\")){case\"1.2.840.113549.1.1.1\":return n.RSAPrivateKey.decode(h.subjectPrivateKey,\"der\");case\"1.2.840.10045.2.1\":return{curve:h.algorithm.curve,privateKey:n.ECPrivateKey.decode(h.subjectPrivateKey,\"der\").privateKey};case\"1.2.840.10040.4.1\":return h.algorithm.params.priv_key=n.DSAparam.decode(h.subjectPrivateKey,\"der\"),{type:\"dsa\",params:h.algorithm.params};default:throw new Error(\"unknown key id \"+r)}case\"RSA PUBLIC KEY\":return n.RSAPublicKey.decode(l,\"der\");case\"RSA PRIVATE KEY\":return n.RSAPrivateKey.decode(l,\"der\");case\"DSA PRIVATE KEY\":return{type:\"dsa\",params:n.DSAPrivateKey.decode(l,\"der\")};case\"EC PRIVATE KEY\":return{curve:(l=n.ECPrivateKey.decode(l,\"der\")).parameters.value,privateKey:l.privateKey};default:throw new Error(\"unknown key type \"+f)}}t.exports=h,h.signature=n.signature},30499:(t,e,r)=>{e.pbkdf2=r(14874),e.pbkdf2Sync=r(88840)},14874:(t,e,r)=>{var n,i,o=r(77834).Buffer,s=r(87351),a=r(25214),u=r(88840),h=r(97232),c=r.g.crypto&&r.g.crypto.subtle,f={sha:\"SHA-1\",\"sha-1\":\"SHA-1\",sha1:\"SHA-1\",sha256:\"SHA-256\",\"sha-256\":\"SHA-256\",sha384:\"SHA-384\",\"sha-384\":\"SHA-384\",\"sha-512\":\"SHA-512\",sha512:\"SHA-512\"},l=[];function d(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(t,e,r,n,i){return c.importKey(\"raw\",t,{name:\"PBKDF2\"},!1,[\"deriveBits\"]).then((function(t){return c.deriveBits({name:\"PBKDF2\",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,e,i,m,g,y){\"function\"==typeof g&&(y=g,g=void 0);var b=f[(g=g||\"sha1\").toLowerCase()];if(b&&\"function\"==typeof r.g.Promise){if(s(i,m),t=h(t,a,\"Password\"),e=h(e,a,\"Salt\"),\"function\"!=typeof y)throw new Error(\"No callback provided to pbkdf2\");!function(t,e){t.then((function(t){d()((function(){e(null,t)}))}),(function(t){d()((function(){e(t)}))}))}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==l[t])return l[t];var e=p(n=n||o.alloc(8),n,10,128,t).then((function(){return!0})).catch((function(){return!1}));return l[t]=e,e}(b).then((function(r){return r?p(t,e,i,m,b):u(t,e,i,m,g)})),y)}else d()((function(){var r;try{r=u(t,e,i,m,g)}catch(t){return y(t)}y(null,r)}))}},25214:(t,e,r)=>{var n;if(r.g.process&&r.g.process.browser)n=\"utf-8\";else if(r.g.process&&r.g.process.version){n=parseInt(process.version.split(\".\")[0].slice(1),10)>=6?\"utf-8\":\"binary\"}else n=\"utf-8\";t.exports=n},87351:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,r){if(\"number\"!=typeof t)throw new TypeError(\"Iterations not a number\");if(t<0)throw new TypeError(\"Bad iterations\");if(\"number\"!=typeof r)throw new TypeError(\"Key length not a number\");if(r<0||r>e||r!=r)throw new TypeError(\"Bad key length\")}},88840:(t,e,r)=>{var n=r(22511),i=r(51445),o=r(9065),s=r(77834).Buffer,a=r(87351),u=r(25214),h=r(97232),c=s.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(t,e,r){var a=function(t){function e(e){return o(t).update(e).digest()}function r(t){return(new i).update(t).digest()}return\"rmd160\"===t||\"ripemd160\"===t?r:\"md5\"===t?n:e}(t),u=\"sha512\"===t||\"sha384\"===t?128:64;e.length>u?e=a(e):e.length<u&&(e=s.concat([e,c],u));for(var h=s.allocUnsafe(u+f[t]),l=s.allocUnsafe(u+f[t]),d=0;d<u;d++)h[d]=54^e[d],l[d]=92^e[d];var p=s.allocUnsafe(u+r+4);h.copy(p,0,0,u),this.ipad1=p,this.ipad2=h,this.opad=l,this.alg=t,this.blocksize=u,this.hash=a,this.size=f[t]}l.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){a(r,n);var o=new l(i=i||\"sha1\",t=h(t,u,\"Password\"),(e=h(e,u,\"Salt\")).length),c=s.allocUnsafe(n),d=s.allocUnsafe(e.length+4);e.copy(d,0,0,e.length);for(var p=0,m=f[i],g=Math.ceil(n/m),y=1;y<=g;y++){d.writeUInt32BE(y,e.length);for(var b=o.run(d,o.ipad1),v=b,w=1;w<r;w++){v=o.run(v,o.ipad2);for(var M=0;M<m;M++)b[M]^=v[M]}b.copy(c,p),p+=m}return c}},97232:(t,e,r)=>{var n=r(77834).Buffer;t.exports=function(t,e,r){if(n.isBuffer(t))return t;if(\"string\"==typeof t)return n.from(t,e);if(ArrayBuffer.isView(t))return n.from(t.buffer);throw new TypeError(r+\" must be a string, a Buffer, a typed array or a DataView\")}},89498:(t,e,r)=>{\"use strict\";const{ErrorWithCause:n}=r(61261),{findCauseByReference:i,getErrorCause:o,messageWithCauses:s,stackWithCauses:a}=r(91662);t.exports={ErrorWithCause:n,findCauseByReference:i,getErrorCause:o,stackWithCauses:a,messageWithCauses:s}},61261:t=>{\"use strict\";class e extends Error{constructor(t,{cause:r}={}){super(t),this.name=e.name,r&&(this.cause=r),this.message=t}}t.exports={ErrorWithCause:e}},91662:t=>{\"use strict\";const e=t=>{if(t&&\"object\"==typeof t&&\"cause\"in t){if(\"function\"==typeof t.cause){const e=t.cause();return e instanceof Error?e:void 0}return t.cause instanceof Error?t.cause:void 0}},r=(t,n)=>{if(!(t instanceof Error))return\"\";const i=t.stack||\"\";if(n.has(t))return i+\"\\ncauses have become circular...\";const o=e(t);return o?(n.add(t),i+\"\\ncaused by: \"+r(o,n)):i},n=(t,r,i)=>{if(!(t instanceof Error))return\"\";const o=i?\"\":t.message||\"\";if(r.has(t))return o+\": ...\";const s=e(t);if(s){r.add(t);const e=\"cause\"in t&&\"function\"==typeof t.cause;return o+(e?\"\":\": \")+n(s,r,e)}return o};t.exports={findCauseByReference:(t,r)=>{if(!t||!r)return;if(!(t instanceof Error))return;if(!(r.prototype instanceof Error)&&r!==Error)return;const n=new Set;let i=t;for(;i&&!n.has(i);){if(n.add(i),i instanceof r)return i;i=e(i)}},getErrorCause:e,stackWithCauses:t=>r(t,new Set),messageWithCauses:t=>n(t,new Set)}},35962:t=>{\"use strict\";t.exports=[\"Float32Array\",\"Float64Array\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"BigInt64Array\",\"BigUint64Array\"]},8493:(t,e,r)=>{e.publicEncrypt=r(61896),e.privateDecrypt=r(76932),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},78525:(t,e,r)=>{var n=r(16162),i=r(77834).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=i.alloc(0),a=0;s.length<e;)r=o(a++),s=i.concat([s,n(\"sha1\").update(t).update(r).digest()]);return s.slice(0,e)}},62216:function(t,e,r){!function(t,e){\"use strict\";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(15862).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}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,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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.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},o.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var c=[\"\",\"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\"],f=[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],l=[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 d(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);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+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)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){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\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},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 p=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,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>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,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))<<13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(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)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(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)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(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)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(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)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(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)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;h=((o=o+Math.imul(M,mt)|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(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=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(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))<<13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=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(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=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(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(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()}(this,t,e):m(this,t,e),r},g.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},g.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},g.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]]},g.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],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.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},g.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}},g.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},g.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))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.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),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),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]&1<<i)>>>i}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.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(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.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},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,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=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,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 E(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 y={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(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){E.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.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},v.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(w,b),i(M,b),i(_,b),_.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(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.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\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.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)},E.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},E.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)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.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 m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.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},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),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)},76932:(t,e,r)=>{var n=r(28016),i=r(78525),o=r(11273),s=r(62216),a=r(91857),u=r(16162),h=r(46112),c=r(77834).Buffer;t.exports=function(t,e,r){var f;f=t.padding?t.padding:r?1:4;var l,d=n(t),p=d.modulus.byteLength();if(e.length>p||new s(e).cmp(d.modulus)>=0)throw new Error(\"decryption error\");l=r?h(new s(e),d):a(e,d);var m=c.alloc(p-l.length);if(l=c.concat([m,l],p),4===f)return function(t,e){var r=t.modulus.byteLength(),n=u(\"sha1\").update(c.alloc(0)).digest(),s=n.length;if(0!==e[0])throw new Error(\"decryption error\");var a=e.slice(1,s+1),h=e.slice(s+1),f=o(a,i(h,s)),l=o(h,i(f,r-s-1));if(function(t,e){t=c.from(t),e=c.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(n,l.slice(0,s)))throw new Error(\"decryption error\");var d=s;for(;0===l[d];)d++;if(1!==l[d++])throw new Error(\"decryption error\");return l.slice(d)}(d,l);if(1===f)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var s=e.slice(2,i-1);(\"0002\"!==n.toString(\"hex\")&&!r||\"0001\"!==n.toString(\"hex\")&&r)&&o++;s.length<8&&o++;if(o)throw new Error(\"decryption error\");return e.slice(i)}(0,l,r);if(3===f)return l;throw new Error(\"unknown padding\")}},61896:(t,e,r)=>{var n=r(28016),i=r(95003),o=r(16162),s=r(78525),a=r(11273),u=r(62216),h=r(46112),c=r(91857),f=r(77834).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var d,p=n(t);if(4===l)d=function(t,e){var r=t.modulus.byteLength(),n=e.length,h=o(\"sha1\").update(f.alloc(0)).digest(),c=h.length,l=2*c;if(n>r-l-2)throw new Error(\"message too long\");var d=f.alloc(r-n-l-2),p=r-c-1,m=i(c),g=a(f.concat([h,d,f.alloc(1,1),e],p),s(m,p)),y=a(m,s(g,c));return new u(f.concat([f.alloc(1),y,g],r))}(p,e);else if(1===l)d=function(t,e,r){var n,o=e.length,s=t.modulus.byteLength();if(o>s-11)throw new Error(\"message too long\");n=r?f.alloc(s-o-3,255):function(t){var e,r=f.allocUnsafe(t),n=0,o=i(2*t),s=0;for(;n<t;)s===o.length&&(o=i(2*t),s=0),(e=o[s++])&&(r[n++]=e);return r}(s-o-3);return new u(f.concat([f.from([0,r?1:2]),n,f.alloc(1),e],s))}(p,e,r);else{if(3!==l)throw new Error(\"unknown padding\");if((d=new u(e)).cmp(p.modulus)>=0)throw new Error(\"data too long for modulus\")}return r?c(d,p):h(d,p)}},46112:(t,e,r)=>{var n=r(62216),i=r(77834).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},11273:t=>{t.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},85527:t=>{\"use strict\";var e=String.prototype.replace,r=/%20/g,n=\"RFC1738\",i=\"RFC3986\";t.exports={default:i,formatters:{RFC1738:function(t){return e.call(t,r,\"+\")},RFC3986:function(t){return String(t)}},RFC1738:n,RFC3986:i}},19126:(t,e,r)=>{\"use strict\";var n=r(66845),i=r(29166),o=r(85527);t.exports={formats:o,parse:i,stringify:n}},29166:(t,e,r)=>{\"use strict\";var n=r(12493),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:\"utf-8\",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:\"&\",depth:5,duplicates:\"combine\",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},a=function(t){return t.replace(/&#(\\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&\"string\"==typeof t&&e.comma&&t.indexOf(\",\")>-1?t.split(\",\"):t},h=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\\.([^.[]+)/g,\"[$1]\"):t,s=/(\\[[^[\\]]*])/g,a=r.depth>0&&/(\\[[^[\\]]*])/.exec(o),h=a?o.slice(0,a.index):o,c=[];if(h){if(!r.plainObjects&&i.call(Object.prototype,h)&&!r.allowPrototypes)return;c.push(h)}for(var f=0;r.depth>0&&null!==(a=s.exec(o))&&f<r.depth;){if(f+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}if(a){if(!0===r.strictDepth)throw new RangeError(\"Input depth exceeded depth option of \"+r.depth+\" and strictDepth is true\");c.push(\"[\"+o.slice(a.index)+\"]\")}return function(t,e,r,n){for(var i=n?e:u(e,r),o=t.length-1;o>=0;--o){var s,a=t[o];if(\"[]\"===a&&r.parseArrays)s=r.allowEmptyArrays&&(\"\"===i||r.strictNullHandling&&null===i)?[]:[].concat(i);else{s=r.plainObjects?Object.create(null):{};var h=\"[\"===a.charAt(0)&&\"]\"===a.charAt(a.length-1)?a.slice(1,-1):a,c=r.decodeDotInKeys?h.replace(/%2E/g,\".\"):h,f=parseInt(c,10);r.parseArrays||\"\"!==c?!isNaN(f)&&a!==c&&String(f)===c&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(s=[])[f]=i:\"__proto__\"!==c&&(s[c]=i):s={0:i}}i=s}return i}(c,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return s;if(void 0!==t.allowEmptyArrays&&\"boolean\"!=typeof t.allowEmptyArrays)throw new TypeError(\"`allowEmptyArrays` option can only be `true` or `false`, when provided\");if(void 0!==t.decodeDotInKeys&&\"boolean\"!=typeof t.decodeDotInKeys)throw new TypeError(\"`decodeDotInKeys` option can only be `true` or `false`, when provided\");if(null!==t.decoder&&void 0!==t.decoder&&\"function\"!=typeof t.decoder)throw new TypeError(\"Decoder has to be a function.\");if(void 0!==t.charset&&\"utf-8\"!==t.charset&&\"iso-8859-1\"!==t.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var e=void 0===t.charset?s.charset:t.charset,r=void 0===t.duplicates?s.duplicates:t.duplicates;if(\"combine\"!==r&&\"first\"!==r&&\"last\"!==r)throw new TypeError(\"The duplicates option must be either combine, first, or last\");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||s.allowDots:!!t.allowDots,allowEmptyArrays:\"boolean\"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:\"boolean\"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:\"boolean\"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:\"number\"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:\"boolean\"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:\"boolean\"==typeof t.comma?t.comma:s.comma,decodeDotInKeys:\"boolean\"==typeof t.decodeDotInKeys?t.decodeDotInKeys:s.decodeDotInKeys,decoder:\"function\"==typeof t.decoder?t.decoder:s.decoder,delimiter:\"string\"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:\"number\"==typeof t.depth||!1===t.depth?+t.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:\"boolean\"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:\"number\"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:\"boolean\"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictDepth:\"boolean\"==typeof t.strictDepth?!!t.strictDepth:s.strictDepth,strictNullHandling:\"boolean\"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(\"\"===t||null==t)return r.plainObjects?Object.create(null):{};for(var c=\"string\"==typeof t?function(t,e){var r={__proto__:null},h=e.ignoreQueryPrefix?t.replace(/^\\?/,\"\"):t;h=h.replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\");var c,f=e.parameterLimit===1/0?void 0:e.parameterLimit,l=h.split(e.delimiter,f),d=-1,p=e.charset;if(e.charsetSentinel)for(c=0;c<l.length;++c)0===l[c].indexOf(\"utf8=\")&&(\"utf8=%E2%9C%93\"===l[c]?p=\"utf-8\":\"utf8=%26%2310003%3B\"===l[c]&&(p=\"iso-8859-1\"),d=c,c=l.length);for(c=0;c<l.length;++c)if(c!==d){var m,g,y=l[c],b=y.indexOf(\"]=\"),v=-1===b?y.indexOf(\"=\"):b+1;-1===v?(m=e.decoder(y,s.decoder,p,\"key\"),g=e.strictNullHandling?null:\"\"):(m=e.decoder(y.slice(0,v),s.decoder,p,\"key\"),g=n.maybeMap(u(y.slice(v+1),e),(function(t){return e.decoder(t,s.decoder,p,\"value\")}))),g&&e.interpretNumericEntities&&\"iso-8859-1\"===p&&(g=a(g)),y.indexOf(\"[]=\")>-1&&(g=o(g)?[g]:g);var w=i.call(r,m);w&&\"combine\"===e.duplicates?r[m]=n.combine(r[m],g):w&&\"last\"!==e.duplicates||(r[m]=g)}return r}(t,r):t,f=r.plainObjects?Object.create(null):{},l=Object.keys(c),d=0;d<l.length;++d){var p=l[d],m=h(p,c[p],r,\"string\"==typeof t);f=n.merge(f,m,r)}return!0===r.allowSparse?f:n.compact(f)}},66845:(t,e,r)=>{\"use strict\";var n=r(74294),i=r(12493),o=r(85527),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+\"[]\"},comma:\"comma\",indices:function(t,e){return t+\"[\"+e+\"]\"},repeat:function(t){return t}},u=Array.isArray,h=Array.prototype.push,c=function(t,e){h.apply(t,u(e)?e:[e])},f=Date.prototype.toISOString,l=o.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:\"indices\",charset:\"utf-8\",charsetSentinel:!1,delimiter:\"&\",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,format:l,formatter:o.formatters[l],indices:!1,serializeDate:function(t){return f.call(t)},skipNulls:!1,strictNullHandling:!1},p={},m=function t(e,r,o,s,a,h,f,l,m,g,y,b,v,w,M,_,E,A){for(var S,x=e,B=A,T=0,I=!1;void 0!==(B=B.get(p))&&!I;){var k=B.get(e);if(T+=1,void 0!==k){if(k===T)throw new RangeError(\"Cyclic object value\");I=!0}void 0===B.get(p)&&(T=0)}if(\"function\"==typeof g?x=g(r,x):x instanceof Date?x=v(x):\"comma\"===o&&u(x)&&(x=i.maybeMap(x,(function(t){return t instanceof Date?v(t):t}))),null===x){if(h)return m&&!_?m(r,d.encoder,E,\"key\",w):r;x=\"\"}if(\"string\"==typeof(S=x)||\"number\"==typeof S||\"boolean\"==typeof S||\"symbol\"==typeof S||\"bigint\"==typeof S||i.isBuffer(x))return m?[M(_?r:m(r,d.encoder,E,\"key\",w))+\"=\"+M(m(x,d.encoder,E,\"value\",w))]:[M(r)+\"=\"+M(String(x))];var P,C=[];if(void 0===x)return C;if(\"comma\"===o&&u(x))_&&m&&(x=i.maybeMap(x,m)),P=[{value:x.length>0?x.join(\",\")||null:void 0}];else if(u(g))P=g;else{var R=Object.keys(x);P=y?R.sort(y):R}var O=l?r.replace(/\\./g,\"%2E\"):r,L=s&&u(x)&&1===x.length?O+\"[]\":O;if(a&&u(x)&&0===x.length)return L+\"[]\";for(var N=0;N<P.length;++N){var U=P[N],j=\"object\"==typeof U&&void 0!==U.value?U.value:x[U];if(!f||null!==j){var D=b&&l?U.replace(/\\./g,\"%2E\"):U,z=u(x)?\"function\"==typeof o?o(L,D):L:L+(b?\".\"+D:\"[\"+D+\"]\");A.set(e,T);var H=n();H.set(p,A),c(C,t(j,z,o,s,a,h,f,l,\"comma\"===o&&_&&u(x)?null:m,g,y,b,v,w,M,_,E,H))}}return C};t.exports=function(t,e){var r,i=t,h=function(t){if(!t)return d;if(void 0!==t.allowEmptyArrays&&\"boolean\"!=typeof t.allowEmptyArrays)throw new TypeError(\"`allowEmptyArrays` option can only be `true` or `false`, when provided\");if(void 0!==t.encodeDotInKeys&&\"boolean\"!=typeof t.encodeDotInKeys)throw new TypeError(\"`encodeDotInKeys` option can only be `true` or `false`, when provided\");if(null!==t.encoder&&void 0!==t.encoder&&\"function\"!=typeof t.encoder)throw new TypeError(\"Encoder has to be a function.\");var e=t.charset||d.charset;if(void 0!==t.charset&&\"utf-8\"!==t.charset&&\"iso-8859-1\"!==t.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var r=o.default;if(void 0!==t.format){if(!s.call(o.formatters,t.format))throw new TypeError(\"Unknown format option provided.\");r=t.format}var n,i=o.formatters[r],h=d.filter;if((\"function\"==typeof t.filter||u(t.filter))&&(h=t.filter),n=t.arrayFormat in a?t.arrayFormat:\"indices\"in t?t.indices?\"indices\":\"repeat\":d.arrayFormat,\"commaRoundTrip\"in t&&\"boolean\"!=typeof t.commaRoundTrip)throw new TypeError(\"`commaRoundTrip` must be a boolean, or absent\");var c=void 0===t.allowDots?!0===t.encodeDotInKeys||d.allowDots:!!t.allowDots;return{addQueryPrefix:\"boolean\"==typeof t.addQueryPrefix?t.addQueryPrefix:d.addQueryPrefix,allowDots:c,allowEmptyArrays:\"boolean\"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:n,charset:e,charsetSentinel:\"boolean\"==typeof t.charsetSentinel?t.charsetSentinel:d.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:void 0===t.delimiter?d.delimiter:t.delimiter,encode:\"boolean\"==typeof t.encode?t.encode:d.encode,encodeDotInKeys:\"boolean\"==typeof t.encodeDotInKeys?t.encodeDotInKeys:d.encodeDotInKeys,encoder:\"function\"==typeof t.encoder?t.encoder:d.encoder,encodeValuesOnly:\"boolean\"==typeof t.encodeValuesOnly?t.encodeValuesOnly:d.encodeValuesOnly,filter:h,format:r,formatter:i,serializeDate:\"function\"==typeof t.serializeDate?t.serializeDate:d.serializeDate,skipNulls:\"boolean\"==typeof t.skipNulls?t.skipNulls:d.skipNulls,sort:\"function\"==typeof t.sort?t.sort:null,strictNullHandling:\"boolean\"==typeof t.strictNullHandling?t.strictNullHandling:d.strictNullHandling}}(e);\"function\"==typeof h.filter?i=(0,h.filter)(\"\",i):u(h.filter)&&(r=h.filter);var f=[];if(\"object\"!=typeof i||null===i)return\"\";var l=a[h.arrayFormat],p=\"comma\"===l&&h.commaRoundTrip;r||(r=Object.keys(i)),h.sort&&r.sort(h.sort);for(var g=n(),y=0;y<r.length;++y){var b=r[y];h.skipNulls&&null===i[b]||c(f,m(i[b],b,l,p,h.allowEmptyArrays,h.strictNullHandling,h.skipNulls,h.encodeDotInKeys,h.encode?h.encoder:null,h.filter,h.sort,h.allowDots,h.serializeDate,h.format,h.formatter,h.encodeValuesOnly,h.charset,g))}var v=f.join(h.delimiter),w=!0===h.addQueryPrefix?\"?\":\"\";return h.charsetSentinel&&(\"iso-8859-1\"===h.charset?w+=\"utf8=%26%2310003%3B&\":w+=\"utf8=%E2%9C%93&\"),v.length>0?w+v:\"\"}},12493:(t,e,r)=>{\"use strict\";var n=r(85527),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push(\"%\"+((e<16?\"0\":\"\")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},u=1024;t.exports={arrayToObject:a,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:\"o\"}],r=[],n=0;n<e.length;++n)for(var i=e[n],s=i.obj[i.prop],a=Object.keys(s),u=0;u<a.length;++u){var h=a[u],c=s[h];\"object\"==typeof c&&null!==c&&-1===r.indexOf(c)&&(e.push({obj:s,prop:h}),r.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(o(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\\+/g,\" \");if(\"iso-8859-1\"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,i,o){if(0===t.length)return t;var a=t;if(\"symbol\"==typeof t?a=Symbol.prototype.toString.call(t):\"string\"!=typeof t&&(a=String(t)),\"iso-8859-1\"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return\"%26%23\"+parseInt(t.slice(2),16)+\"%3B\"}));for(var h=\"\",c=0;c<a.length;c+=u){for(var f=a.length>=u?a.slice(c,c+u):a,l=[],d=0;d<f.length;++d){var p=f.charCodeAt(d);45===p||46===p||95===p||126===p||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||o===n.RFC1738&&(40===p||41===p)?l[l.length]=f.charAt(d):p<128?l[l.length]=s[p]:p<2048?l[l.length]=s[192|p>>6]+s[128|63&p]:p<55296||p>=57344?l[l.length]=s[224|p>>12]+s[128|p>>6&63]+s[128|63&p]:(d+=1,p=65536+((1023&p)<<10|1023&f.charCodeAt(d)),l[l.length]=s[240|p>>18]+s[128|p>>12&63]+s[128|p>>6&63]+s[128|63&p])}h+=l.join(\"\")}return h},isBuffer:function(t){return!(!t||\"object\"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return\"[object RegExp]\"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if(\"object\"!=typeof r){if(o(e))e.push(r);else{if(!e||\"object\"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||\"object\"!=typeof e)return[e].concat(r);var s=e;return o(e)&&!o(r)&&(s=a(e,n)),o(e)&&o(r)?(r.forEach((function(r,o){if(i.call(e,o)){var s=e[o];s&&\"object\"==typeof s&&r&&\"object\"==typeof r?e[o]=t(s,r,n):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var s=r[o];return i.call(e,o)?e[o]=t(e[o],s,n):e[o]=s,e}),s)}}},95003:(t,e,r)=>{\"use strict\";var n=65536,i=4294967295;var o=r(77834).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>i)throw new RangeError(\"requested too many random bytes\");var r=o.allocUnsafe(t);if(t>0)if(t>n)for(var a=0;a<t;a+=n)s.getRandomValues(r.slice(a,a+n));else s.getRandomValues(r);if(\"function\"==typeof e)return process.nextTick((function(){e(null,r)}));return r}:t.exports=function(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},69631:(t,e,r)=>{\"use strict\";function n(){throw new Error(\"secure random number generation not supported by this browser\\nuse chrome, FireFox or Internet Explorer 11\")}var i=r(77834),o=r(95003),s=i.Buffer,a=i.kMaxLength,u=r.g.crypto||r.g.msCrypto,h=Math.pow(2,32)-1;function c(t,e){if(\"number\"!=typeof t||t!=t)throw new TypeError(\"offset must be a number\");if(t>h||t<0)throw new TypeError(\"offset must be a uint32\");if(t>a||t>e)throw new RangeError(\"offset out of range\")}function f(t,e,r){if(\"number\"!=typeof t||t!=t)throw new TypeError(\"size must be a number\");if(t>h||t<0)throw new TypeError(\"size must be a uint32\");if(t+e>r||t>a)throw new RangeError(\"buffer too small\")}function l(t,e,r,n){if(process.browser){var i=t.buffer,s=new Uint8Array(i,e,r);return u.getRandomValues(s),n?void process.nextTick((function(){n(null,t)})):t}if(!n)return o(r).copy(t,e),t;o(r,(function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}))}u&&u.getRandomValues||!process.browser?(e.randomFill=function(t,e,n,i){if(!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array');if(\"function\"==typeof e)i=e,e=0,n=t.length;else if(\"function\"==typeof n)i=n,n=t.length-e;else if(\"function\"!=typeof i)throw new TypeError('\"cb\" argument must be a function');return c(e,t.length),f(n,e,t.length),l(t,e,n,i)},e.randomFillSync=function(t,e,n){void 0===e&&(e=0);if(!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array');c(e,t.length),void 0===n&&(n=t.length-e);return f(n,e,t.length),l(t,e,n)}):(e.randomFill=n,e.randomFillSync=n)},64452:t=>{\"use strict\";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;if(\"string\"==typeof e&&(o=\"not \",e.substr(!s||s<0?0:+s,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\"))a=\"The \".concat(t,\" \").concat(i,\" \").concat(n(e,\"type\"));else{var u=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";a='The \"'.concat(t,'\" ').concat(u,\" \").concat(i,\" \").concat(n(e,\"type\"))}return a+=\". 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},77073:(t,e,r)=>{\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var i=r(28051),o=r(2557);r(91285)(h,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];h.prototype[u]||(h.prototype[u]=o.prototype[u])}function h(t){if(!(this instanceof h))return new h(t);i.call(this,t),o.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||process.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(h.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.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)}})},95163:(t,e,r)=>{\"use strict\";t.exports=i;var n=r(27640);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(91285)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},28051:(t,e,r)=>{\"use strict\";var n;t.exports=A,A.ReadableState=E;r(22699).EventEmitter;var i=function(t,e){return t.listeners(e).length},o=r(15010),s=r(48834).Buffer,a=(void 0!==r.g?r.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var u,h=r(66602);u=h&&h.debuglog?h.debuglog(\"stream\"):function(){};var c,f,l,d=r(56637),p=r(12262),m=r(87605).getHighWaterMark,g=r(64452).q,y=g.ERR_INVALID_ARG_TYPE,b=g.ERR_STREAM_PUSH_AFTER_EOF,v=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(91285)(A,o);var M=p.errorOrDestroy,_=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function E(t,e,i){n=n||r(77073),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 d,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(30214).s),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function A(t){if(n=n||r(77073),!(this instanceof A))return new A(t);var e=this instanceof n;this._readableState=new E(t,this,e),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function S(t,e,r,n,i){u(\"readableAddChunk\",e);var o,h=t._readableState;if(null===e)h.reading=!1,function(t,e){if(u(\"onEofChunk\"),e.ended)return;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?I(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,k(t)))}(t,h);else if(i||(o=function(t,e){var r;n=e,s.isBuffer(n)||n instanceof a||\"string\"==typeof e||void 0===e||t.objectMode||(r=new y(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e));var n;return r}(h,e)),o)M(t,o);else if(h.objectMode||e&&e.length>0)if(\"string\"==typeof e||h.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)h.endEmitted?M(t,new w):x(t,h,e,!0);else if(h.ended)M(t,new b);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(e=h.decoder.write(e),h.objectMode||0!==e.length?x(t,h,e,!1):P(t,h)):x(t,h,e,!1)}else n||(h.reading=!1,P(t,h));return!h.ended&&(h.length<h.highWaterMark||0===h.length)}function x(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&&I(t)),P(t,e)}Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),A.prototype.destroy=p.destroy,A.prototype._undestroy=p.undestroy,A.prototype._destroy=function(t,e){e(t)},A.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=s.from(t,e),e=\"\"),r=!0),S(this,t,e,!1,r)},A.prototype.unshift=function(t){return S(this,t,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(t){c||(c=r(30214).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 B=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>=B?t=B:(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 I(t){var e=t._readableState;u(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u(\"emitReadable\",e.flowing),e.emittedReadable=!0,process.nextTick(k,t))}function k(t){var e=t._readableState;u(\"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,N(t)}function P(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(C,t,e))}function C(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(u(\"maybeReadMore read 0\"),t.read(0),r===e.length)break}e.readingMore=!1}function R(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 O(t){u(\"readable nexttick read 0\"),t.read(0)}function L(t,e){u(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(u(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function U(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 j(t){var e=t._readableState;u(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(D,e,t))}function D(t,e){if(u(\"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 z(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}A.prototype.read=function(t){u(\"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 u(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?j(this):I(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return u(\"need readable\",i),(0===e.length||e.length-t<e.highWaterMark)&&u(\"length less than watermark\",i=!0),e.ended||e.reading?u(\"reading or ended\",i=!1):i&&(u(\"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?U(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&&j(this)),null!==n&&this.emit(\"data\",n),n},A.prototype._read=function(t){M(this,new v(\"_read()\"))},A.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,u(\"pipe count=%d opts=%j\",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?a:m;function s(e,i){u(\"onunpipe\"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",p),t.removeListener(\"drain\",h),t.removeListener(\"error\",l),t.removeListener(\"unpipe\",s),r.removeListener(\"end\",a),r.removeListener(\"end\",m),r.removeListener(\"data\",f),c=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function a(){u(\"onend\"),t.end()}n.endEmitted?process.nextTick(o):r.once(\"end\",o),t.on(\"unpipe\",s);var h=function(t){return function(){var e=t._readableState;u(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,\"data\")&&(e.flowing=!0,N(t))}}(r);t.on(\"drain\",h);var c=!1;function f(e){u(\"ondata\");var i=t.write(e);u(\"dest.write\",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==z(n.pipes,t))&&!c&&(u(\"false write response, pause\",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){u(\"onerror\",e),m(),t.removeListener(\"error\",l),0===i(t,\"error\")&&M(t,e)}function d(){t.removeListener(\"finish\",p),m()}function p(){u(\"onfinish\"),t.removeListener(\"close\",d),m()}function m(){u(\"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[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",l),t.once(\"close\",d),t.once(\"finish\",p),t.emit(\"pipe\",r),n.flowing||(u(\"pipe resume\"),r.resume()),t},A.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=z(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},A.prototype.on=function(t,e){var r=o.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,u(\"on readable\",n.length,n.reading),n.length?I(this):n.reading||process.nextTick(O,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return\"readable\"===t&&process.nextTick(R,this),r},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||process.nextTick(R,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(u(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(L,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return u(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(u(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(u(\"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){(u(\"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 o=0;o<_.length;o++)t.on(_[o],this.emit.bind(this,_[o]));return this._read=function(e){u(\"wrapped _read\",e),n&&(n=!1,t.resume())},this},\"function\"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(1029)),f(this)}),Object.defineProperty(A.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),A._fromList=U,Object.defineProperty(A.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}}),\"function\"==typeof Symbol&&(A.from=function(t,e){return void 0===l&&(l=r(90352)),l(A,t,e)})},27640:(t,e,r)=>{\"use strict\";t.exports=c;var n=r(64452).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(77073);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(91285)(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)}))}},2557:(t,e,r)=>{\"use strict\";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var i;t.exports=A,A.WritableState=E;var o={deprecate:r(5803)},s=r(15010),a=r(48834).Buffer,u=(void 0!==r.g?r.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var h,c=r(12262),f=r(87605).getHighWaterMark,l=r(64452).q,d=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,g=l.ERR_STREAM_CANNOT_PIPE,y=l.ERR_STREAM_DESTROYED,b=l.ERR_STREAM_NULL_VALUES,v=l.ERR_STREAM_WRITE_AFTER_END,w=l.ERR_UNKNOWN_ENCODING,M=c.errorOrDestroy;function _(){}function E(t,e,o){i=i||r(77073),t=t||{},\"boolean\"!=typeof o&&(o=e instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,\"writableHighWaterMark\",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,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,i=r.writecb;if(\"function\"!=typeof i)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,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(k,t,e),t._writableState.errorEmitted=!0,M(t,n)):(i(n),t._writableState.errorEmitted=!0,M(t,n),k(t,e))}(t,r,n,e,i);else{var o=T(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||B(t,r),n?process.nextTick(x,t,r,o,i):x(t,r,o,i)}}(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 A(t){var e=this instanceof(i=i||r(77073));if(!e&&!h.call(A,this))return new A(t);this._writableState=new E(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)),s.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 x(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}(t,e),e.pendingcb--,n(),k(t,e)}function B(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,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,S(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 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 I(t,e){t._final((function(r){e.pendingcb--,r&&M(t,r),e.prefinished=!0,t.emit(\"prefinish\"),k(t,e)}))}function k(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,process.nextTick(I,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(91285)(A,s),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,\"buffer\",{get:o.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]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(t){return!!h.call(this,t)||this===A&&(t&&t._writableState instanceof E)}})):h=function(t){return t instanceof this},A.prototype.pipe=function(){M(this,new g)},A.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=t,a.isBuffer(n)||n instanceof u);return s&&!a.isBuffer(t)&&(t=function(t){return a.from(t)}(t)),\"function\"==typeof e&&(r=e,e=null),s?e=\"buffer\":e||(e=i.defaultEncoding),\"function\"!=typeof r&&(r=_),i.ending?function(t,e){var r=new v;M(t,r),process.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i;return null===r?i=new b:\"string\"==typeof r||e.objectMode||(i=new d(\"chunk\",[\"string\",\"Buffer\"],r)),!i||(M(t,i),process.nextTick(n,i),!1)}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||\"string\"!=typeof e||(e=a.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i=\"buffer\",n=s)}var u=e.objectMode?1:n.length;e.length+=u;var h=e.length<e.highWaterMark;h||(e.needDrain=!0);if(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,u,n,i,o);return h}(this,i,s,t,e,r)),o},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||B(this,t))},A.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 w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new p(\"_write()\"))},A.prototype._writev=null,A.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,k(t,e),r&&(e.finished?process.nextTick(r):t.once(\"finish\",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=c.destroy,A.prototype._undestroy=c.undestroy,A.prototype._destroy=function(t,e){e(t)}},1029:(t,e,r)=>{\"use strict\";var n;function i(t,e,r){return(e=function(t){var e=function(t,e){if(\"object\"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)}(t,\"string\");return\"symbol\"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(59885),s=Symbol(\"lastResolve\"),a=Symbol(\"lastReject\"),u=Symbol(\"error\"),h=Symbol(\"ended\"),c=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),l=Symbol(\"stream\");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[l].read();null!==r&&(t[c]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){process.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[l]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[h])return Promise.resolve(d(void 0,!0));if(this[l].destroyed)return new Promise((function(e,r){process.nextTick((function(){t[u]?r(t[u]):e(d(void 0,!0))}))}));var r,n=this[c];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[h]?r(d(void 0,!0)):e[f](r,n)}),n)}}(n,this));else{var i=this[l].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[f])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[l].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(y,(i(e={},l,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,h,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[l].read();n?(r[c]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[c]=null,o(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[a];return null!==e&&(r[c]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[c]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[h]=!0})),t.on(\"readable\",m.bind(null,r)),r}},56637:(t,e,r)=>{\"use strict\";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){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(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}function o(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(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,a(n.key),n)}}function a(t){var e=function(t,e){if(\"object\"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)}(t,\"string\");return\"symbol\"==typeof e?e:String(e)}var u=r(48834).Buffer,h=r(74854).inspect,c=h&&h.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,n;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 u.alloc(0);for(var e,r,n,i=u.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=i,n=s,u.prototype.copy.call(e,r,n),s+=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=u.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:c,value:function(t,e){return h(this,i(i({},e),{},{depth:0,customInspect:!1}))}}],r&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,\"prototype\",{writable:!1}),t}()},12262:t=>{\"use strict\";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,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,t)):process.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,t)):process.nextTick(e,o,t):i?(process.nextTick(r,o),i(t)):process.nextTick(r,o)})),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)}}},59885:(t,e,r)=>{\"use strict\";var n=r(64452).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},m=function(){e.req.on(\"finish\",c)};return!function(t){return t.setHeader&&\"function\"==typeof t.abort}(e)?a&&!e._writableState&&(e.on(\"end\",u),e.on(\"close\",u)):(e.on(\"complete\",c),e.on(\"abort\",p),e.req?m():e.on(\"request\",m)),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\",m),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)}}},90352:t=>{t.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},63495:(t,e,r)=>{\"use strict\";var n;var i=r(64452).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t){t()}function h(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var c,f=function(t){return t.length?\"function\"!=typeof t[t.length-1]?a:t.pop():a}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o(\"streams\");var l=e.map((function(t,i){var o=i<e.length-1;return function(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(59885)),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\"))}}(t,o,i>0,(function(t){c||(c=t),t&&l.forEach(u),o||(l.forEach(u),f(c))}))}));return e.reduce(h)}},87605:(t,e,r)=>{\"use strict\";var n=r(64452).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}}},15010:(t,e,r)=>{t.exports=r(22699).EventEmitter},67525:(t,e,r)=>{(e=t.exports=r(28051)).Stream=e,e.Readable=e,e.Writable=r(2557),e.Duplex=r(77073),e.Transform=r(27640),e.PassThrough=r(95163),e.finished=r(59885),e.pipeline=r(63495)},51445:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer,i=r(91285),o=r(84485),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function m(t,e,r,n,i,o,s,a){return p(t+(e^r^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return p(t+(e&r|~e&n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return p(t+((e|~r)^n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return p(t+(e&n|r&~n)+o+s|0,a)+i|0}function v(t,e,r,n,i,o,s,a){return p(t+(e^(r|~n))+o+s|0,a)+i|0}i(d,o),d.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,M=0|this._b,_=0|this._c,E=0|this._d,A=0|this._e,S=0;S<80;S+=1){var x,B;S<16?(x=m(r,n,i,o,d,t[a[S]],f[0],h[S]),B=v(w,M,_,E,A,t[u[S]],l[0],c[S])):S<32?(x=g(r,n,i,o,d,t[a[S]],f[1],h[S]),B=b(w,M,_,E,A,t[u[S]],l[1],c[S])):S<48?(x=y(r,n,i,o,d,t[a[S]],f[2],h[S]),B=y(w,M,_,E,A,t[u[S]],l[2],c[S])):S<64?(x=b(r,n,i,o,d,t[a[S]],f[3],h[S]),B=g(w,M,_,E,A,t[u[S]],l[3],c[S])):(x=v(r,n,i,o,d,t[a[S]],f[4],h[S]),B=m(w,M,_,E,A,t[u[S]],l[4],c[S])),r=d,d=o,o=p(i,10),i=n,n=x,w=A,A=E,E=p(_,10),_=M,M=B}var T=this._b+i+E|0;this._b=this._c+o+A|0,this._c=this._d+d+w|0,this._d=this._e+r+M|0,this._e=this._a+n+_|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},77834:(t,e,r)=>{var n=r(48834),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)}},27654:(t,e,r)=>{\"use strict\";var n,i=r(48834),o=i.Buffer,s={};for(n in i)i.hasOwnProperty(n)&&\"SlowBuffer\"!==n&&\"Buffer\"!==n&&(s[n]=i[n]);var a=s.Buffer={};for(n in o)o.hasOwnProperty(n)&&\"allocUnsafe\"!==n&&\"allocUnsafeSlow\"!==n&&(a[n]=o[n]);if(s.Buffer.prototype=o.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError('The \"value\" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t);return o(t,e,r)}),a.alloc||(a.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError('The \"size\" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var n=o(t);return e&&0!==e.length?\"string\"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=process.binding(\"buffer\").kStringMaxLength}catch(t){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s},7847:(t,e,r)=>{const n=Symbol(\"SemVer ANY\");class i{static get ANY(){return n}constructor(t,e){if(e=o(e),t instanceof i){if(t.loose===!!e.loose)return t;t=t.value}t=t.trim().split(/\\s+/).join(\" \"),h(\"comparator\",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===n?this.value=\"\":this.value=this.operator+this.semver.version,h(\"comp\",this)}parse(t){const e=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=t.match(e);if(!r)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==r[1]?r[1]:\"\",\"=\"===this.operator&&(this.operator=\"\"),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(t){if(h(\"Comparator.test\",t,this.options.loose),this.semver===n||t===n)return!0;if(\"string\"==typeof t)try{t=new c(t,this.options)}catch(t){return!1}return u(t,this.operator,this.semver,this.options)}intersects(t,e){if(!(t instanceof i))throw new TypeError(\"a Comparator is required\");return\"\"===this.operator?\"\"===this.value||new f(t.value,e).test(this.value):\"\"===t.operator?\"\"===t.value||new f(this.value,e).test(t.semver):(!(e=o(e)).includePrerelease||\"<0.0.0-0\"!==this.value&&\"<0.0.0-0\"!==t.value)&&(!(!e.includePrerelease&&(this.value.startsWith(\"<0.0.0\")||t.value.startsWith(\"<0.0.0\")))&&(!(!this.operator.startsWith(\">\")||!t.operator.startsWith(\">\"))||(!(!this.operator.startsWith(\"<\")||!t.operator.startsWith(\"<\"))||(!(this.semver.version!==t.semver.version||!this.operator.includes(\"=\")||!t.operator.includes(\"=\"))||(!!(u(this.semver,\"<\",t.semver,e)&&this.operator.startsWith(\">\")&&t.operator.startsWith(\"<\"))||!!(u(this.semver,\">\",t.semver,e)&&this.operator.startsWith(\"<\")&&t.operator.startsWith(\">\")))))))}}t.exports=i;const o=r(71388),{safeRe:s,t:a}=r(94808),u=r(28117),h=r(10952),c=r(52435),f=r(66843)},66843:(t,e,r)=>{const n=/\\s+/g;class i{constructor(t,e){if(e=s(e),t instanceof i)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new i(t.raw,e);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().replace(n,\" \"),this.set=this.raw.split(\"||\").map((t=>this.parseRange(t.trim()))).filter((t=>t.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const t=this.set[0];if(this.set=this.set.filter((t=>!y(t[0]))),0===this.set.length)this.set=[t];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&b(t[0])){this.set=[t];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted=\"\";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+=\"||\");const e=this.set[t];for(let t=0;t<e.length;t++)t>0&&(this.formatted+=\" \"),this.formatted+=e[t].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){const e=((this.options.includePrerelease&&m)|(this.options.loose&&g))+\":\"+t,r=o.get(e);if(r)return r;const n=this.options.loose,i=n?c[f.HYPHENRANGELOOSE]:c[f.HYPHENRANGE];t=t.replace(i,k(this.options.includePrerelease)),u(\"hyphen replace\",t),t=t.replace(c[f.COMPARATORTRIM],l),u(\"comparator trim\",t),t=t.replace(c[f.TILDETRIM],d),u(\"tilde trim\",t),t=t.replace(c[f.CARETTRIM],p),u(\"caret trim\",t);let s=t.split(\" \").map((t=>w(t,this.options))).join(\" \").split(/\\s+/).map((t=>I(t,this.options)));n&&(s=s.filter((t=>(u(\"loose invalid filter\",t,this.options),!!t.match(c[f.COMPARATORLOOSE]))))),u(\"range list\",s);const h=new Map,b=s.map((t=>new a(t,this.options)));for(const t of b){if(y(t))return[t];h.set(t.value,t)}h.size>1&&h.has(\"\")&&h.delete(\"\");const v=[...h.values()];return o.set(e,v),v}intersects(t,e){if(!(t instanceof i))throw new TypeError(\"a Range is required\");return this.set.some((r=>v(r,e)&&t.set.some((t=>v(t,e)&&r.every((r=>t.every((t=>r.intersects(t,e)))))))))}test(t){if(!t)return!1;if(\"string\"==typeof t)try{t=new h(t,this.options)}catch(t){return!1}for(let e=0;e<this.set.length;e++)if(P(this.set[e],t,this.options))return!0;return!1}}t.exports=i;const o=new(r(20139)),s=r(71388),a=r(7847),u=r(10952),h=r(52435),{safeRe:c,t:f,comparatorTrimReplace:l,tildeTrimReplace:d,caretTrimReplace:p}=r(94808),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=r(55558),y=t=>\"<0.0.0-0\"===t.value,b=t=>\"\"===t.value,v=(t,e)=>{let r=!0;const n=t.slice();let i=n.pop();for(;r&&n.length;)r=n.every((t=>i.intersects(t,e))),i=n.pop();return r},w=(t,e)=>(u(\"comp\",t,e),t=A(t,e),u(\"caret\",t),t=_(t,e),u(\"tildes\",t),t=x(t,e),u(\"xrange\",t),t=T(t,e),u(\"stars\",t),t),M=t=>!t||\"x\"===t.toLowerCase()||\"*\"===t,_=(t,e)=>t.trim().split(/\\s+/).map((t=>E(t,e))).join(\" \"),E=(t,e)=>{const r=e.loose?c[f.TILDELOOSE]:c[f.TILDE];return t.replace(r,((e,r,n,i,o)=>{let s;return u(\"tilde\",t,e,r,n,i,o),M(r)?s=\"\":M(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:M(i)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(u(\"replaceTilde pr\",o),s=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,u(\"tilde return\",s),s}))},A=(t,e)=>t.trim().split(/\\s+/).map((t=>S(t,e))).join(\" \"),S=(t,e)=>{u(\"caret\",t,e);const r=e.loose?c[f.CARETLOOSE]:c[f.CARET],n=e.includePrerelease?\"-0\":\"\";return t.replace(r,((e,r,i,o,s)=>{let a;return u(\"caret\",t,e,r,i,o,s),M(r)?a=\"\":M(i)?a=`>=${r}.0.0${n} <${+r+1}.0.0-0`:M(o)?a=\"0\"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:s?(u(\"replaceCaret pr\",s),a=\"0\"===r?\"0\"===i?`>=${r}.${i}.${o}-${s} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${s} <${+r+1}.0.0-0`):(u(\"no pr\"),a=\"0\"===r?\"0\"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),u(\"caret return\",a),a}))},x=(t,e)=>(u(\"replaceXRanges\",t,e),t.split(/\\s+/).map((t=>B(t,e))).join(\" \")),B=(t,e)=>{t=t.trim();const r=e.loose?c[f.XRANGELOOSE]:c[f.XRANGE];return t.replace(r,((r,n,i,o,s,a)=>{u(\"xRange\",t,r,n,i,o,s,a);const h=M(i),c=h||M(o),f=c||M(s),l=f;return\"=\"===n&&l&&(n=\"\"),a=e.includePrerelease?\"-0\":\"\",h?r=\">\"===n||\"<\"===n?\"<0.0.0-0\":\"*\":n&&l?(c&&(o=0),s=0,\">\"===n?(n=\">=\",c?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):\"<=\"===n&&(n=\"<\",c?i=+i+1:o=+o+1),\"<\"===n&&(a=\"-0\"),r=`${n+i}.${o}.${s}${a}`):c?r=`>=${i}.0.0${a} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${o}.0${a} <${i}.${+o+1}.0-0`),u(\"xRange return\",r),r}))},T=(t,e)=>(u(\"replaceStars\",t,e),t.trim().replace(c[f.STAR],\"\")),I=(t,e)=>(u(\"replaceGTE0\",t,e),t.trim().replace(c[e.includePrerelease?f.GTE0PRE:f.GTE0],\"\")),k=t=>(e,r,n,i,o,s,a,u,h,c,f,l)=>`${r=M(n)?\"\":M(i)?`>=${n}.0.0${t?\"-0\":\"\"}`:M(o)?`>=${n}.${i}.0${t?\"-0\":\"\"}`:s?`>=${r}`:`>=${r}${t?\"-0\":\"\"}`} ${u=M(h)?\"\":M(c)?`<${+h+1}.0.0-0`:M(f)?`<${h}.${+c+1}.0-0`:l?`<=${h}.${c}.${f}-${l}`:t?`<${h}.${c}.${+f+1}-0`:`<=${u}`}`.trim(),P=(t,e,r)=>{for(let r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let r=0;r<t.length;r++)if(u(t[r].semver),t[r].semver!==a.ANY&&t[r].semver.prerelease.length>0){const n=t[r].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}},52435:(t,e,r)=>{const n=r(10952),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(55558),{safeRe:s,t:a}=r(94808),u=r(71388),{compareIdentifiers:h}=r(14935);class c{constructor(t,e){if(e=u(e),t instanceof c){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if(\"string\"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof t}\".`);if(t.length>i)throw new TypeError(`version is longer than ${i} characters`);n(\"SemVer\",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const r=t.trim().match(e.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError(\"Invalid major version\");if(this.minor>o||this.minor<0)throw new TypeError(\"Invalid minor version\");if(this.patch>o||this.patch<0)throw new TypeError(\"Invalid patch version\");r[4]?this.prerelease=r[4].split(\".\").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<o)return e}return t})):this.prerelease=[],this.build=r[5]?r[5].split(\".\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\".\")}`),this.version}toString(){return this.version}compare(t){if(n(\"SemVer.compare\",this.version,this.options,t),!(t instanceof c)){if(\"string\"==typeof t&&t===this.version)return 0;t=new c(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof c||(t=new c(t,this.options)),h(this.major,t.major)||h(this.minor,t.minor)||h(this.patch,t.patch)}comparePre(t){if(t instanceof c||(t=new c(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const r=this.prerelease[e],i=t.prerelease[e];if(n(\"prerelease compare\",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return h(r,i)}while(++e)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let e=0;do{const r=this.build[e],i=t.build[e];if(n(\"build compare\",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return h(r,i)}while(++e)}inc(t,e,r){switch(t){case\"premajor\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\"pre\",e,r);break;case\"preminor\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\"pre\",e,r);break;case\"prepatch\":this.prerelease.length=0,this.inc(\"patch\",e,r),this.inc(\"pre\",e,r);break;case\"prerelease\":0===this.prerelease.length&&this.inc(\"patch\",e,r),this.inc(\"pre\",e,r);break;case\"major\":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\"minor\":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case\"patch\":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case\"pre\":{const t=Number(r)?1:0;if(!e&&!1===r)throw new Error(\"invalid increment argument: identifier is empty\");if(0===this.prerelease.length)this.prerelease=[t];else{let n=this.prerelease.length;for(;--n>=0;)\"number\"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(e===this.prerelease.join(\".\")&&!1===r)throw new Error(\"invalid increment argument: identifier already exists\");this.prerelease.push(t)}}if(e){let n=[e,t];!1===r&&(n=[e]),0===h(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(\".\")}`),this}}t.exports=c},36694:(t,e,r)=>{const n=r(79943);t.exports=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,\"\"),e);return r?r.version:null}},28117:(t,e,r)=>{const n=r(33276),i=r(77893),o=r(16379),s=r(8463),a=r(21897),u=r(30506);t.exports=(t,e,r,h)=>{switch(e){case\"===\":return\"object\"==typeof t&&(t=t.version),\"object\"==typeof r&&(r=r.version),t===r;case\"!==\":return\"object\"==typeof t&&(t=t.version),\"object\"==typeof r&&(r=r.version),t!==r;case\"\":case\"=\":case\"==\":return n(t,r,h);case\"!=\":return i(t,r,h);case\">\":return o(t,r,h);case\">=\":return s(t,r,h);case\"<\":return a(t,r,h);case\"<=\":return u(t,r,h);default:throw new TypeError(`Invalid operator: ${e}`)}}},98686:(t,e,r)=>{const n=r(52435),i=r(79943),{safeRe:o,t:s}=r(94808);t.exports=(t,e)=>{if(t instanceof n)return t;if(\"number\"==typeof t&&(t=String(t)),\"string\"!=typeof t)return null;let r=null;if((e=e||{}).rtl){const n=e.includePrerelease?o[s.COERCERTLFULL]:o[s.COERCERTL];let i;for(;(i=n.exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),n.lastIndex=i.index+i[1].length+i[2].length;n.lastIndex=-1}else r=t.match(e.includePrerelease?o[s.COERCEFULL]:o[s.COERCE]);if(null===r)return null;const a=r[2],u=r[3]||\"0\",h=r[4]||\"0\",c=e.includePrerelease&&r[5]?`-${r[5]}`:\"\",f=e.includePrerelease&&r[6]?`+${r[6]}`:\"\";return i(`${a}.${u}.${h}${c}${f}`,e)}},65914:(t,e,r)=>{const n=r(52435);t.exports=(t,e,r)=>{const i=new n(t,r),o=new n(e,r);return i.compare(o)||i.compareBuild(o)}},55404:(t,e,r)=>{const n=r(92271);t.exports=(t,e)=>n(t,e,!0)},92271:(t,e,r)=>{const n=r(52435);t.exports=(t,e,r)=>new n(t,r).compare(new n(e,r))},66007:(t,e,r)=>{const n=r(79943);t.exports=(t,e)=>{const r=n(t,null,!0),i=n(e,null,!0),o=r.compare(i);if(0===o)return null;const s=o>0,a=s?r:i,u=s?i:r,h=!!a.prerelease.length;if(!!u.prerelease.length&&!h)return u.patch||u.minor?a.patch?\"patch\":a.minor?\"minor\":\"major\":\"major\";const c=h?\"pre\":\"\";return r.major!==i.major?c+\"major\":r.minor!==i.minor?c+\"minor\":r.patch!==i.patch?c+\"patch\":\"prerelease\"}},33276:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>0===n(t,e,r)},16379:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(t,e,r)>0},8463:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(t,e,r)>=0},86360:(t,e,r)=>{const n=r(52435);t.exports=(t,e,r,i,o)=>{\"string\"==typeof r&&(o=i,i=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,i,o).version}catch(t){return null}}},21897:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(t,e,r)<0},30506:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(t,e,r)<=0},14551:(t,e,r)=>{const n=r(52435);t.exports=(t,e)=>new n(t,e).major},469:(t,e,r)=>{const n=r(52435);t.exports=(t,e)=>new n(t,e).minor},77893:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>0!==n(t,e,r)},79943:(t,e,r)=>{const n=r(52435);t.exports=(t,e,r=!1)=>{if(t instanceof n)return t;try{return new n(t,e)}catch(t){if(!r)return null;throw t}}},54250:(t,e,r)=>{const n=r(52435);t.exports=(t,e)=>new n(t,e).patch},58204:(t,e,r)=>{const n=r(79943);t.exports=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null}},70733:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(e,t,r)},72961:(t,e,r)=>{const n=r(65914);t.exports=(t,e)=>t.sort(((t,r)=>n(r,t,e)))},59844:(t,e,r)=>{const n=r(66843);t.exports=(t,e,r)=>{try{e=new n(e,r)}catch(t){return!1}return e.test(t)}},51116:(t,e,r)=>{const n=r(65914);t.exports=(t,e)=>t.sort(((t,r)=>n(t,r,e)))},97230:(t,e,r)=>{const n=r(79943);t.exports=(t,e)=>{const r=n(t,e);return r?r.version:null}},97699:(t,e,r)=>{const n=r(94808),i=r(55558),o=r(52435),s=r(14935),a=r(79943),u=r(97230),h=r(36694),c=r(86360),f=r(66007),l=r(14551),d=r(469),p=r(54250),m=r(58204),g=r(92271),y=r(70733),b=r(55404),v=r(65914),w=r(51116),M=r(72961),_=r(16379),E=r(21897),A=r(33276),S=r(77893),x=r(8463),B=r(30506),T=r(28117),I=r(98686),k=r(7847),P=r(66843),C=r(59844),R=r(48865),O=r(53727),L=r(14338),N=r(21542),U=r(36240),j=r(89106),D=r(90995),z=r(47805),H=r(22013),F=r(81338),$=r(53122);t.exports={parse:a,valid:u,clean:h,inc:c,diff:f,major:l,minor:d,patch:p,prerelease:m,compare:g,rcompare:y,compareLoose:b,compareBuild:v,sort:w,rsort:M,gt:_,lt:E,eq:A,neq:S,gte:x,lte:B,cmp:T,coerce:I,Comparator:k,Range:P,satisfies:C,toComparators:R,maxSatisfying:O,minSatisfying:L,minVersion:N,validRange:U,outside:j,gtr:D,ltr:z,intersects:H,simplifyRange:F,subset:$,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},55558:t=>{const e=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:[\"major\",\"premajor\",\"minor\",\"preminor\",\"patch\",\"prepatch\",\"prerelease\"],SEMVER_SPEC_VERSION:\"2.0.0\",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},10952:t=>{const e=\"object\"==typeof process&&process.env&&/\\bsemver\\b/i.test(\"false\")?(...t)=>console.error(\"SEMVER\",...t):()=>{};t.exports=e},14935:t=>{const e=/^[0-9]+$/,r=(t,r)=>{const n=e.test(t),i=e.test(r);return n&&i&&(t=+t,r=+r),t===r?0:n&&!i?-1:i&&!n?1:t<r?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(t,e)=>r(e,t)}},20139:t=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(t){const e=this.map.get(t);return void 0===e?void 0:(this.map.delete(t),this.map.set(t,e),e)}delete(t){return this.map.delete(t)}set(t,e){if(!this.delete(t)&&void 0!==e){if(this.map.size>=this.max){const t=this.map.keys().next().value;this.delete(t)}this.map.set(t,e)}return this}}},71388:t=>{const e=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=t=>t?\"object\"!=typeof t?e:t:r},94808:(t,e,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=r(55558),s=r(10952),a=(e=t.exports={}).re=[],u=e.safeRe=[],h=e.src=[],c=e.t={};let f=0;const l=\"[a-zA-Z0-9-]\",d=[[\"\\\\s\",1],[\"\\\\d\",o],[l,i]],p=(t,e,r)=>{const n=(t=>{for(const[e,r]of d)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t})(e),i=f++;s(t,i,e),c[t]=i,h[i]=e,a[i]=new RegExp(e,r?\"g\":void 0),u[i]=new RegExp(n,r?\"g\":void 0)};p(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\"),p(\"NUMERICIDENTIFIERLOOSE\",\"\\\\d+\"),p(\"NONNUMERICIDENTIFIER\",`\\\\d*[a-zA-Z-]${l}*`),p(\"MAINVERSION\",`(${h[c.NUMERICIDENTIFIER]})\\\\.(${h[c.NUMERICIDENTIFIER]})\\\\.(${h[c.NUMERICIDENTIFIER]})`),p(\"MAINVERSIONLOOSE\",`(${h[c.NUMERICIDENTIFIERLOOSE]})\\\\.(${h[c.NUMERICIDENTIFIERLOOSE]})\\\\.(${h[c.NUMERICIDENTIFIERLOOSE]})`),p(\"PRERELEASEIDENTIFIER\",`(?:${h[c.NUMERICIDENTIFIER]}|${h[c.NONNUMERICIDENTIFIER]})`),p(\"PRERELEASEIDENTIFIERLOOSE\",`(?:${h[c.NUMERICIDENTIFIERLOOSE]}|${h[c.NONNUMERICIDENTIFIER]})`),p(\"PRERELEASE\",`(?:-(${h[c.PRERELEASEIDENTIFIER]}(?:\\\\.${h[c.PRERELEASEIDENTIFIER]})*))`),p(\"PRERELEASELOOSE\",`(?:-?(${h[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${h[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p(\"BUILDIDENTIFIER\",`${l}+`),p(\"BUILD\",`(?:\\\\+(${h[c.BUILDIDENTIFIER]}(?:\\\\.${h[c.BUILDIDENTIFIER]})*))`),p(\"FULLPLAIN\",`v?${h[c.MAINVERSION]}${h[c.PRERELEASE]}?${h[c.BUILD]}?`),p(\"FULL\",`^${h[c.FULLPLAIN]}$`),p(\"LOOSEPLAIN\",`[v=\\\\s]*${h[c.MAINVERSIONLOOSE]}${h[c.PRERELEASELOOSE]}?${h[c.BUILD]}?`),p(\"LOOSE\",`^${h[c.LOOSEPLAIN]}$`),p(\"GTLT\",\"((?:<|>)?=?)\"),p(\"XRANGEIDENTIFIERLOOSE\",`${h[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`),p(\"XRANGEIDENTIFIER\",`${h[c.NUMERICIDENTIFIER]}|x|X|\\\\*`),p(\"XRANGEPLAIN\",`[v=\\\\s]*(${h[c.XRANGEIDENTIFIER]})(?:\\\\.(${h[c.XRANGEIDENTIFIER]})(?:\\\\.(${h[c.XRANGEIDENTIFIER]})(?:${h[c.PRERELEASE]})?${h[c.BUILD]}?)?)?`),p(\"XRANGEPLAINLOOSE\",`[v=\\\\s]*(${h[c.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${h[c.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${h[c.XRANGEIDENTIFIERLOOSE]})(?:${h[c.PRERELEASELOOSE]})?${h[c.BUILD]}?)?)?`),p(\"XRANGE\",`^${h[c.GTLT]}\\\\s*${h[c.XRANGEPLAIN]}$`),p(\"XRANGELOOSE\",`^${h[c.GTLT]}\\\\s*${h[c.XRANGEPLAINLOOSE]}$`),p(\"COERCEPLAIN\",`(^|[^\\\\d])(\\\\d{1,${n}})(?:\\\\.(\\\\d{1,${n}}))?(?:\\\\.(\\\\d{1,${n}}))?`),p(\"COERCE\",`${h[c.COERCEPLAIN]}(?:$|[^\\\\d])`),p(\"COERCEFULL\",h[c.COERCEPLAIN]+`(?:${h[c.PRERELEASE]})?`+`(?:${h[c.BUILD]})?(?:$|[^\\\\d])`),p(\"COERCERTL\",h[c.COERCE],!0),p(\"COERCERTLFULL\",h[c.COERCEFULL],!0),p(\"LONETILDE\",\"(?:~>?)\"),p(\"TILDETRIM\",`(\\\\s*)${h[c.LONETILDE]}\\\\s+`,!0),e.tildeTrimReplace=\"$1~\",p(\"TILDE\",`^${h[c.LONETILDE]}${h[c.XRANGEPLAIN]}$`),p(\"TILDELOOSE\",`^${h[c.LONETILDE]}${h[c.XRANGEPLAINLOOSE]}$`),p(\"LONECARET\",\"(?:\\\\^)\"),p(\"CARETTRIM\",`(\\\\s*)${h[c.LONECARET]}\\\\s+`,!0),e.caretTrimReplace=\"$1^\",p(\"CARET\",`^${h[c.LONECARET]}${h[c.XRANGEPLAIN]}$`),p(\"CARETLOOSE\",`^${h[c.LONECARET]}${h[c.XRANGEPLAINLOOSE]}$`),p(\"COMPARATORLOOSE\",`^${h[c.GTLT]}\\\\s*(${h[c.LOOSEPLAIN]})$|^$`),p(\"COMPARATOR\",`^${h[c.GTLT]}\\\\s*(${h[c.FULLPLAIN]})$|^$`),p(\"COMPARATORTRIM\",`(\\\\s*)${h[c.GTLT]}\\\\s*(${h[c.LOOSEPLAIN]}|${h[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=\"$1$2$3\",p(\"HYPHENRANGE\",`^\\\\s*(${h[c.XRANGEPLAIN]})\\\\s+-\\\\s+(${h[c.XRANGEPLAIN]})\\\\s*$`),p(\"HYPHENRANGELOOSE\",`^\\\\s*(${h[c.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${h[c.XRANGEPLAINLOOSE]})\\\\s*$`),p(\"STAR\",\"(<|>)?=?\\\\s*\\\\*\"),p(\"GTE0\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\"),p(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\")},90995:(t,e,r)=>{const n=r(89106);t.exports=(t,e,r)=>n(t,e,\">\",r)},22013:(t,e,r)=>{const n=r(66843);t.exports=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r))},47805:(t,e,r)=>{const n=r(89106);t.exports=(t,e,r)=>n(t,e,\"<\",r)},53727:(t,e,r)=>{const n=r(52435),i=r(66843);t.exports=(t,e,r)=>{let o=null,s=null,a=null;try{a=new i(e,r)}catch(t){return null}return t.forEach((t=>{a.test(t)&&(o&&-1!==s.compare(t)||(o=t,s=new n(o,r)))})),o}},14338:(t,e,r)=>{const n=r(52435),i=r(66843);t.exports=(t,e,r)=>{let o=null,s=null,a=null;try{a=new i(e,r)}catch(t){return null}return t.forEach((t=>{a.test(t)&&(o&&1!==s.compare(t)||(o=t,s=new n(o,r)))})),o}},21542:(t,e,r)=>{const n=r(52435),i=r(66843),o=r(16379);t.exports=(t,e)=>{t=new i(t,e);let r=new n(\"0.0.0\");if(t.test(r))return r;if(r=new n(\"0.0.0-0\"),t.test(r))return r;r=null;for(let e=0;e<t.set.length;++e){const i=t.set[e];let s=null;i.forEach((t=>{const e=new n(t.semver.version);switch(t.operator){case\">\":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case\"\":case\">=\":s&&!o(e,s)||(s=e);break;case\"<\":case\"<=\":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!s||r&&!o(r,s)||(r=s)}return r&&t.test(r)?r:null}},89106:(t,e,r)=>{const n=r(52435),i=r(7847),{ANY:o}=i,s=r(66843),a=r(59844),u=r(16379),h=r(21897),c=r(30506),f=r(8463);t.exports=(t,e,r,l)=>{let d,p,m,g,y;switch(t=new n(t,l),e=new s(e,l),r){case\">\":d=u,p=c,m=h,g=\">\",y=\">=\";break;case\"<\":d=h,p=f,m=u,g=\"<\",y=\"<=\";break;default:throw new TypeError('Must provide a hilo val of \"<\" or \">\"')}if(a(t,e,l))return!1;for(let r=0;r<e.set.length;++r){const n=e.set[r];let s=null,a=null;if(n.forEach((t=>{t.semver===o&&(t=new i(\">=0.0.0\")),s=s||t,a=a||t,d(t.semver,s.semver,l)?s=t:m(t.semver,a.semver,l)&&(a=t)})),s.operator===g||s.operator===y)return!1;if((!a.operator||a.operator===g)&&p(t,a.semver))return!1;if(a.operator===y&&m(t,a.semver))return!1}return!0}},81338:(t,e,r)=>{const n=r(59844),i=r(92271);t.exports=(t,e,r)=>{const o=[];let s=null,a=null;const u=t.sort(((t,e)=>i(t,e,r)));for(const t of u){n(t,e,r)?(a=t,s||(s=t)):(a&&o.push([s,a]),a=null,s=null)}s&&o.push([s,null]);const h=[];for(const[t,e]of o)t===e?h.push(t):e||t!==u[0]?e?t===u[0]?h.push(`<=${e}`):h.push(`${t} - ${e}`):h.push(`>=${t}`):h.push(\"*\");const c=h.join(\" || \"),f=\"string\"==typeof e.raw?e.raw:String(e);return c.length<f.length?c:e}},53122:(t,e,r)=>{const n=r(66843),i=r(7847),{ANY:o}=i,s=r(59844),a=r(92271),u=[new i(\">=0.0.0-0\")],h=[new i(\">=0.0.0\")],c=(t,e,r)=>{if(t===e)return!0;if(1===t.length&&t[0].semver===o){if(1===e.length&&e[0].semver===o)return!0;t=r.includePrerelease?u:h}if(1===e.length&&e[0].semver===o){if(r.includePrerelease)return!0;e=h}const n=new Set;let i,c,d,p,m,g,y;for(const e of t)\">\"===e.operator||\">=\"===e.operator?i=f(i,e,r):\"<\"===e.operator||\"<=\"===e.operator?c=l(c,e,r):n.add(e.semver);if(n.size>1)return null;if(i&&c){if(d=a(i.semver,c.semver,r),d>0)return null;if(0===d&&(\">=\"!==i.operator||\"<=\"!==c.operator))return null}for(const t of n){if(i&&!s(t,String(i),r))return null;if(c&&!s(t,String(c),r))return null;for(const n of e)if(!s(t,String(n),r))return!1;return!0}let b=!(!c||r.includePrerelease||!c.semver.prerelease.length)&&c.semver,v=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;b&&1===b.prerelease.length&&\"<\"===c.operator&&0===b.prerelease[0]&&(b=!1);for(const t of e){if(y=y||\">\"===t.operator||\">=\"===t.operator,g=g||\"<\"===t.operator||\"<=\"===t.operator,i)if(v&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===v.major&&t.semver.minor===v.minor&&t.semver.patch===v.patch&&(v=!1),\">\"===t.operator||\">=\"===t.operator){if(p=f(i,t,r),p===t&&p!==i)return!1}else if(\">=\"===i.operator&&!s(i.semver,String(t),r))return!1;if(c)if(b&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===b.major&&t.semver.minor===b.minor&&t.semver.patch===b.patch&&(b=!1),\"<\"===t.operator||\"<=\"===t.operator){if(m=l(c,t,r),m===t&&m!==c)return!1}else if(\"<=\"===c.operator&&!s(c.semver,String(t),r))return!1;if(!t.operator&&(c||i)&&0!==d)return!1}return!(i&&g&&!c&&0!==d)&&(!(c&&y&&!i&&0!==d)&&(!v&&!b))},f=(t,e,r)=>{if(!t)return e;const n=a(t.semver,e.semver,r);return n>0?t:n<0||\">\"===e.operator&&\">=\"===t.operator?e:t},l=(t,e,r)=>{if(!t)return e;const n=a(t.semver,e.semver,r);return n<0?t:n>0||\"<\"===e.operator&&\"<=\"===t.operator?e:t};t.exports=(t,e,r={})=>{if(t===e)return!0;t=new n(t,r),e=new n(e,r);let i=!1;t:for(const n of t.set){for(const t of e.set){const e=c(n,t,r);if(i=i||null!==e,e)continue t}if(i)return!1}return!0}},48865:(t,e,r)=>{const n=r(66843);t.exports=(t,e)=>new n(t,e).set.map((t=>t.map((t=>t.value)).join(\" \").trim().split(\" \")))},36240:(t,e,r)=>{const n=r(66843);t.exports=(t,e)=>{try{return new n(t,e).range||\"*\"}catch(t){return null}}},47669:(t,e,r)=>{\"use strict\";var n=r(67286),i=r(75195),o=r(81181)(),s=r(50326),a=r(5408),u=n(\"%Math.floor%\");t.exports=function(t,e){if(\"function\"!=typeof t)throw new a(\"`fn` is not a function\");if(\"number\"!=typeof e||e<0||e>4294967295||u(e)!==e)throw new a(\"`length` must be a positive 32-bit integer\");var r=arguments.length>2&&!!arguments[2],n=!0,h=!0;if(\"length\"in t&&s){var c=s(t,\"length\");c&&!c.configurable&&(n=!1),c&&!c.writable&&(h=!1)}return(n||h||!r)&&(o?i(t,\"length\",e,!0,!0):i(t,\"length\",e)),t}},73327:(t,e,r)=>{var n=r(77834).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){\"string\"==typeof t&&(e=e||\"utf8\",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,h=Math.min(o-a,i-u),c=0;c<h;c++)r[u+c]=t[a+c];a+=h,(s+=h)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},t.exports=i},9065:(t,e,r)=>{var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+\" is not supported (we accept pull requests)\");return new e};n.sha=r(8820),n.sha1=r(17885),n.sha224=r(58321),n.sha256=r(74424),n.sha384=r(90213),n.sha512=r(55596)},8820:(t,e,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function h(t){return t<<30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((e=n)<<5|e>>>27)+c(d,i,o,a)+u+r[l]+s[d];u=a,a=o,o=h(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},17885:(t,e,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function h(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=h(n)+f(p,i,o,a)+u+r[d]+s[p]|0;u=a,a=o,o=c(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},58321:(t,e,r)=>{var n=r(91285),i=r(74424),o=r(73327),s=r(77834).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},74424:(t,e,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function h(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function f(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)r[y]=t.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((e=r[y-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[y-7]+d(r[y-15])+r[y-16];for(var b=0;b<64;++b){var v=g+l(u)+h(u,p,m)+s[b]+r[b]|0,w=f(n)+c(n,i,o)|0;g=m,m=p,p=u,u=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},90213:(t,e,r)=>{var n=r(91285),i=r(55596),o=r(73327),s=r(77834).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},55596:(t,e,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function h(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function y(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,M=0|this._bl,_=0|this._cl,E=0|this._dl,A=0|this._el,S=0|this._fl,x=0|this._gl,B=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var I=e[T-30],k=e[T-30+1],P=d(I,k),C=p(k,I),R=m(I=e[T-4],k=e[T-4+1]),O=g(k,I),L=e[T-14],N=e[T-14+1],U=e[T-32],j=e[T-32+1],D=C+N|0,z=P+L+y(D,C)|0;z=(z=z+R+y(D=D+O|0,O)|0)+U+y(D=D+j|0,j)|0,e[T]=z,e[T+1]=D}for(var H=0;H<160;H+=2){z=e[H],D=e[H+1];var F=c(r,n,i),$=c(w,M,_),V=f(r,w),q=f(w,r),G=l(a,A),K=l(A,a),J=s[H],W=s[H+1],Z=h(a,u,b),X=h(A,S,x),Y=B+K|0,Q=v+G+y(Y,B)|0;Q=(Q=(Q=Q+Z+y(Y=Y+X|0,X)|0)+J+y(Y=Y+W|0,W)|0)+z+y(Y=Y+D|0,D)|0;var tt=q+$|0,et=V+F+y(tt,q)|0;v=b,B=x,b=u,x=S,u=a,S=A,a=o+Q+y(A=E+Y|0,E)|0,o=i,E=_,i=n,_=M,n=r,M=w,r=Q+et+y(w=Y+tt|0,Y)|0}this._al=this._al+w|0,this._bl=this._bl+M|0,this._cl=this._cl+_|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+S|0,this._gl=this._gl+x|0,this._hl=this._hl+B|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,M)|0,this._ch=this._ch+i+y(this._cl,_)|0,this._dh=this._dh+o+y(this._dl,E)|0,this._eh=this._eh+a+y(this._el,A)|0,this._fh=this._fh+u+y(this._fl,S)|0,this._gh=this._gh+b+y(this._gl,x)|0,this._hh=this._hh+v+y(this._hl,B)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},74294:(t,e,r)=>{\"use strict\";var n=r(67286),i=r(62680),o=r(99500),s=r(5408),a=n(\"%WeakMap%\",!0),u=n(\"%Map%\",!0),h=i(\"WeakMap.prototype.get\",!0),c=i(\"WeakMap.prototype.set\",!0),f=i(\"WeakMap.prototype.has\",!0),l=i(\"Map.prototype.get\",!0),d=i(\"Map.prototype.set\",!0),p=i(\"Map.prototype.has\",!0),m=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new s(\"Side channel does not contain \"+o(t))},get:function(n){if(a&&n&&(\"object\"==typeof n||\"function\"==typeof n)){if(t)return h(t,n)}else if(u){if(e)return l(e,n)}else if(r)return function(t,e){var r=m(t,e);return r&&r.value}(r,n)},has:function(n){if(a&&n&&(\"object\"==typeof n||\"function\"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){return!!m(t,e)}(r,n);return!1},set:function(n,i){a&&n&&(\"object\"==typeof n||\"function\"==typeof n)?(t||(t=new a),c(t,n,i)):u?(e||(e=new u),d(e,n,i)):(r||(r={key:{},next:null}),function(t,e,r){var n=m(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,i))}};return n}},54851:(t,e,r)=>{t.exports=i;var n=r(22699).EventEmitter;function i(){n.call(this)}r(91285)(i,n),i.Readable=r(28051),i.Writable=r(2557),i.Duplex=r(77073),i.Transform=r(27640),i.PassThrough=r(95163),i.finished=r(59885),i.pipeline=r(63495),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on(\"data\",i),t.on(\"drain\",o),t._isStdio||e&&!1===e.end||(r.on(\"end\",a),r.on(\"close\",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,\"function\"==typeof t.destroy&&t.destroy())}function h(t){if(c(),0===n.listenerCount(this,\"error\"))throw t}function c(){r.removeListener(\"data\",i),t.removeListener(\"drain\",o),r.removeListener(\"end\",a),r.removeListener(\"close\",u),r.removeListener(\"error\",h),t.removeListener(\"error\",h),r.removeListener(\"end\",c),r.removeListener(\"close\",c),t.removeListener(\"close\",c)}return r.on(\"error\",h),t.on(\"error\",h),r.on(\"end\",c),r.on(\"close\",c),t.on(\"close\",c),t.emit(\"pipe\",r),t}},30214:(t,e,r)=>{\"use strict\";var n=r(77834).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]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=s(e[n]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=s(e[n]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 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}},251:function(t,e,r){var n=r(66396).Buffer;!function(e,r){\"use strict\";t.exports?t.exports=r():(e.nacl||(e.nacl={}),e.nacl.util=r())}(this,(function(){\"use strict\";var t={};function e(t){if(!/^(?:[A-Za-z0-9+\\/]{2}[A-Za-z0-9+\\/]{2})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$/.test(t))throw new TypeError(\"invalid encoding\")}return t.decodeUTF8=function(t){if(\"string\"!=typeof t)throw new TypeError(\"expected string\");var e,r=unescape(encodeURIComponent(t)),n=new Uint8Array(r.length);for(e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n},t.encodeUTF8=function(t){var e,r=[];for(e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return decodeURIComponent(escape(r.join(\"\")))},\"undefined\"==typeof atob?void 0!==n.from?(t.encodeBase64=function(t){return n.from(t).toString(\"base64\")},t.decodeBase64=function(t){return e(t),new Uint8Array(Array.prototype.slice.call(n.from(t,\"base64\"),0))}):(t.encodeBase64=function(t){return new n(t).toString(\"base64\")},t.decodeBase64=function(t){return e(t),new Uint8Array(Array.prototype.slice.call(new n(t,\"base64\"),0))}):(t.encodeBase64=function(t){var e,r=[],n=t.length;for(e=0;e<n;e++)r.push(String.fromCharCode(t[e]));return btoa(r.join(\"\"))},t.decodeBase64=function(t){e(t);var r,n=atob(t),i=new Uint8Array(n.length);for(r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}),t}))},10717:(t,e,r)=>{!function(t){\"use strict\";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;e++)r[e]=t[e];return r},n=function(){throw new Error(\"no PRNG\")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=e(),a=e([1]),u=e([56129,1]),h=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function m(t,e,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=t[e+o]^r[n+o];return(1&s-1>>>8)-1}function g(t,e,r,n){return m(t,e,r,n,16)}function y(t,e,r,n){return m(t,e,r,n,32)}function b(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,h=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,M=o,_=s,E=a,A=u,S=h,x=c,B=f,T=l,I=d,k=p,P=m,C=g,R=y,O=b,L=v,N=w,U=0;U<20;U+=2)M^=(i=(R^=(i=(I^=(i=(S^=(i=M+R|0)<<7|i>>>25)+M|0)<<9|i>>>23)+S|0)<<13|i>>>19)+I|0)<<18|i>>>14,x^=(i=(_^=(i=(O^=(i=(k^=(i=x+_|0)<<7|i>>>25)+x|0)<<9|i>>>23)+k|0)<<13|i>>>19)+O|0)<<18|i>>>14,P^=(i=(B^=(i=(E^=(i=(L^=(i=P+B|0)<<7|i>>>25)+P|0)<<9|i>>>23)+L|0)<<13|i>>>19)+E|0)<<18|i>>>14,N^=(i=(C^=(i=(T^=(i=(A^=(i=N+C|0)<<7|i>>>25)+N|0)<<9|i>>>23)+A|0)<<13|i>>>19)+T|0)<<18|i>>>14,M^=(i=(A^=(i=(E^=(i=(_^=(i=M+A|0)<<7|i>>>25)+M|0)<<9|i>>>23)+_|0)<<13|i>>>19)+E|0)<<18|i>>>14,x^=(i=(S^=(i=(T^=(i=(B^=(i=x+S|0)<<7|i>>>25)+x|0)<<9|i>>>23)+B|0)<<13|i>>>19)+T|0)<<18|i>>>14,P^=(i=(k^=(i=(I^=(i=(C^=(i=P+k|0)<<7|i>>>25)+P|0)<<9|i>>>23)+C|0)<<13|i>>>19)+I|0)<<18|i>>>14,N^=(i=(L^=(i=(O^=(i=(R^=(i=N+L|0)<<7|i>>>25)+N|0)<<9|i>>>23)+R|0)<<13|i>>>19)+O|0)<<18|i>>>14;M=M+o|0,_=_+s|0,E=E+a|0,A=A+u|0,S=S+h|0,x=x+c|0,B=B+f|0,T=T+l|0,I=I+d|0,k=k+p|0,P=P+m|0,C=C+g|0,R=R+y|0,O=O+b|0,L=L+v|0,N=N+w|0,t[0]=M>>>0&255,t[1]=M>>>8&255,t[2]=M>>>16&255,t[3]=M>>>24&255,t[4]=_>>>0&255,t[5]=_>>>8&255,t[6]=_>>>16&255,t[7]=_>>>24&255,t[8]=E>>>0&255,t[9]=E>>>8&255,t[10]=E>>>16&255,t[11]=E>>>24&255,t[12]=A>>>0&255,t[13]=A>>>8&255,t[14]=A>>>16&255,t[15]=A>>>24&255,t[16]=S>>>0&255,t[17]=S>>>8&255,t[18]=S>>>16&255,t[19]=S>>>24&255,t[20]=x>>>0&255,t[21]=x>>>8&255,t[22]=x>>>16&255,t[23]=x>>>24&255,t[24]=B>>>0&255,t[25]=B>>>8&255,t[26]=B>>>16&255,t[27]=B>>>24&255,t[28]=T>>>0&255,t[29]=T>>>8&255,t[30]=T>>>16&255,t[31]=T>>>24&255,t[32]=I>>>0&255,t[33]=I>>>8&255,t[34]=I>>>16&255,t[35]=I>>>24&255,t[36]=k>>>0&255,t[37]=k>>>8&255,t[38]=k>>>16&255,t[39]=k>>>24&255,t[40]=P>>>0&255,t[41]=P>>>8&255,t[42]=P>>>16&255,t[43]=P>>>24&255,t[44]=C>>>0&255,t[45]=C>>>8&255,t[46]=C>>>16&255,t[47]=C>>>24&255,t[48]=R>>>0&255,t[49]=R>>>8&255,t[50]=R>>>16&255,t[51]=R>>>24&255,t[52]=O>>>0&255,t[53]=O>>>8&255,t[54]=O>>>16&255,t[55]=O>>>24&255,t[56]=L>>>0&255,t[57]=L>>>8&255,t[58]=L>>>16&255,t[59]=L>>>24&255,t[60]=N>>>0&255,t[61]=N>>>8&255,t[62]=N>>>16&255,t[63]=N>>>24&255}(t,e,r,n)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,h=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,M=0;M<20;M+=2)o^=(i=(y^=(i=(d^=(i=(h^=(i=o+y|0)<<7|i>>>25)+o|0)<<9|i>>>23)+h|0)<<13|i>>>19)+d|0)<<18|i>>>14,c^=(i=(s^=(i=(b^=(i=(p^=(i=c+s|0)<<7|i>>>25)+c|0)<<9|i>>>23)+p|0)<<13|i>>>19)+b|0)<<18|i>>>14,m^=(i=(f^=(i=(a^=(i=(v^=(i=m+f|0)<<7|i>>>25)+m|0)<<9|i>>>23)+v|0)<<13|i>>>19)+a|0)<<18|i>>>14,w^=(i=(g^=(i=(l^=(i=(u^=(i=w+g|0)<<7|i>>>25)+w|0)<<9|i>>>23)+u|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,c^=(i=(h^=(i=(l^=(i=(f^=(i=c+h|0)<<7|i>>>25)+c|0)<<9|i>>>23)+f|0)<<13|i>>>19)+l|0)<<18|i>>>14,m^=(i=(p^=(i=(d^=(i=(g^=(i=m+p|0)<<7|i>>>25)+m|0)<<9|i>>>23)+g|0)<<13|i>>>19)+d|0)<<18|i>>>14,w^=(i=(v^=(i=(b^=(i=(y^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+y|0)<<13|i>>>19)+b|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=c>>>0&255,t[5]=c>>>8&255,t[6]=c>>>16&255,t[7]=c>>>24&255,t[8]=m>>>0&255,t[9]=m>>>8&255,t[10]=m>>>16&255,t[11]=m>>>24&255,t[12]=w>>>0&255,t[13]=w>>>8&255,t[14]=w>>>16&255,t[15]=w>>>24&255,t[16]=f>>>0&255,t[17]=f>>>8&255,t[18]=f>>>16&255,t[19]=f>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=d>>>0&255,t[25]=d>>>8&255,t[26]=d>>>16&255,t[27]=d>>>24&255,t[28]=p>>>0&255,t[29]=p>>>8&255,t[30]=p>>>16&255,t[31]=p>>>24&255}(t,e,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function M(t,e,r,n,i,o,s){var a,u,h=new Uint8Array(16),c=new Uint8Array(64);for(u=0;u<16;u++)h[u]=0;for(u=0;u<8;u++)h[u]=o[u];for(;i>=64;){for(b(c,h,s,w),u=0;u<64;u++)t[e+u]=r[n+u]^c[u];for(a=1,u=8;u<16;u++)a=a+(255&h[u])|0,h[u]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(b(c,h,s,w),u=0;u<i;u++)t[e+u]=r[n+u]^c[u];return 0}function _(t,e,r,n,i){var o,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(b(u,a,i,w),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(b(u,a,i,w),s=0;s<r;s++)t[e+s]=u[s];return 0}function E(t,e,r,n,i){var o=new Uint8Array(32);v(o,n,i,w);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return _(t,e,r,s,o)}function A(t,e,r,n,i,o,s){var a=new Uint8Array(32);v(a,o,s,w);for(var u=new Uint8Array(8),h=0;h<8;h++)u[h]=o[h+16];return M(t,e,r,n,i,u,a)}var S=function(t){var e,r,n,i,o,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,r=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function x(t,e,r,n,i,o){var s=new S(o);return s.update(r,n,i),s.finish(t,e),0}function B(t,e,r,n,i,o){var s=new Uint8Array(16);return x(s,0,r,n,i,o),g(t,e,s,0)}function T(t,e,r,n,i){var o;if(r<32)return-1;for(A(t,0,e,0,r,n,i),x(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function I(t,e,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(E(s,0,32,n,i),0!==B(e,16,e,32,r-32,s))return-1;for(A(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function k(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function P(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function C(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function R(t,r){var n,i,o,s=e(),a=e();for(n=0;n<16;n++)a[n]=r[n];for(P(a),P(a),P(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,C(a,s,1-o)}for(n=0;n<16;n++)t[2*n]=255&a[n],t[2*n+1]=a[n]>>8}function O(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return R(r,t),R(n,e),y(r,0,n,0)}function L(t){var e=new Uint8Array(32);return R(e,t),1&e[0]}function N(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function U(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function j(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function D(t,e,r){var n,i,o=0,s=0,a=0,u=0,h=0,c=0,f=0,l=0,d=0,p=0,m=0,g=0,y=0,b=0,v=0,w=0,M=0,_=0,E=0,A=0,S=0,x=0,B=0,T=0,I=0,k=0,P=0,C=0,R=0,O=0,L=0,N=r[0],U=r[1],j=r[2],D=r[3],z=r[4],H=r[5],F=r[6],$=r[7],V=r[8],q=r[9],G=r[10],K=r[11],J=r[12],W=r[13],Z=r[14],X=r[15];o+=(n=e[0])*N,s+=n*U,a+=n*j,u+=n*D,h+=n*z,c+=n*H,f+=n*F,l+=n*$,d+=n*V,p+=n*q,m+=n*G,g+=n*K,y+=n*J,b+=n*W,v+=n*Z,w+=n*X,s+=(n=e[1])*N,a+=n*U,u+=n*j,h+=n*D,c+=n*z,f+=n*H,l+=n*F,d+=n*$,p+=n*V,m+=n*q,g+=n*G,y+=n*K,b+=n*J,v+=n*W,w+=n*Z,M+=n*X,a+=(n=e[2])*N,u+=n*U,h+=n*j,c+=n*D,f+=n*z,l+=n*H,d+=n*F,p+=n*$,m+=n*V,g+=n*q,y+=n*G,b+=n*K,v+=n*J,w+=n*W,M+=n*Z,_+=n*X,u+=(n=e[3])*N,h+=n*U,c+=n*j,f+=n*D,l+=n*z,d+=n*H,p+=n*F,m+=n*$,g+=n*V,y+=n*q,b+=n*G,v+=n*K,w+=n*J,M+=n*W,_+=n*Z,E+=n*X,h+=(n=e[4])*N,c+=n*U,f+=n*j,l+=n*D,d+=n*z,p+=n*H,m+=n*F,g+=n*$,y+=n*V,b+=n*q,v+=n*G,w+=n*K,M+=n*J,_+=n*W,E+=n*Z,A+=n*X,c+=(n=e[5])*N,f+=n*U,l+=n*j,d+=n*D,p+=n*z,m+=n*H,g+=n*F,y+=n*$,b+=n*V,v+=n*q,w+=n*G,M+=n*K,_+=n*J,E+=n*W,A+=n*Z,S+=n*X,f+=(n=e[6])*N,l+=n*U,d+=n*j,p+=n*D,m+=n*z,g+=n*H,y+=n*F,b+=n*$,v+=n*V,w+=n*q,M+=n*G,_+=n*K,E+=n*J,A+=n*W,S+=n*Z,x+=n*X,l+=(n=e[7])*N,d+=n*U,p+=n*j,m+=n*D,g+=n*z,y+=n*H,b+=n*F,v+=n*$,w+=n*V,M+=n*q,_+=n*G,E+=n*K,A+=n*J,S+=n*W,x+=n*Z,B+=n*X,d+=(n=e[8])*N,p+=n*U,m+=n*j,g+=n*D,y+=n*z,b+=n*H,v+=n*F,w+=n*$,M+=n*V,_+=n*q,E+=n*G,A+=n*K,S+=n*J,x+=n*W,B+=n*Z,T+=n*X,p+=(n=e[9])*N,m+=n*U,g+=n*j,y+=n*D,b+=n*z,v+=n*H,w+=n*F,M+=n*$,_+=n*V,E+=n*q,A+=n*G,S+=n*K,x+=n*J,B+=n*W,T+=n*Z,I+=n*X,m+=(n=e[10])*N,g+=n*U,y+=n*j,b+=n*D,v+=n*z,w+=n*H,M+=n*F,_+=n*$,E+=n*V,A+=n*q,S+=n*G,x+=n*K,B+=n*J,T+=n*W,I+=n*Z,k+=n*X,g+=(n=e[11])*N,y+=n*U,b+=n*j,v+=n*D,w+=n*z,M+=n*H,_+=n*F,E+=n*$,A+=n*V,S+=n*q,x+=n*G,B+=n*K,T+=n*J,I+=n*W,k+=n*Z,P+=n*X,y+=(n=e[12])*N,b+=n*U,v+=n*j,w+=n*D,M+=n*z,_+=n*H,E+=n*F,A+=n*$,S+=n*V,x+=n*q,B+=n*G,T+=n*K,I+=n*J,k+=n*W,P+=n*Z,C+=n*X,b+=(n=e[13])*N,v+=n*U,w+=n*j,M+=n*D,_+=n*z,E+=n*H,A+=n*F,S+=n*$,x+=n*V,B+=n*q,T+=n*G,I+=n*K,k+=n*J,P+=n*W,C+=n*Z,R+=n*X,v+=(n=e[14])*N,w+=n*U,M+=n*j,_+=n*D,E+=n*z,A+=n*H,S+=n*F,x+=n*$,B+=n*V,T+=n*q,I+=n*G,k+=n*K,P+=n*J,C+=n*W,R+=n*Z,O+=n*X,w+=(n=e[15])*N,s+=38*(_+=n*j),a+=38*(E+=n*D),u+=38*(A+=n*z),h+=38*(S+=n*H),c+=38*(x+=n*F),f+=38*(B+=n*$),l+=38*(T+=n*V),d+=38*(I+=n*q),p+=38*(k+=n*G),m+=38*(P+=n*K),g+=38*(C+=n*J),y+=38*(R+=n*W),b+=38*(O+=n*Z),v+=38*(L+=n*X),o=(n=(o+=38*(M+=n*U))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=h,t[5]=c,t[6]=f,t[7]=l,t[8]=d,t[9]=p,t[10]=m,t[11]=g,t[12]=y,t[13]=b,t[14]=v,t[15]=w}function z(t,e){D(t,e,e)}function H(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)z(i,i),2!==n&&4!==n&&D(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function F(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)z(i,i),1!==n&&D(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function $(t,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),h=e(),c=e(),f=e(),l=e(),d=e(),p=e();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,N(a,n),o=0;o<16;o++)c[o]=a[o],l[o]=h[o]=f[o]=0;for(h[0]=l[0]=1,o=254;o>=0;--o)C(h,c,i=s[o>>>3]>>>(7&o)&1),C(f,l,i),U(d,h,f),j(h,h,f),U(f,c,l),j(c,c,l),z(l,d),z(p,h),D(h,f,h),D(f,c,d),U(d,h,f),j(h,h,f),z(c,h),j(f,l,p),D(h,f,u),U(h,h,l),D(f,f,h),D(h,l,p),D(l,c,a),z(c,d),C(h,c,i),C(f,l,i);for(o=0;o<16;o++)a[o+16]=h[o],a[o+32]=f[o],a[o+48]=c[o],a[o+64]=l[o];var m=a.subarray(32),g=a.subarray(16);return H(m,m),D(g,g,m),R(t,g),0}function V(t,e){return $(t,e,o)}function q(t,e){return n(e,32),V(t,e)}function G(t,e,r){var n=new Uint8Array(32);return $(n,r,e),v(t,i,n,w)}S.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,u,h,c,f,l,d,p,m,g,y,b,v,w,M,_=this.fin?0:2048,E=this.h[0],A=this.h[1],S=this.h[2],x=this.h[3],B=this.h[4],T=this.h[5],I=this.h[6],k=this.h[7],P=this.h[8],C=this.h[9],R=this.r[0],O=this.r[1],L=this.r[2],N=this.r[3],U=this.r[4],j=this.r[5],D=this.r[6],z=this.r[7],H=this.r[8],F=this.r[9];r>=16;)l=f=0,l+=(E+=8191&(n=255&t[e+0]|(255&t[e+1])<<8))*R,l+=(A+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*F),l+=(S+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*H),l+=(x+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*z),f=(l+=(B+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*D))>>>13,l&=8191,l+=(T+=a>>>1&8191)*(5*j),l+=(I+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*U),l+=(k+=8191&(u>>>11|(h=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*N),l+=(P+=8191&(h>>>8|(c=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*L),d=f+=(l+=(C+=c>>>5|_)*(5*O))>>>13,d+=E*O,d+=A*R,d+=S*(5*F),d+=x*(5*H),f=(d+=B*(5*z))>>>13,d&=8191,d+=T*(5*D),d+=I*(5*j),d+=k*(5*U),d+=P*(5*N),f+=(d+=C*(5*L))>>>13,d&=8191,p=f,p+=E*L,p+=A*O,p+=S*R,p+=x*(5*F),f=(p+=B*(5*H))>>>13,p&=8191,p+=T*(5*z),p+=I*(5*D),p+=k*(5*j),p+=P*(5*U),m=f+=(p+=C*(5*N))>>>13,m+=E*N,m+=A*L,m+=S*O,m+=x*R,f=(m+=B*(5*F))>>>13,m&=8191,m+=T*(5*H),m+=I*(5*z),m+=k*(5*D),m+=P*(5*j),g=f+=(m+=C*(5*U))>>>13,g+=E*U,g+=A*N,g+=S*L,g+=x*O,f=(g+=B*R)>>>13,g&=8191,g+=T*(5*F),g+=I*(5*H),g+=k*(5*z),g+=P*(5*D),y=f+=(g+=C*(5*j))>>>13,y+=E*j,y+=A*U,y+=S*N,y+=x*L,f=(y+=B*O)>>>13,y&=8191,y+=T*R,y+=I*(5*F),y+=k*(5*H),y+=P*(5*z),b=f+=(y+=C*(5*D))>>>13,b+=E*D,b+=A*j,b+=S*U,b+=x*N,f=(b+=B*L)>>>13,b&=8191,b+=T*O,b+=I*R,b+=k*(5*F),b+=P*(5*H),v=f+=(b+=C*(5*z))>>>13,v+=E*z,v+=A*D,v+=S*j,v+=x*U,f=(v+=B*N)>>>13,v&=8191,v+=T*L,v+=I*O,v+=k*R,v+=P*(5*F),w=f+=(v+=C*(5*H))>>>13,w+=E*H,w+=A*z,w+=S*D,w+=x*j,f=(w+=B*U)>>>13,w&=8191,w+=T*N,w+=I*L,w+=k*O,w+=P*R,M=f+=(w+=C*(5*F))>>>13,M+=E*F,M+=A*H,M+=S*z,M+=x*D,f=(M+=B*j)>>>13,M&=8191,M+=T*U,M+=I*N,M+=k*L,M+=P*O,E=l=8191&(f=(f=((f+=(M+=C*R)>>>13)<<2)+f|0)+(l&=8191)|0),A=d+=f>>>=13,S=p&=8191,x=m&=8191,B=g&=8191,T=y&=8191,I=b&=8191,k=v&=8191,P=w&=8191,C=M&=8191,e+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=S,this.h[3]=x,this.h[4]=B,this.h[5]=T,this.h[6]=I,this.h[7]=k,this.h[8]=P,this.h[9]=C},S.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},S.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=t[e+n];if(r-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=t[e+n];this.leftover+=r}};var K=T,J=I;var W=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Z(t,e,r,n){for(var i,o,s,a,u,h,c,f,l,d,p,m,g,y,b,v,w,M,_,E,A,S,x,B,T,I,k=new Int32Array(16),P=new Int32Array(16),C=t[0],R=t[1],O=t[2],L=t[3],N=t[4],U=t[5],j=t[6],D=t[7],z=e[0],H=e[1],F=e[2],$=e[3],V=e[4],q=e[5],G=e[6],K=e[7],J=0;n>=128;){for(_=0;_<16;_++)E=8*_+J,k[_]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],P[_]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(_=0;_<80;_++)if(i=C,o=R,s=O,a=L,u=N,h=U,c=j,D,l=z,d=H,p=F,m=$,g=V,y=q,b=G,K,x=65535&(S=K),B=S>>>16,T=65535&(A=D),I=A>>>16,x+=65535&(S=(V>>>14|N<<18)^(V>>>18|N<<14)^(N>>>9|V<<23)),B+=S>>>16,T+=65535&(A=(N>>>14|V<<18)^(N>>>18|V<<14)^(V>>>9|N<<23)),I+=A>>>16,x+=65535&(S=V&q^~V&G),B+=S>>>16,T+=65535&(A=N&U^~N&j),I+=A>>>16,A=W[2*_],x+=65535&(S=W[2*_+1]),B+=S>>>16,T+=65535&A,I+=A>>>16,A=k[_%16],B+=(S=P[_%16])>>>16,T+=65535&A,I+=A>>>16,T+=(B+=(x+=65535&S)>>>16)>>>16,x=65535&(S=M=65535&x|B<<16),B=S>>>16,T=65535&(A=w=65535&T|(I+=T>>>16)<<16),I=A>>>16,x+=65535&(S=(z>>>28|C<<4)^(C>>>2|z<<30)^(C>>>7|z<<25)),B+=S>>>16,T+=65535&(A=(C>>>28|z<<4)^(z>>>2|C<<30)^(z>>>7|C<<25)),I+=A>>>16,B+=(S=z&H^z&F^H&F)>>>16,T+=65535&(A=C&R^C&O^R&O),I+=A>>>16,f=65535&(T+=(B+=(x+=65535&S)>>>16)>>>16)|(I+=T>>>16)<<16,v=65535&x|B<<16,x=65535&(S=m),B=S>>>16,T=65535&(A=a),I=A>>>16,B+=(S=M)>>>16,T+=65535&(A=w),I+=A>>>16,R=i,O=o,L=s,N=a=65535&(T+=(B+=(x+=65535&S)>>>16)>>>16)|(I+=T>>>16)<<16,U=u,j=h,D=c,C=f,H=l,F=d,$=p,V=m=65535&x|B<<16,q=g,G=y,K=b,z=v,_%16==15)for(E=0;E<16;E++)A=k[E],x=65535&(S=P[E]),B=S>>>16,T=65535&A,I=A>>>16,A=k[(E+9)%16],x+=65535&(S=P[(E+9)%16]),B+=S>>>16,T+=65535&A,I+=A>>>16,w=k[(E+1)%16],x+=65535&(S=((M=P[(E+1)%16])>>>1|w<<31)^(M>>>8|w<<24)^(M>>>7|w<<25)),B+=S>>>16,T+=65535&(A=(w>>>1|M<<31)^(w>>>8|M<<24)^w>>>7),I+=A>>>16,w=k[(E+14)%16],B+=(S=((M=P[(E+14)%16])>>>19|w<<13)^(w>>>29|M<<3)^(M>>>6|w<<26))>>>16,T+=65535&(A=(w>>>19|M<<13)^(M>>>29|w<<3)^w>>>6),I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,k[E]=65535&T|I<<16,P[E]=65535&x|B<<16;x=65535&(S=z),B=S>>>16,T=65535&(A=C),I=A>>>16,A=t[0],B+=(S=e[0])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[0]=C=65535&T|I<<16,e[0]=z=65535&x|B<<16,x=65535&(S=H),B=S>>>16,T=65535&(A=R),I=A>>>16,A=t[1],B+=(S=e[1])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[1]=R=65535&T|I<<16,e[1]=H=65535&x|B<<16,x=65535&(S=F),B=S>>>16,T=65535&(A=O),I=A>>>16,A=t[2],B+=(S=e[2])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[2]=O=65535&T|I<<16,e[2]=F=65535&x|B<<16,x=65535&(S=$),B=S>>>16,T=65535&(A=L),I=A>>>16,A=t[3],B+=(S=e[3])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[3]=L=65535&T|I<<16,e[3]=$=65535&x|B<<16,x=65535&(S=V),B=S>>>16,T=65535&(A=N),I=A>>>16,A=t[4],B+=(S=e[4])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[4]=N=65535&T|I<<16,e[4]=V=65535&x|B<<16,x=65535&(S=q),B=S>>>16,T=65535&(A=U),I=A>>>16,A=t[5],B+=(S=e[5])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[5]=U=65535&T|I<<16,e[5]=q=65535&x|B<<16,x=65535&(S=G),B=S>>>16,T=65535&(A=j),I=A>>>16,A=t[6],B+=(S=e[6])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[6]=j=65535&T|I<<16,e[6]=G=65535&x|B<<16,x=65535&(S=K),B=S>>>16,T=65535&(A=D),I=A>>>16,A=t[7],B+=(S=e[7])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[7]=D=65535&T|I<<16,e[7]=K=65535&x|B<<16,J+=128,n-=128}return n}function X(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Z(i,o,e,r),r%=128,n=0;n<r;n++)s[n]=e[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,p(s,r-8,a/536870912|0,a<<3),Z(i,o,s,r),n=0;n<8;n++)p(t,8*n,i[n],o[n]);return 0}function Y(t,r){var n=e(),i=e(),o=e(),s=e(),a=e(),u=e(),h=e(),f=e(),l=e();j(n,t[1],t[0]),j(l,r[1],r[0]),D(n,n,l),U(i,t[0],t[1]),U(l,r[0],r[1]),D(i,i,l),D(o,t[3],r[3]),D(o,o,c),D(s,t[2],r[2]),U(s,s,s),j(a,i,n),j(u,s,o),U(h,s,o),U(f,i,n),D(t[0],a,u),D(t[1],f,h),D(t[2],h,u),D(t[3],a,f)}function Q(t,e,r){var n;for(n=0;n<4;n++)C(t[n],e[n],r)}function tt(t,r){var n=e(),i=e(),o=e();H(o,r[2]),D(n,r[0],o),D(i,r[1],o),R(t,i),t[31]^=L(n)<<7}function et(t,e,r){var n,i;for(k(t[0],s),k(t[1],a),k(t[2],a),k(t[3],s),i=255;i>=0;--i)Q(t,e,n=r[i/8|0]>>(7&i)&1),Y(e,t),Y(t,t),Q(t,e,n)}function rt(t,r){var n=[e(),e(),e(),e()];k(n[0],f),k(n[1],l),k(n[2],a),D(n[3],f,l),et(t,n,r)}function nt(t,r,i){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||n(r,32),X(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,rt(a,s),tt(t,a),o=0;o<32;o++)r[o+32]=t[o];return 0}var it=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ot(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)e[i]+=r-16*e[n]*it[i-(n-32)],r=Math.floor((e[i]+128)/256),e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*it[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*it[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function st(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;ot(t,r)}function at(t,r,n,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),h=new Uint8Array(64),c=new Float64Array(64),f=[e(),e(),e(),e()];X(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var l=n+64;for(o=0;o<n;o++)t[64+o]=r[o];for(o=0;o<32;o++)t[32+o]=a[32+o];for(X(h,t.subarray(32),n+32),st(h),rt(f,h),tt(t,f),o=32;o<64;o++)t[o]=i[o];for(X(u,t,n+64),st(u),o=0;o<64;o++)c[o]=0;for(o=0;o<32;o++)c[o]=h[o];for(o=0;o<32;o++)for(s=0;s<32;s++)c[o+s]+=u[o]*a[s];return ot(t.subarray(32),c),l}function ut(t,r,n,i){var o,u=new Uint8Array(32),c=new Uint8Array(64),f=[e(),e(),e(),e()],l=[e(),e(),e(),e()];if(n<64)return-1;if(function(t,r){var n=e(),i=e(),o=e(),u=e(),c=e(),f=e(),l=e();return k(t[2],a),N(t[1],r),z(o,t[1]),D(u,o,h),j(o,o,t[2]),U(u,t[2],u),z(c,u),z(f,c),D(l,f,c),D(n,l,o),D(n,n,u),F(n,n),D(n,n,o),D(n,n,u),D(n,n,u),D(t[0],n,u),z(i,t[0]),D(i,i,u),O(i,o)&&D(t[0],t[0],d),z(i,t[0]),D(i,i,u),O(i,o)?-1:(L(t[0])===r[31]>>7&&j(t[0],s,t[0]),D(t[3],t[0],t[1]),0)}(l,i))return-1;for(o=0;o<n;o++)t[o]=r[o];for(o=0;o<32;o++)t[o+32]=i[o];if(X(c,t,n),st(c),et(f,l,c),rt(l,r.subarray(32)),Y(f,l),tt(u,f),n-=64,y(r,0,u,0)){for(o=0;o<n;o++)t[o]=0;return-1}for(o=0;o<n;o++)t[o]=r[o+64];return n}var ht=16,ct=64,ft=32,lt=64;function dt(t,e){if(32!==t.length)throw new Error(\"bad key size\");if(24!==e.length)throw new Error(\"bad nonce size\")}function pt(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError(\"unexpected type, use Uint8Array\")}function mt(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:M,crypto_stream_salsa20:_,crypto_onetimeauth:x,crypto_onetimeauth_verify:B,crypto_verify_16:g,crypto_verify_32:y,crypto_secretbox:T,crypto_secretbox_open:I,crypto_scalarmult:$,crypto_scalarmult_base:V,crypto_box_beforenm:G,crypto_box_afternm:K,crypto_box:function(t,e,r,n,i,o){var s=new Uint8Array(32);return G(s,i,o),K(t,e,r,n,s)},crypto_box_open:function(t,e,r,n,i,o){var s=new Uint8Array(32);return G(s,i,o),J(t,e,r,n,s)},crypto_box_keypair:q,crypto_hash:X,crypto_sign:at,crypto_sign_keypair:nt,crypto_sign_open:ut,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ht,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ct,crypto_sign_PUBLICKEYBYTES:ft,crypto_sign_SECRETKEYBYTES:lt,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:e,D:h,L:it,pack25519:R,unpack25519:N,M:D,A:U,S:z,Z:j,pow2523:F,add:Y,set25519:k,modL:ot,scalarmult:et,scalarbase:rt},t.randomBytes=function(t){var e=new Uint8Array(t);return n(e,t),e},t.secretbox=function(t,e,r){pt(t,e,r),dt(r,e);for(var n=new Uint8Array(32+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+32]=t[o];return T(i,n,n.length,e,r),i.subarray(ht)},t.secretbox.open=function(t,e,r){pt(t,e,r),dt(r,e);for(var n=new Uint8Array(ht+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+ht]=t[o];return n.length<32||0!==I(i,n,n.length,e,r)?null:i.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=ht,t.scalarMult=function(t,e){if(pt(t,e),32!==t.length)throw new Error(\"bad n size\");if(32!==e.length)throw new Error(\"bad p size\");var r=new Uint8Array(32);return $(r,t,e),r},t.scalarMult.base=function(t){if(pt(t),32!==t.length)throw new Error(\"bad n size\");var e=new Uint8Array(32);return V(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox(e,r,o)},t.box.before=function(t,e){pt(t,e),function(t,e){if(32!==t.length)throw new Error(\"bad public key size\");if(32!==e.length)throw new Error(\"bad secret key size\")}(t,e);var r=new Uint8Array(32);return G(r,t,e),r},t.box.after=t.secretbox,t.box.open=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox.open(e,r,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return q(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(pt(t),32!==t.length)throw new Error(\"bad secret key size\");var e=new Uint8Array(32);return V(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(pt(t,e),e.length!==lt)throw new Error(\"bad secret key size\");var r=new Uint8Array(ct+t.length);return at(r,t,t.length,e),r},t.sign.open=function(t,e){if(pt(t,e),e.length!==ft)throw new Error(\"bad public key size\");var r=new Uint8Array(t.length),n=ut(r,t,t.length,e);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(ct),o=0;o<i.length;o++)i[o]=n[o];return i},t.sign.detached.verify=function(t,e,r){if(pt(t,e,r),e.length!==ct)throw new Error(\"bad signature size\");if(r.length!==ft)throw new Error(\"bad public key size\");var n,i=new Uint8Array(ct+t.length),o=new Uint8Array(ct+t.length);for(n=0;n<ct;n++)i[n]=e[n];for(n=0;n<t.length;n++)i[n+ct]=t[n];return ut(o,i,i.length,r)>=0},t.sign.keyPair=function(){var t=new Uint8Array(ft),e=new Uint8Array(lt);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(pt(t),t.length!==lt)throw new Error(\"bad secret key size\");for(var e=new Uint8Array(ft),r=0;r<e.length;r++)e[r]=t[32+r];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(pt(t),32!==t.length)throw new Error(\"bad seed size\");for(var e=new Uint8Array(ft),r=new Uint8Array(lt),n=0;n<32;n++)r[n]=t[n];return nt(e,r,!0),{publicKey:e,secretKey:r}},t.sign.publicKeyLength=ft,t.sign.secretKeyLength=lt,t.sign.seedLength=32,t.sign.signatureLength=ct,t.hash=function(t){pt(t);var e=new Uint8Array(64);return X(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return pt(t,e),0!==t.length&&0!==e.length&&(t.length===e.length&&0===m(t,0,e,0,t.length))},t.setPRNG=function(t){n=t},function(){var e=\"undefined\"!=typeof self?self.crypto||self.msCrypto:null;if(e&&e.getRandomValues){t.setPRNG((function(t,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)e.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)t[n]=i[n];mt(i)}))}else(e=r(85338))&&e.randomBytes&&t.setPRNG((function(t,r){var n,i=e.randomBytes(r);for(n=0;n<r;n++)t[n]=i[n];mt(i)}))}()}(t.exports?t.exports:self.nacl=self.nacl||{})},59639:function(t,e,r){var n;t=r.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o=\"object\"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,h=1,c=26,f=38,l=700,d=72,p=128,m=\"-\",g=/^xn--/,y=/[^\\x20-\\x7E]/,b=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,v={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},w=u-h,M=Math.floor,_=String.fromCharCode;function E(t){throw new RangeError(v[t])}function A(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function S(t,e){var r=t.split(\"@\"),n=\"\";return r.length>1&&(n=r[0]+\"@\",t=r[1]),n+A((t=t.replace(b,\".\")).split(\".\"),e).join(\".\")}function x(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function B(t){return A(t,(function(t){var e=\"\";return t>65535&&(e+=_((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=_(t)})).join(\"\")}function T(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function I(t,e,r){var n=0;for(t=r?M(t/l):t>>1,t+=M(t/e);t>w*c>>1;n+=u)t=M(t/w);return M(n+(w+1)*t/(t+f))}function k(t){var e,r,n,i,o,s,f,l,g,y,b,v=[],w=t.length,_=0,A=p,S=d;for((r=t.lastIndexOf(m))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&E(\"not-basic\"),v.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<w;){for(o=_,s=1,f=u;i>=w&&E(\"invalid-input\"),((l=(b=t.charCodeAt(i++))-48<10?b-22:b-65<26?b-65:b-97<26?b-97:u)>=u||l>M((a-_)/s))&&E(\"overflow\"),_+=l*s,!(l<(g=f<=S?h:f>=S+c?c:f-S));f+=u)s>M(a/(y=u-g))&&E(\"overflow\"),s*=y;S=I(_-o,e=v.length+1,0==o),M(_/e)>a-A&&E(\"overflow\"),A+=M(_/e),_%=e,v.splice(_++,0,A)}return B(v)}function P(t){var e,r,n,i,o,s,f,l,g,y,b,v,w,A,S,B=[];for(v=(t=x(t)).length,e=p,r=0,o=d,s=0;s<v;++s)(b=t[s])<128&&B.push(_(b));for(n=i=B.length,i&&B.push(m);n<v;){for(f=a,s=0;s<v;++s)(b=t[s])>=e&&b<f&&(f=b);for(f-e>M((a-r)/(w=n+1))&&E(\"overflow\"),r+=(f-e)*w,e=f,s=0;s<v;++s)if((b=t[s])<e&&++r>a&&E(\"overflow\"),b==e){for(l=r,g=u;!(l<(y=g<=o?h:g>=o+c?c:g-o));g+=u)S=l-y,A=u-y,B.push(_(T(y+S%A,0))),l=M(S/A);B.push(_(T(l,0))),o=I(r,w,n==i),r=0,++n}++r,++e}return B.join(\"\")}s={version:\"1.4.1\",ucs2:{decode:x,encode:B},decode:k,encode:P,toASCII:function(t){return S(t,(function(t){return y.test(t)?\"xn--\"+P(t):t}))},toUnicode:function(t){return S(t,(function(t){return g.test(t)?k(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return s}.call(e,r,e,t))||(t.exports=n)}()},883:(t,e,r)=>{\"use strict\";var n=r(59639);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\\/\\/?(?!\\/)[^?\\s]*)(\\?[^\\s]*)?$/,u=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),h=[\"'\"].concat(u),c=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(h),f=[\"/\",\"?\",\"#\"],l=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,\"javascript:\":!0},m={javascript:!0,\"javascript:\":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},y=r(19126);function b(t,e,r){if(t&&\"object\"==typeof t&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if(\"string\"!=typeof t)throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var i=t.indexOf(\"?\"),s=-1!==i&&i<t.indexOf(\"#\")?\"?\":\"#\",u=t.split(s);u[0]=u[0].replace(/\\\\/g,\"/\");var b=t=u.join(s);if(b=b.trim(),!r&&1===t.split(\"#\").length){var v=a.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=e?y.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search=\"\",this.query={}),this}var w=o.exec(b);if(w){var M=(w=w[0]).toLowerCase();this.protocol=M,b=b.substr(w.length)}if(r||w||b.match(/^\\/\\/[^@/]+@[^@/]+/)){var _=\"//\"===b.substr(0,2);!_||w&&m[w]||(b=b.substr(2),this.slashes=!0)}if(!m[w]&&(_||w&&!g[w])){for(var E,A,S=-1,x=0;x<f.length;x++){-1!==(B=b.indexOf(f[x]))&&(-1===S||B<S)&&(S=B)}-1!==(A=-1===S?b.lastIndexOf(\"@\"):b.lastIndexOf(\"@\",S))&&(E=b.slice(0,A),b=b.slice(A+1),this.auth=decodeURIComponent(E)),S=-1;for(x=0;x<c.length;x++){var B;-1!==(B=b.indexOf(c[x]))&&(-1===S||B<S)&&(S=B)}-1===S&&(S=b.length),this.host=b.slice(0,S),b=b.slice(S),this.parseHost(),this.hostname=this.hostname||\"\";var T=\"[\"===this.hostname[0]&&\"]\"===this.hostname[this.hostname.length-1];if(!T)for(var I=this.hostname.split(/\\./),k=(x=0,I.length);x<k;x++){var P=I[x];if(P&&!P.match(l)){for(var C=\"\",R=0,O=P.length;R<O;R++)P.charCodeAt(R)>127?C+=\"x\":C+=P[R];if(!C.match(l)){var L=I.slice(0,x),N=I.slice(x+1),U=P.match(d);U&&(L.push(U[1]),N.unshift(U[2])),N.length&&(b=\"/\"+N.join(\".\")+b),this.hostname=L.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var j=this.port?\":\"+this.port:\"\",D=this.hostname||\"\";this.host=D+j,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==b[0]&&(b=\"/\"+b))}if(!p[M])for(x=0,k=h.length;x<k;x++){var z=h[x];if(-1!==b.indexOf(z)){var H=encodeURIComponent(z);H===z&&(H=escape(z)),b=b.split(z).join(H)}}var F=b.indexOf(\"#\");-1!==F&&(this.hash=b.substr(F),b=b.slice(0,F));var $=b.indexOf(\"?\");if(-1!==$?(this.search=b.substr($),this.query=b.substr($+1),e&&(this.query=y.parse(this.query)),b=b.slice(0,$)):e&&(this.search=\"\",this.query={}),b&&(this.pathname=b),g[M]&&this.hostname&&!this.pathname&&(this.pathname=\"/\"),this.pathname||this.search){j=this.pathname||\"\";var V=this.search||\"\";this.path=j+V}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||\"\";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,\":\"),t+=\"@\");var e=this.protocol||\"\",r=this.pathname||\"\",n=this.hash||\"\",i=!1,o=\"\";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(\":\")?this.hostname:\"[\"+this.hostname+\"]\"),this.port&&(i+=\":\"+this.port)),this.query&&\"object\"==typeof this.query&&Object.keys(this.query).length&&(o=y.stringify(this.query,{arrayFormat:\"repeat\",addQueryPrefix:!1}));var s=this.search||o&&\"?\"+o||\"\";return e&&\":\"!==e.substr(-1)&&(e+=\":\"),this.slashes||(!e||g[e])&&!1!==i?(i=\"//\"+(i||\"\"),r&&\"/\"!==r.charAt(0)&&(r=\"/\"+r)):i||(i=\"\"),n&&\"#\"!==n.charAt(0)&&(n=\"#\"+n),s&&\"?\"!==s.charAt(0)&&(s=\"?\"+s),e+i+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace(\"#\",\"%23\"))+n},i.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(\"string\"==typeof t){var e=new i;e.parse(t,!1,!0),t=e}for(var r=new i,n=Object.keys(this),o=0;o<n.length;o++){var s=n[o];r[s]=this[s]}if(r.hash=t.hash,\"\"===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),u=0;u<a.length;u++){var h=a[u];\"protocol\"!==h&&(r[h]=t[h])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname=\"/\",r.path=r.pathname),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!g[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var l=c[f];r[l]=t[l]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||m[t.protocol])r.pathname=t.pathname;else{for(var d=(t.pathname||\"\").split(\"/\");d.length&&!(t.host=d.shift()););t.host||(t.host=\"\"),t.hostname||(t.hostname=\"\"),\"\"!==d[0]&&d.unshift(\"\"),d.length<2&&d.unshift(\"\"),r.pathname=d.join(\"/\")}if(r.search=t.search,r.query=t.query,r.host=t.host||\"\",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var p=r.pathname||\"\",y=r.search||\"\";r.path=p+y}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var b=r.pathname&&\"/\"===r.pathname.charAt(0),v=t.host||t.pathname&&\"/\"===t.pathname.charAt(0),w=v||b||r.host&&t.pathname,M=w,_=r.pathname&&r.pathname.split(\"/\")||[],E=(d=t.pathname&&t.pathname.split(\"/\")||[],r.protocol&&!g[r.protocol]);if(E&&(r.hostname=\"\",r.port=null,r.host&&(\"\"===_[0]?_[0]=r.host:_.unshift(r.host)),r.host=\"\",t.protocol&&(t.hostname=null,t.port=null,t.host&&(\"\"===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),w=w&&(\"\"===d[0]||\"\"===_[0])),v)r.host=t.host||\"\"===t.host?t.host:r.host,r.hostname=t.hostname||\"\"===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,_=d;else if(d.length)_||(_=[]),_.pop(),_=_.concat(d),r.search=t.search,r.query=t.query;else if(null!=t.search){if(E)r.host=_.shift(),r.hostname=r.host,(T=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname);return r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],S=(r.host||t.host||_.length>1)&&(\".\"===A||\"..\"===A)||\"\"===A,x=0,B=_.length;B>=0;B--)\".\"===(A=_[B])?_.splice(B,1):\"..\"===A?(_.splice(B,1),x++):x&&(_.splice(B,1),x--);if(!w&&!M)for(;x--;x)_.unshift(\"..\");!w||\"\"===_[0]||_[0]&&\"/\"===_[0].charAt(0)||_.unshift(\"\"),S&&\"/\"!==_.join(\"/\").substr(-1)&&_.push(\"\");var T,I=\"\"===_[0]||_[0]&&\"/\"===_[0].charAt(0);E&&(r.hostname=I?\"\":_.length?_.shift():\"\",r.host=r.hostname,(T=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname));return(w=w||r.host&&_.length)&&!I&&_.unshift(\"\"),_.length>0?r.pathname=_.join(\"/\"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(\":\"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return\"string\"==typeof t&&(t=b(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},5803:(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)}}},10082:t=>{t.exports=function(t){return t&&\"object\"==typeof t&&\"function\"==typeof t.copy&&\"function\"==typeof t.fill&&\"function\"==typeof t.readUInt8}},54895:(t,e,r)=>{\"use strict\";var n=r(52635),i=r(43138),o=r(32094),s=r(50198);function a(t){return t.call.bind(t)}var u=\"undefined\"!=typeof BigInt,h=\"undefined\"!=typeof Symbol,c=a(Object.prototype.toString),f=a(Number.prototype.valueOf),l=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(h)var m=a(Symbol.prototype.valueOf);function g(t,e){if(\"object\"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function y(t){return\"[object Map]\"===c(t)}function b(t){return\"[object Set]\"===c(t)}function v(t){return\"[object WeakMap]\"===c(t)}function w(t){return\"[object WeakSet]\"===c(t)}function M(t){return\"[object ArrayBuffer]\"===c(t)}function _(t){return\"undefined\"!=typeof ArrayBuffer&&(M.working?M(t):t instanceof ArrayBuffer)}function E(t){return\"[object DataView]\"===c(t)}function A(t){return\"undefined\"!=typeof DataView&&(E.working?E(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=s,e.isPromise=function(t){return\"undefined\"!=typeof Promise&&t instanceof Promise||null!==t&&\"object\"==typeof t&&\"function\"==typeof t.then&&\"function\"==typeof t.catch},e.isArrayBufferView=function(t){return\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):s(t)||A(t)},e.isUint8Array=function(t){return\"Uint8Array\"===o(t)},e.isUint8ClampedArray=function(t){return\"Uint8ClampedArray\"===o(t)},e.isUint16Array=function(t){return\"Uint16Array\"===o(t)},e.isUint32Array=function(t){return\"Uint32Array\"===o(t)},e.isInt8Array=function(t){return\"Int8Array\"===o(t)},e.isInt16Array=function(t){return\"Int16Array\"===o(t)},e.isInt32Array=function(t){return\"Int32Array\"===o(t)},e.isFloat32Array=function(t){return\"Float32Array\"===o(t)},e.isFloat64Array=function(t){return\"Float64Array\"===o(t)},e.isBigInt64Array=function(t){return\"BigInt64Array\"===o(t)},e.isBigUint64Array=function(t){return\"BigUint64Array\"===o(t)},y.working=\"undefined\"!=typeof Map&&y(new Map),e.isMap=function(t){return\"undefined\"!=typeof Map&&(y.working?y(t):t instanceof Map)},b.working=\"undefined\"!=typeof Set&&b(new Set),e.isSet=function(t){return\"undefined\"!=typeof Set&&(b.working?b(t):t instanceof Set)},v.working=\"undefined\"!=typeof WeakMap&&v(new WeakMap),e.isWeakMap=function(t){return\"undefined\"!=typeof WeakMap&&(v.working?v(t):t instanceof WeakMap)},w.working=\"undefined\"!=typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},M.working=\"undefined\"!=typeof ArrayBuffer&&M(new ArrayBuffer),e.isArrayBuffer=_,E.working=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=A;var S=\"undefined\"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function x(t){return\"[object SharedArrayBuffer]\"===c(t)}function B(t){return void 0!==S&&(void 0===x.working&&(x.working=x(new S)),x.working?x(t):t instanceof S)}function T(t){return g(t,f)}function I(t){return g(t,l)}function k(t){return g(t,d)}function P(t){return u&&g(t,p)}function C(t){return h&&g(t,m)}e.isSharedArrayBuffer=B,e.isAsyncFunction=function(t){return\"[object AsyncFunction]\"===c(t)},e.isMapIterator=function(t){return\"[object Map Iterator]\"===c(t)},e.isSetIterator=function(t){return\"[object Set Iterator]\"===c(t)},e.isGeneratorObject=function(t){return\"[object Generator]\"===c(t)},e.isWebAssemblyCompiledModule=function(t){return\"[object WebAssembly.Module]\"===c(t)},e.isNumberObject=T,e.isStringObject=I,e.isBooleanObject=k,e.isBigIntObject=P,e.isSymbolObject=C,e.isBoxedPrimitive=function(t){return T(t)||I(t)||k(t)||P(t)||C(t)},e.isAnyArrayBuffer=function(t){return\"undefined\"!=typeof Uint8Array&&(_(t)||B(t))},[\"isProxy\",\"isExternal\",\"isModuleNamespaceObject\"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+\" is not supported in userland\")}})}))},43335:(t,e,r)=>{var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(u(arguments[r]));return e.join(\" \")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if(\"%%\"===t)return\"%\";if(r>=o)return t;switch(t){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(t){return\"[Circular]\"}default:return t}})),a=n[r];r<o;a=n[++r])g(a)||!M(a)?s+=\" \"+a:s+=\" \"+u(a);return s},e.deprecate=function(t,r){if(\"undefined\"!=typeof process&&!0===process.noDeprecation)return t;if(\"undefined\"==typeof process)return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var o={},s=/^$/,a=\"false\";function u(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&e._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=h),f(n,t,n.depth)}function h(t,e){var r=u.styles[e];return r?\"\u001b[\"+u.colors[r][0]+\"m\"+t+\"\u001b[\"+u.colors[r][1]+\"m\":t}function c(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=f(t,i,n)),i}var o=function(t,e){if(v(e))return t.stylize(\"undefined\",\"undefined\");if(b(e)){var r=\"'\"+JSON.stringify(e).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return t.stylize(r,\"string\")}if(y(e))return t.stylize(\"\"+e,\"number\");if(m(e))return t.stylize(\"\"+e,\"boolean\");if(g(e))return t.stylize(\"null\",\"null\")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf(\"message\")>=0||s.indexOf(\"description\")>=0))return l(r);if(0===s.length){if(A(r)){var u=r.name?\": \"+r.name:\"\";return t.stylize(\"[Function\"+u+\"]\",\"special\")}if(w(r))return t.stylize(RegExp.prototype.toString.call(r),\"regexp\");if(_(r))return t.stylize(Date.prototype.toString.call(r),\"date\");if(E(r))return l(r)}var h,c=\"\",M=!1,S=[\"{\",\"}\"];(p(r)&&(M=!0,S=[\"[\",\"]\"]),A(r))&&(c=\" [Function\"+(r.name?\": \"+r.name:\"\")+\"]\");return w(r)&&(c=\" \"+RegExp.prototype.toString.call(r)),_(r)&&(c=\" \"+Date.prototype.toUTCString.call(r)),E(r)&&(c=\" \"+l(r)),0!==s.length||M&&0!=r.length?n<0?w(r)?t.stylize(RegExp.prototype.toString.call(r),\"regexp\"):t.stylize(\"[Object]\",\"special\"):(t.seen.push(r),h=M?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)T(e,String(s))?o.push(d(t,e,r,n,String(s),!0)):o.push(\"\");return i.forEach((function(i){i.match(/^\\d+$/)||o.push(d(t,e,r,n,i,!0))})),o}(t,r,n,a,s):s.map((function(e){return d(t,r,n,a,e,M)})),t.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf(\"\\n\")>=0&&0,t+e.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1}),0);if(n>60)return r[0]+(\"\"===e?\"\":e+\"\\n \")+\" \"+t.join(\",\\n  \")+\" \"+r[1];return r[0]+e+\" \"+t.join(\", \")+\" \"+r[1]}(h,c,S)):S[0]+c+S[1]}function l(t){return\"[\"+Error.prototype.toString.call(t)+\"]\"}function d(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize(\"[Getter/Setter]\",\"special\"):t.stylize(\"[Getter]\",\"special\"):u.set&&(a=t.stylize(\"[Setter]\",\"special\")),T(n,i)||(s=\"[\"+i+\"]\"),a||(t.seen.indexOf(u.value)<0?(a=g(r)?f(t,u.value,null):f(t,u.value,r-1)).indexOf(\"\\n\")>-1&&(a=o?a.split(\"\\n\").map((function(t){return\"  \"+t})).join(\"\\n\").slice(2):\"\\n\"+a.split(\"\\n\").map((function(t){return\"   \"+t})).join(\"\\n\")):a=t.stylize(\"[Circular]\",\"special\")),v(s)){if(o&&i.match(/^\\d+$/))return a;(s=JSON.stringify(\"\"+i)).match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(s=s.slice(1,-1),s=t.stylize(s,\"name\")):(s=s.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),s=t.stylize(s,\"string\"))}return s+\": \"+a}function p(t){return Array.isArray(t)}function m(t){return\"boolean\"==typeof t}function g(t){return null===t}function y(t){return\"number\"==typeof t}function b(t){return\"string\"==typeof t}function v(t){return void 0===t}function w(t){return M(t)&&\"[object RegExp]\"===S(t)}function M(t){return\"object\"==typeof t&&null!==t}function _(t){return M(t)&&\"[object Date]\"===S(t)}function E(t){return M(t)&&(\"[object Error]\"===S(t)||t instanceof Error)}function A(t){return\"function\"==typeof t}function S(t){return Object.prototype.toString.call(t)}function x(t){return t<10?\"0\"+t.toString(10):t.toString(10)}a=a.replace(/[|\\\\{}()[\\]^$+?.]/g,\"\\\\$&\").replace(/\\*/g,\".*\").replace(/,/g,\"$|^\").toUpperCase(),s=new RegExp(\"^\"+a+\"$\",\"i\"),e.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(s.test(t)){var r=process.pid;o[t]=function(){var n=e.format.apply(e,arguments);console.error(\"%s %d: %s\",t,r,n)}}else o[t]=function(){};return o[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"},e.types=r(54895),e.isArray=p,e.isBoolean=m,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=b,e.isSymbol=function(t){return\"symbol\"==typeof t},e.isUndefined=v,e.isRegExp=w,e.types.isRegExp=w,e.isObject=M,e.isDate=_,e.types.isDate=_,e.isError=E,e.types.isNativeError=E,e.isFunction=A,e.isPrimitive=function(t){return null===t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||\"symbol\"==typeof t||void 0===t},e.isBuffer=r(10082);var B=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log(\"%s - %s\",(t=new Date,r=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(\":\"),[t.getDate(),B[t.getMonth()],r].join(\" \")),e.format.apply(e,arguments))},e.inherits=r(91285),e._extend=function(t,e){if(!e||!M(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var I=\"undefined\"!=typeof Symbol?Symbol(\"util.promisify.custom\"):void 0;function k(t,e){if(!t){var r=new Error(\"Promise was rejected with a falsy value\");r.reason=t,t=r}return e(t)}e.promisify=function(t){if(\"function\"!=typeof t)throw new TypeError('The \"original\" argument must be of type Function');if(I&&t[I]){var e;if(\"function\"!=typeof(e=t[I]))throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');return Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),I&&Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=I,e.callbackify=function(t){if(\"function\"!=typeof t)throw new TypeError('The \"original\" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var n=e.pop();if(\"function\"!=typeof n)throw new TypeError(\"The last argument must be of type Function\");var i=this,o=function(){return n.apply(i,arguments)};t.apply(this,e).then((function(t){process.nextTick(o.bind(null,null,t))}),(function(t){process.nextTick(k.bind(null,t,o))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,n(t)),e}},32094:(t,e,r)=>{\"use strict\";var n=r(83243),i=r(62191),o=r(89429),s=r(62680),a=r(50326),u=s(\"Object.prototype.toString\"),h=r(67226)(),c=\"undefined\"==typeof globalThis?r.g:globalThis,f=i(),l=s(\"String.prototype.slice\"),d=Object.getPrototypeOf,p=s(\"Array.prototype.indexOf\",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},m={__proto__:null};n(f,h&&a&&d?function(t){var e=new c[t];if(Symbol.toStringTag in e){var r=d(e),n=a(r,Symbol.toStringTag);if(!n){var i=d(r);n=a(i,Symbol.toStringTag)}m[\"$\"+t]=o(n.get)}}:function(t){var e=new c[t],r=e.slice||e.set;r&&(m[\"$\"+t]=o(r))});t.exports=function(t){if(!t||\"object\"!=typeof t)return!1;if(!h){var e=l(u(t),8,-1);return p(f,e)>-1?e:\"Object\"===e&&function(t){var e=!1;return n(m,(function(r,n){if(!e)try{r(t),e=l(n,1)}catch(t){}})),e}(t)}return a?function(t){var e=!1;return n(m,(function(r,n){if(!e)try{\"$\"+r(t)===n&&(e=l(n,1))}catch(t){}})),e}(t):null}},65652:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BaseTransaction=void 0;const n=r(31664),i=r(77913),o=r(2074),s=r(9939);e.BaseTransaction=class{constructor(t,e){this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=n.Chain.Mainnet,this.DEFAULT_HARDFORK=n.Hardfork.Merge;const{nonce:r,gasLimit:o,to:a,value:u,data:h,v:c,r:f,s:l,type:d}=t;this._type=Number((0,i.bufferToBigInt)((0,i.toBuffer)(d))),this.txOptions=e;const p=(0,i.toBuffer)(\"\"===a?\"0x\":a),m=(0,i.toBuffer)(\"\"===c?\"0x\":c),g=(0,i.toBuffer)(\"\"===f?\"0x\":f),y=(0,i.toBuffer)(\"\"===l?\"0x\":l);this.nonce=(0,i.bufferToBigInt)((0,i.toBuffer)(\"\"===r?\"0x\":r)),this.gasLimit=(0,i.bufferToBigInt)((0,i.toBuffer)(\"\"===o?\"0x\":o)),this.to=p.length>0?new i.Address(p):void 0,this.value=(0,i.bufferToBigInt)((0,i.toBuffer)(\"\"===u?\"0x\":u)),this.data=(0,i.toBuffer)(\"\"===h?\"0x\":h),this.v=m.length>0?(0,i.bufferToBigInt)(m):void 0,this.r=g.length>0?(0,i.bufferToBigInt)(g):void 0,this.s=y.length>0?(0,i.bufferToBigInt)(y):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0);const b=void 0===this.to||null===this.to,v=e.allowUnlimitedInitCodeSize??!1,w=e.common??this._getCommon();b&&w.isActivatedEIP(3860)&&!1===v&&(0,s.checkMaxInitCodeSize)(w,this.data.length)}get type(){return this._type}supports(t){return this.activeCapabilities.includes(t)}validate(t=!1){const e=[];return this.getBaseFee()>this.gasLimit&&e.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),this.isSigned()&&!this.verifySignature()&&e.push(\"Invalid Signature\"),t?e:0===e.length}_validateYParity(){const{v:t}=this;if(void 0!==t&&t!==BigInt(0)&&t!==BigInt(1)){const t=this._errorMsg(\"The y-parity of the transaction should either be 0 or 1\");throw new Error(t)}}_validateHighS(){const{s:t}=this;if(this.common.gteHardfork(\"homestead\")&&void 0!==t&&t>i.SECP256K1_ORDER_DIV_2){const t=this._errorMsg(\"Invalid Signature: s-values greater than secp256k1n/2 are considered invalid\");throw new Error(t)}}getBaseFee(){const t=this.common.param(\"gasPrices\",\"tx\");let e=this.getDataFee();if(t&&(e+=t),this.common.gteHardfork(\"homestead\")&&this.toCreationAddress()){const t=this.common.param(\"gasPrices\",\"txCreation\");t&&(e+=t)}return e}getDataFee(){const t=this.common.param(\"gasPrices\",\"txDataZero\"),e=this.common.param(\"gasPrices\",\"txDataNonZero\");let r=BigInt(0);for(let n=0;n<this.data.length;n++)0===this.data[n]?r+=t:r+=e;if((void 0===this.to||null===this.to)&&this.common.isActivatedEIP(3860)){const t=BigInt(Math.ceil(this.data.length/32));r+=this.common.param(\"gasPrices\",\"initCodeWordCost\")*t}return r}toCreationAddress(){return void 0===this.to||0===this.to.buf.length}isSigned(){const{v:t,r:e,s:r}=this;return void 0!==t&&void 0!==e&&void 0!==r}verifySignature(){try{const t=this.getSenderPublicKey();return 0!==(0,i.unpadBuffer)(t).length}catch(t){return!1}}getSenderAddress(){return new i.Address((0,i.publicToAddress)(this.getSenderPublicKey()))}sign(t){if(32!==t.length){const t=this._errorMsg(\"Private key must be 32 bytes in length.\");throw new Error(t)}let e=!1;0===this.type&&this.common.gteHardfork(\"spuriousDragon\")&&!this.supports(o.Capability.EIP155ReplayProtection)&&(this.activeCapabilities.push(o.Capability.EIP155ReplayProtection),e=!0);const r=this.getMessageToSign(!0),{v:n,r:s,s:a}=(0,i.ecsign)(r,t),u=this._processSignature(n,s,a);if(e){const t=this.activeCapabilities.indexOf(o.Capability.EIP155ReplayProtection);t>-1&&this.activeCapabilities.splice(t,1)}return u}_getCommon(t,e){if(void 0!==e){const r=(0,i.bufferToBigInt)((0,i.toBuffer)(e));if(t){if(t.chainId()!==r){const t=this._errorMsg(\"The chain ID does not match the chain ID of Common\");throw new Error(t)}return t.copy()}return n.Common.isSupportedChainId(r)?new n.Common({chain:r,hardfork:this.DEFAULT_HARDFORK}):n.Common.custom({name:\"custom-chain\",networkId:r,chainId:r},{baseChain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}return t?.copy()??new n.Common({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}_validateCannotExceedMaxInteger(t,e=256,r=!1){for(const[n,o]of Object.entries(t))switch(e){case 64:if(r){if(void 0!==o&&o>=i.MAX_UINT64){const t=this._errorMsg(`${n} cannot equal or exceed MAX_UINT64 (2^64-1), given ${o}`);throw new Error(t)}}else if(void 0!==o&&o>i.MAX_UINT64){const t=this._errorMsg(`${n} cannot exceed MAX_UINT64 (2^64-1), given ${o}`);throw new Error(t)}break;case 256:if(r){if(void 0!==o&&o>=i.MAX_INTEGER){const t=this._errorMsg(`${n} cannot equal or exceed MAX_INTEGER (2^256-1), given ${o}`);throw new Error(t)}}else if(void 0!==o&&o>i.MAX_INTEGER){const t=this._errorMsg(`${n} cannot exceed MAX_INTEGER (2^256-1), given ${o}`);throw new Error(t)}break;default:{const t=this._errorMsg(\"unimplemented bits value\");throw new Error(t)}}}static _validateNotArray(t){const e=[\"nonce\",\"gasPrice\",\"gasLimit\",\"to\",\"value\",\"data\",\"v\",\"r\",\"s\",\"type\",\"baseFee\",\"maxFeePerGas\",\"chainId\"];for(const[r,n]of Object.entries(t))if(e.includes(r)&&Array.isArray(n))throw new Error(`${r} cannot be an array`)}_getSharedErrorPostfix(){let t=\"\";try{t=this.isSigned()?(0,i.bufferToHex)(this.hash()):\"not available (unsigned)\"}catch(e){t=\"error\"}let e=\"\";try{e=this.isSigned().toString()}catch(e){t=\"error\"}let r=\"\";try{r=this.common.hardfork()}catch(t){r=\"error\"}let n=`tx type=${this.type} hash=${t} nonce=${this.nonce} value=${this.value} `;return n+=`signed=${e} hf=${r}`,n}}},75902:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BYTES_PER_FIELD_ELEMENT=e.FIELD_ELEMENTS_PER_BLOB=e.MAX_TX_WRAP_KZG_COMMITMENTS=e.LIMIT_BLOBS_PER_TX=e.MAX_VERSIONED_HASHES_LIST_SIZE=e.MAX_ACCESS_LIST_SIZE=e.MAX_CALLDATA_SIZE=void 0,e.MAX_CALLDATA_SIZE=16777216,e.MAX_ACCESS_LIST_SIZE=16777216,e.MAX_VERSIONED_HASHES_LIST_SIZE=16777216,e.LIMIT_BLOBS_PER_TX=16777216,e.MAX_TX_WRAP_KZG_COMMITMENTS=16777216,e.FIELD_ELEMENTS_PER_BLOB=4096,e.BYTES_PER_FIELD_ELEMENT=32},37365:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.FeeMarketEIP1559Transaction=void 0;const i=r(57256),o=r(77913),s=r(1115),a=r(65652),u=r(9939),h=n.from(2..toString(16).padStart(2,\"0\"),\"hex\");class c extends a.BaseTransaction{constructor(t,e={}){super({...t,type:2},e),this.DEFAULT_HARDFORK=\"london\";const{chainId:r,accessList:n,maxFeePerGas:i,maxPriorityFeePerGas:s}=t;if(this.common=this._getCommon(e.common,r),this.chainId=this.common.chainId(),!1===this.common.isActivatedEIP(1559))throw new Error(\"EIP-1559 not enabled on Common\");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const h=u.AccessLists.getAccessListData(n??[]);if(this.accessList=h.accessList,this.AccessListJSON=h.AccessListJSON,u.AccessLists.verifyAccessList(this.accessList),this.maxFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===i?\"0x\":i)),this.maxPriorityFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===s?\"0x\":s)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),a.BaseTransaction._validateNotArray(t),this.gasLimit*this.maxFeePerGas>o.MAX_INTEGER){const t=this._errorMsg(\"gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)\");throw new Error(t)}if(this.maxFeePerGas<this.maxPriorityFeePerGas){const t=this._errorMsg(\"maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)\");throw new Error(t)}this._validateYParity(),this._validateHighS();(e?.freeze??!0)&&Object.freeze(this)}static fromTxData(t,e={}){return new c(t,e)}static fromSerializedTx(t,e={}){if(!t.slice(0,1).equals(h))throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: 2, received: ${t.slice(0,1).toString(\"hex\")}`);const r=(0,o.arrToBufArr)(i.RLP.decode(t.slice(1)));if(!Array.isArray(r))throw new Error(\"Invalid serialized tx input: must be array\");return c.fromValuesArray(r,e)}static fromValuesArray(t,e={}){if(9!==t.length&&12!==t.length)throw new Error(\"Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).\");const[r,n,i,s,a,u,h,f,l,d,p,m]=t;return this._validateNotArray({chainId:r,v:d}),(0,o.validateNoLeadingZeroes)({nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:s,gasLimit:a,value:h,v:d,r:p,s:m}),new c({chainId:(0,o.bufferToBigInt)(r),nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:s,gasLimit:a,to:u,value:h,data:f,accessList:l??[],v:void 0!==d?(0,o.bufferToBigInt)(d):void 0,r:p,s:m},e)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let t=super.getDataFee();return t+=BigInt(u.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t}getUpfrontCost(t=BigInt(0)){const e=this.maxPriorityFeePerGas,r=this.maxFeePerGas-t,n=(e<r?e:r)+t;return this.gasLimit*n+this.value}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.chainId),(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,o.bigIntToUnpaddedBuffer)(this.maxFeePerGas),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){const t=this.raw();return n.concat([h,n.from(i.RLP.encode((0,o.bufArrToArr)(t)))])}getMessageToSign(t=!0){const e=this.raw().slice(0,9),r=n.concat([h,n.from(i.RLP.encode((0,o.bufArrToArr)(e)))]);return t?n.from((0,s.keccak256)(r)):r}hash(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call hash method if transaction is not signed\");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,s.keccak256)(this.serialize()))),this.cache.hash):n.from((0,s.keccak256)(this.serialize()))}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call this method if transaction is not signed\");throw new Error(t)}const t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(t,e+BigInt(27),(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n))}catch(t){const e=this._errorMsg(\"Invalid Signature\");throw new Error(e)}}_processSignature(t,e,r){const n={...this.txOptions,common:this.common};return c.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:(0,o.bufferToBigInt)(e),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){const t=u.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bigIntToHex)(this.chainId),nonce:(0,o.bigIntToHex)(this.nonce),maxPriorityFeePerGas:(0,o.bigIntToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,o.bigIntToHex)(this.maxFeePerGas),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:\"0x\"+this.data.toString(\"hex\"),accessList:t,v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}errorStr(){let t=this._getSharedErrorPostfix();return t+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}e.FeeMarketEIP1559Transaction=c},56769:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.AccessListEIP2930Transaction=void 0;const i=r(57256),o=r(77913),s=r(1115),a=r(65652),u=r(9939),h=n.from(1..toString(16).padStart(2,\"0\"),\"hex\");class c extends a.BaseTransaction{constructor(t,e={}){super({...t,type:1},e),this.DEFAULT_HARDFORK=\"berlin\";const{chainId:r,accessList:n,gasPrice:i}=t;if(this.common=this._getCommon(e.common,r),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(2930))throw new Error(\"EIP-2930 not enabled on Common\");this.activeCapabilities=this.activeCapabilities.concat([2718,2930]);const s=u.AccessLists.getAccessListData(n??[]);if(this.accessList=s.accessList,this.AccessListJSON=s.AccessListJSON,u.AccessLists.verifyAccessList(this.accessList),this.gasPrice=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===i?\"0x\":i)),this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),a.BaseTransaction._validateNotArray(t),this.gasPrice*this.gasLimit>o.MAX_INTEGER){const t=this._errorMsg(\"gasLimit * gasPrice cannot exceed MAX_INTEGER\");throw new Error(t)}this._validateYParity(),this._validateHighS();(e?.freeze??!0)&&Object.freeze(this)}static fromTxData(t,e={}){return new c(t,e)}static fromSerializedTx(t,e={}){if(!t.slice(0,1).equals(h))throw new Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: 1, received: ${t.slice(0,1).toString(\"hex\")}`);const r=(0,o.arrToBufArr)(i.RLP.decode(Uint8Array.from(t.slice(1))));if(!Array.isArray(r))throw new Error(\"Invalid serialized tx input: must be array\");return c.fromValuesArray(r,e)}static fromValuesArray(t,e={}){if(8!==t.length&&11!==t.length)throw new Error(\"Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).\");const[r,n,i,s,a,u,h,f,l,d,p]=t;this._validateNotArray({chainId:r,v:l}),(0,o.validateNoLeadingZeroes)({nonce:n,gasPrice:i,gasLimit:s,value:u,v:l,r:d,s:p});return new c({chainId:(0,o.bufferToBigInt)(r),nonce:n,gasPrice:i,gasLimit:s,to:a,value:u,data:h,accessList:f??[],v:void 0!==l?(0,o.bufferToBigInt)(l):void 0,r:d,s:p},e)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let t=super.getDataFee();return t+=BigInt(u.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.chainId),(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){const t=this.raw();return n.concat([h,n.from(i.RLP.encode((0,o.bufArrToArr)(t)))])}getMessageToSign(t=!0){const e=this.raw().slice(0,8),r=n.concat([h,n.from(i.RLP.encode((0,o.bufArrToArr)(e)))]);return t?n.from((0,s.keccak256)(r)):r}hash(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call hash method if transaction is not signed\");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,s.keccak256)(this.serialize()))),this.cache.hash):n.from((0,s.keccak256)(this.serialize()))}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call this method if transaction is not signed\");throw new Error(t)}const t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(t,e+BigInt(27),(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n))}catch(t){const e=this._errorMsg(\"Invalid Signature\");throw new Error(e)}}_processSignature(t,e,r){const n={...this.txOptions,common:this.common};return c.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:(0,o.bufferToBigInt)(e),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){const t=u.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bigIntToHex)(this.chainId),nonce:(0,o.bigIntToHex)(this.nonce),gasPrice:(0,o.bigIntToHex)(this.gasPrice),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:\"0x\"+this.data.toString(\"hex\"),accessList:t,v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}errorStr(){let t=this._getSharedErrorPostfix();return t+=` gasPrice=${this.gasPrice} accessListCount=${this.accessList?.length??0}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}e.AccessListEIP2930Transaction=c},88516:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.BlobEIP4844Transaction=void 0;const i=r(60557),o=r(77913),s=r(1115),a=r(65652),u=r(75902),h=r(48274),c=r(2074),f=r(9939),l=r(23411),d=n.from(5..toString(16).padStart(2,\"0\"),\"hex\");class p extends a.BaseTransaction{constructor(t,e={}){super({...t,type:5},e);const{chainId:r,accessList:n,maxFeePerGas:i,maxPriorityFeePerGas:s,maxFeePerDataGas:h}=t;if(this.common=this._getCommon(e.common,r),this.chainId=this.common.chainId(),!1===this.common.isActivatedEIP(1559))throw new Error(\"EIP-1559 not enabled on Common\");if(!1===this.common.isActivatedEIP(4844))throw new Error(\"EIP-4844 not enabled on Common\");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const c=f.AccessLists.getAccessListData(n??[]);if(this.accessList=c.accessList,this.AccessListJSON=c.AccessListJSON,f.AccessLists.verifyAccessList(this.accessList),this.maxFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===i?\"0x\":i)),this.maxPriorityFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===s?\"0x\":s)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),a.BaseTransaction._validateNotArray(t),this.gasLimit*this.maxFeePerGas>o.MAX_INTEGER){const t=this._errorMsg(\"gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)\");throw new Error(t)}if(this.maxFeePerGas<this.maxPriorityFeePerGas){const t=this._errorMsg(\"maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)\");throw new Error(t)}this.maxFeePerDataGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===(h??\"\")?\"0x\":h)),this.versionedHashes=(t.versionedHashes??[]).map((t=>(0,o.toBuffer)(t))),this._validateYParity(),this._validateHighS();for(const t of this.versionedHashes){if(32!==t.length){const t=this._errorMsg(\"versioned hash is invalid length\");throw new Error(t)}if(BigInt(t[0])!==this.common.paramByEIP(\"sharding\",\"blobCommitmentVersionKzg\",4844)){const t=this._errorMsg(\"versioned hash does not start with KZG commitment version\");throw new Error(t)}}if(this.versionedHashes.length>u.LIMIT_BLOBS_PER_TX){const t=this._errorMsg(`tx can contain at most ${u.LIMIT_BLOBS_PER_TX} blobs`);throw new Error(t)}this.blobs=t.blobs?.map((t=>(0,o.toBuffer)(t))),this.kzgCommitments=t.kzgCommitments?.map((t=>(0,o.toBuffer)(t))),this.aggregateKzgProof=(0,o.toBuffer)(t.kzgProof);(e?.freeze??!0)&&Object.freeze(this)}static fromTxData(t,e){return new p(t,e)}static minimalFromNetworkWrapper(t,e){return p.fromTxData({...t,blobs:void 0,kzgCommitments:void 0,kzgProof:void 0},e)}static fromSerializedBlobTxNetworkWrapper(t,e){if(!e||!e.common)throw new Error(\"common instance required to validate versioned hashes\");const r=c.BlobNetworkTransactionWrapper.deserialize(t.slice(1)),s=r.tx.message,a=Number(e.common.paramByEIP(\"sharding\",\"blobCommitmentVersionKzg\",4844));((t,e,r,n,o)=>{if(t.length!==e.length||e.length!==r.length)throw new Error(\"Number of versionedHashes, blobs, and commitments not all equal\");try{h.kzg.verifyAggregateKzgProof(e,r,n)}catch(t){throw new Error(\"KZG proof cannot be verified from blobs/commitments\")}for(let e=0;e<t.length;e++){const n=(0,l.computeVersionedHash)(r[e],o);if(!(0,i.byteArrayEquals)(n,t[e]))throw new Error(`commitment for blob at index ${e} does not match versionedHash`)}})(s.blobVersionedHashes,r.blobs,r.blobKzgs,r.kzgAggregatedProof,a);const u=[];for(const t of s.accessList){const e=[n.from(t.address),t.storageKeys.map((t=>n.from(t)))];u.push(e)}const f=null===s.to.value?void 0:o.Address.fromString((0,o.bufferToHex)(n.from(s.to.value))),d=s.blobVersionedHashes.map((t=>n.from(t))),m=r.blobKzgs.map((t=>n.from(t))),g=r.blobs.map((t=>n.from(t))),y={...s,versionedHashes:d,accessList:u,to:f,blobs:g,kzgCommitments:m,kzgProof:n.from(r.kzgAggregatedProof),r:r.tx.signature.r,s:r.tx.signature.s,v:BigInt(r.tx.signature.yParity),gasLimit:s.gas,maxFeePerGas:s.maxFeePerGas,maxPriorityFeePerGas:s.maxPriorityFeePerGas};return new p(y,e)}static fromSerializedTx(t,e){const r=c.SignedBlobTransactionType.deserialize(t.slice(1)),i=r.message,s=[];for(const t of i.accessList){const e=[n.from(t.address),t.storageKeys.map((t=>n.from(t)))];s.push(e)}const a=null===i.to.value?void 0:o.Address.fromString((0,o.bufferToHex)(n.from(i.to.value))),u=i.blobVersionedHashes.map((t=>n.from(t))),h={...i,versionedHashes:u,to:a,accessList:s,r:r.signature.r,s:r.signature.s,v:BigInt(r.signature.yParity),gasLimit:r.message.gas};return new p(h,e)}getUpfrontCost(t=BigInt(0)){const e=this.maxPriorityFeePerGas,r=this.maxFeePerGas-t,n=(e<r?e:r)+t;return this.gasLimit*n+this.value}raw(){throw new Error(\"Method not implemented.\")}toValue(){const t={selector:void 0!==this.to?1:0,value:this.to?.toBuffer()??null};return{message:{chainId:this.common.chainId(),nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gas:this.gasLimit,to:t,value:this.value,data:this.data,accessList:this.accessList.map((t=>({address:t[0],storageKeys:t[1]}))),blobVersionedHashes:this.versionedHashes,maxFeePerDataGas:this.maxFeePerDataGas},signature:{r:this.r??BigInt(0),s:this.s??BigInt(0),yParity:this.v===BigInt(1)}}}serialize(){const t=c.SignedBlobTransactionType.serialize(this.toValue());return n.concat([d,t])}serializeNetworkWrapper(){if(void 0===this.blobs||void 0===this.kzgCommitments||void 0===this.aggregateKzgProof)throw new Error(\"cannot serialize network wrapper without blobs, KZG commitments and aggregate KZG proof provided\");const t={selector:void 0!==this.to?1:0,value:this.to?.toBuffer()??null},e=this.blobs?.map((t=>Uint8Array.from(t)))??[],r=c.BlobNetworkTransactionWrapper.serialize({blobs:e,blobKzgs:this.kzgCommitments?.map((t=>Uint8Array.from(t)))??[],tx:{...(0,f.blobTxToNetworkWrapperDataFormat)(this),...t},kzgAggregatedProof:Uint8Array.from(this.aggregateKzgProof??[])});return n.concat([n.from([5]),r])}getMessageToSign(t){return this.unsignedHash()}unsignedHash(){const t=c.BlobTransactionType.serialize(this.toValue().message);return n.from((0,s.keccak256)(n.concat([d,t])))}hash(){return n.from((0,s.keccak256)(this.serialize()))}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call this method if transaction is not signed\");throw new Error(t)}const t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(t,e+BigInt(27),(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n))}catch(t){const e=this._errorMsg(\"Invalid Signature\");throw new Error(e)}}toJSON(){const t=f.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bigIntToHex)(this.chainId),nonce:(0,o.bigIntToHex)(this.nonce),maxPriorityFeePerGas:(0,o.bigIntToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,o.bigIntToHex)(this.maxFeePerGas),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:\"0x\"+this.data.toString(\"hex\"),accessList:t,v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0,maxFeePerDataGas:(0,o.bigIntToHex)(this.maxFeePerDataGas),versionedHashes:this.versionedHashes.map((t=>(0,o.bufferToHex)(t)))}}_processSignature(t,e,r){const n={...this.txOptions,common:this.common};return p.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:(0,o.bufferToBigInt)(e),s:(0,o.bufferToBigInt)(r),maxFeePerDataGas:this.maxFeePerDataGas,versionedHashes:this.versionedHashes,blobs:this.blobs,kzgCommitments:this.kzgCommitments,kzgProof:this.aggregateKzgProof},n)}errorStr(){let t=this._getSharedErrorPostfix();return t+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}numBlobs(){return this.versionedHashes.length}}e.BlobEIP4844Transaction=p},72346:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.normalizeTxParams=void 0;const n=r(77913);e.normalizeTxParams=t=>{const e=Object.assign({},t);return e.gasLimit=(0,n.toType)(e.gasLimit??e.gas,n.TypeOutput.BigInt),e.data=void 0===e.data?e.input:e.data,e.gasPrice=void 0!==e.gasPrice?BigInt(e.gasPrice):void 0,e.value=void 0!==e.value?BigInt(e.value):void 0,e.to=null!==e.to&&void 0!==e.to?(0,n.setLengthLeft)((0,n.toBuffer)(e.to),20):null,e.v=\"0x0\"===e.v?\"0x\":e.v,e.r=\"0x0\"===e.r?\"0x\":e.r,e.s=\"0x0\"===e.s?\"0x\":e.s,\"0x\"!==e.v&&(e.v=(0,n.toType)(e.v,n.TypeOutput.BigInt)),e}},59353:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.computeVersionedHash=e.TransactionFactory=e.Transaction=e.kzg=e.initKZG=e.BlobEIP4844Transaction=e.AccessListEIP2930Transaction=e.FeeMarketEIP1559Transaction=void 0;var o=r(37365);Object.defineProperty(e,\"FeeMarketEIP1559Transaction\",{enumerable:!0,get:function(){return o.FeeMarketEIP1559Transaction}});var s=r(56769);Object.defineProperty(e,\"AccessListEIP2930Transaction\",{enumerable:!0,get:function(){return s.AccessListEIP2930Transaction}});var a=r(88516);Object.defineProperty(e,\"BlobEIP4844Transaction\",{enumerable:!0,get:function(){return a.BlobEIP4844Transaction}});var u=r(48274);Object.defineProperty(e,\"initKZG\",{enumerable:!0,get:function(){return u.initKZG}}),Object.defineProperty(e,\"kzg\",{enumerable:!0,get:function(){return u.kzg}});var h=r(91453);Object.defineProperty(e,\"Transaction\",{enumerable:!0,get:function(){return h.Transaction}});var c=r(75481);Object.defineProperty(e,\"TransactionFactory\",{enumerable:!0,get:function(){return c.TransactionFactory}}),i(r(2074),e);var f=r(23411);Object.defineProperty(e,\"computeVersionedHash\",{enumerable:!0,get:function(){return f.computeVersionedHash}})},48274:(t,e)=>{\"use strict\";function r(){throw Error(\"kzg library not loaded\")}Object.defineProperty(e,\"__esModule\",{value:!0}),e.initKZG=e.kzg=void 0,e.kzg={freeTrustedSetup:r,loadTrustedSetup:r,blobToKzgCommitment:r,computeAggregateKzgProof:r,verifyKzgProof:r,verifyAggregateKzgProof:r},e.initKZG=function(t,r){e.kzg=t,e.kzg.loadTrustedSetup(r)}},91453:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Transaction=void 0;const i=r(57256),o=r(77913),s=r(1115),a=r(65652),u=r(2074);function h(t,e){const r=Number(t),n=2*Number(e);return r===n+35||r===n+36}class c extends a.BaseTransaction{constructor(t,e={}){if(super({...t,type:0},e),this.common=this._validateTxV(this.v,e.common),this.gasPrice=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===t.gasPrice?\"0x\":t.gasPrice)),this.gasPrice*this.gasLimit>o.MAX_INTEGER){const t=this._errorMsg(\"gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)\");throw new Error(t)}this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),a.BaseTransaction._validateNotArray(t),this.common.gteHardfork(\"spuriousDragon\")&&(this.isSigned()?h(this.v,this.common.chainId())&&this.activeCapabilities.push(u.Capability.EIP155ReplayProtection):this.activeCapabilities.push(u.Capability.EIP155ReplayProtection));(e?.freeze??!0)&&Object.freeze(this)}static fromTxData(t,e={}){return new c(t,e)}static fromSerializedTx(t,e={}){const r=(0,o.arrToBufArr)(i.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(r))throw new Error(\"Invalid serialized tx input. Must be array\");return this.fromValuesArray(r,e)}static fromValuesArray(t,e={}){if(6!==t.length&&9!==t.length)throw new Error(\"Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).\");const[r,n,i,s,a,u,h,f,l]=t;return(0,o.validateNoLeadingZeroes)({nonce:r,gasPrice:n,gasLimit:i,value:a,v:h,r:f,s:l}),new c({nonce:r,gasPrice:n,gasLimit:i,to:s,value:a,data:u,v:h,r:f,s:l},e)}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){return n.from(i.RLP.encode((0,o.bufArrToArr)(this.raw())))}_getMessageToSign(){const t=[(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data];return this.supports(u.Capability.EIP155ReplayProtection)&&(t.push((0,o.toBuffer)(this.common.chainId())),t.push((0,o.unpadBuffer)((0,o.toBuffer)(0))),t.push((0,o.unpadBuffer)((0,o.toBuffer)(0)))),t}getMessageToSign(t=!0){const e=this._getMessageToSign();return t?n.from((0,s.keccak256)(i.RLP.encode((0,o.bufArrToArr)(e)))):e}getDataFee(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:super.getDataFee(),hardfork:this.common.hardfork()}),super.getDataFee())}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}hash(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call hash method if transaction is not signed\");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,s.keccak256)(i.RLP.encode((0,o.bufArrToArr)(this.raw()))))),this.cache.hash):n.from((0,s.keccak256)(i.RLP.encode((0,o.bufArrToArr)(this.raw()))))}getMessageToVerifySignature(){if(!this.isSigned()){const t=this._errorMsg(\"This transaction is not signed\");throw new Error(t)}const t=this._getMessageToSign();return n.from((0,s.keccak256)(i.RLP.encode((0,o.bufArrToArr)(t))))}getSenderPublicKey(){const t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(t,e,(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n),this.supports(u.Capability.EIP155ReplayProtection)?this.common.chainId():void 0)}catch(t){const e=this._errorMsg(\"Invalid Signature\");throw new Error(e)}}_processSignature(t,e,r){this.supports(u.Capability.EIP155ReplayProtection)&&(t+=this.common.chainId()*BigInt(2)+BigInt(8));const n={...this.txOptions,common:this.common};return c.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:t,r:(0,o.bufferToBigInt)(e),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){return{nonce:(0,o.bigIntToHex)(this.nonce),gasPrice:(0,o.bigIntToHex)(this.gasPrice),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:\"0x\"+this.data.toString(\"hex\"),v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}_validateTxV(t,e){let r;const n=void 0!==t?Number(t):void 0;if(void 0!==n&&n<37&&27!==n&&28!==n)throw new Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${n}`);if(void 0!==n&&0!==n&&(!e||e.gteHardfork(\"spuriousDragon\"))&&27!==n&&28!==n)if(e){if(!h(BigInt(n),e.chainId()))throw new Error(`Incompatible EIP155-based V ${n} and chain id ${e.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`)}else{let t;t=(n-35)%2==0?35:36,r=BigInt(n-t)/BigInt(2)}return this._getCommon(e,r)}errorStr(){let t=this._getSharedErrorPostfix();return t+=` gasPrice=${this.gasPrice}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}e.Transaction=c},75481:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.TransactionFactory=void 0;const i=r(77913),o=r(37365),s=r(56769),a=r(88516),u=r(72346),h=r(91453);class c{constructor(){}static fromTxData(t,e={}){if(\"type\"in t&&void 0!==t.type){const r=Number((0,i.bufferToBigInt)((0,i.toBuffer)(t.type)));if(0===r)return h.Transaction.fromTxData(t,e);if(1===r)return s.AccessListEIP2930Transaction.fromTxData(t,e);if(2===r)return o.FeeMarketEIP1559Transaction.fromTxData(t,e);if(5===r)return a.BlobEIP4844Transaction.fromTxData(t,e);throw new Error(`Tx instantiation with type ${r} not supported`)}return h.Transaction.fromTxData(t,e)}static fromSerializedData(t,e={}){if(!(t[0]<=127))return h.Transaction.fromSerializedTx(t,e);switch(t[0]){case 1:return s.AccessListEIP2930Transaction.fromSerializedTx(t,e);case 2:return o.FeeMarketEIP1559Transaction.fromSerializedTx(t,e);case 5:return a.BlobEIP4844Transaction.fromSerializedTx(t,e);default:throw new Error(`TypedTransaction with ID ${t[0]} unknown`)}}static fromBlockBodyData(t,e={}){if(n.isBuffer(t))return this.fromSerializedData(t,e);if(Array.isArray(t))return h.Transaction.fromValuesArray(t,e);throw new Error(\"Cannot decode transaction: unknown type input\")}static async fromEthersProvider(t,e,r){const n=(0,i.getProvider)(t),o=await(0,i.fetchFromProvider)(n,{method:\"eth_getTransactionByHash\",params:[e]});if(null===o)throw new Error(\"No data returned from provider\");return c.fromRPCTx(o,r)}static async fromRPCTx(t,e={}){return c.fromTxData((0,u.normalizeTxParams)(t),e)}}e.TransactionFactory=c},2074:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BlobNetworkTransactionWrapper=e.KZGProofType=e.KZGCommitmentType=e.SignedBlobTransactionType=e.ECDSASignatureType=e.BlobTransactionType=e.AccessTupleType=e.AddressType=e.isAccessList=e.isAccessListBuffer=e.Capability=void 0;const n=r(60557),i=r(75902),o=new n.ByteVectorType(20),s=new n.ByteVectorType(32),a=new n.ByteVectorType(48),u=new n.UintBigintType(8),h=new n.UintBigintType(32);function c(t){if(0===t.length)return!0;const e=t[0];return!!Array.isArray(e)}!function(t){t[t.EIP155ReplayProtection=155]=\"EIP155ReplayProtection\",t[t.EIP1559FeeMarket=1559]=\"EIP1559FeeMarket\",t[t.EIP2718TypedTransaction=2718]=\"EIP2718TypedTransaction\",t[t.EIP2930AccessLists=2930]=\"EIP2930AccessLists\"}(e.Capability||(e.Capability={})),e.isAccessListBuffer=c,e.isAccessList=function(t){return!c(t)},e.AddressType=o,e.AccessTupleType=new n.ContainerType({address:e.AddressType,storageKeys:new n.ListCompositeType(s,i.MAX_VERSIONED_HASHES_LIST_SIZE)}),e.BlobTransactionType=new n.ContainerType({chainId:h,nonce:u,maxPriorityFeePerGas:h,maxFeePerGas:h,gas:u,to:new n.UnionType([new n.NoneType,e.AddressType]),value:h,data:new n.ByteListType(i.MAX_CALLDATA_SIZE),accessList:new n.ListCompositeType(e.AccessTupleType,i.MAX_ACCESS_LIST_SIZE),maxFeePerDataGas:h,blobVersionedHashes:new n.ListCompositeType(s,i.MAX_VERSIONED_HASHES_LIST_SIZE)}),e.ECDSASignatureType=new n.ContainerType({yParity:new n.BooleanType,r:h,s:h}),e.SignedBlobTransactionType=new n.ContainerType({message:e.BlobTransactionType,signature:e.ECDSASignatureType}),e.KZGCommitmentType=a,e.KZGProofType=e.KZGCommitmentType,e.BlobNetworkTransactionWrapper=new n.ContainerType({tx:e.SignedBlobTransactionType,blobKzgs:new n.ListCompositeType(e.KZGCommitmentType,i.MAX_TX_WRAP_KZG_COMMITMENTS),blobs:new n.ListCompositeType(new n.ByteVectorType(i.FIELD_ELEMENTS_PER_BLOB*i.BYTES_PER_FIELD_ELEMENT),i.LIMIT_BLOBS_PER_TX),kzgAggregatedProof:e.KZGProofType})},9939:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.blobTxToNetworkWrapperDataFormat=e.AccessLists=e.checkMaxInitCodeSize=void 0;const n=r(77913),i=r(2074);e.checkMaxInitCodeSize=function(t,e){const r=t.param(\"vm\",\"maxInitCodeSize\");if(r&&BigInt(e)>r)throw new Error(`the initcode size of this transaction is too large: it is ${e} while the max is ${t.param(\"vm\",\"maxInitCodeSize\")}`)};e.AccessLists=class{static getAccessListData(t){let e,r;if((0,i.isAccessList)(t)){e=t;const i=[];for(let e=0;e<t.length;e++){const r=t[e],o=(0,n.toBuffer)(r.address),s=[];for(let t=0;t<r.storageKeys.length;t++)s.push((0,n.toBuffer)(r.storageKeys[t]));i.push([o,s])}r=i}else{r=t??[];const i=[];for(let t=0;t<r.length;t++){const e=r[t],o=(0,n.bufferToHex)(e[0]),s=[];for(let t=0;t<e[1].length;t++)s.push((0,n.bufferToHex)(e[1][t]));const a={address:o,storageKeys:s};i.push(a)}e=i}return{AccessListJSON:e,accessList:r}}static verifyAccessList(t){for(let e=0;e<t.length;e++){const r=t[e],n=r[0],i=r[1];if(void 0!==r[2])throw new Error(\"Access list item cannot have 3 elements. It can only have an address, and an array of storage slots.\");if(20!==n.length)throw new Error(\"Invalid EIP-2930 transaction: address length should be 20 bytes\");for(let t=0;t<i.length;t++)if(32!==i[t].length)throw new Error(\"Invalid EIP-2930 transaction: storage slot length should be 32 bytes\")}}static getAccessListJSON(t){const e=[];for(let r=0;r<t.length;r++){const i=t[r],o={address:\"0x\"+(0,n.setLengthLeft)(i[0],20).toString(\"hex\"),storageKeys:[]},s=i[1];for(let t=0;t<s.length;t++){const e=s[t];o.storageKeys.push(\"0x\"+(0,n.setLengthLeft)(e,32).toString(\"hex\"))}e.push(o)}return e}static getDataFeeEIP2930(t,e){const r=e.param(\"gasPrices\",\"accessListStorageKeyCost\"),n=e.param(\"gasPrices\",\"accessListAddressCost\");let i=0;for(let e=0;e<t.length;e++){i+=t[e][1].length}return t.length*Number(n)+i*Number(r)}};e.blobTxToNetworkWrapperDataFormat=t=>{const e={selector:void 0!==t.to?1:0,value:t.to?.toBuffer()??null};return{message:{chainId:t.common.chainId(),nonce:t.nonce,maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas,gas:t.gasLimit,to:e,value:t.value,data:t.data,accessList:t.accessList.map((t=>({address:t[0],storageKeys:t[1]}))),blobVersionedHashes:t.versionedHashes,maxFeePerDataGas:t.maxFeePerDataGas},signature:{r:t.r??BigInt(0),s:t.s??BigInt(0),yParity:t.v===BigInt(1)}}}},23411:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.commitmentsToVersionedHashes=e.computeVersionedHash=e.blobsToCommitments=e.getBlobs=void 0;const i=r(55806),o=r(48274),s=4096,a=131072;function u(t){const e=n.alloc(131072,\"binary\");for(let r=0;r<s;r++){const i=n.alloc(32,\"binary\");i.fill(t.subarray(31*r,31*(r+1)),0,31),e.fill(i,32*r,32*(r+1))}return e}e.getBlobs=t=>{const e=n.from(t,\"binary\"),r=n.byteLength(e);if(0===r)throw Error(\"invalid blob data\");if(r>262143)throw Error(\"blob data is too large\");const i=Math.ceil(r/a),o=function(t,e){const r=n.alloc(e*a),i=n.byteLength(t);return r.fill(t,0,i),r[i]=128,r}(e,i),s=[];for(let t=0;t<i;t++){const e=u(o.subarray(t*a,(t+1)*a));s.push(e)}return s};e.blobsToCommitments=t=>{const e=[];for(const r of t)e.push(n.from(o.kzg.blobToKzgCommitment(r)));return e};e.computeVersionedHash=(t,e)=>{const r=new Uint8Array(32);return r.set([e],0),r.set((0,i.sha256)(t).slice(1),1),r};e.commitmentsToVersionedHashes=t=>{const r=[];for(const i of t)r.push(n.from((0,e.computeVersionedHash)(i,1)));return r}},52769:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const i=r(57256),o=r(1115),s=r(80101),a=r(10144),u=r(29267),h=r(25576),c=r(81958),f=r(11976),l=BigInt(0);class d{constructor(t=l,e=l,r=h.KECCAK256_RLP,n=h.KECCAK256_NULL){this.nonce=t,this.balance=e,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(t){const{nonce:e,balance:r,storageRoot:n,codeHash:i}=t;return new d(void 0!==e?(0,u.bufferToBigInt)((0,u.toBuffer)(e)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==i?(0,u.toBuffer)(i):void 0)}static fromRlpSerializedAccount(t){const e=(0,u.arrToBufArr)(i.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(e))throw new Error(\"Invalid serialized account input. Must be array\");return this.fromValuesArray(e)}static fromValuesArray(t){const[e,r,n,i]=t;return new d((0,u.bufferToBigInt)(e),(0,u.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<l)throw new Error(\"nonce must be greater than zero\");if(this.balance<l)throw new Error(\"balance must be greater than zero\");if(32!==this.storageRoot.length)throw new Error(\"storageRoot must have a length of 32\");if(32!==this.codeHash.length)throw new Error(\"codeHash must have a length of 32\")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(h.KECCAK256_NULL)}isEmpty(){return this.balance===l&&this.nonce===l&&this.codeHash.equals(h.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)};e.toChecksumAddress=function(t,e){(0,c.assertIsHexString)(t);const r=(0,f.stripHexPrefix)(t).toLowerCase();let i=\"\";if(void 0!==e){i=(0,u.bufferToBigInt)((0,u.toBuffer)(e)).toString()+\"0x\"}const s=n.from(i+r,\"utf8\"),h=(0,a.bytesToHex)((0,o.keccak256)(s));let l=\"0x\";for(let t=0;t<r.length;t++)parseInt(h[t],16)>=8?l+=r[t].toUpperCase():l+=r[t];return l};e.isValidChecksumAddress=function(t,r){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,r)===t};e.generateAddress=function(t,e){return(0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,u.bufferToBigInt)(e)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,e])))).slice(-20)};e.generateAddress2=function(t,e,r){if((0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,c.assertIsBuffer)(r),20!==t.length)throw new Error(\"Expected from to be of length 20\");if(32!==e.length)throw new Error(\"Expected salt to be of length 32\");const i=(0,o.keccak256)(n.concat([n.from(\"ff\",\"hex\"),t,e,(0,o.keccak256)(r)]));return(0,u.toBuffer)(i).slice(-20)};e.isValidPrivate=function(t){return s.secp256k1.utils.isValidPrivateKey(t)};e.isValidPublic=function(t,e=!1){if((0,c.assertIsBuffer)(t),64===t.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),t])),!0}catch(t){return!1}if(!e)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(t),!0}catch(t){return!1}};e.pubToAddress=function(t,e=!1){if((0,c.assertIsBuffer)(t),e&&64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),64!==t.length)throw new Error(\"Expected pubKey to be of length 64\");return n.from((0,o.keccak256)(t)).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(t){return(0,c.assertIsBuffer)(t),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1))};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(t){return(0,c.assertIsBuffer)(t),64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),t};e.zeroAddress=function(){const t=(0,u.zeros)(20);return(0,u.bufferToHex)(t)};function p(t){const[e,r,n,i]=t;return[e,r,0===(0,u.arrToBufArr)(n).length?h.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?h.KECCAK256_NULL:i]}e.isZeroAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return(0,e.zeroAddress)()===t},e.accountBodyFromSlim=p;const m=new Uint8Array(0);e.accountBodyToSlim=function(t){const[e,r,n,i]=t;return[e,r,(0,u.arrToBufArr)(n).equals(h.KECCAK256_RLP)?m:n,(0,u.arrToBufArr)(i).equals(h.KECCAK256_NULL)?m:i]},e.accountBodyToRLP=function(t,e=!0){const r=e?p(t):t;return(0,u.arrToBufArr)(i.RLP.encode(r))}},49409:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Address=void 0;const i=r(52769),o=r(29267);class s{constructor(t){if(20!==t.length)throw new Error(\"Invalid address length\");this.buf=t}static zero(){return new s((0,o.zeros)(20))}static fromString(t){if(!(0,i.isValidAddress)(t))throw new Error(\"Invalid address\");return new s((0,o.toBuffer)(t))}static fromPublicKey(t){if(!n.isBuffer(t))throw new Error(\"Public key should be Buffer\");const e=(0,i.pubToAddress)(t);return new s(e)}static fromPrivateKey(t){if(!n.isBuffer(t))throw new Error(\"Private key should be Buffer\");const e=(0,i.privateToAddress)(t);return new s(e)}static generate(t,e){if(\"bigint\"!=typeof e)throw new Error(\"Expected nonce to be a bigint\");return new s((0,i.generateAddress)(t.buf,(0,o.bigIntToBuffer)(e)))}static generate2(t,e,r){if(!n.isBuffer(e))throw new Error(\"Expected salt to be a Buffer\");if(!n.isBuffer(r))throw new Error(\"Expected initCode to be a Buffer\");return new s((0,i.generateAddress2)(t.buf,e,r))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const t=(0,o.bufferToBigInt)(this.buf),e=BigInt(0),r=BigInt(\"0xffff\");return t>=e&&t<=r}toString(){return\"0x\"+this.buf.toString(\"hex\")}toBuffer(){return n.from(this.buf)}}e.Address=s},45209:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.AsyncEventEmitter=void 0;const n=r(22699);class i extends n.EventEmitter{emit(t,...e){let[r,n]=e;const i=this;let o=i._events[t]??[];return void 0===n&&\"function\"==typeof r&&(n=r,r=void 0),\"newListener\"!==t&&\"removeListener\"!==t||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(t,e,r){let n;for await(const i of e)try{i.length<2?i.call(t,r):await new Promise(((e,n)=>{i.call(t,r,(t=>{t?n(t):e()}))}))}catch(t){n=t}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(t)>0}once(t,e){const r=this;let n;if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return n=e.length>=2?function(i,o){r.removeListener(t,n),e(i,o)}:function(i){r.removeListener(t,n),e(i,n)},r.on(t,n),r}first(t,e){let r=this._events[t]??[];if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return Array.isArray(r)||(this._events[t]=r=[r]),r.unshift(e),this}before(t,e,r){return this.beforeOrAfter(t,e,r)}after(t,e,r){return this.beforeOrAfter(t,e,r,\"after\")}beforeOrAfter(t,e,r,n){let i,o,s=this._events[t]??[];const a=\"after\"===n?1:0;if(\"function\"!=typeof r)throw new TypeError(\"listener must be a function\");if(\"function\"!=typeof e)throw new TypeError(\"target must be a function\");for(Array.isArray(s)||(this._events[t]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===e){o=i+a;break}return s.splice(o,0,r),this}on(t,e){return super.on(t,e)}addListener(t,e){return super.addListener(t,e)}prependListener(t,e){return super.prependListener(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,e){return super.removeListener(t,e)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}e.AsyncEventEmitter=i},29267:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const i=r(81958),o=r(11976);e.intToHex=function(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return n.from((0,o.padToEven)(r.slice(2)),\"hex\")};e.zeros=function(t){return n.allocUnsafe(t).fill(0)};const s=function(t,r,n){const i=(0,e.zeros)(r);return n?t.length<r?(t.copy(i),i):t.slice(0,r):t.length<r?(t.copy(i,r-t.length),i):t.slice(-r)};e.setLengthLeft=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!1)};e.setLengthRight=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!0)};const a=function(t){let e=t[0];for(;t.length>0&&\"0\"===e.toString();)e=(t=t.slice(1))[0];return t};e.unpadBuffer=function(t){return(0,i.assertIsBuffer)(t),a(t)};e.unpadArray=function(t){return(0,i.assertIsArray)(t),a(t)};e.unpadHexString=function(t){return(0,i.assertIsHexString)(t),t=(0,o.stripHexPrefix)(t),\"0x\"+a(t)};e.toBuffer=function(t){if(null==t)return n.allocUnsafe(0);if(n.isBuffer(t))return n.from(t);if(Array.isArray(t)||t instanceof Uint8Array)return n.from(t);if(\"string\"==typeof t){if(!(0,o.isHexString)(t))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(t)),\"hex\")}if(\"number\"==typeof t)return(0,e.intToBuffer)(t);if(\"bigint\"==typeof t){if(t<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${t}`);let e=t.toString(16);return e.length%2&&(e=\"0\"+e),n.from(e,\"hex\")}if(t.toArray)return n.from(t.toArray());if(t.toBuffer)return n.from(t.toBuffer());throw new Error(\"invalid type\")};function u(t){const r=(0,e.bufferToHex)(t);return\"0x\"===r?BigInt(0):BigInt(r)}function h(t){return(0,e.toBuffer)(\"0x\"+t.toString(16))}e.bufferToHex=function(t){return\"0x\"+(t=(0,e.toBuffer)(t)).toString(\"hex\")},e.bufferToBigInt=u,e.bigIntToBuffer=h;e.bufferToInt=function(t){const e=Number(u(t));if(!Number.isSafeInteger(e))throw new Error(\"Number exceeds 53 bits\");return e};e.fromSigned=function(t){return BigInt.asIntN(256,u(t))};e.toUnsigned=function(t){return h(BigInt.asUintN(256,t))};e.addHexPrefix=function(t){return\"string\"!=typeof t||(0,o.isHexPrefixed)(t)?t:\"0x\"+t},e.short=function(t,e=50){const r=n.isBuffer(t)?t.toString(\"hex\"):t;return r.length<=e?r:r.slice(0,e)+\"…\"};e.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error(\"Invalid non-even hex string input for toUtf8() provided\");return n.from(t.replace(/^(00)+|(00)+$/g,\"\"),\"hex\").toString(\"utf8\")};e.baToJSON=function(t){if(n.isBuffer(t))return`0x${t.toString(\"hex\")}`;if(t instanceof Array){const r=[];for(let n=0;n<t.length;n++)r.push((0,e.baToJSON)(t[n]));return r}};e.validateNoLeadingZeroes=function(t){for(const[e,r]of Object.entries(t))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${e} cannot have leading zeroes, received: ${r.toString(\"hex\")}`)},e.arrToBufArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):n.from(e)},e.bufArrToArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):Uint8Array.from(e??[])};e.bigIntToHex=t=>\"0x\"+t.toString(16),e.bigIntToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)(h(t))},e.intToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)((0,e.intToBuffer)(t))}},25576:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const n=r(48834),i=r(80101);e.MAX_UINT64=BigInt(\"0xffffffffffffffff\"),e.MAX_INTEGER=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),e.MAX_INTEGER_BIGINT=BigInt(\"115792089237316195423570985008687907853269984665640564039457584007913129639935\"),e.SECP256K1_ORDER=i.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt(\"0x10000000000000000000000000000000000000000000000000000000000000000\"),e.KECCAK256_NULL_S=\"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",e.KECCAK256_NULL=n.Buffer.from(e.KECCAK256_NULL_S,\"hex\"),e.KECCAK256_RLP_ARRAY_S=\"1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",e.KECCAK256_RLP_ARRAY=n.Buffer.from(e.KECCAK256_RLP_ARRAY_S,\"hex\"),e.KECCAK256_RLP_S=\"56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",e.KECCAK256_RLP=n.Buffer.from(e.KECCAK256_RLP_S,\"hex\"),e.RLP_EMPTY_STRING=n.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16},61151:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;e.hasTerminator=t=>t.length>0&&16===t[t.length-1];e.nibblesToBytes=(t,e)=>{for(let r=0,n=0;n<t.length;r+=1,n+=2)e[r]=t[n]<<4|t[n+1]};e.nibblesToCompactBytes=t=>{let r=0;(0,e.hasTerminator)(t)&&(r=1,t=t.subarray(0,t.length-1));const n=new Uint8Array(t.length/2+1);return n[0]=r<<5,1==(1&t.length)&&(n[0]|=16,n[0]|=t[0],t=t.subarray(1)),(0,e.nibblesToBytes)(t,n.subarray(1)),n};e.bytesToNibbles=t=>{const e=2*t.length+1,r=new Uint8Array(e);for(let e=0;e<t.length;e++){const n=t[e];r[2*e]=n/16,r[2*e+1]=n%16}return r[e-1]=16,r};e.compactBytesToNibbles=t=>{if(0===t.length)return t;let r=(0,e.bytesToNibbles)(t);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},81958:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertIsString=e.assertIsArray=e.assertIsBuffer=e.assertIsHexString=void 0;const i=r(11976);e.assertIsHexString=function(t){if(!(0,i.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};e.assertIsBuffer=function(t){if(!n.isBuffer(t)){throw new Error(`This method only supports Buffer but input was: ${t}`)}};e.assertIsArray=function(t){if(!Array.isArray(t)){throw new Error(`This method only supports number arrays but input was: ${t}`)}};e.assertIsString=function(t){if(\"string\"!=typeof t){throw new Error(`This method only supports strings but input was: ${t}`)}}},77913:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,i(r(25576),e),i(r(6288),e),i(r(52769),e),i(r(49409),e),i(r(93143),e),i(r(48493),e),i(r(29267),e),i(r(23041),e),i(r(61151),e),i(r(45209),e);var o=r(11976);Object.defineProperty(e,\"arrayContainsArray\",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,\"fromAscii\",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,\"fromUtf8\",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,\"getBinarySize\",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,\"getKeys\",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,\"isHexPrefixed\",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,\"isHexString\",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,\"padToEven\",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,\"stripHexPrefix\",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,\"toAscii\",{enumerable:!0,get:function(){return o.toAscii}}),i(r(22684),e),i(r(76531),e)},11976:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;function i(t){if(\"string\"!=typeof t)throw new Error(\"[isHexPrefixed] input must be type 'string', received type \"+typeof t);return\"0\"===t[0]&&\"x\"===t[1]}Object.defineProperty(e,\"__esModule\",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,e.isHexPrefixed=i;function o(t){let e=t;if(\"string\"!=typeof e)throw new Error(\"[padToEven] value must be type 'string', received \"+typeof e);return e.length%2&&(e=`0${e}`),e}e.stripHexPrefix=t=>{if(\"string\"!=typeof t)throw new Error(\"[stripHexPrefix] input must be type 'string', received \"+typeof t);return i(t)?t.slice(2):t},e.padToEven=o,e.getBinarySize=function(t){if(\"string\"!=typeof t)throw new Error(\"[getBinarySize] method requires input type 'string', received \"+typeof t);return n.byteLength(t,\"utf8\")},e.arrayContainsArray=function(t,e,r){if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`);if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof e}'`);return e[!0===r?\"some\":\"every\"]((e=>t.indexOf(e)>=0))},e.toAscii=function(t){let e=\"\",r=0;const n=t.length;for(\"0x\"===t.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(t.substr(r,2),16);e+=String.fromCharCode(n)}return e},e.fromUtf8=function(t){return`0x${o(n.from(t,\"utf8\").toString(\"hex\")).replace(/^0+|0+$/g,\"\")}`},e.fromAscii=function(t){let e=\"\";for(let r=0;r<t.length;r++){const n=t.charCodeAt(r).toString(16);e+=n.length<2?`0${n}`:n}return`0x${e}`},e.getKeys=function(t,e,r){if(!Array.isArray(t))throw new Error(\"[getKeys] method expects input 'params' to be an array, got \"+typeof t);if(\"string\"!=typeof e)throw new Error(\"[getKeys] method expects input 'key' to be type 'string', got \"+typeof t);const n=[];for(let i=0;i<t.length;i++){let o=t[i][e];if(!0!==r||o){if(\"string\"!=typeof o)throw new Error(\"invalid abi - expected type 'string', received \"+typeof o)}else o=\"\";n.push(o)}return n},e.isHexString=function(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==e&&e>0&&t.length!==2+2*e)}},22684:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Lock=void 0;e.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((t=>this.promiseResolverQueue.push(t)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn(\"Lock.permits should never be > 0 when there is someone waiting.\");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}},76531:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getProvider=e.fetchFromProvider=void 0;const n=r(42973);e.fetchFromProvider=async(t,e)=>(await(0,n.default)(t,{headers:{\"content-type\":\"application/json\"},type:\"json\",data:{method:e.method,params:e.params,jsonrpc:\"2.0\",id:1}})).result;e.getProvider=t=>{if(\"string\"==typeof t)return t;if(void 0!==t?.connection?.url)return t.connection.url;throw new Error(\"Must provide valid provider URL or Web3Provider\")}},48493:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;const i=r(1115),o=r(80101),s=r(29267),a=r(25576),u=r(81958);function h(t,e){return t===BigInt(0)||t===BigInt(1)?t:void 0===e?t-BigInt(27):t-(e*BigInt(2)+BigInt(35))}function c(t){return t===BigInt(0)||t===BigInt(1)}e.ecsign=function(t,e,r){const i=o.secp256k1.sign(t,e),s=i.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}};e.ecrecover=function(t,e,r,i,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(i,32)],64),f=h(e,a);if(!c(f))throw new Error(\"Invalid signature v value\");const l=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(t);return n.from(l.toRawBytes(!1).slice(1))};e.toRpcSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(t)]))};e.toCompactSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");let o=r;return(t>BigInt(28)&&t%BigInt(2)===BigInt(1)||t===BigInt(1)||t===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(o,32)]))};e.fromRpcSig=function(t){const e=(0,s.toBuffer)(t);let r,n,i;if(e.length>=65)r=e.slice(0,32),n=e.slice(32,64),i=(0,s.bufferToBigInt)(e.slice(64));else{if(64!==e.length)throw new Error(\"Invalid signature length\");r=e.slice(0,32),n=e.slice(32,64),i=BigInt((0,s.bufferToInt)(e.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r,s:n}};e.isValidSignature=function(t,e,r,n=!0,i){if(32!==e.length||32!==r.length)return!1;if(!c(h(t,i)))return!1;const o=(0,s.bufferToBigInt)(e),u=(0,s.bufferToBigInt)(r);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER)&&!(n&&u>=a.SECP256K1_ORDER_DIV_2)};e.hashPersonalMessage=function(t){(0,u.assertIsBuffer)(t);const e=n.from(`\u0019Ethereum Signed Message:\\n${t.length}`,\"utf-8\");return n.from((0,i.keccak256)(n.concat([e,t])))}},23041:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toType=e.TypeOutput=void 0;const n=r(29267),i=r(11976);var o;!function(t){t[t.Number=0]=\"Number\",t[t.BigInt=1]=\"BigInt\",t[t.Buffer=2]=\"Buffer\",t[t.PrefixedHexString=3]=\"PrefixedHexString\"}(o=e.TypeOutput||(e.TypeOutput={})),e.toType=function(t,e){if(null===t)return null;if(void 0===t)return;if(\"string\"==typeof t&&!(0,i.isHexString)(t))throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`);if(\"number\"==typeof t&&!Number.isSafeInteger(t))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)\");const r=(0,n.toBuffer)(t);switch(e){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const t=(0,n.bufferToBigInt)(r);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)\");return Number(t)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error(\"unknown outputType\")}}},6288:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.GWEI_TO_WEI=void 0,e.GWEI_TO_WEI=BigInt(1e9)},93143:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Withdrawal=void 0;const i=r(49409),o=r(29267),s=r(23041);class a{constructor(t,e,r,n){this.index=t,this.validatorIndex=e,this.address=r,this.amount=n}static fromWithdrawalData(t){const{index:e,validatorIndex:r,address:n,amount:o}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt),h=(0,s.toType)(r,s.TypeOutput.BigInt),c=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,h,c,f)}static fromValuesArray(t){if(4!==t.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[e,r,n,i]=t;return a.fromWithdrawalData({index:e,validatorIndex:r,address:n,amount:i})}static toBufferArray(t){const{index:e,validatorIndex:r,address:o,amount:a}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(e,s.TypeOutput.Buffer),h=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let c;c=o instanceof i.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer);return[u,h,c,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:\"0x\"+this.address.buf.toString(\"hex\"),amount:(0,o.bigIntToHex)(this.amount)}}}e.Withdrawal=a},83397:()=>{},33196:()=>{},38087:()=>{},88351:()=>{},20395:()=>{},30488:()=>{},732:()=>{},99640:()=>{},94087:()=>{},6024:()=>{},53260:()=>{},15862:()=>{},74854:()=>{},66602:()=>{},66396:()=>{},85338:()=>{},2404:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertExhaustive=e.assertStruct=e.assert=e.AssertionError=void 0;const n=r(57169),i=r(93862);function o(t,e){return r=t,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}class s extends Error{constructor(t){super(t.message),this.code=\"ERR_ASSERTION\"}}e.AssertionError=s,e.assert=function(t,e=\"Assertion failed.\",r=s){if(!t){if(e instanceof Error)throw e;throw o(r,e)}},e.assertStruct=function(t,e,r=\"Assertion failed\",a=s){try{(0,n.assert)(t,e)}catch(t){throw o(a,`${r}: ${function(t){return(0,i.getErrorMessage)(t).replace(/\\.$/u,\"\")}(t)}.`)}},e.assertExhaustive=function(t){throw new Error(\"Invalid branch reached. Should be detected during compilation.\")}},38434:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.base64=void 0;const n=r(57169),i=r(2404);e.base64=(t,e={})=>{const r=e.paddingRequired??!1,o=e.characterSet??\"base64\";let s,a;return\"base64\"===o?s=String.raw`[A-Za-z0-9+\\/]`:((0,i.assert)(\"base64url\"===o),s=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${s}{4})*(?:${s}{3}=|${s}{2}==)?$`,\"u\"):new RegExp(`^(?:${s}{4})*(?:${s}{2,3}|${s}{3}=|${s}{2}==)?$`,\"u\"),(0,n.pattern)(t,a)}},95723:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.createDataView=e.concatBytes=e.valueToBytes=e.base64ToBytes=e.stringToBytes=e.numberToBytes=e.signedBigIntToBytes=e.bigIntToBytes=e.hexToBytes=e.bytesToBase64=e.bytesToString=e.bytesToNumber=e.bytesToSignedBigInt=e.bytesToBigInt=e.bytesToHex=e.assertIsBytes=e.isBytes=void 0;const i=r(36237),o=r(2404),s=r(95477),a=48,u=58,h=87;const c=function(){const t=[];return()=>{if(0===t.length)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,\"0\"));return t}}();function f(t){return t instanceof Uint8Array}function l(t){(0,o.assert)(f(t),\"Value must be a Uint8Array.\")}function d(t){if(l(t),0===t.length)return\"0x\";const e=c(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,s.add0x)(r.join(\"\"))}function p(t){l(t);const e=d(t);return BigInt(e)}function m(t){if(\"0x\"===t?.toLowerCase?.())return new Uint8Array;(0,s.assertIsHexString)(t);const e=(0,s.remove0x)(t).toLowerCase(),r=e.length%2==0?e:`0${e}`,n=new Uint8Array(r.length/2);for(let t=0;t<n.length;t++){const e=r.charCodeAt(2*t),i=r.charCodeAt(2*t+1),o=e-(e<u?a:h),s=i-(i<u?a:h);n[t]=16*o+s}return n}function g(t){(0,o.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,o.assert)(t>=BigInt(0),\"Value must be a non-negative bigint.\");return m(t.toString(16))}function y(t){(0,o.assert)(\"number\"==typeof t,\"Value must be a number.\"),(0,o.assert)(t>=0,\"Value must be a non-negative number.\"),(0,o.assert)(Number.isSafeInteger(t),\"Value is not a safe integer. Use `bigIntToBytes` instead.\");return m(t.toString(16))}function b(t){return(0,o.assert)(\"string\"==typeof t,\"Value must be a string.\"),(new TextEncoder).encode(t)}function v(t){if(\"bigint\"==typeof t)return g(t);if(\"number\"==typeof t)return y(t);if(\"string\"==typeof t)return t.startsWith(\"0x\")?m(t):b(t);if(f(t))return t;throw new TypeError(`Unsupported value type: \"${typeof t}\".`)}e.isBytes=f,e.assertIsBytes=l,e.bytesToHex=d,e.bytesToBigInt=p,e.bytesToSignedBigInt=function(t){l(t);let e=BigInt(0);for(const r of t)e=(e<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*t.length,e)},e.bytesToNumber=function(t){l(t);const e=p(t);return(0,o.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),\"Number is not a safe integer. Use `bytesToBigInt` instead.\"),Number(e)},e.bytesToString=function(t){return l(t),(new TextDecoder).decode(t)},e.bytesToBase64=function(t){return l(t),i.base64.encode(t)},e.hexToBytes=m,e.bigIntToBytes=g,e.signedBigIntToBytes=function(t,e){(0,o.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,o.assert)(\"number\"==typeof e,\"Byte length must be a number.\"),(0,o.assert)(e>0,\"Byte length must be greater than 0.\"),(0,o.assert)(function(t,e){(0,o.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(8*e-1))}(t,e),\"Byte length is too small to represent the given value.\");let r=t;const n=new Uint8Array(e);for(let t=0;t<n.length;t++)n[t]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},e.numberToBytes=y,e.stringToBytes=b,e.base64ToBytes=function(t){return(0,o.assert)(\"string\"==typeof t,\"Value must be a string.\"),i.base64.decode(t)},e.valueToBytes=v,e.concatBytes=function(t){const e=new Array(t.length);let r=0;for(let n=0;n<t.length;n++){const i=v(t[n]);e[n]=i,r+=i.length}const n=new Uint8Array(r);for(let t=0,r=0;t<e.length;t++)n.set(e[t],r),r+=e[t].length;return n},e.createDataView=function(t){if(void 0!==n&&t instanceof n){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}},98170:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toCaipChainId=e.parseCaipAccountId=e.parseCaipChainId=e.isCaipAccountAddress=e.isCaipAccountId=e.isCaipReference=e.isCaipNamespace=e.isCaipChainId=e.KnownCaipNamespace=e.CaipAccountAddressStruct=e.CaipAccountIdStruct=e.CaipReferenceStruct=e.CaipNamespaceStruct=e.CaipChainIdStruct=e.CAIP_ACCOUNT_ADDRESS_REGEX=e.CAIP_ACCOUNT_ID_REGEX=e.CAIP_REFERENCE_REGEX=e.CAIP_NAMESPACE_REGEX=e.CAIP_CHAIN_ID_REGEX=void 0;const n=r(57169);function i(t){return(0,n.is)(t,e.CaipNamespaceStruct)}function o(t){return(0,n.is)(t,e.CaipReferenceStruct)}e.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,e.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,e.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,e.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,e.CaipChainIdStruct=(0,n.pattern)((0,n.string)(),e.CAIP_CHAIN_ID_REGEX),e.CaipNamespaceStruct=(0,n.pattern)((0,n.string)(),e.CAIP_NAMESPACE_REGEX),e.CaipReferenceStruct=(0,n.pattern)((0,n.string)(),e.CAIP_REFERENCE_REGEX),e.CaipAccountIdStruct=(0,n.pattern)((0,n.string)(),e.CAIP_ACCOUNT_ID_REGEX),e.CaipAccountAddressStruct=(0,n.pattern)((0,n.string)(),e.CAIP_ACCOUNT_ADDRESS_REGEX),function(t){t.Eip155=\"eip155\",t.Wallet=\"wallet\"}(e.KnownCaipNamespace||(e.KnownCaipNamespace={})),e.isCaipChainId=function(t){return(0,n.is)(t,e.CaipChainIdStruct)},e.isCaipNamespace=i,e.isCaipReference=o,e.isCaipAccountId=function(t){return(0,n.is)(t,e.CaipAccountIdStruct)},e.isCaipAccountAddress=function(t){return(0,n.is)(t,e.CaipAccountAddressStruct)},e.parseCaipChainId=function(t){const r=e.CAIP_CHAIN_ID_REGEX.exec(t);if(!r?.groups)throw new Error(\"Invalid CAIP chain ID.\");return{namespace:r.groups.namespace,reference:r.groups.reference}},e.parseCaipAccountId=function(t){const r=e.CAIP_ACCOUNT_ID_REGEX.exec(t);if(!r?.groups)throw new Error(\"Invalid CAIP account ID.\");return{address:r.groups.accountAddress,chainId:r.groups.chainId,chain:{namespace:r.groups.namespace,reference:r.groups.reference}}},e.toCaipChainId=function(t,r){if(!i(t))throw new Error(`Invalid \"namespace\", must match: ${e.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(r))throw new Error(`Invalid \"reference\", must match: ${e.CAIP_REFERENCE_REGEX.toString()}`);return`${t}:${r}`}},39052:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ChecksumStruct=void 0;const n=r(57169),i=r(38434);e.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},4250:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createHex=e.createBytes=e.createBigInt=e.createNumber=void 0;const n=r(57169),i=r(2404),o=r(95723),s=r(95477),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),h=(0,n.coerce)((0,n.bigint)(),a,BigInt),c=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),f=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);e.createNumber=function(t){try{const e=(0,n.create)(t,u);return(0,i.assert)(Number.isFinite(e),`Expected a number-like value, got \"${t}\".`),e}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got \"${t}\".`);throw e}},e.createBigInt=function(t){try{return(0,n.create)(t,h)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got \"${String(t.value)}\".`);throw t}},e.createBytes=function(t){if(\"string\"==typeof t&&\"0x\"===t.toLowerCase())return new Uint8Array;try{return(0,n.create)(t,c)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a bytes-like value, got \"${String(t.value)}\".`);throw t}},e.createHex=function(t){if(t instanceof Uint8Array&&0===t.length||\"string\"==typeof t&&\"0x\"===t.toLowerCase())return\"0x\";try{return(0,n.create)(t,f)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a bytes-like value, got \"${String(t.value)}\".`);throw t}}},54489:function(t,e){\"use strict\";var r,n,i=this&&this.__classPrivateFieldGet||function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)},o=this&&this.__classPrivateFieldSet||function(t,e,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!i:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(t,r):i?i.value=r:e.set(t,r),r};Object.defineProperty(e,\"__esModule\",{value:!0}),e.FrozenSet=e.FrozenMap=void 0;class s{get size(){return i(this,r,\"f\").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,\"f\")[Symbol.iterator]()}constructor(t){r.set(this,void 0),o(this,r,new Map(t),\"f\"),Object.freeze(this)}entries(){return i(this,r,\"f\").entries()}forEach(t,e){return i(this,r,\"f\").forEach(((r,n,i)=>t.call(e,r,n,this)))}get(t){return i(this,r,\"f\").get(t)}has(t){return i(this,r,\"f\").has(t)}keys(){return i(this,r,\"f\").keys()}values(){return i(this,r,\"f\").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([t,e])=>`${String(t)} => ${String(e)}`)).join(\", \")} `:\"\"}}`}}e.FrozenMap=s;class a{get size(){return i(this,n,\"f\").size}[(n=new WeakMap,Symbol.iterator)](){return i(this,n,\"f\")[Symbol.iterator]()}constructor(t){n.set(this,void 0),o(this,n,new Set(t),\"f\"),Object.freeze(this)}entries(){return i(this,n,\"f\").entries()}forEach(t,e){return i(this,n,\"f\").forEach(((r,n,i)=>t.call(e,r,n,this)))}has(t){return i(this,n,\"f\").has(t)}keys(){return i(this,n,\"f\").keys()}values(){return i(this,n,\"f\").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((t=>String(t))).join(\", \")} `:\"\"}}`}}e.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},13790:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},93862:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapError=e.getErrorMessage=e.isErrorWithStack=e.isErrorWithMessage=e.isErrorWithCode=void 0;const n=r(89498),i=r(823);function o(t){return\"object\"==typeof t&&null!==t&&\"code\"in t}function s(t){return\"object\"==typeof t&&null!==t&&\"message\"in t}e.isErrorWithCode=o,e.isErrorWithMessage=s,e.isErrorWithStack=function(t){return\"object\"==typeof t&&null!==t&&\"stack\"in t},e.getErrorMessage=function(t){return s(t)&&\"string\"==typeof t.message?t.message:(0,i.isNullOrUndefined)(t)?\"\":String(t)},e.wrapError=function(t,e){if((r=t)instanceof Error||(0,i.isObject)(r)&&\"Error\"===r.constructor.name){let r;return r=2===Error.length?new Error(e,{cause:t}):new n.ErrorWithCause(e,{cause:t}),o(t)&&(r.code=t.code),r}var r;return e.length>0?new Error(`${String(t)}: ${e}`):new Error(String(t))}},95477:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.remove0x=e.add0x=e.isValidChecksumAddress=e.getChecksumAddress=e.isValidHexAddress=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.HexChecksumAddressStruct=e.HexAddressStruct=e.StrictHexStruct=e.HexStruct=void 0;const n=r(57169),i=r(80125),o=r(2404),s=r(95723);function a(t){return(0,n.is)(t,e.HexStruct)}function u(t){return(0,n.is)(t,e.StrictHexStruct)}function h(t){(0,o.assert)((0,n.is)(t,e.HexChecksumAddressStruct),\"Invalid hex address.\");const r=f(t.toLowerCase()),a=f((0,s.bytesToHex)((0,i.keccak_256)(r)));return`0x${r.split(\"\").map(((t,e)=>{const r=a[e];return(0,o.assert)((0,n.is)(r,(0,n.string)()),\"Hash shorter than address.\"),parseInt(r,16)>7?t.toUpperCase():t})).join(\"\")}`}function c(t){return!!(0,n.is)(t,e.HexChecksumAddressStruct)&&h(t)===t}function f(t){return t.startsWith(\"0x\")||t.startsWith(\"0X\")?t.substring(2):t}e.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),e.HexAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]{40}$/u),e.HexChecksumAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-fA-F]{40}$/u),e.isHexString=a,e.isStrictHexString=u,e.assertIsHexString=function(t){(0,o.assert)(a(t),\"Value must be a hexadecimal string.\")},e.assertIsStrictHexString=function(t){(0,o.assert)(u(t),'Value must be a hexadecimal string, starting with \"0x\".')},e.isValidHexAddress=function(t){return(0,n.is)(t,e.HexAddressStruct)||c(t)},e.getChecksumAddress=h,e.isValidChecksumAddress=c,e.add0x=function(t){return t.startsWith(\"0x\")?t:t.startsWith(\"0X\")?`0x${t.substring(2)}`:`0x${t}`},e.remove0x=f},67827:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(2404),e),i(r(38434),e),i(r(95723),e),i(r(98170),e),i(r(39052),e),i(r(4250),e),i(r(54489),e),i(r(13790),e),i(r(93862),e),i(r(95477),e),i(r(85876),e),i(r(46916),e),i(r(54716),e),i(r(823),e),i(r(94608),e),i(r(18189),e),i(r(86792),e),i(r(45688),e),i(r(25549),e),i(r(48610),e)},85876:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.getSafeJson=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=e.exactOptional=e.object=void 0;const n=r(57169),i=r(2404),o=r(823);function s({path:t,branch:e}){const r=t[t.length-1];return(0,o.hasProperty)(e[e.length-2],r)}function a(t){return new n.Struct({...t,type:`optional ${t.type}`,validator:(e,r)=>!s(r)||t.validator(e,r),refiner:(e,r)=>!s(r)||t.refiner(e,r)})}e.object=t=>(0,n.object)(t),e.exactOptional=a;function u(t){return(0,n.create)(t,e.JsonStruct)}e.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)(\"finite number\",(t=>(0,n.is)(t,(0,n.number)())&&Number.isFinite(t))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>e.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>e.UnsafeJsonStruct)))]),e.JsonStruct=(0,n.coerce)(e.UnsafeJsonStruct,(0,n.any)(),(t=>((0,i.assertStruct)(t,e.UnsafeJsonStruct),JSON.parse(JSON.stringify(t,((t,e)=>{if(\"__proto__\"!==t&&\"constructor\"!==t)return e})))))),e.isValidJson=function(t){try{return u(t),!0}catch{return!1}},e.getSafeJson=u,e.getJsonSize=function(t){(0,i.assertStruct)(t,e.JsonStruct,\"Invalid JSON value\");const r=JSON.stringify(t);return(new TextEncoder).encode(r).byteLength},e.jsonrpc2=\"2.0\",e.JsonRpcVersionStruct=(0,n.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),e.JsonRpcErrorStruct=(0,e.object)({code:(0,n.integer)(),message:(0,n.string)(),data:a(e.JsonStruct),stack:a((0,n.string)())}),e.JsonRpcParamsStruct=(0,n.union)([(0,n.record)((0,n.string)(),e.JsonStruct),(0,n.array)(e.JsonStruct)]),e.JsonRpcRequestStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:a(e.JsonRpcParamsStruct)}),e.JsonRpcNotificationStruct=(0,e.object)({jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:a(e.JsonRpcParamsStruct)}),e.isJsonRpcNotification=function(t){return(0,n.is)(t,e.JsonRpcNotificationStruct)},e.assertIsJsonRpcNotification=function(t,r){(0,i.assertStruct)(t,e.JsonRpcNotificationStruct,\"Invalid JSON-RPC notification\",r)},e.isJsonRpcRequest=function(t){return(0,n.is)(t,e.JsonRpcRequestStruct)},e.assertIsJsonRpcRequest=function(t,r){(0,i.assertStruct)(t,e.JsonRpcRequestStruct,\"Invalid JSON-RPC request\",r)},e.PendingJsonRpcResponseStruct=(0,n.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,n.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]),e.isPendingJsonRpcResponse=function(t){return(0,n.is)(t,e.PendingJsonRpcResponseStruct)},e.assertIsPendingJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.PendingJsonRpcResponseStruct,\"Invalid pending JSON-RPC response\",r)},e.isJsonRpcResponse=function(t){return(0,n.is)(t,e.JsonRpcResponseStruct)},e.assertIsJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.JsonRpcResponseStruct,\"Invalid JSON-RPC response\",r)},e.isJsonRpcSuccess=function(t){return(0,n.is)(t,e.JsonRpcSuccessStruct)},e.assertIsJsonRpcSuccess=function(t,r){(0,i.assertStruct)(t,e.JsonRpcSuccessStruct,\"Invalid JSON-RPC success response\",r)},e.isJsonRpcFailure=function(t){return(0,n.is)(t,e.JsonRpcFailureStruct)},e.assertIsJsonRpcFailure=function(t,r){(0,i.assertStruct)(t,e.JsonRpcFailureStruct,\"Invalid JSON-RPC failure response\",r)},e.isJsonRpcError=function(t){return(0,n.is)(t,e.JsonRpcErrorStruct)},e.assertIsJsonRpcError=function(t,r){(0,i.assertStruct)(t,e.JsonRpcErrorStruct,\"Invalid JSON-RPC error\",r)},e.getJsonRpcIdValidator=function(t){const{permitEmptyString:e,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...t};return t=>Boolean(\"number\"==typeof t&&(r||Number.isInteger(t))||\"string\"==typeof t&&(e||t.length>0)||n&&null===t)}},46916:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},54716:function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.createModuleLogger=e.createProjectLogger=void 0;const i=(0,n(r(25130)).default)(\"metamask\");e.createProjectLogger=function(t){return i.extend(t)},e.createModuleLogger=function(t,e){return t.extend(e)}},823:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.getKnownPropertyNames=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0,e.isNonEmptyArray=function(t){return Array.isArray(t)&&t.length>0},e.isNullOrUndefined=function(t){return null==t},e.isObject=function(t){return Boolean(t)&&\"object\"==typeof t&&!Array.isArray(t)};function r(t){return t.charCodeAt(0)<=127}e.hasProperty=(t,e)=>Object.hasOwnProperty.call(t,e),e.getKnownPropertyNames=function(t){return Object.getOwnPropertyNames(t)},function(t){t[t.Null=4]=\"Null\",t[t.Comma=1]=\"Comma\",t[t.Wrapper=1]=\"Wrapper\",t[t.True=4]=\"True\",t[t.False=5]=\"False\",t[t.Quote=1]=\"Quote\",t[t.Colon=1]=\"Colon\",t[t.Date=24]=\"Date\"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/\"|\\\\|\\n|\\r|\\t/gu,e.isPlainObject=function(t){if(\"object\"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}},e.isASCII=r,e.calculateStringSize=function(t){return t.split(\"\").reduce(((t,e)=>r(e)?t+1:t+2),0)+(t.match(e.ESCAPE_CHARACTERS_REGEXP)??[]).length},e.calculateNumberSize=function(t){return t.toString().length}},94608:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hexToBigInt=e.hexToNumber=e.bigIntToHex=e.numberToHex=void 0;const n=r(2404),i=r(95477);e.numberToHex=t=>((0,n.assert)(\"number\"==typeof t,\"Value must be a number.\"),(0,n.assert)(t>=0,\"Value must be a non-negative number.\"),(0,n.assert)(Number.isSafeInteger(t),\"Value is not a safe integer. Use `bigIntToHex` instead.\"),(0,i.add0x)(t.toString(16)));e.bigIntToHex=t=>((0,n.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,n.assert)(t>=0,\"Value must be a non-negative bigint.\"),(0,i.add0x)(t.toString(16)));e.hexToNumber=t=>{(0,i.assertIsHexString)(t);const e=parseInt(t,16);return(0,n.assert)(Number.isSafeInteger(e),\"Value is not a safe integer. Use `hexToBigInt` instead.\"),e};e.hexToBigInt=t=>((0,i.assertIsHexString)(t),BigInt((0,i.add0x)(t)))},18189:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},86792:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createDeferredPromise=void 0,e.createDeferredPromise=function({suppressUnhandledRejection:t=!1}={}){let e,r;const n=new Promise(((t,n)=>{e=t,r=n}));return t&&n.catch((t=>{})),{promise:n,resolve:e,reject:r}}},45688:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(t){t[t.Millisecond=1]=\"Millisecond\",t[t.Second=1e3]=\"Second\",t[t.Minute=6e4]=\"Minute\",t[t.Hour=36e5]=\"Hour\",t[t.Day=864e5]=\"Day\",t[t.Week=6048e5]=\"Week\",t[t.Year=31536e6]=\"Year\"}(e.Duration||(e.Duration={}));const r=(t,e)=>{if(!(t=>Number.isInteger(t)&&t>=0)(t))throw new Error(`\"${e}\" must be a non-negative integer. Received: \"${t}\".`)};e.inMilliseconds=function(t,e){return r(t,\"count\"),t*e},e.timeSince=function(t){return r(t,\"timestamp\"),Date.now()-t}},25549:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},48610:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const n=r(57169),i=r(97699),o=r(2404);e.VersionStruct=(0,n.refine)((0,n.string)(),\"Version\",(t=>null!==(0,i.valid)(t)||`Expected SemVer version, got \"${t}\"`)),e.VersionRangeStruct=(0,n.refine)((0,n.string)(),\"Version range\",(t=>null!==(0,i.validRange)(t)||`Expected SemVer range, got \"${t}\"`)),e.isValidSemVerVersion=function(t){return(0,n.is)(t,e.VersionStruct)},e.isValidSemVerRange=function(t){return(0,n.is)(t,e.VersionRangeStruct)},e.assertIsSemVerVersion=function(t){(0,o.assertStruct)(t,e.VersionStruct)},e.assertIsSemVerRange=function(t){(0,o.assertStruct)(t,e.VersionRangeStruct)},e.gtVersion=function(t,e){return(0,i.gt)(t,e)},e.gtRange=function(t,e){return(0,i.gtr)(t,e)},e.satisfiesVersionRange=function(t,e){return(0,i.satisfies)(t,e,{includePrerelease:!0})}},257:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertExhaustive=e.assertStruct=e.assert=e.AssertionError=void 0;const n=r(57169),i=r(10107);function o(t,e){return r=t,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}class s extends Error{constructor(t){super(t.message),this.code=\"ERR_ASSERTION\"}}e.AssertionError=s,e.assert=function(t,e=\"Assertion failed.\",r=s){if(!t){if(e instanceof Error)throw e;throw o(r,e)}},e.assertStruct=function(t,e,r=\"Assertion failed\",a=s){try{(0,n.assert)(t,e)}catch(t){throw o(a,`${r}: ${function(t){return(0,i.getErrorMessage)(t).replace(/\\.$/u,\"\")}(t)}.`)}},e.assertExhaustive=function(t){throw new Error(\"Invalid branch reached. Should be detected during compilation.\")}},98732:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.base64=void 0;const n=r(57169),i=r(257);e.base64=(t,e={})=>{const r=e.paddingRequired??!1,o=e.characterSet??\"base64\";let s,a;return\"base64\"===o?s=String.raw`[A-Za-z0-9+\\/]`:((0,i.assert)(\"base64url\"===o),s=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${s}{4})*(?:${s}{3}=|${s}{2}==)?$`,\"u\"):new RegExp(`^(?:${s}{4})*(?:${s}{2,3}|${s}{3}=|${s}{2}==)?$`,\"u\"),(0,n.pattern)(t,a)}},24585:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.createDataView=e.concatBytes=e.valueToBytes=e.base64ToBytes=e.stringToBytes=e.numberToBytes=e.signedBigIntToBytes=e.bigIntToBytes=e.hexToBytes=e.bytesToBase64=e.bytesToString=e.bytesToNumber=e.bytesToSignedBigInt=e.bytesToBigInt=e.bytesToHex=e.assertIsBytes=e.isBytes=void 0;const i=r(36237),o=r(257),s=r(54126),a=48,u=58,h=87;const c=function(){const t=[];return()=>{if(0===t.length)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,\"0\"));return t}}();function f(t){return t instanceof Uint8Array}function l(t){(0,o.assert)(f(t),\"Value must be a Uint8Array.\")}function d(t){if(l(t),0===t.length)return\"0x\";const e=c(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,s.add0x)(r.join(\"\"))}function p(t){l(t);const e=d(t);return BigInt(e)}function m(t){if(\"0x\"===t?.toLowerCase?.())return new Uint8Array;(0,s.assertIsHexString)(t);const e=(0,s.remove0x)(t).toLowerCase(),r=e.length%2==0?e:`0${e}`,n=new Uint8Array(r.length/2);for(let t=0;t<n.length;t++){const e=r.charCodeAt(2*t),i=r.charCodeAt(2*t+1),o=e-(e<u?a:h),s=i-(i<u?a:h);n[t]=16*o+s}return n}function g(t){(0,o.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,o.assert)(t>=BigInt(0),\"Value must be a non-negative bigint.\");return m(t.toString(16))}function y(t){(0,o.assert)(\"number\"==typeof t,\"Value must be a number.\"),(0,o.assert)(t>=0,\"Value must be a non-negative number.\"),(0,o.assert)(Number.isSafeInteger(t),\"Value is not a safe integer. Use `bigIntToBytes` instead.\");return m(t.toString(16))}function b(t){return(0,o.assert)(\"string\"==typeof t,\"Value must be a string.\"),(new TextEncoder).encode(t)}function v(t){if(\"bigint\"==typeof t)return g(t);if(\"number\"==typeof t)return y(t);if(\"string\"==typeof t)return t.startsWith(\"0x\")?m(t):b(t);if(f(t))return t;throw new TypeError(`Unsupported value type: \"${typeof t}\".`)}e.isBytes=f,e.assertIsBytes=l,e.bytesToHex=d,e.bytesToBigInt=p,e.bytesToSignedBigInt=function(t){l(t);let e=BigInt(0);for(const r of t)e=(e<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*t.length,e)},e.bytesToNumber=function(t){l(t);const e=p(t);return(0,o.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),\"Number is not a safe integer. Use `bytesToBigInt` instead.\"),Number(e)},e.bytesToString=function(t){return l(t),(new TextDecoder).decode(t)},e.bytesToBase64=function(t){return l(t),i.base64.encode(t)},e.hexToBytes=m,e.bigIntToBytes=g,e.signedBigIntToBytes=function(t,e){(0,o.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,o.assert)(\"number\"==typeof e,\"Byte length must be a number.\"),(0,o.assert)(e>0,\"Byte length must be greater than 0.\"),(0,o.assert)(function(t,e){(0,o.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(8*e-1))}(t,e),\"Byte length is too small to represent the given value.\");let r=t;const n=new Uint8Array(e);for(let t=0;t<n.length;t++)n[t]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},e.numberToBytes=y,e.stringToBytes=b,e.base64ToBytes=function(t){return(0,o.assert)(\"string\"==typeof t,\"Value must be a string.\"),i.base64.decode(t)},e.valueToBytes=v,e.concatBytes=function(t){const e=new Array(t.length);let r=0;for(let n=0;n<t.length;n++){const i=v(t[n]);e[n]=i,r+=i.length}const n=new Uint8Array(r);for(let t=0,r=0;t<e.length;t++)n.set(e[t],r),r+=e[t].length;return n},e.createDataView=function(t){if(void 0!==n&&t instanceof n){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}},3470:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toCaipChainId=e.parseCaipAccountId=e.parseCaipChainId=e.isCaipAccountAddress=e.isCaipAccountId=e.isCaipReference=e.isCaipNamespace=e.isCaipChainId=e.KnownCaipNamespace=e.CaipAccountAddressStruct=e.CaipAccountIdStruct=e.CaipReferenceStruct=e.CaipNamespaceStruct=e.CaipChainIdStruct=e.CAIP_ACCOUNT_ADDRESS_REGEX=e.CAIP_ACCOUNT_ID_REGEX=e.CAIP_REFERENCE_REGEX=e.CAIP_NAMESPACE_REGEX=e.CAIP_CHAIN_ID_REGEX=void 0;const n=r(57169);function i(t){return(0,n.is)(t,e.CaipNamespaceStruct)}function o(t){return(0,n.is)(t,e.CaipReferenceStruct)}e.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,e.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,e.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,e.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,e.CaipChainIdStruct=(0,n.pattern)((0,n.string)(),e.CAIP_CHAIN_ID_REGEX),e.CaipNamespaceStruct=(0,n.pattern)((0,n.string)(),e.CAIP_NAMESPACE_REGEX),e.CaipReferenceStruct=(0,n.pattern)((0,n.string)(),e.CAIP_REFERENCE_REGEX),e.CaipAccountIdStruct=(0,n.pattern)((0,n.string)(),e.CAIP_ACCOUNT_ID_REGEX),e.CaipAccountAddressStruct=(0,n.pattern)((0,n.string)(),e.CAIP_ACCOUNT_ADDRESS_REGEX),function(t){t.Eip155=\"eip155\"}(e.KnownCaipNamespace||(e.KnownCaipNamespace={})),e.isCaipChainId=function(t){return(0,n.is)(t,e.CaipChainIdStruct)},e.isCaipNamespace=i,e.isCaipReference=o,e.isCaipAccountId=function(t){return(0,n.is)(t,e.CaipAccountIdStruct)},e.isCaipAccountAddress=function(t){return(0,n.is)(t,e.CaipAccountAddressStruct)},e.parseCaipChainId=function(t){const r=e.CAIP_CHAIN_ID_REGEX.exec(t);if(!r?.groups)throw new Error(\"Invalid CAIP chain ID.\");return{namespace:r.groups.namespace,reference:r.groups.reference}},e.parseCaipAccountId=function(t){const r=e.CAIP_ACCOUNT_ID_REGEX.exec(t);if(!r?.groups)throw new Error(\"Invalid CAIP account ID.\");return{address:r.groups.accountAddress,chainId:r.groups.chainId,chain:{namespace:r.groups.namespace,reference:r.groups.reference}}},e.toCaipChainId=function(t,r){if(!i(t))throw new Error(`Invalid \"namespace\", must match: ${e.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(r))throw new Error(`Invalid \"reference\", must match: ${e.CAIP_REFERENCE_REGEX.toString()}`);return`${t}:${r}`}},73497:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ChecksumStruct=void 0;const n=r(57169),i=r(98732);e.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},47425:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createHex=e.createBytes=e.createBigInt=e.createNumber=void 0;const n=r(57169),i=r(257),o=r(24585),s=r(54126),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),h=(0,n.coerce)((0,n.bigint)(),a,BigInt),c=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),f=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);e.createNumber=function(t){try{const e=(0,n.create)(t,u);return(0,i.assert)(Number.isFinite(e),`Expected a number-like value, got \"${t}\".`),e}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got \"${t}\".`);throw e}},e.createBigInt=function(t){try{return(0,n.create)(t,h)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got \"${String(t.value)}\".`);throw t}},e.createBytes=function(t){if(\"string\"==typeof t&&\"0x\"===t.toLowerCase())return new Uint8Array;try{return(0,n.create)(t,c)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a bytes-like value, got \"${String(t.value)}\".`);throw t}},e.createHex=function(t){if(t instanceof Uint8Array&&0===t.length||\"string\"==typeof t&&\"0x\"===t.toLowerCase())return\"0x\";try{return(0,n.create)(t,f)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a bytes-like value, got \"${String(t.value)}\".`);throw t}}},42107:function(t,e){\"use strict\";var r,n,i=this&&this.__classPrivateFieldGet||function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)},o=this&&this.__classPrivateFieldSet||function(t,e,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!i:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(t,r):i?i.value=r:e.set(t,r),r};Object.defineProperty(e,\"__esModule\",{value:!0}),e.FrozenSet=e.FrozenMap=void 0;class s{get size(){return i(this,r,\"f\").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,\"f\")[Symbol.iterator]()}constructor(t){r.set(this,void 0),o(this,r,new Map(t),\"f\"),Object.freeze(this)}entries(){return i(this,r,\"f\").entries()}forEach(t,e){return i(this,r,\"f\").forEach(((r,n,i)=>t.call(e,r,n,this)))}get(t){return i(this,r,\"f\").get(t)}has(t){return i(this,r,\"f\").has(t)}keys(){return i(this,r,\"f\").keys()}values(){return i(this,r,\"f\").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([t,e])=>`${String(t)} => ${String(e)}`)).join(\", \")} `:\"\"}}`}}e.FrozenMap=s;class a{get size(){return i(this,n,\"f\").size}[(n=new WeakMap,Symbol.iterator)](){return i(this,n,\"f\")[Symbol.iterator]()}constructor(t){n.set(this,void 0),o(this,n,new Set(t),\"f\"),Object.freeze(this)}entries(){return i(this,n,\"f\").entries()}forEach(t,e){return i(this,n,\"f\").forEach(((r,n,i)=>t.call(e,r,n,this)))}has(t){return i(this,n,\"f\").has(t)}keys(){return i(this,n,\"f\").keys()}values(){return i(this,n,\"f\").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((t=>String(t))).join(\", \")} `:\"\"}}`}}e.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},49624:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},10107:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapError=e.getErrorMessage=e.isErrorWithStack=e.isErrorWithMessage=e.isErrorWithCode=void 0;const n=r(89498),i=r(96774);function o(t){return\"object\"==typeof t&&null!==t&&\"code\"in t}function s(t){return\"object\"==typeof t&&null!==t&&\"message\"in t}e.isErrorWithCode=o,e.isErrorWithMessage=s,e.isErrorWithStack=function(t){return\"object\"==typeof t&&null!==t&&\"stack\"in t},e.getErrorMessage=function(t){return s(t)&&\"string\"==typeof t.message?t.message:(0,i.isNullOrUndefined)(t)?\"\":String(t)},e.wrapError=function(t,e){if((r=t)instanceof Error||(0,i.isObject)(r)&&\"Error\"===r.constructor.name){let r;return r=2===Error.length?new Error(e,{cause:t}):new n.ErrorWithCause(e,{cause:t}),o(t)&&(r.code=t.code),r}var r;return e.length>0?new Error(`${String(t)}: ${e}`):new Error(String(t))}},54126:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.remove0x=e.add0x=e.isValidChecksumAddress=e.getChecksumAddress=e.isValidHexAddress=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.HexChecksumAddressStruct=e.HexAddressStruct=e.StrictHexStruct=e.HexStruct=void 0;const n=r(57169),i=r(80125),o=r(257),s=r(24585);function a(t){return(0,n.is)(t,e.HexStruct)}function u(t){return(0,n.is)(t,e.StrictHexStruct)}function h(t){(0,o.assert)((0,n.is)(t,e.HexChecksumAddressStruct),\"Invalid hex address.\");const r=f(t.toLowerCase()),a=f((0,s.bytesToHex)((0,i.keccak_256)(r)));return`0x${r.split(\"\").map(((t,e)=>{const r=a[e];return(0,o.assert)((0,n.is)(r,(0,n.string)()),\"Hash shorter than address.\"),parseInt(r,16)>7?t.toUpperCase():t})).join(\"\")}`}function c(t){return!!(0,n.is)(t,e.HexChecksumAddressStruct)&&h(t)===t}function f(t){return t.startsWith(\"0x\")||t.startsWith(\"0X\")?t.substring(2):t}e.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),e.HexAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]{40}$/u),e.HexChecksumAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-fA-F]{40}$/u),e.isHexString=a,e.isStrictHexString=u,e.assertIsHexString=function(t){(0,o.assert)(a(t),\"Value must be a hexadecimal string.\")},e.assertIsStrictHexString=function(t){(0,o.assert)(u(t),'Value must be a hexadecimal string, starting with \"0x\".')},e.isValidHexAddress=function(t){return(0,n.is)(t,e.HexAddressStruct)||c(t)},e.getChecksumAddress=h,e.isValidChecksumAddress=c,e.add0x=function(t){return t.startsWith(\"0x\")?t:t.startsWith(\"0X\")?`0x${t.substring(2)}`:`0x${t}`},e.remove0x=f},17487:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(257),e),i(r(98732),e),i(r(24585),e),i(r(3470),e),i(r(73497),e),i(r(47425),e),i(r(42107),e),i(r(49624),e),i(r(10107),e),i(r(54126),e),i(r(30397),e),i(r(16913),e),i(r(98971),e),i(r(96774),e),i(r(21527),e),i(r(89734),e),i(r(92380),e),i(r(30633),e),i(r(10121),e),i(r(77791),e)},30397:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.getSafeJson=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=e.exactOptional=e.object=void 0;const n=r(57169),i=r(257),o=r(96774);function s({path:t,branch:e}){const r=t[t.length-1];return(0,o.hasProperty)(e[e.length-2],r)}function a(t){return new n.Struct({...t,type:`optional ${t.type}`,validator:(e,r)=>!s(r)||t.validator(e,r),refiner:(e,r)=>!s(r)||t.refiner(e,r)})}e.object=t=>(0,n.object)(t),e.exactOptional=a;function u(t){return(0,n.create)(t,e.JsonStruct)}e.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)(\"finite number\",(t=>(0,n.is)(t,(0,n.number)())&&Number.isFinite(t))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>e.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>e.UnsafeJsonStruct)))]),e.JsonStruct=(0,n.coerce)(e.UnsafeJsonStruct,(0,n.any)(),(t=>((0,i.assertStruct)(t,e.UnsafeJsonStruct),JSON.parse(JSON.stringify(t,((t,e)=>{if(\"__proto__\"!==t&&\"constructor\"!==t)return e})))))),e.isValidJson=function(t){try{return u(t),!0}catch{return!1}},e.getSafeJson=u,e.getJsonSize=function(t){(0,i.assertStruct)(t,e.JsonStruct,\"Invalid JSON value\");const r=JSON.stringify(t);return(new TextEncoder).encode(r).byteLength},e.jsonrpc2=\"2.0\",e.JsonRpcVersionStruct=(0,n.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),e.JsonRpcErrorStruct=(0,e.object)({code:(0,n.integer)(),message:(0,n.string)(),data:a(e.JsonStruct),stack:a((0,n.string)())}),e.JsonRpcParamsStruct=(0,n.union)([(0,n.record)((0,n.string)(),e.JsonStruct),(0,n.array)(e.JsonStruct)]),e.JsonRpcRequestStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:a(e.JsonRpcParamsStruct)}),e.JsonRpcNotificationStruct=(0,e.object)({jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:a(e.JsonRpcParamsStruct)}),e.isJsonRpcNotification=function(t){return(0,n.is)(t,e.JsonRpcNotificationStruct)},e.assertIsJsonRpcNotification=function(t,r){(0,i.assertStruct)(t,e.JsonRpcNotificationStruct,\"Invalid JSON-RPC notification\",r)},e.isJsonRpcRequest=function(t){return(0,n.is)(t,e.JsonRpcRequestStruct)},e.assertIsJsonRpcRequest=function(t,r){(0,i.assertStruct)(t,e.JsonRpcRequestStruct,\"Invalid JSON-RPC request\",r)},e.PendingJsonRpcResponseStruct=(0,n.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,n.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]),e.isPendingJsonRpcResponse=function(t){return(0,n.is)(t,e.PendingJsonRpcResponseStruct)},e.assertIsPendingJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.PendingJsonRpcResponseStruct,\"Invalid pending JSON-RPC response\",r)},e.isJsonRpcResponse=function(t){return(0,n.is)(t,e.JsonRpcResponseStruct)},e.assertIsJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.JsonRpcResponseStruct,\"Invalid JSON-RPC response\",r)},e.isJsonRpcSuccess=function(t){return(0,n.is)(t,e.JsonRpcSuccessStruct)},e.assertIsJsonRpcSuccess=function(t,r){(0,i.assertStruct)(t,e.JsonRpcSuccessStruct,\"Invalid JSON-RPC success response\",r)},e.isJsonRpcFailure=function(t){return(0,n.is)(t,e.JsonRpcFailureStruct)},e.assertIsJsonRpcFailure=function(t,r){(0,i.assertStruct)(t,e.JsonRpcFailureStruct,\"Invalid JSON-RPC failure response\",r)},e.isJsonRpcError=function(t){return(0,n.is)(t,e.JsonRpcErrorStruct)},e.assertIsJsonRpcError=function(t,r){(0,i.assertStruct)(t,e.JsonRpcErrorStruct,\"Invalid JSON-RPC error\",r)},e.getJsonRpcIdValidator=function(t){const{permitEmptyString:e,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...t};return t=>Boolean(\"number\"==typeof t&&(r||Number.isInteger(t))||\"string\"==typeof t&&(e||t.length>0)||n&&null===t)}},16913:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},98971:function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.createModuleLogger=e.createProjectLogger=void 0;const i=(0,n(r(25130)).default)(\"metamask\");e.createProjectLogger=function(t){return i.extend(t)},e.createModuleLogger=function(t,e){return t.extend(e)}},96774:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.getKnownPropertyNames=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0,e.isNonEmptyArray=function(t){return Array.isArray(t)&&t.length>0},e.isNullOrUndefined=function(t){return null==t},e.isObject=function(t){return Boolean(t)&&\"object\"==typeof t&&!Array.isArray(t)};function r(t){return t.charCodeAt(0)<=127}e.hasProperty=(t,e)=>Object.hasOwnProperty.call(t,e),e.getKnownPropertyNames=function(t){return Object.getOwnPropertyNames(t)},function(t){t[t.Null=4]=\"Null\",t[t.Comma=1]=\"Comma\",t[t.Wrapper=1]=\"Wrapper\",t[t.True=4]=\"True\",t[t.False=5]=\"False\",t[t.Quote=1]=\"Quote\",t[t.Colon=1]=\"Colon\",t[t.Date=24]=\"Date\"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/\"|\\\\|\\n|\\r|\\t/gu,e.isPlainObject=function(t){if(\"object\"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}},e.isASCII=r,e.calculateStringSize=function(t){return t.split(\"\").reduce(((t,e)=>r(e)?t+1:t+2),0)+(t.match(e.ESCAPE_CHARACTERS_REGEXP)??[]).length},e.calculateNumberSize=function(t){return t.toString().length}},21527:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hexToBigInt=e.hexToNumber=e.bigIntToHex=e.numberToHex=void 0;const n=r(257),i=r(54126);e.numberToHex=t=>((0,n.assert)(\"number\"==typeof t,\"Value must be a number.\"),(0,n.assert)(t>=0,\"Value must be a non-negative number.\"),(0,n.assert)(Number.isSafeInteger(t),\"Value is not a safe integer. Use `bigIntToHex` instead.\"),(0,i.add0x)(t.toString(16)));e.bigIntToHex=t=>((0,n.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,n.assert)(t>=0,\"Value must be a non-negative bigint.\"),(0,i.add0x)(t.toString(16)));e.hexToNumber=t=>{(0,i.assertIsHexString)(t);const e=parseInt(t,16);return(0,n.assert)(Number.isSafeInteger(e),\"Value is not a safe integer. Use `hexToBigInt` instead.\"),e};e.hexToBigInt=t=>((0,i.assertIsHexString)(t),BigInt((0,i.add0x)(t)))},89734:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},92380:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createDeferredPromise=void 0,e.createDeferredPromise=function({suppressUnhandledRejection:t=!1}={}){let e,r;const n=new Promise(((t,n)=>{e=t,r=n}));return t&&n.catch((t=>{})),{promise:n,resolve:e,reject:r}}},30633:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(t){t[t.Millisecond=1]=\"Millisecond\",t[t.Second=1e3]=\"Second\",t[t.Minute=6e4]=\"Minute\",t[t.Hour=36e5]=\"Hour\",t[t.Day=864e5]=\"Day\",t[t.Week=6048e5]=\"Week\",t[t.Year=31536e6]=\"Year\"}(e.Duration||(e.Duration={}));const r=(t,e)=>{if(!(t=>Number.isInteger(t)&&t>=0)(t))throw new Error(`\"${e}\" must be a non-negative integer. Received: \"${t}\".`)};e.inMilliseconds=function(t,e){return r(t,\"count\"),t*e},e.timeSince=function(t){return r(t,\"timestamp\"),Date.now()-t}},10121:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},77791:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const n=r(57169),i=r(97699),o=r(257);e.VersionStruct=(0,n.refine)((0,n.string)(),\"Version\",(t=>null!==(0,i.valid)(t)||`Expected SemVer version, got \"${t}\"`)),e.VersionRangeStruct=(0,n.refine)((0,n.string)(),\"Version range\",(t=>null!==(0,i.validRange)(t)||`Expected SemVer range, got \"${t}\"`)),e.isValidSemVerVersion=function(t){return(0,n.is)(t,e.VersionStruct)},e.isValidSemVerRange=function(t){return(0,n.is)(t,e.VersionRangeStruct)},e.assertIsSemVerVersion=function(t){(0,o.assertStruct)(t,e.VersionStruct)},e.assertIsSemVerRange=function(t){(0,o.assertStruct)(t,e.VersionRangeStruct)},e.gtVersion=function(t,e){return(0,i.gt)(t,e)},e.gtRange=function(t,e){return(0,i.gtr)(t,e)},e.satisfiesVersionRange=function(t,e){return(0,i.satisfies)(t,e,{includePrerelease:!0})}},66566:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.StructError=void 0;class r extends TypeError{constructor(t,e){let r;const{message:n,explanation:i,...o}=t,{path:s}=t,a=0===s.length?n:`At path: ${s.join(\".\")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...e()])}}e.StructError=r},57169:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(66566),e),i(r(69695),e),i(r(64621),e),i(r(13675),e),i(r(5792),e),i(r(32712),e)},69695:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.validate=e.is=e.mask=e.create=e.assert=e.Struct=void 0;const n=r(66566),i=r(19595);function o(t,e,r){const n=h(t,e,{message:r});if(n[0])throw n[0]}function s(t,e,r){const n=h(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function a(t,e,r){const n=h(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function u(t,e){return!h(t,e)[0]}function h(t,e,r={}){const o=(0,i.run)(t,e,r),s=(0,i.shiftIterator)(o);if(s[0]){return[new n.StructError(s[0],(function*(){for(const t of o)t[0]&&(yield t[0])})),void 0]}return[void 0,s[1]]}e.Struct=class{constructor(t){const{type:e,schema:r,validator:n,refiner:o,coercer:s=(t=>t),entries:a=function*(){}}=t;this.type=e,this.schema=r,this.entries=a,this.coercer=s,this.validator=n?(t,e)=>{const r=n(t,e);return(0,i.toFailures)(r,e,this,t)}:()=>[],this.refiner=o?(t,e)=>{const r=o(t,e);return(0,i.toFailures)(r,e,this,t)}:()=>[]}assert(t,e){return o(t,this,e)}create(t,e){return s(t,this,e)}is(t){return u(t,this)}mask(t,e){return a(t,this,e)}validate(t,e={}){return h(t,this,e)}},e.assert=o,e.create=s,e.mask=a,e.is=u,e.validate=h},64621:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.trimmed=e.defaulted=e.coerce=void 0;const n=r(69695),i=r(19595),o=r(5792);function s(t,e,r){return new n.Struct({...t,coercer:(i,o)=>(0,n.is)(i,e)?t.coercer(r(i,o),o):t.coercer(i,o)})}e.coerce=s,e.defaulted=function(t,e,r={}){return s(t,(0,o.unknown)(),(t=>{const n=\"function\"==typeof e?e():e;if(void 0===t)return n;if(!r.strict&&(0,i.isPlainObject)(t)&&(0,i.isPlainObject)(n)){const e={...t};let r=!1;for(const t in n)void 0===e[t]&&(e[t]=n[t],r=!0);if(r)return e}return t}))},e.trimmed=function(t){return s(t,(0,o.string)(),(t=>t.trim()))}},13675:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.refine=e.size=e.pattern=e.nonempty=e.min=e.max=e.empty=void 0;const n=r(69695),i=r(19595);function o(t){return t instanceof Map||t instanceof Set?t.size:t.length}function s(t,e,r){return new n.Struct({...t,*refiner(n,o){yield*t.refiner(n,o);const s=r(n,o),a=(0,i.toFailures)(s,o,t,n);for(const t of a)yield{...t,refinement:e}}})}e.empty=function(t){return s(t,\"empty\",(e=>{const r=o(e);return 0===r||`Expected an empty ${t.type} but received one with a size of \\`${r}\\``}))},e.max=function(t,e,r={}){const{exclusive:n}=r;return s(t,\"max\",(r=>n?r<e:r<=e||`Expected a ${t.type} less than ${n?\"\":\"or equal to \"}${e} but received \\`${r}\\``))},e.min=function(t,e,r={}){const{exclusive:n}=r;return s(t,\"min\",(r=>n?r>e:r>=e||`Expected a ${t.type} greater than ${n?\"\":\"or equal to \"}${e} but received \\`${r}\\``))},e.nonempty=function(t){return s(t,\"nonempty\",(e=>o(e)>0||`Expected a nonempty ${t.type} but received an empty one`))},e.pattern=function(t,e){return s(t,\"pattern\",(r=>e.test(r)||`Expected a ${t.type} matching \\`/${e.source}/\\` but received \"${r}\"`))},e.size=function(t,e,r=e){const n=`Expected a ${t.type}`,i=e===r?`of \\`${e}\\``:`between \\`${e}\\` and \\`${r}\\``;return s(t,\"size\",(t=>{if(\"number\"==typeof t||t instanceof Date)return e<=t&&t<=r||`${n} ${i} but received \\`${t}\\``;if(t instanceof Map||t instanceof Set){const{size:o}=t;return e<=o&&o<=r||`${n} with a size ${i} but received one with a size of \\`${o}\\``}const{length:o}=t;return e<=o&&o<=r||`${n} with a length ${i} but received one with a length of \\`${o}\\``}))},e.refine=s},5792:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.unknown=e.union=e.type=e.tuple=e.string=e.set=e.regexp=e.record=e.optional=e.object=e.number=e.nullable=e.never=e.map=e.literal=e.intersection=e.integer=e.instance=e.func=e.enums=e.date=e.boolean=e.bigint=e.array=e.any=void 0;const n=r(69695),i=r(19595),o=r(32712);function s(){return(0,o.define)(\"never\",(()=>!1))}e.any=function(){return(0,o.define)(\"any\",(()=>!0))},e.array=function(t){return new n.Struct({type:\"array\",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${(0,i.print)(t)}`})},e.bigint=function(){return(0,o.define)(\"bigint\",(t=>\"bigint\"==typeof t))},e.boolean=function(){return(0,o.define)(\"boolean\",(t=>\"boolean\"==typeof t))},e.date=function(){return(0,o.define)(\"date\",(t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \\`Date\\` object, but received: ${(0,i.print)(t)}`))},e.enums=function(t){const e={},r=t.map((t=>(0,i.print)(t))).join();for(const r of t)e[r]=r;return new n.Struct({type:\"enums\",schema:e,validator:e=>t.includes(e)||`Expected one of \\`${r}\\`, but received: ${(0,i.print)(e)}`})},e.func=function(){return(0,o.define)(\"func\",(t=>\"function\"==typeof t||`Expected a function, but received: ${(0,i.print)(t)}`))},e.instance=function(t){return(0,o.define)(\"instance\",(e=>e instanceof t||`Expected a \\`${t.name}\\` instance, but received: ${(0,i.print)(e)}`))},e.integer=function(){return(0,o.define)(\"integer\",(t=>\"number\"==typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${(0,i.print)(t)}`))},e.intersection=function(t){return new n.Struct({type:\"intersection\",schema:null,*entries(e,r){for(const{entries:n}of t)yield*n(e,r)},*validator(e,r){for(const{validator:n}of t)yield*n(e,r)},*refiner(e,r){for(const{refiner:n}of t)yield*n(e,r)}})},e.literal=function(t){const e=(0,i.print)(t),r=typeof t;return new n.Struct({type:\"literal\",schema:\"string\"===r||\"number\"===r||\"boolean\"===r?t:null,validator:r=>r===t||`Expected the literal \\`${e}\\`, but received: ${(0,i.print)(r)}`})},e.map=function(t,e){return new n.Struct({type:\"map\",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer:t=>t instanceof Map?new Map(t):t,validator:t=>t instanceof Map||`Expected a \\`Map\\` object, but received: ${(0,i.print)(t)}`})},e.never=s,e.nullable=function(t){return new n.Struct({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})},e.number=function(){return(0,o.define)(\"number\",(t=>\"number\"==typeof t&&!isNaN(t)||`Expected a number, but received: ${(0,i.print)(t)}`))},e.object=function(t){const e=t?Object.keys(t):[],r=s();return new n.Struct({type:\"object\",schema:t??null,*entries(n){if(t&&(0,i.isObject)(n)){const i=new Set(Object.keys(n));for(const r of e)i.delete(r),yield[r,n[r],t[r]];for(const t of i)yield[t,n[t],r]}},validator:t=>(0,i.isObject)(t)||`Expected an object, but received: ${(0,i.print)(t)}`,coercer:t=>(0,i.isObject)(t)?{...t}:t})},e.optional=function(t){return new n.Struct({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})},e.record=function(t,e){return new n.Struct({type:\"record\",schema:null,*entries(r){if((0,i.isObject)(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>(0,i.isObject)(t)||`Expected an object, but received: ${(0,i.print)(t)}`})},e.regexp=function(){return(0,o.define)(\"regexp\",(t=>t instanceof RegExp))},e.set=function(t){return new n.Struct({type:\"set\",schema:null,*entries(e){if(t&&e instanceof Set)for(const r of e)yield[r,r,t]},coercer:t=>t instanceof Set?new Set(t):t,validator:t=>t instanceof Set||`Expected a \\`Set\\` object, but received: ${(0,i.print)(t)}`})},e.string=function(){return(0,o.define)(\"string\",(t=>\"string\"==typeof t||`Expected a string, but received: ${(0,i.print)(t)}`))},e.tuple=function(t){const e=s();return new n.Struct({type:\"tuple\",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator:t=>Array.isArray(t)||`Expected an array, but received: ${(0,i.print)(t)}`})},e.type=function(t){const e=Object.keys(t);return new n.Struct({type:\"type\",schema:t,*entries(r){if((0,i.isObject)(r))for(const n of e)yield[n,r[n],t[n]]},validator:t=>(0,i.isObject)(t)||`Expected an object, but received: ${(0,i.print)(t)}`,coercer:t=>(0,i.isObject)(t)?{...t}:t})},e.union=function(t){const e=t.map((t=>t.type)).join(\" | \");return new n.Struct({type:\"union\",schema:null,coercer(e){for(const r of t){const[t,n]=r.validate(e,{coerce:!0});if(!t)return n}return e},validator(r,n){const o=[];for(const e of t){const[...t]=(0,i.run)(r,e,n),[s]=t;if(!s?.[0])return[];for(const[e]of t)e&&o.push(e)}return[`Expected the value to satisfy a union of \\`${e}\\`, but received: ${(0,i.print)(r)}`,...o]}})},e.unknown=function(){return(0,o.define)(\"unknown\",(()=>!0))}},32712:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.pick=e.partial=e.omit=e.lazy=e.dynamic=e.deprecated=e.define=e.assign=void 0;const n=r(69695),i=r(5792);e.assign=function(...t){const e=\"type\"===t[0]?.type,r=t.map((({schema:t})=>t)),n=Object.assign({},...r);return e?(0,i.type)(n):(0,i.object)(n)},e.define=function(t,e){return new n.Struct({type:t,schema:null,validator:e})},e.deprecated=function(t,e){return new n.Struct({...t,refiner:(e,r)=>void 0===e||t.refiner(e,r),validator:(r,n)=>void 0===r||(e(r,n),t.validator(r,n))})},e.dynamic=function(t){return new n.Struct({type:\"dynamic\",schema:null,*entries(e,r){const n=t(e,r);yield*n.entries(e,r)},validator:(e,r)=>t(e,r).validator(e,r),coercer:(e,r)=>t(e,r).coercer(e,r),refiner:(e,r)=>t(e,r).refiner(e,r)})},e.lazy=function(t){let e;return new n.Struct({type:\"lazy\",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator:(r,n)=>(e??(e=t()),e.validator(r,n)),coercer:(r,n)=>(e??(e=t()),e.coercer(r,n)),refiner:(r,n)=>(e??(e=t()),e.refiner(r,n))})},e.omit=function(t,e){const{schema:r}=t,n={...r};for(const t of e)delete n[t];return\"type\"===t.type?(0,i.type)(n):(0,i.object)(n)},e.partial=function(t){const e=t instanceof n.Struct,r=e?{...t.schema}:{...t};for(const t in r)r[t]=(0,i.optional)(r[t]);return e&&\"type\"===t.type?(0,i.type)(r):(0,i.object)(r)},e.pick=function(t,e){const{schema:r}=t,n={};for(const t of e)n[t]=r[t];return\"type\"===t.type?(0,i.type)(n):(0,i.object)(n)}},19595:(t,e)=>{\"use strict\";function r(t){return\"object\"==typeof t&&null!==t}function n(t){return\"symbol\"==typeof t?t.toString():\"string\"==typeof t?JSON.stringify(t):`${t}`}function i(t,e,r,i){if(!0===t)return;!1===t?t={}:\"string\"==typeof t&&(t={message:t});const{path:o,branch:s}=e,{type:a}=r,{refinement:u,message:h=`Expected a value of type \\`${a}\\`${u?` with refinement \\`${u}\\``:\"\"}, but received: \\`${n(i)}\\``}=t;return{value:i,type:a,refinement:u,key:o[o.length-1],path:o,branch:s,...t,message:h}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.run=e.toFailures=e.toFailure=e.shiftIterator=e.print=e.isPlainObject=e.isObject=void 0,e.isObject=r,e.isPlainObject=function(t){if(\"[object Object]\"!==Object.prototype.toString.call(t))return!1;const e=Object.getPrototypeOf(t);return null===e||e===Object.prototype},e.print=n,e.shiftIterator=function(t){const{done:e,value:r}=t.next();return e?void 0:r},e.toFailure=i,e.toFailures=function*(t,e,n,o){(function(t){return r(t)&&\"function\"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const r of t){const t=i(r,e,n,o);t&&(yield t)}},e.run=function*t(e,n,i={}){const{path:o=[],branch:s=[e],coerce:a=!1,mask:u=!1}=i,h={path:o,branch:s};if(a&&(e=n.coercer(e,h),u&&\"type\"!==n.type&&r(n.schema)&&r(e)&&!Array.isArray(e)))for(const t in e)void 0===n.schema[t]&&delete e[t];let c=\"valid\";for(const t of n.validator(e,h))t.explanation=i.message,c=\"not_valid\",yield[t,void 0];for(let[f,l,d]of n.entries(e,h)){const n=t(l,d,{path:void 0===f?o:[...o,f],branch:void 0===f?s:[...s,l],coerce:a,mask:u,message:i.message});for(const t of n)t[0]?(c=null===t[0].refinement||void 0===t[0].refinement?\"not_valid\":\"not_refined\",yield[t[0],void 0]):a&&(l=t[1],void 0===f?e=l:e instanceof Map?e.set(f,l):e instanceof Set?e.add(l):r(e)&&(void 0!==l||f in e)&&(e[f]=l))}if(\"not_valid\"!==c)for(const t of n.refiner(e,h))t.explanation=i.message,c=\"not_refined\",yield[t,void 0];\"valid\"===c&&(yield[void 0,e])}},62191:(t,e,r)=>{\"use strict\";var n=r(35962),i=\"undefined\"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)\"function\"==typeof i[n[e]]&&(t[t.length]=n[e]);return t}},24579:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"goerli\",\"chainId\":5,\"networkId\":5,\"defaultHardfork\":\"merge\",\"consensus\":{\"type\":\"poa\",\"algorithm\":\"clique\",\"clique\":{\"period\":15,\"epoch\":30000}},\"comment\":\"Cross-client PoA test network\",\"url\":\"https://github.com/goerli/testnet\",\"genesis\":{\"timestamp\":\"0x5c51a607\",\"gasLimit\":10485760,\"difficulty\":1,\"nonce\":\"0x0000000000000000\",\"extraData\":\"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"homestead\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"tangerineWhistle\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"spuriousDragon\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"byzantium\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"constantinople\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"petersburg\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"istanbul\",\"block\":1561651,\"forkHash\":\"0xc25efa5c\"},{\"name\":\"berlin\",\"block\":4460644,\"forkHash\":\"0x757a1c47\"},{\"name\":\"london\",\"block\":5062605,\"forkHash\":\"0xb8c6299d\"},{\"//_comment\":\"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://goerli.etherscan.io/block/7382818\",\"name\":\"merge\",\"ttd\":\"10790000\",\"block\":7382819,\"forkHash\":\"0xb8c6299d\"},{\"name\":\"mergeForkIdTransition\",\"block\":null,\"forkHash\":null},{\"name\":\"shanghai\",\"block\":null,\"timestamp\":\"1678832736\",\"forkHash\":\"0xf9843abf\"}],\"bootstrapNodes\":[{\"ip\":\"51.141.78.53\",\"port\":30303,\"id\":\"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a\",\"location\":\"\",\"comment\":\"Upstream bootnode 1\"},{\"ip\":\"13.93.54.137\",\"port\":30303,\"id\":\"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b\",\"location\":\"\",\"comment\":\"Upstream bootnode 2\"},{\"ip\":\"94.237.54.114\",\"port\":30313,\"id\":\"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291\",\"location\":\"\",\"comment\":\"Upstream bootnode 3\"},{\"ip\":\"18.218.250.66\",\"port\":30313,\"id\":\"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949\",\"location\":\"\",\"comment\":\"Upstream bootnode 4\"},{\"ip\":\"3.11.147.67\",\"port\":30303,\"id\":\"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91\",\"location\":\"\",\"comment\":\"Ethereum Foundation bootnode\"},{\"ip\":\"51.15.116.226\",\"port\":30303,\"id\":\"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd\",\"location\":\"\",\"comment\":\"Goerli Initiative bootnode\"},{\"ip\":\"51.15.119.157\",\"port\":30303,\"id\":\"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33\",\"location\":\"\",\"comment\":\"Goerli Initiative bootnode\"},{\"ip\":\"51.15.119.157\",\"port\":40303,\"id\":\"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd\",\"location\":\"\",\"comment\":\"Goerli Initiative bootnode\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net\"]}')},73192:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"mainnet\",\"chainId\":1,\"networkId\":1,\"defaultHardfork\":\"merge\",\"consensus\":{\"type\":\"pow\",\"algorithm\":\"ethash\",\"ethash\":{}},\"comment\":\"The Ethereum main chain\",\"url\":\"https://ethstats.net/\",\"genesis\":{\"gasLimit\":5000,\"difficulty\":17179869184,\"nonce\":\"0x0000000000000042\",\"extraData\":\"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0xfc64ec04\"},{\"name\":\"homestead\",\"block\":1150000,\"forkHash\":\"0x97c2c34c\"},{\"name\":\"dao\",\"block\":1920000,\"forkHash\":\"0x91d1f948\"},{\"name\":\"tangerineWhistle\",\"block\":2463000,\"forkHash\":\"0x7a64da13\"},{\"name\":\"spuriousDragon\",\"block\":2675000,\"forkHash\":\"0x3edd5b10\"},{\"name\":\"byzantium\",\"block\":4370000,\"forkHash\":\"0xa00bc324\"},{\"name\":\"constantinople\",\"block\":7280000,\"forkHash\":\"0x668db0af\"},{\"name\":\"petersburg\",\"block\":7280000,\"forkHash\":\"0x668db0af\"},{\"name\":\"istanbul\",\"block\":9069000,\"forkHash\":\"0x879d6e30\"},{\"name\":\"muirGlacier\",\"block\":9200000,\"forkHash\":\"0xe029e991\"},{\"name\":\"berlin\",\"block\":12244000,\"forkHash\":\"0x0eb440f6\"},{\"name\":\"london\",\"block\":12965000,\"forkHash\":\"0xb715077d\"},{\"name\":\"arrowGlacier\",\"block\":13773000,\"forkHash\":\"0x20c327fc\"},{\"name\":\"grayGlacier\",\"block\":15050000,\"forkHash\":\"0xf0afd0e3\"},{\"//_comment\":\"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://etherscan.io/block/15537393\",\"name\":\"merge\",\"ttd\":\"58750000000000000000000\",\"block\":15537394,\"forkHash\":\"0xf0afd0e3\"},{\"name\":\"mergeForkIdTransition\",\"block\":null,\"forkHash\":null},{\"name\":\"shanghai\",\"block\":null,\"timestamp\":\"1681338455\",\"forkHash\":\"0xdce96c2d\"}],\"bootstrapNodes\":[{\"ip\":\"18.138.108.67\",\"port\":30303,\"id\":\"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666\",\"location\":\"ap-southeast-1-001\",\"comment\":\"bootnode-aws-ap-southeast-1-001\"},{\"ip\":\"3.209.45.79\",\"port\":30303,\"id\":\"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de\",\"location\":\"us-east-1-001\",\"comment\":\"bootnode-aws-us-east-1-001\"},{\"ip\":\"65.108.70.101\",\"port\":30303,\"id\":\"2b252ab6a1d0f971d9722cb839a42cb81db019ba44c08754628ab4a823487071b5695317c8ccd085219c3a03af063495b2f1da8d18218da2d6a82981b45e6ffc\",\"location\":\"eu-west-1-001\",\"comment\":\"bootnode-hetzner-hel\"},{\"ip\":\"157.90.35.166\",\"port\":30303,\"id\":\"4aeb4ab6c14b23e2c4cfdce879c04b0748a20d8e9b59e25ded2a08143e265c6c25936e74cbc8e641e3312ca288673d91f2f93f8e277de3cfa444ecdaaf982052\",\"location\":\"eu-central-1-001\",\"comment\":\"bootnode-hetzner-fsn\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net\"]}')},14002:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"rinkeby\",\"chainId\":4,\"networkId\":4,\"defaultHardfork\":\"london\",\"consensus\":{\"type\":\"poa\",\"algorithm\":\"clique\",\"clique\":{\"period\":15,\"epoch\":30000}},\"comment\":\"PoA test network\",\"url\":\"https://www.rinkeby.io\",\"genesis\":{\"timestamp\":\"0x58ee40ba\",\"gasLimit\":4700000,\"difficulty\":1,\"nonce\":\"0x0000000000000000\",\"extraData\":\"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0x3b8e0691\"},{\"name\":\"homestead\",\"block\":1,\"forkHash\":\"0x60949295\"},{\"name\":\"tangerineWhistle\",\"block\":2,\"forkHash\":\"0x8bde40dd\"},{\"name\":\"spuriousDragon\",\"block\":3,\"forkHash\":\"0xcb3a64bb\"},{\"name\":\"byzantium\",\"block\":1035301,\"forkHash\":\"0x8d748b57\"},{\"name\":\"constantinople\",\"block\":3660663,\"forkHash\":\"0xe49cab14\"},{\"name\":\"petersburg\",\"block\":4321234,\"forkHash\":\"0xafec6b27\"},{\"name\":\"istanbul\",\"block\":5435345,\"forkHash\":\"0xcbdb8838\"},{\"name\":\"berlin\",\"block\":8290928,\"forkHash\":\"0x6910c8bd\"},{\"name\":\"london\",\"block\":8897988,\"forkHash\":\"0x8e29f2f3\"},{\"name\":\"merge\",\"block\":null,\"forkHash\":null},{\"name\":\"shanghai\",\"block\":null,\"forkHash\":null}],\"bootstrapNodes\":[{\"ip\":\"52.169.42.101\",\"port\":30303,\"id\":\"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf\",\"location\":\"\",\"comment\":\"IE\"},{\"ip\":\"52.3.158.184\",\"port\":30303,\"id\":\"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8\",\"location\":\"\",\"comment\":\"INFURA\"},{\"ip\":\"159.89.28.211\",\"port\":30303,\"id\":\"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6\",\"location\":\"\",\"comment\":\"AKASHA\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net\"]}')},27623:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"ropsten\",\"chainId\":3,\"networkId\":3,\"defaultHardfork\":\"merge\",\"consensus\":{\"type\":\"pow\",\"algorithm\":\"ethash\",\"ethash\":{}},\"comment\":\"PoW test network\",\"url\":\"https://github.com/ethereum/ropsten\",\"genesis\":{\"gasLimit\":16777216,\"difficulty\":1048576,\"nonce\":\"0x0000000000000042\",\"extraData\":\"0x3535353535353535353535353535353535353535353535353535353535353535\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0x30c7ddbc\"},{\"name\":\"homestead\",\"block\":0,\"forkHash\":\"0x30c7ddbc\"},{\"name\":\"tangerineWhistle\",\"block\":0,\"forkHash\":\"0x30c7ddbc\"},{\"name\":\"spuriousDragon\",\"block\":10,\"forkHash\":\"0x63760190\"},{\"name\":\"byzantium\",\"block\":1700000,\"forkHash\":\"0x3ea159c7\"},{\"name\":\"constantinople\",\"block\":4230000,\"forkHash\":\"0x97b544f3\"},{\"name\":\"petersburg\",\"block\":4939394,\"forkHash\":\"0xd6e2149b\"},{\"name\":\"istanbul\",\"block\":6485846,\"forkHash\":\"0x4bc66396\"},{\"name\":\"muirGlacier\",\"block\":7117117,\"forkHash\":\"0x6727ef90\"},{\"name\":\"berlin\",\"block\":9812189,\"forkHash\":\"0xa157d377\"},{\"name\":\"london\",\"block\":10499401,\"forkHash\":\"0x7119b6b3\"},{\"//_comment\":\"The forkHash will remain same as mergeForkIdTransition is post merge\",\"name\":\"merge\",\"ttd\":\"50000000000000000\",\"block\":null,\"forkHash\":\"0x7119b6b3\"},{\"name\":\"mergeForkIdTransition\",\"block\":null,\"forkHash\":null},{\"name\":\"shanghai\",\"block\":null,\"forkHash\":null}],\"bootstrapNodes\":[{\"ip\":\"52.176.7.10\",\"port\":30303,\"id\":\"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606\",\"location\":\"\",\"comment\":\"US-Azure geth\"},{\"ip\":\"52.176.100.77\",\"port\":30303,\"id\":\"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c\",\"location\":\"\",\"comment\":\"US-Azure parity\"},{\"ip\":\"52.232.243.152\",\"port\":30303,\"id\":\"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f\",\"location\":\"\",\"comment\":\"Parity\"},{\"ip\":\"192.81.208.223\",\"port\":30303,\"id\":\"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09\",\"location\":\"\",\"comment\":\"@gpip\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net\"]}')},86369:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"sepolia\",\"chainId\":11155111,\"networkId\":11155111,\"defaultHardfork\":\"merge\",\"consensus\":{\"type\":\"pow\",\"algorithm\":\"ethash\",\"ethash\":{}},\"comment\":\"PoW test network to replace Ropsten\",\"url\":\"https://github.com/ethereum/go-ethereum/pull/23730\",\"genesis\":{\"timestamp\":\"0x6159af19\",\"gasLimit\":30000000,\"difficulty\":131072,\"nonce\":\"0x0000000000000000\",\"extraData\":\"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"homestead\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"tangerineWhistle\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"spuriousDragon\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"byzantium\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"constantinople\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"petersburg\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"istanbul\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"muirGlacier\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"berlin\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"london\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"//_comment\":\"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://sepolia.etherscan.io/block/1450408\",\"name\":\"merge\",\"ttd\":\"17000000000000000\",\"block\":1450409,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"mergeForkIdTransition\",\"block\":1735371,\"forkHash\":\"0xb96cbd13\"},{\"name\":\"shanghai\",\"block\":null,\"timestamp\":\"1677557088\",\"forkHash\":\"0xf7f9bc08\"}],\"bootstrapNodes\":[{\"ip\":\"18.168.182.86\",\"port\":30303,\"id\":\"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066\",\"location\":\"\",\"comment\":\"geth\"},{\"ip\":\"52.14.151.177\",\"port\":30303,\"id\":\"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7\",\"location\":\"\",\"comment\":\"besu\"},{\"ip\":\"165.22.196.173\",\"port\":30303,\"id\":\"ce970ad2e9daa9e14593de84a8b49da3d54ccfdf83cbc4fe519cb8b36b5918ed4eab087dedd4a62479b8d50756b492d5f762367c8d20329a7854ec01547568a6\",\"location\":\"\",\"comment\":\"EF\"},{\"ip\":\"65.108.95.67\",\"port\":30303,\"id\":\"075503b13ed736244896efcde2a992ec0b451357d46cb7a8132c0384721742597fc8f0d91bbb40bb52e7d6e66728d36a1fda09176294e4a30cfac55dcce26bc6\",\"location\":\"\",\"comment\":\"lodestar\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net\"]}')},59765:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-1153\",\"number\":1153,\"comment\":\"Transient Storage\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1153\",\"status\":\"Review\",\"minimumHardfork\":\"chainstart\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{\"tstore\":{\"v\":100,\"d\":\"Base fee of the TSTORE opcode\"},\"tload\":{\"v\":100,\"d\":\"Base fee of the TLOAD opcode\"}},\"vm\":{},\"pow\":{}}')},59659:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-1559\",\"number\":1559,\"comment\":\"Fee market change for ETH 1.0 chain\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1559\",\"status\":\"Final\",\"minimumHardfork\":\"berlin\",\"requiredEIPs\":[2930],\"gasConfig\":{\"baseFeeMaxChangeDenominator\":{\"v\":8,\"d\":\"Maximum base fee change denominator\"},\"elasticityMultiplier\":{\"v\":2,\"d\":\"Maximum block gas target elasticity\"},\"initialBaseFee\":{\"v\":1000000000,\"d\":\"Initial base fee on first EIP1559 block\"}},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},609:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2315\",\"number\":2315,\"comment\":\"Simple subroutines for the EVM\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2315\",\"status\":\"Draft\",\"minimumHardfork\":\"istanbul\",\"gasConfig\":{},\"gasPrices\":{\"beginsub\":{\"v\":2,\"d\":\"Base fee of the BEGINSUB opcode\"},\"returnsub\":{\"v\":5,\"d\":\"Base fee of the RETURNSUB opcode\"},\"jumpsub\":{\"v\":10,\"d\":\"Base fee of the JUMPSUB opcode\"}},\"vm\":{},\"pow\":{}}')},34335:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2537\",\"number\":2537,\"comment\":\"BLS12-381 precompiles\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2537\",\"status\":\"Draft\",\"minimumHardfork\":\"chainstart\",\"gasConfig\":{},\"gasPrices\":{\"Bls12381G1AddGas\":{\"v\":600,\"d\":\"Gas cost of a single BLS12-381 G1 addition precompile-call\"},\"Bls12381G1MulGas\":{\"v\":12000,\"d\":\"Gas cost of a single BLS12-381 G1 multiplication precompile-call\"},\"Bls12381G2AddGas\":{\"v\":4500,\"d\":\"Gas cost of a single BLS12-381 G2 addition precompile-call\"},\"Bls12381G2MulGas\":{\"v\":55000,\"d\":\"Gas cost of a single BLS12-381 G2 multiplication precompile-call\"},\"Bls12381PairingBaseGas\":{\"v\":115000,\"d\":\"Base gas cost of BLS12-381 pairing check\"},\"Bls12381PairingPerPairGas\":{\"v\":23000,\"d\":\"Per-pair gas cost of BLS12-381 pairing check\"},\"Bls12381MapG1Gas\":{\"v\":5500,\"d\":\"Gas cost of BLS12-381 map field element to G1\"},\"Bls12381MapG2Gas\":{\"v\":110000,\"d\":\"Gas cost of BLS12-381 map field element to G2\"},\"Bls12381MultiExpGasDiscount\":{\"v\":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],\"d\":\"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair\"}},\"vm\":{},\"pow\":{}}')},40354:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2565\",\"number\":2565,\"comment\":\"ModExp gas cost\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2565\",\"status\":\"Final\",\"minimumHardfork\":\"byzantium\",\"gasConfig\":{},\"gasPrices\":{\"modexpGquaddivisor\":{\"v\":3,\"d\":\"Gquaddivisor from modexp precompile for gas calculation\"}},\"vm\":{},\"pow\":{}}')},43928:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2718\",\"comment\":\"Typed Transaction Envelope\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2718\",\"status\":\"Final\",\"minimumHardfork\":\"chainstart\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},10810:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2929\",\"comment\":\"Gas cost increases for state access opcodes\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2929\",\"status\":\"Final\",\"minimumHardfork\":\"chainstart\",\"gasConfig\":{},\"gasPrices\":{\"coldsload\":{\"v\":2100,\"d\":\"Gas cost of the first read of storage from a given location (per transaction)\"},\"coldaccountaccess\":{\"v\":2600,\"d\":\"Gas cost of the first read of a given address (per transaction)\"},\"warmstorageread\":{\"v\":100,\"d\":\"Gas cost of reading storage locations which have already loaded \\'cold\\'\"},\"sstoreCleanGasEIP2200\":{\"v\":2900,\"d\":\"Once per SSTORE operation from clean non-zero to something else\"},\"sstoreNoopGasEIP2200\":{\"v\":100,\"d\":\"Once per SSTORE operation if the value doesn\\'t change\"},\"sstoreDirtyGasEIP2200\":{\"v\":100,\"d\":\"Once per SSTORE operation if a dirty value is changed\"},\"sstoreInitRefundEIP2200\":{\"v\":19900,\"d\":\"Once per SSTORE operation for resetting to the original zero value\"},\"sstoreCleanRefundEIP2200\":{\"v\":4900,\"d\":\"Once per SSTORE operation for resetting to the original non-zero value\"},\"call\":{\"v\":0,\"d\":\"Base fee of the CALL opcode\"},\"callcode\":{\"v\":0,\"d\":\"Base fee of the CALLCODE opcode\"},\"delegatecall\":{\"v\":0,\"d\":\"Base fee of the DELEGATECALL opcode\"},\"staticcall\":{\"v\":0,\"d\":\"Base fee of the STATICCALL opcode\"},\"balance\":{\"v\":0,\"d\":\"Base fee of the BALANCE opcode\"},\"extcodesize\":{\"v\":0,\"d\":\"Base fee of the EXTCODESIZE opcode\"},\"extcodecopy\":{\"v\":0,\"d\":\"Base fee of the EXTCODECOPY opcode\"},\"extcodehash\":{\"v\":0,\"d\":\"Base fee of the EXTCODEHASH opcode\"},\"sload\":{\"v\":0,\"d\":\"Base fee of the SLOAD opcode\"},\"sstore\":{\"v\":0,\"d\":\"Base fee of the SSTORE opcode\"}},\"vm\":{},\"pow\":{}}')},33501:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2930\",\"comment\":\"Optional access lists\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2930\",\"status\":\"Final\",\"minimumHardfork\":\"istanbul\",\"requiredEIPs\":[2718,2929],\"gasConfig\":{},\"gasPrices\":{\"accessListStorageKeyCost\":{\"v\":1900,\"d\":\"Gas cost per storage key in an Access List transaction\"},\"accessListAddressCost\":{\"v\":2400,\"d\":\"Gas cost per storage key in an Access List transaction\"}},\"vm\":{},\"pow\":{}}')},96973:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3074\",\"number\":3074,\"comment\":\"AUTH and AUTHCALL opcodes\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3074\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"gasConfig\":{},\"gasPrices\":{\"auth\":{\"v\":3100,\"d\":\"Gas cost of the AUTH opcode\"},\"authcall\":{\"v\":0,\"d\":\"Gas cost of the AUTHCALL opcode\"},\"authcallValueTransfer\":{\"v\":6700,\"d\":\"Paid for CALL when the value transfer is non-zero\"}},\"vm\":{},\"pow\":{}}')},24984:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3198\",\"number\":3198,\"comment\":\"BASEFEE opcode\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3198\",\"status\":\"Final\",\"minimumHardfork\":\"london\",\"gasConfig\":{},\"gasPrices\":{\"basefee\":{\"v\":2,\"d\":\"Gas cost of the BASEFEE opcode\"}},\"vm\":{},\"pow\":{}}')},3573:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3529\",\"comment\":\"Reduction in refunds\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3529\",\"status\":\"Final\",\"minimumHardfork\":\"berlin\",\"requiredEIPs\":[2929],\"gasConfig\":{\"maxRefundQuotient\":{\"v\":5,\"d\":\"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)\"}},\"gasPrices\":{\"selfdestructRefund\":{\"v\":0,\"d\":\"Refunded following a selfdestruct operation\"},\"sstoreClearRefundEIP2200\":{\"v\":4800,\"d\":\"Once per SSTORE operation for clearing an originally existing storage slot\"}},\"vm\":{},\"pow\":{}}')},36685:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3540\",\"number\":3540,\"comment\":\"EVM Object Format (EOF) v1\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3540\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[3541],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},96309:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3541\",\"comment\":\"Reject new contracts starting with the 0xEF byte\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3541\",\"status\":\"Final\",\"minimumHardfork\":\"berlin\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},93609:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3554\",\"comment\":\"Reduction in refunds\",\"url\":\"Difficulty Bomb Delay to December 1st 2021\",\"status\":\"Final\",\"minimumHardfork\":\"muirGlacier\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{\"difficultyBombDelay\":{\"v\":9500000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},4204:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3607\",\"number\":3607,\"comment\":\"Reject transactions from senders with deployed code\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3607\",\"status\":\"Final\",\"minimumHardfork\":\"chainstart\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},69727:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3651\",\"number\":3198,\"comment\":\"Warm COINBASE\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3651\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[2929],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},18038:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3670\",\"number\":3670,\"comment\":\"EOF - Code Validation\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3670\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[3540],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},33021:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3675\",\"number\":3675,\"comment\":\"Upgrade consensus to Proof-of-Stake\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3675\",\"status\":\"Final\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},94222:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3855\",\"number\":3855,\"comment\":\"PUSH0 instruction\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3855\",\"status\":\"Review\",\"minimumHardfork\":\"chainstart\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{\"push0\":{\"v\":2,\"d\":\"Base fee of the PUSH0 opcode\"}},\"vm\":{},\"pow\":{}}')},54359:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3860\",\"number\":3860,\"comment\":\"Limit and meter initcode\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3860\",\"status\":\"Review\",\"minimumHardfork\":\"spuriousDragon\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{\"initCodeWordCost\":{\"v\":2,\"d\":\"Gas to pay for each word (32 bytes) of initcode when creating a contract\"}},\"vm\":{\"maxInitCodeSize\":{\"v\":49152,\"d\":\"Maximum length of initialization code when creating a contract\"}},\"pow\":{}}')},58444:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-4345\",\"number\":4345,\"comment\":\"Difficulty Bomb Delay to June 2022\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4345\",\"status\":\"Final\",\"minimumHardfork\":\"london\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{\"difficultyBombDelay\":{\"v\":10700000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},46401:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-4399\",\"number\":4399,\"comment\":\"Supplant DIFFICULTY opcode with PREVRANDAO\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4399\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},51200:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-4844\",\"number\":4844,\"comment\":\"Shard Blob Transactions\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4844\",\"status\":\"Draft\",\"minimumHardfork\":\"merge\",\"requiredEIPs\":[1559,2718,2930,4895],\"gasConfig\":{\"dataGasPerBlob\":{\"v\":131072,\"d\":\"The base fee for data gas per blob\"},\"targetDataGasPerBlock\":{\"v\":262144,\"d\":\"The target data gas consumed per block\"},\"maxDataGasPerBlock\":{\"v\":524288,\"d\":\"The max data gas allowable per block\"},\"dataGasPriceUpdateFraction\":{\"v\":2225652,\"d\":\"The denominator used in the exponential when calculating a data gas price\"}},\"gasPrices\":{\"simpleGasPerBlob\":{\"v\":12000,\"d\":\"The basic gas fee for each blob\"},\"minDataGasPrice\":{\"v\":1,\"d\":\"The minimum fee per data gas\"},\"kzgPointEvaluationGasPrecompilePrice\":{\"v\":50000,\"d\":\"The fee associated with the point evaluation precompile\"},\"datahash\":{\"v\":3,\"d\":\"Base fee of the DATAHASH opcode\"}},\"sharding\":{\"blobCommitmentVersionKzg\":{\"v\":1,\"d\":\"The number indicated a versioned hash is a KZG commitment\"},\"fieldElementsPerBlob\":{\"v\":4096,\"d\":\"The number of field elements allowed per blob\"}},\"vm\":{},\"pow\":{}}')},3122:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-4895\",\"number\":4895,\"comment\":\"Beacon chain push withdrawals as operations\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4895\",\"status\":\"Review\",\"minimumHardfork\":\"merge\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},29694:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-5133\",\"number\":5133,\"comment\":\"Delaying Difficulty Bomb to mid-September 2022\",\"url\":\"https://eips.ethereum.org/EIPS/eip-5133\",\"status\":\"Draft\",\"minimumHardfork\":\"grayGlacier\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{\"difficultyBombDelay\":{\"v\":11400000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},98874:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"arrowGlacier\",\"comment\":\"HF to delay the difficulty bomb\",\"url\":\"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md\",\"status\":\"Final\",\"eips\":[4345],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},45515:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"berlin\",\"comment\":\"HF targeted for July 2020 following the Muir Glacier HF\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2070\",\"status\":\"Final\",\"eips\":[2565,2929,2718,2930]}')},21773:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"byzantium\",\"comment\":\"Hardfork with new precompiles, instructions and other protocol changes\",\"url\":\"https://eips.ethereum.org/EIPS/eip-609\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"modexpGquaddivisor\":{\"v\":20,\"d\":\"Gquaddivisor from modexp precompile for gas calculation\"},\"ecAdd\":{\"v\":500,\"d\":\"Gas costs for curve addition precompile\"},\"ecMul\":{\"v\":40000,\"d\":\"Gas costs for curve multiplication precompile\"},\"ecPairing\":{\"v\":100000,\"d\":\"Base gas costs for curve pairing precompile\"},\"ecPairingWord\":{\"v\":80000,\"d\":\"Gas costs regarding curve pairing precompile input length\"},\"revert\":{\"v\":0,\"d\":\"Base fee of the REVERT opcode\"},\"staticcall\":{\"v\":700,\"d\":\"Base fee of the STATICCALL opcode\"},\"returndatasize\":{\"v\":2,\"d\":\"Base fee of the RETURNDATASIZE opcode\"},\"returndatacopy\":{\"v\":3,\"d\":\"Base fee of the RETURNDATACOPY opcode\"}},\"vm\":{},\"pow\":{\"minerReward\":{\"v\":\"3000000000000000000\",\"d\":\"the amount a miner get rewarded for mining a block\"},\"difficultyBombDelay\":{\"v\":3000000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},80021:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"chainstart\",\"comment\":\"Start of the Ethereum main chain\",\"url\":\"\",\"status\":\"\",\"gasConfig\":{\"minGasLimit\":{\"v\":5000,\"d\":\"Minimum the gas limit may ever be\"},\"gasLimitBoundDivisor\":{\"v\":1024,\"d\":\"The bound divisor of the gas limit, used in update calculations\"},\"maxRefundQuotient\":{\"v\":2,\"d\":\"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)\"}},\"gasPrices\":{\"base\":{\"v\":2,\"d\":\"Gas base cost, used e.g. for ChainID opcode (Istanbul)\"},\"tierStep\":{\"v\":[0,2,3,5,8,10,20],\"d\":\"Once per operation, for a selection of them\"},\"exp\":{\"v\":10,\"d\":\"Base fee of the EXP opcode\"},\"expByte\":{\"v\":10,\"d\":\"Times ceil(log256(exponent)) for the EXP instruction\"},\"sha3\":{\"v\":30,\"d\":\"Base fee of the SHA3 opcode\"},\"sha3Word\":{\"v\":6,\"d\":\"Once per word of the SHA3 operation\\'s data\"},\"sload\":{\"v\":50,\"d\":\"Base fee of the SLOAD opcode\"},\"sstoreSet\":{\"v\":20000,\"d\":\"Once per SSTORE operation if the zeroness changes from zero\"},\"sstoreReset\":{\"v\":5000,\"d\":\"Once per SSTORE operation if the zeroness does not change from zero\"},\"sstoreRefund\":{\"v\":15000,\"d\":\"Once per SSTORE operation if the zeroness changes to zero\"},\"jumpdest\":{\"v\":1,\"d\":\"Base fee of the JUMPDEST opcode\"},\"log\":{\"v\":375,\"d\":\"Base fee of the LOG opcode\"},\"logData\":{\"v\":8,\"d\":\"Per byte in a LOG* operation\\'s data\"},\"logTopic\":{\"v\":375,\"d\":\"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas\"},\"create\":{\"v\":32000,\"d\":\"Base fee of the CREATE opcode\"},\"call\":{\"v\":40,\"d\":\"Base fee of the CALL opcode\"},\"callStipend\":{\"v\":2300,\"d\":\"Free gas given at beginning of call\"},\"callValueTransfer\":{\"v\":9000,\"d\":\"Paid for CALL when the value transfor is non-zero\"},\"callNewAccount\":{\"v\":25000,\"d\":\"Paid for CALL when the destination address didn\\'t exist prior\"},\"selfdestructRefund\":{\"v\":24000,\"d\":\"Refunded following a selfdestruct operation\"},\"memory\":{\"v\":3,\"d\":\"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL\"},\"quadCoeffDiv\":{\"v\":512,\"d\":\"Divisor for the quadratic particle of the memory cost equation\"},\"createData\":{\"v\":200,\"d\":\"\"},\"tx\":{\"v\":21000,\"d\":\"Per transaction. NOTE: Not payable on data of calls between transactions\"},\"txCreation\":{\"v\":32000,\"d\":\"The cost of creating a contract via tx\"},\"txDataZero\":{\"v\":4,\"d\":\"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions\"},\"txDataNonZero\":{\"v\":68,\"d\":\"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions\"},\"copy\":{\"v\":3,\"d\":\"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added\"},\"ecRecover\":{\"v\":3000,\"d\":\"\"},\"sha256\":{\"v\":60,\"d\":\"\"},\"sha256Word\":{\"v\":12,\"d\":\"\"},\"ripemd160\":{\"v\":600,\"d\":\"\"},\"ripemd160Word\":{\"v\":120,\"d\":\"\"},\"identity\":{\"v\":15,\"d\":\"\"},\"identityWord\":{\"v\":3,\"d\":\"\"},\"stop\":{\"v\":0,\"d\":\"Base fee of the STOP opcode\"},\"add\":{\"v\":3,\"d\":\"Base fee of the ADD opcode\"},\"mul\":{\"v\":5,\"d\":\"Base fee of the MUL opcode\"},\"sub\":{\"v\":3,\"d\":\"Base fee of the SUB opcode\"},\"div\":{\"v\":5,\"d\":\"Base fee of the DIV opcode\"},\"sdiv\":{\"v\":5,\"d\":\"Base fee of the SDIV opcode\"},\"mod\":{\"v\":5,\"d\":\"Base fee of the MOD opcode\"},\"smod\":{\"v\":5,\"d\":\"Base fee of the SMOD opcode\"},\"addmod\":{\"v\":8,\"d\":\"Base fee of the ADDMOD opcode\"},\"mulmod\":{\"v\":8,\"d\":\"Base fee of the MULMOD opcode\"},\"signextend\":{\"v\":5,\"d\":\"Base fee of the SIGNEXTEND opcode\"},\"lt\":{\"v\":3,\"d\":\"Base fee of the LT opcode\"},\"gt\":{\"v\":3,\"d\":\"Base fee of the GT opcode\"},\"slt\":{\"v\":3,\"d\":\"Base fee of the SLT opcode\"},\"sgt\":{\"v\":3,\"d\":\"Base fee of the SGT opcode\"},\"eq\":{\"v\":3,\"d\":\"Base fee of the EQ opcode\"},\"iszero\":{\"v\":3,\"d\":\"Base fee of the ISZERO opcode\"},\"and\":{\"v\":3,\"d\":\"Base fee of the AND opcode\"},\"or\":{\"v\":3,\"d\":\"Base fee of the OR opcode\"},\"xor\":{\"v\":3,\"d\":\"Base fee of the XOR opcode\"},\"not\":{\"v\":3,\"d\":\"Base fee of the NOT opcode\"},\"byte\":{\"v\":3,\"d\":\"Base fee of the BYTE opcode\"},\"address\":{\"v\":2,\"d\":\"Base fee of the ADDRESS opcode\"},\"balance\":{\"v\":20,\"d\":\"Base fee of the BALANCE opcode\"},\"origin\":{\"v\":2,\"d\":\"Base fee of the ORIGIN opcode\"},\"caller\":{\"v\":2,\"d\":\"Base fee of the CALLER opcode\"},\"callvalue\":{\"v\":2,\"d\":\"Base fee of the CALLVALUE opcode\"},\"calldataload\":{\"v\":3,\"d\":\"Base fee of the CALLDATALOAD opcode\"},\"calldatasize\":{\"v\":2,\"d\":\"Base fee of the CALLDATASIZE opcode\"},\"calldatacopy\":{\"v\":3,\"d\":\"Base fee of the CALLDATACOPY opcode\"},\"codesize\":{\"v\":2,\"d\":\"Base fee of the CODESIZE opcode\"},\"codecopy\":{\"v\":3,\"d\":\"Base fee of the CODECOPY opcode\"},\"gasprice\":{\"v\":2,\"d\":\"Base fee of the GASPRICE opcode\"},\"extcodesize\":{\"v\":20,\"d\":\"Base fee of the EXTCODESIZE opcode\"},\"extcodecopy\":{\"v\":20,\"d\":\"Base fee of the EXTCODECOPY opcode\"},\"blockhash\":{\"v\":20,\"d\":\"Base fee of the BLOCKHASH opcode\"},\"coinbase\":{\"v\":2,\"d\":\"Base fee of the COINBASE opcode\"},\"timestamp\":{\"v\":2,\"d\":\"Base fee of the TIMESTAMP opcode\"},\"number\":{\"v\":2,\"d\":\"Base fee of the NUMBER opcode\"},\"difficulty\":{\"v\":2,\"d\":\"Base fee of the DIFFICULTY opcode\"},\"gaslimit\":{\"v\":2,\"d\":\"Base fee of the GASLIMIT opcode\"},\"pop\":{\"v\":2,\"d\":\"Base fee of the POP opcode\"},\"mload\":{\"v\":3,\"d\":\"Base fee of the MLOAD opcode\"},\"mstore\":{\"v\":3,\"d\":\"Base fee of the MSTORE opcode\"},\"mstore8\":{\"v\":3,\"d\":\"Base fee of the MSTORE8 opcode\"},\"sstore\":{\"v\":0,\"d\":\"Base fee of the SSTORE opcode\"},\"jump\":{\"v\":8,\"d\":\"Base fee of the JUMP opcode\"},\"jumpi\":{\"v\":10,\"d\":\"Base fee of the JUMPI opcode\"},\"pc\":{\"v\":2,\"d\":\"Base fee of the PC opcode\"},\"msize\":{\"v\":2,\"d\":\"Base fee of the MSIZE opcode\"},\"gas\":{\"v\":2,\"d\":\"Base fee of the GAS opcode\"},\"push\":{\"v\":3,\"d\":\"Base fee of the PUSH opcode\"},\"dup\":{\"v\":3,\"d\":\"Base fee of the DUP opcode\"},\"swap\":{\"v\":3,\"d\":\"Base fee of the SWAP opcode\"},\"callcode\":{\"v\":40,\"d\":\"Base fee of the CALLCODE opcode\"},\"return\":{\"v\":0,\"d\":\"Base fee of the RETURN opcode\"},\"invalid\":{\"v\":0,\"d\":\"Base fee of the INVALID opcode\"},\"selfdestruct\":{\"v\":0,\"d\":\"Base fee of the SELFDESTRUCT opcode\"}},\"vm\":{\"stackLimit\":{\"v\":1024,\"d\":\"Maximum size of VM stack allowed\"},\"callCreateDepth\":{\"v\":1024,\"d\":\"Maximum depth of call/create stack\"},\"maxExtraDataSize\":{\"v\":32,\"d\":\"Maximum size extra data may be after Genesis\"}},\"pow\":{\"minimumDifficulty\":{\"v\":131072,\"d\":\"The minimum that the difficulty may ever be\"},\"difficultyBoundDivisor\":{\"v\":2048,\"d\":\"The bound divisor of the difficulty, used in the update calculations\"},\"durationLimit\":{\"v\":13,\"d\":\"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not\"},\"epochDuration\":{\"v\":30000,\"d\":\"Duration between proof-of-work epochs\"},\"timebombPeriod\":{\"v\":100000,\"d\":\"Exponential difficulty timebomb period\"},\"minerReward\":{\"v\":\"5000000000000000000\",\"d\":\"the amount a miner get rewarded for mining a block\"},\"difficultyBombDelay\":{\"v\":0,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},29517:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"constantinople\",\"comment\":\"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1013\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"netSstoreNoopGas\":{\"v\":200,\"d\":\"Once per SSTORE operation if the value doesn\\'t change\"},\"netSstoreInitGas\":{\"v\":20000,\"d\":\"Once per SSTORE operation from clean zero\"},\"netSstoreCleanGas\":{\"v\":5000,\"d\":\"Once per SSTORE operation from clean non-zero\"},\"netSstoreDirtyGas\":{\"v\":200,\"d\":\"Once per SSTORE operation from dirty\"},\"netSstoreClearRefund\":{\"v\":15000,\"d\":\"Once per SSTORE operation for clearing an originally existing storage slot\"},\"netSstoreResetRefund\":{\"v\":4800,\"d\":\"Once per SSTORE operation for resetting to the original non-zero value\"},\"netSstoreResetClearRefund\":{\"v\":19800,\"d\":\"Once per SSTORE operation for resetting to the original zero value\"},\"shl\":{\"v\":3,\"d\":\"Base fee of the SHL opcode\"},\"shr\":{\"v\":3,\"d\":\"Base fee of the SHR opcode\"},\"sar\":{\"v\":3,\"d\":\"Base fee of the SAR opcode\"},\"extcodehash\":{\"v\":400,\"d\":\"Base fee of the EXTCODEHASH opcode\"},\"create2\":{\"v\":32000,\"d\":\"Base fee of the CREATE2 opcode\"}},\"vm\":{},\"pow\":{\"minerReward\":{\"v\":\"2000000000000000000\",\"d\":\"The amount a miner gets rewarded for mining a block\"},\"difficultyBombDelay\":{\"v\":5000000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},75774:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"dao\",\"comment\":\"DAO rescue hardfork\",\"url\":\"https://eips.ethereum.org/EIPS/eip-779\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},13292:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"grayGlacier\",\"comment\":\"Delaying the difficulty bomb to Mid September 2022\",\"url\":\"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md\",\"status\":\"Draft\",\"eips\":[5133],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},72001:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"homestead\",\"comment\":\"Homestead hardfork with protocol and network changes\",\"url\":\"https://eips.ethereum.org/EIPS/eip-606\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"delegatecall\":{\"v\":40,\"d\":\"Base fee of the DELEGATECALL opcode\"}},\"vm\":{},\"pow\":{}}')},23316:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"istanbul\",\"comment\":\"HF targeted for December 2019 following the Constantinople/Petersburg HF\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1679\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"blake2Round\":{\"v\":1,\"d\":\"Gas cost per round for the Blake2 F precompile\"},\"ecAdd\":{\"v\":150,\"d\":\"Gas costs for curve addition precompile\"},\"ecMul\":{\"v\":6000,\"d\":\"Gas costs for curve multiplication precompile\"},\"ecPairing\":{\"v\":45000,\"d\":\"Base gas costs for curve pairing precompile\"},\"ecPairingWord\":{\"v\":34000,\"d\":\"Gas costs regarding curve pairing precompile input length\"},\"txDataNonZero\":{\"v\":16,\"d\":\"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions\"},\"sstoreSentryGasEIP2200\":{\"v\":2300,\"d\":\"Minimum gas required to be present for an SSTORE call, not consumed\"},\"sstoreNoopGasEIP2200\":{\"v\":800,\"d\":\"Once per SSTORE operation if the value doesn\\'t change\"},\"sstoreDirtyGasEIP2200\":{\"v\":800,\"d\":\"Once per SSTORE operation if a dirty value is changed\"},\"sstoreInitGasEIP2200\":{\"v\":20000,\"d\":\"Once per SSTORE operation from clean zero to non-zero\"},\"sstoreInitRefundEIP2200\":{\"v\":19200,\"d\":\"Once per SSTORE operation for resetting to the original zero value\"},\"sstoreCleanGasEIP2200\":{\"v\":5000,\"d\":\"Once per SSTORE operation from clean non-zero to something else\"},\"sstoreCleanRefundEIP2200\":{\"v\":4200,\"d\":\"Once per SSTORE operation for resetting to the original non-zero value\"},\"sstoreClearRefundEIP2200\":{\"v\":15000,\"d\":\"Once per SSTORE operation for clearing an originally existing storage slot\"},\"balance\":{\"v\":700,\"d\":\"Base fee of the BALANCE opcode\"},\"extcodehash\":{\"v\":700,\"d\":\"Base fee of the EXTCODEHASH opcode\"},\"chainid\":{\"v\":2,\"d\":\"Base fee of the CHAINID opcode\"},\"selfbalance\":{\"v\":5,\"d\":\"Base fee of the SELFBALANCE opcode\"},\"sload\":{\"v\":800,\"d\":\"Base fee of the SLOAD opcode\"}},\"vm\":{},\"pow\":{}}')},46497:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"london\",\"comment\":\"HF targeted for July 2021 following the Berlin fork\",\"url\":\"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md\",\"status\":\"Final\",\"eips\":[1559,3198,3529,3541]}')},69024:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"merge\",\"comment\":\"Hardfork to upgrade the consensus mechanism to Proof-of-Stake\",\"url\":\"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md\",\"status\":\"Final\",\"consensus\":{\"type\":\"pos\",\"algorithm\":\"casper\",\"casper\":{}},\"eips\":[3675,4399]}')},76552:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"mergeForkIdTransition\",\"comment\":\"Pre-merge hardfork to fork off non-upgraded clients\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3675\",\"status\":\"Draft\",\"eips\":[]}')},68288:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"muirGlacier\",\"comment\":\"HF to delay the difficulty bomb\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2384\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{\"difficultyBombDelay\":{\"v\":9000000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},76694:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"petersburg\",\"comment\":\"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1716\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"netSstoreNoopGas\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreInitGas\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreCleanGas\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreDirtyGas\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreClearRefund\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreResetRefund\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreResetClearRefund\":{\"v\":null,\"d\":\"Removed along EIP-1283\"}},\"vm\":{},\"pow\":{}}')},23317:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"shanghai\",\"comment\":\"Next feature hardfork after the merge hardfork having withdrawals, warm coinbase, push0, limit/meter initcode\",\"url\":\"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md\",\"status\":\"Final\",\"eips\":[3651,3855,3860,4895]}')},68870:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"shardingFork\",\"comment\":\"Internal hardfork to test proto-danksharding (do not use in production)\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4844\",\"status\":\"Experimental\",\"eips\":[4844]}')},40610:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"spuriousDragon\",\"comment\":\"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit\",\"url\":\"https://eips.ethereum.org/EIPS/eip-607\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"expByte\":{\"v\":50,\"d\":\"Times ceil(log256(exponent)) for the EXP instruction\"}},\"vm\":{\"maxCodeSize\":{\"v\":24576,\"d\":\"Maximum length of contract code\"}},\"pow\":{}}')},70116:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"tangerineWhistle\",\"comment\":\"Hardfork with gas cost changes for IO-heavy operations\",\"url\":\"https://eips.ethereum.org/EIPS/eip-608\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"sload\":{\"v\":200,\"d\":\"Once per SLOAD operation\"},\"call\":{\"v\":700,\"d\":\"Once per CALL operation & message call transaction\"},\"extcodesize\":{\"v\":700,\"d\":\"Base fee of the EXTCODESIZE opcode\"},\"extcodecopy\":{\"v\":700,\"d\":\"Base fee of the EXTCODECOPY opcode\"},\"balance\":{\"v\":400,\"d\":\"Base fee of the BALANCE opcode\"},\"delegatecall\":{\"v\":700,\"d\":\"Base fee of the DELEGATECALL opcode\"},\"callcode\":{\"v\":700,\"d\":\"Base fee of the CALLCODE opcode\"},\"selfdestruct\":{\"v\":5000,\"d\":\"Base fee of the SELFDESTRUCT opcode\"}},\"vm\":{},\"pow\":{}}')},49234:t=>{\"use strict\";t.exports=JSON.parse('{\"aes-128-ecb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-192-ecb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-256-ecb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-128-cbc\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-192-cbc\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-256-cbc\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes128\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes192\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes256\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-128-cfb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-192-cfb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-256-cfb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-128-cfb8\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-192-cfb8\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-256-cfb8\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-128-cfb1\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-192-cfb1\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-256-cfb1\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-128-ofb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-192-ofb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-256-ofb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-128-ctr\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-192-ctr\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-256-ctr\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-128-gcm\":{\"cipher\":\"AES\",\"key\":128,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"},\"aes-192-gcm\":{\"cipher\":\"AES\",\"key\":192,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"},\"aes-256-gcm\":{\"cipher\":\"AES\",\"key\":256,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"}}')},40026:t=>{\"use strict\";t.exports=JSON.parse('{\"sha224WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha224\",\"id\":\"302d300d06096086480165030402040500041c\"},\"RSA-SHA224\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha224\",\"id\":\"302d300d06096086480165030402040500041c\"},\"sha256WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha256\",\"id\":\"3031300d060960864801650304020105000420\"},\"RSA-SHA256\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha256\",\"id\":\"3031300d060960864801650304020105000420\"},\"sha384WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha384\",\"id\":\"3041300d060960864801650304020205000430\"},\"RSA-SHA384\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha384\",\"id\":\"3041300d060960864801650304020205000430\"},\"sha512WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha512\",\"id\":\"3051300d060960864801650304020305000440\"},\"RSA-SHA512\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha512\",\"id\":\"3051300d060960864801650304020305000440\"},\"RSA-SHA1\":{\"sign\":\"rsa\",\"hash\":\"sha1\",\"id\":\"3021300906052b0e03021a05000414\"},\"ecdsa-with-SHA1\":{\"sign\":\"ecdsa\",\"hash\":\"sha1\",\"id\":\"\"},\"sha256\":{\"sign\":\"ecdsa\",\"hash\":\"sha256\",\"id\":\"\"},\"sha224\":{\"sign\":\"ecdsa\",\"hash\":\"sha224\",\"id\":\"\"},\"sha384\":{\"sign\":\"ecdsa\",\"hash\":\"sha384\",\"id\":\"\"},\"sha512\":{\"sign\":\"ecdsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-SHA\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA-SHA1\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA-WITH-SHA224\":{\"sign\":\"dsa\",\"hash\":\"sha224\",\"id\":\"\"},\"DSA-SHA224\":{\"sign\":\"dsa\",\"hash\":\"sha224\",\"id\":\"\"},\"DSA-WITH-SHA256\":{\"sign\":\"dsa\",\"hash\":\"sha256\",\"id\":\"\"},\"DSA-SHA256\":{\"sign\":\"dsa\",\"hash\":\"sha256\",\"id\":\"\"},\"DSA-WITH-SHA384\":{\"sign\":\"dsa\",\"hash\":\"sha384\",\"id\":\"\"},\"DSA-SHA384\":{\"sign\":\"dsa\",\"hash\":\"sha384\",\"id\":\"\"},\"DSA-WITH-SHA512\":{\"sign\":\"dsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-SHA512\":{\"sign\":\"dsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-RIPEMD160\":{\"sign\":\"dsa\",\"hash\":\"rmd160\",\"id\":\"\"},\"ripemd160WithRSA\":{\"sign\":\"rsa\",\"hash\":\"rmd160\",\"id\":\"3021300906052b2403020105000414\"},\"RSA-RIPEMD160\":{\"sign\":\"rsa\",\"hash\":\"rmd160\",\"id\":\"3021300906052b2403020105000414\"},\"md5WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"md5\",\"id\":\"3020300c06082a864886f70d020505000410\"},\"RSA-MD5\":{\"sign\":\"rsa\",\"hash\":\"md5\",\"id\":\"3020300c06082a864886f70d020505000410\"}}')},39167:t=>{\"use strict\";t.exports=JSON.parse('{\"1.3.132.0.10\":\"secp256k1\",\"1.3.132.0.33\":\"p224\",\"1.2.840.10045.3.1.1\":\"p192\",\"1.2.840.10045.3.1.7\":\"p256\",\"1.3.132.0.34\":\"p384\",\"1.3.132.0.35\":\"p521\"}')},23418:t=>{\"use strict\";t.exports=JSON.parse('{\"modp1\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff\"},\"modp2\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff\"},\"modp5\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff\"},\"modp14\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff\"},\"modp15\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff\"},\"modp16\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff\"},\"modp17\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff\"},\"modp18\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff\"}}')},40763:t=>{\"use strict\";t.exports={i8:\"6.6.1\"}},68675:t=>{\"use strict\";t.exports=JSON.parse('{\"2.16.840.1.101.3.4.1.1\":\"aes-128-ecb\",\"2.16.840.1.101.3.4.1.2\":\"aes-128-cbc\",\"2.16.840.1.101.3.4.1.3\":\"aes-128-ofb\",\"2.16.840.1.101.3.4.1.4\":\"aes-128-cfb\",\"2.16.840.1.101.3.4.1.21\":\"aes-192-ecb\",\"2.16.840.1.101.3.4.1.22\":\"aes-192-cbc\",\"2.16.840.1.101.3.4.1.23\":\"aes-192-ofb\",\"2.16.840.1.101.3.4.1.24\":\"aes-192-cfb\",\"2.16.840.1.101.3.4.1.41\":\"aes-256-ecb\",\"2.16.840.1.101.3.4.1.42\":\"aes-256-cbc\",\"2.16.840.1.101.3.4.1.43\":\"aes-256-ofb\",\"2.16.840.1.101.3.4.1.44\":\"aes-256-cfb\"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};(()=>{\"use strict\";r.r(n),r.d(n,{handleGetConnectedAccounts:()=>eu,handleOnboarding:()=>ru,handleSetDevMode:()=>hu,onCronjob:()=>su,onHomePage:()=>uu,onKeyringRequest:()=>iu,onRpcRequest:()=>nu,onUserInput:()=>au});var t={};r.r(t),r.d(t,{gk:()=>jr,dQ:()=>Xr,ci:()=>zr,bytesToNumberBE:()=>qr,ty:()=>Gr,eV:()=>Zr,n$:()=>tn,ql:()=>Wr,hexToBytes:()=>Vr,_t:()=>Ur,tL:()=>Kr,S5:()=>Jr,FF:()=>rn});class e extends TypeError{constructor(t,e){let r;const{message:n,explanation:i,...o}=t,{path:s}=t,a=0===s.length?n:`At path: ${s.join(\".\")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...e()])}}function i(t){return\"object\"==typeof t&&null!==t}function o(t){return\"symbol\"==typeof t?t.toString():\"string\"==typeof t?JSON.stringify(t):`${t}`}function s(t,e,r,n){if(!0===t)return;!1===t?t={}:\"string\"==typeof t&&(t={message:t});const{path:i,branch:s}=e,{type:a}=r,{refinement:u,message:h=`Expected a value of type \\`${a}\\`${u?` with refinement \\`${u}\\``:\"\"}, but received: \\`${o(n)}\\``}=t;return{value:n,type:a,refinement:u,key:i[i.length-1],path:i,branch:s,...t,message:h}}function*a(t,e,r,n){(function(t){return i(t)&&\"function\"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const i of t){const t=s(i,e,r,n);t&&(yield t)}}function*u(t,e,r={}){const{path:n=[],branch:o=[t],coerce:s=!1,mask:a=!1}=r,h={path:n,branch:o};if(s&&(t=e.coercer(t,h),a&&\"type\"!==e.type&&i(e.schema)&&i(t)&&!Array.isArray(t)))for(const r in t)void 0===e.schema[r]&&delete t[r];let c=\"valid\";for(const n of e.validator(t,h))n.explanation=r.message,c=\"not_valid\",yield[n,void 0];for(let[f,l,d]of e.entries(t,h)){const e=u(l,d,{path:void 0===f?n:[...n,f],branch:void 0===f?o:[...o,l],coerce:s,mask:a,message:r.message});for(const r of e)r[0]?(c=null===r[0].refinement||void 0===r[0].refinement?\"not_valid\":\"not_refined\",yield[r[0],void 0]):s&&(l=r[1],void 0===f?t=l:t instanceof Map?t.set(f,l):t instanceof Set?t.add(l):i(t)&&(void 0!==l||f in t)&&(t[f]=l))}if(\"not_valid\"!==c)for(const n of e.refiner(t,h))n.explanation=r.message,c=\"not_refined\",yield[n,void 0];\"valid\"===c&&(yield[void 0,t])}class h{constructor(t){const{type:e,schema:r,validator:n,refiner:i,coercer:o=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(t,e)=>a(n(t,e),e,this,t):()=>[],this.refiner=i?(t,e)=>a(i(t,e),e,this,t):()=>[]}assert(t,e){return c(t,this,e)}create(t,e){return f(t,this,e)}is(t){return l(t,this)}mask(t,e){return function(t,e,r){const n=d(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(t,this,e)}validate(t,e={}){return d(t,this,e)}}function c(t,e,r){const n=d(t,e,{message:r});if(n[0])throw n[0]}function f(t,e,r){const n=d(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function l(t,e){return!d(t,e)[0]}function d(t,r,n={}){const i=u(t,r,n),o=function(t){const{done:e,value:r}=t.next();return e?void 0:r}(i);if(o[0]){return[new e(o[0],(function*(){for(const t of i)t[0]&&(yield t[0])})),void 0]}return[void 0,o[1]]}function p(t,e){return new h({type:t,schema:null,validator:e})}function m(t){let e;return new h({type:\"lazy\",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator:(r,n)=>(e??(e=t()),e.validator(r,n)),coercer:(r,n)=>(e??(e=t()),e.coercer(r,n)),refiner:(r,n)=>(e??(e=t()),e.refiner(r,n))})}function g(){return p(\"any\",(()=>!0))}function y(t){return new h({type:\"array\",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${o(t)}`})}function b(){return p(\"boolean\",(t=>\"boolean\"==typeof t))}function v(t){const e={},r=t.map((t=>o(t))).join();for(const r of t)e[r]=r;return new h({type:\"enums\",schema:e,validator:e=>t.includes(e)||`Expected one of \\`${r}\\`, but received: ${o(e)}`})}function w(){return p(\"integer\",(t=>\"number\"==typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${o(t)}`))}function M(t){const e=o(t),r=typeof t;return new h({type:\"literal\",schema:\"string\"===r||\"number\"===r||\"boolean\"===r?t:null,validator:r=>r===t||`Expected the literal \\`${e}\\`, but received: ${o(r)}`})}function _(){return p(\"never\",(()=>!1))}function E(t){return new h({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function A(){return p(\"number\",(t=>\"number\"==typeof t&&!isNaN(t)||`Expected a number, but received: ${o(t)}`))}function S(t){const e=t?Object.keys(t):[],r=_();return new h({type:\"object\",schema:t??null,*entries(n){if(t&&i(n)){const i=new Set(Object.keys(n));for(const r of e)i.delete(r),yield[r,n[r],t[r]];for(const t of i)yield[t,n[t],r]}},validator:t=>i(t)||`Expected an object, but received: ${o(t)}`,coercer:t=>i(t)?{...t}:t})}function x(t){return new h({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function B(t,e){return new h({type:\"record\",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>i(t)||`Expected an object, but received: ${o(t)}`})}function T(){return p(\"string\",(t=>\"string\"==typeof t||`Expected a string, but received: ${o(t)}`))}function I(t){const e=t.map((t=>t.type)).join(\" | \");return new h({type:\"union\",schema:null,coercer(e){for(const r of t){const[t,n]=r.validate(e,{coerce:!0});if(!t)return n}return e},validator(r,n){const i=[];for(const e of t){const[...t]=u(r,e,n),[o]=t;if(!o?.[0])return[];for(const[e]of t)e&&i.push(e)}return[`Expected the value to satisfy a union of \\`${e}\\`, but received: ${o(r)}`,...i]}})}function k(){return p(\"unknown\",(()=>!0))}function P(t,e,r){return new h({...t,coercer:(n,i)=>l(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}const C=(t,e)=>Object.hasOwnProperty.call(t,e);var R;!function(t){t[t.Null=4]=\"Null\",t[t.Comma=1]=\"Comma\",t[t.Wrapper=1]=\"Wrapper\",t[t.True=4]=\"True\",t[t.False=5]=\"False\",t[t.Quote=1]=\"Quote\",t[t.Colon=1]=\"Colon\",t[t.Date=24]=\"Date\"}(R=R||(R={}));function O(t){return function(t){return function(t){return\"object\"==typeof t&&null!==t&&\"message\"in t}(t)&&\"string\"==typeof t.message?t.message:null==t?\"\":String(t)}(t).replace(/\\.$/u,\"\")}function L(t,e){return r=t,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}class N extends Error{constructor(t){super(t.message),this.code=\"ERR_ASSERTION\"}}const U=t=>S(t);function j({path:t,branch:e}){const r=t[t.length-1];return C(e[e.length-2],r)}function D(t){return new h({...t,type:`optional ${t.type}`,validator:(e,r)=>!j(r)||t.validator(e,r),refiner:(e,r)=>!j(r)||t.refiner(e,r)})}const z=I([M(null),b(),p(\"finite number\",(t=>l(t,A())&&Number.isFinite(t))),T(),y(m((()=>z))),B(T(),m((()=>z)))]),H=P(z,g(),(t=>(function(t,e,r=\"Assertion failed\",n=N){try{c(t,e)}catch(t){throw L(n,`${r}: ${O(t)}.`)}}(t,z),JSON.parse(JSON.stringify(t,((t,e)=>{if(\"__proto__\"!==t&&\"constructor\"!==t)return e}))))));const F=M(\"2.0\"),$=E(I([A(),T()])),V=U({code:w(),message:T(),data:D(H),stack:D(T())}),q=I([B(T(),H),y(H)]);U({id:$,jsonrpc:F,method:T(),params:D(q)}),U({jsonrpc:F,method:T(),params:D(q)});S({id:$,jsonrpc:F,result:x(k()),error:x(V)});const G=U({id:$,jsonrpc:F,result:H}),K=U({id:$,jsonrpc:F,error:V});I([G,K]);function J(t){return S(t)}function W(t){return t.path[t.path.length-1]in t.branch[t.branch.length-2]}function Z(t){return new h({...t,validator:(e,r)=>!W(r)||t.validator(e,r),refiner:(e,r)=>!W(r)||t.refiner(e,r)})}function X(t,e){return p(t,(t=>\"string\"==typeof t&&e.test(t)))}const Y=X(\"UuidV4\",/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu),Q=p(\"Url\",(t=>{try{const e=new URL(t);return\"http:\"===e.protocol||\"https:\"===e.protocol}catch{return!1}})),tt=X(\"StringNumber\",/^\\d+(\\.\\d+)?$/u);var et,rt,nt;!function(t){t.Eoa=\"eip155:eoa\",t.Erc4337=\"eip155:erc4337\"}(et||(et={})),function(t){t.P2wpkh=\"bip122:p2wpkh\"}(rt||(rt={})),function(t){t.DataAccount=\"solana:data-account\"}(nt||(nt={}));const it=J({id:Y,type:v([`${et.Eoa}`,`${et.Erc4337}`,`${rt.P2wpkh}`,`${nt.DataAccount}`]),address:T(),options:B(T(),H),methods:y(T())}),ot=J({amount:tt,unit:T()}),st=X(\"CaipAssetType\",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u);X(\"CaipAssetId\",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u);B(T(),H);const at=J({id:Y,scope:T(),account:Y,request:J({method:T(),params:Z(I([y(H),B(T(),H)]))})});I([J({pending:M(!0),redirect:Z(J({message:Z(T()),url:Z(T())}))}),J({pending:M(!1),result:H})]);function ut(t,e){return ht(t,\"pattern\",(r=>e.test(r)||`Expected a ${t.type} matching \\`/${e.source}/\\` but received \"${r}\"`))}function ht(t,e,r){return new h({...t,*refiner(n,i){yield*t.refiner(n,i);const o=a(r(n,i),i,t,n);for(const t of o)yield{...t,refinement:e}}})}var ct=r(66534);const ft=ht(T(),\"BtcP2wpkhAddressStruct\",(t=>{try{ct.gW.decode(t)}catch(t){return new Error(`Could not decode P2WPKH address: ${t.message}`)}return!0}));var lt;!function(t){t.SendBitcoin=\"sendBitcoin\"}(lt||(lt={}));const dt=J({...it.schema,address:ft,type:M(`${rt.P2wpkh}`),methods:y(v([`${lt.SendBitcoin}`]))}),pt=X(\"EthBytes\",/^0x[0-9a-f]*$/iu),mt=X(\"EthAddress\",/^0x[0-9a-f]{40}$/iu),gt=X(\"EthUint256\",/^0x([1-9a-f][0-9a-f]*|0)$/iu);var yt;!function(t){t.PersonalSign=\"personal_sign\",t.Sign=\"eth_sign\",t.SignTransaction=\"eth_signTransaction\",t.SignTypedDataV1=\"eth_signTypedData_v1\",t.SignTypedDataV3=\"eth_signTypedData_v3\",t.SignTypedDataV4=\"eth_signTypedData_v4\",t.PrepareUserOperation=\"eth_prepareUserOperation\",t.PatchUserOperation=\"eth_patchUserOperation\",t.SignUserOperation=\"eth_signUserOperation\"}(yt||(yt={}));const bt=J({...it.schema,address:mt,type:M(`${et.Eoa}`),methods:y(v([`${yt.PersonalSign}`,`${yt.Sign}`,`${yt.SignTransaction}`,`${yt.SignTypedDataV1}`,`${yt.SignTypedDataV3}`,`${yt.SignTypedDataV4}`]))}),vt=J({...it.schema,address:mt,type:M(`${et.Erc4337}`),methods:y(v([`${yt.PersonalSign}`,`${yt.Sign}`,`${yt.SignTypedDataV1}`,`${yt.SignTypedDataV3}`,`${yt.SignTypedDataV4}`,`${yt.PrepareUserOperation}`,`${yt.PatchUserOperation}`,`${yt.SignUserOperation}`]))});J({sender:mt,nonce:gt,initCode:pt,callData:pt,callGasLimit:gt,verificationGasLimit:gt,preVerificationGas:gt,maxFeePerGas:gt,maxPriorityFeePerGas:gt,paymasterAndData:pt,signature:pt}),J({to:mt,value:gt,data:pt}),J({nonce:gt,initCode:pt,callData:pt,gasLimits:Z(J({callGasLimit:gt,verificationGasLimit:gt,preVerificationGas:gt})),dummyPaymasterAndData:pt,dummySignature:pt,bundlerUrl:Q}),J({paymasterAndData:pt,callGasLimit:Z(gt),verificationGasLimit:Z(gt),preVerificationGas:Z(gt)});const wt=X(\"SolAddress\",/^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu);var Mt;!function(t){t.SendAndConfirmTransaction=\"sendAndConfirmTransaction\"}(Mt||(Mt={}));const _t=J({...it.schema,address:wt,type:M(`${nt.DataAccount}`),methods:y(v([`${Mt.SendAndConfirmTransaction}`]))});var Et,At;!function(t){t.AccountCreated=\"notify:accountCreated\",t.AccountUpdated=\"notify:accountUpdated\",t.AccountDeleted=\"notify:accountDeleted\",t.RequestApproved=\"notify:requestApproved\",t.RequestRejected=\"notify:requestRejected\"}(Et||(Et={})),function(t){t.ListAccounts=\"keyring_listAccounts\",t.GetAccount=\"keyring_getAccount\",t.CreateAccount=\"keyring_createAccount\",t.GetAccountBalances=\"keyring_getAccountBalances\",t.FilterAccountChains=\"keyring_filterAccountChains\",t.UpdateAccount=\"keyring_updateAccount\",t.DeleteAccount=\"keyring_deleteAccount\",t.ExportAccount=\"keyring_exportAccount\",t.ListRequests=\"keyring_listRequests\",t.GetRequest=\"keyring_getRequest\",t.SubmitRequest=\"keyring_submitRequest\",t.ApproveRequest=\"keyring_approveRequest\",t.RejectRequest=\"keyring_rejectRequest\"}(At||(At={}));const St={jsonrpc:M(\"2.0\"),id:I([T(),A(),M(null)])},xt=J({...St,method:M(\"keyring_listAccounts\")}),Bt=(y(it),J({...St,method:M(\"keyring_getAccount\"),params:J({id:Y})})),Tt=J({...St,method:M(\"keyring_createAccount\"),params:J({options:B(T(),H)})}),It=J({...St,method:M(`${At.GetAccountBalances}`),params:J({id:Y,assets:y(st)})}),kt=(B(st,ot),J({...St,method:M(\"keyring_filterAccountChains\"),params:J({id:Y,chains:y(T())})})),Pt=(y(T()),J({...St,method:M(\"keyring_updateAccount\"),params:J({account:it})})),Ct=(M(null),J({...St,method:M(\"keyring_deleteAccount\"),params:J({id:Y})})),Rt=(M(null),J({...St,method:M(\"keyring_exportAccount\"),params:J({id:Y})})),Ot=J({...St,method:M(\"keyring_listRequests\")}),Lt=(y(at),J({...St,method:M(\"keyring_getRequest\"),params:J({id:Y})})),Nt=J({...St,method:M(\"keyring_submitRequest\"),params:at}),Ut=J({...St,method:M(\"keyring_approveRequest\"),params:J({id:Y,data:B(T(),H)})}),jt=(M(null),J({...St,method:M(\"keyring_rejectRequest\"),params:J({id:Y})})),Dt=(M(null),J({method:M(`${Et.AccountCreated}`),params:J({account:it,accountNameSuggestion:Z(T()),displayConfirmation:Z(b())})}),J({method:M(`${Et.AccountUpdated}`),params:J({account:it})}),J({method:M(`${Et.AccountDeleted}`),params:J({id:Y})}),J({method:M(`${Et.RequestApproved}`),params:J({id:Y,result:H})}),J({method:M(`${Et.RequestRejected}`),params:J({id:Y})}),J({metadata:J({name:T(),nameLastUpdatedAt:Z(A()),snap:Z(J({id:T(),enabled:b(),name:T()})),lastSelected:Z(A()),importTime:A(),keyring:J({type:T()})})})),zt=J({...bt.schema,...Dt.schema}),Ht=J({...vt.schema,...Dt.schema}),Ft=J({...dt.schema,...Dt.schema}),$t=J({..._t.schema,...Dt.schema}),Vt=(et.Eoa,et.Erc4337,rt.P2wpkh,nt.DataAccount,J({...it.schema,...Dt.schema}),J({jsonrpc:M(\"2.0\"),id:I([T(),A(),M(null)]),method:T(),params:Z(I([y(H),B(T(),H)]))})),qt={randomUUID:\"undefined\"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Gt;const Kt=new Uint8Array(16);function Jt(){if(!Gt&&(Gt=\"undefined\"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Gt))throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");return Gt(Kt)}const Wt=[];for(let t=0;t<256;++t)Wt.push((t+256).toString(16).slice(1));function Zt(t,e=0){return Wt[t[e+0]]+Wt[t[e+1]]+Wt[t[e+2]]+Wt[t[e+3]]+\"-\"+Wt[t[e+4]]+Wt[t[e+5]]+\"-\"+Wt[t[e+6]]+Wt[t[e+7]]+\"-\"+Wt[t[e+8]]+Wt[t[e+9]]+\"-\"+Wt[t[e+10]]+Wt[t[e+11]]+Wt[t[e+12]]+Wt[t[e+13]]+Wt[t[e+14]]+Wt[t[e+15]]}const Xt=function(t,e,r){if(qt.randomUUID&&!e&&!t)return qt.randomUUID();const n=(t=t||{}).random||(t.rng||Jt)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=n[t];return e}return Zt(n)};var Yt,Qt=function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)};Yt=new WeakMap,new WeakSet;new WeakMap,new WeakMap;class te extends Error{constructor(t){super(`Method not supported: ${t}`)}}async function ee(t,e){try{return await async function(t,e){switch(c(e,Vt),e.method){case`${At.ListAccounts}`:return c(e,xt),t.listAccounts();case`${At.GetAccount}`:return c(e,Bt),t.getAccount(e.params.id);case`${At.CreateAccount}`:return c(e,Tt),t.createAccount(e.params.options);case`${At.GetAccountBalances}`:if(void 0===t.getAccountBalances)throw new te(e.method);return c(e,It),t.getAccountBalances(e.params.id,e.params.assets);case`${At.FilterAccountChains}`:return c(e,kt),t.filterAccountChains(e.params.id,e.params.chains);case`${At.UpdateAccount}`:return c(e,Pt),t.updateAccount(e.params.account);case`${At.DeleteAccount}`:return c(e,Ct),t.deleteAccount(e.params.id);case`${At.ExportAccount}`:if(void 0===t.exportAccount)throw new te(e.method);return c(e,Rt),t.exportAccount(e.params.id);case`${At.ListRequests}`:if(void 0===t.listRequests)throw new te(e.method);return c(e,Ot),t.listRequests();case`${At.GetRequest}`:if(void 0===t.getRequest)throw new te(e.method);return c(e,Lt),t.getRequest(e.params.id);case`${At.SubmitRequest}`:return c(e,Nt),t.submitRequest(e.params);case`${At.ApproveRequest}`:if(void 0===t.approveRequest)throw new te(e.method);return c(e,Ut),t.approveRequest(e.params.id,e.params.data);case`${At.RejectRequest}`:if(void 0===t.rejectRequest)throw new te(e.method);return c(e,jt),t.rejectRequest(e.params.id);default:throw new te(e.method)}}(t,e)}catch(t){const e=t instanceof Error&&\"string\"==typeof t.message?t.message:\"An unknown error occurred while handling the keyring request\";throw new Error(e)}}async function re(t,e,r){await t.request({method:\"snap_manageAccounts\",params:{method:e,params:{...r}}})}function ne(t){return Boolean(t)&&\"object\"==typeof t&&!Array.isArray(t)}const ie=(t,e)=>Object.hasOwnProperty.call(t,e);var oe;!function(t){t[t.Null=4]=\"Null\",t[t.Comma=1]=\"Comma\",t[t.Wrapper=1]=\"Wrapper\",t[t.True=4]=\"True\",t[t.False=5]=\"False\",t[t.Quote=1]=\"Quote\",t[t.Colon=1]=\"Colon\",t[t.Date=24]=\"Date\"}(oe=oe||(oe={}));var se=r(77847);function ae(t){return function(t){return function(t){return\"object\"==typeof t&&null!==t&&\"message\"in t}(t)&&\"string\"==typeof t.message?t.message:null==t?\"\":String(t)}(t).replace(/\\.$/u,\"\")}function ue(t,e){return r=t,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}class he extends Error{constructor(t){super(t.message),this.code=\"ERR_ASSERTION\"}}function ce(t,e=\"Assertion failed.\",r=he){if(!t){if(e instanceof Error)throw e;throw ue(r,e)}}const fe=t=>S(t);function le({path:t,branch:e}){const r=t[t.length-1];return ie(e[e.length-2],r)}function de(t){return new h({...t,type:`optional ${t.type}`,validator:(e,r)=>!le(r)||t.validator(e,r),refiner:(e,r)=>!le(r)||t.refiner(e,r)})}function pe(t){if(null===t||\"boolean\"==typeof t||\"string\"==typeof t)return!0;if(\"number\"==typeof t&&Number.isFinite(t))return!0;if(\"object\"==typeof t){let e=!0;if(Array.isArray(t)){for(let r=0;r<t.length;r++)if(!pe(t[r])){e=!1;break}return e}const r=Object.entries(t);for(let t=0;t<r.length;t++)if(\"string\"!=typeof r[t][0]||!pe(r[t][1])){e=!1;break}return e}return!1}const me=p(\"JSON\",(t=>pe(t))),ge=P(me,g(),(t=>(function(t,e,r=\"Assertion failed\",n=he){try{c(t,e)}catch(t){throw ue(n,`${r}: ${ae(t)}.`)}}(t,me),JSON.parse(JSON.stringify(t,((t,e)=>{if(\"__proto__\"!==t&&\"constructor\"!==t)return e}))))));function ye(t){try{return function(t){f(t,ge)}(t),!0}catch{return!1}}const be=M(\"2.0\"),ve=E(I([A(),T()])),we=fe({code:w(),message:T(),data:de(ge),stack:de(T())}),Me=I([B(T(),ge),y(ge)]);fe({id:ve,jsonrpc:be,method:T(),params:de(Me)}),fe({jsonrpc:be,method:T(),params:de(Me)});S({id:ve,jsonrpc:be,result:x(k()),error:x(we)});const _e=fe({id:ve,jsonrpc:be,result:ge}),Ee=fe({id:ve,jsonrpc:be,error:we});I([_e,Ee]);const Ae={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},Se={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},xe={\"-32700\":{standard:\"JSON RPC 2.0\",message:\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"},\"-32600\":{standard:\"JSON RPC 2.0\",message:\"The JSON sent is not a valid Request object.\"},\"-32601\":{standard:\"JSON RPC 2.0\",message:\"The method does not exist / is not available.\"},\"-32602\":{standard:\"JSON RPC 2.0\",message:\"Invalid method parameter(s).\"},\"-32603\":{standard:\"JSON RPC 2.0\",message:\"Internal JSON-RPC error.\"},\"-32000\":{standard:\"EIP-1474\",message:\"Invalid input.\"},\"-32001\":{standard:\"EIP-1474\",message:\"Resource not found.\"},\"-32002\":{standard:\"EIP-1474\",message:\"Resource unavailable.\"},\"-32003\":{standard:\"EIP-1474\",message:\"Transaction rejected.\"},\"-32004\":{standard:\"EIP-1474\",message:\"Method not supported.\"},\"-32005\":{standard:\"EIP-1474\",message:\"Request limit exceeded.\"},4001:{standard:\"EIP-1193\",message:\"User rejected the request.\"},4100:{standard:\"EIP-1193\",message:\"The requested account and/or method has not been authorized by the user.\"},4200:{standard:\"EIP-1193\",message:\"The requested method is not supported by this Ethereum provider.\"},4900:{standard:\"EIP-1193\",message:\"The provider is disconnected from all chains.\"},4901:{standard:\"EIP-1193\",message:\"The provider is disconnected from the specified chain.\"}},Be=Ae.internal,Te=\"Unspecified error message. This is a bug, please report it.\",Ie=(ke(Be),\"Unspecified server error.\");function ke(t,e=Te){if(function(t){return Number.isInteger(t)}(t)){const e=t.toString();if(ie(xe,e))return xe[e].message;if(function(t){return t>=-32099&&t<=-32e3}(t))return Ie}return e}function Pe(t){return Array.isArray(t)?t.map((t=>ye(t)?t:ne(t)?Ce(t):null)):ne(t)?Ce(t):ye(t)?t:null}function Ce(t){return Object.getOwnPropertyNames(t).reduce(((e,r)=>{const n=t[r];return ye(n)&&(e[r]=n),e}),{})}const Re=function(t){return t?.__esModule?t.default:t}(se);class Oe extends Error{constructor(t,e,r){if(!Number.isInteger(t))throw new Error('\"code\" must be an integer.');if(!e||\"string\"!=typeof e)throw new Error('\"message\" must be a non-empty string.');!function(t){return ne(t)&&ie(t,\"cause\")&&ne(t.cause)}(r)?super(e):(super(e,{cause:r.cause}),ie(this,\"cause\")||Object.assign(this,{cause:r.cause})),void 0!==r&&(this.data=r),this.code=t}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data,function(t){if(\"object\"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}}(this.data)&&(t.data.cause=Pe(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return Re(this.serialize(),Ne,2)}}class Le extends Oe{constructor(t,e,r){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('\"code\" must be an integer such that: 1000 <= code <= 4999');super(t,e,r)}}function Ne(t,e){if(\"[Circular]\"!==e)return e}const Ue=t=>Qe(Ae.parse,t),je=t=>Qe(Ae.invalidRequest,t),De=t=>Qe(Ae.invalidParams,t),ze=t=>Qe(Ae.methodNotFound,t),He=t=>Qe(Ae.internal,t),Fe=t=>Qe(Ae.invalidInput,t),$e=t=>Qe(Ae.resourceNotFound,t),Ve=t=>Qe(Ae.resourceUnavailable,t),qe=t=>Qe(Ae.transactionRejected,t),Ge=t=>Qe(Ae.methodNotSupported,t),Ke=t=>Qe(Ae.limitExceeded,t),Je=t=>tr(Se.userRejectedRequest,t),We=t=>tr(Se.unauthorized,t),Ze=t=>tr(Se.unsupportedMethod,t),Xe=t=>tr(Se.disconnected,t),Ye=t=>tr(Se.chainDisconnected,t);function Qe(t,e){const[r,n]=er(e);return new Oe(t,r??ke(t),n)}function tr(t,e){const[r,n]=er(e);return new Le(t,r??ke(t),n)}function er(t){if(t){if(\"string\"==typeof t)return[t];if(\"object\"==typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&\"string\"!=typeof e)throw new Error(\"Must specify string message.\");return[e??void 0,r]}}return[]}function rr(t){return ne(t)&&ie(t,\"data\")&&\"object\"==typeof t.data&&null!==t.data&&ye(t.data)&&!Array.isArray(t.data)?t.data:{}}var nr,ir,or,sr,ar=function(t,e,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!i:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(t,r):i?i.value=r:e.set(t,r),r},ur=function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)};class hr extends Error{constructor(t,e={}){const r=function(t){return ne(t)&&ie(t,\"message\")&&\"string\"==typeof t.message?t.message:String(t)}(t);super(r),nr.set(this,void 0),ir.set(this,void 0),or.set(this,void 0),sr.set(this,void 0),ar(this,ir,r,\"f\"),ar(this,nr,function(t){return ne(t)&&ie(t,\"code\")&&\"number\"==typeof t.code&&Number.isInteger(t.code)?t.code:-32603}(t),\"f\");const n={...rr(t),...e};Object.keys(n).length>0&&ar(this,or,n,\"f\"),ar(this,sr,super.stack,\"f\")}get name(){return\"SnapError\"}get code(){return ur(this,nr,\"f\")}get message(){return ur(this,ir,\"f\")}get data(){return ur(this,or,\"f\")}get stack(){return ur(this,sr,\"f\")}toJSON(){return{code:-31002,message:\"Snap Error\",data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}function cr(t){return class extends hr{constructor(e,r){if(\"object\"==typeof e){const r=t();return void super({code:r.code,message:r.message,data:e})}const n=t(e);super({code:n.code,message:n.message,data:r})}}}nr=new WeakMap,ir=new WeakMap,or=new WeakMap,sr=new WeakMap;cr(He),cr(Fe),cr(De),cr(je),cr(Ke);const fr=cr(ze),lr=(cr(Ge),cr(Ue),cr($e),cr(Ve),cr(qe),cr(Ye),cr(Xe),cr(We)),dr=(cr(Ze),cr(Je),{dev:!1}),pr=dr;function mr(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function gr(t,...e){if(!((r=t)instanceof Uint8Array||null!=r&&\"object\"==typeof r&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function yr(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");mr(t.outputLen),mr(t.blockLen)}function br(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function vr(t,e){gr(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const wr=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0;const Mr=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),_r=(t,e)=>t<<32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function Er(t){return\"string\"==typeof t&&(t=function(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),gr(t),t}class Ar{clone(){return this._cloneInto()}}function Sr(t=32){if(wr&&\"function\"==typeof wr.getRandomValues)return wr.getRandomValues(new Uint8Array(t));throw new Error(\"crypto.getRandomValues must be defined\")}const xr=(t,e,r)=>t&e^t&r^e&r;class Br extends Ar{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Mr(this.buffer)}update(t){br(this);const{view:e,buffer:r,blockLen:n}=this,i=(t=Er(t)).length;for(let o=0;o<i;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(e,0),this.pos=0);else{const e=Mr(t);for(;n<=i-o;o+=n)this.process(e,o)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){br(this),vr(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let t=o;t<n;t++)e[t]=0;!function(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=Mr(t),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const u=a/4,h=this.get();if(u>h.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t<u;t++)s.setUint32(4*t,h[t],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}const Tr=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ir=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),kr=new Uint32Array(64);class Pr extends Br{constructor(){super(64,32,8,!1),this.A=0|Ir[0],this.B=0|Ir[1],this.C=0|Ir[2],this.D=0|Ir[3],this.E=0|Ir[4],this.F=0|Ir[5],this.G=0|Ir[6],this.H=0|Ir[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)kr[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=kr[t-15],r=kr[t-2],n=_r(e,7)^_r(e,18)^e>>>3,i=_r(r,17)^_r(r,19)^r>>>10;kr[t]=i+kr[t-7]+n+kr[t-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:u,H:h}=this;for(let t=0;t<64;t++){const e=h+(_r(s,6)^_r(s,11)^_r(s,25))+((c=s)&a^~c&u)+Tr[t]+kr[t]|0,f=(_r(r,2)^_r(r,13)^_r(r,22))+xr(r,n,i)|0;h=u,u=a,a=s,s=o+e|0,o=i,i=n,n=r,r=e+f|0}var c;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,n,i,o,s,a,u,h)}roundClean(){kr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Cr=function(t){const e=e=>t().update(Er(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}((()=>new Pr));class Rr extends Ar{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,yr(t);const r=Er(e);if(this.iHash=t.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t<i.length;t++)i[t]^=54;this.iHash.update(i),this.oHash=t.create();for(let t=0;t<i.length;t++)i[t]^=106;this.oHash.update(i),i.fill(0)}update(t){return br(this),this.iHash.update(t),this}digestInto(t){br(this),gr(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Or=(t,e,r)=>new Rr(t,e).update(r).digest();Or.create=(t,e)=>new Rr(t,e);const Lr=BigInt(1),Nr=BigInt(2);function Ur(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function jr(t){if(!Ur(t))throw new Error(\"Uint8Array expected\")}const Dr=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function zr(t){jr(t);let e=\"\";for(let r=0;r<t.length;r++)e+=Dr[t[r]];return e}function Hr(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);return BigInt(\"\"===t?\"0\":`0x${t}`)}const Fr={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function $r(t){return t>=Fr._0&&t<=Fr._9?t-Fr._0:t>=Fr._A&&t<=Fr._F?t-(Fr._A-10):t>=Fr._a&&t<=Fr._f?t-(Fr._a-10):void 0}function Vr(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=$r(t.charCodeAt(i)),o=$r(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n}function qr(t){return Hr(zr(t))}function Gr(t){return jr(t),Hr(zr(Uint8Array.from(t).reverse()))}function Kr(t,e){return Vr(t.toString(16).padStart(2*e,\"0\"))}function Jr(t,e){return Kr(t,e).reverse()}function Wr(t,e,r){let n;if(\"string\"==typeof e)try{n=Vr(e)}catch(r){throw new Error(`${t} must be valid hex string, got \"${e}\". Cause: ${r}`)}else{if(!Ur(e))throw new Error(`${t} must be hex string or Uint8Array`);n=Uint8Array.from(e)}const i=n.length;if(\"number\"==typeof r&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function Zr(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];jr(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}const Xr=t=>(Nr<<BigInt(t-1))-Lr,Yr=t=>new Uint8Array(t),Qr=t=>Uint8Array.from(t);function tn(t,e,r){if(\"number\"!=typeof t||t<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof e||e<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=Yr(t),i=Yr(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...t)=>r(i,n,...t),u=(t=Yr())=>{i=a(Qr([0]),t),n=a(),0!==t.length&&(i=a(Qr([1]),t),n=a())},h=()=>{if(o++>=1e3)throw new Error(\"drbg: tried 1000 values\");let t=0;const r=[];for(;t<e;){n=a();const e=n.slice();r.push(e),t+=n.length}return Zr(...r)};return(t,e)=>{let r;for(s(),u(t);!(r=e(h()));)u();return s(),r}}const en={bigint:t=>\"bigint\"==typeof t,function:t=>\"function\"==typeof t,boolean:t=>\"boolean\"==typeof t,string:t=>\"string\"==typeof t,stringOrUint8Array:t=>\"string\"==typeof t||Ur(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>\"function\"==typeof t&&Number.isSafeInteger(t.outputLen)};function rn(t,e,r={}){const n=(e,r,n)=>{const i=en[r];if(\"function\"!=typeof i)throw new Error(`Invalid validator \"${r}\", expected function`);const o=t[e];if(!(n&&void 0===o||i(o,t)))throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(const[t,r]of Object.entries(e))n(t,r,!1);for(const[t,e]of Object.entries(r))n(t,e,!0);return t}const nn=BigInt(0),on=BigInt(1),sn=BigInt(2),an=BigInt(3),un=BigInt(4),hn=BigInt(5),cn=BigInt(8);BigInt(9),BigInt(16);function fn(t,e){const r=t%e;return r>=nn?r:e+r}function ln(t,e,r){if(r<=nn||e<nn)throw new Error(\"Expected power/modulo > 0\");if(r===on)return nn;let n=on;for(;e>nn;)e&on&&(n=n*t%r),t=t*t%r,e>>=on;return n}function dn(t,e,r){let n=t;for(;e-- >nn;)n*=n,n%=r;return n}function pn(t,e){if(t===nn||e<=nn)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=fn(t,e),n=e,i=nn,o=on,s=on,a=nn;for(;r!==nn;){const t=n/r,e=n%r,u=i-s*t,h=o-a*t;n=r,r=e,i=s,o=a,s=u,a=h}if(n!==on)throw new Error(\"invert: does not exist\");return fn(i,e)}function mn(t){if(t%un===an){const e=(t+on)/un;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(t%cn===hn){const e=(t-hn)/cn;return function(t,r){const n=t.mul(r,sn),i=t.pow(n,e),o=t.mul(r,i),s=t.mul(t.mul(o,sn),i),a=t.mul(o,t.sub(s,t.ONE));if(!t.eql(t.sqr(a),r))throw new Error(\"Cannot find square root\");return a}}return function(t){const e=(t-on)/sn;let r,n,i;for(r=t-on,n=0;r%sn===nn;r/=sn,n++);for(i=sn;i<t&&ln(i,e,t)!==t-on;i++);if(1===n){const e=(t+on)/un;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const o=(r+on)/sn;return function(t,s){if(t.pow(s,e)===t.neg(t.ONE))throw new Error(\"Cannot find square root\");let a=n,u=t.pow(t.mul(t.ONE,i),r),h=t.pow(s,o),c=t.pow(s,r);for(;!t.eql(c,t.ONE);){if(t.eql(c,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(c);e<a&&!t.eql(r,t.ONE);e++)r=t.sqr(r);const r=t.pow(u,on<<BigInt(a-e-1));u=t.sqr(r),h=t.mul(h,r),c=t.mul(c,u),a=e}return h}}(t)}const gn=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function yn(t,e){const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function bn(t){if(\"bigint\"!=typeof t)throw new Error(\"field order must be bigint\");const e=t.toString(2).length;return Math.ceil(e/8)}function vn(t){const e=bn(t);return e+Math.ceil(e/2)}const wn=BigInt(0),Mn=BigInt(1);function _n(t){return function(t){const e=gn.reduce(((t,e)=>(t[e]=\"function\",t)),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});rn(t,e)}(t.Fp),rn(t,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...yn(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const{bytesToNumberBE:En,hexToBytes:An}=t,Sn={Err:class extends Error{constructor(t=\"\"){super(t)}},_parseInt(t){const{Err:e}=Sn;if(t.length<2||2!==t[0])throw new e(\"Invalid signature integer tag\");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e(\"Invalid signature integer: wrong length\");if(128&n[0])throw new e(\"Invalid signature integer: negative\");if(0===n[0]&&!(128&n[1]))throw new e(\"Invalid signature integer: unnecessary leading zero\");return{d:En(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=Sn,r=\"string\"==typeof t?An(t):t;jr(r);let n=r.length;if(n<2||48!=r[0])throw new e(\"Invalid signature tag\");if(r[1]!==n-2)throw new e(\"Invalid signature: incorrect length\");const{d:i,l:o}=Sn._parseInt(r.subarray(2)),{d:s,l:a}=Sn._parseInt(o);if(a.length)throw new e(\"Invalid signature: left bytes after parsing\");return{r:i,s}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?\"00\"+t:t,r=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}},xn=BigInt(0),Bn=BigInt(1),Tn=(BigInt(2),BigInt(3));BigInt(4);function In(t){const e=function(t){const e=_n(t);rn(e,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...e})}(t),{Fp:r}=e,n=e.toBytes||((t,e,n)=>{const i=e.toAffine();return Zr(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=e.fromBytes||(t=>{const e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function o(t){const{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error(\"bad generator point: equation left != right\");function s(t){return\"bigint\"==typeof t&&xn<t&&t<e.n}function a(t){if(!s(t))throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\")}function u(t){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:i,n:o}=e;if(r&&\"bigint\"!=typeof t){if(Ur(t)&&(t=zr(t)),\"string\"!=typeof t||!r.includes(t.length))throw new Error(\"Invalid key\");t=t.padStart(2*n,\"0\")}let s;try{s=\"bigint\"==typeof t?t:qr(Wr(\"private key\",t,n))}catch(e){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof t}`)}return i&&(s=fn(s,o)),a(s),s}const h=new Map;function c(t){if(!(t instanceof f))throw new Error(\"ProjectivePoint expected\")}class f{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw new Error(\"x required\");if(null==e||!r.isValid(e))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(t){const{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw new Error(\"invalid affine point\");if(t instanceof f)throw new Error(\"projective point not allowed\");const i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?f.ZERO:new f(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(f.fromAffine)}static fromHex(t){const e=f.fromAffine(i(Wr(\"pointHex\",t)));return e.assertValidity(),e}static fromPrivateKey(t){return f.BASE.multiply(u(t))}_setWindowSize(t){this._WINDOW_SIZE=t,h.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const i=r.sqr(n),s=o(t);if(!r.eql(i,s))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw new Error(\"Field doesn't support isOdd\")}equals(t){c(t);const{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,u=r.eql(r.mul(e,a),r.mul(o,i)),h=r.eql(r.mul(n,a),r.mul(s,i));return u&&h}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:t,b:n}=e,i=r.mul(n,Tn),{px:o,py:s,pz:a}=this;let u=r.ZERO,h=r.ZERO,c=r.ZERO,l=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),m=r.mul(o,s);return m=r.add(m,m),c=r.mul(o,a),c=r.add(c,c),u=r.mul(t,c),h=r.mul(i,p),h=r.add(u,h),u=r.sub(d,h),h=r.add(d,h),h=r.mul(u,h),u=r.mul(m,u),c=r.mul(i,c),p=r.mul(t,p),m=r.sub(l,p),m=r.mul(t,m),m=r.add(m,c),c=r.add(l,l),l=r.add(c,l),l=r.add(l,p),l=r.mul(l,m),h=r.add(h,l),p=r.mul(s,a),p=r.add(p,p),l=r.mul(p,m),u=r.sub(u,l),c=r.mul(p,d),c=r.add(c,c),c=r.add(c,c),new f(u,h,c)}add(t){c(t);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=t;let h=r.ZERO,l=r.ZERO,d=r.ZERO;const p=e.a,m=r.mul(e.b,Tn);let g=r.mul(n,s),y=r.mul(i,a),b=r.mul(o,u),v=r.add(n,i),w=r.add(s,a);v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(n,o);let M=r.add(s,u);return w=r.mul(w,M),M=r.add(g,b),w=r.sub(w,M),M=r.add(i,o),h=r.add(a,u),M=r.mul(M,h),h=r.add(y,b),M=r.sub(M,h),d=r.mul(p,w),h=r.mul(m,b),d=r.add(h,d),h=r.sub(y,d),d=r.add(y,d),l=r.mul(h,d),y=r.add(g,g),y=r.add(y,g),b=r.mul(p,b),w=r.mul(m,w),y=r.add(y,b),b=r.sub(g,b),b=r.mul(p,b),w=r.add(w,b),g=r.mul(y,w),l=r.add(l,g),g=r.mul(M,w),h=r.mul(v,h),h=r.sub(h,g),g=r.mul(v,y),d=r.mul(M,d),d=r.add(d,g),new f(h,l,d)}subtract(t){return this.add(t.negate())}is0(){return this.equals(f.ZERO)}wNAF(t){return d.wNAFCached(this,h,t,(t=>{const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(f.fromAffine)}))}multiplyUnsafe(t){const n=f.ZERO;if(t===xn)return n;if(a(t),t===Bn)return this;const{endo:i}=e;if(!i)return d.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:u,k2:h}=i.splitScalar(t),c=n,l=n,p=this;for(;s>xn||h>xn;)s&Bn&&(c=c.add(p)),h&Bn&&(l=l.add(p)),p=p.double(),s>>=Bn,h>>=Bn;return o&&(c=c.negate()),u&&(l=l.negate()),l=new f(r.mul(l.px,i.beta),l.py,l.pz),c.add(l)}multiply(t){a(t);let n,i,o=t;const{endo:s}=e;if(s){const{k1neg:t,k1:e,k2neg:a,k2:u}=s.splitScalar(o);let{p:h,f:c}=this.wNAF(e),{p:l,f:p}=this.wNAF(u);h=d.constTimeNegate(t,h),l=d.constTimeNegate(a,l),l=new f(r.mul(l.px,s.beta),l.py,l.pz),n=h.add(l),i=c.add(p)}else{const{p:t,f:e}=this.wNAF(o);n=t,i=e}return f.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){const n=f.BASE,i=(t,e)=>e!==xn&&e!==Bn&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){const{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));const s=r.mul(e,t),a=r.mul(n,t),u=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error(\"invZ was invalid\");return{x:s,y:a}}isTorsionFree(){const{h:t,isTorsionFree:r}=e;if(t===Bn)return!0;if(r)return r(f,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:t,clearCofactor:r}=e;return t===Bn?this:r?r(f,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),n(f,this,t)}toHex(t=!0){return zr(this.toRawBytes(t))}}f.BASE=new f(e.Gx,e.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const l=e.nBitLength,d=function(t,e){const r=(t,e)=>{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>wn;)r&Mn&&(n=n.add(i)),i=i.double(),r>>=Mn;return n},precomputeWindow(t,e){const{windows:r,windowSize:i}=n(e),o=[];let s=t,a=s;for(let t=0;t<r;t++){a=s,o.push(a);for(let t=1;t<i;t++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,i,o){const{windows:s,windowSize:a}=n(e);let u=t.ZERO,h=t.BASE;const c=BigInt(2**e-1),f=2**e,l=BigInt(e);for(let t=0;t<s;t++){const e=t*a;let n=Number(o&c);o>>=l,n>a&&(n-=f,o+=Mn);const s=e,d=e+Math.abs(n)-1,p=t%2!=0,m=n<0;0===n?h=h.add(r(p,i[s])):u=u.add(r(m,i[d]))}return{p:u,f:h}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}}(f,e.endo?Math.ceil(l/2):l);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:u,weierstrassEquation:o,isWithinCurveOrder:s}}function kn(t){const e=function(t){const e=_n(t);return rn(e,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(t){return fn(t,n)}function a(t){return pn(t,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:h,weierstrassEquation:c,isWithinCurveOrder:f}=In({...e,toBytes(t,e,n){const i=e.toAffine(),o=r.toBytes(i.x),s=Zr;return n?s(Uint8Array.from([e.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){const e=t.length,n=t[0],s=t.subarray(1);if(e!==i||2!==n&&3!==n){if(e===o&&4===n){return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${e} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const t=qr(s);if(!(xn<(a=t)&&a<r.ORDER))throw new Error(\"Point is not on curve\");const e=c(t);let i;try{i=r.sqrt(e)}catch(t){const e=t instanceof Error?\": \"+t.message:\"\";throw new Error(\"Point is not on curve\"+e)}return 1==(1&n)!==((i&Bn)===Bn)&&(i=r.neg(i)),{x:t,y:i}}var a}}),l=t=>zr(Kr(t,e.nByteLength));function d(t){return t>n>>Bn}const p=(t,e,r)=>qr(t.slice(e,r));class m{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){const r=e.nByteLength;return t=Wr(\"compactSignature\",t,2*r),new m(p(t,0,r),p(t,r,2*r))}static fromDER(t){const{r:e,s:r}=Sn.toSig(Wr(\"DER\",t));return new m(e,r)}assertValidity(){if(!f(this.r))throw new Error(\"r must be 0 < r < CURVE.n\");if(!f(this.s))throw new Error(\"s must be 0 < s < CURVE.n\")}addRecoveryBit(t){return new m(this.r,this.s,t)}recoverPublicKey(t){const{r:n,s:i,recovery:o}=this,h=v(Wr(\"msgHash\",t));if(null==o||![0,1,2,3].includes(o))throw new Error(\"recovery id invalid\");const c=2===o||3===o?n+e.n:n;if(c>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const f=0==(1&o)?\"02\":\"03\",d=u.fromHex(f+l(c)),p=a(c),m=s(-h*p),g=s(i*p),y=u.BASE.multiplyAndAddUnsafe(d,m,g);if(!y)throw new Error(\"point at infinify\");return y.assertValidity(),y}hasHighS(){return d(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return Vr(this.toDERHex())}toDERHex(){return Sn.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Vr(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}const g={isValidPrivateKey(t){try{return h(t),!0}catch(t){return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const t=vn(e.n);return function(t,e,r=!1){const n=t.length,i=bn(e),o=vn(e);if(n<16||n<o||n>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=fn(r?qr(t):Gr(t),e-on)+on;return r?Jr(s,i):Kr(s,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=u.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function y(t){const e=Ur(t),r=\"string\"==typeof t,n=(e||r)&&t.length;return e?n===i||n===o:r?n===2*i||n===2*o:t instanceof u}const b=e.bits2int||function(t){const r=qr(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},v=e.bits2int_modN||function(t){return s(b(t))},w=Xr(e.nBitLength);function M(t){if(\"bigint\"!=typeof t)throw new Error(\"bigint expected\");if(!(xn<=t&&t<w))throw new Error(`bigint expected < 2^${e.nBitLength}`);return Kr(t,e.nByteLength)}function _(t,n,i=E){if([\"recovered\",\"canonical\"].some((t=>t in i)))throw new Error(\"sign() legacy options not supported\");const{hash:o,randomBytes:c}=e;let{lowS:l,prehash:p,extraEntropy:g}=i;null==l&&(l=!0),t=Wr(\"msgHash\",t),p&&(t=Wr(\"prehashed msgHash\",o(t)));const y=v(t),w=h(n),_=[M(w),M(y)];if(null!=g&&!1!==g){const t=!0===g?c(r.BYTES):g;_.push(Wr(\"extraEntropy\",t))}const A=Zr(..._),S=y;return{seed:A,k2sig:function(t){const e=b(t);if(!f(e))return;const r=a(e),n=u.BASE.multiply(e).toAffine(),i=s(n.x);if(i===xn)return;const o=s(r*s(S+i*w));if(o===xn)return;let h=(n.x===i?0:2)|Number(n.y&Bn),c=o;return l&&d(o)&&(c=function(t){return d(t)?s(-t):t}(o),h^=1),new m(i,c,h)}}}const E={lowS:e.lowS,prehash:!1},A={lowS:e.lowS,prehash:!1};return u.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return u.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(y(t))throw new Error(\"first arg must be private key\");if(!y(e))throw new Error(\"second arg must be public key\");return u.fromHex(e).multiply(h(t)).toRawBytes(r)},sign:function(t,r,n=E){const{seed:i,k2sig:o}=_(t,r,n),s=e;return tn(s.hash.outputLen,s.nByteLength,s.hmac)(i,o)},verify:function(t,r,n,i=A){const o=t;if(r=Wr(\"msgHash\",r),n=Wr(\"publicKey\",n),\"strict\"in i)throw new Error(\"options.strict was renamed to lowS\");const{lowS:h,prehash:c}=i;let f,l;try{if(\"string\"==typeof o||Ur(o))try{f=m.fromDER(o)}catch(t){if(!(t instanceof Sn.Err))throw t;f=m.fromCompact(o)}else{if(\"object\"!=typeof o||\"bigint\"!=typeof o.r||\"bigint\"!=typeof o.s)throw new Error(\"PARSE\");{const{r:t,s:e}=o;f=new m(t,e)}}l=u.fromHex(n)}catch(t){if(\"PARSE\"===t.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(h&&f.hasHighS())return!1;c&&(r=e.hash(r));const{r:d,s:p}=f,g=v(r),y=a(p),b=s(g*y),w=s(d*y),M=u.BASE.multiplyAndAddUnsafe(l,b,w)?.toAffine();return!!M&&s(M.x)===d},ProjectivePoint:u,Signature:m,utils:g}}function Pn(t){return{hash:t,hmac:(e,...r)=>Or(t,e,function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];gr(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:Sr}}const Cn=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),Rn=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),On=BigInt(1),Ln=BigInt(2),Nn=(t,e)=>(t+e/Ln)/e;function Un(t){const e=Cn,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),u=BigInt(88),h=t*t*t%e,c=h*h*t%e,f=dn(c,r,e)*c%e,l=dn(f,r,e)*c%e,d=dn(l,Ln,e)*h%e,p=dn(d,i,e)*d%e,m=dn(p,o,e)*p%e,g=dn(m,a,e)*m%e,y=dn(g,u,e)*g%e,b=dn(y,a,e)*m%e,v=dn(b,r,e)*c%e,w=dn(v,s,e)*p%e,M=dn(w,n,e)*h%e,_=dn(M,Ln,e);if(!jn.eql(jn.sqr(_),t))throw new Error(\"Cannot find square root\");return _}const jn=function(t,e,r=!1,n={}){if(t<=nn)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:o}=yn(t,e);if(o>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const s=mn(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:Xr(i),ZERO:nn,ONE:on,create:e=>fn(e,t),isValid:e=>{if(\"bigint\"!=typeof e)throw new Error(\"Invalid field element: expected bigint, got \"+typeof e);return nn<=e&&e<t},is0:t=>t===nn,isOdd:t=>(t&on)===on,neg:e=>fn(-e,t),eql:(t,e)=>t===e,sqr:e=>fn(e*e,t),add:(e,r)=>fn(e+r,t),sub:(e,r)=>fn(e-r,t),mul:(e,r)=>fn(e*r,t),pow:(t,e)=>function(t,e,r){if(r<nn)throw new Error(\"Expected power > 0\");if(r===nn)return t.ONE;if(r===on)return e;let n=t.ONE,i=e;for(;r>nn;)r&on&&(n=t.mul(n,i)),i=t.sqr(i),r>>=on;return n}(a,t,e),div:(e,r)=>fn(e*pn(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>pn(e,t),sqrt:n.sqrt||(t=>s(a,t)),invertBatch:t=>function(t,e){const r=new Array(e.length),n=e.reduce(((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n))),t.ONE),i=t.inv(n);return e.reduceRight(((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n))),i),r}(a,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?Jr(t,o):Kr(t,o),fromBytes:t=>{if(t.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${t.length}`);return r?Gr(t):qr(t)}});return Object.freeze(a)}(Cn,void 0,void 0,{sqrt:Un}),Dn=function(t,e){const r=e=>kn({...t,...Pn(e)});return Object.freeze({...r(e),create:r})}({a:BigInt(0),b:BigInt(7),Fp:jn,n:Rn,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:t=>{const e=Rn,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-On*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),i=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),o=r,s=BigInt(\"0x100000000000000000000000000000000\"),a=Nn(o*t,e),u=Nn(-n*t,e);let h=fn(t-a*r-u*i,e),c=fn(-a*n-u*o,e);const f=h>s,l=c>s;if(f&&(h=e-h),l&&(c=e-c),h>s||c>s)throw new Error(\"splitScalar: Endomorphism failed, k=\"+t);return{k1neg:f,k1:h,k2neg:l,k2:c}}}},Cr);BigInt(0);Dn.ProjectivePoint;function zn(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function Hn(t,...e){if(!((r=t)instanceof Uint8Array||null!=r&&\"object\"==typeof r&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function Fn(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function $n(t,e){Hn(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const Vn={number:zn,bool:function(t){if(\"boolean\"!=typeof t)throw new Error(`boolean expected, not ${t}`)},bytes:Hn,hash:function(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");zn(t.outputLen),zn(t.blockLen)},exists:Fn,output:$n};const qn=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Gn=(t,e)=>t<<32-e|t>>>e,Kn=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],Jn=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;function Wn(t){for(let e=0;e<t.length;e++)t[e]=Jn(t[e])}Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function Zn(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function Xn(t){return\"string\"==typeof t&&(t=Zn(t)),Hn(t),t}class Yn{clone(){return this._cloneInto()}}function Qn(t){const e=e=>t().update(Xn(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}Vn.bool,Vn.bytes;function ti(t){return e=>(Vn.bytes(e),t(e))}(()=>{const t=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,e=\"undefined\"!=typeof module&&\"function\"==typeof module.require&&module.require.bind(module);e&&!t&&e(\"crypto\")})();function ei(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==e&&e>0&&t.length!==2+2*e)}function ri(t){let e=t;if(\"string\"!=typeof e)throw new Error(\"[padToEven] value must be type 'string', received \"+typeof e);return e.length%2&&(e=`0${e}`),e}const ni=BigInt(0),ii={},oi={};for(let t=0;t<16;t++){const e=t,r=16*t,n=t.toString(16).toLowerCase();oi[n]=e,oi[n.toUpperCase()]=e,ii[n]=r,ii[n.toUpperCase()]=r}function si(t){const e=t.length,r=new Uint8Array(e/2);for(let n=0;n<e;n+=2)r[n/2]=ii[t[n]]+oi[t[n+1]];return r}const ai=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\"))),ui=t=>{let e=\"0x\";if(void 0===t||0===t.length)return e;for(const r of t)e=`${e}${ai[r]}`;return e},hi=[];for(let t=0;t<=65535;t++)hi[t]=BigInt(t);const ci=(t,e=!1)=>{e&&t.reverse();const r=ui(t);return\"0x\"===r?ni:4===r.length?hi[t[0]]:6===r.length?hi[256*t[0]+t[1]]:BigInt(r)},fi=t=>{if(\"string\"!=typeof t)throw new Error(`hex argument type ${typeof t} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(t))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${t}`);const e=t.slice(2);return si(e.length%2==0?e:ri(e))},li=t=>{const e=(t=>{if(!Number.isSafeInteger(t)||t<0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`})(t);return fi(e)},di=t=>{if(null==t)return new Uint8Array;if(Array.isArray(t)||t instanceof Uint8Array)return Uint8Array.from(t);if(\"string\"==typeof t){if(!ei(t))throw new Error(`Cannot convert string to Uint8Array. toBytes only supports 0x-prefixed hex strings and this string was given: ${t}`);return fi(t)}if(\"number\"==typeof t)return li(t);if(\"bigint\"==typeof t){if(t<ni)throw new Error(`Cannot convert negative bigint to Uint8Array. Given: ${t}`);let e=t.toString(16);return e.length%2&&(e=\"0\"+e),(t=>{if(\"0x\"===t.slice(0,2))throw new Error(\"hex string is prefixed with 0x, should be unprefixed\");return si(ri(t))})(e)}if(void 0!==t.toBytes)return t.toBytes();throw new Error(\"invalid type\")};BigInt(\"0xffffffffffffffff\"),BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),BigInt(\"115792089237316195423570985008687907853269984665640564039457584007913129639935\"),Dn.CURVE.n,Dn.CURVE.n,BigInt(2),BigInt(\"0x10000000000000000000000000000000000000000000000000000000000000000\"),fi(\"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\"),fi(\"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"),fi(\"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\"),Uint8Array.from([128]),BigInt(-1),BigInt(0),BigInt(1),BigInt(2),BigInt(3),BigInt(7),BigInt(8),BigInt(27),BigInt(28),BigInt(31),BigInt(32),BigInt(64),BigInt(128),BigInt(255),BigInt(256),BigInt(96),BigInt(100),BigInt(160),BigInt(224),BigInt(7922816251426434e13),BigInt(1461501637330903e33),BigInt(2695994666715064e52),BigInt(1e9);Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));const pi=BigInt(2**32-1),mi=BigInt(32);function gi(t,e=!1){return e?{h:Number(t&pi),l:Number(t>>mi&pi)}:{h:0|Number(t>>mi&pi),l:0|Number(t&pi)}}function yi(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:o,l:s}=gi(t[i],e);[r[i],n[i]]=[o,s]}return[r,n]}const bi=(t,e,r)=>t<<r|e>>>32-r,vi=(t,e,r)=>e<<r|t>>>32-r,wi=(t,e,r)=>e<<r-32|t>>>64-r,Mi=(t,e,r)=>t<<r-32|e>>>64-r;const _i=[],Ei=[],Ai=[],Si=BigInt(0),xi=BigInt(1),Bi=BigInt(2),Ti=BigInt(7),Ii=BigInt(256),ki=BigInt(113);for(let t=0,e=xi,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],_i.push(2*(5*n+r)),Ei.push((t+1)*(t+2)/2%64);let i=Si;for(let t=0;t<7;t++)e=(e<<xi^(e>>Ti)*ki)%Ii,e&Bi&&(i^=xi<<(xi<<BigInt(t))-xi);Ai.push(i)}const[Pi,Ci]=yi(Ai,!0),Ri=(t,e,r)=>r>32?wi(t,e,r):bi(t,e,r),Oi=(t,e,r)=>r>32?Mi(t,e,r):vi(t,e,r);class Li extends Yn{constructor(t,e,r,n=!1,i=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,zn(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){Kn||Wn(this.state32),function(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=Ri(o,s,1)^r[n],u=Oi(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=Ei[r],o=Ri(e,i,n),s=Oi(e,i,n),a=_i[r];e=t[a],i=t[a+1],t[a]=o,t[a+1]=s}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=Pi[n],t[1]^=Ci[n]}r.fill(0)}(this.state32,this.rounds),Kn||Wn(this.state32),this.posOut=0,this.pos=0}update(t){Fn(this);const{blockLen:e,state:r}=this,n=(t=Xn(t)).length;for(let i=0;i<n;){const o=Math.min(e-this.pos,n-i);for(let e=0;e<o;e++)r[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,0!=(128&e)&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){Fn(this,!1),Hn(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return zn(t),this.xofInto(new Uint8Array(t))}digestInto(t){if($n(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new Li(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}const Ni=(t,e,r)=>Qn((()=>new Li(e,t,r))),Ui=Ni(1,144,28),ji=Ni(1,136,32),Di=Ni(1,104,48),zi=Ni(1,72,64),Hi=(ti(Ui),(()=>{const t=ti(ji);return t.create=ji.create,t})());ti(Di),ti(zi);const Fi=function(t,e){!function(t){if(!ei(t))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}(t);const r=(t=>{if(\"string\"!=typeof t)throw new Error(\"[stripHexPrefix] input must be type 'string', received \"+typeof t);return ei(t)?t.slice(2):t})(t).toLowerCase();let n=\"\";if(void 0!==e){n=ci(di(e)).toString()+\"0x\"}const i=Zn(n+r),o=ui(Hi(i)).slice(2);let s=\"\";for(let t=0;t<r.length;t++)parseInt(o[t],16)>=8?s+=r[t].toUpperCase():s+=r[t];return`0x${s}`};new Uint8Array(0);var $i,Vi,qi;!function(t){t.String=\"string\",t.Bytes=\"view\",t.Number=\"number\"}($i||($i={})),function(t){t.String=\"string\",t.Bytes=\"view\",t.JSON=\"json\"}(Vi||(Vi={})),function(t){t[t.Number=0]=\"Number\",t[t.BigInt=1]=\"BigInt\",t[t.Uint8Array=2]=\"Uint8Array\",t[t.PrefixedHexString=3]=\"PrefixedHexString\"}(qi||(qi={}));var Gi=r(22699),Ki=r.n(Gi);const Ji=(t,e,r)=>t&e^t&r^e&r;class Wi extends Yn{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=qn(this.buffer)}update(t){Fn(this);const{view:e,buffer:r,blockLen:n}=this,i=(t=Xn(t)).length;for(let o=0;o<i;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(e,0),this.pos=0);else{const e=qn(t);for(;n<=i-o;o+=n)this.process(e,o)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){Fn(this),$n(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let t=o;t<n;t++)e[t]=0;!function(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=qn(t),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const u=a/4,h=this.get();if(u>h.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t<u;t++)s.setUint32(4*t,h[t],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}const Zi=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Xi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Yi=new Uint32Array(64);class Qi extends Wi{constructor(){super(64,32,8,!1),this.A=0|Xi[0],this.B=0|Xi[1],this.C=0|Xi[2],this.D=0|Xi[3],this.E=0|Xi[4],this.F=0|Xi[5],this.G=0|Xi[6],this.H=0|Xi[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)Yi[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=Yi[t-15],r=Yi[t-2],n=Gn(e,7)^Gn(e,18)^e>>>3,i=Gn(r,17)^Gn(r,19)^r>>>10;Yi[t]=i+Yi[t-7]+n+Yi[t-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:u,H:h}=this;for(let t=0;t<64;t++){const e=h+(Gn(s,6)^Gn(s,11)^Gn(s,25))+((c=s)&a^~c&u)+Zi[t]+Yi[t]|0,f=(Gn(r,2)^Gn(r,13)^Gn(r,22))+Ji(r,n,i)|0;h=u,u=a,a=s,s=o+e|0,o=i,i=n,n=r,r=e+f|0}var c;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,n,i,o,s,a,u,h)}roundClean(){Yi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}ti(Qn((()=>new Qi)));var to,eo;!function(t){t[t.Deposit=0]=\"Deposit\",t[t.Withdrawal=1]=\"Withdrawal\",t[t.Consolidation=2]=\"Consolidation\"}(to||(to={}));!function(t){t[t.Version=0]=\"Version\",t[t.Balance=1]=\"Balance\",t[t.Nonce=2]=\"Nonce\",t[t.CodeHash=3]=\"CodeHash\",t[t.CodeSize=4]=\"CodeSize\"}(eo||(eo={}));li(eo.Version),li(eo.Balance),li(eo.Nonce),li(eo.CodeHash),li(eo.CodeSize),BigInt(256),BigInt(31);var ro=r(50539);const no={randomUUID:\"undefined\"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let io;const oo=new Uint8Array(16);function so(){if(!io&&(io=\"undefined\"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!io))throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");return io(oo)}const ao=[];for(let t=0;t<256;++t)ao.push((t+256).toString(16).slice(1));function uo(t,e=0){return(ao[t[e+0]]+ao[t[e+1]]+ao[t[e+2]]+ao[t[e+3]]+\"-\"+ao[t[e+4]]+ao[t[e+5]]+\"-\"+ao[t[e+6]]+ao[t[e+7]]+\"-\"+ao[t[e+8]]+ao[t[e+9]]+\"-\"+ao[t[e+10]]+ao[t[e+11]]+ao[t[e+12]]+ao[t[e+13]]+ao[t[e+14]]+ao[t[e+15]]).toLowerCase()}const ho=function(t,e,r){if(no.randomUUID&&!e&&!t)return no.randomUUID();const n=(t=t||{}).random||(t.rng||so)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=n[t];return e}return uo(n)};const co=\"refresh_token_change\",fo=\"token_expired\",lo=36e5,po=36e5;async function mo(t,e){let r,n=`Error with request. Status: ${t.status} Status text: ${t.statusText}. URL: ${t.url}. ${e??\"\"}`;if(!t.ok){var i;const e=await t.json();throw(null===(i=e.error)||void 0===i?void 0:i.message)?n+=`. Error message: ${e.error.message}`:e.message&&(n+=`. Error message: ${e.message}`),new Error(n)}try{r=await t.json()}catch(t){throw new Error(`Failed to parse JSON. ${n}`)}return r}class go{#t;#e;constructor(t,e){this.#t=t,this.#e=e}getHeaders(){return{\"Content-Type\":\"application/json\",Authorization:`Bearer ${this.#e}`}}async getEthereumAccounts(){const t=this.getHeaders(),e=await fetch(`${this.#t}/wallets`,{headers:t});return(await mo(e,\"Error fetching wallet accounts\")).data}async getEthereumAccountByAddress(t){const e=this.getHeaders(),r=await fetch(`${this.#t}/mmi/wallets/address/${t}`,{headers:e}),n=`Error fetching account for address ${t}`,i=await mo(r,n);return i.data.length&&i.data[0]?i.data[0]:null}async createTransaction(t,e){const r=this.getHeaders(),n=await fetch(`${this.#t}/mmi/${t.coinId}/wallet/${t.walletId}/tx/build`,{method:\"POST\",headers:r,body:JSON.stringify({txParams:e})});return(await mo(n,\"Error creating transaction\")).data}async getTransaction(t){const e=this.getHeaders(),r=await fetch(`${this.#t}/mmi/wallets/transactions/${t}`,{headers:e}),n=`Error getting transaction with id ${t}`,i=await mo(r,n);return i.data.length&&i.data[0]?i.data[0]:null}async getTransactions(){const t=this.getHeaders(),e=await fetch(`${this.#t}/custodian/transaction`,{headers:t});return(await mo(e,\"Error getting transactions\")).data}async getCustomerProof(){const t=this.getHeaders(),e=await fetch(`${this.#t}/mmi/customer-proof`,{method:\"POST\",headers:t,body:JSON.stringify({version:\"n/a\"})});return await mo(e,\"Error getting Customer Proof\")}async signTypedData_v4(t,e,r,n,i){const o=await this.getHeaders(),s={address:t,payload:e,encodingVersion:i||\"v4\"},a=await fetch(`${this.#t}/mmi/${r}/wallet/${n}/messages/typed`,{method:\"POST\",body:JSON.stringify(s),headers:o}),u=`Error doing signTypedData from address: ${t}`;return await mo(a,u)}async signPersonalMessage(t,e,r,n){const i=await this.getHeaders(),o={address:t,message:e},s=await fetch(`${this.#t}/mmi/${r}/wallet/${n}/messages/personal`,{method:\"POST\",body:JSON.stringify(o),headers:i}),a=`Error doing signPersonalMessage from address: ${t}`;return await mo(s,a)}async getSignedMessage(t,e,r){const n=await this.getHeaders(),i=await fetch(`${this.#t}/mmi/${e}/wallet/${r}/messages/${t}`,{headers:n}),o=`Error getting signed message with id ${t}`;return await mo(i,o)}}const yo=\"https://app.bitgo.com/defi/v2\",bo={log:(...t)=>console.log(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t))),info:(...t)=>{pr.dev&&console.info(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t)))},warn:(...t)=>console.warn(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t))),error:(...t)=>{console.error(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t))),console.error(t)},debug:(...t)=>{pr.dev&&console.debug(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t)))}};function vo(t,e){switch(t){case\"created\":return{finished:!1,submitted:!1,signed:!1,success:!1,displayText:\"Created\",reason:e??\"\"};case\"signed\":return{finished:!1,submitted:!1,signed:!0,success:!1,displayText:\"Signed\",reason:e??\"\"};case\"submitted\":return{finished:!1,submitted:!0,signed:!0,success:!1,displayText:\"Submitted\",reason:e??\"\"};case\"mined\":return{finished:!0,submitted:!0,signed:!0,success:!0,displayText:\"Mined\",reason:e??\"\"};case\"completed\":return{finished:!0,submitted:!0,signed:!0,success:!0,displayText:\"Completed\",reason:e??\"\"};case\"failed\":return{finished:!0,submitted:!0,signed:!0,success:!1,displayText:\"Failed\",reason:e??\"\"};case\"rejected\":return{finished:!0,submitted:!1,signed:!1,success:!1,displayText:\"Rejected\",reason:e??\"\"};case\"aborted\":return{finished:!0,submitted:!1,signed:!1,success:!1,displayText:\"Aborted\",reason:e??\"\"};case\"confirmed\":return{finished:!0,submitted:!0,signed:!0,success:!0,displayText:\"Confirmed\",reason:e??\"\"};default:return{finished:!1,submitted:!1,signed:!1,success:!1,displayText:\"Unknown\",reason:e??\"\"}}}class wo extends Gi.EventEmitter{#r;constructor(t,e=yo,r){super();const{refreshToken:n}=t;this.#r=new go(e,n)}async getEthereumAccounts(t){const e=(await this.#r.getEthereumAccounts()).map((t=>{var e;return{name:(null===(e=t.labels.find((t=>\"Wallet Name\"===t.key)))||void 0===e?void 0:e.value)??\"Unnamed Bitgo Wallet\",address:t.address,balance:t.balance,custodianDetails:{accountId:t.custodianDetails.id,coinId:t.custodianDetails.coin},chainId:t.chainId,labels:t.labels.filter((t=>\"Wallet Name\"!==t.key))}}));return t?e.filter((e=>e.chainId===t)):e}async getEthereumAccountsByAddress(t){return(await this.getEthereumAccounts()).filter((e=>e.address.toLowerCase().includes(t.toLowerCase())))}async getEthereumAccountsByLabelOrAddressName(t){return(await this.getEthereumAccounts()).filter((e=>e.name.includes(t)))}async createTransaction(t){var e;const r=t.from,n=await this.getEthereumAccountsByAddress(r);if(!n.length||!(null===(e=n[0])||void 0===e?void 0:e.custodianDetails))throw new Error(\"No such ethereum account!\");const i=n[0].custodianDetails.accountId,{coinId:o}=n[0].custodianDetails;let s;t.gasLimit=(Number(t.gasLimit)+1e5).toString();try{s=await this.#r.createTransaction({walletId:i,coinId:o},t)}catch(t){throw bo.error(\"Error creating BitGo transaction.\"),bo.error(t),t}return{transactionStatus:vo(s.transactionStatus),custodianTransactionId:s.custodianTransactionId,from:s.from,gasLimit:s.gasLimit??null,gasPrice:s.gasPrice??null,maxFeePerGas:s.maxFeePerGas??null,maxPriorityFeePerGas:s.maxPriorityFeePerGas??null,nonce:s.nonce??null,transactionHash:s.transactionHash,custodianPublishesTransaction:!0}}async getTransaction(t,e){const r=await this.#r.getTransaction(e);return r?{transactionStatus:vo(r.transactionStatus),custodianTransactionId:r.custodianTransactionId,from:r.from,gasLimit:r.gasLimit??null,gasPrice:r.gasPrice??null,maxFeePerGas:r.maxFeePerGas??null,maxPriorityFeePerGas:r.maxPriorityFeePerGas??null,nonce:r.nonce??null,transactionHash:r.transactionHash,custodianPublishesTransaction:!0}:null}async getCustomerProof(){const{data:t}=await this.#r.getCustomerProof();return t}async getSupportedChains(t){const e=await this.#r.getEthereumAccountByAddress(t);return e?[e.chainId.toString()]:[]}async getTransactionLink(t){return{text:\"Complete your transaction in the BitGo App\",id:\"\",url:\"\",action:\"view\"}}async getSignedMessageLink(t){return{text:\"Complete your transaction in the BitGo App\",id:\"\",url:\"\",action:\"view\"}}changeRefreshTokenAuthDetails(t){throw new Error(\"BitGo does not support refresh tokens\")}async getSignedMessage(t,e){var r;const n=await this.getEthereumAccountsByAddress(t);if(!n.length)throw new Error(\"No such ethereum account!\");if(!(null===(r=n[0])||void 0===r?void 0:r.custodianDetails))throw new Error(\"No such ethereum account!\");const i=n[0].custodianDetails.accountId,{coinId:o}=n[0].custodianDetails,s=await this.#r.getSignedMessage(e,o,i);return s?{id:s.data.id,signature:s.data.signature,status:s.data.status}:null}async signTypedData_v4(t,e,r){var n;const i=await this.getEthereumAccountsByAddress(t);if(!i.length||!(null===(n=i[0])||void 0===n?void 0:n.custodianDetails))throw new Error(\"No such ethereum account!\");const o=i[0].custodianDetails.accountId,{coinId:s}=i[0].custodianDetails,a=await this.#r.signTypedData_v4(t,e,s,o,r);return{id:a.data.id,signature:a.data.signature,status:a.data.status,from:t}}async signPersonalMessage(t,e){var r;const n=await this.getEthereumAccountsByAddress(t);if(!n.length||!(null===(r=n[0])||void 0===r?void 0:r.custodianDetails))throw new Error(\"No such ethereum account!\");const i=n[0].custodianDetails.accountId,{coinId:o}=n[0].custodianDetails,s=await this.#r.signPersonalMessage(t,e,o,i);return{id:s.data.id,signature:s.data.signature,status:s.data.status,from:t}}}class Mo{#n={};async tryCaching(t,e,r){if(e>=0&&this.cacheExists(t)&&this.cacheValid(t,e))return this.#n[t].results;const n=await r();return this.#n[t]={results:n,timestamp:(new Date).getTime()},n}setCache(t,e){this.#n[t]={results:e,timestamp:(new Date).getTime()}}getCache(t){return this.#n[t].results}cacheExists(t){return Boolean(Object.prototype.hasOwnProperty.call(this.#n,t)&&this.#n[t].results)}cacheValid(t,e){const r=this.#n[t],n=1e3*e;return!!r&&(new Date).getTime()-r.timestamp<n}deleteCache(t){this.cacheExists(t)&&delete this.#n[t]}}class _o{#n=new Mo;#i;#o;constructor(t,e){this.#i=t,this.#o=e}async getHeaders(){return{\"Content-Type\":\"application/json\",Authorization:`Bearer ${await this.#n.tryCaching(\"accessToken\",7200,(async()=>this.getAccessToken()))}`}}async getAccessToken(){const t=await fetch(`${this.#i}/tokens`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({grantType:\"refresh_token\",refreshToken:this.#o})}),e=await mo(t,\"Error fetching the access token\");if(!e.jwt)throw new Error(\"No access token\");return e.jwt}async getEthereumAccounts(){const t=await this.getHeaders(),e=await fetch(`${this.#i}/eth-accounts`,{headers:t});return await mo(e,\"Error fetching accounts\")}async createTransaction(t,e){const r=await this.getHeaders(),n={to:e.to,from:e.from,value:e.value,data:e.data,gasLimit:e.gasLimit,note:t.note};\"0\"===e.type||\"1\"===e.type?n.gasPrice=e.gasPrice:\"2\"===e.type&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas,n.maxFeePerGas=e.maxFeePerGas);const i=await fetch(`${this.#i}/transactions?chainId=${t.chainId}`,{method:\"POST\",body:JSON.stringify(n),headers:r});return await mo(i,\"Error creating transaction\")}async getSignedMessage(t){const e=await this.getHeaders(),r=await fetch(`${this.#i}/signatures?transactionId=${t}`,{headers:e}),n=`Error getting signed message with id ${t}`,i=await mo(r,n);return i.length&&i[0]?i[0]:null}async getTransaction(t){const e=await this.getHeaders(),r=await fetch(`${this.#i}/transactions?transactionId=${t}`,{headers:e}),n=`Error getting transaction with id ${t}`,i=await mo(r,n);return i.length&&i[0]?i[0]:null}async getTransactions(t){const e=await this.getHeaders(),r=await fetch(`${this.#i}/transactions?chainId=${t}`,{headers:e}),n=`Error getting transactions with chainId ${t}`;return await mo(r,n)}async getCustomerProof(){const t=await this.getHeaders(),e=await fetch(`${this.#i}/customer-proof`,{method:\"POST\",headers:t,body:JSON.stringify({})});return await mo(e,\"Error getting Custommer Proof\")}async signTypedData_v4(t,e,r,n){const i=await this.getHeaders(),o={address:t,payload:e,signatureVersion:r};let s=`${this.#i}/signatures`;n&&(s+=`?chainId=${n}`);const a=await fetch(s,{method:\"POST\",body:JSON.stringify(o),headers:i}),u=`Error doing signTypedData from address: ${t}`;return await mo(a,u)}async signPersonalMessage(t,e){const r=await this.getHeaders(),n={address:t,payload:{message:e},signatureVersion:\"personalSign\"},i=await fetch(`${this.#i}/signatures`,{method:\"POST\",body:JSON.stringify(n),headers:r}),o=`Error doing signPersonalMessage from address: ${t}`;return await mo(i,o)}async getChainIds(){const t=await this.getHeaders(),e=await fetch(`${this.#i}/chainIds`,{headers:t});return await mo(e,\"Error getting chainIds\")}}const Eo=\"https://api.mycactus.com/custody/v1/mmi-api\";class Ao extends Gi.EventEmitter{#r;#n=new Mo;#s;constructor(t,e=Eo,r){super(),this.#s=r,this.#r=new _o(e,t.refreshToken)}async getEthereumAccounts(){return(await this.#r.getEthereumAccounts()).map((t=>({name:t.name||\"Cactus wallet\",address:t.address,balance:t.balance,custodianDetails:{walletId:t.custodianDetails.walletId,chainId:t.chainId},labels:t.labels?t.labels.map((t=>({key:\"label\",value:t}))):[]})))}async getEthereumAccountsByAddress(t){return(await this.getEthereumAccounts()).filter((e=>e.address.toLowerCase().includes(t.toLowerCase())))}async getEthereumAccountsByLabelOrAddressName(t){const e=await this.getEthereumAccounts();return t.length?e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase()))):e}async createTransaction(t,e){const r=await this.#r.createTransaction({chainId:Number(e.chainId),note:e.note??\"\"},t);return{transactionStatus:vo(r.transactionStatus),custodianTransactionId:r.custodian_transactionId,from:r.from,gasLimit:r.gasLimit,gasPrice:r.gasPrice,maxFeePerGas:r.maxFeePerGas,maxPriorityFeePerGas:r.maxFeePerGas,nonce:r.nonce,transactionHash:r.transactionHash,custodianPublishesTransaction:!0}}async getTransaction(t,e){const r=await this.#r.getTransaction(e);return r?{transactionStatus:vo(r.transactionStatus),custodianTransactionId:r.custodian_transactionId,from:r.from,gasLimit:r.gasLimit,gasPrice:r.gasPrice,maxFeePerGas:r.maxFeePerGas,maxPriorityFeePerGas:r.maxPriorityFeePerGas,nonce:r.nonce,transactionHash:r.transactionHash,custodianPublishesTransaction:!0}:null}async getSignedMessage(t,e){const r=await this.#r.getSignedMessage(e);if(!r)return null;let n;return n=\"signed\"===r.transactionStatus?{submitted:!1,finished:!0,signed:!0,success:!0,displayText:\"Signed\",reason:\"\"}:vo(r.transactionStatus),{id:r.custodian_transactionId??\"\",signature:r.signature,status:n,from:t}}async getCustomerProof(){const{jwt:t}=await this.#r.getCustomerProof();return t}async signTypedData_v4(t,e,r){var n;const i=await this.#r.signTypedData_v4(t,e,r,null===(n=e.domain)||void 0===n?void 0:n.chainId);return{id:i.custodian_transactionId,status:vo(i.transactionStatus),from:t,signature:null}}async signPersonalMessage(t,e){const r=await this.#r.signPersonalMessage(t,e);return{id:r.custodian_transactionId,status:vo(r.transactionStatus),from:t,signature:null}}async getErc20Tokens(){return{}}async getSupportedChains(){const{networks:t}=await this.#r.getChainIds();return this.#n.tryCaching(\"getSupportedChains\",this.#s,(async()=>t.map((t=>t.chainID))))}async getTransactionLink(t){return{text:\"Complete your transaction in the Cactus App\",id:\"\",url:\"\",action:\"view\"}}async getSignedMessageLink(t){return{text:\"Complete your transaction in the Cactus App\",id:\"\",url:\"\",action:\"view\"}}changeRefreshTokenAuthDetails(t){throw new Error(\"Not implemented yet\")}}var So,xo=r(5634);function Bo(t){let e=0;return async function(r,n,i){let o,s;e+=1,bo.debug(\"JSON-RPC >\",r,e,n,t);try{if(o=await fetch(t,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",Authorization:`Bearer ${i}`},body:JSON.stringify({jsonrpc:\"2.0\",id:e,method:r,params:n}),credentials:\"same-origin\"}),s=await o.json(),s.error)throw bo.error(\"JSON-RPC <\",r,e,s,t,s),new Error(s.error.message);bo.debug(\"JSON-RPC <\",r,e,s.result,t)}catch(n){throw bo.error(\"JSON-RPC <\",r,e,n,t),bo.error(n),n}return s}}class To extends Gi.EventEmitter{#a;#n;#s=null;#u;#o;#h;constructor(t,e,r){super(),this.#u=t,this.#o=e,this.#h=r,this.#a=Bo(`${t}/v1/json-rpc`),this.#n=new Mo}setRefreshToken(t){this.#o=t}async getAccessToken(){if(this.#s){if(this.#n.cacheExists(\"accessToken\")&&this.#n.cacheValid(\"accessToken\",this.#s))return this.#n.getCache(\"accessToken\")}try{var t;const e=`grant_type=refresh_token&refresh_token=${encodeURIComponent(this.#o)}`,r={headers:{\"Content-Type\":\"application/x-www-form-urlencoded\"}},n=await fetch(this.#h,{method:\"POST\",body:e,headers:r.headers,credentials:\"same-origin\"}),i=await n.json();if(401===(null===(t=n)||void 0===t?void 0:t.status)&&i.url){const t=i.url,e=this.#o,r=xo.createHash(\"sha256\").update(e+t).digest(\"hex\");throw this.emit(fo,{url:t,oldRefreshToken:r}),new Error(\"Refresh token provided is no longer valid.\")}if(!n.ok){const t=i.message;throw new Error(`Request failed with status ${n.status}: ${t}`)}if(this.#s=i.expires_in,this.#n.setCache(\"accessToken\",i.access_token),i.refresh_token&&i.refresh_token!==this.#o){const t=i.refresh_token;bo.debug(`ECA1Client: Refresh token changed to ${t.substring(0,5)}...${t.substring(t.length-5)}`);const e=this.#o;this.setRefreshToken(t);const r={apiUrl:this.#u,oldRefreshToken:e,newRefreshToken:t};this.emit(co,r)}return i.access_token}catch(t){const{message:e}=t;throw new Error(`Error getting the Access Token: ${e}`)}}async listAccounts(){const t=await this.getAccessToken();return this.#a(\"custodian_listAccounts\",{},t)}async getCustomerProof(){const t=await this.getAccessToken();return this.#a(\"custodian_getCustomerProof\",{},t)}async createTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_createTransaction\",t,e)}async getAccountChainIds(t){const e=await this.getAccessToken();return this.#a(\"custodian_listAccountChainIds\",t,e)}async signPersonalMessage(t){const e=await this.getAccessToken();return this.#a(\"custodian_sign\",t,e)}async signTypedData(t){const e=await this.getAccessToken();return this.#a(\"custodian_signTypedData\",t,e)}async getTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_getTransactionById\",t,e)}async getSignedMessage(t){const e=await this.getAccessToken();return this.#a(\"custodian_getSignedMessageById\",t,e)}async getTransactionLink(t){const e=await this.getAccessToken();return this.#a(\"custodian_getTransactionLink\",t,e)}}function Io(t){return`0x${BigInt(t).toString(16)}`}class ko extends(Ki()){#r;#n=new Mo;#s;constructor(t,e,r){super();const{refreshToken:n}=t;this.#r=new To(e,n,t.refreshTokenUrl),this.#s=r,this.#r.on(co,(t=>{this.emit(co,t)})),this.#r.on(fo,(t=>{this.emit(fo,t)}))}async getEthereumAccounts(){return(await this.#r.listAccounts()).result.map((t=>({name:t.name,address:t.address,custodianDetails:null,labels:t.tags.map((t=>({key:t.name,value:t.value})))})))}async getEthereumAccountsByAddress(t){return(await this.getEthereumAccounts()).filter((e=>e.address.toLowerCase().includes(t.toLowerCase())))}async getEthereumAccountsByLabelOrAddressName(t){return(await this.getEthereumAccounts()).filter((e=>e.name.includes(t)))}async createTransaction(t,e){var r;const n=await this.getEthereumAccountsByAddress(t.from);if(!n.length||!(null===(r=n[0])||void 0===r?void 0:r.address))throw new Error(\"No such ethereum account!\");const i={from:n[0].address,to:t.to,...t.data&&{data:t.data},...t.value&&{value:Io(t.value)},...t.gasLimit&&{gas:Io(t.gasLimit)},...t.type&&{type:Io(t.type)}};2===Number(t.type)?(i.maxFeePerGas=Io(t.maxFeePerGas),i.maxPriorityFeePerGas=Io(t.maxPriorityFeePerGas)):i.gasPrice=Io(t.gasPrice);const o={chainId:Io(e.chainId),...e.origin&&{originUrl:e.origin},...e.note&&{note:e.note},...e.transactionCategory&&{transactionCategory:e.transactionCategory}},{result:s}=await this.#r.createTransaction([i,o]);if(\"string\"!=typeof s)throw new Error(\"Failed to create transaction\");return{custodianTransactionId:s,transactionStatus:vo(\"created\"),from:n[0].address,custodianPublishesTransaction:!0}}async getTransaction(t,e){const{result:r}=await this.#r.getTransaction([e]);return r?{transactionStatus:r.status,custodianTransactionId:r.id,from:r.from,gasLimit:r.gas??null,gasPrice:r.gasPrice??null,maxFeePerGas:r.maxFeePerGas??null,maxPriorityFeePerGas:r.maxPriorityFeePerGas??null,nonce:r.nonce,transactionHash:r.hash,to:r.to,custodianPublishesTransaction:!0}:null}async getSignedMessage(t,e){const{result:r}=await this.#r.getSignedMessage([e]);return r?{id:e,signature:r.signature,status:r.status}:null}async getTransactionLink(t){const{result:e}=await this.#r.getTransactionLink([t]);return e?{id:t,url:e.url,text:e.text,action:e.action,ethereum:e.ethereum??{accounts:[],chainId:[]}}:null}async getSignedMessageLink(t){const{result:e}=await this.#r.getTransactionLink([t]);return e?{id:t,url:e.url,text:e.text,action:e.action,ethereum:e.ethereum??{accounts:[],chainId:[]}}:null}async getCustomerProof(){const{result:t}=await this.#r.getCustomerProof();return t.jwt}async signTypedData_v4(t,e,r,n){if(!(await this.getEthereumAccountsByAddress(t)).length)throw new Error(\"No such ethereum account!\");const i=r.toLowerCase(),{result:o}=await this.#r.signTypedData([t,e,i]);return{id:o,signature:null,status:vo(\"created\"),from:t}}async signPersonalMessage(t,e,r){if(!(await this.getEthereumAccountsByAddress(t)).length)throw new Error(\"No such ethereum account!\");const{result:n}=await this.#r.signPersonalMessage([t,e]);return{id:n,status:vo(\"created\"),signature:null,from:t}}async getSupportedChains(t){return this.#n.tryCaching(`getSupportedChains-${t}`,this.#s,(async()=>{const{result:e}=await this.#r.getAccountChainIds([t]);return e}))}changeRefreshTokenAuthDetails(t){this.#r.setRefreshToken(t.refreshToken)}}class Po extends Gi.EventEmitter{#a;#n;#u;#o;#h;#s=null;constructor(t,e,r){super(),this.#u=t,this.#o=e,this.#h=r,this.#a=Bo(`${t}/v3/json-rpc`),this.#n=new Mo}setRefreshToken(t){this.#o=t}async getAccessToken(){if(this.#s){if(this.#n.cacheExists(\"accessToken\")&&this.#n.cacheValid(\"accessToken\",this.#s))return this.#n.getCache(\"accessToken\")}try{var t;const e={grant_type:\"refresh_token\",refresh_token:this.#o},r={headers:{\"Content-Type\":\"application/json\"}},n=await fetch(this.#h,{method:\"POST\",body:JSON.stringify(e),headers:r.headers,credentials:\"same-origin\"}),i=await n.json();if(401===(null===(t=n)||void 0===t?void 0:t.status)&&i.url){const t=i.url,e=this.#o,r=xo.createHash(\"sha256\").update(e+t).digest(\"hex\");throw this.emit(fo,{url:t,oldRefreshToken:r}),new Error(\"Refresh token provided is no longer valid.\")}if(!n.ok){const t=i.message;throw new Error(`Request failed with status ${n.status}: ${t}`)}if(this.#s=i.expires_in,this.#n.setCache(\"accessToken\",i.access_token),i.refresh_token&&i.refresh_token!==this.#o){const t=i.refresh_token;bo.debug(`ECA3Client: Refresh token changed to ${t.substring(0,5)}...${t.substring(t.length-5)}`);const e=this.#o;this.setRefreshToken(t);const r={apiUrl:this.#u,oldRefreshToken:e,newRefreshToken:i.refresh_token};this.emit(co,r)}return i.access_token}catch(t){const{message:e}=t;throw new Error(`Error getting the Access Token: ${e}`)}}async listAccounts(){const t=await this.getAccessToken();return this.#a(\"custodian_listAccounts\",{},t)}async listAccountsSigned(){const t=await this.getAccessToken();return this.#a(\"custodian_listAccountsSigned\",{},t)}async replaceTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_replaceTransaction\",t,e)}async getCustomerProof(){const t=await this.getAccessToken();return this.#a(\"custodian_getCustomerProof\",{},t)}async createTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_createTransaction\",t,e)}async getAccountChainIds(t){const e=await this.getAccessToken();return this.#a(\"custodian_listAccountChainIds\",t,e)}async signPersonalMessage(t){const e=await this.getAccessToken();return this.#a(\"custodian_sign\",t,e)}async signTypedData(t){const e=await this.getAccessToken();return this.#a(\"custodian_signTypedData\",t,e)}async getTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_getTransactionById\",t,e)}async getSignedMessage(t){const e=await this.getAccessToken();return this.#a(\"custodian_getSignedMessageById\",t,e)}async getTransactionLink(t){const e=await this.getAccessToken();return this.#a(\"custodian_getTransactionLink\",t,e)}async getSignedMessageLink(t){const e=await this.getAccessToken();return this.#a(\"custodian_getSignedMessageLink\",t,e)}}class Co extends Gi.EventEmitter{#r;#n=new Mo;#s;constructor(t,e,r){super();const{refreshToken:n}=t;this.#r=new Po(e,n,t.refreshTokenUrl),this.#s=r,this.#r.on(co,(t=>{this.emit(co,t)})),this.#r.on(fo,(t=>{this.emit(fo,t)}))}async getEthereumAccounts(){return(await this.#r.listAccounts()).result.map((t=>({name:t.name,address:t.address,custodianDetails:null,labels:t.tags.map((t=>({key:t.name,value:t.value}))),metadata:t.metadata})))}async getEthereumAccountsByAddress(t){return(await this.getEthereumAccounts()).filter((e=>e.address.toLowerCase().includes(t.toLowerCase())))}async getListAccountsSigned(){const{result:t}=await this.#r.listAccountsSigned();return t.jwt}async getEthereumAccountsByLabelOrAddressName(t){return(await this.getEthereumAccounts()).filter((e=>e.name.includes(t)))}async createTransaction(t,e){var r;const n=t.from,i=await this.getEthereumAccountsByAddress(n);if(!i.length||!(null===(r=i[0])||void 0===r?void 0:r.address))throw new Error(\"No such ethereum account!\");const o={from:i[0].address,to:t.to,...t.data&&{data:t.data},...t.value&&{value:Io(t.value)},...t.gasLimit&&{gas:Io(t.gasLimit)},...t.type&&{type:Io(t.type)}};2===Number(t.type)?(o.maxFeePerGas=Io(t.maxFeePerGas),o.maxPriorityFeePerGas=Io(t.maxPriorityFeePerGas)):o.gasPrice=Io(t.gasPrice);const s={chainId:Io(e.chainId),...e.origin&&{originUrl:e.origin},...e.note&&{note:e.note},...e.transactionCategory&&{transactionCategory:e.transactionCategory},...\"boolean\"==typeof e.custodianPublishesTransaction&&{custodianPublishesTransaction:e.custodianPublishesTransaction},...e.rpcUrl&&{rpcUrl:e.rpcUrl}},{result:a}=await this.#r.createTransaction([o,s]);if(\"string\"!=typeof a)throw new Error(\"Failed to create transaction\");return{custodianTransactionId:a,transactionStatus:vo(\"created\"),from:i[0].address,custodianPublishesTransaction:e.custodianPublishesTransaction}}async getTransaction(t,e){var r,n;const{result:i}=await this.#r.getTransaction([e]);return i?{transactionStatus:i.transaction.status,custodianTransactionId:i.transaction.id,from:i.transaction.from,gasLimit:i.transaction.gas??null,gasPrice:i.transaction.gasPrice??null,maxFeePerGas:i.transaction.maxFeePerGas??null,maxPriorityFeePerGas:i.transaction.maxPriorityFeePerGas??null,nonce:i.transaction.nonce,transactionHash:i.transaction.hash,to:i.transaction.to,signedRawTransaction:i.transaction.signedRawTransaction??null,chainId:i.metadata.chainId,custodianPublishesTransaction:(null===(r=i.metadata)||void 0===r?void 0:r.custodianPublishesTransaction)??!0,rpcUrl:(null===(n=i.metadata)||void 0===n?void 0:n.rpcUrl)??null}:null}async replaceTransaction(t){const e={transactionId:t.transactionId,action:t.action},r={};t.gasLimit&&(r.gas=Io(t.gasLimit)),t.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=Io(t.maxPriorityFeePerGas)),t.maxFeePerGas&&(r.maxFeePerGas=Io(t.maxFeePerGas));const{result:n}=await this.#r.replaceTransaction([e,r]);return{transactionId:n.transactionId}}async getSignedMessage(t,e){const{result:r}=await this.#r.getSignedMessage([e]);return r?{id:e,signature:r.signature,status:r.status}:null}async getTransactionLink(t){const{result:e}=await this.#r.getTransactionLink([t]);return e?{id:t,url:e.url,text:e.text,action:e.action,ethereum:e.ethereum??{accounts:[],chainId:[]}}:null}async getSignedMessageLink(t){const{result:e}=await this.#r.getSignedMessageLink([t]);return e?{id:t,url:e.url,text:e.text,action:e.action,ethereum:e.ethereum??{accounts:[],chainId:[]}}:null}async getCustomerProof(){const{result:t}=await this.#r.getCustomerProof();return t.jwt}async signTypedData_v4(t,e,r,n){if(!(await this.getEthereumAccountsByAddress(t)).length)throw new Error(\"No such ethereum account!\");const i=r.toLowerCase(),{result:o}=await this.#r.signTypedData([{address:t,data:e,version:i},n]);return{id:o,status:vo(\"created\"),signature:null,from:t}}async signPersonalMessage(t,e,r){if(!(await this.getEthereumAccountsByAddress(t)).length)throw new Error(\"No such ethereum account!\");const{result:n}=await this.#r.signPersonalMessage([{address:t,message:e},r]);return{id:n,status:vo(\"created\"),signature:null,from:t}}async getSupportedChains(t){return this.#n.tryCaching(`getSupportedChains-${t}`,this.#s,(async()=>{const{result:e}=await this.#r.getAccountChainIds([t]);return e}))}changeRefreshTokenAuthDetails(t){this.#r.setRefreshToken(t.refreshToken)}}!function(t){t.ECA3=\"ECA3\",t.ECA1=\"ECA1\",t.BitGo=\"BitGo\",t.Cactus=\"Cactus\"}(So||(So={}));const Ro={[So.ECA3]:Co,[So.ECA1]:ko,[So.BitGo]:wo,[So.Cactus]:Ao},Oo=[{refreshTokenUrl:null,name:\"bitgo-test\",displayName:\"BitGo Test\",production:!1,apiBaseUrl:\"https://app.bitgo-test.com/defi/v2\",apiVersion:So.BitGo,custodianPublishesTransaction:!0,iconUrl:\"https://dashboard.metamask-institutional.io/custodian-icons/bitgo-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://app.bitgo-test.com\",allowedOnboardingDomains:[\"app.bitgo-test.com\",\"localhost:3000\"]},{refreshTokenUrl:null,name:\"bitgo-prod\",legacyName:\"bitgo\",displayName:\"BitGo\",production:!0,apiBaseUrl:\"https://app.bitgo.com/defi/v2\",apiVersion:So.BitGo,custodianPublishesTransaction:!0,iconUrl:\"https://dashboard.metamask-institutional.io/custodian-icons/bitgo-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://app.bitgo.com\",allowedOnboardingDomains:[\"app.bitgo.com\"]},{refreshTokenUrl:null,name:\"cactus\",displayName:\"Cactus Custody\",production:!0,apiVersion:So.Cactus,custodianPublishesTransaction:!0,iconUrl:\"https://dashboard.metamask-institutional.io/custodian-icons/cactus-icon.svg\",isManualTokenInputSupported:!1,apiBaseUrl:\"https://api.mycactus.com/custody/v1/mmi-api\",onboardingUrl:\"https://www.mycactus.com\",allowedOnboardingDomains:[\"www.mycactus.com\",\"www.mycactus.dev\",\"pre.mycactus.com\",\"debug.mycactus.dev:1443\",\"alpha.mycactus.io\"]},{refreshTokenUrl:\"http://localhost:8090/oauth/token\",name:\"gk8-prod\",displayName:\"GK8 ECA-1\",production:!1,apiBaseUrl:\"http://localhost:8090\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://www.gk8.io/wp-content/uploads/2021/04/6-layers-4.svg\",isManualTokenInputSupported:!0,onboardingUrl:\"https://www.gk8.io\",allowedOnboardingDomains:[]},{refreshTokenUrl:\"http://localhost:8090/oauth/token\",name:\"gk8-eca3-prod\",displayName:\"GK8\",production:!0,apiBaseUrl:\"http://localhost:8090\",apiVersion:So.ECA3,custodianPublishesTransaction:!0,iconUrl:\"https://www.gk8.io/wp-content/uploads/2021/04/6-layers-4.svg\",isManualTokenInputSupported:!0,onboardingUrl:\"https://www.gk8.io\",allowedOnboardingDomains:[]},{refreshTokenUrl:\"https://safe-mmi.staging.gnosisdev.com/api/v1/oauth/token/\",name:\"gnosis-safe-dev\",displayName:\"Safe\",production:!1,apiBaseUrl:\"https://safe-mmi.staging.gnosisdev.com/api\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://raw.githubusercontent.com/safe-global/safe-react/dev/public/resources/logo.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://safe.global\",allowedOnboardingDomains:[\"apps-portal.safe.global\"]},{refreshTokenUrl:\"https://safe-mmi.safe.global/api/v1/oauth/token/\",name:\"safe-prod\",displayName:\"Safe\",production:!1,apiBaseUrl:\"https://safe-mmi.safe.global/api\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://raw.githubusercontent.com/safe-global/safe-react/dev/public/resources/logo.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://safe.global\",allowedOnboardingDomains:[\"apps-portal.safe.global\"]},{refreshTokenUrl:\"https://safe-mmi.staging.5afe.dev/api/v1/oauth/token/\",name:\"gnosis-safe-staging\",displayName:\"Gnosis Safe Staging\",production:!1,apiBaseUrl:\"https://safe-mmi.staging.5afe.dev/api\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://raw.githubusercontent.com/safe-global/safe-react/dev/public/resources/logo.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://safe.global\",allowedOnboardingDomains:[\"apps-portal.safe.global\"]},{refreshTokenUrl:\"https://api.mpcvault.com/mmi/token-refresh\",name:\"mpcvault-prod\",displayName:\"MPCVault\",production:!0,apiBaseUrl:\"https://api.mpcvault.com/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/mpcvault-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://console.mpcvault.com/\",allowedOnboardingDomains:[\"console.mpcvault.com\"]},{refreshTokenUrl:\"https://api-preprod.uat.zodia.io/oauth/token\",name:\"zodia-preprod\",displayName:\"Zodia Preprod\",production:!1,apiBaseUrl:\"https://api-preprod.uat.zodia.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://zodia.io/wp-content/uploads/2023/01/cropped-ico.png\",isManualTokenInputSupported:!1,onboardingUrl:\"https://zodia.io\",allowedOnboardingDomains:[\"ui-preprod-v2.uat.zodia.io\"]},{refreshTokenUrl:\"https://mmi.fireblocks.io/v1/auth/access\",name:\"fireblocks-prod\",displayName:\"Fireblocks\",production:!0,apiBaseUrl:\"https://mmi.fireblocks.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/fireblocks-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://console.fireblocks.io/v2/\",allowedOnboardingDomains:[\"console.fireblocks.io\"]},{refreshTokenUrl:\"https://mmi.fireblocks.io/v1/auth/access\",name:\"fireblocks-sandbox\",displayName:\"Fireblocks Sandbox\",production:!0,hideFromUI:!0,apiBaseUrl:\"https://sandbox.fireblocks.io/\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/fireblocks-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://console.fireblocks.io/v2/\",allowedOnboardingDomains:[\"sandbox.fireblocks.io\"]},{refreshTokenUrl:\"https://eu-console.fireblocks.io/v1/auth/access\",name:\"fireblocks-eu\",displayName:\"Fireblocks EU\",production:!0,hideFromUI:!0,apiBaseUrl:\"https://eu-console.fireblocks.io/\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/fireblocks-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://eu-console.fireblocks.io/\",allowedOnboardingDomains:[\"eu-console.fireblocks.io\"]},{refreshTokenUrl:\"https://eu2-console.fireblocks.io/v1/auth/access\",name:\"fireblocks-eu2\",displayName:\"Fireblocks EU2\",production:!0,hideFromUI:!0,apiBaseUrl:\"https://eu2-console.fireblocks.io/\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/fireblocks-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://eu2-console.fireblocks.io/\",allowedOnboardingDomains:[\"eu2-console.fireblocks.io\"]},{refreshTokenUrl:\"https://local.waterballoons.xyz:4200/v1/auth/access\",name:\"waterballoons-local\",displayName:\"Waterballoons\",production:!1,apiBaseUrl:\"https://local.waterballoons.xyz:4200\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://local.waterballoons.xyz:4200\",allowedOnboardingDomains:[\"local.waterballoons.xyz:4200\"]},{refreshTokenUrl:\"https://local.waterballoons.xyz:4200/v1/auth/access\",name:\"waterballoons-dev10\",displayName:\"Waterballoons 10\",production:!1,apiBaseUrl:\"https://dev4-console-api.waterballoons.xyz\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://dev10-console.waterballoons.xyz\",allowedOnboardingDomains:[\"dev10-console.waterballoons.xyz\"]},{refreshTokenUrl:\"https://local.waterballoons.xyz:4200/v1/auth/access\",name:\"waterballoons-dev4\",displayName:\"Waterballoons 4\",production:!1,apiBaseUrl:\"https://dev4-console-api.waterballoons.xyz\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://dev4-console.waterballoons.xyz\",allowedOnboardingDomains:[\"dev4-console.waterballoons.xyz\"]},{refreshTokenUrl:\"https://zapi.custody.zodia.io/oauth/token\",name:\"zodia-prod\",displayName:\"Zodia\",production:!0,apiBaseUrl:\"https://zapi.custody.zodia.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://zodia.io/wp-content/uploads/2023/01/cropped-ico.png\",isManualTokenInputSupported:!1,onboardingUrl:\"https://zodia.io\",allowedOnboardingDomains:[\"zodia.io\",\"v2.custody.zodia.io\"]},{refreshTokenUrl:\"https://api.sit.zodia.io/oauth/token\",name:\"zodia-sit\",displayName:\"Zodia SIT\",production:!1,apiBaseUrl:\"https://api.sit.zodia.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://zodia.io/wp-content/uploads/2023/01/cropped-ico.png\",isManualTokenInputSupported:!1,onboardingUrl:\"https://zodia.io\",allowedOnboardingDomains:[\"sit.zodia.io\",\"ui-v2.sit.zodia.io\"]},{refreshTokenUrl:\"https://api-qa.qa.zodia.io/oauth/token\",name:\"zodia-qa\",displayName:\"Zodia QA\",production:!1,apiBaseUrl:\"https://api-qa.qa.zodia.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://zodia.io/wp-content/uploads/2023/01/cropped-ico.png\",isManualTokenInputSupported:!1,onboardingUrl:\"https://zodia.io\",allowedOnboardingDomains:[\"qa.zodia.io\",\"ui-v2.qa.zodia.io\"]},{refreshTokenUrl:\"http://localhost:8090/oauth/token\",name:\"gk8-eca3-dev\",displayName:\"GK8\",production:!1,apiBaseUrl:\"http://localhost:8090\",apiVersion:So.ECA3,custodianPublishesTransaction:!0,iconUrl:\"https://www.gk8.io/wp-content/uploads/2021/04/6-layers-4.svg\",isManualTokenInputSupported:!0,onboardingUrl:\"https://www.gk8.io\",allowedOnboardingDomains:[]},{refreshTokenUrl:\"https://api.dev.mpcvault.com/mmi/token-refresh\",name:\"mpcvault-dev\",displayName:\"MPCVault\",production:!1,apiBaseUrl:\"https://api.dev.mpcvault.com/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://dev.metamask-institutional.io/custodian-icons/mpcvault-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://console.mpcvault.com/\",allowedOnboardingDomains:[\"console.dev.mpcvault.com\"]},{refreshTokenUrl:\"https://gamma.signer.cubist.dev/v0/oauth/token\",name:\"cubist-gamma\",displayName:\"Cubist Gamma\",production:!1,apiBaseUrl:\"https://gamma.signer.cubist.dev/v0/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://assets-global.website-files.com/638a2693daaf8527290065a3/651802cf8d04ec5f1a09ce86_Logo.svg\",isManualTokenInputSupported:!0,allowedOnboardingDomains:[\"app-gamma.signer.cubist.dev\"]},{refreshTokenUrl:\"https://beta.signer.cubist.dev/v0/oauth/token\",name:\"cubist-beta\",displayName:\"Cubist Beta\",production:!1,apiBaseUrl:\"https://beta.signer.cubist.dev/v0/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://assets-global.website-files.com/638a2693daaf8527290065a3/651802cf8d04ec5f1a09ce86_Logo.svg\",isManualTokenInputSupported:!0,allowedOnboardingDomains:[\"app-beta.signer.cubist.dev\",\"localhost:3000\"]},{refreshTokenUrl:\"https://dg5z0qnzb9s65.cloudfront.net/v0/oauth/token\",name:\"cubist-test\",displayName:\"Cubist Test\",production:!1,apiBaseUrl:\"https://dg5z0qnzb9s65.cloudfront.net/v0/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://assets-global.website-files.com/638a2693daaf8527290065a3/651802cf8d04ec5f1a09ce86_Logo.svg\",isManualTokenInputSupported:!0,allowedOnboardingDomains:[]},{refreshTokenUrl:\"https://prod.signer.cubist.dev/v0/oauth/token\",name:\"cubist-prod\",displayName:\"Cubist\",production:!0,apiBaseUrl:\"https://prod.signer.cubist.dev/v0/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://assets-global.website-files.com/638a2693daaf8527290065a3/651802cf8d04ec5f1a09ce86_Logo.svg\",isManualTokenInputSupported:!0,allowedOnboardingDomains:[\"app.signer.cubist.dev\"]},{refreshTokenUrl:\"http://localhost:3330/oauth/token\",apiBaseUrl:\"http://localhost:3330\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,name:\"local-dev\",displayName:\"Local Dev\",production:!1,iconUrl:\"https://dev.metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!0,allowedOnboardingDomains:[\"localhost:8000\",\"http://localhost:8000\"]}];class Lo{static async signTypedData(t,e,r,n={version:ro.SignTypedDataVersion.V4}){if(!e)throw new Error(\"Typed data is required\");return await r.signTypedData_v4(t,e,n.version,{chainId:\"0x420\"})}static async signPersonalMessage(t,e,r){return await r.signPersonalMessage(t,e,{chainId:\"0x420\"})}}var No=r(59353),Uo=r(31664);var jo=r(48834).Buffer;const Do=t=>{if(t&&\"0x\"!==t)return\"string\"==typeof t?t.startsWith(\"0x\")?t:`0x${t}`:`0x${jo.from(t).toString(\"hex\")}`},zo=\"0\",Ho=\"2\";var Fo=r(48834).Buffer;class $o{static createTransactionPayload(t){const e=void 0!==t.maxFeePerGas,r={...t,type:e?Ho:zo,data:Do(t.data)};return e?{...r,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas).toString():\"0\",maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas).toString():\"0\"}:{...r,gasPrice:t.gasPrice?BigInt(t.gasPrice).toString():\"0\"}}static async getTransactionSignature(t,e){if(t.signedRawTransaction){var r,n,i;bo.info(\"Transaction is signed\",t.signedRawTransaction);const o=this.getTypedTransaction(t,e);return{v:Io((null===(r=o.v)||void 0===r?void 0:r.toString())??\"0\"),r:Io((null===(n=o.r)||void 0===n?void 0:n.toString())??\"0\"),s:Io((null===(i=o.s)||void 0===i?void 0:i.toString())??\"0\")}}bo.debug(\"Fetching signature from the network\",t.transactionHash);const o=await ethereum.request({method:\"eth_getTransactionByHash\",params:[t.transactionHash]});return bo.debug(\"Got signature from the network\",o),{v:o.v,r:o.r,s:o.s}}static getTypedTransaction(t,e){if(!t.signedRawTransaction)throw new Error(\"Transaction is not signed\");const r=((t,e)=>{const r=parseInt(e);if(isNaN(r))throw new Error(`Invalid chainId ${e}`);return Uo.Common.custom({chainId:r},{hardfork:t.maxPriorityFeePerGas||t.maxFeePerGas?Uo.Hardfork.London:Uo.Hardfork.Istanbul})})(t,e),n=Fo.from(t.signedRawTransaction.substring(2),\"hex\");return No.TransactionFactory.fromSerializedData(n,{common:r})}static validateTransaction(t,e){const r=this.getTypedTransaction(e,t.chainId);return Number(t.nonce)!==Number(r.nonce)?{isValid:!1,error:`Custodian altered the nonce from the request: ${Number(t.nonce)} to ${Number(r.nonce)}`}:\"gasPrice\"in t&&\"gasPrice\"in r&&Number(t.gasPrice)!==Number(r.gasPrice)?{isValid:!1,error:`Custodian altered the gas price from the request: ${t.gasPrice} to ${r.gasPrice}`}:\"maxFeePerGas\"in t&&\"maxFeePerGas\"in r&&Number(t.maxFeePerGas)!==Number(r.maxFeePerGas)?{isValid:!1,error:`Custodian altered the maxFeePerGas from the request: ${t.maxFeePerGas} to ${r.maxFeePerGas}`}:\"maxPriorityFeePerGas\"in t&&\"maxPriorityFeePerGas\"in r&&Number(t.maxPriorityFeePerGas)!==Number(r.maxPriorityFeePerGas)?{isValid:!1,error:`Custodian altered the maxPriorityFeePerGas from the request: ${t.maxPriorityFeePerGas} to ${r.maxPriorityFeePerGas}`}:{isValid:!0}}}const Vo=S({finished:b(),success:b(),displayText:T(),reason:x(E(T())),submitted:b(),signed:b()}),qo=S({transactionStatus:Vo,transactionHash:x(E(T())),custodianTransactionId:T(),from:T(),gasPrice:x(E(T())),gasLimit:x(E(T())),maxFeePerGas:x(E(T())),maxPriorityFeePerGas:x(E(T())),nonce:x(E(T())),to:x(T()),value:x(T()),data:x(T()),transactionId:x(T()),chainId:x(T()),custodianPublishesTransaction:b(),signedRawTransaction:x(E(T())),rpcUrl:x(E(T())),note:x(T()),type:x(E(T()))}),Go=S({id:T(),signature:E(T()),status:S(),from:x(T())}),Ko=(S({finished:b(),signed:b(),success:b(),displayText:T(),reason:x(E(T()))}),S({custodianType:v([So.ECA3,So.ECA1,So.BitGo,So.Cactus]),custodianEnvironment:T(),custodianApiUrl:T(),custodianDisplayName:T(),token:T(),refreshTokenUrl:T()})),Jo=S({custodianType:v([So.ECA3,So.ECA1,So.BitGo,So.Cactus]),custodianEnvironment:T(),custodianApiUrl:T(),token:T()}),Wo=S({name:T(),address:T(),details:Ko,origin:T()}),Zo=(S({type:M(\"transaction\"),transaction:qo}),S({type:M(\"message\"),message:Go,subType:M(\"personalSign\"),signature:E(T())}),S({type:M(\"message\"),message:Go,subType:v([\"v3\",\"v4\"]),signature:E(T())}),S({from:T(),to:T(),value:T(),data:T(),chainId:T()}));class Xo{#c;#f;#l;constructor(t,e){this.#l=t,this.#c=new Map,this.#f=e}async listAccounts(){return this.#l.listAccounts()}async getAccount(t){return await this.#l.getAccount(t)??void 0}async createAccount(t){var e;c(t,Wo);const r=Oo.find((e=>e.apiBaseUrl===t.details.custodianApiUrl));let n,i;if(pr.dev)n=t.details.custodianEnvironment,i=t.details.custodianDisplayName;else{if(!r)throw new Error(`No custodian allowlisted for API URL: ${t.details.custodianApiUrl}`);n=r.name,i=t.details.custodianDisplayName}const{address:o,name:s}=t;if(!function(t,e){return!e.find((e=>Fi(e.account.address)===Fi(t)))}(o,await this.#l.listWallets()))throw new Error(`Account address already in use: ${o}`);let a=!1;(null===(e=r)||void 0===e?void 0:e.custodianPublishesTransaction)&&(a=!0);try{const e={id:ho(),options:{custodian:{environmentName:n,displayName:i,deferPublication:a,importOrigin:t.origin},accountName:s},address:o,methods:[yt.SignTransaction,yt.PersonalSign,yt.SignTypedDataV3,yt.SignTypedDataV4],type:et.Eoa};return await this.#d(Et.AccountCreated,{account:e,accountNameSuggestion:s??\"Custodial Account\",displayConfirmation:!1,displayAccountNameSuggestion:!1}),await this.#l.addWallet({account:e,details:t.details}),e}catch(t){throw new Error(t.message)}}async filterAccountChains(t,e){const r=await this.getAccount(t);if(!r)throw new Error(`Account '${t}' not found`);const n=await this.getCustodianApiForAddress(r.address),i=await n.getSupportedChains();return e.filter((t=>i.includes(function(t){const e=parseInt(t,16);if(isNaN(e))throw new Error(`Invalid chainId ${t}`);return`eip155:${e}`}(t))))}async updateAccount(t){throw new fr}async deleteAccount(t){try{await this.#l.withTransaction((async()=>{await this.#l.removeAccounts([t]),await this.#d(Et.AccountDeleted,{id:t})}))}catch(t){bo.error(t),function(t){throw new Error(t)}(t.message)}}async listRequests(){if(pr.dev){return(await this.#f.listRequests()).map((t=>t.keyringRequest))}return[]}async getRequest(t){if(c(t,T()),pr.dev){const e=(await this.#f.listRequests()).find((e=>e.keyringRequest.id===t));if(!e)throw new Error(`Request '${t}' not found`);return e.keyringRequest}throw new Error(\"Method not implemented.\")}async submitRequest(t){return pr.dev?this.#p(t):(c(t,at),function(t,e){try{return t()}catch(t){throw new Error(e??\"An unexpected error occurred\")}}((async()=>this.#p(t)),\"An unexpected error occurred\"))}async approveRequest(t){throw new Error(\"Method not implemented.\")}async rejectRequest(t){throw new Error(\"Method not implemented.\")}async getCustodianApiForAddress(t){const e=Fi(t);if(!this.#c.has(e)){const r=await this.#l.getWalletByAddress(e);if(!r)throw bo.debug(`Wallet does not exist error. Address: ${t}, Checksum address: ${e}`),bo.debug(`All wallets: ${JSON.stringify(await this.#l.listWallets())}`),new Error(`Wallet for account ${t} does not exist`);const n=this.#m(r.details);this.#c.set(e,n)}return this.#c.get(e)}#m(t){const e=new(0,Ro[t.custodianType])({refreshToken:t.token,refreshTokenUrl:t.refreshTokenUrl},t.custodianApiUrl,1e3);return e.on(co,(t=>{this.#g(t).catch(bo.error)})),e}async getConnectedAccounts(t,e){return(await this.#l.listWallets()).filter((r=>r.details.token===t.token&&r.details.custodianApiUrl===t.custodianApiUrl&&r.details.custodianType===t.custodianType&&r.details.custodianEnvironment===t.custodianEnvironment&&r.account.options.custodian.importOrigin===e)).map((t=>t.account))}async#g(t){const e=(await this.#l.listWallets()).filter((e=>e.details.token===t.oldRefreshToken&&e.details.custodianApiUrl===t.apiUrl));for(const r of e){const e={...r.details,token:t.newRefreshToken};this.#c.delete(r.account.address),await this.#l.updateWalletDetails(r.account.id,e)}}async#p(t){const e=await this.#y(t.request.method,t.request.params??[],t),r=await this.getAccount(t.account);if(!r)throw new Error(`Account '${t.account}' not found`);const{address:n}=r;let i=null;try{if(t.request.method===yt.SignTransaction){const t=await this.getCustodianApiForAddress(n);i=await t.getTransactionLink(e)}else{const t=await this.getCustodianApiForAddress(n);i=await t.getSignedMessageLink(e)}}catch(t){i={text:\"Complete in Custodian App\",id:e,url:\"\",action:\"view\"},console.error(\"Error getting deep link\",t)}return await async function(t){await snap.request({method:\"snap_notify\",params:{type:\"inApp\",message:t}})}(`${i.text} Transaction ID: ${i.id}`),{pending:!0}}async#y(t,e,r){const n=await this.getAccount(r.account);if(!n)throw new Error(`Account '${r.account}' not found`);if(!n.methods.includes(t))throw new Error(`Method '${t}' not supported for account '${n.address}'`);switch(t){case yt.PersonalSign:{const[t,n]=e,i=await this.getCustodianApiForAddress(n),o=await Lo.signPersonalMessage(n,t,i);return await this.#f.upsertRequest({keyringRequest:r,type:\"message\",subType:\"personalSign\",fulfilled:!1,rejected:!1,message:o,signature:null,lastUpdated:Date.now()}),o.id}case yt.SignTransaction:{const[t]=e;return await this.#b(t,r)}case yt.SignTypedDataV3:{const[t,n]=e,i=await this.getCustodianApiForAddress(t),o=await Lo.signTypedData(t,n,i,{version:ro.SignTypedDataVersion.V3});return await this.#f.upsertRequest({keyringRequest:r,type:\"message\",subType:\"v3\",fulfilled:!1,rejected:!1,message:o,signature:null,lastUpdated:Date.now()}),o.id}case yt.SignTypedDataV4:{const[t,n]=e,i=await this.getCustodianApiForAddress(t),o=await Lo.signTypedData(t,n,i,{version:ro.SignTypedDataVersion.V4});return await this.#f.upsertRequest({keyringRequest:r,type:\"message\",subType:\"v4\",fulfilled:!1,rejected:!1,message:o,signature:null,lastUpdated:Date.now()}),o.id}default:throw new Error(`EVM method '${t}' not supported`)}}async#b(t,e){try{const r=await this.getCustodianApiForAddress(t.from),n=$o.createTransactionPayload(t),i=await this.#l.getWalletByAddress(t.from);if(!i)throw new Error(`Account '${t.from}' not found`);const o=i.account.options.custodian.deferPublication,s=await r.createTransaction(n,{chainId:t.chainId,custodianPublishesTransaction:o});return await this.#f.upsertRequest({keyringRequest:e,type:\"transaction\",fulfilled:!1,rejected:!1,lastUpdated:Date.now(),transaction:s}),s.custodianTransactionId}catch(t){throw console.error(\"Transaction signing failed:\",t),new Error(`Failed to sign transaction: ${t.message}`)}}async#d(t,e){await re(snap,t,e)}}async function Yo(t){await snap.request({method:\"snap_notify\",params:{type:\"inApp\",message:t}})}class Qo{#v;#l;constructor(t,e){this.#l=t,this.#v=e}async upsertRequest(t){return this.#l.upsertRequest(t)}async listRequests(){return this.#l.listRequests()}async clearAllRequests(){return this.#l.clearAllRequests()}async getChainIdFromPendingRequest(t){const e=await this.getRequestParams(t);if(!e.chainId)throw new Error(`Request ${t} has no chainId`);return e.chainId}async getMutableTransactionParameters(t){const e=(await this.listRequests()).filter((t=>Boolean(t.transaction))).filter((e=>{const r=e.keyringRequest.request.params;if(!Array.isArray(r)||0===r.length)return!1;const n=r[0];return n.from===t.from&&n.to===t.to&&n.value===t.value&&n.data===t.data&&n.chainId===t.chainId})).sort(((t,e)=>e.lastUpdated-t.lastUpdated))[0];if(!e)throw new Error(\"No matching transaction request found\");return e}async getRequestParams(t){const e=await this.#l.getRequest(t);if(!e)throw new Error(`Request ${t} not found`);const r=e.keyringRequest.request.params;if(!Array.isArray(r)||0===r.length)throw new Error(`Request ${t} has invalid params`);return r[0]}async poll(){const t=(await this.listRequests()).filter((t=>!t.fulfilled));for(const e of t)switch(e.type){case\"message\":try{await this.pollSignedMessage(e.keyringRequest.id,e)}catch(t){bo.info(`Error polling signed message request ${e.keyringRequest.id}`),pr.dev&&bo.error(t)}break;case\"transaction\":try{await this.pollTransaction(e.keyringRequest.id,e)}catch(t){bo.info(`Error polling transaction request ${e.keyringRequest.id}`),pr.dev&&bo.error(t)}break;default:bo.debug(`Unknown request type: ${String(e.type)}`),await this.#l.removeRequest(e.keyringRequest.id)}}async pollTransaction(t,e){var r,n,i;const{account:o}=e.keyringRequest,s=await this.#v.getAccount(o);if(!s)throw new Error(`Account ${o} not found`);const{address:a}=s,u=await this.#v.getCustodianApiForAddress(a),{custodianTransactionId:h}=e.transaction;if(e.lastUpdated<Date.now()-lo)return bo.info(`Transaction ${h} last updated more than 3600000ms (last updated ${Date.now()-e.lastUpdated}ms ago), removing request`),await this.emitRejectedEvent(t),void await this.#l.removeRequest(t);const f=await u.getTransaction(a,h);if(c(f,qo),(null===(r=f)||void 0===r?void 0:r.transactionStatus.finished)&&!f.transactionStatus.success)return await this.emitRejectedEvent(t),bo.info(\"Removing failed transaction request\",t),void await this.#l.removeRequest(t);if((null===(n=f)||void 0===n?void 0:n.transactionStatus.finished)&&f.transactionStatus.success||(null===(i=f)||void 0===i?void 0:i.signedRawTransaction)){const r=await this.getChainIdFromPendingRequest(t),n=await $o.getTransactionSignature(f,r);if(f.signedRawTransaction){const e=$o.validateTransaction(await this.getRequestParams(t),f);if(!e.isValid){if(e.error){const t=`Transaction ${h} was signed by custodian but failed validation: ${e.error}`;await Yo(t)}return await this.emitRejectedEvent(t),void await this.#l.removeRequest(t)}}const i={...this.#w(e,f),fulfilled:!0,result:n,lastUpdated:Date.now()};await this.#l.upsertRequest(i),await this.emitApprovedEvent(t,n)}else if(f){const t=this.#w(e,f);await this.#l.upsertRequest(t)}}async pollSignedMessage(t,e){var r,n;const{account:i}=e.keyringRequest,o=await this.#v.getAccount(i);if(!o)throw new Error(`Account ${i} not found`);const{address:s}=o,a=await this.#v.getCustodianApiForAddress(s);if(e.lastUpdated<Date.now()-po)return bo.info(`Signed Message ${e.message.id} last updated more than 3600000ms (last updated ${Date.now()-e.lastUpdated}ms ago), removing request`),await this.emitRejectedEvent(t),void await this.#l.removeRequest(t);const u=await a.getSignedMessage(s,e.message.id);if(null===(n=u)||void 0===n||null===(r=n.status)||void 0===r?void 0:r.finished){if(u.status.success){const r={...e,fulfilled:!0,signature:u.signature,lastUpdated:Date.now()};await this.#l.upsertRequest(r),await this.emitApprovedEvent(t,u.signature)}else await this.emitRejectedEvent(t);await this.#l.removeRequest(t)}}async emitApprovedEvent(t,e){try{await re(snap,Et.RequestApproved,{id:t,result:e})}catch(e){if(!e.message.includes(`Request '${t}' not found`))throw e;bo.info(`Request '${t}' not found, removing from state`),await this.#l.removeRequest(t)}}async emitRejectedEvent(t){try{await re(snap,Et.RequestRejected,{id:t})}catch(e){if(!e.message.includes(`Request '${t}' not found`))throw e;bo.info(`Request '${t}' not found, removing from state`),await this.#l.removeRequest(t)}}#w(t,e){return{...t,transaction:{...t.transaction,transactionStatus:{finished:e.transactionStatus.finished??!1,success:e.transactionStatus.success??!1,displayText:e.transactionStatus.displayText??\"\",submitted:e.transactionStatus.submitted??!1,reason:e.transactionStatus.reason??\"\",signed:e.transactionStatus.signed??!1},...e.transactionHash&&{transactionHash:e.transactionHash},...e.gasPrice&&{gasPrice:e.gasPrice},...e.maxFeePerGas&&{maxFeePerGas:e.maxFeePerGas},...e.maxPriorityFeePerGas&&{maxPriorityFeePerGas:e.maxPriorityFeePerGas},...e.gasLimit&&{gasLimit:e.gasLimit},...e.nonce&&{nonce:e.nonce},...e.to&&{to:e.to},...e.value&&{value:e.value},...e.data&&{data:e.data},...e.chainId&&{chainId:e.chainId},...e.from&&{from:e.from}}}}}var ts;!function(t){t.Onboard=\"authentication.onboard\",t.ClearAllRequests=\"snap.internal.clearAllRequests\",t.GetMutableTransactionParameters=\"transactions.getMutableTransactionParameters\",t.GetConnectedAccounts=\"authentication.getConnectedAccounts\",t.GetIsSupported=\"authentication.getIsSupported\"}(ts||(ts={}));const es=new Set([At.ListAccounts,At.GetAccount,At.FilterAccountChains,At.DeleteAccount,At.ListRequests,At.GetRequest,At.SubmitRequest,ts.GetMutableTransactionParameters]),rs=new Map;function ns(){rs.clear(),rs.set(\"metamask\",es),Oo.forEach((t=>{if(t.allowedOnboardingDomains){if(!pr.dev&&!t.production)return;t.allowedOnboardingDomains.forEach((t=>{rs.set(t,new Set([ts.Onboard])),rs.set(`https://${t}`,new Set([ts.Onboard,ts.GetConnectedAccounts,ts.GetIsSupported])),\"localhost:3000\"===t&&rs.set(\"http://localhost:3000\",new Set([ts.Onboard]))}))}}));const t=new Set([At.ListAccounts,At.GetAccount,At.CreateAccount,At.FilterAccountChains,At.UpdateAccount,At.DeleteAccount,At.ListRequests,At.GetRequest,ts.Onboard,ts.ClearAllRequests,ts.GetConnectedAccounts,ts.GetIsSupported]);pr.dev&&rs.set(\"http://localhost:8000\",t)}function is(t,e){var r;return(null===(r=rs.get(t))||void 0===r?void 0:r.has(e))??!1}ns();new Error(\"timeout while waiting for mutex to become available\"),new Error(\"mutex already locked\");const os=new Error(\"request for lock canceled\");var ss=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};class as{constructor(t,e=os){this._value=t,this._cancelError=e,this._queue=[],this._weightedWaiters=[]}acquire(t=1,e=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise(((r,n)=>{const i={resolve:r,reject:n,weight:t,priority:e},o=us(this._queue,(t=>e<=t.priority));-1===o&&t<=this._value?this._dispatchItem(i):this._queue.splice(o+1,0,i)}))}runExclusive(t){return ss(this,arguments,void 0,(function*(t,e=1,r=0){const[n,i]=yield this.acquire(e,r);try{return yield t(n)}finally{i()}}))}waitForUnlock(t=1,e=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,e)?Promise.resolve():new Promise((r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),function(t,e){const r=us(t,(t=>e.priority<=t.priority));t.splice(r+1,0,e)}(this._weightedWaiters[t-1],{resolve:r,priority:e})}))}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach((t=>t.reject(this._cancelError))),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(t){const e=this._value;this._value-=t.weight,t.resolve([e,this._newReleaser(t.weight)])}_newReleaser(t){let e=!1;return()=>{e||(e=!0,this.release(t))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let t=this._value;t>0;t--){const e=this._weightedWaiters[t-1];e&&(e.forEach((t=>t.resolve())),this._weightedWaiters[t-1]=[])}else{const t=this._queue[0].priority;for(let e=this._value;e>0;e--){const r=this._weightedWaiters[e-1];if(!r)continue;const n=r.findIndex((e=>e.priority<=t));(-1===n?r:r.splice(0,n)).forEach((t=>t.resolve()))}}}_couldLockImmediately(t,e){return(0===this._queue.length||this._queue[0].priority<e)&&t<=this._value}}function us(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}var hs=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};class cs{constructor(t){this._semaphore=new as(1,t)}acquire(){return hs(this,arguments,void 0,(function*(t=0){const[,e]=yield this._semaphore.acquire(1,t);return e}))}runExclusive(t,e=0){return this._semaphore.runExclusive((()=>t()),1,e)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const fs=new cs;class ls{mtx;#M;#_;constructor({createLock:t=!1,encrypted:e=!0}={}){this.mtx=function(t=!1){return t?new cs:fs}(t),this.#M={id:void 0,orgState:void 0,current:void 0,isRollingBack:!1,hasCommitted:!1},this.#_=e}async get(){return async function(t){return await snap.request({method:\"snap_manageState\",params:{operation:\"get\",encrypted:t}})}(this.#_)}async set(t){return async function({data:t,encrypted:e}){await snap.request({method:\"snap_manageState\",params:{operation:\"update\",newState:t,encrypted:e}})}({data:t,encrypted:this.#_})}async update(t){if(this.mtx.isLocked()){if(this.#M.current)return bo.info(`SnapStateManager.update [${this.#E}]: transaction is processing, use existing state`),void await t(this.#M.current);bo.info(\"SnapStateManager.update: transaction is not exist, create lock after prev lock is released\")}await this.mtx.runExclusive((async()=>{const e=await this.get();await t(e),await this.set(e)}))}async withTransaction(t){await this.mtx.runExclusive((async()=>{if(await this.#A(),!this.#M.current||!this.#M.orgState||!this.#M.id)throw new Error(\"Failed to begin transaction\");bo.info(`SnapStateManager.withTransaction [${this.#E}]: begin transaction`);try{await t(this.#M.current),await this.set(this.#M.current)}catch(t){throw bo.info(`SnapStateManager.withTransaction [${this.#E}]: error : ${JSON.stringify(t instanceof Error?t.message:String(t))}`),await this.#S(),t}finally{this.#x()}}))}async commit(){if(!this.#M.current||!this.#M.orgState)throw new Error(\"Failed to commit transaction\");this.#M.hasCommitted=!0,await this.set(this.#M.current)}async#A(){this.#M={id:ho(),orgState:await this.get(),current:await this.get(),isRollingBack:!1,hasCommitted:!1}}async#S(){try{this.#M.hasCommitted&&!this.#M.isRollingBack&&this.#M.orgState&&(bo.info(`SnapStateManager.rollback [${this.#E}]: attempt to rollback state`),this.#M.isRollingBack=!0,await this.set(this.#M.orgState))}catch(t){throw bo.info(`SnapStateManager.rollback [${this.#E}]: error : ${JSON.stringify(t)}`),new Error(\"Failed to rollback state\")}}#x(){this.#M.orgState=void 0,this.#M.current=void 0,this.#M.id=void 0,this.#M.isRollingBack=!1,this.#M.hasCommitted=!1}get#E(){return this.#M.id??\"\"}}function ds(t,e){return t instanceof e?t:new e(t.message)}let ps,ms;const gs=new class extends ls{async get(){return super.get().then((t=>(t||(t={activated:!1,devMode:!1,wallets:{},walletIds:[],requests:{}}),t.wallets||(t.wallets={}),t.walletIds||(t.walletIds=[]),t.requests||(t.requests={}),t)))}async listAccounts(){const t=await this.get();return Object.values(t.wallets).map((t=>t.account))}async listWallets(){const t=await this.get();return Object.values(t.wallets)}async addWallet(t){try{await this.update((async e=>{const{id:r,address:n}=t.account;if(this.isAccountExist(e,r)||await this.getWalletByAddress(n))throw new Error(`Account address ${n} already exists`);e.wallets[r]=t,e.walletIds.push(r)}))}catch(t){throw ds(t,Error)}}async updateAccount(t){try{await this.update((async e=>{if(!this.isAccountExist(e,t.id))throw new Error(`Account id ${t.id} does not exist`);const r=e.wallets[t.id];if(!r)throw new Error(`Wallet for account ${t.id} does not exist`);const n=r.account;if(n.address.toLowerCase()!==t.address.toLowerCase()||n.type!==t.type)throw new Error(\"Account address or type is immutable\");r.account=t}))}catch(t){throw ds(t,Error)}}async updateWalletDetails(t,e){try{await this.update((async r=>{const n=r.wallets[t];if(!n)throw new Error(`Wallet for account ${t} does not exist`);n.details=e}))}catch(t){throw ds(t,Error)}}async removeAccounts(t){try{await this.update((async e=>{const r=new Set;for(const n of t){if(!this.isAccountExist(e,n))throw new Error(`Account id ${n} does not exist`);r.add(n)}r.forEach((t=>delete e.wallets[t])),e.walletIds=e.walletIds.filter((t=>!r.has(t)))}))}catch(t){throw ds(t,Error)}}async getAccount(t){try{var e;return(null===(e=(await this.get()).wallets[t])||void 0===e?void 0:e.account)??null}catch(t){throw ds(t,Error)}}async getWallet(t){try{return(await this.get()).wallets[t]??null}catch(t){throw ds(t,Error)}}async getWalletByAddress(t){const e=await this.get();return Object.values(e.wallets).find((e=>Fi(e.account.address.toString())===Fi(t)))??null}async listRequests(){const t=await this.get();return Object.values(t.requests)}async getRequest(t){try{return(await this.get()).requests[t]??null}catch(t){throw ds(t,Error)}}async upsertRequest(t){try{await this.update((async e=>{e.requests[t.keyringRequest.id]={...e.requests[t.keyringRequest.id],...t}}))}catch(t){throw ds(t,Error)}}async removeRequest(t){try{await this.update((async e=>{e.requests[t]?delete e.requests[t]:bo.debug(\"request not found\",t)}))}catch(t){throw ds(t,Error)}}async clearAllRequests(){await this.update((async t=>{t.requests={}}))}isAccountExist(t,e){return Object.prototype.hasOwnProperty.call(t.wallets,e)}isRequestExist(t,e){return Object.prototype.hasOwnProperty.call(t.requests,e)}async setActivated(t){await this.update((async e=>{e.activated=t}))}async getActivated(){return(await this.get()).activated}async setDevMode(t){await this.update((async e=>{e.devMode=t}))}async getDevMode(){return(await this.get()).devMode}async syncDevMode(){const t=await this.getDevMode();var e;e=t,dr.dev=e,ns(),bo.debug(\"Set dev mode to\",t)}},ys={upsertRequest:async t=>(ms=await Ms(),ms.upsertRequest(t)),listRequests:async()=>(ms=await Ms(),ms.listRequests())},bs={getCustodianApiForAddress:async t=>(ps=await ws(),await ps.getCustodianApiForAddress(t)),getAccount:async t=>(ps=await ws(),ps.getAccount(t))};async function vs(){return gs}async function ws(){return ps||(ps=new Xo(gs,ys)),ps}async function Ms(){return ms||(ms=new Qo(gs,bs)),ms}function _s(t,e,r){if(\"string\"==typeof t)throw new Error(`An HTML element (\"${String(t)}\") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!t)throw new Error(\"A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.\");return t({...e,key:r})}function Es(t,e,r){return _s(t,e,r)}function As(t){return Object.fromEntries(Object.entries(t).filter((([,t])=>void 0!==t)))}function Ss(t){return e=>{const{key:r=null,...n}=e;return{type:t,props:As(n),key:r}}}const xs=Ss(\"Container\"),Bs=Ss(\"Box\"),Ts=Ss(\"Heading\"),Is=Ss(\"Form\"),ks=Ss(\"Field\"),Ps=Ss(\"Input\"),Cs=Ss(\"Text\"),Rs=Ss(\"Footer\"),Os=Ss(\"Button\");var Ls,Ns;!function(t){t.RemoveCustodianToken=\"homepage-remove-custodian-token\",t.CancelRemoveToken=\"homepage-cancel-remove-token\",t.RemoveToken=\"homepage-remove-token\",t.CancelToken=\"homepage-cancel-token\",t.ToggleDevMode=\"homepage-toggle-dev-mode\"}(Ls||(Ls={})),function(t){t.SelectCustodian=\"homepage-select-\",t.ConnectToken=\"homepage-connect-token-\"}(Ns||(Ns={}));const Us=({custodianName:t,error:e})=>{var r,n;if(!t)throw new Error(\"Custodian name is required\");const i=Oo.find((e=>e.name===t));return Es(xs,{children:[Es(Bs,{children:[_s(Ts,{children:\"Add Refresh Token\"}),Es(Is,{name:\"addTokenForm\",children:[_s(ks,{label:\"Paste your Refresh Token\",children:_s(Ps,{name:\"token\",placeholder:\"Enter your Refresh Token\"})}),_s(ks,{label:`${(null===(r=i)||void 0===r?void 0:r.displayName)??\"Custodian\"} API URL`,children:_s(Ps,{name:\"apiUrl\",value:null===(n=i)||void 0===n?void 0:n.apiBaseUrl})})]}),e?_s(Cs,{children:e}):null]}),Es(Rs,{children:[_s(Os,{name:Ls.CancelToken,children:\"Cancel\"}),_s(Os,{name:`${Ns.ConnectToken}${t}`,children:\"Connect\"})]})]})},js=Ss(\"Link\"),Ds=Ss(\"Section\"),zs=Ss(\"Image\"),Hs='<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 -34.5 129 129\">\\n    <g>\\n        <g>\\n            <g>\\n                <g>\\n                    <path fill=\"#00e6e6\" d=\"M104.997 52.376a7.849 7.849 0 1 1 0-15.698 7.849 7.849 0 0 1 0 15.698zm9.814-19.595a12.908 12.908 0 0 0 3.149-8.463c0-7.159-5.804-12.962-12.963-12.962-7.159 0-12.962 5.803-12.962 12.962 0 3.235 1.188 6.191 3.148 8.463a15.275 15.275 0 0 0-5.494 11.747c0 8.454 6.853 15.308 15.308 15.308s15.309-6.854 15.309-15.308c0-4.72-2.137-8.939-5.495-11.747z\"/>\\n                </g>\\n                <g>\\n                    <path fill=\"#00e6e6\" d=\"M23.375 59.153c-6.372 0-11.862-2.235-16.466-6.707C2.303 47.975 0 42.284 0 35.375c0-6.909 2.303-12.61 6.909-17.105 4.604-4.493 10.239-6.74 16.903-6.74 4.964 0 9.379 1.219 13.247 3.655a20.356 20.356 0 0 1 5.935 5.658c1.38 1.987-.02 4.706-2.44 4.706h-2.58a2.952 2.952 0 0 1-2.46-1.298c-2.552-3.83-6.453-5.745-11.702-5.745-4.696 0-8.531 1.542-11.504 4.628-2.975 3.085-4.46 7.166-4.46 12.241 0 5.076 1.485 9.156 4.46 12.241 2.973 3.086 6.674 4.629 11.101 4.629 4.428 0 7.949-1.174 10.564-3.522 1.663-1.492 2.906-3.323 3.729-5.493.744-1.962-.687-4.065-2.785-4.065H24.18a2.984 2.984 0 1 1 0-5.97H43.9a2.984 2.984 0 0 1 2.985 2.985v2.774c0 .14-.009.281-.028.421-.75 5.499-3.245 10.157-7.484 13.976-4.293 3.869-9.625 5.802-15.998 5.802z\"/>\\n                </g>\\n                <g>\\n                    <path fill=\"#00e6e6\" d=\"M57.103 58.65h-.307a3.67 3.67 0 0 1-3.67-3.67V15.703a3.67 3.67 0 0 1 3.67-3.67h.307a3.67 3.67 0 0 1 3.67 3.67v17.594l17.65-20.02a3.669 3.669 0 0 1 2.753-1.243c3.192 0 4.862 3.794 2.706 6.148L70.316 32.99a3.67 3.67 0 0 0-.027 4.928l13.102 14.614c2.119 2.362.442 6.118-2.732 6.118h-.165a3.669 3.669 0 0 1-2.776-1.269L60.772 37.79v17.19a3.67 3.67 0 0 1-3.669 3.67z\"/>\\n                </g>\\n            </g>\\n            <g>\\n                <path fill=\"#00e6e6\" d=\"M117.587 5.706a5.706 5.706 0 1 1 11.413 0 5.706 5.706 0 0 1-11.413 0z\"/>\\n            </g>\\n        </g>\\n    </g>\\n</svg>',Fs=Ss(\"Checkbox\"),$s=({devMode:t})=>_s(Bs,{children:_s(Fs,{checked:t,name:Ls.ToggleDevMode,variant:\"toggle\",label:\"Enable development custodians\"})}),Vs={\"bitgo-prod\":'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 32 32\" fill=\"none\">\\n<g clip-path=\"url(#clip0_4284_19554)\">\\n<rect width=\"32\" height=\"32\" rx=\"4\" fill=\"white\"/>\\n<path d=\"M15.9583 27.5C15.9583 27.5 25.7914 24.1545 25.7914 11.8674V7.44457C25.7914 6.9598 25.4144 6.57078 24.9415 6.54085C23.158 6.45108 18.9268 6.09199 15.9583 4.5C12.9956 6.09199 8.75836 6.45108 6.97486 6.53486C6.50205 6.57078 6.125 6.9598 6.125 7.44457V11.8674C6.125 24.1545 15.9583 27.5 15.9583 27.5Z\" fill=\"#00AEEF\"/>\\n<path d=\"M19.9316 13.4826C19.812 12.1419 18.6628 11.6811 17.2025 11.5434L17.2085 9.67017L16.0773 9.67615L16.0833 11.4896C15.7841 11.4896 15.4668 11.4896 15.1617 11.4956V9.6582L14.0186 9.66419L14.0246 11.5255C13.7791 11.5315 11.7383 11.5315 11.7383 11.5315V12.7225H13.1866L13.1807 18.7073L11.9118 18.7133L11.8999 20.078C11.8999 20.078 13.6953 20.072 13.9587 20.072L13.9647 21.9572L15.0898 21.9632L15.1018 20.09C15.4131 20.0958 15.7122 20.1018 16.0056 20.1078L15.9996 21.9632H17.1427L17.1367 20.09C19.0398 19.9941 20.3805 19.5213 20.5601 17.7378C20.7037 16.2955 20.0333 15.6491 18.9501 15.3857C19.6085 15.0506 20.0215 14.4641 19.9316 13.4826ZM18.3217 17.4925C18.3097 18.899 15.9277 18.7253 15.1557 18.7193L15.1497 16.2237C15.9217 16.2296 18.3337 16.0262 18.3217 17.4925ZM17.819 13.9733C17.807 15.2541 15.82 15.0925 15.1856 15.0865L15.1796 12.8242C15.814 12.8242 17.825 12.6387 17.819 13.9733Z\" fill=\"white\"/>\\n</g>\\n<defs>\\n<clipPath id=\"clip0_4284_19554\">\\n<rect width=\"32\" height=\"32\" rx=\"4\" fill=\"white\"/>\\n</clipPath>\\n</defs>\\n</svg>',\"gk8-prod\":Hs,\"gk8-eca3-prod\":Hs,\"safe-prod\":'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 90 90\" fill=\"none\">\\n  <g transform=\"translate(0, 29)\">\\n<path d=\"M44.5568 15.3278C43.7367 15.0109 42.735 14.7468 41.5518 14.5349H41.5267C40.3772 14.3399 39.5148 14.1609 38.9401 13.9979C38.3653 13.8358 37.9133 13.6162 37.5834 13.3395C37.2535 13.0633 37.0891 12.6811 37.0891 12.193C37.0891 11.4775 37.3682 10.9327 37.9258 10.5588C38.484 10.1848 39.2191 9.99761 40.1318 9.99761C41.1294 9.99761 41.936 10.2414 42.5535 10.7296C43.1076 11.1679 43.447 11.7247 43.5717 12.399C43.5964 12.5335 43.7145 12.6327 43.8563 12.6342L46.6622 12.6545C46.8342 12.6559 46.972 12.5137 46.9549 12.3487C46.8608 11.4465 46.5516 10.626 46.0276 9.88779C45.4443 9.06683 44.6413 8.42826 43.6185 7.97254C42.5957 7.51732 41.4337 7.28946 40.1318 7.28946C38.8978 7.28946 37.7866 7.50909 36.7975 7.94836C35.8089 8.38762 35.0395 8.99717 34.4899 9.77798C33.9403 10.5588 33.6658 11.4368 33.6658 12.4126C33.6658 13.4861 33.9107 14.3482 34.4009 14.9983C34.8912 15.649 35.5333 16.141 36.3278 16.4743C37.1223 16.8077 38.0772 17.0718 39.193 17.2672L39.3197 17.2914C40.5024 17.5028 41.3864 17.6901 41.9697 17.8526C42.553 18.0156 43.0131 18.243 43.3515 18.5357C43.6894 18.8284 43.8584 19.227 43.8584 19.7311C43.8584 20.4471 43.5541 21.0078 42.9457 21.4141C42.3373 21.821 41.5508 22.0242 40.5874 22.0242C39.4374 22.0242 38.5081 21.7436 37.7981 21.1824C37.152 20.672 36.7718 20.0165 36.6577 19.2163C36.6381 19.078 36.5184 18.973 36.3736 18.9711L33.5712 18.9304C33.4008 18.928 33.263 19.0664 33.2761 19.2299C33.3555 20.2139 33.6753 21.1006 34.2355 21.8902C34.8525 22.7605 35.7018 23.4435 36.7839 23.9394C37.8655 24.4358 39.108 24.6834 40.5114 24.6834C41.8128 24.6834 42.9794 24.4561 44.0107 24.0004C45.0415 23.5451 45.8491 22.9148 46.4324 22.1098C47.0157 21.3048 47.3073 20.3982 47.3073 19.3895C47.3073 18.3161 47.0534 17.4501 46.5465 16.7912C46.0397 16.1323 45.3759 15.6447 44.5563 15.3273L44.5568 15.3278Z\" fill=\"#121312\"/>\\n<path d=\"M61.7876 21.9027H61.3497C61.0962 21.9027 60.8971 21.8379 60.7538 21.7073C60.61 21.5776 60.5381 21.3657 60.5381 21.0731V16.4134C60.5381 14.9335 60.0478 13.8073 59.0678 13.0347C58.0872 12.2626 56.9327 11.8688 55.124 11.8688C53.4163 11.8688 52.0823 12.2259 51.0344 12.9249C50.079 13.5625 49.5032 14.4357 49.3061 15.546C49.2754 15.7187 49.4112 15.8769 49.5927 15.8769H52.1698C52.299 15.8769 52.4147 15.7951 52.4489 15.6751C52.5665 15.2644 52.826 14.9292 53.2273 14.6694C53.6919 14.3685 54.244 14.218 54.9711 14.218C56.3424 14.218 57.3174 15.0312 57.3174 16.2426V16.6214C57.3174 16.7762 57.1871 16.9015 57.0262 16.9015H54.6921C52.7989 16.9015 51.3617 17.2595 50.3817 17.975C49.4012 18.691 48.9109 19.7074 48.9109 21.0242C48.9109 22.163 49.3589 23.0575 50.255 23.7077C50.9273 24.1953 51.7308 24.4769 52.558 24.6002C53.1901 24.6946 53.8392 24.7289 54.4728 24.6312C55.1366 24.5291 55.6756 24.266 56.2152 23.8905C56.6999 23.5538 57.1042 23.1223 57.4733 22.596C57.6533 22.2985 58.1255 22.4179 58.1255 22.7619V23.1755C58.125 23.9273 58.758 24.5369 59.5394 24.5369H61.7876C61.9486 24.5369 62.0788 24.4116 62.0788 24.2568V22.1823C62.0788 22.0275 61.9486 21.9022 61.7876 21.9022V21.9027ZM57.3179 19.39C57.3179 19.9918 57.1866 20.5162 56.9247 20.9632C56.3756 21.9008 55.393 22.3904 54.2873 22.3904C53.6446 22.3904 53.1292 22.2443 52.7405 21.9516C52.3513 21.6589 52.1572 21.2685 52.1572 20.7804C52.1572 20.2279 52.3729 19.8007 52.8039 19.4998C53.2348 19.1994 53.8473 19.0485 54.6423 19.0485H57.0267C57.1877 19.0485 57.3179 19.1738 57.3179 19.3286V19.39V19.39Z\" fill=\"#121312\"/>\\n<path d=\"M71.1823 7.46796H67.8288C66.0598 7.46796 64.6257 8.84767 64.6257 10.5496V11.9037C64.6257 12.0585 64.4955 12.1838 64.3346 12.1838H62.4197C62.2588 12.1838 62.1286 12.3091 62.1286 12.4639V14.5625C62.1286 14.7173 62.2588 14.8426 62.4197 14.8426H64.3346C64.4955 14.8426 64.6257 14.9679 64.6257 15.1227V24.2572C64.6257 24.412 64.7559 24.5373 64.9169 24.5373H67.5296C67.6905 24.5373 67.8208 24.412 67.8208 24.2572V15.1227C67.8208 14.9679 67.951 14.8426 68.1119 14.8426H71.1566C71.3175 14.8426 71.4478 14.7173 71.4478 14.5625V12.4639C71.4478 12.3091 71.3175 12.1838 71.1566 12.1838H68.1119C67.951 12.1838 67.8208 12.0585 67.8208 11.9037V10.687C67.8208 10.3774 68.0817 10.1268 68.403 10.1268H71.1817C71.3427 10.1268 71.4729 10.0015 71.4729 9.84666V7.74806C71.4729 7.59325 71.3427 7.46796 71.1817 7.46796H71.1823Z\" fill=\"#121312\"/>\\n<path d=\"M83.9825 14.7062C83.4163 13.7957 82.6425 13.0962 81.6624 12.608C80.6819 12.1204 79.549 11.8693 78.2647 11.8693C76.9805 11.8693 75.8722 12.1407 74.8922 12.669C73.9116 13.1978 73.1508 13.9457 72.6103 14.9132C72.0692 15.8812 71.7987 17.0152 71.7987 18.3165C71.7987 19.6179 72.0778 20.7035 72.6354 21.671C73.1936 22.6385 73.9921 23.3826 75.0315 23.9031C76.0708 24.4237 77.2922 24.6839 78.6957 24.6839C79.7773 24.6839 80.7453 24.4928 81.5991 24.1107C82.4524 23.729 83.1413 23.2041 83.6653 22.5374C84.1138 21.9666 84.42 21.3416 84.5839 20.6628C84.6267 20.4867 84.4884 20.3174 84.3003 20.3174H81.6755C81.5498 20.3174 81.4397 20.3958 81.3995 20.5104C81.2144 21.0363 80.8881 21.4519 80.4199 21.7566C79.8955 22.0982 79.2448 22.2689 78.4674 22.2689C77.8248 22.2689 77.2631 22.1388 76.7814 21.8785C76.2996 21.6188 75.9195 21.2525 75.6404 20.7809C75.5303 20.5946 75.4403 20.3977 75.3684 20.195C75.2914 19.9773 75.2361 19.7529 75.1979 19.5255C75.1848 19.4461 75.1728 19.3658 75.1627 19.2855C75.1431 19.1201 75.2794 18.9754 75.4524 18.9754H84.504C84.6508 18.9754 84.7765 18.8709 84.7931 18.7302C84.8057 18.6271 84.8142 18.5221 84.8188 18.4143C84.8273 18.2193 84.8313 18.0403 84.8313 17.8778C84.8313 16.6746 84.5482 15.6176 83.982 14.7066L83.9825 14.7062ZM81.2627 16.8526H75.5936C75.4076 16.8526 75.2673 16.6867 75.3085 16.5121C75.3991 16.1294 75.5559 15.784 75.7792 15.4744C76.0663 15.0762 76.4384 14.771 76.895 14.5596C77.3516 14.3482 77.8499 14.2422 78.391 14.2422C79.2699 14.2422 79.997 14.4701 80.5718 14.9253C81.0651 15.3162 81.3899 15.8445 81.5473 16.5106C81.5885 16.6857 81.4492 16.8526 81.2627 16.8526V16.8526Z\" fill=\"#121312\"/>\\n<path d=\"M26.7572 15.9983H24.2722C23.53 15.9983 22.9286 16.5769 22.9286 17.291V20.761C22.9286 21.4751 22.3272 22.0537 21.585 22.0537H11.6986C10.9564 22.0537 10.355 22.6323 10.355 23.3463V25.7371C10.355 26.4512 10.9564 27.0298 11.6986 27.0298H22.1572C22.8994 27.0298 23.4923 26.4512 23.4923 25.7371V23.819C23.4923 23.1049 24.0937 22.5984 24.8359 22.5984H26.7567C27.4989 22.5984 28.1003 22.0198 28.1003 21.3058V17.276C28.1003 16.5619 27.4989 15.9983 26.7567 15.9983H26.7572Z\" fill=\"#121312\"/>\\n<path d=\"M10.3545 11.2487C10.3545 10.5346 10.9559 9.95602 11.6981 9.95602H21.5785C22.3206 9.95602 22.922 9.37743 22.922 8.66338V6.27259C22.922 5.55854 22.3206 4.97995 21.5785 4.97995H11.1254C10.3832 4.97995 9.7818 5.55854 9.7818 6.27259V8.11479C9.7818 8.82883 9.1804 9.40742 8.43821 9.40742H6.5259C5.78371 9.40742 5.18231 9.98601 5.18231 10.7001V14.7342C5.18231 15.4483 5.78622 15.9978 6.52842 15.9978H9.01346C9.75565 15.9978 10.357 15.4192 10.357 14.7052L10.3545 11.2491V11.2487Z\" fill=\"#121312\"/>\\n<path d=\"M15.4719 13.4851H17.8589C18.6368 13.4851 19.2679 14.0928 19.2679 14.8407V17.1371C19.2679 17.8855 18.6363 18.4927 17.8589 18.4927H15.4719C14.6941 18.4927 14.063 17.885 14.063 17.1371V14.8407C14.063 14.0923 14.6946 13.4851 15.4719 13.4851V13.4851Z\" fill=\"#121312\"/>\\n</g>\\n</svg>',\"mpcvault-prod\":'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 1024 1024\" fill=\"none\">\\n<path d=\"M409.166 218.478C454.87 141.841 569.13 141.841 614.834 218.478L895.914 689.798C941.618 766.435 884.488 862.232 793.08 862.232H230.92C139.512 862.232 82.3816 766.435 128.086 689.798L409.166 218.478Z\" fill=\"black\"/>\\n</svg>',\"fireblocks-prod\":'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\\n<path d=\"M23.0522 0C23.5757 0 24 0.429807 24 0.96V23.04C24 23.5702 23.5757 24 23.0522 24H0.947791C0.424341 24 0 23.5702 0 23.04V0.96C0 0.429807 0.424341 0 0.947791 0H23.0522ZM11.9999 6.66667L5.33328 17.3333H18.6666L11.9999 6.66667Z\" fill=\"#002E7F\"/>\\n</svg>',\"neptune-custody-dev\":'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 480 480\" fill=\"none\">\\n<g clip-path=\"url(#clip0_1_2)\">\\n<path d=\"M480 240C480 372.547 372.547 480 240 480C107.453 480 -3.05176e-05 372.547 -3.05176e-05 240C-3.05176e-05 107.453 107.453 -3.05176e-05 240 -3.05176e-05C372.547 -3.05176e-05 480 107.453 480 240ZM398.187 79.4266C394.192 81.0898 393.034 87.432 395.6 93.5915C398.166 99.7511 403.482 103.399 407.477 101.736C411.472 100.072 412.63 93.7302 410.064 87.5706C407.498 81.4111 402.18 77.7635 398.187 79.4266ZM382.442 422.44C341.108 438.44 263.331 446.216 197.553 443.549C233.558 457.352 337.148 456.509 382.442 422.44ZM269.166 180.6C263.571 180.6 259.038 182.867 259.038 185.666C259.038 188.466 263.571 190.732 269.166 190.732C274.762 190.732 279.295 188.464 279.295 185.666C279.293 182.867 274.76 180.6 269.166 180.6ZM422.411 137.939C413.104 148.044 398.581 158.157 386.666 164.333C412.916 157.404 423.626 162.019 432.932 155.255C438.979 150.852 431.839 127.704 422.41 137.939H422.411ZM264.411 360.534C187.788 359.345 222.336 383.58 259.734 383.911C293.044 384.204 339.792 361.703 264.411 360.534ZM177.557 264.663C170 260.439 155.781 252.22 146 245.106C154 247.772 164.443 248.663 191.111 247.33C173.778 245.772 144.889 238.439 121.778 231.996C132.444 244.22 152.444 260.663 177.56 264.663L177.557 264.663ZM271.335 305.106C247.778 304.215 214.224 300.439 189.78 295.106C212.649 308.349 240.824 314.673 271.335 305.106ZM286.892 297.772C304.668 284.882 290.892 275.548 272.002 265.548C287.559 265.772 350.668 259.324 375.006 246.328C324.668 256.333 234.668 249.996 207.113 247.772C231.561 256.22 275.562 273.554 286.895 297.772H286.892Z\" fill=\"url(#paint0_linear_1_2)\"/>\\n</g>\\n<defs>\\n<linearGradient id=\"paint0_linear_1_2\" x1=\"62.6666\" y1=\"43.1667\" x2=\"287\" y2=\"296.5\" gradientUnits=\"userSpaceOnUse\">\\n<stop stop-color=\"#444FAC\"/>\\n<stop offset=\"1\" stop-color=\"#8BBAF9\"/>\\n</linearGradient>\\n<clipPath id=\"clip0_1_2\">\\n<rect width=\"480\" height=\"480\" fill=\"white\"/>\\n</clipPath>\\n</defs>\\n</svg>',\"zodia-prod\":'<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" width=\"24\" viewBox=\"-517.605 -517.605 1879.26 1879.26\"><g fill=\"#007978\"><path d=\"m794.78 0c-22.41 0-41.59 13.76-49.61 33.29l-455.23 86.05c-9.55-14.79-26.14-24.6-45.05-24.6-29.62 0-53.62 24.01-53.62 53.62s22.02 51.51 49.88 53.43l54.66 142.72-208.27 133.49c-9.24-7.56-21.05-12.11-33.92-12.11-29.62 0-53.62 24.01-53.62 53.62s24.01 53.62 53.62 53.62c8.77 0 17.03-2.15 24.33-5.88l363.21 221.33c-.02.64-.1 1.27-.1 1.92 0 29.62 24.01 53.62 53.62 53.62s53.62-24.01 53.62-53.62c0-26.97-19.93-49.22-45.85-53l-142.43-371.89 411.53-263.72c7.04 3.39 14.9 5.35 23.24 5.35 29.62 0 53.62-24.01 53.62-53.62s-24.01-53.62-53.63-53.62zm-352.03 728.17-332.36-202.54 204.58-131.12 127.78 333.65zm-101.86-412.53-52.22-136.36c1.6-2.26 3.01-4.65 4.25-7.14l385.62-72.89-337.64 216.4z\"/><path d=\"m770.61 683.14c10.34-6.29 22.29-9.44 35.85-9.44 15.51 0 28.51 4.05 39 12.16 10.48 8.11 17.26 19.5 20.33 34.18h-11.32c-3.08-11.46-8.88-20.3-17.4-26.52-8.53-6.22-18.94-9.33-31.24-9.33-11.18 0-20.97 2.72-29.36 8.18-8.39 5.45-14.88 13.03-19.5 22.75-4.61 9.72-6.92 20.8-6.92 33.23s2.31 23.52 6.92 33.23c4.61 9.72 11.11 17.3 19.5 22.75s18.17 8.18 29.36 8.18c12.58 0 23.03-3.08 31.34-9.23 8.32-6.15 14.01-15.09 17.09-26.84h11.32c-3.22 14.82-9.96 26.28-20.23 34.38-10.27 8.11-23.24 12.16-38.89 12.16-13.56 0-25.51-3.11-35.85-9.33-10.35-6.22-18.31-14.99-23.9-26.31s-8.39-24.32-8.39-39 2.8-27.46 8.39-38.79c5.59-11.32 13.56-20.13 23.9-26.42z\"/><path d=\"m939.62 761.76c0 17.05 3.42 29.78 10.27 38.16 6.85 8.39 17.47 12.58 31.87 12.58s25.27-4.19 32.18-12.58c6.92-8.39 10.38-21.11 10.38-38.16v-86.8h11.32v86.17c0 41.23-17.96 61.85-53.88 61.85s-53.46-20.62-53.46-61.85v-86.17h11.32z\"/><path d=\"m1122.26 802.76c7.83 6.5 17.96 9.75 30.41 9.75s21.63-2.69 28.83-8.07 10.8-12.75 10.8-22.12c0-6.71-1.92-12.02-5.76-15.94-3.84-3.91-8.77-6.81-14.79-8.7-6.01-1.89-13.69-3.6-23.06-5.14-9.79-1.67-17.96-3.74-24.53-6.18s-12.02-6.22-16.35-11.32c-4.34-5.1-6.5-12.06-6.5-20.86 0-8.1 2.03-15.24 6.08-21.38s9.82-10.9 17.29-14.26c7.48-3.35 16.11-5.03 25.89-5.03 14.54 0 26.38 3.81 35.54 11.43 9.15 7.62 14.29 17.72 15.41 30.3l-11.11.21c-1.26-9.65-5.45-17.33-12.58-23.06s-16.21-8.6-27.26-8.6c-11.6 0-20.83 2.62-27.68 7.86s-10.27 12.54-10.27 21.91c0 6.57 1.81 11.74 5.45 15.52s8.21 6.5 13.74 8.18c5.52 1.68 13.1 3.35 22.75 5.03 9.78 1.54 18.14 3.6 25.06 6.18 6.92 2.59 12.65 6.53 17.19 11.85 4.55 5.31 6.81 12.37 6.81 21.17 0 8.11-2.13 15.31-6.39 21.59-4.26 6.29-10.24 11.18-17.92 14.68-7.69 3.49-16.63 5.24-26.84 5.24s-19.96-1.92-27.99-5.76-14.32-9.3-18.87-16.36-7.02-15.2-7.44-24.43h11.32c.7 11.04 4.96 19.81 12.79 26.31z\"/><path d=\"m1361.94 674.97v10.48h-50.32v136.28h-11.32v-136.28h-50.32v-10.48z\"/><path d=\"m1507.15 813.44c-10.41 6.36-22.26 9.54-35.54 9.54s-25.12-3.18-35.53-9.54-18.52-15.24-24.32-26.63-8.7-24.22-8.7-38.47 2.9-27.08 8.7-38.47c5.8-11.4 13.91-20.27 24.32-26.63s22.26-9.54 35.53-9.54 25.13 3.18 35.54 9.54 18.52 15.24 24.32 26.63 8.7 24.22 8.7 38.47-2.9 27.08-8.7 38.47-13.91 20.27-24.32 26.63zm-64.99-9.11c8.6 5.45 18.42 8.18 29.45 8.18s20.9-2.72 29.57-8.18c8.67-5.45 15.41-13.03 20.23-22.75 4.82-9.71 7.23-20.79 7.23-33.23s-2.41-23.51-7.23-33.23c-4.82-9.71-11.57-17.29-20.23-22.75-8.67-5.45-18.52-8.18-29.57-8.18s-20.86 2.72-29.45 8.18c-8.6 5.45-15.31 13.03-20.13 22.75s-7.23 20.8-7.23 33.23 2.41 23.52 7.23 33.23c4.82 9.72 11.53 17.3 20.13 22.75z\"/><path d=\"m1642.95 674.97c15.37 0 28.58 3.01 39.63 9.02 11.04 6.01 19.5 14.53 25.37 25.58 5.87 11.04 8.81 23.97 8.81 38.79s-2.93 27.75-8.81 38.79c-5.87 11.04-14.32 19.57-25.37 25.58-11.04 6.01-24.25 9.02-39.63 9.02h-39.42v-146.76h39.42zm45.91 119.4c10.9-11.25 16.35-26.6 16.35-46.02s-5.42-34.94-16.25-46.12-26.17-16.78-46.02-16.78h-28.1v125.8h28.1c19.71 0 35.01-5.63 45.92-16.87z\"/><path d=\"m1768.77 674.76 48.65 80.51 49.06-80.51h12.79l-56.19 92.88v54.09h-11.32v-54.09l-56.19-92.88h13.21z\"/><path d=\"m948.1 346.36v-30.87h-202.2v37.35h147.42l-153.89 185.77v30.88h215.15v-37.36h-160.87z\"/><path d=\"m1163 328.93c-19.09-10.96-40.92-16.43-65.49-16.43s-46.4 5.48-65.49 16.43c-19.09 10.96-33.95 26.23-44.57 45.82-10.63 19.59-15.94 42.17-15.94 67.73s5.31 48.14 15.94 67.74c10.62 19.59 25.48 34.86 44.57 45.82s40.93 16.44 65.49 16.44 46.4-5.48 65.49-16.44 33.95-26.23 44.58-45.82c10.62-19.59 15.94-42.17 15.94-67.74s-5.31-48.14-15.94-67.73c-10.62-19.59-25.49-34.86-44.58-45.82zm8.22 161.87c-6.97 14.27-16.85 25.4-29.63 33.36-12.78 7.97-27.47 11.95-44.07 11.95s-31.3-3.98-44.08-11.95-22.66-19.09-29.63-33.36c-6.97-14.28-10.46-30.38-10.46-48.31s3.49-34.03 10.46-48.31 16.85-25.4 29.63-33.37 27.48-11.95 44.08-11.95 31.29 3.99 44.07 11.95c12.78 7.97 22.66 19.09 29.63 33.37s10.46 30.38 10.46 48.31-3.49 34.03-10.46 48.31z\"/><path d=\"m1470.54 354.33c-8.3-12.95-19.76-23.16-34.37-30.63s-32.2-11.21-52.79-11.21c-23.24 0-44.16 5.48-62.76 16.43-18.59 10.96-33.12 26.23-43.58 45.82s-15.69 42.17-15.69 67.73c0 26.89 5.23 50.14 15.69 69.73s24.9 34.53 43.33 44.82 39.43 15.44 63 15.44c36.85 0 65.9-14.61 87.16-43.83l5.48 40.84h35.36v-348.61h-40.84v133.47zm-9.96 137.21c-6.97 14.11-16.85 25.07-29.63 32.87s-27.31 11.7-43.58 11.7c-25.23 0-45.57-8.71-61.01-26.15-15.44-17.43-23.16-39.93-23.16-67.49s7.72-50.05 23.16-67.48 35.78-26.15 61.01-26.15c16.27 0 30.79 3.99 43.58 11.95 12.78 7.97 22.66 19.17 29.63 33.62 6.97 14.44 10.46 30.79 10.46 49.06s-3.49 33.95-10.46 48.06z\"/><path d=\"m1567.16 315.49h40.84v254h-40.84z\"/><path d=\"m1587.58 217.37c-7.63 0-13.95 2.49-18.92 7.47-4.98 4.98-7.47 11.29-7.47 18.93s2.49 13.95 7.47 18.93 11.29 7.47 18.92 7.47 13.95-2.49 18.93-7.47 7.47-11.29 7.47-18.93-2.49-13.95-7.47-18.93-11.29-7.47-18.93-7.47z\"/><path d=\"m1845.31 336.16c-17.76-15.77-42.92-23.66-75.45-23.66-30.55 0-55.37 6.97-74.46 20.92s-30.13 33.37-33.12 58.27h40.84c2.66-12.95 9.71-23.32 21.16-31.13 11.46-7.81 25.98-11.71 43.58-11.71 19.92 0 35.44 4.65 46.56 13.95s16.68 22.25 16.68 38.85v17.43h-74.7c-33.2 0-58.52 6.81-75.95 20.42s-26.15 33.2-26.15 58.77c0 22.91 8.55 41 25.65 54.28 17.1 13.29 39.76 19.93 67.98 19.93 37.19 0 65.58-14.11 85.16-42.33v39.13h38.73v-.05s.08 0 .12.01v-165.1c0-29.55-8.88-52.21-26.64-67.98zm-14.2 129.74c0 21.58-7.14 38.93-21.42 52.04-14.28 13.12-33.87 19.67-58.77 19.67-16.94 0-30.38-3.82-40.34-11.45-9.96-7.64-14.94-17.76-14.94-30.38 0-28.22 18.92-42.33 56.78-42.33h78.69v12.46z\"/></g></svg>',cactus:'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 32 32\" fill=\"none\">\\n<rect width=\"32\" height=\"32\" rx=\"4\" fill=\"white\"/>\\n<g clip-path=\"url(#clip0_4284_19593)\">\\n<path d=\"M16.0193 19.9909C13.8104 19.9909 12.0199 18.2019 12.0221 15.996C12.0164 13.7992 13.7952 12.0147 15.995 12.009H16.0377C17.7967 12.0168 19.2872 13.1588 19.8136 14.7403C19.8583 14.875 19.9444 14.9923 20.0596 15.0754C20.1748 15.1586 20.3133 15.2034 20.4554 15.2035H23.976C24.0197 15.2035 24.0617 15.1861 24.0926 15.1552C24.1236 15.1243 24.141 15.0824 24.141 15.0387V14.132C24.141 14.1126 24.1487 14.094 24.1625 14.0802C24.1762 14.0665 24.1949 14.0588 24.2143 14.0588H25.0721C25.0915 14.0588 25.1102 14.0665 25.1239 14.0802C25.1377 14.094 25.1454 14.1126 25.1454 14.132V15.0389C25.1454 15.0826 25.1628 15.1245 25.1938 15.1554C25.2247 15.1863 25.2667 15.2037 25.3105 15.2037H25.8121C25.8559 15.2037 25.8979 15.1863 25.9288 15.1554C25.9598 15.1245 25.9772 15.0826 25.9772 15.0389V14.132C25.9772 14.1126 25.9849 14.094 25.9986 14.0802C26.0124 14.0665 26.031 14.0588 26.0505 14.0588H26.9083C26.9277 14.0588 26.9464 14.0665 26.9601 14.0802C26.9739 14.094 26.9816 14.1126 26.9816 14.132V15.0389C26.9816 15.0826 26.999 15.1245 27.0299 15.1554C27.0609 15.1863 27.1029 15.2037 27.1466 15.2037H27.8342C27.878 15.2037 27.92 15.1863 27.9509 15.1554C27.9819 15.1245 27.9993 15.0826 27.9993 15.0389C27.9993 15.0343 27.9993 15.0296 27.9993 15.025C27.5029 8.85639 22.333 4.00385 16.0269 4C9.39083 3.99597 4 9.37502 4 16.0002C4 22.6254 9.38129 28 16.0193 28C22.3288 28 27.5027 23.1462 27.9994 16.9747C28.0012 16.9531 27.9987 16.9314 27.9921 16.9108C27.9855 16.8902 27.9749 16.8711 27.9609 16.8546C27.9469 16.8381 27.9297 16.8245 27.9105 16.8146C27.8912 16.8047 27.8701 16.7987 27.8485 16.7969C27.8438 16.7969 27.8392 16.7969 27.8344 16.7969H20.4558C20.3129 16.7974 20.1738 16.8428 20.0582 16.9267C19.9427 17.0106 19.8565 17.1287 19.812 17.2643C19.2824 18.8485 17.7846 19.9909 16.0193 19.9909Z\" fill=\"#1C46A0\"/>\\n</g>\\n<defs>\\n<clipPath id=\"clip0_4284_19593\">\\n<rect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(4 4)\"/>\\n</clipPath>\\n</defs>\\n</svg>'},qs=({accounts:t,devMode:e})=>{var r;const n=t=>t.isManualTokenInputSupported?_s(Os,{name:`${Ns.SelectCustodian}${t.name}`,children:\"Select\"}):t.onboardingUrl?_s(js,{href:t.onboardingUrl,children:\"Select\"}):null;return Es(xs,{children:[Es(Bs,{children:[_s(Ts,{children:\"Select custodian\"}),_s(Cs,{children:\"Connect your existing accounts or select a custody or self-custody solution\"}),Oo.filter((t=>!!pr.dev||t.production&&!t.hideFromUI)).map((t=>Es(Ds,{direction:\"horizontal\",alignment:\"space-between\",children:[Es(Bs,{direction:\"horizontal\",children:[_s(zs,{src:Vs[t.name]??'<svg width=\"24\" height=\"25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.037 0H6.975C2.605 0 0 2.617 0 6.987v10.05c0 4.37 2.605 6.975 6.975 6.975h10.05c4.37 0 6.975-2.605 6.975-6.976V6.988C24.012 2.617 21.407 0 17.037 0ZM11.49 17.757c0 .36-.18.684-.492.876a.975.975 0 0 1-.54.156 1.11 1.11 0 0 1-.469-.108l-4.202-2.1a1.811 1.811 0 0 1-.985-1.61v-3.973c0-.36.18-.685.493-.877a1.04 1.04 0 0 1 1.008-.048l4.202 2.101a1.8 1.8 0 0 1 .997 1.609v3.974h-.012Zm-.252-6.423L6.723 8.896a1.045 1.045 0 0 1-.528-.924c0-.384.204-.744.528-.924l4.515-2.438a1.631 1.631 0 0 1 1.524 0l4.515 2.438c.324.18.528.528.528.924s-.204.744-.528.924l-4.515 2.438c-.24.132-.504.192-.768.192a1.54 1.54 0 0 1-.756-.192Zm7.972 3.638c0 .684-.385 1.308-.997 1.608l-4.202 2.101c-.144.072-.3.108-.468.108a.975.975 0 0 1-.54-.156 1.017 1.017 0 0 1-.493-.876v-3.974c0-.684.384-1.309.997-1.609l4.202-2.101a1.04 1.04 0 0 1 1.008.048c.313.192.493.516.493.877v3.974Z\" fill=\"#24272A\"/></svg>\\n'}),_s(Cs,{children:t.displayName})]}),n(t)]},t.name))),_s($s,{devMode:e??!1})]}),_s(Rs,{children:_s(Os,{name:Ls.RemoveCustodianToken,disabled:!(null===(r=t)||void 0===r?void 0:r.length),children:\"Remove custodian token\"})})]})},Gs=Ss(\"Avatar\"),Ks=({accounts:t})=>Es(xs,{children:[Es(Bs,{children:[_s(Ts,{children:\"Remove Custodian Token\"}),_s(Cs,{children:\"Are you sure you want to remove this toke? All custodial accounts assigned to this token will be removed from the extension as well.\"}),t.map((t=>Es(Ds,{direction:\"horizontal\",alignment:\"space-between\",children:[Es(Bs,{direction:\"horizontal\",children:[_s(Gs,{address:`eip155:1:${t.address}`}),Es(Bs,{children:[t.options.accountName?_s(Cs,{children:t.options.accountName}):null,Es(Cs,{children:[t.address.slice(0,6),\"...\",t.address.slice(-4)]})]})]}),_s(Cs,{children:t.options.custodian.displayName})]})))]}),Es(Rs,{children:[_s(Os,{name:Ls.CancelRemoveToken,children:\"Cancel\"}),_s(Os,{name:Ls.RemoveToken,children:\"Remove\"})]})]});async function Js(t,e){return snap.request({method:\"snap_createInterface\",params:{ui:t,context:e}})}async function Ws(t,e,r){return snap.request({method:\"snap_updateInterface\",params:{id:t,ui:e,context:r}})}async function Zs(t){return snap.request({method:\"snap_getInterfaceState\",params:{id:t}})}async function Xs(t,e){return snap.request({method:\"snap_resolveInterface\",params:{id:t,value:e}})}async function Ys({id:t,context:e}){await Ws(t,_s(qs,{accounts:e.accounts}),e)}const Qs={[Ls.RemoveCustodianToken]:async function({id:t,context:e}){await Ws(t,_s(Ks,{accounts:e.accounts}),e)},[Ls.CancelRemoveToken]:Ys,[Ls.RemoveToken]:async function({id:t,context:e,snapContext:r}){var n;for(const t of(null===(n=e.accounts)||void 0===n?void 0:n.map((t=>t.id)))??[])try{var i;await(null===(i=r.keyring)||void 0===i?void 0:i.deleteAccount(t))}catch(t){bo.error(\"Error deleting account\",t)}await Ws(t,_s(qs,{accounts:e.accounts}),e)},[Ls.CancelToken]:Ys,[Ls.ToggleDevMode]:async function({id:t,context:e,event:r}){const n=Boolean(r.value);await hu(n),await Ws(t,_s(qs,{accounts:e.accounts,devMode:n}),e)}},ta={[Ns.SelectCustodian]:async function({id:t,event:e,context:r}){var n;await Ws(t,_s(Us,{custodianName:(null===(n=e.name)||void 0===n?void 0:n.replace(Ns.SelectCustodian,\"\"))??\"\"}),r)},[Ns.ConnectToken]:async function({id:t,event:e,context:r}){var n;const i=(null===(n=e.name)||void 0===n?void 0:n.replace(Ns.ConnectToken,\"\"))??\"\",o=Oo.find((t=>t.name===i));if(!o)throw new Error(\"Custodian not found\");const s=await Zs(t);try{var a;const{apiUrl:t,token:e}=s.addTokenForm;let r=t;var u;if(!r.length)r=(null===(u=o)||void 0===u?void 0:u.apiBaseUrl)??\"\";if(!(null===(a=e)||void 0===a?void 0:a.length))throw new Error(\"Token is required\");const n={custodianType:o.apiVersion,custodianEnvironment:o.name??\"\",custodianApiUrl:r,custodianDisplayName:o.displayName??\"\",token:e,refreshTokenUrl:o.refreshTokenUrl??\"\"};await ru(n,\"metamask\")}catch(e){bo.error(\"Error onboarding\",e),e instanceof Error?await Ws(t,_s(Us,{custodianName:i,error:e.message}),r):await Yo(\"An unknown error occurred\")}}};async function ea(t){return await Js(_s(qs,{accounts:t.accounts,devMode:t.devMode}),t)}const ra=({title:t,message:e})=>_s(xs,{children:Es(Bs,{children:[_s(Ts,{children:t}),_s(Cs,{children:e})]})});var na;!function(t){t.ConfirmButton=\"onboarding-confirm\",t.CancelButton=\"onboarding-cancel\"}(na||(na={}));const ia=\"onboarding-address-selector-\";const oa={[na.ConfirmButton]:async function({id:t,context:e}){const r=await Zs(t),n=Object.keys(r).filter((t=>!0===r[t])).map((t=>t.replace(ia,\"\"))).map((t=>e.accounts.filter((e=>e.address===t)))).flat().map((t=>({address:t.address,name:t.name})));0===n.length?await Ws(t,_s(ra,{title:\"No accounts imported\",message:\"No accounts were selected\"}),e):await Xs(t,n)},[na.CancelButton]:async function({id:t}){await Xs(t,[])}},sa=Ss(\"Divider\");function aa(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function ua(t,...e){if(!((r=t)instanceof Uint8Array||null!=r&&\"object\"==typeof r&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function ha(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function ca(t,e){ua(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const fa=BigInt(2**32-1),la=BigInt(32);function da(t,e=!1){return e?{h:Number(t&fa),l:Number(t>>la&fa)}:{h:0|Number(t>>la&fa),l:0|Number(t&fa)}}function pa(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:o,l:s}=da(t[i],e);[r[i],n[i]]=[o,s]}return[r,n]}const ma=(t,e,r)=>t<<r|e>>>32-r,ga=(t,e,r)=>e<<r|t>>>32-r,ya=(t,e,r)=>e<<r-32|t>>>64-r,ba=(t,e,r)=>t<<r-32|e>>>64-r;const va=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],wa=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;function Ma(t){for(let e=0;e<t.length;e++)t[e]=wa(t[e])}Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function _a(t){return\"string\"==typeof t&&(t=function(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),ua(t),t}class Ea{clone(){return this._cloneInto()}}const Aa=[],Sa=[],xa=[],Ba=BigInt(0),Ta=BigInt(1),Ia=BigInt(2),ka=BigInt(7),Pa=BigInt(256),Ca=BigInt(113);for(let t=0,e=Ta,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],Aa.push(2*(5*n+r)),Sa.push((t+1)*(t+2)/2%64);let i=Ba;for(let t=0;t<7;t++)e=(e<<Ta^(e>>ka)*Ca)%Pa,e&Ia&&(i^=Ta<<(Ta<<BigInt(t))-Ta);xa.push(i)}const[Ra,Oa]=pa(xa,!0),La=(t,e,r)=>r>32?ya(t,e,r):ma(t,e,r),Na=(t,e,r)=>r>32?ba(t,e,r):ga(t,e,r);class Ua extends Ea{constructor(t,e,r,n=!1,i=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,aa(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){va||Ma(this.state32),function(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=La(o,s,1)^r[n],u=Na(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=Sa[r],o=La(e,i,n),s=Na(e,i,n),a=Aa[r];e=t[a],i=t[a+1],t[a]=o,t[a+1]=s}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=Ra[n],t[1]^=Oa[n]}r.fill(0)}(this.state32,this.rounds),va||Ma(this.state32),this.posOut=0,this.pos=0}update(t){ha(this);const{blockLen:e,state:r}=this,n=(t=_a(t)).length;for(let i=0;i<n;){const o=Math.min(e-this.pos,n-i);for(let e=0;e<o;e++)r[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,0!=(128&e)&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){ha(this,!1),ua(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return aa(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(ca(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new Ua(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}const ja=(t,e,r)=>function(t){const e=e=>t().update(_a(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}((()=>new Ua(e,t,r))),Da=ja(1,136,32);r(48834).Buffer;const za=function(){const t=[];return()=>{if(0===t.length)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,\"0\"));return t}}();function Ha(t){return t instanceof Uint8Array}function Fa(t){ce(Ha(t),\"Value must be a Uint8Array.\")}function $a(t){if(Fa(t),0===t.length)return\"0x\";const e=za(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return function(t){if(t.startsWith(\"0x\"))return t;if(t.startsWith(\"0X\"))return`0x${t.substring(2)}`;return`0x${t}`}(r.join(\"\"))}ut(T(),/^(?:0x)?[0-9a-f]+$/iu),ut(T(),/^0x[0-9a-f]+$/iu);const Va=ut(T(),/^0x[0-9a-f]{40}$/u),qa=ut(T(),/^0x[0-9a-fA-F]{40}$/u);function Ga(t){return l(t,Va)||function(t){if(!l(t,qa))return!1;return function(t){ce(l(t,qa),\"Invalid hex address.\");const e=Ka(t.toLowerCase()),r=Ka($a(Da(e)));return`0x${e.split(\"\").map(((t,e)=>{const n=r[e];return ce(l(n,T()),\"Hash shorter than address.\"),parseInt(n,16)>7?t.toUpperCase():t})).join(\"\")}`}(t)===t}(t)}function Ka(t){return t.startsWith(\"0x\")||t.startsWith(\"0X\")?t.substring(2):t}function Ja(t){if(!Ga(t))throw new Error(\"Invalid address\");return`https://etherscan.io/address/${t}`}function Wa(t){if(!Ga(t))throw new Error(\"Invalid address\");return`${t.slice(0,6)}...${t.slice(-4)}`}const Za=({accounts:t})=>0===t.length?Es(xs,{children:[_s(Bs,{children:_s(Ts,{children:\"No accounts found\"})}),_s(Rs,{children:_s(Os,{name:na.CancelButton,children:\"Cancel\"})})]}):Es(xs,{children:[Es(Bs,{children:[_s(Ts,{children:\"Accounts\"}),t.map((t=>Es(Bs,{children:[_s(Fs,{name:`${ia}${t.address}`,label:t.name}),_s(js,{href:Ja(t.address),children:Wa(t.address)}),_s(sa,{})]},t.address)))]}),Es(Rs,{children:[_s(Os,{name:na.CancelButton,children:\"Cancel\"}),_s(Os,{name:na.ConfirmButton,children:\"Confirm\"})]})]});async function Xa(t){const e=t.accounts.map((t=>({address:t.address,name:t.name}))),r=await Js(_s(Za,{accounts:e}),t),n=await async function(t){return snap.request({method:\"snap_dialog\",params:{id:t}})}(r);return n}const Ya=new cs;let Qa=!1;const tu=async t=>{await Ya.runExclusive((()=>{Qa=t}))},eu=async(t,e)=>{c(t,Jo);return(await ws()).getConnectedAccounts(t,e)},ru=async(t,e)=>{c(t,Ko);const r=await vs();await r.setActivated(!0),await tu(!1);const n=Ro[t.custodianType],i=await ws();if(!Object.values(So).includes(t.custodianType))throw new Error(`Custodian type ${t.custodianType} not supported`);const o=new n({refreshToken:t.token,refreshTokenUrl:t.refreshTokenUrl},t.custodianApiUrl,1e3);o.on(co,(e=>{t.token=e.newRefreshToken}));let s=await o.getEthereumAccounts();const a=await i.listAccounts();for(const t of a)s=s.filter((e=>e.address!==t.address));let u;try{u=await Xa({selectedAccounts:[],request:t,accounts:s,activity:\"onboarding\"})}catch(t){throw bo.error(\"Error choosing account\",t),t}if(null===u)return[];const h=u.map((r=>({address:r.address,name:r.name,details:{...t},origin:e}))),f=[],l=[];for(const t of h)try{await i.createAccount(t),f.push(t)}catch(e){bo.error(\"Error creating account\",e),l.push({account:t,error:e instanceof Error?e:new Error(String(e))})}if(l.length>0){const t=l.map((({account:t,error:e})=>`Failed to add account ${t.address}: ${e.message}`)).join(\"\\n\");await Yo(t)}return f},nu=async({origin:t,request:e})=>{if(bo.debug(`RPC request (origin=\"${t}\"): method=\"${e.method}\"`,JSON.stringify(e,void 0,2)),!is(t,e.method))throw new lr(`Origin '${t}' is not allowed to call '${e.method}'`);switch(e.method){case ts.Onboard:return c(e.params,Ko),await ru(e.params,t);case ts.GetConnectedAccounts:return c(e.params,Jo),await eu(e.params,t);case ts.ClearAllRequests:if(pr.dev){const t=await Ms();return await t.clearAllRequests()}throw new fr(e.method);case ts.GetIsSupported:return!0;case ts.GetMutableTransactionParameters:{c(e.params,Zo);const t=await Ms(),r=await t.getMutableTransactionParameters(e.params);if(!r)throw new Error(\"Request not found\");return r}default:throw new fr(e.method)}},iu=async({origin:t,request:e})=>{if(bo.debug(`Keyring request (origin=\"${t}\"):`,JSON.stringify(e,void 0,2)),!is(t,e.method))throw new Error(`Origin '${t}' is not allowed to call '${e.method}'`);return ee(await ws(),e)};async function ou(){if((await async function(){return await snap.request({method:\"snap_getClientStatus\"})}()).locked)return!0;const t=await vs();await t.syncDevMode();return!await t.getActivated()}const su=async({request:t})=>{if(\"execute\"===t.method){if(await(async()=>await Ya.runExclusive((()=>Qa)))())return;if(await ou())return void await tu(!0);await(async()=>{try{await(await Ms()).poll()}catch(t){throw bo.error(\"Error polling requests\",t),t}})()}else{if(\"manageSleepState\"!==t.method)throw new Error(\"Method not found.\");await ou()?await tu(!0):await tu(!1)}},au=async({id:t,event:e,context:r})=>{if(!e.name)return;const n={...oa,...Qs},i={...ta},o=n[e.name]??i[Object.keys(i).find((t=>{var r;return null===(r=e.name)||void 0===r?void 0:r.startsWith(t)}))??\"\"];if(!o)return;const s={keyring:await ws(),stateManager:await vs()};await o({id:t,event:e,context:r,snapContext:s})},uu=async()=>{const t=await ws(),e=await vs(),r=await async function(t){return{activity:\"homepage\",accounts:await t.keyring.listAccounts(),devMode:await t.stateManager.getDevMode()}}({keyring:t,stateManager:e});return{id:await ea(r)}},hu=async t=>{const e=await vs();await e.setDevMode(t),await e.syncDevMode()}})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,\"__esModule\",{value:!0})})();"}],"removable":false,"hideSnapBranding":true}