PageSourceSearch

https://www.grtwines.com/_next/static/chunks/385-e2b6fd6bee15e071.js

js grtwines.com collected 2026-10-06 21:38:54 UTC 64,136 bytes, 1 lines download raw bytes

vendor: 6,955 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[385],{66292:function(t,e,r){r.d(e,{VZ:function(){return Ce},CH:function(){return Ie},lV:function(){return Ue}});var n=r(84231),s=r(62197),i=r.n(s);let o=!1,a=!1;const c={debug:1,default:2,info:2,warning:3,error:4,off:5};let u=c.default,l=null;const h=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var d,f;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(d||(d={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(f||(f={}));const g="0123456789abcdef";class p{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==c[r]&&this.throwArgumentError("invalid log level name","logLevel",t),u>c[r]||console.log.apply(console,e)}debug(...t){this._log(p.levels.DEBUG,t)}info(...t){this._log(p.levels.INFO,t)}warn(...t){this._log(p.levels.WARNING,t)}makeError(t,e,r){if(a)return this.makeError("censored error",e,{});e||(e=p.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((t=>{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t<e.length;t++)r+=g[e[t]>>4],r+=g[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(o){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push(`code=${e}`),n.push(`version=${this.version}`);const s=t;let i="";switch(e){case f.NUMERIC_FAULT:{i="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":i+="-"+e;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case f.CALL_EXCEPTION:case f.INSUFFICIENT_FUNDS:case f.MISSING_NEW:case f.NONCE_EXPIRED:case f.REPLACEMENT_UNDERPRICED:case f.TRANSACTION_REPLACED:case f.UNPREDICTABLE_GAS_LIMIT:i=e}i&&(t+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const o=new Error(t);return o.reason=s,o.code=e,Object.keys(r).forEach((function(t){o[t]=r[t]})),o}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,p.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),h&&this.throwError("platform missing String.prototype.normalize",p.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:h})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,p.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",p.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",p.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",p.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return l||(l=new p("logger/5.7.0")),l}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!t,o=!!e}static setLogLevel(t){const e=c[t.toLowerCase()];null!=e?u=e:p.globalLogger().warn("invalid log level - "+t)}static from(t){return new p(t)}}p.errors=f,p.levels=d;var m=i().BN;const y=new p("bignumber/5.7.0"),E={},v=9007199254740991;let b=!1;class w{constructor(t,e){t!==E&&y.throwError("cannot call constructor directly; use BigNumber.from",p.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return _(A(this).fromTwos(t))}toTwos(t){return _(A(this).toTwos(t))}abs(){return"-"===this._hex[0]?w.from(this._hex.substring(1)):this}add(t){return _(A(this).add(A(t)))}sub(t){return _(A(this).sub(A(t)))}div(t){return w.from(t).isZero()&&O("division-by-zero","div"),_(A(this).div(A(t)))}mul(t){return _(A(this).mul(A(t)))}mod(t){const e=A(t);return e.isNeg()&&O("division-by-zero","mod"),_(A(this).umod(e))}pow(t){const e=A(t);return e.isNeg()&&O("negative-power","pow"),_(A(this).pow(e))}and(t){const e=A(t);return(this.isNegative()||e.isNeg())&&O("unbound-bitwise-result","and"),_(A(this).and(e))}or(t){const e=A(t);return(this.isNegative()||e.isNeg())&&O("unbound-bitwise-result","or"),_(A(this).or(e))}xor(t){const e=A(t);return(this.isNegative()||e.isNeg())&&O("unbound-bitwise-result","xor"),_(A(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&O("negative-width","mask"),_(A(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&O("negative-width","shl"),_(A(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&O("negative-width","shr"),_(A(this).shrn(t))}eq(t){return A(this).eq(A(t))}lt(t){return A(this).lt(A(t))}lte(t){return A(this).lte(A(t))}gt(t){return A(this).gt(A(t))}gte(t){return A(this).gte(A(t))}isNegative(){return"-"===this._hex[0]}isZero(){return A(this).isZero()}toNumber(){try{return A(this).toNumber()}catch(t){O("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return y.throwError("this platform does not support BigInt",p.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?b||(b=!0,y.warn("BigNumber.toString does not accept any parameters;
1 base-10 is assumed")):16===arguments[0]?y.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",p.errors.UNEXPECTED_ARGUMENT,{}):y.throwError("BigNumber.toString does not accept parameters",p.errors.UNEXPECTED_ARGUMENT,{})),A(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof w)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new w(E,N(t)):t.match(/^-?[0-9]+$/)?new w(E,N(new m(t))):y.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&O("underflow","BigNumber.from",t),(t>=v||t<=-v)&&O("overflow","BigNumber.from",t),w.from(String(t));const e=t;if("bigint"===typeof e)return w.from(e.toString());if((0,n.isBytes)(e))return w.from((0,n.hexlify)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return w.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&((0,n.isHexString)(t)||"-"===t[0]&&(0,n.isHexString)(t.substring(1))))return w.from(t)}return y.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function N(t){if("string"!==typeof t)return N(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&y.throwArgumentError("invalid hex","value",t),"0x00"===(t=N(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function _(t){return w.from(N(t))}function A(t){const e=w.from(t).toHexString();return"-"===e[0]?new m("-"+e.substring(3),16):new m(e.substring(2),16)}function O(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),y.throwError(t,p.errors.NUMERIC_FAULT,n)}var R=function(t,e,r,n){return new(r||(r=Promise))((function(s,i){function o(t){try{c(n.next(t))}catch(e){i(e)}}function a(t){try{c(n.throw(t))}catch(e){i(e)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}c((n=n.apply(t,e||[])).next())}))};const T=new p("properties/5.7.0");function S(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function x(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!==typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function P(t){return R(this,void 0,void 0,(function*(){const e=Object.keys(t).map((e=>{const r=t[e];return Promise.resolve(r).then((t=>({key:e,value:t})))}));return(yield Promise.all(e)).reduce(((t,e)=>(t[e.key]=e.value,t)),{})}))}function C(t){const e={};for(const r in t)e[r]=t[r];return e}const I={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function U(t){if(void 0===t||null===t||I[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;const r=Object.keys(t);for(let n=0;n<r.length;n++){let s=null;try{s=t[r[n]]}catch(e){continue}if(!U(s))return!1}return!0}return T.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function F(t){if(U(t))return t;if(Array.isArray(t))return Object.freeze(t.map((t=>L(t))));if("object"===typeof t){const e={};for(const r in t){const n=t[r];void 0!==n&&S(e,r,L(n))}return e}return T.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function L(t){return F(t)}class j{constructor(t){for(const e in t)this[e]=L(t[e])}}const k="abi/5.7.0",D=new p(k);class M{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){D.throwArgumentError(t,this.localName,e)}}class z{constructor(t){S(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return(0,n.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData((0,n.concat)(t._data))}writeBytes(t){let e=(0,n.arrayify)(t);const r=e.length%this.wordSize;return r&&(e=(0,n.concat)([e,this._padding.slice(r)])),this._writeData(e)}_getValue(t){let e=(0,n.arrayify)(w.from(t));return e.length>this.wordSize&&D.throwError("value out-of-bounds",p.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}
1),e.length%this.wordSize&&(e=(0,n.concat)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class G{constructor(t,e,r,s){S(this,"_data",(0,n.arrayify)(t)),S(this,"wordSize",e||32),S(this,"_coerceFunc",r),S(this,"allowLoose",s),this._offset=0}get data(){return(0,n.hexlify)(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):G.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:D.throwError("data out-of-bounds",p.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new G(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return w.from(this.readBytes(this.wordSize))}}var B=r(83669),V=r.n(B);function $(t){return"0x"+V().keccak_256((0,n.arrayify)(t))}const H=new p("rlp/5.7.0");function J(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function W(t){if(Array.isArray(t)){let e=[];
1if(t.forEach((function(t){e=e.concat(W(t))})),e.length<=55)return e.unshift(192+e.length),e;const r=J(e.length);return r.unshift(247+r.length),r.concat(e)}(0,n.isBytesLike)(t)||H.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call((0,n.arrayify)(t));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=J(e.length);return r.unshift(183+r.length),r.concat(e)}function X(t){return(0,n.hexlify)(W(t))}const K=new p("address/5.7.0");function Z(t){(0,n.isHexString)(t,20)||K.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=e[n].charCodeAt(0);const s=(0,n.arrayify)($(r));for(let n=0;n<40;n+=2)s[n>>1]>>4>=8&&(e[n]=e[n].toUpperCase()),(15&s[n>>1])>=8&&(e[n+1]=e[n+1].toUpperCase());return"0x"+e.join("")}const q={};for(let Fe=0;Fe<10;Fe++)q[String(Fe)]=String(Fe);for(let Fe=0;Fe<26;Fe++)q[String.fromCharCode(65+Fe)]=String(10+Fe);const Q=Math.floor((Y=9007199254740991,Math.log10?Math.log10(Y):Math.log(Y)/Math.LN10));var Y;function tt(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>q[t])).join("");for(;e.length>=Q;){let t=e.substring(0,Q);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function et(t){let e=null;if("string"!==typeof t&&K.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=Z(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&K.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==tt(t)&&K.throwArgumentError("bad icap checksum","address",t),r=t.substring(4),e=new m(r,36).toString(16);e.length<40;)e="0"+e;e=Z("0x"+e)}else K.throwArgumentError("invalid address","address",t);var r;return e}function rt(t){let e=null;try{e=et(t.from)}catch(s){K.throwArgumentError("missing from address","transaction",t)}const r=(0,n.stripZeros)((0,n.arrayify)(w.from(t.nonce).toHexString()));return et((0,n.hexDataSlice)($(X([e,r])),12))}const nt=new p("strings/5.7.0");var st,it;function ot(t,e,r,n,s){if(t===it.BAD_PREFIX||t===it.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n<r.length&&r[n]>>6===2;n++)t++;return t}return t===it.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(st||(st={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(it||(it={}));const at=Object.freeze({error:function(t,e,r,n,s){return nt.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:ot,replace:function(t,e,r,n,s){return t===it.OVERLONG?(n.push(s),0):(n.push(65533),ot(t,e,r))}});function ct(t,e){null==e&&(e=at.error),t=(0,n.arrayify)(t);const r=[];let s=0;for(;s<t.length;){const n=t[s++];if(n>>7===0){r.push(n);continue}let i=null,o=null;if(192===(224&n))i=1,o=127;else if(224===(240&n))i=2,o=2047;else{if(240!==(248&n)){s+=e(128===(192&n)?it.UNEXPECTED_CONTINUE:it.BAD_PREFIX,s-1,t,r);continue}i=3,o=65535}if(s-1+i>=t.length){s+=e(it.OVERRUN,s-1,t,r);continue}let a=n&(1<<8-i-1)-1;for(let c=0;c<i;c++){let n=t[s];if(128!=(192&n)){s+=e(it.MISSING_CONTINUE,s,t,r),a=null;break}a=a<<6|63&n,s++}null!==a&&(a>1114111?s+=e(it.OUT_OF_RANGE,s-1-i,t,r,a):a>=55296&&a<=57343?s+=e(it.UTF16_SURROGATE,s-1-i,t,r,a):a<=o?s+=e(it.OVERLONG,s-1-i,t,r,a):r.push(a))}return r}function ut(t,e=st.current){e!=st.current&&(nt.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const e=t.charCodeAt(n);if(e<128)r.push(e);else if(e<2048)r.push(e>>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const s=t.charCodeAt(n);if(n>=t.length||56320!==(64512&s))throw new Error("invalid utf-8 string");const i=65536+((1023&e)<<10)+(1023&s);r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(63&i|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return(0,n.arrayify)(r)}function lt(t,e){return ct(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>
vendor: 19,713 bytes, line 1
110&1023),56320+(1023&t))))).join("")}function ht(t){return $(ut(t))}class dt extends M{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=et(e)}catch(r){this._throwError(r.message,e)}return t.writeValue(e)}decode(t){return et((0,n.hexZeroPad)(t.readValue().toHexString(),20))}}class ft extends M{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const gt=new p(k);function pt(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||gt.throwError("cannot encode object for signature with missing names",p.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&gt.throwError("cannot encode object for signature with duplicate names",p.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else gt.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&gt.throwArgumentError("types/value length mismatch","tuple",r);let s=new z(t.wordSize),i=new z(t.wordSize),o=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=i.length;t.encode(i,r);let n=s.writeUpdatableValue();o.push((t=>{n(t+e)}))}else t.encode(s,r)})),o.forEach((t=>{t(s.length)}));let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function mt(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let s=null;if(e.dynamic){let r=t.readValue(),o=n.subReader(r.toNumber());try{s=e.decode(o)}catch(i){if(i.code===p.errors.BUFFER_OVERRUN)throw i;s=i,s.baseType=e.name,s.name=e.localName,s.type=e.type}}else try{s=e.decode(t)}catch(i){if(i.code===p.errors.BUFFER_OVERRUN)throw i;s=i,s.baseType=e.name,s.name=e.localName,s.type=e.type}void 0!=s&&r.push(s)}));const s=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==s[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const i=r[e];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw i}}):r[n]=i}));for(let i=0;i<r.length;i++){const t=r[i];t instanceof Error&&Object.defineProperty(r,i,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class yt extends M{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){Array.isArray(e)||this._throwError("expected array value",e);let r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),gt.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let s=0;s<e.length;s++)n.push(this.coder);return pt(t,n,e)}decode(t){let e=this.length;-1===e&&(e=t.readValue().toNumber(),32*e>t._data.length&&gt.throwError("insufficient data length",p.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let n=0;n<e;n++)r.push(new ft(this.coder));return t.coerce(this.name,mt(t,r))}}class Et extends M{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){return t.writeValue(e?1:0)}decode(t){return t.coerce(this.type,!t.readValue().isZero())}}class vt extends M{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=(0,n.arrayify)(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readValue().toNumber(),!0)}}class bt extends vt{constructor(t){super("bytes",t)}decode(t){return t.coerce(this.name,(0,n.hexlify)(super.decode(t)))}}class wt extends M{constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),this.size=t}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(t,e){let r=(0,n.arrayify)(e);return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}decode(t){return t.coerce(this.name,(0,n.hexlify)(t.readBytes(this.size)))}}class Nt extends M{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}decode(t){return t.readBytes(0),t.coerce(this.name,null)}}const _t=w.from(-1),At=w.from(0),Ot=w.from(1),Rt=w.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Tt extends M{constructor(t,e,r){const n=(e?"int":"uint")+8*t;super(n,n,r,!1),this.size=t,this.signed=e}defaultValue(){return 0}encode(t,e){let r=w.from(e),n=Rt.mask(8*t.wordSize);if(this.signed){let t=n.mask(8*this.size-1);(r.gt(t)||r.lt(t.add(Ot).mul(_t)))&&this._throwError("value out-of-bounds",e)}else(r.lt(At)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}decode(t){let e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}class St extends vt{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,ut(e))}decode(t){return lt(super.decode(t))}}class xt extends M{constructor(t,e){let r=!1;const n=[];t.forEach((t=>{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let s=r.localName;s&&1===e[s]&&("length"===s&&(s="_length"),null==t[s]&&(t[s]=t[n]))})),Object.freeze(t)}encode(t,e){return pt(t,this.coders,e)}decode(t){return t.coerce(this.name,mt(t,this.coders))}}const Pt=new p(k),Ct={};let It={calldata:!0,memory:!0,storage:!0},Ut={calldata:!0,memory:!0};function Ft(t,e){if("bytes"===t||"string"===t){if(It[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&Ut[e])return!0;return(It[e]||"payable"===e)&&Pt.throwArgumentError("invalid modifier","name",e),!1}function Lt(t,e){for(let r in e)S(t,r,e[r])}const jt=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),kt=new RegExp(/^(.*)\[([0-9]*)\]$/);class Dt{constructor(t,e){t!==Ct&&Pt.throwError("use fromString",p.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Lt(this,e);let r=this.type.match(kt);Lt(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:Dt.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=jt.sighash),jt[t]||Pt.throwArgumentError("invalid format type","format",t),t===jt.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==jt.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===jt.full?", ":",")+")"):e+=this.type,t!==jt.sighash&&(!0===this.indexed&&(e+=" indexed"),t===jt.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?Dt.fromString(t,e):Dt.fromObject(t)}static fromObject(t){return Dt.isParamType(t)?t:new Dt(Ct,{name:t.name||null,type:Kt(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(Dt.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){Pt.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function s(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let i={type:"",name:"",state:{allowType:!0}},o=i;for(let a=0;a<t.length;a++){let r=t[a];switch(r){case"(":o.state.allowType&&""===o.type?o.type="tuple":o.state.allowParams||n(a),o.state.allowType=!1,o.type=Kt(o.type),o.components=[s(o)],o=o.components[0];break;case")":delete o.state,"indexed"===o.name&&(e||n(a),o.indexed=!0,o.name=""),Ft(o.type,o.name)&&(o.name=""),o.type=Kt(o.type);let t=o;o=o.parent,o||n(a),delete t.parent,o.state.allowParams=!1,o.state.allowName=!0,o.state.allowArray=!0;break;case",":delete o.state,"indexed"===o.name&&(e||n(a),o.indexed=!0,o.name=""),Ft(o.type,o.name)&&(o.name=""),o.type=Kt(o.type);let i=s(o.parent);o.parent.components.push(i),delete o.parent,o=i;break;case" ":o.state.allowType&&""!==o.type&&(o.type=Kt(o.type),delete o.state.allowType,o.state.allowName=!0,o.state.allowParams=!0),o.state.allowName&&""!==o.name&&("indexed"===o.name?(e||n(a),o.indexed&&n(a),o.indexed=!0,o.name=""):Ft(o.type,o.name)?o.name="":o.state.allowName=!1);break;case"[":o.state.allowArray||n(a),o.type+=r,o.state.allowArray=!1,o.state.allowName=!1,o.state.readArray=!0;break;case"]":o.state.readArray||n(a),o.type+=r,o.state.readArray=!1,o.state.allowArray=!0,o.state.allowName=!0;break;default:o.state.allowType?(o.type+=r,o.state.allowParams=!0,o.state.allowArray=!0):o.state.allowName?(o.name+=r,delete o.state.allowArray):o.state.readArray?o.type+=r:n(a)}}return o.parent&&Pt.throwArgumentError("unexpected eof","param",t),delete i.state,"indexed"===o.name?(e||n(r.length-7),o.indexed&&n(r.length-7),o.indexed=!0,o.name=""):Ft(o.type,o.name)&&(o.name=""),i.type=Kt(i.type),i}(t,!!e),Dt.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(t){return!(null==t||!t._isParamType)}}function Mt(t,e){return function(t){t=t.trim();let e=[],r="",n=0;for(let s=0;s<t.length;s++){let i=t[s];","===i&&0===n?(e.push(r),r=""):(r+=i,"("===i?n++:")"===i&&(n--,-1===n&&Pt.throwArgumentError("unbalanced parenthesis","value",t)))}r&&e.push(r);return e}(t).map((t=>Dt.fromString(t,e)))}class zt{constructor(t,e){t!==Ct&&Pt.throwError("use a static from method",p.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Lt(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return zt.isFragment(t)?t:"string"===typeof t?zt.fromString(t):zt.fromObject(t)}static fromObject(t){if(zt.isFragment(t))return t;switch(t.type){case"function":return Jt.fromObject(t);case"event":return Gt.fromObject(t);case"constructor":return Ht.fromObject(t);case"error":return Xt.fromObject(t);case"fallback":case"receive":return null}return Pt.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Gt.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?Jt.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?Ht.fromString(t.trim()):"error"===t.split(" ")[0]?Xt.fromString(t.substring(5).trim()):Pt.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class Gt extends zt{format(t){if(t||(t=jt.sighash),jt[t]||Pt.throwArgumentError("invalid format type","format",t),t===jt.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==jt.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===jt.full?", ":",")+") ",t!==jt.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"===typeof t?Gt.fromString(t):Gt.fromObject(t)}static fromObject(t){if(Gt.isEventFragment(t))return t;"event"!==t.type&&Pt.throwArgumentError("invalid event object","value",t);const e={name:qt(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(Dt.fromObject):[],type:"event"};return new Gt(Ct,e)}static fromString(t){let e=t.match(Qt);e||Pt.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:Pt.warn("unknown modifier: "+t)}})),Gt.fromObject({name:e[1].trim(),anonymous:r,inputs:Mt(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function Bt(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&Pt.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Pt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=w.from(r[1]),r[0]):t}function Vt(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function $t(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&Pt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&Pt.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||Pt.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Pt.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&Pt.throwArgumentError("unable to determine stateMutability","value",t),e}class Ht extends zt{format(t){if(t||(t=jt.sighash),jt[t]||Pt.throwArgumentError("invalid format type","format",t),t===jt.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===jt.sighash&&Pt.throwError("cannot format a constructor for sighash",p.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===jt.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"===typeof t?Ht.fromString(t):Ht.fromObject(t)}static fromObject(t){if(Ht.isConstructorFragment(t))return t;"constructor"!==t.type&&Pt.throwArgumentError("invalid constructor object","value",t);let e=$t(t);e.constant&&Pt.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(Dt.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?w.from(t.gas):null};return new Ht(Ct,r)}static fromString(t){let e={type:"constructor"},r=(t=Bt(t,e)).match(Qt);return r&&"constructor"===r[1].trim()||Pt.throwArgumentError("invalid constructor string","value",t),e.inputs=Mt(r[2].trim(),!1),Vt(r[3].trim(),e),Ht.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class Jt extends Ht{format(t){if(t||(t=jt.sighash),jt[t]||Pt.throwArgumentError("invalid format type","format",t),t===jt.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==jt.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===jt.full?", ":",")+") ",t!==jt.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"===typeof t?Jt.fromString(t):Jt.fromObject(t)}static fromObject(t){if(Jt.isFunctionFragment(t))return t;"function"!==t.type&&Pt.throwArgumentError("invalid function object","value",t);let e=$t(t);const r={type:t.type,name:qt(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(Dt.fromObject):[],outputs:t.outputs?t.outputs.map(Dt.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?w.from(t.gas):null};return new Jt(Ct,r)}static fromString(t){let e={type:"function"},r=(t=Bt(t,e)).split(" returns ");r.length>2&&Pt.throwArgumentError("invalid function string","value",t);let n=r[0].match(Qt);if(n||Pt.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&qt(e.name),e.inputs=Mt(n[2],!1),Vt(n[3].trim(),e),r.length>1){let n=r[1].match(Qt);""==n[1].trim()&&""==n[3].trim()||Pt.throwArgumentError("unexpected tokens","value",t),e.outputs=Mt(n[2],!1)}else e.outputs=[];return Jt.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function Wt(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||Pt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Xt extends zt{format(t){if(t||(t=jt.sighash),jt[t]||Pt.throwArgumentError("invalid format type","format",t),t===jt.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==jt.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===jt.full?", ":",")+") ",e.trim()}static from(t){return"string"===typeof t?Xt.fromString(t):Xt.fromObject(t)}static fromObject(t){if(Xt.isErrorFragment(t))return t;"error"!==t.type&&Pt.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:qt(t.name),inputs:t.inputs?t.inputs.map(Dt.fromObject):[]};return Wt(new Xt(Ct,e))}static fromString(t){let e={type:"error"},r=t.match(Qt);return r||Pt.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&qt(e.name),e.inputs=Mt(r[2],!1),Wt(Xt.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function Kt(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Zt=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function qt(t){return t&&t.match(Zt)||Pt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Qt=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const Yt=new p(k),te=new RegExp(/^bytes([0-9]*)$/),ee=new RegExp(/^(u?int)([0-9]*)$/);const re=new class{constructor(t){S(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new dt(t.name);case"bool":return new Et(t.name);case"string":return new St(t.name);case"bytes":return new bt(t.name);case"array":return new yt(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new xt((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new Nt(t.name)}let e=t.type.match(ee);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!==0)&&Yt.throwArgumentError("invalid "+e[1]+" bit length","param",t),new Tt(r/8,"int"===e[1],t.name)}
1if(e=t.type.match(te),e){let r=parseInt(e[1]);return(0===r||r>32)&&Yt.throwArgumentError("invalid bytes length","param",t),new wt(r,t.name)}return Yt.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new G(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new z(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(Dt.from(t))));return new xt(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&Yt.throwError("types/values length mismatch",p.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(Dt.from(t)))),n=new xt(r,"_"),s=this._getWriter();return n.encode(s,e),s.data}decode(t,e,r){const s=t.map((t=>this._getCoder(Dt.from(t))));return new xt(s,"_").decode(this._getReader((0,n.arrayify)(e),r))}},ne=new p(k);class se extends j{}class ie extends j{}class oe extends j{}class ae extends j{static isIndexed(t){return!(!t||!t._isIndexed)}}const ce={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ue(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class le{constructor(t){let e=[];e="string"===typeof t?JSON.parse(t):t,S(this,"fragments",e.map((t=>zt.from(t))).filter((t=>null!=t))),S(this,"_abiCoder",x(new.target,"getAbiCoder")()),S(this,"functions",{}),S(this,"errors",{}),S(this,"events",{}),S(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void ne.warn("duplicate definition - constructor"):void S(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?ne.warn("duplicate definition - "+r):e[r]=t})),this.deploy||S(this,"deploy",Ht.from({payable:!1,type:"constructor"})),S(this,"_isInterface",!0)}format(t){t||(t=jt.full),t===jt.sighash&&ne.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===jt.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return re}static getAddress(t){return et(t)}static getSighash(t){return(0,n.hexDataSlice)(ht(t.format()),0,4)}static getEventTopic(t){return ht(t.format())}getFunction(t){if((0,n.isHexString)(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];ne.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?ne.throwArgumentError("no matching function","name",e):r.length>1&&ne.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const e=this.functions[Jt.fromString(t).format()];return e||ne.throwArgumentError("no matching function","signature",t),e}getEvent(t){if((0,n.isHexString)(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];ne.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?ne.throwArgumentError("no matching event","name",e):r.length>1&&ne.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const e=this.events[Gt.fromString(t).format()];return e||ne.throwArgumentError("no matching event","signature",t),e}getError(t){if((0,n.isHexString)(t)){const e=x(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}ne.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?ne.throwArgumentError("no matching error","name",e):r.length>1&&ne.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const e=this.errors[Jt.fromString(t).format()];return e||ne.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"===typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(r){throw e}}return x(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"===typeof t&&(t=this.getEvent(t)),x(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"===typeof t&&(t=this.getError(t));const r=(0,n.arrayify)(e);return(0,n.hexlify)(r.slice(0,4))!==this.getSighash(t)&&ne.throwArgumentError(`data signature does not match error ${t.name}.`,"data",(0,n.hexlify)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeErrorResult(t,e){return"string"===typeof t&&(t=this.getError(t)),(0,n.hexlify)((0,n.concat)([this.get
1Sighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"===typeof t&&(t=this.getFunction(t));const r=(0,n.arrayify)(e);return(0,n.hexlify)(r.slice(0,4))!==this.getSighash(t)&&ne.throwArgumentError(`data signature does not match function ${t.name}.`,"data",(0,n.hexlify)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeFunctionData(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,n.hexlify)((0,n.concat)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"===typeof t&&(t=this.getFunction(t));let r=(0,n.arrayify)(e),s=null,i="",o=null,a=null,c=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(u){}break;case 4:{const t=(0,n.hexlify)(r.slice(0,4)),e=ce[t];if(e)o=this._abiCoder.decode(e.inputs,r.slice(4)),a=e.name,c=e.signature,e.reason&&(s=o[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const e=this.getError(t);o=this._abiCoder.decode(e.inputs,r.slice(4)),a=e.name,c=e.format()}catch(u){}break}}return ne.throwError("call revert exception"+i,p.errors.CALL_EXCEPTION,{method:t.format(),data:(0,n.hexlify)(e),errorArgs:o,errorName:a,errorSignature:c,reason:s})}encodeFunctionResult(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,n.hexlify)(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"===typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&ne.throwError("too many arguments for "+t.format(),p.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let r=[];t.anonymous||r.push(this.getEventTopic(t));const s=(t,e)=>"string"===t.type?ht(e):"bytes"===t.type?$((0,n.hexlify)(e)):("bool"===t.type&&"boolean"===typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=w.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),(0,n.hexZeroPad)((0,n.hexlify)(e),32));for(e.forEach(((e,n)=>{let i=t.inputs[n];i.indexed?null==e?r.push(null):"array"===i.baseType||"tuple"===i.baseType?ne.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,e):Array.isArray(e)?r.push(e.map((t=>s(i,t)))):r.push(s(i,e)):null!=e&&ne.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,e)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){"string"===typeof t&&(t=this.getEvent(t));const r=[],n=[],s=[];return t.anonymous||r.push(this.getEventTopic(t)),e.length!==t.inputs.length&&ne.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,i)=>{const o=e[i];if(t.indexed)if("string"===t.type)r.push(ht(o));else if("bytes"===t.type)r.push($(o));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([t.type],[o]))}else n.push(t),s.push(o)})),{data:this._abiCoder.encode(n,s),topics:r}}decodeEventLog(t,e,r){if("string"===typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){let e=this.getEventTopic(t);(0,n.isHexString)(r[0],32)&&r[0].toLowerCase()===e||ne.throwError("fragment/topic mismatch",p.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:r[0]}),r=r.slice(1)}let s=[],i=[],o=[];t.inputs.forEach(((t,e)=>
vendor: 14,866 bytes, line 1
1{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(s.push(Dt.fromObject({type:"bytes32",name:t.name})),o.push(!0)):(s.push(t),o.push(!1)):(i.push(t),o.push(!1))}));let a=null!=r?this._abiCoder.decode(s,(0,n.concat)(r)):null,c=this._abiCoder.decode(i,e,!0),u=[],l=0,h=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==a)u[e]=new ae({_isIndexed:!0,hash:null});else if(o[e])u[e]=new ae({_isIndexed:!0,hash:a[h++]});else try{u[e]=a[h++]}catch(r){u[e]=r}else try{u[e]=c[l++]}catch(r){u[e]=r}if(t.name&&null==u[t.name]){const r=u[e];r instanceof Error?Object.defineProperty(u,t.name,{enumerable:!0,get:()=>{throw ue(`property ${JSON.stringify(t.name)}`,r)}}):u[t.name]=r}}));for(let n=0;n<u.length;n++){const t=u[n];t instanceof Error&&Object.defineProperty(u,n,{enumerable:!0,get:()=>{throw ue(`index ${n}`,t)}})}return Object.freeze(u)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new ie({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:w.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new se({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=(0,n.hexlify)(t);let r=this.getError(e.substring(0,10).toLowerCase());return r?new oe({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(t){return!(!t||!t._isInterface)}}var he=r(86091),de=r(55659);const fe=new p("transactions/5.7.0");var ge;!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(ge||(ge={}));function pe(t,e){return{address:et(t),storageKeys:(e||[]).map(((e,r)=>(32!==(0,n.hexDataLength)(e)&&fe.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,e),e.toLowerCase())))}}function me(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&fe.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),pe(t[0],t[1])):pe(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return pe(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}var ye=function(t,e,r,n){return new(r||(r=Promise))((function(s,i){function o(t){try{c(n.next(t))}catch(e){i(e)}}function a(t){try{c(n.throw(t))}catch(e){i(e)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}c((n=n.apply(t,e||[])).next())}))};const Ee=new p("contracts/5.7.0"),ve={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function be(t,e){return ye(this,void 0,void 0,(function*(){const r=yield e;"string"!==typeof r&&Ee.throwArgumentError("invalid address or ENS name","name",r);try{return et(r)}catch(s){}t||Ee.throwError("a provider or signer is needed to resolve ENS names",p.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return null==n&&Ee.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function we(t,e,r){return ye(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>we(t,Array.isArray(e)?e[n]:e[r.name],r)))):"address"===r.type?yield be(t,e):"tuple"===r.type?yield we(t,e,r.components):"array"===r.baseType?Array.isArray(e)?yield Promise.all(e.map((e=>we(t,e,r.arrayChildren)))):Promise.reject(Ee.makeError("invalid value for array",p.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e}))}function Ne(t,e,r){return ye(this,void 0,void 0,(function*(){let s={};r.length===e.inputs.length+1&&"object"===typeof r[r.length-1]&&(s=C(r.pop())),Ee.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?s.from?s.from=P({override:be(t.signer,s.from),signer:t.signer.getAddress()}).then((t=>ye(this,void 0,void 0,(function*(){return et(t.signer)!==t.override&&Ee.throwError("Contract with a Signer cannot override from",p.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.override})))):s.from=t.signer.getAddress():s.from&&(s.from=be(t.provider,s.from));const i=yield P({args:we(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:P(s)||{}}),o=t.interface.encodeFunctionData(e,i.args),a={data:o,to:i.address},c=i.overrides;if(null!=c.nonce&&(a.nonce=w.from(c.nonce).toNumber()),null!=c.gasLimit&&(a.gasLimit=w.from(c.gasLimit)),null!=c.gasPrice&&(a.gasPrice=w.from(c.gasPrice)),null!=c.maxFeePerGas&&(a.maxFeePerGas=w.from(c.maxFeePerGas)),null!=c.maxPriorityFeePerGas&&(a.maxPriorityFeePerGas=w.from(c.maxPriorityFeePerGas)),null!=c.from&&(a.from=c.from),null!=c.type&&(a.type=c.type),null!=c.accessList&&(a.accessList=me(c.accessList)),null==a.gasLimit&&null!=e.gas){let t=21e3;const r=(0,n.arrayify)(o);for(let e=0;e<r.length;e++)t+=4,r[e]&&(t+=64);a.gasLimit=w.from(e.gas).add(t)}if(c.value){const t=w.from(c.value);t.isZero()||e.payable||Ee.throwError("non-payable method cannot override value",p.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:s.value}),a.value=t}c.customData&&(a.customData=C(c.customData)),c.ccipReadEnabled&&(a.ccipReadEnabled=!!c.ccipReadEnabled),delete s.nonce,delete s.gasLimit,delete s.gasPrice,delete s.from,delete s.value,delete s.type,delete s.accessList,delete s.maxFeePerGas,delete s.maxPriorityFeePerGas,delete s.customData,delete s.ccipReadEnabled;const u=Object.keys(s).filter((t=>null!=s[t]));return u.length&&Ee.throwError(`cannot override ${u.map((t=>JSON.stringify(t))).join(",")}`,p.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),a}))}function _e(t,e){const r=e.wait.bind(e);e.wait=e=>r(e).then((e=>(e.events=e.logs.map((r=>{let n=L(r),s=null;try{s=t.interface.parseLog(r)}catch(i){}return s&&(n.args=s.args,n.decode=(e,r)=>t.interface.decodeEventLog(s.eventFragment,e,r),n.event=s.name,n.eventSignature=s.signature),n.removeListener=()=>t.provider,n.getBlock=()=>t.provider.getBlock(e.blockHash),n.getTransaction=()=>t.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(e),n})),e)))}function Ae(t,e,r){const n=t.signer||t.provider;return function(...s){return ye(this,void 0,void 0,(function*(){let i;if(s.length===e.inputs.length+1&&"object"===typeof s[s.length-1]){const t=C(s.pop());null!=t.blockTag&&(i=yield t.blockTag),delete t.blockTag,s.push(t)}null!=t.deployTransaction&&(yield t._deployed(i));const o=yield Ne(t,e,s),a=yield n.call(o,i);try{let n=t.interface.decodeFunctionResult(e,a);return r&&1===e.outputs.length&&(n=n[0]),n}catch(c){throw c.code===p.errors.CALL_EXCEPTION&&(c.address=t.address,c.args=s,c.transaction=o),c}}))}}function Oe(t,e,r){return e.constant?Ae(t,e,r):function(t,e){return function(...r){return ye(this,void 0,void 0,(function*(){t.signer||Ee.throwError("sending a transaction requires a signer",p.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=t.deployTransaction&&(yield t._deployed());const n=yield Ne(t,e,r),s=yield t.signer.sendTransaction(n);return _e(t,s),s}))}}(t,e)}function Re(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.map((t=>Array.isArray(t)?t.join("|"):t)).join(":"):""):"*"}class Te{constructor(t,e){S(this,"tag",t),S(this,"filter",e),this._listeners=[]}addListener(t,e){this._listeners.push({listener:t,once:e})}removeListener(t){let e=!1;this._listeners=this._listeners.filter((r=>!(!e&&r.listener===t)||(e=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((t=>t.listener))}listenerCount(){return this._listeners.length}run(t){const e=this.listenerCount();return this._listeners=this._listeners.filter((e=>{const r=t.slice();return setTimeout((()=>{e.listener.apply(this,r)}),0),!e.once})),e}prepareEvent(t){}getEmit(t){return[t]}}class Se extends Te{constructor(){super("error",null)}}class xe extends Te{constructor(t,e,r,n){const s={address:t};let i=e.getEventTopic(r);n?(i!==n[0]&&Ee.throwArgumentError("topic mismatch","topics",n),s.topics=n.slice()):s.topics=[i],super(Re(s),s),S(this,"address",t),S(this,"interface",e),S(this,"fragment",r)}prepareEvent(t){super.prepareEvent(t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=(t,e)=>this.interface.decodeEventLog(this.fragment,t,e);try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(e){t.args=null,t.decodeError=e}}getEmit(t){const e=function(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let i in n){const o=t.slice();o.push(i);try{r(o,n[i])}catch(s){e.push({path:o,error:s})}}};return r([],t),e}(t.args);if(e.length)throw e[0].error;const r=(t.args||[]).slice();return r.push(t),r}}class Pe extends Te{constructor(t,e){super("*",{address:t}),S(this,"address",t),S(this,"interface",e)}prepareEvent(t){super.prepareEvent(t);try{const e=this.interface.parseLog(t);t.event=e.name,t.eventSignature=e.signature,t.decode=(t,r)=>this.interface.decodeEventLog(e.eventFragment,t,r),t.args=e.args}catch(e){}}}class Ce{constructor(t,e,r){S(this,"interface",x(new.target,"getInterface")(e)),null==r?(S(this,"provider",null),S(this,"signer",null)):de.E.isSigner(r)?(S(this,"provider",r.provider||null),S(this,"signer",r)):he.zt.isProvider(r)?(S(this,"provider",r),S(this,"signer",null)):Ee.throwArgumentError("invalid signer or provider","signerOrProvider",r),S(this,"callStatic",{}),S(this,"estimateGas",{}),S(this,"functions",{}),S(this,"populateTransaction",{}),S(this,"filters",{});{const t={};Object.keys(this.interface.events).forEach((e=>{const r=this.interface.events[e];S(this.filters,e,((...t)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,t)}))),t[r.name]||(t[r.name]=[]),t[r.name].push(e)})),Object.keys(t).forEach((e=>{const r=t[e];1===r.length?S(this.filters,e,this.filters[r[0]]):Ee.warn(`Duplicate definition of ${e} (${r.join(", ")})`)}))}if(S(this,"_runningEvents",{}),S(this,"_wrappedEmits",{}),null==t&&Ee.throwArgumentError("invalid contract address or ENS name","addressOrName",t),S(this,"address",t),this.provider)S(this,"resolvedAddress",be(this.provider,t));else try{S(this,"resolvedAddress",Promise.resolve(et(t)))}catch(i){Ee.throwError("provider is required to use ENS name as contract address",p.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((t=>{}));const n={},s={};Object.keys(this.interface.functions).forEach((t=>{const e=this.interface.functions[t];if(s[t])Ee.warn(`Duplicate ABI entry for ${JSON.stringify(t)}`);else{s[t]=!0;{const r=e.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(t)}null==this[t]&&S(this,t,Oe(this,e,!0)),null==this.functions[t]&&S(this.functions,t,Oe(this,e,!1)),null==this.callStatic[t]&&S(this.callStatic,t,Ae(this,e,!0)),null==this.populateTransaction[t]&&S(this.populateTransaction,t,function(t,e){return function(...r){return Ne(t,e,r)}}(this,e)),null==this.estimateGas[t]&&S(this.estimateGas,t,function(t,e){const r=t.signer||t.provider;return function(...n){return ye(this,void 0,void 0,(function*(){r||Ee.throwError("estimate require a provider or signer",p.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const s=yield Ne(t,e,n);return yield r.estimateGas(s)}))}}(this,e))}})),Object.keys(n).forEach((t=>{const e=n[t];if(e.length>1)return;t=t.substring(1);const r=e[0];try{null==this[t]&&S(this,t,this[r])}catch(s){}null==this.functions[t]&&S(this.functions,t,this.functions[r]),null==this.callStatic[t]&&S(this.callStatic,t,this.callStatic[r]),null==this.populateTransaction[t]&&S(this.populateTransaction,t,this.populateTransaction[r]),null==this.estimateGas[t]&&S(this.estimateGas,t,this.estimateGas[r])}))}static getContractAddress(t){return rt(t)}static getInterface(t){return le.isInterface(t)?t:new le(t)}deployed(){return this._deployed()}_deployed(t){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,t).then((t=>("0x"===t&&Ee.throwError("contract not deployed",p.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(t){this.signer||Ee.throwError("sending a transactions require a signer",p.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const e=C(t||{});return["from","to"].forEach((function(t){null!=e[t]&&Ee.throwError("cannot override "+t,p.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(e)))}connect(t){"string"===typeof t&&(t=new de.b(t,this.provider));const e=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&S(e,"deployTransaction",this.deployTransaction),e}attach(t){return new this.constructor(t,this.interface,this.signer||this.provider)}static isIndexed(t){return ae.isIndexed(t)}_normalizeRunningEvent(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}_getRunningEvent(t){if("string"===typeof t){if("error"===t)return this._normalizeRunningEvent(new Se);if("event"===t)return this._normalizeRunningEvent(new Te("event",null));if("*"===t)return this._normalizeRunningEvent(new Pe(this.address,this.interface));const e=this.interface.getEvent(t);return this._normalizeRunningEvent(new xe(this.address,this.interface,e))}if(t.topics&&t.topics.length>0){try{const e=t.topics[0];if("string"!==typeof e)throw new Error("invalid topic");const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new xe(this.address,this.interface,r,t.topics))}catch(e){}const r={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new Te(Re(r),r))}return this._normalizeRunningEvent(new Pe(this.address,this.interface))}_checkRunningEvents(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];const e=this._wrappedEmits[t.tag];e&&t.filter&&(this.provider.off(t.filter,e),delete this._wrappedEmits[t.tag])}}_wrapEvent(t,e,r){const n=L(e);return n.removeListener=()=>{r&&(t.removeListener(r),this._checkRunningEvents(t))},n.getBlock=()=>this.provider.getBlock(e.blockHash),n.getTransaction=()=>this.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(e.transactionHash),t.prepareEvent(n),n}_addEventListener(t,e,r){if(this.provider||Ee.throwError("events require a provider or a signer with a provider",p.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(e,r),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){const r=r=>{let n=this._wrapEvent(t,r,e);if(null==n.decodeError)try{const e=t.getEmit(n);
1this.emit(t.filter,...e)}catch(s){n.decodeError=s.error}null!=t.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[t.tag]=r,null!=t.filter&&this.provider.on(t.filter,r)}}queryFilter(t,e,r){const s=this._getRunningEvent(t),i=C(s.filter);return"string"===typeof e&&(0,n.isHexString)(e,32)?(null!=r&&Ee.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=e):(i.fromBlock=null!=e?e:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((t=>t.map((t=>this._wrapEvent(s,t,null)))))}on(t,e){return this._addEventListener(this._getRunningEvent(t),e,!1),this}once(t,e){return this._addEventListener(this._getRunningEvent(t),e,!0),this}emit(t,...e){if(!this.provider)return!1;const r=this._getRunningEvent(t),n=r.run(e)>0;return this._checkRunningEvents(r),n}listenerCount(t){return this.provider?null==t?Object.keys(this._runningEvents).reduce(((t,e)=>t+this._runningEvents[e].listenerCount()),0):this._getRunningEvent(t).listenerCount():0}listeners(t){if(!this.provider)return[];if(null==t){const t=[];for(let e in this._runningEvents)this._runningEvents[e].listeners().forEach((e=>{t.push(e)}));return t}return this._getRunningEvent(t).listeners()}removeAllListeners(t){if(!this.provider)return this;if(null==t){for(const t in this._runningEvents){const e=this._runningEvents[t];e.removeAllListeners(),this._checkRunningEvents(e)}return this}const e=this._getRunningEvent(t);return e.removeAllListeners(),this._checkRunningEvents(e),this}off(t,e){if(!this.provider)return this;const r=this._getRunningEvent(t);return r.removeListener(e),this._checkRunningEvents(r),this}removeListener(t,e){return this.off(t,e)}}class Ie extends Ce{}class Ue{constructor(t,e,r){let s=null;s="string"===typeof e?e:(0,n.isBytes)(e)?(0,n.hexlify)(e):e&&"string"===typeof e.object?e.object:"!","0x"!==s.substring(0,2)&&(s="0x"+s),(!(0,n.isHexString)(s)||s.length%2)&&Ee.throwArgumentError("invalid bytecode","bytecode",e),r&&!de.E.isSigner(r)&&Ee.throwArgumentError("invalid signer","signer",r),S(this,"bytecode",s),S(this,"interface",x(new.target,"getInterface")(t)),S(this,"signer",r||null)}getDeployTransaction(...t){let e={};if(t.length===this.interface.deploy.inputs.length+1&&"object"===typeof t[t.length-1]){e=C(t.pop());for(const t in e)if(!ve[t])throw new Error("unknown transaction override "+t)}if(["data","from","to"].forEach((t=>{null!=e[t]&&Ee.throwError("cannot override "+t,p.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.value){w.from(e.value).isZero()||this.interface.deploy.payable||Ee.throwError("non-payable constructor cannot override value",p.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:e.value})}return Ee.checkArgumentCount(t.length,this.interface.deploy.inputs.length," in Contract constructor"),e.data=(0,n.hexlify)((0,n.concat)([this.bytecode,this.interface.encodeDeploy(t)])),e}deploy(...t){return ye(this,void 0,void 0,(function*(){let e={};t.length===this.interface.deploy.inputs.length+1&&(e=t.pop()),Ee.checkArgumentCount(t.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield we(this.signer,t,this.interface.deploy.inputs);r.push(e);const n=this.getDeployTransaction(...r),s=yield this.signer.sendTransaction(n),i=x(this.constructor,"getContractAddress")(s),o=x(this.constructor,"getContract")(i,this.interface,this.signer);return _e(o,s),S(o,"deployTransaction",s),o}))}attach(t){return this.constructor.getContract(t,this.interface,this.signer)}connect(t){return new this.constructor(this.interface,this.bytecode,t)}static fromSolidity(t,e){null==t&&Ee.throwError("missing compiler output",p.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"===typeof t&&(t=JSON.parse(t));const r=t.abi;let n=null;return t.bytecode?n=t.bytecode:t.evm&&t.evm.bytecode&&(n=t.evm.bytecode),new this(r,n,e)}static getInterface(t){return Ie.getInterface(t)}static getContractAddress(t){return rt(t)}static getContract(t,e,r){return new Ie(t,e,r)}}},92228:function(t,e,r){function n(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}r.d(e,{Z:function(){return n}})}}]);

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