PageSourceSearch

https://assets.debank.com/static/js/4555.dbbb5a3b.chunk.js

js debank.com collected 2026-09-24 09:02:41 UTC 330,235 bytes, 3 lines download raw bytes

1/*! For license information please see 4555.dbbb5a3b.chunk.js.LICENSE.txt */
2(self.webpackChunkdefi_insight_react=self.webpackChunkdefi_insight_react||[]).push([[4555],{10499:(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=b(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(f(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(h(n+r))}function s(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("undefined"===typeof t||null===t||0===t.length)return Uint8Array.from([]);const r=a(b(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 f=[],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),f.push(u.data),s=u.remainder;return{data:f,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),f.push(u.data),s=u.remainder;return{data:f,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 f(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 h(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(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(1===e.length)return e[0];const n=e.reduce(((t,e)=>t+e.length),0),i=new Uint8Array(n);for(let o=0,s=0;o<e.length;o++){const t=e[o];i.set(t,s),s+=t.length}return i}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".concat(e):e}function m(t){return t.length>=2&&"0"===t[0]&&"x"===t[1]}function b(t){if(t instanceof Uint8Array)return t;if("string"===typeof t)return m(t)?h((e="string"!==typeof(r=t)?r:m(r)?r.slice(2):r).length%2?"0".concat(e):e):d(t);var e,r;if("number"===typeof t||"bigint"===typeof t)return t?h(p(t)):Uint8Array.from([]);if(null===t||void 0===t)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof t)}e.utils={bytesToHex:f,concatBytes:l,hexToBytes:h,utf8ToBytes:d},e.RLP={encode:r,decode:s}},48998:(t,e,r)=>{"use strict";var n=r(49320).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(10499),o=r(9532),s=r(68718),a=r(92683),u=r(36380),f=r(72743),c=r(4307),h=r(2774),l=
2BigInt(0);class d{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.KECCAK256_RLP,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.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(f.KECCAK256_NULL)}isEmpty(){return this.balance===l&&this.nonce===l&&this.codeHash.equals(f.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(t){try{(0,c.assertIsString)(t)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)};e.toChecksumAddress=function(t,e){(0,c.assertIsHexString)(t);const r=(0,h.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"),f=(0,a.bytesToHex)((0,o.keccak256)(s));let l="0x";for(let n=0;n<r.length;n++)parseInt(f[n],16)>=8?l+=r[n].toUpperCase():l+=r[n];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){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,c.assertIsBuffer)(t),64===t.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),t])),!0}catch(r){return!1}if(!e)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(t),!0}catch(r){return!1}};e.pubToAddress=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[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?f.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?f.KECCAK256_NULL:i]}e.isZeroAddress=function(t){try{(0,c.assertIsString)(t)}catch(r){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(f.KECCAK256_RLP)?m:n,(0,u.arrToBufArr)(i).equals(f.KECCAK256_NULL)?m:i]},e.accountBodyToRLP=function(t){const e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?p(t):t;return(0,u.arrToBufArr)(i.RLP.encode(e))}},94344:(t,e,r)=>{"use strict";var n=r(49320).Buffer;
2Object.defineProperty(e,"__esModule",{value:!0}),e.Address=void 0;const i=r(48998),o=r(36380);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},80844:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncEventEmitter=void 0;const n=r(44802);class i extends n.EventEmitter{emit(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];let[o,s]=n;const a=this;let u=null!==(e=a._events[t])&&void 0!==e?e:[];return void 0===s&&"function"===typeof o&&(s=o,o=void 0),"newListener"!==t&&"removeListener"!==t||(o={event:o,fn:s},s=void 0),u=Array.isArray(u)?u:[u],async function(t,e,r){let n;for await(const o of e)try{o.length<2?o.call(t,r):await new Promise(((e,n)=>{o.call(t,r,(t=>{t?n(t):e()}))}))}catch(i){n=i}if(n)throw n}(a,u.slice(),o).then(s).catch(s),a.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){var r;let n=null!==(r=this._events[t])&&void 0!==r?r:[];if("function"!==typeof e)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[t]=n=[n]),n.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){var i;let o,s,a=null!==(i=this._events[t])&&void 0!==i?i:[];const u="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(a)||(this._events[t]=a=[a]),s=a.length,o=a.length;o--;)if(a[o]===e){s=o+u;break}return a.splice(s,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},36380:(t,e,r)=>{"use strict";var n=r(49320).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(4307),o=r(2774);e.intToHex=function(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("Received an invalid integer type: ".concat(t));return"0x".concat(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||void 0===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: ".concat(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: ".concat(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 f(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=f;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 f(BigInt.asUintN(256,t))};e.addHexPrefix=function(t){return"string"!==typeof t||(0,o.isHexPrefixed)(t)?t:"0x"+t},e.short=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;const r=n.isBuffer(t)?t.toString("hex"):t;return r.length<=e?r:r.slice(0,e)+"\u2026"};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".concat(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("".concat(e," cannot have leading zeroes, received: ").concat(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(null!==e&&void 0!==e?e:[])};e.bigIntToHex=t=>"0x"+t.toString(16),e.bigIntToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)(f(t))},e.intToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)((0,e.intToBuffer)(t))}},72743:(t,e,r)=>{"use strict";
2Object.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(49320),i=r(68718);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},96114:(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 n=0;n<t.length;n++){const e=t[n];r[2*n]=e/16,r[2*n+1]=e%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)}},4307:(t,e,r)=>{"use strict";var n=r(49320).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.assertIsString=e.assertIsArray=e.assertIsBuffer=e.assertIsHexString=void 0;const i=r(2774);e.assertIsHexString=function(t){if(!(0,i.isHexString)(t)){const e="This method only supports 0x-prefixed hex strings but input was: ".concat(t);throw new Error(e)}};e.assertIsBuffer=function(t){if(!n.isBuffer(t)){const e="This method only supports Buffer but input was: ".concat(t);throw new Error(e)}};e.assertIsArray=function(t){if(!Array.isArray(t)){const e="This method only supports number arrays but input was: ".concat(t);throw new Error(e)}};e.assertIsString=function(t){if("string"!==typeof t){const e="This method only supports strings but input was: ".concat(t);throw new Error(e)}}},81414: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(72743),e),i(r(41300),e),i(r(48998),e),i(r(94344),e),i(r
2(14737),e),i(r(69442),e),i(r(36380),e),i(r(35248),e),i(r(96114),e),i(r(80844),e);var o=r(2774);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(86005),e),i(r(97837),e)},2774:(t,e,r)=>{"use strict";var n=r(49320).Buffer;function i(t){if("string"!==typeof t)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat(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 ".concat(typeof e));return e.length%2&&(e="0".concat(e)),e}e.stripHexPrefix=t=>{if("string"!==typeof t)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat(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 ".concat(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 '".concat(typeof t,"'"));if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat(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){const e=n.from(t,"utf8");return"0x".concat(o(e.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".concat(n):n}return"0x".concat(e)},e.getKeys=function(t,e,r){if(!Array.isArray(t))throw new Error("[getKeys] method expects input 'params' to be an array, got ".concat(typeof t));if("string"!==typeof e)throw new Error("[getKeys] method expects input 'key' to be type 'string', got ".concat(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 ".concat(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]*$/))&&!("undefined"!==typeof e&&e>0&&t.length!==2+2*e)}},86005:(t,e,r)=>{"use strict";var n=r(80792);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)n.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)}}}},97837:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getProvider=e.fetchFromProvider=void 0;const n=r(13428);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=>{var e;if("string"===typeof t)return t;if(void 0!==(null===t||void 0===t||null===(e=t.connection)||void 0===e?void 0:e.url))return t.connection.url;
2throw new Error("Must provide valid provider URL or Web3Provider")}},69442:(t,e,r)=>{"use strict";var n=r(49320).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(9532),o=r(68718),s=r(36380),a=r(72743),u=r(4307);function f(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),h=f(e,a);if(!c(h))throw new Error("Invalid signature v value");const l=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(h)).recoverPublicKey(t);return n.from(l.toRawBytes(!1).slice(1))};e.toRpcSig=function(t,e,r,i){if(!c(f(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(f(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:r,s:n}};e.isValidSignature=function(t,e,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4?arguments[4]:void 0;if(32!==e.length||32!==r.length)return!1;if(!c(f(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("\x19Ethereum Signed Message:\n".concat(t.length),"utf-8");return n.from((0,i.keccak256)(n.concat([e,t])))}},35248:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=void 0;const n=r(36380),i=r(2774);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: ".concat(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")}}},41300:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GWEI_TO_WEI=void 0,e.GWEI_TO_WEI=BigInt(1e9)},14737:(t,e,r)=>{"use strict";var n=r(49320).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.Withdrawal=void 0;const i=r(94344),o=r(36380),s=r(35248);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),f=(0,s.toType)(r,s.TypeOutput.BigInt),c=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),h=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,f,c,h)}static fromValuesArray(t){if(4!==t.length)throw Error("Invalid withdrawalArray length expected=4 actual=".concat(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),f=(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,f,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},87981:(t,e,r)=>{"use strict";r.d(e,{RQ:()=>Ct,_R:()=>x});var n=r(80792);let i=!1,o=!1;const s={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=s.default,u=null;const f=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var c,h;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={}
2)),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(h||(h={}));const l="0123456789abcdef";class d{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>s[r]||n.log.apply(n,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this._log(d.levels.DEBUG,e)}info(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this._log(d.levels.INFO,e)}warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this._log(d.levels.WARNING,e)}makeError(t,e,r){if(o)return this.makeError("censored error",e,{});e||(e=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((t=>{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t<e.length;t++)r+=l[e[t]>>4],r+=l[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(a){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const i=t;let s="";switch(e){case h.NUMERIC_FAULT:{s="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":s+="-"+e;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case h.CALL_EXCEPTION:case h.INSUFFICIENT_FUNDS:case h.MISSING_NEW:case h.NONCE_EXPIRED:case h.REPLACEMENT_UNDERPRICED:case h.TRANSACTION_REPLACED:case h.UNPREDICTABLE_GAS_LIMIT:s=e}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=i,a.code=e,Object.keys(r).forEach((function(t){a[t]=r[t]})),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,d.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),f&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,d.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",d.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",d.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return u||(u=new d("logger/5.8.0")),u}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),i){if(!t)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!t,i=!!e}static setLogLevel(t){const e=s[t.toLowerCase()];null!=e?a=e:d.globalLogger().warn("invalid log level - "+t)}static from(t){return new d(t)}}d.errors=h,d.levels=c;new d("properties/5.8.0");function p(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}const m="abi/5.8.0";r(80792);const b=new d(m),g={};let y={calldata:!0,memory:!0,storage:!0},w={calldata:!0,memory:!0};function v(t,e){if("bytes"===t||"string"===t){if(y[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&w[e])return!0;return(y[e]||"payable"===e)&&b.throwArgumentError("invalid modifier","name",e),!1}function _(t,e){for(let r in e)p(t,r,e[r])}const E=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),A=new RegExp(/^(.*)\[([0-9]*)\]$/);class x{constructor(t,e){t!==g&&b.throwError("use fromString",d.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),_(this,e);
2let r=this.type.match(A);_(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:x.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=E.sighash),E[t]||b.throwArgumentError("invalid format type","format",t),t===E.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==E.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===E.full?", ":",")+")"):e+=this.type,t!==E.sighash&&(!0===this.indexed&&(e+=" indexed"),t===E.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?x.fromString(t,e):x.fromObject(t)}static fromObject(t){return x.isParamType(t)?t:new x(g,{name:t.name||null,type:S(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(x.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){b.throwArgumentError("unexpected character at position ".concat(e),"param",t)}function i(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let a=0;a<t.length;a++){let r=t[a];switch(r){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(a),s.state.allowType=!1,s.type=S(s.type),s.components=[i(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(e||n(a),s.indexed=!0,s.name=""),v(s.type,s.name)&&(s.name=""),s.type=S(s.type);let t=s;s=s.parent,s||n(a),delete t.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(e||n(a),s.indexed=!0,s.name=""),v(s.type,s.name)&&(s.name=""),s.type=S(s.type);let o=i(s.parent);s.parent.components.push(o),delete s.parent,s=o;break;case" ":s.state.allowType&&""!==s.type&&(s.type=S(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(e||n(a),s.indexed&&n(a),s.indexed=!0,s.name=""):v(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(a),s.type+=r,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(a),s.type+=r,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=r,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=r,delete s.state.allowArray):s.state.readArray?s.type+=r:n(a)}}return s.parent&&b.throwArgumentError("unexpected eof","param",t),delete o.state,"indexed"===s.name?(e||n(r.length-7),s.indexed&&n(r.length-7),s.indexed=!0,s.name=""):v(s.type,s.name)&&(s.name=""),o.type=S(o.type),o}(t,!!e),x.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(t){return!(null==t||!t._isParamType)}}function S(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const T=new d("bytes/5.8.0");function B(t){return!!t.toHexString}function M(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return M(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function O(t){return"number"===typeof t&&t==t&&t%1===0}function I(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!O(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const r=t[e];if(!O(r)||r<0||r>=256)return!1}return!0}function N(t,e){if(e||(e={}),"number"===typeof t){T.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),M(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),B(t)&&(t=t.toHexString()),k(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":T.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let t=0;t<r.length;t+=2)n.push(parseInt(r.substring(t,t+2),16));return M(new Uint8Array(n))}return I(t)?M(new Uint8Array(t)):T.throwArgumentError("invalid arrayify value","value",t)}function R(t){const e=t.map((t=>N(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),M(n)}function k(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}const P="0123456789abcdef";function L(t,e){if(e||(e={}
2),"number"===typeof t){T.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=P[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"===typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),B(t))return t.toHexString();if(k(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":T.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(I(t)){let e="0x";for(let r=0;r<t.length;r++){let n=t[r];e+=P[(240&n)>>4]+P[15&n]}return e}return T.throwArgumentError("invalid hexlify value","value",t)}function C(t,e){for("string"!==typeof t?t=L(t):k(t)||T.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&T.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}var U=r(84968);var F=r.n(U)().BN;const j=new d("bignumber/5.8.0"),D={},H=9007199254740991;let z=!1;class Z{constructor(t,e){t!==D&&j.throwError("cannot call constructor directly; use BigNumber.from",d.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return q(V(this).fromTwos(t))}toTwos(t){return q(V(this).toTwos(t))}abs(){return"-"===this._hex[0]?Z.from(this._hex.substring(1)):this}add(t){return q(V(this).add(V(t)))}sub(t){return q(V(this).sub(V(t)))}div(t){return Z.from(t).isZero()&&G("division-by-zero","div"),q(V(this).div(V(t)))}mul(t){return q(V(this).mul(V(t)))}mod(t){const e=V(t);return e.isNeg()&&G("division-by-zero","mod"),q(V(this).umod(e))}pow(t){const e=V(t);return e.isNeg()&&G("negative-power","pow"),q(V(this).pow(e))}and(t){const e=V(t);return(this.isNegative()||e.isNeg())&&G("unbound-bitwise-result","and"),q(V(this).and(e))}or(t){const e=V(t);return(this.isNegative()||e.isNeg())&&G("unbound-bitwise-result","or"),q(V(this).or(e))}xor(t){const e=V(t);return(this.isNegative()||e.isNeg())&&G("unbound-bitwise-result","xor"),q(V(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&G("negative-width","mask"),q(V(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&G("negative-width","shl"),q(V(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&G("negative-width","shr"),q(V(this).shrn(t))}eq(t){return V(this).eq(V(t))}lt(t){return V(this).lt(V(t))}lte(t){return V(this).lte(V(t))}gt(t){return V(this).gt(V(t))}gte(t){return V(this).gte(V(t))}isNegative(){return"-"===this._hex[0]}isZero(){return V(this).isZero()}toNumber(){try{return V(this).toNumber()}catch(t){G("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return j.throwError("this platform does not support BigInt",d.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?z||(z=!0,j.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?j.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",d.errors.UNEXPECTED_ARGUMENT,{}):j.throwError("BigNumber.toString does not accept parameters",d.errors.UNEXPECTED_ARGUMENT,{})),V(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof Z)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new Z(D,W(t)):t.match(/^-?[0-9]+$/)?new Z(D,W(new F(t))):j.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&G("underflow","BigNumber.from",t),(t>=H||t<=-H)&&G("overflow","BigNumber.from",t),Z.from(String(t));const e=t;if("bigint"===typeof e)return Z.from(e.toString());if(I(e))return Z.from(L(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return Z.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(k(t)||"-"===t[0]&&k(t.substring(1))))return Z.from(t)}return j.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function W(t){if("string"!==typeof t)return W(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&j.throwArgumentError("invalid hex","value",t),"0x00"===(t=W(t))?t:"-"+t;
2if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function q(t){return Z.from(W(t))}function V(t){const e=Z.from(t).toHexString();return"-"===e[0]?new F("-"+e.substring(3),16):new F(e.substring(2),16)}function G(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),j.throwError(t,d.errors.NUMERIC_FAULT,n)}const K=new d(m);class X{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){K.throwArgumentError(t,this.localName,e)}}class ${constructor(t){p(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return function(t){let e="0x";return t.forEach((t=>{e+=L(t).substring(2)})),e}(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData(R(t._data))}writeBytes(t){let e=N(t);const r=e.length%this.wordSize;return r&&(e=R([e,this._padding.slice(r)])),this._writeData(e)}_getValue(t){let e=N(Z.from(t));return e.length>this.wordSize&&K.throwError("value out-of-bounds",d.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=R([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class Y{constructor(t,e,r,n){p(this,"_data",N(t)),p(this,"wordSize",e||32),p(this,"_coerceFunc",r),p(this,"allowLoose",n),this._offset=0}get data(){return L(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):Y.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:K.throwError("data out-of-bounds",d.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new Y(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return Z.from(this.readBytes(this.wordSize))}}var J=r(52879),Q=r.n(J);const tt=new d("address/5.8.0");function et(t){k(t,20)||tt.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let o=0;o<40;
2o++)r[o]=e[o].charCodeAt(0);const n=N((i=r,"0x"+Q().keccak_256(N(i))));var i;for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&(e[o]=e[o].toUpperCase()),(15&n[o>>1])>=8&&(e[o+1]=e[o+1].toUpperCase());return"0x"+e.join("")}const rt={};for(let Ut=0;Ut<10;Ut++)rt[String(Ut)]=String(Ut);for(let Ut=0;Ut<26;Ut++)rt[String.fromCharCode(65+Ut)]=String(10+Ut);const nt=Math.floor((it=9007199254740991,Math.log10?Math.log10(it):Math.log(it)/Math.LN10));var it;function ot(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>rt[t])).join("");for(;e.length>=nt;){let t=e.substring(0,nt);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function st(t){let e=null;if("string"!==typeof t&&tt.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=et(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&tt.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==ot(t)&&tt.throwArgumentError("bad icap checksum","address",t),r=t.substring(4),e=new F(r,36).toString(16);e.length<40;)e="0"+e;e=et("0x"+e)}else tt.throwArgumentError("invalid address","address",t);var r;return e}class at extends X{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=st(e)}catch(r){this._throwError(r.message,e)}return t.writeValue(e)}decode(t){return st(C(t.readValue().toHexString(),20))}}class ut extends X{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const ft=new d(m);function ct(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||ft.throwError("cannot encode object for signature with missing names",d.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&ft.throwError("cannot encode object for signature with duplicate names",d.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else ft.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&ft.throwArgumentError("types/value length mismatch","tuple",r);let i=new $(t.wordSize),o=new $(t.wordSize),s=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=o.length;t.encode(o,r);let n=i.writeUpdatableValue();s.push((t=>{n(t+e)}))}else t.encode(i,r)})),s.forEach((t=>{t(i.length)}));let a=t.appendWriter(i);return a+=t.appendWriter(o),a}function ht(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let i=null;if(e.dynamic){let r=t.readValue(),s=n.subReader(r.toNumber());try{i=e.decode(s)}catch(o){if(o.code===d.errors.BUFFER_OVERRUN)throw o;i=o,i.baseType=e.name,i.name=e.localName,i.type=e.type}}else try{i=e.decode(t)}catch(o){if(o.code===d.errors.BUFFER_OVERRUN)throw o;i=o,i.baseType=e.name,i.name=e.localName,i.type=e.type}void 0!=i&&r.push(i)}));const i=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[e];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o<r.length;o++){const t=r[o];t instanceof Error&&Object.defineProperty(r,o,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class lt extends X{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){Array.isArray(e)||this._throwError("expected array value",e);let r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),ft.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let i=0;i<e.length;i++)n.push(this.coder);return ct(t,n,e)}decode(t){let e=this.length;-1===e&&(e=t.readValue().toNumber(),32*e>t._data.length&&ft.throwError("insufficient data length",d.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let n=0;n<e;n++)r.push(new ut(this.coder));return t.coerce(this.name,ht(t,r))}}class dt extends X{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){return t.writeValue(e?1:0)}decode(t){return t.coerce(this.type,!t.readValue().isZero())}}class pt extends X{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=N(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readValue().toNumber(),!0)}}class mt extends pt{constructor(t){super("bytes",t)}decode(t){return t.coerce(this.name,L(super.decode(t)))}}class bt extends X{constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),this.size=t}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(t,e){let r=N(e);return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}decode(t){return t.coerce(this.name,L(t.readBytes(this.size)))}}class gt extends X{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}decode(t){return t.readBytes(0),t.coerce(this.name,null)}}const yt=Z.from(-1),wt=Z.from(0),vt=Z.from(1),_t=Z.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Et extends X{constructor(t,e,r){const n=(e?"int":"uint")+8*t;super(n,n,r,!1),this.size=t,this.signed=e}defaultValue(){return 0}encode(t,e){let r=Z.from(e),n=_t.mask(8*t.wordSize);if(this.signed){let t=n.mask(8*this.size-1);(r.gt(t)||r.lt(t.add(vt).mul(yt)))&&this._throwError("value out-of-bounds",e)}else(r.lt(wt)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}decode(t){let e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}const At=new d("strings/5.8.0");var xt,St;function Tt(t,e,r,n,i){if(t===St.BAD_PREFIX||t===St.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n<r.length&&r[n]>>6===2;n++)t++;return t}return t===St.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(xt||(xt={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(St||(St={}));const Bt=Object.freeze({error:function(t,e,r,n,i){return At.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:Tt,replace:function(t,e,r,n,i){return t===St.OVERLONG?(n.push(i),0):(n.push(65533),Tt(t,e,r))}});function Mt(t,e){null==e&&(e=Bt.error),t=N(t);const r=[];let n=0;for(;n<t.length;){const i=t[n++];if(i>>7===0){r.push(i);continue}let o=null,s=null;if(192===(224&i))o=1,s=127;else if(224===(240&i))o=2,s=2047;
2else{if(240!==(248&i)){n+=e(128===(192&i)?St.UNEXPECTED_CONTINUE:St.BAD_PREFIX,n-1,t,r);continue}o=3,s=65535}if(n-1+o>=t.length){n+=e(St.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-o-1)-1;for(let u=0;u<o;u++){let i=t[n];if(128!=(192&i)){n+=e(St.MISSING_CONTINUE,n,t,r),a=null;break}a=a<<6|63&i,n++}null!==a&&(a>1114111?n+=e(St.OUT_OF_RANGE,n-1-o,t,r,a):a>=55296&&a<=57343?n+=e(St.UTF16_SURROGATE,n-1-o,t,r,a):a<=s?n+=e(St.OVERLONG,n-1-o,t,r,a):r.push(a))}return r}function Ot(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xt.current;e!=xt.current&&(At.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const e=t.charCodeAt(n);if(e<128)r.push(e);else if(e<2048)r.push(e>>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return N(r)}function It(t,e){return Mt(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}class Nt extends pt{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,Ot(e))}decode(t){return It(super.decode(t))}}class Rt extends X{constructor(t,e){let r=!1;const n=[];t.forEach((t=>{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[n]))})),Object.freeze(t)}encode(t,e){return ct(t,this.coders,e)}decode(t){return t.coerce(this.name,ht(t,this.coders))}}const kt=new d(m),Pt=new RegExp(/^bytes([0-9]*)$/),Lt=new RegExp(/^(u?int)([0-9]*)$/);class Ct{constructor(t){p(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new at(t.name);case"bool":return new dt(t.name);case"string":return new Nt(t.name);case"bytes":return new mt(t.name);case"array":return new lt(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new Rt((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new gt(t.name)}let e=t.type.match(Lt);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!==0)&&kt.throwArgumentError("invalid "+e[1]+" bit length","param",t),new Et(r/8,"int"===e[1],t.name)}if(e=t.type.match(Pt),e){let r=parseInt(e[1]);return(0===r||r>32)&&kt.throwArgumentError("invalid bytes length","param",t),new bt(r,t.name)}return kt.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new Y(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new $(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(x.from(t))));return new Rt(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&kt.throwError("types/values length mismatch",d.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(x.from(t)))),n=new Rt(r,"_"),i=this._getWriter();return n.encode(i,e),i.data}decode(t,e,r){const n=t.map((t=>this._getCoder(x.from(t))));return new Rt(n,"_").decode(this._getReader(N(e),r))}}new Ct},21404:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCurve=e.getHash=void 0;const n=r(65188),i=r(29207),o=r(15185);function s(t){return{hash:t,hmac:function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return(0,n.hmac)(t,e,(0,i.concatBytes)(...o))},randomBytes:i.randomBytes}}e.getHash=s,e.createCurve=function(t,e){const r=e=>(0,o.weierstrass)({...t,...s(e)});return Object.freeze({...r(e),create:r})}},78187:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateBasic=e.wNAF=void 0;const n=r(28488),i=r(6668),o=BigInt(0),s=BigInt(1);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 n=0;n<r;n++){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 f=t.ZERO,c=t.BASE;const h=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&h);o>>=d,n>u&&(n-=l,o+=s);const a=e,p=e+Math.abs(n)-1,m=t%2!==0,b=n<0;0===n?c=c.add(r(m,i[a])):f=f.add(r(b,i[p]))}return{p:f,f:c}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);
2return 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})}},71088:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createHasher=e.isogenyMap=e.hash_to_field=e.expand_message_xof=e.expand_message_xmd=void 0;const n=r(28488),i=r(6668);const o=i.bytesToNumberBE;function s(t,e){if(t<0||t>=1<<8*e)throw new Error("bad I2OSP call: value=".concat(t," length=").concat(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(!(t instanceof Uint8Array))throw new Error("Uint8Array expected")}function f(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function c(t,e,r,n){u(t),u(e),f(r),e.length>255&&(e=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),e)));const{outputLen:o,blockLen:c}=n,h=Math.ceil(r/o);if(h>
vendor: 3,815 bytes, line 2
2255)throw new Error("Invalid xmd length");const l=(0,i.concatBytes)(e,s(e.length,1)),d=s(0,c),p=s(r,2),m=new Array(h),b=n((0,i.concatBytes)(d,t,p,s(0,1),l));m[0]=n((0,i.concatBytes)(b,s(1,1),l));for(let u=1;u<=h;u++){const t=[a(b,m[u-1]),s(u+1,1),l];m[u]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...m).slice(0,r)}function h(t,e,r,n,o){if(u(t),u(e),f(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 l(t,e,r){(0,i.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:l,hash:d,expand:p,DST:m}=r;u(t),f(e);const b=function(t){if(t instanceof Uint8Array)return t;if("string"===typeof t)return(0,i.utf8ToBytes)(t);throw new Error("DST must be Uint8Array or string")}(m),g=s.toString(2).length,y=Math.ceil((g+a)/8),w=e*l*y;let v;if("xmd"===p)v=c(t,b,w,d);else if("xof"===p)v=h(t,b,w,a,d);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');v=t}const _=new Array(e);for(let i=0;i<e;i++){const t=new Array(l);for(let e=0;e<l;e++){const r=y*(e+i*l),a=v.subarray(r,r+y);t[e]=(0,n.mod)(o(a),s)}_[i]=t}return _}e.expand_message_xmd=c,e.expand_message_xof=h,e.hash_to_field=l,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=l(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=l(n,1,{...r,DST:r.encodeDST,...i}),s=t.fromAffine(e(o[0])).clearCofactor();return s.assertValidity(),s}}}},28488:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hashToPrivateScalar=e.FpSqrtEven=e.FpSqrtOdd=e.Field=e.nLength=e.FpIsSquare=e.FpDiv=e.FpInvertBatch=e.FpPow=e.validateField=e.isNegativeLE=e.FpSqrt=e.tonelliShanks=e.invert=e.pow2=e.pow=e.mod=void 0;const n=r(6668),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),f=BigInt(5),c=BigInt(8);BigInt(9),BigInt(16);function h(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=".concat(t," mod=").concat(e));let r=h(t,e),n=e,s=i,a=o,u=o,f=i;for(;r!==i;){const t=n/r,e=n%r,i=s-u*t,o=a-f*t;n=r,r=e,s=u,a=f,u=i,f=o}if(n!==o)throw new Error("invert: does not exist");return h(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 f=(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,f),h=t.pow(i,r);for(;!t.eql(h,t.ONE);){if(t.eql(h,t.ZERO))return t.ZERO;let e=1;for(let n=t.sqr(h);e<s&&!t.eql(n,t.ONE);e++)n=t.sqr(n);const r=t.pow(u,o<<BigInt(s-e-1));u=t.sqr(r),c=t.mul(c,r),h=t.mul(h,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===f){const e=(t-f)/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(
2o,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.mod=h,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.isNegativeLE=(t,e)=>(h(t,e)&o)===o;const b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(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 y(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 w(t,e){const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}e.validateField=function(t){const e=b.reduce(((t,e)=>(t[e]="function",t)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(t,e)},e.FpPow=g,e.FpInvertBatch=y,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=w,e.Field=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t<=i)throw new Error("Expected Fp ORDER > 0, got ".concat(t));const{nBitLength:a,nByteLength:u}=w(t,e);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const f=m(t),c=Object.freeze({ORDER:t,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:e=>h(e,t),isValid:e=>{if("bigint"!==typeof e)throw new Error("Invalid field element: expected bigint, got ".concat(typeof e));return i<=e&&e<t},is0:t=>t===i,isOdd:t=>(t&o)===o,neg:e=>h(-e,t),eql:(t,e)=>t===e,sqr:e=>h(e*e,t),add:(e,r)=>h(e+r,t),sub:(e,r)=>h(e-r,t),mul:(e,r)=>h(e*r,t),pow:(t,e)=>g(c,t,e),div:(e,r)=>h(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=>f(c,t)),invertBatch:t=>y(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 ".concat(u,", got ").concat(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){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=(t=(0,n.ensureBytes)("privateHash",t)).length,s=w(e).nByteLength+8;if(s<24||i<s||i>1024)throw new Error("hashToPrivateScalar: expected ".concat(s,"-1024 bytes of input, got ").concat(i));return h(r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t),e-o)+o}},6668:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateObject=e.createHmacDrbg=e.bitMask=e.bitSet=e.bitGet=e.bitLen=e.utf8ToBytes=e.equalBytes=e.concatBytes=e.ensureBytes=e.numberToVarBytesBE=e.numberToBytesLE=e.numberToBytesBE=e.bytesToNumberLE=e.bytesToNumberBE=e.hexToBytes=e.hexToNumber=e.numberToHexUnpadded=e.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=t=>t instanceof Uint8Array,s=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function a(t){if(!o(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=s[t[r]];return e}function u(t){const e=t.toString(16);return 1&e.length?"0".concat(e):e}function f(t){if("string"!==typeof t)throw new Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":"0x".concat(t))}function c(t){if("string"!==typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(e/2);for(let n=0;n<r.length;n++){const e=2*n,i=t.slice(e,e+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[n]=o}return r}function h(t,e){return c(t.toString(16).padStart(2*e,"0"))}function l(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const n=new Uint8Array(e.reduce(((t,e)=>t+e.length),0));let i=0;return e.forEach((t=>{if(!o(t))throw new Error("Uint8Array expected");n.set(t,i),i+=t.length})),n}e.bytesToHex=a,e.numberToHexUnpadded=u,e.hexToNumber=f,e.hexToBytes=c,e.bytesToNumberBE=function(t){return f(a(t))},e.bytesToNumberLE=function(t){if(!o(t))throw new Error("Uint8Array expected");return f(a(Uint8Array.from(t).reverse()))},e.numberToBytesBE=h,e.numberToBytesLE=function(t,e){return h(t,e).reverse()},e.numberToVarBytesBE=function(t){return c(u(t))},e.ensureBytes=function(t,e,r){let n;if("string"===typeof e)try{n=c(e)}catch(s){throw new Error("".concat(t,' must be valid hex string, got "').concat(e,'". Cause: ').concat(s))}else{if(!o(e))throw new Error("".concat(t," must be hex string or Uint8Array"));n=Uint8Array.from(e)}const i=n.length;if("number"===typeof r&&i!==r)throw new Error("".concat(t," expected ").concat(r," bytes, got ").concat(i));return n},e.concatBytes=l,e.equalBytes=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.utf8ToBytes=function(t){if("string"!==typeof t)throw new Error("utf8ToBytes expected string, got ".concat(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=(t,e,i)=>t|(i?n:r)<<BigInt(e);e.bitMask=t=>(i<<BigInt(t-1))-n;const d=t=>new Uint8Array(t),p=t=>Uint8Array.from(t);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=d(t),i=d(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return r(i,n,...e)},u=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d();i=a(p([0]),t),n=a(),0!==t.length&&(i=a(p([1]),t),n=a())},f=()=>{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 l(...r)};return(t,e)=>{let r;for(s(),u(t);!(r=e(f()));)u();return s(),r}};const m={bigint:t=>"bigint"===typeof t,function:t=>"function"===typeof t,boolean:t=>"boolean"===typeof t,string:t=>"string"===typeof 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)};e.validateObject=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(e,r,n)=>{const i=m[r];if("function"!==typeof i)throw new Error('Invalid validator "'.concat(r,'", expected function'));const o=t[e];if((!n||void 0!==o)&&!i(o,t))throw new Error("Invalid param ".concat(String(e),"=").concat(o," (").concat(typeof o,"), expected ").concat(r))};for(const[i,o]of Object.entries(e))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return t}},15185:(t,e,r)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.mapToCurveSimpleSWU=e.SWUFpSqrtRatio=e.weierstrass=e.weierstrassPoints=e.DER=void 0;const n=r(28488),i=r(6668),o=r(6668),s=r(78187);const{bytesToNumberBE:a,hexToBytes:u}=i;e.DER={Err:class extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},_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;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");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:o,l:s}=e.DER._parseInt(n.subarray(2)),{d:a,l:f}=e.DER._parseInt(s);if(f.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:a}},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".concat(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".concat(r(s+o+4),"02").concat(u).concat(i,"02").concat(a).concat(n)}};const f=BigInt(0),c=BigInt(1),h=BigInt(2),l=BigInt(3),d=BigInt(4);function p(t){const e=function(t){const e=(0,s.validateBasic)(t);i.validateObject(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:o}=e;if(r){if(!n.eql(o,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,a=e.toBytes||((t,e,n)=>{const o=e.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.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 h(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),h(e.Gx)))throw new Error("bad generator point: equation left != right");function d(t){return"bigint"===typeof t&&f<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:s,wrapPrivateKey:a,n:u}=e;if(r&&"bigint"!==typeof t){if(t instanceof Uint8Array&&(t=i.bytesToHex(t)),"string"!==typeof t||!r.includes(t.length))throw new Error("Invalid key");t=t.padStart(2*s,"0")}let f;try{f="bigint"===typeof t?t:i.bytesToNumberBE((0,o.ensureBytes)("private key",t,s))}catch(c){throw new Error("private key must be ".concat(s," bytes, hex or bigint, not ").concat(typeof t))}return a&&(f=n.mod(f,u)),p(f),f}const b=new Map;function g(t){if(!(t instanceof y))throw new Error("ProjectivePoint expected")}class y{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 y)throw new Error("projective point not allowed");const i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?y.ZERO:new y(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(y.fromAffine)}static fromHex(t){const e=y.fromAffine(u((0,o.ensureBytes)("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return y.BASE.multiply(m(t))}_setWindowSize(t){this._WINDOW_SIZE=t,b.delete(this)}
vendor: 5,530 bytes, line 2
2assertValidity(){if(this.is0()){if(e.allowInfinityPoint)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=h(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){g(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)),f=r.eql(r.mul(n,a),r.mul(s,i));return u&&f}negate(){return new y(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,f=r.ZERO,c=r.ZERO,h=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),f=r.mul(i,p),f=r.add(u,f),u=r.sub(d,f),f=r.add(d,f),f=r.mul(u,f),u=r.mul(m,u),c=r.mul(i,c),p=r.mul(t,p),m=r.sub(h,p),m=r.mul(t,m),m=r.add(m,c),c=r.add(h,h),h=r.add(c,h),h=r.add(h,p),h=r.mul(h,m),f=r.add(f,h),p=r.mul(s,a),p=r.add(p,p),h=r.mul(p,m),u=r.sub(u,h),c=r.mul(p,d),c=r.add(c,c),c=r.add(c,c),new y(u,f,c)}add(t){g(t);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=t;let f=r.ZERO,c=r.ZERO,h=r.ZERO;const d=e.a,p=r.mul(e.b,l);let m=r.mul(n,s),b=r.mul(i,a),w=r.mul(o,u),v=r.add(n,i),_=r.add(s,a);v=r.mul(v,_),_=r.add(m,b),v=r.sub(v,_),_=r.add(n,o);let E=r.add(s,u);return _=r.mul(_,E),E=r.add(m,w),_=r.sub(_,E),E=r.add(i,o),f=r.add(a,u),E=r.mul(E,f),f=r.add(b,w),E=r.sub(E,f),h=r.mul(d,_),f=r.mul(p,w),h=r.add(f,h),f=r.sub(b,h),h=r.add(b,h),c=r.mul(f,h),b=r.add(m,m),b=r.add(b,m),w=r.mul(d,w),_=r.mul(p,_),b=r.add(b,w),w=r.sub(m,w),w=r.mul(d,w),_=r.add(_,w),m=r.mul(b,_),c=r.add(c,m),m=r.mul(E,_),f=r.mul(v,f),f=r.sub(f,m),m=r.mul(v,b),h=r.mul(E,h),h=r.add(h,m),new y(f,c,h)}subtract(t){return this.add(t.negate())}is0(){return this.equals(y.ZERO)}wNAF(t){return v.wNAFCached(this,b,t,(t=>{const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(y.fromAffine)}))}multiplyUnsafe(t){const n=y.ZERO;if(t===f)return n;if(p(t),t===c)return this;const{endo:i}=e;if(!i)return v.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:a,k2:u}=i.splitScalar(t),h=n,l=n,d=this;for(;s>f||u>f;)s&c&&(h=h.add(d)),u&c&&(l=l.add(d)),d=d.double(),s>>=c,u>>=c;return o&&(h=h.negate()),a&&(l=l.negate()),l=new y(r.mul(l.px,i.beta),l.py,l.pz),h.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:f,f:c}=this.wNAF(e),{p:h,f:l}=this.wNAF(u);f=v.constTimeNegate(t,f),h=v.constTimeNegate(a,h),h=new y(r.mul(h.px,s.beta),h.py,h.pz),n=f.add(h),i=c.add(l)}else{const{p:t,f:e}=this.wNAF(o);n=t,i=e}return y.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){const n=y.BASE,i=(t,e)=>e!==f&&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(y,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(y,this):this.multiplyUnsafe(e.h)}toRawBytes(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),a(y,this,t)}toHex(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return i.bytesToHex(this.toRawBytes(t))}}y.BASE=new y(e.Gx,e.Gy,r.ONE),y.ZERO=new y(r.ZERO,r.ONE,r.ZERO);const w=e.nBitLength,v=(0,s.wNAF)(y,e.endo?Math.ceil(w/2):w);return{CURVE:e,ProjectivePoint:y,normPrivateKeyToScalar:m,weierstrassEquation:h,isWithinCurveOrder:d}}function m(t,e){const r=t.ORDER;let n=f;for(let l=r-c;l%h===f;l/=h)n+=c;const i=n,o=h<<i-c-c,s=o*h,a=(r-c)/s,u=(a-c)/h,p=s-c,m=o,b=t.pow(e,a),g=t.pow(e,(a+c)/h);let y=(e,r)=>{let n=b,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 f=t.mul(s,o);a=t.pow(f,m);let l=t.eql(a,t.ONE);o=t.mul(s,g),a=t.mul(f,n),s=t.cmov(o,s,l),f=t.cmov(a,f,l);for(let u=i;u>c;u--){let e=u-h;e=h<<e-c;let r=t.pow(f,e);const i=t.eql(r,t.ONE);o=t.mul(s,n),n=t.mul(n,n),r=t.mul(f,n),s=t.cmov(o,s,i),f=t.cmov(r,f,i)}return{isValid:l,value:s}};if(t.ORDER%d===l){const r=(t.ORDER-l)/d,n=t.sqrt(t.neg(e));y=(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),f=t.mul(t.sqr(a),i),c=t.eql(f,e);return{isValid:c,value:t.cmov(u,a,c)}}}return y}e.weierstrassPoints=p,e.weierstrass=function(t){const r=function(t){const e=(0,s.validateBasic)(t);return i.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,h=a.BYTES+1,l=2*a.BYTES+1;function d(t){return n.mod(t,u)}function m(t){return n.invert(t,u)}const{ProjectivePoint:b,normPrivateKeyToScalar:g,weierstrassEquation:y,isWithinCurveOrder:w}=p({...r,toBytes(t,e,r){const n=e.toAffine(),o=a.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([e.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,a.toBytes(n.y))},fromBytes(t){const e=t.length,r=t[0],n=t.subarray(1);if(e!==h||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))}}
2throw new Error("Point of length ".concat(e," was invalid. Expected ").concat(h," compressed bytes or ").concat(l," uncompressed bytes"))}{const t=i.bytesToNumberBE(n);if(!(f<(o=t)&&o<a.ORDER))throw new Error("Point is not on curve");const e=y(t);let s=a.sqrt(e);return 1===(1&r)!==((s&c)===c)&&(s=a.neg(s)),{x:t,y:s}}var o}}),v=t=>i.bytesToHex(i.numberToBytesBE(t,r.nByteLength));function _(t){return t>u>>c}const E=(t,e,r)=>i.bytesToNumberBE(t.slice(e,r));class A{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,o.ensureBytes)("compactSignature",t,2*e),new A(E(t,0,e),E(t,e,2*e))}static fromDER(t){const{r:r,s:n}=e.DER.toSig((0,o.ensureBytes)("DER",t));return new A(r,n)}assertValidity(){if(!w(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!w(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new A(this.r,this.s,t)}recoverPublicKey(t){const{r:e,s:n,recovery:i}=this,s=B((0,o.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 f=0===(1&i)?"02":"03",c=b.fromHex(f+v(u)),h=m(u),l=d(-s*h),p=d(n*h),g=b.BASE.multiplyAndAddUnsafe(c,l,p);if(!g)throw new Error("point at infinify");return g.assertValidity(),g}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new A(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}const x={isValidPrivateKey(t){try{return g(t),!0}catch(e){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const t=r.randomBytes(a.BYTES+8),e=n.hashToPrivateScalar(t,u);return i.numberToBytesBE(e,r.nByteLength)},precompute(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.BASE;return e._setWindowSize(t),e.multiply(BigInt(3)),e}};function S(t){const e=t instanceof Uint8Array,r="string"===typeof t,n=(e||r)&&t.length;return e?n===h||n===l:r?n===2*h||n===2*l:t instanceof b}const T=r.bits2int||function(t){const e=i.bytesToNumberBE(t),n=8*t.length-r.nBitLength;return n>0?e>>BigInt(n):e},B=r.bits2int_modN||function(t){return d(T(t))},M=i.bitMask(r.nBitLength);function O(t){if("bigint"!==typeof t)throw new Error("bigint expected");if(!(f<=t&&t<M))throw new Error("bigint expected < 2^".concat(r.nBitLength));return i.numberToBytesBE(t,r.nByteLength)}function I(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N;if(["recovered","canonical"].some((t=>t in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=r;let{lowS:h,prehash:l,extraEntropy:p}=n;null==h&&(h=!0),t=(0,o.ensureBytes)("msgHash",t),l&&(t=(0,o.ensureBytes)("prehashed msgHash",s(t)));const y=B(t),v=g(e),E=[O(v),O(y)];if(null!=p){const t=!0===p?u(a.BYTES):p;E.push((0,o.ensureBytes)("extraEntropy",t,a.BYTES))}const x=i.concatBytes(...E),S=y;return{seed:x,k2sig:function(t){const e=T(t);if(!w(e))return;const r=m(e),n=b.BASE.multiply(e).toAffine(),i=d(n.x);if(i===f)return;const o=d(r*d(S+i*v));if(o===f)return;let s=(n.x===i?0:2)|Number(n.y&c),a=o;return h&&_(o)&&(a=function(t){return _(t)?d(-t):t}(o),s^=1),new A(i,a,s)}}}const N={lowS:r.lowS,prehash:!1},R={lowS:r.lowS,prehash:!1};return b.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return b.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];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 b.fromHex(e).multiply(g(t)).toRawBytes(r)},sign:function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N;const{seed:o,k2sig:s}=I(t,e,n),a=r;return i.createHmacDrbg(a.hash.outputLen,a.nByteLength,a.hmac)(o,s)},verify:function(t,n,i){var s;let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R;const u=t;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in a)throw new Error("options.strict was renamed to lowS");const{lowS:f,prehash:c}=a;let h,l;try{if("string"===typeof u||u instanceof Uint8Array)try{h=A.fromDER(u)}
2catch(x){if(!(x instanceof e.DER.Err))throw x;h=A.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;h=new A(t,e)}}l=b.fromHex(i)}catch(S){if("PARSE"===S.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(f&&h.hasHighS())return!1;c&&(n=r.hash(n));const{r:p,s:g}=h,y=B(n),w=m(g),v=d(y*w),_=d(p*w),E=null===(s=b.BASE.multiplyAndAddUnsafe(l,v,_))||void 0===s?void 0:s.toAffine();return!!E&&d(E.x)===p},ProjectivePoint:b,Signature:A,utils:x}},e.SWUFpSqrtRatio=m,e.mapToCurveSimpleSWU=function(t,e){if(n.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,f,c,h;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),f=t.sqr(a),u=t.mul(f,e.A),o=t.add(o,u),o=t.mul(o,s),f=t.mul(f,a),u=t.mul(f,e.B),o=t.add(o,u),c=t.mul(i,s);const{isValid:l,value:d}=r(o,f);h=t.mul(i,n),h=t.mul(h,d),c=t.cmov(c,s,l),h=t.cmov(h,d,l);const p=t.isOdd(n)===t.isOdd(h);return h=t.cmov(t.neg(h),h,p),c=t.div(c,a),{x:c,y:h}}}},47721:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;const n=r(1172),i=r(29207),o=r(28488),s=r(15185),a=r(6668),u=r(71088),f=r(21404),c=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),h=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),s=BigInt(22),a=BigInt(23),u=BigInt(44),f=BigInt(88),h=t*t*t%e,l=h*h*t%e,p=(0,o.pow2)(l,r,e)*l%e,m=(0,o.pow2)(p,r,e)*l%e,g=(0,o.pow2)(m,d,e)*h%e,y=(0,o.pow2)(g,i,e)*g%e,w=(0,o.pow2)(y,s,e)*y%e,v=(0,o.pow2)(w,u,e)*w%e,_=(0,o.pow2)(v,f,e)*v%e,E=(0,o.pow2)(_,u,e)*w%e,A=(0,o.pow2)(E,r,e)*l%e,x=(0,o.pow2)(A,a,e)*y%e,S=(0,o.pow2)(x,n,e)*h%e,T=(0,o.pow2)(S,d,e);if(!b.eql(b.sqr(T),t))throw new Error("Cannot find square root");return T}const b=(0,o.Field)(c,void 0,void 0,{sqrt:m});e.secp256k1=(0,f.createCurve)({a:BigInt(0),b:BigInt(7),Fp:b,n:h,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=h,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-l*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),u=p(s*t,e),f=p(-n*t,e);let c=(0,o.mod)(t-u*r-f*i,e),d=(0,o.mod)(-u*n-f*s,e);const m=c>a,b=d>a;if(m&&(c=e-c),b&&(d=e-d),c>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:m,k1:c,k2neg:b,k2:d}}}},n.sha256);const g=BigInt(0),y=t=>"bigint"===typeof t&&g<t&&t<c,w=t=>"bigint"===typeof t&&g<t&&t<h,v={};function _(t){let e=v[t];if(void 0===e){const r=(0,n.sha256)(Uint8Array.from(t,(t=>t.charCodeAt(0))));e=(0,a.concatBytes)(r,r),v[t]=e}for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return(0,n.sha256)((0,a.concatBytes)(e,...i))}const E=t=>t.toRawBytes(!0).slice(1),A=t=>(0,a.numberToBytesBE)(t,32),x=t=>(0,o.mod)(t,c),S=t=>(0,o.mod)(t,h),T=e.secp256k1.ProjectivePoint,B=(t,e,r)=>T.BASE.multiplyAndAddUnsafe(t,e,r);function M(t){let r=e.secp256k1.utils.normPrivateKeyToScalar(t),n=T.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:E(n)}}function O(t){if(!y(t))throw new Error("bad x: need 0 < x < p");const e=x(t*t);let r=m(x(e*t+BigInt(7)));r%d!==g&&(r=x(-r));const n=new T(t,r,l);return n.assertValidity(),n}function I(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return S((0,a.bytesToNumberBE)(_("BIP0340/challenge",...e)))}function N(t){return M(t).bytes}function R(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,i.randomBytes)(32);const n=(0,a.ensureBytes)("message",t),{bytes:o,scalar:s}=M(e),u=(0,a.ensureBytes)("auxRand",r,32),f=A(s^(0,a.bytesToNumberBE)(_("BIP0340/aux",u))),c=_("BIP0340/nonce",f,o,n),h=S((0,a.bytesToNumberBE)(c));if(h===g)throw new Error("sign failed: k is zero");const{bytes:l,scalar:d}=M(h),p=I(l,o,n),m=new Uint8Array(64);if(m.set(l,0),m.set(A(S(d+p*s)),32),!k(m,n,o))throw new Error("sign: Invalid signature produced");return m}function k(t,e,r){const n=(0,a.ensureBytes)("signature",t,64),i=(0,a.ensureBytes)("message",e),o=(0,a.ensureBytes)("publicKey",r,32);try{const t=O((0,a.bytesToNumberBE)(o)),e=(0,a.bytesToNumberBE)(n.subarray(0,32));if(!y(e))return!1;const r=(0,a.bytesToNumberBE)(n.subarray(32,64));if(!w(r))return!1;
2const s=I(A(e),E(t),i),u=B(t,r,S(-s));return!(!u||!u.hasEvenY()||u.toAffine().x!==e)}catch(s){return!1}}e.schnorr={getPublicKey:N,sign:R,verify:k,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:O,pointToBytes:E,numberToBytesBE:a.numberToBytesBE,bytesToNumberBE:a.bytesToNumberBE,taggedHash:_,mod:o.mod}};const P=(()=>(0,u.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((t=>t.map((t=>BigInt(t)))))))(),L=(()=>(0,s.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))}))(),C=(()=>(0,u.createHasher)(e.secp256k1.ProjectivePoint,(t=>{const{x:e,y:r}=L(b.create(t[0]));return P(e,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();e.hashToCurve=C.hashToCurve,e.encodeToCurve=C.encodeToCurve},36802:(t,e)=>{"use strict";function r(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("Wrong positive integer: ".concat(t))}function n(t){if("boolean"!==typeof t)throw new Error("Expected boolean, not ".concat(t))}function i(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(r.length>0&&!r.includes(t.length))throw new Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(t.length))}function o(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 s(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];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 a(t,e){i(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least ".concat(r))}Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=void 0,e.number=r,e.bool=n,e.bytes=i,e.hash=o,e.exists=s,e.output=a;const u={number:r,bool:n,bytes:i,hash:o,exists:s,output:a};e.default=u},23401:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHA2=void 0;const n=r(36802),i=r(29207);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){n.default.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){n.default.exists(this),n.default.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 n=a;n<o;n++)e[n]=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,f=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+f,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=f/4,h=this.get();if(c>h.length)throw new Error("_sha2: outputLen bigger than state");for(let n=0;n<c;n++)u.setUint32(4*n,h[n],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.SHA2=o},86628:(t,e)=>{"use strict";
vendor: 5,084 bytes, line 2
2Object.defineProperty(e,"__esModule",{value:!0}),e.add=e.toBig=e.split=e.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(t&r),l:Number(t>>n&r)}:{h:0|Number(t>>n&r),l:0|Number(t&r)}}function o(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],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;e.toBig=(t,e)=>BigInt(t>>>0)<<n|BigInt(e>>>0);function s(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}}e.add=s;const a={fromBig:i,split:o,toBig:e.toBig,shrSH:(t,e,r)=>t>>>r,shrSL:(t,e,r)=>t<<32-r|e>>>r,rotrSH:(t,e,r)=>t>>>r|e<<32-r,rotrSL:(t,e,r)=>t<<32-r|e>>>r,rotrBH:(t,e,r)=>t<<64-r|e>>>r-32,rotrBL:(t,e,r)=>t>>>r-32|e<<64-r,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH:(t,e,r)=>t<<r|e>>>32-r,rotlSL:(t,e,r)=>e<<r|t>>>32-r,rotlBH:(t,e,r)=>e<<r-32|t>>>64-r,rotlBL:(t,e,r)=>t<<r-32|e>>>64-r,add:s,add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/2**32|0)|0,add4L:(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H:(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,add5H:(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0,add5L:(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0)};e.default=a},92906:(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},65188:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const n=r(36802),i=r(29207);class o extends i.Hash{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,n.default.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 n=0;n<s.length;n++)s[n]^=54;this.iHash.update(s),this.oHash=t.create();for(let n=0;n<s.length;n++)s[n]^=106;this.oHash.update(s),s.fill(0)}update(t){return n.default.exists(this),this.iHash.update(t),this}digestInto(t){n.default.exists(this),n.default.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)},1172:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha224=e.sha256=void 0;const n=r(23401),i=r(29207),o=(t,e,r)=>t&e^t&r^e&r,s=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]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class f extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[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 i=0;i<16;i++,e+=4)u[i]=t.getUint32(e,!1);for(let o=16;o<64;o++){const t=u[o-15],e=u[o-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,n=(0,i.rotr)(e,17)^(0,i.rotr)(e,19)^e>>>10;u[o]=n+u[o-7]+r+u[o-16]|0}let{A:r,B:n,C:a,D:f,E:c,F:h,G:l,H:d}=this;for(let m=0;m<64;m++){const t=d+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+((p=c)&h^~p&l)+s[m]+u[m]|0,e=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,a)|0;d=l,l=h,h=c,c=f+t|0,f=a,a=n,n=r,r=t+e|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,f=f+this.D|0,c=c+this.E|0,h=h+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,n,a,f,c,h,l,d)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class c extends f{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4
2191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new f)),e.sha224=(0,i.wrapConstructor)((()=>new c))},41955:(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(36802),i=r(86628),o=r(29207),[s,a,u]=[[],[],[]],f=BigInt(0),c=BigInt(1),h=BigInt(2),l=BigInt(7),d=BigInt(256),p=BigInt(113);for(let A=0,x=c,S=1,T=0;A<24;A++){[S,T]=[T,(2*S+3*T)%5],s.push(2*(5*T+S)),a.push((A+1)*(A+2)/2%64);let t=f;for(let e=0;e<7;e++)x=(x<<c^(x>>l)*p)%d,x&h&&(t^=c<<(c<<BigInt(e))-c);u.push(t)}const[m,b]=i.default.split(u,!0),g=(t,e,r)=>r>32?i.default.rotlBH(t,e,r):i.default.rotlSH(t,e,r),y=(t,e,r)=>r>32?i.default.rotlBL(t,e,r):i.default.rotlSL(t,e,r);function w(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let n=0;n<10;n++)r[n]=t[n]^t[n+10]^t[n+20]^t[n+30]^t[n+40];for(let n=0;n<10;n+=2){const e=(n+8)%10,i=(n+2)%10,o=r[i],s=r[i+1],a=g(o,s,1)^r[e],u=y(o,s,1)^r[e+1];for(let r=0;r<50;r+=10)t[n+r]^=a,t[n+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=a[r],o=g(e,i,n),u=y(e,i,n),f=s[r];e=t[f],i=t[f+1],t[f]=o,t[f+1]=u}for(let n=0;n<50;n+=10){for(let e=0;e<10;e++)r[e]=t[n+e];for(let e=0;e<10;e++)t[n+e]^=~r[(e+2)%10]&r[(e+4)%10]}t[0]^=m[n],t[1]^=b[n]}r.fill(0)}e.keccakP=w;class v extends o.Hash{constructor(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]: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,n.default.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(){w(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){n.default.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){n.default.exists(this,!1),n.default.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 n.default.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(n.default.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 v(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=v;const _=(t,e,r)=>(0,o.wrapConstructor)((()=>new v(e,t,r)));e.sha3_224=_(6,144,28),e.sha3_256=_(6,136,32),e.sha3_384=_(6,104,48),e.sha3_512=_(6,72,64),e.keccak_224=_(1,144,28),e.keccak_256=_(1,136,32),e.keccak_384=_(1,104,48),e.keccak_512=_(1,72,64);const E=(t,e,r)=>(0,o.wrapXOFConstructorWithOpts)((function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new v(e,t,void 0===n.dkLen?r:n.dkLen,!0)}));e.shake128=E(31,168,16),e.shake256=E(31,136,32)},29207:(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.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const n=r(92906),i=t=>t instanceof Uint8Array;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);if(e.rotr=(t,e)=>t<<32-e|t>>>e,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!e.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));e.bytesToHex=function(t){if(!i(t))throw new Error("Uint8Array expected");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;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);
2const r=new Uint8Array(e/2);for(let n=0;n<r.length;n++){const e=2*n,i=t.slice(e,e+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[n]=o}return r};function s(t){if("string"!==typeof t)throw new Error("utf8ToBytes expected string, got ".concat(typeof t));return new Uint8Array((new TextEncoder).encode(t))}function a(t){if("string"===typeof t&&(t=s(t)),!i(t))throw new Error("expected Uint8Array, got ".concat(typeof t));return 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=s,e.toBytes=a,e.concatBytes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const n=new Uint8Array(e.reduce(((t,e)=>t+e.length),0));let o=0;return e.forEach((t=>{if(!i(t))throw new Error("Uint8Array expected");n.set(t,o),o+=t.length})),n};e.Hash=class{clone(){return this._cloneInto()}};e.checkOpts=function(t,e){if(void 0!==e&&("object"!==typeof e||(r=e,"[object Object]"!==Object.prototype.toString.call(r)||r.constructor!==Object)))throw new Error("Options should be object or undefined");var r;return Object.assign(t,e)},e.wrapConstructor=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},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(a(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(a(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(n.crypto&&"function"===typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}},97045:(t,e,r)=>{"use strict"},89968:(t,e,r)=>{"use strict";var n;r.d(e,{W:()=>n}),function(t){t.ONEINCH="1inch",t.PARASWAP="ParaSwap",t.ZEROXAPI="0xAPI",t.WRAPTOKEN="WrapToken",t.OPENOCEAN="OpenOcean",t.UNISWAP="Uniswap",t.KYBERSWAP="Kyberswap",t.PARASWAPV6="ParaSwapV6",t.ODOS="ODOS",t.ZEROXAPIV2="0xAPIV2",t.MAGPIE="Magpie",t.RABBY="Rabby"}(n||(n={}))},20386:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=(r(97045),r(89968));const s=[n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.OP,n.h.FTM,n.h.AVAX,n.h.ARBITRUM,n.h.BASE];(0,i.M)({SUPPORT_CHAINS:s,id:"matcha",dex:o.W.ZEROXAPI})},50807:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=r(89968);const s=[n.h.ETH,n.h.POLYGON,n.h.ARBITRUM,n.h.BASE,n.h.OP,n.h.BSC,n.h.AVAX,"BERA","UNI",n.h.SCRL];(0,i.M)({SUPPORT_CHAINS:s,id:"matcha_v2",dex:o.W.ZEROXAPIV2})},7555:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=(r(97045),r(89968));const s=[n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.OP,n.h.AVAX,n.h.ARBITRUM,n.h.GNOSIS,n.h.BASE,n.h.ERA,n.h.LINEA];(0,i.M)({SUPPORT_CHAINS:s,id:"1inch_v6",dex:o.W.ONEINCH})},62481:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=(r(97045),r(89968));const s=[n.h.ETH,n.h.OP,n.h.ARBITRUM,n.h.BSC,n.h.AVAX,n.h.POLYGON,n.h.AURORA,n.h.LINEA,n.h.BASE,"SONIC",n.h.MANTLE,"BERA",n.h.SCRL,"RONIN"];(0,i.M)({SUPPORT_CHAINS:s,id:"kyberswap",dex:o.W.KYBERSWAP})},20734:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=r(89968);const s=[n.h.ETH,n.h.OP,n.h.ARBITRUM,n.h.BSC,n.h.AVAX,n.h.FTM,n.h.POLYGON,n.h.BASE,n.h.PZE,"SONIC",n.h.BLAST,n.h.MANTA,n.h.METIS,n.h.SCRL,n.h.ERA,n.h.LINEA,"INK","BERA","TAIKO","UNI","ABS"];(0,i.M)({SUPPORT_CHAINS:s,id:"magpie",dex:o.W.MAGPIE})},63594:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=r(89968);const s=[n.h.ETH,n.h.OP,n.h.BSC,n.h.POLYGON,n.h.FTM,n.h.ERA,n.h.MANTLE,n.h.BASE,n.h.ARBITRUM,n.h.AVAX,n.h.LINEA,n.h.SCRL,n.h.MODE];(0,i.M)({SUPPORT_CHAINS:s,id:"odos",dex:o.W.ODOS})},27800:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=(r(97045),r(89968));n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.OP,n.h.FTM,n.h.AVAX,n.h.ARBITRUM,n.h.CRO,n.h.GNOSIS,n.h.AURORA,n.h.BOBA,n.h.KAVA,n.h.METIS,n.h.BASE,n.h.MANTLE,n.h.SCRL,n.h.MODE,n.h.BLAST;const s=[n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.OP,n.h.FTM,n.h.AVAX,n.h.ARBITRUM,n.h.CRO,n.h.BASE,n.h.GNOSIS,"SONIC",n.h.MANTLE,"BERA",n.h.SCRL,"UNI",n.h.MODE,n.h.BLAST,"GRAVITY","SEI"];(0,i.M)({SUPPORT_CHAINS:s,id:"openocean",dex:o.W.OPENOCEAN})},51341:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=(r(97045),r(89968));const s=[n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.AVAX,n.h.OP,n.h.ARBITRUM,n.h.FTM,n.h.BASE];(0,i.M)({SUPPORT_CHAINS:s,id:"paraswap",dex:o.W.PARASWAP})},23736:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=(r(97045),r(89968));const s=[n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.AVAX,n.h.OP,n.h.ARBITRUM,n.h.BASE,n.h.GNOSIS,"UNI","SONIC"];(0,i.M)({SUPPORT_CHAINS:s,id:"paraswap_v6",dex:o.W.PARASWAPV6})},11287:(t,e,r)=>{"use strict";r.d(e,{Af:()=>s});var n=r(12033),i=r(56451),o=r(89968);const s=[n.h.ETH];(0,i.M)({SUPPORT_CHAINS:s,id:"rabby",dex:o.W.RABBY})},16721:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});r(83449);var n=r(12033);r(23434),r(56451);const i=[n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.OP,n.h.FTM,n.h.AVAX,n.h.ARBITRUM,n.h.KLAY,n.h.GNOSIS,n.h.CRO,n.h.AURORA,n.h.LINEA,n.h.BASE,n.h.ERA,n.h.PZE,n.h.SCRL,n.h.MODE,n.h.MANTLE,"SONIC",n.h.BLAST,n.h.METIS,n.h.MANTA,"TAIKO","INK","BERA","ABS"]},48632:(t,e,r)=>{"use strict";r.d(e,{Wq:()=>i.W,B8:()=>n.B8});var n=r(23434),i=r(89968),o=(r(16721),r(7555),r(20386),r(51341),r(27800),r(12033),r(56451));r(97045);(0,o.M)({SUPPORT_CHAINS:[],id:"uniswap3",dex:i.W.UNISWAP});r(62481),r(23736),r(63594),r(50807),r(20734),r(11287)},23434:(t,e,r)=>{"use strict";r.d(e,{B8:()=>b,s3:()=>g});var n=r(12033),i=r(16721),o=r(20386),s=r(7555),a=r(51341),u=r(23736),f=r(62481),c=r(27800),h=r(63594),l=r(50807),d=r(20734),p=r(11287),m=r(89968);n.h.ETH,n.h.BSC,n.h.POLYGON,n.h.OP,n.h.FTM,n.h.AVAX,n.h.ARBITRUM,n.h.KLAY,n.h.GNOSIS,n.h.CRO,n.h.LINEA,n.h.AURORA,n.h.BASE,n.h.ERA,n.h.PZE,n.h.SCRL,n.h.MANTLE,n.h.MODE,n.h.BLAST,n.h.METIS,n.h.MANTA;const b={[m.W.WRAPTOKEN]:i.A,[m.W.ONEINCH]:s.Af,[m.W.PARASWAP]:a.Af,[m.W.ZEROXAPI]:o.Af,[m.W.OPENOCEAN]:c.Af,[m.W.KYBERSWAP]:f.Af,[m.W.PARASWAPV6]:u.Af,[m.W.ODOS]:h.Af,[m.W.ZEROXAPIV2]:l.Af,[m.W.MAGPIE]:d.Af,[m.W.RABBY]:p.Af},g=(m.W.ONEINCH,n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.OP,n.h.AVAX,n.h.ARBITRUM,n.h.GNOSIS,n.h.BASE,n.h.ERA,n.h.LINEA,m.W.PARASWAP,n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.AVAX,n.h.FTM,n.h.ARBITRUM,n.h.OP,n.h.BASE,m.W.ZEROXAPI,n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.OP,n.h.FTM,n.h.AVAX,n.h.ARBITRUM,n.h.BASE,m.W.OPENOCEAN,n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.OP,n.h.FTM,n.h.AVAX,n.h.ARBITRUM,n.h.CRO,n.h.GNOSIS,n.h.AURORA,n.h.BOBA,n.h.KAVA,n.h.METIS,n.h.BASE,n.h.MANTLE,n.h.SCRL,n.h.MODE,n.h.BLAST,m.W.KYBERSWAP,n.h.ETH,n.h.POLYGON,n.h.OP,n.h.ARBITRUM,n.h.BSC,n.h.AVAX,n.h.FTM,n.h.CRO,n.h.AURORA,n.h.BTT,n.h.ROSE,n.h.LINEA,n.h.BASE,n.h.MANTLE,n.h.ERA,n.h.SCRL,m.W.PARASWAPV6,n.h.ETH,n.h.POLYGON,n.h.BSC,n.h.AVAX,n.h.FTM,n.h.OP,n.h.ARBITRUM,n.h.BASE,n.h.PZE,n.h.GNOSIS,m.W.ODOS,n.h.ETH,n.h.OP,n.h.BSC,n.h.POLYGON,n.h.FTM,n.h.ERA,n.h.MANTLE,n.h.BASE,n.h.ARBITRUM,n.h.AVAX,n.h.LINEA,n.h.SCRL,n.h.MODE,m.W.ZEROXAPIV2,n.h.ETH,n.h.POLYGON,n.h.ARBITRUM,n.h.BASE,n.h.OP,n.h.BSC,n.h.AVAX,n.h.SCRL,m.W.MAGPIE,n.h.ETH,n.h.OP,n.h.ARBITRUM,n.h.BSC,n.h.AVAX,n.h.FTM,n.h.POLYGON,n.h.BASE,n.h.PZE,n.h.BLAST,n.h.MANTA,n.h.METIS,n.h.SCRL,n.h.ERA,n.h.LINEA,m.W.RABBY,n.h.ETH,{[m.W.ONEINCH]:{[n.h.ETH]:"0x111111125421ca6dc452d289314280a0f8842a65",[n.h.POLYGON]:"0x111111125421ca6dc452d289314280a0f8842a65",[n.h.BSC]:"0x111111125421ca6dc452d289314280a0f8842a65",[n.h.OP]:"0x111111125421ca6dc452d289314280a0f8842a65",[n.h.AVAX]:"0x111111125421ca6dc452d289314280a0f8842a65",[n.h.ARBITRUM]:"0x111111125421ca6dc452d289314280a0f8842a65",[n.h.GNOSIS]:"0x111111125421ca6dc452d289314280a0f8842a65",[n.h.BASE]:"0x111111125421ca6dc452d289314280a0f8842a65",[n.h.ERA]:"0x6fd4383cb451173d5f9304f041c7bcbf27d561ff",[n.h.LINEA]:"0x111111125421ca6dc452d289314280a0f8842a65"}
2,[m.W.PARASWAP]:{[n.h.ETH]:"0x216b4b4ba9f3e719726886d34a177484278bfcae",[n.h.POLYGON]:"0x216b4b4ba9f3e719726886d34a177484278bfcae",[n.h.BSC]:"0x216b4b4ba9f3e719726886d34a177484278bfcae",[n.h.AVAX]:"0x216b4b4ba9f3e719726886d34a177484278bfcae",[n.h.FTM]:"0x216b4b4ba9f3e719726886d34a177484278bfcae",[n.h.OP]:"0x216b4b4ba9f3e719726886d34a177484278bfcae",[n.h.ARBITRUM]:"0x216b4b4ba9f3e719726886d34a177484278bfcae",[n.h.BASE]:"0x93aAAe79a53759cD164340E4C8766E4Db5331cD7",[n.h.PZE]:"0xc8a21fcd5a100c3ecc037c97e2f9c53a8d3a02a1"},[m.W.ZEROXAPI]:{[n.h.ETH]:"0xdef1c0ded9bec7f1a1670819833240f027b25eff",[n.h.POLYGON]:"0xdef1c0ded9bec7f1a1670819833240f027b25eff",[n.h.BSC]:"0xdef1c0ded9bec7f1a1670819833240f027b25eff",[n.h.OP]:"0xdef1abe32c034e558cdd535791643c58a13acc10",[n.h.FTM]:"0xdef189deaef76e379df891899eb5a00a94cbc250",[n.h.AVAX]:"0xdef1c0ded9bec7f1a1670819833240f027b25eff",[n.h.ARBITRUM]:"0xdef1c0ded9bec7f1a1670819833240f027b25eff",[n.h.BASE]:"0xdef1c0ded9bec7f1a1670819833240f027b25eff"},[m.W.OPENOCEAN]:{[n.h.ETH]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.POLYGON]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.BSC]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.OP]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.FTM]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.AVAX]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.ARBITRUM]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.CRO]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.GNOSIS]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.AURORA]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.BOBA]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.KAVA]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.METIS]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",[n.h.BASE]:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",SONIC:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",[n.h.MANTLE]:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",BERA:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",[n.h.SCRL]:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",UNI:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",[n.h.MODE]:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",[n.h.BLAST]:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",SEI:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",GRAVITY:"0x6352a56caadc4f1e25cd6c75970fa768a3304e64"},[m.W.KYBERSWAP]:{[n.h.ETH]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.POLYGON]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.OP]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.ARBITRUM]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.BSC]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.AVAX]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.FTM]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.CRO]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.AURORA]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.BTT]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.ROSE]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.LINEA]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",[n.h.BASE]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",SONIC:"0x6131b5fae19ea4f9d964eac0408e4408b66337b5",[n.h.MANTLE]:"0x6131b5fae19ea4f9d964eac0408e4408b66337b5",BERA:"0x6131b5fae19ea4f9d964eac0408e4408b66337b5",[n.h.ERA]:"0x3f95ef3f2eaca871858dbe20a93c01daf6c2e923",RONIN:"0x6131b5fae19ea4f9d964eac0408e4408b66337b5",[n.h.SCRL]:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"},[m.W.PARASWAPV6]:{[n.h.ETH]:"0x6A000F20005980200259B80c5102003040001068",[n.h.POLYGON]:"0x6A000F20005980200259B80c5102003040001068",[n.h.BSC]:"0x6A000F20005980200259B80c5102003040001068",[n.h.AVAX]:"0x6A000F20005980200259B80c5102003040001068",[n.h.FTM]:"0x6A000F20005980200259B80c5102003040001068",[n.h.OP]:"0x6A000F20005980200259B80c5102003040001068",[n.h.ARBITRUM]:"0x6A000F20005980200259B80c5102003040001068",[n.h.BASE]:"0x6A000F20005980200259B80c5102003040001068",[n.h.PZE]:"0x6A000F20005980200259B80c5102003040001068",[n.h.GNOSIS]:"0x6A000F20005980200259B80c5102003040001068",UNI:"0x6A000F20005980200259B80c5102003040001068",SONIC:"0x6A000F20005980200259B80c5102003040001068"},[m.W.ODOS]:{[n.h.ETH]:"0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559",[n.h.OP]:"0xCa423977156BB05b13A2BA3b76Bc5419E2fE9680",[n.h.BSC]:"0x89b8AA89FDd0507a99d334CBe3C808fAFC7d850E",[n.h.POLYGON]:"0x4E3288c9ca110bCC82bf38F09A7b425c095d92Bf",[n.h.FTM]:"0xD0c22A5435F4E8E5770C1fAFb5374015FC12F7cD",[n.h.ERA]:"0x4bBa932E9792A2b917D47830C93a9BC79320E4f7",[n.h.MANTLE]:"0xD9F4e85489aDCD0bAF0Cd63b4231c6af58c26745",[n.h.BASE]:"0x19cEeAd7105607Cd444F5ad10dd51356436095a1",[n.h.ARBITRUM]:"0xa669e7A0d4b3e4Fa48af2dE86BD4CD7126Be4e13",[n.h.AVAX]:"0x88de50B233052e4Fb783d4F6db78Cc34fEa3e9FC",[n.h.LINEA]:"0x2d8879046f1559E53eb052E949e9544bCB72f414",[n.h.SCRL]:"0xbFe03C9E20a9Fc0b37de01A172F207004935E0b1",[n.h.MODE]:"0x7E15EB462
2cdc67Cf92Af1f7102465a8F8c784874"},[m.W.ZEROXAPIV2]:{[n.h.ETH]:"0x0000000000001ff3684f28c67538d4d072c22734",[n.h.POLYGON]:"0x0000000000001ff3684f28c67538d4d072c22734",[n.h.ARBITRUM]:"0x0000000000001ff3684f28c67538d4d072c22734",[n.h.BASE]:"0x0000000000001ff3684f28c67538d4d072c22734",[n.h.OP]:"0x0000000000001ff3684f28c67538d4d072c22734",[n.h.BSC]:"0x0000000000001ff3684f28c67538d4d072c22734",[n.h.AVAX]:"0x0000000000001ff3684f28c67538d4d072c22734",BERA:"0x0000000000001ff3684f28c67538d4d072c22734",UNI:"0x0000000000001ff3684f28c67538d4d072c22734",[n.h.SCRL]:"0x0000000000005e88410ccdfade4a5efae4b49562"},[m.W.MAGPIE]:{[n.h.ETH]:"0xa6e941eab67569ca4522f70d343714ff51d571c4",[n.h.OP]:"0xa6e941eab67569ca4522f70d343714ff51d571c4",[n.h.ARBITRUM]:"0xfb1b08ba6ba284934d817ea3c9d18f592cc59a50",[n.h.BSC]:"0x29ed0a2f22a92ff84a7f196785ca6b0d21aeec62",[n.h.AVAX]:"0x3611b82c7b13e72b26eb0e9be0613bee7a45ac7c",[n.h.FTM]:"0x5affa5312ade198d9527acf058fee1c8ed8fe9f3",[n.h.POLYGON]:"0xa6e941eab67569ca4522f70d343714ff51d571c4",[n.h.BASE]:"0x5e766616aabfb588e23a8ea854e9dbd1042affd3",[n.h.PZE]:"0x3950bf2fff93e5d502430f17924aef4c621ea772",SONIC:"0xc325856e5585823aac0d1fd46c35c608d95e65a9",[n.h.BLAST]:"0xc9f1a0ba8071685e3529982b59c8645b27734bd0",[n.h.MANTA]:"0x6d3c9920c7a2617ea98c9afcf7219d0f166ab758",[n.h.METIS]:"0xda52965937213f51bfe716f338714afa80ff17bf",[n.h.SCRL]:"0x9ee06954418687c6fb3a9966f7c46e0a245f0183",[n.h.ERA]:"0xb44958ff91b4b67d8d4db010e38ccffe52551ecb",TAIKO:"0x5affa5312ade198d9527acf058fee1c8ed8fe9f3",INK:"0x52bebb970697476313ae2b3383f40d4afd4ad9d3",BERA:"0x52bebb970697476313ae2b3383f40d4afd4ad9d3",[n.h.LINEA]:"0x52bebb970697476313ae2b3383f40d4afd4ad9d3",ABS:"0x956df8424b556f0076e8abf5481605f5a791cc7f",UNI:"0x956df8424b556f0076e8abf5481605f5a791cc7f"},[m.W.RABBY]:{[n.h.ETH]:"0x7fd9cfeef127451918c688c49e9905e47da3e985"}})},56451:(t,e,r)=>{"use strict";r.d(e,{M:()=>a});var n=r(12033),i=r(89968),o=r(23434),s=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}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())}))};const a=t=>{let{SUPPORT_CHAINS:e,id:r,dex:a}=t;return(t,e)=>s(void 0,void 0,void 0,(function*(){if(!t.chainServerId||!t.nativeTokenAddress)throw new Error("lack chainServerId or nativeTokenAddress is not support}");const s={id:t.userAddress,chain_id:t.chainServerId,dex_id:t.chain===n.h.ETH?r:"".concat(t.chainServerId,"_").concat(r),pay_token_id:t.fromToken,pay_token_raw_amount:t.amount,receive_token_id:t.toToken,slippage:t.slippage/100};t.fee&&(s.fee=!0),t.insufficient&&(s.no_pre_exec=!0);const u=yield e.getSwapQuote(s),f=(c=u.pay_token.id,h=t.nativeTokenAddress,"string"===typeof c&&"string"===typeof h&&c.toLowerCase()===h.toLowerCase());var c,h;return{dexFeeDesc:u.dex_fee_desc,tx:{data:u.dex_swap_calldata,value:f?t.amount:"0",to:u.dex_swap_to,from:t.userAddress},fromToken:u.pay_token.id,fromTokenAmount:t.amount,fromTokenDecimals:u.pay_token.decimals,toToken:u.receive_token.id,toTokenAmount:u.receive_token_raw_amount+"",toTokenDecimals:u.receive_token.decimals,spender:a===i.W.PARASWAP?o.s3[i.W.PARASWAP][t.chain]:u.dex_swap_to,gasUsed:u.gas_used,origin:u}}))}},13983: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=r(49320).Buffer}catch(x){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(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);
vendor: 5,841 bytes, line 2
2if("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++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"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){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),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,f=0,c=r;c<a;c+=n)f=u(t,c,c+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var h=1;for(f=u(t,c,t.length,e),c=0;c<s;c++)h*=e;this.imuln(h),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},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 f=["","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"],c=[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],h=[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 l(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 f=1;f<n;f++){for(var c=u>>>26,h=67108863&u,l=Math.min(f,e.length-1),d=Math.max(0,f-t.length+1);d<=l;d++){var p=f-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&s}r.words[f]=0|h,u=0|c}return 0!==u?r.words[f]=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?f[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 l=c[t],d=h[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:f[l-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("undefined"!==typeof 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,f=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),f[o-a-1]=s}return f},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>>>
vendor: 35,012 bytes, line 2
2=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 d=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,c=0|s[0],h=8191&c,l=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,b=0|s[2],g=8191&b,y=b>>>13,w=0|s[3],v=8191&w,_=w>>>13,E=0|s[4],A=8191&E,x=E>>>13,S=0|s[5],T=8191&S,B=S>>>13,M=0|s[6],O=8191&M,I=M>>>13,N=0|s[7],R=8191&N,k=N>>>13,P=0|s[8],L=8191&P,C=P>>>13,U=0|s[9],F=8191&U,j=U>>>13,D=0|a[0],H=8191&D,z=D>>>13,Z=0|a[1],W=8191&Z,q=Z>>>13,V=0|a[2],G=8191&V,K=V>>>13,X=0|a[3],$=8191&X,Y=X>>>13,J=0|a[4],Q=8191&J,tt=J>>>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,ft=at>>>13,ct=0|a[8],ht=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 bt=(f+(n=Math.imul(h,H))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,H)|0))<<13)|0;f=((o=Math.imul(l,z))+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(m,H)|0,o=Math.imul(m,z);var gt=(f+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,q)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,H),i=(i=Math.imul(g,z))+Math.imul(y,H)|0,o=Math.imul(y,z),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,q)|0;var yt=(f+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(l,G)|0))<<13)|0;f=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(v,H),i=(i=Math.imul(v,z))+Math.imul(_,H)|0,o=Math.imul(_,z),n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,q)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0;var wt=(f+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,$)|0))<<13)|0;f=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(A,H),i=(i=Math.imul(A,z))+Math.imul(x,H)|0,o=Math.imul(x,z),n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,q)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,q)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var vt=(f+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(T,H),i=(i=Math.imul(T,z))+Math.imul(B,H)|0,o=Math.imul(B,z),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,q)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|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 _t=(f+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,H),i=(i=Math.imul(O,z))+Math.imul(I,H)|0,o=Math.imul(I,z),n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Et=(f+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(R,H),i=(i=Math.imul(R,z))+Math.imul(k,H)|0,o=Math.imul(k,z),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,q)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var At=(f+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,z))+Math.imul(C,H)|0,o=Math.imul(C,z),n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,z))+Math.imul(j,H)|0,o=Math.imul(j,z),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ft)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ft)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(l,pt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,q))+Math.imul(j,W)|0,o=Math.imul(j,q),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ft)|0,n=n+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var Tt=(f+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,K))+Math.imul(j,G)|0,o=Math.imul(j,K),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0;var Bt=(f+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;f=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,Y))+Math.imul(j,$)|0,o=Math.imul(j,Y),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ft)|0,n=n+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0;var Mt=(f+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(_,pt)|0))<<13)|0;f=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(j,Q)|0,o=Math.imul(j,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ft)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Ot=(f+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(x,pt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(j,rt)|0,o=Math.imul(j,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ft)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var It=(f+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(B,pt)|0))<<13)|0;f=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(j,ot)|0,o=Math.imul(j,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ft)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,lt)|0;var Nt=(f+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(I,pt)|0))<<13)|0;f=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,ft))+Math.imul(j,ut)|0,o=Math.imul(j,ft),n=n+Math.imul(L,ht)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,lt)|0;var Rt=(f+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(k,pt)|0))<<13)|0;f=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,ht),i=(i=Math.imul(F,lt))+Math.imul(j,ht)|0,o=Math.imul(j,lt);var kt=(f+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(C,pt)|0))<<13)|0;f=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863;var Pt=(f+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(j,pt)|0))<<13)|0;return f=((o=Math.imul(j,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=bt,u[1]=gt,u[2]=yt,u[3]=wt,u[4]=vt,u[5]=_t,u[6]=Et,u[7]=At,u[8]=xt,u[9]=St,u[10]=Tt,u[11]=Bt,u[12]=Mt,u[13]=Ot,u[14]=It,u[15]=Nt,u[16]=Rt,u[17]=kt,u[18]=Pt,0!==f&&(u[19]=f,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?l(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),f=Math.max(0,o-t.length+1);f<=u;f++){var c=o-f,h=(0|t.words[c])*(0|e.words[f]),l=67108863&h;a=67108863&(l=l+a|0),i+=(s=(s=s+(h/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):p(this,t,e),r},m.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},m.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},m.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]]},m.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),f=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=u,l=f,d=0;d<s;d++){var p=r[c+d],m=n[c+d],b=r[c+d+s],g=n[c+d+s],y=h*b-l*g;g=h*g+l*b,b=y,r[c+d]=p+b,n[c+d]=m+g,r[c+d+s]=p-b,n[c+d+s]=m-g,d!==a&&(y=u*h-f*l,l=u*l+f*h,h=y)}},m.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},m.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}},m.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},m.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))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.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),f=new Array(n),c=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,c,h,n,i);for(var d=0;d<n;d++){var p=a[d]*c[d]-u[d]*h[d];u[d]=a[d]*h[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),p(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 f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var c=0;for(f=this.length-1;f>=0&&(0!==c||f>=i);f--){var h=0|this.words[f];this.words[f]=c<<26-o|h>>>o,c=h&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 f=0;f<a.length;f++)a.words[f]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=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),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var c=r.clone(),h=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(h)),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(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},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 f=0,c=1;0===(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >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 b={k256:null,p224:null,p192:null,p25519:null};function g(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 y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){g.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.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):r.strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(y,g),y.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},y.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,g),i(v,g),i(_,g),_.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(b[t])return b[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new w;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return b[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(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,f).cmp(u);)c.redIAdd(u);for(var h=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,b=0;0!==m.cmp(a);b++)m=m.redSqr();n(b<p);var g=this.pow(h,new o(1).iushln(p-b-1));l=l.redMul(g),h=g.redSqr(),d=d.redMul(h),p=b}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);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 f=e.words[n],c=u-1;c>=0;c--){var h=f>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}
2u=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)},77651:(t,e,r)=>{"use strict";var n=r(49320).Buffer,i=r(75066),o=r(13654),s=r(65015),a=r(44268),u=r(1858),f=r(1177);for(var c in f)e[c]=f[c];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;function h(t){if("number"!==typeof t||t<e.DEFLATE||t>e.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}h.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||u.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},h.prototype.write=function(t,e,r,n,i,o,s){return this._write(!0,t,e,r,n,i,o,s)},h.prototype.writeSync=function(t,e,r,n,i,o,s){return this._write(!1,t,e,r,n,i,o,s)},h.prototype._write=function(t,r,s,a,u,f,c,h){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==e.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==e.Z_NO_FLUSH&&r!==e.Z_PARTIAL_FLUSH&&r!==e.Z_SYNC_FLUSH&&r!==e.Z_FULL_FLUSH&&r!==e.Z_FINISH&&r!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=n.alloc(0),u=0,a=0),this.strm.avail_in=u,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=h,this.strm.output=f,this.strm.next_out=c,this.flush=r,!t)return this._process(),this._checkError()?this._afterSync():void 0;var l=this;return i.nextTick((function(){l._process(),l._after()})),this},h.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},h.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=u.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=u.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=u.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=u.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},h.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ER
vendor: 10,753 bytes, line 2
2ROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},h.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},h.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},h.prototype.init=function(t,r,n,i,s){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(t>=8&&t<=15,"invalid windowBits"),o(r>=-1&&r<=9,"invalid compression level"),o(n>=1&&n<=9,"invalid memlevel"),o(i===e.Z_FILTERED||i===e.Z_HUFFMAN_ONLY||i===e.Z_RLE||i===e.Z_FIXED||i===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,t,n,i,s),this._setDictionary()},h.prototype.params=function(){throw new Error("deflateParams Not supported")},h.prototype.reset=function(){this._reset(),this._setDictionary()},h.prototype._init=function(t,r,n,i,o){switch(this.level=t,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},h.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},h.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=a.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=u.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=h},58255:(t,e,r)=>{"use strict";var n=r(75066),i=r(49320).Buffer,o=r(55922).Transform,s=r(77651),a=r(65256),u=r(13654).ok,f=r(49320).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+f.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var h=Object.keys(s),l=0;l<h.length;l++){var d=h[l];d.match(/^Z/)&&Object.defineProperty(e,d,{enumerable:!0,value:s[d],writable:!1})}for(var p={Z_OK:s.Z_OK,Z_STREAM_END:s.Z_STREAM_END,Z_NEED_DICT:s.Z_NEED_DICT,Z_ERRNO:s.Z_ERRNO,Z_STREAM_ERROR:s.Z_STREAM_ERROR,Z_DATA_ERROR:s.Z_DATA_ERROR,Z_MEM_ERROR:s.Z_MEM_ERROR,Z_BUF_ERROR:s.Z_BUF_ERROR,Z_VERSION_ERROR:s.Z_VERSION_ERROR},m=Object.keys(p),b=0;b<m.length;b++){var g=m[b];p[p[g]]=g}function y(t,e,r){var n=[],o=0;function s(){for(var e;null!==(e=t.read());)n.push(e),o+=e.length;t.once("readable",s)}function a(){var e,s=null;o>=f?s=new RangeError(c):e=i.concat(n,o),n=[],t.close(),r(s,e)}t.on("error",(function(e){t.removeListener("end",a),t.removeListener("readable",s),r(e)})),t.on("end",a),t.end(e),s()}function w(t,e){if("string"===typeof e&&(e=i.from(e)),!i.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function v(t){if(!(this instanceof v))return new v(t);M.call(this,t,s.DEFLATE)}function _(t){if(!(this instanceof _))return new _(t);M.call(this,t,s.INFLATE)}function E(t){if(!(this instanceof E))return new E(t);M.call(this,t,s.GZIP)}function A(t){if(!(this instanceof A))return new A(t);M.call(this,t,s.GUNZIP)}function x(t){if(!(this instanceof x))return new x(t);M.call(this,t,s.DEFLATERAW)}function S(t){if(!(this instanceof S))return new S(t);M.call(this,t,s.INFLATERAW)}function T(t){if(!(this instanceof T))return new T(t);M.call(this,t,s.UNZIP)}function B(t){return t===s.Z_NO_FLUSH||t===s.Z_PARTIAL_FLUSH||t===s.Z_SYNC_FLUSH||t===s.Z_FULL_FLUSH||t===s.Z_FINISH||t===s.Z_BLOCK}function M(t,r){var n=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,o.call(this,t),t.flush&&!B(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!B(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||s.Z_NO_FLUSH,this._finishFlushFlag="undefined"!==typeof t.finishFlush?t.finishFlush:s.Z_FINISH,t.chunkSize&&(t.chunkSize<e.Z_MIN_CHUNK||t.chunkSize>e.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<e.Z_MIN_WINDOWBITS||t.windowBits>e.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<e.Z_MIN_LEVEL||t.level>e.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<e.Z_MIN_MEMLEVEL||t.memLevel>e.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!i.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(t,r){O(a),a._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],a.emit("error",n)};var u=e.Z_DEFAULT_COMPRESSION;"number"===typeof t.level&&(u=t.level);var f=e.Z_DEFAULT_STRATEGY;"number"===typeof t.strategy&&(f=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,u,t.memLevel||e.Z_DEFAULT_MEMLEVEL,f,t.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=f,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!n._handle},configurable:!0,enumerable:!0})}function O(t,e){e&&n.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function I(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),e.Deflate=v,e.Inflate=_,e.Gzip=E,e.Gunzip=A,e.DeflateRaw=x,e.InflateRaw=S,e.Unzip=T,e.createDeflate=function(t){return new v(t)},e.createInflate=function(t){return new _(t)},e.createDeflateRaw=function(t){return new x(t)},e.createInflateRaw=function(t){return new S(t)},e.createGzip=function(t){return new E(t)},e.createGunzip=function(t){return new A(t)},e.createUnzip=function(t){return new T(t)},e.deflate=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new v(e),t,r)},e.deflateSync=function(t,e){return w(new v(e),t)},e.gzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new E(e),t,r)},e.gzipSync=function(t,e){return w(new E(e),t)},e.deflateRaw=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new x(e),t,r)},e.deflateRawSync=function(t,e){return w(new x(e),t)},e.unzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new T(e),t,r)},e.unzipSync=function(t,e){return w(new T(e),t)},e.inflate=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new _(e),t,r)},e.inflateSync=function(t,e){return w(new _(e),t)},e.gunzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new A(e),t,r)},e.gunzipSync=function(t,e){return w(new A(e),t)},e.inflateRaw=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new S(e),t,r)},e.inflateRawSync=function(t,e){return w(new S(e),t)},a.inherits(M,o),M.prototype.params=function(t,r,i){if(t<e.Z_MIN_LEVEL||t>e.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(r!=e.Z_FILTERED&&r!=e.Z_HUFFMAN_ONLY&&r!=e.Z_RLE&&r!=e.Z_FIXED&&r!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==t||this._strategy!==r){var o=this;this.flush(s.Z_SYNC_FLUSH,(function(){u(o._handle,"zlib binding closed"),o._handle.params(t,r),o._hadError||(o._level=t,o._strategy=r,i&&i())}))}else n.nextTick(i)},M.prototype.reset=function(){return u(this._handle,"zlib binding closed"),this._handle.reset()},M.prototype._flush=function(t){this._transform(i.alloc(0),"",t)},M.prototype.flush=function(t,e){var r=this,o=this._writableState;("function"===typeof t||void 0===t&&!e)&&(e=t,t=s.Z_FULL_FLUSH),o.ended?e&&n.nextTick(e):o.ending?e&&this.once("end",e):o.needDrain?e&&this.once("drain",(function(){return r.flush(t,e)})):(this._flushFlag=t,this.write(i.alloc(0),"",e))},M.prototype.close=function(t){O(this,t),n.nextTick(I,this)},M.prototype._transform=function(t,e,r){var n,o=this._writableState,a=(o.ending||o.ended)&&(!t||o.length===t.length);return null===t||i.isBuffer(t)?this._handle?(a?n=this._finishFlushFlag:(n=this._flushFlag,t.length>=o.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(t,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},M.prototype._processChunk=function(t,e,r){var n=t&&t.length,o=this._chunkSize-this._offset,s=0,a=this,h="function"===typeof r;if(!h){var l,d=[],p=0;this.on("error",(function(t){l=t})),u(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(e,t,s,n,this._buffer,this._offset,o)}while(!this._hadError&&y(m[0],m[1]));if(this._hadError)throw l;if(p>=f)throw O(this),new RangeError(c);var b=i.concat(d,p);return O(this),b}u(this._handle,"zlib binding closed");var g=this._handle.write(e,t,s,n,this._buffer,this._offset,o);function y(f,c){if(this&&(this.buffer=null,this.callback=null),!a._hadError){var l=o-c;if(u(l>=0,"have should not go down"),l>0){var m=a._buffer.slice(a._offset,a._offset+l);a._offset+=l,h?a.push(m):(d.push(m),p+=m.length)}if((0===c||a._offset>=a._chunkSize)&&(o=a._chunkSize,a._offset=0,a._buffer=i.allocUnsafe(a._chunkSize)),0===c){if(s+=n-f,n=f,!h)return!0;var b=a._handle.write(e,t,s,n,a._buffer,a._offset,a._chunkSize);return b.callback=y,void(b.buffer=t)}if(!h)return!1;r()}}g.buffer=t,g.callback=y},a.inherits(v,M),a.inherits(_,M),a.inherits(E,M),a.inherits(A,M),a.inherits(x,M),a.inherits(S,M),a.inherits(T,M)},24514:t=>{t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Parti
2al Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},9462:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(19283);function i(t){return"string"===typeof t&&(!!/^(0x)?[0-9a-f]{512}$/i.test(t)&&!(!/^(0x)?[0-9a-f]{512}$/.test(t)&&!/^(0x)?[0-9A-F]{512}$/.test(t)))}function o(t,e){"object"===typeof e&&e.constructor===Uint8Array&&(e=n.bytesToHex(e));const r=n.keccak256(e).replace("0x","");for(let n=0;n<12;n+=4){const e=(parseInt(r.substr(n,2),16)<<8)+parseInt(r.substr(n+2,2),16)&2047,i=1<<e%4;if((s(t.charCodeAt(t.length-1-Math.floor(e/4)))&i)!==i)return!1}return!0}function s(t){if(t>=48&&t<=57)return t-48;if(t>=65&&t<=70)return t-55;if(t>=97&&t<=102)return t-87;throw new Error("invalid bloom")}function a(t){return"string"===typeof t&&(!!/^(0x)?[0-9a-f]{64}$/i.test(t)&&!(!/^(0x)?[0-9a-f]{64}$/.test(t)&&!/^(0x)?[0-9A-F]{64}$/.test(t)))}function u(t){return"string"===typeof t&&(!!t.match(/^(0x)?[0-9a-fA-F]{40}$/)||!!t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}e.isBloom=i,e.isInBloom=o,e.isUserEthereumAddressInBloom=function(t,e){if(!i(t))throw new Error("Invalid bloom given");if(!u(e))throw new Error('Invalid ethereum address given: "'.concat(e,'"'));return o(t,n.padLeft(e,64))},e.isContractAddressInBloom=function(t,e){if(!i(t))throw new Error("Invalid bloom given");if(!u(e))throw new Error('Invalid contract address given: "'.concat(e,'"'));return o(t,e)},e.isTopicInBloom=function(t,e){if(!i(t))throw new Error("Invalid bloom given");if(!a(e))throw new Error("Invalid topic");return o(t,e)},e.isTopic=a,e.isAddress=u},19283:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(52879);function i(t){if(null==t)throw new Error("cannot convert null value to array");if("string"===typeof t){const e=t.match(/^(0x)?[0-9a-fA-F]*$/);if(!e)throw new Error("invalid hexidecimal string");if("0x"!==e[1])throw new Error("hex string must have 0x prefix");(t=t.substring(2)).length%2&&(t="0"+t);const r=[];for(let n=0;n<t.length;n+=2)r.push(parseInt(t.substr(n,2),16));return o(new Uint8Array(r))}if(function(t){if(!t||parseInt(String(t.length))!=t.length||"string"===typeof t)return!1;for(let e=0;e<t.length;e++){const r=t[e];if(r<0||r>=256||parseInt(String(r))!=r)return!1}return!0}(t))return o(new Uint8Array(t));throw new Error("invalid arrayify value")}function o(t){return void 0!==t.slice||(t.slice=()=>{const e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}e.keccak256=function(t){return"0x"+n.keccak_256(i(t))},e.padLeft=(t,e)=>{const r=/^0x/i.test(t)||"number"===typeof t,n=e-(t=t.toString().replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(r?"0x":"")+new Array(n).join("0")+t},e.bytesToHex=function(t){const e=[];for(let r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return"0x".concat(e.join("").replace(/^0+/,""))},e.toByteArray=i},9532:(t,e,r)=>{"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.keccak512=e.keccak384=e.keccak256=e.keccak224=void 0;const n=r(41955),i=r(92683);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)},68718:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var n=r(47721);Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},92683: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.wrapHash=e.equalsBytes=e.hexToBytes=e.bytesToUtf8=e.utf8ToBytes=e.createView=e.concatBytes=e.toHex=e.bytesToHex=e.assertBytes=e.assertBool=void 0;const i=n(r(36802)),o=r(29207),s=i.default.bool;e.assertBool=s;const a=i.default.bytes;e.assertBytes=a;var u=r(29207);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.bytesToUtf8=function(t){if(!(t instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got ".concat(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))},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}})()},99232:(t,e,r)=>{"use strict";var n=r(13983),i=r(46950),o=new n(0),s=new n(-1),a={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function u(t){var e=t?t.toLowerCase():"ether",r=a[e];if("string"!==typeof r)throw new Error("[ethjs-unit] the unit provided "+t+" doesn't exists, please use the one of the following units "+JSON.stringify(a,null,2));return new n(r,10)}function f(t){if("string"===typeof t){if(!t.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+t+"', should be a number matching (^-?[0-9.]+).");return t}if("number"===typeof t)return String(t);if("object"===typeof t&&t.toString&&(t.toTwos||t.dividedToIntegerBy))return t.toPrecision?String(t.toPrecision()):t.toString(10);throw new Error("while converting number to string, invalid number value '"+t+"' type "+typeof t+".")}t.exports={unitMap:a,numberToString:f,getValueOfUnit:u,fromWei:function(t,e,r){var n=i(t),f=n.lt(o),c=u(e),h=a[e].length-1||1,l=r||{};f&&(n=n.mul(s));for(var d=n.mod(c).toString(10);d.length<h;)d="0"+d;l.pad||(d=d.match(/^([0-9]*[1-9]|0)(0*)/)[1]);var p=n.div(c).toString(10);l.commify&&(p=p.replace(/\B(?=(\d{3})+(?!\d))/g,","));var m=p+("0"==d?"":"."+d);return f&&(m="-"+m),m},toWei:function(t,e){var r=f(t),i=u(e),o=a[e].length-1||1,c="-"===r.substring(0,1);if(c&&(r=r.substring(1)),"."===r)throw new Error("[ethjs-unit] while converting number "+t+" to wei, invalid value");var h=r.split(".");if(h.length>2)throw new Error("[ethjs-unit] while converting number "+t+" to wei,  too many decimal points");var l=h[0],d=h[1];if(l||(l="0"),d||(d="0"),d.length>o)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal places");for(;d.length<o;)d+="0";l=new n(l),d=new n(d);var p=l.mul(i).add(d);return c&&(p=p.mul(s)),new n(p.toString(10),10)}}},51418:(t,e,r)=>{var n=r(57281),i=r(93860),o=t.exports;for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);function a(t){if("string"===typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}o.request=function(t,e){return t=a(t),n.request.call(this,t,e)},o.get=function(t,e){return t=a(t),n.get.call(this,t,e)}},77035:t=>{t.exports=function(t){if("string"!==typeof t)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},39942:t=>{t.exports=function(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}},78620:(t,e,r)=>{var n=r(35602);t.exports=function(t,e,r,i){return n(t,(function(t,n,o){e(i,t,r(t),o)})),i}},51958:(t,e,r)=>{var n=r(39942),i=r(78620),o=r(95889),s=r(53587);t.exports=function(t,e){return function(r,a){var u=s(r)?n:i,f=e?e():{};return u(r,t,o(a,2),f)}}},41946:(t,e,r)=>{var n=r(87578),i=r(51958),o=Object.prototype.hasOwnProperty,s=i((function(t,e,r){o.call(t,r)?t[r].push(e):n(t,r,[e])}));t.exports=s},13428:(t,e,r)=>{"use strict";var n=r(49320).Buffer,i=r(75066);
2Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidStatusCodeError=e.InvalidCertError=void 0;const o=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class s extends Error{constructor(t,e){super(t),this.fingerprint256=e}}e.InvalidCertError=s;class a extends Error{constructor(t){super("Request Failed. Status Code: ".concat(t)),this.statusCode=t}}function u(t,e){if(!e||"text"===e||"json"===e)try{let n=new TextDecoder("utf8",{fatal:!0}).decode(t);if("text"===e)return n;try{return JSON.parse(n)}catch(r){if("json"===e)throw r;return n}}catch(r){if("text"===e||"json"===e)throw r}return t}e.InvalidStatusCodeError=a;let f={};function c(t,e){let i={...o,...e};const h=r(57281),l=r(51418),d=r(58255),{promisify:p}=r(65256),{resolve:m}=r(93860),b=!!/^https/.test(t);let g={method:i.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const y=t=>t.replace(/:| /g,"").toLowerCase();if(i.keepAlive){var w;const t={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},e=[b,b&&(null===(w=i.sslPinnedCertificates)||void 0===w?void 0:w.map((t=>y(t))).sort())].join();g.agent=f[e]||(f[e]=new(b?l:h).Agent(t))}"json"===i.type&&(g.headers["Content-Type"]="application/json"),i.data&&(i.method||(g.method="POST"),g.body="json"===i.type?JSON.stringify(i.data):i.data),g.headers={...g.headers,...i.headers},i.sslAllowSelfSigned&&(g.rejectUnauthorized=!1);return new Promise(((e,r)=>{var o;const f=async e=>{if(e&&"DEPTH_ZERO_SELF_SIGNED_CERT"===e.code)try{await c(t,{...i,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(n){n&&n.fingerprint256&&(e=new s("Self-signed SSL certificate: ".concat(n.fingerprint256),n.fingerprint256))}r(e)},w=(b?l:h).request(t,g,(o=>{o.on("error",f),(async()=>{try{e(await(async e=>{const r=e.statusCode;if(i.redirect&&300<=r&&r<400&&e.headers.location){if(10==i._redirectCount)throw new Error("Request failed. Too much redirects.");return i._redirectCount+=1,await c(m(t,e.headers.location),i)}if(i.expectStatusCode&&r!==i.expectStatusCode)throw e.resume(),new a(r);let o=[];for await(const t of e)o.push(t);let s=n.concat(o);const f=e.headers["content-encoding"];"br"===f&&(s=await p(d.brotliDecompress)(s)),"gzip"!==f&&"deflate"!==f||(s=await p(d.unzip)(s));const h=u(s,i.type);return i.full?{headers:e.headers,status:r,body:h}:h})(o))}catch(s){r(s)}})()}));w.on("error",f);const v=null===(o=i.sslPinnedCertificates)||void 0===o?void 0:o.map((t=>y(t))),_=t=>{var e;const r=y((null===(e=t.getPeerCertificate())||void 0===e?void 0:e.fingerprint256)||"");if((r||!t.isSessionReused())&&!v.includes(r))return w.emit("error",new s("Invalid SSL certificate: ".concat(r," Expected: ").concat(v),r)),w.abort()};i.sslPinnedCertificates&&w.on("socket",(t=>{t.listeners("secureConnect").map((t=>(t.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||t.on("secureConnect",_.bind(null,t))})),i.keepAlive&&w.setNoDelay(!0),g.body&&w.write(g.body),w.end()}))}const h=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((t=>t.toLowerCase()))),l=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 d(t,e){let r={...o,...e};const n=new Headers;"json"===r.type&&n.set("Content-Type","application/json");let i=new URL(t);if(i.username){const t=btoa("".concat(i.username,":").concat(i.password));n.set("Authorization","Basic ".concat(t)),i.username="",i.password=""}t=""+i;for(let o in r.headers){const t=o.toLowerCase();(h.has(t)||r.cors&&!l.has(t))&&n.set(o,r.headers[o])}let s={headers:n,redirect:r.redirect?"follow":"manual"};r.referrer||(s.referrerPolicy="no-referrer"),r.cors&&(s.mode="cors"),r.data&&(r.method||(s.method="POST"),s.body="json"===r.type?JSON.stringify(r.data):r.data);const f=await fetch(t,s);if(r.expectStatusCode&&f.status!==r.expectStatusCode)throw new a(f.status);const c=u(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:c}:c}const p=!!("object"==typeof i&&i.versions&&i.versions.node&&i.versions.v8);e.default=function(t,e){return(p?c:d)(t,e)}},46950:(t,e,r)=>{var n=r(13983),i=r(21747);t.exports=function(t){if("string"===typeof t||"number"===typeof t){var e=new n(1),r=String(t).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),s=i(r);if("-"===s.substr(0,1)&&(s=i(s.slice(1)),e=new n(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===o&&s.match(/^[0-9A-Fa-f]+$/))return new n(s,16).mul(e);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===o)return new n(s,10).mul(e)}else if("object"===typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new n(t.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},29558:(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,f=a&&u&&"function"===typeof u.get?u.get:null,c=a&&Set.prototype.forEach,h="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,b=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,_=String.prototype.toLowerCase,E=RegExp.prototype.test,A=Array.prototype.concat,x=Array.prototype.join,S=Array.prototype.slice,T=Math.floor,B="function"===typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,O="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"===typeof Symbol&&"object"===typeof Symbol.iterator,N="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,k=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function P(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||E.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof t){var n=t<0?-T(-t):T(t);if(n!==t){var i=String(n),o=y.call(e,i.length+1);return w.call(i,r,"$&_")+"."+w.call(w.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var L=r(65660),C=L.custom,U=z(C)?C:null;function F(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function j(t){return w.call(String(t),/"/g,"&quot;")}function D(t){return"[object Array]"===q(t)&&(!N||!("object"===typeof t&&N in t))}function H(t){return"[object RegExp]"===q(t)&&(!N||!("object"===typeof t&&N in t))}function z(t){if(I)return t&&"object"===typeof t&&t instanceof Symbol;if("symbol"===typeof t)return!0;
2if(!t||"object"!==typeof t||!O)return!1;try{return O.call(t),!0}catch(e){}return!1}t.exports=function t(e,n,i,a){var u=n||{};if(W(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(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=!W(u,"customInspect")||u.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(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(W(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.numericSeparator;if("undefined"===typeof e)return"undefined";if(null===e)return"null";if("boolean"===typeof e)return e?"true":"false";if("string"===typeof e)return G(e,u);if("number"===typeof e){if(0===e)return 1/0/e>0?"0":"-0";var E=String(e);return v?P(e,E):E}if("bigint"===typeof e){var T=String(e)+"n";return v?P(e,T):T}var M="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof i&&(i=0),i>=M&&M>0&&"object"===typeof e)return D(e)?"[Array]":"[Object]";var C=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"===typeof t.indent&&t.indent>0))return null;r=x.call(Array(t.indent+1)," ")}return{base:r,prev:x.call(Array(e+1),r)}}(u,i);if("undefined"===typeof a)a=[];else if(V(a,e)>=0)return"[Circular]";function Z(e,r,n){if(r&&(a=S.call(a)).push(r),n){var o={depth:u.depth};return W(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 K=function(t){if(t.name)return t.name;var e=g.call(b.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),tt=Q(e,Z);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(tt.length>0?" { "+x.call(tt,", ")+" }":"")}if(z(e)){var et=I?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(e);return"object"!==typeof e||I?et:X(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="<"+_.call(String(e.nodeName)),nt=e.attributes||[],it=0;it<nt.length;it++)rt+=" "+nt[it].name+"="+F(j(nt[it].value),"double",u);return rt+=">",e.childNodes&&e.childNodes.length&&(rt+="..."),rt+="</"+_.call(String(e.nodeName))+">"}if(D(e)){if(0===e.length)return"[]";var ot=Q(e,Z);return C&&!function(t){for(var e=0;e<t.length;e++)if(V(t[e],"\n")>=0)return!1;return!0}(ot)?"["+J(ot,C)+"]":"[ "+x.call(ot,", ")+" ]"}if(function(t){return"[object Error]"===q(t)&&(!N||!("object"===typeof t&&N in t))}(e)){var st=Q(e,Z);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===st.length?"["+String(e)+"]":"{ ["+String(e)+"] "+x.call(st,", ")+" }":"{ ["+String(e)+"] "+x.call(A.call("[cause]: "+Z(e.cause),st),", ")+" }"}if("object"===typeof e&&m){if(U&&"function"===typeof e[U]&&L)return L(e,{depth:M-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{f.call(t)}catch(rt){return!0}return t instanceof Map}catch(e){}return!1}(e)){var at=[];return s&&s.call(e,(function(t,r){at.push(Z(r,e,!0)+" => "+Z(t,e))})),Y("Map",o.call(e),at,C)}if(function(t){if(!f||!t||"object"!==typeof t)return!1;try{f.call(t);try{o.call(t)}catch(e){return!0}return t instanceof Set}catch(r){}return!1}(e)){var ut=[];return c&&c.call(e,(function(t){ut.push(Z(t,e))})),Y("Set",f.call(e),ut,C)}if(function(t){if(!h||!t||"object"!==typeof t)return!1;try{h.call(t,h);try{l.call(t,l)}catch(rt){return!0}return t instanceof WeakMap}catch(e){}return!1}(e))return $("WeakMap");if(function(t){if(!l||!t||"object"!==typeof t)return!1;try{l.call(t,l);try{h.call(t,h)}catch(rt){return!0}return t instanceof WeakSet}catch(e){}return!1}(e))return $("WeakSet");if(function(t){if(!d||!t||"object"!==typeof t)return!1;try{return d.call(t),!0}catch(e){}return!1}(e))return $("WeakRef");if(function(t){return"[object Number]"===q(t)&&(!N||!("object"===typeof t&&N in t))}(e))return X(Z(Number(e)));if(function(t){if(!t||"object"!==typeof t||!B)return!1;try{return B.call(t),!0}catch(e){}return!1}(e))return X(Z(B.call(e)));if(function(t){return"[object Boolean]"===q(t)&&(!N||!("object"===typeof t&&N in t))}(e))return X(p.call(e));if(function(t){return"[object String]"===q(t)&&(!N||!("object"===typeof t&&N in t))}(e))return X(Z(String(e)));if("undefined"!==typeof window&&e===window)return"{ [object Window] }";if(e===r.g)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===q(t)&&(!N||!("object"===typeof t&&N in t))}(e)&&!H(e)){var ft=Q(e,Z),ct=k?k(e)===Object.prototype:e instanceof Object||e.constructor===Object,ht=e instanceof Object?"":"null prototype",lt=!ct&&N&&Object(e)===e&&N in e?y.call(q(e),8,-1):ht?"Object":"",dt=(ct||"function"!==typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(lt||ht?"["+x.c
2all(A.call([],lt||[],ht||[]),": ")+"] ":"");return 0===ft.length?dt+"{}":C?dt+"{"+J(ft,C)+"}":dt+"{ "+x.call(ft,", ")+" }"}return String(e)};var Z=Object.prototype.hasOwnProperty||function(t){return t in this};function W(t,e){return Z.call(t,e)}function q(t){return m.call(t)}function V(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 G(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return G(y.call(t,0,e.maxStringLength),e)+n}return F(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",e)}function K(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":"")+v.call(e.toString(16))}function X(t){return"Object("+t+")"}function $(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?J(r,n):x.call(r,", "))+"}"}function J(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+x.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=D(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=W(t,i)?e(t[i],t):""}var o,s="function"===typeof M?M(t):[];if(I){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var u in t)W(t,u)&&(r&&String(Number(u))===u&&u<t.length||I&&o["$"+u]instanceof Symbol||(E.call(/[^\w$]/,u)?n.push(e(u,t)+": "+e(t[u],t)):n.push(u+": "+e(t[u],t))));if("function"===typeof M)for(var f=0;f<s.length;f++)R.call(t,s[f])&&n.push("["+e(s[f])+"]: "+e(t[s[f]],t));return n}},58853:(t,e)=>{"use strict";var r="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!==typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,s;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)o=t[e],s.set(o,i),i+=o.length;return s}},o={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,i)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(r)},50755:t=>{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},1177:t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},61697:t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,n,i){var o=e,s=i+n;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^r[a])];return-1^t}},44268:(t,e,r)=>{"use strict";var n,i=r(58853),o=r(23015),s=r(50755),a=r(61697),u=r(5858),f=0,c=4,h=0,l=-2,d=-1,p=4,m=2,b=8,g=9,y=286,w=30,v=19,_=2*y+1,E=15,A=3,x=258,S=x+A+1,T=42,B=103,M=113,O=666,I=1,N=2,R=3,k=4;function P(t,e){return t.msg=u[e],e}function L(t){return(t<<1)-(t>4?9:0)}function C(t){for(var e=t.length;--e>=0;)t[e]=0}function U(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function F(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,U(t.strm)}function j(t,e){t.pending_buf[t.pending++]=e}function D(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function H(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,i.arraySet(e,t.input,t.next_in,o,r),1===t.state.wrap?t.adler=s(t.adler,e,o,r):2===t.state.wrap&&(t.adler=a(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function z(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-S?t.strstart-(t.w_size-S):0,f=t.window,c=t.w_mask,h=t.prev,l=t.strstart+x,d=f[o+s-1],p=f[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(f[(r=e)+s]===p&&f[r+s-1]===d&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&o<l);if(n=x-(l-o),o=l-x,n>s){if(t.match_start=e,s=n,n>=a)break;d=f[o+s-1],p=f[o+s]}}}while((e=h[e&c])>u&&0!==--i);return s<=t.lookahead?s:t.lookahead}function Z(t){var e,r,n,o,s,a=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-S)){i.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=a?n-a:0}while(--r);e=r=a;do{n=t.prev[--e],t.prev[e]=n>=a?n-a:0}while(--r);o+=a}if(0===t.strm.avail_in)break;if(r=H(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=A)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+A-1])&t.hash_mask,t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<A)););}while(t.lookahead<S&&0!==t.strm.avail_in)}function W(t,e){for(var r,n;;){if(t.lookahead<S){if(Z(t),t.lookahead<S&&e===f)return I;if(0===t.lookahead)break}if(r=0,t.lookahead>=A&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-S&&(t.match_length=z(t,r)),t.match_length>=A)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-A),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=A){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(F(t,!1),0===t.strm.avail_out))return I}return t.insert=t.strstart<A-1?t.strstart:A-1,e===c?(F(t,!0),0===t.strm.avail_out?R:k):t.last_lit&&(F(t,!1),0===t.strm.avail_out)?I:N}function q(t,e){for(var r,n,i;;){if(t.lookahead<S){if(Z(t),t.lookahead<S&&e===f)return I;if(0===t.lookahead)break}if(r=0,t.lookahead>=A&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=A-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-S&&(t.match_length=z(t,r),t.match_length<=5&&(1===t.strategy||t.match_length===A&&t.strstart-t.match_start>4096)&&(t.match_length=A-1)),t.prev_length>=A&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-A,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-A),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=A-1,t.strstart++,n&&(F(t,!1),0===t.strm.avail_out))return I}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&F(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return I}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<A-1?t.strstart:A-1,e===c?(F(t,!0),0===t.strm.avail_out?R:k):t.last_lit&&(F(t,!1),0===t.strm.avail_out)?I:N}function V(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function G(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=b,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*_),this.dyn_dtree=new i.Buf16(2*(2*w+1)),this.bl_tree=new i.Buf16(2*(2*v+1)),C(this.dyn_ltree),C(this.dyn_dtree),C(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(E+1),this.heap=new i.Buf16(2*y+1),C(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*y+1),C(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function K(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=m,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?T:M,t.adler=2===e.wrap?0:1,e.last_flush=f,o._tr_init(e),h):P(t,l)}function X(t){var e,r=K(t);
2return r===h&&((e=t.state).window_size=2*e.w_size,C(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=A-1,e.match_available=0,e.ins_h=0),r}function $(t,e,r,n,o,s){if(!t)return l;var a=1;if(e===d&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>g||r!==b||n<8||n>15||e<0||e>9||s<0||s>p)return P(t,l);8===n&&(n=9);var u=new G;return t.state=u,u.strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+A-1)/A),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,X(t)}n=[new V(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Z(t),0===t.lookahead&&e===f)return I;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,F(t,!1),0===t.strm.avail_out))return I;if(t.strstart-t.block_start>=t.w_size-S&&(F(t,!1),0===t.strm.avail_out))return I}return t.insert=0,e===c?(F(t,!0),0===t.strm.avail_out?R:k):(t.strstart>t.block_start&&(F(t,!1),t.strm.avail_out),I)})),new V(4,4,8,4,W),new V(4,5,16,8,W),new V(4,6,32,32,W),new V(4,4,16,16,q),new V(8,16,32,32,q),new V(8,16,128,128,q),new V(8,32,128,256,q),new V(32,128,258,1024,q),new V(32,258,258,4096,q)],e.deflateInit=function(t,e){return $(t,e,b,15,8,0)},e.deflateInit2=$,e.deflateReset=X,e.deflateResetKeep=K,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=e,h):l},e.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||e>5||e<0)return t?P(t,l):l;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===O&&e!==c)return P(t,0===t.avail_out?-5:l);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===T)if(2===i.wrap)t.adler=0,j(i,31),j(i,139),j(i,8),i.gzhead?(j(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),j(i,255&i.gzhead.time),j(i,i.gzhead.time>>8&255),j(i,i.gzhead.time>>16&255),j(i,i.gzhead.time>>24&255),j(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),j(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(j(i,255&i.gzhead.extra.length),j(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(j(i,0),j(i,0),j(i,0),j(i,0),j(i,0),j(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),j(i,3),i.status=M);else{var d=b+(i.w_bits-8<<4)<<8;d|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=M,D(i,d),0!==i.strstart&&(D(i,t.adler>>>16),D(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),U(t),s=i.pending,i.pending!==i.pending_buf_size));)j(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),U(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,j(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),U(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,j(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=B)}else i.status=B;if(i.status===B&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&U(t),i.pending+2<=i.pending_buf_size&&(j(i,255&t.adler),j(i,t.adler>>8&255),t.adler=0,i.status=M)):i.status=M),0!==i.pending){if(U(t),0===t.avail_out)return i.last_flush=-1,h}else if(0===t.avail_in&&L(e)<=L(r)&&e!==c)return P(t,-5);if(i.status===O&&0!==t.avail_in)return P(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==f&&i.status!==O){var p=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(Z(t),0===t.lookahead)){if(e===f)return I;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(F(t,!1),0===t.strm.avail_out))return I}return t.insert=0,e===c?(F(t,!0),0===t.strm.avail_out?R:k):t.last_lit&&(F(t,!1),0===t.strm.avail_out)?I:N}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=x){if(Z(t),t.lookahead<=x&&e===f)return I;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=A&&t.strstart>
20&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+x;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);t.match_length=x-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=A?(r=o._tr_tally(t,1,t.match_length-A),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(F(t,!1),0===t.strm.avail_out))return I}return t.insert=0,e===c?(F(t,!0),0===t.strm.avail_out?R:k):t.last_lit&&(F(t,!1),0===t.strm.avail_out)?I:N}(i,e):n[i.level].func(i,e);if(p!==R&&p!==k||(i.status=O),p===I||p===R)return 0===t.avail_out&&(i.last_flush=-1),h;if(p===N&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(C(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),U(t),0===t.avail_out))return i.last_flush=-1,h}return e!==c?h:i.wrap<=0?1:(2===i.wrap?(j(i,255&t.adler),j(i,t.adler>>8&255),j(i,t.adler>>16&255),j(i,t.adler>>24&255),j(i,255&t.total_in),j(i,t.total_in>>8&255),j(i,t.total_in>>16&255),j(i,t.total_in>>24&255)):(D(i,t.adler>>>16),D(i,65535&t.adler)),U(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?h:1)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==T&&69!==e&&73!==e&&91!==e&&e!==B&&e!==M&&e!==O?P(t,l):(t.state=null,e===M?P(t,-3):h):l},e.deflateSetDictionary=function(t,e){var r,n,o,a,u,f,c,d,p=e.length;if(!t||!t.state)return l;if(2===(a=(r=t.state).wrap)||1===a&&r.status!==T||r.lookahead)return l;for(1===a&&(t.adler=s(t.adler,e,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(C(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,e,p-r.w_size,r.w_size,0),e=d,p=r.w_size),u=t.avail_in,f=t.next_in,c=t.input,t.avail_in=p,t.next_in=0,t.input=e,Z(r);r.lookahead>=A;){n=r.strstart,o=r.lookahead-(A-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+A-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=A-1,Z(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=A-1,r.match_available=0,t.next_in=f,t.input=c,t.avail_in=u,r.wrap=a,h},e.deflateInfo="pako deflate (from Nodeca project)"},16345:t=>{"use strict";t.exports=function(t,e){var r,n,i,o,s,a,u,f,c,h,l,d,p,m,b,g,y,w,v,_,E,A,x,S,T;r=t.state,n=t.next_in,S=t.input,i=n+(t.avail_in-5),o=t.next_out,T=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,f=r.wsize,c=r.whave,h=r.wnext,l=r.window,d=r.hold,p=r.bits,m=r.lencode,b=r.distcode,g=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;t:do{p<15&&(d+=S[n++]<<p,p+=8,d+=S[n++]<<p,p+=8),w=m[d&g];e:for(;;){if(d>>>=v=w>>>24,p-=v,0===(v=w>>>16&255))T[o++]=65535&w;else{if(!(16&v)){if(0===(64&v)){w=m[(65535&w)+(d&(1<<v)-1)];continue e}if(32&v){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}_=65535&w,(v&=15)&&(p<v&&(d+=S[n++]<<p,p+=8),_+=d&(1<<v)-1,d>>>=v,p-=v),p<15&&(d+=S[n++]<<p,p+=8,d+=S[n++]<<p,p+=8),w=b[d&y];r:for(;;){if(d>>>=v=w>>>24,p-=v,!(16&(v=w>>>16&255))){if(0===(64&v)){w=b[(65535&w)+(d&(1<<v)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(E=65535&w,p<(v&=15)&&(d+=S[n++]<<p,(p+=8)<v&&(d+=S[n++]<<p,p+=8)),(E+=d&(1<<v)-1)>u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=v,p-=v,E>(v=o-s)){if((v=E-v)>c&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(A=0,x=l,0===h){if(A+=f-v,v<_){_-=v;do{T[o++]=l[A++]}while(--v);A=o-E,x=T}}else if(h<v){if(A+=f+h-v,(v-=h)<_){_-=v;do{T[o++]=l[A++]}while(--v);if(A=0,h<_){_-=v=h;do{T[o++]=l[A++]}while(--v);A=o-E,x=T}}}else if(A+=h-v,v<_){_-=v;do{T[o++]=l[A++]}while(--v);A=o-E,x=T}for(;_>2;)T[o++]=x[A++],T[o++]=x[A++],T[o++]=x[A++],_-=3;_&&(T[o++]=x[A++],_>1&&(T[o++]=x[A++]))}else{A=o-E;do{T[o++]=T[A++],T[o++]=T[A++],T[o++]=T[A++],_-=3}while(_>2);_&&(T[o++]=T[A++],_>1&&(T[o++]=T[A++]))}break}}break}}while(n<i&&o<a);n-=_=p>>3,d&=(1<<(p-=_<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},1858:(t,e,r)=>{"use strict";var n=r(58853),i=r(50755),o=r(61697),s=r(16345),a=r(82965),u=1,f=2,c=0,h=-2,l=1,d=12,p=30,m=852,b=592;function g(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=l,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(m),e.distcode=e.distdyn=new n.Buf32(b),e.sane=1,e.back=-1,c):h}function v(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,w(t)):h}function _(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?h:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,v(t))):h}function E(t,e){var r,n;return t?(n=new y,t.state=n,n.window=null,(r=_(t,e))!==c&&(t.state=null),r):h}var A,x,S=!0;function T(t){if(S){var e;
vendor: 11,374 bytes, line 2
2for(A=new n.Buf32(512),x=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(u,t.lens,0,288,A,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(f,t.lens,0,32,x,0,t.work,{bits:5}),S=!1}t.lencode=A,t.lenbits=9,t.distcode=x,t.distbits=5}function B(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}e.inflateReset=v,e.inflateReset2=_,e.inflateResetKeep=w,e.inflateInit=function(t){return E(t,15)},e.inflateInit2=E,e.inflate=function(t,e){var r,m,b,y,w,v,_,E,A,x,S,M,O,I,N,R,k,P,L,C,U,F,j,D,H=0,z=new n.Buf8(4),Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return h;(r=t.state).mode===d&&(r.mode=13),w=t.next_out,b=t.output,_=t.avail_out,y=t.next_in,m=t.input,v=t.avail_in,E=r.hold,A=r.bits,x=v,S=_,F=c;t:for(;;)switch(r.mode){case l:if(0===r.wrap){r.mode=13;break}for(;A<16;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(2&r.wrap&&35615===E){r.check=0,z[0]=255&E,z[1]=E>>>8&255,r.check=o(r.check,z,2,0),E=0,A=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&E)<<8)+(E>>8))%31){t.msg="incorrect header check",r.mode=p;break}if(8!==(15&E)){t.msg="unknown compression method",r.mode=p;break}if(A-=4,U=8+(15&(E>>>=4)),0===r.wbits)r.wbits=U;else if(U>r.wbits){t.msg="invalid window size",r.mode=p;break}r.dmax=1<<U,t.adler=r.check=1,r.mode=512&E?10:d,E=0,A=0;break;case 2:for(;A<16;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(r.flags=E,8!==(255&r.flags)){t.msg="unknown compression method",r.mode=p;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=p;break}r.head&&(r.head.text=E>>8&1),512&r.flags&&(z[0]=255&E,z[1]=E>>>8&255,r.check=o(r.check,z,2,0)),E=0,A=0,r.mode=3;case 3:for(;A<32;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}r.head&&(r.head.time=E),512&r.flags&&(z[0]=255&E,z[1]=E>>>8&255,z[2]=E>>>16&255,z[3]=E>>>24&255,r.check=o(r.check,z,4,0)),E=0,A=0,r.mode=4;case 4:for(;A<16;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}r.head&&(r.head.xflags=255&E,r.head.os=E>>8),512&r.flags&&(z[0]=255&E,z[1]=E>>>8&255,r.check=o(r.check,z,2,0)),E=0,A=0,r.mode=5;case 5:if(1024&r.flags){for(;A<16;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}r.length=E,r.head&&(r.head.extra_len=E),512&r.flags&&(z[0]=255&E,z[1]=E>>>8&255,r.check=o(r.check,z,2,0)),E=0,A=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((M=r.length)>v&&(M=v),M&&(r.head&&(U=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,m,y,M,U)),512&r.flags&&(r.check=o(r.check,m,M,y)),v-=M,y+=M,r.length-=M),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===v)break t;M=0;do{U=m[y+M++],r.head&&U&&r.length<65536&&(r.head.name+=String.fromCharCode(U))}while(U&&M<v);if(512&r.flags&&(r.check=o(r.check,m,M,y)),v-=M,y+=M,U)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===v)break t;M=0;do{U=m[y+M++],r.head&&U&&r.length<65536&&(r.head.comment+=String.fromCharCode(U))}while(U&&M<v);if(512&r.flags&&(r.check=o(r.check,m,M,y)),v-=M,y+=M,U)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;A<16;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(E!==(65535&r.check)){t.msg="header crc mismatch",r.mode=p;break}E=0,A=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=d;break;case 10:for(;A<32;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}t.adler=r.check=g(E),E=0,A=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=w,t.avail_out=_,t.next_in=y,t.avail_in=v,r.hold=E,r.bits=A,2;t.adler=r.check=1,r.mode=d;case d:if(5===e||6===e)break t;case 13:if(r.last){E>>>=7&A,A-=7&A,r.mode=27;break}for(;A<3;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}switch(r.last=1&E,A-=1,3&(E>>>=1)){case 0:r.mode=14;break;case 1:if(T(r),r.mode=20,6===e){E>>>=2,A-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=p}E>>>=2,A-=2;break;case 14:for(E>>>=7&A,A-=7&A;A<32;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if((65535&E)!==(E>>>16^65535)){t.msg="invalid stored block lengths",r.mode=p;break}if(r.length=65535&E,E=0,A=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(M=r.length){if(M>v&&(M=v),M>_&&(M=_),0===M)break t;n.arraySet(b,m,y,M,w),v-=M,y+=M,_-=M,w+=M,r.length-=M;break}r.mode=d;break;case 17:for(;A<14;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(r.nlen=257+(31&E),E>>>=5,A-=5,r.ndist=1+(31&E),E>>>=5,A-=5,r.ncode=4+(15&E),E>>>=4,A-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=p;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;A<3;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}r.lens[Z[r.have++]]=7&E,E>>>=3,A-=3}for(;r.have<19;)r.lens[Z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,j={bits:r.lenbits},F=a(0,r.lens,0,19,r.lencode,0,r.work,j),r.lenbits=j.bits,F){t.msg="invalid code lengths set",r.mode=p;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;R=(H=r.lencode[E&(1<<r.lenbits)-1])>>>16&255,k=65535&H,!((N=H>>>24)<=A);){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(k<16)E>>>=N,A-=N,r.lens[r.have++]=k;else{if(16===k){for(D=N+2;A<D;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(E>>>=N,A-=N,0===r.have){t.msg="invalid bit length repeat",r.mode=p;break}U=r.lens[r.have-1],M=3+(3&E),E>>>=2,A-=2}else if(17===k){for(D=N+3;A<D;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}A-=N,U=0,M=3+(7&(E>>>=N)),E>>>=3,A-=3}else{for(D=N+7;A<D;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}A-=N,U=0,M=11+(127&(E>>>=N)),E>>>=7,A-=7}if(r.have+M>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=p;break}for(;M--;)r.lens[r.have++]=U}}if(r.mode===p)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=p;break}if(r.lenbits=9,j={bits:r.lenbits},F=a(u,r.lens,0,r.nlen,r.lencode,0,r.work,j),r.lenbits=j.bits,F){t.msg="invalid literal/lengths set",r.mode=p;break}if(r.distbits=6,r.distcode=r.distdyn,j={bits:r.distbits},F=a(f,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,j),r.distbits=j.bits,F){t.msg="invalid distances set",r.mode=p;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(v>=6&&_>=258){t.next_out=w,t.avail_out=_,t.next_in=y,t.avail_in=v,r.hold=E,r.bits=A,s(t,S),w=t.next_out,b=t.output,_=t.avail_out,y=t.next_in,m=t.input,v=t.avail_in,E=r.hold,A=r.bits,r.mode===d&&(r.back=-1);break}for(r.back=0;R=(H=r.lencode[E&(1<<r.lenbits)-1])>>>16&255,k=65535&H,!((N=H>>>24)<=A);){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(R&&0===(240&R)){for(P=N,L=R,C=k;R=(H=r.lencode[C+((E&(1<<P+L)-1)>>P)])>>>16&255,k=65535&H,!(P+(N=H>>>24)<=A);){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}E>>>=P,A-=P,r.back+=P}if(E>>>=N,A-=N,r.back+=N,r.length=k,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=d;break}if(64&R){t.msg="invalid literal/length code",r.mode=p;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(D=r.extra;A<D;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}r.length+=E&(1<<r.extra)-1,E>>>=r.extra,A-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(H=r.distcode[E&(1<<r.distbits)-1])>>>16&255,k=65535&H,!((N=H>>>24)<=A);){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(0===(240&R)){for(P=N,L=R,C=k;R=(H=r.distcode[C+((E&(1<<P+L)-1)>>P)])>>>16&255,k=65535&H,!(P+(N=H>>>24)<=A);){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}E>>>=P,A-=P,r.back+=P}if(E>>>=N,A-=N,r.back+=N,64&R){t.msg="invalid distance code",r.mode=p;break}r.offset=k,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(D=r.extra;A<D;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}r.offset+=E&(1<<r.extra)-1,E>>>=r.extra,A-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=p;break}r.mode=25;case 25:if(0===_)break t;if(M=S-_,r.offset>M){if((M=r.offset-M)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=p;break}M>r.wnext?(M-=r.wnext,O=r.wsize-M):O=r.wnext-M,M>r.length&&(M=r.length),I=r.window}else I=b,O=w-r.offset,M=r.length;M>_&&(M=_),_-=M,r.length-=M;do{b[w++]=I[O++]}while(--M);0===r.length&&(r.mode=21);break;case 26:if(0===_)break t;b[w++]=r.length,_--,r.mode=21;break;case 27:if(r.wrap){for(;A<32;){if(0===v)break t;v--,E|=m[y++]<<A,A+=8}if(S-=_,t.total_out+=S,r.total+=S,S&&(t.adler=r.check=r.flags?o(r.check,b,S,w-S):i(r.check,b,S,w-S)),S=_,(r.flags?E:g(E))!==r.check){t.msg="incorrect data check",r.mode=p;break}E=0,A=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;A<32;){if(0===v)break t;v--,E+=m[y++]<<A,A+=8}if(E!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=p;break}E=0,A=0}r.mode=29;case 29:F=1;break t;case p:F=-3;break t;case 31:return-4;default:return h}return t.next_out=w,t.avail_out=_,t.next_in=y,t.avail_in=v,r.hold=E,r.bits=A,(r.wsize||S!==t.avail_out&&r.mode<p&&(r.mode<27||4!==e))&&B(t,t.output,t.next_out,S-t.avail_out)?(r.mode=31,-4):(x-=t.avail_in,S-=t.avail_out,t.total_in+=x,t.total_out+=S,r.total+=S,r.wrap&&S&&(t.adler=r.check=r.flags?o(r.check,b,S,t.next_out-S):i(r.check,b,S,t.next_out-S)),t.data_type=r.bits+(r.last?64:0)+(r.mode===d?128:0)+(20===r.mode||15===r.mode?256:0),(0===x&&0===S||4===e)&&F===c&&(F=-5),F)},e.inflateEnd=function(t){if(!t||!t.state)return h;var e=t.state;return e.window&&(e.window=null),t.state=null,c},e.inflateGetHeader=function(t,e){var r;return t&&t.state?0===(2&(r=t.state).wrap)?h:(r.head=e,e.done=!1,c):h},e.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?h:11===r.mode&&i(1,e,n,0)!==r.check?-3:B(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,c):h},e.inflateInfo="pako inflate (from Nodeca project)"},82965:(t,e,r)=>{"use strict";var n=r(58853),i=15,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,f,c,h,l,d){var p,m,b,g,y,w,v,_,E,A=d.bits,x=0,S=0,T=0,B=0,M=0,O=0,I=0,N=0,R=0,k=0,P=null,L=0,C=new n.Buf16(16),U=new n.Buf16(16),F=null,j=0;for(x=0;x<=i;x++)C[x]=0;for(S=0;S<f;S++)C[e[r+S]]++;for(M=A,B=i;B>=1&&0===C[B];B--);if(M>B&&(M=B),0===B)return c[h++]=20971520,c[h++]=20971520,d.bits=1,0;for(T=1;T<B&&0===C[T];T++);for(M<T&&(M=T),N=1,x=1;x<=i;x++)if(N<<=1,(N-=C[x])<0)return-1;if(N>0&&(0===t||1!==B))return-1;for(U[1]=0,x=1;x<i;x++)U[x+1]=U[x]+C[x];for(S=0;S<f;S++)0!==e[r+S]&&(l[U[e[r+S]]++]=S);if(0===t?(P=F=l,w=19):1===t?(P=o,L-=257,F=s,j-=257,w=256):(P=a,F=u,w=-1),k=0,S=0,x=T,y=h,O=M,I=0,b=-1,g=(R=1<<M)-1,1===t&&R>852||2===t&&R>592)return 1;for(;;){v=x-I,l[S]<w?(_=0,E=l[S]):l[S]>w?(_=F[j+l[S]],E=P[L+l[S]]):(_=96,E=0),p=1<<x-I,T=m=1<<O;do{c[y+(k>>I)+(m-=p)]=v<<24|_<<16|E|0}while(0!==m);for(p=1<<x-1;k&p;)p>>=1;if(0!==p?(k&=p-1,k+=p):k=0,S++,0===--C[x]){if(x===B)break;x=e[r+l[S]]}if(x>M&&(k&g)!==b){for(0===I&&(I=M),y+=T,N=1<<(O=x-I);O+I<B&&!((N-=C[O+I])<=0);)O++,N<<=1;if(R+=1<<O,1===t&&R>852||2===t&&R>592)return 1;c[b=k&g]=M<<24|O<<16|y-h|0}}return 0!==k&&(c[y+k]=x-I<<24|64<<16|0),d.bits=M,0}},5858:t=>{"use strict";
2t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},23015:(t,e,r)=>{"use strict";var n=r(58853),i=0,o=1;function s(t){for(var e=t.length;--e>=0;)t[e]=0}var a=0,u=29,f=256,c=f+1+u,h=30,l=19,d=2*c+1,p=15,m=16,b=7,g=256,y=16,w=17,v=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],E=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=new Array(2*(c+2));s(S);var T=new Array(2*h);s(T);var B=new Array(512);s(B);var M=new Array(256);s(M);var O=new Array(u);s(O);var I,N,R,k=new Array(h);function P(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function L(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function C(t){return t<256?B[t]:B[256+(t>>>7)]}function U(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function F(t,e,r){t.bi_valid>m-r?(t.bi_buf|=e<<t.bi_valid&65535,U(t,t.bi_buf),t.bi_buf=e>>m-t.bi_valid,t.bi_valid+=r-m):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function j(t,e,r){F(t,r[2*e],r[2*e+1])}function D(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function H(t,e,r){var n,i,o=new Array(p+1),s=0;for(n=1;n<=p;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=D(o[a]++,a))}}function z(t){var e;for(e=0;e<c;e++)t.dyn_ltree[2*e]=0;for(e=0;e<h;e++)t.dyn_dtree[2*e]=0;for(e=0;e<l;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*g]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function Z(t){t.bi_valid>8?U(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function W(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function q(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&W(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!W(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function V(t,e,r){var n,i,o,s,a=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],i=t.pending_buf[t.l_buf+a],a++,0===n?j(t,i,e):(j(t,(o=M[i])+f+1,e),0!==(s=_[o])&&F(t,i-=O[o],s),j(t,o=C(--n),r),0!==(s=E[o])&&F(t,n-=k[o],s))}while(a<t.last_lit);j(t,g,e)}function G(t,e){var r,n,i,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,u=e.stat_desc.elems,f=-1;for(t.heap_len=0,t.heap_max=d,r=0;r<u;r++)0!==o[2*r]?(t.heap[++t.heap_len]=f=r,t.depth[r]=0):o[2*r+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=f<2?++f:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=s[2*i+1]);for(e.max_code=f,r=t.heap_len>>1;r>=1;r--)q(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],q(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,q(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,s,a,u=e.dyn_tree,f=e.max_code,c=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,m=e.stat_desc.extra_base,b=e.stat_desc.max_length,g=0;for(o=0;o<=p;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<d;r++)(o=u[2*u[2*(n=t.heap[r])+1]+1]+1)>b&&(o=b,g++),u[2*n+1]=o,n>f||(t.bl_count[o]++,s=0,n>=m&&(s=l[n-m]),a=u[2*n],t.opt_len+=a*(o+s),h&&(t.static_len+=a*(c[2*n+1]+s)));if(0!==g){do{for(o=b-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[b]--,g-=2}while(g>0);for(o=b;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>f||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(t,e),H(o,f,t.bl_count)}function K(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,f=4;for(0===s&&(u=138,f=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<u&&i===s||(a<f?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[2*y]++):a<=10?t.bl_tree[2*w]++:t.bl_tree[2*v]++,a=0,o=i,0===s?(u=138,f=3):i===s?(u=6,f=3):(u=7,f=4))}function X(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,f=4;for(0===s&&(u=138,f=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<u&&i===s)){if(a<f)do{j(t,i,t.bl_tree)}while(0!==--a);else 0!==i?(i!==o&&(j(t,i,t.bl_tree),a--),j(t,y,t.bl_tree),F(t,a-3,2)):a<=10?(j(t,w,t.bl_tree),F(t,a-3,3)):(j(t,v,t.bl_tree),F(t,a-11,7));a=0,o=i,0===s?(u=138,f=3):i===s?(u=6,f=3):(u=7,f=4)}}s(k);var $=!1;function Y(t,e,r,i){F(t,(a<<1)+(i?1:0),3),function(t,e,r,i){Z(t),i&&(U(t,r),U(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}e._tr_init=function(t){$||(!function(){var t,e,r,n,i,o=new Array(p+1);for(r=0,n=0;n<u-1;n++)for(O[n]=r,t=0;t<1<<_[n];t++)M[r++]=n;for(M[r-1]=n,i=0,n=0;n<16;n++)for(k[n]=i,t=0;t<1<<E[n];t++)B[i++]=n;for(i>>=7;n<h;n++)for(k[n]=i<<7,t=0;t<1<<E[n]-7;t++)B[256+i++]=n;for(e=0;e<=p;e++)o[e]=0;for(t=0;t<=143;)S[2*t+1]=8,t++,o[8]++;for(;t<=255;)S[2*t+1]=9,t++,o[9]++;for(;t<=279;)S[2*t+1]=7,t++,o[7]++;for(;t<=287;)S[2*t+1]=8,t++,o[8]++;for(H(S,c+1,o),t=0;t<h;t++)T[2*t+1]=5,T[2*t]=D(t,5);I=new P(S,_,f+1,c,p),N=new P(T,E,0,h,p),R=new P(new Array(0),A,0,l,b)}(),$=!0),t.l_desc=new L(t.dyn_ltree,I),t.d_desc=new L(t.dyn_dtree,N),t.bl_desc=new L(t.bl_tree,R),t.bi_buf=0,t.bi_valid=0,z(t)},e._tr_stored_block=Y,e._tr_flush_block=function(t,e,r,n){var s,a,u=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return i;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e<f;e++)if(0!==t.dyn_ltree[2*e])return o;return i}(t)),G(t,t.l_desc),G(t,t.d_desc),u=function(t){var e;
2for(K(t,t.dyn_ltree,t.l_desc.max_code),K(t,t.dyn_dtree,t.d_desc.max_code),G(t,t.bl_desc),e=l-1;e>=3&&0===t.bl_tree[2*x[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),s=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=s&&(s=a)):s=a=r+5,r+4<=s&&-1!==e?Y(t,e,r,n):4===t.strategy||a===s?(F(t,2+(n?1:0),3),V(t,S,T)):(F(t,4+(n?1:0),3),function(t,e,r,n){var i;for(F(t,e-257,5),F(t,r-1,5),F(t,n-4,4),i=0;i<n;i++)F(t,t.bl_tree[2*x[i]+1],3);X(t,t.dyn_ltree,e-1),X(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,u+1),V(t,t.dyn_ltree,t.dyn_dtree)),z(t),n&&Z(t)},e._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(M[r]+f+1)]++,t.dyn_dtree[2*C(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){F(t,2,3),j(t,g,S),function(t){16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},65015:t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},41516: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}},13843:(t,e,r)=>{"use strict";var n=r(13757),i=r(65042),o=r(41516);t.exports={formats:o,parse:i,stringify:n}},65042:(t,e,r)=>{"use strict";var n=r(66866),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!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},f=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),f=a?o.slice(0,a.index):o,c=[];if(f){if(!r.plainObjects&&i.call(Object.prototype,f)&&!r.allowPrototypes)return;c.push(f)}for(var h=0;r.depth>0&&null!==(a=s.exec(o))&&h<r.depth;){if(h+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+o.slice(a.index)+"]"),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=[].concat(i);else{s=r.plainObjects?Object.create(null):{};var f="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(f,10);r.parseArrays||""!==f?!isNaN(c)&&a!==f&&String(c)===f&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(s=[])[c]=i:"__proto__"!==f&&(s[f]=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(null!==t.decoder&&void 0!==t.decoder&&"function"!==typeof t.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof 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="undefined"===typeof t.charset?s.charset:t.charset;return{allowDots:"undefined"===typeof t.allowDots?s.allowDots:!!t.allowDots,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,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,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,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(""===t||null===t||"undefined"===typeof t)return r.plainObjects?Object.create(null):{};for(var c="string"===typeof t?function(t,e){var r,f={__proto__:null},c=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,l=c.split(e.delimiter,h),d=-1,p=e.charset;if(e.charsetSentinel)for(r=0;r<l.length;++r)0===l[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[r]?p="utf-8":"utf8=%26%2310003%3B"===l[r]&&(p="iso-8859-1"),d=r,r=l.length);for(r=0;r<l.length;++r)if(r!==d){var m,b,g=l[r],y=g.indexOf("]="),w=-1===y?g.indexOf("="):y+1;-1===w?(m=e.decoder(g,s.decoder,p,"key"),b=e.strictNullHandling?null:""):(m=e.decoder(g.slice(0,w),s.decoder,p,"key"),b=n.maybeMap(u(g.slice(w+1),e),(function(t){return e.decoder(t,s.decoder,p,"value")}))),b&&e.interpretNumericEntities&&"iso-8859-1"===p&&(b=a(b)),g.indexOf("[]=")>-1&&(b=o(b)?[b]:b),i.call(f,m)?f[m]=n.combine(f[m],b):f[m]=b}return f}(t,r):t,h=r.plainObjects?Object.create(null):{},l=Object.keys(c),d=0;d<l.length;++d){var p=l[d],m=f(p,c[p],r,"string"===typeof t);
2h=n.merge(h,m,r)}return!0===r.allowSparse?h:n.compact(h)}},13757:(t,e,r)=>{"use strict";var n=r(18687),i=r(66866),o=r(41516),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,f=Array.prototype.push,c=function(t,e){f.apply(t,u(e)?e:[e])},h=Date.prototype.toISOString,l=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:l,formatter:o.formatters[l],indices:!1,serializeDate:function(t){return h.call(t)},skipNulls:!1,strictNullHandling:!1},p={},m=function t(e,r,o,s,a,f,h,l,m,b,g,y,w,v,_,E){for(var A,x=e,S=E,T=0,B=!1;void 0!==(S=S.get(p))&&!B;){var M=S.get(e);if(T+=1,"undefined"!==typeof M){if(M===T)throw new RangeError("Cyclic object value");B=!0}"undefined"===typeof S.get(p)&&(T=0)}if("function"===typeof l?x=l(r,x):x instanceof Date?x=g(x):"comma"===o&&u(x)&&(x=i.maybeMap(x,(function(t){return t instanceof Date?g(t):t}))),null===x){if(a)return h&&!v?h(r,d.encoder,_,"key",y):r;x=""}if("string"===typeof(A=x)||"number"===typeof A||"boolean"===typeof A||"symbol"===typeof A||"bigint"===typeof A||i.isBuffer(x))return h?[w(v?r:h(r,d.encoder,_,"key",y))+"="+w(h(x,d.encoder,_,"value",y))]:[w(r)+"="+w(String(x))];var O,I=[];if("undefined"===typeof x)return I;if("comma"===o&&u(x))v&&h&&(x=i.maybeMap(x,h)),O=[{value:x.length>0?x.join(",")||null:void 0}];else if(u(l))O=l;else{var N=Object.keys(x);O=m?N.sort(m):N}for(var R=s&&u(x)&&1===x.length?r+"[]":r,k=0;k<O.length;++k){var P=O[k],L="object"===typeof P&&"undefined"!==typeof P.value?P.value:x[P];if(!f||null!==L){var C=u(x)?"function"===typeof o?o(R,P):R:R+(b?"."+P:"["+P+"]");E.set(e,T);var U=n();U.set(p,E),c(I,t(L,C,o,s,a,f,"comma"===o&&v&&u(x)?null:h,l,m,b,g,y,w,v,_,U))}}return I};t.exports=function(t,e){var r,i=t,f=function(t){if(!t)return d;if(null!==t.encoder&&"undefined"!==typeof t.encoder&&"function"!==typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||d.charset;if("undefined"!==typeof 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("undefined"!==typeof t.format){if(!s.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=o.formatters[r],i=d.filter;return("function"===typeof t.filter||u(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"===typeof t.addQueryPrefix?t.addQueryPrefix:d.addQueryPrefix,allowDots:"undefined"===typeof t.allowDots?d.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:d.charsetSentinel,delimiter:"undefined"===typeof t.delimiter?d.delimiter:t.delimiter,encode:"boolean"===typeof t.encode?t.encode:d.encode,encoder:"function"===typeof t.encoder?t.encoder:d.encoder,encodeValuesOnly:"boolean"===typeof t.encodeValuesOnly?t.encodeValuesOnly:d.encodeValuesOnly,filter:i,format:r,formatter:n,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 f.filter?i=(0,f.filter)("",i):u(f.filter)&&(r=f.filter);var h,l=[];if("object"!==typeof i||null===i)return"";h=e&&e.arrayFormat in a?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var p=a[h];if(e&&"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var b="comma"===p&&e&&e.commaRoundTrip;r||(r=Object.keys(i)),f.sort&&r.sort(f.sort);for(var g=n(),y=0;y<r.length;++y){var w=r[y];f.skipNulls&&null===i[w]||c(l,m(i[w],w,p,b,f.strictNullHandling,f.skipNulls,f.encode?f.encoder:null,f.filter,f.sort,f.allowDots,f.serializeDate,f.format,f.formatter,f.encodeValuesOnly,f.charset,g))}var v=l.join(f.delimiter),_=!0===f.addQueryPrefix?"?":"";return f.charsetSentinel&&("iso-8859-1"===f.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),v.length>0?_+v:""}},66866:(t,e,r)=>{"use strict";var n=r(41516),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)"undefined"!==typeof t[n]&&(r[n]=t[n]);return r};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 f=a[u],c=s[f];"object"===typeof c&&null!==c&&-1===r.indexOf(c)&&(e.push({obj:s,prop:f}),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)"undefined"!==typeof r[i]&&n.push(r[i]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");
2if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(i){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 u="",f=0;f<a.length;++f){var c=a.charCodeAt(f);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===n.RFC1738&&(40===c||41===c)?u+=a.charAt(f):c<128?u+=s[c]:c<2048?u+=s[192|c>>6]+s[128|63&c]:c<55296||c>=57344?u+=s[224|c>>12]+s[128|c>>6&63]+s[128|63&c]:(f+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(f)),u+=s[240|c>>18]+s[128|c>>12&63]+s[128|c>>6&63]+s[128|63&c])}return u},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)}}},18687:(t,e,r)=>{"use strict";var n=r(40920),i=r(30456),o=r(29558),s=n("%TypeError%"),a=n("%WeakMap%",!0),u=n("%Map%",!0),f=i("WeakMap.prototype.get",!0),c=i("WeakMap.prototype.set",!0),h=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 f(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 h(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}},57281:(t,e,r)=>{var n=r(20307),i=r(89893),o=r(50791),s=r(24514),a=r(93860),u=e;u.request=function(t,e){t="string"===typeof t?a.parse(t):o(t);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||i,u=t.hostname||t.host,f=t.port,c=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(f?":"+f:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var h=new n(t);return e&&h.on("response",e),h},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},85091:(t,e,r)=>{var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(t){n=null}}else n=null;return n}function o(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(r){}return!1}function s(t){return"function"===typeof t}e.fetch=s(r.g.fetch)&&s(r.g.ReadableStream),e.writableStream=s(r.g.WritableStream),e.abortController=s(r.g.AbortController),e.arraybuffer=e.fetch||o("arraybuffer"),e.msstream=!e.fetch&&o("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!i()&&s(i().overrideMimeType),n=null},20307:(t,e,r)=>{var n=r(49320).Buffer,i=r(75066),o=r(85091),s=r(2779),a=r(89893),u=r(6178),f=a.IncomingMessage,c=a.readyStates;var h=t.exports=function(t){var e,r=this;u.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+n.from(t.auth).toString("base64")),Object.keys(t.headers).forEac
2h((function(e){r.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)i=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}r._mode=function(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":"text"}(e,i),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};s(h,u.Writable),h.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===l.indexOf(r)&&(this._headers[r]={name:t,value:e})},h.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},h.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},h.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&0!==e.timeout&&t.setTimeout(e.timeout);var n=t._headers,s=null;"GET"!==e.method&&"HEAD"!==e.method&&(s=new Blob(t._body,{type:(n["content-type"]||{}).value||""}));var a=[];if(Object.keys(n).forEach((function(t){var e=n[t].name,r=n[t].value;Array.isArray(r)?r.forEach((function(t){a.push([e,t])})):a.push([e,r])})),"fetch"===t._mode){var u=null;if(o.abortController){var f=new AbortController;u=f.signal,t._fetchAbortController=f,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=r.g.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}r.g.fetch(t._opts.url,{method:t._opts.method,headers:a,body:s||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:u}).then((function(e){t._fetchResponse=e,t._resetTimers(!1),t._connect()}),(function(e){t._resetTimers(!0),t._destroyed||t.emit("error",e)}))}else{var h=t._xhr=new r.g.XMLHttpRequest;try{h.open(t._opts.method,t._opts.url,!0)}catch(l){return void i.nextTick((function(){t.emit("error",l)}))}"responseType"in h&&(h.responseType=t._mode),"withCredentials"in h&&(h.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(h.timeout=e.requestTimeout,h.ontimeout=function(){t.emit("requestTimeout")}),a.forEach((function(t){h.setRequestHeader(t[0],t[1])})),t._response=null,h.onreadystatechange=function(){switch(h.readyState){case c.LOADING:case c.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(h.onprogress=function(){t._onXHRProgress()}),h.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{h.send(s)}catch(l){return void i.nextTick((function(){t.emit("error",l)}))}}}},h.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),function(t){try{var e=t.status;return null!==e&&0!==e}catch(r){return!1}}(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))},h.prototype._connect=function(){var t=this;t._destroyed||(t._response=new f(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},h.prototype._write=function(t,e,r){this._body.push(t),r()},h.prototype._resetTimers=function(t){var e=this;r.g.clearTimeout(e._socketTimer),e._socketTimer=null,t?(r.g.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=r.g.setTimeout((function(){e.emit("timeout")}),e._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)},h.prototype.end=function(t,e,r){"function"===typeof t&&(r=t,t=void 0),u.Writable.prototype.end.call(this,t,e,r)},h.prototype.setTimeout=function(t,e){var r=this;e&&r.once("timeout",e),r._socketTimeout=t,r._resetTimers(!1)},h.prototype.flushHeaders=function(){}
2,h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var l=["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"]},89893:(t,e,r)=>{var n=r(75066),i=r(49320).Buffer,o=r(85091),s=r(2779),a=r(6178),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=e.IncomingMessage=function(t,e,r,s){var u=this;if(a.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=e,u.url=e.url,u.statusCode=e.status,u.statusMessage=e.statusText,e.headers.forEach((function(t,e){u.headers[e.toLowerCase()]=t,u.rawHeaders.push(e,t)})),o.writableStream){var f=new WritableStream({write:function(t){return s(!1),new Promise((function(e,r){u._destroyed?r():u.push(i.from(t))?e():u._resumeFetch=e}))},close:function(){s(!0),u._destroyed||u.push(null)},abort:function(t){s(!0),u._destroyed||u.emit("error",t)}});try{return void e.body.pipeTo(f).catch((function(t){s(!0),u._destroyed||u.emit("error",t)}))}catch(d){}}var c=e.body.getReader();!function t(){c.read().then((function(e){u._destroyed||(s(e.done),e.done?u.push(null):(u.push(i.from(e.value)),t()))})).catch((function(t){s(!0),u._destroyed||u.emit("error",t)}))}()}else{if(u._xhr=t,u._pos=0,u.url=t.responseURL,u.statusCode=t.status,u.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(e[2])):void 0!==u.headers[r]?u.headers[r]+=", "+e[2]:u.headers[r]=e[2],u.rawHeaders.push(e[1],e[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var h=u.rawHeaders["mime-type"];if(h){var l=h.match(/;\s*charset=([^;])(;|$)/);l&&(u._charset=l[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};s(f,a.Readable),f.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},f.prototype._onXHRProgress=function(t){var e=this,n=e._xhr,o=null;switch(e._mode){case"text":if((o=n.responseText).length>e._pos){var s=o.substr(e._pos);if("x-user-defined"===e._charset){for(var a=i.alloc(s.length),f=0;f<s.length;f++)a[f]=255&s.charCodeAt(f);e.push(a)}else e.push(s,e._charset);e._pos=o.length}break;case"arraybuffer":if(n.readyState!==u.DONE||!n.response)break;o=n.response,e.push(i.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=n.response,n.readyState!==u.LOADING||!o)break;e.push(i.from(new Uint8Array(o)));break;case"ms-stream":if(o=n.response,n.readyState!==u.LOADING)break;var c=new r.g.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(i.from(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){t(!0),e.push(null)},c.readAsArrayBuffer(o)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&(t(!0),e.push(null))}},21747:(t,e,r)=>{var n=r(77035);t.exports=function(t){return"string"!==typeof t?t:n(t)?t.slice(2):t}},93860:(t,e,r)=>{"use strict";var n=r(2653);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"]),f=["'"].concat(u),c=["%","/","?",";","#"].concat(f),h=["/","?","#"],l=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(13843);function y(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 y=t=u.join(s);if(y=y.trim(),!r&&1===t.split("#").length){var w=a.exec(y);if(w)return this.path=y,this.href=y,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?g.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var v=o.exec(y);if(v){var _=(v=v[0]).toLowerCase();this.protocol=_,y=y.substr(v.length)}if(r||v||y.match(/^\/\/[^@/]+@[^@/]+/)){var E="//"===y.substr(0,2);!E||v&&m[v]||(y=y.substr(2),this.slashes=!0)}if(!m[v]&&(E||v&&!b[v])){for(var A,x,S=-1,T=0;T<h.length;T++){-1!==(B=y.indexOf(h[T]))&&(-1===S||B<S)&&(S=B)}-1!==(x=-1===S?y.lastIndexOf("@"):y.lastIndexOf("@",S))&&(A=y.slice(0,x),y=y.slice(x+1),this.auth=decodeURIComponent(A)),S=-1;for(T=0;T<c.length;T++){var B;-1!==(B=y.indexOf(c[T]))&&(-1===S||B<S)&&(S=B)}-1===S&&(S=y.length),this.host=y.slice(0,S),y=y.slice(S),this.parseHost(),this.hostname=this.hostname||"";var M="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!M)for(var O=this.hostname.split(/\./),I=(T=0,O.length);T<I;T++){var N=O[T];if(N&&!N.match(l)){for(var R="",k=0,P=N.length;k<P;k++)N.charCodeAt(k)>127?R+="x":R+=N[k];if(!R.match(l)){var L=O.slice(0,T),C=O.slice(T+1),U=N.match(d);U&&(L.push(U[1]),C.unshift(U[2])),C.length&&(y="/"+C.join(".")+y),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+F,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!p[_])for(T=0,I=f.length;T<I;T++){var D=f[T];
2if(-1!==y.indexOf(D)){var H=encodeURIComponent(D);H===D&&(H=escape(D)),y=y.split(D).join(H)}}var z=y.indexOf("#");-1!==z&&(this.hash=y.substr(z),y=y.slice(0,z));var Z=y.indexOf("?");if(-1!==Z?(this.search=y.substr(Z),this.query=y.substr(Z+1),e&&(this.query=g.parse(this.query)),y=y.slice(0,Z)):e&&(this.search="",this.query={}),y&&(this.pathname=y),b[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var W=this.search||"";this.path=F+W}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=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||b[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(y(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 f=a[u];"protocol"!==f&&(r[f]=t[f])}return b[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(!b[t.protocol]){for(var c=Object.keys(t),h=0;h<c.length;h++){var l=c[h];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||"",g=r.search||"";r.path=p+g}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var y=r.pathname&&"/"===r.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),v=w||y||r.host&&t.pathname,_=v,E=r.pathname&&r.pathname.split("/")||[],A=(d=t.pathname&&t.pathname.split("/")||[],r.protocol&&!b[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.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),v=v&&(""===d[0]||""===E[0])),w)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,E=d;else if(d.length)E||(E=[]),E.pop(),E=E.concat(d),r.search=t.search,r.query=t.query;else if(null!=t.search){if(A)r.host=E.shift(),r.hostname=r.host,(M=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=M.shift(),r.hostname=M.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(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=E.slice(-1)[0],S=(r.host||t.host||E.length>1)&&("."===x||".."===x)||""===x,T=0,B=E.length;B>=0;B--)"."===(x=E[B])?E.splice(B,1):".."===x?(E.splice(B,1),T++):T&&(E.splice(B,1),T--);if(!v&&!_)for(;T--;T)E.unshift("..");!v||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),S&&"/"!==E.join("/").substr(-1)&&E.push("");var M,O=""===E[0]||E[0]&&"/"===E[0].charAt(0);A&&(r.hostname=O?"":E.length?E.shift():"",r.host=r.hostname,(M=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=M.shift(),r.hostname=M.shift(),r.host=r.hostname));return(v=v||r.host&&E.length)&&!O&&E.unshift(""),E.length>0?r.pathname=E.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=y,e.resolve=function(t,e){return y(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},e.format=function(t){return"string"===typeof t&&(t=y(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},83449:(t,e,r)=>{var n=r(49320).Buffer,i=r(68697),o=r(87981).RQ,s=r(87981)._R,a=new o((function(t,e){return!t.match(/^u?int/)||Array.isArray(e)||e&&"object"===typeof e&&"BN"===e.constructor.name?e:e.toString()}));function u(){}var f=function(){};f.prototype.encodeFunctionSignature=function(t){return("function"===typeof t||"object"===typeof t&&t)&&(t=i._jsonInterfaceMethodToString(t)),i.sha3(t).slice(0,10)},f.prototype.encodeEventSignature=function(t){return("function"===typeof t||"object"===typeof t&&t)&&(t=i._jsonInterfaceMethodToString(t)),i.sha3(t)},f.prototype.encodeParameter=function(t,e){return this.encodeParameters([t],[e])},f.prototype.encodeParameters=function(t,e){var r=this;return t=r.mapTypes(t),e=e.map((function(e,n){let i=t[n];if("object"===typeof i&&i.type&&(i=i.type),e=r.formatParam(i,e),"string"===typeof i&&i.includes("tuple")){const t=a._getCoder(s.from(i)),n=(t,e)=>{if("array"===t.name){if(!t.type.match(/\[(\d+)\]/))return e.map((e=>n(a._getCoder(s.from(t.type.replace("[]",""))),e)));const r=parseInt(t.type.match(/\[(\d+)\]/)[1]);if(e.length!==r)throw new Error("Array length does not matches with the given input");return e.map((e=>n(a._getCoder(s.from(t.type.replace(/\[\d+\]/,""))),e)))}
2t.coders.forEach(((t,i)=>{"tuple"===t.name?n(t,e[i]):e[i]=r.formatParam(t.name,e[i])}))};n(t,e)}return e})),a.encode(t,e)},f.prototype.mapTypes=function(t){var e=this,r=[];return t.forEach((function(t){if("object"===typeof t&&"function"===t.type&&(t=Object.assign({},t,{type:"bytes24"})),e.isSimplifiedStructFormat(t)){var n=Object.keys(t)[0];r.push(Object.assign(e.mapStructNameAndType(n),{components:e.mapStructToCoderFormat(t[n])}))}else r.push(t)})),r},f.prototype.isSimplifiedStructFormat=function(t){return"object"===typeof t&&"undefined"===typeof t.components&&"undefined"===typeof t.name},f.prototype.mapStructNameAndType=function(t){var e="tuple";return t.indexOf("[]")>-1&&(e="tuple[]",t=t.slice(0,-2)),{type:e,name:t}},f.prototype.mapStructToCoderFormat=function(t){var e=this,r=[];return Object.keys(t).forEach((function(n){"object"!==typeof t[n]?r.push({name:n,type:t[n]}):r.push(Object.assign(e.mapStructNameAndType(n),{components:e.mapStructToCoderFormat(t[n])}))})),r},f.prototype.formatParam=function(t,e){const r=new RegExp(/^bytes([0-9]*)$/),o=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),a=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(i.isBN(e)||i.isBigNumber(e))return e.toString(10);if(t.match(o)||t.match(a))return e.map((e=>this.formatParam(t.replace("[]",""),e)));let u=t.match(s);if(u){let t=parseInt(u[2]||"256");t/8<e.length&&(e=e.startsWith("-")?"-".concat(i.leftPad(e.substring(1),t)):i.leftPad(e,t))}if(u=t.match(r),u){n.isBuffer(e)&&(e=i.toHex(e));let t=parseInt(u[1]);if(t){let r=2*t;"0x"===e.substring(0,2)&&(r+=2),e.length<r&&(e=i.rightPad(e,2*t))}e.length%2===1&&(e="0x0"+e.substring(2))}return e},f.prototype.encodeFunctionCall=function(t,e){return this.encodeFunctionSignature(t)+this.encodeParameters(t.inputs,e).replace("0x","")},f.prototype.decodeParameter=function(t,e){return this.decodeParameters([t],e)[0]},f.prototype.decodeParameters=function(t,e){return this.decodeParametersWith(t,e,!1)},f.prototype.decodeParametersWith=function(t,e,r){if(t.length>0&&(!e||"0x"===e||"0X"===e))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var n=a.decode(this.mapTypes(t),"0x"+e.replace(/0x/i,""),r),i=new u;return i.__length__=0,t.forEach((function(t,e){var r=n[i.__length__];const o="object"===typeof t&&t.type&&"string"===t.type;
2r="0x"!==r||o||"string"===typeof t&&"string"===t?r:null,i[e]=r,("function"===typeof t||t&&"object"===typeof t)&&t.name&&(i[t.name]=r),i.__length__++})),i},f.prototype.decodeLog=function(t,e,r){var n=this;r=Array.isArray(r)?r:[r],e=e||"";var i=[],o=[],s=0;t.forEach((function(t,e){t.indexed?(o[e]=["bool","int","uint","address","fixed","ufixed"].find((function(e){return-1!==t.type.indexOf(e)}))?n.decodeParameter(t.type,r[s]):r[s],s++):i[e]=t}));var a=e,f=a?this.decodeParametersWith(i,a,!0):[],c=new u;return c.__length__=0,t.forEach((function(t,e){c[e]="string"===t.type?"":null,"undefined"!==typeof f[e]&&(c[e]=f[e]),"undefined"!==typeof o[e]&&(c[e]=o[e]),t.name&&(c[t.name]=c[e]),c.__length__++})),c};var c=new f;t.exports=c},68697:(t,e,r)=>{var n=r(99232),i=r(20292),o=r(87909),s=r(81186),a=r(84968),u=function(t,e){var r=[];return e.forEach((function(e){if("object"===typeof e.components){if("tuple"!==e.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var n="",i=e.type.indexOf("[");i>=0&&(n=e.type.substring(i));var o=u(t,e.components);Array.isArray(o)&&t?r.push("tuple("+o.join(",")+")"+n):t?r.push("("+o+")"):r.push("("+o.join(",")+")"+n)}else r.push(e.type)})),r},f=function(t){if(!i.isHexStrict(t))throw new Error("The parameter must be a valid HEX string.");var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);r<n;r+=2){var o=parseInt(t.slice(r,r+2),16);e+=String.fromCharCode(o)}return e},c=function(t){if(!t)return"0x00";for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},h=function(t){if(t=t?t.toLowerCase():"ether",!n.unitMap[t])throw new Error('This unit "'+t+"\" doesn't exist, please use the one of the following units"+JSON.stringify(n.unitMap,null,2));return t};t.exports={_fireError:function(t,e,r,n,i){return!t||"object"!==typeof t||t instanceof Error||!t.data||((t.data&&"object"===typeof t.data||Array.isArray(t.data))&&(t.data=JSON.stringify(t.data,null,2)),t=t.message+"\n"+t.data),"string"===typeof t&&(t=new Error(t)),"function"===typeof n&&n(t,i),"function"===typeof r&&((e&&"function"===typeof e.listeners&&e.listeners("error").length||"function"===typeof n)&&e.catch((function(){})),setTimeout((function(){r(t)}),1)),e&&"function"===typeof e.emit&&setTimeout((function(){e.emit("error",t,i),e.removeAllListeners()}),1),e},_jsonInterfaceMethodToString:function(t){return t&&"object"===typeof t&&t.name&&-1!==t.name.indexOf("(")?t.name:t.name+"("+u(!1,t.input
2s).join(",")+")"},_flattenTypes:u,randomHex:function(t){return"0x"+s(t).toString("hex")},BN:i.BN,isBN:i.isBN,isBigNumber:i.isBigNumber,isHex:i.isHex,isHexStrict:i.isHexStrict,sha3:i.sha3,sha3Raw:i.sha3Raw,keccak256:i.sha3,soliditySha3:o.soliditySha3,soliditySha3Raw:o.soliditySha3Raw,encodePacked:o.encodePacked,isAddress:i.isAddress,checkAddressChecksum:i.checkAddressChecksum,toChecksumAddress:function(t){if("undefined"===typeof t)return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(t))throw new Error('Given address "'+t+'" is not a valid Ethereum address.');t=t.toLowerCase().replace(/^0x/i,"");for(var e=i.sha3(t).replace(/^0x/i,""),r="0x",n=0;n<t.length;n++)parseInt(e[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return r},toHex:i.toHex,toBN:i.toBN,bytesToHex:i.bytesToHex,hexToBytes:i.hexToBytes,hexToNumberString:i.hexToNumberString,hexToNumber:i.hexToNumber,toDecimal:i.hexToNumber,numberToHex:i.numberToHex,fromDecimal:i.numberToHex,hexToUtf8:i.hexToUtf8,hexToString:i.hexToUtf8,toUtf8:i.hexToUtf8,stripHexPrefix:i.stripHexPrefix,utf8ToHex:i.utf8ToHex,stringToHex:i.utf8ToHex,fromUtf8:i.utf8ToHex,hexToAscii:f,toAscii:f,asciiToHex:c,fromAscii:c,unitMap:n.unitMap,toWei:function(t,e){if(e=h(e),!i.isBN(t)&&"string"!==typeof t)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return i.isBN(t)?n.toWei(t,e):n.toWei(t,e).toString(10)},fromWei:function(t,e){if(e=h(e),!i.isBN(t)&&"string"!==typeof t)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return i.isBN(t)?n.fromWei(t,e):n.fromWei(t,e).toString(10)},padLeft:i.leftPad,leftPad:i.leftPad,padRight:i.rightPad,rightPad:i.rightPad,toTwosComplement:i.toTwosComplement,isBloom:i.isBloom,isUserEthereumAddressInBloom:i.isUserEthereumAddressInBloom,isContractAddressInBloom:i.isContractAddressInBloom,isTopic:i.isTopic,isTopicInBloom:i.isTopicInBloom,isInBloom:i.isInBloom,compareBlockNumbers:function(t,e){if(t===e)return 0;if("genesis"!==t&&"earliest"!==t&&0!==t||"genesis"!==e&&"earliest"!==e&&0!==e){if("genesis"===t||"earliest"===t||0===t)return-1;if("genesis"===e||"earliest"===e||0===e)return 1;if("latest"===t||"finalized"===t)return"pending"===e?-1:1;if("latest"===e||"finalized"===e)return"pending"===t?1:-1;if("pending"===t)return 1;if("pending"===e)return-1;if("safe"===t||"safe"===e)return;{let r=new a(t),n=new a(e);return r.lt(n)?-1:r.eq(n)?0:1}}return 0},toNumber:i.toNumber}},87909:(t,e,r)=>{var n=r(84968),i=r(20292),o=function(t){var e=typeof t;if("string"===e)return i.isHexStrict(t)?new n(t.replace(/0x/i,""),16):new n(t,10);if("number"===e)return new n(t);if(i.isBigNumber(t))return new n(t.toString(10));if(i.isBN(t))return t;throw new Error(t+" is not a number")},s=function(t,e,r){var s,a,u;if("bytes"===(t=(u=t).startsWith("int[")?"int256"+u.slice(3):"int"===u?"int256":u.startsWith("uint[")?"uint256"+u.slice(4):"uint"===u?"uint256":u.startsWith("fixed[")?"fixed128x128"+u.slice(5):"fixed"===u?"fixed128x128":u.startsWith("ufixed[")?"ufixed128x128"+u.slice(6):"ufixed"===u?"ufixed128x128":u)){if(e.replace(/^0x/i,"").length%2!==0)throw new Error("Invalid bytes characters "+e.length);return e}if("string"===t)return i.utf8ToHex(e);if("bool"===t)return e?"01":"00";if(t.startsWith("address")){if(s=r?64:40,!i.isAddress(e))throw new Error(e+" is not a valid address, or the checksum is invalid.");return i.leftPad(e.toLowerCase(),s)}if(s=function(t){var e=/^\D+(\d+).*$/.exec(t);return e?parseInt(e[1],10):null}(t),t.startsWith("bytes")){if(!s)throw new Error("bytes[] not yet supported in solidity");if(r&&(s=32),s<1||s>32||s<e.replace(/^0x/i,"").length/2)throw new Error("Invalid bytes"+s+" for "+e);return i.rightPad(e,2*s)}if(t.startsWith("uint")){if(s%8||s<8||s>256)throw new Error("Invalid uint"+s+" size");if((a=o(e)).bitLength()>s)throw new Error("Supplied uint exceeds width: "+s+" vs "+a.bitLength());if(a.lt(new n(0)))throw new Error("Supplied uint "+a.toString()+" is negative");return s?i.leftPad(a.toString("hex"),s/8*2):a}if(t.startsWith("int")){if(s%8||s<8||s>256)throw new Error("Invalid int"+s+" size");if((a=o(e)).bitLength()>s)throw new Error("Supplied int exceeds width: "+s+" vs "+a.bitLength());
2return a.lt(new n(0))?a.toTwos(s).toString("hex"):s?i.leftPad(a.toString("hex"),s/8*2):a}throw new Error("Unsupported or invalid type: "+t)},a=function(t){if(Array.isArray(t))throw new Error("Autodetection of array types is not supported.");var e,r,o="";if(t&&"object"===typeof t&&(t.hasOwnProperty("v")||t.hasOwnProperty("t")||t.hasOwnProperty("value")||t.hasOwnProperty("type"))?(e=t.hasOwnProperty("t")?t.t:t.type,o=t.hasOwnProperty("v")?t.v:t.value):(e=i.toHex(t,!0),o=i.toHex(t),e.startsWith("int")||e.startsWith("uint")||(e="bytes")),!e.startsWith("int")&&!e.startsWith("uint")||"string"!==typeof o||/^(-)?0x/i.test(o)||(o=new n(o)),Array.isArray(o)){if(r=function(t){var e=/^\D+\d*\[(\d+)\]$/.exec(t);return e?parseInt(e[1],10):null}(e),r&&o.length!==r)throw new Error(e+" is not matching the given array "+JSON.stringify(o));r=o.length}return Array.isArray(o)?o.map((function(t){return s(e,t,r).toString("hex").replace("0x","")})).join(""):s(e,o,r).toString("hex").replace("0x","")};t.exports={soliditySha3:function(){var t=Array.prototype.slice.call(arguments).map(a);return i.sha3("0x"+t.join(""))},soliditySha3Raw:function(){return i.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(a).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(a).join("").toLowerCase()}}},20292:(t,e,r)=>{var n=r(49320).Buffer,i=r(84968),o=r(46950),s=r(42830),a=r(81414),u=r(9462),{keccak256:f}=r(9532),c=function(t){return i.isBN(t)},h=function(t){return t&&t.constructor&&"BigNumber"===t.constructor.name},l=function(t){try{return o.apply(null,arguments)}catch(e){throw new Error(e+' Given value: "'+t+'"')}},d=function(t){return!!/^(0x)?[0-9a-f]{40}$/i.test(t)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(t)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(t))||p(t))},p=function(t){t=t.replace(/^0x/i,"");for(var e=E(t.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(e[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(e[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0},m=function(t){var e="";t=(t=(t=(t=(t=s.encode(t)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},b=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return t;if("string"===typeof t&&!w(t))throw new Error('Given value "'+t+'" is not a valid hex string.');const r=l(t);return e&&(r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER)?BigInt(r):r.toNumber()},g=function(t){if(null===t||void 0===t)return t;if(!isFinite(t)&&!w(t))throw new Error('Given input "'+t+'" is not a number.');var e=l(t),r=e.toString(16);return e.lt(new i(0))?"-0x"+r.slice(1):"0x"+r},y=function(t,e){if(d(t))return e?"address":"0x"+t.toLowerCase().replace(/^0x/i,"");if("boolean"===typeof t)return e?"bool":t?"0x01":"0x00";if(n.isBuffer(t))return"0x"+t.toString("hex");if("object"===typeof t&&t&&!h(t)&&!c(t))return e?"string":m(JSON.stringify(t));if("string"===typeof t){if(0===t.indexOf("-0x")||0===t.indexOf("-0X"))return e?"int256":g(t);if(0===t.indexOf("0x")||0===t.indexOf("0X"))return e?"bytes":t;if(!isFinite(t))return e?"string":m(t)}return e?t<0?"int256":"uint256":g(t)},w=function(t){return("string"===typeof t||"number"===typeof t)&&/^(-)?0x[0-9a-f]*$/i.test(t)},v=function(t){return("string"===typeof t||"number"===typeof t)&&/^(-0x|0x)?[0-9a-f]*$/i.test(t)},_="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",E=function(t){c(t)&&(t=t.toString()),w(t)&&/^0x/i.test(t.toString())?t=a.toBuffer(t):"string"===typeof t&&(t=n.from(t,"utf-8"));var e=a.bufferToHex(f(t));return e===_?null:e};E._Hash=f;var A=function(t){if("string"==typeof t&&t.includes("0x")){const[e,r]=t.toLocaleLowerCase().startsWith("-")?["-",t.slice(3)]:["",t.slice(2)];return new i(e+r,16)}return new i(t)};Object.setPrototypeOf(A,i),Object.setPrototypeOf(A.prototype,i.prototype),t.exports={BN:A,isBN:c,isBigNumber:h,toBN:l,isAddress:d,isBloom:function(t){return u.isBloom(t)},isUserEthereumAddressInBloom:function(t,e){return u.isUserEthereumAddressInBloom(t,e)},isContractAddressInBloom:function(t,e){return u.isContractAddressInBloom(t,e)},isTopic:function(t){return u.isTopic(t)},isTopicInBloom:function(t,e){return u.isTopicInBloom(t,e)},isInBloom:function(t,e){return u.isInBloom(t,e)},checkAddressChecksum:p,utf8ToHex:m,hexToUtf8:function(t){if(!w(t))throw new Error('The parameter "'+t+'" must be a valid HEX string.');for(var e="",r=0,n=(t=(t=(t=(t=(t=t.replace(/^0x/i,"")).replace(/^(?:00)*/,"")).split("").reverse().join("")).replace(/^(?:00)*/,"")).split("").reverse().join("")).length,i=0;i<n;i+=2)r=parseInt(t.slice(i,i+2),16),e+=String.fromCharCode(r);return s.decode(e)},hexToNumber:b,hexToNumberString:function(t){if(!t)return t;if("string"===typeof t&&!w(t))throw new Error('Given value "'+t+'" is not a valid hex string.');return l(t).toString(10)},numberToHex:g,toHex:y,hexToBytes:function(t){if(t=t.toString(16),!w(t))throw new Error('Given value "'+t+'" is not a valid hex string.');t=t.replace(/^0x/i,"");for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.slice(r,r+2),16));return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return"0x"+e.join("")},isHex:v,isHexStrict:w,stripHexPrefix:function(t){return 0!==t&&v(t)?t.replace(/^(-)?0x/i,"$1"):t}
2,leftPad:function(t,e,r){var n=/^0x/i.test(t)||"number"===typeof t,i=e-(t=t.toString(16).replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+t},rightPad:function(t,e,r){var n=/^0x/i.test(t)||"number"===typeof t,i=e-(t=t.toString(16).replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(n?"0x":"")+t+new Array(i).join(r||"0")},toTwosComplement:function(t){return"0x"+l(t).toTwos(256).toString(16,64)},sha3:E,sha3Raw:function(t){return null===(t=E(t))?_:t},toNumber:function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"number"===typeof t?t:b(y(t),e)}}},50791:t=>{t.exports=function(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t};var e=Object.prototype.hasOwnProperty},29538:(t,e,r)=>{"use strict";r.d(e,{L:()=>c});var n=r(44362),i=r(51018),o=r(28084),s=r(26672),a=r(4252);async function u(t,e){const{abi:r,address:u,args:f,functionName:c,...h}=e,l=(0,i.R)({abi:r,args:f,functionName:c});try{const{data:e}=await(0,s.s)(t,a.R,"call")({...h,data:l,to:u});return(0,n.k)({abi:r,args:f,functionName:c,data:e||"0x"})}catch(d){throw(0,o.S)(d,{abi:r,address:u,args:f,docsPath:"/docs/contract/readContract",functionName:c})}}var f=r(31992);function c(t,e){const{chainId:r,...n}=e,i=t.getClient({chainId:r});return(0,f.s)(i,u,"readContract")(n)}},22022:(t,e,r)=>{"use strict";r.d(e,{G:()=>n});class n extends Error{constructor(t){var e;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=r.cause instanceof n?r.cause.details:null!==(e=r.cause)&&void 0!==e&&e.message?r.cause.message:r.details,o=r.cause instanceof n&&r.cause.docsPath||r.docsPath;super([t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?["Docs: https://abitype.dev".concat(o)]:[],...i?["Details: ".concat(i)]:[],"Version: abitype@".concat("1.2.3")].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=i,this.docsPath=o,this.metaMessages=r.metaMessages,this.shortMessage=t}}},25544:(t,e,r)=>{"use strict";r.d(e,{F:()=>o,Hk:()=>s,a_:()=>i});var n=r(22022);class i extends n.G{constructor(t){let{signature:e}=t;super("Failed to parse ABI item.",{details:"parseAbiItem(".concat(JSON.stringify(e,null,2),")"),docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class o extends n.G{constructor(t){let{type:e}=t;super("Unknown type.",{metaMessages:['Type "'.concat(e,'" is not a valid ABI type. Perhaps you forgot to include a struct signature?')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class s extends n.G{constructor(t){let{type:e}=t;super("Unknown type.",{metaMessages:['Type "'.concat(e,'" is not a valid ABI type.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}},50453:(t,e,r)=>{"use strict";r.d(e,{TT:()=>o,_D:()=>a,aZ:()=>u,jO:()=>i,zL:()=>s});var n=r(22022);class i extends n.G{constructor(t){let{param:e}=t;super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class o extends n.G{constructor(t){let{param:e,name:r}=t;super("Invalid ABI parameter.",{details:e,metaMessages:['"'.concat(r,'" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class s extends n.G{constructor(t){let{param:e,type:r,modifier:n}=t;super("Invalid ABI parameter.",{details:e,metaMessages:['Modifier "'.concat(n,'" not allowed').concat(r?' in "'.concat(r,'" type'):"",".")]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class a extends n.G{constructor(t){let{param:e,type:r,modifier:n}=t;super("Invalid ABI parameter.",{details:e,metaMessages:['Modifier "'.concat(n,'" not allowed').concat(r?' in "'.concat(r,'" type'):"","."),'Data location can only be specified for array, struct, or mapping types, but "'.concat(n,'" was given.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class u extends n.G{constructor(t){let{abiParameter:e}=t;super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invali
2d."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}},34178:(t,e,r)=>{"use strict";r.d(e,{H6:()=>s,Vs:()=>o,wn:()=>i});var n=r(22022);class i extends n.G{constructor(t){let{signature:e,type:r}=t;super("Invalid ".concat(r," signature."),{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class o extends n.G{constructor(t){let{signature:e}=t;super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class s extends n.G{constructor(t){let{signature:e}=t;super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}},49414:(t,e,r)=>{"use strict";r.d(e,{s:()=>a});var n=r(25544),i=r(13604),o=r(9386),s=r(4436);function a(t){let e;if("string"===typeof t)e=(0,s.cK)(t);else{const r=(0,o.D)(t),n=t.length;for(let o=0;o<n;o++){const n=t[o];if(!(0,i.N0)(n)){e=(0,s.cK)(n,r);break}}}if(!e)throw new n.a_({signature:t});return e}},13604:(t,e,r)=>{"use strict";r.d(e,{Dt:()=>S,EC:()=>v,N0:()=>p,PI:()=>y,QM:()=>A,SA:()=>s,Wg:()=>x,_c:()=>o,a4:()=>g,c3:()=>u,g1:()=>m,l$:()=>l,qm:()=>_,rh:()=>h,wA:()=>f});var n=r(22566);const i=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function o(t){return i.test(t)}function s(t){return(0,n.Zw)(i,t)}const a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function u(t){return a.test(t)}function f(t){return(0,n.Zw)(a,t)}const c=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function h(t){return c.test(t)}function l(t){return(0,n.Zw)(c,t)}const d=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function p(t){return d.test(t)}function m(t){return(0,n.Zw)(d,t)}const b=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function g(t){return b.test(t)}function y(t){return(0,n.Zw)(b,t)}const w=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function v(t){return w.test(t)}function _(t){return(0,n.Zw)(w,t)}const E=/^receive\(\) external payable$/;function A(t){return E.test(t)}new Set(["memory","indexed","storage","calldata"]);const x=new Set(["indexed"]),S=new Set(["calldata","memory","storage"])},9386:(t,e,r)=>{"use strict";r.d(e,{D:()=>h});var n=r(22566),i=r(25544),o=r(50453),s=r(34178),a=r(22022);class u extends a.G{constructor(t){let{type:e}=t;super("Circular reference detected.",{metaMessages:['Struct "'.concat(e,'" is a circular reference.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}var f=r(13604),c=r(4436);function h(t){const e={},r=t.length;for(let a=0;a<r;a++){const r=t[a];if(!(0,f.N0)(r))continue;const n=(0,f.g1)(r);if(!n)throw new s.wn({signature:r,type:"struct"});const i=n.properties.split(";"),o=[],u=i.length;for(let t=0;t<u;t++){const e=i[t].trim();if(!e)continue;const r=(0,c.C$)(e,{type:"struct"});o.push(r)}if(!o.length)throw new s.H6({signature:r});e[n.name]=o}const n={},i=Object.entries(e),o=i.length;for(let s=0;s<o;s++){const[t,r]=i[s];n[t]=d(r,e)}return n}const l=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const s=[],a=t.length;for(let f=0;f<a;f++){const a=t[f];if(n.cN.test(a.type))s.push(a);else{const t=(0,n.Zw)(l,a.type);if(null===t||void 0===t||!t.type)throw new o.aZ({abiParameter:a});const{array:f,type:h}=t;if(h in e){if(r.has(h))throw new u({type:h});s.push({...a,type:"tuple".concat(null!==f&&void 0!==f?f:""),components:d(e[h],e,new Set([...r,h]))})}else{if(!(0,c.uN)(h))throw new i.F({type:h});s.push(a)}}}return s}},4436:(t,e,r)=>{"use strict";r.d(e,{uN:()=>g,C$:()=>m,cK:()=>h});var n=r(22566),i=r(25544),o=r(50453),s=r(34178),a=r(22022);class u extends a.G{constructor(t){let{current:e,depth:r}=t;super("Unbalanced parentheses.",{metaMessages:['"'.concat(e.trim(),'" has too many ').concat(r>0?"opening":"closing"," parentheses.")],details:'Depth "'.concat(r,'"')}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}const f=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);var c=r(13604);function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,c.rh)(t))return function(t){var e;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,c.l$)(t);if(!n)throw new s.wn({signature:t,type:"function"});const i=b(n.parameters),o=[],a=i.length;for(let s=0;s<a;s++)o.push(m(i[s],{modifiers:c.Dt,structs:r,type:"function"}));const u=[];
2if(n.returns){const t=b(n.returns),e=t.length;for(let n=0;n<e;n++)u.push(m(t[n],{modifiers:c.Dt,structs:r,type:"function"}))}return{name:n.name,type:"function",stateMutability:null!==(e=n.stateMutability)&&void 0!==e?e:"nonpayable",inputs:o,outputs:u}}(t,e);if((0,c.c3)(t))return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(0,c.wA)(t);if(!r)throw new s.wn({signature:t,type:"event"});const n=b(r.parameters),i=[],o=n.length;for(let s=0;s<o;s++)i.push(m(n[s],{modifiers:c.Wg,structs:e,type:"event"}));return{name:r.name,type:"event",inputs:i}}(t,e);if((0,c._c)(t))return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(0,c.SA)(t);if(!r)throw new s.wn({signature:t,type:"error"});const n=b(r.parameters),i=[],o=n.length;for(let s=0;s<o;s++)i.push(m(n[s],{structs:e,type:"error"}));return{name:r.name,type:"error",inputs:i}}(t,e);if((0,c.a4)(t))return function(t){var e;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,c.PI)(t);if(!n)throw new s.wn({signature:t,type:"constructor"});const i=b(n.parameters),o=[],a=i.length;for(let s=0;s<a;s++)o.push(m(i[s],{structs:r,type:"constructor"}));return{type:"constructor",stateMutability:null!==(e=n.stateMutability)&&void 0!==e?e:"nonpayable",inputs:o}}(t,e);if((0,c.EC)(t))return function(t){var e;const r=(0,c.qm)(t);if(!r)throw new s.wn({signature:t,type:"fallback"});return{type:"fallback",stateMutability:null!==(e=r.stateMutability)&&void 0!==e?e:"nonpayable"}}(t);if((0,c.QM)(t))return{type:"receive",stateMutability:"payable"};throw new s.Vs({signature:t})}const l=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,d=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,p=/^u?int$/;function m(t,e){var r,s;const a=function(t,e,r){let n="";if(r)for(const i of Object.entries(r)){if(!i)continue;let t="";for(const e of i[1])t+="[".concat(e.type).concat(e.name?":".concat(e.name):"","]");n+="(".concat(i[0],"{").concat(t,"})")}return e?"".concat(e,":").concat(t).concat(n):"".concat(t).concat(n)}(t,null===e||void 0===e?void 0:e.type,null===e||void 0===e?void 0:e.structs);if(f.has(a))return f.get(a);const u=n.cN.test(t),h=(0,n.Zw)(u?d:l,t);if(!h)throw new o.jO({param:t});if(h.name&&function(t){return"address"===t||"bool"===t||"function"===t||"string"===t||"tuple"===t||n.eL.test(t)||n.lh.test(t)||y.test(t)}(h.name))throw new o.TT({param:t,name:h.name});const w=h.name?{name:h.name}:{},v="indexed"===h.modifier?{indexed:!0}:{},_=null!==(r=null===e||void 0===e?void 0:e.structs)&&void 0!==r?r:{};let E,A={};if(u){E="tuple";const t=b(h.type),e=[],r=t.length;for(let n=0;n<r;n++)e.push(m(t[n],{structs:_}));A={components:e}}else if(h.type in _)E="tuple",A={components:_[h.type]};else if(p.test(h.type))E="".concat(h.type,"256");else if("address payable"===h.type)E="address";else if(E=h.type,"struct"!==(null===e||void 0===e?void 0:e.type)&&!g(E))throw new i.Hk({type:E});if(h.modifier){var x,S;if(null===e||void 0===e||null===(x=e.modifiers)||void 0===x||null===(S=x.has)||void 0===S||!S.call(x,h.modifier))throw new o.zL({param:t,type:null===e||void 0===e?void 0:e.type,modifier:h.modifier});if(c.Dt.has(h.modifier)&&!function(t,e){return e||"bytes"===t||"string"===t||"tuple"===t}(E,!!h.array))throw new o._D({param:t,type:null===e||void 0===e?void 0:e.type,modifier:h.modifier})}const T={type:"".concat(E).concat(null!==(s=h.array)&&void 0!==s?s:""),...w,...v,...A};return f.set(a,T),T}function b(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=t.trim().length;for(let o=0;o<i;o++){const i=t[o],s=t.slice(o+1);switch(i){case",":return 0===n?b(s,[...e,r.trim()]):b(s,e,"".concat(r).concat(i),n);case"(":return b(s,e,"".concat(r).concat(i),n+1);case")":return b(s,e,"".concat(r).concat(i),n-1);default:return b(s,e,"".concat(r).concat(i),n)}}if(""===r)return e;if(0!==n)throw new u({current:r,depth:n});return e.push(r.trim()),e}function g(t){return"address"===t||"bool"===t||"function"===t||"string"===t||n.eL.test(t)||n.lh.test(t)}const y=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/},61014:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var n=r(81810),i=r(50555),o=r(74852),s=r(41127);let a;class u{constructor(t){(0,s.Z)(this,"value",void 0),(0,s.Z)(this,"next",void 0),this.value=t}}var f=new WeakMap,c=new WeakMap,h=new WeakMap;a=Symbol.iterator;class l{constructor(){(0,n.Z)(this,f,{writable:!0,value:void 0}),(0,n.Z)(this,c,{writable:!0,value:void 0}),(0,n.Z)(this,h,{writable:!0,value:void 0}),this.clear()}enqueue(t){var e;const r=new u(t);(0,o.Z)(this,f)?((0,o.Z)(this,c).next=r,(0,i.Z)(this,c,r)):((0,i.Z)(this,f,r),(0,i.Z)(this,c,r)),(0,i.Z)(this,h,(e=(0,o.Z)(this,h),e++,e))}dequeue(){var t;const e=(0,o.Z)(this,f);
2if(e)return(0,i.Z)(this,f,(0,o.Z)(this,f).next),(0,i.Z)(this,h,(t=(0,o.Z)(this,h),t--,t)),e.value}clear(){(0,i.Z)(this,f,void 0),(0,i.Z)(this,c,void 0),(0,i.Z)(this,h,0)}get size(){return(0,o.Z)(this,h)}*[a](){let t=(0,o.Z)(this,f);for(;t;)yield t.value,t=t.next}}function d(t){if(!Number.isInteger(t)&&t!==Number.POSITIVE_INFINITY||!(t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const e=new l;let r=0;const n=async(t,n,i)=>{r++;const o=(async()=>t(...i))();n(o);try{await o}catch{}r--,e.size>0&&e.dequeue()()},i=function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];return new Promise((o=>{((i,o,s)=>{e.enqueue(n.bind(void 0,i,o,s)),(async()=>{await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()})()})(i,o,s)}))};return Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),i}},4252:(t,e,r)=>{"use strict";r.d(e,{R:()=>U});var n=r(13604),i=r(9386),o=r(4436);function s(t){const e=(0,i.D)(t),r=[],s=t.length;for(let i=0;i<s;i++){const s=t[i];(0,n.N0)(s)||r.push((0,o.cK)(s,e))}return r}class a extends Error{static setStaticOptions(t){a.prototype.docsOrigin=t.docsOrigin,a.prototype.showVersion=t.showVersion,a.prototype.version=t.version}constructor(t){var e,r,n;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=(t=>{if(i.cause instanceof a){if(i.cause.details)return i.cause.details;if(i.cause.shortMessage)return i.cause.shortMessage}return i.cause&&"details"in i.cause&&"string"===typeof i.cause.details?i.cause.details:null!==(t=i.cause)&&void 0!==t&&t.message?i.cause.message:i.details})(),s=i.cause instanceof a&&i.cause.docsPath||i.docsPath,u=null!==(e=i.docsOrigin)&&void 0!==e?e:a.prototype.docsOrigin,f="".concat(u).concat(null!==s&&void 0!==s?s:""),c=Boolean(null!==(r=i.version)&&void 0!==r?r:a.prototype.showVersion),h=null!==(n=i.version)&&void 0!==n?n:a.prototype.version;super([t||"An error occurred.",...i.metaMessages?["",...i.metaMessages]:[],...o||s||c?["",o?"Details: ".concat(o):void 0,s?"See: ".concat(f):void 0,c?"Version: ".concat(h):void 0]:[]].filter((t=>"string"===typeof t)).join("\n"),i.cause?{cause:i.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=i.cause,this.details=o,this.docs=f,this.docsOrigin=u,this.docsPath=s,this.shortMessage=t,this.showVersion=c,this.version=h}walk(t){return u(this,t)}}function u(t,e){return null!==e&&void 0!==e&&e(t)?t:t&&"object"===typeof t&&"cause"in t&&t.cause?u(t.cause,e):e?null:t}Object.defineProperty(a,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:"ox@".concat("0.1.1")}}),a.setStaticOptions(a.defaultStaticOptions);function f(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signed:r,size:n}=e,i=BigInt(t);let o;n?o=r?(1n<<8n*BigInt(n)-1n)-1n:2n**(8n*BigInt(n))-1n:"number"===typeof t&&(o=BigInt(Number.MAX_SAFE_INTEGER));const s="bigint"===typeof o&&r?-o-1n:0;if(o&&i>o||i<s){const e="bigint"===typeof t?"n":"";throw new h({max:o?"".concat(o).concat(e):void 0,min:"".concat(s).concat(e),signed:r,size:n,value:"".concat(t).concat(e)})}const a=(r&&i<0?BigInt.asUintN(8*n,BigInt(i)):i).toString(16),u="0x".concat(a);return n?c(u,n):u}function c(t,e){return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{dir:r,size:n=32}=e;if(0===n)return t;const i=t.replace("0x","");if(i.length>2*n)throw new l({size:Math.ceil(i.length/2),targetSize:n,type:"Hex"});return"0x".concat(i["right"===r?"padEnd":"padStart"](2*n,"0"))}(t,{dir:"left",size:e})}class h extends a{constructor(t){let{max:e,min:r,signed:n,size:i,value:o}=t;super("Number `".concat(o,"` is not in safe").concat(i?" ".concat(8*i,"-bit"):"").concat(n?" signed":" unsigned"," integer range ").concat(e?"(`".concat(r,"` to `").concat(e,"`)"):"(above `".concat(r,"`)"))),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class l extends a{constructor(t){let{size:e,targetSize:r,type:n}=t;super("".concat(n.charAt(0).toUpperCase()).concat(n.slice(1).toLowerCase()," size (`").concat(e,"`) exceeds padding size (`").concat(r,"`).")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function d(t){return{address:t.address,amount:f(t.amount),index:f(t.index),validatorIndex:f(t.validatorIndex)}}var p=r(2117),m=r(40606);const b="0x82ad56cb",g="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b
2602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",y="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",w="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
2150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";var v=r(60955),_=r(84301),E=r(27844),A=r(44362),x=r(81356),S=r(60009),T=r(67902);const B="/docs/contract/encodeDeployData";function M(t){const{abi:e,args:r,bytecode:n}=t;if(!r||0===r.length)return n;const i=e.find((t=>"type"in t&&"constructor"===t.type));if(!i)throw new x.fM({docsPath:B});if(!("inputs"in i))throw new x.cO({docsPath:B});if(!i.inputs||0===i.inputs.length)throw new x.cO({docsPath:B});const o=(0,T.E)(i.inputs,r);return(0,S.SM)([n,o])}var O=r(51018);var I=r(68842),N=r(98113),R=r(52544),k=r(89453),P=r(3601),L=r(4137),C=r(16606);async function U(t,e){var n,i;
2const{account:o=t.account,authorizationList:a,batch:u=Boolean(null===(n=t.batch)||void 0===n?void 0:n.multicall),blockNumber:c,blockTag:h=(null!==(i=t.experimental_blockTag)&&void 0!==i?i:"latest"),accessList:l,blobs:g,blockOverrides:x,code:S,data:T,factory:B,factoryData:U,gas:j,gasPrice:D,maxFeePerBlobGas:H,maxFeePerGas:z,maxPriorityFeePerGas:Z,nonce:W,to:q,value:V,stateOverride:G,...K}=e,X=o?(0,p.T)(o):void 0;if(S&&(B||U))throw new v.G("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(S&&q)throw new v.G("Cannot provide both `code` & `to` as parameters.");const $=S&&T,Y=B&&U&&q&&T,J=$||Y,Q=$?F({code:S,data:T}):Y?function(t){const{data:e,factory:r,factoryData:n,to:i}=t;return M({abi:s(["constructor(address, bytes, address, bytes)"]),bytecode:y,args:[i,e,r,n]})}({data:T,factory:B,factoryData:U,to:q}):T;try{var tt;(0,C.F)(e);const r=("bigint"===typeof c?(0,I.eC)(c):void 0)||h,n=x?function(t){return{..."bigint"===typeof t.baseFeePerGas&&{baseFeePerGas:f(t.baseFeePerGas)},..."bigint"===typeof t.blobBaseFee&&{blobBaseFee:f(t.blobBaseFee)},..."string"===typeof t.feeRecipient&&{feeRecipient:t.feeRecipient},..."bigint"===typeof t.gasLimit&&{gasLimit:f(t.gasLimit)},..."bigint"===typeof t.number&&{number:f(t.number)},..."bigint"===typeof t.prevRandao&&{prevRandao:f(t.prevRandao)},..."bigint"===typeof t.time&&{time:f(t.time)},...t.withdrawals&&{withdrawals:t.withdrawals.map(d)}}}(x):void 0,i=(0,L.mF)(G),o=null===(tt=t.chain)||void 0===tt||null===(tt=tt.formatters)||void 0===tt||null===(tt=tt.transactionRequest)||void 0===tt?void 0:tt.format,s=(o||k.tG)({...(0,R.K)(K,{format:o}),accessList:l,account:X,authorizationList:a,blobs:g,data:Q,gas:j,gasPrice:D,maxFeePerBlobGas:H,maxFeePerGas:z,maxPriorityFeePerGas:Z,nonce:W,to:J?void 0:q,value:V},"call");if(u&&function(t){let{request:e}=t;const{data:r,to:n,...i}=e;return!!r&&(!r.startsWith(b)&&(!!n&&!(Object.values(i).filter((t=>"undefined"!==typeof t)).length>0)))}({request:s})&&!i&&!n)try{return await async function(t,e){var r,n;const{batchSize:i=1024,deployless:o=!1,wait:s=0}="object"===typeof(null===(r=t.batch)||void 0===r?void 0:r.multicall)?t.batch.multicall:{},{blockNumber:a,blockTag:u=(null!==(n=t.experimental_blockTag)&&void 0!==n?n:"latest"),data:f,to:c}=e,h=(()=>{if(o)return null;if(e.multicallAddress)return e.multicallAddress;if(t.chain)return function(t){var e;let{blockNumber:r,chain:n,contract:i}=t;const o=null===n||void 0===n||null===(e=n.contracts)||void 0===e?void 0:e[i];if(!o)throw new _.mm({chain:n,contract:{name:i}});if(r&&o.blockCreated&&o.blockCreated>r)throw new _.mm({blockNumber:r,chain:n,contract:{name:i,blockCreated:o.blockCreated}});return o.address}({blockNumber:a,chain:t.chain,contract:"multicall3"});throw new _.pZ})(),l="bigint"===typeof a?(0,I.eC)(a):void 0,d=l||u,{schedule:p}=(0,P.S)({id:"".concat(t.uid,".").concat(d),wait:s,shouldSplitBatch(t){const e=t.reduce(((t,e)=>{let{data:r}=e;return t+(r.length-2)}),0);return e>2*i},fn:async e=>{const r=e.map((t=>({allowFailure:!0,callData:t.data,target:t.to}))),n=(0,O.R)({abi:m.F8,args:[r],functionName:"aggregate3"}),i=await t.request({method:"eth_call",params:[{...null===h?{data:F({code:w,data:n})}:{to:h,data:n}},d]});return(0,A.k)({abi:m.F8,args:[r],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:b,success:g}]=await p({data:f,to:c});if(!g)throw new E.VQ({data:b});return"0x"===b?{data:void 0}:{data:b}}(t,{...s,blockNumber:c,blockTag:h})}catch(et){if(!(et instanceof _.pZ)&&!(et instanceof _.mm))throw et}const p=(()=>{const t=[s,r];return i&&n?[...t,i,n]:i?[...t,i]:n?[...t,{},n]:t})(),y=await t.request({method:"eth_call",params:p});return"0x"===y?{data:void 0}:{data:y}}catch(et){const n=function(t){var e;if(!(t instanceof v.G))return;const r=t.walk();return"object"===typeof(null===r||void 0===r?void 0:r.data)?null===(e=r.data)||void 0===e?void 0:e.data:r.data}(et),{offchainLookup:i,offchainLookupSignature:o}=await r.e(9359).then(r.bind(r,29359));if(!1!==t.ccipRead&&(null===n||void 0===n?void 0:n.slice(0,10))===o&&q)return{data:await i(t,{data:n,to:q})};if(J&&"0x101bb98d"===(null===n||void 0===n?void 0:n.slice(0,10)))throw new E.Mo({factory:B});throw(0,N.P)(et,{...e,account:X,chain:t.chain})}}function F(t){const{code:e,data:r}=t;return M({abi:s(["constructor(bytes, bytes)"]),bytecode:g,args:[e,r]})}},40606:(t,e,r)=>{"use strict";r.d(e,{F8:()=>n,Wo:()=>s,Yi:()=>i});const n=[{inputs:[{components:[{name:"target",type:"address"}
2,{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],i=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],o=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],s=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}]},44362:(t,e,r)=>{"use strict";r.d(e,{k:()=>a});var n=r(81356),i=r(50499),o=r(19447);const s="/docs/contract/decodeFunctionResult";function a(t){const{abi:e,args:r,functionName:a,data:u}=t;let f=e[0];if(a){const t=(0,o.mE)({abi:e,args:r,name:a});if(!t)throw new n.xL(a,{docsPath:s});f=t}if("function"!==f.type)throw new n.xL(void 0,{docsPath:s});if(!f.outputs)throw new n.MX(f.name,{docsPath:s});const c=(0,i.r)(f.outputs,u);return c&&c.length>1?c:c&&1===c.length?c[0]:void 0}}}]);
3//# sourceMappingURL=4555.dbbb5a3b.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.