forked from rainbow-me/rainbow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInjectedJSBundle.js
More file actions
2 lines (2 loc) Β· 448 KB
/
InjectedJSBundle.js
File metadata and controls
2 lines (2 loc) Β· 448 KB
1
2
/*! For license information please see InjectedJSBundle.js.LICENSE.txt */
(()=>{var e={6289:(e,t)=>{"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let i=0;i<e.length;i++){const o=r(e[i]);t.push(o),n+=o.length}return h(o(n,192),...t)}const t=y(e);return 1===t.length&&t[0]<128?t:h(o(t.length,128),t)}function n(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const r=p(e),n=p(t+55+r.length/2);return Uint8Array.from(f(n+r))}function s(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const r=a(y(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function a(e){let t,r,o,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,o=128===l?Uint8Array.from([]):n(e,1,t),2===t&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(n(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=n(e,r,t+r),{data:o,remainder:e.slice(t+r)}}if(l<=247){for(t=l-191,s=n(e,1,t);s.length;)c=a(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(r=l-246,t=i(n(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const o=r+t;if(o>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=n(e,r,o);s.length;)c=a(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(o)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let r=0;r<e.length;r++)t+=c[e[r]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function f(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r;t[r]=l(e.slice(n,n+2))}return t}function h(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}function d(e){return(new TextEncoder).encode(e)}function p(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function g(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return g(e)?f((t="string"!=typeof(r=e)?r:g(r)?r.slice(2):r).length%2?`0${t}`:t):d(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?f(p(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:h,hexToBytes:f,utf8ToBytes:d},t.RLP={encode:r,decode:s}},6284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;const n=r(6289),i=r(9956),o=r(3852),s=r(7513),a=r(7312),c=r(9838),u=r(5546),l=r(9498),f=BigInt(0);class h{constructor(e=f,t=f,r=c.KECCAK256_RLP,n=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){const{nonce:t,balance:r,storageRoot:n,codeHash:i}=e;return new h(void 0!==t?(0,a.bufferToBigInt)((0,a.toBuffer)(t)):void 0,void 0!==r?(0,a.bufferToBigInt)((0,a.toBuffer)(r)):void 0,void 0!==n?(0,a.toBuffer)(n):void 0,void 0!==i?(0,a.toBuffer)(i):void 0)}static fromRlpSerializedAccount(e){const t=(0,a.arrToBufArr)(n.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,r,n,i]=e;return new h((0,a.bufferToBigInt)(t),(0,a.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<f)throw new Error("nonce must be greater than zero");if(this.balance<f)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,a.bigIntToUnpaddedBuffer)(this.nonce),(0,a.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return Buffer.from(n.RLP.encode((0,a.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(c.KECCAK256_NULL)}isEmpty(){return this.balance===f&&this.nonce===f&&this.codeHash.equals(c.KECCAK256_NULL)}}function d(e){const[t,r,n,i]=e;return[t,r,0===(0,a.arrToBufArr)(n).length?c.KECCAK256_RLP:n,0===(0,a.arrToBufArr)(i).length?c.KECCAK256_NULL:i]}t.Account=h,t.isValidAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,u.assertIsHexString)(e);const r=(0,l.stripHexPrefix)(e).toLowerCase();let n="";void 0!==t&&(n=(0,a.bufferToBigInt)((0,a.toBuffer)(t)).toString()+"0x");const o=Buffer.from(n+r,"utf8"),c=(0,s.bytesToHex)((0,i.keccak256)(o));let f="0x";for(let e=0;e<r.length;e++)parseInt(c[e],16)>=8?f+=r[e].toUpperCase():f+=r[e];return f},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,a.bufferToBigInt)(t)===BigInt(0)?Buffer.from((0,i.keccak256)(n.RLP.encode((0,a.bufArrToArr)([e,null])))).slice(-20):Buffer.from((0,i.keccak256)(n.RLP.encode((0,a.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");const n=(0,i.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,i.keccak256)(r)]));return(0,a.toBuffer)(n).slice(-20)},t.isValidPrivate=function(e){return o.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,u.assertIsBuffer)(e),64===e.length)try{return o.secp256k1.ProjectivePoint.fromHex(Buffer.concat([Buffer.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return o.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from(o.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return Buffer.from((0,i.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from(o.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){const e=(0,a.zeros)(20);return(0,a.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=d;const p=new Uint8Array(0);t.accountBodyToSlim=function(e){const[t,r,n,i]=e;return[t,r,(0,a.arrToBufArr)(n).equals(c.KECCAK256_RLP)?p:n,(0,a.arrToBufArr)(i).equals(c.KECCAK256_NULL)?p:i]},t.accountBodyToRLP=function(e,t=!0){const r=t?d(e):e;return(0,a.arrToBufArr)(n.RLP.encode(r))}},6727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const n=r(6284),i=r(7312);class o{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new o((0,i.zeros)(20))}static fromString(e){if(!(0,n.isValidAddress)(e))throw new Error("Invalid address");return new o((0,i.toBuffer)(e))}static fromPublicKey(e){if(!Buffer.isBuffer(e))throw new Error("Public key should be Buffer");const t=(0,n.pubToAddress)(e);return new o(t)}static fromPrivateKey(e){if(!Buffer.isBuffer(e))throw new Error("Private key should be Buffer");const t=(0,n.privateToAddress)(e);return new o(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new o((0,n.generateAddress)(e.buf,(0,i.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!Buffer.isBuffer(t))throw new Error("Expected salt to be a Buffer");if(!Buffer.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new o((0,n.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(o.zero())}isPrecompileOrSystemAddress(){const e=(0,i.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}t.Address=o},8421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;const n=r(7007);class i extends n.EventEmitter{emit(e,...t){let[r,n]=t;const i=this;let o=i._events[e]??[];return void 0===n&&"function"==typeof r&&(n=r,r=void 0),"newListener"!==e&&"removeListener"!==e||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(e,t,r){let n;for await(const i of t)try{i.length<2?i.call(e,r):await new Promise(((t,n)=>{i.call(e,r,(e=>{e?n(e):t()}))}))}catch(e){n=e}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(e)>0}once(e,t){const r=this;let n;if("function"!=typeof t)throw new TypeError("listener must be a function");return n=t.length>=2?function(i,o){r.removeListener(e,n),t(i,o)}:function(i){r.removeListener(e,n),t(i,n)},r.on(e,n),r}first(e,t){let r=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(r)||(this._events[e]=r=[r]),r.unshift(t),this}before(e,t,r){return this.beforeOrAfter(e,t,r)}after(e,t,r){return this.beforeOrAfter(e,t,r,"after")}beforeOrAfter(e,t,r,n){let i,o,s=this._events[e]??[];const a="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===t){o=i+a;break}return s.splice(o,0,r),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}t.AsyncEventEmitter=i},7312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;const n=r(5546),i=r(9498);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){const r=(0,t.intToHex)(e);return Buffer.from((0,i.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const o=function(e,r,n){const i=(0,t.zeros)(r);return n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)};t.setLengthLeft=function(e,t){return(0,n.assertIsBuffer)(e),o(e,t,!1)},t.setLengthRight=function(e,t){return(0,n.assertIsBuffer)(e),o(e,t,!0)};const s=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function a(e){const r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function c(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,n.assertIsBuffer)(e),s(e)},t.unpadArray=function(e){return(0,n.assertIsArray)(e),s(e)},t.unpadHexString=function(e){return(0,n.assertIsHexString)(e),e=(0,i.stripHexPrefix)(e),"0x"+s(e)},t.toBuffer=function(e){if(null==e)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(e))return Buffer.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return Buffer.from(e);if("string"==typeof e){if(!(0,i.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return Buffer.from((0,i.padToEven)((0,i.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),Buffer.from(t,"hex")}if(e.toArray)return Buffer.from(e.toArray());if(e.toBuffer)return Buffer.from(e.toBuffer());throw new Error("invalid type")},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.bufferToBigInt=a,t.bigIntToBuffer=c,t.bufferToInt=function(e){const t=Number(a(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t},t.fromSigned=function(e){return BigInt.asIntN(256,a(e))},t.toUnsigned=function(e){return c(BigInt.asUintN(256,e))},t.addHexPrefix=function(e){return"string"!=typeof e||(0,i.isHexPrefixed)(e)?e:"0x"+e},t.short=function(e,t=50){const r=Buffer.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"β¦"},t.toUtf8=function(e){if((e=(0,i.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return Buffer.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(Buffer.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){const r=[];for(let n=0;n<e.length;n++)r.push((0,t.baToJSON)(e[n]));return r}},t.validateNoLeadingZeroes=function(e){for(const[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Buffer.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(c(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},9838:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;const n=r(8287),i=r(3852);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=i.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},5062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=e=>e.length>0&&16===e[e.length-1],t.nibblesToBytes=(e,t)=>{for(let r=0,n=0;n<e.length;r+=1,n+=2)t[r]=e[n]<<4|e[n+1]},t.nibblesToCompactBytes=e=>{let r=0;(0,t.hasTerminator)(e)&&(r=1,e=e.subarray(0,e.length-1));const n=new Uint8Array(e.length/2+1);return n[0]=r<<5,1==(1&e.length)&&(n[0]|=16,n[0]|=e[0],e=e.subarray(1)),(0,t.nibblesToBytes)(e,n.subarray(1)),n},t.bytesToNibbles=e=>{const t=2*e.length+1,r=new Uint8Array(t);for(let t=0;t<e.length;t++){const n=e[t];r[2*t]=n/16,r[2*t+1]=n%16}return r[t-1]=16,r},t.compactBytesToNibbles=e=>{if(0===e.length)return e;let r=(0,t.bytesToNibbles)(e);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},5546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;const n=r(9498);t.assertIsHexString=function(e){if(!(0,n.isHexString)(e))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!Buffer.isBuffer(e))throw new Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw new Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw new Error(`This method only supports strings but input was: ${e}`)}},8683:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,i(r(9838),t),i(r(2652),t),i(r(6284),t),i(r(6727),t),i(r(7380),t),i(r(2133),t),i(r(7312),t),i(r(2666),t),i(r(5062),t),i(r(8421),t);var o=r(9498);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),i(r(1708),t),i(r(1862),t)},9498:(e,t)=>{"use strict";function r(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}function n(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=r,t.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return r(e)?e.slice(2):e},t.padToEven=n,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return Buffer.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"]((t=>e.indexOf(t)>=0))},t.toAscii=function(e){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t},t.fromUtf8=function(e){return`0x${n(Buffer.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},t.fromAscii=function(e){let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r).toString(16);t+=n.length<2?`0${n}`:n}return`0x${t}`},t.getKeys=function(e,t,r){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const n=[];for(let i=0;i<e.length;i++){let o=e[i][t];if(!0!==r||o){if("string"!=typeof o)throw new Error("invalid abi - expected type 'string', received "+typeof o)}else o="";n.push(o)}return n},t.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||void 0!==t&&t>0&&e.length!==2+2*t)}},1708:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0,t.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},1862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;const n=r(6215);t.fetchFromProvider=async(e,t)=>(await(0,n.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result,t.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},2133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;const n=r(9956),i=r(3852),o=r(7312),s=r(9838),a=r(5546);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function u(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){const n=i.secp256k1.sign(e,t),o=n.toCompactRawBytes();return{r:Buffer.from(o.slice(0,32)),s:Buffer.from(o.slice(32,64)),v:void 0===r?BigInt(n.recovery+27):BigInt(n.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,n,s){const a=Buffer.concat([(0,o.setLengthLeft)(r,32),(0,o.setLengthLeft)(n,32)],64),l=c(t,s);if(!u(l))throw new Error("Invalid signature v value");const f=i.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(l)).recoverPublicKey(e);return Buffer.from(f.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,n){if(!u(c(e,n)))throw new Error("Invalid signature v value");return(0,o.bufferToHex)(Buffer.concat([(0,o.setLengthLeft)(t,32),(0,o.setLengthLeft)(r,32),(0,o.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,n){if(!u(c(e,n)))throw new Error("Invalid signature v value");let i=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(i=Buffer.from(r),i[0]|=128),(0,o.bufferToHex)(Buffer.concat([(0,o.setLengthLeft)(t,32),(0,o.setLengthLeft)(i,32)]))},t.fromRpcSig=function(e){const t=(0,o.toBuffer)(e);let r,n,i;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),i=(0,o.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),n=t.slice(32,64),i=BigInt((0,o.bufferToInt)(t.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r,s:n}},t.isValidSignature=function(e,t,r,n=!0,i){if(32!==t.length||32!==r.length)return!1;if(!u(c(e,i)))return!1;const a=(0,o.bufferToBigInt)(t),l=(0,o.bufferToBigInt)(r);return!(a===BigInt(0)||a>=s.SECP256K1_ORDER||l===BigInt(0)||l>=s.SECP256K1_ORDER||n&&l>=s.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,a.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return Buffer.from((0,n.keccak256)(Buffer.concat([t,e])))}},2666:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;const n=r(7312),i=r(9498);var o;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(o=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=(0,n.toBuffer)(e);switch(t){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const e=(0,n.bufferToBigInt)(r);if(e>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(e)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error("unknown outputType")}}},2652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},7380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;const n=r(6727),i=r(7312),o=r(2666);class s{constructor(e,t,r,n){this.index=e,this.validatorIndex=t,this.address=r,this.amount=n}static fromWithdrawalData(e){const{index:t,validatorIndex:r,address:i,amount:a}=e,c=(0,o.toType)(t,o.TypeOutput.BigInt),u=(0,o.toType)(r,o.TypeOutput.BigInt),l=new n.Address((0,o.toType)(i,o.TypeOutput.Buffer)),f=(0,o.toType)(a,o.TypeOutput.BigInt);return new s(c,u,l,f)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,r,n,i]=e;return s.fromWithdrawalData({index:t,validatorIndex:r,address:n,amount:i})}static toBufferArray(e){const{index:t,validatorIndex:r,address:i,amount:s}=e,a=(0,o.toType)(t,o.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,o.toType)(t,o.TypeOutput.Buffer),c=(0,o.toType)(r,o.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,o.toType)(r,o.TypeOutput.Buffer);let u;return u=i instanceof n.Address?i.buf:(0,o.toType)(i,o.TypeOutput.Buffer),[a,c,u,(0,o.toType)(s,o.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,o.toType)(s,o.TypeOutput.Buffer)]}raw(){return s.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,i.bigIntToHex)(this.index),validatorIndex:(0,i.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,i.bigIntToHex)(this.amount)}}}t.Withdrawal=s},723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(9615),i=r(9175),o=r(4678);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},9141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(5304),i=r(7939),o=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:a,windowSize:c}=n(t);let u=e.ZERO,l=e.BASE;const f=BigInt(2**t-1),h=2**t,d=BigInt(t);for(let e=0;e<a;e++){const t=e*c;let n=Number(o&f);o>>=d,n>c&&(n-=h,o+=s);const a=t,p=t+Math.abs(n)-1,g=e%2!=0,y=n<0;0===n?l=l.add(r(g,i[a])):u=u.add(r(y,i[p]))}return{p:u,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},1298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(5304),i=r(7939),o=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function c(e){if(!(0,i.isBytes)(e))throw new Error("Uint8Array expected")}function u(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,r,n){c(e),c(t),u(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const h=(0,i.concatBytes)(t,s(t.length,1)),d=s(0,l),p=s(r,2),g=new Array(f),y=n((0,i.concatBytes)(d,e,p,s(0,1),h));g[0]=n((0,i.concatBytes)(y,s(1,1),h));for(let e=1;e<=f;e++){const t=[a(y,g[e-1]),s(e+1,1),h];g[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...g).slice(0,r)}function f(e,t,r,n,o){if(c(e),c(t),u(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function h(e,t,r){(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:h,hash:d,expand:p,DST:g}=r;c(e),u(t);const y=function(e){if((0,i.isBytes)(e))return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),b=s.toString(2).length,m=Math.ceil((b+a)/8),w=t*h*m;let v;if("xmd"===p)v=l(e,y,w,d);else if("xof"===p)v=f(e,y,w,a,d);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');v=e}const E=new Array(t);for(let e=0;e<t;e++){const t=new Array(h);for(let r=0;r<h;r++){const i=m*(r+e*h),a=v.subarray(i,i+m);t[r]=(0,n.mod)(o(a),s)}E[e]=t}return E}t.expand_message_xmd=l,t.expand_message_xof=f,t.hash_to_field=h,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=h(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,i){const o=h(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s}}}},5304:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(7939),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=i?r:t+r}function h(e,t,r){if(r<=i||t<i)throw new Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function d(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=i,a=o,c=o,u=i;for(;r!==i;){const e=n/r,t=n%r,i=s-c*e,o=a-u*e;n=r,r=t,s=c,a=u,c=i,u=o}if(n!==o)throw new Error("invert: does not exist");return f(s,t)}function p(e){const t=(e-o)/s;let r,n,a;for(r=e-o,n=0;r%s===i;r/=s,n++);for(a=s;a<e&&h(a,t,e)!==e-o;a++);if(1===n){const t=(e+o)/c;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const u=(r+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,c=e.pow(e.mul(e.ONE,a),r),l=e.pow(i,u),f=e.pow(i,r);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,o<<BigInt(s-t-1));c=e.sqr(r),l=e.mul(l,r),f=e.mul(f,c),s=t}return l}}function g(e){if(e%c===a){const t=(e+o)/c;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===u){const t=(e-u)/l;return function(e,r){const n=e.mul(r,s),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,s),i),c=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),r))throw new Error("Cannot find square root");return c}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=h,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=d,t.tonelliShanks=p,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function b(e,t,r){if(r<i)throw new Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function m(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function w(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function v(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function E(e){const t=v(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=b,t.FpInvertBatch=m,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?d(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=w,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:c}=w(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:c,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>b(l,e,t),div:(t,r)=>f(t*d(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>d(t,e),sqrt:s.sqrt||(e=>u(l,e)),invertBatch:e=>m(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,c):(0,n.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=w(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=v,t.getMinHashLength=E,t.mapHashToField=function(e,t,r=!1){const i=e.length,s=v(t),a=E(t);if(i<16||i<a||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const c=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(c,s):(0,n.numberToBytesBE)(c,s)}},7939:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=t.isBytes=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2);function o(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}t.isBytes=o;const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function c(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function u(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}t.bytesToHex=a,t.numberToHexUnpadded=c,t.hexToNumber=u;function l(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=l(e.charCodeAt(i)),o=l(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n}function h(e,t){return f(e.toString(16).padStart(2*t,"0"))}function d(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];if(!o(n))throw new Error("Uint8Array expected");t+=n.length}let r=new Uint8Array(t),n=0;for(let t=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}t.hexToBytes=f,t.bytesToNumberBE=function(e){return u(a(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return u(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=h,t.numberToBytesLE=function(e,t){return h(e,t).reverse()},t.numberToVarBytesBE=function(e){return f(c(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=f(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=d,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=(e,t,i)=>e|(i?n:r)<<BigInt(t),t.bitMask=e=>(i<<BigInt(e-1))-n;const p=e=>new Uint8Array(e),g=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=p(e),i=p(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),c=(e=p())=>{i=a(g([0]),e),n=a(),0!==e.length&&(i=a(g([1]),e),n=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return d(...r)};return(e,t)=>{let r;for(s(),c(e);!(r=t(u()));)c();return s(),r}};const y={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=y[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},4678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(5304),i=r(7939),o=r(7939),s=r(9141),{bytesToNumberBE:a,hexToBytes:c}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.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:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?c(e):e;if(!i.isBytes(n))throw new Error("ui8a expected");let o=n.length;if(o<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==o-2)throw new r("Invalid signature: incorrect length");const{d:s,l:a}=t.DER._parseInt(n.subarray(2)),{d:u,l}=t.DER._parseInt(a);if(l.length)throw new r("Invalid signature: left bytes after parsing");return{r:s,s:u}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),c=r(s);return`30${r(s+o+4)}02${c}${i}02${a}${n}`}};const u=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),d=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);i.validateObject(t,{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}=t;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({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function d(e){return"bigint"==typeof e&&u<e&&e<t.n}function p(e){if(!d(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function g(e){const{allowedPrivateKeyLengths:r,nByteLength:s,wrapPrivateKey:a,n:c}=t;if(r&&"bigint"!=typeof e){if(i.isBytes(e)&&(e=i.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let u;try{u="bigint"==typeof e?e:i.bytesToNumberBE((0,o.ensureBytes)("private key",e,s))}catch(t){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(u=n.mod(u,c)),p(u),u}const y=new Map;function b(e){if(!(e instanceof m))throw new Error("ProjectivePoint expected")}class m{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof m)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?m.ZERO:new m(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}static fromHex(e){const t=m.fromAffine(c((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return m.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,y.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);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:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){b(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return c&&u}negate(){return new m(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,h),{px:o,py:s,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),g=r.mul(o,s);return g=r.add(g,g),l=r.mul(o,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(i,p),u=r.add(c,u),c=r.sub(d,u),u=r.add(d,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(i,l),p=r.mul(e,p),g=r.sub(f,p),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,g),u=r.add(u,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,g),c=r.sub(c,f),l=r.mul(p,d),l=r.add(l,l),l=r.add(l,l),new m(c,u,l)}add(e){b(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let u=r.ZERO,l=r.ZERO,f=r.ZERO;const d=t.a,p=r.mul(t.b,h);let g=r.mul(n,s),y=r.mul(i,a),w=r.mul(o,c),v=r.add(n,i),E=r.add(s,a);v=r.mul(v,E),E=r.add(g,y),v=r.sub(v,E),E=r.add(n,o);let _=r.add(s,c);return E=r.mul(E,_),_=r.add(g,w),E=r.sub(E,_),_=r.add(i,o),u=r.add(a,c),_=r.mul(_,u),u=r.add(y,w),_=r.sub(_,u),f=r.mul(d,E),u=r.mul(p,w),f=r.add(u,f),u=r.sub(y,f),f=r.add(y,f),l=r.mul(u,f),y=r.add(g,g),y=r.add(y,g),w=r.mul(d,w),E=r.mul(p,E),y=r.add(y,w),w=r.sub(g,w),w=r.mul(d,w),E=r.add(E,w),g=r.mul(y,E),l=r.add(l,g),g=r.mul(_,E),u=r.mul(v,u),u=r.sub(u,g),g=r.mul(v,y),f=r.mul(_,f),f=r.add(f,g),new m(u,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(m.ZERO)}wNAF(e){return v.wNAFCached(this,y,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}))}multiplyUnsafe(e){const n=m.ZERO;if(e===u)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return v.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:a,k2:c}=i.splitScalar(e),f=n,h=n,d=this;for(;s>u||c>u;)s&l&&(f=f.add(d)),c&l&&(h=h.add(d)),d=d.double(),s>>=l,c>>=l;return o&&(f=f.negate()),a&&(h=h.negate()),h=new m(r.mul(h.px,i.beta),h.py,h.pz),f.add(h)}multiply(e){p(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(o);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=v.constTimeNegate(e,u),f=v.constTimeNegate(a,f),f=new m(r.mul(f.px,s.beta),f.py,f.pz),n=u.add(f),i=l.add(h)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return m.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=m.BASE,i=(e,t)=>t!==u&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(m,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(m,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}m.BASE=new m(t.Gx,t.Gy,r.ONE),m.ZERO=new m(r.ZERO,r.ONE,r.ZERO);const w=t.nBitLength,v=(0,s.wNAF)(m,t.endo?Math.ceil(w/2):w);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:g,weierstrassEquation:f,isWithinCurveOrder:d}}function g(e,t){const r=e.ORDER;let n=u;for(let e=r-l;e%f===u;e/=f)n+=l;const i=n,o=f<<i-l-l,s=o*f,a=(r-l)/s,c=(a-l)/f,p=s-l,g=o,y=e.pow(t,a),b=e.pow(t,(a+l)/f);let m=(t,r)=>{let n=y,o=e.pow(r,p),s=e.sqr(o);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,r),s=e.mul(a,t);let u=e.mul(s,o);a=e.pow(u,g);let h=e.eql(a,e.ONE);o=e.mul(s,b),a=e.mul(u,n),s=e.cmov(o,s,h),u=e.cmov(a,u,h);for(let t=i;t>l;t--){let r=t-f;r=f<<r-l;let i=e.pow(u,r);const a=e.eql(i,e.ONE);o=e.mul(s,n),n=e.mul(n,n),i=e.mul(u,n),s=e.cmov(o,s,a),u=e.cmov(i,u,a)}return{isValid:h,value:s}};if(e.ORDER%d===h){const r=(e.ORDER-h)/d,n=e.sqrt(e.neg(t));m=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const c=e.mul(a,n),u=e.mul(e.sqr(a),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return m}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:c}=r,f=a.BYTES+1,h=2*a.BYTES+1;function d(e){return n.mod(e,c)}function g(e){return n.invert(e,c)}const{ProjectivePoint:y,normPrivateKeyToScalar:b,weierstrassEquation:m,isWithinCurveOrder:w}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=a.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===h&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${h} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(u<(o=e)&&o<a.ORDER))throw new Error("Point is not on curve");const t=m(e);let s=a.sqrt(t);return 1==(1&r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var o}}),v=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function E(e){return e>c>>l}const _=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class x{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new x(_(e,0,t),_(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new x(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(e){return new x(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,s=B((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const c=2===i||3===i?t+r.n:t;if(c>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=0==(1&i)?"02":"03",l=y.fromHex(u+v(c)),f=g(c),h=d(-s*f),p=d(n*f),b=y.BASE.multiplyAndAddUnsafe(l,h,p);if(!b)throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new x(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}const S={isValidPrivateKey(e){try{return b(e),!0}catch(e){return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=y.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function A(e){const t=i.isBytes(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===h:r?n===2*f||n===2*h:e instanceof y}const I=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},B=r.bits2int_modN||function(e){return d(I(e))},k=i.bitMask(r.nBitLength);function T(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(u<=e&&e<k))throw new Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}const R={lowS:r.lowS,prehash:!1},P={lowS:r.lowS,prehash:!1};return y.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return y.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(A(e))throw new Error("first arg must be private key");if(!A(t))throw new Error("second arg must be public key");return y.fromHex(t).multiply(b(e)).toRawBytes(r)},sign:function(e,t,n=R){const{seed:s,k2sig:c}=function(e,t,n=R){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:c}=r;let{lowS:f,prehash:h,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),h&&(e=(0,o.ensureBytes)("prehashed msgHash",s(e)));const m=B(e),v=b(t),_=[T(v),T(m)];if(null!=p){const e=!0===p?c(a.BYTES):p;_.push((0,o.ensureBytes)("extraEntropy",e))}const S=i.concatBytes(..._),A=m;return{seed:S,k2sig:function(e){const t=I(e);if(!w(t))return;const r=g(t),n=y.BASE.multiply(t).toAffine(),i=d(n.x);if(i===u)return;const o=d(r*d(A+i*v));if(o===u)return;let s=(n.x===i?0:2)|Number(n.y&l),a=o;return f&&E(o)&&(a=function(e){return E(e)?d(-e):e}(o),s^=1),new x(i,a,s)}}}(e,t,n),f=r;return i.createHmacDrbg(f.hash.outputLen,f.nByteLength,f.hmac)(s,c)},verify:function(e,n,s,a=P){const c=e;if(n=(0,o.ensureBytes)("msgHash",n),s=(0,o.ensureBytes)("publicKey",s),"strict"in a)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=a;let f,h;try{if("string"==typeof c||i.isBytes(c))try{f=x.fromDER(c)}catch(e){if(!(e instanceof t.DER.Err))throw e;f=x.fromCompact(c)}else{if("object"!=typeof c||"bigint"!=typeof c.r||"bigint"!=typeof c.s)throw new Error("PARSE");{const{r:e,s:t}=c;f=new x(e,t)}}h=y.fromHex(s)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&f.hasHighS())return!1;l&&(n=r.hash(n));const{r:p,s:b}=f,m=B(n),w=g(b),v=d(m*w),E=d(p*w),_=y.BASE.multiplyAndAddUnsafe(h,v,E)?.toAffine();return!!_&&d(_.x)===p},ProjectivePoint:y,Signature:x,utils:S}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,a,c,u,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),o=e.add(o,c),o=e.mul(o,s),u=e.mul(u,a),c=e.mul(u,t.B),o=e.add(o,c),l=e.mul(i,s);const{isValid:h,value:d}=r(o,u);f=e.mul(i,n),f=e.mul(f,d),l=e.cmov(l,s,h),f=e.cmov(f,d,h);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,a),{x:l,y:f}}}},7399:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(2623),i=r(9175),o=r(5304),s=r(4678),a=r(7939),c=r(1298),u=r(723),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),d=BigInt(2),p=(e,t)=>(e+t/d)/t;function g(e){const t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),c=BigInt(44),u=BigInt(88),f=e*e*e%t,h=f*f*e%t,p=(0,o.pow2)(h,r,t)*h%t,g=(0,o.pow2)(p,r,t)*h%t,b=(0,o.pow2)(g,d,t)*f%t,m=(0,o.pow2)(b,i,t)*b%t,w=(0,o.pow2)(m,s,t)*m%t,v=(0,o.pow2)(w,c,t)*w%t,E=(0,o.pow2)(v,u,t)*v%t,_=(0,o.pow2)(E,c,t)*w%t,x=(0,o.pow2)(_,r,t)*h%t,S=(0,o.pow2)(x,a,t)*m%t,A=(0,o.pow2)(S,n,t)*f%t,I=(0,o.pow2)(A,d,t);if(!y.eql(y.sqr(I),e))throw new Error("Cannot find square root");return I}const y=(0,o.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),c=p(s*e,t),u=p(-n*e,t);let l=(0,o.mod)(e-c*r-u*i,t),d=(0,o.mod)(-c*n-u*s,t);const g=l>a,y=d>a;if(g&&(l=t-l),y&&(d=t-d),l>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:y,k2:d}}}},n.sha256);const b=BigInt(0),m=e=>"bigint"==typeof e&&b<e&&e<l,w={};function v(e,...t){let r=w[e];if(void 0===r){const t=(0,n.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,a.concatBytes)(t,t),w[e]=r}return(0,n.sha256)((0,a.concatBytes)(r,...t))}const E=e=>e.toRawBytes(!0).slice(1),_=e=>(0,a.numberToBytesBE)(e,32),x=e=>(0,o.mod)(e,l),S=e=>(0,o.mod)(e,f),A=t.secp256k1.ProjectivePoint;function I(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=A.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:E(n)}}function B(e){if(!m(e))throw new Error("bad x: need 0 < x < p");const t=x(e*e);let r=g(x(t*e+BigInt(7)));r%d!==b&&(r=x(-r));const n=new A(e,r,h);return n.assertValidity(),n}function k(...e){return S((0,a.bytesToNumberBE)(v("BIP0340/challenge",...e)))}function T(e,t,r){const n=(0,a.ensureBytes)("signature",e,64),i=(0,a.ensureBytes)("message",t),o=(0,a.ensureBytes)("publicKey",r,32);try{const e=B((0,a.bytesToNumberBE)(o)),t=(0,a.bytesToNumberBE)(n.subarray(0,32));if(!m(t))return!1;const r=(0,a.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&b<l&&l<f))return!1;const h=k(_(t),E(e),i),d=(s=e,c=r,u=S(-h),A.BASE.multiplyAndAddUnsafe(s,c,u));return!(!d||!d.hasEvenY()||d.toAffine().x!==t)}catch(e){return!1}var s,c,u,l}t.schnorr={getPublicKey:function(e){return I(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){const n=(0,a.ensureBytes)("message",e),{bytes:o,scalar:s}=I(t),c=(0,a.ensureBytes)("auxRand",r,32),u=_(s^(0,a.bytesToNumberBE)(v("BIP0340/aux",c))),l=v("BIP0340/nonce",u,o,n),f=S((0,a.bytesToNumberBE)(l));if(f===b)throw new Error("sign failed: k is zero");const{bytes:h,scalar:d}=I(f),p=k(h,o,n),g=new Uint8Array(64);if(g.set(h,0),g.set(_(S(d+p*s)),32),!T(g,n,o))throw new Error("sign: Invalid signature produced");return g},verify:T,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:B,pointToBytes:E,numberToBytesBE:a.numberToBytesBE,bytesToNumberBE:a.bytesToNumberBE,taggedHash:v,mod:o.mod}};const R=(()=>(0,c.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),P=(()=>(0,s.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),C=(()=>(0,c.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=P(y.create(e[0]));return R(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=C.hashToCurve,t.encodeToCurve=C.encodeToCurve},9956:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(2955),i=r(7513);t.keccak224=(0,i.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,i.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,i.wrapHash)(n.keccak_384),t.keccak512=(0,i.wrapHash)(n.keccak_512)},3852:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(7399);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},7513:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const i=n(r(7557)),o=r(9175),s=i.default.bool;t.assertBool=s;const a=i.default.bytes;t.assertBytes=a;var c=r(9175);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,o.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>(i.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},6498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSingle=t.decode=t.encodePacked=t.encodeSingle=t.encode=void 0;const n=r(2049),i=r(5961),o=r(7700);t.encode=(e,t,r,n)=>{try{return(0,o.pack)({types:e,values:t,packed:r,tight:n})}catch(e){if(e instanceof i.ParserError)throw new i.ParserError(`Unable to encode value: ${e.message}`,e);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(e)}`,e)}},t.encodeSingle=(e,r)=>(0,t.encode)([e],[r]),t.encodePacked=(e,r,n)=>(0,t.encode)(e,r,!0,n),t.decode=(e,t)=>{const r=(0,n.createBytes)(t);try{return(0,o.unpack)(e,r)}catch(e){if(e instanceof i.ParserError)throw new i.ParserError(`Unable to decode value: ${e.message}`,e);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(e)}`,e)}},t.decodeSingle=(e,r)=>{const o=(0,t.decode)([e],r);return(0,n.assert)(1===o.length,new i.ParserError("Decoded value array has unexpected length.")),o[0]}},5961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserError=t.getErrorStack=t.getErrorMessage=void 0;const n=r(2049);t.getErrorMessage=e=>"string"==typeof e?e:e instanceof Error||(0,n.isObject)(e)&&(0,n.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:"Unknown error.",t.getErrorStack=e=>{if(e instanceof Error)return e.stack};class i extends Error{constructor(e,r){super(e),this.name="ParserError";const n=(0,t.getErrorStack)(r);n&&(this.stack=n)}}t.ParserError=i},3256:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(6498),t),i(r(5961),t),i(r(1126),t)},7924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterate=void 0;const n=r(2049);t.iterate=function*(e,t=32){for(let r=0;r<e.length;r+=t){const i=e=>{(0,n.assert)(e>=0,"Cannot skip a negative number of bytes."),(0,n.assert)(e%t==0,"Length must be a multiple of the size."),r+=e},o=e.subarray(r);yield{skip:i,value:o}}return{skip:()=>{},value:new Uint8Array}}},7700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unpack=t.pack=t.isDynamicParser=t.getParser=void 0;const n=r(2049),i=r(5961),o=r(7924),s=r(6207),a=r(8746);t.getParser=e=>{const t={address:s.address,array:s.array,bool:s.bool,bytes:s.bytes,fixedBytes:s.fixedBytes,function:s.fn,number:s.number,string:s.string,tuple:s.tuple},r=t[e];if(r)return r;const n=Object.values(t).find((t=>t.isType(e)));if(n)return n;throw new i.ParserError(`The type "${e}" is not supported.`)},t.isDynamicParser=(e,t)=>{const{isDynamic:r}=e;return"function"==typeof r?r(t):r},t.pack=({types:e,values:r,packed:o=!1,tight:s=!1,arrayPacked:c=!1,byteArray:u=new Uint8Array})=>{(0,n.assert)(e.length===r.length,new i.ParserError(`The number of types (${e.length}) does not match the number of values (${r.length}).`));const{staticBuffer:l,dynamicBuffer:f,pointers:h}=e.reduce((({staticBuffer:e,dynamicBuffer:i,pointers:a},u,l)=>{const f=(0,t.getParser)(u),h=r[l];return o||c||!(0,t.isDynamicParser)(f,u)?{staticBuffer:f.encode({buffer:e,value:h,type:u,packed:o,tight:s}),dynamicBuffer:i,pointers:a}:{staticBuffer:(0,n.concatBytes)([e,new Uint8Array(32)]),dynamicBuffer:f.encode({buffer:i,value:h,type:u,packed:o,tight:s}),pointers:[...a,{position:e.length,pointer:i.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,n.assert)(!o&&!c||0===f.length,new i.ParserError("Invalid pack state."));const d=l.length,p=h.reduce(((e,{pointer:t,position:r})=>{const i=(0,a.padStart)((0,n.numberToBytes)(d+t));return(0,a.set)(e,i,r)}),l);return(0,n.concatBytes)([u,p,f])},t.unpack=(e,r)=>{const s=(0,o.iterate)(r);return e.map((e=>{const{value:{value:o,skip:a},done:c}=s.next();(0,n.assert)(!c,new i.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${e}".`));const u=(0,t.getParser)(e);if((0,t.isDynamicParser)(u,e)){const t=(0,n.bytesToNumber)(o.subarray(0,32)),i=r.subarray(t);return u.decode({type:e,value:i,skip:a})}return u.decode({type:e,value:o,skip:a})}))}},1563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.address=t.getAddress=void 0;const n=r(2049),i=r(5961),o=r(8746);t.getAddress=e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(t.length<=20,new i.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${t.length} bytes.`)),(0,o.padStart)(t,20)},t.address={isDynamic:!1,isType:e=>"address"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:i}){const s=(0,t.getAddress)(r);if(i)return(0,n.concatBytes)([e,s]);const a=(0,o.padStart)(s);return(0,n.concatBytes)([e,a])},decode:({value:e})=>(0,n.add0x)((0,n.bytesToHex)(e.slice(12,32)))}},186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.array=t.getTupleType=t.getArrayType=t.isArrayType=void 0;const n=r(2049),i=r(5961),o=r(7700),s=r(8746),a=r(3415),c=r(717),u=/^(?<type>.*)\[(?<length>\d*?)\]$/u;t.isArrayType=e=>u.test(e),t.getArrayType=e=>{const t=e.match(u);return(0,n.assert)(t?.groups?.type,new i.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):void 0]},t.getTupleType=(e,t)=>`(${new Array(t).fill(e).join(",")})`,t.array={isDynamic(e){const[r,n]=(0,t.getArrayType)(e);return void 0===n||(0,o.isDynamicParser)((0,o.getParser)(r),r)},isType:e=>(0,t.isArrayType)(e),getByteLength(e){(0,n.assert)((0,t.isArrayType)(e),new i.ParserError(`Expected an array type, but received "${e}".`));const[r,s]=(0,t.getArrayType)(e);return(0,o.isDynamicParser)(this,e)||void 0===s?32:c.tuple.getByteLength((0,t.getTupleType)(r,s))},encode({type:e,buffer:r,value:u,packed:l,tight:f}){const[h,d]=(0,t.getArrayType)(e);if((0,n.assert)(!l||!(0,t.isArrayType)(h),new i.ParserError("Cannot pack nested arrays.")),l&&(0,o.isDynamicParser)((0,o.getParser)(h),h))return(0,o.pack)({types:new Array(u.length).fill(h),values:u,byteArray:r,packed:l,arrayPacked:!0,tight:f});if(d)return(0,n.assert)(d===u.length,new i.ParserError(`Array length does not match type length. Expected a length of ${d}, but received ${u.length}.`)),c.tuple.encode({type:(0,t.getTupleType)(h,d),buffer:r,value:u,packed:a.fixedBytes.isType(h)&&f,tight:f});if(l)return(0,o.pack)({types:new Array(u.length).fill(h),values:u,byteArray:r,packed:a.fixedBytes.isType(h)&&f,arrayPacked:!0,tight:f});const p=(0,s.padStart)((0,n.numberToBytes)(u.length));return(0,o.pack)({types:new Array(u.length).fill(h),values:u,byteArray:(0,n.concatBytes)([r,p]),packed:l,tight:f})},decode({type:e,value:r,...s}){const[a,u]=(0,t.getArrayType)(e);if(u){const e=c.tuple.decode({type:(0,t.getTupleType)(a,u),value:r,...s});return(0,n.assert)(e.length===u,new i.ParserError(`Array length does not match type length. Expected a length of ${u}, but received ${e.length}.`)),e}const l=(0,n.bytesToNumber)(r.subarray(0,32));return(0,o.unpack)(new Array(l).fill(a),r.subarray(32))}}},7435:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bool=t.getBooleanValue=void 0;const n=r(2049),i=r(2150),o=r(5961),s=r(6150),a=(0,i.coerce)((0,i.boolean)(),(0,i.union)([(0,i.literal)("true"),(0,i.literal)("false")]),(e=>"true"===e));t.getBooleanValue=e=>{try{return(0,i.create)(e,a)?BigInt(1):BigInt(0)}catch{throw new o.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${e}".`)}},t.bool={isDynamic:!1,isType:e=>"bool"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:i,tight:o}){const a=(0,t.getBooleanValue)(r);return i?(0,n.concatBytes)([e,(0,n.bigIntToBytes)(a)]):s.number.encode({type:"uint256",buffer:e,value:a,packed:i,tight:o})},decode:e=>s.number.decode({...e,type:"uint256"})===BigInt(1)}},9356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=void 0;const n=r(2049),i=r(8746);t.bytes={isDynamic:!0,isType:e=>"bytes"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:r}){const o=(0,n.createBytes)(t);if(r)return(0,n.concatBytes)([e,o]);const s=32*Math.ceil(o.byteLength/32);return(0,n.concatBytes)([e,(0,i.padStart)((0,n.numberToBytes)(o.byteLength)),(0,i.padEnd)(o,s)])},decode({value:e}){const t=e.subarray(0,32),r=(0,n.bytesToNumber)(t);return e.slice(32,32+r)}}},3415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fixedBytes=t.getByteLength=void 0;const n=r(2049),i=r(5961),o=r(8746),s=/^bytes([0-9]{1,2})$/u;t.getByteLength=e=>{const t=e.match(s)?.[1];(0,n.assert)(t,`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`);const r=Number(t);return(0,n.assert)(r>0&&r<=32,new i.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`)),r},t.fixedBytes={isDynamic:!1,isType:e=>s.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:s,packed:a}){const c=(0,t.getByteLength)(e),u=(0,n.createBytes)(s);return(0,n.assert)(u.length<=c,new i.ParserError(`Expected a value of length ${c}, but received a value of length ${u.length}.`)),a?(0,n.concatBytes)([r,(0,o.padEnd)(u,c)]):(0,n.concatBytes)([r,(0,o.padEnd)(u)])},decode({type:e,value:r}){const n=(0,t.getByteLength)(e);return r.slice(0,n)}}},7827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fn=t.getFunction=void 0;const n=r(2049),i=r(2150),o=r(5961),s=r(3415),a=(0,i.coerce)((0,i.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,i.union)([n.StrictHexStruct,(0,i.instance)(Uint8Array)]),(e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(24===t.length,new o.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${t.length} bytes.`)),{address:(0,n.bytesToHex)(t.subarray(0,20)),selector:(0,n.bytesToHex)(t.subarray(20,24))}}));t.getFunction=e=>{const t=(0,i.create)(e,a);return(0,n.concatBytes)([(0,n.hexToBytes)(t.address),(0,n.hexToBytes)(t.selector)])},t.fn={isDynamic:!1,isType:e=>"function"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:n,tight:i}){const o=(0,t.getFunction)(r);return s.fixedBytes.encode({type:"bytes24",buffer:e,value:o,packed:n,tight:i})},decode:({value:e})=>({address:(0,n.bytesToHex)(e.slice(0,20)),selector:(0,n.bytesToHex)(e.slice(20,24))})}},6207:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1563),t),i(r(186),t),i(r(7435),t),i(r(9356),t),i(r(3415),t),i(r(7827),t),i(r(6150),t),i(r(8160),t),i(r(8446),t),i(r(717),t)},6150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.number=t.getBigInt=t.assertNumberLength=t.getLength=t.isSigned=void 0;const n=r(2049),i=r(5961),o=r(8746),s=/^u?int(?<length>[0-9]*)?$/u;t.isSigned=e=>!e.startsWith("u"),t.getLength=e=>{if("int"===e||"uint"===e)return 256;const t=e.match(s);(0,n.assert)(t?.groups?.length,new i.ParserError(`Invalid number type. Expected a number type, but received "${e}".`));const r=parseInt(t.groups.length,10);return(0,n.assert)(r>=8&&r<=256,new i.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${e}".`)),(0,n.assert)(r%8==0,new i.ParserError(`Invalid number length. Expected a multiple of 8, but received "${e}".`)),r},t.assertNumberLength=(e,r)=>{const o=(0,t.getLength)(r),s=BigInt(2)**BigInt(o-((0,t.isSigned)(r)?1:0))-BigInt(1);(0,t.isSigned)(r)?(0,n.assert)(e>=-(s+BigInt(1))&&e<=s,new i.ParserError(`Number "${e}" is out of range for type "${r}".`)):(0,n.assert)(e<=s,new i.ParserError(`Number "${e}" is out of range for type "${r}".`))},t.getBigInt=e=>{try{return(0,n.createBigInt)(e)}catch{throw new i.ParserError(`Invalid number. Expected a valid number value, but received "${e}".`)}},t.number={isDynamic:!1,isType:e=>s.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:i,packed:s}){const a=(0,t.getBigInt)(i);if((0,t.assertNumberLength)(a,e),(0,t.isSigned)(e)){if(s){const i=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,n.signedBigIntToBytes)(a,i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.signedBigIntToBytes)(a,32))])}if(s){const i=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(a),i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(a))])},decode({type:e,value:r}){const i=r.subarray(0,32);if((0,t.isSigned)(e)){const r=(0,n.bytesToSignedBigInt)(i);return(0,t.assertNumberLength)(r,e),r}const o=(0,n.bytesToBigInt)(i);return(0,t.assertNumberLength)(o,e),o}}},8160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.string=void 0;const n=r(2049),i=r(9356);t.string={isDynamic:!0,isType:e=>"string"===e,getByteLength:()=>32,encode:({buffer:e,value:t,packed:r,tight:o})=>i.bytes.encode({type:"bytes",buffer:e,value:(0,n.stringToBytes)(t),packed:r,tight:o}),decode:e=>(0,n.bytesToString)(i.bytes.decode(e))}},717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tuple=t.getTupleElements=void 0;const n=r(2049),i=r(5961),o=r(7700),s=/^\((.+)\)$/u;t.getTupleElements=e=>{(0,n.assert)(e.startsWith("(")&&e.endsWith(")"),new i.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));const t=[];let r="",o=0;for(let n=1;n<e.length-1;n++){const i=e[n];","===i&&0===o?(t.push(r.trim()),r=""):(r+=i,"("===i?o+=1:")"===i&&(o-=1))}return r.trim()&&t.push(r.trim()),t},t.tuple={isDynamic:e=>(0,t.getTupleElements)(e).some((e=>{const t=(0,o.getParser)(e);return(0,o.isDynamicParser)(t,e)})),isType:e=>(e=>s.test(e))(e),getByteLength(e){return(0,o.isDynamicParser)(this,e)?32:(0,t.getTupleElements)(e).reduce(((e,t)=>e+(0,o.getParser)(t).getByteLength(t)),0)},encode({type:e,buffer:r,value:n,packed:i,tight:s}){const a=(0,t.getTupleElements)(e);return(0,o.pack)({types:a,values:n,byteArray:r,packed:i,tight:s})},decode({type:e,value:r,skip:n}){const i=(0,t.getTupleElements)(e);return n(this.getByteLength(e)-32),(0,o.unpack)(i,r)}}},5744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1126:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5744),t)},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padEnd=t.padStart=t.set=void 0;const n=r(2049);t.set=(e,t,r)=>(0,n.concatBytes)([e.subarray(0,r),t,e.subarray(r+t.length)]),t.padStart=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([r,e])},t.padEnd=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([e,r])}},8746:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9194),t)},8537:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=void 0;const s=o(r(8947)),a=o(r(6386)),c=r(4907);function u({publicKey:e,data:t,version:r}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing version parameter");if("x25519-xsalsa20-poly1305"===r){if("string"!=typeof t)throw new Error("Message data must be given as a string");const r=s.box.keyPair();let n;try{n=a.decodeBase64(e)}catch(e){throw new Error("Bad public key")}const i=a.decodeUTF8(t),o=s.randomBytes(s.box.nonceLength),c=s.box(i,o,n,r.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:a.encodeBase64(o),ephemPublicKey:a.encodeBase64(r.publicKey),ciphertext:a.encodeBase64(c)}}throw new Error("Encryption type/version not supported")}function l({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");if("x25519-xsalsa20-poly1305"===e.version){const r=f(t),n=s.box.keyPair.fromSecretKey(r).secretKey,i=a.decodeBase64(e.nonce),o=a.decodeBase64(e.ciphertext),c=a.decodeBase64(e.ephemPublicKey),u=s.box.open(o,i,c,n);try{if(!u)throw new Error;const e=a.encodeUTF8(u);if(!e)throw new Error;return e}catch(e){if(e&&"string"==typeof e.message&&e.message.length)throw new Error(`Decryption failed: ${e.message}`);throw new Error("Decryption failed.")}}throw new Error("Encryption type/version not supported.")}function f(e){const t=Buffer.from(e,"hex").toString("base64");return a.decodeBase64(t)}t.encrypt=u,t.encryptSafely=function({publicKey:e,data:t,version:r}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing version parameter");if("object"==typeof t&&t&&"toJSON"in t)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const n={data:t,padding:""},i=Buffer.byteLength(JSON.stringify(n),"utf-8")%2048;let o=0;return i>0&&(o=2048-i-16),n.padding="0".repeat(o),u({publicKey:e,data:JSON.stringify(n),version:r})},t.decrypt=l,t.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");return JSON.parse(l({encryptedData:e,privateKey:t})).data},t.getEncryptionPublicKey=function(e){const t=f(e),r=s.box.keyPair.fromSecretKey(t).publicKey;return a.encodeBase64(r)}},1594:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.concatSig=void 0,i(r(252),t),i(r(169),t),i(r(8537),t);var o=r(4907);Object.defineProperty(t,"concatSig",{enumerable:!0,get:function(){return o.concatSig}}),Object.defineProperty(t,"normalize",{enumerable:!0,get:function(){return o.normalize}})},252:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=void 0;const n=r(8683),i=r(4907);function o(e,t){const r=(0,n.hashPersonalMessage)((0,i.legacyToBuffer)(e));return(0,i.recoverPublicKey)(r,t)}t.personalSign=function({privateKey:e,data:t}){if((0,i.isNullish)(t))throw new Error("Missing data parameter");if((0,i.isNullish)(e))throw new Error("Missing privateKey parameter");const r=(0,i.legacyToBuffer)(t),o=(0,n.hashPersonalMessage)(r),s=(0,n.ecsign)(o,e);return(0,i.concatSig)((0,n.toBuffer)(s.v),s.r,s.s)},t.recoverPersonalSignature=function({data:e,signature:t}){if((0,i.isNullish)(e))throw new Error("Missing data parameter");if((0,i.isNullish)(t))throw new Error("Missing signature parameter");const r=o(e,t),s=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(s)},t.extractPublicKey=function({data:e,signature:t}){if((0,i.isNullish)(e))throw new Error("Missing data parameter");if((0,i.isNullish)(t))throw new Error("Missing signature parameter");return`0x${o(e,t).toString("hex")}`}},169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature=t.signTypedData=t.typedSignatureHash=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=t.SignTypedDataVersion=void 0;const n=r(8683),i=r(3256),o=r(6207),s=r(8746),a=r(2049),c=r(199),u=r(4907);var l;function f(e,t){if(!Object.keys(l).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function h(e,t){(0,a.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);const r=BigInt(t),n=(0,o.getLength)(e),i=BigInt(2)**BigInt(n)-BigInt(1);return(0,a.assert)(r>=-i&&r<=i,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),r}function d(e){let t=BigInt(0);for(let r=0;r<e.length;r++){const n=BigInt(e.charCodeAt(r)-48);t*=BigInt(10),t+=n>=49?n-BigInt(49)+BigInt(10):n>=17?n-BigInt(17)+BigInt(10):n}return(0,s.padStart)((0,a.bigIntToBytes)(t),20)}function p(e,t,r,o,u){if(f(u,[l.V3,l.V4]),void 0!==e[r])return["bytes32",u===l.V4&&null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,n.arrToBufArr)((0,c.keccak256)(g(r,o,e,u)))];if("function"===r)throw new Error('Unsupported or invalid type: "function"');if(void 0===o)throw new Error(`missing value for field ${t} of type ${r}`);if("address"===r){if("number"==typeof o)return["address",(0,s.padStart)((0,a.numberToBytes)(o),20)];if((0,a.isStrictHexString)(o))return["address",(0,a.add0x)(o)];if("string"==typeof o)return["address",d(o).subarray(0,20)]}if("bool"===r)return["bool",Boolean(o)];if("bytes"===r)return"number"==typeof o?o=(0,a.numberToBytes)(o):(0,a.isStrictHexString)(o)||"0x"===o?o=(0,a.hexToBytes)(o):"string"==typeof o&&(o=(0,a.stringToBytes)(o)),["bytes32",(0,n.arrToBufArr)((0,c.keccak256)(o))];if(r.startsWith("bytes")&&"bytes"!==r&&!r.includes("["))return"number"==typeof o?o<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,a.bigIntToBytes)(BigInt(o))]:(0,a.isStrictHexString)(o)?["bytes32",(0,a.hexToBytes)(o)]:["bytes32",o];if(r.startsWith("int")&&!r.includes("[")){const e=h(r,o);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===r)return o="number"==typeof o?(0,a.numberToBytes)(o):(0,a.stringToBytes)(null!=o?o:""),["bytes32",(0,n.arrToBufArr)((0,c.keccak256)(o))];if(r.endsWith("]")){if(u===l.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const s=r.slice(0,r.lastIndexOf("[")),a=o.map((r=>p(e,t,s,r,u)));return["bytes32",(0,n.arrToBufArr)((0,c.keccak256)((0,i.encode)(a.map((([e])=>e)),a.map((([,e])=>e)))))]}return[r,o]}function g(e,t,r,o){f(o,[l.V3,l.V4]);const s=["bytes32"],a=[w(e,r)];for(const n of r[e]){if(o===l.V3&&void 0===t[n.name])continue;const[e,i]=p(r,n.name,n.type,t[n.name],o);s.push(e),a.push(i)}return(0,n.arrToBufArr)((0,i.encode)(s,a))}function y(e,t){let r="";const n=b(e,t);n.delete(e);const i=[e,...Array.from(n).sort()];for(const e of i){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return r}function b(e,t,r=new Set){if("string"!=typeof e)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);const n=e.match(/^\w*/u);if([e]=n,r.has(e)||void 0===t[e])return r;r.add(e);for(const n of t[e])b(n.type,t,r);return r}function m(e,t,r,i){f(i,[l.V3,l.V4]);const o=g(e,t,r,i),s=(0,c.keccak256)(o);return(0,n.arrToBufArr)(s)}function w(e,t){const r=(0,a.stringToBytes)(y(e,t));return(0,n.arrToBufArr)((0,c.keccak256)(r))}function v(e){const r={};for(const n in t.TYPED_MESSAGE_SCHEMA.properties)e[n]&&(r[n]=e[n]);return"types"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function E(e,t){f(t,[l.V3,l.V4]);const r=v(e),{domain:n}=r;return m("EIP712Domain",n,{EIP712Domain:r.types.EIP712Domain},t)}function _(e,t){if((0,o.isArrayType)(e)&&Array.isArray(t)){const[r]=(0,o.getArrayType)(e);return t.map((e=>_(r,e)))}if("address"===e){if("number"==typeof t)return(0,s.padStart)((0,a.numberToBytes)(t),20);if((0,a.isStrictHexString)(t))return(0,s.padStart)((0,a.hexToBytes)(t).subarray(0,20),20);if(t instanceof Uint8Array)return(0,s.padStart)(t.subarray(0,20),20)}if("bool"===e)return Boolean(t);if(e.startsWith("bytes")&&"bytes"!==e){const r=(0,o.getByteLength)(e);if("number"==typeof t)return t<0?new Uint8Array:(0,a.numberToBytes)(t).subarray(0,r);if((0,a.isStrictHexString)(t))return(0,a.hexToBytes)(t).subarray(0,r);if(t instanceof Uint8Array)return t.subarray(0,r)}if(e.startsWith("uint")&&"number"==typeof t)return Math.abs(t);if(e.startsWith("int")&&"number"==typeof t){const r=(0,o.getLength)(e);return BigInt.asIntN(r,BigInt(t))}return t}function x(e,t){return t.map((t=>{if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){const r=h(e,t);if(r>=BigInt(0))return(0,s.padStart)((0,a.bigIntToBytes)(r),32);const n=(0,o.getLength)(e),i=BigInt.asIntN(n,r);return(0,a.signedBigIntToBytes)(i,32)}return t}))}function S(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const r=e.map((({name:e,type:t,value:r})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:(n=r,n.map((e=>"number"==typeof e?(0,s.padStart)((0,a.numberToBytes)(e),32):(0,a.isStrictHexString)(e)?(0,s.padStart)((0,a.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,s.padStart)(e.subarray(0,32),32):e)))};var n;if(t.startsWith("int")&&(0,o.isArrayType)(t)){const[n,i]=(0,o.getArrayType)(t);return{name:e,type:`bytes32[${null!=i?i:""}]`,value:x(n,r)}}return{name:e,type:t,value:_(t,r)}})),l=r.map((e=>"bytes"!==e.type?e.value:(0,u.legacyToBuffer)(e.value))),f=r.map((e=>{if("function"===e.type)throw new Error('Unsupported or invalid type: "function"');return e.type})),h=e.map((e=>{if(!e.name)throw t;return`${e.type} ${e.name}`}));return(0,n.arrToBufArr)((0,c.keccak256)((0,i.encodePacked)(["bytes32","bytes32"],[(0,c.keccak256)((0,i.encodePacked)(["string[]"],[h],!0)),(0,c.keccak256)((0,i.encodePacked)(f,l,!0))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(l=t.SignTypedDataVersion||(t.SignTypedDataVersion={})),t.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},t.TypedDataUtils={encodeData:g,encodeType:y,findTypeDependencies:b,hashStruct:m,hashType:w,sanitizeData:v,eip712Hash:function(e,t){f(t,[l.V3,l.V4]);const r=v(e),i=[(0,a.hexToBytes)("1901")];return i.push(E(e,t)),"EIP712Domain"!==r.primaryType&&i.push(m(r.primaryType,r.message,r.types,t)),(0,n.arrToBufArr)((0,c.keccak256)((0,a.concatBytes)(i)))},eip712DomainHash:E},t.typedSignatureHash=function(e){const t=S(e);return(0,a.bytesToHex)(t)},t.signTypedData=function({privateKey:e,data:r,version:i}){if(f(i),(0,u.isNullish)(r))throw new Error("Missing data parameter");if((0,u.isNullish)(e))throw new Error("Missing private key parameter");const o=i===l.V1?S(r):t.TypedDataUtils.eip712Hash(r,i),s=(0,n.ecsign)(o,e);return(0,u.concatSig)((0,n.arrToBufArr)((0,a.bigIntToBytes)(s.v)),s.r,s.s)},t.recoverTypedSignature=function({data:e,signature:r,version:i}){if(f(i),(0,u.isNullish)(e))throw new Error("Missing data parameter");if((0,u.isNullish)(r))throw new Error("Missing signature parameter");const o=i===l.V1?S(e):t.TypedDataUtils.eip712Hash(e,i),s=(0,u.recoverPublicKey)(o,r),c=(0,n.publicToAddress)(s);return(0,a.bytesToHex)(c)}},4907:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.recoverPublicKey=t.concatSig=t.legacyToBuffer=t.isNullish=t.padWithZeroes=void 0;const n=r(8683),i=r(2049);function o(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}function s(e){return null==e}t.padWithZeroes=o,t.isNullish=s,t.legacyToBuffer=function(e){return"string"!=typeof e||(0,n.isHexString)(e)?(0,n.toBuffer)(e):Buffer.from(e)},t.concatSig=function(e,t,r){const s=(0,n.fromSigned)(t),a=(0,n.fromSigned)(r),c=(0,n.bufferToInt)(e),u=o((0,n.toUnsigned)(s).toString("hex"),64),l=o((0,n.toUnsigned)(a).toString("hex"),64),f=(0,i.remove0x)((0,i.numberToHex)(c));return(0,i.add0x)(u.concat(l,f))},t.recoverPublicKey=function(e,t){const r=(0,n.fromRpcSig)(t);return(0,n.ecrecover)(e,r.v,r.r,r.s)},t.normalize=function(e){if(!s(e)){if("number"==typeof e){if(e<0)return"0x";const t=(0,i.numberToBytes)(e);e=(0,i.bytesToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return(0,i.add0x)(e.toLowerCase())}}},199:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(2955),i=r(8492);t.keccak224=(0,i.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,i.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,i.wrapHash)(n.keccak_384),t.keccak512=(0,i.wrapHash)(n.keccak_512)},8492:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const i=n(r(7557)),o=r(9175),s=i.default.bool;t.assertBool=s;const a=i.default.bytes;t.assertBytes=a;var c=r(9175);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,o.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>(i.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},1275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=((n=r(7833))&&n.__esModule?n:{default:n}).default.call(void 0,"metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},5244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};t.__privateGet=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),t.__privateAdd=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},t.__privateSet=(e,t,n,i)=>(r(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n)},3631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),i=r(9589),o=r(2150),s=o.refine.call(void 0,o.string.call(void 0),"Version",(e=>null!==i.valid.call(void 0,e)||`Expected SemVer version, got "${e}"`)),a=o.refine.call(void 0,o.string.call(void 0),"Version range",(e=>null!==i.validRange.call(void 0,e)||`Expected SemVer range, got "${e}"`));t.VersionStruct=s,t.VersionRangeStruct=a,t.isValidSemVerVersion=function(e){return o.is.call(void 0,e,s)},t.isValidSemVerRange=function(e){return o.is.call(void 0,e,a)},t.assertIsSemVerVersion=function(e){n.assertStruct.call(void 0,e,s)},t.assertIsSemVerRange=function(e){n.assertStruct.call(void 0,e,a)},t.gtVersion=function(e,t){return i.gt.call(void 0,e,t)},t.gtRange=function(e,t){return i.gtr.call(void 0,e,t)},t.satisfiesVersionRange=function(e,t){return i.satisfies.call(void 0,e,t,{includePrerelease:!0})}},9116:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e=>(e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year",e))(r||{}),n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.Duration=r,t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},7982:()=>{},1848:(e,t,r)=>{"use strict";function n(e,t){return null!=e?e:t()}Object.defineProperty(t,"__esModule",{value:!0});var i=r(932),o=r(2150);t.base64=(e,t={})=>{const r=n(t.paddingRequired,(()=>!1)),s=n(t.characterSet,(()=>"base64"));let a,c;return"base64"===s?a=String.raw`[A-Za-z0-9+\/]`:(i.assert.call(void 0,"base64url"===s),a=String.raw`[-_A-Za-z0-9]`),c=r?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),o.pattern.call(void 0,e,c)}},932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1486),i=r(2150);function o(e,t){return Boolean("string"==typeof function(e){let t,r=e[0],n=1;for(;n<e.length;){const i=e[n],o=e[n+1];if(n+=2,("optionalAccess"===i||"optionalCall"===i)&&null==r)return;"access"===i||"optionalAccess"===i?(t=r,r=o(r)):"call"!==i&&"optionalCall"!==i||(r=o(((...e)=>r.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.prototype,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name]))?new e({message:t}):e({message:t})}var s=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};t.AssertionError=s,t.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw o(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",a=s){try{i.assert.call(void 0,e,t)}catch(e){throw o(a,`${r}: ${function(e){return n.getErrorMessage.call(void 0,e).replace(/\.$/u,"")}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},9705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}},1203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5363),i=r(932),o=r(2150),s=o.union.call(void 0,[o.number.call(void 0),o.bigint.call(void 0),o.string.call(void 0),n.StrictHexStruct]),a=o.coerce.call(void 0,o.number.call(void 0),s,Number),c=o.coerce.call(void 0,o.bigint.call(void 0),s,BigInt),u=(o.union.call(void 0,[n.StrictHexStruct,o.instance.call(void 0,Uint8Array)]),o.coerce.call(void 0,o.instance.call(void 0,Uint8Array),o.union.call(void 0,[n.StrictHexStruct]),n.hexToBytes)),l=o.coerce.call(void 0,n.StrictHexStruct,o.instance.call(void 0,Uint8Array),n.bytesToHex);t.createNumber=function(e){try{const t=o.create.call(void 0,e,a);return i.assert.call(void 0,Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof o.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return o.create.call(void 0,e,c)}catch(e){if(e instanceof o.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return o.create.call(void 0,e,u)}catch(e){if(e instanceof o.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return o.create.call(void 0,e,l)}catch(e){if(e instanceof o.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},1508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1848),i=r(2150),o=i.size.call(void 0,n.base64.call(void 0,i.string.call(void 0),{paddingRequired:!0}),44,44);t.ChecksumStruct=o},1423:()=>{},1486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6526),i=r(1843);function o(e){return"object"==typeof e&&null!==e&&"code"in e}function s(e){return"object"==typeof e&&null!==e&&"message"in e}t.isErrorWithCode=o,t.isErrorWithMessage=s,t.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},t.getErrorMessage=function(e){return s(e)&&"string"==typeof e.message?e.message:n.isNullOrUndefined.call(void 0,e)?"":String(e)},t.wrapError=function(e,t){if((r=e)instanceof Error||n.isObject.call(void 0,r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new(0,i.ErrorWithCause)(t,{cause:e}),o(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},8383:()=>{},7427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),i=r(6526),o=r(2150),s=e=>o.object.call(void 0,e);function a({path:e,branch:t}){const r=e[e.length-1];return i.hasProperty.call(void 0,t[t.length-2],r)}function c(e){return new(0,o.Struct)({...e,type:`optional ${e.type}`,validator:(t,r)=>!a(r)||e.validator(t,r),refiner:(t,r)=>!a(r)||e.refiner(t,r)})}var u=o.union.call(void 0,[o.literal.call(void 0,null),o.boolean.call(void 0),o.define.call(void 0,"finite number",(e=>o.is.call(void 0,e,o.number.call(void 0))&&Number.isFinite(e))),o.string.call(void 0),o.array.call(void 0,o.lazy.call(void 0,(()=>u))),o.record.call(void 0,o.string.call(void 0),o.lazy.call(void 0,(()=>u)))]),l=o.coerce.call(void 0,u,o.any.call(void 0),(e=>(n.assertStruct.call(void 0,e,u),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))));function f(e){return o.create.call(void 0,e,l)}var h=o.literal.call(void 0,"2.0"),d=o.nullable.call(void 0,o.union.call(void 0,[o.number.call(void 0),o.string.call(void 0)])),p=s({code:o.integer.call(void 0),message:o.string.call(void 0),data:c(l),stack:c(o.string.call(void 0))}),g=o.union.call(void 0,[o.record.call(void 0,o.string.call(void 0),l),o.array.call(void 0,l)]),y=s({id:d,jsonrpc:h,method:o.string.call(void 0),params:c(g)}),b=s({jsonrpc:h,method:o.string.call(void 0),params:c(g)}),m=o.object.call(void 0,{id:d,jsonrpc:h,result:o.optional.call(void 0,o.unknown.call(void 0)),error:o.optional.call(void 0,p)}),w=s({id:d,jsonrpc:h,result:l}),v=s({id:d,jsonrpc:h,error:p}),E=o.union.call(void 0,[w,v]);t.object=s,t.exactOptional=c,t.UnsafeJsonStruct=u,t.JsonStruct=l,t.isValidJson=function(e){try{return f(e),!0}catch(e){return!1}},t.getSafeJson=f,t.getJsonSize=function(e){n.assertStruct.call(void 0,e,l,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=h,t.JsonRpcIdStruct=d,t.JsonRpcErrorStruct=p,t.JsonRpcParamsStruct=g,t.JsonRpcRequestStruct=y,t.JsonRpcNotificationStruct=b,t.isJsonRpcNotification=function(e){return o.is.call(void 0,e,b)},t.assertIsJsonRpcNotification=function(e,t){n.assertStruct.call(void 0,e,b,"Invalid JSON-RPC notification",t)},t.isJsonRpcRequest=function(e){return o.is.call(void 0,e,y)},t.assertIsJsonRpcRequest=function(e,t){n.assertStruct.call(void 0,e,y,"Invalid JSON-RPC request",t)},t.PendingJsonRpcResponseStruct=m,t.JsonRpcSuccessStruct=w,t.JsonRpcFailureStruct=v,t.JsonRpcResponseStruct=E,t.isPendingJsonRpcResponse=function(e){return o.is.call(void 0,e,m)},t.assertIsPendingJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,m,"Invalid pending JSON-RPC response",t)},t.isJsonRpcResponse=function(e){return o.is.call(void 0,e,E)},t.assertIsJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,E,"Invalid JSON-RPC response",t)},t.isJsonRpcSuccess=function(e){return o.is.call(void 0,e,w)},t.assertIsJsonRpcSuccess=function(e,t){n.assertStruct.call(void 0,e,w,"Invalid JSON-RPC success response",t)},t.isJsonRpcFailure=function(e){return o.is.call(void 0,e,v)},t.assertIsJsonRpcFailure=function(e,t){n.assertStruct.call(void 0,e,v,"Invalid JSON-RPC failure response",t)},t.isJsonRpcError=function(e){return o.is.call(void 0,e,p)},t.assertIsJsonRpcError=function(e,t){n.assertStruct.call(void 0,e,p,"Invalid JSON-RPC error",t)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},5363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),i=r(2214),o=r(2150),s=r(3203),a=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function u(e){n.assert.call(void 0,c(e),"Value must be a Uint8Array.")}function l(e){if(u(e),0===e.length)return"0x";const t=a(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return I(r.join(""))}function f(e){u(e);const t=l(e);return BigInt(t)}function h(e){if("0x"===function(e){let t,r=e[0],n=1;for(;n<e.length;){const i=e[n],o=e[n+1];if(n+=2,("optionalAccess"===i||"optionalCall"===i)&&null==r)return;"access"===i||"optionalAccess"===i?(t=r,r=o(r)):"call"!==i&&"optionalCall"!==i||(r=o(((...e)=>r.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.toLowerCase,"optionalCall",e=>e()]))return new Uint8Array;x(e);const t=B(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),i=r.charCodeAt(2*e+1),o=t-(t<58?48:87),s=i-(i<58?48:87);n[e]=16*o+s}return n}function d(e){return n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,e>=BigInt(0),"Value must be a non-negative bigint."),h(e.toString(16))}function p(e){return n.assert.call(void 0,"number"==typeof e,"Value must be a number."),n.assert.call(void 0,e>=0,"Value must be a non-negative number."),n.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),h(e.toString(16))}function g(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return d(e);if("number"==typeof e)return p(e);if("string"==typeof e)return e.startsWith("0x")?h(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}var b=o.pattern.call(void 0,o.string.call(void 0),/^(?:0x)?[0-9a-f]+$/iu),m=o.pattern.call(void 0,o.string.call(void 0),/^0x[0-9a-f]+$/iu),w=o.pattern.call(void 0,o.string.call(void 0),/^0x[0-9a-f]{40}$/u),v=o.pattern.call(void 0,o.string.call(void 0),/^0x[0-9a-fA-F]{40}$/u);function E(e){return o.is.call(void 0,e,b)}function _(e){return o.is.call(void 0,e,m)}function x(e){n.assert.call(void 0,E(e),"Value must be a hexadecimal string.")}function S(e){n.assert.call(void 0,o.is.call(void 0,e,v),"Invalid hex address.");const t=B(e.toLowerCase()),r=B(l(i.keccak_256.call(void 0,t)));return`0x${t.split("").map(((e,t)=>{const i=r[t];return n.assert.call(void 0,o.is.call(void 0,i,o.string.call(void 0)),"Hash shorter than address."),parseInt(i,16)>7?e.toUpperCase():e})).join("")}`}function A(e){return!!o.is.call(void 0,e,v)&&S(e)===e}function I(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function B(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}t.HexStruct=b,t.StrictHexStruct=m,t.HexAddressStruct=w,t.HexChecksumAddressStruct=v,t.isHexString=E,t.isStrictHexString=_,t.assertIsHexString=x,t.assertIsStrictHexString=function(e){n.assert.call(void 0,_(e),'Value must be a hexadecimal string, starting with "0x".')},t.isValidHexAddress=function(e){return o.is.call(void 0,e,w)||A(e)},t.getChecksumAddress=S,t.isValidChecksumAddress=A,t.add0x=I,t.remove0x=B,t.isBytes=c,t.assertIsBytes=u,t.bytesToHex=l,t.bytesToBigInt=f,t.bytesToSignedBigInt=function(e){u(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){u(e);const t=f(e);return n.assert.call(void 0,t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return u(e),(new TextDecoder).decode(e)},t.bytesToBase64=function(e){return u(e),s.base64.encode(e)},t.hexToBytes=h,t.bigIntToBytes=d,t.signedBigIntToBytes=function(e,t){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,"number"==typeof t,"Byte length must be a number."),n.assert.call(void 0,t>0,"Byte length must be greater than 0."),n.assert.call(void 0,function(e,t){n.assert.call(void 0,t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const i=new Uint8Array(t);for(let e=0;e<i.length;e++)i[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return i.reverse()},t.numberToBytes=p,t.stringToBytes=g,t.base64ToBytes=function(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),s.base64.decode(e)},t.valueToBytes=y,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const i=y(e[n]);t[n]=i,r+=i.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},t.createDataView=function(e){if("undefined"!=typeof Buffer&&e instanceof Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}},6526:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e=>(e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date",e))(r||{}),n=/"|\\|\n|\r|\t/gu;function i(e){return e.charCodeAt(0)<=127}t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),t.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},t.JsonSize=r,t.ESCAPE_CHARACTERS_REGEXP=n,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=i,t.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>i(t)?e+1:e+2),0)+(t=e.match(n),()=>[],null!=t?t:[]).length;var t},t.calculateNumberSize=function(e){return e.toString().length}},1305:()=>{},3207:()=>{},1535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5363),i=r(932);t.numberToHex=e=>(i.assert.call(void 0,"number"==typeof e,"Value must be a number."),i.assert.call(void 0,e>=0,"Value must be a non-negative number."),i.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),n.add0x.call(void 0,e.toString(16))),t.bigIntToHex=e=>(i.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),i.assert.call(void 0,e>=0,"Value must be a non-negative bigint."),n.add0x.call(void 0,e.toString(16))),t.hexToNumber=e=>{n.assertIsHexString.call(void 0,e);const t=parseInt(e,16);return i.assert.call(void 0,Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>(n.assertIsHexString.call(void 0,e),BigInt(n.add0x.call(void 0,e)))},2489:(e,t,r)=>{"use strict";function n(e){let t,r=e[0],n=1;for(;n<e.length;){const i=e[n],o=e[n+1];if(n+=2,("optionalAccess"===i||"optionalCall"===i)&&null==r)return;"access"===i||"optionalAccess"===i?(t=r,r=o(r)):"call"!==i&&"optionalCall"!==i||(r=o(((...e)=>r.call(t,...e))),t=void 0)}return r}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2150),o=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,s=/^[-a-z0-9]{3,8}$/u,a=/^[-_a-zA-Z0-9]{1,32}$/u,c=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,u=/^[-.%a-zA-Z0-9]{1,128}$/u,l=i.pattern.call(void 0,i.string.call(void 0),o),f=i.pattern.call(void 0,i.string.call(void 0),s),h=i.pattern.call(void 0,i.string.call(void 0),a),d=i.pattern.call(void 0,i.string.call(void 0),c),p=i.pattern.call(void 0,i.string.call(void 0),u),g=(e=>(e.Eip155="eip155",e))(g||{});function y(e){return i.is.call(void 0,e,f)}function b(e){return i.is.call(void 0,e,h)}t.CAIP_CHAIN_ID_REGEX=o,t.CAIP_NAMESPACE_REGEX=s,t.CAIP_REFERENCE_REGEX=a,t.CAIP_ACCOUNT_ID_REGEX=c,t.CAIP_ACCOUNT_ADDRESS_REGEX=u,t.CaipChainIdStruct=l,t.CaipNamespaceStruct=f,t.CaipReferenceStruct=h,t.CaipAccountIdStruct=d,t.CaipAccountAddressStruct=p,t.KnownCaipNamespace=g,t.isCaipChainId=function(e){return i.is.call(void 0,e,l)},t.isCaipNamespace=y,t.isCaipReference=b,t.isCaipAccountId=function(e){return i.is.call(void 0,e,d)},t.isCaipAccountAddress=function(e){return i.is.call(void 0,e,p)},t.parseCaipChainId=function(e){const t=o.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},t.parseCaipAccountId=function(e){const t=c.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},t.toCaipChainId=function(e,t){if(!y(e))throw new Error(`Invalid "namespace", must match: ${s.toString()}`);if(!b(t))throw new Error(`Invalid "reference", must match: ${a.toString()}`);return`${e}:${t}`}},1584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i,o=r(5244),s=class{constructor(e){o.__privateAdd.call(void 0,this,n,void 0),o.__privateSet.call(void 0,this,n,new Map(e)),Object.freeze(this)}get size(){return o.__privateGet.call(void 0,this,n).size}[Symbol.iterator](){return o.__privateGet.call(void 0,this,n)[Symbol.iterator]()}entries(){return o.__privateGet.call(void 0,this,n).entries()}forEach(e,t){return o.__privateGet.call(void 0,this,n).forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return o.__privateGet.call(void 0,this,n).get(e)}has(e){return o.__privateGet.call(void 0,this,n).has(e)}keys(){return o.__privateGet.call(void 0,this,n).keys()}values(){return o.__privateGet.call(void 0,this,n).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}};n=new WeakMap;var a=class{constructor(e){o.__privateAdd.call(void 0,this,i,void 0),o.__privateSet.call(void 0,this,i,new Set(e)),Object.freeze(this)}get size(){return o.__privateGet.call(void 0,this,i).size}[Symbol.iterator](){return o.__privateGet.call(void 0,this,i)[Symbol.iterator]()}entries(){return o.__privateGet.call(void 0,this,i).entries()}forEach(e,t){return o.__privateGet.call(void 0,this,i).forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return o.__privateGet.call(void 0,this,i).has(e)}keys(){return o.__privateGet.call(void 0,this,i).keys()}values(){return o.__privateGet.call(void 0,this,i).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}};i=new WeakMap,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype),t.FrozenMap=s,t.FrozenSet=a},2049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(7982);var n=r(1535);r(8383);var i=r(9705),o=r(9116);r(3207);var s=r(3631),a=r(7427);r(1305);var c=r(1275),u=r(2489),l=r(1508),f=r(1848),h=r(1203),d=r(5363),p=r(932),g=r(1486),y=r(6526),b=r(1584);r(5244),r(1423),t.AssertionError=p.AssertionError,t.CAIP_ACCOUNT_ADDRESS_REGEX=u.CAIP_ACCOUNT_ADDRESS_REGEX,t.CAIP_ACCOUNT_ID_REGEX=u.CAIP_ACCOUNT_ID_REGEX,t.CAIP_CHAIN_ID_REGEX=u.CAIP_CHAIN_ID_REGEX,t.CAIP_NAMESPACE_REGEX=u.CAIP_NAMESPACE_REGEX,t.CAIP_REFERENCE_REGEX=u.CAIP_REFERENCE_REGEX,t.CaipAccountAddressStruct=u.CaipAccountAddressStruct,t.CaipAccountIdStruct=u.CaipAccountIdStruct,t.CaipChainIdStruct=u.CaipChainIdStruct,t.CaipNamespaceStruct=u.CaipNamespaceStruct,t.CaipReferenceStruct=u.CaipReferenceStruct,t.ChecksumStruct=l.ChecksumStruct,t.Duration=o.Duration,t.ESCAPE_CHARACTERS_REGEXP=y.ESCAPE_CHARACTERS_REGEXP,t.FrozenMap=b.FrozenMap,t.FrozenSet=b.FrozenSet,t.HexAddressStruct=d.HexAddressStruct,t.HexChecksumAddressStruct=d.HexChecksumAddressStruct,t.HexStruct=d.HexStruct,t.JsonRpcErrorStruct=a.JsonRpcErrorStruct,t.JsonRpcFailureStruct=a.JsonRpcFailureStruct,t.JsonRpcIdStruct=a.JsonRpcIdStruct,t.JsonRpcNotificationStruct=a.JsonRpcNotificationStruct,t.JsonRpcParamsStruct=a.JsonRpcParamsStruct,t.JsonRpcRequestStruct=a.JsonRpcRequestStruct,t.JsonRpcResponseStruct=a.JsonRpcResponseStruct,t.JsonRpcSuccessStruct=a.JsonRpcSuccessStruct,t.JsonRpcVersionStruct=a.JsonRpcVersionStruct,t.JsonSize=y.JsonSize,t.JsonStruct=a.JsonStruct,t.KnownCaipNamespace=u.KnownCaipNamespace,t.PendingJsonRpcResponseStruct=a.PendingJsonRpcResponseStruct,t.StrictHexStruct=d.StrictHexStruct,t.UnsafeJsonStruct=a.UnsafeJsonStruct,t.VersionRangeStruct=s.VersionRangeStruct,t.VersionStruct=s.VersionStruct,t.add0x=d.add0x,t.assert=p.assert,t.assertExhaustive=p.assertExhaustive,t.assertIsBytes=d.assertIsBytes,t.assertIsHexString=d.assertIsHexString,t.assertIsJsonRpcError=a.assertIsJsonRpcError,t.assertIsJsonRpcFailure=a.assertIsJsonRpcFailure,t.assertIsJsonRpcNotification=a.assertIsJsonRpcNotification,t.assertIsJsonRpcRequest=a.assertIsJsonRpcRequest,t.assertIsJsonRpcResponse=a.assertIsJsonRpcResponse,t.assertIsJsonRpcSuccess=a.assertIsJsonRpcSuccess,t.assertIsPendingJsonRpcResponse=a.assertIsPendingJsonRpcResponse,t.assertIsSemVerRange=s.assertIsSemVerRange,t.assertIsSemVerVersion=s.assertIsSemVerVersion,t.assertIsStrictHexString=d.assertIsStrictHexString,t.assertStruct=p.assertStruct,t.base64=f.base64,t.base64ToBytes=d.base64ToBytes,t.bigIntToBytes=d.bigIntToBytes,t.bigIntToHex=n.bigIntToHex,t.bytesToBase64=d.bytesToBase64,t.bytesToBigInt=d.bytesToBigInt,t.bytesToHex=d.bytesToHex,t.bytesToNumber=d.bytesToNumber,t.bytesToSignedBigInt=d.bytesToSignedBigInt,t.bytesToString=d.bytesToString,t.calculateNumberSize=y.calculateNumberSize,t.calculateStringSize=y.calculateStringSize,t.concatBytes=d.concatBytes,t.createBigInt=h.createBigInt,t.createBytes=h.createBytes,t.createDataView=d.createDataView,t.createDeferredPromise=i.createDeferredPromise,t.createHex=h.createHex,t.createModuleLogger=c.createModuleLogger,t.createNumber=h.createNumber,t.createProjectLogger=c.createProjectLogger,t.exactOptional=a.exactOptional,t.getChecksumAddress=d.getChecksumAddress,t.getErrorMessage=g.getErrorMessage,t.getJsonRpcIdValidator=a.getJsonRpcIdValidator,t.getJsonSize=a.getJsonSize,t.getKnownPropertyNames=y.getKnownPropertyNames,t.getSafeJson=a.getSafeJson,t.gtRange=s.gtRange,t.gtVersion=s.gtVersion,t.hasProperty=y.hasProperty,t.hexToBigInt=n.hexToBigInt,t.hexToBytes=d.hexToBytes,t.hexToNumber=n.hexToNumber,t.inMilliseconds=o.inMilliseconds,t.isASCII=y.isASCII,t.isBytes=d.isBytes,t.isCaipAccountAddress=u.isCaipAccountAddress,t.isCaipAccountId=u.isCaipAccountId,t.isCaipChainId=u.isCaipChainId,t.isCaipNamespace=u.isCaipNamespace,t.isCaipReference=u.isCaipReference,t.isErrorWithCode=g.isErrorWithCode,t.isErrorWithMessage=g.isErrorWithMessage,t.isErrorWithStack=g.isErrorWithStack,t.isHexString=d.isHexString,t.isJsonRpcError=a.isJsonRpcError,t.isJsonRpcFailure=a.isJsonRpcFailure,t.isJsonRpcNotification=a.isJsonRpcNotification,t.isJsonRpcRequest=a.isJsonRpcRequest,t.isJsonRpcResponse=a.isJsonRpcResponse,t.isJsonRpcSuccess=a.isJsonRpcSuccess,t.isNonEmptyArray=y.isNonEmptyArray,t.isNullOrUndefined=y.isNullOrUndefined,t.isObject=y.isObject,t.isPendingJsonRpcResponse=a.isPendingJsonRpcResponse,t.isPlainObject=y.isPlainObject,t.isStrictHexString=d.isStrictHexString,t.isValidChecksumAddress=d.isValidChecksumAddress,t.isValidHexAddress=d.isValidHexAddress,t.isValidJson=a.isValidJson,t.isValidSemVerRange=s.isValidSemVerRange,t.isValidSemVerVersion=s.isValidSemVerVersion,t.jsonrpc2=a.jsonrpc2,t.numberToBytes=d.numberToBytes,t.numberToHex=n.numberToHex,t.object=a.object,t.parseCaipAccountId=u.parseCaipAccountId,t.parseCaipChainId=u.parseCaipChainId,t.remove0x=d.remove0x,t.satisfiesVersionRange=s.satisfiesVersionRange,t.signedBigIntToBytes=d.signedBigIntToBytes,t.stringToBytes=d.stringToBytes,t.timeSince=o.timeSince,t.toCaipChainId=u.toCaipChainId,t.valueToBytes=d.valueToBytes,t.wrapError=g.wrapError},2102:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(e,...t){if(!i(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function c(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=t.isBytes=void 0,t.number=r,t.bool=n,t.isBytes=i,t.bytes=o,t.hash=s,t.exists=a,t.output=c;const u={number:r,bool:n,bytes:o,hash:s,exists:a,output:c};t.default=u},7335:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}t.fromBig=i,t.split=o;const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const h=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=h;const d=(e,t)=>t;t.rotr32H=d;const p=(e,t)=>e;t.rotr32L=p;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const y=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=y;const b=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=b;const m=(e,t,r)=>e<<r-32|t>>>64-r;function w(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=m,t.add=w;const v=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=v;const E=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=E;const _=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=_;const x=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=x;const S=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=S;const A=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=A;const I={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:f,rotrBL:h,rotr32H:d,rotr32L:p,rotlSH:g,rotlSL:y,rotlBH:b,rotlBL:m,add:w,add3L:v,add3H:E,add4L:_,add4H:x,add5H:A,add5L:S};t.default=I},6256:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},2214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(2102),i=r(7335),o=r(9520),s=[],a=[],c=[],u=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(7),d=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)t=(t<<l^(t>>h)*p)%d,t&f&&(i^=l<<(l<<BigInt(e))-l);c.push(i)}const[g,y]=(0,i.split)(c,!0),b=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),m=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function w(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=b(o,s,1)^r[n],c=m(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],o=b(t,i,n),c=m(t,i,n),u=s[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}t.keccakP=w;class v extends o.Hash{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){o.isLE||(0,o.byteSwap32)(this.state32),w(this.state32,this.rounds),o.isLE||(0,o.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new v(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=v;const E=(e,t,r)=>(0,o.wrapConstructor)((()=>new v(t,e,r)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const _=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new v(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=_(31,168,16),t.shake256=_(31,136,32)},9520:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.byteSwap32=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=t.isBytes=void 0;const n=r(6256),i=r(2102);t.isBytes=function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name},t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.rotl=(e,t)=>e<<t|e>>>32-t>>>0,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.byteSwap=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,t.byteSwapIfBE=t.isLE?e=>e:e=>(0,t.byteSwap)(e),t.byteSwap32=function(e){for(let r=0;r<e.length;r++)e[r]=(0,t.byteSwap)(e[r])};const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){(0,i.bytes)(e);let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t};function s(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function a(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function c(e){return"string"==typeof e&&(e=a(e)),(0,i.bytes)(e),e}t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=s(e.charCodeAt(i)),o=s(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=a,t.toBytes=c,t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];(0,i.bytes)(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(c(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},7557:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!((r=e)instanceof Uint8Array||null!=r&&"object"==typeof r&&"Uint8Array"===r.constructor.name))throw new Error("Expected Uint8Array");var r;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=s,t.output=a;const c={number:r,bool:n,bytes:i,hash:o,exists:s,output:a};t.default=c},915:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(7557),i=r(9175);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+u,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},2318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}t.fromBig=i,t.split=o;const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const h=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=h;const d=(e,t)=>t;t.rotr32H=d;const p=(e,t)=>e;t.rotr32L=p;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const y=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=y;const b=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=b;const m=(e,t,r)=>e<<r-32|t>>>64-r;function w(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=m,t.add=w;const v=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=v;const E=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=E;const _=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=_;const x=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=x;const S=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=S;const A=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=A;const I={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:f,rotrBL:h,rotr32H:d,rotr32L:p,rotlSH:g,rotlSL:y,rotlBH:b,rotlBL:m,add:w,add3L:v,add3H:E,add4L:_,add4H:x,add5H:A,add5L:S};t.default=I},5145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},9615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(7557),i=r(9175);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,i.toBytes)(t);if(this.iHash=e.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?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},2623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(915),i=r(9175),o=(e,t,r)=>e&t^e&r^t&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]),c=new Uint32Array(64);class u 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:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,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(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],r=c[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;c[e]=o+c[e-7]+n+c[e-16]|0}let{A:r,B:n,C:a,D:u,E:l,F:f,G:h,H:d}=this;for(let e=0;e<64;e++){const t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&h)+s[e]+c[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,a)|0;d=h,h=f,f=l,l=u+t|0,u=a,a=n,n=r,r=t+g|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,n,a,u,l,f,h,d)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new u)),t.sha224=(0,i.wrapConstructor)((()=>new l))},2955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(7557),i=r(2318),o=r(9175),[s,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(7),d=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)t=(t<<l^(t>>h)*p)%d,t&f&&(i^=l<<(l<<BigInt(e))-l);c.push(i)}const[g,y]=(0,i.split)(c,!0),b=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),m=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function w(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=b(o,s,1)^r[n],c=m(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],o=b(t,i,n),c=m(t,i,n),u=s[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}t.keccakP=w;class v extends o.Hash{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){w(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new v(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=v;const E=(e,t,r)=>(0,o.wrapConstructor)((()=>new v(t,e,r)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const _=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new v(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=_(31,168,16),t.shake256=_(31,136,32)},9175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(5145);function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t};function s(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function a(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function c(e){if("string"==typeof e&&(e=a(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=s(e.charCodeAt(i)),o=s(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=a,t.toBytes=c,t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];if(!i(n))throw new Error("Uint8Array expected");t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(c(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},3203:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function i(...e){const t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map((e=>e.encode)).reduceRight(r,t),decode:e.map((e=>e.decode)).reduce(r,t)}}function o(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}}function s(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function a(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function c(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function u(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0;const o=[],s=Array.from(e);for(s.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let o=i;o<s.length;o++){const a=s[o],c=t*e+a;if(!Number.isSafeInteger(c)||t*e/t!==e||c-a!=t*e)throw new Error("convertRadix: carry overflow");e=c%n;const u=Math.floor(c/n);if(s[o]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw new Error("convertRadix: carry overflow");r&&(u?r=!1:i=o)}if(o.push(e),r)break}for(let t=0;t<e.length-1&&0===e[t];t++)o.push(0);return o.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.createBase58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64urlnopad=t.base64url=t.base64nopad=t.base64=t.base32crockford=t.base32hex=t.base32=t.base16=t.utils=t.assertNumber=void 0,t.assertNumber=r;const l=(e,t)=>t?l(t,e%t):e,f=(e,t)=>e+(t-l(e,t));function h(e,t,n,i){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(f(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${f(t,n)}`);let o=0,s=0;const a=2**n-1,c=[];for(const i of e){if(r(i),i>=2**t)throw new Error(`convertRadix2: invalid data word=${i} from=${t}`);if(o=o<<t|i,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=n;s-=n)c.push((o>>s-n&a)>>>0);o&=2**s-1}if(o=o<<n-s&a,!i&&s>=t)throw new Error("Excess padding");if(!i&&o)throw new Error(`Non-zero padding: ${o}`);return i&&s>0&&c.push(o>>>0),c}function d(e){return r(e),{encode:t=>{if(!n(t))throw new Error("radix.encode input should be Uint8Array");return u(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(u(t,e,256))}}}function p(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(f(8,e)>32||f(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!n(r))throw new Error("radix2.encode input should be Uint8Array");return h(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(h(r,e,8,t))}}}function g(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function y(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!n(r))throw new Error("checksum.encode: input should be Uint8Array");const i=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(i,r.length),o},decode(r){if(!n(r))throw new Error("checksum.decode: input should be Uint8Array");const i=r.slice(0,-e),o=t(i).slice(0,e),s=r.slice(-e);for(let t=0;t<e;t++)if(o[t]!==s[t])throw new Error("Invalid checksum");return i}}}t.utils={alphabet:o,chain:i,checksum:y,convertRadix:u,convertRadix2:h,radix:d,radix2:p,join:s,padding:a},t.base16=i(p(4),o("0123456789ABCDEF"),s("")),t.base32=i(p(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),s("")),t.base32hex=i(p(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),s("")),t.base32crockford=i(p(5),o("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),s(""),c((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.base64=i(p(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),s("")),t.base64nopad=i(p(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),s("")),t.base64url=i(p(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),s("")),t.base64urlnopad=i(p(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),s(""));const b=e=>i(d(58),o(e),s(""));t.base58=b("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=b("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=b("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const m=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;n<e.length;n+=8){const i=e.subarray(n,n+8);r+=t.base58.encode(i).padStart(m[i.length],"1")}return r},decode(e){let r=[];for(let n=0;n<e.length;n+=11){const i=e.slice(n,n+11),o=m.indexOf(i.length),s=t.base58.decode(i);for(let e=0;e<s.length-o;e++)if(0!==s[e])throw new Error("base58xmr: wrong padding");r=r.concat(Array.from(s.slice(s.length-o)))}return Uint8Array.from(r)}},t.createBase58check=e=>i(y(4,(t=>e(e(t)))),t.base58),t.base58check=t.createBase58check;const w=i(o("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),s("")),v=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<v.length;e++)1==(t>>e&1)&&(r^=v[e]);return r}function _(e,t,r=1){const n=e.length;let i=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);i=E(i)^r>>5}i=E(i);for(let t=0;t<n;t++)i=E(i)^31&e.charCodeAt(t);for(let e of t)i=E(i)^e;for(let e=0;e<6;e++)i=E(i);return i^=r,w.encode(h([i%2**30],30,5,!1))}function x(e){const t="bech32"===e?1:734539939,r=p(5),n=r.decode,i=r.encode,o=g(n);function s(e,r=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==r&&e.length>r)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const i=n.lastIndexOf("1");if(0===i||-1===i)throw new Error('Letter "1" must be present between prefix and data only');const o=n.slice(0,i),s=n.slice(i+1);if(s.length<6)throw new Error("Data must be at least 6 characters long");const a=w.decode(s).slice(0,-6),c=_(o,a,t);if(!s.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:o,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);if(0===e.length)throw new TypeError(`Invalid prefix length ${e.length}`);const i=e.length+7+r.length;if(!1!==n&&i>n)throw new TypeError(`Length ${i} exceeds limit ${n}`);const o=e.toLowerCase(),s=_(o,r,t);return`${o}1${w.encode(r)}${s}`},decode:s,decodeToBytes:function(e){const{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:g(s),fromWords:n,fromWordsUnsafe:o,toWords:i}}t.bech32=x("bech32"),t.bech32m=x("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.hex=i(p(4),o("0123456789abcdef"),s(""),c((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const S={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},A="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!S.hasOwnProperty(e))throw new TypeError(A);if(!n(t))throw new TypeError("bytesToString() expects Uint8Array");return S[e].encode(t)},t.str=t.bytesToString,t.stringToBytes=(e,t)=>{if(!S.hasOwnProperty(e))throw new TypeError(A);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return S[e].decode(t)},t.bytes=t.stringToBytes},7524:(e,t,r)=>{var n=e.exports,i=(r(7007).EventEmitter,r(5693)),o=r(8835);n.request=function(e,t){if("string"==typeof e&&(e=o.parse(e)),e||(e={}),e.host||e.port||(e.port=80),!e.host&&e.hostname&&(e.host=e.hostname),e.protocol||(e.scheme?e.protocol=e.scheme+":":e.protocol="http:"),!e.host)throw new Error("missing host");/:/.test(e.host)&&(e.port||(e.port=e.host.split(":")[1]),e.host=e.host.split(":")[0]),e.port||(e.port="https:"==e.protocol?443:80);var r=new i(new XMLHttpRequest,e);return t&&r.on("response",t),r},n.get=function(e,t){e.method="GET";var r=n.request(e,t);return r.end(),r},n.Agent=function(){},n.Agent.defaultMaxSockets=4,n.STATUS_CODES={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary 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 Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",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",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},5693:(e,t,r)=>{var n=r(8310),i=r(2569),o=r(3887),s=r(6698),a=e.exports=function(e,t){var r=this;r.writable=!0,r.xhr=e,r.body=[],r.uri=(t.protocol||"http:")+"//"+t.host+(t.port?":"+t.port:"")+(t.path||"/"),void 0===t.withCredentials&&(t.withCredentials=!0);try{e.withCredentials=t.withCredentials}catch(e){}if(t.responseType)try{e.responseType=t.responseType}catch(e){}if(e.open(t.method||"GET",r.uri,!0),e.onerror=function(e){r.emit("error",new Error("Network error"))},r._headers={},t.headers)for(var n=c(t.headers),s=0;s<n.length;s++){var a=n[s];if(r.isSafeRequestHeader(a)){var u=t.headers[a];r.setHeader(a,u)}}t.auth&&this.setHeader("Authorization","Basic "+o.btoa(t.auth));var l=new i;l.on("close",(function(){r.emit("close")})),l.on("ready",(function(){r.emit("response",l)})),l.on("error",(function(e){r.emit("error",e)})),e.onreadystatechange=function(){e.__aborted||l.handle(e)}};s(a,n),a.prototype.setHeader=function(e,t){this._headers[e.toLowerCase()]=t},a.prototype.getHeader=function(e){return this._headers[e.toLowerCase()]},a.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},a.prototype.write=function(e){this.body.push(e)},a.prototype.destroy=function(e){this.xhr.__aborted=!0,this.xhr.abort(),this.emit("close")},a.prototype.end=function(e){void 0!==e&&this.body.push(e);for(var t=c(this._headers),r=0;r<t.length;r++){var n=t[r],i=this._headers[n];if(u(i))for(var o=0;o<i.length;o++)this.xhr.setRequestHeader(n,i[o]);else this.xhr.setRequestHeader(n,i)}if(0===this.body.length)this.xhr.send("");else if("string"==typeof this.body[0])this.xhr.send(this.body.join(""));else if(u(this.body[0])){var s=[];for(r=0;r<this.body.length;r++)s.push.apply(s,this.body[r]);this.xhr.send(s)}else if(/Array/.test(Object.prototype.toString.call(this.body[0]))){var a=0;for(r=0;r<this.body.length;r++)a+=this.body[r].length;s=new this.body[0].constructor(a);var l=0;for(r=0;r<this.body.length;r++){var h=this.body[r];for(o=0;o<h.length;o++)s[l++]=h[o]}this.xhr.send(s)}else if(f(this.body[0]))this.xhr.send(this.body[0]);else{for(s="",r=0;r<this.body.length;r++)s+=this.body[r].toString();this.xhr.send(s)}},a.unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"],a.prototype.isSafeRequestHeader=function(e){return!!e&&-1===l(a.unsafeHeaders,e.toLowerCase())};var c=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},l=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},f=function(e){return"undefined"!=typeof Blob&&e instanceof Blob||"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof FormData&&e instanceof FormData||void 0}},2569:(e,t,r)=>{var n=r(8310),i=r(537),o=e.exports=function(e){this.offset=0,this.readable=!0};i.inherits(o,n);var s={streaming:!0,status2:!0};function a(e){for(var t=e.getAllResponseHeaders().split(/\r?\n/),r={},n=0;n<t.length;n++){var i=t[n];if(""!==i){var o=i.match(/^([^:]+):\s*(.*)/);if(o){var s=o[1].toLowerCase(),a=o[2];void 0!==r[s]?c(r[s])?r[s].push(a):r[s]=[r[s],a]:r[s]=a}else r[i]=!0}}return r}o.prototype.getResponse=function(e){var t=String(e.responseType).toLowerCase();return"blob"===t?e.responseBlob||e.response:"arraybuffer"===t?e.response:e.responseText},o.prototype.getHeader=function(e){return this.headers[e.toLowerCase()]},o.prototype.handle=function(e){if(2===e.readyState&&s.status2){try{this.statusCode=e.status,this.headers=a(e)}catch(e){s.status2=!1}s.status2&&this.emit("ready")}else if(s.streaming&&3===e.readyState){try{this.statusCode||(this.statusCode=e.status,this.headers=a(e),this.emit("ready"))}catch(e){}try{this._emitData(e)}catch(e){s.streaming=!1}}else 4===e.readyState&&(this.statusCode||(this.statusCode=e.status,this.emit("ready")),this._emitData(e),e.error?this.emit("error",this.getResponse(e)):this.emit("end"),this.emit("close"))},o.prototype._emitData=function(e){var t=this.getResponse(e);t.length>this.offset&&(this.emit("data",new Buffer(t.slice(this.offset))),this.offset=t.length)};var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},3887:(e,t)=>{!function(){var e=t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function n(e){this.message=e}n.prototype=new Error,n.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,i,o=0,s=r,a="";e.charAt(0|o)||(s="=",o%1);a+=s.charAt(63&t>>8-o%1*8)){if((i=e.charCodeAt(o+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|i}return a}),e.atob||(e.atob=function(e){if((e=e.replace(/=+$/,"")).length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,o=0,s=0,a="";i=e.charAt(s++);~i&&(t=o%4?64*t+i:i,o++%4)?a+=String.fromCharCode(255&t>>(-2*o&6)):0)i=r.indexOf(i);return a})}()},4529:(e,t,r)=>{"use strict";var n=r(5228);function i(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function o(e){return r.g.Buffer&&"function"==typeof r.g.Buffer.isBuffer?r.g.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var s=r(4591),a=Object.prototype.hasOwnProperty,c=Array.prototype.slice,u="foo"===function(){}.name;function l(e){return Object.prototype.toString.call(e)}function f(e){return!o(e)&&"function"==typeof r.g.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var h=e.exports=m,d=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(s.isFunction(e)){if(u)return e.name;var t=e.toString().match(d);return t&&t[1]}}function g(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function y(e){if(u||!s.isFunction(e))return s.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function b(e,t,r,n,i){throw new h.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function m(e,t){e||b(e,!0,t,"==",h.ok)}function w(e,t,r,n){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(f(e)&&f(t)&&l(e)===l(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==a&&a===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=v(e),o=v(t);if(i&&!o||!i&&o)return!1;if(i)return w(e=c.call(e),t=c.call(t),r);var a,u,l=x(e),f=x(t);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),u=l.length-1;u>=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(!w(e[a=l[u]],t[a],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function _(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&b(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&i&&!r;if((!e&&s.isError(i)&&o&&E(i,r)||a)&&b(i,r,"Got unwanted exception"+n),e&&i&&r&&!E(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(y(e.actual),128)+" "+e.operator+" "+g(y(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=p(t),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},s.inherits(h.AssertionError,Error),h.fail=b,h.ok=m,h.equal=function(e,t,r){e!=t&&b(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&b(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){w(e,t,!1)||b(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){w(e,t,!0)||b(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){w(e,t,!1)&&b(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&b(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&b(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&b(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){_(!0,e,t,r)},h.doesNotThrow=function(e,t,r){_(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=n((function e(t,r){t||b(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var x=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}},6100:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},3845:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},4591:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var i=arguments,o=i.length,a=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),c=i[r];r<o;c=i[++r])p(c)||!w(c)?a+=" "+c:a+=" "+s(c);return a},t.deprecate=function(e,n){if(b(r.g.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var i=!1;return function(){if(!i){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),i=!0}return e.apply(this,arguments)}};var i,o={};function s(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&_(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return y(i)||(i=u(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):p(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(_(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var w,x="",S=!1,A=["{","}"];return h(r)&&(S=!0,A=["[","]"]),_(r)&&(x=" [Function"+(r.name?": "+r.name:"")+"]"),m(r)&&(x=" "+RegExp.prototype.toString.call(r)),v(r)&&(x=" "+Date.prototype.toUTCString.call(r)),E(r)&&(x=" "+l(r)),0!==s.length||S&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),w=S?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)B(t,String(s))?o.push(f(e,t,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return f(e,r,n,a,t,S)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(w,x,A)):A[0]+x+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),B(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=p(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function p(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"==typeof e&&null!==e}function v(e){return w(e)&&"[object Date]"===x(e)}function E(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function _(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(i)&&(i=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var r=process.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=p,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=v,t.isError=E,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(3845);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",I(),t.format.apply(t,arguments))},t.inherits=r(6100),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=c(e),s=o[0],a=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(u(e,a,a+s>c?c:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},6067:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,s;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],s.set(o,i),i+=o.length;return s}},i={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,n)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(r)},7499:e=>{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},6051:e=>{"use strict";e.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}},4989:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,s=i+n;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^r[a])];return-1^e}},7825:(e,t,r)=>{"use strict";var n,i=r(6067),o=r(9963),s=r(7499),a=r(4989),c=r(912),u=-2,l=258,f=262,h=103,d=113,p=666;function g(e,t){return e.msg=c[t],t}function y(e){return(e<<1)-(e>4?9:0)}function b(e){for(var t=e.length;--t>=0;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function w(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function E(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-f?e.strstart-(e.w_size-f):0,u=e.window,h=e.w_mask,d=e.prev,p=e.strstart+l,g=u[o+s-1],y=u[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(r=t)+s]===y&&u[r+s-1]===g&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&o<p);if(n=l-(p-o),o=p-l,n>s){if(e.match_start=t,s=n,n>=a)break;g=u[o+s-1],y=u[o+s]}}}while((t=d[t&h])>c&&0!=--i);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,o,c,u,l,h,d,p,g=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=g+(g-f)){i.arraySet(e.window,e.window,g,g,0),e.match_start-=g,e.strstart-=g,e.block_start-=g,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=g?n-g:0}while(--r);t=r=g;do{n=e.prev[--t],e.prev[t]=n>=g?n-g:0}while(--r);o+=g}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,h=e.strstart+e.lookahead,d=o,p=void 0,(p=u.avail_in)>d&&(p=d),r=0===p?0:(u.avail_in-=p,i.arraySet(l,u.input,u.next_in,p,h),1===u.state.wrap?u.adler=s(u.adler,l,p,h):2===u.state.wrap&&(u.adler=a(u.adler,l,p,h)),u.next_in+=p,u.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+3-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<f&&0!==e.strm.avail_in)}function S(e,t){for(var r,n;;){if(e.lookahead<f){if(x(e),e.lookahead<f&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-f&&(e.match_length=_(e,r)),e.match_length>=3)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}function A(e,t){for(var r,n,i;;){if(e.lookahead<f){if(x(e),e.lookahead<f&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-f&&(e.match_length=_(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(w(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&w(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}function I(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function B(){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=8,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(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),b(this.dyn_ltree),b(this.dyn_dtree),b(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),b(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),b(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(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:d,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):g(e,u)}function T(e){var t,r=k(e);return 0===r&&((t=e.state).window_size=2*t.w_size,b(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function R(e,t,r,n,o,s){if(!e)return u;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||t<0||t>9||s<0||s>4)return g(e,u);8===n&&(n=9);var c=new B;return e.state=c,c.strm=e,c.wrap=a,c.gzhead=null,c.w_bits=n,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=s,c.method=r,T(e)}n=[new I(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,w(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-f&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(w(e,!1),e.strm.avail_out),1)})),new I(4,4,8,4,S),new I(4,5,16,8,S),new I(4,6,32,32,S),new I(4,4,16,16,A),new I(8,16,32,32,A),new I(8,16,128,128,A),new I(8,32,128,256,A),new I(32,128,258,1024,A),new I(32,258,258,4096,A)],t.deflateInit=function(e,t){return R(e,t,8,15,8,0)},t.deflateInit2=R,t.deflateReset=T,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?u:(e.state.gzhead=t,0):u},t.deflate=function(e,t){var r,i,s,c;if(!e||!e.state||t>5||t<0)return e?g(e,u):u;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===p&&4!==t)return g(e,0===e.avail_out?-5:u);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,v(i,31),v(i,139),v(i,8),i.gzhead?(v(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)),v(i,255&i.gzhead.time),v(i,i.gzhead.time>>8&255),v(i,i.gzhead.time>>16&255),v(i,i.gzhead.time>>24&255),v(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),v(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(v(i,255&i.gzhead.extra.length),v(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(v(i,0),v(i,0),v(i,0),v(i,0),v(i,0),v(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),v(i,3),i.status=d);else{var f=8+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=d,E(i,f),0!==i.strstart&&(E(i,e.adler>>>16),E(i,65535&e.adler)),e.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&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending!==i.pending_buf_size));)v(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.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&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,v(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===c&&(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&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,v(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===c&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&m(e),i.pending+2<=i.pending_buf_size&&(v(i,255&e.adler),v(i,e.adler>>8&255),e.adler=0,i.status=d)):i.status=d),0!==i.pending){if(m(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&y(t)<=y(r)&&4!==t)return g(e,-5);if(i.status===p&&0!==e.avail_in)return g(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==p){var _=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=l){if(x(e),e.lookahead<=l&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+l;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);e.match_length=l-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==_&&4!==_||(i.status=p),1===_||3===_)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(b(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),m(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(v(i,255&e.adler),v(i,e.adler>>8&255),v(i,e.adler>>16&255),v(i,e.adler>>24&255),v(i,255&e.total_in),v(i,e.total_in>>8&255),v(i,e.total_in>>16&255),v(i,e.total_in>>24&255)):(E(i,e.adler>>>16),E(i,65535&e.adler)),m(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==h&&t!==d&&t!==p?g(e,u):(e.state=null,t===d?g(e,-3):0):u},t.deflateSetDictionary=function(e,t){var r,n,o,a,c,l,f,h,d=t.length;if(!e||!e.state)return u;if(2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return u;for(1===a&&(e.adler=s(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(b(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,d-r.w_size,r.w_size,0),t=h,d=r.w_size),c=e.avail_in,l=e.next_in,f=e.input,e.avail_in=d,e.next_in=0,e.input=t,x(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-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=2,x(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=l,e.input=f,e.avail_in=c,r.wrap=a,0},t.deflateInfo="pako deflate (from Nodeca project)"},3279:e=>{"use strict";e.exports=function(e,t){var r,n,i,o,s,a,c,u,l,f,h,d,p,g,y,b,m,w,v,E,_,x,S,A,I;r=e.state,n=e.next_in,A=e.input,i=n+(e.avail_in-5),o=e.next_out,I=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),c=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,h=r.window,d=r.hold,p=r.bits,g=r.lencode,y=r.distcode,b=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;e:do{p<15&&(d+=A[n++]<<p,p+=8,d+=A[n++]<<p,p+=8),w=g[d&b];t:for(;;){if(d>>>=v=w>>>24,p-=v,0==(v=w>>>16&255))I[o++]=65535&w;else{if(!(16&v)){if(0==(64&v)){w=g[(65535&w)+(d&(1<<v)-1)];continue t}if(32&v){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}E=65535&w,(v&=15)&&(p<v&&(d+=A[n++]<<p,p+=8),E+=d&(1<<v)-1,d>>>=v,p-=v),p<15&&(d+=A[n++]<<p,p+=8,d+=A[n++]<<p,p+=8),w=y[d&m];r:for(;;){if(d>>>=v=w>>>24,p-=v,!(16&(v=w>>>16&255))){if(0==(64&v)){w=y[(65535&w)+(d&(1<<v)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(_=65535&w,p<(v&=15)&&(d+=A[n++]<<p,(p+=8)<v&&(d+=A[n++]<<p,p+=8)),(_+=d&(1<<v)-1)>c){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=v,p-=v,_>(v=o-s)){if((v=_-v)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=0,S=h,0===f){if(x+=u-v,v<E){E-=v;do{I[o++]=h[x++]}while(--v);x=o-_,S=I}}else if(f<v){if(x+=u+f-v,(v-=f)<E){E-=v;do{I[o++]=h[x++]}while(--v);if(x=0,f<E){E-=v=f;do{I[o++]=h[x++]}while(--v);x=o-_,S=I}}}else if(x+=f-v,v<E){E-=v;do{I[o++]=h[x++]}while(--v);x=o-_,S=I}for(;E>2;)I[o++]=S[x++],I[o++]=S[x++],I[o++]=S[x++],E-=3;E&&(I[o++]=S[x++],E>1&&(I[o++]=S[x++]))}else{x=o-_;do{I[o++]=I[x++],I[o++]=I[x++],I[o++]=I[x++],E-=3}while(E>2);E&&(I[o++]=I[x++],E>1&&(I[o++]=I[x++]))}break}}break}}while(n<i&&o<a);n-=E=p>>3,d&=(1<<(p-=E<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},777:(e,t,r)=>{"use strict";var n=r(6067),i=r(7499),o=r(4989),s=r(3279),a=r(9292),c=-2,u=12,l=30;function f(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function h(){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 d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):c}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):c}function g(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):c}function y(e,t){var r,n;return e?(n=new h,e.state=n,n.window=null,0!==(r=g(e,t))&&(e.state=null),r):c}var b,m,w=!0;function v(e){if(w){var t;for(b=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,b,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,m,0,e.work,{bits:5}),w=!1}e.lencode=b,e.lenbits=9,e.distcode=m,e.distbits=5}function E(e,t,r,i){var o,s=e.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,t,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,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,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}t.inflateReset=p,t.inflateReset2=g,t.inflateResetKeep=d,t.inflateInit=function(e){return y(e,15)},t.inflateInit2=y,t.inflate=function(e,t){var r,h,d,p,g,y,b,m,w,_,x,S,A,I,B,k,T,R,P,C,O,L,N,j,M=0,U=new n.Buf8(4),$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return c;(r=e.state).mode===u&&(r.mode=13),g=e.next_out,d=e.output,b=e.avail_out,p=e.next_in,h=e.input,y=e.avail_in,m=r.hold,w=r.bits,_=y,x=b,L=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;w<16;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(2&r.wrap&&35615===m){r.check=0,U[0]=255&m,U[1]=m>>>8&255,r.check=o(r.check,U,2,0),m=0,w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=l;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=l;break}if(w-=4,O=8+(15&(m>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){e.msg="invalid window size",r.mode=l;break}r.dmax=1<<O,e.adler=r.check=1,r.mode=512&m?10:u,m=0,w=0;break;case 2:for(;w<16;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=l;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=l;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=o(r.check,U,2,0)),m=0,w=0,r.mode=3;case 3:for(;w<32;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}r.head&&(r.head.time=m),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,U[2]=m>>>16&255,U[3]=m>>>24&255,r.check=o(r.check,U,4,0)),m=0,w=0,r.mode=4;case 4:for(;w<16;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=o(r.check,U,2,0)),m=0,w=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=o(r.check,U,2,0)),m=0,w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>y&&(S=y),S&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,S,O)),512&r.flags&&(r.check=o(r.check,h,S,p)),y-=S,p+=S,r.length-=S),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===y)break e;S=0;do{O=h[p+S++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O))}while(O&&S<y);if(512&r.flags&&(r.check=o(r.check,h,S,p)),y-=S,p+=S,O)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===y)break e;S=0;do{O=h[p+S++],r.head&&O&&r.length<65536&&(r.head.comment+=String.fromCharCode(O))}while(O&&S<y);if(512&r.flags&&(r.check=o(r.check,h,S,p)),y-=S,p+=S,O)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;w<16;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=l;break}m=0,w=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=u;break;case 10:for(;w<32;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}e.adler=r.check=f(m),m=0,w=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=g,e.avail_out=b,e.next_in=p,e.avail_in=y,r.hold=m,r.bits=w,2;e.adler=r.check=1,r.mode=u;case u:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}switch(r.last=1&m,w-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6===t){m>>>=2,w-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=l}m>>>=2,w-=2;break;case 14:for(m>>>=7&w,w-=7&w;w<32;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=l;break}if(r.length=65535&m,m=0,w=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(S=r.length){if(S>y&&(S=y),S>b&&(S=b),0===S)break e;n.arraySet(d,h,p,S,g),y-=S,p+=S,b-=S,g+=S,r.length-=S;break}r.mode=u;break;case 17:for(;w<14;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(r.nlen=257+(31&m),m>>>=5,w-=5,r.ndist=1+(31&m),m>>>=5,w-=5,r.ncode=4+(15&m),m>>>=4,w-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=l;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;w<3;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}r.lens[$[r.have++]]=7&m,m>>>=3,w-=3}for(;r.have<19;)r.lens[$[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},L=a(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,L){e.msg="invalid code lengths set",r.mode=l;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;k=(M=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,T=65535&M,!((B=M>>>24)<=w);){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(T<16)m>>>=B,w-=B,r.lens[r.have++]=T;else{if(16===T){for(j=B+2;w<j;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(m>>>=B,w-=B,0===r.have){e.msg="invalid bit length repeat",r.mode=l;break}O=r.lens[r.have-1],S=3+(3&m),m>>>=2,w-=2}else if(17===T){for(j=B+3;w<j;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}w-=B,O=0,S=3+(7&(m>>>=B)),m>>>=3,w-=3}else{for(j=B+7;w<j;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}w-=B,O=0,S=11+(127&(m>>>=B)),m>>>=7,w-=7}if(r.have+S>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=l;break}for(;S--;)r.lens[r.have++]=O}}if(r.mode===l)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=l;break}if(r.lenbits=9,N={bits:r.lenbits},L=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,L){e.msg="invalid literal/lengths set",r.mode=l;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},L=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,L){e.msg="invalid distances set",r.mode=l;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(y>=6&&b>=258){e.next_out=g,e.avail_out=b,e.next_in=p,e.avail_in=y,r.hold=m,r.bits=w,s(e,x),g=e.next_out,d=e.output,b=e.avail_out,p=e.next_in,h=e.input,y=e.avail_in,m=r.hold,w=r.bits,r.mode===u&&(r.back=-1);break}for(r.back=0;k=(M=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,T=65535&M,!((B=M>>>24)<=w);){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(k&&0==(240&k)){for(R=B,P=k,C=T;k=(M=r.lencode[C+((m&(1<<R+P)-1)>>R)])>>>16&255,T=65535&M,!(R+(B=M>>>24)<=w);){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}m>>>=R,w-=R,r.back+=R}if(m>>>=B,w-=B,r.back+=B,r.length=T,0===k){r.mode=26;break}if(32&k){r.back=-1,r.mode=u;break}if(64&k){e.msg="invalid literal/length code",r.mode=l;break}r.extra=15&k,r.mode=22;case 22:if(r.extra){for(j=r.extra;w<j;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;k=(M=r.distcode[m&(1<<r.distbits)-1])>>>16&255,T=65535&M,!((B=M>>>24)<=w);){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(0==(240&k)){for(R=B,P=k,C=T;k=(M=r.distcode[C+((m&(1<<R+P)-1)>>R)])>>>16&255,T=65535&M,!(R+(B=M>>>24)<=w);){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}m>>>=R,w-=R,r.back+=R}if(m>>>=B,w-=B,r.back+=B,64&k){e.msg="invalid distance code",r.mode=l;break}r.offset=T,r.extra=15&k,r.mode=24;case 24:if(r.extra){for(j=r.extra;w<j;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=l;break}r.mode=25;case 25:if(0===b)break e;if(S=x-b,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=l;break}S>r.wnext?(S-=r.wnext,A=r.wsize-S):A=r.wnext-S,S>r.length&&(S=r.length),I=r.window}else I=d,A=g-r.offset,S=r.length;S>b&&(S=b),b-=S,r.length-=S;do{d[g++]=I[A++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===b)break e;d[g++]=r.length,b--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===y)break e;y--,m|=h[p++]<<w,w+=8}if(x-=b,e.total_out+=x,r.total+=x,x&&(e.adler=r.check=r.flags?o(r.check,d,x,g-x):i(r.check,d,x,g-x)),x=b,(r.flags?m:f(m))!==r.check){e.msg="incorrect data check",r.mode=l;break}m=0,w=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;w<32;){if(0===y)break e;y--,m+=h[p++]<<w,w+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=l;break}m=0,w=0}r.mode=29;case 29:L=1;break e;case l:L=-3;break e;case 31:return-4;default:return c}return e.next_out=g,e.avail_out=b,e.next_in=p,e.avail_in=y,r.hold=m,r.bits=w,(r.wsize||x!==e.avail_out&&r.mode<l&&(r.mode<27||4!==t))&&E(e,e.output,e.next_out,x-e.avail_out)?(r.mode=31,-4):(_-=e.avail_in,x-=e.avail_out,e.total_in+=_,e.total_out+=x,r.total+=x,r.wrap&&x&&(e.adler=r.check=r.flags?o(r.check,d,x,e.next_out-x):i(r.check,d,x,e.next_out-x)),e.data_type=r.bits+(r.last?64:0)+(r.mode===u?128:0)+(20===r.mode||15===r.mode?256:0),(0===_&&0===x||4===t)&&0===L&&(L=-5),L)},t.inflateEnd=function(e){if(!e||!e.state)return c;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?c:(r.head=t,t.done=!1,0):c},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?c:11===r.mode&&i(1,t,n,0)!==r.check?-3:E(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):c},t.inflateInfo="pako inflate (from Nodeca project)"},9292:(e,t,r)=>{"use strict";var n=r(6067),i=[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],o=[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],s=[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],a=[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];e.exports=function(e,t,r,c,u,l,f,h){var d,p,g,y,b,m,w,v,E,_=h.bits,x=0,S=0,A=0,I=0,B=0,k=0,T=0,R=0,P=0,C=0,O=null,L=0,N=new n.Buf16(16),j=new n.Buf16(16),M=null,U=0;for(x=0;x<=15;x++)N[x]=0;for(S=0;S<c;S++)N[t[r+S]]++;for(B=_,I=15;I>=1&&0===N[I];I--);if(B>I&&(B=I),0===I)return u[l++]=20971520,u[l++]=20971520,h.bits=1,0;for(A=1;A<I&&0===N[A];A++);for(B<A&&(B=A),R=1,x=1;x<=15;x++)if(R<<=1,(R-=N[x])<0)return-1;if(R>0&&(0===e||1!==I))return-1;for(j[1]=0,x=1;x<15;x++)j[x+1]=j[x]+N[x];for(S=0;S<c;S++)0!==t[r+S]&&(f[j[t[r+S]]++]=S);if(0===e?(O=M=f,m=19):1===e?(O=i,L-=257,M=o,U-=257,m=256):(O=s,M=a,m=-1),C=0,S=0,x=A,b=l,k=B,T=0,g=-1,y=(P=1<<B)-1,1===e&&P>852||2===e&&P>592)return 1;for(;;){w=x-T,f[S]<m?(v=0,E=f[S]):f[S]>m?(v=M[U+f[S]],E=O[L+f[S]]):(v=96,E=0),d=1<<x-T,A=p=1<<k;do{u[b+(C>>T)+(p-=d)]=w<<24|v<<16|E|0}while(0!==p);for(d=1<<x-1;C&d;)d>>=1;if(0!==d?(C&=d-1,C+=d):C=0,S++,0==--N[x]){if(x===I)break;x=t[r+f[S]]}if(x>B&&(C&y)!==g){for(0===T&&(T=B),b+=A,R=1<<(k=x-T);k+T<I&&!((R-=N[k+T])<=0);)k++,R<<=1;if(P+=1<<k,1===e&&P>852||2===e&&P>592)return 1;u[g=C&y]=B<<24|k<<16|b-l|0}}return 0!==C&&(u[b+C]=x-T<<24|64<<16|0),h.bits=B,0}},912:e=>{"use strict";e.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"}},9963:(e,t,r)=>{"use strict";var n=r(6067);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=[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],s=[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],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var l=new Array(60);i(l);var f=new Array(512);i(f);var h=new Array(256);i(h);var d=new Array(29);i(d);var p,g,y,b=new Array(30);function m(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?f[e]:f[256+(e>>>7)]}function E(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,E(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function x(e,t,r){_(e,r[2*t],r[2*t+1])}function S(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function A(e,t,r){var n,i,o=new Array(16),s=0;for(n=1;n<=15;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=S(o[a]++,a))}}function I(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function B(e){e.bi_valid>8?E(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function k(e,t,r,n){var i=2*t,o=2*r;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function T(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&k(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!k(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function R(e,t,r){var n,i,a,c,u=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],i=e.pending_buf[e.l_buf+u],u++,0===n?x(e,i,t):(x(e,(a=h[i])+256+1,t),0!==(c=o[a])&&_(e,i-=d[a],c),x(e,a=v(--n),r),0!==(c=s[a])&&_(e,n-=b[a],c))}while(u<e.last_lit);x(e,256,t)}function P(e,t){var r,n,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<c;r++)0!==o[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;r>=1;r--)T(e,o,r);i=c;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,T(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,c=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,g=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=c[2*c[2*(n=e.heap[r])+1]+1]+1)>p&&(o=p,g++),c[2*n+1]=o,n>u||(e.bl_count[o]++,s=0,n>=d&&(s=h[n-d]),a=c[2*n],e.opt_len+=a*(o+s),f&&(e.static_len+=a*(l[2*n+1]+s)));if(0!==g){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>u||(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),n--)}}(e,t),A(o,u,e.bl_count)}function C(e,t,r){var n,i,o=-1,s=t[1],a=0,c=7,u=4;for(0===s&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a<c&&i===s||(a<u?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,o=i,0===s?(c=138,u=3):i===s?(c=6,u=3):(c=7,u=4))}function O(e,t,r){var n,i,o=-1,s=t[1],a=0,c=7,u=4;for(0===s&&(c=138,u=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++a<c&&i===s)){if(a<u)do{x(e,i,e.bl_tree)}while(0!=--a);else 0!==i?(i!==o&&(x(e,i,e.bl_tree),a--),x(e,16,e.bl_tree),_(e,a-3,2)):a<=10?(x(e,17,e.bl_tree),_(e,a-3,3)):(x(e,18,e.bl_tree),_(e,a-11,7));a=0,o=i,0===s?(c=138,u=3):i===s?(c=6,u=3):(c=7,u=4)}}i(b);var L=!1;function N(e,t,r,i){_(e,0+(i?1:0),3),function(e,t,r,i){B(e),E(e,r),E(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){L||(function(){var e,t,r,n,i,c=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,e=0;e<1<<o[n];e++)h[r++]=n;for(h[r-1]=n,i=0,n=0;n<16;n++)for(b[n]=i,e=0;e<1<<s[n];e++)f[i++]=n;for(i>>=7;n<30;n++)for(b[n]=i<<7,e=0;e<1<<s[n]-7;e++)f[256+i++]=n;for(t=0;t<=15;t++)c[t]=0;for(e=0;e<=143;)u[2*e+1]=8,e++,c[8]++;for(;e<=255;)u[2*e+1]=9,e++,c[9]++;for(;e<=279;)u[2*e+1]=7,e++,c[7]++;for(;e<=287;)u[2*e+1]=8,e++,c[8]++;for(A(u,287,c),e=0;e<30;e++)l[2*e+1]=5,l[2*e]=S(e,5);p=new m(u,o,257,286,15),g=new m(l,s,0,30,15),y=new m(new Array(0),a,0,19,7)}(),L=!0),e.l_desc=new w(e.dyn_ltree,p),e.d_desc=new w(e.dyn_dtree,g),e.bl_desc=new w(e.bl_tree,y),e.bi_buf=0,e.bi_valid=0,I(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,r,n){var i,o,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),P(e,e.l_desc),P(e,e.d_desc),s=function(e){var t;for(C(e,e.dyn_ltree,e.l_desc.max_code),C(e,e.dyn_dtree,e.d_desc.max_code),P(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==t?N(e,t,r,n):4===e.strategy||o===i?(_(e,2+(n?1:0),3),R(e,u,l)):(_(e,4+(n?1:0),3),function(e,t,r,n){var i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i<n;i++)_(e,e.bl_tree[2*c[i]+1],3);O(e,e.dyn_ltree,t-1),O(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),R(e,e.dyn_ltree,e.dyn_dtree)),I(e),n&&B(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(h[r]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){_(e,2,3),x(e,256,u),function(e){16===e.bi_valid?(E(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},5848:e=>{"use strict";e.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}},8487:(e,t,r)=>{var n=r(912),i=r(5848),o=r(7825),s=r(777),a=r(6051);for(var c in a)t[c]=a[c];function u(e){if(e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function l(e,t){for(var r=0;r<e.length;r++)this[t+r]=e[r]}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,u.prototype.init=function(e,r,n,a,c){switch(this.windowBits=e,this.level=r,this.memLevel=n,this.strategy=a,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-this.windowBits),this.strm=new i,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:var u=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:u=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}u===t.Z_OK?(this.write_in_progress=!1,this.init_done=!0):this._error(u)},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===t.NONE)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},u.prototype.write=function(e,t,r,n,i,o,s){this._writeCheck(),this.write_in_progress=!0;var a=this;return process.nextTick((function(){a.write_in_progress=!1;var c=a._write(e,t,r,n,i,o,s);a.callback(c[0],c[1]),a.pending_close&&a.close()})),this},u.prototype.writeSync=function(e,t,r,n,i,o,s){return this._writeCheck(),this._write(e,t,r,n,i,o,s)},u.prototype._write=function(e,r,n,i,a,c,u){if(this.write_in_progress=!0,e!==t.Z_NO_FLUSH&&e!==t.Z_PARTIAL_FLUSH&&e!==t.Z_SYNC_FLUSH&&e!==t.Z_FULL_FLUSH&&e!==t.Z_FINISH&&e!==t.Z_BLOCK)throw new Error("Invalid flush value");null==r&&(r=new Buffer(0),i=0,n=0),a._set?a.set=a._set:a.set=l;var f=this.strm;switch(f.avail_in=i,f.input=r,f.next_in=n,f.avail_out=u,f.output=a,f.next_out=c,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:var h=o.deflate(f,e);break;case t.UNZIP:case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:h=s.inflate(f,e);break;default:throw new Error("Unknown mode "+this.mode)}return h!==t.Z_STREAM_END&&h!==t.Z_OK&&this._error(h),this.write_in_progress=!1,[f.avail_in,f.avail_out]},u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):s.inflateEnd(this.strm),this.mode=t.NONE)},u.prototype.reset=function(){switch(this.mode){case t.DEFLATE:case t.DEFLATERAW:var e=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:e=s.inflateReset(this.strm)}e!==t.Z_OK&&this._error(e)},u.prototype._error=function(e){this.onerror(n[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()},t.Zlib=u},3590:(e,t,r)=>{var n=r(7040),i=r(8487),o=r(537),s=r(4529).ok;function a(e,t,r){var n=[],i=0;function o(){for(var t;null!==(t=e.read());)n.push(t),i+=t.length;e.once("readable",o)}function s(){var t=Buffer.concat(n,i);n=[],r(null,t),e.close()}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",o),r(t)})),e.on("end",s),e.end(t),o()}function c(e,t){if("string"==typeof t&&(t=new Buffer(t)),!Buffer.isBuffer(t))throw new TypeError("Not a string or buffer");var r=i.Z_FINISH;return e._processChunk(t,r)}function u(e){if(!(this instanceof u))return new u(e);y.call(this,e,i.DEFLATE)}function l(e){if(!(this instanceof l))return new l(e);y.call(this,e,i.INFLATE)}function f(e){if(!(this instanceof f))return new f(e);y.call(this,e,i.GZIP)}function h(e){if(!(this instanceof h))return new h(e);y.call(this,e,i.GUNZIP)}function d(e){if(!(this instanceof d))return new d(e);y.call(this,e,i.DEFLATERAW)}function p(e){if(!(this instanceof p))return new p(e);y.call(this,e,i.INFLATERAW)}function g(e){if(!(this instanceof g))return new g(e);y.call(this,e,i.UNZIP)}function y(e,r){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,n.call(this,e),e.flush&&e.flush!==i.Z_NO_FLUSH&&e.flush!==i.Z_PARTIAL_FLUSH&&e.flush!==i.Z_SYNC_FLUSH&&e.flush!==i.Z_FULL_FLUSH&&e.flush!==i.Z_FINISH&&e.flush!==i.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||i.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Buffer.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new i.Zlib(r);var o=this;this._hadError=!1,this._binding.onerror=function(e,r){o._binding=null,o._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],o.emit("error",n)};var s=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(s=e.level);var a=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(a=e.strategy),this._binding.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,s,e.memLevel||t.Z_DEFAULT_MEMLEVEL,a,e.dictionary),this._buffer=new Buffer(this._chunkSize),this._offset=0,this._closed=!1,this._level=s,this._strategy=a,this.once("end",this.close)}i.Z_MIN_WINDOWBITS=8,i.Z_MAX_WINDOWBITS=15,i.Z_DEFAULT_WINDOWBITS=15,i.Z_MIN_CHUNK=64,i.Z_MAX_CHUNK=1/0,i.Z_DEFAULT_CHUNK=16384,i.Z_MIN_MEMLEVEL=1,i.Z_MAX_MEMLEVEL=9,i.Z_DEFAULT_MEMLEVEL=8,i.Z_MIN_LEVEL=-1,i.Z_MAX_LEVEL=9,i.Z_DEFAULT_LEVEL=i.Z_DEFAULT_COMPRESSION,Object.keys(i).forEach((function(e){e.match(/^Z/)&&(t[e]=i[e])})),t.codes={Z_OK:i.Z_OK,Z_STREAM_END:i.Z_STREAM_END,Z_NEED_DICT:i.Z_NEED_DICT,Z_ERRNO:i.Z_ERRNO,Z_STREAM_ERROR:i.Z_STREAM_ERROR,Z_DATA_ERROR:i.Z_DATA_ERROR,Z_MEM_ERROR:i.Z_MEM_ERROR,Z_BUF_ERROR:i.Z_BUF_ERROR,Z_VERSION_ERROR:i.Z_VERSION_ERROR},Object.keys(t.codes).forEach((function(e){t.codes[t.codes[e]]=e})),t.Deflate=u,t.Inflate=l,t.Gzip=f,t.Gunzip=h,t.DeflateRaw=d,t.InflateRaw=p,t.Unzip=g,t.createDeflate=function(e){return new u(e)},t.createInflate=function(e){return new l(e)},t.createDeflateRaw=function(e){return new d(e)},t.createInflateRaw=function(e){return new p(e)},t.createGzip=function(e){return new f(e)},t.createGunzip=function(e){return new h(e)},t.createUnzip=function(e){return new g(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new u(t),e,r)},t.deflateSync=function(e,t){return c(new u(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new f(t),e,r)},t.gzipSync=function(e,t){return c(new f(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new d(t),e,r)},t.deflateRawSync=function(e,t){return c(new d(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new g(t),e,r)},t.unzipSync=function(e,t){return c(new g(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new l(t),e,r)},t.inflateSync=function(e,t){return c(new l(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new h(t),e,r)},t.gunzipSync=function(e,t){return c(new h(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),a(new p(t),e,r)},t.inflateRawSync=function(e,t){return c(new p(t),e)},o.inherits(y,n),y.prototype.params=function(e,r,n){if(e<t.Z_MIN_LEVEL||e>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var o=this;this.flush(i.Z_SYNC_FLUSH,(function(){o._binding.params(e,r),o._hadError||(o._level=e,o._strategy=r,n&&n())}))}else process.nextTick(n)},y.prototype.reset=function(){return this._binding.reset()},y.prototype._flush=function(e){this._transform(new Buffer(0),"",e)},y.prototype.flush=function(e,t){var r=this._writableState;if(("function"==typeof e||void 0===e&&!t)&&(t=e,e=i.Z_FULL_FLUSH),r.ended)t&&process.nextTick(t);else if(r.ending)t&&this.once("end",t);else if(r.needDrain){var n=this;this.once("drain",(function(){n.flush(t)}))}else this._flushFlag=e,this.write(new Buffer(0),"",t)},y.prototype.close=function(e){if(e&&process.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var t=this;process.nextTick((function(){t.emit("close")}))}},y.prototype._transform=function(e,t,r){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);if(null===!e&&!Buffer.isBuffer(e))return r(new Error("invalid input"));s?n=i.Z_FINISH:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||i.Z_NO_FLUSH)),this._processChunk(e,n,r)},y.prototype._processChunk=function(e,t,r){var n=e&&e.length,i=this._chunkSize-this._offset,o=0,a=this,c="function"==typeof r;if(!c){var u,l=[],f=0;this.on("error",(function(e){u=e}));do{var h=this._binding.writeSync(t,e,o,n,this._buffer,this._offset,i)}while(!this._hadError&&g(h[0],h[1]));if(this._hadError)throw u;var d=Buffer.concat(l,f);return this.close(),d}var p=this._binding.write(t,e,o,n,this._buffer,this._offset,i);function g(u,h){if(!a._hadError){var d=i-h;if(s(d>=0,"have should not go down"),d>0){var p=a._buffer.slice(a._offset,a._offset+d);a._offset+=d,c?a.push(p):(l.push(p),f+=p.length)}if((0===h||a._offset>=a._chunkSize)&&(i=a._chunkSize,a._offset=0,a._buffer=new Buffer(a._chunkSize)),0===h){if(o+=n-u,n=u,!c)return!0;var y=a._binding.write(t,e,o,n,a._buffer,a._offset,a._chunkSize);return y.callback=g,void(y.buffer=e)}if(!c)return!1;r()}}p.buffer=e,p.callback=g},o.inherits(u,y),o.inherits(l,y),o.inherits(f,y),o.inherits(h,y),o.inherits(d,y),o.inherits(p,y),o.inherits(g,y)},8287:(e,t,r)=>{"use strict";var n=r(7526),i=r(251),o=r(4634);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,r)}function u(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=a(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}(e,t,r):function(e,t){if(c.isBuffer(t)){var r=0|d(t.length);return 0===(e=a(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|d(t)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|d(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){for(var f=!0,h=0;h<c;h++)if(u(e,o+h)!==u(t,h)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function v(e,t,r,n){return D(F(t,e.length-r),e,r,n)}function E(e,t,r,n){return D(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return E(e,t,r,n)}function x(e,t,r,n){return D(z(t),e,r,n)}function S(e,t,r,n){return D(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,c,u=e[i],l=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=B));return r}(n)}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==r.g.TYPED_ARRAY_SUPPORT?r.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,r){return u(null,e,t,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?a(e,t):void 0!==r?"string"==typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}(null,e,t,r)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=c.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):g.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,r,n,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r),f=0;f<a;++f)if(u[f]!==l[f]){o=u[f],s=l[f];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function R(e,t,r){var n,i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var o="",s=t;s<r;++s)o+=(n=e[s])<16?"0"+n.toString(16):n.toString(16);return o}function P(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function L(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},c.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=c.isBuffer(e)?e:F(new c(e,n).toString()),a=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var $=/[^+\/0-9A-Za-z-_]/g;function F(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}},5622:(e,t,r)=>{function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(8287).Buffer.isBuffer},8e3:e=>{var t=1e3,r=60*t,n=60*r,i=24*n;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=i?o(a,c,i,"day"):c>=n?o(a,c,n,"hour"):c>=r?o(a,c,r,"minute"):c>=t?o(a,c,t,"second"):a+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7833:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];r=o.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(8e3),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},228:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,o),!0;case 6:return l.fn.call(l.context,t,n,i,o,s),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var h,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,i);break;default:if(!c)for(h=1,c=new Array(f-1);h<f;h++)c[h-1]=arguments[h];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||i&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=p(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},1083:(e,t,r)=>{var n=r(7524),i=e.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);i.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",n.request.call(this,e,t)}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[r+d]=255&s,d+=p,s/=256,u-=8);e[r+d-p]|=128*g}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4634:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},6215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStatusCodeError=t.InvalidCertError=void 0;const n=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class i extends Error{constructor(e,t){super(e),this.fingerprint256=t}}t.InvalidCertError=i;class o extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function s(e,t){if(!t||"text"===t||"json"===t)try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===t)return r;try{return JSON.parse(r)}catch(e){if("json"===t)throw e;return r}}catch(e){if("text"===t||"json"===t)throw e}return e}t.InvalidStatusCodeError=o;let a={};function c(e,t){let u={...n,...t};const l=r(7524),f=r(1083),h=r(3590),{promisify:d}=r(537),{resolve:p}=r(8835),g=!!/^https/.test(e);let y={method:u.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const b=e=>e.replace(/:| /g,"").toLowerCase();if(u.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},t=[g,g&&u.sslPinnedCertificates?.map((e=>b(e))).sort()].join();y.agent=a[t]||(a[t]=new(g?f:l).Agent(e))}return"json"===u.type&&(y.headers["Content-Type"]="application/json"),u.data&&(u.method||(y.method="POST"),y.body="json"===u.type?JSON.stringify(u.data):u.data),y.headers={...y.headers,...u.headers},u.sslAllowSelfSigned&&(y.rejectUnauthorized=!1),new Promise(((t,r)=>{const n=async t=>{if(t&&"DEPTH_ZERO_SELF_SIGNED_CERT"===t.code)try{await c(e,{...u,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(t=new i(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}r(t)},a=(g?f:l).request(e,y,(i=>{i.on("error",n),(async()=>{try{t(await(async t=>{const r=t.statusCode;if(u.redirect&&300<=r&&r<400&&t.headers.location){if(10==u._redirectCount)throw new Error("Request failed. Too much redirects.");return u._redirectCount+=1,await c(p(e,t.headers.location),u)}if(u.expectStatusCode&&r!==u.expectStatusCode)throw t.resume(),new o(r);let n=[];for await(const e of t)n.push(e);let i=Buffer.concat(n);const a=t.headers["content-encoding"];"br"===a&&(i=await d(h.brotliDecompress)(i)),"gzip"!==a&&"deflate"!==a||(i=await d(h.unzip)(i));const l=s(i,u.type);return u.full?{headers:t.headers,status:r,body:l}:l})(i))}catch(e){r(e)}})()}));a.on("error",n);const m=u.sslPinnedCertificates?.map((e=>b(e))),w=e=>{const t=b(e.getPeerCertificate()?.fingerprint256||"");if((t||!e.isSessionReused())&&!m.includes(t))return a.emit("error",new i(`Invalid SSL certificate: ${t} Expected: ${m}`,t)),a.abort()};u.sslPinnedCertificates&&a.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",w.bind(null,e))})),u.keepAlive&&a.setNoDelay(!0),y.body&&a.write(y.body),a.end()}))}const u=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.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((e=>e.toLowerCase())));async function f(e,t){let r={...n,...t};const i=new Headers;"json"===r.type&&i.set("Content-Type","application/json");let a=new URL(e);if(a.username){const e=btoa(`${a.username}:${a.password}`);i.set("Authorization",`Basic ${e}`),a.username="",a.password=""}e=""+a;for(let e in r.headers){const t=e.toLowerCase();(u.has(t)||r.cors&&!l.has(t))&&i.set(e,r.headers[e])}let c={headers:i,redirect:r.redirect?"follow":"manual"};r.referrer||(c.referrerPolicy="no-referrer"),r.cors&&(c.mode="cors"),r.data&&(r.method||(c.method="POST"),c.body="json"===r.type?JSON.stringify(r.data):r.data);const f=await fetch(e,c);if(r.expectStatusCode&&f.status!==r.expectStatusCode)throw new o(f.status);const h=s(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:h}:h}const h=!!("object"==typeof process&&process.versions&&process.versions.node&&process.versions.v8);t.default=function(e,t){return(h?c:f)(e,t)}},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,a,c=i(e),u=1;u<arguments.length;u++){for(var l in s=Object(arguments[u]))r.call(s,l)&&(c[l]=s[l]);if(t){a=t(s);for(var f=0;f<a.length;f++)n.call(s,a[f])&&(c[a[f]]=s[a[f]])}}return c}},1843:(e,t,r)=>{"use strict";const{ErrorWithCause:n}=r(5832),{findCauseByReference:i,getErrorCause:o,messageWithCauses:s,stackWithCauses:a}=r(4306);e.exports={ErrorWithCause:n,findCauseByReference:i,getErrorCause:o,stackWithCauses:a,messageWithCauses:s}},5832:e=>{"use strict";class t extends Error{constructor(e,{cause:r}={}){super(e),this.name=t.name,r&&(this.cause=r),this.message=e}}e.exports={ErrorWithCause:t}},4306:e=>{"use strict";const t=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:void 0}return e.cause instanceof Error?e.cause:void 0}},r=(e,n)=>{if(!(e instanceof Error))return"";const i=e.stack||"";if(n.has(e))return i+"\ncauses have become circular...";const o=t(e);return o?(n.add(e),i+"\ncaused by: "+r(o,n)):i},n=(e,r,i)=>{if(!(e instanceof Error))return"";const o=i?"":e.message||"";if(r.has(e))return o+": ...";const s=t(e);if(s){r.add(e);const t="cause"in e&&"function"==typeof e.cause;return o+(t?"":": ")+n(s,r,t)}return o};e.exports={findCauseByReference:(e,r)=>{if(!e||!r)return;if(!(e instanceof Error))return;if(!(r.prototype instanceof Error)&&r!==Error)return;const n=new Set;let i=e;for(;i&&!n.has(i);){if(n.add(i),i instanceof r)return i;i=t(i)}},getErrorCause:t,stackWithCauses:e=>r(e,new Set),messageWithCauses:e=>n(e,new Set)}},4930:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,i,o){n=n||"&",i=i||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(n);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var f,h,d,p,g=e[l].replace(a,"%20"),y=g.indexOf(i);y>=0?(f=g.substr(0,y),h=g.substr(y+1)):(f=g,h=""),d=decodeURIComponent(f),p=decodeURIComponent(h),t(s,d)?r(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},1590:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,o,s,a){return o=o||"&",s=s||"=",null===e&&(e=void 0),"object"==typeof e?n(i(e),(function(i){var a=encodeURIComponent(t(i))+s;return r(e[i])?n(e[i],(function(e){return a+encodeURIComponent(t(e))})).join(o):a+encodeURIComponent(t(e[i]))})).join(o):a?encodeURIComponent(t(a))+s+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},2894:(e,t,r)=>{"use strict";t.decode=t.parse=r(4930),t.encode=t.stringify=r(1590)},7264:(e,t,r)=>{e.exports=r(5382)},5382:(e,t,r)=>{e.exports=a;var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},i=r(5622);i.inherits=r(6698);var o=r(5412),s=r(6708);function a(e){if(!(this instanceof a))return new a(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}i.inherits(a,o),function(e,t){for(var r=0,n=e.length;r<n;r++)i=e[r],a.prototype[i]||(a.prototype[i]=s.prototype[i]);var i}(n(s.prototype))},3600:(e,t,r)=>{e.exports=o;var n=r(4610),i=r(5622);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(6698),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},5412:(e,t,r)=>{e.exports=f;var n=r(7225),i=r(8287).Buffer;f.ReadableState=l;var o=r(7007).EventEmitter;o.listenerCount||(o.listenerCount=function(e,t){return e.listeners(t).length});var s,a=r(8310),c=r(5622);c.inherits=r(6698);var u=r(537);function l(e,t){var n=r(5382),i=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=r(9579).I),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function f(e){if(r(5382),!(this instanceof f))return new f(e);this._readableState=new l(e,this),this.readable=!0,a.call(this)}function h(e,t,r,n,i){var o=function(e,t){var r=null;return c.isBuffer(t)||c.isString(t)||c.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(t,r);if(o)e.emit("error",o);else if(c.isNullOrUndefined(r))t.reading=!1,t.ended||function(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,g(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else t.endEmitted&&i?(s=new Error("stream.unshift() after end event"),e.emit("error",s)):(!t.decoder||i||n||(r=t.decoder.write(r)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&g(e)),function(e,t){t.readingMore||(t.readingMore=!0,process.nextTick((function(){!function(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(u("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}(e,t)})))}(e,t));else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}u=u&&u.debuglog?u.debuglog("stream"):function(){},c.inherits(f,a),f.prototype.push=function(e,t){var r=this._readableState;return c.isString(e)&&!r.objectMode&&(t=t||r.defaultEncoding)!==r.encoding&&(e=new i(e,t),t=""),h(this,r,e,t,!1)},f.prototype.unshift=function(e){return h(this,this._readableState,e,"",!0)},f.prototype.setEncoding=function(e){return s||(s=r(9579).I),this._readableState.decoder=new s(e),this._readableState.encoding=e,this};var d=8388608;function p(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||c.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>=d)e=d;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function g(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?process.nextTick((function(){y(e)})):y(e))}function y(e){u("emit readable"),e.emit("readable"),b(e)}function b(e){var t=e._readableState;if(u("flow",t.flowing),t.flowing)do{var r=e.read()}while(null!==r&&t.flowing)}function m(e,t){var r,n=t.buffer,o=t.length,s=!!t.decoder,a=!!t.objectMode;if(0===n.length)return null;if(0===o)r=null;else if(a)r=n.shift();else if(!e||e>=o)r=s?n.join(""):i.concat(n,o),n.length=0;else if(e<n[0].length)r=(f=n[0]).slice(0,e),n[0]=f.slice(e);else if(e===n[0].length)r=n.shift();else{r=s?"":new i(e);for(var c=0,u=0,l=n.length;u<l&&c<e;u++){var f=n[0],h=Math.min(e-c,f.length);s?r+=f.slice(0,h):f.copy(r,c,0,h),h<f.length?n[0]=f.slice(h):n.shift(),c+=h}}return r}function w(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,process.nextTick((function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))})))}f.prototype.read=function(e){u("read",e);var t=this._readableState,r=e;if((!c.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?w(this):g(this),null;if(0===(e=p(e,t))&&t.ended)return 0===t.length&&w(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),(t.ended||t.reading)&&u("reading or ended",i=!1),i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=p(r,t)),n=e>0?m(e,t):null,c.isNull(n)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&w(this),c.isNull(n)||this.emit("data",n),n},f.prototype._read=function(e){this.emit("error",new Error("not implemented"))},f.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=t&&!1===t.end||e===process.stdout||e===process.stderr?f:c;function a(e){u("onunpipe"),e===r&&f()}function c(){u("onend"),e.end()}i.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o.listenerCount(e,"data")&&(t.flowing=!0,b(e))}}(r);function f(){u("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",a),r.removeListener("end",c),r.removeListener("end",f),r.removeListener("data",h),!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}function h(t){u("ondata"),!1===e.write(t)&&(u("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,r.pause())}function d(t){u("onerror",t),y(),e.removeListener("error",d),0===o.listenerCount(e,"error")&&e.emit("error",t)}function p(){e.removeListener("finish",g),y()}function g(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return e.on("drain",l),r.on("data",h),e._events&&e._events.error?n(e._events.error)?e._events.error.unshift(d):e._events.error=[d,e._events.error]:e.on("error",d),e.once("close",p),e.once("finish",g),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},f.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}return-1===(i=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}(t.pipes,e))||(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},f.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var n=this._readableState;if(!n.readableListening)if(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading)n.length&&g(this);else{var i=this;process.nextTick((function(){u("readable nexttick read 0"),i.read(0)}))}}return r},f.prototype.addListener=f.prototype.on,f.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!0,e.reading||(u("resume read 0"),this.read(0)),function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick((function(){!function(e,t){t.resumeScheduled=!1,e.emit("resume"),b(e),t.flowing&&!t.reading&&e.read(0)}(e,t)})))}(this,e)),this},f.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this},f.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(u("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){u("wrapped data"),t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)&&(n.push(i)||(r=!0,e.pause()))})),e)c.isFunction(e[i])&&c.isUndefined(this[i])&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(t,r){for(var i=0,o=t.length;i<o;i++)s=t[i],e.on(s,n.emit.bind(n,s));var s}(["error","close","destroy","pause","resume"]),n._read=function(t){u("wrapped _read",t),r&&(r=!1,e.resume())},n},f._fromList=m},4610:(e,t,r)=>{e.exports=s;var n=r(5382),i=r(5622);function o(e,t){this.afterTransform=function(e,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var o=n.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,i.isNullOrUndefined(r)||e.push(r),o&&o(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),this._transformState=new o(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",(function(){i.isFunction(this._flush)?this._flush((function(e){a(t,e)})):a(t)}))}function a(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}i.inherits=r(6698),i.inherits(s,n),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;i.isNull(t.writechunk)||!t.writecb||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))}},6708:(e,t,r)=>{e.exports=c;var n=r(8287).Buffer;c.WritableState=a;var i=r(5622);i.inherits=r(6698);var o=r(8310);function s(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function a(e,t){var n=r(5382),i=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){r?process.nextTick((function(){t.pendingcb--,i(n)})):(t.pendingcb--,i(n)),e._writableState.errorEmitted=!0,e.emit("error",n)}(e,r,n,t,i);else{var o=h(0,r);o||r.corked||r.bufferProcessing||!r.buffer.length||f(e,r),n?process.nextTick((function(){l(e,r,o,i)})):l(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function c(e){var t=r(5382);if(!(this instanceof c||this instanceof t))return new c(e);this._writableState=new a(e,this),this.writable=!0,o.call(this)}function u(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function l(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),p(e,t)}function f(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var r=[],n=0;n<t.buffer.length;n++)r.push(t.buffer[n].callback);t.pendingcb++,u(e,t,!0,t.length,t.buffer,"",(function(e){for(var n=0;n<r.length;n++)t.pendingcb--,r[n](e)})),t.buffer=[]}else{for(n=0;n<t.buffer.length;n++){var i=t.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=t.objectMode?1:o.length;if(u(e,t,!1,c,o,s,a),t.writing){n++;break}}n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}t.bufferProcessing=!1}function h(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function d(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function p(e,t){var r=h(0,t);return r&&(0===t.pendingcb?(d(e,t),t.finished=!0,e.emit("finish")):d(e,t)),r}i.inherits(c,o),c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},c.prototype.write=function(e,t,r){var o=this._writableState,a=!1;return i.isFunction(t)&&(r=t,t=null),i.isBuffer(e)?t="buffer":t||(t=o.defaultEncoding),i.isFunction(r)||(r=function(){}),o.ended?function(e,t,r){var n=new Error("write after end");e.emit("error",n),process.nextTick((function(){r(n)}))}(this,0,r):function(e,t,r,n){var o=!0;if(!(i.isBuffer(r)||i.isString(r)||i.isNullOrUndefined(r)||t.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),process.nextTick((function(){n(s)})),o=!1}return o}(this,o,e,r)&&(o.pendingcb++,a=function(e,t,r,o,a){r=function(e,t,r){return!e.objectMode&&!1!==e.decodeStrings&&i.isString(t)&&(t=new n(t,r)),t}(t,r,o),i.isBuffer(r)&&(o="buffer");var c=t.objectMode?1:r.length;t.length+=c;var l=t.length<t.highWaterMark;return l||(t.needDrain=!0),t.writing||t.corked?t.buffer.push(new s(r,o,a)):u(e,t,!1,c,r,o,a),l}(this,o,e,t,r)),a},c.prototype.cork=function(){this._writableState.corked++},c.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||f(this,e))},c.prototype._write=function(e,t,r){r(new Error("not implemented"))},c.prototype._writev=null,c.prototype.end=function(e,t,r){var n=this._writableState;i.isFunction(e)?(r=e,e=null,t=null):i.isFunction(t)&&(r=t,t=null),i.isNullOrUndefined(e)||this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,p(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0}(this,n,r)}},7225:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2546:(e,t,r)=>{e.exports=r(3600)},4198:(e,t,r)=>{(t=e.exports=r(5412)).Stream=r(8310),t.Readable=t,t.Writable=r(6708),t.Duplex=r(5382),t.Transform=r(4610),t.PassThrough=r(3600),process.browser||"disable"!==process.env.READABLE_STREAM||(e.exports=r(8310))},7040:(e,t,r)=>{e.exports=r(4610)},1818:(e,t,r)=>{e.exports=r(6708)},3904:(e,t,r)=>{const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new f(e.value,t).test(this.value):""===e.operator?""===e.value||new f(this.value,t).test(e.semver):!((t=o(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=i;const o=r(8587),{safeRe:s,t:a}=r(9718),c=r(2111),u=r(7272),l=r(3908),f=r(8311)},8311:(e,t,r)=>{class n{constructor(e,t){if(t=o(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&g))+":"+e,r=i.get(t);if(r)return r;const n=this.options.loose,o=n?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(o,T(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],f),a("comparator trim",e);let c=(e=(e=e.replace(u[l.TILDETRIM],h)).replace(u[l.CARETTRIM],d)).split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>k(e,this.options)));n&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),a("range list",c);const b=new Map,m=c.map((e=>new s(e,this.options)));for(const e of m){if(y(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const v=[...b.values()];return i.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>m(r,t)&&e.set.some((e=>m(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const i=new(r(8357))({max:1e3}),o=r(8587),s=r(3904),a=r(7272),c=r(3908),{safeRe:u,t:l,comparatorTrimReplace:f,tildeTrimReplace:h,caretTrimReplace:d}=r(9718),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:g}=r(6874),y=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,m=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},w=(e,t)=>(a("comp",e,t),e=x(e,t),a("caret",e),e=E(e,t),a("tildes",e),e=A(e,t),a("xrange",e),e=B(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map((e=>_(e,t))).join(" "),_=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,n,i,o)=>{let s;return a("tilde",e,t,r,n,i,o),v(r)?s="":v(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:v(i)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,o,s)=>{let c;return a("caret",e,t,r,i,o,s),v(r)?c="":v(i)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(o)?c="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===r?"0"===i?`>=${r}.${i}.${o}-${s} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${s} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),a("caret return",c),c}))},A=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>I(e,t))).join(" ")),I=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,n,i,o,s,c)=>{a("xRange",e,r,n,i,o,s,c);const u=v(i),l=u||v(o),f=l||v(s),h=f;return"="===n&&h&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),"<"===n&&(c="-0"),r=`${n+i}.${o}.${s}${c}`):l?r=`>=${i}.0.0${c} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),a("xRange return",r),r}))},B=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),k=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),T=e=>(t,r,n,i,o,s,a,c,u,l,f,h,d)=>`${r=v(n)?"":v(i)?`>=${n}.0.0${e?"-0":""}`:v(o)?`>=${n}.${i}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=v(u)?"":v(l)?`<${+u+1}.0.0-0`:v(f)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${f}-${h}`:e?`<${u}.${l}.${+f+1}-0`:`<=${c}`}`.trim(),R=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908:(e,t,r)=>{const n=r(7272),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(6874),{safeRe:s,t:a}=r(9718),c=r(8587),{compareIdentifiers:u}=r(1123);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return u(r,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return u(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},7414:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},2111:(e,t,r)=>{const n=r(4641),i=r(3999),o=r(5580),s=r(4089),a=r(7059),c=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return i(e,r,u);case">":return o(e,r,u);case">=":return s(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},6170:(e,t,r)=>{const n=r(3908),i=r(144),{safeRe:o,t:s}=r(9718);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else r=e.match(o[s.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},909:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r)=>{const i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)}},1763:(e,t,r)=>{const n=r(560);e.exports=(e,t)=>n(e,t,!0)},560:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},1832:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;const s=o>0,a=s?r:i,c=s?i:r,u=!!a.prerelease.length;if(c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}},4641:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},3007:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}}},7059:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<0},5200:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<=0},2938:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).major},6254:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).minor},3999:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},144:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},4493:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).patch},1729:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},9970:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(t,e,r)},4277:(e,t,r)=>{const n=r(909);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},7638:(e,t,r)=>{const n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3927:(e,t,r)=>{const n=r(909);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},6953:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},9589:(e,t,r)=>{const n=r(9718),i=r(6874),o=r(3908),s=r(1123),a=r(144),c=r(6953),u=r(7414),l=r(3007),f=r(1832),h=r(2938),d=r(6254),p=r(4493),g=r(1729),y=r(560),b=r(9970),m=r(1763),w=r(909),v=r(3927),E=r(4277),_=r(5580),x=r(7059),S=r(4641),A=r(3999),I=r(4089),B=r(5200),k=r(2111),T=r(6170),R=r(3904),P=r(8311),C=r(7638),O=r(7631),L=r(9628),N=r(270),j=r(1261),M=r(3874),U=r(7075),$=r(5571),F=r(5342),z=r(6780),D=r(2525),H=r(5032);e.exports={parse:a,valid:c,clean:u,inc:l,diff:f,major:h,minor:d,patch:p,prerelease:g,compare:y,rcompare:b,compareLoose:m,compareBuild:w,sort:v,rsort:E,gt:_,lt:x,eq:S,neq:A,gte:I,lte:B,cmp:k,coerce:T,Comparator:R,Range:P,satisfies:C,toComparators:O,maxSatisfying:L,minSatisfying:N,minVersion:j,validRange:M,outside:U,gtr:$,ltr:F,intersects:z,simplifyRange:D,subset:H,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},6874:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1123:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8587:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(6874),i=r(7272),o=(t=e.exports={}).re=[],s=t.safeRe=[],a=t.src=[],c=t.t={};let u=0;const l=(e,t,r)=>{const n=t.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),l=u++;i(e,l,t),c[e]=l,a[l]=t,o[l]=new RegExp(t,r?"g":void 0),s[l]=new RegExp(n,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${a[c.NUMERICIDENTIFIER]}|${a[c.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${a[c.NUMERICIDENTIFIERLOOSE]}|${a[c.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${a[c.PRERELEASEIDENTIFIER]}(?:\\.${a[c.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${a[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[c.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${a[c.BUILDIDENTIFIER]}(?:\\.${a[c.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${a[c.MAINVERSION]}${a[c.PRERELEASE]}?${a[c.BUILD]}?`),l("FULL",`^${a[c.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${a[c.MAINVERSIONLOOSE]}${a[c.PRERELEASELOOSE]}?${a[c.BUILD]}?`),l("LOOSE",`^${a[c.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${a[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${a[c.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${a[c.XRANGEIDENTIFIER]})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:${a[c.PRERELEASE]})?${a[c.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:${a[c.PRERELEASELOOSE]})?${a[c.BUILD]}?)?)?`),l("XRANGE",`^${a[c.GTLT]}\\s*${a[c.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${a[c.GTLT]}\\s*${a[c.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",a[c.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${a[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${a[c.LONETILDE]}${a[c.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${a[c.LONETILDE]}${a[c.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${a[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${a[c.LONECARET]}${a[c.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${a[c.LONECARET]}${a[c.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${a[c.GTLT]}\\s*(${a[c.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]}|${a[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${a[c.XRANGEPLAIN]})\\s+-\\s+(${a[c.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${a[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[c.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},8357:(e,t,r)=>{"use strict";const n=r(8799),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),d=Symbol("updateAgeOnGet"),p=()=>1,g=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(y(e,t)){if(m(e,n),!e[a])return}else r&&(e[d]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},b=e=>{if(e[o]>e[i])for(let t=e[f].tail;e[o]>e[i]&&null!==t;){const r=t.prev;m(e,t),t=r}},m=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[o]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}};class w{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const v=(e,t,r,n)=>{let i=r.value;y(e,i)&&(m(e,r),e[a]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[s]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,b(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,b(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[s]&&(this[s]=e,this[o]=0,this[f].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[u]&&this[f]&&this[f].length&&this[f].forEach((e=>this[u](e.key,e.value))),this[h]=new Map,this[f]=new n,this[o]=0}dump(){return this[f].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[i])return m(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),b(this),!0}const d=new w(e,t,a,n,r);return d.length>this[i]?(this[u]&&this[u](e,t),!1):(this[o]+=d.length,this[f].unshift(d),this[h].set(e,this[f].head),b(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!y(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[f].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>g(this,t,!1)))}}},5571:(e,t,r)=>{const n=r(7075);e.exports=(e,t,r)=>n(e,t,">",r)},6780:(e,t,r)=>{const n=r(8311);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5342:(e,t,r)=>{const n=r(7075);e.exports=(e,t,r)=>n(e,t,"<",r)},9628:(e,t,r)=>{const n=r(3908),i=r(8311);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},270:(e,t,r)=>{const n=r(3908),i=r(8311);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},1261:(e,t,r)=>{const n=r(3908),i=r(8311),o=r(5580);e.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!o(r,s)||(r=s)}return r&&e.test(r)?r:null}},7075:(e,t,r)=>{const n=r(3908),i=r(3904),{ANY:o}=i,s=r(8311),a=r(7638),c=r(5580),u=r(7059),l=r(5200),f=r(4089);e.exports=(e,t,r,h)=>{let d,p,g,y,b;switch(e=new n(e,h),t=new s(t,h),r){case">":d=c,p=l,g=u,y=">",b=">=";break;case"<":d=u,p=f,g=c,y="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let s=null,a=null;if(n.forEach((e=>{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,d(e.semver,s.semver,h)?s=e:g(e.semver,a.semver,h)&&(a=e)})),s.operator===y||s.operator===b)return!1;if((!a.operator||a.operator===y)&&p(e,a.semver))return!1;if(a.operator===b&&g(e,a.semver))return!1}return!0}},2525:(e,t,r)=>{const n=r(7638),i=r(560);e.exports=(e,t,r)=>{const o=[];let s=null,a=null;const c=e.sort(((e,t)=>i(e,t,r)));for(const e of c)n(e,t,r)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},5032:(e,t,r)=>{const n=r(8311),i=r(3904),{ANY:o}=i,s=r(7638),a=r(560),c=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=u}const n=new Set;let i,l,d,p,g,y,b;for(const t of e)">"===t.operator||">="===t.operator?i=f(i,t,r):"<"===t.operator||"<="===t.operator?l=h(l,t,r):n.add(t.semver);if(n.size>1)return null;if(i&&l){if(d=a(i.semver,l.semver,r),d>0)return null;if(0===d&&(">="!==i.operator||"<="!==l.operator))return null}for(const e of n){if(i&&!s(e,String(i),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let m=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,w=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;m&&1===m.prerelease.length&&"<"===l.operator&&0===m.prerelease[0]&&(m=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,i)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(p=f(i,e,r),p===e&&p!==i)return!1}else if(">="===i.operator&&!s(i.semver,String(e),r))return!1;if(l)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),"<"===e.operator||"<="===e.operator){if(g=h(l,e,r),g===e&&g!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(e),r))return!1;if(!e.operator&&(l||i)&&0!==d)return!1}return!(i&&y&&!l&&0!==d||l&&b&&!i&&0!==d||w||m)},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},h=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},7631:(e,t,r)=>{const n=r(8311);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},3874:(e,t,r)=>{const n=r(8311);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},8310:(e,t,r)=>{e.exports=i;var n=r(7007).EventEmitter;function i(){n.call(this)}r(6698)(i,n),i.Readable=r(4198),i.Writable=r(1818),i.Duplex=r(7264),i.Transform=r(7040),i.PassThrough=r(2546),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",c));var s=!1;function a(){s||(s=!0,e.end())}function c(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",u),e.on("error",u),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},9579:(e,t,r)=>{var n=r(8287).Buffer,i=n.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},o=t.I=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!i(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=c;break;default:return void(this.write=s)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function s(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function c(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(n=t.charCodeAt(i))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},6386:function(e){!function(t,r){"use strict";e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())}(this,(function(){"use strict";var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,r=unescape(encodeURIComponent(e)),n=new Uint8Array(r.length);for(t=0;t<r.length;t++)n[t]=r.charCodeAt(t);return n},e.encodeUTF8=function(e){var t,r=[];for(t=0;t<e.length;t++)r.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(r.join("")))},"undefined"==typeof atob?void 0!==Buffer.from?(e.encodeBase64=function(e){return Buffer.from(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(Buffer.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new Buffer(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(new Buffer(e,"base64"),0))}):(e.encodeBase64=function(e){var t,r=[],n=e.length;for(t=0;t<n;t++)r.push(String.fromCharCode(e[t]));return btoa(r.join(""))},e.decodeBase64=function(e){t(e);var r,n=atob(e),i=new Uint8Array(n.length);for(r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}),e}))},8947:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=t(),a=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=e[t+o]^r[n+o];return(1&s-1>>>8)-1}function y(e,t,r,n){return g(e,t,r,n,16)}function b(e,t,r,n){return g(e,t,r,n,32)}function m(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=o,_=s,x=a,S=c,A=u,I=l,B=f,k=h,T=d,R=p,P=g,C=y,O=b,L=m,N=w,j=v,M=0;M<20;M+=2)E^=(i=(O^=(i=(T^=(i=(A^=(i=E+O|0)<<7|i>>>25)+E|0)<<9|i>>>23)+A|0)<<13|i>>>19)+T|0)<<18|i>>>14,I^=(i=(_^=(i=(L^=(i=(R^=(i=I+_|0)<<7|i>>>25)+I|0)<<9|i>>>23)+R|0)<<13|i>>>19)+L|0)<<18|i>>>14,P^=(i=(B^=(i=(x^=(i=(N^=(i=P+B|0)<<7|i>>>25)+P|0)<<9|i>>>23)+N|0)<<13|i>>>19)+x|0)<<18|i>>>14,j^=(i=(C^=(i=(k^=(i=(S^=(i=j+C|0)<<7|i>>>25)+j|0)<<9|i>>>23)+S|0)<<13|i>>>19)+k|0)<<18|i>>>14,E^=(i=(S^=(i=(x^=(i=(_^=(i=E+S|0)<<7|i>>>25)+E|0)<<9|i>>>23)+_|0)<<13|i>>>19)+x|0)<<18|i>>>14,I^=(i=(A^=(i=(k^=(i=(B^=(i=I+A|0)<<7|i>>>25)+I|0)<<9|i>>>23)+B|0)<<13|i>>>19)+k|0)<<18|i>>>14,P^=(i=(R^=(i=(T^=(i=(C^=(i=P+R|0)<<7|i>>>25)+P|0)<<9|i>>>23)+C|0)<<13|i>>>19)+T|0)<<18|i>>>14,j^=(i=(N^=(i=(L^=(i=(O^=(i=j+N|0)<<7|i>>>25)+j|0)<<9|i>>>23)+O|0)<<13|i>>>19)+L|0)<<18|i>>>14;E=E+o|0,_=_+s|0,x=x+a|0,S=S+c|0,A=A+u|0,I=I+l|0,B=B+f|0,k=k+h|0,T=T+d|0,R=R+p|0,P=P+g|0,C=C+y|0,O=O+b|0,L=L+m|0,N=N+w|0,j=j+v|0,e[0]=E>>>0&255,e[1]=E>>>8&255,e[2]=E>>>16&255,e[3]=E>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=x>>>0&255,e[9]=x>>>8&255,e[10]=x>>>16&255,e[11]=x>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=I>>>0&255,e[21]=I>>>8&255,e[22]=I>>>16&255,e[23]=I>>>24&255,e[24]=B>>>0&255,e[25]=B>>>8&255,e[26]=B>>>16&255,e[27]=B>>>24&255,e[28]=k>>>0&255,e[29]=k>>>8&255,e[30]=k>>>16&255,e[31]=k>>>24&255,e[32]=T>>>0&255,e[33]=T>>>8&255,e[34]=T>>>16&255,e[35]=T>>>24&255,e[36]=R>>>0&255,e[37]=R>>>8&255,e[38]=R>>>16&255,e[39]=R>>>24&255,e[40]=P>>>0&255,e[41]=P>>>8&255,e[42]=P>>>16&255,e[43]=P>>>24&255,e[44]=C>>>0&255,e[45]=C>>>8&255,e[46]=C>>>16&255,e[47]=C>>>24&255,e[48]=O>>>0&255,e[49]=O>>>8&255,e[50]=O>>>16&255,e[51]=O>>>24&255,e[52]=L>>>0&255,e[53]=L>>>8&255,e[54]=L>>>16&255,e[55]=L>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=j>>>0&255,e[61]=j>>>8&255,e[62]=j>>>16&255,e[63]=j>>>24&255}(e,t,r,n)}function w(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=0;E<20;E+=2)o^=(i=(b^=(i=(d^=(i=(u^=(i=o+b|0)<<7|i>>>25)+o|0)<<9|i>>>23)+u|0)<<13|i>>>19)+d|0)<<18|i>>>14,l^=(i=(s^=(i=(m^=(i=(p^=(i=l+s|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+m|0)<<18|i>>>14,g^=(i=(f^=(i=(a^=(i=(w^=(i=g+f|0)<<7|i>>>25)+g|0)<<9|i>>>23)+w|0)<<13|i>>>19)+a|0)<<18|i>>>14,v^=(i=(y^=(i=(h^=(i=(c^=(i=v+y|0)<<7|i>>>25)+v|0)<<9|i>>>23)+c|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(c^=(i=(a^=(i=(s^=(i=o+c|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,l^=(i=(u^=(i=(h^=(i=(f^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+f|0)<<13|i>>>19)+h|0)<<18|i>>>14,g^=(i=(p^=(i=(d^=(i=(y^=(i=g+p|0)<<7|i>>>25)+g|0)<<9|i>>>23)+y|0)<<13|i>>>19)+d|0)<<18|i>>>14,v^=(i=(w^=(i=(m^=(i=(b^=(i=v+w|0)<<7|i>>>25)+v|0)<<9|i>>>23)+b|0)<<13|i>>>19)+m|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function E(e,t,r,n,i,o,s){var a,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(m(l,u,s,v),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(m(l,u,s,v),c=0;c<i;c++)e[t+c]=r[n+c]^l[c];return 0}function _(e,t,r,n,i){var o,s,a=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(m(c,a,i,v),s=0;s<64;s++)e[t+s]=c[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(m(c,a,i,v),s=0;s<r;s++)e[t+s]=c[s];return 0}function x(e,t,r,n,i){var o=new Uint8Array(32);w(o,n,i,v);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return _(e,t,r,s,o)}function S(e,t,r,n,i,o,s){var a=new Uint8Array(32);w(a,o,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=o[u+16];return E(e,t,r,n,i,c,a)}var A=function(e){var t,r,n,i,o,s,a,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function I(e,t,r,n,i,o){var s=new A(o);return s.update(r,n,i),s.finish(e,t),0}function B(e,t,r,n,i,o){var s=new Uint8Array(16);return I(s,0,r,n,i,o),y(e,t,s,0)}function k(e,t,r,n,i){var o;if(r<32)return-1;for(S(e,0,t,0,r,n,i),I(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function T(e,t,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(x(s,0,32,n,i),0!==B(t,16,t,32,r-32,s))return-1;for(S(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function R(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function P(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function C(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function O(e,r){var n,i,o,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(P(a),P(a),P(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,C(a,s,1-o)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function L(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return O(r,e),O(n,t),b(r,0,n,0)}function N(e){var t=new Uint8Array(32);return O(t,e),1&t[0]}function j(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function M(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function $(e,t,r){var n,i,o=0,s=0,a=0,c=0,u=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,b=0,m=0,w=0,v=0,E=0,_=0,x=0,S=0,A=0,I=0,B=0,k=0,T=0,R=0,P=0,C=0,O=0,L=0,N=0,j=r[0],M=r[1],U=r[2],$=r[3],F=r[4],z=r[5],D=r[6],H=r[7],G=r[8],Z=r[9],V=r[10],W=r[11],q=r[12],Y=r[13],K=r[14],J=r[15];o+=(n=t[0])*j,s+=n*M,a+=n*U,c+=n*$,u+=n*F,l+=n*z,f+=n*D,h+=n*H,d+=n*G,p+=n*Z,g+=n*V,y+=n*W,b+=n*q,m+=n*Y,w+=n*K,v+=n*J,s+=(n=t[1])*j,a+=n*M,c+=n*U,u+=n*$,l+=n*F,f+=n*z,h+=n*D,d+=n*H,p+=n*G,g+=n*Z,y+=n*V,b+=n*W,m+=n*q,w+=n*Y,v+=n*K,E+=n*J,a+=(n=t[2])*j,c+=n*M,u+=n*U,l+=n*$,f+=n*F,h+=n*z,d+=n*D,p+=n*H,g+=n*G,y+=n*Z,b+=n*V,m+=n*W,w+=n*q,v+=n*Y,E+=n*K,_+=n*J,c+=(n=t[3])*j,u+=n*M,l+=n*U,f+=n*$,h+=n*F,d+=n*z,p+=n*D,g+=n*H,y+=n*G,b+=n*Z,m+=n*V,w+=n*W,v+=n*q,E+=n*Y,_+=n*K,x+=n*J,u+=(n=t[4])*j,l+=n*M,f+=n*U,h+=n*$,d+=n*F,p+=n*z,g+=n*D,y+=n*H,b+=n*G,m+=n*Z,w+=n*V,v+=n*W,E+=n*q,_+=n*Y,x+=n*K,S+=n*J,l+=(n=t[5])*j,f+=n*M,h+=n*U,d+=n*$,p+=n*F,g+=n*z,y+=n*D,b+=n*H,m+=n*G,w+=n*Z,v+=n*V,E+=n*W,_+=n*q,x+=n*Y,S+=n*K,A+=n*J,f+=(n=t[6])*j,h+=n*M,d+=n*U,p+=n*$,g+=n*F,y+=n*z,b+=n*D,m+=n*H,w+=n*G,v+=n*Z,E+=n*V,_+=n*W,x+=n*q,S+=n*Y,A+=n*K,I+=n*J,h+=(n=t[7])*j,d+=n*M,p+=n*U,g+=n*$,y+=n*F,b+=n*z,m+=n*D,w+=n*H,v+=n*G,E+=n*Z,_+=n*V,x+=n*W,S+=n*q,A+=n*Y,I+=n*K,B+=n*J,d+=(n=t[8])*j,p+=n*M,g+=n*U,y+=n*$,b+=n*F,m+=n*z,w+=n*D,v+=n*H,E+=n*G,_+=n*Z,x+=n*V,S+=n*W,A+=n*q,I+=n*Y,B+=n*K,k+=n*J,p+=(n=t[9])*j,g+=n*M,y+=n*U,b+=n*$,m+=n*F,w+=n*z,v+=n*D,E+=n*H,_+=n*G,x+=n*Z,S+=n*V,A+=n*W,I+=n*q,B+=n*Y,k+=n*K,T+=n*J,g+=(n=t[10])*j,y+=n*M,b+=n*U,m+=n*$,w+=n*F,v+=n*z,E+=n*D,_+=n*H,x+=n*G,S+=n*Z,A+=n*V,I+=n*W,B+=n*q,k+=n*Y,T+=n*K,R+=n*J,y+=(n=t[11])*j,b+=n*M,m+=n*U,w+=n*$,v+=n*F,E+=n*z,_+=n*D,x+=n*H,S+=n*G,A+=n*Z,I+=n*V,B+=n*W,k+=n*q,T+=n*Y,R+=n*K,P+=n*J,b+=(n=t[12])*j,m+=n*M,w+=n*U,v+=n*$,E+=n*F,_+=n*z,x+=n*D,S+=n*H,A+=n*G,I+=n*Z,B+=n*V,k+=n*W,T+=n*q,R+=n*Y,P+=n*K,C+=n*J,m+=(n=t[13])*j,w+=n*M,v+=n*U,E+=n*$,_+=n*F,x+=n*z,S+=n*D,A+=n*H,I+=n*G,B+=n*Z,k+=n*V,T+=n*W,R+=n*q,P+=n*Y,C+=n*K,O+=n*J,w+=(n=t[14])*j,v+=n*M,E+=n*U,_+=n*$,x+=n*F,S+=n*z,A+=n*D,I+=n*H,B+=n*G,k+=n*Z,T+=n*V,R+=n*W,P+=n*q,C+=n*Y,O+=n*K,L+=n*J,v+=(n=t[15])*j,s+=38*(_+=n*U),a+=38*(x+=n*$),c+=38*(S+=n*F),u+=38*(A+=n*z),l+=38*(I+=n*D),f+=38*(B+=n*H),h+=38*(k+=n*G),d+=38*(T+=n*Z),p+=38*(R+=n*V),g+=38*(P+=n*W),y+=38*(C+=n*q),b+=38*(O+=n*Y),m+=38*(L+=n*K),w+=38*(N+=n*J),o=(n=(o+=38*(E+=n*M))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=b,e[13]=m,e[14]=w,e[15]=v}function F(e,t){$(e,t,t)}function z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&$(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function D(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&$(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function H(e,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),u=t(),l=t(),f=t(),h=t(),d=t(),p=t();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,j(a,n),o=0;o<16;o++)l[o]=a[o],h[o]=u[o]=f[o]=0;for(u[0]=h[0]=1,o=254;o>=0;--o)C(u,l,i=s[o>>>3]>>>(7&o)&1),C(f,h,i),M(d,u,f),U(u,u,f),M(f,l,h),U(l,l,h),F(h,d),F(p,u),$(u,f,u),$(f,l,d),M(d,u,f),U(u,u,f),F(l,u),U(f,h,p),$(u,f,c),M(u,u,h),$(f,f,u),$(u,h,p),$(h,l,a),F(l,d),C(u,l,i),C(f,h,i);for(o=0;o<16;o++)a[o+16]=u[o],a[o+32]=f[o],a[o+48]=l[o],a[o+64]=h[o];var g=a.subarray(32),y=a.subarray(16);return z(g,g),$(y,y,g),O(e,y),0}function G(e,t){return H(e,t,o)}function Z(e,t){return n(t,32),G(e,t)}function V(e,t,r){var n=new Uint8Array(32);return H(n,r,t),w(e,i,n,v)}A.prototype.blocks=function(e,t,r){for(var n,i,o,s,a,c,u,l,f,h,d,p,g,y,b,m,w,v,E,_=this.fin?0:2048,x=this.h[0],S=this.h[1],A=this.h[2],I=this.h[3],B=this.h[4],k=this.h[5],T=this.h[6],R=this.h[7],P=this.h[8],C=this.h[9],O=this.r[0],L=this.r[1],N=this.r[2],j=this.r[3],M=this.r[4],U=this.r[5],$=this.r[6],F=this.r[7],z=this.r[8],D=this.r[9];r>=16;)h=f=0,h+=(x+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*O,h+=(S+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*D),h+=(A+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),h+=(I+=8191&(o>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(h+=(B+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*$))>>>13,h&=8191,h+=(k+=a>>>1&8191)*(5*U),h+=(T+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*M),h+=(R+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*j),h+=(P+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),d=f+=(h+=(C+=l>>>5|_)*(5*L))>>>13,d+=x*L,d+=S*O,d+=A*(5*D),d+=I*(5*z),f=(d+=B*(5*F))>>>13,d&=8191,d+=k*(5*$),d+=T*(5*U),d+=R*(5*M),d+=P*(5*j),f+=(d+=C*(5*N))>>>13,d&=8191,p=f,p+=x*N,p+=S*L,p+=A*O,p+=I*(5*D),f=(p+=B*(5*z))>>>13,p&=8191,p+=k*(5*F),p+=T*(5*$),p+=R*(5*U),p+=P*(5*M),g=f+=(p+=C*(5*j))>>>13,g+=x*j,g+=S*N,g+=A*L,g+=I*O,f=(g+=B*(5*D))>>>13,g&=8191,g+=k*(5*z),g+=T*(5*F),g+=R*(5*$),g+=P*(5*U),y=f+=(g+=C*(5*M))>>>13,y+=x*M,y+=S*j,y+=A*N,y+=I*L,f=(y+=B*O)>>>13,y&=8191,y+=k*(5*D),y+=T*(5*z),y+=R*(5*F),y+=P*(5*$),b=f+=(y+=C*(5*U))>>>13,b+=x*U,b+=S*M,b+=A*j,b+=I*N,f=(b+=B*L)>>>13,b&=8191,b+=k*O,b+=T*(5*D),b+=R*(5*z),b+=P*(5*F),m=f+=(b+=C*(5*$))>>>13,m+=x*$,m+=S*U,m+=A*M,m+=I*j,f=(m+=B*N)>>>13,m&=8191,m+=k*L,m+=T*O,m+=R*(5*D),m+=P*(5*z),w=f+=(m+=C*(5*F))>>>13,w+=x*F,w+=S*$,w+=A*U,w+=I*M,f=(w+=B*j)>>>13,w&=8191,w+=k*N,w+=T*L,w+=R*O,w+=P*(5*D),v=f+=(w+=C*(5*z))>>>13,v+=x*z,v+=S*F,v+=A*$,v+=I*U,f=(v+=B*M)>>>13,v&=8191,v+=k*j,v+=T*N,v+=R*L,v+=P*O,E=f+=(v+=C*(5*D))>>>13,E+=x*D,E+=S*z,E+=A*F,E+=I*$,f=(E+=B*U)>>>13,E&=8191,E+=k*M,E+=T*j,E+=R*N,E+=P*L,x=h=8191&(f=(f=((f+=(E+=C*O)>>>13)<<2)+f|0)+(h&=8191)|0),S=d+=f>>>=13,A=p&=8191,I=g&=8191,B=y&=8191,k=b&=8191,T=m&=8191,R=w&=8191,P=v&=8191,C=E&=8191,t+=16,r-=16;this.h[0]=x,this.h[1]=S,this.h[2]=A,this.h[3]=I,this.h[4]=B,this.h[5]=k,this.h[6]=T,this.h[7]=R,this.h[8]=P,this.h[9]=C},A.prototype.finish=function(e,t){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},A.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var W=k,q=T,Y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function K(e,t,r,n){for(var i,o,s,a,c,u,l,f,h,d,p,g,y,b,m,w,v,E,_,x,S,A,I,B,k,T,R=new Int32Array(16),P=new Int32Array(16),C=e[0],O=e[1],L=e[2],N=e[3],j=e[4],M=e[5],U=e[6],$=e[7],F=t[0],z=t[1],D=t[2],H=t[3],G=t[4],Z=t[5],V=t[6],W=t[7],q=0;n>=128;){for(_=0;_<16;_++)x=8*_+q,R[_]=r[x+0]<<24|r[x+1]<<16|r[x+2]<<8|r[x+3],P[_]=r[x+4]<<24|r[x+5]<<16|r[x+6]<<8|r[x+7];for(_=0;_<80;_++)if(i=C,o=O,s=L,a=N,c=j,u=M,l=U,h=F,d=z,p=D,g=H,y=G,b=Z,m=V,I=65535&(A=W),B=A>>>16,k=65535&(S=$),T=S>>>16,I+=65535&(A=(G>>>14|j<<18)^(G>>>18|j<<14)^(j>>>9|G<<23)),B+=A>>>16,k+=65535&(S=(j>>>14|G<<18)^(j>>>18|G<<14)^(G>>>9|j<<23)),T+=S>>>16,I+=65535&(A=G&Z^~G&V),B+=A>>>16,k+=65535&(S=j&M^~j&U),T+=S>>>16,I+=65535&(A=Y[2*_+1]),B+=A>>>16,k+=65535&(S=Y[2*_]),T+=S>>>16,S=R[_%16],B+=(A=P[_%16])>>>16,k+=65535&S,T+=S>>>16,k+=(B+=(I+=65535&A)>>>16)>>>16,I=65535&(A=E=65535&I|B<<16),B=A>>>16,k=65535&(S=v=65535&k|(T+=k>>>16)<<16),T=S>>>16,I+=65535&(A=(F>>>28|C<<4)^(C>>>2|F<<30)^(C>>>7|F<<25)),B+=A>>>16,k+=65535&(S=(C>>>28|F<<4)^(F>>>2|C<<30)^(F>>>7|C<<25)),T+=S>>>16,B+=(A=F&z^F&D^z&D)>>>16,k+=65535&(S=C&O^C&L^O&L),T+=S>>>16,f=65535&(k+=(B+=(I+=65535&A)>>>16)>>>16)|(T+=k>>>16)<<16,w=65535&I|B<<16,I=65535&(A=g),B=A>>>16,k=65535&(S=a),T=S>>>16,B+=(A=E)>>>16,k+=65535&(S=v),T+=S>>>16,O=i,L=o,N=s,j=a=65535&(k+=(B+=(I+=65535&A)>>>16)>>>16)|(T+=k>>>16)<<16,M=c,U=u,$=l,C=f,z=h,D=d,H=p,G=g=65535&I|B<<16,Z=y,V=b,W=m,F=w,_%16==15)for(x=0;x<16;x++)S=R[x],I=65535&(A=P[x]),B=A>>>16,k=65535&S,T=S>>>16,S=R[(x+9)%16],I+=65535&(A=P[(x+9)%16]),B+=A>>>16,k+=65535&S,T+=S>>>16,v=R[(x+1)%16],I+=65535&(A=((E=P[(x+1)%16])>>>1|v<<31)^(E>>>8|v<<24)^(E>>>7|v<<25)),B+=A>>>16,k+=65535&(S=(v>>>1|E<<31)^(v>>>8|E<<24)^v>>>7),T+=S>>>16,v=R[(x+14)%16],B+=(A=((E=P[(x+14)%16])>>>19|v<<13)^(v>>>29|E<<3)^(E>>>6|v<<26))>>>16,k+=65535&(S=(v>>>19|E<<13)^(E>>>29|v<<3)^v>>>6),T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,R[x]=65535&k|T<<16,P[x]=65535&I|B<<16;I=65535&(A=F),B=A>>>16,k=65535&(S=C),T=S>>>16,S=e[0],B+=(A=t[0])>>>16,k+=65535&S,T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,e[0]=C=65535&k|T<<16,t[0]=F=65535&I|B<<16,I=65535&(A=z),B=A>>>16,k=65535&(S=O),T=S>>>16,S=e[1],B+=(A=t[1])>>>16,k+=65535&S,T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,e[1]=O=65535&k|T<<16,t[1]=z=65535&I|B<<16,I=65535&(A=D),B=A>>>16,k=65535&(S=L),T=S>>>16,S=e[2],B+=(A=t[2])>>>16,k+=65535&S,T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,e[2]=L=65535&k|T<<16,t[2]=D=65535&I|B<<16,I=65535&(A=H),B=A>>>16,k=65535&(S=N),T=S>>>16,S=e[3],B+=(A=t[3])>>>16,k+=65535&S,T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,e[3]=N=65535&k|T<<16,t[3]=H=65535&I|B<<16,I=65535&(A=G),B=A>>>16,k=65535&(S=j),T=S>>>16,S=e[4],B+=(A=t[4])>>>16,k+=65535&S,T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,e[4]=j=65535&k|T<<16,t[4]=G=65535&I|B<<16,I=65535&(A=Z),B=A>>>16,k=65535&(S=M),T=S>>>16,S=e[5],B+=(A=t[5])>>>16,k+=65535&S,T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,e[5]=M=65535&k|T<<16,t[5]=Z=65535&I|B<<16,I=65535&(A=V),B=A>>>16,k=65535&(S=U),T=S>>>16,S=e[6],B+=(A=t[6])>>>16,k+=65535&S,T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,e[6]=U=65535&k|T<<16,t[6]=V=65535&I|B<<16,I=65535&(A=W),B=A>>>16,k=65535&(S=$),T=S>>>16,S=e[7],B+=(A=t[7])>>>16,k+=65535&S,T+=S>>>16,T+=(k+=(B+=(I+=65535&A)>>>16)>>>16)>>>16,e[7]=$=65535&k|T<<16,t[7]=W=65535&I|B<<16,q+=128,n-=128}return n}function J(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,K(i,o,t,r),r%=128,n=0;n<r;n++)s[n]=t[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,p(s,r-8,a/536870912|0,a<<3),K(i,o,s,r),n=0;n<8;n++)p(e,8*n,i[n],o[n]);return 0}function X(e,r){var n=t(),i=t(),o=t(),s=t(),a=t(),c=t(),u=t(),f=t(),h=t();U(n,e[1],e[0]),U(h,r[1],r[0]),$(n,n,h),M(i,e[0],e[1]),M(h,r[0],r[1]),$(i,i,h),$(o,e[3],r[3]),$(o,o,l),$(s,e[2],r[2]),M(s,s,s),U(a,i,n),U(c,s,o),M(u,s,o),M(f,i,n),$(e[0],a,c),$(e[1],f,u),$(e[2],u,c),$(e[3],a,f)}function Q(e,t,r){var n;for(n=0;n<4;n++)C(e[n],t[n],r)}function ee(e,r){var n=t(),i=t(),o=t();z(o,r[2]),$(n,r[0],o),$(i,r[1],o),O(e,i),e[31]^=N(n)<<7}function te(e,t,r){var n,i;for(R(e[0],s),R(e[1],a),R(e[2],a),R(e[3],s),i=255;i>=0;--i)Q(e,t,n=r[i/8|0]>>(7&i)&1),X(t,e),X(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];R(n[0],f),R(n[1],h),R(n[2],a),$(n[3],f,h),te(e,n,r)}function ne(e,r,i){var o,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(i||n(r,32),J(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,re(a,s),ee(e,a),o=0;o<32;o++)r[o+32]=e[o];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*ie[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function se(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function ae(e,r,n,i){var o,s,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];J(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=n+64;for(o=0;o<n;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=a[32+o];for(J(u,e.subarray(32),n+32),se(u),re(f,u),ee(e,f),o=32;o<64;o++)e[o]=i[o];for(J(c,e,n+64),se(c),o=0;o<64;o++)l[o]=0;for(o=0;o<32;o++)l[o]=u[o];for(o=0;o<32;o++)for(s=0;s<32;s++)l[o+s]+=c[o]*a[s];return oe(e.subarray(32),l),h}function ce(e,r,n,i){var o,c=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),i=t(),o=t(),c=t(),l=t(),f=t(),h=t();return R(e[2],a),j(e[1],r),F(o,e[1]),$(c,o,u),U(o,o,e[2]),M(c,e[2],c),F(l,c),F(f,l),$(h,f,l),$(n,h,o),$(n,n,c),D(n,n),$(n,n,o),$(n,n,c),$(n,n,c),$(e[0],n,c),F(i,e[0]),$(i,i,c),L(i,o)&&$(e[0],e[0],d),F(i,e[0]),$(i,i,c),L(i,o)?-1:(N(e[0])===r[31]>>7&&U(e[0],s,e[0]),$(e[3],e[0],e[1]),0)}(h,i))return-1;for(o=0;o<n;o++)e[o]=r[o];for(o=0;o<32;o++)e[o+32]=i[o];if(J(l,e,n),se(l),te(f,h,l),re(h,r.subarray(32)),X(f,h),ee(c,f),n-=64,b(r,0,c,0)){for(o=0;o<n;o++)e[o]=0;return-1}for(o=0;o<n;o++)e[o]=r[o+64];return n}var ue=64,le=32,fe=64;function he(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function de(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function pe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:S,crypto_stream:x,crypto_stream_salsa20_xor:E,crypto_stream_salsa20:_,crypto_onetimeauth:I,crypto_onetimeauth_verify:B,crypto_verify_16:y,crypto_verify_32:b,crypto_secretbox:k,crypto_secretbox_open:T,crypto_scalarmult:H,crypto_scalarmult_base:G,crypto_box_beforenm:V,crypto_box_afternm:W,crypto_box:function(e,t,r,n,i,o){var s=new Uint8Array(32);return V(s,i,o),W(e,t,r,n,s)},crypto_box_open:function(e,t,r,n,i,o){var s=new Uint8Array(32);return V(s,i,o),q(e,t,r,n,s)},crypto_box_keypair:Z,crypto_hash:J,crypto_sign:ae,crypto_sign_keypair:ne,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:fe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ie,pack25519:O,unpack25519:j,M:$,A:M,S:F,Z:U,pow2523:D,add:X,set25519:R,modL:oe,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){de(e,t,r),he(r,t);for(var n=new Uint8Array(32+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];return k(i,n,n.length,t,r),i.subarray(16)},e.secretbox.open=function(e,t,r){de(e,t,r),he(r,t);for(var n=new Uint8Array(16+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o];return n.length<32||0!==T(i,n,n.length,t,r)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(de(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return H(r,e,t),r},e.scalarMult.base=function(e){if(de(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return G(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox(t,r,o)},e.box.before=function(e,t){de(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return V(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return Z(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(de(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return G(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(de(e,t),t.length!==fe)throw new Error("bad secret key size");var r=new Uint8Array(ue+e.length);return ae(r,e,e.length,t),r},e.sign.open=function(e,t){if(de(e,t),t.length!==le)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ce(r,e,e.length,t);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached=function(t,r){for(var n=e.sign(t,r),i=new Uint8Array(ue),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached.verify=function(e,t,r){if(de(e,t,r),t.length!==ue)throw new Error("bad signature size");if(r.length!==le)throw new Error("bad public key size");var n,i=new Uint8Array(ue+e.length),o=new Uint8Array(ue+e.length);for(n=0;n<ue;n++)i[n]=t[n];for(n=0;n<e.length;n++)i[n+ue]=e[n];return ce(o,i,i.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(fe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(de(e),e.length!==fe)throw new Error("bad secret key size");for(var t=new Uint8Array(le),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(de(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),r=new Uint8Array(fe),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=fe,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){de(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return de(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===g(e,0,t,0,e.length)},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=i[n];pe(i)})):(t=r(1281))&&t.randomBytes&&e.setPRNG((function(e,r){var n,i=t.randomBytes(r);for(n=0;n<r;n++)e[n]=i[n];pe(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},1270:function(e,t,r){var n;e=r.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,c=36,u=/^xn--/,l=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function g(e){throw RangeError(h[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(f,".")).split("."),t).join(".")}function m(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function w(e){return y(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+p(e)})).join("")}function v(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=c)e=d(e/35);return d(n+36*e/(e+38))}function _(e){var t,r,n,i,o,s,u,l,f,h,p,y=[],b=e.length,m=0,v=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&g("not-basic"),y.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<b;){for(o=m,s=1,u=c;i>=b&&g("invalid-input"),((l=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:c)>=c||l>d((a-m)/s))&&g("overflow"),m+=l*s,!(l<(f=u<=_?1:u>=_+26?26:u-_));u+=c)s>d(a/(h=c-f))&&g("overflow"),s*=h;_=E(m-o,t=y.length+1,0==o),d(m/t)>a-v&&g("overflow"),v+=d(m/t),m%=t,y.splice(m++,0,v)}return w(y)}function x(e){var t,r,n,i,o,s,u,l,f,h,y,b,w,_,x,S=[];for(b=(e=m(e)).length,t=128,r=0,o=72,s=0;s<b;++s)(y=e[s])<128&&S.push(p(y));for(n=i=S.length,i&&S.push("-");n<b;){for(u=a,s=0;s<b;++s)(y=e[s])>=t&&y<u&&(u=y);for(u-t>d((a-r)/(w=n+1))&&g("overflow"),r+=(u-t)*w,t=u,s=0;s<b;++s)if((y=e[s])<t&&++r>a&&g("overflow"),y==t){for(l=r,f=c;!(l<(h=f<=o?1:f>=o+26?26:f-o));f+=c)x=l-h,_=c-h,S.push(p(v(h+x%_,0))),l=d(x/_);S.push(p(v(l,0))),o=E(r,w,n==i),r=0,++n}++r,++t}return S.join("")}s={version:"1.3.2",ucs2:{decode:m,encode:w},decode:_,encode:x,toASCII:function(e){return b(e,(function(e){return l.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return b(e,(function(e){return u.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},8835:(e,t,r)=>{var n=r(1270);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}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return m(e)&&(e=b(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),u=["%","/","?",";","#"].concat(c),l=["/","?","#"],f=/^[a-z0-9A-Z_-]{0,63}$/,h=/^([a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(2894);function b(e,t,r){if(e&&w(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}function m(e){return"string"==typeof e}function w(e){return"object"==typeof e&&null!==e}function v(e){return null===e}i.prototype.parse=function(e,t,r){if(!m(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e;i=i.trim();var s=o.exec(i);if(s){var a=(s=s[0]).toLowerCase();this.protocol=a,i=i.substr(s.length)}if(r||s||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var b="//"===i.substr(0,2);!b||s&&p[s]||(i=i.substr(2),this.slashes=!0)}if(!p[s]&&(b||s&&!g[s])){for(var w,v,E=-1,_=0;_<l.length;_++)-1!==(x=i.indexOf(l[_]))&&(-1===E||x<E)&&(E=x);for(-1!==(v=-1===E?i.lastIndexOf("@"):i.lastIndexOf("@",E))&&(w=i.slice(0,v),i=i.slice(v+1),this.auth=decodeURIComponent(w)),E=-1,_=0;_<u.length;_++){var x;-1!==(x=i.indexOf(u[_]))&&(-1===E||x<E)&&(E=x)}-1===E&&(E=i.length),this.host=i.slice(0,E),i=i.slice(E),this.parseHost(),this.hostname=this.hostname||"";var S="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!S)for(var A=this.hostname.split(/\./),I=(_=0,A.length);_<I;_++){var B=A[_];if(B&&!B.match(f)){for(var k="",T=0,R=B.length;T<R;T++)B.charCodeAt(T)>127?k+="x":k+=B[T];if(!k.match(f)){var P=A.slice(0,_),C=A.slice(_+1),O=B.match(h);O&&(P.push(O[1]),C.unshift(O[2])),C.length&&(i="/"+C.join(".")+i),this.hostname=P.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!S){var L=this.hostname.split("."),N=[];for(_=0;_<L.length;++_){var j=L[_];N.push(j.match(/[^A-Za-z0-9_-]/)?"xn--"+n.encode(j):j)}this.hostname=N.join(".")}var M=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+M,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!d[a])for(_=0,I=c.length;_<I;_++){var $=c[_],F=encodeURIComponent($);F===$&&(F=escape($)),i=i.split($).join(F)}var z=i.indexOf("#");-1!==z&&(this.hash=i.substr(z),i=i.slice(0,z));var D=i.indexOf("?");return-1!==D?(this.search=i.substr(D),this.query=i.substr(D+1),t&&(this.query=y.parse(this.query)),i=i.slice(0,D)):t&&(this.search="",this.query={}),i&&(this.pathname=i),g[a]&&this.hostname&&!this.pathname&&(this.pathname="/"),(this.pathname||this.search)&&(M=this.pathname||"",j=this.search||"",this.path=M+j),this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&w(this.query)&&Object.keys(this.query).length&&(o=y.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(m(e)){var t=new i;t.parse(e,!1,!0),e=t}var r=new i;if(Object.keys(this).forEach((function(e){r[e]=this[e]}),this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach((function(t){"protocol"!==t&&(r[t]=e[t])})),g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol])return Object.keys(e).forEach((function(t){r[t]=e[t]})),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||p[e.protocol])r.pathname=e.pathname;else{for(var n=(e.pathname||"").split("/");n.length&&!(e.host=n.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),r.pathname=n.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),c=e.host||e.pathname&&"/"===e.pathname.charAt(0),u=c||a||r.host&&e.pathname,l=u,f=r.pathname&&r.pathname.split("/")||[],h=(n=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(h&&(r.hostname="",r.port=null,r.host&&(""===f[0]?f[0]=r.host:f.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===n[0]?n[0]=e.host:n.unshift(e.host)),e.host=null),u=u&&(""===n[0]||""===f[0])),c)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,f=n;else if(n.length)f||(f=[]),f.pop(),f=f.concat(n),r.search=e.search,r.query=e.query;else if(null!=e.search)return h&&(r.hostname=r.host=f.shift(),(E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),r.search=e.search,r.query=e.query,v(r.pathname)&&v(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!f.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var d=f.slice(-1)[0],y=(r.host||e.host)&&("."===d||".."===d)||""===d,b=0,w=f.length;w>=0;w--)"."==(d=f[w])?f.splice(w,1):".."===d?(f.splice(w,1),b++):b&&(f.splice(w,1),b--);if(!u&&!l)for(;b--;b)f.unshift("..");!u||""===f[0]||f[0]&&"/"===f[0].charAt(0)||f.unshift(""),y&&"/"!==f.join("/").substr(-1)&&f.push("");var E,_=""===f[0]||f[0]&&"/"===f[0].charAt(0);return h&&(r.hostname=r.host=_?"":f.length?f.shift():"",(E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),(u=u||r.host&&f.length)&&!_&&f.unshift(""),f.length?r.pathname=f.join("/"):(r.pathname=null,r.path=null),v(r.pathname)&&v(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},6622:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},1135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},537:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var i=arguments,o=i.length,a=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),c=i[r];r<o;c=i[++r])p(c)||!w(c)?a+=" "+c:a+=" "+s(c);return a},t.deprecate=function(e,n){if(b(r.g.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var i=!1;return function(){if(!i){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),i=!0}return e.apply(this,arguments)}};var i,o={};function s(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&_(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return y(i)||(i=u(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):p(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(_(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var w,x="",S=!1,A=["{","}"];return h(r)&&(S=!0,A=["[","]"]),_(r)&&(x=" [Function"+(r.name?": "+r.name:"")+"]"),m(r)&&(x=" "+RegExp.prototype.toString.call(r)),v(r)&&(x=" "+Date.prototype.toUTCString.call(r)),E(r)&&(x=" "+l(r)),0!==s.length||S&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),w=S?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)B(t,String(s))?o.push(f(e,t,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return f(e,r,n,a,t,S)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(w,x,A)):A[0]+x+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),B(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(c.value)<0?(a=p(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function p(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"==typeof e&&null!==e}function v(e){return w(e)&&"[object Date]"===x(e)}function E(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function _(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(i)&&(i=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var r=process.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=p,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=v,t.isError=E,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(1135);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",I(),t.format.apply(t,arguments))},t.inherits=r(6622),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},259:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;var s=[];for(n=0;o&&n<t;n++)s.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),n=0;n<r.length;n++)o=i(this,o,r[n]);return s},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(259)(n)}catch(e){}},1281:()=>{},2150:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>l,StructError:()=>n,any:()=>A,array:()=>I,assert:()=>f,assign:()=>y,bigint:()=>B,boolean:()=>k,coerce:()=>K,create:()=>h,date:()=>T,defaulted:()=>J,define:()=>b,deprecated:()=>m,dynamic:()=>w,empty:()=>Q,enums:()=>R,func:()=>P,instance:()=>C,integer:()=>O,intersection:()=>L,is:()=>p,lazy:()=>v,literal:()=>N,map:()=>j,mask:()=>d,max:()=>te,min:()=>re,never:()=>M,nonempty:()=>ne,nullable:()=>U,number:()=>$,object:()=>F,omit:()=>E,optional:()=>z,partial:()=>_,pattern:()=>ie,pick:()=>x,record:()=>D,refine:()=>se,regexp:()=>H,set:()=>G,size:()=>oe,string:()=>Z,struct:()=>S,trimmed:()=>X,tuple:()=>V,type:()=>W,union:()=>q,unknown:()=>Y,validate:()=>g});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function i(e){return"object"==typeof e&&null!=e}function o(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:i[i.length-1],path:i,branch:o,...e,message:u}}function*c(e,t,r,n){var o;i(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const i of e){const e=a(i,t,r,n);e&&(yield e)}}function*u(e,t,r={}){const{path:n=[],branch:o=[e],coerce:s=!1,mask:a=!1}=r,c={path:n,branch:o};if(s&&(e=t.coercer(e,c),a&&"type"!==t.type&&i(t.schema)&&i(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(const n of t.validator(e,c))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[f,h,d]of t.entries(e,c)){const t=u(h,d,{path:void 0===f?n:[...n,f],branch:void 0===f?o:[...o,h],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(h=r[1],void 0===f?e=h:e instanceof Map?e.set(f,h):e instanceof Set?e.add(h):i(e)&&(void 0!==h||f in e)&&(e[f]=h))}if("not_valid"!==l)for(const n of t.refiner(e,c))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:o=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(e,t)=>c(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>c(i(e,t),t,this,e):()=>[]}assert(e,t){return f(e,this,t)}create(e,t){return h(e,this,t)}is(e){return p(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return g(e,this,t)}}function f(e,t,r){const n=g(e,t,{message:r});if(n[0])throw n[0]}function h(e,t,r){const n=g(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=g(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t){return!g(e,t)[0]}function g(e,t,r={}){const i=u(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(i);return o[0]?[new n(o[0],(function*(){for(const e of i)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function y(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?W(n):F(n)}function b(e,t){return new l({type:e,schema:null,validator:t})}function m(e,t){return new l({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function w(e){return new l({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})}function v(e){let t;return new l({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function E(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?W(n):F(n)}function _(e){const t=e instanceof l,r=t?{...e.schema}:{...e};for(const e in r)r[e]=z(r[e]);return t&&"type"===e.type?W(r):F(r)}function x(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return"type"===e.type?W(n):F(n)}function S(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),b(e,t)}function A(){return b("any",(()=>!0))}function I(e){return new l({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function B(){return b("bigint",(e=>"bigint"==typeof e))}function k(){return b("boolean",(e=>"boolean"==typeof e))}function T(){return b("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function R(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function P(){return b("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function C(e){return b("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function O(){return b("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function L(e){return new l({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function N(e){const t=s(e),r=typeof e;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function j(e,t){return new l({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function M(){return b("never",(()=>!1))}function U(e){return new l({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function $(){return b("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function F(e){const t=e?Object.keys(e):[],r=M();return new l({type:"object",schema:e||null,*entries(n){if(e&&i(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>i(e)?{...e}:e})}function z(e){return new l({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function D(e,t){return new l({type:"record",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`})}function H(){return b("regexp",(e=>e instanceof RegExp))}function G(e){return new l({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})}function Z(){return b("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function V(e){const t=M();return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})}function W(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(r){if(i(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>i(e)?{...e}:e})}function q(e){const t=e.map((e=>e.type)).join(" | ");return new l({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=u(r,t,n),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})}function Y(){return b("unknown",(()=>!0))}function K(e,t,r){return new l({...e,coercer:(n,i)=>p(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}function J(e,t,r={}){return K(e,Y(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&o(e)&&o(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function X(e){return K(e,Z(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))}function re(e,t,r={}){const{exclusive:n}=r;return se(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function ie(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function oe(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:o}=e;return t<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}{const{length:o}=e;return t<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}}))}function se(e,t,r){return new l({...e,*refiner(n,i){yield*e.refiner(n,i);const o=c(r(n,i),i,e,n);for(const e of o)yield{...e,refinement:t}}})}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e,t=r(228),n=(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),i=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},s=function(e){function t(t){var r=void 0===t?{}:t,n=r.backgroundMessenger,i=r.providerRequestTransport,o=r.onConstruct,s=e.call(this)||this;return s.chainId="0x1",s.connected=!1,s.isRainbow=!0,s.isReady=!0,s.isMetaMask=!0,s.networkVersion="1",s.providers=void 0,s.requestId=0,s.backgroundMessenger=n,s.providerRequestTransport=i,null==o||o({emit:s.emit.bind(s)}),s.bindMethods(),s}return n(t,e),t.prototype.bindMethods=function(){for(var e=0,t=Object.getOwnPropertyNames(Object.getPrototypeOf(this));e<t.length;e++){var r=t[e],n=this[r];"function"==typeof n&&"constructor"!==r&&(this[r]=n.bind(this))}},t.prototype.enable=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.request({method:"eth_requestAccounts"})]}))}))},t.prototype.isConnected=function(){return this.connected},t.prototype.request=function(e){var t,r,n=e.method,s=e.params;return i(this,void 0,void 0,(function(){var e,i;return o(this,(function(o){switch(o.label){case 0:if(!this.providerRequestTransport)throw new Error("No transport");return null===(t=this.backgroundMessenger)||void 0===t||t.send("rainbow_prefetchDappMetadata",window.location.href),e=this.requestId++,[4,null===(r=this.providerRequestTransport)||void 0===r?void 0:r.send({id:e,method:n,params:s},{id:e})];case 1:if((i=o.sent()).id!==e)return[2];if(i.error)throw i.error;switch(n){case"eth_requestAccounts":this.selectedAddress=i.result[0],this.connected=!0;break;case"eth_chainId":this.chainId=i.result,this.networkVersion=parseInt(this.chainId,16).toString()}return[2,i.result]}}))}))},t.prototype.sendAsync=function(e,t){return i(this,void 0,void 0,(function(){var r,n;return o(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.request(e)];case 1:return r=i.sent(),t(null,{id:e.id,jsonrpc:"2.0",result:r}),[3,3];case 2:return n=i.sent(),t(n,{id:e.id,jsonrpc:"2.0",error:{code:n.code,message:n.message,name:n.name}}),[3,3];case 3:return[2]}}))}))},t.prototype.send=function(e,t){return i(this,void 0,void 0,(function(){return o(this,(function(r){return"string"==typeof e&&Array.isArray(t)?[2,this.request({method:e,params:t})]:[2,this.request(e)]}))}))},t}(t);function a(e,t={}){const{fees:r=e.fees,formatters:n=e.formatters,serializers:i=e.serializers}=t;return{...e,fees:r,formatters:n,serializers:i}}const c=a({id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),u=a({id:42170,name:"Arbitrum Nova",network:"arbitrum-nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{blast:{http:["https://arbitrum-nova.public.blastapi.io"],webSocket:["wss://arbitrum-nova.public.blastapi.io"]},default:{http:["https://nova.arbitrum.io/rpc"]},public:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://nova.arbiscan.io"},blockScout:{name:"BlockScout",url:"https://nova-explorer.arbitrum.io/"},default:{name:"Arbiscan",url:"https://nova.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),l=a({id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}});class f extends Error{constructor(e,t={}){super(),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:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"viem@1.21.3"});const r=t.cause instanceof f?t.cause.details:t.cause?.message?t.cause.message:t.details,n=t.cause instanceof f&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...n?[`Docs: https://viem.sh${n}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=n,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return h(this,e)}}function h(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e?h(e.cause,t):t?null:e}class d extends f{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class p extends f{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}function g(e){return function(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function y(e,{size:t}){if(g(e)>t)throw new p({givenSize:g(e),maxSize:t})}function b(e,t={}){const{signed:r}=t;t.size&&y(e,{size:t.size});const n=BigInt(e);if(!r)return n;const i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function m(e,t={}){return Number(b(e,t))}function w(e,t){return({exclude:r,format:n})=>({exclude:r,format:e=>{const i=t(e);if(r)for(const e of r)delete i[e];return{...i,...n(e)}},type:e})}const v={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function E(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?m(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?m(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?v[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const _=w("transaction",E);function x(e){const t=e.transactions?.map((e=>"string"==typeof e?e:E(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const S=w("block",x),A={"0x0":"reverted","0x1":"success"};function I(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?m(e.transactionIndex):null,status:e.status?A[e.status]:null,type:e.type?v[e.type]||e.type:null}}const B=w("transactionReceipt",I),k={block:S({format(e){const t=e.transactions?.map((e=>{if("string"==typeof e)return e;const t=E(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?b(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}));return{transactions:t,stateRoot:e.stateRoot}}}),transaction:_({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?b(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:B({format:e=>({l1GasPrice:e.l1GasPrice?b(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?b(e.l1GasUsed):null,l1Fee:e.l1Fee?b(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},T=a({id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-mainnet.g.alchemy.com/v2"],webSocket:["wss://base-mainnet.g.alchemy.com/v2"]},infura:{http:["https://base-mainnet.infura.io/v3"],webSocket:["wss://base-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{blockscout:{name:"Basescout",url:"https://base.blockscout.com"},default:{name:"Basescan",url:"https://basescan.org"},etherscan:{name:"Basescan",url:"https://basescan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022}}},{formatters:k}),R=a({id:56,name:"BNB Smart Chain",network:"bsc",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]},public:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});class P extends f{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function C(e,{dir:t,size:r=32}={}){return"string"==typeof e?function(e,{dir:t,size:r=32}={}){if(null===r)return e;const n=e.replace("0x","");if(n.length>2*r)throw new P({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n["right"===t?"padEnd":"padStart"](2*r,"0")}`}(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new P({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;i<r;i++){const o="right"===t;n[o?i:r-i-1]=e[o?i:e.length-i-1]}return n}(e,{dir:t,size:r})}const O=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function L(e,t={}){return"number"==typeof e||"bigint"==typeof e?j(e,t):"string"==typeof e?function(e,t={}){return N(M.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?(y(r,{size:t.size}),C(r,{size:t.size})):r}(e,t):N(e,t)}function N(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=O[e[t]];const n=`0x${r}`;return"number"==typeof t.size?(y(n,{size:t.size}),C(n,{dir:"right",size:t.size})):n}function j(e,t={}){const{signed:r,size:n}=t,i=BigInt(e);let o;n?o=r?(1n<<8n*BigInt(n)-1n)-1n:2n**(8n*BigInt(n))-1n:"number"==typeof e&&(o=BigInt(Number.MAX_SAFE_INTEGER));const s="bigint"==typeof o&&r?-o-1n:0;if(o&&i>o||i<s){const t="bigint"==typeof e?"n":"";throw new d({max:o?`${o}${t}`:void 0,min:`${s}${t}`,signed:r,size:n,value:`${e}${t}`})}const a=`0x${(r&&i<0?(1n<<BigInt(8*n))+BigInt(i):i).toString(16)}`;return n?C(a,{size:n}):a}const M=new TextEncoder,U={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function $(e){return{...e,gas:void 0!==e.gas?j(e.gas):void 0,gasPrice:void 0!==e.gasPrice?j(e.gasPrice):void 0,maxFeePerGas:void 0!==e.maxFeePerGas?j(e.maxFeePerGas):void 0,maxPriorityFeePerGas:void 0!==e.maxPriorityFeePerGas?j(e.maxPriorityFeePerGas):void 0,nonce:void 0!==e.nonce?j(e.nonce):void 0,type:void 0!==e.type?U[e.type]:void 0,value:void 0!==e.value?j(e.value):void 0}}const F=w("transactionRequest",$);function z(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)n++;return r="left"===t?r.slice(n):r.slice(0,r.length-n),"string"==typeof e?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}function D(e){return 0===e||0n===e||null==e||"0"===e||""===e||"string"==typeof e&&("0x"===z(e).toLowerCase()||"0x00"===z(e).toLowerCase())}function H(e){return!D(e)}function G(e){return H(e.maxFeePerGas)&&H(e.maxPriorityFeePerGas)}function Z(e){return"cip42"===e.type||G(e)&&(H(e.feeCurrency)||H(e.gatewayFeeRecipient)||H(e.gatewayFee))}function V(e){return"cip64"===e.type||G(e)&&H(e.feeCurrency)&&D(e.gatewayFee)&&D(e.gatewayFeeRecipient)}const W={block:S({exclude:["difficulty","gasLimit","mixHash","nonce","uncles"],format(e){const t=e.transactions?.map((e=>"string"==typeof e?e:{...E(e),feeCurrency:e.feeCurrency,..."0x7b"!==e.type?{gatewayFee:e.gatewayFee?b(e.gatewayFee):null,gatewayFeeRecipient:e.gatewayFeeRecipient||null}:{}}));return{randomness:e.randomness,transactions:t}}}),transaction:_({format(e){const t={feeCurrency:e.feeCurrency};return"0x7b"===e.type?t.type="cip64":("0x7c"===e.type&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?b(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:F({format(e){const t={feeCurrency:e.feeCurrency};return V(e)?t.type="0x7b":(Z(e)&&(t.type="0x7c"),t.gatewayFee=void 0!==e.gatewayFee?j(e.gatewayFee):void 0,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}})};class q extends f{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}class Y extends f{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}const K={ether:-9,wei:9};function J(e,t="wei"){return function(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[i,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}(e,K[t])}class X extends f{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(X,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(X,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Q extends f{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${J(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(Q,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),Object.defineProperty(class extends f{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${J(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),Object.defineProperty(class extends f{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),Object.defineProperty(class extends f{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),Object.defineProperty(class extends f{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),Object.defineProperty(class extends f{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class ee extends f{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${J(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${J(r)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(ee,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});const te=/^0x[a-fA-F0-9]{40}$/;function re(e){return te.test(e)}function ne(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}class ie extends f{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class oe extends f{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}const se={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,assertPosition(e){if(e<0||e>this.bytes.length-1)throw new oe({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new ie({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},incrementPosition(e){if(e<0)throw new ie({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){const e=this.inspectByte();return this.position++,e},readBytes(e){const t=this.inspectBytes(e);return this.position+=e,t},readUint8(){const e=this.inspectUint8();return this.position+=1,e},readUint16(){const e=this.inspectUint16();return this.position+=2,e},readUint24(){const e=this.inspectUint24();return this.position+=3,e},readUint32(){const e=this.inspectUint32();return this.position+=4,e},setPosition(e){this.assertPosition(e),this.position=e}};function ae(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function ce(e,t="hex"){const r=ue(e),n=function(e){const t=Object.create(se);return t.bytes=e,t.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t}(new Uint8Array(r.length));return r.encode(n),"hex"===t?N(n.bytes):n.bytes}function ue(e){return Array.isArray(e)?function(e){const t=e.reduce(((e,t)=>e+t.length),0),r=le(t);return{length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t));for(const{encode:t}of e)t(n)}}}(e.map((e=>ue(e)))):function(e){const t="string"==typeof e?function(e,t={}){let r=e;t.size&&(y(r,{size:t.size}),r=C(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,o=new Uint8Array(i);for(let e=0,t=0;e<i;e++){const r=ae(n.charCodeAt(t++)),i=ae(n.charCodeAt(t++));if(void 0===r||void 0===i)throw new f(`Invalid byte sequence ("${n[t-2]}${n[t-1]}" in "${n}").`);o[e]=16*r+i}return o}(e):e,r=le(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function le(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new f("Length is too large.")}function fe(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`)).join("\n")}class he extends f{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class de extends f{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",fe(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class pe extends f{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}function ge(e){if(!e||0===e.length)return[];const t=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:i}=e[r];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new pe({storageKey:i[e]});if(!re(n))throw new q({address:n});t.push([n,i])}return t}const ye={transaction:(e,t)=>V(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,feeCurrency:s}=e;if(t<=0)throw new Y({chainId:t});if(o&&!re(o))throw new q({address:o});if(n)throw new f("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(H(i)&&i>be)throw new Q({maxFeePerGas:i});if(H(r)&&H(i)&&r>i)throw new ee({maxFeePerGas:i,maxPriorityFeePerGas:r});if(H(s)&&!re(s))throw new f("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(D(s))throw new f("`feeCurrency` must be provided for CIP-64 transactions.")}(e);const{chainId:r,gas:n,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:l,data:h}=e,d=[L(r),i?L(i):"0x",c?L(c):"0x",a?L(a):"0x",n?L(n):"0x",o??"0x",s?L(s):"0x",h??"0x",ge(u),l];return t&&d.push(27n===t.v?"0x":L(1),z(t.r),z(t.s)),ne(["0x7b",ce(d)])}(e,t):Z(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,feeCurrency:s,gatewayFee:a,gatewayFeeRecipient:c}=e;if(t<=0)throw new Y({chainId:t});if(o&&!re(o))throw new q({address:o});if(n)throw new f("`gasPrice` is not a valid CIP-42 Transaction attribute.");if(H(i)&&i>be)throw new Q({maxFeePerGas:i});if(H(r)&&H(i)&&r>i)throw new ee({maxFeePerGas:i,maxPriorityFeePerGas:r});if(H(a)&&D(c)||H(c)&&D(a))throw new f("`gatewayFee` and `gatewayFeeRecipient` must be provided together.");if(H(s)&&!re(s))throw new f("`feeCurrency` MUST be a token address for CIP-42 transactions.");if(H(c)&&!re(c))throw new q(c);if(D(s)&&D(c))throw new f("Either `feeCurrency` or `gatewayFeeRecipient` must be provided for CIP-42 transactions.")}(e);const{chainId:r,gas:n,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:l,gatewayFeeRecipient:h,gatewayFee:d,data:p}=e,g=[L(r),i?L(i):"0x",c?L(c):"0x",a?L(a):"0x",n?L(n):"0x",l??"0x",h??"0x",d?L(d):"0x",o??"0x",s?L(s):"0x",p??"0x",ge(u)];return t&&g.push(27n===t.v?"0x":L(1),z(t.r),z(t.s)),ne(["0x7c",ce(g)])}(e,t):function(e,t){const r=function(e){if(e.type)return e.type;if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new de({transaction:e})}(e);return"eip1559"===r?function(e,t){const{chainId:r,gas:n,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:l}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=e;if(t<=0)throw new Y({chainId:t});if(o&&!re(o))throw new q({address:o});if(n)throw new f("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(i&&i>2n**256n-1n)throw new Q({maxFeePerGas:i});if(r&&i&&r>i)throw new ee({maxFeePerGas:i,maxPriorityFeePerGas:r})}(e);const h=ge(u),d=[L(r),i?L(i):"0x",c?L(c):"0x",a?L(a):"0x",n?L(n):"0x",o??"0x",s?L(s):"0x",l??"0x",h];if(t){const e=0n===t.v?"0x":1n===t.v?L(1):27n===t.v?"0x":L(1);d.push(e,z(t.r),z(t.s))}return ne(["0x02",ce(d)])}(e,t):"eip2930"===r?function(e,t){const{chainId:r,gas:n,data:i,nonce:o,to:s,value:a,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=e;if(t<=0)throw new Y({chainId:t});if(o&&!re(o))throw new q({address:o});if(r||i)throw new f("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new Q({maxFeePerGas:n})}(e);const l=ge(c),h=[L(r),o?L(o):"0x",u?L(u):"0x",n?L(n):"0x",s??"0x",a?L(a):"0x",i??"0x",l];if(t){const e=0n===t.v?"0x":1n===t.v?L(1):27n===t.v?"0x":L(1);h.push(e,z(t.r),z(t.s))}return ne(["0x01",ce(h)])}(e,t):function(e,t){const{chainId:r=0,gas:n,data:i,nonce:o,to:s,value:a,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,accessList:s}=e;if(o&&!re(o))throw new q({address:o});if(void 0!==t&&t<=0)throw new Y({chainId:t});if(r||i)throw new f("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new Q({maxFeePerGas:n});if(s)throw new f("`accessList` is not a valid Legacy Transaction attribute.")}(e);let u=[o?L(o):"0x",c?L(c):"0x",n?L(n):"0x",s??"0x",a?L(a):"0x",i??"0x"];if(t){const e=(()=>{if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new he({v:t.v});return e})();u=[...u,L(e),t.r,t.s]}else r>0&&(u=[...u,L(r),"0x","0x"]);return ce(u)}(e,t)}(e,t)},be=2n**256n-1n,me=a({id:42220,name:"Celo",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1},{formatters:W,serializers:ye}),we=a({id:100,name:"Gnosis",network:"gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]},public:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{etherscan:{name:"Gnosisscan",url:"https://gnosisscan.io"},default:{name:"Gnosis Chain Explorer",url:"https://blockscout.com/xdai/mainnet"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),ve=a({id:59144,name:"Linea Mainnet",network:"linea-mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-mainnet.infura.io/v3"],webSocket:["wss://linea-mainnet.infura.io/ws/v3"]},default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"},blockscout:{name:"Blockscout",url:"https://explorer.linea.build"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),Ee=a({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]},public:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{etherscan:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network"},default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),_e=a({id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},{formatters:k}),xe=a({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Se=a({id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),Ae=a({id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),Ie=a({id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882}}},{formatters:k}),Be=a({id:31337,name:"Hardhat",network:"hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]},public:{http:["http://127.0.0.1:8545"]}}}),ke=a({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),Te=a({id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x21B000Fd62a880b2125A61e36a284BB757b76025",blockCreated:3914906}},testnet:!0}),Re=a({id:534352,name:"Scroll",network:"scroll",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]},public:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com"},blockscout:{name:"Blockscout",url:"https://blockscout.scroll.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),Pe=a({id:17e3,network:"holesky",name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77}},testnet:!0}),Ce=a({id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0},{formatters:k}),Oe=a({id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-sepolia.g.alchemy.com/v2"],webSocket:["wss://opt-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"},default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},testnet:!0},{formatters:k}),Le=a({id:97,name:"Binance Smart Chain Testnet",network:"bsc-testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]},public:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://testnet.bscscan.com"},default:{name:"BscScan",url:"https://testnet.bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),Ne=a({id:80001,name:"Polygon Mumbai",network:"maticmum",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mumbai.g.alchemy.com/v2"],webSocket:["wss://polygon-mumbai.g.alchemy.com/v2"]},infura:{http:["https://polygon-mumbai.infura.io/v3"],webSocket:["wss://polygon-mumbai.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/polygon_mumbai"]},public:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"},default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),je=a({id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),Me=a({id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-sepolia.g.alchemy.com/v2"],webSocket:["wss://arb-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://sepolia.arbiscan.io"},default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),Ue=a({id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-sepolia.g.alchemy.com/v2"],webSocket:["wss://base-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"},default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0,sourceId:11155111},{formatters:k}),$e=a({id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123}},testnet:!0},{formatters:k}),Fe=a({id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160}},testnet:!0},{formatters:k}),ze=a({id:250,name:"Fantom",network:"fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]},public:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://ftmscan.com"},default:{name:"FTMScan",url:"https://ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),De=a({id:16666e5,name:"Harmony One",network:"harmony",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{public:{http:["https://rpc.ankr.com/harmony"]},default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),He=a({id:1284,name:"Moonbeam",network:"moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{public:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]},default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1});var Ge,Ze;(Ze=Ge||(Ge={}))[Ze.arbitrum=c.id]="arbitrum",Ze[Ze.arbitrumNova=u.id]="arbitrumNova",Ze[Ze.avalanche=l.id]="avalanche",Ze[Ze.base=T.id]="base",Ze[Ze.bsc=R.id]="bsc",Ze[Ze.celo=me.id]="celo",Ze[Ze.gnosis=we.id]="gnosis",Ze[Ze.linea=ve.id]="linea",Ze[Ze.manta=Ee.id]="manta",Ze[Ze.optimism=_e.id]="optimism",Ze[Ze.mainnet=xe.id]="mainnet",Ze[Ze.polygon=Se.id]="polygon",Ze[Ze.polygonZkEvm=Ae.id]="polygonZkEvm",Ze[Ze.rari=1380012617]="rari",Ze[Ze.zora=Ie.id]="zora",Ze[Ze.hardhat=Be.id]="hardhat",Ze[Ze.hardhatOptimism=1338]="hardhatOptimism",Ze[Ze.goerli=ke.id]="goerli",Ze[Ze.sepolia=Te.id]="sepolia",Ze[Ze.scroll=Re.id]="scroll",Ze[Ze.holesky=Pe.id]="holesky",Ze[Ze.optimismGoerli=Ce.id]="optimismGoerli",Ze[Ze.optimismSepolia=Oe.id]="optimismSepolia",Ze[Ze.bscTestnet=Le.id]="bscTestnet",Ze[Ze.polygonMumbai=Ne.id]="polygonMumbai",Ze[Ze.arbitrumGoerli=je.id]="arbitrumGoerli",Ze[Ze.arbitrumSepolia=Me.id]="arbitrumSepolia",Ze[Ze.baseSepolia=Ue.id]="baseSepolia",Ze[Ze.zoraTestnet=$e.id]="zoraTestnet",Ze[Ze.zoraSepolia=Fe.id]="zoraSepolia",Ze[Ze.fantom=ze.id]="fantom",Ze[Ze.harmonyOne=De.id]="harmonyOne",Ze[Ze.moonbeam=He.id]="moonbeam",r(1594);var Ve=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,We=Math.ceil,qe=Math.floor,Ye="[BigNumber Error] ",Ke=Ye+"Number primitive has more than 15 significant digits: ",Je=1e14,Xe=14,Qe=9007199254740991,et=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],tt=1e7,rt=1e9;function nt(e){var t=0|e;return e>0||e===t?t:t-1}function it(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=Xe-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function ot(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,u=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=c==u,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function st(e,t,r,n){if(e<t||e>r||e!==qe(e))throw Error(Ye+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function at(e){var t=e.c.length-1;return nt(e.e/Xe)==t&&e.c[t]%2!=0}function ct(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function ut(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var lt=function e(t){var r,n,i,o,s,a,c,u,l,f,h=A.prototype={constructor:A,toString:null,valueOf:null},d=new A(1),p=20,g=4,y=-7,b=21,m=-1e7,w=1e7,v=!1,E=1,_=0,x={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"Β ",suffix:""},S="0123456789abcdefghijklmnopqrstuvwxyz";function A(e,t){var r,o,s,a,c,u,l,f,h=this;if(!(h instanceof A))return new A(e,t);if(null==t){if(e&&!0===e._isBigNumber)return h.s=e.s,void(!e.c||e.e>w?h.c=h.e=null:e.e<m?h.c=[h.e=0]:(h.e=e.e,h.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,c=e;c>=10;c/=10,a++);return void(a>w?h.c=h.e=null:(h.e=a,h.c=[e]))}f=String(e)}else{if(!Ve.test(f=String(e)))return i(h,f,u);h.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(a=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(a<0&&(a=c),a+=+f.slice(c+1),f=f.substring(0,c)):a<0&&(a=f.length)}else{if(st(t,2,S.length,"Base"),10==t)return T(h=new A(e),p+h.e+1,g);if(f=String(e),u="number"==typeof e){if(0*e!=0)return i(h,f,u,t);if(h.s=1/e<0?(f=f.slice(1),-1):1,A.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(Ke+e)}else h.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=S.slice(0,t),a=c=0,l=f.length;c<l;c++)if(r.indexOf(o=f.charAt(c))<0){if("."==o){if(c>a){a=l;continue}}else if(!s&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){s=!0,c=-1,a=0;continue}return i(h,String(e),u,t)}u=!1,(a=(f=n(f,t,10,h.s)).indexOf("."))>-1?f=f.replace(".",""):a=f.length}for(c=0;48===f.charCodeAt(c);c++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(c,++l)){if(l-=c,u&&A.DEBUG&&l>15&&(e>Qe||e!==qe(e)))throw Error(Ke+h.s*e);if((a=a-c-1)>w)h.c=h.e=null;else if(a<m)h.c=[h.e=0];else{if(h.e=a,h.c=[],c=(a+1)%Xe,a<0&&(c+=Xe),c<l){for(c&&h.c.push(+f.slice(0,c)),l-=Xe;c<l;)h.c.push(+f.slice(c,c+=Xe));c=Xe-(f=f.slice(c)).length}else c-=l;for(;c--;f+="0");h.c.push(+f)}}else h.c=[h.e=0]}function I(e,t,r,n){var i,o,s,a,c;if(null==r?r=g:st(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=it(e.c),c=1==n||2==n&&(s<=y||s>=b)?ct(c,s):ut(c,s,"0");else if(o=(e=T(new A(e),t,r)).e,a=(c=it(e.c)).length,1==n||2==n&&(t<=o||o<=y)){for(;a<t;c+="0",a++);c=ct(c,o)}else if(t-=s,c=ut(c,o,"0"),o+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function B(e,t){for(var r,n=1,i=new A(e[0]);n<e.length;n++){if(!(r=new A(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function k(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*Xe-1)>w?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function T(e,t,r,n){var i,o,s,a,c,u,l,f=e.c,h=et;if(f){e:{for(i=1,a=f[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=Xe,s=t,l=(c=f[u=0])/h[i-s-1]%10|0;else if((u=We((o+1)/Xe))>=f.length){if(!n)break e;for(;f.length<=u;f.push(0));c=l=0,i=1,s=(o%=Xe)-Xe+1}else{for(c=a=f[u],i=1;a>=10;a/=10,i++);l=(s=(o%=Xe)-Xe+i)<0?0:c/h[i-s-1]%10|0}if(n=n||t<0||null!=f[u+1]||(s<0?c:c%h[i-s-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(o>0?s>0?c/h[i-s]:0:f[u-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=h[(Xe-t%Xe)%Xe],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=u,a=1,u--):(f.length=u+1,a=h[Xe-o],f[u]=s>0?qe(c/h[i-s]%h[s])*a:0),n)for(;;){if(0==u){for(o=1,s=f[0];s>=10;s/=10,o++);for(s=f[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,f[0]==Je&&(f[0]=1));break}if(f[u]+=a,f[u]!=Je)break;f[u--]=0,a=1}for(o=f.length;0===f[--o];f.pop());}e.e>w?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function R(e){var t,r=e.e;return null===r?e.toString():(t=it(e.c),t=r<=y||r>=b?ct(t,r):ut(t,r,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(Ye+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(st(r=e[t],0,rt,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(st(r=e[t],0,8,t),g=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(st(r[0],-rt,0,t),st(r[1],0,rt,t),y=r[0],b=r[1]):(st(r,-rt,rt,t),y=-(b=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)st(r[0],-rt,-1,t),st(r[1],1,rt,t),m=r[0],w=r[1];else{if(st(r,-rt,rt,t),!r)throw Error(Ye+t+" cannot be zero: "+r);m=-(w=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(Ye+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(Ye+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(st(r=e[t],0,9,t),E=r),e.hasOwnProperty(t="POW_PRECISION")&&(st(r=e[t],0,rt,t),_=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(Ye+t+" not an object: "+r);x=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(Ye+t+" invalid: "+r);S=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:g,EXPONENTIAL_AT:[y,b],RANGE:[m,w],CRYPTO:v,MODULO_MODE:E,POW_PRECISION:_,FORMAT:x,ALPHABET:S}},A.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!A.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-rt&&i<=rt&&i===qe(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%Xe)<1&&(t+=Xe),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Je||r!==qe(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(Ye+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return B(arguments,h.lt)},A.minimum=A.min=function(){return B(arguments,h.gt)},A.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return qe(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,a=0,c=[],u=new A(d);if(null==e?e=p:st(e,0,rt),i=We(e/Xe),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(c.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw v=!1,Error(Ye+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(c.push(o%1e14),a+=7);a=i/7}if(!v)for(;a<i;)(o=s())<9e15&&(c[a++]=o%1e14);for(i=c[--a],e%=Xe,i&&e&&(o=et[Xe-e],c[a]=qe(i/o)*o);0===c[a];c.pop(),a--);if(a<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=Xe);for(a=1,o=c[0];o>=10;o/=10,a++);a<Xe&&(n-=Xe-a)}return u.e=n,u.c=c,u}),A.sum=function(){for(var e=1,t=arguments,r=new A(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,c=e.length;a<c;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var c,u,l,f,h,d,y,b,m=n.indexOf("."),w=p,v=g;for(m>=0&&(f=_,_=0,n=n.replace(".",""),d=(b=new A(i)).pow(n.length-m),_=f,b.c=t(ut(it(d.c),d.e,"0"),10,o,e),b.e=b.c.length),l=f=(y=t(n,i,o,a?(c=S,e):(c=e,S))).length;0==y[--f];y.pop());if(!y[0])return c.charAt(0);if(m<0?--l:(d.c=y,d.e=l,d.s=s,y=(d=r(d,b,w,v,o)).c,h=d.r,l=d.e),m=y[u=l+w+1],f=o/2,h=h||u<0||null!=y[u+1],h=v<4?(null!=m||h)&&(0==v||v==(d.s<0?3:2)):m>f||m==f&&(4==v||h||6==v&&1&y[u-1]||v==(d.s<0?8:7)),u<1||!y[0])n=h?ut(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(y.length=u,h)for(--o;++y[--u]>o;)y[u]=0,u||(++l,y=[1].concat(y));for(f=y.length;!y[--f];);for(m=0,n="";m<=f;n+=c.charAt(y[m++]));n=ut(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,c=e.length,u=t%tt,l=t/tt|0;for(e=e.slice();c--;)a=((i=u*(o=e[c]%tt)+(n=l*o+(s=e[c]/tt|0)*u)%tt*tt+a)/r|0)+(n/tt|0)+l*s,e[c]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var c,u,l,f,h,d,p,g,y,b,m,w,v,E,_,x,S,I=n.s==i.s?1:-1,B=n.c,k=i.c;if(!(B&&B[0]&&k&&k[0]))return new A(n.s&&i.s&&(B?!k||B[0]!=k[0]:k)?B&&0==B[0]||!k?0*I:I/0:NaN);for(y=(g=new A(I)).c=[],I=o+(u=n.e-i.e)+1,a||(a=Je,u=nt(n.e/Xe)-nt(i.e/Xe),I=I/Xe|0),l=0;k[l]==(B[l]||0);l++);if(k[l]>(B[l]||0)&&u--,I<0)y.push(1),f=!0;else{for(E=B.length,x=k.length,l=0,I+=2,(h=qe(a/(k[0]+1)))>1&&(k=e(k,h,a),B=e(B,h,a),x=k.length,E=B.length),v=x,m=(b=B.slice(0,x)).length;m<x;b[m++]=0);S=k.slice(),S=[0].concat(S),_=k[0],k[1]>=a/2&&_++;do{if(h=0,(c=t(k,b,x,m))<0){if(w=b[0],x!=m&&(w=w*a+(b[1]||0)),(h=qe(w/_))>1)for(h>=a&&(h=a-1),p=(d=e(k,h,a)).length,m=b.length;1==t(d,b,p,m);)h--,r(d,x<p?S:k,p,a),p=d.length,c=1;else 0==h&&(c=h=1),p=(d=k.slice()).length;if(p<m&&(d=[0].concat(d)),r(b,d,m,a),m=b.length,-1==c)for(;t(k,b,x,m)<1;)h++,r(b,x<m?S:k,m,a),m=b.length}else 0===c&&(h++,b=[0]);y[l++]=h,b[0]?b[m++]=B[v]||0:(b=[B[v]],m=1)}while((v++<E||null!=b[0])&&I--);f=null!=b[0],y[0]||y.splice(0,1)}if(a==Je){for(l=1,I=y[0];I>=10;I/=10,l++);T(g,o+(g.e=l+u*Xe-1)+1,s,f)}else g.e=u,g.r=+f;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(f,"");if(l.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(c,"$1").replace(u,"0.$1")),t!=o))return new A(o,i);if(A.DEBUG)throw Error(Ye+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},h.absoluteValue=h.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},h.comparedTo=function(e,t){return ot(this,new A(e,t))},h.decimalPlaces=h.dp=function(e,t){var r,n,i,o=this;if(null!=e)return st(e,0,rt),null==t?t=g:st(t,0,8),T(new A(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-nt(this.e/Xe))*Xe,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},h.dividedBy=h.div=function(e,t){return r(this,new A(e,t),p,g)},h.dividedToIntegerBy=h.idiv=function(e,t){return r(this,new A(e,t),0,1)},h.exponentiatedBy=h.pow=function(e,t){var r,n,i,o,s,a,c,u,l=this;if((e=new A(e)).c&&!e.isInteger())throw Error(Ye+"Exponent not an integer: "+R(e));if(null!=t&&(t=new A(t)),s=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new A(Math.pow(+R(l),s?2-at(e):+R(e))),t?u.mod(t):u;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(n=!a&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return o=l.s<0&&at(e)?-0:0,l.e>-1&&(o=1/o),new A(a?1/o:o);_&&(o=We(_/Xe+2))}for(s?(r=new A(.5),a&&(e.s=1),c=at(e)):c=(i=Math.abs(+R(e)))%2,u=new A(d);;){if(c){if(!(u=u.times(l)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(t))}if(i){if(0===(i=qe(i/2)))break;c=i%2}else if(T(e=e.times(r),e.e+1,1),e.e>14)c=at(e);else{if(0==(i=+R(e)))break;c=i%2}l=l.times(l),o?l.c&&l.c.length>o&&(l.c.length=o):n&&(l=l.mod(t))}return n?u:(a&&(u=d.div(u)),t?u.mod(t):o?T(u,_,g,void 0):u)},h.integerValue=function(e){var t=new A(this);return null==e?e=g:st(e,0,8),T(t,t.e+1,e)},h.isEqualTo=h.eq=function(e,t){return 0===ot(this,new A(e,t))},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(e,t){return ot(this,new A(e,t))>0},h.isGreaterThanOrEqualTo=h.gte=function(e,t){return 1===(t=ot(this,new A(e,t)))||0===t},h.isInteger=function(){return!!this.c&&nt(this.e/Xe)>this.c.length-2},h.isLessThan=h.lt=function(e,t){return ot(this,new A(e,t))<0},h.isLessThanOrEqualTo=h.lte=function(e,t){return-1===(t=ot(this,new A(e,t)))||0===t},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&0==this.c[0]},h.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new A(e,t)).s,!a||!t)return new A(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/Xe,u=e.e/Xe,l=s.c,f=e.c;if(!c||!u){if(!l||!f)return l?(e.s=-t,e):new A(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new A(l[0]?s:3==g?-0:0)}if(c=nt(c),u=nt(u),l=l.slice(),a=c-u){for((o=a<0)?(a=-a,i=l):(u=c,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=l.length)<(t=f.length))?a:t,a=t=0;t<n;t++)if(l[t]!=f[t]){o=l[t]<f[t];break}if(o&&(i=l,l=f,f=i,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=Je-1;n>a;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=Je}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?k(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},h.modulo=h.mod=function(e,t){var n,i,o=this;return e=new A(e,t),!o.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||o.c&&!o.c[0]?new A(o):(9==E?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,E),(e=o.minus(n.times(e))).c[0]||1!=E||(e.s=o.s),e)},h.multipliedBy=h.times=function(e,t){var r,n,i,o,s,a,c,u,l,f,h,d,p,g,y,b=this,m=b.c,w=(e=new A(e,t)).c;if(!(m&&w&&m[0]&&w[0]))return!b.s||!e.s||m&&!m[0]&&!w||w&&!w[0]&&!m?e.c=e.e=e.s=null:(e.s*=b.s,m&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=nt(b.e/Xe)+nt(e.e/Xe),e.s*=b.s,(c=m.length)<(f=w.length)&&(p=m,m=w,w=p,i=c,c=f,f=i),i=c+f,p=[];i--;p.push(0));for(g=Je,y=tt,i=f;--i>=0;){for(r=0,h=w[i]%y,d=w[i]/y|0,o=i+(s=c);o>i;)r=((u=h*(u=m[--s]%y)+(a=d*u+(l=m[s]/y|0)*h)%y*y+p[o]+r)/g|0)+(a/y|0)+d*l,p[o--]=u%g;p[o]=r}return r?++n:p.splice(0,1),k(e,p,n)},h.negated=function(){var e=new A(this);return e.s=-e.s||null,e},h.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new A(e,t)).s,!i||!t)return new A(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/Xe,s=e.e/Xe,a=n.c,c=e.c;if(!o||!s){if(!a||!c)return new A(i/0);if(!a[0]||!c[0])return c[0]?e:new A(a[0]?n:0*i)}if(o=nt(o),s=nt(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/Je|0,a[t]=Je===a[t]?0:a[t]%Je;return i&&(a=[i].concat(a),++s),k(e,a,s)},h.precision=h.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return st(e,1,rt),null==t?t=g:st(t,0,8),T(new A(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*Xe+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},h.shiftedBy=function(e){return st(e,-9007199254740991,Qe),this.times("1e"+e)},h.squareRoot=h.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,c=s.s,u=s.e,l=p+4,f=new A("0.5");if(1!==c||!a||!a[0])return new A(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+R(s)))||c==1/0?(((t=it(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=nt((u+1)/2)-(u<0||u%2),n=new A(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new A(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(o=n,n=f.times(o.plus(r(s,o,l,1))),it(o.c).slice(0,c)===(t=it(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(T(n,n.e+p+2,1),e=!n.times(n).eq(s));break}if(!i&&(T(o,o.e+p+2,0),o.times(o).eq(s))){n=o;break}l+=4,c+=4,i=1}return T(n,n.e+p+1,g,e)},h.toExponential=function(e,t){return null!=e&&(st(e,0,rt),e++),I(this,e,t,1)},h.toFixed=function(e,t){return null!=e&&(st(e,0,rt),e=e+this.e+1),I(this,e,t)},h.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=x;else if("object"!=typeof r)throw Error(Ye+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",l=s[0],f=s[1],h=i.s<0,d=h?l.slice(1):l,p=d.length;if(c&&(o=a,a=c,c=o,p-=o),a>0&&p>0){for(o=p%a||a,l=d.substr(0,o);o<p;o+=a)l+=u+d.substr(o,a);c>0&&(l+=u+d.slice(o)),h&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},h.toFraction=function(e){var t,n,i,o,s,a,c,u,l,f,h,p,y=this,b=y.c;if(null!=e&&(!(c=new A(e)).isInteger()&&(c.c||1!==c.s)||c.lt(d)))throw Error(Ye+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+R(c));if(!b)return new A(y);for(t=new A(d),l=n=new A(d),i=u=new A(d),p=it(b),s=t.e=p.length-y.e-1,t.c[0]=et[(a=s%Xe)<0?Xe+a:a],e=!e||c.comparedTo(t)>0?s>0?t:l:c,a=w,w=1/0,c=new A(p),u.c[0]=0;f=r(c,t,0,1),1!=(o=n.plus(f.times(i))).comparedTo(e);)n=i,i=o,l=u.plus(f.times(o=l)),u=o,t=c.minus(f.times(o=t)),c=o;return o=r(e.minus(n),i,0,1),u=u.plus(o.times(l)),n=n.plus(o.times(i)),u.s=l.s=y.s,h=r(l,i,s*=2,g).minus(y).abs().comparedTo(r(u,n,s,g).minus(y).abs())<1?[l,i]:[u,n],w=a,h},h.toNumber=function(){return+R(this)},h.toPrecision=function(e,t){return null!=e&&st(e,1,rt),I(this,e,t,2)},h.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=y||o>=b?ct(it(r.c),o):ut(it(r.c),o,"0"):10===e?t=ut(it((r=T(new A(r),p+o+1,g)).c),r.e,"0"):(st(e,2,S.length,"Base"),t=n(ut(it(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},h.valueOf=h.toJSON=function(){return R(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,null!=t&&A.set(t),A}();const ft=lt;function ht(e){return e&&e.Math==Math?e:void 0}const dt="object"==typeof globalThis&&ht(globalThis)||"object"==typeof window&&ht(window)||"object"==typeof self&&ht(self)||"object"==typeof r.g&&ht(r.g)||function(){return this}()||{},pt=e=>{try{if(e){const t=new URL(e).host;return 0===t.indexOf("www.")?t.replace("www.",""):t}return""}catch(e){return""}};var gt;!function(e){e.success="success",e.no_active_session="no_active_session",e.unsupported_network="unsupported_network",e.already_added="already_added",e.set_as_active="set_as_active",e.already_active="already_active"}(gt||(gt={}));var yt;!function(e){e.eth_chainId="eth_chainId",e.eth_accounts="eth_accounts",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTransaction="eth_signTransaction",e.personal_sign="personal_sign",e.eth_signTypedData="eth_signTypedData",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_getCode="eth_getCode",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.eth_requestAccounts="eth_requestAccounts",e.eth_blockNumber="eth_blockNumber",e.eth_call="eth_call",e.eth_estimateGas="eth_estimateGas",e.personal_ecRecover="personal_ecRecover",e.eth_gasPrice="eth_gasPrice",e.eth_getBlockByNumber="eth_getBlockByNumber",e.eth_getBalance="eth_getBalance",e.eth_getTransactionByHash="eth_getTransactionByHash"}(yt||(yt={}));const bt={available:"undefined"!=typeof window,name:"webviewMessenger",send:async(e,t,{id:r}={})=>(window.ReactNativeWebView.postMessage(JSON.stringify({topic:`> ${e}`,payload:t,id:r})),new Promise(((t,n)=>{const i=o=>{if(!function({id:e,topic:t,message:r}){if(r.topic===`< ${t}`&&(void 0===e||r.id===e)&&r.payload)return!0}({id:r,message:o.data,topic:e}))return;if(o.source!=window)return;window.removeEventListener("message",i);const{response:s,error:a}=o.data.payload;a&&n(new Error(a.message)),t(s)};window.addEventListener("message",i)}))),reply(e,t){const r=async r=>{if(!function({topic:e,message:t}){return!(!t.topic||"*"!==e&&t.topic!==`> ${e}`||"*"===e&&t.topic.startsWith("<"))}({message:r.data,topic:e}))return;if(r.source!=window)return;let n,i;try{i=await t(r.data.payload,{topic:r.data.topic,sender:r.source,id:r.data.id})}catch(e){n=e}const o=r.data.topic.replace(">","<");window.ReactNativeWebView.postMessage(JSON.stringify({topic:o,payload:{error:n,response:i},id:r.data.id}))};return window.addEventListener("message",r,!1),()=>window.removeEventListener("message",r)}},mt=function({messenger:e,topic:t}){return e.available||console.error(`Messenger "${e.name}" is not available in this context.`),{send:async(r,{id:n})=>e.send(t,r,{id:n}),async reply(r){e.reply(t,r)}}}({messenger:bt,topic:"providerRequest"}),wt=new s({backgroundMessenger:bt,providerRequestTransport:mt,onConstruct({emit:e}){if((e=>{try{return new URL(e),!0}catch(e){return!1}})(window.location.href)){const t=pt(window.location.href);bt?.reply(`accountsChanged:${t}`,(async t=>{e("accountsChanged",[t])})),bt?.reply(`chainChanged:${t}`,(async t=>{var r,n;e("chainChanged",(r=String(t),n=(e=>new ft(e).toString(16))(r),n.startsWith("0x")?n:`0x${n}`))})),bt?.reply(`disconnect:${t}`,(async()=>{e("disconnect",[])})),bt?.reply(`connect:${t}`,(async t=>{e("connect",t)}))}}});(function(){const{doctype:e}=window.document;return!e||"html"===e.name})()&&function(){const e=[/\.xml$/u,/\.pdf$/u],t=window.location.pathname;for(let r=0;r<e.length;r++)if(e[r].test(t))return!1;return!0}()&&function(){const e=document.documentElement.nodeName;return!e||"html"===e.toLowerCase()}()&&(function(e){const t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);window.addEventListener("eip6963:requestProvider",(()=>window.dispatchEvent(t)))}({info:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMCAwaDMydjMySDB6Ii8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTUuMzMzIDEwLjEzM2gxLjZjOC4yNDggMCAxNC45MzQgNi42ODYgMTQuOTM0IDE0LjkzNHYxLjZoMy4yYTEuNiAxLjYgMCAwIDAgMS42LTEuNmMwLTEwLjg5OS04LjgzNS0xOS43MzQtMTkuNzM0LTE5LjczNGExLjYgMS42IDAgMCAwLTEuNiAxLjZ2My4yWiIvPjxwYXRoIGZpbGw9InVybCgjZCkiIGQ9Ik0yMi40IDI1LjA2N2g0LjI2N2ExLjYgMS42IDAgMCAxLTEuNiAxLjZIMjIuNHYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik02LjkzMyA1LjMzM1Y5LjZoLTEuNlY2LjkzM2ExLjYgMS42IDAgMCAxIDEuNi0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNmKSIgZD0iTTUuMzMzIDkuNmgxLjZjOC41NDIgMCAxNS40NjcgNi45MjUgMTUuNDY3IDE1LjQ2N3YxLjZoLTQuOHYtMS42YzAtNS44OTEtNC43NzYtMTAuNjY3LTEwLjY2Ny0xMC42NjdoLTEuNlY5LjZaIi8+PHBhdGggZmlsbD0idXJsKCNnKSIgZD0iTTE4LjEzMyAyNS4wNjdIMjIuNHYxLjZoLTQuMjY3di0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNoKSIgZD0iTTUuMzMzIDEzLjg2N1Y5LjZoMS42djQuMjY3aC0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNpKSIgZD0iTTUuMzMzIDE2LjUzM2ExLjYgMS42IDAgMCAwIDEuNiAxLjYgNi45MzMgNi45MzMgMCAwIDEgNi45MzQgNi45MzQgMS42IDEuNiAwIDAgMCAxLjYgMS42aDIuNjY2di0xLjZjMC02LjE4Ni01LjAxNC0xMS4yLTExLjItMTEuMmgtMS42djIuNjY2WiIvPjxwYXRoIGZpbGw9InVybCgjaikiIGQ9Ik0xMy44NjcgMjUuMDY3aDQuMjY2djEuNmgtMi42NjZhMS42IDEuNiAwIDAgMS0xLjYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjaykiIGQ9Ik02LjkzMyAxOC4xMzNhMS42IDEuNiAwIDAgMS0xLjYtMS42di0yLjY2NmgxLjZ2NC4yNjZaIi8+PC9nPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKC05MCAxNiA5LjA2Nykgc2NhbGUoMTkuNzMzMykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii43NyIgc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzg3NTRDOSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJmIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxNS40NjY3KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjcyNCIgc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJpIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxMS4yKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjU5NSIgc3RvcC1jb2xvcj0iIzBBRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJqIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoNC41MzMzMyAwIDAgMTIuMDg4OSAxMy42IDI1Ljg2NykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMEFGIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+PC9yYWRpYWxHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9ImsiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgwIC00LjUzMzMzIDg1Ljk2NTQgMCA2LjEzMyAxOC40KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMwQUYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMURBNDAiLz48L3JhZGlhbEdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjE2IiB4Mj0iMTYiIHkxPSIwIiB5Mj0iMzIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMTc0Mjk5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDAxRTU5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgxPSIyMi4xMzMiIHgyPSIyNi42NjciIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkY0MDAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImUiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iNS4zMzMiIHkyPSI5Ljg2NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM4NzU0QzkiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjQwMDAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZyIgeDE9IjE4LjEzMyIgeDI9IjIyLjQiIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGNzAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImgiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iMTMuODY3IiB5Mj0iOS42IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvbGluZWFyR3JhZGllbnQ+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDMydjMySDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+",name:"Rainbow",rdns:"me.rainbow",uuid:function(){const e=dt,t=e.crypto||e.msCrypto;let r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&r())>>e/4).toString(16)))}()},provider:wt}),bt.reply("rainbow_ethereumChainEvent",(async({chainId:e,chainName:t,status:r,extensionUrl:n,host:i})=>{pt(window.location.href)===i&&alert("Should inject notification "+JSON.stringify({chainId:e,chainName:t,status:r,extensionUrl:n}))})),bt.reply("rainbow_reload",(async()=>{window.location.reload()})),Object.defineProperties(window,{rainbow:{value:wt,configurable:!1,writable:!1},ethereum:{get:()=>window.walletRouter.currentProvider,set(e){window.walletRouter.addProvider(e)},configurable:!1},walletRouter:{value:{rainbowProvider:wt,lastInjectedProvider:window.ethereum,currentProvider:wt,providers:[wt,...window.ethereum?[window.ethereum]:[]],setDefaultProvider(e){if(e)window.walletRouter.currentProvider=window.rainbow;else{const e=window.walletRouter.lastInjectedProvider??window.ethereum;window.walletRouter.currentProvider=e}},addProvider(e){window.walletRouter.providers.includes(e)||window.walletRouter.providers.push(e),wt!==e&&(window.walletRouter.lastInjectedProvider=e)}},configurable:!1,writable:!1}}),window.rainbow.providers=window.walletRouter.providers,window.dispatchEvent(new Event("ethereum#initialized")),bt.reply("rainbow_setDefaultProvider",(async({rainbowAsDefault:e})=>{window.walletRouter.setDefaultProvider(e)})))})()})();