1import{g as _v,a as vv}from"./vendor-DqE_nFma.js";import{r as Ev}from"./index-BV8s6ez1.js";import{r as jv}from"./events-DQ172AOg.js";function wv(e,r){for(var n=0;n<r.length;n++){const t=r[n];if(typeof t!="string"&&!Array.isArray(t)){for(const o in t)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(t,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Pv(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const Av=Pv(),Tv=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:Av},Symbol.toStringTag,{value:"Module"}));var Pd={},$n={},Ft={},rn={},Or={},zn={},Un={},dl;function Jp(){if(dl)return Un;dl=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.getSDKVersion=void 0;const e=()=>"9.1.0";return Un.getSDKVersion=e,Un}var Ln={},fl;function Sv(){if(fl)return Ln;fl=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.generateRequestId=void 0;const e=t=>t.toString(16).padStart(2,"0"),r=t=>{const o=new Uint8Array(t/2);return window.crypto.getRandomValues(o),Array.from(o,e).join("")},n=()=>typeof window<"u"?r(10):new Date().getTime().toString(36);return Ln.generateRequestId=n,Ln}var ll;function Yp(){if(ll)return zn;ll=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.MessageFormatter=void 0;const e=Jp(),r=Sv();class n{}return zn.MessageFormatter=n,n.makeRequest=(t,o)=>({id:(0,r.generateRequestId)(),method:t,params:o,env:{sdkVersion:(0,e.getSDKVersion)()}}),n.makeResponse=(t,o,s)=>({id:t,success:!0,version:s,data:o}),n.makeErrorResponse=(t,o,s)=>({id:t,success:!1,error:o,version:s}),zn}var Cr={},bl;function Vr(){if(bl)return Cr;bl=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.RestrictedMethods=Cr.Methods=void 0;var e;(function(n){n.sendTransactions="sendTransactions",n.rpcCall="rpcCall",n.getChainInfo="getChainInfo",n.getSafeInfo="getSafeInfo",n.getTxBySafeTxHash="getTxBySafeTxHash",n.getSafeBalances="getSafeBalances",n.signMessage="signMessage",n.signTypedMessage="signTypedMessage",n.getEnvironmentInfo="getEnvironmentInfo",n.getOffChainSignature="getOffChainSignature",n.requestAddressBook="requestAddressBook",n.wallet_getPermissions="wallet_getPermissions",n.wallet_requestPermissions="wallet_requestPermissions"})(e||(Cr.Methods=e={}));var r;return(function(n){n.requestAddressBook="requestAddressBook"})(r||(Cr.RestrictedMethods=r={})),Cr}var ml;function Iv(){return ml||(ml=1,(function(e){var r=Or&&Or.__createBinding||(Object.create?(function(s,i,a,c){c===void 0&&(c=a);var u=Object.getOwnPropertyDescriptor(i,a);(!u||("get"in u?!i.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(s,c,u)}):(function(s,i,a,c){c===void 0&&(c=a),s[c]=i[a]})),n=Or&&Or.__exportStar||function(s,i){for(var a in s)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&r(i,s,a)};Object.defineProperty(e,"__esModule",{value:!0});const t=Yp();class o{constructor(i=null,a=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:c,data:u,source:l})=>{const f=!u,m=!this.isServer&&l===window.parent,y=typeof u.version<"u"&&parseInt(u.version.split(".")[0]),h=typeof y=="number"&&y>=1;let b=!0;return Array.isArray(this.allowedOrigins)&&(b=this.allowedOrigins.find(v=>v.test(c))!==void 0),!f&&m&&h&&b},this.logIncomingMessage=c=>{console.info(`Safe Apps SDK v1: A message was received from origin ${c.origin}. `,c.data)},this.onParentMessage=c=>{this.isValidMessage(c)&&(this.debugMode&&this.logIncomingMessage(c),this.handleIncomingMessage(c.data))},this.handleIncomingMessage=c=>{const{id:u}=c,l=this.callbacks.get(u);l&&(l(c),this.callbacks.delete(u))},this.send=(c,u)=>{const l=t.MessageFormatter.makeRequest(c,u);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(l,"*"),new Promise((f,m)=>{this.callbacks.set(l.id,y=>
1{if(!y.success){m(new Error(y.error));return}f(y)})})},this.allowedOrigins=i,this.debugMode=a,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=o,n(Vr(),e)})(Or)),Or}var Dn={},xr={},Gn={},hl;function Rv(){if(hl)return Gn;hl=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.isObjectEIP712TypedData=void 0;const e=r=>typeof r=="object"&&r!=null&&"domain"in r&&"types"in r&&"message"in r;return Gn.isObjectEIP712TypedData=e,Gn}var Ad={},yl;function Bv(){return yl||(yl=1,Object.defineProperty(Ad,"__esModule",{value:!0})),Ad}var Td={},pl;function Ov(){return pl||(pl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var r=Ev();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return r.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return r.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return r.TransferDirection}})})(Td)),Td}var Sd={},gl;function Cv(){return gl||(gl=1,Object.defineProperty(Sd,"__esModule",{value:!0}),Vr()),Sd}var _l;function tf(){return _l||(_l=1,(function(e){var r=xr&&xr.__createBinding||(Object.create?(function(t,o,s,i){i===void 0&&(i=s);var a=Object.getOwnPropertyDescriptor(o,s);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(t,i,a)}):(function(t,o,s,i){i===void 0&&(i=s),t[i]=o[s]})),n=xr&&xr.__exportStar||function(t,o){for(var s in t)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(Rv(),e),n(Bv(),e),n(Ov(),e),n(Cv(),e)})(xr)),xr}var vl;function xv(){if(vl)return Dn;vl=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.TXs=void 0;const e=Vr(),r=tf();class n{constructor(o){this.communicator=o}async getBySafeTxHash(o){if(!o)throw new Error("Invalid safeTxHash");return(await this.communicator.send(e.Methods.getTxBySafeTxHash,{safeTxHash:o})).data}async signMessage(o){const s={message:o};return(await this.communicator.send(e.Methods.signMessage,s)).data}async signTypedMessage(o){if(!(0,r.isObjectEIP712TypedData)(o))throw new Error("Invalid typed data");return(await this.communicator.send(e.Methods.signTypedMessage,{typedData:o})).data}async send({txs:o,params:s}){if(!o||!o.length)throw new Error("No transactions were passed");const i={txs:o,params:s};return(await this.communicator.send(e.Methods.sendTransactions,i)).data}}return Dn.TXs=n,Dn}var Vn={},Wn={},El;function rf(){return El||(El=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.RPC_CALLS=void 0,Wn.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}),Wn}var jl;function qv(){if(jl)return Vn;jl=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.Eth=void 0;const e=rf(),r=Vr(),n={defaultBlockParam:(o="latest")=>o,returnFullTxObjectParam:(o=!1)=>o,blockNumberToHex:o=>Number.isInteger(o)?`0x${o.toString(16)}`:o};class t{constructor(s){this.communicator=s,this.call=this.buildRequest({call:e.RPC_CALLS.eth_call,formatters:[null,n.defaultBlockParam]}),this.getBalance=this.buildRequest({call:e.RPC_CALLS.eth_getBalance,formatters:[null,n.defaultBlockParam]}),this.getCode=this.buildRequest({call:e.RPC_CALLS.eth_getCode,formatters:[null,n.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:e.RPC_CALLS.eth_getStorageAt,formatters:[null,n.blockNumberToHex,n.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:e.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByHash,formatters:[null,n.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByNumber,formatters:[n.blockNumberToHex,n.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionCount,formatters:[null,n.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:e.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=i=>this.buildRequest({call:e.RPC_CALLS.eth_estimateGas})([i]),this.setSafeSettings=this.buildRequest({call:e.RPC_CALLS.safe_setSettings})}buildRequest(s){const{call:i,formatters:a}=s;return async c=>{a&&Array.isArray(c)&&a.forEach((f,m)=>{f&&(c[m]=f(c[m]))});const u={call:i,params:c||[]};return(await this.communicator.send(r.Methods.rpcCall,u)).data}}}return Vn.Eth=t,Vn}var Nt={},Id={},Rd={},Kn={},Zn={},wl;function Mv(){return wl||(wl=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.version=void 0,Zn.version="1.2.3"),Zn}var Pl;function An(){if(Pl)return Kn;Pl=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.BaseError=void 0;const e=Mv();
1class r extends Error{constructor(t,o={}){var c;const s=o.cause instanceof r?o.cause.details:(c=o.cause)!=null&&c.message?o.cause.message:o.details,i=o.cause instanceof r&&o.cause.docsPath||o.docsPath,a=[t||"An error occurred.","",...o.metaMessages?[...o.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${e.version}`].join(` 2`);super(a),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),o.cause&&(this.cause=o.cause),this.details=s,this.docsPath=i,this.metaMessages=o.metaMessages,this.shortMessage=t}}return Kn.BaseError=r,Kn}var pi={},Al;function kv(){if(Al)return pi;Al=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.narrow=e;function e(r){return r}return pi}var gi={},_i={},vi={},Ei={},Ot={},Tl;function xu(){if(Tl)return Ot;Tl=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.isTupleRegex=Ot.integerRegex=Ot.bytesRegex=void 0,Ot.execTyped=e;function e(r,n){const t=r.exec(n);return t==null?void 0:t.groups}return Ot.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ot.integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Ot.isTupleRegex=/^\(.+?\).*?$/,Ot}var Sl;function Xp(){if(Sl)return Ei;Sl=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.formatAbiParameter=n;const e=xu(),r=/^tuple(?<array>(\[(\d*)\])*)$/;function n(t){let o=t.type;if(r.test(t.type)&&"components"in t){o="(";const s=t.components.length;for(let a=0;a<s;a++){const c=t.components[a];o+=n(c),a<s-1&&(o+=", ")}const i=(0,e.execTyped)(r,t.type);return o+=`)${(i==null?void 0:i.array)||""}`,n({...t,type:o})}return"indexed"in t&&t.indexed&&(o=`${o}
2 indexed`),t.name?`${o} ${t.name}`:o}return Ei}var Il;function Qp(){if(Il)return vi;Il=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.formatAbiParameters=r;const e=Xp();function r(n){let t="";const o=n.length;for(let s=0;s<o;s++){const i=n[s];t+=(0,e.formatAbiParameter)(i),s!==o-1&&(t+=", ")}return t}return vi}var Rl;function eg(){if(Rl)return _i;Rl=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.formatAbiItem=r;const e=Qp();function r(n){var t;return n.type==="function"?`function ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability&&n.stateMutability!=="nonpayable"?` ${n.stateMutability}`:""}${(t=n.outputs)!=null&&t.length?` returns (${(0,e.formatAbiParameters)(n.outputs)})`:""}`:n.type==="event"?`event ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="error"?`error ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability==="payable"?" payable":""}`:n.type==="fallback"?`fallback() external${n.stateMutability==="payable"?" payable":""}`:"receive() external payable"}return _i}var Bl;function Hv(){if(Bl)return gi;Bl=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.formatAbi=r;const e=eg();function r(n){const t=[],o=n.length;for(let s=0;s<o;s++){const i=n[s],a=(0,e.formatAbiItem)(i);t.push(a)}return t}return gi}var ji={},Re={},Ol;function Tn(){if(Ol)return Re;Ol=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.functionModifiers=Re.eventModifiers=Re.modifiers=void 0,Re.isErrorSignature=n,Re.execErrorSignature=t,Re.isEventSignature=s,Re.execEventSignature=i,Re.isFunctionSignature=c,Re.execFunctionSignature=u,Re.isStructSignature=f,Re.execStructSignature=m,Re.isConstructorSignature=h,Re.execConstructorSignature=b,Re.isFallbackSignature=g,Re.execFallbackSignature=_,Re.isReceiveSignature=d;const e=xu(),r=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(w){return r.test(w)}function t(w){return(0,e.execTyped)(r,w)}const o=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(w){return o.test(w)}function i(w){return(0,e.execTyped)(o,w)}const a=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function c(w){return a.test(w)}function u(w){return(0,e.execTyped)(a,w)}const l=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(w){return l.test(w)}function m(w){return(0,e.execTyped)(l,w)}const y=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function h(w){return y.test(w)}function b(w){return(0,e.execTyped)(y,w)}const v=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function g(w){return v.test(w)}function _(w){return(0,e.execTyped)(v,w)}const P=/^receive\(\) external payable$/;function d(w){return P.test(w)}return Re.modifiers=new Set(["memory","indexed","storage","calldata"]),Re.eventModifiers=new Set(["indexed"]),Re.functionModifiers=new Set(["calldata","memory","storage"]),Re}var wi={},$t={},Cl;function qu(){if(Cl)return $t;Cl=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.UnknownSolidityTypeError=$t.UnknownTypeError=$t.InvalidAbiItemError=void 0;const e=An();class r extends e.BaseError{constructor({signature:s}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(s,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}$t.InvalidAbiItemError=r;class n extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}$t.UnknownTypeError=n;class t extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return $t.UnknownSolidityTypeError=t,$t}var He={},xl;function Uo(){if(xl)return He;
2xl=1,Object.defineProperty(He,"__esModule",{value:!0}),He.InvalidAbiTypeParameterError=He.InvalidFunctionModifierError=He.InvalidModifierError=He.SolidityProtectedKeywordError=He.InvalidParameterError=He.InvalidAbiParametersError=He.InvalidAbiParameterError=void 0;const e=An();class r extends e.BaseError{constructor({param:u}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(u,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}He.InvalidAbiParameterError=r;class n extends e.BaseError{constructor({params:u}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(u,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}He.InvalidAbiParametersError=n;class t extends e.BaseError{constructor({param:u}){super("Invalid ABI parameter.",{details:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}He.InvalidParameterError=t;class o extends e.BaseError{constructor({param:u,name:l}){super("Invalid ABI parameter.",{details:u,metaMessages:[`"${l}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}He.SolidityProtectedKeywordError=o;class s extends e.BaseError{constructor({param:u,type:l,modifier:f}){super("Invalid ABI parameter.",{details:u,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}He.InvalidModifierError=s;class i extends e.BaseError{constructor({param:u,type:l,modifier:f}){super("Invalid ABI parameter.",{details:u,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${f}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}He.InvalidFunctionModifierError=i;class a extends e.BaseError{constructor({abiParameter:u}){super("Invalid ABI parameter.",{details:JSON.stringify(u,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return He.InvalidAbiTypeParameterError=a,He}var zt={},ql;function nf(){if(ql)return zt;ql=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.InvalidStructSignatureError=zt.UnknownSignatureError=zt.InvalidSignatureError=void 0;const e=An();class r extends e.BaseError{constructor({signature:s,type:i}){super(`Invalid ${i} signature.`,{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}zt.InvalidSignatureError=r;class n extends e.BaseError{constructor({signature:s}){super("Unknown signature.",{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}zt.UnknownSignatureError=n;class t extends e.BaseError{constructor({signature:s}){super("Invalid struct signature.",{details:s,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return zt.InvalidStructSignatureError=t,zt}var Jn={},Ml;function tg(){if(Ml)return Jn;Ml=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.CircularReferenceError=void 0;const e=An();class r extends e.BaseError{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return Jn.CircularReferenceError=r,Jn}var Qe={},Yn={},kl;function rg(){if(kl)return Yn;kl=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.InvalidParenthesisError=void 0;const e=An();class r extends e.BaseError{constructor({current:t,depth:o}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${o>0?"opening":"closing"} parentheses.`],details:`Depth "${o}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return Yn.InvalidParenthesisError=r,Yn}var nn={},Hl;function Fv(){if(Hl)return nn;Hl=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.parameterCache=void 0,nn.getParameterCacheKey=e;function e(r,n,t){let o="";if(t)for(const s of Object.entries(t)){if(!s)continue;let i="";for(const a of s[1])i+=`[${a.type}${a.name?`:${a.name}`:""}]`;o+=`(${s[0]}{${i}})`}return n?`${n}:${r}${o}`:`${r}${o}`}return nn.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),nn}var Fl;function Pn(){if(Fl)return Qe;
2Fl=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.parseSignature=a,Qe.parseFunctionSignature=c,Qe.parseEventSignature=u,Qe.parseErrorSignature=l,Qe.parseConstructorSignature=f,Qe.parseFallbackSignature=m,Qe.parseAbiParameter=v,Qe.splitParameters=g,Qe.isSolidityType=_,Qe.isSolidityKeyword=d,Qe.isValidDataLocation=w;const e=xu(),r=qu(),n=Uo(),t=nf(),o=rg(),s=Fv(),i=Tn();function a(E,p={}){if((0,i.isFunctionSignature)(E))return c(E,p);if((0,i.isEventSignature)(E))return u(E,p);if((0,i.isErrorSignature)(E))return l(E,p);if((0,i.isConstructorSignature)(E))return f(E,p);if((0,i.isFallbackSignature)(E))return m(E);if((0,i.isReceiveSignature)(E))return{type:"receive",stateMutability:"payable"};throw new t.UnknownSignatureError({signature:E})}function c(E,p={}){const S=(0,i.execFunctionSignature)(E);if(!S)throw new t.InvalidSignatureError({signature:E,type:"function"});const A=g(S.parameters),T=[],C=A.length;for(let I=0;I<C;I++)T.push(v(A[I],{modifiers:i.functionModifiers,structs:p,type:"function"}));const R=[];if(S.returns){const I=g(S.returns),x=I.length;for(let F=0;F<x;F++)R.push(v(I[F],{modifiers:i.functionModifiers,structs:p,type:"function"}))}return{name:S.name,type:"function",stateMutability:S.stateMutability??"nonpayable",inputs:T,outputs:R}}function u(E,p={}){const S=(0,i.execEventSignature)(E);if(!S)throw new t.InvalidSignatureError({signature:E,type:"event"});const A=g(S.parameters),T=[],C=A.length;for(let R=0;R<C;R++)T.push(v(A[R],{modifiers:i.eventModifiers,structs:p,type:"event"}));return{name:S.name,type:"event",inputs:T}}function l(E,p={}){const S=(0,i.execErrorSignature)(E);if(!S)throw new t.InvalidSignatureError({signature:E,type:"error"});const A=g(S.parameters),T=[],C=A.length;for(let R=0;R<C;R++)T.push(v(A[R],{structs:p,type:"error"}));return{name:S.name,type:"error",inputs:T}}function f(E,p={}){const S=(0,i.execConstructorSignature)(E);if(!S)throw new t.InvalidSignatureError({signature:E,type:"constructor"});const A=g(S.parameters),T=[],C=A.length;for(let R=0;R<C;R++)T.push(v(A[R],{structs:p,type:"constructor"}));return{type:"constructor",stateMutability:S.stateMutability??"nonpayable",inputs:T}}function m(E){const p=(0,i.execFallbackSignature)(E);if(!p)throw new t.InvalidSignatureError({signature:E,type:"fallback"});return{type:"fallback",stateMutability:p.stateMutability??"nonpayable"}}const y=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,b=/^u?int$/;function v(E,p){var j,k;const S=(0,s.getParameterCacheKey)(E,p==null?void 0:p.type,p==null?void 0:p.structs);if(s.parameterCache.has(S))return s.parameterCache.get(S);const A=e.isTupleRegex.test(E),T=(0,e.execTyped)(A?h:y,E);if(!T)throw new n.InvalidParameterError({param:E});if(T.name&&d(T.name))throw new n.SolidityProtectedKeywordError({param:E,name:T.name});const C=T.name?{name:T.name}:{},R=T.modifier==="indexed"?{indexed:!0}:{},I=(p==null?void 0:p.structs)??{};let x,F={};if(A){x="tuple";const B=g(T.type),O=[],q=B.length;for(let M=0;M<q;M++)O.push(v(B[M],{structs:I}));F={components:O}}else if(T.type in I)x="tuple",F={components:I[T.type]};else if(b.test(T.type))x=`${T.type}256`;else if(T.type==="address payable")x="address";else if(x=T.type,(p==null?void 0:p.type)!=="struct"&&!_(x))throw new r.UnknownSolidityTypeError({type:x});if(T.modifier){if(!((k=(j=p==null?void 0:p.modifiers)==null?void 0:j.has)!=null&&k.call(j,T.modifier)))throw new n.InvalidModifierError({param:E,type:p==null?void 0:p.type,modifier:T.modifier});if(i.functionModifiers.has(T.modifier)&&!w(x,!!T.array))throw new n.InvalidFunctionModifierError({param:E,type:p==null?void 0:p.type,modifier:T.modifier})}const H={type:`${x}${T.array??""}`,...C,...R,...F};return s.parameterCache.set(S,H),H}function g(E,p=[],S="",A=0){const T=E.trim().length;for(let C=0;C<T;C++){const R=E[C],I=E.slice(C+1);switch(R){case",":return A===0?g(I,[...p,S.trim()]):g(I,p,`${S}${R}`,A);case"(":return g(I,p,`${S}${R}`,A+1);case")":return g(I,p,`${S}${R}`,A-1);default:return g(I,p,`${S}${R}`,A)}}if(S==="")return p;if(A!==0)throw new o.InvalidParenthesisError({current:S,depth:A});return p.push(S.trim()),p}function _(E){return E==="address"||E==="bool"||E==="function"||E==="str
2ing"||e.bytesRegex.test(E)||e.integerRegex.test(E)}const P=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function d(E){return E==="address"||E==="bool"||E==="function"||E==="string"||E==="tuple"||e.bytesRegex.test(E)||e.integerRegex.test(E)||P.test(E)}function w(E,p){return p||E==="bytes"||E==="string"||E==="tuple"}return Qe}var Nl;function Mu(){if(Nl)return wi;Nl=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.parseStructs=a;const e=xu(),r=qu(),n=Uo(),t=nf(),o=tg(),s=Tn(),i=Pn();function a(l){const f={},m=l.length;for(let v=0;v<m;v++){const g=l[v];if(!(0,s.isStructSignature)(g))continue;const _=(0,s.execStructSignature)(g);if(!_)throw new t.InvalidSignatureError({signature:g,type:"struct"});const P=_.properties.split(";"),d=[],w=P.length;for(let E=0;E<w;E++){const S=P[E].trim();if(!S)continue;const A=(0,i.parseAbiParameter)(S,{type:"struct"});d.push(A)}if(!d.length)throw new t.InvalidStructSignatureError({signature:g});f[_.name]=d}const y={},h=Object.entries(f),b=h.length;for(let v=0;v<b;v++){const[g,_]=h[v];y[g]=u(_,f)}return y}const c=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function u(l=[],f={},m=new Set){const y=[],h=l.length;for(let b=0;b<h;b++){const v=l[b];if(e.isTupleRegex.test(v.type))y.push(v);else{const _=(0,e.execTyped)(c,v.type);if(!(_!=null&&_.type))throw new n.InvalidAbiTypeParameterError({abiParameter:v});const{array:P,type:d}=_;if(d in f){if(m.has(d))throw new o.CircularReferenceError({type:d});y.push({...v,type:`tuple${P??""}`,components:u(f[d],f,new Set([...m,d]))})}else if((0,i.isSolidityType)(d))y.push(v);else throw new r.UnknownTypeError({type:d})}}return y}return wi}var $l;function Nv(){if($l)return ji;$l=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.parseAbi=t;const e=Tn(),r=Mu(),n=Pn();function t(o){const s=(0,r.parseStructs)(o),i=[],a=o.length;for(let c=0;c<a;c++){const u=o[c];(0,e.isStructSignature)(u)||i.push((0,n.parseSignature)(u,s))}return i}return ji}var Pi={},zl;function $v(){if(zl)return Pi;zl=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.parseAbiItem=o;const e=qu(),r=Tn(),n=Mu(),t=Pn();function o(s){let i;if(typeof s=="string")i=(0,t.parseSignature)(s);else{const a=(0,n.parseStructs)(s),c=s.length;for(let u=0;u<c;u++){const l=s[u];if(!(0,r.isStructSignature)(l)){i=(0,t.parseSignature)(l,a);break}}}if(!i)throw new e.InvalidAbiItemError({signature:s});return i}return Pi}var Ai={},Ul;function zv(){if(Ul)return Ai;Ul=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.parseAbiParameter=o;const e=Uo(),r=Tn(),n=Mu(),t=Pn();function o(s){let i;if(typeof s=="string")i=(0,t.parseAbiParameter)(s,{modifiers:r.modifiers});else{const a=(0,n.parseStructs)(s),c=s.length;for(let u=0;u<c;u++){const l=s[u];if(!(0,r.isStructSignature)(l)){i=(0,t.parseAbiParameter)(l,{modifiers:r.modifiers,structs:a});break}}}if(!i)throw new e.InvalidAbiParameterError({param:s});return i}return Ai}var Ti={},Ll;function Uv(){if(Ll)return Ti;Ll=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.parseAbiParameters=s;const e=Uo(),r=Tn(),n=Mu(),t=Pn(),o=Pn();function s(i){const a=[];if(typeof i=="string"){const c=(0,t.splitParameters)(i),u=c.length;for(let l=0;l<u;l++)a.push((0,o.parseAbiParameter)(c[l],{modifiers:r.modifiers}))}else{const c=(0,n.parseStructs)(i),u=i.length;for(let l=0;l<u;l++){const f=i[l];if((0,r.isStructSignature)(f))continue;const m=(0,t.splitParameters)(f),y=m.length;for(let h=0;h<y;h++)a.push((0,o.parseAbiParameter)(m[h],{modifiers:r.modifiers,structs:c}))}}if(a.length===0)throw new e.InvalidAbiParametersError({params:i});return a}return Ti}var Dl;function br(){return Dl||(Dl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var r=An();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return r.BaseError}});var n=kv();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return n.narrow}});var t=Hv();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return t.formatAbi}});var o=eg();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return o.formatAbiItem}});var s=Xp();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var i=Qp();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return i.formatAbiParameters}});var a=Nv();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return a.parseAbi}});var c=$v();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return c.parseAbiItem}});var u=zv();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return u.parseAbiParameter}});var l=Uv();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return l.parseAbiParameters}});var f=qu();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return f.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return f.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return f.UnknownSolidityTypeError}});var m=Uo();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return m.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return m.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return m.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return m.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return m.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return m.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return m.InvalidAbiParameterError}});var y=nf();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return y.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return y.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return y.UnknownSignatureError}});var h=rg();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return h.InvalidParenthesisError}});var b=tg();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return b.CircularReferenceError}})})(Rd)),Rd}var on={},Si={},Gl;function me(){if(Gl)return Si;Gl=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.getAction=e;function e(r,n,t){const o=r[n.name];if(typeof o=="function")return o;const s=r[t];return typeof s=="function"?s:i=>n(r,i)}return Si}var Ii={},Ri={},se={},Xn={},Vl;function Qt(){if(Vl)return Xn;Vl=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.formatAbiItem=r,Xn.formatAbiParams=n;const e=Se();function r(o,{includeName:s=!1}={}){if(o.type!=="function"&&o.type!=="event"&&o.type!=="error")throw new e.InvalidDefinitionTypeError(o.type);return`${o.name}(${n(o.inputs,{includeName:s})})`}function n(o,{includeName:s=!1}={}){return o?o.map(i=>t(i,{includeName:s})).join(s?", ":","):""}function t(o,{includeName:s}){return o.type.startsWith("tuple")?`(${n(o.components,{includeName:s})})${o.type.slice(5)}`:o.type+(s&&o.name?` ${o.name}`:"")}return Xn}var Bi={},Oi={},Wl;function Ze(){if(Wl)return Oi;Wl=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.isHex=e;
2function e(r,{strict:n=!0}={}){return!r||typeof r!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}return Oi}var Kl;function Ue(){if(Kl)return Bi;Kl=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.size=r;const e=Ze();function r(n){return(0,e.isHex)(n,{strict:!1})?Math.ceil((n.length-2)/2):n.length}return Bi}var an={},Qn={},Zl;function Lv(){return Zl||(Zl=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.version=void 0,Qn.version="2.50.4"),Qn}var Jl;function de(){if(Jl)return an;Jl=1,Object.defineProperty(an,"__esModule",{value:!0}),an.BaseError=void 0,an.setErrorConfig=n;const e=Lv();let r={getDocsUrl:({docsBaseUrl:s,docsPath:i="",docsSlug:a})=>i?`${s??"https://viem.sh"}${i}${a?`#${a}`:""}`:void 0,version:`viem@${e.version}`};function n(s){r=s}class t extends Error{constructor(i,a={}){var m;const c=(()=>{var y;return a.cause instanceof t?a.cause.details:(y=a.cause)!=null&&y.message?a.cause.message:a.details})(),u=a.cause instanceof t&&a.cause.docsPath||a.docsPath,l=(m=r.getDocsUrl)==null?void 0:m.call(r,{...a,docsPath:u}),f=[i||"An error occurred.","",...a.metaMessages?[...a.metaMessages,""]:[],...l?[`Docs: ${l}`]:[],...c?[`Details: ${c}`]:[],...r.version?[`Version: ${r.version}`]:[]].join(` 3`);super(f,a.cause?{cause:a.cause}:void 0),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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=c,this.docsPath=u,this.metaMessages=a.metaMessages,this.name=a.name??this.name,this.shortMessage=i,this.version=e.version}walk(i){return o(this,i)}}an.BaseError=t;function o(s,i){return i!=null&&i(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?o(s.cause,i):i?null:s}return an}var Yl;function Se(){if(Yl)return se;Yl=1,Object.defineProperty(se,"__esModule",{value:!0}),se.UnsupportedPackedAbiType=se.InvalidDefinitionTypeError=se.InvalidArrayError=se.InvalidAbiDecodingTypeError=se.InvalidAbiEncodingTypeError=se.DecodeLogTopicsMismatch=se.DecodeLogDataMismatch=se.BytesSizeMismatchError=se.AbiItemAmbiguityError=se.AbiFunctionSignatureNotFoundError=se.AbiFunctionOutputsNotFoundError=se.AbiFunctionNotFoundError=se.AbiEventNotFoundError=se.AbiEventSignatureNotFoundError=se.AbiEventSignatureEmptyTopicsError=se.AbiErrorSignatureNotFoundError=se.AbiErrorNotFoundError=se.AbiErrorInputsNotFoundError=se.AbiEncodingLengthMismatchError=se.AbiEncodingBytesSizeMismatchError=se.AbiEncodingArrayLengthMismatchError=se.AbiDecodingZeroDataError=se.AbiDecodingDataSizeTooSmallError=se.AbiDecodingDataSizeInvalidError=se.AbiConstructorParamsNotFoundError=se.AbiConstructorNotFoundError=void 0;const e=Qt(),r=Ue(),n=de();class t extends n.BaseError{constructor({docsPath:x}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` 4`),{docsPath:x,name:"AbiConstructorNotFoundError"})}}se.AbiConstructorNotFoundError=t;class o extends n.BaseError{constructor({docsPath:x}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` 5`),{docsPath:x,name:"AbiConstructorParamsNotFoundError"})}}se.AbiConstructorParamsNotFoundError=o;class s extends n.BaseError{constructor({data:x,size:F}){super([`Data size of ${F}
5 bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(` 6`),{metaMessages:[`Data: ${x} (${F} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}se.AbiDecodingDataSizeInvalidError=s;class i extends n.BaseError{constructor({data:x,params:F,size:H}){super([`Data size of ${H} bytes is too small for given parameters.`].join(` 7`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(F,{includeName:!0})})`,`Data: ${x} (${H} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=x,this.params=F,this.size=H}}se.AbiDecodingDataSizeTooSmallError=i;class a extends n.BaseError{constructor({cause:x}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:x})}}se.AbiDecodingZeroDataError=a;class c extends n.BaseError{constructor({expectedLength:x,givenLength:F,type:H}){super([`ABI encoding array length mismatch for type ${H}.`,`Expected length: ${x}`,`Given length: ${F}`].join(` 8`),{name:"AbiEncodingArrayLengthMismatchError"})}}se.AbiEncodingArrayLengthMismatchError=c;class u extends n.BaseError{constructor({expectedSize:x,value:F}){super(`Size of bytes "${F}" (bytes${(0,r.size)(F)}) does not match expected size (bytes${x}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}se.AbiEncodingBytesSizeMismatchError=u;class l extends n.BaseError{constructor({expectedLength:x,givenLength:F}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${x}`,`Given length (values): ${F}`].join(` 9`),{name:"AbiEncodingLengthMismatchError"})}}se.AbiEncodingLengthMismatchError=l;class f extends n.BaseError{constructor(x,{docsPath:F}){super([`Arguments (\`args\`) were provided to "${x}", but "${x}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(` 10`),{docsPath:F,name:"AbiErrorInputsNotFoundError"})}}se.AbiErrorInputsNotFoundError=f;class m extends n.BaseError{constructor(x,{docsPath:F}={}){super([`Error ${x?`"${x}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(` 11`),{docsPath:F,name:"AbiErrorNotFoundError"})}}se.AbiErrorNotFoundError=m;class y extends n.BaseError{constructor(x,{docsPath:F,cause:H}){super([`Encoded error signature "${x}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${x}.`].join(` 12`),{docsPath:F,name:"AbiErrorSignatureNotFoundError",cause:H}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=x}}se.AbiErrorSignatureNotFoundError=y;class h extends n.BaseError{constructor({docsPath:x}){super("Cannot extract event signature from empty topics.",{docsPath:x,name:"AbiEventSignatureEmptyTopicsError"})}}se.AbiEventSignatureEmptyTopicsError=h;class b extends n.BaseError{constructor(x,{docsPath:F}){super([`Encoded event signature "${x}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${x}.`].join(` 13`),{docsPath:F,name:"AbiEventSignatureNotFoundError"})}}se.AbiEventSignatureNotFoundError=b;class v extends n.BaseError{constructor(x,{docsPath:F}={}){super([`Event ${x?`"${x}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` 14`),{docsPath:F,name:"AbiEventNotFoundError"})}}se.AbiEventNotFoundError=v;class g extends n.BaseError{constructor(x,{docsPath:F}={}){super([`Function ${x?`"${x}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` 15`),{docsPath:F,name:"AbiFunctionNotFoundError"})}}se.AbiFunctionNotFoundError=g;class _ extends n.BaseError{constructor(x,{docsPath:F}){super([`Function "${x}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` 16`),{docsPath:F,name:"AbiFunctionOutputsNotFoundError"})}}se.AbiFunctionOutputsNotFoundError=_;class P extends n.BaseError{constructor(x,{docsPath:F}){super([`Encoded function signature "${x}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${x}.`].join(` 17`),{docsPath:F,name:"AbiFunctionSignatureNotFoundError"})}}se.AbiFunctionSignatureNotFoundError=P;class d extends n.BaseError{constructor(x,F){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${x.type}\` in \`${(0,e.formatAbiItem)(x.abiItem)}\`, and`,`\`${F.type}\` in \`${(0,e.formatAbiItem)(F.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}se.AbiItemAmbiguityError=d;class w extends n.BaseError{constructor({expectedSize:x,givenSize:F}){super(`Expected bytes${x}, got bytes${F}.`,{name:"BytesSizeMismatchError"})}}se.BytesSizeMismatchError=w;class E extends n.BaseError{constructor({abiItem:x,data:F,params:H,size:j}){super([`Data size of ${j} bytes is too small for non-indexed event parameters.`].join(` 18`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(H,{includeName:!0})})`,`Data: ${F} (${j} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=x,this.data=F,this.params=H,this.size=j}}se.DecodeLogDataMismatch=E;class p extends n.BaseError{constructor({abiItem:x,param:F}){super([`Expected a topic for indexed event parameter${F.name?` "${F.name}"`:""} on event "${(0,e.formatAbiItem)(x,{includeName:!0})}".`].join(` 19`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=x}}se.DecodeLogTopicsMismatch=p;class S extends n.BaseError{constructor(x,{docsPath:F}){super([`Type "${x}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` 20`),{docsPath:F,name:"InvalidAbiEncodingType"})}}se.InvalidAbiEncodingTypeError=S;class A extends n.BaseError{constructor(x,{docsPath:F}){super([`Type "${x}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` 21`),{docsPath:F,name:"InvalidAbiDecodingType"})}}se.InvalidAbiDecodingTypeError=A;
21class T extends n.BaseError{constructor(x){super([`Value "${x}" is not a valid array.`].join(` 22`),{name:"InvalidArrayError"})}}se.InvalidArrayError=T;class C extends n.BaseError{constructor(x){super([`"${x}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` 23`),{name:"InvalidDefinitionTypeError"})}}se.InvalidDefinitionTypeError=C;class R extends n.BaseError{constructor(x){super(`Type "${x}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}return se.UnsupportedPackedAbiType=R,se}var eo={},Xl;function ng(){if(Xl)return eo;Xl=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.FilterTypeNotSupportedError=void 0;const e=de();class r extends e.BaseError{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}return eo.FilterTypeNotSupportedError=r,eo}var ir={},sn={},Ut={},Ql;function ku(){if(Ql)return Ut;Ql=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.InvalidBytesLengthError=Ut.SizeExceedsPaddingSizeError=Ut.SliceOffsetOutOfBoundsError=void 0;const e=de();class r extends e.BaseError{constructor({offset:s,position:i,size:a}){super(`Slice ${i==="start"?"starting":"ending"} at offset "${s}" is out-of-bounds (size: ${a}).`,{name:"SliceOffsetOutOfBoundsError"})}}Ut.SliceOffsetOutOfBoundsError=r;class n extends e.BaseError{constructor({size:s,targetSize:i,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} size (${s}) exceeds padding size (${i}).`,{name:"SizeExceedsPaddingSizeError"})}}Ut.SizeExceedsPaddingSizeError=n;class t extends e.BaseError{constructor({size:s,targetSize:i,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} is expected to be ${i} ${a} long, but is ${s} ${a} long.`,{name:"InvalidBytesLengthError"})}}return Ut.InvalidBytesLengthError=t,Ut}var e0;function mr(){if(e0)return sn;e0=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.pad=r,sn.padHex=n,sn.padBytes=t;const e=ku();function r(o,{dir:s,size:i=32}={}){return typeof o=="string"?n(o,{dir:s,size:i}):t(o,{dir:s,size:i})}function n(o,{dir:s,size:i=32}={}){if(i===null)return o;const a=o.replace("0x","");if(a.length>i*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(a.length/2),targetSize:i,type:"hex"});return`0x${a[s==="right"?"padEnd":"padStart"](i*2,"0")}`}function t(o,{dir:s,size:i=32}={}){if(i===null)return o;if(o.length>i)throw new e.SizeExceedsPaddingSizeError({size:o.length,targetSize:i,type:"bytes"});const a=new Uint8Array(i);for(let c=0;c<i;c++){const u=s==="right";a[u?c:i-c-1]=o[u?c:o.length-c-1]}return a}return sn}var Lt={},at={},t0;function Sn(){if(t0)return at;
23t0=1,Object.defineProperty(at,"__esModule",{value:!0}),at.SizeOverflowError=at.InvalidHexValueError=at.InvalidHexBooleanError=at.InvalidBytesBooleanError=at.IntegerOutOfRangeError=void 0;const e=de();class r extends e.BaseError{constructor({max:a,min:c,signed:u,size:l,value:f}){super(`Number "${f}" is not in safe ${l?`${l*8}-bit ${u?"signed":"unsigned"} `:""}integer range ${a?`(${c} to ${a})`:`(above ${c})`}`,{name:"IntegerOutOfRangeError"})}}at.IntegerOutOfRangeError=r;class n extends e.BaseError{constructor(a){super(`Bytes value "${a}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}at.InvalidBytesBooleanError=n;class t extends e.BaseError{constructor(a){super(`Hex value "${a}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}at.InvalidHexBooleanError=t;class o extends e.BaseError{constructor(a){super(`Hex value "${a}" is an odd length (${a.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}at.InvalidHexValueError=o;class s extends e.BaseError{constructor({givenSize:a,maxSize:c}){super(`Size cannot exceed ${c} bytes. Given size: ${a} bytes.`,{name:"SizeOverflowError"})}}return at.SizeOverflowError=s,at}var Ci={},r0;function er(){if(r0)return Ci;r0=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.trim=e;function e(r,{dir:n="left"}={}){let t=typeof r=="string"?r.replace("0x",""):r,o=0;for(let s=0;s<t.length-1&&t[n==="left"?s:t.length-s-1].toString()==="0";s++)o++;return t=n==="left"?t.slice(o):t.slice(0,t.length-o),typeof r=="string"?(t.length===1&&n==="right"&&(t=`${t}0`),`0x${t.length%2===1?`0${t}`:t}`):t}return Ci}var n0;function Be(){if(n0)return Lt;n0=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.assertSize=o,Lt.fromHex=s,Lt.hexToBigInt=i,Lt.hexToBool=a,Lt.hexToNumber=c,Lt.hexToString=u;const e=Sn(),r=Ue(),n=er(),t=Ee();function o(l,{size:f}){if((0,r.size)(l)>f)throw new e.SizeOverflowError({givenSize:(0,r.size)(l),maxSize:f})}function s(l,f){const m=typeof f=="string"?{to:f}:f,y=m.to;return y==="number"?c(l,m):y==="bigint"?i(l,m):y==="string"?u(l,m):y==="boolean"?a(l,m):(0,t.hexToBytes)(l,m)}function i(l,f={}){const{signed:m}=f;f.size&&o(l,{size:f.size});const y=BigInt(l);if(!m)return y;const h=(l.length-2)/2,b=(1n<<BigInt(h)*8n-1n)-1n;return y<=b?y:y-BigInt(`0x${"f".padStart(h*2,"f")}`)-1n}function a(l,f={}){let m=l;if(f.size&&(o(m,{size:f.size}),m=(0,n.trim)(m)),(0,n.trim)(m)==="0x00")return!1;if((0,n.trim)(m)==="0x01")return!0;throw new e.InvalidHexBooleanError(m)}function c(l,f={}){const m=i(l,f),y=Number(m);if(!Number.isSafeInteger(y))throw new e.IntegerOutOfRangeError({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:f.signed,size:f.size,value:`${m}n`});return y}function u(l,f={}){let m=(0,t.hexToBytes)(l);return f.size&&(o(m,{size:f.size}),m=(0,n.trim)(m,{dir:"right"})),new TextDecoder().decode(m)}return Lt}var ar={},o0;function oe(){if(o0)return ar;o0=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.toHex=o,ar.boolToHex=s,ar.bytesToHex=i,ar.numberToHex=a,ar.stringToHex=u;const e=Sn(),r=mr(),n=Be(),t=Array.from({length:256},(l,f)=>f.toString(16).padStart(2,"0"));function o(l,f={}){return typeof l=="number"||typeof l=="bigint"?a(l,f):typeof l=="string"?u(l,f):typeof l=="boolean"?s(l,f):i(l,f)}function s(l,f={}){const m=`0x${Number(l)}`;return typeof f.size=="number"?((0,n.assertSize)(m,{size:f.size}),(0,r.pad)(m,{size:f.size})):m}function i(l,f={}){let m="";for(let h=0;h<l.length;h++)m+=t[l[h]];const y=`0x${m}`;return typeof f.size=="number"?((0,n.assertSize)(y,{size:f.size}),(0,r.pad)(y,{dir:"right",size:f.size})):y}function a(l,f={}){const{signed:m,size:y}=f,h=BigInt(l);let b;y?m?b=(1n<<BigInt(y)*8n-1n)-1n:b=2n**(BigInt(y)*8n)-1n:typeof l=="number"&&(b=BigInt(Number.MAX_SAFE_INTEGER));const v=typeof b=="bigint"&&m?-b-1n:0;if(b&&h>b||h<v){const _=typeof l=="bigint"?"n":"";throw new e.IntegerOutOfRangeError({max:b?`${b}${_}`:void 0,min:`${v}${_}`,signed:m,size:y,value:`${l}${_}`})}const g=`0x${(m&&h<0?(1n<<BigInt(y*8))+BigInt(h):h).toString(16)}`;return y?(0,r.pad)(g,{size:y}):g}const c=new TextEncoder;function u(l,f={}){const m=c.encode(l);return i(m,f)}return ar}var i0;function Ee(){if(i0)return ir;
23i0=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.toBytes=i,ir.boolToBytes=a,ir.hexToBytes=l,ir.numberToBytes=f,ir.stringToBytes=m;const e=de(),r=Ze(),n=mr(),t=Be(),o=oe(),s=new TextEncoder;function i(y,h={}){return typeof y=="number"||typeof y=="bigint"?f(y,h):typeof y=="boolean"?a(y,h):(0,r.isHex)(y)?l(y,h):m(y,h)}function a(y,h={}){const b=new Uint8Array(1);return b[0]=Number(y),typeof h.size=="number"?((0,t.assertSize)(b,{size:h.size}),(0,n.pad)(b,{size:h.size})):b}const c={zero:48,nine:57,A:65,F:70,a:97,f:102};function u(y){if(y>=c.zero&&y<=c.nine)return y-c.zero;if(y>=c.A&&y<=c.F)return y-(c.A-10);if(y>=c.a&&y<=c.f)return y-(c.a-10)}function l(y,h={}){let b=y;h.size&&((0,t.assertSize)(b,{size:h.size}),b=(0,n.pad)(b,{dir:"right",size:h.size}));let v=b.slice(2);v.length%2&&(v=`0${v}`);const g=v.length/2,_=new Uint8Array(g);for(let P=0,d=0;P<g;P++){const w=u(v.charCodeAt(d++)),E=u(v.charCodeAt(d++));if(w===void 0||E===void 0)throw new e.BaseError(`Invalid byte sequence ("${v[d-2]}${v[d-1]}" in "${v}").`);_[P]=w*16+E}return _}function f(y,h){const b=(0,o.numberToHex)(y,h);return l(b)}function m(y,h={}){const b=s.encode(y);return typeof h.size=="number"?((0,t.assertSize)(b,{size:h.size}),(0,n.pad)(b,{dir:"right",size:h.size})):b}return ir}var xi={},je={},ue={},a0;function og(){if(a0)return ue;a0=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.toBig=ue.shrSL=ue.shrSH=ue.rotrSL=ue.rotrSH=ue.rotrBL=ue.rotrBH=ue.rotr32L=ue.rotr32H=ue.rotlSL=ue.rotlSH=ue.rotlBL=ue.rotlBH=ue.add5L=ue.add5H=ue.add4L=ue.add4H=ue.add3L=ue.add3H=void 0,ue.add=g,ue.fromBig=n,ue.split=t;const e=BigInt(2**32-1),r=BigInt(32);function n(A,T=!1){return T?{h:Number(A&e),l:Number(A>>r&e)}:{h:Number(A>>r&e)|0,l:Number(A&e)|0}}function t(A,T=!1){const C=A.length;let R=new Uint32Array(C),I=new Uint32Array(C);for(let x=0;x<C;x++){const{h:F,l:H}=n(A[x],T);[R[x],I[x]]=[F,H]}return[R,I]}const o=(A,T)=>BigInt(A>>>0)<<r|BigInt(T>>>0);ue.toBig=o;const s=(A,T,C)=>A>>>C;ue.shrSH=s;const i=(A,T,C)=>A<<32-C|T>>>C;ue.shrSL=i;const a=(A,T,C)=>A>>>C|T<<32-C;ue.rotrSH=a;const c=(A,T,C)=>A<<32-C|T>>>C;ue.rotrSL=c;const u=(A,T,C)=>A<<64-C|T>>>C-32;ue.rotrBH=u;const l=(A,T,C)=>A>>>C-32|T<<64-C;ue.rotrBL=l;const f=(A,T)=>T;ue.rotr32H=f;const m=(A,T)=>A;ue.rotr32L=m;const y=(A,T,C)=>A<<C|T>>>32-C;ue.rotlSH=y;const h=(A,T,C)=>T<<C|A>>>32-C;ue.rotlSL=h;const b=(A,T,C)=>T<<C-32|A>>>64-C;ue.rotlBH=b;const v=(A,T,C)=>A<<C-32|T>>>64-C;ue.rotlBL=v;function g(A,T,C,R){const I=(T>>>0)+(R>>>0);return{h:A+C+(I/2**32|0)|0,l:I|0}}const _=(A,T,C)=>(A>>>0)+(T>>>0)+(C>>>0);ue.add3L=_;const P=(A,T,C,R)=>T+C+R+(A/2**32|0)|0;ue.add3H=P;const d=(A,T,C,R)=>(A>>>0)+(T>>>0)+(C>>>0)+(R>>>0);ue.add4L=d;const w=(A,T,C,R,I)=>T+C+R+I+(A/2**32|0)|0;ue.add4H=w;const E=(A,T,C,R,I)=>(A>>>0)+(T>>>0)+(C>>>0)+(R>>>0)+(I>>>0);ue.add5L=E;const p=(A,T,C,R,I,x)=>T+C+R+I+x+(A/2**32|0)|0;ue.add5H=p;const S={fromBig:n,split:t,toBig:o,shrSH:s,shrSL:i,rotrSH:a,rotrSL:c,rotrBH:u,rotrBL:l,rotr32H:f,rotr32L:m,rotlSH:y,rotlSL:h,rotlBH:b,rotlBL:v,add:g,add3L:_,add3H:P,add4L:d,add4H:w,add5H:p,add5L:E};return ue.default=S,ue}var Bd={},to={},s0;function Dv(){return s0||(s0=1,Object.defineProperty(to,"__esModule",{value:!0}),to.crypto=void 0,to.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),to}var c0;function hr(){return c0||(c0=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=t,e.abytes=o,e.ahash=s,e.aexists=i,e.aoutput=a,e.u8=c,e.u32=u,e.clean=l,e.createView=f,e.rotr=m,e.rotl=y,e.byteSwap=h,e.byteSwap32=b,e.bytesToHex=_,e.hexToBytes=w,e.asyncLoop=p,e.utf8ToBytes=S,e.bytesToUtf8=A,e.toBytes=T,e.kdfInputToBytes=C,e.concatBytes=R,e.checkOpts=I,e.createHasher=F,e.createOptHasher=H,e.createXOFer=j,e.randomBytes=k;const r=Dv();function n(B){return B instanceof Uint8Array||ArrayBuffer.isView(B)&&B.constructor.name==="Uint8Array"}function t(B){if(!Number.isSafeInteger(B)||B<0)throw new Error("positive integer expected, got "+B)}function o(B,...O){if(!n(B))throw new Error("Uint8Array expected");if(O.length>0&&!O.includes(B.length))throw new Error("Uint8Array expected of length "+O+", got length="+B.length)}function s(B){if(typeof B!="function"||typeof B.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");t(B.outputLen),t(B.blockLen)}function i(B,O=!0){if(B.destroyed)throw new Error("Hash instance has been destroyed");if(O&&B.finished)throw new Error("Hash#digest() has already been called")}function a(B,O){o(B);const q=O.outputLen;if(B.length<q)throw new Error("digestInto() expects output buffer of length at least "+q)}function c(B){return new Uint8Array(B.buffer,B.byteOffset,B.byteLength)}function u(B){return new Uint32Array(B.buffer,B.byteOffset,Math.floor(B.byteLength/4))}function l(...B){for(let O=0;O<B.length;O++)B[O].fill(0)}function f(B){return new DataView(B.buffer,B.byteOffset,B.byteLength)}function m(B,O){return B<<32-O|B>>>O}function y(B,O){return B<<O|B>>>32-O>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function h(B){return B<<24&4278190080|B<<8&16711680|B>>>8&65280|B>>>24&255}e.swap8IfBE=e.isLE?B=>B:B=>h(B),e.byteSwapIfBE=e.swap8IfBE;function b(B){for(let O=0;O<B.length;O++)B[O]=h(B[O]);return B}e.swap32IfBE=e.isLE?B=>B:b;const v=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",g=Array.from({length:256},(B,O)=>O.toString(16).padStart(2,"0"));function _(B){if(o(B),v)return B.toHex();let O="";for(let q=0;q<B.length;q++)O+=g[B[q]];return O}const P={_0:48,_9:57,A:65,F:70,a:97,f:102};function d(B){if(B>=P._0&&B<=P._9)return B-P._0;if(B>=P.A&&B<=P.F)return B-(P.A-10);if(B>=P.a&&B<=P.f)return B-(P.a-10)}function w(B){if(typeof B!="string")throw new Error("hex string expected, got "+typeof B);if(v)return Uint8Array.fromHex(B);const O=B.length,q=O/2;if(O%2)throw new Error("hex string expected, got unpadded hex of length "+O);const M=new Uint8Array(q);for(let N=0,z=0;N<q;
23N++,z+=2){const $=d(B.charCodeAt(z)),U=d(B.charCodeAt(z+1));if($===void 0||U===void 0){const G=B[z]+B[z+1];throw new Error('hex string expected, got non-hex character "'+G+'" at index '+z)}M[N]=$*16+U}return M}const E=async()=>{};e.nextTick=E;async function p(B,O,q){let M=Date.now();for(let N=0;N<B;N++){q(N);const z=Date.now()-M;z>=0&&z<O||(await(0,e.nextTick)(),M+=z)}}function S(B){if(typeof B!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(B))}function A(B){return new TextDecoder().decode(B)}function T(B){return typeof B=="string"&&(B=S(B)),o(B),B}function C(B){return typeof B=="string"&&(B=S(B)),o(B),B}function R(...B){let O=0;for(let M=0;M<B.length;M++){const N=B[M];o(N),O+=N.length}const q=new Uint8Array(O);for(let M=0,N=0;M<B.length;M++){const z=B[M];q.set(z,N),N+=z.length}return q}function I(B,O){if(O!==void 0&&{}.toString.call(O)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(B,O)}class x{}e.Hash=x;function F(B){const O=M=>B().update(T(M)).digest(),q=B();return O.outputLen=q.outputLen,O.blockLen=q.blockLen,O.create=()=>B(),O}function H(B){const O=(M,N)=>B(N).update(T(M)).digest(),q=B({});return O.outputLen=q.outputLen,O.blockLen=q.blockLen,O.create=M=>B(M),O}function j(B){const O=(M,N)=>B(N).update(T(M)).digest(),q=B({});return O.outputLen=q.outputLen,O.blockLen=q.blockLen,O.create=M=>B(M),O}e.wrapConstructor=F,e.wrapConstructorWithOpts=H,e.wrapXOFConstructorWithOpts=j;function k(B=32){if(r.crypto&&typeof r.crypto.getRandomValues=="function")return r.crypto.getRandomValues(new Uint8Array(B));if(r.crypto&&typeof r.crypto.randomBytes=="function")return Uint8Array.from(r.crypto.randomBytes(B));throw new Error("crypto.getRandomValues must be defined")}}
23)(Bd)),Bd}var u0;function ig(){if(u0)return je;u0=1,Object.defineProperty(je,"__esModule",{value:!0}),je.shake256=je.shake128=je.keccak_512=je.keccak_384=je.keccak_256=je.keccak_224=je.sha3_512=je.sha3_384=je.sha3_256=je.sha3_224=je.Keccak=void 0,je.keccakP=v;const e=og(),r=hr(),n=BigInt(0),t=BigInt(1),o=BigInt(2),s=BigInt(7),i=BigInt(256),a=BigInt(113),c=[],u=[],l=[];for(let d=0,w=t,E=1,p=0;d<24;d++){[E,p]=[p,(2*E+3*p)%5],c.push(2*(5*p+E)),u.push((d+1)*(d+2)/2%64);let S=n;for(let A=0;A<7;A++)w=(w<<t^(w>>s)*a)%i,w&o&&(S^=t<<(t<<BigInt(A))-t);l.push(S)}const f=(0,e.split)(l,!0),m=f[0],y=f[1],h=(d,w,E)=>E>32?(0,e.rotlBH)(d,w,E):(0,e.rotlSH)(d,w,E),b=(d,w,E)=>E>32?(0,e.rotlBL)(d,w,E):(0,e.rotlSL)(d,w,E);function v(d,w=24){const E=new Uint32Array(10);for(let p=24-w;p<24;p++){for(let T=0;T<10;T++)E[T]=d[T]^d[T+10]^d[T+20]^d[T+30]^d[T+40];for(let T=0;T<10;T+=2){const C=(T+8)%10,R=(T+2)%10,I=E[R],x=E[R+1],F=h(I,x,1)^E[C],H=b(I,x,1)^E[C+1];for(let j=0;j<50;j+=10)d[T+j]^=F,d[T+j+1]^=H}let S=d[2],A=d[3];for(let T=0;T<24;T++){const C=u[T],R=h(S,A,C),I=b(S,A,C),x=c[T];S=d[x],A=d[x+1],d[x]=R,d[x+1]=I}for(let T=0;T<50;T+=10){for(let C=0;C<10;C++)E[C]=d[T+C];for(let C=0;C<10;C++)d[T+C]^=~E[(C+2)%10]&E[(C+4)%10]}d[0]^=m[p],d[1]^=y[p]}(0,r.clean)(E)}class g extends r.Hash{constructor(w,E,p,S=!1,A=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=w,this.suffix=E,this.outputLen=p,this.enableXOF=S,this.rounds=A,(0,r.anumber)(p),!(0<w&&w<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,r.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,r.swap32IfBE)(this.state32),v(this.state32,this.rounds),(0,r.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(w){(0,r.aexists)(this),w=(0,r.toBytes)(w),(0,r.abytes)(w);const{blockLen:E,state:p}=this,S=w.length;for(let A=0;A<S;){const T=Math.min(E-this.pos,S-A);for(let C=0;C<T;C++)p[this.pos++]^=w[A++];this.pos===E&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:w,suffix:E,pos:p,blockLen:S}=this;w[p]^=E,(E&128)!==0&&p===S-1&&this.keccak(),w[S-1]^=128,this.keccak()}writeInto(w){(0,r.aexists)(this,!1),(0,r.abytes)(w),this.finish();const E=this.state,{blockLen:p}=this;for(let S=0,A=w.length;S<A;){this.posOut>=p&&this.keccak();const T=Math.min(p-this.posOut,A-S);w.set(E.subarray(this.posOut,this.posOut+T),S),this.posOut+=T,S+=T}return w}xofInto(w){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(w)}xof(w){return(0,r.anumber)(w),this.xofInto(new Uint8Array(w))}digestInto(w){if((0,r.aoutput)(w,this),this.finished)throw new Error("digest() was already called");return this.writeInto(w),this.destroy(),w}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,r.clean)(this.state)}_cloneInto(w){const{blockLen:E,suffix:p,outputLen:S,rounds:A,enableXOF:T}=this;return w||(w=new g(E,p,S,T,A)),w.state32.set(this.state32),w.pos=this.pos,w.posOut=this.posOut,w.finished=this.finished,w.rounds=A,w.suffix=p,w.outputLen=S,w.enableXOF=T,w.destroyed=this.destroyed,w}}je.Keccak=g;const _=(d,w,E)=>(0,r.createHasher)(()=>new g(w,d,E));je.sha3_224=_(6,144,224/8),je.sha3_256=_(6,136,256/8),je.sha3_384=_(6,104,384/8),je.sha3_512=_(6,72,512/8),je.keccak_224=_(1,144,224/8),je.keccak_256=_(1,136,256/8),je.keccak_384=_(1,104,384/8),je.keccak_512=_(1,72,512/8);const P=(d,w,E)=>(0,r.createXOFer)((p={})=>new g(w,d,p.dkLen===void 0?E:p.dkLen,!0));return je.shake128=P(31,168,128/8),je.shake256=P(31,136,256/8),je}var d0;function tt(){if(d0)return xi;d0=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.keccak256=o;const e=ig(),r=Ze(),n=Ee(),t=oe();function o(s,i){const a=i||"hex",c=(0,e.keccak_256)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return xi}var ro={},qi={},Mi={},f0;function Gv(){if(f0)return Mi;f0=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.hashSignature=t;const e=Ee(),r=tt(),n=o=>(0,r.keccak256)((0,e.toBytes)(o));function t(o){return n(o)}return Mi}var no={},ki={},l0;
23function Vv(){if(l0)return ki;l0=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.normalizeSignature=r;const e=de();function r(n){let t=!0,o="",s=0,i="",a=!1;for(let c=0;c<n.length;c++){const u=n[c];if(["(",")",","].includes(u)&&(t=!0),u==="("&&s++,u===")"&&s--,!!t){if(s===0){if(u===" "&&["event","function",""].includes(i))i="";else if(i+=u,u===")"){a=!0;break}continue}if(u===" "){n[c-1]!==","&&o!==","&&o!==",("&&(o="",t=!1);continue}i+=u,o+=u}}if(!a)throw new e.BaseError("Unable to normalize signature.");return i}return ki}var b0;function of(){if(b0)return no;b0=1,Object.defineProperty(no,"__esModule",{value:!0}),no.toSignature=void 0;const e=br(),r=Vv(),n=t=>{const o=typeof t=="string"?t:(0,e.formatAbiItem)(t);return(0,r.normalizeSignature)(o)};return no.toSignature=n,no}var m0;function Hu(){if(m0)return qi;m0=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.toSignatureHash=n;const e=Gv(),r=of();function n(t){return(0,e.hashSignature)((0,r.toSignature)(t))}return qi}var h0;function In(){if(h0)return ro;h0=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.toEventSelector=void 0;const e=Hu();return ro.toEventSelector=e.toSignatureHash,ro}var oo={},io={},y0;function At(){if(y0)return io;y0=1,Object.defineProperty(io,"__esModule",{value:!0}),io.InvalidAddressError=void 0;const e=de();class r extends e.BaseError{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}return io.InvalidAddressError=r,io}var Od={},ao={},p0;function Wr(){if(p0)return ao;p0=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&(super.delete(n),super.set(n,t)),t}set(n,t){if(super.has(n)&&super.delete(n),super.set(n,t),this.maxSize&&this.size>this.maxSize){const o=super.keys().next().value;o!==void 0&&super.delete(o)}return this}}return ao.LruMap=e,ao}var so={},g0;function Je(){if(g0)return so;g0=1,Object.defineProperty(so,"__esModule",{value:!0}),so.checksumAddress=i,so.getAddress=a;const e=At(),r=Ee(),n=tt(),t=Wr(),o=rt(),s=new t.LruMap(8192);function i(c,u){if(s.has(`${c}.${u}`))return s.get(`${c}.${u}`);const l=u?`${u}${c.toLowerCase()}`:c.substring(2).toLowerCase(),f=(0,n.keccak256)((0,r.stringToBytes)(l),"bytes"),m=(u?l.substring(`${u}0x`.length):l).split("");for(let h=0;h<40;h+=2)f[h>>1]>>4>=8&&m[h]&&(m[h]=m[h].toUpperCase()),(f[h>>1]&15)>=8&&m[h+1]&&(m[h+1]=m[h+1].toUpperCase());const y=`0x${m.join("")}`;return s.set(`${c}.${u}`,y),y}function a(c,u){if(!(0,o.isAddress)(c,{strict:!1}))throw new e.InvalidAddressError({address:c});return i(c,u)}return so}var _0;function rt(){return _0||(_0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAddressCache=void 0,e.isAddress=o;const r=Wr(),n=Je(),t=/^0x[a-fA-F0-9]{40}$/;e.isAddressCache=new r.LruMap(8192);function o(s,i){const{strict:a=!0}=i??{},c=`${s}.${a}`;if(e.isAddressCache.has(c))return e.isAddressCache.get(c);const u=t.test(s)?s.toLowerCase()===s?!0:a?(0,n.checksumAddress)(s)===s:!0:!1;return e.isAddressCache.set(c,u),u}})(Od)),Od}var cn={},v0;function qe(){if(v0)return cn;v0=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.concat=e,cn.concatBytes=r,cn.concatHex=n;function e(t){return typeof t[0]=="string"?n(t):r(t)}function r(t){let o=0;for(const a of t)o+=a.length;const s=new Uint8Array(o);let i=0;for(const a of t)s.set(a,i),i+=a.length;return s}function n(t){return`0x${t.reduce((o,s)=>o+s.replace("0x",""),"")}`}return cn}var un={},E0;function ft(){if(E0)return un;E0=1,Object.defineProperty(un,"__esModule",{value:!0}),un.slice=t,un.sliceBytes=i,un.sliceHex=a;const e=ku(),r=Ze(),n=Ue();function t(c,u,l,{strict:f}={}){return(0,r.isHex)(c,{strict:!1})?a(c,u,l,{strict:f}):i(c,u,l,{strict:f})}function o(c,u){if(typeof u=="number"&&u>0&&u>(0,n.size)(c)-1)throw new e.SliceOffsetOutOfBoundsError({offset:u,position:"start",size:(0,n.size)(c)})}function s(c,u,l){if(typeof u=="number"&&typeof l=="number"&&(0,n.size)(c)!==l-u)throw new e.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:(0,n.size)(c)})}function i(c,u,l,{strict:f}={}){o(c,u);const m=c.slice(u,l);return f&&s(m,u,l),m}function a(c,u,l,{strict:f}={}){o(c,u);const m=`0x${c.replace("0x","").slice((u??0)*2,(l??c.length)*2)}`;return f&&s(m,u,l),m}return un}var Dt={},j0;
23function Fu(){return j0||(j0=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.integerRegex=Dt.bytesRegex=Dt.arrayRegex=void 0,Dt.arrayRegex=/^(.*)\[([0-9]*)\]$/,Dt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Dt.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/),Dt}var w0;function Tt(){if(w0)return oo;w0=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.encodeAbiParameters=f,oo.getArrayComponents=E;const e=Se(),r=At(),n=de(),t=Sn(),o=rt(),s=qe(),i=mr(),a=Ue(),c=ft(),u=oe(),l=Fu();function f(p,S){if(p.length!==S.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:p.length,givenLength:S.length});const A=m({params:p,values:S}),T=h(A);return T.length===0?"0x":T}function m({params:p,values:S}){const A=[];for(let T=0;T<p.length;T++)A.push(y({param:p[T],value:S[T]}));return A}function y({param:p,value:S}){const A=E(p.type);if(A){const[T,C]=A;return v(S,{length:T,param:{...p,type:C}})}if(p.type==="tuple")return w(S,{param:p});if(p.type==="address")return b(S);if(p.type==="bool")return _(S);if(p.type.startsWith("uint")||p.type.startsWith("int")){const T=p.type.startsWith("int"),[,,C="256"]=l.integerRegex.exec(p.type)??[];return P(S,{signed:T,size:Number(C)})}if(p.type.startsWith("bytes"))return g(S,{param:p});if(p.type==="string")return d(S);throw new e.InvalidAbiEncodingTypeError(p.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function h(p){let S=0;for(let R=0;R<p.length;R++){const{dynamic:I,encoded:x}=p[R];I?S+=32:S+=(0,a.size)(x)}const A=[],T=[];let C=0;for(let R=0;R<p.length;R++){const{dynamic:I,encoded:x}=p[R];I?(A.push((0,u.numberToHex)(S+C,{size:32})),T.push(x),C+=(0,a.size)(x)):A.push(x)}return(0,s.concat)([...A,...T])}function b(p){if(!(0,o.isAddress)(p))throw new r.InvalidAddressError({address:p});return{dynamic:!1,encoded:(0,i.padHex)(p.toLowerCase())}}function v(p,{length:S,param:A}){const T=S===null;if(!Array.isArray(p))throw new e.InvalidArrayError(p);if(!T&&p.length!==S)throw new e.AbiEncodingArrayLengthMismatchError({expectedLength:S,givenLength:p.length,type:`${A.type}[${S}]`});let C=!1;const R=[];for(let I=0;I<p.length;I++){const x=y({param:A,value:p[I]});x.dynamic&&(C=!0),R.push(x)}if(T||C){const I=h(R);if(T){const x=(0,u.numberToHex)(R.length,{size:32});return{dynamic:!0,encoded:R.length>0?(0,s.concat)([x,I]):x}}if(C)return{dynamic:!0,encoded:I}}return{dynamic:!1,encoded:(0,s.concat)(R.map(({encoded:I})=>I))}}function g(p,{param:S}){const[,A]=S.type.split("bytes"),T=(0,a.size)(p);if(!A){let C=p;return T%32!==0&&(C=(0,i.padHex)(C,{dir:"right",size:Math.ceil((p.length-2)/2/32)*32})),{dynamic:!0,encoded:(0,s.concat)([(0,i.padHex)((0,u.numberToHex)(T,{size:32})),C])}}if(T!==Number.parseInt(A,10))throw new e.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(A,10),value:p});return{dynamic:!1,encoded:(0,i.padHex)(p,{dir:"right"})}}function _(p){if(typeof p!="boolean")throw new n.BaseError(`Invalid boolean value: "${p}" (type: ${typeof p}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,i.padHex)((0,u.boolToHex)(p))}}function P(p,{signed:S,size:A=256}){if(typeof A=="number"){const T=2n**(BigInt(A)-(S?1n:0n))-1n,C=S?-T-1n:0n;if(p>T||p<C)throw new t.IntegerOutOfRangeError({max:T.toString(),min:C.toString(),signed:S,size:A/8,value:p.toString()})}return{dynamic:!1,encoded:(0,u.numberToHex)(p,{size:32,signed:S})}}function d(p){const S=(0,u.stringToHex)(p),A=Math.ceil((0,a.size)(S)/32),T=[];for(let C=0;C<A;C++)T.push((0,i.padHex)((0,c.slice)(S,C*32,(C+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,s.concat)([(0,i.padHex)((0,u.numberToHex)((0,a.size)(S),{size:32})),...T])}}function w(p,{param:S}){let A=!1;const T=[];for(let C=0;C<S.components.length;C++){const R=S.components[C],I=Array.isArray(p)?C:R.name,x=y({param:R,value:p[I]});T.push(x),x.dynamic&&(A=!0)}return{dynamic:A,encoded:A?h(T):(0,s.concat)(T.map(({encoded:C})=>C))}}function E(p){const S=p.match(/^(.*)\[(\d+)?\]$/);return S?[S[2]?Number(S[2]):null,S[1]]:void 0}return oo}var dn={},co={},P0;function Kr(){if(P0)return co;P0=1,Object.defineProperty(co,"__esModule",{value:!0}),co.toFunctionSelector=void 0;const e=ft(),r=Hu(),n=t=>(0,e.slice)((0,r.toSignatureHash)(t),0,4);return co.toFunctionSelector=n,co}var A0;function tr(){if(A0)return dn;A0=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.getAbiItem=s,dn.isArgOfType=i,dn.getAmbiguousTypes=a;
23const e=Se(),r=Ze(),n=rt(),t=In(),o=Kr();function s(c){const{abi:u,args:l=[],name:f}=c,m=(0,r.isHex)(f,{strict:!1}),y=u.filter(b=>m?b.type==="function"?(0,o.toFunctionSelector)(b)===f:b.type==="event"?(0,t.toEventSelector)(b)===f:!1:"name"in b&&b.name===f);if(y.length===0)return;if(y.length===1)return y[0];let h;for(const b of y){if(!("inputs"in b))continue;if(!l||l.length===0){if(!b.inputs||b.inputs.length===0)return b;continue}if(!b.inputs||b.inputs.length===0||b.inputs.length!==l.length)continue;if(l.every((g,_)=>{const P="inputs"in b&&b.inputs[_];return P?i(g,P):!1})){if(h&&"inputs"in h&&h.inputs){const g=a(b.inputs,h.inputs,l);if(g)throw new e.AbiItemAmbiguityError({abiItem:b,type:g[0]},{abiItem:h,type:g[1]})}h=b}}return h||y[0]}function i(c,u){const l=typeof c,f=u.type;switch(f){case"address":return(0,n.isAddress)(c,{strict:!1});case"bool":return l==="boolean";case"function":return l==="string";case"string":return l==="string";default:return f==="tuple"&&"components"in u?Object.values(u.components).every((m,y)=>l==="object"&&i(Object.values(c)[y],m)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(f)?l==="number"||l==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(f)?l==="string"||c instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(f)?Array.isArray(c)&&c.every(m=>i(m,{...u,type:f.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function a(c,u,l){for(const f in c){const m=c[f],y=u[f];if(m.type==="tuple"&&y.type==="tuple"&&"components"in m&&"components"in y)return a(m.components,y.components,l[f]);const h=[m.type,y.type];if(h.includes("address")&&h.includes("bytes20")?!0:h.includes("address")&&h.includes("string")?(0,n.isAddress)(l[f],{strict:!1}):h.includes("address")&&h.includes("bytes")?(0,n.isAddress)(l[f],{strict:!1}):!1)return h}}return dn}var T0;function Zr(){if(T0)return Ri;T0=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.encodeEventTopics=u;const e=Se(),r=ng(),n=Ee(),t=tt(),o=In(),s=Tt(),i=Qt(),a=tr(),c="/docs/contract/encodeEventTopics";function u(f){var P;const{abi:m,eventName:y,args:h}=f;let b=m[0];if(y){const d=(0,a.getAbiItem)({abi:m,name:y});if(!d)throw new e.AbiEventNotFoundError(y,{docsPath:c});b=d}if(b.type!=="event")throw new e.AbiEventNotFoundError(void 0,{docsPath:c});let v=[];if(h&&"inputs"in b){const d=(P=b.inputs)==null?void 0:P.filter(E=>"indexed"in E&&E.indexed),w=Array.isArray(h)?h:Object.values(h).length>0?(d==null?void 0:d.map(E=>h[E.name]))??[]:[];w.length>0&&(v=(d==null?void 0:d.map((E,p)=>Array.isArray(w[p])?w[p].map((S,A)=>l({param:E,value:w[p][A]})):typeof w[p]<"u"&&w[p]!==null?l({param:E,value:w[p]}):null))??[])}if(b.anonymous)return v;const g=(0,i.formatAbiItem)(b);return[(0,o.toEventSelector)(g),...v]}function l({param:f,value:m}){if(f.type==="string"||f.type==="bytes")return(0,t.keccak256)((0,n.toBytes)(m));if(f.type==="tuple"||f.type.match(/^(.*)\[(\d+)?\]$/))throw new r.FilterTypeNotSupportedError(f.type);return(0,s.encodeAbiParameters)([f],[m])}return Ri}var Hi={},S0;function Nu(){if(S0)return Hi;S0=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.createFilterRequestScope=e;function e(r,{method:n}){var o,s;const t={};return r.transport.type==="fallback"&&((s=(o=r.transport).onResponse)==null||s.call(o,({method:i,response:a,status:c,transport:u})=>{c==="success"&&n===i&&(t[a]=u.request)})),(i=>t[i]||r.request)}return Hi}var I0;function af(){if(I0)return Ii;I0=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.createContractEventFilter=t;const e=Zr(),r=oe(),n=Nu();async function t(o,s){const{address:i,abi:a,args:c,eventName:u,fromBlock:l,strict:f,toBlock:m}=s,y=(0,n.createFilterRequestScope)(o,{method:"eth_newFilter"}),h=u?(0,e.encodeEventTopics)({abi:a,args:c,eventName:u}):void 0,b=await o.request({method:"eth_newFilter",params:[{address:i,fromBlock:typeof l=="bigint"?(0,r.numberToHex)(l):l,toBlock:typeof m=="bigint"?(0,r.numberToHex)(m):m,topics:h}]});return{abi:a,args:c,eventName:u,id:b,request:y(b),strict:!!f,type:"event"}}return Ii}var Fi={},Ni={},R0;function Ie(){if(R0)return Ni;R0=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.parseAccount=e;function e(r){return typeof r=="string"?{address:r,type:"json-rpc"}:r}return Ni}var $i={},zi={},B0;function ag(){if(B0)return zi;B0=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.prepareEncodeFunctionData=s;const e=Se(),r=Kr(),n=Qt(),t=tr(),o="/docs/contract/encodeFunctionData";function s(i){const{abi:a,args:c,functionName:u}=i;let l=a[0];if(u){const f=(0,t.getAbiItem)({abi:a,args:c,name:u});if(!f)throw new e.AbiFunctionNotFoundError(u,{docsPath:o});l=f}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:o});return{abi:[l],functionName:(0,r.toFunctionSelector)((0,n.formatAbiItem)(l))}}return zi}var O0;function Le(){if(O0)return $i;O0=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.encodeFunctionData=t;const e=qe(),r=Tt(),n=ag();function t(o){const{args:s}=o,{abi:i,functionName:a}=(()=>{var f;return o.abi.length===1&&((f=o.functionName)!=null&&f.startsWith("0x"))?o:(0,n.prepareEncodeFunctionData)(o)})(),c=i[0],u=a,l="inputs"in c&&c.inputs?(0,r.encodeAbiParameters)(c.inputs,s??[]):void 0;return(0,e.concatHex)([u,l??"0x"])}return $i}var Ui={},Ge={},Gt={},C0;
23function $u(){return C0||(C0=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.solidityPanic=Gt.solidityError=Gt.panicReasons=void 0,Gt.panicReasons={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Gt.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Gt.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}),Gt}var Li={},Di={},Gi={},Vt={},x0;function sg(){if(x0)return Vt;x0=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.RecursiveReadLimitExceededError=Vt.PositionOutOfBoundsError=Vt.NegativeOffsetError=void 0;const e=de();class r extends e.BaseError{constructor({offset:s}){super(`Offset \`${s}\` cannot be negative.`,{name:"NegativeOffsetError"})}}Vt.NegativeOffsetError=r;class n extends e.BaseError{constructor({length:s,position:i}){super(`Position \`${i}\` is out of bounds (\`0 < position < ${s}\`).`,{name:"PositionOutOfBoundsError"})}}Vt.PositionOutOfBoundsError=n;class t extends e.BaseError{constructor({count:s,limit:i}){super(`Recursive read limit of \`${i}\` exceeded (recursive read count: \`${s}\`).`,{name:"RecursiveReadLimitExceededError"})}}return Vt.RecursiveReadLimitExceededError=t,Vt}var q0;function Lo(){if(q0)return Gi;q0=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.createCursor=n;const e=sg(),r={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new e.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new e.PositionOutOfBoundsError({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new e.NegativeOffsetError({offset:t});const o=this.position-t;this.assertPosition(o),this.position=o},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new e.NegativeOffsetError({offset:t});const o=this.position+t;this.assertPosition(o),this.position=o},inspectByte(t){const o=t??this.position;return this.assertPosition(o),this.bytes[o]},inspectBytes(t,o){const s=o??this.position;return this.assertPosition(s+t-1),this.bytes.subarray(s,s+t)},inspectUint8(t){const o=t??this.position;return this.assertPosition(o),this.bytes[o]},inspectUint16(t){const o=t??this.position;return this.assertPosition(o+1),this.dataView.getUint16(o)},inspectUint24(t){const o=t??this.position;return this.assertPosition(o+2),(this.dataView.getUint16(o)<<8)+this.dataView.getUint8(o+2)},inspectUint32(t){const o=t??this.position;return this.assertPosition(o+3),this.dataView.getUint32(o)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,o){this.assertReadLimit(),this._touch();const s=this.inspectBytes(t);return this.position+=o??t,s},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const o=this.position;return this.assertPosition(t),this.position=t,()=>this.position=o},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function n(t,{recursiveReadLimit:o=8192}={}){const s=Object.create(r);return s.bytes=t,s.dataView=new DataView(t.buffer??t,t.byteOffset,t.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=o,s}return Gi}var sr={},M0;function sf(){if(M0)return sr;
23M0=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.fromBytes=o,sr.bytesToBigInt=s,sr.bytesToBool=i,sr.bytesToNumber=a,sr.bytesToString=c;const e=Sn(),r=er(),n=Be(),t=oe();function o(u,l){const f=typeof l=="string"?{to:l}:l,m=f.to;return m==="number"?a(u,f):m==="bigint"?s(u,f):m==="boolean"?i(u,f):m==="string"?c(u,f):(0,t.bytesToHex)(u,f)}function s(u,l={}){typeof l.size<"u"&&(0,n.assertSize)(u,{size:l.size});const f=(0,t.bytesToHex)(u,l);return(0,n.hexToBigInt)(f,l)}function i(u,l={}){let f=u;if(typeof l.size<"u"&&((0,n.assertSize)(f,{size:l.size}),f=(0,r.trim)(f)),f.length>1||f[0]>1)throw new e.InvalidBytesBooleanError(f);return!!f[0]}function a(u,l={}){typeof l.size<"u"&&(0,n.assertSize)(u,{size:l.size});const f=(0,t.bytesToHex)(u,l);return(0,n.hexToNumber)(f,l)}function c(u,l={}){let f=u;return typeof l.size<"u"&&((0,n.assertSize)(f,{size:l.size}),f=(0,r.trim)(f,{dir:"right"})),new TextDecoder().decode(f)}return sr}var k0;function yr(){if(k0)return Di;k0=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.decodeAbiParameters=l;const e=Se(),r=Je(),n=Lo(),t=Ue(),o=ft(),s=er(),i=sf(),a=Ee(),c=oe(),u=Tt();function l(E,p){const S=typeof p=="string"?(0,a.hexToBytes)(p):p,A=(0,n.createCursor)(S);if((0,t.size)(S)===0&&E.length>0)throw new e.AbiDecodingZeroDataError;if((0,t.size)(p)&&(0,t.size)(p)<32)throw new e.AbiDecodingDataSizeTooSmallError({data:typeof p=="string"?p:(0,c.bytesToHex)(p),params:E,size:(0,t.size)(p)});let T=0;const C=[];for(let R=0;R<E.length;++R){const I=E[R];A.setPosition(T);const[x,F]=f(A,I,{staticPosition:0});T+=F,C.push(x)}return C}function f(E,p,{staticPosition:S}){const A=(0,u.getArrayComponents)(p.type);if(A){const[T,C]=A;return b(E,{...p,type:C},{length:T,staticPosition:S})}if(p.type==="tuple")return P(E,p,{staticPosition:S});if(p.type==="address")return h(E);if(p.type==="bool")return v(E);if(p.type.startsWith("bytes"))return g(E,p,{staticPosition:S});if(p.type.startsWith("uint")||p.type.startsWith("int"))return _(E,p);if(p.type==="string")return d(E,{staticPosition:S});throw new e.InvalidAbiDecodingTypeError(p.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const m=32,y=32;function h(E){const p=E.readBytes(32);return[(0,r.checksumAddress)((0,c.bytesToHex)((0,o.sliceBytes)(p,-20))),32]}function b(E,p,{length:S,staticPosition:A}){if(!S){const R=(0,i.bytesToNumber)(E.readBytes(y)),I=A+R,x=I+m;E.setPosition(I);const F=(0,i.bytesToNumber)(E.readBytes(m)),H=w(p);let j=0;const k=[];for(let B=0;B<F;++B){E.setPosition(x+(H?B*32:j));const[O,q]=f(E,p,{staticPosition:x});j+=q,k.push(O)}return E.setPosition(A+32),[k,32]}if(w(p)){const R=(0,i.bytesToNumber)(E.readBytes(y)),I=A+R,x=[];for(let F=0;F<S;++F){E.setPosition(I+F*32);const[H]=f(E,p,{staticPosition:I});x.push(H)}return E.setPosition(A+32),[x,32]}let T=0;const C=[];for(let R=0;R<S;++R){const[I,x]=f(E,p,{staticPosition:A+T});T+=x,C.push(I)}return[C,T]}function v(E){return[(0,i.bytesToBool)(E.readBytes(32),{size:32}),32]}function g(E,p,{staticPosition:S}){const[A,T]=p.type.split("bytes");if(!T){const R=(0,i.bytesToNumber)(E.readBytes(32));E.setPosition(S+R);const I=(0,i.bytesToNumber)(E.readBytes(32));if(I===0)return E.setPosition(S+32),["0x",32];const x=E.readBytes(I);return E.setPosition(S+32),[(0,c.bytesToHex)(x),32]}return[(0,c.bytesToHex)(E.readBytes(Number.parseInt(T,10),32)),32]}function _(E,p){const S=p.type.startsWith("int"),A=Number.parseInt(p.type.split("int")[1]||"256",10),T=E.readBytes(32);return[A>48?(0,i.bytesToBigInt)(T,{signed:S}):(0,i.bytesToNumber)(T,{signed:S}),32]}function P(E,p,{staticPosition:S}){const A=p.components.length===0||p.components.some(({name:R})=>!R),T=A?[]:{};let C=0;if(w(p)){const R=(0,i.bytesToNumber)(E.readBytes(y)),I=S+R;for(let x=0;x<p.components.length;++x){const F=p.components[x];E.setPosition(I+C);const[H,j]=f(E,F,{staticPosition:I});C+=j,T[A?x:F==null?void 0:F.name]=H}return E.setPosition(S+32),[T,32]}for(let R=0;R<p.components.length;++R){const I=p.components[R],[x,F]=f(E,I,{staticPosition:S});T[A?R:I==null?void 0:I.name]=x,C+=F}return[T,C]}function d(E,{staticPosition:p}){const S=(0,i.bytesToNumber)(E.readBytes(32)),A=p+S;E.setPosition(A);const T=(0,i.bytesToNumber)(E.readBytes(32));if(T===0)return E.setPosition(p+32),["",32];const C=E.readBytes(T,32),R=(0,i.bytesToString)((0,s.trim)(C));return E.setPosition(p+32),[R,32]}function w(E){var A;const{type:p}=E;
23if(p==="string"||p==="bytes"||p.endsWith("[]"))return!0;if(p==="tuple")return(A=E.components)==null?void 0:A.some(w);const S=(0,u.getArrayComponents)(E.type);return!!(S&&w({...E,type:S[1]}))}return Di}var H0;function Do(){if(H0)return Li;H0=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.decodeErrorResult=i;const e=$u(),r=Se(),n=ft(),t=Kr(),o=yr(),s=Qt();function i(a){const{abi:c,data:u,cause:l}=a,f=(0,n.slice)(u,0,4);if(f==="0x")throw new r.AbiDecodingZeroDataError({cause:l});const y=[...c||[],e.solidityError,e.solidityPanic].find(h=>h.type==="error"&&f===(0,t.toFunctionSelector)((0,s.formatAbiItem)(h)));if(!y)throw new r.AbiErrorSignatureNotFoundError(f,{docsPath:"/docs/contract/decodeErrorResult",cause:l});return{abiItem:y,args:"inputs"in y&&y.inputs&&y.inputs.length>0?(0,o.decodeAbiParameters)(y.inputs,(0,n.slice)(u,4)):void 0,errorName:y.name}}return Li}var Vi={},uo={},F0;function Fe(){if(F0)return uo;F0=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.stringify=void 0;const e=(r,n,t)=>JSON.stringify(r,(o,s)=>{const i=typeof s=="bigint"?s.toString():s;return typeof n=="function"?n(o,i):i},t);return uo.stringify=e,uo}var N0;function cg(){if(N0)return Vi;N0=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.formatAbiItemWithArgs=r;const e=Fe();function r({abiItem:n,args:t,includeFunctionName:o=!0,includeName:s=!1}){if("name"in n&&"inputs"in n&&n.inputs)return`${o?n.name:""}(${n.inputs.map((i,a)=>`${s&&i.name?`${i.name}: `:""}${typeof t[a]=="object"?(0,e.stringify)(t[a]):t[a]}`).join(", ")})`}return Vi}var Wi={},Wt={},$0;function Go(){return $0||($0=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.weiUnits=Wt.gweiUnits=Wt.etherUnits=void 0,Wt.etherUnits={gwei:9,wei:18},Wt.gweiUnits={ether:-9,wei:9},Wt.weiUnits={ether:-18,gwei:-9}),Wt}var Ki={},z0;function zu(){if(z0)return Ki;z0=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.formatUnits=e;function e(r,n){let t=r.toString();const o=t.startsWith("-");o&&(t=t.slice(1)),t=t.padStart(n,"0");let[s,i]=[t.slice(0,t.length-n),t.slice(t.length-n)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${s||"0"}${i?`.${i}`:""}`}return Ki}var U0;function Vo(){if(U0)return Wi;U0=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.formatEther=n;const e=Go(),r=zu();function n(t,o="wei"){return(0,r.formatUnits)(t,e.etherUnits[o])}return Wi}var Zi={},L0;function Jr(){if(L0)return Zi;L0=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.formatGwei=n;const e=Go(),r=zu();function n(t,o="wei"){return(0,r.formatUnits)(t,e.gweiUnits[o])}return Zi}var Kt={},D0;function cf(){if(D0)return Kt;D0=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.StateAssignmentConflictError=Kt.AccountStateConflictError=void 0,Kt.prettyStateMapping=t,Kt.prettyStateOverride=o;const e=de();class r extends e.BaseError{constructor({address:i}){super(`State for account "${i}" is set multiple times.`,{name:"AccountStateConflictError"})}}Kt.AccountStateConflictError=r;class n extends e.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}Kt.StateAssignmentConflictError=n;function t(s){return s.reduce((i,{slot:a,value:c})=>`${i} ${a}: ${c} 24`,"")}function o(s){return s.reduce((i,{address:a,...c})=>{let u=`${i} ${a}: 25`;return c.nonce&&(u+=` nonce: ${c.nonce} 26`),c.balance&&(u+=` balance: ${c.balance} 27`),c.code&&(u+=` code: ${c.code} 28`),c.state&&(u+=` state: 29`,u+=t(c.state)),c.stateDiff&&(u+=` stateDiff: 30`,u+=t(c.stateDiff)),u},` State Override: 31`).slice(0,-1)}return Kt}var we={},G0;function nt(){if(G0)return we;G0=1,Object.defineProperty(we,"__esModule",{value:!0}),we.WaitForTransactionReceiptTimeoutError=we.TransactionReceiptRevertedError=we.TransactionReceiptNotFoundError=we.TransactionNotFoundError=we.TransactionExecutionError=we.InvalidStorageKeySizeError=we.InvalidSerializedTransactionError=we.InvalidSerializedTransactionTypeError=we.InvalidSerializableTransactionError=we.InvalidLegacyVError=we.FeeConflictError=void 0,we.prettyPrint=t;const e=Vo(),r=Jr(),n=de();function t(b){const v=Object.entries(b).map(([_,P])=>
31P===void 0||P===!1?null:[_,P]).filter(Boolean),g=v.reduce((_,[P])=>Math.max(_,P.length),0);return v.map(([_,P])=>` ${`${_}:`.padEnd(g+1)} ${P}`).join(` 32`)}class o extends n.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` 33`),{name:"FeeConflictError"})}}we.FeeConflictError=o;class s extends n.BaseError{constructor({v}){super(`Invalid \`v\` value "${v}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}we.InvalidLegacyVError=s;class i extends n.BaseError{constructor({transaction:v}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",t(v),"}","","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","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}we.InvalidSerializableTransactionError=i;class a extends n.BaseError{constructor({serializedType:v}){super(`Serialized transaction type "${v}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=v}}we.InvalidSerializedTransactionTypeError=a;class c extends n.BaseError{constructor({attributes:v,serializedTransaction:g,type:_}){const P=Object.entries(v).map(([d,w])=>typeof w>"u"?d:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${_}" was provided.`,{metaMessages:[`Serialized Transaction: "${g}"`,P.length>0?`Missing Attributes: ${P.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=g,this.type=_}}we.InvalidSerializedTransactionError=c;class u extends n.BaseError{constructor({storageKey:v}){super(`Size for storage key "${v}" is invalid. Expected 32 bytes. Got ${Math.floor((v.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}we.InvalidStorageKeySizeError=u;class l extends n.BaseError{constructor(v,{account:g,docsPath:_,chain:P,data:d,gas:w,gasPrice:E,maxFeePerGas:p,maxPriorityFeePerGas:S,nonce:A,to:T,value:C}){var I;const R=t({chain:P&&`${P==null?void 0:P.name} (id: ${P==null?void 0:P.id})`,from:g==null?void 0:g.address,to:T,value:typeof C<"u"&&`${(0,e.formatEther)(C)} ${((I=P==null?void 0:P.nativeCurrency)==null?void 0:I.symbol)||"ETH"}`,data:d,gas:w,gasPrice:typeof E<"u"&&`${(0,r.formatGwei)(E)} gwei`,maxFeePerGas:typeof p<"u"&&`${(0,r.formatGwei)(p)} gwei`,maxPriorityFeePerGas:typeof S<"u"&&`${(0,r.formatGwei)(S)} gwei`,nonce:A});super(v.shortMessage,{cause:v,docsPath:_,metaMessages:[...v.metaMessages?[...v.metaMessages," "]:[],"Request Arguments:",R].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=v}}we.TransactionExecutionError=l;class f extends n.BaseError{constructor({blockHash:v,blockNumber:g,blockTag:_,hash:P,index:d}){let w="Transaction";_&&d!==void 0&&(w=`Transaction at block time "${_}" at index "${d}"`),v&&d!==void 0&&(w=`Transaction at block hash "${v}" at index "${d}"`),g&&d!==void 0&&(w=`Transaction at block number "${g}" at index "${d}"`),P&&(w=`Transaction with hash "${P}"`),super(`${w} could not be found.`,{name:"TransactionNotFoundError"})}}we.TransactionNotFoundError=f;class m extends n.BaseError{constructor({hash:v}){super(`Transaction receipt with hash "${v}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}we.TransactionReceiptNotFoundError=m;class y extends n.BaseError{constructor({receipt:v}){super(`Transaction with hash "${v.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=v}}we.TransactionReceiptRevertedError=y;class h extends n.BaseError{constructor({hash:v}){super(`Timed out while waiting for transaction with hash "${v}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}return we.WaitForTransactionReceiptTimeoutError=h,we}var Zt={},V0;
33function xt(){if(V0)return Zt;V0=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.getUrl=Zt.getContractAddress=void 0,Zt.getAbortError=r,Zt.isAbortError=n;const e=o=>o;Zt.getContractAddress=e;function r(o){if(o!=null&&o.reason)return o.reason;if(typeof DOMException=="function")return new DOMException("This operation was aborted","AbortError");const s=new Error("This operation was aborted");return s.name="AbortError",s}function n(o){return typeof o=="object"&&o!==null&&"name"in o&&o.name==="AbortError"}const t=o=>{try{const s=new URL(o);return!s.username&&!s.password?o:(s.username="",s.password="",s.toString())}catch{return o}};return Zt.getUrl=t,Zt}var W0;function pr(){if(W0)return Ge;W0=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.RawContractError=Ge.CounterfactualDeploymentFailedError=Ge.ContractFunctionZeroDataError=Ge.ContractFunctionRevertedError=Ge.ContractFunctionExecutionError=Ge.CallExecutionError=void 0;const e=Ie(),r=$u(),n=Do(),t=Qt(),o=cg(),s=tr(),i=Vo(),a=Jr(),c=Se(),u=de(),l=cf(),f=nt(),m=xt();class y extends u.BaseError{constructor(d,{account:w,docsPath:E,chain:p,data:S,gas:A,gasPrice:T,maxFeePerGas:C,maxPriorityFeePerGas:R,nonce:I,to:x,value:F,stateOverride:H}){var B;const j=w?(0,e.parseAccount)(w):void 0;let k=(0,f.prettyPrint)({from:j==null?void 0:j.address,to:x,value:typeof F<"u"&&`${(0,i.formatEther)(F)} ${((B=p==null?void 0:p.nativeCurrency)==null?void 0:B.symbol)||"ETH"}`,data:S,gas:A,gasPrice:typeof T<"u"&&`${(0,a.formatGwei)(T)} gwei`,maxFeePerGas:typeof C<"u"&&`${(0,a.formatGwei)(C)} gwei`,maxPriorityFeePerGas:typeof R<"u"&&`${(0,a.formatGwei)(R)} gwei`,nonce:I});H&&(k+=` 34${(0,l.prettyStateOverride)(H)}`),super(d.shortMessage,{cause:d,docsPath:E,metaMessages:[...d.metaMessages?[...d.metaMessages," "]:[],"Raw Call Arguments:",k].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=d}}Ge.CallExecutionError=y;class h extends u.BaseError{constructor(d,{abi:w,args:E,contractAddress:p,docsPath:S,functionName:A,sender:T}){const C=(0,s.getAbiItem)({abi:w,args:E,name:A}),R=C?(0,o.formatAbiItemWithArgs)({abiItem:C,args:E,includeFunctionName:!1,includeName:!1}):void 0,I=C?(0,t.formatAbiItem)(C,{includeName:!0}):void 0,x=(0,f.prettyPrint)({address:p&&(0,m.getContractAddress)(p),function:I,args:R&&R!=="()"&&`${[...Array((A==null?void 0:A.length)??0).keys()].map(()=>" ").join("")}${R}`,sender:T});super(d.shortMessage||`An unknown error occurred while executing the contract function "${A}".`,{cause:d,docsPath:S,metaMessages:[...d.metaMessages?[...d.metaMessages," "]:[],x&&"Contract Call:",x].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=w,this.args=E,this.cause=d,this.contractAddress=p,this.functionName=A,this.sender=T}}Ge.ContractFunctionExecutionError=h;class b extends u.BaseError{constructor({abi:d,data:w,functionName:E,message:p,cause:S}){let A,T,C,R;if(w&&w!=="0x")try{T=(0,n.decodeErrorResult)({abi:d,data:w,cause:S});const{abiItem:x,errorName:F,args:H}=T;if(F==="Error")R=H[0];else if(F==="Panic"){const[j]=H;R=r.panicReasons[j]}else{const j=x?(0,t.formatAbiItem)(x,{includeName:!0}):void 0,k=x&&H?(0,o.formatAbiItemWithArgs)({abiItem:x,args:H,includeFunctionName:!1,includeName:!1}):void 0;C=[j?`Error: ${j}`:"",k&&k!=="()"?` ${[...Array((F==null?void 0:F.length)??0).keys()].map(()=>" ").join("")}${k}`:""]}}catch(x){A=x}else p&&(R=p);let I;A instanceof c.AbiErrorSignatureNotFoundError&&(I=A.signature,C=[`Unable to decode signature "${I}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${I}.`]),super(R&&R!=="execution reverted"||I?[`The contract function "${E}" reverted with the following ${I?"signature":"reason"}:`,R||I].join(` 35`):`The contract function "${E}" reverted.`,{cause:A??S,metaMessages:C,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=T,this.raw=w,this.reason=R,this.signature=I}}Ge.ContractFunctionRevertedError=b;class v extends u.BaseError{constructor({functionName:d,cause:w}){super(`The contract function "${d}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${d}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:w}
35)}}Ge.ContractFunctionZeroDataError=v;class g extends u.BaseError{constructor({factory:d}){super(`Deployment for counterfactual contract call failed${d?` for factory "${d}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}Ge.CounterfactualDeploymentFailedError=g;class _ extends u.BaseError{constructor({data:d,message:w}){super(w||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=d}}return Ge.RawContractError=_,Ge}var st={},K0;function pt(){if(K0)return st;K0=1,Object.defineProperty(st,"__esModule",{value:!0}),st.TimeoutError=st.SocketClosedError=st.RpcRequestError=st.WebSocketRequestError=st.HttpRequestError=void 0;const e=Fe(),r=de(),n=xt();class t extends r.BaseError{constructor({body:u,cause:l,details:f,headers:m,status:y,url:h}){super("HTTP request failed.",{cause:l,details:f,metaMessages:[y&&`Status: ${y}`,`URL: ${(0,n.getUrl)(h)}`,u&&`Request body: ${(0,e.stringify)(u)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=u,this.headers=m,this.status=y,this.url=h}}st.HttpRequestError=t;class o extends r.BaseError{constructor({body:u,cause:l,details:f,url:m}){super("WebSocket request failed.",{cause:l,details:f,metaMessages:[`URL: ${(0,n.getUrl)(m)}`,u&&`Request body: ${(0,e.stringify)(u)}`].filter(Boolean),name:"WebSocketRequestError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=m}}st.WebSocketRequestError=o;class s extends r.BaseError{constructor({body:u,error:l,url:f}){super("RPC Request failed.",{cause:l,details:l.message,metaMessages:[`URL: ${(0,n.getUrl)(f)}`,`Request body: ${(0,e.stringify)(u)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=l.code,this.data=l.data,this.url=f}}st.RpcRequestError=s;class i extends r.BaseError{constructor({url:u}={}){super("The socket has been closed.",{metaMessages:[u&&`URL: ${(0,n.getUrl)(u)}`].filter(Boolean),name:"SocketClosedError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=u}}st.SocketClosedError=i;class a extends r.BaseError{constructor({body:u,url:l}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,n.getUrl)(l)}`,`Request body: ${(0,e.stringify)(u)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=l}}return st.TimeoutError=a,st}var ie={},Z0;function gr(){if(Z0)return ie;Z0=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.UnknownRpcError=ie.WalletConnectSessionSettlementError=ie.AtomicityNotSupportedError=ie.AtomicReadyWalletRejectedUpgradeError=ie.BundleTooLargeError=ie.UnknownBundleIdError=ie.DuplicateIdError=ie.UnsupportedChainIdError=ie.UnsupportedNonOptionalCapabilityError=ie.SwitchChainError=ie.ChainDisconnectedError=ie.ProviderDisconnectedError=ie.UnsupportedProviderMethodError=ie.UnauthorizedProviderError=ie.UserRejectedRequestError=ie.JsonRpcVersionUnsupportedError=ie.LimitExceededRpcError=ie.MethodNotSupportedRpcError=ie.TransactionRejectedRpcError=ie.ResourceUnavailableRpcError=ie.ResourceNotFoundRpcError=ie.InvalidInputRpcError=ie.InternalRpcError=ie.InvalidParamsRpcError=ie.MethodNotFoundRpcError=ie.InvalidRequestRpcError=ie.ParseRpcError=ie.ProviderRpcError=ie.RpcError=void 0;const e=de(),r=pt(),n=-1;class t extends e.BaseError{constructor(j,{code:k,docsPath:B,metaMessages:O,name:q,shortMessage:M}){super(M,{cause:j,docsPath:B,metaMessages:O||(j==null?void 0:j.metaMessages),name:q||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}
35),this.name=q||j.name,this.code=j instanceof r.RpcRequestError?j.code:k??n}}ie.RpcError=t;class o extends t{constructor(j,k){super(j,k),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=k.data}}ie.ProviderRpcError=o;class s extends t{constructor(j){super(j,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}ie.ParseRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class i extends t{constructor(j){super(j,{code:i.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}ie.InvalidRequestRpcError=i,Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class a extends t{constructor(j,{method:k}={}){super(j,{code:a.code,name:"MethodNotFoundRpcError",shortMessage:`The method${k?` "${k}"`:""} does not exist / is not available.`})}}ie.MethodNotFoundRpcError=a,Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class c extends t{constructor(j){super(j,{code:c.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` 36`)})}}ie.InvalidParamsRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class u extends t{constructor(j){super(j,{code:u.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}ie.InternalRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class l extends t{constructor(j){super(j,{code:l.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` 37`)})}}ie.InvalidInputRpcError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends t{constructor(j){super(j,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}ie.ResourceNotFoundRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class m extends t{constructor(j){super(j,{code:m.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}ie.ResourceUnavailableRpcError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class y extends t{constructor(j){super(j,{code:y.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}ie.TransactionRejectedRpcError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class h extends t{constructor(j,{method:k}={}){super(j,{code:h.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${k?` "${k}"`:""} is not supported.`})}}ie.MethodNotSupportedRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class b extends t{constructor(j){super(j,{code:b.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}ie.LimitExceededRpcError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class v extends t{constructor(j){super(j,{code:v.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}ie.JsonRpcVersionUnsupportedError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class g extends o{constructor(j){super(j,{code:g.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}ie.UserRejectedRequestError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class _ extends o{constructor(j){super(j,{code:_.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}ie.UnauthorizedProviderError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class P extends o{constructor(j,{method:k}={}){super(j,{code:P.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${k?` " ${k}"`:""}.`})}}ie.UnsupportedProviderMethodError=P,Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class d extends o{constructor(j){super(j,{code:d.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}ie.ProviderDisconnectedError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class w extends o{constructor(j){super(j,{code:w.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}ie.ChainDisconnectedError=w,Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class E extends o{constructor(j){super(j,{code:E.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}ie.SwitchChainError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class p extends o{constructor(j){super(j,{code:p.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}ie.UnsupportedNonOptionalCapabilityError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class S extends o{constructor(j){super(j,{code:S.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}ie.UnsupportedChainIdError=S,Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class A extends o{constructor(j){super(j,{code:A.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}ie.DuplicateIdError=A,Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class T extends o{constructor(j){super(j,{code:T.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}ie.UnknownBundleIdError=T,Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class C extends o{constructor(j){super(j,{code:C.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}ie.BundleTooLargeError=C,Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class R extends o{constructor(j){super(j,{code:R.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}ie.AtomicReadyWalletRejectedUpgradeError=R,Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750}
37);class I extends o{constructor(j){super(j,{code:I.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}ie.AtomicityNotSupportedError=I,Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class x extends o{constructor(j){super(j,{code:x.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}ie.WalletConnectSessionSettlementError=x,Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class F extends t{constructor(j){super(j,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}return ie.UnknownRpcError=F,ie}var J0;function _r(){if(J0)return Ui;J0=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.getContractError=i;const e=Se(),r=de(),n=pr(),t=pt(),o=gr(),s=3;function i(a,{abi:c,address:u,args:l,docsPath:f,functionName:m,sender:y}){const h=a instanceof n.RawContractError?a:a instanceof r.BaseError?a.walk(w=>"data"in w)||a.walk():{},{code:b,data:v,details:g,message:_,shortMessage:P}=h,d=a instanceof e.AbiDecodingZeroDataError?new n.ContractFunctionZeroDataError({functionName:m,cause:a}):[s,o.InternalRpcError.code].includes(b)&&(v||g||_||P)||b===o.InvalidInputRpcError.code&&g==="execution reverted"&&v?new n.ContractFunctionRevertedError({abi:c,data:typeof v=="object"?v.data:v,functionName:m,message:h instanceof t.RpcRequestError?g:P??_,cause:a}):a;return new n.ContractFunctionExecutionError(d,{abi:c,args:l,contractAddress:u,docsPath:f,functionName:m,sender:y})}return Ui}var Ji={},Yi={},Xi={},Qi={},Y0;function ug(){if(Y0)return Qi;Y0=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.publicKeyToAddress=n;const e=Je(),r=tt();function n(t){const o=(0,r.keccak256)(`0x${t.substring(4)}`).substring(26);return(0,e.checksumAddress)(`0x${o}`)}return Qi}var ea={},Cd={},_e={},ze={},X0;function dg(){if(X0)return ze;X0=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.SHA512_IV=ze.SHA384_IV=ze.SHA224_IV=ze.SHA256_IV=ze.HashMD=void 0,ze.setBigUint64=r,ze.Chi=n,ze.Maj=t;const e=hr();function r(s,i,a,c){if(typeof s.setBigUint64=="function")return s.setBigUint64(i,a,c);const u=BigInt(32),l=BigInt(4294967295),f=Number(a>>u&l),m=Number(a&l),y=c?4:0,h=c?0:4;s.setUint32(i+y,f,c),s.setUint32(i+h,m,c)}function n(s,i,a){return s&i^~s&a}function t(s,i,a){return s&i^s&a^i&a}class o extends e.Hash{constructor(i,a,c,u){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=i,this.outputLen=a,this.padOffset=c,this.isLE=u,this.buffer=new Uint8Array(i),this.view=(0,e.createView)(this.buffer)}update(i){(0,e.aexists)(this),i=(0,e.toBytes)(i),(0,e.abytes)(i);const{view:a,buffer:c,blockLen:u}=this,l=i.length;for(let f=0;f<l;){const m=Math.min(u-this.pos,l-f);if(m===u){const y=(0,e.createView)(i);for(;u<=l-f;f+=u)this.process(y,f);continue}c.set(i.subarray(f,f+m),this.pos),this.pos+=m,f+=m,this.pos===u&&(this.process(a,0),this.pos=0)}return this.length+=i.length,this.roundClean(),this}digestInto(i){(0,e.aexists)(this),(0,e.aoutput)(i,this),this.finished=!0;const{buffer:a,view:c,blockLen:u,isLE:l}=this;let{pos:f}=this;a[f++]=128,(0,e.clean)(this.buffer.subarray(f)),this.padOffset>u-f&&(this.process(c,0),f=0);for(let v=f;v<u;v++)a[v]=0;r(c,u-8,BigInt(this.length*8),l),this.process(c,0);const m=(0,e.createView)(i),y=this.outputLen;if(y%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=y/4,b=this.get();if(h>b.length)throw new Error("_sha2: outputLen bigger than state");for(let v=0;v<h;v++)m.setUint32(4*v,b[v],l)}digest(){const{buffer:i,outputLen:a}=this;this.digestInto(i);const c=i.slice(0,a);return this.destroy(),c}_cloneInto(i){i||(i=new this.constructor),i.set(...this.get());const{blockLen:a,buffer:c,length:u,finished:l,destroyed:f,pos:m}=this;return i.destroyed=f,i.finished=l,i.length=u,i.pos=m,u%a&&i.buffer.set(c),i}clone(){return this._cloneInto()}}return ze.HashMD=o,ze.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ze.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),ze.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ze.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),ze}var Q0;function fg(){if(Q0)return _e;
37Q0=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.sha512_224=_e.sha512_256=_e.sha384=_e.sha512=_e.sha224=_e.sha256=_e.SHA512_256=_e.SHA512_224=_e.SHA384=_e.SHA512=_e.SHA224=_e.SHA256=void 0;const e=dg(),r=og(),n=hr(),t=Uint32Array.from([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]),o=new Uint32Array(64);class s extends e.HashMD{constructor(P=32){super(64,P,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:P,B:d,C:w,D:E,E:p,F:S,G:A,H:T}=this;return[P,d,w,E,p,S,A,T]}set(P,d,w,E,p,S,A,T){this.A=P|0,this.B=d|0,this.C=w|0,this.D=E|0,this.E=p|0,this.F=S|0,this.G=A|0,this.H=T|0}process(P,d){for(let I=0;I<16;I++,d+=4)o[I]=P.getUint32(d,!1);for(let I=16;I<64;I++){const x=o[I-15],F=o[I-2],H=(0,n.rotr)(x,7)^(0,n.rotr)(x,18)^x>>>3,j=(0,n.rotr)(F,17)^(0,n.rotr)(F,19)^F>>>10;o[I]=j+o[I-7]+H+o[I-16]|0}let{A:w,B:E,C:p,D:S,E:A,F:T,G:C,H:R}=this;for(let I=0;I<64;I++){const x=(0,n.rotr)(A,6)^(0,n.rotr)(A,11)^(0,n.rotr)(A,25),F=R+x+(0,e.Chi)(A,T,C)+t[I]+o[I]|0,j=((0,n.rotr)(w,2)^(0,n.rotr)(w,13)^(0,n.rotr)(w,22))+(0,e.Maj)(w,E,p)|0;R=C,C=T,T=A,A=S+F|0,S=p,p=E,E=w,w=F+j|0}w=w+this.A|0,E=E+this.B|0,p=p+this.C|0,S=S+this.D|0,A=A+this.E|0,T=T+this.F|0,C=C+this.G|0,R=R+this.H|0,this.set(w,E,p,S,A,T,C,R)}roundClean(){(0,n.clean)(o)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.clean)(this.buffer)}}_e.SHA256=s;class i extends s{constructor(){super(28),this.A=e.SHA224_IV[0]|0,this.B=e.SHA224_IV[1]|0,this.C=e.SHA224_IV[2]|0,this.D=e.SHA224_IV[3]|0,this.E=e.SHA224_IV[4]|0,this.F=e.SHA224_IV[5]|0,this.G=e.SHA224_IV[6]|0,this.H=e.SHA224_IV[7]|0}}_e.SHA224=i;const a=r.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
375771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(_=>BigInt(_))),c=a[0],u=a[1],l=new Uint32Array(80),f=new Uint32Array(80);class m extends e.HashMD{constructor(P=64){super(128,P,16,!1),this.Ah=e.SHA512_IV[0]|0,this.Al=e.SHA512_IV[1]|0,this.Bh=e.SHA512_IV[2]|0,this.Bl=e.SHA512_IV[3]|0,this.Ch=e.SHA512_IV[4]|0,this.Cl=e.SHA512_IV[5]|0,this.Dh=e.SHA512_IV[6]|0,this.Dl=e.SHA512_IV[7]|0,this.Eh=e.SHA512_IV[8]|0,this.El=e.SHA512_IV[9]|0,this.Fh=e.SHA512_IV[10]|0,this.Fl=e.SHA512_IV[11]|0,this.Gh=e.SHA512_IV[12]|0,this.Gl=e.SHA512_IV[13]|0,this.Hh=e.SHA512_IV[14]|0,this.Hl=e.SHA512_IV[15]|0}get(){const{Ah:P,Al:d,Bh:w,Bl:E,Ch:p,Cl:S,Dh:A,Dl:T,Eh:C,El:R,Fh:I,Fl:x,Gh:F,Gl:H,Hh:j,Hl:k}=this;return[P,d,w,E,p,S,A,T,C,R,I,x,F,H,j,k]}set(P,d,w,E,p,S,A,T,C,R,I,x,F,H,j,k){this.Ah=P|0,this.Al=d|0,this.Bh=w|0,this.Bl=E|0,this.Ch=p|0,this.Cl=S|0,this.Dh=A|0,this.Dl=T|0,this.Eh=C|0,this.El=R|0,this.Fh=I|0,this.Fl=x|0,this.Gh=F|0,this.Gl=H|0,this.Hh=j|0,this.Hl=k|0}process(P,d){for(let q=0;q<16;q++,d+=4)l[q]=P.getUint32(d),f[q]=P.getUint32(d+=4);for(let q=16;q<80;q++){const M=l[q-15]|0,N=f[q-15]|0,z=r.rotrSH(M,N,1)^r.rotrSH(M,N,8)^r.shrSH(M,N,7),$=r.rotrSL(M,N,1)^r.rotrSL(M,N,8)^r.shrSL(M,N,7),U=l[q-2]|0,G=f[q-2]|0,J=r.rotrSH(U,G,19)^r.rotrBH(U,G,61)^r.shrSH(U,G,6),W=r.rotrSL(U,G,19)^r.rotrBL(U,G,61)^r.shrSL(U,G,6),V=r.add4L($,W,f[q-7],f[q-16]),Y=r.add4H(V,z,J,l[q-7],l[q-16]);l[q]=Y|0,f[q]=V|0}let{Ah:w,Al:E,Bh:p,Bl:S,Ch:A,Cl:T,Dh:C,Dl:R,Eh:I,El:x,Fh:F,Fl:H,Gh:j,Gl:k,Hh:B,Hl:O}=this;for(let q=0;q<80;q++){const M=r.rotrSH(I,x,14)^r.rotrSH(I,x,18)^r.rotrBH(I,x,41),N=r.rotrSL(I,x,14)^r.rotrSL(I,x,18)^r.rotrBL(I,x,41),z=I&F^~I&j,$=x&H^~x&k,U=r.add5L(O,N,$,u[q],f[q]),G=r.add5H(U,B,M,z,c[q],l[q]),J=U|0,W=r.rotrSH(w,E,28)^r.rotrBH(w,E,34)^r.rotrBH(w,E,39),V=r.rotrSL(w,E,28)^r.rotrBL(w,E,34)^r.rotrBL(w,E,39),Y=w&p^w&A^p&A,te=E&S^E&T^S&T;B=j|0,O=k|0,j=F|0,k=H|0,F=I|0,H=x|0,{h:I,l:x}=r.add(C|0,R|0,G|0,J|0),C=A|0,R=T|0,A=p|0,T=S|0,p=w|0,S=E|0;const Z=r.add3L(J,V,te);w=r.add3H(Z,G,W,Y),E=Z|0}({h:w,l:E}=r.add(this.Ah|0,this.Al|0,w|0,E|0)),{h:p,l:S}=r.add(this.Bh|0,this.Bl|0,p|0,S|0),{h:A,l:T}=r.add(this.Ch|0,this.Cl|0,A|0,T|0),{h:C,l:R}=r.add(this.Dh|0,this.Dl|0,C|0,R|0),{h:I,l:x}=r.add(this.Eh|0,this.El|0,I|0,x|0),{h:F,l:H}=r.add(this.Fh|0,this.Fl|0,F|0,H|0),{h:j,l:k}=r.add(this.Gh|0,this.Gl|0,j|0,k|0),{h:B,l:O}=r.add(this.Hh|0,this.Hl|0,B|0,O|0),this.set(w,E,p,S,A,T,C,R,I,x,F,H,j,k,B,O)}roundClean(){(0,n.clean)(l,f)}destroy(){(0,n.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}_e.SHA512=m;class y extends m{constructor(){super(48),this.Ah=e.SHA384_IV[0]|0,this.Al=e.SHA384_IV[1]|0,this.Bh=e.SHA384_IV[2]|0,this.Bl=e.SHA384_IV[3]|0,this.Ch=e.SHA384_IV[4]|0,this.Cl=e.SHA384_IV[5]|0,this.Dh=e.SHA384_IV[6]|0,this.Dl=e.SHA384_IV[7]|0,this.Eh=e.SHA384_IV[8]|0,this.El=e.SHA384_IV[9]|0,this.Fh=e.SHA384_IV[10]|0,this.Fl=e.SHA384_IV[11]|0,this.Gh=e.SHA384_IV[12]|0,this.Gl=e.SHA384_IV[13]|0,this.Hh=e.SHA384_IV[14]|0,this.Hl=e.SHA384_IV[15]|0}}_e.SHA384=y;const h=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),b=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class v extends m{constructor(){super(28),this.Ah=h[0]|0,this.Al=h[1]|0,this.Bh=h[2]|0,this.Bl=h[3]|0,this.Ch=h[4]|0,this.Cl=h[5]|0,this.Dh=h[6]|0,this.Dl=h[7]|0,this.Eh=h[8]|0,this.El=h[9]|0,this.Fh=h[10]|0,this.Fl=h[11]|0,this.Gh=h[12]|0,this.Gl=h[13]|0,this.Hh=h[14]|0,this.Hl=h[15]|0}}_e.SHA512_224=v;class g extends m{constructor(){super(32),this.Ah=b[0]|0,this.Al=b[1]|0,this.Bh=b[2]|0,this.Bl=b[3]|0,this.Ch=b[4]|0,this.Cl=b[5]|0,this.Dh=b[6]|0,this.Dl=b[7]|0,this.Eh=b[8]|0,this.El=b[9]|0,this.Fh=b[10]|0,this.Fl=b[11]|0,this.Gh=b[12]|0,this.Gl=b[13]|0,this.Hh=b[14]|0,this.Hl=b[15]|0}}return _e.SHA512_256=g,_e.sha256=(0,n.createHasher)(()=>new s),_e.sha224=(0,n.createHasher)(()=>new i),_e.sha512=(0,n.createHasher)(()=>new m),_e.sha384=(0,n.createHasher)(()=>new y),_e.sha512_256=(0,n.createHasher)(()=>new g),_e.sha512_224=(0,n.createHasher)(()=>new v),_e}var fo={},xd={},e1;function lg(){return e1||(e1=1,(function(e){Object.defineProperty(e,"__esMo
37dule",{value:!0}),e.hmac=e.HMAC=void 0;const r=hr();class n extends r.Hash{constructor(s,i){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(s);const a=(0,r.toBytes)(i);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const c=this.blockLen,u=new Uint8Array(c);u.set(a.length>c?s.create().update(a).digest():a);for(let l=0;l<u.length;l++)u[l]^=54;this.iHash.update(u),this.oHash=s.create();for(let l=0;l<u.length;l++)u[l]^=106;this.oHash.update(u),(0,r.clean)(u)}update(s){return(0,r.aexists)(this),this.iHash.update(s),this}digestInto(s){(0,r.aexists)(this),(0,r.abytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:i,iHash:a,finished:c,destroyed:u,blockLen:l,outputLen:f}=this;return s=s,s.finished=c,s.destroyed=u,s.blockLen=l,s.outputLen=f,s.oHash=i._cloneInto(s.oHash),s.iHash=a._cloneInto(s.iHash),s}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const t=(o,s,i)=>new n(o,s).update(i).digest();e.hmac=t,e.hmac.create=(o,s)=>new n(o,s)})(xd)),xd}var qd={},qr={},Pe={},ye={},t1;function Yr(){if(t1)return ye;t1=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(ye,"__esModule",{value:!0}),ye.notImplemented=ye.bitMask=void 0,ye.isBytes=n,ye.abytes=t,ye.abool=o,ye.numberToHexUnpadded=s,ye.hexToNumber=i,ye.bytesToHex=u,ye.hexToBytes=m,ye.bytesToNumberBE=y,ye.bytesToNumberLE=h,ye.numberToBytesBE=b,ye.numberToBytesLE=v,ye.numberToVarBytesBE=g,ye.ensureBytes=_,ye.concatBytes=P,ye.equalBytes=d,ye.utf8ToBytes=w,ye.inRange=p,ye.aInRange=S,ye.bitLen=A,ye.bitGet=T,ye.bitSet=C,ye.createHmacDrbg=F,ye.validateObject=j,ye.memoized=B;const e=BigInt(0),r=BigInt(1);function n(O){return O instanceof Uint8Array||ArrayBuffer.isView(O)&&O.constructor.name==="Uint8Array"}function t(O){if(!n(O))throw new Error("Uint8Array expected")}function o(O,q){if(typeof q!="boolean")throw new Error(O+" boolean expected, got "+q)}function s(O){const q=O.toString(16);return q.length&1?"0"+q:q}function i(O){if(typeof O!="string")throw new Error("hex string expected, got "+typeof O);return O===""?e:BigInt("0x"+O)}const a=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",c=Array.from({length:256},(O,q)=>q.toString(16).padStart(2,"0"));function u(O){if(t(O),a)return O.toHex();let q="";for(let M=0;M<O.length;M++)q+=c[O[M]];return q}const l={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(O){if(O>=l._0&&O<=l._9)return O-l._0;if(O>=l.A&&O<=l.F)return O-(l.A-10);if(O>=l.a&&O<=l.f)return O-(l.a-10)}function m(O){if(typeof O!="string")throw new Error("hex string expected, got "+typeof O);if(a)return Uint8Array.fromHex(O);const q=O.length,M=q/2;if(q%2)throw new Error("hex string expected, got unpadded hex of length "+q);const N=new Uint8Array(M);for(let z=0,$=0;z<M;z++,$+=2){const U=f(O.charCodeAt($)),G=f(O.charCodeAt($+1));if(U===void 0||G===void 0){const J=O[$]+O[$+1];throw new Error('hex string expected, got non-hex character "'+J+'" at index '+$)}N[z]=U*16+G}return N}function y(O){return i(u(O))}function h(O){return t(O),i(u(Uint8Array.from(O).reverse()))}function b(O,q){return m(O.toString(16).padStart(q*2,"0"))}function v(O,q){return b(O,q).reverse()}function g(O){return m(s(O))}function _(O,q,M){let N;if(typeof q=="string")try{N=m(q)}catch($){throw new Error(O+" must be hex string or Uint8Array, cause: "+$)}else if(n(q))N=Uint8Array.from(q);else throw new Error(O+" must be hex string or Uint8Array");const z=N.length;if(typeof M=="number"&&z!==M)throw new Error(O+" of length "+M+" expected, got "+z);return N}function P(...O){let q=0;for(let N=0;N<O.length;N++){const z=O[N];t(z),q+=z.length}const M=new Uint8Array(q);for(let N=0,z=0;N<O.length;N++){const $=O[N];M.set($,z),z+=$.length}return M}function d(O,q){if(O.length!==q.length)return!1;let M=0;for(let N=0;N<O.length;N++)M|=O[N]^q[N];return M===0}function w(O){if(typeof O!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(O))}const E=O=>typeof O=="bigint"&&e<=O;
37function p(O,q,M){return E(O)&&E(q)&&E(M)&&q<=O&&O<M}function S(O,q,M,N){if(!p(q,M,N))throw new Error("expected valid "+O+": "+M+" <= n < "+N+", got "+q)}function A(O){let q;for(q=0;O>e;O>>=r,q+=1);return q}function T(O,q){return O>>BigInt(q)&r}function C(O,q,M){return O|(M?r:e)<<BigInt(q)}const R=O=>(r<<BigInt(O))-r;ye.bitMask=R;const I=O=>new Uint8Array(O),x=O=>Uint8Array.from(O);function F(O,q,M){if(typeof O!="number"||O<2)throw new Error("hashLen must be a number");if(typeof q!="number"||q<2)throw new Error("qByteLen must be a number");if(typeof M!="function")throw new Error("hmacFn must be a function");let N=I(O),z=I(O),$=0;const U=()=>{N.fill(1),z.fill(0),$=0},G=(...Y)=>M(z,N,...Y),J=(Y=I(0))=>{z=G(x([0]),Y),N=G(),Y.length!==0&&(z=G(x([1]),Y),N=G())},W=()=>{if($++>=1e3)throw new Error("drbg: tried 1000 values");let Y=0;const te=[];for(;Y<q;){N=G();const Z=N.slice();te.push(Z),Y+=N.length}return P(...te)};return(Y,te)=>{U(),J(Y);let Z;for(;!(Z=te(W()));)J();return U(),Z}}const H={bigint:O=>typeof O=="bigint",function:O=>typeof O=="function",boolean:O=>typeof O=="boolean",string:O=>typeof O=="string",stringOrUint8Array:O=>typeof O=="string"||n(O),isSafeInteger:O=>Number.isSafeInteger(O),array:O=>Array.isArray(O),field:(O,q)=>q.Fp.isValid(O),hash:O=>typeof O=="function"&&Number.isSafeInteger(O.outputLen)};function j(O,q,M={}){const N=(z,$,U)=>{const G=H[$];if(typeof G!="function")throw new Error("invalid validator function");const J=O[z];if(!(U&&J===void 0)&&!G(J,O))throw new Error("param "+String(z)+" is invalid. Expected "+$+", got "+J)};for(const[z,$]of Object.entries(q))N(z,$,!1);for(const[z,$]of Object.entries(M))N(z,$,!0);return O}const k=()=>{throw new Error("not implemented")};ye.notImplemented=k;function B(O){const q=new WeakMap;return(M,...N)=>{const z=q.get(M);if(z!==void 0)return z;const $=O(M,...N);return q.set(M,$),$}}return ye}var r1;
37function Uu(){if(r1)return Pe;r1=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.isNegativeLE=void 0,Pe.mod=u,Pe.pow=l,Pe.pow2=f,Pe.invert=m,Pe.tonelliShanks=b,Pe.FpSqrt=v,Pe.validateField=P,Pe.FpPow=d,Pe.FpInvertBatch=w,Pe.FpDiv=E,Pe.FpLegendre=p,Pe.FpIsSquare=S,Pe.nLength=A,Pe.Field=T,Pe.FpSqrtOdd=C,Pe.FpSqrtEven=R,Pe.hashToPrivateScalar=I,Pe.getFieldBytesLength=x,Pe.getMinHashLength=F,Pe.mapHashToField=H;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=hr(),r=Yr(),n=BigInt(0),t=BigInt(1),o=BigInt(2),s=BigInt(3),i=BigInt(4),a=BigInt(5),c=BigInt(8);function u(j,k){const B=j%k;return B>=n?B:k+B}function l(j,k,B){return d(T(B),j,k)}function f(j,k,B){let O=j;for(;k-- >n;)O*=O,O%=B;return O}function m(j,k){if(j===n)throw new Error("invert: expected non-zero number");if(k<=n)throw new Error("invert: expected positive modulus, got "+k);let B=u(j,k),O=k,q=n,M=t;for(;B!==n;){const z=O/B,$=O%B,U=q-M*z;O=B,B=$,q=M,M=U}if(O!==t)throw new Error("invert: does not exist");return u(q,k)}function y(j,k){const B=(j.ORDER+t)/i,O=j.pow(k,B);if(!j.eql(j.sqr(O),k))throw new Error("Cannot find square root");return O}function h(j,k){const B=(j.ORDER-a)/c,O=j.mul(k,o),q=j.pow(O,B),M=j.mul(k,q),N=j.mul(j.mul(M,o),q),z=j.mul(M,j.sub(N,j.ONE));if(!j.eql(j.sqr(z),k))throw new Error("Cannot find square root");return z}function b(j){if(j<BigInt(3))throw new Error("sqrt is not defined for small field");let k=j-t,B=0;for(;k%o===n;)k/=o,B++;let O=o;const q=T(j);for(;p(q,O)===1;)if(O++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(B===1)return y;let M=q.pow(O,k);const N=(k+t)/o;return function($,U){if($.is0(U))return U;if(p($,U)!==1)throw new Error("Cannot find square root");let G=B,J=$.mul($.ONE,M),W=$.pow(U,k),V=$.pow(U,N);for(;!$.eql(W,$.ONE);){if($.is0(W))return $.ZERO;let Y=1,te=$.sqr(W);for(;!$.eql(te,$.ONE);)if(Y++,te=$.sqr(te),Y===G)throw new Error("Cannot find square root");const Z=t<<BigInt(G-Y-1),X=$.pow(J,Z);G=Y,J=$.sqr(X),W=$.mul(W,J),V=$.mul(V,X)}return V}}function v(j){return j%i===s?y:j%c===a?h:b(j)}const g=(j,k)=>(u(j,k)&t)===t;Pe.isNegativeLE=g;const _=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function P(j){const k={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},B=_.reduce((O,q)=>(O[q]="function",O),k);return(0,r.validateObject)(j,B)}function d(j,k,B){if(B<n)throw new Error("invalid exponent, negatives unsupported");if(B===n)return j.ONE;if(B===t)return k;let O=j.ONE,q=k;for(;B>n;)B&t&&(O=j.mul(O,q)),q=j.sqr(q),B>>=t;return O}function w(j,k,B=!1){const O=new Array(k.length).fill(B?j.ZERO:void 0),q=k.reduce((N,z,$)=>j.is0(z)?N:(O[$]=N,j.mul(N,z)),j.ONE),M=j.inv(q);return k.reduceRight((N,z,$)=>j.is0(z)?N:(O[$]=j.mul(N,O[$]),j.mul(N,z)),M),O}function E(j,k,B){return j.mul(k,typeof B=="bigint"?m(B,j.ORDER):j.inv(B))}function p(j,k){const B=(j.ORDER-t)/o,O=j.pow(k,B),q=j.eql(O,j.ONE),M=j.eql(O,j.ZERO),N=j.eql(O,j.neg(j.ONE));if(!q&&!M&&!N)throw new Error("invalid Legendre symbol result");return q?1:M?0:-1}function S(j,k){return p(j,k)===1}function A(j,k){k!==void 0&&(0,e.anumber)(k);const B=k!==void 0?k:j.toString(2).length,O=Math.ceil(B/8);return{nBitLength:B,nByteLength:O}}function T(j,k,B=!1,O={}){if(j<=n)throw new Error("invalid field: expected ORDER > 0, got "+j);const{nBitLength:q,nByteLength:M}=A(j,k);if(M>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let N;const z=Object.freeze({ORDER:j,isLE:B,BITS:q,BYTES:M,MASK:(0,r.bitMask)(q),ZERO:n,ONE:t,create:$=>u($,j),isValid:$=>{if(typeof $!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof $);return n<=$&&$<j},is0:$=>$===n,isOdd:$=>($&t)===t,neg:$=>u(-$,j),eql:($,U)=>$===U,sqr:$=>u($*$,j),add:($,U)=>u($+U,j),sub:($,U)=>u($-U,j),mul:($,U)=>u($*U,j),pow:($,U)=>d(z,$,U),div:($,U)=>u($*m(U,j),j),sqrN:$=>$*$,addN:($,U)=>$+U,subN:($,U)=>$-U,mulN:($,U)=>$*U,inv:$=>m($,j),sqrt:O.sqrt||($=>(N||(N=v(j)),N(z,$))),toBytes:$=>B?(0,r.numberToBytesLE)($,M):(0,r.numberToBytesBE)($,M),fromBytes:$=>{if($.length!==M)throw new Error("Field.fromBytes: expected "+M+" bytes, got "+$.length);return B?(0,r.bytesToNumberLE)($):(0,r.bytesToNumberBE)($)},invertBatch:$=>w(z,$),cmov:($,U,G)=>G?U:$});return Object.freeze(z)}function C(j,k){if(!j.isOdd)throw new Error("Field doesn't have isOdd");const B=j.sqrt(k);return j.isOdd(B)?B:j.neg(B)}function R(j,k){if(!j.isOdd)throw new Error("Field doesn't have isOdd");const B=j.sqrt(k);return j.isOdd(B)?j.neg(B):B}function I(j,k,B=!1){j=(0,r.ensureBytes)("privateHash",j);const O=j.length,q=A(k).nByteLength+8;if(q<24||O<q||O>1024)throw new Error("hashToPrivateScalar: expected "+q+"-1024 bytes of input, got "+O);const M=B?(0,r.bytesToNumberLE)(j):(0,r.bytesToNumberBE)(j);return u(M,k-t)+t}function x(j){if(typeof j!="bigint")throw new Error("field order must be bigint");const k=j.toString(2).length;return Math.ceil(k/8)}function F(j){const k=x(j);return k+Math.ceil(k/2)}function H(j,k,B=!1){const O=j.length,q=x(k),M=F(k);if(O<16||O<M||O>1024)throw new Error("expected "+M+"-1024 bytes of input, got "+O);const N=B?(0,r.bytesToNumberLE)(j):(0,r.bytesToNumberBE)(j),z=u(N,k-t)+t;return B?(0,r.numberToBytesLE)(z,q):(0,r.numberToBytesBE)(z,q)}return Pe}var n1;function Wv(){if(n1)return qr;
37n1=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.wNAF=y,qr.pippenger=h,qr.precomputeMSMUnsafe=b,qr.validateBasic=v;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Uu(),r=Yr(),n=BigInt(0),t=BigInt(1);function o(g,_){const P=_.negate();return g?P:_}function s(g,_){if(!Number.isSafeInteger(g)||g<=0||g>_)throw new Error("invalid window size, expected [1.."+_+"], got W="+g)}function i(g,_){s(g,_);const P=Math.ceil(_/g)+1,d=2**(g-1),w=2**g,E=(0,r.bitMask)(g),p=BigInt(g);return{windows:P,windowSize:d,mask:E,maxNumber:w,shiftBy:p}}function a(g,_,P){const{windowSize:d,mask:w,maxNumber:E,shiftBy:p}=P;let S=Number(g&w),A=g>>p;S>d&&(S-=E,A+=t);const T=_*d,C=T+Math.abs(S)-1,R=S===0,I=S<0,x=_%2!==0;return{nextN:A,offset:C,isZero:R,isNeg:I,isNegF:x,offsetF:T}}function c(g,_){if(!Array.isArray(g))throw new Error("array expected");g.forEach((P,d)=>{if(!(P instanceof _))throw new Error("invalid point at index "+d)})}function u(g,_){if(!Array.isArray(g))throw new Error("array of scalars expected");g.forEach((P,d)=>{if(!_.isValid(P))throw new Error("invalid scalar at index "+d)})}const l=new WeakMap,f=new WeakMap;function m(g){return f.get(g)||1}function y(g,_){return{constTimeNegate:o,hasPrecomputes(P){return m(P)!==1},unsafeLadder(P,d,w=g.ZERO){let E=P;for(;d>n;)d&t&&(w=w.add(E)),E=E.double(),d>>=t;return w},precomputeWindow(P,d){const{windows:w,windowSize:E}=i(d,_),p=[];let S=P,A=S;for(let T=0;T<w;T++){A=S,p.push(A);for(let C=1;C<E;C++)A=A.add(S),p.push(A);S=A.double()}return p},wNAF(P,d,w){let E=g.ZERO,p=g.BASE;const S=i(P,_);for(let A=0;A<S.windows;A++){const{nextN:T,offset:C,isZero:R,isNeg:I,isNegF:x,offsetF:F}=a(w,A,S);w=T,R?p=p.add(o(x,d[F])):E=E.add(o(I,d[C]))}return{p:E,f:p}},wNAFUnsafe(P,d,w,E=g.ZERO){const p=i(P,_);for(let S=0;S<p.windows&&w!==n;S++){const{nextN:A,offset:T,isZero:C,isNeg:R}=a(w,S,p);if(w=A,!C){const I=d[T];E=E.add(R?I.negate():I)}}return E},getPrecomputes(P,d,w){let E=l.get(d);return E||(E=this.precomputeWindow(d,P),P!==1&&l.set(d,w(E))),E},wNAFCached(P,d,w){const E=m(P);return this.wNAF(E,this.getPrecomputes(E,P,w),d)},wNAFCachedUnsafe(P,d,w,E){const p=m(P);return p===1?this.unsafeLadder(P,d,E):this.wNAFUnsafe(p,this.getPrecomputes(p,P,w),d,E)},setWindowSize(P,d){s(d,_),f.set(P,d),l.delete(P)}}}function h(g,_,P,d){c(P,g),u(d,_);const w=P.length,E=d.length;if(w!==E)throw new Error("arrays of points and scalars must have equal length");const p=g.ZERO,S=(0,r.bitLen)(BigInt(w));let A=1;S>12?A=S-3:S>4?A=S-2:S>0&&(A=2);const T=(0,r.bitMask)(A),C=new Array(Number(T)+1).fill(p),R=Math.floor((_.BITS-1)/A)*A;let I=p;for(let x=R;x>=0;x-=A){C.fill(p);for(let H=0;H<E;H++){const j=d[H],k=Number(j>>BigInt(x)&T);C[k]=C[k].add(P[H])}let F=p;for(let H=C.length-1,j=p;H>0;H--)j=j.add(C[H]),F=F.add(j);if(I=I.add(F),x!==0)for(let H=0;H<A;H++)I=I.double()}return I}function b(g,_,P,d){s(d,_.BITS),c(P,g);const w=g.ZERO,E=2**d-1,p=Math.ceil(_.BITS/d),S=(0,r.bitMask)(d),A=P.map(T=>{const C=[];for(let R=0,I=T;R<E;R++)C.push(I),I=I.add(T);return C});return T=>{if(u(T,_),T.length>P.length)throw new Error("array of scalars must be smaller than array of points");let C=w;for(let R=0;R<p;R++){if(C!==w)for(let x=0;x<d;x++)C=C.double();const I=BigInt(p*d-(R+1)*d);for(let x=0;x<T.length;x++){const F=T[x],H=Number(F>>I&S);H&&(C=C.add(A[x][H-1]))}}return C}}function v(g){return(0,e.validateField)(g.Fp),(0,r.validateObject)(g,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(g.n,g.nBitLength),...g,p:g.Fp.ORDER})}return qr}var o1;function bg(){return o1||(o1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=e.DERErr=void 0,e.weierstrassPoints=y,e.weierstrass=b,e.SWUFpSqrtRatio=v,e.mapToCurveSimpleSWU=g;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=Wv(),n=Uu(),t=Yr();function o(_){_.lowS!==void 0&&(0,t.abool)("lowS",_.lowS),_.prehash!==void 0&&(0,t.abool)("prehash",_.prehash)}function s(_){const P=(0,r.validateBasic)(_);(0,t.validateObject)(P,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});
37const{endo:d,Fp:w,a:E}=P;if(d){if(!w.eql(E,w.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof d!="object"||typeof d.beta!="bigint"||typeof d.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...P})}class i extends Error{constructor(P=""){super(P)}}e.DERErr=i,e.DER={Err:i,_tlv:{encode:(_,P)=>{const{Err:d}=e.DER;if(_<0||_>256)throw new d("tlv.encode: wrong tag");if(P.length&1)throw new d("tlv.encode: unpadded data");const w=P.length/2,E=(0,t.numberToHexUnpadded)(w);if(E.length/2&128)throw new d("tlv.encode: long form length too big");const p=w>127?(0,t.numberToHexUnpadded)(E.length/2|128):"";return(0,t.numberToHexUnpadded)(_)+p+E+P},decode(_,P){const{Err:d}=e.DER;let w=0;if(_<0||_>256)throw new d("tlv.encode: wrong tag");if(P.length<2||P[w++]!==_)throw new d("tlv.decode: wrong tlv");const E=P[w++],p=!!(E&128);let S=0;if(!p)S=E;else{const T=E&127;if(!T)throw new d("tlv.decode(long): indefinite length not supported");if(T>4)throw new d("tlv.decode(long): byte length is too big");const C=P.subarray(w,w+T);if(C.length!==T)throw new d("tlv.decode: length bytes not complete");if(C[0]===0)throw new d("tlv.decode(long): zero leftmost byte");for(const R of C)S=S<<8|R;if(w+=T,S<128)throw new d("tlv.decode(long): not minimal encoding")}const A=P.subarray(w,w+S);if(A.length!==S)throw new d("tlv.decode: wrong value length");return{v:A,l:P.subarray(w+S)}}},_int:{encode(_){const{Err:P}=e.DER;if(_<c)throw new P("integer: negative integers are not allowed");let d=(0,t.numberToHexUnpadded)(_);if(Number.parseInt(d[0],16)&8&&(d="00"+d),d.length&1)throw new P("unexpected DER parsing assertion: unpadded hex");return d},decode(_){const{Err:P}=e.DER;if(_[0]&128)throw new P("invalid signature integer: negative");if(_[0]===0&&!(_[1]&128))throw new P("invalid signature integer: unnecessary leading zero");return(0,t.bytesToNumberBE)(_)}},toSig(_){const{Err:P,_int:d,_tlv:w}=e.DER,E=(0,t.ensureBytes)("signature",_),{v:p,l:S}=w.decode(48,E);if(S.length)throw new P("invalid signature: left bytes after parsing");const{v:A,l:T}=w.decode(2,p),{v:C,l:R}=w.decode(2,T);if(R.length)throw new P("invalid signature: left bytes after parsing");return{r:d.decode(A),s:d.decode(C)}},hexFromSig(_){const{_tlv:P,_int:d}=e.DER,w=P.encode(2,d.encode(_.r)),E=P.encode(2,d.encode(_.s)),p=w+E;return P.encode(48,p)}};function a(_,P){return(0,t.bytesToHex)((0,t.numberToBytesBE)(_,P))}const c=BigInt(0),u=BigInt(1),l=BigInt(2),f=BigInt(3),m=BigInt(4);function y(_){const P=s(_),{Fp:d}=P,w=(0,n.Field)(P.n,P.nBitLength),E=P.toBytes||((q,M,N)=>{const z=M.toAffine();return(0,t.concatBytes)(Uint8Array.from([4]),d.toBytes(z.x),d.toBytes(z.y))}),p=P.fromBytes||(q=>{const M=q.subarray(1),N=d.fromBytes(M.subarray(0,d.BYTES)),z=d.fromBytes(M.subarray(d.BYTES,2*d.BYTES));return{x:N,y:z}});function S(q){const{a:M,b:N}=P,z=d.sqr(q),$=d.mul(z,q);return d.add(d.add($,d.mul(q,M)),N)}function A(q,M){const N=d.sqr(M),z=S(q);return d.eql(N,z)}if(!A(P.Gx,P.Gy))throw new Error("bad curve params: generator point");const T=d.mul(d.pow(P.a,f),m),C=d.mul(d.sqr(P.b),BigInt(27));
37if(d.is0(d.add(T,C)))throw new Error("bad curve params: a or b");function R(q){return(0,t.inRange)(q,u,P.n)}function I(q){const{allowedPrivateKeyLengths:M,nByteLength:N,wrapPrivateKey:z,n:$}=P;if(M&&typeof q!="bigint"){if((0,t.isBytes)(q)&&(q=(0,t.bytesToHex)(q)),typeof q!="string"||!M.includes(q.length))throw new Error("invalid private key");q=q.padStart(N*2,"0")}let U;try{U=typeof q=="bigint"?q:(0,t.bytesToNumberBE)((0,t.ensureBytes)("private key",q,N))}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof q)}return z&&(U=(0,n.mod)(U,$)),(0,t.aInRange)("private key",U,u,$),U}function x(q){if(!(q instanceof j))throw new Error("ProjectivePoint expected")}const F=(0,t.memoized)((q,M)=>{const{px:N,py:z,pz:$}=q;if(d.eql($,d.ONE))return{x:N,y:z};const U=q.is0();M==null&&(M=U?d.ONE:d.inv($));const G=d.mul(N,M),J=d.mul(z,M),W=d.mul($,M);if(U)return{x:d.ZERO,y:d.ZERO};if(!d.eql(W,d.ONE))throw new Error("invZ was invalid");return{x:G,y:J}}),H=(0,t.memoized)(q=>{if(q.is0()){if(P.allowInfinityPoint&&!d.is0(q.py))return;throw new Error("bad point: ZERO")}const{x:M,y:N}=q.toAffine();if(!d.isValid(M)||!d.isValid(N))throw new Error("bad point: x or y not FE");if(!A(M,N))throw new Error("bad point: equation left != right");if(!q.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class j{constructor(M,N,z){if(M==null||!d.isValid(M))throw new Error("x required");if(N==null||!d.isValid(N)||d.is0(N))throw new Error("y required");if(z==null||!d.isValid(z))throw new Error("z required");this.px=M,this.py=N,this.pz=z,Object.freeze(this)}static fromAffine(M){const{x:N,y:z}=M||{};if(!M||!d.isValid(N)||!d.isValid(z))throw new Error("invalid affine point");if(M instanceof j)throw new Error("projective point not allowed");const $=U=>d.eql(U,d.ZERO);return $(N)&&$(z)?j.ZERO:new j(N,z,d.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(M){const N=(0,n.FpInvertBatch)(d,M.map(z=>z.pz));return M.map((z,$)=>z.toAffine(N[$])).map(j.fromAffine)}static fromHex(M){const N=j.fromAffine(p((0,t.ensureBytes)("pointHex",M)));return N.assertValidity(),N}static fromPrivateKey(M){return j.BASE.multiply(I(M))}static msm(M,N){return(0,r.pippenger)(j,w,M,N)}_setWindowSize(M){O.setWindowSize(this,M)}assertValidity(){H(this)}hasEvenY(){const{y:M}=this.toAffine();if(d.isOdd)return!d.isOdd(M);throw new Error("Field doesn't support isOdd")}equals(M){x(M);const{px:N,py:z,pz:$}=this,{px:U,py:G,pz:J}=M,W=d.eql(d.mul(N,J),d.mul(U,$)),V=d.eql(d.mul(z,J),d.mul(G,$));return W&&V}negate(){return new j(this.px,d.neg(this.py),this.pz)}double(){const{a:M,b:N}=P,z=d.mul(N,f),{px:$,py:U,pz:G}=this;let J=d.ZERO,W=d.ZERO,V=d.ZERO,Y=d.mul($,$),te=d.mul(U,U),Z=d.mul(G,G),X=d.mul($,U);return X=d.add(X,X),V=d.mul($,G),V=d.add(V,V),J=d.mul(M,V),W=d.mul(z,Z),W=d.add(J,W),J=d.sub(te,W),W=d.add(te,W),W=d.mul(J,W),J=d.mul(X,J),V=d.mul(z,V),Z=d.mul(M,Z),X=d.sub(Y,Z),X=d.mul(M,X),X=d.add(X,V),V=d.add(Y,Y),Y=d.add(V,Y),Y=d.add(Y,Z),Y=d.mul(Y,X),W=d.add(W,Y),Z=d.mul(U,G),Z=d.add(Z,Z),Y=d.mul(Z,X),J=d.sub(J,Y),V=d.mul(Z,te),V=d.add(V,V),V=d.add(V,V),new j(J,W,V)}add(M){x(M);const{px:N,py:z,pz:$}=this,{px:U,py:G,pz:J}=M;let W=d.ZERO,V=d.ZERO,Y=d.ZERO;const te=P.a,Z=d.mul(P.b,f);let X=d.mul(N,U),Q=d.mul(z,G),ne=d.mul($,J),re=d.add(N,z),ae=d.add(U,G);re=d.mul(re,ae),ae=d.add(X,Q),re=d.sub(re,ae),ae=d.add(N,$);let ce=d.add(U,J);return ae=d.mul(ae,ce),ce=d.add(X,ne),ae=d.sub(ae,ce),ce=d.add(z,$),W=d.add(G,J),ce=d.mul(ce,W),W=d.add(Q,ne),ce=d.sub(ce,W),Y=d.mul(te,ae),W=d.mul(Z,ne),Y=d.add(W,Y),W=d.sub(Q,Y),Y=d.add(Q,Y),V=d.mul(W,Y),Q=d.add(X,X),Q=d.add(Q,X),ne=d.mul(te,ne),ae=d.mul(Z,ae),Q=d.add(Q,ne),ne=d.sub(X,ne),ne=d.mul(te,ne),ae=d.add(ae,ne),X=d.mul(Q,ae),V=d.add(V,X),X=d.mul(ce,ae),W=d.mul(re,W),W=d.sub(W,X),X=d.mul(re,Q),Y=d.mul(ce,Y),Y=d.add(Y,X),new j(W,V,Y)}subtract(M){return this.add(M.negate())}is0(){return this.equals(j.ZERO)}wNAF(M){return O.wNAFCached(this,M,j.normalizeZ)}multiplyUnsafe(M){const{endo:N,n:z}=P;(0,t.aInRange)("scalar",M,c,z);const $=j.ZERO;if(M===c)return $;if(this.is0()||M===u)return this;if(!N||O.hasPrecomputes(this))return O.wNAFCachedUnsafe(this,M,j.normalizeZ);
37let{k1neg:U,k1:G,k2neg:J,k2:W}=N.splitScalar(M),V=$,Y=$,te=this;for(;G>c||W>c;)G&u&&(V=V.add(te)),W&u&&(Y=Y.add(te)),te=te.double(),G>>=u,W>>=u;return U&&(V=V.negate()),J&&(Y=Y.negate()),Y=new j(d.mul(Y.px,N.beta),Y.py,Y.pz),V.add(Y)}multiply(M){const{endo:N,n:z}=P;(0,t.aInRange)("scalar",M,u,z);let $,U;if(N){const{k1neg:G,k1:J,k2neg:W,k2:V}=N.splitScalar(M);let{p:Y,f:te}=this.wNAF(J),{p:Z,f:X}=this.wNAF(V);Y=O.constTimeNegate(G,Y),Z=O.constTimeNegate(W,Z),Z=new j(d.mul(Z.px,N.beta),Z.py,Z.pz),$=Y.add(Z),U=te.add(X)}else{const{p:G,f:J}=this.wNAF(M);$=G,U=J}return j.normalizeZ([$,U])[0]}multiplyAndAddUnsafe(M,N,z){const $=j.BASE,U=(J,W)=>W===c||W===u||!J.equals($)?J.multiplyUnsafe(W):J.multiply(W),G=U(this,N).add(U(M,z));return G.is0()?void 0:G}toAffine(M){return F(this,M)}isTorsionFree(){const{h:M,isTorsionFree:N}=P;if(M===u)return!0;if(N)return N(j,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:M,clearCofactor:N}=P;return M===u?this:N?N(j,this):this.multiplyUnsafe(P.h)}toRawBytes(M=!0){return(0,t.abool)("isCompressed",M),this.assertValidity(),E(j,this,M)}toHex(M=!0){return(0,t.abool)("isCompressed",M),(0,t.bytesToHex)(this.toRawBytes(M))}}j.BASE=new j(P.Gx,P.Gy,d.ONE),j.ZERO=new j(d.ZERO,d.ONE,d.ZERO);const{endo:k,nBitLength:B}=P,O=(0,r.wNAF)(j,k?Math.ceil(B/2):B);return{CURVE:P,ProjectivePoint:j,normPrivateKeyToScalar:I,weierstrassEquation:S,isWithinCurveOrder:R}}function h(_){const P=(0,r.validateBasic)(_);return(0,t.validateObject)(P,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...P})}function b(_){const P=h(_),{Fp:d,n:w,nByteLength:E,nBitLength:p}=P,S=d.BYTES+1,A=2*d.BYTES+1;function T(Z){return(0,n.mod)(Z,w)}function C(Z){return(0,n.invert)(Z,w)}const{ProjectivePoint:R,normPrivateKeyToScalar:I,weierstrassEquation:x,isWithinCurveOrder:F}=y({...P,toBytes(Z,X,Q){const ne=X.toAffine(),re=d.toBytes(ne.x),ae=t.concatBytes;return(0,t.abool)("isCompressed",Q),Q?ae(Uint8Array.from([X.hasEvenY()?2:3]),re):ae(Uint8Array.from([4]),re,d.toBytes(ne.y))},fromBytes(Z){const X=Z.length,Q=Z[0],ne=Z.subarray(1);if(X===S&&(Q===2||Q===3)){const re=(0,t.bytesToNumberBE)(ne);if(!(0,t.inRange)(re,u,d.ORDER))throw new Error("Point is not on curve");const ae=x(re);let ce;try{ce=d.sqrt(ae)}catch(K){const pe=K instanceof Error?": "+K.message:"";throw new Error("Point is not on curve"+pe)}const he=(ce&u)===u;return(Q&1)===1!==he&&(ce=d.neg(ce)),{x:re,y:ce}}else if(X===A&&Q===4){const re=d.fromBytes(ne.subarray(0,d.BYTES)),ae=d.fromBytes(ne.subarray(d.BYTES,2*d.BYTES));return{x:re,y:ae}}else{const re=S,ae=A;throw new Error("invalid Point, expected length of "+re+", or uncompressed "+ae+", got "+X)}}});function H(Z){const X=w>>u;return Z>X}function j(Z){return H(Z)?T(-Z):Z}const k=(Z,X,Q)=>(0,t.bytesToNumberBE)(Z.slice(X,Q));class B{constructor(X,Q,ne){(0,t.aInRange)("r",X,u,w),(0,t.aInRange)("s",Q,u,w),this.r=X,this.s=Q,ne!=null&&(this.recovery=ne),Object.freeze(this)}static fromCompact(X){const Q=E;return X=(0,t.ensureBytes)("compactSignature",X,Q*2),new B(k(X,0,Q),k(X,Q,2*Q))}static fromDER(X){const{r:Q,s:ne}=e.DER.toSig((0,t.ensureBytes)("DER",X));return new B(Q,ne)}assertValidity(){}addRecoveryBit(X){return new B(this.r,this.s,X)}recoverPublicKey(X){const{r:Q,s:ne,recovery:re}=this,ae=$((0,t.ensureBytes)("msgHash",X));if(re==null||![0,1,2,3].includes(re))throw new Error("recovery id invalid");const ce=re===2||re===3?Q+P.n:Q;if(ce>=d.ORDER)throw new Error("recovery id 2 or 3 invalid");const he=(re&1)===0?"02":"03",ee=R.fromHex(he+a(ce,d.BYTES)),K=C(ce),pe=T(-ae*K),Ce=T(ne*K),xe=R.BASE.multiplyAndAddUnsafe(ee,pe,Ce);if(!xe)throw new Error("point at infinify");return xe.assertValidity(),xe}hasHighS(){return H(this.s)}normalizeS(){return this.hasHighS()?new B(this.r,T(-this.s),this.recovery):this}toDERRawBytes(){return(0,t.hexToBytes)(this.toDERHex())}toDERHex(){return e.DER.hexFromSig(this)}toCompactRawBytes(){return(0,t.hexToBytes)(this.toCompactHex())}toCompactHex(){const X=E;return a(this.r,X)+a(this.s,X)}}const O={isValidPrivateKey(Z){try{return I(Z),!0}catch{return!1}},normPrivateKeyToScalar:I,randomPrivateKey:()=>{const Z=(0,n.getMinHashLength)(P.n);return(0,n.mapHashToField)(P.randomBytes(Z),P.n)},precompute(Z=8,X=R.BASE){return X._setWindowSize(Z),X.multiply(BigInt(3)),X}};function q(Z,X=!0){return R.fromPrivateKey(Z).toRawBytes(X)}function M(Z){if(typeof Z=="bigint")return!1;if(Z instanceof R)return!0;const Q=(0,t.ensureBytes)("key",Z).length,ne=d.BYTES,re=ne+1,ae=2*ne+1;
37if(!(P.allowedPrivateKeyLengths||E===re))return Q===re||Q===ae}function N(Z,X,Q=!0){if(M(Z)===!0)throw new Error("first arg must be private key");if(M(X)===!1)throw new Error("second arg must be public key");return R.fromHex(X).multiply(I(Z)).toRawBytes(Q)}const z=P.bits2int||function(Z){if(Z.length>8192)throw new Error("input is too large");const X=(0,t.bytesToNumberBE)(Z),Q=Z.length*8-p;return Q>0?X>>BigInt(Q):X},$=P.bits2int_modN||function(Z){return T(z(Z))},U=(0,t.bitMask)(p);function G(Z){return(0,t.aInRange)("num < 2^"+p,Z,c,U),(0,t.numberToBytesBE)(Z,E)}function J(Z,X,Q=W){if(["recovered","canonical"].some(Ye=>Ye in Q))throw new Error("sign() legacy options not supported");const{hash:ne,randomBytes:re}=P;let{lowS:ae,prehash:ce,extraEntropy:he}=Q;ae==null&&(ae=!0),Z=(0,t.ensureBytes)("msgHash",Z),o(Q),ce&&(Z=(0,t.ensureBytes)("prehashed msgHash",ne(Z)));const ee=$(Z),K=I(X),pe=[G(K),G(ee)];if(he!=null&&he!==!1){const Ye=he===!0?re(d.BYTES):he;pe.push((0,t.ensureBytes)("extraEntropy",Ye))}const Ce=(0,t.concatBytes)(...pe),xe=ee;function bt(Ye){const mt=z(Ye);if(!F(mt))return;const Bt=C(mt),ot=R.BASE.multiply(mt).toAffine(),De=T(ot.x);if(De===c)return;const ht=T(Bt*T(xe+De*K));if(ht===c)return;let it=(ot.x===De?0:2)|Number(ot.y&u),Xe=ht;return ae&&H(ht)&&(Xe=j(ht),it^=1),new B(De,Xe,it)}return{seed:Ce,k2sig:bt}}const W={lowS:P.lowS,prehash:!1},V={lowS:P.lowS,prehash:!1};function Y(Z,X,Q=W){const{seed:ne,k2sig:re}=J(Z,X,Q),ae=P;return(0,t.createHmacDrbg)(ae.hash.outputLen,ae.nByteLength,ae.hmac)(ne,re)}R.BASE._setWindowSize(8);function te(Z,X,Q,ne=V){var it;const re=Z;X=(0,t.ensureBytes)("msgHash",X),Q=(0,t.ensureBytes)("publicKey",Q);const{lowS:ae,prehash:ce,format:he}=ne;if(o(ne),"strict"in ne)throw new Error("options.strict was renamed to lowS");if(he!==void 0&&he!=="compact"&&he!=="der")throw new Error("format must be compact or der");const ee=typeof re=="string"||(0,t.isBytes)(re),K=!ee&&!he&&typeof re=="object"&&re!==null&&typeof re.r=="bigint"&&typeof re.s=="bigint";if(!ee&&!K)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let pe,Ce;try{if(K&&(pe=new B(re.r,re.s)),ee){try{he!=="compact"&&(pe=B.fromDER(re))}catch(Xe){if(!(Xe instanceof e.DER.Err))throw Xe}!pe&&he!=="der"&&(pe=B.fromCompact(re))}Ce=R.fromHex(Q)}catch{return!1}if(!pe||ae&&pe.hasHighS())return!1;ce&&(X=P.hash(X));const{r:xe,s:bt}=pe,Ye=$(X),mt=C(bt),Bt=T(Ye*mt),ot=T(xe*mt),De=(it=R.BASE.multiplyAndAddUnsafe(Ce,Bt,ot))==null?void 0:it.toAffine();return De?T(De.x)===xe:!1}return{CURVE:P,getPublicKey:q,getSharedSecret:N,sign:Y,verify:te,ProjectivePoint:R,Signature:B,utils:O}}function v(_,P){const d=_.ORDER;let w=c;for(let H=d-u;H%l===c;H/=l)w+=u;const E=w,p=l<<E-u-u,S=p*l,A=(d-u)/S,T=(A-u)/l,C=S-u,R=p,I=_.pow(P,A),x=_.pow(P,(A+u)/l);let F=(H,j)=>{let k=I,B=_.pow(j,C),O=_.sqr(B);O=_.mul(O,j);let q=_.mul(H,O);q=_.pow(q,T),q=_.mul(q,B),B=_.mul(q,j),O=_.mul(q,H);let M=_.mul(O,B);q=_.pow(M,R);let N=_.eql(q,_.ONE);B=_.mul(O,x),q=_.mul(M,k),O=_.cmov(B,O,N),M=_.cmov(q,M,N);for(let z=E;z>u;z--){let $=z-l;$=l<<$-u;let U=_.pow(M,$);const G=_.eql(U,_.ONE);B=_.mul(O,k),k=_.mul(k,k),U=_.mul(M,k),O=_.cmov(B,O,G),M=_.cmov(U,M,G)}return{isValid:N,value:O}};if(_.ORDER%m===f){const H=(_.ORDER-f)/m,j=_.sqrt(_.neg(P));F=(k,B)=>{let O=_.sqr(B);const q=_.mul(k,B);O=_.mul(O,q);let M=_.pow(O,H);M=_.mul(M,q);const N=_.mul(M,j),z=_.mul(_.sqr(M),B),$=_.eql(z,k);let U=_.cmov(N,M,$);return{isValid:$,value:U}}}return F}function g(_,P){if((0,n.validateField)(_),!_.isValid(P.A)||!_.isValid(P.B)||!_.isValid(P.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const d=v(_,P.Z);if(!_.isOdd)throw new Error("Fp.isOdd is not implemented!");return w=>{let E,p,S,A,T,C,R,I;E=_.sqr(w),E=_.mul(E,P.Z),p=_.sqr(E),p=_.add(p,E),S=_.add(p,_.ONE),S=_.mul(S,P.B),A=_.cmov(P.Z,_.neg(p),!_.eql(p,_.ZERO)),A=_.mul(A,P.A),p=_.sqr(S),C=_.sqr(A),T=_.mul(C,P.A),p=_.add(p,T),p=_.mul(p,S),C=_.mul(C,A),T=_.mul(C,P.B),p=_.add(p,T),R=_.mul(E,S);const{isValid:x,value:F}=d(p,C);I=_.mul(E,w),I=_.mul(I,F),R=_.cmov(R,S,x),I=_.cmov(I,F,x);const H=_.isOdd(w)===_.isOdd(I);I=_.cmov(_.neg(I),I,H);const j=(0,n.FpInvertBatch)(_,[A],!0)[0];return R=_.mul(R,j),{x:R,y:I}}}})(qd)),qd}var i1;function Kv(){if(i1)return fo;i1=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.getHash=t,fo.createCurve=o;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=lg(),r=hr(),n=bg();function t(s){return{hash:s,hmac:(i,...a)=>(0,e.hmac)(s,i,(0,r.concatBytes)(...a)),randomBytes:r.randomBytes}}function o(s,i){const a=c=>(0,n.weierstrass)({...s,...t(c)});return{...a(i),create:a}}return fo}var cr={},a1;function Zv(){if(a1)return cr;
37a1=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.expand_message_xmd=i,cr.expand_message_xof=a,cr.hash_to_field=c,cr.isogenyMap=u,cr.createHasher=l;const e=Uu(),r=Yr(),n=r.bytesToNumberBE;function t(f,m){if(s(f),s(m),f<0||f>=1<<8*m)throw new Error("invalid I2OSP input: "+f);const y=Array.from({length:m}).fill(0);for(let h=m-1;h>=0;h--)y[h]=f&255,f>>>=8;return new Uint8Array(y)}function o(f,m){const y=new Uint8Array(f.length);for(let h=0;h<f.length;h++)y[h]=f[h]^m[h];return y}function s(f){if(!Number.isSafeInteger(f))throw new Error("number expected")}function i(f,m,y,h){(0,r.abytes)(f),(0,r.abytes)(m),s(y),m.length>255&&(m=h((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),m)));const{outputLen:b,blockLen:v}=h,g=Math.ceil(y/b);if(y>65535||g>255)throw new Error("expand_message_xmd: invalid lenInBytes");const _=(0,r.concatBytes)(m,t(m.length,1)),P=t(0,v),d=t(y,2),w=new Array(g),E=h((0,r.concatBytes)(P,f,d,t(0,1),_));w[0]=h((0,r.concatBytes)(E,t(1,1),_));for(let S=1;S<=g;S++){const A=[o(E,w[S-1]),t(S+1,1),_];w[S]=h((0,r.concatBytes)(...A))}return(0,r.concatBytes)(...w).slice(0,y)}function a(f,m,y,h,b){if((0,r.abytes)(f),(0,r.abytes)(m),s(y),m.length>255){const v=Math.ceil(2*h/8);m=b.create({dkLen:v}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(m).digest()}if(y>65535||m.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return b.create({dkLen:y}).update(f).update(t(y,2)).update(m).update(t(m.length,1)).digest()}function c(f,m,y){(0,r.validateObject)(y,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:h,k:b,m:v,hash:g,expand:_,DST:P}=y;(0,r.abytes)(f),s(m);const d=typeof P=="string"?(0,r.utf8ToBytes)(P):P,w=h.toString(2).length,E=Math.ceil((w+b)/8),p=m*v*E;let S;if(_==="xmd")S=i(f,d,p,g);else if(_==="xof")S=a(f,d,p,b,g);else if(_==="_internal_pass")S=f;else throw new Error('expand must be "xmd" or "xof"');const A=new Array(m);for(let T=0;T<m;T++){const C=new Array(v);for(let R=0;R<v;R++){const I=E*(R+T*v),x=S.subarray(I,I+E);C[R]=(0,e.mod)(n(x),h)}A[T]=C}return A}function u(f,m){const y=m.map(h=>Array.from(h).reverse());return(h,b)=>{const[v,g,_,P]=y.map(E=>E.reduce((p,S)=>f.add(f.mul(p,h),S))),[d,w]=(0,e.FpInvertBatch)(f,[g,P],!0);return h=f.mul(v,d),b=f.mul(b,f.mul(_,w)),{x:h,y:b}}}function l(f,m,y){if(typeof m!="function")throw new Error("mapToCurve() must be defined");function h(v){return f.fromAffine(m(v))}function b(v){const g=v.clearCofactor();return g.equals(f.ZERO)?f.ZERO:(g.assertValidity(),g)}return{defaults:y,hashToCurve(v,g){const _=c(v,2,{...y,DST:y.DST,...g}),P=h(_[0]),d=h(_[1]);return b(P.add(d))},encodeToCurve(v,g){const _=c(v,1,{...y,DST:y.encodeDST,...g});return b(h(_[0]))},mapToCurve(v){if(!Array.isArray(v))throw new Error("expected array of bigints");for(const g of v)if(typeof g!="bigint")throw new Error("expected array of bigints");return b(h(v))}}}return cr}var s1;function Xr(){return s1||(s1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.secp256k1_hasher=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=fg(),n=hr(),t=Kv(),o=Zv(),s=Uu(),i=Yr(),a=bg(),c=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),u=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),l=BigInt(0),f=BigInt(1),m=BigInt(2),y=(j,k)=>(j+k/m)/k;function h(j){const k=c,B=BigInt(3),O=BigInt(6),q=BigInt(11),M=BigInt(22),N=BigInt(23),z=BigInt(44),$=BigInt(88),U=j*j*j%k,G=U*U*j%k,J=(0,s.pow2)(G,B,k)*G%k,W=(0,s.pow2)(J,B,k)*G%k,V=(0,s.pow2)(W,m,k)*U%k,Y=(0,s.pow2)(V,q,k)*V%k,te=(0,s.pow2)(Y,M,k)*Y%k,Z=(0,s.pow2)(te,z,k)*te%k,X=(0,s.pow2)(Z,$,k)*Z%k,Q=(0,s.pow2)(X,z,k)*te%k,ne=(0,s.pow2)(Q,B,k)*G%k,re=(0,s.pow2)(ne,N,k)*Y%k,ae=(0,s.pow2)(re,O,k)*U%k,ce=(0,s.pow2)(ae,m,k);if(!b.eql(b.sqr(ce),j))throw new Error("Cannot find square root");return ce}const b=(0,s.Field)(c,void 0,void 0,{sqrt:h});e.secp256k1=(0,t.createCurve)({a:l,b:BigInt(7),Fp:b,n:u,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:j=>{const k=u,B=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),O=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),q=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),M=B,N=BigInt("0x100000000000000000000000000000000"),z=y(M*j,k),$=y(-O*j,k);let U=(0,s.mod)(j-z*B-$*q,k),G=(0,s.mod)(-z*O-$*M,k);const J=U>N,W=G>N;if(J&&(U=k-U),W&&(G=k-G),U>N||G>N)throw new Error("splitScalar: Endomorphism failed, k="+j);return{k1neg:J,k1:U,k2neg:W,k2:G}}}},r.sha256);const v={};function g(j,...k){let B=v[j];if(B===void 0){const O=(0,r.sha256)(Uint8Array.from(j,q=>q.charCodeAt(0)));B=(0,i.concatBytes)(O,O),v[j]=B}return(0,r.sha256)((0,i.concatBytes)(B,...k))}const _=j=>j.toRawBytes(!0).slice(1),P=j=>(0,i.numberToBytesBE)(j,32),d=j=>(0,s.mod)(j,c),w=j=>(0,s.mod)(j,u),E=e.secp256k1.ProjectivePoint,p=(j,k,B)=>E.BASE.multiplyAndAddUnsafe(j,k,B);function S(j){let k=e.secp256k1.utils.normPrivateKeyToScalar(j),B=E.fromPrivateKey(k);
37return{scalar:B.hasEvenY()?k:w(-k),bytes:_(B)}}function A(j){(0,i.aInRange)("x",j,f,c);const k=d(j*j),B=d(k*j+BigInt(7));let O=h(B);O%m!==l&&(O=d(-O));const q=new E(j,O,f);return q.assertValidity(),q}const T=i.bytesToNumberBE;function C(...j){return w(T(g("BIP0340/challenge",...j)))}function R(j){return S(j).bytes}function I(j,k,B=(0,n.randomBytes)(32)){const O=(0,i.ensureBytes)("message",j),{bytes:q,scalar:M}=S(k),N=(0,i.ensureBytes)("auxRand",B,32),z=P(M^T(g("BIP0340/aux",N))),$=g("BIP0340/nonce",z,q,O),U=w(T($));if(U===l)throw new Error("sign failed: k is zero");const{bytes:G,scalar:J}=S(U),W=C(G,q,O),V=new Uint8Array(64);if(V.set(G,0),V.set(P(w(J+W*M)),32),!x(V,O,q))throw new Error("sign: Invalid signature produced");return V}function x(j,k,B){const O=(0,i.ensureBytes)("signature",j,64),q=(0,i.ensureBytes)("message",k),M=(0,i.ensureBytes)("publicKey",B,32);try{const N=A(T(M)),z=T(O.subarray(0,32));if(!(0,i.inRange)(z,f,c))return!1;const $=T(O.subarray(32,64));if(!(0,i.inRange)($,f,u))return!1;const U=C(P(z),_(N),q),G=p(N,$,w(-U));return!(!G||!G.hasEvenY()||G.toAffine().x!==z)}catch{return!1}}e.schnorr={getPublicKey:R,sign:I,verify:x,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:A,pointToBytes:_,numberToBytesBE:i.numberToBytesBE,bytesToNumberBE:i.bytesToNumberBE,taggedHash:g,mod:s.mod}};const F=(0,o.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(j=>j.map(k=>BigInt(k)))),H=(0,a.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))});e.secp256k1_hasher=(0,o.createHasher)(e.secp256k1.ProjectivePoint,j=>{const{x:k,y:B}=H(b.create(j[0]));return F(k,B)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}),e.hashToCurve=e.secp256k1_hasher.hashToCurve,e.encodeToCurve=e.secp256k1_hasher.encodeToCurve})(Cd)),Cd}var c1;function uf(){if(c1)return ea;c1=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.recoverPublicKey=o;const e=Ze(),r=Ue(),n=Be(),t=oe();async function o({hash:i,signature:a}){const c=(0,e.isHex)(i)?i:(0,t.toHex)(i),{secp256k1:u}=await Promise.resolve().then(()=>Xr());return`0x${(()=>{if(typeof a=="object"&&"r"in a&&"s"in a){const{r:b,s:v,v:g,yParity:_}=a,P=Number(_??g),d=s(P);return new u.Signature((0,n.hexToBigInt)(b),(0,n.hexToBigInt)(v)).addRecoveryBit(d)}const m=(0,e.isHex)(a)?a:(0,t.toHex)(a);if((0,r.size)(m)!==65)throw new Error("invalid signature length");const y=(0,n.hexToNumber)(`0x${m.slice(130)}`),h=s(y);return u.Signature.fromCompact(m.substring(2,130)).addRecoveryBit(h)})().recoverPublicKey(c.substring(2)).toHex(!1)}`}function s(i){if(i===0||i===1)return i;if(i===27)return 0;if(i===28)return 1;throw new Error("Invalid yParityOrV value")}return ea}var u1;function vr(){if(u1)return Xi;u1=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.recoverAddress=n;const e=ug(),r=uf();async function n({hash:t,signature:o}){return(0,e.publicKeyToAddress)(await(0,r.recoverPublicKey)({hash:t,signature:o}))}return Xi}var ta={},fn={},d1;function Wo(){if(d1)return fn;d1=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.toRlp=o,fn.bytesToRlp=s,fn.hexToRlp=i;const e=de(),r=Lo(),n=Ee(),t=oe();function o(f,m="hex"){const y=a(f),h=(0,r.createCursor)(new Uint8Array(y.length));return y.encode(h),m==="hex"?(0,t.bytesToHex)(h.bytes):h.bytes}function s(f,m="bytes"){return o(f,m)}function i(f,m="hex"){return o(f,m)}function a(f){return Array.isArray(f)?c(f.map(m=>a(m))):u(f)}function c(f){const m=f.reduce((b,v)=>b+v.length,0),y=l(m);return{length:m<=55?1+m:1+y+m,encode(b){m<=55?b.pushByte(192+m):(b.pushByte(247+y),y===1?b.pushUint8(m):y===2?b.pushUint16(m):y===3?b.pushUint24(m):b.pushUint32(m));for(const{encode:v}of f)v(b)}}}function u(f){const m=typeof f=="string"?(0,n.hexToBytes)(f):f,y=l(m.length);return{length:m.length===1&&m[0]<128?1:m.length<=55?1+m.length:1+y+m.length,encode(b){m.length===1&&m[0]<128?b.pushBytes(m):m.length<=55?(b.pushByte(128+m.length),b.pushBytes(m)):(b.pushByte(183+y),y===1?b.pushUint8(m.length):y===2?b.pushUint16(m.length):y===3?b.pushUint24(m.length):b.pushUint32(m.length),b.pushBytes(m))}}}function l(f){if(f<2**8)return 1;if(f<2**16)return 2;if(f<2**24)return 3;if(f<2**32)return 4;throw new e.BaseError("Length is too large.")}return fn}var f1;function mg(){if(f1)return ta;f1=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.hashAuthorization=s;const e=qe(),r=Ee(),n=oe(),t=Wo(),o=tt();function s(i){const{chainId:a,nonce:c,to:u}=i,l=i.contractAddress??i.address,f=(0,o.keccak256)((0,e.concatHex)(["0x05",(0,t.toRlp)([a?(0,n.numberToHex)(a):"0x",l,c?(0,n.numberToHex)(c):"0x"])]));return u==="bytes"?(0,r.hexToBytes)(f):f}return ta}var l1;function Ko(){if(l1)return Yi;l1=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.recoverAuthorizationAddress=n;
37const e=vr(),r=mg();async function n(t){const{authorization:o,signature:s}=t;return(0,e.recoverAddress)({hash:(0,r.hashAuthorization)(o),signature:s??o})}return Yi}var ra={},lo={},b1;function hg(){if(b1)return lo;b1=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.EstimateGasExecutionError=void 0;const e=Vo(),r=Jr(),n=de(),t=nt();class o extends n.BaseError{constructor(i,{account:a,docsPath:c,chain:u,data:l,gas:f,gasPrice:m,maxFeePerGas:y,maxPriorityFeePerGas:h,nonce:b,to:v,value:g}){var P;const _=(0,t.prettyPrint)({from:a==null?void 0:a.address,to:v,value:typeof g<"u"&&`${(0,e.formatEther)(g)} ${((P=u==null?void 0:u.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:l,gas:f,gasPrice:typeof m<"u"&&`${(0,r.formatGwei)(m)} gwei`,maxFeePerGas:typeof y<"u"&&`${(0,r.formatGwei)(y)} gwei`,maxPriorityFeePerGas:typeof h<"u"&&`${(0,r.formatGwei)(h)} gwei`,nonce:b});super(i.shortMessage,{cause:i,docsPath:c,metaMessages:[...i.metaMessages?[...i.metaMessages," "]:[],"Estimate Gas Arguments:",_].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=i}}return lo.EstimateGasExecutionError=o,lo}var ve={},m1;function rr(){if(m1)return ve;
37m1=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.UnknownNodeError=ve.TipAboveFeeCapError=ve.TransactionTypeNotSupportedError=ve.IntrinsicGasTooLowError=ve.IntrinsicGasTooHighError=ve.InsufficientFundsError=ve.NonceMaxValueError=ve.NonceTooLowError=ve.NonceTooHighError=ve.FeeCapTooLowError=ve.FeeCapTooHighError=ve.ExecutionRevertedError=void 0;const e=Jr(),r=de();class n extends r.BaseError{constructor({cause:b,message:v}={}){var _;const g=(_=v==null?void 0:v.replace("execution reverted: ",""))==null?void 0:_.replace("execution reverted","");super(`Execution reverted ${g?`with reason: ${g}`:"for an unknown reason"}.`,{cause:b,name:"ExecutionRevertedError"})}}ve.ExecutionRevertedError=n,Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class t extends r.BaseError{constructor({cause:b,maxFeePerGas:v}={}){super(`The fee cap (\`maxFeePerGas\`${v?` = ${(0,e.formatGwei)(v)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:b,name:"FeeCapTooHighError"})}}ve.FeeCapTooHighError=t,Object.defineProperty(t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends r.BaseError{constructor({cause:b,maxFeePerGas:v}={}){super(`The fee cap (\`maxFeePerGas\`${v?` = ${(0,e.formatGwei)(v)}`:""} gwei) cannot be lower than the block base fee.`,{cause:b,name:"FeeCapTooLowError"})}}ve.FeeCapTooLowError=o,Object.defineProperty(o,"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/});class s extends r.BaseError{constructor({cause:b,nonce:v}={}){super(`Nonce provided for the transaction ${v?`(${v}) `:""}is higher than the next one expected.`,{cause:b,name:"NonceTooHighError"})}}ve.NonceTooHighError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class i extends r.BaseError{constructor({cause:b,nonce:v}={}){super([`Nonce provided for the transaction ${v?`(${v}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` 38`),{cause:b,name:"NonceTooLowError"})}}ve.NonceTooLowError=i,Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class a extends r.BaseError{constructor({cause:b,nonce:v}={}){super(`Nonce provided for the transaction ${v?`(${v}) `:""}exceeds the maximum allowed nonce.`,{cause:b,name:"NonceMaxValueError"})}}ve.NonceMaxValueError=a,Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class c extends r.BaseError{constructor({cause:b}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` 39`),{cause:b,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."],name:"InsufficientFundsError"})}}ve.InsufficientFundsError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class u extends r.BaseError{constructor({cause:b,gas:v}={}){super(`The amount of gas ${v?`(${v}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:b,name:"IntrinsicGasTooHighError"})}}ve.IntrinsicGasTooHighError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class l extends r.BaseError{constructor({cause:b,gas:v}={}){super(`The amount of gas ${v?`(${v}) `:""}provided for the transaction is too low.`,{cause:b,name:"IntrinsicGasTooLowError"})}}ve.IntrinsicGasTooLowError=l,Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends r.BaseError{constructor({cause:b}){super("The transaction type is not supported for this chain.",{cause:b,name:"TransactionTypeNotSupportedError"})}}
39ve.TransactionTypeNotSupportedError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends r.BaseError{constructor({cause:b,maxPriorityFeePerGas:v,maxFeePerGas:g}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${v?` = ${(0,e.formatGwei)(v)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${g?` = ${(0,e.formatGwei)(g)} gwei`:""}).`].join(` 40`),{cause:b,name:"TipAboveFeeCapError"})}}ve.TipAboveFeeCapError=m,Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class y extends r.BaseError{constructor({cause:b}){super(`An error occurred while executing: ${b==null?void 0:b.shortMessage}`,{cause:b,name:"UnknownNodeError"})}}return ve.UnknownNodeError=y,ve}var bo={},h1;function Zo(){if(h1)return bo;h1=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.containsNodeError=o,bo.getNodeError=s;const e=de(),r=rr(),n=pt(),t=gr();function o(i){return i instanceof t.TransactionRejectedRpcError||i instanceof t.InvalidInputRpcError||i instanceof n.RpcRequestError&&i.code===r.ExecutionRevertedError.code}function s(i,a){const c=(i.details||"").toLowerCase(),u=i instanceof e.BaseError?i.walk(l=>(l==null?void 0:l.code)===r.ExecutionRevertedError.code):i;return u instanceof e.BaseError?new r.ExecutionRevertedError({cause:i,message:u.details}):r.ExecutionRevertedError.nodeMessage.test(c)?new r.ExecutionRevertedError({cause:i,message:i.details}):r.FeeCapTooHighError.nodeMessage.test(c)?new r.FeeCapTooHighError({cause:i,maxFeePerGas:a==null?void 0:a.maxFeePerGas}):r.FeeCapTooLowError.nodeMessage.test(c)?new r.FeeCapTooLowError({cause:i,maxFeePerGas:a==null?void 0:a.maxFeePerGas}):r.NonceTooHighError.nodeMessage.test(c)?new r.NonceTooHighError({cause:i,nonce:a==null?void 0:a.nonce}):r.NonceTooLowError.nodeMessage.test(c)?new r.NonceTooLowError({cause:i,nonce:a==null?void 0:a.nonce}):r.NonceMaxValueError.nodeMessage.test(c)?new r.NonceMaxValueError({cause:i,nonce:a==null?void 0:a.nonce}):r.InsufficientFundsError.nodeMessage.test(c)?new r.InsufficientFundsError({cause:i}):r.IntrinsicGasTooHighError.nodeMessage.test(c)?new r.IntrinsicGasTooHighError({cause:i,gas:a==null?void 0:a.gas}):r.IntrinsicGasTooLowError.nodeMessage.test(c)?new r.IntrinsicGasTooLowError({cause:i,gas:a==null?void 0:a.gas}):r.TransactionTypeNotSupportedError.nodeMessage.test(c)?new r.TransactionTypeNotSupportedError({cause:i}):r.TipAboveFeeCapError.nodeMessage.test(c)?new r.TipAboveFeeCapError({cause:i,maxFeePerGas:a==null?void 0:a.maxFeePerGas,maxPriorityFeePerGas:a==null?void 0:a.maxPriorityFeePerGas}):new r.UnknownNodeError({cause:i})}return bo}var y1;function yg(){if(y1)return ra;y1=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.getEstimateGasError=t;const e=hg(),r=rr(),n=Zo();function t(o,{docsPath:s,...i}){const a=(()=>{const c=(0,n.getNodeError)(o,i);return c instanceof r.UnknownNodeError?o:c})();return new e.EstimateGasExecutionError(a,{docsPath:s,...i})}return ra}var na={},p1;function Er(){if(p1)return na;p1=1,Object.defineProperty(na,"__esModule",{value:!0}),na.extract=e;function e(r,{format:n}){if(!n)return{};const t={};function o(i){const a=Object.keys(i);for(const c of a)c in r&&(t[c]=r[c]),i[c]&&typeof i[c]=="object"&&!Array.isArray(i[c])&&o(i[c])}const s=n(r||{});return o(s),t}return na}var Md={},oa={},g1;function Jo(){if(g1)return oa;g1=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.defineFormatter=e;function e(r,n){return({exclude:t,format:o})=>({exclude:t,format:(s,i)=>{const a=n(s,i);if(t)for(const c of t)delete a[c];return{...a,...o(s,i)}},type:r})}return oa}var _1;function St(){return _1||(_1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionRequest=e.rpcTransactionType=void 0,e.formatTransactionRequest=t;const r=oe(),n=Jo();e.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function t(s,i){const a={};return typeof s.authorizationList<"u"&&(a.authorizationList=o(s.authorizationList)),typeof s.accessList<"u"&&(a.accessList=s.accessList),typeof s.blobVersionedHashes<"u"&&(a.blobVersionedHashes=s.blobVersionedHashes),typeof s.blobs<"u"&&(typeof s.blobs[0]!="str
40ing"?a.blobs=s.blobs.map(c=>(0,r.bytesToHex)(c)):a.blobs=s.blobs),typeof s.data<"u"&&(a.data=s.data),s.account&&(a.from=s.account.address),typeof s.from<"u"&&(a.from=s.from),typeof s.gas<"u"&&(a.gas=(0,r.numberToHex)(s.gas)),typeof s.gasPrice<"u"&&(a.gasPrice=(0,r.numberToHex)(s.gasPrice)),typeof s.maxFeePerBlobGas<"u"&&(a.maxFeePerBlobGas=(0,r.numberToHex)(s.maxFeePerBlobGas)),typeof s.maxFeePerGas<"u"&&(a.maxFeePerGas=(0,r.numberToHex)(s.maxFeePerGas)),typeof s.maxPriorityFeePerGas<"u"&&(a.maxPriorityFeePerGas=(0,r.numberToHex)(s.maxPriorityFeePerGas)),typeof s.nonce<"u"&&(a.nonce=(0,r.numberToHex)(s.nonce)),typeof s.to<"u"&&(a.to=s.to),typeof s.type<"u"&&(a.type=e.rpcTransactionType[s.type]),typeof s.value<"u"&&(a.value=(0,r.numberToHex)(s.value)),a}e.defineTransactionRequest=(0,n.defineFormatter)("transactionRequest",t);function o(s){return s.map(i=>({address:i.address,r:i.r?(0,r.numberToHex)(BigInt(i.r)):i.r,s:i.s?(0,r.numberToHex)(BigInt(i.s)):i.s,chainId:(0,r.numberToHex)(i.chainId),nonce:(0,r.numberToHex)(i.nonce),...typeof i.yParity<"u"?{yParity:(0,r.numberToHex)(i.yParity)}:{},...typeof i.v<"u"&&typeof i.yParity>"u"?{v:(0,r.numberToHex)(i.v)}:{}}))}})(Md)),Md}var ln={},v1;function df(){if(v1)return ln;v1=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.serializeStateMapping=s,ln.serializeAccountStateOverride=i,ln.serializeStateOverride=a;const e=At(),r=ku(),n=cf(),t=rt(),o=oe();function s(c){if(!(!c||c.length===0))return c.reduce((u,{slot:l,value:f})=>{if(l.length!==66)throw new r.InvalidBytesLengthError({size:l.length,targetSize:66,type:"hex"});if(f.length!==66)throw new r.InvalidBytesLengthError({size:f.length,targetSize:66,type:"hex"});return u[l]=f,u},{})}function i(c){const{balance:u,nonce:l,state:f,stateDiff:m,code:y}=c,h={};if(y!==void 0&&(h.code=y),u!==void 0&&(h.balance=(0,o.numberToHex)(u)),l!==void 0&&(h.nonce=(0,o.numberToHex)(l)),f!==void 0&&(h.state=s(f)),m!==void 0){if(h.state)throw new n.StateAssignmentConflictError;h.stateDiff=s(m)}return h}function a(c){if(!c)return;const u={};for(const{address:l,...f}of c){if(!(0,t.isAddress)(l,{strict:!1}))throw new e.InvalidAddressError({address:l});if(u[l])throw new n.AccountStateConflictError({address:l});u[l]=i(f)}return u}return ln}var ia={},D={},E1;function ff(){return E1||(E1=1,Object.defineProperty(D,"__esModule",{value:!0}),D.minInt144=D.minInt136=D.minInt128=D.minInt120=D.minInt112=D.minInt104=D.minInt96=D.minInt88=D.minInt80=D.minInt72=D.minInt64=D.minInt56=D.minInt48=D.minInt40=D.minInt32=D.minInt24=D.minInt16=D.minInt8=D.maxInt256=D.maxInt248=D.maxInt240=D.maxInt232=D.maxInt224=D.maxInt216=D.maxInt208=D.maxInt200=D.maxInt192=D.maxInt184=D.maxInt176=D.maxInt168=D.maxInt160=D.maxInt152=D.maxInt144=D.maxInt136=D.maxInt128=D.maxInt120=D.maxInt112=D.maxInt104=D.maxInt96=D.maxInt88=D.maxInt80=D.maxInt72=D.maxInt64=D.maxInt56=D.maxInt48=D.maxInt40=D.maxInt32=D.maxInt24=D.maxInt16=D.maxInt8=void 0,D.maxUint256=D.maxUint248=D.maxUint240=D.maxUint232=D.maxUint224=D.maxUint216=D.maxUint208=D.maxUint200=D.maxUint192=D.maxUint184=D.maxUint176=D.maxUint168=D.maxUint160=D.maxUint152=D.maxUint144=D.maxUint136=D.maxUint128=D.maxUint120=D.maxUint112=D.maxUint104=D.maxUint96=D.maxUint88=D.maxUint80=D.maxUint72=D.maxUint64=D.maxUint56=D.maxUint48=D.maxUint40=D.maxUint32=D.maxUint24=D.maxUint16=D.maxUint8=D.minInt256=D.minInt248=D.minInt240=D.minInt232=D.minInt224=D.minInt216=D.minInt208=D.minInt200=D.minInt192=D.minInt184=D.minInt176=D.minInt168=D.minInt160=D.minInt152=void 0,D.maxInt8=2n**(8n-1n)-1n,D.maxInt16=2n**(16n-1n)-1n,D.maxInt24=2n**(24n-1n)-1n,D.maxInt32=2n**(32n-1n)-1n,D.maxInt40=2n**(40n-1n)-1n,D.maxInt48=2n**(48n-1n)-1n,D.maxInt56=2n**(56n-1n)-1n,D.maxInt64=2n**(64n-1n)-1n,D.maxInt72=2n**(72n-1n)-1n,D.maxInt80=2n**(80n-1n)-1n,D.maxInt88=2n**(88n-1n)-1n,D.maxInt96=2n**(96n-1n)-1n,D.maxInt104=2n**(104n-1n)-1n,D.maxInt112=2n**(112n-1n)-1n,D.maxInt120=2n**(120n-1n)-1n,D.maxInt128=2n**(128n-1n)-1n,D.maxInt136=2n**(136n-1n)-1n,D.maxInt144=2n**(144n-1n)-1n,D.maxInt152=2n**(152n-1n)-1n,D.maxInt160=2n**(160n-1n)-1n,D.maxInt168=2n**(168n-1n)-1n,D.maxInt176=2n**(176n-1n)-1n,D.maxInt184=2n**(184n-1n)-1n,D.maxInt192=2n**(192n-1n)-1n,D.maxInt200=2n**(200n-1n)-1n,D.maxInt208=2n**(208n-1n)-1n,D.maxInt216=2n**(216n-1n)-1n,D.maxInt224=2n**(224n-1n)-1n,D.maxInt232=2n**(232n-1n)-1n,D.maxInt240=2n**(240n-1n)-1n,D.maxInt248=2n**(248n-1n)-1n,D.maxInt256=2n**(256n-1n)-1n,D.minInt8=-(2n**(8n-1n)),D.minInt16=-(2n**(16n-1n)),D.minInt24=-(2n**(24n-1n)),D.minInt32=-(2n**(32n-1n)),D.minInt40=-(2n**(40n-1n)),D.minInt48=-(2n**(48n-1n)),D.minInt56=-(2n**(56n-1n)),D.minInt64=-(2n**(64n-1n)),D.minInt72=-(2n**(72n-1n)),D.minInt80=-(2n**(80n-1n)),D.minInt88=-(2n**(88n-1n)),D.minInt96=-(2n**(96n-1n)),D.minInt104=-(2n**(104n-1n)),D.minInt112=-(2n**(112n-1n)),D.minInt120=-(2n**(120n-1n)),D.minInt128=-(2n**(128n-1n)),D.minInt136=-(2n**(136n-1n)),D.minInt144=-(2n**(144n-1n)),D.minInt152=-(2n**(152n-1n)),D.minInt160=-(2n**(160n-1n)),D.minInt168=-(2n**(168
40n-1n)),D.minInt176=-(2n**(176n-1n)),D.minInt184=-(2n**(184n-1n)),D.minInt192=-(2n**(192n-1n)),D.minInt200=-(2n**(200n-1n)),D.minInt208=-(2n**(208n-1n)),D.minInt216=-(2n**(216n-1n)),D.minInt224=-(2n**(224n-1n)),D.minInt232=-(2n**(232n-1n)),D.minInt240=-(2n**(240n-1n)),D.minInt248=-(2n**(248n-1n)),D.minInt256=-(2n**(256n-1n)),D.maxUint8=2n**8n-1n,D.maxUint16=2n**16n-1n,D.maxUint24=2n**24n-1n,D.maxUint32=2n**32n-1n,D.maxUint40=2n**40n-1n,D.maxUint48=2n**48n-1n,D.maxUint56=2n**56n-1n,D.maxUint64=2n**64n-1n,D.maxUint72=2n**72n-1n,D.maxUint80=2n**80n-1n,D.maxUint88=2n**88n-1n,D.maxUint96=2n**96n-1n,D.maxUint104=2n**104n-1n,D.maxUint112=2n**112n-1n,D.maxUint120=2n**120n-1n,D.maxUint128=2n**128n-1n,D.maxUint136=2n**136n-1n,D.maxUint144=2n**144n-1n,D.maxUint152=2n**152n-1n,D.maxUint160=2n**160n-1n,D.maxUint168=2n**168n-1n,D.maxUint176=2n**176n-1n,D.maxUint184=2n**184n-1n,D.maxUint192=2n**192n-1n,D.maxUint200=2n**200n-1n,D.maxUint208=2n**208n-1n,D.maxUint216=2n**216n-1n,D.maxUint224=2n**224n-1n,D.maxUint232=2n**232n-1n,D.maxUint240=2n**240n-1n,D.maxUint248=2n**248n-1n,D.maxUint256=2n**256n-1n),D}var j1;function It(){if(j1)return ia;j1=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.assertRequest=s;const e=Ie(),r=ff(),n=At(),t=rr(),o=rt();function s(i){const{account:a,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=i,f=a?(0,e.parseAccount)(a):void 0;if(f&&!(0,o.isAddress)(f.address))throw new n.InvalidAddressError({address:f.address});if(l&&!(0,o.isAddress)(l))throw new n.InvalidAddressError({address:l});if(c&&c>r.maxUint256)throw new t.FeeCapTooHighError({maxFeePerGas:c});if(u&&c&&u>c)throw new t.TipAboveFeeCapError({maxFeePerGas:c,maxPriorityFeePerGas:u})}return ia}var kd={},mo={},Jt={},w1;function Yo(){if(w1)return Jt;w1=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.MaxFeePerGasTooLowError=Jt.Eip1559FeesNotSupportedError=Jt.BaseFeeScalarError=void 0;const e=Jr(),r=de();class n extends r.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}Jt.BaseFeeScalarError=n;class t extends r.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}Jt.Eip1559FeesNotSupportedError=t;class o extends r.BaseError{constructor({maxPriorityFeePerGas:i}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,e.formatGwei)(i)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}return Jt.MaxFeePerGasTooLowError=o,Jt}var ho={},aa={},yo={},P1;function lf(){if(P1)return yo;P1=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.BlockNotFoundError=void 0;const e=de();class r extends e.BaseError{constructor({blockHash:t,blockNumber:o}){let s="Block";t&&(s=`Block at hash "${t}"`),o&&(s=`Block at number "${o}"`),super(`${s} could not be found.`,{name:"BlockNotFoundError"})}}return yo.BlockNotFoundError=r,yo}var bn={},Hd={},A1;function Rn(){return A1||(A1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransaction=e.transactionType=void 0,e.formatTransaction=t;const r=Be(),n=Jo();e.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function t(s,i){const a={...s,blockHash:s.blockHash?s.blockHash:null,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,...s.blockTimestamp!=null&&{blockTimestamp:BigInt(s.blockTimestamp)},chainId:s.chainId?(0,r.hexToNumber)(s.chainId):void 0,gas:s.gas?BigInt(s.gas):void 0,gasPrice:s.gasPrice?BigInt(s.gasPrice):void 0,maxFeePerBlobGas:s.maxFeePerBlobGas?BigInt(s.maxFeePerBlobGas):void 0,maxFeePerGas:s.maxFeePerGas?BigInt(s.maxFeePerGas):void 0,maxPriorityFeePerGas:s.maxPriorityFeePerGas?BigInt(s.maxPriorityFeePerGas):void 0,nonce:s.nonce?(0,r.hexToNumber)(s.nonce):void 0,to:s.to?s.to:null,transactionIndex:s.transactionIndex?Number(s.transactionIndex):null,type:s.type?e.transactionType[s.type]:void 0,typeHex:s.type?s.type:void 0,value:s.value?BigInt(s.value):void 0,v:s.v?BigInt(s.v):void 0};return s.authorizationList&&(a.authorizationList=o(s.authorizationList)),a.yParity=(()=>{if(s.yParity)return Number(s.yParity);if(typeof a.v=="bigint"){if(a.v===0n||a.v===27n)return 0;if(a.v===1n||a.v===28n)return 1;if(a.v>=35n)return a.v%2n===0n?1:0}})(),a.type==="legacy"&&(delete a.accessList,delete a.maxFeePerBlobGas,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas,delete a.yParity),a.type==="eip2930"&&(delete a.maxFeePerBlobGas,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas),a.type==="eip1559"&&delete a.maxFeePerBlobGas,a}e.defineTransaction=(0,n.defineFormatter)("transaction",t);function o(s){return s.map(i=>({address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:i.r,s:i.s,yParity:Number(i.yParity)}))}})(Hd)),Hd}var T1;
40function Lu(){if(T1)return bn;T1=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.defineBlock=void 0,bn.formatBlock=n;const e=Jo(),r=Rn();function n(t,o){const s=(t.transactions??[]).map(i=>typeof i=="string"?i:(0,r.formatTransaction)(i));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:s,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}return bn.defineBlock=(0,e.defineFormatter)("block",n),bn}var S1;function Qr(){if(S1)return aa;S1=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.getBlock=t;const e=lf(),r=oe(),n=Lu();async function t(o,{blockHash:s,blockNumber:i,blockTag:a=o.experimental_blockTag??"latest",includeTransactions:c}={}){var y,h,b;const u=c??!1,l=i!==void 0?(0,r.numberToHex)(i):void 0;let f=null;if(s?f=await o.request({method:"eth_getBlockByHash",params:[s,u]},{dedupe:!0}):f=await o.request({method:"eth_getBlockByNumber",params:[l||a,u]},{dedupe:!!l}),!f)throw new e.BlockNotFoundError({blockHash:s,blockNumber:i});return(((b=(h=(y=o.chain)==null?void 0:y.formatters)==null?void 0:h.block)==null?void 0:b.format)||n.formatBlock)(f,"getBlock")}return aa}var sa={},I1;function bf(){if(I1)return sa;I1=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.getGasPrice=e;async function e(r){const n=await r.request({method:"eth_gasPrice"});return BigInt(n)}return sa}var R1;function pg(){if(R1)return ho;R1=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.estimateMaxPriorityFeePerGas=s,ho.internal_estimateMaxPriorityFeePerGas=i;const e=Yo(),r=Be(),n=me(),t=Qr(),o=bf();async function s(a,c){return i(a,c)}async function i(a,c){var m,y;const{block:u,chain:l=a.chain,request:f}=c||{};try{const h=((m=l==null?void 0:l.fees)==null?void 0:m.maxPriorityFeePerGas)??((y=l==null?void 0:l.fees)==null?void 0:y.defaultPriorityFee);if(typeof h=="function"){const v=u||await(0,n.getAction)(a,t.getBlock,"getBlock")({}),g=await h({block:v,client:a,request:f});if(g===null)throw new Error;return g}if(typeof h<"u")return h;const b=await a.request({method:"eth_maxPriorityFeePerGas"});return(0,r.hexToBigInt)(b)}catch{const[h,b]=await Promise.all([u?Promise.resolve(u):(0,n.getAction)(a,t.getBlock,"getBlock")({}),(0,n.getAction)(a,o.getGasPrice,"getGasPrice")({})]);if(typeof h.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const v=b-h.baseFeePerGas;return v<0n?0n:v}}return ho}var B1;function gg(){if(B1)return mo;B1=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.estimateFeesPerGas=s,mo.internal_estimateFeesPerGas=i;const e=Yo(),r=me(),n=pg(),t=Qr(),o=bf();async function s(a,c){return i(a,c)}async function i(a,c){var P,d;const{block:u,chain:l=a.chain,request:f,type:m="eip1559"}=c||{},y=await(async()=>{var w,E;return typeof((w=l==null?void 0:l.fees)==null?void 0:w.baseFeeMultiplier)=="function"?l.fees.baseFeeMultiplier({block:u,client:a,request:f}):((E=l==null?void 0:l.fees)==null?void 0:E.baseFeeMultiplier)??1.2})();if(y<1)throw new e.BaseFeeScalarError;const b=10**(((P=y.toString().split(".")[1])==null?void 0:P.length)??0),v=w=>w*BigInt(Math.ceil(y*b))/BigInt(b),g=u||await(0,r.getAction)(a,t.getBlock,"getBlock")({});if(typeof((d=l==null?void 0:l.fees)==null?void 0:d.estimateFeesPerGas)=="function"){const w=await l.fees.estimateFeesPerGas({block:u,client:a,multiply:v,request:f,type:m});if(w!==null)return w}if(m==="eip1559"){if(typeof g.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const w=typeof(f==null?void 0:f.maxPriorityFeePerGas)=="bigint"?f.maxPriorityFeePerGas:await(0,n.internal_estimateMaxPriorityFeePerGas)(a,{block:g,chain:l,request:f}),E=v(g.baseFeePerGas);return{maxFeePerGas:(f==null?void 0:f.maxFeePerGas)??E+w,maxPriorityFeePerGas:w}}return{gasPrice:(f==null?void 0:f.gasPrice)??v(await(0,r.getAction)(a,o.getGasPrice,"getGasPrice")({}))}}return mo}var ca={},ua={},O1;function Bn(){if(O1)return ua;O1=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.formatBlockParameter=n;const e=de(),r=oe();function n(t){const{blockHash:o,blockNumber:s,blockTag:i,requireCanonical:a}=t;if(a!==void 0&&!o)throw new e.BaseError("`requireCanonical` can only be provided when `blockHash` is set.");return o?a?{blockHash:o,requireCanonical:a}:{blockHash:o}:typeof s=="bigint"?(0,r.numberToHex)(s):i??"latest"}return ua}var C1;function Du(){if(C1)return ca;C1=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.getTransactionCount=n;const e=Bn(),r=Be();async function n(t,{address:o,blockHash:s,blockNumber:i,blockTag:a="latest",requireCanonical:c}){const u=(0,e.formatBlockParameter)({blockHash:s,blockNumber:i,blockTag:a,requireCanonical:c}),l=await t.request({method:"eth_getTransactionCount",params:[o,u]},{dedupe:typeof i=="bigint"||s!==void 0});return(0,r.hexToNumber)(l)}return ca}var da={},x1;function Gu(){if(x1)return da;x1=1,Object.defineProperty(da,"__esModule",{value:!0}),da.blobsToCommitments=n;const e=Ee(),r=oe();function n(t){const{kzg:o}=t,s=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),i=typeof t.blobs[0]=="string"?t.blobs.map(c=>(0,e.hexToBytes)(c)):t.blobs,a=[];for(const c of i)a.push(Uint8Array.from(o.blobToKzgCommitment(c)));return s==="bytes"?a:a.map(c=>(0,r.bytesToHex)(c))}return da}var fa={},q1;function Vu(){if(q1)return fa;q1=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.blobsToProofs=n;const e=Ee(),r=oe();function n(t){const{kzg:o}=t,s=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),i=typeof t.blobs[0]=="string"?t.blobs.map(u=>(0,e.hexToBytes)(u)):t.blobs,a=typeof t.commitments[0]=="string"?t.commitments.map(u=>(0,e.hexToBytes)(u)):t.commitments,c=[];for(let u=0;u<i.length;u++){const l=i[u],f=a[u];c.push(Uint8Array.from(o.computeBlobKzgProof(l,f)))}return s==="bytes"?c:c.map(u=>(0,r.bytesToHex)(u))}return fa}var la={},ba={},ma={},vt={},M1;function _g(){if(M1)return vt;
40M1=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.sha224=vt.SHA224=vt.sha256=vt.SHA256=void 0;const e=fg();return vt.SHA256=e.SHA256,vt.sha256=e.sha256,vt.SHA224=e.SHA224,vt.sha224=e.sha224,vt}var k1;function mf(){if(k1)return ma;k1=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.sha256=o;const e=_g(),r=Ze(),n=Ee(),t=oe();function o(s,i){const a=i||"hex",c=(0,e.sha256)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return ma}var H1;function hf(){if(H1)return ba;H1=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.commitmentToVersionedHash=n;const e=oe(),r=mf();function n(t){const{commitment:o,version:s=1}=t,i=t.to??(typeof o=="string"?"hex":"bytes"),a=(0,r.sha256)(o,"bytes");return a.set([s],0),i==="bytes"?a:(0,e.bytesToHex)(a)}return ba}var F1;function yf(){if(F1)return la;F1=1,Object.defineProperty(la,"__esModule",{value:!0}),la.commitmentsToVersionedHashes=r;const e=hf();function r(n){const{commitments:t,version:o}=n,s=n.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const a of t)i.push((0,e.commitmentToVersionedHash)({commitment:a,to:s,version:o}));return i}return la}var ha={},ya={},Fd={},N1;function Jv(){return N1||(N1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxBytesPerTransaction=e.bytesPerBlob=e.fieldElementsPerBlob=e.bytesPerFieldElement=void 0;const r=6;e.bytesPerFieldElement=32,e.fieldElementsPerBlob=4096,e.bytesPerBlob=e.bytesPerFieldElement*e.fieldElementsPerBlob,e.maxBytesPerTransaction=e.bytesPerBlob*r-1-1*e.fieldElementsPerBlob*r})(Fd)),Fd}var Et={},po={},$1;function vg(){return $1||($1=1,Object.defineProperty(po,"__esModule",{value:!0}),po.versionedHashVersionKzg=void 0,po.versionedHashVersionKzg=1),po}var z1;function Eg(){if(z1)return Et;z1=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.InvalidVersionedHashVersionError=Et.InvalidVersionedHashSizeError=Et.EmptyBlobError=Et.BlobSizeTooLargeError=void 0;const e=vg(),r=de();class n extends r.BaseError{constructor({maxSize:a,size:c}){super("Blob size is too large.",{metaMessages:[`Max: ${a} bytes`,`Given: ${c} bytes`],name:"BlobSizeTooLargeError"})}}Et.BlobSizeTooLargeError=n;class t extends r.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}Et.EmptyBlobError=t;class o extends r.BaseError{constructor({hash:a,size:c}){super(`Versioned hash "${a}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${c}`],name:"InvalidVersionedHashSizeError"})}}Et.InvalidVersionedHashSizeError=o;class s extends r.BaseError{constructor({hash:a,version:c}){super(`Versioned hash "${a}" version is invalid.`,{metaMessages:[`Expected: ${e.versionedHashVersionKzg}`,`Received: ${c}`],name:"InvalidVersionedHashVersionError"})}}return Et.InvalidVersionedHashVersionError=s,Et}var U1;function jg(){if(U1)return ya;U1=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.toBlobs=i;const e=Jv(),r=Eg(),n=Lo(),t=Ue(),o=Ee(),s=oe();function i(a){const c=a.to??(typeof a.data=="string"?"hex":"bytes"),u=typeof a.data=="string"?(0,o.hexToBytes)(a.data):a.data,l=(0,t.size)(u);if(!l)throw new r.EmptyBlobError;if(l>e.maxBytesPerTransaction)throw new r.BlobSizeTooLargeError({maxSize:e.maxBytesPerTransaction,size:l});const f=[];let m=!0,y=0;for(;m;){const h=(0,n.createCursor)(new Uint8Array(e.bytesPerBlob));let b=0;for(;b<e.fieldElementsPerBlob;){const v=u.slice(y,y+(e.bytesPerFieldElement-1));if(h.pushByte(0),h.pushBytes(v),v.length<31){h.pushByte(128),m=!1;break}b++,y+=31}f.push(h)}return c==="bytes"?f.map(h=>h.bytes):f.map(h=>(0,s.bytesToHex)(h.bytes))}return ya}var L1;function Wu(){if(L1)return ha;L1=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.toBlobSidecars=t;const e=Gu(),r=Vu(),n=jg();function t(o){const{data:s,kzg:i,to:a}=o,c=o.blobs??(0,n.toBlobs)({data:s,to:a}),u=o.commitments??(0,e.blobsToCommitments)({blobs:c,kzg:i,to:a}),l=o.proofs??(0,r.blobsToProofs)({blobs:c,commitments:u,kzg:i,to:a}),f=[];for(let m=0;m<c.length;m++)f.push({blob:c[m],commitment:u[m],proof:l[m]});return f}return ha}var pa={},D1;function Ku(){if(D1)return pa;D1=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.getTransactionType=r;const e=nt();function r(n){if(n.type)return n.type;if(typeof n.authorizationList<"u")return"eip7702";if(typeof n.blobs<"u"||typeof n.blobVersionedHashes<"u"||typeof n.maxFeePerBlobGas<"u"||typeof n.sidecars<"u")return"eip4844";if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")return"eip1559";if(typeof n.gasPrice<"u")return typeof n.accessList<"u"?"eip2930":"legacy";throw new e.InvalidSerializableTransactionError({transaction:n})}return pa}var ga={},_a={},G1;function Xo(){if(G1)return _a;G1=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.getTransactionError=t;const e=rr(),r=nt(),n=Zo();function t(o,{docsPath:s,...i}){const a=(()=>{const c=(0,n.getNodeError)(o,i);return c instanceof e.UnknownNodeError?o:c})();return new r.TransactionExecutionError(a,{docsPath:s,...i})}return _a}var va={},V1;function jr(){if(V1)return va;V1=1,Object.defineProperty(va,"__esModule",{value:!0}),va.getChainId=r;const e=Be();async function r(n){const t=await n.request({method:"eth_chainId"},{dedupe:!0});return(0,e.hexToNumber)(t)}return va}var W1;function pf(){if(W1)return ga;W1=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.fillTransaction=l;const e=Ie(),r=Yo(),n=Xo(),t=Er(),o=Rn(),s=St(),i=me(),a=It(),c=Qr(
40),u=jr();async function l(f,m){var B,O,q,M,N;const{account:y=f.account,accessList:h,authorizationList:b,chain:v=f.chain,blobVersionedHashes:g,blobs:_,data:P,gas:d,gasPrice:w,maxFeePerBlobGas:E,maxFeePerGas:p,maxPriorityFeePerGas:S,nonce:A,nonceManager:T,to:C,type:R,value:I,...x}=m,F=await(async()=>{if(!y||!T||typeof A<"u")return A;const z=(0,e.parseAccount)(y),$=v?v.id:await(0,i.getAction)(f,u.getChainId,"getChainId")({});return await T.consume({address:z.address,chainId:$,client:f})})();(0,a.assertRequest)(m);const H=(O=(B=v==null?void 0:v.formatters)==null?void 0:B.transactionRequest)==null?void 0:O.format,k=(H||s.formatTransactionRequest)({...(0,t.extract)(x,{format:H}),account:y?(0,e.parseAccount)(y):void 0,accessList:h,authorizationList:b,blobs:_,blobVersionedHashes:g,data:P,gas:d,gasPrice:w,maxFeePerBlobGas:E,maxFeePerGas:p,maxPriorityFeePerGas:S,nonce:F,to:C,type:R,value:I},"fillTransaction");try{const z=await f.request({method:"eth_fillTransaction",params:[k]}),U=(((M=(q=v==null?void 0:v.formatters)==null?void 0:q.transaction)==null?void 0:M.format)||o.formatTransaction)(z.tx);delete U.blockHash,delete U.blockNumber,delete U.r,delete U.s,delete U.transactionIndex,delete U.v,delete U.yParity,U.data=U.input,U.gas&&(U.gas=m.gas??U.gas),U.gasPrice&&(U.gasPrice=m.gasPrice??U.gasPrice),U.maxFeePerBlobGas&&(U.maxFeePerBlobGas=m.maxFeePerBlobGas??U.maxFeePerBlobGas),U.maxFeePerGas&&(U.maxFeePerGas=m.maxFeePerGas??U.maxFeePerGas),U.maxPriorityFeePerGas&&(U.maxPriorityFeePerGas=m.maxPriorityFeePerGas??U.maxPriorityFeePerGas),typeof U.nonce<"u"&&(U.nonce=m.nonce??U.nonce);const G=await(async()=>{var Y,te;if(typeof((Y=v==null?void 0:v.fees)==null?void 0:Y.baseFeeMultiplier)=="function"){const Z=await(0,i.getAction)(f,c.getBlock,"getBlock")({});return v.fees.baseFeeMultiplier({block:Z,client:f,request:m})}return((te=v==null?void 0:v.fees)==null?void 0:te.baseFeeMultiplier)??1.2})();if(G<1)throw new r.BaseFeeScalarError;const W=10**(((N=G.toString().split(".")[1])==null?void 0:N.length)??0),V=Y=>Y*BigInt(Math.ceil(G*W))/BigInt(W);return U.feePayerSignature||(U.maxFeePerGas&&!m.maxFeePerGas&&(U.maxFeePerGas=V(U.maxFeePerGas)),U.gasPrice&&!m.gasPrice&&(U.gasPrice=V(U.gasPrice))),{raw:z.raw,transaction:{from:k.from,...U},...z.capabilities?{capabilities:z.capabilities}:{}}}catch(z){throw(0,n.getTransactionError)(z,{...m,chain:f.chain})}}return ga}var K1;function Qo(){return K1||(K1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.supportsFillTransaction=e.eip1559NetworkCache=e.defaultParameters=void 0,e.prepareTransactionRequest=g;const r=Ie(),n=gg(),t=gf(),o=Qr(),s=Du(),i=Yo(),a=Gu(),c=Vu(),u=yf(),l=Wu(),f=me(),m=Wr(),y=It(),h=Ku(),b=pf(),v=jr();e.defaultParameters=["blobVersionedHashes","chainId","fees","gas","nonce","type"],e.eip1559NetworkCache=new Map,e.supportsFillTransaction=new m.LruMap(128);async function g(_,P){var M,N,z;let d=P;d.account??(d.account=_.account),d.parameters??(d.parameters=e.defaultParameters);const{account:w,chain:E=_.chain,nonceManager:p,parameters:S}=d,A=(()=>{if(typeof(E==null?void 0:E.prepareTransactionRequest)=="function")return{fn:E.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(E==null?void 0:E.prepareTransactionRequest))return{fn:E.prepareTransactionRequest[0],runAt:E.prepareTransactionRequest[1].runAt}})();let T;async function C(){return T||(typeof d.chainId<"u"?d.chainId:E?E.id:(T=await(0,f.getAction)(_,v.getChainId,"getChainId")({}),T))}const R=w&&(0,r.parseAccount)(w);let I=d.nonce;if(S.includes("nonce")&&typeof I>"u"&&R&&p){const $=await C();I=await p.consume({address:R.address,chainId:$,client:_})}A!=null&&A.fn&&((M=A.runAt)!=null&&M.includes("beforeFillTransaction"))&&(d=await A.fn({...d,chain:E},{phase:"beforeFillTransaction"}),I??(I=d.nonce));const F=((S.includes("blobVersionedHashes")||S.includes("sidecars"))&&d.kzg&&d.blobs||e.supportsFillTransaction.get(_.uid)===!1||!["fees","gas"].some(U=>S.includes(U))?!1:!!(S.includes("chainId")&&typeof d.chainId!="number"||S.includes("nonce")&&typeof I!="number"||S.includes("fees")&&typeof d.gasPrice!="bigint"&&(typeof d.maxFeePerGas!="bigint"||typeof d.maxPriorityFeePerGas!="bigint")||S.includes("gas")&&typeof d.gas!="bigint"))?await(0,f.getAction)(_,b.fillTransaction,"fillTransaction")({...d,nonce:I}).then($=>{const{chainId:U,from:G,gas:J,gasPrice:W,nonce:V,maxFeePerBlobGas:Y,maxFeePerGas:te,maxPriorityFeePerGas:Z,type:X,...Q}=$.transaction;
40return e.supportsFillTransaction.set(_.uid,!0),{...d,...G?{from:G}:{},...X&&!d.type?{type:X}:{},...typeof U<"u"?{chainId:U}:{},...typeof J<"u"?{gas:J}:{},...typeof W<"u"?{gasPrice:W}:{},...typeof V<"u"?{nonce:V}:{},...typeof Y<"u"&&d.type!=="legacy"&&d.type!=="eip2930"?{maxFeePerBlobGas:Y}:{},...typeof te<"u"&&d.type!=="legacy"&&d.type!=="eip2930"?{maxFeePerGas:te}:{},...typeof Z<"u"&&d.type!=="legacy"&&d.type!=="eip2930"?{maxPriorityFeePerGas:Z}:{},..."nonceKey"in Q&&typeof Q.nonceKey<"u"?{nonceKey:Q.nonceKey}:{},..."keyAuthorization"in Q&&typeof Q.keyAuthorization<"u"&&Q.keyAuthorization!==null&&!("keyAuthorization"in d)?{keyAuthorization:Q.keyAuthorization}:{},..."feePayerSignature"in Q&&typeof Q.feePayerSignature<"u"&&Q.feePayerSignature!==null?{feePayerSignature:Q.feePayerSignature}:{},..."feeToken"in Q&&typeof Q.feeToken<"u"&&Q.feeToken!==null&&!("feeToken"in d)?{feeToken:Q.feeToken}:{},...$.capabilities?{_capabilities:$.capabilities}:{}}}).catch($=>{var W,V;const U=$;if(U.name!=="TransactionExecutionError")return d;if((W=U.walk)==null?void 0:W.call(U,Y=>Y.name==="ExecutionRevertedError"))throw $;return((V=U.walk)==null?void 0:V.call(U,Y=>{var Z;const te=Y;return te.name==="MethodNotFoundRpcError"||te.name==="MethodNotSupportedRpcError"||((Z=te.message)==null?void 0:Z.includes("eth_fillTransaction is not available"))}))&&e.supportsFillTransaction.set(_.uid,!1),d}):d;I??(I=F.nonce),d={...F,...R?{from:R==null?void 0:R.address}:{},...typeof I<"u"?{nonce:I}:{}};const{blobs:H,gas:j,kzg:k,type:B}=d;A!=null&&A.fn&&((N=A.runAt)!=null&&N.includes("beforeFillParameters"))&&(d=await A.fn({...d,chain:E},{phase:"beforeFillParameters"}));let O;async function q(){return O||(O=await(0,f.getAction)(_,o.getBlock,"getBlock")({blockTag:"latest"}),O)}if(S.includes("nonce")&&typeof I>"u"&&R&&!p&&(d.nonce=await(0,f.getAction)(_,s.getTransactionCount,"getTransactionCount")({address:R.address,blockTag:"pending"})),(S.includes("blobVersionedHashes")||S.includes("sidecars"))&&H&&k){const $=(0,a.blobsToCommitments)({blobs:H,kzg:k});if(S.includes("blobVersionedHashes")){const U=(0,u.commitmentsToVersionedHashes)({commitments:$,to:"hex"});d.blobVersionedHashes=U}if(S.includes("sidecars")){const U=(0,c.blobsToProofs)({blobs:H,commitments:$,kzg:k}),G=(0,l.toBlobSidecars)({blobs:H,commitments:$,proofs:U,to:"hex"});d.sidecars=G}}if(S.includes("chainId")&&(d.chainId=await C()),(S.includes("fees")||S.includes("type"))&&typeof B>"u")try{d.type=(0,h.getTransactionType)(d)}catch{let $=e.eip1559NetworkCache.get(_.uid);if(typeof $>"u"){const U=await q();$=typeof(U==null?void 0:U.baseFeePerGas)=="bigint",e.eip1559NetworkCache.set(_.uid,$)}d.type=$?"eip1559":"legacy"}if(S.includes("fees"))if(d.type!=="legacy"&&d.type!=="eip2930"){if(typeof d.maxFeePerGas>"u"||typeof d.maxPriorityFeePerGas>"u"){const $=await q(),{maxFeePerGas:U,maxPriorityFeePerGas:G}=await(0,n.internal_estimateFeesPerGas)(_,{block:$,chain:E,request:d});if(typeof d.maxPriorityFeePerGas>"u"&&d.maxFeePerGas&&d.maxFeePerGas<G)throw new i.MaxFeePerGasTooLowError({maxPriorityFeePerGas:G});d.maxPriorityFeePerGas=G,d.maxFeePerGas=U}}else{if(typeof d.maxFeePerGas<"u"||typeof d.maxPriorityFeePerGas<"u")throw new i.Eip1559FeesNotSupportedError;if(typeof d.gasPrice>"u"){const $=await q(),{gasPrice:U}=await(0,n.internal_estimateFeesPerGas)(_,{block:$,chain:E,request:d,type:"legacy"});d.gasPrice=U}}return S.includes("gas")&&typeof j>"u"&&(d.gas=await(0,f.getAction)(_,t.estimateGas,"estimateGas")({...d,account:R,prepare:(R==null?void 0:R.type)==="local"?[]:["blobVersionedHashes"]})),A!=null&&A.fn&&((z=A.runAt)!=null&&z.includes("afterFillParameters"))&&(d=await A.fn({...d,chain:E},{phase:"afterFillParameters"})),(0,y.assertRequest)(d),delete d.parameters,d}})(kd)),kd}var Z1;function gf(){if(Z1)return Ji;Z1=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.estimateGas=l;const e=Ie(),r=de(),n=Ko(),t=oe(),o=yg(),s=Er(),i=St(),a=df(),c=It(),u=Qo();async function l(f,m){var g,_,P;const{account:y=f.account,prepare:h=!0}=m,b=y?(0,e.parseAccount)(y):void 0,v=(()=>{if(Array.isArray(h))return h;if((b==null?void 0:b.type)!=="local")return["blobVersionedHashes"]})();try{const d=await(async()=>
40{if(m.to)return m.to;if(m.authorizationList&&m.authorizationList.length>0)return await(0,n.recoverAuthorizationAddress)({authorization:m.authorizationList[0]}).catch(()=>{throw new r.BaseError("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:w,authorizationList:E,blobs:p,blobVersionedHashes:S,blockNumber:A,blockTag:T,data:C,gas:R,gasPrice:I,maxFeePerBlobGas:x,maxFeePerGas:F,maxPriorityFeePerGas:H,nonce:j,value:k,stateOverride:B,...O}=h?await(0,u.prepareTransactionRequest)(f,{...m,parameters:v,to:d}):m;if(R&&m.gas!==R)return R;const M=(typeof A=="bigint"?(0,t.numberToHex)(A):void 0)||T,N=(0,a.serializeStateOverride)(B);(0,c.assertRequest)(m);const z=(P=(_=(g=f.chain)==null?void 0:g.formatters)==null?void 0:_.transactionRequest)==null?void 0:P.format,U=(z||i.formatTransactionRequest)({...(0,s.extract)(O,{format:z}),account:b,accessList:w,authorizationList:E,blobs:p,blobVersionedHashes:S,data:C,gasPrice:I,maxFeePerBlobGas:x,maxFeePerGas:F,maxPriorityFeePerGas:H,nonce:j,to:d,value:k},"estimateGas");return BigInt(await f.request({method:"eth_estimateGas",params:N?[U,M??f.experimental_blockTag??"latest",N]:M?[U,M]:[U]}))}catch(d){throw(0,o.getEstimateGasError)(d,{...m,account:b,chain:f.chain})}}return Ji}var J1;function wg(){if(J1)return Fi;J1=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.estimateContractGas=s;const e=Ie(),r=Le(),n=_r(),t=me(),o=gf();async function s(i,a){var b;const{abi:c,address:u,args:l,functionName:f,dataSuffix:m=typeof i.dataSuffix=="string"?i.dataSuffix:(b=i.dataSuffix)==null?void 0:b.value,...y}=a,h=(0,r.encodeFunctionData)({abi:c,args:l,functionName:f});try{return await(0,t.getAction)(i,o.estimateGas,"estimateGas")({data:`${h}${m?m.replace("0x",""):""}`,to:u,...y})}catch(v){const g=y.account?(0,e.parseAccount)(y.account):void 0;throw(0,n.getContractError)(v,{abi:c,address:u,args:l,docsPath:"/docs/contract/estimateContractGas",functionName:f,sender:g==null?void 0:g.address})}}return Fi}var Ea={},ja={},wa={},Pa={},Y1;function gt(){if(Y1)return Pa;Y1=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.isAddressEqual=n;const e=At(),r=rt();function n(t,o){if(!(0,r.isAddress)(t,{strict:!1}))throw new e.InvalidAddressError({address:t});if(!(0,r.isAddress)(o,{strict:!1}))throw new e.InvalidAddressError({address:o});return t.toLowerCase()===o.toLowerCase()}return Pa}var Aa={},X1;function qt(){if(X1)return Aa;X1=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.formatLog=e;function e(r,{args:n,eventName:t}={}){return{...r,blockHash:r.blockHash?r.blockHash:null,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,blockTimestamp:r.blockTimestamp?BigInt(r.blockTimestamp):r.blockTimestamp===null?null:void 0,logIndex:r.logIndex?Number(r.logIndex):null,transactionHash:r.transactionHash?r.transactionHash:null,transactionIndex:r.transactionIndex?Number(r.transactionIndex):null,...t?{args:n,eventName:t}:{}}}return Aa}var Ta={},Q1;function ei(){if(Q1)return Ta;Q1=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.decodeEventLog=a;const e=Se(),r=sg(),n=Ue(),t=In(),o=yr(),s=Qt(),i="/docs/contract/decodeEventLog";function a(u){const{abi:l,data:f,strict:m,topics:y}=u,h=m??!0,[b,...v]=y;if(!b)throw new e.AbiEventSignatureEmptyTopicsError({docsPath:i});const g=l.find(T=>T.type==="event"&&b===(0,t.toEventSelector)((0,s.formatAbiItem)(T)));if(!(g&&"name"in g)||g.type!=="event")throw new e.AbiEventSignatureNotFoundError(b,{docsPath:i});const{name:_,inputs:P}=g,d=P==null?void 0:P.some(T=>!("name"in T&&T.name)),w=d?[]:{},E=P.map((T,C)=>[T,C]).filter(([T])=>"indexed"in T&&T.indexed),p=[];for(let T=0;T<E.length;T++){const[C,R]=E[T],I=v[T];if(!I){if(h)throw new e.DecodeLogTopicsMismatch({abiItem:g,param:C});p.push([C,R]);continue}w[d?R:C.name||R]=c({param:C,value:I})}const S=P.filter(T=>!("indexed"in T&&T.indexed)),A=h?S:[...p.map(([T])=>T),...S];if(A.length>0){if(f&&f!=="0x")try{const T=(0,o.decodeAbiParameters)(A,f);if(T){let C=0;if(!h)for(const[R,I]of p)w[d?I:R.name||I]=T[C++];if(d)for(let R=0;R<P.length;R++)w[R]===void 0&&C<T.length&&(w[R]=T[C++]);else for(let R=0;R<S.length;R++)w[S[R].name]=T[C++]}}catch(T){if(h)throw T instanceof e.AbiDecodingDataSizeTooSmallError||T instanceof r.PositionOutOfBoundsError?new e.DecodeLogDataMismatch({abi
40Item:g,data:f,params:A,size:(0,n.size)(f)}):T}else if(h)throw new e.DecodeLogDataMismatch({abiItem:g,data:"0x",params:A,size:0})}return{eventName:_,args:Object.values(w).length>0?w:void 0}}function c({param:u,value:l}){return u.type==="string"||u.type==="bytes"||u.type==="tuple"||u.type.match(/^(.*)\[(\d+)?\]$/)?l:((0,o.decodeAbiParameters)([u],l)||[])[0]}return Ta}var eb;function ti(){if(eb)return wa;eb=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.parseEventLogs=i;const e=gt(),r=Ee(),n=qt(),t=tt(),o=In(),s=ei();function i(c){const{abi:u,args:l,logs:f,strict:m=!0}=c,y=(()=>{if(c.eventName)return Array.isArray(c.eventName)?c.eventName:[c.eventName]})(),h=u.filter(b=>b.type==="event").map(b=>({abi:b,selector:(0,o.toEventSelector)(b)}));return f.map(b=>{var d;const v=typeof b.blockNumber=="string"?(0,n.formatLog)(b):b,g=h.filter(w=>v.topics[0]===w.selector);if(g.length===0)return null;let _,P;for(const w of g)try{_=(0,s.decodeEventLog)({...v,abi:[w.abi],strict:!0}),P=w;break}catch{}if(!_&&!m){P=g[0];try{_=(0,s.decodeEventLog)({data:v.data,topics:v.topics,abi:[P.abi],strict:!1})}catch{const w=(d=P.abi.inputs)==null?void 0:d.some(E=>!("name"in E&&E.name));return{...v,args:w?[]:{},eventName:P.abi.name}}}return!_||!P||y&&!y.includes(_.eventName)||!a({args:_.args,inputs:P.abi.inputs,matchArgs:l})?null:{..._,...v}}).filter(Boolean)}function a(c){const{args:u,inputs:l,matchArgs:f}=c;if(!f)return!0;if(!u)return!1;function m(y,h,b){try{return y.type==="address"?(0,e.isAddressEqual)(h,b):y.type==="string"||y.type==="bytes"?(0,t.keccak256)((0,r.toBytes)(h))===b:h===b}catch{return!1}}return Array.isArray(u)&&Array.isArray(f)?f.every((y,h)=>{if(y==null)return!0;const b=l[h];return b?(Array.isArray(y)?y:[y]).some(g=>m(b,g,u[h])):!1}):typeof u=="object"&&!Array.isArray(u)&&typeof f=="object"&&!Array.isArray(f)?Object.entries(f).every(([y,h])=>{if(h==null)return!0;const b=l.find(g=>g.name===y);return b?(Array.isArray(h)?h:[h]).some(g=>m(b,g,u[y])):!1}):!1}return wa}var tb;function _f(){if(tb)return ja;tb=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.getLogs=o;const e=Zr(),r=ti(),n=oe(),t=qt();async function o(s,{address:i,blockHash:a,fromBlock:c,toBlock:u,event:l,events:f,args:m,strict:y}={}){const h=y??!1,b=f??(l?[l]:void 0);let v=[];b&&(v=[b.flatMap(d=>(0,e.encodeEventTopics)({abi:[d],eventName:d.name,args:f?void 0:m}))],l&&(v=v[0]));let g;a?g=await s.request({method:"eth_getLogs",params:[{address:i,topics:v,blockHash:a}]}):g=await s.request({method:"eth_getLogs",params:[{address:i,topics:v,fromBlock:typeof c=="bigint"?(0,n.numberToHex)(c):c,toBlock:typeof u=="bigint"?(0,n.numberToHex)(u):u}]});const _=g.map(P=>(0,t.formatLog)(P));return b?(0,r.parseEventLogs)({abi:b,args:m,logs:_,strict:h}):_}return ja}var rb;function vf(){if(rb)return Ea;rb=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.getContractEvents=t;const e=tr(),r=me(),n=_f();async function t(o,s){const{abi:i,address:a,args:c,blockHash:u,eventName:l,fromBlock:f,toBlock:m,strict:y}=s,h=l?(0,e.getAbiItem)({abi:i,name:l}):void 0,b=h?void 0:i.filter(v=>v.type==="event");return(0,r.getAction)(o,n.getLogs,"getLogs")({address:a,args:c,blockHash:u,event:h,events:b,fromBlock:f,toBlock:m,strict:y})}return Ea}var Sa={},Ia={},nb;function Rt(){if(nb)return Ia;nb=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.decodeFunctionResult=o;const e=Se(),r=yr(),n=tr(),t="/docs/contract/decodeFunctionResult";function o(s){const{abi:i,args:a,functionName:c,data:u}=s;let l=i[0];if(c){const m=(0,n.getAbiItem)({abi:i,args:a,name:c});if(!m)throw new e.AbiFunctionNotFoundError(c,{docsPath:t});l=m}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:t});if(!l.outputs)throw new e.AbiFunctionOutputsNotFoundError(l.name,{docsPath:t});const f=(0,r.decodeAbiParameters)(l.outputs,u);if(f&&f.length>1)return f;if(f&&f.length===1)return f[0]}return Ia}var go={},_o={},fe={},le={},vo={},mn={},Eo={},ob;function Yv(){return ob||(ob=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.version=void 0,Eo.version="0.1.1"),Eo}var ib;function Xv(){if(ib)return mn;ib=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.getUrl=r,mn.getVersion=n,mn.prettyPrint=t;const e=Yv();function r(o){return o}function n(){return e.version}function t(o){if(!o)return"";const s=Object.entries(o).map(([a,c])=>
40c===void 0||c===!1?null:[a,c]).filter(Boolean),i=s.reduce((a,[c])=>Math.max(a,c.length),0);return s.map(([a,c])=>` ${`${a}:`.padEnd(i+1)} ${c}`).join(` 41`)}return mn}var ab;function lt(){if(ab)return vo;ab=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.BaseError=void 0;const e=Xv();class r extends Error{static setStaticOptions(o){r.prototype.docsOrigin=o.docsOrigin,r.prototype.showVersion=o.showVersion,r.prototype.version=o.version}constructor(o,s={}){const i=(()=>{var y;if(s.cause instanceof r){if(s.cause.details)return s.cause.details;if(s.cause.shortMessage)return s.cause.shortMessage}return s.cause&&"details"in s.cause&&typeof s.cause.details=="string"?s.cause.details:(y=s.cause)!=null&&y.message?s.cause.message:s.details})(),a=s.cause instanceof r&&s.cause.docsPath||s.docsPath,c=s.docsOrigin??r.prototype.docsOrigin,u=`${c}${a??""}`,l=!!(s.version??r.prototype.showVersion),f=s.version??r.prototype.version,m=[o||"An error occurred.",...s.metaMessages?["",...s.metaMessages]:[],...i||a||l?["",i?`Details: ${i}`:void 0,a?`See: ${u}`:void 0,l?`Version: ${f}`:void 0]:[]].filter(y=>typeof y=="string").join(` 42`);super(m,s.cause?{cause:s.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=s.cause,this.details=i,this.docs=u,this.docsOrigin=c,this.docsPath=a,this.shortMessage=o,this.showVersion=l,this.version=f}walk(o){return n(this,o)}}vo.BaseError=r,Object.defineProperty(r,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${(0,e.getVersion)()}`}}),r.setStaticOptions(r.defaultStaticOptions);function n(t,o){return o!=null&&o(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?n(t.cause,o):o?null:t}return vo}var Nd={},sb;function Pg(){return sb||(sb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.charCodeMap=void 0,e.assertSize=n,e.assertStartOffset=t,e.assertEndOffset=o,e.charCodeToBase16=s,e.pad=i,e.trim=a;const r=Mt();function n(c,u){if(r.size(c)>u)throw new r.SizeOverflowError({givenSize:r.size(c),maxSize:u})}function t(c,u){if(typeof u=="number"&&u>0&&u>r.size(c)-1)throw new r.SliceOffsetOutOfBoundsError({offset:u,position:"start",size:r.size(c)})}function o(c,u,l){if(typeof u=="number"&&typeof l=="number"&&r.size(c)!==l-u)throw new r.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:r.size(c)})}e.charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102};function s(c){if(c>=e.charCodeMap.zero&&c<=e.charCodeMap.nine)return c-e.charCodeMap.zero;if(c>=e.charCodeMap.A&&c<=e.charCodeMap.F)return c-(e.charCodeMap.A-10);if(c>=e.charCodeMap.a&&c<=e.charCodeMap.f)return c-(e.charCodeMap.a-10)}function i(c,u={}){const{dir:l,size:f=32}=u;if(f===0)return c;if(c.length>f)throw new r.SizeExceedsPaddingSizeError({size:c.length,targetSize:f,type:"Bytes"});const m=new Uint8Array(f);for(let y=0;y<f;y++){const h=l==="right";m[h?y:f-y-1]=c[h?y:c.length-y-1]}return m}function a(c,u={}){const{dir:l="left"}=u;let f=c,m=0;for(let y=0;y<f.length-1&&f[l==="left"?y:f.length-y-1].toString()==="0";y++)m++;return f=l==="left"?f.slice(m):f.slice(0,f.length-m),f}})(Nd)),Nd}var ur={},cb;function Ag(){if(cb)return ur;cb=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.assertSize=r,ur.assertStartOffset=n,ur.assertEndOffset=t,ur.pad=o,ur.trim=s;const e=Ne();function r(i,a){if(e.size(i)>a)throw new e.SizeOverflowError({givenSize:e.size(i),maxSize:a})}function n(i,a){if(typeof a=="number"&&a>0&&a>e.size(i)-1)throw new e.SliceOffsetOutOfBoundsError({offset:a,position:"start",size:e.size(i)})}function t(i,a,c){if(typeof a=="number"&&typeof c=="number"&&e.size(i)!==c-a)throw new e.SliceOffsetOutOfBoundsError({offset:c,position:"end",size:e.size(i)})}function o(i,a={}){const{dir:c,size:u=32}=a;if(u===0)return i;const l=i.replace("0x","");if(l.length>u*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(l.length/2),targetSize:u,type:"Hex"});return`0x${l[c==="right"?"padEnd":"padStart"](u*2,"0")}`}function s(i,a={}){const{dir:c="left"}=a;let u=i.replace("0x",""),l=0;for(let f=0;f<u.length-1&&u[c==="left"?f:u.length-f-1].toString()==="0";f++)l++;return u=c==="left"?u.slice(l):u.slice(0,u.length-l),u==="0"?"0x":c==="right"&&u.length%2===1?`0x${u}0`:`0x${u}`}return ur}var hn={},ub;function Zu(){if(ub)return hn;ub=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.canonicalize=r,hn.parse=n,hn.stringify=t;const e="#__bigint";
42function r(o){if(o===null||typeof o=="boolean"||typeof o=="string")return JSON.stringify(o);if(typeof o=="number"){if(!Number.isFinite(o))throw new TypeError("Cannot canonicalize non-finite number");return Object.is(o,-0)?"0":JSON.stringify(o)}if(typeof o=="bigint")throw new TypeError("Cannot canonicalize bigint");if(Array.isArray(o))return`[${o.map(s=>r(s)).join(",")}]`;if(typeof o=="object")return`{${Object.keys(o).sort().reduce((i,a)=>{const c=o[a];return c!==void 0&&i.push(`${JSON.stringify(a)}:${r(c)}`),i},[]).join(",")}}`}function n(o,s){return JSON.parse(o,(i,a)=>{const c=a;return typeof c=="string"&&c.endsWith(e)?BigInt(c.slice(0,-e.length)):typeof s=="function"?s(i,c):c})}function t(o,s,i){return JSON.stringify(o,(a,c)=>typeof s=="function"?s(a,c):typeof c=="bigint"?c.toString()+e:c,i)}return hn}var db;function Mt(){if(db)return le;db=1,Object.defineProperty(le,"__esModule",{value:!0}),le.SizeExceedsPaddingSizeError=le.SliceOffsetOutOfBoundsError=le.SizeOverflowError=le.InvalidBytesTypeError=le.InvalidBytesBooleanError=void 0,le.assert=c,le.concat=u,le.from=l,le.fromArray=f,le.fromBoolean=m,le.fromHex=y,le.fromNumber=h,le.fromString=b,le.isEqual=v,le.padLeft=g,le.padRight=_,le.random=P,le.size=d,le.slice=w,le.toBigInt=E,le.toBoolean=p,le.toHex=S,le.toNumber=A,le.toString=T,le.trimLeft=C,le.trimRight=R,le.validate=I;const e=Yr(),r=lt(),n=Ne(),t=Pg(),o=Ag(),s=Zu(),i=new TextDecoder,a=new TextEncoder;function c(B){if(!(B instanceof Uint8Array)){if(!B)throw new F(B);if(typeof B!="object")throw new F(B);if(!("BYTES_PER_ELEMENT"in B))throw new F(B);if(B.BYTES_PER_ELEMENT!==1||B.constructor.name!=="Uint8Array")throw new F(B)}}function u(...B){let O=0;for(const M of B)O+=M.length;const q=new Uint8Array(O);for(let M=0,N=0;M<B.length;M++){const z=B[M];q.set(z,N),N+=z.length}return q}function l(B){return B instanceof Uint8Array?B:typeof B=="string"?y(B):f(B)}function f(B){return B instanceof Uint8Array?B:new Uint8Array(B)}function m(B,O={}){const{size:q}=O,M=new Uint8Array(1);return M[0]=Number(B),typeof q=="number"?(t.assertSize(M,q),g(M,q)):M}function y(B,O={}){const{size:q}=O;let M=B;q&&(o.assertSize(B,q),M=n.padRight(B,q));let N=M.slice(2);N.length%2&&(N=`0${N}`);const z=N.length/2,$=new Uint8Array(z);for(let U=0,G=0;U<z;U++){const J=t.charCodeToBase16(N.charCodeAt(G++)),W=t.charCodeToBase16(N.charCodeAt(G++));if(J===void 0||W===void 0)throw new r.BaseError(`Invalid byte sequence ("${N[G-2]}${N[G-1]}" in "${N}").`);$[U]=J<<4|W}return $}function h(B,O){const q=n.fromNumber(B,O);return y(q)}function b(B,O={}){const{size:q}=O,M=a.encode(B);return typeof q=="number"?(t.assertSize(M,q),_(M,q)):M}function v(B,O){return(0,e.equalBytes)(B,O)}function g(B,O){return t.pad(B,{dir:"left",size:O})}function _(B,O){return t.pad(B,{dir:"right",size:O})}function P(B){return crypto.getRandomValues(new Uint8Array(B))}function d(B){return B.length}function w(B,O,q,M={}){const{strict:N}=M;t.assertStartOffset(B,O);const z=B.slice(O,q);return N&&t.assertEndOffset(z,O,q),z}function E(B,O={}){const{size:q}=O;typeof q<"u"&&t.assertSize(B,q);const M=n.fromBytes(B,O);return n.toBigInt(M,O)}function p(B,O={}){const{size:q}=O;let M=B;if(typeof q<"u"&&(t.assertSize(M,q),M=C(M)),M.length>1||M[0]>1)throw new x(M);return!!M[0]}function S(B,O={}){return n.fromBytes(B,O)}function A(B,O={}){const{size:q}=O;typeof q<"u"&&t.assertSize(B,q);const M=n.fromBytes(B,O);return n.toNumber(M,O)}function T(B,O={}){const{size:q}=O;let M=B;return typeof q<"u"&&(t.assertSize(M,q),M=R(M)),i.decode(M)}function C(B){return t.trim(B,{dir:"left"})}function R(B){return t.trim(B,{dir:"right"})}function I(B){try{return c(B),!0}catch{return!1}}class x extends r.BaseError{constructor(O){super(`Bytes value \`${O}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}le.InvalidBytesBooleanError=x;class F extends r.BaseError{constructor(O){super(`Value \`${typeof O=="object"?s.stringify(O):O}\` of type \`${typeof O}
42\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}le.InvalidBytesTypeError=F;class H extends r.BaseError{constructor({givenSize:O,maxSize:q}){super(`Size cannot exceed \`${q}\` bytes. Given size: \`${O}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}le.SizeOverflowError=H;class j extends r.BaseError{constructor({offset:O,position:q,size:M}){super(`Slice ${q==="start"?"starting":"ending"} at offset \`${O}\` is out-of-bounds (size: \`${M}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}le.SliceOffsetOutOfBoundsError=j;class k extends r.BaseError{constructor({size:O,targetSize:q,type:M}){super(`${M.charAt(0).toUpperCase()}${M.slice(1).toLowerCase()} size (\`${O}\`) exceeds padding size (\`${q}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}return le.SizeExceedsPaddingSizeError=k,le}var fb;function Ne(){if(fb)return fe;fb=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.SizeExceedsPaddingSizeError=fe.SliceOffsetOutOfBoundsError=fe.SizeOverflowError=fe.InvalidLengthError=fe.InvalidHexValueError=fe.InvalidHexTypeError=fe.InvalidHexBooleanError=fe.IntegerOutOfRangeError=void 0,fe.assert=c,fe.concat=u,fe.from=l,fe.fromBoolean=f,fe.fromBytes=m,fe.fromNumber=y,fe.fromString=h,fe.isEqual=b,fe.padLeft=v,fe.padRight=g,fe.random=_,fe.slice=P,fe.size=d,fe.trimLeft=w,fe.trimRight=E,fe.toBigInt=p,fe.toBoolean=S,fe.toBytes=A,fe.toNumber=T,fe.toString=C,fe.validate=R;const e=Yr(),r=Mt(),n=lt(),t=Pg(),o=Ag(),s=Zu(),i=new TextEncoder,a=Array.from({length:256},(q,M)=>M.toString(16).padStart(2,"0"));function c(q,M={}){const{strict:N=!1}=M;if(!q)throw new F(q);if(typeof q!="string")throw new F(q);if(N&&!/^0x[0-9a-fA-F]*$/.test(q))throw new H(q);if(!q.startsWith("0x"))throw new H(q)}function u(...q){return`0x${q.reduce((M,N)=>M+N.replace("0x",""),"")}`}function l(q){return q instanceof Uint8Array?m(q):Array.isArray(q)?m(new Uint8Array(q)):q}function f(q,M={}){const N=`0x${Number(q)}`;return typeof M.size=="number"?(o.assertSize(N,M.size),v(N,M.size)):N}function m(q,M={}){let N="";for(let $=0;$<q.length;$++)N+=a[q[$]];const z=`0x${N}`;return typeof M.size=="number"?(o.assertSize(z,M.size),g(z,M.size)):z}function y(q,M={}){const{signed:N,size:z}=M,$=BigInt(q);let U;z?N?U=(1n<<BigInt(z)*8n-1n)-1n:U=2n**(BigInt(z)*8n)-1n:typeof q=="number"&&(U=BigInt(Number.MAX_SAFE_INTEGER));const G=typeof U=="bigint"&&N?-U-1n:0;if(U&&$>U||$<G){const V=typeof q=="bigint"?"n":"";throw new I({max:U?`${U}${V}`:void 0,min:`${G}${V}`,signed:N,size:z,value:`${q}${V}`})}const W=`0x${(N&&$<0?BigInt.asUintN(z*8,BigInt($)):$).toString(16)}`;return z?v(W,z):W}function h(q,M={}){return m(i.encode(q),M)}function b(q,M){return(0,e.equalBytes)(r.fromHex(q),r.fromHex(M))}function v(q,M){return o.pad(q,{dir:"left",size:M})}function g(q,M){return o.pad(q,{dir:"right",size:M})}function _(q){return m(r.random(q))}function P(q,M,N,z={}){const{strict:$}=z;o.assertStartOffset(q,M);const U=`0x${q.replace("0x","").slice((M??0)*2,(N??q.length)*2)}`;return $&&o.assertEndOffset(U,M,N),U}function d(q){return Math.ceil((q.length-2)/2)}function w(q){return o.trim(q,{dir:"left"})}function E(q){return o.trim(q,{dir:"right"})}function p(q,M={}){const{signed:N}=M;M.size&&o.assertSize(q,M.size);const z=BigInt(q);if(!N)return z;const $=(q.length-2)/2,U=(1n<<BigInt($)*8n)-1n,G=U>>1n;return z<=G?z:z-U-1n}function S(q,M={}){M.size&&o.assertSize(q,M.size);const N=w(q);if(N==="0x")return!1;if(N==="0x1")return!0;throw new x(q)}function A(q,M={}){return r.fromHex(q,M)}function T(q,M={}){const{signed:N,size:z}=M;return Number(!N&&!z?q:p(q,M))}function C(q,M={}){const{size:N}=M;let z=r.fromHex(q);return N&&(t.assertSize(z,N),z=r.trimRight(z)),new TextDecoder().decode(z)}function R(q,M={}){const{strict:N=!1}=M;try{return c(q,{strict:N}),!0}catch{return!1}}class I extends n.BaseError{constructor({max:M,min:N,signed:z,size:$,value:U}){super(`Number \`${U}\` is not in safe${$?` ${$*8}-bit`:""}${z?" signed":" unsigned"} integer range ${M?`(\`${N}\` to \`${M}\`)`:`(above \`${N}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}fe.IntegerOutOfRangeError=I;class x extends n.BaseError{constructor(M){super(`Hex value \`"${M}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}fe.InvalidHexBooleanError=x;class F extends n.BaseError{constructor(M){super(`Value \`${typeof M=="object"?s.stringify(M):M}\` of type \`${typeof M}
42\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}fe.InvalidHexTypeError=F;class H extends n.BaseError{constructor(M){super(`Value \`${M}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}fe.InvalidHexValueError=H;class j extends n.BaseError{constructor(M){super(`Hex value \`"${M}"\` is an odd length (${M.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}fe.InvalidLengthError=j;class k extends n.BaseError{constructor({givenSize:M,maxSize:N}){super(`Size cannot exceed \`${N}\` bytes. Given size: \`${M}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}fe.SizeOverflowError=k;class B extends n.BaseError{constructor({offset:M,position:N,size:z}){super(`Slice ${N==="start"?"starting":"ending"} at offset \`${M}\` is out-of-bounds (size: \`${z}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}fe.SliceOffsetOutOfBoundsError=B;class O extends n.BaseError{constructor({size:M,targetSize:N,type:z}){super(`${z.charAt(0).toUpperCase()}${z.slice(1).toLowerCase()} size (\`${M}\`) exceeds padding size (\`${N}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}return fe.SizeExceedsPaddingSizeError=O,fe}var jo={},lb;function Qv(){if(lb)return jo;lb=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.fromRpc=r,jo.toRpc=n;const e=Ne();function r(t){return{...t,amount:BigInt(t.amount),index:Number(t.index),validatorIndex:Number(t.validatorIndex)}}function n(t){return{address:t.address,amount:e.fromNumber(t.amount),index:e.fromNumber(t.index),validatorIndex:e.fromNumber(t.validatorIndex)}}return jo}var bb;function Tg(){if(bb)return _o;bb=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.fromRpc=n,_o.toRpc=t;const e=Ne(),r=Qv();function n(o){return{...o.baseFeePerGas&&{baseFeePerGas:BigInt(o.baseFeePerGas)},...o.blobBaseFee&&{blobBaseFee:BigInt(o.blobBaseFee)},...o.feeRecipient&&{feeRecipient:o.feeRecipient},...o.gasLimit&&{gasLimit:BigInt(o.gasLimit)},...o.number&&{number:BigInt(o.number)},...o.prevRandao&&{prevRandao:BigInt(o.prevRandao)},...o.time&&{time:BigInt(o.time)},...o.withdrawals&&{withdrawals:o.withdrawals.map(r.fromRpc)}}}function t(o){return{...typeof o.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(o.baseFeePerGas)},...typeof o.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(o.blobBaseFee)},...typeof o.feeRecipient=="string"&&{feeRecipient:o.feeRecipient},...typeof o.gasLimit=="bigint"&&{gasLimit:e.fromNumber(o.gasLimit)},...typeof o.number=="bigint"&&{number:e.fromNumber(o.number)},...typeof o.prevRandao=="bigint"&&{prevRandao:e.fromNumber(o.prevRandao)},...typeof o.time=="bigint"&&{time:e.fromNumber(o.time)},...o.withdrawals&&{withdrawals:o.withdrawals.map(r.toRpc)}}}return _o}var ge={},mb;function kt(){if(mb)return ge;mb=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.erc4626Abi=ge.erc721Abi=ge.erc1155Abi=ge.erc20Abi_bytes32=ge.erc20Abi=ge.erc6492SignatureValidatorAbi=ge.erc1271Abi=ge.addressResolverAbi=ge.textResolverAbi=ge.universalResolverReverseAbi=ge.universalResolverResolveAbi=ge.batchGatewayAbi=ge.multicall3Abi=void 0,ge.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],ge.batchGatewayAbi=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];const e=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"}
42,{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}];return ge.universalResolverResolveAbi=[...e,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],ge.universalResolverReverseAbi=[...e,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],ge.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],ge.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],ge.erc1271Abi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],ge.erc6492SignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],ge.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],ge.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],ge.erc1155Abi=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}
42],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}
42],ge.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],ge.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],ge}var wo={},hb;function e6(){return hb||(hb=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.aggregate3Signature=void 0,wo.aggregate3Signature="0x82ad56cb"),wo}var jt={},yb;
42function ri(){return yb||(yb=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.multicall3Bytecode=jt.erc6492SignatureValidatorByteCode=jt.deploylessCallViaFactoryBytecode=jt.deploylessCallViaBytecodeBytecode=void 0,jt.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",jt.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",jt.erc6492SignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b8152
4260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848
42603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",jt.multicall3Bytecode="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
42150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"),jt}var ct={},pb;function ni(){if(pb)return ct;pb=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.InvalidChainIdError=ct.ClientChainNotConfiguredError=ct.ChainNotFoundError=ct.ChainMismatchError=ct.ChainDoesNotSupportContract=void 0;const e=de();class r extends e.BaseError{constructor({blockNumber:a,chain:c,contract:u}){super(`Chain "${c.name}" does not support contract "${u.name}".`,{metaMessages:["This could be due to any of the following:",...a&&u.blockCreated&&u.blockCreated>a?[`- The contract "${u.name}" was not deployed until block ${u.blockCreated} (current block ${a}).`]:[`- The chain does not have the contract "${u.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}ct.ChainDoesNotSupportContract=r;class n extends e.BaseError{constructor({chain:a,currentChainId:c}){super(`The current chain of the wallet (id: ${c}) does not match the target chain for the transaction (id: ${a.id} – ${a.name}).`,{metaMessages:[`Current Chain ID: ${c}`,`Expected Chain ID: ${a.id} – ${a.name}`],name:"ChainMismatchError"})}}ct.ChainMismatchError=n;class t extends e.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` 43`),{name:"ChainNotFoundError"})}}ct.ChainNotFoundError=t;class o extends e.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}ct.ClientChainNotConfiguredError=o;class s extends e.BaseError{constructor({chainId:a}){super(typeof a=="number"?`Chain ID "${a}
43" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}return ct.InvalidChainIdError=s,ct}var Ra={},gb;function oi(){if(gb)return Ra;gb=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.encodeDeployData=o;const e=Se(),r=qe(),n=Tt(),t="/docs/contract/encodeDeployData";function o(s){const{abi:i,args:a,bytecode:c}=s;if(!a||a.length===0)return c;const u=i.find(f=>"type"in f&&f.type==="constructor");if(!u)throw new e.AbiConstructorNotFoundError({docsPath:t});if(!("inputs"in u))throw new e.AbiConstructorParamsNotFoundError({docsPath:t});if(!u.inputs||u.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:t});const l=(0,n.encodeAbiParameters)(u.inputs,a);return(0,r.concatHex)([c,l])}return Ra}var Ba={},_b;function wr(){if(_b)return Ba;_b=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.getChainContractAddress=r;const e=ni();function r({blockNumber:n,chain:t,contract:o}){var i;const s=(i=t==null?void 0:t.contracts)==null?void 0:i[o];if(!s)throw new e.ChainDoesNotSupportContract({chain:t,contract:{name:o}});if(n&&s.blockCreated&&s.blockCreated>n)throw new e.ChainDoesNotSupportContract({blockNumber:n,chain:t,contract:{name:o,blockCreated:s.blockCreated}});return s.address}return Ba}var Oa={},vb;function Ef(){if(vb)return Oa;vb=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.getCallError=t;const e=pr(),r=rr(),n=Zo();function t(o,{docsPath:s,...i}){const a=(()=>{const c=(0,n.getNodeError)(o,i);return c instanceof r.UnknownNodeError?o:c})();return new e.CallExecutionError(a,{docsPath:s,...i})}return Oa}var Ca={},xa={},Eb;function jf(){if(Eb)return xa;Eb=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.withResolvers=e;function e(){let r=()=>{},n=()=>{};return{promise:new Promise((o,s)=>{r=o,n=s}),resolve:r,reject:n}}return xa}var jb;function wf(){if(jb)return Ca;jb=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.createBatchScheduler=n;const e=jf(),r=new Map;
43function n({fn:t,id:o,shouldSplitBatch:s,wait:i=0,sort:a}){const c=async()=>{const y=f();u();const h=y.map(({args:b})=>b);h.length!==0&&t(h).then(b=>{a&&Array.isArray(b)&&b.sort(a);for(let v=0;v<y.length;v++){const{resolve:g}=y[v];g==null||g([b[v],b])}}).catch(b=>{for(let v=0;v<y.length;v++){const{reject:g}=y[v];g==null||g(b)}})},u=()=>r.delete(o),l=()=>f().map(({args:y})=>y),f=()=>r.get(o)||[],m=y=>r.set(o,[...f(),y]);return{flush:u,async schedule(y){const{promise:h,resolve:b,reject:v}=(0,e.withResolvers)();return(s==null?void 0:s([...l(),y]))&&c(),f().length>0?(m({args:y,resolve:b,reject:v}),h):(m({args:y,resolve:b,reject:v}),setTimeout(c,i),h)}}}return Ca}var $d={},Yt={},wb;function t6(){if(wb)return Yt;wb=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.OffchainLookupSenderMismatchError=Yt.OffchainLookupResponseMalformedError=Yt.OffchainLookupError=void 0;const e=Fe(),r=de(),n=xt();class t extends r.BaseError{constructor({callbackSelector:a,cause:c,data:u,extraData:l,sender:f,urls:m}){var y;super(c.shortMessage||"An error occurred while fetching for an offchain result.",{cause:c,metaMessages:[...c.metaMessages||[],(y=c.metaMessages)!=null&&y.length?"":[],"Offchain Gateway Call:",m&&[" Gateway URL(s):",...m.map(h=>` ${(0,n.getUrl)(h)}`)],` Sender: ${f}`,` Data: ${u}`,` Callback selector: ${a}`,` Extra data: ${l}`].flat(),name:"OffchainLookupError"})}}Yt.OffchainLookupError=t;class o extends r.BaseError{constructor({result:a,url:c}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,n.getUrl)(c)}`,`Response: ${(0,e.stringify)(a)}`],name:"OffchainLookupResponseMalformedError"})}}Yt.OffchainLookupResponseMalformedError=o;class s extends r.BaseError{constructor({sender:a,to:c}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${c}`,`OffchainLookup sender address: ${a}`],name:"OffchainLookupSenderMismatchError"})}}return Yt.OffchainLookupSenderMismatchError=s,Yt}var zd={},qa={},Pb;function Pf(){if(Pb)return qa;Pb=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.decodeFunctionData=s;const e=Se(),r=ft(),n=Kr(),t=yr(),o=Qt();function s(i){const{abi:a,data:c}=i,u=(0,r.slice)(c,0,4),l=a.find(f=>f.type==="function"&&u===(0,n.toFunctionSelector)((0,o.formatAbiItem)(f)));if(!l)throw new e.AbiFunctionSignatureNotFoundError(u,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:l.name,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,t.decodeAbiParameters)(l.inputs,(0,r.slice)(c,4)):void 0}}return qa}var Ma={},Ab;function Af(){if(Ab)return Ma;Ab=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.encodeErrorResult=a;const e=Se(),r=qe(),n=Kr(),t=Tt(),o=Qt(),s=tr(),i="/docs/contract/encodeErrorResult";function a(c){const{abi:u,errorName:l,args:f}=c;let m=u[0];if(l){const v=(0,s.getAbiItem)({abi:u,args:f,name:l});if(!v)throw new e.AbiErrorNotFoundError(l,{docsPath:i});m=v}if(m.type!=="error")throw new e.AbiErrorNotFoundError(void 0,{docsPath:i});const y=(0,o.formatAbiItem)(m),h=(0,n.toFunctionSelector)(y);let b="0x";if(f&&f.length>0){if(!m.inputs)throw new e.AbiErrorInputsNotFoundError(m.name,{docsPath:i});b=(0,t.encodeAbiParameters)(m.inputs,f)}return(0,r.concatHex)([h,b])}return Ma}var ka={},Tb;function Tf(){if(Tb)return ka;Tb=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.encodeFunctionResult=o;const e=Se(),r=Tt(),n=tr(),t="/docs/contract/encodeFunctionResult";function o(s){const{abi:i,functionName:a,result:c}=s;let u=i[0];if(a){const f=(0,n.getAbiItem)({abi:i,name:a});if(!f)throw new e.AbiFunctionNotFoundError(a,{docsPath:t});u=f}if(u.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:t});if(!u.outputs)throw new e.AbiFunctionOutputsNotFoundError(u.name,{docsPath:t});const l=(()=>{if(u.outputs.length===0)return[];if(u.outputs.length===1)return[c];if(Array.isArray(c))return c;throw new e.InvalidArrayError(c)})();return(0,r.encodeAbiParameters)(u.outputs,l)}return ka}var Sb;function ii(){return Sb||(Sb=1,(function(e){Object.defineProperty(e,"__esMo
43dule",{value:!0}),e.localBatchGatewayUrl=void 0,e.localBatchGatewayRequest=i;const r=kt(),n=$u(),t=Pf(),o=Af(),s=Tf();e.localBatchGatewayUrl="x-batch-gateway:true";async function i(c){const{data:u,ccipRequest:l}=c,{args:[f]}=(0,t.decodeFunctionData)({abi:r.batchGatewayAbi,data:u}),m=[],y=[];return await Promise.all(f.map(async(h,b)=>{try{y[b]=h.urls.includes(e.localBatchGatewayUrl)?await i({data:h.data,ccipRequest:l}):await l(h),m[b]=!1}catch(v){m[b]=!0,y[b]=a(v)}})),(0,s.encodeFunctionResult)({abi:r.batchGatewayAbi,functionName:"query",result:[m,y]})}function a(c){return c.name==="HttpRequestError"&&c.status?(0,o.encodeErrorResult)({abi:r.batchGatewayAbi,errorName:"HttpError",args:[c.status,c.shortMessage]}):(0,o.encodeErrorResult)({abi:[n.solidityError],errorName:"Error",args:["shortMessage"in c?c.shortMessage:c.message]})}})(zd)),zd}var Ib;function Ju(){return Ib||(Ib=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.offchainLookupAbiItem=e.offchainLookupSignature=void 0,e.offchainLookup=m,e.ccipRequest=y;const r=On(),n=t6(),t=pt(),o=xt(),s=Do(),i=Tt(),a=gt(),c=qe(),u=Ze(),l=ii(),f=Fe();e.offchainLookupSignature="0x556f1830",e.offchainLookupAbiItem={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function m(h,{blockNumber:b,blockTag:v,data:g,requestOptions:_,to:P}){var R;const{args:d}=(0,s.decodeErrorResult)({data:g,abi:[e.offchainLookupAbiItem]}),[w,E,p,S,A]=d,{ccipRead:T}=h,C=T&&typeof(T==null?void 0:T.request)=="function"?T.request:y;try{if(!(0,a.isAddressEqual)(P,w))throw new n.OffchainLookupSenderMismatchError({sender:w,to:P});const I=E.includes(l.localBatchGatewayUrl)?await(0,l.localBatchGatewayRequest)({data:p,ccipRequest:F=>C({...F,requestOptions:_})}):await C({data:p,requestOptions:_,sender:w,urls:E}),{data:x}=await(0,r.call)(h,{blockNumber:b,blockTag:v,data:(0,c.concat)([S,(0,i.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[I,A])]),requestOptions:_,to:P});return x}catch(I){throw(R=_==null?void 0:_.signal)!=null&&R.aborted?(0,o.getAbortError)(_.signal):(0,o.isAbortError)(I)?I:new n.OffchainLookupError({callbackSelector:S,cause:I,data:g,extraData:A,sender:w,urls:E})}}async function y({data:h,requestOptions:b,sender:v,urls:g}){var P,d,w;let _=new Error("An unknown error occurred.");for(let E=0;E<g.length;E++){if((P=b==null?void 0:b.signal)!=null&&P.aborted)throw(0,o.getAbortError)(b.signal);const p=g[E],S=p.includes("{data}")?"GET":"POST",A=S==="POST"?{data:h,sender:v}:void 0,T=S==="POST"?{"Content-Type":"application/json"}:{};try{const C=await fetch(p.replace("{sender}",v.toLowerCase()).replace("{data}",h),{body:JSON.stringify(A),headers:T,method:S,...b!=null&&b.signal?{signal:b.signal}:{}});let R;if((d=C.headers.get("Content-Type"))!=null&&d.startsWith("application/json")?R=(await C.json()).data:R=await C.text(),!C.ok){_=new t.HttpRequestError({body:A,details:R!=null&&R.error?(0,f.stringify)(R.error):C.statusText,headers:C.headers,status:C.status,url:p});continue}if(!(0,u.isHex)(R)){_=new n.OffchainLookupResponseMalformedError({result:R,url:p});continue}return R}catch(C){if((w=b==null?void 0:b.signal)!=null&&w.aborted)throw(0,o.getAbortError)(b.signal);if((0,o.isAbortError)(C))throw C;_=new t.HttpRequestError({body:A,details:C.message,url:p})}}throw _}})($d)),$d}var Rb;function On(){if(Rb)return go;Rb=1,Object.defineProperty(go,"__esModule",{value:!0}),go.call=E,go.getRevertErrorData=H;const e=br(),r=Tg(),n=Ie(),t=kt(),o=e6(),s=ri(),i=de(),a=ni(),c=pr(),u=xt(),l=Rt(),f=oi(),m=Le(),y=gt(),h=Bn(),b=wr(),v=Ef(),g=Er(),_=St(),P=wf(),d=df(),w=It();async function E(j,k){var Bt,ot,De,ht,it,Xe;const{account:B=j.account,authorizationList:O,batch:q=!!((Bt=j.batch)!=null&&Bt.multicall),blockHash:M,blockNumber:N,blockTag:z=j.experimental_blockTag??"latest",requireCanonical:$,accessList:U,blobs:G,blockOverrides:J,code:W,data:V,factory:Y,factoryData:te,gas:Z,gasPrice:X,maxFeePerBlobGas:Q,maxFeePerGas:ne,maxPriorityFeePerGas:re,nonce:ae,requestOptions:ce,to:
43he,value:ee,stateOverride:K,...pe}=k,Ce=B?(0,n.parseAccount)(B):void 0;if(W&&(Y||te))throw new i.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(W&&he)throw new i.BaseError("Cannot provide both `code` & `to` as parameters.");const xe=W&&V,bt=Y&&te&&he&&V,Ye=xe||bt,mt=xe?x({code:W,data:V}):bt?F({data:V,factory:Y,factoryData:te,to:he}):V;try{(0,w.assertRequest)(k);const _t=(0,h.formatBlockParameter)({blockHash:M,blockNumber:N,blockTag:z,requireCanonical:$}),Me=J?r.toRpc(J):void 0,ke=(0,d.serializeStateOverride)(K),nr=(ht=(De=(ot=j.chain)==null?void 0:ot.formatters)==null?void 0:De.transactionRequest)==null?void 0:ht.format,or=(nr||_.formatTransactionRequest)({...(0,g.extract)(pe,{format:nr}),accessList:U,account:Ce,authorizationList:O,blobs:G,data:mt,gas:Z,gasPrice:X,maxFeePerBlobGas:Q,maxFeePerGas:ne,maxPriorityFeePerGas:re,nonce:ae,to:Ye?void 0:he,value:ee},"call");if(q&&p({request:or})&&!Me&&M===void 0)try{const{deployless:$e=!1}=typeof((it=j.batch)==null?void 0:it.multicall)=="object"?j.batch.multicall:{},Tr=R(j,{blockNumber:N,deployless:$e});if(!Tr||!I(ke,Tr))return await C(j,{...or,blockHash:M,blockNumber:N,blockTag:z,multicallAddress:Tr,requestOptions:ce,requireCanonical:$,rpcStateOverride:ke})}catch($e){if(!($e instanceof a.ClientChainNotConfiguredError)&&!($e instanceof a.ChainDoesNotSupportContract))throw $e}const qn=(()=>{const $e=[or,_t];return ke&&Me?[...$e,ke,Me]:ke?[...$e,ke]:Me?[...$e,{},Me]:$e})(),Ar=await j.request({method:"eth_call",params:qn},ce);return Ar==="0x"?{data:void 0}:{data:Ar}}catch(_t){if((Xe=ce==null?void 0:ce.signal)!=null&&Xe.aborted)throw(0,u.getAbortError)(ce.signal);if((0,u.isAbortError)(_t))throw _t;const Me=H(_t),{offchainLookup:ke,offchainLookupSignature:nr}=await Promise.resolve().then(()=>Ju());if(j.ccipRead!==!1&&(Me==null?void 0:Me.slice(0,10))===nr&&he)return{data:await ke(j,{data:Me,requestOptions:ce,to:he})};throw Ye&&(Me==null?void 0:Me.slice(0,10))==="0x101bb98d"?new c.CounterfactualDeploymentFailedError({factory:Y}):(0,v.getCallError)(_t,{...k,account:Ce,chain:j.chain})}}function p({request:j}){const{data:k,to:B,...O}=j;return!(!k||k.startsWith(o.aggregate3Signature)||!B||Object.values(O).filter(q=>typeof q<"u").length>0)}let S=0;const A=new WeakMap;function T(j){if(!j)return"default";const k=A.get(j);if(k!==void 0)return k;const B=S++;return A.set(j,B),B}async function C(j,k){var ae;const{batchSize:B=1024,deployless:O=!1,wait:q=0}=typeof((ae=j.batch)==null?void 0:ae.multicall)=="object"?j.batch.multicall:{},{blockHash:M,blockNumber:N,blockTag:z=j.experimental_blockTag??"latest",requireCanonical:$,data:U,multicallAddress:G,requestOptions:J,rpcStateOverride:W,to:V}=k,Y=G!==void 0?G:R(j,{blockNumber:N,deployless:O}),te=(0,h.formatBlockParameter)({blockHash:M,blockNumber:N,blockTag:z,requireCanonical:$}),Z=typeof te=="string"?te:JSON.stringify(te),X=W?`.${JSON.stringify(W)}`:"",{schedule:Q}=(0,P.createBatchScheduler)({id:`${j.uid}.${Z}.${T(J)}${X}`,wait:q,shouldSplitBatch(ce){return ce.reduce((ee,{data:K})=>ee+(K.length-2),0)>B*2},fn:async ce=>{const he=ce.map(Ce=>({allowFailure:!0,callData:Ce.data,target:Ce.to})),ee=(0,m.encodeFunctionData)({abi:t.multicall3Abi,args:[he],functionName:"aggregate3"}),K={...Y===null?{data:x({code:s.multicall3Bytecode,data:ee})}:{to:Y,data:ee}},pe=await j.request({method:"eth_call",params:W?[K,te,W]:[K,te]},J);return(0,l.decodeFunctionResult)({abi:t.multicall3Abi,args:[he],functionName:"aggregate3",data:pe||"0x"})}}),[{returnData:ne,success:re}]=await Q({data:U,to:V});if(!re)throw new c.RawContractError({data:ne});return ne==="0x"?{data:void 0}:{data:ne}}function R(j,k){const{blockNumber:B,deployless:O}=k;if(O)return null;if(j.chain)return(0,b.getChainContractAddress)({blockNumber:B,chain:j.chain,contract:"multicall3"});throw new a.ClientChainNotConfiguredError}function I(j,k){return j?Object.keys(j).some(B=>(0,y.isAddressEqual)(B,k)):!1}function x(j){const{code:k,data:B}=j;return(0,f.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(bytes, bytes)"]),bytecode:s.deploylessCallViaBytecodeBytecode,args:[k,B]})}function F(j){const{data:k,factory:B,factoryData:O,to:q}=j;return(0,f.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:s.deploylessCallViaFactoryBytecode,args:[q,k,B,O]})}function H(j){var B;if(!(j instanceof i.BaseError))return;const k=j.walk();return typeof(k==null?void 0:k.data)=="object"?(B=k.data)==null?void 0:B.data:k.data}return go}var Bb;function Ht(){if(Bb)return Sa;Bb=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.readContract=s;const e=Rt(),r=Le(),n=_r(),t=me(),o=On();async function s(i,a){const{abi:c,address:u,args:l,functionName:f,...m}=a,y=(0,r.encodeFunctionData)({abi:c,args:l,functionName:f});try{const{data:h}=await(0,t.getAction)(i,o.call,"call")({...m,data:y,to:u});return(0,e.decodeFunctionResult)({abi:c,args:l,functionName:f,data:h||"0x"})}catch(h){throw(0,n.getContractError)(h,{abi:c,address:u,args:l,docsPath:"/docs/contract/readContract",functionName:f})}}return Sa}var Ha={},Ob;function Sg(){if(Ob)return Ha;Ob=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.simulateContract=i;const e=Ie(),r=Rt(),n=Le(),t=_r(),o=me(),s=On();async function i(a,c){var g;const{abi:u,address:l,args:f,functionName:m,dataSuffix:y=typeof a.dataSuffix=="string"?a.dataSuffix:(g=a.dataSuffix)==null?void 0:g.value,...h}=c,b=h.account?(0,e.parseAccount)(h.account):a.account,v=(0,n.encodeFunctionData)({abi:u,args:f,functionName:m});try{const{data:_}=await(0,o.getAction)(a,s.call,"call")({batch:!1,data:`${v}${y?y.replace("0x",""):""}`,to:l,...h,account:b}),P=(0,r.decodeFunctionResult)({abi:u,args:f,functionName:m,data:_||"0x"}),d=u.filter(w=>"name"in w&&w.name===c.functionName);return{result:P,request:{abi:d,address:l,args:f,dataSuffix:y,functionName:m,...h,account:b}}}catch(_){throw(0,t.getContractError)(_,{abi:u,address:l,args:f,docsPath:"/docs/contract/simulateContract",functionName:m,sender:b==null?void 0:b.address})}}return Ha}var Fa={},Ud={},Cb;function en(){return Cb||(Cb=1,(function(e){Object.defineProperty(e,"__esMo
43dule",{value:!0}),e.cleanupCache=e.listenersCache=void 0,e.observe=n,e.listenersCache=new Map,e.cleanupCache=new Map;let r=0;function n(t,o,s){const i=++r,a=()=>e.listenersCache.get(t)||[],c=()=>{const h=a().filter(b=>b.id!==i);if(h.length===0){e.listenersCache.delete(t),e.cleanupCache.delete(t);return}e.listenersCache.set(t,h)},u=()=>{const y=a();if(!y.some(b=>b.id===i))return;const h=e.cleanupCache.get(t);if(y.length===1&&h){const b=h();b instanceof Promise&&b.catch(()=>{})}c()},l=a();if(e.listenersCache.set(t,[...l,{id:i,fns:o}]),l&&l.length>0)return u;const f={};for(const y in o)f[y]=((...h)=>{var v,g;const b=a();if(b.length!==0)for(const _ of b)(g=(v=_.fns)[y])==null||g.call(v,...h)});const m=s(f);return typeof m=="function"&&e.cleanupCache.set(t,m),u}})(Ud)),Ud}var Na={},$a={},xb;function Sf(){if(xb)return $a;xb=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.wait=r;const e=xt();async function r(n,{signal:t}={}){return new Promise((o,s)=>{if(t!=null&&t.aborted){s((0,e.getAbortError)(t));return}const i=()=>t==null?void 0:t.removeEventListener("abort",c),a=setTimeout(()=>{i(),o()},n),c=()=>{clearTimeout(a),i(),s((0,e.getAbortError)(t))};t==null||t.addEventListener("abort",c,{once:!0})})}return $a}var qb;function Cn(){if(qb)return Na;qb=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.poll=r;const e=Sf();function r(n,{emitOnBegin:t,initialWaitTime:o,interval:s}){let i=!0;const a=()=>i=!1;return(async()=>{let u;t&&(u=await n({unpoll:a}));const l=await(o==null?void 0:o(u))??s;await(0,e.wait)(l);const f=async()=>{i&&(await n({unpoll:a}),await(0,e.wait)(s),f())};f()})(),a}return Na}var Po={},Ld={},Mb;function Ig(){return Mb||(Mb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.responseCache=e.promiseCache=void 0,e.getCache=r,e.withCache=n,e.promiseCache=new Map,e.responseCache=new Map;function r(t){const o=(a,c)=>({clear:()=>c.delete(a),get:()=>c.get(a),set:u=>c.set(a,u)}),s=o(t,e.promiseCache),i=o(t,e.responseCache);return{clear:()=>{s.clear(),i.clear()},promise:s,response:i}}async function n(t,{cacheKey:o,cacheTime:s=Number.POSITIVE_INFINITY}){const i=r(o),a=i.response.get();if(a&&s>0&&Date.now()-a.created.getTime()<s)return a.data;let c=i.promise.get();c||(c=t(),i.promise.set(c));try{const u=await c;return i.response.set({created:new Date,data:u}),u}finally{i.promise.clear()}}})(Ld)),Ld}var kb;function ai(){if(kb)return Po;kb=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.getBlockNumberCache=n,Po.getBlockNumber=t;const e=Ig(),r=o=>`blockNumber.${o}`;function n(o){return(0,e.getCache)(r(o))}async function t(o,{cacheTime:s=o.cacheTime}={}){const i=await(0,e.withCache)(()=>o.request({method:"eth_blockNumber"}),{cacheKey:r(o.uid),cacheTime:s});return BigInt(i)}return Po}var za={},Hb;function Yu(){if(Hb)return za;Hb=1,Object.defineProperty(za,"__esModule",{value:!0}),za.getFilterChanges=n;const e=ti(),r=qt();async function n(t,{filter:o}){const s="strict"in o&&o.strict,i=await o.request({method:"eth_getFilterChanges",params:[o.id]});if(typeof i[0]=="string")return i;const a=i.map(c=>(0,r.formatLog)(c));return!("abi"in o)||!o.abi?a:(0,e.parseEventLogs)({abi:o.abi,logs:a,strict:s})}return za}var Ua={},Fb;function Xu(){if(Fb)return Ua;Fb=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.uninstallFilter=e;async function e(r,{filter:n}){return n.request({method:"eth_uninstallFilter",params:[n.id]})}return Ua}var Nb;function Rg(){if(Nb)return Fa;Nb=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.watchContractEvent=h;const e=Se(),r=gr(),n=ei(),t=Zr(),o=qt(),s=me(),i=en(),a=Cn(),c=Fe(),u=af(),l=ai(),f=vf(),m=Yu(),y=Xu();function h(b,v){const{abi:g,address:_,args:P,batch:d=!0,eventName:w,fromBlock:E,onError:p,onLogs:S,poll:A,pollingInterval:T=b.pollingInterval,strict:C}=v;return(typeof A<"u"?A:typeof E=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="ipc"||b.transport.type==="fallback"&&(b.transport.transports[0].c
43onfig.type==="webSocket"||b.transport.transports[0].config.type==="ipc")))?(()=>{const F=C??!1,H=(0,c.stringify)(["watchContractEvent",_,P,d,b.uid,w,T,F,E]);return(0,i.observe)(H,{onLogs:S,onError:p},j=>{let k;E!==void 0&&(k=E-1n);let B,O=!1;const q=(0,a.poll)(async()=>{var M;if(!O){try{B=await(0,s.getAction)(b,u.createContractEventFilter,"createContractEventFilter")({abi:g,address:_,args:P,eventName:w,strict:F,fromBlock:E})}catch{}O=!0;return}try{let N;if(B)N=await(0,s.getAction)(b,m.getFilterChanges,"getFilterChanges")({filter:B});else{const z=await(0,s.getAction)(b,l.getBlockNumber,"getBlockNumber")({});k&&k<z?N=await(0,s.getAction)(b,f.getContractEvents,"getContractEvents")({abi:g,address:_,args:P,eventName:w,fromBlock:k+1n,toBlock:z,strict:F}):N=[],k=z}if(N.length===0)return;if(d)j.onLogs(N);else for(const z of N)j.onLogs([z])}catch(N){B&&N instanceof r.InvalidInputRpcError&&(O=!1),(M=j.onError)==null||M.call(j,N)}},{emitOnBegin:!0,interval:T});return async()=>{B&&await(0,s.getAction)(b,y.uninstallFilter,"uninstallFilter")({filter:B}),q()}})})():(()=>{const F=C??!1,H=(0,c.stringify)(["watchContractEvent",_,P,d,b.uid,w,T,F]);let j=!0,k=()=>j=!1;return(0,i.observe)(H,{onLogs:S,onError:p},B=>((async()=>{try{const O=(()=>{if(b.transport.type==="fallback"){const N=b.transport.transports.find(z=>z.config.type==="webSocket"||z.config.type==="ipc");return N?N.value:b.transport}return b.transport})(),q=w?(0,t.encodeEventTopics)({abi:g,eventName:w,args:P}):[],{unsubscribe:M}=await O.subscribe({params:["logs",{address:_,topics:q}],onData(N){var $;if(!j)return;const z=N.result;try{const{eventName:U,args:G}=(0,n.decodeEventLog)({abi:g,data:z.data,topics:z.topics,strict:C}),J=(0,o.formatLog)(z,{args:G,eventName:U});B.onLogs([J])}catch(U){let G,J;if(U instanceof e.DecodeLogDataMismatch||U instanceof e.DecodeLogTopicsMismatch){if(C)return;G=U.abiItem.name,J=($=U.abiItem.inputs)==null?void 0:$.some(V=>!("name"in V&&V.name))}const W=(0,o.formatLog)(z,{args:J?[]:{},eventName:G});B.onLogs([W])}},onError(N){var z;(z=B.onError)==null||z.call(B,N)}});k=M,j||k()}catch(O){p==null||p(O)}})(),()=>k()))})()}return Fa}var Ao={},Mr={},$b;function Pr(){if($b)return Mr;$b=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AccountTypeNotSupportedError=Mr.AccountNotFoundError=void 0;const e=de();class r extends e.BaseError{constructor({docsPath:o}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` 44`),{docsPath:o,docsSlug:"account",name:"AccountNotFoundError"})}}Mr.AccountNotFoundError=r;class n extends e.BaseError{constructor({docsPath:o,metaMessages:s,type:i}){super(`Account type "${i}" is not supported.`,{docsPath:o,metaMessages:s,name:"AccountTypeNotSupportedError"})}}return Mr.AccountTypeNotSupportedError=n,Mr}var La={},Da={},zb;function si(){if(zb)return Da;zb=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.assertCurrentChain=r;const e=ni();function r({chain:n,currentChainId:t}){if(!n)throw new e.ChainNotFoundError;if(t!==n.id)throw new e.ChainMismatchError({chain:n,currentChainId:t})}return Da}var Ga={},Ub;function If(){if(Ub)return Ga;Ub=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.sendRawTransaction=e;async function e(r,{serializedTransaction:n}){return r.request({method:"eth_sendRawTransaction",params:[n]},{retryCount:0})}return Ga}var Lb;function Qu(){if(Lb)return La;Lb=1,Object.defineProperty(La,"__esModule",{value:!0}),La.sendTransaction=v;const e=Ie(),r=Pr(),n=de(),t=Ko(),o=si(),s=qe(),i=Xo(),a=Er(),c=St(),u=me(),l=Wr(),f=It(),m=jr(),y=Qo(),h=If(),b=new l.LruMap(128);async function v(g,_){var M,N,z,$,U,G;const{account:P=g.account,assertChainId:d=!0,chain:w=g.chain,accessList:E,authorizationList:p,blobs:S,data:A,dataSuffix:T=typeof g.dataSuffix=="string"?g.dataSuffix:(M=g.dataSuffix)==null?void 0:M.value,gas:C,gasPrice:R,maxFeePerBlobGas:I,maxFeePerGas:x,maxPriorityFeePerGas:F,nonce:H,type:j,value:k,...B}=_;if(typeof P>"u")throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const O=P?(0,e.parseAccount)(P):null;let q;try{(0,f.assertRequest)(_);const J=await(async()=>
44{if(_.to)return _.to;if(_.to!==null&&p&&p.length>0)return await(0,t.recoverAuthorizationAddress)({authorization:p[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((O==null?void 0:O.type)==="json-rpc"||O===null){let W;w!==null&&(W=await(0,u.getAction)(g,m.getChainId,"getChainId")({}),d&&(0,o.assertCurrentChain)({currentChainId:W,chain:w}));const V=($=(z=(N=g.chain)==null?void 0:N.formatters)==null?void 0:z.transactionRequest)==null?void 0:$.format,te=(V||c.formatTransactionRequest)({...(0,a.extract)(B,{format:V}),accessList:E,account:O,authorizationList:p,blobs:S,chainId:W,data:T?(0,s.concat)([A??"0x",T]):A,gas:C,gasPrice:R,maxFeePerBlobGas:I,maxFeePerGas:x,maxPriorityFeePerGas:F,nonce:H,to:J,type:j,value:k},"sendTransaction"),Z=b.get(g.uid),X=Z?"wallet_sendTransaction":"eth_sendTransaction";try{return await g.request({method:X,params:[te]},{retryCount:0})}catch(Q){if(Z===!1)throw Q;const ne=Q;if(ne.name==="InvalidInputRpcError"||ne.name==="InvalidParamsRpcError"||ne.name==="MethodNotFoundRpcError"||ne.name==="MethodNotSupportedRpcError")return await g.request({method:"wallet_sendTransaction",params:[te]},{retryCount:0}).then(re=>(b.set(g.uid,!0),re)).catch(re=>{const ae=re;throw ae.name==="MethodNotFoundRpcError"||ae.name==="MethodNotSupportedRpcError"?(b.set(g.uid,!1),ne):ae});throw ne}}if((O==null?void 0:O.type)==="local"){if(O.nonceManager&&typeof H>"u"){const te=B.chainId,Z=await(async()=>typeof te=="number"?te:w?w.id:(0,u.getAction)(g,m.getChainId,"getChainId")({}))();q={address:O.address,chainId:Z}}const W=await(0,u.getAction)(g,y.prepareTransactionRequest,"prepareTransactionRequest")({account:O,accessList:E,authorizationList:p,blobs:S,chain:w,data:T?(0,s.concat)([A??"0x",T]):A,gas:C,gasPrice:R,maxFeePerBlobGas:I,maxFeePerGas:x,maxPriorityFeePerGas:F,nonce:H,nonceManager:O.nonceManager,parameters:[...y.defaultParameters,"sidecars"],type:j,value:k,...B,to:J}),V=(U=w==null?void 0:w.serializers)==null?void 0:U.transaction,Y=await O.signTransaction(W,{serializer:V});return await(0,u.getAction)(g,h.sendRawTransaction,"sendRawTransaction")({serializedTransaction:Y})}throw(O==null?void 0:O.type)==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:O==null?void 0:O.type})}catch(J){throw J instanceof r.AccountTypeNotSupportedError?J:(q&&((G=O==null?void 0:O.nonceManager)==null||G.reset(q)),(0,i.getTransactionError)(J,{..._,account:O,chain:_.chain||void 0}))}}return La}var Db;function Rf(){if(Db)return Ao;Db=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.writeContract=i;const e=Ie(),r=Pr(),n=Le(),t=_r(),o=me(),s=Qu();async function i(a,c){return i.internal(a,s.sendTransaction,"sendTransaction",c)}return(function(a){async function c(u,l,f,m){const{abi:y,account:h=u.account,address:b,args:v,functionName:g,..._}=m;if(typeof h>"u")throw new r.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const P=h?(0,e.parseAccount)(h):null,d=(0,n.encodeFunctionData)({abi:y,args:v,functionName:g});try{return await(0,o.getAction)(u,l,f)({data:d,to:b,account:P,..._})}catch(w){throw(0,t.getContractError)(w,{abi:y,address:b,args:v,docsPath:"/docs/contract/writeContract",functionName:g,sender:P==null?void 0:P.address})}}a.internal=c})(i||(Ao.writeContract=i={})),Ao}var Gb;function r6(){if(Gb)return on;Gb=1,Object.defineProperty(on,"__esModule",{value:!0}),on.getContract=c,on.getFunctionParameters=u,on.getEventParameters=l;const e=me(),r=af(),n=wg(),t=vf(),o=Ht(),s=Sg(),i=Rg(),a=Rf();function c({abi:f,address:m,client:y}){const h=y,[b,v]=h?"public"in h&&"wallet"in h?[h.public,h.wallet]:"public"in h?[h.public,void 0]:"wallet"in h?[void 0,h.wallet]:[h,h]:[void 0,void 0],g=b!=null,_=v!=null,P={};let d=!1,w=!1,E=!1;for(const p of f)if(p.type==="function"?p.stateMutability==="view"||p.stateMutability==="pure"?d=!0:w=!0:p.type==="event"&&(E=!0),d&&w&&E)break;return g&&(d&&(P.read=new Proxy({},{get(p,S){return(...A)=>{const{args:T,options:C}=u(A);return(0,e.getAction)(b,o.readContract,"readContract")({abi:f,address:m,functionName:S,args:T,...C})}}})),w&&(P.simulate=new Proxy({},{get(p,S){return(...A)=>{const{args:T,options:C}=u(A);return(0,e.getAction)(b,s.simulateContract,"simulateContract")({abi:f,address:m,functionName:S,args:T,...C})}}})),E&&(P.createEventFilter=new Proxy({},{get(p,S){return(...A)=>{const T=f.find(I=>I.type==="event"&&I.name===S),{args:C,options:R}=l(A,T);return(0,e.getAction)(b,r.createContractEventFilter,"createContractEventFilter")({abi:f,address:m,eventName:S,args:C,...R})}}}),P.getEvents=new Proxy({},{get(p,S){return(...A)=>{const T=f.find(I=>I.type==="event"&&I.name===S),{args:C,options:R}=l(A,T);return(0,e.getAction)(b,t.getContractEvents,"getContractEvents")({abi:f,address:m,eventName:S,args:C,...R})}}}),P.watchEvent=new Proxy({},{get(p,S){return(...A)=>{const T=f.find(I=>I.type==="event"&&I.name===S),{args:C,options:R}=l(A,T);return(0,e.getAction)(b,i.watchContractEvent,"watchContractEvent")({abi:f,address:m,eventName:S,args:C,...R})}}}))),_&&w&&(P.write=new Proxy({},{get(p,S){return(...A)=>{const{args:T,options:C}=u(A);return(0,e.getAction)(v,a.writeContract,"writeContract")({abi:f,address:m,functionName:S,args:T,...C})}}})),(g||_)&&w&&(P.estimateGas=new Proxy({},{get(p,S){return(...A)=>{const{args:T,options:C}=u(A),R=b??v;return(0,e.getAction)(R,n.estimateContractGas,"estimateContractGas")({abi:f,address:m,functionName:S,args:T,...C,account:C.account??v.account})}}})),P.address=m,P.abi=f,P}function u(f){const m=f.length&&Array.isArray(f[0]),y=m?f[0]:[],h=(m?f[1]:f[0])??{};return{args:y,options:h}}function l(f,m){let y=!1;Array.isArray(f[0])?y=!0:f.length===1?y=m.inputs.some(v=>v.indexed):f.length===2&&(y=!0);const h=y?f[0]:void 0,b=(y?f[1]:f[0])??{};return{args:h,options:b}}return on}var yn={},To={},Vb;function Bg(){if(Vb)return To;Vb=1,Object.defineProperty(To,"__esModule",{value:!0}),To.BundleFailedError=void 0;const e=de();class r extends e.BaseError{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}return To.BundleFailedError=r,To}
44var Va={},Wb;function ed(){if(Wb)return Va;Wb=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.withRetry=n;const e=xt(),r=Sf();function n(t,{delay:o=100,retryCount:s=2,shouldRetry:i=()=>!0,signal:a}={}){return new Promise((c,u)=>{const l=async({count:f=0}={})=>{if(a!=null&&a.aborted){u((0,e.getAbortError)(a));return}const m=async({error:y})=>{const h=typeof o=="function"?o({count:f,error:y}):o;if(h)try{await(0,r.wait)(h,{signal:a})}catch(b){u(b);return}l({count:f+1})};try{const y=await t();c(y)}catch(y){if(a!=null&&a.aborted){u((0,e.getAbortError)(a));return}if((0,e.isAbortError)(y)){u(y);return}if(f<s&&await i({count:f,error:y}))return m({error:y});u(y)}};l()})}return Va}var Wa={},Dd={},Kb;function ci(){return Kb||(Kb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionReceipt=e.receiptStatuses=void 0,e.formatTransactionReceipt=s;const r=Be(),n=Jo(),t=qt(),o=Rn();e.receiptStatuses={"0x0":"reverted","0x1":"success"};function s(i,a){const c={...i,blockNumber:i.blockNumber?BigInt(i.blockNumber):null,contractAddress:i.contractAddress?i.contractAddress:null,cumulativeGasUsed:i.cumulativeGasUsed?BigInt(i.cumulativeGasUsed):null,effectiveGasPrice:i.effectiveGasPrice?BigInt(i.effectiveGasPrice):null,gasUsed:i.gasUsed?BigInt(i.gasUsed):null,logs:i.logs?i.logs.map(u=>(0,t.formatLog)(u)):null,to:i.to?i.to:null,transactionIndex:i.transactionIndex?(0,r.hexToNumber)(i.transactionIndex):null,status:i.status?e.receiptStatuses[i.status]:null,type:i.type?o.transactionType[i.type]||i.type:null};return i.blobGasPrice&&(c.blobGasPrice=BigInt(i.blobGasPrice)),i.blobGasUsed&&(c.blobGasUsed=BigInt(i.blobGasUsed)),c}e.defineTransactionReceipt=(0,n.defineFormatter)("transactionReceipt",s)})(Dd)),Dd}var Gd={},Zb;function Bf(){return Zb||(Zb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fallbackTransactionErrorMagicIdentifier=e.fallbackMagicIdentifier=void 0,e.sendCalls=l;const r=Ie(),n=de(),t=gr(),o=Le(),s=qe(),i=Be(),a=oe(),c=Xo(),u=Qu();e.fallbackMagicIdentifier="0x5792579257925792579257925792579257925792579257925792579257925792",e.fallbackTransactionErrorMagicIdentifier=(0,a.numberToHex)(0,{size:32});async function l(f,m){var p;const{account:y=f.account,chain:h=f.chain,experimental_fallback:b,experimental_fallbackDelay:v=32,forceAtomic:g=!1,id:_,version:P="2.0.0"}=m,d=y?(0,r.parseAccount)(y):null;let w=m.capabilities;f.dataSuffix&&!((p=m.capabilities)!=null&&p.dataSuffix)&&(typeof f.dataSuffix=="string"?w={...m.capabilities,dataSuffix:{value:f.dataSuffix,optional:!0}}:w={...m.capabilities,dataSuffix:{value:f.dataSuffix.value,...f.dataSuffix.required?{}:{optional:!0}}});const E=m.calls.map(S=>{const A=S,T=A.abi?(0,o.encodeFunctionData)({abi:A.abi,functionName:A.functionName,args:A.args}):A.data;return{data:A.dataSuffix&&T?(0,s.concat)([T,A.dataSuffix]):T,to:A.to,value:A.value?(0,a.numberToHex)(A.value):void 0}});try{const S=await f.request({method:"wallet_sendCalls",params:[{atomicRequired:g,calls:E,capabilities:w,chainId:(0,a.numberToHex)(h.id),from:d==null?void 0:d.address,id:_,version:P}]},{retryCount:0});return typeof S=="string"?{id:S}:S}catch(S){const A=S;if(b&&(A.name==="MethodNotFoundRpcError"||A.name==="MethodNotSupportedRpcError"||A.name==="UnknownRpcError"||A.details.toLowerCase().includes("does not exist / is not available")||A.details.toLowerCase().includes("missing or invalid. request()")||A.details.toLowerCase().includes("did not match any variant of untagged enum")||A.details.toLowerCase().includes("account upgraded to unsupported contract")||A.details.toLowerCase().includes("eip-7702 not supported")||A.details.toLowerCase().includes("unsupported wc_ method")||A.details.toLowerCase().includes("feature toggled misconfigured")||A.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(w&&Object.values(w).some(x=>!x.optional)){const x="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new t.UnsupportedNonOptionalCapabilityError(new n.BaseError(x,{details:x}))}if(g&&E.length>1){const I="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new t.AtomicityNotSupportedError(new n.BaseError(I,{details:I}))}const T=[];for(const I of E){const x=(0,u.sendTransaction)(f,{account:d,chain:h,data:I.data,to:I.to,value:
44I.value?(0,i.hexToBigInt)(I.value):void 0});T.push(x),v>0&&await new Promise(F=>setTimeout(F,v))}const C=await Promise.allSettled(T);if(C.every(I=>I.status==="rejected"))throw C[0].reason;const R=C.map(I=>I.status==="fulfilled"?I.value:e.fallbackTransactionErrorMagicIdentifier);return{id:(0,s.concat)([...R,(0,a.numberToHex)(h.id,{size:32}),e.fallbackMagicIdentifier])}}throw(0,c.getTransactionError)(S,{...m,account:d,chain:m.chain})}}})(Gd)),Gd}var Jb;function Og(){if(Jb)return Wa;Jb=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.getCallsStatus=s;const e=ft(),r=er(),n=Be(),t=ci(),o=Bf();async function s(i,a){async function c(v){if(v.endsWith(o.fallbackMagicIdentifier.slice(2))){const _=(0,r.trim)((0,e.sliceHex)(v,-64,-32)),P=(0,e.sliceHex)(v,0,-64).slice(2).match(/.{1,64}/g),d=await Promise.all(P.map(E=>o.fallbackTransactionErrorMagicIdentifier.slice(2)!==E?i.request({method:"eth_getTransactionReceipt",params:[`0x${E}`]},{dedupe:!0}):void 0)),w=d.some(E=>E===null)?100:d.every(E=>(E==null?void 0:E.status)==="0x1")?200:d.every(E=>(E==null?void 0:E.status)==="0x0")?500:600;return{atomic:!1,chainId:(0,n.hexToNumber)(_),receipts:d.filter(Boolean),status:w,version:"2.0.0"}}return i.request({method:"wallet_getCallsStatus",params:[v]})}const{atomic:u=!1,chainId:l,receipts:f,version:m="2.0.0",...y}=await c(a.id),[h,b]=(()=>{const v=y.status;return v>=100&&v<200?["pending",v]:v>=200&&v<300?["success",v]:v>=300&&v<700?["failure",v]:v==="CONFIRMED"?["success",200]:v==="PENDING"?["pending",100]:[void 0,v]})();return{...y,atomic:u,chainId:l?(0,n.hexToNumber)(l):void 0,receipts:(f==null?void 0:f.map(v=>({...v,blockNumber:(0,n.hexToBigInt)(v.blockNumber),gasUsed:(0,n.hexToBigInt)(v.gasUsed),status:t.receiptStatuses[v.status]})))??[],statusCode:b,status:h,version:m}}return Wa}var Yb;function Of(){if(Yb)return yn;Yb=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.WaitForCallsStatusTimeoutError=void 0,yn.waitForCallsStatus=u;const e=de(),r=Bg(),n=me(),t=en(),o=Cn(),s=jf(),i=ed(),a=Fe(),c=Og();async function u(f,m){const{id:y,pollingInterval:h=f.pollingInterval,status:b=({statusCode:T})=>T===200||T>=300,retryCount:v=4,retryDelay:g=({count:T})=>~~(1<<T)*200,timeout:_=6e4,throwOnFailure:P=!1}=m,d=(0,a.stringify)(["waitForCallsStatus",f.uid,y]),{promise:w,resolve:E,reject:p}=(0,s.withResolvers)();let S;const A=(0,t.observe)(d,{resolve:E,reject:p},T=>{const C=(0,o.poll)(async()=>{const R=I=>{clearTimeout(S),C(),I(),A()};try{const I=await(0,i.withRetry)(async()=>{const x=await(0,n.getAction)(f,c.getCallsStatus,"getCallsStatus")({id:y});if(P&&x.status==="failure")throw new r.BundleFailedError(x);return x},{retryCount:v,delay:g});if(!b(I))return;R(()=>T.resolve(I))}catch(I){R(()=>T.reject(I))}},{interval:h,emitOnBegin:!0});return C});return S=_?setTimeout(()=>{A(),clearTimeout(S),p(new l({id:y}))},_):void 0,await w}class l extends e.BaseError{constructor({id:m}){super(`Timed out while waiting for call bundle with id "${m}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}return yn.WaitForCallsStatusTimeoutError=l,yn}var So={},Ka={},Xb;function Cg(){if(Xb)return Ka;Xb=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.uid=t;const e=256;let r=e,n;function t(o=11){if(!n||r+o>e*2){n="",r=0;for(let s=0;s<e;s++)n+=(256+Math.random()*256|0).toString(16).substring(1)}return n.substring(r,r+++o)}return Ka}var Qb;function td(){if(Qb)return So;Qb=1,Object.defineProperty(So,"__esModule",{value:!0}),So.createClient=n,So.rpcSchema=t;const e=Ie(),r=Cg();function n(o){const{batch:s,chain:i,ccipRead:a,dataSuffix:c,key:u="base",name:l="Base Client",type:f="base"}=o,m=o.experimental_blockTag??(typeof(i==null?void 0:i.experimental_preconfirmationTime)=="number"?"pending":void 0),y=(i==null?void 0:i.blockTime)??12e3,h=Math.min(Math.max(Math.floor(y/2),500),4e3),b=o.pollingInterval??h,v=o.cacheTime??b,g=o.account?(0,e.parseAccount)(o.account):void 0,{config:_,request:P,value:d}=o.transport({account:g,chain:i,pollingInterval:b}),w={..._,...d},E={account:g,batch:s,cacheTime:v,ccipRead:a,chain:i,dataSuffix:c,key:u,name:l,pollingInterval:b,request:P,transport:w,type:f,uid:(0,r.uid)(),...m?{experimental_blockTag:m}:{}};function p(S){return A=>{const T=A(S);for(const R in E)delete T[R];const C={...S,...T};return Object.assign(C,{extend:p(C)})}}return Object.assign(E,{extend:p(E)})}function t(){return null}return So}var Za={},Ja={},Ya={},Xa={},em;function Cf(){if(em)return Xa;em=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.isNullUniversalResolverError=n;const e=de(),r=pr();function n(t){var s,i,a,c,u,l;if(!(t instanceof e.BaseError))return!1;const o=t.walk(f=>f instanceof r.ContractFunctionRevertedError);return o instanceof r.ContractFunctionRevertedError?((s=o.data)==null?void 0:s.errorName)==="HttpError"||((i=o.data)==null?void 0:i.errorName)==="ResolverError"||((a=o.data)==null?void 0:a.errorName)==="ResolverNotContract"||((c=o.data)==null?void 0:c.errorName)==="ResolverNotFound"||((u=o.data)==null?void 0:u.errorName)==="ReverseAddressMismatch"||((l=o.data)==null?void 0:l.errorName)==="UnsupportedResolverProfile":!1}return Xa}var Qa={},es={},tm;function xg(){if(tm)return es;tm=1,Object.defineProperty(es,"__esModule",{value:!0}),es.encodedLabelToLabelhash=r;const e=Ze();function r(n){if(n.length!==66||n.indexOf("[")!==0||n.indexOf("]")!==6
445)return null;const t=`0x${n.slice(1,65)}`;return(0,e.isHex)(t)?t:null}return es}var rm;function xf(){if(rm)return Qa;rm=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.namehash=s;const e=qe(),r=Ee(),n=oe(),t=tt(),o=xg();function s(i){let a=new Uint8Array(32).fill(0);if(!i)return(0,n.bytesToHex)(a);const c=i.split(".");for(let u=c.length-1;u>=0;u-=1){const l=(0,o.encodedLabelToLabelhash)(c[u]),f=l?(0,r.toBytes)(l):(0,t.keccak256)((0,r.stringToBytes)(c[u]),"bytes");a=(0,t.keccak256)((0,e.concat)([a,f]),"bytes")}return(0,n.bytesToHex)(a)}return Qa}var ts={},rs={},nm;function n6(){if(nm)return rs;nm=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.encodeLabelhash=e;function e(r){return`[${r.slice(2)}]`}return rs}var ns={},om;function qg(){if(om)return ns;om=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.labelhash=o;const e=Ee(),r=oe(),n=tt(),t=xg();function o(s){const i=new Uint8Array(32).fill(0);return s?(0,t.encodedLabelToLabelhash)(s)||(0,n.keccak256)((0,e.stringToBytes)(s)):(0,r.bytesToHex)(i)}return ns}var im;function qf(){if(im)return ts;im=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.packetToBytes=t;const e=Ee(),r=n6(),n=qg();function t(o){const s=o.replace(/^\.|\.$/gm,"");if(s.length===0)return new Uint8Array(1);const i=new Uint8Array((0,e.stringToBytes)(s).byteLength+2);let a=0;const c=s.split(".");for(let u=0;u<c.length;u++){let l=(0,e.stringToBytes)(c[u]);l.byteLength>255&&(l=(0,e.stringToBytes)((0,r.encodeLabelhash)((0,n.labelhash)(c[u])))),i[a]=l.length,i.set(l,a+1),a+=l.length+1}return i.byteLength!==a+1?i.slice(0,a+1):i}return ts}var am;function o6(){if(am)return Ya;am=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.getEnsAddress=h;const e=kt(),r=Rt(),n=Le(),t=Je(),o=wr(),s=Ue(),i=er(),a=oe(),c=Cf(),u=ii(),l=xf(),f=qf(),m=me(),y=Ht();async function h(v,g){const{blockNumber:_,blockTag:P,coinType:d,name:w,gatewayUrls:E,strict:p}=g,{chain:S}=v,A=(()=>{if(g.universalResolverAddress)return g.universalResolverAddress;if(!S)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,o.getChainContractAddress)({blockNumber:_,chain:S,contract:"ensUniversalResolver"})})(),T=S==null?void 0:S.ensTlds;if(T&&!T.some(R=>w.endsWith(R)))return null;const C=d!=null?[(0,l.namehash)(w),BigInt(d)]:[(0,l.namehash)(w)];try{const R=(0,n.encodeFunctionData)({abi:e.addressResolverAbi,functionName:"addr",args:C}),I={address:A,abi:e.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[(0,a.toHex)((0,f.packetToBytes)(w)),R,E??[u.localBatchGatewayUrl]],blockNumber:_,blockTag:P},F=await(0,m.getAction)(v,y.readContract,"readContract")(I);if(F[0]==="0x")return null;const H=b({coinType:d,data:F[0],args:C});return H==="0x"||(0,i.trim)(H)==="0x00"?null:H}catch(R){if(p)throw R;if((0,c.isNullUniversalResolverError)(R))return null;throw R}}function b({coinType:v,data:g,args:_}){try{return(0,r.decodeFunctionResult)({abi:e.addressResolverAbi,args:_,functionName:"addr",data:g})}catch(P){if(v==null)throw P;const d=(0,i.trim)(g);if((0,s.size)(d)===20)return(0,t.getAddress)(d);throw P}}return Ya}var os={},is={},wt={},ut={},sm;function Mf(){if(sm)return ut;sm=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.EnsInvalidChainIdError=ut.EnsAvatarUnsupportedNamespaceError=ut.EnsAvatarUriResolutionError=ut.EnsAvatarInvalidNftUriError=ut.EnsAvatarInvalidMetadataError=void 0;const e=de();class r extends e.BaseError{constructor({data:a}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(a)}`],name:"EnsAvatarInvalidMetadataError"})}}ut.EnsAvatarInvalidMetadataError=r;class n extends e.BaseError{constructor({reason:a}){super(`ENS NFT avatar URI is invalid. ${a}`,{name:"EnsAvatarInvalidNftUriError"})}}ut.EnsAvatarInvalidNftUriError=n;class t extends e.BaseError{constructor({uri:a}){super(`Unable to resolve ENS avatar URI "${a}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}ut.EnsAvatarUriResolutionError=t;class o extends e.BaseError{constructor({namespace:a}){super(`ENS NFT avatar namespace "${a}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}ut.EnsAvatarUnsupportedNamespaceError=o;class s extends e.BaseError{constructor({chainId:a}){super(`Invalid ENSIP-11 chainId: ${a}. Must be between 0 and 0x7fffffff, or 1.`,{name:"EnsInvalidChainIdError"})}}return ut.EnsInvalidChainIdError=s,ut}var cm;function i6(){if(cm)return wt;
44cm=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.isImageUri=i,wt.getGateway=a,wt.resolveAvatarUri=c,wt.getJsonImage=u,wt.getMetadataAvatarUri=l,wt.parseAvatarUri=f,wt.parseNftUri=m,wt.getNftTokenUri=y;const e=Ht(),r=Mf(),n=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,t=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,o=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,s=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function i(h){try{const b=await fetch(h,{method:"HEAD"});if(b.status===200){const v=b.headers.get("content-type");return v==null?void 0:v.startsWith("image/")}return!1}catch(b){return typeof b=="object"&&typeof b.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(v=>{const g=new Image;g.onload=()=>{v(!0)},g.onerror=()=>{v(!1)},g.src=h})}}function a(h,b){return h?h.endsWith("/")?h.slice(0,-1):h:b}function c({uri:h,gatewayUrls:b}){const v=o.test(h);if(v)return{uri:h,isOnChain:!0,isEncoded:v};const g=a(b==null?void 0:b.ipfs,"https://ipfs.io"),_=a(b==null?void 0:b.arweave,"https://arweave.net"),P=h.match(n),{protocol:d,subpath:w,target:E,subtarget:p=""}=(P==null?void 0:P.groups)||{},S=d==="ipns:/"||w==="ipns/",A=d==="ipfs:/"||w==="ipfs/"||t.test(h);if(h.startsWith("http")&&!S&&!A){let C=h;return b!=null&&b.arweave&&(C=h.replace(/https:\/\/arweave.net/g,b==null?void 0:b.arweave)),{uri:C,isOnChain:!1,isEncoded:!1}}if((S||A)&&E)return{uri:`${g}/${S?"ipns":"ipfs"}/${E}${p}`,isOnChain:!1,isEncoded:!1};if(d==="ar:/"&&E)return{uri:`${_}/${E}${p||""}`,isOnChain:!1,isEncoded:!1};let T=h.replace(s,"");if(T.startsWith("<svg")&&(T=`data:image/svg+xml;base64,${btoa(T)}`),T.startsWith("data:")||T.startsWith("{"))return{uri:T,isOnChain:!0,isEncoded:!1};throw new r.EnsAvatarUriResolutionError({uri:h})}function u(h){if(typeof h!="object"||!("image"in h)&&!("image_url"in h)&&!("image_data"in h))throw new r.EnsAvatarInvalidMetadataError({data:h});return h.image||h.image_url||h.image_data}async function l({gatewayUrls:h,uri:b}){try{const v=await fetch(b).then(_=>_.json());return await f({gatewayUrls:h,uri:u(v)})}catch{throw new r.EnsAvatarUriResolutionError({uri:b})}}async function f({gatewayUrls:h,uri:b}){const{uri:v,isOnChain:g}=c({uri:b,gatewayUrls:h});if(g||await i(v))return v;throw new r.EnsAvatarUriResolutionError({uri:b})}function m(h){let b=h;b.startsWith("did:nft:")&&(b=b.replace("did:nft:","").replace(/_/g,"/"));const[v,g,_]=b.split("/"),[P,d]=v.split(":"),[w,E]=g.split(":");if(!P||P.toLowerCase()!=="eip155")throw new r.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!d)throw new r.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!E)throw new r.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!_)throw new r.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!w)throw new r.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(d,10),namespace:w.toLowerCase(),contractAddress:E,tokenID:_}}async function y(h,{nft:b}){if(b.namespace==="erc721")return(0,e.readContract)(h,{address:b.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(b.tokenID)]});if(b.namespace==="erc1155")return(0,e.readContract)(h,{address:b.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(b.tokenID)]});throw new r.EnsAvatarUnsupportedNamespaceError({namespace:b.namespace})}return wt}var um;function a6(){if(um)return is;um=1,Object.defineProperty(is,"__esModule",{value:!0}),is.parseAvatarRecord=r;const e=i6();async function r(t,{gatewayUrls:o,record:s}){return/eip155:/i.test(s)?n(t,{gatewayUrls:o,record:s}):(0,e.parseAvatarUri)({uri:s,gatewayUrls:o})}async function n(t,{gatewayUrls:o,record:s}){const i=(0,e.parseNftUri)(s),a=await(0,e.getNftTokenUri)(t,{nft:i}),{uri:c,isOnChain:u,isEncoded:l}=(0,e.resolveAvatarUri)({uri:a,gatewayUrls:o});if(u&&(c.includes("data:application/json;base64,")||c.startsWith("{"))){const m=l?atob(c.replace("data:application/json;base64,","")):c,y=JSON.parse(m);return(0,e.parseAvatarUri)({uri:(0,e.getJsonImage)(y),gatewayUrls:o})}let f=i.tokenID;return i.namespace==="erc1155"&&(f=f.replace("0x","").padStart(64,"0")),(0,e.getMetadataAvatarUri)({gatewayUrls:o,uri:c.replace(/(?:0x)?{id}/,f)})}return is}var as={},dm;function Mg(){if(dm)return as;dm=1,Object.defineProperty(as,"__esModule",{value:!0}),as.getEnsText=f;const e=kt(),r=Rt(),n=Le(),t=wr(),o=oe(),s=Cf(),i=ii(),a=xf(),c=qf(),u=me(),l=Ht();async function f(m,y){const{blockNumber:h,blockTag:b,key:v,name:g,gatewayUrls:_,strict:P}=y,{chain:d}=m,w=(()=>
44{if(y.universalResolverAddress)return y.universalResolverAddress;if(!d)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,t.getChainContractAddress)({blockNumber:h,chain:d,contract:"ensUniversalResolver"})})(),E=d==null?void 0:d.ensTlds;if(E&&!E.some(p=>g.endsWith(p)))return null;try{const p={address:w,abi:e.universalResolverResolveAbi,args:[(0,o.toHex)((0,c.packetToBytes)(g)),(0,n.encodeFunctionData)({abi:e.textResolverAbi,functionName:"text",args:[(0,a.namehash)(g),v]}),_??[i.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:h,blockTag:b},A=await(0,u.getAction)(m,l.readContract,"readContract")(p);if(A[0]==="0x")return null;const T=(0,r.decodeFunctionResult)({abi:e.textResolverAbi,functionName:"text",data:A[0]});return T===""?null:T}catch(p){if(P)throw p;if((0,s.isNullUniversalResolverError)(p))return null;throw p}}return as}var fm;function s6(){if(fm)return os;fm=1,Object.defineProperty(os,"__esModule",{value:!0}),os.getEnsAvatar=t;const e=a6(),r=me(),n=Mg();async function t(o,{blockNumber:s,blockTag:i,assetGatewayUrls:a,name:c,gatewayUrls:u,strict:l,universalResolverAddress:f}){const m=await(0,r.getAction)(o,n.getEnsText,"getEnsText")({blockNumber:s,blockTag:i,key:"avatar",name:c,universalResolverAddress:f,gatewayUrls:u,strict:l});if(!m)return null;try{return await(0,e.parseAvatarRecord)(o,{record:m,gatewayUrls:a})}catch{return null}}return os}var ss={},lm;function c6(){if(lm)return ss;lm=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.getEnsName=i;const e=kt(),r=wr(),n=Cf(),t=ii(),o=me(),s=Ht();async function i(a,c){const{address:u,blockNumber:l,blockTag:f,coinType:m=60n,gatewayUrls:y,strict:h}=c,{chain:b}=a,v=(()=>{if(c.universalResolverAddress)return c.universalResolverAddress;if(!b)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,r.getChainContractAddress)({blockNumber:l,chain:b,contract:"ensUniversalResolver"})})();try{const g={address:v,abi:e.universalResolverReverseAbi,args:[u,m,y??[t.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:l,blockTag:f},_=(0,o.getAction)(a,s.readContract,"readContract"),[P]=await _(g);return P||null}catch(g){if(h)throw g;if((0,n.isNullUniversalResolverError)(g))return null;throw g}}return ss}var cs={},bm;function u6(){if(bm)return cs;bm=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.getEnsResolver=s;const e=wr(),r=oe(),n=qf(),t=me(),o=Ht();async function s(i,a){const{blockNumber:c,blockTag:u,name:l}=a,{chain:f}=i,m=(()=>{if(a.universalResolverAddress)return a.universalResolverAddress;if(!f)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,e.getChainContractAddress)({blockNumber:c,chain:f,contract:"ensUniversalResolver"})})(),y=f==null?void 0:f.ensTlds;if(y&&!y.some(b=>l.endsWith(b)))throw new Error(`${l} is not a valid ENS TLD (${y==null?void 0:y.join(", ")}) for chain "${f.name}" (id: ${f.id}).`);const[h]=await(0,t.getAction)(i,o.readContract,"readContract")({address:m,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,r.toHex)((0,n.packetToBytes)(l))],blockNumber:c,blockTag:u});return h}return cs}var us={},mm;function kg(){if(mm)return us;mm=1,Object.defineProperty(us,"__esModule",{value:!0}),us.createAccessList=i;const e=Ie(),r=oe(),n=Ef(),t=Er(),o=St(),s=It();async function i(a,c){var p,S,A;const{account:u=a.account,blockNumber:l,blockTag:f="latest",blobs:m,data:y,gas:h,gasPrice:b,maxFeePerBlobGas:v,maxFeePerGas:g,maxPriorityFeePerGas:_,to:P,value:d,...w}=c,E=u?(0,e.parseAccount)(u):void 0;try{(0,s.assertRequest)(c);const C=(typeof l=="bigint"?(0,r.numberToHex)(l):void 0)||f,R=(A=(S=(p=a.chain)==null?void 0:p.formatters)==null?void 0:S.transactionRequest)==null?void 0:A.format,x=(R||o.formatTransactionRequest)({...(0,t.extract)(w,{format:R}),account:E,blobs:m,data:y,gas:h,gasPrice:b,maxFeePerBlobGas:v,maxFeePerGas:g,maxPriorityFeePerGas:_,to:P,value:d},"createAccessList"),F=await a.request({method:"eth_createAccessList",params:[x,C]});return{accessList:F.accessList,gasUsed:BigInt(F.gasUsed)}}catch(T){throw(0,n.getCallError)(T,{...c,account:E,chain:a.chain})}}return us}var ds={},hm;function d6(){if(hm)return ds;hm=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.createBlockFilter=r;const e=Nu();async function r(n){const t=(0,e.createFilterRequestScope)(n,{method:"eth_newBlockFilter"}),o=await n.request({method:"eth_newBlockFilter"});return{id:o,request:t(o),type:"block"}}return ds}var fs={},ym;function Hg(){if(ym)return fs;ym=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.createEventFilter=t;const e=Zr(),r=oe(),n=Nu();async function t(o,{address:s,args:i,event:a,events:c,fromBlock:u,strict:l,toBlock:f}={}){const m=c??(a?[a]:void 0),y=(0,n.createFilterRequestScope)(o,{method:"eth_newFilter"});let h=[];m&&(h=[m.flatMap(g=>(0,e.encodeEventTopics)({abi:[g],eventName:g.name,args:i}))],a&&(h=h[0]));const b=await o.request({method:"eth_newFilter",params:[{address:s,fromBlock:typeof u=="bigint"?(0,r.numberToHex)(u):u,toBlock:typeof f=="bigint"?(0,r.numberToHex)(f):f,...h.length?{topics:h}:{}}]});return{abi:m,args:i,eventName:a?a.name:void 0,fromBlock:u,id:b,request:y(b),strict:!!l,toBlock:f,type:"event"}}return fs}var ls={},pm;function Fg(){if(pm)return ls;pm=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.createPendingTransactionFilter=r;const e=Nu();async function r(n){const t=(0,e.createFilterRequestScope)(n,{method:"eth_newPendingTransactionFilter"}),o=await n.request({method:"eth_newPendingTransactionFilter"});return{id:o,request:t(o),type:"transaction"}}return ls}var bs={},gm;function f6(){if(gm)return bs;gm=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.getBalance=i;const e=kt(),r=Rt(),n=Le(),t=Bn(),o=me(),s=On();async function i(a,{address:c,blockHash:u,blockNumber:l,blockTag:f=a.experimental_blockTag??"latest",requireCanonical:m}){var b,v,g;const y=(0,t.formatBlockParameter)({blockHash:u,blockNumber:l,blockTag:f,requireCanonical:m});if((b=a.batch)!=null&&b.multicall&&((g=(v=a.chain)==null?void 0:v.contracts)!=null&&g.multicall3)){const _=a.chain.contracts.multicall3.address,P=(0,n.encodeFunctionData)({abi:e.multicall3Abi,functionName:"getEthBalance",args:[c]}),{data:d}=await(0,o.getAction)(a,s.call,"call")({to:_,data:P,blockHash:u,blockNumber:l,blockTag:f,requireCanonical:m});return(0,r.decodeFunctionResult)({abi:e.multicall3Abi,functionName:"getEthBalance",args:[c],data:d||"0x"})}const h=await a.request({method:"eth_getBalance",params:[c,y]});return BigInt(h)}return bs}var ms={},_m;
44function l6(){if(_m)return ms;_m=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.getBlobBaseFee=e;async function e(r){const n=await r.request({method:"eth_blobBaseFee"});return BigInt(n)}return ms}var hs={},vm;function b6(){if(vm)return hs;vm=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.getBlockTransactionCount=n;const e=Be(),r=oe();async function n(t,{blockHash:o,blockNumber:s,blockTag:i="latest"}={}){const a=s!==void 0?(0,r.numberToHex)(s):void 0;let c;return o?c=await t.request({method:"eth_getBlockTransactionCountByHash",params:[o]},{dedupe:!0}):c=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[a||i]},{dedupe:!!a}),(0,e.hexToNumber)(c)}return hs}var ys={},Em;function kf(){if(Em)return ys;Em=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.getCode=r;const e=Bn();async function r(n,{address:t,blockHash:o,blockNumber:s,blockTag:i="latest",requireCanonical:a}){const c=(0,e.formatBlockParameter)({blockHash:o,blockNumber:s,blockTag:i,requireCanonical:a}),u=await n.request({method:"eth_getCode",params:[t,c]},{dedupe:typeof s=="bigint"||o!==void 0});if(u!=="0x")return u}return ys}var ps={},jm;function m6(){if(jm)return ps;jm=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.getDelegation=o;const e=Je(),r=Ue(),n=ft(),t=kf();async function o(s,{address:i,blockNumber:a,blockTag:c="latest"}){const u=await(0,t.getCode)(s,{address:i,...a!==void 0?{blockNumber:a}:{blockTag:c}});if(u&&(0,r.size)(u)===23&&u.startsWith("0xef0100"))return(0,e.getAddress)((0,n.slice)(u,3,23))}return ps}var gs={},Io={},wm;function h6(){if(wm)return Io;wm=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.Eip712DomainNotFoundError=void 0;const e=de();class r extends e.BaseError{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}return Io.Eip712DomainNotFoundError=r,Io}var Pm;function y6(){if(Pm)return gs;Pm=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.getEip712Domain=t;const e=h6(),r=me(),n=Ht();async function t(s,i){const{address:a,factory:c,factoryData:u}=i;try{const[l,f,m,y,h,b,v]=await(0,r.getAction)(s,n.readContract,"readContract")({abi:o,address:a,functionName:"eip712Domain",factory:c,factoryData:u});return{domain:{name:f,version:m,chainId:Number(y),verifyingContract:h,salt:b},extensions:v,fields:l}}catch(l){const f=l;throw f.name==="ContractFunctionExecutionError"&&f.cause.name==="ContractFunctionZeroDataError"?new e.Eip712DomainNotFoundError({address:a}):f}}const o=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];return gs}var _s={},vs={},Am;function p6(){if(Am)return vs;Am=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.formatFeeHistory=e;function e(r){var n;return{baseFeePerGas:r.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:r.gasUsedRatio,oldestBlock:BigInt(r.oldestBlock),reward:(n=r.reward)==null?void 0:n.map(t=>t.map(o=>BigInt(o)))}}return vs}var Tm;function g6(){if(Tm)return _s;Tm=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.getFeeHistory=n;const e=oe(),r=p6();async function n(t,{blockCount:o,blockNumber:s,blockTag:i="latest",rewardPercentiles:a}){const c=typeof s=="bigint"?(0,e.numberToHex)(s):void 0,u=await t.request({method:"eth_feeHistory",params:[(0,e.numberToHex)(o),c||i,a]},{dedupe:!!c});return(0,r.formatFeeHistory)(u)}return _s}var Es={},Sm;function _6(){if(Sm)return Es;Sm=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.getFilterLogs=n;const e=ti(),r=qt();async function n(t,{filter:o}){const s=o.strict??!1,a=(await o.request({method:"eth_getFilterLogs",params:[o.id]})).map(c=>(0,r.formatLog)(c));return o.abi?(0,e.parseEventLogs)({abi:o.abi,logs:a,strict:s}):a}return Es}var js={},ws={},Vd={},Ps={},Im;function Ng(){if(Im)return Ps;Im=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.encodePacked=a;const e=Se(),r=At(),n=rt(),t=qe(),o=mr(),s=oe(),i=Fu();function a(u,l){if(u.length!==l.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:u.length,givenLength:l.length});const f=[];for(let m=0;m<u.length;m++){const y=u[m],h=l[m];f.push(c(y,h))}return(0,t.concatHex)(f)}function c(u,l,f=!1){if(u==="address"){const b=l;if(!(0,n.isAddress)(b))throw new r.InvalidAddressError({address:b});return(0,o.pad)(b.toLowerCase(),{size:f?32:null})}if(u==="string")return(0,s.stringToHex)(l);if(u==="bytes")return l;if(u==="bool")return(0,o.pad)((0,s.boolToHex)(l),{size:f?32:1});const m=u.match(i.integerRegex);if(m){const[b,v,g="256"]=m,_=Number.parseInt(g,10)/8;return(0,s.numberToHex)(l,{size:f?32:_,signed:v==="int"})}const y=u.match(i.bytesRegex);if(y){const[b,v]=y;if(Number.parseInt(v,10)!==(l.length-2)/2)throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(v,10),givenSize:(l.length-2)/2});return(0,o.pad)(l,{dir:"right",size:f?32:null})}const h=u.match(i.arrayRegex);if(h&&Array.isArray(l)){const[b,v]=h,g=[];for(let _=0;_<l.length;_++)g.push(c(v,l[_],!0));return g.length===0?"0x":(0,t.concatHex)(g)}throw new e.UnsupportedPackedAbiType(u)}return Ps}var pn={},As={},Rm;function Hf(){if(Rm)return As;Rm=1,Object.defineProperty(As,"__esModule",{value:!0}),As.isBytes=e;function e(r){return!r||typeof r!="object"||!("BYTES_PER_ELEMENT"in r)?!1:r.BYTES_PER_ELEMENT===1&&r.constructor.name==="Uint8Array"}return As}var Bm;function $g(){if(Bm)return pn;Bm=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.getContractAddress=c,pn.getCreateAddress=u,pn.getCreate2Address=l;const e=qe(),r=Hf(),n=mr(),t=ft(),o=Ee(),s=Wo(),i=tt(),a=Je();function c(f){return f.opcode==="CREATE2"?l(f):u(f)}function u(f){const m=(0,o.toBytes)((0,a.getAddress)(f.from));let y=(0,o.toBytes)(f.nonce);
44return y[0]===0&&(y=new Uint8Array([])),(0,a.getAddress)(`0x${(0,i.keccak256)((0,s.toRlp)([m,y],"bytes")).slice(26)}`)}function l(f){const m=(0,o.toBytes)((0,a.getAddress)(f.from)),y=(0,n.pad)((0,r.isBytes)(f.salt)?f.salt:(0,o.toBytes)(f.salt),{size:32}),h="bytecodeHash"in f?(0,r.isBytes)(f.bytecodeHash)?f.bytecodeHash:(0,o.toBytes)(f.bytecodeHash):(0,i.keccak256)(f.bytecode,"bytes");return(0,a.getAddress)((0,t.slice)((0,i.keccak256)((0,e.concat)([(0,o.toBytes)("0xff"),m,y,h])),12))}return pn}var Ts={},Ro={},dr={},Om;function rd(){if(Om)return dr;Om=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.assertTransactionEIP7702=f,dr.assertTransactionEIP4844=m,dr.assertTransactionEIP1559=y,dr.assertTransactionEIP2930=h,dr.assertTransactionLegacy=b;const e=vg(),r=ff(),n=At(),t=de(),o=Eg(),s=ni(),i=rr(),a=rt(),c=Ue(),u=ft(),l=Be();function f(v){const{authorizationList:g}=v;if(g)for(const _ of g){const{chainId:P}=_,d=_.address;if(!(0,a.isAddress)(d))throw new n.InvalidAddressError({address:d});if(P<0)throw new s.InvalidChainIdError({chainId:P})}y(v)}function m(v){const{blobVersionedHashes:g}=v;if(g){if(g.length===0)throw new o.EmptyBlobError;for(const _ of g){const P=(0,c.size)(_),d=(0,l.hexToNumber)((0,u.slice)(_,0,1));if(P!==32)throw new o.InvalidVersionedHashSizeError({hash:_,size:P});if(d!==e.versionedHashVersionKzg)throw new o.InvalidVersionedHashVersionError({hash:_,version:d})}}y(v)}function y(v){const{chainId:g,maxPriorityFeePerGas:_,maxFeePerGas:P,to:d}=v;if(g<=0)throw new s.InvalidChainIdError({chainId:g});if(d&&!(0,a.isAddress)(d))throw new n.InvalidAddressError({address:d});if(P&&P>r.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P});if(_&&P&&_>P)throw new i.TipAboveFeeCapError({maxFeePerGas:P,maxPriorityFeePerGas:_})}function h(v){const{chainId:g,maxPriorityFeePerGas:_,gasPrice:P,maxFeePerGas:d,to:w}=v;if(g<=0)throw new s.InvalidChainIdError({chainId:g});if(w&&!(0,a.isAddress)(w))throw new n.InvalidAddressError({address:w});if(_||d)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(P&&P>r.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P})}function b(v){const{chainId:g,maxPriorityFeePerGas:_,gasPrice:P,maxFeePerGas:d,to:w}=v;if(w&&!(0,a.isAddress)(w))throw new n.InvalidAddressError({address:w});if(typeof g<"u"&&g<=0)throw new s.InvalidChainIdError({chainId:g});if(_||d)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(P&&P>r.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P})}return dr}var Ss={},Cm;function Ff(){if(Cm)return Ss;Cm=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.serializeAccessList=t;const e=At(),r=nt(),n=rt();function t(o){if(!o||o.length===0)return[];const s=[];for(let i=0;i<o.length;i++){const{address:a,storageKeys:c}=o[i];for(let u=0;u<c.length;u++)if(c[u].length-2!==64)throw new r.InvalidStorageKeySizeError({storageKey:c[u]});if(!(0,n.isAddress)(a,{strict:!1}))throw new e.InvalidAddressError({address:a});s.push([a,c])}return s}return Ss}
44var xm;function nd(){if(xm)return Ro;xm=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.serializeTransaction=y,Ro.toYParitySignatureArray=P;const e=nt(),r=zg(),n=Gu(),t=Vu(),o=yf(),s=Wu(),i=qe(),a=er(),c=oe(),u=Wo(),l=rd(),f=Ku(),m=Ff();function y(d,w){const E=(0,f.getTransactionType)(d);return E==="eip1559"?v(d,w):E==="eip2930"?g(d,w):E==="eip4844"?b(d,w):E==="eip7702"?h(d,w):_(d,w)}function h(d,w){const{authorizationList:E,chainId:p,gas:S,nonce:A,to:T,value:C,maxFeePerGas:R,maxPriorityFeePerGas:I,accessList:x,data:F}=d;(0,l.assertTransactionEIP7702)(d);const H=(0,m.serializeAccessList)(x),j=(0,r.serializeAuthorizationList)(E);return(0,i.concatHex)(["0x04",(0,u.toRlp)([(0,c.numberToHex)(p),A?(0,c.numberToHex)(A):"0x",I?(0,c.numberToHex)(I):"0x",R?(0,c.numberToHex)(R):"0x",S?(0,c.numberToHex)(S):"0x",T??"0x",C?(0,c.numberToHex)(C):"0x",F??"0x",H,j,...P(d,w)])])}function b(d,w){const{chainId:E,gas:p,nonce:S,to:A,value:T,maxFeePerBlobGas:C,maxFeePerGas:R,maxPriorityFeePerGas:I,accessList:x,data:F}=d;(0,l.assertTransactionEIP4844)(d);let H=d.blobVersionedHashes,j=d.sidecars;if(d.blobs&&(typeof H>"u"||typeof j>"u")){const N=typeof d.blobs[0]=="string"?d.blobs:d.blobs.map(U=>(0,c.bytesToHex)(U)),z=d.kzg,$=(0,n.blobsToCommitments)({blobs:N,kzg:z});if(typeof H>"u"&&(H=(0,o.commitmentsToVersionedHashes)({commitments:$})),typeof j>"u"){const U=(0,t.blobsToProofs)({blobs:N,commitments:$,kzg:z});j=(0,s.toBlobSidecars)({blobs:N,commitments:$,proofs:U})}}const k=(0,m.serializeAccessList)(x),B=[(0,c.numberToHex)(E),S?(0,c.numberToHex)(S):"0x",I?(0,c.numberToHex)(I):"0x",R?(0,c.numberToHex)(R):"0x",p?(0,c.numberToHex)(p):"0x",A??"0x",T?(0,c.numberToHex)(T):"0x",F??"0x",k,C?(0,c.numberToHex)(C):"0x",H??[],...P(d,w)],O=[],q=[],M=[];if(j)for(let N=0;N<j.length;N++){const{blob:z,commitment:$,proof:U}=j[N];O.push(z),q.push($),M.push(U)}return(0,i.concatHex)(["0x03",j?(0,u.toRlp)([B,O,q,M]):(0,u.toRlp)(B)])}function v(d,w){const{chainId:E,gas:p,nonce:S,to:A,value:T,maxFeePerGas:C,maxPriorityFeePerGas:R,accessList:I,data:x}=d;(0,l.assertTransactionEIP1559)(d);const F=(0,m.serializeAccessList)(I),H=[(0,c.numberToHex)(E),S?(0,c.numberToHex)(S):"0x",R?(0,c.numberToHex)(R):"0x",C?(0,c.numberToHex)(C):"0x",p?(0,c.numberToHex)(p):"0x",A??"0x",T?(0,c.numberToHex)(T):"0x",x??"0x",F,...P(d,w)];return(0,i.concatHex)(["0x02",(0,u.toRlp)(H)])}function g(d,w){const{chainId:E,gas:p,data:S,nonce:A,to:T,value:C,accessList:R,gasPrice:I}=d;(0,l.assertTransactionEIP2930)(d);const x=(0,m.serializeAccessList)(R),F=[(0,c.numberToHex)(E),A?(0,c.numberToHex)(A):"0x",I?(0,c.numberToHex)(I):"0x",p?(0,c.numberToHex)(p):"0x",T??"0x",C?(0,c.numberToHex)(C):"0x",S??"0x",x,...P(d,w)];return(0,i.concatHex)(["0x01",(0,u.toRlp)(F)])}function _(d,w){const{chainId:E=0,gas:p,data:S,nonce:A,to:T,value:C,gasPrice:R}=d;(0,l.assertTransactionLegacy)(d);let I=[A?(0,c.numberToHex)(A):"0x",R?(0,c.numberToHex)(R):"0x",p?(0,c.numberToHex)(p):"0x",T??"0x",C?(0,c.numberToHex)(C):"0x",S??"0x"];if(w){const x=(()=>{if(w.v>=35n)return(w.v-35n)/2n>0?w.v:27n+(w.v===35n?0n:1n);if(E>0)return BigInt(E*2)+BigInt(35n+w.v-27n);const j=27n+(w.v===27n?0n:1n);if(w.v!==j)throw new e.InvalidLegacyVError({v:w.v});return j})(),F=(0,a.trim)(w.r),H=(0,a.trim)(w.s);I=[...I,(0,c.numberToHex)(x),F==="0x00"?"0x":F,H==="0x00"?"0x":H]}else E>0&&(I=[...I,(0,c.numberToHex)(E),"0x","0x"]);return(0,u.toRlp)(I)}function P(d,w){const E=w??d,{v:p,yParity:S}=E;if(typeof E.r>"u")return[];if(typeof E.s>"u")return[];if(typeof p>"u"&&typeof S>"u")return[];const A=(0,a.trim)(E.r),T=(0,a.trim)(E.s);return[typeof S=="number"?S?(0,c.numberToHex)(1):"0x":p===0n?"0x":p===1n?(0,c.numberToHex)(1):p===27n?"0x":(0,c.numberToHex)(1),A==="0x00"?"0x":A,T==="0x00"?"0x":T]}return Ro}var qm;function zg(){if(qm)return Ts;qm=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.serializeAuthorizationList=n;const e=oe(),r=nd();function n(t){if(!t||t.length===0)return[];const o=[];for(const s of t){const{chainId:i,nonce:a,...c}=s,u=s.address;o.push([i?(0,e.toHex)(i):"0x",u,a?(0,e.toHex)(a):"0x",...(0,r.toYParitySignatureArray)({},c)])}return o}return Ts}var Is={},Mm;function Ug(){if(Mm)return Is;Mm=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.verifyAuthorization=t;const e=Je(),r=gt(),n=Ko();async function t({address:o,authorization:s,signature:i}){return(0,r.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverAuthorizationAddress)({authorization:s,signature:i}))}return Is}var Bo={},Wd={},km;function v6(){return km||(km=1,(function(e){Object.defineProperty(e,"__esMo
44dule",{value:!0}),e.promiseCache=void 0,e.withDedupe=n;const r=Wr();e.promiseCache=new r.LruMap(8192);function n(t,{enabled:o=!0,id:s}){if(!o||!s)return t();if(e.promiseCache.get(s))return e.promiseCache.get(s);const i=t().finally(()=>e.promiseCache.delete(s));return e.promiseCache.set(s,i),i}})(Wd)),Wd}var Hm;function Lg(){if(Hm)return Bo;Hm=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.buildRequest=a,Bo.shouldRetry=c;const e=de(),r=pt(),n=gr(),t=xt(),o=v6(),s=ed(),i=Fe();function a(l,f={}){return async(m,y={})=>{var E;const{dedupe:h=!1,methods:b,retryDelay:v=150,retryCount:g=3,signal:_,uid:P}={...f,...y},{method:d}=m;if((E=b==null?void 0:b.exclude)!=null&&E.includes(d))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});if(b!=null&&b.include&&!b.include.includes(d))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:d});if(_!=null&&_.aborted)throw(0,t.getAbortError)(_);const w=h?u(`${P}.${(0,i.stringify)(m)}`):void 0;return(0,o.withDedupe)(()=>(0,s.withRetry)(async()=>{try{return await l(m,_?{signal:_}:void 0)}catch(p){if(_!=null&&_.aborted)throw(0,t.getAbortError)(_);if((0,t.isAbortError)(p))throw p;const S=p;switch(S.code){case n.ParseRpcError.code:throw new n.ParseRpcError(S);case n.InvalidRequestRpcError.code:throw new n.InvalidRequestRpcError(S);case n.MethodNotFoundRpcError.code:throw new n.MethodNotFoundRpcError(S,{method:m.method});case n.InvalidParamsRpcError.code:throw new n.InvalidParamsRpcError(S);case n.InternalRpcError.code:throw new n.InternalRpcError(S);case n.InvalidInputRpcError.code:throw new n.InvalidInputRpcError(S);case n.ResourceNotFoundRpcError.code:throw new n.ResourceNotFoundRpcError(S);case n.ResourceUnavailableRpcError.code:throw new n.ResourceUnavailableRpcError(S);case n.TransactionRejectedRpcError.code:throw new n.TransactionRejectedRpcError(S);case n.MethodNotSupportedRpcError.code:throw new n.MethodNotSupportedRpcError(S,{method:m.method});case n.LimitExceededRpcError.code:throw new n.LimitExceededRpcError(S);case n.JsonRpcVersionUnsupportedError.code:throw new n.JsonRpcVersionUnsupportedError(S);case n.UserRejectedRequestError.code:throw new n.UserRejectedRequestError(S);case n.UnauthorizedProviderError.code:throw new n.UnauthorizedProviderError(S);case n.UnsupportedProviderMethodError.code:throw new n.UnsupportedProviderMethodError(S);case n.ProviderDisconnectedError.code:throw new n.ProviderDisconnectedError(S);case n.ChainDisconnectedError.code:throw new n.ChainDisconnectedError(S);case n.SwitchChainError.code:throw new n.SwitchChainError(S);case n.UnsupportedNonOptionalCapabilityError.code:throw new n.UnsupportedNonOptionalCapabilityError(S);case n.UnsupportedChainIdError.code:throw new n.UnsupportedChainIdError(S);case n.DuplicateIdError.code:throw new n.DuplicateIdError(S);case n.UnknownBundleIdError.code:throw new n.UnknownBundleIdError(S);case n.BundleTooLargeError.code:throw new n.BundleTooLargeError(S);case n.AtomicReadyWalletRejectedUpgradeError.code:throw new n.AtomicReadyWalletRejectedUpgradeError(S);case n.AtomicityNotSupportedError.code:throw new n.AtomicityNotSupportedError(S);case 5e3:throw new n.UserRejectedRequestError(S);case n.WalletConnectSessionSettlementError.code:throw new n.WalletConnectSessionSettlementError(S);default:throw p instanceof e.BaseError?p:new n.UnknownRpcError(S)}}},{delay:({count:p,error:S})=>{var A;if(S&&S instanceof r.HttpRequestError){const T=(A=S==null?void 0:S.headers)==null?void 0:A.get("Retry-After");if(T!=null&&T.match(/\d/))return Number.parseInt(T,10)*1e3}return~~(1<<p)*v},retryCount:g,signal:_,shouldRetry:({error:p})=>c(p)}),{enabled:h,id:w})}}function c(l){return(0,t.isAbortError)(l)?!1:"code"in l&&typeof l.code=="number"?l.code===-1||l.code===n.LimitExceededRpcError.code||l.code===n.InternalRpcError.code||l.code===429:l instanceof r.HttpRequestError&&l.status?l.status===403||l.status===408||l.status===4
4413||l.status===429||l.status===500||l.status===502||l.status===503||l.status===504:!0}function u(l,f=0){let m=3735928559^f,y=1103547991^f;for(let h=0;h<l.length;h++){const b=l.charCodeAt(h);m=Math.imul(m^b,2654435761),y=Math.imul(y^b,1597334677)}return m=Math.imul(m^m>>>16,2246822507),m^=Math.imul(y^y>>>16,3266489909),y=Math.imul(y^y>>>16,2246822507),y^=Math.imul(m^m>>>16,3266489909),(4294967296*(2097151&y)+(m>>>0)).toString(36)}return Bo}var Rs={},Fm;function Dg(){if(Fm)return Rs;Fm=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.ccipReadTunnel=c;const e=kt(),r=$u(),n=pt(),t=Do(),o=Rt(),s=Le(),i=Ju(),a=ii();function c({batchGateways:u,ccipRequest:l=i.ccipRequest}){return{async request({data:f,sender:m,urls:y}){if(y.includes(a.localBatchGatewayUrl))return l({data:f,sender:m,urls:u});{const[h,b]=(0,o.decodeFunctionResult)({abi:e.batchGatewayAbi,functionName:"query",data:await l({data:(0,s.encodeFunctionData)({abi:e.batchGatewayAbi,functionName:"query",args:[[{sender:m,data:f,urls:y}]]}),sender:m,urls:u})});if(h[0]){let v;try{const g=(0,t.decodeErrorResult)({abi:[...e.batchGatewayAbi,r.solidityError],data:b[0]});if(g.errorName==="HttpError")v=new n.HttpRequestError({body:{message:g.args[1]},status:g.args[0],url:y.join(" | ")});else{const _=g.args[0];_&&(v=new Error(_))}}catch{}throw v??new Error("An unknown error occurred.")}return b[0]}}}}return Rs}var Oo={},Nm;function Gg(){if(Nm)return Oo;Nm=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.defineChain=e,Oo.extendSchema=r;function e(n){const t={formatters:void 0,fees:void 0,serializers:void 0,...n};function o(s){return i=>{const a=typeof i=="function"?i(s):i,c={...s,...a};return Object.assign(c,{extend:o(c)})}}return Object.assign(t,{extend:o(t)})}function r(){return{}}return Oo}var Bs={},$m;function Vg(){if($m)return Bs;$m=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.extractChain=e;function e({chains:r,id:n}){return r.find(t=>t.id===n)}return Bs}var Os={},zm;function Nf(){if(zm)return Os;zm=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.fromRlp=s;const e=de(),r=Sn(),n=Lo(),t=Ee(),o=oe();function s(u,l="hex"){const f=(()=>{if(typeof u=="string"){if(u.length>3&&u.length%2!==0)throw new r.InvalidHexValueError(u);return(0,t.hexToBytes)(u)}return u})(),m=(0,n.createCursor)(f,{recursiveReadLimit:Number.POSITIVE_INFINITY});return i(m,l)}function i(u,l="hex"){if(u.bytes.length===0)return l==="hex"?(0,o.bytesToHex)(u.bytes):u.bytes;const f=u.readByte();if(f<128&&u.decrementPosition(1),f<192){const y=a(u,f,128),h=u.readBytes(y);return l==="hex"?(0,o.bytesToHex)(h):h}const m=a(u,f,192);return c(u,m,l)}function a(u,l,f){if(f===128&&l<128)return 1;if(l<=f+55)return l-f;if(l===f+55+1)return u.readUint8();if(l===f+55+2)return u.readUint16();if(l===f+55+3)return u.readUint24();if(l===f+55+4)return u.readUint32();throw new e.BaseError("Invalid RLP prefix")}function c(u,l,f){const m=u.position,y=[];for(;u.position-m<l;)y.push(i(u,f));return y}return Os}var Cs={},Um;function $f(){if(Um)return Cs;Um=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.isHash=n;const e=Ze(),r=Ue();function n(t){return(0,e.isHex)(t)&&(0,r.size)(t)===32}return Cs}var xs={},kr={},Ve={},Lm;function E6(){if(Lm)return Ve;Lm=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.ripemd160=Ve.RIPEMD160=Ve.md5=Ve.MD5=Ve.sha1=Ve.SHA1=void 0;const e=dg(),r=hr(),n=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),t=new Uint32Array(80);class o extends e.HashMD{constructor(){super(64,20,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0}get(){const{A,B:T,C,D:R,E:I}=this;return[A,T,C,R,I]}set(A,T,C,R,I){this.A=A|0,this.B=T|0,this.C=C|0,this.D=R|0,this.E=I|0}process(A,T){for(let H=0;H<16;H++,T+=4)t[H]=A.getUint32(T,!1);for(let H=16;H<80;H++)t[H]=(0,r.rotl)(t[H-3]^t[H-8]^t[H-14]^t[H-16],1);let{A:C,B:R,C:I,D:x,E:F}=this;for(let H=0;H<80;H++){let j,k;H<20?(j=(0,e.Chi)(R,I,x),k=1518500249):H<40?(j=R^I^x,k=1859775393):H<60?(j=(0,e.Maj)(R,I,x),k=2400959708):(j=R^I^x,k=3395469782);const B=(0,r.rotl)(C,5)+j+F+k+t[H]|0;F=x,x=I,I=(0,r.rotl)(R,30),R=C,C=B}C=C+this.A|0,R=R+this.B|0,I=I+this.C|0,x=x+this.D|0,F=F+this.E|0,this.set(C,R,I,x,F)}roundClean(){(0,r.clean)(t)}destroy(){this.set(0,0,0,0,0),(0,r.clean)(this.buffer)}}Ve.SHA1=o,Ve.sha1=(0,r.createHasher)(()=>new o);const s=Math.pow(2,32),i=Array.from({length:64},(S,A)=>Math.floor(s*Math.abs(Math.sin(A+1)))),a=n.slice(0,4),c=new Uint32Array(16);class u extends e.HashMD{constructor(){super(64,16,8,!0),this.A=a[0]|0,this.B=a[1]|0,this.C=a[2]|0,this.D=a[3]|0}get(){const{A,B:T,C,D:R}=this;return[A,T,C,R]}set(A,T,C,R){this.A=A|0,this.B=T|0,this.C=C|0,this.D=R|0}process(A,T){for(let F=0;F<16;F++,T+=4)c[F]=A.getUint32(T,!0);let{A:C,B:R,C:I,D:x}=this;for(let F=0;F<64;F++){let H,j,k;F<16?(H=(0,e.Chi)(R,I,x),j=F,k=[7,12,17,22]):F<32?(H=(0,e.Chi)(x,R,I),j=(5*F+1)%16,k=[5,9,14,20]):F<48?(H=R^I^x,j=(3*F+5)%16,k=[4,11,16,23]):(H=I^(R|~x),j=7*F%16,k=[6,10,15,21]),H=H+C+i[F]+c[j],C=x,x=I,I=R,R=R+(0,r.rotl)(H,k[F%4])}C=C+this.A|0,R=R+this.B|0,I=I+this.C|0,x=x+this.D|0,this.set(C,R,I,x)}roundClean(){(0,r.clean)(c)}destroy(){this.set(0,0,0,0),(0,r.clean)(this.buffer)}}Ve.MD5=u,Ve.md5=(0,r.createHasher)(()=>new u);const l=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),f=Uint8Array.from(new Array(16).fill(0).map((S,A)=>A)),m=f.map(S=>(9*S+5)%16),y=(()=>{const T=[[f],[m]];for(let C=0;C<4;C++)for(let R of T)R.push(R[C].map(I=>l[I]));return T})(),h=y[0],b=y[1],v=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(S=>Uint8Array.from(S)),g=h.map((S,A)=>S.map(T=>v[A][T])),_=b.map((S,A)=>S.map(T=>v[A][T])),P=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),d=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function w(S,A,T,C){return S===0?A^T^C:S===1?A&T|~A&C:S===2?(A|~T)^C:S===3?A&C|T&~C:A^(T|~C)}const E=new Uint32Array(16);class p extends e.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:A,h1:T,h2:C,h3:R,h4:I}=this;return[A,T,C,R,I]}set(A,T,C,R,I){this.h0=A|0,this.h1=T|0,this.h2=C|0,this.h3=R|0,this.h4=I|0}process(A,T){for(let q=0;q<16;q++,T+=4)E[q]=A.getUint32(T,!0);let C=this.h0|0,R=C,I=this.h1|0,x=I,F=this.h2|0,H=F,j=this.h3|0,k=j,B=this.h4|0,O=B;for(let q=0;q<5;q++){const M=4-q,N=P[q],z=d[q],$=h[q],U=b[q],G=g[q],J=_[q];for(let W=0;W<16;W++){const V=(0,r.rotl)(C+w(q,I,F,j)+E[$[W]]+N,G[W])+B|0;C=B,B=j,j=(0,r.rotl)(F,10)|0,F=I,I=V}for(let W=0;W<16;
44W++){const V=(0,r.rotl)(R+w(M,x,H,k)+E[U[W]]+z,J[W])+O|0;R=O,O=k,k=(0,r.rotl)(H,10)|0,H=x,x=V}}this.set(this.h1+F+k|0,this.h2+j+O|0,this.h3+B+R|0,this.h4+C+x|0,this.h0+I+H|0)}roundClean(){(0,r.clean)(E)}destroy(){this.destroyed=!0,(0,r.clean)(this.buffer),this.set(0,0,0,0,0)}}return Ve.RIPEMD160=p,Ve.ripemd160=(0,r.createHasher)(()=>new p),Ve}var Dm;function Wg(){if(Dm)return kr;Dm=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.ripemd160=kr.RIPEMD160=void 0;const e=E6();return kr.RIPEMD160=e.RIPEMD160,kr.ripemd160=e.ripemd160,kr}var Gm;function Kg(){if(Gm)return xs;Gm=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.ripemd160=o;const e=Wg(),r=Ze(),n=Ee(),t=oe();function o(s,i){const a=i||"hex",c=(0,e.ripemd160)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return a==="bytes"?c:(0,t.toHex)(c)}return xs}var Kd={},Vm;function Zg(){return Vm||(Vm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventHash=void 0;var r=Hu();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return r.toSignatureHash}})})(Kd)),Kd}var Zd={},Wm;function Jg(){return Wm||(Wm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventSignature=void 0;var r=of();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return r.toSignature}})})(Zd)),Zd}var Jd={},Km;function Yg(){return Km||(Km=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionHash=void 0;var r=Hu();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return r.toSignatureHash}})})(Jd)),Jd}var Yd={},Zm;function Xg(){return Zm||(Zm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionSignature=void 0;var r=of();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return r.toSignature}})})(Yd)),Yd}var Hr={},Jm;function Qg(){if(Jm)return Hr;Jm=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.nonceManager=void 0,Hr.createNonceManager=n,Hr.jsonRpc=t;const e=Du(),r=Wr();function n(o){const{source:s}=o,i=new Map,a=new r.LruMap(8192),c=new Map,u=({address:f,chainId:m})=>`${f}.${m}`,l=f=>{i.delete(f),c.delete(f)};return{async consume({address:f,chainId:m,client:y}){const h=u({address:f,chainId:m}),b=this.get({address:f,chainId:m,client:y});this.increment({address:f,chainId:m});const v=await b;return await s.set({address:f,chainId:m},v),a.set(h,v),v},async increment({address:f,chainId:m}){const y=u({address:f,chainId:m}),h=i.get(y)??0;i.set(y,h+1)},async get({address:f,chainId:m,client:y}){const h=u({address:f,chainId:m});let b=c.get(h);return b||(b=(async()=>{try{const g=await s.get({address:f,chainId:m,client:y}),_=a.get(h)??0;return _>0&&g<=_?_+1:(a.delete(h),g)}finally{l(h)}})(),c.set(h,b)),(i.get(h)??0)+await b},reset({address:f,chainId:m}){const y=u({address:f,chainId:m});a.delete(y),l(y)}}}function t(){return{async get(o){const{address:s,client:i}=o;return(0,e.getTransactionCount)(i,{address:s,blockTag:"pending"})},set(){}}}return Hr.nonceManager=n({source:t()}),Hr}var gn={},Co={},qs={},Ym;function zf(){if(Ym)return qs;Ym=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.withTimeout=r;const e=xt();function r(n,{errorInstance:t=new Error("timed out"),timeout:o,signal:s}){return new Promise((i,a)=>{(async()=>{let c;const u=new AbortController;try{o>0&&(c=setTimeout(()=>{s?u.abort():a(t)},o)),i(await n({signal:(u==null?void 0:u.signal)||null}))}catch(l){if(u!=null&&u.signal.aborted&&(0,e.isAbortError)(l)){a(t);return}a(l)}finally{clearTimeout(c)}})()})}return qs}var xo={},Xm;function e_(){if(Xm)return xo;Xm=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.idCache=void 0;function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}return xo.idCache=e(),xo}var Qm;function Uf(){if(Qm)return Co;Qm=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.getHttpRpcClient=s,Co.parseUrl=i;const e=pt(),r=xt(),n=zf(),t=Fe(),o=e_();function s(a,c={}){const{url:u,headers:l}=i(a);return{async request(f){var w,E,p;const{body:m,fetchFn:y=c.fetchFn??fetch,onRequest:h=c.onRequest,onResponse:b=c.onResponse,timeout:v=c.timeout??1e4}=f,g={...c.fetchOptions??{},...f.fetchOptions??{}},{headers:_,method:P,signal:d}=g;try{const S=await(0,n.withTimeout)(async({signal:T})=>{const C={...g,body:Array.isArray(m)?(0,t.stringify)(m.map(F=>({jsonrpc:"2.0",id:F.id??o.idCache.take(),...F}))):(0,t.stringify)({jsonrpc:"2.0",id:m.id??o.idCache.take(),...m}),headers:{...l,"Content-Type":"application/json",..._},method:P||"POST",signal:d||(v>0?T:null)}
44,R=new Request(u,C),I=await(h==null?void 0:h(R,C))??{...C,url:u};return await y(I.url??u,I)},{errorInstance:new e.TimeoutError({body:m,url:u}),timeout:v,signal:!0});b&&await b(S);let A;if((w=S.headers.get("Content-Type"))!=null&&w.startsWith("application/json"))A=await S.json();else{A=await S.text();try{A=JSON.parse(A||"{}")}catch(T){if(S.ok)throw T;A={error:A}}}if(!S.ok){if(typeof((E=A.error)==null?void 0:E.code)=="number"&&typeof((p=A.error)==null?void 0:p.message)=="string")return A;throw new e.HttpRequestError({body:m,details:(0,t.stringify)(A.error)||S.statusText,headers:S.headers,status:S.status,url:u})}return A}catch(S){throw d!=null&&d.aborted?(0,r.getAbortError)(d):(0,r.isAbortError)(S)||S instanceof e.HttpRequestError||S instanceof e.TimeoutError?S:new e.HttpRequestError({body:m,cause:S,url:u})}}}}function i(a){try{const c=new URL(a),u=(()=>{if(c.username){const l=`${decodeURIComponent(c.username)}:${decodeURIComponent(c.password)}`;return c.username="",c.password="",{url:c.toString(),headers:{Authorization:`Basic ${btoa(l)}`}}}})();return{url:c.toString(),...u}}catch{return{url:a}}}return Co}var Ms={},Xd={},eh;function t_(){return eh||(eh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.socketClientCache=void 0,e.getSocketRpcClient=s;const r=pt(),n=wf(),t=zf(),o=e_();e.socketClientCache=new Map;async function s(i){const{getSocket:a,keepAlive:c=!0,key:u="socket",reconnect:l=!0,url:f}=i,{interval:m=3e4}=typeof c=="object"?c:{},{attempts:y=5,delay:h=2e3}=typeof l=="object"?l:{},b=JSON.stringify({keepAlive:c,key:u,url:f,reconnect:l});let v=e.socketClientCache.get(b);if(v)return v;let g=0;const{schedule:_}=(0,n.createBatchScheduler)({id:b,fn:async()=>{const w=new Map,E=new Map;let p,S,A,T,C=!1,R=!1;function I(){if(l&&!R&&g<y){if(C)return;C=!0,g++,S==null||S.close(),T=setTimeout(async()=>{if(T=void 0,R){C=!1;return}await x().catch(console.error),C=!1},h)}else w.clear(),E.clear()}async function x(){const F=await a({onClose(){var H,j;for(const k of w.values())(H=k.onError)==null||H.call(k,new r.SocketClosedError({url:f}));for(const k of E.values())(j=k.onError)==null||j.call(k,new r.SocketClosedError({url:f}));I()},onError(H){var j,k;p=H;for(const B of w.values())(j=B.onError)==null||j.call(B,p);for(const B of E.values())(k=B.onError)==null||k.call(B,p);I()},onOpen(){p=void 0,g=0},onResponse(H){const j=H.method==="eth_subscription",k=j?H.params.subscription:H.id,B=j?E:w,O=B.get(k);O&&O.onResponse(H),j||B.delete(k)}});if(R)return F.close(),F;if(S=F,c&&(A&&clearInterval(A),A=setInterval(()=>{var H;return(H=S.ping)==null?void 0:H.call(S)},m)),l&&E.size>0){const H=E.entries();for(const[j,{onResponse:k,body:B,onError:O}]of H)B&&(E.delete(j),v==null||v.request({body:B,onResponse:k,onError:O}))}return F}return await x(),p=void 0,v={close(){R=!0,A&&clearInterval(A),T&&(clearTimeout(T),T=void 0,C=!1),S.close(),e.socketClientCache.delete(b)},get socket(){return S},request({body:F,onError:H,onResponse:j}){var O;p&&H&&H(p);const k=F.id??o.idCache.take(),B=q=>{typeof q.id=="number"&&k!==q.id||(F.method==="eth_subscribe"&&typeof q.result=="string"&&E.set(q.result,{onResponse:B,onError:H,body:F}),j(q))};F.method==="eth_unsubscribe"&&E.delete((O=F.params)==null?void 0:O[0]),w.set(k,{onResponse:B,onError:H});try{S.request({body:{jsonrpc:"2.0",id:k,...F}})}catch(q){H==null||H(q)}},requestAsync({body:F,timeout:H=1e4}){return(0,t.withTimeout)(()=>new Promise((j,k)=>this.request({body:F,onError:k,onResponse:j})),{errorInstance:new r.TimeoutError({body:F,url:f}),timeout:H})},requests:w,subscriptions:E,url:f},e.socketClientCache.set(b,v),[v]}}),[P,[d]]=await _();return d}})(Xd)),Xd}const j6=_v(Tv);var th;function Lf(){if(th)return Ms;th=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.getWebSocketRpcClient=n;const e=pt(),r=t_();async function n(t,o={}){const{keepAlive:s,reconnect:i}=o;return(0,r.getSocketRpcClient)({async getSocket({onClose:a,onError:c,onOpen:u,onResponse:l}){const f=await Promise.resolve().then(()=>j6).then(v=>v.WebSocket),m=new f(t);function y(){m.removeEventListener("close",y),m.removeEventListener("message",h),m.removeEventListener("error",c),m.removeEventListener("open",u),a()}function h({data:v}){if(!(typeof v=="string"&&v.trim().length===0))try{const g=JSON.parse(v);l(g)}catch(g){c(g)}}m.addEventListener("close",y),m.addEventListener("message",h),m.addEventListener("error",c),m.addEventListener("open",u),m.readyState===f.CONNECTING&&await new Promise((v,g)=>{m&&(m.onopen=v,m.onerror=g)});const{close:b}=m;return Object.assign(m,{close(){b.bind(m)(),y()},ping(){try{if(m.readyState===m.CLOSED||m.readyState===m.CLOSING)throw new e.WebSocketRequestError({url:m.url,cause:new e.SocketClosedError({url:m.url})});const v={jsonrpc:"2.0",id:null,method:"net_version",params:[]};m.send(JSON.stringify(v))}catch(v){c(v)}},request({body:v}){if(m.readyState===m.CLOSED||m.readyState===m.CLOSING)throw new e.WebSocketRequestError({body:v,url:m.url,cause:new e.SocketClosedError({url:m.url})});return m.send(JSON.stringify(v))}})}
44,keepAlive:s,reconnect:i,url:t})}return Ms}var rh;function r_(){if(rh)return gn;rh=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.rpc=void 0,gn.getSocket=o;const e=Uf(),r=Lf();function n(s,{body:i,onError:a,onResponse:c}){return s.request({body:i,onError:a,onResponse:c}),s}async function t(s,{body:i,timeout:a=1e4}){return s.requestAsync({body:i,timeout:a})}async function o(s){const i=await(0,r.getWebSocketRpcClient)(s);return Object.assign(i.socket,{requests:i.requests,subscriptions:i.subscriptions})}return gn.rpc={http(s,i){return(0,e.getHttpRpcClient)(s).request(i)},webSocket:n,webSocketAsync:t},gn}var ks={},Hs={},qo={},nh;function n_(){return nh||(nh=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.presignMessagePrefix=void 0,qo.presignMessagePrefix=`�Ethereum Signed Message: 45`),qo}var oh;function o_(){if(oh)return Hs;oh=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.toPrefixedMessage=o;const e=n_(),r=qe(),n=Ue(),t=oe();function o(s){const i=typeof s=="string"?(0,t.stringToHex)(s):typeof s.raw=="string"?s.raw:(0,t.bytesToHex)(s.raw),a=(0,t.stringToHex)(`${e.presignMessagePrefix}${(0,n.size)(i)}`);return(0,r.concat)([a,i])}return Hs}var ih;function ui(){if(ih)return ks;ih=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.hashMessage=n;const e=tt(),r=o_();function n(t,o){return(0,e.keccak256)((0,r.toPrefixedMessage)(t),o)}return ks}var Fr={},Nr={},Xt={},ah;function i_(){if(ah)return Xt;ah=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.InvalidStructTypeError=Xt.InvalidPrimaryTypeError=Xt.InvalidDomainError=void 0;const e=Fe(),r=de();class n extends r.BaseError{constructor({domain:i}){super(`Invalid domain "${(0,e.stringify)(i)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}Xt.InvalidDomainError=n;class t extends r.BaseError{constructor({primaryType:i,types:a}){super(`Invalid primary type \`${i}\` must be one of \`${JSON.stringify(Object.keys(a))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}Xt.InvalidPrimaryTypeError=t;class o extends r.BaseError{constructor({type:i}){super(`Struct type "${i}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}return Xt.InvalidStructTypeError=o,Xt}var sh;function od(){if(sh)return Nr;
45sh=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.serializeTypedData=u,Nr.validateTypedData=l,Nr.getTypesForEIP712Domain=f,Nr.domainSeparator=m;const e=Se(),r=At(),n=i_(),t=rt(),o=Ue(),s=oe(),i=Fu(),a=di(),c=Fe();function u(h){const{domain:b,message:v,primaryType:g,types:_}=h,P=(E,p)=>{const S={...p};for(const A of E){const{name:T,type:C}=A;C==="address"&&(S[T]=S[T].toLowerCase())}return S},d=_.EIP712Domain?b?P(_.EIP712Domain,b):{}:{},w=(()=>{if(g!=="EIP712Domain")return P(_[g],v)})();return(0,c.stringify)({domain:d,message:w,primaryType:g,types:_})}function l(h){const{domain:b,message:v,primaryType:g,types:_}=h,P=(d,w)=>{for(const E of d){const{name:p,type:S}=E,A=w[p],T=S.match(i.integerRegex);if(T&&(typeof A=="number"||typeof A=="bigint")){const[I,x,F]=T;(0,s.numberToHex)(A,{signed:x==="int",size:Number.parseInt(F,10)/8})}if(S==="address"&&typeof A=="string"&&!(0,t.isAddress)(A))throw new r.InvalidAddressError({address:A});const C=S.match(i.bytesRegex);if(C){const[I,x]=C;if(x&&(0,o.size)(A)!==Number.parseInt(x,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(x,10),givenSize:(0,o.size)(A)})}const R=_[S];R&&(y(S),P(R,A))}};if(_.EIP712Domain&&b){if(typeof b!="object")throw new n.InvalidDomainError({domain:b});P(_.EIP712Domain,b)}if(g!=="EIP712Domain")if(_[g])P(_[g],v);else throw new n.InvalidPrimaryTypeError({primaryType:g,types:_})}function f({domain:h}){return[typeof(h==null?void 0:h.name)=="string"&&{name:"name",type:"string"},(h==null?void 0:h.version)&&{name:"version",type:"string"},(typeof(h==null?void 0:h.chainId)=="number"||typeof(h==null?void 0:h.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(h==null?void 0:h.verifyingContract)&&{name:"verifyingContract",type:"address"},(h==null?void 0:h.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function m({domain:h}){return(0,a.hashDomain)({domain:h,types:{EIP712Domain:f({domain:h})}})}function y(h){if(h==="address"||h==="bool"||h==="string"||h.startsWith("bytes")||h.startsWith("uint")||h.startsWith("int"))throw new n.InvalidStructTypeError({type:h})}return Nr}var ch;function di(){if(ch)return Fr;ch=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.hashTypedData=s,Fr.hashDomain=i,Fr.hashStruct=a,Fr.encodeType=l;const e=Tt(),r=qe(),n=oe(),t=tt(),o=od();function s(y){const{domain:h={},message:b,primaryType:v}=y,g={EIP712Domain:(0,o.getTypesForEIP712Domain)({domain:h}),...y.types};(0,o.validateTypedData)({domain:h,message:b,primaryType:v,types:g});const _=["0x1901"];return h&&_.push(i({domain:h,types:g})),v!=="EIP712Domain"&&_.push(a({data:b,primaryType:v,types:g})),(0,t.keccak256)((0,r.concat)(_))}function i({domain:y,types:h}){return a({data:y,primaryType:"EIP712Domain",types:h})}function a({data:y,primaryType:h,types:b}){const v=c({data:y,primaryType:h,types:b});return(0,t.keccak256)(v)}function c({data:y,primaryType:h,types:b}){const v=[{type:"bytes32"}],g=[u({primaryType:h,types:b})];for(const _ of b[h]){const[P,d]=m({types:b,name:_.name,type:_.type,value:y[_.name]});v.push(P),g.push(d)}return(0,e.encodeAbiParameters)(v,g)}function u({primaryType:y,types:h}){const b=(0,n.toHex)(l({primaryType:y,types:h}));return(0,t.keccak256)(b)}function l({primaryType:y,types:h}){let b="";const v=f({primaryType:y,types:h});v.delete(y);const g=[y,...Array.from(v).sort()];for(const _ of g)b+=`${_}(${h[_].map(({name:P,type:d})=>`${d} ${P}`).join(",")})`;return b}function f({primaryType:y,types:h},b=new Set){const v=y.match(/^\w*/u),g=v==null?void 0:v[0];if(b.has(g)||h[g]===void 0)return b;b.add(g);for(const _ of h[g])f({primaryType:_.type,types:h},b);return b}function m({types:y,name:h,type:b,value:v}){if(y[b]!==void 0)return[{type:"bytes32"},(0,t.keccak256)(c({data:v,primaryType:b,types:y}))];if(b==="bytes")return[{type:"bytes32"},(0,t.keccak256)(v)];if(b==="string")return[{type:"bytes32"},(0,t.keccak256)((0,n.toHex)(v))];if(b.lastIndexOf("]")===b.length-1){const g=b.slice(0,b.lastIndexOf("[")),_=v.map(P=>m({name:h,type:g,types:y,value:P}));return[{type:"bytes32"},(0,t.keccak256)((0,e.encodeAbiParameters)(_.map(([P])=>P),_.map(([,P])=>P)))]}return[{type:b},v]}return Fr}var Fs={},$r={},uh;
45function Df(){return uh||(uh=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.zeroHash=$r.erc6492MagicBytes=void 0,$r.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",$r.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),$r}var dh;function Gf(){if(dh)return Fs;dh=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.isErc6492Signature=n;const e=Df(),r=ft();function n(t){return(0,r.sliceHex)(t,-32)===e.erc6492MagicBytes}return Fs}var Ns={},Mo={},Qd={},Ae={},We={},_n={},ko={},fh;function w6(){if(fh)return ko;fh=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&t!==void 0&&(this.delete(n),super.set(n,t)),t}set(n,t){if(super.set(n,t),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}return ko.LruMap=e,ko}var lh;function P6(){if(lh)return _n;lh=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.checksum=void 0,_n.clear=n;const e=w6(),r={checksum:new e.LruMap(8192)};_n.checksum=r.checksum;function n(){for(const t of Object.values(r))t.clear()}return _n}var fr={},bh;function Vf(){if(bh)return fr;bh=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.keccak256=i,fr.hmac256=a,fr.ripemd160=c,fr.sha256=u,fr.validate=l;const e=lg(),r=Wg(),n=ig(),t=_g(),o=Mt(),s=Ne();function i(f,m={}){const{as:y=typeof f=="string"?"Hex":"Bytes"}=m,h=(0,n.keccak_256)(o.from(f));return y==="Bytes"?h:s.fromBytes(h)}function a(f,m,y={}){const{as:h=typeof m=="string"?"Hex":"Bytes"}=y,b=(0,e.hmac)(t.sha256,o.from(f),o.from(m));return h==="Bytes"?b:s.fromBytes(b)}function c(f,m={}){const{as:y=typeof f=="string"?"Hex":"Bytes"}=m,h=(0,r.ripemd160)(o.from(f));return y==="Bytes"?h:s.fromBytes(h)}function u(f,m={}){const{as:y=typeof f=="string"?"Hex":"Bytes"}=m,h=(0,t.sha256)(o.from(f));return y==="Bytes"?h:s.fromBytes(h)}function l(f){return s.validate(f)&&s.size(f)===32}return fr}var Oe={},mh;function a_(){if(mh)return Oe;mh=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.InvalidSerializedSizeError=Oe.InvalidUncompressedPrefixError=Oe.InvalidCompressedPrefixError=Oe.InvalidPrefixError=Oe.InvalidError=void 0,Oe.assert=o,Oe.compress=s,Oe.from=i,Oe.fromBytes=a,Oe.fromHex=c,Oe.toBytes=u,Oe.toHex=l,Oe.validate=f;const e=Mt(),r=lt(),n=Ne(),t=Zu();function o(g,_={}){const{compressed:P}=_,{prefix:d,x:w,y:E}=g;if(P===!1||typeof w=="bigint"&&typeof E=="bigint"){if(d!==4)throw new y({prefix:d,cause:new b});return}if(P===!0||typeof w=="bigint"&&typeof E>"u"){if(d!==3&&d!==2)throw new y({prefix:d,cause:new h});return}throw new m({publicKey:g})}function s(g){const{x:_,y:P}=g;return{prefix:P%2n===0n?2:3,x:_}}function i(g){const _=(()=>{if(n.validate(g))return c(g);if(e.validate(g))return a(g);const{prefix:P,x:d,y:w}=g;return typeof d=="bigint"&&typeof w=="bigint"?{prefix:P??4,x:d,y:w}:{prefix:P,x:d}})();return o(_),_}function a(g){return c(n.fromBytes(g))}function c(g){if(g.length!==132&&g.length!==130&&g.length!==68)throw new v({publicKey:g});if(g.length===130){const d=BigInt(n.slice(g,0,32)),w=BigInt(n.slice(g,32,64));return{prefix:4,x:d,y:w}}if(g.length===132){const d=Number(n.slice(g,0,1)),w=BigInt(n.slice(g,1,33)),E=BigInt(n.slice(g,33,65));return{prefix:d,x:w,y:E}}const _=Number(n.slice(g,0,1)),P=BigInt(n.slice(g,1,33));return{prefix:_,x:P}}function u(g,_={}){return e.fromHex(l(g,_))}function l(g,_={}){o(g);const{prefix:P,x:d,y:w}=g,{includePrefix:E=!0}=_;return n.concat(E?n.fromNumber(P,{size:1}):"0x",n.fromNumber(d,{size:32}),typeof w=="bigint"?n.fromNumber(w,{size:32}):"0x")}function f(g,_={}){try{return o(g,_),!0}catch{return!1}}class m extends r.BaseError{constructor({publicKey:_}){super(`Value \`${t.stringify(_)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}Oe.InvalidError=m;class y extends r.BaseError{constructor({prefix:_,cause:P}){super(`Prefix "${_}
45" is invalid.`,{cause:P}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}Oe.InvalidPrefixError=y;class h extends r.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}Oe.InvalidCompressedPrefixError=h;class b extends r.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}Oe.InvalidUncompressedPrefixError=b;class v extends r.BaseError{constructor({publicKey:_}){super(`Value \`${_}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${n.size(n.from(_))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}return Oe.InvalidSerializedSizeError=v,Oe}var hh;function id(){if(hh)return We;hh=1,Object.defineProperty(We,"__esModule",{value:!0}),We.InvalidChecksumError=We.InvalidInputError=We.InvalidAddressError=void 0,We.assert=i,We.checksum=a,We.from=c,We.fromPublicKey=u,We.isEqual=l,We.validate=f;const e=Mt(),r=P6(),n=lt(),t=Vf(),o=a_(),s=/^0x[a-fA-F0-9]{40}$/;function i(b,v={}){const{strict:g=!0}=v;if(!s.test(b))throw new m({address:b,cause:new y});if(g){if(b.toLowerCase()===b)return;if(a(b)!==b)throw new m({address:b,cause:new h})}}function a(b){if(r.checksum.has(b))return r.checksum.get(b);i(b,{strict:!1});const v=b.substring(2).toLowerCase(),g=t.keccak256(e.fromString(v),{as:"Bytes"}),_=v.split("");for(let d=0;d<40;d+=2)g[d>>1]>>4>=8&&_[d]&&(_[d]=_[d].toUpperCase()),(g[d>>1]&15)>=8&&_[d+1]&&(_[d+1]=_[d+1].toUpperCase());const P=`0x${_.join("")}`;return r.checksum.set(b,P),P}function c(b,v={}){const{checksum:g=!1}=v;return i(b),g?a(b):b}function u(b,v={}){const g=t.keccak256(`0x${o.toHex(b).slice(4)}`).substring(26);return c(`0x${g}`,v)}function l(b,v){return i(b,{strict:!1}),i(v,{strict:!1}),b.toLowerCase()===v.toLowerCase()}function f(b,v={}){const{strict:g=!0}=v??{};try{return i(b,{strict:g}),!0}catch{return!1}}class m extends n.BaseError{constructor({address:v,cause:g}){super(`Address "${v}" is invalid.`,{cause:g}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}We.InvalidAddressError=m;class y extends n.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}We.InvalidInputError=y;class h extends n.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}return We.InvalidChecksumError=h,We}var Te={},L={},yh;function Wf(){return yh||(yh=1,Object.defineProperty(L,"__esModule",{value:!0}),L.minInt120=L.minInt112=L.minInt104=L.minInt96=L.minInt88=L.minInt80=L.minInt72=L.minInt64=L.minInt56=L.minInt48=L.minInt40=L.minInt32=L.minInt24=L.minInt16=L.minInt8=L.maxInt256=L.maxInt248=L.maxInt240=L.maxInt232=L.maxInt224=L.maxInt216=L.maxInt208=L.maxInt200=L.maxInt192=L.maxInt184=L.maxInt176=L.maxInt168=L.maxInt160=L.maxInt152=L.maxInt144=L.maxInt136=L.maxInt128=L.maxInt120=L.maxInt112=L.maxInt104=L.maxInt96=L.maxInt88=L.maxInt80=L.maxInt72=L.maxInt64=L.maxInt56=L.maxInt48=L.maxInt40=L.maxInt32=L.maxInt24=L.maxInt16=L.maxInt8=L.integerRegex=L.bytesRegex=L.arrayRegex=void 0,L.maxUint256=L.maxUint248=L.maxUint240=L.maxUint232=L.maxUint224=L.maxUint216=L.maxUint208=L.maxUint200=L.maxUint192=L.maxUint184=L.maxUint176=L.maxUint168=L.maxUint160=L.maxUint152=L.maxUint144=L.maxUint136=L.maxUint128=L.maxUint120=L.maxUint112=L.maxUint104=L.maxUint96=L.maxUint88=L.maxUint80=L.maxUint72=L.maxUint64=L.maxUint56=L.maxUint48=L.maxUint40=L.maxUint32=L.maxUint24=L.maxUint16=L.maxUint8=L.minInt256=L.minInt248=L.minInt240=L.minInt232=L.minInt224=L.minInt216=L.minInt208=L.minInt200=L.minInt192=L.minInt184=L.minInt176=L.minInt168=L.minInt160=L.minInt152=L.minInt144=L.minInt136=L.minInt128=void 0,L.arrayRegex=/^(.*)\[([0-9]*)\]$/,L.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,L.integerRegex=/^(u?int)(8|
4516|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,L.maxInt8=2n**(8n-1n)-1n,L.maxInt16=2n**(16n-1n)-1n,L.maxInt24=2n**(24n-1n)-1n,L.maxInt32=2n**(32n-1n)-1n,L.maxInt40=2n**(40n-1n)-1n,L.maxInt48=2n**(48n-1n)-1n,L.maxInt56=2n**(56n-1n)-1n,L.maxInt64=2n**(64n-1n)-1n,L.maxInt72=2n**(72n-1n)-1n,L.maxInt80=2n**(80n-1n)-1n,L.maxInt88=2n**(88n-1n)-1n,L.maxInt96=2n**(96n-1n)-1n,L.maxInt104=2n**(104n-1n)-1n,L.maxInt112=2n**(112n-1n)-1n,L.maxInt120=2n**(120n-1n)-1n,L.maxInt128=2n**(128n-1n)-1n,L.maxInt136=2n**(136n-1n)-1n,L.maxInt144=2n**(144n-1n)-1n,L.maxInt152=2n**(152n-1n)-1n,L.maxInt160=2n**(160n-1n)-1n,L.maxInt168=2n**(168n-1n)-1n,L.maxInt176=2n**(176n-1n)-1n,L.maxInt184=2n**(184n-1n)-1n,L.maxInt192=2n**(192n-1n)-1n,L.maxInt200=2n**(200n-1n)-1n,L.maxInt208=2n**(208n-1n)-1n,L.maxInt216=2n**(216n-1n)-1n,L.maxInt224=2n**(224n-1n)-1n,L.maxInt232=2n**(232n-1n)-1n,L.maxInt240=2n**(240n-1n)-1n,L.maxInt248=2n**(248n-1n)-1n,L.maxInt256=2n**(256n-1n)-1n,L.minInt8=-(2n**(8n-1n)),L.minInt16=-(2n**(16n-1n)),L.minInt24=-(2n**(24n-1n)),L.minInt32=-(2n**(32n-1n)),L.minInt40=-(2n**(40n-1n)),L.minInt48=-(2n**(48n-1n)),L.minInt56=-(2n**(56n-1n)),L.minInt64=-(2n**(64n-1n)),L.minInt72=-(2n**(72n-1n)),L.minInt80=-(2n**(80n-1n)),L.minInt88=-(2n**(88n-1n)),L.minInt96=-(2n**(96n-1n)),L.minInt104=-(2n**(104n-1n)),L.minInt112=-(2n**(112n-1n)),L.minInt120=-(2n**(120n-1n)),L.minInt128=-(2n**(128n-1n)),L.minInt136=-(2n**(136n-1n)),L.minInt144=-(2n**(144n-1n)),L.minInt152=-(2n**(152n-1n)),L.minInt160=-(2n**(160n-1n)),L.minInt168=-(2n**(168n-1n)),L.minInt176=-(2n**(176n-1n)),L.minInt184=-(2n**(184n-1n)),L.minInt192=-(2n**(192n-1n)),L.minInt200=-(2n**(200n-1n)),L.minInt208=-(2n**(208n-1n)),L.minInt216=-(2n**(216n-1n)),L.minInt224=-(2n**(224n-1n)),L.minInt232=-(2n**(232n-1n)),L.minInt240=-(2n**(240n-1n)),L.minInt248=-(2n**(248n-1n)),L.minInt256=-(2n**(256n-1n)),L.maxUint8=2n**8n-1n,L.maxUint16=2n**16n-1n,L.maxUint24=2n**24n-1n,L.maxUint32=2n**32n-1n,L.maxUint40=2n**40n-1n,L.maxUint48=2n**48n-1n,L.maxUint56=2n**56n-1n,L.maxUint64=2n**64n-1n,L.maxUint72=2n**72n-1n,L.maxUint80=2n**80n-1n,L.maxUint88=2n**88n-1n,L.maxUint96=2n**96n-1n,L.maxUint104=2n**104n-1n,L.maxUint112=2n**112n-1n,L.maxUint120=2n**120n-1n,L.maxUint128=2n**128n-1n,L.maxUint136=2n**136n-1n,L.maxUint144=2n**144n-1n,L.maxUint152=2n**152n-1n,L.maxUint160=2n**160n-1n,L.maxUint168=2n**168n-1n,L.maxUint176=2n**176n-1n,L.maxUint184=2n**184n-1n,L.maxUint192=2n**192n-1n,L.maxUint200=2n**200n-1n,L.maxUint208=2n**208n-1n,L.maxUint216=2n**216n-1n,L.maxUint224=2n**224n-1n,L.maxUint232=2n**232n-1n,L.maxUint240=2n**240n-1n,L.maxUint248=2n**248n-1n,L.maxUint256=2n**256n-1n),L}var ph;function A6(){if(ph)return Te;ph=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.decodeParameter=i,Te.decodeAddress=u,Te.decodeArray=l,Te.decodeBool=f,Te.decodeBytes=m,Te.decodeNumber=y,Te.decodeTuple=h,Te.decodeString=b,Te.prepareParameters=v,Te.prepareParameter=g,Te.encode=_,Te.encodeAddress=P,Te.encodeArray=d,Te.encodeBytes=w,Te.encodeBoolean=E,Te.encodeNumber=p,Te.encodeString=S,Te.encodeTuple=A,Te.getArrayComponents=T,Te.hasDynamicChild=C;const e=fi(),r=id(),n=Mt(),t=lt(),o=Ne(),s=Wf();function i(R,I,x){const{checksumAddress:F,staticPosition:H}=x,j=T(I.type);if(j){const[k,B]=j;return l(R,{...I,type:B},{checksumAddress:F,length:k,staticPosition:H})}if(I.type==="tuple")return h(R,I,{checksumAddress:F,staticPosition:H});if(I.type==="address")return u(R,{checksum:F});if(I.type==="bool")return f(R);if(I.type.startsWith("bytes"))return m(R,I,{staticPosition:H});if(I.type.startsWith("uint")||I.type.startsWith("int"))return y(R,I);if(I.type==="string")return b(R,{staticPosition:H});throw new e.InvalidTypeError(I.type)}const a=32,c=32;function u(R,I={}){const{checksum:x=!1}=I,F=R.readBytes(32);return[(j=>x?r.checksum(j):j)(o.fromBytes(n.slice(F,-20))),32]}function l(R,I,x){const{checksumAddress:F,length:H,staticPosition:j}=x;if(!H){const O=n.toNumber(R.readBytes(c)),q=j+O,M=q+a;R.setPosition(q);const N=n.toNumber(R.readBytes(a)),z=C(I);let $=0;const U=[];for(let G=0;G<N;++G){R.setPosition(M+(z?G*32:$));const[J,W]=i(R,I,{checksumAddress:F,staticPosition:M});$+=W,U.push(J)}return R.setPosition(j+32),[U,32]}if(C(I)){const O=n.toNumber(R.readBytes(c)),q=j+O,M=[];for(let N=0;N<H;++N){R.setPosition(q+N*32);const[z]=i(R,I,{checksumAddress:F,staticPosition:q});M.push(z)}return R.setPosition(j+32),[M,32]}let k=0;const B=[];for(let O=0;O<H;++O){const[q,M]=i(R,I,{checksumAddress:F,staticPosition:j+k});k+=M,B.push(q)}return[B,k]}function f(R){return[n.toBoolean(R.readBytes(32),{size:32}),32]}function m(R,I,{staticPosition:x}){const[F,H]=I.type.split("bytes");if(!H){const k=n.toNumber(R.readBytes(32));R.setPosition(x+k);const B=n.toNumber(R.readBytes(32));if(B===0)return R.setPosition(x+32),["0x",32];const O=R.readBytes(B);return R.setPosition(x+32),[o.fromBytes(O),32]}return[o.fromBytes(R.readBytes(Number.parseInt(H,10),32)),32]}function y(R,I){const x=I.type.startsWith("int"),F=Number.parseInt(I.type.split("int")[1]||"256",10),H=R.readBytes(32);return[F>48?n.toBigInt(H,{signed:x}):n.toNumber(H,{signed:x}),32]}function h(R,I,x){const{checksumAddress:F,staticPosition:H}=x,j=I.components.length===0||I.components.some(({name:O})=>!O),k=j?[]:{};let B=0;if(C(I)){const O=n.toNumber(R.readBytes(c)),q=H+O;for(let M=0;M<I.components.length;++M){const N=I.components[M];R.setPosition(q+B);const[z,$]=i(R,N,{checksumAddress:F,staticPosition:q});B+=$,k[j?M:N==null?void 0:N.name]=z}return R.setPosition(H+32),[k,32]}for(let O=0;O<I.components.length;++O){const q=I.components[O],[M,N]=i(R,q,{checksumAddress:F,staticPosition:H});k[j?O:q==null?void 0:q.name]=M,B+=N}return[k,B]}function b(R,{staticPosition:I}){const x=n.toNumber(R.readBytes(32)),F=I+x;R.setPosition(F);const H=n.toNumber(R.readBytes(32));if(H===0)return R.setPosition(I+32),["",32];const j=R.readBytes(H,32),k=n.toString(n.trimLeft(j));return R.setPosition(I+32),[k,32]}function v({checksumAddress:R,parameters:I,values:x}){const F=[];for(let H=0;H<I.length;H++)F.push(g({checksumAddress:R,parameter:I[H],value:x[H]}));return F}function g({checksumAddress:R=!1,parameter:I,value:x}){const F=I,H=T(F.type);if(H){const[j,k]=H;return d(x,{checksumAddress:R,length:j,parameter:{...F,type:k}})}if(F.type==="tuple")return A(x,{checksumAddress:R,parameter:F});if(F.type==="address")return P(x,{checksum:R});if(F.type==="bool")return E(x);if(F.type.startsWith("uint")||F.type.startsWith("int")){const j=F.type.startsWith("int"),[,,k="256"]=s.integerRegex.exec(F.type)??[];return p(x,{signed:j,size:Number(k)})}if(F.type.startsWith("bytes"))return w(x,{type:F.type});if(F.type==="string")return S(x);throw new e.InvalidTypeError(F.type)}function _(R){let I=0;for(let j=0;j<R.length;j++){const{dynamic:k,encoded:B}=R[j];k?I+=32:I+=o.size(B)}const x=[],F=[];let H=0;for(let j=0;j<R.length;j++){const{dynamic:k,encoded:B}=R[j];k?(x.push(o.fromNumber(I+H,{size:32})),F.push(B),H+=o.size(B)):x.push(B)}return o.concat(...x,...F)}function P(R,I){const{checksum:x=!1}=I;return r.assert(R,{strict:x}),{dynamic:!1,encoded:o.padLeft(R.toLowerCase())}}function d(R,I){const{checksumAddress:x,length:F,parameter:H}=I,j=F===null;if(!Array.isArray(R))throw new e.InvalidArrayError(R);if(!j&&R.length!==F)throw new e.ArrayLengthMismatchError({expectedLength:F,givenLength:R.length,type:`${H.type}[${F}]`});let k=!1;const B=[];for(let O=0;O<R.length;O++){const q=g({checksumAddress:x,parameter:H,value:R[O]});q.dynamic&&(k=!0),B.push(q)}if(j||k){const O=_(B);if(j){const q=o.fromNumber(B.length,{size:32});return{dynamic:!0,encoded:B.length>0?o.concat(q,O):q}}if(k)return{dynamic:!0,encoded:O}}return{dynamic:!1,encoded:o.concat(...B.map(({encoded:O})=>O))}}function w(R,{type:I}){const[,x]=I.split("bytes"),F=o.size(R);if(!x){let H=R;return F%32!==0&&(H=o.padRight(H,Math.ceil((R.length-2)/2/32)*32)),{dynamic:!0,encoded:o.concat(o.padLeft(o.fromNumber(F,{size:32})),H)}}if(F!==Number.parseInt(x,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(x,10),value:R});return{dynamic:!1,encoded:o.padRight(R)}}function E(R){if(typeof R!="boolean")throw new t.BaseError(`Invalid boolean value: "${R}" (type: ${typeof R}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:o.padLeft(o.fromBoolean(R))}}function p(R,{signed:I,size:x}){if(typeof x=="number"){const F=2n**(BigInt(x)-(I?1n:0n))-1n,H=I?-F-1n:0n;if(R>F||R<H)throw new o.IntegerOutOfRangeError({max:F.toString(),min:H.toString(),signed:I,size:x/8,value:R.toString()})}return{dynamic:!1,encoded:o.fromNumber(R,{size:32,signed:I})}}function S(R){const I=o.fromString(R),x=Math.ceil(o.size(I)/32),F=[];for(let H=0;H<x;H++)F.push(o.padRight(o.slice(I,H*32,(H+1)*32)));return{dynamic:!0,encoded:o.concat(o.padRight(o.fromNumber(o.size(I),{size:32})),...F)}}function A(R,I){const{checksumAddress:x,parameter:F}=I;let H=!1;const j=[];for(let k=0;k<F.components.length;k++){const B=F.components[k],O=Array.isArray(R)?k:B.name,q=g({checksumAddress:x,parameter:B,value:R[O]});j.push(q),q.dynamic&&(H=!0)}return{dynamic:H,encoded:H?_(j):o.concat(...j.map(({encoded:k})=>k))}}function T(R){const I=R.match(/^(.*)\[(\d+)?\]$/);return I?[I[2]?Number(I[2]):null,I[1]]:void 0}function C(R){var F;const{type:I}=R;
45if(I==="string"||I==="bytes"||I.endsWith("[]"))return!0;if(I==="tuple")return(F=R.components)==null?void 0:F.some(C);const x=T(R.type);return!!(x&&C({...R,type:x[1]}))}return Te}var Ct={},gh;function s_(){if(gh)return Ct;gh=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.RecursiveReadLimitExceededError=Ct.PositionOutOfBoundsError=Ct.NegativeOffsetError=void 0,Ct.create=n;const e=lt(),r={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new s({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(i){if(i<0||i>this.bytes.length-1)throw new o({length:this.bytes.length,position:i})},decrementPosition(i){if(i<0)throw new t({offset:i});const a=this.position-i;this.assertPosition(a),this.position=a},getReadCount(i){return this.positionReadCount.get(i||this.position)||0},incrementPosition(i){if(i<0)throw new t({offset:i});const a=this.position+i;this.assertPosition(a),this.position=a},inspectByte(i){const a=i??this.position;return this.assertPosition(a),this.bytes[a]},inspectBytes(i,a){const c=a??this.position;return this.assertPosition(c+i-1),this.bytes.subarray(c,c+i)},inspectUint8(i){const a=i??this.position;return this.assertPosition(a),this.bytes[a]},inspectUint16(i){const a=i??this.position;return this.assertPosition(a+1),this.dataView.getUint16(a)},inspectUint24(i){const a=i??this.position;return this.assertPosition(a+2),(this.dataView.getUint16(a)<<8)+this.dataView.getUint8(a+2)},inspectUint32(i){const a=i??this.position;return this.assertPosition(a+3),this.dataView.getUint32(a)},pushByte(i){this.assertPosition(this.position),this.bytes[this.position]=i,this.position++},pushBytes(i){this.assertPosition(this.position+i.length-1),this.bytes.set(i,this.position),this.position+=i.length},pushUint8(i){this.assertPosition(this.position),this.bytes[this.position]=i,this.position++},pushUint16(i){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,i),this.position+=2},pushUint24(i){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,i>>8),this.dataView.setUint8(this.position+2,i&255),this.position+=3},pushUint32(i){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,i),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const i=this.inspectByte();return this.position++,i},readBytes(i,a){this.assertReadLimit(),this._touch();const c=this.inspectBytes(i);return this.position+=a??i,c},readUint8(){this.assertReadLimit(),this._touch();const i=this.inspectUint8();return this.position+=1,i},readUint16(){this.assertReadLimit(),this._touch();const i=this.inspectUint16();return this.position+=2,i},readUint24(){this.assertReadLimit(),this._touch();const i=this.inspectUint24();return this.position+=3,i},readUint32(){this.assertReadLimit(),this._touch();const i=this.inspectUint32();return this.position+=4,i},get remaining(){return this.bytes.length-this.position},setPosition(i){const a=this.position;return this.assertPosition(i),this.position=i,()=>this.position=a},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const i=this.getReadCount();this.positionReadCount.set(this.position,i+1),i>0&&this.recursiveReadCount++}};function n(i,{recursiveReadLimit:a=8192}={}){const c=Object.create(r);return c.bytes=i,c.dataView=new DataView(i.buffer,i.byteOffset,i.byteLength),c.positionReadCount=new Map,c.recursiveReadLimit=a,c}class t extends e.BaseError{constructor({offset:a}){super(`Offset \`${a}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}Ct.NegativeOffsetError=t;class o extends e.BaseError{constructor({length:a,position:c}){super(`Position \`${c}\` is out of bounds (\`0 < position < ${a}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}Ct.PositionOutOfBoundsError=o;class s extends e.BaseError{constructor({count:a,limit:c}
45){super(`Recursive read limit of \`${c}\` exceeded (recursive read count: \`${a}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}return Ct.RecursiveReadLimitExceededError=s,Ct}var _h;function fi(){if(_h)return Ae;_h=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.InvalidTypeError=Ae.InvalidArrayError=Ae.LengthMismatchError=Ae.BytesSizeMismatchError=Ae.ArrayLengthMismatchError=Ae.ZeroDataError=Ae.DataSizeTooSmallError=void 0,Ae.decode=c,Ae.encode=u,Ae.encodePacked=l,Ae.format=f,Ae.from=m;const e=br(),r=id(),n=Mt(),t=lt(),o=Ne(),s=A6(),i=s_(),a=Wf();function c(d,w,E={}){const{as:p="Array",checksumAddress:S=!1}=E,A=typeof w=="string"?n.fromHex(w):w,T=i.create(A);if(n.size(A)===0&&d.length>0)throw new h;if(n.size(A)&&n.size(A)<32)throw new y({data:typeof w=="string"?w:o.fromBytes(w),parameters:d,size:n.size(A)});let C=0;const R=p==="Array"?[]:{};for(let I=0;I<d.length;++I){const x=d[I];T.setPosition(C);const[F,H]=s.decodeParameter(T,x,{checksumAddress:S,staticPosition:0});C+=H,p==="Array"?R.push(F):R[x.name??I]=F}return R}function u(d,w,E){const{checksumAddress:p=!1}=E??{};if(d.length!==w.length)throw new g({expectedLength:d.length,givenLength:w.length});const S=s.prepareParameters({checksumAddress:p,parameters:d,values:w}),A=s.encode(S);return A.length===0?"0x":A}function l(d,w){if(d.length!==w.length)throw new g({expectedLength:d.length,givenLength:w.length});const E=[];for(let p=0;p<d.length;p++){const S=d[p],A=w[p];E.push(l.encode(S,A))}return o.concat(...E)}(function(d){function w(E,p,S=!1){if(E==="address"){const R=p;return r.assert(R),o.padLeft(R.toLowerCase(),S?32:0)}if(E==="string")return o.fromString(p);if(E==="bytes")return p;if(E==="bool")return o.padLeft(o.fromBoolean(p),S?32:1);const A=E.match(a.integerRegex);if(A){const[R,I,x="256"]=A,F=Number.parseInt(x,10)/8;return o.fromNumber(p,{size:S?32:F,signed:I==="int"})}const T=E.match(a.bytesRegex);if(T){const[R,I]=T;if(Number.parseInt(I,10)!==(p.length-2)/2)throw new v({expectedSize:Number.parseInt(I,10),value:p});return o.padRight(p,S?32:0)}const C=E.match(a.arrayRegex);if(C&&Array.isArray(p)){const[R,I]=C,x=[];for(let F=0;F<p.length;F++)x.push(w(I,p[F],!0));return x.length===0?"0x":o.concat(...x)}throw new P(E)}d.encode=w})(l||(Ae.encodePacked=l={}));function f(d){return e.formatAbiParameters(d)}function m(d){return Array.isArray(d)&&typeof d[0]=="string"||typeof d=="string"?e.parseAbiParameters(d):d}class y extends t.BaseError{constructor({data:w,parameters:E,size:p}){super(`Data size of ${p} bytes is too small for given parameters.`,{metaMessages:[`Params: (${e.formatAbiParameters(E)})`,`Data: ${w} (${p} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}Ae.DataSizeTooSmallError=y;class h extends t.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}Ae.ZeroDataError=h;class b extends t.BaseError{constructor({expectedLength:w,givenLength:E,type:p}){super(`Array length mismatch for type \`${p}\`. Expected: \`${w}\`. Given: \`${E}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}Ae.ArrayLengthMismatchError=b;class v extends t.BaseError{constructor({expectedSize:w,value:E}){super(`Size of bytes "${E}" (bytes${o.size(E)}) does not match expected size (bytes${w}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}Ae.BytesSizeMismatchError=v;class g extends t.BaseError{constructor({expectedLength:w,givenLength:E}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${w}`,`Given length (values): ${E}`].join(` 46`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}Ae.LengthMismatchError=g;class _ extends t.BaseError{constructor(w){super(`Value \`${w}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}Ae.InvalidArrayError=_;class P extends t.BaseError{constructor(w){super(`Type \`${w}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}return Ae.InvalidTypeError=P,Ae}var et={},yt={},vh;function T6(){if(vh)return yt;
46vh=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.toBytes=o,yt.toHex=s,yt.to=i,yt.decodeRlpCursor=a,yt.readLength=c,yt.readList=u,yt.from=l,yt.fromBytes=f,yt.fromHex=m;const e=Mt(),r=lt(),n=Ne(),t=s_();function o(g){return i(g,"Bytes")}function s(g){return i(g,"Hex")}function i(g,_){const P=_??(typeof g=="string"?"Hex":"Bytes"),d=(()=>{if(typeof g=="string"){if(g.length>3&&g.length%2!==0)throw new n.InvalidLengthError(g);return e.fromHex(g)}return g})(),w=t.create(d,{recursiveReadLimit:Number.POSITIVE_INFINITY});return a(w,P)}function a(g,_="Hex"){if(g.bytes.length===0)return _==="Hex"?n.fromBytes(g.bytes):g.bytes;const P=g.readByte();if(P<128&&g.decrementPosition(1),P<192){const w=c(g,P,128),E=g.readBytes(w);return _==="Hex"?n.fromBytes(E):E}const d=c(g,P,192);return u(g,d,_)}function c(g,_,P){if(P===128&&_<128)return 1;if(_<=P+55)return _-P;if(_===P+55+1)return g.readUint8();if(_===P+55+2)return g.readUint16();if(_===P+55+3)return g.readUint24();if(_===P+55+4)return g.readUint32();throw new r.BaseError("Invalid RLP prefix")}function u(g,_,P){const d=g.position,w=[];for(;g.position-d<_;)w.push(a(g,P));return w}function l(g,_){const{as:P}=_,d=y(g),w=t.create(new Uint8Array(d.length));return d.encode(w),P==="Hex"?n.fromBytes(w.bytes):w.bytes}function f(g,_={}){const{as:P="Bytes"}=_;return l(g,{as:P})}function m(g,_={}){const{as:P="Hex"}=_;return l(g,{as:P})}function y(g){return Array.isArray(g)?h(g.map(_=>y(_))):b(g)}function h(g){const _=g.reduce((w,E)=>w+E.length,0),P=v(_);return{length:_<=55?1+_:1+P+_,encode(w){_<=55?w.pushByte(192+_):(w.pushByte(247+P),P===1?w.pushUint8(_):P===2?w.pushUint16(_):P===3?w.pushUint24(_):w.pushUint32(_));for(const{encode:E}of g)E(w)}}}function b(g){const _=typeof g=="string"?e.fromHex(g):g,P=v(_.length);return{length:_.length===1&&_[0]<128?1:_.length<=55?1+_.length:1+P+_.length,encode(w){_.length===1&&_[0]<128?w.pushBytes(_):_.length<=55?(w.pushByte(128+_.length),w.pushBytes(_)):(w.pushByte(183+P),P===1?w.pushUint8(_.length):P===2?w.pushUint16(_.length):P===3?w.pushUint24(_.length):w.pushUint32(_.length),w.pushBytes(_))}}}function v(g){if(g<=255)return 1;if(g<=65535)return 2;if(g<=16777215)return 3;if(g<=4294967295)return 4;throw new r.BaseError("Length is too large.")}return yt}var be={},Eh;function c_(){if(Eh)return be;Eh=1,Object.defineProperty(be,"__esModule",{value:!0}),be.InvalidVError=be.InvalidYParityError=be.InvalidSError=be.InvalidRError=be.MissingPropertiesError=be.InvalidSerializedSizeError=void 0,be.assert=i,be.fromBytes=a,be.fromHex=c,be.extract=u,be.from=l,be.fromDerBytes=f,be.fromDerHex=m,be.fromLegacy=y,be.fromRpc=h,be.fromTuple=b,be.toBytes=v,be.toHex=g,be.toDerBytes=_,be.toDerHex=P,be.toLegacy=d,be.toRpc=w,be.toTuple=E,be.validate=p,be.vToYParity=S,be.yParityToV=A;const e=Xr(),r=Mt(),n=lt(),t=Ne(),o=Zu(),s=Wf();function i(H,j={}){const{recovered:k}=j;if(typeof H.r>"u")throw new C({signature:H});if(typeof H.s>"u")throw new C({signature:H});if(k&&typeof H.yParity>"u")throw new C({signature:H});if(H.r<0n||H.r>s.maxUint256)throw new R({value:H.r});if(H.s<0n||H.s>s.maxUint256)throw new I({value:H.s});if(typeof H.yParity=="number"&&H.yParity!==0&&H.yParity!==1)throw new x({value:H.yParity})}function a(H){return c(t.fromBytes(H))}function c(H){if(H.length!==130&&H.length!==132)throw new T({signature:H});const j=BigInt(t.slice(H,0,32)),k=BigInt(t.slice(H,32,64)),B=(()=>{const O=+`0x${H.slice(130)}`;if(!Number.isNaN(O))try{return S(O)}catch{throw new x({value:O})}})();return typeof B>"u"?{r:j,s:k}:{r:j,s:k,yParity:B}}function u(H){if(!(typeof H.r>"u")&&!(typeof H.s>"u"))return l(H)}function l(H){const j=typeof H=="string"?c(H):H instanceof Uint8Array?a(H):typeof H.r=="string"?h(H):H.v?y(H):{r:H.r,s:H.s,...typeof H.yParity<"u"?{yParity:H.yParity}:{}};return i(j),j}function f(H){return m(t.fromBytes(H))}function m(H){const{r:j,s:k}=e.secp256k1.Signature.fromDER(t.from(H).slice(2));return{r:j,s:k}}function y(H){return{r:H.r,s:H.s,yParity:S(H.v)}}function h(H){const j=(()=>{const k=H.v?Number(H.v):void 0;let B=H.yParity?Number(H.yParity):void 0;if(typeof k=="number"&&typeof B!="number"&&(B=S(k)),typeof B!="number")throw new x({value:H.yParity});return B})();return{r:BigInt(H.r),s:BigInt(H.s),yParity:j}}function b(H){const[j,k,B]=H;return l({r:k==="0x"?0n:BigInt(k),s:B==="0x"?0n:BigInt(B),yParity:j==="0x"?0:Number(j)})}function v(H){return r.fromHex(g(H))}function g(H){i(H);const j=H.r,k=H.s;return t.concat(t.fromNumber(j,{size:32}),t.fromNumber(k,{size:32}),typeof H.yParity=="number"?t.fromNumber(A(H.yParity),{size:1}):"0x")}function _(H){return new e.secp256k1.Signature(H.r,H.s).toDERRawBytes()}function P(H){return`0x${new e.secp256k1.Signature(H.r,H.s).toDERHex()}`}
46function d(H){return{r:H.r,s:H.s,v:A(H.yParity)}}function w(H){const{r:j,s:k,yParity:B}=H;return{r:t.fromNumber(j,{size:32}),s:t.fromNumber(k,{size:32}),yParity:B===0?"0x0":"0x1"}}function E(H){const{r:j,s:k,yParity:B}=H;return[B?"0x01":"0x",j===0n?"0x":t.trimLeft(t.fromNumber(j)),k===0n?"0x":t.trimLeft(t.fromNumber(k))]}function p(H,j={}){try{return i(H,j),!0}catch{return!1}}function S(H){if(H===0||H===27)return 0;if(H===1||H===28)return 1;if(H>=35)return H%2===0?1:0;throw new F({value:H})}function A(H){if(H===0)return 27;if(H===1)return 28;throw new x({value:H})}class T extends n.BaseError{constructor({signature:j}){super(`Value \`${j}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${t.size(t.from(j))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}be.InvalidSerializedSizeError=T;class C extends n.BaseError{constructor({signature:j}){super(`Signature \`${o.stringify(j)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}be.MissingPropertiesError=C;class R extends n.BaseError{constructor({value:j}){super(`Value \`${j}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}be.InvalidRError=R;class I extends n.BaseError{constructor({value:j}){super(`Value \`${j}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}be.InvalidSError=I;class x extends n.BaseError{constructor({value:j}){super(`Value \`${j}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}be.InvalidYParityError=x;class F extends n.BaseError{constructor({value:j}){super(`Value \`${j}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}return be.InvalidVError=F,be}var jh;function S6(){if(jh)return et;jh=1,Object.defineProperty(et,"__esModule",{value:!0}),et.from=o,et.fromRpc=s,et.fromRpcList=i,et.fromTuple=a,et.fromTupleList=c,et.getSignPayload=u,et.hash=l,et.toRpc=f,et.toRpcList=m,et.toTuple=y,et.toTupleList=h;const e=Vf(),r=Ne(),n=T6(),t=c_();function o(b,v={}){return typeof b.chainId=="string"?s(b):{...b,...v.signature}}function s(b){const{address:v,chainId:g,nonce:_}=b,P=t.extract(b);return{address:v,chainId:Number(g),nonce:BigInt(_),...P}}function i(b){return b.map(s)}function a(b){const[v,g,_,P,d,w]=b;let E={address:g,chainId:v==="0x"?0:Number(v),nonce:_==="0x"?0n:BigInt(_)};return P&&d&&w&&(E={...E,...t.fromTuple([P,d,w])}),o(E)}function c(b){const v=[];for(const g of b)v.push(a(g));return v}function u(b){return l(b,{presign:!0})}function l(b,v={}){const{presign:g}=v;return e.keccak256(r.concat("0x05",n.fromHex(y(g?{address:b.address,chainId:b.chainId,nonce:b.nonce}:b))))}function f(b){const{address:v,chainId:g,nonce:_,...P}=b;return{address:v,chainId:r.fromNumber(g),nonce:r.fromNumber(_),...t.toRpc(P)}}function m(b){return b.map(f)}function y(b){const{address:v,chainId:g,nonce:_}=b,P=t.extract(b);return[g?r.fromNumber(g):"0x",v,_?r.fromNumber(_):"0x",...P?t.toTuple(P):[]]}function h(b){if(!b||b.length===0)return[];const v=[];for(const g of b)v.push(y(g));return v}return et}var dt={},zr={},wh;function I6(){if(wh)return zr;wh=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.extraEntropy=void 0,zr.setExtraEntropy=e,zr.extraEntropy=!1;function e(r){zr.extraEntropy=r}return zr}var Ph;function R6(){if(Ph)return dt;
46Ph=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.noble=void 0,dt.createKeyPair=i,dt.getPublicKey=a,dt.getSharedSecret=c,dt.randomPrivateKey=u,dt.recoverAddress=l,dt.recoverPublicKey=f,dt.sign=m,dt.verify=y;const e=Xr(),r=id(),n=Mt(),t=Ne(),o=I6(),s=a_();dt.noble=e.secp256k1;function i(h={}){const{as:b="Hex"}=h,v=u({as:b}),g=a({privateKey:v});return{privateKey:v,publicKey:g}}function a(h){const{privateKey:b}=h,v=e.secp256k1.ProjectivePoint.fromPrivateKey(t.from(b).slice(2));return s.from(v)}function c(h){const{as:b="Hex",privateKey:v,publicKey:g}=h,d=e.secp256k1.ProjectivePoint.fromHex(s.toHex(g).slice(2)).multiply(e.secp256k1.utils.normPrivateKeyToScalar(t.from(v).slice(2))).toRawBytes(!0);return b==="Hex"?t.fromBytes(d):d}function u(h={}){const{as:b="Hex"}=h,v=e.secp256k1.utils.randomPrivateKey();return b==="Hex"?t.fromBytes(v):v}function l(h){return r.fromPublicKey(f(h))}function f(h){const{payload:b,signature:v}=h,{r:g,s:_,yParity:P}=v,w=new e.secp256k1.Signature(BigInt(g),BigInt(_)).addRecoveryBit(P).recoverPublicKey(t.from(b).substring(2));return s.from(w)}function m(h){const{extraEntropy:b=o.extraEntropy,hash:v,payload:g,privateKey:_}=h,{r:P,s:d,recovery:w}=e.secp256k1.sign(n.from(g),n.from(_),{extraEntropy:typeof b=="boolean"?b:t.from(b).slice(2),lowS:!0,...v?{prehash:!0}:{}});return{r:P,s:d,yParity:w}}function y(h){const{hash:b,payload:v}=h;return h.address?r.isEqual(h.address,l({payload:v,signature:h.signature})):e.secp256k1.verify(h.signature,n.from(v),s.toBytes(h.publicKey),...b?[{prehash:!0,lowS:!0}]:[])}return dt}var Ah;function B6(){return Ah||(Ah=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidWrappedSignatureError=e.suffixParameters=e.magicBytes=void 0,e.assert=a,e.from=c,e.unwrap=u,e.wrap=l,e.validate=f;const r=fi(),n=S6(),t=lt(),o=Ne(),s=R6(),i=c_();e.magicBytes="0x8010801080108010801080108010801080108010801080108010801080108010",e.suffixParameters=r.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function a(y){if(typeof y=="string"){if(o.slice(y,-32)!==e.magicBytes)throw new m(y)}else i.assert(y.authorization)}function c(y){return typeof y=="string"?u(y):y}function u(y){a(y);const h=o.toNumber(o.slice(y,-64,-32)),b=o.slice(y,-h-64,-64),v=o.slice(y,0,-h-64),[g,_,P]=r.decode(e.suffixParameters,b);return{authorization:n.from({address:g.delegation,chainId:Number(g.chainId),nonce:g.nonce,yParity:g.yParity,r:g.r,s:g.s}),signature:v,...P&&P!=="0x"?{data:P,to:_}:{}}}function l(y){const{data:h,signature:b}=y;a(y);const v=s.recoverAddress({payload:n.getSignPayload(y.authorization),signature:i.from(y.authorization)}),g=r.encode(e.suffixParameters,[{...y.authorization,delegation:y.authorization.address,chainId:BigInt(y.authorization.chainId)},y.to??v,h??"0x"]),_=o.fromNumber(o.size(g),{size:32});return o.concat(b,g,_,e.magicBytes)}function f(y){try{return a(y),!0}catch{return!1}}class m extends t.BaseError{constructor(h){super(`Value \`${h}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=m})(Qd)),Qd}var Th;function ad(){return Th||(Th=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.SignatureErc8010=void 0,Mo.SignatureErc8010=B6()),Mo}var Sh;function Kf(){if(Sh)return Ns;Sh=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.isErc8010Signature=r;const e=ad();function r(n){return e.SignatureErc8010.validate(n)}return Ns}var $s={},Ih;function u_(){if(Ih)return $s;Ih=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.parseErc6492Signature=n;const e=yr(),r=Gf();function n(t){if(!(0,r.isErc6492Signature)(t))return{signature:t};const[o,s,i]=(0,e.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:o,data:s,signature:i}}return $s}var zs={},Rh;function d_(){if(Rh)return zs;Rh=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.parseErc8010Signature=t;const e=ad(),r=oe(),n=Kf();function t(o){if(!(0,n.isErc8010Signature)(o))return{signature:o};const{authorization:s,to:i,...a}=e.SignatureErc8010.unwrap(o);return{authorization:{address:s.address,chainId:s.chainId,nonce:Number(s.nonce),r:(0,r.numberToHex)(s.r,{size:32}),s:(0,r.numberToHex)(s.s,{size:32}),yParity:s.yParity},...i?{address:i}:{},...a}}return zs}var Us={},Bh;function Zf(){if(Bh)return Us;Bh=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.recoverMessageAddress=n;const e=ui(),r=vr();async function n({message:t,signature:o}){return(0,r.recoverAddress)({hash:(0,e.hashMessage)(t),signature:o})}return Us}var Ls={},Oh;function Jf(){if(Oh)return Ls;Oh=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.recoverTypedDataAddress=n;const e=di(),r=vr();async function n(t){const{domain:o,message:s,primaryType:i,signature:a,types:c}=t;return(0,r.recoverAddress)({hash:(0,e.hashTypedData)({domain:o,message:s,primaryType:i,types:c}),signature:a})}return Ls}var Ds={},Ch;function f_(){if(Ch)return Ds;Ch=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.serializeErc6492Signature=o;const e=Df(),r=Tt(),n=qe(),t=Ee();function o(s){const{address:i,data:a,signature:c,to:u="hex"}=s,l=(0,n.concatHex)([(0,r.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[i,a,c]),e.erc6492MagicBytes]);return u==="hex"?l:(0,t.hexToBytes)(l)}return Ds}var Gs={},xh;function l_(){if(xh)return Gs;xh=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.serializeErc8010Signature=n;const e=ad(),r=Ee();function n(t){const{address:o,data:s,signature:i,to:a="hex"}=t,c=e.SignatureErc8010.wrap({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:s,signature:i,to:o});return a==="hex"?c:(0,r.hexToBytes)(c)}return Gs}var Vs={},qh;function b_(){if(qh)return Vs;qh=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.verifyHash=t;const e=Je(),r=gt(),n=vr();async function t({address:o,hash:s,signature:i}){return(0,r.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverAddress)({hash:s,signature:i}))}return Vs}var Ws={},Mh;function m_(){if(Mh)return Ws;Mh=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.verifyMessage=t;const e=Je(),r=gt(),n=Zf();async function t({address:o,message:s,signature:i}){return(0,r.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverMessageAddress)({message:s,signature:i}))}return Ws}var Ks={},kh;function h_(){if(kh)return Ks;kh=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.verifyTypedData=t;const e=Je(),r=gt(),n=Jf();async function t(o){const{address:s,domain:i,message:a,primaryType:c,signature:u,types:l}=o;return(0,r.isAddressEqual)((0,e.getAddress)(s),await(0,n.recoverTypedDataAddress)({domain:i,message:a,primaryType:c,signature:u,types:l}))}return Ks}var Zs={},Hh;
46function Yf(){if(Hh)return Zs;Hh=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.getSerializedTransactionType=t;const e=nt(),r=ft(),n=Be();function t(o){const s=(0,r.sliceHex)(o,0,1);if(s==="0x04")return"eip7702";if(s==="0x03")return"eip4844";if(s==="0x02")return"eip1559";if(s==="0x01")return"eip2930";if(s!=="0x"&&(0,n.hexToNumber)(s)>=192)return"legacy";throw new e.InvalidSerializedTransactionTypeError({serializedType:s})}return Zs}var vn={},Fh;function Xf(){if(Fh)return vn;Fh=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.parseTransaction=m,vn.toTransactionArray=_,vn.parseAccessList=P;const e=At(),r=nt(),n=rt(),t=Wu(),o=Ze(),s=mr(),i=er(),a=Be(),c=Nf(),u=$f(),l=rd(),f=Yf();function m(E){const p=(0,f.getSerializedTransactionType)(E);return p==="eip1559"?b(E):p==="eip2930"?v(E):p==="eip4844"?h(E):p==="eip7702"?y(E):g(E)}function y(E){const p=_(E),[S,A,T,C,R,I,x,F,H,j,k,B,O]=p;if(p.length!==10&&p.length!==13)throw new r.InvalidSerializedTransactionError({attributes:{chainId:S,nonce:A,maxPriorityFeePerGas:T,maxFeePerGas:C,gas:R,to:I,value:x,data:F,accessList:H,authorizationList:j,...p.length>9?{v:k,r:B,s:O}:{}},serializedTransaction:E,type:"eip7702"});const q={chainId:(0,a.hexToNumber)(S),type:"eip7702"};return(0,o.isHex)(I)&&I!=="0x"&&(q.to=I),(0,o.isHex)(R)&&R!=="0x"&&(q.gas=(0,a.hexToBigInt)(R)),(0,o.isHex)(F)&&F!=="0x"&&(q.data=F),(0,o.isHex)(A)&&(q.nonce=A==="0x"?0:(0,a.hexToNumber)(A)),(0,o.isHex)(x)&&x!=="0x"&&(q.value=(0,a.hexToBigInt)(x)),(0,o.isHex)(C)&&C!=="0x"&&(q.maxFeePerGas=(0,a.hexToBigInt)(C)),(0,o.isHex)(T)&&T!=="0x"&&(q.maxPriorityFeePerGas=(0,a.hexToBigInt)(T)),H.length!==0&&H!=="0x"&&(q.accessList=P(H)),j.length!==0&&j!=="0x"&&(q.authorizationList=d(j)),(0,l.assertTransactionEIP7702)(q),{...p.length===13?w(p):void 0,...q}}function h(E){const p=_(E),S=p.length===4,A=S?p[0]:p,T=S?p.slice(1):[],[C,R,I,x,F,H,j,k,B,O,q,M,N,z]=A,[$,U,G]=T;if(!(A.length===11||A.length===14))throw new r.InvalidSerializedTransactionError({attributes:{chainId:C,nonce:R,maxPriorityFeePerGas:I,maxFeePerGas:x,gas:F,to:H,value:j,data:k,accessList:B,...A.length>9?{v:M,r:N,s:z}:{}},serializedTransaction:E,type:"eip4844"});const J={blobVersionedHashes:q,chainId:(0,a.hexToNumber)(C),to:H,type:"eip4844"};return(0,o.isHex)(F)&&F!=="0x"&&(J.gas=(0,a.hexToBigInt)(F)),(0,o.isHex)(k)&&k!=="0x"&&(J.data=k),(0,o.isHex)(R)&&(J.nonce=R==="0x"?0:(0,a.hexToNumber)(R)),(0,o.isHex)(j)&&j!=="0x"&&(J.value=(0,a.hexToBigInt)(j)),(0,o.isHex)(O)&&O!=="0x"&&(J.maxFeePerBlobGas=(0,a.hexToBigInt)(O)),(0,o.isHex)(x)&&x!=="0x"&&(J.maxFeePerGas=(0,a.hexToBigInt)(x)),(0,o.isHex)(I)&&I!=="0x"&&(J.maxPriorityFeePerGas=(0,a.hexToBigInt)(I)),B.length!==0&&B!=="0x"&&(J.accessList=P(B)),$&&U&&G&&(J.sidecars=(0,t.toBlobSidecars)({blobs:$,commitments:U,proofs:G})),(0,l.assertTransactionEIP4844)(J),{...A.length===14?w(A):void 0,...J}}function b(E){const p=_(E),[S,A,T,C,R,I,x,F,H,j,k,B]=p;if(!(p.length===9||p.length===12))throw new r.InvalidSerializedTransactionError({attributes:{chainId:S,nonce:A,maxPriorityFeePerGas:T,maxFeePerGas:C,gas:R,to:I,value:x,data:F,accessList:H,...p.length>9?{v:j,r:k,s:B}:{}},serializedTransaction:E,type:"eip1559"});const O={chainId:(0,a.hexToNumber)(S),type:"eip1559"};return(0,o.isHex)(I)&&I!=="0x"&&(O.to=I),(0,o.isHex)(R)&&R!=="0x"&&(O.gas=(0,a.hexToBigInt)(R)),(0,o.isHex)(F)&&F!=="0x"&&(O.data=F),(0,o.isHex)(A)&&(O.nonce=A==="0x"?0:(0,a.hexToNumber)(A)),(0,o.isHex)(x)&&x!=="0x"&&(O.value=(0,a.hexToBigInt)(x)),(0,o.isHex)(C)&&C!=="0x"&&(O.maxFeePerGas=(0,a.hexToBigInt)(C)),(0,o.isHex)(T)&&T!=="0x"&&(O.maxPriorityFeePerGas=(0,a.hexToBigInt)(T)),H.length!==0&&H!=="0x"&&(O.accessList=P(H)),(0,l.assertTransactionEIP1559)(O),{...p.length===12?w(p):void 0,...O}}function v(E){const p=_(E),[S,A,T,C,R,I,x,F,H,j,k]=p;if(!(p.length===8||p.length===11))throw new r.InvalidSerializedTransactionError({attributes:{chainId:S,nonce:A,gasPrice:T,gas:C,to:R,value:I,data:x,accessList:F,...p.length>8?{v:H,r:j,s:k}:{}},serializedTransaction:E,type:"eip2930"});const B={chainId:(0,a.hexToNumber)(S),type:"eip2930"};return(0,o.isHex)(R)&&R!=="0x"&&(B.to=R),(0,o.isHex)(C)&&C!=="0x"&&(B.gas=(0,a.hexToBigInt)(C)),(0,o.isHex)(x)&&x!=="0x"&&(B.data=x),(0,o.isHex)(A)&&(B.nonce=A==="0x"?0:(0,a.hexToNumber)(A)),(0,o.isHex)(I)&&I!=="0x"&&(B.value=(0,a.hexToBigInt)(I)),(0,o.isHex)(T)&&T!=="0x"&&(B.gasPrice=(0,a.hexToBigInt)(T)),F.length!==0&&F!=="0x"&&(B.accessList=P(F)),(0,l.assertTransactionEIP2930)(B),{...p.length===11?w(p):void 0,...B}}function g(E){const p=(0,c.fromRlp)(E,"hex"),[S,A,T,C,R,I,x,F,H]=p;if(!(p.length===6||p.length===9))throw new r.InvalidSerializedTransactionError({attributes:{nonce:S,gasPrice:A,gas:T,to:C,value:R,data:I,...p.length>6?{v:x,r:F,s:H}:{}},serializedTransaction:E,type:"legacy"});const j={type:"legacy"};
46if((0,o.isHex)(C)&&C!=="0x"&&(j.to=C),(0,o.isHex)(T)&&T!=="0x"&&(j.gas=(0,a.hexToBigInt)(T)),(0,o.isHex)(I)&&I!=="0x"&&(j.data=I),(0,o.isHex)(S)&&(j.nonce=S==="0x"?0:(0,a.hexToNumber)(S)),(0,o.isHex)(R)&&R!=="0x"&&(j.value=(0,a.hexToBigInt)(R)),(0,o.isHex)(A)&&A!=="0x"&&(j.gasPrice=(0,a.hexToBigInt)(A)),(0,l.assertTransactionLegacy)(j),p.length===6)return j;const k=(0,o.isHex)(x)&&x!=="0x"?(0,a.hexToBigInt)(x):0n;if(H==="0x"&&F==="0x")return k>0&&(j.chainId=Number(k)),j;const B=k,O=Number((B-35n)/2n);if(O>0)j.chainId=O;else if(B!==27n&&B!==28n)throw new r.InvalidLegacyVError({v:B});return j.v=B,j.s=H,j.r=F,j.yParity=B%2n===0n?1:0,j}function _(E){return(0,c.fromRlp)(`0x${E.slice(4)}`,"hex")}function P(E){const p=[];for(let S=0;S<E.length;S++){const[A,T]=E[S];if(!(0,n.isAddress)(A,{strict:!1}))throw new e.InvalidAddressError({address:A});p.push({address:A,storageKeys:T.map(C=>(0,u.isHash)(C)?C:(0,i.trim)(C))})}return p}function d(E){const p=[];for(let S=0;S<E.length;S++){const[A,T,C,R,I,x]=E[S];p.push({address:T,chainId:A==="0x"?0:(0,a.hexToNumber)(A),nonce:C==="0x"?0:(0,a.hexToNumber)(C),...w([R,I,x])})}return p}function w(E){const p=E.slice(-3),S=p[0]==="0x"||(0,a.hexToBigInt)(p[0])===0n?27n:28n;return{r:(0,s.padHex)(p[1],{size:32}),s:(0,s.padHex)(p[2],{size:32}),v:S,yParity:S===27n?0:1}}return vn}var Js={},Ys={},Ho={},Nh;function y_(){if(Nh)return Ho;Nh=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.InvalidDecimalNumberError=void 0;const e=de();class r extends e.BaseError{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}return Ho.InvalidDecimalNumberError=r,Ho}var $h;
46function sd(){if($h)return Ys;$h=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.parseUnits=r;const e=y_();function r(n,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(n))throw new e.InvalidDecimalNumberError({value:n});let[o,s="0"]=n.split(".");const i=o.startsWith("-");if(i&&(o=o.slice(1)),s=s.replace(/(0+)$/,""),t===0)Math.round(+`.${s}`)===1&&(o=`${BigInt(o)+1n}`),s="";else if(s.length>t){const[a,c,u]=[s.slice(0,t-1),s.slice(t-1,t),s.slice(t)],l=Math.round(+`${c}.${u}`);l>9?s=`${BigInt(a)+BigInt(1)}0`.padStart(a.length+1,"0"):s=`${a}${l}`,s.length>t&&(s=s.slice(1),o=`${BigInt(o)+1n}`),s=s.slice(0,t)}else s=s.padEnd(t,"0");return BigInt(`${i?"-":""}${o}${s}`)}return Ys}var zh;function p_(){if(zh)return Js;zh=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.parseEther=n;const e=Go(),r=sd();function n(t,o="wei"){return(0,r.parseUnits)(t,e.etherUnits[o])}return Js}var Xs={},Uh;function g_(){if(Uh)return Xs;Uh=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.parseGwei=n;const e=Go(),r=sd();function n(t,o="wei"){return(0,r.parseUnits)(t,e.gweiUnits[o])}return Xs}var Lh;function __(){return Lh||(Lh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.ccipReadTunnel=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=e.buildRequest=e.verifyAuthorization=e.serializeAuthorizationList=e.recoverAuthorizationAddress=e.hashAuthorization=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.parseEventLogs=e.getAbiItem=e.formatAbiItemWithArgs=e.formatAbiParams=e.formatAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeAbiParameters=e.publicKeyToAddress=e.parseAccount=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=void 0,e.keccak256=e.isHash=e.getAction=e.formatTransactionRequest=e.defineTransactionRequest=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.defineFormatter=e.extract=e.formatBlock=e.defineBlock=e.getTransactionError=e.getNodeError=e.containsNodeError=e.getEstimateGasError=e.getContractError=e.getCallError=e.toRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=void 0,e.serializeTypedData=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.serializeErc8010Signature=e.serializeErc6492Signature=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseErc8010Signature=e.parseErc6492Signature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashMessage=e.getWebSocketRpcClient=e.socketClientCache=e.getSocketRpcClient=e.getHttpRpcClient=e.rpc=e.getSocket=e.integerRegex=e.bytesRegex=e.arrayRegex=e.nonceManager=e.createNonceManager=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=e.ripemd160=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=e.validateTypedData=void 0;var r=br();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}});var n=Ie();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return n.parseAccount}});var t=ug();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return t.publicKeyToAddress}});var o=yr();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return o.decodeAbiParameters}});var s=Do();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return s.decodeErrorResult}});var i=ei();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return i.decodeEventLog}});var a=Pf();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return a.decodeFunctionData}});var c=Rt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return c.decodeFunctionResult}});var u=Tt();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return u.encodeAbiParameters}});var l=oi();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return l.encodeDeployData}});var f=Af();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return f.encodeErrorResult}});var m=Zr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return m.encodeEventTopics}});var y=Le();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return y.encodeFunctionData}});var h=Tf();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return h.encodeFunctionResult}});var b=Ng();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return b.encodePacked}});var v=Qt();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return v.formatAbiItem}}),Object.defineProperty(e,"formatAbiParams",{enumerable:!0,get:function(){return v.formatAbiParams}});var g=cg();Object.defineProperty(e,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return g.formatAbiItemWithArgs}});var _=tr();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return _.getAbiItem}});var P=ti();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return P.parseEventLogs}});var d=Je();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return d.getAddress}});var w=$g();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return w.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return w.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return w.getCreateAddress}});var E=rt();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return E.isAddress}});var p=gt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return p.isAddressEqual}});var S=mg();Object.defineProperty(e,"hashAuthorization",{enumerable:!0,get:function(){return S.hashAuthorization}});var A=Ko();Object.defineProperty(e,"recoverAuthorizationAddress",{enumerable:!0,get:function(){return A.recoverAuthorizationAddress}});var T=zg();Object.defineProperty(e,"serializeAuthorizationList",{enumerable:!0,get:function(){return T.
46serializeAuthorizationList}});var C=Ug();Object.defineProperty(e,"verifyAuthorization",{enumerable:!0,get:function(){return C.verifyAuthorization}});var R=Lg();Object.defineProperty(e,"buildRequest",{enumerable:!0,get:function(){return R.buildRequest}});var I=Ju();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return I.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return I.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return I.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return I.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return I.offchainLookupSignature}});var x=Dg();Object.defineProperty(e,"ccipReadTunnel",{enumerable:!0,get:function(){return x.ccipReadTunnel}});var F=si();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return F.assertCurrentChain}});var H=Gg();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return H.defineChain}});var j=Vg();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return j.extractChain}});var k=wr();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return k.getChainContractAddress}});var B=qe();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return B.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return B.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return B.concatHex}});var O=Hf();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return O.isBytes}});var q=Ze();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return q.isHex}});var M=mr();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return M.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return M.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return M.padHex}});var N=Ue();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return N.size}});var z=ft();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return z.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return z.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return z.sliceHex}});var $=er();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return $.trim}});var U=sf();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return U.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return U.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return U.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return U.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return U.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return U.fromBytes}});var G=Be();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return G.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return G.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return G.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return G.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return G.hexToString}});var J=Nf();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return J.fromRlp}});var W=Ee();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return W.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return W.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return W.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return W.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return W.toBytes}});var V=oe();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return V.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return V.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return V.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return V.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return V.toHex}});var Y=Wo();Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return Y.toRlp}});var te=Ef();Object.defineProperty(e,"getCallError",{enumerable:!0,get:function(){return te.getCallError}});var Z=_r();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return Z.getContractError}});var X=yg();Object.defineProperty(e,"getEstimateGasError",{enumerable:!0,get:function(){return X.getEstimateGasError}});var Q=Zo();Object.defineProperty(e,"containsNodeError",{enumerable:!0,get:function(){return Q.containsNodeError}}),Object.defineProperty(e,"getNodeError",{enumerable:!0,get:function(){return Q.getNodeError}});var ne=Xo();Object.defineProperty(e,"getTransactionError",{enumerable:!0,get:function(){return ne.getTransactionError}});var re=Lu();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return re.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return re.formatBlock}});var ae=Er();Object.defineProperty(e,"extract",{enumerable:!0,get:function(){return ae.extract}});var ce=Jo();Object.defineProperty(e,"defineFormatter",{enumerable:!0,get:function(){return ce.defineFormatter}});var he=qt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return he.formatLog}});var ee=Rn();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return ee.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return ee.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return ee.transactionType}});var K=ci();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return K.defineTransactionReceipt}});var pe=St();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return pe.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return pe.formatTransactionRequest}});var Ce=me();Object.defineProperty(e,"getAction",{enumerable:!0,get:function(){return Ce.getAction}});var xe=$f();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return xe.isHash}});var bt=tt();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return bt.keccak256}});var Ye=Kg();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return Ye.ripemd160}});var mt=mf();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return mt.sha256}});var Bt=Zg();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return Bt.toEventHash}});var ot=In();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return ot.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return ot.toEventSelector}});var De=Jg();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return De.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return De.toEventSignature}});var ht=Yg();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return ht.toFunctionHash}});var it=Kr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return it.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return it.toFunctionSelector}});var Xe=Xg();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return Xe.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return Xe.toFunctionSignature}});var _t=Qg();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return _t.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return _t.nonceManager}});var Me=Fu();Object.defineProperty(e,"arrayRegex",{enumerable:!0,get:function(){return Me.arrayRegex}}),Object.defineProperty(e,"bytesRegex",{enumerable:!0,get:function(){return Me.bytesRegex}}),Object.defineProperty(e,"integerRegex",{enumerable:!0,get:function(){return Me.integerRegex}});var ke=r_();Object.defineProperty(e,"getSocket",{enumerable:!0,get:function(){return ke.getSocket}}),Object.defineProperty(e,"rpc",{enumerable:!0,get:function(){return ke.rpc}});var nr=Uf();Object.defineProperty(e,"getHttpRpcClient",{enumerable:!0,get:function(){return nr.getHttpRpcClient}});var xn=t_();Object.defineProperty(e,"getSocketRpcClient",{enumerable:!0,get:function(){return xn.getSocketRpcClient}}),Object.defineProperty(e,"socketClientCache",{enumerable:!0,get:function(){return xn.socketClientCache}});
46var or=Lf();Object.defineProperty(e,"getWebSocketRpcClient",{enumerable:!0,get:function(){return or.getWebSocketRpcClient}});var qn=ui();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return qn.hashMessage}});var Ar=di();Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return Ar.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return Ar.hashTypedData}});var $e=Gf();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return $e.isErc6492Signature}});var Tr=Kf();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return Tr.isErc8010Signature}});var ud=u_();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return ud.parseErc6492Signature}});var Mn=d_();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return Mn.parseErc8010Signature}});var dd=vr();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return dd.recoverAddress}});var kn=Zf();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return kn.recoverMessageAddress}});var fd=uf();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return fd.recoverPublicKey}});var Sr=Jf();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return Sr.recoverTypedDataAddress}});var Ir=f_();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return Ir.serializeErc6492Signature}});var ld=l_();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return ld.serializeErc8010Signature}});var Rr=b_();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return Rr.verifyHash}});var Br=m_();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return Br.verifyMessage}});var Hn=h_();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return Hn.verifyTypedData}});var bd=Fe();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return bd.stringify}});var md=It();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return md.assertRequest}});var Fn=rd();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Fn.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Fn.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return Fn.assertTransactionLegacy}});var hd=Yf();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return hd.getSerializedTransactionType}});var bi=Ku();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return bi.getTransactionType}});var yd=Xf();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return yd.parseTransaction}});var Nn=Ff();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return Nn.seri
46alizeAccessList}});var mi=nd();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return mi.serializeTransaction}});var tn=od();Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return tn.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return tn.validateTypedData}});var pd=Vo();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return pd.formatEther}});var gd=Jr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return gd.formatGwei}});var _d=zu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return _d.formatUnits}});var vd=p_();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return vd.parseEther}});var Ed=g_();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return Ed.parseGwei}});var hi=sd();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return hi.parseUnits}})})(Vd)),Vd}var Dh;function O6(){if(Dh)return ws;Dh=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.formatProof=n;const e=__();function r(t){return t.map(o=>({...o,value:BigInt(o.value)}))}function n(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?(0,e.hexToNumber)(t.nonce):void 0,storageProof:t.storageProof?r(t.storageProof):void 0}}return ws}var Gh;function C6(){if(Gh)return js;Gh=1,Object.defineProperty(js,"__esModule",{value:!0}),js.getProof=n;const e=Bn(),r=O6();async function n(t,{address:o,blockHash:s,blockNumber:i,blockTag:a="latest",requireCanonical:c,storageKeys:u}){const l=(0,e.formatBlockParameter)({blockHash:s,blockNumber:i,blockTag:a,requireCanonical:c}),f=await t.request({method:"eth_getProof",params:[o,u,l]});return(0,r.formatProof)(f)}return js}var Qs={},Vh;function x6(){if(Vh)return Qs;Vh=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.getStorageAt=r;const e=Bn();async function r(n,{address:t,blockHash:o,blockNumber:s,blockTag:i="latest",requireCanonical:a,slot:c}){const u=(0,e.formatBlockParameter)({blockHash:o,blockNumber:s,blockTag:i,requireCanonical:a});return await n.request({method:"eth_getStorageAt",params:[t,c,u]})}return Qs}var ec={},Wh;function Qf(){if(Wh)return ec;Wh=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.getTransaction=t;const e=nt(),r=oe(),n=Rn();async function t(o,{blockHash:s,blockNumber:i,blockTag:a,hash:c,index:u,sender:l,nonce:f}){var v,g,_;const m=a||"latest",y=i!==void 0?(0,r.numberToHex)(i):void 0;let h=null;if(c?h=await o.request({method:"eth_getTransactionByHash",params:[c]},{dedupe:!0}):s?h=await o.request({method:"eth_getTransactionByBlockHashAndIndex",params:[s,(0,r.numberToHex)(u)]},{dedupe:!0}):typeof u=="number"?h=await o.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[y||m,(0,r.numberToHex)(u)]},{dedupe:!!y}):l&&typeof f=="number"&&(h=await o.request({method:"eth_getTransactionBySenderAndNonce",params:[l,(0,r.numberToHex)(f)]},{dedupe:!0})),!h)throw new e.TransactionNotFoundError({blockHash:s,blockNumber:i,blockTag:m,hash:c,index:u});return(((_=(g=(v=o.chain)==null?void 0:v.formatters)==null?void 0:g.transaction)==null?void 0:_.format)||n.formatTransaction)(h,"getTransaction")}return ec}var tc={},Kh;function q6(){if(Kh)return tc;Kh=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.getTransactionConfirmations=t;const e=me(),r=ai(),n=Qf();async function t(o,{hash:s,transactionReceipt:i}){const[a,c]=await Promise.all([(0,e.getAction)(o,r.getBlockNumber,"getBlockNumber")({}),s?(0,e.getAction)(o,n.getTransaction,"getTransaction")({hash:s}):void 0]),u=(i==null?void 0:i.blockNumber)||(c==null?void 0:c.blockNumber);return u?a-u+1n:0n}return tc}var rc={},Zh;function v_(){if(Zh)return rc;Zh=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.getTransactionReceipt=n;const e=nt(),r=ci();async function n(t,{hash:o}){var a,c,u;const s=await t.request({method:"eth_getTransactionReceipt",params:[o]},{dedupe:!0});if(!s)throw new e.TransactionReceiptNotFoundError({hash:o});return(((u=(c=(a=t.chain)==null?void 0:a.formatters)==null?void 0:c.transactionReceipt)==null?void 0:u.format)||r.formatTransactionReceipt)(s,"getTransactionReceipt")}return rc}var nc={},Jh;function M6(){if(Jh)return nc;Jh=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.multicall=f;const e=kt(),r=ri(),n=Se(),t=de(),o=pr(),s=Rt(),i=Le(),a=wr(),c=_r(),u=me(),l=Ht();async function f(m,y){var H;const{account:h,authorizationList:b,allowFailure:v=!0,blockHash:g,blockNumber:_,blockOverrides:P,blockTag:d,requireCanonical:w,stateOverride:E}=y,p=y.contracts,{batchSize:S=y.batchSize??1024,deployless:A=y.deployless??!1}=typeof((H=m.batch)==null?void 0:H.multicall)=="object"?m.batch.multicall:{},T=(()=>
46{if(y.multicallAddress)return y.multicallAddress;if(A)return null;if(m.chain)return(0,a.getChainContractAddress)({blockNumber:_,chain:m.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),C=[[]];let R=0,I=0;for(let j=0;j<p.length;j++){const{abi:k,address:B,args:O,functionName:q}=p[j];try{const M=(0,i.encodeFunctionData)({abi:k,args:O,functionName:q});I+=(M.length-2)/2,S>0&&I>S&&C[R].length>0&&(R++,I=(M.length-2)/2,C[R]=[]),C[R]=[...C[R],{allowFailure:!0,callData:M,target:B}]}catch(M){const N=(0,c.getContractError)(M,{abi:k,address:B,args:O,docsPath:"/docs/contract/multicall",functionName:q,sender:h});if(!v)throw N;C[R]=[...C[R],{allowFailure:!0,callData:"0x",target:B}]}}const x=await Promise.allSettled(C.map(j=>(0,u.getAction)(m,l.readContract,"readContract")({...T===null?{code:r.multicall3Bytecode}:{address:T},abi:e.multicall3Abi,account:h,args:[j],authorizationList:b,blockHash:g,blockNumber:_,blockOverrides:P,blockTag:d,functionName:"aggregate3",requireCanonical:w,stateOverride:E}))),F=[];for(let j=0;j<x.length;j++){const k=x[j];if(k.status==="rejected"){if(!v)throw k.reason;for(let O=0;O<C[j].length;O++)F.push({status:"failure",error:k.reason,result:void 0});continue}const B=k.value;for(let O=0;O<B.length;O++){const{returnData:q,success:M}=B[O],{callData:N}=C[j][O],{abi:z,address:$,functionName:U,args:G}=p[F.length];try{if(N==="0x")throw new n.AbiDecodingZeroDataError;if(!M)throw new o.RawContractError({data:q});const J=(0,s.decodeFunctionResult)({abi:z,args:G,data:q,functionName:U});F.push(v?{result:J,status:"success"}:J)}catch(J){const W=(0,c.getContractError)(J,{abi:z,address:$,args:G,docsPath:"/docs/contract/multicall",functionName:U});if(!v)throw W;F.push({error:W,result:void 0,status:"failure"})}}}if(F.length!==p.length)throw new t.BaseError("multicall results mismatch");return F}return nc}var oc={},Yh;function E_(){if(Yh)return oc;Yh=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.simulateBlocks=v;const e=Tg(),r=Ie(),n=Se(),t=pr(),o=rr(),s=Rt(),i=Le(),a=qe(),c=oe(),u=_r(),l=Zo(),f=Lu(),m=qt(),y=St(),h=df(),b=It();async function v(g,_){const{blockNumber:P,blockTag:d=g.experimental_blockTag??"latest",blocks:w,returnFullTransactions:E,traceTransfers:p,validation:S}=_;try{const A=[];for(const I of w){const x=I.blockOverrides?e.toRpc(I.blockOverrides):void 0,F=I.calls.map(j=>{const k=j,B=k.account?(0,r.parseAccount)(k.account):void 0,O=k.abi?(0,i.encodeFunctionData)(k):k.data,q={...k,account:B,data:k.dataSuffix?(0,a.concat)([O||"0x",k.dataSuffix]):O,from:k.from??(B==null?void 0:B.address)};return(0,b.assertRequest)(q),(0,y.formatTransactionRequest)(q)}),H=I.stateOverrides?(0,h.serializeStateOverride)(I.stateOverrides):void 0;A.push({blockOverrides:x,calls:F,stateOverrides:H})}const C=(typeof P=="bigint"?(0,c.numberToHex)(P):void 0)||d;return(await g.request({method:"eth_simulateV1",params:[{blockStateCalls:A,returnFullTransactions:E,traceTransfers:p,validation:S},C]})).map((I,x)=>({...(0,f.formatBlock)(I),calls:I.calls.map((F,H)=>{var G,J;const{abi:j,args:k,functionName:B,to:O}=w[x].calls[H],q=((G=F.error)==null?void 0:G.data)??F.returnData,M=BigInt(F.gasUsed),N=(J=F.logs)==null?void 0:J.map(W=>(0,m.formatLog)(W)),z=F.status==="0x1"?"success":"failure",$=j&&z==="success"&&q!=="0x"?(0,s.decodeFunctionResult)({abi:j,data:q,functionName:B}):null,U=(()=>{if(z==="success")return;let W;if(q==="0x"?W=new n.AbiDecodingZeroDataError:q&&(W=new t.RawContractError({data:q})),!!W)return(0,u.getContractError)(W,{abi:j??[],address:O??"0x",args:k,functionName:B??"<unknown>"})})();return{data:q,gasUsed:M,logs:N,status:z,...z==="success"?{result:$}:{error:U}}})}))}catch(A){const T=A,C=(0,l.getNodeError)(T,{});throw C instanceof o.UnknownNodeError?T:C}}return oc}var ic={},lr={},Ke={},En={},Xh;function k6(){if(Xh)return En;Xh=1,Object.defineProperty(En,"__esModule",{value:!0}),En.normalizeSignature=n,En.isArgOfType=t,En.getAmbiguousTypes=o;const e=id(),r=lt();function n(s){let i=!0,a="",c=0,u="",l=!1;for(let f=0;f<s.length;f++){const m=s[f];if(["(",")",","].includes(m)&&(i=!0),m==="("&&c++,m===")"&&c--,!!i){if(c===0){if(m===" "&&["event","function","error",""].includes(u))u="";else if(u+=m,m===")"){l=!0;break}continue}if(m===" "){s[f-1]!==","&&a!==","&&a!==",("&&(a="",i=!1);continue}u+=m,a+=m}}if(!l)throw new r.BaseError("Unable to normalize signature.");return u}function t(s,i){const a=typeof s,c=i.type;switch(c){case"address":return e.validate(s,{strict:!1});case"bool":return a==="boolean";case"function":return a==="string";case"string":return a==="string";default:return c==="tuple"&&"components"in i?Object.values(i.components).every((u,l)=>t(Object.values(s)[l],u)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(c)?a==="number"||a==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(c)?a==="string"||s instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(c)?Array.isArray(s)&&s.every(u=>t(u,{...i,type:c.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function o(s,i,a){for(const c in s){const u=s[c],l=i[c];if(u.type==="tuple"&&l.type==="tuple"&&"components"in u&&"components"in l)return o(u.components,l.components,a[c]);const f=[u.type,l.type];if(f.includes("address")&&f.includes("bytes20")?!0:f.includes("address")&&f.includes("string")?e.validate(a[c],{strict:!1}):f.includes("address")&&f.includes("bytes")?e.validate(a[c],{strict:!1}):!1)return f}}return En}var Qh;function j_(){if(Qh)return Ke;
46Qh=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.InvalidSelectorSizeError=Ke.NotFoundError=Ke.AmbiguityError=void 0,Ke.format=s,Ke.from=i,Ke.fromAbi=a,Ke.getSelector=c,Ke.getSignature=u,Ke.getSignatureHash=l;const e=br(),r=lt(),n=Vf(),t=Ne(),o=k6();function s(h){return e.formatAbiItem(h)}function i(h,b={}){const{prepare:v=!0}=b,g=Array.isArray(h)||typeof h=="string"?e.parseAbiItem(h):h;return{...g,...v?{hash:l(g)}:{}}}function a(h,b,v){const{args:g=[],prepare:_=!0}=v??{},P=t.validate(b,{strict:!1}),d=h.filter(p=>P?p.type==="function"||p.type==="error"?c(p)===t.slice(b,0,4):p.type==="event"?l(p)===b:!1:"name"in p&&p.name===b);if(d.length===0)throw new m({name:b});if(d.length===1)return{...d[0],..._?{hash:l(d[0])}:{}};let w;for(const p of d){if(!("inputs"in p))continue;if(!g||g.length===0){if(!p.inputs||p.inputs.length===0)return{...p,..._?{hash:l(p)}:{}};continue}if(!p.inputs||p.inputs.length===0||p.inputs.length!==g.length)continue;if(g.every((A,T)=>{const C="inputs"in p&&p.inputs[T];return C?o.isArgOfType(A,C):!1})){if(w&&"inputs"in w&&w.inputs){const A=o.getAmbiguousTypes(p.inputs,w.inputs,g);if(A)throw new f({abiItem:p,type:A[0]},{abiItem:w,type:A[1]})}w=p}}const E=(()=>{if(w)return w;const[p,...S]=d;return{...p,overloads:S}})();if(!E)throw new m({name:b});return{...E,..._?{hash:l(E)}:{}}}function c(...h){const b=(()=>{if(Array.isArray(h[0])){const[v,g]=h;return a(v,g)}return h[0]})();return t.slice(l(b),0,4)}function u(...h){const b=(()=>{if(Array.isArray(h[0])){const[g,_]=h;return a(g,_)}return h[0]})(),v=typeof b=="string"?b:e.formatAbiItem(b);return o.normalizeSignature(v)}function l(...h){const b=(()=>{if(Array.isArray(h[0])){const[v,g]=h;return a(v,g)}return h[0]})();return typeof b!="string"&&"hash"in b&&b.hash?b.hash:n.keccak256(t.fromString(u(b)))}class f extends r.BaseError{constructor(b,v){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${b.type}\` in \`${o.normalizeSignature(e.formatAbiItem(b.abiItem))}\`, and`,`\`${v.type}\` in \`${o.normalizeSignature(e.formatAbiItem(v.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}Ke.AmbiguityError=f;class m extends r.BaseError{constructor({name:b,data:v,type:g="item"}){const _=b?` with name "${b}"`:v?` with data "${v}"`:"";super(`ABI ${g}${_} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}Ke.NotFoundError=m;class y extends r.BaseError{constructor({data:b}){super(`Selector size is invalid. Expected 4 bytes. Received ${t.size(b)} bytes ("${b}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}return Ke.InvalidSelectorSizeError=y,Ke}var ey;function H6(){if(ey)return lr;ey=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.decode=o,lr.encode=s,lr.format=i,lr.from=a,lr.fromAbi=c;const e=br(),r=j_(),n=fi(),t=Ne();function o(...u){var h;const[l,f]=(()=>{if(Array.isArray(u[0])){const[b,v]=u;return[c(b),v]}return u})(),{bytecode:m}=f;if(((h=l.inputs)==null?void 0:h.length)===0)return;const y=f.data.replace(m,"0x");return n.decode(l.inputs,y)}function s(...u){var h;const[l,f]=(()=>{if(Array.isArray(u[0])){const[b,v]=u;return[c(b),v]}return u})(),{bytecode:m,args:y}=f;return t.concat(m,(h=l.inputs)!=null&&h.length&&(y!=null&&y.length)?n.encode(l.inputs,y):"0x")}function i(u){return e.formatAbiItem(u)}function a(u){return r.from(u)}function c(u){const l=u.find(f=>f.type==="constructor");if(!l)throw new r.NotFoundError({name:"constructor"});return l}return lr}var Pt={},ty;function F6(){if(ty)return Pt;ty=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.decodeData=o,Pt.decodeResult=s,Pt.encodeData=i,Pt.encodeResult=a,Pt.format=c,Pt.from=u,Pt.fromAbi=l,Pt.getSelector=f;const e=br(),r=j_(),n=fi(),t=Ne();function o(...m){var g;const[y,h]=(()=>{if(Array.isArray(m[0])){const[_,P,d]=m;return[l(_,P),d]}return m})(),{overloads:b}=y;if(t.size(h)<4)throw new r.InvalidSelectorSizeError({data:h});if(((g=y.inputs)==null?void 0:g.length)===0)return;const v=b?l([y,...b],h):y;
46if(!(t.size(h)<=4))return n.decode(v.inputs,t.slice(h,4))}function s(...m){const[y,h,b={}]=(()=>{if(Array.isArray(m[0])){const[g,_,P,d]=m;return[l(g,_),P,d]}return m})(),v=n.decode(y.outputs,h,b);if(!(v&&Object.keys(v).length===0))return v&&Object.keys(v).length===1?Array.isArray(v)?v[0]:Object.values(v)[0]:v}function i(...m){const[y,h=[]]=(()=>{if(Array.isArray(m[0])){const[w,E,p]=m;return[l(w,E,{args:p}),p]}const[P,d]=m;return[P,d]})(),{overloads:b}=y,v=b?l([y,...b],y.name,{args:h}):y,g=f(v),_=h.length>0?n.encode(v.inputs,h):void 0;return _?t.concat(g,_):g}function a(...m){const[y,h,b={}]=(()=>{if(Array.isArray(m[0])){const[_,P,d,w]=m;return[l(_,P),d,w]}return m})(),{as:v="Array"}=b,g=y.outputs.length===1?[h]:Array.isArray(h)?h:v==="Object"?Object.values(h):[h];return n.encode(y.outputs,g)}function c(m){return e.formatAbiItem(m)}function u(m,y={}){return r.from(m,y)}function l(m,y,h){const b=r.fromAbi(m,y,h);if(b.type!=="function")throw new r.NotFoundError({name:y,type:"function"});return b}function f(m){return r.getSelector(m)}return Pt}var Ur={},ry;
46function w_(){return ry||(ry=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.zeroAddress=Ur.ethAddress=void 0,Ur.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Ur.zeroAddress="0x0000000000000000000000000000000000000000"),Ur}var ny;function N6(){if(ny)return ic;ny=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.simulateCalls=f;const e=H6(),r=F6(),n=Ie(),t=w_(),o=ri(),s=de(),i=Le(),a=__(),c=kg(),u=E_(),l="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function f(m,y){const{blockNumber:h,blockTag:b,calls:v,stateOverrides:g,traceAssetChanges:_,traceTransfers:P,validation:d}=y,w=y.account?(0,n.parseAccount)(y.account):void 0;if(_&&!w)throw new s.BaseError("`account` is required when `traceAssetChanges` is true");const E=w?e.encode(e.from("constructor(bytes, bytes)"),{bytecode:o.deploylessCallViaBytecodeBytecode,args:[l,r.encodeData(r.from("function getBalance(address)"),[w.address])]}):void 0,p=_?await Promise.all(y.calls.map(async V=>{if(!V.data&&!V.abi)return;const{accessList:Y}=await(0,c.createAccessList)(m,{account:w.address,...V,data:V.abi?(0,i.encodeFunctionData)(V):V.data});return Y.map(({address:te,storageKeys:Z})=>Z.length>0?te:null)})).then(V=>V.flat().filter(Boolean)):[],S=await(0,u.simulateBlocks)(m,{blockNumber:h,blockTag:b,blocks:[..._?[{calls:[{data:E}],stateOverrides:g},{calls:p.map((V,Y)=>({abi:[r.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[w.address],to:V,from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[],{calls:[...v,{to:t.zeroAddress}].map(V=>({...V,from:w==null?void 0:w.address})),stateOverrides:g},..._?[{calls:[{data:E}]},{calls:p.map((V,Y)=>({abi:[r.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[w.address],to:V,from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:p.map((V,Y)=>({to:V,abi:[r.from("function decimals() returns (uint256)")],functionName:"decimals",from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:p.map((V,Y)=>({to:V,abi:[r.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:p.map((V,Y)=>({to:V,abi:[r.from("function symbol() returns (string)")],functionName:"symbol",from:t.zeroAddress,nonce:Y})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[]],traceTransfers:P,validation:d}),A=_?S[2]:S[0],[T,C,,R,I,x,F,H]=_?S:[],{calls:j,...k}=A,B=j.slice(0,-1)??[],O=(T==null?void 0:T.calls)??[],q=(C==null?void 0:C.calls)??[],M=[...O,...q].map(V=>V.status==="success"?(0,a.hexToBigInt)(V.data):null),N=(R==null?void 0:R.calls)??[],z=(I==null?void 0:I.calls)??[],$=[...N,...z].map(V=>V.status==="success"?(0,a.hexToBigInt)(V.data):null),U=((x==null?void 0:x.calls)??[]).map(V=>V.status==="success"?V.result:null),G=((H==null?void 0:H.calls)??[]).map(V=>V.status==="success"?V.result:null),J=((F==null?void 0:F.calls)??[]).map(V=>V.status==="success"?V.result:null),W=[];for(const[V,Y]of $.entries()){const te=M[V];if(typeof Y!="bigint"||typeof te!="bigint")continue;const Z=U[V-1],X=G[V-1],Q=J[V-1],ne=V===0?{address:t.ethAddress,decimals:18,symbol:"ETH"}:{address:p[V-1],decimals:Q||Z?Number(Z??1):void 0,symbol:X??void 0};W.some(re=>re.token.address===ne.address)||W.push({token:ne,value:{pre:te,post:Y,diff:Y-te}})}return{assetChanges:W,block:k,results:B}}return ic}var jn={},Fo={},ef={},oy;function $6(){return oy||(oy=1,(function(e){Object.defineProperty(e,"__esMo
46dule",{value:!0}),e.InvalidWrappedSignatureError=e.universalSignatureValidatorAbi=e.universalSignatureValidatorBytecode=e.magicBytes=void 0,e.assert=o,e.from=s,e.unwrap=i,e.wrap=a,e.validate=c;const r=fi(),n=lt(),t=Ne();e.magicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",e.universalSignatureValidatorBytecode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
46603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",e.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function o(l){if(t.slice(l,-32)!==e.magicBytes)throw new u(l)}function s(l){return typeof l=="string"?i(l):l}function i(l){o(l);const[f,m,y]=r.decode(r.from("address, bytes, bytes"),l);return{data:m,signature:y,to:f}}function a(l){const{data:f,signature:m,to:y}=l;return t.concat(r.encode(r.from("address, bytes, bytes"),[y,f,m]),e.magicBytes)}function c(l){try{return o(l),!0}catch{return!1}}class u extends n.BaseError{constructor(f){super(`Value \`${f}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=u})(ef)),ef}var iy;function z6(){return iy||(iy=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.SignatureErc6492=void 0,Fo.SignatureErc6492=$6()),Fo}var ac={},ay;function P_(){if(ay)return ac;ay=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.serializeSignature=t;
46const e=Xr(),r=Be(),n=Ee();function t({r:o,s,to:i="hex",v:a,yParity:c}){const u=(()=>{if(c===0||c===1)return c;if(a&&(a===27n||a===28n||a>=35n))return a%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(o),(0,r.hexToBigInt)(s)).toCompactHex()}${u===0?"1b":"1c"}`;return i==="hex"?l:(0,n.hexToBytes)(l)}return ac}var sy;function cd(){if(sy)return jn;sy=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.verifyHash=d,jn.verifyErc8010=w,jn.verifyErc1271=p;const e=z6(),r=ad(),n=kt(),t=ri(),o=pr(),s=oi(),i=Le(),a=Je(),c=gt(),u=Ug(),l=qe(),f=Ze(),m=Be(),y=oe(),h=me(),b=vr(),v=P_(),g=On(),_=kf(),P=Ht();async function d(A,T){var k,B,O,q;const{address:C,chain:R=A.chain,hash:I,erc6492VerifierAddress:x=T.universalSignatureVerifierAddress??((B=(k=R==null?void 0:R.contracts)==null?void 0:k.erc6492Verifier)==null?void 0:B.address),multicallAddress:F=T.multicallAddress??((q=(O=R==null?void 0:R.contracts)==null?void 0:O.multicall3)==null?void 0:q.address),mode:H="auto"}=T;if(R!=null&&R.verifyHash)return await R.verifyHash(A,T);const j=(()=>{const M=T.signature;return(0,f.isHex)(M)?M:typeof M=="object"&&"r"in M&&"s"in M?(0,v.serializeSignature)(M):(0,y.bytesToHex)(M)})();try{if(H==="eoa")try{if((0,c.isAddressEqual)((0,a.getAddress)(C),await(0,b.recoverAddress)({hash:I,signature:j})))return!0}catch{}return r.SignatureErc8010.validate(j)?await w(A,{...T,multicallAddress:F,signature:j}):await E(A,{...T,verifierAddress:x,signature:j})}
46catch(M){if(H!=="eoa")try{if((0,c.isAddressEqual)((0,a.getAddress)(C),await(0,b.recoverAddress)({hash:I,signature:j})))return!0}catch{}if(M instanceof S)return!1;throw M}}async function w(A,T){var $;const{address:C,blockNumber:R,blockTag:I,hash:x,multicallAddress:F}=T,{authorization:H,data:j,signature:k,to:B}=r.SignatureErc8010.unwrap(T.signature);if(await(0,_.getCode)(A,{address:C,blockNumber:R,blockTag:I})===(0,l.concatHex)(["0xef0100",H.address]))return await p(A,{address:C,blockNumber:R,blockTag:I,hash:x,signature:k});const q={address:H.address,chainId:Number(H.chainId),nonce:Number(H.nonce),r:(0,y.numberToHex)(H.r,{size:32}),s:(0,y.numberToHex)(H.s,{size:32}),yParity:H.yParity};if(!await(0,u.verifyAuthorization)({address:C,authorization:q}))throw new S;const N=await(0,h.getAction)(A,P.readContract,"readContract")({...F?{address:F}:{code:t.multicall3Bytecode},authorizationList:[q],abi:n.multicall3Abi,blockNumber:R,blockTag:"pending",functionName:"aggregate3",args:[[...j?[{allowFailure:!0,target:B??C,callData:j}]:[],{allowFailure:!0,target:C,callData:(0,i.encodeFunctionData)({abi:n.erc1271Abi,functionName:"isValidSignature",args:[x,k]})}]]}),z=($=N[N.length-1])==null?void 0:$.returnData;if(z!=null&&z.startsWith("0x1626ba7e"))return!0;throw new S}async function E(A,T){const{address:C,factory:R,factoryData:I,hash:x,signature:F,verifierAddress:H,...j}=T,k=await(async()=>!R&&!I||e.SignatureErc6492.validate(F)?F:e.SignatureErc6492.wrap({data:I,signature:F,to:R}))(),B=H?{to:H,data:(0,i.encodeFunctionData)({abi:n.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[C,x,k]}),...j}:{data:(0,s.encodeDeployData)({abi:n.erc6492SignatureValidatorAbi,args:[C,x,k],bytecode:t.erc6492SignatureValidatorByteCode}),...j},{data:O}=await(0,h.getAction)(A,g.call,"call")(B).catch(q=>{throw q instanceof o.CallExecutionError?new S:q});if((0,m.hexToBool)(O??"0x0"))return!0;throw new S}async function p(A,T){const{address:C,blockNumber:R,blockTag:I,hash:x,signature:F}=T;if((await(0,h.getAction)(A,P.readContract,"readContract")({address:C,abi:n.erc1271Abi,args:[x,F],blockNumber:R,blockTag:I,functionName:"isValidSignature"}).catch(j=>{throw j instanceof o.ContractFunctionExecutionError?new S:j})).startsWith("0x1626ba7e"))return!0;throw new S}class S extends Error{}return jn}var sc={},cy;function U6(){if(cy)return sc;cy=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.verifyMessage=t;const e=me(),r=ui(),n=cd();async function t(o,{address:s,message:i,factory:a,factoryData:c,signature:u,...l}){const f=(0,r.hashMessage)(i);return(0,e.getAction)(o,n.verifyHash,"verifyHash")({address:s,factory:a,factoryData:c,hash:f,signature:u,...l})}return sc}var cc={},uy;function L6(){if(uy)return cc;uy=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.verifyTypedData=t;const e=me(),r=di(),n=cd();async function t(o,s){const{address:i,factory:a,factoryData:c,signature:u,message:l,primaryType:f,types:m,domain:y,...h}=s,b=(0,r.hashTypedData)({message:l,primaryType:f,types:m,domain:y});return(0,e.getAction)(o,n.verifyHash,"verifyHash")({address:i,factory:a,factoryData:c,hash:b,signature:u,...h})}return cc}var uc={},dc={},dy;function A_(){if(dy)return dc;dy=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.watchBlockNumber=i;const e=Be(),r=me(),n=en(),t=Cn(),o=Fe(),s=ai();function i(a,{emitOnBegin:c=!1,emitMissed:u=!1,onBlockNumber:l,onError:f,poll:m,pollingInterval:y=a.pollingInterval}){const h=typeof m<"u"?m:!(a.transport.type==="webSocket"||a.transport.type==="ipc"||a.transport.type==="fallback"&&(a.transport.transports[0].c
46onfig.type==="webSocket"||a.transport.transports[0].config.type==="ipc"));let b;return h?(()=>{const _=(0,o.stringify)(["watchBlockNumber",a.uid,c,u,y]);return(0,n.observe)(_,{onBlockNumber:l,onError:f},P=>(0,t.poll)(async()=>{var d;try{const w=await(0,r.getAction)(a,s.getBlockNumber,"getBlockNumber")({cacheTime:0});if(b!==void 0){if(w===b)return;if(w-b>1&&u)for(let E=b+1n;E<w;E++)P.onBlockNumber(E,b),b=E}(b===void 0||w>b)&&(P.onBlockNumber(w,b),b=w)}catch(w){(d=P.onError)==null||d.call(P,w)}},{emitOnBegin:c,interval:y}))})():(()=>{const _=(0,o.stringify)(["watchBlockNumber",a.uid,c,u]);return(0,n.observe)(_,{onBlockNumber:l,onError:f},P=>{let d=!0,w=()=>d=!1;return(async()=>{try{const E=(()=>{if(a.transport.type==="fallback"){const S=a.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return S?S.value:a.transport}return a.transport})(),{unsubscribe:p}=await E.subscribe({params:["newHeads"],onData(S){var T;if(!d)return;const A=(0,e.hexToBigInt)((T=S.result)==null?void 0:T.number);P.onBlockNumber(A,b),b=A},onError(S){var A;(A=P.onError)==null||A.call(P,S)}});w=p,d||w()}catch(E){f==null||f(E)}})(),()=>w()})})()}return dc}var fy;function T_(){if(fy)return uc;fy=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.waitForTransactionReceipt=f;const e=lf(),r=nt(),n=me(),t=en(),o=jf(),s=ed(),i=Fe(),a=Qr(),c=Qf(),u=v_(),l=A_();async function f(m,y){const{checkReplacement:h=!0,confirmations:b=1,hash:v,onReplaced:g,retryCount:_=6,retryDelay:P=({count:j})=>~~(1<<j)*200,timeout:d=18e4}=y,w=(0,i.stringify)(["waitForTransactionReceipt",m.uid,v]),E=(()=>{var j;return y.pollingInterval?y.pollingInterval:(j=m.chain)!=null&&j.experimental_preconfirmationTime?m.chain.experimental_preconfirmationTime:m.pollingInterval})();let p,S,A,T=!1,C,R;const{promise:I,resolve:x,reject:F}=(0,o.withResolvers)(),H=d?setTimeout(()=>{R==null||R(),C==null||C(),F(new r.WaitForTransactionReceiptTimeoutError({hash:v}))},d):void 0;return C=(0,t.observe)(w,{onReplaced:g,resolve:x,reject:F},async j=>{if(A=await(0,n.getAction)(m,u.getTransactionReceipt,"getTransactionReceipt")({hash:v}).catch(()=>{}),A&&b<=1){clearTimeout(H),j.resolve(A),C==null||C();return}R=(0,n.getAction)(m,l.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:E,async onBlockNumber(k){const B=q=>{clearTimeout(H),R==null||R(),q(),C==null||C()};let O=k;if(!T)try{if(A){if(b>1&&(!A.blockNumber||O-A.blockNumber+1n<b))return;B(()=>j.resolve(A));return}if(h&&!p&&(T=!0,await(0,s.withRetry)(async()=>{p=await(0,n.getAction)(m,c.getTransaction,"getTransaction")({hash:v}),p.blockNumber&&(O=p.blockNumber)},{delay:P,retryCount:_}),T=!1),A=await(0,n.getAction)(m,u.getTransactionReceipt,"getTransactionReceipt")({hash:v}),b>1&&(!A.blockNumber||O-A.blockNumber+1n<b))return;B(()=>j.resolve(A))}catch(q){if(q instanceof r.TransactionNotFoundError||q instanceof r.TransactionReceiptNotFoundError){if(!p){T=!1;return}try{S=p,T=!0;const M=await(0,s.withRetry)(()=>(0,n.getAction)(m,a.getBlock,"getBlock")({blockNumber:O,includeTransactions:!0}),{delay:P,retryCount:_,shouldRetry:({error:$})=>$ instanceof e.BlockNotFoundError});T=!1;const N=M.transactions.find(({from:$,nonce:U})=>$===S.from&&U===S.nonce);if(!N||(A=await(0,n.getAction)(m,u.getTransactionReceipt,"getTransactionReceipt")({hash:N.hash}),b>1&&(!A.blockNumber||O-A.blockNumber+1n<b)))return;let z="replaced";N.to===S.to&&N.value===S.value&&N.input===S.input?z="repriced":N.from===N.to&&N.value===0n&&(z="cancelled"),B(()=>{var $;($=j.onReplaced)==null||$.call(j,{reason:z,replacedTransaction:S,transaction:N,transactionReceipt:A}),j.resolve(A)})}catch(M){B(()=>j.reject(M))}}else B(()=>j.reject(q))}}})}),I}return uc}var fc={},ly;function D6(){if(ly)return fc;ly=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.watchBlocks=s;const e=me(),r=en(),n=Cn(),t=Fe(),o=Qr();function s(i,{blockTag:a=i.experimental_blockTag??"latest",emitMissed:c=!1,emitOnBegin:u=!1,onBlock:l,onError:f,includeTransactions:m,poll:y,pollingInterval:h=i.pollingInterval}){const b=typeof y<"u"?y:!(i.transport.type==="webSocket"||i.transport.type==="ipc"||i.transport.type==="fallback"&&(i.transport.transports[0].c
46onfig.type==="webSocket"||i.transport.transports[0].config.type==="ipc")),v=m??!1;let g;return b?(()=>{const d=(0,t.stringify)(["watchBlocks",i.uid,a,c,u,v,h]);return(0,r.observe)(d,{onBlock:l,onError:f},w=>(0,n.poll)(async()=>{var E;try{const p=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockTag:a,includeTransactions:v});if(p.number!==null&&(g==null?void 0:g.number)!=null){if(p.number===g.number)return;if(p.number-g.number>1&&c)for(let S=(g==null?void 0:g.number)+1n;S<p.number;S++){const A=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockNumber:S,includeTransactions:v});w.onBlock(A,g),g=A}}((g==null?void 0:g.number)==null||a==="pending"&&(p==null?void 0:p.number)==null||p.number!==null&&p.number>g.number)&&(w.onBlock(p,g),g=p)}catch(p){(E=w.onError)==null||E.call(w,p)}},{emitOnBegin:u,interval:h}))})():(()=>{let d=!0,w=!0,E=()=>d=!1;return(async()=>{try{u&&(0,e.getAction)(i,o.getBlock,"getBlock")({blockTag:a,includeTransactions:v}).then(A=>{d&&w&&(l(A,void 0),w=!1)}).catch(f);const p=(()=>{if(i.transport.type==="fallback"){const A=i.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return A?A.value:i.transport}return i.transport})(),{unsubscribe:S}=await p.subscribe({params:["newHeads"],async onData(A){var C;if(!d)return;const T=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockNumber:(C=A.result)==null?void 0:C.number,includeTransactions:v}).catch(()=>{});d&&(l(T,g),w=!1,g=T)},onError(A){f==null||f(A)}});E=S,d||E()}catch(p){f==null||f(p)}})(),()=>E()})()}return fc}var lc={},by;function G6(){if(by)return lc;by=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.watchEvent=h;const e=Se(),r=gr(),n=ei(),t=Zr(),o=qt(),s=me(),i=en(),a=Cn(),c=Fe(),u=Hg(),l=ai(),f=Yu(),m=_f(),y=Xu();function h(b,{address:v,args:g,batch:_=!0,event:P,events:d,fromBlock:w,onError:E,onLogs:p,poll:S,pollingInterval:A=b.pollingInterval,strict:T}){const C=typeof S<"u"?S:typeof w=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="ipc"||b.transport.type==="fallback"&&(b.transport.transports[0].c
46onfig.type==="webSocket"||b.transport.transports[0].config.type==="ipc")),R=T??!1;return C?(()=>{const F=(0,c.stringify)(["watchEvent",v,g,_,b.uid,P,A,w]);return(0,i.observe)(F,{onLogs:p,onError:E},H=>{let j;w!==void 0&&(j=w-1n);let k,B=!1;const O=(0,a.poll)(async()=>{var q;if(!B){try{k=await(0,s.getAction)(b,u.createEventFilter,"createEventFilter")({address:v,args:g,event:P,events:d,strict:R,fromBlock:w})}catch{}B=!0;return}try{let M;if(k)M=await(0,s.getAction)(b,f.getFilterChanges,"getFilterChanges")({filter:k});else{const N=await(0,s.getAction)(b,l.getBlockNumber,"getBlockNumber")({});j&&j!==N?M=await(0,s.getAction)(b,m.getLogs,"getLogs")({address:v,args:g,event:P,events:d,fromBlock:j+1n,toBlock:N}):M=[],j=N}if(M.length===0)return;if(_)H.onLogs(M);else for(const N of M)H.onLogs([N])}catch(M){k&&M instanceof r.InvalidInputRpcError&&(B=!1),(q=H.onError)==null||q.call(H,M)}},{emitOnBegin:!0,interval:A});return async()=>{k&&await(0,s.getAction)(b,y.uninstallFilter,"uninstallFilter")({filter:k}),O()}})})():(()=>{let F=!0,H=()=>F=!1;return(async()=>{try{const j=(()=>{if(b.transport.type==="fallback"){const q=b.transport.transports.find(M=>M.config.type==="webSocket"||M.config.type==="ipc");return q?q.value:b.transport}return b.transport})(),k=d??(P?[P]:void 0);let B=[];k&&(B=[k.flatMap(M=>(0,t.encodeEventTopics)({abi:[M],eventName:M.name,args:g}))],P&&(B=B[0]));const{unsubscribe:O}=await j.subscribe({params:["logs",{address:v,topics:B}],onData(q){var N;if(!F)return;const M=q.result;try{const{eventName:z,args:$}=(0,n.decodeEventLog)({abi:k??[],data:M.data,topics:M.topics,strict:R}),U=(0,o.formatLog)(M,{args:$,eventName:z});p([U])}catch(z){let $,U;if(z instanceof e.DecodeLogDataMismatch||z instanceof e.DecodeLogTopicsMismatch){if(T)return;$=z.abiItem.name,U=(N=z.abiItem.inputs)==null?void 0:N.some(J=>!("name"in J&&J.name))}const G=(0,o.formatLog)(M,{args:U?[]:{},eventName:$});p([G])}},onError(q){E==null||E(q)}});H=O,F||H()}catch(j){E==null||E(j)}})(),()=>H()})()}return lc}var bc={},my;function V6(){if(my)return bc;my=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.watchPendingTransactions=a;const e=me(),r=en(),n=Cn(),t=Fe(),o=Fg(),s=Yu(),i=Xu();function a(c,{batch:u=!0,onError:l,onTransactions:f,poll:m,pollingInterval:y=c.pollingInterval}){return(typeof m<"u"?m:c.transport.type!=="webSocket"&&c.transport.type!=="ipc")?(()=>{const g=(0,t.stringify)(["watchPendingTransactions",c.uid,u,y]);return(0,r.observe)(g,{onTransactions:f,onError:l},_=>{let P;const d=(0,n.poll)(async()=>{var w;try{if(!P)try{P=await(0,e.getAction)(c,o.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(p){throw d(),p}const E=await(0,e.getAction)(c,s.getFilterChanges,"getFilterChanges")({filter:P});if(E.length===0)return;if(u)_.onTransactions(E);else for(const p of E)_.onTransactions([p])}catch(E){(w=_.onError)==null||w.call(_,E)}},{emitOnBegin:!0,interval:y});return async()=>{P&&await(0,e.getAction)(c,i.uninstallFilter,"uninstallFilter")({filter:P}),d()}})})():(()=>{let g=!0,_=()=>g=!1;return(async()=>{try{const{unsubscribe:P}=await c.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!g)return;const w=d.result;f([w])},onError(d){l==null||l(d)}});_=P,g||_()}catch(P){l==null||l(P)}})(),()=>_()})()}return bc}var mc={},hc={},hy;function W6(){if(hy)return hc;hy=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.parseSiweMessage=e;function e(t){var h,b,v;const{scheme:o,statement:s,...i}=((h=t.match(r))==null?void 0:h.groups)??{},{chainId:a,expirationTime:c,issuedAt:u,notBefore:l,requestId:f,...m}=((b=t.match(n))==null?void 0:b.groups)??{},y=(v=t.split("Resources:")[1])==null?void 0:v.split(` 47- `).slice(1);return{...i,...m,...a?{chainId:Number(a)}:{},...c?{expirationTime:new Date(c)}:{},...u?{issuedAt:new Date(u)}:{},...l?{notBefore:new Date(l)}:{},...f?{requestId:f}:{},...y?{resources:y}:{},...o?{scheme:o}:{},...s?{statement:s}:{}}}const r=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,n=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;return hc}var yc={},yy;function K6(){if(yy)return yc;yy=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.validateSiweMessage=n;const e=rt(),r=gt();function n(t){const{address:o,domain:s,message:i,nonce:a,scheme:c,time:u=new Date}=t;if(s&&i.domain!==s||a&&i.nonce!==a||c&&i.scheme!==c||i.expirationTime&&u>=i.expirationTime||i.notBefore&&u<i.notBefore)return!1;try{if(!i.address||!(0,e.isAddress)(i.address,{strict:!1})||o&&!(0,r.isAddressEqual)(i.address,o))return!1}catch{return!1}return!0}return yc}var py;function Z6(){if(py)return mc;py=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.verifySiweMessage=o;const e=ui(),r=W6(),n=K6(),t=cd();
47async function o(s,i){const{address:a,domain:c,message:u,nonce:l,scheme:f,signature:m,time:y=new Date,...h}=i,b=(0,r.parseSiweMessage)(u);if(!b.address||!(0,n.validateSiweMessage)({address:a,domain:c,message:b,nonce:l,scheme:f,time:y}))return!1;const g=(0,e.hashMessage)(u);return(0,t.verifyHash)(s,{address:b.address,hash:g,signature:m,...h})}return mc}var pc={},gy;function el(){if(gy)return pc;gy=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.sendRawTransactionSync=n;const e=nt(),r=ci();async function n(t,{serializedTransaction:o,throwOnReceiptRevert:s,timeout:i}){var l,f,m;const a=await t.request({method:"eth_sendRawTransactionSync",params:i?[o,i]:[o]},{retryCount:0}),u=(((m=(f=(l=t.chain)==null?void 0:l.formatters)==null?void 0:f.transactionReceipt)==null?void 0:m.format)||r.formatTransactionReceipt)(a);if(u.status==="reverted"&&s)throw new e.TransactionReceiptRevertedError({receipt:u});return u}return pc}var _y;function S_(){if(_y)return Ja;_y=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.publicActions=he;const e=o6(),r=s6(),n=c6(),t=u6(),o=Mg(),s=On(),i=kg(),a=d6(),c=af(),u=Hg(),l=Fg(),f=wg(),m=gg(),y=gf(),h=pg(),b=pf(),v=f6(),g=l6(),_=Qr(),P=ai(),d=b6(),w=jr(),E=kf(),p=vf(),S=m6(),A=y6(),T=g6(),C=Yu(),R=_6(),I=bf(),x=_f(),F=C6(),H=x6(),j=Qf(),k=q6(),B=Du(),O=v_(),q=M6(),M=Ht(),N=E_(),z=N6(),$=Sg(),U=Xu(),G=cd(),J=U6(),W=L6(),V=T_(),Y=A_(),te=D6(),Z=Rg(),X=G6(),Q=V6(),ne=Z6(),re=Qo(),ae=If(),ce=el();function he(ee){return{call:K=>(0,s.call)(ee,K),createAccessList:K=>(0,i.createAccessList)(ee,K),createBlockFilter:()=>(0,a.createBlockFilter)(ee),createContractEventFilter:K=>(0,c.createContractEventFilter)(ee,K),createEventFilter:K=>(0,u.createEventFilter)(ee,K),createPendingTransactionFilter:()=>(0,l.createPendingTransactionFilter)(ee),estimateContractGas:K=>(0,f.estimateContractGas)(ee,K),estimateGas:K=>(0,y.estimateGas)(ee,K),getBalance:K=>(0,v.getBalance)(ee,K),getBlobBaseFee:()=>(0,g.getBlobBaseFee)(ee),getBlock:K=>(0,_.getBlock)(ee,K),getBlockNumber:K=>(0,P.getBlockNumber)(ee,K),getBlockTransactionCount:K=>(0,d.getBlockTransactionCount)(ee,K),getBytecode:K=>(0,E.getCode)(ee,K),getChainId:()=>(0,w.getChainId)(ee),getCode:K=>(0,E.getCode)(ee,K),getContractEvents:K=>(0,p.getContractEvents)(ee,K),getDelegation:K=>(0,S.getDelegation)(ee,K),getEip712Domain:K=>(0,A.getEip712Domain)(ee,K),getEnsAddress:K=>(0,e.getEnsAddress)(ee,K),getEnsAvatar:K=>(0,r.getEnsAvatar)(ee,K),getEnsName:K=>(0,n.getEnsName)(ee,K),getEnsResolver:K=>(0,t.getEnsResolver)(ee,K),getEnsText:K=>(0,o.getEnsText)(ee,K),getFeeHistory:K=>(0,T.getFeeHistory)(ee,K),estimateFeesPerGas:K=>(0,m.estimateFeesPerGas)(ee,K),getFilterChanges:K=>(0,C.getFilterChanges)(ee,K),getFilterLogs:K=>(0,R.getFilterLogs)(ee,K),getGasPrice:()=>(0,I.getGasPrice)(ee),getLogs:K=>(0,x.getLogs)(ee,K),getProof:K=>(0,F.getProof)(ee,K),estimateMaxPriorityFeePerGas:K=>(0,h.estimateMaxPriorityFeePerGas)(ee,K),fillTransaction:K=>(0,b.fillTransaction)(ee,K),getStorageAt:K=>(0,H.getStorageAt)(ee,K),getTransaction:K=>(0,j.getTransaction)(ee,K),getTransactionConfirmations:K=>(0,k.getTransactionConfirmations)(ee,K),getTransactionCount:K=>(0,B.getTransactionCount)(ee,K),getTransactionReceipt:K=>(0,O.getTransactionReceipt)(ee,K),multicall:K=>(0,q.multicall)(ee,K),prepareTransactionRequest:K=>(0,re.prepareTransactionRequest)(ee,K),readContract:K=>(0,M.readContract)(ee,K),sendRawTransaction:K=>(0,ae.sendRawTransaction)(ee,K),sendRawTransactionSync:K=>(0,ce.sendRawTransactionSync)(ee,K),simulate:K=>(0,N.simulateBlocks)(ee,K),simulateBlocks:K=>(0,N.simulateBlocks)(ee,K),simulateCalls:K=>(0,z.simulateCalls)(ee,K),simulateContract:K=>(0,$.simulateContract)(ee,K),verifyHash:K=>(0,G.verifyHash)(ee,K),verifyMessage:K=>(0,J.verifyMessage)(ee,K),verifySiweMessage:K=>(0,ne.verifySiweMessage)(ee,K),verifyTypedData:K=>(0,W.verifyTypedData)(ee,K),uninstallFilter:K=>(0,U.uninstallFilter)(ee,K),waitForTransactionReceipt:K=>(0,V.waitForTransactionReceipt)(ee,K),watchBlocks:K=>(0,te.watchBlocks)(ee,K),watchBlockNumber:K=>(0,Y.watchBlockNumber)(ee,K),watchContractEvent:K=>(0,Z.watchContractEvent)(ee,K),watchEvent:K=>(0,X.watchEvent)(ee,K),watchPendingTransactions:K=>(0,Q.watchPendingTransactions)(ee,K)}}return Ja}var vy;function J6(){if(vy)return Za;vy=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.createPublicClient=n;const e=td(),r=S_();function n(t){const{key:o="public",name:s="Public Client"}=t;return(0,e.createClient)({...t,key:o,name:s,type:"publicClient"}).extend(r.publicActions)}return Za}var gc={},_c={},vc={},Ey;function Y6(){if(Ey)return vc;Ey=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.dropTransaction=e;async function e(r,{hash:n}){await r.request({method:`${r.mode}_dropTransaction`,params:[n]})}return vc}var Ec={},jy;function X6(){if(jy)return Ec;jy=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.dumpState=e;async function e(r){return r.request({method:`${r.mode}_dumpState`})}return Ec}var jc={},wy;function Q6(){if(wy)return jc;wy=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.getAutomine=e;async function e(r){return r.mode==="ganache"?await r.request({method:"eth_mining"}):await r.request({method:`${r.mode}_getAutomine`})}return jc}var wc={},Py;
47function e2(){if(Py)return wc;Py=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.getTxpoolContent=e;async function e(r){return await r.request({method:"txpool_content"})}return wc}var Pc={},Ay;function t2(){if(Ay)return Pc;Ay=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.getTxpoolStatus=r;const e=Be();async function r(n){const{pending:t,queued:o}=await n.request({method:"txpool_status"});return{pending:(0,e.hexToNumber)(t),queued:(0,e.hexToNumber)(o)}}return Pc}var Ac={},Ty;function r2(){if(Ty)return Ac;Ty=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.impersonateAccount=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_impersonateAccount`,params:[n]})}return Ac}var Tc={},Sy;function n2(){if(Sy)return Tc;Sy=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.increaseTime=r;const e=oe();async function r(n,{seconds:t}){return await n.request({method:"evm_increaseTime",params:[(0,e.numberToHex)(t)]})}return Tc}var Sc={},Iy;function o2(){if(Iy)return Sc;Iy=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.inspectTxpool=e;async function e(r){return await r.request({method:"txpool_inspect"})}return Sc}var Ic={},Ry;function i2(){if(Ry)return Ic;Ry=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.loadState=e;async function e(r,{state:n}){await r.request({method:`${r.mode}_loadState`,params:[n]})}return Ic}var Rc={},By;function a2(){if(By)return Rc;By=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.mine=r;const e=oe();async function r(n,{blocks:t,interval:o}){n.mode==="ganache"?await n.request({method:"evm_mine",params:[{blocks:(0,e.numberToHex)(t)}]}):await n.request({method:`${n.mode}_mine`,params:[(0,e.numberToHex)(t),(0,e.numberToHex)(o||0)]})}return Rc}var Bc={},Oy;function s2(){if(Oy)return Bc;Oy=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.removeBlockTimestampInterval=e;async function e(r){await r.request({method:`${r.mode}_removeBlockTimestampInterval`})}return Bc}var Oc={},Cy;function c2(){if(Cy)return Oc;Cy=1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.reset=e;async function e(r,{blockNumber:n,jsonRpcUrl:t}={}){await r.request({method:`${r.mode}_reset`,params:[{forking:{blockNumber:Number(n),jsonRpcUrl:t}}]})}return Oc}var Cc={},xy;function u2(){if(xy)return Cc;xy=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.revert=e;async function e(r,{id:n}){await r.request({method:"evm_revert",params:[n]})}return Cc}var xc={},qy;function d2(){if(qy)return xc;qy=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.sendUnsignedTransaction=n;const e=Er(),r=St();async function n(t,o){var d,w,E;const{accessList:s,data:i,from:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:m,to:y,value:h,...b}=o,v=(E=(w=(d=t.chain)==null?void 0:d.formatters)==null?void 0:w.transactionRequest)==null?void 0:E.format,_=(v||r.formatTransactionRequest)({...(0,e.extract)(b,{format:v}),accessList:s,data:i,from:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:m,to:y,value:h},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[_]})}return xc}var qc={},My;function f2(){if(My)return qc;My=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.setAutomine=e;async function e(r,n){r.mode==="ganache"?n?await r.request({method:"miner_start"}):await r.request({method:"miner_stop"}):await r.request({method:"evm_setAutomine",params:[n]})}return qc}var Mc={},ky;function l2(){if(ky)return Mc;ky=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.setBalance=r;const e=oe();async function r(n,{address:t,value:o}){n.mode==="ganache"?await n.request({method:"evm_setAccountBalance",params:[t,(0,e.numberToHex)(o)]}):await n.request({method:`${n.mode}_setBalance`,params:[t,(0,e.numberToHex)(o)]})}return Mc}var kc={},Hy;function b2(){if(Hy)return kc;Hy=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.setBlockGasLimit=r;const e=oe();async function r(n,{gasLimit:t}){await n.request({method:"evm_setBlockGasLimit",params:[(0,e.numberToHex)(t)]})}return kc}var Hc={},Fy;function m2(){if(Fy)return Hc;Fy=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.setBlockTimestampInterval=e;async function e(r,{interval:n}){const t=r.mode==="hardhat"?n*1e3:n;await r.request({method:`${r.mode}_setBlockTimestampInterval`,params:[t]})}return Hc}var Fc={},Ny;function h2(){if(Ny)return Fc;Ny=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.setCode=e;async function e(r,{address:n,bytecode:t}){r.mode==="ganache"?await r.request({method:"evm_setAccountCode",params:[n,t]}):await r.request({method:`${r.mode}_setCode`,params:[n,t]})}return Fc}var Nc={},$y;function y2(){if($y)return Nc;$y=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.setCoinbase=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_setCoinbase`,params:[n]})}return Nc}var $c={},zy;function p2(){if(zy)return $c;zy=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.setIntervalMining=e;async function e(r,{interval:n}){const t=r.mode==="hardhat"?n*1e3:n;await r.request({method:"evm_setIntervalMining",params:[t]})}return $c}var zc={},Uy;function g2(){if(Uy)return zc;Uy=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.setLoggingEnabled=e;async function e(r,n){await r.request({method:`${r.mode}_setLoggingEnabled`,params:[n]})}return zc}var Uc={},Ly;
47function _2(){if(Ly)return Uc;Ly=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.setMinGasPrice=r;const e=oe();async function r(n,{gasPrice:t}){await n.request({method:`${n.mode}_setMinGasPrice`,params:[(0,e.numberToHex)(t)]})}return Uc}var Lc={},Dy;function v2(){if(Dy)return Lc;Dy=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.setNextBlockBaseFeePerGas=r;const e=oe();async function r(n,{baseFeePerGas:t}){await n.request({method:`${n.mode}_setNextBlockBaseFeePerGas`,params:[(0,e.numberToHex)(t)]})}return Lc}var Dc={},Gy;function E2(){if(Gy)return Dc;Gy=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.setNextBlockTimestamp=r;const e=oe();async function r(n,{timestamp:t}){await n.request({method:"evm_setNextBlockTimestamp",params:[(0,e.numberToHex)(t)]})}return Dc}var Gc={},Vy;function j2(){if(Vy)return Gc;Vy=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.setNonce=r;const e=oe();async function r(n,{address:t,nonce:o}){await n.request({method:`${n.mode}_setNonce`,params:[t,(0,e.numberToHex)(o)]})}return Gc}var Vc={},Wy;function w2(){if(Wy)return Vc;Wy=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.setRpcUrl=e;async function e(r,n){await r.request({method:`${r.mode}_setRpcUrl`,params:[n]})}return Vc}var Wc={},Ky;function P2(){if(Ky)return Wc;Ky=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.setStorageAt=r;const e=oe();async function r(n,{address:t,index:o,value:s}){await n.request({method:`${n.mode}_setStorageAt`,params:[t,typeof o=="number"?(0,e.numberToHex)(o):o,s]})}return Wc}var Kc={},Zy;function A2(){if(Zy)return Kc;Zy=1,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.snapshot=e;async function e(r){return await r.request({method:"evm_snapshot"})}return Kc}var Zc={},Jy;function T2(){if(Jy)return Zc;Jy=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.stopImpersonatingAccount=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_stopImpersonatingAccount`,params:[n]})}return Zc}var Yy;function I_(){if(Yy)return _c;Yy=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.testActions=x;const e=Y6(),r=X6(),n=Q6(),t=e2(),o=t2(),s=r2(),i=n2(),a=o2(),c=i2(),u=a2(),l=s2(),f=c2(),m=u2(),y=d2(),h=f2(),b=l2(),v=b2(),g=m2(),_=h2(),P=y2(),d=p2(),w=g2(),E=_2(),p=v2(),S=E2(),A=j2(),T=w2(),C=P2(),R=A2(),I=T2();function x({mode:F}){return H=>{const j=H.extend(()=>({mode:F}));return{dropTransaction:k=>(0,e.dropTransaction)(j,k),dumpState:()=>(0,r.dumpState)(j),getAutomine:()=>(0,n.getAutomine)(j),getTxpoolContent:()=>(0,t.getTxpoolContent)(j),getTxpoolStatus:()=>(0,o.getTxpoolStatus)(j),impersonateAccount:k=>(0,s.impersonateAccount)(j,k),increaseTime:k=>(0,i.increaseTime)(j,k),inspectTxpool:()=>(0,a.inspectTxpool)(j),loadState:k=>(0,c.loadState)(j,k),mine:k=>(0,u.mine)(j,k),removeBlockTimestampInterval:()=>(0,l.removeBlockTimestampInterval)(j),reset:k=>(0,f.reset)(j,k),revert:k=>(0,m.revert)(j,k),sendUnsignedTransaction:k=>(0,y.sendUnsignedTransaction)(j,k),setAutomine:k=>(0,h.setAutomine)(j,k),setBalance:k=>(0,b.setBalance)(j,k),setBlockGasLimit:k=>(0,v.setBlockGasLimit)(j,k),setBlockTimestampInterval:k=>(0,g.setBlockTimestampInterval)(j,k),setCode:k=>(0,_.setCode)(j,k),setCoinbase:k=>(0,P.setCoinbase)(j,k),setIntervalMining:k=>(0,d.setIntervalMining)(j,k),setLoggingEnabled:k=>(0,w.setLoggingEnabled)(j,k),setMinGasPrice:k=>(0,E.setMinGasPrice)(j,k),setNextBlockBaseFeePerGas:k=>(0,p.setNextBlockBaseFeePerGas)(j,k),setNextBlockTimestamp:k=>(0,S.setNextBlockTimestamp)(j,k),setNonce:k=>(0,A.setNonce)(j,k),setRpcUrl:k=>(0,T.setRpcUrl)(j,k),setStorageAt:k=>(0,C.setStorageAt)(j,k),snapshot:()=>(0,R.snapshot)(j),stopImpersonatingAccount:k=>(0,I.stopImpersonatingAccount)(j,k)}}}return _c}var Xy;function S2(){if(Xy)return gc;Xy=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.createTestClient=n;const e=td(),r=I_();function n(t){const{key:o="test",name:s="Test Client",mode:i}=t;return(0,e.createClient)({...t,key:o,name:s,type:"testClient"}).extend(c=>({mode:i,...(0,r.testActions)({mode:i})(c)}))}return gc}var Jc={},Yc={},Xc={},Qy;function I2(){if(Qy)return Xc;Qy=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.addChain=r;const e=oe();async function r(n,{chain:t}){const{id:o,name:s,nativeCurrency:i,rpcUrls:a,blockExplorers:c}=t;await n.request({method:"wallet_addEthereumChain",params:[{chainId:(0,e.numberToHex)(o),chainName:s,nativeCurrency:i,rpcUrls:a.default.http,blockExplorerUrls:c?Object.values(c).map(({url:u})=>u):void 0}]},{dedupe:!0,retryCount:0})}return Xc}var Qc={},ep;function R2(){if(ep)return Qc;ep=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.deployContract=n;const e=oi(),r=Qu();function n(t,o){const{abi:s,args:i,bytecode:a,...c}=o,u=(0,e.encodeDeployData)({abi:s,args:i,bytecode:a});return(0,r.sendTransaction)(t,{...c,...c.authorizationList?{to:null}:{},data:u})}return Qc}var eu={},tp;function B2(){if(tp)return eu;
47tp=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.getAddresses=r;const e=Je();async function r(n){var o;return((o=n.account)==null?void 0:o.type)==="local"?[n.account.address]:(await n.request({method:"eth_accounts"},{dedupe:!0})).map(s=>(0,e.checksumAddress)(s))}return eu}var tu={},rp;function O2(){if(rp)return tu;rp=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.getCapabilities=n;const e=Ie(),r=oe();async function n(t,o={}){const{account:s=t.account,chainId:i}=o,a=s?(0,e.parseAccount)(s):void 0,c=i?[a==null?void 0:a.address,[(0,r.numberToHex)(i)]]:[a==null?void 0:a.address],u=await t.request({method:"wallet_getCapabilities",params:c}),l={};for(const[f,m]of Object.entries(u)){l[Number(f)]={};for(let[y,h]of Object.entries(m))y==="addSubAccount"&&(y="unstable_addSubAccount"),l[Number(f)][y]=h}return typeof i=="number"?l[i]:l}return tu}var ru={},np;function C2(){if(np)return ru;np=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.getPermissions=e;async function e(r){return await r.request({method:"wallet_getPermissions"},{dedupe:!0})}return ru}var nu={},op;function R_(){if(op)return nu;op=1,Object.defineProperty(nu,"__esModule",{value:!0}),nu.prepareAuthorization=i;const e=Ie(),r=Pr(),n=gt(),t=me(),o=jr(),s=Du();async function i(a,c){var b;const{account:u=a.account,chainId:l,nonce:f}=c;if(!u)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const m=(0,e.parseAccount)(u),y=(()=>{if(c.executor)return c.executor==="self"?c.executor:(0,e.parseAccount)(c.executor)})(),h={address:c.contractAddress??c.address,chainId:l,nonce:f};return typeof h.chainId>"u"&&(h.chainId=((b=a.chain)==null?void 0:b.id)??await(0,t.getAction)(a,o.getChainId,"getChainId")({})),typeof h.nonce>"u"&&(h.nonce=await(0,t.getAction)(a,s.getTransactionCount,"getTransactionCount")({address:m.address,blockTag:"pending"}),(y==="self"||y!=null&&y.address&&(0,n.isAddressEqual)(y.address,m.address))&&(h.nonce+=1)),h}return nu}var ou={},ip;function x2(){if(ip)return ou;ip=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.requestAddresses=r;const e=Je();async function r(n){return(await n.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(o=>(0,e.getAddress)(o))}return ou}var iu={},ap;function q2(){if(ap)return iu;ap=1,Object.defineProperty(iu,"__esModule",{value:!0}),iu.requestPermissions=e;async function e(r,n){return r.request({method:"wallet_requestPermissions",params:[n]},{retryCount:0})}return iu}var au={},sp;function M2(){if(sp)return au;sp=1,Object.defineProperty(au,"__esModule",{value:!0}),au.sendCallsSync=t;const e=me(),r=Bf(),n=Of();async function t(o,s){const{chain:i=o.chain}=s,a=s.timeout??Math.max(((i==null?void 0:i.blockTime)??0)*3,5e3),c=await(0,e.getAction)(o,r.sendCalls,"sendCalls")(s);return await(0,e.getAction)(o,n.waitForCallsStatus,"waitForCallsStatus")({...s,id:c.id,timeout:a})}return au}var su={},cp;function B_(){if(cp)return su;cp=1,Object.defineProperty(su,"__esModule",{value:!0}),su.sendTransactionSync=_;const e=Ie(),r=Pr(),n=de(),t=nt(),o=Ko(),s=si(),i=qe(),a=Xo(),c=Er(),u=St(),l=me(),f=Wr(),m=It(),y=jr(),h=T_(),b=Qo(),v=el(),g=new f.LruMap(128);async function _(P,d){var G,J,W,V,Y,te;const{account:w=P.account,assertChainId:E=!0,chain:p=P.chain,accessList:S,authorizationList:A,blobs:T,data:C,dataSuffix:R=typeof P.dataSuffix=="string"?P.dataSuffix:(G=P.dataSuffix)==null?void 0:G.value,gas:I,gasPrice:x,maxFeePerBlobGas:F,maxFeePerGas:H,maxPriorityFeePerGas:j,nonce:k,pollingInterval:B,throwOnReceiptRevert:O,type:q,value:M,...N}=d,z=d.timeout??Math.max(((p==null?void 0:p.blockTime)??0)*3,5e3);if(typeof w>"u")throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});const $=w?(0,e.parseAccount)(w):null;let U;try{(0,m.assertRequest)(d);const Z=await(async()=>{if(d.to)return d.to;if(d.to!==null&&A&&A.length>0)return await(0,o.recoverAuthorizationAddress)({authorization:A[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if(($==null?void 0:$.type)==="json-rpc"||$===null){let X;p!==null&&(X=await(0,l.getAction)(P,y.getChainId,"getChainId")({}),E&&(0,s.assertCurrentChain)({currentChainId:X,chain:p}));const Q=(V=(W=(J=P.chain)==null?void 0:J.formatters)==null?void 0:W.transactionRequest)==null?void 0:V.format,re=(Q||u.formatTransactionRequest)({...(0,c.extract)(N,{format:Q}),accessList:S,account:$,authorizationList:A,blobs:T,chainId:X,data:R?(0,i.c
47oncat)([C??"0x",R]):C,gas:I,gasPrice:x,maxFeePerBlobGas:F,maxFeePerGas:H,maxPriorityFeePerGas:j,nonce:k,to:Z,type:q,value:M},"sendTransaction"),ae=g.get(P.uid),ce=ae?"wallet_sendTransaction":"eth_sendTransaction",he=await(async()=>{try{return await P.request({method:ce,params:[re]},{retryCount:0})}catch(K){if(ae===!1)throw K;const pe=K;if(pe.name==="InvalidInputRpcError"||pe.name==="InvalidParamsRpcError"||pe.name==="MethodNotFoundRpcError"||pe.name==="MethodNotSupportedRpcError")return await P.request({method:"wallet_sendTransaction",params:[re]},{retryCount:0}).then(Ce=>(g.set(P.uid,!0),Ce)).catch(Ce=>{const xe=Ce;throw xe.name==="MethodNotFoundRpcError"||xe.name==="MethodNotSupportedRpcError"?(g.set(P.uid,!1),pe):xe});throw pe}})(),ee=await(0,l.getAction)(P,h.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:he,pollingInterval:B,timeout:z});if(O&&ee.status==="reverted")throw new t.TransactionReceiptRevertedError({receipt:ee});return ee}if(($==null?void 0:$.type)==="local"){if($.nonceManager&&typeof k>"u"){const re=N.chainId,ae=await(async()=>typeof re=="number"?re:p?p.id:(0,l.getAction)(P,y.getChainId,"getChainId")({}))();U={address:$.address,chainId:ae}}const X=await(0,l.getAction)(P,b.prepareTransactionRequest,"prepareTransactionRequest")({account:$,accessList:S,authorizationList:A,blobs:T,chain:p,data:R?(0,i.concat)([C??"0x",R]):C,gas:I,gasPrice:x,maxFeePerBlobGas:F,maxFeePerGas:H,maxPriorityFeePerGas:j,nonce:k,nonceManager:$.nonceManager,parameters:[...b.defaultParameters,"sidecars"],type:q,value:M,...N,to:Z}),Q=(Y=p==null?void 0:p.serializers)==null?void 0:Y.transaction,ne=await $.signTransaction(X,{serializer:Q});return await(0,l.getAction)(P,v.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:ne,throwOnReceiptRevert:O,timeout:d.timeout})}throw($==null?void 0:$.type)==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:$==null?void 0:$.type})}catch(Z){throw Z instanceof r.AccountTypeNotSupportedError?Z:(U&&!(Z instanceof t.TransactionReceiptRevertedError)&&((te=$==null?void 0:$.nonceManager)==null||te.reset(U)),(0,a.getTransactionError)(Z,{...d,account:$,chain:d.chain||void 0}))}}return su}var cu={},up;function k2(){if(up)return cu;up=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.showCallsStatus=e;async function e(r,n){const{id:t}=n;await r.request({method:"wallet_showCallsStatus",params:[t]})}return cu}var uu={},dp;function H2(){if(dp)return uu;dp=1,Object.defineProperty(uu,"__esModule",{value:!0}),uu.signAuthorization=t;const e=Ie(),r=Pr(),n=R_();async function t(o,s){const{account:i=o.account}=s;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const a=(0,e.parseAccount)(i);if(!a.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:a.type});const c=await(0,n.prepareAuthorization)(o,s);return a.signAuthorization(c)}return uu}var du={},fp;function F2(){if(fp)return du;fp=1,Object.defineProperty(du,"__esModule",{value:!0}),du.signMessage=t;const e=Ie(),r=Pr(),n=oe();async function t(o,{account:s=o.account,message:i}){if(!s)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const a=(0,e.parseAccount)(s);if(a.signMessage)return a.signMessage({message:i});const c=typeof i=="string"?(0,n.stringToHex)(i):i.raw instanceof Uint8Array?(0,n.toHex)(i.raw):i.raw;return o.request({method:"personal_sign",params:[c,a.address]},{retryCount:0})}return du}var fu={},lp;function N2(){if(lp)return fu;lp=1,Object.defineProperty(fu,"__esModule",{value:!0}),fu.signTransaction=c;const e=Ie(),r=Pr(),n=si(),t=oe(),o=St(),s=me(),i=It(),a=jr();async function c(u,l){var _,P,d,w;const{account:f=u.account,chain:m=u.chain,...y}=l;if(!f)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const h=(0,e.parseAccount)(f);(0,i.assertRequest)({account:h,...l});const b=await(0,s.getAction)(u,a.getChainId,"getChainId")({});m!==null&&(0,n.assertCurrentChain)({currentChainId:b,chain:m});const v=(m==null?void 0:m.formatters)||((_=u.chain)==null?void 0:_.formatters),g=((P=v==null?void 0:v.transactionRequest)==null?void 0:P.format)||o.formatTransactionRequest;return h.signTransaction?h.signTransaction({...y,account:h,chainId:b}
47,{serializer:(w=(d=u.chain)==null?void 0:d.serializers)==null?void 0:w.transaction}):await u.request({method:"eth_signTransaction",params:[{...g({...y,account:h},"signTransaction"),chainId:(0,t.numberToHex)(b),from:h.address}]},{retryCount:0})}return fu}var lu={},bp;function $2(){if(bp)return lu;bp=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.signTypedData=t;const e=Ie(),r=Pr(),n=od();async function t(o,s){const{account:i=o.account,domain:a,message:c,primaryType:u}=s;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const l=(0,e.parseAccount)(i),f={EIP712Domain:(0,n.getTypesForEIP712Domain)({domain:a}),...s.types};if((0,n.validateTypedData)({domain:a,message:c,primaryType:u,types:f}),l.signTypedData)return l.signTypedData({domain:a,message:c,primaryType:u,types:f});const m=(0,n.serializeTypedData)({domain:a,message:c,primaryType:u,types:f});return o.request({method:"eth_signTypedData_v4",params:[l.address,m]},{retryCount:0})}return lu}var bu={},mp;function z2(){if(mp)return bu;mp=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.switchChain=r;const e=oe();async function r(n,{id:t}){await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,e.numberToHex)(t)}]},{retryCount:0})}return bu}var mu={},hp;function U2(){if(hp)return mu;hp=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.watchAsset=e;async function e(r,n){return await r.request({method:"wallet_watchAsset",params:n},{retryCount:0})}return mu}var hu={},yp;function L2(){if(yp)return hu;yp=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.writeContractSync=n;const e=B_(),r=Rf();async function n(t,o){return r.writeContract.internal(t,e.sendTransactionSync,"sendTransactionSync",o)}return hu}var pp;function O_(){if(pp)return Yc;pp=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.walletActions=R;const e=pf(),r=jr(),n=I2(),t=R2(),o=B2(),s=Og(),i=O2(),a=C2(),c=R_(),u=Qo(),l=x2(),f=q2(),m=Bf(),y=M2(),h=If(),b=el(),v=Qu(),g=B_(),_=k2(),P=H2(),d=F2(),w=N2(),E=$2(),p=z2(),S=Of(),A=U2(),T=Rf(),C=L2();function R(I){return{addChain:x=>(0,n.addChain)(I,x),deployContract:x=>(0,t.deployContract)(I,x),fillTransaction:x=>(0,e.fillTransaction)(I,x),getAddresses:()=>(0,o.getAddresses)(I),getCallsStatus:x=>(0,s.getCallsStatus)(I,x),getCapabilities:x=>(0,i.getCapabilities)(I,x),getChainId:()=>(0,r.getChainId)(I),getPermissions:()=>(0,a.getPermissions)(I),prepareAuthorization:x=>(0,c.prepareAuthorization)(I,x),prepareTransactionRequest:x=>(0,u.prepareTransactionRequest)(I,x),requestAddresses:()=>(0,l.requestAddresses)(I),requestPermissions:x=>(0,f.requestPermissions)(I,x),sendCalls:x=>(0,m.sendCalls)(I,x),sendCallsSync:x=>(0,y.sendCallsSync)(I,x),sendRawTransaction:x=>(0,h.sendRawTransaction)(I,x),sendRawTransactionSync:x=>(0,b.sendRawTransactionSync)(I,x),sendTransaction:x=>(0,v.sendTransaction)(I,x),sendTransactionSync:x=>(0,g.sendTransactionSync)(I,x),showCallsStatus:x=>(0,_.showCallsStatus)(I,x),signAuthorization:x=>(0,P.signAuthorization)(I,x),signMessage:x=>(0,d.signMessage)(I,x),signTransaction:x=>(0,w.signTransaction)(I,x),signTypedData:x=>(0,E.signTypedData)(I,x),switchChain:x=>(0,p.switchChain)(I,x),waitForCallsStatus:x=>(0,S.waitForCallsStatus)(I,x),watchAsset:x=>(0,A.watchAsset)(I,x),writeContract:x=>(0,T.writeContract)(I,x),writeContractSync:x=>(0,C.writeContractSync)(I,x)}}return Yc}var gp;function D2(){if(gp)return Jc;gp=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.createWalletClient=n;const e=td(),r=O_();function n(t){const{key:o="wallet",name:s="Wallet Client",transport:i}=t;return(0,e.createClient)({...t,key:o,name:s,transport:i,type:"walletClient"}).extend(r.walletActions)}return Jc}var yu={},_p;function li(){if(_p)return yu;_p=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.createTransport=n;const e=Lg(),r=Cg();function n({key:t,methods:o,name:s,request:i,retryCount:a=3,retryDelay:c=150,timeout:u,type:l},f){const m=(0,r.uid)();return{config:{key:t,methods:o,name:s,request:i,retryCount:a,retryDelay:c,timeout:u,type:l},request:(0,e.buildRequest)(i,{methods:o,retryCount:a,retryDelay:c,uid:m}),value:f}}return yu}var pu={},vp;function G2(){if(vp)return pu;
47vp=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.custom=r;const e=li();function r(n,t={}){const{key:o="custom",methods:s,name:i="Custom Provider",retryDelay:a}=t;return({retryCount:c})=>(0,e.createTransport)({key:o,methods:s,name:i,request:n.request.bind(n),retryCount:t.retryCount??c,retryDelay:a,type:"custom"})}return pu}var wn={},Ep;function V2(){if(Ep)return wn;Ep=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.fallback=o,wn.shouldThrow=s,wn.rankTransports=i;const e=rr(),r=gr(),n=Sf(),t=li();function o(a,c={}){const{key:u="fallback",name:l="Fallback",rank:f=!1,shouldThrow:m=s,retryCount:y,retryDelay:h}=c;return(({chain:b,pollingInterval:v=4e3,timeout:g,..._})=>{let P=a,d=()=>{};const w=(0,t.createTransport)({key:u,name:l,async request({method:E,params:p}){let S;const A=async(T=0)=>{const C=P[T]({..._,chain:b,retryCount:0,timeout:g});try{const R=await C.request({method:E,params:p});return d({method:E,params:p,response:R,transport:C,status:"success"}),R}catch(R){if(d({error:R,method:E,params:p,transport:C,status:"error"}),m(R)||T===P.length-1||(S??(S=P.slice(T+1).some(I=>{const{include:x,exclude:F}=I({chain:b}).config.methods||{};return x?x.includes(E):F?!F.includes(E):!0})),!S))throw R;return A(T+1)}};return A()},retryCount:y,retryDelay:h,type:"fallback"},{onResponse:E=>d=E,transports:P.map(E=>E({chain:b,retryCount:0}))});if(f){const E=typeof f=="object"?f:{};i({chain:b,interval:E.interval??v,onTransports:p=>P=p,ping:E.ping,sampleCount:E.sampleCount,timeout:E.timeout,transports:P,weights:E.weights})}return w})}function s(a){return!!("code"in a&&typeof a.code=="number"&&(a.code===r.TransactionRejectedRpcError.code||a.code===r.UserRejectedRequestError.code||a.code===r.WalletConnectSessionSettlementError.code||e.ExecutionRevertedError.nodeMessage.test(a.message)||a.code===5e3))}function i({chain:a,interval:c=4e3,onTransports:u,ping:l,sampleCount:f=10,timeout:m=1e3,transports:y,weights:h={}}){const{stability:b=.7,latency:v=.3}=h,g=[],_=async()=>{const P=await Promise.all(y.map(async E=>{const p=E({chain:a,retryCount:0,timeout:m}),S=Date.now();let A,T;try{await(l?l({transport:p}):p.request({method:"net_listening"})),T=1}catch{T=0}finally{A=Date.now()}return{latency:A-S,success:T}}));g.push(P),g.length>f&&g.shift();const d=Math.max(...g.map(E=>Math.max(...E.map(({latency:p})=>p)))),w=y.map((E,p)=>{const S=g.map(I=>I[p].latency),T=1-S.reduce((I,x)=>I+x,0)/S.length/d,C=g.map(I=>I[p].success),R=C.reduce((I,x)=>I+x,0)/C.length;return R===0?[0,p]:[v*T+b*R,p]}).sort((E,p)=>p[0]-E[0]);u(w.map(([,E])=>y[E])),await(0,n.wait)(c),_()};_()}return wn}var gu={},No={},jp;function tl(){if(jp)return No;jp=1,Object.defineProperty(No,"__esModule",{value:!0}),No.UrlRequiredError=void 0;const e=de();class r extends e.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}return No.UrlRequiredError=r,No}var wp;function W2(){if(wp)return gu;wp=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.http=c;const e=pt(),r=tl(),n=wf(),t=Uf(),o=li();let s=0;const i=new WeakMap;function a(u){if(!u)return"default";const l=i.get(u);if(l!==void 0)return l;const f=s++;return i.set(u,f),f}function c(u,l={}){const{batch:f,fetchFn:m,fetchOptions:y,key:h="http",methods:b,name:v="HTTP JSON-RPC",onFetchRequest:g,onFetchResponse:_,retryDelay:P,raw:d}=l;return({chain:w,retryCount:E,timeout:p})=>{const{batchSize:S=1e3,wait:A=0}=typeof f=="object"?f:{},T=l.retryCount??E,C=p??l.timeout??1e4,R=u||(w==null?void 0:w.rpcUrls.default.http[0]);if(!R)throw new r.UrlRequiredError;const I=(0,t.getHttpRpcClient)(R,{fetchFn:m,fetchOptions:y,onRequest:g,onResponse:_,timeout:C});return(0,o.createTransport)({key:h,methods:b,name:v,async request({method:x,params:F},H){const j={method:x,params:F},k=H!=null&&H.signal?{signal:H.signal}:void 0,{schedule:B}=(0,n.createBatchScheduler)({id:`${R}.${a(H==null?void 0:H.signal)}`,wait:A,shouldSplitBatch(N){return N.length>S},fn:N=>I.request({body:N,fetchOptions:k}),sort:(N,z)=>N.id-z.id}),O=async N=>f?B(N):[await I.request({body:N,fetchOptions:k})],[{error:q,result:M}]=await O(j);if(d)return{error:q,result:M};if(q)throw new e.RpcRequestError({body:j,error:q,url:R});return M},retryCount:T,retryDelay:P,timeout:C,type:"http"},{fetchOptions:y,url:R})}}return gu}var _u={},Pp;function K2(){if(Pp)return _u;
47Pp=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.webSocket=s;const e=pt(),r=tl(),n=r_(),t=Lf(),o=li();function s(i,a={}){const{keepAlive:c,key:u="webSocket",methods:l,name:f="WebSocket JSON-RPC",reconnect:m,retryDelay:y}=a;return({chain:h,retryCount:b,timeout:v})=>{var w;const g=a.retryCount??b,_=v??a.timeout??1e4,P=i||((w=h==null?void 0:h.rpcUrls.default.webSocket)==null?void 0:w[0]),d={keepAlive:c,reconnect:m};if(!P)throw new r.UrlRequiredError;return(0,o.createTransport)({key:u,methods:l,name:f,async request({method:E,params:p}){const S={method:E,params:p},A=await(0,t.getWebSocketRpcClient)(P,d),{error:T,result:C}=await A.requestAsync({body:S,timeout:_});if(T)throw new e.RpcRequestError({body:S,error:T,url:P});return C},retryCount:g,retryDelay:y,timeout:_,type:"webSocket"},{getSocket(){return(0,n.getSocket)(P)},getRpcClient(){return(0,t.getWebSocketRpcClient)(P,d)},async subscribe({params:E,onData:p,onError:S}){const A=await(0,t.getWebSocketRpcClient)(P,d),{result:T}=await new Promise((C,R)=>A.request({body:{method:"eth_subscribe",params:E}
47,onError(I){R(I),S==null||S(I)},onResponse(I){if(I.error){R(I.error),S==null||S(I.error);return}if(typeof I.id=="number"){C(I);return}I.method==="eth_subscription"&&p(I.params)}}));return{subscriptionId:T,async unsubscribe(){return new Promise(C=>A.request({body:{method:"eth_unsubscribe",params:[T]},onResponse:C}))}}}})}}return _u}var $o={},Ap;function Z2(){if(Ap)return $o;Ap=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.ProviderRpcError=void 0;class e extends Error{constructor(n,t){super(t),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n,this.details=t}}return $o.ProviderRpcError=e,$o}var vu={},Tp;function J2(){if(Tp)return vu;Tp=1,Object.defineProperty(vu,"__esModule",{value:!0}),vu.decodeDeployData=t;const e=Se(),r=yr(),n="/docs/contract/decodeDeployData";function t(o){const{abi:s,bytecode:i,data:a}=o;if(a===i)return{bytecode:i};const c=s.find(l=>"type"in l&&l.type==="constructor");if(!c)throw new e.AbiConstructorNotFoundError({docsPath:n});if(!("inputs"in c))throw new e.AbiConstructorParamsNotFoundError({docsPath:n});if(!c.inputs||c.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:n});return{args:(0,r.decodeAbiParameters)(c.inputs,`0x${a.replace(i,"")}`),bytecode:i}}return vu}var Eu={},Sp;function Y2(){if(Sp)return Eu;Sp=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.fromBlobs=t;const e=Lo(),r=Ee(),n=oe();function t(o){const s=o.to??(typeof o.blobs[0]=="string"?"hex":"bytes"),i=typeof o.blobs[0]=="string"?o.blobs.map(f=>(0,r.hexToBytes)(f)):o.blobs,a=i.reduce((f,m)=>f+m.length,0),c=(0,e.createCursor)(new Uint8Array(a));let u=!0;for(const f of i){const m=(0,e.createCursor)(f);for(;u&&m.position<f.length;){m.incrementPosition(1);let y=31;f.length-m.position<31&&(y=f.length-m.position);for(const h in Array.from({length:y})){const b=m.readByte();if(b===128&&!m.inspectBytes(m.remaining).includes(128)){u=!1;break}c.pushByte(b)}}}const l=c.bytes.slice(0,c.position);return s==="hex"?(0,n.bytesToHex)(l):l}return Eu}var ju={},Ip;function X2(){if(Ip)return ju;Ip=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.sidecarsToVersionedHashes=r;const e=hf();function r(n){const{sidecars:t,version:o}=n,s=n.to??(typeof t[0].blob=="string"?"hex":"bytes"),i=[];for(const{commitment:a}of t)i.push((0,e.commitmentToVersionedHash)({commitment:a,to:s,version:o}));return i}return ju}var wu={},Rp;function Q2(){if(Rp)return wu;Rp=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.toCoinType=n;const e=Mf(),r=2147483648;function n(t){if(t===1)return 60n;if(t>=r||t<0)throw new e.EnsInvalidChainIdError({chainId:t});return BigInt((2147483648|t)>>>0)}return wu}var Pu={},Bp;function C_(){if(Bp)return Pu;Bp=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.defineKzg=e;function e({blobToKzgCommitment:r,computeBlobKzgProof:n}){return{blobToKzgCommitment:r,computeBlobKzgProof:n}}return Pu}var Au={},Op;function e5(){if(Op)return Au;Op=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.setupKzg=r;const e=C_();function r(n,t){try{n.loadTrustedSetup(t)}catch(o){const s=o;if(!s.message.includes("trusted setup is already loaded"))throw s}return(0,e.defineKzg)(n)}return Au}var Tu={},Cp;function t5(){if(Cp)return Tu;Cp=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.compactSignatureToSignature=n;const e=Ee(),r=oe();function n({r:t,yParityAndS:o}){const s=(0,e.hexToBytes)(o),i=s[0]&128?1:0,a=s;return i===1&&(a[0]&=127),{r:t,s:(0,r.bytesToHex)(a),yParity:i}}return Tu}var Su={},xp;function r5(){if(xp)return Su;xp=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.parseCompactSignature=n;const e=Xr(),r=oe();function n(t){const{r:o,s}=e.secp256k1.Signature.fromCompact(t.slice(2,130));return{r:(0,r.numberToHex)(o,{size:32}),yParityAndS:(0,r.numberToHex)(s,{size:32})}}return Su}var Iu={},qp;function n5(){if(qp)return Iu;qp=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.parseSignature=n;const e=Xr(),r=oe();function n(t){const{r:o,s}=e.secp256k1.Signature.fromCompact(t.slice(2,130)),i=+`0x${t.slice(130)}`,[a,c]=(()=>
47{if(i===0||i===1)return[void 0,i];if(i===27)return[BigInt(i),0];if(i===28)return[BigInt(i),1];throw new Error("Invalid yParityOrV value")})();return typeof a<"u"?{r:(0,r.numberToHex)(o,{size:32}),s:(0,r.numberToHex)(s,{size:32}),v:a,yParity:c}:{r:(0,r.numberToHex)(o,{size:32}),s:(0,r.numberToHex)(s,{size:32}),yParity:c}}return Iu}var Ru={},Mp;function o5(){if(Mp)return Ru;Mp=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.recoverTransactionAddress=o;const e=tt(),r=Xf(),n=nd(),t=vr();async function o(s){const{serializedTransaction:i,signature:a}=s,c=(0,r.parseTransaction)(i),u=a??{r:c.r,s:c.s,v:c.v,yParity:c.yParity},l=(0,n.serializeTransaction)({...c,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await(0,t.recoverAddress)({hash:(0,e.keccak256)(l),signature:u})}return Ru}var Bu={},kp;function i5(){if(kp)return Bu;kp=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.serializeCompactSignature=n;const e=Xr(),r=Be();function n({r:t,yParityAndS:o}){return`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(t),(0,r.hexToBigInt)(o)).toCompactHex()}`}return Bu}var Ou={},Hp;function a5(){if(Hp)return Ou;Hp=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.signatureToCompactSignature=n;const e=Ee(),r=oe();function n(t){const{r:o,s,v:i,yParity:a}=t,c=Number(a??i-27n);let u=s;if(c===1){const l=(0,e.hexToBytes)(s);l[0]|=128,u=(0,r.bytesToHex)(l)}return{r:o,yParityAndS:u}}return Ou}var Fp;function s5(){return Fp||(Fp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxInt8=e.universalSignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode=e.deploylessCallViaFactoryBytecode=e.deploylessCallViaBytecodeBytecode=e.zeroHash=e.zeroAddress=e.ethAddress=e.multicall3Abi=e.universalSignatureValidatorAbi=e.erc6492SignatureValidatorAbi=e.erc4626Abi=e.erc1155Abi=e.erc721Abi=e.erc20Abi_bytes32=e.erc20Abi=e.webSocket=e.http=e.shouldThrow=e.fallback=e.custom=e.createTransport=e.walletActions=e.testActions=e.publicActions=e.createWalletClient=e.createTestClient=e.createPublicClient=e.rpcSchema=e.createClient=e.WaitForCallsStatusTimeoutError=e.getContract=e.UnknownTypeError=e.UnknownSignatureError=e.SolidityProtectedKeywordError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.InvalidStructSignatureError=e.InvalidSignatureError=e.InvalidParenthesisError=e.InvalidParameterError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.InvalidAbiParametersError=e.InvalidAbiParameterError=e.InvalidAbiItemError=e.CircularReferenceError=void 0,e.maxUint152=e.maxUint144=e.maxUint136=e.maxUint128=e.maxUint120=e.maxUint112=e.maxUint104=e.maxUint96=e.maxUint88=e.maxUint80=e.maxUint72=e.maxUint64=e.maxUint56=e.maxUint48=e.maxUint40=e.maxUint32=e.maxUint24=e.maxUint16=e.maxUint8=e.maxInt256=e.maxInt248=e.maxInt240=e.maxInt232=e.maxInt224=e.maxInt216=e.maxInt208=e.maxInt200=e.maxInt192=e.maxInt184=e.maxInt176=e.maxInt168=e.maxInt160=e.maxInt152=e.maxInt144=e.maxInt136=e.maxInt128=e.maxInt120=e.maxInt112=e.maxInt104=e.maxInt96=e.maxInt88=e.maxInt80=e.maxInt72=e.maxInt64=e.maxInt56=e.maxInt48=e.maxInt40=e.maxInt32=e.maxInt24=e.maxInt16=void 0,e.AbiConstructorNotFoundError=e.weiUnits=e.gweiUnits=e.etherUnits=e.presignMessagePrefix=e.minInt256=e.minInt248=e.minInt240=e.minInt232=e.minInt224=e.minInt216=e.minInt208=e.minInt200=e.minInt192=e.minInt184=e.minInt176=e.minInt168=e.minInt160=e.minInt152=e.minInt144=e.minInt136=e.minInt128=e.minInt120=e.minInt112=e.minInt104=e.minInt96=e.minInt88=e.minInt80=e.minInt72=e.minInt64=e.minInt56=e.minInt48=e.minInt40=e.minInt32=e.minInt24=e.minInt16=e.minInt8=e.maxUint256=e.maxUint248=e.maxUint240=e.maxUint232=e.maxUint224=e.maxUint216=e.maxUint208=e.maxUint200=e.maxUint192=e.maxUint184=e.maxUint176=e.maxUint168=e.maxUint160=void 0,e.EnsAvatarUriResolutionError=e.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarInvalidNftUriError=e.SizeOverflowError=e.InvalidHexValueError=e.InvalidHexBooleanError=e.InvalidBytesBooleanError=e.IntegerOutOfRangeError=e.SliceOffsetOutOfBoundsError=e.SizeExceedsPaddingSizeError=e.RawContractError=e.CounterfactualDeploymentFailedError=e.ContractFunctionZeroDataError=e.ContractFunctionRevertedError=e.ContractFunctionExecutionError=e.CallExecutionError=e.InvalidChainIdError=e.ClientChainNotConfiguredError=e.ChainNotFoundError=e.ChainMismatchError=e.ChainDoesNotSupportContract=e.BundleFailedError=e.BlockNotFoundError=e.setErrorConfig=e.BaseError=e.InvalidAddressError=e.UnsupportedPackedAbiType=e.InvalidDefinitionTypeError=e.InvalidArrayError=e.InvalidAbiEncodingTypeError=e.InvalidAbiDecodingTypeError=e.DecodeLogTopicsMismatch=e.DecodeLogDataMismatch=e.BytesSizeMismatchError=e.AbiFunctionSignatureNotFoundError=e.AbiFunctionOutputsNotFoundError=e.AbiFunctionNotFoundError=e.AbiEventSignatureNotFoundError=e.AbiEventSignatureEmptyTopicsError=e.AbiEventNotFoundError=e.AbiErrorSignatureNotFoundError=e.AbiErrorNotFoundError=e.AbiErrorInputsNotFoundError=e.AbiEncodingLengthMismatchError=e.AbiEncodingBytesSizeMismatchError=e.AbiEncodingArrayLe
47ngthMismatchError=e.AbiDecodingZeroDataError=e.AbiDecodingDataSizeTooSmallError=e.AbiDecodingDataSizeInvalidError=e.AbiConstructorParamsNotFoundError=void 0,e.UnsupportedProviderMethodError=e.UnsupportedNonOptionalCapabilityError=e.UnsupportedChainIdError=e.UnknownRpcError=e.UnknownBundleIdError=e.UnauthorizedProviderError=e.TransactionRejectedRpcError=e.SwitchChainError=e.RpcError=e.ResourceUnavailableRpcError=e.ResourceNotFoundRpcError=e.ProviderRpcError=e.ProviderDisconnectedError=e.ParseRpcError=e.MethodNotSupportedRpcError=e.MethodNotFoundRpcError=e.LimitExceededRpcError=e.JsonRpcVersionUnsupportedError=e.InvalidRequestRpcError=e.InvalidParamsRpcError=e.InvalidInputRpcError=e.InternalRpcError=e.DuplicateIdError=e.ChainDisconnectedError=e.BundleTooLargeError=e.AtomicReadyWalletRejectedUpgradeError=e.AtomicityNotSupportedError=e.WebSocketRequestError=e.TimeoutError=e.SocketClosedError=e.RpcRequestError=e.HttpRequestError=e.UnknownNodeError=e.TransactionTypeNotSupportedError=e.TipAboveFeeCapError=e.NonceTooLowError=e.NonceTooHighError=e.NonceMaxValueError=e.IntrinsicGasTooLowError=e.IntrinsicGasTooHighError=e.InsufficientFundsError=e.FeeCapTooLowError=e.FeeCapTooHighError=e.ExecutionRevertedError=e.FilterTypeNotSupportedError=e.MaxFeePerGasTooLowError=e.Eip1559FeesNotSupportedError=e.BaseFeeScalarError=e.EstimateGasExecutionError=e.EnsInvalidChainIdError=void 0,e.toBlobs=e.toBlobSidecars=e.sidecarsToVersionedHashes=e.fromBlobs=e.commitmentToVersionedHash=e.commitmentsToVersionedHashes=e.blobsToProofs=e.blobsToCommitments=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.checksumAddress=e.prepareEncodeFunctionData=e.parseEventLogs=e.getAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeDeployData=e.decodeAbiParameters=e.EIP1193ProviderRpcError=e.InvalidDecimalNumberError=e.InvalidStructTypeError=e.InvalidPrimaryTypeError=e.InvalidDomainError=e.UrlRequiredError=e.WaitForTransactionReceiptTimeoutError=e.TransactionReceiptNotFoundError=e.TransactionNotFoundError=e.TransactionExecutionError=e.InvalidStorageKeySizeError=e.InvalidSerializedTransactionTypeError=e.InvalidSerializedTransactionError=e.InvalidSerializableTransactionError=e.InvalidLegacyVError=e.FeeConflictError=e.StateAssignmentConflictError=e.AccountStateConflictError=e.UserRejectedRequestError=void 0,e.namehash=e.labelhash=e.toRlp=e.hexToRlp=e.bytesToRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.extendSchema=e.defineChain=e.assertCurrentChain=e.ccipReadTunnel=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=void 0,e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseSignature=e.hexToSignature=e.parseErc8010Signature=e.parseErc6492Signature=e.parseCompactSignature=e.hexToCompactSignature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashDomain=e.hashMessage=e.compactSignatureToSignature=e.withTimeout=e.withRetry=e.withCache=e.nonceManager=e.createNonceManager=e.setupKzg=e.defineKzg=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=e.ripemd160=e.keccak256=e.isHash=e.rpcTransactionType=e.formatTransactionRequest=e.defineTransactionRequest=e.formatTransactionReceipt=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.formatBlock=e.defineBlock=e.getContractError=e.toCoinType=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=e.validateTypedData=e.serializeTypedData=e.getTypesForEIP712Domain=e.domainSeparator=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.toPrefixedMessage=e.signatureToCompactSignature=e.serializeSignature=e.signatureToHex=e.serializeErc8010Signature=e.serializeErc6492Signature=e.serializeCompactSignature=e.compactSignatureToHex=e.recoverTypedDataAddress=e.recoverTransactionAddress=void 0;var r=br();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return r.CircularReferenceError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return r.InvalidAbiItemError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return r.InvalidAbiParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return r.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return r.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return r.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return r.InvalidModifierError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return r.InvalidParameterError}}),Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return r.InvalidParenthesisError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return r.InvalidSignatureError}}),Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return r.InvalidStructSignatureError}}),Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return r.SolidityProtectedKeywordError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return r.UnknownSignatureError}}),Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return r.UnknownTypeError}});var n=r6();Object.defineProperty(e,"getContract",{enumerable:!0,get:function(){return n.getContract}});var t=Of();Object.defineProperty(e,"WaitForCallsStatusTimeoutError",{enumerable:!0,get:function(){return t.WaitForCallsStatusTimeoutError}});var o=td();Object.defineProperty(e,"createClient",{enumerable:!0,get:function(){return o.createClient}}),Object.defineProperty(e,"rpcSchema",{enumerable:!0,get:function(){return o.rpcSchema}});var s=J6();Object.defineProperty(e,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var i=S2();Object.defineProperty(e,"createTestClient",{enumerable:!0,get:function(){return i.createTestClient}});var a=D2();Object.defineProperty(e,"createWalletClient",{enumerable:!0,get:function(){return a.createWalletClient}});var c=S_();Object.defineProperty(e,"publicActions",{enumerable:!0,get:function(){return c.publicActions}});var u=I_();Object.defineProperty(e,"testActions",{enumerable:!0,get:function(){return u.testActions}});var l=O_();Object.defineProperty(e,"walletActions",{enumerable:!0,get:function(){return l.walletActions}});var f=li();Object.defineProperty(e,"createTransport",{enumerable:!0,get:function(){return f.createTransport}});var m=G2();Object.defineProperty(e,"custom",{enumerable:!0,get:function(){return m.custom}});var y=V2();Object.defineProperty(e,"fallback",{enumerable:!0,get:function(){return y.fallback}}),Object.defineProperty(e,"shouldThrow",{enumerable:!0,get:function(){return y.shouldThrow}});var h=W2();Object.defineProperty(e,"http",{enumerable:!0,get:function(){return h.http}});var b=K2();Object.defineProperty(e,"webSocket",{enumerable:!0,get:function(){return b.webSocket}});var v=kt();Object.defineProperty(e,"erc20Abi",{enumerable:!0,get:function(){return v.erc20Abi}}),Object.defineProperty(e,"erc20Abi_bytes32",{enumerable:!0,get:function(){return v.erc20Abi_bytes32}}
47),Object.defineProperty(e,"erc721Abi",{enumerable:!0,get:function(){return v.erc721Abi}}),Object.defineProperty(e,"erc1155Abi",{enumerable:!0,get:function(){return v.erc1155Abi}}),Object.defineProperty(e,"erc4626Abi",{enumerable:!0,get:function(){return v.erc4626Abi}}),Object.defineProperty(e,"erc6492SignatureValidatorAbi",{enumerable:!0,get:function(){return v.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"universalSignatureValidatorAbi",{enumerable:!0,get:function(){return v.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"multicall3Abi",{enumerable:!0,get:function(){return v.multicall3Abi}});var g=w_();Object.defineProperty(e,"ethAddress",{enumerable:!0,get:function(){return g.ethAddress}}),Object.defineProperty(e,"zeroAddress",{enumerable:!0,get:function(){return g.zeroAddress}});var _=Df();Object.defineProperty(e,"zeroHash",{enumerable:!0,get:function(){return _.zeroHash}});var P=ri();Object.defineProperty(e,"deploylessCallViaBytecodeBytecode",{enumerable:!0,get:function(){return P.deploylessCallViaBytecodeBytecode}}),Object.defineProperty(e,"deploylessCallViaFactoryBytecode",{enumerable:!0,get:function(){return P.deploylessCallViaFactoryBytecode}}),Object.defineProperty(e,"erc6492SignatureValidatorByteCode",{enumerable:!0,get:function(){return P.erc6492SignatureValidatorByteCode}}),Object.defineProperty(e,"universalSignatureValidatorByteCode",{enumerable:!0,get:function(){return P.erc6492SignatureValidatorByteCode}});var d=ff();Object.defineProperty(e,"maxInt8",{enumerable:!0,get:function(){return d.maxInt8}}),Object.defineProperty(e,"maxInt16",{enumerable:!0,get:function(){return d.maxInt16}}),Object.defineProperty(e,"maxInt24",{enumerable:!0,get:function(){return d.maxInt24}}),Object.defineProperty(e,"maxInt32",{enumerable:!0,get:function(){return d.maxInt32}}),Object.defineProperty(e,"maxInt40",{enumerable:!0,get:function(){return d.maxInt40}}),Object.defineProperty(e,"maxInt48",{enumerable:!0,get:function(){return d.maxInt48}}),Object.defineProperty(e,"maxInt56",{enumerable:!0,get:function(){return d.maxInt56}}),Object.defineProperty(e,"maxInt64",{enumerable:!0,get:function(){return d.maxInt64}}),Object.defineProperty(e,"maxInt72",{enumerable:!0,get:function(){return d.maxInt72}}),Object.defineProperty(e,"maxInt80",{enumerable:!0,get:function(){return d.maxInt80}}),Object.defineProperty(e,"maxInt88",{enumerable:!0,get:function(){return d.maxInt88}}),Object.defineProperty(e,"maxInt96",{enumerable:!0,get:function(){return d.maxInt96}}),Object.defineProperty(e,"maxInt104",{enumerable:!0,get:function(){return d.maxInt104}}),Object.defineProperty(e,"maxInt112",{enumerable:!0,get:function(){return d.maxInt112}}),Object.defineProperty(e,"maxInt120",{enumerable:!0,get:function(){return d.maxInt120}}),Object.defineProperty(e,"maxInt128",{enumerable:!0,get:function(){return d.maxInt128}}),Object.defineProperty(e,"maxInt136",{enumerable:!0,get:function(){return d.maxInt136}}),Object.defineProperty(e,"maxInt144",{enumerable:!0,get:function(){return d.maxInt144}}),Object.defineProperty(e,"maxInt152",{enumerable:!0,get:function(){return d.maxInt152}}),Object.defineProperty(e,"maxInt160",{enumerable:!0,get:function(){return d.maxInt160}}),Object.defineProperty(e,"maxInt168",{enumerable:!0,get:function(){return d.maxInt168}}),Object.defineProperty(e,"maxInt176",{enumerable:!0,get:function(){return d.maxInt176}}),Object.defineProperty(e,"maxInt184",{enumerable:!0,get:function(){return d.maxInt184}}),Object.defineProperty(e,"maxInt192",{enumerable:!0,get:function(){return d.maxInt192}}),Object.defineProperty(e,"maxInt200",{enumerable:!0,get:function(){return d.maxInt200}}),Object.defineProperty(e,"maxInt208",{enumerable:!0,get:function(){return d.maxInt208}}),Object.defineProperty(e,"maxInt216",{enumerable:!0,get:function(){return d.maxInt216}}),Object.defineProperty(e,"maxInt224",{enumerable:!0,get:function(){return d.maxInt224}}),Object.defineProperty(e,"maxInt232",{enumerable:!0,get:function(){return d.maxInt232}}),Object.defineProperty(e,"maxInt240",{enumerable:!0,get:function(){return d.maxInt240}}),Object.defineProperty(e,"maxInt248",{enumerable:!0,get:function(){return d.maxInt248}}),Object.defineProperty(e,"maxInt256",{enumerable:!0,get:function(){return d.maxInt256}}),Object.defineProperty(e,"maxUint8",{enumerable:!0,get:function(){return d.maxUint8}}),Object.defineProperty(e,"maxUint16",{enumerable:!0,get:function(){return d.maxUint16}}),Object.defineProperty(e,"maxUint24",{enumerable:!0,get:function(){return d.maxUint24}}
47),Object.defineProperty(e,"maxUint32",{enumerable:!0,get:function(){return d.maxUint32}}),Object.defineProperty(e,"maxUint40",{enumerable:!0,get:function(){return d.maxUint40}}),Object.defineProperty(e,"maxUint48",{enumerable:!0,get:function(){return d.maxUint48}}),Object.defineProperty(e,"maxUint56",{enumerable:!0,get:function(){return d.maxUint56}}),Object.defineProperty(e,"maxUint64",{enumerable:!0,get:function(){return d.maxUint64}}),Object.defineProperty(e,"maxUint72",{enumerable:!0,get:function(){return d.maxUint72}}),Object.defineProperty(e,"maxUint80",{enumerable:!0,get:function(){return d.maxUint80}}),Object.defineProperty(e,"maxUint88",{enumerable:!0,get:function(){return d.maxUint88}}),Object.defineProperty(e,"maxUint96",{enumerable:!0,get:function(){return d.maxUint96}}),Object.defineProperty(e,"maxUint104",{enumerable:!0,get:function(){return d.maxUint104}}),Object.defineProperty(e,"maxUint112",{enumerable:!0,get:function(){return d.maxUint112}}),Object.defineProperty(e,"maxUint120",{enumerable:!0,get:function(){return d.maxUint120}}),Object.defineProperty(e,"maxUint128",{enumerable:!0,get:function(){return d.maxUint128}}),Object.defineProperty(e,"maxUint136",{enumerable:!0,get:function(){return d.maxUint136}}),Object.defineProperty(e,"maxUint144",{enumerable:!0,get:function(){return d.maxUint144}}),Object.defineProperty(e,"maxUint152",{enumerable:!0,get:function(){return d.maxUint152}}),Object.defineProperty(e,"maxUint160",{enumerable:!0,get:function(){return d.maxUint160}}),Object.defineProperty(e,"maxUint168",{enumerable:!0,get:function(){return d.maxUint168}}),Object.defineProperty(e,"maxUint176",{enumerable:!0,get:function(){return d.maxUint176}}),Object.defineProperty(e,"maxUint184",{enumerable:!0,get:function(){return d.maxUint184}}),Object.defineProperty(e,"maxUint192",{enumerable:!0,get:function(){return d.maxUint192}}),Object.defineProperty(e,"maxUint200",{enumerable:!0,get:function(){return d.maxUint200}}),Object.defineProperty(e,"maxUint208",{enumerable:!0,get:function(){return d.maxUint208}}),Object.defineProperty(e,"maxUint216",{enumerable:!0,get:function(){return d.maxUint216}}),Object.defineProperty(e,"maxUint224",{enumerable:!0,get:function(){return d.maxUint224}}),Object.defineProperty(e,"maxUint232",{enumerable:!0,get:function(){return d.maxUint232}}),Object.defineProperty(e,"maxUint240",{enumerable:!0,get:function(){return d.maxUint240}}),Object.defineProperty(e,"maxUint248",{enumerable:!0,get:function(){return d.maxUint248}}),Object.defineProperty(e,"maxUint256",{enumerable:!0,get:function(){return d.maxUint256}}),Object.defineProperty(e,"minInt8",{enumerable:!0,get:function(){return d.minInt8}}),Object.defineProperty(e,"minInt16",{enumerable:!0,get:function(){return d.minInt16}}),Object.defineProperty(e,"minInt24",{enumerable:!0,get:function(){return d.minInt24}}),Object.defineProperty(e,"minInt32",{enumerable:!0,get:function(){return d.minInt32}}),Object.defineProperty(e,"minInt40",{enumerable:!0,get:function(){return d.minInt40}}),Object.defineProperty(e,"minInt48",{enumerable:!0,get:function(){return d.minInt48}}),Object.defineProperty(e,"minInt56",{enumerable:!0,get:function(){return d.minInt56}}),Object.defineProperty(e,"minInt64",{enumerable:!0,get:function(){return d.minInt64}}),Object.defineProperty(e,"minInt72",{enumerable:!0,get:function(){return d.minInt72}}),Object.defineProperty(e,"minInt80",{enumerable:!0,get:function(){return d.minInt80}}),Object.defineProperty(e,"minInt88",{enumerable:!0,get:function(){return d.minInt88}}),Object.defineProperty(e,"minInt96",{enumerable:!0,get:function(){return d.minInt96}}),Object.defineProperty(e,"minInt104",{enumerable:!0,get:function(){return d.minInt104}}),Object.defineProperty(e,"minInt112",{enumerable:!0,get:function(){return d.minInt112}}),Object.defineProperty(e,"minInt120",{enumerable:!0,get:function(){return d.minInt120}}),Object.defineProperty(e,"minInt128",{enumerable:!0,get:function(){return d.minInt128}}),Object.defineProperty(e,"minInt136",{enumerable:!0,get:function(){return d.minInt136}}),Object.defineProperty(e,"minInt144",{enumerable:!0,get:function(){return d.minInt144}}),Object.defineProperty(e,"minInt152",{enumerable:!0,get:function(){return d.minInt152}}),Object.defineProperty(e,"minInt160",{enumerable:!0,get:function(){return d.minInt160}}),Object.defineProperty(e,"minInt168",{enumerable:!0,get:function(){return d.minInt168}}),Object.defineProperty(e,"minInt176",{enumerable:!0,get:function(){return d.minInt176}}),Object.defineProperty(e,"minInt184",{enumerable:!0,get:function(){return d.minInt184}}),Object.defineProperty(e,"minInt192",{enumerable:!0,get:function(){return d.minInt192}}),Object.defineProperty(e,"minInt200",{enumerable:!0,get:function(){return d.minInt200}}),Object.defineProperty(e,"minInt208",{enumerable:!0,get:function(){return d.minInt208}}),Object.defineProperty(e,"minInt216",{enumerable:!0,get:function(){return d.minInt216}}),Object.defineProperty(e,"minInt224",{enumerable:!0,get:function(){return d.minInt224}}),Object.defineProperty(e,"minInt232",{enumerable:!0,get:function(){return d.minInt232}}),Object.defineProperty(e,"minInt240",{enumerable:!0,get:function(){return d.minInt240}}),Object.defineProperty(e,"minInt248",{enumerable:!0,get:function(){return d.minInt248}}),Object.defineProperty(e,"minInt256",{enumerable:!0,get:function(){return d.minInt256}});var w=n_();Object.defineProperty(e,"presignMessagePrefix",{enumerable:!0,get:function(){return w.presignMessagePrefix}});var E=Go();Object.defineProperty(e,"etherUnits",{enumerable:!0,get:function(){return E.etherUnits}}),Object.defineProperty(e,"gweiUnits",{enumerable:!0,get:function(){return E.gweiUnits}}),Object.defineProperty(e,"weiUnits",{enumerable:!0,get:function(){return E.weiUnits}});var p=Se();Object.defineProperty(e,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return p.AbiConstructorNotFoundError}}),Object.defineProperty(e,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return p.AbiConstructorParamsNotFoundError}}),Object.defineProperty(e,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return p.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(e,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return p.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(e,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return p.AbiDecodingZeroDataError}}
47),Object.defineProperty(e,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return p.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return p.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(e,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return p.AbiEncodingLengthMismatchError}}),Object.defineProperty(e,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return p.AbiErrorInputsNotFoundError}}),Object.defineProperty(e,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return p.AbiErrorNotFoundError}}),Object.defineProperty(e,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return p.AbiErrorSignatureNotFoundError}}),Object.defineProperty(e,"AbiEventNotFoundError",{enumerable:!0,get:function(){return p.AbiEventNotFoundError}}),Object.defineProperty(e,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return p.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(e,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return p.AbiEventSignatureNotFoundError}}),Object.defineProperty(e,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return p.AbiFunctionNotFoundError}}),Object.defineProperty(e,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return p.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(e,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return p.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(e,"BytesSizeMismatchError",{enumerable:!0,get:function(){return p.BytesSizeMismatchError}}),Object.defineProperty(e,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return p.DecodeLogDataMismatch}}),Object.defineProperty(e,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return p.DecodeLogTopicsMismatch}}),Object.defineProperty(e,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return p.InvalidAbiDecodingTypeError}}),Object.defineProperty(e,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return p.InvalidAbiEncodingTypeError}}),Object.defineProperty(e,"InvalidArrayError",{enumerable:!0,get:function(){return p.InvalidArrayError}}),Object.defineProperty(e,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return p.InvalidDefinitionTypeError}}),Object.defineProperty(e,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return p.UnsupportedPackedAbiType}});var S=At();Object.defineProperty(e,"InvalidAddressError",{enumerable:!0,get:function(){return S.InvalidAddressError}});var A=de();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return A.BaseError}}),Object.defineProperty(e,"setErrorConfig",{enumerable:!0,get:function(){return A.setErrorConfig}});var T=lf();Object.defineProperty(e,"BlockNotFoundError",{enumerable:!0,get:function(){return T.BlockNotFoundError}});var C=Bg();Object.defineProperty(e,"BundleFailedError",{enumerable:!0,get:function(){return C.BundleFailedError}});var R=ni();Object.defineProperty(e,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return R.ChainDoesNotSupportContract}}),Object.defineProperty(e,"ChainMismatchError",{enumerable:!0,get:function(){return R.ChainMismatchError}}),Object.defineProperty(e,"ChainNotFoundError",{enumerable:!0,get:function(){return R.ChainNotFoundError}}),Object.defineProperty(e,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return R.ClientChainNotConfiguredError}}),Object.defineProperty(e,"InvalidChainIdError",{enumerable:!0,get:function(){return R.InvalidChainIdError}});var I=pr();Object.defineProperty(e,"CallExecutionError",{enumerable:!0,get:function(){return I.CallExecutionError}}),Object.defineProperty(e,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return I.ContractFunctionExecutionError}}),Object.defineProperty(e,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return I.ContractFunctionRevertedError}}),Object.defineProperty(e,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return I.ContractFunctionZeroDataError}}),Object.defineProperty(e,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return I.CounterfactualDeploymentFailedError}}),Object.defineProperty(e,"RawContractError",{enumerable:!0,get:function(){return I.RawContractError}});var x=ku();Object.defineProperty(e,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return x.SizeExceedsPaddingSizeError}}),Object.defineProperty(e,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return x.SliceOffsetOutOfBoundsError}});var F=Sn();Object.defineProperty(e,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return F.IntegerOutOfRangeError}}),Object.defineProperty(e,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return F.InvalidBytesBooleanError}}),Object.defineProperty(e,"InvalidHexBooleanError",{enumerable:!0,get:function(){return F.InvalidHexBooleanError}}),Object.defineProperty(e,"InvalidHexValueError",{enumerable:!0,get:function(){return F.InvalidHexValueError}}),Object.defineProperty(e,"SizeOverflowError",{enumerable:!0,get:function(){return F.SizeOverflowError}});var H=Mf();Object.defineProperty(e,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return H.EnsAvatarInvalidNftUriError}}),Object.defineProperty(e,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return H.EnsAvatarUnsupportedNamespaceError}}),Object.defineProperty(e,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return H.EnsAvatarUriResolutionError}}),Object.defineProperty(e,"EnsInvalidChainIdError",{enumerable:!0,get:function(){return H.EnsInvalidChainIdError}});var j=hg();Object.defineProperty(e,"EstimateGasExecutionError",{enumerable:!0,get:function(){return j.EstimateGasExecutionError}});var k=Yo();Object.defineProperty(e,"BaseFeeScalarError",{enumerable:!0,get:function(){return k.BaseFeeScalarError}}),Object.defineProperty(e,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return k.Eip1559FeesNotSupportedError}}),Object.defineProperty(e,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return k.MaxFeePerGasTooLowError}});var B=ng();Object.defineProperty(e,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return B.FilterTypeNotSupportedError}});var O=rr();Object.defineProperty(e,"ExecutionRevertedError",{enumerable:!0,get:function(){return O.ExecutionRevertedError}}),Object.defineProperty(e,"FeeCapTooHighError",{enumerable:!0,get:function(){return O.FeeCapTooHighError}}),Object.defineProperty(e,"FeeCapTooLowError",{enumerable:!0,get:function(){return O.FeeCapTooLowError}}),Object.defineProperty(e,"InsufficientFundsError",{enumerable:!0,get:function(){return O.InsufficientFundsError}}),Object.defineProperty(e,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return O.IntrinsicGasTooHighError}}),Object.defineProperty(e,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return O.IntrinsicGasTooLowError}}),Object.defineProperty(e,"NonceMaxValueError",{enumerable:!0,get:function(){return O.NonceMaxValueError}}),Object.defineProperty(e,"NonceTooHighError",{enumerable:!0,get:function(){return O.NonceTooHighError}}),Object.defineProperty(e,"NonceTooLowError",{enumerable:!0,get:function(){return O.NonceTooLowError}}),Object.defineProperty(e,"TipAboveFeeCapError",{enumerable:!0,get:function(){return O.TipAboveFeeCapError}}),Object.defineProperty(e,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return O.TransactionTypeNotSupportedError}}),Object.defineProperty(e,"UnknownNodeError",{enumerable:!0,get:function(){return O.UnknownNodeError}});var q=pt();Object.defineProperty(e,"HttpRequestError",{enumerable:!0,get:function(){return q.HttpRequestError}}),Object.defineProperty(e,"RpcRequestError",{enumerable:!0,get:function(){return q.RpcRequestError}}),Object.defineProperty(e,"SocketClosedError",{enumerable:!0,get:function(){return q.SocketClosedError}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return q.TimeoutError}}),Object.defineProperty(e,"WebSocketRequestError",{enumerable:!0,get:function(){return q.WebSocketRequestError}});var M=gr();Object.defineProperty(e,"AtomicityNotSupportedError",{enumerable:!0,get:function(){return M.AtomicityNotSupportedError}}),Object.defineProperty(e,"AtomicReadyWalletRejectedUpgradeError",{enumerable:!0,get:function(){return M.AtomicReadyWalletRejectedUpgradeError}}),Object.defineProperty(e,"BundleTooLargeError",{enumerable:!0,get:function(){return M.BundleTooLargeError}}),Object.defineProperty(e,"ChainDisconnectedError",{enumerable:!0,get:function(){return M.ChainDisconnectedError}}),Object.defineProperty(e,"DuplicateIdError",{enumerable:!0,get:function(){return M.DuplicateIdError}}),Object.defineProperty(e,"InternalRpcError",{enumerable:!0,get:function(){return M.InternalRpcError}}),Object.defineProperty(e,"InvalidInputRpcError",{enumerable:!0,get:function(){return M.InvalidInputRpcError}}),Object.defineProperty(e,"InvalidParamsRpcError",{enumerable:!0,get:function(){return M.InvalidParamsRpcError}}),Object.defineProperty(e,"InvalidRequestRpcError",{enumerable:!0,get:function(){return M.InvalidRequestRpcError}}),Object.defineProperty(e,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return M.JsonRpcVersionUnsupportedError}}),Object.defineProperty(e,"LimitExceededRpcError",{enumerable:!0,get:function(){return M.LimitExceededRpcError}}),Object.defineProperty(e,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return M.MethodNotFoundRpcError}}),Object.defineProperty(e,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return M.MethodNotSupportedRpcError}}),Object.defineProperty(e,"ParseRpcError",{enumerable:!0,get:function(){return M.ParseRpcError}}),Object.defineProperty(e,"ProviderDisconnectedError",{enumerable:!0,get:function(){return M.ProviderDisconnectedError}}),Object.defineProperty(e,"ProviderRpcError",{enumerable:!0,get:function(){return M.ProviderRpcError}}),Object.defineProperty(e,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return M.ResourceNotFoundRpcError}}),Object.defineProperty(e,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return M.ResourceUnavailableRpcError}}),Object.defineProperty(e,"RpcError",{enumerable:!0,get:function(){return M.RpcError}}),Object.defineProperty(e,"SwitchChainError",{enumerable:!0,get:function(){return M.SwitchChainError}}),Object.defineProperty(e,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return M.TransactionRejectedRpcError}}),Object.defineProperty(e,"UnauthorizedProviderError",{enumerable:!0,get:function(){return M.UnauthorizedProviderError}}),Object.defineProperty(e,"UnknownBundleIdError",{enumerable:!0,get:function(){return M.UnknownBundleIdError}}),Object.defineProperty(e,"UnknownRpcError",{enumerable:!0,get:function(){return M.UnknownRpcError}}),Object.defineProperty(e,"UnsupportedChainIdError",{enumerable:!0,get:function(){return M.UnsupportedChainIdError}}),Object.defineProperty(e,"UnsupportedNonOptionalCapabilityError",{enumerable:!0,get:function(){return M.UnsupportedNonOptionalCapabilityError}}),Object.defineProperty(e,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return M.UnsupportedProviderMethodError}}),Object.defineProperty(e,"UserRejectedRequestError",{enumerable:!0,get:function(){return M.UserRejectedRequestError}});var N=cf();Object.defineProperty(e,"AccountStateConflictError",{enumerable:!0,get:function(){return N.AccountStateConflictError}}
47),Object.defineProperty(e,"StateAssignmentConflictError",{enumerable:!0,get:function(){return N.StateAssignmentConflictError}});var z=nt();Object.defineProperty(e,"FeeConflictError",{enumerable:!0,get:function(){return z.FeeConflictError}}),Object.defineProperty(e,"InvalidLegacyVError",{enumerable:!0,get:function(){return z.InvalidLegacyVError}}),Object.defineProperty(e,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializableTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionTypeError}}),Object.defineProperty(e,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return z.InvalidStorageKeySizeError}}),Object.defineProperty(e,"TransactionExecutionError",{enumerable:!0,get:function(){return z.TransactionExecutionError}}),Object.defineProperty(e,"TransactionNotFoundError",{enumerable:!0,get:function(){return z.TransactionNotFoundError}}),Object.defineProperty(e,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return z.TransactionReceiptNotFoundError}}),Object.defineProperty(e,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return z.WaitForTransactionReceiptTimeoutError}});var $=tl();Object.defineProperty(e,"UrlRequiredError",{enumerable:!0,get:function(){return $.UrlRequiredError}});var U=i_();Object.defineProperty(e,"InvalidDomainError",{enumerable:!0,get:function(){return U.InvalidDomainError}}),Object.defineProperty(e,"InvalidPrimaryTypeError",{enumerable:!0,get:function(){return U.InvalidPrimaryTypeError}}),Object.defineProperty(e,"InvalidStructTypeError",{enumerable:!0,get:function(){return U.InvalidStructTypeError}});var G=y_();Object.defineProperty(e,"InvalidDecimalNumberError",{enumerable:!0,get:function(){return G.InvalidDecimalNumberError}});var J=Z2();Object.defineProperty(e,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return J.ProviderRpcError}});var W=yr();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return W.decodeAbiParameters}});var V=J2();Object.defineProperty(e,"decodeDeployData",{enumerable:!0,get:function(){return V.decodeDeployData}});var Y=Do();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return Y.decodeErrorResult}});var te=ei();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return te.decodeEventLog}});var Z=Pf();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return Z.decodeFunctionData}});var X=Rt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return X.decodeFunctionResult}});var Q=Tt();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return Q.encodeAbiParameters}});var ne=oi();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return ne.encodeDeployData}});var re=Af();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return re.encodeErrorResult}});var ae=Zr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return ae.encodeEventTopics}});var ce=Le();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return ce.encodeFunctionData}});var he=Tf();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return he.encodeFunctionResult}});var ee=Ng();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return ee.encodePacked}});var K=tr();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return K.getAbiItem}});var pe=ti();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return pe.parseEventLogs}});var Ce=ag();Object.defineProperty(e,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return Ce.prepareEncodeFunctionData}});var xe=Je();Object.defineProperty(e,"checksumAddress",{enumerable:!0,get:function(){return xe.checksumAddress}}),Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return xe.getAddress}});var bt=$g();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return bt.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return bt.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return bt.getCreateAddress}});var Ye=rt();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return Ye.isAddress}});var mt=gt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return mt.isAddressEqual}});var Bt=Gu();Object.defineProperty(e,"blobsToCommitments",{enumerable:!0,get:function(){return Bt.blobsToCommitments}});var ot=Vu();Object.defineProperty(e,"blobsToProofs",{enumerable:!0,get:function(){return ot.blobsToProofs}});
47var De=yf();Object.defineProperty(e,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return De.commitmentsToVersionedHashes}});var ht=hf();Object.defineProperty(e,"commitmentToVersionedHash",{enumerable:!0,get:function(){return ht.commitmentToVersionedHash}});var it=Y2();Object.defineProperty(e,"fromBlobs",{enumerable:!0,get:function(){return it.fromBlobs}});var Xe=X2();Object.defineProperty(e,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return Xe.sidecarsToVersionedHashes}});var _t=Wu();Object.defineProperty(e,"toBlobSidecars",{enumerable:!0,get:function(){return _t.toBlobSidecars}});var Me=jg();Object.defineProperty(e,"toBlobs",{enumerable:!0,get:function(){return Me.toBlobs}});var ke=Ju();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return ke.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return ke.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return ke.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return ke.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return ke.offchainLookupSignature}});var nr=Dg();Object.defineProperty(e,"ccipReadTunnel",{enumerable:!0,get:function(){return nr.ccipReadTunnel}});var xn=si();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return xn.assertCurrentChain}});var or=Gg();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return or.defineChain}}),Object.defineProperty(e,"extendSchema",{enumerable:!0,get:function(){return or.extendSchema}});var qn=Vg();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return qn.extractChain}});var Ar=wr();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return Ar.getChainContractAddress}});var $e=qe();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return $e.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return $e.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return $e.concatHex}});var Tr=Hf();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return Tr.isBytes}});var ud=Ze();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return ud.isHex}});var Mn=mr();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return Mn.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return Mn.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return Mn.padHex}});var dd=Ue();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return dd.size}});var kn=ft();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return kn.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return kn.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return kn.sliceHex}});var fd=er();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return fd.trim}});var Sr=sf();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return Sr.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return Sr.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return Sr.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return Sr.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return Sr.fromBytes}});var Ir=Be();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return Ir.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return Ir.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return Ir.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return Ir.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return Ir.hexToString}});var ld=Nf();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return ld.fromRlp}});var Rr=Ee();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return Rr.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return Rr.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return Rr.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return Rr.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return Rr.toBytes}});var Br=oe();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return Br.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return Br.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return Br.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return Br.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return Br.toHex}});var Hn=Wo();Object.defineProperty(e,"bytesToRlp",{enumerable:!0,get:function(){return Hn.bytesToRlp}}),Object.defineProperty(e,"hexToRlp",{enumerable:!0,get:function(){return Hn.hexToRlp}}),Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return Hn.toRlp}});var bd=qg();Object.defineProperty(e,"labelhash",{enumerable:!0,get:function(){return bd.labelhash}});var md=xf();Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return md.namehash}});var Fn=Q2();Object.defineProperty(e,"toCoinType",{enumerable:!0,get:function(){return Fn.toCoinType}});var hd=_r();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return hd.getContractError}});var bi=Lu();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return bi.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return bi.formatBlock}});var yd=qt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return yd.formatLog}});var Nn=Rn();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return Nn.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return Nn.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return Nn.transactionType}});var mi=ci();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return mi.defineTransactionReceipt}}),Object.defineProperty(e,"formatTransactionReceipt",{enumerable:!0,get:function(){return mi.formatTransactionReceipt}});var tn=St();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return tn.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return tn.formatTransactionRequest}}),Object.defineProperty(e,"rpcTransactionType",{enumerable:!0,get:function(){return tn.rpcTransactionType}});var pd=$f();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return pd.isHash}});var gd=tt();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return gd.keccak256}});var _d=Kg();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return _d.r
47ipemd160}});var vd=mf();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return vd.sha256}});var Ed=Zg();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return Ed.toEventHash}});var hi=In();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return hi.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return hi.toEventSelector}});var rl=Jg();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return rl.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return rl.toEventSignature}});var k_=Yg();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return k_.toFunctionHash}});var nl=Kr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return nl.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return nl.toFunctionSelector}});var ol=Xg();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return ol.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return ol.toFunctionSignature}});var H_=C_();Object.defineProperty(e,"defineKzg",{enumerable:!0,get:function(){return H_.defineKzg}});var F_=e5();Object.defineProperty(e,"setupKzg",{enumerable:!0,get:function(){return F_.setupKzg}});var il=Qg();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return il.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return il.nonceManager}});var N_=Ig();Object.defineProperty(e,"withCache",{enumerable:!0,get:function(){return N_.withCache}});var $_=ed();Object.defineProperty(e,"withRetry",{enumerable:!0,get:function(){return $_.withRetry}});var z_=zf();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return z_.withTimeout}});var U_=t5();Object.defineProperty(e,"compactSignatureToSignature",{enumerable:!0,get:function(){return U_.compactSignatureToSignature}});var L_=ui();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return L_.hashMessage}});var jd=di();Object.defineProperty(e,"hashDomain",{enumerable:!0,get:function(){return jd.hashDomain}}),Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return jd.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return jd.hashTypedData}});var D_=Gf();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return D_.isErc6492Signature}});var G_=Kf();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return G_.isErc8010Signature}});var al=r5();Object.defineProperty(e,"hexToCompactSignature",{enumerable:!0,get:function(){return al.parseCompactSignature}}),Object.defineProperty(e,"parseCompactSignature",{enumerable:!0,get:function(){return al.parseCompactSignature}});var V_=u_();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return V_.parseErc6492Signature}});var W_=d_();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return W_.parseErc8010Signature}});var sl=n5();Object.defineProperty(e,"hexToSignature",{enumerable:!0,get:function(){return sl.parseSignature}}),Object.defineProperty(e,"parseSignature",{enumerable:!0,get:function(){return sl.parseSignature}});var K_=vr();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return K_.recoverAddress}});var Z_=Zf();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return Z_.recoverMessageAddress}});var J_=uf();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return J_.recoverPublicKey}});var Y_=o5();Object.defineProperty(e,"recoverTransactionAddress",{enumerable:!0,get:function(){return Y_.recoverTransactionAddress}});var X_=Jf();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return X_.recoverTypedDataAddress}});var cl=i5();Object.defineProperty(e,"compactSignatureToHex",{enumerable:!0,get:function(){return cl.serializeCompactSignature}}),Object.defineProperty(e,"serializeCompactSignature",{enumerable:!0,get:function(){return cl.serializeCompactSignature}});var Q_=f_();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return Q_.serializeErc6492Signature}});var ev=l_();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return ev.serializeErc8010Signature}});var ul=P_();Object.defineProperty(e,"signatureToHex",{enumerable:!0,get:function(){return ul.serializeSignature}}),Object.defineProperty(e,"serializeSignature",{enumerable:!0,get:function(){return ul.serializeSignature}});var tv=a5();Object.defineProperty(e,"signatureToCompactSignature",{enumerable:!0,get:function(){return tv.signatureToCompactSignature}});var rv=o_();Object.defineProperty(e,"toPrefixedMessage",{enumerable:!0,get:function(){return rv.toPrefixedMessage}});var nv=b_();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return nv.verifyHash}});var ov=m_();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return ov.verifyMessage}});var iv=h_();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return iv.verifyTypedData}
47});var av=Fe();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return av.stringify}});var sv=It();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return sv.assertRequest}});var wd=rd();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return wd.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return wd.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return wd.assertTransactionLegacy}});var cv=Yf();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return cv.getSerializedTransactionType}});var uv=Ku();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return uv.getTransactionType}});var dv=Xf();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return dv.parseTransaction}});var fv=Ff();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return fv.serializeAccessList}});var lv=nd();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return lv.serializeTransaction}});var yi=od();Object.defineProperty(e,"domainSeparator",{enumerable:!0,get:function(){return yi.domainSeparator}}),Object.defineProperty(e,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return yi.getTypesForEIP712Domain}}),Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return yi.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return yi.validateTypedData}});var bv=Vo();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return bv.formatEther}});var mv=Jr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return mv.formatGwei}});var hv=zu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return hv.formatUnits}});var yv=p_();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return yv.parseEther}});var pv=g_();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return pv.parseGwei}});var gv=sd();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return gv.parseUnits}})})(Id)),Id}var Lr={},Np;function c5(){if(Np)return Lr;Np=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.MAGIC_VALUE_BYTES=Lr.MAGIC_VALUE=void 0;const e="0x1626ba7e";Lr.MAGIC_VALUE=e;const r="0x20c13b0b";return Lr.MAGIC_VALUE_BYTES=r,Lr}var Cu={},zo={},Dr={},$p;function x_(){if($p)return Dr;$p=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.PermissionsError=Dr.PERMISSIONS_REQUEST_REJECTED=void 0,Dr.PERMISSIONS_REQUEST_REJECTED=4001;class e extends Error{constructor(n,t,o){super(n),this.code=t,this.data=o,Object.setPrototypeOf(this,e.prototype)}}return Dr.PermissionsError=e,Dr}var zp;function q_(){if(zp)return zo;zp=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.Wallet=void 0;const e=Vr(),r=x_();class n{constructor(o){this.communicator=o}async getPermissions(){return(await this.communicator.send(e.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(o){if(!this.isPermissionRequestValid(o))throw new r.PermissionsError("Permissions request is invalid",r.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(e.Methods.wallet_requestPermissions,o)).data}catch{throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(o){return o.every(s=>typeof s=="object"?Object.keys(s).every(i=>!!Object.values(e.RestrictedMethods).includes(i)):!1)}}return zo.Wallet=n,zo}var Up;function u5(){if(Up)return Cu;Up=1,Object.defineProperty(Cu,"__esModule",{value:!0});const e=q_(),r=x_(),n=(o,s)=>s.some(i=>i.parentCapability===o),t=()=>(o,s,i)=>{const a=i.value;return i.value=async function(){const c=new e.Wallet(this.communicator);let u=await c.getPermissions();if(n(s,u)||(u=await c.requestPermissions([{[s]:{}}])),!n(s,u))throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED);return a.apply(this)},i};return Cu.default=t,Cu}var Lp;function d5(){if(Lp)return Nt;Lp=1;var e=Nt&&Nt.__decorate||function(u,l,f,m){var y=arguments.length,h=y<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,f):m,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(u,l,f,m);else for(var v=u.length-1;v>=0;v--)(b=u[v])&&(h=(y<3?b(h):y>3?b(l,f,h):b(l,f))||h);return y>3&&h&&Object.defineProperty(l,f,h),h}
47,r=Nt&&Nt.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.Safe=void 0;const n=s5(),t=c5(),o=Vr(),s=rf(),i=tf(),a=r(u5());class c{constructor(l){this.communicator=l}async getChainInfo(){return(await this.communicator.send(o.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(o.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:l="usd"}={}){return(await this.communicator.send(o.Methods.getSafeBalances,{currency:l})).data}async check1271Signature(l,f="0x"){const m=await this.getInfo(),y=(0,n.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[l,f]}),h={call:s.RPC_CALLS.eth_call,params:[{to:m.safeAddress,data:y},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,h)).data.slice(0,10).toLowerCase()===t.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(l,f="0x"){const m=await this.getInfo(),y=(0,n.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[l,f]}),h={call:s.RPC_CALLS.eth_call,params:[{to:m.safeAddress,data:y},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,h)).data.slice(0,10).toLowerCase()===t.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(l){return(0,n.hashMessage)(l)}calculateTypedMessageHash(l){const f=typeof l.domain.chainId=="object"?l.domain.chainId.toNumber():Number(l.domain.chainId);let m=l.primaryType;if(!m){const y=Object.values(l.types),h=Object.keys(l.types).filter(b=>y.every(v=>v.every(({type:g})=>g.replace("[","").replace("]","")!==b)));if(h.length===0||h.length>1)throw new Error("Please specify primaryType");m=h[0]}return(0,n.hashTypedData)({message:l.message,domain:{...l.domain,chainId:f,verifyingContract:l.domain.verifyingContract,salt:l.domain.salt},types:l.types,primaryType:m})}async getOffChainSignature(l){return(await this.communicator.send(o.Methods.getOffChainSignature,l)).data}async isMessageSigned(l,f="0x"){let m;if(typeof l=="string"&&(m=async()=>{const y=this.calculateMessageHash(l);return await this.isMessageHashSigned(y,f)}),(0,i.isObjectEIP712TypedData)(l)&&(m=async()=>{const y=this.calculateTypedMessageHash(l);return await this.isMessageHashSigned(y,f)}),m)return await m();throw new Error("Invalid message type")}async isMessageHashSigned(l,f="0x"){const m=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const y of m)if(await y(l,f))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(o.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(o.Methods.requestAddressBook,void 0)).data}}return Nt.Safe=c,e([(0,a.default)()],c.prototype,"requestAddressBook",null),Nt}var Dp;function Gp(){if(Dp)return rn;Dp=1;var e=rn&&rn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(rn,"__esModule",{value:!0});const r=e(Iv()),n=xv(),t=qv(),o=d5(),s=q_();class i{constructor(c={}){const{allowedDomains:u=null,debug:l=!1}=c;this.communicator=new r.default(u,l),this.eth=new t.Eth(this.communicator),this.txs=new n.TXs(this.communicator),this.safe=new o.Safe(this.communicator),this.wallet=new s.Wallet(this.communicator)}}return rn.default=i,rn}var Vp;function f5(){return Vp||(Vp=1,(function(e){var r=Ft&&Ft.__createBinding||(Object.create?(function(i,a,c,u){u===void 0&&(u=c);var l=Object.getOwnPropertyDescriptor(a,c);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(i,u,l)}):(function(i,a,c,u){u===void 0&&(u=c),i[u]=a[c]})),n=Ft&&Ft.__exportStar||function(i,a){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&r(a,i,c)},t=Ft&&Ft.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};
47Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const o=t(Gp());e.default=o.default,n(Gp(),e),n(tf(),e),n(Vr(),e),n(Yp(),e);var s=Jp();Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}}),n(rf(),e)})(Ft)),Ft}var Gr={},Wp;function l5(){if(Wp)return Gr;Wp=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.numberToHex=Gr.getLowerCase=void 0;function e(n){return n&&n.toLowerCase()}Gr.getLowerCase=e;function r(n){return`0x${n.toString(16)}`}return Gr.numberToHex=r,Gr}var Kp;function b5(){if(Kp)return $n;Kp=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.SafeAppProvider=void 0;const e=f5(),r=jv(),n=l5();class t extends r.EventEmitter{constructor(s,i){super(),this.submittedTxs=new Map,this.safe=s,this.sdk=i}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(s){var c,u,l,f;const{method:i,params:a=[]}=s;switch(i){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,n.numberToHex)(this.chainId);case"personal_sign":{const[v,g]=a;if(this.safe.safeAddress.toLowerCase()!==g.toLowerCase())throw new Error("The address or message hash is invalid");const _=await this.sdk.txs.signMessage(v);return("signature"in _?_.signature:void 0)||"0x"}case"eth_sign":{const[v,g]=a;if(this.safe.safeAddress.toLowerCase()!==v.toLowerCase()||!g.startsWith("0x"))throw new Error("The address or message hash is invalid");const _=await this.sdk.txs.signMessage(g);return("signature"in _?_.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[v,g]=a,_=typeof g=="string"?JSON.parse(g):g;if(this.safe.safeAddress.toLowerCase()!==v.toLowerCase())throw new Error("The address is invalid");const P=await this.sdk.txs.signTypedMessage(_);return("signature"in P?P.signature:void 0)||"0x"}case"eth_sendTransaction":const m={...a[0],value:a[0].value||"0",data:a[0].data||"0x"};typeof m.gas=="string"&&m.gas.startsWith("0x")&&(m.gas=parseInt(m.gas,16));const y=await this.sdk.txs.send({txs:[m],params:{safeTxGas:m.gas}});return this.submittedTxs.set(y.safeTxHash,{from:this.safe.safeAddress,hash:y.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:m.data,value:m.value,to:m.to,blockHash:null,blockNumber:null,transactionIndex:null}),y.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,n.getLowerCase)(a[0]),a[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,n.getLowerCase)(a[0]),a[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,n.getLowerCase)(a[0]),a[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,n.getLowerCase)(a[0]),a[1],a[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([a[0],a[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([a[0],a[1]]);case"eth_getTransactionByHash":let b=a[0];try{b=(await this.sdk.txs.getBySafeTxHash(b)).txHash||b}catch{}return this.submittedTxs.has(b)?this.submittedTxs.get(b):this.sdk.eth.getTransactionByHash([b]).then(v=>(v&&(v.hash=a[0]),v));case"eth_getTransactionReceipt":{let v=a[0];try{v=(await this.sdk.txs.getBySafeTxHash(v)).txHash||v}catch{}return this.sdk.eth.getTransactionReceipt([v]).then(g=>(g&&(g.transactionHash=a[0]),g))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(a[0]);case"eth_call":return this.sdk.eth.call([a[0],a[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([a[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(a[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([a[0]]);case"wallet_sendCalls":{const{from:v,calls:g,chainId:_}=a[0];if(_!==(0,n.numberToHex)(this.chainId))throw new Error(`Safe is not on chain ${_}`);if(v!==this.safe.safeAddress)throw Error("Invalid from address");const P=g.map((E,p)=>{if(!E.to)throw new Error(`Invalid call #${p}: missing "to" field`);return{to:E.to,data:E.data??"0x",value:E.value??(0,n.numberToHex)(0)}}),{safeTxHash:d}=await this.sdk.txs.send({txs:P});return{id:d}}case"wallet_getCallsStatus":{const v=a[0],g={[e.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[e.TransactionStatus.AWAITING_EXECUTION]:100,[e.TransactionStatus.SUCCESS]:200,[e.TransactionStatus.CANCELLED]:400,[e.TransactionStatus.FAILED]:500},_=await this.sdk.txs.getBySafeTxHash(v),P={version:"1.0",id:v,chainId:(0,n.numberToHex)(this.chainId),status:g[_.txStatus]};if(!_.txHash)return P;const d=await this.sdk.eth.getTransactionReceipt([_.txHash]);if(!d)return P;const w=((u=(c=_.txData)==null?void 0:c.dataDecoded)==null?void 0:u.method)!=="multiSend"?1:((f=(l=_.txData.dataDecoded.parameters)==null?void 0:l[0].valueDecoded)==null?void 0:f.length)??1,E=Number(d.blockNumber),p=Number(d.gasUsed);return P.receipts=Array(w).fill({logs:d.logs,status:(0,n.numberToHex)(_.txStatus===e.TransactionStatus.SUCCESS?1:0),blockHash:d.blockHash,blockNumber:(0,n.numberToHex)(E),gasUsed:(0,n.numberToHex)(p),transactionHash:_.txHash}),P}case"wallet_showCallsStatus":throw new Error(`"${s.method}" not supported`);case"wallet_getCapabilities":return{[(0,n.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}
47}};default:throw Error(`"${s.method}" not implemented`)}}send(s,i){s||i("Undefined request"),this.request(s).then(a=>i(null,{jsonrpc:"2.0",id:s.id,result:a})).catch(a=>i(a,null))}}return $n.SafeAppProvider=t,$n}var Zp;function m5(){return Zp||(Zp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var r=b5();Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return r.SafeAppProvider}})})(Pd)),Pd}var M_=m5();const h5=vv(M_),_5=wv({__proto__:null,default:h5},[M_]);export{_5 as i};
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.