@ututrust/web-components 2.2.22-alpha.4 → 2.2.22-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ccip-7fe31004.js → ccip-8362f12e.js} +1 -1
- package/dist/{ccip-cb997dd6.cjs → ccip-df5cf9c8.cjs} +1 -1
- package/dist/{index-a07d9b5b.cjs → index-4c433761.cjs} +2 -2
- package/dist/{index-250586dd.js → index-7f442143.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/manifest.json +7 -7
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as h, I as m, B as p, g as w, s as g, d as E, c as O, a as b, e as x, H as y, b as M } from "./index-
|
|
1
|
+
import { i as h, I as m, B as p, g as w, s as g, d as E, c as O, a as b, e as x, H as y, b as M } from "./index-7f442143.js";
|
|
2
2
|
function R(r, a) {
|
|
3
3
|
if (!h(r, { strict: !1 }))
|
|
4
4
|
throw new m({ address: r });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-4c433761.cjs");function g(o,r){if(!e.isAddress(o,{strict:!1}))throw new e.InvalidAddressError({address:o});if(!e.isAddress(r,{strict:!1}))throw new e.InvalidAddressError({address:r});return o.toLowerCase()===r.toLowerCase()}class k extends e.BaseError{constructor({callbackSelector:r,cause:a,data:c,extraData:d,sender:f,urls:s}){var i;super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],(i=a.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(u=>` ${e.getUrl(u)}`)],` Sender: ${f}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${d}`].flat(),name:"OffchainLookupError"})}}class E extends e.BaseError{constructor({result:r,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(a)}`,`Response: ${e.stringify(r)}`],name:"OffchainLookupResponseMalformedError"})}}class L extends e.BaseError{constructor({sender:r,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}const b="0x556f1830",h={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function O(o,{blockNumber:r,blockTag:a,data:c,to:d}){const{args:f}=e.decodeErrorResult({data:c,abi:[h]}),[s,i,u,l,n]=f,{ccipRead:t}=o,m=t&&typeof(t==null?void 0:t.request)=="function"?t.request:y;try{if(!g(d,s))throw new L({sender:s,to:d});const p=await m({data:u,sender:s,urls:i}),{data:w}=await e.call(o,{blockNumber:r,blockTag:a,data:e.concat([l,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[p,n])]),to:d});return w}catch(p){throw new k({callbackSelector:l,cause:p,data:c,extraData:n,sender:s,urls:i})}}async function y({data:o,sender:r,urls:a}){var d;let c=new Error("An unknown error occurred.");for(let f=0;f<a.length;f++){const s=a[f],i=s.includes("{data}")?"GET":"POST",u=i==="POST"?{data:o,sender:r}:void 0,l=i==="POST"?{"Content-Type":"application/json"}:{};try{const n=await fetch(s.replace("{sender}",r).replace("{data}",o),{body:JSON.stringify(u),headers:l,method:i});let t;if((d=n.headers.get("Content-Type"))!=null&&d.startsWith("application/json")?t=(await n.json()).data:t=await n.text(),!n.ok){c=new e.HttpRequestError({body:u,details:t!=null&&t.error?e.stringify(t.error):n.statusText,headers:n.headers,status:n.status,url:s});continue}if(!e.isHex(t)){c=new E({result:t,url:s});continue}return t}catch(n){c=new e.HttpRequestError({body:u,details:n.message,url:s})}}throw c}exports.ccipRequest=y;exports.offchainLookup=O;exports.offchainLookupAbiItem=h;exports.offchainLookupSignature=b;
|
|
@@ -364,8 +364,8 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
|
|
|
364
364
|
`).slice(0,-1)}function xT(A){if(!(!A||A.length===0))return A.reduce((e,{slot:t,value:n})=>{if(t.length!==66)throw new dT({size:t.length,targetSize:66,type:"hex"});if(n.length!==66)throw new dT({size:n.length,targetSize:66,type:"hex"});return e[t]=n,e},{})}function YV(A){const{balance:e,nonce:t,state:n,stateDiff:a,code:b}=A,r={};if(b!==void 0&&(r.code=b),e!==void 0&&(r.balance=L6(e)),t!==void 0&&(r.nonce=L6(t)),n!==void 0&&(r.state=xT(n)),a!==void 0){if(r.state)throw new HV;r.stateDiff=xT(a)}return r}function GV(A){if(!A)return;const e={};for(const{address:t,...n}of A){if(!vn(t,{strict:!1}))throw new Lf({address:t});if(e[t])throw new WV({address:t});e[t]=YV(n)}return e}const TT=[{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"}];function qV(A,e={}){typeof e.size<"u"&&Yt(A,{size:e.size});const t=Mn(A,e);return FD(t,e)}function KV(A,e={}){let t=A;if(typeof e.size<"u"&&(Yt(t,{size:e.size}),t=_h(t)),t.length>1||t[0]>1)throw new TH(t);return!!t[0]}function yn(A,e={}){typeof e.size<"u"&&Yt(A,{size:e.size});const t=Mn(A,e);return EH(t,e)}function _V(A,e={}){let t=A;return typeof e.size<"u"&&(Yt(t,{size:e.size}),t=_h(t,{dir:"right"})),new TextDecoder().decode(t)}function rE(A,e){const t=typeof e=="string"?$h(e):e,n=EV(t);if(be(t)===0&&A.length>0)throw new tg;if(be(e)&&be(e)<32)throw new OH({data:typeof e=="string"?e:Mn(e),params:A,size:be(e)});let a=0;const b=[];for(let r=0;r<A.length;++r){const i=A[r];n.setPosition(a);const[s,u]=or(n,i,{staticPosition:0});a+=u,b.push(s)}return b}function or(A,e,{staticPosition:t}){const n=cg(e.type);if(n){const[a,b]=n;return eY(A,{...e,type:b},{length:a,staticPosition:t})}if(e.type==="tuple")return aY(A,e,{staticPosition:t});if(e.type==="address")return $V(A);if(e.type==="bool")return AY(A);if(e.type.startsWith("bytes"))return tY(A,e,{staticPosition:t});if(e.type.startsWith("uint")||e.type.startsWith("int"))return nY(A,e);if(e.type==="string")return bY(A,{staticPosition:t});throw new XH(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const wT=32,bm=32;function $V(A){const e=A.readBytes(32);return[fg(Mn(eE(e,-20))),32]}function eY(A,e,{length:t,staticPosition:n}){if(!t){const r=yn(A.readBytes(bm)),i=n+r,s=i+wT;A.setPosition(i);const u=yn(A.readBytes(wT)),y=Yd(e);let l=0;const h=[];for(let M=0;M<u;++M){A.setPosition(s+(y?M*32:l));const[T,x]=or(A,e,{staticPosition:s});l+=x,h.push(T)}return A.setPosition(n+32),[h,32]}if(Yd(e)){const r=yn(A.readBytes(bm)),i=n+r,s=[];for(let u=0;u<t;++u){A.setPosition(i+u*32);const[y]=or(A,e,{staticPosition:i});s.push(y)}return A.setPosition(n+32),[s,32]}let a=0;const b=[];for(let r=0;r<t;++r){const[i,s]=or(A,e,{staticPosition:n+a});a+=s,b.push(i)}return[b,a]}function AY(A){return[KV(A.readBytes(32),{size:32}),32]}function tY(A,e,{staticPosition:t}){const[n,a]=e.type.split("bytes");if(!a){const r=yn(A.readBytes(32));A.setPosition(t+r);const i=yn(A.readBytes(32));if(i===0)return A.setPosition(t+32),["0x",32];const s=A.readBytes(i);return A.setPosition(t+32),[Mn(s),32]}return[Mn(A.readBytes(Number.parseInt(a),32)),32]}function nY(A,e){const t=e.type.startsWith("int"),n=Number.parseInt(e.type.split("int")[1]||"256"),a=A.readBytes(32);return[n>48?qV(a,{signed:t}):yn(a,{signed:t}),32]}function aY(A,e,{staticPosition:t}){const n=e.components.length===0||e.components.some(({name:r})=>!r),a=n?[]:{};let b=0;if(Yd(e)){const r=yn(A.readBytes(bm)),i=t+r;for(let s=0;s<e.components.length;++s){const u=e.components[s];A.setPosition(i+b);const[y,l]=or(A,u,{staticPosition:i});b+=l,a[n?s:u==null?void 0:u.name]=y}return A.setPosition(t+32),[a,32]}for(let r=0;r<e.components.length;++r){const i=e.components[r],[s,u]=or(A,i,{staticPosition:t});a[n?r:i==null?void 0:i.name]=s,b+=u}return[a,b]}function bY(A,{staticPosition:e}){const t=yn(A.readBytes(32)),n=e+t;A.setPosition(n);const a=yn(A.readBytes(32));if(a===0)return A.setPosition(e+32),["",32];const b=A.readBytes(a,32),r=_V(_h(b));return A.setPosition(e+32),[r,32]}function Yd(A){var n;const{type:e}=A;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(n=A.components)==null?void 0:n.some(Yd);const t=cg(A.type);return!!(t&&Yd({...A,type:t[1]}))}const rY=A=>KD(XD(A));function fY(A){return rY(A)}const iY="1.0.8";let A8=class rm extends Error{constructor(e,t={}){var r;const n=t.cause instanceof rm?t.cause.details:(r=t.cause)!=null&&r.message?t.cause.message:t.details,a=t.cause instanceof rm&&t.cause.docsPath||t.docsPath,b=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${iY}`].join(`
|
|
365
365
|
`);super(b),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=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}};function Tn(A,e){const t=A.exec(e);return t==null?void 0:t.groups}const fE=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,iE=/^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)?$/,dE=/^\(.+?\).*?$/,IT=/^tuple(?<array>(\[(\d*)\])*)$/;function fm(A){let e=A.type;if(IT.test(A.type)&&"components"in A){e="(";const t=A.components.length;for(let a=0;a<t;a++){const b=A.components[a];e+=fm(b),a<t-1&&(e+=", ")}const n=Tn(IT,A.type);return e+=`)${(n==null?void 0:n.array)??""}`,fm({...A,type:e})}return"indexed"in A&&A.indexed&&(e=`${e} indexed`),A.name?`${e} ${A.name}`:e}function nd(A){let e="";const t=A.length;for(let n=0;n<t;n++){const a=A[n];e+=fm(a),n!==t-1&&(e+=", ")}return e}function dY(A){var e;return A.type==="function"?`function ${A.name}(${nd(A.inputs)})${A.stateMutability&&A.stateMutability!=="nonpayable"?` ${A.stateMutability}`:""}${(e=A.outputs)!=null&&e.length?` returns (${nd(A.outputs)})`:""}`:A.type==="event"?`event ${A.name}(${nd(A.inputs)})`:A.type==="error"?`error ${A.name}(${nd(A.inputs)})`:A.type==="constructor"?`constructor(${nd(A.inputs)})${A.stateMutability==="payable"?" payable":""}`:A.type==="fallback"?`fallback() external${A.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const sE=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function sY(A){return sE.test(A)}function cY(A){return Tn(sE,A)}const cE=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function oY(A){return cE.test(A)}function uY(A){return Tn(cE,A)}const oE=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function lY(A){return oE.test(A)}function pY(A){return Tn(oE,A)}const uE=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function lE(A){return uE.test(A)}function yY(A){return Tn(uE,A)}const pE=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function mY(A){return pE.test(A)}function hY(A){return Tn(pE,A)}const yE=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function gY(A){return yE.test(A)}function MY(A){return Tn(yE,A)}const vY=/^receive\(\) external payable$/;function xY(A){return vY.test(A)}const TY=new Set(["indexed"]),im=new Set(["calldata","memory","storage"]);class wY extends A8{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${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 IY extends A8{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class NY extends A8{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class kY extends A8{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${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 DY extends A8{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class EY extends A8{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class zY extends A8{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 Hf extends A8{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class jY extends A8{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class CY extends A8{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 LY extends A8{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class SY extends A8{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function OY(A,e,t){let n="";if(t)for(const a of Object.entries(t)){if(!a)continue;let b="";for(const r of a[1])b+=`[${r.type}${r.name?`:${r.name}`:""}]`;n+=`(${a[0]}{${b}})`}return e?`${e}:${A}${n}`:A}const wp=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}]]);function PY(A,e={}){if(lY(A))return BY(A,e);if(oY(A))return RY(A,e);if(sY(A))return QY(A,e);if(mY(A))return UY(A,e);if(gY(A))return ZY(A);if(xY(A))return{type:"receive",stateMutability:"payable"};throw new jY({signature:A})}function BY(A,e={}){const t=pY(A);if(!t)throw new Hf({signature:A,type:"function"});const n=R8(t.parameters),a=[],b=n.length;for(let i=0;i<b;i++)a.push(gb(n[i],{modifiers:im,structs:e,type:"function"}));const r=[];if(t.returns){const i=R8(t.returns),s=i.length;for(let u=0;u<s;u++)r.push(gb(i[u],{modifiers:im,structs:e,type:"function"}))}return{name:t.name,type:"function",stateMutability:t.stateMutability??"nonpayable",inputs:a,outputs:r}}function RY(A,e={}){const t=uY(A);if(!t)throw new Hf({signature:A,type:"event"});const n=R8(t.parameters),a=[],b=n.length;for(let r=0;r<b;r++)a.push(gb(n[r],{modifiers:TY,structs:e,type:"event"}));return{name:t.name,type:"event",inputs:a}}function QY(A,e={}){const t=cY(A);if(!t)throw new Hf({signature:A,type:"error"});const n=R8(t.parameters),a=[],b=n.length;for(let r=0;r<b;r++)a.push(gb(n[r],{structs:e,type:"error"}));return{name:t.name,type:"error",inputs:a}}function UY(A,e={}){const t=hY(A);if(!t)throw new Hf({signature:A,type:"constructor"});const n=R8(t.parameters),a=[],b=n.length;for(let r=0;r<b;r++)a.push(gb(n[r],{structs:e,type:"constructor"}));return{type:"constructor",stateMutability:t.stateMutability??"nonpayable",inputs:a}}function ZY(A){const e=MY(A);if(!e)throw new Hf({signature:A,type:"fallback"});return{type:"fallback",stateMutability:e.stateMutability??"nonpayable"}}const XY=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,JY=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,FY=/^u?int$/;function gb(A,e){var l,h;const t=OY(A,e==null?void 0:e.type,e==null?void 0:e.structs);if(wp.has(t))return wp.get(t);const n=dE.test(A),a=Tn(n?JY:XY,A);if(!a)throw new NY({param:A});if(a.name&&HY(a.name))throw new kY({param:A,name:a.name});const b=a.name?{name:a.name}:{},r=a.modifier==="indexed"?{indexed:!0}:{},i=(e==null?void 0:e.structs)??{};let s,u={};if(n){s="tuple";const M=R8(a.type),T=[],x=M.length;for(let v=0;v<x;v++)T.push(gb(M[v],{structs:i}));u={components:T}}else if(a.type in i)s="tuple",u={components:i[a.type]};else if(FY.test(a.type))s=`${a.type}256`;else if(s=a.type,(e==null?void 0:e.type)!=="struct"&&!mE(s))throw new IY({type:s});if(a.modifier){if(!((h=(l=e==null?void 0:e.modifiers)==null?void 0:l.has)!=null&&h.call(l,a.modifier)))throw new DY({param:A,type:e==null?void 0:e.type,modifier:a.modifier});if(im.has(a.modifier)&&!VY(s,!!a.array))throw new EY({param:A,type:e==null?void 0:e.type,modifier:a.modifier})}const y={type:`${s}${a.array??""}`,...b,...r,...u};return wp.set(t,y),y}function R8(A,e=[],t="",n=0){const a=A.trim().length;for(let b=0;b<a;b++){const r=A[b],i=A.slice(b+1);switch(r){case",":return n===0?R8(i,[...e,t.trim()]):R8(i,e,`${t}${r}`,n);case"(":return R8(i,e,`${t}${r}`,n+1);case")":return R8(i,e,`${t}${r}`,n-1);default:return R8(i,e,`${t}${r}`,n)}}if(t==="")return e;if(n!==0)throw new SY({current:t,depth:n});return e.push(t.trim()),e}function mE(A){return A==="address"||A==="bool"||A==="function"||A==="string"||fE.test(A)||iE.test(A)}const WY=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function HY(A){return A==="address"||A==="bool"||A==="function"||A==="string"||A==="tuple"||fE.test(A)||iE.test(A)||WY.test(A)}function VY(A,e){return e||A==="bytes"||A==="string"||A==="tuple"}function YY(A){const e={},t=A.length;for(let r=0;r<t;r++){const i=A[r];if(!lE(i))continue;const s=yY(i);if(!s)throw new Hf({signature:i,type:"struct"});const u=s.properties.split(";"),y=[],l=u.length;for(let h=0;h<l;h++){const T=u[h].trim();if(!T)continue;const x=gb(T,{type:"struct"});y.push(x)}if(!y.length)throw new CY({signature:i});e[s.name]=y}const n={},a=Object.entries(e),b=a.length;for(let r=0;r<b;r++){const[i,s]=a[r];n[i]=hE(s,e)}return n}const GY=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function hE(A,e,t=new Set){const n=[],a=A.length;for(let b=0;b<a;b++){const r=A[b];if(dE.test(r.type))n.push(r);else{const s=Tn(GY,r.type);if(!(s!=null&&s.type))throw new zY({abiParameter:r});const{array:u,type:y}=s;if(y in e){if(t.has(y))throw new LY({type:y});n.push({...r,type:`tuple${u??""}`,components:hE(e[y]??[],e,new Set([...t,y]))})}else if(mE(y))n.push(r);else throw new wY({type:y})}}return n}function gE(A){const e=YY(A),t=[],n=A.length;for(let a=0;a<n;a++){const b=A[a];lE(b)||t.push(PY(b,e))}return t}function qY(A){let e=!0,t="",n=0,a="",b=!1;for(let r=0;r<A.length;r++){const i=A[r];if(["(",")",","].includes(i)&&(e=!0),i==="("&&n++,i===")"&&n--,!!e){if(n===0){if(i===" "&&["event","function",""].includes(a))a="";else if(a+=i,i===")"){b=!0;break}continue}if(i===" "){A[r-1]!==","&&t!==","&&t!==",("&&(t="",e=!1);continue}a+=i,t+=i}}if(!b)throw new r1("Unable to normalize signature.");return a}const KY=A=>{const e=(()=>typeof A=="string"?A:dY(A))();return qY(e)};function ME(A){return fY(KY(A))}const _Y=ME,ug=A=>S7(ME(A),0,4);function lg(A){const{abi:e,args:t=[],name:n}=A,a=Ff(n,{strict:!1}),b=e.filter(i=>a?i.type==="function"?ug(i)===n:i.type==="event"?_Y(i)===n:!1:"name"in i&&i.name===n);if(b.length===0)return;if(b.length===1)return b[0];let r;for(const i of b){if(!("inputs"in i))continue;if(!t||t.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==t.length)continue;if(t.every((u,y)=>{const l="inputs"in i&&i.inputs[y];return l?dm(u,l):!1})){if(r&&"inputs"in r&&r.inputs){const u=vE(i.inputs,r.inputs,t);if(u)throw new UH({abiItem:i,type:u[0]},{abiItem:r,type:u[1]})}r=i}}return r||b[0]}function dm(A,e){const t=typeof A,n=e.type;switch(n){case"address":return vn(A,{strict:!1});case"bool":return t==="boolean";case"function":return t==="string";case"string":return t==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((a,b)=>dm(Object.values(A)[b],a)):/^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(n)?t==="number"||t==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?t==="string"||A instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(A)&&A.every(a=>dm(a,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function vE(A,e,t){for(const n in A){const a=A[n],b=e[n];if(a.type==="tuple"&&b.type==="tuple"&&"components"in a&&"components"in b)return vE(a.components,b.components,t[n]);const r=[a.type,b.type];if((()=>r.includes("address")&&r.includes("bytes20")?!0:r.includes("address")&&r.includes("string")?vn(t[n],{strict:!1}):r.includes("address")&&r.includes("bytes")?vn(t[n],{strict:!1}):!1)())return r}}const Ip="/docs/contract/decodeFunctionResult";function xE(A){const{abi:e,args:t,functionName:n,data:a}=A;let b=e[0];if(n){const i=lg({abi:e,args:t,name:n});if(!i)throw new L7(n,{docsPath:Ip});b=i}if(b.type!=="function")throw new L7(void 0,{docsPath:Ip});if(!b.outputs)throw new QH(b.name,{docsPath:Ip});const r=rE(b.outputs,a);if(r&&r.length>1)return r;if(r&&r.length===1)return r[0]}const NT="/docs/contract/encodeFunctionData";function $Y(A){const{abi:e,args:t,functionName:n}=A;let a=e[0];if(n){const b=lg({abi:e,args:t,name:n});if(!b)throw new L7(n,{docsPath:NT});a=b}if(a.type!=="function")throw new L7(void 0,{docsPath:NT});return{abi:[a],functionName:ug(Cf(a))}}function TE(A){const{args:e}=A,{abi:t,functionName:n}=(()=>{var i;return A.abi.length===1&&((i=A.functionName)!=null&&i.startsWith("0x"))?A:$Y(A)})(),a=t[0],b=n,r="inputs"in a&&a.inputs?ig(a.inputs,e??[]):void 0;return ng([b,r??"0x"])}function eG({blockNumber:A,chain:e,contract:t}){var a;const n=(a=e==null?void 0:e.contracts)==null?void 0:a[t];if(!n)throw new qy({chain:e,contract:{name:t}});if(A&&n.blockCreated&&n.blockCreated>A)throw new qy({blockNumber:A,chain:e,contract:{name:t,blockCreated:n.blockCreated}});return n.address}const AG={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."},tG={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},nG={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function wE(A){const{abi:e,data:t}=A,n=S7(t,0,4);if(n==="0x")throw new tg;const b=[...e||[],tG,nG].find(r=>r.type==="error"&&n===ug(Cf(r)));if(!b)throw new HD(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:b,args:"inputs"in b&&b.inputs&&b.inputs.length>0?rE(b.inputs,S7(t,4)):void 0,errorName:b.name}}function IE({abiItem:A,args:e,includeFunctionName:t=!0,includeName:n=!1}){if("name"in A&&"inputs"in A&&A.inputs)return`${t?A.name:""}(${A.inputs.map((a,b)=>`${n&&a.name?`${a.name}: `:""}${typeof e[b]=="object"?pn(e[b]):e[b]}`).join(", ")})`}class aG extends r1{constructor(e,{account:t,docsPath:n,chain:a,data:b,gas:r,gasPrice:i,maxFeePerGas:s,maxPriorityFeePerGas:u,nonce:y,to:l,value:h,stateOverride:M}){var v;const T=t?Ru(t):void 0;let x=bE({from:T==null?void 0:T.address,to:l,value:typeof h<"u"&&`${CV(h)} ${((v=a==null?void 0:a.nativeCurrency)==null?void 0:v.symbol)||"ETH"}`,data:b,gas:r,gasPrice:typeof i<"u"&&`${ib(i)} gwei`,maxFeePerGas:typeof s<"u"&&`${ib(s)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ib(u)} gwei`,nonce:y});M&&(x+=`
|
|
366
366
|
${VV(M)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",x].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class bG extends r1{constructor(e,{abi:t,args:n,contractAddress:a,docsPath:b,functionName:r,sender:i}){const s=lg({abi:t,args:n,name:r}),u=s?IE({abiItem:s,args:n,includeFunctionName:!1,includeName:!1}):void 0,y=s?Cf(s,{includeName:!0}):void 0,l=bE({address:a&&SV(a),function:y,args:u&&u!=="()"&&`${[...Array((r==null?void 0:r.length)??0).keys()].map(()=>" ").join("")}${u}`,sender:i});super(e.shortMessage||`An unknown error occurred while executing the contract function "${r}".`,{cause:e,docsPath:b,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],l&&"Contract Call:",l].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=a,this.functionName=r,this.sender=i}}class rG extends r1{constructor({abi:e,data:t,functionName:n,message:a}){let b,r,i,s;if(t&&t!=="0x")try{r=wE({abi:e,data:t});const{abiItem:y,errorName:l,args:h}=r;if(l==="Error")s=h[0];else if(l==="Panic"){const[M]=h;s=AG[M]}else{const M=y?Cf(y,{includeName:!0}):void 0,T=y&&h?IE({abiItem:y,args:h,includeFunctionName:!1,includeName:!1}):void 0;i=[M?`Error: ${M}`:"",T&&T!=="()"?` ${[...Array((l==null?void 0:l.length)??0).keys()].map(()=>" ").join("")}${T}`:""]}}catch(y){b=y}else a&&(s=a);let u;b instanceof HD&&(u=b.signature,i=[`Unable to decode signature "${u}" 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=${u}.`]),super(s&&s!=="execution reverted"||u?[`The contract function "${n}" reverted with the following ${u?"signature":"reason"}:`,s||u].join(`
|
|
367
|
-
`):`The contract function "${n}" reverted.`,{cause:b,metaMessages:i,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=r,this.raw=t,this.reason=s,this.signature=u}}class fG extends r1{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class iG extends r1{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${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 NE extends r1{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}}const dG=3;function sG(A,{abi:e,address:t,args:n,docsPath:a,functionName:b,sender:r}){const i=A instanceof NE?A:A instanceof r1?A.walk(T=>"data"in T)||A.walk():{},{code:s,data:u,details:y,message:l,shortMessage:h}=i,M=(()=>A instanceof tg?new fG({functionName:b}):[dG,mb.code].includes(s)&&(u||y||l||h)?new rG({abi:e,data:typeof u=="object"?u.data:u,functionName:b,message:i instanceof og?y:h??l}):A)();return new bG(M,{abi:e,args:n,contractAddress:t,docsPath:a,functionName:b,sender:r})}const cG="0x82ad56cb",oG="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",uG="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";function lG(A,{docsPath:e,...t}){const n=(()=>{const a=BV(A,t);return a instanceof aE?A:a})();return new aG(n,{docsPath:e,...t})}function pG(){let A=()=>{},e=()=>{};return{promise:new Promise((n,a)=>{A=n,e=a}),resolve:A,reject:e}}const Np=new Map;function kE({fn:A,id:e,shouldSplitBatch:t,wait:n=0,sort:a}){const b=async()=>{const y=s();r();const l=y.map(({args:h})=>h);l.length!==0&&A(l).then(h=>{a&&Array.isArray(h)&&h.sort(a);for(let M=0;M<y.length;M++){const{resolve:T}=y[M];T==null||T([h[M],h])}}).catch(h=>{for(let M=0;M<y.length;M++){const{reject:T}=y[M];T==null||T(h)}})},r=()=>Np.delete(e),i=()=>s().map(({args:y})=>y),s=()=>Np.get(e)||[],u=y=>Np.set(e,[...s(),y]);return{flush:r,async schedule(y){const{promise:l,resolve:h,reject:M}=pG();return(t==null?void 0:t([...i(),y]))&&b(),s().length>0?(u({args:y,resolve:h,reject:M}),l):(u({args:y,resolve:h,reject:M}),setTimeout(b,n),l)}}}async function DE(A,e){var K,s0,y0,r0;const{account:t=A.account,batch:n=!!((K=A.batch)!=null&&K.multicall),blockNumber:a,blockTag:b="latest",accessList:r,blobs:i,code:s,data:u,factory:y,factoryData:l,gas:h,gasPrice:M,maxFeePerBlobGas:T,maxFeePerGas:x,maxPriorityFeePerGas:v,nonce:z,to:j,value:w,stateOverride:L,...I}=e,C=t?Ru(t):void 0;if(s&&(y||l))throw new r1("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(s&&j)throw new r1("Cannot provide both `code` & `to` as parameters.");const O=s&&u,B=y&&l&&j&&u,H=O||B,V=(()=>O?hG({code:s,data:u}):B?gG({data:u,factory:y,factoryData:l,to:j}):u)();try{FV(e);const J=(a?L6(a):void 0)||b,q=GV(L),Y=(r0=(y0=(s0=A.chain)==null?void 0:s0.formatters)==null?void 0:y0.transactionRequest)==null?void 0:r0.format,_=(Y||UV)({...RV(I,{format:Y}),from:C==null?void 0:C.address,accessList:r,blobs:i,data:V,gas:h,gasPrice:M,maxFeePerBlobGas:T,maxFeePerGas:x,maxPriorityFeePerGas:v,nonce:z,to:H?void 0:j,value:w});if(n&&yG({request:_})&&!q)try{return await mG(A,{..._,blockNumber:a,blockTag:b})}catch(L0){if(!(L0 instanceof tE)&&!(L0 instanceof qy))throw L0}const b0=await A.request({method:"eth_call",params:q?[_,J,q]:[_,J]});return b0==="0x"?{data:void 0}:{data:b0}}catch(Q){const J=MG(Q),{offchainLookup:q,offchainLookupSignature:Y}=await Promise.resolve().then(()=>require("./ccip-cb997dd6.cjs"));if(A.ccipRead!==!1&&(J==null?void 0:J.slice(0,10))===Y&&j)return{data:await q(A,{data:J,to:j})};throw H&&(J==null?void 0:J.slice(0,10))==="0x101bb98d"?new iG({factory:y}):lG(Q,{...e,account:C,chain:A.chain})}}function yG({request:A}){const{data:e,to:t,...n}=A;return!(!e||e.startsWith(cG)||!t||Object.values(n).filter(a=>typeof a<"u").length>0)}async function mG(A,e){var x;const{batchSize:t=1024,wait:n=0}=typeof((x=A.batch)==null?void 0:x.multicall)=="object"?A.batch.multicall:{},{blockNumber:a,blockTag:b="latest",data:r,multicallAddress:i,to:s}=e;let u=i;if(!u){if(!A.chain)throw new tE;u=eG({blockNumber:a,chain:A.chain,contract:"multicall3"})}const l=(a?L6(a):void 0)||b,{schedule:h}=kE({id:`${A.uid}.${l}`,wait:n,shouldSplitBatch(v){return v.reduce((j,{data:w})=>j+(w.length-2),0)>t*2},fn:async v=>{const z=v.map(L=>({allowFailure:!0,callData:L.data,target:L.to})),j=TE({abi:TT,args:[z],functionName:"aggregate3"}),w=await A.request({method:"eth_call",params:[{data:j,to:u},l]});return xE({abi:TT,args:[z],functionName:"aggregate3",data:w||"0x"})}}),[{returnData:M,success:T}]=await h({data:r,to:s});if(!T)throw new NE({data:M});return M==="0x"?{data:void 0}:{data:M}}function hG(A){const{code:e,data:t}=A;return AE({abi:gE(["constructor(bytes, bytes)"]),bytecode:oG,args:[e,t]})}function gG(A){const{data:e,factory:t,factoryData:n,to:a}=A;return AE({abi:gE(["constructor(address, bytes, address, bytes)"]),bytecode:uG,args:[a,e,t,n]})}function MG(A){var t;if(!(A instanceof r1))return;const e=A.walk();return typeof(e==null?void 0:e.data)=="object"?(t=e.data)==null?void 0:t.data:e.data}async function vG(A,e){const{abi:t,address:n,args:a,functionName:b,...r}=e,i=TE({abi:t,args:a,functionName:b});try{const{data:s}=await XV(A,DE,"call")({...r,data:i,to:n});return xE({abi:t,args:a,functionName:b,data:s||"0x"})}catch(s){throw sG(s,{abi:t,address:n,args:a,docsPath:"/docs/contract/readContract",functionName:b})}}const Do=new ag(8192);function xG(A,{enabled:e=!0,id:t}){if(!e||!t)return A();if(Do.get(t))return Do.get(t);const n=A().finally(()=>Do.delete(t));return Do.set(t,n),n}async function TG(A){return new Promise(e=>setTimeout(e,A))}function EE(A,{delay:e=100,retryCount:t=2,shouldRetry:n=()=>!0}={}){return new Promise((a,b)=>{const r=async({count:i=0}={})=>{const s=async({error:u})=>{const y=typeof e=="function"?e({count:i,error:u}):e;y&&await TG(y),r({count:i+1})};try{const u=await A();a(u)}catch(u){if(i<t&&await n({count:i,error:u}))return s({error:u});b(u)}};r()})}function wG(A,e={}){return async(t,n={})=>{var l;const{dedupe:a=!1,methods:b,retryDelay:r=150,retryCount:i=3,uid:s}={...e,...n},{method:u}=t;if((l=b==null?void 0:b.exclude)!=null&&l.includes(u))throw new x4(new Error("method not supported"),{method:u});if(b!=null&&b.include&&!b.include.includes(u))throw new x4(new Error("method not supported"),{method:u});const y=a?eg(`${s}.${pn(t)}`):void 0;return xG(()=>EE(async()=>{try{return await A(t)}catch(h){const M=h;switch(M.code){case Pd.code:throw new Pd(M);case Bd.code:throw new Bd(M);case Rd.code:throw new Rd(M,{method:t.method});case Qd.code:throw new Qd(M);case mb.code:throw new mb(M);case Ud.code:throw new Ud(M);case Zd.code:throw new Zd(M);case Ka.code:throw new Ka(M);case Xd.code:throw new Xd(M);case x4.code:throw new x4(M,{method:t.method});case Sf.code:throw new Sf(M);case Jd.code:throw new Jd(M);case we.code:throw new we(M);case Fd.code:throw new Fd(M);case Wd.code:throw new Wd(M);case Hd.code:throw new Hd(M);case Vd.code:throw new Vd(M);case hb.code:throw new hb(M);case 5e3:throw new we(M);default:throw h instanceof r1?h:new PV(M)}}},{delay:({count:h,error:M})=>{var T;if(M&&M instanceof cr){const x=(T=M==null?void 0:M.headers)==null?void 0:T.get("Retry-After");if(x!=null&&x.match(/\d/))return Number.parseInt(x)*1e3}return~~(1<<h)*r},retryCount:i,shouldRetry:({error:h})=>IG(h)}),{enabled:a,id:y})}}function IG(A){return"code"in A&&typeof A.code=="number"?A.code===-1||A.code===Sf.code||A.code===mb.code:A instanceof cr&&A.status?A.status===403||A.status===408||A.status===413||A.status===429||A.status===500||A.status===502||A.status===503||A.status===504:!0}function zE(A){return{formatters:void 0,fees:void 0,serializers:void 0,...A}}function jE(A,{errorInstance:e=new Error("timed out"),timeout:t,signal:n}){return new Promise((a,b)=>{(async()=>{let r;try{const i=new AbortController;t>0&&(r=setTimeout(()=>{n?i.abort():b(e)},t)),a(await A({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&b(e),b(i)}finally{clearTimeout(r)}})()})}function NG(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const kT=NG();function kG(A,e={}){return{async request(t){var l;const{body:n,onRequest:a=e.onRequest,onResponse:b=e.onResponse,timeout:r=e.timeout??1e4}=t,i={...e.fetchOptions??{},...t.fetchOptions??{}},{headers:s,method:u,signal:y}=i;try{const h=await jE(async({signal:T})=>{const x={...i,body:Array.isArray(n)?pn(n.map(w=>({jsonrpc:"2.0",id:w.id??kT.take(),...w}))):pn({jsonrpc:"2.0",id:n.id??kT.take(),...n}),headers:{"Content-Type":"application/json",...s},method:u||"POST",signal:y||(r>0?T:null)},v=new Request(A,x),z=await(a==null?void 0:a(v,x))??{...x,url:A};return await fetch(z.url??A,z)},{errorInstance:new MT({body:n,url:A}),timeout:r,signal:!0});b&&await b(h);let M;if((l=h.headers.get("Content-Type"))!=null&&l.startsWith("application/json"))M=await h.json();else{M=await h.text();try{M=JSON.parse(M||"{}")}catch(T){if(h.ok)throw T;M={error:M}}}if(!h.ok)throw new cr({body:n,details:pn(M.error)||h.statusText,headers:h.headers,status:h.status,url:A});return M}catch(h){throw h instanceof cr||h instanceof MT?h:new cr({body:n,cause:h,url:A})}}}}function DG(A,e,t){const n=A[e.name];if(typeof n=="function")return n;const a=A[t];return typeof a=="function"?a:b=>e(A,b)}const r7="2.16.5",EG=()=>`@wagmi/core@${r7}`;var CE=globalThis&&globalThis.__classPrivateFieldGet||function(A,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?A!==e||!n:!e.has(A))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(A):n?n.value:e.get(A)},B7,LE;let pg=class sm extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return EG()}constructor(e,t={}){var b;super(),B7.add(this),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:"WagmiCoreError"});const n=t.cause instanceof sm?t.cause.details:(b=t.cause)!=null&&b.message?t.cause.message:t.details,a=t.cause instanceof sm&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: ${this.docsBaseUrl}${a}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
|
|
368
|
-
`),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return CE(this,B7,"m",LE).call(this,this,e)}};B7=new WeakSet,LE=function A(e,t){return t!=null&&t(e)?e:e.cause?CE(this,B7,"m",A).call(this,e.cause,t):e};class cm extends pg{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}const om=256;let Eo=om,zo;function SE(A=11){if(!zo||Eo+A>om*2){zo="",Eo=0;for(let e=0;e<om;e++)zo+=(256+Math.random()*256|0).toString(16).substring(1)}return zo.substring(Eo,Eo+++A)}function zG(A){const{batch:e,cacheTime:t=A.pollingInterval??4e3,ccipRead:n,key:a="base",name:b="Base Client",pollingInterval:r=4e3,type:i="base"}=A,s=A.chain,u=A.account?Ru(A.account):void 0,{config:y,request:l,value:h}=A.transport({chain:s,pollingInterval:r}),M={...y,...h},T={account:u,batch:e,cacheTime:t,ccipRead:n,chain:s,key:a,name:b,pollingInterval:r,request:l,transport:M,type:i,uid:SE()};function x(v){return z=>{const j=z(v);for(const L in T)delete j[L];const w={...v,...j};return Object.assign(w,{extend:x(w)})}}return Object.assign(T,{extend:x(T)})}function jG({key:A,methods:e,name:t,request:n,retryCount:a=3,retryDelay:b=150,timeout:r,type:i},s){const u=SE();return{config:{key:A,methods:e,name:t,request:n,retryCount:a,retryDelay:b,timeout:r,type:i},request:wG(n,{methods:e,retryCount:a,retryDelay:b,uid:u}),value:s}}class CG extends r1{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function DT(A,e={}){const{batch:t,fetchOptions:n,key:a="http",methods:b,name:r="HTTP JSON-RPC",onFetchRequest:i,onFetchResponse:s,retryDelay:u,raw:y}=e;return({chain:l,retryCount:h,timeout:M})=>{const{batchSize:T=1e3,wait:x=0}=typeof t=="object"?t:{},v=e.retryCount??h,z=M??e.timeout??1e4,j=A||(l==null?void 0:l.rpcUrls.default.http[0]);if(!j)throw new CG;const w=kG(j,{fetchOptions:n,onRequest:i,onResponse:s,timeout:z});return jG({key:a,methods:b,name:r,async request({method:L,params:I}){const C={method:L,params:I},{schedule:O}=kE({id:j,wait:x,shouldSplitBatch(K){return K.length>T},fn:K=>w.request({body:K}),sort:(K,s0)=>K.id-s0.id}),B=async K=>t?O(K):[await w.request({body:K})],[{error:H,result:V}]=await B(C);if(y)return{error:H,result:V};if(H)throw new og({body:C,error:H,url:j});return V},retryCount:v,retryDelay:u,timeout:z,type:"http"},{fetchOptions:n,url:j})}}function LG(A,e){const{chainId:t,...n}=e,a=A.getClient({chainId:t});return DG(a,vG,"readContract")(n)}function SG(A){return A.state.chainId}let kp=!1;async function OG(A,e={}){var u,y;if(kp)return[];kp=!0,A.setState(l=>({...l,status:l.current?"reconnecting":"connecting"}));const t=[];if((u=e.connectors)!=null&&u.length)for(const l of e.connectors){let h;typeof l=="function"?h=A._internal.connectors.setup(l):h=l,t.push(h)}else t.push(...A.connectors);let n;try{n=await((y=A.storage)==null?void 0:y.getItem("recentConnectorId"))}catch{}const a={};for(const[,l]of A.state.connections)a[l.connector.id]=1;n&&(a[n]=0);const b=Object.keys(a).length>0?[...t].sort((l,h)=>(a[l.id]??10)-(a[h.id]??10)):t;let r=!1;const i=[],s=[];for(const l of b){const h=await l.getProvider().catch(()=>{});if(!h||s.some(x=>x===h)||!await l.isAuthorized())continue;const T=await l.connect({isReconnecting:!0}).catch(()=>null);T&&(l.emitter.off("connect",A._internal.events.connect),l.emitter.on("change",A._internal.events.change),l.emitter.on("disconnect",A._internal.events.disconnect),A.setState(x=>{const v=new Map(r?x.connections:new Map).set(l.uid,{accounts:T.accounts,chainId:T.chainId,connector:l});return{...x,current:r?x.current:l.uid,connections:v}}),i.push({accounts:T.accounts,chainId:T.chainId,connector:l}),s.push(h),r=!0)}return(A.state.status==="reconnecting"||A.state.status==="connecting")&&(r?A.setState(l=>({...l,status:"connected"})):A.setState(l=>({...l,connections:new Map,current:null,status:"disconnected"}))),kp=!1,i}class R9 extends pg{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}function PG(A,e){const{onChange:t}=e;return A.subscribe(n=>n.chainId,t)}yg.type="injected";function yg(A={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:t}=A;function n(){const s=A.target;if(typeof s=="function"){const u=s();if(u)return u}return typeof s=="object"?s:typeof s=="string"?{...BG[s]??{id:s,name:`${s[0].toUpperCase()}${s.slice(1)}`,provider:`is${s[0].toUpperCase()}${s.slice(1)}`}}:{id:"injected",name:"Injected",provider(u){return u==null?void 0:u.ethereum}}}let a,b,r,i;return s=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},get supportsSimulation(){return!0},type:yg.type,async setup(){const u=await this.getProvider();u!=null&&u.on&&A.target&&(r||(r=this.onConnect.bind(this),u.on("connect",r)),a||(a=this.onAccountsChanged.bind(this),u.on("accountsChanged",a)))},async connect({chainId:u,isReconnecting:y}={}){var M,T,x,v,z,j;const l=await this.getProvider();if(!l)throw new R9;let h=[];if(y)h=await this.getAccounts().catch(()=>[]);else if(e)try{h=(v=(x=(T=(M=(await l.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:M.caveats)==null?void 0:T[0])==null?void 0:x.value)==null?void 0:v.map(L=>ko(L)),h.length>0&&(h=await this.getAccounts())}catch(w){const L=w;if(L.code===we.code)throw new we(L);if(L.code===Ka.code)throw L}try{!(h!=null&&h.length)&&!y&&(h=(await l.request({method:"eth_requestAccounts"})).map(I=>ko(I))),r&&(l.removeListener("connect",r),r=void 0),a||(a=this.onAccountsChanged.bind(this),l.on("accountsChanged",a)),b||(b=this.onChainChanged.bind(this),l.on("chainChanged",b)),i||(i=this.onDisconnect.bind(this),l.on("disconnect",i));let w=await this.getChainId();if(u&&w!==u){const L=await this.switchChain({chainId:u}).catch(I=>{if(I.code===we.code)throw I;return{id:w}});w=(L==null?void 0:L.id)??w}return e&&await((z=s.storage)==null?void 0:z.removeItem(`${this.id}.disconnected`)),A.target||await((j=s.storage)==null?void 0:j.setItem("injected.connected",!0)),{accounts:h,chainId:w}}catch(w){const L=w;throw L.code===we.code?new we(L):L.code===Ka.code?new Ka(L):L}},async disconnect(){var y,l;const u=await this.getProvider();if(!u)throw new R9;b&&(u.removeListener("chainChanged",b),b=void 0),i&&(u.removeListener("disconnect",i),i=void 0),r||(r=this.onConnect.bind(this),u.on("connect",r));try{await jE(()=>u.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await((y=s.storage)==null?void 0:y.setItem(`${this.id}.disconnected`,!0)),A.target||await((l=s.storage)==null?void 0:l.removeItem("injected.connected"))},async getAccounts(){const u=await this.getProvider();if(!u)throw new R9;return(await u.request({method:"eth_accounts"})).map(l=>ko(l))},async getChainId(){const u=await this.getProvider();if(!u)throw new R9;const y=await u.request({method:"eth_chainId"});return Number(y)},async getProvider(){if(typeof window>"u")return;let u;const y=n();return typeof y.provider=="function"?u=y.provider(window):typeof y.provider=="string"?u=f7(window,y.provider):u=y.provider,u&&!u.removeListener&&("off"in u&&typeof u.off=="function"?u.removeListener=u.off:u.removeListener=()=>{}),u},async isAuthorized(){var u,y;try{if(e&&await((u=s.storage)==null?void 0:u.getItem(`${this.id}.disconnected`))||!A.target&&!await((y=s.storage)==null?void 0:y.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(t!==void 0&&t!==!1){const T=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",T),!!await this.getProvider()),x=typeof t=="number"?t:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(z=>window.addEventListener("ethereum#initialized",()=>z(T()),{once:!0}))]:[],new Promise(z=>setTimeout(()=>z(T()),x))]))return!0}throw new R9}return!!(await EE(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:u,chainId:y}){var T,x,v,z;const l=await this.getProvider();if(!l)throw new R9;const h=s.chains.find(j=>j.id===y);if(!h)throw new hb(new cm);const M=new Promise(j=>{const w=L=>{"chainId"in L&&L.chainId===y&&(s.emitter.off("change",w),j())};s.emitter.on("change",w)});try{return await Promise.all([l.request({method:"wallet_switchEthereumChain",params:[{chainId:L6(y)}]}).then(async()=>{await this.getChainId()===y&&s.emitter.emit("change",{chainId:y})}),M]),h}catch(j){const w=j;if(w.code===4902||((x=(T=w==null?void 0:w.data)==null?void 0:T.originalError)==null?void 0:x.code)===4902)try{const{default:L,...I}=h.blockExplorers??{};let C;u!=null&&u.blockExplorerUrls?C=u.blockExplorerUrls:L&&(C=[L.url,...Object.values(I).map(H=>H.url)]);let O;(v=u==null?void 0:u.rpcUrls)!=null&&v.length?O=u.rpcUrls:O=[((z=h.rpcUrls.default)==null?void 0:z.http[0])??""];const B={blockExplorerUrls:C,chainId:L6(y),chainName:(u==null?void 0:u.chainName)??h.name,iconUrls:u==null?void 0:u.iconUrls,nativeCurrency:(u==null?void 0:u.nativeCurrency)??h.nativeCurrency,rpcUrls:O};return await Promise.all([l.request({method:"wallet_addEthereumChain",params:[B]}).then(async()=>{if(await this.getChainId()===y)s.emitter.emit("change",{chainId:y});else throw new we(new Error("User rejected switch after adding network."))}),M]),h}catch(L){throw new we(L)}throw w.code===we.code?new we(w):new hb(w)}},async onAccountsChanged(u){var y;if(u.length===0)this.onDisconnect();else if(s.emitter.listenerCount("connect")){const l=(await this.getChainId()).toString();this.onConnect({chainId:l}),e&&await((y=s.storage)==null?void 0:y.removeItem(`${this.id}.disconnected`))}else s.emitter.emit("change",{accounts:u.map(l=>ko(l))})},onChainChanged(u){const y=Number(u);s.emitter.emit("change",{chainId:y})},async onConnect(u){const y=await this.getAccounts();if(y.length===0)return;const l=Number(u.chainId);s.emitter.emit("connect",{accounts:y,chainId:l});const h=await this.getProvider();h&&(r&&(h.removeListener("connect",r),r=void 0),a||(a=this.onAccountsChanged.bind(this),h.on("accountsChanged",a)),b||(b=this.onChainChanged.bind(this),h.on("chainChanged",b)),i||(i=this.onDisconnect.bind(this),h.on("disconnect",i)))},async onDisconnect(u){const y=await this.getProvider();u&&u.code===1013&&y&&(await this.getAccounts()).length||(s.emitter.emit("disconnect"),y&&(b&&(y.removeListener("chainChanged",b),b=void 0),i&&(y.removeListener("disconnect",i),i=void 0),r||(r=this.onConnect.bind(this),y.on("connect",r))))}})}const BG={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(A){return A!=null&&A.coinbaseWalletExtension?A.coinbaseWalletExtension:f7(A,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(A){return f7(A,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const t=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of t)if(e[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(A){var e,t;return(e=A==null?void 0:A.phantom)!=null&&e.ethereum?(t=A.phantom)==null?void 0:t.ethereum:f7(A,"isPhantom")}}};function f7(A,e){function t(a){return typeof e=="function"?e(a):typeof e=="string"?a[e]:!0}const n=A.ethereum;if(n!=null&&n.providers)return n.providers.find(a=>t(a));if(n&&t(n))return n}function RG(A){if(typeof window>"u")return;const e=t=>A(t.detail);return window.addEventListener("eip6963:announceProvider",e),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",e)}function QG(){const A=new Set;let e=[];const t=()=>RG(a=>{e.some(({info:b})=>b.uuid===a.info.uuid)||(e=[...e,a],A.forEach(b=>b(e,{added:[a]})))});let n=t();return{_listeners(){return A},clear(){A.forEach(a=>a([],{removed:[...e]})),e=[]},destroy(){this.clear(),A.clear(),n==null||n()},findProvider({rdns:a}){return e.find(b=>b.info.rdns===a)},getProviders(){return e},reset(){this.clear(),n==null||n(),n=t()},subscribe(a,{emitImmediately:b}={}){return A.add(a),b&&a(e,{added:e}),()=>A.delete(a)}}}const UG=A=>(e,t,n)=>{const a=n.subscribe;return n.subscribe=(r,i,s)=>{let u=r;if(i){const y=(s==null?void 0:s.equalityFn)||Object.is;let l=r(n.getState());u=h=>{const M=r(h);if(!y(l,M)){const T=l;i(l=M,T)}},s!=null&&s.fireImmediately&&i(l,l)}return a(u)},A(e,t,n)},ZG=UG;function XG(A,e){let t;try{t=A()}catch{return}return{getItem:a=>{var b;const r=s=>s===null?null:JSON.parse(s,e==null?void 0:e.reviver),i=(b=t.getItem(a))!=null?b:null;return i instanceof Promise?i.then(r):r(i)},setItem:(a,b)=>t.setItem(a,JSON.stringify(b,e==null?void 0:e.replacer)),removeItem:a=>t.removeItem(a)}}const um=A=>e=>{try{const t=A(e);return t instanceof Promise?t:{then(n){return um(n)(t)},catch(n){return this}}}catch(t){return{then(n){return this},catch(n){return um(n)(t)}}}},JG=(A,e)=>(t,n,a)=>{let b={storage:XG(()=>localStorage),partialize:x=>x,version:0,merge:(x,v)=>({...v,...x}),...e},r=!1;const i=new Set,s=new Set;let u=b.storage;if(!u)return A((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${b.name}', the given storage is currently unavailable.`),t(...x)},n,a);const y=()=>{const x=b.partialize({...n()});return u.setItem(b.name,{state:x,version:b.version})},l=a.setState;a.setState=(x,v)=>{l(x,v),y()};const h=A((...x)=>{t(...x),y()},n,a);a.getInitialState=()=>h;let M;const T=()=>{var x,v;if(!u)return;r=!1,i.forEach(j=>{var w;return j((w=n())!=null?w:h)});const z=((v=b.onRehydrateStorage)==null?void 0:v.call(b,(x=n())!=null?x:h))||void 0;return um(u.getItem.bind(u))(b.name).then(j=>{if(j)if(typeof j.version=="number"&&j.version!==b.version){if(b.migrate)return[!0,b.migrate(j.state,j.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,j.state];return[!1,void 0]}).then(j=>{var w;const[L,I]=j;if(M=b.merge(I,(w=n())!=null?w:h),t(M,!0),L)return y()}).then(()=>{z==null||z(M,void 0),M=n(),r=!0,s.forEach(j=>j(M))}).catch(j=>{z==null||z(void 0,j)})};return a.persist={setOptions:x=>{b={...b,...x},x.storage&&(u=x.storage)},clearStorage:()=>{u==null||u.removeItem(b.name)},getOptions:()=>b,rehydrate:()=>T(),hasHydrated:()=>r,onHydrate:x=>(i.add(x),()=>{i.delete(x)}),onFinishHydration:x=>(s.add(x),()=>{s.delete(x)})},b.skipHydration||T(),M||h},FG=JG,ET=A=>{let e;const t=new Set,n=(u,y)=>{const l=typeof u=="function"?u(e):u;if(!Object.is(l,e)){const h=e;e=y??(typeof l!="object"||l===null)?l:Object.assign({},e,l),t.forEach(M=>M(e,h))}},a=()=>e,i={setState:n,getState:a,getInitialState:()=>s,subscribe:u=>(t.add(u),()=>t.delete(u))},s=e=A(n,a,i);return i},Dp=A=>A?ET(A):ET;var OE={exports:{}};(function(A){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function a(s,u,y){this.fn=s,this.context=u,this.once=y||!1}function b(s,u,y,l,h){if(typeof y!="function")throw new TypeError("The listener must be a function");var M=new a(y,l||s,h),T=t?t+u:u;return s._events[T]?s._events[T].fn?s._events[T]=[s._events[T],M]:s._events[T].push(M):(s._events[T]=M,s._eventsCount++),s}function r(s,u){--s._eventsCount===0?s._events=new n:delete s._events[u]}function i(){this._events=new n,this._eventsCount=0}i.prototype.eventNames=function(){var u=[],y,l;if(this._eventsCount===0)return u;for(l in y=this._events)e.call(y,l)&&u.push(t?l.slice(1):l);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(y)):u},i.prototype.listeners=function(u){var y=t?t+u:u,l=this._events[y];if(!l)return[];if(l.fn)return[l.fn];for(var h=0,M=l.length,T=new Array(M);h<M;h++)T[h]=l[h].fn;return T},i.prototype.listenerCount=function(u){var y=t?t+u:u,l=this._events[y];return l?l.fn?1:l.length:0},i.prototype.emit=function(u,y,l,h,M,T){var x=t?t+u:u;if(!this._events[x])return!1;var v=this._events[x],z=arguments.length,j,w;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),z){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,y),!0;case 3:return v.fn.call(v.context,y,l),!0;case 4:return v.fn.call(v.context,y,l,h),!0;case 5:return v.fn.call(v.context,y,l,h,M),!0;case 6:return v.fn.call(v.context,y,l,h,M,T),!0}for(w=1,j=new Array(z-1);w<z;w++)j[w-1]=arguments[w];v.fn.apply(v.context,j)}else{var L=v.length,I;for(w=0;w<L;w++)switch(v[w].once&&this.removeListener(u,v[w].fn,void 0,!0),z){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,y);break;case 3:v[w].fn.call(v[w].context,y,l);break;case 4:v[w].fn.call(v[w].context,y,l,h);break;default:if(!j)for(I=1,j=new Array(z-1);I<z;I++)j[I-1]=arguments[I];v[w].fn.apply(v[w].context,j)}}return!0},i.prototype.on=function(u,y,l){return b(this,u,y,l,!1)},i.prototype.once=function(u,y,l){return b(this,u,y,l,!0)},i.prototype.removeListener=function(u,y,l,h){var M=t?t+u:u;if(!this._events[M])return this;if(!y)return r(this,M),this;var T=this._events[M];if(T.fn)T.fn===y&&(!h||T.once)&&(!l||T.context===l)&&r(this,M);else{for(var x=0,v=[],z=T.length;x<z;x++)(T[x].fn!==y||h&&!T[x].once||l&&T[x].context!==l)&&v.push(T[x]);v.length?this._events[M]=v.length===1?v[0]:v:r(this,M)}return this},i.prototype.removeAllListeners=function(u){var y;return u?(y=t?t+u:u,this._events[y]&&r(this,y)):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=t,i.EventEmitter=i,A.exports=i})(OE);var WG=OE.exports;const HG=Nb(WG);class VG{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new HG})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){const n=t[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}}function YG(A){return new VG(A)}function GG(A,e){return JSON.parse(A,(t,n)=>{let a=n;return(a==null?void 0:a.__type)==="bigint"&&(a=BigInt(a.value)),(a==null?void 0:a.__type)==="Map"&&(a=new Map(a.value)),(e==null?void 0:e(t,a))??a})}function zT(A,e){return A.slice(0,e).join(".")||"."}function jT(A,e){const{length:t}=A;for(let n=0;n<t;++n)if(A[n]===e)return n+1;return 0}function qG(A,e){const t=typeof A=="function",n=typeof e=="function",a=[],b=[];return function(i,s){if(typeof s=="object")if(a.length){const u=jT(a,this);u===0?a[a.length]=this:(a.splice(u),b.splice(u)),b[b.length]=i;const y=jT(a,s);if(y!==0)return n?e.call(this,i,s,zT(b,y)):`[ref=${zT(b,y)}]`}else a[0]=s,b[0]=i;return t?A.call(this,i,s):s}}function KG(A,e,t,n){return JSON.stringify(A,qG((a,b)=>{let r=b;return typeof r=="bigint"&&(r={__type:"bigint",value:b.toString()}),r instanceof Map&&(r={__type:"Map",value:Array.from(b.entries())}),(e==null?void 0:e(a,r))??r},n),t??void 0)}function _G(A){const{deserialize:e=GG,key:t="wagmi",serialize:n=KG,storage:a=PE}=A;function b(r){return r instanceof Promise?r.then(i=>i).catch(()=>null):r}return{...a,key:t,async getItem(r,i){const s=a.getItem(`${t}.${r}`),u=await b(s);return u?e(u)??null:i??null},async setItem(r,i){const s=`${t}.${r}`;i===null?await b(a.removeItem(s)):await b(a.setItem(s,n(i)))},async removeItem(r){await b(a.removeItem(`${t}.${r}`))}}}const PE={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function $G(){const A=(()=>typeof window<"u"&&window.localStorage?window.localStorage:PE)();return{getItem(e){return A.getItem(e)},removeItem(e){A.removeItem(e)},setItem(e,t){try{A.setItem(e,t)}catch{}}}}const lm=256;let jo=lm,Co;function eq(A=11){if(!Co||jo+A>lm*2){Co="",jo=0;for(let e=0;e<lm;e++)Co+=(256+Math.random()*256|0).toString(16).substring(1)}return Co.substring(jo,jo+++A)}function Aq(A){const{multiInjectedProviderDiscovery:e=!0,storage:t=_G({storage:$G()}),syncConnectedChain:n=!0,ssr:a=!1,...b}=A,r=typeof window<"u"&&e?QG():void 0,i=Dp(()=>b.chains),s=Dp(()=>{const I=[],C=new Set;for(const O of b.connectors??[]){const B=u(O);if(I.push(B),!a&&B.rdns){const H=typeof B.rdns=="string"?[B.rdns]:B.rdns;for(const V of H)C.add(V)}}if(!a&&r){const O=r.getProviders();for(const B of O)C.has(B.info.rdns)||I.push(u(y(B)))}return I});function u(I){var B;const C=YG(eq()),O={...I({emitter:C,chains:i.getState(),storage:t,transports:b.transports}),emitter:C,uid:C.uid};return C.on("connect",w),(B=O.setup)==null||B.call(O),O}function y(I){const{info:C}=I,O=I.provider;return yg({target:{...C,id:C.rdns,provider:O}})}const l=new Map;function h(I={}){const C=I.chainId??v.getState().chainId,O=i.getState().find(H=>H.id===C);if(I.chainId&&!O)throw new cm;{const H=l.get(v.getState().chainId);if(H&&!O)return H;if(!O)throw new cm}{const H=l.get(C);if(H)return H}let B;if(b.client)B=b.client({chain:O});else{const H=O.id,V=i.getState().map(y0=>y0.id),K={},s0=Object.entries(b);for(const[y0,r0]of s0)if(!(y0==="chains"||y0==="client"||y0==="connectors"||y0==="transports"))if(typeof r0=="object")if(H in r0)K[y0]=r0[H];else{if(V.some(J=>J in r0))continue;K[y0]=r0}else K[y0]=r0;B=zG({...K,chain:O,batch:K.batch??{multicall:!0},transport:y0=>b.transports[H]({...y0,connectors:s})})}return l.set(C,B),B}function M(){return{chainId:i.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let T;const x="0.0.0-canary-";r7.startsWith(x)?T=Number.parseInt(r7.replace(x,"")):T=Number.parseInt(r7.split(".")[0]??"0");const v=Dp(ZG(t?FG(M,{migrate(I,C){if(C===T)return I;const O=M(),B=z(I,O.chainId);return{...O,chainId:B}},name:"store",partialize(I){return{connections:{__type:"Map",value:Array.from(I.connections.entries()).map(([C,O])=>{const{id:B,name:H,type:V,uid:K}=O.connector;return[C,{...O,connector:{id:B,name:H,type:V,uid:K}}]})},chainId:I.chainId,current:I.current}},merge(I,C){typeof I=="object"&&I&&"status"in I&&delete I.status;const O=z(I,C.chainId);return{...C,...I,chainId:O}},skipHydration:a,storage:t,version:T}):M));v.setState(M());function z(I,C){return I&&typeof I=="object"&&"chainId"in I&&typeof I.chainId=="number"&&i.getState().some(O=>O.id===I.chainId)?I.chainId:C}n&&v.subscribe(({connections:I,current:C})=>{var O;return C?(O=I.get(C))==null?void 0:O.chainId:void 0},I=>{if(i.getState().some(O=>O.id===I))return v.setState(O=>({...O,chainId:I??O.chainId}))}),r==null||r.subscribe(I=>{const C=new Set,O=new Set;for(const H of s.getState())if(C.add(H.id),H.rdns){const V=typeof H.rdns=="string"?[H.rdns]:H.rdns;for(const K of V)O.add(K)}const B=[];for(const H of I){if(O.has(H.info.rdns))continue;const V=u(y(H));C.has(V.id)||B.push(V)}t&&!v.persist.hasHydrated()||s.setState(H=>[...H,...B],!0)});function j(I){v.setState(C=>{const O=C.connections.get(I.uid);return O?{...C,connections:new Map(C.connections).set(I.uid,{accounts:I.accounts??O.accounts,chainId:I.chainId??O.chainId,connector:O.connector})}:C})}function w(I){v.getState().status==="connecting"||v.getState().status==="reconnecting"||v.setState(C=>{const O=s.getState().find(B=>B.uid===I.uid);return O?(O.emitter.listenerCount("connect")&&O.emitter.off("connect",j),O.emitter.listenerCount("change")||O.emitter.on("change",j),O.emitter.listenerCount("disconnect")||O.emitter.on("disconnect",L),{...C,connections:new Map(C.connections).set(I.uid,{accounts:I.accounts,chainId:I.chainId,connector:O}),current:I.uid,status:"connected"}):C})}function L(I){v.setState(C=>{const O=C.connections.get(I.uid);if(O){const H=O.connector;H.emitter.listenerCount("change")&&O.connector.emitter.off("change",j),H.emitter.listenerCount("disconnect")&&O.connector.emitter.off("disconnect",L),H.emitter.listenerCount("connect")||O.connector.emitter.on("connect",w)}if(C.connections.delete(I.uid),C.connections.size===0)return{...C,connections:new Map,current:null,status:"disconnected"};const B=C.connections.values().next().value;return{...C,connections:new Map(C.connections),current:B.connector.uid}})}return{get chains(){return i.getState()},get connectors(){return s.getState()},storage:t,getClient:h,get state(){return v.getState()},setState(I){let C;typeof I=="function"?C=I(v.getState()):C=I;const O=M();typeof C!="object"&&(C=O),Object.keys(O).some(H=>!(H in C))&&(C=O),v.setState(C,!0)},subscribe(I,C,O){return v.subscribe(I,C,O?{...O,fireImmediately:O.emitImmediately}:void 0)},_internal:{mipd:r,store:v,ssr:!!a,syncConnectedChain:n,transports:b.transports,chains:{setState(I){const C=typeof I=="function"?I(i.getState()):I;if(C.length!==0)return i.setState(C,!0)},subscribe(I){return i.subscribe(I)}},connectors:{providerDetailToConnector:y,setup:u,setState(I){return s.setState(typeof I=="function"?I(s.getState()):I,!0)},subscribe(I){return s.subscribe(I)}},events:{change:j,connect:w,disconnect:L}}}}function tq(A,e){const{initialState:t,reconnectOnMount:n}=e;return t&&!A._internal.store.persist.hasHydrated()&&A.setState({...t,chainId:A.chains.some(a=>a.id===t.chainId)?t.chainId:A.chains[0].id,connections:n?t.connections:new Map,status:n?"reconnecting":"disconnected"}),{async onMount(){A._internal.ssr&&(await A._internal.store.persist.rehydrate(),A._internal.mipd&&A._internal.connectors.setState(a=>{var s;const b=new Set;for(const u of a??[])if(u.rdns){const y=Array.isArray(u.rdns)?u.rdns:[u.rdns];for(const l of y)b.add(l)}const r=[],i=((s=A._internal.mipd)==null?void 0:s.getProviders())??[];for(const u of i){if(b.has(u.info.rdns))continue;const y=A._internal.connectors.providerDetailToConnector(u),l=A._internal.connectors.setup(y);r.push(l)}return[...a,...r]})),n?OG(A):A.storage&&A.setState(a=>({...a,connections:new Map}))}}}function nq(A){const{children:e,config:t,initialState:n,reconnectOnMount:a=!0}=A,{onMount:b}=tq(t,{initialState:n,reconnectOnMount:a});t._internal.ssr||b();const r=e3(!0);return G6(()=>{if(r.current&&t._internal.ssr)return b(),()=>{r.current=!1}},[]),e}const BE=Tb(void 0);function aq(A){const{children:e,config:t}=A,n={value:t};return F5(nq,A,F5(BE.Provider,n,e))}const bq="2.14.13",rq=()=>`wagmi@${bq}`;class fq extends pg{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return rq()}}class iq extends fq{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function RE(A={}){const e=A.config??H8(BE);if(!e)throw new iq;return e}const QE=hu(xH);var Ws=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(A){return this.listeners.add(A),this.onSubscribe(),()=>{this.listeners.delete(A),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Mb=typeof window>"u"||"Deno"in globalThis;function KA(){}function dq(A,e){return typeof A=="function"?A(e):A}function pm(A){return typeof A=="number"&&A>=0&&A!==1/0}function UE(A,e){return Math.max(A+(e||0)-Date.now(),0)}function ur(A,e){return typeof A=="function"?A(e):A}function P8(A,e){return typeof A=="function"?A(e):A}function CT(A,e){const{type:t="all",exact:n,fetchStatus:a,predicate:b,queryKey:r,stale:i}=A;if(r){if(n){if(e.queryHash!==mg(r,e.options))return!1}else if(!qd(e.queryKey,r))return!1}if(t!=="all"){const s=e.isActive();if(t==="active"&&!s||t==="inactive"&&s)return!1}return!(typeof i=="boolean"&&e.isStale()!==i||a&&a!==e.state.fetchStatus||b&&!b(e))}function LT(A,e){const{exact:t,status:n,predicate:a,mutationKey:b}=A;if(b){if(!e.options.mutationKey)return!1;if(t){if(Gd(e.options.mutationKey)!==Gd(b))return!1}else if(!qd(e.options.mutationKey,b))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function mg(A,e){return((e==null?void 0:e.queryKeyHashFn)||Gd)(A)}function Gd(A){return JSON.stringify(A,(e,t)=>mm(t)?Object.keys(t).sort().reduce((n,a)=>(n[a]=t[a],n),{}):t)}function qd(A,e){return A===e?!0:typeof A!=typeof e?!1:A&&e&&typeof A=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!qd(A[t],e[t])):!1}function R7(A,e){if(A===e)return A;const t=ST(A)&&ST(e);if(t||mm(A)&&mm(e)){const n=t?A:Object.keys(A),a=n.length,b=t?e:Object.keys(e),r=b.length,i=t?[]:{};let s=0;for(let u=0;u<r;u++){const y=t?u:b[u];(!t&&n.includes(y)||t)&&A[y]===void 0&&e[y]===void 0?(i[y]=void 0,s++):(i[y]=R7(A[y],e[y]),i[y]===A[y]&&A[y]!==void 0&&s++)}return a===r&&s===a?A:i}return e}function ym(A,e){if(!e||Object.keys(A).length!==Object.keys(e).length)return!1;for(const t in A)if(A[t]!==e[t])return!1;return!0}function ST(A){return Array.isArray(A)&&A.length===Object.keys(A).length}function mm(A){if(!OT(A))return!1;const e=A.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!OT(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(A)!==Object.prototype)}function OT(A){return Object.prototype.toString.call(A)==="[object Object]"}function sq(A){return new Promise(e=>{setTimeout(e,A)})}function hm(A,e,t){if(typeof t.structuralSharing=="function")return t.structuralSharing(A,e);if(t.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return R7(A,e)}catch(n){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${t.queryHash}]: ${n}`)}return R7(A,e)}return e}function cq(A,e,t=0){const n=[...A,e];return t&&n.length>t?n.slice(1):n}function oq(A,e,t=0){const n=[e,...A];return t&&n.length>t?n.slice(0,-1):n}var Q7=Symbol();function ZE(A,e){return process.env.NODE_ENV!=="production"&&A.queryFn===Q7&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${A.queryHash}'`),!A.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!A.queryFn||A.queryFn===Q7?()=>Promise.reject(new Error(`Missing queryFn: '${A.queryHash}'`)):A.queryFn}var Y4,Ua,nf,Gw,uq=(Gw=class extends Ws{constructor(){super();f0(this,Y4,void 0);f0(this,Ua,void 0);f0(this,nf,void 0);F(this,nf,e=>{if(!Mb&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){E(this,Ua)||this.setEventListener(E(this,nf))}onUnsubscribe(){var e;this.hasListeners()||((e=E(this,Ua))==null||e.call(this),F(this,Ua,void 0))}setEventListener(e){var t;F(this,nf,e),(t=E(this,Ua))==null||t.call(this),F(this,Ua,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){E(this,Y4)!==e&&(F(this,Y4,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof E(this,Y4)=="boolean"?E(this,Y4):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Y4=new WeakMap,Ua=new WeakMap,nf=new WeakMap,Gw),hg=new uq,af,Za,bf,qw,lq=(qw=class extends Ws{constructor(){super();f0(this,af,!0);f0(this,Za,void 0);f0(this,bf,void 0);F(this,bf,e=>{if(!Mb&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){E(this,Za)||this.setEventListener(E(this,bf))}onUnsubscribe(){var e;this.hasListeners()||((e=E(this,Za))==null||e.call(this),F(this,Za,void 0))}setEventListener(e){var t;F(this,bf,e),(t=E(this,Za))==null||t.call(this),F(this,Za,e(this.setOnline.bind(this)))}setOnline(e){E(this,af)!==e&&(F(this,af,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return E(this,af)}},af=new WeakMap,Za=new WeakMap,bf=new WeakMap,qw),U7=new lq;function gm(){let A,e;const t=new Promise((a,b)=>{A=a,e=b});t.status="pending",t.catch(()=>{});function n(a){Object.assign(t,a),delete t.resolve,delete t.reject}return t.resolve=a=>{n({status:"fulfilled",value:a}),A(a)},t.reject=a=>{n({status:"rejected",reason:a}),e(a)},t}function pq(A){return Math.min(1e3*2**A,3e4)}function XE(A){return(A??"online")==="online"?U7.isOnline():!0}var JE=class extends Error{constructor(A){super("CancelledError"),this.revert=A==null?void 0:A.revert,this.silent=A==null?void 0:A.silent}};function Ep(A){return A instanceof JE}function FE(A){let e=!1,t=0,n=!1,a;const b=gm(),r=x=>{var v;n||(h(new JE(x)),(v=A.abort)==null||v.call(A))},i=()=>{e=!0},s=()=>{e=!1},u=()=>hg.isFocused()&&(A.networkMode==="always"||U7.isOnline())&&A.canRun(),y=()=>XE(A.networkMode)&&A.canRun(),l=x=>{var v;n||(n=!0,(v=A.onSuccess)==null||v.call(A,x),a==null||a(),b.resolve(x))},h=x=>{var v;n||(n=!0,(v=A.onError)==null||v.call(A,x),a==null||a(),b.reject(x))},M=()=>new Promise(x=>{var v;a=z=>{(n||u())&&x(z)},(v=A.onPause)==null||v.call(A)}).then(()=>{var x;a=void 0,n||(x=A.onContinue)==null||x.call(A)}),T=()=>{if(n)return;let x;const v=t===0?A.initialPromise:void 0;try{x=v??A.fn()}catch(z){x=Promise.reject(z)}Promise.resolve(x).then(l).catch(z=>{var C;if(n)return;const j=A.retry??(Mb?0:3),w=A.retryDelay??pq,L=typeof w=="function"?w(t,z):w,I=j===!0||typeof j=="number"&&t<j||typeof j=="function"&&j(t,z);if(e||!I){h(z);return}t++,(C=A.onFail)==null||C.call(A,t,z),sq(L).then(()=>u()?void 0:M()).then(()=>{e?h(z):T()})})};return{promise:b,cancel:r,continue:()=>(a==null||a(),b),cancelRetry:i,continueRetry:s,canStart:y,start:()=>(y()?T():M().then(T),b)}}function yq(){let A=[],e=0,t=i=>{i()},n=i=>{i()},a=i=>setTimeout(i,0);const b=i=>{e?A.push(i):a(()=>{t(i)})},r=()=>{const i=A;A=[],i.length&&a(()=>{n(()=>{i.forEach(s=>{t(s)})})})};return{batch:i=>{let s;e++;try{s=i()}finally{e--,e||r()}return s},batchCalls:i=>(...s)=>{b(()=>{i(...s)})},schedule:b,setNotifyFunction:i=>{t=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{a=i}}}var X5=yq(),G4,Kw,WE=(Kw=class{constructor(){f0(this,G4,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pm(this.gcTime)&&F(this,G4,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(A){this.gcTime=Math.max(this.gcTime||0,A??(Mb?1/0:5*60*1e3))}clearGcTimeout(){E(this,G4)&&(clearTimeout(E(this,G4)),F(this,G4,void 0))}},G4=new WeakMap,Kw),rf,ff,GA,q4,ae,gs,K4,S8,Z2,_w,mq=(_w=class extends WE{constructor(e){super();f0(this,S8);f0(this,rf,void 0);f0(this,ff,void 0);f0(this,GA,void 0);f0(this,q4,void 0);f0(this,ae,void 0);f0(this,gs,void 0);f0(this,K4,void 0);F(this,K4,!1),F(this,gs,e.defaultOptions),this.setOptions(e.options),this.observers=[],F(this,q4,e.client),F(this,GA,E(this,q4).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,F(this,rf,hq(this.options)),this.state=e.state??E(this,rf),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=E(this,ae))==null?void 0:e.promise}setOptions(e){this.options={...E(this,gs),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,GA).remove(this)}setData(e,t){const n=hm(this.state.data,e,this.options);return X0(this,S8,Z2).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e,t){X0(this,S8,Z2).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var n,a;const t=(n=E(this,ae))==null?void 0:n.promise;return(a=E(this,ae))==null||a.cancel(e),t?t.then(KA).catch(KA):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,rf))}isActive(){return this.observers.some(e=>P8(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Q7||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!UE(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=E(this,ae))==null||t.continue()}onOnline(){var t;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=E(this,ae))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),E(this,GA).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(E(this,ae)&&(E(this,K4)?E(this,ae).cancel({revert:!0}):E(this,ae).cancelRetry()),this.scheduleGc()),E(this,GA).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X0(this,S8,Z2).call(this,{type:"invalidate"})}fetch(e,t){var s,u,y;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(E(this,ae))return E(this,ae).continueRetry(),E(this,ae).promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(h=>h.options.queryFn);l&&this.setOptions(l.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,a=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(F(this,K4,!0),n.signal)})},b=()=>{const l=ZE(this.options,t),h={client:E(this,q4),queryKey:this.queryKey,meta:this.meta};return a(h),F(this,K4,!1),this.options.persister?this.options.persister(l,h,this):l(h)},r={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:E(this,q4),state:this.state,fetchFn:b};a(r),(s=this.options.behavior)==null||s.onFetch(r,this),F(this,ff,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=r.fetchOptions)==null?void 0:u.meta))&&X0(this,S8,Z2).call(this,{type:"fetch",meta:(y=r.fetchOptions)==null?void 0:y.meta});const i=l=>{var h,M,T,x;Ep(l)&&l.silent||X0(this,S8,Z2).call(this,{type:"error",error:l}),Ep(l)||((M=(h=E(this,GA).config).onError)==null||M.call(h,l,this),(x=(T=E(this,GA).config).onSettled)==null||x.call(T,this.state.data,l,this)),this.scheduleGc()};return F(this,ae,FE({initialPromise:t==null?void 0:t.initialPromise,fn:r.fetchFn,abort:n.abort.bind(n),onSuccess:l=>{var h,M,T,x;if(l===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(l)}catch(v){i(v);return}(M=(h=E(this,GA).config).onSuccess)==null||M.call(h,l,this),(x=(T=E(this,GA).config).onSettled)==null||x.call(T,l,this.state.error,this),this.scheduleGc()},onError:i,onFail:(l,h)=>{X0(this,S8,Z2).call(this,{type:"failed",failureCount:l,error:h})},onPause:()=>{X0(this,S8,Z2).call(this,{type:"pause"})},onContinue:()=>{X0(this,S8,Z2).call(this,{type:"continue"})},retry:r.options.retry,retryDelay:r.options.retryDelay,networkMode:r.options.networkMode,canRun:()=>!0})),E(this,ae).start()}},rf=new WeakMap,ff=new WeakMap,GA=new WeakMap,q4=new WeakMap,ae=new WeakMap,gs=new WeakMap,K4=new WeakMap,S8=new WeakSet,Z2=function(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...HE(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return Ep(a)&&a.revert&&E(this,ff)?{...E(this,ff),fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),X5.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),E(this,GA).notify({query:this,type:"updated",action:e})})},_w);function HE(A,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XE(e.networkMode)?"fetching":"paused",...A===void 0&&{error:null,status:"pending"}}}function hq(A){const e=typeof A.initialData=="function"?A.initialData():A.initialData,t=e!==void 0,n=t?typeof A.initialDataUpdatedAt=="function"?A.initialDataUpdatedAt():A.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var jt,$w,gq=($w=class extends Ws{constructor(e={}){super();f0(this,jt,void 0);this.config=e,F(this,jt,new Map)}build(e,t,n){const a=t.queryKey,b=t.queryHash??mg(a,t);let r=this.get(b);return r||(r=new mq({client:e,queryKey:a,queryHash:b,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(r)),r}add(e){E(this,jt).has(e.queryHash)||(E(this,jt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=E(this,jt).get(e.queryHash);t&&(e.destroy(),t===e&&E(this,jt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){X5.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return E(this,jt).get(e)}getAll(){return[...E(this,jt).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>CT(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>CT(e,n)):t}notify(e){X5.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){X5.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){X5.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jt=new WeakMap,$w),Ct,ve,_4,Lt,Ma,eI,Mq=(eI=class extends WE{constructor(e){super();f0(this,Lt);f0(this,Ct,void 0);f0(this,ve,void 0);f0(this,_4,void 0);this.mutationId=e.mutationId,F(this,ve,e.mutationCache),F(this,Ct,[]),this.state=e.state||vq(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){E(this,Ct).includes(e)||(E(this,Ct).push(e),this.clearGcTimeout(),E(this,ve).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){F(this,Ct,E(this,Ct).filter(t=>t!==e)),this.scheduleGc(),E(this,ve).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){E(this,Ct).length||(this.state.status==="pending"?this.scheduleGc():E(this,ve).remove(this))}continue(){var e;return((e=E(this,_4))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,b,r,i,s,u,y,l,h,M,T,x,v,z,j,w,L,I,C,O;F(this,_4,FE({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(B,H)=>{X0(this,Lt,Ma).call(this,{type:"failed",failureCount:B,error:H})},onPause:()=>{X0(this,Lt,Ma).call(this,{type:"pause"})},onContinue:()=>{X0(this,Lt,Ma).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,ve).canRun(this)}));const t=this.state.status==="pending",n=!E(this,_4).canStart();try{if(!t){X0(this,Lt,Ma).call(this,{type:"pending",variables:e,isPaused:n}),await((b=(a=E(this,ve).config).onMutate)==null?void 0:b.call(a,e,this));const H=await((i=(r=this.options).onMutate)==null?void 0:i.call(r,e));H!==this.state.context&&X0(this,Lt,Ma).call(this,{type:"pending",context:H,variables:e,isPaused:n})}const B=await E(this,_4).start();return await((u=(s=E(this,ve).config).onSuccess)==null?void 0:u.call(s,B,e,this.state.context,this)),await((l=(y=this.options).onSuccess)==null?void 0:l.call(y,B,e,this.state.context)),await((M=(h=E(this,ve).config).onSettled)==null?void 0:M.call(h,B,null,this.state.variables,this.state.context,this)),await((x=(T=this.options).onSettled)==null?void 0:x.call(T,B,null,e,this.state.context)),X0(this,Lt,Ma).call(this,{type:"success",data:B}),B}catch(B){try{throw await((z=(v=E(this,ve).config).onError)==null?void 0:z.call(v,B,e,this.state.context,this)),await((w=(j=this.options).onError)==null?void 0:w.call(j,B,e,this.state.context)),await((I=(L=E(this,ve).config).onSettled)==null?void 0:I.call(L,void 0,B,this.state.variables,this.state.context,this)),await((O=(C=this.options).onSettled)==null?void 0:O.call(C,void 0,B,e,this.state.context)),B}finally{X0(this,Lt,Ma).call(this,{type:"error",error:B})}}finally{E(this,ve).runNext(this)}}},Ct=new WeakMap,ve=new WeakMap,_4=new WeakMap,Lt=new WeakSet,Ma=function(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),X5.batch(()=>{E(this,Ct).forEach(n=>{n.onMutationUpdate(e)}),E(this,ve).notify({mutation:this,type:"updated",action:e})})},eI);function vq(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fn,O8,Ms,AI,xq=(AI=class extends Ws{constructor(e={}){super();f0(this,fn,void 0);f0(this,O8,void 0);f0(this,Ms,void 0);this.config=e,F(this,fn,new Set),F(this,O8,new Map),F(this,Ms,0)}build(e,t,n){const a=new Mq({mutationCache:this,mutationId:++ba(this,Ms)._,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){E(this,fn).add(e);const t=Lo(e);if(typeof t=="string"){const n=E(this,O8).get(t);n?n.push(e):E(this,O8).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(E(this,fn).delete(e)){const t=Lo(e);if(typeof t=="string"){const n=E(this,O8).get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&E(this,O8).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Lo(e);if(typeof t=="string"){const n=E(this,O8).get(t),a=n==null?void 0:n.find(b=>b.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const t=Lo(e);if(typeof t=="string"){const a=(n=E(this,O8).get(t))==null?void 0:n.find(b=>b!==e&&b.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){X5.batch(()=>{E(this,fn).forEach(e=>{this.notify({type:"removed",mutation:e})}),E(this,fn).clear(),E(this,O8).clear()})}getAll(){return Array.from(E(this,fn))}find(e){const t={exact:!0,...e};return this.getAll().find(n=>LT(t,n))}findAll(e={}){return this.getAll().filter(t=>LT(e,t))}notify(e){X5.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return X5.batch(()=>Promise.all(e.map(t=>t.continue().catch(KA))))}},fn=new WeakMap,O8=new WeakMap,Ms=new WeakMap,AI);function Lo(A){var e;return(e=A.options.scope)==null?void 0:e.id}function PT(A){return{onFetch:(e,t)=>{var y,l,h,M,T;const n=e.options,a=(h=(l=(y=e.fetchOptions)==null?void 0:y.meta)==null?void 0:l.fetchMore)==null?void 0:h.direction,b=((M=e.state.data)==null?void 0:M.pages)||[],r=((T=e.state.data)==null?void 0:T.pageParams)||[];let i={pages:[],pageParams:[]},s=0;const u=async()=>{let x=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?x=!0:e.signal.addEventListener("abort",()=>{x=!0}),e.signal)})},z=ZE(e.options,e.fetchOptions),j=async(w,L,I)=>{if(x)return Promise.reject();if(L==null&&w.pages.length)return Promise.resolve(w);const C={client:e.client,queryKey:e.queryKey,pageParam:L,direction:I?"backward":"forward",meta:e.options.meta};v(C);const O=await z(C),{maxPages:B}=e.options,H=I?oq:cq;return{pages:H(w.pages,O,B),pageParams:H(w.pageParams,L,B)}};if(a&&b.length){const w=a==="backward",L=w?Tq:BT,I={pages:b,pageParams:r},C=L(n,I);i=await j(I,C,w)}else{const w=A??b.length;do{const L=s===0?r[0]??n.initialPageParam:BT(n,i);if(s>0&&L==null)break;i=await j(i,L),s++}while(s<w)}return i};e.options.persister?e.fetchFn=()=>{var x,v;return(v=(x=e.options).persister)==null?void 0:v.call(x,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=u}}}function BT(A,{pages:e,pageParams:t}){const n=e.length-1;return e.length>0?A.getNextPageParam(e[n],e,t[n],t):void 0}function Tq(A,{pages:e,pageParams:t}){var n;return e.length>0?(n=A.getPreviousPageParam)==null?void 0:n.call(A,e[0],e,t[0],t):void 0}var H6,Xa,Ja,df,sf,Fa,cf,of,tI,wq=(tI=class{constructor(A={}){f0(this,H6,void 0);f0(this,Xa,void 0);f0(this,Ja,void 0);f0(this,df,void 0);f0(this,sf,void 0);f0(this,Fa,void 0);f0(this,cf,void 0);f0(this,of,void 0);F(this,H6,A.queryCache||new gq),F(this,Xa,A.mutationCache||new xq),F(this,Ja,A.defaultOptions||{}),F(this,df,new Map),F(this,sf,new Map),F(this,Fa,0)}mount(){ba(this,Fa)._++,E(this,Fa)===1&&(F(this,cf,hg.subscribe(async A=>{A&&(await this.resumePausedMutations(),E(this,H6).onFocus())})),F(this,of,U7.subscribe(async A=>{A&&(await this.resumePausedMutations(),E(this,H6).onOnline())})))}unmount(){var A,e;ba(this,Fa)._--,E(this,Fa)===0&&((A=E(this,cf))==null||A.call(this),F(this,cf,void 0),(e=E(this,of))==null||e.call(this),F(this,of,void 0))}isFetching(A){return E(this,H6).findAll({...A,fetchStatus:"fetching"}).length}isMutating(A){return E(this,Xa).findAll({...A,status:"pending"}).length}getQueryData(A){var t;const e=this.defaultQueryOptions({queryKey:A});return(t=E(this,H6).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(A){const e=this.defaultQueryOptions(A),t=E(this,H6).build(this,e),n=t.state.data;return n===void 0?this.fetchQuery(A):(A.revalidateIfStale&&t.isStaleByTime(ur(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(A){return E(this,H6).findAll(A).map(({queryKey:e,state:t})=>{const n=t.data;return[e,n]})}setQueryData(A,e,t){const n=this.defaultQueryOptions({queryKey:A}),a=E(this,H6).get(n.queryHash),b=a==null?void 0:a.state.data,r=dq(e,b);if(r!==void 0)return E(this,H6).build(this,n).setData(r,{...t,manual:!0})}setQueriesData(A,e,t){return X5.batch(()=>E(this,H6).findAll(A).map(({queryKey:n})=>[n,this.setQueryData(n,e,t)]))}getQueryState(A){var t;const e=this.defaultQueryOptions({queryKey:A});return(t=E(this,H6).get(e.queryHash))==null?void 0:t.state}removeQueries(A){const e=E(this,H6);X5.batch(()=>{e.findAll(A).forEach(t=>{e.remove(t)})})}resetQueries(A,e){const t=E(this,H6);return X5.batch(()=>(t.findAll(A).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...A},e)))}cancelQueries(A,e={}){const t={revert:!0,...e},n=X5.batch(()=>E(this,H6).findAll(A).map(a=>a.cancel(t)));return Promise.all(n).then(KA).catch(KA)}invalidateQueries(A,e={}){return X5.batch(()=>(E(this,H6).findAll(A).forEach(t=>{t.invalidate()}),(A==null?void 0:A.refetchType)==="none"?Promise.resolve():this.refetchQueries({...A,type:(A==null?void 0:A.refetchType)??(A==null?void 0:A.type)??"active"},e)))}refetchQueries(A,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},n=X5.batch(()=>E(this,H6).findAll(A).filter(a=>!a.isDisabled()).map(a=>{let b=a.fetch(void 0,t);return t.throwOnError||(b=b.catch(KA)),a.state.fetchStatus==="paused"?Promise.resolve():b}));return Promise.all(n).then(KA)}fetchQuery(A){const e=this.defaultQueryOptions(A);e.retry===void 0&&(e.retry=!1);const t=E(this,H6).build(this,e);return t.isStaleByTime(ur(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(A){return this.fetchQuery(A).then(KA).catch(KA)}fetchInfiniteQuery(A){return A.behavior=PT(A.pages),this.fetchQuery(A)}prefetchInfiniteQuery(A){return this.fetchInfiniteQuery(A).then(KA).catch(KA)}ensureInfiniteQueryData(A){return A.behavior=PT(A.pages),this.ensureQueryData(A)}resumePausedMutations(){return U7.isOnline()?E(this,Xa).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,H6)}getMutationCache(){return E(this,Xa)}getDefaultOptions(){return E(this,Ja)}setDefaultOptions(A){F(this,Ja,A)}setQueryDefaults(A,e){E(this,df).set(Gd(A),{queryKey:A,defaultOptions:e})}getQueryDefaults(A){const e=[...E(this,df).values()],t={};return e.forEach(n=>{qd(A,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(A,e){E(this,sf).set(Gd(A),{mutationKey:A,defaultOptions:e})}getMutationDefaults(A){const e=[...E(this,sf).values()],t={};return e.forEach(n=>{qd(A,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(A){if(A._defaulted)return A;const e={...E(this,Ja).queries,...this.getQueryDefaults(A.queryKey),...A,_defaulted:!0};return e.queryHash||(e.queryHash=mg(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Q7&&(e.enabled=!1),e}defaultMutationOptions(A){return A!=null&&A._defaulted?A:{...E(this,Ja).mutations,...(A==null?void 0:A.mutationKey)&&this.getMutationDefaults(A.mutationKey),...A,_defaulted:!0}}clear(){E(this,H6).clear(),E(this,Xa).clear()}},H6=new WeakMap,Xa=new WeakMap,Ja=new WeakMap,df=new WeakMap,sf=new WeakMap,Fa=new WeakMap,cf=new WeakMap,of=new WeakMap,tI),Ve,_1,vs,xe,$4,uf,Wa,St,xs,lf,pf,eb,Ab,Ha,yf,tb,ud,Ts,Mm,ws,vm,Is,xm,Ns,Tm,ks,wm,Ds,Im,Es,Nm,su,VE,nI,Iq=(nI=class extends Ws{constructor(e,t){super();f0(this,tb);f0(this,Ts);f0(this,ws);f0(this,Is);f0(this,Ns);f0(this,ks);f0(this,Ds);f0(this,Es);f0(this,su);f0(this,Ve,void 0);f0(this,_1,void 0);f0(this,vs,void 0);f0(this,xe,void 0);f0(this,$4,void 0);f0(this,uf,void 0);f0(this,Wa,void 0);f0(this,St,void 0);f0(this,xs,void 0);f0(this,lf,void 0);f0(this,pf,void 0);f0(this,eb,void 0);f0(this,Ab,void 0);f0(this,Ha,void 0);f0(this,yf,new Set);this.options=t,F(this,Ve,e),F(this,St,null),F(this,Wa,gm()),this.options.experimental_prefetchInRender||E(this,Wa).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,_1).addObserver(this),RT(E(this,_1),this.options)?X0(this,tb,ud).call(this):this.updateResult(),X0(this,Ns,Tm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return km(E(this,_1),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return km(E(this,_1),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X0(this,ks,wm).call(this),X0(this,Ds,Im).call(this),E(this,_1).removeObserver(this)}setOptions(e,t){const n=this.options,a=E(this,_1);if(this.options=E(this,Ve).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof P8(this.options.enabled,E(this,_1))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X0(this,Es,Nm).call(this),E(this,_1).setOptions(this.options),n._defaulted&&!ym(this.options,n)&&E(this,Ve).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,_1),observer:this});const b=this.hasListeners();b&&QT(E(this,_1),a,this.options,n)&&X0(this,tb,ud).call(this),this.updateResult(t),b&&(E(this,_1)!==a||P8(this.options.enabled,E(this,_1))!==P8(n.enabled,E(this,_1))||ur(this.options.staleTime,E(this,_1))!==ur(n.staleTime,E(this,_1)))&&X0(this,Ts,Mm).call(this);const r=X0(this,ws,vm).call(this);b&&(E(this,_1)!==a||P8(this.options.enabled,E(this,_1))!==P8(n.enabled,E(this,_1))||r!==E(this,Ha))&&X0(this,Is,xm).call(this,r)}getOptimisticResult(e){const t=E(this,Ve).getQueryCache().build(E(this,Ve),e),n=this.createResult(t,e);return kq(this,n)&&(F(this,xe,n),F(this,uf,this.options),F(this,$4,E(this,_1).state)),n}getCurrentResult(){return E(this,xe)}trackResult(e,t){const n={};return Object.keys(e).forEach(a=>{Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(a),t==null||t(a),e[a])})}),n}trackProp(e){E(this,yf).add(e)}getCurrentQuery(){return E(this,_1)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=E(this,Ve).defaultQueryOptions(e),n=E(this,Ve).getQueryCache().build(E(this,Ve),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return X0(this,tb,ud).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,xe)))}createResult(e,t){var B;const n=E(this,_1),a=this.options,b=E(this,xe),r=E(this,$4),i=E(this,uf),u=e!==n?e.state:E(this,vs),{state:y}=e;let l={...y},h=!1,M;if(t._optimisticResults){const H=this.hasListeners(),V=!H&&RT(e,t),K=H&&QT(e,n,t,a);(V||K)&&(l={...l,...HE(y.data,e.options)}),t._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:T,errorUpdatedAt:x,status:v}=l;if(t.select&&l.data!==void 0)if(b&&l.data===(r==null?void 0:r.data)&&t.select===E(this,xs))M=E(this,lf);else try{F(this,xs,t.select),M=t.select(l.data),M=hm(b==null?void 0:b.data,M,t),F(this,lf,M),F(this,St,null)}catch(H){F(this,St,H)}else M=l.data;if(t.placeholderData!==void 0&&M===void 0&&v==="pending"){let H;if(b!=null&&b.isPlaceholderData&&t.placeholderData===(i==null?void 0:i.placeholderData))H=b.data;else if(H=typeof t.placeholderData=="function"?t.placeholderData((B=E(this,pf))==null?void 0:B.state.data,E(this,pf)):t.placeholderData,t.select&&H!==void 0)try{H=t.select(H),F(this,St,null)}catch(V){F(this,St,V)}H!==void 0&&(v="success",M=hm(b==null?void 0:b.data,H,t),h=!0)}E(this,St)&&(T=E(this,St),M=E(this,lf),x=Date.now(),v="error");const z=l.fetchStatus==="fetching",j=v==="pending",w=v==="error",L=j&&z,I=M!==void 0,O={status:v,fetchStatus:l.fetchStatus,isPending:j,isSuccess:v==="success",isError:w,isInitialLoading:L,isLoading:L,data:M,dataUpdatedAt:l.dataUpdatedAt,error:T,errorUpdatedAt:x,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:z,isRefetching:z&&!j,isLoadingError:w&&!I,isPaused:l.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&I,isStale:gg(e,t),refetch:this.refetch,promise:E(this,Wa)};if(this.options.experimental_prefetchInRender){const H=s0=>{O.status==="error"?s0.reject(O.error):O.data!==void 0&&s0.resolve(O.data)},V=()=>{const s0=F(this,Wa,O.promise=gm());H(s0)},K=E(this,Wa);switch(K.status){case"pending":e.queryHash===n.queryHash&&H(K);break;case"fulfilled":(O.status==="error"||O.data!==K.value)&&V();break;case"rejected":(O.status!=="error"||O.error!==K.reason)&&V();break}}return O}updateResult(e){const t=E(this,xe),n=this.createResult(E(this,_1),this.options);if(F(this,$4,E(this,_1).state),F(this,uf,this.options),E(this,$4).data!==void 0&&F(this,pf,E(this,_1)),ym(n,t))return;F(this,xe,n);const a={},b=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!E(this,yf).size)return!0;const s=new Set(i??E(this,yf));return this.options.throwOnError&&s.add("error"),Object.keys(E(this,xe)).some(u=>{const y=u;return E(this,xe)[y]!==t[y]&&s.has(y)})};(e==null?void 0:e.listeners)!==!1&&b()&&(a.listeners=!0),X0(this,su,VE).call(this,{...a,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X0(this,Ns,Tm).call(this)}},Ve=new WeakMap,_1=new WeakMap,vs=new WeakMap,xe=new WeakMap,$4=new WeakMap,uf=new WeakMap,Wa=new WeakMap,St=new WeakMap,xs=new WeakMap,lf=new WeakMap,pf=new WeakMap,eb=new WeakMap,Ab=new WeakMap,Ha=new WeakMap,yf=new WeakMap,tb=new WeakSet,ud=function(e){X0(this,Es,Nm).call(this);let t=E(this,_1).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(KA)),t},Ts=new WeakSet,Mm=function(){X0(this,ks,wm).call(this);const e=ur(this.options.staleTime,E(this,_1));if(Mb||E(this,xe).isStale||!pm(e))return;const n=UE(E(this,xe).dataUpdatedAt,e)+1;F(this,eb,setTimeout(()=>{E(this,xe).isStale||this.updateResult()},n))},ws=new WeakSet,vm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,_1)):this.options.refetchInterval)??!1},Is=new WeakSet,xm=function(e){X0(this,Ds,Im).call(this),F(this,Ha,e),!(Mb||P8(this.options.enabled,E(this,_1))===!1||!pm(E(this,Ha))||E(this,Ha)===0)&&F(this,Ab,setInterval(()=>{(this.options.refetchIntervalInBackground||hg.isFocused())&&X0(this,tb,ud).call(this)},E(this,Ha)))},Ns=new WeakSet,Tm=function(){X0(this,Ts,Mm).call(this),X0(this,Is,xm).call(this,X0(this,ws,vm).call(this))},ks=new WeakSet,wm=function(){E(this,eb)&&(clearTimeout(E(this,eb)),F(this,eb,void 0))},Ds=new WeakSet,Im=function(){E(this,Ab)&&(clearInterval(E(this,Ab)),F(this,Ab,void 0))},Es=new WeakSet,Nm=function(){const e=E(this,Ve).getQueryCache().build(E(this,Ve),this.options);if(e===E(this,_1))return;const t=E(this,_1);F(this,_1,e),F(this,vs,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},su=new WeakSet,VE=function(e){X5.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(E(this,xe))}),E(this,Ve).getQueryCache().notify({query:E(this,_1),type:"observerResultsUpdated"})})},nI);function Nq(A,e){return P8(e.enabled,A)!==!1&&A.state.data===void 0&&!(A.state.status==="error"&&e.retryOnMount===!1)}function RT(A,e){return Nq(A,e)||A.state.data!==void 0&&km(A,e,e.refetchOnMount)}function km(A,e,t){if(P8(e.enabled,A)!==!1){const n=typeof t=="function"?t(A):t;return n==="always"||n!==!1&&gg(A,e)}return!1}function QT(A,e,t,n){return(A!==e||P8(n.enabled,A)===!1)&&(!t.suspense||A.state.status!=="error")&&gg(A,t)}function gg(A,e){return P8(e.enabled,A)!==!1&&A.isStaleByTime(ur(e.staleTime,A))}function kq(A,e){return!ym(A.getCurrentResult(),e)}function Dq(A,e){return R7(A,e)}function Eq(A){return JSON.stringify(A,(e,t)=>zq(t)?Object.keys(t).sort().reduce((n,a)=>(n[a]=t[a],n),{}):typeof t=="bigint"?t.toString():t)}function zq(A){if(!UT(A))return!1;const e=A.constructor;if(typeof e>"u")return!0;const t=e.prototype;return!(!UT(t)||!t.hasOwnProperty("isPrototypeOf"))}function UT(A){return Object.prototype.toString.call(A)==="[object Object]"}function jq(A){const{_defaulted:e,behavior:t,gcTime:n,initialData:a,initialDataUpdatedAt:b,maxPages:r,meta:i,networkMode:s,queryFn:u,queryHash:y,queryKey:l,queryKeyHashFn:h,retry:M,retryDelay:T,structuralSharing:x,getPreviousPageParam:v,getNextPageParam:z,initialPageParam:j,_optimisticResults:w,enabled:L,notifyOnChangeProps:I,placeholderData:C,refetchInterval:O,refetchIntervalInBackground:B,refetchOnMount:H,refetchOnReconnect:V,refetchOnWindowFocus:K,retryOnMount:s0,select:y0,staleTime:r0,suspense:Q,throwOnError:J,config:q,connector:Y,query:t0,..._}=A;return _}function Cq(A,e={}){return{async queryFn({queryKey:t}){const n=e.abi;if(!n)throw new Error("abi is required");const{functionName:a,scopeKey:b,...r}=t[1],i=(()=>{const s=t[1];if(s.address)return{address:s.address};if(s.code)return{code:s.code};throw new Error("address or code is required")})();if(!a)throw new Error("functionName is required");return LG(A,{abi:n,functionName:a,args:r.args,...i,...r})},queryKey:Lq(e)}}function Lq(A={}){const{abi:e,...t}=A;return["readContract",jq(t)]}var Sq=0;function N(A,e,t,n,a,b){e||(e={});var r,i,s=e;if("ref"in s)for(i in s={},e)i=="ref"?r=e[i]:s[i]=e[i];var u={type:A,props:s,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Sq,__i:-1,__u:0,__source:a,__self:b};if(typeof A=="function"&&(r=A.defaultProps))for(i in r)s[i]===void 0&&(s[i]=r[i]);return R1.vnode&&R1.vnode(u),u}var YE=Tb(void 0),Oq=A=>{const e=H8(YE);if(A)return A;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Pq=({client:A,children:e})=>(G6(()=>(A.mount(),()=>{A.unmount()}),[A]),N(YE.Provider,{value:A,children:e})),GE=Tb(!1),Bq=()=>H8(GE);GE.Provider;function Rq(){let A=!1;return{clearReset:()=>{A=!1},reset:()=>{A=!0},isReset:()=>A}}var Qq=Tb(Rq()),Uq=()=>H8(Qq);function Zq(A,e){return typeof A=="function"?A(...e):!!A}function ZT(){}var Xq=(A,e)=>{(A.suspense||A.throwOnError||A.experimental_prefetchInRender)&&(e.isReset()||(A.retryOnMount=!1))},Jq=A=>{G6(()=>{A.clearReset()},[A])},Fq=({result:A,errorResetBoundary:e,throwOnError:t,query:n,suspense:a})=>A.isError&&!e.isReset()&&!A.isFetching&&n&&(a&&A.data===void 0||Zq(t,[A.error,n])),Wq=A=>{const e=A.staleTime;A.suspense&&(A.staleTime=typeof e=="function"?(...t)=>Math.max(e(...t),1e3):Math.max(e??1e3,1e3),typeof A.gcTime=="number"&&(A.gcTime=Math.max(A.gcTime,1e3)))},Hq=(A,e)=>A.isLoading&&A.isFetching&&!e,Vq=(A,e)=>(A==null?void 0:A.suspense)&&e.isPending,XT=(A,e,t)=>e.fetchOptimistic(A).catch(()=>{t.clearReset()});function Yq(A,e,t){var l,h,M,T,x;if(process.env.NODE_ENV!=="production"&&(typeof A!="object"||Array.isArray(A)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=Oq(t),a=Bq(),b=Uq(),r=n.defaultQueryOptions(A);(h=(l=n.getDefaultOptions().queries)==null?void 0:l._experimental_beforeQuery)==null||h.call(l,r),process.env.NODE_ENV!=="production"&&(r.queryFn||console.error(`[${r.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),r._optimisticResults=a?"isRestoring":"optimistic",Wq(r),Xq(r,b),Jq(b);const i=!n.getQueryCache().get(r.queryHash),[s]=p1(()=>new e(n,r)),u=s.getOptimisticResult(r),y=!a&&A.subscribed!==!1;if(Js(ou(v=>{const z=y?s.subscribe(X5.batchCalls(v)):ZT;return s.updateResult(),z},[s,y]),()=>s.getCurrentResult()),G6(()=>{s.setOptions(r,{listeners:!1})},[r,s]),Vq(r,u))throw XT(r,s,b);if(Fq({result:u,errorResetBoundary:b,throwOnError:r.throwOnError,query:n.getQueryCache().get(r.queryHash),suspense:r.suspense}))throw u.error;if((T=(M=n.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||T.call(M,r,u),r.experimental_prefetchInRender&&!Mb&&Hq(u,a)){const v=i?XT(r,s,b):(x=n.getQueryCache().get(r.queryHash))==null?void 0:x.promise;v==null||v.catch(ZT).finally(()=>{s.updateResult()})}return r.notifyOnChangeProps?u:s.trackResult(u)}function Gq(A,e){return Yq(A,Iq,e)}function qq(A){const e=Gq({...A,queryKeyHashFn:Eq});return e.queryKey=A.queryKey,e}function Kq(A={}){const e=RE(A);return Js(t=>PG(e,{onChange:t}),()=>SG(e))}function _q(A={}){const{abi:e,address:t,functionName:n,query:a={}}=A,b=A.code,r=RE(A),i=Kq({config:r}),s=Cq(r,{...A,chainId:A.chainId??i}),u=!!((t||b)&&e&&n&&(a.enabled??!0));return qq({...a,...s,enabled:u,structuralSharing:a.structuralSharing??Dq})}const JT=zE({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),FT=zE({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),Mg={address:""},Hs=Tb(Mg.address),i3={production:!1,feedbackDetailsMaxEndorsements:5,provider:window.ethereum},$q=A=>{Object.assign(i3,A)};function d3(A,e){const t=i3.production?ph:yh,n=A[db]||{}.VITE_UTU_APP_BASE_URL||t;if(!n)throw new Error(`${db} attribute of ${e} was not set`);return{apiUrl:n}}function eK(){return{socialLinkUrl:i3.production?$R:eQ}}const AK=Aq({chains:[JT,FT],transports:{[JT.id]:DT(),[FT.id]:DT()}}),tK=new wq;function D6({children:A,forwardedRef:e,className:t,style:n,excludeBootstrap:a,excludeFonts:b}){return N(aq,{config:AK,children:N(Hs.Provider,{value:Mg.address,children:N(Pq,{client:tK,children:N("div",{ref:e,className:t,children:[N("style",{children:[!b&&N(IA,{children:'@import "https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap";'}),!a&&N(IA,{children:'@import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-reboot.min.css"; @import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-grid.min.css"; @import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-utilities.min.css";'}),n]}),A]})})})})}function ca(A){return h4(hn(A))}const wA={[z1.polygon_mainnet]:{chainId:ca(137)},[z1.ethereum_testnet]:{chainId:ca(11155111)},[z1.lisk_mainnet]:{chainId:ca(1135)},[z1.lisk_testnet]:{chainId:ca(4202)},[z1.optimism_mainnet]:{chainId:ca(10)},[z1.optimism_testnet]:{chainId:ca(11155420)},[z1.aurora_mainnet]:{chainId:ca(1313161554)},[z1.aurora_testnet]:{chainId:ca(1313161555)}},nK={[z1.polygon_mainnet]:{chainId:wA[z1.polygon_mainnet].chainId,chainName:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:["https://polygon-rpc.com"],blockExplorerUrls:["https://polygonscan.com"]},[z1.ethereum_testnet]:{chainId:wA[z1.ethereum_testnet].chainId,chainName:"Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://1rpc.io/sepolia"],blockExplorerUrls:["https://sepolia.etherscan.io"]},[z1.lisk_mainnet]:{chainId:wA[z1.lisk_mainnet].chainId,chainName:"Lisk",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.api.lisk.com"],blockExplorerUrls:["https://blockscout.lisk.com"]},[z1.lisk_testnet]:{chainId:wA[z1.lisk_testnet].chainId,chainName:"Lisk Sepolia Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.sepolia-api.lisk.com"],blockExplorerUrls:["https://sepolia-blockscout.lisk.com"]},[z1.optimism_mainnet]:{chainId:wA[z1.optimism_mainnet].chainId,chainName:"OP Mainnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"]},[z1.optimism_testnet]:{chainId:wA[z1.optimism_testnet].chainId,chainName:"OP Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.optimism.io"],blockExplorerUrls:["https://sepolia-sequencer.optimism.io"]}},aK={[z1.polygon_mainnet]:"0xE62dc4c82a9749Bf2E40F73138B3CFee0a2EC89F",[z1.ethereum_testnet]:"0x537BE61c5EFB865Df53CA55eeA07ceEe5d5fB162",[z1.lisk_mainnet]:"0x3B2A3a6E8C087fe399a24e08D3Cab12f17e033C3",[z1.lisk_testnet]:"0x0125f1E709eC3dEA2aD8152826fD4b9496086B71",[z1.optimism_mainnet]:"0xb2e9dB661F992d2F3013e4AFcE01C72d52f58A37",[z1.optimism_testnet]:"0xbdF3b87B410C50Ba9620d8Ac416A81e6bF7296eF",[z1.aurora_mainnet]:"0xaE53DcC63d7895600e2510A986Dc2b65c953E26c",[z1.aurora_testnet]:"0x2ac7F081f8eB51ce393bA298e4C020b0DeF420E1"};async function bK(A,e){const t=nK[e];await A.request({method:"wallet_addEthereumChain",params:[t]})}async function WT(A,e){const t=wA[e];await A.request({method:"wallet_switchEthereumChain",params:[t]})}function rK(A){return i3.production?fK(A):iK(A)}function fK(A){switch(A){case wA[z1.lisk_mainnet].chainId:return z1.lisk_mainnet;case wA[z1.optimism_mainnet].chainId:return z1.optimism_mainnet;case wA[z1.aurora_mainnet].chainId:return z1.aurora_mainnet;default:return z1.polygon_mainnet}}function iK(A){switch(A){case wA[z1.lisk_testnet].chainId:return z1.lisk_testnet;case wA[z1.optimism_testnet].chainId:return z1.optimism_testnet;case wA[z1.aurora_testnet].chainId:return z1.aurora_testnet;default:return z1.ethereum_testnet}}async function dK(A){return rK(A)}function sK(A){return aK[A]}function J2(){return i3.provider}function Z7(A){return{ids:{uuid:A}}}function vg(A,e={}){return{...e,headers:{...e.headers||{},...cK(A)}}}function cK(A){return{Authorization:`Bearer ${A}`}}async function qE(A,e,t,n,a){const b=vN.stringify({sourceCriteria:JSON.stringify(Z7(e)),targetType:t,targetCriterias:a==null?void 0:a.map(u=>JSON.stringify(Z7(u)))}),r=`${A}${vu}${nQ}?${b}`,i=vg(n);return await Bf.get(r,i)}async function KE(A,e,t,n,a,b){return Bf.post(`${A}${vu}${aQ}`,{sourceCriteria:t,targetCriteria:n,transactionId:a,items:b},vg(e)).then(r=>r).catch(r=>r)}async function _E(A,e,t,n){const a=Z7(t),b=Z7(n),r=vN.stringify({sourceCriteria:a,targetCriteria:b}),i=`${A}${vu}${rQ}?${r}`;return Bf.get(i,vg(e))}async function $E(A=null,e=null,t=!1){var y;(y=window==null?void 0:window.xUtuConfig)!=null&&y.production?config.production=window.xUtuConfig.production:(window.xUtuConfig={},xUtuConfig.production=!0);const n=A??(i3.production?ph:yh),a=J2();if(!a&&!e)return null;const r=await new Bu(e||a).getSigner(),i=await r.getAddress(),s=await r.signMessage("Sign in at UTU"),{data:u}=await Bf.post(`${n}${fQ}`,{address:i,signature:s},{withCredentials:!!t});return u}async function ez(A,e=i3.production?ph:yh){try{const t=await J2();await t.request({method:"eth_requestAccounts"});const b=await(await new Bu(t).getSigner()).getAddress(),r=await Bf.get(`${e}${iQ}/${b}`,{headers:{Authorization:`Bearer ${A}`}});return{balance:typeof r.data=="number"?r.data:"N/A"}}catch(t){return console.error("Error fetching UTT balance:",t),{balance:"N/A",error:t instanceof Error?t:new Error(String(t))}}}function Vf(){const[A,e]=p1(uK());return G6(()=>{function t(n){const{access_token:a}=n.detail;e(a)}return window.addEventListener(fy,t),()=>{window.removeEventListener(fy,t)}},[]),{accessToken:A}}async function oK(A=null,e=null,t=!1){const n=await $E(A,e,t);return await localStorage.setItem(mh,JSON.stringify(n)),n}function uK(){const A=localStorage.getItem(mh);if(A){const{access_token:e}=JSON.parse(A),{exp:t}=sQ(e);if(lK(t))return e}return null}function lK(A){return Date.now()<A*1e3}function Az(){const[A,e]=p1(null);return G6(()=>{async function t(){const n={burnerconnect:{package:PB,options:{defaultNetwork:"100"}}},a=new SB({cacheProvider:!0,network:"mainnet",providerOptions:n});e(a)}t()},[e]),{web3Modal:A}}function pK(A){const e=A==null?void 0:A.trim();return e?e.split(" "):void 0}function yK(A,e,t,n){const{accessToken:a}=Vf(),[b,r]=p1(void 0);return G6(()=>{async function i(){const s=await qE(A,e,t,a,pK(n));r(s.data.result)}i()},[a,A,e,t,n]),{rankingItems:b}}var U8=(A=>(A[A.idle=0]="idle",A[A.submitting=1]="submitting",A[A.success=2]="success",A[A.error=3]="error",A))(U8||{});const mK=3e3;function X7(A){setTimeout(()=>A(0),mK)}function Uu(A,e,t,n){const{accessToken:a}=Vf(),[b,r]=p1(0),i=HT(e),s=HT(t);async function u(y){return r(1),KE(A,a,i,s,n,y).then(l=>(r(2),X7(r),l)).catch(l=>(r(3),X7(r),l))}return{sendFeedback:u,submitStatus:b}}function hK(A){const{accessToken:e}=Vf(),[t,n]=p1([]);return G6(()=>{async function a(){const b=await Bf.get(`${A}${vu}${bQ}`,xK(e));n(b.data.result)}a()},[n,A,e]),{badgeSets:t}}function gK(A,e,t){const{accessToken:n}=Vf(),[a,b]=p1(void 0),[r,i]=p1(0);return G6(()=>{async function s(){i(1);try{const u=await _E(A,n,e,t);i(2),b(u.data.result.items)}catch(u){console.log(u)}}s()},[b,A,n,e,t]),{feedbackSummary:a,submitStatus:r}}function MK(A,e,t){const{accessToken:n}=Vf(),[a,b]=p1({uploading:!1});return G6(()=>{if(!e)return;const r={read(){return e.read()}},i={resume:!1,endpoint:{}.VITE_UTU_VIDEO_UPLOAD_URL||`${A}${AQ}/upload`,headers:tz(n),chunkSize:28*1024,uploadLengthDeferred:!0,retryDelays:[0,3e3,5e3,1e4,2e4],metadata:{filename:"webcam.webm",filetype:"video/webm"},onError(){b({uploading:!1,errorMessage:"video was not successfully uploaded "})},onSuccess(){const u=vK(A,s.url);t(u),b({successMessage:"video was successfully uploaded"}),b({uploading:!1,publishedVideoUrl:u})}},s=new WR(r,i);s.start(),b({uploading:!0})},[n,e]),a}function vK(A,e){const t=e.split("/").pop();return{}.VITE_UTU_VIDEO_PUBLISHED_BASE_URL?`${{}.VITE_UTU_VIDEO_PUBLISHED_BASE_URL}/${t}`:`${A}${tQ}/${t}`}function HT(A){return{ids:{uuid:A}}}function xK(A,e={}){return{...e,headers:{...e.headers||{},...tz(A)}}}function tz(A){return{Authorization:`Bearer ${A}`}}const TK=`::slotted(ul){list-style:none;padding:0;margin:0}
|
|
367
|
+
`):`The contract function "${n}" reverted.`,{cause:b,metaMessages:i,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=r,this.raw=t,this.reason=s,this.signature=u}}class fG extends r1{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class iG extends r1{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${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 NE extends r1{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}}const dG=3;function sG(A,{abi:e,address:t,args:n,docsPath:a,functionName:b,sender:r}){const i=A instanceof NE?A:A instanceof r1?A.walk(T=>"data"in T)||A.walk():{},{code:s,data:u,details:y,message:l,shortMessage:h}=i,M=(()=>A instanceof tg?new fG({functionName:b}):[dG,mb.code].includes(s)&&(u||y||l||h)?new rG({abi:e,data:typeof u=="object"?u.data:u,functionName:b,message:i instanceof og?y:h??l}):A)();return new bG(M,{abi:e,args:n,contractAddress:t,docsPath:a,functionName:b,sender:r})}const cG="0x82ad56cb",oG="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",uG="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";function lG(A,{docsPath:e,...t}){const n=(()=>{const a=BV(A,t);return a instanceof aE?A:a})();return new aG(n,{docsPath:e,...t})}function pG(){let A=()=>{},e=()=>{};return{promise:new Promise((n,a)=>{A=n,e=a}),resolve:A,reject:e}}const Np=new Map;function kE({fn:A,id:e,shouldSplitBatch:t,wait:n=0,sort:a}){const b=async()=>{const y=s();r();const l=y.map(({args:h})=>h);l.length!==0&&A(l).then(h=>{a&&Array.isArray(h)&&h.sort(a);for(let M=0;M<y.length;M++){const{resolve:T}=y[M];T==null||T([h[M],h])}}).catch(h=>{for(let M=0;M<y.length;M++){const{reject:T}=y[M];T==null||T(h)}})},r=()=>Np.delete(e),i=()=>s().map(({args:y})=>y),s=()=>Np.get(e)||[],u=y=>Np.set(e,[...s(),y]);return{flush:r,async schedule(y){const{promise:l,resolve:h,reject:M}=pG();return(t==null?void 0:t([...i(),y]))&&b(),s().length>0?(u({args:y,resolve:h,reject:M}),l):(u({args:y,resolve:h,reject:M}),setTimeout(b,n),l)}}}async function DE(A,e){var K,s0,y0,r0;const{account:t=A.account,batch:n=!!((K=A.batch)!=null&&K.multicall),blockNumber:a,blockTag:b="latest",accessList:r,blobs:i,code:s,data:u,factory:y,factoryData:l,gas:h,gasPrice:M,maxFeePerBlobGas:T,maxFeePerGas:x,maxPriorityFeePerGas:v,nonce:z,to:j,value:w,stateOverride:L,...I}=e,C=t?Ru(t):void 0;if(s&&(y||l))throw new r1("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(s&&j)throw new r1("Cannot provide both `code` & `to` as parameters.");const O=s&&u,B=y&&l&&j&&u,H=O||B,V=(()=>O?hG({code:s,data:u}):B?gG({data:u,factory:y,factoryData:l,to:j}):u)();try{FV(e);const J=(a?L6(a):void 0)||b,q=GV(L),Y=(r0=(y0=(s0=A.chain)==null?void 0:s0.formatters)==null?void 0:y0.transactionRequest)==null?void 0:r0.format,_=(Y||UV)({...RV(I,{format:Y}),from:C==null?void 0:C.address,accessList:r,blobs:i,data:V,gas:h,gasPrice:M,maxFeePerBlobGas:T,maxFeePerGas:x,maxPriorityFeePerGas:v,nonce:z,to:H?void 0:j,value:w});if(n&&yG({request:_})&&!q)try{return await mG(A,{..._,blockNumber:a,blockTag:b})}catch(L0){if(!(L0 instanceof tE)&&!(L0 instanceof qy))throw L0}const b0=await A.request({method:"eth_call",params:q?[_,J,q]:[_,J]});return b0==="0x"?{data:void 0}:{data:b0}}catch(Q){const J=MG(Q),{offchainLookup:q,offchainLookupSignature:Y}=await Promise.resolve().then(()=>require("./ccip-df5cf9c8.cjs"));if(A.ccipRead!==!1&&(J==null?void 0:J.slice(0,10))===Y&&j)return{data:await q(A,{data:J,to:j})};throw H&&(J==null?void 0:J.slice(0,10))==="0x101bb98d"?new iG({factory:y}):lG(Q,{...e,account:C,chain:A.chain})}}function yG({request:A}){const{data:e,to:t,...n}=A;return!(!e||e.startsWith(cG)||!t||Object.values(n).filter(a=>typeof a<"u").length>0)}async function mG(A,e){var x;const{batchSize:t=1024,wait:n=0}=typeof((x=A.batch)==null?void 0:x.multicall)=="object"?A.batch.multicall:{},{blockNumber:a,blockTag:b="latest",data:r,multicallAddress:i,to:s}=e;let u=i;if(!u){if(!A.chain)throw new tE;u=eG({blockNumber:a,chain:A.chain,contract:"multicall3"})}const l=(a?L6(a):void 0)||b,{schedule:h}=kE({id:`${A.uid}.${l}`,wait:n,shouldSplitBatch(v){return v.reduce((j,{data:w})=>j+(w.length-2),0)>t*2},fn:async v=>{const z=v.map(L=>({allowFailure:!0,callData:L.data,target:L.to})),j=TE({abi:TT,args:[z],functionName:"aggregate3"}),w=await A.request({method:"eth_call",params:[{data:j,to:u},l]});return xE({abi:TT,args:[z],functionName:"aggregate3",data:w||"0x"})}}),[{returnData:M,success:T}]=await h({data:r,to:s});if(!T)throw new NE({data:M});return M==="0x"?{data:void 0}:{data:M}}function hG(A){const{code:e,data:t}=A;return AE({abi:gE(["constructor(bytes, bytes)"]),bytecode:oG,args:[e,t]})}function gG(A){const{data:e,factory:t,factoryData:n,to:a}=A;return AE({abi:gE(["constructor(address, bytes, address, bytes)"]),bytecode:uG,args:[a,e,t,n]})}function MG(A){var t;if(!(A instanceof r1))return;const e=A.walk();return typeof(e==null?void 0:e.data)=="object"?(t=e.data)==null?void 0:t.data:e.data}async function vG(A,e){const{abi:t,address:n,args:a,functionName:b,...r}=e,i=TE({abi:t,args:a,functionName:b});try{const{data:s}=await XV(A,DE,"call")({...r,data:i,to:n});return xE({abi:t,args:a,functionName:b,data:s||"0x"})}catch(s){throw sG(s,{abi:t,address:n,args:a,docsPath:"/docs/contract/readContract",functionName:b})}}const Do=new ag(8192);function xG(A,{enabled:e=!0,id:t}){if(!e||!t)return A();if(Do.get(t))return Do.get(t);const n=A().finally(()=>Do.delete(t));return Do.set(t,n),n}async function TG(A){return new Promise(e=>setTimeout(e,A))}function EE(A,{delay:e=100,retryCount:t=2,shouldRetry:n=()=>!0}={}){return new Promise((a,b)=>{const r=async({count:i=0}={})=>{const s=async({error:u})=>{const y=typeof e=="function"?e({count:i,error:u}):e;y&&await TG(y),r({count:i+1})};try{const u=await A();a(u)}catch(u){if(i<t&&await n({count:i,error:u}))return s({error:u});b(u)}};r()})}function wG(A,e={}){return async(t,n={})=>{var l;const{dedupe:a=!1,methods:b,retryDelay:r=150,retryCount:i=3,uid:s}={...e,...n},{method:u}=t;if((l=b==null?void 0:b.exclude)!=null&&l.includes(u))throw new x4(new Error("method not supported"),{method:u});if(b!=null&&b.include&&!b.include.includes(u))throw new x4(new Error("method not supported"),{method:u});const y=a?eg(`${s}.${pn(t)}`):void 0;return xG(()=>EE(async()=>{try{return await A(t)}catch(h){const M=h;switch(M.code){case Pd.code:throw new Pd(M);case Bd.code:throw new Bd(M);case Rd.code:throw new Rd(M,{method:t.method});case Qd.code:throw new Qd(M);case mb.code:throw new mb(M);case Ud.code:throw new Ud(M);case Zd.code:throw new Zd(M);case Ka.code:throw new Ka(M);case Xd.code:throw new Xd(M);case x4.code:throw new x4(M,{method:t.method});case Sf.code:throw new Sf(M);case Jd.code:throw new Jd(M);case we.code:throw new we(M);case Fd.code:throw new Fd(M);case Wd.code:throw new Wd(M);case Hd.code:throw new Hd(M);case Vd.code:throw new Vd(M);case hb.code:throw new hb(M);case 5e3:throw new we(M);default:throw h instanceof r1?h:new PV(M)}}},{delay:({count:h,error:M})=>{var T;if(M&&M instanceof cr){const x=(T=M==null?void 0:M.headers)==null?void 0:T.get("Retry-After");if(x!=null&&x.match(/\d/))return Number.parseInt(x)*1e3}return~~(1<<h)*r},retryCount:i,shouldRetry:({error:h})=>IG(h)}),{enabled:a,id:y})}}function IG(A){return"code"in A&&typeof A.code=="number"?A.code===-1||A.code===Sf.code||A.code===mb.code:A instanceof cr&&A.status?A.status===403||A.status===408||A.status===413||A.status===429||A.status===500||A.status===502||A.status===503||A.status===504:!0}function zE(A){return{formatters:void 0,fees:void 0,serializers:void 0,...A}}function jE(A,{errorInstance:e=new Error("timed out"),timeout:t,signal:n}){return new Promise((a,b)=>{(async()=>{let r;try{const i=new AbortController;t>0&&(r=setTimeout(()=>{n?i.abort():b(e)},t)),a(await A({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&b(e),b(i)}finally{clearTimeout(r)}})()})}function NG(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const kT=NG();function kG(A,e={}){return{async request(t){var l;const{body:n,onRequest:a=e.onRequest,onResponse:b=e.onResponse,timeout:r=e.timeout??1e4}=t,i={...e.fetchOptions??{},...t.fetchOptions??{}},{headers:s,method:u,signal:y}=i;try{const h=await jE(async({signal:T})=>{const x={...i,body:Array.isArray(n)?pn(n.map(w=>({jsonrpc:"2.0",id:w.id??kT.take(),...w}))):pn({jsonrpc:"2.0",id:n.id??kT.take(),...n}),headers:{"Content-Type":"application/json",...s},method:u||"POST",signal:y||(r>0?T:null)},v=new Request(A,x),z=await(a==null?void 0:a(v,x))??{...x,url:A};return await fetch(z.url??A,z)},{errorInstance:new MT({body:n,url:A}),timeout:r,signal:!0});b&&await b(h);let M;if((l=h.headers.get("Content-Type"))!=null&&l.startsWith("application/json"))M=await h.json();else{M=await h.text();try{M=JSON.parse(M||"{}")}catch(T){if(h.ok)throw T;M={error:M}}}if(!h.ok)throw new cr({body:n,details:pn(M.error)||h.statusText,headers:h.headers,status:h.status,url:A});return M}catch(h){throw h instanceof cr||h instanceof MT?h:new cr({body:n,cause:h,url:A})}}}}function DG(A,e,t){const n=A[e.name];if(typeof n=="function")return n;const a=A[t];return typeof a=="function"?a:b=>e(A,b)}const r7="2.16.5",EG=()=>`@wagmi/core@${r7}`;var CE=globalThis&&globalThis.__classPrivateFieldGet||function(A,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?A!==e||!n:!e.has(A))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(A):n?n.value:e.get(A)},B7,LE;let pg=class sm extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return EG()}constructor(e,t={}){var b;super(),B7.add(this),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:"WagmiCoreError"});const n=t.cause instanceof sm?t.cause.details:(b=t.cause)!=null&&b.message?t.cause.message:t.details,a=t.cause instanceof sm&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: ${this.docsBaseUrl}${a}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
|
|
368
|
+
`),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return CE(this,B7,"m",LE).call(this,this,e)}};B7=new WeakSet,LE=function A(e,t){return t!=null&&t(e)?e:e.cause?CE(this,B7,"m",A).call(this,e.cause,t):e};class cm extends pg{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}const om=256;let Eo=om,zo;function SE(A=11){if(!zo||Eo+A>om*2){zo="",Eo=0;for(let e=0;e<om;e++)zo+=(256+Math.random()*256|0).toString(16).substring(1)}return zo.substring(Eo,Eo+++A)}function zG(A){const{batch:e,cacheTime:t=A.pollingInterval??4e3,ccipRead:n,key:a="base",name:b="Base Client",pollingInterval:r=4e3,type:i="base"}=A,s=A.chain,u=A.account?Ru(A.account):void 0,{config:y,request:l,value:h}=A.transport({chain:s,pollingInterval:r}),M={...y,...h},T={account:u,batch:e,cacheTime:t,ccipRead:n,chain:s,key:a,name:b,pollingInterval:r,request:l,transport:M,type:i,uid:SE()};function x(v){return z=>{const j=z(v);for(const L in T)delete j[L];const w={...v,...j};return Object.assign(w,{extend:x(w)})}}return Object.assign(T,{extend:x(T)})}function jG({key:A,methods:e,name:t,request:n,retryCount:a=3,retryDelay:b=150,timeout:r,type:i},s){const u=SE();return{config:{key:A,methods:e,name:t,request:n,retryCount:a,retryDelay:b,timeout:r,type:i},request:wG(n,{methods:e,retryCount:a,retryDelay:b,uid:u}),value:s}}class CG extends r1{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function DT(A,e={}){const{batch:t,fetchOptions:n,key:a="http",methods:b,name:r="HTTP JSON-RPC",onFetchRequest:i,onFetchResponse:s,retryDelay:u,raw:y}=e;return({chain:l,retryCount:h,timeout:M})=>{const{batchSize:T=1e3,wait:x=0}=typeof t=="object"?t:{},v=e.retryCount??h,z=M??e.timeout??1e4,j=A||(l==null?void 0:l.rpcUrls.default.http[0]);if(!j)throw new CG;const w=kG(j,{fetchOptions:n,onRequest:i,onResponse:s,timeout:z});return jG({key:a,methods:b,name:r,async request({method:L,params:I}){const C={method:L,params:I},{schedule:O}=kE({id:j,wait:x,shouldSplitBatch(K){return K.length>T},fn:K=>w.request({body:K}),sort:(K,s0)=>K.id-s0.id}),B=async K=>t?O(K):[await w.request({body:K})],[{error:H,result:V}]=await B(C);if(y)return{error:H,result:V};if(H)throw new og({body:C,error:H,url:j});return V},retryCount:v,retryDelay:u,timeout:z,type:"http"},{fetchOptions:n,url:j})}}function LG(A,e){const{chainId:t,...n}=e,a=A.getClient({chainId:t});return DG(a,vG,"readContract")(n)}function SG(A){return A.state.chainId}let kp=!1;async function OG(A,e={}){var u,y;if(kp)return[];kp=!0,A.setState(l=>({...l,status:l.current?"reconnecting":"connecting"}));const t=[];if((u=e.connectors)!=null&&u.length)for(const l of e.connectors){let h;typeof l=="function"?h=A._internal.connectors.setup(l):h=l,t.push(h)}else t.push(...A.connectors);let n;try{n=await((y=A.storage)==null?void 0:y.getItem("recentConnectorId"))}catch{}const a={};for(const[,l]of A.state.connections)a[l.connector.id]=1;n&&(a[n]=0);const b=Object.keys(a).length>0?[...t].sort((l,h)=>(a[l.id]??10)-(a[h.id]??10)):t;let r=!1;const i=[],s=[];for(const l of b){const h=await l.getProvider().catch(()=>{});if(!h||s.some(x=>x===h)||!await l.isAuthorized())continue;const T=await l.connect({isReconnecting:!0}).catch(()=>null);T&&(l.emitter.off("connect",A._internal.events.connect),l.emitter.on("change",A._internal.events.change),l.emitter.on("disconnect",A._internal.events.disconnect),A.setState(x=>{const v=new Map(r?x.connections:new Map).set(l.uid,{accounts:T.accounts,chainId:T.chainId,connector:l});return{...x,current:r?x.current:l.uid,connections:v}}),i.push({accounts:T.accounts,chainId:T.chainId,connector:l}),s.push(h),r=!0)}return(A.state.status==="reconnecting"||A.state.status==="connecting")&&(r?A.setState(l=>({...l,status:"connected"})):A.setState(l=>({...l,connections:new Map,current:null,status:"disconnected"}))),kp=!1,i}class R9 extends pg{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}function PG(A,e){const{onChange:t}=e;return A.subscribe(n=>n.chainId,t)}yg.type="injected";function yg(A={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:t}=A;function n(){const s=A.target;if(typeof s=="function"){const u=s();if(u)return u}return typeof s=="object"?s:typeof s=="string"?{...BG[s]??{id:s,name:`${s[0].toUpperCase()}${s.slice(1)}`,provider:`is${s[0].toUpperCase()}${s.slice(1)}`}}:{id:"injected",name:"Injected",provider(u){return u==null?void 0:u.ethereum}}}let a,b,r,i;return s=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},get supportsSimulation(){return!0},type:yg.type,async setup(){const u=await this.getProvider();u!=null&&u.on&&A.target&&(r||(r=this.onConnect.bind(this),u.on("connect",r)),a||(a=this.onAccountsChanged.bind(this),u.on("accountsChanged",a)))},async connect({chainId:u,isReconnecting:y}={}){var M,T,x,v,z,j;const l=await this.getProvider();if(!l)throw new R9;let h=[];if(y)h=await this.getAccounts().catch(()=>[]);else if(e)try{h=(v=(x=(T=(M=(await l.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:M.caveats)==null?void 0:T[0])==null?void 0:x.value)==null?void 0:v.map(L=>ko(L)),h.length>0&&(h=await this.getAccounts())}catch(w){const L=w;if(L.code===we.code)throw new we(L);if(L.code===Ka.code)throw L}try{!(h!=null&&h.length)&&!y&&(h=(await l.request({method:"eth_requestAccounts"})).map(I=>ko(I))),r&&(l.removeListener("connect",r),r=void 0),a||(a=this.onAccountsChanged.bind(this),l.on("accountsChanged",a)),b||(b=this.onChainChanged.bind(this),l.on("chainChanged",b)),i||(i=this.onDisconnect.bind(this),l.on("disconnect",i));let w=await this.getChainId();if(u&&w!==u){const L=await this.switchChain({chainId:u}).catch(I=>{if(I.code===we.code)throw I;return{id:w}});w=(L==null?void 0:L.id)??w}return e&&await((z=s.storage)==null?void 0:z.removeItem(`${this.id}.disconnected`)),A.target||await((j=s.storage)==null?void 0:j.setItem("injected.connected",!0)),{accounts:h,chainId:w}}catch(w){const L=w;throw L.code===we.code?new we(L):L.code===Ka.code?new Ka(L):L}},async disconnect(){var y,l;const u=await this.getProvider();if(!u)throw new R9;b&&(u.removeListener("chainChanged",b),b=void 0),i&&(u.removeListener("disconnect",i),i=void 0),r||(r=this.onConnect.bind(this),u.on("connect",r));try{await jE(()=>u.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await((y=s.storage)==null?void 0:y.setItem(`${this.id}.disconnected`,!0)),A.target||await((l=s.storage)==null?void 0:l.removeItem("injected.connected"))},async getAccounts(){const u=await this.getProvider();if(!u)throw new R9;return(await u.request({method:"eth_accounts"})).map(l=>ko(l))},async getChainId(){const u=await this.getProvider();if(!u)throw new R9;const y=await u.request({method:"eth_chainId"});return Number(y)},async getProvider(){if(typeof window>"u")return;let u;const y=n();return typeof y.provider=="function"?u=y.provider(window):typeof y.provider=="string"?u=f7(window,y.provider):u=y.provider,u&&!u.removeListener&&("off"in u&&typeof u.off=="function"?u.removeListener=u.off:u.removeListener=()=>{}),u},async isAuthorized(){var u,y;try{if(e&&await((u=s.storage)==null?void 0:u.getItem(`${this.id}.disconnected`))||!A.target&&!await((y=s.storage)==null?void 0:y.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(t!==void 0&&t!==!1){const T=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",T),!!await this.getProvider()),x=typeof t=="number"?t:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(z=>window.addEventListener("ethereum#initialized",()=>z(T()),{once:!0}))]:[],new Promise(z=>setTimeout(()=>z(T()),x))]))return!0}throw new R9}return!!(await EE(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:u,chainId:y}){var T,x,v,z;const l=await this.getProvider();if(!l)throw new R9;const h=s.chains.find(j=>j.id===y);if(!h)throw new hb(new cm);const M=new Promise(j=>{const w=L=>{"chainId"in L&&L.chainId===y&&(s.emitter.off("change",w),j())};s.emitter.on("change",w)});try{return await Promise.all([l.request({method:"wallet_switchEthereumChain",params:[{chainId:L6(y)}]}).then(async()=>{await this.getChainId()===y&&s.emitter.emit("change",{chainId:y})}),M]),h}catch(j){const w=j;if(w.code===4902||((x=(T=w==null?void 0:w.data)==null?void 0:T.originalError)==null?void 0:x.code)===4902)try{const{default:L,...I}=h.blockExplorers??{};let C;u!=null&&u.blockExplorerUrls?C=u.blockExplorerUrls:L&&(C=[L.url,...Object.values(I).map(H=>H.url)]);let O;(v=u==null?void 0:u.rpcUrls)!=null&&v.length?O=u.rpcUrls:O=[((z=h.rpcUrls.default)==null?void 0:z.http[0])??""];const B={blockExplorerUrls:C,chainId:L6(y),chainName:(u==null?void 0:u.chainName)??h.name,iconUrls:u==null?void 0:u.iconUrls,nativeCurrency:(u==null?void 0:u.nativeCurrency)??h.nativeCurrency,rpcUrls:O};return await Promise.all([l.request({method:"wallet_addEthereumChain",params:[B]}).then(async()=>{if(await this.getChainId()===y)s.emitter.emit("change",{chainId:y});else throw new we(new Error("User rejected switch after adding network."))}),M]),h}catch(L){throw new we(L)}throw w.code===we.code?new we(w):new hb(w)}},async onAccountsChanged(u){var y;if(u.length===0)this.onDisconnect();else if(s.emitter.listenerCount("connect")){const l=(await this.getChainId()).toString();this.onConnect({chainId:l}),e&&await((y=s.storage)==null?void 0:y.removeItem(`${this.id}.disconnected`))}else s.emitter.emit("change",{accounts:u.map(l=>ko(l))})},onChainChanged(u){const y=Number(u);s.emitter.emit("change",{chainId:y})},async onConnect(u){const y=await this.getAccounts();if(y.length===0)return;const l=Number(u.chainId);s.emitter.emit("connect",{accounts:y,chainId:l});const h=await this.getProvider();h&&(r&&(h.removeListener("connect",r),r=void 0),a||(a=this.onAccountsChanged.bind(this),h.on("accountsChanged",a)),b||(b=this.onChainChanged.bind(this),h.on("chainChanged",b)),i||(i=this.onDisconnect.bind(this),h.on("disconnect",i)))},async onDisconnect(u){const y=await this.getProvider();u&&u.code===1013&&y&&(await this.getAccounts()).length||(s.emitter.emit("disconnect"),y&&(b&&(y.removeListener("chainChanged",b),b=void 0),i&&(y.removeListener("disconnect",i),i=void 0),r||(r=this.onConnect.bind(this),y.on("connect",r))))}})}const BG={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(A){return A!=null&&A.coinbaseWalletExtension?A.coinbaseWalletExtension:f7(A,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(A){return f7(A,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const t=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of t)if(e[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(A){var e,t;return(e=A==null?void 0:A.phantom)!=null&&e.ethereum?(t=A.phantom)==null?void 0:t.ethereum:f7(A,"isPhantom")}}};function f7(A,e){function t(a){return typeof e=="function"?e(a):typeof e=="string"?a[e]:!0}const n=A.ethereum;if(n!=null&&n.providers)return n.providers.find(a=>t(a));if(n&&t(n))return n}function RG(A){if(typeof window>"u")return;const e=t=>A(t.detail);return window.addEventListener("eip6963:announceProvider",e),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",e)}function QG(){const A=new Set;let e=[];const t=()=>RG(a=>{e.some(({info:b})=>b.uuid===a.info.uuid)||(e=[...e,a],A.forEach(b=>b(e,{added:[a]})))});let n=t();return{_listeners(){return A},clear(){A.forEach(a=>a([],{removed:[...e]})),e=[]},destroy(){this.clear(),A.clear(),n==null||n()},findProvider({rdns:a}){return e.find(b=>b.info.rdns===a)},getProviders(){return e},reset(){this.clear(),n==null||n(),n=t()},subscribe(a,{emitImmediately:b}={}){return A.add(a),b&&a(e,{added:e}),()=>A.delete(a)}}}const UG=A=>(e,t,n)=>{const a=n.subscribe;return n.subscribe=(r,i,s)=>{let u=r;if(i){const y=(s==null?void 0:s.equalityFn)||Object.is;let l=r(n.getState());u=h=>{const M=r(h);if(!y(l,M)){const T=l;i(l=M,T)}},s!=null&&s.fireImmediately&&i(l,l)}return a(u)},A(e,t,n)},ZG=UG;function XG(A,e){let t;try{t=A()}catch{return}return{getItem:a=>{var b;const r=s=>s===null?null:JSON.parse(s,e==null?void 0:e.reviver),i=(b=t.getItem(a))!=null?b:null;return i instanceof Promise?i.then(r):r(i)},setItem:(a,b)=>t.setItem(a,JSON.stringify(b,e==null?void 0:e.replacer)),removeItem:a=>t.removeItem(a)}}const um=A=>e=>{try{const t=A(e);return t instanceof Promise?t:{then(n){return um(n)(t)},catch(n){return this}}}catch(t){return{then(n){return this},catch(n){return um(n)(t)}}}},JG=(A,e)=>(t,n,a)=>{let b={storage:XG(()=>localStorage),partialize:x=>x,version:0,merge:(x,v)=>({...v,...x}),...e},r=!1;const i=new Set,s=new Set;let u=b.storage;if(!u)return A((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${b.name}', the given storage is currently unavailable.`),t(...x)},n,a);const y=()=>{const x=b.partialize({...n()});return u.setItem(b.name,{state:x,version:b.version})},l=a.setState;a.setState=(x,v)=>{l(x,v),y()};const h=A((...x)=>{t(...x),y()},n,a);a.getInitialState=()=>h;let M;const T=()=>{var x,v;if(!u)return;r=!1,i.forEach(j=>{var w;return j((w=n())!=null?w:h)});const z=((v=b.onRehydrateStorage)==null?void 0:v.call(b,(x=n())!=null?x:h))||void 0;return um(u.getItem.bind(u))(b.name).then(j=>{if(j)if(typeof j.version=="number"&&j.version!==b.version){if(b.migrate)return[!0,b.migrate(j.state,j.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,j.state];return[!1,void 0]}).then(j=>{var w;const[L,I]=j;if(M=b.merge(I,(w=n())!=null?w:h),t(M,!0),L)return y()}).then(()=>{z==null||z(M,void 0),M=n(),r=!0,s.forEach(j=>j(M))}).catch(j=>{z==null||z(void 0,j)})};return a.persist={setOptions:x=>{b={...b,...x},x.storage&&(u=x.storage)},clearStorage:()=>{u==null||u.removeItem(b.name)},getOptions:()=>b,rehydrate:()=>T(),hasHydrated:()=>r,onHydrate:x=>(i.add(x),()=>{i.delete(x)}),onFinishHydration:x=>(s.add(x),()=>{s.delete(x)})},b.skipHydration||T(),M||h},FG=JG,ET=A=>{let e;const t=new Set,n=(u,y)=>{const l=typeof u=="function"?u(e):u;if(!Object.is(l,e)){const h=e;e=y??(typeof l!="object"||l===null)?l:Object.assign({},e,l),t.forEach(M=>M(e,h))}},a=()=>e,i={setState:n,getState:a,getInitialState:()=>s,subscribe:u=>(t.add(u),()=>t.delete(u))},s=e=A(n,a,i);return i},Dp=A=>A?ET(A):ET;var OE={exports:{}};(function(A){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function a(s,u,y){this.fn=s,this.context=u,this.once=y||!1}function b(s,u,y,l,h){if(typeof y!="function")throw new TypeError("The listener must be a function");var M=new a(y,l||s,h),T=t?t+u:u;return s._events[T]?s._events[T].fn?s._events[T]=[s._events[T],M]:s._events[T].push(M):(s._events[T]=M,s._eventsCount++),s}function r(s,u){--s._eventsCount===0?s._events=new n:delete s._events[u]}function i(){this._events=new n,this._eventsCount=0}i.prototype.eventNames=function(){var u=[],y,l;if(this._eventsCount===0)return u;for(l in y=this._events)e.call(y,l)&&u.push(t?l.slice(1):l);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(y)):u},i.prototype.listeners=function(u){var y=t?t+u:u,l=this._events[y];if(!l)return[];if(l.fn)return[l.fn];for(var h=0,M=l.length,T=new Array(M);h<M;h++)T[h]=l[h].fn;return T},i.prototype.listenerCount=function(u){var y=t?t+u:u,l=this._events[y];return l?l.fn?1:l.length:0},i.prototype.emit=function(u,y,l,h,M,T){var x=t?t+u:u;if(!this._events[x])return!1;var v=this._events[x],z=arguments.length,j,w;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),z){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,y),!0;case 3:return v.fn.call(v.context,y,l),!0;case 4:return v.fn.call(v.context,y,l,h),!0;case 5:return v.fn.call(v.context,y,l,h,M),!0;case 6:return v.fn.call(v.context,y,l,h,M,T),!0}for(w=1,j=new Array(z-1);w<z;w++)j[w-1]=arguments[w];v.fn.apply(v.context,j)}else{var L=v.length,I;for(w=0;w<L;w++)switch(v[w].once&&this.removeListener(u,v[w].fn,void 0,!0),z){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,y);break;case 3:v[w].fn.call(v[w].context,y,l);break;case 4:v[w].fn.call(v[w].context,y,l,h);break;default:if(!j)for(I=1,j=new Array(z-1);I<z;I++)j[I-1]=arguments[I];v[w].fn.apply(v[w].context,j)}}return!0},i.prototype.on=function(u,y,l){return b(this,u,y,l,!1)},i.prototype.once=function(u,y,l){return b(this,u,y,l,!0)},i.prototype.removeListener=function(u,y,l,h){var M=t?t+u:u;if(!this._events[M])return this;if(!y)return r(this,M),this;var T=this._events[M];if(T.fn)T.fn===y&&(!h||T.once)&&(!l||T.context===l)&&r(this,M);else{for(var x=0,v=[],z=T.length;x<z;x++)(T[x].fn!==y||h&&!T[x].once||l&&T[x].context!==l)&&v.push(T[x]);v.length?this._events[M]=v.length===1?v[0]:v:r(this,M)}return this},i.prototype.removeAllListeners=function(u){var y;return u?(y=t?t+u:u,this._events[y]&&r(this,y)):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=t,i.EventEmitter=i,A.exports=i})(OE);var WG=OE.exports;const HG=Nb(WG);class VG{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new HG})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){const n=t[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}}function YG(A){return new VG(A)}function GG(A,e){return JSON.parse(A,(t,n)=>{let a=n;return(a==null?void 0:a.__type)==="bigint"&&(a=BigInt(a.value)),(a==null?void 0:a.__type)==="Map"&&(a=new Map(a.value)),(e==null?void 0:e(t,a))??a})}function zT(A,e){return A.slice(0,e).join(".")||"."}function jT(A,e){const{length:t}=A;for(let n=0;n<t;++n)if(A[n]===e)return n+1;return 0}function qG(A,e){const t=typeof A=="function",n=typeof e=="function",a=[],b=[];return function(i,s){if(typeof s=="object")if(a.length){const u=jT(a,this);u===0?a[a.length]=this:(a.splice(u),b.splice(u)),b[b.length]=i;const y=jT(a,s);if(y!==0)return n?e.call(this,i,s,zT(b,y)):`[ref=${zT(b,y)}]`}else a[0]=s,b[0]=i;return t?A.call(this,i,s):s}}function KG(A,e,t,n){return JSON.stringify(A,qG((a,b)=>{let r=b;return typeof r=="bigint"&&(r={__type:"bigint",value:b.toString()}),r instanceof Map&&(r={__type:"Map",value:Array.from(b.entries())}),(e==null?void 0:e(a,r))??r},n),t??void 0)}function _G(A){const{deserialize:e=GG,key:t="wagmi",serialize:n=KG,storage:a=PE}=A;function b(r){return r instanceof Promise?r.then(i=>i).catch(()=>null):r}return{...a,key:t,async getItem(r,i){const s=a.getItem(`${t}.${r}`),u=await b(s);return u?e(u)??null:i??null},async setItem(r,i){const s=`${t}.${r}`;i===null?await b(a.removeItem(s)):await b(a.setItem(s,n(i)))},async removeItem(r){await b(a.removeItem(`${t}.${r}`))}}}const PE={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function $G(){const A=(()=>typeof window<"u"&&window.localStorage?window.localStorage:PE)();return{getItem(e){return A.getItem(e)},removeItem(e){A.removeItem(e)},setItem(e,t){try{A.setItem(e,t)}catch{}}}}const lm=256;let jo=lm,Co;function eq(A=11){if(!Co||jo+A>lm*2){Co="",jo=0;for(let e=0;e<lm;e++)Co+=(256+Math.random()*256|0).toString(16).substring(1)}return Co.substring(jo,jo+++A)}function Aq(A){const{multiInjectedProviderDiscovery:e=!0,storage:t=_G({storage:$G()}),syncConnectedChain:n=!0,ssr:a=!1,...b}=A,r=typeof window<"u"&&e?QG():void 0,i=Dp(()=>b.chains),s=Dp(()=>{const I=[],C=new Set;for(const O of b.connectors??[]){const B=u(O);if(I.push(B),!a&&B.rdns){const H=typeof B.rdns=="string"?[B.rdns]:B.rdns;for(const V of H)C.add(V)}}if(!a&&r){const O=r.getProviders();for(const B of O)C.has(B.info.rdns)||I.push(u(y(B)))}return I});function u(I){var B;const C=YG(eq()),O={...I({emitter:C,chains:i.getState(),storage:t,transports:b.transports}),emitter:C,uid:C.uid};return C.on("connect",w),(B=O.setup)==null||B.call(O),O}function y(I){const{info:C}=I,O=I.provider;return yg({target:{...C,id:C.rdns,provider:O}})}const l=new Map;function h(I={}){const C=I.chainId??v.getState().chainId,O=i.getState().find(H=>H.id===C);if(I.chainId&&!O)throw new cm;{const H=l.get(v.getState().chainId);if(H&&!O)return H;if(!O)throw new cm}{const H=l.get(C);if(H)return H}let B;if(b.client)B=b.client({chain:O});else{const H=O.id,V=i.getState().map(y0=>y0.id),K={},s0=Object.entries(b);for(const[y0,r0]of s0)if(!(y0==="chains"||y0==="client"||y0==="connectors"||y0==="transports"))if(typeof r0=="object")if(H in r0)K[y0]=r0[H];else{if(V.some(J=>J in r0))continue;K[y0]=r0}else K[y0]=r0;B=zG({...K,chain:O,batch:K.batch??{multicall:!0},transport:y0=>b.transports[H]({...y0,connectors:s})})}return l.set(C,B),B}function M(){return{chainId:i.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let T;const x="0.0.0-canary-";r7.startsWith(x)?T=Number.parseInt(r7.replace(x,"")):T=Number.parseInt(r7.split(".")[0]??"0");const v=Dp(ZG(t?FG(M,{migrate(I,C){if(C===T)return I;const O=M(),B=z(I,O.chainId);return{...O,chainId:B}},name:"store",partialize(I){return{connections:{__type:"Map",value:Array.from(I.connections.entries()).map(([C,O])=>{const{id:B,name:H,type:V,uid:K}=O.connector;return[C,{...O,connector:{id:B,name:H,type:V,uid:K}}]})},chainId:I.chainId,current:I.current}},merge(I,C){typeof I=="object"&&I&&"status"in I&&delete I.status;const O=z(I,C.chainId);return{...C,...I,chainId:O}},skipHydration:a,storage:t,version:T}):M));v.setState(M());function z(I,C){return I&&typeof I=="object"&&"chainId"in I&&typeof I.chainId=="number"&&i.getState().some(O=>O.id===I.chainId)?I.chainId:C}n&&v.subscribe(({connections:I,current:C})=>{var O;return C?(O=I.get(C))==null?void 0:O.chainId:void 0},I=>{if(i.getState().some(O=>O.id===I))return v.setState(O=>({...O,chainId:I??O.chainId}))}),r==null||r.subscribe(I=>{const C=new Set,O=new Set;for(const H of s.getState())if(C.add(H.id),H.rdns){const V=typeof H.rdns=="string"?[H.rdns]:H.rdns;for(const K of V)O.add(K)}const B=[];for(const H of I){if(O.has(H.info.rdns))continue;const V=u(y(H));C.has(V.id)||B.push(V)}t&&!v.persist.hasHydrated()||s.setState(H=>[...H,...B],!0)});function j(I){v.setState(C=>{const O=C.connections.get(I.uid);return O?{...C,connections:new Map(C.connections).set(I.uid,{accounts:I.accounts??O.accounts,chainId:I.chainId??O.chainId,connector:O.connector})}:C})}function w(I){v.getState().status==="connecting"||v.getState().status==="reconnecting"||v.setState(C=>{const O=s.getState().find(B=>B.uid===I.uid);return O?(O.emitter.listenerCount("connect")&&O.emitter.off("connect",j),O.emitter.listenerCount("change")||O.emitter.on("change",j),O.emitter.listenerCount("disconnect")||O.emitter.on("disconnect",L),{...C,connections:new Map(C.connections).set(I.uid,{accounts:I.accounts,chainId:I.chainId,connector:O}),current:I.uid,status:"connected"}):C})}function L(I){v.setState(C=>{const O=C.connections.get(I.uid);if(O){const H=O.connector;H.emitter.listenerCount("change")&&O.connector.emitter.off("change",j),H.emitter.listenerCount("disconnect")&&O.connector.emitter.off("disconnect",L),H.emitter.listenerCount("connect")||O.connector.emitter.on("connect",w)}if(C.connections.delete(I.uid),C.connections.size===0)return{...C,connections:new Map,current:null,status:"disconnected"};const B=C.connections.values().next().value;return{...C,connections:new Map(C.connections),current:B.connector.uid}})}return{get chains(){return i.getState()},get connectors(){return s.getState()},storage:t,getClient:h,get state(){return v.getState()},setState(I){let C;typeof I=="function"?C=I(v.getState()):C=I;const O=M();typeof C!="object"&&(C=O),Object.keys(O).some(H=>!(H in C))&&(C=O),v.setState(C,!0)},subscribe(I,C,O){return v.subscribe(I,C,O?{...O,fireImmediately:O.emitImmediately}:void 0)},_internal:{mipd:r,store:v,ssr:!!a,syncConnectedChain:n,transports:b.transports,chains:{setState(I){const C=typeof I=="function"?I(i.getState()):I;if(C.length!==0)return i.setState(C,!0)},subscribe(I){return i.subscribe(I)}},connectors:{providerDetailToConnector:y,setup:u,setState(I){return s.setState(typeof I=="function"?I(s.getState()):I,!0)},subscribe(I){return s.subscribe(I)}},events:{change:j,connect:w,disconnect:L}}}}function tq(A,e){const{initialState:t,reconnectOnMount:n}=e;return t&&!A._internal.store.persist.hasHydrated()&&A.setState({...t,chainId:A.chains.some(a=>a.id===t.chainId)?t.chainId:A.chains[0].id,connections:n?t.connections:new Map,status:n?"reconnecting":"disconnected"}),{async onMount(){A._internal.ssr&&(await A._internal.store.persist.rehydrate(),A._internal.mipd&&A._internal.connectors.setState(a=>{var s;const b=new Set;for(const u of a??[])if(u.rdns){const y=Array.isArray(u.rdns)?u.rdns:[u.rdns];for(const l of y)b.add(l)}const r=[],i=((s=A._internal.mipd)==null?void 0:s.getProviders())??[];for(const u of i){if(b.has(u.info.rdns))continue;const y=A._internal.connectors.providerDetailToConnector(u),l=A._internal.connectors.setup(y);r.push(l)}return[...a,...r]})),n?OG(A):A.storage&&A.setState(a=>({...a,connections:new Map}))}}}function nq(A){const{children:e,config:t,initialState:n,reconnectOnMount:a=!0}=A,{onMount:b}=tq(t,{initialState:n,reconnectOnMount:a});t._internal.ssr||b();const r=e3(!0);return G6(()=>{if(r.current&&t._internal.ssr)return b(),()=>{r.current=!1}},[]),e}const BE=Tb(void 0);function aq(A){const{children:e,config:t}=A,n={value:t};return F5(nq,A,F5(BE.Provider,n,e))}const bq="2.14.13",rq=()=>`wagmi@${bq}`;class fq extends pg{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return rq()}}class iq extends fq{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function RE(A={}){const e=A.config??H8(BE);if(!e)throw new iq;return e}const QE=hu(xH);var Ws=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(A){return this.listeners.add(A),this.onSubscribe(),()=>{this.listeners.delete(A),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Mb=typeof window>"u"||"Deno"in globalThis;function KA(){}function dq(A,e){return typeof A=="function"?A(e):A}function pm(A){return typeof A=="number"&&A>=0&&A!==1/0}function UE(A,e){return Math.max(A+(e||0)-Date.now(),0)}function ur(A,e){return typeof A=="function"?A(e):A}function P8(A,e){return typeof A=="function"?A(e):A}function CT(A,e){const{type:t="all",exact:n,fetchStatus:a,predicate:b,queryKey:r,stale:i}=A;if(r){if(n){if(e.queryHash!==mg(r,e.options))return!1}else if(!qd(e.queryKey,r))return!1}if(t!=="all"){const s=e.isActive();if(t==="active"&&!s||t==="inactive"&&s)return!1}return!(typeof i=="boolean"&&e.isStale()!==i||a&&a!==e.state.fetchStatus||b&&!b(e))}function LT(A,e){const{exact:t,status:n,predicate:a,mutationKey:b}=A;if(b){if(!e.options.mutationKey)return!1;if(t){if(Gd(e.options.mutationKey)!==Gd(b))return!1}else if(!qd(e.options.mutationKey,b))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function mg(A,e){return((e==null?void 0:e.queryKeyHashFn)||Gd)(A)}function Gd(A){return JSON.stringify(A,(e,t)=>mm(t)?Object.keys(t).sort().reduce((n,a)=>(n[a]=t[a],n),{}):t)}function qd(A,e){return A===e?!0:typeof A!=typeof e?!1:A&&e&&typeof A=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!qd(A[t],e[t])):!1}function R7(A,e){if(A===e)return A;const t=ST(A)&&ST(e);if(t||mm(A)&&mm(e)){const n=t?A:Object.keys(A),a=n.length,b=t?e:Object.keys(e),r=b.length,i=t?[]:{};let s=0;for(let u=0;u<r;u++){const y=t?u:b[u];(!t&&n.includes(y)||t)&&A[y]===void 0&&e[y]===void 0?(i[y]=void 0,s++):(i[y]=R7(A[y],e[y]),i[y]===A[y]&&A[y]!==void 0&&s++)}return a===r&&s===a?A:i}return e}function ym(A,e){if(!e||Object.keys(A).length!==Object.keys(e).length)return!1;for(const t in A)if(A[t]!==e[t])return!1;return!0}function ST(A){return Array.isArray(A)&&A.length===Object.keys(A).length}function mm(A){if(!OT(A))return!1;const e=A.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!OT(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(A)!==Object.prototype)}function OT(A){return Object.prototype.toString.call(A)==="[object Object]"}function sq(A){return new Promise(e=>{setTimeout(e,A)})}function hm(A,e,t){if(typeof t.structuralSharing=="function")return t.structuralSharing(A,e);if(t.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return R7(A,e)}catch(n){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${t.queryHash}]: ${n}`)}return R7(A,e)}return e}function cq(A,e,t=0){const n=[...A,e];return t&&n.length>t?n.slice(1):n}function oq(A,e,t=0){const n=[e,...A];return t&&n.length>t?n.slice(0,-1):n}var Q7=Symbol();function ZE(A,e){return process.env.NODE_ENV!=="production"&&A.queryFn===Q7&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${A.queryHash}'`),!A.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!A.queryFn||A.queryFn===Q7?()=>Promise.reject(new Error(`Missing queryFn: '${A.queryHash}'`)):A.queryFn}var Y4,Ua,nf,Gw,uq=(Gw=class extends Ws{constructor(){super();f0(this,Y4,void 0);f0(this,Ua,void 0);f0(this,nf,void 0);F(this,nf,e=>{if(!Mb&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){E(this,Ua)||this.setEventListener(E(this,nf))}onUnsubscribe(){var e;this.hasListeners()||((e=E(this,Ua))==null||e.call(this),F(this,Ua,void 0))}setEventListener(e){var t;F(this,nf,e),(t=E(this,Ua))==null||t.call(this),F(this,Ua,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){E(this,Y4)!==e&&(F(this,Y4,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof E(this,Y4)=="boolean"?E(this,Y4):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Y4=new WeakMap,Ua=new WeakMap,nf=new WeakMap,Gw),hg=new uq,af,Za,bf,qw,lq=(qw=class extends Ws{constructor(){super();f0(this,af,!0);f0(this,Za,void 0);f0(this,bf,void 0);F(this,bf,e=>{if(!Mb&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){E(this,Za)||this.setEventListener(E(this,bf))}onUnsubscribe(){var e;this.hasListeners()||((e=E(this,Za))==null||e.call(this),F(this,Za,void 0))}setEventListener(e){var t;F(this,bf,e),(t=E(this,Za))==null||t.call(this),F(this,Za,e(this.setOnline.bind(this)))}setOnline(e){E(this,af)!==e&&(F(this,af,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return E(this,af)}},af=new WeakMap,Za=new WeakMap,bf=new WeakMap,qw),U7=new lq;function gm(){let A,e;const t=new Promise((a,b)=>{A=a,e=b});t.status="pending",t.catch(()=>{});function n(a){Object.assign(t,a),delete t.resolve,delete t.reject}return t.resolve=a=>{n({status:"fulfilled",value:a}),A(a)},t.reject=a=>{n({status:"rejected",reason:a}),e(a)},t}function pq(A){return Math.min(1e3*2**A,3e4)}function XE(A){return(A??"online")==="online"?U7.isOnline():!0}var JE=class extends Error{constructor(A){super("CancelledError"),this.revert=A==null?void 0:A.revert,this.silent=A==null?void 0:A.silent}};function Ep(A){return A instanceof JE}function FE(A){let e=!1,t=0,n=!1,a;const b=gm(),r=x=>{var v;n||(h(new JE(x)),(v=A.abort)==null||v.call(A))},i=()=>{e=!0},s=()=>{e=!1},u=()=>hg.isFocused()&&(A.networkMode==="always"||U7.isOnline())&&A.canRun(),y=()=>XE(A.networkMode)&&A.canRun(),l=x=>{var v;n||(n=!0,(v=A.onSuccess)==null||v.call(A,x),a==null||a(),b.resolve(x))},h=x=>{var v;n||(n=!0,(v=A.onError)==null||v.call(A,x),a==null||a(),b.reject(x))},M=()=>new Promise(x=>{var v;a=z=>{(n||u())&&x(z)},(v=A.onPause)==null||v.call(A)}).then(()=>{var x;a=void 0,n||(x=A.onContinue)==null||x.call(A)}),T=()=>{if(n)return;let x;const v=t===0?A.initialPromise:void 0;try{x=v??A.fn()}catch(z){x=Promise.reject(z)}Promise.resolve(x).then(l).catch(z=>{var C;if(n)return;const j=A.retry??(Mb?0:3),w=A.retryDelay??pq,L=typeof w=="function"?w(t,z):w,I=j===!0||typeof j=="number"&&t<j||typeof j=="function"&&j(t,z);if(e||!I){h(z);return}t++,(C=A.onFail)==null||C.call(A,t,z),sq(L).then(()=>u()?void 0:M()).then(()=>{e?h(z):T()})})};return{promise:b,cancel:r,continue:()=>(a==null||a(),b),cancelRetry:i,continueRetry:s,canStart:y,start:()=>(y()?T():M().then(T),b)}}function yq(){let A=[],e=0,t=i=>{i()},n=i=>{i()},a=i=>setTimeout(i,0);const b=i=>{e?A.push(i):a(()=>{t(i)})},r=()=>{const i=A;A=[],i.length&&a(()=>{n(()=>{i.forEach(s=>{t(s)})})})};return{batch:i=>{let s;e++;try{s=i()}finally{e--,e||r()}return s},batchCalls:i=>(...s)=>{b(()=>{i(...s)})},schedule:b,setNotifyFunction:i=>{t=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{a=i}}}var X5=yq(),G4,Kw,WE=(Kw=class{constructor(){f0(this,G4,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pm(this.gcTime)&&F(this,G4,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(A){this.gcTime=Math.max(this.gcTime||0,A??(Mb?1/0:5*60*1e3))}clearGcTimeout(){E(this,G4)&&(clearTimeout(E(this,G4)),F(this,G4,void 0))}},G4=new WeakMap,Kw),rf,ff,GA,q4,ae,gs,K4,S8,Z2,_w,mq=(_w=class extends WE{constructor(e){super();f0(this,S8);f0(this,rf,void 0);f0(this,ff,void 0);f0(this,GA,void 0);f0(this,q4,void 0);f0(this,ae,void 0);f0(this,gs,void 0);f0(this,K4,void 0);F(this,K4,!1),F(this,gs,e.defaultOptions),this.setOptions(e.options),this.observers=[],F(this,q4,e.client),F(this,GA,E(this,q4).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,F(this,rf,hq(this.options)),this.state=e.state??E(this,rf),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=E(this,ae))==null?void 0:e.promise}setOptions(e){this.options={...E(this,gs),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,GA).remove(this)}setData(e,t){const n=hm(this.state.data,e,this.options);return X0(this,S8,Z2).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e,t){X0(this,S8,Z2).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var n,a;const t=(n=E(this,ae))==null?void 0:n.promise;return(a=E(this,ae))==null||a.cancel(e),t?t.then(KA).catch(KA):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,rf))}isActive(){return this.observers.some(e=>P8(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Q7||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!UE(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=E(this,ae))==null||t.continue()}onOnline(){var t;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=E(this,ae))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),E(this,GA).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(E(this,ae)&&(E(this,K4)?E(this,ae).cancel({revert:!0}):E(this,ae).cancelRetry()),this.scheduleGc()),E(this,GA).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X0(this,S8,Z2).call(this,{type:"invalidate"})}fetch(e,t){var s,u,y;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(E(this,ae))return E(this,ae).continueRetry(),E(this,ae).promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(h=>h.options.queryFn);l&&this.setOptions(l.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,a=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(F(this,K4,!0),n.signal)})},b=()=>{const l=ZE(this.options,t),h={client:E(this,q4),queryKey:this.queryKey,meta:this.meta};return a(h),F(this,K4,!1),this.options.persister?this.options.persister(l,h,this):l(h)},r={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:E(this,q4),state:this.state,fetchFn:b};a(r),(s=this.options.behavior)==null||s.onFetch(r,this),F(this,ff,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=r.fetchOptions)==null?void 0:u.meta))&&X0(this,S8,Z2).call(this,{type:"fetch",meta:(y=r.fetchOptions)==null?void 0:y.meta});const i=l=>{var h,M,T,x;Ep(l)&&l.silent||X0(this,S8,Z2).call(this,{type:"error",error:l}),Ep(l)||((M=(h=E(this,GA).config).onError)==null||M.call(h,l,this),(x=(T=E(this,GA).config).onSettled)==null||x.call(T,this.state.data,l,this)),this.scheduleGc()};return F(this,ae,FE({initialPromise:t==null?void 0:t.initialPromise,fn:r.fetchFn,abort:n.abort.bind(n),onSuccess:l=>{var h,M,T,x;if(l===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(l)}catch(v){i(v);return}(M=(h=E(this,GA).config).onSuccess)==null||M.call(h,l,this),(x=(T=E(this,GA).config).onSettled)==null||x.call(T,l,this.state.error,this),this.scheduleGc()},onError:i,onFail:(l,h)=>{X0(this,S8,Z2).call(this,{type:"failed",failureCount:l,error:h})},onPause:()=>{X0(this,S8,Z2).call(this,{type:"pause"})},onContinue:()=>{X0(this,S8,Z2).call(this,{type:"continue"})},retry:r.options.retry,retryDelay:r.options.retryDelay,networkMode:r.options.networkMode,canRun:()=>!0})),E(this,ae).start()}},rf=new WeakMap,ff=new WeakMap,GA=new WeakMap,q4=new WeakMap,ae=new WeakMap,gs=new WeakMap,K4=new WeakMap,S8=new WeakSet,Z2=function(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...HE(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return Ep(a)&&a.revert&&E(this,ff)?{...E(this,ff),fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),X5.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),E(this,GA).notify({query:this,type:"updated",action:e})})},_w);function HE(A,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XE(e.networkMode)?"fetching":"paused",...A===void 0&&{error:null,status:"pending"}}}function hq(A){const e=typeof A.initialData=="function"?A.initialData():A.initialData,t=e!==void 0,n=t?typeof A.initialDataUpdatedAt=="function"?A.initialDataUpdatedAt():A.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var jt,$w,gq=($w=class extends Ws{constructor(e={}){super();f0(this,jt,void 0);this.config=e,F(this,jt,new Map)}build(e,t,n){const a=t.queryKey,b=t.queryHash??mg(a,t);let r=this.get(b);return r||(r=new mq({client:e,queryKey:a,queryHash:b,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(r)),r}add(e){E(this,jt).has(e.queryHash)||(E(this,jt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=E(this,jt).get(e.queryHash);t&&(e.destroy(),t===e&&E(this,jt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){X5.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return E(this,jt).get(e)}getAll(){return[...E(this,jt).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>CT(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>CT(e,n)):t}notify(e){X5.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){X5.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){X5.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jt=new WeakMap,$w),Ct,ve,_4,Lt,Ma,eI,Mq=(eI=class extends WE{constructor(e){super();f0(this,Lt);f0(this,Ct,void 0);f0(this,ve,void 0);f0(this,_4,void 0);this.mutationId=e.mutationId,F(this,ve,e.mutationCache),F(this,Ct,[]),this.state=e.state||vq(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){E(this,Ct).includes(e)||(E(this,Ct).push(e),this.clearGcTimeout(),E(this,ve).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){F(this,Ct,E(this,Ct).filter(t=>t!==e)),this.scheduleGc(),E(this,ve).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){E(this,Ct).length||(this.state.status==="pending"?this.scheduleGc():E(this,ve).remove(this))}continue(){var e;return((e=E(this,_4))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,b,r,i,s,u,y,l,h,M,T,x,v,z,j,w,L,I,C,O;F(this,_4,FE({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(B,H)=>{X0(this,Lt,Ma).call(this,{type:"failed",failureCount:B,error:H})},onPause:()=>{X0(this,Lt,Ma).call(this,{type:"pause"})},onContinue:()=>{X0(this,Lt,Ma).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,ve).canRun(this)}));const t=this.state.status==="pending",n=!E(this,_4).canStart();try{if(!t){X0(this,Lt,Ma).call(this,{type:"pending",variables:e,isPaused:n}),await((b=(a=E(this,ve).config).onMutate)==null?void 0:b.call(a,e,this));const H=await((i=(r=this.options).onMutate)==null?void 0:i.call(r,e));H!==this.state.context&&X0(this,Lt,Ma).call(this,{type:"pending",context:H,variables:e,isPaused:n})}const B=await E(this,_4).start();return await((u=(s=E(this,ve).config).onSuccess)==null?void 0:u.call(s,B,e,this.state.context,this)),await((l=(y=this.options).onSuccess)==null?void 0:l.call(y,B,e,this.state.context)),await((M=(h=E(this,ve).config).onSettled)==null?void 0:M.call(h,B,null,this.state.variables,this.state.context,this)),await((x=(T=this.options).onSettled)==null?void 0:x.call(T,B,null,e,this.state.context)),X0(this,Lt,Ma).call(this,{type:"success",data:B}),B}catch(B){try{throw await((z=(v=E(this,ve).config).onError)==null?void 0:z.call(v,B,e,this.state.context,this)),await((w=(j=this.options).onError)==null?void 0:w.call(j,B,e,this.state.context)),await((I=(L=E(this,ve).config).onSettled)==null?void 0:I.call(L,void 0,B,this.state.variables,this.state.context,this)),await((O=(C=this.options).onSettled)==null?void 0:O.call(C,void 0,B,e,this.state.context)),B}finally{X0(this,Lt,Ma).call(this,{type:"error",error:B})}}finally{E(this,ve).runNext(this)}}},Ct=new WeakMap,ve=new WeakMap,_4=new WeakMap,Lt=new WeakSet,Ma=function(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),X5.batch(()=>{E(this,Ct).forEach(n=>{n.onMutationUpdate(e)}),E(this,ve).notify({mutation:this,type:"updated",action:e})})},eI);function vq(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fn,O8,Ms,AI,xq=(AI=class extends Ws{constructor(e={}){super();f0(this,fn,void 0);f0(this,O8,void 0);f0(this,Ms,void 0);this.config=e,F(this,fn,new Set),F(this,O8,new Map),F(this,Ms,0)}build(e,t,n){const a=new Mq({mutationCache:this,mutationId:++ba(this,Ms)._,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){E(this,fn).add(e);const t=Lo(e);if(typeof t=="string"){const n=E(this,O8).get(t);n?n.push(e):E(this,O8).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(E(this,fn).delete(e)){const t=Lo(e);if(typeof t=="string"){const n=E(this,O8).get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&E(this,O8).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Lo(e);if(typeof t=="string"){const n=E(this,O8).get(t),a=n==null?void 0:n.find(b=>b.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const t=Lo(e);if(typeof t=="string"){const a=(n=E(this,O8).get(t))==null?void 0:n.find(b=>b!==e&&b.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){X5.batch(()=>{E(this,fn).forEach(e=>{this.notify({type:"removed",mutation:e})}),E(this,fn).clear(),E(this,O8).clear()})}getAll(){return Array.from(E(this,fn))}find(e){const t={exact:!0,...e};return this.getAll().find(n=>LT(t,n))}findAll(e={}){return this.getAll().filter(t=>LT(e,t))}notify(e){X5.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return X5.batch(()=>Promise.all(e.map(t=>t.continue().catch(KA))))}},fn=new WeakMap,O8=new WeakMap,Ms=new WeakMap,AI);function Lo(A){var e;return(e=A.options.scope)==null?void 0:e.id}function PT(A){return{onFetch:(e,t)=>{var y,l,h,M,T;const n=e.options,a=(h=(l=(y=e.fetchOptions)==null?void 0:y.meta)==null?void 0:l.fetchMore)==null?void 0:h.direction,b=((M=e.state.data)==null?void 0:M.pages)||[],r=((T=e.state.data)==null?void 0:T.pageParams)||[];let i={pages:[],pageParams:[]},s=0;const u=async()=>{let x=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?x=!0:e.signal.addEventListener("abort",()=>{x=!0}),e.signal)})},z=ZE(e.options,e.fetchOptions),j=async(w,L,I)=>{if(x)return Promise.reject();if(L==null&&w.pages.length)return Promise.resolve(w);const C={client:e.client,queryKey:e.queryKey,pageParam:L,direction:I?"backward":"forward",meta:e.options.meta};v(C);const O=await z(C),{maxPages:B}=e.options,H=I?oq:cq;return{pages:H(w.pages,O,B),pageParams:H(w.pageParams,L,B)}};if(a&&b.length){const w=a==="backward",L=w?Tq:BT,I={pages:b,pageParams:r},C=L(n,I);i=await j(I,C,w)}else{const w=A??b.length;do{const L=s===0?r[0]??n.initialPageParam:BT(n,i);if(s>0&&L==null)break;i=await j(i,L),s++}while(s<w)}return i};e.options.persister?e.fetchFn=()=>{var x,v;return(v=(x=e.options).persister)==null?void 0:v.call(x,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=u}}}function BT(A,{pages:e,pageParams:t}){const n=e.length-1;return e.length>0?A.getNextPageParam(e[n],e,t[n],t):void 0}function Tq(A,{pages:e,pageParams:t}){var n;return e.length>0?(n=A.getPreviousPageParam)==null?void 0:n.call(A,e[0],e,t[0],t):void 0}var H6,Xa,Ja,df,sf,Fa,cf,of,tI,wq=(tI=class{constructor(A={}){f0(this,H6,void 0);f0(this,Xa,void 0);f0(this,Ja,void 0);f0(this,df,void 0);f0(this,sf,void 0);f0(this,Fa,void 0);f0(this,cf,void 0);f0(this,of,void 0);F(this,H6,A.queryCache||new gq),F(this,Xa,A.mutationCache||new xq),F(this,Ja,A.defaultOptions||{}),F(this,df,new Map),F(this,sf,new Map),F(this,Fa,0)}mount(){ba(this,Fa)._++,E(this,Fa)===1&&(F(this,cf,hg.subscribe(async A=>{A&&(await this.resumePausedMutations(),E(this,H6).onFocus())})),F(this,of,U7.subscribe(async A=>{A&&(await this.resumePausedMutations(),E(this,H6).onOnline())})))}unmount(){var A,e;ba(this,Fa)._--,E(this,Fa)===0&&((A=E(this,cf))==null||A.call(this),F(this,cf,void 0),(e=E(this,of))==null||e.call(this),F(this,of,void 0))}isFetching(A){return E(this,H6).findAll({...A,fetchStatus:"fetching"}).length}isMutating(A){return E(this,Xa).findAll({...A,status:"pending"}).length}getQueryData(A){var t;const e=this.defaultQueryOptions({queryKey:A});return(t=E(this,H6).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(A){const e=this.defaultQueryOptions(A),t=E(this,H6).build(this,e),n=t.state.data;return n===void 0?this.fetchQuery(A):(A.revalidateIfStale&&t.isStaleByTime(ur(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(A){return E(this,H6).findAll(A).map(({queryKey:e,state:t})=>{const n=t.data;return[e,n]})}setQueryData(A,e,t){const n=this.defaultQueryOptions({queryKey:A}),a=E(this,H6).get(n.queryHash),b=a==null?void 0:a.state.data,r=dq(e,b);if(r!==void 0)return E(this,H6).build(this,n).setData(r,{...t,manual:!0})}setQueriesData(A,e,t){return X5.batch(()=>E(this,H6).findAll(A).map(({queryKey:n})=>[n,this.setQueryData(n,e,t)]))}getQueryState(A){var t;const e=this.defaultQueryOptions({queryKey:A});return(t=E(this,H6).get(e.queryHash))==null?void 0:t.state}removeQueries(A){const e=E(this,H6);X5.batch(()=>{e.findAll(A).forEach(t=>{e.remove(t)})})}resetQueries(A,e){const t=E(this,H6);return X5.batch(()=>(t.findAll(A).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...A},e)))}cancelQueries(A,e={}){const t={revert:!0,...e},n=X5.batch(()=>E(this,H6).findAll(A).map(a=>a.cancel(t)));return Promise.all(n).then(KA).catch(KA)}invalidateQueries(A,e={}){return X5.batch(()=>(E(this,H6).findAll(A).forEach(t=>{t.invalidate()}),(A==null?void 0:A.refetchType)==="none"?Promise.resolve():this.refetchQueries({...A,type:(A==null?void 0:A.refetchType)??(A==null?void 0:A.type)??"active"},e)))}refetchQueries(A,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},n=X5.batch(()=>E(this,H6).findAll(A).filter(a=>!a.isDisabled()).map(a=>{let b=a.fetch(void 0,t);return t.throwOnError||(b=b.catch(KA)),a.state.fetchStatus==="paused"?Promise.resolve():b}));return Promise.all(n).then(KA)}fetchQuery(A){const e=this.defaultQueryOptions(A);e.retry===void 0&&(e.retry=!1);const t=E(this,H6).build(this,e);return t.isStaleByTime(ur(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(A){return this.fetchQuery(A).then(KA).catch(KA)}fetchInfiniteQuery(A){return A.behavior=PT(A.pages),this.fetchQuery(A)}prefetchInfiniteQuery(A){return this.fetchInfiniteQuery(A).then(KA).catch(KA)}ensureInfiniteQueryData(A){return A.behavior=PT(A.pages),this.ensureQueryData(A)}resumePausedMutations(){return U7.isOnline()?E(this,Xa).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,H6)}getMutationCache(){return E(this,Xa)}getDefaultOptions(){return E(this,Ja)}setDefaultOptions(A){F(this,Ja,A)}setQueryDefaults(A,e){E(this,df).set(Gd(A),{queryKey:A,defaultOptions:e})}getQueryDefaults(A){const e=[...E(this,df).values()],t={};return e.forEach(n=>{qd(A,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(A,e){E(this,sf).set(Gd(A),{mutationKey:A,defaultOptions:e})}getMutationDefaults(A){const e=[...E(this,sf).values()],t={};return e.forEach(n=>{qd(A,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(A){if(A._defaulted)return A;const e={...E(this,Ja).queries,...this.getQueryDefaults(A.queryKey),...A,_defaulted:!0};return e.queryHash||(e.queryHash=mg(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Q7&&(e.enabled=!1),e}defaultMutationOptions(A){return A!=null&&A._defaulted?A:{...E(this,Ja).mutations,...(A==null?void 0:A.mutationKey)&&this.getMutationDefaults(A.mutationKey),...A,_defaulted:!0}}clear(){E(this,H6).clear(),E(this,Xa).clear()}},H6=new WeakMap,Xa=new WeakMap,Ja=new WeakMap,df=new WeakMap,sf=new WeakMap,Fa=new WeakMap,cf=new WeakMap,of=new WeakMap,tI),Ve,_1,vs,xe,$4,uf,Wa,St,xs,lf,pf,eb,Ab,Ha,yf,tb,ud,Ts,Mm,ws,vm,Is,xm,Ns,Tm,ks,wm,Ds,Im,Es,Nm,su,VE,nI,Iq=(nI=class extends Ws{constructor(e,t){super();f0(this,tb);f0(this,Ts);f0(this,ws);f0(this,Is);f0(this,Ns);f0(this,ks);f0(this,Ds);f0(this,Es);f0(this,su);f0(this,Ve,void 0);f0(this,_1,void 0);f0(this,vs,void 0);f0(this,xe,void 0);f0(this,$4,void 0);f0(this,uf,void 0);f0(this,Wa,void 0);f0(this,St,void 0);f0(this,xs,void 0);f0(this,lf,void 0);f0(this,pf,void 0);f0(this,eb,void 0);f0(this,Ab,void 0);f0(this,Ha,void 0);f0(this,yf,new Set);this.options=t,F(this,Ve,e),F(this,St,null),F(this,Wa,gm()),this.options.experimental_prefetchInRender||E(this,Wa).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,_1).addObserver(this),RT(E(this,_1),this.options)?X0(this,tb,ud).call(this):this.updateResult(),X0(this,Ns,Tm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return km(E(this,_1),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return km(E(this,_1),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X0(this,ks,wm).call(this),X0(this,Ds,Im).call(this),E(this,_1).removeObserver(this)}setOptions(e,t){const n=this.options,a=E(this,_1);if(this.options=E(this,Ve).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof P8(this.options.enabled,E(this,_1))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X0(this,Es,Nm).call(this),E(this,_1).setOptions(this.options),n._defaulted&&!ym(this.options,n)&&E(this,Ve).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,_1),observer:this});const b=this.hasListeners();b&&QT(E(this,_1),a,this.options,n)&&X0(this,tb,ud).call(this),this.updateResult(t),b&&(E(this,_1)!==a||P8(this.options.enabled,E(this,_1))!==P8(n.enabled,E(this,_1))||ur(this.options.staleTime,E(this,_1))!==ur(n.staleTime,E(this,_1)))&&X0(this,Ts,Mm).call(this);const r=X0(this,ws,vm).call(this);b&&(E(this,_1)!==a||P8(this.options.enabled,E(this,_1))!==P8(n.enabled,E(this,_1))||r!==E(this,Ha))&&X0(this,Is,xm).call(this,r)}getOptimisticResult(e){const t=E(this,Ve).getQueryCache().build(E(this,Ve),e),n=this.createResult(t,e);return kq(this,n)&&(F(this,xe,n),F(this,uf,this.options),F(this,$4,E(this,_1).state)),n}getCurrentResult(){return E(this,xe)}trackResult(e,t){const n={};return Object.keys(e).forEach(a=>{Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(a),t==null||t(a),e[a])})}),n}trackProp(e){E(this,yf).add(e)}getCurrentQuery(){return E(this,_1)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=E(this,Ve).defaultQueryOptions(e),n=E(this,Ve).getQueryCache().build(E(this,Ve),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return X0(this,tb,ud).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,xe)))}createResult(e,t){var B;const n=E(this,_1),a=this.options,b=E(this,xe),r=E(this,$4),i=E(this,uf),u=e!==n?e.state:E(this,vs),{state:y}=e;let l={...y},h=!1,M;if(t._optimisticResults){const H=this.hasListeners(),V=!H&&RT(e,t),K=H&&QT(e,n,t,a);(V||K)&&(l={...l,...HE(y.data,e.options)}),t._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:T,errorUpdatedAt:x,status:v}=l;if(t.select&&l.data!==void 0)if(b&&l.data===(r==null?void 0:r.data)&&t.select===E(this,xs))M=E(this,lf);else try{F(this,xs,t.select),M=t.select(l.data),M=hm(b==null?void 0:b.data,M,t),F(this,lf,M),F(this,St,null)}catch(H){F(this,St,H)}else M=l.data;if(t.placeholderData!==void 0&&M===void 0&&v==="pending"){let H;if(b!=null&&b.isPlaceholderData&&t.placeholderData===(i==null?void 0:i.placeholderData))H=b.data;else if(H=typeof t.placeholderData=="function"?t.placeholderData((B=E(this,pf))==null?void 0:B.state.data,E(this,pf)):t.placeholderData,t.select&&H!==void 0)try{H=t.select(H),F(this,St,null)}catch(V){F(this,St,V)}H!==void 0&&(v="success",M=hm(b==null?void 0:b.data,H,t),h=!0)}E(this,St)&&(T=E(this,St),M=E(this,lf),x=Date.now(),v="error");const z=l.fetchStatus==="fetching",j=v==="pending",w=v==="error",L=j&&z,I=M!==void 0,O={status:v,fetchStatus:l.fetchStatus,isPending:j,isSuccess:v==="success",isError:w,isInitialLoading:L,isLoading:L,data:M,dataUpdatedAt:l.dataUpdatedAt,error:T,errorUpdatedAt:x,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:z,isRefetching:z&&!j,isLoadingError:w&&!I,isPaused:l.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&I,isStale:gg(e,t),refetch:this.refetch,promise:E(this,Wa)};if(this.options.experimental_prefetchInRender){const H=s0=>{O.status==="error"?s0.reject(O.error):O.data!==void 0&&s0.resolve(O.data)},V=()=>{const s0=F(this,Wa,O.promise=gm());H(s0)},K=E(this,Wa);switch(K.status){case"pending":e.queryHash===n.queryHash&&H(K);break;case"fulfilled":(O.status==="error"||O.data!==K.value)&&V();break;case"rejected":(O.status!=="error"||O.error!==K.reason)&&V();break}}return O}updateResult(e){const t=E(this,xe),n=this.createResult(E(this,_1),this.options);if(F(this,$4,E(this,_1).state),F(this,uf,this.options),E(this,$4).data!==void 0&&F(this,pf,E(this,_1)),ym(n,t))return;F(this,xe,n);const a={},b=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!E(this,yf).size)return!0;const s=new Set(i??E(this,yf));return this.options.throwOnError&&s.add("error"),Object.keys(E(this,xe)).some(u=>{const y=u;return E(this,xe)[y]!==t[y]&&s.has(y)})};(e==null?void 0:e.listeners)!==!1&&b()&&(a.listeners=!0),X0(this,su,VE).call(this,{...a,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X0(this,Ns,Tm).call(this)}},Ve=new WeakMap,_1=new WeakMap,vs=new WeakMap,xe=new WeakMap,$4=new WeakMap,uf=new WeakMap,Wa=new WeakMap,St=new WeakMap,xs=new WeakMap,lf=new WeakMap,pf=new WeakMap,eb=new WeakMap,Ab=new WeakMap,Ha=new WeakMap,yf=new WeakMap,tb=new WeakSet,ud=function(e){X0(this,Es,Nm).call(this);let t=E(this,_1).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(KA)),t},Ts=new WeakSet,Mm=function(){X0(this,ks,wm).call(this);const e=ur(this.options.staleTime,E(this,_1));if(Mb||E(this,xe).isStale||!pm(e))return;const n=UE(E(this,xe).dataUpdatedAt,e)+1;F(this,eb,setTimeout(()=>{E(this,xe).isStale||this.updateResult()},n))},ws=new WeakSet,vm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,_1)):this.options.refetchInterval)??!1},Is=new WeakSet,xm=function(e){X0(this,Ds,Im).call(this),F(this,Ha,e),!(Mb||P8(this.options.enabled,E(this,_1))===!1||!pm(E(this,Ha))||E(this,Ha)===0)&&F(this,Ab,setInterval(()=>{(this.options.refetchIntervalInBackground||hg.isFocused())&&X0(this,tb,ud).call(this)},E(this,Ha)))},Ns=new WeakSet,Tm=function(){X0(this,Ts,Mm).call(this),X0(this,Is,xm).call(this,X0(this,ws,vm).call(this))},ks=new WeakSet,wm=function(){E(this,eb)&&(clearTimeout(E(this,eb)),F(this,eb,void 0))},Ds=new WeakSet,Im=function(){E(this,Ab)&&(clearInterval(E(this,Ab)),F(this,Ab,void 0))},Es=new WeakSet,Nm=function(){const e=E(this,Ve).getQueryCache().build(E(this,Ve),this.options);if(e===E(this,_1))return;const t=E(this,_1);F(this,_1,e),F(this,vs,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},su=new WeakSet,VE=function(e){X5.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(E(this,xe))}),E(this,Ve).getQueryCache().notify({query:E(this,_1),type:"observerResultsUpdated"})})},nI);function Nq(A,e){return P8(e.enabled,A)!==!1&&A.state.data===void 0&&!(A.state.status==="error"&&e.retryOnMount===!1)}function RT(A,e){return Nq(A,e)||A.state.data!==void 0&&km(A,e,e.refetchOnMount)}function km(A,e,t){if(P8(e.enabled,A)!==!1){const n=typeof t=="function"?t(A):t;return n==="always"||n!==!1&&gg(A,e)}return!1}function QT(A,e,t,n){return(A!==e||P8(n.enabled,A)===!1)&&(!t.suspense||A.state.status!=="error")&&gg(A,t)}function gg(A,e){return P8(e.enabled,A)!==!1&&A.isStaleByTime(ur(e.staleTime,A))}function kq(A,e){return!ym(A.getCurrentResult(),e)}function Dq(A,e){return R7(A,e)}function Eq(A){return JSON.stringify(A,(e,t)=>zq(t)?Object.keys(t).sort().reduce((n,a)=>(n[a]=t[a],n),{}):typeof t=="bigint"?t.toString():t)}function zq(A){if(!UT(A))return!1;const e=A.constructor;if(typeof e>"u")return!0;const t=e.prototype;return!(!UT(t)||!t.hasOwnProperty("isPrototypeOf"))}function UT(A){return Object.prototype.toString.call(A)==="[object Object]"}function jq(A){const{_defaulted:e,behavior:t,gcTime:n,initialData:a,initialDataUpdatedAt:b,maxPages:r,meta:i,networkMode:s,queryFn:u,queryHash:y,queryKey:l,queryKeyHashFn:h,retry:M,retryDelay:T,structuralSharing:x,getPreviousPageParam:v,getNextPageParam:z,initialPageParam:j,_optimisticResults:w,enabled:L,notifyOnChangeProps:I,placeholderData:C,refetchInterval:O,refetchIntervalInBackground:B,refetchOnMount:H,refetchOnReconnect:V,refetchOnWindowFocus:K,retryOnMount:s0,select:y0,staleTime:r0,suspense:Q,throwOnError:J,config:q,connector:Y,query:t0,..._}=A;return _}function Cq(A,e={}){return{async queryFn({queryKey:t}){const n=e.abi;if(!n)throw new Error("abi is required");const{functionName:a,scopeKey:b,...r}=t[1],i=(()=>{const s=t[1];if(s.address)return{address:s.address};if(s.code)return{code:s.code};throw new Error("address or code is required")})();if(!a)throw new Error("functionName is required");return LG(A,{abi:n,functionName:a,args:r.args,...i,...r})},queryKey:Lq(e)}}function Lq(A={}){const{abi:e,...t}=A;return["readContract",jq(t)]}var Sq=0;function N(A,e,t,n,a,b){e||(e={});var r,i,s=e;if("ref"in s)for(i in s={},e)i=="ref"?r=e[i]:s[i]=e[i];var u={type:A,props:s,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Sq,__i:-1,__u:0,__source:a,__self:b};if(typeof A=="function"&&(r=A.defaultProps))for(i in r)s[i]===void 0&&(s[i]=r[i]);return R1.vnode&&R1.vnode(u),u}var YE=Tb(void 0),Oq=A=>{const e=H8(YE);if(A)return A;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Pq=({client:A,children:e})=>(G6(()=>(A.mount(),()=>{A.unmount()}),[A]),N(YE.Provider,{value:A,children:e})),GE=Tb(!1),Bq=()=>H8(GE);GE.Provider;function Rq(){let A=!1;return{clearReset:()=>{A=!1},reset:()=>{A=!0},isReset:()=>A}}var Qq=Tb(Rq()),Uq=()=>H8(Qq);function Zq(A,e){return typeof A=="function"?A(...e):!!A}function ZT(){}var Xq=(A,e)=>{(A.suspense||A.throwOnError||A.experimental_prefetchInRender)&&(e.isReset()||(A.retryOnMount=!1))},Jq=A=>{G6(()=>{A.clearReset()},[A])},Fq=({result:A,errorResetBoundary:e,throwOnError:t,query:n,suspense:a})=>A.isError&&!e.isReset()&&!A.isFetching&&n&&(a&&A.data===void 0||Zq(t,[A.error,n])),Wq=A=>{const e=A.staleTime;A.suspense&&(A.staleTime=typeof e=="function"?(...t)=>Math.max(e(...t),1e3):Math.max(e??1e3,1e3),typeof A.gcTime=="number"&&(A.gcTime=Math.max(A.gcTime,1e3)))},Hq=(A,e)=>A.isLoading&&A.isFetching&&!e,Vq=(A,e)=>(A==null?void 0:A.suspense)&&e.isPending,XT=(A,e,t)=>e.fetchOptimistic(A).catch(()=>{t.clearReset()});function Yq(A,e,t){var l,h,M,T,x;if(process.env.NODE_ENV!=="production"&&(typeof A!="object"||Array.isArray(A)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=Oq(t),a=Bq(),b=Uq(),r=n.defaultQueryOptions(A);(h=(l=n.getDefaultOptions().queries)==null?void 0:l._experimental_beforeQuery)==null||h.call(l,r),process.env.NODE_ENV!=="production"&&(r.queryFn||console.error(`[${r.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),r._optimisticResults=a?"isRestoring":"optimistic",Wq(r),Xq(r,b),Jq(b);const i=!n.getQueryCache().get(r.queryHash),[s]=p1(()=>new e(n,r)),u=s.getOptimisticResult(r),y=!a&&A.subscribed!==!1;if(Js(ou(v=>{const z=y?s.subscribe(X5.batchCalls(v)):ZT;return s.updateResult(),z},[s,y]),()=>s.getCurrentResult()),G6(()=>{s.setOptions(r,{listeners:!1})},[r,s]),Vq(r,u))throw XT(r,s,b);if(Fq({result:u,errorResetBoundary:b,throwOnError:r.throwOnError,query:n.getQueryCache().get(r.queryHash),suspense:r.suspense}))throw u.error;if((T=(M=n.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||T.call(M,r,u),r.experimental_prefetchInRender&&!Mb&&Hq(u,a)){const v=i?XT(r,s,b):(x=n.getQueryCache().get(r.queryHash))==null?void 0:x.promise;v==null||v.catch(ZT).finally(()=>{s.updateResult()})}return r.notifyOnChangeProps?u:s.trackResult(u)}function Gq(A,e){return Yq(A,Iq,e)}function qq(A){const e=Gq({...A,queryKeyHashFn:Eq});return e.queryKey=A.queryKey,e}function Kq(A={}){const e=RE(A);return Js(t=>PG(e,{onChange:t}),()=>SG(e))}function _q(A={}){const{abi:e,address:t,functionName:n,query:a={}}=A,b=A.code,r=RE(A),i=Kq({config:r}),s=Cq(r,{...A,chainId:A.chainId??i}),u=!!((t||b)&&e&&n&&(a.enabled??!0));return qq({...a,...s,enabled:u,structuralSharing:a.structuralSharing??Dq})}const JT=zE({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),FT=zE({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),Mg={address:""},Hs=Tb(Mg.address),i3={production:!1,feedbackDetailsMaxEndorsements:5,provider:window.ethereum},$q=A=>{Object.assign(i3,A)};function d3(A,e){const t=i3.production?ph:yh,n=A[db]||{}.VITE_UTU_APP_BASE_URL||t;if(!n)throw new Error(`${db} attribute of ${e} was not set`);return{apiUrl:n}}function eK(){return{socialLinkUrl:i3.production?$R:eQ}}const AK=Aq({chains:[JT,FT],transports:{[JT.id]:DT(),[FT.id]:DT("https://rpc.unlock-protocol.com/11155111")}}),tK=new wq;function D6({children:A,forwardedRef:e,className:t,style:n,excludeBootstrap:a,excludeFonts:b}){return N(aq,{config:AK,children:N(Hs.Provider,{value:Mg.address,children:N(Pq,{client:tK,children:N("div",{ref:e,className:t,children:[N("style",{children:[!b&&N(IA,{children:'@import "https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap";'}),!a&&N(IA,{children:'@import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-reboot.min.css"; @import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-grid.min.css"; @import "https://getbootstrap.com/docs/5.0/dist/css/bootstrap-utilities.min.css";'}),n]}),A]})})})})}function ca(A){return h4(hn(A))}const wA={[z1.polygon_mainnet]:{chainId:ca(137)},[z1.ethereum_testnet]:{chainId:ca(11155111)},[z1.lisk_mainnet]:{chainId:ca(1135)},[z1.lisk_testnet]:{chainId:ca(4202)},[z1.optimism_mainnet]:{chainId:ca(10)},[z1.optimism_testnet]:{chainId:ca(11155420)},[z1.aurora_mainnet]:{chainId:ca(1313161554)},[z1.aurora_testnet]:{chainId:ca(1313161555)}},nK={[z1.polygon_mainnet]:{chainId:wA[z1.polygon_mainnet].chainId,chainName:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:["https://polygon-rpc.com"],blockExplorerUrls:["https://polygonscan.com"]},[z1.ethereum_testnet]:{chainId:wA[z1.ethereum_testnet].chainId,chainName:"Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://1rpc.io/sepolia"],blockExplorerUrls:["https://sepolia.etherscan.io"]},[z1.lisk_mainnet]:{chainId:wA[z1.lisk_mainnet].chainId,chainName:"Lisk",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.api.lisk.com"],blockExplorerUrls:["https://blockscout.lisk.com"]},[z1.lisk_testnet]:{chainId:wA[z1.lisk_testnet].chainId,chainName:"Lisk Sepolia Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.sepolia-api.lisk.com"],blockExplorerUrls:["https://sepolia-blockscout.lisk.com"]},[z1.optimism_mainnet]:{chainId:wA[z1.optimism_mainnet].chainId,chainName:"OP Mainnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"]},[z1.optimism_testnet]:{chainId:wA[z1.optimism_testnet].chainId,chainName:"OP Sepolia",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.optimism.io"],blockExplorerUrls:["https://sepolia-sequencer.optimism.io"]}},aK={[z1.polygon_mainnet]:"0xE62dc4c82a9749Bf2E40F73138B3CFee0a2EC89F",[z1.ethereum_testnet]:"0x537BE61c5EFB865Df53CA55eeA07ceEe5d5fB162",[z1.lisk_mainnet]:"0x3B2A3a6E8C087fe399a24e08D3Cab12f17e033C3",[z1.lisk_testnet]:"0x0125f1E709eC3dEA2aD8152826fD4b9496086B71",[z1.optimism_mainnet]:"0xb2e9dB661F992d2F3013e4AFcE01C72d52f58A37",[z1.optimism_testnet]:"0xbdF3b87B410C50Ba9620d8Ac416A81e6bF7296eF",[z1.aurora_mainnet]:"0xaE53DcC63d7895600e2510A986Dc2b65c953E26c",[z1.aurora_testnet]:"0x2ac7F081f8eB51ce393bA298e4C020b0DeF420E1"};async function bK(A,e){const t=nK[e];await A.request({method:"wallet_addEthereumChain",params:[t]})}async function WT(A,e){const t=wA[e];await A.request({method:"wallet_switchEthereumChain",params:[t]})}function rK(A){return i3.production?fK(A):iK(A)}function fK(A){switch(A){case wA[z1.lisk_mainnet].chainId:return z1.lisk_mainnet;case wA[z1.optimism_mainnet].chainId:return z1.optimism_mainnet;case wA[z1.aurora_mainnet].chainId:return z1.aurora_mainnet;default:return z1.polygon_mainnet}}function iK(A){switch(A){case wA[z1.lisk_testnet].chainId:return z1.lisk_testnet;case wA[z1.optimism_testnet].chainId:return z1.optimism_testnet;case wA[z1.aurora_testnet].chainId:return z1.aurora_testnet;default:return z1.ethereum_testnet}}async function dK(A){return rK(A)}function sK(A){return aK[A]}function J2(){return i3.provider}function Z7(A){return{ids:{uuid:A}}}function vg(A,e={}){return{...e,headers:{...e.headers||{},...cK(A)}}}function cK(A){return{Authorization:`Bearer ${A}`}}async function qE(A,e,t,n,a){const b=vN.stringify({sourceCriteria:JSON.stringify(Z7(e)),targetType:t,targetCriterias:a==null?void 0:a.map(u=>JSON.stringify(Z7(u)))}),r=`${A}${vu}${nQ}?${b}`,i=vg(n);return await Bf.get(r,i)}async function KE(A,e,t,n,a,b){return Bf.post(`${A}${vu}${aQ}`,{sourceCriteria:t,targetCriteria:n,transactionId:a,items:b},vg(e)).then(r=>r).catch(r=>r)}async function _E(A,e,t,n){const a=Z7(t),b=Z7(n),r=vN.stringify({sourceCriteria:a,targetCriteria:b}),i=`${A}${vu}${rQ}?${r}`;return Bf.get(i,vg(e))}async function $E(A=null,e=null,t=!1){var y;(y=window==null?void 0:window.xUtuConfig)!=null&&y.production?config.production=window.xUtuConfig.production:(window.xUtuConfig={},xUtuConfig.production=!0);const n=A??(i3.production?ph:yh),a=J2();if(!a&&!e)return null;const r=await new Bu(e||a).getSigner(),i=await r.getAddress(),s=await r.signMessage("Sign in at UTU"),{data:u}=await Bf.post(`${n}${fQ}`,{address:i,signature:s},{withCredentials:!!t});return u}async function ez(A,e=i3.production?ph:yh){try{const t=await J2();await t.request({method:"eth_requestAccounts"});const b=await(await new Bu(t).getSigner()).getAddress(),r=await Bf.get(`${e}${iQ}/${b}`,{headers:{Authorization:`Bearer ${A}`}});return{balance:typeof r.data=="number"?r.data:"N/A"}}catch(t){return console.error("Error fetching UTT balance:",t),{balance:"N/A",error:t instanceof Error?t:new Error(String(t))}}}function Vf(){const[A,e]=p1(uK());return G6(()=>{function t(n){const{access_token:a}=n.detail;e(a)}return window.addEventListener(fy,t),()=>{window.removeEventListener(fy,t)}},[]),{accessToken:A}}async function oK(A=null,e=null,t=!1){const n=await $E(A,e,t);return await localStorage.setItem(mh,JSON.stringify(n)),n}function uK(){const A=localStorage.getItem(mh);if(A){const{access_token:e}=JSON.parse(A),{exp:t}=sQ(e);if(lK(t))return e}return null}function lK(A){return Date.now()<A*1e3}function Az(){const[A,e]=p1(null);return G6(()=>{async function t(){const n={burnerconnect:{package:PB,options:{defaultNetwork:"100"}}},a=new SB({cacheProvider:!0,network:"mainnet",providerOptions:n});e(a)}t()},[e]),{web3Modal:A}}function pK(A){const e=A==null?void 0:A.trim();return e?e.split(" "):void 0}function yK(A,e,t,n){const{accessToken:a}=Vf(),[b,r]=p1(void 0);return G6(()=>{async function i(){const s=await qE(A,e,t,a,pK(n));r(s.data.result)}i()},[a,A,e,t,n]),{rankingItems:b}}var U8=(A=>(A[A.idle=0]="idle",A[A.submitting=1]="submitting",A[A.success=2]="success",A[A.error=3]="error",A))(U8||{});const mK=3e3;function X7(A){setTimeout(()=>A(0),mK)}function Uu(A,e,t,n){const{accessToken:a}=Vf(),[b,r]=p1(0),i=HT(e),s=HT(t);async function u(y){return r(1),KE(A,a,i,s,n,y).then(l=>(r(2),X7(r),l)).catch(l=>(r(3),X7(r),l))}return{sendFeedback:u,submitStatus:b}}function hK(A){const{accessToken:e}=Vf(),[t,n]=p1([]);return G6(()=>{async function a(){const b=await Bf.get(`${A}${vu}${bQ}`,xK(e));n(b.data.result)}a()},[n,A,e]),{badgeSets:t}}function gK(A,e,t){const{accessToken:n}=Vf(),[a,b]=p1(void 0),[r,i]=p1(0);return G6(()=>{async function s(){i(1);try{const u=await _E(A,n,e,t);i(2),b(u.data.result.items)}catch(u){console.log(u)}}s()},[b,A,n,e,t]),{feedbackSummary:a,submitStatus:r}}function MK(A,e,t){const{accessToken:n}=Vf(),[a,b]=p1({uploading:!1});return G6(()=>{if(!e)return;const r={read(){return e.read()}},i={resume:!1,endpoint:{}.VITE_UTU_VIDEO_UPLOAD_URL||`${A}${AQ}/upload`,headers:tz(n),chunkSize:28*1024,uploadLengthDeferred:!0,retryDelays:[0,3e3,5e3,1e4,2e4],metadata:{filename:"webcam.webm",filetype:"video/webm"},onError(){b({uploading:!1,errorMessage:"video was not successfully uploaded "})},onSuccess(){const u=vK(A,s.url);t(u),b({successMessage:"video was successfully uploaded"}),b({uploading:!1,publishedVideoUrl:u})}},s=new WR(r,i);s.start(),b({uploading:!0})},[n,e]),a}function vK(A,e){const t=e.split("/").pop();return{}.VITE_UTU_VIDEO_PUBLISHED_BASE_URL?`${{}.VITE_UTU_VIDEO_PUBLISHED_BASE_URL}/${t}`:`${A}${tQ}/${t}`}function HT(A){return{ids:{uuid:A}}}function xK(A,e={}){return{...e,headers:{...e.headers||{},...tz(A)}}}function tz(A){return{Authorization:`Bearer ${A}`}}const TK=`::slotted(ul){list-style:none;padding:0;margin:0}
|
|
369
369
|
`;function wK(A){const{apiUrl:e}=d3(A,uh),t=A[p5],n=A[Qf],a=A[eN],{rankingItems:b}=yK(e,t,n,a),r=e3();return G6(()=>{r.current&&b&&(r.current.data=b,setTimeout(()=>{r.current.dispatchEvent(new CustomEvent("loaded",{composed:!0,detail:{data:b}}))},0))},[r,b]),N(D6,{forwardedRef:r,className:"recommendation-root",style:TK,excludeBootstrap:!0,excludeFonts:!0,children:N("slot",{})})}const IK=`p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.5),rgba(255,255,255,0));background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd3326;min-height:10rem;border-radius:10px;margin-top:3%}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.utu-recommendation{border-radius:5px;padding-right:1rem}.utu-recommendation-content{display:flex;margin-left:5px}.utu-recommendation-text{align-self:center;margin-left:20px}.utu-recommendation-text-light{color:#000}.utu-recommendation-text-dark{color:#fff}.summary-image-list{display:flex;justify-content:center;margin:1.5rem 0 1rem 2rem;padding-left:0;list-style:none}.summary-image-item{margin-left:-15px;height:2.5rem}.summary-image-item-light,.summary-image-item-dark{border:2px solid rgb(252,229,70)}
|
|
370
370
|
`;function Dm(A){if(A&&A.current){const t=A.current.getRootNode().host.closest(uh);if(t)return t.shadowRoot.firstChild}return null}function VT(A,e){const t=Dm(A);return t&&t.data?t.data.find(n=>n.entity.uuid===e):null}function NK(A){const e=e3(),t=A[Ce],[n,a]=p1(!1),[b,r]=p1(VT(e,t));A[NA]==="dark"&&a(!0);const i=n?"dark":"light";return G6(()=>{function s(){r(VT(e,t))}if(e.current&&t){const u=Dm(e);u&&u.addEventListener("loaded",s)}return()=>{const u=Dm(e);u&&u.removeEventListener("loaded",s)}},[e,t]),N(D6,{forwardedRef:e,className:`utu-recommendation x-utu-section x-utu-section-no-border-${i}`,children:[N("style",{children:IK}),b&&N("div",{className:"utu-recommendation-content",children:[N("ul",{className:"summary-image-list",children:b.summaryImages.map(s=>N("li",{children:N("img",{className:`rounded-circle summary-image-item summary-image-item-${i}`,src:s,onError:u=>{u.target.onerror=null,u.target.src="",u.target.className="",u.target.alt=""},alt:"profile"})},s))}),N("div",{className:`utu-recommendation-text utu-recommendation-text-${i}`,children:b.summaryText})]})]})}const kK=`p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.5),rgba(255,255,255,0));background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd3326;min-height:10rem;border-radius:10px;margin-top:3%}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.utu-feedback-form{width:100%;margin:auto;background-color:#fff}.utu-feedback-form_title_wrapper{border-radius:0 40px 40px 0;width:60%;background-color:#ffdd33b3;font-weight:400;font-size:16px;font-family:sans-serif;padding:1rem 3rem}.utu-feedback-form_title{letter-spacing:.2rem}.x-utu-feedback-form-text{letter-spacing:.1rem}.x-utu-feedback-form_body_1{background-color:#fff;display:flex;justify-content:space-between;padding:1rem 32px;margin-top:2%}.x-utu-feedback-form_body_2{background-color:#fff}.x-utu-feedback-details_divider{background-color:gray;height:100px;width:3px}.x-utu-feedback-form_body_recordvideo,.x-utu-feedback-form_body_StarRatinginput{width:46%}@media only screen and (max-width: 1000px){.utu-feedback-form_title_wrapper{text-align:center;width:100%;border-radius:0}}@media only screen and (max-width: 1300px){.x-utu-feedback-form_body_1{flex-direction:column}.x-utu-feedback-form_body_recordvideo,.x-utu-feedback-form_body_StarRatinginput{width:100%;text-align:center;padding:.5rem 0}.x-utu-feedback-details_title-text{width:50%;font-size:12px}}
|
|
371
371
|
`,nz=`p{margin-bottom:0}.x-utu-h3{text-transform:capitalize;font-weight:500;font-size:.9rem}.x-utu-h3-balance{text-transform:capitalize;font-weight:700;font-size:.9rem}.x-utu-error{color:#e80054}:host{margin:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:14px;font-weight:300;line-height:1.5;color:#000;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:#000000}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg);border-top-color:#fce546;border-bottom-color:#9b9898;border-right-color:transparent;border-left-color:transparent}to{transform:rotate(360deg)}}.x-utu-spinner{margin:5px;display:inline-block;border:3px solid rgb(252,229,70);border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:spin 1s infinite}.x-utu-spinner-default-size{width:21px;height:21px}.x-utu-btn{padding:12px;border:none;border-radius:10px;font-size:14px;font-weight:500;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.x-utu-btn-light,.x-utu-btn-dark{background-color:#fce546;color:#000!important}.x-utu-btn-round,.x-utu-btn-round-text{color:#fdfdfd!important}.x-utu-btn-icon{border:none;background:none;padding:0;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500;font-size:14px}button.p{color:#fff}.submit-result,.submit-error,.submit-success{display:flex;flex-direction:column;justify-content:center;align-content:center;text-align:center}.logo-position-form{position:absolute;bottom:.3rem;right:22%;z-index:0}.logo-position-details{position:absolute;top:1rem;left:0;z-index:0;width:.5rem}.logo-position-player{position:absolute;bottom:-.5rem;left:22rem;z-index:0;display:none;width:.5rem}.logo-position-mobile{position:absolute;top:-1.5rem;right:4rem;z-index:2;width:.5rem}.logo-position-video{position:absolute;left:5%;bottom:3%}.logo-section,.logo-section-mobile{position:relative}.logo-size{width:5rem}.logo-video-section{position:relative}.logo-video-position{position:absolute;z-index:0;display:none;width:5rem;left:21rem;top:35.6rem}.x-utu-text-area{resize:vertical;min-height:8rem;border-radius:10px;border:none;padding:16px;font-weight:300;font-size:.9rem;background-color:#ffdd331a}.x-utu-video-icon{width:2rem;height:1.4rem}.x-utu-video-icon-dark,.x-utu-video-icon-light{fill:#000}@media only screen and (min-width: 768px){.x-utu-h3-balance,.x-utu-h3{font-size:.8rem}.x-utu-text-area{background-color:#ffdd331a}.logo-section{position:relative}.logo-section-mobile .logo-position-video{position:absolute;left:5%;bottom:5%}.logo-section-mobile .logo-section{position:relative}}.x-utu-border-radius{border-radius:5px}@media only screen and (min-width: 768px) and (max-width: 991px){.x-utu-btn{padding:10px;font-size:.9rem}}.x-utu-skeleton{background-color:#e2e5e7;background-image:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.5),rgba(255,255,255,0));background-size:40px 100%;background-repeat:no-repeat;background-position:left -40px top 0;animation:shine 1s ease infinite}@keyframes shine{to{background-position:right -40px top 0}}.x-utu-description{background-color:#fcf8e5;padding:5px;margin-bottom:10px;width:100%;display:flex;flex-direction:row;flex-basis:content}.x-utu-details{width:70%;display:flex;flex-direction:column;margin:5px}.x-utu-icon{width:20%;min-height:70px;border-radius:4px;margin:auto}.x-utu-title{width:100%;min-height:28px;border-radius:4px;margin-bottom:5px;line-height:28px}.x-utu-information{min-height:42px;border-radius:4px;width:100%}.placeholder-card_wrapper{margin-bottom:.5rem}.placeholder-card{width:100%;display:flex;padding:2rem 2.5rem 2rem 1.5rem;background-color:#ffdd3326;min-height:10rem;border-radius:10px;margin-top:3%}.placeholder-icon{width:3rem}.placeholder-text-title{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:0 8px;white-space:pre-line;width:50px;inline-size:100%;font-style:italic;font-weight:500}.placeholder-text-body{display:flex;text-align:left;padding-left:1rem;font-size:15px;align-items:center;margin:.5rem 8px;white-space:pre-line;width:50px;inline-size:100%}.target-human-readable{padding:.5rem;font-size:17px;text-align:left;color:#000;font-family:sans-serif;font-weight:700}.button{cursor:pointer}.button:hover{background-color:#fdfdfd}.button:active{transform:translateY(1px)}.x-utu-badge-set-container{width:100%;height:72px;padding:1rem 1rem 1rem 0}.x-utu-badge-set-section{width:100%;display:flex;flex-direction:row;background-color:#ffdd331a;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px;border-radius:10.07px}.x-utu-badge-section{display:flex;overflow-x:scroll;white-space:nowrap;padding-bottom:1rem;width:95%;margin:auto}.x-utu-badge-section-container{padding-top:1rem}.x-utu-badge-section>div{padding:1rem}.x-utu-badge-section::-webkit-scrollbar{width:10px;height:8px}.x-utu-badge-section::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.x-utu-badge-section::-webkit-scrollbar-thumb{background:rgb(252,229,70);border-radius:10px}.x-utu-badge-section::-webkit-scrollbar-thumb:hover{background:#555}.x-utu-badge-disable{height:50px;width:50px;opacity:.6}.x-utu-badge-item-text{justify-content:center;align-items:center;color:#fff}.x-utu-badge-text{font-size:.7rem}.x-utu-badge-text-h3{text-align:center;margin-bottom:8px;font-family:sans-serif;letter-spacing:1px;font-size:14px;font-weight:500}.x-utu-badge-text-h3-light{color:#000}.x-utu-badge-text-h3-dark{color:#fff}.x-utu-badge-img{width:2rem}.x-utu-badge-img-container{display:flex;justify-content:space-around;opacity:1}.x-utu-badge-img-big{width:4.5rem}.x-utu-badge-img-big-section{display:flex;align-items:center;justify-content:center;padding:1rem}.x-utu-badge-section-title{margin-left:4%;margin-bottom:8px;font-family:sans-serif;letter-spacing:1px;font-size:17px;font-weight:500}@media only screen and (min-width: 768px){.x-utu-badge-section{padding-left:0;padding-right:0}}@media only screen and (min-width: 1210px){.x-utu-badge-section{padding-top:0}}
|
|
@@ -30589,7 +30589,7 @@ async function sG(A, e) {
|
|
|
30589
30589
|
});
|
|
30590
30590
|
return b0 === "0x" ? { data: void 0 } : { data: b0 };
|
|
30591
30591
|
} catch (Q) {
|
|
30592
|
-
const J = pG(Q), { offchainLookup: q, offchainLookupSignature: Y } = await import("./ccip-
|
|
30592
|
+
const J = pG(Q), { offchainLookup: q, offchainLookupSignature: Y } = await import("./ccip-8362f12e.js");
|
|
30593
30593
|
if (A.ccipRead !== !1 && (J == null ? void 0 : J.slice(0, 10)) === Y && j)
|
|
30594
30594
|
return { data: await q(A, { data: J, to: j }) };
|
|
30595
30595
|
throw H && (J == null ? void 0 : J.slice(0, 10)) === "0x101bb98d" ? new tG({ factory: y }) : iG(Q, {
|
|
@@ -34271,7 +34271,7 @@ const Gq = qG({
|
|
|
34271
34271
|
chains: [XT, JT],
|
|
34272
34272
|
transports: {
|
|
34273
34273
|
[XT.id]: kT(),
|
|
34274
|
-
[JT.id]: kT()
|
|
34274
|
+
[JT.id]: kT("https://rpc.unlock-protocol.com/11155111")
|
|
34275
34275
|
}
|
|
34276
34276
|
}), qq = new gq();
|
|
34277
34277
|
function D6({
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-4c433761.cjs");exports.addressSignatureVerification=e.addressSignatureVerification;exports.coreSDKGetFeedbackDetails=e.coreSDKGetFeedbackDetails;exports.coreSDKsendFeedback=e.coreSDKsendFeedback;exports.fetchUTTBalance=e.fetchUTTBalance;exports.getRanking=e.getRanking;exports.signAndGetToken=e.signAndGetToken;exports.updateConfig=e.updateConfig;
|
package/dist/index.js
CHANGED
package/dist/manifest.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_index-
|
|
2
|
+
"_index-4c433761.cjs": {
|
|
3
3
|
"dynamicImports": [
|
|
4
4
|
"node_modules/viem/_esm/utils/ccip.js"
|
|
5
5
|
],
|
|
6
|
-
"file": "index-
|
|
6
|
+
"file": "index-4c433761.cjs"
|
|
7
7
|
},
|
|
8
|
-
"_index-
|
|
8
|
+
"_index-7f442143.js": {
|
|
9
9
|
"dynamicImports": [
|
|
10
10
|
"node_modules/viem/_esm/utils/ccip.js"
|
|
11
11
|
],
|
|
12
|
-
"file": "index-
|
|
12
|
+
"file": "index-7f442143.js"
|
|
13
13
|
},
|
|
14
14
|
"node_modules/viem/_esm/utils/ccip.js": {
|
|
15
|
-
"file": "ccip-
|
|
15
|
+
"file": "ccip-df5cf9c8.cjs",
|
|
16
16
|
"imports": [
|
|
17
|
-
"_index-
|
|
17
|
+
"_index-4c433761.cjs"
|
|
18
18
|
],
|
|
19
19
|
"isDynamicEntry": true,
|
|
20
20
|
"src": "node_modules/viem/_esm/utils/ccip.js"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"src/index.ts": {
|
|
23
23
|
"file": "index.cjs",
|
|
24
24
|
"imports": [
|
|
25
|
-
"_index-
|
|
25
|
+
"_index-4c433761.cjs"
|
|
26
26
|
],
|
|
27
27
|
"isEntry": true,
|
|
28
28
|
"src": "src/index.ts"
|