"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43],{221:function(e,t,n){/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(4090),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var l=void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),a(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},5309:function(e,t,n){/** * @license React * use-sync-external-store-shim/with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(4090),i=n(2362),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=r.useRef,c=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=a(e,(d=u(function(){function e(e){if(!c){if(c=!0,a=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,s=n)}var a,s,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,i]))[0],d[1]);return c(function(){h.hasValue=!0,h.value=f},[f]),l(f),f}},2362:function(e,t,n){e.exports=n(221)},9292:function(e,t,n){e.exports=n(5309)},568:function(e,t,n){n.d(t,{D:function(){return _}});var r,i,o,a,s,c,u=n(4090),l=n(3288),d=n(8146),h=n(5577),f=n(4831),p=n(7920),b=n(1793),v=n(5139),m=n(4614),y=n(6063),g=(r=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakSet,c=new WeakSet,class extends m.l{bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let n=this.options;this.options=(0,l._)(this,r).defaultMutationOptions(e),(0,y.VS)(this.options,n)||(0,l._)(this,r).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,l._)(this,o),observer:this}),(null==n?void 0:n.mutationKey)&&this.options.mutationKey&&(0,y.Ym)(n.mutationKey)!==(0,y.Ym)(this.options.mutationKey)?this.reset():(null===(t=(0,l._)(this,o))||void 0===t?void 0:t.state.status)==="pending"&&(0,l._)(this,o).setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null===(e=(0,l._)(this,o))||void 0===e||e.removeObserver(this)}}onMutationUpdate(e){(0,f._)(this,s,w).call(this),(0,f._)(this,c,x).call(this,e)}getCurrentResult(){return(0,l._)(this,i)}reset(){var e;null===(e=(0,l._)(this,o))||void 0===e||e.removeObserver(this),(0,h._)(this,o,void 0),(0,f._)(this,s,w).call(this),(0,f._)(this,c,x).call(this)}mutate(e,t){var n;return(0,h._)(this,a,t),null===(n=(0,l._)(this,o))||void 0===n||n.removeObserver(this),(0,h._)(this,o,(0,l._)(this,r).getMutationCache().build((0,l._)(this,r),this.options)),(0,l._)(this,o).addObserver(this),(0,l._)(this,o).execute(e)}constructor(e,t){super(),(0,p._)(this,s),(0,p._)(this,c),(0,d._)(this,r,{writable:!0,value:void 0}),(0,d._)(this,i,{writable:!0,value:void 0}),(0,d._)(this,o,{writable:!0,value:void 0}),(0,d._)(this,a,{writable:!0,value:void 0}),(0,h._)(this,i,void 0),(0,h._)(this,r,e),this.setOptions(t),this.bindMethods(),(0,f._)(this,s,w).call(this)}});function w(){var e,t;let n=null!==(t=null===(e=(0,l._)(this,o))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,b.R)();(0,h._)(this,i,{...n,isPending:"pending"===n.status,isSuccess:"success"===n.status,isError:"error"===n.status,isIdle:"idle"===n.status,mutate:this.mutate,reset:this.reset})}function x(e){v.Vr.batch(()=>{if((0,l._)(this,a)&&this.hasListeners()){var t,n,r,o,s,c,u,d;let h=(0,l._)(this,i).variables,f=(0,l._)(this,i).context;(null==e?void 0:e.type)==="success"?(null===(t=(n=(0,l._)(this,a)).onSuccess)||void 0===t||t.call(n,e.data,h,f),null===(r=(o=(0,l._)(this,a)).onSettled)||void 0===r||r.call(o,e.data,null,h,f)):(null==e?void 0:e.type)==="error"&&(null===(s=(c=(0,l._)(this,a)).onError)||void 0===s||s.call(c,e.error,h,f),null===(u=(d=(0,l._)(this,a)).onSettled)||void 0===u||u.call(d,void 0,e.error,h,f))}this.listeners.forEach(e=>{e((0,l._)(this,i))})})}var P=n(7082);function _(e,t){let n=(0,P.NL)(t),[r]=u.useState(()=>new g(n,e));u.useEffect(()=>{r.setOptions(e)},[r,e]);let i=u.useSyncExternalStore(u.useCallback(e=>r.subscribe(v.Vr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=u.useCallback((e,t)=>{r.mutate(e,t).catch(y.ZT)},[r]);if(i.error&&(0,y.L3)(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}},3054:function(e,t,n){function r(e){return JSON.stringify(e,(e,t)=>!function(e){if(!i(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(i(n)&&n.hasOwnProperty("isPrototypeOf"))}(t)?"bigint"==typeof t?t.toString():t:Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}))}function i(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e){let{_defaulted:t,behavior:n,gcTime:r,initialData:i,initialDataUpdatedAt:o,maxPages:a,meta:s,networkMode:c,queryFn:u,queryHash:l,queryKey:d,queryKeyHashFn:h,retry:f,retryDelay:p,structuralSharing:b,getPreviousPageParam:v,getNextPageParam:m,initialPageParam:y,_optimisticResults:g,enabled:w,notifyOnChangeProps:x,placeholderData:P,refetchInterval:_,refetchIntervalInBackground:I,refetchOnMount:C,refetchOnReconnect:E,refetchOnWindowFocus:k,retryOnMount:G,select:M,staleTime:B,suspense:F,throwOnError:O,config:A,connector:R,query:S,...T}=e;return T}n.d(t,{OP:function(){return o},kq:function(){return r}})},9022:function(e,t,n){n.d(t,{v:function(){return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){let r,i;if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)&&Array.isArray(n)){if((r=t.length)!==n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();let o=Object.keys(t);if((r=o.length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){let r=o[i];if(r&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}}})},7225:function(e,t,n){n.d(t,{s:function(){return r}});function r(e,t,n){let r=e[t.name];if("function"==typeof r)return r;let i=e[n];return"function"==typeof i?i:n=>t(e,n)}},7032:function(e,t,n){function r(e,t){let n=e.exec(t);return null==n?void 0:n.groups}n.d(t,{Zw:function(){return r},cN:function(){return a},eL:function(){return i},lh:function(){return o}});let i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,o=/^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)?$/,a=/^\(.+?\).*?$/},1022:function(e,t,n){n.d(t,{R:function(){return ec}});var r=n(7032);let i=RegExp("^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$"),o=RegExp("^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$"),a=RegExp("^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?.*?)\\))?$"),s=RegExp("^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?.*?)\\}$"),c=RegExp("^constructor\\((?.*?)\\)(?:\\s(?payable{1}))?$"),u=RegExp("^fallback\\(\\) external(?:\\s(?payable{1}))?$"),l=/^receive\(\) external payable$/,d=new Set(["indexed"]),h=new Set(["calldata","memory","storage"]);class f extends Error{constructor(e,t={}){var n;let r=t.cause instanceof f?t.cause.details:(null===(n=t.cause)||void 0===n?void 0:n.message)?t.cause.message:t.details,i=t.cause instanceof f&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?["Docs: https://abitype.dev".concat(i)]:[],...r?["Details: ".concat(r)]:[],"Version: abitype@".concat("1.0.8")].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}}class p extends f{constructor({type:e}){super("Unknown type.",{metaMessages:['Type "'.concat(e,'" is not a valid ABI type. Perhaps you forgot to include a struct signature?')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class b extends f{constructor({type:e}){super("Unknown type.",{metaMessages:['Type "'.concat(e,'" is not a valid ABI type.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class v extends f{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class m extends f{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:['"'.concat(t,'" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class y extends f{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:['Modifier "'.concat(n,'" not allowed').concat(t?' in "'.concat(t,'" type'):"",".")]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class g extends f{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:['Modifier "'.concat(n,'" not allowed').concat(t?' in "'.concat(t,'" type'):"","."),'Data location can only be specified for array, struct, or mapping types, but "'.concat(n,'" was given.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class w extends f{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class x extends f{constructor({signature:e,type:t}){super("Invalid ".concat(t," signature."),{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class P extends f{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class _ extends f{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class I extends f{constructor({type:e}){super("Circular reference detected.",{metaMessages:['Struct "'.concat(e,'" is a circular reference.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class C extends f{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:['"'.concat(e.trim(),'" has too many ').concat(t>0?"opening":"closing"," parentheses.")],details:'Depth "'.concat(t,'"')}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let E=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}]]),k=RegExp("^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$"),G=RegExp("^\\((?.+?)\\)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$"),M=/^u?int$/;function B(e,t){var n,i,o,a,s,c;let u;let l=function(e,t,n){let r="";if(n)for(let e of Object.entries(n)){if(!e)continue;let t="";for(let n of e[1])t+="[".concat(n.type).concat(n.name?":".concat(n.name):"","]");r+="(".concat(e[0],"{").concat(t,"})")}return t?"".concat(t,":").concat(e).concat(r):e}(e,null==t?void 0:t.type,null==t?void 0:t.structs);if(E.has(l))return E.get(l);let d=r.cN.test(e),f=(0,r.Zw)(d?G:k,e);if(!f)throw new v({param:e});if(f.name&&("address"===(s=f.name)||"bool"===s||"function"===s||"string"===s||"tuple"===s||r.eL.test(s)||r.lh.test(s)||A.test(s)))throw new m({param:e,name:f.name});let p=f.name?{name:f.name}:{},w="indexed"===f.modifier?{indexed:!0}:{},x=null!==(n=null==t?void 0:t.structs)&&void 0!==n?n:{},P={};if(d){u="tuple";let e=F(f.type),t=[],n=e.length;for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=e.trim().length;for(let o=0;o[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\\[\\d*?\\])+?)?$");function S(e){let t=function(e){let t={},n=e.length;for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:new Set,o=[],a=t.length;for(let c=0;c1&&void 0!==arguments[1]?arguments[1]:{};if(a.test(e))return function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,r.Zw)(a,e);if(!i)throw new x({signature:e,type:"function"});let o=F(i.parameters),s=[],c=o.length;for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{},n=(0,r.Zw)(o,e);if(!n)throw new x({signature:e,type:"event"});let i=F(n.parameters),a=[],s=i.length;for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{},n=(0,r.Zw)(i,e);if(!n)throw new x({signature:e,type:"error"});let o=F(n.parameters),a=[],s=o.length;for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{},i=(0,r.Zw)(c,e);if(!i)throw new x({signature:e,type:"constructor"});let o=F(i.parameters),a=[],s=o.length;for(let e=0;e{var e;if(t.cause instanceof T){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return(null===(e=t.cause)||void 0===e?void 0:e.message)?t.cause.message:t.details})(),r=t.cause instanceof T&&t.cause.docsPath||t.docsPath,i="".concat("https://oxlib.sh").concat(null!=r?r:"");super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...n||r?["",n?"Details: ".concat(n):void 0,r?"See: ".concat(i):void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.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,"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,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"ox@".concat("0.1.1")}),this.cause=t.cause,this.details=n,this.docs=i,this.docsPath=r,this.shortMessage=e}}function N(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{signed:r,size:i}=n,o=BigInt(e);i?t=r?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(t=BigInt(Number.MAX_SAFE_INTEGER));let a="bigint"==typeof t&&r?-t-1n:0;if(t&&o>t||o1&&void 0!==arguments[1]?arguments[1]:{},{dir:n,size:r=32}=t;if(0===r)return e;let i=e.replace("0x","");if(i.length>2*r)throw new z({size:Math.ceil(i.length/2),targetSize:r,type:"Hex"});return"0x".concat(i["right"===n?"padEnd":"padStart"](2*r,"0"))}(c,{dir:"left",size:i}):c}class j extends T{constructor({max:e,min:t,signed:n,size:r,value:i}){super("Number `".concat(i,"` is not in safe").concat(r?" ".concat(8*r,"-bit"):"").concat(n?" signed":" unsigned"," integer range ").concat(e?"(`".concat(t,"` to `").concat(e,"`)"):"(above `".concat(t,"`)"))),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class z extends T{constructor({size:e,targetSize:t,type:n}){super("".concat(n.charAt(0).toUpperCase()).concat(n.slice(1).toLowerCase()," size (`").concat(e,"`) exceeds padding size (`").concat(t,"`).")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function U(e){return{address:e.address,amount:N(e.amount),index:N(e.index),validatorIndex:N(e.validatorIndex)}}var L=n(9561),D=n(35),q=n(1273),Z=n(5774),W=n(7115),H=n(7470),$=n(5581),V=n(9318),K=n(4247);let Q="/docs/contract/encodeDeployData";function Y(e){let{abi:t,args:n,bytecode:r}=e;if(!n||0===n.length)return r;let i=t.find(e=>"type"in e&&"constructor"===e.type);if(!i)throw new $.fM({docsPath:Q});if(!("inputs"in i)||!i.inputs||0===i.inputs.length)throw new $.cO({docsPath:Q});let o=(0,K.E)(i.inputs,n);return(0,V.SM)([r,o])}var J=n(7210),X=n(3621),ee=n(5578),et=n(6463),en=n(5069),er=n(7306),ei=n(662),eo=n(5493),ea=n(6403),es=n(9605);async function ec(e,t){var r,i,o,a;let{account:s=e.account,batch:c=!!(null===(r=e.batch)||void 0===r?void 0:r.multicall),blockNumber:u,blockTag:l="latest",accessList:d,blobs:h,blockOverrides:f,code:p,data:b,factory:v,factoryData:m,gas:y,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:x,maxPriorityFeePerGas:P,nonce:_,to:I,value:C,stateOverride:E,...k}=t,G=s?(0,L.T)(s):void 0;if(p&&(v||m))throw new q.G("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(p&&I)throw new q.G("Cannot provide both `code` & `to` as parameters.");let M=p&&b,B=v&&m&&I&&b,F=M||B,O=M?function(e){let{code:t,data:n}=e;return Y({abi:S(["constructor(bytes, bytes)"]),bytecode:"0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",args:[t,n]})}({code:p,data:b}):B?function(e){let{data:t,factory:n,factoryData:r,to:i}=e;return Y({abi:S(["constructor(address, bytes, address, bytes)"]),bytecode:"0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",args:[i,t,n,r]})}({data:b,factory:v,factoryData:m,to:I}):b;try{(0,es.F)(t);let n=("bigint"==typeof u?(0,ee.eC)(u):void 0)||l,r=f?{..."bigint"==typeof f.baseFeePerGas&&{baseFeePerGas:N(f.baseFeePerGas)},..."bigint"==typeof f.blobBaseFee&&{blobBaseFee:N(f.blobBaseFee)},..."string"==typeof f.feeRecipient&&{feeRecipient:f.feeRecipient},..."bigint"==typeof f.gasLimit&&{gasLimit:N(f.gasLimit)},..."bigint"==typeof f.number&&{number:N(f.number)},..."bigint"==typeof f.prevRandao&&{prevRandao:N(f.prevRandao)},..."bigint"==typeof f.time&&{time:N(f.time)},...f.withdrawals&&{withdrawals:f.withdrawals.map(U)}}:void 0,s=(0,ea.mF)(E),p=null===(a=e.chain)||void 0===a?void 0:null===(o=a.formatters)||void 0===o?void 0:null===(i=o.transactionRequest)||void 0===i?void 0:i.format,b=(p||ei.tG)({...(0,er.K)(k,{format:p}),from:null==G?void 0:G.address,accessList:d,blobs:h,data:O,gas:y,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:x,maxPriorityFeePerGas:P,nonce:_,to:F?void 0:I,value:C});if(c&&function(e){let{request:t}=e,{data:n,to:r,...i}=t;return!(!n||n.startsWith("0x82ad56cb"))&&!!r&&!(Object.values(i).filter(e=>void 0!==e).length>0)}({request:b})&&!s&&!r)try{return await eu(e,{...b,blockNumber:u,blockTag:l})}catch(e){if(!(e instanceof Z.pZ)&&!(e instanceof Z.mm))throw e}let v=(()=>{let e=[b,n];return s&&r?[...e,s,r]:s?[...e,s]:r?[...e,{},r]:e})(),m=await e.request({method:"eth_call",params:v});if("0x"===m)return{data:void 0};return{data:m}}catch(a){let r=function(e){var t;if(!(e instanceof q.G))return;let n=e.walk();return"object"==typeof(null==n?void 0:n.data)?null===(t=n.data)||void 0===t?void 0:t.data:n.data}(a),{offchainLookup:i,offchainLookupSignature:o}=await n.e(336).then(n.bind(n,3336));if(!1!==e.ccipRead&&(null==r?void 0:r.slice(0,10))===o&&I)return{data:await i(e,{data:r,to:I})};if(F&&(null==r?void 0:r.slice(0,10))==="0x101bb98d")throw new W.Mo({factory:v});throw function(e,t){let{docsPath:n,...r}=t,i=(()=>{let t=(0,en.k)(e,r);return t instanceof et.cj?e:t})();return new W.cg(i,{docsPath:n,...r})}(a,{...t,account:G,chain:e.chain})}}async function eu(e,t){var n;let{batchSize:r=1024,wait:i=0}="object"==typeof(null===(n=e.batch)||void 0===n?void 0:n.multicall)?e.batch.multicall:{},{blockNumber:o,blockTag:a="latest",data:s,multicallAddress:c,to:u}=t,l=c;if(!l){if(!e.chain)throw new Z.pZ;l=(0,X.L)({blockNumber:o,chain:e.chain,contract:"multicall3"})}let d=("bigint"==typeof o?(0,ee.eC)(o):void 0)||a,{schedule:h}=(0,eo.S)({id:"".concat(e.uid,".").concat(d),wait:i,shouldSplitBatch:e=>e.reduce((e,t)=>{let{data:n}=t;return e+(n.length-2)},0)>2*r,fn:async t=>{let n=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),r=(0,J.R)({abi:D.F8,args:[n],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{data:r,to:l},d]});return(0,H.k)({abi:D.F8,args:[n],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:f,success:p}]=await h({data:s,to:u});if(!p)throw new W.VQ({data:f});return"0x"===f?{data:void 0}:{data:f}}},2756:function(e,t,n){n.d(t,{s:function(){return i}});var r=n(5578);async function i(e,t){let{address:n,blockNumber:i,blockTag:o="latest"}=t,a="bigint"==typeof i?(0,r.eC)(i):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[n,a||o]}))}},1565:function(e,t,n){n.d(t,{Q:function(){return a}});var r=n(410),i=n(5578),o=n(6547);async function a(e){var t,n,a;let{blockHash:s,blockNumber:c,blockTag:u,includeTransactions:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=null!=l&&l,h=void 0!==c?(0,i.eC)(c):void 0,f=null;if(!(f=s?await e.request({method:"eth_getBlockByHash",params:[s,d]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[h||(null!=u?u:"latest"),d]},{dedupe:!!h})))throw new r.f({blockHash:s,blockNumber:c});return((null===(a=e.chain)||void 0===a?void 0:null===(n=a.formatters)||void 0===n?void 0:null===(t=n.block)||void 0===t?void 0:t.format)||function(e){var t;let n=(null!==(t=e.transactions)&&void 0!==t?t:[]).map(e=>"string"==typeof e?e:(0,o.Tr)(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}})(f)}},35:function(e,t,n){n.d(t,{F8:function(){return r},Yi:function(){return i}});let r=[{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"}],i=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],o=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}];[...o],[...o]},6390:function(e,t,n){n.d(t,{$:function(){return r},Up:function(){return i},hZ:function(){return o}});let r={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."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},o={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},4817:function(e,t,n){n.d(t,{Bd:function(){return o},Zn:function(){return i},ez:function(){return r}});let r={gwei:9,wei:18},i={ether:-9,wei:9},o={ether:-18,gwei:-9}},5581:function(e,t,n){n.d(t,{CI:function(){return x},M4:function(){return d},MS:function(){return p},MX:function(){return m},S4:function(){return g},Zh:function(){return f},cO:function(){return s},dh:function(){return w},eF:function(){return y},fM:function(){return a},fs:function(){return h},gr:function(){return l},hn:function(){return P},wM:function(){return _},wb:function(){return u},xB:function(){return c},xL:function(){return v},yP:function(){return b}});var r=n(7705),i=n(5305),o=n(1273);class a extends o.G{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}class s extends o.G{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class c extends o.G{constructor({data:e,params:t,size:n}){super(["Data size of ".concat(n," bytes is too small for given parameters.")].join("\n"),{metaMessages:["Params: (".concat((0,r.h)(t,{includeName:!0}),")"),"Data: ".concat(e," (").concat(n," 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=e,this.params=t,this.size=n}}class u extends o.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class l extends o.G{constructor({expectedLength:e,givenLength:t,type:n}){super(["ABI encoding array length mismatch for type ".concat(n,"."),"Expected length: ".concat(e),"Given length: ".concat(t)].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends o.G{constructor({expectedSize:e,value:t}){super('Size of bytes "'.concat(t,'" (bytes').concat((0,i.d)(t),") does not match expected size (bytes").concat(e,")."),{name:"AbiEncodingBytesSizeMismatchError"})}}class h extends o.G{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.","Expected length (params): ".concat(e),"Given length (values): ".concat(t)].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}class f extends o.G{constructor(e,{docsPath:t}){super(['Arguments (`args`) were provided to "'.concat(e,'", but "').concat(e,'" 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("\n"),{docsPath:t,name:"AbiErrorInputsNotFoundError"})}}class p extends o.G{constructor(e,{docsPath:t}={}){super(["Error ".concat(e?'"'.concat(e,'" '):"","not found on ABI."),"Make sure you are using the correct ABI and that the error exists on it."].join("\n"),{docsPath:t,name:"AbiErrorNotFoundError"})}}class b extends o.G{constructor(e,{docsPath:t}){super(['Encoded error signature "'.concat(e,'" 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://openchain.xyz/signatures?query=".concat(e,".")].join("\n"),{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class v extends o.G{constructor(e,{docsPath:t}={}){super(["Function ".concat(e?'"'.concat(e,'" '):"","not found on ABI."),"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t,name:"AbiFunctionNotFoundError"})}}class m extends o.G{constructor(e,{docsPath:t}){super(['Function "'.concat(e,'" 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("\n"),{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class y extends o.G{constructor(e,{docsPath:t}){super(['Encoded function signature "'.concat(e,'" 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://openchain.xyz/signatures?query=".concat(e,".")].join("\n"),{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}class g extends o.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:["`".concat(e.type,"` in `").concat((0,r.t)(e.abiItem),"`, and"),"`".concat(t.type,"` in `").concat((0,r.t)(t.abiItem),"`"),"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class w extends o.G{constructor(e,{docsPath:t}){super(['Type "'.concat(e,'" is not a valid encoding type.'),"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiEncodingType"})}}class x extends o.G{constructor(e,{docsPath:t}){super(['Type "'.concat(e,'" is not a valid decoding type.'),"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiDecodingType"})}}class P extends o.G{constructor(e){super(['Value "'.concat(e,'" is not a valid array.')].join("\n"),{name:"InvalidArrayError"})}}class _ extends o.G{constructor(e){super(['"'.concat(e,'" is not a valid definition type.'),'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}},410:function(e,t,n){n.d(t,{f:function(){return i}});var r=n(1273);class i extends r.G{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n='Block at hash "'.concat(e,'"')),t&&(n='Block at number "'.concat(t,'"')),super("".concat(n," could not be found."),{name:"BlockNotFoundError"})}}},5774:function(e,t,n){n.d(t,{Bk:function(){return a},Yl:function(){return o},mm:function(){return i},pZ:function(){return s}});var r=n(1273);class i extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super('Chain "'.concat(t.name,'" does not support contract "').concat(n.name,'".'),{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?['- The contract "'.concat(n.name,'" was not deployed until block ').concat(n.blockCreated," (current block ").concat(e,").")]:['- The chain does not have the contract "'.concat(n.name,'" configured.')]],name:"ChainDoesNotSupportContract"})}}class o extends r.G{constructor({chain:e,currentChainId:t}){super("The current chain of the wallet (id: ".concat(t,") does not match the target chain for the transaction (id: ").concat(e.id," – ").concat(e.name,")."),{metaMessages:["Current Chain ID: ".concat(t),"Expected Chain ID: ".concat(e.id," – ").concat(e.name)],name:"ChainMismatchError"})}}class a extends r.G{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class s extends r.G{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}},7115:function(e,t,n){n.d(t,{cg:function(){return m},uq:function(){return y},Lu:function(){return g},Dk:function(){return w},Mo:function(){return x},VQ:function(){return P}});var r=n(9561),i=n(6390),o=n(8890),a=n(7705),s=n(2791);function c(e){let{abiItem:t,args:n,includeFunctionName:r=!0,includeName:i=!1}=e;if("name"in t&&"inputs"in t&&t.inputs)return"".concat(r?t.name:"","(").concat(t.inputs.map((e,t)=>"".concat(i&&e.name?"".concat(e.name,": "):"").concat("object"==typeof n[t]?(0,s.P)(n[t]):n[t])).join(", "),")")}var u=n(2261),l=n(2926),d=n(8206),h=n(5581),f=n(1273),p=n(4655),b=n(289),v=n(7307);class m extends f.G{constructor(e,{account:t,docsPath:n,chain:i,data:o,gas:a,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:h,to:f,value:v,stateOverride:m}){var y;let g=t?(0,r.T)(t):void 0,w=(0,b.xr)({from:null==g?void 0:g.address,to:f,value:void 0!==v&&"".concat((0,l.d)(v)," ").concat((null==i?void 0:null===(y=i.nativeCurrency)||void 0===y?void 0:y.symbol)||"ETH"),data:o,gas:a,gasPrice:void 0!==s&&"".concat((0,d.o)(s)," gwei"),maxFeePerGas:void 0!==c&&"".concat((0,d.o)(c)," gwei"),maxPriorityFeePerGas:void 0!==u&&"".concat((0,d.o)(u)," gwei"),nonce:h});m&&(w+="\n".concat((0,p.Bj)(m))),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",w].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class y extends f.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:o,sender:s}){var l;let d=(0,u.mE)({abi:t,args:n,name:o}),h=d?c({abiItem:d,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=d?(0,a.t)(d,{includeName:!0}):void 0,p=(0,b.xr)({address:r&&(0,v.C)(r),function:f,args:h&&"()"!==h&&"".concat([...Array(null!==(l=null==o?void 0:o.length)&&void 0!==l?l:0).keys()].map(()=>" ").join("")).concat(h),sender:s});super(e.shortMessage||'An unknown error occurred while executing the contract function "'.concat(o,'".'),{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],p&&"Contract Call:",p].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=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=o,this.sender=s}}class g extends f.G{constructor({abi:e,data:t,functionName:n,message:r}){let s,u,l,d,f;if(t&&"0x"!==t)try{let{abiItem:n,errorName:r,args:s}=f=(0,o.p)({abi:e,data:t});if("Error"===r)l=s[0];else if("Panic"===r){let[e]=s;l=i.$[e]}else{var p;let e=n?(0,a.t)(n,{includeName:!0}):void 0,t=n&&s?c({abiItem:n,args:s,includeFunctionName:!1,includeName:!1}):void 0;u=[e?"Error: ".concat(e):"",t&&"()"!==t?" ".concat([...Array(null!==(p=null==r?void 0:r.length)&&void 0!==p?p:0).keys()].map(()=>" ").join("")).concat(t):""]}}catch(e){s=e}else r&&(l=r);s instanceof h.yP&&(d=s.signature,u=['Unable to decode signature "'.concat(d,'" 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://openchain.xyz/signatures?query=".concat(d,".")]),super(l&&"execution reverted"!==l||d?['The contract function "'.concat(n,'" reverted with the following ').concat(d?"signature":"reason",":"),l||d].join("\n"):'The contract function "'.concat(n,'" reverted.'),{cause:s,metaMessages:u,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=f,this.raw=t,this.reason=l,this.signature=d}}class w extends f.G{constructor({functionName:e}){super('The contract function "'.concat(e,'" returned no data ("0x").'),{metaMessages:["This could be due to any of the following:",' - The contract does not have the function "'.concat(e,'",')," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class x extends f.G{constructor({factory:e}){super("Deployment for counterfactual contract call failed".concat(e?' for factory "'.concat(e,'".'):""),{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"})}}class P extends f.G{constructor({data:e,message:t}){super(t||"",{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=e}}},6463:function(e,t,n){n.d(t,{C_:function(){return d},G$:function(){return s},Hh:function(){return a},M_:function(){return o},WF:function(){return h},ZI:function(){return c},cj:function(){return v},cs:function(){return b},dR:function(){return f},pZ:function(){return p},se:function(){return l},vU:function(){return u}});var r=n(8206),i=n(1273);class o extends i.G{constructor({cause:e,message:t}={}){var n;let r=null==t?void 0:null===(n=t.replace("execution reverted: ",""))||void 0===n?void 0:n.replace("execution reverted","");super("Execution reverted ".concat(r?"with reason: ".concat(r):"for an unknown reason","."),{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class a extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super("The fee cap (`maxFeePerGas`".concat(t?" = ".concat((0,r.o)(t)," gwei"):"",") cannot be higher than the maximum allowed value (2^256-1)."),{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(a,"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 s extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super("The fee cap (`maxFeePerGas`".concat(t?" = ".concat((0,r.o)(t)):""," gwei) cannot be lower than the block base fee."),{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(s,"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 c extends i.G{constructor({cause:e,nonce:t}={}){super("Nonce provided for the transaction ".concat(t?"(".concat(t,") "):"","is higher than the next one expected."),{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(["Nonce provided for the transaction ".concat(t?"(".concat(t,") "):"","is lower than the current nonce of the account."),"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends i.G{constructor({cause:e,nonce:t}={}){super("Nonce provided for the transaction ".concat(t?"(".concat(t,") "):"","exceeds the maximum allowed nonce."),{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class h extends i.G{constructor({cause:e,gas:t}={}){super("The amount of gas ".concat(t?"(".concat(t,") "):"","provided for the transaction exceeds the limit allowed for the block."),{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class f extends i.G{constructor({cause:e,gas:t}={}){super("The amount of gas ".concat(t?"(".concat(t,") "):"","provided for the transaction is too low."),{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class b extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super(["The provided tip (`maxPriorityFeePerGas`".concat(t?" = ".concat((0,r.o)(t)," gwei"):"",") cannot be higher than the fee cap (`maxFeePerGas`").concat(n?" = ".concat((0,r.o)(n)," gwei"):"",").")].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(b,"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 v extends i.G{constructor({cause:e}){super("An error occurred while executing: ".concat(null==e?void 0:e.shortMessage),{cause:e,name:"UnknownNodeError"})}}},4655:function(e,t,n){n.d(t,{Bj:function(){return s},Nc:function(){return i},Z8:function(){return o}});var r=n(1273);class i extends r.G{constructor({address:e}){super('State for account "'.concat(e,'" is set multiple times.'),{name:"AccountStateConflictError"})}}class o extends r.G{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function a(e){return e.reduce((e,t)=>{let{slot:n,value:r}=t;return"".concat(e," ").concat(n,": ").concat(r,"\n")},"")}function s(e){return e.reduce((e,t)=>{let{address:n,...r}=t,i="".concat(e," ").concat(n,":\n");return r.nonce&&(i+=" nonce: ".concat(r.nonce,"\n")),r.balance&&(i+=" balance: ".concat(r.balance,"\n")),r.code&&(i+=" code: ".concat(r.code,"\n")),r.state&&(i+=" state:\n"+a(r.state)),r.stateDiff&&(i+=" stateDiff:\n"+a(r.stateDiff)),i}," State Override:\n").slice(0,-1)}},289:function(e,t,n){n.d(t,{Bh:function(){return l},Yb:function(){return d},j3:function(){return c},mc:function(){return h},mk:function(){return u},xY:function(){return s},xr:function(){return a}});var r=n(2926),i=n(8206),o=n(1273);function a(e){let t=Object.entries(e).map(e=>{let[t,n]=e;return void 0===n||!1===n?null:[t,n]}).filter(Boolean),n=t.reduce((e,t)=>{let[n]=t;return Math.max(e,n.length)},0);return t.map(e=>{let[t,r]=e;return" ".concat("".concat(t,":").padEnd(n+1)," ").concat(r)}).join("\n")}class s extends o.G{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}class c extends o.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",a(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class u extends o.G{constructor(e,{account:t,docsPath:n,chain:o,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:h,to:f,value:p}){var b;super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",a({chain:o&&"".concat(null==o?void 0:o.name," (id: ").concat(null==o?void 0:o.id,")"),from:null==t?void 0:t.address,to:f,value:void 0!==p&&"".concat((0,r.d)(p)," ").concat((null==o?void 0:null===(b=o.nativeCurrency)||void 0===b?void 0:b.symbol)||"ETH"),data:s,gas:c,gasPrice:void 0!==u&&"".concat((0,i.o)(u)," gwei"),maxFeePerGas:void 0!==l&&"".concat((0,i.o)(l)," gwei"),maxPriorityFeePerGas:void 0!==d&&"".concat((0,i.o)(d)," gwei"),nonce:h})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class l extends o.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:i}){let o="Transaction";n&&void 0!==i&&(o='Transaction at block time "'.concat(n,'" at index "').concat(i,'"')),e&&void 0!==i&&(o='Transaction at block hash "'.concat(e,'" at index "').concat(i,'"')),t&&void 0!==i&&(o='Transaction at block number "'.concat(t,'" at index "').concat(i,'"')),r&&(o='Transaction with hash "'.concat(r,'"')),super("".concat(o," could not be found."),{name:"TransactionNotFoundError"})}}class d extends o.G{constructor({hash:e}){super('Transaction receipt with hash "'.concat(e,'" could not be found. The Transaction may not be processed on a block yet.'),{name:"TransactionReceiptNotFoundError"})}}class h extends o.G{constructor({hash:e}){super('Timed out while waiting for transaction with hash "'.concat(e,'" to be confirmed.'),{name:"WaitForTransactionReceiptTimeoutError"})}}},8201:function(e,t,n){n.d(t,{r:function(){return b}});var r=n(5581),i=n(5036),o=n(3254),a=n(5305),s=n(3090),c=n(8142),u=n(5851),l=n(5936),d=n(5578);function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!==t.size&&(0,l.Yf)(e,{size:t.size});let n=(0,d.ci)(e,t);return(0,l.ly)(n,t)}var f=n(3596),p=n(4247);function b(e,t){let n="string"==typeof t?(0,f.nr)(t):t,b=(0,o.q)(n);if(0===(0,a.d)(n)&&e.length>0)throw new r.wb;if((0,a.d)(t)&&32>(0,a.d)(t))throw new r.xB({data:"string"==typeof t?t:(0,d.ci)(t),params:e,size:(0,a.d)(t)});let m=0,y=[];for(let t=0;t{let{name:t}=e;return!t}),a=o?[]:{},s=0;if(v(n)){let r=i+h(t.readBytes(32));for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{},n=e;if(void 0!==t.size&&((0,l.Yf)(n,{size:t.size}),n=(0,c.f)(n)),n.length>1||n[0]>1)throw new u.yr(n);return!!n[0]}(t.readBytes(32),{size:32}),32];if(n.type.startsWith("bytes"))return function(e,t,n){let{staticPosition:r}=n,[i,o]=t.type.split("bytes");if(!o){let t=h(e.readBytes(32));e.setPosition(r+t);let n=h(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[(0,d.ci)(i),32]}return[(0,d.ci)(e.readBytes(Number.parseInt(o),32)),32]}(t,n,{staticPosition:a});if(n.type.startsWith("uint")||n.type.startsWith("int"))return function(e,t){let n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256"),i=e.readBytes(32);return[r>48?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!==t.size&&(0,l.Yf)(e,{size:t.size});let n=(0,d.ci)(e,t);return(0,l.y_)(n,t)}(i,{signed:n}):h(i,{signed:n}),32]}(t,n);if("string"===n.type)return function(e,t){let{staticPosition:n}=t,r=h(e.readBytes(32));e.setPosition(n+r);let i=h(e.readBytes(32));if(0===i)return e.setPosition(n+32),["",32];let o=e.readBytes(i,32),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;return void 0!==t.size&&((0,l.Yf)(n,{size:t.size}),n=(0,c.f)(n,{dir:"right"})),new TextDecoder().decode(n)}((0,c.f)(o));return e.setPosition(n+32),[a,32]}(t,{staticPosition:a});throw new r.CI(n.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(b,n,{staticPosition:0});m+=a,y.push(o)}return y}function v(e){var t;let{type:n}=e;if("string"===n||"bytes"===n||n.endsWith("[]"))return!0;if("tuple"===n)return null===(t=e.components)||void 0===t?void 0:t.some(v);let r=(0,p.S)(e.type);return!!(r&&v({...e,type:r[1]}))}},8890:function(e,t,n){n.d(t,{p:function(){return u}});var r=n(6390),i=n(5581),o=n(3090),a=n(9226),s=n(8201),c=n(7705);function u(e){let{abi:t,data:n}=e,u=(0,o.tP)(n,0,4);if("0x"===u)throw new i.wb;let l=[...t||[],r.Up,r.hZ].find(e=>"error"===e.type&&u===(0,a.C)((0,c.t)(e)));if(!l)throw new i.yP(u,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,s.r)(l.inputs,(0,o.tP)(n,4)):void 0,errorName:l.name}}},7470:function(e,t,n){n.d(t,{k:function(){return s}});var r=n(5581),i=n(8201),o=n(2261);let a="/docs/contract/decodeFunctionResult";function s(e){let{abi:t,args:n,functionName:s,data:c}=e,u=t[0];if(s){let e=(0,o.mE)({abi:t,args:n,name:s});if(!e)throw new r.xL(s,{docsPath:a});u=e}if("function"!==u.type)throw new r.xL(void 0,{docsPath:a});if(!u.outputs)throw new r.MX(u.name,{docsPath:a});let l=(0,i.r)(u.outputs,c);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},4247:function(e,t,n){n.d(t,{E:function(){return p},S:function(){return v}});var r=n(5581),i=n(4898),o=n(1273),a=n(5851),s=n(4433),c=n(9318),u=n(9507),l=n(5305),d=n(3090),h=n(5578);let f=/^(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)?$/;function p(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});let n=b(function(e){let{params:t,values:n}=e,p=[];for(let e=0;e0?(0,c.zo)([t,e]):t}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,c.zo)(u.map(e=>{let{encoded:t}=e;return t}))}}(p,{length:t,param:{...n,type:i}})}if("tuple"===n.type)return function(t,n){let{param:r}=n,i=!1,o=[];for(let n=0;n{let{encoded:t}=e;return t}))}}(p,{param:n});if("address"===n.type)return function(e){if(!(0,s.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,u.gc)(e.toLowerCase())}}(p);if("bool"===n.type)return function(e){if("boolean"!=typeof e)throw new o.G('Invalid boolean value: "'.concat(e,'" (type: ').concat(typeof e,"). Expected: `true` or `false`."));return{dynamic:!1,encoded:(0,u.gc)((0,h.C4)(e))}}(p);if(n.type.startsWith("uint")||n.type.startsWith("int")){var y;let e=n.type.startsWith("int"),[,,t="256"]=null!==(y=f.exec(n.type))&&void 0!==y?y:[];return function(e,t){let{signed:n,size:r=256}=t;if("number"==typeof r){let t=2n**(BigInt(r)-(n?1n:0n))-1n,i=n?-t-1n:0n;if(e>t||e1&&void 0!==arguments[1]?arguments[1]:{};if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.wM(e.type);return"".concat(e.name,"(").concat(o(e.inputs,{includeName:t}),")")}function o(e){let{includeName:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.map(e=>(function(e,t){let{includeName:n}=t;return e.type.startsWith("tuple")?"(".concat(o(e.components,{includeName:n}),")").concat(e.type.slice(5)):e.type+(n&&e.name?" ".concat(e.name):"")})(e,{includeName:t})).join(t?", ":","):""}},2261:function(e,t,n){n.d(t,{mE:function(){return c}});var r=n(5581),i=n(1230),o=n(4433);let a=n(4836).r;var s=n(9226);function c(e){let t;let{abi:n,args:c=[],name:u}=e,l=(0,i.v)(u,{strict:!1}),d=n.filter(e=>l?"function"===e.type?(0,s.C)(e)===u:"event"===e.type&&a(e)===u:"name"in e&&e.name===u);if(0!==d.length){if(1===d.length)return d[0];for(let e of d)if("inputs"in e){if(!c||0===c.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===c.length&&c.every((t,n)=>{let r="inputs"in e&&e.inputs[n];return!!r&&function e(t,n){let r=typeof t,i=n.type;switch(i){case"address":return(0,o.U)(t,{strict:!1});case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:if("tuple"===i&&"components"in n)return Object.values(n.components).every((n,r)=>e(Object.values(t)[r],n));if(/^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(i))return"number"===r||"bigint"===r;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===r||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...n,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,r)})){if(t&&"inputs"in t&&t.inputs){let n=function e(t,n,r){for(let i in t){let a=t[i],s=n[i];if("tuple"===a.type&&"tuple"===s.type&&"components"in a&&"components"in s)return e(a.components,s.components,r[i]);let c=[a.type,s.type];if(c.includes("address")&&c.includes("bytes20")||(c.includes("address")&&c.includes("string")||c.includes("address")&&c.includes("bytes"))&&(0,o.U)(r[i],{strict:!1}))return c}}(e.inputs,t.inputs,c);if(n)throw new r.S4({abiItem:e,type:n[0]},{abiItem:t,type:n[1]})}t=e}}return t||d[0]}}},3621:function(e,t,n){n.d(t,{L:function(){return i}});var r=n(5774);function i(e){var t;let{blockNumber:n,chain:i,contract:o}=e,a=null==i?void 0:null===(t=i.contracts)||void 0===t?void 0:t[o];if(!a)throw new r.mm({chain:i,contract:{name:o}});if(n&&a.blockCreated&&a.blockCreated>n)throw new r.mm({blockNumber:n,chain:i,contract:{name:o,blockCreated:a.blockCreated}});return a.address}},3254:function(e,t,n){n.d(t,{q:function(){return c}});var r=n(1273);class i extends r.G{constructor({offset:e}){super("Offset `".concat(e,"` cannot be negative."),{name:"NegativeOffsetError"})}}class o extends r.G{constructor({length:e,position:t}){super("Position `".concat(t,"` is out of bounds (`0 < position < ").concat(e,"`)."),{name:"PositionOutOfBoundsError"})}}class a extends r.G{constructor({count:e,limit:t}){super("Recursive read limit of `".concat(t,"` exceeded (recursive read count: `").concat(e,"`)."),{name:"RecursiveReadLimitExceededError"})}}let s={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 a({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new o({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new i({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new i({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=null!=e?e:this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=null!=t?t:this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=null!=e?e:this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=null!=e?e:this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=null!=e?e:this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=null!=e?e:this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let n=this.inspectBytes(e);return this.position+=null!=t?t:e,n},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function c(e){let{recursiveReadLimit:t=8192}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.create(s);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}},9318:function(e,t,n){function r(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(e)}function i(e){return"0x".concat(e.reduce((e,t)=>e+t.replace("0x",""),""))}n.d(t,{SM:function(){return i},zo:function(){return r}})},3090:function(e,t,n){n.d(t,{T4:function(){return u},tP:function(){return a}});var r=n(1758),i=n(1230),o=n(5305);function a(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.v)(e,{strict:!1})?function(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};s(e,t);let i="0x".concat(e.replace("0x","").slice((null!=t?t:0)*2,(null!=n?n:e.length)*2));return r&&c(i,t,n),i}(e,t,n,{strict:r}):u(e,t,n,{strict:r})}function s(e,t){if("number"==typeof t&&t>0&&t>(0,o.d)(e)-1)throw new r.mV({offset:t,position:"start",size:(0,o.d)(e)})}function c(e,t,n){if("number"==typeof t&&"number"==typeof n&&(0,o.d)(e)!==n-t)throw new r.mV({offset:n,position:"end",size:(0,o.d)(e)})}function u(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};s(e,t);let i=e.slice(t,n);return r&&c(i,t,n),i}},5069:function(e,t,n){n.d(t,{k:function(){return o}});var r=n(1273),i=n(6463);function o(e,t){let n=(e.details||"").toLowerCase(),o=e instanceof r.G?e.walk(e=>(null==e?void 0:e.code)===i.M_.code):e;return o instanceof r.G?new i.M_({cause:e,message:o.details}):i.M_.nodeMessage.test(n)?new i.M_({cause:e,message:e.details}):i.Hh.nodeMessage.test(n)?new i.Hh({cause:e,maxFeePerGas:null==t?void 0:t.maxFeePerGas}):i.G$.nodeMessage.test(n)?new i.G$({cause:e,maxFeePerGas:null==t?void 0:t.maxFeePerGas}):i.ZI.nodeMessage.test(n)?new i.ZI({cause:e,nonce:null==t?void 0:t.nonce}):i.vU.nodeMessage.test(n)?new i.vU({cause:e,nonce:null==t?void 0:t.nonce}):i.se.nodeMessage.test(n)?new i.se({cause:e,nonce:null==t?void 0:t.nonce}):i.C_.nodeMessage.test(n)?new i.C_({cause:e}):i.WF.nodeMessage.test(n)?new i.WF({cause:e,gas:null==t?void 0:t.gas}):i.dR.nodeMessage.test(n)?new i.dR({cause:e,gas:null==t?void 0:t.gas}):i.pZ.nodeMessage.test(n)?new i.pZ({cause:e}):i.cs.nodeMessage.test(n)?new i.cs({cause:e,maxFeePerGas:null==t?void 0:t.maxFeePerGas,maxPriorityFeePerGas:null==t?void 0:t.maxPriorityFeePerGas}):new i.cj({cause:e})}},7306:function(e,t,n){n.d(t,{K:function(){return r}});function r(e,t){let{format:n}=t;if(!n)return{};let r={};return!function t(n){for(let i of Object.keys(n))i in e&&(r[i]=e[i]),n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])&&t(n[i])}(n(e||{})),r}},6547:function(e,t,n){n.d(t,{Tr:function(){return o},c8:function(){return i}});var r=n(5936);let i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function o(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?i[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}},662:function(e,t,n){n.d(t,{tG:function(){return o}});var r=n(5578);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function o(e){let t={};return void 0!==e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?(0,r.eC)(BigInt(e.r)):e.r,s:e.s?(0,r.eC)(BigInt(e.s)):e.s,chainId:(0,r.eC)(e.chainId),nonce:(0,r.eC)(e.nonce),...void 0!==e.yParity?{yParity:(0,r.eC)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,r.eC)(e.v)}:{}}))),void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map(e=>(0,r.ci)(e)):t.blobs=e.blobs),void 0!==e.data&&(t.data=e.data),void 0!==e.from&&(t.from=e.from),void 0!==e.gas&&(t.gas=(0,r.eC)(e.gas)),void 0!==e.gasPrice&&(t.gasPrice=(0,r.eC)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=(0,r.eC)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=(0,r.eC)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,r.eC)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(t.nonce=(0,r.eC)(e.nonce)),void 0!==e.to&&(t.to=e.to),void 0!==e.type&&(t.type=i[e.type]),void 0!==e.value&&(t.value=(0,r.eC)(e.value)),t}},1935:function(e,t,n){n.d(t,{s:function(){return r}});function r(e,t,n){let r=e[t.name];if("function"==typeof r)return r;let i=e[n];return"function"==typeof i?i:n=>t(e,n)}},9226:function(e,t,n){n.d(t,{C:function(){return o}});var r=n(3090),i=n(4836);let o=e=>(0,r.tP)((0,i.r)(e),0,4)},4836:function(e,t,n){n.d(t,{r:function(){return d}});var r=n(3596),i=n(2112);let o=e=>(0,i.w)((0,r.O0)(e));var a=n(7032);let s=RegExp("^tuple(?(\\[(\\d*)\\])*)$");function c(e){let t="",n=e.length;for(let r=0;r{var t;return function(e){let t=!0,n="",r=0,i="",o=!1;for(let a=0;a{let{slot:n,value:r}=t;if(66!==n.length)throw new i.W_({size:n.length,targetSize:66,type:"hex"});if(66!==r.length)throw new i.W_({size:r.length,targetSize:66,type:"hex"});return e[n]=r,e},{})}function u(e){if(!e)return;let t={};for(let{address:n,...i}of e){if(!(0,a.U)(n,{strict:!1}))throw new r.b({address:n});if(t[n])throw new o.Nc({address:n});t[n]=function(e){let{balance:t,nonce:n,state:r,stateDiff:i,code:a}=e,u={};if(void 0!==a&&(u.code=a),void 0!==t&&(u.balance=(0,s.eC)(t)),void 0!==n&&(u.nonce=(0,s.eC)(n)),void 0!==r&&(u.state=c(r)),void 0!==i){if(u.state)throw new o.Z8;u.stateDiff=c(i)}return u}(i)}return t}},9605:function(e,t,n){n.d(t,{F:function(){return u}});var r=n(9561);let i=2n**256n-1n;var o=n(4898),a=n(6463),s=n(289),c=n(4433);function u(e){let{account:t,gasPrice:n,maxFeePerGas:u,maxPriorityFeePerGas:l,to:d}=e,h=t?(0,r.T)(t):void 0;if(h&&!(0,c.U)(h.address))throw new o.b({address:h.address});if(d&&!(0,c.U)(d))throw new o.b({address:d});if(void 0!==n&&(void 0!==u||void 0!==l))throw new s.xY;if(u&&u>i)throw new a.Hh({maxFeePerGas:u});if(l&&u&&l>u)throw new a.cs({maxFeePerGas:u,maxPriorityFeePerGas:l})}},2926:function(e,t,n){n.d(t,{d:function(){return o}});var r=n(4817),i=n(989);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,i.b)(e,r.ez[t])}},8206:function(e,t,n){n.d(t,{o:function(){return o}});var r=n(4817),i=n(989);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,i.b)(e,r.Zn[t])}},989:function(e,t,n){n.d(t,{b:function(){return r}});function r(e,t){let n=e.toString(),r=n.startsWith("-");r&&(n=n.slice(1));let[i,o]=[(n=n.padStart(t,"0")).slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),"".concat(r?"-":"").concat(i||"0").concat(o?".".concat(o):"")}},6796:function(e,t,n){n.d(t,{f:function(){return a}});var r=n(4817),i=n(1273);class o extends i.G{constructor({value:e}){super("Number `".concat(e,"` is not a valid decimal number."),{name:"InvalidDecimalNumberError"})}}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new o({value:e});let[n,r="0"]=e.split("."),i=n.startsWith("-");if(i&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(".".concat(r)))&&(n="".concat(BigInt(n)+1n)),r="";else if(r.length>t){let[e,i,o]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],a=Math.round(Number("".concat(i,".").concat(o)));(r=a>9?"".concat(BigInt(e)+BigInt(1),"0").padStart(e.length+1,"0"):"".concat(e).concat(a)).length>t&&(r=r.slice(1),n="".concat(BigInt(n)+1n)),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt("".concat(i?"-":"").concat(n).concat(r))}(e,r.ez[t])}},5651:function(e,t,n){n.d(t,{JQ:function(){return l}});var r=n(2674),i=n(7721);class o extends i.kb{update(e){(0,r.$h)(this);let{view:t,buffer:n,blockLen:o}=this,a=(e=(0,i.O0)(e)).length;for(let r=0;ro-s&&(this.process(n,0),s=0);for(let e=s;e>i&o),s=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,a,r),e.setUint32(t+u,s,r)}(n,o-8,BigInt(8*this.length),a),this.process(n,0);let c=(0,i.GL)(e),u=this.outputLen;if(u%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=u/4,d=this.get();if(l>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>>3,o=(0,i.np)(n,17)^(0,i.np)(n,19)^n>>>10;c[e]=o+c[e-7]+r+c[e-16]|0}let{A:n,B:r,C:o,D:s,E:u,F:l,G:d,H:h}=this;for(let e=0;e<64;e++){var f,p,b,v;let t=h+((0,i.np)(u,6)^(0,i.np)(u,11)^(0,i.np)(u,25))+((f=u)&l^~f&d)+a[e]+c[e]|0,m=((0,i.np)(n,2)^(0,i.np)(n,13)^(0,i.np)(n,22))+((p=n)&(b=r)^p&(v=o)^b&v)|0;h=d,d=l,l=u,u=s+t|0,s=o,o=r,r=n,n=t+m|0}n=n+this.A|0,r=r+this.B|0,o=o+this.C|0,s=s+this.D|0,u=u+this.E|0,l=l+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(n,r,o,s,u,l,d,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}constructor(e=32){super(64,e,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}}let l=(0,i.hE)(()=>new u)},9311:function(e,t,n){n.d(t,{m:function(){return u}});var r=n(9022);function i(e){let t=e.state.current,n=e.state.connections.get(t),r=null==n?void 0:n.accounts,i=null==r?void 0:r[0],o=e.chains.find(e=>e.id===(null==n?void 0:n.chainId)),a=e.state.status;switch(a){case"connected":return{address:i,addresses:r,chain:o,chainId:null==n?void 0:n.chainId,connector:null==n?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:a};case"reconnecting":return{address:i,addresses:r,chain:o,chainId:null==n?void 0:n.chainId,connector:null==n?void 0:n.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:a};case"connecting":return{address:i,addresses:r,chain:o,chainId:null==n?void 0:n.chainId,connector:null==n?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:a};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:a}}}var o=n(2887),a=n(4090),s=n(9292);let c=e=>"object"==typeof e&&!Array.isArray(e);function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.Z)(e);return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.v,o=(0,a.useRef)([]),u=(0,s.useSyncExternalStoreWithSelector)(e,t,n,e=>e,(e,t)=>{if(c(e)&&c(t)&&o.current.length){for(let n of o.current)if(!i(e[n],t[n]))return!1;return!0}return i(e,t)});return(0,a.useMemo)(()=>{if(c(u)){let e={...u},t={};for(let[n,r]of Object.entries(e))t={...t,[n]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(n)||o.current.push(n),r)}};return Object.defineProperties(e,t),e}return u},[u])}(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(()=>i(e),n,{equalityFn(e,t){let{connector:n,...i}=e,{connector:o,...a}=t;return(0,r.v)(i,a)&&(null==n?void 0:n.id)===(null==o?void 0:o.id)&&(null==n?void 0:n.uid)===(null==o?void 0:o.uid)}})})(t,{onChange:e}),()=>i(t))}},83:function(e,t,n){n.d(t,{K:function(){return O}});var r=n(5936),i=n(8142),o=n(989),a=n(2756),s=n(7225),c=n(4817);function u(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(c.Bd[e])}var l=n(7115),d=n(35),h=n(5581),f=n(1273),p=n(7470),b=n(7210),v=n(3621),m=n(7825),y=n(4473);function g(e,t){let{abi:n,address:r,args:i,docsPath:o,functionName:a,sender:s}=t,c=e instanceof l.VQ?e:e instanceof f.G?e.walk(e=>"data"in e)||e.walk():{},{code:u,data:d,details:p,message:b,shortMessage:v}=c,g=e instanceof h.wb?new l.Dk({functionName:a}):[3,y.XS.code].includes(u)&&(d||p||b||v)?new l.Lu({abi:n,data:"object"==typeof d?d.data:d,functionName:a,message:c instanceof m.bs?p:null!=v?v:b}):e;return new l.uq(g,{abi:n,args:i,contractAddress:r,docsPath:o,functionName:a,sender:s})}var w=n(1935),x=n(1022);async function P(e,t){let{abi:n,address:r,args:i,functionName:o,...a}=t,s=(0,b.R)({abi:n,args:i,functionName:o});try{let{data:t}=await (0,w.s)(e,x.R,"call")({...a,data:s,to:r});return(0,p.k)({abi:n,args:i,functionName:o,data:t||"0x"})}catch(e){throw g(e,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:o})}}async function _(e,t){var n;let{account:r,allowFailure:i=!0,batchSize:o,blockNumber:a,blockTag:s,multicallAddress:c,stateOverride:u}=t,m=t.contracts,y=null!=o?o:"object"==typeof(null===(n=e.batch)||void 0===n?void 0:n.multicall)&&e.batch.multicall.batchSize||1024,x=c;if(!x){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");x=(0,v.L)({blockNumber:a,chain:e.chain,contract:"multicall3"})}let _=[[]],I=0,C=0;for(let e=0;e0&&C>y&&_[I].length>0&&(I++,C=(e.length-2)/2,_[I]=[]),_[I]=[..._[I],{allowFailure:!0,callData:e,target:n}]}catch(s){let e=g(s,{abi:t,address:n,args:o,docsPath:"/docs/contract/multicall",functionName:a,sender:r});if(!i)throw e;_[I]=[..._[I],{allowFailure:!0,callData:"0x",target:n}]}}let E=await Promise.allSettled(_.map(t=>(0,w.s)(e,P,"readContract")({abi:d.F8,account:r,address:x,args:[t],blockNumber:a,blockTag:s,functionName:"aggregate3",stateOverride:u}))),k=[];for(let e=0;e{let[a,s]=t;return I(e,{...o,allowFailure:n,blockNumber:r,blockTag:i,chainId:Number.parseInt(a),contracts:s.map(e=>{let{contract:t}=e;return t})})}))).flat(),l=Object.values(t).flatMap(e=>e.map(e=>{let{index:t}=e;return t}));return s.reduce((e,t,n)=>(e&&(e[l[n]]=t),e),[])}catch(o){if(o instanceof l.uq)throw o;let t=()=>a.map(t=>(function(e,t){let{chainId:n,...r}=t,i=e.getClient({chainId:n});return(0,s.s)(i,P,"readContract")(r)})(e,{...t,blockNumber:r,blockTag:i}));if(n)return(await Promise.allSettled(t())).map(e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"});return await Promise.all(t())}}async function E(e,t){var n;let{address:c,blockNumber:l,blockTag:d,chainId:h,token:f,unit:p="ether"}=t;if(f)try{return await k(e,{balanceAddress:c,chainId:h,symbolType:"string",tokenAddress:f})}catch(t){if("ContractFunctionExecutionError"===t.name){let t=await k(e,{balanceAddress:c,chainId:h,symbolType:"bytes32",tokenAddress:f}),n=(0,r.rR)((0,i.f)(t.symbol,{dir:"right"}));return{...t,symbol:n}}throw t}let b=e.getClient({chainId:h}),v=(0,s.s)(b,a.s,"getBalance"),m=await v(l?{address:c,blockNumber:l}:{address:c,blockTag:d}),y=null!==(n=e.chains.find(e=>e.id===h))&&void 0!==n?n:b.chain;return{decimals:y.nativeCurrency.decimals,formatted:(0,o.b)(m,u(p)),symbol:y.nativeCurrency.symbol,value:m}}async function k(e,t){let{balanceAddress:n,chainId:r,symbolType:i,tokenAddress:a,unit:s}=t,c={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:i}]}],address:a},[l,d,h]=await C(e,{allowFailure:!1,contracts:[{...c,functionName:"balanceOf",args:[n],chainId:r},{...c,functionName:"decimals",chainId:r},{...c,functionName:"symbol",chainId:r}]}),f=(0,o.b)(null!=l?l:"0",u(null!=s?s:d));return{decimals:d,formatted:f,symbol:h,value:l}}var G=n(3054),M=n(1605),B=n(3089),F=n(2887);function O(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{address:r,query:i={}}=n,o=(0,F.Z)(n),a=(0,B.x)({config:o}),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{async queryFn(t){let{queryKey:n}=t,{address:r,scopeKey:i,...o}=n[1];if(!r)throw Error("address is required");let a=await E(e,{...o,address:r});return null!=a?a:null},queryKey:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return["balance",(0,G.OP)(e)]}(t)}}(o,{...n,chainId:null!==(e=n.chainId)&&void 0!==e?e:a}),c=!!(r&&(null===(t=i.enabled)||void 0===t||t));return(0,M.aM)({...i,...s,enabled:c})}},3089:function(e,t,n){function r(e){return e.state.chainId}n.d(t,{x:function(){return a}});var i=n(4090),o=n(2887);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.Z)(e);return(0,i.useSyncExternalStore)(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(e=>e.chainId,n)})(t,{onChange:e}),()=>r(t),()=>r(t))}},2887:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(4090),i=n(604),o=n(1257);let a=()=>"wagmi@".concat("2.15.3");class s extends o.G{get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return a()}constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}}class c extends s{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function u(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=null!==(e=t.config)&&void 0!==e?e:(0,r.useContext)(i.V);if(!n)throw new c;return n}},1169:function(e,t,n){n.d(t,{$:function(){return d}});var r=n(568),i=n(2731);async function o(e,t){let n;if((n="function"==typeof t.connector?e._internal.connectors.setup(t.connector):t.connector).uid===e.state.current)throw new i.wi;try{var r;e.setState(e=>({...e,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});let{connector:i,...o}=t,a=await n.connect(o),s=a.accounts;return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await (null===(r=e.storage)||void 0===r?void 0:r.setItem("recentConnectorId",n.id)),e.setState(e=>({...e,connections:new Map(e.connections).set(n.uid,{accounts:s,chainId:a.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:s,chainId:a.chainId}}catch(t){throw e.setState(e=>({...e,status:e.current?"connected":"disconnected"})),t}}var a=n(4090),s=n(2887),c=n(9022);let u=[];function l(e){let t=e.connectors;return(0,c.v)(u,t)?u:(u=t,t)}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mutation:t}=e,n=(0,s.Z)(e),{mutate:i,mutateAsync:c,...u}=(0,r.D)({...t,mutationFn:e=>o(n,e),mutationKey:["connect"]});return(0,a.useEffect)(()=>n.subscribe(e=>{let{status:t}=e;return t},(e,t)=>{"connected"===t&&"disconnected"===e&&u.reset()}),[n,u.reset]),{...u,connect:i,connectAsync:c,connectors:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,s.Z)(e);return(0,a.useSyncExternalStore)(e=>(function(e,t){let{onChange:n}=t;return e._internal.connectors.subscribe((e,t)=>{n(Object.values(e),t)})})(t,{onChange:e}),()=>l(t),()=>l(t))}({config:n})}}},536:function(e,t,n){n.d(t,{q:function(){return l}});var r=n(568);async function i(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.connector)t=n.connector;else{let{connections:n,current:r}=e.state,i=n.get(r);t=null==i?void 0:i.connector}let r=e.state.connections;t&&(await t.disconnect(),t.emitter.off("change",e._internal.events.change),t.emitter.off("disconnect",e._internal.events.disconnect),t.emitter.on("connect",e._internal.events.connect),r.delete(t.uid)),e.setState(e=>{if(0===r.size)return{...e,connections:new Map,current:null,status:"disconnected"};let t=r.values().next().value;return{...e,connections:new Map(r),current:t.connector.uid}});{var i,o;let t=e.state.current;if(!t)return;let n=null===(i=e.state.connections.get(t))||void 0===i?void 0:i.connector;if(!n)return;await (null===(o=e.storage)||void 0===o?void 0:o.setItem("recentConnectorId",n.id))}}var o=n(2887),a=n(9022);let s=[];function c(e){let t=[...e.state.connections.values()];return"reconnecting"===e.state.status||(0,a.v)(s,t)?s:(s=t,t)}var u=n(4090);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mutation:t}=e,n=(0,o.Z)(e),{mutate:s,mutateAsync:l,...d}=(0,r.D)({...t,mutationFn:e=>i(n,e),mutationKey:["disconnect"]});return{...d,connectors:(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.Z)(e);return(0,u.useSyncExternalStore)(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(()=>c(e),n,{equalityFn:a.v})})(t,{onChange:e}),()=>c(t),()=>c(t))})({config:n}).map(e=>e.connector),disconnect:s,disconnectAsync:l}}},4161:function(e,t,n){n.d(t,{p:function(){return el}});var r=n(568),i=n(9561),o=n(1273);class a extends o.G{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class s extends o.G{constructor({docsPath:e,metaMessages:t,type:n}){super('Account type "'.concat(n,'" is not supported.'),{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}var c=n(5036),u=n(2112),l=n(1230),d=n(5305),h=n(5936),f=n(5578);async function p(e){let{hash:t,signature:r}=e,i=(0,l.v)(t)?t:(0,f.NC)(t),{secp256k1:o}=await n.e(298).then(n.bind(n,2298)),a=(()=>{if("object"==typeof r&&"r"in r&&"s"in r){let{r:e,s:t,v:n,yParity:i}=r,a=b(Number(null!=i?i:n));return new o.Signature((0,h.y_)(e),(0,h.y_)(t)).addRecoveryBit(a)}let e=(0,l.v)(r)?r:(0,f.NC)(r);if(65!==(0,d.d)(e))throw Error("invalid signature length");let t=b((0,h.ly)("0x".concat(e.slice(130))));return o.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(t)})().recoverPublicKey(i.substring(2)).toHex(!1);return"0x".concat(a)}function b(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}async function v(e){let{hash:t,signature:n}=e;return function(e){let t=(0,u.w)("0x".concat(e.substring(4))).substring(26);return(0,c.x)("0x".concat(t))}(await p({hash:t,signature:n}))}var m=n(9318),y=n(3596),g=n(3254);function w(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new o.G("Length is too large.")}async function x(e){let{authorization:t,signature:n}=e;return v({hash:function(e){var t;let{chainId:n,nonce:r,to:i}=e,o=null!==(t=e.contractAddress)&&void 0!==t?t:e.address,a=(0,u.w)((0,m.SM)(["0x05",function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex",n=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),n=w(t);return{length:t<=55?1+t:1+n+t,encode(r){for(let{encode:i}of(t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t)),e))i(r)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,y.nr)(e):e,n=w(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),r=(0,g.q)(new Uint8Array(n.length));return(n.encode(r),"hex"===t)?(0,f.ci)(r.bytes):r.bytes}([n?(0,f.eC)(n):"0x",o,r?(0,f.eC)(r):"0x"])]));return"bytes"===i?(0,y.nr)(a):a}(t),signature:null!=n?n:t})}var P=n(5774),_=n(6463),I=n(289),C=n(5069),E=n(7306),k=n(662),G=n(1935),M=n(686),B=n(9605);async function F(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,h.ly)(t)}var O=n(8206);class A extends o.G{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class R extends o.G{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class S extends o.G{constructor({maxPriorityFeePerGas:e}){super("`maxFeePerGas` cannot be less than the `maxPriorityFeePerGas` (".concat((0,O.o)(e)," gwei)."),{name:"MaxFeePerGasTooLowError"})}}var T=n(1565);async function N(e){return BigInt(await e.request({method:"eth_gasPrice"}))}async function j(e,t){let{block:n,chain:r=e.chain,request:i}=t||{};try{var o,a,s;let t=null!==(s=null==r?void 0:null===(o=r.fees)||void 0===o?void 0:o.maxPriorityFeePerGas)&&void 0!==s?s:null==r?void 0:null===(a=r.fees)||void 0===a?void 0:a.defaultPriorityFee;if("function"==typeof t){let r=n||await (0,G.s)(e,T.Q,"getBlock")({}),o=await t({block:r,client:e,request:i});if(null===o)throw Error();return o}if(void 0!==t)return t;let c=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,h.y_)(c)}catch(o){let[t,r]=await Promise.all([n?Promise.resolve(n):(0,G.s)(e,T.Q,"getBlock")({}),(0,G.s)(e,N,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new R;let i=r-t.baseFeePerGas;if(i<0n)return 0n;return i}}async function z(e,t){var n,r,i,o,a;let{block:s,chain:c=e.chain,request:u,type:l="eip1559"}=t||{},d=await (async()=>{var t,n,r;return"function"==typeof(null==c?void 0:null===(t=c.fees)||void 0===t?void 0:t.baseFeeMultiplier)?c.fees.baseFeeMultiplier({block:s,client:e,request:u}):null!==(r=null==c?void 0:null===(n=c.fees)||void 0===n?void 0:n.baseFeeMultiplier)&&void 0!==r?r:1.2})();if(d<1)throw new A;let h=10**(null!==(i=null===(n=d.toString().split(".")[1])||void 0===n?void 0:n.length)&&void 0!==i?i:0),f=e=>e*BigInt(Math.ceil(d*h))/BigInt(h),p=s||await (0,G.s)(e,T.Q,"getBlock")({});if("function"==typeof(null==c?void 0:null===(r=c.fees)||void 0===r?void 0:r.estimateFeesPerGas)){let t=await c.fees.estimateFeesPerGas({block:s,client:e,multiply:f,request:u,type:l});if(null!==t)return t}if("eip1559"===l){if("bigint"!=typeof p.baseFeePerGas)throw new R;let t="bigint"==typeof(null==u?void 0:u.maxPriorityFeePerGas)?u.maxPriorityFeePerGas:await j(e,{block:p,chain:c,request:u}),n=f(p.baseFeePerGas);return{maxFeePerGas:null!==(o=null==u?void 0:u.maxFeePerGas)&&void 0!==o?o:n+t,maxPriorityFeePerGas:t}}return{gasPrice:null!==(a=null==u?void 0:u.gasPrice)&&void 0!==a?a:f(await (0,G.s)(e,N,"getGasPrice")({}))}}var U=n(2926);class L extends o.G{constructor(e,{account:t,docsPath:n,chain:r,data:i,gas:o,gasPrice:a,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d}){var h;super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,I.xr)({from:null==t?void 0:t.address,to:l,value:void 0!==d&&"".concat((0,U.d)(d)," ").concat((null==r?void 0:null===(h=r.nativeCurrency)||void 0===h?void 0:h.symbol)||"ETH"),data:i,gas:o,gasPrice:void 0!==a&&"".concat((0,O.o)(a)," gwei"),maxFeePerGas:void 0!==s&&"".concat((0,O.o)(s)," gwei"),maxPriorityFeePerGas:void 0!==c&&"".concat((0,O.o)(c)," gwei"),nonce:u})].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}var D=n(6403),q=n(2756);async function Z(e,t){let{account:n=e.account}=t,r=n?(0,i.T)(n):void 0;try{var a,s,c;let{accessList:n,authorizationList:i,blobs:l,blobVersionedHashes:d,blockNumber:h,blockTag:p,data:b,gas:v,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:w,nonce:P,value:_,stateOverride:I,...C}=await X(e,{...t,parameters:(null==r?void 0:r.type)==="local"?void 0:["blobVersionedHashes"]}),G=("bigint"==typeof h?(0,f.eC)(h):void 0)||p,M=(0,D.mF)(I),F=await (async()=>C.to?C.to:i&&i.length>0?await x({authorization:i[0]}).catch(()=>{throw new o.G("`to` is required. Could not infer from `authorizationList`")}):void 0)();(0,B.F)(t);let O=null===(c=e.chain)||void 0===c?void 0:null===(s=c.formatters)||void 0===s?void 0:null===(a=s.transactionRequest)||void 0===a?void 0:a.format,A=(O||k.tG)({...(0,E.K)(C,{format:O}),from:null==r?void 0:r.address,accessList:n,authorizationList:i,blobs:l,blobVersionedHashes:d,data:b,gas:v,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:w,nonce:P,to:F,value:_});function u(t){let{block:n,request:r,rpcStateOverride:i}=t;return e.request({method:"eth_estimateGas",params:i?[r,null!=n?n:"latest",i]:n?[r,n]:[r]})}let R=BigInt(await u({block:G,request:A,rpcStateOverride:M}));if(i){let t=await (0,q.s)(e,{address:A.from}),n=await Promise.all(i.map(async e=>{let{address:n}=e,i=await u({block:G,request:{authorizationList:void 0,data:b,from:null==r?void 0:r.address,to:n,value:(0,f.eC)(t)},rpcStateOverride:M}).catch(()=>100000n);return 2n*BigInt(i)}));R+=n.reduce((e,t)=>e+t,0n)}return R}catch(n){throw function(e,t){let{docsPath:n,...r}=t;return new L((()=>{let t=(0,C.k)(e,r);return t instanceof _.cj?e:t})(),{docsPath:n,...r})}(n,{...t,account:r,chain:e.chain})}}async function W(e,t){let{address:n,blockTag:r="latest",blockNumber:i}=t,o=await e.request({method:"eth_getTransactionCount",params:[n,"bigint"==typeof i?(0,f.eC)(i):r]},{dedupe:!!i});return(0,h.ly)(o)}function H(e){var t;let{kzg:n}=e,r=null!==(t=e.to)&&void 0!==t?t:"string"==typeof e.blobs[0]?"hex":"bytes",i="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,y.nr)(e)):e.blobs,o=[];for(let e of i)o.push(Uint8Array.from(n.blobToKzgCommitment(e)));return"bytes"===r?o:o.map(e=>(0,f.ci)(e))}function $(e){var t;let{kzg:n}=e,r=null!==(t=e.to)&&void 0!==t?t:"string"==typeof e.blobs[0]?"hex":"bytes",i="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,y.nr)(e)):e.blobs,o="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,y.nr)(e)):e.commitments,a=[];for(let e=0;e(0,f.ci)(e))}var V=n(5651);class K extends o.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:["Max: ".concat(e," bytes"),"Given: ".concat(t," bytes")],name:"BlobSizeTooLargeError"})}}class Q extends o.G{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}let Y=["blobVersionedHashes","chainId","fees","gas","nonce","type"],J=new Map;async function X(e,t){let n,r;let{account:o=e.account,blobs:a,chain:s,gas:c,kzg:u,nonce:h,nonceManager:p,parameters:b=Y,type:v}=t,m=o?(0,i.T)(o):o,w={...t,...m?{from:null==m?void 0:m.address}:{}};async function x(){return n||(n=await (0,G.s)(e,T.Q,"getBlock")({blockTag:"latest"}))}async function P(){return r||(s?s.id:void 0!==t.chainId?t.chainId:r=await (0,G.s)(e,F,"getChainId")({}))}if(b.includes("nonce")&&void 0===h&&m){if(p){let t=await P();w.nonce=await p.consume({address:m.address,chainId:t,client:e})}else w.nonce=await (0,G.s)(e,W,"getTransactionCount")({address:m.address,blockTag:"pending"})}if((b.includes("blobVersionedHashes")||b.includes("sidecars"))&&a&&u){let e=H({blobs:a,kzg:u});if(b.includes("blobVersionedHashes")){let t=function(e){var t;let{commitments:n,version:r}=e,i=null!==(t=e.to)&&void 0!==t?t:"string"==typeof n[0]?"hex":"bytes",o=[];for(let e of n)o.push(function(e){var t;let{commitment:n,version:r=1}=e,i=null!==(t=e.to)&&void 0!==t?t:"string"==typeof n?"hex":"bytes",o=function(e,t){let n=(0,V.JQ)((0,l.v)(e,{strict:!1})?(0,y.O0)(e):e);return"bytes"===(t||"hex")?n:(0,f.NC)(n)}(n,"bytes");return o.set([r],0),"bytes"===i?o:(0,f.ci)(o)}({commitment:e,to:i,version:r}));return o}({commitments:e,to:"hex"});w.blobVersionedHashes=t}if(b.includes("sidecars")){let t=$({blobs:a,commitments:e,kzg:u}),n=function(e){var t,n,r;let{data:i,kzg:o,to:a}=e,s=null!==(t=e.blobs)&&void 0!==t?t:function(e){var t;let n=null!==(t=e.to)&&void 0!==t?t:"string"==typeof e.data?"hex":"bytes",r="string"==typeof e.data?(0,y.nr)(e.data):e.data,i=(0,d.d)(r);if(!i)throw new Q;if(i>761855)throw new K({maxSize:761855,size:i});let o=[],a=!0,s=0;for(;a;){let e=(0,g.q)(new Uint8Array(131072)),t=0;for(;t<4096;){let n=r.slice(s,s+31);if(e.pushByte(0),e.pushBytes(n),n.length<31){e.pushByte(128),a=!1;break}t++,s+=31}o.push(e)}return"bytes"===n?o.map(e=>e.bytes):o.map(e=>(0,f.ci)(e.bytes))}({data:i,to:a}),c=null!==(n=e.commitments)&&void 0!==n?n:H({blobs:s,kzg:o,to:a}),u=null!==(r=e.proofs)&&void 0!==r?r:$({blobs:s,commitments:c,kzg:o,to:a}),l=[];for(let e=0;et.to?t.to:null!==t.to&&u&&u.length>0?await x({authorization:u[0]}).catch(()=>{throw new o.G("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if((null==M?void 0:M.type)==="json-rpc"||null===M){let t;null!==r&&(t=await (0,G.s)(e,F,"getChainId")({}),function(e){let{chain:t,currentChainId:n}=e;if(!t)throw new P.Bk;if(n!==t.id)throw new P.Yl({chain:t,currentChainId:n})}({currentChainId:t,chain:r}));let i=null===(R=e.chain)||void 0===R?void 0:null===(A=R.formatters)||void 0===A?void 0:null===(O=A.transactionRequest)||void 0===O?void 0:O.format,o=(i||k.tG)({...(0,E.K)(w,{format:i}),accessList:c,authorizationList:u,blobs:l,chainId:t,data:d,from:null==M?void 0:M.address,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:b,maxPriorityFeePerGas:v,nonce:m,to:n,type:y,value:g}),a=et.get(e.uid);try{return await e.request({method:a?"wallet_sendTransaction":"eth_sendTransaction",params:[o]},{retryCount:0})}catch(t){if(!1===a)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[o]},{retryCount:0}).then(t=>(et.set(e.uid,!0),t)).catch(n=>{if("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name)throw et.set(e.uid,!1),t;throw n});throw t}}if((null==M?void 0:M.type)==="local"){let t=await (0,G.s)(e,X,"prepareTransactionRequest")({account:M,accessList:c,authorizationList:u,blobs:l,chain:r,data:d,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:b,maxPriorityFeePerGas:v,nonce:m,nonceManager:M.nonceManager,parameters:[...Y,"sidecars"],type:y,value:g,...w,to:n}),i=null==r?void 0:null===(S=r.serializers)||void 0===S?void 0:S.transaction,o=await M.signTransaction(t,{serializer:i});return await (0,G.s)(e,ee,"sendRawTransaction")({serializedTransaction:o})}if((null==M?void 0:M.type)==="smart")throw new s({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new s({docsPath:"/docs/actions/wallet/sendTransaction",type:null==M?void 0:M.type})}catch(e){if(e instanceof s)throw e;throw function(e,t){let{docsPath:n,...r}=t,i=(()=>{let t=(0,C.k)(e,r);return t instanceof _.cj?e:t})();return new I.mk(i,{docsPath:n,...r})}(e,{...t,account:M,chain:t.chain||void 0})}}var er=n(7225),ei=n(9187),eo=n(2191),ea=n(2731);async function es(e){var t,n;let r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o.connector){let{connector:t}=o;if("reconnecting"===e.state.status&&!t.getAccounts&&!t.getChainId)throw new ea.$S({connector:t});let[n,i]=await Promise.all([t.getAccounts().catch(e=>{if(null===o.account)return[];throw e}),t.getChainId()]);r={accounts:n,chainId:i,connector:t}}else r=e.state.connections.get(e.state.current);if(!r)throw new ea.aH;let a=null!==(t=o.chainId)&&void 0!==t?t:r.chainId,s=await r.connector.getChainId();if(s!==r.chainId)throw new ea.XZ({connectionChainId:r.chainId,connectorChainId:s});let u=r.connector;if(u.getClient)return u.getClient({chainId:a});let l=(0,i.T)(null!==(n=o.account)&&void 0!==n?n:r.accounts[0]);if(l&&(l.address=(0,c.K)(l.address)),o.account&&!r.accounts.some(e=>e.toLowerCase()===l.address.toLowerCase()))throw new ea.JK({address:l.address,connector:u});let d=e.chains.find(e=>e.id===a),h=await r.connector.getProvider({chainId:a});return(0,ei.e)({account:l,chain:d,name:"Connector Client",transport:e=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{key:n="custom",methods:r,name:i="Custom Provider",retryDelay:o}=t;return a=>{var s;let{retryCount:c}=a;return(0,eo.q)({key:n,methods:r,name:i,request:e.request.bind(e),retryCount:null!==(s=t.retryCount)&&void 0!==s?s:c,retryDelay:o,type:"custom"})}})(h)({...e,retryCount:0})})}async function ec(e,t){var n;let r;let{account:i,chainId:o,connector:a,...s}=t;r="object"==typeof i&&(null==i?void 0:i.type)==="local"?e.getClient({chainId:o}):await es(e,{account:null!=i?i:void 0,chainId:o,connector:a});let c=(0,er.s)(r,en,"sendTransaction");return await c({...s,...i?{account:i}:{},chain:o?{id:o}:null,gas:null!==(n=s.gas)&&void 0!==n?n:void 0})}var eu=n(2887);function el(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mutation:n}=t,i=(e=(0,eu.Z)(t),{mutationFn:t=>ec(e,t),mutationKey:["sendTransaction"]}),{mutate:o,mutateAsync:a,...s}=(0,r.D)({...n,...i});return{...s,sendTransaction:o,sendTransactionAsync:a}}},7206:function(e,t,n){n.d(t,{o:function(){return h}});var r=n(568),i=n(2731),o=n(4497);async function a(e,t){var n,r;let{addEthereumChainParameter:a,chainId:s}=t,c=e.state.connections.get(null!==(r=null===(n=t.connector)||void 0===n?void 0:n.uid)&&void 0!==r?r:e.state.current);if(c){let e=c.connector;if(!e.switchChain)throw new o.O({connector:e});return await e.switchChain({addEthereumChainParameter:a,chainId:s})}let u=e.chains.find(e=>e.id===s);if(!u)throw new i.X4;return e.setState(e=>({...e,chainId:s})),u}var s=n(9022);let c=[];function u(e){let t=e.chains;return(0,s.v)(c,t)?c:(c=t,t)}var l=n(4090),d=n(2887);function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mutation:t}=e,n=(0,d.Z)(e),{mutate:i,mutateAsync:o,...s}=(0,r.D)({...t,mutationFn:e=>a(n,e),mutationKey:["switchChain"]});return{...s,chains:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,d.Z)(e);return(0,l.useSyncExternalStore)(e=>(function(e,t){let{onChange:n}=t;return e._internal.chains.subscribe((e,t)=>{n(e,t)})})(t,{onChange:e}),()=>u(t),()=>u(t))}({config:n}),switchChain:i,switchChainAsync:o}}},823:function(e,t,n){n.d(t,{A:function(){return S}});var r=n(5936),i=n(410),o=n(289),a=n(1935);let s=new Map,c=new Map,u=0;function l(e,t,n){let r=++u,i=()=>s.get(e)||[],o=()=>{let t=i();s.set(e,t.filter(e=>e.id!==r))},a=()=>{let t=i();if(!t.some(e=>e.id===r))return;let n=c.get(e);1===t.length&&n&&n(),o()},l=i();if(s.set(e,[...l,{id:r,fns:t}]),l&&l.length>0)return a;let d={};for(let e in t)d[e]=function(){for(var t,n,r=arguments.length,o=Array(r),a=0;a(function(e){let{args:t,eventName:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}})(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?y[e.status]:null,type:e.type?v.c8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t})(c)}var w=n(3440);let x=new Map,P=new Map;async function _(e,t){let{cacheKey:n,cacheTime:r=Number.POSITIVE_INFINITY}=t,i=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,x),r=t(e,P);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}(n),o=i.response.get();if(o&&r>0&&new Date().getTime()-o.created.getTime()"blockNumber.".concat(e);async function C(e){let{cacheTime:t=e.cacheTime}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return BigInt(await _(()=>e.request({method:"eth_blockNumber"}),{cacheKey:I(e.uid),cacheTime:t}))}function E(e,t){let n,{emitOnBegin:i=!1,emitMissed:o=!1,onBlockNumber:s,onError:c,poll:u,pollingInterval:d=e.pollingInterval}=t;return(void 0!==u?u:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type))?l((0,f.P)(["watchBlockNumber",e.uid,i,o,d]),{onBlockNumber:s,onError:c},t=>(function(e,t){let{emitOnBegin:n,initialWaitTime:r,interval:i}=t,o=!0,a=()=>o=!1;return(async()=>{var t;let s;n&&(s=await e({unpoll:a}));let c=null!==(t=await (null==r?void 0:r(s)))&&void 0!==t?t:i;await (0,w.D)(c);let u=async()=>{o&&(await e({unpoll:a}),await (0,w.D)(i),u())};u()})(),a})(async()=>{try{let r=await (0,a.s)(e,C,"getBlockNumber")({cacheTime:0});if(n){if(r===n)return;if(r-n>1&&o)for(let e=n+1n;en)&&(t.onBlockNumber(r,n),n=r)}catch(e){var r;null===(r=t.onError)||void 0===r||r.call(t,e)}},{emitOnBegin:i,interval:d})):l((0,f.P)(["watchBlockNumber",e.uid,i,o]),{onBlockNumber:s,onError:c},t=>{let i=!0,o=()=>i=!1;return(async()=>{try{let a=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:s}=await a.subscribe({params:["newHeads"],onData(e){var o;if(!i)return;let a=(0,r.y_)(null===(o=e.result)||void 0===o?void 0:o.number);t.onBlockNumber(a,n),n=a},onError(e){var n;null===(n=t.onError)||void 0===n||n.call(t,e)}});o=s,i||o()}catch(e){null==c||c(e)}})(),()=>o()})}async function k(e,t){let n,r,s,{confirmations:c=1,hash:u,onReplaced:b,pollingInterval:v=e.pollingInterval,retryCount:y=6,retryDelay:w=e=>{let{count:t}=e;return 200*~~(1<k(new o.mc({hash:u})),x):void 0,M=l(P,{onReplaced:b,resolve:C,reject:k},t=>{let l=(0,a.s)(e,E,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:v,async onBlockNumber(d){let f=e=>{clearTimeout(G),l(),e(),M()},b=d;if(!_)try{if(s){if(c>1&&(!s.blockNumber||b-s.blockNumber+1nt.resolve(s));return}if(n||(_=!0,await (0,h.J)(async()=>{(n=await (0,a.s)(e,m,"getTransaction")({hash:u})).blockNumber&&(b=n.blockNumber)},{delay:w,retryCount:y}),_=!1),s=await (0,a.s)(e,g,"getTransactionReceipt")({hash:u}),c>1&&(!s.blockNumber||b-s.blockNumber+1nt.resolve(s))}catch(u){if(u instanceof o.Bh||u instanceof o.Yb){if(!n){_=!1;return}try{r=n,_=!0;let o=await (0,h.J)(()=>(0,a.s)(e,p.Q,"getBlock")({blockNumber:b,includeTransactions:!0}),{delay:w,retryCount:y,shouldRetry:e=>{let{error:t}=e;return t instanceof i.f}});_=!1;let u=o.transactions.find(e=>{let{from:t,nonce:n}=e;return t===r.from&&n===r.nonce});if(!u||(s=await (0,a.s)(e,g,"getTransactionReceipt")({hash:u.hash}),c>1&&(!s.blockNumber||b-s.blockNumber+1n{var e;null===(e=t.onReplaced)||void 0===e||e.call(t,{reason:l,replacedTransaction:r,transaction:u,transactionReceipt:s}),t.resolve(s)})}catch(e){f(()=>t.reject(e))}}else f(()=>t.reject(u))}}})});return I}var G=n(1022),M=n(7225);async function B(e,t){let{chainId:n,timeout:i=0,...o}=t,a=e.getClient({chainId:n}),s=(0,M.s)(a,k,"waitForTransactionReceipt"),c=await s({...o,timeout:i});if("reverted"===c.status){let e=(0,M.s)(a,m,"getTransaction"),t=await e({hash:c.transactionHash}),n=(0,M.s)(a,G.R,"call"),i=await n({...t,data:t.input,gasPrice:"eip1559"!==t.type?t.gasPrice:void 0,maxFeePerGas:"eip1559"===t.type?t.maxFeePerGas:void 0,maxPriorityFeePerGas:"eip1559"===t.type?t.maxPriorityFeePerGas:void 0});throw Error((null==i?void 0:i.data)?(0,r.rR)("0x".concat(i.data.substring(138))):"unknown reason")}return{...c,chainId:a.chain.id}}var F=n(3054),O=n(1605),A=n(3089),R=n(2887);function S(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{hash:r,query:i={}}=n,o=(0,R.Z)(n),a=(0,A.x)({config:o}),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{async queryFn(n){let{queryKey:r}=n,{hash:i,...o}=r[1];if(!i)throw Error("hash is required");return B(e,{...o,onReplaced:t.onReplaced,hash:i})},queryKey:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onReplaced:t,...n}=e;return["waitForTransactionReceipt",(0,F.OP)(n)]}(t)}}(o,{...n,chainId:null!==(e=n.chainId)&&void 0!==e?e:a}),c=!!(r&&(null===(t=i.enabled)||void 0===t||t));return(0,O.aM)({...i,...s,enabled:c})}},1605:function(e,t,n){let r;n.d(t,{aM:function(){return ef}});var i,o,a,s,c,u,l,d,h,f,p,b,v,m,y,g,w,x,P,_,I,C,E,k,G=n(3288),M=n(8146),B=n(5577),F=n(4831),O=n(7920),A=n(9555),R=n(5139),S=n(4668),T=n(4614),N=n(2649),j=n(6063),z=(i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,b=new WeakMap,v=new WeakMap,m=new WeakMap,y=new WeakMap,g=new WeakSet,w=new WeakSet,x=new WeakSet,P=new WeakSet,_=new WeakSet,I=new WeakSet,C=new WeakSet,E=new WeakSet,k=new WeakSet,class extends T.l{bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&((0,G._)(this,o).addObserver(this),U((0,G._)(this,o),this.options)?(0,F._)(this,g,Z).call(this):this.updateResult(),(0,F._)(this,_,V).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return L((0,G._)(this,o),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return L((0,G._)(this,o),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,(0,F._)(this,I,K).call(this),(0,F._)(this,C,Q).call(this),(0,G._)(this,o).removeObserver(this)}setOptions(e){let t=this.options,n=(0,G._)(this,o);if(this.options=(0,G._)(this,i).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,j.Nc)(this.options.enabled,(0,G._)(this,o)))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");(0,F._)(this,E,Y).call(this),(0,G._)(this,o).setOptions(this.options),t._defaulted&&!(0,j.VS)(this.options,t)&&(0,G._)(this,i).getQueryCache().notify({type:"observerOptionsUpdated",query:(0,G._)(this,o),observer:this});let r=this.hasListeners();r&&D((0,G._)(this,o),n,this.options,t)&&(0,F._)(this,g,Z).call(this),this.updateResult(),r&&((0,G._)(this,o)!==n||(0,j.Nc)(this.options.enabled,(0,G._)(this,o))!==(0,j.Nc)(t.enabled,(0,G._)(this,o))||(0,j.KC)(this.options.staleTime,(0,G._)(this,o))!==(0,j.KC)(t.staleTime,(0,G._)(this,o)))&&(0,F._)(this,w,W).call(this);let a=(0,F._)(this,x,H).call(this);r&&((0,G._)(this,o)!==n||(0,j.Nc)(this.options.enabled,(0,G._)(this,o))!==(0,j.Nc)(t.enabled,(0,G._)(this,o))||a!==(0,G._)(this,m))&&(0,F._)(this,P,$).call(this,a)}getOptimisticResult(e){let t=(0,G._)(this,i).getQueryCache().build((0,G._)(this,i),e),n=this.createResult(t,e);return(0,j.VS)(this.getCurrentResult(),n)||((0,B._)(this,s,n),(0,B._)(this,u,this.options),(0,B._)(this,c,(0,G._)(this,o).state)),n}getCurrentResult(){return(0,G._)(this,s)}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),null==t||t(n),Reflect.get(e,n))})}trackProp(e){(0,G._)(this,y).add(e)}getCurrentQuery(){return(0,G._)(this,o)}refetch(){let{...e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.fetch({...e})}fetchOptimistic(e){let t=(0,G._)(this,i).defaultQueryOptions(e),n=(0,G._)(this,i).getQueryCache().build((0,G._)(this,i),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){var t;return(0,F._)(this,g,Z).call(this,{...e,cancelRefetch:null===(t=e.cancelRefetch)||void 0===t||t}).then(()=>(this.updateResult(),(0,G._)(this,s)))}createResult(e,t){let n;let r=(0,G._)(this,o),i=this.options,b=(0,G._)(this,s),v=(0,G._)(this,c),m=(0,G._)(this,u),y=e!==r?e.state:(0,G._)(this,a),{state:g}=e,w={...g},x=!1;if(t._optimisticResults){let n=this.hasListeners(),o=!n&&U(e,t),a=n&&D(e,r,t,i);(o||a)&&(w={...w,...(0,S.z)(g.data,e.options)}),"isRestoring"===t._optimisticResults&&(w.fetchStatus="idle")}let{error:P,errorUpdatedAt:_,status:I}=w;n=w.data;let C=!1;if(void 0!==t.placeholderData&&void 0===n&&"pending"===I){let e;if((null==b?void 0:b.isPlaceholderData)&&t.placeholderData===(null==m?void 0:m.placeholderData))e=b.data,C=!0;else{var E;e="function"==typeof t.placeholderData?t.placeholderData(null===(E=(0,G._)(this,p))||void 0===E?void 0:E.state.data,(0,G._)(this,p)):t.placeholderData}void 0!==e&&(I="success",n=(0,j.oE)(null==b?void 0:b.data,e,t),x=!0)}if(t.select&&void 0!==n&&!C){if(b&&n===(null==v?void 0:v.data)&&t.select===(0,G._)(this,h))n=(0,G._)(this,f);else try{(0,B._)(this,h,t.select),n=t.select(n),n=(0,j.oE)(null==b?void 0:b.data,n,t),(0,B._)(this,f,n),(0,B._)(this,d,null)}catch(e){(0,B._)(this,d,e)}}(0,G._)(this,d)&&(P=(0,G._)(this,d),n=(0,G._)(this,f),_=Date.now(),I="error");let k="fetching"===w.fetchStatus,M="pending"===I,F="error"===I,O=M&&k,A=void 0!==n,R={status:I,fetchStatus:w.fetchStatus,isPending:M,isSuccess:"success"===I,isError:F,isInitialLoading:O,isLoading:O,data:n,dataUpdatedAt:w.dataUpdatedAt,error:P,errorUpdatedAt:_,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>y.dataUpdateCount||w.errorUpdateCount>y.errorUpdateCount,isFetching:k,isRefetching:k&&!M,isLoadingError:F&&!A,isPaused:"paused"===w.fetchStatus,isPlaceholderData:x,isRefetchError:F&&A,isStale:q(e,t),refetch:this.refetch,promise:(0,G._)(this,l)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===R.status?e.reject(R.error):void 0!==R.data&&e.resolve(R.data)},n=()=>{t((0,B._)(this,l,R.promise=(0,N.O)()))},i=(0,G._)(this,l);switch(i.status){case"pending":e.queryHash===r.queryHash&&t(i);break;case"fulfilled":("error"===R.status||R.data!==i.value)&&n();break;case"rejected":("error"!==R.status||R.error!==i.reason)&&n()}}return R}updateResult(){let e=(0,G._)(this,s),t=this.createResult((0,G._)(this,o),this.options);(0,B._)(this,c,(0,G._)(this,o).state),(0,B._)(this,u,this.options),void 0!==(0,G._)(this,c).data&&(0,B._)(this,p,(0,G._)(this,o)),(0,j.VS)(t,e)||((0,B._)(this,s,t),(0,F._)(this,k,J).call(this,{listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!(0,G._)(this,y).size)return!0;let r=new Set(null!=n?n:(0,G._)(this,y));return this.options.throwOnError&&r.add("error"),Object.keys((0,G._)(this,s)).some(t=>(0,G._)(this,s)[t]!==e[t]&&r.has(t))})()}))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&(0,F._)(this,_,V).call(this)}constructor(e,t){super(),(0,O._)(this,g),(0,O._)(this,w),(0,O._)(this,x),(0,O._)(this,P),(0,O._)(this,_),(0,O._)(this,I),(0,O._)(this,C),(0,O._)(this,E),(0,O._)(this,k),(0,M._)(this,i,{writable:!0,value:void 0}),(0,M._)(this,o,{writable:!0,value:void 0}),(0,M._)(this,a,{writable:!0,value:void 0}),(0,M._)(this,s,{writable:!0,value:void 0}),(0,M._)(this,c,{writable:!0,value:void 0}),(0,M._)(this,u,{writable:!0,value:void 0}),(0,M._)(this,l,{writable:!0,value:void 0}),(0,M._)(this,d,{writable:!0,value:void 0}),(0,M._)(this,h,{writable:!0,value:void 0}),(0,M._)(this,f,{writable:!0,value:void 0}),(0,M._)(this,p,{writable:!0,value:void 0}),(0,M._)(this,b,{writable:!0,value:void 0}),(0,M._)(this,v,{writable:!0,value:void 0}),(0,M._)(this,m,{writable:!0,value:void 0}),(0,M._)(this,y,{writable:!0,value:void 0}),(0,B._)(this,o,void 0),(0,B._)(this,a,void 0),(0,B._)(this,s,void 0),(0,B._)(this,y,new Set),this.options=t,(0,B._)(this,i,e),(0,B._)(this,d,null),(0,B._)(this,l,(0,N.O)()),this.options.experimental_prefetchInRender||(0,G._)(this,l).reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}});function U(e,t){return!1!==(0,j.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&L(e,t,t.refetchOnMount)}function L(e,t,n){if(!1!==(0,j.Nc)(t.enabled,e)){let r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&q(e,t)}return!1}function D(e,t,n,r){return(e!==t||!1===(0,j.Nc)(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&q(e,n)}function q(e,t){return!1!==(0,j.Nc)(t.enabled,e)&&e.isStaleByTime((0,j.KC)(t.staleTime,e))}function Z(e){(0,F._)(this,E,Y).call(this);let t=(0,G._)(this,o).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(j.ZT)),t}function W(){(0,F._)(this,I,K).call(this);let e=(0,j.KC)(this.options.staleTime,(0,G._)(this,o));if(j.sk||(0,G._)(this,s).isStale||!(0,j.PN)(e))return;let t=(0,j.Kp)((0,G._)(this,s).dataUpdatedAt,e);(0,B._)(this,b,setTimeout(()=>{(0,G._)(this,s).isStale||this.updateResult()},t+1))}function H(){var e;return null!==(e="function"==typeof this.options.refetchInterval?this.options.refetchInterval((0,G._)(this,o)):this.options.refetchInterval)&&void 0!==e&&e}function $(e){(0,F._)(this,C,Q).call(this),(0,B._)(this,m,e),!j.sk&&!1!==(0,j.Nc)(this.options.enabled,(0,G._)(this,o))&&(0,j.PN)((0,G._)(this,m))&&0!==(0,G._)(this,m)&&(0,B._)(this,v,setInterval(()=>{(this.options.refetchIntervalInBackground||A.j.isFocused())&&(0,F._)(this,g,Z).call(this)},(0,G._)(this,m)))}function V(){(0,F._)(this,w,W).call(this),(0,F._)(this,P,$).call(this,(0,F._)(this,x,H).call(this))}function K(){(0,G._)(this,b)&&(clearTimeout((0,G._)(this,b)),(0,B._)(this,b,void 0))}function Q(){(0,G._)(this,v)&&(clearInterval((0,G._)(this,v)),(0,B._)(this,v,void 0))}function Y(){let e=(0,G._)(this,i).getQueryCache().build((0,G._)(this,i),this.options);if(e===(0,G._)(this,o))return;let t=(0,G._)(this,o);(0,B._)(this,o,e),(0,B._)(this,a,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}function J(e){R.Vr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e((0,G._)(this,s))}),(0,G._)(this,i).getQueryCache().notify({query:(0,G._)(this,o),type:"observerResultsUpdated"})})}var X=n(4090),ee=n(7082);n(3827);var et=X.createContext((r=!1,{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r})),en=()=>X.useContext(et),er=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},ei=e=>{X.useEffect(()=>{e.clearReset()},[e])},eo=e=>{let{result:t,errorResetBoundary:n,throwOnError:r,query:i,suspense:o}=e;return t.isError&&!n.isReset()&&!t.isFetching&&i&&(o&&void 0===t.data||(0,j.L3)(r,[t.error,i]))},ea=X.createContext(!1),es=()=>X.useContext(ea);ea.Provider;var ec=e=>{let t=e.staleTime;e.suspense&&(e.staleTime="function"==typeof t?function(){for(var e=arguments.length,n=Array(e),r=0;re.isLoading&&e.isFetching&&!t,el=(e,t)=>(null==e?void 0:e.suspense)&&t.isPending,ed=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()}),eh=n(3054);function ef(e){let t=function(e,t,n){var r,i,o,a,s;let c=(0,ee.NL)(n),u=es(),l=en(),d=c.defaultQueryOptions(e);null===(i=c.getDefaultOptions().queries)||void 0===i||null===(r=i._experimental_beforeQuery)||void 0===r||r.call(i,d),d._optimisticResults=u?"isRestoring":"optimistic",ec(d),er(d,l),ei(l);let h=!c.getQueryCache().get(d.queryHash),[f]=X.useState(()=>new t(c,d)),p=f.getOptimisticResult(d),b=!u&&!1!==e.subscribed;if(X.useSyncExternalStore(X.useCallback(e=>{let t=b?f.subscribe(R.Vr.batchCalls(e)):j.ZT;return f.updateResult(),t},[f,b]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),X.useEffect(()=>{f.setOptions(d)},[d,f]),el(d,p))throw ed(d,f,l);if(eo({result:p,errorResetBoundary:l,throwOnError:d.throwOnError,query:c.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw p.error;if(null===(a=c.getDefaultOptions().queries)||void 0===a||null===(o=a._experimental_afterQuery)||void 0===o||o.call(a,d,p),d.experimental_prefetchInRender&&!j.sk&&eu(p,u)){let e=h?ed(d,f,l):null===(s=c.getQueryCache().get(d.queryHash))||void 0===s?void 0:s.promise;null==e||e.catch(j.ZT).finally(()=>{f.updateResult()})}return d.notifyOnChangeProps?p:f.trackResult(p)}({...e,queryKeyHashFn:eh.kq},z,void 0);return t.queryKey=e.queryKey,t}}}]);